Java Command line system call does not work properly
How to make pipes work with Runtime.exec()?
How to write a function (piecewise) with bracket outside? How to write this Piecewise function using LaTeX?  I tried $ \begin{array}{cc}   \{ &amp;      \begin{array}{cc}       0 &amp; x\leq 0 \\       \frac{100-x}{100} &amp; 0\leq x\leq 100 \\       0 &amp; 100\leq x     \end{array} \end{array} $  but it didn't work perfectly, the bracket &quot;{&quot; looks small, see: How can I run a different command but with the same arguments? For example, I edit and then run the same source.   vim arbit.py python arbit.py   I know I could run it from within vim, but I want a general solution on Bash. I keep finding situations where I reuse arguments.  How can I do that? How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities? Let $f_n(x) : \mathbb{R} \rightarrow \mathbb{R}$ be defined as $\dfrac{x}{n}$. Is $f_n$ uniformly convergent?   With "$(a_n)$ is limited and $(b_n)$ converges to 0 $\Rightarrow (a_nb_n)$ converges also to 0" i would guess that $x\cdot \dfrac{1}{n}$ converges uniformly but $x$ is not limited in this case. So does ist converge uniformly or not? I'm trying to define a new environment that consists of a split environment inside an equation environment. But I'm getting an error. Here's what I'm doing:  \documentclass[a4paper,12pt]{article} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage{amsmath} \newenvironment{example}{\begin{equation}\begin{split}}{\end{split}\end{equation}}  \begin{document} \begin{example}oi\end{example} \end{document}   And the error message I'm getting is:   ERROR: LaTeX Error: \begin{split} on input line 8 ended by \end{example}.   I then tried a few other cases. If I remove the splits and define example to be just equation, it runs fine. If I remove the equations and define example to be just split, I get the exact same error message.  In other words: I only get this error when split is involved. Is there a way to make this work?  EDIT: The reason I'm doing this, is because I want a convenient way to create split-equations. I know it's similar to align. I prefer split-equations because the entire line of equations gets a single number for referencing (it's even placed in the middle line). align, however, will force me to \notag each line, otherwise I get a number for each line in the equation (which tends to get messy when equations are long and numerous). It's not the end of the world, but the split-equation combination is just quicker and easier (if I can manage to define a command for it).  Alternatively, the multline environment is not appropriate either, because it doesn't let you manually align each line (like aligning the equal signs). Instead it only lets you push everything left or right.  EDIT2: I just tried this:  \newenvironment{example}{ \begin{equation}\split}{\endsplit \end{equation}}   and got this error  ERROR: LaTeX Error: \begin{equation} on input line 8 ended by \end{example}.   Which is weird, because removing \split and \endsplit entirely doesn't return any errors (so it's not equation's fault). Is it possible to set up and watch a game between just computer AI opponents? No human players, just AI and have the ability to scroll around and see what the AIs are doing with the turn management being also automated, so the AIs just end turn when they are done. Oh, and all of this hopefully without any sort of fog of war.  This way, I can see how the AI manages resources and units and maybe learn a thing or two as a civ newb. I have looked at other questions on this site (e.g. "why does space expansion affect matter") but can't find the answer I am looking for.  So here is my question: One often hears talk of space expanding when we talk about the speed of galaxies relative to ours. Why, if space is expanding, does matter not also expand? If a circle is drawn on balloon (2d plane), and the balloon expands, then the circle also expands. If matter is an object with 3 spatial dimensions, then when those 3 dimensions expand, so should the object.  If that was the case, we wouldn't see the universe as expanding at all, because we would be expanding (spatially) with it.  I have a few potential answers for this, which raise their own problems:   Fundamental particles are 'point sized' objects. They cannot expand because they do not have spatial dimension to begin with. The problem with this is that while the particles would not expand, the space between them would, leading to a point where the 3 non-gravity forces would no longer hold matter together due to distance Fundamental particles are curled up in additional dimensions a la string theory. These dimensions are not expanding. Same problems as 1, with the added problem of being a bit unsatisfying. The answer seems to be (from Marek in the previous question) that the gravitational force is so much weaker than the other forces that large (macro) objects move apart, but small (micro) objects stay together. However, this simple explanation seems to imply that expansion of space is a 'force' that can be overcome by a greater one. That doesn't sound right to me. 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. How do I rip audio from a DVD? I remember reading a long time ago how you can rip the audio (music) from a DVD and convert it to a usable/readable format.  I can't find that article any more. Can anybody help me? So I understand what a static method or field is, I am just wondering when to use them. That is, when writing code what design lends itself to using static methods and fields.   One common pattern is to use static methods as a static factory, but this could just as easily be done by overloading a constructor. Correct? For example:  var bmp = System.Drawing.Bitmap.LoadFromFile("Image01.jpg");   As for static fields, is creating singelton-objects their best use? What exactly goes into a transformer's VA rating? At a fundamental level it seems that there has to be a limit to what the VA rating can represent.  For example if I draw 2 Amps-RMS from the secondary of a 30VA rated transformer at 15 Vrms this makes sense as the maximum Complex Power I can draw. Still, at a power factor of 1 my maximum current in the transformer would be sqrt(2) * 2 Amps.   But what if my power factor is abysmally low (ie in a DC rectifier) due to harmonic distortion and while I still draw 2A-RMS I have brief current spikes of 15 Amps? Surely the transformer's magnetics couldn't handle these spikes as I'd expect the core would saturate.  My question is what is the practical limit for VA ratings of transformers? Would brief current spikes that reduce to only 2A-RMS in this case be fine? Obviously the secondary/primary copper losses play a part in the rating but how do the magnetics factor in?  I ask this because I am designing a simple bench power supply using a 125VA transformer with a 24Vrms secondary and am trying to figure out how much power I can draw before the current spikes into the inductor are too much for the transformer. I also don't want to have to resort to active PFC as I don't want to risk messing up any HVAC PCB design.  Thank you When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed.    Does anyone care to offer an efficient algorithm on how best to do this? The orbit of satellites around Earth eventually decays, or so I read. This is typically caused either by atmospheric drag, or by tides. I would assume most satellites have a limited service life in orbit. Hence the question - What is the typical orbital life of a satellite? How long before it's successor must be launched into orbit ?  EDIT: For instance, a weather satellite I currently have an ec2 &quot;t2.nano&quot; instance up and running. I would like to switch to a &quot;t2.micro&quot;. In order to do that, I need to stop the instance. But I would lose my IPv4 address in the process. And I do not want that (because I have several ssh tunnels up and running from rasps in the wild that are currently hard coded to connect to this IPv4 address). I decided to create an Elastic IP address. But I understand that by creating an Elastic IP address and assigning it to my current ec2 instance, I would lose my current IPv4 address too. Is it possible to create an Elastic IP address from the current IPv4 address of my ec2 instance? If so, how can I do this operation? Windows 8 Pro clean install - everything slow; hard drive at constantly at 100% Yesterday, I have downloaded and installed Windows 8 Professional, after downloading it (legally) and burning it to a DVD, on my 3-year-old  (Intel Core Duo 2x2.4&nbsp;GHz, 4&nbsp;GB RAM,  hard disk drive).   The installation failed two or three times, each time differently (error codes, for example 0xc000021a, with an infinite boot loop), but finally I completely formatted the hard drive and installed. Seemingly, everything was OK.  However, after booting successfully, the OS is extremely slow. When I open the task manager, it shows that the HDD is at 100% - however, no application or background process or Windows process can be made responsible. I searched the Internet and found that Windows might try to "index" the hard drive, but I did't find a process that isn't also on my second computer, which still uses the Release Preview (restarting every two hours). Also, the startup is empty, and HD Tune and HDD Health show that the drive health is OK, even though I don't know how reliable these two programs are.  I looked for diagnose software from Toshiba, but they only offer tools for "Fujitsu branded Toshiba devices"; I tried it out, and it did not work on my hard drive.  Does this sound like a hard drive failure? The laptop is 3.5-years-old, has been carried around sometimes roughly and was used (and on) most of the time. However, it would have failed exactly the night before installing Windows&nbsp;8 Profesional, which seems - unlikely.  If this is a software error - then what did I do wrong if this occurs from the moment of installation (even the personalization at the end of installation took half an hour)? How can I fix this? I have run a multiple linear regression using stepwise regression to select the best model, however the best model returned has a non-significant variable. When I remove this the AIC value goes up indicating the model without the significant variable is a worse fit. Should I remove the non-significant predictor or should I leave it in as it is a better model? What is exactly the density of a black hole and how can it be calculated? Disabling middle mouse button If I have a $2\times 2$ or $3\times 3$ matrix, how should I go about computing the eigenvalues and eigenvectors of the matrix?  NB: I am making this question to provide a unified answer to questions about eigenvalues of small matrices so that all of the specific examples that come up can be marked as duplicates of this post. See . Polite or unrectified placement of the word please