Flying from Winnipeg to Auckland with 2hr 20 min of connection time at Chicago. Is it enough for an international connection?

Question: I am travelling from Winnipeg to Auckland with an international connection at Chicago (2hr 20min). I am a Canadian citizen and will go through pre-clearance check at Winnipeg but would I still need to claim my baggage and drop it off again at Chicago or not? Also 2hr 20 min. of connection time is enough to change terminal from 1 to 5 as only bus shuttles are operating at the moment. I am travelling via United and Air New Zealand. Any information is much appreciated. Thank you.
Comment: As a general rule of thumb: if the connection was the airline's suggestion (i.e. you entered Winnipeg–Auckland into the airline's search tab and received that itinerary), *the airline* is confident that you will make it.
Answer: You'll be fine going there.  As you note, you'll pre-clear US Customs in Winnipeg, and barring exceptional circumstances (which I've never had to deal with in my 30+ years of flying back & forth across the US border) you won't interact with US Customs & Immigration agents in the Chicago airport at all.  Effectively, your YWG–ORD flight will be treated the same as any other flight arriving to ORD from a destination in the USA.  You'll clear New Zealand Customs upon arrival in Auckland, and your baggage will in all likelihood be checked through to AKL in YWG (though you may wish to confirm this with the gate agents in Winnipeg just for your peace of mind.)  All you'll have to do in Chicago is get from one gate to the other, and 2h20m is ample time to do so, even given the terminal change.
Note, however, that returning will be different.  Assuming you are flying through Chicago (or another US destination), you will need to re-claim your luggage, pass through US customs, and re-check your luggage there.  Along with the time required to change terminals, this will be a more time-consuming procedure.
Comment: This is really helpful. Thank you


Can a company forbid an employee to exercise his common law right to self defence?

Question: If a company has a "no violence" policy could that override a person's common law right to self defence?
Comment: What do you mean with *override*? Do you think a criminal court will rule: "You broke that guy's arm while he was trying to stab you with a lethal weapon, which is usually self-defense, but your company says you are not allowed to do that, so you go to prison"?
Comment: Judged by 12 vs Carried by 6.. Some things just don't matter what "The Law" states. Not sure about the U.K. but in the U.S, some companies can fire you for using a firearm in self defense if they have a "No firearms" policy.
Comment: It might in some situations and not in others.  Do you have a specific fact pattern in mind?  Are you asking whether a company could discipline an employee for violently restraining someone who was about to slap him?
Comment: @DigitalFire That is an accurate statement of U.S. law.
Comment: You probably want to know if a UK company can legally fire a person for violating a violence policy, if the violence was in self defense (or defense of others?).
Answer: Some kinds of companies (e.g. freight shipping companies and banks) often do have those policies. The real issue is not whether those policies are permitted, but what the consequences are for breaking them.
The fact that a company forbids its employees from exercising a legal right doesn't mean that the employee ceases to have that legal right. It simply means that if the employee exercises that legal right, then the employee has breached the contract and may suffer the consequences for breaching that contract.
Violations of those policies are grounds for termination from employment, and this would probably not be void as a matter of public policy.
For an employee at will this is really pretty meaningless, although it could conceivably affect unemployment benefit eligibility. But, for a unionized or civil service employee who can only be fired for cause, this is a big deal.
But, in theory, a company policy does not impact the tort liability or the criminal liability of the individual engaging in legally privileged self-defense to anyone. This is because two people can't contractually change their legal duties to third parties with whom they are not in privity (i.e. with whom they do not have a contractual relationship). And two people also can't contractually change the terms of a country's penal laws.
The policy may be a defense of the company from vicarious liability for the employee's use of force in violation of the policy that gives rise to civil liability for the employee because the grounds for authorizing self-defense were not present.
If the employee using force did so wrongfully and was sued for negligence rather than battery, the existence of the company policy might also go to the issue of whether the employee was acting negligently since a reasonable person in the employee's shoes might have been less likely to wrongfully use force in purported self-defense if there was such a policy than if there was not such a policy (and instead there might arguably have been a legal fiduciary duty as an agent to protect the property and workers of the principal in the absence of the policy).
Comment: Well, generally those particular companies have the belief that attempting to resist robbery may escalate to a life threatening situation, so just give the guy the money. Situations where the guy comes in intending to harm someone isn't supposed to be the norm.
Comment: This opens up a lot of other questions, I hadn't thought of the unemployment being affected. But I suppose in the end, if you are dead you can't collect unemployment anyway. Going to have to defend your life no matter the policy in many circumstances.
Answer: As a delivery driver, someone might try to rob your vehicle. And you might have the legal right to prevent that with violence. So your company says you shouldn't do this, but walk away. You have the choice between self defense and walking away and having your vehicle stolen. In that case, you do as you're told and walk away.
On the other hand, someone might threaten you with a knife and you don't see any way to escape, so you have the choice between self defense or getting hurt. In that case you use self defence.


Enabling/disabling proftpd accounts with PHP and WHM

Question: I have a VPS with WHM/CPanel which is being used just by me.  It's utilizing proftpd.  I'd like to, via a PHP script, disable/enable a specific FTP account.  I've done this by having PHP call a bash script which removes/adds the user account line to /etc/proftpd/USERNAME password file.  However, in order to do this I have to give other write rights to /etc/proftpd/USERNAME.  This isn't ideal, and I'd be willing to do it another way.  It also seems like WHM is automatically resetting these permissions on a regular basis.  Does anybody have any ideas on a better way to deal with this?
Answer: That's how file permissions work. If you want a user/group to have access to a file, then they need the permission to do it. If you don't want your PHP/Apache user to have access to that file, then you can't use PHP to do the enabling/disabling.
You could, however, create a separate user to run PHP as for this admin panel. This way the PHP admin panel is able to enable/disable FTP accounts, but your other PHP users won't have access to the file. One way to do this is through suEXEC.
Comment: How do you run PHP as multiple users though?
Comment: You can do that using [suEXEC](http://httpd.apache.org/docs/2.0/suexec.html).


How would you describe the meaning of 弯 wan1?

Question: Specifically regarding its use to mean someone who is 'bent'? Someone who likes someone of the same-sex or is at least suspected of it? Does it include bisexuality? Is it polite or rude, subtle or overt? And when did you first start seeing this word?
Answer: gay = not straight = 不直 = 弯
I first heard this word a few years ago. It is often used by younger people.  It is a slang and should not be used in any formal situation. Like any slang, it can be rude or not depending on the context.
I do not believe it has any sexual reference though.
Answer: Yes, it's referring to homosexual recently.
It depends on the context. The word itself doesn't contain any offensive information.
Answer: It depends on the context, like CEO of Apple Cook admit he is bent in public media, may just state one truth, The word itself doesn't contain nay offensive information.
but if you are angry, and quarrel with someone, then you said the person is bent, then the guy will become crazy, it's really hurt.


Does anyone know an equation relating wingspan to gliding distance for a glider?

Question: I found this equation online but it is not from a reputable source and has no derivation. Could anyone help me by deriving this equation or even verifying its accuracy? I would love to cite and use this equation in my assignment so urgent help would be most appreciated.
Comment: There is no such simple relationship. The wings profile shape also influences the Lift-to-drag ratio.
Comment: Merely the fact that the text and example discusses paper airplanes, wing spans the tens of cm range, and a launch height of 2 m, should hint that the formula probably *isn't* applicable to the general case, or even to all gliders.
Answer: Your mystery equation is
$$\text{Distance} = \text{Height}\cdot0.5\cdot\sqrt{\pi\cdot e\cdot\frac{b^2}{f}}$$
Since the flight distance is the product of the glide ratio (or lift-to-drag ratio) L/D and height, the equation can be written like this:
$$\frac{L}{D} = \frac{c_L}{c_D} = 0.5\cdot\sqrt{\pi\cdot e\cdot\frac{b^2}{f}}$$
if we use dimensionless coefficients instead of the dimensionful forces. Now that does look familiar, right? Only something seems to be missing. And that drag area $f$ should be the wing area.
Now you asked for the derivation, and I've done that only with wind in this answer, so let's do it for the simpler case of a glider and without wind right here. You start with the question: What polar point gives the best distance for a given height? Or, in other words, when does the lift-to-drag ratio reach its optimum? To get anywhere, you need a simple equation for the lift-to-drag ratio, so I recommend to start with the equation for the drag polar
$$D = \frac{\rho\cdot v^2}{2}\cdot S\cdot\left(c_{D0}+\frac{c_L^2}{\pi\cdot AR\cdot\epsilon}\right)$$
The terms inside the big bracket are the sum of the parasitic and the induced drag coefficient and the term in front of the bracket is the product of dynamic pressure and wing area. It is needed to turn the coefficients into a force. The symbols are:
$\kern{5mm} \rho\:\:\:\:\:$ air density
$\kern{5mm} v\:\:\:\:\:$ velocity
$\kern{5mm} S\:\:\:\:\:$ wing surface area
$\kern{5mm} c_{D0} \:$  zero-lift drag coefficient
$\kern{5mm} c_L \:\:\:$  lift coefficient
$\kern{5mm} \pi \:\:\:\:\:$  3.14159$\dots$
$\kern{5mm} AR \:\:$  aspect ratio of the wing
$\kern{5mm} \epsilon \:\:\:\:\:\:$  the wing's Oswald factor, normally between 0.8 and 1.0
Since lift should be constant over speed for a glider, the optimum lift-to-drag ratio is when drag reaches a minimum. We express the lift coefficient by what it stands for and differentiate drag with respect to speed:
$$D = \frac{\rho\cdot v^2}{2}\cdot S\cdot\ c_{D0}+\frac{(m\cdot g)^2}{\frac{\rho\cdot v^2}{2}\cdot S\cdot\pi\cdot AR\cdot\epsilon}$$
$$\Rightarrow\:\:\frac{dD}{dv} = \frac{2\cdot \rho\cdot v}{2}\cdot S\cdot c_{D0} - \frac{2}{v^3}\cdot\frac{2\cdot(m\cdot g)^2}{\rho\cdot S\cdot\pi\cdot AR\cdot\epsilon}$$
Drag should reach its minimum when the derivative equals zero. We try to isolate the zero lift drag by dividing the equation by all what is collected around it:
$$0 = c_{D0} - \frac{2}{v^4}\cdot\frac{2\cdot(m\cdot g)^2}{\rho^2\cdot S^2\cdot\pi\cdot AR\cdot\epsilon}$$
Now bring $c_{D0}$ to the other side and re-insert the lift coefficient. The result is:
$$c_{D0} = \frac{c_L^2}{\pi\cdot AR\cdot\epsilon}$$
This means that the optimum lift-to-drag ratio is reached when the zero-lift drag equals induced drag. Total drag is the sum of both and in this case equal to twice the induced drag. Written in coefficients, this is:
$$c_D = \frac{2\cdot c_L^2}{\pi\cdot AR\cdot\epsilon}$$
Written as the lift-to-drag ratio, this becomes:
$$\left(\frac{L}{D}\right)_{opt} = \frac{\pi\cdot AR\cdot\epsilon}{2\cdot c_L}$$
Since the optimum lift coefficient can be expressed as
$$c_{L_{opt}} = \sqrt{c_{D0}\cdot\pi\cdot AR\cdot\epsilon}$$
this can be inserted and the lift-to-drag ratio can be written as
$$\left(\frac{L}{D}\right)_{opt} = 0.5\cdot\sqrt{\frac{\pi\cdot AR\cdot\epsilon}{c_{D0}}}$$
The wing's aspect ratio is $AR = \frac{b^2}{S}$, and the mysterious drag surface must be $f = c_{D0}\cdot S$, and voilá, the strange equation is proven right. When the correct values are used, it is valid from mini paper airplanes up to Jumbo Jets and above. Airfoil drag is included in the zero-lift drag coefficient.
Comment: You may add links and references to provide further reading (I m curious about where this equarion cones from and who uses it for the first time)
Comment: Dear down voters, if you don't understand the answer, please consider asking in the comments instead of blindly down voting what is a correct answer.
Comment: @ManuH: Sheesh - are you guys never pleased? It's the sum of parasitic and induced drag, plain and simple, and was most likely proposed first by Prandtl or one of his pupils.
Comment: it is not a question of being pleased but of having more references not only for further readings but also to ease navigation in external resources (I do believe it improve quality)
Comment: @ManuH: It is really the most simple and most often used of equations, so I was not expecting to defend its use. I added more explanation, but cannot really prove who has used it first.
Answer: You may be confusing wingspan with aspect ratio, roughly span over chord. More accurately, AR=square of wingspan divided by wing area. Still not the whole story on glide ratio, but it's most of it I think.
The FAA's Glider Handbook is a good starting reference.


Can I help Tor if I just have webspace?

Question: I'm thinking about how I can help Tor and its users. However I don't own big servers and also don't want to run a relay from my home. The only thing I have up to now is some private website. Is there anything I can do to help out?
Answer: First, you could set up a web site mirror for torproject.org. It requires approximately 8 GB of disk space. Detailed instructions for setting up a mirror are available.
Second, you could add flash-proxy badges to the web sites you run. This is done by simply adding an iframe to your HTML source. By including the badge, you can easily help users in censored countries.
Answer: The volunteer page on the Tor website lists several easy things you can do to help the Tor Project. A few easy ones are below.

If you're willing to spend a tiny bit of money (~20 USD per month) you can set up a Tor bridge relay via Tor Cloud.
Know any languages that Tor should be in? You can help with translating tor.
And of course, advocacy is always good (and you can use the web resources you already own).
You can also mirror the Tor website and/or downloads.
Finally, you can help by donating a bit of bandwidth to seed the torrent for Tails (though this really isn't that necessary... the seed/peers ratio is currently 418/25).
Comment: Just wanted to add that Tor Cloud will cost a bit more than ~3 USD per month (more like ~20 USD per month, depending on the region you decide to put the Tor Cloud instance in) if you do not qualify for the AWS free tier.
Comment: @Runa Oh, I didn't realize that; thanks. I don't know about the free tier, but I must have qualified for it as it only cost me about ~3.50 or so back when I ran one.
Answer:
However I don't own big servers and also don't want to run a relay
  from my home.

Probably, if you already use Tor from your home, and you have an external IP address, or may do port forwarding for a web server, you can easy help Tor with a middle relay, not an exit relay. This is simpler than even deploying a web mirror.
Meaning, your relay will not be banned by Google or any other companies who dislike Tor exit nodes.
Simple configuration:
# cat > /usr/local/etc/tor/torrc << EOF
SocksPort 9050
Log notice file /usr/local/var/log/tor/notices.log
RunAsDaemon 1
DataDirectory /usr/local/var/lib/tor
ControlPort 9051
ORPort 9001
Nickname relay
RelayBandwidthRate  1 MB
RelayBandwidthBurst 5 MB
ContactInfo anonymous firstname.lastname@example.com
DirPort 9030
ExitPolicy reject *:*
EOF

You can specify the relay bandwidth to gain optimal speed for your connection.
ExitPolicy reject *:* - set your relay as a middle in the Tor network. That way you increase the security of Tor network. In my humble opinion, this is the best way to help the Tor project, if you only have an Internet connection.
Start your relay with this configuration:
# tor -f /usr/local/etc/tor/torrc

Answer: Even if you cannot contribute any sort of network resource, you can still contribute money that will be used to pay operating costs for running relays. See, for example, https://www.torservers.net/
Comment: For a list of others see the question ["Which exit node providers can I financially support to run nodes on my behalf?"](http://tor.stackexchange.com/questions/240/which-exit-node-providers-can-i-financially-support-to-run-nodes-on-my-behalf)

Can I help Tor if I just have webspace?


Can I download Steam games on one computer (mac), then install them on another (Windows)?

Question: My gaming PC (which runs on Windows) has very limited bandwith: I can connect to the internet, but cannot download a game. However I do have a macbook with access to a network with unlimited bandwith. Is there any way I can download Steam games (for Windows) on my mac and then transfer them to the Windows PC?
Comment: Maybe he means that the Mac has access to an internet connection that doesn't have a download limit.  That would be unlimited traffic volume instead of bandwith though.
It's perfectly possible that he intends to use a portable harddrive to transfer the downloads from the mac to his PC.
Comment: Yes, I meant traffic volume. I can go to a university library with my macbook and access the network (with no traffic volume limit), but I can't move my desktop there without dislocating my shoulder or something.
Answer: Most multi-platform games share a large amount of data between platforms, even though the actual executable is different.
Let's look at Half-Life 2 and other Source games. They have lots of *.gcf files inside the Steam\steamapps folder. Those files contain all the multimedia assets (levels, audio, textures, 3D models...), and such data is identical to both Mac and Win versions. Thus, you can safely copy such files from your Mac Steam to your Windows Steam, saving you a few gigabytes of downloads. Then, the Windows Steam will still download Windows-only files, but they are quite small, maybe less then 100MB.
It also works the other way around: copying files from Windows to Mac.
What I've described should also work on most steamplay titles, that are available on Steam for Mac and Windows. (but you might need to copy files from subdirectories inside Steam\steamapps\common)
However, if you want to download a Windows-only game, then you might need to run the Windows version of Steam. You may achieve that using one of the many virtualization options (VMware, VirtualBox, Parallels), or even try your luck running Steam under Wine (but that might be too buggy).
Comment: Actually, there are lots of people who successfully run Steam through Wine, to my knowledge.
Answer: Valve's SteamCMD does just that.

Download and unpack steamcmd.
Cast this spell to log in, set a game directory and download the game. Fill in <your login>, or replace with "anonymous" if you're downloading a free game. Replace a 740 with your app id - you can see the app id in game URL on store.steampowered.com.

./steamcmd.sh +@sSteamCmdForcePlatformType windows +login <your login> +force_install_dir ../csgo_ds +app_update 740 validate +quit
Comment: Good answer, I didn't know that steamcmd allowed this!
Comment: This doesn't work for Windows only games unfortunately.
Comment: Didn't work for me either. Looks like Valve have closed the faucet 8(
I wonder if the game in question supports SteamPipe distribution model, as SteamCMD page states.
Answer: I'm not sure, but you might be able to do a back up of the games on the Mac and then transfer them to the PC.  Obviously the executables are different between the Mac and PC, so I'm hesitant to suggest this.  The sure fire way would be to use boot camp or parallels on the Mac to download the Windows versions, then back everything up (in the menu, Steam->Backup and Restore Games...) and transfer them via external harddrive.
Comment: I suspect it should work, you will have to download the windows binaries on the windows computer of course but most of the content (maps, textures, sounds, music) shouldn't be different between Mac and Windows.  It can't hurt to try, right?  Download on Mac, backup on Mac, Restore on Windows and let steam update the game (this should download the missing Windows binaries)
Comment: I got it right going from Windows -> Mac using Backup and Restore.
Comment: That assumes that Steam will even use the backups, which, as I said, may not happen.  If it does work, then yeah, the executable (and possibly some other files) will be the only things to need updating.


Android: Creating UML from Android Java source code

Question: i am looking for a program that can create automatically an Uml from my Java-Android source code.
I have tested ArgoUml, but it does not support Android.
Have any one a suggestion?
Thanks!
Comment: Could you clarify what you mean by "ArgoUML doesn't support Android."  There's nothing library specific about the Java reverse engineering.  You could RE the Android JARs (or sources) first so that all references are defined, but I'm not sure that adds much value to your diagram.
Answer: I can second what Tom Morris wrote in the comment above. Even ArgoUML should work. If you need improved (commercial) reverse engineering support you can try UML Lab - it can definitely read Java written for Android and has a free trial and free academic licenses (incl. support). If you have problems with that just comment here.
Answer: Yea, no point of trying to find Android specific tool for UML modeling. It doesn't exist and even if you happen to find one, it probably is an immature product.
What you really should be asking, and which has many old answers in other posts, is which product is best for Eclipse?
I did spend my whole current week trying to find either good UML tool or good RAD tool, for Android projects. I did test several products and regarding the UML I did hit to a gold vein yesterday: Altova UModel 2012
UModel has pretty simple UI, you can draw all the basic diagram types AND it can round-trip engineer SEQUENCE diagrams too. The last is something none of other products at the same price level (199€) could do, at least not forward engineer them. Probably one of the kind for much more expensive levels too.
It might not be perfect, but the best I have used and definitively worth of checking.
Answer: Maybe Omondo works for you. I didn't try it for Java-Android projects, but for usual java projects it works really good. Give it a try.


ATM charge in Euros or Swiss Francs

Question: I am from the Netherlands and I recently went to Switzerland. When withdrawing Swiss Francs from an ATM I got the option in which currency I wanted to charge the money on my account, Francs or Euros. I am wondering whether any of the two options is cheaper, better or smarter in some way and whether this depends on the current exchange rate of Francs-Euros?
Comment: swiss francs is the way to go :)
Comment: My bank uses a very fair rate of exchange (something to USD). Every ATM that has ever made me this offer has shown the rate somewhere on the screen, and it was always terrible.
Answer: It depends on the (retail) rate/fees your bank/credit card company is charging compared to the rate offered by the bank/money changer operating the ATM. Both depend on the current exchange rate but they are not identical to the interbank exchange rates.
Your bank should provide information on fees and exchange rates (for example here are the rules for ABN-AMRO), while the rate offered by the ATM operator is usually displayed at some point before completing the transaction on the machine itself.
I always go for "charging in local currency" and let my bank do the change. I vaguely remember reading somewhere that it's usually better and at least I know what the fees are and I avoid huge rip-offs. Beyond that, I don't actually know if it's always the smartest or cheapest solution.

ATM charge in Euros or Swiss Francs


A question regarding integrating

Question: Consider the function $ f(x) = (2x-1)^6$. I want to find the integral. Intuitively to me, it would be $F(x) = \dfrac{1}{7} (2x-1)^7 + c$, but for some reason you have to add $\dfrac{1}{a} = \dfrac{1}{2}$ too. I have never really understood why. Why?
Comment: Hint: $2x+1$ is not $x$
Comment: You should differentiate your result and you'll see why you have to divide your result by 2.
Answer: Think of inverting this via the Chain rule. Note that
$$
\frac{dF}{dx}
  = \frac{d}{dx} \frac{1}{7} (2x-1)^7
  = \frac{1}{7} 7 (2x-1)^6 \frac{d(2x-1)}{dx}
  = \frac{1}{7} 7 (2x-1)^6 \cdot 2.
$$
That last $2$ needs to be counterbalanced in integration, that's where the factor of $1/2$ comes from.
Answer: Correction: you need to "multiply" the integral by $\dfrac 12$.
Try differentiating $\quad \dfrac 17(2x- 1)^7 + C$:
$$\dfrac d{dx}\left(\frac 17(2x - 1\right)^7 + C = (2x - 7)^6 \cdot \frac d{dx}\left(2x - 7\right) = 2(2x - 1)^6$$
You don't end up with the original integrand, because we need to use the chain rule to differentiate.
To this end, you can think of integrating $(2x - 1)^6$ by letting $\color{red}{\bf u = 2x - 1}$, $du = 2\,dx \implies \color{blue}{\bf dx = \frac 12 \,du}$. Then
$$\int \color{red}{\bf (2x - 1)}{\bf ^6} \,\color{blue}{\bf dx} = \int (\color{red}{\bf u}^{\bf 6}) \color{blue}{\bf \frac 12 du} = {\bf \dfrac{1}{2} \int u^6\,du}$$
Comment: Nice Amy ;-))))
Answer: Differentiate your answer. You will see that an extra 2 appears in the denominator as per chain rule. So you need to divide by two so as to get the same function as the derivative.
Answer: The answer concerns the chain rule.  Notice that $F'(x) = (2x-1)^6 \cdot \frac{d}{dx} (2x-1)$.
In general, you cannot integrate $g(x)^6$ by treating $g(x)$ like $x$.  You can, however, integrate $\int g(x)^6 g'(x) dx = \frac{1}{7} g(x)^7$.  This is the basis of the technique of $u$-substitution.
Applying $u$-substitution to this problem, we would set $u = 2x-1$.  Then, $du = 2dx$.
$$\int (2x-1)^6 dx = \frac{1}{2} \int u^6 du = \frac{1}{14} u^7 + C = \frac{1}{14} (2x-1)^7 + C$$

