NFC antenna booster

Question: Hi I'll get straight to the point... theoretically if I built an antenna loop that went around a door frame including under the carpet so I could walk through the loop, then connected the antenna to a NFC payment (POS) terminal would it be able to read and take a payment from my contactless bank card, I have a bet with a colleague who says it is not possible?
Answer: It's not possible. I believe it was designed to only work <4cm gap and never work >= 10 cm gap, limited by the card's antenna radius and path loss for a much longer wavelength (20m band)
RFID tags in smart cards operate at 13.56 MHz with a magnetic loop antenna and subcarrier at about 3.3% of this carrier with an AM data rate that a bit more than 6% of this in ISO 15693.  Another version uses ISO 14443 at twice the subcarrier Freq and with QPSK at about 4 times the data rate.  Effectively this limits the Q of each antenna from 9 to 16.
The real problem is the transformer coupling factor is too weak at the distances of say a 1m exit with a pair of 1m square antenna loops. The squared ratio of the card antenna radius to the say 1/2m gap to the base loop from the card loop has a ratio of attenuation of magnetic coupling est. more than 20 dB below base station threshold.
Graphical example of parallel loops with wide separation showing divergence of H field.
Other info

if you happen to do any research in "wireless power transfer" or WPT there are tens of thousands of PhD and research papers on this topic. (I got daily google auto-search updates at one time).

have yet to see any transfer meaning power much beyond the diameter of the sending coil which must be match to the size of the receiving coil for coupling.

However with ferro-magnetic repeaters, it is possible to transfer
inefficiently power beyond these magnetic loop dimension limits from
my experience of others doing this.

Electric fields from a dipole or Yagi are different than Loop magnetic antenna patterns and are defined by Friis Loss with a quadratic loss factor.

Further the card orientation is likely orthogonal to the side coils in the front or back pocket.  Then there is the antenna defining factor of adjacent cards.

To add more power in the coil is possible (>5W) with a Q of 16 but then is it safe for the eyes to stay in this range long ? (security guards near exit) (no).
Even if the card got lots of power the Zener limiting voltage on the coil would lower the Q and detune the sensitivity.
Maybe if you have liquid nitrogen cooled LNA's and multiple coils and Tempest EMI sniffing design experience , you'd be hard pressed to do this and you might get red eyes trying to do so for weeks on end from the caterogenic effects of high Q RF power near field in testing.
Although it was possible at one time to pickup EMI from old 25kV CRT's and retrace the pixel modulation and reconstruct a QVGA screen. Now EVERY VGA cable has a Ferrite CM choke to limit radiation on the VGA cable.
Comment: Wasn't me, Tony. This is way outside my area of expertise.
Comment: P.S. if you bet a beer, you owe me one too (lol)
Comment: -1 to the loser without comments

NFC antenna booster


How to add group talk in my CV?

Question: I recently gave a presentation on the research that I have been conducting with my group. It was a group talk. We all talked for 3-4 minutes, for a total of 10 minutes. This talk was the end of the Summer REU presentation. How can I add this to my CV in the presentation and talk section? Thanks!
Comment: Is that really worth to add in the CV?
Comment: You probably shouldn't. A 10 minute talk really doesn't sound like something that should be on a CV.
Comment: How long is your CV? If it's a one-page CV, I wouldn't bother, but if you're including more detail for each position held you could put it in the section on duties/responsibilities.
Answer: There is no point in adding a single presentation/talk to your CV.
However, if you really want to do it, one way to go about it is to add a responsibilities section for each workplace and below the current one state something like this: academic research presentation. However, reading this on your CV hiring manager will more likely assume that you gave more than one presentation.
I.e.: Workplace: University/Institute X | Position: Researcher | Responsibilities: my other responsibilities, n-th responsibility) Academic research presentation
Comment: Presentations are often added to academic CVs. However, these are presentations at conferences and such and not internal presentations. Unless someone asks for this (and unfortunately some institutions do), I wouldn't add a presentation to my CV unless I don't have any scientific publications.
Comment: I have a couple of presentations ( mostly an hour talk) in my CV that I gave on my own. This was the end of the project talk that I thought might look good on my CV since it was in front of many people. From everyone's suggestions, it seems like it is not worth adding it to the CV.

How to add group talk in my CV?


Drying store bought bread for stuffing

Question: I am drying a loaf of sourdough on my counter. There is a lot of it, so I will need to store some of the dried cubes. My question is, how do I store it and how will I know if it is no longer good to cook with? Also, is it better to just put it in the oven to dry it rather than on the counter?
Answer: There are two types of bread for stuffing.  If you're aiming for the dry type, a very low oven would be better.
If you have room in your freezer, that would be a good place to store the bread you're planning to use later to make stuffing.
Answer: I dry cut cubes, spread in a single layer, in a low (170°F 77°C) oven for 10 mins, then let the oven cool down before removing the bread.
The bread will tell when it's gone off by developing a rancid oil smell. That'll take months to a year or more.
Comment: Thanks!! Good to finally know when I can tell its gone bad.
Answer: Cube it, bake at 200°F for 2 hrs, cool then store in ziplock . Make sure it's really dry first. Depends on initial moisture content of bread.
Answer: I just left a loaf of sourdough from T. joe's, chopped into big-ish cubes, overnight on the counter in one layer on a pan. They were dried the next morning and everyone loved the stuffing I made with it, so that's the way to go. Not really complicated. As long as your bread is dry/stale, your stuffing won't be too mushy, especially if you toast off the top
Comment: Stale is not the same as dry. Drying in an oven as the other answers suggest is much preferable. Stale bread often isn't dry at all.
Comment: You're wrong. The word "stale" is just setting off alarm bells in your head and you are being fussy. The purpose of drying the bread before making stuffing is to take out the moisture so that when it is combined with stock & egg yolks before being baked, the final consistency won't be too mushy. "Stale bread often isn't dry at all" - this is just incorrect. Stale bread hardens exactly for that reason. You can look for recipes on stuffing, many people will stand by letting the bread dry overnight, calling it "stale" or not is semantics.
Comment: Furthermore, stale bread can easily be revitalized as has been done with many ancient and rustic peasant recipes - tomato and bread soup/garlic and bread soup (Italy), Romesco sauce (Spain) - my point being, during the holidays, your oven should have better things to be doing than drying bread slowly on low heat. Now if you're talking about actually toasting the bread, the flavor would absolutely be different, probably in a good way, but I haven't tried making stuffing with toasted bread
Comment: http://www.seriouseats.com/2016/11/stuffing-use-oven-to-dry-bread-instead-of-stale.html

Drying store bought bread for stuffing


Why won't Startup Disk writer write the latest Ubuntu ISO to DVD-ROM? (Ubuntu 12.04 LTS)

Question: I downloaded the Ubuntu 12.10 Desktop ISO from the Ubuntu website, md5 checked it and its fine. However, when I put a Sony DVD-R AccuCORE 4.7GB disk in, Ubuntu recognizes it and allows me to write my own files (.doc, .exe, .txt, etc...) to it, but for some reason Brasero and Startup Disk Creator both don't recognize it and refuse to write the ISO to the disk???
Comment: damaged iso? check the md5
Comment: He said he did, @Web-E.
Comment: What does **Brasero** recognise the DVD as? Is these an error message?
Comment: Sorry for the late reply: It does recognize it, but it says something along the lines of 'I don't recognize this disk, supply me with a CD-ROM...?' I'll get the exact wording soon.
Answer: Well, after much deliberation, I have figured out that my disk drive doesn't write ISOs to these DVDs. Got a new pack, nope it's not the old DVDs, the news ones don't work either.
Windows XP Pro doesn't even recognize it at all, just sits there spinning and making weird noises.
So I took an ISO creator program to my newer system and voila it works. Very strange all in all, but I got what I wanted.


how do I change the settings of an actuator(python)

Question: I want to change the time of a object that is added but I am new to python and don't know how to. I am trying to create randomly lasting smoke trails.
Answer: Since you seem to be familiar with Python already, you might wanna look into the time property for the actuator in the API. Alternatively, you could just use the addObject method. If I am right it does the same thing but saves you one element in the Logic Bricks.


How to add a button to UINavigationBar?

Question: How to add a button to UINavigationBar programmatically?
Answer: Sample code to set the rightbutton on a NavigationBar.
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Done"
    style:UIBarButtonItemStyleDone target:nil action:nil];
UINavigationItem *item = [[UINavigationItem alloc] initWithTitle:@"Title"];
item.rightBarButtonItem = rightButton;
item.hidesBackButton = YES;
[bar pushNavigationItem:item animated:NO];

But normally you would have a NavigationController, enabling you to write:
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Done"
    style:UIBarButtonItemStyleDone target:nil action:nil];
self.navigationItem.rightBarButtonItem = rightButton;

Comment: This should be initWithBarButtonSystemItem:UIBarButtonSystemItemDone to avoid the warning.
Comment: In the example, I don't understand where "bar" is coming from. What's the default top bar property for a UINavigationItem ?
Comment: I get a warning on the style: parameter -> warning: Semantic Issue: Implicit conversion from enumeration type 'UIBarButtonSystemItem' to different enumeration type 'UIBarButtonItemStyle'
Comment: The bar variable in the answer is any navigation bar that is not managed by a navigation controller. If you have a navigation controller, it has a navigation bar of its own that it manages -- in this case, each view controller that you push to the navigation controller should configure its own navigation item (which includes setting the rightBarButtonItem in its own navigationItem property).
Comment: For current readers, I do not believe there is any reason to call `[rightbutton release]` under ARC (which was not around at the time this comment was originally written).
Comment: @carbocation that's correct. The answer was written before ARC. I have updated the answer and removed the release lines
Comment: @carbocation actually you cannot call release under ARC. So yes, but even moreso ;)
Answer: The answers above are good, but I'd like to flesh them out with a few more tips:
If you want to modify the title of the back button (the arrow-y looking one at the left of the navigation bar) you MUST do it in the PREVIOUS view controller, not the one for which it will display.  It's like saying "hey, if you ever push another view controller on top of this one, call the back button "Back" (or whatever) instead of the default."
If you want to hide the back button during a special state, such as while a UIPickerView is displayed, use self.navigationItem.hidesBackButton = YES; and remember to set it back when you leave the special state.
If you want to display one of the special symbolic buttons, use the form initWithBarButtonSystemItem:target:action with a value like UIBarButtonSystemItemAdd
Remember, the meaning of that symbol is up to you, but be careful of the Human Interface Guidelines.  Using UIBarButtonSystemItemAdd to mean deleting an item will probably get your application rejected.
Answer: Adding custom button to navigation bar ( with image for buttonItem and specifying action method (void)openView{} and).
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(0, 0, 32, 32);
[button setImage:[UIImage imageNamed:@"settings_b.png"] forState:UIControlStateNormal];
[button addTarget:self action:@selector(openView) forControlEvents:UIControlEventTouchUpInside];

