I have to change my computer but I want to preserve my OS as it is now. Which is the best solution to migrate my entire OS to the new computer? I can use TimeShift, but which compatibility problems or driver problems could I encounter?
I use ubuntu to deal with daily job. Now I buy a new laptop, and I want to migrate my whole system(programs, packages, data, settings, etc) to the new machine.  I know I can copy my home folder to new machine and I will get (almost) all data and settings. But is there a safe way to copy the whole system? Or it's a bad idea?
How to grep a specific line _and_ the first line of a file? Word or expression for "someone using fake kindness to hide something or his true nature" Cannot create PostGIS extension with Ubuntu 18.04 What is serial voting and how does it affect me? Most properties of a single binary operation can be easily read of from the operation's table. For example, given $$\begin{array}{c|ccccc} \cdot &amp; a &amp; b &amp; c &amp; d &amp; e\\\hline a     &amp; e &amp; d &amp; b &amp; a &amp; c\\ b     &amp; d &amp; c &amp; e &amp; b &amp; a\\ c     &amp; b &amp; e &amp; a &amp; c &amp; d\\ d     &amp; a &amp; b &amp; c &amp; d &amp; e\\ e     &amp; c &amp; a &amp; d &amp; e &amp; b \end{array}$$ it is easy to check that it is closed (no elements occur in the table which don't occur as row or column index), commutative (the table is symmetric), has a neutral element (the row and column of $d$ are copies of the index row/column), and has an inverse element for each element (there's a $d$ in each row and column). In other words, almost all important properties can immediately be seen. The only part missing is associativity.  Therefore my question: Is there a simple way to see directly from the operation's table (i.e. without doing explicitly all the calculations) if an operation is associative? I am a girl in my early twenties traveling to USA from India and in my visa application I have provided the contact address for a relative in San Francisco, and their invitation letter. I would like to visit LA first. Will I face problems during immigration if I land in LA (with an immediate on wards ticket to SF)? I dont plan to get on the flight from LA to SFO.  Initially I was planning to fly to SFO from India and then fly to LA immediately after completing immigration at SFO airport. How would one create an iterative function (or iterator object) in python? Just ran the latest batch of updates on 20.04 (Xubuntu), and now I'm getting a GRUB error: symbol 'grub_calloc' not found  I'm dropped into the 'grub rescue' shell, but have no idea what to do there that might be useful. To me, 'symbol not found' implies some sort of build error with the grub package, but I don't really know how grub works. I noticed that this update also included 'firmware', not sure if that could be related. Is my best bet just to boot from a live CD and see if I can roll back the update to grub somehow? Edited to add: OK, thanks to lots of people ! Here's what I think I now understand.  On 'non-UEFI' systems, grub is installed in two separate parts. The first, most basic, part is the part that is started on bootup. But for most of it's functionality, it needs the second part. These parts must be aligned - neither part must require any functionality from the other part which is not actually there. The visible, run-time problem occurs when these parts are not aligned, and the function grub_calloc is not supplied. It's not 100% clear to me if grub_calloc belongs in the second, larger part or the first. I would have expected the second, but the grub build system is a work of considerable art, so I don't know :).  The root cause of the problem is that the grub update has not ensured that both parts have been updated. Ideally, failure to do this should cause grub installation to fail, and the system should be reverted to a safe state. This does not happen. This is actually still a bit of a mystery to me. All that the update needs to do by default is put each part where the current parts are, because obviously that worked. If the install locations/drives are configuration - driven, and one of these locations can't be reached, then somehow a mismatch has arisen between that configuration data and reality. This might not show up as a problem as long as no new dependency was introduced between the parts.   All flavours of solution involve reinstalling grub to ensure that the two parts are aligned. It's not actually necessary to go back to the previous version ( although that will work ), because it's not the grub runtime per se that is broken. There are numerous ways to achieve this, depending on your environment, but running the Boot-repair live disk worked for me. It may be useful, for the purpose of avoiding such a misalignment in future, to ensure that the grub installer on your system is configured to install to the correct devices. This update resolves some important bugs (). If you have reverted grub to resolve this problem, be aware that you are exposed to these issues. I need to calculate possible point location based on its speed and some other factors. For example, there is a man in the middle of the forest and I need to calculate his possible location at some time periods. There are few facts about his movement:   His speed differs at certain periods of time - it can be raining, or it can be super hot - speed lowers / increases; Some objects in space - swamps, rocks - can lower his speed as well; At some time periods the man does not move at all.   So, here is the question - is there any algorithm that can calculate possible location of the man based on following parameters? The output should be a polygon for every given time_period.  {   time_periods: [{     from: 2012-12-12T20:00:00,     to: 2012-12-12T22:00:00,     speed: 5   }, {}],   objects: [{     geodata: POLYGON(...),     speed_modifier: 0.5   }, {}] }   Generated polygons will be visualized on the map afterwards. Why are empty and non empty TikZ matrix cells not equally placed? I wanted to draw an almost empty matrix of nodes with TikZ similar to the left most one below. All nodes would have same size (through minimum width and minimum height) and no separation between columns and rows. But when I include a text which needs two lines I obtain the central matrix and, if the text just needs one line the right most one. I don't know what's wrong. Do you? I'm using CVS version of TikZ.  \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{matrix}  \tikzset{ proces/.style={draw, minimum height=15mm, minimum width=2cm, outer sep=0pt, text width=1.5cm, align=center} }  \begin{document} \begin{tikzpicture}  \matrix (A) [matrix of nodes,nodes=proces,nodes in empty cells] {  &amp; \\  &amp; \\ };  \begin{scope}[xshift=4.5cm] \matrix (A) [matrix of nodes,nodes=proces,nodes in empty cells] {  &amp; OOO OOO \\  &amp; \\ }; \end{scope}  \begin{scope}[xshift=9cm] \matrix (B) [matrix of nodes,nodes=proces,nodes in empty cells] {  &amp; A \\  &amp; \\ }; \end{scope}  \end{tikzpicture} \end{document} HTML element does not fade in using jquery Modelling the "Moving Sofa" I believe that many of you know about the moving sofa problem; if not you can find the description of the problem .     In this question I am going to rotate the L shaped hall instead of moving a sofa around the corner. By rotating the hall $180^{\circ}$ what remains between the walls will give the shape of the sofa. Like this:    The points on the hall have the following properties:  \begin{eqnarray} A &amp; = &amp; \left( r\cos { \alpha  } ,t\sin { \alpha  }  \right)  \\ { A }' &amp; = &amp; \left( r\cos { \alpha  } +\sqrt { 2 } \cos { \left( \frac { \pi  }{ 4 } +\frac { \alpha  }{ 2 }  \right)  } ,t\sin { \alpha  } +\sqrt { 2 } \sin { \left( \frac { \pi  }{ 4 } +\frac { \alpha  }{ 2 }  \right)  }  \right)  \\ { B } &amp; = &amp; \left( r\cos { \alpha  } -\frac { t\sin { \alpha  }  }{ \tan { \left( \frac { \alpha  }{ 2 }  \right)  }  } ,0 \right)  \\ { B }' &amp; = &amp; \left( r\cos { \alpha  } -\frac { t\sin { \alpha  }  }{ \tan { \left( \frac { \alpha  }{ 2 }  \right)  }  } -\frac { 1 }{ \sin { \left( \frac { \alpha  }{ 2 }  \right)  }  } ,0 \right)  \\ C &amp; = &amp; \left( r\cos { \alpha  } +t\sin { \alpha  } \tan { \left( \frac { \alpha  }{ 2 }  \right)  } ,0 \right)  \\ { C }' &amp; = &amp; \left( r\cos { \alpha  } +t\sin { \alpha  } \tan { \left( \frac { \alpha  }{ 2 }  \right)  } +\frac { 1 }{ \cos { \left( \frac { \alpha  }{ 2 }  \right)  }  } ,0 \right)  \end{eqnarray}  Attention: $\alpha$ is not the angle of $AOC$, it is some angle $ADC$ where $D$ changes location on $x$ axis for $r\neq t$. I am saying this because images can create confusion. Anyways I will change them as soon as possible.  I could consider $r=f(\alpha)$ and $t=g(\alpha)$ but for this question I am going to take $r$ and $t$ as constants. If they were functions of $\alpha$ there would appear some interesting shapes. I experimented for different functions however the areas are more difficult to calculate, that's why I am not going to share. Maybe in the future.  We rotate the hall for $r=t$ in the example above: In this case:   point A moves on a semicircle  The envelope of lines between A' and C' is a circular arc. One has to prove this but I assume that it is true for $r=t$.   If my second assumption is correct the area of sofa is $A= 2r-\frac { \pi r^{ 2 } }{ 2 } +\frac { \pi  }{ 2 } $. The maximum area is reached when $r = 2/\pi$ and it's value is: $$A = 2/\pi+\pi/2 = 2,207416099$$  which matches with Hammersley's sofa. The shape is also similar or same:    Now I am going to increase $t$ with respect to $r$. For $r=2/\pi$ and $t=0.77$:    Well, this looks like .   I believe thearea can be maximized by finding the equations of envelopes above and below the sofa. Look at  where @Aretino has computed the area below $ABC$.   I don't know enough to find equations for envelopes. I am afraid that I will make mistakes. I considered to calculate area by counting number of pixels in it, but this is not a good idea because for optimizing the area I have to create many images.  I will give a bounty of 200 for whom calculates the maximum area. As I said the most difficult part of the problem is to find equations of envelopes. @Aretino did it.  PLUS: Could following be the longest sofa where $(r,t)=((\sqrt 5+1)/2,1)$ ?   If you want to investigate further or use animation for educational purposes here is the Geogebra file:      Ok, I had some free time and I count number of pixels in the sofa and I am sure that I have something bigger than Hammersley's constant.  First, I made a simulation for Hammersley's sofa where $r=t=2/\pi$ and exported the image to png in 300 dpi (6484x3342 pixels) and using Gimp counted number of pixels which have exactly same value. For Hammersley I got $3039086$ pixels.   For the second case $r=0.59$ and $t=0.66$ and I got $3052780$ pixels. To calculate area for this case:  $$\frac{3052780}{3039086}(2/\pi + \pi/2)=2.217362628$$  which is slightly less than Gerver's constant which is $2.2195$. Here is the sofa: conjunction of disjunctions and disjunction of conjunctions $(p∨q) ∧ (p∨r) ∧ (q∨r) \iff (p∧q) ∨ (p∧r) ∨ (q∧r)$  Without using set theory, how can I prove this using logical equivalences? I've tried to approach this problem with De Morgan and I've also tried the property of distributivity but I keep reaching a dead end.   How should I approach this problem?  Thank  you. Via command line, I have a log file I'd like to keep track of.  What I want is to have, basically, a tail that refreshes when the log is updated making the text scroll upwards as new lines are appended to the log file.  Is there anything out there that does that without having to write some code? I have some plasterboard screws like this:     However, without a drill I have a job getting them into the wall. Am I safe to use normal screws on hangings that aren't going to be taking a great deal of weight? In this case it is a rack of coat hooks. Zooming / Focusing certain parts of a chart in latex I am using pgfplot to draw graphs in latex. Now this is the problem I am facing:  \begin{tikzpicture}[scale=1] \begin{axis}[ybar,grid=major,bar width=2pt,width=8cm, height=8cm,xmin=1,xmax=540,ymin=1,ymax=240] \addplot [draw=black,fill=green]  table [x=size, y=cluster, col sep=comma] {sim-0.4-0.6.csv}; \end{axis} \end{tikzpicture}   It generates the following graph:    Since, I have values mainly between 0-50 on x-axis, I want to zoom there. After that, values comes around 500. S0, there are no graph points between 50 - 450. How should I do that? Imagine your college buddy is now running a multi-billion dollar company, while you're still stuck at the same white-collar day job 5 years after graduation. You chat with him and want to express the idea that you're happy for him and fancy having his lifestyle--something like "I wish I could buy a yacht and cruise around the world like you do; I'm glad you're doing really well!"  Basically, it's the feeling of envy when you take out the resentment from it. Is there a word for it?   (I thought about "admire", but found it too strong and broad) Remove Archives in category title How I can remove word "Archives" in head title in category page? I'm using the Twenty Twelve theme and WordPress 4.   &lt;head&gt; &lt;title&gt;"name of category" Archives  | "name of sites"&lt;/title&gt; &lt;/head&gt; How to properly hook up various maps types in Cycles? I created some texture maps in MindTex to use in Blender, but I can't figure out how to properly hook them up. The maps I have:  - Diffuse  - Normal  - Height   - Specular   - Gloss   - Self Illumination  - Reflection  - Ambient Occlusion   MindTex (left) vs. Blender (right)  As you can clearly see it's a pretty big difference.  is my material node setup in Blender. In the examples I don't actually use self illumination or reflection images, but including this in the answer would be helpful. I'm working on a WordPress site for my band and I'd like to mark every 3rd post on our blog page to have a special class applied to it, anybody have any pointers on how to achieve this? Any help is very very appreciated, thanks! rock n roll.