My computer is unable to boot windows 7 after installing ubuntu 18.04, but windows is seen in GRUB menu. what should I do?
Unable to boot into Windows after installing Ubuntu, how to fix?
Contradiction between law of conservation of energy and law of conservation of momentum? Yesterday, while studying a simple question, a rather strange doubt hit my mind:     Consider a ball of mass $m$ moving with velocity $v$ that collides with a wall in a perfectly elastic collision and rebounds back with the same velocity. Taking the direction of initial motion of the ball as positive, the change in momentum of the ball is $-2mv$ and the wall is clearly at rest.   So, in order to obey the law of conservation of momentum, the wall must gain a momentum of $2mv$.  Now, this itself confused me a lot. I then applied the law of conservation of kinetic energy to this situation, and clearly the magnitudes of the initial and final velocities of the ball are equal, so kinetic energy of the ball is conserved and hence the final kinetic energy of the wall must be zero in order to conserve energy.  Now, this contradicts with the law of conservation of momentum, which says that the wall must gain momentum of $2mv$.  One more point: If we are talking about a wall then it is an important fact, which must be considered, that the wall is fixed on earth and so the mass of the wall is equivalent to that of earth, say $M$. If the law of conservation of momentum is applied now then we get velocity of the wall, say $V=2mv/M$ which is no doubt an extremely small value. But, the law of conservation of energy strictly says that the velocity of the wall must be exactly zero, not even the smallest value is allowed (theoretically speaking).   Please clarify this and correct me anywhere if I'm wrong. I have tried my best to make it clear what I want to ask :). How do I install drivers for a Canon LBP-2900 printer? I seen many times how people describe how to's about LBP-2900, and 10-12 steps from start to end of how to download, unpack, build driver, fix driver, make it work... Could be there some .deb package with ready-to-go driver for Ubuntu? This printer is very popular... How do I create an animated gif from still images (preferably with the command line)? I want make a .gif animated picture from a given set of .jpg pictures.  I would prefer to do it from the command line, so command line tools would be very welcome. Put two figures side by side There are already several threads that deal with this: they suggest having one figure and putting putting minipages inside, or using the subcaption package and having subfigure environments. However, I've tried both of these approaches and I'm still going wrong:  \begin{figure}[h]  \begin{minipage}[b]{0.2\linewidth}  \begin{tikzpicture}[sibling distance=0pt] \Tree [.TP         [.DP \edge[roof]; {a 'we'} ]         [.T$'$             [.T \node(li){li 'eat$_i$'}; ]             [.VP                 [.Spec t ]                 [.V$'$                      [.DP \edge[roof]; {saka 'rice'} ]                     [.V \node(t){t$_i$}; ] ] ] ] ] \draw [-&gt;] (t) .. controls +(south:3) and +(south:3) .. (li); \end{tikzpicture}  \end{minipage}\hfill  \begin{minipage}[b]{0.2\linewidth}  \begin{tikzpicture}[sibling distance=0pt] \Tree [.TP         [.DP \edge[roof]; {a 'we'} ]         [.T$'$             [.T \node(li){la 'have'}; ]             [.VP                 [.Spec t ]                 [.V$'$                      [.DP \edge[roof]; {saka 'rice'} ]                     [.V \node(t){li 'eaten'}; ] ] ] ] ] \draw [red,-&gt;] (t) .. controls +(south:3) and +(south:3) .. (li); \end{tikzpicture}  \end{minipage}  \end{figure} I don't have complex analysis at my beck and call, and I only have a low level of knowledge in topology, but I need to prove that this metric space (for any real $r$ and $R$ with $r &lt; R$)$$ X = \{ (x, y) \in \mathbb{R}^2 \ | \ r \leq x^2 + y^2 \leq R \}$$  with the Manhattan metric $d((x_1, y_1), (x_2, y_2)) = |x_1-x_2| + |y_1-y_2|$ is not simply connected.  I've already prooven that it's path connected, and now I need to show there are some points $P$ and $Q$ with two paths between them such that one cannot be continuously 'morphed' into the other.  $ \ $  What I have so far is as follows:  I take $P = (0, r)$ and $Q = (0, -r)$, with $f_0$ being a path from $P$ to $Q$ going clockwise around the circle radius $r$ and $f_1$ being much the same but going counterclockwise.  Now I assume there is a function $g : [0, 1]^2 \to X$ such that:   $g(s, 0) = f_0 (s)$ $g(s, 1) = f_1 (s)$ $g(0, t) = P$ $g(1, t) = Q$   To get the final result, I need to show that this function cannot be continuous, but for the life of me I cannot.  For some context, these are the topics which have been visited during the course, roughly in order of recentness.   Multiple connectedness Simple connectedness Pathwise connectedness Interior points Boundary points Open sets Compactness Complete metric spaces Bounded metric spaces Totally bounded metric spaces Closed sets Closure of a metric space Limit points Cauchy sequences Convergence Continuity Metric space quivalence Metric equivalence   Edit: I might have an argument that works, though it's far from rigourous. We can shrink $R$ to be as close to $r$ as we want, so we can essentially constrain the annulus down to a circle and thus force any path from the left side of the circle to the right side to go through $P$ or $Q$.  So holding $s \in (0, 1)$ constant and varying $t$ must produce a path through $P$ or $Q$ for any $s$. If for some $s$ it passes through $P$ and for some other $s$ it passes through $Q$, then there must be $s_0$ such that $\forall \epsilon &gt;0  \ \exists \delta \leq \epsilon$ st. $s_0$ produces a path through $P$ and $s_0 + \delta$ produces a path through $Q$.  Now we can consider the path $g(s, \frac{1}{2})$, and note that it must have a discontinuity at $s_0$.  Now consider the case where all $s$ produce paths through only one of $P$ or $Q$. WOLOG: $P$. Now, at $t = \frac{1}{2}$, $s$ arbitrarily close to $1$ are mapped away from $Q$, but $1$ is always mapped to $Q$ by definition, so $g(s, \frac{1}{2})$ has a discontinuity at $s=1$. Therefore $g(s, t)$ is not continuous.  This argument is definitely iffy to me, if no one has their own argument (using sufficiently low level concepts), then criticism on the above would be appreciated. I recently moved to Linux, and I am in love with the experience. Opinions apart, I am having problems when running sudo dpkg --configure -a  My computer stops processing the command here:  You may know Adobe Flash Player is no longer supported, and I believe that could be why the command is unable to load pepperflashplugin-nonfree. I have tried fixing the problem by checking older posts here, but none of them was able to fix this problem. I recently came across an IE7 only bug that I thought I'd share so when I come to this site 6 months from now to figure out the same thing, I'll have it on hand.   I believe the easiest way to recreate this bug would be the following html in a page with a declared doctype (it works correctly in "quirks mode" / no-doctype):  &lt;div style="overflow: auto; height: 150px;"&gt;     &lt;div style="position: relative;"&gt;[...]&lt;/div&gt; &lt;/div&gt;   In IE7, the outer div is a fixed size and the inner div is relatively positioned and contains more content (assuming the inner div causes an overflow). In all other browsers, this seems to work as expected.  Screenshot: Execute vs Read bit. How do directory permissions in Linux work? In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory, and how do directory permissions in Linux work? Why do the :before and :after pseudo-elements require a 'content' property? If I run  export TEST=foo echo $TEST   It outputs foo.  If I run  TEST=foo echo $TEST   It does not. How can I get this functionality without using export or a script? I want to model the transfer function of a resistor mathematically, and am after some resources / tips on if it's possible to do so.  For example, if I put 1V into a 1 Ohm resistor, I want to know how long and how (shape) it will take to reach a steady state temperature, given 25 deg C ambient.  I.e.   $$ \frac{T(s)}{V(s)} = ??? $$  Where T(s) is the laplace transform of temperature T(t), measured in say Kelvin.  I understand there are a lot of factors which will affect this model (material, size, shape, ambient (?)), but I'm not sure where to even start. A  shows the heat rise at a certain load, but not really how it gets there. I can't find a time-domain function for the temperature rise either. I would that the images would appeared for each overlay. Eg, in overlay 1 I have img1.pdf, in overlay 2 I have img2.pdf, and in overlay 3 I have img3.pdf. How I do this?  \begin{center}   \begin{tikzpicture}     \node (img1) {\includegraphics[width=.5\linewidth]{img1.pdf}};     \pause     \node (img2) {\includegraphics[width=.5\linewidth]{img2.pdf}};     \pause     \node (img3) {\includegraphics[width=.5\linewidth]{img3.pdf}};   \end{tikzpicture} \end{center} How do I run a sudo command needing password input in the background? I have recently disabled  so that it now prompts me for a password every time.  And though this is good for security, it has caused one slight problem which I haven't been able to figure out a solution for, I am unable to run commands which go along the lines of:   sudo &lt;command&gt; &amp;   In the past I would have run a sudo command before that, it would have cached my password and allowed me to run sudo commands without prompt for the next few minutes, and thus it would allow me to run the command.  But when I run it now as there is no caching before hand and as it starts a new thread immediately and sudo doesn't even prompt me for a password, I am unable to run it in this way.  So unless I run sudo -i before it I am unable to run a command in this format which is becoming rather annoying. So I was wondering if there is any way to get around this and still run programs and commands in this way?  I am running Ubuntu GNOME 15.10 with GNOME 3.18, and specifically the program I want to run in this fashion is etherape if that makes any difference, but I would really like the solution to work for all programs and commands. Diffinitive rules for using Android's getBaseContext, getApplicationContext or using an Activity's "this" Just a few questions about Hyper-V virtual machines and clustering I have been using Microsoft’s Hyper-V technology for a little while now, but I am just now dipping my toe into clustering.  In particular, I am trying to implement a fault-tolerant SQL DB. This involves setting up two VMs, clustering them via Failover Cluster, and then installing SQL Server in some fashion. I have two physical machines - one high-end and rather beefy “heavy lifter” to contain the majority of the VMs, and another “backup” (a repurposed desktop) to hold the essential “secondary” (or failover) AD-DC, SQL and FS VMs.  The main reason why I find the failover cluster at the VM level so attractive is that it presents a single IP and DNS entry to the network as a whole - if one machine (physical or virtual) goes down, you might loose some ping and the connections get reset, but the network applications (Microsoft RMS connection to backend SQL) can still connect to a viable DB without having to mess around with the settings at all.  My first question is in terms of SQL Server itself. If I have a cluster between two VMs, does it make more sense to install the SQL Server in Failover Cluster configuration or should I simply install it in a stand-alone config and mirror the DBs? For example,  suggests just mirroring the DBs, but do I just mirror standalone DBs on standalone VMs, or can I get the network and failover benefits of clustered VMs while still utilizing (on each clustered VM) standalone DBs that have been mirrored between each other?  As well, I have come across a lot of documentation about SQL clustering, but most assume a number (#>2) of physical machines to hold not only the actual SQL VMs but also the Quorum and Witness stores. I will not be able to muster more than two physical machines. As such, I will have to be satisfied with a VM cluster that does not exceed two VMs (one for each physical machine).  Another issue involves MSDTC - the Distributed Transaction Coordinator. When attempting to install the SQL Failover Cluster (I never completed it for this reason) it threw a hissy fit because MSDTC had not been clustered. Search as I might, I have not yet found a way to do so under Windows Server 2012 R2. I have found , but these instructions don’t align with 2012 R2 (at least, not in a way that allows me to successfully cluster MSDTC). Plus,  that I have found for SQL Server Failover Cluster installation suggest that a third “network device” - shared network storage (a SAN) - is required for the DB itself (and other functionality). I do not have this, and won’t be getting this. Most of my storage exists on the “heavy lifter” that was designed for all of the “primary” VMs. If that physical machine goes down, so does the storage. The secondary server does have enough resources for an AD-DC Server, an SQL server and a File Server, so it will handle the “secondary” failover versions of those VMs (clustered or not).  My final question involves file servers. If I cluster file servers between two VMs (one on my “heavy lifter” and another on my “backup”, how do I mirror the data between them? Clustering VMs only provides a single point of access on the network for a resource, it doesn’t exactly replicate data between the two - that is left to the services that serve up that data. I am unsure how I can ensure that file server data between two clustered file server VMs can be properly mirrored. Remember, I only have two devices to be used here - my primary machine and a backup secondary. There is no chance of me obtaining a SAN or any other type of network attached storage. What exists on the machines must act as the storage.  Thanks in advance for any suggestions. Are there any organised resources available from where I can begin my quantum computing studies? C# Textreader and TextWriter are the another way to read and write file respectively...      I added a text box and button I called tbUpdate and btUpdate respectively...      In the right hand column, we’ll use three TextBlocks; the first and third as fixed labels (with the values Likeability: and % respectively)...      WorkerSupportsProgress and WorkerSupportsCancellation which hold true/false values that let the backgroundworker report progress or cancel an async progress respectively...   While learning many the many different aspects of development, I have not come across a book or series where the word respectively is not used in explaining an example. Honestly I guess it's implied that we know what it means. To me I always kind of skim over it because I can usually figure out what they're saying through the surrounding context. Can anyone explain this? Display lost/negative reputation in topbar achievements When you get reputation, you get a +X green spot on your reputation feed telling you that you gained reputation and if you drop down the menu, you get more detail.  How about we make it that when you lose more than you got since the last time you checked, you see it red with a little -X.  For example, let's say you've just looked at the reputation bar so any old rep notification is gone and you ask a new question. 3 users downvote your question and 1 upvotes it. You will see it green because you gained 5 rep but you should see it red because you are at -1 rep.   This would help people improve their questions / answer by seeing, as soon as they get on the site, that they got negative feedback and that something needs to be checked / changed.    It shows here so it could very well be applied to the notification count: How to typeset the symbol “^” (caret/circumflex/hat) I need to display the symbol '^'  d &lt;- dist(fascores, method = "euclidean")^2   How do I do that? The origin of the value of speed of light in vacuum Meaning, why is it the exact number that it is? Why not 2x10^8 m/s instead of 3? Does it have something to do with the mass, size or behavior of a photon? To be clear, I'm not asking "how we determined the speed of light". I know there isn't a clear answer, I'm really looking for the prevailing theories.