UIBarButtonItem *barButton=[[UIBarButtonItem alloc] init];
[barButton setCustomView:button];
self.navigationItem.rightBarButtonItem=barButton;

[button release];
[barButton release];

Answer: The example below will display a button with a title "Contact" on the navigation bar on the right. Its action calls a method named "contact" from the viewcontroller. Without this line the right button is not visible.
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Contact"
                                                                          style:UIBarButtonItemStylePlain target:self action:@selector(contact:)];;

Answer: In Swift 2, you would do:
let rightButton: UIBarButtonItem = UIBarButtonItem(title: "Done", style: UIBarButtonItemStyle.Done, target: nil, action: nil)
self.navigationItem.rightBarButtonItem = rightButton

(Not a major change) In Swift 4/5, it will be:
let rightButton: UIBarButtonItem = UIBarButtonItem(title: "Done", style: UIBarButtonItem.Style.done, target: nil, action: nil)
self.navigationItem.rightBarButtonItem = rightButton

Answer: Why not use the following:
(from Draw custom Back button on iPhone Navigation Bar)
// Add left
UINavigationItem *previousItem = [[UINavigationItem alloc] initWithTitle:@"Back title"];
UINavigationItem *currentItem = [[UINavigationItem alloc] initWithTitle:@"Main Title"];
[self.navigationController.navigationBar setItems:[NSArray arrayWithObjects:previousItem, currentItem, nil] animated:YES];

// set the delegate to self
[self.navigationController.navigationBar setDelegate:self];

Answer: swift 3
    let cancelBarButton = UIBarButtonItem(title: "Cancel", style: .done, target: self, action: #selector(cancelPressed(_:)))
    cancelBarButton.setTitleTextAttributes( [NSFontAttributeName : UIFont.cancelBarButtonFont(),
                                                          NSForegroundColorAttributeName : UIColor.white], for: .normal)
    self.navigationItem.leftBarButtonItem = cancelBarButton

    func cancelPressed(_ sender: UIBarButtonItem ) {
        self.dismiss(animated: true, completion: nil)
    }

How to add a button to UINavigationBar?


How does one translate "a fighting thing" and "a running away thing"?

Question: In the same way "a thinking thing" is translated into Latin to res cogitans, how would you translate in Latin "a fighting thing" and "a running away thing"?
Answer: The core question seems to be finding good verbs for fighting and running away; then it remains to form their participles just like in your example cogitare > cogitans.
I suggest taking a look at any of the several good online Latin dictionaries.
I will give two suggestions here, but I invite you to look at their dictionary entries and see if they fit your needs:

Pugnare is a good general verb for fighting, giving the participle pugnans.

Fugere means running away, and there are many prefixed versions (au-, re-, per-) for different nuances. Its present participle is fugiens.

The exact choice of verbs and whether you should have res or a plain participle or something else depends on the context.
If you can elaborate on how you want to use these translations, we can offer a more tailored response.
Comment: @JoonasIlmavirta thanks. The context: abstracting in a philosophical manner, on the model of the "res cogitans" vs the "res extensa", the fight-or-fly behavior of an animal. So, I assume you propose the "res pugnans" vs the "res fugiens", correct?
Comment: @AnsonīBōdo Yes, in that case *res pugnans/fugiens* sounds reasonable. There might be somewhat better verbs, but that choice is certainly reasonable and understandable.
Comment: @JoonasIlmavirta If you can propose an array of better verbs and their participles, I would be grateful.
Comment: @AnsonīBōdo Nothing better comes to mind now, but perhaps others can chime in. I just wanted to warn that there is no such thing as the one and absolute truth when it comes to translation and terminology. If these are not pre-existing terms, you have to define and describe them anyway and have some freedom of naming. My proposals are certainly within reason, but are easily trumped if there is precedent for other choices.
Answer: Different take, based on Wikipedia.
Fighting words are not fighting themselves but

are spoken words directed to the person of the hearer which would have a tendency to cause acts of violence by the person to whom, individually, the remark is addressed.

By analogy we can say that things do not think, fight or run away. Instead, they make a person or an animal do that.
So, instead of a participle construction, I would go for a combination with causa:

fighting thing - causa pugnae
running away thing - causa fugae
Comment: Hmm. Man is a *res cogitans*, so apparently a thing, a man, can think. Are you being thrown off by the English definition of thing, which often exclude animals? I do not think that *res* excludes animals. Animals, and even robots, can fight and flee.


Asked why about everything

Question: She is 3 1/2 and when she askes why it's even after you answer it but then she says why that color is red mostly about everything is but why... could their be something g wrong
Comment: I'm not sure what your culture is but in the US, a kid asking "why" over and over is so normal there's jokes about it.
Comment: Yes, it's completely and utterly normal!
Comment: At least she hasn't learned "Are we there yet?"
Comment: When she asks you "why", she isn't really asking why.  She is saying "talk to me".  My daughter was the same way.  She discovered this magic word that caused people to talk to her.  Don't worry about answering the actual "why", just talk to her.  That's all she wants.
Comment: @FrancineDeGroodTaylor I'd have to see some studies that back up what you're saying, because from personal experience I'd completely disagree with you. I'm 17 at the moment and my parents tried their hardest to answer all my questions when I was in my "Mr. Why" phase, and it must have inspired something within me because at a very (abnormally?) early age I was reading lots of non-fiction question and answer and other informative books and I feel it gave me a huge head start on all things interpersonal _and_ academic. I love that they sparked my curiosity from an early age.
Comment: @theonlygusti, I'm just passing on what our counselor told us when we asked why our daughter was continually asking "why" over and over, and was seemingly uninterested in the answer, but only used it as a launch point for another why.  He told us that at that age, the concept of "why" is beyond their understanding, and that most children observe that "why" is a magic word that "makes people talk to you".  I'm guessing that, unless you were a *very* unusual child, your effective "Mr. Why" age was a bit later than 3-1/2.  You may have been, but not everybody is.
Answer: This is absolutely normal. At that age children want to know everything, and they don't yet have enough experience to help them understand "why" so you are their source of information. Everything they get is from you.
They may or may not even listen to your answer, to be honest, as communicating with you and having you respond with anything will please many children. I used to enjoy making up stories to answer questions like, "Why is the sky blue?" that may not have had anything to do with the truth... :-)
Don't worry about it, instead, use it as an opportunity to communicate, to bond, and to play with your child.
Answer: First off, its normal.  Evidence: the picture below exists and causes knowing smirks and groans in parents.

As to why they ask why (oh gosh, why-ception is starting), the short answer is it is a magic word for more attention from mommy/daddy.
Remember, they are still learning to speak.  And part of learning speech is hearing and repeating.  And they heard you say it, so they try it out.  And oh my gosh that got a lot of talking out of you.  Which means attention and time with mom/dad.  Hooray!
They haven't gone through enough trial and error with it to know what that "why" word really means.  But they just know it gets you to keep talking, keep giving attention and they like it.
Eventually they figure out that "why" is how you ask for explanations about things, get insights into thought processes, etc.  But for now, it's a magic word1 that means more attention.  And that's enough for most toddlers.

1 Other magic toddler words that they just use without knowing what they mean to the rest of humanity include, but are not limited to: "no", "NO",
 "NOOOOOOOOOOOOOOOOOOO!!!!!!!!!!" and "potty" ("potty", "But this is your 73rd time before bed, you can't possible have anything left", "potty", "No, go to sleep", "POOOOOOTTTTTTYYYYYYYY", "Fine. Let's go." ":)").
Answer: "Why?" is in contention with "play with me" and "NO" for the most expected thing a comfortable three year old will say.
She has figured out that the most interesting things in her world are people. "Why", "Play" and "No" are words to conjure with, since they make adults pay attention and act in unexpected ways. If she didn't feel comfortable with her people and secure in her status she wouldn't use these attention attracting words. Of the three "Why" is least hassle, because most people can talk while continuing to do whatever.
It is a nice reminder that you have an opportunity to shape her mind. Almost certainly you know a lot of stories with a moral you approve of, this is the time to bring them out. A three year old isn't really expected to be able to hold onto the first why through even a short story, so you don't need to try too hard to stay on topic even.
"Why do cars have steering wheels?"
"Once upon a time cars had no steering wheels. One day a wolf and a dog met and started talking, the wolf said ...[story about sharing]"
If you don't have a stockpile of traditional stories you like at the tip of your tongue you can make your own; with a little practice extemporaneous shaggy dog stories staying vaguely on topic with anecdotes relatable to recent or major events in her life are not really that hard, and she probably won't be at all critical of your story telling abilities no matter how much you struggle at first.
Answer: A positive way to discourage "Why" is to turn it back on her, "Why do you think..." works best on the first or second why of the set. She'll still get the interaction with you, and you'll get to see how much she understands (& a break).

Asked why about everything


Minecraft - how can you teleport someone in an area to another area?

Question: I'm asking if there is a 3x3 area and if a player hits a specific part of that area can he be teleported to a similar 3x3 area I set up?
Comment: Sure you can, just use the teleporting command. But what are your restrictions? I assume there's more to this, otherwise you wouldn't ask.
Comment: Are you new to the teleporting command? There's lots of resources for you out there, but for the record the synax is /tp   . "target" can be @a, @p, @e, @s or @r (look inside a command block and see what they do). Then you have three coordinates after that, either set coordinates or by what'stheirface ~ ~ ~. The first ~ is X, the second is Y and the third is Z. Hit F3 and you'll see a little section saying "Block:" and then some numbers. Those are your coordinates. You can then use execute to detect when a player is standing on a block, then combine it with the tp command.
Answer: There are sub-components for commands. for instance: /kill @e[type=!minecraft:player].
the command you're looking for is /tp @a[radius=2] (coordinates of another platform)
just set the command block to "repeat" and "always active" and be on your way!!
note that the command block will have to be placed as that middle block. alternatively, extend the radius to 3 or 4.


Can Islam explain the gap in time between Muhammad and the oldest available manuscripts of the New Testament?

Question: If the idea of sending Quran through Muhammad was to replace the previously sent messages because they got corrupted later that means humans did not have the proper message to get guided between the time of the oldest available manuscripts of the New Testament and the Muhammad's time. There were a few centuries between these two and a few generations of people lived and died during this gap. Wasn't god serious about this issue? Is god serious about people having the correct message with them?
Comment: A period when there is no proper guidance is called fatrah, and it is mentioned in a hadith of the Prophet that people who died in that time will be tested on the Day of Judgement.
Answer: Is the idea of the Quran the replacement of the prior Message?
If the idea of sending Quran through Muhammad was to replace the previously sent messages because they got corrupted later...
The intention of the Quran is not to replace but to confirm the Torah and the Gospel.
3:3

He sent down to you the Book with the Truth, confirming what came before it; and He sent down the Torah and the Gospel.

And the intention of the Gospel was not to replace the Torah but to confirm and fulfill it.
5:46

In their footsteps, We sent Jesus son of Mary, fulfilling the Torah that preceded him; and We gave him the Gospel, wherein is guidance and light, and confirming the Torah that preceded him, and guidance and counsel for the righteous.

