I have a variable which is as follows.  let response = [  {} ];   Which is an array with an empty object. What kind of check should I put in place to determine if this response is exactly equal to this. i.e,   [{}] === response; // returns false   I want to have a check that returns false if the response is [{}] how do i do that.  There are already questions on stack-overflow which asks on how to check for an empty object. My Question is that how do I check for an array with an empty object. So completely different. This is no duplicate of any question.
After an AJAX request, sometimes my application may return an empty object, like:  var a = {};   How can I check whether that's the case?
dpkg-divert: error: rename involves overwriting `/usr/lib/xorg/protocol.txt' with different file `/usr/lib/xorg/protocol-precise.txt', not allowed I just installed Ubuntu (12.04.4) and I upgraded to 13.10  I have no idea how to fix this :/  $ sudo apt-get install -f  Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be REMOVED:   xserver-common-lts-saucy 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded. 1 not fully installed or removed. After this operation, 1,718 kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 175174 files and directories currently installed.) Removing xserver-common-lts-saucy ... Removing 'diversion of /usr/lib/xorg/protocol.txt to /usr/lib/xorg/protocol-precise.txt by xserver-common-lts-saucy' dpkg-divert: error: rename involves overwriting `/usr/lib/xorg/protocol.txt' with   different file `/usr/lib/xorg/protocol-precise.txt', not allowed dpkg: error processing xserver-common-lts-saucy (--remove):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  xserver-common-lts-saucy E: Sub-process /usr/bin/dpkg returned an error code (1) Show $a\Bbb Z+b\Bbb Z = \gcd(a,b)\Bbb Z$ Getting new files to inherit group permissions on Linux I am having a problem with permissions on a Linux server. I am used to BSD. When a directory is owned by a group the user who owns it isn't in such as www-data, files created in it will be owned by that group. This is important because I want files to be readable by the webserver (which I will not run as root) but so a user can still put new files in the directory. I can't put the users in www-data because then they can read every other users websites.   I want the webserver to read all websites, I want users to be able to change their own.  The permissions are set like this on the folders at the moment....  drwxr-x--- 3 john www-data 4096 Feb 17 21:27 john   It is standard behavior on BSD for permissions to work this way. How do I get Linux to do this? First player rolls a 6-sided die 100 times and the second player 101 times. What are the odds of the second player getting more odd numbers than the first one?  I tried solving this via listing the options which led to a nasty sum that I wasn't able to solve neither by hand nor by using wolfram alpha. Clearly there has to be a more clever solution using the properties of a binomial distribution, but so far I haven't come across anything useful. Omission of definite article with musical instruments What is the rule for omitting/including the definite article in the following sentences:     I used to play piano.   I used to play the piano.   I would pick the first sentence, but I've heard people say the second sentence even when they are not referring to a specific piano. Which one is correct? I noticed that Synonymizer is only a bronze badge. Yet in order to obtain this badge you need to have 2500 reputation or more to even create tag synonyms. Then, on top of that you also need to be able to find a tag synonym.  Only 514 of these have been awarded... This makes the BRONZE badge Synonymizer rarer to have than most the gold medal badges. So my question is, why is this a bronze badge? I am using the algorithmic package to typeset an algorithm. I would like to have connecting lines between the beginning and end of a loop or conditional like in the algorithm2e package. Is there an easy way to accomplish this, or am I better off switching to algorithm2e? Indefinite integral of $ \int \frac{x^3}{\sqrt{x^2+1}} \,\text{d}x$. Can you please provide any sort of hint or suggestion on how to find the following indefinite integral?  $$\int\frac{x^3}{\sqrt{x^2+1}}\text{d}x$$  I tried substituting everything but it didn't work. I also tried trigonometric substitution but I couldn't find any valid trigonometric identity for $ \sqrt{\cos^2(x)+1} $ or $ \sqrt{\sin^2(x)+1} $. How do I convert between big-endian and little-endian values in C++? How do I convert between big-endian and little-endian values in C++? For clarity, I have to translate binary data (double-precision floating point values and 32-bit and 64-bit integers) from one CPU architecture to another.  This doesn't involve networking, so ntoh() and similar functions won't work here.  Note: The answer I accepted applies directly to compilers I'm targeting (which is why I chose it).  However, there are other very good, more portable answers here. Change folder permissions and ownership If you're interested in grammar, as I am, I am sure you have delved into a thought process about infinitive to, and like me, you have probably questioned what it is, or what it could be defined as. My mind always wants to place it in the Eight Parts of Speech, and I know this is foolish of me to some regard, so I stray from it, but I still wish to designate it under something that can be explain it. So, this is the motivation for this post, this question: What is the infinitive to, and why?  Here are my thoughts: There are three real possibilities, going back through the times. First, we can say that it is part of the verb that comes after it (to go, to run, etc.). This could be supported by the claim that you are not supposed to "split" infinitives ("To boldly go"), but only that.   Secondly, we could consider it a subordinator. I came across this designation most recently in my studies of modern and transformational grammar. As of right now, it is still the one I accept, especially as a result of the trend of designating more phrases as clauses. It works, except it's weird. Do we call this a unique subordinator as a result of how it operates? For example, to-infinitive clauses call for non-finite verb forms, which typically have an implied subject as a part of their clause. For example, "I want to go to the store." In the infinitive clause, "I" is the implied subject, as a understand. So, again, this works. However, things get a little weird when other subordinators come into play. For example, "I'm excited for you to win the competition." Now, if I'm right, those of you will say that "for" is a preposition here, as a result of the new-grammar stuff, but I'm going to count it as a subordinator, as defined by my own beliefs and that of a lot of other grammars. So, how do the clauses work in such a sentence? According to transformational grammar, "for you to win the competition" is defined as an ordinary clause. So, does that mean that it also contains a secondary clause within itself (the infinitive clause part)? If so, how do those two clauses work in conjunction to each other when one is so integrated? "For you to win the competition" looks to just be one clause, but if that's the case, doesn't "to" have to represent something else?  This moves us on to the third way to look at things, which is to consider "to" as auxiliary verb, a defective one at that. There are a lot of things to support this, and it even allows for the split infinitive. Furthermore, it calls for a non-finite verb form to follow, like an auxiliary. But, as I said before, it's defective in the way that is all it can function as.  As I said, I still accept to as a subordinator, but I want to be proven wrong or right. Wrong by showing evidence of it being something else, or right by showing how clauses operate when it seems to be layered up. Making a (simple) directory tree I'm trying to make a simple directory tree representation in LaTeX. Something like:  spam  |  +-- ham  +-- eggs      |      +-- more spam      +-- dead parrots   The tree won't be that long (say, 10--15 entries or so), with three or so levels, and is a one-off thing. So, quick-and-dirty solutions are welcome. When recommending tikz, please note that I have almost no experience with it, so I'd appreciate a clean simple solution, even if it doesn't look quite perfect.   On Tex.SE tikz is almost like the jquery recurring joke on StackOverflow..    Edit: As per Thorsten's suggestion,  is a nice and easy-to-use solution. The example from above could be written as:  \usepackage{dirtree} ... \dirtree{% .1 spam. .2 ham. .2 eggs. .3 more spam. .3 dead parrots. } If I wave around a bar magnet, the magnetic field in the space around it changes. Is this enough to go through the whole speed of light derivation implying that the motion creates an electromagnetic wave? If so how do I determine the wavelength and direction of the resulting wave? I'm trying to  when I run into this:     "You have already deleted 5 of your own posts today; further deletes are blocked"      I found conflicting information on this very annoying limit:   This post from May 25, 2010: . This is marked . If this is no longer the case, please edit that question and flag it as . Then , indicates that the problem has risen from the dead -- despite :     Each time that I've seen it (pruning subpar answers), it's been a user who is deleting their own redundant zero-upvote answers. Can you tweak the algorithm slightly so answers with less than one upvote don't count towards tripping this flag?     (Emphasis added.) :     I don't mind it when         cleaning up redundant answers on questions that have multiple alternate good answers   cleaning up old, "less awesome" answers that are no longer reflective of the user's current skill level         (Emphasis added.)     So why do we have barriers in place, to making SO answers less, "less awesome"?      Proposed Solution:  Please let us (¿once again?) delete an unlimited number of our own answers, when they have zero up-votes and are not marked as the answer.  Otherwise, please edit the linked questions to clear up the confusion. Can steam create an overview of all my achievements? I play several games on Steam and I love the achievement system. It would be great to get an overview of all the achievements ever gained in Steam games. Does Steam support this? I haven't found such an overview.  If such a feature does not exist, I would already be happy with an easy way to calculate the sum of all my achievements automatically.  Edit: I stumbled upon an interesting website called  today. Unfortunately it only works for XBox-Achievements. Does anyone know of a similar service for Steam? This would solve my question right away. Implementing my own solution based on the links posted in the answers didn't work because the APIs are not sufficient for my needs. Why do some Jedi disappear when they die while others don't? Some Jedi disappear when they die:   In Star Wars Episode IV: A New Hope       At the end of his duel with Vader on the first Death Star, Obi-Wan Kenobi let down his guard and concentrated for a moment, disappearing entirely just as Vader's lightsaber passed through his empty robe.   In Star Wars Episode VI: Return of the Jedi      When Luke returned to Dagobah in the Return of the Jedi, Yoda also disappears when he peacefully dies.  In Star Wars Episode VIII: The Last Jedi      When Luke is exhausted after “being” on Crait he looks into the Horizon and disappears.    And others don't:   Star Wars Episode I: The Phantom Menace      When Qui-Gon Jinn's dies after his duel with Darth Maul, he doesn't  disappear and is cremated.  Star Wars Episode VI: Return of the Jedi      When Vader/Anakin Skywalker dies on the second Death Star, he does not disappear and he is cremated by Luke.      Also, they all became a "ghost" after their death. Is $f(a)\!=\!0\!=\!f(b)\Rightarrow (x\!-\!a)(x\!-\!b)\mid f(x)\,$ true if $\,a=b?\ $ [Double Factor Theorem] How long is it safe to marinate meat? Trackpad not working after update to Ubuntu 14.10 on Dell Inspiron 15R Where to put my code: plugin or functions.php?