Mixtures readily oxidzing organic matter

Question: Are there other mixtures than piranha solution with similiar or better ability to completely and readily oxidize organic matter? Perhaps peracetic/performic acid?
Comment: Is it a practical question for a certain application (e.g. cleaning glassware), or just a search for the best oxidant ( there are plenty exotic compounds and mixtures such as $\ce{ClF3}$ or liquid ozone/oxygen)?
Comment: ...and there is manganese heptoxide. I would recommend staying away from it.
Answer: In biophysics, when you want to destroy anything organic on a platinum probe(1), you usually use sulfochromic acid (mixture of chromic acid and concentrated sulfuric acid). I do not know anything stronger.
(1) A platinum probe is used just because it can handle being subjected to sulfochromic acid. Most other metals would not.
Answer: There are many, many dozens of substances and mixtures that can readily oxidize organic matter, in some cases explosively. The degree of completeness of the oxidation process is dependent on the specific circumstances, e.g., is the organic matter sucrose or a piece of wood?
That said, a few notable oxidizing substances (or liquid mixtures) are the various sulfuric acid family members (https://en.wikipedia.org/wiki/Sulfur_oxoacid), chlorosulfuric acid, fluorosulfuric acid, nitrosylsulfuric acid, white fuming nitric acid (WFNA), red fuming nitric acid (RFNA), hydrogen peroxide (30% or higher), $\ce{FOOF}$, $\ce{OF2}$, $\ce{ClF3}$, 'mixed acid' (WFNA with 10-17% $\ce{H2SO4}$), $\ce{FNO3}$, $\ce{FClO4}$, $\ce{ClF}$, $\ce{BrF5}$, $\ce{F2}$, $\ce{O3}$, $\ce{NO2}$, $\ce{N2O4}$, $\ce{NOF}$, $\ce{F2NNO}$, $\ce{HNF2}$, $\ce{ClF5}$, and far more. And this does not even consider exotica such as alpha particles, plasma etching, ion milling and so on.
Almost all of the substances/solutions listed above are very dangerous and quite a few are either explosive per se or as close to it as makes no difference. Some are way too unstable to exist at room temperature.  In some cases, mixtures are possible and have even been made by intrepid people. In other cases, mixtures would be catastrophic.
I highly recommend Dr. John Clark's book [1] if anyone wants to know more about what happens when extemely powerful oxidizing agents meet various potential rocket fuels. (This is the source of some of the oxidizing agents listed above.) Dr. Clark was a physical chemist with deep insider knowledge of the development of liquid fuel rockets.
[1] J.D. Clark, Ignition! An Informal History of Liquid Rocket Propellants, Rutgers University Press Classics, New Brunswick, NJ, ©1972 & 2017.


Override Widget class in plugins with custom plugin

Question: I am currently modifying a purchased theme for a client that has several required plugins for it to work. One of the required plugins, creates a widget that displays a post type and client would like to remove some of the fields displayed.
Easy to go into the plugin and edit, problem solved. That's, of course, not good practice. I would like to know if an how to create a custom plugin that can over some of the functionality of the required plugin. Seems like it should be reasonable type of action but a little lost on best practice. Few questions.
Here is the start of the class that needs to be overwritten:
add_action('widgets_init', 'gdlr_lms_recent_course_widget');
if( !function_exists('gdlr_lms_recent_course_widget') ){
    function gdlr_lms_recent_course_widget() {
        register_widget( 'Goodlayers_Lms_Recent_Course' );
    }
}

if( !class_exists('Goodlayers_Lms_Recent_Course') ){
    class Goodlayers_Lms_Recent_Course extends WP_Widget{

        // Initialize the widget
        function __construct() {
            parent::WP_Widget(
                'gdlr-lms-recent-course-widget',
                __('Goodlayers Recent Course Widget','gdlr-lms'),
                array('description' => __('A widget that shows latest courses', 'gdlr-lms')));
        }

        // Output of the widget
        function widget( $args, $instance ) {
            global $gdlr_lms_option;

            $title = apply_filters( 'widget_title', $instance['title'] );
            $category = $instance['category'];
            $num_fetch = $instance['num_fetch'];

            // Opening of widget
            echo $args['before_widget'];

            // Open of title tag
            if( !empty($title) ){
                echo $args['before_title'] . $title . $args['after_title'];
            }

            // Widget Content
            $current_post = array(get_the_ID());
            $query_args = array('post_type' => 'course', 'suppress_filters' => false);
            $query_args['posts_per_page'] = $num_fetch;
            $query_args['orderby'] = 'post_date';
            $query_args['order'] = 'desc';
            $query_args['paged'] = 1;
            $query_args['course_category'] = $category;
            $query_args['ignore_sticky_posts'] = 1;
            $query_args['post__not_in'] = array(get_the_ID());
            $query = new WP_Query( $query_args );

            if($query->have_posts()){
                echo '
';
                while($query->have_posts()){ $query->the_post();
                    echo '
';
                    gdlr_lms_print_course_thumbnail('thumbnail');

                    echo '
';
                    echo '
' . get_the_title() . '
';
                    echo '
';
                echo '' . __('Created on', 'gdlr-lms') . ' ';
                    echo get_the_time($gdlr_lms_option['date-format']);
                    echo '
';
                    echo '
';
                    echo '

';
                    echo '
';
                }
                echo '

';
                echo '
';
            }
            wp_reset_postdata();

            // Closing of widget
            echo $args['after_widget'];
        }

Few questions:
I believed the purpose of the if(!class_exists(... was to allow the class to be created elsewhere allowing the ability to override, but that does not seem to work. Should I get errors about class having already been defined?
Is the correct method to extend this class with my own and use remove action against the add_action statement, then add my own?
I am a former procedural programer and just getting into my first set of custom classes. If I extend the class, will the constructor still call the parent of the parent or do I need to add parent::__construct into my constructor?
I have found a couple of examples for this but they are rather old and don't explain everything completely. I want to get my head around this as this functionality would be exceptionally helpful when making modifications to client sites when they don't want to go full custom.
Answer: You're actually quite close to answering your own question. Your plugin would have to start with checking whether the plugin is active (which you can also do with function_exists).
The you indeed can use remove_action to make sure functions and classes aren't activated. This doesn't mean these functions become undefined.
So yes, you will need to extend the class if you want to customize it. If you don't define a constructor in that customized class, the parent's constructor will be use.


How are we to understand 'firstfruits' in 1 Corinthians 15:20-23?

Question: 1 Corinthians 15:20-23 presents Jesus as the firstfruits of those who have fallen asleep. What is the significance of 'firstfruits?' Is this related to instructions in the Hebrew Bible about firstfruits (e.g. Exodus 23:14-18, Exodus 34:22-26, Leviticus 2:12-14, Leviticus 23:9-21, Numbers 28:26, Deuteronomy 26:1-11)?
Comment: I asked this question to help out another user who is having difficulty asking good, on-topic questions.
Answer: Have you ever noticed how when folks are in a certain season, that season, and the prominent themes of that season tend to infiltrate their thoughts and speech?  The book of I Corinthians is peppered with thoughts of the Spring festivals of YHWH and those in order as well!  Paul wrote to the Corinthians in the context of these spring feasts and I believe, in part, his thoughts reflect this context; in part, he is teaching the Gentiles how to apply the principles of the law given to the Jews regarding the spring feasts, to their gentile life; and finally, in this particular passage, he is demonstrating how the feasts speak of Jesus fulfills them.
Passover/Feast of Unleavened bread:

1 Corinthians 5 8 Therefore let us keep the feast, not with old
  leaven, nor with the leaven of malice and wickedness, but with the
  unleavened bread of sincerity and truth.
1 Corinthians 11 23 For I received from the Lord that which I also
  delivered to you: that the Lord Jesus on the same night in which He
  was betrayed took bread

Firstfruits/The day after the Sabbath of Passover:

1 Corinthians 15 20 But now Christ is risen from the dead, and has
  become the firstfruits of those who have fallen asleep.
23 But each one in his own order: Christ the firstfruits,
  afterward those who are Christ's at His coming.
1 Corinthians 16 15 I urge you, brethren --- you know the household of
  Stephanas, that it is the firstfruits of Achaia, and that they
  have devoted themselves to the ministry of the saints ---
1 Now concerning the collection for the saints, as I have given
  orders to the churches of Galatia, so you must do also: 2 On the
  [day one of Sabbaths] let each one of you lay something aside, storing
  up as he may prosper, that there be no collections when I come. 3
  And when I come, whomever you approve by your letters I will send to
  bear your gift to Jerusalem. 4 But if it is fitting that I go also, they will go with me.

Pentecost:

5 Now I will come to you when I pass through Macedonia (for I am
  passing through Macedonia). 6 And it may be that I will remain, or
  even spend the winter with you, that you may send me on my journey,
  wherever I go. 7 For I do not wish to see you now on the way; but I
  hope to stay a while with you, if the Lord permits. 8 But I will
  tarry in Ephesus until Pentecost. 9 For a great and effective door
  has opened to me, and there are many adversaries.

Cross reference Hebrew Testament:

Deuteronomy 16:9-17 "You shall count seven weeks for yourself; begin
  to count the seven weeks from the time you begin to put the sickle to
  the grain. 10 Then you shall keep the Feast of Weeks to the LORD your
  God with the tribute of a freewill offering from your hand, which you
  shall give as the LORD your God blesses you. 11 You shall rejoice
  before the LORD your God, you and your son and your daughter, your
  male servant and your female servant, the Levite who is within your
  gates, the stranger and the fatherless and the widow who are among
  you, at the place where the LORD your God chooses to make His name
  abide. 12 And you shall remember that you were a slave in Egypt, and
  you shall be careful to observe these statutes. 13 "You shall observe
  the Feast of Tabernacles seven days, when you have gathered from your
  threshing floor and from your wine press. 14 And you shall rejoice in
  your feast, you and your son and your daughter, your male servant and
  your female servant and the Levite, the stranger and the fatherless
  and the widow, who are within your gates. 15 Seven days you shall keep
  a sacred feast to the LORD your God in the place which the LORD
  chooses, because the LORD your God will bless you in all your produce
  and in all the work of your hands, so that you surely rejoice. 16
  "Three times a year all your males shall appear before the LORD your
  God in the place which He chooses: at the Feast of Unleavened Bread,
  at the Feast of Weeks, and at the Feast of Tabernacles; and they shall
  not appear before the LORD empty-handed. 17 Every man shall give as he
  is able, according to the blessing of the LORD your God which He has
  given you.

This is the historical literal background that provides meaning to what Paul is saying when he uses "Firstfruits."  Though Paul appears to apply the principles of the Spring feasts, (ie setting aside (counting the omer) to send money to the saints in Jerusalem).  Paul's usage of "firstfruits" extended beyond grains and herds/flocks:
The first fruits are an acknowledgment to YHWH for His blessing which He has given you.  It is the first; thus, more is to follow.  The first belongs to God. The first is the beginning of the harvest.
Answer:
In this particular passsage, Jesus is presented as the "firstruits" of those who have fallen asleep.  He thus would be the first of many who have died and will rise from the dead. He ascended to the Father on the day after the Sabbath of Passover just as the first fruit is waved by the priest before YHWH.
cf. John 20:17 contrasted with John 20:27:

17 Jesus said to her, "Do not cling to Me, for I have not yet ascended
  to My Father; but go to My brethren and say to them, 'I am ascending
  to My Father and your Father, and to My God and your God.' "
27 Then He said to Thomas, "Reach your finger here, and look at My
  hands; and reach your hand here, and put it into My side. Do not be
  unbelieving, but believing."

So we see, Paul's writing is definitely related to the instructions of YHWH in the Scripture portions you listed.  Paul, a Jewish Pharisee, teaches from Scripture which is profitable for doctrine, for reproof, for instruction, for training in what is right.   His letters are very definitely better understood having a knowledge of the  Hebrew testament.  These are, after all, those that speak of Yeshuah/Jesus (John 5:39)!
Comment: Understanding the spring feasts is key to understanding Jesus, and the fall feasts to understanding his return. It is this Israelite background and understanding that the western church is largely missing. Great answer.
Answer: The first fruit(s), under the Law of Moses, guaranteed the rest of the "crop" (see Leviticus 23:9-14). Jesus was the first fruit from the dead in His resurrection because His resurrection provides His own with the certain hope of the same. But not just that, He was the first to be raised to never die again (Colossians 1:15-18; Revelation 1:5), and then now provides hope of the same resurrection to immortality to His followers.
Answer:
How are we to understand 'firstfruits' in 1 Corinthians 15:20-23?
20 But the fact is that the Messiah has been raised from the dead, the
  firstfruits of those who have died. 21 For since death came through a
  man, also the resurrection of the dead has come through a man. 22 For
  just as in connection with Adam all die, so in connection with the
  Messiah all will be made alive. 23 But each in his own order: the
  Messiah is the firstfruits; then those who belong to the Messiah, at
  the time of his coming; —CJB

First, as touching the passages from the Hebrew Bible such as those from Exodus, Leviticus, Numbers, and Deuteronomy; we must first address two significant facts.

These passages are a part of Jewish law which is never imposed upon gentiles (cf. the Jerusalem counsel, Acts 15:6-35). This is not to say that those laws may not be applied in some manner to non Jewish worshipers, but non Jews (Gentiles) are not bound by them.
The firstfruits being offered to God were typical of the ministry of Messiah. The offering of firstfruits required that only the best of the best be offered to God, and that offering must be done with thankfulness.

One key to understanding is found in the words, "...each in his own order..."
Messiah was (and remains) the best of humanity, and he was offered to God by, and on behalf of sinful humanity. Messiah being the one who did the "work" of salvation is naturally the first to partake in the resurrection of the righteous dead. After that, and each in his own order, the resurrection will occur for others, both righteous and unrighteous.
The apostle Paul had a marvelous insight into this when he stated:

For we know that the whole creation groaneth and travaileth in pain
  together until now. 23 And not only they, but ourselves also, which
  have the firstfruits of the Spirit, even we ourselves groan within
  ourselves, waiting for the adoption, to wit, the redemption of our
  body. —Romans 8:22-23 (AV)

Paul's emphasis on "together" in these verse 22 does not include believers in Messiah, who are specifically mentioned in verse 23, but rather points to the various parts of the natural Creation.
Paul began this section in verse 18 by referring to the believers' "present sufferings," a subject to which he now returned to in verse 23.
Believers are described as the ones having the firstfruits of the Spirit. This is a declaration that the Holy Spirit is "the firstfruits" (aparchēn) of God's work of salvation and re-creation in believers. Believers "spirits" have been resurrected from the dead and we are now spiritually alive in the Messiah. Believers are therefore awaiting the ultimate fulfillment of their sanctification, i.e., the redemption of their mortal (death doomed) physical bodies.
Yeshua Messiah has already received his glorified body and, as such, is the firstfruits of those who believe on him. And now believers groan together with all of creation in hope of receiving our immortal bodies and becoming fully conformed to the image of Messiah (Romans 8:29).


How can geometric isomerism arise due to steric factors?

Question: I can see how a double bond and a ring structure can lead to geometric isomerism but can't see the same for steric factors. Could you help? Thank you!
Comment: Do you mean with rings? 6 membered rings can't flip if they have large bulky steric groups attached. Its hard to visualise without a model though!
Answer: Let's take a biphenyl compound:

Due to steric factors, the rings cannot be planar. Instead, they have an approximate right angle between them:

(Image source)
Note that for the right angle to "flip" over to the other side, the $\ce{NO2}$ and $\ce{CH3}$ would have to pass. These groups are bulky enough to prevent that from happening1 unless sufficient energy is provided.

Now, try to look from it along the axis. You'll notice that for this particular molecule, the nitro group farther from your eyes is a clockwise step from the closer nitro group. This happens regardless of which side of the axis (left/right) you look at it from.
On the other hand, if we twisted the molecule so that the angle is again a right angle on the other side, there is now an anticlockwise step from the closer nitro to the farther nitro.
These two configurations of the compound are stereoisomers.
Since the steric barrier can be overcome with sufficient energy, such compounds usually racemize over time (though when the groups themselves  are as bulky as a phenyl, this doesn't happen at any appreciable timescale, IIRC).
1. I actually had some trouble using ChemDoodle to draw the molecule without any overlapping bits because of that. Doesn't exactly prove the bulkiness, but one gets the idea.
Comment: Where did you get that book from which you took the image? The link in your "image source". Are there more books? On chem or physics or computer science?


CSS: @font-face giving 404 errors on font files

Question: I recently finished a Genesis (v1.5) child theme for WordPress (v3.1), uploaded it to my site and the fonts aren't appearing as they should.  I used Font Squirrel to make the appropriate files and CSS for the font.  I have permission from the font designer to use it for web embedding. This same code works great on my test site.
I used Firebug (v1.6.2) in Firefox (on OS X, v3.6.15) and found that the font files were getting 404 errors.  I've triple checked the files and they are where they should be.  I've uploaded them again and again and still get 404 errors on the font files.  The fonts do not work in Chrome (on OS X, v10.0.648.133), Internet Explorer (on Win XP SP3, v8.0.6001.18702), or Firefox (on Win XP SP3, v3.6.15).
I tried turning off plugin one-by-one, but that didn't make any difference, so I know it's not a plugin conflict.  I'm looking at the font files on the server, so I know they are there. Any ideas what to try next?
NOTE: I changed the CSS for the title font size on the production site since it jacked up the layout without the correct font.  Otherwise, the code is identical to the test site.  Note the "Remove these once font-face works" section at the top of the CSS file.
Answer: I too was getting 404 errors with my face-face files in WordPress. The files were there but I was getting a 404 inside WordPress.
I moved my font directory out of WordPress and put it into the root of the domain and changed my CSS accordingly.
All OK now.
Answer: Using any proxy?
At my work I can't see mines in a web I did some time ago...
Comment: I don't think it's a proxy issue, as they 404 for me here too, and I'm not behind a proxy.
Answer: In production site you have your fonts in fonts/ directory, while in the test case only "GuildofProfessionalActorsRegu" links to fonts/ and if you change the font family on #title a with firebug you'll see a your custom font. Try fixing the first rule.
Comment: Haven't seen earlier how old this question was.
Comment: Thanks Litek.  I'm not sure when I fixed it, but at some point I must have corrected the error because it works now.  I'll mark this question as answered.


DOS-like Wildcard for Filtering List of Files

Question: I have a list of file names that I would wild like to filter based on a DOS like wildcard specification similar to what can be used as the first argument,"forms", of FileNames[].  I don't need full compatibility, but something so that "*.txt" returns a list of the text files and "*2015*.log" returns stuff like "c:\logfiles\2015\Dec\logfile.log" out of my list.  Apologies if this is a repeat but I couldn't find any similar questions.
Comment: A good Q&A on these "wildcard" or "meta character" symbols: [How do I perform string matching and replacements?](http://mathematica.stackexchange.com/q/6998/731)
Comment: @C.E. Yep, it's a duplicate.  I should have searched before writing up mostly the same thing Mr.W already explained.
Comment: Thank you for responding to my question.   I disagree that two questions having the same answer make the questions the same. My hold up was that in the documentation that I read for string matching, it mostly discusses the `~~` and `__`. operators and the use of "abbreviated string patterns" such as `*` are downplayed.  The only place I see `*` used as a wildcard is in the documentation for 'SrtingMatchQ'.  It is not mentioned in the documentation for  'StringPatterns'. This confusion is further compounded by the fact that a `*` in a `RegularExpression` indicates a repeating character.
Answer: You can use StringMatchQ to test for matches.
Select[{"foo", "bar", "baz"}, StringMatchQ["ba*"]]
(* {"bar", "baz"} *)

There are three ways to specify a string pattern in StringMatchQ.
The most basic one uses wildcards like the ones you describe.  * stands for zero or more characters.  @ stands for one more more character except uppercase letters.  They can be escaped inside of a string as "\\*" to match a literal *.
These wildcards are used in many other Mathematica functions such as Information, Names, Clear, etc.  As far as I know this syntax is old, available since the earliest versions of Mathematica.  If you think about how these wildcards are used to match symbol names, the usefulness (and special properties) of @ becomes clear in light of Mathematica's CamelCase convention.
The second way is to use string patterns.  These are made to look like expression patterns but work with strings.  If you already know how to use expression patterns, you'll pick up string patterns in a minute: all you need to learn is that ~~ is used to connect pieces of the pattern.  They were introduced in version 5.1.  Here's the detailed tutorial.
Select[{"foo", "bar", "baz"}, StringMatchQ["ba" ~~ ___]]

Internally string patterns are converted to regular expressions and processed using PCRE.
You can write regular expressions directly as well: look up RegularExpression.
Select[{"foo", "bar", "baz"}, StringMatchQ@RegularExpression["ba.*"]]


Is a plasma a distinct phase of matter?

Question: Long ago I learned that a plasma was a distinct state of matter after solid, liquid and gas, and also that it was achieved by imparting heat to a the matter. But most references describe a plasma as an ionized gas. So I'm having trouble understanding, what then, does it mean to be a distinct phase of matter? Is ionization, as opposed to heat, all that's required to make a gas a plasma? If so, what makes a plasma more distinguished than, say, an ionized liquid?
Comment: A plasma is when the material is so hot that the electrons move so fast that they no longer stay bound to a particular nucleus. You sortof have a soup of nuclei and electrons without distinct complete atoms.  By the way, you left out the fifth state of matter.
Comment: If you start with a liquid and start heating it, it will vaporize before it ionizes.
Comment: Possible duplicate: http://physics.stackexchange.com/q/12760/2451
Answer: For clarity, there is a common misconception about plasma here. Plasma when being introduced for the first time to someone who doesn't know what it is, it is called "The fourth state of matter" which is an inaccurate description of it. Since this term is used for introducing some one to plasma, it is no big deal.
When a material changes from a distinct phase to another, it goes through a physical process called phase transition. When gas becomes plasma, it doesn't go through the standard phase transition. Hence plasma-in a general sense-can't be regarded as a distinct phase as solid, liquid and gas phases. It is a phase of the gaseous state. In certain rare cases however, transition from gas to plasma can be described as phase transition.
Plasma by definition is a mixture of free electrons and their ions (possibly negative ions). You need enough energy to liberate electrons from atoms. Roughly speaking, When you put that energy in a solid, energy might be dissipated as heat. If you put that energy in a liqued, energy might be dissipated in vaporization. If you put it in a gas it goes into breaking atoms and molecules (creating plasma). The following figure makes it clearer

Hopefully that was useful
Comment: I'm not so sure that plasma doesn't deserve a spot as a separate state of matter simply because ionization and recombination does not happen at a single temperature. Plasma does have a well-defined degree of ionization, and its properties are fundamentally different than all other states of matter. See @ChinYeh's answer. I have several plasma physics textbooks that explicitly call it a fourth state of matter. In some sense, this question is similar to "is Pluto a planet?", but I think it's important to draw more attention to the properties of the state than to its transitions.
Comment: Just a nitpick - can't we avoid the liquid-vapor phase transition in e.g. water by going around the critical point in temperature-pressure space? So if avoidance of a proper phase transition is sufficient to declare plasma the same phase as gas, doesn't that also mean liquid is part of that same phase? This is probably pushing the definition further than it was intended, but it's something to think about.
Answer: Plasma is said to be a distinct phase because it does not observe the usual description and physical laws that are used to describe the usual 3 states of matter, on several counts:

Plasma is not in equilibrium. Often it is far from an equilibrium. Therefore, thermodynamics can't be used to explain.
Plasma is made of loose particles, but these particles do not follow kinetic theory of gases. Ideal gas law is not even a first approximation to model a plasma.
Plasma particles do not follow a statistical velocity distribution (Maxwell distribution).
Plasma must have two (or more) independent components. These components must carry charges. one is made of electrons, the other cations. It's electrons that are more active in deciding plasma properties.
Unlike in gases, liquids, and (molecular) solids, plasma particles exert strong forces to each other.
There is not a single temperature that characterizes plasma. This means two things. One, plasma is not a clear-cut phase, hence, there is not a clear-cut phase transition temperature, like melting or boiling, for plasma. Two, one temperature may not be enough to describe a plasma. The temperature for electrons may often be higher than that for the rest of plasma.
Plasma can be confined by magnetic force (does not need a container wall).
Unlike other 3 states, plasma is mostly unstable.

In the latter part, you have two questions which amounts to "What makes plasma a plasma?" Ionization is required to form a plasma, but there is no specific temperature requirement. Plasma can exist in interstellar space at around 100 K and in controlled laboratories at close to 0 K. The degree of ionization is usually represented as the ratio of charged ions to total (charged plus neutral) nuclei in a gas, and only a small degree of ionization (sometimes below 1%) is enough to make a gas behave like a plasma.
To be clear, a plasma is not the same as an ionic fluid, which is not a result of ionization but rather is made of cations and anions. Ionization means that electrons are set free from atoms or molecules. An ionic fluid is a salt in a liquid state.
Comment: For the benefit of future readers: several of these bullet points are incorrect. "[Plasma does] not follow kinetic theory of gases." False - gas kinetic theory is an excellent description of transport processes in many plasmas, including the ideal gas law. "... do not follow a statistical velocity distibution" False - of course they do, and often each species *is* approximately Maxwellian. "... must have two ... independent components" False - pure-electron and pure-ion plasmas exist and exhibit many of the collective phenomena (plasmon mode, Debye screening, etc.) associated with plasma.
Answer: Except plasma was the first state of matter, not the forth. All matter formed from plasma, it is not converted from matter to plasma, but from plasma to matter. This is why 99% of the universe is plasma. The electrons were never stripped from the atoms, they never were part of the atom until they are bound by the electrical energy in the plasma to form gasses, liquids and solids.
http://home.web.cern.ch/about/physics/heavy-ions-and-quark-gluon-plasma
"For a few millionths of a second, shortly after the big bang, the universe was filled with an astonishingly hot, dense soup made of all kinds of particles moving at near light speed. This mixture was dominated by quarks – fundamental bits of matter – and by gluons, carriers of the strong force that normally "glue" quarks together into familiar protons and neutrons and other species. In those first evanescent moments of extreme temperature, however, quarks and gluons were bound only weakly, free to move on their own in what's called a quark-gluon plasma"
And supposedly after 13+ billion years, only less than 1% of of that plasma has bonded into solids, liquids and gasses. The rest has bonded into a mixture of ions and electrons, condensed from that quark/gluon state.
To look at it as being formed from solids, liquids and gasses is an incorrect viewpoint, not supported at all by science. Solids, liquids and gasses are instead formed from plasma.
Comment: This doesn't really seem to answer the question.
Comment: Also, the quark-gluon plasma really wasn't a plasma in the sense that the OP is talking about, but yet another state of matter where quarks and gluons are de-localized.
Comment: I don't think the time ordering is the issue here - I'm sure everyone agrees you can go both ways. Also, while the universe started out as a plasma, *most* of the material became neutral gas at [recombination](http://en.wikipedia.org/wiki/Recombination_%28cosmology%29) a few hundred thousand years after the big bang. It was then [reionized](http://en.wikipedia.org/wiki/Reionization) a few hundred million years later.

Is a plasma a distinct phase of matter?


$\hbar \rightarrow 0$ in quantum mechanics

Question: We often see a limit $\hbar \rightarrow 0$ in quantum mechanics and sometimes it's related with symmetry breaking. Can someone briefly write the story behind this limit?
Comment: Usually $\hbar \rightarrow 0$ is used in a context of the limit where Quantum Mechanics turns into classical mechanics (when quantization goes away).
Comment: Related to this question seems to be Landsman's paper "Between Classical and Quantum" [arXiv version](http://arxiv.org/abs/quant-ph/0506082)...
Answer: Often, the classical limit of a quantum system may be seen by simply taking the limit as $\hbar\rightarrow 0$.
For example, a quantum harmonic oscillator has energy levels which are multiples of $\hbar$.
$$E_n= \hbar\omega\left( n+\frac{1}{2} \right)$$
In the limit as $\hbar\rightarrow 0$, we can see that energy levels become continuous.
Another example is Heisenberg's uncertainty principle. The uncertainty in a particle's position ($\sigma_x$) times its uncertainty in momentum ($\sigma_p$), obeys the following relation: $$\sigma_x\sigma_p\geq\frac{\hbar}{2}$$
In the limit as $\hbar\rightarrow 0$, no such restriction between energy and momentum exists.
Comment: It is worth noting that when a dimensionful quantity like $\hbar$ is taken to be small, it means that it is small compared to some quantity of the same dimension in the system.
Comment: It is like focusing a microscope ( dimensions h_bar) and diminishing the magnification until it is zero. It is the relative sizes of h_bar and the size of uncertainty in momentum times space . When we are at even microns, let alone milimeters, and measurable everyday momenta the h_bar can be considered zero.
Comment: $\hbar\rightarrow 0$,  it Seems that we are changing the planks constant? How can we limit on a constant?
Comment: @UnlimitedDreamer We do the same sort of thing when we take $c \to \infty$ to get from relativistic equations to Newtonian equations. $c$ has a definite value, but by pretending it is infinite our equations become Newtonian. In the same way, when we pretend Planck's constant is zero our equations go from quantum to classical.

Edit: Just realized this is an old question. Not sure why it popped up in my recent questions page.
Comment: @UnlimitedDreamer That is exactly what we are doing. Of course it is just a trick, in the real world Planck's constant has a definite value. It just so happens that ignoring that value often gets rid of the "quantumness" of our model.
Comment: @UnlimitedDreamer:  You can think of quantum mechanics as a collection of theories, one for each value of $\hbar$.  One of those theories happens to fit the data we see in the world we live in, but all of the theories are perfectly consistent.  It makes perfect sense to consider the entire family of theories, to consider paths in the moduli space for those theories, and to take limits along those paths.
Answer: I'll start by setting the tangential part of the question aside: In quantum field theory there are currents and charges which are conserved classically, but not quantum mechanically, that is, there are violations of these conservation laws to order $\hbar^2$, and hence the symmetries hold classically but not quantum mechanically. (See below for what that means.) The non-conservation pieces are called quantum anomalies and the corresponding symmetries anomalous. (Other symmetry breaking phenomena require subtleties of QFT:Goldstone's theorem.)
Now for your core question: Classical mechanics is, "basically" an effective theory of the full theory of the world, quantum mechanics, that is, its  Classical limit.
Mathematically, that means that all quantities of interest are functions of the dimensionful $\hbar$, so, normally they entail a classical piece without $\hbar$ and a "quantum correction piece" involving powers of $\hbar$ normalized by characteristic quantities of the same dimension dominating the problem in question, so, actions, angular momenta, etc... so as to be dimensionless.
When these quantities assume macroscopic values, (so, for engineering angular momenta or actions), these powers, and so quantum corrections are infinitesimally small, and thus ignorable. The leading term in this notional expansion is called the classical limit, and many texts on the quantum oscillator remind the student how small such correction effects beyond that limit are, in practice, and when they step to the fore and control atoms and crystals, etc.
A fascinating technical feature happens in this limit---actually dramatized in the struggle of humanity to go beyond this limit, in the 20th century: The mathematical rules describing the full QM theory are very different than the math of the  classical limit. QM was worked out in the 1920s, mostly, with a resolute insistence on keeping away from the confusing classical limit, and violating its mathematical structure with giddy revolutionary abandon!
The reformulation of the QM formulation in a way that made that limit plausible (beyond the early and reassuring Ehrenfest theorem) was only 69 years ago: the Phase space Formulation of QM. In that formulation, it is manifest at every step how QM is a "deformation" of classical mechanics (a mathematese and engineering term: basically means systematic theory of correction) and how, conversely, classical mechanics is an approximate summary effective description of QM. (For example, Dirac, in 1933, Ref 1, explained how the principle of least action follows from the $\hbar/S\rightarrow 0$ limit of amplitudes through constructive interference.) Observables are now described by $\hbar$-dependent Wigner transforms of operators, whose detailed behavior "morphs" into that of classical observables in phase space.
Your question is really a question on deformation quantization, but without conscious reference to it!
References
1 Paul A. M. Dirac, "The Lagrangian in Quantum Mechanics", Physikalische Zeitschrift der Sowjetunion, 3 (1933) 64–72}}
2 Also see J H Van Vleck, "The correspondence principle in the statistical interpretation of quantum mechanics" , Proceedings of the National Academy of Sciences of the United States of America 14 (1928) 178–188, (doi: 10.1073/pnas.14.2.178)
Answer: I think this limit can be best understood if one writes the probability amplitude for a particle to go from a point $X$ to a point $X'$ at a posterior time $T$. As you probably know, Feynman worked out that this amplitude reads:
$\langle x'|e^{-\frac{i\hat{H}T}{\hbar}} |x \rangle \sim \int \mathcal{D}[x]e^{\frac{iS[x](X,X',T)}{\hbar}}$
In this formula, $x(t)$ is any dynamical path that goes from $X$ to $X'$ in a time $T$ and $S[x](X,X',T)$ is the action of this path in the sense of Lagrangian mechanics.
If we forget for a moment about this path story and imagine the path integral as a simple wave packet with a non trivial phase $S$ then we see that the integrand is a sum of cosine and sine functions with a frequency that is inversly proportional to $\hbar$.
If you recall that e.g.
$\sin x + \sin y = 2 \sin \left(\frac{x+y}{2} \right)\cos \left(\frac{x-y}{2} \right)$
we see that idealy constructive summation of the harmonics only appear if $x = y$
In the limit $\hbar \rightarrow 0$, the effective frequency in the path integral tends to infinity and all the interferences are destructive except for any two paths $x_1(t)$ and $x_2(t)$ such that $S[x_1](X,X',T)\sim S[x_2](X,X',T)$. In general this is true if and only if $x_1$ and $x_2$ are neighbouring paths and if $S$ reaches an extremum at $x_1$.
At the end of the day in the limit $\hbar \rightarrow 0$ or rather $S/\hbar \rightarrow \infty$, the probability amplitude $\langle x'|e^{-\frac{i\hat{H}T}{\hbar}} |x \rangle$ is dominated by a most probable path $x_1(t)$ and a "tube of neighbouring paths to $x_1$".
Incindently, the path $x_1(t)$ satisfies the least action principle and this "tube of most probable paths" describes the classical trajectory for a particle going from $X$ to $X'$ in a given time $T$ with an uncertainty width whose typical size is typical size is characterized by the de Brooglie wavelength of the particle.


Check for duplicate entries with number value and lookup value

Question: I have a sharepoint list that requires a user to input a part number (text field) and a vendor (lookup field) along with some other fields. I want to allow the user to enter duplicates of either the part number or vendor (so enforce unique values will not work), but not allow duplicates of the combination of the part number and vendor. In other words, I want to allow only one part number entry per vendor and alert the user if the part number has already been entered for that vendor. Is there a way to accomplish this with a validation rule or basic functionality?
Answer: There is no OOB solution for this requirement, since you will need to compare the input twice in order and with an unknown collection from the column values.
But there are several workarounds based on which version of SharePoint you are using.
For example, you can create Event Receiver (custom solution) if you are on SharePoint on-premises, or use InfoPath to build validation on field controls.
Here is a post for your reference: Validating between two columns to be unique.
If you are using SharePoint Online, you can use PowerApps to do the validation.
References: How to check duplicate item in list using powerapps. /
Identifying Duplicate Entries.


My website google page rank increased from page 27th to 48 with in 8 hours?

Question: 3 days back my website is at 48th page for the keyword search "mobile app development" in google, today morning i saw my page rank it is at 27th ,but after 8 hours in the evening if i look for my website in google search for keyword mentioned above is at again 48th rank how to improve this ,is am i done anything wrong i just posted my website links to some social networks from morning to evening that't the work  i done only ,when will my site again comes to lowere page rank to 27 or in 20's
Comment: This stuff just happens as the rankings are always in flux. There's no way to know when or why this occurs or what a site will rank at at any given time.
Answer: The term "mobile app development" is incredibly competitive. For instance AdWords lists it as High competitive and there is a suggested bid price of $52.61, indicating it is a highly valuable word that lots of people want to rank for. Given the highly competitive nature of that term, it isn't surprising you are seeing massive fluctuations in ranking - especially since you aren't ranking on page 1.
That said, there are some things to check for. Have you been building links for this term and could any of those link practices spammy or questionable? What changes have you made to your website recently--code, design, or content? See if you can find anything you've done recently that might be correlated to when these changes happen.
As well, what other terms does your website rank for? How are those terms performing? I'd check those to see if this term is just an outlier or if everything you rank for had similar fluctuations. That would tell you if this is specific to this phrase or if it is a problem with your site.


changing comparative into positive

Question: Win Win studies more seriously than Lynn Lynn.
If I rewrite it as " Win Win does not study as slightly/lightly as Lynn Lynn," does it mean exactly the same as the original one? Thanks.
Comment: Your title is incorrectly phrased. You've revised the sentence into a negative utterance, not a positive one.
Comment: What is exactly you want to do? Change your first sentence into a negative one? It's enough to put *Win Win studies **less** seriously than Lynn Lynn.*
Comment: "Slightly" and "lightly" are unlikely modifiers for "study". We don't normally say that a person "studies lightly". "Light" can be the antonym of "serious", but not in the sense that you are using "serious" here. Perhaps you mean "carelessly"? "Casually"? But I don't think there's really a clear opposite for "serious" as you're using it here, you really just need to say "not as seriously".
Comment: 'slightly' sounds odd. I don't think 'slightly' would qualify.
Comment: It is an exam question that was created for Grade 11 students.
Answer: AFAIK you have to introduce a negative when converting.

Max can run faster than John

will be converted to

John cannot run as fast as Max

So I'd say it's legal, but instead of 'lightly/slightly', use 'casually' or 'halfheartedly'.
Answer:
Win Win studies more seriously than Lynn Lynn.
Win Win doesn't study as lightly/slightly as Lynn Lynn.

Both sentencecs are different in meaning.
The former implies that both Win Winn and Lynn Lynn study seriously, but Win Win studies more seriously.
The latter indicates that both Win Win and Lynn Lynn study lightly/slightly, but Lynn Lynn studies more lightly/slightly.
However, the following sentence has the same meaning as the sentence #1.
Lynn Lynn doesn't study as seriously as Win Win.

changing comparative into positive


Quantum Dimer Model (QDM) hamiltonian

Question: The Hamiltonian given by Rokhsar-Kivelson QDM is based on tensor products of the state vectors. Why is this the case?, is it because the lattice model is a mixed state? It'd be great if someone could go over the Hamiltonian on a step-by-step basis. Thanks.
Answer: It is not clear what is "tensor products of the state vectors". The QDM Hamiltonian, as any other Hamiltonians of spin models, is a Hermitian operator in a Hilbert space of spins (dimers in this case). However, this Hilbert space does not have a simple tensor product structure, since they consist of hardcore dimers covering a lattice, such that each site must be touched by only one dimer. To see the difference more explicitly, consider a model of spin-1/2's on a lattice of $N$ sites, and we know that the dimension of the Hilbert space is $2^N$, and the Hilbert space is simply $\mathcal{H}=\mathbb{C}^2\otimes\mathbb{C}^2\cdots$. For dimers, a famous classical result states that the number of ways to cover the square lattice with dimers grows asymptotically as $(1.3385...)^N$.
Now the RK Hamiltonian simply gives you the matrix elements. The Hamiltonian is local, so each term only affects/depends on a small patch (in the RK case, a square plaquette) of the lattice and that's why you see usually the Hamiltonian is presented by "pictures" relating dimer coverings which at most differ from each other by rearranging dimers in a single square plaquette. But once you know these matrix elements, it is not different from any other quantum Hamiltonian.
Not sure what you mean by "the lattice model is a mixed state". The lattice model is a model Hamiltonian, which is an operator and "mixed state" refers always to the state of a system as described by the density matrix. If you are confused about these things you probably should go back to more basic quantum mechanics before studying RK Hamiltonian.
Comment: The reason I used "mixed" state was due to the hamiltonian containing a ket followed by a bra. The pictures are given in terms of ket multiplied by a bra. I am not clear on why this is done?
Comment: Ket followed by a bra has nothing to do with mixed states. Any operator $O$ is written this way: $O=\sum_{a,b}\langle a|O|b\rangle |a\rangle\langle b|$ where $|a\rangle$ (and $|b\rangle$) is a orthonomal complete basis of the Hilbert space. I'm not sure what else you can do to concretely specify an operator.
Comment: So,the reason RK used a ket followed by a bra is to ensure that it ends up being an operator?
Comment: It's a Hamiltonian. So it is also an operator.
Comment: I was looking for an intuitive understanding but I figured it out.It's just an indirect way of writing the Hamiltonian operator via sum of outer products for the states. Thanks for being patient with me.

Quantum Dimer Model (QDM) hamiltonian


Timeouts in C# serial port

Question: I am using the C# Serial port library for communicating with a sensor and PC .
I am frequently getting timeouts with the SerialPort.Read() method even though there is data in there.  I used serial sniffers to check that I am receiving all the packet at the port but some how .NET does not pick all of them and times out.  I am reading bytes and the bytes I am receiving is 2112 less than the serial port buffer size.  I tried multiple things and now thinking of using native C/C++ and calling it in C#.  Can someone share more thoughts or used native C/C++ code in C#.
Answer:
running at baud rates 460800 to 921600

Those are pretty strange baud rates, rather high.  Clearly you are not using the DataReceived event so it gets rather critical how often you call the Read() method.  Take some time off doing something else, including Windows thinking that something more important needs to be done and context-switches away from your thread, and the receive buffer will quickly overflow.  Not implementing the SerialPort.ErrorReceived event is a standard mistake so you just don't see those overflows, all you see is missing data.
Writing this code in C++ is very unlikely to bring relieve.  There's only one api for serial ports, SerialPort is just a thin wrapper and uses the winapi functions like your C++ code would.
So take all of the following steps:

Implement the ErrorReceived event so you know that overflows occur
Favor using the DataReceived event so you don't depend on calling Read() frequently enough
Set the ReadBufferSize to a nice big number so the driver can take up the slack
Set the Handshake property so the driver can tell the device to stop sending when the buffer is full
Check if you can implement a protocol so the device doesn't just fire-hose the machine
Lower the baud rate if it still isn't reliable enough.

Timeouts in C# serial port


Sci-fi series about a parallel world peopled by lizard men, the portal of which was discovered by an alcoholic in his apartment?

Question: My sister owned a series of maybe 3 -4 books, written in the 80's, maybe?  It starts out that a middle-aged alcoholic meets a startled lizard guy in his seedy apartment - the lizard guy accidentally opened a portal between their worlds?  The guy is taken to their world, sobered up and ... my memory fails me after this.  There were names with lots of S's - like Jassa?  Jurssa?  Tessa?  Does this ring a bell with anyone?  It's been driving me crazy for years trying to remember, and track the series down!  Any help would be SO appreciated!  Thanks!!!
Comment: Super Mario Brothers?
Answer: Ward Hawkins's Red Flame Burning is one of the titles in the Guss series. This is a summary of the book:

Harry Borg is an aging alcoholic who is waiting for death when one day a nail appears in the middle of his apartment sticking out of an invisible wall. When the hole caused by the nail is enlarged (from the other side)a nice guy named Guss pops in. Guss is a reptilian humanoid
  who seems to find Harry VERY interesting. One day Harry wakes up to find he is now young, handsome and about to go on an adventure that is out of this world. It seems Guss's people need help. While they are very advanced they have been fighting a war for thousands of years and are starting to lose it. They figure the aggressive human's courage and strengths can help them win it. But what happens when the Hero finds out that some of his 'Allies' look at him like we would look at a good T-bone steak? Lizard-people with flying cars, giant bugs used as guard dogs and Grade "A" humans that go great with barbecue sauce, what more could you ask for in a sci-fi book?

It was followed by Sword of Fire, Blaze of Wrath, and Torch of Fear.
Comment: none of which was mentioned in your answer.  Someone else had to add it.
Comment: Can you please explain why you think this is the series in question?
Comment: Well lets see - 1.  It about an aged alcoholic   2. He goes through to another world with lizard man.  3 the lizards are named Tessa.   Besides that I see nothing in common.  Have fun here folks I'm out......................
Comment: It looks like the summary might have come from the Amazon page, but the same one is repeated word-for-word on other pages as well.
Answer: At the Narrow Passage by Richard Meredith?
Comment: In general, if you get downvoted on a suggestion, it's because you don't provide any details as to why the book would match. Looking at the summaries I can find of "At the Narrow Passage", the only matching elements I can find are that there are lizards and it's a trilogy. Can you provide other reasons this might match up?
Comment: Hmm, I wonder are we going to be a community that welcomes in-put or one that discourages it.


Magento 2.4.1: Can elasticsearch be installed post upgrading to Magento 2.4.1?

Question: Upgrade to Magento 2.4.1 from 2.3.1 was successful. However, I find the following error message on running upgrade command. If one can enable/install elasticsearch as search engine now, please guide me as to what needs to be done.
Answer: If you don't have access to your admin dashboard post upgrading, you can use the CLI to set it up using
php bin/magento config:set catalog/search/engine 'elasticsearch7'

Instead of elasticsearch7 you might use elasticsearch5, or elasticsearch6 depending on your current version of elasticsearch. Hope it helps!
Answer: Please try choosing the Search engine as elasticsearch in Magento Admin. Hope it helps.
Answer: Please refer to the official documentation for troubleshooting this error, as your installation might be in an inconsistent state.
Please also be careful that in Magento 2.4.x, you no longer have support for Elasticsearch 5.x or 6.x, so running any CLI commands that refer those engines won't help you. The correct version is Elasticsearch 7.x (you should know that Magento 2.4.x was tested with Elasticsearch 7.6.x only, in case you choose another 7.x version).
Once you followed the steps from the official documentation mentioned above you should have correct access to the admin so you can setup the search engine.
But, if you need the CLI commands succession to enable the search engine, it's something like this:
php bin/magento config:set catalog/search/engine elasticsearch7
php bin/magento config:set catalog/search/elasticsearch7_server_hostname <elasticsearch_hostname>
php bin/magento config:set catalog/search/elasticsearch7_server_port <elasticsearch_port>

Please make sure you are replacing the hostname and port placeholders with your actual connection to Elasticsearch data.


Would "Fräulein" be offensive to use towards young girls?

Question: I've read that "Fräulein" is offensive to use towards women because it's a diminutive, and that "Frau" is better to use for women, but would "Fräulein" be considered acceptable for young girls, since they're basically young women, or would it be taboo for girls too?
Comment: @DavidVogt, it is quite possible that the question was asked after reading that other question and in particular its horrible accepted answer.
Answer: Answers to this can only be largely opinion-based, so this is only my perspective, I think "Fräulein" or, better, "junges Fräulein" is still fine as a half-funny old-fashioned sounding address for a child. However, the term is a bit loaded, and some more feminist parents might not like it. Children might not even know the word.
An easy way to circumvent trouble would be to just use "junge Dame" instead.
What I wouldn't do at all is call a child "Fräulein Mayer" or "Fräulein Laura" or something like that. This kind of address has been dead for decades and won't come back. I would also not use "Fräulein" to address a teenager or anyone older that that.
Just to stress this once again, there is no broad consensus about any of this.
Answer: Using "Fräulein" to address a young girl (I'd say up to around 10 years old) does not carry the same generally offensive connotations to me that it would it used for women or older girls. However, it is not common usage. If your interest is for personal use in interpersonal communication, I would recommend against it.
There are two contemporary scenarios I can picture where using "Fräulein" does not feel out of place to me: One is as part of a verbal scolding, similar to how some parents would use the full name of a child (as opposed to a nick name) to indicate that they are serious and annoyed. The other would be by a butler or waitstaff in a highclass restaurant, who emphasize their class by using antiquated language. Here, however, "junge Dame" would work equally well.


What does java.lang.Thread.interrupt() do?

Question: Could you explain what java.lang.Thread.interrupt() does when invoked?
Comment: http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#interrupt%28%29
Comment: http://www.javaspecialists.co.za/archive/Issue056.html
Answer: Thread.interrupt() sets the interrupted status/flag of the target thread.  Then code running in that target thread MAY poll the interrupted status and handle it appropriately.  Some methods that block such as Object.wait() may consume the interrupted status immediately and throw an appropriate exception (usually InterruptedException)
Interruption in Java is not pre-emptive.  Put another way both threads have to cooperate in order to process the interrupt properly.  If the target thread does not poll the interrupted status the interrupt is effectively ignored.
Polling occurs via the Thread.interrupted() method which returns the current thread's interrupted status AND clears that interrupt flag.  Usually the thread might then do something such as throw InterruptedException.
EDIT (from Thilo comments):  Some API methods have built in interrupt handling.  Of the top of my head this includes.

Object.wait(), Thread.sleep(), and Thread.join()
Most java.util.concurrent structures
Java NIO (but not java.io) and it does NOT use InterruptedException, instead using ClosedByInterruptException.

EDIT (from @thomas-pornin's answer to exactly same question for completeness)
Thread interruption is a gentle way to nudge a thread. It is used to give threads a chance to exit cleanly, as opposed to Thread.stop() that is more like shooting the thread with an assault rifle.
Comment: Note that methods like sleep or wait do this kind of polling and throw InterruptedException by themselves.
Comment: if you're mentioning Thread.interrupted, seems like it should be mentioned that there is also a Thread.isInterrupted flag as well, which does not clear the flag, which makes it usually more appropriate for use by application developers.
Comment: If you're using interruptible file I/O, the effect will not be that gentle. You'll typically get file corruption.
Comment: Why method interrupt() won't interrupt the thread immediately even its not on wait or sleep status. Any purposes for this design?
Answer: What is interrupt ?

An interrupt is an indication to a
  thread that it should stop what it is
  doing and do something else. It's up
  to the programmer to decide exactly
  how a thread responds to an interrupt,
  but it is very common for the thread
  to terminate.

How is it implemented ?

The interrupt mechanism is implemented
  using an internal flag known as the
  interrupt status. Invoking
  Thread.interrupt sets this flag. When
  a thread checks for an interrupt by
  invoking the static method
  Thread.interrupted, interrupt status
  is cleared. The non-static
  Thread.isInterrupted, which is used by
  one thread to query the interrupt
  status of another, does not change the
  interrupt status flag.

Quote from Thread.interrupt() API:

Interrupts this thread. First the
  checkAccess method of this thread is
  invoked, which may cause a
  SecurityException to be thrown.
If this thread is blocked in an
  invocation of the wait(), wait(long),
  or wait(long, int) methods of the
  Object class, or of the join(),
  join(long), join(long, int),
  sleep(long), or sleep(long, int),
  methods of this class, then its
  interrupt status will be cleared and
  it will receive an
  InterruptedException.
If this thread is blocked in an I/O
  operation upon an interruptible
  channel then the channel will be
  closed, the thread's interrupt status
  will be set, and the thread will
  receive a ClosedByInterruptException.
If this thread is blocked in a
  Selector then the thread's interrupt
  status will be set and it will return
  immediately from the selection
  operation, possibly with a non-zero
  value, just as if the selector's
  wakeup method were invoked.
If none of the previous conditions
  hold then this thread's interrupt
  status will be set.

Check this out for complete understanding about same :
http://download.oracle.com/javase/tutorial/essential/concurrency/interrupt.html
Comment: This is obey a partial explanation. It also interrupts interruptible methods.
Comment: @EJP This question is about , what is Thread.interrupt() method and how does it work. I think whatever ans I have posted with link, answers what is asked. I still don't understand what you wish for ?
Comment: I wish you to correct your partially incorrect statement that it is implemented by a flag. That's only part of the story. It seems quite clear to me.
Comment: @EJP Thanks. Now I understand what you were saying. I have updated my answer and added API doc for method. This covers interruptible methods part which was missing from my answer. Hope my answer looks complete now :).
Answer: If the targeted thread has been waiting (by calling wait(), or some other related methods that essentially do the same thing, such as sleep()), it will be interrupted, meaning that it stops waiting for what it was waiting for and receives an InterruptedException instead.
It is completely up to the thread itself (the code that called wait()) to decide what to do in this situation. It does not automatically terminate the thread.
It is sometimes used in combination with a termination flag. When interrupted, the thread could check this flag, and then shut itself down. But again, this is just a convention.
Comment: 9 years old, ageless answer! +1
Answer: For completeness, in addition to the other answers, if the thread is interrupted before it blocks on Object.wait(..) or Thread.sleep(..) etc., this is equivalent to it being interrupted immediately upon blocking on that method, as the following example shows.
public class InterruptTest {
    public static void main(String[] args) {

        Thread.currentThread().interrupt();

        printInterrupted(1);

        Object o = new Object();
        try {
            synchronized (o) {
                printInterrupted(2);
                System.out.printf("A Time %d\n", System.currentTimeMillis());
                o.wait(100);
                System.out.printf("B Time %d\n", System.currentTimeMillis());
            }
        } catch (InterruptedException ie) {
            System.out.printf("WAS interrupted\n");
        }
        System.out.printf("C Time %d\n", System.currentTimeMillis());

        printInterrupted(3);

        Thread.currentThread().interrupt();

        printInterrupted(4);

        try {
            System.out.printf("D Time %d\n", System.currentTimeMillis());
            Thread.sleep(100);
            System.out.printf("E Time %d\n", System.currentTimeMillis());
        } catch (InterruptedException ie) {
            System.out.printf("WAS interrupted\n");
        }
        System.out.printf("F Time %d\n", System.currentTimeMillis());

        printInterrupted(5);

        try {
            System.out.printf("G Time %d\n", System.currentTimeMillis());
            Thread.sleep(100);
            System.out.printf("H Time %d\n", System.currentTimeMillis());
        } catch (InterruptedException ie) {
            System.out.printf("WAS interrupted\n");
        }
        System.out.printf("I Time %d\n", System.currentTimeMillis());

    }
    static void printInterrupted(int n) {
        System.out.printf("(%d) Am I interrupted? %s\n", n,
                Thread.currentThread().isInterrupted() ? "Yes" : "No");
    }
}

Output:
$ javac InterruptTest.java

$ java -classpath "." InterruptTest
(1) Am I interrupted? Yes
(2) Am I interrupted? Yes
A Time 1399207408543
WAS interrupted
C Time 1399207408543
(3) Am I interrupted? No
(4) Am I interrupted? Yes
D Time 1399207408544
WAS interrupted
F Time 1399207408544
(5) Am I interrupted? No
G Time 1399207408545
H Time 1399207408668
I Time 1399207408669

Implication: if you loop like the following, and the interrupt occurs at the exact moment when control has left Thread.sleep(..) and is going around the loop, the exception is still going to occur. So it is perfectly safe to rely on the InterruptedException being reliably thrown after the thread has been interrupted:
while (true) {
    try {
        Thread.sleep(10);
    } catch (InterruptedException ie) {
        break;
    }
}

Answer: Thread interruption is based on flag interrupt status.
For every thread default value of interrupt status is set to false.
Whenever interrupt() method is called on thread, interrupt status is set to true.

If interrupt status = true (interrupt() already called on thread),
that particular thread cannot go to sleep. If sleep is called on that thread interrupted exception is thrown. After throwing exception again flag is set to false.
If thread is already sleeping and interrupt() is called, thread will come out of sleeping state and throw interrupted Exception.
Answer: Thread.interrupt() sets the interrupted status/flag of the target thread to true which when checked using Thread.interrupted() can help in stopping the endless thread. Refer http://www.yegor256.com/2015/10/20/interrupted-exception.html
Answer: An interrupt is an indication to a thread that it should stop what it is doing and do something else. It's up to the programmer to decide exactly how a thread responds to an interrupt, but it is very common for the thread to terminate.
A very good referance: https://docs.oracle.com/javase/tutorial/essential/concurrency/interrupt.html
Answer: Thread.interrupt() method sets internal 'interrupt status' flag. Usually that flag is checked by Thread.interrupted() method.
By convention, any method that exists via InterruptedException have to clear interrupt status flag.
Comment: Yes, I do have - https://docs.oracle.com/javase/tutorial/essential/concurrency/interrupt.html
Comment: Do you have a link supporting the "convention"?
Answer: I want to add one or two things to the above answers.

One thing to remember is that, calling on the interrupt method does not always cause InterruptedException. So, the implementing code should periodically check for the interrupt status and take appropriate actions.

Thread.currentThread().isInterrupted() can also be used to check the interrupt status of a thread. Unlike the Thread.interrupted() method, it does not clear the interrupt status.


Published Google Docs spreadsheet: one data set with 3 sheets each sorted differently

Question: Is it possible on a published Google Docs spreadsheet to have 3 individual sheets, each sorted differently from the common data, and only update the common data?
Comment: Can you share a google spreadsheet with us?
Answer: Let the raw data be in the first sheet. Then, use the QUERY function to populate the second and the third sheet.
Or, if you need more control, create another sheet for the raw data, and use the QUERY function to populate the first sheet also.
Comment: This led me in the right direction. End result is:  =sort('Ship Manifest Index'!A3:Q1057,4,true)


How many types of accounts are available in quorum

Question: In Ethereum two types of accounts are there.EOA and contract account.Does quorum run in samy way that means it is similar like ethereum.
Answer: Just like Ethereum, Quorum also only has two types of accounts. Basically it's a geth fork with the following enhancements:

Privacy - Quorum supports private transactions and private contracts
  through public/private state separation and utilising Constellation, a
  peer-to-peer encrypted message exchange for directed transfer of
  private data to network participants
Alternative Consensus Mechanisms
  - with no need for POW/POS in a permissioned network, Quorum instead offers multiple consensus mechanisms that are more appropriate for
  consortium chains
Peer Permissioning - node/peer permissioning using
  smart contracts, ensuring only known parties can join the network
Higher Performance - Quorum offers significantly higher performance
  than public geth

They have a very good documentation in their github project.
https://github.com/jpmorganchase/quorum


Whatsapp For Nokia X

Question: I wanted to know that how can I acquire Whatsapp for my Nokia X. My family and friends are both on Whatsapp and it causes a communication gap between me and them if I don't have it. I want to keep this mobile phone for a  I open to all suggestions on how to acquire it
Comment: Not sure who voted to close, but it's a legitimate concern, since Nokia's Android phones do not have access to the Google Play Store.
Answer: Since your Nokia X doesn't have access to the Google Play Store, you will need to download and install Whatsapp manually.

Enable side-loading of apps on your Nokia X by navigating to Settings -> Security and enable the Unknown Sources option.
Download the Watsapp APK directly from their site to your computer.
Transfer the apk file you downloaded onto your Nokia X by connecting it via USB cable and using a file manager, send it via Bluetooth, or copy it to an microSD card and insert it into the phone.
Run the pre-installed ASTRO file manager and locate the file using the search option.
Tap the file to run it, which will start the installation process.
Follow the on-screen instructions to complete the installation.
Important step: Modify your phone's date to (or just prior) 2nd of August of 2014 (don't worry you will change it back to the preset date afterwards.)
Launch Whatsapp like any other installed app on your Nokia X phone, and complete the initial set-up.
At this point you will most likely get a message saying that this application is "not supported" on your phone.
Exit WhatsApp when it says that your device is not supported back to the homescreen.
Uninstall the official Whatsapp application by long-tapping on the WhatsApp icon and tapping on the red cross.
Now download WhatsApp Plus from here and install it using the same method as the official app (steps 3 through 6 of this guide.)
Open Whatsapp Plus app and go through configuration steps. Make sure to use the same phone number as you used in the original WhatsApp, otherwise it will not work.
You can now revert the system's date back to the present date and still enjoy WhatsApp.

You can now use Whatsapp plus to connect to your Whatsapp contacts.
Sources: 1, 2.
Answer: Now, it is available for download from the default Store app in Nokia X. The Nokia  Store was replaced by Opera Store earlier, however, the store contains limited apps. A third party app store like 1Mobile Market can help finding more apps.

Whatsapp For Nokia X


Effects of gravitational waves on light

Question: My understanding is that light is curved by curvature in space-time lattice (that's why it can't escape a black hole, it is just too curved: I may be wrong). So how is light influenced by gravitational waves? Does it cause some kind of change in direction or frequency of the light, or anything else? Anything we can predict and then observe (even with very precise instruments)? Does anyone bothered with that problem?
Comment: See the answers in the duplicate, particularly the last one. Gravitational waves affect the spacetime, so affect the path taken by light. That was used by LIGO to detect gravitational waves, by changing the interference patterns of two perpendicular light beams.
Comment: Possible duplicate: http://physics.stackexchange.com/q/238226/2451
Answer: Light is a wave of particles.
 When gravity is very very strong(as in the case of a black hole) these particles are attracted towards the very center of the gravitational force(in the black hole case, towards the singularity).
  Feel free to correct the answer,thnx!

Effects of gravitational waves on light


What constitutes the "state" of a tree?

Question: If a tree were to be cut down and turned into a couple of wooden logs, informally one can say referring to the logs that the logs are the current state of the tree. But how true is this ? Shouldn't there be some form of "tree-ness" left in something in order to call it a tree in the first place and then specify its state ? In normal discourse we always seem to do this to objects after performing actions on them which destroys almost all of its defining features. Another example is, say we start destroying the earth with nuclear bombs, if there is a tiny bit of anything left we immediately refer to it as the current state of the planet, but if there's a bunch of gas particles thats all there is left, how right is it to say that is the current state of the planet even though there is no form of a planet in actual existence. So in effect, are we describing the state of a planet or the state of an object that was once a planet?
Answer: The question mixes two different problems:
a) The scope of any concept: when does a tree becomes a set of logs? This might depend on what percentage of the tree that has been cut, and that is subjective. No rule will say "as soon as 50% of the tree is separated, it is not anymore a tree but a set of logs". The definition of objects is subjective. If you say that a male is either a child or an adult, which is the exact moment when it transitions from one to another? It's subjective.
b) The concept of state: A state is normally an impression, almost independent of time. For example, your memory of a river, that's an state. The river as such does not exist anymore, but an state of it is part of your memory. A picture of the river is also a register of the state of the river. States are also subjective.
Mixing both, given that a lot of Aristotle's body molecules are now in my body, should you call me the current state of Aristotle? Don't think so, but that's subjective. You can say I am the current state of Aristotle, or that I am the state of what once was Aristotle. Language is just another resource allowing improving our existence.
Comment: @RuldolfoAP thank you !
Comment: by an impression, you mean an impression in the mind of the observer ? And could you say how such an impression is independent of time. Whenever I think of the state of something, i immediately associate it with the progress of a process it is in, for example a person who is recovering from an illness we say he is in a state of recovery and we can ask what his current state is by which is meant how "far" has he recovered/become normal. "State of flowing", "state of recovery" all seem to be dynamic states.
Comment: a) Yes, the impression in the mind of the observer. b) Precisely: I've wrote "almost independent of time". A state implies no change (hence the form "static"), and that implies no time involved. If you describe something as in a "changing state", the state is independent of time, while the change itself is dependent on time. That is equivalent to take a (static) picture of a switch in the "change" position, what you call "dynamic state".
Answer: Words can have intensional it extensional meanings. See https://en.m.wikipedia.org/wiki/Extensional_and_intensional_definitions
In science and engineering, it is more useful to have explicit definitions, such as what a square is. Then whether a transformation destroys a thing because the result does not satisfy the definition anymore is clear.
However in less formal contexts, it is common for natural language to assign meaning to words by example. This shifts over time as word usage in society changes, and can also differ between groups. So there are no formal rules there, and the word "tree" in common usage applies to so many objects that the concept of family resemblance applies https://en.m.wikipedia.org/wiki/Family_resemblance. Meaning many things can be called trees without any set of properties being common to all the things called trees.
Also the question touches upon the topic of identity over time, such as the ship of Theseus paradox https://en.m.wikipedia.org/wiki/Ship_of_Theseus which indicates that it is not possible to bind an identity to parts constituting a larger thing in a way that satisfies us in all situations.
All this to say: yes, if we call something X and make changes to it, calling the new configuration of us part still X does depends on various things, which can be "Xness". But it's not straightforward and two people may reasonably disagree on what they consider "Xness" for any such X, unless a formal framework like Maths is applied.
Comment: Thank You ! In short Xness is generally subjective unless explicitly defined