A question regarding integrating


How to create DjVu format with selectable text?

Question: DjVu is efficient at compression, but sometimes the text becomes an image and non-selectable. Is there anyway to make sure that the text remains selectable? Which program should I use for this conversion?
Comment: Which OS are you working?
Comment: Linux/ Win 7. Any option in both.
Answer: DjVu files are normally image only. From these file sections can be selected as images but not as text¹.
If OCR was applied during, or after, the conversion to DjVu. Extra information is stored in the files that associate image areas with text. Only if that was done you can select text from such a file².
Applying OCR to a DjVu file can be done online. If you don't like that you could try this script, that uses Tesseract. Or you can go for commercial software such as Document Express.
¹  e.g. using  the djview program.
² In theory one could do OCR on the fly in the DjVu viewer, but I don't think any of the currently available viewers can do that.
Comment: Tesseract is not only an OCR engine, but also an Asgardian artifact of unimaginable power!
Answer: You can also use ocrodjvu with a selected OCR engine, e.g. tesseract.
Answer: You can use djvuxmlparser to insert XML with OCR text.
You can prepare this XML for example in FineReader.


Are there differences in air traffic services between western nations?

Question: What are the major differences (if any) between the air traffic control service in Europe vs. USA vs. Canada?
Comment: The Canadian ones say "eh" a lot.
Comment: Related: http://aviation.stackexchange.com/questions/1210/what-is-the-difference-between-icao-jaa-faa-easa-and-caa and http://aviation.stackexchange.com/questions/30158/where-can-the-faa-versus-icao-official-filed-differences-be-found
Answer: One of the big differences between regions is how aircraft operators pay for the service. In the US, the FAA is funded by taxpayers and fuel levies. In New Zealand (for example), aircraft operators are billed for use of air traffic control services. I don't know what the billing situation is in Europe.
Comment: Europe, being Europe, lets each country set their route charges, but has at least managed to unify the billing process. It is managed by Eurocontrol and is explained in more detail here: https://www.eurocontrol.int/faq/route-charges
Comment: In the UK, en-route ATS is funded by charging the airlines.
Answer: Very, very few. We (not just the West, but most of the world) all follow ICAO document 4444.
Comment: Just as a matter of historical oddities, though Saudi Arabia and India followed ICAO technically back in the 1990s you had to be religiously correct if you were talking to a religiously-sensitive controller. In Saudi, if you didn't start your initial transmission with "salaam alaikum", they would not acknowledge you. Also in India when Hindu nationalists started advocating that the name of Bombay be changed to Mumbai and Madras to Chennai, if we didn't get an answer when we said Bombay, we would try Bombay, and it worked both ways If you first tried Mumbai, a non-Hindu wouldn't reply.
Comment: @Terry, yikes! Just one more thing for a busy pilot to worry about.
Comment: This is not correct. ATC procedures in the USA differ greatly from ICAO SARPS.


