What is the most reliable way to check if a string is a number or not?   var checkForNumber = (arg) =&gt; {    if (typeof arg === 'number') {      return arg + ' is a number'    } else if (Number(arg)) {      return arg + ' is a number'    }   return 'Not a number';  };   checkForNumber('a')
I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function?
C# Structs: Unassigned local variable? What is the SKU of a motor? I came across an 'N20' motor, and I don't know what that means. As far as I can tell (and please correct me if I'm wrong), N20 is the SKU of the motor. What is the SKU? Allow moderators to refresh a user's network profile Currently, moderators have the ability to reset a user's username and/or profile text, and propagate that to the rest of the network, resetting it everywhere. However, often, the user's stackexchange.com network profile will also need to be reset, and this is currently only possible to do by either the user in question or staff.  Instead of bothering staff every time, moderators should have something available similar to chat, where moderators can change a user's parent site and have access to a "refresh profile" button, which will fetch updated information such as username and avatar from the parent site.  Currently, the only thing that moderators can do on stackexchange.com is to see hidden accounts. It would make sense for moderators to be able to refresh profiles there, like chat, and avoid pinging CMs every time this comes up. What are the convergent sequences in the cofinite topology I consider the co-finite topology on $\mathbb{R}$ that is $$\{G\subset \mathbb{R}, card(\mathbb{R}\setminus G)&lt;+\infty\}\cup \{\emptyset\}$$  What are the convergent sequences in this space .  thank you In what order should you do linear regression diagnostics? Pigeonhole-principle with two choices I am able to solve this sort of problem pretty easily.     An arm wrestler is the champion for a period of 75 hours. The arm   wrestler had at least one match an hour, but no more than 125 total   matches. Show that there is a period of consecutive hours during which   the arm wrestler had exactly 24 matches.   However this homework problem I can't seem to figure out.     Tyler has five weeks to prepare for his driver’s test. His mother   volunteers to ride with him for either 15 minutes or one half hour   every day until the test but not for more than 15 hours in all. Show   that during some period of consecutive days, Tyler and his mother will   drive for exactly 8.75 hours.   If I try doing it the same way as the first problem. I get $70$ pigeons and $95$ pigeon holes. I honestly don't know where to start with this problem. I thought that maybe I could assume that they only drove $.25$ hours on each day and prove that there is a period of consecutive days where they drove for exactly $8.75$ hours. Then I could say that we assume there is one day that they drove for $.5$ hours and work my way up, but I can't seem to get that to work either. $\mathbb Z[i]/ \langle 1+2i \rangle \cong \mathbb Z_5$ Principal component analysis (PCA) is usually explained via an eigen-decomposition of the covariance matrix. However, it can also be performed via singular value decomposition (SVD) of the data matrix $\mathbf X$. How does it work? What is the connection between these two approaches? What is the relationship between SVD and PCA?  Or in other words, how to use SVD of the data matrix to perform dimensionality reduction? Use a vector as an index to a matrix Here is the .  Picture:   It's nothing special but I cant figure out why I get problems rigging this mesh. It would be important and a great Help! Thanks for reading and I know there are a lot of guides answering this question but I tried all and it doesn't seem to work. I'm Australian and have obtained my Canadian working visa. However rather than flying direct to Canada I am meeting an American friend in LA and driving across the border. I have a return flight booked back to Australia from LA in March of next year too. Will the esta visa will be enough to enter the USA because I have my Canadian working visa and plan to travel there? Or will there be a problem because my return flight is booked later then the 90 days allowed on the visa. In the 1960s I read book--an older children's book, I think--which I loved, and still remember, roughly.  I have no idea what the title is or who the author is, and I'm wondering if anyone knows this one:  Scientists had invented a device which they didn't fully understand, and which had puzzling effects.  For example, when a pencil was put into the machine, it disappeared, and then reappeared inside out: The lead was on the outside.  When people went into the machine, they came back dead, having died from fright.  Finally they sent a very open-minded person into the machine.  She was an artist, I think.  She was able to return alive, and described an alternate universe in which geometry was very different.  I distinctly remember that there were supposedly square triangles or four-sided triangles--or was it three-sided squares?  (This is, of course, a literally contradictory claim, but I didn't see the matter as clearly then.)  Thanks! Linear transformation of a binomial random variable? Let $X$ be a binomial random variable with parameters $n$ and $p$. Next, let: $$ Y = aX + b $$ I know that: $$ \mathbb{E}[Y] = \mathbb{E}[aX+b] = a\mathbb{E}[X] + b = anp + b \\ \text{Var}(Y) = \text{Var}(aX+b) = a^2 \text{Var}(X) = a^2np(1-p) $$ But how is $Y$ distributed? A Sequence converges to a limit $L \in \mathbb R$ if, and only if, an $N$-th tail of the sequences converges to $L$ for some $N \in \mathbb N$ "X Department" versus "Department of X" I would like to know whether these phrases "English Department" and "Department of English" have the same meaning. Thanks! How to simulate a rope? I'm trying to simulate a rope (that later might get pulled on the ends*) that interacts with some obstacles. So far I created a plane as the floor and a cube as an obstacle, and activated "collision" in the physics menu for both of them.   *(In the end the goal is simulating a .)  For modelling the rope, I tried using a long cylinder with enough subdivisions, and activate "cloth" in the physics menu. This resulted in the cylinder collapsing like a sleeve of a sweater, but I would like the cross section to remain roughly circular. Is there a way to directly avoid this?   Another approach I tried now was just using a a line made up of vertices and edges (with the idea of later adding modifiers to give it a thickness), but this just fell through all the collision objects as it has no faces. Is there good way to do this? "Which" vs. "what" — what's the difference and when should you use one or the other? How can anything ever fall into a black hole as seen from an outside observer? The event horizon of a black hole is where gravity is such that not even light can escape. This is also the point I understand that according to Einstein time dilation will be infinite for a far-away-observer.  If this is the case how can anything ever fall into a black hole.  In my thought experiment I am in a spaceship with a powerful telescope that can detect light at a wide range of wavelengths.  I have it focused on the black hole and watch as a large rock approaches the event horizon.  Am I correct in saying that from my far-away-position the rock would freeze outside the event horizon and would never pass it? If this is the case how can a black hole ever consume any material, let alone grow to millions of solar masses.  If I was able to train the telescope onto the black hole for millions of years would I still see the rock at the edge of the event horizon?  I am getting ready for the response of the object would slowly fade.  Why would it slowly fade and if it would how long would this fading take?  If it is going to red shift at some point would the red shifting not slow down to a standstill? This question has been bugging me for years!  OK - just an edit based on responses so far.  Again, please keep thinking from an observers point of view.  If observers see objects slowly fade and slowly disappear as they approach the event horizon would that mean that over time the event horizon would be "lumpy" with objects invisible, but not passed through?  We should be able to detect the "lumpiness" should we not through? I am planning to visit the UK on a USA travel document but there’s nowhere I am able to find information about visas: I’m a Zimbabwean but using a USA refugee travel document do I need to apply for a UK visa before I travel or I can they just give them on arrival. Finding Zero Divisors and Units of Rings $\mathbb{Z}_n \times \mathbb{Z}_m$