March 2021 CERN discovery? What would be the properties of the new particle/force from decaying bottom (beauty) quarks?
Breakthrough at the Large Hadron Collider -Leptoquarks skepticism?
Simple animation using C#/Windows Forms I need to knock out a quick animation in C#/Windows Forms for a Halloween display.  Just some 2D shapes moving about on a solid background.  Since this is just a quick one-off project I really don't want to install and learn an entire new set of tools for this.  (DirectX dev kits, Silverlight, Flash, etc..)  I also have to install this on multiple computers so anything beyond the basic .Net framework (2.0) would be a pain in the arse.  For tools I've got VS2k8, 25 years of development experience, a wheelbarrow, holocaust cloak, and about 2 days to knock this out.  I haven't done animation since using assembler on my Atari 130XE (hooray for page flipping and player/missile graphics!)  Advice?  Here's some of the things I'd like to know:   I can draw on any empty widget (like a panel) by fiddling with it's OnPaint handler, right?  That's how I'd draw a custom widget.  Is there a better technique than this? Is there a page-flipping technique for this kind of thing in Windows Forms?  I'm not looking for a high frame rate, just as little flicker/drawing as necessary.   Thanks.  Post Mortem Edit ... "a couple of coding days later"  Well, the project is done.  The links below came in handy although a couple of them were 404.  (I wish SO would allow more than one reply to be marked "correct").  The biggest problem I had to overcome was flickering, and a persistent bug when I tried to draw on the form directly.   Using the OnPaint event for the Form: bad idea.  I never got that to work; lots of mysterious errors (stack overflows, or ArgumentNullExceptions).  I wound up using a panel sized to fill the form and that worked fine. Using the OnPaint method is slow anyway.  Somewhere online I read that building the PaintEventArgs was slow, and they weren't kidding.  Lots of flickering went away when I abandoned this.  Skip the OnPaint/Invalidate() and just paint it yourself.  Setting all of the "double buffering" options on the form still left some flicker that had to be fixed.  (And I found conflicting docs that said "set them on the control" and "set them on the form".  Well controls don't have a .SetStyle() method.)  I haven't tested without them, so they might be doing something (this is the form):      this.SetStyle(ControlStyles.UserPaint, true);     this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);     this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);    So the workhorse of the code wound up looking like (pf is the panel control):      void PaintPlayField()     {         Bitmap bufl = new Bitmap(pf.Width, pf.Height);         using (Graphics g = Graphics.FromImage(bufl))         {             g.FillRectangle(Brushes.Black, new Rectangle(0, 0, pf.Width, pf.Height));             DrawItems(g);             DrawMoreItems(g);             pf.CreateGraphics().DrawImageUnscaled(bufl, 0, 0);         }     }   And I just called PaintPlayField from the inside of my Timer loop.  No flicker at all. Please give me feedback on my answer to this question. Question: For all $ n\geq1:\binom{2n}{0}+\binom{2n}{2}+\binom{2n}{4}+\cdots+\binom{2n}{2k}+\cdots+\binom{2n}{2n} $   is equal to $ \binom{2n}{1}+\binom{2n}{3}+\binom{2n}{5}+\cdots+\binom{2n}{2k+1}+\cdots+\binom{2n}{2n-1} $. Answer: False, since;  Let $a=1,  b=-1$  and $n=1$  ,$k=0$   , using Binomial expression.  $$(a+b)^n=  \sum   \binom{n}{k}  a^{k}b^{n-k}$$  Then $(1+-1)^{2(1)}=\binom{2}{0}1^{0}(-1)^{2-0}+\binom{2}{1}1^{1}(-1)^{2-1}+\binom{2}{2}1^{2}(-1)^{2-2}=\binom{2}{0}-\binom{2}{1}+\binom{2}{2}$  Thus :For all $n\geq1:  \binom{2n}{0}+\binom{2n}{2}+\binom{2n}{4}+\cdots+\binom{2n}{2k}+\cdots+\binom{2n}{2n}   \ne \binom{2n}{1}+\binom{2n}{3}+\binom{2n}{5}+\cdots+\binom{2n}{2k+1}+\cdots+\binom{2n}{2n-1}$  . If $|f(z)|\le |g(z)|$, can we say $f$ is constant? Let $f$ and $g$ be entire functions and $g(z)\neq 0$ for all $z\in \mathbb{C}$. If $|f(z)|\le |g(z)|$, can we say $f$ is constant?  Liouville theorem says that an entire bounded function is constant, but g is not given bounded here. So I think it should be false. What else can we say about $f$? Mid-2017  started publishing monthly updates. This post will continue that effort into 2018. (.)  Updates are posted at the beginning of the month. They cover what was done last month, what is still in progress and new work that will be started in the current month.  Updates:      (CoC, nav, OpenID, responsive design, bugs, campaigns)  (CoC, comment flags, nav, OpenID)  (question wizard, nav, user survey, OpenID)  (tag watching, GDPR)  (responsive design, tags, teams)  (responsive design, OpenID, teams, sponsorship)  (responsive design, facebook auth, question lists, teams)  (newsletter, sign up, Documentation reputation, channels)  (top bar issues, hats, question template) Touching the front wheel with my foot when turning Why is homology invariant under deformation retraction/homotopy equivalence? What does [&] mean before function? Convince grep to output all lines, not just those with matches Spacing problem at List of Figures Kali Linux: apt update returns "Hash Sum mismatch" error I'm experiencing exactly the same issue as described in this question: . Before you mark this as a duplicate however, I have tried the solutions posted there, as well as on numerous other sites, including:  sudo apt-get clean sudo rm -rf /var/lib/apt/lists/* sudo apt-get update   Editing /etc/apt/sources.list with alternate official mirrors, such as  deb http://mirrors.ocf.berkeley.edu/kali kali-rolling main non-free contrib or deb https://http.kali.org/kali kali-rolling main non-free contrib  Everything worked after I first imported the VM. I ran sudo apt update and it found some ~650 packages to upgrade. I ran sudo apt upgrade and it encountered an error partway through. That error was solved using sudo apt --fix-broken install, but that is when this hash sum error began. Unfortunately due to hours of troubleshooting I no longer have the details of the earlier error, but I believe it was an error extracting a package due to corrupt data.  I've tried multiple official mirrors, but I get the same error. Additionally, when I downloaded the Packages.gz file  on my Windows machine (VM host) and computed the SHA256 hash, I got the exact hash that apt printed as the expected value. This led me to believe that the error was not with the mirror but with my VM.  The next thing I tried was wget https://mirrors.ocf.berkeley.edu/kali/dists/kali-rolling/main/binary-amd64/Packages.gz followed by sha256sum Packages.gz, which provided yet another different hash output.  To be clear, I have seen 3 different hashes for the same file:   The "correct" hash shown by apt as expected, which is the one that windows also produced after downloading the file using a browser The incorrect hash calculated by apt, which led to the error A different hash calculated by sha256sum after downloading the file using wget using the same URL as for the browser download   I should also note that I have only been referencing the SHA256 hash in each step. The other hash functions are also mismatched when I run sudo apt update, but the file size is the same. I had considered that downloads might be failing due to limited disk space (it is a VM after all) but I don't think that's the case.  What am I missing? I am stuck on how to calculate the following limit: $$\lim_{x\to\infty}x\left(\left(1 + \frac{1}{x}\right)^x - e\right).$$  Definitely, it has to be through l'Hôpital's rule. We know that $\lim_{x\to\infty} (1+(1/x))^x = e$. So, I wrote the above expression as $$\lim_{x\to\infty}\frac{\left(1 + \frac{1}{x}\right)^x - e}{1/x}.$$Both numerator and denominator tend to zero as x tends to infinity. I applied l'Hôpital's rule twice, but I got the limit equal to infinity which is clearly wrong. In the book, it says that the limit should be $-e/2$.  Any help please? Also, in case someone managed to solve it, please tell me which numerator and denominator did you apply your l'Hôpital's rule to in both cases? Thanks a lot  Also, guys can you tell me how to write equations in this forum? Thanks. What are the limitations of healing magic? While reading Sorcerer's Stone, I just finished the chapter where Harry walks in on Snape and Filch bandaging Snape's leg.  In a previous chapter Neville falls off of his broom and we see that magic can easily heal his broken wrist.  If magic can heal an injury like broken bones, why wouldn't Snape heal his leg, which was just torn up by a 3-headed dog?  My initial thought was that only certain people specialize in healing magic, but while poking around this site I came across this question:   This shows that Snape had at least some healing abilities.  So why didn't he heal his own leg?  Are there limitations that prevented Snape from healing his own wounds? I'm new to Ubuntu. I tried installing it with Windows 8.1, but failed I lost all my files.  I have successfully formatted my PC and installed Ubuntu, but how do I install codecs to play audio and videos files ? I was talking to a friend who owns a Mac. He has his set up so that when he swipes three fingers across his touchpad, it moves to the workspace in that direction. Is it possible to set this up in Ubuntu? Sequential renaming of files I found an answer for  which works fine for renaming filenames as follows :  1.jpg &gt; 00001.jpg 2.jpg &gt; 00002.jpg . . . 9.jpg &gt; 00009.jpg   That uses the following command:  rename 's/\d+/sprintf("%05d", $&amp;)/e' *.jpg   But my filenames aren't numeric. They are an alphanumeric sequence, like: a.jpg, b.jpg, c.jpg...... m.jpg.  In a similar way to the original question, I want to rename these so they display in the correct sequence. How do I do this? recursive statistics on file types in directory? I did a website scrape for a conversion project. I'd like to do some statistics on the types of files in there -- for instance, 400 .html files, 100 .gif, etc. What's an easy way to do this? It has to be recursive.   Edit: With the script that maxschelpzig posted, I'm having some problems due to the architecture of the site I've scraped. Some of the files are of the name *.php?blah=blah&amp;foo=bar with various arguments, so it counts them all as unique. So the solution needs to consider *.php* to be all of the same type, so to speak. Concatenate multiple files with two blank lines as delimiter? I'm trying to join Markdown files with two newlines between each file.   I've tried using the following command:  paste -sd '\n\n' file1.md file2.md   This joins the files with a newline, but not two newlines, as I need.   What command can I use to join an arbitrary number of files with two \n characters between each join? How long can eggs be unrefrigerated before becoming unsafe to eat? A friend of mine accidentally left a carton of eggs on her counter, unrefrigerated, for three days. The eggs had been previously refrigerated both at the store and at home. Now she's planning to do some more cooking which requires eggs, and is wondering if it's still safe to use them for baking. I believe she is planning on baking cookies with them, so they would be baked at fairly high temperatures for probably at least 10 minutes. Would this be safe, or are eggs left unrefrigerated for that long not safe for consumption? Line numbering paragraph oriented? I'm using the lineno package with the pagewise option but I need a way to get the numbering restart every paragraph break. I need a general solution to pass to the latex command, e.g.:  latex "\AtBeginDocument{\RequirePackage[pagewise]{lineno}\linenumbers}\input{mydocument.tex}"   I read the lineno manual but the package does not provide this feature. Is there any trick to do that? I am looking for a term which clearly defines somebody as a non-geek, without being derogatory. The best example I have seen is muggle, but it needs context to be understood, as in "You don't meet many muggles at a comic convention", or "even my muggle friends like my autologlyph fractal decal". But while "muggle" makes it clear that he is a part of the "majority which is different", it is often hard to guess who the minority is.   There are also more specific words, but they are mostly so derogatory that I would consider them rude even in a joke, like luser or n00b. I definitely don't want to use them in a normal conversation.   A search in antonym dictionaries didn't bring up anything. Is there really no such word?