I'm using Ubuntu 15.04. I was not able to update so I followed the instructions from  answer. Now I'm getting these error messages when I run sudo apt-get update:  E: Type '&lt;!DOCTYPE' is not known on line 1 in source list sud/etc/apt/sources.list  E: The list of sources could not be read.   How can I fix this?
There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.
Convert file contents to lower case I have temp file with some lower-case and upper-case contents.  Input  Contents of my temp file:  hi Jigar GANDHI jiga   I want to convert all upper to lower.  Command  I tried the following command:  sed -e "s/[A-Z]/[a-z]/g" temp   but got wrong output.  Output  I want it as:  hi jigar gandhi jiga   What needs to be in the substitute part of argument for sed? What is behind the definitions of work and energy? Equivalent definition of metric compatibility for a connection: what does $\nabla g$ mean? So the definition I know for metric compatibility is:  $$Xg(Y,Z)=g(\nabla_XY,Z)+g(Y,\nabla_XZ),$$   which make sense, as $g(Y,Z)$ is a smooth function from the manifold to reals and we think of $X$ as a derivation. So now I read this apparent equivalent definition that says $\nabla g=0$. Can someone explain what this means? How can I do $\nabla$ of $g$ I thought $g_p$ is an element of $T_p^*M\otimes T_p^*M$ at every point. Furthermore after you explain the meaning of this can you show me that these two definitions are indeed equivalent? How do I stop mod_rewrite from appending links to url? Error java.lang.OutOfMemoryError: GC overhead limit exceeded In how many ways can $500$ indistinguishable students select books from $10$ titles if no more than $20$ copies of one particular text are selected? Assume that there are an arbitrarily large number of copies of ten diﬀerent discrete math books (which we will call titles) for cmsc250. Each student must choose one title as the course text book. Assume that the ﬁve hundred students taking the course are indistiguishable.  How many diﬀerent ways can the students choose titles, if Epp must be chosen by at most twenty students?   I understand that this is a stars and bars problem where the formula would be ${n+r-1}\choose{r-1}$, but whats throwing me off is the "at most" parameter of the problem. My answer is ${480+9-1}\choose{9-1}$ My reasoning was that we now have one less "bar", and that should be shown by lowering $r$ by 1  Am I approaching this the right way? For any natural number $n\ge 1$, given pairs $(a_1,b_1),(a_2,b_2),...,(a_n,b_n)$ of integer numbers, there exist integer number $c$ and $d$ such that  $$\prod_{i=1}^{n}(a_i^2+b_i^2) = c^2+d^2$$    My initial approach is  Base Case: $(a_1^2+b_1^2) = a_1^2+b_1^2$ which is true. (Although it is trivial)  Prove the statement is true when $n=2$: We have $$(a^2+b^2)(c^2+d^2) = (ac-bd)^2+(ad+bc)^2$$ (Thanks André Nicolas for pointing it out)   So if $a,b,c,d$ are integers, $ac,bd,ad,bc$ are all integers and integers are closed under addition and subtraction. Hence $(ac-bd),(ad+bc)$ are integers.   Inductive Hypothesis: $\prod_{i=1}^{n}(a_i^2+b_i^2) = c^2+d^2$ is true  Inductive Step: $$\prod_{i=1}^{n+1}(a_i^2+b_i^2) = \prod_{i=1}^{n}(a_i^2+b_i^2)\cdot (a_{n+1}^2+b_{n+1}^2) = (c^2+d^2)\cdot (a_{n+1}^2+b_{n+1}^2)$$  Where $c$ and $d$ are integers.   But when we apply $n=2$, we have  $(c^2+d^2)\cdot (a_{n+1}^2+b_{n+1}^2) = (e^2 + f^2)$ where $e$ and $f$ are integers.  Hence, by the principle of induction, the statement we needed to prove is true. Books on Number Theory for Layman Complicated FOR loop nesting. Having trouble cleaning up legacy code I am trying to tidy up some really bad legacy code from an old developer and I'm trying to get rid of these nested for loops. The code below shows what I'm currently working with. I've fixed this before with nested SOQL queries but nothing like this. How would this need to look to remove these for loops (except Trigger.New)? Would I use Maps? How would I do that?  map&lt;Id,SObject&gt; mapProperyIdBudDetail = util.GetObjFields(setPropertyId, 'Property'); map&lt;Id,SObject&gt; mapSpaceIdBudDetail = util.GetObjFields( PropertyMap.keyset(), 'Space');  for ( Lease__c l: Trigger.New ) {      if(mapProperyIdBudDetail.get(PropertyMap.get(l.space__c))!=null) {          lProperties = new List&lt;SObject&gt;{mapProperyIdBudDetail.get(PropertyMap.get(l.space__c))};              for ( SObject p: lProperties ) {                  for ( String fm: FieldMap.keyset() ) {                      if ( p.get(FieldMap.get(fm)) != Null) {                         l.put(fm,p.get(FieldMap.get(fm)));                     }                  }             }     } } SSH: How to disable weak ciphers? Corrupt MXD Causes? How to recover from a Nvidia fail on Ubuntu 16.04? I have an older Nvidia video card and my PC crashes when installing the driver for the video card in Ubuntu 16.04. When I get to the login screen but no further: after entering my password, the system went into a loop and returned always back to the login screen [with funny stripes present].   How do I fix this problem? How to create script with auto-complete? When I use program like svn and I type in Gnome Terminal:  svn upd   and hit Tab it's autocompleted to:  svn update   Is it possible to do something like that in my custom bash script? Random test data: How to do it right? There are a few examples of pairs of words ending with -ee/-er like employee and employer or advisee and adviser. What I was curious about is if there was any rule that would describe the relationship of the objects in a pair like this and situations when it's appropriate to create a counterpart for a given word.   I'll give you an example. It's relatively common in the computer programming world to see the word dragee, which describes an object that is being dragged with a mouse. I understand that this is a relatively new word and could not be found in any dictionary (I've tried). Is that acceptable to make up words like this one or is it just bad English? Is "singular noun + and + singular noun" singular or plural? When I type "[singular noun] and [singular noun]" in Word 2010, I find some interesting things.        Bread and butter is essential. (the auto-correction warns me of subject-verb disagreement.)   Bread and butter are essential. (OK)   A knife and fork is on the table. (OK)   A knife and fork are on the table. (OK)   The needle and thread is new. (OK)   The needle and thread are new. (OK)   Cost and revenue is directly linked. (OK)   Cost and revenue are directly linked. (OK)      I wonder how a native speaker would consider this phenomenon. Show that $\langle x,y\rangle_A = \langle Ax,Ay\rangle$ is an inner product on $\mathbb R^n$ Let $A$ be an $n \times n$ matrix with real enteries. Define $\langle x,y\rangle_A = \langle Ax,Ay\rangle, \quad x,y \in \mathbb R^n$ , where $\langle,\rangle$ is a standard inner product on $\mathbb R^n$. Then  $\langle x,y\rangle_A$ is an inner product iff  1)  $\ker A = \{0\}$.  2) $\operatorname{rank} A= n$.  3) all eigenvalues of $A$ are positive.  4) all eigen value of $A$ are non negative.  Clearly if $\ker A \neq \{0\}$, then there exist $x \neq 0$ such that $Ax =0$, then $\langle Ax, Ax\rangle_A = 0$, then $\langle ,\rangle_A$ is not inner product, so $\ker A = \{0\}$, thus rank of $A$ is $n$.  I am unable to check the 3) and 4) option. Please help to check the other option. Thank you Not able to calculate sum of multiple column where file data in different format .csv I have a scenario where i want to calculate sum of column   SAL|CAL|TAG|VAL 12.11"|"1.1"|"2.1"|"1.1 13.11"|"1.1"|"2.2"|"2.2 14.11"|"1.1"|"2.4"|"2.4   My below code not giving output giving output as 0.00  I need output for this column CAL VAL  awk -F'|' '{T+=$2} END { printf "%.2f\n", T }' demo.txt   output :  6.7 5.7 How do you make Vim unhighlight what you searched for? I search for "nurple" in a file. I found it, great. But now, every occurrence of "nurple" is rendered in sick black on yellow. Forever.  Forever, that is, until I search for something I know won't be found, such as "asdhfalsdflajdflakjdf" simply so it clears the previous search highlighting.  Can't I just hit a magic key to kill the highlights when I'm done searching? Turn off close Facebook friend notification