What would happen to someone if all the water was removed from their body at once, or suddenly froze?

Question: I have a character in a relatively fantasy novel who is capable of controlling water. Her signature is altering or removing the water in the human body, either by ripping it out of them or freezing it. What would happen to someone if one of these things were to happen?
Comment: The victim would die. That's it.
Comment: Natural or artificial dessication of an animal or human body is one kind of mummification process. Here are some [pictures of some famous results](https://en.wikipedia.org/wiki/Tarim_mummies) of natural dessication. Here is [another famous natural mummy](https://en.wikipedia.org/wiki/Ötzi).
Comment: Not going into detail but a loss of 4% water is dehydration and 15% would be fatal, as you know water is universal solvent and it's molecule works like magnet holding cell structures together etc... TL;DR: a loss of 100% we become powder ;D
Comment: "The answer I'm looking for is what would HAPPEN. As in, the pre-death effects/appearance of the corpse". That would be useful information to include in the question.
Comment: [This](https://www.youtube.com/watch?v=xK4z_YhtTBM) is what happens when water is removed from sugar. The human body will respond similarly. On that  note, [a chicken](https://youtu.be/S_NAA8Ie91s?t=141).
Comment: Obviously. The answer I'm looking for is what would HAPPEN. As in, the pre-death effects/appearance of the corpse
Comment: How fast is the freezing and what is the effective temperature?  That has a major impact on the amount of cellular damage in the freezing process.
Answer: Drying:
It depends on just what percentage of the water is removed.
If the process is rapid enough, it will cause violent muscle contractions. Effectively, 100% of muscles will cramp immediately.
20% will kill within seconds, due to blood circulation ceasing.
Appearance: A dead person. Close examination will show sunken cheeks, dented eyes. It will look like someone that died out in the desert a week ago, and forgot to rot.
80% will give the appearance of a perfectly dried mummy. The rapid shrinkage of the body while still having intact skin may very well crush ribs, cause contraction to fetal position, etc.
Anything more, and you start ripping water out of molecular bonds. Proteins denature, various organic materials carbonize, and your victim will appear burnt
Freezing:
It depends on the speed of the freezing, and somewhat on just how cold a freeze is applied. Any flash-frozen person is instantly immobile, but otherwise undamaged. They will not shatter if they fall over, although breakage is now more likely than denting or bending! Frost will slowly accumulate on exposed surfaces.
Truly instantaneous: Nope. Violates several physical laws.
The victim will explode like a bomb, as the body instantaneously occupies a fractionally larger space, and is given zero time to achieve the expansion.
In half a second or so: Perfect cryostasis.
You have a living person frozen with no damage(yet). The ice crystals are submicroscopic, the cellwalls are intact. Person looks untouched, just immobile.
Theoretically, with a lot of effort and unknown techniques, this person could be revived intact. If the temperature is below -40c or so, this state remain indefinitely. Between 0c and about -40c, the ice crystals will slowly merge and grow, causing similar damage as slow freezing does below.
Freezing over several seconds or longer:
Extreme agony, ruptured arteries all over the place. All cells are ruptured due to ice crystal formation. This is what happens when a person "normally" dies of acute exposure, except for the gradual loss of consciousness easing the ordeal. Think whole-body frostbite.
Answer: Freezing a thing makes it hard, brittle and frosty.

https://www.youtube.com/watch?v=IIoSmhxwt90
Of course if it is that kind of macabre fiction the frozen person has to fall down and shatter or get hit with a croquet mallet and shatter or some kind of shattering.  Always the shattering after things freeze solid in fiction.  Also on Youtube this video being no exception..
A dried thing will be dessicated and shrunken like a mummy.

source for mouse image
The dried mouse is skinner than a live mouse because a lot of the flesh is water weight.  The general outline is the same and the head looks very similar.  Freeze drying carcasses can be used for taxidermy.  You can get your dead pet freeze dried and keep it around.  The freeze dried pets look good!
https://slate.com/technology/2019/11/why-people-freeze-dry-their-pets-and-how-it-happens.html
Answer: Either one would be very bad, and very deadly, and possibly very gruesome.
Freezing would lead to massive cellular damage (ahem), but would probably be less immediately grotesque. In this case, Hollywood probably isn't too far off, at least visually. As long as the victim stays frozen, there may not be significant visible changes (meaning, there will be color changes, but the victim probably won't suddenly turn into a pile of goo, or explode, or such). I think they won't disintegrate upon thawing, either, though they will remain very, very dead.
Although the human body is mostly water, contrary to what Star Trek may suggest, I wouldn't guess the victim would actually crumble into dust. More likely, they'll turn the victim into a piece of human jerky. As noted in a comment, this will probably resemble mummification. At the very least, the end product will be significantly less mass than you started with.
For less than $20 (maybe for just the cost of a trip to the grocery store), you can get a pretty good idea through first-hand knowledge how freezing will work out. Go to the store, purchase a whole chicken, and chuck it in your freezer. (If the store sells frozen birds in see-through packaging, you may not even need to buy one.)
Comment: Well, it actually depends on how fast and cold the freezing is.  The main reason the frozen food industry exists is because Clarence Birdseye realized that at temperatures of -60 or lower, the speed at which ice crystals form and their shape results in minimal cellular damage.
Comment: @Xavon_Wrentaile, I'm pretty sure "minimal" is not at all like "none". At any rate, I haven't heard of any successful cryogenic resuscitation yet. If nothing else, I don't expect the sudden cessation of brain activity is very healthy. Best case, the victim, after thawing, looks like a fresh-from-the-morgue corpse. Looking like freshly ground hamburger is, admittedly, probably a bit extreme.


Why is hybridization different in a ring?

Question: Why is nitrogen $sp^3$ hybridized in a compound such as NH3 but $sp^2$ hybridized in something like pyrrole, which has a ring structure? In both cases there are three bonds and one lone pair.
Comment: There are ring structures which **do** have sp3 nitrogen hybridisation. Being part of a ring is not the critical thing here.
Comment: Hybridisation is a mathematical description which usually supports our view on bonding and structure. It's is defined by structure. It's also not restricted to whole numbers. The orbitals in ammonia are close to sp³, but they are not exactly. However, in zeroth order approximation is still close enough. (In this scenario 3.14 would be a good approximation for pi.) So that arrangement of bonds is crucial for the description within the restrictions of hybridisation.
Comment: That second duplicate target has a terrible title, but anyway, the question of hybridisation in pyrrole/pyridine has been addressed before.
Answer: One might argue that the nitrogen in pyrrole does not really have a lone pair we can identify like that in ammonia or for that matter pyrrolidene ($\ce{C5H9N}$, adding enough hydrogen atoms to saturated the five-membered ring in pyrrole). In the pyrrole molecule, what "should be" the lone pair on nitrogen is instead coupled with the other pi electrons to form a continuous ring of conjugated pi bonding. Such a coupling is commonplace when it forms an aromatic ring, meaning in the most common cases $4n+2$ electrons in this ring (like the six pi electrons in pyrrole). There are also cases where what seems to be an empty orbital really isn't empty because of a similar coupling (like the cyclopropenyl cation). You should see more examples of this effect as you study aromatic compounds.


Having problems playing the A chord because of the low E

Question: My third finger always touches the 6th string, if I try to push it back to much it interrupts my second finger on the 4th string.
 I only have learned 3 chord (D , A  and E) while I'm able to do D and E almost perfectly(not having any visual or audible problem) the A chord is very hard and very rough.
 my fingers are average so not too thick that should cause any problem, the guitar itself I'm using is an electric one. Can someone give me some advice that would help me get a grip on the A chord and better finger placement ?
Comment: Are you having problems with the thinnest E string that makes the highest sounding note, or the thickest E string that makes the lowest sounding note? The "low E" is the sixth string and it's the thickest string with the lowest note, but it would be unusual to be accidentally touching that with your third finger. It sounds like you might be touching the thinnest E which is the first string and usually called the "high E" because it makes the higher sounding note (even though physically it is closer to the ground).
Comment: The thinnest, was thinking that was the correct term, a mistake ill try to avoid from now on
Answer: It sounds to me like you need to arch your fingers a bit so they don't lay against the open strings. Try getting your thumb a bit more to the center of the neck and curve your wrist a bit. See section #1 here:
http://www.tempomusicards.com/articles/top-5-bad-habits-to-avoid-when-learning-guitar/

or the postion shown here:
http://www.jasonwerkema.com/resources/acoustic-guitar/

Sometimes, players will wrap the whole hand around the neck to use the thumb to dampen the low E string when playing open A major. In that case you may have trouble keep you fingers off the high E string with a small hand.
If you are just beginning, this hand position may be difficult and your hand will get tired quickly. Give yourself rest. Don't over-do it, but work on it a little every day. Eventually it will be able to do it.
Comment: I would say those thumb positions are not necessarily best for everyone and/or for all styles of music. I personally can't put my thumb there with any kind of comfort, but I play with a certain style that also involves fretting with my thumb. I notice the guitar in the top photo is a classical style with a wide, flat neck, which pretty much requires the thumb position shown. Fender electric guitars, on the other hand, have much smaller necks that can work very well with the kind of grip I use.
Answer: I use two fingers to play an A on an electric guitar, fretting two strings with my index finger.
Also, in some cases you can play A7 as 002020, though this is just avoiding the problem.
In general, there are nice advantages to learning to use one finger to fret more than one string, because it frees other fingers to add different notes to standard chords.
Answer: Trying to understand how your fingers are placed! Are you calling the thinnest string 6? We normally call it 1.Your fingers should be nowhere near the 5th string, let alone the 6th! The 5th string (A) is an open string.Some people prefer not to play the bottom string on this chord, as it's not a root chord, but a second inversion. There are many ways to finger an open A.

2nd string pinky, 3rd ring, 4th middle.
2nd string ring, 3rd middle, 4th index.
2nd string ring, 3rd index, 4th middle - try it!
2nd string ring, 3rd and 4th middle.
2nd and 3rd strings middle, 4th index.
one finger across all three, lifting to allow top (1) to ring open.

With a little ingenuity, you'll probably figure out another three or four combinations, proving that there is usually going to be one that works for you. You also need to bear in mind that the chords themselves are only part of the story - you need to be able to move between them easily. So, you may well end up with two or three different fingerings for the same chord shape, dependent on where you come from and where you're going.


An easier way of solving a problem about the number of roots of a square equation on an interval

Question: I am trying to solve the following problem: I need to find out the number of roots on the interval $[-1; 3)$ of the equation $(4-a)x^2-6ax+3=0$ depending from $a$. I know a solution, but it is too difficult to calculate. I thought I could solve that problem with the help of quadratic trinomial roots position theorem. In the end, I got a lot of inequalities and I got confused. Is there an easier way to solve this problem?
Answer: The quadratic formula yields
$$x=\frac{6a\pm\sqrt{36a^2-12(4-a)}}{2(4-a)}. $$
Let us set this as two functions of $a:$
$$f_{\pm}(a)=\frac{6a\pm\sqrt{36a^2-12(4-a)}}{2(4-a)}.$$
These functions are undefined for $a=4.$ To find the exact domain, we factor what is under the square root:
$$36a^2+12a-48=12(a-1)(3a+4).$$
This is a parabola opening up, and therefore it is negative in-between the two roots of $-4/3$ and $1$. So the domain of $f_{\pm}$ is $(-\infty,-4/3]\cup[1,4)\cup(4,\infty). $
It remains to find the range of $f_{\pm},$ which is what we really care about. This will be different depending on whether we are looking at $f_{+}$ or $f_{-}.$ For $f_{+},$ a simple plot reveals that $f_{\pm}(-4/3)=-3/4,\; f_{\pm}(a)=1,$ that $$\lim_{a\to-\infty}f_{+}(a)=0, \quad \lim_{a\to-\infty}f_{-}(a)=-6. $$
We can piece together the graphs of these functions on the range $[-1,3),$ draw vertical lines, and see how many times we intersect a function. From this we gather that for $a\in(-\infty,-7/5),$ there is only one root. For $a\in[-7/5,-4/3),$ there are two. For $a=-4/3,$ there is only one. For $a\in(-4/3,1),$ there are none. For $a=1,$ there is one. For $a\in(1,13/9],$ there are two. And finally, for $a\in(13/9,\infty),$ there is only one.
Comment: I am sorry, but how did you piece these graphs together? Unfortunately, I didn't understand the range part.
Comment: @student28: The range of $f_{\pm}$ tells us where $x$ lies, because I defined $x=f_{\pm}(a).$ As for finding values like $-7/5$ and $13/9,$ I simply "cheated" and used Mathematica, via Wolfram Dev Platform, to solve for those values. I also used the Dev Platform to do plotting.
Answer: Try using the quadratic formula.  This will give $x = \frac{3a \pm \sqrt{9a^2+3a-12}}{4-a}$.
Now you want to find values of $x \in [-1,3)$.  So try setting $x=-1$ and $x=3$ and solve for $a$.
You can get a bound on $a$ because you are looking for real roots, and the discriminant must be nonnegative ($9a^2+3a-12 \geq 0$)
Using the above, you should be able to determine a range of values for $a$.


How to simplify an index number?

Question: I've just come across a grade A question involving indices:
$$\frac{2^{30}}{8^9} = 2^x$$ Work out the value of $x$. As a tip, the revision guide says to convert $8^9$ to $2^{something}$ so the question can be simplified by subtracting the indices. But I have no idea how to do this and I can't find anything on it.
Answer: $$8 = 2^3$$
$$8^9 = (2^3)^9$$
When we raise an exponent to another exponent, we multiply them together:
$$8^9 = (2^3)^9 = 2^{(3*9)} = 2^{27}$$
So now your problem becomes:
$$\frac{2^{30}}{2^{27}} = 2^{(30-27)} = 2^3 = 8$$
Comment: I'd just like to thank you for taking the time to answer this. I know it might've been simple but with a math teacher that never has the time to answer my questions and all my revision books not having anything on this it really means a lot to finally find out how to do this. I really appreciate your help!
Comment: Mhm, not a problem! That's what these websites are for, right? If you need any other help don't feel hesitant to post - the community is extremely helpful and has given me a lot of intuition on questions I had previously, even if I thought they might have been simple or trivial. (:
Answer: Notice that $8$ can be written as $2^3$. See if this helps you continue with the equation.

How to simplify an index number?


Couplings of fields in the Standard Model

Question: Could someone please explain what this task implies: Calculate coupling of fields: $\bar{e}_{R}e_{R}Z, HW^{+}W^{-}, W^{+}\bar{c}_{L}d_{L}$? (Exercise refers to the Standard Model Lagrangian). What do I technically have to do?
Answer: The coupling of $n$ fields refers to the constant in front of those n fields multiplied together in the Lagrangian. For example, the self coupling between two scalar fields in can be read off from the term $\mathcal{L} = \frac12 \lambda\phi^2$ as $\lambda$. In your example, you will need to expand all of the different terms in the Lagrangian as the coupling will not be as obvious.
In the standard model Lagrangian, you see only the bare fields (not physically observable), whereas you will need to expand your Lagrangian into the mixed state fields (for example $W^\pm = \frac{1}{\sqrt{2}}(W_1 \pm iW_2)$).
Then you will be able to simply read off the couplings.
Comment: Thanks! It's very helpful and I get it but still I don't understand something. Is it doable without getting full Lagrangian from book and reading off the couplings? How could I do it if I got such task on exam, using only basic knowledge from my mind? Could you tell me what should I know?
Comment: They would likely give you the Lagrangian in an exam, however I suppose you could be asked to construct it yourself. Typically you construct a Lagrangian by summing all terms that are allowed by all possible symmetries - so all Lorentz invariant, diffeomorphism invariant, gauge invariant or whatever terms, depending on the theory you are looking it.


How do I merge tags or propose to merge tags?

Question: I'm looking at various tags right now and I think that some tags, for instance "gene-expression" and "protein-expression", should be merged. How would I go about doing this?
Comment: I made the protein-expression tag and I believe that I should retroactively switch it back.
Answer: If the tags are only on a handful of questions, just change the tags on those by hand. If it is on 10+ questions you can ask a moderator, we can merge tags without having to edit all the questions by hand.
In this case though gene-expression and protein-expression are not identical, they are used differently. They're not necessarily used clearly, but they shouldn't just be merged.
If we have some tags that are not used in a clear manner and you're unsure about how to proceed, you can always start a discussion about the tags here on meta or in chat.


How to convert from Magicavoxel to Blender to Unity, without losing the texture/colors

Question: I'm trying to make an animated model, and I make the model in magicavoxel, then animate it in blender, then put it in my unity game, but when I put it in my unity game, it shows only white, that's it. Help? Any file type is ok, except obj. I have been looking for the answer all day btw, so I've done research on it, but none of the solutions work.
Comment: Did you check Unity docs? https://docs.unity3d.com/Manual/HOWTO-ImportObjectBlender.html
Answer: If just import the OBJ file(exported from MagicaVoxel) into Blender, animated it and want to sent it to Unity with textures I think this will help you:
On Blender

Export the model as FBX

On Unity

Import the FBX
Import the voxel PNG(palete) file into Unity as a texture
Drag the FBX file to the Scene
Create a new Material
Associate the new material to the model on Scene
Drag the PNG(palete) image to the ALBEDO field of the material

Another solution would be this: If you export an OBJ from MagicaVoxel and want to send it to Unity with the textures/colors you have to send to Unity all the 3 files MagicaVoxel generates when you export an OBJ file (.obj, .png, .mtl)

On the file explorer you have to select all these 3 files and drag-and-drop them all at once into a unity folder inside the Asset folder (need to drag from file explorer and drop into Unity software interface). This way Unity will receive the 3D Object model, the texture and the info about how the texture will be used into the 3D model.

Well, about that and a lot more you will find on this MagicaVoxel/Blender/Unity course: Modelagem 3D com MagicaVoxel para criação de games em Unity


Solving double recurrence relation

Question: How to calculate the rate of growth of the below function $f(x)$?
$$
\begin{align*}
f(x) &= \begin{cases} f(x-1) + g(x) & \text{if } x > 1, \\ 1 & \text{if } x \leq 1. \end{cases} \\
g(x) &= \begin{cases} f(x-1) + g(x/2) & \text{if } x > 1, \\ 1 & \text{if } x \leq 1. \end{cases}
\end{align*}
$$
Answer: By induction, $f(x)$ can be expressed non-recursively as a sum over $g$. That can be substituted into the definition of $g$ to get a single recursion, which can be compared to a well-known standard recurrence to show a lower bound. Finally, the comparison is close enough to hint that the upper bound must be similar to the lower bound, so you should be able to guess an upper bound and prove it.

Solving double recurrence relation


WTF is WTF-Forms?

Question: There exist the tags wtforms and flask-wtforms that contain 708 or 587 questions, respectively. Quite a few of these questions (e.g. this, this, or this) do prefer the phrasing WTF-Forms, WTFForms, or forms of this before WTForms. It seems to be absolutely clear that WTF is an abbreviation for WTForms in this context. I wonder WTF people tend to think that WTF-Forms is a correct phrase that can be used in this context. How can this happen and how can we prevent this?
Comment: *"How can this happen"* - people created those tags. *"How can we prevent this"* - people creating tags? Why would we want to? A better question might be *"what can we do about this specific case"*, to which the answer is setting synonyms.
Comment: The tags are right, but people are messing up the acronym in their posts. Edit to fix or ignore- your choice. Its a common problem: [RAS Syndrome (Redundant Acronym Syndrome Syndrome)](https://en.wikipedia.org/wiki/RAS_syndrome)
Comment: As the co-author of WTForms, I can also add that some 11 years ago,  when we were writing the library as a little set of helpers for a project we were doing, A) I was a college student and B) I thought "What the Forms?" was a hilarious name. (We later dropped any mention of the origination of the name, but that's where it came from.) That it turned out to be one of the most popular form processing frameworks for Flask/Werkzeug was not intended originally, but kinda neat.
Answer: It's not wtf-forms. There is no hyphen and there is only one f. But it is Flask-WTF (maybe we need a synonym?).
Don't confuse it with WTF ORMs.
It appears to be a Python library:

WTForms is a flexible forms validation and rendering library for python web development.

Of course, the name may be the source of some of these questions. You need to have:
from wtforms import Form, BooleanField, StringField, validators

not:
from wtfforms import Form, BooleanField, StringField, validators

While we can all mock them for their poor name, the tag is perfectly on-topic for Stack Overflow.
Like any other spelling mistake (java  script is a particularly annoying one), the posts should be edited to fix the errors. You have 2k+ rep, so you are as able as anyone to do so.
I'm not concerned about this harming the SEO; Google knows the right name.
Comment: @returntrue The important part is right in the middle, "Like any other spelling mistake (java  script is a particularly annoying one), the posts should be edited to fix the errors."
Comment: wtf? I have never confused `wtforms` with `WTF ORMs`, and I know that it is called `wtforms` and not `wtf-forms`. Your answer does not provide any useful information to me.
Comment: Then the answer should be narrowed down to the important parts only.
Comment: @returntrue Meta allows for a bit more "fluff" than main, but I still think that most of the information is relevant to people who are unfamiliar with the technology. It was unclear what exactly you were asking about ("this"???). I have moved the "most important part" downwards and emphasized it.

WTF is WTF-Forms?


Sum of irrational numbers, a basic algebra problem

Question: Let $x_1,\dots,x_n$ be positive  rational numbers. If $\sqrt[l_1]{x_1},\dots,\sqrt[l_n]{x_n}$ are all irrational numbers (where $l_1,l_2,\dotsc,l_n\in\Bbb N^*$), does it follow that $$\sqrt[l_1]{x_1}+ \dotsb + \sqrt[l_n]{x_n}$$ is an irrational number, too?
Comment: What do you mean by $\mathbb N^*$?
Comment: @tomasz I gess it means strictly positive integers
Comment: I mean integers no smaller than $0$. What does it matter? I'm not the one who asked the question, am I? On the other hand, if I wrote $\mathbb N^*$, I would probably have meant some saturated extension of natural numbers, or the natural numbers within a saturated extension of reals.
Comment: I asked OP what he meant by a symbol whose meaning I'm not sure about. Why would *I* need to explain anything? Maybe that's what he meant, but it still doesn't hurt to ask (or clarify where there's confusion...).
Comment: See the papers by Mordell and Siegel that I cite in [this answer](https://math.stackexchange.com/a/30707/242) (the radicands need to be multiplicatibvely independents).
Answer: This is and old question and the answer is yes.
Mordell was interested in a particular case of this problem in his paper On the linear independence of algebraic numbers.
Later on, Ursell in the paper The degrees of radical extensions solves this problem in the particular case $x_i\in\mathbb N^*$ and $(x_i,x_j)=1$ for $i\neq j$.
In fact, the problem can be easily reduced to the case where $x_i\in\mathbb N^*$ and $l_1=\cdots=l_n$. This is in fact a problem proposed/solved by Preda Mihailescu long time go. Later on Toma Albu worked on this problem from different point of view and proved this as Theorem 2.2 in this survey paper. Basically he proved the theorem in an older paper where he acknowledges that his results have appeared in many other sources, such as Karpilovski's book Field Theory.
Anyway, the proof given by Mihailescu is the most "elementary" and I suggest you to try to read it (well, maybe using Google translate).
Comment: The link to a paper (or whatever that is) by Mihailescu is dead. Could you provide a reference as to what you were linking to?
Comment: Mission 835 of  page(23:19)
https://gdz.sub.uni-goettingen.de/id/PPN378850199_0036?tify={%22pages%22:[23],%22panX%22:0.41,%22panY%22:0.503,%22view%22:%22info%22,%22zoom%22:0.496}
Answer: Too long for a comment.
Your problem is actually equivalent to the following:
Problem: If $a_1,..,a_k$ are positive integers, and $m$ is a positive integer, so that $\sqrt[m]{a_i} \notin \mathbb Q$ then
$$\sum \sqrt[m]{a_i} \notin \mathbb Q \,$$
You can do the reduction to this problem in two steps:
Step 1: Let $m=lcm (l_1,..,l_n)$. Then $\frac{1}{l_i}=\frac{k_i}{m}$.
Let $y_i=x_i^{k_i}$.
Then, you know that $y_i$ are positive rational numbers and $x_i^\frac{1}{l_i}=\sqrt[m]{y_i}$.
Step 2: Let $y_i=\frac{b_i}{c_i}$ and let $d= lcm (c_1,..,c_n)$. Then you can write
$$y_i=\frac{a_i}{d^m}$$
and you get that problem.
I am pretty sure that I saw some Theorems in Galois Theory which imply stronger versions of the above problem.
Added   Theorem 2.9  in This Paper is exactly the question asked, it provides some reference to the History of the problem and a proof.
Comment: This is true at least if $a_i$ are coprime and $m=2$, and the proof is quite a bit more involved than one could think at first glance; elementary methods work for $n=3$, but I think they fail as soon as $n=4$. That is, if I recall correctly from my abstract algebra classes. :)
Comment: @tomasz I actually found a reference, which proves the asked question ;) If I remember right, the issue with the relatively primess is that otherwise the radicals could cancel, which is not the case because of the positivity..... And I remember a very nice elementary proof for $m=2$, which cannot be extended:)


