I am creating a 2D platform game in a wpf application... and I tried to make my character walk with a gif animation.  Here's my C# code:  private void imgMega_OnKeyDown(object sender, KeyEventArgs e)         {             if (e.Key == Key.Right)             {                 if (Grid.GetColumn(imgMega) &lt;= Grid.ColumnDefinitions.Count - 1)                     Grid.SetColumn(imgMega, Grid.GetColumn(imgMega) + 1);                 BitmapImage bmi = new BitmapImage(new Uri("megaman.gif", UriKind.Relative));                 imgMega.Source = bmi;              }         } /*---- When my character walk ----*/          private void imgMega_OnKeyUp(object sender, KeyEventArgs e)         {             BitmapImage bmi = new BitmapImage(new Uri("Megaman8bit.jpg", UriKind.Relative));             imgMega.Source = bmi;         } /*---- When my character stop walking ----*/   And my XAML code:  &lt;Image Name="imgMega" Width="60" Grid.ColumnSpan="4" FocusVisualStyle="{x:Null}" Source="Megaman8bit.jpg" Focusable="True" KeyDown="imgMega_OnKeyDown" KeyUp="imgMega_OnKeyUp"/&gt;   * My "megaman.gif" image is my walking character and my "Megaman8bit.jpg" image is my immobile character. *  With this code, the character changes his position but the gif animation doesn't work... Somebody can help me to find what's wrong ?
What control type should I use - Image, MediaElement, etc.?
Distribution of the ratio of two i.i.d standard normals I am reading an article in which the author states that given two i.i.d random variables $X,Y\sim\mathcal{N}(0,1)$, we have $\mathbb{P}(\frac{X}{Y}\le t)=\mathbb{P}(\frac{X}{|Y|}\le t)$ since the random varaibles $\frac{X}{Y}$ and $\frac{X}{|Y|}$ are identically distributed by the symmetry of the standard normal distribution.  But I don't really understand why the random variables $\frac{X}{Y}$ and $\frac{X}{|Y|}$ are identically distributed. Can you provide a reason for why these two random variables are identically distributed? Finding the limit of $(1-\cos x)/x^2$ $$\lim _{x \to 0}{1-\cos x\over x^2}={2\sin^2\left(\frac{x}{2}\right)\over x^2}={\frac{2}{x^2}\cdot {\sin^2\left(\frac{x}{2}\right)\over \left(\frac{x}{2}\right)^2}}\cdot\left(\frac{x}{2}\right)^2$$  now $$\lim_{x \to 0}{\sin^2\left(\frac{x}{2}\right)\over \left(\frac{x}{2}\right)^2}=\left({\sin\left(\frac{x}{2}\right)\over \left(\frac{x}{2}\right)}\right)^2=1^2$$  So we have $$\frac{2}{x^2}\cdot \left(\frac{x}{2}\right)^2=\frac{2}{x^2}\cdot \left(\frac{x^2}{4}\right)=\frac{1}{2}$$  Are the moves right? Does $k+\aleph_0=\mathfrak{c}$ imply $k=\mathfrak{c}$ without the Axiom of Choice? I'm currently reading a little deeper into the Axiom of Choice, and I'm pleasantly surprised to find it makes the arithmetic of infinite cardinals seem easy. With AC follows the Absorption Law of Cardinal Arithmetic, which states that for $\kappa$ and $\lambda$ cardinal numbers, the larger infinite and the smaller nonzero, then $\kappa+\lambda=\kappa\cdot\lambda=\max(\kappa,\lambda)$.  I was playing around with the equation $k+\aleph_0=\mathfrak{c}$ for some cardinal $k$. From the above, it follows that $\mathfrak{c}=k+\aleph_0=\max(k,\aleph_0)$, which implies $k=\mathfrak{c}$.  I'm curious, can we still show $k=\mathfrak{c}$ without the Axiom of Choice? Is it maybe possible to bound $\mathfrak{c}-\aleph_0$ above and below by $\mathfrak{c}$? But then I'm not quite sure such algebraic manipulations even mean anything, or work like that here. Certainly normal arithmetic does not! Thanks. Let $W^{1,p}(U)$ be the Sobolev space. Suppose that $U$ is connected bounded domain in $\mathbb{R}^n$ and $u \in W^{1,p}(U)$ satisfies $Du=0$ a.e. in $U$. How can I prove that $u$ is constant a.e. in $U$? How may I reference the script tag that loaded the currently-executing script? How can I reference the script element that loaded the javascript that is currently running?  Here's the situation. I have a "master" script being loaded high in the page, first thing under the HEAD tag.  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt; &lt;head&gt; &lt;script type="text/javascript" src="scripts.js"&gt;&lt;/script&gt;   There is a script in "scripts.js" which needs to be able to do on-demand loading of other scripts. The normal method doesn't quite work for me because I need to add new scripts without referencing the HEAD tag, because the HEAD element hasn't finished rendering:  document.getElementsByTagName('head')[0].appendChild(v);   What I want to do is reference the script element that loaded the current script so that I can then append my new dynamically loaded script tags into the DOM after it.  &lt;script type="text/javascript" src="scripts.js"&gt;&lt;/script&gt; loaded by scripts.js--&gt;&lt;script type="text/javascript" src="new_script1.js"&gt;&lt;/script&gt; loaded by scripts.js --&gt;&lt;script type="text/javascript" src="new_script2.js"&gt;&lt;/script&gt; Are keywords in URLs good SEO or needlessly redundant? A coworker and I are locked in a debate over the value of SEO keywords in the URL of a page. She wants to change all the filenames of the HTML pages of a fencing company so they look like residential-home-chicago.html, contact-chicago-contractor.html, and so on. She is convinced that because Google highlights keywords in URLs in search results, that means that putting keywords here is more valuable.  My position is that these do not improve SEO, since Google doesn't seem to give keywords in the URL any more weight than keywords in the body of the page, and . In the meantime, they make it harder for me to find the pages I want when its time to edit them, and the site as a whole looks cheap and spammy.   suggests to me that yes, keywords in URLs are useful, but not superior, and that they are more useful for human readability than search engine rankings.  I'm looking for authoritative sources that support either position, not blog articles from SEO optimization companies trying to promote themselves. Story about workers repeatedly doing trivial work I'm trying to remember a (short) story I read in school some time ago. I don't have much, but here it is:   Numbers of workers are assigned to trivial task, like changing broken lightbulbs (or something similar). Once they finished their daily work, another group of workers are putting the broken lightbulbs in again, allowing for an endless, trivlal working circle.   I know that isn't much, but maybe someone has an idea, thanks. Active vs passive voice with inanimate object as the subject I have asked the  in ELL Stackexchange forum. There all the answers and comments I received was really helpful, but still I was looking for something more. So I have decided to ask this same question here also.   I have seen some sentences like this -         The film was announced to be released on this coming Friday.   The film was announced to release on this coming Friday.      Both the sentences are used, and I know they are interchangeable and does bear the same meaning. But I have some doubt about the second sentence - why is it "to release", when the film cant release itself.   Some other sentences of similar structure that arises my confusion -         The product sells well.   The book reads well.   The glass broke.      The sentences are understandable, but in each of the sentences the subjects can't perform any job, as they all are inanimate object. The verbs are active, but they acts like they are used as passive.  Now my question is how to decide which verb to use this way and which not? I'm using 17.04 ( Clean Install ), and as far as I remember, every try to install any sofware- it fails with that error code.  I tried sudo apt-get update &amp;&amp; apt-get upgrade and problem persists.  any idea why?   edit: Using software Updater gave this result :   edit : output of update  guy@LG-LAPTOP:~$ sudo apt-get update &amp;&amp; apt-get upgrade [sudo] password for guy:  Ign:1 http://il.archive.ubuntu.com/ubuntu zesty InRelease Ign:2 http://il.archive.ubuntu.com/ubuntu zesty-updates InRelease               Ign:3 http://il.archive.ubuntu.com/ubuntu zesty-backports InRelease             Err:4 http://il.archive.ubuntu.com/ubuntu zesty Release                           503  Service Unavailable Get:5 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]      Err:6 http://il.archive.ubuntu.com/ubuntu zesty-updates Release                   503  Service Unavailable Get:7 http://archive.canonical.com/ubuntu zesty InRelease [10.2 kB]             Err:8 http://il.archive.ubuntu.com/ubuntu zesty-backports Release                 503  Service Unavailable Get:9 http://archive.canonical.com/ubuntu zesty/partner Sources [1,416 B]       Get:10 http://archive.canonical.com/ubuntu zesty/partner amd64 Packages [1,616 B] Get:11 http://archive.canonical.com/ubuntu zesty/partner i386 Packages [1,612 B] Get:12 http://archive.canonical.com/ubuntu zesty/partner Translation-en [708 B] Get:13 http://security.ubuntu.com/ubuntu zesty-security/main amd64 DEP-11 Metadata [11.7 kB] Get:14 http://security.ubuntu.com/ubuntu zesty-security/main DEP-11 64x64 Icons [9,219 B] Get:15 http://security.ubuntu.com/ubuntu zesty-security/universe amd64 DEP-11 Metadata [14.4 kB] Get:16 http://security.ubuntu.com/ubuntu zesty-security/universe DEP-11 64x64 Icons [31.0 kB] Reading package lists... Done                                          E: The repository 'http://il.archive.ubuntu.com/ubuntu zesty Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://il.archive.ubuntu.com/ubuntu zesty-updates Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://il.archive.ubuntu.com/ubuntu zesty-backports Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. guy@LG-LAPTOP:~$    output of apt get  guy@LG-LAPTOP:~$ sudo apt-get install putty Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   putty-tools Suggested packages:   putty-doc The following NEW packages will be installed:   putty putty-tools 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 661 kB of archives. After this operation, 2,713 kB of additional disk space will be used. Do you want to continue? [Y/n]  Err:1 http://il.archive.ubuntu.com/ubuntu zesty/universe amd64 putty-tools amd64 0.67-3   503  Service Unavailable Err:2 http://il.archive.ubuntu.com/ubuntu zesty/universe amd64 putty amd64 0.67-3   503  Service Unavailable E: Failed to fetch http://il.archive.ubuntu.com/ubuntu/pool/universe/p/putty/putty-tools_0.67-3_amd64.deb  503  Service Unavailable E: Failed to fetch http://il.archive.ubuntu.com/ubuntu/pool/universe/p/putty/putty_0.67-3_amd64.deb  503  Service Unavailable E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? guy@LG-LAPTOP:~$ How to prove that $E[Y]=E[E[E[Y|X_1, X_2]]]$ ?  PS. I don't see how $E[E(Y|X_{1},X_{2})|X_{1}]=Y[Y|X_{1}]$ and $E[Y]=E[E(Y|X_{1})]$ can be used here. But it feels close. Please help, I'm stuck PPS. Thanks @Deep North. Let's consider the case when X1 is independent of X2 Since my previous questions were not answered I will try to ask again more precisely.  I previously had the Nvidia driver installed and working correctly.  Then the ubuntu software update did something which broke it.  In fact, it completely de-configured it so that the standard display driver is used when the computer reboots.  I would like to re-enable the existing Nvidia  driver without re-installing the Nvidia driver.  How do I do that?  This machine is no longer connected to the internet.  NOTE: I am not asking how to disable automatic updates in this question.  I asked that elsewhere (and it wasn't answered).  NOTE: I am not asking how to stop the Ubuntu software updater from breaking the Nvidia driver the next time it updates the system.  That would be nice to know, but I asked that already and did not receive the correct answer either.  NOTE: Please don't make this as duplicate simply because someone else asked a question about Ubuntu and the software updater.  Try to read the actual question and see how it's different and try to realize how annoying it is when users have to spend hours of their own time to correct the problems that other people causing by incorrectly designing software updaters. I know that a stationary metric is one which possesses a timelike Killing Vector (so I have time invariance).  I read that a static metric is one which has a timelike Killing vector (so it is stationary) AND this Killing vector is orthogonal to a family of hypersurface (of dimension n-1 is n is the dimension of my manifold). I don't understand the "physical" meaning behind this definition ? Is there a way to explain this in some more intuitive way ? Thanks How can I change an element's class with JavaScript? When & why I need to use web.AllowUnsafeUpdates = true I'm trying to match SHA1's in generic text with a regular expression.  Ideally I want to avoid matching words.   It's safe to say that full SHA1's have a distinctive pattern (they're long and a consistent length) - so I can match these reliably - but what about abbreviated SHA1's?  Can I rely on the presence of numbers?  Looking at the SHA1's in my commit log - numbers always appear in the first 3 characters. But is this too short? How many characters of SHA1 do I need to consider before I can assume a number would have appeared?    This does not have to be 100% accurate - I just need to match an abbreviated SHA1 99% of the time. What is the point of stacking favorite notifications? Is there a free or open source library to read Excel files (.xls) directly from a C# program?   It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulting (tab-delimited) file, but I'd like to eliminate the manual step. What is the rule of thumb for mixing doughs? Without delving too deeply into specialty doughs, but addressing more than just  and , what concerns can I evaluate when calculating the technique for approaching a dough?  For instance, some recipes say not to mix too much, others would imply that beating every bit of air out of the dough is the best thing for it. What I am looking for is a set of criteria, maybe a flowchart, that outlines how to deal with having a well-reasoned technique (as opposed to just following a recipe).  Crumble, cream, or melt the fat first? Paddle or hook? Beat, fold or whisk? Knead once and rest or knead three times and throw? I would assume that to some extent getting air in or out, activating and mixing ingredients, distributing fats more or less evenly, and so forth play a factor in any decision. However, I have no idea what those different things do, or the food science behind them. What general principles would help me understand what each factor does, so that I can have more confidence when staring down the ingredients, whether for some cookies or pizza crusts or muffins? Decoupling caps, PCB layout Decompose vector fields on product manifolds So, I know that tangent bundle of a product manifold $M \times N$ splits in a sum $$ T_{(x,y)}(M \times N) = T_xM \oplus T_yN, $$ so that is obvious that the sum $X \oplus Y$ of smooth vector fields $X \in \mathcal{T}(M)$ and $Y \in \mathcal{T}(N)$ is a smooth vector field of $M \times N$. I've been told that, though not every vector field in $\mathcal{T}(M \times N)$ is a sum, locally one can always find one such decomposition, which will in turn be unique due the fact the sum is a direct one.   How can I show that this decomposition exists locally? More than that, if $X = X_1 + X_2$ is the decomposition, is there a way the express the coordinate functions of $X_1$ and $X_2$ in terms of those of $X$?   First I thought about taking two frames that locally spam $TM$ and $TN$ and write down $X$ using them, but then the coordinate functions are of the form $X^i: M \times N \to \mathbb R$, and the vector field components in each subspace are not exactly fields of $M$ and $N$ because their coordinate functions don't have the right domains. Is there another better way to see this decomposition holds locally?