A couple of years ago, a former coworker told me a trick in Bash that I completely forgot how to do it. The idea is that when you type a path, in the next command you can use some shortcut to automatically put that path there as well.  Let's say I create the directory /tmp/test. If then I want to move a file there, I could mv file [shortcut that puts /tmp/test]  What's that shortcut?
I am starting to learn some Regex, therefore I use this command repeatedly:  grep pattern /usr/share/dict/american-english    Only the part with pattern changes, so I have to write the long expression "/usr/share/dict/american-english" again and again.   Someone made the remark that it is possible to expand an argument of a command from the command history by typing cryptic character combinations instead of the full expression.  Could you tell me those cryptic character combinations ?
For example, on this page:   I see the following:   What does this 499 mean? I can't seem to correlate it with upvotes, posts, edits or anything else. Repairing corrupt MP4 I took a video from my Android phone (Sony Xperia P, if you need to know), and before I could stop recording it, the phone memory got full and the phone got hanged too. I rebooted the phone, the video was there, but I couldn't play it from any media player on Android. It's in mp4 format.    So I tried to open it on PC and Mac with different video player, like VLC, quick Time, Windows Media Player etc., but none of them can play it. I know that the video is corrupted, but I believe it's repairable, since it got more than a GB in size. Is there anything that I can try  to repair the video file? The video is really important. My current desktop reso is 1366x768    In cs 1.6 I have selected display option as Normal and Resolution as 1024x768.     In this settings I don't get those vertical black side bars which make the playing screen square.     Atm it is rectangular but I wanted square.    How do I get the vertical black bars while playing cs 1.6? I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match.  How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it.  function replaceURLWithHTMLLinks(text) {     var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&amp;@#\/%?=~_|!:,.;]*[-A-Z0-9+&amp;@#\/%=~_|])/i;     return text.replace(exp,"&lt;a href='$1'&gt;$1&lt;/a&gt;");  } What Happens to electrons after Alpha Decay and Nuclear Fission? Where do the electrons go? In alpha decay do 2 electrons follow the alpha particle and make stable Helium or does the larger daughter nucleus become an anion?  Also what do the electrons do in the mixture of fission and alpha decay? With Beryllium-8 it decays into two alpha particles and 4 lonely electrons or do you get two Helium atoms?If someone could add an entry to Holocron it would be greatly appreciated, thanks. What are the SEO rules for HTML 5? What are the rules of engagement with respect to SEO in HTML 5?  Examples of things we have been mulling over with no conclusion:   Are you penalised for not using &lt;head&gt; and &lt;body&gt; tags? Do links in &lt;nav&gt; blocks get prioritised for follows? With &lt;aside&gt; (no bside though), &lt;section&gt;, &lt;summary&gt; and &lt;details&gt; which ones carry the most weight for content, one-liner descriptions and keyword tags are there search engine implications? If you use CSS to put a &lt;footer&gt; element at the top and a &lt;header&gt; element at the bottom (not that you would but it may be construed as such by an incomplete spider implementation)? Does the use of placeholder attributes on &lt;input&gt; show you are more user focused?   At the minute we are haphazardly pinning the content on the donkey with regard to tag usage but would be interesting to know if anyone has any insight into the "correct" tags to use with regards to SEO. Sometimes after I fry something, I wash it immediately in water because it's a bit easier to wash (before the remains stick to the pan).  Does this damage the pan in any way? Clear up confusion about the meaning of entropy So I though, and was told, that entropy is the amount of disorder in a system. Specifically the example of heat flow and it flows to maximize entropy. To me this seemed odd. This seemed more ordered to me, from two things (hot and cold) to one thing (lukewarm).   So as I have read today on wikipedia        In recent years the long-standing use of term "disorder" to discuss   entropy has met with some criticism.[20][21][22]      When considered at a microscopic level, the term disorder may quite   correctly suggest an increased range of accessible possibilities; but   this may result in confusion because, at the macroscopic level of   everyday perception, a higher entropy state may appear more homogenous   (more even, or more smoothly mixed) apparently in diametric opposition   to its description as being "more disordered". Thus for example there   may be dissonance at equilibrium being equated with "perfect internal   disorder"; or the mixing of milk in coffee being described as a   transition from an ordered state to a disordered state.      It has to be stressed, therefore, that "disorder", as used in a   thermodynamic sense, relates to a full microscopic description of the   system, rather than its apparent macroscopic properties. Many popular   chemistry textbooks in recent editions increasingly have tended to   instead present entropy through the idea of energy dispersal, which is   a dominant contribution to entropy in most everyday situations.    So what this is saying basically many people mistake the macroscopic outcome of entropy in the same manner as I have above. Seemingly two dissimilar things combining and becoming one.   They say to understand it microscopically. But this still is odd to me, take for example the particles in a box, when they come to thermal equilibrium they are said to have the most entropy they can within their system (from wiki again)     Entropy – in thermodynamics, a parameter representing the state of   disorder of a system at the atomic, ionic, or molecular level; the   greater the disorder the higher the entropy.[7]   What is disorder in the molecular sense I guess is my question. When the particles all come to thermal equilibrium they all seem to be uniform, which I equate with ordering.  I feel disorder in the molecular sense would be fast moving particles, making a mind boggling amount of interactions with each other. Such as in a hot gas, hot gas seems super disordered, but put cold gas in thermal contact with it, let them come to thermal equilibrium, and now they are more ordered!? When should the "Not an Answer" flag be used? Does a linear operator obeying Leibniz rule imply it is a differential operator? Windows 98 on a modern computer? Android Phone SD Card Problem My Samsung Galaxy Admire phone is saying that an SD card isn't found when the SD card is inside the phone: it shows "Please insert SD Card".  What could be wrong? What is the possibility of a railgun assisted orbital launch? Basic facts: The  is 2.4 miles deep.  Railguns  of a projectile on the order of 7.5 km/s.  The Earth's  is 11.2 km/s.  It seems to me that a railgun style launch device built into a deep shaft such as an abandoned mine could reasonably launch a vehicle into space.  I have not run the calculations and I wouldn't doubt that there might be issues with high G's that limit the potential for astronauts on such a vehicle, but even still it seems like it would be cheaper to build such a launch device and place a powerplant nearby to run it than it is to build and fuel single-use rockets.  So, what is the possibility of a railgun assisted orbital launch?   What am I missing here?  Why hasn't this concept received more attention? Matching a sentence with grep How can I move files and view the progress (e.g. with a progress bar)? When moving large directories using mv, is there a way to view the progress (%)? The cp command on gentoo had a -g switch that showed the progress. Creating queries to select by attribute with arcpy I'm quite new with arcpy and I'm finding selecting by attribute a bit of a nightmare. There's a problem with my query on the script below [query = "\'Location\' = observer"], but I can't tell what it is. 'Location' is a field of the feature class I'm dealing with (fc_copy).  with arcpy.da.UpdateCursor(fc_copy,field_names) as cursor:        for row in cursor:         observer = row[0]         arcpy.MakeFeatureLayer_management(fc_copy, 'fl_copy_OBS')         arcpy.MakeFeatureLayer_management(fc_copy, 'fl_copy_TAR')         query = "\'Location\' = observer"         arcpy.SelectLayerByAttribute_management('fl_copy_OBS', 'NEW_SELECTION', query)         arcpy.SelectLayerByAttribute_management('fl_copy_TAR', 'NEW_SELECTION', query, invert_where_clause = 'INVERT')   This is the error I get => Invalid expression                            Failed to execute (SelectLayerByAttribute).  Is there any documentation to learn the rules to follow to build queries for arcpy? This is a summary of the excerpt:  Given that we have:  *$10^9$ people  *each person has a chance of 0.01 of going to a hotel  *we have $10^5$ hotels, each hotel holds 100 people  *Thus, $P(2 \text{ persons meet on the same hotel in any given day}) = 0.01 \cdot 0.01 \cdot 10^{-5}$  *and $P(2\text{ persons on the same hotel in $2$ day}) = P(2 \text{ persons on the same hotel in any given days})^2 = 10^{-18}$  the book "Mining of Massive Dataset" said that the expected number of pairs who stay in the same hotel for 2 days is:  $P(2 \text{ persons on the same hotel in $2$ days}) \cdot ( \text{number of pairs of people} ) \cdot (\text{number of pairs of days})$  this is the part where I got stuck. Can't understand how it come to this derivation. Can anybody explain it in more elaborate detail.  You can find the content on page 6 of this link:  (it is freely available) From this  by orlp:     If I strap a rocket booster to a rocket in space and fire it for one second, then the work provided is much higher when the rocket is flying fast compared to when the rocket was stationary. In both cases the rocket fires for the same duration but in the former case the rocket travels a much greater distance during this period. What gives? Print escaped representation of a str Is it ever acceptable to have a  in your C or C++ application?  What if you allocate some memory and use it until the very last line of code in your application (for example, a global object's destructor)? As long as the memory consumption doesn't grow over time, is it OK to trust the OS to free your memory for you when your application terminates (on Windows, Mac, and Linux)? Would you even consider this a real memory leak if the memory was being used continuously until it was freed by the OS.  What if a third party library forced this situation on you? Would refuse to use that third party library no matter how great it otherwise might be?  I only see one practical disadvantage, and that is that these benign leaks will show up with memory leak detection tools as false positives.