I have the following piece of code:        static private void parseForSampleRate(string header, ref LoggerData logger_data)       {            Regex pattern = new Regex(@"(?&lt;=Sample rate(hz): )\d+.\d+(?= |)");            Match m = pattern.Match(header);             if (m.Success)                 logger_data.SampleRate = Convert.ToDouble(m.Value);            else                 logger_data.Error = ParseError.SAMPLE_RATE_NOT_FOUND;       }   When feeding in the following string:  Sensor ID: 11 | Sample rate(hz): 60.00 | Duration(sec): 3600.00   I fail to receive a match.  What exactly am I doing wrong? I've specified a lookbehind of "Sample rate(hz): " and lookahead of " |". I've also believe I've specified the "\d+.\d+".  Any ideas as to why I'm not getting a success match with value of 60.00?  Thanks,
I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?
Write to FIFO only if it exists Can magnetic fields be "blocked"? For example, in the game, TitanFall, a robot stop bullets with ( presumably ) a magnetic shield.  I wish to calculate the magnetic force required to stop a bullet within a few microseconds.  But the problem I have is that my entire electronic system or the vehicle ( most likely even a building ) will be subjected to massive fields most likely destroying it as well.  Does any know of a way to "block" or divert the field around my vehicle? Is it even possible? My knowledge in magnetic fields are quite limited at this time. Medium with refractive index less than unity? Is there a dollar amount that, when adding Massachusetts Sales Tax, precisely equals $200? Does any test actually prove causation? SF novel about one-way scientific expedition to inhabited planet, where telepathic aliens "talk" sort of ++like this++ and ~*~this~*~ I'm looking for a novel I read in the mid-to-late 1990s. It was a science fiction novel about an expedition of scientists sent at sub-light-speed (maybe in cryo-sleep?) to investigate a star system. Once there they set up a permanent scientific outpost.  There was at least one inhabited planet in the system, with a sentient species that communicated telepathically. The aliens' speech was represented with various symbols instead of quotation marks, with each named character having (I think) its own characteristic set of symbols, as in the title of the question. The scientists are eventually able to communicate with these (generally friendly) aliens.  The thing I remember most clearly is the end of the book. This was a one-way trip for the scientists, so gradually they all die off from various causes. When the next-to-last member of the crew dies of old age, the survivor is looking for an epigraph for her funeral, and (ironically, considering my current plight) can't find it in his search of the electronic library. He finally discovers it under "humor" because it's by Mark Twain: "Wherever she was, there was Eden." (This quote, of course, I found immediately in  and many other sources; it's from Eve's Diary.)  Other pieces of information I'm less sure of:   I don't think the planet was hospitable to humans; it may have been something like a gas giant, with the aliens "swimming" through the gas. I think the scientists stayed in an orbital space station, though they may have made expeditions to the planet in vehicles or protective suits. There may have been a "twin" planet, or a moon in an eccentric orbit, that caused periodic "flares" of some sort on the aliens' planet. There might have been some conflict between the crew early on, maybe because there was a non-scientific (military) commander, or perhaps just because people have conflict. I think the author was of sort of middling fame; respected and known by SF enthusiasts, but not a superstar like Asimov or Clarke. Almost certainly male, and probably with a professional science background. I think the science was fairly authentic, although the first-contact bit was obviously highly speculative. I often end up issuing complex commands over ssh; these commands involve piping to awk or perl one-lines, and as a result contain single quotes and $'s.  I have neither been able to figure out a hard and fast rule to do the quoting properly, nor found a good reference for it.  For instance, consider the following:  # what I'd run locally: CMD='pgrep -fl java | grep -i datanode | awk '{print $1}' # this works with ssh $host "$CMD": CMD='pgrep -fl java | grep -i datanode | awk '"'"'{print $1}'"'"   (Note the extra quotes in the awk statement.)  But how do I get this to work with, e.g. ssh $host "sudo su user -c '$CMD'"?  Is there a general recipe for managing quotes in such scenarios?.. Why does jQuery or a DOM method such as getElementById not find the element? Do greenhouse gasses make the world habitable? An ageing gent says he does not accept this statement:  It's a fact that greenhouse gases, predominantly water vapour, keep the Earth  from being hostile and cold; that CO2 albeit in trace quantities is also a  greenhouse gas and therefore helps keep the planet warm...   I know no more about why he rejects this statement - maybe it is that water vapour alone would do the job. The gent in question has a first class degree and a doctorate in physics.    Is there a debate within the physics community over this or am I misunderstanding? How to make git mark a deleted and a new file as a file move? Add days to JavaScript Date How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay? Bending of light - photon's inertia instead of mass What does Use an Object cover? How can I set the processor affinity of a process on Linux? How can I set the processor affinity of a process on Linux? Increment value based on grouped field Time Dilation When In Orbit Is there an official Marvel Cinematic Universe viewing order? I'm planning on re-watching the currently-released 5 Marvel films prior to seeing The Avengers.  Have Marvel released any sort of official viewing order?  Captain America: The First Avenger seems like the hardest one for me to place in order with the rest.  It takes place prior to the other films, but has the greatest number of references to the other films.  So should it be watched first, or last?  The rest of them are relatively clear, as they're chronological in the order they're released, with the possible exception of The Incredible Hulk and Iron Man 2 happening at the same time. Is Ubuntu compatible with my hardware? I am a bit financially strapped and received a Gateway GT5056 tower. The tower has an AMD dual core 64-bit processor in it. Will Ubuntu 12.04 run on this machine? I will not have any other application other than LibreOffice installed. jQuery Datepicker with text input that doesn't allow user input How do I use the jQuery Datepicker with a textbox input:  $("#my_txtbox").datepicker({   // options });   that doesn't allow the user to input random text in the textbox. I want the Datepicker to pop up when the textbox gains focus or the user clicks on it, but I want the textbox to ignore any user input using the keyboard (copy &amp; paste, or any other). I want to fill the textbox exclusively from the Datepicker calendar.  Is this possible?  jQuery 1.2.6 Datepicker 1.5.2 Find the equation of the plane passing through a point and a vector orthogonal I have come across this question that I need a tip for.     Find the equation (general form) of the plane passing through the point $P(3,1,6)$ that is orthogonal to the vector $v=(1,7,-2)$.   I would be able to do this if it said "parallel to the vector"  I would set the equation up as $(x,y,x) = (3,1,6) + t(1,7,-2)$ and go from there.  I don't get where I can get an orthogonal vector. Normally when I am finding an orthogonal vector I have two other vectors and do the cross product to find it.  I am thinking somehow I have to get three points on the plane, but I'm not sure how to go about doing that.  Any pointers?  thanks in advance.