This is also confirmed in the tradition of the Gospel:
Matthew 5:17-18

Do not think that I have come to abolish the Law or the Prophets; I have not come to abolish them but to fulfill them. For truly I tell you, until heaven and earth disappear, not the smallest letter, not the least stroke of a pen, will by any means disappear from the Law until everything is accomplished.

The intention of the Quran
We cannot know the intention of God beyond what has been revealed but we can and ought to think about the sense (knowing that we do not know it).
The Quran repeatedly states that it is a clear guidance, a more familiar example among many other passages:
2:1-5

This is the Book in which there is no doubt, a guide for the righteous. (2) Those who believe in the unseen, and perform the prayers, and give from what We have provided for them. (3) And those who believe in what was revealed to you, and in what was revealed before you, and are certain of the Hereafter. (4) These are upon guidance from their Lord. These are the successful. (5)

Possible reasons for the Quranic revelation

Conversion of the last People of Abraham that had lost orientation and followed a clear polytheism (Instruction to the Arabs)

Confirmation of the essential law of the Torah. The Torah  had been revealed to the people of Israel. It has been subject to many interpretation by scholars. It was (and still is) unclear in particular to Christians who were not of Jewish origin to what extent they have to observe this law. The Quran gives a concise, partly simplified and partly altered instruction that is clearly directed to all people.

The Quran corrects a false interpretation of the Gospel where Christians confound Jesus with God (Instruction to the Christians)

The Quran confirms that Jesus is the Messiah (Instruction to the Jews)

Is God serious?
It's absolutely out of our competence to judge God. He is above all. He is the Creator, the Origin and the Destination of all, and He is the Judge.


Starting socket server in ruby on rails on cloud environments (heroku)

Question: I'm using heroku, and I can push a Ruby on Rails app just fine, I'm trying to convert this to a Socket server, basically I would need to bind to an open port, in this case, I know Heroku only does 80 22 and 443.
Is it possible to bind to port 80 on those environments?
Also, how would I setup the entry point for this socket server, all I know is that when script/server it boots up the app.
Do I have to put the function call there?  How can a socket server start instead of the rails app on top of whatever webserver heroku has.
Answer: Currently there's no way to route non-HTTP traffic to your app. Heroku binds Ruby web servers to various ports and hosts behind the scenes and then routes traffic to those processes based on the Host in your HTTP header. Requests lasting longer than 30s are assumed to be hung, and are terminated.
From a design perspective, long running queries present a significant performance problem. With a single dyno, any request that lasts 30 seconds (or even 2 seconds) is preventing any other user from accessing your site for the entire duration. Instead, a more performant design is to quickly serve a page in a base state and use a worker thread to process the content in the background while pulling results in via javascript. This can be done simply using modern web development tools.
In the event that you have a long-running process that you don't need to communicate with via a socket you can simply use a worker. I'd recommend a tool like MongoDB for storing results of computations and a library like Delayed::Job for queuing.
Having said all that, there are definitely reasonable use cases which demand longer running processes and non-HTTP traffic, but at the moment Heroku doesn't support them.
Answer: I don't think this is possible on Heroku. They don't support this kind of architecture and you have limited control over the kinds of things you can run in the environment.
Might be worth having a look at Node.js support just announced ... currently in Beta, but might give you something to work with.


Can 'take off' means 'start driving a car'?

Question: I have heard English speakers say 'take off' about leaving (starting to move) on a motorcycle sometimes. It's interesting to me that the expression which is used when an airplane is leaving the ground is used for motorcycle too.
But I'm not sure if the same expression can be used for cars (four-wheel automobiles).
Do native English speakers say 'take off' in a sense of 'begin to drive a car'?
Comment: Hi, welcome to ELL! Note that if you are asking about the phrasal verb, it is "take off" without the hyphen. And "sometimes" without the space.
Answer: We sometimes use take off in the sense of leave, without specific reference to the means of transport. I hadn't realised the connection to air travel until you mentioned it---they may be historically related, they may not be.
You could certainly imagine your friends who are about to leave your dinner party and walk home saying:

We're going to take off, I think; thanks for a lovely evening.

This makes it clear that there is no necessary link to a certain means of transport.
(And, by extension, you could also use it if you were about to drive home by car.)


Joins with SubSonic's REST handler

Question: I've just been playing around with the REST handler and frankly I love it. 0 lines of code and my data is accessible via HTTP? Got to love that. Anyway, the only thing I'm not sure of is whether or not I can access data from more than one table with a REST query via the REST handler. I have header records and data records with a one to many relationship but I'd like to retrieve them as one big splurge of XML. Is there a way I can specify a join via REST without creating views or similar in my DB?
Answer: Unfortunately you'll have to use a View for this - running joins in a URL doesn't scale too well :)
Comment: Thanks Rob, I thought it through and actually, I don't need the blob of xml I thought I did. It's cleaner and simpler if I just hit the tables for the data I need when I actually need it, rather than getting it all up front.
Answer: The whole idea of the client knowing about the URIs and how to build them for requesting joins is completely unrestful anyway. It's POX at it's best and is a poor choice of naming. I'd suggest removing the rest tag...

Joins with SubSonic's REST handler


Do non-Federation ships have holodecks?

Question: Is there any canon information about non-Federation ships having holodecks? I could definitely see Hirogen, Klingon, Kazon, and Jem'Hadar ships having holodecks, but I'm not sure about these or the vessels of other species.
Comment: It's implied that the holosuites at Quark's on DS9 were originally there.
Answer: At least three species have holodecks (or at least the ability to build holodecks) on their ships.
The Xyrillians encountered by the Enterprise NX-01 in ENT: "Unexpected" had some version of holodeck technology, though whether it worked on the same principles as Federation ships is unclear.
The Xyrillians later shared the holodeck technology with the Klingons (going so far as to install a holodeck on a battle cruiser), so at least one Klingon ship had a holodeck. It's not unreasonable to expect that future Klingon ships made use of holodecks.
Riker ends up on a simulation of a Romulan holodeck in TNG: "Future Imperfect", though that holodeck was supposedly situated on a Romulan base rather than a ship. Riker's lack of surprise at being on Romulan holodeck shows it's not improbable that ships had them as well.
Comment: @Izkata in the same episode. The Xyrillian ship was hiding in the Klingons' plasma wake, and the Klingons asked for holodeck technology as repayment for not destroying the Xyrillian ship after they found out
Comment: When did the Xyrillians have contact with the Klingons?  They only appeared in that one ENT episode as far as I know
Comment: Yeesh, I don't remember that part at all.  Must be longer than I thought since I saw ENT
Answer: A review of the psychology of the Alpha Quadrant would likely reveal the holodeck/holosuite technology is at least available to any species capable of warp travel to meet its power requirements, has replicator and transporter technology to create objects, and force field generation to produce the physical illusion of movement.

A deactivated holodeck showing just the empty room awaiting input from the user.
Whether they use it depends on their psychological, technological and cultural propensity for immersive virtual entertainment.

The Holodeck is an energy intensive technology using force fields, replicators and considerable computational capacity to create virtualized environments, complete with real-time sensory stimuli based on interpolated information from those environments.
With the power requirements, it makes sense such technology will be restricted to planets, space stations and starships with the capacity for excess energy and computational capacity to be available.

Having a starship does not mean a ship will have a holodeck. Dedicated warships will probably not have one, as such technology would be a drain on ship's resources and require personnel to maintain that technology. Of the primary races of the Star Trek series, some species are more likely to utilize the technology while underway than others.

Starfleet personnel use holodecks for training, diagnostics and recreation. Holodecks are used to recreate or simulate settings and events for analysis, such as to explore the forensics and logistics of a crime scene for law enforcement purposes, or for scientific experimentation.
In general, the holodeck "functions as a cultural repository of narrative possibilities that would normally be excluded from the ship's own socio-historical moment" and "allows the Enterprise community to include even that which it excludes by containing the excluded within a proper, controlled place which in no way intrudes upon the everyday space of the ship. -- Wikipedia, Holodeck

Federation ships whose crews maintain long rotations in deep space will likely have one. Since the ship is stationed far from Federation territory, a holodeck is an excellent psychological resource for maintaining crew morale.

Klingon ships, given the warlike nature of the Klingons and their relatively spartan lifestyles, would forgo such a luxury on their ships but might partake of the technology in a space station or during their shore leave. Klingons fight hard and party hard, but usually not at the same time. Hardship while underway would be considered part of a toughening ritual so the holodeck would likely be seen as an unnecessary luxury.
Cardassian ships are primarily warships and only the largest of them MAY have a holodeck onboard. Since Deep Space Nine had a holosuite facility, we know the Cardassians are familiar with the technology, but probably wouldn't use it on their ships for fear of softening their men. Rigidly disciplined, such technology would be reserved for the highest order of officers, and no one else.
Romulans have holodecks on their larger ships, used more than likely for the same psychological purposes as the Federation. Romulan warships would spend years patrolling territories under cloak. It would make sense they would have need of psychological training and outlets the holodeck makes possible.
Vulcans would likely have holodecks, but I suspect their use of them may be more for virtual experimentation of the type LaForge did during the Leah Brahms episode, Booby Trap, than personal enjoyment. Not saying Vulcans can't enjoy the physical benefits of a holodeck but I suspect they would be less inclined to admitting it.
Ferengi starships are likely to include holodecks since the Ferengi are at least partially hedonistic and adverse to leaving home without as many comforts as possible. Their ships are large and powerful ensuring there is plenty of energy for oo-mox.
We can assume the Jem'Hadar had no use for such technology as holodecks seeing how their entire existence was reserved for serving the Founders and engaging in battle on their behalf. They did not appear to have much in the way of imagination or personal lives, so the holodeck would be a technology they would have little use for, except perhaps for physical training purposes.
Comment: Given the extensive use of Quark's holosuites by Klingon visitors, we can assume they don't have regular access to them
Comment: The Jem'Hadar might use them for training. We know that the founders also have virtual reality tech.
Comment: After Voyager gave them the technology, the Hirogen used it for training.  Worf used the Enterprise holodeck the same, so other Klingons might as well
Comment: I did mention the Klingons WOULD use holodecks on station or on planet, just not on their ships. I did mention the Jem'Hadar might use them for training purposes.

Do non-Federation ships have holodecks?


Polynomial vs. Exponential Time Complexity

Question: Does $2^{log_2{n}}$ grow faster than a polynomial? I know that $2^{log_2{n}}$ can be simplified as $n$ but can it be considered as an exponential?
Comment: Welcome to Computer Theory SE! This is a collaborative website to discuss RESEARCH LEVEL questions in Theoretical Computer Science. Your question is definitely not of a research level, you might want to discuss it on another forum.
Answer: As you mention, $2^{\log_2 n} = n$, so it does not grow faster than every polynomial. It doesn't even grow faster than the polynomial $f(n)=n$. So it is not considered to be an exponential function in $n$. However, it is an exponential function of $\log_2 n$. When talking about the time complexity of an algorithm, we consider the running time as a function of the size of the input. So if your input is a single integer $n$, then the size of your input is $\log_2 n$ (since that is the number of bits needed to write $n$). Thus an algorithm with running time $2^{\log_2 n}$ in this situation would be considered an exponential time algorithm.


