0 down vote I haven't been able to find what I need.  For me. A project is a client. Their entire html / css / js website.  I need to maintain various search / replace values at a project level.  Select a Project.  And a list of project specific search / replace (that I created) entries appear.  If I open a different project… it may have similar search / replace values… but they are not related to any other project. It's literally a different website / property.  I’ve tried numerous applications that allow me to perform search / replaces but most don’t allow me to save the patterns (to eliminate re-typing 100’s of patterns every month)  and I’ve only found 1 (MassReplaceIt) that allows to save the changes at a project level…  Managing the patterns with MassReplaceIt is extremely cumbersome when you have 50 projects you are working on every month. Performing the same changes to each project - every month / over and over.  I want to be able to open a project… Add / Edit / Remove / Enable / Disable / Execute a list of Search / Replace patterns.  Then I want to open a different project and do the exact same thing (with it's own project values) - without affect any other project.  This would save me days and days of work every month.  And it needs to be Mac based.  Anyway / any software to do this ?

I'm looking for an OS X tool which allows me to search and replace a search string in multiple files. The requirements are the following:   Search and Replace Search by regular expression Search across multiple files Search across nested directory structures Replace expression can use values from the search (Regular Expression) The tool has an easy to use user interface Preferably free   I know that some text editors like BBEdit have this functionality, but I would prefer a lightweight tool that doesn't require me to open the files for editing first.  If there aren't any tools to match these requirements, I would also consider a command line alternative. I know that perl and sed support something like this - a solution that I can define either as a Bash alias or function would be welcome in this case.


I'm writing a program that prints an array containing the sum of the values of two arrays passed as parameters. It all works fine with the exception of the last double value. I want the last value to print as 3.1. Instead it's printing the following:  [5.9, 11.7, 2.4, 3.0999999999999996]  Not sure how to format to print otherwise as I'm not allowed to use a String to solve it. I'm not having that problem with the other values. Here's my code and thanks for the help!      import java.util.*;  class Sum {     public static void main (String [] args)     {         double [] a1 = {4.5, 2.8, 3.4, 0.8};         double [] a2 = {1.4, 8.9, -1.0, 2.3};          arraySum (a1, a2);          System.out.println (Arrays.toString (arraySum (a1, a2)));        }      public static double [] arraySum (double [] x, double [] y)     {         int length = 0;         double [] sum = new double [x.length];         length = x.length;              for (int i = 0; i <= length - 1; i++)             {                 sum[i] = x[i] + y[i];             }          return sum;      } }


I recently got Linux, and wanted to run the game dwarf fortress in my USB flash drive. To run dwarf fortress on Linux you have to use ./df in the dwarf fortress folder, but when I use this command it says: bash: ./df: Permission denied. This happened a while ago when I wanted to run it in my NTFS partition, but I fixed it (I don't remember how.) I would like to fix this, thank you.

I have a script that I need to execute on an NTFS partition. The script's permission is set to 600.  I attempted to modify the permissions by running chmod 755 script.sh, which doesn't report a failure or anything - but it also doesn't change the permissions on the file:  $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700  $ chmod 755 script.sh $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700   As you can see, it remains unchanged.


I need to create a file if i double click it it will directly be opened by terminal. I wasn't able find info about that rather than clicking make file ex.. under properties section of a file. Can you guide me or mark this as duplicate of some other question?

When I double-click on a script in Nautilus to run it, the script just opens in my text editor with no option to run it. Using Nautilus, how do I run executable text files and/or scripts?


Let $\mathcal{C}$ be a class of sets/spaces/structures among which we have a dimension. Namely a map $d:\mathcal{C}\rightarrow \mathbb{N}$ defined in a certain manner that motivated the appellative dimension.     What properties would you expect $d$ to have?     E.g. if $Y, X\in\mathcal{C}$ and $Y\subseteq X$ then $\dim Y\leq \dim X$.  Another way of phrasing this question is, what properties are shared by every standard notion of dimension in mathematics?

The concept of dimension is used in many different contexts.   Generally a dimension is a function that has as domain some family of sets ad has value on a set that, in the most common situations, is $\mathbb{N}$ or $\mathbb{R}$. As an example of the first case we can think to the dimension of  (but this can also be infinite) or to the  of commutative rings. As an example of the second case we can think to the  for metric spaces ( and its variants). But we can also define dimensions that have as range a family of ordered sets and as range an interval of $\mathbb{R}$, as in the case of , and it seems that we can also define a dimension functions on super vector space that can have negative values, and a dimension with complex values for self-similar sets ().  All these dimensions are different in their definitions and properties and, if I well understand there is not an axiomatic definition of dimension that can be used to identify  a function as a dimension function (see:).  So my question is why mathematicians call all those different function with the same name? I understand that the name come from our common intuition of dimension but I don't understand how such intuition apply to such sophisticated notions called dimension.  More precisely:     I'm curious to know what is the inspiration that guide a mathematician to recognize that a particular function can be called a dimension.    I see that this is not a question that can have a unique and well defined answer, but I suppose (or I hope) that there is some common mathematical meaning about this so used word.


I have created a custom exit button and i want the code to terminate if that button is pressed. How can i achieve that?  String[] button1 = {"exit", "next"}; //if next is pressed if (code == JOptionPane.YES_OPTION) {   JOptionPane.showMessageDialog(               null,                "Knock knock" + "\nWho is there",               "The Jasmin Project",               JOptionPane.YES_NO_OPTION);   int no = JOptionPane.showOptionDialog(null, "Want to view more?",               "The Jasmin Project",               JOptionPane.YES_NO_OPTION,               JOptionPane.INFORMATION_MESSAGE,               null,               button1,               button1[0]);   //end code if exit is pressed               if (no == JOptionPane.NO_OPTION) {      System.exit(1);   } }

What is the proper way to terminate a Swing application from the code, and what are the pitfalls?  I'd tried to close my application automatically after a timer fires. But just calling dispose() on the JFrame didn't do the trick - the window vanished but the application did not terminate. However when closing the window with the close button, the application does terminate. What should I do?


Just out of curiosity what kind of network activity causes the spinner in the status bar to spin? It never spins in my app even when data is being fetched. In Instagram, it always spins when data is being fetched.      Edit: To clarify that this question is not a duplicate. I am wondering what makes the loading indicator appear in the status bar, not just how to make it appear. Is it common to call UIApplication.shared.isNetworkActivityIndicatorVisible = true every time a call is made to the server?

I have noticed that some apps like Safari and Mail show a loading indicator in the status bar (the bar at the very top of the phone) when they are accessing the network. Is there a way to do the same thing in SDK apps, or is this an Apple only thing?


Is it true, that a compact (topological?) manifold without boundary is a boundary of another compact manifold? Intuitively it looks like for most manifolds there must be some relation similar to $\mathbb{S}^n=\partial D^{n+1}$.  It looks like a very trivial question, though I can not find any reference.  Thanks.

What are some examples of manifolds that do not have boundaries and are not boundaries of higher dimensional manifolds?  Is any $n$-dimensional closed manifold a boundary of some $(n+1)$-dimensional manifold?


I am working with the following snippet and the end result is a number like 349. How do I format it to be $349.00?  I thought formatNumber() would work?  What am I doing wrong? The javascript runs through a series of calculations and then presents Net Total, Tax and Total.  For Net Total and Tax I would like to see a $ and two decimal places.

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00"  What's the best way to do this?


I decided to try out the newly launched Drupal 8. After resolving some issues I finally got the installer up and running (using WAMP), and arrived onto clean homepage of my test site.  the problem here is that clicking on any Admin menu links at the top of the page takes me to a Page Not Found... Anyone know if this has been reported among other users and if there is a fix for this?

I installed Drupal 7 on Wamp Server. I can't find any checkbox or link to enable clean URLs; I see only the Run the Clean URL Test button.  How can I enable clean URLs?


I'm trying to generate a covariance matrix between two multivariate vectors with specified variances for each dimension, correlations between dimensions within a single vector, and cross-correlations between dimensions of the two vectors. When I try to generate multivariate normal data using this covariance matrix, I get a matrix not positive definite (PSD) error. Can someone please help me figure out why my matrix is not PSD? My Matlab code is below.  D = 2; % number of X variables P = 3; % number of Y variables N = 1000; % number of data points  %%% Choose variances of x's and y's stdX = gamrnd(1, 1, D, 1); stdY = gamrnd(1, 1, P, 1);  %%% Choose correlations between x's and y's corrX = corrcov(wishrnd(eye(D), D+1)); corrY = corrcov(wishrnd(eye(P), P+1)); corrXY = unifrnd(-1, 1, D*P);  %%% Construct covariance matrix for x's SigXX = nan(D); for i = 1:D     for j = 1:D         if i == j             SigXX(i,j) = stdX(i).^2;         else             SigXX(i,j) = corrX(i,j).*stdX(i)*stdX(j);         end     end end  %%% Construct covariance matrix for y's SigYY = nan(P); for i = 1:P     for j = 1:P         if i == j             SigYY(i,j) = stdY(i).^2;         else             SigYY(i,j) = corrY(i,j).*stdY(i)*stdY(j);         end     end end  %%% Construct cross-covariance matrix SigXY = nan(D, P); for i = 1:D     for j = 1:P         SigXY(i,j) = corrXY(i,j)*stdX(i)*stdY(j);     end end  %%% Construct full covariance matrix Sig = [SigXX SigXY; SigXY' SigYY];  %%% Generate fake data data = mvnrnd(zeros(D+P, 1), Sig, N);

I have been researching the meaning of positive semi-definite property of correlation or covariance matrices.   I am looking for any information on   Definition of positive semi-definiteness; Its important properties, practical implications; The consequence of having negative determinant, impact on multivariate analysis or simulation results etc.


I'm a little ashamed but I seem as in the first step of Latex... In this example, the  parenthesis of the equation number are inversed. Why? How I can I obtain the good numbering? Thanks.  I give a minimal example. The simple file  \documentclass[11pt]{book}  \usepackage{amssymb} \usepackage{amsmath}  \usepackage{polyglossia}  \setmainlanguage{english} \setotherlanguage{arabic}  \begin{document} A sample \begin{equation} 1+1=2 \end{equation} \end{document}   It's compilation gives

I am using   \begin{equation} a = b \end{equation}   to write the equations in my paper. However, the problem is that the number related to each equation is not shown in the correct format like the picture   How can I fix this?  This is what I have at the first of my code:  \usepackage{graphicx} \usepackage[justification=centering]{caption} \usepackage{float} \usepackage{url}% typeset urls \usepackage{times} \usepackage{url} \usepackage{latexsym} \usepackage{fontspec} \usepackage{multirow} \usepackage{listings} \usepackage{setspace} \usepackage{listings} \usepackage{fontspec} \usepackage{amsmath} \usepackage{polyglossia} \usepackage{color} \usepackage{bidi} \newfontfamily\faFont[Script=Arabic]{Yas}  \newenvironment{Fa}{\begin{RTL}\faFont}{\end{RTL}} \newcommand{\fa}[1]{{\faFont\RL{#1}}} \newcommand\Mark[1]{\textsuperscript#1} \definecolor{backcolour}{rgb}{0.95,0.95,0.92} \definecolor{darkblue}{rgb}{0.95,0.95,0.92} \setmainlanguage{english} \setotherlanguage{farsi} \newfontfamily\farsifont[Script=Arabic]{Yas}


I want to draw a Cayley graph of a group using GAP after I get a list. Is there a way to visualize that Cayley graph ? Or  is there any other software to do it?

In GAP when we draw a cayley graph of a group using "CayleyGraph" command we get a list. Is there a way to visualize that cayley graph like a figure?  Or else is there any other software that has the ability to visualize?


I would like to be able to add an unpublished class to the body tag of a node (for both its main view and edit view) if the node has been unpublished.   How can I do this?    Steps I have taken:  1) Node Object The  contains if a node has been published or unpublished (with $node -> Status), but I am not sure how to test this for each node and then add it to the body class.  , but the provided answer doesn't work.  2) Drupal 6 This  how to do it for Drupal 6, but the code doesn't work for Drupal 7.

I am trying to add a body class to my site in template.php based on whether or not a node is published or not. I had a look around here and on drupal.org and pieced together some code but I am getting an error. Here is what I have tried so far:  function responsive_process_html(&$variables) {    if ($node->status == 1){         //$variables['#attributes']['class'][] = 'pub';         $variables['classes_array'][] = 'published';     }      else {         $variables['classes_array'][] = 'not-published';     } }   ... but I am getting this error:  Notice: Undefined variable: node in responsive_process_html() (line 37 of /sites/all/themes/responsive/template.php). Notice: Trying to get property of non-object in responsive_process_html() (line 37 of /sites/all/themes/responsive/template.php).   I also tried $variables['#attributes']['class'][] = 'published'; instead of $variables['classes_array'][] = 'published'; but it made no difference.


I faced whit this issue trying to install any package:  The dependency tree is built  Status information is read ... Finished  The gimp package is not available, but it is mentioned by another package. This might mean that the package is missing, has become obsolete, or Is only available from another source.  E: Package 'gimp' has no installation candidate   How can I fix it? Thank you.

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


We can say:    the smell of it   Can we say:    the arrival of him the son of me   And we can't say:   a suggestion of Mr. Smith (should be Mr.Smith's, right?)   Can we say:   a suggestion of Mr. Smith appointed at that time. (the modifier is long)

As  shows, we nearly always use the possessive form of personal pronouns for friend of mine/his/ours/etc.  But when it comes to actual names, we prefer  without the possessive apostrophe. That preference is even more marked with, say, . Not that I think the usage itself is particularly American - it's much the same with .  Personally, I find friend of him grates. In general I've no strong feelings either way as to whether it's friend of Peter or friend of Peter's (though I deplore the possessive in ), but in line with many others, I really don't like the possessive in relation to things like countries.  Why is this?   Edit: Noting an apparent "progression" (pronoun -> person -> nation) marked by reduction in use of the possessive, I checked at a finer "granularity". NGram shows that although it does occur,  virtually "flatlines" against friend of mine. But the bias reduces through of you, of us, and by the time I get to  it's much less extreme. There seems to be something "egocentric" about the double possessive.  Presumably when babies learn to speak, they soon notice that possessive pronouns, possessive apostrophes, and the word "of", all do the same job. Parents would correct a child who says "of mine's", but probably wouldn't even notice the same "redundancy" in "of Peter's". Younger speakers are unlikely to even be talking about something "of America's". Perhaps as we mature we tend to discard the "double possessive" for the more "distant" things that only adults are likely talk about, but we keep it for "closer" people because that's how we spoke when we were younger.  EDIT2 I note that I'm a great fan of him is vanishingly rare compared to ...fan of his, but with ...fan (of John) the double possessive occurs far less often than ...friend (of John's). Usage seems to be affected by the noun before "of" as well as the one after it. This is getting complicated...


Fight 707 arrives at Washington D.C. in ten minutes. Fight 707 arrives in Washington D.C. in ten minutes.     Do we have to use 'at' or 'in' in this case? Washington D.C. is a big city, so we have to use 'in' normally. However, because the plane leaves the city soon, the city can be a particular point on a map. So, can we use 'at' in this case?

This is the sentence:     He’d miss Japan once he'd arrived in/at/to Hawaii.   A native English Speaker told me that it was in. I found that strange, because I always see "arrived at" and "arrived to," but I rarely see "arrived in."


I have a list of files each named after a camera. In the Finder on a Mac, if I sort them by "Name" the first three are in this order:  1D 5D 10D  However, in another application, the same list of files is sorted like this:  10D 1D 5D  Notice the 10D moved from the bottom to the top of the list. I think this is because the the second app is favoring numbers over letters. It's like because "0" is a number it has a higher placement than "D".  In Python, I have written a script that accepts a folder of files and adds them to a list. But I need the list to be sorted the same way the second app sorts them, not the way the Finder sorts them. I think the solution might have to do with the sorted() function and the key parameter but beyond that I'm not sure what to do.  For those of you who want to see code:  myList = ["1D", "5D", "10D"] sorted(myList, key=theSolutionToMyProblem) print myList >>>["10D", "1D", "5D"]   If I'm way off please tell me. Point me in the right direction.

I'm looking for an algorithm that sorts strings similar to the way files (and folders) are sorted in Windows Explorer. It seems that numeric values in strings are taken into account when sorted which results in something like  name 1, name 2, name 10   instead of  name 1, name 10, name 2   which you get with a regular string comparison.  I was about to start writing this myself but wanted to check if anyone had done this before and was willing to share some code or insights. The way I would approach this would be to add leading zeros to the numeric values in the name before comparing them. This would result in something like  name 00001, name 00010, name 00002   which when sorted with a regular string sort would give me the correct result.  Any ideas?


Hello today my VPS server goes down, the node have this: 2GB RAM 1/2 CPU 40 GB Storage The Server Limit and Max Clients as default: Server Limit: 256 Max Clients: 150  So .. i set the  node to: RAM 8GB 2 CPUs 160 GB Storage    The "Server Limit" and "Max Clients" still having default values My question.. exists any table or something, to change the "Server Limit" and the "Max Clients" for the new hardware  Thanks

This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.


I was reading  and suddenly stumbled on a strange use of the word "jive":     Since 2014, according to the report, hundreds of ambulances have been called to the factory to treat workers.      This portrayal doesn’t quite jive with Musk’s world-changing vision.    Google provided the next reference about meanings of the word and I do not see anything appropriate to the example from the article:     jive /dʒʌɪv/      noun: jive; plural noun: jives; noun: jive talk; plural noun: jive talks         a lively style of dance popular especially in the 1940s and 1950s, performed to swing music or rock and roll.      swing music.      a style of dance music popular in South Africa.   a form of slang associated with black American jazz musicians.      North American informal; deceptive or worthless talk.         verb: jive; 3rd person present: jives; past tense: jived; past participle: jived; gerund or present participle: jiving         perform the jive or a similar dance to popular music.   North American informal; taunt or sneer at.      talk nonsense.         adjective: jive         deceitful or worthless.         Origin   1920s (originally US denoting meaningless or misleading speech): of unknown origin; the later musical sense ‘jazz’ gave rise to ‘dance performed to jazz’ (1940s).   The meaning of "to jive with" from the article must be something like "to correlate with", but there is nothing similar in the Google reference.    So my questions are:   what is the meaning of "to jive with" in the article? whether this meaning is widespread and common or is it some exception?

I often hear people use the word "jive" when I'm pretty sure they mean "jibe."  It's a subtle sound difference so it's hard to catch.  But why do so many people mix these two up?


I want to make a simple console calculator in Java and I want to ask the user that which operation do you want to perform here is my code to get a better understanding. import java.util.*; public class Calculator {     public static Integer add(Integer numb1 ,Integer numb2)      {         Integer result = numb1 + numb2;         return result;     }     public static void main(String[] args)      {         Scanner sc = new Scanner(System.in);         System.out.print("Which Operation do you want to perform : ");         String operate = sc.next();         if(operate == "add")         {             System.out.print("Enter 1st no.");             Integer fnumb = sc.nextInt();             System.out.print("Enter 2nd no.");             Integer snumb = sc.nextInt();             result = add(fnumb, snumb);             System.out.println(result);         }         sc.close();     }    }  I think the code is right but the lines under the if condition never executes please help. And please don't write that you don't need to use if-else because you only have 1 method that is - add() because I will add more methods like subtract and multiply

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I`ve read multiple times that it is not safe to use the shared key resulted from DH key exchange directly and that you need to do a KDF or hash over it and then use the result as a key. Why is it not safe to use the shared key directly?

From :     Importantly, the DDH assumption does not hold in the multiplicative group $\mathbb {Z} _{p}^{*}$, where $p$ is prime. This is because given $g^{a}$ and $g^{b}$, one can efficiently compute the Legendre symbol of $g^{ab}$, giving a successful method to distinguish $g^{ab}$ from a random group element.   The only way I can think of to distinguish $g^c$ from $g^{ab}$ is:    If $\left(\frac{g}{p}\right)=-1$, then $\left(\frac{g^{ab}}{p}\right) = 1$ if and only if $a$ or $b$ is even (which is $3/4$ of the times). So if $\left(\frac{g^c}{p}\right) =-1$, probably $g^c\neq g^{ab}$. Nothing is certain.   How'd do you compute $\left(\frac{g^{ab}}{p}\right)$ given $g^a$ and $g^b$?


implies that I must root my device in order to bypass this unreasonable restriction. I have many use cases where I need to take screenshots for normal,  non-nefarious reasons, yet it seems that I am prevented from doing so by some particuler application provider.  How do I avoid this restriction without rooting my phone?  References:   The following sums up my situation and hardware configuration to the letter:

As per , Android apps using FLAG_SECURE in their activities are protected from screenshots being taken by the system.  You get a blank file when using screencap and some other screenshot apps, and this error when using the hardware buttons:     Can't take screenshot due to limited storage space, or it isn't allowed by the app or your organization.   However, this is not a hard guarantee.  In Android Studio, I can still take screenshots of such "secure" apps with the button pointed out in .  I took a look through the Android Studio source code, and the screenshot is acquired through a framebuffer: request to ADB, which in turn uses screencap.  Before I go looking through source for more info on how this works for adb but not for a root terminal and a possible "developer" solution, I thought I should ask: Has anyone already figured out what's happening behind the scenes here and can an end-user make use of it?  Ideally, without needing a PC.  My device is rooted, so I'm open to apps/commands/etc. that require root (or having USB Debugging enabled).  I've tried a few screenshot apps from pre-Android-2.3 that use root, but none of them still work (presumably due to how the framebuffer is now protected).


I have a B.S. in physics but I graduated nearly 20 years ago. All this time I’ve kept a copy of Gravitation by Misner, Thorne, and Wheeler thinking that I would, one day, get around to going through it. I would now like to do that but I think that I need to first brush up on my math. Actually, I remember that the math in this one was a bit above me as an undergrad so I might need more than just brushing up. Any suggestions on books and/or online courses that would prepare me to really understand Gravitation?

What are some good books for learning general relativity?


I'm looking to protect some old vintage MOS chips that I own and I don't want this to sound like a stupid question, but I cannot find the name of the plastic tubing that DIP chips can be purchased in.  I've looked up things like "dip chip tube" or "chip plastic cover" but to no avail.  I have actually purchased some old 8-bit CPU's (all DIP's) that came in this kind of tubing that I'm looking for the others and it conforms to its shape.    Does anybody know what these are called and if they are available to buy empty?

When I order ICs from larger retailers, they are delivered in a plastic housing that prevents the pins from becoming bent during shipping.  With a chip included, they look like this:    I would like to buy more of these so that I can store and ship some ICs I have that didn't come with one, however I am having no luck finding any for sale so I must be using the wrong search terms.  I have looked for chip/ic + carrier, housing, packing, storage, etc. but not found anything remotely like this.  I've tried the same retailers that sell the chips as well as places like eBay but I can't find anything at all.  What do retailers call these items when they are up for sale?


I am running the following code snippet:  (print "Enter something:") (let [entry (read-line)]   (println "You entered" entry) )   I expect to see the following type of interaction:  Enter something:abc You entered abc   Instead, I see:  abc Enter something:You entered abc   Why is user input requested first, even though the print comes first in the code? I tried Googling around, but from what I can tell, evaluation order should be what I would expect coming from a Java/Python background. Is this the expected behavior of the code?

While dabbling in Clojure I've written a very basic program to echo whatever the user types into it. However, it doesn't run in a way that I'm perceiving to be natural. Here's the code:  (defn goo []   (print "echo> ")   (def resp (read-line))   (print resp) )   I would expect the code to run like this (for me typing in foo as the input to read-line):  user=> (goo) echo> foo foonil   But instead, the echo and read-line is switched:  user=> (goo) foo echo> foonil   Why does this happen? Is there a subtlety I'm missing?  EDIT: From Joe's answer, the updated correct solution is:  (defn goo []   (print "echo> ")   (flush)   (def resp (read-line))   (print resp)   (flush) )   Also, the flushes aren't necessary if you use println instead of print.


If I use ArrayAdapter or ArrayAdapter<String>, it does not affect my code.  For example, if I write it like:  ArrayAdapter adapter = new ArrayAdapter(getApplicationContext(), android.R.layout.simple_list_item_1, android.R.id.text1, values);   Instead of:  ArrayAdapter<String> adapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_1, android.R.id.text1, values);   Are these two things different? What is the purpose of <String> here?   I have searched the web and only knew that <String> shows something like collection?! Not sure.  I am a newbie in Android. Please help.

Can someone explained, as detailed as possible, the differences between the following types?  List List<Object> List<?>   Let me make this more specific. When would I want to use  // 1  public void CanYouGiveMeAnAnswer(List l) { }  // 2 public void CanYouGiveMeAnAnswer(List<Object> l) { }  // 3 public void CanYouGiveMeAnAnswer(List<?> l) { }


Since this question is about site analytics which is not accessible to everyone I have tried to omit any sensitive information. Please tell me if I have included anything I should not have.  I was looking at the site analytics for the programming puzzles and code golf Stack Exchange and I noticed something strange. Several, (between 10 and 15) of the referring sites are listed as having 247 visits. Since that is most of the sites listed this seems very strange to me. It hardly seems possible that this is happening purely by coincidence.  Why is the number 247 so common in the site analytics? Is it an artifact of the way scores are calculated? Is it just a coincidence?

The analytics for the beta site I moderate (Lego Answers) provides unreliable search keywords.  The first ten or so results are unique, but every search keyword after has 41 views, and there are hundreds of results with supposedly '41' views. Some of the referring sites also have 41 views.  Something doesn't seem right. I can understand each search keyword having one or two visits each.  See Also:


How can I zcat 2 .gz files inline to perform a diff in unix? Have tried eval but syntax not right.   zcat file1.gz zcat file2.gz

Seems this would not be a deterministic thing, or is there a way to do this reliably?


Could you mind to teach me how can I test whether the given data is discrete or continuous in java?  For example, given array (98.6, 99.2, 103.1) and my statistic service should determine the data type.

I have a data frame in python where I need to find all categorical variables. Checking the type of the column doesn't always work because int type can also be categorical.   So I seek help in finding the right hypothesis test method to identify if a column is categorical or not.   I was trying below chi-square test but I am not sure if this is good enough  import numpy as np data = np.random.randint(0,5,100) import scipy.stats as ss ss.chisquare(data)   Please advise.


I am trying to initialize the 2D array with false values. Both instructions mentioned below are producing same results. Please help to know the difference between the two ?  Input  [[False] * 3] * 3  [[False for i in range(3)] for j in range(3)]   Output  [[False, False, False], [False, False, False], [False, False, False]] [[False, False, False], [False, False, False], [False, False, False]]

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Suppose someone in the United States took any of the following actions:   Open a new checking account. Closing an existing checking account.  Close the checking account with the longest standing.   Would it have an impact on credit score? Would it even show up in a credit report?

In the US, will closing a bank account negatively affect your credit score? I've had it with my bank and I'm thinking of moving my money to a smaller Credit Union. Would this affect my credit score? The current account is the one I've had open the longest. I would close both a checking/savings account and re-open them with a local CU.


I debated 9... != 1 claims for years now, but the discussion surfaced once again, this time I asked myself: what if I "change the direction" of the recurring digit, i.e. add 9s BEFORE the decimal point? This means: 9 = 9 999= 900 + 90 + 9 ...999 = ? diverges? First thing I tried was obviously the algebraic proof by just subracting equations: (instead of) 0.9... = x |x10 9.9... = 10x _____________ -  9x = 9   ...999 = x ...9990 = 10x (i feel like this step cheats, moving the decimal point to infinity)  10x = x-9  x= -9/9 = -1 ??  ...999 = -1  the anwser confuses me a lot. Is there another way of illustrating this problem? Moreover what would happen if I would subtract those two values? Am I simply breaking fundamental laws?

I accept that two numbers can have the same supremum depending on how you generate a decimal representation. So $2.4999\ldots = 2.5$ etc. Can anyone point me to resources that would explain what the below argument that shows $999\ldots = -1$ is about? Here is the most usual proof I see that $0.999\ldots = 1$:  $x=0.999\ldots$ $10x=9.999\ldots$ $10x - x = 9$ $x=1$  Using this same argument template I can show $999\ldots=-1$:  $x= \ldots9999.0 $ $0.1x= \ldots9999.9$ $0.1x - x = 0.9$ $x=-1$  What might this mean? Edit from one of the comments: $$\sum_{k=0}^{\infty}{9 \cdot 10^k}=-1$$


My tikz does not want to label the angle within the figure. Whenever I try to use the command "$\alpha$" inside the pic arguments tikz ignores it. I do not know how to proceed. Any suggestions for the code are welcome. Thank you for the help.  \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,intersections,through,backgrounds,angles,quotes} \begin{document} \begin{tikzpicture} \draw (0,0) -- (0,2) -- (5.46,2) -- (2,0) -- (0,0); \coordinate [label=below:\(A\)] (A) at (0,0); \coordinate [label=below:\(B\)] (B) at (2,0); \coordinate [label=above:\(C\)] (C) at (5.46,2); \coordinate [label=above:\(D\)] (D) at (0,2); \coordinate [label=left:\(2\)] (E) at (0,1); \coordinate [label=below:\(2\)] (F) at (1,0); \coordinate (G) at (3.5,0); \draw[dashed] (2,0) -- (3.5,0); \draw (G) -- (B) -- (C) pic [draw=black, thick, angle radius=1cm, "$\alpha$"] {angle=G--B--C}; \end{tikzpicture} \end{document}

I'm trying the next code:  \documentclass[pdftex,spanish]{article} \usepackage{babel} \usepackage{tikz}  \begin{document}  Simple arrow:   \begin{tikzpicture}     \draw[->] (-1.5,0) -- (1.5,0); \end{tikzpicture}  \end{document}   but it doesn't work. It throws the errors:    ! Argument of \language@active@arg> has an extra }. ! Paragraph ended before \language@active@arg> was complete.<to be read again>\par \draw[->]   What can I do if it works right without the babel package?


I have seen many duplicate questions like ,  and on the , but none of them have a satisfactory and perfect solution. Here's my problem:  I was reading ; in the article there is a link mentioned like below:        I want to select  the word leniency from the link and copy it somewhere, but I have to select all the link text and then remove anything I don't need, or open the web site and then copy it from the destination once loaded. I guess there's a better way to do this.  Once, a friend of mine suggested some sort of F1 - F9 combination along with another key to do this, but I forgot that combination.  Any ideas how to do this?

I am running Google Chrome 5. How can I select hyper link text using the mouse with, for example, CTRL or ALT keys?


The Stack Exchange engine uses  for questions and answers. You are allowed to . But with these allowed tags it is not possible to float a text around a small image.  Floating text around small images works great on questions that have large blocks of text with small images scattered throughout.  It would be great, if you would allow the align-attribute in img-tags. or some other solution.   Maybe with a limitation in width and height of the image.    Note: It already is possible to position small images inline.  Example: 100,00  (with the correct Bitcoin currency sign)

The ability to make text flow around images would be a nice touch!


Usually, the spinning chair problem is one of the typical angular momentum problems. And most of them start with a person holding two dumbbells on his two hands and bringing his arms in, then by conservation of angular momentum, the angular speed increases when he brings his arms in, and since the person is exerting force for a certain displacement to bring the dumbbells in, the kinetic energy increases since positive work is done. But now, if I start the other way round, where the person first has his arms brought in, and after that spread out his arms. Then by conservation of angular momentum, the angular speed decreases since the moment of inertia increases. In this case, it seems that kinetic energy is lost, but I think the person needs to exert force to bring the things out? Then is there any work done by the arms? And also, is there any loss of energy? Or the work done is stored in some other forms? Thank you for any replies.

There is a classic example that a spinning skater pulls his arms back. The angular momentum is conserved, the moment of inertia decreases. And therefore, it's angular velocity increases, so the rotational kinetic energy will increase. But what will happen if the skate pushes his arms outward? The rotational kinetic energy will decrease. But where will it go?


Is there a command to switch to a specific desktop in Windows 10 (or alternatively open an application on a specific desktop which achieves kind of the same effect since windows will automatically switch to that desktop)  The idea is to write a batch or autohotkey script to switch to specific desktops with just one keyboard shortcut each, you know like is out-of-the-box functionality for every single desktop environment in Linux that supports multiple workspaces, and Windows 10 obviously lacks...  If there isn't, does anyone maybe have an idea how to achieve the same effect?

In linux I use a shortcut to switch between 4 workspaces: win+1/2/3/4.   I would like to have something like this in Windows 10.  UPDATE SOLUTION 2017, WINDOWS 10x64   Update your windows version to most recent through this  . You may also need  Download and unzip this  (0.9.1) works for me. Change content of file settings.ini to    [KeyboardShortcuts] Switch=LWin Move=LAlt, Shift, Ctrl MoveAndSwitch=LAlt, Shift Previous=Left Next=Right PlusTen=     Run virtual-desktop-enhancer.exe as administrator.


Let $f:\mathbb{C}\to\mathbb{C}$ be an entire function be such that $\mathbb{R}=f^{-1}(\mathbb{R})$. Show that $f$ is linear. i.e.  $$\exists\ a,b\in\mathbb{R}:f(z)=az+b$$  Hint  I think that $f$ must map the upper half plane and lower half plane to certain two disconnected open sets.  Maybe, if we can show that $f$ is a mobius transformation, then we can then we can look at  $$g(z)=\frac{f(z)-f(0)}{z}$$  and finish.

Let $f$ be a holomorphic function defined on $\Bbb C$ such that $f^{-1}(\Bbb R)=\Bbb R$. Prove that there exists $a,b \in \Bbb R, \; a \neq 0 \;$ such that $f(z)=az+b \;$ for every $z \in \Bbb C$.  I was given a hint: define the function $g(z)=\frac{f(z)-f(0)}{z}$. such $g$ is also holomorphic in $\Bbb C$ since the only singularity is in $0$, and it is a removable singularity since we can define $g(0)=f'(0)$. Next I thought about proving $g$ is bounded, and thus constant (using Liouville's theorem), but pretty much out of ideas. How can I finish the proof/solve in another way?


I am looking for references to papers and research problems involving fluid mechanics, and in particular animal/plant/bacteria locomotion, that could be illustrated by showing a video like . It's for a slide presentation meant for 11 year old students. Could you point me towards something?

I have my bachelors degree in engineering science: computer science, option electrotechnic. I have a good understanding of basic mechanics and dynamics, calculus (differential equations).  The books I'm now having a look at are:       What book do you recommend for studying fluid dynamics on my own and why?


part of the docs says it supports only a small part of the SQL syntax but does that mean it's SQL based or am I better writing expressions in something else, MySQL?   This is similar to  but my query was not limited to the field calculator, it also applied to the filter and label options. I understand from the answer to that question that QGIS has it's own language for the field calculator is that the same for label by expression and filter by expression. I generally try SQL based syntax on these as a first approach with support from here when those fail.

I do not understand what language I have to use in field-calculator and labels on QGIS:  SQL or Python?  And where I can find the possible script/expressions to use?  in the image you can see the options for expressions in QGIS 1.8 italian version  Thanks


After 3 reinstalls on my Dell Dimension 2400, I can only see the desktop background and the cursor. Nothing else appears. I have tried removing, redownloading and reinstalling ubuntu-desktop.  I have also tried: sudo apt-get remove compiz sudo apt-get remove compix-core exit  Thanks in advance for the assistance.

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I have a itemize list within a description list. Each description defines a item and the content is an itemize list. (As per the code example below and the output at the end of this question)   \documentclass[a4paper,11pt]{article} \begin{document} \begin{description}     \item[foo bar foo bar]      \begin{itemize}         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.      \end{itemize}     \item[bar foo]     \begin{itemize}         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.      \end{itemize}  \end{description} \end{document}   I would like my itemize list to be flush left but with no other content the list starts to the right of the description item. If I try to end the line by going       \item[foo bar foo bar] \   I get the following complaint   ! LaTeX Error: There's no line here to end.   Which seems reasonable, there is no line to end. How do I force latex to start the itemize list below the description?   Output

I have an enumerate list inside an empty description item. The minimal file is, \documentclass[11pt]{article}   \begin{document} \begin{description} \item [A Label:]    \begin{enumerate}   \item A1.   \item A2.   \item A3.   \end{enumerate} \end{description}    \end{document}  The problem is, A1 comes after the colon (:). As you can see here,  But I want A1 in a new line, with 1. aligned with 2. I tried putting a \relax in the empty description item. Nothing was improved. Any suggestion will be appreciated.


'This is a not uncommon mistake.' 'This is not an uncommon mistake.' Are those sentences above both means 'This is somewhat common mistake.' ? or could they have different meanings?

When somebody uses the phrase "not uncommon", do they mean "common" because of the double negative?  I was recently informed that "not uncommon" could imply that something was anything but uncommon (e.g. rare), whereas I thought that rare would be a subset of uncommon and that saying it was not uncommon must mean it is common.


I am studying on starting a new Django project with reverse auctions (countdown timer). Every time a user makes a bid the price increases by a specific amount (eg 0.05$) and the clock resets. If no one bids in the given time the last bidder wins. I am thinking on using AJAX calls in order to update values and avoid page reload.  But what is the best way to handle concurrent bids?  Thanks in advance

If there a way to protect against concurrent modifications of the same data base entry by two or more users?  It would be acceptable to show an error message to the user performing the second commit/save operation, but data should not be silently overwritten.  I think locking the entry is not an option, as a user might use the "Back" button or simply close his browser, leaving the lock for ever.


What's more appropriate for the following context?  Someone jumped from a building (3rd floor for example) then I want to ask how fast he fell in terms of Km per hour. For this purpose is there a difference between the following two choices?      What's the velocity of a person falling freely from 3rd floor?      What's the speed of a person falling freely from 3rd floor?   Or maybe both aren't understandable enough for my purpose?

What is the difference between speed and velocity ?  The context is Physics


In the sentences below:  Quora was established in 2009. Quora was founded in 2009.  They seem interchangeable in the sentences above. I was told that 'found' was informal form of 'establish', is that correct? How do you differentiate them? Edit:  considering these two words are put into specific sentences in comparion to each other and;  more importantly, the answer of the other related question seemed didn't have a explaination and conclusion regarding their difference.  their synonym causing many confusion in English usage and it's so hard that even my English teacher couldn't find any difference in usage, if this question regarding their difference is closed again, its confusion might never be solved.   Therefore, please give this question a chance so the difference of their synonym could be clear up , thanks.

In this sentence: "CARE was ...... in 1945 to help people after World War II."    A. founded  B. built C. established D. constructed    The answer is C. But why don't we use "founded" in this case, I think they have the same meaning. Can you help me to give a reason for that?


i have this javascript code : var a = 0.1 var b = 0.7 var c = 0.8 console.log(a + b); if (a + b == c) console.log("OK")  does not give the result as it should the output is 0.7999999999999999 instead of 0.8 and never comes to the if statement what is the problem here?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


It seems that biology books refer to DNA as 'a' molecule (implying that it is a single continuous uninterrupted double strand) ... but in those same books chromosomes are depicted as 23 separate objects (chromosome pairs) containing DNA. Are these illustrations misleading ? Are chromosomes somehow connected end-to-end or are they disjoint ? Is it a single noodle or is it 46 pieces ?

Our molecular biology teacher told us that a double helix of DNA was composed of two DNA molecules linked together by hydrogen bonds. The thing is, until now, I always thought a DNA molecule was composed of two strands, those being polynucleotides, both of them being linked together. I can't find a link which is saying the same as my teacher, even if it seems technically correct to call a double helix a dimer of two DNA molecules.  I was curious to know what was the exact terminology.


Suppose $G$ is a finite group. Then let’s define $s(G) := \Sigma_{g \in G} ord(g)$ as the sum of orders of all elements of $G$.   My question is:     Suppose $G$ and $H$ are two finite groups, such that $|H| = |G|$ and $s(H) = s(G)$. Does that always mean that $G \cong H$?   This statement seems to be true for groups of order up to $12$  For $1$, $2$, $3$, $5$, $7$ and $11$ this is obvious as there is only one isomorphism class of groups of each of these orders.  For $4$: $$s(C_4)=11$$ $$s(C_2 \times C_2) = 7$$  For $6$: $$s(C_6) = 21$$ $$s(S_3) = 13$$  For $8$: $$s(C_8) = 43$$ $$s(C_4 \times C_2) = 23$$ $$s(C_2\times C_2\times C_2 ) = 15$$ $$s(D_4) = 19$$ $$s(Q_8) = 27$$  For $9$: $$s(C_9) = 61$$ $$s(C_3 \times C_3) = 25$$  For $10$: $$s(C_{10}) = 63$$  $$s(D_5) = 31$$  But is it true in general?

Suppose $G$ is a finite group and I know for every $k \leq |G|$ that exactly $n_k$ elements in $G$ have order $k$. Do I know what the group is? Is there a counterexample where two groups $G$ and $H$ have the same number of elements for each order, but $G$ is not isomorphic to $H$? I suspect that there is, but I haven't thought of one.


Im on gparted live with 50GB unallocated partition, but my linux partition can't be expanded.

sda6 is ext4 file system and where my ubuntu is installed, 30GB. sda3 is "ntfs" file system and where my windows is installed, 400GB. sda7 is a 50 GB empty partition with "ext4" file system.   How to move the space of sda7 to sda6 to let sda6 become 50+28=78 GB.    Here's a real case of mine :( I want to add more space into my ubuntu (28.2 GB one) from other emtpy partition space.


Has it been proven that if n can be represented as a sum of squares of two rational numbers, then it can also be represented as a sum of squares of two integers? This is a relatively simple statement, but I haven't found a simple proof for it, at least not yet. If it has been proven/is known to be true, does it require very advanced mathematics to prove it?

Let $a\in \mathbb Z$. Is it true that $a$ is a sum of two squares of rational numbers if and only if it is a sum of two squares of integers?  I came to face this problem while dealing with quaternion algebras.


I am aware that we alway treat the police as singular when we refer to it as social instutution. But what about if are refering to police as a group of people who are policemen? For example:     There is/are a lot of police around the crime.

In instructional videos I see on the internet, the teacher says "in the U.S and Canada, they automatically use police as plural noun", if it is already plural, then what's the singular of police?


How is even mass of earth known ? How do we get to know them? Whilst I was studying about dark matter it was listed about 'mass of observable universe' and density and so on...so what is the procedure???

The Wikipedia page on  mentions that the Planck mission had revealed that in our universe ordinary baryonic matter, dark matter and dark energy are present in the ratio: 4.9%, 26.8% and 68.3% respectively. I do not understand exactly how this result had been got. Did the Planck mission scan the entire universe as it is today to get these figures or just a part of the universe? (Is it really possible to scan the entire universe if the universe is infinitely large?) Can anybody please explain the principle behind the calculation?  I also notice that the above figures are given in terms of percentages. Can I get the absolute values of the individual quantities like, total dark energy = .... Joule in the universe?  In case only a part had been scanned then is it possible that in future these figures may change if a larger portion of the universe is scanned by another mission?


I got tired to put code in SO. The four indentations I made is not working. For example, I am posting below line with four spaces forth and the back.  print("Haihello");

How do I post text so that it is formatted as code?  What do I need to do so that my code shows up properly — not escaped or removed — when posted? And how to get the correct syntax highlighting?     For more information, see "" in the .


I have tried $\lim u^v=\lim \exp{(u-1)v}$ but i dont know how to do next..  $$\lim_{n\to \infty} \frac{1}{n}\sum_{i=1}^{n} n^{\frac{1}{i}}$$ and i have tried to find $\frac{i}{n}$but it doesn't work.

What would you suggest here?  $$\lim_{n\to\infty} \frac{1}{n} \sum_{k=1}^{n} n^{1/k} $$


Evaluate the line integral  $$ \int_C (\ln y) e^{-x} \,dx - \dfrac{e^{-x}}{y}\,dy + z\,dz $$  where C is the curve parametrized by $r(t)=(t-1)i+e^{t^4}j+(t^2+1)k$ for $0\leq t\leq 1$  I know that the potential function is $$f(x, y, z) = -e^{-x}\ln y + \frac{z^2}{2} + C$$ but exactly how would I use that to evaluate the line integral?


My bf went on my locations timeline and its showing I been to places when I never left the house and it says i drove this long and how long it took and shows a map of the streets I took but I never left the house and they are all in different cities. How is this possible also my ex and I had our emails hooked up so I thought that could be a reason but then seeing it was my house as the start location or the end kocationt I was so confused because once again I never left the house to go anywhere. Someone please help Im sick and tired of telling him I went nowhere.

I have a major problem that I hope someone can help with. On my Google Maps feature under my Location History it shows a location that I was never at at any point, but when my wife happened to see that location she doesn't believe me that the GPS could be wrong and pinpoint that location if I was never there.  I was first wondering myself how could that could be possible if I was never there or my phone was never at that location that was 35 miles away from me and second is there any way I could prove the GPS being wrong? Can I contact Google Maps and can they give an official printout of that certain day and every location I was? I really need to prove my honesty to her and hope there is a way.


I got a question in linear algebra: 1) Let A and B be $n\times  n$ matrices. If $I - AB$ is an invertible matrix, then prove that $I - BA$ is invertible.  Can someone tell me how to solve this question? I've no idea how to start. Thank you!

assume $A,B\in M_n(F)$ if  $I-AB$ be  invertible then  how  to prove $I-BA$ is invertible and how find inverse of $I-BA$   Thanks in advance


I remember catching this show maybe 2-3 times randomly while channel surfing as a kid. That being said, I only have fragments of what I remember.   I remember that there was a group of kids. Maybe from 12-15 or so in age. I remember they had the power to teleport either to and from an underground base, or they could teleport freely. The setting was in London... or Sydney... I can't remember and it was so long ago, I'm blending the accents they had... I'm pretty sure it was London, tho. The group of kids had other powers maybe, I don't recall.

There was a film from the 80s in which young people can teleport anywhere they can think of.   These guys are recruited to do studies with, maybe by the government or a secret company which wants the take advantage of their abilities.   I saw it on cable TV around 1990-1997.   Any clues?


The problem I am experiencing is that if the battery is not present, the CPU is automatically throttled.  I have done some searching and have found that this is apparently by design, "in case the power supply cannot supply enough power, so the machine won't shut off."  Now, here is the problem.  I can't put the battery back in, because it started swelling up like crazy.  I can't really justify the cost of a new battery for a machine this old and I can't really afford a new computer, so I'm stuck with this machine.  It still works, but throttled back, a lot of things like flash video players are almost useless at the reduced CPU usage.  I don't really care if the machine shuts off if the supply can't keep up with power requirements.  My understanding is that this really should only happen if the supply is mismatched, i.e. from an adapter designed for a smaller machine, but even if its not it is just as intolerable to have to reload netflix every 30 seconds when it loses sync than an occasional power loss would be.  Besides, it is already losing power every time I need to move it somewhere.  So, what's the solution?  There has to be some way to override the throttling, right?  By the way, I have already tried sudo pmset -a dps 0 but that just gives me a usage message.

On a 2011 17" MacBook Pro (i7, 10.6, 16GB ram) I do not have any options in the energy saver preference panel to control CPU throttling.  I need to be able to disable CPU throttling for short periods of time - or at least force OS X to a certain state and stay there so that I can get consistent results from test to test in a performance comparison situation.  Are there methods or apps that allow me to control the energy saver features and particularly CPU throttling and CPU disabling for recent (sandy bridge) Macs?  CHUD does not appear to support this machine (it doesn't correctly report the CPU type) and while I can manually disable hyperthreading and processor cores using /Library/Application Support/HWPrefs/CPUPalette.app it doesn't give me the option to tell OS X not to throttle anything.


I need to get the relative file path (relative to the program executable path) from a File object.   What's the best way to do this? File offers only methods for the absolute path. Maybe getting execution path manually and then cut this path off from the absolute path to get a relative path?   I am on Java 7, just in case java.nio has some helping method for that.  Tahnks for any hint!

Given two absolute paths, e.g.  /var/data/stuff/xyz.dat /var/data   How can one create a relative path that uses the second path as its base? In the example above, the result should be: ./stuff/xyz.dat


I want select data from a table (SQL Server 2012) -- grouping one field and returning all the duplicates within that group as a comma separated list.   All the solutions I have seen so far do not allow for a group and return a single comma separated list for the whole table as a variable, which doesn't work for me.  What SQL do I need?  This is the data I have:   BankingSlipID   CashSheetSessionID  BankingSlipNumber 1               10                  abcabc 2               10                  xyzxyz 3               10                  123465789 4               11                  9999999 5               11                  55555 6               12                  88888   This is what I want to get:   CashSheetSessionID  BankingSlipNumber 10                  abcabc, xyzxyz, 123465789 11                  9999999, 55555 12                  88888   SQL to create the source table (with data):  CREATE TABLE [dbo].[BankingSlips]( [BankingSlipID] [int] IDENTITY(1,1) NOT NULL, [CashSheetSessionID] [int] NOT NULL, [BankingSlipNumber] [varchar](50) NOT NULL ) ON [PRIMARY] GO SET IDENTITY_INSERT [dbo].[BankingSlips] ON GO INSERT [dbo].[BankingSlips] ([BankingSlipID], [CashSheetSessionID], [BankingSlipNumber]) VALUES (1, 10, N'abcabc') INSERT [dbo].[BankingSlips] ([BankingSlipID], [CashSheetSessionID], [BankingSlipNumber]) VALUES (2, 10, N'xyzxyz') INSERT [dbo].[BankingSlips] ([BankingSlipID], [CashSheetSessionID], [BankingSlipNumber]) VALUES (3, 10, N'123465789') INSERT [dbo].[BankingSlips] ([BankingSlipID], [CashSheetSessionID], [BankingSlipNumber]) VALUES (4, 11, N'9999999') INSERT [dbo].[BankingSlips] ([BankingSlipID], [CashSheetSessionID], [BankingSlipNumber]) VALUES (5, 11, N'55555') INSERT [dbo].[BankingSlips] ([BankingSlipID], [CashSheetSessionID], [BankingSlipNumber]) VALUES (6, 12, N'88888') SET IDENTITY_INSERT [dbo].[BankingSlips] OFF GO   What SQL do I need to write to get that?

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I've spent close to two full days trying to understand the nature of the infamous GPS shift in China. After sifting through the noise, two recurring symptoms are that:   GPS coordinates (WGS-84) plot poorly on Chinese maps, with an offset ranging from 50 to 1000 meters. Google and Apple Maps in China have severe misalignment between their street maps and satellite imagery ()      make contradictory claims:   Cold War-era regulations mandated introducing random offsets into GPS chips due to security concerns protectionist measures aimed to favor GPS devices manufactured in China  a , and the offsets are not random GPS chips manufactured in China offset the coordinates they return, in order to match approved Chinese maps, which must follow the GCJ-02 datum   What is the actual story? This looks like the type of pervasive problem that merits a Wikipedia page, but I haven't been able to find anything authoritative yet.  The  questions suggested as  duplicates don't answer exactly what the cause is; rather, they describe symptoms.

In a  I asked why my phone's GPS didn't seem to work in Beijing, China. Turns out that it was simply an "urban canyon" problem, and that the GPS did in fact work when I moved to higher and/or more open areas. What I'm wondering, is why is my phone capable of receiving GPS satellite signal in New York City, a much more dense city than Beijing especially in terms of skyscraper density downtown, but not so in Beijing? It seems if anything that it should be the other way around, or that I shouldn't be able to receive signal in either city.  Please note: I am not asking about location services on the phone, which can be influenced by things such as nearby WiFi networks and certain service carriers. I am specifically asking about GPS satellite reception coverage.  Clarification:  Outside of downtown Beijing my phone is able to receive GPS signal just fine. This question is not an issue of the GPS receiver on my phone altering the signal or any type of Chinese law. I know that the GPS receiver works perfectly. I'm simply confused as to why downtown Beijing has particular problems compared to a denser city such as downtown NYC.


Can you clear something up as regards rating time bands.  Official or standard grading I always assumed was an hour-and-a-half or more. Am I incorrect?  Is Blitz an hour or less? Is Speedplay 0-15 mins?  FIDE or guidance appreciated.

What are some of the most popular time limits for chess games?  I'm looking for those used today as well as historically.


print 0.3== 0.1+0.2   It will print False.   I am learning python now. So got the quick doubt on this.As per my knowledge it should print True.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


"Universe" doesn't mean everything in existence, because there might be multiple. "Multiverse" doesn't either, because different dimensions could have different multiverses. Is there a word that describes the totality of literally everything that exists?

Is there a noun that denotes "things which exist"?  The only noun form of existence that I can find/think of is "existence" which is the condition of existing, not the things which do.  It's to summarize the tools for a given task that already exist, in a presentation outline (so it needs to be a single word, but I can't give an example sentence!).  The other headings are RCA/Techniques/Lacunae.    ETA: Beings implies a certain amount of animacy, which these things definitely don't have.


I spawned in the WoF and then when I died to it, my guide didn't respawn. I waited like 20 in-game days, still didn't respawn. I then waited a real life day then came back and he still didn't respawn. All of my other NPCs are spawning, and I already checked and all of my houses are valid.

I am currently in hard mode and during a blood moon, several of my NPCs including my guide and my healer died. it's been several in game "days" now and they have yet to respawn. Is there a way to check why they aren't respawning?   Is there a list of reasons for the NPCs to not respawn?   Edit in reponse to lunbok's answer:  1. They don't have appropriate housing - There is an in-game housing query function (changes your cursor into a ?) that lets you click on your house to see if it is still a suitable house and I clicked in every room in my house and they are all listed as "This housing is suitable" or "This housing is already occupied".  2. Their spawn conditions aren't met anymore. - This doesn't explain why my guide isn't respawning since they don't need a condition to respawn (other than having a suitable housing which the point above already prove isn't the problem).  3. There's a goblin invasion going on. - Do the invasions last that long? It has been about two reals days and a lot more in-game "days" now. As far as I can tell there shouldn't be an invasion going on.  4. It could be because you built your house in a part of the world that is now corrupted


Every time I reboot my CentOS 6.5 computer, it writes the boot log to /var/log/boot.log. The permissions on this file are always 644 after a reboot. I want the permissions to be 600. When I change the file permissions manually using chmod 600 /var/log/boot.log it reverts to 644 after the reboot. How can I make this change permanent?  I would prefer the permissions are set when the file is created, instead of having the permissions applied sometime after the boot process is complete (or nearly complete).

I've been assigned to lock down all /var/log files so that they cannot be read except by the root user.  I've been stumped by the /var/log/boot.log file.  It seems that after every boot the file no matter what what previous permission state gets set to 644 permissions.   I've gone through the exercise of changing the umask in a number of key /etc/init.d files and functions to no avail.  Anybody got any idea as to the specific program doing this and maybe how to get the perms on /var/log/boot.log to be 600?


Just need a clarification here, how the current is produced due to the movement of electrons, in an external circuit,having a very slow drift speed.  Normally in a battery there is high potential terminal and low potential. Using these two terminals the external circuit is closed. Now within the battery the direction of the current flow and the electron flow is opposite to that of the external circuit. If I consider that positive current is flowing from the positive terminal to the negative terminal of the battery through the external circuit then we can say that positive terminal is at higher potential then the negative terminal of the battery.   Now when we are closing the switch of an external circuit, in that case the electrons are moving from negative terminal to positive terminal of the battery, through the external circuit. But we also know that the drift speed is very slow, of the electron. But when we  switch on some of the electrical devices, within a fraction of second the device starts working. If drift sped of electron is low, so how the device is working so fast ,(near about the speed of light,I guess), as we know that current flows due to the flow of the electrons.So how it is possible, in spite of electrons are having such a low drift speed ?  Please help me guys !!!!!

I get confused on the low-level physics of electricity from time to time. It came up in "," and I don't totally get it.  How fast does electricity flow? Is the speed of an electron different in say a resistor than in a wire? Does it matter? Or are the effects of the electron the only important thing, with lower levels of abstraction not useful in practice?  I know there are already materials on this topic, and I have read some of them. I think having the question on this site might inspire some interesting answers to the age-old question.  Bonus points for:   Identifying and clearing up common misconceptions Explaining in a way that someone with a high school diploma could understand, without oversimplifying it so much that its incorrect


I've just updated my iPad to the IOS 8 and I can't download the English (Oxford) and French dictionaries, as many users have already complained. Please, tell us what is the way to solve it!

I just updated from iOS 7 to iOS 8, and I noticed that the built-in dictionaries, I previously used, aren't working. I had used American English, British English, and Apple Dictionary. Now, when I try to define any word, I get a "No definition found" error. The dictionaries I previously used show a blue circle (while all the others show the cloud download icon).  I tried to download a new dictionary, and I was able to use it. However, that was in another language.  How can I enable these dictionaries again?


I am trying to prove that a sequence converges in R^N if and only if each of its coordinates converges in R. p $\rightarrow$ q Given a sequence x = (x_1,..,x_n) for all l > 0 exist y = (y_1,..,y_n) such that d(x, y) < l, for the standard metric space d(x_j, y_j) <=  d(x, y) < l, so we are done. I am using the standard metric space and ,for now, all I know is the metric definition of convergence and that a convergent sequence is bounded. I am not sure how to do the coverse (if each of its coordinates converges in R then the sequence converges n R^n).

I'm trying to prove that a sequence in $\mathbb{R^{n}}$ converges, if and only if it converges componentwise, using $N- \epsilon$ definition.  Let $(x_{k})$ be a sequence in $\mathbb{R^{n}}$ that converges to $a$.  I have to show that for all $j = 1, 2,..,k$ $$x_{k,j} \rightarrow a_{j} \ \ \text{as} \ \ k \rightarrow \infty$$  We know,  $$\forall \epsilon > 0 : \exists N \in \mathbb{N} : \forall k > N: \lVert x_{k} - a \rVert < \epsilon$$  which means $\lVert (x_{k,1} - a_{1}, x_{k,2} - a_{2},...,x_{k,n} - a_{n}) \rVert < \epsilon$  Fix $1 \leq j \leq n$ I have to prove $\lVert x_{k,j} - a_{j} \rVert < \epsilon$  How do I continue?


Here's a puzzle I just heard and while I know that this reasoning is fundamentally wrong, I can't explain why:   Three people bought a dish for, say, 25\$ and paid 30\$ The waiter didn't want to divide 5 by 3, so he took 2\$ for himself and gave 1$ to each of the clients Each of them seems to have spent 9\$, but 9\$ x 3 = 27\$, not 28. What happened to this one dollar?

I'm not sure how well known this "riddle" is but here it goes.  3 people go to a restaurant, each buy food worth 10.00.  When they're done, they give 30.00 to the waitress.  She gives the money to the manager, manager says they paid too much, gives 5.00 back to the waitress.  She comes back to the table, gives a dollar back to each person and then puts the remaining 2.00 in her pocket for tip.  So now, each person has paid 9.00.  9.00 x 3 = 27.00.  Plus the 2.00 in the waitresses pocket is 29.00.  What happened to the 30th dollar?  So what's the issue with this way of calculating (since if you backward it works fine), that doesn't give us the correct result?


How to show that $(1)\Longleftrightarrow (2)$ in metric spaces ?   pre-image of open sets are open   $\delta$-$\epsilon$ definition of continuity

Claim: A function $f: \mathbb{X} \to \mathbb{Y}$ is continuous if given any open set  $\mathbb{U} \subseteq \mathbb{Y}$ the inverse image $f^{-1} (\mathbb{U}) \subseteq \mathbb{X}$ is open.  How is this definition intuitively compatible with the $\epsilon-\delta$ definition of continuity?  Furthermore, on an application level, how is the above claim applicable in proving continuity of a function? i.e. is it useful for say proving that $f(x) = e^x$ is continuous?


I deleted the icon of system settings. Where can I find system settings application (in which directory), so I could restore its shortcut? Thanks

I did a fresh install of trusty 14.04, but a lot of icons are missing. I installed from DVD which was painfully slow and I hope to avoid repeating the process, especially since I started customizing stuff.  Here's my settings window:    I've tried:  sudo apt-get install --reinstall gnome-control-center sudo apt-get install --reinstall gnome-settings-daemon-schemas   None of which changed anything.  Any idea? I wanna edit preferences and none of them are in System Settings, neither in Unity Dash.


How can I output that what shell is used to execute a script?   Ex.: the $SHELL variable gives that what is the default shell for the given user. That is ok, but the given user can launch the script with other shell, ex.: "sh script.sh" or "csh script.sh".   Using a Linux machine.

As per my knowledge, to determine the current shell we use echo $0 in the shell. Rather I want my script to check in which shell it is running. So, I tried to print $0 in the script and it returns the name of the script as it should. So, my question is how can I find which shell is my script running in during runtime?


After re-installing Windows 7 I can't boot to Ubuntu anymore.  I keep getting message:   can't find `\Ubuntu\winboot\wubildr.mbr   Prior to the re-install there was no problem.

I recently installed 12.04 using WUBI installer in a separate partition. Because of some problem, I had to reinstall my Windows.   Now the problem is that my Windows has recovered, but Ubuntu is not showing up at the boot menu, even though the Ubuntu partition is intact.


I tried to denest the infinite nested radical   $$\sqrt{1+ \sqrt{2+ \sqrt{4 + \sqrt{8 + \sqrt{\dots}}}}} \; .$$  My first try was to find a functional equation for $$\alpha(x) = \sqrt{1+ \sqrt{x+ \sqrt{x^2 + \sqrt{x^3 + \sqrt{\dots}}}}} \; .$$   This did not work for me. Firstly, finding a functional equation is difficult and secondly, I didn't manage this even for   $$\sqrt{x + \sqrt{x^2 + \sqrt{x^4 + \sqrt{x^8 + \dots}}}} = f(x)$$  $$\Rightarrow f(x)^2 - x = f(x^2),$$  where I choosed the nested radical expression such that the functional equation is easy to find. When I found a bunch of functions that solve this equation for example  $$\tilde{f}(x) = \sqrt{x+ \frac{1 + \sqrt{1+4x^2}}{2}}$$  I could discover some nested radicals like $\sqrt{\frac{3+\sqrt{5}}{2}} = \frac{1+\sqrt{5}}{2}$ for $x=1$ or $\sqrt{\frac{9+\sqrt{17}}{2}} = \frac{1+\sqrt{17}}{2}$ for $x=2$, but the value $\tilde{f}(2)$ does not coincide with a numerical approximation for the infinite nested radical. It seems that I didn't found the right solution for the functional equation. I wonder if this is even the right way, since we are talking - formally - of a limit of a sequence. Nevertheless, it works for the easy case $\sqrt{x+\sqrt{x+\sqrt{x+\dots}}} = y \Rightarrow y^2-x = y$ by just solving this equation for $y$.  Then, I found the formula (18) on , that yields  $\sqrt{2} = \sqrt{1+\sqrt{\frac{1}{2} + \sqrt{\frac{1}{8} + \sqrt{\frac{1}{128} + \sqrt{\frac{1}{2^{15}} + \dots}}}}}$ .  This looks a little similar to the expression $f(2)$ and maybe it is possible to choose the parameters such that we can evaluate $f(x)$. Nevertheless, this is still a formula with double exponential growth of the radicands. It seems to be much harder to denest $\alpha(x)$.  Maybe someone here has more experience on infinite nested radicals or knows where I can find material that could help me solving this problem. I appreciate any solutions, hints or comments. Many thanks in advance.

Inspired by Ramanujan's problem and solution of $\sqrt{1 + 2\sqrt{1 + 3\sqrt{1 + \ldots}}}$, I decided to attempt evaluating the infinite radical $$ \sqrt{1 + \sqrt{2 + \sqrt{4 + \sqrt{8 + \ldots}}}} $$ Taking a cue from Ramanujan's solution method, I defined a function $f(x)$ such that $$ f(x) = \sqrt{2^x + \sqrt{2^{x+1} + \sqrt{2^{x+2} + \sqrt{2^{x+3} + \ldots}}}} $$ We can see that $$\begin{align} f(0) &= \sqrt{2^0 + \sqrt{2^1 + \sqrt{2^2 + \sqrt{2^3 + \ldots}}}} \\ &= \sqrt{1 + \sqrt{2 + \sqrt{4 + \sqrt{8 + \ldots}}}} \end{align}$$ And we begin solving by $$\begin{align} f(x) &= \sqrt{2^x + \sqrt{2^{x+1} + \sqrt{2^{x+2} + \sqrt{2^{x+3} + \ldots}}}} \\ f(x)^2 &= 2^x + \sqrt{2^{x+1} + \sqrt{2^{x+2} + \sqrt{2^{x+3} + \ldots}}} \\ &= 2^x + f(x + 1) \\ f(x + 1) &= f(x)^2 - 2^x \end{align}$$ At this point I find myself stuck, as I have little experience with recurrence relations.  How would this recurrence relation be solved? Would the method extend easily to $$\begin{align} f_n(x) &= \sqrt{n^x + \sqrt{n^{x+1} + \sqrt{n^{x+2} + \sqrt{n^{x+3} + \ldots}}}} \\ f_n(x)^2 &= n^x + f_n(x + 1)~\text ? \end{align}$$


The feature  states  As an action, you can spend 5 sorcery points to draw on this power and exude an aura of awe or fear (your choice) to a distance of 60 feet. For 1 minute or until you lose your concentration (as if you were casting a concentration spell), each hostile creature that starts its turn in this aura must succeed on a Wisdom saving throw or be charmed (if you chose awe) or frightened (if you chose fear) until the aura ends.  Which would obviously mean that casting a spell after using Draconic Presence would break concentration. However, the rules for spell concentration states  Casting another spell that requires concentration. You lose concentration on a spell if you cast another spell that requires concentration. You can't concentrate on two spells at once.  But if you were to cast a concentration spell and use Draconic Presence, would the Spell effect end? Draconic Presence isn't a spell and it isn't even magical. It states the condition to losing Draconic Presence's concentration but it doesn't change that only concentration spells break a creature's concentration on another spell (that isn't damage). Is this correct or am I missing something?

There exist several abilities that have the text similar to, this effect lasts while you maintain concentration (as if you were concentrating on a spell). One such example is the Bard College of Glamour: Mantle of Majesty ability.     At 6th level, you gain the ability to cloak yourself in a fey magic   that makes others want to serve you. As a bonus action, you cast   command, without expending a spell slot, and you take on an appearance   of unearthly beauty for 1 minute or until your concentration ends (as   if you were concentrating on a spell). During this time, you can cast   command as a bonus action on each of your turns, without expending a   spell slot.   Another example is the Cleric Trickery Domain: Channel Divinity: Invoke Duplicity ability.     Starting at 2nd level, you can use your Channel Divinity to create an   illusory duplicate of yourself.      As an action, you create a perfect illusion of yourself that lasts for   1 minute, or until you lose your concentration (as if you were   concentrating on a spell).   While you are concentrating on maintaining such an ability would you also be able to maintain concentration on a spell that requires concentration?  There does not seem to be any RAW that limits this however the limitation around concentrating on a second spell exists which may suggest that the intent is that a character cannot concentrate on 2 effects at the same time unless explicitly stated.


So in outlook you can select an email address in the from field for a new e-mail. I was wandering, can I make outlook add a signature based on the value in the From field. So when i send on behalf of a certain email address i want to have a specific signature added automatically.   I would just like to know if it is possible before i spent any time trying to get it to work.

I have multiple accounts I access in Outlook, I would like to automatically add a signature to one of them (not the default one). Normally to send an email from one of the other accounts I click new email, then change the from account, however that doesn't add the associated signature. How does one accomplish this?


I use Safari Version 10.0.2 (12602.3.12) and Chrome Version 55.0.2883.75 (64-bit) on macOS Sierra 10.12.2 Beta (16C53a).

It would be nice to  for .  As it is, SE kind of stands out (in a not cool way):


Am starting learning python, when i want erase all the result in shell, I need to close the shell, can I do this with some command or control keyboard?

Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff, etc.  Like any console, after a while the visible backlog of past commands and prints gets to be cluttered, and sometimes confusing when re-running the same command several times.  I'm wondering if, and how, to clear the Python interpreter console.  I've heard about doing a system call and either calling cls on Windows or clear on Linux, but I was hoping there was something I could command the interpreter itself to do.  Note: I'm running on Windows, so Ctrl+L doesn't work.


I'm using a little piece of Python code to see the system info. When I try this on my system, I got these;  >>> import platform >>> platform.machine() 'AMD64' >>> platform.platform() 'Windows-7-6.1.7601-SP1' >>>    AMD64 means my system is 64-bit, how ever; when I go to C, there is (x86) next to Program Files. Since x86 means 32-bit, why does x86 is there if my system is 64-bit?

I know that on a 64-bit version of Windows the "Program Files" folder is for 64-bit programs and the "Program Files (x86)" folder is for 32-bit programs, but why is this even necessary?  By "necessary", I don't mean "why could Microsoft not have made any other design decisions?" because of course they could have. Rather, I mean, "why, given the current design of 64-bit Windows, must 32-bit programs have a separate top-level folder from 64-bit programs?" Put another way, "what would go wrong if I somehow avoided the redirection mechanism and forced everything to install to the real C:\Program Files\?"  There are plenty of questions on Super User and elsewhere that assert "one is for 32-bit programs, one is for 64-bit programs", but none that I can find give the reason. From my experience, it doesn't seem to matter whether a 32-bit program is installed in the correct place or not.  Does Windows somehow present itself differently to a program running out of "Program Files (x86)"? Is there a description that shows exactly what's different for a program installed in "Program Files (x86)" instead of "Program Files"? I think it's unlikely that Microsoft would introduce a new folder without a legitimate technical reason.


If $a,b,c,d,e,f\geq 0$ and $a+b+c+d+e+f=1\;,$ Then $\max(ab+bc+cd+de+ef)$   $\bf{My\;Try::}$ Using Lagrange Multiplier Method::  Let $$F=f(a,b,c,d,e,f) = ab+bc+cd+de+ef-\lambda(a+b+c+d+e+f-1)$$  $$\displaystyle \frac{dF}{da} = b-\lambda\;,\frac{dF}{db} = a+c-\lambda\;,\frac{dF}{dc} = b+d-\lambda\;,\frac{dF}{dd} = c+e-\lambda\;,\frac{dF}{de} = d+f-\lambda$$  and $$\displaystyle \frac{dF}{df} = e-\lambda\;,\frac{dF}{d\lambda} = -(a+b+c+d+e+f-1)$$  Now for $\max\;,$ Put all derivative $=0$  So we get $$a=\lambda\;,b=\lambda\;,c=0\;,d=0\;,e = \lambda\;,f=\lambda$$  Now put into $$a+b+c+d+e+f=1\;,$$ We get $$\lambda = \frac{1}{4}$$  So we get $$\max(ab+bc+cd+de+ef) = \frac{1}{16}$$  But answer given as $\displaystyle = \frac{1}{4}$  plz explain me where I am wrong, Help required, Thanks

$(a+b+c+d+e+f)^2=$ sum of square of each number (X)+ $2($ sum of product of two numbers (Y) $)$ $ab+bc+cd+de+ef \le Y$ since all are positive.  Therefore $1\ge X+(ab+bc+cd+de+ef)$  Edit: From AM GM inequality, $$X\ge 6(abcde)^{1/3}$$and for am-gm inequality for a,b,c,d,e,f: $$1\ge 6(abcdef)^{1/6}$$ Hence $X\ge 6.\frac{1}{36}$ and $X\ge \frac{1}{6}$.   Is this correct?


We run an application more like competition organizing websites like , . When the tasks start, we see huge load on our server. The problem is, we need to interact with Postgres heavily in order to give random questions and then submitting their answers. There are JOINS between multiple tables and searching and other things, which results in a lot of data traffic and it makes our system slow and unresponsive many times, which is embarrassing.  What can we do in order to make it better? How to handle things which interacts a lot with RDBMS, any caching or in-memory database usage. I searched a lot over various sources, but couldn't find concrete solutions for our needs. How companies organise database and user interactions? What are some good architectures for models like these? Any insight would be helpful.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I ran las dataset, then las to raster using max for DSM.  Two and a half hours later I have 3 areas showing pixilation using higher level coloring.  See enclosed image.  I found on web that seamless might work though 2,2 might be small.

I have created a DEM, DSM, and nDSM from a LiDAR Point Cloud using SAGA-GIS.  I extracted the appropriate returns from the point cloud, then converted to grid, and then closed gaps to fill in any nodata regions.  I'm finding that my resultant rasters are still pretty noisy. For example, a region of pixels in the DSM that is obviously a tree or cluster of trees has several pixels with a very similar value to ground instead of the surrounding higher value pixels.  I've tried doing a majority filter on the DSM, but it didn't help.  Any suggestions for other filters that might help create more contiguous regions of pixels?


I have a set of lines that were created as lines between point pairs. Now I need to know, which points the lines connect. I thus want to join the Ids of both points to the line.   So far I tried to use spatial join, but one ID is always right, while the other ID is always wrong. The lines were created from the points, so they mark the vertices of the lines. In the end I want to have a single ID, derived from both IDs. For this question I only need to know how to get 2 columns in the line table with the IDs from the vertice points.      How can I (spatial) join two points to one line?     I am using ArcGIS 10.3 on Windows 7.

I have two shapefiles, Point and Polyline. I'm trying to populate my polyline layer with the point data ID (systemID) where the lines start to where they end; eg. create two columns (from and to). The lines already have flow direction assigned to them. I am using ArcHydro tools but Arcpy is also fine.  In ArcHydro I have tried using Attribute Tools > Generate From/To Nodes for lines but it creates values for To and From that are not from my point data. My other alternative was using Feature to Vertices and joining the result to my point data table to get the systemID. But then I would have to update the polyline layer as well. I am sure there is a easier way of doing it.  Note: not all the lines have points at the vertices, blank values are fine for them.


I am using Windows XP. Every time I delete a folder which contains Thumbs.db file, I get a message: Thumbs.db is a system file and then it allows me to delete it. Can I disable the creation of Thumbs.db file from the beginning itself?

What are Thumbs.db files for? I've seen them mostly in picture folders. Wherever pictures like icons and wallpapers are located, a Thumbs.db is automatically generated. I've deleted them many times, but they just appear again after some time.  I initially thought that these files were related to a virus, but they are not because my antivirus gave them a clean chit. I also tried Combofix and malwarebyte.


I recently installed Ubuntu but now want to shift to a different distro. Here is a snapshot of the disk management utility on Windows 10.  I allocated approx 280 GB of space to Ubuntu. I have already deleted it. Now, I want to delete the swap partition as well but cannot identify which one it is. I have tried numerous YT videos and answers here but no respite. I even managed to delete the grub boot loader and boot to Windows as a default.

I'm  installing Ubuntu on a Samsung evo 850 SSD drive. System has 4GB memory but no other harddrive. Should I use thedefault partition table or install without swap and make a swap file after installation? Or does it even make a difference whether it’s a partition or a file?


I keep getting the error shown in the title when trying to re-install macOS, one thing that I did was acidentally delete my macintosh HD partition and this started happening. I tried to fix the date via online youtube videos but that did not seem to work. What can I do to fix this issue?

Im trying to reinstall macOs Sierra but get    In the log I only get    Any help appreciated!


Consider this example: \documentclass{article} \begin{document} \tableofcontents  \section*{Change log}  \section{Section1}  \section{Section2}  \end{document}  The result is:  I added * to \section to remove the section number. However, I would like this section to be included in TOC. How to fix?

If I did  \setcounter{chapter}{-1} \chapter{Introduction}   then I get Chapter 0 Introduction. I just want the word Introduction, and I want it also in the contents when I use   \tableofcontents   How can I do that?


I am trying to validate the format of a date before assigning it to an instance variable in a constructor. Each time, it throws a null pointer exception even though I provide a value for the field each time I try to instantiate an object. I think the problem must be with the parse statement, but I cannot understand why there would be a null value there.   Moreover, I was wondering if it is proper practice to validate a date in the constructor in the first place. Should I have a method doing this instead?   Thank you so much for your help. This is my first exposure to java.   import java.text.*;  public class Photograph {     private String caption;     private final String filename;     private String dateTaken;     private int rating; //declares fields       public Photograph(String caption, String filename) {         this.caption = caption;         this.filename = filename;         this.dateTaken = "1901-01-01";         this.rating = 0;    //constructor      }      public Photograph(String caption, String filename, String dateTaken,   int rating) {         this.caption = caption;         this.filename = filename;          SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");         sdf.setLenient(false);          try {             sdf.parse(this.dateTaken);             this.dateTaken = dateTaken;         } catch (ParseException e) {             this.dateTaken = "1901-01-01";         }     }  }  public static void main(String[] args) {     // Testing       //valid date     Photograph test_photo1 = new Photograph("cap1", "pic1", "2017-09-30", 3);     System.out.println(test_photo1.toString());     Photograph test_photo2 = new Photograph("cap2", "pic2", "2017-12-25", 0);     System.out.println(test_photo2.toString());     Photograph test_photo3 = new Photograph("cap3", "pic3", "2018-14-25", 5);     System.out.println(test_photo3.toString());     Photograph test_photo4 = new Photograph("cap4", "pic4", "2018-03-27", 4);     System.out.println(test_photo4.toString());     Photograph test_photo5 = new Photograph("cap5", "pic5", "2018-03-29", 2);     System.out.println(test_photo5.toString());     Photograph test_photo6 = new Photograph("cap6", "pic6", "2018-10-21", 9);     System.out.println(test_photo6.toString()); }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


In a forced oscillation, what exactly is happening? My textbook says that: The oscillator, initially, oscillates with the natural frequency. When we apply external periodic force, the oscillation with natural frequency die out; body oscillates with the frequency of the periodic force. Also, why is the amplitude maximum when the frequency of the external force is equal to natural frequency? I can understand it mathematically.  $$ A = \frac{F_0}{\sqrt{m^2(ω_d - ω)^2 + (ω_db)^2 }}$$                        where, $ω_d$ is the frequency fo the driving force  So when,  $$ω_d = ω $$ $$A = \frac{F_0}{(ω_db)}$$  But can you explain what exactly is happening when the frequency of, say the swing, is the same as the frequency of the force with which my friend is pushing me? This is confusing.

While studying about the Resonance and Forced Oscillations, I came across a graph in my textbook that is given below:-  Now, the author writes      As the amount of damping increases, the peak shifts to lower frequencies.   Why does this happen? And does this imply that at higher damping levels one cannot achieve a higher amplitude by setting the period of the forced oscillation to be equal to the natural frequency? This seems strange because, the highest amplitude is achieved when the natural frequency is equal to the driving frequency. But, I guess that the rules are somehow different for the damping case.


If a user is on one SE site, and they ask a question that is off-topic for that site, but is on-topic for another site, the obvious solution is to migrate it to the appropriate site.  I'm currently dealing with a situation where the question (a generic python question) should be migrated to Stack Overflow, but the asker is blocked from asking questions on Stack Overflow (which could explain why the question was posted on SQA).  What is the appropriate action? Attempting to migrate it results in it being closed as off-topic, but not migrated because of the asker's inability to ask on SO.

There's a sad little loophole in the suspension/question-block system: migrations.  Example: Let's say you've been suspended on MSO, but you really, really want to post a question here now. All you need to do is:   Go to any other site and ask your question.  Chances are good that a moderator there will automatically migrate it here. If not, request it. Success! Your question is now on MSO.   Can this be fixed? The best approach, imo, is to check if the user already has an account at the destination, and if they do, if they're allowed to post.


Can I draw the diagram using tikz? If not, which software should I use for such diagrams? Thanks.

What packages do you use and recommend for creating graphics in your LaTeX documents?     As this is a community wiki post, please add your package to the accepted answer (or add a comment, and someone with >100 rep will add it to the CW answer), and include a brief description of what differentiates it from others and how it can be used (GUI drawing tool which generates code, type in raw text, or generates image for inclusion in document).   We'll eventually sort these answers under headings.


Ubuntu has several recognized favors namely Studio, Xubuntu, Lubuntu and many more ().   The question is :   When using software center, do users find the same applications on all recognized flavors ? Does the applications (and their versions) available  to the different flavors change due to desktop environment or other dependencies ?  Specifically, I also, want to know whether the different flavors share the same version of an application ?

So I've a feeling this is a very noob question but...   Is the only difference between flavors of Ubuntu the graphical interfaces and installed packages? Will they all be equally capable of running 3rd party programs, i.e. Chrome, Dropbox, Android Studio, Steam, etc?  I've a new PC on which I live tested Ubuntu 16.04 and it runs fine. However, I don't care for Unity and if Xubuntu/Lubuntu are lighter weight does that just mean I'm just sacrificing visuals for performance? Ubuntu 16.04 is the commercial release(?) so is its specific set-up just a little more reliable? Don't quite get Linux yet,there's so much choice I'm confused!