Negacyclic FFT multiplication

Question: I am using an FFT to multiply polynomials. Because I want the program to be as fast as possible I am leaving away the zero padding. For example, if we want to calculate: $(58 + 37x + 238x^2 + 155x^3)^2$. Apply FFT and then multiply the array with itself and do an inverse FFT. After downscaling the polynomial will be: $71478 + 78072x + 53002x^2 + 35592x^3$. This is a cyclical convolution meaning it is a multiplication modulo $(x^4 - 1)$. However I would like to convert this to a Negacyclic convolution meaning: Multiplication modulo $(x^4 + 1)$. Or universally $(x^n + 1)$. Does anyone have an idea how to accomplish this?
Comment: Just a thought $x^{2n}-1$ has the factors $x^n+1$ and $x^n-1$.
Answer: I found an answer in Bernsteins Paper. The first part is found in: http://cr.yp.to/lineartime/multapps-20080515.pdf which states the following: One can multiply in $R[x]/(x^{2n} +1)$ with $(34/3)n \log(n) + O(n)$ in R if n is a power of two. Map $R[x]/(x^{2n} +1)$ to $C[x]/(x^n−i)$, twist $C[x]/(x^n−i)$ into $C[x]/(x^n −1)$, and apply the tangent FFT. Mapping from $R[x]/(x^{2n} +1)$ to $C[x]/(x^n−i)$ is fairly easy. This would look like: $a_0 + a_1 x + \dots + a_{2n-1}x^{2n-1}$ => $(a_0+ i*a_n) + (a_1 + i*a_{n+1})x + \dots + (a_{n-1} + i*a_{2n-1})x^{n-1}$ However twisting to  $C[x]/(x^n −1)$ was not clear to me until I found the following in another paper by Bernstein about the Tangent FFT. This could be done by applying $\zeta_{4n}^k$ where $\zeta_n^k= exp^{\frac{k2\pi i}{n}}$. Thus would now be $(a_0+ i*a_n) + (a_1 + i*a_{n+1})\zeta_{4n}^1 x + \dots + (a_{n-1} + i*a_{2n-1})\zeta_{4n}^{n-1} x^{n-1}$. After doing the FFT one needs to inverse this twist and also inverse the mapping.
Answer: You can get a fast implementation of negacyclic fft in Palisade crypto library. In this library it has been implemented with Fermat Theoretic Transform and most probably what you are looking for.
Answer: One way would be to pad the sequence with zeros to size 2*N, compute the cyclic convolution of this zero-padded sequence in the normal way -- this produces the acyclic convolution of the initial sequence; from which the negacyclic can be easily derived as nega[i] = acyclic[i] - acyclic[N+i].