What constitutes the "state" of a tree?


I have a disc, and I'm wondering if I can get it on Steam

Question: I have Portal 2, it's the disc, for the Xbox 360. I was wondering if I could install the game on Steam using that disc. It's hard to play on the Xbox sometimes, and the computer controls are much better. I've tried multiple ways, such as doing the "C:\Program Files (x86)\Steam\Steam.exe" -install E:. There seems to be no other ways, I've looked everywhere, and... yeah. If anyone can help me, thanks in advance!
Comment: Uhm. You can't. Xbox is not the same as PC.
Answer: No, Xbox 360 discs cannot be installed on a PC. If you'd like to play Portal 2 on PC, you would need to buy a separate Steam copy.
Answer: The Xbox 360 is a different operating system from Windows, Mac, and Linux. You cannot install software intended for one OS onto a system with a different OS. They are too different. That is why different versions of games are released for multiple platforms (For instance, a game could be release on PC, Mac, Xbox 360, Xbox One, and PS4!)
Because of this, you are basically stuck rebuying the game on the proper system if you want to switch platforms.
Portal 2 is $19.99 on Steam and most other outlets right now.
Historically, Portal 2 has gone on sale very often, and has gone as low as $4.99. If I were you I would wait and monitor for sales.
isthereanydeal.com will help you monitor for price drops on games. The link I've supplied is for the Portal 2 section where you can hit "Wait for a better price" and define exactly what price you'd like to be notified at. You will receive an email when that price condition is satisfied. That way you can make sure you get Portal 2 for whatever you think is fair for a second copy.
Good luck!