proof of commutativity of multiplication for natural numbers using Peano's axiom

Question: How do you prove commutativity of multiplication using peano's axioms.I know we have to use induction and I have already proved n*1=1*n.But I cant think of how to prove the inductive step.
Comment: I believe the real trick here is to choose your induction variable wisely. You have chosen to fix $n$ and prove that $n\cdot i = i \cdot n$ by induction on $i$. This might not be the easy approach. Two other approaches that stand out are to use induction on $n$ where the induction hypothesis is that $i\cdot j = j \cdot i$ for all $i, j$ with $i + j \leq i$, or alternatively for all $i, j$ with $\max\{i, j\} \leq n$. I would probably go for the diagonal case, together with what you already know (that $n\cdot 1 = 1 \cdot n$).
Answer: Show that if an operator $\star$ satisfies the defining equations for multiplication, i.e. $0 \star n = 0$ and $(m + 1)\star n = n + m \star n$, then $\star$ is multiplication (this is a straightforward induction).
Then show that the operator defined by $m \star n = n \times m$ satisfies the defining equations for multiplication, and therefore $m \star n = m \times n$, so $n \times m = m \times n$.
That is, show that $n \times 0 = 0$ and $n \times (m + 1) = n + n \times m$, and you're done.
Unfortunately, that's just not easy. $n \times 0 = 0$ is not too bad, you can use induction on $n$, but the only proof I have of the latter statement uses the associativity and commutativity of addition, which both have to be proven by induction as well.
Answer: Honestly, proving this using Peano's axioms is not very educational, however logically valid it may be. After pondering this question for too long a while, I finally just sat down and wrote out a proof which I haven't been able to find anywhere. Here it is:
First we need the definition of multiplication for natural numbers (which nearly nobody actually knows). For any two natural numbers $n$ and $m$, $n*m$ $\space$:= $\space$  $\underbrace{n+n+...+n}_m$ , and this definition is crucial to a structured view of mathematics. Now, by removing 1 from each summand and summing all those removals into a new summand, since there are $m$ summands, we obtain $\underbrace{(n-1)+(n-1)+...+(n-1)}_m + m$ , then, repeating the process with the old summands, we obtain $\underbrace{(n-2)+(n-2)+...+(n-2)}_m + m + m$, and we keep repeating the process until we obtain $\underbrace{(n-n)+(n-n)+...+(n-n)}_m + \underbrace{m + m+...+m}_n$ , which will happen because n is finite, and this result is identically $\underbrace{0+0+...+0}_m + \underbrace{m + m+...+m}_n$ $\space$ = $\space$ $0 +  \underbrace{m + m+...+m}_n$ $\space$ = $\space$ $\underbrace{m + m+...+m}_n$ $\space$ = $\space$ $m*n$ $\space \implies \space n*m$ = $m*n$ .
That proves multiplicative commutativity for any particular choice of $n$ and $m$. To prove multiplicative commutativity for ALL choices of $n$
 and $m$, we must show that $(n+1)*m$ = $m*(n+1)$, $\space$ $n*(m+1)$ = $(m+1)*n$,$\space$ and $(n+1)*(m+1)$ = $(m+1)*(n+1)$ $\space$ (the "for ALL" generality follows by recursion).
I created this account just to answer your question, so I hope you like that response.
Comment: This isn't responsive to the question, and it is kind of deranged to think that it is useful to answer a question by using a *definition* that "nearly nobody actually knows" (not sure you really think that, though).  You might as well answer a question about how to prove something in geometry using Hilbert's version of Euclid's axioms by giving a response that uses coordinates.
Comment: I realize this doesn't answer the question, I guess I got too excited. However, this is a much more useful response. I do believe that so few people know the definition of natural number multiplication because everybody I've ever asked doesn't know it, including PhD math professors conducting research, and almost everyone responds with ignorant dismissal, claiming the definition is arbitrary. What they're really saying is that they'd rather memorize math than make sense of it. I'm here exclaiming that this definition is very significant because it is useful and insightful.
Comment: No one who is asking how to prove something from Peano's axioms is preferring memorization to understanding.
Comment: Thanks, Joseph; I enjoyed your answer. Not sure why the other commenter appears to be infuriated at you. Doesn't seem very nice.
Answer: Using the following Peano-like axioms to define + (addition), · (multiplication) and 1, where x and y are variables of type natural number and S denotes the successor function: (Note: Ax. is an abbreviation for "Axiom".)
Ax. x + 0     =   x
Ax. x + S(y)  =   S(x + y)
Ax. x · 0     =   0
Ax. x · S(y)  =   x  +  x · y
Ax. 1 = S(0)
One may then prove that · is commutative by first establishing the following theorems:
Th. (0) S(x) = x + 1 (does not require induction)
Th. (1) + is commutative (i. e. x + y = y + x)
Th. (2) 0 · x = 0
Th. (3) 1 is a left identity of · (i. e. 1 · x = x)
Th. (4) · right-distributes over + (i. e. (x + y) · z = x · z + y · z)
Theorem (1) can be proved easily by induction over y if you first establish the theorems 0 + x = x and S(x) + y = S(x + y). (Which may both be shown by induction) Theorem (4) may be proved by induction over z. (Just saying in case it is not evident.)
And then the proof of multiplication's commutativity by induction over y can go like this: (Hints for the justifications of each successive manipulation are indicated between curly brackets.)
The base case: x · 0 = 0 · x

    x · 0
= { First multiplication axiom }
    0
= { Theorem (2) }
    0 · x

Now, by postulating that the induction hypothesis x · y = y · x is true for some natural number y, we may prove that x · S(y) = S(y) · x is implied:

    x · S(y)
= { Second multiplication axiom }
    x  +  x · y
= { Induction hypothesis }
    x  +  y · x
= { Theorem (3) }
    1 · x  +  y · x
= { Theorem (4) }
    (1 + y) · x
= { Theorems (1) and (0) }
    S(y) · x

And that completes the proof.


Why do elementary row operations preserve linear dependence between matrix columns?

Question: I know that I can find a basis for the column space of a matrix $A$ by reducing the matrix to reduced row echelon form $J$. The columns of $A$ corresponding to the linearly independent columns of $J$ then form a basis for $Col(A)$, because linear dependence is preserved under elementary row operations. I can't figure out why this is true though, and a google search returns nothing, so I'm sure it's simple. Can someone give me a proof?
Comment: Elementary row operations do not change the row space of a matrix but they *do* change the column space; only the *dimension* of the column space is preserved.
Comment: Elementary row operations are invertible. If $S$ is vector space and $A$ an invertible linear operator, then $\dim S = \dim A(S)$.
Answer: Let's start out from the standard basis $e_1,..,e_n$. Let $a_1,..,a_k$ be the column vectors of $A$.
Check that the step on rows $r_i':=r_i+\lambda\,r_j$ corresponds to the basis transformation $e_j':=e_j-\lambda\,e_i$, that is, for a vector $v$ we have
$$v=\sum_i\alpha_ie_i=\sum_i\alpha_i'e_i'$$
where the row transformation is made for the coordinate vector
$\pmatrix{\alpha_1\\ \alpha_2\\ \vdots} \leadsto \pmatrix{\alpha_1'\\ \alpha_2'\\ \vdots}$.
So, in this interpretation the column vectors all "stay" where they are in the $n$ dimensional space, but we keep on changing the basis. Of course, the vectors stay (in-)dependent. The crucial thing here is that we get another basis when applying (the inverse of) each step of the row transformation.
Answer: Here is a geometric way of looking at it (it's not a rigorous proof, but gives a nice way to understanding, non-algebraically, why it's true): The geometric meaning of the determinant of a matrix is that it is the algebraic volume of the parallelepiped spanned by the columns (or rows) of the matrix (algebraic volume means that the volume can be negative, depending on the orientation of the parallelepiped). By volume here we mean $n$-dimensional volume. Thus, the determinant is $0$ iff the volume is $0$ iff the columns span a degenerate parallelepiped iff the columns (rows) are dependent.
Now, row operations have clear effects on the parallelepiped. Interchanging rows just reverses the orientation. Non-zero scalar multiplication lengthens or shortens the parallelepiped in one direction. Adding a row to another one happens in a two dimensional section of the entire space. Intuitively, all of these operations can't turn a degenerate parallepiped into a nondegenerate one, or vice versa. Thus, preserving the non-vanishing of the determinant.
Answer: For this example, let hypothetical matrix $A$ be 3x3.  Let the columns of $A$ have a linear dependence relation satisfied by a non-zero vector $\mathbf{x}$: $ \ x_1\mathbf{a_1}+x_1\mathbf{a_2}+x_1\mathbf{a_3}=\mathbf{0}$.  Here, $\mathbf{a_1}, \mathbf{a_2}, \mathbf{a_3}$ are column vectors of $A$ and $x_1, x_2, x_3$ are the elements of $\mathbf{x}$.  This can be written in a few equivalent ways:
$$
\left[
  \begin{array}{ c }
     a_{11} \\ a_{21} \\ a_{31}
  \end{array} \right]x_1 +
\left[
  \begin{array}{ c }
     a_{12} \\ a_{22} \\ a_{32}
  \end{array} \right]x_2 +
\left[
  \begin{array}{ c }
     a_{13} \\ a_{23} \\ a_{33}
  \end{array} \right]x_3=\mathbf{0}  \ \Leftrightarrow  \
\left[
  \begin{array}{ c c c }
     a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33}
  \end{array} \right]
\left[
  \begin{array}{ c }
     x_1 \\ x_2 \\ x_3
  \end{array} \right]=\mathbf{0}$$
which is the same as
$$a_{11}x_1+a_{12}x_2+a_{13}x_3=0 \\ a_{21}x_1+a_{22}x_2+a_{23}x_3=0 \\ a_{31}x_1+a_{32}x_2+a_{33}x_3=0$$
Now, recall the three elementary matrix row operations:

Interchange: interchanging two rows
Scaling: multiplying all entries in a row by a nonzero constant
Replacement: replacing one row by the sum of itself and a multiple of another row.

Individually, each row operation preserves the linear dependence relation.  Any sequence of row operations also preserves the linear dependence relation.  To illustrate, let's sequentially do row interchange, scaling, and row replacement:
Interchange (e.g. swap rows 1 and 3):
$$a_{31}x_1+a_{32}x_2+a_{33}x_3=0 \\ a_{21}x_1+a_{22}x_2+a_{23}x_3=0 \\ a_{11}x_1+a_{12}x_2+a_{13}x_3=0$$
This doesn't change the dependence relationship, only the order of the equations and therefore the column appearance:
$$
\left[
  \begin{array}{ c }
     a_{31} \\ a_{21} \\ a_{11}
  \end{array} \right]x_1 +
