is the existence of an inaccessible cardinal stronger than just CON(ZFC)?

Question: is it even stronger than that ZFC has a transtitive model?
Comment: What have you done to research these questions, by the way? Following the several links that you (here and on MSE) were given to Cantor's Attic; or searching on Google would have revealed several answers, I am sure.
Comment: Also, what is your motivation for asking this question (it completely lacks any context, or as I pointed out, research effort)? Is it idle curiosity, or did it come up somewhere?
Answer: Yes.
If $\kappa$ is a Worldly cardinal, then $V_\kappa$ is a model of $\sf ZFC$, indeed a transitive model. And therefore $\rm Con\sf (ZFC)$ holds. As you already know, the least Worldly cardinal is not inaccessible, so if $\kappa$ is the least Worldly, there is no inaccessible cardinal in $V_\kappa$.
Take a countable elementary submodel of such $V_\kappa$, and collapse it, then you have a countable transitive model and its height is some countable ordinal $\alpha$. Consider the $\alpha_0$ to be the least height of a transitive model, and $\alpha_1$ the second-least. Then $L_{\alpha_0}\in L_{\alpha_1}$, and therefore $L_{\alpha_1}$ is a model of $\sf ZFC$ which knows that there is a transitive model in the universe.


Change in math site display on Mobile

Question: For a week or so, the display of the math site has changed on my mobile. Much less userfriendly.
This is not the case for other sites, such as this meta. Do we know why? Could it be reverseo on a phomene? For references see screenshots for meta and math sites.
Comment: Can you maybe give screenshots that contain actual details? These are far too small to be of any use...
Comment: "reverseo on a phomene"??
Answer: This looks like it is the "full site" displayed on a small screen.
Just scroll to the end. After the question-list, there you will find the usual footer including the option to select "mobile."
It is part of a list with heading "Mathematics" that goes like this:

Tour
Help
Chat
Contact
Feedback
Mobile
Disable Responsiveness

Selecting "mobile" will bring back the layout you have on meta.
At the moment, I am not sure if the reason this changed for you is something that SE did or if you switched it (by accident) earlier. (In the mobile view you can do the same thing and then select "full site.")
Comment: Perfect thanks!!

Change in math site display on Mobile


Truecrypt and swap

