What is the formula for the matrix representation of a general controlled gate?

Question: Suppose I have $n$-qubit circuit. I have a single-qubit gate (e.g. a Pauli gate) at qubit $a$ and it is controlled by the qubit $b$.  What is the matrix representation for this controlled gate? The wires $a$ and $b$ don't have to be adjacent so I don't think I can just throw in the Kronecker product with identity. How it would generalize if the base gate is a multi-qubit gate  (e.g. controlled-SWAP) or when it's controlled by multiple qubits (e.g. How do I get a Toffoli gate representation for arbitrary $n$)?
Comment: I found the answer here quite useful. https://quantumcomputing.stackexchange.com/questions/9614/how-to-interpret-a-4-qubit-quantum-circuit-as-a-matrix
Answer: Maybe this helps:
The general way to construct a controlled unitary operator $U$ with the help of projectors is as follows. The projectors $P_{|0,1\rangle}$ are at the index of the controlling qubit, $U$ is at the index of the controlled qubit:
\begin{align} \label{eq:controlled}
  C\hspace{-.08em}U_{0{,\kern-1pt}1} = P_{|0\rangle} \otimes I + P_{|1\rangle} \otimes U.
\end{align}
Where the projectors are just the outer product of the basis states $P_{|0\rangle}=|0\rangle\langle 0|$ and $P_{|1\rangle}=|1\rangle\langle 1|$.
If there are $n$ qubits between the controlling and controlled qubits, $n$ identity matrices must also be tensored between them. If the index of the controlling qubit is larger than the index of the controlled qubit, the tensor products from above must be inverted. Here is an example with qubit 2 controlling gate $U$ on qubit 0 (bigendian, where qubit 0 is "the first" qubit):
\begin{align*}
  C\hspace{-.08em}U_{2, 0} = I \otimes I \otimes P_{|0\rangle} + U \otimes I \otimes P_{|1\rangle}.
\end{align*}
This works with any size operator, not just $2 \times 2$ matrices, for example, to control a swap gate. You just have to make sure that there are enough identify matrices inserted to make the matrix sizes match.


Combinatorics/probability ballot problem

Question: Suppose that there's an election! Two candidates, Sherlock
and Moriarty, are running for office. Suppose that Sherlock receives
8 votes and Moriarty receives 7 votes, and that these votes are
being counted up one-by-one to create a running total.
What is the probability that Sherlock is never behind in this running total? In general, if Sherlock got s votes and Moriarty got m
votes, what is this probability?
Can anyone help me explain this problem? There seems to be a bunch of different cases here for which I have not figured out what the best approach is.
Comment: Reflection principle for random walks...
Comment: http://www.math.caltech.edu/~2016-17/2term/ma003/Notes/Lecture16.pdf
Answer: I give the answer for the special case of $s=m=n$. Considering an opening bracket a vote for Sherlock and a closing bracket a vote for Moriarty, you're actually looking for the number of valid strings with $n$ pairs of brackets, which equals the $n^{th}$ Catalan number, i.e., $C_n$. Thus, the probability you're looking after in this special case equals:
$$\frac{C_n \times n! \times n!}{(2n)!}.$$


Facing issues with using Openpgp library

Question: I downloaded the OpenPGP example code mentioned in question How do you use the PHP OpenPGP library?.
I faced following error when I tried to access keygen.php:

Fatal error: Call to undefined method OpenPGP_Message::signature_and_data() in D:\official\data\sites\openpgp\lib\openpgp_crypt_rsa.php on line 145

Infact, none of three is working. Can you please explain how to fix these issues?
Answer: I guess that line 148 in https://github.com/singpolyma/openpgp-php/blob/master/lib/openpgp_crypt_rsa.php
must be corrected from:
$sig = $packet->signature_and_data();
to:
$sig = $packet->signatures();


House Plant Identification and care

Question: I just bought this plant but it just said Tropical. I would like to know what it is and how to keep it looking so beautiful.
Answer: This plant is possibly a Dracaena angustifolia or "Corn plant".
Answer: Could be a Yucca. Does it have a trunk from which the two branches originates? It is very common for Yuccas as household plants.
From this source:

How to grow yucca
Yuccas do best in bright light and can cope with some direct sunshine.
Water only when the top few centimetres of soil are dry. Yuccas are
tolerant of drought.

Edit:
This source offers advices on how to distinguish Yucca and Dracaenas:

If you don't know if a plant is a yucca or dracaena, one easy way to
determine is by seeing its leaf tip. A yucca, related to agaves, has
similar leaf tip with that of agaves. The leaf tip is dryed and
folded, becoming a stiff, thorn-like structure. If you brush the
plant's leaves with the back of your hand, you can feel these leaf
tips' sharpness against your skin. The older the plant, the harder
these thorn-like leaf tips will be, and since the dead leaves don't
fall down, these would make protective structure for its stem.
Answer: I just found a Dracaena Rikki which looks exactly like my new plant
See: Dracaena Rikki

House Plant Identification and care


Unable to describe table in oracle

Question: I'm trying to get the description of a table in oracle because I need to know what foreign keys does it have and which tables they refer to.
I'm using desc
but all I get is "ORA-00900: invalid SQL statement"
Any idea why?
Thanks.
Comment: Can you show us the command you use for `DESC` ? Also, you will not be able to track all keys with this command, but at least you should be able to do without getting an error.
Answer: I suspect that you did not execute this command with sqlplus. Not every sql program can handle the desc command.
You can either use sqlplus or get the table definition with the following SQL command:
SELECT dbms_metadata.get_ddl (object_type, object_name, owner)
FROM   all_objects
WHERE  owner = '<owner>'
  AND  object_name LIKE '<whatever_table>%';

This will give you the complete table definition with all column definitions.
Comment: This only shows a small (cropped) version of table description.
Answer: The statement is not recognized as a valid SQL statement. This error can occur if the Procedural Option is not installed and a SQL statement is issued that requires this option (for example, a CREATE PROCEDURE statement). You can determine if the Procedural Option is installed by starting SQL*Plus. If the PL/SQL banner is not displayed, then the option is not installed.
you action should be Correct the syntax or install the Procedural Option.
Answer: first of all, the DESC statement causes ORA-00900 when used in a programming environment, like PHP or Python. o0x258's answer above returns only the CREATE statement of the given table. if you are interested in the fields themselves, you should try something like:
select sys.all_tab_columns.*, sys.all_indexes.uniqueness
from sys.all_tab_columns
left join sys.all_ind_columns
  on sys.all_ind_columns.index_owner = sys.all_tab_columns.owner
  and sys.all_ind_columns.table_name = sys.all_tab_columns.table_name
  and sys.all_ind_columns.column_name = sys.all_tab_columns.column_name
left join sys.all_indexes
  on sys.all_indexes.owner = sys.all_tab_columns.owner
 and sys.all_indexes.table_name = sys.all_tab_columns.table_name
  and sys.all_indexes.index_name = sys.all_ind_columns.index_name
  and sys.all_indexes.index_type = 'NORMAL'
  and sys.all_indexes.status = 'VALID'
where sys.all_tab_columns.owner = '### OWNER ###'
  and sys.all_tab_columns.table_name = '### TABLE ###'
order by sys.all_tab_columns.column_id

hope that helps

Unable to describe table in oracle


ELEGOO Mega 2560 USB and Vin simultaneously?

Question: I'm powering my Arduino clone with an LM317 circuit that regulates Vin voltage to 10V (measured with a multimeter).  While the Arduino is powered by USB only, everything works.  When it's powered using Vin, I get odd behavior.  I then tried plugging in the USB to see what was happening via the serial monitor and my laptop shut down.  I read the Arduino is supposed to handle both USB and Vin simultaneously without shorting out, but now I'm scared to try it again.  Is it safe to try again?  Any idea what would cause my laptop to shut down, or what I could be doing wrong?  Thanks.
Comment: `When it's powered using Vin, I get odd behavior` ... what is the voltage at Vin when everything is powered on? .... `odd behavior` doesn't really mean anything ... what actually happens?
Comment: `Is it safe to try again?` ... do not believe anyone that says yes without examining your arduino in person
Answer: It should be fine if you don't have Vin less than 6V6. There is a circut that compares half of Vin against 3V3 "reference" and if it's less, then it enables "ideal diode" switch from Vusb (but it also allows backfeeding)
Another way how to bakcfeed usb from the Arduinos 5V is short 3V3 to 5V and having 9V on Vin (eg. less than 10V).
However backfeeding USB port shouldn't be causing restarts. Maybe there are a power supply issues and you've got a big voltage potential difference before connecting it into the USB? You can try to measure it


KDE Plasma bug in Kubuntu

Question: Does anybody know what the bug on the attached picture is and how it  could be fixed?
Comment: What's your graphics card? Is it Nvidia? What about graphics driver you're using?
Comment: Nvidia card GeForce GTX 1050 Ti Mobile
Graphical Driver is nvidia-driver-390
Answer: This is a common graphics corruption issue that happens with some graphics card. I can reproduce such an issue reliably on a laptop with a broken Intel graphics adapter, so IMO this usually means that the graphics card need replacing.
See if you can clear the problem by restarting the Plasma desktop using the terminal command killall plasmashell; kstart5 plasmashell. If it recovers, it could be a bug in Plasma but if it doesn't - it is definitely a hardware issue.
Comment: was use command from you. It helped me. The picture is ok right now
Comment: Then its likely a bug related to suspend/resume on Nvidia - one of the following bug reports could be relevant (or all of them): https://bugs.kde.org/show_bug.cgi?id=364766 https://bugs.kde.org/show_bug.cgi?id=344326 https://bugs.kde.org/show_bug.cgi?id=382115 https://bugreports.qt.io/browse/QTBUG-56610 , and they suggest that the problem was already fixed and you should update your OS.

KDE Plasma bug in Kubuntu


How would the UK leaving the EU affect academia and PhD admission?

