Try to make a sort  by using jquery sort. I would like to sort this li's by first div content(in my example, sort by aaa, bbb, ccc and ddd containing fields). Thanks in advance. Here is my code. Try to use .first() and changing the tags, it all useless( Hope for your help  My code:  function newSort(){     $('#attachedCards ul li').html(         $('#attachedCards ul li').children('div').sort(function (a, b) {            return $(a).text().toUpperCase().localeCompare(                 $(b).text().toUpperCase());         })     ); }   html-structure:  &lt;div id="attachedCards"&gt;     &lt;ul&gt;            &lt;li&gt;                 &lt;div&gt;ddd&lt;/div&gt;                 &lt;div&gt;                 some useless info2                 &lt;/div&gt;              &lt;/li&gt;              &lt;li&gt;             &lt;div&gt;ccc&lt;/div&gt;             &lt;div&gt;some useless info1&lt;/div&gt;             &lt;/li&gt;            &lt;li&gt;            &lt;div&gt;bbb&lt;/div&gt;             &lt;div&gt;some useless info3&lt;/div&gt;            &lt;/li&gt;            &lt;li&gt;             &lt;div&gt;aaa&lt;/div&gt;             &lt;div&gt;some useless info4&lt;/div&gt;            &lt;/li&gt;        &lt;/ul&gt;   &lt;/div&gt;   expected result:   aaa       some useless info4  bbb      some useless info3  ccc       some useless info1  ddd       some useless info2    I have now:    &lt;ul&gt;     &lt;li&gt;     aaa&lt;br/&gt;     bbb&lt;br/&gt;     ccc&lt;br/&gt;     ddd&lt;br/&gt;     some useless info1&lt;br/&gt;     some useless info2&lt;br/&gt;     some useless info3&lt;br/&gt;     some useless info4&lt;br/&gt;     &lt;/li&gt;     &lt;li&gt;     aaa&lt;br/&gt;     bbb&lt;br/&gt;     ccc&lt;br/&gt;     ddd&lt;br/&gt;     some useless info1&lt;br/&gt;     some useless info2&lt;br/&gt;     some useless info3&lt;br/&gt;     some useless info4&lt;br/&gt;     &lt;/li&gt;     &lt;li&gt;     aaa&lt;br/&gt;     bbb&lt;br/&gt;     ccc&lt;br/&gt;     ddd&lt;br/&gt;     some useless info1&lt;br/&gt;     some useless info2&lt;br/&gt;     some useless info3&lt;br/&gt;     some useless info4&lt;br/&gt;     &lt;/li&gt;     &lt;li&gt;     aaa&lt;br/&gt;     bbb&lt;br/&gt;     ccc&lt;br/&gt;     ddd&lt;br/&gt;     some useless info1&lt;br/&gt;     some useless info2&lt;br/&gt;     some useless info3&lt;br/&gt;     some useless info4&lt;br/&gt;     &lt;/li&gt;     &lt;/ul&gt;
I'm looking for some sample code that will sort the list items in an HTML list by alphabetical order.  Can anyone help?  Here is a sample list for people to work with:  &lt;ul class="alphaList"&gt;     &lt;li&gt;apples&lt;/li&gt;     &lt;li&gt;cats&lt;/li&gt;     &lt;li&gt;bears&lt;/li&gt; &lt;/ul&gt;
When searching for "Skype" I always see these 2 entries.  There is this duplicate blank Skype icon. Both of them seem to run Skype in the same way.    But I've checked both /usr/share/applications, and ~/.local/share/applications, and can't find the extra icon so I can delete it.    Also as described , sometimes similar ghost icons are present even after removing associated applications. How do I set an environment variable on the command line and have it appear in commands? I am planning on spending 90 days in Schengen zone countries.  I will be taking a cruise between Lisbon and Barcelona.  Do the days at sea count against the 90 days allowed for staying in the Schengen zone? What is the logarithm of a kilometer? Is it a dimensionless number? In log-plots a quantity is plotted on a logarithmic scale. This got me thinking about what the logarithm of a unit actually is.  Suppose I have something with length $L = 1 \:\mathrm{km}$.  $\log L = \log \mathrm{km}$  It seems that the unit of $\log L$ is $\log \mathrm{km}$, but I can also say $L = 1000 \mathrm{\:m}$ and now:  $\log L = 3 + \log \mathrm{m}$  This doesn't appear to have any units at all.  This suggests that $\log \mathrm{km}$ and $\log \mathrm{m}$ are actually dimensionless numbers. But wait, I can do this with any unit! Does it actually make sense to talk about the logarithm of a unit, or some other function for that matter? A clock in freefall Time dilation  using Schwarzschild metric for a non rotating spherical body is: $$t_0=t_f\sqrt{1-\frac{2GM}{rc^2}}$$  For such a non rotating spherical body, what would the time dilation of a clock in vacuum free-falling from infinity be?  (If the answer is non-trivial; a high level outline of the calculation would suffice / be appreciated)  Edit: I am currently working on an iOS app that is trying to model the mechanism underpinning relativity.  So, far the mechanism that I have created is shockingly simple and shockingly good at conforming to Relativity.  However, I am trying to break it.  I am trying to find any possible areas where the two may diverge.  I have noted that using my model a clock in freefall will experience no time dilation, i.e. $t_0=t_f$ and I want to make sure Relativity agrees.  I have noted the gravitational component of time dilation above.  Since my clock is moving one might also expect a kinematic time dilation.  I can calculate the velocity of my clock: $$E_k=\frac{1}{2}mv^2$$ $$E_p=\frac{-GMm}{r}$$ $$v=\sqrt{\frac{2GM}{r}}$$ Plugging this velocity into the kinematic time dilation equation: $$\Delta t'=\frac{\Delta t}{\sqrt{1-\frac{v^2}{c^2}}}$$ $$\Delta t'=\frac{\Delta t}{\sqrt{1-\frac{2GM}{rc^2}}}$$  At this point one might make the observation that the kinematic dilation is the inverse of the gravitational dilation and therefore conclude that: $$t_0=t_f$$ Rewiring a switch controlled receptacle to a ceiling light I remember coming across this fact a while ago in a pdf somewhere, but I haven't been able to find it again. Can someone show me how to prove it? I would appreciate easier proofs.  EDIT: I'm very sorry, I forgot to actually state it.  Prove that $-1$ is not a quadratic residue modulo primes of the form $4k+3$.  Thanks! What constitutes an observation/measurement in QM? Fundamental notions of QM have to do with observation, a major example being The Uncertainty Principle.    What is the technical definition of an observation/?  If I look at a QM system, it will collapse. But how is that any different from a bunch of matter "looking" at the same system?  Can the system tell the difference between a person's eyes and the bunch of matter?  If not, how can the system remain QM?  Am I on the right track? Is there a single word to describe a solution that hasn't been optimized? Using "you" and "your" as a representation for yourself and everyone in general Example sentence:     I love when your dog just lets you sit there to pet them. You don’t necessarily know if they are enjoying it, but they love you enough to just sit there with you for a bit.   Is this correct? We assume the words "you" and "your" refer to the speaker of the sentence, and not to the listener, as second-person usually does. But it also refers to dog owners in general. I have always been curious about this. I've got an HP Pavilion Touchsmart notebook that came with Windows 8. I've upgraded to 8.1, and now I want to dual-boot an Ubuntu distribution with Windows 10. When dual-booting with Windows 8.1, the Windows Boot Manager always took priority, even after installing GRUB. What do I need to do to get GRUB to be the default bootloader instead of Windows Boot Manager? What keeps mass from turning into energy? I understand the energy and mass can change back and forth according to Einstein. It is fluid; it can go from one to the other. So, what keeps mass from just turning into energy? Is there some force holding a subatomic particle together? What keeps mass in it's state? I hope this is not a silly question but I am clueless. Thanks Creating polyline-based "heatmap" from GPS tracks? This winter I am planning to track my downhill skiing/snowboarding using a GPS.  Most of my riding will occur at the same resort.  I would like to be able to create a sort of "heatmap" that shows the amount of runs that I have made in a given area.  As I add more and more GPS traces to my database, my goal would be to see a sort of linear heatmap of the most traveled areas.  Given the nature of downhill skiing, you would expect the uphill chairlift lines will be the "hottest" because it will be the only places visited over-and-over again.  Given that 1) my track will not be the same every time and 2) the area covered by following one "run" may be a few hundred feet wide, what might be the best way to analyze this "linear" data to create a sort of heatmap?  My thoughts were to buffer the lines, then intersect the polys to get a sort of Venn Diagram thing going.  My preference is to use open-source technologies.  I've got QGIS and PostGIS loaded and available.  UPDATE: In regards to @blah238's response, I was thinking of something that might be able to "collect" the number of passes ("runs") through an area, and then symbolize by the count.  Conceptually, this would be similar to ArcGIS "" (but for lines, not points) or  (but for multiple line in roughly the same area).  A more visual example of a similar concept might be a traffic-flow map, where highly-congested areas would equate to "highly-traveled" ski runs/areas:    I've read the following questions that may give some ideas, but they don't really address what I am trying to accomplish: Azimuth and Distance, NumericalDigitize, Numerical Vertex Edit, XY tools and other plugins are not on QGIS Plugin Manager version 2.0.1 Will these plugins no longer be available in QGIS 2.0.1? Why does the SARS-CoV2 virus not remain infectious forever? Or does it? Given that the majority of biologists do not currently consider viruses to be alive, a virus can never die.  It can, however, get destroyed by long exposures to soapy water, alcohol, and apparently certain frequencies of UV light.  Why is an individual SARS-CoV2 virion not infectious forever?  Or is it? Linux: Case-INSENSITIVE Filesystem Share wireless Internet connection through ethernet What's the best way to check if a String represents an integer in Java? I normally use the following idiom to check if a String can be converted to an integer.  public boolean isInteger( String input ) {     try {         Integer.parseInt( input );         return true;     }     catch( Exception e ) {         return false;     } }   Is it just me, or does this seem a bit hackish?  What's a better way?    See my answer (with benchmarks, based on the  by ) to see why I've reversed my position and accepted  to this problem.  I think this original code will be used by most people because it's quicker to implement, and more maintainable, but it's orders of magnitude slower when non-integer data is provided. How do I send a file as an email attachment using Linux command line? C program to convert Fahrenheit to Celsius always prints zero