trying to split on hyphens and underscores and remember groups of numbers produces empty strings and undefined
Remove empty elements from an array in Javascript
How does "proof of effort" make a question better? It seems like many questions by new users are downvoted immediately.  Sometimes there is a comment to the tune of "lacks research", "we're not here to do your homework", or "show us some effort".  Now I wonder, what does it matter how much work someone has done before posting?  If someone can ask a good question in 5 seconds, more power to them.  To illustrate this point, look at how you could "improve" a question to include proof of effort.  You could put in 5 failed code snippets and their in- and output.  This would make for very long questions with a high noise ratio.  Another suggestion is to add "research".  By "research", I suppose most programmers mean "Google".  So this is basically a suggestion to add a list of fruitless Google queries.  That doesn't sound interesting either.  How can "proof of effort" turn a bad question into a good one? When to use reinterpret_cast? I am little confused with the applicability of reinterpret_cast vs static_cast. From what I have read the general rules are to use static cast when the types can be interpreted at compile time hence the word static. This is the cast the C++ compiler uses internally for implicit casts also.  reinterpret_casts are applicable in two scenarios:   convert integer types to pointer types and vice versa  convert one pointer type to another. The general idea I get is this is unportable and should be avoided.     Where I am a little confused is one usage which I need, I am calling C++ from C and the C code needs to hold on to the C++ object so basically it holds a void*. What cast should be used to convert between the void * and the Class type?  I have seen usage of both static_cast and reinterpret_cast? Though from what I have been reading it appears static is better as the cast can happen at compile time? Though it says to use reinterpret_cast to convert from one pointer type to another? Does anyone have a recommendation for a book to use for the self study of real analysis? Several years ago when I completed about half a semester of Real Analysis I, the instructor used "Introduction to Analysis" by Gaughan.   While it's a good book, I'm not sure it's suited for self study by itself.  I know it's a rigorous subject, but I'd like to try and find something that "dumbs down" the material a bit, then between the two books I might be able to make some headway. How to change file extension at runtime in Java View history of commands run in terminal Is there a way to save all my typed terminal commands and view it like history in a log book? I'm trying to connect 32 I²C "root of trust"  devices.    I'm thinking about a good way that does that, I mean what kind of communication should I use? A digital multiplexer that selects a device? but based on what? switching on the VDD source? but that needs reinitialization of the device and that takes time. Given two increasing continuous functions $f,g$ prove that $(b-a) \int^b_a f(x)g(x) dx > \int^b_a f(x) dx \int^b_a g(x) dx$ Given two monotonically increasing continuous functions $f,g$ prove that  $$(b-a) \int^b_a f(x)g(x) dx &gt; \int^b_a f(x) dx \int^b_a g(x) dx,\; b&gt;a$$  what I have tried:  Let $$h(x) = (x-a)\int^x_a f(t)g(t) dt - \int^x_a f(t)dt\int^x_a g(t)dt $$ and trying to figure out that $h'&gt;0$ using MVT to reform $h'(x)$ as   $$h'(x) = (x-a)(-f(x)g(\xi_1) - g(x)f(\xi_2) + f(x)g(x) + f(\xi_3)g(\xi_3))$$ where $\xi_{1,2,3} \in (a,x)$ (That method does not seem to work) How to make a particular app the default viewer / editor for ALL its supported file types at once? How do I add myself into the sudoers group? Possible Duplicate:          I've added myself back into the admin's group I think, by following   But I still can't do commands like:  sudo aptitude update   I get the message  oshirowanen is not in the sudoers file.  This incident will be reported.   How do I add myself into the sudoers group now that I am in the admin group? How to prove two equivalence classes are disjoint? How to unlock gungeoneers I've seen on a wiki that there is a ghost gungeoneer and a robot gungeoneer but it didn't say how to unlock them, so how do I unlock more gungeoneers ? I am trying to follow Blender Guru's beginner tutorial. He went to the Compositor tab and was using it to Denoise an image but when I got there, no nodes show up. Can you guys help? Ideas to improve website loading speed? Are there any ways in which I can improve the loading speed of a website?  I know that Google is really pushing loading speeds and with the popularity of mobile websites it's now imperative that sites load quickly. I'm using Emacs with AUCTeX to do all my LaTeX. When it comes to syntax highlighting it seems that all mathematics is by default just orange. Do you know of a mode or package that adds some more fine grained syntax highlighting? For example all commands (\foo), matching braces, sub- and superscripts, etc. should get a different color. Creating fillable PDFs I'd like to create a LaTeX document that when rendered into PDF, has forms that can be filled out using Adobe Reader or other such programs. Then I'd like to be able to extract the data. I deliberately would like to avoid using Acrobat for all the usual reasons (non-free, need different versions for different platforms etc).   Can this be done ? Is it possible to recover Classical Mechanics from Schrödinger's equation? Let me explain in details. Let $\Psi=\Psi(x,t)$ be the wave function of a particle moving in a unidimensional space. Is there a way of writing $\Psi(x,t)$ so that $|\Psi(x,t)|^2$ represents the probability density of finding a particle in classical mechanics (using a Dirac delta function, perhaps)? How should I detect unnecessary #include files in a large C++ project? I started by Time Series Analysis by Hamilton, but I am lost hopelessly. This book is really too theoretical for me to learn by myself.   Does anybody have a recommendation for a textbook on time series analysis that's suitable for self-study? Raster generalization - buffers in rasters, expand pixels? Is it possible to create buffers for pixels of raster files? Actually I need to expand the pixels classified as 1 (in white in the figure) with a spatial range of 1 or 2 pixels, in order to perform some generalization.  I'm using QGIS, is this possible with gdal or something? How do I figure out the right size font / text for a given read distance?