Negacyclic FFT multiplication


Adding lyrics and/or chords as written text along a track in GarageBand 10

Question: I am using GarageBand 10, and I would like to add some written notes, along a track (an analog track, imported from an aoudio file), to mark where the chord changes occur. Similarly, I would like to add lyrics, along the track.
Is there a way? either in the same track, or as an additional "comments" track?
Comment: Unfortunately, you can't. You have a workaround to add lyrics to the score, but not to an audio file. But it could be easy with Audacity, using the markers.
Answer: For the vocals; I just take a screenshot of the score and below notes I write the lyrics. It worked for me on this way because I didn't find any other option.


Magnet Wire vs Resistance Wire - What's the difference

Question: What's the difference between magnet wire and resistance wire? Which is better for building an electromagnet?

Resistance Wire
Magnet Wire
Comment: Vape Supplies is a srange place to buy wire. Quite likely you will find it cheaper from a regular electronic supplier like Digi-Key.
Answer: Resistance wire will be made of some higher-resistance material than copper and may or may not be insulated, so will have a higher resistance than the same size and length of copper wire.  Resistance wire would normally be used to make a heating element.
Magnet wire is copper, with a thin "enamel" insulation, and is intended for winding coils for an electromagnet.
Comment: Some of the reviews for the resistance wire, stated they were using it for wrapping something in a vaporizer, if the resistance wire is not insulated wouldn't that cause a short?
Comment: I assume that the vaproizer users would take care to prevent short circuits - otherwise they won't get the desired heating.
Comment: Also, the resistance wire withstands 1500°C, while copper melts at 1084°C. But you don't want to use copper at its limit, because it changes its physical properties. E.g. It becomes weak.


How to execute a specific command on opening a terminal

Question: I would like to execute the shell command "cmatrix" whenever I open a terminal. How to go about achieving this?
Answer: You can add cmatrix command in your ~/.bashrc file located at home folder:
echo 'cmatrix' >> ~/.bashrc

NOTE: Please ensure that you use >>, the append operator. If you use >, it will replace your whole ~/.bashrc with cmatrix only.
Comment: Of course this is a good answer, but just to be exact, this way the command will be executed each time a `bash` instance is spawned by the user, so not only in `gnome-terminal`.
Comment: Please make **very sure** that you use `>>` (two arrows!) and not only *`>`*. Otherwise this will replace your file and delete the old one. You could also open the file with any text editor and manually append the line.
Comment: @snoop i would safely use $gedit ~/.bashrc. Thanks for the caution :)
Comment: Or you can edit the .bashrc file with `gedit ~/.bashrc &`
Answer: Because you tagged your question with gnome-terminal, you can also use a a custom command for your gnome-terminal profile.
The advantage, the command is executed only for a specific profile and not always when the bash is started somewhere.
But first install dconf-editor. If you make a mistake in the steps below, you will need this tool
sudo apt-get install dconf-editor

Now open gnome-terminal and edit your profile settings and use this command
sh -c "cmatrix;bash"

as you can see in the screenshot below. If you don't use the bash, replace bash with your shell.

