I just learned the hard way that negative lookbehinds are not supported in firefox. Just deployed to production and all seemed fine. Once our firefox users started hitting it, they got nothing.  Is there a pollyfill or some alternative to this regex?  "Item 1, Item2^, Item2a, Item3".split(/(?&lt;!\^),/)   I am trying to split a string into arrays on a commas but not on ^,  "Item 1, Item2^, Item2a, Item3"  Should end up as   [ "Item 1", "Item2^, Item2a", "Item3" ]
Is there a way to achieve the equivalent of a  in javascript regular expressions?  I need to match a string that does not start with a specific set of characters.  It seems I am unable to find a regex that does this without failing if the matched part is found at the beginning of the string.  Negative lookbehinds seem to be the only answer, but javascript doesn't have one.  EDIT: This is the regex that I would like to work, but it doesn't:  (?&lt;!([abcdefg]))m  So it would match the 'm' in 'jim' or 'm', but not 'jam'
Can you raise $\pi$ to a real power to make it rational? There are several things that I don't understand. I know that zero is a real number, but I'm confused on the how and why aspects. What defines a real number, compared to a number that's considered non-real? For what reason is zero real, and how is it that a value such as infinity isn't when zero is?  Also, what purpose does zero even have? It's obvious that it's used as a place holder, but what value does it have alone? What makes it any different from other numbers? I realize that it is typically interchanged with nothing, but that would technically mean that zero is nothing—and that's not true. People have told me already so many times that zero does not necessarily mean nothing, and I figured it out a long while ago anyway. So, what I want to know is the actual value that can be associated with zero.  However, my question brings up another topic that has been argued and disputed about and disagreed on for years. Zero divided by zero, or 0/0. There are a lot of varying answers about this, but what's been constant throughout everything is that people claim 0/0 is not a real number. So, if I may ask, why is it that zero is considered a real number, and not 0/0? And why is it considered non-real in the first place? True, there is no defined value, but the expression is anything but meaningless; if it was, then there wouldn't be so many people trying to understand it. I guess what I'm trying to figure out is the reason behind the expression's classification as non-real—especially when the sole number of zero is real, despite not having an evident value.  This covers a few different things, so I was uncertain about what to make the title of these questions. I apologize for that. If anyone can answer, though, I'd be extremely grateful! Degree of minimum polynomial at most $n$ without Cayley-Hamilton? How can I make something that looks like this?  --------   Text   ---------  where the horizontal rules extend to the margin on either side? Is there a terminal command that will log you out of your current desktop session and take you back to the login screen? 1.In classical mechanics, using Newton's laws, the ellipticity of orbits is derived. It is also said that the center of mass is at one of the foci.   2.Each body will orbit the center of the mass of the system.  My question is : Are the assumptions in 1 and 2 correct?   Follow up question : Assuming the distance from the centre of the mass to each body remains the same, do we have two bodies orbiting the centre of the mass of the system in an elliptical or circular orbit?   Finally : With elliptical orbits, if the heavier mass is supposed to be in one of the foci, if there is any significance to second focus, what is it? Is it a Lagrange point by any chance or does it have some other mathematical property? Switch statement fall-through...should it be allowed? For as long as I can remember I have avoided using switch statement fall-through. Actually, I can't remember it ever entering my consciousness as a possible way to do things as it was drilled into my head early on that it was nothing more than a bug in the switch statement. However, today I ran across some code that uses it by design, which got me immediately wondering what everyone in the community thinks about switch statement fall-through. Is it something that a programming language should explicitly not allow (like C# does, though it supplies a workaround) or is it a feature of any language that is powerful enough to leave in the programmer's hands? Edit: I wasn't specific enough to what I meant by fall-through. I use this type a lot:     switch(m_loadAnimSubCt){         case 0:         case 1:             // Do something             break;         case 2:         case 3:         case 4:             // Do something             break;    }  However, I'm concerned about something like this.    switch(m_loadAnimSubCt){         case 0:         case 1:             // Do something, but fall through to the other cases             // after doing it.          case 2:         case 3:         case 4:             // Do something else.             break;    }  This way whenever the case is 0, 1 it will do everything in the switch statement. I've seen this by design and I just don't know if I agree that switch statements should be used this way. I think the first code example is very useful and safe. The second seems kind of dangerous. Will I get OTA updates after installing Android L Developer preview? Multiplication in Permutation Groups Written in Cyclic Notation Why is Tony Stark in the Iron Man suit unaffected by G-forces, inertia and blunt force trauma? Tony's suit is an engineering marvel, and they explain many facets of the technology to help give legitimacy to the special powers, abilities and weapons it has.  I never read the Iron Man comics, but in the movie they really don't have a technological explanation for how he miraculously seems to be unaffected by crushing G-forces of sudden acceleration, the inertia of sudden stops and hair-pin turns, and especially the blunt force trauma from getting smashed in the face with Thor's hammer.  Certainly it appears the suit takes punishment, but Tony always remains unscatched, never a collapsed lung, broken bone or even a bloody nose.  In my infantile understanding of theoretical physics, the same technology that would be used to counter G-forces and sudden blunt force trauma to the body inside would be the very same technology used for  which in my honest opinion would be a much more stunning technological achievement than his heralded Arc Reactor.  Was their ever an explanation proferred for this and if so was it indeed attributed to Anti-Gravity? I stumbled across this paragraph in a paper:     Hence, user b cannot decrypt C   directly. But using e and d , user b   can quickly factor N.   How is  it possible to speedup the prime factorization when knowing e (public key) and d (private key)?  For clarification:  RSA provides us with these equations:  $n = pq$   $\phi = (p-1)(q-1)$   $gcd(e, \phi) = 1$   $de = 1\pmod{\phi}$   In order to determine $p$ and $q$ an attacker has to factor n which is not feasible. However the paper stated that it is easy to reconstruct $p$ and $q$ when a person knows both (his) private and public keys. Ordered N-Tuples as Cartesian Products of Indexed Families In Introduction to Topology, Mendelson defines the Cartesian Product of an Indexed Family as follows:     DEFINITION  Let $\{X_\alpha\}_{\alpha \in I}$ be an indexed family of sets. The product  of the sets $\{X_\alpha\}_{\alpha \in I}$,    written  $\prod_{x\in I}X_\alpha$ consists of all functions $x$ with domain the indexing set $I$ having the property that for each $\alpha \in I$, $x(\alpha)\in X_\alpha$.    Halmos, in Naive Set Theory, makes the following observation about this sort of product:     Ordered triples, ordered quadruples, etc., may be defined as families whose index sets are unordered triples, quadruples, etc.   However, it is not immediately apparent to me why this is true. It makes sense if we understand the prior assertions in Halmos that $\prod_{i \in I} X_i = X_i$ and that $\prod_{i \in I} X_i = X_a \times X_b$ when $I = \{a, b\}$, but these already pose difficulty for me.  Let $I = \{0, 1\}$, let $X_0 = \{A, B\}$, and let $X_1 = \{C, D\}$. Then by Mendelson's (and Halmos's) definitions, it would seem to me that . . .  $$\prod_{i \in I} X_ i = \{\{(0, A), (1, C)\}, \{(0, A), (1, D)\}, \{(0, B), (1, C)\}, \{(0, B), (1, D)\}\}$$  This would appear to me to be the set of all functions matching the definition given, but it is not equal to $X_0 \times X_1$. Moreover, extending this to a case where the index set $I$ is a triple, we would not end up with ordered triples, but with each subset of the product containing three ordered pairs.  When Halmos posits the equalities he does, the idea seems easy to grasp, but the peculiar wording of Mendelson's definition suggests something different to me. Possible Duplicate:          I have been downvoted for few answers of mine and the person who downvoted me did not leave any comments or reasons to say why I was downvoted. In such cases, how can I find out who has downvoted me and the reason for downvoting? I'm going through MSIL and noticing there are a lot of  instructions in the MSIL.  The MSDN article says they take no action and are used to fill space if the opcode is patched. They're used a lot more in debug builds than release builds.  I know that these kinds of statements are used in assembly languages to align later instructions, but why are MSIL nops needed in MSIL?  (Editor's note: the accepted answer is about machine-code NOPs, not MSIL/CIL NOPs which the question originally asked about.) How do I tell if a regular file does not exist in Bash? How do I limit the number of rows returned by an Oracle query after ordering? Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this: select *  from sometable order by name limit 20,10  to get the 21st to the 30th rows (skip the first 20, give the next 10). The rows are selected after the order by, so it really starts on the 20th name alphabetically. In Oracle, the only thing people mention is the rownum pseudo-column, but it is evaluated before order by, which means this: select *  from sometable where rownum &lt;= 10 order by name  will return a random set of ten rows ordered by name, which is not usually what I want. It also doesn't allow for specifying an offset. has a duration of instantaneous. However, it also produces an ongoing effect, and the spell's text describes when this effect ends (emphasis added):  At the end of every 30 days, the creature can repeat its saving throw against this spell. If it succeeds on its saving throw, the spell ends. The spell can also be ended by greater restoration, heal, or wish.  The fact that the text refers to the spell ending, as opposed to just &quot;the effect&quot; or something similar, implies that it produces an ongoing magical spell effect, which can be dispelled using Dispel Magic. However, it has also been argued that any effects that persist beyond a spell's stated duration cannot be considered magical (with the classic example being fires started by a Fireball spell). Applying this rule to Feeblemind, it shouldn't have any ongoing effects since its duration is instantaneous. So, which is it? Are the ongoing effects of Feeblemind considered magical and therefore susceptible to effects like Dispel Magic, or are are they simply the lingering result of the initial shattering of the creature's intellect and personality? (Note that the final sentence quoted above does not by itself rule out Dispel Magic and other ways of ending the spell. It gives additional options for ending the spell, but it doesn't say these are the only options.) I'm passing through Canada, on my way to somewhere else. I'm staying only a short time.   Is there a website, or some other way of find out out if I need a visa? How long can eggs be unrefrigerated before becoming unsafe to eat? How can I program a simple chat bot AI?