configure web server in RHEL

Question: I have installed Request tracker in my RHEL 5.6 system. The RT installation succeeded and I have also installed apache web server, mysql, phpmyadmin that is required for running the request tracker tool. However, in the final step, it is mentioned as, for opening RT we have to enter http://serveripaddress/rt.
I have apache web server installed in my system. So, I am just typing http://localhost/rt in my system. However, it gives me a 404 page not found error.
I believe it has something to do with the rt_siteconfig.pm file. The file's contents are as below.
# Any configuration directives you include  here will override
# RT's default configuration file, RT_Config.pm
#
# To include a directive here, just copy the equivalent statement
# from RT_Config.pm and change the value. We've included a single
# sample value below.
#
# This file is actually a perl module, so you can include valid
# perl code, as well.
#
# The converse is also true, if this file isn't valid perl, you're
# going to run into trouble. To check your SiteConfig file, use
# this comamnd:
#
#   perl -c /path/to/your/etc/RT_SiteConfig.pm

Set($rtname , 'test');

Set($Organization , "www.uta.edu");
Set($Timezone , 'US/Central');

Set($WebPath , "/rt");
Set($WebPort , 80);# + ($< * 7274) % 32766 + ($< && 1024));

Set($DatabaseUser , 'rtuser');
Set($DatabasePassword , 'rtuser');
Set($DatabaseName , 'rtdb');

1;

I believe the webPath parameter has to be modified. But am not sure what to edit in it. Can someone please guide me in the right direction?
Update:
There is a file as rt.conf which sets the RT script path as below in this file.
AddDefaultCharset UTF-8
Alias /rt/NoAuth/images /usr/local/rt/share/html/NoAuth/images/
ScriptAlias /rt /usr/local/rt/sbin/rt-server.fcgi/

DocumentRoot /usr/local/rt/share/html
<location /rt>
       Order allow,deny
       Allow from all
       Options +ExecCGI
       AddHandler fcgid-script fcgi
</Location>

When I just run localhost I am getting the test page successfully and it specifies the welcome.conf file needs to be disabled, in case I do not want the test page. The welcome.conf file is present in the same path as the above rt.conf file. The path is /etc/httpd/conf.d/
Update 2:
The error_log file inside /var/log/httpd has the below line.
[error] [client 127.0.0.1] File does not exist: /usr/local/rt/sbin/rt-server.fcgi/

However, I do have the file rt-server.fcgi inside the above path.
Update 3:
The rt.conf file which is a configuration file for starting the RT is as below.
AddDefaultCharset UTF-8
#Alias /rt/NoAuth/images /usr/local/rt/share/html/NoAuth/images/
ScriptAlias /rt /usr/local/rt/sbin/rt-server.fcgi/

DocumentRoot "/usr/local/rt/share/html"
<Location /rt>
       Order allow,deny
       Allow from all
       Options +ExecCGI
       AddHandler fcgid-script fcgi
</Location>

Answer: Take a look at the Apache access_log and error_log log files under /var/log/httpd/. This will help to show you more information about the error you're encountering.
In your main Apache config file, /etc/httpd/conf/httpd.conf, confirm that Apache is listening on port 80, which it should be, since you're getting a 404 from the server.
You might need to set this variable in Apache:
#ServerName www.example.com:80

Lastly I'd change the string in the rt_siteconfig.pm file to localhost:
Set($Organization , "localhost");

Just to start. Once it looks to be working then adjust it and the Apache value so that they're the same.
Comment: I have added the error log contents as update. Also, I modified the ServerName as ServerName localhost:80 and also modified the rt_siteconfig.pm as you had suggested. I still get "404 page not found" error.

configure web server in RHEL


Why is Xcode's Search Navigator searching the wrong project's files?

