My primary partition is running out of space (/dev/sda1). The main partition (/dev/sda) having much more free space. I want to transfer space from (/dev/sda) and extend to (/dev/sda1) partition which is my primary partition and have all linux boot, kernel etc files.   sudo fdisk -l Disk /dev/sda: 204.8 GB, 204803670016 bytes,400007168 sectors  Units = sectors of 1 * 512 = 512 bytes  Sector size(logical/physical): 512 bytes / 512 bytes I/O size(minimum/optimal): 512 bytes / 512 bytes  Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048   199997439    99997696     Linux
I have a Virtual machine using centos 7 with 200GB disk.For some reason my layout is:  df -h Filesystem               Size  Used Avail Use% Mounted on /dev/sda1                100GB  95GB  5GB      Running fdisk -l:  Disk /dev/sda: 204.8 GB, 204803670016 bytes,400007168 sectors  Units = sectors of 1 * 512 = 512 bytes  Sector size(logical/physical): 512 bytes / 512 bytes I/O size(minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0006c283  Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048   199997439    99997696     Linux   I would like to increase my space on my partision /dev/sda1.
Why is causality preserved in special relativity? PART 1: I was reading the article  Wikipedia. I couldn't understand this line:       "if the two events are causally connected ("event A causes event B"), the causal order is preserved (i.e., "event A precedes event B") in all frames of reference."     Is this an assumption or a consequence of STR? Please explain.       Note: My question consists of 2 parts this is the 2nd part. Below is a genral version of my previous question question:.   PART 2: Let there be three events $A$,$B$ and $C$ s.t: $C$ is the result of Simultaneous occurrence of $A$ and $B$. In other words $C$ occurs iff $A$ and $B$ are simultaneous. Now as we know in STR any two events separated in space are not simultaneous in different frames. So In some frames $C$ will occur and in some $C$ will not occur which will cause paradox. I tried many thought experiments to make such a paradox but i failed. In all the experiments that i thought i could not break the causality even by breaking the simultaneity because everytime the fact: "all signals move slower than light" preserved the causality.    So why causlity remains preserved always? Is it due to the fact that nothing can move faster than light? How does an isolated body in deep space 'know' it's rotating? We can imagine an object floating in the known universe, maximally distant from any other large mass. Maybe it has been there since coalescing after the big bang.  What physical phenomena tell it whether it is rotating relative to the rest of the universe and therefore experiencing a centrifugal (?) force.  Is it the combined gravity of all other matter? Is it 'spooky action at a distance'?  Is it because it is rotating relative to 'empty space'? What's the best way to scan in hundreds of pictures? I have thousands of old pictures which were sitting in a photo album. Unfortunately, instead of the photo album protecting the pictures, the plastic coverings yellowed, and the pictures themselves had to be carefully extracted from the books. There is also quite a bit of powdered paper (the backings on the books pretty much fell apart while we extracted the pictures), and the fronts of the images are still a bit sticky.  These pictures are 30+ years old, are often extremely faded, and were originally taken on (what I think is) "110 film" -- they are approximately 2.5" squares.  Anyway, I need to scan all these images in to preserve them from further decay. Unfortunately, it's taking forever -- going through less than 100 images took an entire day, even if one discounts any time spent in Photoshop trying to remove some of the photo album's artifacts on the images.  What I really need is some method of scanning the images in faster. Most automated solutions aren't going to work because they accept 4x6s as their smallest image size, and even if that was not the case, the adhesives still stuck to the prints would probably ruin any such device in 5 seconds flat.  Is there a better way of doing this (i.e. fast scanner?) that wouldn't take so much time? I have a string variable that represents the name of a custom class. Example:   string s = "Customer";   I will need to create an arraylist of customers. So, the syntax needed is:  List&lt;Customer&gt; cust = new ..    How do I convert the string s to be able to create this arraylist on runtime? Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (&gt;= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this? I have seen several answers and proofs here at MSE that a self-adjoint operator $T$ on a Hilbert space $H$ where $T^2=T$, implies $T$ being an orthogonal projection operator.   The thought struck me; what would happen if the condition $T^2=T$ is replaced by $T^3=T^2$ or instead by $T^4=T^3$ or why not more generally by $T^n=T^{n+1}$ for some $n\in\mathbb{N}$? Would this still imply $T$ to be an orthogonal projection operator?  I guess someone must have thought of this before me? In that case perhaps there is a reference in the literature for this or perhaps the proof is way simpler than I might expect? Installing File Geodatabase (*.gdb) support in QGIS? I have spent around 2 days to find the way to open GDB (Esri geodatabase) in QGIS (or any other open source software) but still without success.  I have downloaded the newest OSGeo4W installer and tried the setup - express desktop install - all packages, as well as advanced install incl gdal-filegdb.  Can you describe a more detailed procedure, including installation and how to open .gdb in QGIS (OSGeo4W installation)? Prove: if $|z|=1$ than $\frac{z+1}{z-1}$ is an imaginary number Prove: if $|z|=1$ than $\frac{z+1}{z-1}$ is an imaginary number    I have tried to look at $$\frac{z+1}{z-1}=\frac{z+1}{z-1}\cdot \overline{\frac{z-1}{\overline{z-1}}}=\frac{z+1}{z-1}\cdot \frac{\overline{z}-1}{\overline{z}-1}$$  But did not get far Some sort of battle school (no, not Ender's Game), where teens are being trained as military commanders.   The control system for their army hinges around some sort of system that requires extremely fine motor control -- being able to "push" around digital representations of military units using a special interface that interprets minute finger movements.  The boy protagonist eventually meets a girl in the battle school, and is astonished to learn that most people do not live as well as he does -- for instance, he gets a fresh jumpsuit outfit every day and disposes of the old one; this is a luxury.  One scene I recall is them kissing for a moment in some sort of underground passageway; the boy protagonist notes the exact length of the kiss, as he has been trained to have heightened time perception.  I don't recall much about other commander characters; I think they have different special abilities, and one other major character might have physical deformities, possibly because of postwar-radiation-related birth defects.  They have been training for an upcoming, prearranged final battle between all the existing national governments; the military units are very possibly robotic or entirely digital in nature, so as to avoid wasting materiel / human life.    They ultimately win the battle, just barely; I think the girl protagonist gives them an edge in the competition by hacking the timing / control system in favor of their team, causing a discrepancy which only the boy protagonist notices due to his heightened perceptions.  It was agreed that the winning government gets dominion over one of the few islands of land left that was not irradiated in some previous war; the protagonists get to live there as a reward for their victory.  I believe the boy protagonist later realizes he's gradually losing his ability to exactly quantify the passage of time.  Published no later than 2004, likely somewhere between 1980-2000, probably sometime in the '90s. "It is to be discussed", what is the infinitive doing in this sentence? It is to be discussed.   Is be + infinitive forming the future tense here?      You are to be dressed and ready by 8:00.   I was thinking it's almost commanding (or speaking of a command) but this doesn't seem to be the case, as sentences like this are commanding without this structure:     You will be dressed and ready by 8:00.   or      You are going to be dressed and ready by 8:00.   And there's sentences like this that don't imply commandment in any way:     I am to go home tomorrow!   or     I am to be home tomorrow!   (Slightly different meaning, same general sentiment)  So what's going on with the be + infinitive structure? How to enable sleep/standby on Windows Server 2012 Hyper V Problem storing arrays with update_user_meta I am writing a function that adds an ID number to an array and puts the array in the usermeta. $_GET['auction'] is the post_id.  Below is the function:  $reminders = get_user_meta( $current_user-&gt;ID, "reminders" ); print_r( $reminders ); if( in_array( $_GET['auction'], $reminders ) ) {     echo "Failed: Auction already in list"; } else {     array_push( $reminders, intval( $_GET['auction'] ) );     if ( update_user_meta( $current_user-&gt;ID, "reminders", $reminders ) ) {         echo "Success";     } else {         echo "Failed: Could not update user meta";     } } print_r( $reminders );   Here is the output after adding one auction:  Array ( )  Success Array ( [0] =&gt; 7 )    Here is the output after adding two auctions:  Array ( [0] =&gt; Array ( [0] =&gt; 7 ) )  Success Array ( [0] =&gt; Array ( [0] =&gt; 7 ) [1] =&gt; 73 )   And here is the output after adding three auctions:  Array ( [0] =&gt; Array ( [0] =&gt; Array ( [0] =&gt; 7 ) [1] =&gt; 73 ) )  Success Array ( [0] =&gt; Array ( [0] =&gt; Array ( [0] =&gt; 7 ) [1] =&gt; 73 ) [1] =&gt; 0 )   Notice that adding a new element to the array using array_push works fine. But when the array is stored in the usermeta then retrieved again, the last element in the array has been put into an array of its own, creating an infinitely dimensional array. I'd prefer to keep this array one dimensional.  Is there a way I can run update_user_meta and get_user_meta without it changing the structure of my array? What does the factorial of a negative number signify? I understand that the factorial gives the number of arrangements. For example: the factorial of zero i.e. an empty set ( doesn't occur) is 1.   As the empty set can be arranged only in 1 way - i.e. by filling nothing. Now, let's take an example: 5 distinct seats. How many ways 5 distinct seats can be arranged? - 5! ways i.e. 120.  So, basically, factorial gives us the arrangements. Now, the question is why do we need to know the factorial of a negative number?, let's say -5. How can we imagine that there are -5 seats, and we need to arrange it? Something, which doesn't exist shouldn't have an arrangement right? Can someone please throw some light on it?. I saw some research done on the formula - Let $f : U \to V$ and $g : V \to W$ be linear transformations on the vector spaces $U$, $V$, and $W$. Supposedly,  $$ \dim(\ker(g \circ f)) = \dim(\ker(f)) + \dim(\ker(g) \cap \operatorname{im}(f)). $$  How might I go about proving that?    (Attempt:) The $\dim(\ker(g)\cap\operatorname{im}(f))$ term suggests to me that I should define a vector space $V' = \ker(g) + \operatorname{im}(f)$ to invoke the theorem that  $$ \dim(V') = \dim(\ker(g)) + \dim(\operatorname{im}(f)) - \dim(\ker(g) \cap \operatorname{im}(f)), $$  but I don't really see where to go from there. How to select more layers with GIMP? In Adobe Photoshop I am able to select multiple layers at once with Shift+Click.  How can I do that in GIMP? I found a feature request at  but it doesn't seem easy to get a column view with Nautilus while with Mac OS X it's a default feature.  Have I missed something or is this not currently possible? Are mounts proficient in armour (barding)? My overall upgrade went well, but I am left with a critically lingering issue of mysql-server not being able to install itself, and nothing I am trying gets it to work.  This is the error I see when trying to install/reinstall it:  Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ... Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.7 (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server:  mysql-server depends on mysql-server-5.7; however:   Package mysql-server-5.7 is not configured yet.  dpkg: error processing package mysql-server (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                    Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing:  mysql-server-5.7  mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)   I've tried completely removing it, though doing so attempts to install MariaDB because of dependencies (?). Any suggestions on what I can do to fix this would be most welcome.  EDIT: Looks like I'm not the only one: Using pgfplots, why do I get "undefined control sequence" when trying to use a foreach variable as a parameter to addplot? Since I have multiple plots with error bars, I would like to shift the error bars slightly to make the overall plot more readable. However, when I try to do this using the variable of a \foreach as the amount to shift, I get an "undefined control sequence" error.  \documentclass{article}  \usepackage{tikz} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture} \begin{axis} \foreach \x/\y in {a/-1cm, b/0cm, c/1cm} {     \addplot+ [         %every error bar/.append style={xshift=\y},         %every node/.style={xshift=\y},         error bars/y dir=both,         error bars/y explicit,     ] coordinates {         (0, 0) +- (0, 1)         (1, 0) +- (0, 1)         (2, 0) +- (0, 1)     }; } \end{axis} \end{tikzpicture}  \end{document}   (The document does not compile when I uncomment either one of the two comments.)  What's wrong here?  EDIT: Added another variable to the \foreach. In my actual use-case it would contain the filename to plot data from or the label to use for the curve. The code below compiles, but has different behavior for the char type than for the int types.  In particular     cout &lt;&lt; getIsTrue&lt; isX&lt;int8&gt;::ikIsX  &gt;() &lt;&lt; endl;    cout &lt;&lt; getIsTrue&lt; isX&lt;uint8&gt;::ikIsX  &gt;() &lt;&lt; endl;    cout &lt;&lt; getIsTrue&lt; isX&lt;char&gt;::ikIsX  &gt;() &lt;&lt; endl;   result in 3 instantiations of templates for three types: int8, uint8 and char. What gives?  The same is not true for ints: int and uint32 which result in the same template instantiation, and signed int another.  The reason seems to be that C++ sees char, signed char and unsigned char as three different types. Whereas int is the same as a signed int. Is this right or am I missing something?  #include &lt;iostream&gt;  using namespace std;  typedef   signed char       int8; typedef unsigned char      uint8; typedef   signed short      int16; typedef unsigned short     uint16; typedef   signed int        int32; typedef unsigned int       uint32; typedef   signed long long  int64; typedef unsigned long long uint64;  struct TrueType {}; struct FalseType {};  template &lt;typename T&gt; struct isX {    typedef typename T::ikIsX ikIsX; };   // This  int==int32 is ambiguous //template &lt;&gt;            struct isX&lt;int  &gt;    { typedef FalseType ikIsX; };  // Fails template &lt;&gt;            struct isX&lt;int32  &gt;  { typedef FalseType ikIsX; }; template &lt;&gt;            struct isX&lt;uint32 &gt;  { typedef FalseType ikIsX; };   // Whay isn't this ambiguous? char==int8 template &lt;&gt;            struct isX&lt;char  &gt;  { typedef FalseType ikIsX; }; template &lt;&gt;            struct isX&lt;int8  &gt;  { typedef FalseType ikIsX; }; template &lt;&gt;            struct isX&lt;uint8 &gt;  { typedef FalseType ikIsX; };   template &lt;typename T&gt; bool getIsTrue(); template &lt;&gt;           bool getIsTrue&lt;TrueType&gt;() { return true; } template &lt;&gt;           bool getIsTrue&lt;FalseType&gt;() { return false; }  int main(int, char **t ) {    cout &lt;&lt; sizeof(int8) &lt;&lt; endl;  // 1    cout &lt;&lt; sizeof(uint8) &lt;&lt; endl; // 1    cout &lt;&lt; sizeof(char) &lt;&lt; endl;  // 1     cout &lt;&lt; getIsTrue&lt; isX&lt;int8&gt;::ikIsX  &gt;() &lt;&lt; endl;    cout &lt;&lt; getIsTrue&lt; isX&lt;uint8&gt;::ikIsX  &gt;() &lt;&lt; endl;    cout &lt;&lt; getIsTrue&lt; isX&lt;char&gt;::ikIsX  &gt;() &lt;&lt; endl;     cout &lt;&lt; getIsTrue&lt; isX&lt;int32&gt;::ikIsX  &gt;() &lt;&lt; endl;    cout &lt;&lt; getIsTrue&lt; isX&lt;uint32&gt;::ikIsX  &gt;() &lt;&lt; endl;    cout &lt;&lt; getIsTrue&lt; isX&lt;int&gt;::ikIsX  &gt;() &lt;&lt; endl;  }   I'm using g++ 4.something