If you made a mistake and gnome-terminal is unusable, use use dconf-editor to correct your problem:
Start dconf-editor and navigate to the settings of GNOME terminal and change the values for custom-command and use-custom-command in the settings for your gnome-terminal profile
Comment: If the user makes a mistake, they may not be able to pull up a terminal in the first place.
Comment: @Kevin therefore the last part in my answer.
Comment: Where are they supposed to type `sudo apt-get install dconf-editor`?
Comment: @kevin good point, thank you. I have changed my answer.
Comment: @kevin But there is always tty1 and so on. ;)
Comment: Sure, but you have to tell them about that or they won't know to use it.
Comment: use exec: `sh -c "ls -A;exec bash"` to avoid create another process
Answer: I'm using Fedora with XFCE desktop. I encountered problems when Fedora boots, by using the solution provided by @snoop, and the solution provided by @AB gave me the "Failed to execute child process (no such file or directory)" error. Searching for a solution, finally I used a script saved as ~/bin/cmatrix_launcher.sh with this content:
#!/bin/bash
cmatrix -baC cyan
/bin/bash

throwing then it as a custom command in the xfce4-terminal settings (screenshot attached)
Comment: `[ "xfce4-terminal" ]` is always true.


Win 7 64-bit user profile login problem

Question: My newly clean installed Win 7 64 system has a developed a very peculiar user profile login problem. When logging on from starting the system, I can login to a user profile no problem. It is when I log out of that profile and attempt to login to another profile that the fun starts. As soon as the profile login screen appears, the password dialog box immediately fills itself in. If I delete it and attempt to type in the correct password, the box immediately fills itself in again. It seems to be using a single letter, such as 'c', 'u', 'g' which I suspect may be related to windows looking for the drive that the password reset information is on, but I'm not sure. Very bizarre behaviour. I can only get out of it by rebooting, which allows me to login properly. It doesn't do this all the time but does do it frequently. Any ideas how it may be cured?
Comment: Silly question, but have you checked whether any keys on the keyboard are sticking?
Comment: No. It's a brand new Microsoft keyboard. There is nothing wrong with it. I plugged in my old HP keyboard and it didn't make any difference. It's a software glitch issue without a doubt, but one that doesn't make itself readily apparent.
Answer: Sounds to me like you have a keyboard and/or mouse driver issue going on. If you have any "drivers" for your keyboard and/or mouse then I would suggest uninstalling them. Don't worry, you should still be able to use your keyboard and mouse but you probably won't have any extra functions like certain hot keys or even certain buttons on your mouse might no longer work - but you should at least still be able to use them. Of course, reinstalling drivers for a mouse and/or keyboard theoretically will enable those extra abilities but you might also have that weird problem again too. (Have you obtained the latest drivers?!)
Aside from that, you might also look into any other input devices you may have hooked up to your computer like scanners, joysticks, and/or possibly even old dial-up modems. And that's just for starts. The list of input or even output devices is pretty long but reducing your computer to it's most basic elements with just a basic keyboard and basic mouse is where I'd at least begin the troubleshooting process. And if your keyboard/mouse are USB devices you might also look into your BIOS settings too (again, that's a bit too borad a topic to go into here).
Hope that helps a little, anyway.
Answer: No solution, but for some advice on debugging see: Troubleshooting the Windows logon process.
This uses information from this Microsoft Support article :
How to enable user environment debug logging in retail builds of Windows
If this gets you any useful information, please post it.
You can also try to check your system using sfc /scannow.
Comment: Thanks for the advice. I'll try the troubleshooting links. I have used sfc and it reports no problems ditto chkdsk. I think I'll start by deleting all the passwords and resetting them.
Answer: 1) Try Repairing windows 7 installation
For more information regarding repairing Win7 ,
go here http://www.nirmaltv.com/2009/12/17/how-to-repair-windows-7-installation/
or go here http://www.sevenforums.com/tutorials/681-startup-repair.html
2) Try deleting that account and creating a new one
3) Try removing password for that account and then putting it again
4) Scan for any type of winlogin virus
Comment: Hi. Done all that except deleting account and creating a new one. All the diagnostics I've used find no issues. If I change profiles while in safe mode, no problem. If I switch user in normal mode, no problem. If I log off in normal mode and then log on to another profile, problem! This is very weird. However, I've got round it by logging in as administrator in safe mode and deleting all passwords. Now it works just fine. I'll do the delete profile when I have the time. This is a work machine so too much hassle at present.
Comment: Glad you found a work around, inform me when u try the rest

Win 7 64-bit user profile login problem


There might be a site for customized eclipse downloads

Question: Anyone who heared about .customized eclipse.
Where you can preselect packages before the download.
thx.. Sven
Comment: Try, uhm, google? What about just eclipse.org and the sites it links to?
Answer: You could download basic version of Eclipse and then install only the plugins you need one by one.
Official download site for the project also has some custom builds that might satisfy your needs.
There is also Easy Eclipse. Which is a site that custom builds Eclipse for certain tasks.
Answer: Take a look at Pulse and Yoxos On Demand.
Pulse works by downloading small application to your computer. Using this application you can select packages to be installed (Pulse takes care of dependencies), and then Pulse downloads everything to your computer. Pulse can manage several customized Eclipse applications on your computer. (If you want to add additional software to your Pulse-managed appliation, you need to use Pulse only. I think that downloading plugins from within Eclipse doesn't work, but I am not sure at the moment)
Yoxos works differently. It is entirely web-based, there is no prior download. You select your packages on the web, and Yoxos builds resulting eclipse.zip to download. This zip file looks like normal distributed eclipse, but has additional packages bundled.
Both Yoxos and Pulse can be used for free for personal usage.


Remove a single border from the path

Question: How do I remove my upper and bottom borders without changing the shape of my path? When I try to do it with Node tool's Delete segment between two non-endpoint nodes, it messed up the path.
Answer: Duplicate the path. Let one of the copies have only a stroke with no fill. Let the other have only a fill with no stroke. Split and edit the stroke only version. To get the stroke to end at the edge of the fill at the breaking point use butt cap stroke style. See this comparison between round and butt stroke caps:

Make a group to keep all three parts together.

Remove a single border from the path


How old are Richard and Kahlan?

Question: The protagonists of the Sword of Truth novels by Terry Goodkind are Richard and Kahlan. How old are they throughout the course of the series, especially during the events of the first book, Wizards First Rule?
Comment: Good question here. I was unsure when I started the series, but at some point in the first book I understood that Richard was in his thirties or so. Then again, I can't seem to find a proof right now.
Answer: I've only read the first book, so not sure how much time passes in the whole series, but from what I can tell, they are both mid-twenties in Wizard's First Rule.
In Stone of Tears, when Kahlan enters the "children's army" camp, this passage is given:

"How many children do you have along with you, Captain Ryan?"
He stiffened a little.  "Mother Confessor, we may be younger than you, although not by much, and you may not think highly of us, but we are soldiers.  Good soldiers."
"Good soldiers."  She was hardly able to keep herself from screaming at him.  "If you are such good soldiers, why was I able to walk, unnoticed, through your line of sentries?"  His face reddened and he made a visible effort to remain silent.  "And is ther a one of these good soldiers, including you three, that is beyond eighteen?"  He pressed his lips tighter and shook his head.  "The I repeat, how many children do you have along with you?"

So, seems like a) someone is considered adult around 18 and b) Kahlan isn't much beyond that.
On the first page of Wizard's First Rule, we are told Richard moved out of his "father's" house "about five years before".  Likely shortly after reaching adulthood.  Assuming this, he's mid-twenties, Just like Kahlan.
This is supported by the passage when Richard first sees Kahlan:

Richard came partway to his feet.  Waves of heat rolled from his body.  Bent over at the waist with his hands braced on his knees, he took a few deep breaths before straightening to his full height.
His eyes fell on the young woman as she came around the bend in front of him.  His breath caught for an instant.  Her brown hair was full, lush, and long, complementing the contours of her body.  She was tall, almost as tall as he, and about the same age.

Later books may have passages that expand or contradict this, though.
Comment: Looks like you'll be earning my [bounty without a deadline](https://scifi.meta.stackexchange.com/a/12545/13217). I originally offered 50 bounty, but since I already did that once, the system requires me to offer a minimum 100 bounty, so lucky you!
Comment: @Thunderforge  Thanks.  Just glad I caught that passage about Kahlan while I was looking for info on another answer.  It struck me as younger than I thought of her when reading it and I remembered your bounty so I went looking for Richard's age.

How old are Richard and Kahlan?


Format SharePointWebControls:DateTimeField

Question: I am using this to return the date/time entered by a user in a page layout.  I want to only show the date.  I need to keep the time part as this is used in a query on another page.  I have seen suggestions in adding Dateonly:"True" but this doesn't work.  Can I use CSS or something else to format / hide the time

Article Date:
   <SharePointWebControls:DateTimeField  FieldName="ea266b0f-51ec-4fd3-bdcf-0c010a4caea7" runat="server" ></SharePointWebControls:DateTimeField>

Comment: Have you tried editing the field property and setting it to only date?
Comment: I can't edit it to date only  as I use the time part to sort by.
Answer: Not sure but this might help. Change dates view.


Hooking up new line volt thermostat for elec baseboard

