Trying to upgrade from 12.10 to 14.04 and not having any luck...404 error occurs
How to install software or upgrade from an old unsupported release?
I'm having some difficulty with understanding why KVL (Kirchhoff voltage law) is valid when considering an AC circuit. I mean, the system is by definition not in steady state, right? That in turn means that the change in current causes a change in the magnetic field, which is manifested within the electric potential. I realize the potential is still defined and thus a line integral over a crossed curve of ALL of it's component should be zero.   However, what I often see (for, say, RLC circuits with an AC emf) is total disregard to the time varying components of the electric potential. Only the emf of the different components are considered and their sum is said to be zero. How can that be? What about the "second" part of the potentials? What is the easiest way to duplicate an activerecord record? I want to make a copy of an ActiveRecord object, changing a single field in the process (in addition to the id).  What is the simplest way to accomplish this? I realize I could create a new record, and then iterate over each of the fields copying the data field-by-field - but I figured there must be an easier way to do this. Perhaps something like this:  new_record = Record.copy(:id) Strategies to denest nested radicals $\sqrt{a+b\sqrt{c}}$ I have recently read some passage about nested radicals, I'm deeply impressed by them. Simple nested radicals $\sqrt{2+\sqrt{2}}$,$\sqrt{3-2\sqrt{2}}$ which the later can be denested into $1-\sqrt{2}$. This may be able to see through easily, but how can we denest such a complicated one $\sqrt{61-24\sqrt{5}}(=4-3\sqrt{5})$? And Is there any ways to judge if a radical in $\sqrt{a+b\sqrt{c}}$ form can be denested?  Mr. Srinivasa Ramanujan even suggested some CRAZY nested radicals such as: $$\sqrt[3]{\sqrt{2}-1},\sqrt{\sqrt[3]{28}-\sqrt[3]{27}},\sqrt{\sqrt[3]{5}-\sqrt[3]{4}}, \sqrt[3]{\cos{\frac{2\pi}{7}}}+\sqrt[3]{\cos{\frac{4\pi}{7}}}+\sqrt[3]{\cos{\frac{8\pi}{7}}},\sqrt[6]{7\sqrt[3]{20}-19},...$$ Amazing, these all can be denested. I believe there must be some strategies to denest them, but I don't know how.  I'm a just a beginner, can anyone give me some ideas? Thank you. Copying and pasting features using PyQGIS I have created a table join between two shapefiles which I've named 'OSMM' and 'Mastermap'. I want to copy and paste all features (polygons) without a match from the target layer ('Mastermap') into the parent shapefile ('OSMM'). I can't find any up-to-update code for QGIS 3.6. Here is my code so far: #1. loads the SHP files uri = 'C:/Users/xx/Downloads/OSMM.shp' vlayer = iface.addVectorLayer(uri,&quot;&quot;,&quot;ogr&quot;) uri = 'C:/Users/xx/Downloads/Mastermap.shp' vlayer = iface.addVectorLayer(uri,&quot;&quot;,&quot;ogr&quot;)  #2. Joins &quot;InvoiceNum&quot; from OSMM to Mastermap layerToJoin = QgsProject().instance().mapLayersByName('OSMM')[0] target = QgsProject().instance().mapLayersByName('Mastermap')[0] myJoin = QgsVectorLayerJoinInfo() myJoin.setJoinFieldName('InvoiceNum') myJoin.setTargetFieldName('InvoiceNum') myJoin.setJoinLayerId(layerToJoin.id()) myJoin.setUsingMemoryCache(True) myJoin.setJoinLayer(layerToJoin) myJoin.setJoinFieldNamesSubset(['InvoiceNum']) target.addJoin(myJoin)  #3. Selects NULL features from Mastermap params = { 'EXPRESSION' : '\&quot;OSMM_InvoiceNum\&quot; is NULL', 'INPUT' : 'C:/Users/xx/Downloads/Mastermap.shp', 'METHOD' : 0 } processing.run(&quot;qgis:selectbyexpression&quot;, params)  So how do I perform the PyQGIS version of Ctrl+C on 'Mastermap' and Ctrl+V into 'OSMM'? Presumably I will then need to use the following code: #5. Save the changes OSMM.commitChanges() I would like to know the purpose of nohup these days. I ask because I read this  Nohup is short for “No Hangups.” It’s not a command that you run by itself. Nohup is a supplemental command that tells the Linux system not to stop another command once it has started. That means it’ll keep running until it’s done, even if the user that started it logs out. The syntax for nohup is simple and looks something like this: nohup sh your-script.sh &amp; Notice the “&amp;” at the end of the command. That moves the command to the background, freeing up the terminal that you’re working in. Nohup works with just about any command that you run in the terminal. It can be run with custom scripts as well as standard system commands and command line utilities.  With using linux distributions such as SLES 11.4, or RHEL/CentOS 7.x, I can  remote log in to linux over the network via SSH run the simple program below, or any other, doing ./a.out &amp; log out of linux; type exit in the putty SSH terminal my sample program below, or any other including bash, csh, or tcsh shell scripts, run to completion just fine without the need for nohup typing exit in putty to close an SSH session, I would think that qualifies as a logout?  Is there any purpose or value with nouhup today?  Is it a kernel &gt;= 3.x thing? For however long I can remember (kernel &gt;= 2.6) I've never used nohup and have always just use &amp; with no problems. Can someone give me a practical scenario where nohup would be used? #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt;  /*     sample C code, to print numbers to a file named zz.tmp     the numbers 0 to 29 over 30 seconds */  int main ( int argc, char *argv[] ) {    FILE *fp;    int i;     i = 0;    fp = fopen(&quot;zz.tmp&quot;, &quot;w&quot; );     while ( i &lt; 30 )    {       fprintf( fp, &quot;%d\n&quot;, i++ );       sleep( 1 );    }    fclose( fp );    return 0; }  mysleep.sh #!/bin/bash  sleep 1000  On Centos 7.7, optiplex pc login with keyboard &amp; mouse, my account is bash. I do nohup ./mysleep.sh and then control-z.  When typing jobs I see [1]+ Stopped nohup ./mysleep.sh A ps -ef | grep mysleep shows that process id existing, but if I close the terminal window via X in upper right corner, that process goes away so it seems nohup is not working? Was Yoda wrong about the limits of telekinesis? In Empire Strikes Back, Yoda  that an object's size doesn't matter and that the difficulty of levitating an X-Wing was only in his mind. If the upper limits of telekinesis are determined by belief, what's to stop a Jedi/Sith from pulling a moon out of orbit, moving an entire solar system, or splitting an atom with the Force? Why is plain-hash-then-encrypt not a secure MAC? The expected value of $1/(1+X)$ where $X$ has geometric distribution Let $X$ be a random variable with a geometric distribution with parameter $p$.       Calculate $\Bbb E[1/(1+X)]$   I've looked at answers online but still do not understand how to solve this.   Specifically, I do not understand how to to get from $$\frac{p}{1-p} \sum_{x=0}^\infty (1/(1+x))((1-p)^x+1)$$  to  $-p\ln(p)  /(1-p)$. This is a silly question but under what conditions is $a^{xy}=(a^x)^y$ true, given all are complex numbers? Real Analysis - Prove a set is countable I am asked to prove the following question:  For each finite set of real numbers, $F$, define $\sum F$ to be the sum of all the numbers in $F$.  For each set $P$ of positive real numbers, define $\sum P=\sup\{\sum F: F\text{ is a finite subset of } P\}$.  Suppose $P$ is a set of positive real numbers such that $\sum P &lt; \infty$. Prove that $P$ is a countable set.  My attempt (just a sketch proof):  Suppose $P$ is uncountable, $\exists \epsilon_1 &gt; 0$, s.t. $$ P_1 = [\inf P + \epsilon_1, \sup P]\cap P $$ is uncountable. Pick $a_1 \in [\inf P, \inf P + \epsilon_1] \cap P \in P$, such a $P$ must exists due to greatest lower bound property.  Now $P_1$ is uncountable, $\exists \epsilon_2 &gt; 0$, s.t. $$ P_2 = [\inf P_1 + \epsilon_2, \sup P_1]\cap P_1  $$  is uncountable. Pick $a_2 \in [\inf P_1, \inf P_1 + \epsilon_2]\cap P_1 \in P$. Carry on this process (this should be formalized using induction), we can find  $$ a_1 \leq a_2 \leq a_3 \leq ... $$ with $a_n &gt; 0$ and $a_n \in P$ for all $n$.  Now $\sup\{\sum F_n: F_n = \{a_1,...,a_n\}, n \in \mathbb{N}^+\} = \lim_{n \to \infty}\sum_{i = 1}^n a_i &gt; \lim_{n \to \infty}na_1 = \infty$. This means that $\sum P = \infty$ since $\{\sum F_n: F_n = \{a_1,...,a_n\}, n \in \mathbb{N}^+\} \subset \{\sum F: F\text{ is a finite subset of } P\}$.  I think my proof is a bit clumsy but is it correct? Google map API does not plot on different continents How to clean an E: drive (new Recovery drive since Windows 10 1803) on HP laptop How can I securely format a solid-state drive? Prove that the point of intersection of the diagonals of the trapezium lies on the line passing through the mid-points of the parallel sides Prove,by vector method,that the point of intersection of the diagonals of the trapezium lies on the line passing through the mid-points of the parallel sides.    My Attempt: Let the trapezium be $OABC$ and that the O is a origin and the position vectors of $A,B,C$ be $\vec{a},\vec{b},\vec{c}$.Then the equation of $OB$ diagonal is $\vec{r}=\vec{0}+\lambda \vec{b}................(1)$ And equation of $AC$ diagonal is $\vec{r}=\vec{a}+\mu(\vec{c}-\vec{a}).......(2)$ And the equation of the line joining the mid points of $OA$ i.e.$\frac{\vec{a}}{2}$ and $BC$ i.e. $\frac{\vec{b}+\vec{c}}{2}$ is $\vec{r}=\frac{\vec{a}}{2}+t(\frac{\vec{b}+\vec{c}}{2}-\frac{\vec{a}}{2}).........(3)$. Here $\lambda,\mu,t$ are scalars. I do not know how to solve $(1)$ and $(2)$ and put into $(3)$ to prove the desired result. Please help me.Thanks. How to know the partition where grub is installed I am Dual Booting Maverick with Natty. I want to know which partition has Grub installed.   I want to make sure that grub is installed in the maverick partition not in natty, so that when I remove the natty partition, I don't have booting problem in the absence of grub.  On maverick there is no menu.list file in /boot/grub but natty has one.  Here is the output of fdisk -l  gaurav@gaurav-desktop:~/Desktop$ sudo fdisk -l  Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9cdb9cdb     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *           1        7295    58592773+  83  Linux /dev/sda2            7295       25475   146033664   83  Linux Partition 2 does not end on cylinder boundary. /dev/sda3           25476       32194    53970367+  83  Linux /dev/sda4           32195       35483    26414081    5  Extended /dev/sda5           32195       32444     1999872   82  Linux swap / Solaris /dev/sda6           32444       35483    24413184   83  Linux gaurav@gaurav-desktop:~/Desktop$ Filter a Python list by predicate I would want to do something like:  &gt;&gt;&gt; lst = [1, 2, 3, 4, 5] &gt;&gt;&gt; lst.find(lambda x: x % 2 == 0) 2 &gt;&gt;&gt; lst.findall(lambda x: x % 2 == 0) [2, 4]   Is there anything nearing such behavior in Python's standard libraries?  I know it's very easy to roll-your-own here, but I'm looking for a more standard way. Getting "System program problem detected" pops up regularly after upgrade Bash-like, non-rotating filename tab completion with PowerShell Under Windows, using PowerShell, is it possible to make the filename suggestion (using the Tab key) work like with bash under Linux?  Let's assume a directory contains 3 directories: example1, example and examination.  On Windows (by default), if you type cd ex and Tab, it will auto-suggest cd .\examination. Subsequent uses of Tab will rotate the suggestion between example1, example and examination.  Using bash (typically under Linux), if you type cd ex and Tab, it will auto-complete until the character where the filenames start to differ: cd exam. Another use of Tab then suggests which directories are available:  $ cd exam examination/ example1/    example2/   Then, if you type p and Tab, it will auto-complete to example, and so on (here, offering a choice between example1 and example2).  Is there a way to make the filename suggestion work in a tree-like search like this, instead of rotating through the names?  (I'm mainly interested in file names. Bash can also refine this selection based on the file type, for example only directories for cd, which would be good, but having the file name selection itself would be enough.) I was working on historical data looking for anomalous patterns that we would not expect to occur at random. I'd like to create a scheme to analyze data and markets to test for statistical significance and consistency over time.  Question : Are there some tools we could use to evaluate the nonrandomness of a database? What do we use usually to say that something is random or not (statistically)? Figure we work with change in some value over time. How to find bases for a subspace defined by an equation