Question: Will all European applicants count as 'international students' then?
Are there any proposals on this yet? I am finishing my BA in two years and was considering applying to the UK, but am worried now that I will have to pay international fees.
Comment: European students are currently fee'd as home students, i.e. no difference to UK students. A strange situation can be found in Scotland, where, to my knowledge, home students (Scottish and EU) do not pay fees, but English do. What would happen after a Brexit is anyone's guess. I think no-one can give a good prediction and all bets are equally valid: 1. no change; 2. EU gets privileged, but non-UK status; 3. EU is treated as overseas. And everything is compounded by visa problems - although one educated guess of mine is that visa-free travel will be sustained for Western (!) Europe.
Comment: As far as I know, European students *are* international students in the UK right know. The issue with fees is complicated, e. g.  the Erasmus program for BSc and MSc students is not related to EU.
Comment: Please see [this meta question](http://meta.academia.stackexchange.com/questions/3351/shall-we-close-brexit-related-questions-as-not-answerable) for my vote to close rationale.
Answer: The following are opinion, not fact, as AFAIK nobody has a clue what a potential post-Brexit academic situation would look like:

It's standard for qualitative features in regulations and costs to remain fixed for students over the lifetime of their studies. So I would guess that the fees won't change halfway through: you'll know the approximate costs at the start. It wouldn't surprise me if in two years fees for EU students would remain the same, especially if (as your question seems to imply) you've been normally resident in the UK for 3 years.
I would always expect a PhD studentship to cover fees. I would be very wary of one that didn't guarantee this. The risk of higher fees should be on the studentship, not on you personally. (Of course, you may self-fund, which is a different issue)
In the current UK climate I would be more worried about visas to study. With the current arguments around net migration, and the crazy situation where students are counted as immigrants, I would expect student visas from the EU to become a problem.
Comment: +1 These are good comments, but the first sentence is key.
Comment: Definitely visa concerns, and the treatment at the border even with a valid visa. I did my masters in the UK (US citizen) and was treated very poorly. A PhD graduate was arrested, detained, and deported (check the news about this). It's shocking.
Comment: @lafemmecosmique, given the US now stop UK citations based on nothing more then their faith, why do you find it shocking for the UK to enforce borders in a way you don't like?
Answer: I don't think it is possible to know the exact consequences unless and until negotiations are complete on a withdrawal treaty. AFAIK the main rule for this is Article 50 of the Lisbon Treaty. The UK and the EU could agree to keep some mutually beneficial arrangements. They could agree on a longer or shorter schedule for withdrawal. Or they could fail to agree on anything and the UK would be out in two years.


how to get the name of button background Image in Winforms C#

Question: I added image to the resource in Form and set it as background Image for a button.
How to get the name of the button's background image by through programmatic.?
Comment: An image doesn't have a name.  You should have no problem knowing the original file name or resource name, after all you added it yourself.
Comment: You don't, the background image doesn't have a name.  You'll need to explain what you are *really* trying to do, it is completely unguessable.
Comment: even i know the resource name how do i compare that with the button background image name?
Comment: @arunkumarnonascii You are confusing knowing the name of the *original file* with the "name" of the *Image object* that is assigned to your control. The latter *does not exist*; it's simply an image object in memory.
Answer: You cannot retrieve the name of the image.
What you can do is when you set the image: store the name of the image in the Tag property of the Button.
You can then check the Tag property as long as you keep it in sync with the image.
Even nicer would be to sub-class the Button and add a property that stores the name.
Answer: If you have set the BackgroundImage property using the Winforms designer, Visual Studio has generated in the .Designer.cs file the following line for you:
this.button1.BackgroundImage = global::WindowsFormsApplication5.Properties.Resources.my_image_name;

As you can see, it's affecting a value of type System.Drawing.Bitmap to a property of type System.Drawing.Image. The only information you have here is the image itself.
If you added the image by yourself:
string resourceKey = "my_image_name";
this.button1.BackgroundImage = (System.Drawing.Image)Properties.Resources.ResourceManager.GetObject(resourceKey);

then you already have the name of your resource...
If it doesn't answer your question, then please make it clearer.


Amide fragmentation of salicylamide

Question: I want to ask a question about the fragmentation of the $\ce{M_17}$ peak of Salicyclamide to a phenolic fragment.
I was reading the following paper giving a profile about salicyclamide.
I want to determine a mechanism that gives the following product from the fragmentation scheme:

I am however, unable to so far produce a mechanism that shows the scheme above.
The figure below shows the closest attempt I have made so far.

I feel my attempt is incorrect since there is a net charge change.
What mistake am I making that can rectify my result and provide a reasonable suggestion for the mechanism involved?
I don't understand how this question can be voted for closure as it is "not relevant to chemistry". This is a clear phenomena given in a research paper and I wanted to discuss the mechanism(s) behind such findings that have been observed in the paper - as noted in the help centre under Questions relating to observed chemical phenomena.
Answer: I realised that for an $\ce{m/z = 92}$ you would need a $\ce{C6H4}$ ring with only an oxygen group attached. If a positive charge is present, this implies that there is a radical at position 2 ortho to the $\ce{C=O}$.
I revised my own mechanism below to suggest one possible route:

Amide fragmentation of salicylamide


Is it safe to cook wine or vinegar in cast iron?

Question: I want to cook a beef brisket, following a recipe that suggests baking it on a bed of onions and red wine, or red wine vinegar.  I'd like to use a cast iron dutch oven, but am concerned about the interaction between the wine and the iron.  I've read tomatoes and iron is not recommended, but what about wine or vinegar?
Answer: I'd like to refer you to my answer to the question about chili in cast iron, from which I'll summarize the relevant parts:

Typical cast iron corrodes at a pH lower than 4.3; pure white vinegar (5%) has a pH of 2.4 and wine is around 3.2 to 3.8.  If you plan to use either of these in cast iron, you'd better make sure they are heavily diluted, otherwise you may actually ruin your pot in addition to getting a pretty hefty iron supplement with your meal.
Cast iron is still somewhat reactive at borderline pH ranges, i.e. tomato juice or sauce.  It'll leach out about 5 mg of iron for every 3 oz / 88 mL of liquid for typical cooking times.  The typical human needs to ingest significantly more than 45 mg over a period of several days to become toxic, so it's generally considered OK and even healthy to cook dilute tomato solutions in cast iron, but wine and vinegar are another story.

Don't fill your cast-iron cookware with wine or vinegar.  A splash for sauce or deglazing is OK, but tossing a significant amount straight into the pan undiluted will ruin your cookware, and your health.
P.S. Note that enameled cast iron (Le Creuset, etc.) is less reactive; the specifics depend on the brand.  If you have this type of cast iron, I suggest doing your homework before taking the risk.
Comment: Enameled cast iron should be completely unreactive: it's essentially covered in glass.
Comment: I was skeptical of the term *heavily diluted* but it seems you are right: since pH is a log10 scale, to raise the pH by one point requires 90% reduction of acidity. So, if you have a cup of 5% vinegar with pH 2.4, you need to add 9 cups of water to get 10 cups of .5% vinegar with a pH of 3.4. I am curious how much resistance to corrosion is conferred by seasoning or enamel coating. I have made chili (ie diluted tomato juice) in my cast iron with no visible deterioration.
Comment: If the pan is well seasoned, the seasoning patina will help protect the pan from the acid in the ingredients.  Still, I wouldn't make tomato sauce in cast iron--another pan may be better suited.  Sounds like your braise is in the same category.  Braises are quite friendly to any type of pan, even a casserole, a long as they can go in the oven.
Comment: @Aaronut: So, in a recipe that calls for adding 1 cup of wine to rice until absorbed, and then adding 6.5 cups of water/broth, how should I dilute it? Thanks for your time/insight =)!
Answer: My understanding is that you want to avoid all fairly acidic liquids in cast iron, out of concern that it will leach an undesirable amount of iron into the food and/or change the flavor or color of the food. A squeeze of lemon juice into a sauce? No problem. Braise for 30 minutes in a very acidic sauce? Not such a good idea. (Unless of course your Dutch oven is actually enameled cast iron, with the white interior - in which case none of this applies, go right ahead with your plan.)
Answer: I think the issue with acid in iron is less what it does to the food and more what it does to the pan. You've spent all that effort building up and maintaining that beautiful seasoning, and anything strongly acidic like tomatoes or vinegar will strip that off.
Comment: I've read conflicting opinions on acid in iron, so I'm conducting an experiment myself.  Some say a properly seasoned pan (this is) can hold up against the acid.  The beef, onions, and red wine vinegar are in the oven (in a cast iron *dutch* oven in the oven, that is) as I type this (and it smells fantasmigorical).  We'll see what happens...
Comment: Love it! Experimentation beats out old wives tales and kitchen kitchen myths.
Answer: I just wanted to add -- this should probably include beer as well. A quick search showed the pH of common beers is under 4.0.
I started my beef braise with the beer marinade in my cast-iron, non-enameled  dutch oven. It smelled kind of metallic. I searched for it and found this post and others that mention wine and tomatoes due to acidity, but did not mention beer. Well -- adding it now !!
Answer: From what I've read, enameled cookware came into vogue here when specialized recipes, like beef bourguignon, or burgundy(?), were brought here from abroad due to the occurance of the bad reaction raw cast iron had with the wine. People noticed that not only was the seasoning leached from the cookware, but that it wound up in the food and ruined the flavour.
Answer: According to America's Test Kitchen extensive testing, tomatoes/wine/vinegar are fine as long as your cast iron is well-seasoned and you do not leave the acidic dish in it for an extended period (including cleaning the pan right after you finish cooking). They found that the slight acidity of tomatoes was enough to cause metallic flavor after thirty minutes.
You should not use cast iron for this particular recipe because the required hours of cooking and higher acidity of wine/vinegar will cause much more metallic flavor than the 30-min tomato example.
If you used cast iron anyway in this case, you'd probably have to toss the brisket for tasting too metallic and need to redo your seasoning. Worst case, the acid would cause a pitted surface in the cast iron, which can make it difficult to get a good even layer of seasoning. Even that doesn't totally ruin the cookware though. This Redditor soaked their cast iron for weeks in a 50-50 mix of water+vinegar without realizing the risks, and didn't notice anything besides some pitting. The replies link to this article and this YouTube video, which show that severe pitting doesn't prevent a perfect seasoning, just makes it a bit more work.
I suggest that if you're concerned about a particular recipe being too acidic for too long, try simply tasting the food every 10 minutes (assuming it's safe to eat without being fully cooked). If it starts tasting too metallic, then you know the recipe is not a good fit and you can stop before damaging the seasoning or worse.


Inter-rater reliability

