Experiment to prove that water has air

Question: In elementary school, there was an experiment  to show that water has dissolved air, which involved boiling some water and observing the drops at the surface of the container,  and this proved that water has air. Now, in senior high school, I was thinking about the same,  and I think this conclusion is wrong. Aren't the drops formed by the conversion of liquid water to steam due to evaporation? Or is it really the dissolved air that is escaping? What are your thoughts?
Answer: There are two ways that I interpret the question you're asking, and I'll try to address each in turn.

If your teacher boiled a container of water and held a piece of glass above it to collect drops of liquid water, he or she may have been trying to show that water doesn't disappear when it boils, that instead it turns to a gas that can move through the air and can be condensed back into a liquid.  Essentially, $\ce{H2O}$ is $\ce{H2O}$, regardless of the state of matter it occupies.
If instead the teacher wanted you to observe the bubbles of gas forming in a container of hot or boiling liquid, he or she might have been on the right track, but either failed to convey the correct message to you or had the wrong idea in the first place.
If I take water from the tap and heat it strongly, bubbles will form on the inside of the vessel I'm heating it in prior to it boiling.  These are bubbles of gas that are no longer soluble because the temperature of the liquid is too high (and its pressure has decreased as compared to the tap.)  The gas is dissolved air (mostly carbon dioxide, I suspect) with a large portion of water vapor.  In any case, they are bubbles of gas that were dissolved but are no longer.  You can see this happen any time you boil a pot of water on the stove.
Once the pot reaches boiling, any bubbles are almost exclusively gaseous water formed via vaporization.
An easier, if slower, way to see this is to run a cold tap until the water is as cold as it will get, then pour a glass.  As it sits (perhaps for an hour or two), bubbles will eventually form on the walls of the glass.  These eventually will dissolve again and the gas will escape through the top of the glass, so it's not something you can set up at night and come back to the next morning.  The bubbles are air that was able to dissolve in the high pressure/low temperature water in the pipes but not in the low pressure/high temperature water in the glass.
Comment: @SaurabhRaje  Yes, that's basically it.  Far below 100°C, bubbles that form are mostly dissolved air (with excess carbon dioxide, because it dissolves much more readily than nitrogen or oxygen.)  Closer to 100°C, they would include more and more water vapor because the vapor pressure of water increases as the temperature rises.  Above 100°C, the water boils and the bubbles are almost exclusively water vapor.
Comment: The setup was number 2. So from what i gather, at a lower temperature,  bubbles are mostly dissolved air, and at higher temperature,  its water vapour.
Answer: A German scientific TV show once showed a great experiment (alas, I cannot find any copy of it on Youtube). They had two pots of water. In each of them there was a large water-filled closed-top glass cylinder that reached out of the water so that its upper part was freely visible. They then boiled the water in both pots for some time; part of the gas was collected in these cylinders and made the water level in them drop.
Then, they let the water cool down again (this was recorded in fast motion). In one of the two cylinders (calling it cylinder 1) the water level rose back to the top, the other one kept a cushion of air at the top of the cylinder (cylinder 2).
The explanation: The water in cylinder 1 and its corresponding pot had been pre-boiled. Since gases are better soluble at low temperatures, boiling and re-cooling effectively removed all dissolved gases from the water of cylinder one before the experiment. Thus, the only gas to be observed at the top of cylinder 1 was water vapour.
Cylinder 2's water had not been pre-boiled. There were still gases dissolved in the water which again escaped upon boiling. These gases were collected at the top of cylinder 2 along with water vapour. When the setup was cooled down, the water vapour recondensed (to a significant fraction, at least) but the previously dissolved gas remained on top.
Answer: Your description is somewhat vague ("boiling some water and observing the drops at the surface of the container"), but it does seem unlikely that such an experiment demonstrates that air dissolves into water.  If by 'drops' you mean gas bubbles, then yes: the gas bubbles in boiling water are substantially all water vapor, not air. You are correct: any drops of liquid forming on the inner surface of the container would be from re-condensed water vapor, itself evaporated from the boiling liquid, and would have nothing to do with air having been dissolved in the water.
What I would do to attempt to demonstrate that air dissolves into water would be to rig up a 2L clear plastic (NOT GLASS) soda bottle so that I could connect it to an air compressor. (I'd have to think a bit how to accomplish this.) Then:

Fill the bottle about half full with plain water
Cap the bottle & connect to the compressor
Wearing safety glasses and being very careful (the bottle could burst, or turn into a rocket if the cap comes loose), pressurize the bottle to 100psi (~700 kPa),
Let the bottle stand, pressurized, for a while -- thirty minutes, maybe? -- periodically swirling it gently.
CAREFULLY vent the pressure over 5-10 seconds, like when opening a bottle of soda that's been shaken.
If no bubbles appear, tap the side of the bottle several times.

The amount of air that dissolves in water increases with the pressure.  The hope would be that enough additional air dissolves under 100psi air, that when you release the pressure in step 5 and the amount of air the water can hold then drops back down to normal, the excess air will form a bunch of bubbles throughout the water.
Comment: By drops, i mean droplets, like ones of condensation, or for eg ones you may observe if you pour sparkling water in a glass container. Sorry for my language, english is not native
Comment: It's quite all right; I just want to be sure I'm answering what you're actually asking.
Comment: @SaurabhRaje Do you mean drops of gas or drops of liquid?  Drops of gas would be called bubbles, which would make your teacher's demonstration make a lot more sense.
Comment: @JasonPatterson, i mean drops of gas, or bubbles.
Comment: Saurabh, having read Jason's answer, I think I was misunderstanding your question all along...apologies!
Comment: @brian, no problem

Experiment to prove that water has air


How come the cops didn't find the gun thrown in the shallow river? But they had his prints on the murder weapon

Question: In Shawshank Redemption, Andy tells the prosecutor and the court that the night that his wife and her lover were killed, he threw his revolver into the river from the bridge and went home. The prosecutor tells him that the police search the river for 3 days and didn't find any gun. How was this possible? The river was shallow, it was not a fast flowing river, the revolver was heavy and no one saw him throw the gun. Then how did they find his finger prints on the murder weapon?
Comment: "*his finger prints on the murder weapon*" Are you sure about that? Weren't they on some bullets and a bottle he dropped?
Comment: Among the few items, but not enough to tie him up to the murder, unless it was on the gun, coz, let's face it, they were murdered using a gun and not a bottle of hooch
Comment: I'm guessing this won't be the first time someone was convicted without a murder weapon. Remember, this is the 1940s (which might also explain the cops' inability to find the gun).
Comment: Yes, your completely right. But the prosecutor HOLDS out a gun in bag, and i quote "through which 8 bullets were fired, four for each victim, and on which are Mr. Dufrene's fingerprints on them."
Comment: No, that's *not* what he says and there's also no bag; you should rewatch the scene (I just did). But that's what he wants the jury to *think*. Yes, the DA expertly deceives the jury and overwhelms them with forensic evidence to get a high-profile conviction that the viewer knows is wrongful. But sadly, these things happen *all the time* in real life.
Comment: Hmmm.... yeah, I guess your right !
Answer: I'll start at the end.

Then how did they find his finger prints on the murder weapon?

They didn't, you've simply misremembered this part. The murder weapon was never recovered. Andy's fingerprints were found on a broken bottle and some bullets found near the scene of the crime. The revolver that the DA (shrewdly) shows at court is not the murder weapon but a substitute.

The prosecutor tells him that the police search the river for 3 days and didn't find any gun. How was this possible? The river was shallow, it was not a fast flowing river, the revolver was heavy

The Royal River is indeed a small river. But I feel this is plausible due to a few factors:

The movie takes place in the 40s. The technological means and techniques for scouring and dredging that speed up a water search today weren't available back then;
It was at night and Andy was still a little drunk, so he probably couldn't remember exactly where he threw the gun, which would make the search even harder;
Chance. Simply put, these things happen. A police force isn't infallible, the river is still 40 miles long and Andy might've dropped the gun in a strong current that carried it away.

And ultimately, I'm not even sure it matters all that much. Without direct evidence, a murder weapon or eye witnesses, the DA put up a convincing argument: Andy had a motive, left fingerprints & footprints behind, admits he had a gun and bullets and his detached demeanor comes off as icy. If the gun had been found, the DA might've found a counter-argument (that Andy secretly had 2 guns, for example), because it's still Andy's word, and his story unfortunately doesn't ring true.
Comment: That's very enlightening :)


How do I get Realtek HD Audio 5.1 working on Windows 7?

Question: I have problem with Realtek 5.1 driver for Windows 7 x64. I've installed newest drivers for Realtek HD Audio, but 5.1 still doesn't work, the only thing that works is front stereo. However, when I click on single speaker in sound settings test, every one of them work.
Answer: I never got surround sound working perfectly in Windows; the only solution that has ever worked was switching operating systems. I now have Ubuntu and enjoying perfect 5.1 sound now, all my boxes are working.
However I think I managed to get the Realtek high definition audio codecs working in Windows 7 though. But there was a lot of struggling. I had to search a long time till I actually got the Realtek audio interface, this one:

Just go to this link: http://www.realtek.com.tw/downloads/
Install the audio codecs, after the reboot, go to your configuration screen, choose sound, and the audio manager should be integrated in a new menu there. I'm not sure about this.
In the speaker tab, you have to check "Speaker fill" to enable the rear speakers.
Answer: I believe that the application you're using must be sending 5.1 audio for it to work.
You can't just play a 2.1 source and expect it to be replicated on all channels.. 5.1 expects a different track for each channel.
The RealTek UI is really crappy though, and it should have an option to replicate the audio onto all channels, but it seems you have to use a plug in for that.


What is the difference between compile and link function in angularjs

Question: Can someone explain in simple terms?
The docs seems a bit obtuse. I am not getting the essence and the big picture of when to use one over the other. An example contrasting the two would be awesome.
Comment: Perhaps a more comprehensive overview of directive functions: [Angular directives - when to use compile, controller, pre-link and post-link](http://stackoverflow.com/questions/24615103).
Comment: http://www.jvandemo.com/the-nitty-gritty-of-compile-and-link-functions-inside-angularjs-directives/
Answer:
compile function - use for template DOM manipulation (i.e., manipulation of tElement = template element), hence manipulations that apply to all DOM clones of the template associated with the directive.
link function - use for registering DOM listeners (i.e., $watch expressions on the instance scope) as well as instance DOM manipulation (i.e., manipulation of iElement = individual instance element). It is executed after the template has been cloned.  E.g., inside an
, the link function is executed after the
 template (tElement) has been cloned (into an iElement) for that particular
 element. A $watch() allows a directive to be notified of instance scope property changes (an instance scope is associated with each instance), which allows the directive to render an updated instance value to the DOM -- by copying content from the instance scope into the DOM.

Note that DOM transformations can be done in the compile function and/or the link function.
Most directives only need a link function, since most directives only deal with a specific DOM element instance (and its instance scope).
One way to help determine which to use: consider that the compile function does not receive a  scope argument.  (I'm purposely ignoring the transclude linking function argument, which receives a transcluded scope -- this is rarely used.) So the compile function can't do anything you would want to do that requires an (instance) scope -- you can't $watch any model/instance scope properties, you can't manipulate the DOM using instance scope information, you can't call functions defined on the instance scope, etc.
However, the compile function (like the link function) does have access to the attributes. So if your DOM manipulations don't require the instance scope, you can use a compile function.  Here's an example of a directive that only uses a compile function, for those reasons.  It examines the attributes, but it doesn't need an instance scope to do its job.
Here's an example of a directive that also only uses a compile function.  The directive only needs to transform the template DOM, so a compile function can be used.
Another way to help determine which to use: if you don't use the "element" parameter in the link function, then you probably don't need a link function.
Since most directives have a link function, I'm not going to provide any examples -- they should be very easy to find.
Note that if you need a compile function and a link function (or pre and post link functions),  the compile function must return the link function(s) because the 'link' attribute is ignored if the 'compile' attribute is defined.
See also

Difference between the 'controller', 'link' and 'compile' functions when defining a directive
Dave Smith's excellent ng-conf 2104 talk on directives (the link goes to the section of the video that talks about compile and link)
Comment: Best explanation on compile vs link.
Comment: When you say `if you don't use the "element" parameter in the link function, then you probably don't need a link function.` do you mean "scope" instead of "element"?
Answer: I beat my head against the wall on this for a couple of days, and I feel that a bit more explanation is in order.
Basically, the docs mention that the separation is largely a performance enhancement. I would reiterate that the compile phase is mainly used when you need to modify the DOM BEFORE the sub-elements themselves are compiled.
For our purposes, I'm going to stress terminology, which is otherwise confusing:
The compiler SERVICE ($compile) is the angular mechanism that processes the DOM and runs the various bits of code in directives.
The compile FUNCTION is one bit of code within a directive, which is run at a particular time BY the compiler SERVICE ($compile).
Some notes about the compile FUNCTION:

You cannot modify the ROOT element (the one your directive affects), since it is already being compiled from the outer level of DOM (the compile SERVICE has already scanned for directives on that element).
If you want to add other directives to (nested) elements, you either:

Have to add them during the compile phase.
Have to inject the compile service into the linking phase and compile the elements manually. BUT, beware of compiling something twice!

It is also helpful to see how the nesting and explicit calls to $compile work, so I've created a playground for viewing that at http://jsbin.com/imUPAMoV/1/edit. Basically, it just logs the steps to console.log.
I'll state the results of what you'd see in that bin here. For a DOM of custom directives tp and sp nested as follows:
<tp>
   <sp>
   </sp>
</tp>

Angular compile SERVICE will call:
tp compile
sp compile
tp pre-link
sp pre-link
sp post-link
tp post-link

The jsbin code also has the tp post-link FUNCTION explicitly call the compile SERVICE on a third directive (up), which does all three steps at the end.
Now, I want to walk through a couple of scenarios to show how one might go about using the compile and link to do various things:
SCENARIO 1: Directive as a MACRO
You want to add a directive (say ng-show) dynamically to something in your template that you can derive from an attribute.
Say you have a templateUrl that points to:

<input type="text">

and you want a custom directive:
<my-field model="state" name="address"></my-field>

that turns the DOM into this:

<input ng-model="state.fields.address" ...>

basically, you want to reduce boilerplate by having some consistent model structure that your directive can interpret. In other words: you want a macro.
This is a great use for the compile phase, since you can base all of the DOM manipulations on things you know just from the attributes. Simply use jQuery to add the attributes:
compile: function(tele, tattr) {
   var span = jQuery(tele).find('span').first();
   span.attr('ng-show', tattr.model + ".visible." + tattr.name);
   ...
   return {
     pre: function() { },
     post: function() {}
   };
}

The sequence of operations will be (you can see this via the jsbin mentioned earlier):

The compile SERVICE finds my-field
It calls the compile FUNCTION on the directive, which updates the DOM.
The compile SERVICE then walks into the resulting DOM, and COMPILES (recursively)
The compile SERVICE then calls pre-link top-down
The compile SERVICE then calls post-link BOTTOM UP, so my-field's link function is called AFTER interior nodes have been linked.

In the above example, no linking is needed, since all of the directive's work was done in compile FUNCTION.
At any point, the code in a directive can ask for the compiler SERVICE to run on additional elements.
This means that we can do exactly the same thing in a link function if you inject the compile service:
directive('d', function($compile) {
  return {
    // REMEMBER, link is called AFTER nested elements have been compiled and linked!
    link: function(scope, iele, iattr) {
      var span = jQuery(iele).find('span').first();
      span.attr('ng-show', iattr.model + ".visible." + iattr.name);
      // CAREFUL! If span had directives on it before
      // you will cause them to be processed again:
      $compile(span)(scope);
    }
});

If you're sure that the elements you are passing to $compile SERVICE originally were directive-free (e.g. they came from a template you defined, or you just created them with angular.element()), then the end result is pretty much the same as before (though you may be repeating some work). However, if the element had other directives on it, you just caused those to be processed again, which can cause all sorts of erratic behavior (e.g. double-registration of events and watches).
Thus, the compile phase is a much better choice for macro-style work.
SCENARIO 2: DOM configuration via scope data
This one follows from the example above. Suppose you need access to the scope while manipulating the DOM. Well, in that case, the compile section is useless to you, since it happens before a scope is available.
So, let's say you want to pimp out an input with validations, but you want to export your validations from a server-side ORM class (DRY), and have them auto-apply and generate the proper client-side UI for those validations.
Your model might push:
scope.metadata = {
  validations: {
     address: [ {
       pattern: '^[0-9]',
       message: "Address must begin with a number"
     },
     { maxlength: 100,
       message: "Address too long"
     } ]
  }
};
scope.state = {
  address: '123 Fern Dr'
};

and you might want a directive:
<form name="theForm">
  <my-field model="state" metadata="metadata" name="address">
</form>

to auto-include the proper directives and divs to show the various validation errors:
<form name="theForm">

    <input ng-model="state.address" type="text">

Address must begin with a number</input>
...

In this case you definitely need access to the scope (since that is where your validations are stored), and are going to have to compile the additions manually, again being careful not to double-compile things. (as a side note, you would need to set a name on the containing form tag (I'm assuming theForm here), and could access it in link with iElement.parent().controller('form').$name).
In this case there is no point in writing a compile function. Link is really what you want. The steps would be:

Define a template that is completely devoid of angular directives.
Define a link function that adds the various attributes
REMOVE any angular directives that you might allow on your top-level element (the my-field directive). They have already been processed and this is a way to keep them from being double-processed.
Finish by calling the compile SERVICE on your top-level element

Like so:
angular.module('app', []).
directive('my-field', function($compile) {
  return {
    link: function(scope, iele, iattr) {
      // jquery additions via attr()
      // remove ng attr from top-level iele (to avoid duplicate processing)
      $compile(iele)(scope); // will pick up additions
    }
  };
});

You could, of course, compile the nested elements one-by-one to avoid having to worry about the duplicate processing of ng directives when you compile the top-level element again.
One final note on this scenario: I implied you'd be pushing the definition of the validations from a server, and in my example I've shown them as data already in the scope. I leave it as an exercise for the reader to figure out how one might deal with needing to pull that data from a REST API (hint: deferred compile).
SCENARIO 3: two-way data binding via link
Of course the most common use of link is to simply hook up the two-way data binding via watch/apply. Most directives fall into this category, so it is adequately covered elsewhere.
Comment: Awsome & Cool Answer!
Comment: How to add nested elements without double compiling them?
Answer: From the docs:

Compiler
Compiler is an angular service which traverses the DOM looking for attributes. The compilation process happens into two phases.

Compile: traverse the DOM and collect all of the directives. The result is a linking function.
Link: combine the directives with a scope and produce a live view. Any changes in the scope model are reflected in the view, and any user interactions with the view are reflected in the scope model. Making the scope model a single source of truth.

Some directives such ng-repeat clone DOM elements once for each item in collection. Having a compile and link phase improves performance since the cloned template only needs to be compiled once, and then linked once for each clone instance.

So at least in some cases, the two phases exist separately as an optimization.

From @UmurKontacı:

If you are going to make DOM transformations, it should be compile. If you want to add some features that are behavior changes, it should be in link.
Comment: If you are going to make `DOM` transformation, it should be `compile` if you want to add some features are behavior changes, it should be in `link`.
Comment: +1 to above comment; this is the most concise description I found so far. It matches with the tutorial I found [here](http://blog.angularjs.org/2012/05/custom-components-part-2.html).
Answer: This is from Misko 's talk on directives. http://youtu.be/WqmeI5fZcho?t=16m23s

Think of the compiler function as
  the thing that works on a template and the thing that is allowed to
  change the template itself by, for example, adding a class to it or
  anything like that. But it's the linking function that actually does
  the work of binding the two together because the linking function has
  access to the scope and it's the linking function that executes once
  for each instantiation of the particular template. So the only kind of
  things you can placed inside of the compile functions are things that
  are common across all of the instances.
Answer: Little late to the thread.  But, for the benefit of future readers:
I came across the following video which explains Compile and Link in Angular JS in a very great fashion:
https://www.youtube.com/watch?v=bjFqSyddCeA
It would not be pleasing to copy/type in all of the content here.  I took a couple of screenshots from the video, which explain every stage of Compile and Link phases:

The second screenshot is little bit confusing.  But, if we follow the step numbering, it is quite straight forward.
First cycle:  "Compile" gets performed on all of the directives first.
Second cycle: "Controller" and "Pre-Link" gets performed (just one after another)
Third cycle: "Post-Link" gets performed in reverse order (starting from innermost)
Following is the code, which demonstrates the above:

var app = angular.module('app', []);

app.controller('msg', ['$scope', function($scope){

}]);

app.directive('message', function($interpolate){
    return{

        compile: function(tElement, tAttributes){
            console.log(tAttributes.text + " -In compile..");
            return {

                pre: function(scope, iElement, iAttributes, controller){
                    console.log(iAttributes.text + " -In pre..");
                },

                post: function(scope, iElement, iAttributes, controller){
                    console.log(iAttributes.text + " -In Post..");
                }

            }
        },

        controller: function($scope, $element, $attrs){
            console.log($attrs.text + " -In controller..");
        },

    }
});

UPDATE:
Part 2 of the same video is available here: https://www.youtube.com/watch?v=1M3LZ1cu7rw  The video explains more about how to modify DOM and handle events during Compile and Link process of Angular JS, in a simple example.
Comment: Used `compile` and `post` to modify a DOM before that it is modify on `template` part from a vendor directive.
Answer: Two Phases: Compile and Link
Compile:
Traverse the DOM tree looking for directives (elements / attributes / classes / comments). Each compilation of a directive may modify its template, or modify its contents which has not been compiled yet. Once a directive is matched, it returns a linking function, which is used in a later phase to link elements together. At the end of the compile phase, we have a list of compiled directives and their corresponding linking functions.
Link:
When an element is linked, the DOM tree is broken at its branch point in the DOM tree, and the contents are replaced by the compiled (and linked) instance of the template.  The original displaced content is either discarded, or in the case of transclusion, re-linked back into the template.  With transclusion, the two pieces are linked back together (kind of like a chain, with the template piece being in the middle). When the link function is called, the template has already been bound to a scope, and added as a child of the element.  The link function is your opportunity to manipulate the DOM further and setup change listeners.
Answer: This question is old by I would like to make short summary which may help:

Compile called once for all directive instance
Compile main purpose is to return/create the link (and possibly pre/post) function/object. You can also init stuff that are shared between instances of the directive.
In my opinion, "link" is a confusing name for this feature. I would prefer "pre-render".
link is called for each directive instance and its purpose is to prepare the rendering of the directive in the DOM.
Comment: one plus for the suggestion name: "pre-render"


What information about errors can MSSQL profiler report on?

Question: I have a feeling a SQL client application is timing out, but because of how the application is coded, there's no way of telling. So I was hoping that running MSSQL profiler on the server would highlight something... Or am I heading toward a dead end?
Answer: When a client 'times out' what happens is that the client actively initiates a query abort when it gives up. Left on its own, SQL Server would run the query until completion. So you would see an RPC:Completed or an SQL:BatchCompleted event with Error 2=Abort. Obviously, to see these events you must add these events to your Profiler trace, see How to: Specify Events and Data Columns for a Trace File (SQL Server Profiler).
Answer: Here is a list of all the columns you can collect with SQL Profiler in server 2000. The big ones you would probably want to watch are CPU, Duration, Error, Reads, Writes and Success.
Here is a list with data for SQL 2005. To get the "Error" column, you need to go to the "Events Selection" tab when you are setting up your trace, choose "Show All Columns" and then put a checkmark in the Errors column where it exists. There is also a whole "Errors and Warnings" event category that can be used to track such things. See the linked documentation for much more detail about that.
Comment: Hmm, for some reason the Error column is not available to select. I am using SQL Server 2005 if this is relevant.
Comment: @nbolton: I've updated my answer with some SQL 2005 specific information.


What is the opening Du'aa of salat?

Question: What should I say immediately after starting any salat? i.e, after Takbeer (saying Allahu Akbar الله أكبر) and before beginning recitation of surah Fatiha.
Comment: What do you mean by "Betr"? also pleas ask each question in a separate post (question).
Comment: I see now, still you should split this into two questions, i.e, ask the "Betr" part in another question.
Comment: I mean, the Salat in which we have to perform 3 rakats and bind hands again on the third rakat.(After Eshar prayer)
Comment: Also it's called "Witr" salat and not "Betr", and I don't think there any separation between the first two rakat and the third rak'a, I advice you to ask about "How is salat al-Witr" performed?"
Answer: Right after starting salat, i.e, after Niah (intention) and Takbeer (saying Allahu Akbar الله أكبر), you can say The Opening Du'aa, which is Sunnah, i.e, it's not obligatory, but is recommended to say. I.e, if you don't say it then your salat is still correct and there's nothing wrong.
However, scholars differ in what the Opening Du'aa is:

Shafei Mathhab scholars say that the Opening Du'aa is the following:

وَجَّهْتُ وَجْهِيَ لِلَّذِي فَطَرَ السَّمَوَاتِ وَالأَرْضَ حَنِيفًا
  وَمَا أَنَا مِنَ الْمُشْرِكِينَ، إِنَّ صَلاَتِي وَنُسُكِي وَمَحْيَاىَ
  وَمَمَاتِي لِلَّهِ رَبِّ الْعَالَمِينَ، لاَ شَرِيكَ لَهُ، وَبِذَلِكَ
  أُمِرْتُ، وَأَنَا مِنَ الْمُسْلِمِينَ، اللَّهُمَّ أَنْتَ الْمَلِكُ،
  لاَ إِلَهَ إِلاَّ أَنْتَ، أَنْتَ رَبِّي، وَأَنَا عَبْدُكَ، ظَلَمْتُ
  نَفْسِي، وَاعْتَرَفْتُ بِذَنْبِي، فَاغْفِرْ لِي ذُنُوبِي جَمِيعًا،
  إِنَّهُ لاَ يَغْفِرُ الذُّنُوبَ إِلاَّ أَنْتَ، وَاهْدِنِي لأَحْسَنِ
  الأَخْلاَقِ، لاَ يَهْدِي لأَحْسَنِهَا إِلاَّ أَنْتَ، وَاصْرِفْ عَنِّي
  سَيِّئَهَا، لاَ يَصْرِفُ عَنِّي سَيِّئَهَا إِلاَّ أَنْتَ، لَبَّيْكَ
  وَسَعْدَيْكَ، وَالْخَيْرُ كُلُّهُ فِي يَدَيْكَ، وَالشَّرُّ لَيْسَ
  إِلَيْكَ، أَنَا بِكَ وَإِلَيْكَ، تَبَارَكْتَ وَتَعَالَيْتَ،
  أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ.
I turn my face in complete devotion to One Who is the Originator of
  the heaven and the earth and I am not of the polytheists. Verily my
  prayer, my sacrifice, my living and my dying are for Allah, the Lord
  of the worlds; There is no partner with Him and this is what I have
  been commanded (to profess and believe) and I am of the believers. O
  Allah, Thou art the King, there is no god but Thee, Thou art my Lord,
  and I am Thy bondman. I wronged myself and make a confession of my
  Sin. Forgive all my sins, for no one forgives the sins but Thee, and
  guide me in the best of conduct for none but Thee guideth anyone (in)
  good conduct. Remove sins from me, for none else but Thou can remove
  sins from me. Here I am at Thy service, and Grace is to Thee and the
  whole of good is in Thine hand, and one cannot get nearneststo Thee
  through evil. My (power as well as existence) is due to Thee (Thine
  grace) and I turn to Thee (for supplication). Thou art blessed and
  Thou art exalted. I seek forgiveness from Thee and turn to Thee in
  repentance.
[Sahih Muslim], [Sunan an-Nasa'i], and also [Sunan Abu Dawud]

Hanafi Mathhab scholars say that the Opening Du'aa is the following:

سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ وَتَبَارَكَ اسْمُكَ وَتَعَالَى
  جَدُّكَ وَلاَ إِلَهَ غَيْرُكَ
Subhanakallahumma, wa bihamdika tabarakasmuka wa ta'ala jadduka wa la
  ilaha ghairuk (Glory and praise be to You, O Allah. Blessed be Your
  name and exalted be Your majesty, there is none worthy of worship
  except You.
[Sunan an-Nasa'i], also in [Jami`
  at-Tirmidhi] and others.

And in nafilat salat you should add after "and exalted be Your majesty" (وَتَعَالَى جَدُّكَ) the following:

وجل ثناؤك
And honored be your tribute and thankfulness (weak translation)

But this has no reference in famous Hadiths.

The Du'aa should be said right after Takbeer and before even Isti'athan (الاستعاذة), if you begun saying Isti'athan and forgot to say it, then you shouldn't say it anymore because it's right place is passed, yet (as mentioned above) that doesn't affect your salat correctness at all.
Reference: Islamic Fiqh (Book), part 1: Prayer rules, version 8, Pages 230-231. By Dr.Ibraheem Muhammad Salqini.
Answer: The Prophet (peace and blessings be upon him) opened the prayer with many duas (at different occasions) Praising Allah, and thanking Him and admiring Him and so on.  This is very important that the Prophet (peace and blessings be upon him) said in regards to the one who prays badly/improperly:

لا تتم صلاة لأحد من الناس حتى يكبر ويحمد الله جل وعز ويثني عليه ويقرأ
بما تيسر من القرآن
The prayer of anyone is not perfect unless he performs ablution
perfectly; he should then utter the takbir, and praise Allah, the
Exalted, and admire Him; he should then recite the Qur'an as much as
he desires.
Abi Dawood

One May open his/her pray with:

سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ وَتَبَارَكَ اسْمُكَ وَتَعَالَى
جَدُّكَ وَلاَ إِلَهَ غَيْرُكَ
Glory and praise be to You, O Allah. Blessed be Your name and exalted
be Your majesty, there is none worthy of worship except You
Sunan Annasa'i

or

اللَّهُ أَكْبَرُ كَبِيرًا وَالْحَمْدُ لِلَّهِ كَثِيرًا وَسُبْحَانَ
اللَّهِ بُكْرَةً وَأَصِيلاً
Allah is truly Great, praise be to Allah in abundance, Glory be to
Allah in the morning and the evening
Muslim

or

الْحَمْدُ لِلَّهِ حَمْدًا كَثِيرًا طَيِّبًا مُبَارَكًا فِيهِ
Praise be to Allah, much praised and blessed
Muslim

And there are others.  If you wish to read further into this I suggest you read
Sifatu Salatannabi (صفة صلاة النبي) by Sheikh Nasiruddeen Al Albany Page 91 and onward.
Answer: There are hadiths about what to read after the start of salat. I listed the ones I know below. What we see from the hadiths in this topic, we deduce that there is no fixed dua to read (and of course, a dua cannot be fixed by definition, it must be natural, and should be stating our needs). It is prelude to salat, can be about asking forgiveness, staying clean of sins, praising Allah, giving thanks to Allah.

Rasulullah was being silent for a while between takbir-ul iftidah and Fatiha. I asked:
  "Ya Rasulullah, can you tell me what you are doing in that silent time?"
  He said he was saying:
  "O Allah, make me away from my sins, like you made East and West away from each other. O Allah, make me clean from my sins, like a clean cloth was cleaned from stains. O Allah, wash and clean me from my sins with snow, water, cold water."

Narrator  : Abu Hureyre
Listed in : Buhari 774
            Muslim 598
            Ebu Davud 781
            Nesei 2/129

Rasulullah was saying after takbir-ul iftidah at the beginning of salat:
  "O Allah, I verily absolve You from all evil. Your name is sacred, blessed. You are great above all. And there is no ilah/god besides You."

Narrator  : Aisha bint Abu Bakr
Listed in : Ebu Davud 776
            Tirmizi 243
            Nesei 2/132
            Ibnu Mace 804
            Ahmed 3/50
            Pare Kutni 1/112
            Hakim 1/235

A person who was catching his breath (because of fast pace walking) came and joined to the salat with us. Then said:
  "The praise is to Allah profusely, cleanly, and blessingly."
  When the salat ended, rasulullah asked:
  "Who was the one who say that words among you?"
  People stay silent. Rasulullah asked again:
  "Who did say those words? Those aren't bad words."
  Then someone from the people said:
  "I was catching my breath. I said those words because of joining the salat in time."
  Rasulullah:
  "I swear to Allah, I saw twelve angels, they were racing to rise those words to Allah.*"

Narrator  : Anas ibn Malik
Listed in : Muslim 600
            Abu Davud 763

Answer: There are so many duas, Mate. I'm Shafi'i from Indonesia and I read this:
الله اكبر كبيرا والحمدلله كثيرا و سبحانالله بكرة و أصيلا
Answer: Subhanaka Allahhumma wa tabarika ismuka wa ta ala jaduka wa lah elahee gharukka
Comment: Salam and welcome to Islam SE. We expect answers here to be well elaborated, focused on answering the initial question and claims to be supported by evidences (see [answer]). Please consider taking some time to learn more about our site and model by taking our [tour] and visiting our [help].

What is the opening Du'aa of salat?


What is the difference between an arhat, bodhisattva and a buddha?

Question: What is the difference between an arhat, a bodhisattva and a buddha? References to the scriptures would be most helpful.
I'm open to both Theravada and Mahayana perspectives.
Answer: According to the Prasangika-Madhyamika Mahayana school of Tenets,
A Hinayana arhat abandoned afflictive obscurations by way of realizing emptiness, but has not abandoned knowledge obscuration. He as achieved abiding nirvana. Therefore, although they are free from the conception of true existence, and from true suffering, they are not free from the imprints of ignorance (i.e. knowledge obscurations). We say that it is like removing garlic from a container: the smell will still be there. So, because they still have the imprints of ignorance, (1) they are not free from the appearance of true existence, and (2) they are reborn with a mental body, due to the imprints of ignorance (in our case, we are reborn to due karma and afflictions).
In his commentary to Maitreya's Sublime Continuum: The Essence of a One Gone Thus, Gyaltsab Je says:

For the Hearer and Solitary Realizer arhat, because they do not meditate on the perfection of wisdom.
  It means that although Sravaka and Pratyekabuddha arhats cultivated the wisdom realizing emptiness, their wisdom is not conjoined with bodhicitta. Therefore, it is not a perfection of wisdom.

Commenting Gyaltsab Je, Geshe Jamphel Gyaltsen said:

Bodhisattvas, hearers (shravakas) and solitary realizers (pratyeka buddhas) arhats do have realizations of reality, but they do not realize it in the same way as a buddha.

And:

The Hinayana arhats and bodhisattvas on the three pure grounds, are reborn due to uncontaminated karma that propels them to take birth and their body is a called a mental body.

A bodhisattva is a person who generated effortless bodhicitta (the wish to achieve enlightenment for the sake of all sentient beings). Since effortless bodhicitta is the entry gate to the Mahayana path, he entered the Mahayana small path of accumulation. When he cultivates wisdom, it is conjoined with emptiness and that makes his mind vast (due to bodhicitta) and profound (due to realizing emptiness). He wishes not to abide in individual liberation (abiding nirvana) but to be free from the extreme of peace (abiding nirvana) as well as from samsara. Therefore, he wishes to achieve non-abiding nirvana, which is the attainment of a buddha.
We say that in terms of wisdom, a Hinayana arhat is more powerful than a bodhisattva before the 8th bhumi, because he abandoned afflictive obscurations while the bodhisattva abandons them from the 8th ground.
Geshe Jamphel Gyaltsen said:

Having generated spontaneous bodhicitta the bodhisattva has entered the Mahayana path [the path of accumulation] and the cause is great compassion, the concern for all sentient beings. He blocks the two extremes in two ways.

The Lam Rim, Shantideva's Bodhisattvacharyāvatāra, Asanga's Bodhisattvabhumi,  and Maitreya's Ornament for Clear Realization  explain well what bodhicitta is, how it is the entry gate to the Mahayana, etc.

A Buddha abandoned both afflictive and knowledge obscuration, having generated the path perfection of wisdom (the wisdom of emptiness conjoined with bodhicitta). In his continuum, wisdom and bodhicitta are the same mind: the omniscient mind of a buddha that realizes all objects of knowledge directly, past present and future, in an unmistaken way, etc. He achieved non-abiding nirvana, abiding neither in samsara nor in individual liberation. His enlightened activities are uninterrupted.
Maitreya's Sublime Continuum explains the two bodies of a buddha that can also be divided into three, four, or five.
Comment: this is great, but consider using a different term instead of Hinayana as I know some take this as a perjorative. I know you did not intend it that way at all, but it might be good to use a different term to prevent any misundertanding @TenzinDorje
Answer:
Arhat - a person who has achieved Nirvana. The Buddha is a Arhat too, there are disciples who learn the Dhamma as Buddha has taught, who become Arhats too.
Buddha - on who achieves Nirvana without a teacher.
Bodhisatta - One who aspires to be a Buddha
Comment: I thought about your answer and I believe you are coming from the Theravada tradition, which I'm unfamiliar. So, bodhisattva is merely a word to describe someone on the path to buddhahood? How does this reconcile with the Mahayana conception of Bodhisattva as someone who has already achieved enlightenment and aspires the enlightenment of other sentient beings? How do the Scriptures use the word 'bodhisattva'?
Comment: Bodhisattva is someone in the path to Buddhahood. Aspires enlightenment for oneself and other beings also.
Comment: Does the Arhat aspire enlightenment for others too?
Comment: Yes. Some but they have to learn the teaching from a Buddha.
Answer:
What is the difference between an arhat, bodhisattva and a buddha?

It's not easy to give an explicit answer, the rather thorough one is here. An Arhat must be a Bhikkhu living a monastic life but a Bodhisattva is not necessary. The goal for the Arhat path aspires to conquer the afflictions of mind thus sever the cord of Samsara and dwell in Nirvana, the Bodhisattva path is in dealing with the afflictions acquired the wisdom (Bodhi) thus returned again and again to Samsara cultivating merits and wisdom by ferrying others from the sea of suffering, the Samsara.
The Bodhisattva path has detailed grades of advancement, main categorization is from the 1st grade to the 10th:

...佛告觀自
  在菩薩曰。善男子。成就大義得未曾得出世間心生大歡喜。是故最初名極喜地。遠離
  一切微細犯戒。是故第二名離垢地。由彼所得三摩地及聞持陀羅尼。能為無量智光依
  止。是故第三名發光地。由彼所得菩提分法。燒諸煩惱智如火焰。是故第四名焰慧地
  。由即於彼菩提分法方便修習。最極艱難方得自在。是故第五名極難勝地。現前觀察
  諸行流轉。又於無相多修作意方現在前。是故第六名現前地。能遠證入無缺無間無相
  作意。與清淨地共相隣接。是故第七名遠行地。由於無相得無功用。於諸相中不為現
  行煩惱所動是故第八名不動地。於一切種說法自在。獲得無罪廣大智慧。是故第九名
  善慧地。麁重之身廣如虛空。法身圓滿譬如大雲皆能遍覆。是故第十名法雲地。... 《解深密經》

The article in earlier link said the 7th grade is equivalent to an Arhat in terms of Liberation (解脫), from 8th grade onward a Bodhisattva has acquired wisdom and ability beyond an Arhat does. The article is said to be written by ven. 聖嚴法師 it should be a trusted source.
In addition the 8th grade Bodhisattva is able to cite his own version of Dharani (Mantra) (which I believe is the Ultimate Knowledge of sound), and will never ever stumble from The Path until attained Buddha-hood for he has seen the Ultimate Reality.
A Buddha is the 11th grade - so to speak:

...永斷
  最極微細煩惱及所知障無著無礙。於一切種所知境界現正等覺。故第十一說名佛地... 《解深密經》

Now the "body" for an Arhat, a Pratyeka-buddha and Tathagata the Buddha are also different:

...佛告曼殊室利菩薩曰。善男子。若於諸地波羅蜜多。善修出離轉依成滿。是名如
  來法身之相。當知此相二因緣故。不可思議無戲論故。無所為故。而諸眾生計著戲論
  有所為故。世尊。聲聞獨覺所得轉依。名法身不。善男子。不名法身。世尊。當名何身。善
  男子。名解脫身。由解脫身故說一切聲聞獨覺。與諸如來平等平等。由法身故說有差
  別。如來法身有差別故。無量功德最勝差別。算數譬喻所不能及... 《解深密經》

Namely, Tathagata the Buddha has the Dharma-body (法身), but Arhat and Pratyeka-buddha has Liberation-body (解脫身), not Dharma-body. I think it's like comparing a cloth with stain removed (Liberation-body) to a cloth that's spotless (法身).
And there are detail explanations about how the "body" of the Tathagata-buddha is different from and capable of doing, in 《解深密經》.
Comment: Thanks for the link. I'm more familiar with Chinese Mahayana Buddhism, so your answer would resonate with me more. However, I feel there is a lack of scriptural references. I would like to see, for example, the consistency between 解深密經 and the Sutta/Abhidhamma Pitaka. I upvoted your answer, though.
Comment: By "Sutta/Abhidhamma Pitaka" do you mean the Pali Canon? Unfortunately I don't read Pali and the English translated work available online is not in my priority of study at this moment. I won't be able to provide further info in this context for the time being.
Comment: Your answer here: https://buddhism.stackexchange.com/questions/20489/sounds-during-meditation/20529#20529 is a good answer. Why did you delete it? Thanks
Comment: "contemplating the body in the body..." can be translated & thought about in different ways. You should start a question/thread about it. Thank you for your posts here. I will read them in detail at a later time. Regards
Comment: @Dhammadhatu Appreciate the inquiry. Good answer chooses right audience... (abridged).


Getting users email from facebook api or using socialauth-net

Question: I am using socialauth-net Here to allow users to log into my site. I get all the data back except the most important thing...Email. I have the user token and username, is there a way I can grab the email address as well? I set the User and Friends Permissions to allow email on facebook. Thanks for any help.
Answer: Old question, just thought I'd answer it anyway.
I don't think your settings matter. It's whether or not your contacts allow their address to be visible and exported.
Could that be the case? Spreading email addresses these days is a very sensitive topic, and most providers avoid exposing them to third party applications.


Is H2CO3 (carbonic acid) soluble or insoluble in water?

Question: I am asking this because I know that acids are normally aqueous but according to the solubility rules, all carbonates are insoluble.
Comment: Also, **all** carbonates are not insoluble - the alkali metal carbonates, like [sodium carbonate](sodium carbonate) are soluble.
Comment: Have you looked at general references, such as the [Wikipedia page for carbonic acid](http://en.wikipedia.org/wiki/Carbonic_acid), before asking here?
Comment: Please note that Arrhenius' definition of acidity is not the only one.
Answer: Yes, it is soluble.
For example, the oceans are constantly getting $\ce{CO2}$ from the atmosphere that gets converted into carbonic acid and thus decreasing pH on a global scale. Or the soft drinks we drink contain carbonic acid in them in dissolved form only due to mixing of $\ce{CO2}$ gas.
Also, not all carbonates are insoluble as Ben Norris has commented.
Hard and fast 'rules' in chemistry tend to be rare.  Consider them guidelines.
Comment: The oceans are only "constantly getting CO2" when we've filled the atmosphere with gaseous CO2 to disrupt the equilibrium. Prior to the last century, the oceans were mostly in a nice dynamic equilibrium with atmospheric CO2 (save a few nasty turns here and there)
Answer: Yes, it is soluble.
The fizzy part of your soda does not form a layer at the bottom of the bottle. (Personally, I find the empirical solutions best for chemistry)
The carbonate rule only applies to alkali metal carbonates.
Also, as a general rule, anything with the word "acid" is probably soluble in water.  Seeing as acids are sometimes defined as yielding $\ce{H+}$ ions when dissolved.


Posting someone else's comment as an answer to a long-open question

Question: There are several questions that are officially "unanswered," but which were effectively answered in the comments. For example, this one was answered by Russell Impagliazzo in the comments. It's been a long time (~5 years), and no better answer is forthcoming. It's a little annoying that this question still appears as "Unanswered." Yet I don't feel comfortable just posting Russell's answer, because then any upvotes it received would go to me instead of Russell. I could of course post a CW answer to avoid getting upvotes myself, but then it precludes Russell from ever posting an answer and getting upvotes. Is there an established norm here?
Answer: You can ping the author in the comments, if the person doesn't post an answer in some reasonable amount of time I think it is fine to post a CW answer, making question/answer useful outweighs votes and reputation.
Comment: I agree with this. But I would add: it is better for the original asker (rather than someone else) to post an answer from the comments, unless they don't understand how to flesh it out into a full answer. However, it is reasonable for someone else to bring up this suggestion like "I think this question has been answered in the comments: are @-tag-of-answerer (or OP after some time) interested in converting this comment into an answer?"


Can a mark be maintained when the target succeeds on a Stealth check and becomes Hidden?

Question: In a similar vein to my previous question , can a mark from a Fighter, Battlemind, etc. be maintained when the target succeeds on a Stealth check vs. a Defender's passive Perception and becomes Hidden with respect to that Defender?
Answer: Stealth isn't a defined condition in 4e. Using the stealth action, on a success, makes the character Invisible and Hidden.  For details on the difference, see this question.
These conditions inherently have no special effect on Marking. If you were marked when you become invisible or hidden or both, you are still marked and it ends however it normally would.
In the case of a Fighter who needs to attack to maintain his mark, Invisibility wouldn't do much because he can still attack the target (at a -5 penalty, but a Fighter doesn't need to hit). Hidden, on the other hand, means the fighter does not know where the target is, so attacking to maintain the mark is much more difficult.
The Rules Compendium (p. 221) gives some suggestions for what to do when you cannot see a creature and want to attack it. One of those is to pick a square you think the creature is in, and target your attack there. If you guess correctly the mark could be maintained.
Comment: Remember that, unless the hidden creature does a double move (one move to become hidden and another move while hidden), everyone does indeed know where the hidden character is. A DM could consider the Intelligence of a monster but everyone else will know that the character is located exactly where they were last seen. Check the [Rules of Hidden Club](http://community.wizards.com/content/forum-topic/2739081).
Answer: Marks aren't maintained and only end in the following circumstances:

The creator of the mark dies or falls unconscious
The marked creature is subject to another effect which marks it.  Only one mark at a time, the last one wins.  Some marks cannot be overwritten, example: Focus Bind.
A power or effect specifically says that it ends the mark, an example would be Marked Escape.

Absent the above situations the marked condition last for as long as the power or effect says that it does.
Making a stealth check and going hidden will not prematurely end a mark.  If a mark is scheduled to end and the creator of the mark would like to mark the character again then it must fulfill the conditions of whichever power it wishes to use to mark the target.
This just drops down to the basic question of "Can I target a hidden creature?" and the answer  (in general) is yes.  From the Rules Compendium, pg 105:

The target must meet the power's target definition.
The target must be within range or area of effect of the power.
The target must be within line of effect of the power's origin square.

If you don't have line of effect, it doesn't matter if the target is hidden or not, the target is immune to nearly all powers.  If you can't see the target, then some powers that mark cannot be used.  Those are pretty rare.  The only at-will powers that can be foiled by invisibility (and hence hidden) are augmented Battlemind powers.
Comment: on targeting a hidden creature. This is the only time you don't know the location of that creature, and thus do have to target a specific square, thus you have the possibility of not targeting the creature (thus a fighter would not be able to apply his mark).


Can a sub attack a lone sub in axis and allies and the attacked sub submerge?

Question: If an English sub attacks a German sub (by itself in a sea zone), can the German sub submerge? From my understanding subs can only conduct a surprise strike or submerge if there are other sea units (besides subs) in the sea zone with it, and only if the attacking and defending players both have submarines.
Answer: Yes. Submarines that are not under threat from an enemy destroyer can use their special ability to choose to make a surprise strike (either on attack or defense) or choose to submerge. This occurs before any dice are rolled by either side.
From Axis 1942 Second Ed. Rules, P14, General Combat, Step 2:

Before the general sea battle takes place (steps 3–5), both
  attacking and defending submarines can choose to either make a Surprise Strike die roll or submerge.

If an English sub attacks a German sub, as there are no destoryers present on either side, both will have the option to make a surprise strike or submerge.
I am not sure where you get your understanding that a) other sea units (besides subs) need to be present, and b) only if attacker and defender both have submarines, these are both incorrect.
Two things to note about submarines:
As there are no other enemy (surface) warships present, any 'surprise' strike would effectively not be 'surprising'.. both submarines would get a suprise strike at the same time. The attacker rolls a surprise strike, and then the defender rolls the surprise strike on defense. Any hits are then removed.
The whole process starts over again once casualties are removed, so the choice to submerge or surprise strike (remaining in combat) is made before the attacker rolls attack dice.
Typically, the defending sub would choose to submerge, as it defends on a 1.
Comment: Welcome to Board Games Stack Exchange! Your answer is pretty good, and I suspect correct, but it would be even better if you added a quote from the rulebook to back up your answer.
Answer: It is actually a different mechanic. If a submarine survives the first round of combat there is a specifc step in the combat sequence that allows for submarines to withdraw. Incidently, both combatants have this option. This is more often seen in actions involving fleets using subs as support units, but can be interesting in the case of a lone sub picking off a transport and then using that step in the sequence to position a sub either out of range of enemy response, or to project force in a different direction to influence enemy fleet movements. Always remember, an unused weapon is a useless weapon.
Comment: Mahan (https://en.wikipedia.org/wiki/Alfred_Thayer_Mahan#Impact_on_naval_thought) would strongly disagree with that last sentence -


Find an ideal $I$ of $\mathbb{Z}[i]$ such that $\mathbb{Z}[i]/{I}$ is a field

Question:
Find an ideal $I$ of $\mathbb{Z}[i]$ such that $\mathbb{Z}[i]/{I}$ is a field.

How can one justify the answer in the shortest number of lines?
Comment: You need to when you can write a prime as a sum of squares.
Comment: What is R in the question?
Answer: If $R$ is a ring and $I$ is a maximal ideal of $R$, then $R / I$ is a field.
$\mathbb{Z}[i]$ is a Euclidean domain, so prime ideals are maximal. Since $\mathbb{Z}[i]$ is a Euclidean domain, it is a PID. Thus it suffices to find the prime elements of $\mathbb{Z}[i]$.
A well-known result is that:
The prime elements of $\mathbb{Z} [i]$ are, up to associates:
(1) 1 + i
(2) p where $p \in \mathbb{Z}$ is prime and $p \equiv 3 \text{ mod } 4$.
(3) $a + bi$ where $a^2 + b^2 = p$ and $p \in \mathbb{Z}$ is prime and $p \equiv 1\text{ mod } 4$.
If $\pi$ is any prime (i.e. an element associate to element of type above), then $\mathbb{Z}[i] / (\pi)$ is a field.
Answer: Write the Gaussian integers as $\Bbb{Z}[x]/(x^2 +1)$. Then notice that for a prime $p$ such that $x^2 +1$ is irreducible mod $p$, you have that $(x^2 + 1,p)$ is a maximal ideal in $\Bbb{Z}[x]$. You will then have
$$\Bbb{Z}[i]/(p) \cong \Bbb{Z}[x]/(x^2 + 1,p) \cong \Bbb{Z}/p\Bbb{Z}[x]/(\overline{x}^2 +1).$$
Now in the right most guy you have $\Bbb{Z}/p\Bbb{Z}[x]$ that is a polynomial ring over a field and by choice $\overline{x}^2 +1$ is irreducible mod $p$ and so this is a field. It follows that $\Bbb{Z}[i]/(p)$ is a field.
Now of course one could ask for the existence of such a prime $p$. It may be the case that $x^2 + 1$ is reducible for every prime $p$ (such polynomials do exist) but we can choose $p=3$ in this case and it would work.
Comment: @DonAntonio No need to invoke any algebraic number theory :D
Answer: $I$ must clearly be a prime ideal, since $R/I$ must be a field. Every prime ideal of $\mathbb Z[i]$ is maximal since its a PID. So $I$ can be taken to be any nonzero prime ideal.
Answer: Let $I=(3)$ then $Z[i]/I=Z_3[i]$ is a field (since $x^2+1$ is irreducible over $Z_3$) having 9 elements.
Answer: Hint $\ \Bbb Z[i]/(i\!-\!1)\cong \Bbb Z/2\:$ is the unique extension of parity from $\,\Bbb Z,\:$ given by defining $\,i\,$ to be odd.
Remark $\ $ Any ring having $\,\Bbb Z/2\,$ as an image has parity structure induced by such. Generally it not be unique, e.g. see this answer for further discussion of rings with parity.


Why would my pressure reducing valve fail after repairing my water main?

Question: I had a main water line bust on my side of the water meter. After fixing it and turning water back on to my house my water heater T&P valve kept releasing spurts of water which found out it was caused by increased water pressure. My PRV was installed two years ago and when i had my plumber come to check out my problem he tested the pressure and found that i had 160 pounds running through my plumbing system after PRV. I have seen problems caused by PRV's going bad and usually it causes a decrease in pressure. What would cause one to fail and cause more pressure? Is this common and what would cause this to happen in PRV that is only two years old?
Answer: The most likely cause is that dirt or debris from the water line repair have gotten jammed in the PRV so that it cannot close. You can remove it and see if there's anything visible that can be cleaned, but at that point, you may as well replace it with a new one that you'll know is good.
Answer: There is usually a cash valve (pressure reducing valve) somewhere on your supply line. These can fail in a way that they no longer regulate the pressure properly and allow it to become too high. I think the correct answer to your issue sounds like you have a bad cash valve. That would explain the water pressure being too high. Also, it sounds like the PRV is not failed but rather doing it's job of relieving excessive pressure. Common household pressure is 40-45psi, maybe even 50, but not to exceed 60psi.
Comment: Hello, and welcome to Stack Exhange. I believe "Cash" is a manufacturer of pressure reducing valves, rather than a generic type of valve.


Unauthorized Facebook Business Page

Question: I need to take down a Facebook business page that was made by someone not associated with this business. I'm the marketing director for the company and need to make a new page for my client. I don't have a password for the existing page.
Answer: Report the page https://www.facebook.com/help/355811251195044
Contact Facebook's customer support. They will be able to assist with authenticating the page, or in your particular case take down the page which is acting as the business you represent.

Unauthorized Facebook Business Page


How to run multiple Heartbeat/Corosync/Pacemaker clusters in the same network? (Quorum)

Question: We intend to run several components to run a web site. Like a load balancer, a cache and a couple of web serserves. To avoid single-points-of-failure we intended to use Heartbeat/Corosync/Pacemaker and instead of one load balancer just run two of them. Now we have different choices how we set them up and I would like to hear your opinion which one works better:

Run pairs of servers in different clusters. E.g. "loadbalancer1" and "loadbalancer2". That way we wouldn't have two few servers to reach quorum if one of the servers failed. We could switch off the quorum feature though but would risk a split-brain situation. This doesn't sound perfect but the configuration is clear and simple and it would probably just work.
Run triples of servers in different clusters. Like "loadbalancer1" and "loadbalancer2" and "loadbalancer-quorum". That way we have an extra server that is otherwise doing nothing but at least we can reach quorum in case of a failure.
Run all servers in a single cluster. That way the cluster would consist of "loadbalancer1", "loadbalancer2", "cache1" and "cache2". Then we could use contraints to make sure that the load balancing software only runs on "loadbalancer1" or "loadbalancer2" and that the cache software only runs on "cache1" or "cache2". I could imagine that this gets confusing. But we we would have enough servers to always reach a quorum.

Do you have experience with such a setup? What should we do?
Answer: Its mostly a personal preference, but I would suggest 3 as:

You avoid the issues regarding quorum in two-node clusters
You don't have a third node sitting there doing nothing
Pacemaker lets you do it pretty easily :-)


Refreeze ground hamburger as hamburgers after thawing?

Question: Can I thaw ground hamburger, make hamburger patties, and then refreeze them? I am thawing then on the counter in their original packaging. It is from a half cow that I bought.
Comment: As a note, you should avoid defrosting meat on the counter. It will take longer but it is much safer to do it in the fridge or under cold running water.
Comment: For the food safety aspect: http://cooking.stackexchange.com/questions/1363/how-dangerous-is-it-to-refreeze-meat-that-has-been-thawed?rq=1
Answer: Never re-freeze raw meat. I have run 2 commercial food establishments and had to be qualified in food safety so this is what I know...
The freezing process arrests any of the bacteria in the meat from causing putrefaction but as soon as the meat defrosts these bacteria start their work again at an accelerated rate, re-freezing will cause a repeat action and food poisoning will ensue. And ground or minced meat usually has a higher bacteria level due to the extra handling, increased actual surface area due to many smaller bits and the fact that those tiny pieces warm quicker.
If you want to freeze individual hamburgers, make them up as soon as you get the mince and freeze what you don't want to use straight away.
I hope this helps


how to change virtualbox keyboard shortcut

Question: In virtualbox Ctrl-R is the shortcut to reset the virtual machine. But I use it for testing web-sites on IE, and I seem to be hard-wired to use Ctrl-R to refresh web-pages in a browser. I keep accidentally resetting virtualbox and having to wait while it books again!! So is there some way to change the keyboard shortcuts in virtualbox?
Answer: Change the 'host key':
file -> preferences -> input
Change the Host Key to something other than ctrl.
~~edit~~
NOTE: the host key can be something like 'Right Ctrl'.  The left control key acts normally, and the right key is used as the host key.
Comment: As a note, that's the file menu of the main UI, and you can "hot change" it while the guest is running (at least in windows).


Mask of madness for Juggernaut

Question: I've recently watched sevaral pub games and notices that juggernaut almost always got mask of madness one of the first. I wonder why is that? Was there any kind of patch for him and this item is now so vital? I know that using mask during ultimate lets you make a several more usual attacks but isn't it better to get desolator which will improve damage output both from ult and regular attacks?
Answer: In the 6.81 and 6.81b patches, Juggernaut's base attack time was reduced multiple times from 1.6 to 1.4. This lowered BAT makes any attack speed-enhancing effect more effective. The berserk attack speed, combined with the buffs to Juggernaut's critical strike passive (in patch 6.83) make him a very powerful right-clicker even early in the game (MoM is only two 900-gold pieces, easy to farm). Further, the berserk effect's movespeed makes it easier to farm the jungle, escape, or chase without being kited (a problem for all melee heroes).
As a note:
6.80 level 7 Juggernaut with Mask of Madness active - 0.67 seconds per attack
6.83 level 7 Juggernaut with Mask of Madness active - 0.58 seconds per attack
And it scales better with more Agility and attack speed gear from there.
Comment: Also it might be noted that MoM is much cheaper than other attack time items like Mjollnir. However, people who get this item should be careful when using its active since it makes you take a lot more damage than usual.
Comment: When was this patch introduced?
Comment: 6.81 - April 19 2014, BAT from 1.6 to 1.5. 6.81b - June 2 2014, BAT from 1.5 to 1.4.  There have also been patches tweaking Juggernaut's Agility and Agility gain in the last several months.
Answer: because it synchronizes very well with juggernauts whole skillset.
his ability to negate magic damage with his q and heal rapidly with his w both combat the increased damage from MoM active, as he is also one of the strongest early rightclickers the lifesteal is a very useful ability to guarantee early fights go in his favor, the movespeed is very very useful on him as with all rightclick heroes.
also, while in his ultimate, juggernaut will actually auto-attack the enemy he hits with omnislash, getting mask of madness allows you to increase the number of autoattacks you land while in your ultimate, effectively increasing your overall damage more than an aghanims sceptre.
he's the carry that basically benefits the best from PRM building (Phase boots, Ring of Aquilla, Mask of Madness)
Comment: Could you add the name of the skill instead of using its shortcut key? Not all players can remember the skill name based on its shortcut. Thank you.
Answer: It should also be noted that Mask of Madness' one drawback is that it provides a passive damage amplification to your own hero, making you take more damage. When Juggernaut is in his ultimate he gains the benefits of Mask of Madness, however he is invulnerable and so cannot take the extra damage.

Mask of madness for Juggernaut


Sojourner Badge explained?

Question: I'm pretty unsure how this thing works, is it that I need to hack the same portal for x days, or do I need to hack any portal for x days?
Answer: It seems it's any portal.
I'm at 10 days at the moment, and on weekends I'm not following my usual daily routine, meaning I'm only walking to a closer portal not en route to work. Still counting.
Answer: Niantic have confirmed this for us.

You may hack any Portal - it does not have to be the same Portal every time.
Answer: Max 36 hours, any portal, only successful hacks count
NOTE: These "rules" are not officially supported and may change at any time!
The only rule that is confirmed by Niantic is "max 24 hours per hack", although they have admitted there is a little bit of grace, but they never confirmed what that grace is.
I just did some testing on this, and the rules appears to be as follows:

You gain Sojourner medals for achieving a Hack Steak of 15, 30, 60, 180 and 360 days
Hacking on any portal counts
Only successful hacks count; failures due to full inventory does not count
Max 36 hours between hacks to maintain the Hack Streak

So this is the series of hacks I did, and the corresponding Hack Streak counter

Sunday, 20:12, 0 days
Monday
Tuesday, 08:10, 1 day
Wednesday, 20:08, 2 days
Thursday
Friday, 08:06, 4 days
Saturday, 20:04, 5 days
Sunday
Monday, 08:02, 7 days
Tuesday, 19:00, mistaken failed hack (inventory was full), 7 days (should have been 8)
Tuesday, 20:04, successful hack, 0 days

It might be worth noting that the Hack Streak counter said 8 days in the seconds just before the Tuesday 20:04 hack, and was then 0 directly after.
Notes on the Hack Streak counter

The Hack Streak counter is unreliable. It can say the Hack Streak is still on when it has in fact been reset
The time of day of the very first hack only tells when the hack streak counter will tick over after on a successful hack
The tick-over time is UTC, so if you started at 13:00 standard time, it will tick over on 14:00 in daylight saving time
The counter may tick over despite you not having hacked for that period, so you cannot use that as an indicator to recall if you have hacked successfully recently or not

Sojourner Badge explained?


How did Carl not die when he got shot in the eye in The Walking Dead?

Question: Most people would die from being shot in the eye. I know when Denise got shot with a arrow in the eye, she died, so why didn't Carl? Don't get me wrong I'm happy he lived but why did he?
Answer: Getting shot in the eye is not what did or did not kill either Carl or Denise. The eye is not a vital organ as evidenced by the many people who live without functioning eyes. The reason Carl survived is because only his eye was damaged and he received adequate medical attention and was able to heal. Denise however, was shot through the head with an arrow. Her eye was damaged, but what killed her was that she was shot through the brain.
If you are interested, here is an article about people who have been shot in the head and survived. Its not impossible.
Comment: +1 Even being shot in the brain is not necessarily a clear killshot; you have to actually do sufficient damage and/or hit vital areas. As long as you don't bleed out internally and/or lose the autonomous functions of your brain (heart, lungs), there are definitely various levels of survival that are possible.


How can I uninstall a device admin if the Deactivate button doesn't work?

Question: I am trying to uninstall CM Security. It's a device admin, so I go to Settings, Security, then Device Administrators, and try to uncheck the box next to CM Security, then a screen comes up listing the privileges the app has. The options are Cancel and Deactivate. When I click Deactivate, the button depresses, but it does nothing. I can click it as much as I want, and nothing happens. How can I deactivate a device admin when this problem occurs?
Comment: Are you rooted?  You could try forcibly removing it with Titanium Backup or similar.
Comment: Not rooted. I'm just wondering what might cause this.
Answer: Try booting your device into safe mode.
You can do this by holding the power button until the shutdown menu appears, and then hold the "Power off" option until your device asks to boot into safe mode. There will be a watermark on your screen when you boot into safe mode to show you it worked.
When you boot into safe mode, only system apps are allowed to run. You should be able to deactivate the device admin from there, because no app can prevent the process from running.
Warning: all non-Google sync accounts are reset when you boot into safe mode (no idea why). This means you might need to enter your dropbox/onedrive/other account credentials.
Comment: OK - I actually found an option to do this from within the security app. Apparently it is common for security apps to prevent the user from discontinuing admin access.
Comment: I guess that's kind of logical, you don't want your advanced device protection app to be deactivated with a single tick.
Answer: There may have been a change to the app in the last four years that allows this: On my Android phone, I went to Settings, Security, Phone Administrators. Button Savior was listed as a screen lock with a checked box on the right. I touched the check box and the listing disappeared. I was then able to go to Apps, Uninstall/Disable Apps and press the Button Savior app to uninstall it.


How do I kill Empathy and get it to show its main window?

Question: Empathy shows up in my window picker list and it appears to be started according to the indicator applet and the process manager but I can't see any of its windows! People were sending me messages and there was no empathy window to switch to!
Answer: Did you try clicking "Chat" in the messaging menu (the little envelope icon next to the clock)? It should show the contacts list from where you can open any hidden message windows and change the settings concerning hiding and showing of windows.
Comment: That's what I'm saying, I can't even see the contacts list window :S
Answer: To get empathy to properly exit by killing processes from the command line, you first need to kill telepathy and telepathy-butterfly processes, then kill the empathy process(es).
Answer: Run killall empathy, or open the System Monitor and kill it from there.
Comment: not good enough, I restarted empathy and it still didn't show any windows :S
Answer: Empathy shows that it is running in the indicator applet.
You can click the applet and select "Chat" to open empathy, or you can simply run the launcher (I tend to do this as I'm using Gnome Do). The shortcut to the indicator applet is meta-m (meta is the windows-key).
To close Empathy, either press ctrl-q while having the main window focused, or run killall empathy in a terminal.


Unit Testing Z Entity Framework Plus Extensions

Question: When using Z.EntityFramework.Plus extensions, I cannot find a way to mock/substitute what the context returns when any of the plus extensions, not just Future(), are being used. Everything I try throws a NullReferenceException within the z extensions future library.
Repository Example:
public Task<DocumentDomain> GetDocuments(int id)
{
  var futureQuery1 = _context.ReportTypes.Where(x => x.IsReadOnly).Future();
  var futureQuery2 = _context.Reports.Where(x => x.CreateDate < DateTime.Now.AddDays(-10)).Future();
  var futureQuery3 = _context.Person.DeferredFirstOrDefault(x => x.Id == id).FutureValue();

   return new DocumentDomain(futureQuery1.ToList(), futureQuery2.ToList(), futureQuery3.Value);
}

Unit Test Repository:
    [Fact]
    public async Task ShouldGetDocumentsForPerson1()
    {
       _context = Substitute.For<IMyDbContext>();
       _context.ReportTypes = new FakeDbSet();
       _context.ReportTypes.AddRange(GetFakeReportTypes());
       // ...etc..arrange for Reports and Person

       var repo = new DocumentRepository(_context);

       // CRASHES HERE ON futureQuery1 at .Future()
       var domain = await repo.GetDocuments(1); // fake id

       Assert.IsTrue(domain.Documents.Count > 0);
    }

Without using Futures it works fine. I've tried mocking out a few different ways but always get an error. Most of the time it's a "oops Z extensions encountered an error" exception.
I'm thinking it's because Z extensions is expecting a real ObjectContext but not sure how to overcome this. Has anyone experienced similar issues? Does anyone know of any solutions? Thanks.
Answer: The Future feature is expecting a real ObjectContext. I believe the current scenario fail when the method GetDbContext is called since no context can be found.
I'm not aware of a workaround but it may possible to add an option such UseMockContext that will resolve all queries without batching them (Exactly as if you was not using the Future feature).
Let me know if adding this option it's something that could solve your current problem.
If this is the case, I suggest you creating an issue here: https://github.com/zzzprojects/EntityFramework-Plus/issues
Comment: This can definitely work I think. What is the process of doing something like this? I'll copy this issue over to the link you provided.
Comment: Great ;) I will try to make this request during the weekend.


Is this WCF serialization approach reasonable?

Question: I'm looking at using WCF to do client/server, UI/database layers, the thought being that I would use a WCF service to read a DataRow, populate the properties of a class and then return that to the UI client (this is Windows end-to-end).
I started with a class in a DLL, and shared the DLL between the UI and the server. The server reads the DataRow, and the class knows how to populate itself from a DataRow. The class has public properties with private backing variables but when populating from the DataRow, the class writes direct to the backing variables. The instance of the class is then passed back to the UI.
The UI deserializes the class. The class has public properties, and the setters all do the INotifyPropertyChanged stuff to support binding. So far, no normal.
I started with [DataContract] and [DataMember] attributes, but noticed that when an instance of my object gets de-serialized at the UI, it calls the public property setters of an instance of the class - which in turn fires a 'has changed' event for each property.
To get around that, I read that I could use IXmlSerializer. So I removed the attributes, and supported the IXmlSerializer interface, using the ReadXml() method to write direct to the backing variables behind the public properties.
This all works fine (with the exception of now having to have a parameterless constructor), but is it reasonable ? Is this how things are supposed to work ?
Should I not have a shared class which, from the UI, knows about INotifyPropertyChanged and which, from the server end, knows how to construct itself from a DataRow. Should I put all that logic somewhere else, and define the class using XSD ?
The trouble is that I can probably solve the problems I come across (like how to deserialize nullable types) but I'm not really certain that there isn't a better way. I have no foreseeable need to support anything other than Windows to Windows WCF communication, so I don't actually care what the XML looks like (or whether it exists at all).
Pointers would be much appreciated.
Thanks.
Answer: One possible solution is to maintain a contract on the server side (which will be serializable via [DataContract], [DataMember]) and an entity on the client side. Any given service method will return the contract, but you wouldn't call the service directly. Instead, put a proxy in the middle. The proxy will call the service method, convert from contract to entity, and then return the entity.
This way, your front end is only concerned with its entity (since it only talks to the proxy - never directly to the service) and doesn't have to worry about the contract at all. And you don't have to do your own funky serialization stuff :)


User name and email ignored if previously asked a question from the same computer

Question: Steps to reproduce:

Enter Stack Overflow for the first time. You don't have an account.

Ask a question without registering. It asks you for a name and email.

Now suppose you are another user using the same computer, a few days later.

Ask a new question.
By default, the name and email are filled in with the previous ones. But you are allowed to change them.

So edit those fields and enter a new name and a new email.

Post the question.

EXPECTED: the new question should be published with the new user name and email.
OBSERVED: it is published as being asked from the same user as the previous one.
Now, if you are objecting that this is expected behavior (because you want to discourage users from posting with multiple names, because you think that user should register and log in), THEN it should NOT allow you to edit the name and email fields if it is going to ignore any change and take the old values anyway.
What is certainly a bug is that you are allowed to write a new name and email and then everything works as if you had entered the same name and email as before. Don't let me think I'm doing something if I am not allowed to do it.
Comment: I want to contract you to teach my team to write error reports
Answer: I can't reproduce this (and I really tried), so I believe this is now fixed.


"pleasure" vs "happiness"

Question: With regards to the field of philosophy, are there any notable precise definitions of "pleasure" and "happiness"?
How does "pleasure" compare to "happiness" and vice-versa?
Answer: I wouldn't say there are "widely accepted (precise) definitions" for the two terms you mention. I would say there are several different well-known accounts that deal with relationship.
The first one I would recommend is from Aristotle's Nicomachean Ethics. For Aristotle, the end goal of life is eudaimonia -- a word that can and has been translated as "happiness." At the same time, this happiness also refers to a certain form of flourishing. Thus, Aristotle takes pain to explain that this is not identical to happiness nor is it necessarily identical to what agents take pleasure in. Instead pleasure/pain are signals that operate correctly in the virtuous person (evil pains them; good gives them pleasure), but that operate poorly in lesser mortals (where evil sometimes gives them pleasure; good sometimes gives them pain). The first part of this argument is BooK I. The concern with pleasure/pain happens in Book II. (I've written a little bit on this and continue to do so, but for more famous considerations, I would suggest consulting J.L. Ackrill's brief primer on Aristotle).
In terms of other accounts, we can also see differing treatments in the Epicurean philosophy and in the Stoics. For the Stoics, pain and pleasure signal nothing about morality except insofar as experiencing any negative feeling due to one's circumstances reflects a character that lacks ataraxia. Conversely, the Epicureans sought to optimize pleasure in their lives.
Moving towards more contemporary thought, the Stoic and Epicurean positions recur as the Kantian and Millean accounts. In John Stuart Mill's account, pleasure and happiness occur as synonyms. For Kant, happiness (in its rational form) is good, but otherwise the pursuit of pleasure is a sign of moral failing (see for instance his treatment of sex in the Metaphysics of Morals).
There's a decent amount of contemporary literature on the subject -- centered on what is required for people to be happy. But "happiness" is generally called "well-being" instead in the contemporary literature to avoid self-helpers molesting the research. I believe a large part of the impetus is Derek Parfit.
I can recommend at least two authors in this arena. Chris Rice who writes about objective list theories and Christopher Gowans who is also working on well-being. Objective list theories propose that people are happy (have well-being) when they have some or all of the goods on an objective list. This stands in contrast to subjective theorists who maintain that happiness is had in having what one wants.

I don't know if that answers your question, but that's the literature as far as I know it.
Answer: Firstly, the two English words can be understood differently through times and geographies. For example, eudaimonia means literally well-classed spirit and is translated as "happiness". The difference is too remarkable.
"Pleasure" in hedonism can be used interchangeably with "happiness".
So it is safe as long as concerned in philosophy, no clear lines are important.
It depends on your philosophical position to go further into concepts such as eudaimonia, provided they are not precisely "happiness". You can't understand a theist being atheist.

"pleasure" vs "happiness"


Why doesn't Shireen Baratheon have black hair?

Question: In Game of Thrones, Ned Stark clearly reads from the book that all true Baratheons are born with black hair. Then why does Shireen Baratheon have golden hair instead of black? Is it the same way as it is mentioned in the book by GRRM? If so, is there any significance for this colour contradiction?
Comment: I think the book showed Ned that all known Baratheon-Lannister children had black hair. Shireen's Mother was a Florent so (in the show) you could argue that this rule does not apply to Baratheon-Florent children.
Comment: It's been a while but I recollect Ned examining the history of *male* Baratheons.
Comment: "The seed is strong" is not genetically correct in the first place. Dominant genes do not exclude the possibility of recessive genes emerging in a later generation. E.g. if black hair is dominant over blonde hair, a child of Robert and Cersei would be black haired (but carry a recessive blonde gene). If that child then impregnates someone else who is black haired (but with a recessive blonde gene), there's a 25% chance that their child gets both of its parents' recessive blonde genes. Dominant traits are **more likely** passed on (75% chance), but not **exclusively** so (not 100% chance).
Answer: In the books she had dark hair. From gameofthrones.wikia.com:

Shireen has the characteristic Baratheon features of dark hair and blue eyes. In the books, this means that her hair color is outright black, but in the TV series it is a lighter shade closer to dark brown. This might be due to the fact that actress Kerry Ingram has naturally light hair, and it was decided that dyeing her hair completely black looked too artificial.

So the show just contradicted Shireen's Baratheon features just out of convenience.
Reddit have a long discussion on it with user speculating reasons for it like greyscale decolorates her hair, she is being bastard etc. But no official statement I can get.
Comment: @randal'thor Seems more relying on a "wiki of questionable merit".
Comment: @NapoleonWilson True, it's a poorly *cited* answer, but at least it *refers* to a good source, albeit not quoting from it verbatim.
Answer: I haven't found anything about this online... but this is my theory.
Shireen is not Stannis daughter, and that's why her hair is not dark. AND that's also why Stannis lost at the end, and why the Red Woman's sacrifice didn't work. She THOUGHT Shireen had Baratheon's blood, but she didn't. Ergo, she died for nothing.
I honestly don'think the showrunners thought of this, and I also know she HAS dark hair in the books. But I like to think this can make sense.
Comment: How does Stannis not prevent it then? Also, his wife, Selyse would have known clearly if it were not Stannis's. She could have said so to save her life in season 5.


API v2.0 Developing desktop app

Question: If I am developing a client side application, what kind of domain should I provide to 0Auth callback? Can it be a custom application-centric scheme (like myapp://oauthcallback/)?
Answer: For native applications (ie. Desktop apps), in order to participate in an OAuth 2.0 flow you need to embed a browser control (or otherwise instrument one so you can read the current location, including hash) and do an implicit (ie. Client Side) flow with a redirect_uri of https://stackexchange.com/oauth/login_success.  When you detect navigation to that url, you need to read the hash out and proceed like a normal client side app.
This detail is buried down at bottom of our authentication docs for the moment.
During registration, desktop apps can have anything in the Domain field.  I'd suggest setting it to the same domain as your website, just in case you want a more traditional flow there in the future (of course, you can edit your app's domain at any time).
Finally, no, you cannot use custom schemes for your redirect_uris.  Only HTTP and HTTPS, and even then you should really try to use HTTPS if at all possible.
Comment: So I can even put something like https://localhost/oauthCallback and then just track my http client being redirected to that URL with provided parameters?
Comment: @Eimanthas - if you registered `localhost` as your domain, yes.  Not much benefit over redirecting to the provided stackexchange.com url though.

API v2.0 Developing desktop app


Is auto-fellatio haram?

Question: I am 15, and I sometimes have a very very high gaze, and I used to watch porn. However, I no longer watch porn (Alhamdullilah). These days I sometimes lick my own penis, but I make sure not to ejaculate. I sometimes wrap a pillow around my penis and move it gently to lower my gaze. Again I make sure not to ejaculate. Is this considered as haram?
Comment: I don't think ejaculation is necessary for masturbation to be considered haram; I'm not completely sure though. Either way, auto-fellatio would definitely be considered masturbation.
Comment: What does _"to have a very high gaze"_ mean?
Comment: In other words, I have high libido
Comment: http://islam.stackexchange.com/questions/3004/masturbation-and-islam
Answer: Yes, this is very haram! You are still stimulating yourself outside of marriage, and the only sexual actions you may commit are with your wife, and even that is strictly vaginal. This helps to calm and limit sexual desire and drive outside of that bond, and the like. You must try your best to stop it now! It's so, so bad for you. It's quite sinful.
Repent by doing wudhu and praying two rakat nafl immediately, if you haven't already. You will feel much better.
Good that you've gotten off of pornography, brother. Hopefully, Allah will guide you to the path of purity. ^ ^
Comment: That's you my brother for this response, once I asked this question I stopped doing it till I get a response. I really thank God for helping me to stop pornography. I am going to do my best to stop that.
Comment: "and even that is strictly vaginal" - the scholars who say that oral is haram seem to be a minority.

Is auto-fellatio haram?


Firefox popup wont receive cookie

Question: I'm linking to another page that is opening in a window.
here is the link:

Now when i open the file, i want it to be showed to people that are logged in, which is where i encounter my problem..
I'm including my files to the login script, and using both session_start(); and ob_start(); on the page opened in the window, but it just wont use my cookies in there..
Does anyone know why this is happening?
Update:
I set my cookies like this:
setcookie("cookiename", $value, time()+600);

Master is test.com/test/index.php
popup is test.com/test/pages/popup.php
Update I found out that it works perfectly in IE, but not in Firefox.. Does anyone know what i can do to fix that?
Answer: looks like you are setting cookies in some subdirectory, not the root of domain
this should fix your issue:
setcookie("cookiename", $value, time()+600, "/");

Firefox popup wont receive cookie


How to translate "wall" as a verb?

Question: Phrases such as "wall in," "wall off," and "wall out" demonstrate the use of the word wall as a verb. I couldn't find a good translation for these phrases. I'm mostly wondering because I play a real-time strategy game that involves the use of defensive walls and players frequently say to each other "wall here" to mean "build a wall here," and I realized I wouldn't exactly know how that's said in French other than "faites un mur ici."
Comment: It means that something is blocked. If it's walled off, it means there is a physical barrier preventing entry. It's not very common I guess, but native speakers will understand it intuitively even if they haven't heard it before.
Comment: I can infer the meaning of "wall in" and "wall out", but what do you mean by "wall off"?
Answer: Literal translation of "wall in" should be "emmurer", which literally means "put someone/something in between 4 walls"
However, usage for this word has often to do with a state of mind, like "s'emmurer dans le silence" -> "refuse to reveal any information even if it causes complications and can't help"
Correct way of saying "build a wall here" is "construisez un mur ici" or "édifiez un mur ici" (last one is more formal). But playing a STR, I and most of my friends would just say "wall là", franglish.
Answer: The literal translation exists and is murer.
However, it is nowadays almost only used in specialized expressions like murer la porte or murer la fenêtre.
If you want a single verb, an alternative might be cloisonner (build a partition).

How to translate "wall" as a verb?


In DNA repair, how is it determined which strand contains the error?

Question: DNA replication is more accurate than transcription (or RNA replication) because mechanisms exist for proof-reading and repair of DNA, but not for RNA.
Consider a segment of a DNA strand, AGTC. Its complement is GACT. Now suppose its complement is mutated to TACT — the DNA repair system will replace the wrong T by G. Why isn't A in the original strand replaced by C? How does the system determine that the first strand is correct and its complement is incorrect?
Comment: I've edited this question, removing anthropomorphic "know" and the implication that the DNA, rather than enzymes, did the repair. Although the question was answered some time ago, this makes it more useful for indexing and reference.
Answer: There are many types of DNA repair. Let us limit to the following three different types to answer this condition.
1. UV damage
Exposure of a cell to UV light can result in the covalent joining of two adjacent pyrimidines (usually thymines), producing a dimer. These thymine dimers prevent DNA polymerase from replicating the DNA strand beyond the site of dimer formation.
In such cases, UV-damage specific endonucleases cleave both the 5' and the 3' end of the lesion. Along, with the lesion some normal DNA is also lost as an oligonucleotide. Here modifications are being made only on one strand, the other is taken as a template (correct) and the DNA in the lost part is replaced.
The UV-damage may occur on both the strands but locally, one is affected and the other is the template (since you can't have thymine both sides)
2. Base Excision
Normal DNA bases can get deaminated spontaneously or on insult to an abnormal base (not on DNA).The abnormal base is excised by glycosylases and gap is later filled by considering the other strand the template.
3. Mismatch repair
What you are talking of in your example is not a case of deamination or UV damage but a mismatch repair. There can be errors in replication too where such a case could set in. There are specific enzymes for this repair, but discrimination is based on the degree of methylation. GATC sequences, which are found approximately once every thousand nucleotides, are methylated on the adenine residue. This methylation is not done immediately after synthesis, so the newly synthesized DNA is hemimethylated (that is, the parental strand is methylated but the daughter strand is not). The methylated parental strand is assumed to be correct, and it is the daughter strand that gets repaired.
The above said mechanism of discrimination is only in the gram negative bacteria. To quote Wikipedia,

However, in other prokaryotes and eukaryotes, the exact mechanism is not clear. It is suspected that, in eukaryotes, newly synthesized lagging-strand DNA transiently contains nicks (before being sealed by DNA ligase) and provides a signal that directs mismatch proofreading systems to the appropriate strand. This implies that these nicks must be present in the leading strand, and evidence for this has recently been found.

There are other cases where there is damage occuring to both strands that I'd suggest for further reading.
References

Lehninger's Principles of Biochemistry, Ed. 6
Lippincott's Illustrated Reviews, Biochemistry, Ed. 5
Wikipedia. DNA mismatchrepair
Answer: The reason the fact it isn't realistic is important. DNA repair machinery works by repairing common errors that occur due to common mutational pathways. The enzymes are specific for this, for example one particular enzyme targets mutations caused by UV and itself is activated by sunlight thus it's specificity makes it repair the correct chain. Also during replication, newly synthesised DNA lacks methylation. The repair enzymes thus know which chain is correct.
Answer: Your specific scenario is not realistic, thymine is a pyrimidine base while guanine is a purine base. They are very different chemically and can't spontaneously convert into each other. So this is a type of damage that only occurs during the replication of DNA.
The typical damage that occurs and can be repaired is oxidation, methylation and hydrolysis of DNA. This kind of damage results in modified or missing bases and can be detected due to that.
You might also be interested in why thymine is used in DNA instead of uracil, as uracil can be easily damaged in a way that would not be detectable.
Comment: Perhaps it is not realistic, but talk theoretically, if this kind of error happened, can it get auto repaired?
Comment: This kind of error can totally happen in a laboratory setting - true, it's maybe not a natural context, but it's not unimportant
Answer: To solve the problem of which strand is edited to correct mistakes, immediately after DNA replication, the original strand is methylated to prevent correction on this strand.Thus only the newly synthesized strand is searched for errors for correction. In short methylation prevents the template strand from being edited error and correction.
Comment: Could you add some references to this, please?