Question: I have a large Xcode project for a game I'm building.  I recently switched versions of the animation framework I'm using (cocos2d), and to keep things clean, I went ahead and created a brand new Xcode project from scratch.
Afer creating the new project file, I made copies of all my source files in the filesystem, then symlinked them into the new project by dragging them into the Xcode Project Navigator.  Everything worked fine.
But here's where it gets weird.  Whenever I use the Xcode Search Navigator to do global text searches on my project, it searches files from the old project!  And only files from the old project!
The only conceivable explanation I can come up with is that Xcode is somehow recognizing my filenames as being the same as were used in the old project, and has decided to ignore the newer versions in favor of the old ones.  Is there any such cache or preference within Xcode that can do such a thing?  Keep in mind the paths are different, since the new project's files all exist in a brand new directory.  But the class names are the same.
In case this is relevant:  I once created an Xcode Workspace that included the old version of this project (but not the new one.)  I abandoned the workspace long ago as it was problematic, in favor of working with the project directly.
UPDATE: This appears to be an Xcode-related problem-- I have discovered I have the same lack of search-ability in all of my projects.  I uninstalled Xcode (I had the version that was still using the Developer directory) and installed the latest version (4.3.3) that does not use the developer directory, but I am still seeing this problem.
I am curious if anyone knows a way to wipe out Xcode's cache of project code indexes, if such a thing exists, that might potentially "reset" its knowledge of my projects and thus fix the situation.  Possibly something in the Library directory?
One last clue as to what might be happening:  In addition to the search navigator failures, I noticed one of my projects was still using resources that no longer existed in the filesystem-- again, making me think Xcode has cached information about my projects somewhere and is now using outdated versions of my files that no longer exist.  this post helped me solve that problem by resetting the simulator's content and settings, but the search issue persists.
Answer: Have you checked your Find Options?  This same problem was biting me and then I remembered I had added a custom Scope in 'My Scope' that directed XCode to my other project.  Changing this back to 'Workspace' fixed the problem.


Which anime really started the explosion of new isekai anime? Why didn't previous entries in the genre succeed in doing this?

Question: It seems to me that this genre really spiked in 2017, but we've had Digimon and Sword Art Online for years before. What really started this boom?
Comment: I'd say it has more to do with the proliferation of isekai web novels, which in turn ended in a proliferation of isekai ligh novels that were later turned into anime. Said web novel boom would be influenced by series like SAO, but probably the most important is Mushoku Tensei, which is still at the top of the charts in Syosetsu despite having ended a few years ago. I'm not well-versed enough on this topic to make a proper answer.
Answer: According to Gigguk's video Isekai: The genre that took over modern anime, paulnamida's comment is basically correct - there were isekai shows in the 90s, but they were mainly shoujo-focused, and the recent boom seems to mainly stem from the boom in light novels that came after the popularity of Sword Art Online (which was not itself technically isekai, but it set things up well for them).


Accuracy of OpenGL ES Instrument

Question: I'm developing a game for the iPhone.  I've decided that 30FPS is plenty so I've written some code that only allows the App to present the render buffer every 1/30 of a second.  When I tried to verify this with Instruments I got varying information.
On an iPod Touch (2009 edition, 32G) it reports 30 FPS for Core Animation Frames Per Second.
On an iPhone 3G I get wildly varying results.  And not just less than 30 FPS.  I see >30 FPS on a regular basis.  It actually seems to hang closer to 36-39.
To investigate this anomaly I added my own FPS to the app and update it once per second.  I stays right at 29 FPS on both devices.
So, does anyone have any suggestions as to what might be going on?  I expect Instruments to be accurate so it really concerns me that it appears inaccurate.  It makes me think I have a bug somewhere, but I sure can't find it.
Answer: Are you using CADisplayLink?  This might give you a little bit more precision on your main loop.

Accuracy of OpenGL ES Instrument


Is it permitted to take extra food from a buffet?

Question: If you're at a hotel and there is a buffet meal, and you can take as much as you want, is there any problem taking a few extra rolls or any of the food back to your room for later?
I assume if I'm not hungry or able to eat now then there would be no problem taking for later as I'm taking the same amount they are offering. But if I'm eating now, A. Do we think the hotel cares how much I take or if I take some for later?
B. Assuming the answer is no, if I ask a waiter and he says fine, is that enough? Or do I have to ask the management or somebody in a more authoritative position?
Comment: What the expectation of the buffet owner is most likely depends on which community/city/country the hotel is located in.  I know some places have guards to make sure you don't take any food or dishes away, and others have signs saying to leave extra food/plates outside your hotel door.
Comment: Not the same thing. If the owner openly *expects* you to take, then he has effectively given you permission already.
Comment: The rambam holds that if you take someones stuff, knowing that they will let you have it when you ask them, this is stealing.  So how is owners expectations relevant?
Comment: Similar: http://judaism.stackexchange.com/q/43412
Answer: The waiter is a representative of the hotel.  If he says you are allowed to take food out of the dining room, then go ahead.
However, most buffets (both in hotels and restaurants) have strict rules against removing food from the dining room.
Remember; the hotel paid for every piece of food that is there.  They make a general estimation of how much food to purchase.  If everyone that came took out several meals' worth of food to save for later, the hotel would lose money.
If someone has already paid for their meal, like in the case of a shabbos / yom tov hotel package, and that person is sick and in their hotel room, the staff will most certainly arrange a very generous portioned care package for that person, and likely deliver it to the room as well.
As always, "dina d'malchusa dina".  Follow the rules.  Always assume that it is forbidden to take food out of a buffet dining room, without permission.
Comment: Both this answer and the deleted answer said that a waiter is a representative of the hotel owner and empowered to grant permission. If you're checked in to the hotel, you probably received fine print, among which may well have been something like "No employee [or: No employee except the manager] is empowered to waive any of our rights" or "Our rights cannot be waived orally". (In the States, anyway.)
Comment: That stands to reason. (As always, sources for answers are good.)
Comment: For the purposes of someone who wants to take an extra roll up to his room, the waiter suffices.  If the manager would see Reb Yid with some food in hand, and he asks, "Where did you get that?"  If Reb Yid says, "The waiter said I could take it", then the management won't pursue it further.  If he didn't ask anyone, then he might be in trouble, and it constitutes a chillul hashem.  Just like a waiter is empowered to send food back and use the restaurant's resources to prepare a substitute dish, a waiter is empowered to allow some food to leave the dining room of a buffet.
Comment: Related to the above comments: http://judaism.stackexchange.com/questions/14586.
Answer: I think you must ask the manager (based on what I heard from HaRav Musafi Shelita).
I heard from him that you aren't even allowed to use a phone printer computer or fax machine at a work place without permission. This is a Kal WaHomer. Because here the hotel is losing money if someone takes too much- they calculate what they order.
Comment: @H'Gabriel, please [edit] all information and reasoning that's relevant to your answer into the answer itself.
Comment: What did you hear from him, that this answer is based on?
Comment: I heard from him that you aren't even allowed to use a phone printer computer or fax machine at a work place without permission. This is a Kal WaHomer. Because here the hotel is losing money if someone takes too much- they calculate what they order.
Answer: Part one of your question seems to me that it should be case by case, depending on what the hotel intended.  You would have to find that out in a reliable way.
Part two - I asked a dayan in Lakewood about if I can rely on the "psak" of the sales reps if I ask about return policies, namely if someone buys a camera, uses it for their big simcha, then uploads the pictures and returns it, and the sales rep says they are OK with people buying it with that intent, can I do so, and he said the sales rep is not in a position to give such allowances since they own no authority in the company.  The same should apply to the waiter.
Comment: Wouldn't it just depend what kind of authority the company gives their sales rep?
Comment: @DoubleAA It could be.  He assumed that as a status quo assumption someone without any degree of ownership does not have the right to make such decisions.  Wouldn't it be more difficult to ascertain the degree of authority a company gives than to just find out the policy itself?


Why am I getting too many downvotes on my posts?

Question: I am not a newbie at SE and SFF.SE. I know how and what to post here. But still, I am getting too many downvotes. Why? How to reduce that?
Comment: Ha.. Ha.. Got downvotes even on this..
Comment: I think it means that the question about the down items is trivial.
Comment: Downvotes on meta simply mean "I disagree with you", and don't mean you're wrong, or off-topic, or anything of the sort :)
Comment: @Andres Are you saying that downvoters are not agree with me.. Means, I am not getting downvotes on main site.
Comment: +1 Some users are very protective about some of the tags and topics. Whenever I ask or answer a question about a certain topic, I realised a specific user is downvoting my every move. That person also follows my every step even if it's a harmless comment and goes full berserk on me about sourcing and referencing about my claims. _About a fictional topic._ Even if you ask the perfect question for the perfect topic and everything looks perfect with your answers, some annoying weirdo goes after you. Just because he/she can and they want to be a chosen one. Forums don't have anything against it.
Answer: Let's have a look at the negative-scoring posts from the first page of your questions.

How to identify a magic user? (Closed)

Duplicate

How did Harry make glass disappear in London zoo without a Wand? (4 CV)

Children performing magic before they get wands is covered explicitly several times in canon.
And covered in another question

https://scifi.stackexchange.com/questions/21841/why-is-star-trek-movie-reboot-floating-around-kirk (Closed)

Who else? Kirk is by far the most well known Star Trek captain, and the most likely to get non-trekkies into theaters to see it.

Why was command of USS Enterprise NCC-1701 given to Christopher Pike from Kirk? (3 CV)

I think you have (at least phrased) this backwards, Kirk replaced Pike. And it seems the answer you were looking for (at least accepted), the alternate timeline, was covered in the movie.

How many times Harry Potter movies didn't follow books? (Closed)

"Please, list up." Evidently you don't "know how and what to post here."
And it's a duplicate anyway.

Why did cage of Q need to pursue USS Enterprise-D with a finite Warp speed?

Clearly it didn't need to go at finite speed, Q doesn't need to do anything. But it makes for a better visual effect.
Read and consider this comment.

Now, the downvote tooltip is

This question does not show any research effort; it is unclear or not useful