\left[
  \begin{array}{ c }
     a_{32} \\ a_{22} \\ a_{12}
  \end{array} \right]x_2 +
\left[
  \begin{array}{ c }
     a_{33} \\ a_{23} \\ a_{13}
  \end{array} \right]x_3=\mathbf{0}$$
Scaling (e.g. multiply row 2 by constant $c$):
$$a_{31}x_1+a_{32}x_2+a_{33}x_3=0 \\ c(a_{21}x_1+a_{22}x_2+a_{23}x_3)=c0=0 \\ a_{11}x_1+a_{12}x_2+a_{13}x_3=0$$
The linear dependence relationship for the second equation is preserved. Scaling is a linear transformation and by definition, $cT(\mathbf{u})=T(c\mathbf{u})$, which equals $0$ in this case. (Here, $\mathbf{u}=$ the 1x3 matrix $[a_{21} \ a_{22} \ a_{23}]$.)
This system of equations can again be written as a column matrix equation:
$$
\left[
  \begin{array}{ c }
     a_{31} \\ ca_{21} \\ a_{11}
  \end{array} \right]x_1 +
\left[
  \begin{array}{ c }
     a_{32} \\ ca_{22} \\ a_{12}
  \end{array} \right]x_2 +
\left[
  \begin{array}{ c }
     a_{33} \\ ca_{23} \\ a_{13}
  \end{array} \right]x_3=\mathbf{0}$$