Question: I've got Ubuntu 14.04 Desktop and I use Truecrypt to store my confidential files. I've read that since Truecrypt does on the fly encryption, it only stores its decrypted content (and user's password and his keyfile I would think?) in RAM. If it's all true, then does that mean that even if I don't encrypt my swap, there's no risk that my data stored in a Truecrypt container (and my password and a keyfile too?) would end up on a swap partition in an unencrypted form?
Answer: Generally, if you have any encrypted storage, then you should encrypt your swap. This goes for any encryption system, not just TrueCrypt. The data of any program can end up in swap, including programs that manipulate the confidential data. The kernel chooses what data it puts in the swap based on access frequency, it doesn't know what part of the data is more confidential.
TrueCrypt itself does request that the operating system give it memory that's locked in RAM and can't be swapped. I think it doesn't refuse to operate if the OS isn't willing to give it enough RAM though, so this behavior isn't guaranteed. And even if it was, that wouldn't help: the programs manipulating the confidential data would not have such a protection. For example, if you run an editor on a file in the TrueCrypt partition, the editor's memory may get swapped.
You should also make sure that all locations where temporary data is stored are encrypted. On Linux, this includes /tmp (there's also /var/tmp but its usage is explicit, whereas just any program might end up using /tmp). Many modern Linux systems, including Ubuntu 14.04, puts temporary files under /run, which is always in memory (virtual memory, that is: it can get swapped), but some applications hard-code /tmp. Other common locations where temporary data might end up include /var/spool/cups (printer spooler, if you print a confidential document), /var/spool/mail (incoming mail), /var/spool/postfix (outgoing mail, with Postfix — adapt the directory name if using a different MTA), ~/.cache.
Answer: This is more a Linux question.  Since Truecrypt runs as a userspace program it has no control over its memory pages, i.e. it leaves the memory management to the kernel.
The kernel is never told that the memory pages that Truecrypt is using are confidential therefore it may place the pages in swap.  And Truecrypt will never be told that its pages are swapped out.  For the userspace process (Truecrypt) virtual memory is just virtual memory, and it does not matter if it is currently in the RAM chip or on swap.
Therefore no, if you do not encrypt your swap partition and use Truecrypt your keys (passwords after some kind of PBKDF) are not safe.  If a key happen to be in the memory that got swapped out it can be read from disk.
Do a cat /proc/swaps and perform sudo swapoff <partition or file> for every available swap space before running Truecrypt (or, preferably, use an encrypted swap).
(I'm talking about a userspace process because that is different from cryptsetup, which works as kernel module and protects its memory pages from being swapped.)
Extra note
Truecrypt is not receiving any more updates since May 2014 (as it says on the main page of the project).  You should seriously consider a different tool for the encryption of your files.  Some options are:

Veracrypt is very similar to (and even based on) Truecrypt.
cryptsetup is available on every linux distro (and you are using Ubuntu).  Although it requires the use of loop devices.
tomb is a script that uses cryptsetup together with gnupg and abstracts out the use of loop devices.

Truecrypt and swap


German words in context with translations

Question: Are there any websites that, given a German word, will give you example sentences containing that word and their English translations?
Would be incredibly useful for German learning.
Answer: I just used such a website for an answer here: it doesn't quite offer what you're after, but it's close. In Linguee you can type in a German or an English word; then it gives translations and also sentences from various external sources that provide both a German and an English version of the sentence. The word you're after is marked in yellow so that you can easily find it. However, it seems that the quality of the translation is not always good.
Comment: That's exactly what I was looking for! Thank you!
Answer: Please be very careful with linguee.com
Be aware that it is just an automated collection of websites that exist in two languages. That means it just collects texts and the corresponding translations - regardless of who (or, indeed, what) made them. Then a computer programme aligns the two langue versions and highlights the elements it thinks likely to belong together.
The result is only useful if you are already very proficient in both languages and can immediately spot whether the translation offered to you is a good one.
The service is supposed to "learn" through the users' participation (grading the results) - but so far this appears to be a very lengthy process. So far the "correctly evaluated" results are a very small minority.
I myself have tried the service frequently since it started and found that the overwhelming majority of hits is not very useful - at best. If you know what you're doing, it may sometimes be helpful for finding alternatives you wouldn't have thought of on your own. For a beginner, using linguee.com could be catastrophic.
Answer: Example German sentences:
Sentences examples
Learn words in context:
Words in context
Listening exercises
Answer: Bab.la does it for me here
About :

bab.la is a language project by Andreas Schroeter and Patrick Uecker.
  The idea has been on Andreas' mind for quite some time. During his
  high school and university years he lived in Canada, France, Sweden
  and the USA. He noticed that just knowing the exact translation often
  doesn't really help. You really need to "live" the language to come up
  with the right word. Andreas has been collecting dictionaries from
  different languages for a long time. Putting the things together was
  just a natural step: Starting a portal where language lovers can meet
  and exchange their ideas and learn languages from each other. Who is a
  better teacher than a native speaker who likes to share his knowledge?
  And Patrick is our language expert regarding Pascal, C++, Java,
  Prolog, LISP, SQL, PHP, JSP and ASP. Thanks to him and his language
  skills this portal is alive today :-)
Comment: That's really great.
Answer: At freshmeat, there is an OpenSource program Steak/Xsteak, to use offline, which can search for context.
From the help page:

Das Wort wird automatisch auch in einem Kontext gesucht.

From your userpage/accounts I derived, that Unix is not a foreign word for you.
Answer: I've found an interesting website, called Mydict. As I checked, it matches what you are looking for.


Jarchi = Rashi?

Question: Is Rabbi Solomon Jarchi the same as Rashi? I saw Jarchi on the Internet on a Google search awhile ago, that it was Salomo son of Isaac, a French Biblical commentator and was wondering if it was the same thing as Rashi.
Comment: Can you cite where you saw it?
Comment: @DoubleAA - One place where Rashi is called "Jarchi" in a Jewish source is the Sheimos HaTzaddikim, were they say: רש''י, הוא שלמה ירחי. בן יצחק מטריווש (https://he.wikisource.org/wiki/%D7%A9%D7%9E%D7%95%D7%AA_%D7%94%D7%A6%D7%93%D7%99%D7%A7%D7%99%D7%9D_%D7%94)
Answer: To quote S. from On The Main Line:

Rashi was known by Christians as Rabbi Solomon Jarchi (Yarchi) because of a mistake, the mistake being that it was thought that 1) he was from Lunel and 2) that the yud stood for ירחי, which was Hebrew for "from Lunel" (Lunel as in luna as in moon).
This mistake was so entrenched that the Chida (page 6 in linked PDF) seriously considers it in his Shem Hagedolim in his entry on Rashi. As I have noted elsewhere, by the 18th century Christian scholars were already noting that it is a mistake, and by the mid 1800s it almost became common knowledge.
Comment: Do we know where "As I have noted elsewhere" refers to? I wasn't able to find it on the site (which is a little hard to search through)
Comment: The Chida does say that it may have been Rashi's father who was from Lunel.
Comment: unsure. a search on his blog for rashi lunel yields a partial result, but you could ask him. The book Toldos Rashi says the same, identifying Johannes Buxtorf the first as the first Christian scholar to make this error, and that others followed him in the error. See http://books.google.com/books?id=VNQ8AAAAYAAJ&lpg=PT18&ots=5B2M_HEYFF&dq=%D7%A8%D7%A9%22%D7%99%20%D7%99%D7%A8%D7%97%D7%99&pg=PT18#v=onepage&q=%D7%A8%D7%A9%22%D7%99%20%D7%99%D7%A8%D7%97%D7%99&f=false
Answer: Yes, they are the same, according to this article. It was apparently his last name (maybe what he went by in legal papers).
Comment: BA and @Adam, I've recently read something that disputes this and claims it was a scribal error that "went viral". It relates to Josh's answer. I forgot about this question or I would have answered it. Now I have to remember where I read it.
Comment: Okay, let us know if/when you remember.
Comment: Did anybody else notice the numerous inaccuracies in the linked article?  Dates off by a century, distant travels that probably didn't occur, wrong burial site (like they would have really carried him 950 km after he died).
Answer: "Rashi was also called Jarchi, derived from the name of the city in which he lived, "Lunel." Jerach being the Hebrew, as lune is the French for moon."
~taken from this webpage.
~The Chida brings this in Shem HaGedolim, in his entry on Rashi (page 6 of this pdf)
Comment: Jerach = Yerach

Jarchi = Rashi?


Rules for use of quotation marks when paraphrasing quotes, song lyrics etc., for a humorus effect in a cartoon caption.

Question: When a person/writer paraphrases published quotations or song lyrics, changing a few words of the original work for an attempt at a humorus effect purpose,    should the writer paraphrasing put everything in quotations to avoid plagiarism?
Comment: Hi surayabay! Welcome to Writing.SE! You might find it helpful to take a look at our [tour] and [help] pages. With regard to your question, it would very much help if you could tell us of the context in which you're using the song lyrics. Is it as part of a fiction work? A comic skit you're producing? Something else?
Answer: Simply putting the material in quotation marks will not avoid plagiarism. Further, in your specific example, putting a paraphrased version in quotation marks—without any commentary—would be incorrect. (Except in the case of character dialogue, which I discuss later on.)
To avoid plagiarism, you need to provide a proper citation for the material (ascribe credit to its author). You also need to either provide the material verbatim (within quotation marks or a block quote) or you need to to indicate that you've made a change in some way.
For example, from MetroLyrics, here are the lyrics to the first three lines of the first verse of the Beatles song "Let It Be," written by Paul McCartney and John Lennon:

When I find myself in times of trouble
Mother Mary comes to me
Speaking words of wisdom, let it be

Note that I have provided the name of the song, its authors, as well as the specific website from which I copied the lyrics. Different websites provide different formatting for these lyrics. For instance, Genius puts quotation marks around the occurrence of let it be in the above passage. So, it's not only important to cite something's original source but the source of the material you've actually quoted.
Let's say that MetroLyrics made a typo on their website-for some reason, reversing the order of times of trouble. I would quote it with the error but also call it out:

When I find myself in trouble of times [sic]
Mother Mary comes to me
Speaking words of wisdom, let it be

Here, the use of [sic] is the traditional indicator that there is a typo in the source material, rather than in your quotation of it. But since I already mentioned the error, I didn't need to actually provide it. (I only did so as an example.)
Also, different style guides will give different guidance as to how to handle this. Some will say that small errors can be "silently" corrected, others that all instances should be noted in some manner. And whether the reversal of the word order here would be considered a "small error" or not would be up to the particular style guide.

But let's say I'm paraphrasing this. I can't just do the following.

Here are some lyrics to "Let It Be":

Sometimes when I'm in a spot of bother
My mom Mary pays me a visit
Advising me to just forget about it.

Even if I had given an appropriate citation for this (more than just the title of the song) I need to make it explicit that the words in the block quote are not the original words of the song.
A better way of doing this is to be more explicit.

Imagine if you will that Paul McCartney and John Lennon had written different lyrics to the Beatles song "Let It Be":

Sometimes when I'm in a spot of bother
My mom Mary pays me a visit
Advising me to just forget about it.

Here, I've given appropriate citation to the original source. I've also not mentioned any particular website I got the original version from because I'm changing it so much anyway. Last, I've made it explicit that what I'm providing is something different from the original.

Now, normally when you paraphrase something, you do so in simple terms and without quotation marks or a block quote. You still need to provide some level of reference, but it doesn't need to be as great.

Imagine if Paul McCartney had had a dream about his father visiting him rather than his mother. Maybe he would have ended up writing a song about worrying about your problems rather than just letting them be.

Here, I'm providing just enough information that most people will understand what I'm referring to. But the specific content from the song lyrics is so minimal that my commentary doesn't need to be in any kind of quotation marks or other formatting. Nor do I need to do more than just mention Paul McCartney—because I haven't actually quoted anything.

A final way of doing something along the lines you're talking about is to, for instance, have a character in a bar sing the lyrics to a song—but sing the wrong lyrics. In the actual story's dialogue, that's fine. You don't need to necessarily mention what song it is, who wrote it, or what the original lyrics are.
You can have the character just sing the wrong lyrics and carry on with the story.
But I've often found that when a story does reference a song in such a way, credit is given to the song in some fashion in the front matter or the back matter. Since it's being used in character dialogue, the standard rules of attribution against plagiarism don't apply.
This may be similar to how it would be handled in cartoons where a cartoon character is quoting something in dialogue.
However, I would rely on a more authoritative source than just what I've said here if you want to incorporate something in such a specific fashion.
Answer: Some references to popular songs would count as "fair use". For example, Sir Terry Pratchett, in his novel Soul Music (which is all about Rock) makes references to multiple Rock songs.
For example, there's a song called "Sioni Bod Da", which translates from Welsh as "Johnny be good", and references Chuck Berry's song "Johnny B. Goode". The character who sings it also has the line "I can feel it. Every day. It's getting closer...", referencing Buddy Holly's song Everyday: "Everyday, it's a-gettin' closer / Goin' faster than a roller coaster". (You can see a full list of references here.)
In no place does Pratchett give a list of "those are the songs I referenced" - it's for readers to piece together the references, and have a good laugh when they recognise them. (Or stare blankly when a reference goes over their heads.)
Making hidden references to real-world stuff is the fuel much of the Discworld runs on - it's what Terry Pratchett does. It's humorous, and the quotes are never extended (in fact often there's no exact quote at all).
That said, I would recommend checking with a legal practitioner what is covered by "fair use", and what isn't.


The sum of two floating point numbers also a floating point number.

Question: I just starting learning about floating point numbers in my computing class. The professor mentioned something important in a lecture that I wrote down but now I'm not sure if it makes sense or I'm stupid. If we have a floating point number, $a \in \mathbb{G}$, then it is not possible to represent it as a natural number, which can lead to some error, relative or absolute depending on which one you're looking for. We also know that $G(x+y) \neq G(x) + G(y), \ x,y \in \mathbb{G}$, however if we have two floating point numbers $\alpha, \beta \in \mathbb{G}$ then is the sum of these two floating point numbers also a floating point number, i.e. $\alpha + \beta \in \mathbb{G}$?
Comment: The ordinary sum of two floating point numbers doesn't need to be a representable number. For example, the sum of $1$ and half of the [machine epsilon](https://en.wikipedia.org/wiki/Machine_epsilon) $\epsilon/2$ cannot be represented. The closest representable number to their sum is just $1$.
Comment: Yes, since there's an algorithm that is defined on x86 floats to define addition.
Answer: Assuming $\mathbb G$ is the set of values that can be encoded in a particular "floating-point" data type on a particular computer,
every number $a \in \mathbb G$ is a real number,
and conversely every real number $a$ that happens to be a member of $\mathbb G$
can be represented exactly in that floating-point data type.
But there are only finitely many numbers in $\mathbb G$ and there are infinitely many real numbers. There are even infinitely many real numbers between $0$ and $1.$
So some of those numbers won't be found in $\mathbb G$ and cannot be represented exactly in that floating-point data type.
For example, suppose we built a computer where the base of its floating-point type was $10$ instead of $2$ (which I think has actually been done at one time or another using BCD for the mantissa of a number).
And suppose that due to lack of modern chip fabrication methods we decide to have only three digits in the mantissa of these numbers.
So $31.1$ can be represented exactly, but $31.21$ cannot.
If we try to put $31.21$ into a variable of floating-point type in our computer it gets rounded to $31.2.$
Then $31.21$ is an example of a perfectly well-defined real number that nevertheless is not found in $\mathbb G$, and it's not because the number is too large to represent.
It's because of rounding.
Now let's say that as in the second part of your question we have two real numbers $\alpha$ and $\beta$ that happen to be exactly representable in our computer's floating-point type, that is to say, $\alpha \in\mathbb G$ and $\beta\in\mathbb G$.
Is $\alpha + \beta \in\mathbb G$?
The answer is, not necessarily.
Suppose, for example, that $\alpha = 30.2$ and $\beta = 1.01.$
These are both perfectly good real numbers and (as it turns out)
both $\alpha \in\mathbb G$ and $\beta\in\mathbb G$
because each number has only three significant digits.
But if we add these two real numbers together,
the result is $\alpha + \beta = 30.2 + 1.01 = 31.21$.
And as we already know, $31.21$ has too many significant digits to be represented in our computer's floating-point type.
That is, $\alpha + \beta \not\in \mathbb G$.
It is true that in most cases when our computer adds two floating-point numbers it will produce another floating-point number as a result.
But that's not what we mean when we say for two real numbers $\alpha$ and $\beta$
that $\alpha + \beta \in \mathbb G$.
When we say $\alpha + \beta \in \mathbb G$ we mean that the exact sum of
$\alpha + \beta$ is still representable in $\mathbb G$.
And it isn't always true, because many sums are forced to be rounded off.
A rounded-off sum is not exact.
Answer: Yes. The sum of two floats will be a float. However, if your resulting float is too large (i.e. larger than 32 bits) then most programming languages will just return "infinity".


What's the origin of "throwing someone under the bus"?

Question: What's the origin of the phrase "to throw someone under the bus" or "so-and-so threw me under the bus?" (in the sense of betrayal)? It seems like a very specific phrase not to come from some specific incident.
Comment: Well, these answers are a real learning experience for me.  I always assumed someone literally threw someone under a bus and his friend was all like *wow, you really threw that guy under the bus*.
Answer: I worked at a restaurant called Casa Bonita in Colorado in the mid-80s  that was used by tour companies and it was not uncommon to see 10-20 or more busloads of tourists in a day. From time to time a late tour would call ahead and ask us to keep the restaurant open.  Needless to say this did not make night shift employees very happy.
In the summer of either 1985 or 1986 a group of employees who regularly met for beers after work were discussing the practice and decided that keeping the restaurant open for late tours was just like throwing all of the employees under the bus.  From that night forward, it was common to hear Casa Bonita employees talk about being "under the bus" or being "thrown under the bus".  Being "Thrown under the bus" had the similar meaning as it does now.   Being "under the bus" meant to be behind and struggling to catch up.
Comment: Interesting response since I live in Boulder. (Just moved there this year.) I keep hearing about Casa Bonita -- heard the food was horrible but the experience worth having.
Comment: This answer is not supported and is demonstrably wrong. I had to downvote.
Answer: The term is rather interesting, but its origin is somewhat shrouded in mystery:

The earliest solid example of "throw under the bus" found in print so far is from 1991, although a 1984 quote from rock star Cyndi Lauper where she uses the phrase "under the bus" (without "throw") may or may not count as a sighting...
The exact origin of "thrown under the bus" is, unfortunately, a mystery. Slang expert Paul Dickson, quoted by William Safire in his New York Times magazine column, traces it to sports, specifically the standard announcement by managers trying to get the players to board the team bus: "Bus leaving. Be on it or under it." The phrase does seem to be popular in sports circles, but few of the citations I have seen from sports publications carry the same overtones of casual, callous betrayal that one finds in non-sporting uses.

I personally believe the origin is not necessarily sports-related. I hear it in business usage mostly, to speak of sacrificing someone to an oncoming destructive force — to throw someone under that "bus" in an attempt to propitiate the malevolent power.
Comment: Juggernaut, anyone?
Comment: I suspect that the meaning has evolved to suggest sacrificing someone to cover one's own posterior. I see the influence of "throwing someone under the Juggernaut" (as opposed to voluntarily diving under it out of religious zeal), from that longstanding Western misconception of the Juggernaut, and even more strongly the influence of "throwing someone to the wolves" in order to distract them while the thrower escapes. Of course, buses aren't sacrifice-inducing (like the Juggernaut) or predatory (like wolves), but those ideas may have influenced the use and meaning of this phrase anyway.
Comment: This mainstream article adds a little more color to this answer. It mentions Lauper and Safire. http://www.newsweek.com/whos-blame-under-bus-83613
Answer: Wikipedia provides the origin:

Its first use was by General Manager Joseph M. Kelly, who said he was considering ending a network affiliation. "I'm thinking about putting The Source under the bus," Kelly said in early 1988. The phrase was picked up by station employees, and often used to describe political intrigue at the station,

Also used in this:

In Septuagenarian Stew (The Life of a Bum), published in 1990, the Charles Bukowski character Harry pushed his friend Monk in front of a bus, and then stole Monk's wallet while Monk lay unconscious and probably dying in the street. After taking the wallet, Harry went directly to a bar and, using Monk's money, bought himself two double whiskeys. Later, Harry went to the Groton Steak House and, again using Monk's money, bought two beers and two Porterhouse steaks with fries ("go easy on the grease").

Thus, as you said, it came from a specific incident. It wasn't coined that long ago either, 1988.
Comment: I find the third paragraph under "Origins" at your Wikipedia link much more plausible than what you blockquoted.
Comment: No problem. While your edit might be more accurate, I'd be careful about making it sound definitive. You'll notice the paragraph you quoted from has no citations to back it up.
Comment: Wikipedia is a busy-body chat site, not a reference.
Comment: StackExchange is a busy-body chat site, not a reference.
Comment: Thank you sir, I missed that out in my first reading. Thanks for your help !
Answer: In The North Middlesex Magazine for November 1879, in the section "Pickings by our own Gatherer", I find:

A poet sings "And I covered her up with the kiss I gave."  He must have been a coachman and put her under the 'bus.

Note: a "kiss" can mean "a glancing blow"; a kiss from a bus is easily enough to kill.
I'm not going to claim that this instance was the forerunner of today's common usage... but I will say this: it didn't take a brain surgeon to coin this phrase.  Buses are large and hard to stop, and quite a lot of people are killed by them every year; add to that the (apocryphal) legend of the Juggernaut, and you had the ingredients for a catchphrase.  I'm not surprised that it caught on; I'm only surprised that it didn't catch on sooner.
Comment: This was probably a pun on the word "buss" meaning *kiss*. http://dictionary.reference.com/browse/buss
Comment: Didn't they use to put the luggage under the coach? Hence the "he must have been a coachman, and put her under the bus..."
Answer: I think it probably comes from the ethical thought experiment known as the "Trolley Problem."  See http://en.wikipedia.org/wiki/Trolley_problem.
One way of phrasing the problem is you can push the large man onto the track to stop the trolley and save a crowd of people.
Just a guess.
Answer: I seriously doubt anyone can make a case for any specific incident.
The standard expression where I live is that someone might fall under a bus, meaning they could unexpectedly die or be maimed by some easily-imagined misfortune.
I'm not even familiar with OP's usage implying that the misfortune is a consequence of deliberate malevolence. It's easily understood in the context of the standard expression, but I certainly don't think it's used much outside some particular insider slang contexts.
Here is a 1974 example from a parliamentary debate in New Zealand, where I don't think the speaker was particularly implying that traffic-related fatalities were relevant as such. It's just what (some) people say.
Comment: There is not merely a semantic difference between *falling under* and *being thrown under* a bus, agency being the most obvious contrast. In fact, the primary difference is that "falling under a bus" refers to literally dying suddenly in unexpected circumstances *such as being run over by a bus*, whereas "being thrown under a bus" is entirely figurative and in no way is suggesting that actual murder is going to be committed. The NZ example is clearly the former; but we folk at the Antipodes also use the latter expression exactly in the sense referred to by the OP.
Comment: I can easily find half-a-dozen written instances of the usage in Google Books between 2004 and 2010 (all in the context of US politicians or marketing executives), but *not a single one before that*. Although the expression is in widespread use across the globe today, it hadn't really made it to the UK back when I wrote this answer. My point is ***falling** under **a** bus* had been commonplace among the general population for many decades before the idea of being ***thrown** under **the** bus* made it out into the wider world. And I suggest the earlier use ***facilitated*** the later one.
Comment: (I'm sure it also gained traction by association with long-established ***throw someone to the wolves***. I'm just saying that wasn't the *only* relevant antecedent.)
Answer: I am just guessing here but all big buses have luggage compartments underneath the bus floor so they don't take up space inside the bus.  The phrase could then refer to being hustled "under the bus" along with luggage because the passenger is not important enough to be allowed space in the bus and all what it connotes.
Answer: The Wikipedia entry, cited in Thursagen's answer, has since been updated. In February 2017, it claimed that the phrase originated in the UK and was then adopted by sport journalists and political pundits.

The earliest known usage of this phrase was 21 June 1982, when Julian Critchley of The Times (London) wrote "President Galtieri had pushed her under the bus which the gossips had said was the only means of her removal."
Wikipedia, September 30, 2021

Meanwhile, Merriam-Webster also supports the British origin and further claims that the earliest recorded instance can be dated as far back as December 1980.

The reaction of the Right to the events of the last year have varied depending on where in the spectrum they stand. Some still pin their hopes on the "under the bus" theory which has Mr. Foot being forced by ill health—or just the pressures of the job—to give way to Mr. Healey before the next election.
— Elinor Goodman, The Financial Times (London), 10 Dec. 1980

This appears to contradict @SSmith's answer based on an unsupported anecdote.  Further, the editors of M-W affirm [emphasis mine]

It seems quite possible that the expression throw/push/shove someone under the bus dates to Britain in the late 1970s or early 1980s, especially when considering that there was already a similar under a bus expression in use there.

Tony Benn, the greying, pipe-smoking enfant terrible of the Left, is Denis Healey's arch-rival with the Labour Party. The two would be top contenders for the leadership if Prime Minister Jim Callaghan were, in the British phrase, to fall under a bus.
— M. B., Barron's National Business and Financial Weekly (Boston, MA), 28 Aug. 1978

The same expression "fall under a bus" was picked up in FumbleFingers' answer posted in June 2011.
Thanks to The British National Newspaper Archive, I managed to unearth a tantalising snippet from the Aberdeen Evening Express, printed 30 April 1979, which says

…plot to oust him as Labour leader. H Mr Callaghan, who is 67, insisted that would serve a full five years he had no intention of falling, or being pushed, under a bus. And he set out to soothe the fears voters that the left steadily taking over the Labour…

Unfortunately, the full newspaper article is behind a paywall, which I can ill afford, so I am left puzzled as to what the "H" in H Mr. Callaghan  could possibly be.

As for Google, I failed to find earlier instances in any newspapers, British or American, that used the idiom (throw someone) "under the bus" between the years 1970 and 1980. The instances reported refer to either terrible road accidents involving victims  pinned or trapped under a bus or to a few false positives such as "under the bus ness name". Searching the newspaper archives for "under a bus" was equally unsuccessful, although there are a few instances of "thrown under a bus" the newspaper articles were referring to acts of attempted murder.
Answer: As far as I know, this saying goes back much farther. During the Vietnam war, it's said that Vietnamese women would throw newborns under American vehicles to collect $500.00 insurance money from the U.S. I can't confirm the accuracy of this, but as a veteran during the Vietnam era in the navy, I heard this more than once.
Hence the saying, "Throw him/her under the bus" meaning to sacrifice someone to benefit or to better your own situation.
Comment: Can you provide a reference? I couldn't find any variant of this expression before about 1990 in Google NGrams, and it seems highly unlikely to have lain low for twenty years only to see a sudden surge in popularity; it does not feature prominently in any popular book or film set in the Vietnam era released around that time, either.


Do tasered aliens wake up?

Question: In the original X-Com your little foreign buddy could wake up and run off during the mission. Does this happen in the new one, or are they out cold for the rest of the mission regardless of duration?
Answer: The aliens never wake up from their tasered state.
Keep in mind that they are still vulnerable to damage and an alien grenade, car explosion or rocket blast in their proximity will still kill the neutralized aliens, depriving you of a live captured alien.
Comment: I had one recent mission where a muton grenaded two of his stunned pals and one of my squaddies. Aliens are *bastards*.
Comment: yea i agreed they do anything to not get captured alive :)
Comment: @Shadur - this is fascinating. Do you believe he intentionally grenaded his fallen comrades to kill them? Or was the AI simply targeting your soldier who happened to be near 2 incapacitated mutons?
Comment: In retrospect, probably the latter.
Comment: Could they be mind controlled while in tasered state?
Comment: they are untargetable while in tasered state, only area effect abilities/damage like a grenade, exploding car and maybe a rift  storm (the last psychic ability) which i haven't tried on a tasered alien yet.

Do tasered aliens wake up?


Calculate the following limit

Question: I need to evaluate the following limit, however, in doing so, I let $\sqrt{1+c}=1$ which I came to undertand that it's not valid. My procedure was the following:
$$\lim_{c\to0}\left(-\ln(c)\sqrt{1+c}-\ln\left(\frac{1+\sqrt{1+c}}{1-\sqrt{1+c}}\right)+\ln\left(\frac{1+\sqrt2}{1-\sqrt2}\right)\right)$$ $$=\lim_{c\to0}\ln\left(\frac{\left(1-\sqrt{1+c}\right)\left(1+\sqrt2\right)}{c\left(1+\sqrt{1+c}\right)\left(1-\sqrt2\right)}\right)=\ln\left(\lim_{c\to0}\frac{\left(1-\sqrt{1+c}\right)\left(1+\sqrt2\right)}{c\left(1+\sqrt{1+c}\right)\left(1-\sqrt2\right)}\right)$$
$$$$We can use L'Hôspital's rule on the fraction to obtain the simplified version:
$$\ln\left(\lim_{c\to0}\left(\frac{3+2\sqrt2}{2+3c+2\sqrt{1+c}}\right)\right)=\boxed{\ln\left(\frac{3+2\sqrt2}4\right)}$$
The answer that I obtained matches with the answer of Wolfram Alpha even though there is a mistake. If I don't let $\sqrt{1+c}=1$ the limit becomes really difficult and I don't know how to solve it. Does someone have any ideas on how to solve it? And why is my answer correct even though the procedure is not?
Answer: You can write this as
$$-\ln(c)\sqrt{1+c}-\ln\left(\frac{1+\sqrt{1+c}}{1-\sqrt{1+c}}\right)+\ln\left(\frac{1+\sqrt2}{1-\sqrt2}\right) \\
= -\ln(c)\sqrt{1+c} + \ln c- \ln c -\ln\left(\frac{1+\sqrt{1+c}}{1-\sqrt{1+c}}\right)+\ln\left(\frac{1+\sqrt2}{1-\sqrt2}\right) \\ = \ln c ( 1 - \sqrt{1 + c}) + A(c) $$
where
$$A(c) = \ln\left(\frac{\left(1-\sqrt{1+c}\right)\left(1+\sqrt2\right)}{c\left(1+\sqrt{1+c}\right)\left(1-\sqrt2\right)}\right).$$
As you have shown
$$\lim_{c \to 0} A(c) = \ln\left(\frac{3+2\sqrt2}4\right)$$
You will get the correct limit for the original expression now because $\lim_{c \to 0} \ln c ( 1 - \sqrt{1 + c}) = 0$

Calculate the following limit


Downgrade without SHSH2 Blobs

Question: I recently upgraded to iOS 12.0 from 11.2 and I didn't save my SHSH2 blobs. In the process, I stupidly lost my jailbreak and realized there are no iOS 12 jailbreaks that are public yet. How do you downgrade to iOS 11.2 without SHSH2 blobs? I am aware that downgrading results in a factory reset and restoring your data with iCloud will bring it up to that iOS version, unless there is a way to do it that I am not aware of...
Answer: You don't - without SHSH2 blobs you won't be able to.

Downgrade without SHSH2 Blobs


Coordinates convertion with QGIS

Question: i'm trying to convert coordinates from Monte Mario italy 1 (EPSG 3003) to WGS84 (EPSG 4326). These coordinates are contained in a csv file. To do that i'm using QGIS (2.0.1 dufour). So i open the file opening "layer" menu and i select "Add delimited text layer". Then i open the file specifying the source and QGIS autodetects the columns which contain the coordinates. After this i specify the coordinatea format as EPSG 3003. QGIS open the layer perfectly. Then i try to save the file as "delimited text" specifying that i want it in EPSD 4326 format. The output file is just the same as the input one. What's wrong ?
Comment: Answered on GIS Stackexchange [here](http://gis.stackexchange.com/questions/49351/export-to-new-projection-in-qgis-1-8).
Answer: Did you try to repoject your data via GDAL_transform in the console:
Create a shape file within qGIS and then reproject from -s_srs "EPSG:3003" -t_srs "EPSG:4326".
Answer: Actually i solved this. I start creating a SHP file from the file in format CSV. This can be done by the ogr2ogr. Still using ogr2ogr by the shell i used the command ogr2ogr -s_srs EPSG:3003 -t_srs EPSG:4326 -f CSV [Dest file].csv [Source file].shp -lco GEOMETRY=AS_YX.
Answer: I had the same problem and  I don't Why QGIS works like that.
The QGIS does convert from one coordinate to the other. Instead of reading the CSV file, try reading the shape  files. Generally, the shape files contain more  information than any other files..It is easy to read a shape file using java or python.
Follow the below steps,

Read the shape file
Save it as a text file
Convert it to the required format you want

Coordinates convertion with QGIS


(+)-Bicuculline, what does (+) mean?

Question: I was looking up some ion channel blockers. What does (+) or (-) below mean?
(+)-Bicuculline
(-)-Bicuculline methiodide
Answer: Bicuculline is a chiral molecule.  That means that its mirror images are non-superimposable.  These non-superimposable images are termed "enantiomers."  When you see a "(+)" or "(-)" in front of a chemical name it tells you that only one the enantiomers is present (e.g. it is not a racemic mixture of the enantiomers).  Chiral molecules have the ability to rotate the plane of a polarized light beam that passes through it. Enantiomers will rotate the plane of polarization in exactly equal amounts (same magnitude) but in opposite directions.
Dextrorotary designated as (+), indicates clockwise rotation (to the right)
Levorotary designated as (-), indicates anti-clockwise rotation (to the left)
Comment: @K-Feldspar No, R and S are nomenclature terms that describe the spatial configuration at a chiral carbon using the Cahn-Ingold-Prelog priority system. (+) and (-) describe the direction of rotation of polarized light when it passes through the sample.    There is no relationship between R and S and (+) and (-).
Comment: You should also mention that dextrorotary is designated as D (D-Glucose) and levorotary as L (L-tyrosine). But there are some exceptions. L-alanine and a few more L-amino acids are dextrorotary and some D-sugars are levorotary.
Comment: @ron could you please comment why http://www.chemistry.mcmaster.ca/~chem2ob3/nhw_temp/old_old_labmanual/expt1/2ob3-exp1b.html page shows (R)-(-)-Carvone? Wouldn't R (to the right) match with a (+) ?

(+)-Bicuculline, what does (+) mean?


Co-op split screen online Borderlands the pre-sequel

Question: Is it possible to play Borderlands the pre-sequel campaign four players with two players on one PS3 and two players on another?
Answer: if it works the same way as the Xbox 360 then yes should be able to do so with an Ethernet cable connecting the two consoles and having your network settings set to system link, (I believe it can also be done through a modem without using any data) on the bltps start menu press back on xbox to get network options - would imagine its select on ps3.
it definitely possible, as this is how I play with my friends every night,( I don't have a reliable internet connection) and we have just all hit lv 60, loads of fun :) good luck.
note: as you probably realised you would also need two copies of the game
Comment: sorry I've just read you question correctly yes that should just be a case of having two people host on one console each, the other two join each host, and one host joins the others game (bringing the other friend with them) provided that you are friends on psn you should be able to connect to the other console easily
Answer: According to this article the game supports two players per console (couch co-op) and four players either on LAN or in online co-op.

How many players can play Borderlands: The Pre-Sequel locally (couch co-op)?
On consoles Borderlands: The Pre-Sequel supports two players in couch co-op.
How many players can play Borderlands: The Pre-Sequel via system link or LAN?
Four players are supported in LAN play on all platforms.
How many players can play Borderlands: The Pre-Sequel online?
Four players are supported in online co-op.
How many players are supported in combo co-op?
Two players per console are supported with any combination of online players for four total online.
Comment: I suppose that the last answer of this article is the answer I was looking for. So it seems to be called "Combo co-op".


LDO Selection criteria

Question: I need to select a LDO with output voltage of 12V for my design.My load requirement is 1.2A,only for 2ms.So I have chosen MIC29151-12WU regulator which is capable of delivering 1.5A of load current.
Since my load consumes 1.2 A only for short duration,I am thinking to use an low load current LDO with output bulk capacitance to meet the design requirement.This brings down my cost of LDO.But I am not sure about the pitfalls.Could someone advice me on this?
Comment: You can have a look on TI LM1085-12.
Answer: What limits the maximum output current of an LDO ?
1) The LDO itself limits the current because it exceeds a certain value
and/or
2)the LDO gets too hot and limits it's output current and voltage to reduce power dissipation
Depending on the LDO you choose I expect 1) to be an issue as 2 ms is enough time for most LDOs to respond. 2) is probably not an issue depending on how often you draw this 2ms pulse. If you draw a pulse every second or less, no problem. If you do this more often then dissipation can be an issue.
A solution could be to use a large capacitor at the output of the LDO, it will then supply the current. The LDO might not like this though so check it's datasheet. But probably the the large capacitor will increase cost more than using a 1.2 A capable LDO.
The safest option is just to use an LDO which can handle the current.
Comment: This is regarding your first point.Do you mean that the LDO will respond within the 2ms and limits the current.Is my understanding correct?
Comment: Yes, that is correct.