You have 3 duplicates, 2 thoroughly covered in canon, obviously those didn't "show any research effort." And I suspect some downvoting was for "not useful." And I think people give less slack to users who have been around a while than they might give a newcomer.
Finally, I hate to say it but it's likely some of your downvotes were because of your English. I know it isn't your native language, and I'm sure you try hard, but sometimes it can be hard to understand what you're asking.  Users really should try to fix your posts rather than just downvote for this, but it doesn't always happen.
Comment: The close votes are for general reference, because the alternate timeline is a big part of the movie.
Comment: Re-read the comments on [this answer](http://scifi.stackexchange.com/a/21813/3267).
Comment: Next Q from here: http://meta.scifi.stackexchange.com/questions/2139/which-type-of-questions-does-sff-se-community-expect
Comment: I've just laughed on your logic against `Why was command of USS Enterprise NCC-1701 given to Christopher Pike from Kirk?` ~> If you read the description, its not asked in backwards. I was asking for the logic how can you say TOS wasn't happened in new timeline.  Now, explain close votes on it.
Comment: How does movie say that TOS wasn't from new timeline?
Comment: That's the answer. Those are logically pulled from canon.. Don't use that to judge the question. Otherwise, all questions here would be poor.
Answer: I'm posting this as a 2nd answer because it's quite different from my first answer and it only occurred to me after re-reading your question for the fourth or fifth time.  And this may be the root of the issue.  The problem is I'm not good at sugar coating and this answer assumes that since you have asked for a critique of your posts that you're willing to examine what you're doing.
Look at two sentences in your question:

I know how and what to post here. But still, I am getting too many downvotes.

They're almost contradictory and that's the heart of it.  I know you've been here a good while, but downvotes are the community's way of saying one's posts are less than stellar.  So the very fact that you're getting so many downvotes is an indication you may not know how to post here.  My other answer prompted you with some questions.
It seems to me if the community is voicing the opinion that your questions are not good, then you may feel you know know how to post, but you are missing something important somewhere along the line.  While we have tried to say what it is, there doesn't seem to be one clear answer yet.
I would suggest taking the downvotes as an indication you are doing something wrong-- and you've started that process by asking for help here, so you're doing something good.  But take it farther.  Look at your posts, then start comparing them to posts with low votes ore multiple downvotes.  Look at unpopular posts and see what makes them unpopular.  Then compare them to your posts for common elements.
Most would say look at popular and liked posts and do more like that, but I find, in writing, I learn more from looking at bad examples and knowing what not to do than just reading what's good.
While I've learned a lot from reading Shakespeare, if I want to use all the rules he used, I'd be writing just like he did.  But I can't tell you how much I learned from watching bad writing in Lost in Space and other shows I liked as a kid but now know are poorly written.
If you look at a great writer and try to be like him or her, you're just imitating, but if you look at bad examples and learn what NOT to do, that still leaves things open for you to find your own style that's good.
Comment: I'm unaware of rants, whether mine or anyone else's.  But that very comment seems to contain the seeds of the big answer for you: If you don't like advice or someone else's answer, rather than listen to what they're saying, are you blaming them or saying they're wrong?  Is it possible the problem the problem might be that you insist you are right rather than accepting feedback you may not want to hear?
Comment: I want to find where I am wrong. Now, I am unable to visualize what's allowed here. Ignore downvotes on dups. and try answering it: http://meta.scifi.stackexchange.com/questions/2139/which-type-of-questions-does-sff-se-community-expect
Comment: Comment on your rants against this question: I have written I know how and what to post here because I get comments on downvoted questions around this. Its not that my questions are poor based on subjectivity, but on this: Speculative questions aren't allowed. Its poorly researched because its covered in canon. What's this?
Comment: I didn't meant to say rant with its exact meaning. I was talking about your 2nd paragraph..
Comment: Still, it seems the community disagrees with you, which is why I said what I did and the rest of my last comment would still be something to think about.
Answer: It's been a while since I've had time to watch questions and answers closely, but a few general thoughts would include watching trends.  Are some types of your questions getting more downvotes than others?  And what is different about your questions, when compared to other people's questions?  I don't mean in terms of subject matter, but in how you are asking them and what you say?
Answer: Some of them you were just unlucky to encounter crabby users. E.g. people who downvote duplicate questions despite the fact that there doesn't appear to be an obvious way to have known it was a duplicate when asking. That's quite rude, IMHO but you can't escape it. Vote to close, flag, but don't mark it as a BAD question. (this is different if googling for question's title brings the SE dupe as first hit - THEN it's a bad Q).
Some of them are downvoted - again, IMHO, not very fairly, because "the answer is obvious if you watched the episode/movie". Again, I think that's both rude, AND wrong. The question's audience is not only those who have perfect memory or obsessively watched some episode 10x times. It could be someone who watched it ways back and doesn't remember details, or didn't watch at all. As I have previously commented to someone who was being an a-hole in the comments on a similar vein, many of THAT user's questions seemed way trivial and idiotic to people very familiar with the works. "Trivial" and "obvious" are too subbjective to be used as a valid reason to DV.
Comment: I make an exception when it's from a book, and the OP states he doesn't remember the book and doesn't own it, and googling the answer is not easy (e.g. because excerpts aren't searchable or movie clips aren't online -- if it's from a movie -- etc). To me, the downvote button means "this user is too lazy to do basic research and show some effort".
Comment: Almost everything is subjective in the realm of SF&F. Like Jeff Atwood tweeted a while ago, almost every question on scifi.SE can be answered with "who cares?" :) That said, I hold the opinion that if the answer can be found watching the movie or reading the book. _casually and without paying special attention to background details_, then it deserves all the downvotes it gets. Example: if at any part of the movie/book there is exposition explaining that particular question, you deserve the downvotes. Double downvotes if googling brings the result in the first page.
Comment: `"the answer is obvious if you watched the episode/movie". Again, I think that's both rude, AND wrong. The question's audience is not only those who have perfect memory or obsessively watched some episode 10x times.` - If that's supposed to be a reference to the comment of mine linked in the other answer, then I _strongly_ disagree.  Minor details?  Sure, I'll agree, you're right.  But in that particular case, it was the entire plot point of a large chunk of the episode, with the answer stated explicitly by Q multiple times:  He's testing humans.
Comment: @SachinShekhar The community does. Also, use common sense. You'll still get some downvotes -- after all, this matter is subjective. But don't worry too much: all of us get downvotes. Not paying attention in a movie or book is not a terrible offense, either :)
Comment: In general, while I totally disagree with Joel's Summer of Love as pertaining to StackOverflow (where most "rudeness" is due to evil leechers trying to use SO to do their work/homework); on SFF I feel that we do have a major rudeness and unfriendliness problem. Hell, I get random drive by no-reason downvotes all the time. Or obnoxious "you should have known that from reading the book" comments.
Comment: @AndresF. - Last time I checked, SE motto wasn't "we only accept questions with tricky non-obvious answers". See the whole Joel Spolsky and moving the turtle in logo thing. And that's in a very well defined area like programming. SFF is too subjective to honestly claim that something is trivial from just reading source material. As I noted elsewhere, ~50% to 80% of Harry Potter questions can be answered by easily remembered quotes from books.
Comment: @DVK Not sure what Joel said. Link? :) I'm sorry, but I disagree with you on this: nobody said anything about "tricky", but the downvote button does say "This question does not show any research effort; it is unclear or not useful", and it's what I use it for. (PS: I'd downvote those questions you mention too, _if_ the OP doesn't claim he/she doesn't currently have the books handy, and _if_ google returns the answer in its first page. Or if it's in the first paragraphs of Wikipedia, too).
Comment: @Andres Who decides what's the background detail...
Comment: Why? You didn't read THE book? You should stop whining and read THE book instead. THE book is far better anyway!
Comment: @DavRob60 The book is very big. I didn't have time to read that..
Comment: @Izkata Do you think I was toying the community with that question?
Comment: @Andres Alright. I agree. :)


The USA debt and the individual investor

Question: There is a lot of hype about the national debt of the USA being incredibly large, and I wonder if this has any implications about an individual investor? I understand that the risk of having a large national debt is that the government may be unable to pay for its bonds. But if an investor holds only stocks of private companies, does he have any reason to worry about this? If so, what can an investor do to protect against this?
Comment: Well - if you take it literally, the question is do I as a private investor need to worry about the financial collapse of my national government? I believe  economic history is fairly clear on that one.
Comment: This question seems to me to be way off topic.  If a government fails to meet its debts, we can speculate forever about the political consequences and how those consequences might affect various subsectors of the economy (presumably some positively and others negatively).  There is perhaps a good question to be asked about how all this plays out in some specific political-economy model, but the question currently seems to ask what could happen in *some* model, and the answer, of course, is anything.
Answer: Sure, government borrowing affects the small investor in many ways.
For starters, there is only so much money available for borrowing. The more the government borrows, the less there is available for everyone else. This pushes up interest rates and in some cases will make it impossible for the least desirable borrowers to get a loan at all.
If the government defaults on its loans, this would cause many problems. Details are debated by economists, but I don't know anyone who says it would be good for the economy.
As to what you can do personally to protect yourself ...
Of course there are political things you can do, like voting for and otherwise supporting candidates who campaign on economic policies that you believe are more desirable.
If you are worried about the government defaulting on its bonds, then don't buy government bonds.
If you are worried about the macro-economic effects of a government default, you could invest money in foreign countries that you believe have wiser debt policies.
Invest in companies that are more likely to survive or prosper in an economic downturn. Like, if there's a depression, people will still need food, so food-processing companies are probably relatively safe investments. If people are suddenly made poor, they're probably not going to buy frilly luxuries like video games, so those might be poor investments. But the rich tend to manage to get along no matter how bad things get, so services for the rich, like luxury yachts, might do well regardless. There are plenty of people out there who do research on this sort of thing that you could consult.
People who are deeply worried about government default often advise people to invest in commodities, especially gold. If the government goes bankrupt and takes large sections of the economy down with it, precious metals, especially gold, tend to hold their value.
If you're really worried you can build a compound in the wilderness, stock it with food and other supplies, and have an arsenal of guns to protect you from the marauding hordes after the economic collapse. :-) (Okay, I say that flippantly, but if you're convinced that things are going to get very bad, that would be a logical thing to do.)
Comment: Thanks, this seems like a good answer. I don't understand the down-votes.
Comment: Yeah, I wish when people downvoted they would give a comment saying why. Do they think the answer is unresponsive to the question? That important facts are incorrect? That it is unclearly worded? Etc. Oh well, I'm not going to agonize over it.


