What exactly are "primordial fluctuations"?

Question: Are "primordial fluctuations" essentially the same as "virtual particles" and "quantum fluctuations" that created the universe from nothing like what is featured in the Lawrence Krauss book, A Universe from Nothing?
Answer: I haven't read Krauss' book, but it seems the "quantum fluctuations" referred to is something invoked to explain the origin of the Universe itself; i.e. why is there something rather than nothing.
This is not what the term "primordial fluctuations" refers to. Although this is also quantum fluctuations, in the sense that their origin is described by quantum mechanics, their existence assumes the existence of a Universe in the first place. Quantum mechanics' uncertainty principle implies that the Universe — however it came into existence and not really considering the cause — was clumpy on very small scales. When the Universe was $10^{-36}$–$10^{-33}$ seconds old, during the epoch called inflation, these clumps grew in size to cosmological sizes, later collapsing under the force of gravity to the structures we see today as clusters, galaxies, and stars.
Comment: You changed your question now to include virtual particles. I don't have the time to edit my answer right now, but the answer is still no.
Comment: @user127946: Yes, that's correct. Those fluctuations have nothing to do with the origin of the Universe itself, which (I guess) is what Krauss discusses. Inflation (there are various models) predicts a homogeneous and isotropic field (in accord with the Cosmological Principle) with random Gaussian (or close-to-Gaussian) fluctuations which agree well with CMB and LSS observations.
Comment: Is it primordial fluctuations that are being referred to in this statement?

    "Inflation is today a part of the Standard Model of the Universe supported by the cosmic microwave background (CMB) and large scale structure (LSS) datasets. Inflation solves the horizon and flatness problems and **naturally generates density fluctuations that seed LSS and CMB anisotropies, and tensor perturbations (primordial gravitational waves)**."