Question: Trying to install a new thermostat to electric baseboard heating.
Heating is 240 V, new thermostat is Honeywell RLV3150
Current dial thermostat is hooked up, and the junction box has 3 wires going to it, so I'm stuck with 3 whites, 3 blacks, and 3 grounds. New thermostat wiring diagram for 4wire install shows all whites joined with nut, one thermo wire to power, and other thermo wire to load. Confused as to why the jbox has 3 wires, and how to proceed. Haven't done anything yet, but would like advice before wiring something wrong and causing an electrical fire. Thank you!
Comment: How many baseboard heaters are controlled by this thermostat?
Comment: is that the old or new thermostat you are showing
Comment: This is the old stat pictured. Only 1 heater controlled by this stat
Answer: Confused as to why the jbox has 3 wires
Either there's more than one heater/thermostat on this circuit, and constant-hot is going somewhere else to power another thermostat (or other 240V load, but not likely), or there's more than one heater cabled directly to this thermostat.
Since there's no obvious line/load marking on the 'stat, you'd need to check with a meter or voltage detector to determine which is the case here, unless there's a non-obvious line/load marking you can see that does not show in the picture.
As for connecting it to the 6 wires you have, you need to figure out which is which so that you can keep the correct set paired when connecting to the thermostat - since it's single-side-switching (as opposed to the current stat switching both lines) you get the wiring they show, but either two wires connect to the line side, or two wires connect to the load side, rather than one as shown.
I was dubious that your box was large enough for 3 12AWG cables and a device. 6 wires, 1 for all the grounds, 2 for the device makes 9, X 2.25" for 12AWG makes 20.25 cubic inches required. You say 20.3 below, so that's fine.
Comment: Good, you have enough space. Then the doubled wires (connecting to reds on old 'stat)are evidently feeding the other 'stat on the circuit, and go on the line side of the new 'stat (& all whites together.)
Comment: As far as I can tell, this thermo only controls 1 baseboard, but there is another thermostat for the other room. But they are on the same breaker/circuit, and the 2nd thermostat on the floor has 2 wires to the jbox. Presumably they are 1 to power and one to baseboard
Comment: Jbox is 20.3 cu in


How do I recover Game Center password if it's different then my Apple ID password?

Question: How do I recover Game Center password if its different then my Apple ID password. This for my sons iPod, he created this account for his games but cant remember the password. I tried the forgot password option thinking it would reset it for him but it didnt since he has his own password for it. How do we find the password he created?
Answer: This is a common confusion point.
All apple accounts are AppleID and you can/should first go try to reset or recover the password for each account at https://iforgot.apple.com
Any use of Apple accounts on iOS (messages, FaceTime, game center, app store, iCloud) are necessarily first AppleID accounts - so mixing several of these on one device can cause a little confusion on which password belongs to which.
There is no Game Center account or password retrieval (nor any other account) other than the main iforgot page. You can go in and check your AppleID and learn more at https://appleid.apple.com


Creating building footprints from LAS files

Question: I wish to create building footprints from the classification in our LAS files.  I have filtered out the building points, using the point cloud filter. But I now trying to join the outermost points of the buildings, which I can't figure out how to achieve this. I understand that this may be a little hit and miss with the LAS classifications but I am happy to accept this. I am a inexperienced FME user.
Comment: Polygon from Point Cloud https://knowledge.safe.com/questions/5083/polygon-from-point-cloud.html
Comment: I can't give you the proper (series of) FME transformer, but this may point you in the right direction. What you want to achieve is a [convex hull](https://en.wikipedia.org/wiki/Convex_hull), grouped by points within a certain distance (to have separate polygons for each building). The grouping part shouldn't be too complicated, I suppose, it's just about finding the proper distance between points to filter out all that belong to a single building.
Answer: Have a read of the following link Concave Hull and the Alpha Value, which was what I was trying to achieve by joining the Classified LIDAR building data and creating polygons around clusters of these points.  Secondly as suggested look at this previously posted question Polygon from Point Cloud.  Or review the attached image with my workflow, very important to read the metadata that comes with the LIDAR data.  Some of the issues I found was the density of points and I had issues with the classification of data with incorrect values placed on points, causing my buildings to come out incorrect/slither polygons through buildings (but it did what i was trying to achieve)..
Answer: Best Way for free Building Footprint data. Use it once and you will get best output:

Go to Arc tool box add LAStools.tbx.
Drop down tool, you will see multiple of tools.
First click Las Ground provide Las file as input and run - It will give you output.
Now Run Las Height, provide Las ground output as input for Las height.
Now run Las Classify, Provide Las Height output as input for Las Classify.
Now run Las Boundary, Provide Las classify output as input for Las Boundary provide concavity - 8 best as per my study, Use option - Select Building.

Output will be your Building Footprint.
Note: Please don't change any options given in default by tool. I didn't change it and found the best output.


Django: Redirect logged in users from login page

Question: I want to set up my site so that if a user hits the /login page and they are already logged in, it will redirect them to the homepage. If they are not logged in then it will display normally. How can I do this since the login code is built into Django?
Answer: I'm assuming you're currently using the built-in login view, with
(r'^accounts/login/$', 'django.contrib.auth.views.login'),

or something similar in your urls.
You can write your own login view that wraps the default one. It will check if the user is already logged in (through is_authenticated attribute official documentation) and redirect if he is, and use the default view otherwise.
something like:
from django.contrib.auth.views import login

def custom_login(request):
    if request.user.is_authenticated:
        return HttpResponseRedirect(...)
    else:
        return login(request)

and of course change your urls accordingly:
(r'^accounts/login/$', custom_login),

Comment: You should declare `custom_login` with a second argument `**kwargs` so that it passes all arguments you don't care to the built-in `login` view.
Comment: Why isn't this default behaviour? I can't imagine a situation where an already logged in user should see the login page?
Comment: An already logged in user may be redirected to `LOGIN_URL` by `user_passes_test` (and thus `permission_required`) decorators, if he doesn't have enough permissions to access a certain view.
Comment: @TimmyO'Mahony seems like LinkedIn doesn't like your logic
Comment: This doesn't work anymore because `login` has been removed. [@rodolfojcj answer below works.](https://stackoverflow.com/a/38839973/812919)
Comment: How to pass the {'template_name': } dict to django's login view if you use it like this?
Comment: You can pass it as `login(request, template_name = 'user/login.html')`
Comment: With recent versions of django you can simply use `from django.contrib.auth.views import redirect_to_login` instead of `login`. Note that with `redirect_to_login` you must provide a parameter for "next" like so: `redirect_to_login(next='name_of_page_to_redirect_to_after_successful_login')`
Answer: The Django 1.10 way
For Django 1.10, released in August 2016, a new parameter named redirect_authenticated_user was added to the login() function based view present in django.contrib.auth [1].
Example
Suppose we have a Django application with a file named views.py and another file named urls.py. The urls.py file will contain some Python code like this:
#
# Django 1.10 way
#
from django.contrib.auth import views as auth_views
from . import views as app_views

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^login/', auth_views.login, name='login',
        kwargs={'redirect_authenticated_user': True}),
    url(r'^dashboard/', app_views.Dashboard.as_view(), name='dashboard'),
    url(r'^$', TemplateView.as_view(template_name='index.html'), name='index'),
]

From that file, the relevant part within the urlpatterns variable definition is the following, which uses the already mentioned redirect_authenticated_user parameter with a True value:
    url(r'^login/', auth_views.login, name='login',
        kwargs={'redirect_authenticated_user': True}),

Take note that the default value of the redirect_authenticated_user parameter is False.
The Django 1.11 way
For Django 1.11, released in April 2017, the LoginView class based view superseded the login() function based view [2], which gives you two options to choose from:

Use the same Django 1.10 way just described before, which is a positive thing because your current code will continue working fine. If you tell Python interpreter to display warnings, by for example running in a console terminal the command python -Wd manage.py runserver in your Django project directory and then going with a web browser to your login page, you would see in that same console terminal a warning message like this:

/usr/local/lib/python3.6/site-packages/django/contrib/auth/views.py:54:
  RemovedInDjango21Warning: The login() view is superseded by the
  class-based LoginView().

Use the new Django 1.11 way, which will make your code more modern and compatible with future Django releases. With this option, the example given before will now look like the following one:

Example
We again suppose that we have a Django application with a file named views.py and another file named urls.py. The urls.py file will contain some Python code like this:
#
# Django 1.11 way
#
from django.contrib.auth import views as auth_views
from . import views as app_views

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^login/',
        auth_views.LoginView.as_view(redirect_authenticated_user=True),
        name='login'),
    url(r'^dashboard/', app_views.Dashboard.as_view(), name='dashboard'),
    url(r'^$', TemplateView.as_view(template_name='index.html'), name='index'),
]

From that file, the relevant part within the urlpatterns variable definition is the following, which again uses the already mentioned redirect_authenticated_user parameter with a True value, but passing it as an argument to the as_view method of the LoginView class:
    url(r'^login/',
        auth_views.LoginView.as_view(redirect_authenticated_user=False),
        name='login'),

Take note that here the default value of the redirect_authenticated_user parameter is also False.
References

[1] Relevant section in Django 1.10 release notes at https://docs.djangoproject.com/en/dev/releases/1.10/#django-contrib-auth
[2] Relevant section in Django 1.11 release notes at https://docs.djangoproject.com/en/1.11/releases/1.11/#django-contrib-auth
Comment: @Quique gave a neat solution that works with Django 2.x https://stackoverflow.com/a/53764272/9177173
Comment: I am getting this error when i followed this method. login() missing 1 required positional argument: 'user'. I got this error when upgraded to Django 2.2. Any reason how to clear it?
Answer: For Django 2.x, in your urls.py:
from django.contrib.auth import views as auth_views
from django.urls import path

urlpatterns = [
    path('login/', auth_views.LoginView.as_view(redirect_authenticated_user=True), name='login'),
]

Comment: This works perfect with Django 2.x. The entire list of auth_urls can be found on github: https://github.com/django/django/blob/master/django/contrib/auth/urls.py
Comment: How do i do a redirect if i have my url and using django loginview as below. urlpatterns = [
    url(r'^$', LoginView.as_view(template_name='landing.html'), name='landing')
]
Comment: This can also be used for overriding the login view, just above  `path("", include("django.contrib.auth.urls")),`
Answer: anonymous_required decorator
For class based views
Code:
from django.shortcuts import redirect

def anonymous_required(func):
    def as_view(request, *args, **kwargs):
        redirect_to = kwargs.get('next', settings.LOGIN_REDIRECT_URL )
        if request.user.is_authenticated():
            return redirect(redirect_to)
        response = func(request, *args, **kwargs)
        return response
    return as_view

Usage:
url(r'^/?$',
   anonymous_required(auth_views.login),
),
url(r'^register/?$',
    anonymous_required(RegistrationView.as_view()),
    name='auth.views.register'
),
# Could be used to decorate the dispatch function of the view instead of the url

For view functions
From http://blog.motane.lu/2010/01/06/django-anonymous_required-decorator/
Code:
from django.http import HttpResponseRedirect

def anonymous_required( view_function, redirect_to = None ):
    return AnonymousRequired( view_function, redirect_to )

class AnonymousRequired( object ):
    def __init__( self, view_function, redirect_to ):
        if redirect_to is None:
            from django.conf import settings
            redirect_to = settings.LOGIN_REDIRECT_URL
        self.view_function = view_function
        self.redirect_to = redirect_to

    def __call__( self, request, *args, **kwargs ):
        if request.user is not None and request.user.is_authenticated():
            return HttpResponseRedirect( self.redirect_to )
        return self.view_function( request, *args, **kwargs )

