I used String.split(a) method. It breaks the string into some parts when a ooccurs as substring. But what I want is I will give a list of delimitters and string will be broken into pieces when any one of those delimitters occur. How would I do this?
How do I split a string with multiple separators in JavaScript? I'm trying to split on both commas and spaces, but AFAIK JavaScript's split() function only supports one separator.
When I boot in GRUB2 and press c, I have access to GRUB shell.  How to change the keyboard layout (language) of this GRUB shell?  Note that I'm booting an Ubuntu VM inside Virtualbox. SQL Coalesce in WHERE clause I'm trying to implement optional parameters in a stored procedure that I have but I am running into a problem. Here's a simplified query to illustrate the issue:  SET ANSI_NULLS OFF  DECLARE @MiddleName VARCHAR(20); SET @MiddleName = NULL;  SELECT * FROM [Customer] WHERE [LastName] = 'Torres' AND [MiddleName] = COALESCE(@MiddleName, [MiddleName])   When I run this query I need to get one row back because one Torres has NULL in the [MiddleName] column. But the query returns zero rows. Using IFNULL() produces the same result. From researching COALESCE, I was under the impression that NULL would be returned if all expressions are NULL. As I am not a SQL expert I assume that I am missing something, but what is it.....  Thanks in advance for any help. I want to disable the internal Microphone on my laptop and the internal Webcam completely that they're no longer selectable, and no longer available?  I will only use my external Webcam, and my external (USB) headset.  The internal audio should still be available for playback. EntityFieldQuery display pager How do I display pager using EntityFieldQuery for fetch results? I can't find complete example.  I am doing simmilar to:   But I miss part to output simple pagination links (1,2,3... for every next page). I am a British national living in Spain and my passport is either lost or stolen. I noticed this two days ago when I was intending to take a trip to Salzburg. As it happens, I managed to travel using my UK Driver's Licence. I think a severe mistake was made, as was pointed out to me in Austria, but as they were Schengen Countries, apparently all that is needed is a proof of identity, not a 'travel document'.  My question, therefore, is this. I have business trips over the next three weeks taking me from Spain to Germany, Czech Republic, Austria, and Italy, then back to Germany, and then to the UK. If I obtain an Emergency Passport from the Consulate here in Barcelona, would this be valid as an identity document within Schengen, before I eventually 'cash it in', so to speak, as a travel document when I make my trip from Germany to the UK?  I am hoping so, as I don't fancy my chances of getting back to the UK in time to secure an appointment for a fast-track passport. I am going to call the consulate tomorrow, but would appreciate any advice or prior experience. nginx config fails with SSL key/pem (unique case) I am trying to install SSL on my nginx reverse proxy with certified ssl keys but i get this message when i try to restart server:  Restarting nginx: [emerg]: SSL_CTX_use_PrivateKey_file("/etc/nginx/conf.d/cert.key") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib) configuration file /etc/nginx/nginx.conf test failed   everyfiles are root:root with 600 permissions i've tested the certificats and they are validated with this website:   there are no trailing weird caracters in my keys, and has 64 caracter per line  here is my config file  server {     listen   443;     server_name     my.domain.com;     ssl on;     ssl_certificate      conf.d/cert.pem;     ssl_certificate_key  conf.d/cert.key;      location / {          proxy_pass         http://upstream1;          proxy_redirect     off;          proxy_buffering    off;          proxy_set_header        Host            $host;          proxy_set_header        X-Real-IP       $remote_addr;          proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;     }   }  Any ideas? Thank you TinyMCE disable escaping Does the rank-nullity theorem hold for infinite dimensional $V$? The rank nullity theorem states that for vector spaces $V$ and $W$ with $V$ finite dimensional, and $T: V \to W$ a linear map,  $$\dim V = \dim \ker T + \dim \operatorname{im} T.$$  Does this hold for infinite dimensional $V$?  According to , the statement is false.  But according to , page 4, the statement is still true.  I'm thoroughly confused. Compute the integral $\int\frac{dx}{(x^2-x+1)\sqrt{x^2+x+1}}$ If $p,q,r$ are all primes,and $p|qr-1$,$q|pr-1$ and $r|pq-1$,find all possible values of $pqr$. Advantages of ROC curves What is the advantages of the ROC curves?  For example I am classifying some images which is a binary classification problem. I extracted about 500 features and applied a features selection algorithm to select a set of features then I applied SVM for classification. In this case how can I get a ROC curve? Should I change the threshold values of my feature selection algorithm and get sensitivty and specificity of the output to draw a ROC curve?  In my case what is the purpose of creating a ROC curve? What is the difference in this specific breadboard wiring? Should I vote to close a duplicate question, even though it's much newer, and has more up to date answers? $f(f(x)f(y))+f(x+y)=f(xy)$ Find all functions $f\colon \mathbb R\rightarrow \mathbb R$ such that for all reals $x$ and $y$:   $$f(f(x)f(y))+f(x+y)=f(xy).$$   It was six hours ago in IMO 2017 (problem 2).  I tried  the standard way: $x=0$, $x=y$, $x=1$,etc. but without any success.   Let $f(0)=a$. Hence, for all $x\in\mathbb R$ we have $f(a(f(x))+f(x)=a$. What is the rest?   Also we have $(x-1)(y-1)-1+x+y-1=xy-1$ and  $1-(1-x)(1-y)+1-x-y=1-xy$. Find all continuous functions $f$ satisfying   $$\int_0^xf=(f(x))^2+C$$ for some constant $C \neq 0$, assuming that $f$ has at most one $0$.  I have a question about the solution to this problem. It says that   Clearly $f^2$ is differentiable everywhere, its derivative at $x$ is $f(x)$ (I'm assuming that this is because the left hand side is differentiable, the right hand side must be differentiable as well). So $f$ is differentiable at $x$ whenever $f(x) \neq 0$, and  $$f(x)=2f(x)f'(x),$$ so $f'(x) = \frac{1}{2}$ at such points. Thus, $f= \frac{1}{2}x+b$ for some $b$ on any interval where it is non-zero; if $f$ has a zero, this gives two possible solutions, with two possible values of $b$, but since $f$ is assumed continuous, they must be the same. So we need $$\int_0^x(\frac{1}{2}t+b)dt=(\frac{1}{2}x+b)^2+C$$  so we must have $b=\sqrt{-C}$ or $-\sqrt{-C}$, leading to two solutions for $C \lt 0$.  I don't understand the bolded statements. First, how does the differentiability of $f^2$ guarantee that $f$ is differentiable, and why only at $x$ where $f(x) \neq 0$?  Next, why are there two possible solutions if $f$ has a zero, but since $f$ is continuous they must be the same?  Finally, does the last statement mean that if $C \gt 0$, then there is no solution, since we're restricted to real numbers here?  I would appreciate it if anyone answers my questions. Why do paintbrush loops get thicker at the top in Illustrator? When I do swirls in Illustrator with the paintbrush tool I often get this result (see image).    The loops doesn't get perfectly rounded, instead sometimes some of them gets thicker at the top of the loop... It tends to happen more if I paint small with low brush sizes. Why is this happening? How to remove spikes from switching transistor? I don't know what I've done, but all of a sudden I am unable to compile any document which uses the geometry package. Minimal (non)-working example:     \documentclass[11pt]{article}      \usepackage{geometry}  \begin{document} test \end{document}   doesn't produce any output, and this is what I see in my error summary screen in TeXnicCenter:    The red arrow points to what seems to be the problem: something about the bundle "oberdiek" and its package "ifvtex" is causing pdflatex.exe (which, while I don't really know what it does, sounds pretty important) to "not be initialized". I , and it's relevance here is a mystery to me.  I've confirmed that all of my files without the geometry package compile just fine; however, that doesn't mean that the problem is with the geometry package - what seems more likely is that there is some hidden cause of the error, and geometry happens to be one way to induce that. By the way, I've tried compiling a document which includes the ifpdf and ifvtex packages separately, and they do just fine; it's only when I include the geometry package (which for some reason requires these ifpdf and ifvtex packages) that the error occurs.  I've tried the only things I can think of:   going into MiKTeX Package Manager (by the way I am using 2.8), and removing + reinstalling both geometry and oberdiek refreshing the file name database ("FNDB") deleting all automatically generated files, as well as simply starting over in a new document   So I'm stuck now. I've considered attempting to just get rid of all traces of MiKTeX and TeXnicCenter from my computer and starting over, but that seems a bit excessive - after all, the geometry package was working for me . I honestly am not sure what I did to cause this; I've spent today trying to make a better template file for myself, and so I've been trying out new packages, but if I'm not loading these new packages there shouldn't be any conflicts, right?   Actually, I've just now thought of something that I think I did between the last time it worked and now, so is a possible candidate for the cause: I had to install some package manually, as it wasn't available on MiKTeX, and so I created a folder and pointed MiKTeX to it (i.e. the second option ). The package didn't do what I wanted, so I deleted the folder and removed it from the list of folders I told MiKTeX to check. Perhaps it's still trying to reach it for some reason? Sphere intersection Stuck I have two spheres that are bounded by spheres for collision detection. I do not want them to intersect. My intersection works. But it gets stuck. Once the function returns true, I cannot get it out. I tried  collideBool = ObjectOne.Intersect(ObjectTwo);  if(collide == true) {     leftright = leftright;     updown = updown; } else { if(GetAsyncKeyState(VK_RIGHT)) leftright -= dt; if(GetAsyncKeyState(VK_LEFT)) leftright += dt; if(GetAsyncKeyState(VK_DOWN)) updown += dt; if(GetAsyncKeyState(VK_UP)) updown -= dt; }  collide = false;   My sphere gets stuck. What is a way around this? How to pivot rows into columns MySQL Been looking to pivot rows (progress_check) into columns check 1, check 2 etc... No sum or totals required, just to display the results hopefully... Can anyone help, Thanks Ad