The linear dependence relationship of the columns is preserved (we haven't done anything to alter the values of $x_1, x_2, x_3$).
Replacement (e.g. replace the current row 3 by ($d$*Row 1 + Row 3)):
$$a_{31}x_1+a_{32}x_2+a_{33}x_3=0 \\ ca_{21}x_1+ca_{22}x_2+ca_{23}x_3=0 \\ d(a_{31}x_1+a_{32}x_2+a_{33}x_3)+(a_{11}x_1+a_{12}x_2+a_{13}x_3)=d0+0$$
The last equation $=(da_{31}+a_{11})x_1+(da_{32}+a_{12})x_2+(da_{33}+a_{13})x_3=0$. This might not look like it necessarily has to equal zero, but all we've done is scale and add (perform individual linear transformations), and by the definition of linear transformation, $dT(\mathbf{v})+T(\mathbf{w})=T(d\mathbf{v+w})$, which again equals $0$ in this case.
The resulting column matrix equation is
$$
\left[
  \begin{array}{ c }
     a_{31} \\ ca_{21} \\ da_{31}+a_{11}
  \end{array} \right]x_1 +
\left[
  \begin{array}{ c }
     a_{32} \\ ca_{22} \\ da_{32}+a_{12}
  \end{array} \right]x_2 +
\left[
  \begin{array}{ c }
     a_{33} \\ ca_{23} \\ da_{33}+a_{13}
  \end{array} \right]x_3=\mathbf{0}$$
Even though the columns look very different from those in matrix $A$, the linear dependence relation of the columns is preserved, because of our basic row operations (linear transformations).  This can be continued until reaching reduced row echelon format, $J$.
Columns that were linearly independent in $A$ remain so, and columns that were linearly dependent remain so. Equivalently, columns which form a basis in $J$ correspond to basis columns in $A$.  The column spaces are not identical, but the column linear dependence is preserved.
Answer: Take your m x n matrix A, row reduce it to A', and determine that its rank is r. Form a new m x r matrix B' from the linearly independent pivot columns of A'. Note that the rank of B' is also r. Now run your row reduction sequence backwards on B' to produce B, which is composed of the original pivot columns of A. The rank of B is also r, which means that the r columns of B are linearly independent.
Answer: I just wanted to add one very fast proof that I find easy and useful. Noting $r_i$ the rows of a matrix $A\in \mathbb R^{m\times n}$ we can denote as matrix $A_{1}$, the matrix $A$ after the row operation $r_i' = r_i + kr_j$ for some $k\neq 0$. We know that the columns of $A$ are linearly independent iff $A\boldsymbol{x}=0 \implies \boldsymbol{x}=0, \quad \boldsymbol{x}\in \mathbb R^n$. Then, by proving $A\boldsymbol{x}=0 \iff A_{1}\boldsymbol{x}=0$ , we actually prove that the columns of $A$ and $A_{1}$ are similarly dependent or independent.
$A\boldsymbol{x}=0\iff
\begin{cases}
r_1\boldsymbol{x}=0 \\
\vdots \\
r_i \boldsymbol{x}=0 \\
\vdots\\
r_j\boldsymbol{x}=0\\
\vdots\\
r_m\boldsymbol{x}=0
\end{cases}
\iff
\begin{cases}
r_1\boldsymbol{x}=0 \\
\vdots \\
r_i\boldsymbol{x}+kr_j\boldsymbol{x}=0 \\
\vdots\\
r_j\boldsymbol{x}=0\\
\vdots\\
r_m\boldsymbol{x}=0
\end{cases}
\iff
\begin{cases}
r_1\boldsymbol{x}=0 \\
\vdots \\
(r_i+kr_j)\boldsymbol{x}=0 \\
\vdots\\
r_j\boldsymbol{x}=0\\
\vdots\\
r_m\boldsymbol{x}=0
\end{cases}\\
\iff A_{1}\boldsymbol{x}=0$


What would it take to knock a whole planet to 90 degrees of inclination relative to the sun?

Question: Pluto is inclined in a way that makes it slightly off the orbital plane of all the other planets and sun. Could you have a planet that was inclined at 90 degrees, or at least close to that? What would make something like that happen (i.e. it collided with something and somehow the force was enough to take it all the way up to that type of orbit, or could it be a captured planet?) A planet couldn't form that way from the protoplanetary disk, could it? If something crashed into it hard enough to make it do that, how big would the planet orbiting have to be? The thing that crashed into it?
Comment: Are you asking about the angle of the planet's rotation (like Uranus, which rotates on its side) or of its orbit (like Pluto)? I don't think collisions are very relevant to the latter.
Answer: Rogue planets are a likely cause: a planet formed around another star, flung out of orbit by a supernova or the passing of another large star or some-such, and then captured by the sun. They could end up at any angle.
Answer: Perhaps two suns collide, each with planetary disks at right angles to each-other, their planets captured by the resultant bigger star.
Comment: @JDlugosz Okay. Seemed natural to me - if they are two distinct answers, then two distinct posts surely? Only one can be accepted http://meta.stackexchange.com/questions/25209/what-is-the-official-etiquette-on-answering-a-question-twice
Comment: It is very unusual to post two separate answers.  You should list both under one post.
Answer: I don't think this is possible via a collision. The amount of energy it would take to alter the orbital plane this much would be well in excess of the planet's gravitational binding energy: it would come apart and the debris would disperse.
It's conceivably possible via a capture of a rogue planet, ejected from another star system, or by perturbation from a star passing close by. The later will likely change the orbits of everything orbiting our star.
Comment: How does your second paragraph not have the same issue as the first?  The amount of energy needed to alter the asis is the same no mqtter how it's supplied.
Comment: @JDługosz: I think the issue is not the same in both cases. When the energy all comes from a collision, it arrives all at once in a single big event. A close passing star would perturb the orbit more gradually, and since it's a gravitational effect, all the things on the planet would be pulled by the same force. Only if the tidal forces of the passing star were so great would the planet break up (and if the star came that close, good luck orbiting anything any longer).
Comment: I think the time of close approach is still *fast enough* to be a problem.  The planet won't shed the excess energy in a few days. It takes **thousands of years** to be gentle enough.
Answer: That no one mentioned Uranus? Shame on you! (not including you, Blackknght)
The fact is, we have just such an example in our solar neighbourhood. Unfortunately, a lot remains unknown about the icy giant. But there was a theory that early on the planet was hit by a protoplanet (a precursor to the planets we call neighbours today) near its magnetic north (I think, don't quote me on that) pole.
Comment: The question seems to be asking about orbital inclination, not axial inclination, as far as I can tell.
Comment: Ah. My bad, I understood axial. Should Renny agree with you on this, I'll gladly delete my answer, to not confuse any other potential answer givers.
Answer: While still not totally clear if the question ask for an inclined orbit or an inclined rotation, I will offer my two bits for both questions possible.
Orbit
First, Pluto for example - while no one yet was able to reconstruct what happened after all as far as I know - can have several major options to get his orbit after all.
I can think of the possibility that he didn't start his carrier as a planet(like object) after all, but was a giant moon of one of our gas giants for some time, until... good question. But if he had a huge altitude every time his parent planet hat its closest approach to another gas giant, a tiny momentum of pull might have happened. I have to admin that this scenario is pretty unlikely, but still...
At one point he might just got the notch to make him escape his parent planet after all and went off for adventures of his own. Maybe he would dwell around between Jupiter and Saturn for some time, until he get a random gravity assist (break or accelerate) that would change his orbit  once more. And because its unlikely that he went in exactly at the same plane as the pushing random gas giant, he got a free of charge lift away from the planets plane after all.
A wild theory, I know.
Other options were named here already: a "small" celestial body like Pluto could get thrown off course by an impact, especially if this happens at his descending or ascending node (where its effect would be most effective). He could have met a rouge planet aeons ago, that stole some orbital speed away so orbit became eccentric and/or inclined.
And last but not least, it could be a huge alien structure hauled to this place a long time ago; as soon as it detects ftl travel from earth, it will call in a huge artillery strike at this location because the aliens don't want us fooling around in that peaceful galaxy.
Rotation
To be honest, I can't offer much to this topic. Still, a huge impact may have the ability to add a minor vector to the spin, but that wont work with huge planets.
Further what I will call "bowling ball effect" because I cant recall the scientific name may. A minor or major spot of heavy whatever located way outside the rotational center will cause some... well, it wont rotate as good as before. Can be supplied by random impact encounters. Now add some moons and a non circular spin and... well, maybe not.
For Uranus I can offer a theory someone who claimed to be studying astronomy told me years ago. After all, even we on earth are afraid that our magnet field will shift some day. Some say this is caused by the core who think it might be a good time to change its rotation. However, because we are sitting on a pile of heavy molten stone and metal, the magnetic field alone wont be enough to have a huge impact on rotation direction. BUT if you are a piece of gas (in different forms), sudden change of the cores rotation direction may be able to pull the light stuff at the outside hard enough to make it copy your new way of spinning, just by applying magnetic forces. Chances are good that  below the surface metallic hydrogen still is spinning the way it did some aeons ago. But this should cause atmospheric trouble beyond imagination...
Up to this day I never heard this last theory again, so use with caution.
So... happy planet spinning. Oh, you might use the universal sandbox to find out if the "from moon to planetoid with shitty orbit" explanation from me can be true; I do no have this toy sadly.
Answer: Without large close moons, the axis can be torqued gradually due to other bodies naturally.  I've seen animations that show that without the moon Earth would wobble beyond 90° over billions of years.  The same seems to be true of Mars.
As for forming, you have angular momentum in each piece's rotation and orbital motion.  When they collide the hit might be at any point on the body near the pole, perhaps.  This changes the vector at which torque is referenced and the same closing velocity could impart a spin in any direction.
The accretion tends to go with the general flow on average. But the last few big things coming together can show the result of luck, as with Venus.  Just look at how much angular momentum you can impart with a collision, and compare that with the spinning posesed by both bodies already.
For changing the asis of an already formed planet, you need to look at precession over a long time, not a quick job.
I really recommend the SETI Weekly Seminar series for learning about stuff like this. There have been many presentations on planet formation and planetary system dynamics.


Was bedeutet hier "aber"?

Question:
Du hast aber Muskeln!
Das hast du aber verdient!
Das geht aber nicht!
Comment: Possible duplicate of [How can I translate the adverb "doch" in sentences?](http://german.stackexchange.com/questions/12228/how-can-i-translate-the-adverb-doch-in-sentences)
Answer: Welcome to the wonderful world of German Abtönungspartikeln. They express succinctly what would otherwise require a lot of circumstantial words, or a particular inflection of voice that doesn't translate well to the written word. Here's an approximate illustration of the effect of aber:

Du hast Muskeln = You've got muscles. (neutral)
Du hast aber Muskeln! = My, what big muscles you've got! (astonished)
Answer: "aber" basically means "but". In those cases (at least in the first one) there is no real translation, adding those filler words expresses astonishment.
You have great muscles.
You do deserve that.
No way, that's not possible.
In the third case, it can also be used to express "I've understood what you've said, BUT I have a different opinion."
I've understood your idea, but it's not possible to do it like that.
Comment: You DO deserve that.
Answer: You could also translate aber with really in those cases to emphasise the meaning of astonishment or, e.g. in the first sentence, admiration. The second sentence could also express a supportive attitude among friends. The last sentence also negative or complaining attitude, e.g. grannies being mad about what a young person did.

Du hast aber Muskeln.
You really have muscles.
Das hat du aber verdient.
You really deserve that.
Das geht aber nicht.
That's really not possible. / That really doesn't work.
Answer: I'd personally say that it emphasizes a point in the sentence. For example:

Du hast aber Muskeln!

[But] you do have muscles!

Das geht aber nicht!

[But] that doesn't work!

Was bedeutet hier "aber"?


What if you don't feel like you'r the same person when you'r committing a sin?

Question: What if you feel like your not the person you are when you commit a sin meaning if I committing a sin I don't feel like it's me doing it but then after I realized it is me. I don't understand why it's like that because I never in my senses when I am committing a sin and I regret it right after and hate myself. But I always felt that its not me that is doing it, like I always feel like someone is controlling me and I cant stop them. After I always feel guilty for not stopping myself from committing a sin?
Answer: First of all understand that everyone is on a different path. Some have easy, some have difficult and some have something in between. Allah created free will. Allah does what he wants, what's good and best for all his creation. He does not necessarily announce forgiveness.
You should keep a positive intention when you think you are commiting a sin, and if it becomes a sin, repent. Following Allah's commands is easy, difficult or somewhere in middle according to what he has planned for you. You should not worry too much. Just your intention is enough as the prophet said, just the intention of doing a task is better than doing the task itself.
Comment: Honestly that helped me a-lot, thanks a lot for the fist question and also for the second  questions.
Answer: There is not a single person who doesn't sin. Period.
Believe me, I've been in your place countless amount of times.
Did I really just do this? Did I really just do that? How will god ever forgive me? Is there even hope for a man like me?

Allah says:

If the disbelievers knew about my mercy, none of them would ever think they would be able to enter hell. If the believers knew how strong my punishment is, none of them think they would ever be able to escape hell.

Allah also says:

Oh my slaves. If your sins reached the heavens, and you don't associate partners with me in Ibadah, and you're asking for my forgiveness, I will come to you with mercy and forgiveness that match your sins. My slave, if you were to ignore me, neglect me, sin, never pray, become the worst person, the worst, the filthiest person—the biggest criminal. And once, only once, in your life, something enters your heart, and you say to me ya Rabb! I will respond, "yes my slave. What do you want?"

Never think the mercy of Allah will run out.
That guilt you face, cherish it. It shows you still have faith. It shows you're not a victim to the harden heart. The heart that wouldn't feel remorse over disobeying it's Lord.
You still have that remorse, don't ever let that heart harden, or else you'll never feel bad for disobeying your Lord, and will never repent.
Never think you shouldn't repent after sinning, nor decide to wait because you feel too dirty. That's the trick of the Shaytaan. He wants you to think "Oh, Allah will be too mad at you to accept your forgiveness. Repent later, you're too dirty." No! Repent now! Who says you have the next second to live?
I have watched numerous of Islamic videos over forgiveness, repenting, and the mercy of Allah. It has really improved my overall mentality whenever I sin and feel bad. Now I know Allah is here for me, and awaits my repentance whenever, even when you intentionally sin, never think Allah won't accept your repentance.
When you sin, quickly follow it up with a good deed. And the best thing to do after sinning is to recite the Shahada. Saying this will replenish your faith, it will clean your heart. It's like dipping a hot metal rod inside a bucket of ice. That's how much the Shahada would make an impact.


Black body radiation before Hertz's observation?

Question: From the timeline of Maxwell's prediction 1865 and Hertz's observation in 1887 that gave an understanding of the light wave as EM wave, How did the Black body radiation study understand the emitted radiation as what at that time since the timeline of Black body radiation was also in 1890s? Did they know that the radiation is EM wave? Or how did they understand the radiation that emitted?
Comment: See Wikipedia's history sections [on black-body radiation](https://en.wikipedia.org/wiki/Black-body_radiation#History) and [on optics](https://en.wikipedia.org/wiki/History_of_optics#Renaissance_and_Early_Modern). There were two competing theories of light since 17th century. Newton's corpuscular optics (light as rays of particles) dominated until early 19th century when it was displaced by Young's and Fresnel's wave optics (light as waves in [luminiferous aether](https://en.wikipedia.org/wiki/Luminiferous_aether#Wave-theory_triumphs)). Fresnel specifically discussed black-body radiation.
Comment: @Conifold Fresnel did not have the concept of blackbody. He just made some arguments against Newton's corpuscules in terms of conversion of light into the now deprecated idea of caloric.
Answer: This is a new rewritten answer, after diving more into the contemporary references and finding some modern references. I deleted my old answer, which had information about black body radiation experiments, because this is essentially a new answer.

By the 1850s, the idea that heat radiation was the same as light was gaining increasing favor. It obeyed the same properties as light radiation (reflection, refraction, polarization, double refraction, interference) and sources of heat radiation were always closely connected with sources of light. Prior to these developments, heat radiation was understood phenomenologically, although its connection to light was suspected from the late 18th century. An excellent reference for the history up to the year 1800 is:

E.S. Cornell M.Sc. (1936) Early studies in radiant heat, Annals of Science, 1:2, 217-225, DOI: 10.1080/00033793600200171

From the conclusion to that paper:

Thus, before 1800, the existence of invisible heat rays had been generally accepted. It was known that these rays were propagated practically instantaneously and in straight lines, and were reflected according to the same law as that followed by light rays. It was suspected that they could also be refracted like light. Because of these similarities between the rays of heat and light, a close connection between the two was suspected, and [James] Hutton went so far as to maintain that the invisible heat rays were invisible light. The majority of scientists, however, bearing in mind the different absorption effects of glass on the rays of heat and light from the fire, now well known, preferred to reserve their judgment and used the terms "Obscure Heat" or "Radiant Heat" or "Radiant Caloric" for the invisible heat rays. There were two theories prevalent as to the nature of the invisible heat rays: -- (1) That they were a material emanation, and (2) that they were vibrations in an all-pervading heat fluid. Of these, the former was the more commonly held. Moreover, the reflection of cold had been clearly demonstrated, and satisfactorily explained by Prevost's theory.
This was the state of the subject when Sir William Herschel made his discovery of the ifra-red heating rays in the solar spectrum in 1800. (p. 225, emphasis mine)

Herschel's discovery of radiant heat in the sun's spectrum led to the publication of Experiments on the solar, and on the terrestrial Rays that occasion Heat; with a comparative View of the Laws to which Light and Heat, or rather the Rays which occasion them, are subject, in order to determine whether they are the same, or different. (Phil. Trans. 90, 1800) (link to part 1 on HathiTrust). He says in the introduction,

I must also remark, that in using the word rays, I do not mean to oppose, much less to countenance, the opinions of those philosophers who still believe that light itself comes to us from the sun, not by rays, but by the supposed vibrations of an elastic ether, every where diffused throughout space; I only claim the same privilege for the rays that occasion heat, which they are willing to allow to those that illuminate objects. For, in what manner soever this radiance may be effected, it will be fully proved hereafter, that the evidence, either for rays, or for vibrations which occasion heat, stands on the same foundation on which the radiance of the illuminating principle, light, is built. (p. 294, emphasis mine)

This may seem like a decisive moment, but in fact the question was far from settled - discussions of Herschel's conclusion extended into the 1830s. The term "calorific rays" or "calorific radiation" was popular, if you'd like to dig up some sources from the period. See for example:

Powell, Baden (1825) An Experimental Enquiry into the Nature of the Radiant Heating Effects from Terrestrial Sources. Phil. Trans. 1825 p. 187. (Link)

It was the experiments between 1830 and 1850 performed by the likes of Ampere, Forbes, Melloni, and others, that helped the heat-rays-as-light theory gain favor. In the 1840s, Faraday was also proposing ideas that could be considered the beginnings of the electromagnetic theory of light. Simultaneously, the classical theory of thermodynamics was taking shape.
From a practical perspective, the question of what heat rays were (light, particles, other rays with their own aether, a combination of multiple effects) was less important than how the heat rays behaved thermodynamically, in particular with regards to thermodynamic equilibrium and the second law of thermodynamics. Now hopefully the information in my previous answer will make more sense.
Prevost (1791) postulated his theory of heat exchange, stating that every body radiates heat, and receives radiant heat from other bodies. From Pictet's experiments with heat radiation (1790), it was known that radiant heat could be reflected and focused, like light. Wollaston (1802), then later von Fraunhofer (1817), had discovered that the visible spectrum of the sun had dark lines (now called Fraunhofer lines), some of which aligned well with the spectral lines emitted by laboratory light sources. Sir John Herschel (1823) and William Hallows Miller (1833) experimented with passing the solar spectrum through gases and observing the resulting spectrum; additional dark lines which appeared were attributed to the absorption of radiation by the gases. Foucault (1849, 1860) demonstrated two important facts: (1) that an electric arc produces light of the same wavelength as what was known as the D line in the sun's spectrum, and (2) when light from a more uniform radiator was passed through this arc, a dark D line also appeared, indicating that the arc was both emitting and absorbing the same wavelength of radiation. Balfour Stewart (1858) performed experiments with rock salt and concluded that the radiating power of every kind of substance is equal to its absorbing power, for every kind of ray of radiant heat. [Whittaker, vol. 1, ch. XII].
Indeed, theories of black-body radiation using Maxwell's theory of electromagnetic light didn't come about until the late 19th century into the early 20th century, with e.g. the Rayleigh-Jeans law, but by this time Hertz's experiments had already demonstrated the existence of electromagnetic waves and classical electrodynamics was reaching maturity.
Comment: Thank you !!!!!


Scalar product between Fock states

Question: Suppose to have a chain (of size $L$) with bosons, and $\hat{a}_i^\dagger$,$\hat{a}_i$ are the associated creation and annihilation operators at site $i$. A Fock state can be written as:
\begin{equation}
| n_1 \dots n_L \rangle = \prod_{i} \frac{1}{\sqrt{n_i!}} \left( \hat{a}_i^\dagger \right)^{n_i} |\rangle
\end{equation}
where $|\rangle$ is the empty state. Now we define a new set of bosons:
\begin{align}
\hat{b}_{k} &= \frac{1}{\sqrt{L}} \sum_{j} e^{-ikj} \hat{a}_j &
\hat{b}_{k}^\dagger &= \frac{1}{\sqrt{L}} \sum_{j} e^{ikj} \hat{a}_j^\dagger
\end{align}
where $k$ are such that some boundary condition is fulfilled. Now a Fock state can be written as:
\begin{equation}
| \dots \tilde{n}_k \dots \rangle = \prod_{k} \frac{1}{\sqrt{\tilde{n}_k!}}
\left( \hat{b}_k^\dagger \right)^{\tilde{n}_k} |\rangle
\end{equation}
The question is: is there a simple formula to express or compute the scalar product
$\langle \dots \tilde{n}_k \dots | n_1 \dots n_L \rangle$?
Comment: Do you mean the scalar product $$ or $$? Introduction of some different notation for the new bosons would help, eg. $|n_1' \ldots n_k' \ldots >$.
Comment: You are right, I edited the question and changed the notation. Anyway, the question is about Fock states in different bases otherwise the answer would be trivial. And of course the two states have the same number of bosons: $\sum_k \tilde{n}_k = \sum_j n_j$.
Comment: You can easily make $< new | original > = \sum c_{\ldots} < original | original >$ by substituting the definition of new creation / anihilation operators in $< new |$.
Comment: If I use your recipe I get:
\begin{align}
\langle \dots \tilde{n}_k\dots |n_1 \dots n_L \rangle & = \langle | \prod_k
\left( \hat{b}_k \right)^{\tilde{n}_k } |n_1 \dots n_L \rangle \\
& = \langle | \prod_k
\left( \frac{1}{\sqrt{L}} \sum_j e^{-ikj} \hat{a}_j  \right)^{\tilde{n}_k }
|n_1 \dots n_L \rangle
\end{align}
even if now it is quite straightforward which are the terms that survive (the ones that annihilate $|n_1 \dots n_L \rangle$ ) I'm not able to find a "clean" and  useful equation ... :(
Answer: Define the operators $\hat a(f)=\sum f_j\hat a_j$ and $
|f_1,...,f_n\rangle:=\hat a(f_1)...\hat a(f_n)|vac\rangle$.
Then $\langle g_1,...,g_m|f_1,...,f_n\rangle$ vanishes for $m\ne n$
and is a sum of the products
$\langle g_1|f_{j_1}\rangle...\langle g_n|f_{j_n}\rangle$ for all possible permutations $(j_1,...,j_n)$ of $1,...,n$. Note that the $\langle g|f\rangle$ are easy to compute.
The formula you requested is a special case of this.
Comment: Ok, thank you very much (which is actually the answer I would got expanding the equation which is in the comment I wrote just above). I have to deal with the computation of all the possible permutations...I will let the computer do it for me...:)
Answer: I realise the question has already been answered, but just a suggestion to the topic starter: finite sums of the form $(\sum_i x_i)^N$ are expanded using objects called multinomial coefficients. They should make your life a little easier.

Scalar product between Fock states


Run your Linux (graphics) completely on Nvidia dedicated graphics card?

Question: I'm running an Arch and I've had a hard time for some months trying to figure out how to run my Optimus Laptop completely on Nvidia dedicated GPU. How do I do this? I've heard there are multiple options out there but I don't know how to pull it off! So how do I get to enjoy my powerful NVIDIA GeForce GTX 1650 Ti Mobile on Linux?
Any ideas or setups that might help me to run any GPU-related task on my Nvidia GPU?
Answer: I had this problem for some time till I discovered a utility to do it all. You can use the ArchWiki to see how an Optimus Laptop works.
And then you have multiple options, but I suggest running the optimus-manager if you are using external screens as well, and you want to use the intel graphics while on battery power.
This is the output that optimus-manager --statusshould give if you're running completely on the NVIDIA card:
optimus-manager --status
Optimus Manager (Client) version 1.4

Current GPU mode : nvidia
GPU mode requested for next login : no change
GPU at startup : nvidia
Temporary config path: no

Carefully follow the Installation Wiki for your Arch Linux Desktop Environment and be sure to check the FAQ before you make the switch and could end up in the tty not knowing what to do.
Update: this setup will work on both X11 and Wayland (using KDE Plasma now).
Answer: Note: This is an alternative solution to the above: It's a good solution if you have an Optimus laptop and you're not using any external monitors, but you want to use nvidia all the time.
For a long time now I have used optimus-manager to run my graphics through the Nvidia GPU, but because it's dynamic it has proven to have issues here and there sometimes. When I needed to just get things done with my machine, I ran into a black screen, or something wasn't working and I had to go and troubleshoot the issues.
Therefore for anyone that wants a stable & static solution that will work 99% of the time this is it: Use NVIDIA graphics only .
Follow the steps in there and you're good to go all the time, hopefully.
Note: Compared to the above this method will not allow you to switch to the integrated GPU, but will always run your graphics through the nvidia GPU.


Modify Moose attribute methods

Question: I'm creating a list of attributes (more than the three shown below), all of which share common methods.  Is it possible to then add a trigger to one of the methods:
# Create a bunch of attributes
for my $attr ( qw( title name address ) ) {
    has $attr => ( is => 'rw', isa => 'Str' );

    around $attr => sub {
        # more stuff here.
    }
}

# Add a trigger
has_another_method 'title' => ( trigger => \&_trigger_title );

I know I can get meta information about attributes, but I haven't found anything that would enable me to change the attribute methods (and perhaps for good reason).  Being able to do this would help keep my code clean, and mean that the common bits are all defined in one place.  If not, I can just create the attribute separately, and include the trigger method.
Update
The answers have made it clear that changing the attribute after it has been created is not a good idea.  Instead, I've opted for a different method which allows me to keep all the attribute options in one place.  This example is a little simplistic, but it demonstrates the idea:
# Create a bunch of attributes
for my $attr ( qw( title name address ) ) {

    my %options = ( is => 'rw', isa => 'Str' );

    # Add a trigger to the title attribute.
    $options{ 'trigger' } = \&_trigger_title
        if $attr eq 'title';

    has $attr => ( %options );

    around $attr => sub {
        # more stuff here.
    }
}

Answer: Triggers are just an attribute on the attribute, but they are defined to be read only. You could find_meta( $attribute )->get_attribute('trigger')->set_value( $attribute, sub { new trigger }), but you're really breaking encapsulation here.
I would just declare all common attributes in my for loop, and then declare the special cases elsewhere.
Comment: I thought modifying an attribute might be a bad idea. I've opted for a slightly different solution which has enabled me to keep the default attribute options defined in one place.
Answer: Attribute methods are composed when they are constructed, so it is generally a good practice to have all the options available when you create it with the has directive.  However, currently there is nothing special being done with trigger methods, so you could do this, to get around the read-onlyness of the 'trigger' option:
my $attr = __PACKAGE__->meta->get_attribute('title')->meta->get_attribute('trigger')->set_raw_value('_trigger_sub_name');

However this is delving rather excessively into the innards of Moose; if the implementation ever changes, you can be SOL (plus you would be violating constraints that are there for a reason).  So it would be much better to set up your triggers as:
has $_ => (
    is => 'rw', isa => 'Str',
    trigger => '_trigger_' . $_,
) for (qw(title name address));

sub _trigger_title {
    # implementation here
}
sub _trigger_name {
    # implementation here
}
sub _trigger_address {
    # implementation here
}

Comment: I only need to add a trigger on a few attributes out of a long list, so unfortunately this isn't really suitable. However, it has confirmed my suspicion that modifying the attribute after creating it is not a good idea.

Modify Moose attribute methods


Are the remaining samples still independent, identically distributed (IID) after removing the maximum value of the IID samples?

Question: $X_1, X_2, \cdots, X_N$ are independent identically distributed (IID) random variables and $Y_1$, $Y_2, \cdots, Y_{N-1}$ are the remaining after removing the maximum value of $X_k, k=1, \cdots, N .$ Is this assumption true that $Y_1$, $Y_2, \cdots, Y_{N-1}$ are IID?
Answer: This is not true if the common distribution of the $X_i$ is discrete (presumably, when there is a tie for maximum, only one of the maximum values is removed).  For example, suppose $N=3$ and $X_i$ has a Bernoulli distribution with $p=1/2$.  Then the possibilities for
$(Y_1, Y_2)$ are $(0,0)$ with probability $1/2$ (namely this happens if there is at most one $X_i=1$), $(1,0)$ and $(0,1)$ with probabilities $3/16$ each,
and $(1,1)$ with probability $1/8$, and it is easy to see that $\mathbb P(Y_1 = Y_2 = 1) \ne \mathbb P(Y_1 = 1) \mathbb P(Y_2=1)$.
Comment: Dear Prof Robert Israel, Thank you for this common.  In the attached reference, the $X_i$s are IID exponential random variables, and the author claims that the remaining $X_i$s after censoring maximum value preserve IID, but no proof has been given for it. I am eager to know your opinion about this.
Answer: OK, I tried to redo this with exponential distributions and $N=3$. Let $X,Y,Z$ be independent and exponentially distributed with parameter $\lambda$. I believe that what you want is the joint cdf given by
$$P\left(X>x,Y>y\mid X\leq Z,Y\leq Z\right) = \frac{P\left(x<X\leq Z,y<Y\leq Z\right)}{P\left(X\leq Z,Y\leq Z\right)}.$$
Here all you are told is that $Z$ is greater than both $X$ and $Y$, but otherwise you are not told the value of $Z$ (it is "censored") and you are not told anything about the ordering of $X$ and $Y$ relative to each other.
The denominator of the RHS is $\frac{1}{3}$ since they are i.i.d., so any permutation is equally likely. To get the numerator, we can write
\begin{eqnarray*}
P\left(x<X\leq Z,y<Y\leq Z\right) &=& \mathbb{E}\left(P\left(x<X\leq Z,y<Y\leq Z\,|\,Z\right)\right)\\
&=& \mathbb{E}\left(P\left(x<X\leq Z\mid Z\right)P\left(y<Y\leq Z\mid Z \right)\right)\\
&=& \int^\infty_{\max\left(x,y\right)} \left(e^{-\lambda x}-e^{-\lambda z} \right) \left(e^{-\lambda y}-e^{-\lambda z}\right)\lambda e^{-\lambda z} \, dz.
\end{eqnarray*}
One can work this out, but because the lower limit is $\max\left(x,y\right)$, I don't think there is any way to separate the result into a product of something that depends only on $x$ and something that depends only on $y$. So, the answer would seem to be that $X$ and $Y$ are not conditionally independent given the event $\left\{X\leq Z,Y\leq Z\right\}$. Sorry for the misleading answers earlier. I think this should be much more precise.
Comment: Dear Svenson, The set $Y_1,...Y_{N-1}$ is equal the set  $X_1,...X_{N-1}$ after removing the maximum value, and only its name has changed. my question is that the mentioned strategy for calculating the PDF of $Y_1,...Y_{N-1}$  is correct, and the $Y_1,...Y_{N-1}$ samples are IID or not?
Comment: I edited my answer and completely rewrote it. Since you mentioned exponential distributions, I tried calculating it directly, and now I think they are not independent. Sorry for the misleading answer earlier. It would seem that there is an error in the paper, unless there are some additional details that weren't mentioned.
Answer: $Y_1,\ldots, Y_{N-1}$ are not independent. That can be seen by proving that
$$
\Pr(Y_1>3\mid Y_2,\ldots,Y_{N-1}<3) < \Pr(Y_1>3)
$$
under the assumption that $\Pr(X_1<3)>0.$
Proof:
Let $I = \begin{cases} 1 & \text{if } \max\{X_1,\ldots,X_N\}>3, \\ 0 & \text{otherwise.} \end{cases}$
Then
\begin{align}
& \Pr(Y_1>3\mid Y_2,\ldots,Y_{N-1}<3) \\[8pt]
= {} & \operatorname E(\Pr(Y_1>3\mid I) \mid Y_2,\ldots,Y_{N-1} < 3) \\[8pt]
= {} & \phantom{{}+{}} \Pr(Y_1>3 \mid I=0\ \&\ Y_2,\ldots,Y_{N-1} < 3) \Pr(I=0\mid Y_2,\ldots,Y_{N-1}<3) \\
& {} + \Pr(Y_1>3\mid I=1\ \&\ Y_2,\ldots,Y_{N-1} < 3) \Pr(I=1\mid Y_2,\ldots,Y_{N-1} < 3) \\[12pt]
= {} & 0 + \Pr(Y_1>3\mid I=1\ \&\ Y_2,\ldots,Y_{N-1} < 3) \Pr(I=1\mid Y_2,\ldots,Y_{N-1} < 3) \\[8pt]
= {} & \Pr(Y_1>3\mid I=1\ \&\ Y_2,\ldots,Y_{N-1} < 3) \Pr(Y_1 > 3) \\[8pt]
< {} & \Pr(Y_1>3).
\end{align}


How to get FirstName + LastName from the user's google account authenticated using Asp.Identity in MVC5 application

Question: I have created a MVC 5 application, and I'm able to authenticate the user using Google External login which is an out of box feature. I have observed that by authenticating the user using google account, UserName and Email are stored in database with the same value(i.e., Email for both of them). How do i retreive FirstName, LastName, from the registered google account.
Answer: You can get this inside the ExternalLoginCallback method in AccountController (as you are using out of the box project template) as explained below.
    [AllowAnonymous]
    public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
    {
        var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
        if (loginInfo == null)
        {
            return RedirectToAction("Login");
        }

        if (loginInfo.Login.LoginProvider == "Google")
        {
                var externalIdentity = AuthenticationManager.GetExternalIdentityAsync(DefaultAuthenticationTypes.ExternalCookie);
                var emailClaim = externalIdentity.Result.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Email);
                var lastNameClaim = externalIdentity.Result.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Surname);
                var givenNameClaim = externalIdentity.Result.Claims.FirstOrDefault(c => c.Type == ClaimTypes.GivenName);

                var email = emailClaim.Value;
                var firstName = givenNameClaim.Value;
                var lastname = lastNameClaim.Value;
        }

     }

Hope this helps.
Comment: I think this is worth to mention that this method is located in Controllers\AccountController.cs
Comment: @DSR Thanks a lot, very easy to integrate
Comment: I got here via searching not using MVC, but Microsoft Asp.Net Forms Identity Example Site .. the code is in "RegisterExternalLogin.aspx.cs"  Replace collection reference in above code to var externalIdentity = Context.GetOwinContext().Authentication.GetExternalIdentityAsync(DefaultAuthenticationTypes.ExternalCookie);  to access the collection.


Possibility to use lower versions of API for Android development

Question: Hello the google playstore has set some requirements for the target sdk that it should target at least api 26. I would like to know if it is compulsory for all apps to be hosted on the playstore to be built with the api 26 or  is it just the target version in the Android manifest that should be API 26
Answer: Well technically it's just the target SDK that needs to be 26 or later, but you can't really make a project with a compile SDK lower than the target. Android Studio will warn you and might not even let you compile.
Even if it does, why? You don't get around runtime permissions by compiling with SDK 22 if you target 23. You don't avoid the Settings.System write restrictions either. The target SDK is the important one.


Difference between consultancy and agency

Question: I want to create an agency that subcontracts specialists to companies. Just wanted to clarify the terms. What is consultancy and agency difference?
What is then different from a project company or product company?
Answer: I am not aware of any official or legal definitions of the words - but in my humble opinion I would regard 'agency' and 'consultancy' as synonymous.
A 'project company' is different from a 'product company', as the latter has ownership over a commercial product whereas the former may be hired by a 'product company' to create/maintain their product.
The 'project company' might in itself be a consultancy or use consultancies for staffing projects.
Addendum edit from comment (David R):
The only difference I would add between 'agency' and 'consultancy' is that the 'consultancy' is often just one person or one person and some employees whereas the 'agency' is often 'placing' consultants that are not current employees
Comment: The only difference I would add between 'agency' and 'consultancy' is that the 'consultancy' is often just one person or one person and some employees whereas the 'agency' is often 'placing' consultants that are not current employees.
Comment: @DavidR: I agree. That is a useful distinction
Comment: That might change from country to country, in Brazil, we usually refer to agencies as places that do some IT work, but are stronger in the design and marketing side of things. You would call an agency to build your website and social media and a consultancy to help you scale you AWS deployments, for example. And both would send you one or more employees, which may or may not be called consultants. The way it seems is that an agency makes decisions on your behalf and the consultancy would assist you in making decisions providing supporting knowledge and experience.
Answer: Agencies supply consultants. They're like collections of contractors, industry agnostic.
A project company is an agency, or firm that supplies specialized services for projects.
A product company produces items. Apple produces products. The Encyclopedia Britannica Company produces Merriam-Webster's Dictionary—a product.


Does a gas in a container lose kinetic energy?

Question: When a gas is in a container, it frequently collides with the container wall, exerting pressure. However, with a collision, kinetic energy ought to be transferred from the gas molecule to the container wall. Does that mean a gas isolated in a container will lose kinetic energy on standing, and its temperature will gradually decrease?
Comment: Some of the answer below discuss real containers and at least one discusses the PHYS 101 (and CHEM 101 for that matter) notion of an ideal gas where the container has some basically magical properties to simplify the analysis. You seem to be interested in the former, but the level of situational detail you provide is suited to the latter. What properties do you want to container to have?
Answer: The temperature of the gas will eventually reach equilibrium with the walls of the container, and since a perfect insulator is not possible, the gas, walls and outside environment will, given enough time, be at the same temperature.
Answer: Yes, the temperature of the gas would decrease quite fast, given that the molecules in the container are still, which implies zero temperature for container. However, if the container's temperature is non-zero, it sometimes happens that gas molecules will instead gain energy because the molecule it collides with is moving fast enough in the opposite direction. It turns out that if the temperatures are equal, the average heat given to gas per time is equal to the heat it loses in the process mentioned here.
Answer: If you assume that the gas is ideal then each collision of a molecule of gas with the wall conserves the kinetic energy. Hence the temperature will stay the same.
Comment: When you say "conserves the kinetic energy" do you mean (1) the KE of the molecule doesn't change, or (2) the $\Delta KE$ of the molecule is the negative of the $\Delta KE$ of the molecules in the wall?  And what does an ideal gas have to do with this?
Comment: I could be wrong, but I seem to remember that the ideal gas assumptions are:
1) molecules undergo elastic collisions with themselves
2) molecules undergo elastic collisions with the wall.