Usage:
@anonymous_required
def my_view( request ):
    return render_to_response( 'my-view.html' )

Comment: Using a decorator is the best answer.  This type of logic only clutters up the actual views.
Comment: And to add, for CBVs, you're really better off writing it as a mixin and overloading `dispatch()`.  See django-braces for many examples.
Comment: hey, you should be getting more up votes for your answer.  by far the better answer and way more versatile of an approach.
Comment: I am getting this error when i followed this method. login() missing 1 required positional argument: 'user'. Any reason how to clear it?
Answer: Add this decorator above your login view to redirect to /home if a user is already logged in
@user_passes_test(lambda user: not user.username, login_url='/home', redirect_field_name=None)
and don't forget to import the decorator
from django.contrib.auth.decorators import user_passes_test
Comment: `user.is_anonymous()` may be better than testing the username.
Comment: I think the downvote may be related to the fact that this function is specifically for redirecting people _to_ the login page.  For example, it encodes the current URL into a `next` GET variable.
Comment: I love how my suggestion was down-voted w/o an explanation. I'm particularly proud of this discovery because it's elegant, pragmatic, and it's a one liner!
Comment: this is the most elegant solution imo.
Comment: This is great if you are not using the generic views provided by django.contrib.auth
Comment: Could you please add some explanation for what's happening here? It's a one-liner, sure, but what is it doing? I'm learning Django and this doesn't quite make sense to me. :(
Answer: Since class based views (CBVs) is on the rise. This approach will help you redirect to another url when accessing view for non authenticated users only.
In my example the sign-up page overriding the dispatch() method.
class Signup(CreateView):
    template_name = 'sign-up.html'

    def dispatch(self, *args, **kwargs):
        if self.request.user.is_authenticated:
            return redirect('path/to/desired/url')
        return super().dispatch(*args, **kwargs)

Cheers!
Answer: https://docs.djangoproject.com/en/3.1/topics/auth/default/#all-authentication-views
Add the redirect route in settings
LOGIN_URL = 'login'

And in the URLs add redirect_authenticated_user=True to LoginView
path('login/', auth_views.LoginView.as_view(template_name='users/login.html',redirect_authenticated_user=True), name='login')

Comment: This should be the accepted answer now on. perfect +1
Answer: I know this is a pretty old question, but I'll add my technique in case anyone else needs it:

myproject/myapp/views/misc.py
from django.contrib.auth.views import login as contrib_login, logout as contrib_logout
from django.shortcuts import redirect
from django.conf import settings

def login(request, **kwargs):
    if request.user.is_authenticated():
        return redirect(settings.LOGIN_REDIRECT_URL)
    else:
        return contrib_login(request, **kwargs)

logout = contrib_logout

myproject/myapp/urls.py
from django.conf.urls import patterns, url

urlpatterns = patterns('myapp.views.misc',
    url(r'^login/$', 'login', {'template_name': 'myapp/login.html'}, name='login'),
    url(r'^logout/$', 'logout', {'template_name': 'myapp/logout.html'}, name='logout'),
)
...

Answer: Assuming that you are done setting up built-in Django user authentication (and using decorators), add this in your settings.py:
LOGIN_REDIRECT_URL = '/welcome/'
NOTE: '/welcome/' here is the URL of the homepage. It is up to you what to replace it with.
Comment: -1, LOGIN_REDIRECT_URL is used only when an user successfully logs in
Answer: All you have to do is set the "root" url  to the homepage view. Since the homepage view is already restricted for logged on users, it'll automatically redirect anonymous users to the login page.
Kepp the url as it is.
And add something like:
(r'^$', 'my_project.my_app.views.homepage'),

Comment: It still doesn't fix the problem. A logged in user would still be able to reach the the login page (by typing the url or whatever).
Comment: Please read the OP carefully. The question is about how to redirect *logged in* users from the login page if they were already authenticated. The built-in `login` view does not cover this case.
Comment: The approach I suggest works just as well. All he wants is for logged in users to skip the login page. My approach suggests that the main (root) page is the home page. Since the home page is login restricted, anonymous users will be redirected to the login page. I've use this approach before. Don't mark my solution down because you don't understand it.
Comment: "You don't understand it" LoL – you did not understand the question


Sceen goes blank when using browser for certain tasks using 16.04

Question: I am using
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial
on a gigabyte brix S which comes with a built in intel card
lshw -C video
  *-display UNCLAIMED
       description: VGA compatible controller
       product: Broadwell-U Integrated Graphics
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list
       configuration: latency=0
I am using a HDMI to DVI converter
Symptoms:
I can reliably cause the issue by opening google chrome, then navigate to gmail, as soon as I click on a check-box (to select a mail item) the screen goes blank and does not recover, unless a navigate to the different tab in the browser (ctrl+tab).
In firefox the precise same problem does not occur, however the screen regularly goes blank when browsing other sites in firefox. usually scrolling the mouse will fix it.  Also  If I try to watch any youtube video, the screen flickers off and on ( mostly off).
Things I've tried: (based on existing askubuntu posts)
I've removed the "hardware acceleration" setting in chromne
Checked for latest driver
apt-get install xserver-xorg-video-intel
even this
sudo add-apt-repository ppa:xorg-edgers/ppa
rebooted
the problem still persists
Any ideas would be greatly appreciated !
Answer: problem was the monitor and or the HDMI to dvi converter.
I replaced monitor with one that supports HDMI and re-installed 16.04.
 display & driver working properly


What does "Saltino" mean?

Question: Does anyone know? The piece is for piano.

Comment: It's Italian for jump though what you do in response is not obvious.
Comment: Did your teacher write that word down?
Comment: No... I got the sheet music from here: https://www.docdroid.net/vJczmFr/victors-piano-solo-the-wild-conductor.pdf#page=2
Comment: *Saltando* or *saltato* are the closest I know, but are usually connected with bowed instruments, where the bow is sprung onto the strings, aka *sautille*.
Answer: Salto is a jump so quite probably a little jump.  An editor could have made that clear with markings, tenutos, slurs and such but a Saltarello is an Italian Dance (THANKS DANCING WITH THE STARS) so I would presume it is to dictate the feel of the dance. However, this piece is definitely not an Italian dance as much as it is some sort of funeral march type thing.  I wouldn't have used that word.  I probably would have just said "take a breath."  Isn't it amazing how we use words and dance terms to tell how the music is to feel rather than using 16th, 32nd or 64th notes to actually dictate how it is to be played?  Is music of today dumbed down or more artistic? We teach feeling rather than math.
What is more ambiguous are those fingering markings in the left hand.  Even in the right hand at the "saltino," I would presume there would be a jump there, too. That gives the pianist time to readjust the arm to play practically any finger.
I dislike most editorial fingering.  When the arm is free, it can place any finger where it needs to be and fingering such as this can be crippling.
Time to salto into my car and go to church.

What does "Saltino" mean?


How can I talk about weather without expletives?

Question: In English, it is necessary to use a syntactic expletive ("it") when talking about weather:
It   is     sun-ny.
EXPL COP.3S sun-ADJ

Pro-drop languages can easily avoid the explicit expletive by excluding it (Spanish):
Hac-e sol.
do-3S sun

But in this Spanish example, there's still an implicit expletive subject. How can I completely avoid using expletive subject when talking about the weather?
Comment: In russian "идет дождь"="goes rain"≈"the rain is going"...
Answer: Here are some ideas haven't been listed yet

Allow nouns denoting weather phenomena to form clauses by themselves
Use an existential construction
Make the subject a location
Use an all-purpose weather verb

Weather noun clauses
If a normal transitive clause looks something like the following, then a weather clause can just be a noun by itself.
student-NOM book-ACC read-past-3sg
the student read the book

Here, the noun appears in the nominative case, which tends to be unmarked cross-linguistically.
rain-NOM
It's raining/was raining/will rain

This way, it can be modified with adjectives just as it normally would be.
many/much rain-NOM
It's raining a lot/It's pouring/It was raining a lot/...

Use an existential construction
Ceqli, or at least an old version of Ceqli from years ago, uses an existential construction.
baran hay
rain  exist

Make the subject a location
I think this is similar to Circeus' example, but I can't tell whether it's identical or not. If it's identical, I'll remove it.
Locative subjects are perhaps uncommon or unattested cross-linguistically, but in principle nothing stops you from making the weather verbs intransitive verbs whose subject is the location where the weather is happening.
Here-NOM rain-past-3sg
It was raining here.

Spain-NOM principally plain-LOC rain-pres-3sg.
The rain in Spain falls mainly on the plain.
Lit: Spain rains mainly at the plain.

So the few references I can find to locative subjects are mainly things like this, which describe locations moving to or appearing in the first position in a clause rather than verbs whose subject position has a locative flavor.
All-purpose weather verb
Have a verb that means to be the weather, and use it with the name of the weather phenomenon.
Rain-NOM weather-pres-3sg
It's raining.

Snow-NOM weather-pres-3sg
It's snowing.

Cloud-NOM weather-pres-3sg
It's cloudy.

Cloud-NOM weather-pres-3sg-NEG
It's not cloudy.

This has the advantage of making questions about the weather resemble their declarative counterparts.
what-NOM weather-pres-3sg
How is the weather?

how-much cloud-NOM weather-pres-3sg
How cloudy is it?

Answer: There are also language with impersonal verb conjugation, and of course, nothing prevents a verb from being used only in the impersonal. Nahuatl has an impersonal voice, but because it's only used with verbs that normally have animate subjects, its weather verbs function much like Spanish's, ironically enough.
In my own conlang Mfalen, weather verbs function as descriptors, so one says the equivalent of "X is raining" (i.e. It's raining on/in X) the same way one says "X is cold" or "X is windy" (or indeed, "X is red").
Answer: Hungarian avoids expletive subject when talking about weather by using an appropriate non-expletive subject. To say that it's sunny in Hungarian, you say
Süt     a   nap.
bake.3S the sun
"The sun is baking."

To say that it's raining, you say:
Es-ik   az  es-ő.
fall-3S the fall-N
"The rain is falling"

In this sentence, eső is used as the word for rain, but is in fact transparently derived from the verb esni, to fall, thus the sentence could actually be translated as "The falling thing is falling!"
Of note, however, this latter example can be shortened to just esik, "it falls," though the implicit subject here is az eső, "the rain," and could therefore still be considered non-expletive.
Answer: In russian:

The sun is shining — Солнц-е свет-ит. (Sun lights)
It is raining — Ид-ет дождь-ø. ("Goes rain"≈"The rain is going"


What to do if a game changes completely?

Question: Starbound has recently released an update (Upbeat Giraffe) that changes approximately 90% of the game, and so most questions on the older release (Enraged Koala) are either less pertinent or no longer apply. Is there any protocol we have (or should have) that covers such a large change?
Comment: It's generally question by question.  One option for old questions that are still valid, but have incorrect answers is to offer a bounty.
Answer: We do the same as we did for Minecraft. If an old question is still relevant but the answer isn't, add a bounty to encourage new answers. Leave outdated question and answer pairs for posterity, and make sure new questions and answers clarify what version of the game they are referring to.
Comment: There was another game that had this exact thing happen about 6 months ago, but for the life of me I can't find the meta question pertaining to it. I believe the consensus was if the game can still be played in the old state, the questions should stay, otherwise they should be closed or historic-locked. I'll see if I can dig it up
Comment: @Robotnik Historic locks wouldn't be appropriate; we'd just delete them.
Comment: @Robotnik I believe that was about Spiral Knights, and how the removal of the energy system rendered a lot of the old questions useless.


How to mount TV in old drywall or plaster wall

Question: I'm trying to mount my TV in the wall but it's proving to made much more complicated than expected. My house is from 1908 and has been through multiple renovations. The drywall seems old, and the studs are not laid out using modern standards (e.g. 16" on center). I've tried hollow wall anchors but they ground through the plaster. Any ideas?
Comment: What is a _nipple renovation_? It's doubtful that a 1908 house has drywall, it likely has real plaster. It'll be hard to make a studfinder work through plaster, but if it it backed with wood lath, you might be able to use a magnet to find where the lath is nailed to studs. Or if you have an outlet/switch (or other hole) in the wall you might be able to slip a coathanger behind the wall to find the next stud (turn off the power first!)
Comment: If it's been renovated it could be drywall. Anyway, modern studfinders are pretty good (and pretty cheap). Find the framing, pilot through the plaster for the screws (to prevent cracking), and you're golden.
Comment: I tried using the expanding anchors listed under the medium duty, unfortunately my drywall's quality is very weak and the tube head. with the 2 little hooks smashed the drywall and went trough the wall leaving a nice hole behind.
I've thought of reinforcing  the wall by adding a layer of cement board or plywood to help reinforce it but it wouldn't be a very nicely finished solution.
The wall is about 32" wide and I can't seem to find any studs with the stud finder. I'm considering pocking a hole to try and see into the cavity and find the studs.
Comment: A fairly common problem is that someone installs drywall over furring strips over the original plaster, making finding the studs rather tricky.
Answer: If any type of drywall anchors are failing me, I immediately switch to toggle bolts. The down side being that if they also rip out they're going to pull off large sections of plaster. Finding the studs is always better.
To find a stud without a stud finder, try 3" screws every inch or so until you find one and then try measuring to help find the next, usually they're on 16" centers. If it's a small section of wall, there might just be one in the center or they might have split the difference and used two. It's also entirely possible that on a 32" wall there isn't one.
If you're willing to poke a hole, 20 little pinpricks should be no problem and if you're lucky the mount will hide them anyway.
Comment: Thank you Mazura! that's exactly what I ended up doing. I poke nails every 2" or so and I ended up finding a 6" section that had wood behind where I was able to screw in the bolts that came with the set. I'm a bit concerned that I could find no other studs in 32" of wall but at least the TV's up.
I thought of toggle bolts but I was afraid my whole wall would just collapse.
If I had not found support on the wall I was just going to open it and install some 2x4 across to back up the bracket.


Do you know where to get the original iRobot Create?

Question: Does anyone out there know where I can get the original iRobot Create?
The company no longer sells them.
It was only 2 years ago that it was sold. It is white and its value is the physical design, that it has a large exposed deck for mounting armatures.
It is preprogrammed to operate in different configurations, eg. spinning, figure 8, following the outline of a wall, etc.
I have an ongoing art project using this model and as they are in operation everyday, I will eventually need to replace them with new ones.
To see a video of one of my projects you can go to https://vimeo.com/119486779
I currently have it working in a spinning motion.
Comment: Can you elaborate why a [Create 2](http://www.irobot.com/create) won't work for your project?
Comment: The physical design of the machine is not the same. I am using the flat bed tray to house an armature. Because of the design of the new one, I cannot adapt my existing armature to fit. I am also using the scripted spin program that exists in the Create 1 but not in the create 2.
Answer: iRobot is no longer selling original Creates.  So your best bet is a secondary market like eBay.
However, the new Create 2 has the same API as the original.  (Using the Serial Command Interface, not the command module).  It did remove some of the lesser used functions like scripting, but added and improved many features.  Additionally, it is a more robust robot overall, and it even has a rechargeable battery.  I'd be surprised if the new Create 2 didn't work for your application.


Please add a link to a comprehensive list of English verb/preposition pairs and their meanings

Question: When learning English, my wife often uses the wrong preposition with a verb. Could someone please add a resource (website or book) with a comprehensive list of English verb/preposition pairs and their meanings where they can simply look up the verb and find out which preposition to use.
Comment: Apparently thishis is the best I've found — it's a pretty short list, but is well done:
http://www.eslgold.com/grammar/verb_preposition_collocations.html

Verbs that take more than one preposition are clearly differentiated:

agree on (topic)
agree with (someone)

The video (4:44) speaks the entire list.

Apparently this usage is called a "collocation". That list contains only about 90 items. I was hoping someone would have compiled a much more complete list.
Comment: This is one of the main functions of most good dictionaries. For example, scroll down (way down) at [reference.com's "take" definition](http://dictionary.reference.com/browse/take) to the "verb phrases" section, and boom! There they are.
Comment: Have you looked for one? If I had to guess, it would not exist as the use of prepositions varies by English rationality and by the specific usage of the word. We are here to help anyone who needs it on a case by case basis. If you have tried to find such a list, perhaps you can explain what you've already done.
Comment: There are both collocation dictionaries and phrasal verb dictionaries available for learners.  Some of them maybe online (but I haven't checked).
Comment: @Nathan, thanks.  I'll try using dictionary.reference.com.  (I had looked at other dictionaries without much success)
Answer: The Collins Cobuild  English Guides series has an entire book devoted to prepositions. Here is the blurb on the back of the book:
1: PREPOSITIONS
'Collins COBUILD English Guides' provide extensive information on specific areas of today's English, using the evidence from 'The Bank of English' to select what is really important.
This book is suitable for upper-intermediate and advanced students and teachers of English. It will promote a thorough understanding of English prepositions and how they are commonly used today.
Part One consists of an alphabetical presentation of over 100 prepositions, giving detailed explanations of their different uses. Part Two is an extensive list of words commonly used in combination with prepositions.
• Alphabetical coverage of over 100 prepositions
• Over 4000 words which commonly occur with prepositions
• Over 5000 real examples show actual use
http://www.amazon.com/Collins-COBUILD-English-Guides-Prepositions/dp/000370520X/ref=sr_1_2?ie=UTF8&qid=1439232125&sr=8-2&keywords=collins+prepositions
Comment: Thanks.  I've ordered this ($25 thru Amazon) and will check it out.
Answer: If you're looking for one book to help your wife study verb-preposition collocations (or any sort of collocations, for that matter), phrasal verbs, meanings, or even English in general, I'd recommend the Longman Dictionary of Contemporary English. Each entry has a lot of collocations and examples. It is by far the most comprehensive dictionary for English learners I've ever seen. The online version is available here. The physical copy, however, is richer in content and definitely is worth buying.
For collocations  alone, you can try the Oxford Collocations Dictionary (OCD) or the Macmillan Collocations Dictionary. Personally I prefer the Oxford one, but I think the Macmillan one is good too. There is a website where you can look up the OCD, but I'm not sure if it's completely legal, so I won't post the link here.
As for phrasal verbs (if needed), The only "pure" phrasal verb dictionary I could think of is Macmillan's: the Macmillan Phrasal Verbs Plus. McGraw-Hill's Dictionary of American Idioms and Phrasal Verbs can also do the same job, but that seems a little too much for this purpose.
Other online collocation dictionaries include OzDic and Dictionary.com.


What size breaker and wire do I need for a 220 volt circuit to an electric fireplace and an electric heater?

Question: I want to run a 220 volt circuit from panel to an electric fireplace (12 amps)  and an electric heater (15 amps).  What size breaker should I use and what size wire?
Comment: Are these your two primary heating sources? If so you might opt to put them on two breakers so that if one trips you don't risk having no heat at all!
Comment: By the sounds of it, you want one breaker/wire for both. To provide the best answer: What is the distance between the panel and the fireplace? Panel and heater? What's the total distance if you did one run from the panel to fireplace to heater (or whatever way makes most sense)? It may or may not be cheaper to run two separate (smaller) wires (eg #12 or #14) rather than a single circuit on eg. #10, the distances will help us provide answers for both scenarios and you can decide depending on local pricing.
Comment: Are you talking about putting them both on the same breaker?
Comment: Distance is approximately 25 ft from breaker to furtherest heater approx 15 ft to fireplace.   They are not primary heat sources.
Answer: 10 gauge wire is the largest I like to use in home use. Depending on who you talk to and what code book you are looking at, the amount of current a 10 gauge wire can handle changes. I tend to think it can safely handle about a 30 amp breaker (and I think most code books fall in line with this).
You can add up the amps (12+15=27 amps) to get the total amps possible. This would mean that a 30 amp breaker with 10 gauge wire should work fine. However, check your currents to make sure that is the max that will be pulled. Many items have a large start up current that can cause a breaker to trip if you aren't careful.
For things that pull this much current by themselves, it is generally better to split them into 2 different breakers. So for you I would go with a 15 amp and a 20 amp. Technically you can use #14 on the 15 amp breaker, but if it were me I would go ahead and run #12 in case you some day want to swap out your fireplace with something that pulls more power.
Comment: I don't get the comment: "10 gauge wire is the largest I like to use in home use."......What do you use to wire a range? How about a welder? Steam generator? Spa? A/C condensor?
Comment: This setup really is not recommend because the circuit breaker is designed to protect everything down from it. Think about a situation where the fireplace is turned off and the heater malfunction causing 25 amps to be pulled, all of that current is flowing through a now over powered cable that will heat up and could eventually start a fire.
Comment: Using one circuit, could 10/2 be used to the fireplace and then continue with 12/2 to the furtherest heater?
Answer: add them together for at least 27 amps (for a 30 amps circuit)
split the circuit in a 15 for the 12 amps fireplace and a 20 for the 15 amps heater (to avoid the breaker tripping on the startup spike)
Comment: @gregmac unless there is a fan on the heater
Comment: @Kellenjb, even then the "startup spike" would be negligible.
Comment: There's no startup spike with resistive loads like heaters.
Answer: People thinking like this is exactly what keep us electricians in business.Run a separate circuit too each appliance using #12 on a 20 amp circuit breaker. If you are not qualified to do electrical work please use a licensed electrician in your area so you do not cause a hazard and risk of fire. You don't just add up the amperage or wattage, that's not the way calculations are done. Another misgiving we see from time to time is if it trips the breaker put a larger size breaker on it., that is asking for a fire if you over breaker a wire with a larger size than the wire gauge is rated for.
Comment: Can you give us a citation or reference for "You don't just add up the amperage or wattage?"


Nine-Patch Image Slicing, Padding Issue

Question: So I've patched an image however it has padding on the left and right which I DO NOT want, however when I patch the image without padding the corners on the image get distorted when it's drawn in a layout.
Below is a screenshot of how I am doing it, how would you overcome this issue?
Comment: There should be no padding if you don't put those black pixels on the right and bottom side. "There's padding" means that the text doesn't get to sides of the box? Maybe just specify padding with right and bottom pixels?
Answer: Maybe just try to specify the padding the way it's meant to be specified, i.e. by drawing the bottom (and right if you want) border in 9-patch tool. Like this:
This way the padding should be right (side to side) and corners not distorted.
Answer: The left and top lines define the stretchable area. When you include your corners in the stretchable area, the image gets distorted. In this case, one black pixel touching the center of the image on the left and the same on the top would suffice.
To identify the rectangle for the view contents, and thus the padding, you can use right and bottom lines.

Nine-Patch Image Slicing, Padding Issue


Unsold security in a delisted company

Question: I owned shares in a company called Transmode which was acquired by Infinera. As part of this acquisition 96% of the shareholders accepted an offer for their shares. I failed to do so as I was unwell at the time. If I understand correctly, I now own a security in Transmode which I can't sell since its no longer on the stock market. What options are available to me now? Do I have to wait a number of years before I see my money again? How much is my security worth?
Comment: Are you talking about having the original certificate? If so contact investor relations for Infinera. Let them know you own stock in Tansmode and that it was acquired by Infinera and they should tell you what you need to do.
Comment: `which I can't sell ` - No you can sell, but finding a buyer will be difficult.
Answer:
As part of this acquisition 96% of the shareholders accepted an offer for their shares

This means that most of the shareholder agreed for the sale. If this was less than specified percentage, the deal would not have gone through. To make it easier, there were 2 options present to shareholder, full exchange of shares of Infinera or part shares and part cash.

I failed to do so as I was unwell at the time

So you cannot now choose the option. There will be a default option of getting the equivalent shares in Infinera.

What options are available to me now?

Contact Infinera investor relations and ask them.

Unsold security in a delisted company


Dismissed by my committee

Question: I attended a doctoral program and was completing it in 3 to 4 years. I got a life-threatening sickness that set me back several years. When nearing my dissertation I was dismissed. I was told that I was let go because I had cancer. I never wanted to return to that school again, but not having completed my work has caused me great heartache and I am not able to pursue the career I desired. Is it at all possible to complete the degree elsewhere?
Comment: From the limited details you provide, it seems like you'll need some far more personalized advice than we can offer you here. I'll leave the question open anyway, just in case, but I *strongly* suggest you seek guidance from someone qualified to answer who is more intimately aware of your situation.
Comment: This seems to border on a legal issue.
Comment: Had you published any of the results? This may be enough to convince an admissions committee that you are worth taking a risk on.
Comment: Another thing in your favour, if you had done sufficiently well and had been working for 3 or 4 years,  is that you probably have developed good research skills, which would make finishing a PhD the second time around much easier. (Are you in the US? If so, there's coursework to consider as well. Maybe you can get an exception, maybe not.)
Comment: Some universities have a rule that you  MUST complete your phd within X years of starting, and this is inflexible. Is it possible that such a rule has caught you out?
Answer: In general, I think graduate schools want students to pursue their entire PhD candidacy at a given institution. Moreover, schools may be reluctant to count work done a long time ago as part of the requirements for obtaining a degree, as it likely sets a bad precedent.
Moreover, there's the question of financing. If you're in a program where students are financed through TA's, it's a lot easier to convince a school to take a chance, rather than in the sciences. The reason for this is that funding in the sciences is often tied to specific projects—which means that you will most likely need to change topics if you pursue a PhD in such a department. This would of course set your time to degree back considerably.
That said, you may find a sympathetic department that's willing to take a chance. My best advice is try to talk to the graduate admissions officers of some of the departments you're thinking of applying to. They'll help you to figure out what are the requirements and possibilities.
Comment: Finding a willing *advisor* seems to be sufficient to secure a position. The OP would essentially advisors, I am not sure the way has to be through the usual channels.
Comment: @Raphael: Finding a willing advisor isn't sufficient if the admissions committee has a policy against "transfers" or "restarts."
Answer: This situation surprises me: in the U.S., one could likely file (and win) a lawsuit alleging discrimination, in such a situation.
Dismissal from a college or university on grounds that one is ill is not legal, I think. Accommodation must be made, so that perhaps things are delayed, but not simply cancelled.
Outright dismissal from a job (such as research assistant or teaching assistant) on medical grounds I think is not allowed, either. One may be required to take a leave of absence if one absolutely cannot do one's job even with accommodation, but there is substantial legal (and moral) push to accommodate and reach a compromise.
I think discrimination on admissions, on medical grounds, would also be essentially illegal.
Edit: you should talk to a laywer conversant with such things, who might be willing to talk to you without a huge fee if you describe your situation to their screening personnel. The situation is rife with lawyerism, indeed. Be careful.
Comment: While this may be the case, *we do not have enough details to allege anything*. To the OP reading this post, I *strongly* suggest you exercise caution before throwing around terms such as "illegal" and "lawsuit". You have your entire professional life ahead of you still; don't ruin it now.
Comment: Yes, indeed, caution in legal matters is surely wise... but/and there is something strange here. An informal consultation with student-legal-advisor or such might be useful to help the questioner see/understand the boundaries/parameters/whatever in his/her situation. And/but I will reiterate: in the U.S., dismissal for medical condition is... not ok. If that's what happened... one should investigate what legal recourse there might be. But _do_not_ rush into things, making too-aggressive claims, no. But don't be too passive, either... (The usual...)
Comment: It's also quite likely that the formal reasons for the dismissal were something other than just getting sick. However, the OP should definitely speak to _somebody_ who can speak to legal matters in the country where he or she lives, just to understand what the appropriate options are.
Answer: I think you should try to fight it diplomatically but legally with the school. It doesn't seem fair or legal. It would be nearly impossible to continue in another institution unless you have relationships and also the reputation of the former school is considerably higher, which you wouldn't want to do anyway.
Depends if really the time you were away was strictly due to sickness. If you took several years more afterwards it is unlikely for you to win. Doctoral programs routinely turn away people who started, left, went to the real world, didn't like it, and want to return. They believe that somewhat freshness of knowledge and being current in the topics is important. Also they have some strange ideas about academic virginity that you want to take into account.

Dismissed by my committee


In the simulation of a C-program by a Turing machine, how does a TM determine which instruction to execute?

Question: In Arora-Barak, the authors mention a way how TMs can compute everything that can be computed by computers. The idea is that every high-level language program has an equivalent machine language program which is basically a sequence of instructions. These instructions are easy enough to be implemented in TMs. I am attaching the whole argument in a snapshot. What I am not able to get is that how can TM determine which instruction it has to execute? Of course, we cannot write the complete sequence of instructions in states because number of states is fixed but length of the program may be not.
Answer: The tape of the TM stores the code of the program (the sequence of machine instructions), followed by the memory of the program.  You design a TM that traverses back and forth between the code section (to find the next instruction to execute) and the memory section (to execute that one instruction and update memory appropriately), repeating until it has finished simulating execution of the program..
Answer: They aren't trying to show that there is a single Turing machine that can run every C program (although that's also true). They're trying to show that for every C program, there is some Turing machine equivalent to it. Every C program compiles to a fixed finite number of machine instructions, so you can encode them as states of the Turing machine and end up with a fixed finite number of states.


Need help to delete icons from Applications Menu

Question: I had installed AWS Workspaces, a .msi file through wine. It was installed successfully but didn't run the way I had expected so I uninstalled it through wine uninstaller but the icon still appears on the application menu. How can I remove it from there? I have AppEditor but I don't want to just hide it, I want to know why it is there even after uninstalling and how I can remove it permanently. From my end I have gone into .wine folder in home directory and removed all folders related to this app. Am I missing something?
Comment: Hi Ementary newbie here. How do I get to the local dirrectory! Cannot find in files! Please help, old icons that I also need to delete! Thanks Ash
Answer: These are stored under <code>~/.local/share/applications/wine/Programs</code>. Go and delete 'em.
Comment: Thank you so much, it worked. i really appreciate your help.:)


Which jumper wire to use to connect MSP430F5529 with a breadboard?

Question: Which type of jumper wires will I need in order to connect this MSP430 to a breadboard to build simple circuits? Are all jumper wires equal or is there special ones to supply power vs. those used for communication back and forth? Lastly, can someone confirm if the 20 pins on each side are male or female?
Answer: The pins have both male and female connections. The female parts are on the bottom side. They are passthrough headers used for stacking the launch pad with booster packs.
You can use female to male jumpers to connect the top side with a breadboard. Or female to female with some spare male headers on the breadboard.
Most jumpers are 22 awg and should be fine for power and data. Power is limited by your 5v usb power supply and the 3.6v regulator on board so you don't need larger gauge wire.
Answer: Pins are male (at the risk of being obscene, consider human external sexual characteristics).
To use this board with the plastic breadboards, you would need a female-to-male jumper.  Such jumper wires (or any wire, for that matter) can be used for power or signal (although heavier wire is required for high currents, which you shouldn't be using on a breadboard).  Jumper wires usually come in many different colours - you can use the colour to help identify the purpose of the jumper.
Comment: Thank you, I ended up just buying a pack of 40 male to female jumper wires for a few bucks