JPEGs of the same resolution have different sizes

Question: I have a collection of photos taken from my digital camera. All of them were taken with the same settings (same resolution etc...). However all these pictures have different file sizes. Why is this? Could it be because of the colors or something?
Answer: JPEG and many others formats use compression algorithms to optimize the file size, which will cause it to depend on the content.
A picture with more gradients, colors and details should generate a bigger file in size than one containing simpler forms, even if both use the same resolution and compression level.
Unlike JPEG, file formats like BMP and TGA do not use compression and their size will depend only on the resolution and color depth of the pixels.
Answer: JPEG compression takes advantage of color zones, or blocks of similar information in the file. Described at the simplest possible level, if two pixels next to each other are the exact same color (or close enough that JPEG thinks the human eye can't tell), it simply maps the value of pixel2 to reference the value of pixel1, rather that storing it uniquely (at a very simple level, this is how file compression of all types works).
This is why, sometimes, when viewing (decompressing) a low-quality JPEG file, you'll get weird blocks of color that don't represent gradients well, or sometimes you'll see gradient "banding", in a picture of a sunset or something. These are called artifacts, and they're caused when a JPEG is saved with low quality settings, therefore taking a more extreme approach on size optimization.
You may have heard someone on a forum say "needs more JPEG" when someone posts a low-quality image. This has been a running joke on the internet for a while now, even leading to sites like http://needsmorejpeg.com/


Does IPv4 and IPv6 talk to each other?

Question: If a country switches entirely to IPv6, does this changes anything for the other countries?
(question inspired by this news article)
Answer: Definitely.  IPv4 has no techniques for talking to IPv6.  They are entirely different network stacks, although there are a lot of similarities.  IPv6 does have a representation for native IPv4 addresses so they can be routed appropriately.  Essentially, the IPv6 country would have limited access from other countries using IPv4. Gateways could enable access to email, web sites, and other services, but this would need to be handled on a roughly case by case basis.
The providers of cable modems and other such equipment are scrambling to be able to provide IPv6 capability.  In part this is because they will need to provide dual stacks on hardware with limited memory capacity.
Be prepared to relearn border security, as IPv6 does not use NAT.  Different techniques will be needed to secure networks from the external access.
Answer: If a country switched completely to IPv6 and still wants to access some old IPv4 datacenters or Networks ressources, it needs the service of NAT64 boxes which can still translate IPv6 to IPv4.
A bit more details about all the transitions to IPv6 tools:
http://www.fastlaneus.com/blog/2011/08/19/transition-to-ipv6-at-the-service-providers-nat64-6rd-ds-lite-6pe-6vpe-and-carrier-grade-ipv6-cgv6/
Fred
Answer: IPv4 and IPv6 are two entirely different protocols, although they do the same thing (actually, IPv6 does a lot more, but that's another story). This means that if someone is using only IPv6, they will not be able to "talk to" someone else whos is using only IPv4 (and vice versa).
In your scenario, this would effectively "cut off" the IPv6-country from the rest of the world and the inhabitants' computers would only be able to communicate inside the country's borders.
In practice, some address translation mechanics would probably be used which could allow at least some traffic to go through. Although it is much more likely they would run both IPv4 and IPv6 for some time to allow the other countries to "catch up" :)
Answer: IPV4 and IPV6 is totally different technique with some similarity, The both technique couldn't be talk with each other but there is one way to make a communication i.e NAT64 boxes which can still translate IPv6 to IPv4.

Does IPv4 and IPv6 talk to each other?


Can Prestidigitation "Clean" Salt Water?

Question: I have a very clever player that uses Prestidigitation for many useful things and one of the questions he asked me the other night is if he could use Prestidigitation to clean the salt out of the water. I wonder if water that has salt in it would be considered dirty. If I were to allow the cantrip to clean water in such a way am I forgetting another spell that would be tossed to the side because of this cantrip?
Comment: Somehow related..  [Can Prestidigitation soil someone's pants?](//rpg.stackexchange.com/q/78758)
Answer: No, Prestidigitation only alters the temperature or flavor.
Prestidigitation is clear in its limits (PHB, 267):

You chill, warm, or flavor up to 1 cubic foot of nonliving material for 1 hour.

This is not altering the properties of the sea water, it is merely flavoring it so that you couldn't taste the salt that's actually there.
Soiled Object
If you are trying to "clean" the salt water to make it potable, this is the section that you are trying to use is:

You instantaneously clean or soil an object no larger than 1 cubic foot.

If water is considered an object, which some do not, then you can try to apply the above aspect of Prestidigitation.
But you should still find an obstacle here in that you can't 'clean' the water of its salt. While the salt may spoil its use for potable drinking water, it does not mean the water is soiled even if you do count water as an object (which you probably shouldn't). The salt isn't something that represents being soiled, it represents something that in high doses would be a poison.
Sodium Poisoning
Should you want to purify that water in order to remove the salt and make it potable, you would use Purify Food and Drink (PHB, 270), which states (emphasis mine):

All nonmagical food and drink within a 5-foot-radius sphere centered on a point of your choice within range is purified and rendered free of poison and disease.
Comment: Sodium is only a poison if you are not made of scribbles on a paper sheet. 5e characters can down all the sodium salts they want. Sodium has no stat block. DM's fiat and the golden rule assumed as always.
Answer: No, it cannot
Purify Food and Drink is the spell you are looking for. It is used to, among other things, "purify" water which generally means rendering it drinkable (as D&D does not have a specific definition of the word purify).
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/70932/discussion-on-answer-by-paladin852-can-prestidigitation-clean-salt-water).
Comment: D&D 5e has a **very** specific definition for the word *"purify"*. Just check any dictionary. Or [@Doval's](https://rpg.stackexchange.com/a/112452/11402) answer elsewhere in this page.
Comment: @Mindwin If you're saying that D&D 5e itself specifically defines the word Purify, please provide a link. If you're saying use the English definition, then you need to specify which one, since there are many.
Answer: If the rules don't redefine a word, that word means whatever it normally means in everyday English.
If you ask me, it's not idiomatic to say salt water is dirty, or to use the term "cleaning" for the act of purifying it. When people talk about water that's dirty or not clean, they're usually referring to water that's not hygienic.
Ultimately the spell is open to interpretation, but I think you'll have a hard time getting people to agree that salt water is dirty.
Answer: The driving focus of the wording in 5e is to eliminate double meanings, so that what you see is what you get. Basically, spells and rules do what they say they do. Crucially, spells can't imitate the effects of other spells. Prestidigitation would make the illness taste nicer, but you would still be sick. Purify Food and Drink would be what your player is looking for. I respect the clever thinking, but unfortunately, there's no getting around using a spell slot here.
Comment: It's worth noting that *Purify Food and Drink* has the ritual tag, so your last sentence is not necessarily correct.  Just because the caster cannot use *Prestidigitation* in this instance does not immediately imply that they must expend a spell slot in order to accomplish their goal.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/70931/discussion-on-answer-by-bagahnoodles-can-prestidigitation-clean-salt-water).
Answer: The Argument
Whether or not salt water is clean or dirty is quite philosophical. Search freedictionary (not a great source, but a start) for "clean water" and it will redirect you to "drinking water." But most people are going to separate drinking water and clean water as two separate terms. I am also going to add a chemistry argument. In chemistry, "impurities are chemical substances inside a confined amount of liquid, gas, or solid, which differ from the chemical composition of the material or compound." So if the liquid we're talking about is "water" then salt would be an impurity. (Wikipedia)
DM Says
When it boils down to it, the answer is "ask the DM." If the DM allows it, then yes, if not, then no. You can try to argue it, but once the DM has ruled, that's it.
Since you are the DM, you get to decide really. To you is salt water clean? Oh and the spell only lasts for one hour, so sure, you can drink it and it won't be salty, but after an hour, it will be, and your character will get sick anyway.
Answer: Yes, this can work
Whether or not this works is entirely a matter of whether or not salt water can be considered dirty water or not.  If you consider salt water dirty water, Prestidigitation can clean it.  If you don't, it can't.
'Dirty water' is proverbially used exclusively to refer to human refuse in some regions, but dirty water is also used frequently to refer to water that's not potable or otherwise 'gross' due to dissolved solids, for example in this unicef learning activity where it refers to water colored brown by chocolate powder.
That said, it is somewhat unusual to describe solutions with unwanted solvents as 'dirty'; 'impure' or 'contaminated' are preferred in most cases.  Water, especially as regards potability, is sort of an exception in that regard.
As a result, it is reasonable both to regard salt and other contaminants in water as a part of water being 'dirty' or 'clean' and to regard cleanliness as not referring to such dissolved contaminants.
That said, there is a spell for purifying water, purify food and drink, which is made slightly less relevant if salt water can count as dirty water.
Answer: I would say "RAW", no, based on the other answers here.
But since it can warm water for up to an hour, thermodynamics says it could boil water in sufficient amounts, provided the amount of water was relatively small given the energy put in. Since it stands to reason you could begin to boil it, a clever character might be able to distill drinkable water from salt water with nothing more than the basic utilities of an adventuring sack, prestidigitation, and sufficient time.
So another answer is "Yes, but not the way your player was thinking." How you adjudicate this is largely based on the relationship (if any) between science and magic in your game, as determined by you, the DM.
Comment: While I like the idea on this, i think there's a difference between **warm** and **boil** that's a bridge too far for Prestidigitation. Otherwise, you could harm someone with that spell.
Comment: While I agree that it gets iffy, does the line of thinking not suggest that a fire started with Prestidigitation - one of its expressly described uses - can't get hot enough to hurt someone? I don't think harm as a secondary result is a barrier to use.
Comment: If the spell doesn't say it can harm someone, then I don't think it can. It's the difference between starting a fire or casting produce flame or bonfire. Now, if they lit a fire with it and boiled it there, I'd allow it. But they need a way to capture the steam, too. And that's where my science would end at the table and suggest they look for a new source of water.


How does Open Transactions handle counterfeiting of currencies?

Question: Say I create my own currency in Open Transactions, and begin trading it on OT with other users. What prevents some user from creating copies of my currency? I'm not sure its the same situation as double spending. I'm talking about someone who doesn't have any of my money simply creating it out of thin air and selling it to other people.
Answer: In Open-Transactions, both parties have a copy of the "last signed receipt" for any given transaction.
The user forms the receipt and signs it, and then the server countersigns it.
Therefore the server cannot forge your receipt because the server does not have your private key.
When an issuer issues his currency onto an OT server, the server will have a copy of the issuer's "last signed receipt," which includes the server ID and shows the current amount that has been issued.
So the server cannot falsely claim to have a certain currency issued on that server, because the server cannot forge the issuer's signature (in the same way that the server cannot falsify your own receipt, since the server cannot forge your signature.)
The other users cannot forge your signature, nor can they forge the server's signature, nor can they forge the issuer's signature, so they cannot falsely issue units of your currency.
Also, each "last signed receipt" includes the current balance. For example, "My current balance is 100 clams. I am withdrawing 10 clams, and my new balance will thus be 90 clams." This receipt also contains the server ID, as well as the asset type ID, and must be signed by the user before being countersigned by the server. Therefore this is also true for the issuer's last signed receipt, the same as for any other user.
Answer: "The public key of the issuer must be INSIDE the contract. (In the sample contracts, it's the first key that appears.)"

https://github.com/FellowTraveler/Open-Transactions/wiki/FAQ

So a counterfeit issue would not have the right digital signature.
Answer: if i see it correctly, there is a certain statical data within each existing cryptocurrency client, that is used to interact with the entire network. for example, you can't create bitcoin from air and add it to an existing bitcoin network. it will have to match the tree of cryptographical operations so far. there is original bitcoin paper out there and https://en.bitcoin.it/wiki/Weaknesses  to help you better understand the possible problems and issues of bitcoin network.
Comment: I see, but that's more related to a completely descentralized currency like bitcoin. If i create a centralized currency, it has to be possible somehow to create new "coins" out of thin air and issue them to the system. The question is: what would stop other people (besides the currency creator) from doing it?
Comment: oh, sorry I didn't knew this is mean to be a software "Open Transactions", i was thinking you were referring to bitcoin like nets.


Can execute permission in a php file cause any havoc or problems?

Question: I have a database that hosts three different sites. Most files on one have permissions 644, most on the other two have 755, which as I have learnt includes the execute permission. I was wondering if that could cause any problems (not because I want to avoid changing it, just because there are a few problems on one of the site that has execute permissions and I don't know if this could have caused it). I know execute permissions are not strictly speaking necessary for php files but I don't know why, so I don't know if they do anything... Any help would be greatly appreciated!
Answer: It depends on how you execute php scripts. It your scripts are shellscript or executed via cgi your php scripts need the execution bit. If you are running via webserver and mod_php then this is not necessary.
Answer: To add to tonymarschall's answer, a file is either executable or it is not. The scope of havoc arises when one executes the script as a privileged user. Usually, a script executes as the same user as the server unless some suid bits are sets (Linux now recognizes suid bits only on binaries and not ASCII text scripts). If the scripts happen to run as root and get exploited, the damage is far more than if they were exploited as a regular user.
Comment: Thanks so much for the info! I'd have chosen both as correct answers if I could, both helped me figure it out :)


Changing the FROM email address in Outlook 2007 AD HOC i.e. spoofing the FROM address

Question: I have a web-only-based email address I use, and want to write FROM it within Outlook 2007.
I cannot smpt though it, my web-based email provider does not provide that.
In Outlook, I can configure an account that has my web-based email address as the REPLY-TO address, HOWEVER Outlook still sends the email FROM whichever SMTP server I send it through.
So effectively I cannot send an email from within Outlook 2007 that really appears to be sent from my web-based email address.
But I want to.
I can manually invoke/display the "FROM" field, and enter my web-based email address there, however Outlook appears to ignore that and still list the smtp account email address as the FROM address once the email is sent
I have searched on the web for this, and have found nothing.
I am running XP and Outlook freestanding i.e. without Exchange.
Thanks!!

Added clarification:
Thanks ppumpkin - it's not so much that I want to spoof anything...
I used to be a Eudora Pro user, and Eudora happily sent emails via any legit smtp server (with my appropriate login credentials) WHILE listing the From address as anything I chose. In other words, it did not differentiate between the Reply-To and the From address.
However, Outlook does. While Outlook happily accepts any Reply-To email address I put into the account settings, it appears to stubbornly insist on the From address being whatever smtp server I sent it through.
Does this make enough sense and/or change your kind answer?
Thanks again!
Comment: "Spoofing" is done at server level, not client level. So you will either need a proxy SMTP server/script to do this. Outlook is dumb and for general public, imagine each john doe having the ability to "spoof" emails.. bladdy nightmare.. Whatever it is you want to do it should be done via some SMTP (postfix/sendmail) or winblows based email senders... Soz..
Answer: Thanks ppumpkin - it's not so much that I want to spoof anything...
I used to be a Eudora Pro user, and Eudora happily sent emails via any legit smtp server (with my appropriate login credentials) WHILE listing the From address as anything I chose. In other words, it did not differentiate between the Reply-To and the From address.
However, Outlook does. While Outlook happily accepts any Reply-To email address I put into the account settings, it appears to stubbornly insist on the From address being whatever smtp server I sent it through.
Does this make enough sense and/or change your kind answer?
Thanks again!


Is zakat mandatory for our family, given my mother is a housewife who owns gold and my father has a personal loan?

Question: I have a small question regarding Zakat: My mother has 113 grams of gold. She is a housewife, and my father has a personal loan. In this case, would Zakat be mandatory for us?
Answer: Because the amount of gold your mother owns exceeds the Nisab, then zakat has to be paid. If someone else (e.g. relatives) pays it on her behalf, there is nothing wrong with that.

Shaykh Ibn 'Uthaymeen (may Allaah have mercy on him) was asked: Is zakaah due on gold that is prepared for adornment, if a woman does not have any means of paying zakaah other than selling some of the gold?

He replied:

The correct scholarly view and the most likely to be correct in my view is that zakaah must be paid on jewellery if it reaches the nisaab (minimum threshold), which is eighty-five grams. If it reaches this amount, zakaah must be paid on it. If she has other wealth and pays from that, there is nothing wrong with it. If her husband or one of her relatives pays it on her behalf, there is nothing wrong with that. If neither of these options is available to her, then she should sell some of it and pay zakaah with that money.
-Majmoo' Fataawa Ibn 'Uthaymeen, 18/138

Because your father is a debtor, he can accept zakat from others. As a result, you can pay your mother's zakat using the zakat your father earns.
Not paying zakat is highly punishable as Allaah (SWT) says in the Quran:

And those who hoard up gold and silver (Al‑Kanz: the money, the
Zakaah of which has not been paid) and spend them not in the way of
Allaah, announce unto them a painful torment.
On the Day when that (Al‑Kanz: money, gold and silver, the Zakaah of which has not been paid) will be heated in the fire of Hell and
with it will be branded their foreheads, their flanks, and their
backs, (and it will be said unto them:) 'This is the treasure which
you hoarded for yourselves. Now taste of what you used to hoard'"
[al-Tawbah 9:34-35]

To sum up, you are required to pay zakat of your mother's gold. If you don't have the money to pay the zakat, either you have to request help from your friends/relatives, or you have to sell a part of your mother's gold, or your father can accept zakat from other people and pay the zakat of your mother's gold.
Comment: http://islam.stackexchange.com/questions/31052/zakat-or-sadaqah-money-from-fraud-job   plz help me on this question


After install ubuntu 12.10 no icons

Question: Im having a problem showing icons on the desktop screen after I installed ubuntu 12.1. I installed the software on a inspiron 5100 laptop. The unit has windows XP with service pack 3 also installed. The initial install after some difficulties eventually installed, allowing me to set some basic preferences from choices at the top of the screen, such as keyboard, networking etc. It also allows me to log on to the system, however once the desktop attempts to load a pink or orange screen desktop appears there are no options, no icons, just a pretty screen background. The mouse moves but neither right click or left click does anything, although a one time option to download updates was provided and I received them. I am 100 percent new to Linux and Ubuntu. Any help would be greatly appreciated.
Comment: ive actually downloaded the image several times. with the same result. furthermore ive used image on 3 different machines. same result
Answer: There might be two possible problems, first you might have used a corrupted disk/iso image.  Second you might have problem with your graphic drivers. In the first case try to redownload iso image.

After install ubuntu 12.10 no icons


How to configure mod_bwlimited through htaccess

Question: The mod_bwlimited module in htaccess apparently displays an error if bandwidth is exceeded.
Anyone know what options are available for configuring it through htaccess?
Comment: The source code for this module can be found here: https://github.com/CpanelInc/mod_bwlimited
Answer: Hosting companies typically install the module to limit clients.  They don't want clients to have much control over this module through htaccess.  As a result this module is not very configurable.  Even editing the error page to change the error message requires editing the source code of the module itself.


Is total boundedness a topological property?

Question: If a metrizable topological space is totally bounded with one metric, is it totally bounded with all others? A related, stronger question: if every metrization of a topological space is bounded, are they all totally bounded?
Comment: [To paraphrase GEdgar](http://math.stackexchange.com/questions/73188/continuity-of-a-series-of-functions#comment-172963): Look for a counterexample for the first question. I answered the second question [here](http://math.stackexchange.com/questions/58815/a-separable-locally-compact-metric-space-is-compact-iff-all-of-its-homeomorphic/58864#58864): a metrizable space is compact if and only if every compatible metric is bounded.
Answer: The answer to your first question is "no". The real numbers are homeomorphic to the open interval $(-\frac{\pi}{2},\frac{\pi}{2})$, via the bijection given by $x\mapsto \arctan(x)$. Both spaces have a metrizable topology. But $(-\frac{\pi}{2},\frac{\pi}{2})$ is totally bounded, whereas $\mathbb{R}$ is not. Equivalently, endow $\mathbb{R}$ with the metric $d(a,b) = |\arctan(a)-\arctan(b)|$; this metric induces the same topology on $\mathbb{R}$ as the usual metric, but whereas $\mathbb{R}$ is bounded under $d$, it is not bounded under its usual metric.
Second question was answered inter alia elsewhere.
Answer: Consider the positive integers with the discrete topology. On the one hand this topology is induced by the usual metric, which is certainly not totally bounded. On the other hand, it is also induced by the metric $$d(n,m)=\left|\frac1n-\frac1m\right|\;,$$ which clearly is totally bounded.
This is really just the observation that $\left\{\dfrac1n:n\in\mathbb{Z}^+\right\}$ and $\mathbb{Z}^+$ are homeomorphic as subspaces of $\mathbb{R}$ with the Euclidean topology, via the map $n\mapsto\dfrac1n$, where the first subspace has compact closure in $\mathbb{R}$.
Answer: Others have pointed out that total boundedness is not a topological property; what's also worth noting is that it is a uniform property.  A uniform space is a space that carries some additional structure beyond its topology that allows you to make sense of such notions as uniform continuity, uniform convergence, total boundedness, Cauchy sequences/nets/filters, completeness, completion...
I'll leave the precise definition to the linked article (there are several equivalent formulations), but the point is that a metric space (more generally, pseudometric space) naturally carries the structure of a uniform space (it's kind of the obvious motivating example -- the other motivating example being topological groups), and that total boundedness is a uniform property.  (Worth noting is that so is completeness, and the theorem that a metric space is compact iff it's complete and totally bounded works also for more general uniform spaces.  So do a lot of the basic metric space theorems, really, though unfortunately not all of them.)
(By contrast, boundedness isn't even a uniform property, since every metric space, bounded or not, is uniformly homeomorphic to a bounded metric space.)


How do you add Red Pepper to beer?

Question: I want to try brewing a beer infused with Red Pepper. My original idea was to infuse it with Tabasco sauce but have read about it going wrong or having a vinegar taste. Being from Louisiana I feel this would be a fun little beer to pull out at parties for my friends to try. Can anyone offer some suggestions as I've never tried to make an infused beer before.
Comment: I haven't done red peppers, but I have applied dry-hopping techniques to drop in several chopped up chipotle peppers and everyone who tried it claimed it was one of my best batches ever.  Went great with any Mexican food.
Comment: I have boiled cayene pepper power and ancho chilies I ground up in a coffee grinder. That way the oil containing the hotness gets solubilized into the wort. If you dry hop them I don't know how much hotness you will extract. Soaking the chilies in vodka as suggested below is a great way to meter out how much you add.
Answer: You tagged with first-time-brewer... if this is true, I would caution against making an infused beer right out the gate.  Fancy beers can be a tricky proposition.
That said, my best guess is that you could do an infusion similar to using vanilla, since it seems like a similar plant.  See this question & answers about vanilla.  There's some discussion about making chili beers in the ever-popular HomeBrewTalk forum as well.
Finally, I don't mean to discourage you with that first bit.  I've had some chili beers that were amazing, and it's a pretty neat style.  Best of luck!
Comment: Vodka is very good at extracting the heat and flavour from peppers. A while back I made a bird's eye pepper infused vodka for Bloody Marys. I only used two or three peppers in 26 oz of vodka, but ended up having to dilute it 3 to 1 with plain vodka to make it usable.
Comment: With respect, I'd like to counter the first paragraph with (and subsequently caveat): If you want to add peppers to your first beer, absolutely go for it.  It's that kind of creativity that makes it fun, and gets you to come back for more!  What a great way to start off brewing!  The aforementioned caveat being, make sure you know what you are doing, and research it before just diving in.  If something is unfamiliar, a term or technique, look it up (http://www.howtobrew.com/glossary.html).  As always, the key must is sanitization.  Everything.  No exceptions.
Comment: Infuse a pint or so of vodka with peppers. Add to beer when bottling. You might consider mixing up some small batches to determine how much of the infusion you want to add. It won't affect the ABV much.
Comment: to nit pick some botany here, peppers are dicots in Solanaceae related to tomatoes, potatoes, eggplant, and tobacco; vanilla is Monocot, an orchid... sorry for the rant... I literally couldn't stop myself.
Comment: How would one use vodka to infuse beer?
Comment: A pint of infused vodka into what size batch of beer?  I personally work with 1G batches, so the ratio seems awfully high.  I presume you're thinking more along the lines of a 5 gallon batch?
Comment: Yes, I was assuming a 5 gallon batch. Regardless, you'll need to do some experiments to determine how much to use. It depends on the strength of the peppers, the length of infusion and your taste. Add a bit, taste, add some more and repeats until it tastes right.
Answer: I asked a while back on adding peppers and was given a link to an excellent article on adding chillies to beer.  I went with the dry hopping technique, and used chipotle peppers instead of the original plan of jalapenos or habaneros because I wanted the smokey flavor and I was not at all disappointed by the outcome.  In fact, I loved it.  I want to do it again with a smoked porter.
I'd highly recommend getting fresh peppers of your choosing in case you were contemplating getting flaked red peppers from your store's spice aisle.  Reason for that recommendation is because I assume you know your peppers coming from the Louisiana, so you know exactly what you want as far as flavor, seeds vs no seeds, etc.  Plus, it's just cooler to roll your own pepper combo instead of some generic pre-done McCormicks bottle of red peppers.  Be creative and get a mix of peppers if you want a nice zinger of a beer.  Rinse them, chop them up, add them to a small glass of vodka (just enough to cover them, not too much) for a night to help kill off any gunk that might still be on them, and throw them in after fermentation has completed (very important to wait for primary fermentation to complete) in a cheese-cloth-like bag that you'd use for dry hopping.  Also, toss in the vodka left behind too, it'll have a lot of the spice in it.  Leave them in for a week or two depending on how much of a punch you want to pack, then take the bag out and bottle.
Another idea for you that just came to mind.  Since I've already done the chipotle pepper dry hop, next time I may kick things up a notch and even toss in half a teaspoon of cajun spice into the vodka for extra flavor.
Answer: The November/December issue of Zymurgy magazine has an article on adding chiles to beer. They recommend pairing a dark beer, like a brown ale, with dried red chiles. They cited examples of brewers either adding the chiles in the boil kettle, or using a dry hopping technique (adding chiles as an ingredient in the fermenter, usually during secondary fermentation).
Like any spice, I think subtlety is the key to drinkability. Also, because peppers are highly variable in terms of heat, even from pepper to pepper, you probably should taste them before deciding how much to add.  (For example, I tried to add slices of Serrano pepper to a Belgian golden ale at bottling and the results were overpowering.)
One trick to determine spicing level is to make a tincture by soaking the spice in vodka for a week or more. Prepare 4 oz. of a neutral, all-malt beer (e.g., Michelob). Remove the spice, and add the tincture, drop-by-drop to the glass until you get the taste you like. Remember to refill to 4 oz. each time.  Then to get the final amount to add, multiply: (the number of drops) x (32) x (number of gallons in batch that is going into the fermenter).  Note: unless you fill a new four ounces, remember that you are slightly diluting the prior concentration when you refill to four ounces and adjust for that.
Comment: I forgot the most obvious tip: when using wet chiles, if you want the chile flavor without so much heat, try cutting open the chiles (wear gloves!), and removing the seeds and white membranes. If you use only the green (or red) parts, it will add chile flavor without the burning.
Answer: I sometimes put a whole Serano pepper in each bottle. This is similar to Cave Creek's (www.chilibeer.com) chili beer.
The heat varies depending on the pepper and ranges from insanely hot to crazy insanely hot. Try to get straight peppers that go in and come out of the bottles easily.
After 12 weeks or so the peppers started disintegrating. It's probably best to not let it sit that long.
Putting the peppers in the bottles has the advantage that you can try this with as few as you like instead of risking the whole batch. You don't need to boil or otherwise prepare the peppers cause the beer at bottling time has hops and alcohol for preservation against some wild yeast that may stuck be to the pepper.

How do you add Red Pepper to beer?


Difference between "warrior" and "soldier"

Question: Is there any difference in meaning between warrior and soldier? Are they totally synonymous?
Answer: Thursagen provides a good overview of the differences in connotations. The differences are however best considered literally (or etymologically rather), I feel.
warrior

c.1300, from O.N.Fr. werreieor (O.Fr. guerreor) "a warrior, one who wages war," ...

i.e. Being a 'warrior' implies very generally that one fights in wars/battles (as the word itself suggests).
soldier

c.1300, from O.Fr. soudier "one who serves in the army for pay," ...

i.e. Being a 'soldier' implies being a payed member of an organised fighting force.
Overall then, you might consider a soldier to be a type of warrior, but not vice versa. The term 'warrior' is therefore often reserved for fighters in barbarian or unstructured armies, though it would not be incorrect to apply it to a member of the U.S. Army today, in fact.
Comment: In your last sentence: a logistics corporal who deals with paperwork for ammunition supplies is clearly a soldier (and probably more valuable than most), but not a warrior, surely.
Comment: Mein, Mein! Noldorin, this is the perfect explanation! This makes it so clear to me. +1 for good explanation
Comment: Thanks Thursagen... well, etymonline really is handy tool! In this case, it backs up nicely what I've usually understood.
Comment: Yes, I agree. What am I saying that contradicts that? A logistics corporal is still a member of an organised fighting force, even if he isn't doing any fighting himself.
Comment: I think your answer would be stronger if you left out the last paragraph.  In today's armed services, warriors are a subset of soldiers...possibly even a subset of front-line soldiers, although on the latter point I would defer to someone who had experience.
Comment: @ab2: That's only in specific military jargon of certain countries. I think the generic English meanings still agree with what I've written above.
Answer: A warrior is:

a person skilled in combat or warfare, especially within the context of a tribal or clan-based society that recognizes a separate warrior class.

So you often hear of warrior classes in tribal culture. Many warriors also have behavioral codes. One popular example is the bushido of the Japanese samurai. Wikipedia notes

In many societies in which a specialized warrior class exists, specific codes of conduct (ethical codes) are established to ensure that the warrior class is not corrupted or otherwise dangerous to the rest of society. Common features include valuing honour in the forms of faith, loyalty and courage.
Examples include the following:

Ethical codes of the early Germanic Peoples, as well as Prussian virtues
  medieval knights' code of chivalry;
Kshatriya code of Dharma in India;
Khalsa code of saint Soldiers in Sikhism;
Sesok-ogye code of Hwarang in Korea;
Japan's samurai class, which uses a warrior code known as Bushido (The Way Of The Warrior); and
Xiá in China.

Warriors' honour is dependent on following the code. Common virtues in warrior codes are mercy, courage and loyalty.

A warrior is more than just a fighter; it is someone who likely follows a code of conduct that determine their very values and ethics.
A soldier, on the other hand, is:

a member of the land component of national armed forces; whereas a soldier hired for service in a foreign army would be termed a mercenary.[1] The majority of cognates of the word "soldier" that exist in other languages have a meaning that embraces both commissioned and non-commissioned officers in national land forces.

To be a soldier is to fight for a living -- it is an occupation. To be a warrior is to have that ingrained code of conduct that was vastly more present in the olden days. Today, one is not usually a warrior in the literal sense. It is far more common to refer to someone who fights as a soldier. The terms are definitely not synonymous because of the nuanced history behind each.
Comment: +1. I'm glad someone mentioned that in many oriental cultures the warrior is also a scholar. In Chinese, [士](http://www.yellowbridge.com/chinese/wordsearch.php?searchMode=C&word=%E5%A3%AB&cache=16) is a root that conveys both meanings: *member of the senior ministerial class (old); scholar (old); first class military rank*.  [士人](http://www.yellowbridge.com/chinese/wordsearch.php?searchMode=C&word=%E5%A3%AB%E4%BA%BA&cache=29) is a scholar (with the "man" character) and [士兵](http://www.yellowbridge.com/chinese/wordsearch.php?searchMode=C&word=%E5%A3%AB%E5%85%B5&cache=26) is a soldier.
Comment: As for the [Kshatriya](http://en.wikipedia.org/wiki/Kshatriya) it is even an Hindu cast and today a common family name in India (and elsewhere).
Comment: If the two downvoters are around, could they explain how I could improve my answer?
Answer: They both mean men of war, but there is a slight difference in meanings.
A soldier seems to imply someone who is in the army, and has been trained by some militia.
A warrior seems to imply a more barbaric figure, or at least, someone who fights, but isn't necessarily part of a state army, but are fighting for personal reasons.
The next difference implied is a soldier has discipline, and works together with other soldiers as a team to form an army. They march, move, and stop at the same time. Warriors don't do this, and although many warriors might fight in the same army, the term "warrior" implies that there is no discipline, and that they just move of their own accord.
Answer: A warrior is (especially in former times) a brave or experienced soldier or fighter; a soldier is a person who serves in an army.
Comment: +1 I disagree with the down-vote. It is worth reflecting on the fact that our contemporary representation of warriors is tainted by last decades high-budget-low-content B-grade movies from Hollywood.  [Ang Lee](http://en.wikipedia.org/wiki/Ang_Lee) and [Kurosawa](http://en.wikipedia.org/wiki/Akira_Kurosawa) movies are more refined alternatives. See [Crouching Tiger, Hidden Dragon](http://en.wikipedia.org/wiki/Crouching_Tiger,_Hidden_Dragon) and [Ran](http://en.wikipedia.org/wiki/Ran_%28film%29) to name just some of the most famous.
Answer: Roots of the word aside, the term "warrior" is used by soldiers to refer to one of their fellows who, even by their standard, has superlative skill and attitude and go-get-it-iveness in combat. My battalion was called the Warrior battalion--in peacetime--and I never felt like we deserved it, had never earned it.
Answer: Poetically, a warrior is one who lives for the fight, and a soldier is driven by duty, and may have no love for fighting.
Of course, it's very important to note note that this is not a universal view. You may have to discover from context how the writer intends to define the words.


How to invoke cron job from php script?

Question: I wanted to set cron job from php script file. I can able to execute php file using shell_exec() function. But Im not able to run cron job related commands. <code>$output = shell_exec("crontab -l");</code> this command is not working. My cronjob located under /usr/bin/crontab. I set the file premission to 777 and im executing this command with root access. still no luck. can anyone help me?
Comment: You set the permission of `/usr/bin/crontab` to 777? I suggest you change it back _immediately!_
Answer: Your "crontal -l" command just displays what's scheduled for your user in its personal crontab. It might return an empty string, depending on your current personal crontab.
Don't mix up with the file /etc/crontab which is a system-wide crontab, for all users, writable by root only.
If your need is - as I think I understood - to add a job in the crontab from a php script, maybe you might simply want to try something like :
<code>$r=shell_exec('cat "30 6 * * * user my_cmd my_args" >> /etc/crontab');
</code>
To schedule "my_cmd my_args", running as "user", 6:30 am every day, for example.
This PHP script should be started as root as only him can write in /etc/crontab.
Careful : I hope your php script is not started from a web site, but in command-line from an access-restricted environment, to limit security risks, especially if you do something to make it start as root. That kind of script is a very big hole in your system. Do consider this. That's my advice.
By the way, /usr/bin/crontab's permissions back to :
-rwxr-sr-x 1 root crontab 35040 19 déc.   2010 /usr/bin/crontab
(example from a Debian system).

How to invoke cron job from php script?


404 error when publishing a new article joomla!

Question: I recently installed joomla! to my website when I published the getting started article and loaded up my website it worked, but when I tried to get rid of that article and publish my own article, I get a 404 once I try to reload my website. I will post images below that may help
Answer: From your example it is unclear what is the menu link (URL) for article in question.
If that is your home page and if the default (Home) menu item is of type Articles » Featured Articles, then 404 should not have happened.
But, if that page was menu item of type Articles » Single Article, and it was linked to "getting started article" which you "got rid of", then you basicaly deleted article to which the menu item was pointing to, hence you got 404. If that is the case, you should go to Menu Manager, find the menu item in question and refresh the link to article it is pointing to, meaning to your new article instead to deleted one.
Answer: Please try turning display errors on could help you.
Then you may also try few other solutions from those you might try this
1. Go to Content at top of admin control panel
2. Click Article Manager---this should bring you to the Articles section
3. second choice on left below article might be highlighted---but it is categories
4. I noticed mine was labeled uncategorised---but it had a red check there
5. the red check means unpublished--click on the red check and to have it changes to published...if it doesn't try saving it and then reopening the page...


extraction information from resume

Question:
I have a project in machine learning in which I need to analyze a
  curriculum vitae. for that I have to write a python program. It uses
  basic techniques of Natural Language Processing like word
  parsing,chunking,reg ex parser. If you run the algorithm you can
  easily capture information like name,email id,address,educational
  qualification,experience in seconds from a large number of documents.
  but I have a confusion between two methods LSTM (RNN) and NER? What do
  you think is the best method?
Answer: LSTM is a neural network architecture used for sequence prediction, whereas NER is name of NLP task.
The two are incomparable, as one is a method and the other type of problem.
The relationship between them is that LSTMs can can be used for sequence tagging, which can be used for NER.
Answer: I had worked on the same project for months. I want to say they both work well if you have enough labeled data. For those entities (likes: name,email id,address,educational qualification), Regular Express is enough good. For variance experiences, you need NER or DNN. If the number of date is small, NER is best.
You know that resume is semi-structured. And you can think the resume is combined by variance entities(likes: name, title, company, description text, date and so on), so you can combine them to expand your train dataset.
Answer: I would suggest you to use spacy and add your own custom labels for NER.
https://spacy.io/usage/training/#ner

extraction information from resume


To what extent is FREE 3rd party antivirus software better than Windows 8 defender (if any)?

Question: As someone who is not in a position to currently purchase an antivirus suite, I would like to know if having a free Avira or Avast or similar program is worth the overall system performance drop (I don't have a high-end desktop, so having an antivirus running in the background does slow thing down a bit). How secure am I if I stick to using only Windows defender? Note that I am not a fan of browser flash games, and don't tend to download suspicious content without some sort of review, so that sort of threat is minimal.
Answer: From the reviews I've seen of Windows 8 defender (which includes what was security essentials in Windows 7 and earlier), it's a pretty solid middle of the road A-V suite with some anti-spyware features.
I don't think that it's as fully featured as the paid for security suites, but then it is free.
From a personal perspective I use it as it seems fairly unobtrusive in general running and doesn't cause too many problems but does catch viruses that hit the system.
Comment: Asks a security profesional for advice -> requests links. You know there is a site called google where you can get these links.
Comment: It scored ~90% on reactive detection and ~75% on proactive detection on [Virus Bulletin Chart](http://www.virusbtn.com/vb100/latest_comparative/index) which places it somewhere in the middle, and a gold award for the lowest false positives 2012 at [AV Comparatives (PDF)](http://www.av-comparatives.org/images/docs/avc_sum_201212_en.pdf) which is nice to hear when paired with fairly good detection capabilities, so we can say that it's a reasonable choice and still steadily improving with time.
Comment: Thanks for the reply! Could you post some relevant links? I don't know which sources are trustworthy.
Comment: Well said. I guess that concludes it.
Answer: Windows 8 Defender is quite good.
Tom's hardware has a good comparison of free antivirus. Microsoft Security Essentials only ranked second to the free version of Avast (on average). For defensive capability is was beaten by Comodo, Avira and Avast.
Performance wise MSE scored the highest, which is what you might be looking for.
Common sense and MSE will serve you well
Free Anti-Virus Software Showdown: The Best of 2012
Comment: Common sense will serve you better than any antivirus, just saying.
Answer: Here's the site I have found most helpful... for free stuff in many categories.  They have an especially heavy user base of security and Anti-Virus geeks.  Lots of opinion to chew on.   TechSupportAlert.com
I have not come to any conclusion personally up to now.  FWIW, Currently I use Win 8 Defender, which incidentally wholly replaces Security Essentials.  My past experiences I have made use of Comodo Internet Security (paid),  Norton ¿¿still has no free product?? (Paid), AVG(Free), Avast(Free), MS Security Essentials on Win 7 (Free), Ad-Aware(Free),  SpyBot S&D(Free), Kaspersky 2012 (Paid)... too be completely honest... I have had issues with every single program in some fashion and paying did not make it any less annoyingly frustrating.  Mind you I experienced nothing catastrophic and I do some relatively heavy surfing, but the problems were enough to prompt me to move on.  I should say that another way... most of the software I paid for would likely be well matched by it's free counterpart/competitor.  Open source is something I seek too.  I was gonna provide links that to point you in a direction toward free versions currently out as of most recently, but I guess I have to have >10 points in the forum here... so go with my first link and see what you find!
Interesting Anti-Virus comparison here as well...
Hopefully this 5 month late reply will help... someone... good luck!
Answer: It is worth posting a 2014 update to this question. We have seen Windows Defender for Win 7/8/8.1 freefall in it's effectiveness. In the last 9 months we have had email and web exploits install Trojans onto client machines, and have therefore replaced it with a commercial paid for solution (un-named here, this is not an advertisement for another product).
We now review our recommendations to clients based on ranking sites such as av-test.org and www.av-comparatives.org on a bi-annual basis.
This answer is marked as a community wiki so that people can update it in the future as the effectiveness of Win Defender changes.


Difference between "remedy", "heal", "cure" and "treat"

Question: These words relates to Health category. I think these words are really confusing and I don't know how to use them correctly. Can you show me what are the differences between these words?
Comment: Are you referring to them all as verbs?
Comment: @fixer1234 Yes, they're all verbs
Comment: I'll note that "heal" and, to a lesser extent, "cure" have acquired mildly negative connotations, as they are terms often employed by various charlatans purporting to treat illnesses "spiritually" or with some sort of unscientific concoction.  (They still have legitimate uses in "real" medicine, however.)
Answer: These terms are used with more precision by healthcare professionals than by the general public.  The dictionary definitions reflect general usage of the terms.
Remedy as a noun is often applied to health, but the verb isn't commonly used in that context.  It means to relieve a problem, which is very imprecise if you apply it to health matters.
Heal and cure are related:
Heal: to make free from injury or disease; to make sound or whole; to restore to health
Cure: to restore to health, soundness, or normality; to bring about recovery from a disease
Heal and cure refer to the patient, although "cure" is often used in the broad sense of eradicating a class of illness from the population at large, like "curing cancer".  But if a person has an illness, you cure the patient, not the illness.
Also note that heal and cure refer to accomplishing the result rather than the nature of the process.  The "curing" or "healing" done by the doctor might be little more than keeping you comfortable while your own body does the work, but they are said to have cured or healed you because they provided the conditions to bring about recovery.
The difference between the terms focuses on the nature of the problem.  Health problems that are not based on a deficiency of something the body needs (and can be fixed by providing that), are broadly categorized as injury or disease.  Injury is physical damage.  Disease is a condition that impairs normal functioning.  This isn't medical school, so I won't get into the weeds with rigorous definitions.
"Cure" refers to disease (you don't cure injury).  In common usage, "heal" is applied to disease or injury, but it more accurately applies to injury or the physical manifestations of a disease.
Treat means to care for or deal with medically or surgically, or give medical care or attention to; try to heal or cure..
It refers to the application of treatments, not the results.  Again, you treat the patient, not the problem.  In common usage, people say things like "treat a cold" or "treat a broken arm", but that's shorthand for treating a patient for a cold or for a broken arm.  There is no guarantee that treatment will result in healing or cure.
Comment: *There is no known cure for the common cold*. Is the human "cold" a disease or simply a malady? Do you heal someone's cold? Or do you treat it?
Comment: @Lawrence I'm just playing devil's advocate, pushing for a more comprehensive answer.
Comment: @Mari-LouA, tried to make it more comprehensive and to address the kinds of issues you raised.  When I was done, I found the question closed.  If I had discovered the comments a little later...
Comment: It's a very good answer, I'm sure it will help future visitors. You'll be surprised how many people upvote answers that are older than three months. I guarantee that Tony's question is very common among learners.
Comment: Such a great answer, tks again!


Why is drawing animate objects haram?

Question: So I am a sketchist and frequently draw human portraits. I find solace in this as I am a very isolated person and have basically zero real friends. It is merely a hobby and it might even help me in the future to gain some fast cash. Recently though, I've come across various articles on the web relating portrait drawing to major sins. The "logic" that these people provide is that when a person draws an animate object (i.e, humans and animal) he is trying to imitate Allah. Which is completely fine and I am willing to believe that. But problem is, my intentions aren't to replicate Allah's creation in a way to seem equal to him. I merely do this for some peace of mind and do not (and will not) in any way try to be equal to Allah. Another issue is that these "scholars" say that drawing animate objects is haram, but drawing inanimate objects (rocks, mountains, trees, sceneries etc.) is permissible. But tell me one thing: isn't it God who created the inanimate objects as well? If drawing animate object is an imitation of God, then verily, drawing inanimate objects is too. So the same people who are against imitating God also say that non-living things are not an imitation of God. So they're basically saying that Allah did not create the inanimate objects? It's a stupid concept but I want some clarification. Thank you.
Answer: It's considered haram (see e.g. IslamWeb) because of hadith such as the following:

... "The makers of these pictures will be punished on the Day of Resurrection and it will be said to them, 'Make alive what you have created.' Moreover, the angels do not enter a house where there are pictures.'"
Sahih al-Bukhari 5957

This need to be balanced with the hadith:

I used to play with the dolls in the presence of the Prophet ...
Sahih al-Bukhari 6130

Different scholars describe various limitations on this for children's toys, photographs, currency, sketches of criminals, identity documents, and images without faces.
Beyond this (why does Allah forbid this), judging from online fatawa, I don't think it's completely known.  If Allah gave a reason and scholars were aware of it, we would expect fatawa to relay that reason, and not say things like the following:

The Muslim should submit to the teachings of Islam and not argue with them by saying, "But I am not worshipping them or prostrating to them!" If we think about just one aspect of the evil caused by the prevalence of photographs and pictures in our times, we will understand something of the wisdom behind this prohibition: that aspect is the great corruption caused by the provoking of physical desires and subsequent spread of immorality caused by these pictures.
Islam Q&A

Shabir Ally at About Islam contested the logic of "competing" with Allah.

So, God creates. You cannot create any live object. But you are drawing a picture as a way of competing with God.  He says:
And this seems to be a strange reason given in the hadith because most artists will tell you that they have, this is farthest from their minds.

And in fact:

And I would go with Khalib Abu Fadl, who has said in his book, Speaking in God's Name, that matters of such great social importance should not rest on a prohibition that's given [only] in the hadith.

So you're not alone in thinking the justification of "competing" with Allah is peculiar.
Comment: Isn't it interesting to think that maybe the ruling of images in Islam that comes from the hadith has some form of context to it?
Answer: I think if you don't think that you are compete with Allah maybe a children or a man with low faith level may think that you are a creator of a new sole or character he love or adore ... the problem here not only your faith ... its how your work affect other human beings faith... That will open a way to discuss God from low faith or low knowledge beings.which will cause a problem in a community faith during the time.
sorry that your hobby is Haram its an Ebtelaa.
you must learn that you are stronger than that and you can find another way to turn this hobby into halal way Good Luck.
please take care that this rule made not only for this era we live in,
its from Gods' vision to all time from start to end of humanity so he know better than us what will affect the community negatively during time .
example: old days some men called Allat and Allozza and hubal were good guys
and community respects them after that the a community made statues for them and in after eras the community take a new curve and start to pray to these statues (Quraish).
you have to take in mind the story of the prophet Adam (alayh alsalam)
and know that god could forgive him directly without teaching humans the lesson. (witch is there something called time , and mind to think and chose between whats right or whats wrong).
across time good people come and bad people after them and good people come and people with no knowledge came later.
tell we reach the prophet Mohamed (alayh Al salah Walsalm) with stable constitution protected from any human changes (Quraan) . setting the rules tell the end of time.
Allah Alaam (Allah knows All)

Why is drawing animate objects haram?


Does endogeneity matter when neither independent variable nor error term are correlated with dependent variable?

Question:
if the double arrows show that X and the error term are correlated, but that neither variable affects Y, is endogeneity a problem in this scenario? Why or why not?
Answer: Assume the simplest linear regression model
$$y = bx + u$$
The OLS etimator for $b$ is
$$\hat b_{OLS} = \frac {\sum x_iy_i}{\sum x_i^2} = b + \frac {\sum x_ie_i}{\sum x_i^2}$$
Whatever the true $b$ is (it is zero in your case, as another answer pointed out) , the fact is that
$$\text{plim} \frac {n^{-1}\sum x_ie_i}{n^{-1}\sum x_i^2} \neq 0 $$
and so the OLS estimator will be inconsitent (and also, biased too).
Answer: In a typical OLS model, $Y=\alpha+\beta X+\epsilon$, endogeneity exists when $E[\epsilon\,|\,X]\ne 0$, which results from $X$ and $\epsilon$ being correlated with one another.
In your case, $Y$ uncorrelated with $\epsilon$ implies only that $E[\epsilon]=0$, which is not the same as the exogeneity condition $E[\epsilon\,|\,X]= 0$.  Moreover, $Y$ uncorrelated with $X$ just means that $\beta=0$. Again, this does not save you from the endogeneity problem. Actually, in addition to endogeneity, you now have another (bigger?) problem to deal with; that is, using a regressor that is a very poor predictor of the dependent variable.
Answer: Watch out!!! This problem is very subtle.
The unobserved term $\epsilon$ cannot be the regression error term if $\epsilon$ is uncorrelated with $Y$. In the model $Y=\beta_0 + \beta_1 X + U$, the error term $U$ is a part of $Y$, and thus $U$ is 100% correlated with $Y$. In your case, $\epsilon$ is uncorrelated with $Y$, so it is not the error term unless $\epsilon = 0$.
[Edited from here]
The issue of endogeneity has nothing to do with whether $X$ and $Y$ are correlated. If $Y = \beta_0 + \beta_1 X + U$, $\beta_1 = 0$ and $X$ and $U$ are correlated, then $X$ is correlated with $Y$. On the other hand, if $\beta_1 \ne 0$ and $X$ and $U$ are "exactly" correlated, then it is possible that $X$ and $Y$ are uncorrelated.
The question only says that $X$ and $Y$ are uncorrelated. (It also says that $Y$ and $\epsilon$ are uncorrelated, but this information is irrelevant because it does not explain what $\epsilon$ means other than that it is unobserved.) So, endogeneity matters, not because $X$ and $\epsilon$ are correlated or whatever but because it says nothing about how $X$ and the error term are correlated.
If $\epsilon$ is the error term, then it is implied that $\epsilon = 0$ so we have a perfect fit and no regressor-error correlation.


What is a good way to save money on car expenses?

Question: What are good ways to save on maintenance/fuel and prolong the life of a car?
Answer: Ride a bicycle or walk for short trips (< 5mi–10mi, depending on your level of comfort). Nothing saves as much on car expenses as simply driving less.
Answer: Apparently, if you keep your tires' air filled to the recommended level, your car will burn less gas.
I loved this article at WikiHow, which confirmed what I had heard about air in tires, and had others to suggest, such as removing unnecessary items from inside and on your car (such as bike racks, trailer balls) as they can add to your car's overall weight, causing more drag and using more gas.
Answer: It is almost always cheaper to do regular maintenance then to fix problems because you didn't change the oil or check the transmission fluid.
Answer: Do your own oil change!
If you are a hands-on person, you could also avoid the cost of the semi-annual oil change, by doing it yourself.  Edmunds.com has a great how-to to help you accomplish this.  Be prepared for dirty fingernails!  But savings, you will realize, as an oil change will run you anywhere from $20 - $200 (if you drive a European car and require a specialized filtre).
Comment: .. or look for free oil change coupons :-D
Comment: Though if you find a quick-lube place running a promotion, it is nearly impossible to beat their prices on an oil change. Around here, I have seen $20 oil change as a promotion. You would be hard pressed to DIY cheaper than that. However, as stated, if you use high quality filters and fluids, DIY can avoid the huge markup.
Answer: Keep up on routine maintenance. That's the best way to prolong the life of your car, and it'll save you money in the long run because you won't have to replace your car as often.
Accelerate gently. The harder you push the gas pedal, the more gas you use.
Coast to a stop rather than using your brakes. If you can avoid stopping by slowing down well before a red light so that by the time you actually get to the light it is green again, do so.
Avoid high-speed driving. At highway speeds, wind resistance plays a big part in how much gas your car uses. If you can plan your trips to take slower routes, do so. Don't be the guy driving 55 in the left lane on the highway, though.
Avoid stop-and-go traffic. Keeping to a constant speed is the most efficient. Plan your trips to avoid areas with lots of traffic, lots of curb-cuts and intersections, etc. Leave lots of space in front of you so you have time to anticipate other drivers intentions and slow down rather than having to slam on your brakes at the last second.
Avoid short trips. Cars work best when they can get all the way up to operating temperature, and stay there for a while. If you're just going two miles, ride your bike.
Live close to work and a grocery store, so you can walk or ride your bike rather than driving. Use your car for road trips and your quarterly trips to CostCo to restock the larder.
If you can get away with not owning a car, sell it. Ride your bike, use public transit, or walk. If you can share a car with a significant other and only one of you has a long car commute, there's no sense in you both owning a car.
Comment: lol @ QUARTERLY trips to costco
Comment: Highway speeds don't automatically use more gas; you're ignoring gearing in the transmission. 2k rpm in 2nd going 25mph is about the same as 2k rpm in 6th doing 65mph.  Acceleration and deceleration matter more, and there's normally less than that on the freeway.  Also, not keeping with the traffic flow increases risk on an accident, which will immediately wipe out any gas saved.
Comment: **Avoid high speed driving**  For most cars the highway gets the best gas mileage, so much so in fact the sticker on the car for sale list the city driving MPG and highway MPG.   In fact at 70mph my MPG doubles.
Answer: Can you tell I'm having fun with this question?  Here's another great list, from Finally Frugal, which includes the above items, but also these gems:

Avoid idling. Now, this just annoys me. Walking past a line of idling cars at the transit center waiting for their human 'pickup', makes me crazy! It makes me want to knock on the window, shake my finger, and give 'em a piece of my mind. I don't do it, because I don't have a death wish. Turn the car off when you're not driving it.
Combine trips. I used to be one of those people who would run to Target, go home, remember something I needed at the grocery store and go out for that, come home again, then run out to the library. All of these places are within a two mile radius of my house. Making lists before leaving the house has helped me to group my errands within one trip, meaning fewer back and forth trips.
Slow down. Your parents were right. Slow is better. Not only is it safer to drive the speed limit, you'll be increasing your car's efficiency and reducing the amount of fuel your vehicle uses.
Comment: My understanding was that it takes more gas to turn a car on that to idle it.  I don't know at how many minutes that becomes untrue, or if that even applies to newer engines.
Comment: That is a myth.  Idling consumes a tremendous amount of fuel and it also its the period where the exhaust is the highest.
Answer: Replace your own brake pads
Disc brake pads are usually snap-in replacement parts. YouTube has tons of videos showing how to do it. Find one with a car similar to your own.
And it cannot be over-emphasized... Keep up on the routine maintenance. You can look up the schedule on your car manufacturer's website.
Comment: Learning how to change my own brake parts is probably the single biggest money saver related to my vehicle. Everyone will need to replace their brake parts eventually, and dealers love to charge $$ for it.
Answer: If you intend to buy a car, go with a used car from the 1990-2000 era
These cars are generally considered out of date and are less prone to be victims of car theft while being reasonably safe. Make sure you pick a model with a good reliability reputation, see what comes up at your local junk yard (the common old models have survived long enough to not end up there until now).
Worry less about gas prices and more about maintenance
Servicing your car takes some effort and some initial investments, but learning how to fix simple problems by yourself will save you a lot of money in the long run.
Start by learning how to locate some simple faults. Diagnosing issues is a very costly process if done professionally, but some you may be able to find by yourself.
Get an OBD2 adapter for your phone
All cars sold in USA from 1996 are required to have this connection below the steering rack. As a consequence most cars manufactured 1995 will have this connector world wide. If you connect your OBD2 adapter to this port your car will be able to tell you what's wrong through an app on your phone and you will be able to clear fault codes by yourself to make sure the problem really is solved.
Every car has an extensive service manual written by the manufacturer
This is what you mechanic should use when servicing your car. While a new print can be expensive you can find used manuals getting thrown out of service centers or at yard sales. These will include service notes and sometimes had-written notes to help you out.
Buy used parts from a junk yard
The majority of parts on scrapped cars are still in working condition and may not ever see significant wear and tear. If you put some time into removing the part yourself you will have a good idea of how difficult it is to replace the part on your car and outsource the work to a professional if needed.
Serious mechanics will install the parts you bring
This of course assumes you bring good parts. The main income should come from the work performed on your car, not the markup of spare parts. Generally speaking specialized mechanics working with one or few brands of cars are preferable as these will not only be familiar with your car but are also more likely to get original spare parts (not "pirate" parts made to be compatible at a cheaper price). This will make sure the part works as intended and not cause wear and tear of other parts. For example you'd much rather replace a broken fuse instead of cleaning up the aftermath of fried electronics.
If you're still worried about gas prices

Turn off the AC when it's not needed. There should be a button labeled "ECON" or similar which will disable the AC compressor while keeping the rest of the systems running. The compressor is usually driven by a belt from the crankshaft and will eat up some of the power your engine produces. Just remember that while it saves gas, uncomfortable driving conditions may shorten your patience and reduces your attention.
Accelerate up to speed quickly. Contrary to popular belief, this saves more gas than accelerating slowly because the time your engine is under increased load is shorter combined with higher efficiency at medium engine speeds.
Allow your speed to decline on uphills, you will regain that speed once the road levels out. Unless you're in heavy traffic driving a bit slower shouldn't harm the flow. Don't let go of the gas pedal, just avoid compensating as much. Your target should be to not lose more than 20% of your speed over the entire ascent and have a constant deceleration or you will start interfering with traffic.
Make sure your car is healthy. As obvious as it may sound, worn out parts may harm your mileage. Increased friction in bearings due to broken protective covers or reduced pressure from a broken exhaust are just examples if things that will ruin the efficiency of you driveline. By themselves they may not do much but they add up into both gas consumption and reliability issues.
Really do read your owners manual. Nobody knows your car better than the people who built it. What's best for my car may not be best for your car and the best way to make sure your car is working as intended is to take an afternoon with your manual and a cup of your favorite beverage. Afterwards you will know how all the features of your car works.

Final notes
"Take care of your car and it takes care of you" is the principle I'm working with. A car you're happy with will make you more calm behind the wheel and leads to higher quality of your driving decisions. Both you and your fellow commuters will benefit from this, even if they may never take the time to thank you.
Answer: Manage the fuel consumption price: check the pattern of fuel prices if you can for your area.  Some areas have weekly changes which are somewhat predictable and some sites will even predict the minimum price for the  next day.  Some other areas will have a discount fuel day.
Switch to diesel: fuel consumption by diesel engines are much better than standard combustion engines.  Downside is not as many refueling stations.
Switch to a hybrid: fuel consumption is better than comparable combustion engines alone but the downside is that the technology is new and still maturing.  Check out this site for more information.
Answer: Don't buy the first model year of a new model unless the fuel economy is much better in the latest model.  Buying a car in later years just before the changeover will result in a slightly higher quality vehicle or in some cases dramatically higher quality.
Find the best forum for your make/model/year of car.  Join the forum, check the FAQ, sticky threads and post questions when you have trouble.  Do NOT rely passively on the dealer or even private mechanics as they do not drive the car every day.  You are in the best position to identify problems but only if you have some help.   Preventive maintenance is the best if you intend to keep the car for a really long time.  Forums are a really good place to find the typical problems of a particular model and potentially head them off.
Answer: The obvious answer for savings costs with a car is not to have a car.   Of course that must be balanced against other expenses (bicycle, taxi, public transport) to do things.
Generally speaking, if you need a car, ways to contain expense are to buy the least expensive vehicle with the most economical engine that meets your needs, keep it undercover (reduces damage or wear due to exposure), proactively maintain it (maintenance is cheaper in the long run than the costs of dealing with a breakdown and cost of repairs, and lack of maintenance accelerates depreciation), and shop around for a good mechanic who will maintain it at a fair price.
If you do a lot of milage, or do a lot of towing, or drive under load, consider a diesel.  A diesel engine often costs more each service, sometimes has a shorter service interval, but it also gets greater milage.   There may be a differential cost of fuel (diesel is often a bit more expensive per volume).   For towing, a diesel is often more economical, due to low end power (greater torque at lower revs) which does result in better fuel economy.   It is no accident that most large transport vehicles consume diesel.   Do the sums based on your usage before you buy.
Accelerate as gently as possible to get to speed within traffic conditions (less fuel to get to a speed).   Change up to higher gears as soon as possible as - at a given speed - economy will be better, as long as the engine has enough oomph to handle it (so don't try to start from stationary in a high gear).   Don't drive faster than necessary, as drag increases with speed, and hurts economy.   Similarly, reduce speed gradually, to reduce undue wear on breaks and reduce fuel consumption (sharp breaking with power assisted breaks does affect fuel economy).
Drive close to legal limits if conditions permit.   This reduces chances of annoying other drivers (who if they get impatient may throw rocks at your car, or collide, or subject you to road rage - which contribute to damage and insurance costs).   It also reduces chances of being pulled over by police and fined for obstructing other traffic.
Don't tailgate.   This both consumes fuel in keeping up, and means needing to slow sharply.   And increases chance of accident.
Don't idle more than necessary.  Allow stop/start systems on your car to operate - particularly if you're in stop/start traffic.   However, there is a break-even point where stopping and restarting consumes more fuel than idling, so get to know your vehicle.   That depends on how much the engine needs cranking to restart - which is affected both by engine design and maintenance.   Maintain it yourself if you have the skills, but account for the cost of parts and equipment, to be sure it is cost effective  (modern cars are software driven, so equipment to diagnose and maintain can be expensive).
Combine trips (don't get into the car for every little thing - wait until you can do a few things during a single drive) and car pool.
If fuel prices vary (e.g some places have regular cycles) try to refuel near the bottom of a pricing cycle.
Take unnecessary weight out of the vehicle.   Don't load it up with tools unless you need them frequently.


How to sing rock like this?

Question: Can anyone please explain in technical terms how Richie Kotzen achives the singing voice in this song? The more singing terminology the better.
Thank you !
Richie Kotzen - Mother Head's Family Reunion
Comment: As for the tone, related: https://music.stackexchange.com/q/79614/45266, although disclaimer: I wrote the accepted answer.
Answer: Cool video! He seems to be using a strong head voice (aka reinforced falsetto), which he is blending very nicely with his chest voice to create a smooth mixed voice with a nice, rocky tone.
I suggest you look into 'head voice', if you don't know what that is (the upper register above the chest voice). Apparently it can be strengthened and then blended with the chest voice to create a 'mixed' voice, although doing that may take quite a lot of time/training, depending on your level of ability.
As anyone will tell you, the best (and safest) option is to find a good vocal coach (although I've been seeing some improvement myself following some of this guy's videos on YouTube).

How to sing rock like this?


How do I recover Ubuntu One files?

Question: I have uninstalled Ubuntu One and deleted the "Ubuntu One" directory. After reinstalling Ubuntu One all files from onlinestorage and all connected PCs were gone. is there any way to recover the files?
Answer: If you find yourself in a situation where you think Ubuntu One has removed your files you have two options. The first place to check is the computers Trash. Ubuntu One on versions of Ubuntu newer then 11.04 and all the Windows Clients move files to the computers Trash when removing them.
If that does not work there is a job that we can run in emergencies to try and recover your files. Please contact our support folks for that.
Answer: You could try to use a data recovery tool like scalpel.
If the data is really important stop to use the disk NOW. Every time you write something to your disk you might delete some of the lost data permanently. . Boot from a CD and create a disk image (on a separate disk of course) and work for recovery only on this disk image. Use a tool like scalpel or foremost or something like that. Here is s good description how to use them http://ubuntumanual.org/posts/357/recover-your-deleted-files-in-ubuntu

How do I recover Ubuntu One files?


is there an infringement between this patent and lufthansa us8216392 patent?

Question: lufthansa us8216392  and Gas T. E. us7445677 is very close to eachother and I assume there is an infringment.  If you search lufthansa cyclean pictures and patent drawing of us7445677 you will see that it is almost same. I know drawing doesnt mean patent but claims are also very similar. So I think that Lufthansa or GTE infringing or there is a licence agreement between them.
Answer: Just to be clear - patents can not infringe patents. Products being made, sold used, or imported can infringe patents.
Answer: Interesting thing about these two patents is that the '392 patent was filed first - giving it the priority date, but the '677 patent was examined first because the applicant filed a request for accelerated examination. This becomes tricky because the first-filed application does not become prior art until it publishes. However, once it publishes it will count as prior art as of its priority filing date.  Here, the owners of the '677 patent were able to slip through the PTO without consideration of the earlier patent because the accelerated examination was completed prior to the publication of the '392 patent.
If the '677 patent is ever enforced, the '392 patent will probably be the first-line of defense in an invalidation campaign.
Comment: After a quick search I found that 392 patent was filed on 16.03.2007 to EPO so there is no way that uspto examiner could see 392 patent at any database until it was published. If I am wrong please correct me.


How to sum values of overlapped pixels in thousands of rasters layers and clip it using a polygon in QGIS?

Question: I have a lot of rasters files (more than 6000), each one represents the presence and absence of a species  (1 for presence and NoData for absence). The set of rasters covers the whole Latin America and they can overlap eventually. I also have a vector polygon layer which bounds an area in which I am interested in.  As a final goal, I would like to sum all the species in each grid in my area of study.
Any ideas on how to achieve this?
I have tried to sum all raster using Grid Sum in Saga and in order to clip it afterwards. Problem is that the output has only NaN and zeros values - which does not make sense... I used a sample of 100 rasters, in order to test it. And it lasts more than two hours! Any ideas on how to do it faster?!
Comment: How many total species are involved?  If it's under 31, you could use a bitwise mask and reclass each data value as a power of 2 (1,2,4,8...) and allow the results to coexist in one raster.
Comment: what is the meaning of summing the rasters? do you want to have the amount of species per pixel? if so, then why do you have -1 for presence? I am sure, recoding all -1 to 1 would help for the Grid Sum in SAGA. clipping is a piece of cake then.
Comment: Yes,Jens, the meaning of summing the raster is to have the amount of species per pixel. And the values for presence is 1 (sorry, my mistake, I edited the question and shift " -" for parenthesis). And Grid Sum is not working, beacause the output is an empty map, with values from NaN and zeros...
Answer: Following on Vince's comment: you can remap your species to IDs that are powers of 2, as below, represented as integers and binary.
Species 1 --> 1 --> 00000001
Species 2 --> 2 --> 00000010
Species 3 --> 4 --> 00000100

You can see that each species is identified by a 1 in a unique slot in the bit sequence. So for each species, you'd have a raster with cells of either zero (no presence) or, say, 4 (species 3 is present). In a 32-bit integer, you have 32 of these slots.
When you add these layers together, you get a sum for each pixel that indicates which species are present.
Raster 1 --> 000000001
Raster 2 --> 000000010
Raster 3 --> 000000100
             ---------
Output   --> 000000111 --> 6

In this instance, the value 6 tells you that species 1, 2 and 3 are present.
You can also use other operators such as bitwise AND not NOT to see cells where two or more specific species are present, or cells where certain species are not present together.
If you process your rasters this way, you can add them incrementally using a scriptable raster calculator like gdal_calc.py, adding each raster to the the sum of all previous rasters (though you'd probably have to turn all your rasters into VRTs first so that they have equal extents, etc.)
In QGIS you'll just add them all to the summation in the raster calculator.
Edit, based on the answer to Jens' comment and more info:
I'm answering the wrong question above. If you want only to sum the number of species in a cell and each cell-with-a-species is 1, you just add all the rasters together. To convert the NaN cells to zero, you can use the numpy function nan_to_num, which converts NaNs to zeroes. So you add like this:
nan_to_num("raster1@1") + nan_to_num("raster2@1")

Comment: Sorry, Rob, I am new in Qgis and I don't know how to remap rasters... Even if I learn it, is it possible to do that for 6000 rasters???
Comment: When I say "re-map" I mean in a functional, not cartographic, sense. Like, if you have a species with an integer ID, it would "map onto" an ID that is a power of 2.

How many species are we talking about? Are there many rasters for one species, or is each one for a different species?
Comment: Each raster is for one species. I have more than 6000 species (consequently more than 6000 rasters). All of them are the same size, the same number of rows and columns, and the same pixel size. And they overlap. I suspect Grid Sum (SAGA) is not working because of the NoData values... Does it make sense? Maybe if I shift the NoData for zeros?
Comment: I see now. I've answered the wrong question. See the bottom of my answer for more.
Comment: Thank you, very much! Yes, when I changed the NaN to zeroes, Grid Sum worked!
Comment: Great! Glad I could help.
Answer: I am new to this too so I will not be able to help with prepackages  solutions but from a programming perspective we have,
6000 binary rasters as independent files
  (species exists in pixel or not)
  (what dimensions X & Y?)
each file contains an identical but irregular area of interest
 ( what size bounding box for area of interest?)
 ( are number of pixels inside bounding box but outside area of interest smallish?)
crop the bounding box out of all rasters
reform each bounding box as a bit vector (use presence=1 absence=0)
stack your 6k bit vectors together and sum in any reasonable language
reform the resulting vector of totals back into a rectangle region.
insert the new raster back into its context.
you could get fancy and make a mask (another bit vector)
of pixels not to sum over but I would do the easiest first.
I don't know what format your rasters are in now
but converted to netcdf there are tools like nco (netcdf operators)
and ncl (ncar command language) which have many tools to efficiently
manipulate and process rasters.
cheers
Comment: Thank you, very much! I had already solved the problem with Rob suggestion...


Drupal module to generate compressed xml sitemap

Question: Is there any Drupal module which can generate compressed xml sitemap like sitemap.xml.gz? The problem is I have a site with a lot of pages and the generated sitemap is very big (more than 1 MB). I have "404 not found" errors in google webmaster tools for the sitemap, but when I open the address mysite.com/sitemap.xml the sitemap is displayed after more than 5 seconds. When I test my sitemap with google PageSpeed Insights it tells me to activate compression and I will reduce the data transfer for this file with 92%.
I activated compression on Nginx and now it is compressing everything but the sitemap.  Now I am searching for a module generating compressed sitemap.
I am usung Drupal 7 with Nginx and xmlsitemap module for generating sitemap
Comment: This should be something the XML sitemap module does. It's from ages that I am not maintaining it, but I recall the module had code for that. (Clearly, it was in the Drupal 6 module, not the Drupal 7 module.)
Answer: You can separate you sitemap.xml into several sitemaps. Each of this maps will be a smaller than one big sitemap.
Go to admin/config/search/xmlsitemap/settings, in Advanced settings in Number of links in each sitemap page choose, for example, 1000 and regenerate you sitemap.
Comment: This will be the next step if I don't find a way to compress the sitemap. At the moment my sitemap is split into few sitemaps with 10 000 links each one and I am still having 404 errors in webmaster tools.


What is the "area rule"?

Question: The "area rule" states that the supersonic drag on an aircraft is related to the total area on part of the aircraft. What is the exact definition of the rule? Why does this happen?
Comment: It's related to the shape of the curve of cross sectional area as plotted along the longitudinal axis of the aircraft. In other words, let the x-axis be the fuselage station from the nose of the aircraft to the tail of the aircraft and let the y-axis be the cross sectional area of successive planes along the longitudinal axis of the aircraft and at 90 degrees to that axis. If a part of that curve has a sudden change of slope relative to the curve before and after that part, the area rule has been violated, and you will have greater transonic drag rise than if the curve was smoother.
Comment: Also keep in mind that there are at least two different area rules: one for transonic flight and one for supersonic flight. For supersonic flight the algorithm is far more complicated—as instead of normal sections you must track the cross-sectional area of the aircraft across planes at the Mach angle $\mu=sin^{-1}(1/M)$.
Comment: I'm not an aerodynamicist so I'm not competent to write up a full explanatory answer, but I can point you to the [Wikipedia article](http://en.wikipedia.org/wiki/Area_rule) which has a lot of good information.
Answer: You might have heard of the elliptical lift distribution which minimizes induced drag for a given span and a given lift. Area ruling is similar, but here it is about the lengthwise distribution of cross-sectional areas of a plane, and it minimizes wave drag at Mach 1.
The first picture is from a Junkers patent of 1944: Junkers found out in 1943 that transsonic drag can be minimized by shifting the parts of an airplane around. In this case it was the EF-122, a research project which became the Ju-287. The easiest bodies to shift were the engine nacelles, that is why the end product has such odd engine locations. The drawing shows several shaded cross sections along lines which carry Roman numerals: Plot the sum of all areas along each line over the aircraft's length coordinate, and you get a distribution which must be optimized such that it has the maximum area for the smallest gradients.

The next picture shows how those plots look like. This is from a different source, so it shows generic wing-body combinations. On the left is an airplane with a fuselage shaped like a Sears-Haak body. A Sears-Haak body is an optimum shape for the biggest volume with a given wave drag and was discovered by Wolfgang Haak in 1941 and again by William Sears in 1947. The wings come on top and mess up the area distribution by creating a bump in the middle.
The right plot shows what can be achieved by taking all parts of the airplane into account. The difference is shown in the small center plot.

How this is done: Take away from the fuselage what is added by the wings. The result is a fuselage wich looks like a coke bottle. You can also add Küchenmann bodies; older airliners have plenty of them. Look especially at fuselages like those of the Blackburn Buccaneer, or  T-tails like those of the Illjushin Il-62 or the Tupolev Tu-154. Today, things like engine pylons or flap track fairings are used as Küchemann bodies to smoothen out the lengthwise area distribution, and if you look carefully you will see the coke bottle technique on the fuselage around the horizontal tail of many airliners. They don't fly at Mach 1, but close enough that area ruling makes a difference already.
The dawing below shows the general concept and the magnitude of drag reduction achievable:
Comment: may I ask if you could add a more explicit picture of what a Küchenmann body is?
Comment: Wikimedia has a collection of pictures: http://commons.wikimedia.org/wiki/Category:Anti-shock_bodies
Comment: ah, those! had no idea they were called that way. Thanks!
Answer: In essence, the area rule is a general rule of aircraft design which prohibits abrupt changes in a aircraft's cross-sectional area from one point to another on it's longitudinal axis, since these would create areas of low pressure in the surrounding airflow that would literally hold the aircraft back, reducing it's speed through form drag. The area rule is sometimes referred to as the "supersonic area rule" since it has more significance at transonic and supersonic speeds.

What is the "area rule"?


Can hydrogen gas work in all ICEs?

Question: If I put hydrogen gas in any internal combustible engine that use normal fuel or even a diesel engine, would that mess up the car?
Answer: Yes.
Traditional combustion engines can run on numerous fuels, and gases work very well. Hydrogen is being tested by a number of manufacturers on fairly traditional engines.
The engines are usually 'built' however - harder valves/stems/springs, uprated conrods, pistons, bore sleeves etc. Also obviously the injection system is different (I believe they use a gas mixer, or others use adapted DISI systems). You end up with lower emissions, lower burn temperatures, and higher power outputs.
Now how to store such an energetic element as hydrogen... that's the $150-billion question. The atoms pass straight through most storage containers we have currently, that aren't supercooled with liquid nitrogen.
https://en.wikipedia.org/wiki/Hydrogen_internal_combustion_engine_vehicle
Edit: Also Mythbusters once tested this on a completely bog-standard chev (I think?) v8, by spraying hydrogen straight into the carburettor. They nearly exploded themselves, but the car did run.
Answer: How would you obtain, store, and deliver hydrogen to an engine? I think BMW and a few other automakers tested Hydrogen as an alternative fuel in the mid 2000s and killed the project because the infrastructure to support a hydrogen vehicle does not exist in scale.
Some time ago I was looking at purchasing a CNG car.  At the time people told me it would be too expensive to retrofit a vehicle but you can find CNG cars at municipality auctions and Honda made a CNG civic.  Also chances are good you can find at least one CNG station in a mid-sized city.
Not sure if a CNG car could be converted to hydrogen, but they do have high pressure tank and are tuned to burn a fuel that is more similar to hydrogen than gasoline ( my guess, I am not a chemist or engineer)
Comment: I just wanted to know could it destroy the engine of a gas and diesel engine
Comment: If you don't have a proper storage or delivery system you aren't really using hydrogen as a fuel.  I don't think a gas or diesel engine would blowup from feeding a a few balloons of hydrogen, but I've never tried.

Can hydrogen gas work in all ICEs?


Is there a standard power adaptor to use on airplanes?

Question: For international flights of 12-15+ hours, do the planes usually have AC power available in Economy? If not, is there a standard "airplane power adaptor" that can convert the DC into AC to power a laptop or other electronic item? Is this the same type of adaptor that you can use in cars, or is it a different plug type on an airplane?
Comment: I've had normal power outlets on AA 737s on domestic US flights, and also seen DC power adaptors, likely the EmPower mentioned below, but I'm mainly concerned with long-haul flights with this question.
Comment: Worth noting that many PEDs nowadays are perfectly capable of going for 12-15+ hours on a full battery charge.
Answer: When power outlets were first installed on airliners, they used a special adapter called EmPower, which looked like this:

The airlines obviously thought that frequent flyers would be happy to buy a new kind of adapter for all their gizmos. This turned out not to be entirely true... nobody wanted to buy these new stupid adapters, and the airlines eventually realized that it wasn't going to work.
So they are now installing "normal" power outlets... often special receptacles with all kinds of holes that can handle just about any kind of plug, US, European, or British. If they already installed the EmPower thing, they're regretting it and replacing it with standard receptacles as fast as they can.
There is no standard rule to decide if your flight is going to have power, except for the following vague rules of thumb:

The higher your class of service (First vs. Coach) the more likely you are to have power
The longer the flight, the more likely you are to have power

The canonical way to find out is by finding out the exact aircraft you'll be flying on, and looking it up on SeatGuru to see where the power outlets are and whether they are EmPower or AC. Most airline websites will also have details on where power is available.
Comment: interesting that the takes-my-normal-plug-and-probably-everyone's socket in the picture I found has an EmPower logo on it. Seems like they changed their ways too.
Comment: I figured SeatGuru on a case-by-case basis was likely the answer, but didn't know if there were any other standards. Thanks!
Comment: I just took the flight that I was asking this question for, a Cathay Pacific 777-300 from ORD-HKG and while SeatGuru said it had "EmPower" outlets, it had the same outlet as the Air Canada one that @KateGregory mentions. I'm glad I didn't buy an adaptor.
Answer: Air Canada has power in economy. It is a standard North American plug. There was a brief time when in-air power required a special airline-only adapter, similar to the way headphones had that strange two-prong plug. But I think these days if there's power it will be a "normal" plug for that airline. The only adapter you are likely to need is one you would use anyway in the country you're heading to.
After reading Joel's answer I realized that the plug is a little more complicated than a North American plug (though my stuff fits in it fine) and found this picture:

Perhaps most European devices could also use this plug.
Comment: Right, from the photo, it looks like a dual US/Europe socket.
Comment: Looks to me like it will take australian plugs too.
Comment: I don't think this particular one will take Australian plugs.
Answer: I haven't flown an airline offering power in economy, but Apple offers an Apple MagSafe Airline Adapter, so I guess that the answer to that part of your question is yes, otherwise apple is lying.
Seatguru.com offers insight which airline offers in flight power, but I could not find one that offers power in economy.
Comment: Apparently, it was designed to connect to the EmPower plugs described in the other answers but it's not available anymore so the answer now seems incorrect.
Answer: I have seen power outlets offered in economy a few times.  Most recently on a UK to US flight with United.  Also, on some internal flights.  The sockets took US plugs and delivered something that my laptop power supply was happy with: probably 110V 60Hz.  Fortunately, most laptop and other portable device power supplies are quite tolerant these days.  If something bad came out of the socket then I hope that the power supply would lay down its life for the device it served.  I had a power block with me but power was so easily available for the whole trip that I never used it.
Comment: I've noticed a lot of economy seats that have recent in-seat entertainment monitors often have a USB port as well. It doesn't help much with a laptop, but good for charging a phone or anything else that can charge off of USB.