So to reply to your question, the $KE$ of the molecule does not change.
Comment: Elastic collision simply means that the total KE of the colliding system remains unchanged. The KE of the atom/molecule in the wall incvolved in the collision  can change along with the gas molecule KE.  Consider two objects of equal mass, one moving freely, the other at rest. They have a glancing but elastic collision. The KE of each changes, but the sum of KE doesn't.
Comment: I agree with you.
In this case let's consider an elastic collision of a molecule with the wall. Before the collision the molecule has $KE=\frac{1}{2}mv^2$. The wall has $KE=0$. After the collision the total $KE$ should be unchanged. Since the wall is still at rest and has $KE=0$ this implies that the $KE$ of the molecule is still the same.
Of course in the real world molecules in the wall also get some energy. Indeed ideal gas it's just a (useful) model.


What software I use manually adjust a regression line on a graph?

Question: When teaching regression, I used to do an exercise where students would try to guess where the line of best fit is on a scatterplot, and get the sums of squares. They'd move the line around, see how the slope and intercept changed, and see how the sum of squared residuals changed.
It shows that the line of best fit really does minimize the sums of squares, and it's fun, because you have a little competition to see who can get the lowest sum of squares.
(It also teaches a little about how iterative approaches work.)
This relied on a horrible, horrible feature of Excel - that you could click on a graph and drag a point, and it would update the data. (Not that we need a reason to dislike Excel for data analysis).
I've a vague memory of seeing a java (possibly) app, many years ago that did this, but I can't find it now. Is there something else out there?
Comment: Cool contest :) I would definitely enjoy that.
Answer: This applet will do most of what you are looking for!


Can an employer REQUIRE a foreign W-8 sub-contractor to have a US/stateside bank account for the employer to submit payment for services?

Question: As an employer receiving services from a foreign individual (W-8BEN completed), can the employer require the W-8 employee to have a US bank account to send their contracted payroll?
I don't think that we (the employer) can, but I wanted to see if I could get either confirmation or clarification on this please.
Answer: Yes.
The employer isn't required to impose that condition, but can require an employee to create a particular bank account for the employer's administrative convenience.
In general, under U.S. law, the answer to questions in the form "Can the employer require . . . ?" is "yes" unless a specific statute or common law legal requirement says otherwise and no such limitation applies in this case.