Question: In my research, I use a questionnaire so that students mention some classmates according to a group of characteristics. Each item is a different characteristic, and for each one they must name the classmate they consider to have it. In this case can I use Krippendorff's alpha to assess the reliability of the students' judgments?
Answer: Krippendorff's alpha is a measure of (chance corrected) agreement. Reliability in classical test theory is the relationship between the true score and the measured score.  However, measures such as Kripp alpha are often referred to as reliability (but maybe I'm just old).
However, you have a weird issue, that people (presumably) cannot nominate themselves, so 100% agreement isn't possible.
Comment: This means that in the first place one could not speak of reliability, since I am not trying to measure any construct, but rather the nomination of people who have a group of characteristics is sought. In this way, you could obtain the % of agreement between the participants, however this could not be 100% because they could not self-nominate. Is this the idea?
Comment: Yeah, alpha wouldn't be horrible, just be aware it's going to be a little lower than it could be.

Inter-rater reliability


Translate Prechat page for Live Agent Salesforce

Question: I have created custom labels for the prechat page for live agent chat in Salesforce and maintained the translations. What parameter can I use on the VF page to drive the correct language translation based on the chat button configuration ?
Answer: You need to add the "language" parameter to your page tag.
<apex:page language="xx">

You could populate the value of the 'xx' with something you query from the user, or a URL parameter from the site, or something else.
Answer: I was able to this by accessing the language corresponding to the chat button via the url that SF builds.
var languageMatcher = new RegExp("language=(.{2})");
var language = languageMatcher.exec( decodeURIComponent( document.location ) )[1];


Where is the following sentence wrong?

Question: In a Korean book there is a sentence that goes like this:

선생님, 저와 함께 술을 드시러 가시지요

This book says that the above sentence is not entirely correct because it uses incorrect honorifics. Can you help me find the mistake in the above sentence?
Comment: which book is this and what level of Korean is this discussing?
Answer: It mostly depends on the age difference between them.  If it's just a few year difference, then it might be okay. (선생님 can be used in a lot of different situations, so it doesn't tell us much about the relationship)
The sentence doesn't sound very natural even in such a case though.  저와 함께 is rather formal (저하고 or 저하고 같이 is more colloquial) and 술을 드시러 sounds a little too direct.  Traditionally, men say it like this in a casual setting.

선생님, (저하고) 어디 가서 술이나 한잔 하실까요? = Would you like to go somewhere and have a drink with me?

But this can only be said to someone who is fairly close to you.
If the other person is much older (like 5 years or more) or senior to you in an organization, there is no one glaring problem but many things to consider.

가시지요 might sound too casual and forward for good manners.  More respectful way is 술이라도 (한잔) 대접하고 싶습니다, where 대접하다 is formally giving someone a treat. 술이라도 is more natural than 술을 because -(이)라도 implies "I'd like to do more if I could but at least I would do this".

Words like 술 and 밥 are best avoided in a formal setting. You might just say 식사라도 대접하고 싶습니다 since people typically go to dinner and have a drink over a meal.

Lastly, if the other person is much senior to you, the suggestion itself would be inappropriate.  The sensible thing is for a senior person to make such an offer to a junior person.  So the younger person should just wait for the other person to make that offer. (This is in the same spirit as the rule that says a junior person should wait for the senior person to extend their hand first rather than initiating the handshake themselves)

As you can see, all depends on the relative standings of the two people.
Answer: My guess is that the sentence is "wrong" because of "드시러": the speaker is proposing to go and have a drink with 선생님, so both of them are going to drink.  Therefore, the implicit subject of 드시러 is both of them, i.e., 선생님 and 저.
But then you are using honorific to yourself, which is considered wrong.

Now that's the prescriptivist, "the school says so" take, and it's not a bad advice to follow.  But let's consider the actual Korean speech for a second.
Native speakers get such a sentence "wrong" all the time, which raises the question: if even native speakers can't tell that the sentence is "wrong" without being told why, is it actually wrong?
In a sense, this is akin to such English rules like: "Tom and I went to school" is correct, but "Tom and me went to school" is wrong.  But the thing is, native English speakers get it "wrong" all the time, because (for many native speakers) that's not a part of the innate English grammar they learned as a native speaker, but just some factoid they were told at school.

Where is the following sentence wrong?


Is it safe to store rechargeable lithium ion batteries and SD memory in a zip lock bag?