Answer: It's well-known, that the large-scale structure is incredibly rich. Although on the largest cosmological scales the Universe looks boring (isotropic and homogeneous), at slightly smaller scales that are still very large (we're talking about considering clusters of galaxies as a single entity), we see incredibly rich structure, of filaments, walls and voids, like a sponge, e.g. https://kicp.uchicago.edu/research/highlights/images/highlight-060611-3.jpg.
In the early universe, there was no structure, only a hot plasma. The radiation pressure from photons etc. prevents gravity from condensing other non-relativistic particles. This `washing out' of structure means that if we assume only normal matter contributes to gravity, we cannot dynamically generate the observed rich sponge-like structure we see at the large-scale today.
In order to see the amount of structure in the Universe, we need dark matter. But even that is not enough. In addition to the dark matter, we need `seeds' of gravitational potential wells to speed up the gravitational condensation of dark matter.
The seeds are called `primordial fluctuations' and occur before the existence of a hot thermal plasma, in the very early universe. In inflationary cosmology, it's proposed that the quantum fluctuations provide the seeds for structure. Inflation enlarges to the quantum fluctuations, causing them to become classical and form the seeds necessary for large-scale structure.


At what latitudes does daytime last exactly 24 hours once in the year?

Question: I assume at the Solstice - a definite latitude would have exactly 24 hours of daylight. What latitudes (North and South) are these - they might vary a little with longitude?
Answer: The latitudes today are 66°33′46.1″ N and S, the Arctic and Antarctic Circles.
By definition, north of the Arctic circle, and south of the Antarctic circle, everywhere gets at least one day with no sunset, which I guess is what you mean by 'exactly 24 hours of daylight'?
From the linked article:

North of the Arctic Circle, the sun is above the horizon for 24 continuous hours at least once per year (and therefore visible at midnight) and below the horizon for 24 continuous hours at least once per year (and therefore not visible at noon).
Comment: You can interpret "exactly 24 hours of daylight" however you like. I thought the simplest interpretation was the one that defines the famous Circles.
Comment: Doesn't this assume that daylight starts when the *center* of the Sun (and not the upper limb) has risen, and that there's no refraction at the horizon?
Comment: I interpreted it as sunrise to sunset time of exactly 24 hours, but I agree your answer is a good approximation (sorry, I'm an amateur astronomer, and a bit OCD about the definition of sunrise and sunset)
Comment: @kwinkunks, the Arctic circle and the Tropic lines are generated due to the Sun transit. It is not related to the duration of the sunlight. Atmospheric refraction and reflexion allow us to see the Sun around 3º under their position on the sunset and sunrise. So when you think that the Sun is in the horizon, it is under it.
Comment: Subtract a few arc minutes south from the Arctic Circle / north from the Antarctic Circle -- the Sun's disk is about 30 minutes across.
Answer: It depends...
What do you understand as 24 hours daylight? Sun should be visible? There should be light, even if the Sun is not visible?
There are different interpretations:
Astronomical Twilight:Astronomical twilight is the darkest of the 3 twilight phases. It is the earliest stage of dawn in the morning and the last stage of dusk in the evening.
Nautical Twilight: Nautical twilight is the second twilight phase. Both the horizon and the brighter stars are usually visible at this time, making it possible to navigate at sea.
Civil Twilight: Civil twilight is the brightest of the 3 twilight phases. The Sun is just below the horizon, so there is generally enough natural light to carry out most outdoor activities
So if you consider the Civil twilight, at 61º lattitude, you will get one 24 hours daylight. (Close to Helsinki - Finland)
If you go to the Nautical one, then you will come south.
Check this link. You will enjoy.
Hope it helps!
Answer: I believe the phrase specific words  have specific meaning is pertinent here. I believe the question has been misunderstood in the answers as pertaining to daylight instead of daytime. This question is not referring to daylight hours, it is in reference to the fact that the sidereal day length varies by plus or minus ~4 minutes due to a few factors; asynchronous rotation of earth, earth's tilted axis, variable speed at para/aphelion positions, and elliptical orbit being the primary factors. The 24hr day we all use is the sidereal mean time or standard time.
It is an interesting question. I cannot purport that the following is absolutely a fact but would say that it is a reasonable presumption with high confidence.
It would likely be between the 23.5 degree latitudes known as the tropic of Cancer and Capricorn. I might even make the assumption that you would have to be one that latitude in conjunction with the corresponding equinox or solstice. Those assumptions are hesitant at best though. The lack of data published makes me consider that the interactions of celestial bodies in asynchronous and non tidally locked orbits, while also wobbling on axis may continually affect what days and latitudes the amount of time from apex to apex of the sun to be exactly 24 hrs.
Comment: Fair point, but the OP mentions both 'daylight' and 'daytime' so at best it's ambiguous. I agree your question is arguably more interesting, though I think it's the solar (not sidereal) day that varies in the way you're describing. A function with the awesome name ['the equation of time'](https://en.wikipedia.org/wiki/Equation_of_time) crosses the x-axis — denoting a solar day of exactly 24 hours — four times a year for a given location.
Comment: This question would probably be best answered at Astronomy SE.
Comment: In addition to @kwinkunks comment, a 24.0000000 hour day as determined by the equation of time is independent of the latitude. This contradicts the OP which definitely asks for the latitude. It seems the OP is not asking for the date when the solar day is closest to being 24 hours long.


how many times can a spitting cobra spit its venom?

Question: exactly how many times can a spitting cobra spit its venom at a predator
it has a small venom sac, so I presume it can only spit once or twice only
Answer: I presume it can only spit once or twice only An unwise presumption.

These cobras exhibited distinct control of venom flow with spits averaging 1.7% of the volume of the venom gland, thus enabling the cobras to rapidly expel over 40 consecutive spits ... There was no significant difference in the amount of venom spat between the first few spits and the 20th spit, however there was a significant (Student's t-test with unequal variance, p=0.017) decrease in the amount of venom spat between the 20th and 40th spits.

--Protein variation in the venom spat by the red spitting cobra, Naja pallida (Reptilia: Serpentes)
Comment: so it can spray up to 40 times


How to document field properties of attribute in shapefile?

Question: I would like to document within ArcGIS how the values for specific shapefile attribute fields were derived or obtained.  Is it possible to input and export this information as a report with ArcGIS 10?
Comment: This sounds like Metadata - http://resources.arcgis.com/en/help/main/10.1/index.html#//003t00000001000000 stored with the file format XML with shapefiles
Comment: If Metadata does not sound like what you are after, would you be able to edit your Question to explain your requirements further, please?  If it is, then just a reply Comment should be enough to give @Mapperz the opportunity to provide an Answer.
Comment: Thanks @mapperz for your suggestion.  I don't however see in the metadata where individual comments on each attribute field would go.  I was hoping to have a separate field for each attribute to create a data dictionary of sorts....
Comment: you can customise your metadata using template http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_a_metadata_template/003t00000025000000/
Answer: This is something you can add in metada - see graphic to see where you would add it within the ArcGIS GUI.

I suggest looking at the ESRI Metadata Toolkit - the XML attribute I think you want is <code>/metadata/eainfo/detailed/attr/attrlabl</code> but as others have said in the comments you can use any schema you want, although Arc may not recognise it out of the box, so you will have to do some of the legwork yourself in terms of tools to work with it.


Why is nobody offering me the sample APRs when I have excellent credit?

Question: I have been tried to get pre-approval for an auto loan from different companies like Carmax and Carvana. Before I applied, they had a calculator to estimate payments, and the asterix, it says "Rates depending on good credit score". My credit score is above 800. Yet, when I finally get the pre-approval numbers from for a loan, they say my rates are 2-3x advertised. Ex. Carvana said someone with 750-850 should get 6.99% interest rate, but after putting in my details, including salary of 75k/year, they only gave me an offer of 14%. Is there some factor I'm overlooking beyond my credit score explaining why the interest rates are so much higher than what they initially suggested?
Comment: No way to know for sure unless you ask them directly but I'd guess your income is too low compared to the loan amount/your existing loan balances.
Comment: The best rates are reserved for those that don't really need loans. Also, borrowing from the people selling cars is often a bad idea (sometimes dealer financing incentives are worthwhile).
Comment: @HartCO You have to be precise. Buy-here-pay-here places are bad ideas, where the loan is carried by the dealer. However, mainstream dealers act as a loan agent to the manufacturer's captive finance and other independent lenders. The majority of loans are originated through the dealer, and it's the only way to get subvented (subsidized) financing. Last time I got a car, I compared rates to banks, and the dealer's captive offer was 0.1% APR worse than the best bank, which would have been eaten up by the extra time and paperwork.
Answer: Getting a car loan approved is based on your credit score, your recent credit activities, your income and current obligations. Having a poor credit score or a thin file can result in a higher interest rate. If they feel that this loan is riskier they will quote a higher interest rate.
You may find that the best rates are from your bank or credit union. They should also take the time to explain how they arrived at your number and what you can do to get a more affordable loan.
Comment: Note that *all* those factors matter, as does how much you want to borrow. The bank is trying to decide if it is confident that you can and will make all the payments. If they think you are borrowing more than you can reliably afford to pay back, they will decline the loan, or increase the rate to reflect that lack of confidence. In fact, you might want to consider that they could be right, and look for a cheaper vehicle... though right now even prices of used cars have been pushed upward by the parts shortage. "Trade wars are easy to win," my left buttock.
Answer: What you are discovering is that your credit score is irrelevant to a lender.  It's a magic number produced by a secret formula known only by the credit agency.  And each agency has a different formula.
Potential lenders are looking at the underlying credit record.  And they are also looking at your income and job stability (which isn't even covered by a credit score).


Perform function on specfic date(s)

Question: Is it possible to have a soldity smart contract perform a function on a predefined date (E.g. perform a payment on 2/12/2018) without requiring an external events to call the function? If yes, how would this look like in solidity?
Comment: I think it is possible. I have read something about that. If you google it you may find some librairies.
Comment: There is not and there's no plan to support such feature.
Answer: There is not and there's no plan to support such feature.
Contracts themselves cannot be the tx.origin, because currently every transaction must be originated from an account. You might want to remodel your application so you don't have constantly update its state.
Some examples:

You can make every call to the contract update its state, executing jobs if conditions are met
Use withdraw model if you want to send funds to users after a deadline

Many contracts use this model, including ENS

You can make a function to update the contract state. Then you call this function yourself every n blocks.

SmartBillion uses this model to save the block hashes of blocks that are more than 256 blocks behind

Perform function on specfic date(s)


What does it mean to be on a short list?

Question: I recently applied for an academic job that did not request letters of recommendation at the time of application, but only a list of potential references. I just now received an email from the search committee chair that I had made it to the "short list" and to please contact my references to arrange for my letters to be sent.  I thought that a "short list" was the list of people who were going to be flown out for an in-person interview, but it seems that the "short list" in this context just means "the list of candidates whose letters of reference we'd like to see".  Is there an agreed-upon definition of "short list" that I'm missing?
Comment: **short list**: a list of selected candidates from which a final choice is made (*New Oxford American Dictionary*)
Comment: I think the information you take from being on a short list is that they threw out some other people's applications and didn't throw out yours, nothing more, nothing less.  Felicitations!
Answer: Nope, there's no widely agreed upon definition of "short list".  Sometimes a committee draws up an official short list, while sometimes people informally talk about a short list based on who is being seriously considered even if there's no official list.  Sometimes the short list consists of the people being interviewed, sometimes it's the people for whom letters are being requested, and sometimes it's in between.  Things can get more complicated when there are several forms of interviews (e.g., interviews at an annual meeting vs. fly-ins).  Sometimes a reference to the short list is a meaningless pleasantry meant to soften the blow of rejection when a committee member knows an applicant personally.  Ultimately, the only thing you can say for sure is that it's better to be on the short list than off it.  Beyond that, you have to guess from context or ask for clarification.
Comment: "Ultimately, the only thing you can say for sure is that it's better to be on the short list than off it" - I love your answer, it sounds like something from Seinfeld.
Comment: @Bitwise I read that comment in Jerry's voice.
Answer: "The short list" doesn't have an agreed upon meaning besides "The list that's shorter than the long list" in my experience.
In some places, it does mean the people they're intending to interview, but not necessarily. In your case, since they've been kind enough not to waste the time of (potentially) hundreds of people writing letters for candidates that never stood a chance, it might actually mean what you thought it meant, just that there's an additional step between "We like him" and "Fly him out". Namely, get letters of recommendation before they spend airfare, department time and resources etc. for someone who has some hidden flaw that will come out in the letters. So the intent might be there, but with an added bit of due diligence.
It might also be that they have a "short list" and then a "shorter list", which would be the scenario you're assuming.
Answer: Your interpretation is similar to how things work at my institution.

We scrutinize the applications and filter them
For the filtered set, we ask for letters of recommendation (this is the stage you appear to be at). We do this because it takes work to track down the letter writers, and we don't want to invest the effort unless the candidate has some chance of making it to the next phase.
We go through the letters very carefully, solicit extral informal feedback if necessary, and then develop a (partial) interview list.

We don't necessarily tell candidates that they've reached phase 2, and in some universities there's no step 1, so it's not always clear what "asking for letters" really means. In your case, since the department explicitly mentioned a short list, you've likely passed a plausibility filter (which is good!), but you can't draw any further inference from it.
From the department's point of view, this is also a way to make you excited and motivated to push your letter writers into action (so it saves them effort :))
Answer: Being on a short list does not necessarily mean that they are going to interview you.  It costs them quite a bit to fly you out and put you up in a hotel for a few days.  But it is very possible that candidates ahead of you will ultimately turn the job down.  And at some point they may well consider you, and fly you out.
Quite likely, also, they haven't decided who they are going to call for an interview, and they want to read the letters to get an idea of who they want to interview.
Finally, these decisions may be based upon things beyond your control, or your talents.  For example, they might be looking for candidates with a very specific skill set, and you might not be a good fit.  Or there might be some internal politics in the department - perhaps one person really wants to hire you, and another really wants to hire someone else.  It's all out of your control.


Add image to LibreOffice Writer 7 "Application Background"

Question: I'm wondering if it is possible to set an image to the LibreOffice Writer "Application Background". This is the area in blue the attached image. I can modify the color of this area by going to tools -> options -> Application colors -> Application background but I'm not seeing an option to use an image rather than a solid color. Is this possible? I'm using LibreOffice Writer 7.
Answer: If it's not in the place where you set the background color, it's very unlikely you can set it elsewhere.
Looking at libreoffice in general, I can't remember any place you could do the kind of customization you want.
Remembering a bit of the source code needed to scroll pages, having the background be some solid color makes things a lot easier; so, unless that code has changed in the last 15 years or so, I'm afraid what you want is impossible.


Do I have a 3 way lamp?

Question: I have a lamp that has a label on it saying that it's a 3-way.  However, with a 3-way bulb in it I only get on/off just like it's a regular 1-way lamp.  Wondering if the label is wrong on the lamp (bought it new, so I know it wasn't repaired) or if maybe it's broken somehow.  Can I visually tell from the socket if it really is a 3-way or a mislabeled 1-way?
Answer:
I borrowed this image from Wikipedia.
1-is the primary contact all bulbs have
2-is the secondary contact for 3-way bulbs
3-neutral
Comment: You may be able to re-bend contact 1 or 2 so that they both make contact with the appropriate place on the bottom of the bulb.  It's also pretty easy to replace sockets, which are readily available in your favorite big box store.
Comment: Well, OK.  It's a 3-way...  Grabbed light bulbs from other 3-way fixtures and I've determined that only 3-way CFLs work right in that fixture.  Incandescent 3-ways all do not (they all act like 1-ways) in that fixture (but they work as 3-ways in my others).  Weird.  Must be differences in manufacturing.  Unfortunately CFL 3-ways are way too tall and stick above the glare shield...
Comment: Looking at the Wikipedia article and the on/off/on/off pattern, apparently it's the middle that's not making contact.  If I put in a 1-way bulb I get a off/off/on/on pattern.  I'll disconnect the circuit and see if I can just bend the center tab up a little...
Comment: ...and fixed!  Many thanks!  The center contact in the socket was apparently just smashed down.  It's very flexible and it was easy to (while the circuit was disconnected for safety) pry it back up with a pick.  My size appropriate 3-way incandescent now works as a 3-way!
Comment: @BrianKnoblauch incandescent yikes.  GE makes a fabulous LED 3-way in sizes as large as 150 "watts".  Not cheap, but will pay for itself in a year's power savings, and the last "bulb" you'll ever buy.

Do I have a 3 way lamp?


Terminator - execute script and keep command prompt active

Question: I installed Terminator on my Ubuntu and I saved my own layout with 5 terminal windows.
Now I want to execute a shell script in each window. The problem is that when script terminates the terminal window becomes useless as there is no more command prompt.
i.e. I can save my layout and put a command "top" in layout config. The next time I start Terminator "terminator -m  -l mylayout &" it will open my layout, execute command "top" in the respective sub terminal, but if I press "q" to quit "top" that terminal doesn't have command prompt any more.
Is there a way to fix it?
And, Is there a way to pass commands to terminal windows inside Terminator layout from a separate gnome-terminal window?
Answer: I also wanted to start a Terminator session by executing a script and then starting a bash shell. This is how I did it:
In Terminator's Preferences, on the 'Layouts' tab, select the desired Layout on the left and then select the desired Terminal on the right.
In the 'Custom command' field, enter the command followed by && bash || bash. This will initiate a new bash shell whether the command/script was successful or not.
The bash after && will execute after a successful exit code (0). The bash after || executes after an error exit code (1-255).
Example:
To execute top and then exit into a new bash shell, enter this in the 'Custom command' field.
top && bash || bash

Another example:
Say you needed some encouragement to get the day started off on the right foot.
echo -e "\nWelcome! You are going to have a productive day!\n" && bash || bash

Then, to run the command specified, start terminator with the -l option followed by your layout name.
terminator -l mylayout

Comment: That is a nice solution... there should have been a checkbox though **keep terminal active**
Comment: Instead of forcing to use bash, it is possible to use `eval $SHELL` to use the default shell
Answer: You can use a custom profile for terminals you want to keep open after the command exits. See the Profile, Command tab in Prefs.You can either have them just hold open till you explicitly close them, or you can have them restart the command (either the bash, or the custom command.)
Another trick I recently learned is to use the following as your custom command:
bash --rcfile <(echo ". ~/.bashrc && ls -l")

It sources your bash startup, executes a command (ls), then deposits you in the same bash process. It is slightly better than the practice of tacking bash on the end of the command.
Answer: I know this is an older question but I spent some time trying to figure it out today and none of this was working for me. I stumbled accross this blog post that did exactly what I needed. So I figured I would share.
Basically, you add this snippet to your .zshrc or .bashrc:
echo $INIT_CMD
if [ ! -z "$INIT_CMD" ]; then
    OLD_IFS=$IFS
    setopt shwordsplit
    IFS=';'
    for cmd in $INIT_CMD; do
        print -s "$cmd"  # add to history
        eval $cmd
    done
    unset INIT_CMD
    IFS=$OLD_IFS
fi

And then you set this as your custom command:
env INIT_CMD="cd bla; export PYTHONPATH=/tmp; workon project" zsh

That lets you string multiple commands together and then when you end a persistent command with Ctrl+C the terminal stays open.


How to scale a video and change position

Question: Hi I have a 400*800 resolution video , I need a 800*400 video , So all i need to do is scale the video's with to 400 and change the y position so that I can see the scaled central part of the video. I have checked online but position is available only for overlays , I need for a single video
Answer: I think if you consider this the other way around, you'll be able to do it.
If you crop the central part of the video, you'll get something that is the right aspect ratio, at 400x200:
ffmpeg -i in.mp4 -vf "crop=400:200:0:300" out.mp4

So this will crop from x=0,y=300 to x=400,y=500.  You can adjust the y starting point if you don't need it exactly central.
Adding in the scaling:
ffmpeg -i in.mp4 -vf "crop=400:200:0:300, scale=w=800:h=400"  out.mp4

I am not sure how valuable scaling the result will be - I guess it depends why you need it 800px wide.
I didn't test this, I think the syntax is right.
Comment: Sure - but that is a different question.  If you just want to add black pillars to the sides, then the question @slhck has marked this as a duplicate of has the answers.
Comment: Hi , Is there any way to move the video to right like normal video to like 10 pixels right without cropping?
Comment: Hi Jeffin, I am not sure what you mean by normal video.  If you move a video 10 pixels to the right, doesn't that then crop 10 pixels off the right hand side?
Comment: Hey paul, am asking like a normal video of 1920*1080 video, I need to move the x position to 10 pixel or so. so the video will show some black or some color to the left 10 pexels and start from 10 pixel , you get it ?


Chashmona - The 25th stop

Question: I have noticed in BaMidbor 33:29 that the 25th stop that the Bnei Yisroel made in the Midbor according to Sidra Mas'ei was called Chashmonah. Chanukah starts on the 25th Kislev and (besides other things) celebrates the victory of the Chasmona'im. My question is two-fold: Is the significance of this in relation to Chanukah brought down in any meforshim? - Please provide sources. Secondly, was this actually a real place and if so, where?
Comment: Why would you think this is not a real place?
Comment: Isn't Chashmonah the 26th stop? It is only mentioned in Bamidbar 33, so I counted the list there twice...

Also, why חשמונה (with a closing ה) and not the more Aramaic spelling the family used: חשמונאים (with an א).
Comment: @MichaBerger From what I saw, חשמונה is 26th if you also count רעמסס, which is debatable, because that's where they started from.
Answer: This connection is brought here on the Wikishiva page, as well as various other pages, as seen in this google search result.
The earliest source that I saw that actually brings this down is quite recent, the Sefer Hatoda'ah by R. Eliyahu Ki Tov (~60 years ago).  The Google books search result here shows a couple of other sefarim as well.
Chashmona is indeed a real place.  The Torah says that Benei Yisrael camped there! Here is a website with a couple of maps of the Masa'os, and you can see exactly where it is.  Alternatively, the Google images search here has some other maps, although not all of the search results are actually maps of the Masaos.

*The moral of the story is that Googling can solve all of your problems.

Chashmona - The 25th stop


How to keep track of winners in a spleef Minecraft tournament?

Question: I'm holding a spleef Minecraft tournament for my students. So I downloaded the SuperSpleef plugin. Problem is I don't know how to keep track of score and see which of my students won... I want to award prizes, so it's important that the score is accurate. Is SuperSpleef the plugin I should use?
Comment: 15-20 kids, I'm not keen on the honor system in this situation :)
Comment: Depending on how big the tournament is, you might not need a specialized plug-in. For small groups, you could simply just rely on an honor system.
Answer: If you were to use the new scoreboard functionality introduced in the new snapshots you could keep track of how many times each player has died and remove them from the game without the use of plugins. By the end of the tournament there'd only be one player left whom you could then declare the winner. If you're not willing to use the snapshots (they're pretty much as stable as the actual releases) and the release of 1.5 is too far away then you'll have to use server plugins which I can't help you with cause I know nothing about them, sorry.
If you are interested in using the command blocks and scoreboard functionality I could always knock something together for you if you want?
Comment: I don't mind using a vanilla Minecraft if that's a better option
Comment: The asker is using a CraftBukkit server, so using a snapshot of vanilla Minecraft is probably not an option.
Comment: Ah, ok. Fair enough then. Good luck with the spleef tournament and I hope you get this sorted :D
Answer: You should probably be below the spleef zone to see which students fall below the ground. In the chat HUD, it will say Student tried to swim in lava if there is lava below the spleef zone. The neat thing is that the chat orders the deaths from first death to last man standing. I would recommend the second option because it will be simpler to mark the death order from 1st to last killed.
Comment: However, the OP must be online to see these messages.
Answer: You can just make everyone put on OP and put lava under the spleef zone and the chat box will list the names of the students who tried to swim in lava. And that is all you need to do!
Comment: Opping an entire classroom of teenagers is a terrible idea.
Comment: The chat will tell you the message regardless of if they are OP or not.
Answer: You could put lava under the spleef zone (or something that will kill your students). Turning on hardcore mode in server.properties will make it so that only the victor will be able to log in after your tournament.


Why do we write models in the form of E(Y)?

Question: A linear model is given by $y=X\beta + \epsilon$. Why do we often instead write it as $E(Y) = X\beta$?
Answer: Because this generalizes nicely to other types of regression models. That way we can express them all in a similar way (possibly with a link function - in your linear regression case the link function is just the identity function). This makes it easier to think of them in a similar way (and also to have similar programming interfaces to them).
E.g.

logistic regression can be expressed as $\text{logit}(E(Y_i)) := \text{logit}(\pi_i) = \boldsymbol{X}\boldsymbol{\beta}$, with $Y_i \sim \text{Bernoulli}(\pi_i)$,
Poisson regression as $\log(E(Y_i)) := \text{log}(\mu_i) = \boldsymbol{X}\boldsymbol{\beta}$, with $Y_i \sim \text{Poisson}(\mu_i)$

and so on.
Comment: There are exceptions too. For example, quantile regressions are about conditional quantiles rather than conditional means.
Answer: Well, if $E(XB + e) = XB$ we are showing that $E(e) = 0$.


Pole Magnitude and Damping Ratio relationship

Question: I know that the damping ratio of a system is defined by the angle of the pole, calculated with respect to the left hand side $x$-axis. Could one infer though, that if the magnitude of the poles is small (i.e. the conjugate poles lie closer to the origin), then the damping ratio of the system would be small ,and result in a slower system response?
Answer: The magnitude of the poles alone cannot determine the damping ratio, which in turn is related to the rate at which the oscillations about the steady state value will decay.
In fact it is the ratio of the absolute value of the real part of the poles and the magnitude of the poles that gives the value of $\zeta$.
If you think about a second order system its characteristic polynomial would be:
$$
s^2+2\,\zeta\,\omega_n\cdot s \,+\, \omega_n^2 = \\\left(s\,+\omega_n\cdot \zeta-j\,\omega_n\,\sqrt{1-\zeta^2}\right)\cdot \left(s\,+\omega_n\cdot \zeta+j\,\omega_n\,\sqrt{1-\zeta^2}\right)
$$
with poles: $p_{1,2}\,=\,-\omega_n\cdot \zeta \pm j\,\omega_n\,\sqrt{1-\zeta^2}$
However, the above pole forms are valid for $0 \le \zeta \lt 1$. These systems are called underdamped.
Whereas the damping ratio is:
$$
\zeta = \dfrac{|\Re(p)|}{\omega_n}
$$
As a result of the above the magnitude and the damping ratio relate to each other through:
$$
\zeta = \dfrac{|\Re(p)|}{||p||}
$$
You are correct in that the angle of the pole, with respect to the left hand side real axis relates to $\zeta$, and this is the formula:
$$
\cos{\theta} = \dfrac{|\Re{p}|}{\omega_n} = \dfrac{\zeta\cdot\omega_n}{\omega_n} = \zeta
$$
The conclusion that the magnitude alone, whether small or big, cannot determine the decay rate of the oscillations is also apparent from the fact that if we normalize the poles with the natural frequency $\omega_n$ their magnitude will be always equal to 1, this means that if the angle of the pole somehow varies, then they will always be on the unit circle. In such case as the angle varies the damping ratio will also vary but the magnitude will always be the same no matter what the angle.
So its the real part of the normalized pole that determines the damping ratio
rather than its magnitude, alone.
Note: A slow, from a steady state point of view, pole is in fact one that has a small real part, while a fast is one that has larger real part, in absolute value.
Systems with $\zeta = 1$ are critically damped, having conjugate imaginary poles with magnitudes at the system's natural frequency:
$$
p_{1,2} = \pm\, j\, \omega_n
$$
So this means that the hypothetical system has a pair of conjugate poles with equal magnitude:
$$
||p_{1,2}|| = \omega_n
$$
Those systems may exhibit oscillatory behavior sustained longer than a underdamped system, for example, a sinusoidal response. The poles angle is $90^o$ degrees because their real part is zero. Hence $\zeta = \cos(90^o) = 0$ implying an undamped system but the magnitude of the poles is $\omega_n$, thus it depends on the natural frequency of the system which could be huge in value.
In many engineering applications, the measure that is used extensively for pole quality characterization is the $Q$-factor.
In fact, the quality factor and the damping ratio relate to each other through the following formula
$$
Q = \dfrac{1}{2\zeta}
$$
In addition, you may come across transfer functions with characteristic polynomials parameterized with $Q$ instead of $\zeta$.
$$
s^2+2\,\zeta\,\omega_n\cdot s \,+\, \omega_n^2 =
s^2+\dfrac{\omega_n}{Q}\cdot s \,+\, \omega_n^2
$$


LTSpice constraints on plots

Question: A have a circuit for which I have parameterized some of its resistors with the .STEP command. Consequently, I have many different graphs when I simulate the circuit. I would like to know if it was possible to put a constraint on the graphs that would tell the simulation which one can be plotted (like for example : V(vout) <= 100mV)?
Comment: I don't believe there is. And what's more annoying is that there's no way to really know which plot corresponds to each element in the .STEP command.
Answer: It is possible to differentiate the steps in LTspice by Right-Clicking on the waveform's label (in the waveform window) and then adding @x to the trace's expression, where x is the step's number. For example, for .step param x 1 5 2, plotting V(out)@1 will plot V(out) for the value x=1 (first step), V(out)@1 => x=3 (2nd step), and V(out)@3 => x=5 (3rd step).
Alternately, you can Righ-Click in the waveform window and then on Select steps, where you will be presented a more graphical option of plotting the steps.
Note that you can't stop LTspice plotting all the steps when clicking on the node, but after you select the desired trace, it will stay plotted until overridden.
As a side note, in case you have stepped points and you have used .MEAS commands, the log file will have results for each step. With the log file still opened, you have theoption to plot the results with Righ-Click, then choose Plot .step'ed .meas data.

LTSpice constraints on plots


Can a PWM signal with a 100% duty cycle be considered as an unit step?

Question: I am working on the temperature control of an electric oven. I had the idea of obtaining the temperature-time curve when the oven is fed with the alternating wave at maximum power (220 V 60 Hz). According to the Ziegler-Nichols tuning method, my curve would be the response of the system (oven) to a "unit step". But here I have a doubt. To control the power, I am using a BT136 triac, which receives a 5 volt PWM wave at its gate. When this 5 volt PWM signal is at 100% duty cycle, could I consider it as a unit step?
Answer: When the PWM is at 100%, the input to the oven is sinusoidal (220 V AC 60 Hz):
\$A \times \sin(\omega t) = 220V  \sqrt2 \times \sin(2  \pi \times 60 Hz) = 311.127 \times \sin(377 t)\$
This cannot be considered as an unit step.
Comment: @Velvel The general form would be: A*sin(w*t), where A is the maximum value and w is the velocity or angular frequency. Since we know that 220 V is a root mean square value, then A=220*sqrt(2)=311.127. Finally, the angular velocity w is equal to 2*pi*f, where f is the frequency in Hertz. Since f=60 Hz, then w=377, approximately.
Answer: If you set a PWM to 100% duty, it will go high and be high forever and will not change until PWM duty is set to something else than 100%.
It is up to you to interpret that as unit step or not. Just like you can think of each edge of PWM signal as unit step or not.


bind9 as local caching name server and /etc/resolv.conf

Question: I'm trying to set up BIND9 as a local caching DNS server. I'm about to do that on all my systems: Linux, SmartOS, Mac OS X.
Seems like it's quite easy to setup bind for that.
My question is: Do I need to add "nameserver 127.0.0.1" to my /etc/resolv.conf in order to ask the local name server first? Or is that kind of automatic?
Answer: per the man pages, no you don't need to set it.

nameserver - Name server IP address
      Internet address of a name server that the resolver should query, either an IPv4 address (in dot notation), or an IPv6 address in colon (and possibly dot) notation as per RFC 2373. Up to MAXNS (currently 3, see ) name servers may be listed, one per keyword. If there are multiple servers, the resolver library queries them in the order listed. If no nameserver entries are present, the default is to use the name server on the local machine. (The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum number of retries are made.)
Comment: I tried it on my SmartOS box.
Initial state: /etc/resolv.conf contains "nameserver 127.0.0.1" as the first line. Then, dig gives me the result from 127.0.0.1.
Next, I edit /etc/resolv.conf to remove the line "nameserver 127.0.0.1". Trying dig again, I now get the result from 192.168.1.1 (my home router).
So, by just checking it out - at least on SmartOS I do need to put "nameserver 127.0.0.1" as the first name server directive.


Which mobile os is easy to program with?

Question: I want to learn some mobile stuff, and programming interesting things myself
on mobile phones, what is popular and easy-to-use mobile operating system?
Comment: "Easy" is pretty subjective. What do you have experience with?
Answer: This is extremely subjective.
Java developers will be more comfortable on the Blackberry, Android or J2ME platforms, while Windows developers will likely be more comfortable with Windows Mobile.
Personally, I find programming for the iPhone very enjoyable and easy. I found Objective-C easy to learn. The tools are also well made and the frameworks intuitive IMO.
I've also come to personally dislike coding for the Blackberry. Simple applications require too much code and designing interfaces is an enormous pain.
But as I said, this is very subjective. I'd recommend going through the Getting Started examples of the each of the platforms you have in mind and deciding after having some exposure to each.
Answer: Windows Mobile has fairly easy development with .NET Compact Framework.
WebOS (Palm Pre, etc.) has an easy to use HTML/Javascript like environment. Check out their 'Hello World!' example to see what I mean.
Android isn't bad if you're familiar with Java. (Same goes for Blackberry)
iPhone might be the most complex in my opinion because of the use of Objective-C (it's also probably the most robust). Check out their Programming Guide Introduction to get an idea about what I mean. You might want to check out MonoTouch which allows iPhone development in .NET.
Answer: .Net Compact Framework is pretty easy to work with.  And works great on Windows Mobile devices.
Answer: Without to know which platform you are used to program on, it is not possible to give a correct answer. If you are used to program on Windows, and you are already using .NET framework, then it would be better for you to learn how to program on Windows Mobile; if you are already a Mac developer, then it is easier for you to learn how to create a program for iPhone OS (which is also used on the iPod); if you are a Java programmer, then you should be more comfortable with Android.
IMO, you start to program on a mobile platform that can be programmed using the same framework for the desktop applications because that would allow you to not learn two different frameworks


What is the meaning of 'cut-off' and 'iteration' for trainings in OpenNLP?

Question: what is the meaning of cut-off and iteration for training in OpenNLP? or for that matter natural language processing. I need just a layman explanation of these terms. As far as I think, iteration is the number of times the algorithm is repeated and cut off is a value such that if a text has value above this cut off for some specific category it will get mapped to that category. Am I right?
Answer: Correct, the term iteration refers to the general notion of iterative algorithms, where one sets out to solve a problem by successively producing (hopefully increasingly more accurate) approximations of some "ideal" solution. Generally speaking, the more iterations, the more accurate ("better") the result will be, but of course the more computational steps have to be carried out.
The term cutoff (aka cutoff frequency) is used to designate a method of reducing the size of n-gram language models (as used by OpenNLP, e.g. its part-of-speech tagger). Consider the following example:
Sentence 1 = "The cat likes mice."
Sentence 2 = "The cat likes fish."
Bigram model = {"the cat" : 2, "cat likes" : 2, "likes mice" : 1, "likes fish" : 1}

If you set the cutoff frequency to 1 for this example, the n-gram model would be reduced to
Bigram model = {"the cat" : 2, "cat likes" : 2}

That is, the cutoff method removes from the language model  those n-grams that occur infrequently in the training data. Reducing the size of n-gram language models is sometimes necessary, as the number of even bigrams (let alone trigrams, 4-grams, etc.) explodes for larger corpora. The remaning information (n-gram counts) can then be used to statistically estimate the probability  of  a  word (or its POS tag) given  the
(n-1)
previous
words (or POS tags).
Answer: In context to Apache OpenNLP library, We can specifically take example of document categorization for review comments as given here.
positive     I love this. I like this. I really love this product. We like this.
negative     I hate this. I dislike this. We absolutely hate this. I really hate this product.

Cut off value is used to avoid words as feature whose counts are less than cut off. If cut off was more than 2, then word "love" might not be considered as feature & we might get wrong results.  Generally cut off value is useful to avoid creating unnecessary features for words which rarely occur. Detailed example with further explanation can be found here in this article.


Flawed Proof of Fundamental Theorem of Calculus?

Question: I am currently learning calculus, have not learned much about antiderivatives, and nothing about indefinite integrals. I came by the 2nd Fundamental Theorem of Calculus:
$$\int_a^b f(t)dt = F(b) - F(a)$$ where $F$ is the antiderivative of $f$. I was trying to understand why this theorem works and I came up with a possible proof, albeit informal, of the above theorem. Assuming (1) the antiderivative, F(x), is equivalent to $\int_c^x f(t)dt$ where $c$ is any constant and (2) $f(t)$ is continuous and therefore integratable everywhere:
$$F(b) - F(a) = \int_c^b f(t)dt - \int_c^a f(t)dt = \int_c^b f(t)dt + \int_a^c f(t)dt = \int_a^b f(t)dt$$ I think that this proof might be too simple, possibly neglecting important facts. My questions are: (1) Is the proof above correct or incorrect and why? (2) Is it true that any antiderivative $F(x) = \int_c^x f(t)dt$, given $f$ is continuous?
Comment: the "second fundamental theorem of calculus" is much easier to derive when you have proved the first
Comment: I don't know if I put a fine enough point on it in my post, so I'm leaving this comment. It follows by definition that if $F(x) = \int_c^x f(t) dt$, then $F(b) - F(a) = \int_a^b f(t) dt$. The interesting part of the fundamental theorem is that $F$ is in fact an antiderivative for $f$. $F$ is an antiderivative of $f$ iff $F' = f$. It is not obvious that functions defined like $F$ should be antiderivatives. Indeed, as I remark in my post, it isn't always true that for such an $F$ we have $F' = f$. We need $f$ to be continuous for that to be true.
Comment: As the name "anti-derivative" suggests, the defining property of $F$ is that $F'(x)=f(x)$ for all $x$. I don't see where you use this.
Answer: What you have written is true, but it is not the fundamental theorem of calculus. You've just rearranged the definition
$$
F(x) = \int_c^x f(t) dt
$$
using integral properties.
The First Fundamental Theorem of Calculus
If we define $F(x) = \int_c^x f(t) dt$, then one result worthy of the name "fundamental theorem of calculus" says
$$
F'(c) = f(c)
$$
whenever $f$ is continuous at $c$. Note that we need $f$ to be continuous at $c$ or else the result can fail to be true.
Why is this true? You've made the key insight.
$$
F'(c) = \lim_{h \to 0} \frac{F(c + h) - F(c)}{h} = \lim_{h \to 0} \frac{\int_c^{c + h} f(t) dt}{h}
$$
To finish the proof, you just need to explain why that last limit is equal to $f(c)$. This is where you will have to use continuity at $c$.
The Second Fundamental Theorem of Calculus
The other result that goes by the name "fundamental theorem of calculus" says that if we have a function $F$ such that $F' = f$ and $f$ is integrable on $[a,b]$, then
$$
\int_a^b f(t) dt = F(b) - F(a)
$$
The classic proof uses a completely different trick. We use the mean value theorem with $F$ and $f$ and the integrability of $f$ to set up a telescoping sum.
People will often give a simpler proof which is more properly a corollary of the first fundamental theorem. If we assume $f$ is continuous on $[a,b]$, then we can argue as in RafGaming's answer to prove the same result. But note that the mean value theorem proof, though more complicated, proves the result without making any assumptions about the continuity of $f$.
Comparing the Two Theorems
Suppose $f$ is integrable on $[a,b]$ and $c \in (a,b)$
Schematically, in the first theorem, we have
$$
\left[ F(x) = \int_c^x f(t) dt  \quad \& \quad \lim_{x \to c} f(x) = f(c) \right] \implies F'(c) = f(c)
$$
Note, again, that we need continuity of $f$ at $c$. The statement $F(x) = \int_c^x f(t) dt \implies F'(c) = f(c)$ is not true.
In the second theorem, we have
$$
F' = f \quad \implies \int_a^b f(t) dt = F(b) - F(a)
$$
Though similar looking, these results are not the same. In fact, they are not even exactly converses. They're two distinct results that both formalize the intuition that "differentiation undoes integration and vice versa."
Comment: $\int_a^b f(t)dt = F(b) - F(a)$ is referred in many text as the second fundamental theorem of calculus basically I think because is what you use when you solve definite integrals
Comment: @Tortar see my edits. Hopefully my post is clearer now.
Comment: Charles Hudgins Thank you, I just made edits to my question but I beleive your answer still holds. If I understand correctly, the main reason my proof of $\int_a^b f(t)dt = F(b)−F(a)$ is 'inferior' is because I must assume that $f$ is continuous. Is that correct?
Comment: @Farhaan I wouldn't say inferior. It's interesting and worth knowing that a theorem with the same conclusion as FTC 2 follows directly from FTC 1. That said, a stronger version (which does not assume continuity) does hold and, somewhat curiously, has a completely different proof from FTC 1.
Comment: If you've never seen that FTC 1 fails without continuity: consider the function $f$ which is $0$ for $x < 0$ and $1$ for $ x \geq 0$. Then $f$ is integrable on any compact set, but $F'(0)$ doesn't even exist for $F(x) = \int_c^x f(t) dt$.
Comment: If that example is not very compelling, consider a function $g$ for which $g(0) = 1$ and $g(x) = 0$ for $x \neq 0$. Then $g$ is again integrable on every compact set. Define $G(x) = \int_c^x g(t) dt$. Then $G' = 0$, but $G'(0) = 0 \neq 1 = g(0)$.
Answer: $\int_{a}^{b}f(t)dt$ expresses the area below the curve $y=f(t)$ between the lines perpendicular to the $x$-axis at points $P(a, 0), Q(b, 0)$. You can define a function $G(t)$ to denote the area between points $P(a, 0)$ and $Q(x, 0)$: \begin{equation*}G(t)=\int_{a}^{x}f(t)dt\end{equation*}
Also let $F(t)$ be an antiderivative of $f(x)$ ($F'(x)=f(x)$). Now, if you remember the 1st fundamental theorem of calculus, you'll know that two andiderivatives of the same function only differ by a constant. Thus, $G(x)=F(x)+C$. If $x=a$, $G(a)=0$ so $F(x)=-C$. If $x=b$, $G(b)=F(b)+C=F(b)-F(a)$. Hence \begin{equation*}\int_{a}^{b}f(t)dt=F(b)-F(a)\end{equation*}


How to restore an JPA Entity with ManyToOne relations

Question: I have an JPA entity (Person) with ManyToOne relation to an other entity (Addresses). Before an object may be used by the system, this one has to be approved by an supervisor. I store the original entity as a byte[] and make changes to the "working" entity and store it do the database. If this changes would not be approved I have to restore the original state. So I convert the stored original from the byte[] and merge it using entity manager to the database. All works fine, but if an new Address entity has been added to the "working" Person, this one is not removed from the database after merging the restored original. I know why it is so, but no how to solve my problem. Any ideas?
Answer: orphanRemoval=true on @ManyToOne solves the problem


How to best store lines in a kd-tree

Question: I know kd-trees are traditionally used to store points, but I want to store lines instead. Would it be best to split the line at every intersection with the splitting of the kd-tree? or would storing just the end-points into kd-suffice for nearest neighbor finding?
Comment: It depends what you want to do.  Remember that a line (segment) is just a collection of two coordinates, so it can be described by a single coordinate, with twice as many dimensions.  Therefore, you could store lines as points in a higher-dimensional kd-tree.
Comment: I am trying to create a distance field with the lines. So I will be utilizing the nearest neighbor functionality of the kd-tree. However, I don't want to add more data than what I have (the end points of the line segments.
Answer: The kd-tree itself is designed for point objects. Not even for boxes, spheres or something like this. I believe you can somehow use a 6d tree that stores minx, maxx, miny, maxy, minz, maxz; but I'm not entirely sure on how to query it correctly.
The R*-tree (Wikipedia) might be a better choice here. It is really designed for objects with a spatial extend. If you look up the related publications, they even experimented with different approximations of complex objects; for example whether it pay off to triangularize them, use a circumsphere, bounding box, and interestingly enough IIRC the 5-corner-polygon provided the best performance in some cases.
Anyway, the R*-tree family might be an interesting choice.
Answer: Well, you have to split lines on intersections, otherwise you get in trouble with weights of leafs of the tree.
On the other hand, if you don't use SAH or any other algorithm for traversing the tree, you are free to do whatever you want with original idea of the kd-tree. But if you are bound to some traditional algorithms, you have to split lines. You have to do it just because each leaf of the tree has a weight (I guess in your case it depends on the length of lines in it).
And if you don't split lines, you'll get wrong weights of the leaves, too. Nay, if you don't split lines, you should duplicate them in both leaves the line belongs to.
Answer: Do you have to use a kd-tree? For extended primitives a bv-tree might be more efficient.

How to best store lines in a kd-tree


Seeking a User Role Plugin

Question: A client of ours is currently using Rolescoper as a WP plugin to manage users' access to various "private" pages and posts. However, Rolescoper hides posts/pages from view unless the user is logged in. We're looking for a plugin that shows all the posts/pages but shows a "access denied" message with a prompt to log-in afterwards.
Here's a list of the requests verbatim:

Create User Account: username/password
Assign user to a page that is private
I want the private page to still appear in the navigation, even though a user may not be logged in.
Once a private page is clicked, they are prompted to enter their username/password. Once they do, they are then redirected to that page.
This would also need to be applied to document uploads

Any ideas? I did some Googling/WP plugin searching without much luck.
Thanks!
Comment: If you don't get an answer you like here on SO, you might want to try your question over at http://wordpress.stackexchange.com/
Comment: Thanks! Didn't know it existed. I'll let it marinate here for a bit to see if there's anything before cross-posting it around the interblags.
Answer: Maybe rather than using a plugin, try reworking your template to use is_user_logged_in?
Comment: That would work globally for users logged in, but we need specific pages to be restricted to specific users/usergroups.
Answer: I know this is a very old question, but for anyone else who finds it, I'll take a swing.
You could add to the beginning of your while statement in your single.php file a "Private" category check and "User Logged In" check, like so (NOTE: redirects to login page if user not logged in and category on post is set to "private"):
while ( have_posts() ) : the_post();

        if(in_category("private")){

            if(is_user_logged_in()){

                get_template_part( 'content', get_post_format() );

            } else {

                auth_redirect();

            }

        } else {

            get_template_part( 'content', get_post_format() );
        }

Is User Logged In?
In Category X?
See also: auth_redirect()
Hope this helps!

Seeking a User Role Plugin


VNC Server on RHEL 7 without a monitor

Question: I configured Real VNC server on Red Hat Enterprise Linux 7.2 with a monitor plugged in, now with the monitor unplugged I cannot connect using vnc client, I get "connection refused". Does VNC need a monitor physically plugged into the server? Is there a way to configure Xorg to allow VNC connection with no monitor plugged directly into the server?
Answer: The latest version of Xorg, and by extension Xvnc have -nolisten as a default option.
When I need a graphical display on a headless node I have an init script (RHEL 6, old I know) with the following command:
<code>exec /usr/bin/Xvnc -geometry 1024x768 -listen tcp +iglx -AlwaysShared -DisconnectClients=0 -SecurityTypes=None :<displaynum>
</code>
Note, this starts another X display.
I use start xvnc-headless when I need to start it, stop xvnc-headless when I'm done.
You can also use -rfbport  to change the port, and may also wish to setup and define SecurityTypes to something other than none.

VNC Server on RHEL 7 without a monitor


Where do you pay taxes when you sell digital services with paypal?

Question: I know about a Paypal feature to charge taxes. But You must pay taxes where you receives the payments or where the services is paid (mainly USA)?
Comment: The rules tend to vary based on where you are located and your business is registered. I'd recommend checking out the IRS website.
Answer: There is no general answer to that question. Regulations differ across the world and even within the same country or economic zone. Ask your accountant, tax lawyer or someone with experience.
In the EU, depending on the size of the company, you pay no sales tax, your country's sales tax or the tax rate of client's country of residence. For shipments outside the EU, you may not need to charge a sales tax at all.


Does the infini-lift allow you to go down just 1 level?

Question: I currently have the gold elevator in tiny tower. When I accidentally go 1 level over my destination I tap the down button as quickly as I can but it still goes down 2 levels. I'm just wondering if the final elevator fixes this issue?
Answer: You can indeed travel between individual floors with the Infini-Lift Lightspeed, it just takes a very light touch. I usually tap the up or down button instead of pressing and holding when I need to travel a short distance.


Visual Workflow Display Text Not showing

Question: I have a visual workflow with an input screen for users to enter in certain data. On this input screen I want to show a fields from the Account object as display text. The field exists on the Account object as a custom formula read-only text field. It is not actually showing as display text, however. The value of this field will show up on the input screen if I set it as an input text field, but won't show up as an output display text. What could be the reason for this? Thank you!
Answer: Formula fields will not display in a flow text area, the workround is to create another text field then use a normal Workflow rule to populate the text field and use that in your Visual Flow text area.
It is a bit long winded but it will work.


What determines the speed of a homopolar motor?

Question: What determines the speed of rotation of a homopolar motor?
Comment: +1 for the link to the wikipedia photo -- we had a lecture about homopolar motors in college but I always thought they were exotic things (the prof talked about some big rotor that made contact via a pool of mercury to complete the circuit)
Answer: The angular speed attained by the motor is limited by counter-electromotive force, aka. back EMF.

Current flowing through the wire causes a torque at all points where the wire is not parallel to the magnet's field lines (Lorentz force).
When the wire starts rotating, the motor will exhibit the property of a generator: a voltage (back EMF) opposing the current flow from the battery is induced, because the magnetic flux through the wire loop changes due to movement.
The motor will accelerate until the back EMF is roughly equal to the battery's voltage, with only enough current flowing to provide torque to overcome the friction at this speed.

The more voltage is applied, the more rotation speed is required to reach this state of equilibrium.
Comment: Could a homopolar motor be constructed with a magnet and a hollow shaft, and a wire that went through them without any electrical connection to the moving parts?  Could such a motor then use multiple turns of wire, with a corresponding change in torque constant?
Answer: Running speed is the speed at which the input energy equals losses due to friction (contact and air resistance) and any instability due to poor balancing. Sort of like terminal velocity of a falling object
Comment: This seems incomplete because it doesn't mention anything about the motor generating a back-emf, which would reduce the input energy (power) until it balances the losses.


Does reseting iOS device revert to earlier version of OS

Question: I'm reading that you can use iTunes revert an iOS device to 'original factory settings', but this is hard to believe. Will it actually allow you to return to the earliest version of the OS that was installed on the device, or will it just give you a fresh install of the latest OS that was installed on the device?
Answer: In my experience, iTunes just gives you a fresh install of the latest OS. It has to use the same OS that is installed on your device because while reverting back to the old changes - it can not physically look up the information for the iOS that originally came with your device. When you update your device, your iPhone saves over the old iOS settings so there is no way it can revert back to those changes.
Answer: Restoring to factory settings using iTunes installs the latest version of iOS.
https://support.apple.com/en-ap/HT201252


How can I get the current location of an ActionBar MenuItem?

Question: I want to show a little info label underneath a MenuItem in the app's ActionBar.
To position this correctly I need to know the x-position of a MenuItem.
Google brought me no useful results so far.
Is it even possible?
Answer: I found another way to get a hook on an action bar button, which may be a bit simpler than the accepted solution.
You can simply call findViewById, with the id of the menu item!
Now the hard part is when can you call this?  In onCreate and onResume, it is too early.  Well one way to do this is to use the ViewTreeObserver of the window:
    final ViewTreeObserver viewTreeObserver = getWindow().getDecorView().getViewTreeObserver();
    viewTreeObserver.addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
        @Override
        public void onGlobalLayout() {
            View menuButton = findViewById(R.id.menu_refresh);
            // This could be called when the button is not there yet, so we must test for null
            if (menuButton != null) {
                // Found it! Do what you need with the button
                int[] location = new int[2];
                menuButton.getLocationInWindow(location);
                Log.d(TAG, "x=" + location[0] + " y=" + location[1]);

                // Now you can get rid of this listener
                viewTreeObserver.removeGlobalOnLayoutListener(this);
            }
        }
    });

This goes in onCreate.
Note: this was tested on a project using ActionBarSherlock, so it is possible that it doesn't work with a 'real' action bar.
Comment: I suggest adding `if(viewTreeObserver.isAlive())` check before removing the listener because sometimes an exception is thrown if it's not alive.
Comment: Wonderful! Thank you for this great answer. This should be the correct one.
Answer: I finally found an answer to this! It is a bit hacky, but not too much. The only downsides are:

You have to replace the MenuItems with your own View. An ImageView is fairly similar to the standard one but it misses features like long-pressing to see a tool-tip, and probably other things.

I haven't tested it a lot.

Ok, here's how we do it. Change your Activity's onCreateOptionsMenu() to something like this:
View mAddListingButton;

@Override
public boolean onCreateOptionsMenu(Menu menu)
{
    getMenuInflater().inflate(R.menu.activity_main, menu);

    // Find the menu item we are interested in.
    MenuItem it = menu.findItem(R.id.item_new_listing);

    // Create a new view to replace the standard one.
    // It would be nice if we could just *get* the standard one
    // but unfortunately it.getActionView() returns null.

    // actionButtonStyle makes the 'pressed' state work.
    ImageView button = new ImageView(this, null, android.R.attr.actionButtonStyle);
    button.setImageResource(R.drawable.ic_action_add_listing);
    // The onClick attributes in the menu resource no longer work (I assume since
    // we passed null as the attribute list when creating this button.
    button.setOnClickListener(this);

    // Ok, now listen for when layouting is finished and the button is in position.
    button.addOnLayoutChangeListener(new OnLayoutChangeListener() {
        @Override
        public void onLayoutChange(View v, int left, int top, int right, int bottom,
                int oldLeft, int oldTop, int oldRight, int oldBottom)
        {
            // Apparently this can be called before layout is finished, so ignore it.
            // Remember also that it might never be called with sane values, for example
            // if your action button is pushed into the "more" menu thing.
            if (left == 0 && top == 0 && right == 0 && bottom == 0)
                return;

            // This is the only way to get the absolute position on the screen.
            // The parameters passed to this function are relative to the containing View
            // and v.getX/Y() return 0.
            int[] location = new int[2];
            v.getLocationOnScreen(location);

            // Ok, now we know the centre location of the button in screen coordinates!
            informButtonLocation(location[0] + (right-left)/2, location[1] + (bottom-top)/2);
        }
    });

    it.setActionView(button);
    mAddListingButton = it.getActionView();
    return true;
}

And then you have a function that updates your helpful instructions view with the location of the button and redraws it:
private void informButtonLocation(int cx, int cy)
{
    MyHelpView v = (MyHelpView)findViewById(R.id.instructions);
    v.setText("Click this button.");
            v.setTarget(cx, cy);
}

Finally make your fancy schmancy custom view that draws an arrow to (near) the button. In your onDraw method you can convert the screen coordinates back to Canvas coordinates using the same getLocationOnScreen function. Something like this:
@Override
public void onDraw(Canvas canvas)
{
    int[] location = new int[2];
    getLocationOnScreen(location);

    canvas.drawColor(Color.WHITE);

    mPaint.setColor(Color.BLACK);
    mPaint.setTextSize(40);
    mPaint.setAntiAlias(true);
    mPaint.setTextAlign(Align.CENTER);
    canvas.drawText(mText, getWidth()/2, getHeight()/2, mPaint);

    // Crappy line that isn't positioned right at all and has no arrowhead.
    if (mTargetX != -1 && mTargetY != -1)
        canvas.drawLine(getWidth()/2, getHeight()/2,
                mTargetX - location[0], mTargetY - location[1], mPaint);
}

(But obviously you have to clip the target location to the Canvas size). If you go for the same method as Google where you overlay a view over the entire screen you won't have to worry about that, but it is more intrusive. Google's method definitely doesn't use any private APIs (amazingly). Check out Cling.java in the Launcher2 code.
Incidentally, if you look at the source for Google's similar implementation of this for the launcher (they call the instructions screen a Cling for some reason), you can see that it is even more hacky. They basically use absolute screen positions determined by which layout is being used.
Hope this helps people!
Comment: This actually works fine! Though the time has already past for it to be useful to me (I already used my own solution, see below) and changing the app is not an option right now. But I hope it will help other people in the future! Great answer!
Comment: addOnLayoutChangeListener is supported only from Honeycomb. it won't work on old APIs.
Comment: I have the coordinates now - but how to draw on top of a fragment?
Answer: Just handle the Menu Item as a normal view..like this:
    View myActionView = findViewById(R.id.my_menu_item_id);
    if (myActionView != null) {
        int[] location = new int[2];
        myActionView.getLocationOnScreen(location);

        int x = location[0];
        int y = location[1];
        Log.d(TAG, "menu item location --> " + x + "," + y);
    }

Note: I've tested with my activity configured using ToolBar, not directly as ActionBar...but i guess it should work similarly.
Comment: You can even call this within the onOptionsItemSelected and it will work.
Answer: This answer is now outdated, Look for the accepted answer above
I found out that (at this time) there is no way of figuring out the x/y value of a menu item. See menu items could just as well be hidden from the screen until the user presses the menu button. In Android 3.0 and up you have the option to implement the menu in the app's ActionBar. You can add a lot of menu items in the actionbar, when there is no more place to position an item on the bar it will simply create an "Overflow" button which will contain all menu items that could not be placed on the action bar because of a shortage of space or because the programmer explicitly set the menu item to appear in the overflow menu.
All this behavior is probably why menu items don't have their x/y position you can retrieve (or set).
How I eventually solved this problem is by using the Paint.measureText() function to determine how wide each menu item would be in the action bar should be and use it to calculate the offset from the right side of the screen where the label should be.
It's a workaround but if anyone ever has the same problem as me, know that this works just fine. Just remember to set the appropriate font-size on the Paint object or else when you measure the text's length it will most probably calculate the text width using a different font-size than your menu item's font-size.


The main window in MATLAB 2014b is not appering, just the splash window

Question: I installed Matlab 2014b on Ubuntu 14.4 in /usr/local/MATLAB and then installed the Matlab support. Unfortunately the main Matlab window is not appearing, just the small Matlab logo window. What is the problem, and how to solve it?
Answer: Probably you installed MATLAB as super user with sudo ./install command, and now launching it with matlab command or using matlab-support package in linux you experience this problem.
To solve it, simply grant the permission in the preferences folder with:
sudo chmod -R a+rw ~/.matlab


A question about  large denumerable ordinal numbers

Question: Let S be the set of all ordinal-definable real numbers and let A(S) be the statement that S is
denumerably infinite. If ZFC is consistent, it has been proved (by A. Levy) that it remains
consistent if we adjoin A(S) to it as a new axiom-so let us assume that this has been done.
Now S has a natural well-ordering inherited from the well-ordering of the class of all
ordinal-definable sets. Let O(S) be the ordinal number of this natural well-ordering of S.
My question is, how does the size of O(S)-which must be very large indeed-compare with other
large denumerable ordinal numbers, such as the smallest non-recursive ordinal number (in the
sense of CHURCH/KLEENE) or some of the so-called "admissible" ordinal numbers?
Answer: The class HOD consisting of the hereditarily ordinal definable sets is transitive proper class inner model of ZFC, and your assumption A(S) amounts to the assertion that $\mathbb{R}^{\text{HOD}}$, the set of reals of this model, is a countable set in the ambient set-theoretic universe V. The shortest enumeration of this set in HOD, however, has the order type of the continuum of HOD, which we may denote $\frak{c}^{\rm \text{HOD}}$, and this would seem to be (one natural interpretation of) the ordinal to which you are referring.
Although your assumption means that this ordinal is countable in the ambient universe $V$, we may also consider it inside the inner model HOD, where it is simply the continuum. Thus, from the perspective of HOD, the ordinal is very large indeed by the standards that you have mentioned. In particular, HOD thinks that it is much larger than $\omega_1^{ck}$, the first non-computable (non-recursive) ordinal, and also that it is admisssible, and a limit of admissibles and a limit of limits of admissibles, and so on. In particular, it is a cardinal in the constructible universe L, since it is a cardinal in HOD, which contains L.
And once we know that HOD thinks those things, then it follows that our universe V also agrees, since those properties about this ordinal are absolute from HOD to V, since HOD computes the L hierarchy the same as we do in V.
Finally, let me point out that the forcing method allows us enormous flexibility in controlling the precise value of this particular ordinal. Namely, suppose that V is any model of ZFC and that $\delta$ is any cardinal of $V$ with uncountable cofinality and above the continuum. First, by a theorem of Solovay, there is a forcing extension $V[G]$ in which the continuum becomes exactly $\delta$; one simply adds $\delta$ many Cohen reals. Next, by a theorem of MacAloon, there is a further extension $V[G][H]$ not adding any reals in which the reals of $V[G]$ become ordinal-definable in $V[G][H]$; one may do this by forcing to code the individual reals into the GCH pattern high above $\delta$. Finally, we may perform collapse forcing to build a model $V[G][H][K]$ in which $\delta$ becomes countable. If the reals of $V[G]$ were coded into the GCH pattern up high, this last step will preserve those reals as ordinal definable, and it will create no new ordinal definable sets since it is almost homogeneous forcing. Thus, the $\mathbb{R}^{\text{HOD}}$ of $V[G][H][K]$ is the same as $\mathbb{R}^{V[G]}$ and it will have cardinality $\delta$ there. Thus, we have arranged your ordinal to be exactly $\delta$ in $V[G][H][K]$, a model satisfying your assertion $A(S)$. But $\delta$ was an arbitrary cardinal with uncountable cofinality above the continuum in $V$.
Comment: In particular, the argument of my last paragraph shows that your ordinal can be any uncountable regular cardinal of $L$, in the sense that for any such cardinal there is a forcing extension of $L$ in which that cardinal is your countable ordinal, and these cardinals can of course become very large by the measures you have mentioned.
Comment: The method of forcing shows that any ordinal at all (indeed, any set) can be made countable in a forcing extension of the universe. In this sense, there is no a priori limit to the countable ordinals, and one will not be able to identify any internal property of an ordinal that reveals it as necessarily uncountable. Meanwhile, if you are interested in definability issues in set theory, you might enjoy my recent paper (http://arxiv.org/abs/1105.4597), and particulalry the discussion there of what we call the "math tea" argument.
Comment: Thanks alot for your answer. Much of of what you present goes far
beyond my knowledge of the subject. I am fascinated by large countable ordinals (above the recursive ordinals) and whether there
are any limits on how large they can be made to be while still
remaining countable. I wonder if, given any specific pre-assigned
countable ordinal Z, it is cosistent with ZFC+A(S) to assume that
O(S)>Z.


Best Resources for UIAutomation Testing for iOS Applications

Question: Testing with UIAutomation on Instruments is great, however, the documentation and resources around it are either non-existent or in hiding.  What are the best resources (documentation, blog posts, Stack Overflow questions) that have helped you in implementing this on your projects?  Are there any good open source testing scripts in the wild?
Comment: I respectfully disagree.  The current tag wiki clearly defines the scope.  What would an iOS developer have in common with  .NET developer looking to leverage the automation framework?  These are two divergent topics.
Comment: Unrelated to the question, I'm not convinced that the best approach to handling the [ui-automation] tag is to create an iOS-specific variant and retagging everything.  People have been using this tag well for iOS-related matters for over a year now with no confusion.  Perhaps broadening the [ui-automation] tag wiki to include this possible definition is the right approach.  I've asked a question about this on Meta, to see what others feel the best solution is: http://meta.stackexchange.com/questions/105149/should-the-ui-automation-tag-be-broadened-beyond-the-microsoft-specific-definit .
Answer: As I point out in my answer to this similar question, I covered UI Automation as part of my recent course on advanced iPhone development.  The video for the "Testing" session that covers this instrument can be found for free on iTunes U, and the course notes on UI Automation, along with sample scripts, are available here.
If you have access to the WWDC 2010 videos, make sure to watch session 306 - "Automating User Interface Testing with Instruments".  That was my first introduction to the topic, and they do a great job of running through the core concepts.
In addition, James Turner's "How to use UIAutomation to create iPhone UI tests" and Alex Vollmer's "Working with UIAutomation" are both write-ups that I've found useful.
Finally, the ui-automation tag here on Stack Overflow contains many useful scripts and specific examples of UI Automation in action.


too much parsnip and/or parsley flavor

Question: I made a potato, parsnip (and 1 apple) soup.  I put in a "bunch of parsley tied in a packet."  The soup is too powerful.  I am not sure if it is the parsnip (since I do not typically eat these,) or the parsley.  Any suggestions to "soften" that strong flavor?
Comment: Have you considered separately cooking up another potato or two, puree, and add to the soup?  Alternatively, stirring in a bit of cream might do it.
Comment: For the future: small parsnips and parsley roots can look similar enough to confuse them at the grocery store - maybe that is what happened :)
Answer: More potatoes and another apple - dilute (assuming "too strong" is really too strong, and not a just an unfamiliar flavor you would not like even if it was reduced. Parsnips can be polarizing.)
Or add garlic and/or ginger until they overpower the parsnip and parsley (assumes you like garlic and/or ginger...) I guess chili might be another similar approach, but I wouldn't do that as I don't like it. I might add black pepper, though.

too much parsnip and/or parsley flavor


Unable to set a Static IP Address in elementary os

Question: How do i set a static IP address?
unable to find documentation on using the gui or terminal. It would probably be easier if i knew what fork of Linux this was developed from.
Answer: Elementary was originally based on Ubuntu, which was originally based on Debian.
You can set a static IP via the Network settings GUI.

Click Applications menu.
Click System Settings from the menu.
Click Network from the settings app.
Select your network connection in left-hand sidebar.
Click Advanced Settings in the lower-right corner.
Click the IPv4 settings tab.
Select Manual as the configuration method.
Set your IP.
Repeat on the IPv6 tab if needed.
Click Save.


Find the motivation to meditate

Question: I know that when I meditate I become very efficient and quick in my work. Do you have any tips for motivating yourself to meditate during the day? I had thought about putting an alarm on my cell phone once or twice a day to encourage me to meditate, but it seems that is not enough. I need something more automatic than that. Something to give me a little kick to meditate 15-20 minutes during the day.
Comment: Are you looking for a "reminder" -- because you forget, it doesn't occur to you during the day? Or a "motivator" -- because even when you remember or are reminded, you choose not to?
Answer: Although alarms are helpful, we should perhaps consider the bigger picture. The Buddha taught seven prerequisites for right immersion:

MN117:3.1: "And what is noble right immersion with its vital conditions and its prerequisites?
MN117:3.2: They are: right view, right thought, right speech, right action, right livelihood, right effort, and right mindfulness.

Each step is important, and we need to take them in order.

MN117:34.2: And how does right view come first?
MN117:34.3: Right view gives rise to right thought. Right thought gives rise to right speech. Right speech gives rise to right action. Right action gives rise to right livelihood. Right livelihood gives rise to right effort. Right effort gives rise to right mindfulness. Right mindfulness gives rise to right immersion. Right immersion gives rise to right knowledge. Right knowledge gives rise to right freedom.

Alarms do help, but we also need to be ready to hear the alarm and meditate when it rings. Meditation takes preparation. If we are watching a great movie when the alarm rings, we will be unprepared. But if we are gently cleaning our room when the alarm rings, it will be much easier to meditate.
No kicking is required.
Instead, take these seven right steps before meditating.

MN117:35.2: And how does right view come first?
MN117:35.3: For one of right view, wrong view is worn away.
MN117:35.4: And the many bad, unskillful qualities that arise because of wrong view are worn away.
MN117:35.5: And because of right view, many skillful qualities are fully developed.
MN117:35.6: For one of right thought, wrong thought is worn away. …
MN117:35.7: For one of right speech, wrong speech is worn away. …
MN117:35.8: For one of right action, wrong action is worn away. …
MN117:35.9: For one of right livelihood, wrong livelihood is worn away. …
MN117:35.10: For one of right effort, wrong effort is worn away. …
MN117:35.11: For one of right mindfulness, wrong mindfulness is worn away. …

And then just meditate.
Answer: The method which worked for me is to find fellow meditators in my area. These may be your coworkers or people who stay in your area.
Once you join a group that meditates regularly, it is easy to maintain the practice. Once well established in the practice of meditation, you will find it easier to work independently. But in the beginning, our mind resists a lot, so much so that even thinking about meditation feels like a burden. These are our minds' tricks, but we need to handle them gently.
I am reminded of a quote-
Think of mindfulness as a form of "affectionate attention." —Dr. Jon Kabat-Zinn
I hope it helps you.
Answer: What you are experiencing is an unconscious aversion to meditation. While consciously you know and experience the benefits of meditating, on the other hand, there is an unconscious aversion to the task. In Buddhist parlance, this generalised aversion has been enumerated into five types, which are typically called the five hindrances. It is good to have a healthy understanding of these hindrances and how they present themselves in everyday life, and not just on the meditation cushion. Having this understanding, one can - at least initially - see the rudiments of those hindrances and their unique, personalized terrain. Later, one knows the details of that terrain, one becomes somewhat of a connoisseur, an expert in the field of their own mind. Knowing the details like the contours, the peaks & troughs, the mental & emotional weather, is called mindfulness, which brings about emotional intelligence.
Some people have little in the way of hindrances, which is obviously a good thing. For these people, they will also likely have a thinned-out body concept; they may take well to formless practices like contemplating space or studying teachings found around the eighth fetter. Zen Master Dogen, for instance, begins at something called 'enlightenment', but his teachings can be a little obscure for most and may not be compatible with someone who isn't ready for them, hence...
...for some, the struggle to sit with the body is an unconscious aversion, which typically shows itself as the five hindrances:

sense desire: a desire to entertain something in the world.
Ill-will: the feeling of agitation, annoyance, irritability or anger towards people and situations.
Mental and physical laziness: self-explanatory
Anxiousness: a feeling of unease that directs the attention away
from the body.
Doubt: unsure whether these exercises are worth pursuing.

Good luck, my friend.
Answer: Traditionally, the Buddha recommended a series of recollections to those who's practice had slackened or who were unmotivated to sit.  These were called the anussatis. To engage in this practice, you simply bring into mind the qualities of the Buddha, dharma, sangha, virtue, and the heavenly beings (in the five-fold anussati) into your mind.  Focus on their sublimeness, their perfections, their courage, their prodigous efforts, and so forth.  Think of it as the Buddhist version of getting your hype on.
https://en.m.wikipedia.org/wiki/Anussati
Answer: Controversial suggestion: try making it seem more attractive / easier.
Listen to music while you meditate or watch tv. Pop on The Office and be aware of your breath 51% and the office 49%. You can develop an affinity for the breath this way.
Later, once you have the habit, you can remove the external stimuli. Or, at times, you may feel like doing it without additional stimuli.
<3

Find the motivation to meditate


Why is it 放学 and 下班, instead of 放班 or 下学?

Question: I know that there is also the variant 放工 but I don't think this is typical usage.
The use of 下 is so common, but yet in the instance of a school we use 放 instead.
Comment: I think you can also say 下学 to mean "finish school for the day" as the opposite of 上学
Answer: Let me do some speculation.
Well, since we have 上班 & 下班, why not 上学 & 下学?
I suppose it is 放学 because 放 also has the meaning of "being let out or let off", or "released from some physical restrictions, like the school compound" from which students could not "get out" from during school hours?
So, 放学 is meant to depict the actual physical situation of students being 放, i.e. "let off or out" of the school compound?
Workers on the other hand are not so functionally restricted during their hours of work and so 上班 & 下班?
放工 perhaps have the same meaning as 放学, meaning workers being "let off or released" from their work. 放工 usually, though not always, refers to menial workers.
Like I say, I am just speculating.
Answer: The following pairs all make sense
上班/下班 = 返工/放工 (colloquial Cantonese)
上課/下課 = 上堂/落堂 (colloquial Cantonese)
上學/下學 = 返學/放學 (colloquial Cantonese)
At some point, 放學 became more popular than 下學. Eventually, no one say 下學 anymore
上學/放學 (instead of 下學) was likely started in Cantonese speaking regions
Answer: 上 and 下 represent a plain cycle that carries not much excitement/change before and after, or in between, therefore, it is best to associate the words with the everyday events - 上班 and 下班.
However, for most school kids, 上學 equals a day of torture in a confined environment -the school, and he/she couldn't wait to be freed/released(放) from it to enjoy the after-school hours and funs. Thus, 放學 (free from school) is more appropriate than 下學, which has no expectation or excitement attached to it.
Note, similar to 上班 and 下班, the words for start and end of a single class are 上課 and 下課, 放課 is not used, because the kids are not really/completely let free after the recess.


Usage of "p." vs "pp." to denote two separate pages

Question: I understand that "p." is used for single page references, and "pp." for multipage pages. However, if I'm quoting something from p. 35 and p. 40 from the same book, should I use "p. 35 and p. 40", or "pp. 35 and 40"?
Comment: A matter of personal choice/style.
Comment: Would you say 'pages 35 and 40' or 'page 35 and 40'?
Answer: While this issue may be covered in style guides, I would suggest, absent any clear convention to which to defer, that the choice might be situational.
If you are referencing separate items, though both may directly support your particular content, that have no strong relation to each other more so than expected by appearing in nearby pages, then you might choose the first option, to emphasize the distinctness of the references.
Alternatively, if the two pages include a continuation of the same reference, such as consecutively-numbered diagrams that are placed on non-consecutive pages for typographic considerations, then you might choose the second option, to emphasize the continuity of the sequence.


What's the current state of closures in Java?

Question: Does anybody know, if closures will be in Java 7?
Comment: Seems like closures are back: http://puredanger.com/tech/2009/11/18/closures-after-all/
Comment:  oh Java, you used to be so cool, what happened?
Comment: I'm voting to close with a newer question since it will be more up to date with future features - possible duplicate of [Closure in Java 7](http://stackoverflow.com/questions/5443510/closure-in-java-7)
Answer: It is unknown until the Java SE 7 JSR is created (presumably by Danny Coward) and an expert group is formed and the contents selected.
My Java 7 page is a good collection of links about Java 7 in general and has links to all of the closures proposals and blog entries:
http://tech.puredanger.com/java7#closures
And I maintain a Java 7 link blog where you can find links on closures and other stuff at:
http://java7.tumblr.com
And you might find my Java 7 Predictions blog post to be interesting as well if you want my opinions:
http://tech.puredanger.com/2008/08/02/java7-prediction-update/
UPDATE: Mark Reinhold stated at Devoxx in Dec. 08 that closures will NOT be included in Java 7 due to a lack of consensus on how to implement.
Answer: At Devoxx 2008, Mark Reinhold made it clear that closures will not be included in Java 7.

Wait! Closures will be included in Java 7. Mark Reinhold announced this reversal at Devoxx 2009.

Belay that! Closures (lambda expressions) have been deferred until Java 8. Follow Project Lambda (JSR 335) for more information.
Answer: There are currently several competing proposals, BGGA, CICE, among others.  Unfortunately, a heated debate remains over the best approach.  As a result it is unlikely at this point that closures will make it into Java 7, due to the conservative nature of the acceptance process.
The key problem here is that it can be very difficult to add features to a pre-existing language, without inadvertently introducing significant complexity.  This was the experience with Generics in Java 1.5, and many are concerned that it would be compounded with the introduction of closures.
My advice is that if you really want to have access to modern language features like closures, but wish to stay within the Java ecosysteym, you should take a look at Scala.
Comment: Groovy also supports closures.
Comment: +1: I totally agree: adding closures would make the language more complex and if one really wants to use them one can use Scala.
Answer: Groovy is the best Java alternative I've seen that includes features of dynamic languages including closures, run-time class extension, etc.  While Ruby has a slight design advantage imho, I'd have to say the fact that Groovy compiles into Java byte-code and interacts with Java without ANY interface code is a huge plus that can't be ignored.
http://groovy.codehaus.org
Answer: Apparently Closures will not be in Java 7.
See this
and this.
Answer: Closure won't definitively be present in Java 7, but if you are looking for a lighter solution to have closure in java right now check out how they have been implemented in the lambdaj library:
http://code.google.com/p/lambdaj/wiki/Closures

What’s the current state of closures in Java?