How to say "to google something" in French?

Question: As a german speaker with a French background, I was wondering how "to google" would translate in French. "Googler qqch" seems wrong.
Comment: It seems wrong and yet it is tolerated. It is defined on the [Wiktionary](https://fr.wiktionary.org/wiki/googler). You can also choose "_rechercher (sur Google)_", but it is quite longer.
Comment: That would mostly depend on the context. To a friend, you could use the mark as a verb. In a formal context, you definitely wouldn't.
Answer: Google is a trademark for a popular search engine (moteur de recherche : Franceterme, Termium, GDT). Only Termium lists the verb based thereupon and provides a translation, "googler"; incidentally it also lists the googler (noun), the person who uses the search engine to find information on the Internet, and provides "googler/googleur(Fr.)" in that case.1 The verb has certainly been used in French.

Collins suggests "chercher + sur/avec" as suggested in another answer. It also covers this typical scenario where the search term is explicitly stated within the sentence using the verb "taper" : "J'ai tapé `vols bon marché pour Mumbai' dans Google." (Collins). These verbs are very usual in context.

1. It's interesting to look back on some articles from 10-15 years ago on the topic; an article (2003) references concerns for the "dégénérescence de la marque" when used casually as a noun etc.. Another article (2006) claims Google recommended against using their name as a verb and preferred « effectuer une recherche sur Internet avec Google ». Please note the answer takes no stance on whether the verb to google means to google with Google or to search with any search engine in English; the AmHDoEL entry didn't specify and it is off topic. The point is just Termium has identified some sort of meaningful use in French and connected it to the English form. Franceterme, GDT and Larousse don't have the verb: they have the "moteur de recherche". "Googler" yields no ngrams from the French corpus.
Comment: Parfois on dit "*J'ai cherché sur Gogole ...*", en pensant à Nicolas Gogol dont le mysticisme et la fin de vie donne l'image d'un homme 'original et dérangé' :) .
Comment: 'Google' as an English verb (at least in my neck of the Am-English-speaking world) has already "succumbed" to the double-edged sword of trademark genericization/dilution (one can google with Bing, just as one can xerox with a Canon here in Va.), whereas this seems not to be (or less of) the case in Francophonia.  I find it interesting, telling even, that in the English entry on the Termium page you cite there are ellipses [of the unnecessary, wink-wink, the following is added solely to appease our (and Google's) lawyers variety] following "Web," whereas none are found in the French entry.
Answer: You may use "Google-le" when talking about a specific subject. Otherwise there is an expression: "Google est ton ami" : "Google is your friend" to obviously suggest someone to do his own research...
Comment: Good point. I actually heard "Google est ton ami".
Answer: I'm afraid no one-word answer to this question could be accepted as a valid French verb. Any applicable one would be nothing but convenient jargon. I have heard googliser as well as googler. A proper way of saying that would simply be (re)chercher sur Google.
In English though, I thought "to googlize" was more commonly used as "to google" for this meaning, but it might simply not be the case anymore. It's just a matter of fashion in my opinion...
Comment: In English I've never heard "to googlize" until now.
Comment: I have **heard** the same ones *googler* [gugle] and *googliser* [gugœlize] with a preference for the first one among practitioners of the fact...
Answer: One would say "chercher sur Google" or "faire une recherche sur Google" but one can expect that "gougler" would probably be understood even though it would sound a bit strange as it has not been officially frenchified yet.


How can i find the lenght of a side of a polygon with known number of sides that has a circle with known diameter inscribed in it?

Question: How can i find the lenght of a side of a polygon with known number of sides that has a circle with known diameter inscribed in it? I'm a web-developer intereseted in this certain problem, that would be the solution to one of my aplications.
And also is there a relation betwen a polygon that has a inscribed polygon with knwon distance betwen their sides?
It would help even an answer for particular cases like pentagon or hexagon.
I hope i've been specific enough :)
Answer: For an $n$-gon the relations between circumscribed radius $R$, inscribed radius $\rho$ and side length $a$ are
$$ \frac \rho R = \cos\frac\pi n $$
$$  \frac a R = 2\sin\pi n$$
$$ \frac a \rho = 2\tan\pi n.$$
For the second problem: If you have a polygon with side length $a$ and inscribed radius $\rho$, then the side length $a'$ for a smaller $n$-gon at distance $d$ is given by
$$ \frac{a-a'}{a}=\frac d\rho$$
i.e.
$$ a'=a\cdot\left(1-\frac d\rho\right).$$
Of course other data such as inscribed or circumscribed radius scale by the same factor $1-\frac d\rho$.
Answer: You don't even need the "known distance". If the "known diameter" is $d$, then let the vertices of the pentagon be $A, B, C, D, E$ in counterclockwise order. Let $O$ be the center of the circle, and let $M$ be the midpoint of $AB$. Consider the right-angled triangle $AOM$; note that $\angle AOM = 360^\circ/10 = 36^\circ$. Hence, by trigonometry, $\overline{AM}/\overline{MO} = \overline{AM}/(d/2) = \tan(36^\circ)$. Use that to solve for $2\overline{AM}$, which is the side length of the outer pentagon.


New Profile Design

Question: It seems like many of the other Stack Exchanges have adopted the new profile design ( Stack Exchange, Workplace, Arqade, Webmasters, etc. I think it's a pretty cool design and was wondering why we're still using the old profile. Any chance we can upgrade to the new profile prototype?
Comment: There are many cool data sections available in the new profile layout, but I must admit I find some parts very confusing and hard to focus on, like the new "Top tags" section.
Comment: I agree with @birgire here. Although some features are nice, I'm not very fond of it. On mobiles it just don't work out unfortunately. My opinion is, keep our old dinosaur profile pages until everything is sorted with the new system :-)
Comment: @birgire I'm curious to hear more about what you find confusing in the new profile layout. If you'd like to chat, my email is in my profile (I work here).
Comment: @PieterGoosen Same as above — curious to hear more.
Comment: @ThomasOrozco the personal info section is missing on mobiles, the profile tab is missing important info which is quite obvious when you visit and compare your personal page on SO and WPSE from a mobile device. The mobile section, in my opinion took a downgrade. Also as birgire already pointed out, the top tags section is a bit scrambled and quite overwhelming on mobile devices, and then the rarest badge section does not make sense. Apart from that, the overall feel on large screen devices is not bad. As I said, my major issue is with mobile devices
Comment: Thanks @PieterGoosen, this is helpful.
Comment: My pleasure and good luck with this new feature :-) @ThomasOrozco
Comment: @ThomasOrozco Many good things in the new layout, but regarding the "Top Tags", I think it's the different layout in each line, tiny font and the whitespace usage there. This section is also missing the main title underline, like the other sections have. Here the tags are in different style than in the "Badges" section. Many users don't write profile description, so there's lot of white space in the center. The "Top Meta Posts" has different type of counting than the other sections that use parentheses. The word "posts" comes up a lot, but it's not clear at first, if that's Q, A, or both.
Answer: For us (Stack Exchange) to enable the new profile on Wordpress.SE, we first need to complete CSS updates, which require a bit of design work.
This old-ish announcement explains this in more detail: New profile pages are out - bugs and feedback master list.
And, you can see the the list of sites that have yet to be converted here (which as you can see includes Wordpress.SE):  List of communities with base css updates completed.

New Profile Design


Unity - Google Play Games Services Real Time Multiplayer on close WaitingRoomUI() method?

Question: Is there a method that is executed when the WaitingRoomUI is closed?
Any help is greatly appreciated, thanks.
Answer: Since waiting room is being started using startActivityForResult. You need to catch the result in onActivityResult() method of the activity that started the waiting room.
<code>@Override
public void onActivityResult(int request, int response, Intent intent)     {
    if (request == RC_WAITING_ROOM) {
        if (response == Activity.RESULT_OK) {
            // (start game)
        }
        else if (response == Activity.RESULT_CANCELED) {
        // Waiting room was dismissed with the back button. The meaning of this
        // action is up to the game. You may choose to leave the room and cancel the
        // match, or do something else like minimize the waiting room and
        // continue to connect in the background.

        // in this example, we take the simple approach and just leave the room:
        Games.RealTimeMultiplayer.leave(mGoogleApiClient, null, mRoomId);
        getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    }
    else if (response == GamesActivityResultCodes.RESULT_LEFT_ROOM) {
        // player wants to leave the room.
        Games.RealTimeMultiplayer.leave(mGoogleApiClient, null, mRoomId);
        getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    }
}
</code>
}
You may read the full implementation in the link below.
https://developers.google.com/games/services/android/realtimeMultiplayer


Way to measure wavelength of infrared radiation?

Question:
I am wondering if there is a device for measuring wavelengths of things. As semiconductors emit infrared radiation and I would like to know what is the wavelength it is so I can check to see if its going to be interfering with my project.
Thanks in Advance,
Dean
Answer: You probably want to know the amount of light of each different wavelength (a.k.a. light spectrum) the semiconductor is emitting. The device you use for this is a spectrometer or optical spectral analyzer. What semiconductors are you using? Unless you are using an uncommon semiconductor, you can probably find the emission spectrum online.
Answer: Do you want to know the distribution over a broad range of wavelengths, or do you have a single semiconductor device emitting at a single wavelength that you need to measure? And do you know the approximate wavelength? "Infrared" covers a pretty broad range, from wavelengths that are not-quite-visible to wavelengths that are practically microwaves.
If you have a single source, the best way to measure the wavelength is using interference. If you've got an easy way to see the light, you can just sent it through a diffraction grating of known spacing, and measure the spacing between the bright spots. Or, if you want to be more precise, you can use a Michelson interferometer (which is what's in a lot of commercial wavemeters).
If you're worried about thermal emission over a broad range of infrared wavelengths, then you need a spectrometer of some sort. A grating monochromator world be the simplest thing, and probably work over the largest range of wavelengths. If you care about near-infrared (shorter than about 2 microns), there's this commercial unit, which I haven't used, but the other spectrometers we have from them are pretty good.
Answer: You are looking for a lambdameter. There are various ways to build one, but you can also buy one, e.g. http://www.photonicsonline.com/product.mvc/Lambdameter-LRL-005-0001 .
They are often spectrometers, but, if you are analysing light with a narrow spectrum, an interferometric system gives you the best precision. The idea is to build an interferometer with a moving mirror, and counting the fringes during the movement gives you the wavelength if you know the amplitude of the movement. Of course, the best way to know the amplitude of the movement is to count the fringes of a known radiation (usually given by HeNe laser)


CiviCRM Spark trial and pricing?

Question: Am I missing something obvious, or is there nothing in the CiviCRM Spark sign-up process that says what the billing period is? It says 'CiviCRM Spark Hosting - $ 9.50' and that it'll renew automatically, but not how often. Does anyone know? I'm guessing monthly, but would need to know before trying it. Or even better, is there a free trial somewhere that I can't see?
Answer: Looks an interesting service and will suit many and certainly a good way of getting started. I can't see a contact email for the service or a list of the extensions included. I think I've probably already grown beyond this service as I am using a few extensions, but had it been there when I started, it would probably have been quicker that getting it going on another hosting provider.
But to answer you question - it does look to be monthly - see the T&Cs linked from the signup page (direct link https://civicrm.org/spark-terms-and-conditions).
Comment: I really wish there was a CiviCRM SAAS that had a monthly fee structure similar to SquareSpace and NationBuilder
Comment: There are a few. Check out CiviDesk.com, civi-go.net (iXiam), Blackfly, Symbiotic.coop. Admittedly, they all have a different focus / experience.
Answer: It's per month. Thanks for raising this issue, we will clarify the site.
You can also contact us on the CiviCRM chat: https://chat.civicrm.org/civicrm/channels/spark or by email: email@example.com.
As per the T&C, you can also ask for a refund after 30 days, if you were not satisfied with the service.
Comment: I agree, but it does involve work/expenses on our end. We do not monetize this service in any other way. We cover our costs and ensure that the service is reliable. We hope that CiviCRM Spark will help provide a better first impression of CiviCRM.
Comment: Thanks. Asking for a refund isn't really the same as a trial period though. But I've found a web host offering free hosting for charities, so I'm evaluating CiviCRM that way.

CiviCRM Spark trial and pricing?


How does a Tor client pick Tor nodes for circuit creation?

Question: A Tor client initially contacts Directory Authorities to fetch the consensus (i.e. a file containing all relays of the Tor network at that time with details such as IP address, exit policy, public key etc.)  As soon as a Tor client gathers sufficient information about existing relays, it tries to build circuit paths. How does the Tor client choose which nodes to use for a circuit?
Answer: Taken from Tor Path Specification document:

We choose the path for each new circuit before we build it. We choose
  the exit node first, followed by the other nodes in the circuit. All
  paths we generate obey the following constraints:

We do not choose the same router twice for the same path.
We do not choose any router in the same family as another in the same path. (Two routers are in the same family if each one lists the
  other in the "family" entries of its descriptor.)
We do not choose more than one router in a given /16 subnet.
We don't choose any non-running or non-valid router unless we have been configured to do so. By default, we are configured to allow
  non-valid routers in "middle" and "rendezvous" positions.
The first node must be a Guard node.

Relay selection is not uniform but weighted by relay bandwidth. Faster relays have a higher probability of being picked than slower ones.
Comment: It should be added that the relay selection is not uniform but weighted by relay bandwidth. Faster relays have a higher probability of being picked than slower ones.
Comment: Faster relay do not have a higher probability. Tor tries to choose a relay from the set of Fast node with priority as a matter of design. Relay bandwidth if provided by consensus. Tries to choose relay to satisfy the most requests and likely to succeed from historical use. The type of traffic is a deciding factor.
Answer: I want to add some details to alaf's answer:
A Tor circuit consists always of three nodes. Longer paths may hurt your anonymity in the case of Tor.

Exit node is chosen.

Your torrc might have some settings about which exits to (not) choose.
Tor chooses an exit relay which actually allows you to exit the Tor network. Some only allow web traffic (port 80) which is not useful when someone wants to send emails.
The exit relay has to have available capacities. Tor tries to choose such exits which have enough ressources available.
Some exit relays are considered as bad exits. They might listen in your traffic, change your traffic etc. Tor does not choose them (as long as you don't explicitly allow it).

Entry and middle relay is chosen.

Tor tries not to choose relays which might belong to the same operator.

Relay is not in the same /16 subnet. So Tor only uses one IP address in a range from 10.12.0.0 to 10.12.255.255 (10 and 12 can be any number).
Operators who run more than one relay should declare those relays their 'family' (There is a special option in the configuration). Tor doesn't choose more then one relay from a family.
A client can also set such a family option. This will also be respected.

Tor chooses special long-lived relays, so-called guard nodes. In 2006 an attack was discovered (see Locating hidden servers for a motivation) and as a result guard nods were introduced.
Answer: The other answers give an overview of what happens, but if you want to learn the consequences of the path selection algorithm you need to have a simulation based on real data. Fortunately there now is one – TorPS which was written for the paper "Users Get Routed: Traffic Correlation on Tor by Realistic Adversaries".


How to remove web shops from search results?

Question: Whenever you search information about some product you get bombarded by CEO optimized shopping sites and it is hard to get some real information about some product. If it is a really popular product then just adding +review could help you get closer to what you are looking for, but still with lots of unwanted web shops in results.
If it is not a really mainstream product but still sold on thousands of web shops then it is almost impossible get anything other that web shopping results. Sometimes adding +wordpress or +forum helps, but not always.
So I'm wondering has somebody came up with certain set of query options that would filter out web shops? Maybe something like -shopping -cart ? Yeah, it is not that simple. If there is any search kung-fu master please share your kung-fu :)
Answer: If you add -shop to the search you will usually get the worst offenders gone.


How much Old Monk is famous in other countries?

Question: I believe that this Rum from India is not limited to India but also having fans from around the world. Is this available in other countries? If it is, what is usage rate?
Answer: There is no such Rum for sale in all Latin America, in common liquor stores, malls or grocery stores. Maybe you can find one in a specialized place, or importing it via internet.
Answer: Old Monk Run is sold in Canada, where I presently reside, but it is not all that popular here.

Old Monk is sold by some retailers in Russia, USA, UK, Japan, UAE, Estonia, Finland, New Zealand, and Canada. It has also been ranked 5th among Indian spirits brands at the Impact International's 2008 list of "Top 100 Brands At Retail Value" with a retail value of US$240 million.
There was a time when Old Monk dominated the rum market. There were other brands also but none came close in quality or popularity. About eight million bottles were sold annually. Today the sales are a quarter of that and they continue to decline. There were recent rumours about Old Monk closing down but it's makers Mohan Meakin Ltd, assured that Old Monk is not going to be taken off market. - How popular is Old Monk rum outside India?
Comment: I've independently verified that it's sold in the USA as well, but I've never heard of it.  Seems to be a low to mid-priced offering, and not that popular here either.
Comment: In India, It is most famous dark rum and was launched in 1954, since then the company is running without any kind of promotional activity and there is no change in packaging also. Old Monk had been awarded gold medals at Monde World Selections since 1982. Also it is most used brand by Indian Army.


How does Java VM allocate memory?

Question: I am wondering how does Java VM allocate memory?
does JAVA allocate memory in the physical memory in our computer?
Right now I am trying to compare two data structures, linked list and array taking caution in terms of page fault, and cache hit/miss, to see the performance of each data structure in really low level(harddisk, memory, cache level)
Answer: I don't know if this answers your question but IBM has a good article about how JVM uses native memory on Windows / Linux.
Answer: Java allocates continous memory from the OS on startup.  Once it has the memory it needs for the heap, it controls how memory is allocated.
Memory in Java is allocated continously so it highly likely that each object will apear in memory in the order it is allocated. (But this is not guaranteed)
Additionally if the object survives a minor collection, it is likely to be copied in the order the objects are discovered. (again not guaranteed)
Personally I would use an ArrayList if you expect random access, and LinkedList if you want to insert anywhere but the end of the List.
Java performs very badly is any of it is swapped to disk. I would suggest ensuring it is small enough to fit into memory at all times.  Its cache behaviour is not easily controlled and the best thing you can do is experiment with how the JVM optimises your code and its caching behaviour.

How does Java VM allocate memory?


What is the shelf-life for Homemade Jams?

Question: If I'm making Homemade Jams/Preserves, how long will they last?
Answer: All home-canned food should be used within a year. This assumes you follow the strict sterilization regimen required by jarring/canning at home. You should also store them in a cool, dark, dry place between 50-70°F.
Over time changes in color, flavor, and texture is inevitable. This will result in a degradation of quality in the product, but as long as the seal is in tact and there are no visible signs of mold or yeast the jam should be safe to eat.
Another thing to note is that lighter colored jams tend to darken faster than others and thus may not look appealing over the course of a full year. They are still "safe" though.
Source:
http://www.uga.edu/nchfp/questions/FAQ_jellied.html#7
Comment: I just wanted to clarify that the year is the expected shelf life. As you said- if the seal is intact then the food is safe regardless of the age. I've had home bottled (high acid) jellies stay good for 3-4 years. They might have gone longer but they were finally eaten.
Answer: The Good Eats jam episode suggests 2-3 weeks if you don't actually preserve the jam in a home-canning kind of way and about a year if you do.
Comment: Yes good point for the non-canned shelf life. I assumed they would be canned.
Comment: That episode also recommended that after canning, to remove the ring on the jar, so you'd have a more obvious sign if something had gone wrong with the canning process.
Comment: @Joe So *that's* why to remove the ring. I've really wondered what that was all about. Tx.
Answer: There's also freezer jams, which can easily last a few years in a deep-freeze without losing much quality.  They're well sealed, so there's little moisture loss / freezer burn, there's little loss of quality aside from the initial freezing, and you don't have to worry about mold or other organism growing in the freezer.
Answer: "Use within a year" is a good guideline. There are exceptions. Lingonberry jam done right is easily good for a couple of years.
Answer: Home made Jam made with half Fruit and half Sugar will last almost indefinitely... it's additives that spoil food, placed into in a sterile jam jar it could be there many years and still as good as the one eaten in the first week, Ask your granny not a jobsworth! 50/50 nothing else!
Comment: Additives don't cause food spoilage, molds and bacteria do. Additives are often used to prevent spoilage. In the case of the jams it is the ph and sugar content that make for an environment that it not suitable for support bacteria and mold.


Anyplace sell bolts for SPD cleats?

Question: I have more problems with those stupid things getting stripped than you would believe.  (Just ruined a shoe trying to get a stripped bolt out.)  Anyone know if I can buy just the bolts, rather than the whole cleat?  That way I can put a new one in every time I have to adjust it or it comes loose to, hopefully prevent that from happening.  (I mean the MTB recessed ones)
Comment: It's been a few years since I used SPDs but I'm pretty sure I remember getting spares from a regular ol' hardware store. Then again, it *has* been a while so I could be misremembering.
Comment: My go to for any hard-to-find hardware stateside is McMaster.com. You have to know what you're looking for and maybe be willing to buy a package of 10 instead of 2, but if your LBS doesn't provide and your hardware store is lacking McMaster will have it.
Comment: Once you get the replacement screws, pick up some Loctite Blue (not Red) and put a drop on the threads before you install the cleat - will stop the screw from loosening on its own -  http://www.loctiteproducts.com/p/10/15/t_lkr_blue/overview/Loctite-Threadlocker-Blue-242.htm
Comment: Yeah, a lot of hardware stores carry metric cap screws now, and some may even have them in stainless.  Re "stripped" bolts, they should be just about impossible to strip if you install them correctly.  However, after several years they will rust in place and be impossible to remove.  Such is life.
Answer: I usually ask my LBS when I need spare parts like that. You might have to pay them a buck or two, but a lot of places keep a small stash of parts like that.
If that doesn't work, they might be able to order the part directly from Shimano (or ask your friends).
Answer: You can just look at the data sheet for the screw type and pick them up at your hardware store or go to your LBS and pick up something like the Sunlite Cleat Screw pack.
It looks like you need a countersunk M5 x 11.5  mm (which could likely be replaced with a M5 x 10mm or M5 x 12 mm which are easy to get at Home Depot - I'd probably go for the latter).
Comment: Search for "M5 socket screw".
Answer: Ebay - if you can figure out the thread size, it's often the best/cheapest way for small quantities of stainless bolts.
Answer: I had a problem finding a replacement bolt myself recently, including stopping at a local bike shop (which claimed not to have them) and did some searching--a good source I found was Bolt Depot. As for keeping the bolts serviceable, one thing you may want to try is coating most of the bolt (including the hex recess) with a quality paste wax. While it won't prevent most wear, it will help prevent corrosion of the threads and seating surfaces.
And, last but not least, apply thread lock, as mentioned by Gary above.

Anyplace sell bolts for SPD cleats?


Find out cause of kernel panics

Question: I've been getting these kernel panics for a while now and been looking for help.  I've tried turning of acpi and such.  I've just installed newest version of ubuntu server 11.10 and doesn't seem to go away with kernel 3.0.  I've done a deep memtest and everything is fine.  I scanned my hard drives with manufacture software and no errors.  The hardware seems to be ok.
A bit ago I ran damn small linux off a usb and didn't notice it crash.  I'm thinking to downgrade to kernel 2.4 and see if it works, but don't really want to do that. There is a screenshot of what I could get of the kernel panic dump on screen.  The kernel.log, dmesg, syslog don't seem to show any evidence about this kernel panic.
I am grateful for any help given! Thank you!
Kernel Panic Screenshot link
<code>processor   : 0
vendor_id   : CentaurHauls
cpu family  : 6
model       : 10
model name  : VIA Esther processor 1500MHz
stepping    : 9
cpu MHz     : 1496.388
cache size  : 128 KB
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 1
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge cmov pat clflush acpi mmx fxsr sse sse2 tm nx up pni rng rng_en ace ace_en ace2 ace2_en phe phe_en pmm pmm_en
bogomips    : 2992.77
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 32 bits virtual
power management:
</code>
Comment: You may be able to scroll up using Shift + Page up, but it depends on the severity.
Answer: you have two beautiful pages from the kernel team ...
https://wiki.ubuntu.com/KernelTeam
kernel debugging and how to find out :
https://wiki.ubuntu.com/Kernel/Debugging
To determine which guides are relevant to your problem see the Kernel/Debugging/Symptom based debugging guide .
Comment: Thank you very much!  I did not know this existed!

Find out cause of kernel panics


Extracting classes from running JVM

Question: I'm trying to RE a Java application that uses an obfuscated loader program to load classes from a second, obfuscated archive-like file. I'm trying to get at these loaded classes for further analysis, but thus far I haven't had any success in figuring out the format of the archive file. Since the classes are loaded into memory anyway, and I used a Java profiler to get a short list of the specific classes and objects that most likely contain what I'm looking for, is there a way to intercept these classes from memory, a core dump, as they're loaded, or through any other means, and inspect/save them? Assume I have full control of the system, and I can stop or modify the program in any way.
Answer: I would recommend using a Java Agent to extract classes from the running JVM instance. An agent is a tool that provides instrumentation capability for an application. Speaking of agents, there are two broad ways they can be developed:

In pure java
In C/C++ in the form of native agents.

A native agent has more capability than a pure Java agent, but for your purpose it is sufficient. At some point in the execution flow, the class loader has to load and decrypt the encrypted classes.
Sample code is provided below. The agent registers a callback (the transform method) to be notified whenever a new class is being loaded. Within the callback we simply dump the contents of the class to disk.
import java.io.*;
import java.lang.instrument.*;
import java.security.*;

public class dumper
{
  //A java agent must have a premain method which acts as the entry-point
  public static void premain(String agentArgs, Instrumentation inst)
  {
    System.out.println("agent loaded");

    // Register our transformer
    inst.addTransformer(new transformer());
  }
}

class transformer implements ClassFileTransformer
{
   // The transform method is called for each non-system class as they are being loaded
   public byte[] transform(ClassLoader loader, String className,
                           Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
                           byte[] classfileBuffer) throws IllegalClassFormatException
   {
     if (className != null)
     {
       // Skip all system classes
       if (!className.startsWith("java") &&
           !className.startsWith("sun") &&
           !className.startsWith("javax") &&
           !className.startsWith ("com") &&
           !className.startsWith("jdk") &&
           !className.startsWith("org"))
       {
         System.out.println("Dumping: " + className);

         // Replace all separator charactors
         String newName = className.replaceAll("/", "#") + ".class";

         try
         {
           FileOutputStream fos = new FileOutputStream(newName);
           fos.write(classfileBuffer);
           fos.close();
         }
         catch (Exception ex)
         {
           System.out.println("Exception while writing: " + newName);
         }
       }
     }
     // We are not modifying the bytecode in anyway, so return it as-is
     return classfileBuffer;
   }
 }

I have a writeup on this process here: Reversing An Obfuscated Java Malware
Comment: This was exactly what I was looking for, and Agents in general were a tremendous help for the rest of what I wanted to do. Thanks!
Comment: What if you can't stop the JVM and hook the java agent?
Answer: You can dump bytecode at runtime using HotSpot tools, and use a decompiler to reverse the bytecode. I made a proof of concept, available here
It requires 3 dependencies:

JDK libraries (sa-jdi.jar, tools.jar) to dump bytecode
Fernflower to decompile bytecode into java code
RSyntaxTextArea to display java source code

You could also have a look at the HSDB utility
Comment: Does this work in modern versions of java. I don't think sa-jdi.jar and tools.jar exist anymore
Comment: @RichardTingle no this was a POC targeting Java 8
Answer: I think the easiest way would be to dump the classes as they are loaded, assuming that you know where the obfuscated classloader is and can edit it.
The obfuscated class loader will ultimately have to call ClassLoader.defineClass at some point. If you have the classfile, you can just diassemble it, find all calls to defineClass (or reflection methods that might potentially call defineClass), and insert a logging function before the call to dump the result. You could use the Krakatau disassembler/assembler for this.
The biggest risk is if the obfuscated code is using introspection, it could mess things up. For example, the code might compute a checksum of itself, in which case modifying it at all will cause problems.
If that is the case you have two options: 1) find all the introspection checks and remove/modify/mock them out, or 2) modify the JVM itself. The later approach would be completely invisible to the obfuscated code, but is harder to do.
One other thing to try is to look into the Java Agent interface. I haven't used it myself, so I can't say much about it, but this will potentially let you access all loaded classes at runtime with no code modifications.

Extracting classes from running JVM


How does Super Mario Galaxy 2 differ from Super Mario Galaxy?

Question: From reviews I still don't get if Super Mario Galaxy 2 is a must-have game if I have already played a lot of the first Super Mario Galaxy.
In what ways is it different from its predecessor, and how different is it?
Answer: In one sense it's "more of the same" in that you work your way through "worlds" and "galaxies" finding stars and beating sub bosses to rescue Peach from Bowser.
However, there are differences:

the navigation between worlds and galaxies is different - you're travelling through them rather than visiting from a central hub.
You get to play as Luigi during the main game, either as a suggestion on random levels or eventually by choice.
Yoshi is available on some worlds.
The worlds/galaxies are all new - though there is some "borrowing" from earlier games. See this question
What happens (in terms of replayability) when you complete the game is different. See this question
Answer: If you really enjoyed the first one I think you should definitely get the new one. It's really well done, with more galaxies than last time, and way more stars. And, perhaps most notably, it is more challenging. Also, the "new game plus" content is great (more details with minor spoilers below).

 After you manage to get all 120 stars the first time through, the game opens up 120 more stars, and for me the second set was the most enjoyable. They are just scattered throughout the levels, M64-style. You have to hunt them yourself--the only clue the game gives you is that they make a distinct sound when you're near them.
Answer: SMG2 may be more challenging than SMG1, but due to the enhancements to Player 2 it can be WAY easier to complete. Even the most challenging levels are reduced to kid-friendly explorations with P2 blazing a trail. If you're a parent looking to let you kid take P1 on a mind-blowing physics-defying platformer that perfects the genre, then it is a Must Buy.
Answer: One big thing is the transport from level to level. Adding on to that is the abundance of story throughout the game that is weaved into the gameplay rather than put into a book for you to read later (I meant that literally about SMG1).
Another big thing is that when you get all of the stars, including on the bonus world and prankster comets with the exception of the very, very last level, you can go through the game again but this time collecting green prankster comets. This alone adds about 8 hours to the game. When you finish finding all of those the last galaxy will open up and you can play through it. I have heard of a secret level in that world that I have been unable to find.
Answer: Well, there is different music, (Power Stars, Rainbow Stars and Grand Stars) and the addition of Yoshi, Starship Mario, 242 stars, more than 121. I hope this answered your question.