Hot Network Questions favicons are completely shuffled around
Incorrect icons on hot network questions
Difference between static class and singleton pattern? What real (i.e. practical) difference exists between a static class and a singleton pattern?  Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference? Prove $\sum\limits_{i=0}^n\binom{i+k-1}{k-1}=\binom{n+k}{k}$ (a.k.a. Hockey-Stick Identity) Let $n$ be a nonnegative integer, and $k$ a positive integer. Could someone explain to me why the identity $$ \sum_{i=0}^n\binom{i+k-1}{k-1}=\binom{n+k}{k} $$ holds? I define a shell keybinding in my ~/.bashrc like so:  bind -x '"\e\C-w":"/usr/bin/reset"'   This does make Ctrl-Alt-w launch the reset executable. However, it leaves the terminal in a state that resembles the one you get into by pressing Ctrl-v. So, for example, if immediately after resetting in this way I press Ctrl-p, instead of invoking the action of that shortcut (repeat previous command) I get ^P printed.  Any idea what's causing this problem and how to fix it?  EDIT: I am attaching a Python program that reproduces the messed-up terminal state I am trying to fix with the reset. I encounter this condition very often while debugging multi-threaded applications:  import pdb, thread, time  def interrupt():     time.sleep(2)     pdb.set_trace()  thread.start_new_thread(interrupt, ()) raw_input('? ')   To reproduce the messed-up state, just run the code above, and press Enter when you see the debugger invoked (it will print a bunch of text, ending with pdb.set_trace(), about two seconds after you run the program and the initial prompt appears). How can I use a command to delete all files in Downloads whose dates added are greater than 1 year? I am using a Mac. How can I use a command to delete all files in ~/Downloads whose dates added are greater than 1 year? I wish to have long and short forms of command line options invoked using my shell script.  I know that getopts can be used, but like in Perl, I have not been able to do the same with shell.  Any ideas on how this can be done, so that I can use options like:  ./shell.sh --copyfile abc.pl /tmp/ ./shell.sh -c abc.pl /tmp/   In the above, both the commands mean the same thing to my shell, but using getopts, I have not been able to implement these? How to add custom objects to the "add object" menu? modular arithmetic, solving $ax + b \equiv c \pmod d$? For example $151x - 294\equiv 44\pmod 7 $. How would I go about solving that?  The answer says to simplify it into the $ax\equiv b\pmod c $ form first, but I have no clue on how to get rid of the $294$... help? Beamer Bibliography Icon I want to list my references in a beamer presentation using thebibliography environment, with the nice little    book icon (\beamertemplatebookbibitems) and  article icon (\beamertemplatearticlebibitems)   in front of each source.  Is there an icon for websites too? something like \beamertemplatewebsitebibitems? If not, is there a way to implement this easily ? This is a question that has received various answers. This questions seems simple, but it proves to be rather tricky.  So :  We flip a coin (H-T) independently $10$ times. Let's for the moment not care about whether it is fair or not.   How many $3$-head sequences are there?  Solution:  Some say that the answer is $\displaystyle\frac{10!}{7!3!}$, but this is the number of ways  by which $3$ heads can be arranged in $10$ positions. This answer , however, does not say anything about the remaining $7$ positions.   Each of these seven positions can be H or T. The total number of $7$-element sequences is $1\cdot1\cdot1\cdot2^7=2^7$. Then we have to multiply this by $\displaystyle\frac{10!}{7!3!}$ as the three heads can be anywhere. But I have found that this is not the correct answer. The correct is just $\displaystyle\frac{10!}{7!3!}$. So why not multiply by $2^7$? How does one write on the outside of a circle?  I am looking for sample files/packages which imitate a magazine lay-out. Specifically a page with two columns having a circular picture between the two columns.    Example of the desired layout, created using Word: Possible orders of permutations of $11$ symbols What are the different widely used RAID levels and when should I consider them? This is a  about RAID levels.    What are:   the RAID levels typically used (including the RAID-Z family)?  deployments are they commonly found in? benefits and pitfalls of each? iPhone asks 'Trust This Computer' again (I am on macOS 10.14.6 and iOS 12.4)   I am certain that I have trusted my Mac before. Without the latter trust, I can also access the phone in iTunes.   I have tried reset "Location and Privacy" on my phone. Then   When connecting the iPhone with iTunes running, it asks for the trust and I trust it.  Reboot my Mac and the phone asks for another trust.   Is there some known malware mimics system behavior and steal data from an iPhone?  (I do have installed some pir*ted software recently. That's my fault.) Disable Narrator shortcut key in Windows I've install Windows 8 on a BootCamp macbook air The problem is that the command key located differently from the winkey in a normal keyboard, therefor, I keep clicking Winkey+Enter which starts the narrator (which is really annoying!)  Is there a way to disable this shortcut? Why has my Samsung Galaxy S2 become a data hog? Dual boot with windows 7! I'm using windows 7 right now. I want to install Ubuntu with dual boot. Is is safe? And does the process go safely? It is an usual practice that any quantum field theory starts with a suitable Lagrangian density. It has been proved enormously successful. I understand, it automatically ensures valuable symmetries of physics to be preserved. But nevertheless the question about the generality of this approach keeps coming to my mind. My question is how one can be sure that this approach has to be always right and fruitful. Isn't it possible, at least from the mathematical point of view that a future theory of physics does not subscribe to this approach? How do I change my username? I need help with this:  If a is an element of $\mathbb Z_n$ and $\gcd(a,n) &gt; 1$ , then a is not invertible.   First you show that if $a$ is an element of $\mathbb Z_n$ and $\gcd(a,n)&gt;1$, then there  is an element $b$ of $\mathbb Z_n$ and ($b$ is not equal to the zero element) from which $ab = 0$.   The second part I cant get. i.e. show if $b$ is not the zero element  and $ab=0$ then $a$ is not invertible. I'm considering the ring $\mathbb{Z}[\sqrt{-n}]$, where $n\ge 3$ and square free. I want to see why it's not a UFD.   I defined a norm for the ring by $|a+b\sqrt{-n}|=a^2+nb^2$. Using this I was able to show that $2$, $\sqrt{-n}$ and $1+\sqrt{-n}$ are all irreducible. Is there someway to conclude that $\mathbb{Z}[\sqrt{-n}]$ is not a UFD based on this? Thanks.