what is contained in a public key certificate

Question: Public key certificate is a digitally signed document which verifies the sender is indeed the person. May I know how can the receiver tell the sender is indeed the person solely based on information on the public key certificate? What are contained in the certificate? Does a public key certificate contain the same information as in any certificate?
Comment: For specific certificates, you can use `openssl asn1parse` or an [online JavaScript decoder](http://lapo.it/asn1js/)
Answer: You actually don't trust the certificate by itself. A certificate is like a diploma that a company (or a domain, e.g. www.crypto.com) obtained from some trusted party, called CA, or Certificate Authority. This diploma states that www.crypto.com is allowed to communicate with you using the public key written in the diploma.
But, as you mentioned, www.crypto.com could generate that diploma to itself, then why should you believe them that the public key written in that diploma is realy theirs and not belongs to some man-in-the-middle attacker?
Here comes the signature part in the diploma. The CA attaches to that diploma a digital signature on www.crypto.com's public key, and you, as their client, verify that indeed, the signature is valid (you do so by applying the CA's verification key on the signature). By definition, nobody can forge that signature and trick you, i.e. to make a valid CA's signature on a fake www.crypto.com's public key.
A crucial key point here is that there exists a 'chain of trust', i.e. you'll believe www.crypto.com only if some CA that you trust tells you to believe it. By default, every browser (and operating systems) is bundled with a list of trusted CAs.
Answer: What Bush said. For your device to actually verify the certificate it does indeed need to know the actual cryptographic algorithms that the certificate uses. It needs to use them on your end to do the math and verify with the issuer's (CA) root certificates that the certificate is valid. As stated above these root certificates are usually included with OSes/browsers/other applications.
Additionially, a web browser will often allow you to view the details of the certificate, for you as a human to  verify that you trust the CA and any certificates that they issue in the chain of trust. Along with this the details of the algorithms used are also usually included, so you can make a judgement call as to whether you trust the algorithms and bit lengths used.
Comment: Assuming X.509 certs (since most people don't know about any others) the signature scheme is required to be stored in the cert -- actually in two places (the beginning of TBS, and between TBS and sig) because decades ago when PKC was new there was fear of algorithm substitution attacks, which AFAIK have not proved out. Some versions of Windows *display* Signature Algorithm and Signature Hash Algorithm separately, but they are both derived from a single OID value in the cert.
Comment: So can I say that the Signature Algorithm and Signature Hash Algorithm are the cryptosystems generate the public key certificate?


Videos in image gallery of E commerce app

Question: Do you think users find videos more relevant than images in product image gallery of an ecommerce app and videos should be the first thing users should be seeing on landing on the product page of any product rather than a product image?
Answer: Here are my opinion.
I learned few important things while using videos for ecommerce website specially fashion centric website like Myntra.com / amazon.in .

Videos are becoming very important aspect which results live feeling for the product.
Since, use of videos requires good internet data bandwidth for better visibility, one can use GIFs appropriately for same purpose.
For same reason as Point 2, videos should not be the thumbnail for the product. However, you can/must use light GIFs when user hovers over the product. This can applied to any e-commerce website. Same applied to product landing page. First thing should be image and next should be video in carousal.
Use of img tag inside video is a good option in case of issues in loading videos.

Thanks.


Why do only women need a wali for nikah?

Question: If the Quran states that believers are equal, whether men or women, why does only a woman need a wali to get married?
Comment: @Medi1Saif Is "marry" in those verses to be read as "marry off", as in, "marry off the unmarried among you...", which would mean "give away in marriage the unmarried among you..."? The way it is translated, it seems more direct to read it as "these are the groups from which you should choose your spouses", not "if you are in charge of one of these, make sure you give their hand in marriage to someone proper".
Comment: Salam and welcome to Islam SE the Q&A site about Islam. I strongly recommend you to take our [tour] and check our [help] to make yourself familiar with our site and model.
Comment: What is the basis of your claim to set men and women equal in the Quran? The verses of the Quran such as (2:221) "And do not marry polytheistic women until they believe."  (2:232) "do not prevent them from remarrying their [former] husbands", (24:32) "And marry the unmarried among you and the righteous among your male slaves and female slaves." already imply the accordance of a third party (the guardian or wali) for marriage.
Comment: @G.Bach at least (2:232) and (24:32) is emphasizing my claim. The first is clearly indicating that the former spouses need the agreement of a third party to remarry after divorce. The verse from surat an-Nur is an order addressed at the wali, meaning marry (give them the agreement to get married) them. Those verses were quoted as the evidences of imam a-Shafi'i and Malik from the Quran for the necessity of the guardian.
Answer: The Qur'an in several verses clearly quote the necessity of a third party which gives permission for marriage, which is the wali:

...  And do not marry polytheistic men [to your women] until they believe. ...(2:221)

which is an order to the guardian of a lady not to give permission to marriage between her and a disbeliever! In my comment I've posted the wrong part of the verse, but after consulting the tafsir of imam al-Qurtobi. Note that al-Qurtobi added that in all the verses the Quran (or Allah) has addressed only males (by using the masculine form) to order or prohibit them to give permission for a marriage of the women (girls) they are in charge of!
Here the tafsir part explaining the senetence translated "And do not marry"

ولا تُنْكِحُوا أي لا تزوجوا المسلمة من المشرك

(My own translation take it with the necessary care)

And do not marry means don't give in marriage a Muslim women to a pagan (man)

Note that the verb nakaha نكح here is in passive form (تُنْكِحُوا instead of the active form تَنْكِحُوا) which implies the agreement of a third person to give the permission of marriage!

And when you divorce women and they have fulfilled their term, do not prevent them from remarrying their [former] husbands if they agree among themselves on an acceptable basis. ... (2:232)

After divorce the guardian is asked here not to hinder the former spouses to remarry if they both want to get back together!

...So marry them with the permission of their people and give them their due compensation according to what is acceptable. ... (4:25)

This verse is clearly saying that a permission is needed from the guardian of the woman!

And marry the unmarried among you and the righteous among your male slaves and female slaves. ... (24:32)

Here also the owner of the slaves or their guardian is ordered to give them permission to get married.
In the Quran you may also find a clear example of a wali (a father) marrying his daughter in the story about the encounter of Musa () and the people of Median (the prophet Sho'aib):

He said, "Indeed, I wish to wed you one of these, my two daughters, on [the condition] that you serve me for eight years; but if you complete ten, it will be [as a favor] from you. And I do not wish to put you in difficulty. You will find me, if Allah wills, from among the righteous." (28:27)

so if one is a Muslim and believes that the Qur'an is the word of Allah, one has to obey and accept this that's why this fact is (and was) never questioned!
Beside those evidences you may find enough other evidences in the Prophetic traditions.

The hanafi school of fiqh however differs a bit as it allows a former married woman to decide herself without the necessity of a wali based on this sahih hadith giving the previously married woman more rights to her person.
Comment: Maybe adding the opinion of the hanafi madhhab would be nice.
Comment: @Kilise that needs to be checked!
Comment: I also thought (I might be wrong), that it wasn't necessary limited to a previously married woman in the hanafi fiqh:  "Imam Abu Hanifa maintained that it is not obligatory for a sane, adult woman to have a guardian. Based on this, she is entitled to conduct her own marriage contract whether she was previously married or a virgin and restricted the wilaya exclusively to prepubescent females." See: http://www.dar-alifta.org/Foreign/ViewFatwa.aspx?ID=6018


Fast rising voltage on lead acid battery while charging

Question: I have a couple of 12V sealed lead-acid batteries, which I have to charge. But when I hook one of them on the charger at 12V/1A (the battery is 10Ah) the voltage from 12.6 drastically increases up to 14V in 5-10 seconds. I tried hooking it up at 0.4A charge current. But it's no use, the battery just raises its voltage to the max. The battery is surely not ok, but what is the case here?
Comment: The cars I have worked on charged at 14.4V.... what behaviour were you expecting?
Comment: The cars you have worked on charge at "up to" 14.4 when the battery is partially charged and the charging current is 40A. At 0.4A (C25) into a dead-flat battery, 14V probably indicates battery failure.
Answer: Sealed Lead-Acid batteries are usually arranged so that they only have just enough electrolyte (dilute sulfuric acid) to operate (this is often referred to as starved electrolyte).  This allows the battery to operate in any position, even up-side down.  Normal car batteries have much more liquid (flooded cells) and can spill if inverted.
If sealed electrolyte batteries are left for a long time to completely discharge all of the sulphate ions in the electrolyte will combine with the lead plates to form lead-sulphate so that the electrolyte changes into just water.
Pure water does not conduct electricity very well so that when you attempt to charge the battery the voltage will rise very rapidly and the battery will not charge.
This state is often called "sulfation" where the plates contain lead-sulphate that cannot be easily converted back to lead or lead dioxide as normally happens during charging.
Sometimes a small current will flow and the battery will eventually charge (days or weeks) but almost certainly the battery will never regain its original capacity. I have never succeeded in recovering a battery in this state.
Answer: The battery is most likely sulfated.  You can try leaving it sit at the equalize voltage (15.0V for a 12V gel-cell battery) but it probably won't bring it back to life.
You can try searching out DIY de-sulfater circuits on the web - maybe they will help, maybe they won't.


where are MySQL password hashes and databases stored

Question: In what file does mysql store the password hashes and the databases on a linux system? I know that mysql users/hashes are stored in mysql.user, but what file is that? What are the default permissions for that file? Also in which file are the other databases stored?
Answer: The password hashes are stored in the user table of the mysql database.  The table files themselves are typically stored in a tree structure under /var/lib/mysql, but that location can be modified by build options or run-time configuration.
Answer: In debian based distros, that would be /var/lib/mysql/mysql/user.MYD.
In other linux flavors, I'm not sure but you can see where your data dir is by running
mysql> show global variables like 'datadir';
+---------------+------------------------+
| Variable_name | Value                  |
+---------------+------------------------+
| datadir       | /usr/local/mysql/data/ |
+---------------+------------------------+
1 row in set (0.00 sec)


Does the GPF rating apply to the toilet tank or the bowl

Question: I bought a Toto Drake 2 piece toilet that is described on Amazon as being 1.6 GPF.  When the tank and bowl arrived in separate boxes, the bowl had some shattered ceramic.  I am trying to make sure I re-ordered the correct bowl.  I noticed the  bowl's packing slip showed it was rated 1.28 GPF.  Upon contacting the seller, the seller said that the 1.6 GPG in the Amazon description was just for the tank, not the bowl, even though there is no mention that the 1.6 is just for the tank.  He said that the 1.6 GPF tank goes with the 1.28 GPF bowl.  Does this make sense?  Could a 1.28 bowl restrict the flow of a 1.6 tank?
Comment: Why are you faced with ordering a replacement anyway if it was damaged in shipping? It's the seller's responsibility to pack and ship and to replace what didn't survive shipping due to inadequate packing or poor handling in shipping. It may be the shippers responsibility to reimburse the seller for that, but in no case should it be your problem...
Answer: Any extra water that leaves the tank will just go down the toilet as extra water, so no worries there.  If you're concerned about the extra water, you could always either lower the tank fill level, or put a brick or something else dense and non-porus in the tank to take up some of the space the water would use.
Answer: The GPF rating applies to neither the tank or bowl. It refers to the amount of water that flows from the fill valve when the toilet has executed a single flush cycle.
The seller is just passing malodorous gas.
The GPF applies to the fixture as a whole.
Answer: Toilets are a complete system, particularly the low-flush units. So I'd have to suspect your seller is selling random parts (pulled from the defective bin?) rather than complete toilets, cue "shady selling practices on Amazon" theme music. Contact Toto for the definitive answer to that question rather than your seller, who is very likely not an authorized dealer, which is another question you can ask them. Has global trade dipped to the level of counterfeit "high end" toilets? Quite possibly.
The 1.28 won't "restrict" the 1.6 tank, but the 1.6 tank may not operate the 1.28 bowl correctly as its matching tank would, even though it's dumping in more water. The subtle engineering differences that make todays low-flush toilets actually work as opposed to the crudely retrofit 5 gallon per-flush toilets made into 3 gallon per flush water-savers that often required two water-saving 3 gallon flushes to flush (thus using an extra gallon) are not obvious to the casual user, but may be important to the toilet working as designed.
i.e. my 1.28 has a tank both taller and narrower than "old-fangled" toilets, so it uses less water, but the flush has more pressure from the taller tank.


Is it possible to have a clear clean up of Windows XP without formatting the drive?

Question: I want to install a fresh Windows 7 but I don't want totally format the current drive with Windows XP since there are many other files but I don't have that many free space to move the stuff out. Is there a way to clean up the windows XP without formatting the drive?
Answer: It's not possible to do an upgrade installation from Windows XP to Windows 7, so formatting the drive and doing a clean install is actually necessary in your case, unfortunately.
What I would recommend is backing up any important files to a flash drive or portable hard drive, then install Windows 7 using a Custom Install option. You can follow the steps using Microsoft's guide here.
Answer: I suggest you to use the cloud services like SkyDrive (7GB Free) or Google Drive (15GB Free) or any of many others to save your files on.
Then format everything, make a clean install and download your files back to your PC
Notice:
Save only your personal files and/or folders. Do not save programs and system data on cloud drives, as they will not work on a re-installed system.


Free Basic compiler installed on Ubuntu 14.04 can't find x11 libraries

Question: When compiling a Free Basic program that uses graphics related statements, such as Screen or Pset, the compiler cannot find the x11 libraries. The following errors are presented. The program plot.bas simply has a sceen statment to change the mode to a graphics mode.  Does not matter which mode is requested.
<code>ken@ken-desktop:~/freebasic$ fbc plot.bas
ld: cannot find -lX11
ld: cannot find -lXext
ld: cannot find -lXpm
ld: cannot find -lXrandr
ld: cannot find -lXrender
</code>
I've looked at the Free Basic forums and all recommend making sure that the libx11-dev package is properly installed.  This has been done using the Ubuntu Software Center. I still have the same problem. Does anyone have any insight into this?
Comment: Are you running on a 64-bit platform? How exactly did you install freebasic? I suspect the default pre-built binaries appear require 32-bit versions of the libs
Answer: You might need other x11 dev packages too. libxext-dev, libxpm-dev, libxrandr-dev, libxrender, but maybe not if your compiles were OK.
Now the complaint of not finding -lX11 is odd since that should be in in the libx11-dev, but maybe the .so is just a link to the actual library in package libx11-6.  In that case, all the other dev packages will need the matching library package too: libxext6, libxpm4, libxrandr2, libxrender1
Use apt-file search libxrandr.so  etc. to find the packages needed.