Question: My camera uses a rechargeable lithium ion battery and an SD memory card.  When I'm out shooting and at home, I normally keep an extra of each in a zip lock type of plastic storage bag (the card is first put into the plastic holder that it came with).  Is this a safe way to store them?  If not, is there a better way to avoid any problems?
Comment: possible duplicate of [How should a DSLR camera, lens, and battery be stored?](http://photo.stackexchange.com/questions/1765/how-should-a-dslr-camera-lens-and-battery-be-stored)
Comment: Different issue-I noticed this question before posting mine.
Comment: I sure hope so! That's how I carry around my spare batteries and cards. But before your question I never even wondered if it's safe. I have no idea. I've never had a problem. Why wouldn't it be safe?
Comment: @user4894 My initial thought was the possibility of static electricity associated with the plastic possibly having some impact on the card. The battery part of the question evolved.
Answer: SD cards are very safe when stored in their original plastic container at room temperature in a dry place. The same is generally true of Lithium Ion batteries. Protecting the metal contacts on the SD card and battery will prevent the majority of damage to either device, either through corrosion, physical damage, or electrical short. Storing the memory card (in its plastic case) and battery in separate plastic bags should protect from most problems.
Optimally the battery should be stored at about 60 degrees F and roughly 50 percent charge. The exact charge can be difficult to determine, and the charge percentage needed increases with temperature, but in practical use this is really only a concern for long-term storage.
Comment: This: The only risks would be from either a battery-to-card short, or a battery short (which most Lithium Ion packs are very well protected against) causing a catastrophic event damaging the card.
Answer: Personalĺy, I would never store or carry ANY camera cards and ANY batteries together. Card info storage operates electronically and batteries can have a strong (albeit local) magnetic field. To put one's faith in the card, and any files saved on it, being unaffected by being in close proximity to batteries isn't something I'd recommend.
Comment: _batteries can have a strong (albeit local) magnetic field._ Not really. If they're not supplying current, then there is basically zero magnetic field. And if they are supplying current, it is still a rather weak field. And SD cards are fairly immune to interference from magnetic fields. You can tape an SD card to a strong neodymium magnet for a day, and not experience any data integrity problems.
Comment: Exception to magnetic fields not mattering at all: MicroDrive type CF cards. These could indeed take damage from the neodymium magnet (not from an idle battery though!).
Comment: Electrical engineer who's day job is building flash memory devices here -- This is false.  Unlike HDDs and other magnetic storage, flash memory is basically immune to magnetic fields, and batteries don't create much of a magnetic field anyway.
Comment: Also, some cameras have the (in use!!) battery and card very close together, eg the Sony A6000 and NEX-7.


Ubuntu stuck in a login loop after editing profile file

Question: I'm stuck in a login loop now. What I did was edited /etc/profile as root and added the following line:
export PATH = /opt/my jdk 7 path/bin:$PATH

After logging out and trying to login, I cannot, so I have tried booting in recovery mode, entering the root shell editing the file in vi but it always opens in read only mode and hence cannot be saved.
I just need a way to delete that line and boot into Ubuntu again.
Comment: I guess you wanted to add the `/opt/myjdk7` to your path revert to your old (un-edited version) `.profile` and enter at the end of the line `export PATH = /opt/myjdk7` Check this for more [help](http://askubuntu.com/questions/148337/adding-a-directory-to-a-path-in-profile).
Comment: can you logout and login as a guest? And then in the terminal as root change your profile?
Comment: @pl1nk, I had added :$PATH also to that line.
Comment: @JulienChau, No I cannot even login as guest... I've even tried using the recovery mode root prompt, but vi opens the file as read only..
Answer: Select recovery mode at the GRUB bootloader, and then it will give you a menu.
Select the dpkg menu item.
Say "Yes" when it asks you if you want to continue.
It will fix some stuff (or at least, try to). This might take a while, you can safely ignore most of the 'errors' there.
It will say
Finished, press enter

press enter, and then it will be in read/write mode
so you can then select root prompt, and edit your stuff, and then reboot.
Now, to add it to your $PATH, add the following to your ~/.profile.
PATH=/opt/jre1.7.0_04/:$PATH

and then log out, log back in and you should be good to go!
Comment: Worked bro.. Really great help :)
Answer: I know this thread might be old but I had the very same problem, my PC not show grub loader nor had I have a copy of Ubuntu nearby, so on the login screen press Ctrl+Alt+F1, log in and use nano as root to remove the changes made:
sudo -s
nano /etc/profile

Then Ctrl+Alt+F7 to switch back to GUI login screen. That's it.
Answer: First of all, a little late, but you should not be editing the profile in /etc (or anything else in that directory if you're not sure of what you're doing).  You should make changes like that in your home directory, to the file ".profile".  Then, if you mess up, it's easier to fix, and if you ever have more than one user, it won't affect all users.
Next, thing is that you need to be careful with spaces for any linux command.  Spaces are what separates parts of the command, so if you actually have a space in your path or filename, you need to either use double-quotes, or a backslash in front of the space, like this: file\ name\ with\ spaces.  This is called "escaping the space".
To fix your problem, you will probably need to boot from a live CD, either the original or a repair disk.  Once booted, you can find your installation on the hard drive, change to the /etc directory, and edit the file, preferably by removing your changes and making them correctly in your home directory.
Edit:  Fixing the problem when using wubi
I've never used wubi myself, but there are ways to access the partition either from Windows, or from a live CD or linux utility CD.  There are details in the Ubuntu WubiGuide, but here is the basic from that guide (untested by me):
Boot the Ubuntu Desktop CD, or another LiveCD, then mount the windows partition:
sudo mkdir /win
sudo mount /dev/sda1 /win

Replace sda1 with the appropriate device (a = disk, 1 = partition number), then mount the virtual disk therein
sudo mkdir /vdisk
sudo mount -o loop /win/ubuntu/disks/root.disk /vdisk

Now the content of the virtual disk will be visible under /vdisk. 7.04 users will have to install ntfs-3g first and specify it as fstype to gain r/w access.
Comment: Thanks for the help.. I've installed Ubuntu right now using the wubi option. So, how could I edit the file from /etc directory now?
Comment: Oops, didn't think of that.  I added this to my answer for better formatting.  Hopefully, this will help you.
Answer: I was stuck in a same situation and in my case sudo was not available in my PATH (when I tried in shell). This one worked out for me
/usr/bin/sudoedit /home/yk/.profile

I changed the .profile file and logged in with no problem.
Answer: You could avoid all the rebooting & trickery if you just had a way to make the filesystem read-write in recovery mode. The following works for me:
mount -o rw,remount /

Now root can read and write, and you can do whatever you need to fix /etc/profile.
Answer: I had the same problem today, here is what I did:
when you get to the login screen:
CTRL+ALT+F1, login to tty1; now because the PATH is bad, most commands like ls, nano, grep etc wont work. However, you can still read the .profile file with less .profile (not more) and delete it with unlink .profile (maybe .profile~ too). The you can login again.
Hope that helps someone.


How to increase the wss_logging database retention period

Question: how to increase the wss_logging database retention period to store uls log files from default 14 days.
Answer: Have a look at the following MSDN article: https://blogs.msdn.microsoft.com/manhar/2012/04/17/how-to-reduce-the-size-of-logging-database-or-how-to-purge-the-old-data-from-logging-database/ it will answer your question. The title says how to decrease the size of the logging database, but the article describes how to change the retention periods.
An example command:
<code>Add-PSSnapin Microsoft.SharePoint.PowerShell
Set-SPUsageDefinition -Identity "Page Requests" -DaysRetained 3
</code>
This will set retention period to 3 days for "Page Requests":


Cold transaction signing with GUI

Question: Is it possible to safely complete a cold transaction signing process with the official GUI instead of the CLI process described here?
Answer: Try this:

Create a view only wallet (settings page)
Open view wallet and create a transfer, save with "Save tx" button
In original wallet, click "Sign tx" on send page and select the file
in view wallet, click "Submit tx" and select the signed tx file
Comment: Is there a plan to add that functionality in the future?

Cold transaction signing with GUI


What do you have to focus on when reading other people's screenplays to improve as a writer?

Question: What do you have to focus on when reading other people's screenplays to improve as a writer? No matter, how many screenplays I read, I can't seem to improve in my writing. What are the most important aspects in a screenplay you should focus on when reading other people's screenplays in order to improve as a writer when writing screenplays?
Answer: Round up the usual suspects.

How do they move the plot?
How do they pace the story?
How do they show character?
How do they do dialog?
How do they use timing?
What level of vocabulary do they use?
How do they produce emotion?
How do they make you care about the previous items?

Depending on the genre, you may have other "usual" questions. For example, if it's a comedic show, how do they produce laughter? (If they do.) Or if it's a horror story,  how do they produce suspense? If it's an adventure, what produces excitement?
Comment: Keep in mind if an actor who is known for improvisation skills is cast attached to the show, you may have a dialog bit where the character isn't given a written dialog, but rather the instruction "[actor] does something funny" and let the actors just improvise dialog because they can be way funnier than the scriptwriter.    Harpo Marx, Robin Williams, and Ryan Reynolds are some actors frequently handed scripts where their lines aren't there.  Pruportedly, the Disney Film Aladdin was disqualified from most writing awards because so much of it was improved (Gottfried was also good for this too
Answer: First you need to analyze your own attempts.  If you find you can not determine what you are weak in, you may want to enlist some assistance from beta readers.
Then you need to concentrate on how those writers do what you are weak in.


Is it possible to set linux user's priority?

Question: I am on Ubuntu system, and I want to create "limited" user. I want all processes started by this user to have lower than normal priority. It would be great if I/O priority could be decreased as well (but it is not a must).
Answer: You do do this using Pluggable Authentication Module (PAM) limits.  See this link.  The default configuration file is /etc/security/limits.conf
Comment: The link is dead.
Answer: If ubuntu has file <code>/etc/security/limits.conf</code> like fedora then you can define the limits without any problem. See if that file exists. There is extensive help and examples in the file that you will understand how to define limit. Specifically you want to assign max priority limit for some user.


Admob openx integration

Question: We are using openx to serve ads. However there are times when we don't have enough Ads and would like to serve admob Ads. Is there an openx - admob integration that allows us to setup a banner or zone that will just call out to admob?
Answer: Maybe you could look at http://www.adwhirl.com/     (ADWhirl) - this is an open source product which allows you to serve up admod adverts, together with a bunsh of other ad-type services, as well as "house ads" which are your own ads - maybe that is worth a look ?

Admob openx integration


Captcha Alternative to ReCaptcha

Question: ReCaptcha can be one of the most annoying captchas out there. Are there alternative captcha solutions out there for native civi profiles and pages?
Answer: I like CiviHoneypot myself, especially on contribution pages.
Answer: Not quite a captcha solution but this extension blocks repeated submissions on a contribution form from the same IP address. https://github.com/fuzionnz/nz.co.fuzion.iprestrictions
This wouldn't prevent the use of Tor or similar to mask ip addresses, and doesn't currently work on profiles.

Captcha Alternative to ReCaptcha


I want to find out the angle for the expression $a^3 + b^3 = c^3$.

Question: like in pythagorean theorem angle comes 90 degree for the expression $a^2 + b^2 = c^2$, however I know that no integer solution is possible.
Comment: The Pythagorean theorem generalizes to $c^2 = a^2 + b^2 - 2ab\cos\gamma$ [(law of cosines)](http://en.wikipedia.org/wiki/Law_of_cosines).
Comment: Are you perhaps wondering if there is a form of non-euclidian geometry which has a cube law for the sides of "right-angled" triangles appropriately defined?
Answer: There is no single angle corresponding to the relationship $a^3+b^3=c^3$.
Suppose that a triangle has sides of lengths $a,b$, and $c$ such that $a^3+b^3=c^3$. We know from the law of cosines that if $\theta$ is the angle opposite the side of length $c$, then $c^2=a^2+b^2-2ab\cos\theta$, so
$$\cos\theta=\frac{a^2+b^2-c^2}{2ab}\;.$$
Now let's look at just a few examples. If $a=b=1$, then $c=\sqrt[3]2$, and $$\cos\theta=\frac{2-2^{2/3}}2\approx0.20630\;.$$
If $a=1$ and $b=2$, then $c=\sqrt[3]9$, and $$\cos\theta=\frac{5-9^{2/3}}4\approx0.16831\;.$$
If $a=1$ and $b=3$, then $c=\sqrt[3]{28}$, and $$\cos\theta=\frac{10-28^{2/3}}6\approx0.12985\;.$$
As you can see, these values of $\cos\theta$ are all different, so the angles themselves are also different.
Comment: M.Scott : Thanks, I got your point and proof is really satisfying me
Answer: And here's a plot of the angle:

The minimum angle seems to be at $a = b$, where
$$\cos\theta = 1 - \frac{1}{2^{1/3}}$$
Answer: You do get slightly different answers for the Pythagorean Theorem on the surface of a sphere of radius $1,$ or the hyperbolic plane of curvature $-1.$ On the sphere, a right triangle with geodesic lengths of legs $a,b$ and hypotenuse $c$ obeys
$$ \cos c = \cos a \; \cos b,   $$
while in the hyperbolic plane with curvature $-1$ it becomes
$$   \cosh c = \cosh a \; \cosh b.  $$
In both cases, if you write out the functions as power series in $a,b,c,$ you see that the limit as $a,b,c$ all shrink to nearly $0$ is the traditional Pythagorean Theorem.
See Wikipedia Section Link
Comment: @WillJagy I just thought it was an acronym and was wondering what it stood for.
Comment: [Wookieepedia: The article you requested does not exist.](http://starwars.wikia.com/wiki/Law_of_cosines)
Comment: @RahulNarain, I see what you mean. For some reason mine works, but I can understand that it is not really a Star Wars kind of thing. Life is so complicated.
Comment: I am very confused about what "WOOKIE" means. Presumably you're not referring to Star Wars?
Comment: @Potato, it is just a link to a relevant section in Wikipedia. I have paid little attention to these changes in the web over the years, and to me Wiki might as well be random syllables, to be fiddled with for my amusement. However, if it is actually going to confuse people, I suppose I can write this is a more standard manner. On my screen, any link appears among text in a separate blue color.
Answer: Expanding on Brian M. Scott's answer, since
$\cos\theta=\frac{a^2+b^2-c^2}{2ab}$
and $c^3 = a^3+b^3$,
$\cos\theta=\frac{a^2+b^2-(a^3+b^3)^{2/3}}{2ab}
= \frac{1+(b/a)^2-(1+(b/a)^3)^{2/3}}{2}
=\frac{1+r^2-(1+r^3)^{2/3}}{2}
$
where $r = b/a$.
The derivative of the numerator
is $2r-(2/3)(3r^2)(1+r^3)^{-1/3} = 2r - 2r^2(1+r^3)^{-1/3}$
which is never 0 (else $(1+r^3)^{1/3} = r$)
so is always positive (since its value at 1 is
$2-2/2^{1/3} > 0$).
For large r,
$(1+r^3)^{2/3} = r^2 (1+r^{-3})^{2/3}
\approx r^2(1 + (2/3)r^{-3})
= r^2 + 2/(3r)
$
so
$\cos\theta \approx \frac{1+r^2 - (r^2 + 2/(3r))}{2}
= \frac{1-2/(3r)}{2}
$
which tends to 1/2 for large $r$.
This may have an error, since I would expect it to go to 1,
but I have to go now, so this this is it.
Comment: However some mistake is there, but the logic is correct for the explanation.


What is 'surface acceleration' of a planet or other body? As opposed to its 'g' (gravity)?

Question: The Mars Fact Sheet at NASA (their NSSDC or NSSDCA section, whatever that means) lists a value for 'surface acceleration' just below one for 'surface gravity'.  They also have the values for Earth, for comparison.  The values for surface acceleration are very similar to those for gravity, just slightly smaller...
Answer: The technical content of NASA's web pages have sadly declined over the years. The planet fact sheets are exemplary of that decline. The December 8, 2002 version of that page provides only one value instead of two, titled "surface gravity". The values are 3.69 m/s2 for Mars and 9.78 m/s2 for Earth.
The gravitational acceleration at the surface of the Earth (or Mars) is not constant. It varies with latitude and altitude. The value of 9.78 m/s2 for the Earth represents the gravitational acceleration, including centrifugal acceleration, at Earth sea level at the Earth's equator. The gravitational acceleration at the Earth's North Pole is a bit greater than this, about 9.834 m/s2. There is no centrifugal acceleration at the Earth's poles, and the Earth's poles are a bit closer to the center of the Earth than is the equator thanks to the Earth's rotation. The same concepts apply to Mars.
The value of 9.80 m/s2 added to the cited page a bit later is arguably erroneous; it should be 9.81 m/s2 (or even better, 9.80665 m/s2) rather than 9.80 m/s2. As I've said elsewhere regarding Wikipedia, "that's Wikipedia for you." Unfortunately, the same applies to NASA web pages, in spades.
Comment: See also "[@DavidHammen's cool table](https://physics.stackexchange.com/a/141981/83380)" (as referenced [here](https://astronomy.stackexchange.com/a/31825/7982))
Answer: Quantities in the fact sheets are explained here.   The surface acceleration is slightly lower than the surface gravity because the former also includes the effects of rotation, which slightly offsets the gravitational force.
Comment: Unfortunately, the explanation is incorrect. The centrifugal acceleration at the Earth's equator at sea level is 0.0339 m/s^2. The acceleration due to the Earth's mass (not including centrifugal acceleration) at sea level at the equator is about 9.814 m/s^2.. They should not have added the 0 after 9.8. 9.8 would have been fine. 9.80 was not.
Comment: The numbers for Earth may be slightly off at the 0.01 m/s^2 (0.1%) level as you note, but it's clear what NASA's definition of the two quantities is - one with gravitational acceleration from mass alone, and one including the effects of rotation.
Comment: It's not 0.1%. It is a 75% error as far as I'm concerned.


HOw do I file a police report and still ensure the FBI doesn't get involved?

Question: I work for a company who's checks have been fraudulently copied and used in a scam.  I'd like to report this to my local PD, but I'm concerned they'll get the FBI involved.  As I understand it, once the FBI gets involved, their investigation becomes very invasive and would put a tremendous strain on our organization.  I just want to file a police report and that's it.  How do I do that?  Thoughts?
Comment: This question is not about IT Security.
Comment: If you're that concerned about what might be discovered during the course of a federal investigation then you need to consult an attorney, not SO.
Comment: The government does what the hell it wants. If you file a report, if they're interested they will get involved. That said, check fraud is serious. If it's part of a bigger scam you will want to report it and hope they get involved.
Comment: Not only is it not about IT security, it is also primarily opinion-based, so it would probably not fit in Law.SE . That being said, I second @Johnny's advice: consult an attorney.
Answer: Hire an attorney. It sounds like you want to help the police catch the person but limit the scope and impact of an investigation. Attorneys can help you with this.
Likewise an attorney can advise you about what is most likely to happen. You may find out that you actually have nothing to worry about and that this might be easier than you think. In any case, it's not uncommon for attorneys to have an initial discussion for free so you have very little risk in that initial discussion and are very likely to learn about how this is handled in your jurisdiction.
Long-term: Learn how to make it cheaper and easier for your company to deal with discovery requests. Odds are as your business continues to operate you are at increasing odds of eventually running into a need to handle a discovery request. If you plan for it this can be a trivial process with low impact to your team. Not planning for it is what makes it painful.


Can't connect to internet after installing ArcGIS Server 10.2.2

Question: I set up a new Administrator User Account then install ArcGis Server 10.2.2 on it. The installation is successful and i can access to ArcGis Server Manager, but after that i realize i can't connect to internet (both main and secondary User Account). As you can see i already connected to my wifi but in Network and Sharing Center nothing be there. I tried to use the internet cable but have the same result. My other laptop can still access internet normally.
Comment: I'm not sure the 2 issues are related, I don't think ArcGIS Server effects network adapters in any way. Have you tried disabling and re-enabling your main network adapter?
Comment: i already tried. I restarted my laptop too :(
Comment: i thought the 2 issues are related because i can't connect right after finishing the installation. 5 mins before that i still reading how to use the ECP Copy Protection File (.ecp)
Comment: Were you able to authorize the software using your internet connection? If you click on change adapter setting, right click on the correct network adapter and choose properties. Then pick Internet Protocol Version 4 (TCP/IPv4) and click the properties button. Is your IP address set to "Obtain an IP address automatically"? (The correct setting will depend on your network and automatic might be the wrong mode but worth a try)
Comment: Thank you @Dowlers. I checked Network adapters in Computer Management. There was a new "Microsoft Hosted Adapter" there. I disabled it, scan for hardware changed and it disappeared, then i can use internet again !! ,prrrrr   -____-   I still don't understand why -____-
Answer: I checked Network adapters in Computer Management. There was a new "Microsoft Hosted Adapter" there. I disabled it, scan for hardware changed and it disappeared, then i can use internet again.


Eclipsing binaries - definition with inclination

Question: What is the definition of eclipsing binaries based on the inclination of their orbit and the sum of relative radii? Are close eclipsing binaries defined by an inclination greater than 60 degrees?
Comment: Eclipsing binaries are defined by their eclipses. The inclination needs to be large enough to make the eclipses visible.
Comment: It depends on the size of the orbits *and* the radii of the stars.
Answer: The condition that a binary eclipses is (approximately) just a piece of trigonometry, assuming the stars are spherical and in circular orbits (this is quite likely for close binaries).
The condition that an eclipse will occur is that the inclination angle $i$ is given by
$$ \cos i  < \frac{r_1 + r_2}{a}\ , $$
where $r_1$ and $r_2$ are the stellar radii and $a$ is the binary separation.
If one allows for eccentricity then this is modified to
$$ \cos i < \frac{\left(r_1+r_2\right)\left(1 \pm e\sin \omega\right)}{a(1 - e^2)}\ ,$$
where $e$ is the eccentricity, $\omega$ is the argument of periastron and the $\pm$ sign depends whether we are considering transits or occultations of the secondary (see for example Winn 2010).


Vertically (only) resizable windows form in C#

Question: I have a situation where it would be beneficial to me to allow my windows form to be resized by the user, but only vertically. After some searching, it seems like there isn't much on this particular subject. Is it possible?
Comment: @Will: That depends what the form is displaying.  There are (some) cases where this is a good idea.
Comment: @slaks never seen it.  Seen plenty of apps that think they know how big a form should be.  Visual Studio still has a few of them.  These forms have one thing in common--the people who made them were wrong about the "right" size.  In all cases, let the user decide what the size of the form is, or risk damnation.  (Full disclosure, I risk damnation.  I am ashamed.)
Comment: @Will: How about Virtual PC 2007?
Comment: @dada686 On Vista, Freecell can be resized and scales, which is great.
I came here because I have a 3-line window: two text fields and a button. So resizing it vertically makes no sense, right...? Well, I'm not so sure any more. For vertical resizing, I could make the text fields taller and the font larger! It's an unusual feature, but it doesn't hurt.
Answer: You need to set the form's MinimumSize and MaximumSize properties to two sizes with different heights but equal widths.
If you don't want the horizontal resize cursor to appear at all, you'll need to handle the WM_NCHITTEST message, like this:
protected override void WndProc(ref Message m) {
    base.WndProc(ref m);
    switch (m.Msg) {
        case 0x84: //WM_NCHITTEST
            var result = (HitTest)m.Result.ToInt32();
            if (result == HitTest.Left || result == HitTest.Right)
                m.Result = new IntPtr((int)HitTest.Caption);
            if (result == HitTest.TopLeft || result == HitTest.TopRight)
                m.Result = new IntPtr((int)HitTest.Top);
            if (result == HitTest.BottomLeft || result == HitTest.BottomRight)
                m.Result = new IntPtr((int)HitTest.Bottom);

            break;
    }
}
enum HitTest {
    Caption = 2,
    Transparent = -1,
    Nowhere = 0,
    Client = 1,
    Left = 10,
    Right = 11,
    Top = 12,
    TopLeft = 13,
    TopRight = 14,
    Bottom = 15,
    BottomLeft = 16,
    BottomRight = 17,
    Border = 18
}

Comment: Can't believe I didn't think of this... Very nice! And thanks for the WndProc particulars of hiding that resize cursor!
Comment: Just a comment... shouldn't you make the HitTest.Left and .Right return None and not Caption?  Using Caption makes the window draggable at those locations, no?
Comment: @MarqueIV: Yes; I consider that a feature.
Comment: I agree it's a nice feature to have--to be able to drag the window around from someplace other than the caption, but if you're going that route, I'd do it for anywhere where NCHitTest would normally return None so you can drag it from other parts of the client area too.  Without allowing that, there isn't any distinction or feedback to the user that the edges have a different behavior whereas if it always moved regardless, it would.  Of course playing my own adversary, I could also say allowing moving from anywhere other than the caption is also a non-consistent interface so there's that too.
Answer: Just an idea...
public partial class Form1 : Form {
    int _width;

    public Form1() {
        _width = this.Width;
        InitializeComponent();
    }

    protected override void OnResize(EventArgs e) {
        this.Width = _width;
        base.OnResize(e);
    }
}

EDIT: please note that the min/max size solutions work much better than this hack :)
Comment: Beat me to it. +1 For other solutions, I'm not sure that it's possible to actually have a max/min width without also setting a max/min height. This solution will allow you to resize the form, but it will rubber-band back to it's original width.
Comment: @George: You can just set a small minimum and a very large maximum.
Answer: Set the max & min size for the width of the form only.
Comment: Be sure to do so in the Load event, not the constructor.  Or automatic scaling will clip the form content.
Comment: If you leave the height component of the MinimumSize and MaximumSize properties at 0 but set a width, it will constrain the window to its minimum height.  MinimumSize and MaximumSize constraints are only ignored when both components are zero - if one's set and the other is left at zero, it will enforce both components literally.
Comment: Do it in the properties pane at Design Time. There's no need to use any code to make the form only scroll vertically.
Answer: Let the FormBorderStyle to Resizable and set MaximumSize and MinimumSize = new Size(this.Width, 0)
Correction:
this.MinimumSize = new Size(this.Width, 0);
this.MaximumSize = new Size(this.Width, Int32.MaxValue);

Comment: MinimumSize and MaximumSize components are only interpreted as "no limit" when BOTH components are zero.
Comment: @SLaks, You're right! the height need to be set to different value in min and max sizes.
Answer: Yes, it is possible. Just set your form.MinimumSize.Width = form.MaximumSize.Width = 100 (or whatever width you want).
Comment: It was not a working code sample, just an idea of what should be set up.
Comment: You cannot assign the Width directly as form.MinimunSize or form.MaximumSize returns a value type, not a reference.
Comment: I fail to understand how people forget to use logic when trying to understand a simple statement. +1
Answer: To avoid the "rubber-banding" effect of @orsogufo's solution:
public Form1()
{
    InitializeComponent();
    this.MinimumSize = new Size(500, 0);
    this.MaximumSize = new Size(500, Screen.AllScreens.Max(s => s.Bounds.Height));
}

It won't correctly adjust its maximum height to accommodate a larger screen if you resize the screen bounds, but for static screen sizes it works great.


Counting number of people entering a room

Question: We are making a project in which we want to count the no. of people entering and leaving a room with one single entrance. We are using IR sensors and detectors for this ,along with an Aurdino. We have a problem in this system,  i.e when two or more persons are entering or leaving the room at a time we are getting a wrong count. Thanks in advance for your valuable time and solution.....If there is any other better way,please state that.
Comment: Wrote a longer response but my phone refreshed the page. Basically, it's been asked before, you can't do it with the equipment you have (almost-guarantee; *you don't state what equipment you are using!*), and re-designing the system is an open-ended design problem which is off-topic for this site. If you would like a discussion, try [Robotics chat](http://chat.stackexchange.com/rooms/6221/asimovs-corner).
Comment: This will not work unless you use full body scanners, aka backscatter X-ray. All other automatic security gates I know can be tricked when 2 (slim) people pass it.
Answer: You question is a bit vague in sense of how many IR sensors you have, what type of them etc. With that in mind, I will try to answer with the following assumptions:

You have IR sensors which are laser-ir diode/resistor/transistor pairs (the person walking cuts the laser beam which can be detected on the photosensitive element).
You have enough of those.
People will not be trying to fool your system.

You can try to put a bit denser array of these sensors both horizontally and vertically so that you may distinguish two persons walking in at the same time. This will call for some heuristics in the sense of how wide a single person is etc.
A much easier solution (involving a bit more sophisticated IR sensor) is using Microsoft Kinect along with Kinect SDK which has skeleton detection already implemented so you can just read if and how many people are entering and leaving the room.


Radio Receiver IC

Question: I am a Junior EE student that is interested in putting together a small radio receiver project for fun and to get some general practice with design. I have found these receiver chips from Silicon Labs Si4732/34/35. I would like to hook up the final design with a small LCD screen to show the frequency and then be able to listen with a standard pair of headphones through a 3.5mm headphone jack. My question is does anyone have experience with these chips or are there other chips out there that will better suit my needs? My second question is am I attempting to embark upon a project that is too ambitious for one person? Thank you for the help and advice. This is also my first post so if I have violated any rules around here please let me know.
Answer: If you are happy with that series of wireless chips from Silicon Labs then you should check out their reference design kits which may be more suitable for getting started with development than simply ordering the standalone.
With design kits, you usually have options of adding LCD screens and other connectors much more easily and they usually come with some IDE for developing software right off the bat, and even some sample code.
Answer: Yes I think it is too ambitious when for a couple of dollars you can get a TEA 5767 board with all the functions necessary to actually put it to use.
Single-station FM radio
Instead of thinking about single chips, it is actually easier and less expensive to go with an entire FM radio with simple digital programming and no drift.  All on one circuit board, plus a Nano and a small amp, all of which fits on a very small speaker.
Follow that link to see how simple the program is, and how small the whole receiver can be.  This one is for a single frequency, but with the addition of two buttons you can have it scan up or down.  Plus, you can have your software set up with presets and you can step through them with one button.  Whatever you want.
Have fun!

Radio Receiver IC


Migrating user data from Community Builder

Question: We have a very large user database using Community Builder. After installing CiviCRM, it doesn't appear to be recognizing any of the data from Community Builder. Is there a migration tool or procedure to import that data into CiviCRM?
Answer: I've never used it and don't know whether it functions with current versions of CiviCRM, but there is (or was) a tool that seems related to what you are asking (although maybe just synchronizing going forward, not for existing contacts):
Joomla 2 CiviCRM User Synchronization

This plugin integrates the Joomla and/or Community Builder
  registration process with CiviCRM.
Newly created Joomla website users (from Joomla or Community Builder
  frontend or backend) will be matched with existing CiviCRM contact(s)
  based on their email address. If no matching CiviCRM contact is found,
  a new one will be created and synchronized with the Joomla user. The
  plugin can also be configured to attatch and assign a new CiviCRM
  activity to the contact.

If that's not a good solution, you may be able to prepare or download a CSV file from Community Builder and do an import to CiviCRM manually.


How do you allow an object to rotate around an axis?

Question: I am trying to create a wind turbine and I am wondering how to allow the blades to spin freely during the animation.  To specify,  I have a wind force field and a base with the blades of the turbine connected to  a rotor.  Here is an image:
I want the animation to start and when the wind blows I want the blades to spin but not fly away.  I would think that you need to use a rigid body constraint but after trying all the types it still flies away.  I am using blender 2.8.
Answer: I believe it would be easier to animate it, use shift + axis.
add a key-frame where it should start with the desired rotation, and then add other key frames where you want the 'fan' to turn and the angle of choice. (i chosen 359 because im not sure if i set it to 360 it would just not move, but go ahead and experiment! )

blender will automatically interpolate the key frames you set.
but if you really want accurate physics then im afraid i also don't know :(
but maybe this post will help.
Comment: I don't want to make the animation myself. I want it to be like the object selected is rotating around the axis as if you clicked R but I want the wind to actually spin the turbine.
Answer: You can add constraints in the Object Constraints tab.  Make sure you tick 'Affect Transform', and limit rotation in specific axes.
Answer: A rigid body constraint that allows rotation in a single axis and allows no translation is a "hinge" type constraint, although this behavior can also be replicated with a "generic spring."  The hinge constraint allows rotation in only the Z axis of the rigid body constraint.  However, most rigid body constraints allow no translation, so if your object is flying away, it's probably not just the particular type of constraint you're using, but the settings for that constraint.
Here are settings I would use on a rigid body constraint for your purpose:

Note:

The Z axis of the rigid body constraint is oriented to point in the axis of allowed rotation.

The rigid body constraint connects two objects.  The first object is a passive or animated rigid body, which acts as an anchor, while the second object is the dynamic fan.

Other issues that can cause rigid bodies to fly away include backwards normals, improper collision types, intersecting collisions at frame 1, and unapplied scale.
All that said, this is a good place to repeat myself that Blender physics are not real physics.  The fact that this fan would spin in a real world wind does not mean that it will spin in a Blender wind.  Rigid body physics are a highly simplified abstration of real world physics, and they don't create rotational force from wind.


Warlords of Documentation: How do we unregister?

Question: There is an obvious link and series of steps for registering. However I can't seem to track down any means of unregistering.
Comment: I'm sure OP won't be the only one who's registered and doesn't participate in the Beta. Often times Present-Me thinks Future-Me will absolutely enjoy activity X, and Past-Me turns out to be a liar.
Answer: Participating in the private beta of Documentation is completely voluntary just like everything else on Stack Overflow.  If you registered and you no longer want to participate, then you can just not do anything once the private beta opens, that'd be the easiest way to "unregister".
If you want to "unregister" in a more complicated manner, then you could send an email to the team via the "contact us" link at the bottom of any page on the site requesting to be removed from private beta and they'll drop your details.
Comment: Ok I'll give that a go.
Comment: @CliffBurton The form submission went to a highly sophisticated spreadsheet, so yes it's normal to not get anything but the "thanks for your submission..." You'll get contacted once we actually move to private beta.
Comment: It worked. Just got the email confirmation. Details removed.
Comment: @CliffBurton, Based on my experience from Area 51, when the private beta starts, you should receive a notification and invitation to participate, with a link pointing you to the new site.
Comment: "requesting to be removed from _private_ beta" So any common user can partecipate in private beta?? If so I want to take the place of ouflak!!!! Anyway, i asked this question http://meta.stackoverflow.com/a/305376 but I have not received an answer, is there some kind of confirmation? I filled the "register" form and submited it twice, but I have not received any confirmation, is it normal??


Do you get your warranty back after rooting, flashing then unrooting your device

Question: I have a Honor 5X which I am planning to root so that I can flash Cyanogen MOD 13 as EMUI isn't up to my expectations(NO OTG and Adoptable Storage). Is it possible to flash the ROM then unroot my device to retain the warranty and have access to banking apps? Thanks!
Answer: When you unlock the bootloader on a Qualcomm device it blows a fuse (an irreversible procedure). It does not matter if you even root your device afterwards - the damage is already done and the warranty is already void.
Then it all depends on on how strictly and diligently the customer service people follow company policy. For example once the device is unlocked it could be flashed with a ROM specifically modified to report its status as "never tampered with" - that could fool some less experienced folks.
As for the banking apps - it depends on the implementation. If done right the device would lose all its pre-provisioned crypto keys.


How do I restore a wallet with seed?

Question: I am running monero.win.x64.v0-10-0-0 on windows 10. I am trying to restore a wallet with a seed but do not know how to do it. When I open monero-wallet-cli after monerorod synchronizes it asks for a wallet name straight away then generates a new wallet. Can someone tell me how I go about restoring my wallet please?
Answer: You have to launch monero-wallet-cli from the terminal (on Linux and mac OS X) or from the command prompt (on Windows) with the --restore-deterministic-wallet flag. Thus:
For Mac and Linux:
./monero-wallet-cli --restore-deterministic-wallet
Make sure the terminal is opened in the same directory as monero-wallet-cli is located in.
On Windows make sure to launch it from the command line. Go to the folder monero-cli-wallet is located and make sure your cursor isn't located on any of the files. Subsequently do SHIFT + right click and it will give you an option to "Open command window here". Lastly, type the following command:
monero-wallet-cli.exe --restore-deterministic-wallet
For all operating systems it will first ask you for a new wallet name and password. Subsequently, you have to enter the 25 word mnemonic seed. Lastly, enter refresh into monero-wallet-cli.
P.S. Note that simplewallet was renamed to monero-wallet-cli in v0.10.0.
Comment: Great, It was not working before because I was not adding the .exe. Thanks a lot.

How do I restore a wallet with seed?


Instal Deluge on RPI3 Raspbian

Question: I have been trying to install deluge on my rpi. The internet connection is good but when I try sudo apt install deluge it does not find the package. Any ideas? I feel like the repo isn't available. I tried the deb file from the deluge website and that has not worked either. Using Raspbian 9 Stretch.
Answer: I believe the package is called deluge-common.
You can install it with the following command:
sudo apt-get install deluge-common

You can search the repository for a package with the following command:
sudo apt-cache search deluge

This will return all packages with deluge in the name or description.
Comment: That worked, I had to run 'apt update' for apt to see the deluge-common package. Once I installed that I searched for deluge again and it was there! Thank you very much!

Instal Deluge on RPI3 Raspbian


How long does it take for a firm in the US to get an export license for an Iranian F1 student to work fulltime for the firm in the US via CPT or OPT?

Question: I wonder how long it takes for a company in the US to get an export license for Iranian F1 student for them to be able to work fulltime for the company in the US via Curricular Practical Training (CPT) or Optional Practical Training (OPT)?
Comment: Students don't get export licenses, companies do.
Comment: I'm voting to close this question because 'how long it takes' is subjective and highly likely to depend on a variety of factors eg the *type* of product the firm makes
Comment: @littleadv thanks, fixed.
Comment: @Traveller subjective = based on or influenced by personal feelings, tastes, or opinions.  Nothing subjective here.
Comment: @Frank Dernoncourt You omitted a key part of the meaning *'…rather than based on facts'* https://dictionary.cambridge.org/dictionary/english/subjective The premise of your question is wrong, therefore it can't be answered based on facts.
Comment: @Traveller facts here are direct experience and/or perhaps some statistics published by some US agency, as the USCIS does for naturalization processing time. Nothing subjective about it.
Answer: Your previous answer is absolutely and entirely wrong, so the premise of this question is wrong.
The company doesn't need an export license for an Iranian student, the company needs an export license to export. See here:

An export license from the U.S. government may be needed if your business intends to export items
with defense- or national security-related applications (see ITAR below). Additionally, an export
license may be needed for "dual-use" items that have both commercial and military functions (see
EAR below).

If the product is restricted for export to Iran, then the Iranian student will not be allowed to work on it.
Comment: @FranckDernoncourt anecdotal hearsay evidence is not really a good signal, especially  when it comes from some anonymized social network. You'll probably need to ask your Iranian friends, but it is more likely than not that they either misunderstood, or their employers misunderstood, or (most likely IMHO) got told something neutral instead of "you're all spies and we can't have you work here". I would imagine that any export-restricted product manufacturer could apply for an explicit license to export to Iran, but I'ld also imagine that they wouldn't want to just to be able to hire an intern
Comment: To confirm: you state that an employer never has to obtain some export license/authorization when they hire a new Iranian citizen, if they have already obtain export license to export in the past?
Comment: @FranckDernoncourt I'm claiming that the export license requirement comes from the product/process/IP that the company is working with/on, not the employees it hires.
Comment: Then why 3 users on https://www.reddit.com/r/immigration/comments/tiyq98/how_long_does_it_take_for_an_iranian_f1_student/ and my two Iranian contacts are saying their employers needed some kind of  export license for them? I'm still unclear how it works, but it seems the employer must obtain in some cases some authorization when they hire a new Iranian citizen.
Answer: I found 2 sources, which indicate ~6 months:
Source 1: 3 to 6 months (private correspondence) for US tech firms in the field is machine learning applied to natural language processing.
Source 2 from Reddit user not_an_immi_lawyer:

To get the export license, probably 6+ months and no guarantee it'll be approved.
Comment: 1: ~6+ months is *approximately 6 months or more*, not ~6 months. 2: You already referenced this reddit user in your previous (incorrect) answer, so you know this source (or your understanding of their posts) is wrong. 3: This is wrong because the premise of the question is wrong. Employer doesn't need a license to hire an Iranian OPT student, but if the product needs an export license and the license restricts export to Iran - that student won't be able to work on the product.


How did the relatively new usage of the word "convicted" to mean "committed" or "dedicated" come about?

Question: It seems to me that it is a back-construction of "conviction", in the sense of a firmly held belief or opinion, and is not a recognized word.
Comment: As I recall two people asked for specific quotations of this use of convicted. What happened to those comments?
Comment: I didn't see those requests for specific quotations. But the last few years I've seen it used mostly in the hip-hop community to mean dedicated or committed. On another forum someone asks what does "I am very convicted person" mean. One good answer there is that it means the person has strong beliefs (convictions) about his clause, which supports my idea that it is a back construction of (having) conviction.
Comment: "Convicted" has been used in a religious sense to mean "convinced" for as long as I can remember.
Comment: @Xanne - https://english.stackexchange.com/questions/125137/can-one-be-convicted-if-one-has-a-strong-opinion?rq=1
Answer: Convicted in the sense of convinced shows up in Google NGram (search term: I am convicted or I am convicted that) in the last decade primarily in books on religious commitment--and in this 1742 book, Joseph Andrews, by Henry Fielding:

"Yes, but, Joseph," said she, a little softened by the compliment to
  her learning, "If you had a value for me, you certainly would have
  found some method of showing it me; for I am convicted you must see
  the value I have for you. Yes, Joseph, my eyes, whether I would or no,
  must have declared a passion I cannot conquer.—Oh! Joseph!"

Here are a couple of the recent examples:

Hello Mr. Murphy. I am convicted that God has something far better for
  us. (2011)
I am convicted that in America today, there is a growing hunger for
  something far, far deeper than the thousand channels of vapid
  meaningless chatter on cable and on our electronic gadgetry

There is also this example from 1982:

The Cognitive Developmental Psychology of James Mark Baldwin: Current
  Theory and Research in Genetic Epistemology (1982)
John M. Broughton, D. John Freeman-Moir
Further I am convicted that this source and center exerts, in manifold
  ways, an attraction, a valence, a drawing into itself of our hunger
  for excellence of being.

It's a difficult usage to detect, as there are so many false positives and the search engine seems to assume that what was meant was "convinced" instead of "convicted."
I didn't find any hip-hop references.
If seems never to have been common; its recent use in books is in a religious or "value" contexts.  It seems to me to be an undesirable use.
Comment: I don't think I saw your quite good answer until just now. I think it's use in the hip-hop community is mostly in spoken form. I've seen it used in interviews on television, where someone is talking about a cause and says they are "convicted". It sounds particularly strange used that way because of the meaning of being found guilty of a crime.


Apoptosis vs necroptosis

Question: I understand that apoptosis and necroptosis share the same upper part of the pathway, but I cannot seem to distinguish when is each one activated? From my readings, it seems that when procaspases 8 or 10 are unavailable, the cell will shift to necroptosis. What makes these procaspases unavailable and why does a cell second the necropotosis?
Answer:
From my readings, it seems that when procaspases 8 or 10 are
  unavailable, the cell will shift to necroptosis. What makes these procaspases unavailable and why does a cell second the necropotosis?

This seems to be right.

Mice with a conditional deletion of caspase-8 in the intestinal
  epithelium (Casp8ΔIEC) spontaneously developed inflammatory lesions in
  the terminal ileum and were highly susceptible to colitis. Casp8ΔIEC
  mice lacked Paneth cells and showed reduced numbers of goblet cells,
  indicating dysregulated antimicrobial immune cell functions of the
  intestinal epithelium. Casp8ΔIEC mice showed increased cell death in
  the Paneth cell area of small intestinal crypts. Epithelial cell death
  was induced by tumour necrosis factor (TNF)-α, was associated with
  increased expression of receptor-interacting protein 3 (Rip3; also
  known as Ripk3) and could be inhibited on blockade of necroptosis.
Caspase-8 is a cysteine protease critically involved in regulating
  cellular apoptosis. On activation of death receptors, including
  TNF-receptor and Fas, caspase-8 is activated by limited
  autoproteolysis and the processed caspase-8 subsequently triggers the
  caspase cascade that finally leads to apoptotic cell death.
  Caspase-mediated apoptosis is important for the turnover of IECs and
  for shaping the morphology of the gastrointestinal tract 4.

2011 - Caspase-8 regulates TNF-α-induced epithelial necroptosis and terminal ileitis

Caspase-8 has both prodeath and prosurvival roles, mediating apoptosis
  and/or preventing RIPK1-mediated necroptosis depending on cell type
  and stimulus. We found that inflammatory stimuli (LPS, lipoteichoic
  acid, or TNF-α) caused an increase in caspase-8 IETDase activity in
  primary rat microglia without inducing apoptosis. Inhibition of
  caspase-8 with either Z-VAD-fmk or IETD-fmk resulted in necrosis of
  activated microglia. Inhibition of caspases with Z-VAD-fmk did not
  kill non-activated microglia, or astrocytes and neurons in any
  condition. Necrostatin-1, a specific inhibitor of RIPK1, prevented
  microglial caspase inhibition-induced death, indicating death was by
  necroptosis.

2013 - Caspase inhibitors protect neurons by enabling selective necroptosis of inflamed microglia.

Necrosis has long been described as a consequence of extreme
  physicochemical stress, such as heat, osmotic shock, mechanical
  stress, and freeze-thawing, which kill cells quickly and directly.
  Therefore, this cell death has been described as uncontrolled and
  accidental necrosis characterized by loss of plasmamembrane integrity
  and cellular collapse, though nuclei remain largely intact during this
  process (Krysko et al., 2008a,2008b; Vanden Berghe et al., 2010). Loss
  of membrane integrity and release of intracellular content grant
  necrotic cells the ability to induce an inflammatory response. These
  immunogenic endogenous molecules fall under the umbrella term
  ''damage-associated molecular patterns'' (DAMPs) (Garg et al., 2010;
  Kryskoet al., 2011). They include, in the case of accidental necrosis,
  HMGB1, IL-1a, uric acid, DNA fragments, mitochondrial content, and ATP
  (Tables 1and2)(Eigenbrod et al., 2008; Kono et al., 2010; Krysko et
  al., 2008a; Sauter et al., 2000). Because the nomenclature of DAMPs in
  the literature is confusing, here we define DAMPs as a family of
  molecules that are intracellular in physiological condition

2013 - Necroptosis: The Release of Damage-Associated Molecular Patterns and Its Physiological Relevance

Based on the articles above, I would say that capsase-8 is a signal that apoptosis works finely, and so the cell can kill itself whenever it wants. So if that signal is lost because of an infection, mutation or extensive cell damage, the cell has no choice, but to activate the necrotic pathway.

Figure 1 - cell survival and programmed cell death - source

During tumorigenesis, significant loss or inactivation of lead members
  in the caspase family leads to impairing apoptosis induction, causing
  a dramatic imbalance in the growth dynamics, ultimately resulting in
  aberrant growth of human cancers. Recent exploitation of apoptosis
  pathways towards re-instating apoptosis induction via caspase
  re-activation has provided new molecular platforms for the development
  of therapeutic strategies effective against advanced prostate cancer
  as well as other solid tumors.

2012 - CASPASE CONTROL: PROTAGONISTS OF CANCER CELL APOPTOSIS

These findings reveal that, although apoptotic/drug resistance is a
  formidable "stronghold" of cancer against chemotherapy, necroptotic
  susceptibility is an intrinsic "weak point" of cancer.

2007 - Targeting the Weak Point of Cancer by Induction of Necroptosis

Playing a central role in cell death, caspases are targeted by
  different viruses in the aim of prolonging cell survival. For
  instance, viral IAPs (inhibitors of apoptosis) interact with and
  inhibit the processed active caspases, either by blocking the
  catalytic part of the enzymes, or through E3 ubiquitin ligase activity
  from RING domains, targeting caspases for rapid degradation via
  proteasome. Baculoviruses, asfiviruses or irridescent viruses encode
  such IAPs. Another class of caspase inhibitors frequently found among
  poxviruses include the serine proteinase inhibitors serpins:
  CrmA/SPI-2. Crma targets cysteine proteases such as host Caspase 1 and
  Caspase 8.

viralzone - Inhibition of host caspases by virus

Pathogens specifically target both the caspase 8-dependent apoptotic
  cell death pathway and the necrotic cell death pathway that is
  dependent on receptor-interacting protein 1 (RIP1; also known as
  RIPK1) and RIP3 (also known as RIPK3). The fundamental co-regulation
  of these two cell death pathways emerged when the midgestational death
  of mice deficient in FAS-associated death domain protein (FADD) or
  caspase 8 was reversed by elimination of RIP1 or RIP3, indicating a
  far more entwined relationship than previously appreciated. Thus,
  mammals require caspase 8 activity during embryogenesis to suppress
  the kinases RIP1 and RIP3 as part of the dialogue between two distinct
  cell death processes that together fulfil reinforcing roles in the
  host defence against intracellular pathogens such as herpesviruses.
The MCMV protein vICA prevents caspase 8 activation, and this
  sensitizes cells to death receptor-induced necroptosis. In addition,
  the MCMV protein vIRA blocks necroptosis and MCMV-induced programmed
  necrosis by inhibiting RHIM (RIP homotypic interaction
  motif)-dependent interactions.

2012 - Viral infection and the evolution of caspase 8-regulated apoptotic and necrotic death pathways

One potential explanation for this is that this form of death evolved
  to provide a "backup" pathway. Indeed, cowpox virus produces the
  factor CrmA, a potent apical caspase inhibitor capable of blocking
  apoptosis (Ray et al., 1992; Gagliardini et al., 1994). Several viral
  encoded genes are similarly produced to prevent apoptosis, and thus it
  is clear that inhibition of apoptosis is an important means viruses
  have exploited to avoid immune clearance. Interestingly,
  cytomegalovirus induces RIP3-mediated necroptosis via the interferon
  regulatory factor DAI (Upton et al., 2012). This virus also produces a
  protein called viRA, a protein that disrupts assembly of RIP1/RIP3
  necrosomes and consequent necroptosis. Thus, while the physiological
  function(s) of necroptosis remains to be fully elaborated, it is clear
  that this cellular process has been around for a long time during
  evolution. It is likely that necroptosis may serve as an "Achille's
  heel" in tumor cells, and thus greater understanding of the process
  may reveal novel therapies for cancer therapeutics.

2014 - Grand challenges in cell death and survival: apoptosis vs. necroptosis

It seems like there is a 3rd pathway too, it is called ferroptosis.

TNF-induced necroptosis depends on receptor-interacting protein-1
  kinase, mitochondrial complex I and cytosolic phospholipase A2
  activities, whereas H2O2-induced necrosis requires iron-dependent
  Fenton reactions.

2009 - Necroptosis, necrosis and secondary necrosis converge on similar cellular disintegration features

The transition metal iron is essential for life, yet potentially toxic
  iron-catalyzed reactive oxygen species (ROS) are unavoidable in an
  oxygen-rich environment. Iron and ROS are increasingly recognized as
  important initiators and mediators of cell death in a variety of
  organisms and pathological situations. Here, we review recent
  discoveries regarding the mechanism by which iron and ROS participate
  in cell death. We describe the different roles of iron in triggering
  cell death, targets of iron-dependent ROS that mediate cell death and
  a new form of iron-dependent cell death termed ferroptosis. Recent
  advances in understanding the role of iron and ROS in cell death offer
  unexpected surprises and suggest new therapeutic avenues to treat
  cancer, organ dam
  - age and degenerative disease

2013 - The role of iron and reactive oxygen species in cell death
2012 - Heme induces programmed necrosis on macrophages through autocrine TNF and ROS production

Not just a 3rd, there are many more pathways (pyroptosis, MPT-RN, parthanatos, ferroptosis, NETosis).

Figure 2 - Signalling pathways of regulated cell death.
2014 - Regulated cell death and inflammation: an auto-amplification loop causes organ failure

Apoptosis vs necroptosis


Mac Book Pro 6,2 Nvidia graphics & suspend don't work

Question: As soon as I suspend my mbp the led starts pulsing after a while but by opening the lid Xserver hangs, I get a black screen and am presented with the login screen after 2 minutes. Logging in results in the same procedure( black screen -> wait -> login -> ...)
I somewhere read that the nouveau driver is causing this so I tried to install the nvidia driver (304) on my ubuntu system(13.04) from console because it wasn't listed in the additional drivers tab. The driver causes the monitor to be shut off (black and no backlight) after the kernel started up(logging in and shutting down from terminal works).
After 'apt-get purge nvidia-*'  everything is back to normal( monitor works, suspend doesn't)
Btw: I have an Nvidia gt330m with a hi-res 1680*1050 display
Is there anything I can do about it to get suspend to work and even better the nvidia driver?
Answer: I just ran into the same black screen issue, and it is highly frustrating. Log into your grub menu by holding shift while booting up your mbp, edit the kernel arguments with e, and right before silent splash you should add - nomodeset so it should look like what this guy here has done - http://ubuntuforums.org/showthread.php?t=1613132. If this solves the problem for you, continue with the rest of the instructions for setting it permanently.

ok, I've done some looking into this, since I am also currently working on getting my nvidia 740m to work. By the way, your graphics card uses nvidia optimus, so as a side note, you may want to look into bumblebee. But which nvidia drivers are you using? The 319 is the stable release, but not available in the repository However, the 325 beta drivers are available, and It noted some fixes to screen flickering in relation to scaling windows such as ours, so I believe this may be as useful to you as me. I am assuming you are referring to 319 however, but just incase you are not I will provide some links. And for your xconf not working, you could try this:
sudo /sbin/lsmod | grep nvidia

To make sure that it is loaded, if not you will have to load it manually like so:
sudo depmod -a
sudo modprobe nvidia_current

If you have issues with that, I would also recommend checking out additional drivers. If you do not have any listed, try this:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update

and check again, there should be some there. Then purge your current proprietary driver and use those and reboot, and enter this:
sudo nvidia-xconfig --sli=On

Since your card is an optimus, it is best practice to not install nvidia drivers that have optimus though, as there are many issues. So you should install bumblebee to run your graphics intensive programs, and just use the additional drivers or the nvidia-current. If you happen to run into that screen resolution error again, you can use optirun to load your nividia setings directly as well.
https://wiki.debian.org/Bumblebee#Installation
Also if you are interested, your graphics card also has support for CUDA, and since this is linux, the drivers don't support this by default just yet, you can install CUDA. There is some better explanations of that here as well.
How can I get nVidia CUDA or OpenCL working on a laptop with nVidia discrete card/Intel Integrated Graphics?  And you can get the toolkit from here:
https://developer.nvidia.com/cuda-downloads
Here are the links if you still wish to try those proprietary drivers:
http://linuxg.net/install-new-nvidia-drivers-nvidia-319-17-on-ubuntu-13-04-raring-ringtail/
http://linuxg.net/how-to-install-nvidia-325-08-beta-drivers-on-ubuntu-linux-mint-debian-fedora-and-opensuse/
And here is the link referring to the brokn unity window:
After upgrading to 13.04 Unity interface is not showing.
Hopefully this has helped some, if not, let me know and I ill look into it.
Comment: I tried to install the nvidia_current driver but however hard I tried I failed (nvidia-settings said there was no xconfig file and I should run nvidia-xconf which was just not installed.
Comment: The newest stable driver from the nvidia site however appears to do sth but no window decorations no unity and stuck with 640x480 resolution (was able to change via xrandr with a manual mode to 1680x1024). The good thing is resume appears to work just fine.
Answer: On the Mac Book Pro 6,2 it is impossible to install a proprietary Nvidia Driver while booting in EFI-mode. Bumblebee can also only be used with the nouveau driver.
To solve the problem I followed the instructions on https://help.ubuntu.com/community/UEFI:
"""
Converting Ubuntu into Legacy mode
If Ubuntu is installed on a GPT disk (you can check it via the 'sudo parted -l' command), use Gparted to create a BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of its disk.
Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.
Untick the "Separate /boot/efi partition" option
Click the "Apply" button.
Set up your BIOS so that it boots the HDD in Legacy mode (see the ""Set up the BIOS in EFI or Legacy mode" paragraph above).
"""
After that I had to bless the newly installed Bootloader in OSX to make it bootable:
"sudo bless --device /dev/disk0s1 --setBoot --legacy"
Replace /dev/disk0s1 with the partion you installed grub on earlier.
After a reboot I was now able to install the newest nvidia driver from the additional drivers tab. This fixes the suspend/resume bug and increases battery life.
The only drawbacks are that grub resolution can't be set higher than 1200x800x32, the boot sequence is displayed in black and white with 640x480 and so are all the TTY's.


CSS Dropdown WebKit Woes

Question: I'm getting this really annoying problem with my dropdown menu in Safari & Chrome for both Mac and Windows.
It seems fine in other browsers, even IE7+ (shocking I know).
The dropdown is supposed to be absolutely positioned to the parent
, I've set left: 0; however the dropdown is showing underneath the following
 instead.

I've had this problem in IE in the past, but I'd expect better from WebKit!
Also, here is the problem looks in Safari (different, but I imagine the cause is the same):

Here is a link to the page (hover over the 'Blogs' link):
- http://www.mattpealing-server.co.uk/~devfooty/
Does anyone know how I can go about fixing it? I've tried all kinds of combinations, even found out that if I position bottom: 0 then the dropdown appears under the correct
, however obviously it then doesn't look right! Strange though.
Answer: I am not sure if this would work but you could try setting the parent element's position to relative.

CSS Dropdown WebKit Woes