Advanced array sorting
How do I Sort a Multidimensional Array in PHP
Notation for functions vs. numbers How are "needs to be washed," "needs washing," and the regional variant "needs washed" to be distinguished"? I'm from Central Pennsylvania, and apparently, we have a strange language construct in this area. I was recently talking about how "my car needs washed" to a friend from NJ, and she told me that my sentence was grammatically incorrect.   I realize she's right, and I realize my options are "my car needs to be washed" or "my car needs washing". But I'm not clear on the precise rule being invoked. Calculating well densities in selected counties using ArcPy? My 8 year old son won't fall asleep We put him to bed at 9pm and he stays up til 1am or later. When I go to check on him he is always playing with his hands and sometimes talking. I ask him why he is awake and not trying to sleep and he says it's because he just wants to play. He never comes to tell us that he is having a hard time sleeping or that there is anything wrong. The weird thing is that he used to be the first one to fall asleep out of 3 boys and the staying up started a few months ago. He does this every night and on top of keeping us awake, he is now waking up his brothers.   About a month or so ago, we decided to punish him by grounding him from video games. He doesn't want to be grounded, but he still keeps doing it. Nothing we do seems to be helping and it seems to be getting worse. I have talked to him about why it is so important to get enough sleep and why it's even more important for kids. He also gets plenty of exercise and time to play during the day.   I'm really starting to wonder if he is doing it just to be defiant. If anyone has any suggestions I would greatly appreciate it.  The problem is that he is being disruptive to everyone in the house and it has been EVERY night for the last 3 months.   He is tired and emotional during the day, and it is causing his brothers to be tired during the day while they are at school.   Because he is tired during the day he doesn't really want to be as active as he used to be. However, I do still encourage him to be active. We have always had a bedtime routine. We have asked him many different times if he is just having trouble sleeping, if he is uncomfortable, and if there is something wrong. He always tells us that he just wants to play.   At the beginning of all this he told me that he wants to be the one to decide when he goes to sleep and when he wakes up. Which is why I would even ask if it was out of defiance.   We really didn't want to get to the point of punishing him, but nothing else seemed to help and it was only after he started keeping his brothers awake.   It's not like we haven't asked him what he thinks would help or what would help him sleep better. He ALWAYS says that he just WANTS to stay up and play because it is fun. We know it is important for him to get enough sleep, and I'm worried because I don't think he is (and he's preventing the rest of us from getting enough, too). What is the difference between a symbolic link and a hard link? Recently I was asked this during a job interview. I was honest and said I knew how a symbolic link behaves and how to create one, but do not understand the use of a hard link and how it differs from a symbolic one. Why couldn't Harry see Thestrals at the end of Goblet of Fire after the senseless and shocking death of Cedric Diggory?   At the end of Goblet of Fire, the carriages still appeared horseless to Harry:     Hermione turned away, smiling at the horseless carriages which were now trundling towards them up the drive, as Krum, looking surprised, but gratified, signed a fragment of   parchment for Ron.   Goblet of Fire - Page 629 - British Hardcover - Adult Edition   At the beginning of Order of the Phoenix, Harry sees the Thestrals for the first time:     Here stood the hundred or so horseless stagecoaches that always took the students above first year up to the castle. Harry glanced quickly at them, turned away to keep a lookout for Ron and Hermione, then did a double-take.   The coaches were no longer horseless. There were creatures standing between the carriage shafts.   Order of the Phoenix - Page 178 - British Hardcover - Adult Edition   We know that only those who have seen death can see Thestrals:     ‘Don’ worry, it won’ hurt yeh,’ said Hagrid patiently. ‘Righ’, now, who can tell me why some o’ yeh can see ’em an’ some can’t?’   Hermione raised her hand.   ‘Go on then,’ said Hagrid, beaming at her.   ‘The only people who can see Thestrals,’ she said, ‘are people who have seen death.’   ‘Tha’s exactly right,’ said Hagrid solemnly [...]   Order of the Phoenix - Page 394 - British Hardcover - Adult Edition   A month went by between Cedric's death and the end of the spring term -- is this enough time for Harry to have truly internalized Cedric's death? Goblet of Fire indicates that Harry was in shock following Cedric's murder, but was able to relate the story of Cedric's death to Mr. and Mrs. Diggory.     When he looked back, even a month later, Harry found he had few memories of the following days. It was as though he had been through too much to take in any more. The recollections he did have were very painful. The worst, perhaps, was the meeting with the Diggorys that took place the following morning.   [...]   ‘He suffered very little, then,’ she said, when Harry had told her how Cedric had died.'   Goblet of Fire - Page 621 - British Hardcover - Adult Edition   So, then, why couldn't Harry see Thestrals at the end of Goblet of Fire? Variable declaration placement in C I long thought that in C, all variables had to be declared at the beginning of the function. I know that in C99, the rules are the same as in C++, but what are the variable declaration placement rules for C89/ANSI C?  The following code compiles successfully with gcc -std=c89 and gcc -ansi:  #include &lt;stdio.h&gt; int main() {     int i;     for (i = 0; i &lt; 10; i++) {         char c = (i % 95) + 32;         printf("%i: %c\n", i, c);         char *s;         s = "some string";         puts(s);     }     return 0; }   Shouldn't the declarations of c and s cause an error in C89/ANSI mode? PHPUnit skips all tests Reviewing a suggested edit from a review queue jumps to the suggested edit queue I was in the first posts review queue and chanced on a post with a suggested edit. (Note: I have enough reputation to review suggested edits.) I clicked on “edit (1)” and was taken into the suggested edits queue. When I approved the suggested edit, I was taken to the next suggested edit, and so on until there were no more suggestions (“There are no items for you to review.”, still in the suggested edits queue). In this situation, I think it would make more sense if I was brought back to that post I was working on in the first posts queue, as soon as I acted on its suggested edit. Alternatively, the suggested edit should be shown in the same kind of pop-up as on a question thread page. The same goes for other queues (late answers, low quality, etc.). Why Doesn't a Bootable USB Boot This question is asked often in Ask Ubuntu, sometimes with few hints about the situation.   Please provide a list of possible reasons to help troubleshoot the problem. Editing photo dimensions in large batches If I had the time, I would go through each and every photo to make sure that the dimensions and quality are pixel perfect. However, I'm in a time crunch, and need to make the couple hundred photos that are 4320 x 3240 into 950x630.   now I could- 1. Upload them into WordPress, uses native image reducing components and J query go from there. 2. Go through each and every photo, reduce file size, and proportion and bring it to Yahoo's PNG processing script.  However, maybe I'm missing a choice or alternative workflow that would allow for processing all of these photos in a clear manner without losing quality or perspectives. Any workflow suggestions? Why were there 3-7-9 Rings of Power? Knowing which java.exe process to kill on a windows machine When a java based application starts to misbehave on a windows machine, you want to be able to kill the process in the task manager if you can't quit the application normally. Most of the time, there's more than one java based application running on my machine. Is there a better way than just randomly killing java.exe processes in hope that you'll hit the correct application eventually?  EDIT: Thank you to all the people who pointed me to Sysinternal's Process Explorer - Exactly what I'm looking for! Confidence interval for the p-value estimate when doing Monte Carlo testing The second paragraph of the  section of the Wikipedia article on resampling statistics, the values of a confidence interval for a p-value from a MC sampling is given:     After $N$ random permutations, it is possible to obtain a confidence interval for the p-value based on the Binomial distribution. For example, if after $N = 10000$ random permutations the p-value is estimated to be $\hat{p}=0.05$, then a 99% confidence interval for the true $p$ (the one that would result from trying all possible permutations) is $[0.044, 0.056]$.   What's the formula to calculate it? Should Suggested Edits change the technical content of a post? I have noticed a significant number of suggested edits that attempt to fix code, or change the original meaning of someone else's post.    Is this really a good idea?    I've been on StackOverflow awhile, and among the editors who have sufficient reputation to edit without approval, I've never seen anyone modify the technical content or meaning of someone else's post.   I would consider obvious syntax and spelling errors OK to change, but I have seen many suggested edits that change the meaning of the code that was posted, or add things to the code that have nothing to do with the original question. A good example of this would be adding parameters to a SQL command, when the question was not asking about SQL injection. Biblatex citation order I'm facing a problem with biblatex citation order.  Using this configuration:  \documentclass {article} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \hyphenation{es-ta-bi-li-da-de} \usepackage{setspace} \singlespacing \usepackage[natbib=true,style=numeric]{biblatex} \addbibresource{frameworks.bib}   Being frameworks.bib this:  @Article{JONHSON88, author = {Ralph Johnson, Brian Foote}, title = {Designin Reusable Classes}, journal = {Journal of Object-Oriented Programming SIGS}, year = {1988}, key = {Johnson:88}, volume = {1}, number = {5}, pages = {22-35}, month = jun }  @book{UML-F:00, author = {Fontoura M., Pree W., Rumpe B.}, editor = {Addison-Wesley}, title = {The UML Profile for Framework Architectures}, year = {2000}, }   The PDF is generated with a text like:  Something about something[4], and moo foo other children[1].   This citation [4] is the first in all text. How can I order this correctly to [1]...[2] ...? We had a quiz in class today where we had to break the ciphertext with the key given, but not the algorithm. Suffice to say that I wasn't able to decrypt it within the allotted time of 12 mins and will probably get a 0% score on the quiz.  So, I was just wondering if there are some kind of standard techniques that are followed when decrypting a simple substitution ciphertext. What does the symbol $\otimes$ mean? The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List&lt;String&gt; someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List&lt;String&gt; someList = someMethod();          } What does: Error Broken count >0 mean? I have the message:   Error Broken count &gt;0 Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f Details: The following packages have unmet dependencies: firefox-globalmenu: Depends: firefox (= 19.0+build1-0ubuntu0.12.04.2) but 19.0+build1-0ubuntu0.12.04.1 is installed   Any suggestions?