apt commands doesn't work apt already worked fine. but in order to solving package not found error I used bellow commands  sudo sed -i -e s/universe//g /etc/apt/sources.list sudo sed -i -e s/main/"main universe"/ /etc/apt/sources.list   And now whenever I use any of apt commands I face this error    $ sudo apt-get update E: Malformed entry 15 in list file /etc/apt/sources.list (Component) E: The list of sources could not be read.   Is there any solution??!
Restore default apt repositories in sources.list from command line I am looking for the best method to restore /etc/apt/sources.list to default from the command line.  Is there no way to reference the source code of the package which generates this file or something like that? I want a trusted and version-independent way of restoring this file.  Solutions Ruled Out  Before you mark this as a duplicate, note that I have reviewed  already. It is only applicable if you have the Ubuntu GUI available. This question is specific to the command line.  I have also reviewed  where the accepted solution is someone pasted the contents of their sources.list file. This is not an appropriate way to restore the file as the intentions of the person providing the file contents cannot be verified and the file is subject to change with new releases.  I checked out the , but this is also not from Ubuntu so I do not plan to use it.
Why using IN(...) when selecting on indexed fields, will kill the performance of SELECT query? Largest Mass Diffraction Double Negation in C++ I just came onto a project with a pretty huge code base.   I'm mostly dealing with C++ and a lot of the code they write uses double negation for their boolean logic.    if (!!variable &amp;&amp; (!!api.lookup("some-string"))) {        do_some_stuff();  }                                      I know these guys are intelligent programmers, it's obvious they aren't doing this by accident.   I'm no seasoned C++ expert, my only guess at why they are doing this is that they want to make absolutely positive that the value being evaluated is the actual boolean representation. So they negate it, then negate that again to get it back to its actual boolean value.   Is this correct, or am I missing something? Least squares problem with constraint on the unit sphere It is easy to find the minimum of $\|Ax-b\|_2$, when $A$ has full column rank. But how is the case when we add the constraint $\|x\|_2=1$? Or, to be explicit,  $$\min_{\|x\|_2=1}\|Ax-b\|_2=?$$  My idea is to construct the corresponding Lagrange function  $$L(x,\lambda) = (Ax-b)^T(Ax-b) + \lambda(x^T x - 1)$$  Differentiate the function with respect to $x,\lambda$, we have  $$A^T A x - A^T b + \lambda x = 0$$  $$x^T x=1$$  However, I find it hard to move forward to get the answer. Could anyone help me? Thanks a lot! I've tried other solutions, but none of them are specific to my setup. I just started using the new Linux subsystem featured in the recent Windows 10 update. I'm using WAMP x64 v3.0.6, and have successfully cloned my website and got it up and running. At the root of the Linux subsystem, I installed Drush globally with Composer, using the directions given on the .  Typing drush status returns the following when I run it in my default directory:  Drupal version         :  7.50  Site URI               :  http://default  Database driver        :  mysql  Database hostname      :  localhost  Database port          :  Database username      :  root  Database name          :  aerosphere  PHP executable         :  /usr/bin/php  PHP configuration      :  /etc/php5/cli/php.ini  PHP OS                 :  Linux  Drush script           :  /home/bob/.composer/vendor/drush/drush/drush.php  Drush version          :  7.1.0  Drush temp directory   :  /tmp  Drush configuration    :  Drush alias files      :  Drupal root            :  /mnt/c/wamp64/www/drupal-7.50  Site path              :  sites/default   But, as mentioned in the title, drush cc all returns No Drupal site found, only 'drush' cache was cleared.[warning] I assume it has something to do with adding a path to the .bashrc, but I don't know what to add. Any tips would be greatly appreciated!  My question is different from "", they're on a Mac and using MAMP, and I'm using WAMP on Windows. I've tried the solutions offered on that post, but the issue has not been resolved.  I'm obviously having issues connecting to MySQL as I get this when I run mysql command:     The program 'mysql' can be found in the following packages: * mysql-client-core-5.5 * mariadb-client-core-5.5 * mysql-client-core-5.6 * percona-xtradb-cluster-client-5.5      Try: sudo apt-get install .   So I've added these lines to my .bashrc file:  PATH="$HOME/.composer/vendor/bin:$PATH" export PATH="/mnt/c/wamp64/mysql/mysql5.7.14/bin:$PATH"   The top line was added to get drush working. I've checked multiple times, and I have the path correctly set, but it's still not working. How to fix "W: Duplicate sources.list entry"? I keep getting this warning whenever I try to run sudo apt-get update.  W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   Below is the output from /etc/apt/sources.list file:  deb http://archive.ubuntu.com/ubuntu precise main restricted deb-src http://archive.ubuntu.com/ubuntu precise main restricted  deb http://archive.ubuntu.com/ubuntu precise-updates main restricted deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted  deb http://archive.ubuntu.com/ubuntu precise universe deb-src http://archive.ubuntu.com/ubuntu precise universe deb http://archive.ubuntu.com/ubuntu precise-updates universe deb-src http://archive.ubuntu.com/ubuntu precise-updates universe  deb http://archive.ubuntu.com/ubuntu precise multiverse deb-src http://archive.ubuntu.com/ubuntu precise multiverse deb http://archive.ubuntu.com/ubuntu precise-updates multiverse deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse  deb http://archive.ubuntu.com/ubuntu precise-security main restricted deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted deb http://archive.ubuntu.com/ubuntu precise-security universe deb-src http://archive.ubuntu.com/ubuntu precise-security universe deb http://archive.ubuntu.com/ubuntu precise-security multiverse deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse   How do I fix it? Is it ethical to withdraw a paper after acceptance in order to resubmit to a better journal? I've noticed a distressing tendency for questions that seem basic or overly short to be immediately closed and downvoted into oblivion.  Case in point:   Within a minute of being asked, this question received 12 downvotes and was closed as "not a real question".  That particular question is a very real, non-trivial question, but it had somewhat poor grammar and looked a little like a much simpler question.  Can we try to be a little more accepting? What is the Euler Totient of Zero? Wolfram MathWorld defines the Euler Totient function as follows:  The totient function phi(n), also called Euler's totient function, is defined     as the number of positive integers &lt;=n that are relatively prime to (i.e., do  not contain any factor in common with) n, where 1 is counted as being  relatively prime to all numbers   By this definition would $\phi(0)=0$? Show an Ideal is the principal ideal for some polynomial. Let $F$ be a ﬁeld and $R = F[X]$. Suppose $I$ is an ideal of $R$. Show that $I = (p(X))$ for some $p(X)$ in $F[X]$. (Hint: consider a polynomial $p(X)$ of least degree in $I$.)  I'm trying to do this question but can't seem to start. if anyone could give me a hint that would be appreciated.  My instinct was to take a monic polynomial (which exists since we are in a field) of degree $1$ and divide given the first two parts of the question were about polynomial division.  Thanks. A question about the higher-order Weyl variation for the geodesic distance I have a question in deriving Eqs. (3.6.15b) and (3.6.15c) in Polchinski's string theory vol I p. 105.   Given      $$\Delta (\sigma,\sigma') = \frac{ \alpha'}{2} \ln d^2 (\sigma, \sigma') \tag{3.6.6}$$   where $d(\sigma,\sigma')$ is the geodesic distance between points $\sigma$ and $\sigma'$.   It is said for the Weyl variation $\delta_W$,     $$\partial_a \delta_W \Delta(\sigma,\sigma')|_{\sigma'=\sigma}= \frac{ 1}{2} \alpha' \partial_a \delta \omega(\sigma) \tag{3.6.15a} $$   $$ \partial_a \partial_b' \delta_W \Delta(\sigma,\sigma')|_{\sigma'=\sigma}= \frac{ 1+ \gamma}{2} \alpha' \nabla_a \partial_b \delta \omega(\sigma) \tag{3.6.15b} $$   $$ \nabla_a \partial_b \delta_W \Delta(\sigma,\sigma')|_{\sigma'=\sigma}= - \frac{  \gamma}{2} \alpha' \nabla_a \partial_b \delta \omega(\sigma) \tag{3.6.15c} $$   Here $\gamma=-\frac{2}{3}$.   I know the reason for the factor of $1/2$ in the RHS of Eq. (3.6.15a) and I can derive it. But, putting $\nabla$ on LHS and RHS of Eq. (3.6.15a) will not lead to (3.6.15c). I guess it is because there is some higher-order terms in the geodesic distance where the treatment of (3.6.9)-(3.6.11) omitted. But I don't know how to get it. I tried $ds^2= g_{ab} dx^a dx^b= (\eta_{ab} + h_{ab})dx^a dx^b $ to separate the deviation of Minkowski metric, but I cannot get the factor $\gamma$   My question is, how to derive Eqs. (3.6.15b) and (3.6.15c) (especially there is a prime, $'$, namely $\partial'_b$ in the LHS of (3.6.15b) but not in the RHS) Does leaning (banking) help cause turning on a bicycle? I think it's clear enough that if you turn your bicycle's steering wheel left, while moving, and you don't lean left, the bike will fall over (to the right) as you turn. I figure this is because the bike's momentum keeps it moving in the direction you were going, and since your wheels have friction against the ground, the top of the bike moves forward relative to the bottom of the wheels. The top of the bike going north while the bottom of the wheels go northwest will understandably cause you to topple. So to counteract this and keep you from falling over, leaning into the turn is necessary. But is there also a direct causal relationship -- that leaning will cause the bike to start to turn? If I start leaning left, I will turn left... but maybe that's because I know that if I don't turn the steering wheel left, the bike will fall over (to the left). I experimented with unruly turns of the steering wheel when I was a kid, and got my scrapes and bruises. Now that I'm a cautious and sedate adult I'm not anxious to experiment that way. :-) (I also want to ask why airplanes bank into a turn... they don't have the same issues as a bike, i.e. the bottom part has no special friction against the ground. But that would probably make the question too broad.) Can we please hold the hats? I really like the hats game. But I would love to keep the hats longer then only one winter. I want to leave them in my wardrobe during summer. Last year, I collected some cool hats, and I apparently lost them during summer.  Maybe we could make a system that allows hats to last for about 2 or 3 years, so we don't have to start over each winter. Or even specify per type of hat a number of years they last? Very very rare hats could last for ever.  I asked this, simply because I love hats! :D How can a distribution have infinite mean and variance? It would be appreciated if the following examples could be given:   A distribution with infinite mean and infinite variance. A distribution with infinite mean and finite variance. A distribution with finite mean and infinite variance.  A distribution with finite mean and finite variance.   It comes from me seeing these unfamiliar terms (infinite mean, infinite variance) used in an article I am reading, googling and reading a thread on the , and not finding it a sufficiently clear explanation. I also haven't found any explanations in any of my own textbooks. Find the sum : $\frac{1}{\cos0^\circ\cos1^\circ}+\frac{1}{\cos1^\circ \cos2^\circ} +\frac{1}{\cos2^\circ \cos3^\circ}+......+$ Find the sum of the following :   (i) $$\frac{1}{\cos0^\circ \cos1^\circ}+\frac{1}{\cos1^\circ\cos2^\circ} +\frac{1}{\cos2^\circ \cos3^\circ}+......+\frac{1}{\cos88^\circ \cos89^\circ}$$  I tried :  $$\frac{1}{\cos1^\circ}\left[\frac{\cos(1^\circ-0^\circ)}{\cos0^\circ\cos1^\circ} + \frac{\cos(2^\circ-1^\circ)}{\cos1^\circ\cos2^\circ}+...\right]$$  = $$\frac{1}{\cos1^\circ}\left[\frac{\cos1^\circ\cos0^\circ}{\cos0^\circ\cos1^\circ} - \frac{\sin1^\circ \sin0^\circ}{\sin0^\circ\cos1^\circ} + \frac{\cos2^\circ \cos1^\circ}{\cos1^\circ\cos2^\circ} -\frac{\sin2^\circ \sin1^\circ}{\cos1^\circ\cos2^\circ}...\right]$$  For this, as well, I am not getting any pattern to solve further. Please suggest, thanks. Getting an error in W3C Markup Validation when trying to get a whole  element as a link in a page How to set font to Arial throughout the entire document? In preamble, I have:  \renewcommand{\familydefault}{\sfdefault} \usepackage{arial}   but it doesn't work.  How do I set my font to Arial throughout the entire document?  UPDATE:  In short, both answers work.  It really depends on the environment. If using LaTeX and don't mind using a cloned font then choose Herbert's answer. If using XeLaTex and want to use the authentic font then choose Leo's. I have a layout similar to this:  &lt;div id="..."&gt;&lt;img src="..."&gt;&lt;/div&gt;   and would like to use a jQuery selector to select the child img inside the div on click.  To get the div, I've got this selector:  $(this)   How can I get the child img using a selector? Getting the ID of the element that fired an event Irreducible polynomial which is reducible modulo every prime How to show that $x^4+1$ is irreducible in $\mathbb Z[x]$ but it is reducible modulo every prime $p$?   For example I know that $x^4+1=(x+1)^4\bmod 2$. Also $\bmod 3$ we have that $0,1,2$ are not solutions of $x^4+1=0$ then if it is reducible the factors are of degree $2$. This gives that $x^4+1=(x^2+ax+b)(x^2+cx+d)$ and solving this system of equations $\bmod 3$  gives that $x^4+1=(x^2+x+2) (x^2+2x+2) \pmod 3$. But is there a simpler method to factor $x^4+1$ modulo a prime $p$?