Does GregorianCalendar constructor check invalid input?
How to sanity check a date in Java
Proving complex series $1 + \cos\theta + \cos2\theta +... + \cos n\theta $ So I have this result  $1 + z + z^2 + ... + z^n = \frac{z^{n+1}-1}{z-1}$  which I proved already. Now I am supposed to use that result and De Moivre's formula to establish this identity     $1 + \cos\theta + \cos2\theta +... + \cos n\theta = \frac{1}{2} + \frac{\sin[(n+\frac{1}{2})\theta]}{2\sin(\frac{\theta}{2})}$   Can anyone help me? How come SG-1 couldn't get back to Earth? In Stargate SG-1 S02E16, , SG-1 (Captain Carter, Teal'c and two other members, who replaced Colonel O'Neill and Dr Jackson) is "trapped" on planet in binary system, where second star has risen and is slowly raising temperature - Samantha Carter says, in one moment, that it's going to reach 200°F soon - and dialing device is locked mid-dial. Yet, SGC manages to dial the planet and send them instructions how to repair the device and off-world team makes it back.  Why didn't they come back when Earth first dialed P9Q-281 to contact SG-1? I mean, from my understanding, stargate wormhole is two-directional, meaning it doesn't matter which end it was activated from, yet it seems like it is one-directional from the events of this episode... MPPT charging a li-ion battery I just designed this MPPT solar charge controller which outputs 4.2 V regulated via MPPT, it uses the SPV1040 IC. This will be used on a satellite with 4 side panels, each with 8 solar cells in parallel outputting 2.6 V at approximately 122 Ma. Each panel will have this exact circuit and all the outputs will be connected in parallel to a 3.7 V lithium ion camera battery.  When active only 1 solar panel will be active and the other MPPT circuits will be offline or providing a very low amount of current. How should I connect the 4.2v to the battery, just directly or using some sort of controller to stop charging at 4.2v? Keep in mind the battery will always have a load and it will charge for around 50m in a 90m cycle due to being eclipsed. I would obviously like the battery to last as long as possible so I am not sure what are the implications of constantly having a battery connected to 4.2 V during 50m. Thanks.   The schematic was made based off a simulation made using the ST Edesignsuite directly from the provider.  Excuse my previous question about this, wasn't properly worded. How to run a script without closing the terminal? I have a script in file bla.sh and it is executable. When I click on it, the script is executed and the window is closed. I'd like the window to stay open.  Something like command cmd /k** command in Windows.  P.S. I don't want to use pause, but I want to able to write more commands after the script was executed. How to show that the cohomology of a Grassmannian has a basis consisting of the equivalent classes represented by Schubert cycles? Let $G(r, n)$ be the Grassmannian of the set of all $r$-planes in a $n$-dim vector space. How to show that the cohomology of a Grassmannian has a basis consisting of the equivalent classes represented by Schubert cycles? I am confused since I don't know how to compute the cohomology of a variety (how to construct the co-chain complex). I am really appreciate if you can compute the cohomology of, for example, $G(2,4)$ and show that it has a basis consisting of the equivalent classes represented by Schubert cycles. Sudo doesn't work on Aliases I have added alias ll='ls -la' in /etc/bash.bashrc but sudo ll is not working. Is there a way to "source" bash.bashrc? In a related post, another user suggesting creating an alias for sudo with a space after it. Eg. alias sudo='sudo ' but there wasn't any context to this answer. Should I add this to my bashrc? Seems hackish.  What is the correct method for adding an alias for my sudo one-off commands? Install Ubuntu on Intel Mac I've recently taken up a position in an all Mac workshop - We have Intel based Apple machines. Can I dual boot Ubuntu on my machine, if so how? Purpose of @ Symbol Before Strings? Why do airplanes experience negligible Coriolis force while bullets experience the Coriolis force in long range shooting, even though the mass of airplane is much bigger than a bullet? TeXnicCenter & Adobe Acrobat 10 This was the question of a test. My question is if my attempt to solve it is correct, and if it is, why is it correct.  $$\lim_{(x,y) \to (0,0), x+y \neq 0}{\frac{\ln(1-x-y)}{x+y} } $$  My attempt:   Let $\xi = -x-y $. Then $\xi \to 0$ whenever $(x,y) \to (0,0)$ and $x+y \neq 0 \iff \xi \neq 0$. (Is it then correct to say that the previous limit exists and is equal to the following iff the following exists? And why?):  $$\lim_{\xi \to 0, \xi \neq 0}{\frac{\ln(1+\xi )}{-\xi}}$$   If it is correct, then the limit exists and is $-1$. If it is correct, why is it correct? An example where the output of the k-medoid algorithm is different than the output of the k-means algorithm According to the definition on , a multiple  is a root with  $n\geq 2$. For example, in the equation $(x-1)^2 = 0$, $1$ it the multiple (double) root.  Question: Why is $x = 1$ the multiple root of $(x-1)^2 = 0$?  What does multiplicity mean in this case? According to Wolfram multiplicity is the number of values for which a condition holds, or the number of times for which a polynomial equation has a root at a given point. In what way does the polynomial $x^2 - 2x + 1 = 0$ have multiple roots? Is there a word to describe the virtue of "to do something and ask for nothing in return"? I am wondering if there is a positive, formal counterpart to the slang "No strings attached" to describe, for example, a parent's unquestioned devotion to their children, or the virtue of someone's "a friend in need is a friend in deed", help first, question later mentality. Install Windows 10 alongside Ubuntu 14.04 Every proper ideal is contained in a maximal ideal, in a commutative ring with identity. The statement is:     In a commutative ring with 1, every proper ideal is contained in a maximal ideal.   and we prove it using Zorn's lemma, that is, $I$ is an ideal, $P=\{I\subset  A\mid A\text{ is an ideal}\} $, then by set inclusion, every totally ordered subset has a bound, then $P$ has a maximal element $M$.  My question is why $M$ must contain $I$? When is the Killing form null? When is the Killing form $\kappa$ of a Lie algebra $\mathfrak g$ null, i.e. $\kappa(\cdot,\cdot)=0$? Surely this is true for any Lie algebra with trivial bracket, but is this the only case? I can't seem to find any nontrivial examples. homeomorphism of cantor set extends to the plane? Suppose C is a Cantor set in the Euclidean plane, or even in R^3. Suppose h is a homeomorphism of C onto itself. Can h be extended to a homeomorphism of the whole space? What about if h preserves the ´end points´ of the Cantor set? Seems that the latter is a necessary condition but I don´t know how to prove it. Relationship between gamma and chi-squared distribution If $$Y=\sum_{i=1}^{N}X_i^2$$ where $X_i \sim \mathcal{N}(0,\sigma^2)$, i.e. all $X_i$ are i.i.d. normal random variables of zero mean with same variances, then $$Y \sim \Gamma\left(\frac{N}{2},2\sigma^2\right).$$  I know the chi-squared distribution is a special case of the gamma distribution, but could not derive the chi-squared distribution for random variable $Y$. Any help, please? I see questions come up quite often that have this underlying issue, but they're all caught up in the particulars of a given feature or tool. Here's an attempt to create a canonical answer we can refer users to when this comes up - with lots of animated examples! :)    Let's say we're making a first-person camera. The basic idea is it should yaw to look left &amp; right, and pitch to look up &amp; down. So we write a bit of code like this (using Unity as an example):  void Update() {     float speed = lookSpeed * Time.deltaTime;      // Yaw around the y axis using the player's horizontal input.             transform.Rotate(0f, Input.GetAxis("Horizontal") * speed, 0f);      // Pitch around the x axis using the player's vertical input.     transform.Rotate(-Input.GetAxis("Vertical") * speed,  0f, 0f); }   or maybe  // Construct a quaternion or a matrix representing incremental camera rotation. Quaternion rotation = Quaternion.Euler(                         -Input.GetAxis("Vertical") * speed,                          Input.GetAxis("Horizontal") * speed,                          0);  // Fold this change into the camera's current rotation. transform.rotation *= rotation;   And it mostly works, but over time the view starts to get crooked. The camera seems to be turning on its roll axis (z) even though we only told it to rotate on the x and y!    This can also happen if we're trying to manipulate an object in front of the camera - say it's a globe we want to turn to look around:    The same problem - after a while the North pole starts to wander away to the left or right. We're giving input on two axes but we're getting this confusing rotation on a third. And it happens whether we apply all our rotations around the object's local axes or the world's global axes.  In many engines you'll also see this in the inspector - rotate the object in the world, and suddenly numbers change on an axis we didn't even touch!    So, is this an engine bug? How do we tell the program we don't want it adding extra rotation?  Does it have something to do with Euler angles? Should I use Quaternions or Rotation Matrices or Basis Vectors instead?