Pigeonhole proof of the existence of two numbers with given sum
Using the Pigeonhole Principle to show that $2$ of any $n+1$ numbers from $\{1,2,\ldots,2n\}$ sum to $2n+1$
So, I got some laptop charger from my neighbor and I was thinking about to do something with it. Then one day I feel tiny shock from the output of the charger. I thought ac to dc filtering mechanism maybe shorted. Then I had tested other remaining charger to see if there was any AC current going on. And they all do the same. Is it normal to have flow some AC through DC ? Can I do something about it ? make it safer for work ? It does not feel like comfortable. Deleted object would be re-saved by cascade (remove deleted object from associations) What is the purpose of wrapping whole Javascript files in anonymous functions like “(function(){ … })()”? Ending a two handed game It’s my turn. It is a two handed game of Canasta. I have three cards left in my hand. There is only one card left in the Stock pile. Can I pick up the one card and play my hand? As part of the definition of a cone spell in the handbook:     A cone's point of origin is not included in the cone's area of effect, unless you decide otherwise.   As an example, what would either case be for a casting of Burning Hands?   Could the caster include themselves? or does this mean that they can exclude the first square of the cone? When is double-quoting necessary? The old advice used to be to double-quote any expression involving a $VARIABLE, at least if one wanted it to be interpreted by the shell as one single item, otherwise, any spaces in the content of $VARIABLE would throw off the shell.  I understand, however, that in more recent versions of shells, double-quoting is no longer always needed (at least for the purpose described above).  For instance, in bash:  % FOO='bar baz' % [ $FOO = 'bar baz' ] &amp;&amp; echo OK bash: [: too many arguments % [[ $FOO = 'bar baz' ]] &amp;&amp; echo OK OK % touch 'bar baz' % ls $FOO ls: cannot access bar: No such file or directory ls: cannot access baz: No such file or directory   In zsh, on the other hand, the same three commands succeed.  Therefore, based on this experiment, it seems that, in bash, one can omit the double quotes inside [[ ... ]], but not inside [ ... ] nor in command-line arguments, whereas, in zsh, the double quotes may be omitted in all these cases.  But inferring general rules from anecdotal examples like the above is a chancy proposition.  It would be nice to see a summary of when double-quoting is necessary.  I'm primarily interested in zsh, bash, and /bin/sh. Where can I find a reference to the format of the comment field (field 5) of the /etc/passwd file? In the /etc/passwd file on my system, the "comment" field, field 5, is inconsistent in its contents.  I thought that I could extract it to get the full name of the user.  fullname=`awk -F: '$1 == name {print $5}' name=$LOGNAME /etc/passwd`   However this returns with $fullname containing a name with 0, 3, or 4 commas following.  Exploring the man page (man 5 passwd) provides no details of this field other than describing it as "user name or comment field."  Perhaps there is additional information that is stored along with the user name? Solving "mv: Argument list too long"? Fastest way to remove non-numeric characters from a VARCHAR in SQL Server I'm writing an import utility that is using phone numbers as a unique key within the import.  I need to check that the phone number does not already exist in my DB. The problem is that   phone numbers in the DB could have things like dashes and parenthesis and possibly other things. I wrote a function to remove these things, the problem is that it is slow and with thousands of records in my DB and thousands of records to import at once, this process can be unacceptably slow. I've already made the phone number column an index.  I tried using the script from this post:   But that didn't speed it up any.  Is there a faster way to remove non-numeric characters? Something that can perform well when 10,000 to 100,000 records have to be compared.  Whatever is done needs to perform fast.  Update Given what people responded with, I think I'm going to have to clean the fields before I run the import utility.   To answer the question of what I'm writing the import utility in, it is a C# app. I'm comparing BIGINT to BIGINT now, with no need to alter DB data and I'm still taking a performance hit with a very small set of data (about 2000 records).   Could comparing BIGINT to BIGINT be slowing things down?  I've optimized the code side of my app as much as I can (removed regexes, removed unneccessary DB calls). Although I can't isolate SQL as the source of the problem anymore, I still feel like it is. Let $b>0.$ Evaluate $\lim_{n \to \infty} \int^{b}_{0} \frac{\sin nx}{nx}dx$ I'm stumped at the last part of this problem. Could anyone advise, please? Thank you.  Here is  my  proof.   Define  $f: \mathbb{R} \to \mathbb{R}$ by $$ f(x) = \left\{\begin{aligned} &amp;\frac{\sin nx}{nx}&amp;&amp;, x \neq0 \\ &amp;1 &amp;&amp;, x=0 \end{aligned} \right.$$   Hence, $$f(x) = \sum^{\infty}_{k=0}(-1)^k\frac{(nx)^{2k}}{(2k+1)!} , \forall x \in \mathbb{R} \mbox{ and } f \in {\mathscr R[0,b]}.$$  $$\int^{b}_{0} \frac{\sin nx}{nx}dx = \int^{b}_{0}f(x)dx=\sum^{\infty}_{k=0}\int^{b}_{0}(-1)^k\frac{(nx)^{2k}}{(2k+1)!}dx= \sum^{\infty}_{n=0}(-1)^k\frac{(n)^{2k}b^{2k+1}}{(2k+1)(2k+1)!}$$  $$\lim_{n \to \infty} \sum^{\infty}_{k=0}(-1)^k\frac{(n)^{2k}b^{2k+1}}{(2k+1)(2k+1)!}=  ?$$ Meta-analysis of means and medians in R? I've been asked to review the literature for all studies that estimate the mean and median Blood Lead Level (BLL) in a certain country, and then perform a meta-analysis to come up with one overall value for the mean and median level.   Is such a thing typically done? I'm not interested in any "effect size," just a univariate measure.   I'd like to create a forest plot and do some of the standard tests of heterogeneity across studies. Is there a package and function in R that will allow me to do a meta-analysis of mean and median BLLs?  Just to clarify, this would be a separate meta-analysis for means, and a separate meta-analysis for medians. I have these two CREATE TABLE statements:   CREATE TABLE GUEST (   id int(15) not null auto_increment PRIMARY KEY,   GuestName char(25) not null );  CREATE TABLE PAYMENT (   id int(15) not null auto_increment   Foreign Key(id) references GUEST(id),   BillNr int(15) not null );   What is the problem in the second statement? It did not create a new table. Proof by induction that $2 + 4 + 6 + \cdots + 2n = n(n+1)$ Site specific magic comment links I would like site specific magic links. Currently you can write [so] in a comment, and it links like this: . I would like to be able to have site specific ones, so for example: English Language &amp; Usage  [dictionary] would go to http://dictionary.com and shows as   Ubuntu  [launchpad] would go to https://launchpad.net/ubuntu and shows as   [launchpad#bugnum] would go to https://bugs.launchpad.net/bugs/bugnum and shows as   [forums] would go to http://ubuntuforums.org/ and sows as   [discourse] would go to http://discourse.ubuntu.com and shows as   [paste] or [pastebinit] would go to http://paste.ubuntu.com and shows as   [install-d] would go to http://ubuntu.com/download/desktop/install-ubuntu-desktop and shows as   [install-s] would go to http://ubuntu.com/download/server/install-ubuntu-server and shows as   ppa:peterlevi/ppa would go to https://launchpad.net/~peterlevi and shows as   There is    Ask Different  [applesup] would go to http://www.apple.com/support and shows as   Christianity  [bible] would go to http://biblegateway.com and shows as   Currently, they are all the same, for all sites. I would like devs (mods maybe) to be able to add them on a per site basis. This is just a selection of examples. People can comment or answer with ones they would like and I'll edit them into this question. I asked this because  on Ask Ubuntu Meta wasn't possible right now - because it wasn't a feature.  [The devs] said right now it isn't possible because magic links are network wide, and they weren't sure it was high enough priority to really get done anytime soon, but if you want you can post a feature-request on Meta Stack Exchange requesting site specific magic links and see if you can garner more support for the feature and maybe get a dev to champion it.  So that's what I've done! Automatically convert quotations in the form of "abc" to become ``abc" Filling a conical tank I have been working on this problem for about 2 hours and I can't seem to get it, here is exactly what the question reads. "Water is poured into the top of a conical tank at the constant rate of 1 cubic inch per second and flows out of an opening at the3 bottom at a rate of .5 cubic inches per second. The tank has a height of 4 inches, and a radius of 2 inches at the top. How fast is the water level changing when the water is 2 inches high?" How can I get id,class or name attr an element with jquery Is there a LaTeX/TeX preprocessor/inliner that replaces only selected macros with their definitions? How to only substitute lines that match several patterns in sed? $ echo -e 'CH12\nCH23au' | sed '/^CH/s=^=&lt;b&gt;=' &lt;b&gt;CH12 &lt;b&gt;CH23au   I know I can match lines starting with CH by ^CH but how can I match multiple patterns?   Example:  Input:  CH12 CH23au   Output:  CH12 &lt;b&gt;CH23au   How to only put &lt;b&gt; where there is ^CH and au in the line? What makes the inside of a shape the inside?