LDO Selection criteria


Highly unbalanced test data set and balanced training data in classification

Question: I have a training set with about 3000 positive instances and 3000 negative instances. But my test data set is pretty much un-balanced. The positive set only has 50 instances and negative has 1500 instances.This causes the precision very low. Are there any approaches to solve this problem? I use SVM to build classifier.
Comment: This shouldn't happen..... Training data and test data should be random selections from the same data set.
Answer: This is called Dataset Shift setting. This pdf [1] should help you understand several of the underlying issues involved.
For the moment however, you can use least squares importance fitting to obtain importance estimates for your training data using your test set (you don't need the test set labels, just the feature vectors) [2]. Once you gain the importance estimates, you can use them as instance weights in libSVM [3].
That should enable you to get a better classifier.
[1] http://www.acad.bg/ebook/ml/The.MIT.Press.Dataset.Shift.in.Machine.Learning.Feb.2009.eBook-DDU.pdf
[2] http://www.ms.k.u-tokyo.ac.jp/software.html#uLSIF
[3] http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/#weights_for_data_instances
Comment: @wannik If your training and test set are random samples from the actual data, then they must have identical distributions. Almost every classifier we use expects data to be of this form.

However, the situation you describe is a fairly common scenario. It is hard to predict the behaviour of the classifier in this situation.

Generally, 1] Use plain classifier, if it works then great, 2] If not, do you know the class proportion in test apriori? If yes, then use transduction SVM 3] If not, then use the same approach described in the original answer (importance weights).
Comment: Updated link to the importance estimation software from Sugiyama et al. http://www.ms.k.u-tokyo.ac.jp/software.html#uLSIF
Comment: What would happen if the training set is balanced but the testing set is not?  Should they both have the same distribution?
Answer: Do you think the `real world' looks more like the training set or the test set? If it looks more like the training set, the you can randomly sample 50 instances from your negative test set to get a more unbiased estimate of precision. But I agree with Peter Flom: In general, your test and train sets should both look similar.


Why does current not flow through Rg?

Question:
I cannot seem to understand this. Please explain the Kvl part for this as well.
Comment: The gate of a mosfet is a capacitor. It blocks dc current.
Comment: You ask about "the KVL part." What do you mean? I don't see anything about KVL in the picture.
Comment: @Justin, Vds = Vgs + VRg.
Comment: The esistance Rgs and Rgd are infinite.
Answer: Current will only flow through Rg during start up, due to the reason that the gate of a mosfet is capacitive, except for extremely small leakages of course.
So when the circuit of yours reach steady state the current will stop flowing through Rg to the gate of the mosfet.
Answer: There is an insulator (like glass) between the gate and substrate (the two parallel lines in the symbol of the MOSFET M1) so that the input circuit is broken. The resistor Rg is connected with its upper end to the drain and its lower end is "floating" (unconnected). There is no current flowing through it... so there is no voltage drop across it. The gate voltage is equal to the drain voltage... as though the drain is short-connected to the gate. So you can safely remove Rg...
If you want to know how this circuit operates, here is a possible intuitive explanation. M1 compares its drain-source voltage with its "input" threshold voltage Vth by subtracting them and changes its drain current to make the difference between them zero.
I repeat it again since such an explanation is not so popular - the treshold voltage Vth serves as a "constant input voltage" for this voltage stabilizer with voltage-type negative feedback. Such a configuration - a transistor (MOSFET here) whose drain is connected to its gate, is known as a "diode-connected transistor" or "active diode". Its main property is to keep up an almost constant drain-source voltage when the drain current varies.
The "sandwich" of two "plates" and insulator between them is actually a small capacitor that is charged/discharged during the transitions of the input voltage. So, a small pulse current enters/exits the gate at these moments. But this is not the case in this analog circuit where there are no transitions.

Why does current not flow through Rg?


How could I implement  referral program for app users in AppStore?

Question: I want provide bonuses to users how have shared link to my iPhone application. How could I implement reference program for app users?
Currently I don't understand how to determine source who provided reference of App Store link to the user.
Any ideas?
Comment: u hav implemented this??
Answer: First of all you do not need to know who has actually referring to the link. As the question is that you only want to give bonuses to people that shares a link, this could be solved in some different ways. If you are actually want to know if the receiver actually clicked on the link, it is much harder. Thus my answer is only for the situation that only sharing is the important thing.
One way to achieve this is to use the MFMailComposeViewController with a pre-defined text that contains a link to your application. When the view is dismissed you can check if the user cancelled or not, you could also check that it worked OK. If this is true, the user has actually sent an e-mail with your link. You do this by implementing MFMailComposeViewControllerDelegate and checking the result.
You could also choose to send an SMS and do a similar test or check. Check out this article that shows how to send SMS programatically.
Another way of solving this is to let your application communicate to a server that you have implemented. The server could either send an e-mail or use an SMS service to send an SMS. The SMS solution would of course cost you some money.
Comment: I want to check, that application installed by referrer link.


Does a certificate authority use different private keys?

Question: I was wondering whether a CA has different private keys to sign certificates with?
Is there a risk of crypto-analysis (or something similar) when a CA signs thousands of certificates with the same private key?
Does this risk exist?
Comment: There's always a risk someone will guess your key however likeness is very small. In total they have as many keys as you can find  in e.g. Windows or Web Browser, so it's not really many of them.
Answer:
I was wondering whether a CA has different private keys to sign
  certificates with?

A CA will usually have a number of Intermediate Keys for use in signing customers' certificates.  These Intermediate Keys are in turn signed by the CA's Root Key, which should be stored "offline" and only used rarely to sign those Intermediate Keys.  The matching Root Certificate is what is widely distributed and found in your browsers Trusted Root Authorities.

Is there a risk of crypto-analysis (or something similar) when a CA
  signs thousands of certificates with the same private key? Does this
  risk exist?

No, to quote Wikipedia, "Every modern cipher attempts to provide protection against ciphertext-only attacks."  So there's no real worry that the amount of signatures/encryptions performed with a key creates a risk of analysis that increases based on the amount of signature/encryptions it has performed.
(Of course, to be used in so many tasks, a key has to be somewhat accessible; that's why the Intermediate keys used for everyday signing are kept "online" and the Root key is generally air-gapped or kept offline.  But this is a practical, operational consideration, not a cryptographic consideration.)
Answer:
I was wondering whether a CA has different private keys to sign certificates with?

In general, no. There is one key pair - and thus private key - per certificate. Certificates can be rolled over to use a new key pair of course. Furthermore, in general, a CA manages multiple certificates for different purposes. The CA may also have different certificates for different signature algorithms, possibly to cover the same purpose (e.g. RSA and ECDSA).

Is there a risk of crypto-analysis (or something similar) when a CA signs thousands of certificates with the same private key? Does this risk exist?

Not from an algorithm point of view. RSA and ECDSA are secure to sign many documents or certificates for that matter. ECDSA is vulnerable if the random number generator is compromised though. All the more reason to use a well vetted implementation with a good DRBG, preferably in FIPS or CC certified hardware.

As other have mentioned, most of the certificate issuance is performed by intermediate CA certificates. That means that the private key of the root certificate is not directly accessible to attackers. If an intermediate is found to be compromised (detecting compromise is a topic all in itself) then the root can be used to revoke the intermediate certificate and issue a new one, with a different private key.

Of course, when signing large numbers of certificates, there may be procedural hazards. The CA is still supposed to validate that it signs certificates for the right entities. Furthermore it should for instance resist pressure to generate the key pair for clients at the location of the CA.
Neither of the above was handled well at DigiNotar to name just one example. But that has little to do with the signature algorithms by themselves.
Answer: What we consider to be a Certificate Authority is represented by a "Trusted Root Certificate" which is a self-signed certificate that is delivered by secure means (most often during the OS or browser installation process.)  Typically a single Certificate Authority issues only one Trusted Root certificate, but not always.  A company that operates as a CA is free to have multiple root certificates; Thawte has one trusted root for their high integrity clients (banks, software development houses) and a different trusted root for small businesses and home users.
There is also a hierarchical model of trust, where a CA signs a few Subordinate Certificate Authorities, each of which is responsible for signing many working certificates.  This is useful primarily in private organizations for managing their internal key infrastructure.  (Imagine the military has a single CA cert, and it is used to sign one SCA for the Army, one for the Navy; the Army uses their SCA to sign certificates issued to each soldier, the Navy uses theirs to sign certificates issued to each sailor, etc.  And every certificate can be validated simply by walking the chain back to the single CA, so a Navy guy can trust an Army guy's certificate.)
Is there a security risk to reusing a key to sign many certificates?  We can't say "no" with certainty, because it actually was a problem about 10 years ago.  Researchers exploited a weakness in the collision resistance of MD5, allowing the forgery of new certificates assuming the attacker could get a CA to sign a new certificate request at precisely the correct time.  As the appointed time approached, the attackers flooded the CA with signing requests, hoping one of them would return exactly the timestamp they had predicted.  This attack instantly proved that collision resistance was a vital attribute in the real world, and caused MD5 to lose its status as a trustworthy cryptographic algorithm; millions of web sites were at risk until eventually all MD5 root certificates were revoked or expired.  Project HashClash now offers a demonstration of this collision vulnerability, although no CAs use MD5 anymore.
Note that doesn't mean that one follows the other:  different private keys would not have prevented that problem; they would simply have limited the scope of the problem to a smaller number of clients exposed to an MD5 hashed certificate.  But if even one of their root certificates was compromised, the vendor would be completely untrustworthy and they'd quickly be out of business (see DigiNotar as an example of how quickly a CA business can collapse if they don't protect their private keys.)
This gets to the very core problem of trust.  Either you have to verify everyone independently; or OS and browser providers have to verify every organization wanting to use encrypted communications; or you have to accept that trust can be delivered by someone capable of vetting others.  Is it practical to require you to drive to your bank to get their certificate, and install it in your computer?  Maybe.  Is it practical to require you to drive to Seattle to get Amazon's certificate and install it in your browser?  Maybe not.  Is it practical for Microsoft to include 20 million certificates in their browser?  Maybe not.  Is it practical for you to trust your friends who went to Seattle to bring you back you a copy of Amazon's certificate?  Maybe, but it's kind of clumsy.  Having a finite number of top-level certificates is a practical approach that mostly works.
It's much easier to accept that Symantec checked out amazon.com and issued them a certificate; it's much easier to maintain trust when your browser includes only a few dozen CA certificates.  As a side benefit, if some really smart people figure out that Symantec's certificate is not trustworthy, they will tell the world and it will quickly be removed in a software patch, protecting you much faster than if you had established trust on your own (how often would you drive back to your bank to check their certificate?)
Answer: According to PCI a CA private key must only have one purpose. A CA used for protecting key delivery (Remote key distribution) must not be used to protect POI firmware (protecting integrity of an application). So, one CA one private key, one key one purpose. A CA may sign "SUB CA's" where each SUB CA sign certificates for different purposes.


Basic Drag and Drop in iOS

Question: I want to have a view in which there are vehicles driving around that the user can also drag and drop. What do you think is the best large-scale strategy for doing this? Is it best to get touch events from the views representing the vehicles, or from the larger view? Is there a simple paradigm you've used for drag and drop that you're satisfied with? What are the drawbacks of different strategies?
Comment: https://developer.apple.com/ios/drag-and-drop/
Answer: Assume you have a UIView scene with a background image and many vehicles, you may define each new vehicle as a UIButton (UIImageView will probably work too):
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button addTarget:self action:@selector(imageTouch:withEvent:) forControlEvents:UIControlEventTouchDown];
[button addTarget:self action:@selector(imageMoved:withEvent:) forControlEvents:UIControlEventTouchDragInside];
[button setImage:[UIImage imageNamed:@"vehicle.png"] forState:UIControlStateNormal];
[self.view addSubview:button];

Then you may move the vehicle wherever you want, by responding to the UIControlEventTouchDragInside event, e.g.:
- (IBAction) imageMoved:(id) sender withEvent:(UIEvent *) event
{
    CGPoint point = [[[event allTouches] anyObject] locationInView:self.view];
    UIControl *control = sender;
    control.center = point;
}

It's a lot easier for individual vehicle to handle its own drags, comparing to manage the scene as a whole.
Comment: Would this strategy cause dragging to break if the user dragged the button faster than the animation updated?  If their finger got outside the box, it would stop receiving the imageMoved:withEvent: calls, correct?
Comment: How could you know if image stop dragging? How would you know finger moved out?
Comment: ohho - is it possible to offset the dragging "handle" for an image or button so that it can be dragged by the upper right or upper left corner?
Comment: when i am trying getting exception--[drag_move_textViewController imageTouch:withEvent:]: unrecognized selector sent to instance 0x4b4b1c0
Comment: @Luke: should this be "fixed" by targeting UIControlEventTouchDragOutside event?
Comment: really...you'd have to be dragging pretty fast :)  I'd just recommend not using this for any sort of game, but for typical application, this works.
Comment: @Tim A bit too late but you can try this with `UIPanGestureRecognizer` too. That wouldn't break for any drag speed.
Answer: In addition to ohho's answer I've tried similar implementation, but without problem of "fast" drag and centering to drag.
The button initialization is...
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button addTarget:self action:@selector(imageMoved:withEvent:) forControlEvents:UIControlEventTouchDragInside];
[button addTarget:self action:@selector(imageMoved:withEvent:) forControlEvents:UIControlEventTouchDragOutside];
[button setImage:[UIImage imageNamed:@"vehicle.png"] forState:UIControlStateNormal];
[self.view addSubview:button];

and method implementation:
- (IBAction) imageMoved:(id) sender withEvent:(UIEvent *) event
{
    UIControl *control = sender;

    UITouch *t = [[event allTouches] anyObject];
    CGPoint pPrev = [t previousLocationInView:control];
    CGPoint p = [t locationInView:control];

    CGPoint center = control.center;
    center.x += p.x - pPrev.x;
    center.y += p.y - pPrev.y;
    control.center = center;
}

I don't say, that this is the perfect solution for the answer. Nevertheless I found this the easiest solution for dragging.
Comment: In your example code, you define UIControl *control=sender after it is used- should that not be defined earlier?
Comment: What about
CGPoint pPrev = [t previousLocationInView:control];
CGPoint p = [t locationInView:control];

These two earlier lines both appear to refer to "control"?
Comment: @PeterJohnson: In fact it doesn't matter in this case. There is no earlier usage of this variable since the line You've mentioned :)
Comment: Oh gosh! How can I missed that? :-O ... I've edited the answer.
Comment: i add the button form interface builder and i use autolayout
for some login i do hide the button and show it again when i do so it return back to original place
how to prevent this beviour
Answer: I had a case where I would like to drag/drop uiviews between multiple other uiviews. In that case I found the best solution to trace the pan events in a super view containing all the drop zones and all the drag gable objects. The primary reason for NOT adding the event listeners to the actual dragged views was that I lost the ongoing pan events as soon as I changed superview for the dragged view.
Instead I implemented a rather generic drag drop solution that could be used on single or multiple drop zones.
I have created a simple example that can be seen here: Drag an drop uiviews between multiple other uiviews
If you decide to go the other way, try using uicontrol instead of uibutton. They declare the addTarget methods and are much easier to extend - hence give custom state and behavior.
Answer: I would actually track dragging on the vehicle view itself, rather than the large view - unless there is a particular reason no to.
In one case where I allow the user to place items by dragging them on the screen.
In that case I experimented with both having the top view and the child views draggable. I found it's cleaner code if you add a few "draggable" views to the UIView and handle how to they could be dragged. I used a simple callback to the parent UIView to check if the new location was suitable or not - so I could indicate with animations.
Having the top view track dragging I guess is as good, but that makes it slightly more messy if you would like to add non-draggable views that still interact with the user, such as a button.
Answer: -(void)funcAddGesture
{

 // DRAG BUTTON
        UIPanGestureRecognizer *panGestureRecognizer;
        panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(dragButton:)];
        panGestureRecognizer.cancelsTouchesInView = YES;

        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
        button.frame = CGRectMake(50, 100, 60, 60);
        [button addTarget:self action:@selector(buttontapEvent) forControlEvents:UIControlEventPrimaryActionTriggered];
        [button setImage:[UIImage imageNamed:@"button_normal.png"] forState:UIControlStateNormal];
        [button addGestureRecognizer:panGestureRecognizer];
        [self.view addSubview:button];
}

- (void)dragButton:(UIPanGestureRecognizer *)recognizer {

    UIButton *button = (UIButton *)recognizer.view;
    CGPoint translation = [recognizer translationInView:button];

    float xPosition = button.center.x;
    float yPosition = button.center.y;
    float buttonCenter = button.frame.size.height/2;

    if (xPosition < buttonCenter)
        xPosition = buttonCenter;
    else if (xPosition > self.view.frame.size.width - buttonCenter)
        xPosition = self.view.frame.size.width - buttonCenter;

    if (yPosition < buttonCenter)
        yPosition = buttonCenter;
    else if (yPosition > self.view.frame.size.height - buttonCenter)
        yPosition = self.view.frame.size.height - buttonCenter;

    button.center = CGPointMake(xPosition + translation.x, yPosition + translation.y);
    [recognizer setTranslation:CGPointZero inView:button];
}

- (void)buttontapEvent {

    NSLog(@"buttontapEvent");
}

Answer: ohho's answer worked well for me. In case you need the swift 2.x version:
override func viewDidLoad() {

    let myButton = UIButton(type: .Custom)
    myButton.setImage(UIImage(named: "vehicle"), forState: .Normal)

    // drag support
    myButton.addTarget(self, action:#selector(imageMoved(_:event:)), forControlEvents:.TouchDragInside)
    myButton.addTarget(self, action:#selector(imageMoved(_:event:)), forControlEvents:.TouchDragOutside)
}

private func imageMoved(sender: AnyObject, event: UIEvent) {
    guard let control = sender as? UIControl else { return }
    guard let touches = event.allTouches() else { return }
    guard let touch = touches.first else { return }

    let prev = touch.previousLocationInView(control)
    let p = touch.locationInView(control)
    var center = control.center
    center.x += p.x - prev.x
    center.y += p.y - prev.y
    control.center = center
}

Answer: Here's the best way to do drag and drop as of iOS 11:
https://developer.apple.com/documentation/uikit/drag_and_drop/adopting_drag_and_drop_in_a_custom_view
Answer: For Swift 4 Easy and easiest way.
Step 1:
Connect Your Button From Storyboard To View Controller. And Set The all Basic AutoLayout Constraints
 @IBOutlet weak var cameraButton: UIButton!

Step 2:
Add Pan Gesture for your button In viewDidLoad()
self.cameraButton.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.panGestureHandler(panGesture:))))

Step 3:
Add panGestureHandler
@objc func panGestureHandler(panGesture recognizer: UIPanGestureRecognizer) {

         let location = recognizer.location(in: view)
        cameraButton.center = location

    }

And Now Your Button Action
@IBAction func ButtonAction(_ sender: Any) {

        print("This is button Action")
    }

Add See the Result ☝

Basic Drag and Drop in iOS


Under what circumstances Veta is positive?

Question: In general, as the option moves towards expiry, its vega is decreasing. Are there circumstances where the veta, i.e. the sensitivity of vega with respect to time, is positive, that is when vega is higher closer to maturity?
Answer: This question is somewhat vague - for example, vega could increase despite decay because the strike is closer to underlying (spot or forward) now. On top of that,  if you look at a binary option, you do have cases where underlying hugs the strike, then you have some pretty funny vega profile. For the same strike and same underlying price, because the total variance to maturity decreases with time, vega at that point actually increases pretty close to expiry.


When a post is modified, does Google Reader notice?

Question: I often click on a post's feed, so as to go to the post's site, just to make sure I'm not reading outdated information. Does Google Reader update the post's contents, so I don't have to keep doing this?
Answer: Simple answer is no.
More complex answer is...
As far as I know, Google Reader is only a RSS reader. A good one, but only a reader. If you don't know the RSS format (or Atom, for that purpose, there is no difference), just follow me a little.
A RSS file contains a list of dated events. Basically, in a feed, there are some infos for each event:

event date
event name
event source URL
event text

What Google Reader displays is the event text. And absolutely no source site text content. However, there are some cases where the source site can send new events when the content is modified. In such cases, Google Reader will display both events, with different text.
EDIT
According to Tshepang

I just tested now. Can you add to your answer that if one updates a post, and then refreshes Reader (by clicking on the Refresh button), the Reader contents are indeed refreshed. Note that sometimes this is instant, and sometimes takes minutes
Comment: When the site does send this new event thing, Reader will notice and update what it displays, or will it make a duplicate?
Comment: Well, I **guess** it will make a duplicate, unless event id is the same, in which case event is "simply" changed.
Comment: Curious, why did you remind me about acceptance? Is it because I took long?
Comment: @Tshepang No, it's because on StackOverflow, i've notice that people commenting an anwser often forget to accept any answer. As it is a recurring pattern, I now have the tendancy to remind askers about the importance of accepting answsers.
Answer: Not unless the URL back to the source has changed since Google Reader took its copy of the feed item.
When the RSS reader grabs a feed, it will be a copy of it as it was at that time. The only reason why a reader would download a new version of the post is if it detects a new feed item with a <link> value that it doesn't already have.
But, it will only download a new copy and won't update an existing feed item.
This is why if your favourite blog moves domains you'll see a repeat of old posts turning up as "new" in your feedbox. That's because according to the URL of the posts and items, they are new. Even if it's the same body content.
Answer: Yes, Google Reader updates a post's content if it is modified though not immediately.
I have subscribed to my own blog's feed (hosted on Blogger) & whenever I update an older post with new info, the modified content appears in an hour or so.
Comment: @tshepang I didn't specifically test by clicking Refresh. I looked for my updated post at intervals while reading other feeds and I guess that's equivalent to clicking the Refresh button in Reader.
Comment: That's interesting. I should actually (duh!) give it a try and see.
Comment: How long did you have to wait for the update? Who hosts your blog?
Comment: Blogger/Blogspot hosts my blog. I've noticed that the time it takes for the feed of a new or updated post to appear in Google Reader varies from 2 minutes to several hours.
Comment: So you have no need to click the Refresh button to have fresher content?
Comment: My Posterous doesn't. I explicitly have to click Regresh, Can you specify on your answer that you are using Blogger.


Sub-exponential tail implies Poincare inequality

Question: Assume we have a probability measure $\mu$ on $\mathbb R^n$. Assume it satisfies
$$
\mu(||x|| > u) \le Ce^{-au} \ \ \forall u > 0
$$
In other words, its tail is dominated by an exponential function.
Then, how to prove Poincare inequality?
$$
Var_{\mu}f \le K\int||\nabla f||^2d\mu
$$
Comment: You can't, without additional assumptions.  Suppose $\mu$ has discrete support, say for example it's a Poisson distribution on $\mathbb{R}$, and $f$ is constant on a neighborhood of each point in the support of $\mu$.
Answer: As Mark Meckes already pointed out, this is not enough to proof a Poncaré inequality.
If you are interested in the case where $\mu$ is absolutely continuous, then there are conditions formulated in terms of the log-density of $\mu$, i.e. $\mu$ is of the form
$$
 \mu(\mathrm{d}x)  = \exp(-H(x))
$$
The minus sign is just convention.
There is a complete characterisation of the constant $K$ for the real line via the Muckenhoupt functional. Therefore let $m$ be the median of $\mu$, i.e. $\mu((-\infty,m))=\mu((m,\infty))=1/2$, then define
$$ \begin{align}
B_+ &= \sup_{x\geq m} \left( \int_{m}^x \exp(H(y))\;\mathrm{d}y\ \int_{x}^\infty \exp(-H(y)) \; \mathrm{d} y \right) \\\\
B_- &= \sup_{x\leq m} \left( \int_{x}^m \exp(H(y))\;\mathrm{d}y \  \int_{-\infty}^x \exp(-H(y)) \; \mathrm{d}{y} \right)
\end{align}$$
Then, one has
$$
 \frac{1}{2} \max\{B_-,B_+\} \leq K \leq 4 \max\{ B_, B_+\}
$$
I.e. the Poncaré constant can be recovered upto a factor of $8$.
On $\mathbb{R}^n$ there is the theory of Lyapunov functions, which give sufficient conditions for Poincaré inequalities. See A simple proof of the Poincaré inequality by Bakry et. al. There, two prominent assumptions on $H$ which both individually imply a Poincaré inequality are

For some $\alpha>0$ and all $|x|\geq R>0$ holds
$$ \langle x, \nabla H\rangle \geq \alpha |x| $$
For some $\alpha>0 , c>0$ and all $|x|\geq R>0$ holds
$$ \alpha |\nabla H(x)|^2 - \Delta H(x) \geq 0 $$

Then $\mu$ satisfies a Poincaré inequality with an upper bound on the constant $K$.


android How can I check whether the certificate passed from server to device is a valid certificate?

Question: Could anyone please help  to find  how  a valid Https  connection can be made from an android app.i  donot have a clear idea  of  How can I check whether the certificate passed from serveris a valid certificate? from my android app and establish a connection  with the server.which are the certificates supported by android
Answer: It might be valid (as in not expired and with a signature that verifies), but not trusted by Android. Android will check both (trust and validity) when you connect to a HTTPS URL automatically, and you will get an exception if either of those checks fail.
Simply put, just try to connect to a HTTPS URL and see what happens.
'Supported' (i.e., trusted) issuer certificates vary by Android version, and since ICS (4.0), you can install your own.


using a lookup table on a form with Oracle Apex Item

Question: I have an application that uses Oracle Apex 4.2 . It has a form ( form and report on a  table) that needs to display descriptions for columns on the table. For instance, there is a column on the table called fund which has a numeric value ( 1 to 6). There is a separate table that gives a description for each of these 6 values. Under EDIT PAGE ITEM, under SOURCE, I chose SOURCE TYPE -> SQL QUERY
I entered this query below:
<code>  SELECT DESCRIPTION FROM
   "#OWNER#"."BU19ANT",
   "#OWNER#"."FUNDCD"
  WHERE ANTFUNDCD =  CODE
</code>
where BU19ANT is the table that used for this form
FUNDCD is the name of the look up table
ANTFUNDCD and CODE and numeric fields on the respective tables and DESCRIPTION is the value that I want to look up and display on the form.
This gives me the correct answer MOST of the time, but not all the time.
The key to the table ( and the field used to link from the report to the form) is the Soc Security Number. If I run this same query against the Oracle table hard coding the SS Number, I always get the correct answer.
This form has 5 look ups that work this way and they all have the same problem.
I assume that I DONT need to include the Social Security Number as part of the query  Apex already knows that.
But I tried to add that and can not figure out how to code it.
 I tried
<code>  WHERE ANTSOCIALSECURITYNUMBER ( column on table) = P2_SOCIALSECURITYNUMBER ( the item on this page)
</code>
but that gave this error

ORA-00904: "P2_SOCIALSECURITYNUMBER ": invalid identifier

Is there some other way to code this? Or to say where SS Number = current record?
Or am I on the wrong track here?
Answer: Try :P2_SOCIALSECURITYNUMBER  (for items on session) or &P2_SOCIALSECURITYNUMBER. (for items on page)


Building a shape out of an Texture with Farseer

Question: I have already looked at the Documentation on there Website, but the code provieded to create a shape out of an Texture is outdated for the newest version. The body is very simple so maybe i can do it with just 2 rectange but i have no idea how to do, because I just started with Farseer. Here my texture:  Texture
Answer: First, you need to get the color data as uint's in an array, so:
Texture tex = Content.Load<Texture>("texture");
uint[] texData = new uint[tex.Width * tex.Height];
tex.GetData<uint>(texData);

After, you can use Farseer's TextureConverter to convert the data into Vertices (from FarseerPhysics.Common)
Vertices vertices;
vertices = TextureConverter.DetectVertices(texData, tex.Width);

Finally, you want to decompose those Vertices into something usable so they can be used to create polygons, using one of the many Farseer Decomposers
List<Vertices> vertexList = FarseerPhysics.Common.Decomposition.BayazitDecomposer.ConvexPartition(vertices);

There are many different methods under FarseerPhysics.Common.Decomposition, you can play around with the different methods to see which one you like best. Now you have the list of vertices needed for BodyFactory.CreateCompoundPolygon(...), which will return a body with the shape of your texture!
You might need to scale your vertices appropriately (since the result is in pixels and Farseer uses "meters") so you can do something like this
Vector2 vertScale = new Vector2(ConvertUnits.ToSimUnits(1));
foreach (Vertices vert in vertexList)
  vert.Scale(ref vertScale);

Comment: but why do you do there: Vector2 vertScale = new Vector2(ConvertUnits.ToSimUnits(1));

Why 1? Why not 2? or should I use the texture width?
Comment: Do you use the `ConvertUnits` tool found in the Farseer demos? What that does is scale all the vertices by 1, but not 1 pixel, one "meter" length, meters being defined somewhere at the beginning of your code. Its not changing the length of the vertices to "1" either, its scaling it x1, so basically keeping it the same size as it is, but relative to your world distance measurements.
Comment: Just tried it, but dont works :(
Comment: yeah i use it :)
Comment: Yeah i called it, its alwaly rotating and collides with although its half the screen away. But as you can see my texture is nearly a rectange, so i tried it just with an rectange there it worked okey, but though the corners the collision is not perfectly :)


InfoPathform not submitting to sharepoint 2010 list

Question: I've set up an InfoPath form and SP list. It was working fine and submitting to the list. However I set up some Form Load and Form Submit rules which threw up some errors. Then I noticed that the data wasn't appearing in the list. When I submit the form nothing happens. No errors, the form just closes and nothing appears in the list. I've disabled the rules, so theoretically I should be back to where I was, but I'm actually a step back. Any ideas why the data isn't appearing on the list?
Answer: Verify that there is no "Close form" action in your previous rules. Also Make sure that you moved your form actions up i.e. before your submit action. otherwise values which you will try to set from your rules will not get submitted.
Answer: Did you set up custom actions for form submit?

If you did this, be sure to set up custom submit rule
Answer: A quick solution to this type of problem is to really step back, disable all rules and keep simple form submit to list. Test that and if that works then apply rules one by one and test until you come to a rule that cause the issue.


Connecting Civi to a previous install's database

Question: During my update from Civi 4.2 to 4.7 I let it fill in database information that was not correct it connected to the cms database and not the Civi database from the previous install. Is there a file I can edit to have it connect to the old database?
Answer: You should edit the civicrm.settings.php file.  The location of this file depends on your content management system.
Drupal: sites/default/civicrm.settings.php
WordPress: wp-content/uploads/civicrm/civicrm.settings.php
Joomla: administrator/components/com_civicrm/civicrm.settings.php
You may find this related post helpful: How do I change the CiviCRM Database name


How to control image transparency like photoshop

Question: Im my model in the soup there is curry leaf. And i want to make that leaf transparent like photoshop. As if leaf is dip and floating in the soup. How to control the image. Any suggestion or help. Thanks
Answer: you can add another "mixshader", connect the output of the current "mixshader" to the new.
Afterwards you can connect the "transparent shader" to the top of the new "mixshader".
The factor can be a "color ramp" that is dependent on Z of the object (in fact you can use whatever factor here to control another transparency).
Check the printscreen of the proposed node setup:
Comment: Thanks perfect.
Comment: no problem! any time :)
Answer:
Thanks to MCunha for the node & i got other node also the image given below. With the Factor in the Mix Node. Simple to control the transparency.


Is it bad practice to add a class to a third party dependency/package? (java)

Question: I have an interaction client from a 3rd party dependency for a service I need to use. Some of the behaviors don't fit my use case and I want to try to extend or just rewrite an adapter for it, but a lot of the methods or variables I need are protected. Should I just write a class that belongs in that package to access those? I haven't ever heard it explicitly stated not to, but it seems to defeat the purpose of having a package in the first place.
Comment: You can just extend the required class and you will have access to the protected member.
Answer: I would say it's a very bad idea.  You should never, ever modify a 3rd party JAR in any way.  You're better off to consider them sealed.
The reason is two-fold:

You may break the dependency code.
The moment you modify that 3rd party JAR you have to modify every update in the same way.

You are free to extend a third party class, as long as it's not marked as final.  But it'll be part of your code if you do that.  You are free to pull in a new version of that 3rd party JAR any time it's available.
Answer: If the methods and variables are protected, you can extend the class with your own implementation. The child class is able to access the parent class's protected variables and properties.
Your implementation does not need to be in the same package.


Can I get villagers from other peoples islands to move to mine even if my town is already full?

Question: I don't really know how it would work but I see people trading islanders all the time in Animal Crossing New Horizons, even if my island is already full is there a way to get villagers from other people?
Comment: My friend was unable to invite my villager to move in until she built a free plot. However, since she was under the 10 villager cap, I don't know if that affects things.
Answer: You need to have an empty plot to invite someone 'in boxes' (that is in the process of leaving another island.)
If you keep speaking to someone on your campsite, they will end up proposing to switch with another resident, at random as far as I know.
Comment: The other option is to buy [Amiibos](https://en.wikipedia.org/wiki/Amiibo).  They are trading cards for each villager, sold in packs, each containing a near field communications chip that can be read by your switch.  You use the Nook stop machine in resident services to scan the Amiibo villager into your campsite.  During each visit they will ask you to craft a souvenir for them (and may give you a recipe to do so so).   After you give them their third souvenir they will be willing to move to your island and will let you choose which villager you want them to replace.


Training and test sets in random forest regression

Question: Why do I keep reading about specifying training and test sets with random forest regression? As probably obvious from this question I am new to this method, but what I thought one of the cool things about it was that this is not needed because the out of bag sample functions as the test set, i.e. the method provides its own test set. Is this just needed under specific circumstances, e.g. for more methodological studies or am I missing some very fundamental aspect??
Thank you for any clarification.
Comment: Dividing the data into two sets is quite wasteful of sample size (as opposed to using rigorous bootstrap validation) and requires an initial sample size of at least n=20,000 to be stable/reliable.
Comment: Thank you both. I know it was a horribly vague question, but these answers are all I needed. I don't have a specific paper to talk about, I just saw the topic of test/training samples come up everywhere, including in the options of R random forest packages and was afraid I was missing something. Frank, do you maybe have a reference for that sample size statement?
Comment: I don't have a reference but base this on two things: (1) A dataset with n=17,000 and proportion $Y=1$ of 0.3 resulted in unstable $c$-index (ROC area) when using split-sample validation twice.  (2) Single 10-fold cross-validation has insufficient precision; you need to repeat 50-100 times for stability.  And a single 10-fold cross-validation is much better than 2-fold cv.
Answer: You still need a separate test set (or outer round of cross-validation) if you're using those out-of-bag estimates to tune some aspect of the random forest, such as the number of features to consider for each split. If not, out-of-bag estimates can indeed substitute for a separate test set.
I may be able to give you a more specific answer if you provide the particular paper or papers you're talking about.


Find object for given primary key in entity framework

Question: I have a table "Customer" and its corresponding ORMapping Entity Customer in entity framework and I want to find an object corresponding to a given primary key.
Something like customerObject.getObjectByID() instead of a lambda expression or query.
Comment: yes but What I want is simply "select * from Customer where custId=2"
Answer: var Customer = from c in datacontext.Customer
               where c.CustomerID == your_key
               select c;

That's assuming your customer table has a CustomerID column and that is the primary key.
Using DbSet's Find method:
Customer customer= db.Customer.Find(your_key);

Using a lambda expression:
 var customer= dataContext.Customer.Where(x=>x.CustomerID==your_key).FirstOrDefault();

Comment: I was expecting just simple function call for example customerobject.getbjectByID()
Comment: Well, you could build a Extention Method and try to make the Lambda generic, maybe with an interface or something similar. Otherwise I am very pessimistic about it.
Answer: "instead of lambda expression or query"
customerobject.Find(id);

More specifically:
var myDbSetTableEntity = context.MyDbSetTableEntity.Find(object key1, object key2)

Answer: The most compact way:
var myCustomer = myContext.Customers.SingleOrDefault(c => c.Id == wantedId);

wich is basically short-form for
myContext.Customers.Where(c => c.Id == wantedId).SingleOrDefault();

Other candidate selection methods are Single(), First() and FirstOrDefault()
Comment: Good to note that the short-form requires an import of System.LINQ by stating `using System.Linq;`
Answer: If you have a composite key, build an object array and pass it to Find(). Eg:
try
{
    RECORD rec; // ie, your entity definition of a record (row)
    Object[] onePK = { id, s0, s1 };
    rec = YourEntities.RECORDs.Find(onePK);
    if (rec == null)
    {
        // handle the record-not-found situation
    }
}
catch (SystemException sex)
{
    string error = sex.Message;
}

Answer: for composite keys: customerobject.Find(key1, key2, key3)
what is order you specify the keys, assuming they are all strings ?


Book I read as a child about a man and woman stranded on a planet

Question: I remember reading a sci-fi novel as a child, at least 30 years ago but cannot remember the title or even most of the story. The one part that I remember is the man and woman eating "Tubers" and then turning into some kind of aliens or maybe even alien cattle.
Comment: About when did you read it? Five years ago? Fifty years ago? Was it a children's or "young adult" book?
Comment: It was probably at least 30 years ago. I don't think it was a young adult book as there were some mild elements of sexuality. I remember that the transformation was into something resembling grazing creatures. It was a very enjoyable novel but for the life of me I can't remember the name of it or the author. I don't think it was Protector by Larry Niven.
Answer: I suspect you're thinking of Protector by Larry Niven.  The details don't quite match up, but allowing for fuzzy memory they may be close enough.

Tree-of-life root ("tuber") turns humans into Protectors:

It was humanoid, as much so as a stick-figure drawing is humanoid.  It was all knobs.  Elbows, knees, shoulders, cheekbones, they stuck out like marbles or grapefruit or bowling balls.  The bald head swelled and rose behind like hydrocephalus.

The second part of the book involves Roy Truesdale and Alice Jordan, who are held captive for a time in an Earth-like artificial environment.  Roy is later turned into a Protector, though not by eating tree-of-life.

(There are also a number of other novels by Larry Niven involving Protectors, so it might instead be one of those.)
Answer: This sounds like a fragmentary memory of part of the Ringworld series, possibly "Return to Ringworld"?. There is a female character, Teela, who is not terribly intelligent but is incredibly lucky (somehow this is genetic). She discovers a cache of these tubers and by eating them becomes a "Protector", a super strong, super-intelligent organism. The man might have been a surviving member of the species that populated Ringworld, since Teela had been left when the surviving explorers returned to "Known Space". and the world would have been Ringworld.


Durandal activate, detached events of child router never get triggered

Question: When using the following Durandal child router plugin configuration, I'm not getting the detached and activate events described in the Durandal lifecycle, while other events work.
It is a single page application, with the childRouter controlling content of a div container within it. Each childRouter corresponds to a module and only one should be attached at a time, while others should be detached.
The application uses separate childRouterinstances for each module and I'm expecting the detached and activate events to be trigered each time navigation between two modules occurs (i.e. moduleOLD should get detached and moduleNEW should get attached).
Documentation says Durandal lifecycle events are triggered automatically:

Rows highlighted green will always execute when composing.

It doesn't work this way, which could be caused by:

Child routers not being notified about each other being attached/detached (i.e. need to subscribe to some event)
Child router working differently than parent router

It seems I have to detach something manually, or notify the router that is being replaced, to trigger detached and activate.
How to trigger the detached and activate events for childRouter?
define([ 'durandal/app', 'plugins/router'], function(
        app, router) {
    var childRouter = router.createChildRouter();
    childRouter.makeRelative({
        moduleId : 'modules/moduleX/pages',
        fromParent : true
    });
    childRouter.map([ {
        route : [ '', 'grid' ],
        moduleId : 'grid/index',
    }, {
        route : 'details/:id',
        moduleId : 'details/index',
    }, {
        route : 'details/tabs/base',
        moduleId : 'details/tabs/base',
    } ]);
    childRouter.buildNavigationModel();
    childRouter.activate = function() {
        console.log("activate");//DOESN'T WORK
    };
    childRouter.attached = function() {
        console.log("attached");//WORKS
    };
    childRouter.compositionComplete = function() {
        console.log("compositionComplete");//WORKS
    };
    childRouter.detached = function() {
        console.log("detached");//DOESN'T WORK
    };
    return {
        router : childRouter
    };
});

Output (no errors):
compositionComplete (gets called here too, when a route is first visited)
attached
compositionComplete

Answer: In Durandal, activation lifecycle is specific to an activator. Each router, and child router, has one in activeItem, which also acts as an accessor to the currently activated module on that router.
Durandal ensures that the events from the lifecycle are properly called on each module when it changes or is about to change the active item on any of the currently active routers, and then when/if it binds the data to the module's view and attaches it to the DOM document.
To have the events triggered as intended, the methods with corresponding names should be declared on each module where such handler is required.
Activation takes place across all child routers, but happens in steps, starting from the root router. Thus, when picking a module for a new route, the root router will ask its currently active module if it canDeactivate, which will chain down to all of its active modules in the child routers. Then it will ask the new module if it canActivate. And if allowed by both, the activation will go through and the active item on the root router will change, triggerring the deactivate/activate methods on the modules, if present. If there is more to the route than the matched fragment and the activated module has a child router, the child routing on it will then be triggered as well.
When the same module is reused in the activation, the chain of events is still triggered, but it may happen so that the deactivate method on some of the modules activated in a child router may not trigger if that router doesn't receive a matched module from the new route. For example, it can happen if the child router isn't configured for a null route ('') and the navigation changes back to a parent route, say from products/item/15 back to products, leaving the child router with no new match and no new module to switch to, meaning that whatever parent module was matched for products will still have the old module for item 15 remain activated on its child router. To avoid such cases when reusing modules, one option is to always configure the null route ('') on child routers. If anything, match it to a module with a blank view, e.g. an empty div.


Is it possible to block out reality completely?

Question: Is it possible for an individual to block out all reality and see objects, colors and hear voices and sounds that are non-existent non-stop?
Answer: Yes, it is. Seeing objects, colors, hearing voices and sounds are electrical impulses translated by our sensorial organs and sent to the brain. There are cases of blind people which can "see" (feel?) a whole load of abstract images, and are actually bothered by it.
A person could have no sensing organs and still have electrical impulses by means of artificial brain stimulus, or due to a neurological damage; tinnitus comes to mind (no pun intended).

When TMS [transcranial magnetic stimulation] is applied with a single pulse to motor or sensory cortex, it is possible to evoke a motor or sensory response. When the sensory cortex is visual cortex, the response is a phosphene.4 Phosphenes are the sensation of light in the absence of visual stimulation.
Answer:
We do this with dreams. Lucid dreaming allows us to modify what we experience.
This is the stock in trade of stage hypnotists. They induce a false or partially false reality in which the subject experiences non-real people, objects and sensations. Self-hypnosis is possible.
This happens with hallucinogens, e.g. peyote.