Why does the Bible talk only about the people of Israel?

Question: I am reading the Bible through these days, and I can say that I am a little surprised. I think God wants all the people, and that is why we are created. I don't understand why the Bible talks only about Israel, only about its people and its kingdom. In the Exodus, it is said that God killed every first male child of the Egyptians to let the Israel go. How can this happen, of course it can't be true. Why would God hate some of His people and love without conditions the some other people?
Comment: The bible talks about only the people of Israel because the people of Israel wrote it and maintained it and wanted it so.
Comment: The Bible doesn't only talk about Israel? Read Isaiah, God wants to save all nations!
Comment: `of course it can't be true` -- why not?
Comment: Welcome to the site!  This next has nothing to do with the quality of your question, it's just standard to help new visitors avoid misunderstanding the site (as I did at first.)  As a new visitor, I'd recommend checking out the following two posts, which are meant to help newcomers "learn the ropes": [help page](http://christianity.stackexchange.com/help) and [How we are different than other sites?](http://meta.christianity.stackexchange.com/questions/1808/how-we-are-different-than-other-sites)
Comment: @Noah: your question holds at least one false premise.  The Egyptians were not "his people" at the time of the Passover, they worshipped other gods.  (Not much later, in the Book of Exodus, God points out to Moses that "there can be only one, and He is the one).  The Israelites were "his people" as recorded in the Bible, because he chose them.  Don't forget, he wiped everyone out, besides Noah and family, in the flood as written in the Bible.  The covenant with Abraham began the next relationship with his chosen people.
Comment: @KorvinStarmast This is why I am asking. There is only one God for sure, it has always been at every time. I find it hard to believe that little children were killed just because their fathers didn't want to follow God. Too mysterious.
Answer: There are several issues you bring up that need to be addressed in this question, and it is going to take a little space.
Only Israel?
You are correct in your assumption that God loves the whole world and not just Israel.  However, Israel was, indeed, specifically chosen as part of God's plan to proclaim His name throughout the world.
Here is a general summary of the Bible.

God created mankind in His own image to live in relationship with God and to fill the world with such people.  (Genesis 1-2)
Mankind rejected God's authority and thus incurred God's righteous judgment for doing so. (Genesis 3)
The rest of the Bible is the record of God reaching out to draw mankind back into a relationship with Himself and to pay the appropriate penalty that mankind incurred.

Israel was just one part of God's plan to draw all mankind back to Himself.  Israel played a vital role from about 2000 B.C. to about 33 A.D..  Although it only plays significantly for 2,000 years, it does comprise the vast majority of the Bible.
Still, God's choosing of the Jewish people was specifically to be a blessing to the entire world:

And I will make you a great nation,
And I will bless you,
And make your name great;
And so you shall be a blessing;
3 And I will bless those who bless you,
And the one who curses you I will [d]curse.
And in you all the families of the earth will be blessed."  Genesis 12:2-3 NASB

In the Jewish Temple itself, there was the Court of the Gentiles specifically designed for non-Jews to come and worship God.
Yet, God does not love Israel without condition.  Time and time again, God judged Israel for their own rebellion against Him.  Psalm 78 shows Israel's cycle of rebellion against God and God's judgment of them, and there are many instances of this.
In Numbers 21, God delivered a great victory for them, and shortly thereafter they began grumbling against God, doubting His promise and love and provision.  As a result, God brought judgment upon them.
Egypt
The Egyptians worshiped false gods of their own making who were no gods at all and actually worshiped the pharaohs themselves as gods.  Worshiping false gods often degrades into horrific practices like the offering of babies as sacrifices.  God desired to show the Egyptians that they were worshiping false gods, and He desired to draw them back into a relationship with Him.  He did this by great signs and wonders, including 10 plagues.  These 10 plagues were basically a showdown between God and the gods of the Egyptians--the god of the Nile, the god of the harvest, the god of the sky, etc., and finally the god of the line of the pharaohs.  God won the showdown, and it is important to note that the whole purpose was for the Egyptians to know who God really is.

The Egyptians shall know that I am the Lord, when I stretch out My hand on Egypt and bring out the sons of Israel from their midst.  Exodus 7:5 NASB

It is true, in fact, that God did kill every firstborn of Egypt, but this was not without warning.  God righteously judged Egypt for their rebellion against Him, but He also provided a way to escape His judgment through the offering of the Passover Lamb.  This provision was open to anyone.
God always does this.  In the days before the flood, Noah proclaimed that judgment was coming, but only his own family responded and entered God's provision for escape from judgment.
So, God does not hate people.  God loves all people and desires that all would return to Him.  The fact that God judges does not mean that He has to hate.  He upholds His own justice, but He does not hate.

The Lord is not slow about His promise, as some count slowness, but is patient toward you, not wishing for any to perish but for all to come to repentance.  2 Peter 3:9 NASB

God's Judgment and Mercy
So, God will always bring judgment, but He always offers a pardon to those who will accept it.  The penalty for rebellion against God's authority, which is really high treason, is to be separated from God.  God also has the right to take the life He has given when it is used in rebellion against Him.  However, His desire is always that people would respond to His offer of mercy.
God the Son entered into the world, being named Jesus, and took upon Himself the penalty which we ourselves deserved for our rebellion against God.  Because of this, He can righteously say that our penalty is paid and justice has been served.  This is the whole essence of Christianity.  Our penalty and debt is paid by another, if we will only accept that in faith.  If we attempt to pay off our own debt or reject His offer, then we will indeed pay the penalty for our own rebellion.
Still, many absolutely reject this offer and do not want to live in relationship with Him.  Someone put it this way... either we say to God, "Your will be done" and accept His offer of mercy, or God will say to us, "Your will be done" and give us our choice to live apart from Him.

For Christ also died for sins once for all, the just for the unjust, so that He might bring us to God, having been put to death in the flesh, but made alive in the spirit.  1 Peter 3:18 NASB
He who believes in the Son has eternal life; but he who does not obey the Son will not see life, but the wrath of God abides on him.  John 3:36 NASB

All Nations
God does, indeed, love all nations.  The baton was passed, in a sense, from the Jewish people to the Gentiles in the early days of the church.  To be sure, the first Christian missionaries were all Jewish, and there have always been Jewish believers whom God has used in mighty ways to take the message of salvation and forgiveness to all people.
The concept of all nations comes first in the first chapter of the book of Genesis:

"God blessed them; and God said to them, "Be fruitful and multiply, and fill the earth..."  Genesis 1:28a

This gets carried along with Noah:

"As for you, be fruitful and multiply; Populate the earth abundantly and multiply in it."  Genesis 9:7

We see it in Abraham's call as noted above.  It is in the Psalms as well:

All the ends of the earth will remember and turn to the Lord, And all the families of the nations will worship before You.  Psalm 22:7 NASB

It is in prophecies of the Messiah:

He says, "It is too small a thing that You should be My Servant
To raise up the tribes of Jacob and to restore the preserved ones of Israel;
I will also make You a light of the nations
So that My salvation may reach to the end of the earth."  Isaiah 49:6 NASB

It is in the Great Commission:

"Go therefore and make disciples of all the nations, baptizing them in the name of the Father and the Son and the Holy Spirit"  Matthew 28:19 NASB
"but you will receive power when the Holy Spirit has come upon you; and you shall be My witnesses both in Jerusalem, and in all Judea and Samaria, and even to the remotest part of the earth."  Acts 1:8 NASB

Finally, the prophecy is fulfilled in Revelation:

After these things I looked, and behold, a great multitude which no one could count, from every nation and all tribes and peoples and tongues, standing before the throne and before the Lamb, clothed in white robes, and palm branches were in their hands; 10 and they cry out with a loud voice, saying,  "Salvation to our God who sits on the throne, and to the Lamb."  Revelation 7:-10 NASB

CONCLUSION
So, God loves all people and desires that all would accept His provision for the payment of their sin.  He does not love some people without condition and hate others for no reason.  In fact, He offers all people forgiveness of their sin, but He does not force anyone to love Him against their will.  He does righteously judge those who rebel against Him, but always provides a way of escape.
Comment: Yes, God brought the flood in Noah's day that killed children and adults.  In the Exodus, those that rejected God's way of salvation from the coming judgment did suffer that judgment.
Comment: @AlbanoVito It seems you may be suggesting that God was unjust in this.  That is a whole other question.  However, God is very emphatic that He is very merciful and loving and gracious.  Judgment is a last resort.  He is also omniscient, so He knows the choices that even children yet unborn will make.  If this is, in fact, true, then God is not unjust.  However, to charge that God is unjust is to assume a moral law, and to assume a moral law is to assume a moral lawgiver.  Thus, we are still left with God, if in our limited understanding, we may not comprehend His justice.
Comment: Thank you for your detailed answer but I did not ask about God. I know and believe in God with all my heart. I asked explicitly about Israel because I find it hard to believe that God had a plan for the kingdom of Israel and their nations and not for anyone else. Even in the kingdom of Israel there was war and evil thinks so I can't see why these things should be fine for Israelites but not for Egyptians. Do you really believe that God could kill children ??
Comment: Ok but there was no choice for the Egyptians children, it was not their choice. Only the Pharaoh and some of the Egypt leaders knew this. There is no verse in bible that explains that Moses notified the other people except the Israel people. This point is not clear to me.
Comment: Absolutely this is not what I am suggesting.I am really sorry that you are making a walk around here. Actually I didn't think nothing at all when I asked this question. However reading and re-reading the old testament, I am thinking that maybe some people just slightly changed the meaning of some words from the original one. For example about "killing children" I think that the original meaning should have been something like "punishing" or something like that. First comment here says: "the people of Israel wrote it and maintained it and wanted it so" ... maybe it is right.
Comment: God killing the Egyptian children was more merciful, to those children, than it was cruel. He took them out of the wickedness in Egypt, where they would learn false traditions, and brought them to paradise while they were still in their innocence. Death is not the end of existence, and in and of itself, is not a bad thing. Of course, only God has the right and judgement to give life and take it away.
Answer: I'll focus on the first question which relates to the identity of Israel.  The Bible focuses on Israel, because Israel is the Church.  The Bible is about God's creation of the world and His promise of redeeming His fallen creation through the Christ.  In Genesis 3:15, after Adam and Eve sinned and brought death and evil into the world, God promises a Savior, the "seed of the woman."  Then, God gathered together a people around this promise; this is the Church, God's people gathered by Him around the promise of the coming Christ.
The Church therefore began with Adam and Eve, continued through their son Seth, and then down the line to Noah.  After the flood, it continued onward to Abraham, Isaac, and Jacob.  Jacob was renamed Israel, and his descendants are the Old Testament Israel, the people of God.  Yet, not everyone descended from Jacob is part of Israel.  Paul makes this point in Romans 9:6-8:
"For not all who are descended from Israel belong to Israel, and not all are children of Abraham because they are his offspring, but 'Through Isaac shall your offspring be named.'  This means that it is not the children of the flesh who are the children of God, but the children of the promise are counted as offspring."
The point is that it is not physical descent which makes a person a part of Israel, it is faith in God's promise of salvation through the Christ.  The book of Hebrews picks up this point extensively (cf. Hebrews 11:1ff).  In addition, people such as Rahab the prostitute of Jericho was incorporated into Israel, the Church, through faith in the Lord (Joshua 2:8-13).  Ruth, the Moabite, was also incorporated into the Church through faith (Ruth 1:16-17).
So, it is faith in the Lord's promise of the Christ which makes a person part of Israel, the Church (cf. Galatians 6:16; Ephesians 2:11-22).
That's why the Bible talks about the people of Israel; the Bible is God's revelation to us of His actions in creating and then saving the whole world through Jesus Christ.  God made this promise of salvation to all people, and this promise is believed in by the Church.  So, in the Old Testament the Church is eventually called "Israel," but it is not just the physical descendants of Jacob who are "Israel;" indeed, not all of them are truly part of "Israel" as is seen, for example, in the days of Elijah the prophet (cf. 1 Kings 18:22ff).
The purpose of Israel, though, is not to horde God's blessings.  Rather, Israel is meant to be a witness to God's promise of salvation through the Christ.  God set Israel apart in the Old Testament to be this witness in order to call the Gentiles (i.e. the "nations") into the Church.  Likewise, in the New Testament the Church is the New Testament Israel which continues this witness, this time in the light of the Christ who has died and risen and is returning to complete the restoration of all creation.
So, God loves all people and wants all people to be saved (1 Timothy 2:4).  The purpose of the Church is to proclaim the Gospel of Jesus Christ to all people so that they may come to faith and thereby be incorporated into Israel for their salvation.
Comment: If your words 'the Church', that does not exist as the concept of a separate religion in the Bible, is taken to mean, conversion to Judaism through the teaching of Jesus Christ, I would be happy to accept your answer. If not it makes no sense. God is adamant, there is His chosen people (the Israelites, now called the Jews) and there is the rest of the world.
Comment: By "Church" I mean those who have faith in God's promise of the Christ.  In the Old Testament, the Church was eventually called Israel, but it began with Adam and Eve and their son Seth.  They looked forward to the coming of the Christ.  The New Testament Church is also Israel, living in the light of the incarnation, death, and resurrection of Christ.  So, the Church of all times and places is united in Christ.  There are two groups of people in the Bible: the Church (Israel) and the nations (the Gentiles).
Comment: Thank you reverend for your answer but I am absolutely sure about God loving all people. My concern is about some details in Bible and one of those is what I asked here. I refuse to believe that God could ever kill a man furthermore a child.
Answer: Short answer: The bible focuses on Israel because it was the mechanism that God chose to use to bring Jesus into the world in his bodily form and thus bring about atonement for every people group.  The calling of Abram / Abraham that is the start of the line leading to Christ is placed right after the story of the tower of Babel (with a list of descendants in between) because it is the start of His ultimate answer which culminates on the day of Pentecost.  Genesis 11 - God disperses the peoples, and in Acts 2 he calls them back together provisionally in the unity of the Church.  In between these two events the main focus is on the family line that will result in Jesus being born on the earth.
There are as previously indicated much deeper reasons and metaphors built into the concept of Israel but the above is the first superficial layer.
Answer: I have read your question the answers and the comments over and thought I might answer the original question with my observations.
Why does the Old Testament talk mainly about the Nation of Israel?
If we take the Old testament by itself we do not see the purpose of those revelations. But on the other hand, when we take the Old Testament in relationship to the New Testament; what we find is that the Old Testament becomes a preamble to the New Testament. So what then, the you, ask is a preamble?
According to Merriam Webster the definition of a preamble is:

PRE'AMBLE, n. [L. proe, before, and ambulo, to go.]

Something previous; introduction to a discourse or writing.
The introductory part of a statute, which states the reasons and intent of the law.

PRE'AMBLE, v.t. To preface; to introduce with previous remarks.

In the case of the Old Testament in relation to the New Testament, both of these apply.
The Old Testament is an introduction in which it give us the reasons that mankind needs a savior to begin with. Secondly It gives us an outline of God's overall plan to reclaim his creation up to the point of sending a savior.
If we contemplate the Old Testament in its entirety. What we find is that God tells us exactly why mankind fell out of his grace in the beginning, and then it goes into giving us a path whereby God assigns righteousness for the faith of the individual. The Old Testament is a compilation of God's grace, followed by man's rebellion, followed by God's grace, followed by man's rebellion. In the Old Testament God is giving us his plan whereby he makes covenants as he goes. All of which are dependent on Israel's unwavering devotion and worship of God.
The New Testament then can be thought of as the completion of the Old Testament. In that it gives God's ultimate solution and forgiveness.
The old testament is the groundwork for God's sending a savior into the world, the reason it talks about the nation of Israel is because that was his chosen nation; and by that what we mean is that it is the nation through which God made his salvation enter into his creation. Additionally, the old testament teaches us that even though our disobedience separates us from God, he loves us enough to save us, in spite of it.
The Bible as a whole then is God's plan of Salvation with the Old Testament being the why, and the New Testament being the how.
Comment: @Albano Vito As I read your question that was not a part you asked about, in your question you only said that it surely could not be true. It also took me some time to understand that and if you will ask it as a separate question I will gladly go through how the Scriptures gave me peace concerning that, however it is far too long to post in a comment and does not fit the proper use of comments.
Comment: Thank you for your answer. It is a very good explanation but it stills doesn't answer the fact that there says that God killed innocent children for the sake of the Israelites. Do you think that the ancient Israelites might have exaggerated a little, or maybe it is our fault (today people) that have translated something not perfectly from the original Word?


How do I upload photos from Android phone to Google Plus without sharing?

Question: I would like to upload photos from my SGS4 to my Google+ without sharing to anyone. How do I do that?
Answer: If you turn on the "Auto Backup" feature of Google+, your photos will automatically be uploaded and will only be viewable by you (until you share them, of course).
If you want to do it manually, simply share with G+ and choose yourself as the only person you share with. I like to keep a Circle around with no one in it that I can share things to and so I'm the only one who can see them (kind of a "read it later" thing). You might prefer to do that, since it's quicker to choose a Circle to share to than a person.
Comment: Thanks. I was looking for a "Viewable only by me" option but I guess I have to actually choose myself. Kinda silly.
Comment: Well, that's what the Auto Backup feature is.
Answer: I was looking to do the same thing. If you want another way to do it other than adding yourself to your own circle (seems dumb to have to do that) or using Auto backup (this sucks because it does ALL your photos, what if you only want certain ones and also want them in a specific album then I have to move them after the upload) you can use the app  Picasa Tool for Google + Photos in the Google Play Store.  Just select your photos in Gallery and share then select Picasa Tool and you can Choose an existing album or new one, resolution size and also if you want them to be private. Everything one would want and expect for the upload experience. Google needs to get with it.


Should a muslim still keep his/her gaze down even if the person he/she is looking at is covering their awrah?

Question: I know that it is a sin to not keep your gaze down when when one is looking at someone when that person is uncovered but is it still a sin if the person he/she is covering their awrah? For example if a man were to stare at a muslim woman, with lust, but that woman is covering everything except her face feet and hands, would it still be haram?
Answer: Yes, looking at the face, hands and feet of a non-mahram woman is forbidden when it will be accompanied by feelings of desire. That is agreed upon. According to some madhabs it is forbidden to look at them even when it is not accompanied by desire.

فطفق الفضل ينظر إليها، وأعجبه حسنها، فالتفت النبي صلى الله عليه وسلم والفضل ينظر إليها، فأخلف بيده فأخذ بذقن الفضل، فعدل وجهه عن النظر إليها
Al-Fadl started looking at her as her beauty attracted him. The Prophet (ﷺ) looked behind while Al-Fadl was looking at her; so the Prophet (ﷺ) held out his hand backwards and caught the chin of Al-Fadl and turned his face in order that he should not gaze at her
— Bukhari

An exception would be when there is some valid reason, such as when looking at a potential spouse for purpose of sending the proposal of marriage.


Would submarines be well defended from space based lasers? What about railguns?

Question: When a planet is under seige, obviously its airports, missile silos, and launch sites are the first targets of bombardment, to prevent a counterattack.  It thus seems that submarines, which can fire missiles and then submerge and swim away, and only have to resupply at a port every few years, are the logical choice for anti space defense.  If the attacked spacecraft survived and quickly aimed its lasers and railguns at the submarine, how deep would a submarine, with modern military hull thickness, have to submerge to prevent destruction by the spacecraft's 100 gigawatt laser?  Would double or single hulled submarines be more effective at stopping laser damage?  How deep would a submarine have to be to survive the spacecraft's other weapon, a "rods from the gods" type attack with a 1 ton 10 meter long pointed titanium projectile railgunned at it at 5000 m/s?
Comment: Read this including the comments http://toughsf.blogspot.com/2017/10/anti-orbit-laser-submarines.html
Comment: Rather than the rather extreme kinetic bombardment option, a sub-hunting starship might prefer something akin to an [ASROC system](https://en.wikipedia.org/wiki/RUR-5_ASROC) - use a missile to launch a torpedo into the ocean somewhere near the target, then have the torpedo acquire the target on its own. (At least you can be pretty sure there won't be any friendlies around.)
Comment: Personnel: What result do you want? deadly high freq but more scattering or low wavelength just telling the sub position? 4 stars General: YES
Comment: Up vote for suggesting a very interesting planetary defense method that I have never read in any soap opera yet. And plus one to @Jim Baerg for a very informative link.
Comment: Why use a railgun or laser instead of dropping mass from orbit? Yes getting to space is massively expensive, but the attackers are there, it's a sunk cost. If they can make use of a planet, they can make use of a moon, and there's no rush, they can mine the moon for mass, at 1/6 the price of mining mass on Earth, put that mass into parking orbits and when the sub fires, nudge that mass into the sea from on high. Or, just use radar, the same way we mapped the ocean floor, from orbit, or better yet, get a firing solution from the onboard AI's. How fast can a sub travel underwater?
Answer: Lets assume for this consideration that your spaceship can detect the exact location of the attacking submarine within a few seconds after the attack is launched.
Rod of the gods
The spaceship will be in an orbit of at least a few hundred kilometers, if not much higher. So even with an instant counterattack the submarine gets more than a minute to dive and move. As titanium is roundabout 4.5times as dense as water your rod will loose its full impulse within 45 meters into water.
I can't find exact speeds for diving down but there are proven stories about submarines diving up more than 300 meters within two minutes, so I think your submarine has more than enough time to dive deep enough and far enough for not beeing hit at all.
Laser
As the speed of light is a little bit higher than 5000m/s it would be possible to hit the submarine, just looking for the speed. The problem here is the refraction of our atmosphere. Even with an absolutely clear sky much energy of the laser will be lost when reaching the surface for most of the possible wavelengths. Some clouds in the sky -> even for the few optimised wavelengths a high degree of laserlight is scattered away. If our submarine beginns to dive instantly after firing their own weapons the spaceship has no time to take a good position before firing back so there occurs another problem: the high reflection-factor of light transfering from air to water under less then 90°. As the sea-surface is in motion all the time a high level of light gets reflected by just centimeters of water. Furthermore the cooling-effects of water help the submarine to survive laser impact a few seconds more.
Thereby I conclude that your submarine could be save with just a few securitymeassures against laser (highly reflective hull, attacking from a sharp angle and such).
Edit: added some details for the laser-attack and corrected some writing mistakes.
Comment: If the attacker is not worried about environment effects small nuclear weapons might be an appropriate option, depending on exactly how many subs you attacker has to neutralize. Rods an lasers are point kill weapons i.e they hit or miss. Nucs would be area effect due to the shock wave generated by the underwater blast. So provide your time on target (time from detection to launch to detonation) is not to long  you have a good chance of scoring a hit before the submarine can clear damage range.
Comment: @Mon If you send a nuke to crach upon water at 5 km/s the nuke is not going to explode. It will be torn to pieces. This is supposing it has avoided beint melt or torn away in reentry. You must send them at lower speed, giving the sub ample time to go away, and a nuke powerful enough to blast a city the size of Los Angeles has an underwater killing ratio of less than 150m, being generous.
Comment: @Charisturcear (+1) Archimedes' principle also makes trivial carrying a really heavy, some meters thick anti-laser ablative shield uppon its upper hull.
Comment: Rekesoft, you make good point I should have covered. Obviously any nuclear weapon dropped from orbit would have to be decelerated (by parachute?) or just atmospheric breaking (with winglets?) till it reached a speed that allowed it to enter the water without breaking up. But that adds a big delay to target interception. So I guess the question becomes whether the 'enemy' has other non-orbital assets (e.g. aircraft/sonar networks etc) in play as well as spaced based assets.
Comment: You could also just drop the nuke on a city. You have the whole terrestrial population as a hostage, why even engage? Just smoke em on land! Subs can't save anybody, they are offensive weapons!
Answer: I think the key obstacles are submarine detection from space and spaceship detection from underwater.

Most submarine detection systems today are sound-based, and they rely on receivers in the water. Even aircraft (which are in the atmosphere) drop sonobuoys.
There are some non-sound systems, like MAD, but they are short-ranged.
Some things are possible from orbit, e.g. wake detection and thermal signatures.

Regarding the specific attacks, consider that nuclear depth charges were retired. Wikipedia says that homing torpedoes were better, I guess there was also a hesitation/revulsion to employ nuclear weapons in that role. (What good is an ASW weapon when you have to phone the White House for each shot?)
I expect that the efficiency considerations will apply to the KE and laser attacks as well.
Answer: Modern SSNs don't necessarily need to come to periscope depth to fire. It's possible to pop out encapsulated missiles that only launch AFTER the launching sub cleared datum. While currently they are only used for AGM's on SSKNs, there are no reasons why they couldn't also be applied to VLS tubes, or even apply them to ICBM tubes, albeit a new gen of missiles will probably need to be designed for ICBMs or VLS tubes. Basically, the capsule will "hang" just under the surface until it is time to launch, then it'll pop up, and launch, even hang vertically in the water.
Answer: God Rod Analysis
Facts:

Dropping anything from orbit produces 31mj/kg.
A telephone pole sized mass of tungsten weighs slightly less than 13 metric tons.
31mj * 13000kg ~= 400GJ.  That's around 100 tons of TNT (1/10th of one kiloton).
It takes an object dropped from orbit around 15 minutes to reach the surface of Earth.
100 pounds of TNT has a kill radius of 3-4 meters, and a disable radius of 8-10 meters on a modern hull.
To maintain the necessary energy density over a larger radius, the energy must increase by the cube of the radius.  So while a tungsten light pole traveling at 10 times the speed of sound has 1000 times more energy than a depth charge, it won't have anything like 1000 times the blast radius.  More like 5 times the disable radius.
One can expect a sci fi sub to be significantly more durable than a modern one, further reducing the disable radius.

Evaluation:
With a 15 minute lead time, a dropped God Rod is unlikely to land anywhere near its target.  Even with the effective kill radius of 100 tons of TNT, it's extremely unlikely that a kinetic weapon will threaten a submarine.  OTOH, a dropped rod might be relatively subtle until it really got moving.  A fired rod might drastically reduce that time and increase the impact energy.  If it comes out of a mass driver at relativistic speed, the warning time shrinks drastically while the impact energy skyrockets.
So dropping stuff on a sub isn't going to work.  Shooting at it could be just fine.


What are some sources for in game puzzles for players?

Question: I love to spice up campaign settings (dungeons in particular) with logic, mechanic or word-based puzzles. Can you propose valid resources for this ?
Answer: I've successfully used the format found in "Logic Puzzle" magazines.
These are those puzzles that you solve on a grid of possibilities.
Usually they are things like work out which pet belongs to which person based on a list of statements.
These can be easily adapted to a fantasy or other setting and given a reason for needing to be worked out.
For example:
There's been a murder at the masked ball. There are three suspects:

    Alice the Bard
    Father Cuthbert the Cleric
    Lunk the Stupid

They wore each a different mask:

    Cat Mask
    Dragon Mask
    Orc Mask

They each favoured a particular drink from the bar:

    Druid-tended Buckleberry Juice
    Landlords Finest Mead
    Elderberry wine

Now given some clues the players have to work out who wore which mask and favoured which drink. If you introduce the fact that we know which mask killed the mayor, then there's a reason to work things out to deduce who was wearing that mask.
For example
The barkeep when questioned let's the players know that the person in the cat mask
ordered the juice.

The players know that the Cleric is tee-total.

The murderer wore the Orc mask.

Given those clues we know it wasn't the Cleric that did the deed. A couple of more clues will lead us to the actual murderers identity.
It's easy to adapt the puzzles you can find online and just change the wording of the people/items and clues.
Also you could have more clues backed up to give the players, and give different amounts of experience based on the number of clues they needed to solve the puzzle.
You could integrate this into skill challenges by having skill checks to reveal the clues.
Comment: Such logic puzzles are indeed easily converted. But since they're for the players, rather than the characters, resist attempts to solve them with a skill check or other die roll. ;>
Comment: @ ExTSR My recommendation: inteligence of a character should come from a player not numbers. Players don't fight, run, nor see in the dark - characters do. But players think for their characters, don't they?
Comment: Another option is to allow skill checks of an appropriate nature to get clues. Heck, maybe don't even start players with any clues to the puzzle (or just one?!) and give them better loot the closer to the minimum needful clues. That is to say if they need at least 3 clues to solve the puzzle, and solve it in 3 they get the best possible loot, but if it takes them 6 maybe they only get a third of the max loot.
Answer: Kobold Quarterly has been doing a great series called "Encounter Codex" that presents some great puzzles that feel well integrated into the situation rather than just imposed artificially. Here's the most recent: http://www.koboldquarterly.com/k/front-page6486.php
The Eberron D&D adventure module "Seekers of the Ashen Crown" also had some nice puzzle-type traps. I only mention it because I recently read it and was impressed.
Answer: http://www.cloudkingdom.com/ is a resource specifically for this. Their source books work for any RPG. Plus they have a riddle of the week on their site.
Comment: Subscribed to that riddle of the week. It gets easier when you practice.
Answer: Sometimes physical puzzles like tangrams or puzzle blocks can be fun for players.  Especially if they find one piece at a time and then have to figure out how or when to put it together.
Answer: Back in the old times when I did some dungeon crawling scenarios I put my players through some contraptions inspired by "the incredible machines".
I designed some door and traps that were possible to open, but one had to find out how. They were based on simple mechanisc, but it's hard to solve when you see only some parts of the construction. Especially when you see only throuhg your GM's voice :)
Comment: It was too long ago for me to dig it out. (2002yr I guess) Just get creative and see what comes out. Remember to do a mind-experiment "would I figure it out if I was the player" and remember to prepare at least two correct solutions. If there's only one - players will always ignore it or decide it won't work before trying :)
Answer: I hate to give this kind of answer, but I will anyway:  don't do this.  Or, to be less of a jerk:  don't do this unless you're sure your players like it, too.  The problem with riddles and puzzles is that they yank players out of their characters and into riddle solving mode.  As someone said, puzzles are for players and not characters to solve.  This makes them especially effective at making the player disregard his character.  If you're trying to run a game in which character role-play is important, puzzles can create a big risk of derailing things.
Some puzzles can be great, and the more integrated they are with the game world, the better.  If you go looking for puzzle sources online, bear in mind that it may take a lot of effort to convert them to something that really fits in the game world and that the characters, rather than the players will have to solve.
After all that, I have no really good resources to suggest.  Sorry.
Comment: I feel like this is a great answer to a different question.
Comment: Totally agree @Numenetics
Comment: There have been groups I would NEVER do this with, but my current group loves this type of thing - it is a great thing to end a session with, so they can take some time on it, and even work on it between sessions.
Answer: You might also try issues 2 & 3 of Raggi's Green Devil Face, which is specifically focused on that sort of thing.
Comment: Had some trouble actually figuring out how to get this.  Here's a link to the product page: http://www.lotfp.com/RPG/products/green-devil-face
Comment: And the pdf for purchase: http://www.yourgamesnow.com/index.php?main_page=product_info&manufacturers_id=103&products_id=2763&zenid=a88568b262a386ee2d20d1654f44ab36
Answer: My Turkish folklore teacher was always talking about the book "Bilmece: A Corpus of Turkish Riddles".  I'm not recommending this book per se, but I'd like to point out that other cultures have a riddle-ing tradition, so searching the academic folklore world might yield some interesting results.
Answer: The logician Raymond Smullyan has a number of well-regarded puzzle books, each containing hundreds of logic puzzles varying in difficulty and theme. He also includes many anecdotes on paradoxes, logical dilemmas, and lexical gags that could make great inspiration for NPC dialogue:

Which is better, eternal happiness or
  a ham sandwich? It would appear that
  eternal happiness is better, but this
  is really not so! After all, nothing is
  better than eternal happiness, and a
  ham sandwich is certainly better than
  nothing. Therefore a ham sandwich is
  better than eternal happiness.
Answer: It occurs to me that a lot of groups play Cthulhu games this way: GM presents clues, players try to solve, the occasional skill-roll helps or hinders. I suppose my take on it is that puzzles work best in games where the player-characters are 'problem solvers' of some kind. Otherwise I tend to avoid them for the reasons of being too OOC as already mentioned


Downgrade Windows 8.1 Pro RETAIL (a new box, NOT preinstalled) to Windows 7

Question: If I buy a Windows 8.1 PROFESSIONAL retail box, and NOT a PC with pre installed Windows 8, can I still exercise my downgrade rights to downgrade to Windows 7. ( I have a Windows 7 ISO and I will use phone activation to explain that I am downgrading). So can I do this with a retail version of Windows 8.1??
Comment: Windows 7 isn't sold anymore to end users. As such, the downgrade program is probably gone, too. Not that it applied to buyers of retail versions in the first place.
Comment: It isn't a forum, and well, quite frankly there's a reason those questions were closed - they were not within the scope of the site. I'd also suggest considering just installing a shell replacement rather than downgrading, since windows 8 is superior in many many ways.
Answer: According to MS, you can't anyway - downgrade rights are for OEM/Preinstalled systems.
To downgrade Windows 8.1 or Windows 7 software, end users must:

Purchase a PC preinstalled with Windows software.
Accept the Microsoft Software License Terms.
Perform the downgrade process to the eligible downgrade product using the media/key from a genuine, previously licensed OEM or retail product.

A much better option would probably to just run windows 8 (and enjoy the longer time you have before it EOLs) and getting additional software to fix the minor cosmetic annoyances you may have.


What is a good processor speed for FCP 6 real-time playback?

Question: I currently have a 2.2GHz dual-core macbook pro (2007) and it doesn't seem to work very well with HDV 720p real-time playback. I am looking into buying a new iMac this or next year. What would be a good processor speed for rendering and real-time playback in FCP 6 or 7? They currently have quad-core 2.5, 2.7, and 3.1 GHz.
Comment: generally the advice is "get as fast as you can afford" but any of the quad cores should handle real-time playback in FCP just fine. Maybe better asked in the audio/video production SE site though to get more personal experiences with different configurations.
Comment: I must agree, and also comment that realtime playback usually makes use of video card acceleration, meaning its not just a matter of getting a good processor, but a good video card that is optimized for video production.
Comment: New iMacs coming out in november/december, just sayin'.
Answer: Certainly get the fastest you can afford, but processor speed is only part of the equation.  You should also get as much RAM as you can afford.
It is a fallacy that higher processor speed = shorter task completion times.  A fast processor helps, but RAM is more important than processor speed.  More RAM means the processor can handle more tasks at once.
A MacBook Pro tops out at 8GB currently.  For video editing, I always max out RAM on a laptop.  For a desktop, I might go to 16GB or more if I was planning to work with multiple uncompressed tracks.
Comment: Of note, FCP 6 and 7 don't use more than 2.5 GB of RAM and don't properly use more than two cores outside of a handful of exceptions. Hard drive speed is often times more crucial.


Can I convert a gas log fireplace to wood burning?

Question: My house currently has a gas fireplace with (as far as I can tell) a metal firebox and a metal flue running up a non-masonry chimney. Are there any options available to me to convert this fireplace to wood-burning? This isn't out of a desire for increased efficiency, just a personal preference for the flame and smell of wood instead of gas.
Comment: You may be able to install a [wood burning stove](http://catalogue.sbi-international.com/images/poeles/photos/500_134683042007172.jpg) with just a few modifications, but if you want a [fireplace](http://img2-1.timeinc.net/toh/i/step-by-step/1208-tiling-fireplace/00-tiling-fireplace-1208-x.jpg) you'll need a proper chimney.
Comment: Step 1: Verify that your locality allows this. In many areas, you are prohibited by law from creating new wood-burning fireplaces.
Comment: @MatthewPK: Thanks, while I appreciate the heads up, this question is about the logistics and physical feasibility, not legality. For what it's worth, there are no such restrictions where I am.
Answer: There is no way to convert a gas fireplace to burn wood, unless you are very lucky and the gas fireplace is an insert in a properly functioning solid fuel fireplace (in which case you basically just remove the insert, and have the fireplace inspected).
In situations like this, you have a couple options.
Install a Solid Fuel Stove
This option will require the least amount of work, though can still be quite expensive and time consuming.
You'll have to follow all local codes that deal with this type of project, but for this example we'll use National Fire Protection Association (NFPA) standards (NFPA 211 Standard for Chimneys, Fireplaces, Vents, and Solid Fuel-Burning Appliances).
Clearances
You'll need 36" clearance from combustible materials on all sides (top, left, right, front, and back).
Floor protection
You'll need a floor protector under the unit, that extends 18" in all directions (except up/down, that would just be silly).
Listed Stoves
The floor protection requirements will be provided by the manufacturer, for listed stoves.
Unlisted Stoves
For unlisted stoves, the floor protection requirements are determined by the length of the legs on the unit.
0" - 2"
Stove must be placed on non-combustible floor.
2" - 6"
4" hollow masonry laid to provide air circulation through the layer, covered with 24-gauge sheet metal.
6" and Greater
Closely spaced masonry not less than 2", covered with 24-gauge sheet metal.
Reducing clearances
There are ways to reduce the clearances, by installing special materials around the stove. Check your local codes for methods to reduce clearances.
Stovepipe
You'll need 18" clearance around the stove pipe, as well as a stovepipe thimble where the stovepipe passes through walls/ceilings.

Chimney
If you don't have a proper masonry chimney to attach the stovepipe to, you'll have to use a factory built metal (A.K.A. prefabricated, Class A, all-fuel) chimney. You likely won't be able to use the same pipe used by the old gas fireplace. You also don't want to connect the stovepipe to the chimney used by your other gas appliances (furnace, water heater, etc.).
Build a masonry fireplace
If you've got the cash and time, you could have a proper masonry chimney/fireplace built (or build it yourself).  This option will require modifications to the building structure, lots of masonry skills, a healthy bank account, and a good bit of time.
Comment: This was what I suspected. If what I'm going for is the aesthetic value of a wood fireplace and not to use it as a significant heating source, would a wood stove (or other solid fuel stove) be something I should look at?
Comment: Wood stoves are more for heat than anything else, unless you like watching fire trapped in a small box.
Comment: I was lucky enough to have a true fireplace that simply had a gas insert installed.  I ended up buying something at the local hardware store that allowed me to simply use the gas line as a starter for the wood.  Works great and while I do enjoy watching fire in a box I personally prefer the sound that you get from burning wood vs a gas fireplace.
Answer: Wood fires burn much hotter than gas and put up sparks, soot, and other sediment as well.  You will probably have to install a new chimney and use a smaller box to have greater clearance/insulation to the surrounding wall.


Student loans in IBR plan, should I pay more on them or pay more on our mortgage?

Question: My husband purchased his house a year ago. We are looking into making it an investment property. We want to fix it up and pay off a reasonable chunk of the mortgage to hopefully have a good return when we choose to sell.  I came into the relationship with $53,000 in student loans and since we just got married I have filled single, leaving my payments at $18.00 a month as long as I continue to fill single. There is a forgiveness on student loans after 20 years.  I assume my Income will go up but at $18.00 a month I am unsure whether or not I want to give it a good go and strap my family by paying off my student loans and keep puching towards paying down our mortgage. Or if I should ride out the IBR repayment program and just pay what I am asked and wait for it to be forgiven.  Because I work for the state there is something called them public service loan forgiveness program that would also pay off my loan after 10 years as long as I have been working in the same place as well.  What should I do?
Answer: You can't file single. The other choice (aside from married) is "Married Filing Separately". This may impact the loan situation. This is not splitting hairs, you are married and single is not a legal filing status for you.
If the rules of the student loan require that you actually be single to maintain that $18 deal, you are not able to keep it.
What is the interest rate on the SL if it went to a standard payoff schedule? And what's the rate on the mortgage?
Regarding the accelerated payoff on the mortgage - this is a separate issue from the return on the property. Whether you sell for a 1% gain or 100% gain, the rate you earn on the mortgage prepayment is the rate of the mortgage. If that rate looks good to you, that's fine, but be sure you don't have to start paying that student loan back now that you are not single.
Comment: Indeed, to be filing single you have to have been single on the last day of the tax year.
Comment: I should have explained that differently. I do understand the Married Filing Separately choice. I just need to really way out the best scenario for me and my family.  I just keep thinking that if I can get a job in public service loan forgiveness program, my loan could be forgiven after 10 yrs. Then I wouldn't necessarily have to worry about only paying a certain dollar amount and never catching up on the student loans. I was just concerned if I continue to pay the set dollar amount I will not make a dent in that debt. What if I wanted a new house? I would never qualify with that on my credit.
Comment: I am not clear on what your current choices are. Under what circumstanses do you maintain the $18?
Comment: I believe that because my AGI hasn't changed much and because I will continue to fill seperatly I will be able to maintain that dollar amount. Or close to it.
Comment: I wouldn't pay a dime more on the student loan. $18/mo is $216/yr, less than 1/2%. Let inflation eat away at it for you, and as time passes your rise in income along with inflation will make the payment seem less, if you ever go into a regular payment schedule.
Answer: Before you consider either paying down the mortgage or your student loans, put any extra money you have into a good, old fashioned savings account. Ideally you want at least six month's worth of cash tucked away.
The student loan repayments are based on your income,  not the amount owed. Because if this, you might bed tempted to pay down the mortgage instead. However, assuming you plan on paying the entire debt, which one you pay down depends on the interest rates. I believe most federally guaranteed student loans are between six and seven percent, but the mortgage could very well be under five. In that case, paying the student loans well save you more in interest than the mortgage will.
Comment: "The student loan repayments are based on your income, not the amount owed." While true, it also sets the upper bound. Under some circumstances IBR could show you paying faster than the standard 10 year.
Comment: The savings account is something we are working on and is such a great idea.  The way the economy is and how fast things are changing makes me nervous about how to ensure my future as a retiree will be sound.  If I can get my student loans forgiven and make extra payments to my house that is what I would rather do. Lets say I wanted to purchase a new home and I was still making may payments to SL @18.00 a month. They would see a large debt. I'm worried that in the long run it will hurt my chances to future credit.


node.js + restify - requiring client certificate

Question: So I'm working on a basic node app. Clients will connect to it with SSL. It seems to work fine when I just use a server certificate, but when I attempt to require a client certificate, it continues to work no matter what I throw at it.
I have found questions on this site related to this, but the answers contained therein didn't seem to work for me. Here's one.
Here's relevant code:
var restify=require('restify');
var fs=require('fs');

var server=restify.createServer({
    certificate: fs.readFileSync('../certs/server.crt'),
    key: fs.readFileSync('../certs/server.key'),
    ca: fs.readFileSync('../certs/ca.crt'),
    requestCert: true,
    rejectUnauthorized: true,
});

...

server.listen(8080, function() {
    console.log('servers up...');
});

I'm using curl to test connections, and pretty much anything that comes in causes the request object to be logged to console.
The various curl command lines I've used are:
curl -k https://localhost:8080/hello
curl -k -E user.combined:password https://localhost:8080/hello

I'm using -k because the certificates were generated locally and curl wants to validate them. (could this be the problem??)
So, no matter what I send to the node instance, I get the output I'd expect if the user was using the proper certificate (as they are in the second curl command line above).
Logged in the console, I see this:
req = { socket:
    { pair:
        _secureEstablished: true,
        _isServer: true,
        ...
        _rejectUnauthorized: false,
        _requestCert: false,

        (further down)

        authorized: false

Obviously, there's something going on here that I'm not fully up to speed on. What could it be?
== UPDATE ==
using -v with curl gets me some additional information, including this in the curl output:
* About to connect() to localhost port 8080 (#0)
*  Trying 127.0.0.1... connected
* successfully set certificate verify locations:
*  CAfile: none
  CApath: /etc/ssl/certs

As noted above, my ca.crt file is in the (relative) directory ../certs
Thank you.
Answer: This was not supported as of restify 1.4.4.  I believe this will be included in the 2.0 release, as I see the code has been added in the master branch of the Git repository.


Collecting vinyl LPs on an open shelf

Question: I have a moderate but rapidly-growing collection of vinyl LPs. I want to keep these LPs on an open shelf, without them spilling over. Unfortunately, record storage crates won't fit on the shelf (at least not without hiding the records from view and making access cumbersome), and even the heaviest bookends I've found won't prevent the records from toppling over and shoving them over due to their sheer weight.  What are some ways I can go about storing my records in an accessible, attractive way?
Answer: One way which was used back in the days, was drilling small holes in the shelf, and then using bent metal rods as shelf dividers. This could be moved at your pleasure. A variant over these theme could be to general shelf dividers (google image search).
As shown in images in above linke various alternatives exists, with various support strength, but in general these can be made sturdy enough to support LP's, and still be almost invisible, and thereby really showcasing the albums.
Answer: Milk crates make excellent record holders, and the fact that they can stack means that your shelving dimensions are quite flexible.
Comment: Please don't link images from other sites like this, it's better that you upload them using the add picture when editing the post. And it could very well be sized down a little.
Comment: @holroy, I thought that SE would make a copy of the linked picture.  I can't scale it down much further than I just did, and a better image isn't making itself apparent to me.  Thanks though.
Comment: Any chance you can source where you retrieved the image from?
Comment: @Kevin Brown, like an official "avoid copyright infringement" way?  Otherwise, it's one of the top google image hits for "milk crate records".
Comment: Milk crates are the gold standard but I couldn't find any that would have fit in my existing shelves. :) For making new shelving they're great though.
Answer: You can store your records in a rigid (plastic or metal) open-front magazine holder, such as one of these:

The magazine holders themselves all but disappear when they're placed side-by-side, as seen in this setup:

Image sources: Amazon listing for Acrimet Magazine File Holder, Rubbermaid 96502ROS Deluxe Magazine Rack
Comment: Please be aware that we don't want product recommendation as a general rule here on Lifehacks SE. The better approach is to desrcribe the product in general terms, and possibly include an image with a reference to where it comes from.
Comment: @holroy Duly noted!
Answer: lay a stack on each end flat  i think a stack of 20 or so should be ok and not damage the records due to presure
Comment: This answer is pretty unclear. Care to elaborate and maybe provide a diagram?
Comment: This works with books but an LP left lying flat will warp. Store all your vinyl disks vertically.

Collecting vinyl LPs on an open shelf


Regarding signalling pathways

Question: Do all signalling pathways have something that can inhibit them? If the signal pathway is benefitial  and it is inhibited would the inhibitor be caused by a biological problem?  Are all inhibitors controlled by some subcellular  mechanism?
Comment: Do you think about "artificial" inhibition or an inhibition that occurs naturally in the cell?
Answer: There are some inhibitors in the cell, which have specific effects on signal transduction. These are mostly second messengers (like cAMP, cGMP, calcium ions,  inositol 1,4,5-trisphosphate and others), which are then able to diffuse relative fast to other proteins. There they can either amplify a signal or cause inhibiting processes to start which then terminate the activation of the signal transduction cascade.
The problem is that these inhibitors that they work unspecific in their inhibition and termination. Signal transduction is tightly controlled as they directly influence the expression of various genes.
A lot of the proteins in these cascades are kinases which are activated upon phosphorylation and then carry on by phosphorylating the next step of the cascade. The activity is stopped by phosphatases which remove the phosphorylations from the kinases and thus inactivate them until the next signal is passed down the cascade. It works like in this figure (from here):

Specific inhibitors for single proteins in the signalling cascades are available as drugs against cancer. Since these signalling cascades regulate gene expression including cell cycle control, they are important targets for dysregulation in cancer. A numer of kinases in the MAP kinase pathway for example are mutated there and constantly active. The so called small molecule inhibitors bind to the protein and inhibit the kinase activity, preventing a permanent signal. See this article for more information:

Targeting cancer with small molecule kinase inhibitors
Comment: "There are no inhibitors of signal transduction occuring in cells." Are you talking about small molecules? There are plenty of specific inhibitors of signal transduction, they just happen to be proteins for the most part, and not all of them are phosphatases. Each signaling pathway is very tightly regulated by a variety of mechanisms, including second messangers (which **are** technically small molecules).
Comment: Ok, that's right. I was thinking about molecules like the small molecule inhibitors (like all the kinase inhibitors in clinical trials or already licensed like vermurafenib) which specifically inhibit one kinase. And there is no analogon to these in the cell to my knowledge. I will make my answer more precise.
Comment: Could a cell be considered like an EXTREMELY complicated subcellular and intracellular signal processing 'machine'? Where any signal pathways are tightly regulated..
Comment: If you like this, why not? A cell is a extremely complicated mechanism...

Regarding signalling pathways


If I want social media icons that link to my site's corresponding accounts, is that better to do with a plugin, or manually?

Question: I feel like it's simple enough that coding it in would be beneficial, but I'm not sure.
Comment: Better regarding to what?
Answer: What it sound like you are thinking of, would just require html/css, and not any php - I would just keep it simple and just add the code to a text widget.
There really isn't a right or wrong answer here, it is just preference.


Can setting of different thresholds help in model performance in case of handling class imbalances?

Question: In a binary classification problem where there is class imbalance, after applying undersampling/oversampling or SMOTE techinques, is it still convention to use a 0.5 threshold if we are making the two classes completely balanced? Or should we still change the threshold based on what we are trying to optimize?
Answer: If changing the threshold improves the performance of the model, it would be better to change it and use an optimal value. Balancing the dataset does not mean that you can not change the discrimination threshold. Also, in some cases when the data is originally balanced, changing the threshold could be very useful and it is a very smart move.
Answer: It is not any hard rule that the ratio of good vs bad should be 50-50. Rather it depends on your scenario, for example you have 70% goods, and 30% bads, this ratio is decent and your model should be able to understand the patterns in data well. If you have only 5 to 10% bads, and you want to improve the model performance, then Oversampling/Undersampling is required, and making 60-40, 70-30, 65-35, 55-45 are decent ratios.
In case, when you are concerned about the distribution of each variable after oversampling, then take a look at this post too.


FEniCS: boundary conditions for electrostatic problems with dielectrics

Question: I carefully read all circa 70 pages of FEniCS tutorial and I still do not understand how to solve electrostatic problems when I have materials with different dielectric constant. The self contained system of equations in electrostatic
$$
\mathrm{div}\boldsymbol{\mathcal{D}}=4\pi\rho,\\
\boldsymbol{\mathcal{D}}=\varepsilon\mathbf{E},\\
\mathbf{E}=-\nabla\varphi.
$$
works only in regions where the functions are differentiable and smooth. At the interface between two regions with different materials these equations have to be augmented with the following boundary conditions:
$$
\varphi_1=\varphi_2,\\
\varepsilon_1\frac{\partial\varphi_1}{\partial n}=\varepsilon_2\frac{\partial\varphi_2}{\partial n}.
$$
How can I specify the second boundary condition? The example in the tutorial considers only a simple case of
$$
\frac{\partial\varphi}{\partial n}=0
$$ between two regions.
Answer: Since the problem is treated in subdomains-poisson for the case, where the mesh is aligned with the interface, I assume in the following that in your case the jump can occur anywhere.
I think the first step here is not to think about implementation FEniCS, but rather to find an adequate variational form for this problem, where the interface conditions are properly incorporated. The problem looks like it can be treated with a variant of the following method:

Hansbo, A. and Hansbo, P. An unfitted finite element method, based on Nitsche's method, for elliptic interface problems (Comp. Meth. in Appl. Mech. and Eng., Volume 191, Issues 47–48, 22 November 2002, Pages 5537–5552)

Disclaimer: There may be others and maybe also better alternatives for your specific case, but I am mostly familiar with Nitsche-type techniques.
Once you have an idea about how to discretize your problem, you can think about implementation in FEniCS. As far as I know, it is not possible to implement this method straightforwardly in vanilla FEniCS. dolfin-olm may be used to implement this method. I have not used it so far, I don't know if it works with the current version of FEniCS, and I don't know if they merged (parts of) it into dolfin in the meantime.
Again, note that in standard finite element methods the interface condition can be taken into account by aligning your mesh with the interface. If that is an option, you should go for that.
Comment: Let's say I can align my mesh with the interface. How can I specify the boundary condition $\varepsilon_1\frac{\partial\varphi_1}{\partial n}=\varepsilon_2\frac{\partial\varphi_2}{\partial n}$ on that interface then?
Comment: As far as I can see, you don't need to care about the interface condition then. From a variational point of view, only one of the conditions has to be satisfied. For instance, when you look at the Hansbo-Paper, you can see that for $g=0$ (which is your case), all interface terms vanish if your trial and test functions are continuous across the interface.
Comment: Ah, right! FEM solves an integral form of the Laplace equation. In integral form $\varphi$ doesn't have to be smooth. Thanks!
Comment: I read the tutorial. The tutorial is chapter 1 of the book. I didn't say I read anything that includes Chapter 9. I don't appreciate that your comment makes it look like as if I lied or something. Thanks for pointing me to the chapter that I should read anyway.
Comment: I know about Section 5 of the tutorial. I carefully read it, as I absolutely clearly mentioned it in my initial post. That section does not contain information about the kind of boundary conditions at interfaces I was interested in. I mentioned this in my initial questions as well. I hope this will resolve your doubts about the fact that I can attentively read English texts.
Answer: Vatiational formulation of Poisson problem with $\varepsilon \in L^\infty$
Both interfacial conditions are incorporated in following variational problem.
Given

$\Omega$ Lipschitz domain
$\partial\Omega = \Gamma_\mathrm{D} \cup \Gamma_\mathrm{N}$
$V=\{v\in H^1(\Omega); v|_{\Gamma_\mathrm{D}}=0 \} $
$\varepsilon\in L^\infty(\Omega)$
$g \in L^2(\Gamma_\mathrm{N}) $

find $\varphi\in V$ such that
$$ \int_\Omega \varepsilon \nabla \varphi \cdot \nabla \psi \;\mathrm{d}x = \int_\Omega \rho \psi \;\mathrm{d}x + \int_{\Gamma_\mathrm{N}} g \psi \;\mathrm{d}S \quad \forall \psi\in V$$
Here $g$ represents Neumann condition on $\varepsilon\frac{\partial \varphi}{\partial \mathbf{n}} = g$ on $\Gamma_N$. Both your interfacial conditions are handled automatically by this formulation. You check it by dividing $\Omega$ into subdomains where $\varepsilon$ takes two different values and testing by something close to characteristic functions of these subdomains. Moreover $\varepsilon$ can be much more arbitrary - essential boundedness suffices. Note that I threw away $4\pi$ which corresponds to SI units. If you would like to derive this formulation from physicist point of view, just take Gateaux derivative of field energy minus charge energy in appropriate (accounting to Dirichlet condition) space.
For implementation in FEniCS just pick conforming FE space, i.e. arbitrary order Lagrange/CG elements. Problem is implemented in subdomains-poisson demo assuming discontinuity in $\epsilon$ matches mesh facets.

Discontinuity in $\varepsilon$ non-matching with mesh
If you need discontinuity non-matching mesh, you could try DOLFIN-PUM library which implemets XFEM/PUM method. It is not maintained now and Garth said that there are plans for better implementation directly into FEniCS. Library is able to integrate exactly this type of discontinuity in $\epsilon$. But there is additional problem that XFEM/PUM method introduces dicontinuity also to your solution and you need to enforce somehow continuity. It can be solved with Lagrange multiplier, penalty, etc. but I can't rememeber if I succedeed doing this.
You can also solve problem with non-matching mesh using standard formulation and increase quadrature degree or interpolate $\varepsilon$ to some higher-order space prior to computation. I also use $C^k$ approximation to Heaviside function with $k=0,1,2$ to define material discontinuities. You can implement this using conditional. None of these approaches can be integrate $\varepsilon$ exactly but it could enhance solution somehow.


writing dialogues using contracted forms of auxiliary verbs

Question: where should we use contracted forms while writing dialogues? how do we chose which is better (say 'do not' or 'don't') in a particular situation while we are writing dialogues in our fiction?
Answer: As with any dialogue choices, you would use the word that the character would be most likely to use.
Try to hear them in your mind, or chose an actor to portray them (in your imagination!) and hear how that actor says the words, or write a character diary until you get the character's voice figured out, or do whatever else you need to do until you understand that character and know what words s/he would use.
And, of course, keep in mind that the same character will speak differently in different situations.
But it all comes down to knowing your characters, and using that knowledge to have them behave in character.
Answer: Imagine you're a child and your Dad is giving you some friendly advice.
"Don't get too close to the cliff edge."
Now imagine your Dad is giving your teenage self the world's coldest and most deliberate telling off.
"Do not EVER backchat me like that again!"
Same man, different context. A work mate is asking a question.
"I've no idea. I haven't a clue. I wouldn't even know where to start looking for answers."
Same man, different context. He's a lawyer in Court.
"Do not think, ladies and gentlemen of the jury, that the accused is as innocent as he seems. He may look as if he would not hurt a fly but I intend to demonstrate that he has not got an alibi for the night in question and that he killed more than forty innocent people before dawn."
As the first answer states, it all depends on context, the status and education of the speaker and the effect they are trying to achieve. Generally speaking, very formal contexts or contexts where we are deliberately trying to impress are when we use the expanded form of words, more informal occasions are when we tend to use the contracted forms.


Jesus' was a muslim?

Question: Was Jesus a Muslim ? And should we take the new testament as hadith as it is just a narration of Jesus' life by John , Luke , Mark and others ?
Comment: Islam by definition means surrender and submission only to the one true creator. A muslim by definition means one who surrenders and submits to the laws of God.
Comment: How can you make sure they're authentic? And what is the point in reading fake / altered material? Besides aren't Qur'an and Hadith sufficient?
Answer: Of course. He was a Muslim, a noble prophet and a messenger of ALLAH(SWT). All prophets were Muslim. How can we know?

Abraham was neither a Jew nor a Christian, but he was one inclining toward truth, a Muslim [submitting to Allah ]. And he was not of the
polytheists. [ALI 'IMRAN (FAMILY OF IMRAN) - 67]
Or do you say that Abraham and Ishmael and Isaac and Jacob and the Descendants were Jews or Christians? Say, "Are you more knowing or is
Allah ?" And who is more unjust than one who conceals a testimony he
has from Allah ? And Allah is not unaware of what you do.  [AL-BAQARAH
(THE COW) - 140]

Even we think in logical, from Prophet Adam(peace be upon him) to Prophet Muhammad(ﷺ), purpose of all of them is that issue for ALLAH(SWT). And, they talked for mercy of ALLAH(SWT). However, because we can't know whether the words belonged to Prophet Isa or not, we never consider them as hadith or something. Because we believe that all writings before Prophet Muhammad(ﷺ) were changed and distorted. You may think how you can know perish the thought! whether noble Quran is changed or not. I know from the verses in Quran

Indeed, it is We who sent down the Qur'an and indeed, We will be its guardian.  [AL-HIJR (THE ROCKY TRACT) - 9]
O you who have believed, obey Allah and obey the Messenger and those in authority among you. And if you disagree over anything, refer it to
Allah and the Messenger, if you should believe in Allah and the Last
Day. That is the best [way] and best in result. [AN-NISA (THE WOMEN) -
59]

Consequently, we can't know and believe reality of the words of the others in this day and age aside from Prophet Muhammad(ﷺ)
Comment: "Because we believe that all writings before Prophet Muhammad(ﷺ) were changed and distorted." You can actually find great wisdom and knowledge from the previous books, as we pledge as true muslims to believe in.

Jesus' was a muslim?


Can Xcode installed from a dmg file to updated automatically

Question: I wanted to install the latest Xcode 6.1 from here https://developer.apple.com/downloads/index.action#, because a lot of things cannot compile with Xcode 6.0.1 on Yosemite. However, I want to know whether this will force me to manually update Xcode in the future. Can the Xcode installed from other sources benefit from auto update in the App Store? Or is there builtin updater in Xcode?
Answer: if you instal Xcode from the dmg file it will not update automatically. you have to download the updates and install manualy.
or download the new version from app store once


How to simulate cointegrated prices

Question: Is there any simple way to simulate cointegrated prices?
Comment: One of the easier ways to think about it is simulating a bivariate VAR system in (ln) levels where there is contemporaneous correlation. So you would begin by simulating the correlated errors (per chrisaycock's link) and then add back in the autoregressive structure. This would give you the simulated log levels, so then just take $exp$ to convert to prices.
Comment: possible duplicate: http://quant.stackexchange.com/questions/1027/how-are-correlation-and-cointegration-related
Comment: There are some previous questions about *correlation* rather than *cointegration* that may be helpful: [How to simulate correlated assets for illustrating portfolio diversification?](http://quant.stackexchange.com/q/2892/35) and [How to generate a random price series with a specified range and correlation with an actual price?](http://quant.stackexchange.com/q/2453/35)
Comment: @John Could you please re-post your comment as an answer.
Answer: Consider a $T \times N$ matrix of potentially cointegrating prices $P$. Define $Y_{t}\equiv ln\left(P_{t}\right)$. In the multivariate framework, there are two basic methods to estimate the cointegrating relationships. The first is an error correction framework of the form
$$\Delta Y_{t} = \beta_{0}+\beta_{1}\Delta Y_{t-1}+\beta_{2}Y_{t-1}+\varepsilon_{t}$$
 that is most convenient when attempting to perform statistical tests on the coefficients. The alternate approach is a vector autoregressive model of the form
$$Y_{t} = \beta_{0}+\beta_{1}Y_{t-1}+\varepsilon_{t}.$$
For the purposes of simulation, they are effectively equivalent. One must estimate $\beta_{0}$ and $\beta_{1}$ and solve for $\varepsilon_{t}$. There are many potential distribution assumptions that one could make about the behavior of $\varepsilon_{t}$, but a simple one would be that it follows a multivariate normal distribution with a mean of zero and a covariance matrix equal to the sample covariance matrix. More complicated assumptions might be that the variances and correlations are time-varying or that there are fat tails. For financial time series, these may be important to consider.
To simulate $\widetilde{Y}_{t+1}$, you thus obtain $\widetilde{\varepsilon}_{t+1}$ by whatever means are appropriate and calculate
$$\widetilde{Y}_{t+1} = \beta_{0}+\beta_{1}Y_{t}+\widetilde{\varepsilon}_{t+1}$$
For $i>1$, one would need to be careful to incorporate the simulated values from the previous period so that
$$\widetilde{Y}_{t+i} = \beta_{0}+\beta_{1}\widetilde{Y}_{t+i-1}+\widetilde{\varepsilon}_{t+i}$$ in order to ensure the autoregressive features in each simulated path.
After calculating the simulated values of $\widetilde{Y}_{t+i}$, one would want to convert them back to prices by calculating $\widetilde{P}_{t+i}\equiv \mathrm{exp}\left(\widetilde{Y}_{t+i}\right)$.
Answer: One way to construct cointegrated timeseries it to use the error-correction representation (see Engle, Granger 1987 for details of the equivalence).
To generate two timeseries that are cointegrated, start with your cointegrating vector $(\alpha_1, \alpha_2)$ so that you want $\alpha_1x_t + \alpha_2y_t$ to be stationary; choose initial values $x_0, y_0$ and a parameter $\gamma\in (0,1)$ that controls how strongly cointegrated the series are.  Then generate each timestep as:
$x_{t+1} = x_t - \gamma  (x_t + (\alpha_2/\alpha_1)y_t) + \epsilon_{1t}$
$y_{t+1} = y_t - \gamma  (y_t + (\alpha_1/\alpha_2)x_t) + \epsilon_{2t}$
For price series, it's generally the cumulative returns that you want to be cointegrated.  To generate prices, as John mentioned in his comment above, follow the above procedure for log-prices, then exponentiate.
Answer: I don't think the accepted answer fully answers the question. In particular simulating a non-stationary VAR is not guaranteed to give you a cointegrated system, and we may be interested in simulating $n>2$ time series. To be specific, the question is asking how to simulate a vector time series $Y_t \in \mathbb{R}^n$ with the following properties:

$Y_t \sim I(1)$ - the time series is integrated of order one.
There exists some (non-zero) cointegrating vector $\boldsymbol{a} \in \mathbb{R}^n$ s.t. $\boldsymbol{a}^TY_t \sim I(0)$, and $\boldsymbol{a}$ is unique up to a constant.

Here is a strategy based on simulating a non-stationary VAR.
VAR representation
A cointegrated system will admit a VAR(p) representation:
$$Y_t = \boldsymbol{\mu} + \Phi_1 Y_{t-1} + ... + \Phi_1 Y_{t-p} + \boldsymbol{\epsilon}_t$$
$$\Leftrightarrow \Phi(L) Y_t = \boldsymbol{\mu + \epsilon_t}$$
With $n$ time series there may be up to $n-1$ linearly independent cointegrating vectors $\boldsymbol{a}_1,...,\boldsymbol{a}_h$ which together form a basis for the space of cointegrating vectors that needs to be specified as part of the simulation. In particular letting:
$$\boldsymbol{A}^T = \begin{bmatrix}
\boldsymbol{a}_1^T\\
\vdots \\
\boldsymbol{a}_h^T
\end{bmatrix}$$
Then $\boldsymbol{A}^TY_t \sim I(0)$ is a stationary vector. A bit of algebra (not shown here for convenience, see 19.1 in Hamilton) gives that every row of $\Phi(1)$ is a cointegrating vector and so is part of the space spanned by $(\boldsymbol{a}_1,...,\boldsymbol{a}_h)$.
In particular there must be some $n \times h$ matrix $\boldsymbol{B}$ such that the VAR coefficients satisfy (i)
 $\Phi(1)=\boldsymbol{BA}^T$, and (ii) $|\Phi(z)|$ has exactly $n-h$ unit roots.
Simulation strategy
Based on the above a simulation strategy using a non-stationary VAR(1) is as follows:

Choose $n$ the dimension of the time series to simulate, and $h \leq n-1$ the number of cointegrating relationships.
Generate an $n \times h$ orthonormal matrix $\boldsymbol{A}$.
Set $\Phi = \boldsymbol{I} - \boldsymbol{AA}^T$
Simulate $Y_t = \boldsymbol{\mu} + \Phi_1 Y_{t-1} + \boldsymbol{\epsilon}_t $ using standard techniques.

In R random orthonormal matrices can be generated with the randortho command in the pracma package. This strategy can be extended to general VAR(p), but care has to be taken to ensure that the matrix of VAR coefficients in companion form does not have any eigenvalues greater than 1.
Notice also that the cointegration property is completely independent of the covariance structure of the innovations, we need only that $\boldsymbol{\epsilon}_t$ be white noise.
R code
Here is some R code for generating cointegrated time series with arbitrary $n$ and $h$. The code is used to generate 10 time series with three cointegrating relations.
library(docstring) # document function
library(pracma) # random orthonormal
library(mvtnorm) # multivariate normal

cointegrated.vector <- function(tt,n,h,C,burn = 1000){

  #'@param tt int, time points to simulate
  #'@param n int, number of time series
  #'@param h int, number of cointegrating relations
  #'@param C innovation covariance structure of innovations
  #'@param burn

  tot.t <- tt+burn
  innov <- rmvnorm(tot.t,rep(0,n),C)
  X <- matrix(0,1+tot.t,n)

  A <- randortho(n)[1:h,]
  if (h == 1) Phi <- diag(n) - outer(A,A)
  else Phi <- diag(n) - t(A)%*%A

  for (i in 1:tot.t){
    X[i+1,] <- Phi%*%X[i,] + innov[i,]
  }
  X[-burn,]
}

plot.ts(cointegrated.vector(100,10,3,diag(10)))

Comment: Trying to follow your argument. Isn't AAT=I when A is orthonormal?
Comment: Sorry, to be clear the A is rectangular with _orthonormal columns_ so A'A is the h x h identity matrix but AA' is an n x n matrix with dense columns.

How to simulate cointegrated prices


Can Ballistic Parachute Recovery Systems be safely deployed in a storm?

Question: Suppose the plane is in a thunder storm, and the pilot loses control of the airplane. Would deploying the ballistic parachute be a safe option? Meaning, is it likely that everyone would come out alive? Assume that as soon as the plane hits the ground at a reasonable speed the occupants are safe(as in, there's no ocean to drown in). Has this ever been done before?
Comment: It's worth a try considering the alternative.
Comment: I thought you have done that with personal parachute out of a 727? The fact is trying to avoid such severe storm is cheaper, safer and more effective thab parachute the whole plane down.
Comment: CAPS deployment is unsafe by definition.
Comment: @GdD I don't think it is. Don't they have a perfect safety record within certain specified parameters? By unsafe I mean >10% chance of death.
Answer: Manufacturers are going to have different opinions of this scenario, but this answer follows the opinion of Cirrus Aircraft in their flight manuals and CCIP syllabi for the SR2X airplanes.
First off, your best bet is to obtain a proper weather briefing prior to departure and obtain in-flight weather updates enroute so you can stay out of a thunderstorm in the first place.  The CAPS has very specific guidelines for operations as well as a maximum demonstrated safe deployment speed, depending of the model of aircraft.  The flight manuals for the SR2X aircraft all state that:
<code>"However because the CAPS is expected to result in structural damage to the airframe and, depending upon adverse external factors such as high deployment speeds, low altitude, rough terrain and high winds, the CAPS deployment may result in severe injury or death to the occupants and its use should not be taken lightly"</code>.
Barring that and you actually enter a thunderstorm which is so severe that it either causes departure from controlled flight or structural failure, there is a clause in the CAPS literature stating that if an accident is imminent, even if the acitivation of the CAPS is outside the demonstrated safe deployment range, it should be utilized and activated nonetheless.  The reason has to do with minimizing the amount of energy on impact and even a partially deployed or damaged CAPS is going to slow the aircraft considerably, increasing your chances of survival.
Bottom line is that you did something stupid vis a vis a serious lack of judgment where a safe recovery is no longer possible.  Whatever happens in the next few minutes is probably going to hurt really bad; the only thing we can do is make every effort to minimize how badly we are hurt and minimize the chances that we are going to be killed.  Even an unsafe CAPS deployment in this situation is better than riding down to impact without.
Comment: That's good research, but in the end (as the OP doesn't ask for "is it safer than", but "is it safe"), if Cirrus says *the CAPS deployment may result in severe injury or death to the occupants*, the answer to the question *Can Ballistic Parachute Recovery Systems be safely deployed in a storm?* must be: Deploying the CAPS, regardless of the conditions, is not safe.
Comment: No, it's like any other piece of safety equipment.  It has been demonstrated to reduce the risk of injury or death, but there is no guarantee that injury or death won't happen if it is used.  In a similar vein, automobile airbags can save lives in accidents but there is no guarantee that serious injury or death in an accident won't happen even if the airbag deploys successfully.
Answer: In contrast, consider the success rate of another emergency egress aircraft system: The ACES II ejection seat USAF reports that in envelope success rate of ACES II is 94.4%, and combined in envelope and out of envelope success rate is 89.9%.
Out of envelope means the seat was employed in conditions it hasn't been certified for.
Success means the pilot lived, not necessarily uninjured.
So, first consider that these sorts of emergency parachute systems are not a 'safe' option, they're just considered better than guaranteed death.
As for the BPRS, it is not a 'safe' option under any circumstance. It is quite possible that the chute lines could get tangled up in the aircraft - remember that it will be deployed into a powerful wind, and in the event of structural failure, say a wing coming off, the aircraft might be spinning as it falls, tangling the chute lines.
Consider the fate of Vladimir Komarov, test pilot, aeronautical engineer, and cosmonaut. Faced with a failing Soyuz 1 spacecraft, he brought it into re-entry manually with almost no instrumentation and little ability to control it (an amazing feat), only to have the wildy gyrating capsule tangle it's parachute lines and impact the ground at high speed.
The BPRS would be considered a valid option, if the only other option was hitting the ground with no braking at all.
Deploying the BPRS in a storm would be essentially the same as making a parachute jump into a storm, subject to the same hazards, such as gusting winds collapsing the chute.
The only safe option for a light aircraft is to avoid storms completely.


French + Swiss residence permits for a non-EU citizen

Question: I am a non-european studying in France on a Ph.D. and I renew my student residence permit every year. Actually I do an internship for 6 months in Switzerland that was signed as a convention between French and Swiss university and I have an L-permit.
Now the Swiss propose me to stay until December to finish the current project, but that will be the stay outside the dates of signed convention between universities.
Is there any danger to prolongate my swiss L-permit, if I plan to return to France and to re-apply for the student permit?
May it be considered by French authorities as the interruption of résidence habituelle?
Answer: It won't be a problem, as you mentioned it's a convention between French and Swiss university, so from legal point of view it's like you still studying in France and Swiss university now it's like an internal department.
So nobody can interrupt your visa.
However, by my personal experience, especially for your future career, I would suggest you to remain in Switzerland.


Seeking Variables Codebook for Merged 2018-2019 PP College Score Card Data

Question: Can anyone direct me to where I can access the Variables Codebook for the Merged 2018-2019 PP College Score Card Data? It would be most helpful to connect with this resource by 11/18/2020.
Answer: The data dictionary for the Scorecard data can be found here under the link Data Dictionary. You will be interested in the tab "institution_data_dictionary" of the excel file.


Are flight attendants paid in the same way pilots are paid?

Question: I understand that airline pilots are generally paid for their time "in flight", which means the clock starts when the aircraft begins to move away from the gate. Are flight attendants paid in the same way?
Comment: I am VtC as too broad, unless the OP narrows this down to one (or at most a few) jurisdictions.
Comment: Considering that the actual work of a pilot starts way before moving the plane, I'm kind of surprised to hear that. Maybe when cutting costs they'll refuse to pay any time on autopilot ;-)
Answer: It mightn't be a bad idea to specify which country you are talking about, as practices can vary throughout the world, and potentially even amongst individual airlines within the same country.
Last year I looked into becoming a FA for a smaller Australian airline. The pay arrangements were:

A guaranteed minimum annual salary (which was about $45k)
On top of that,  flying wages based on scheduled flight times (4.20 per hour, a bit extra per hour for the hours worked above an agreed number of hours in a month). Note that even if a flight is delayed it is still issued with adjusted scheduled times. The 'padding' applied to regular scheduling works in favour for the employees here.

However, I believe the US  works completely differently. And as I said, this is an example from only one airline.
Answer: It really all depends on the airline and their CBAs with various unions. Practically every major job role you encounter while taking a plane trip is represented in the U.S. by a different trade union; there's a pilot's union (several actually, biggest is the ALPA but some major carriers like AA and USAir have their own), a flight attendants' union (AFPA and AFA-CWA plus some carrier-specific affiliates), a mechanics' union (AMA and AMFA), a ground crew's union (mainly AFL-CIO or TWU), a baggage handlers' union (also either TWU or AFL-CIO but it can differ from the one for maintenance crews), an ATC union (NATCA), and even the TSA screeners are now unionized through the American Federation of Government Employees.
All of these unions negotiate more or less independently with the airlines on many things, including pay structure. It's often a matter of who gets there first when there are rumors of increased airline profits; on one airline the flight attendants might be treated like gold while the pilots are making peanuts and pushed right up against FAA regs on working hours and conditions, while the exact opposite may be true just one gate down. Exactly how they're compensated is usually public information since the airlines themselves are publicly traded and this information is part of their cost structure, but it is more likely to be different between airlines than the same, especially for a major U.S. carrier whose flight crews are represented by company-specific unions.


What name could be used in building code for "interior drain tiles"?

Question: I'm searching Chicago building codes for anything about drain tiles to be installed inside a home. http://dev.chicagocode.org/ is the site I'm using. They have a ton of material about the sump pumps, however I can't find anything about the drain tiles themselves, how deep, how far from the wall, etc. Something has to exist for this, I just can't find it. Does "drain tile" go by another name?
Comment: Are you trying to be code compliant, or are you looking for good advice/best practice from the code? Because if the former, and there is nothing, then don't worry about it. If the latter then also look at codes from other cities.
Comment: Could be called a "french drain."
Comment: @Ariel I'm looking for both. I want to do it right and not get burned by an inspector :).
Comment: @iLikeDirt I saw the french drain, however it sounded to me like it was dug from ground level and not in a basement.
Comment: It might be called a perimeter drain.
Answer: The code seems to use the term "subsurface soil drainage", but I wasn't able to find any detail on subsurface drainage.

§ 18-29-712.3.2
Sump pit.
The sump pit shall be not less than 18 inches (457 mm) in diameter and 30 inches (762 mm) deep, unless otherwise approved. The pit shall be accessible and located such that all drainage flows into the pit by gravity. An approved sump pit or tank within a building receiving the discharge from sanitary drains, storm water or combined drains shall be constructed of steel, cast iron, reinforced concrete pipe or other approved materials. The sump or tank receiving the discharge from subsurface soil drainage shall be constructed of vitrified clay tile or any of the above materials. Approved plastic or fiberglass liners may be used in conjunction with any of the approved materials referenced above. The pit bottom shall be solid and provide permanent support for the pump. The sump pit shall be fitted with a gas-tight removable cover adequate to support anticipated loads in the area of use. The sump pit receiving sanitary flow shall be vented in accordance with Article 18-29-9.

I also searched for vitrified clay tile, but didn't come up with much.
I'm not sure how useful it is, but International Residential Code (IRC) has this to say.

International Residential Code 2012
Chapter 4 Foundations
Section R405 Foundation Drainage
R405.1 Concrete or masonry foundations.
Drains shall be provided around all concrete or masonry foundations that retain earth and enclose habitable or usable spaces located below grade. Drainage tiles, gravel or crushed stone drains, perforated pipe or other approved systems or materials shall be installed at or below the area to be protected and shall discharge by gravity or mechanical means into an approved drainage system. Gravel or crushed stone drains shall extend at least 1 foot (305 mm) beyond the outside edge of the footing and 6 inches (152 mm) above the top of the footing and be covered with an approved filter membrane material. The top of open joints of drain tiles shall be protected with strips of building paper. Perforated drains shall be surrounded with an approved filter membrane or the filter membrane shall cover the washed gravel or crushed rock covering the drain. Drainage tiles or perforated pipe shall be placed on a minimum of 2 inches (51 mm) of washed gravel or crushed rock at least one sieve size larger than the tile joint opening or perforation and covered with not less than 6 inches (152 mm) of the same material.
Exception: A drainage system is not required when the foundation is installed on well-drained ground or sand-gravel mixture soils according to the Unified Soil Classification System, Group I Soils, as detailed in Table R405.1.
R405.1.1 Precast concrete foundation.
Precast concrete walls that retain earth and enclose habitable or useable space located below-grade that rest on crushed stone footings shall have a perforated drainage pipe installed below the base of the wall on either the interior or exterior side of the wall, at least one foot (305 mm) beyond the edge of the wall. If the exterior drainage pipe is used, an approved filter membrane material shall cover the pipe. The drainage system shall discharge into an approved sewer system or to daylight.

I've found that most building departments are quite helpful, and enthusiastically provide information to inquisitive homeowners.  Your best bet might be to contact your local building department, and see what information they can provide.


Is there any way to stain white pine to match a natural red pine?

Question: We are building a bed frame and my hubby accidentally got white pine for the head board, but red pine for the posts and the wood for the sides of the bed. We wanted to stain the whole bed a rustic color, unsure which stain at this point because we don't know what to choose since we have different color pines. We can't return the wood because they have already been cut and sanded. What is our best course of action.
Comment: Trial and error. Have you done any testing? Maybe it won't be noticeable with your particular stain.
Comment: test on the scraps, if you still have them
Comment: The best place to practice and experiment with the headboard would be on the side that is next to the wall, this won't be visible when in use and you can try different shades of stain. Personaly the post being a darker color may accent them so it could be a positive. To make them look similar a darker shade on the white and a neutral on the red can be tested on the back side, my oak head board has 3 different colored sections so my wife could choose what she liked the best.
Answer: I have had good success making pine look like maple, walnut, teak or semi-transparent blends by mixing deep colors and adding latex paint to an oil based stain to make it more pastel like to tone down the contrast. I even made K3 particle board stain like old mahogany with many thin layers of brush grain stain and urethane for a dining room table extension . Usually I might brush on and wipe off excess for contrast  or apply a sealer first lightly for less contrast.
If you like my idea towards a slightly semi-transparent stain rather than a clear stain consider taking 1/4 cup in  yogurt container then add teaspoon of latex white or any colour you are inclined towards . Then experiment on a hidden side with untinted and tinted then add more latex stir and try again until you get a blend of clear stain and semi-opaque or "milk-stain".
THe above are the typical mini-wax stains.
Answer: Your best solution is probably a quality gel stain. That way you mitigate pine's notorious blotching when stained while making the pieces similar in color. (Obviously it won't change the grain.)
A solid plan of attack is to lay out each stage of finishing on a separate stick, so you can see how it will turn out. That is stain about three inches of a board, then stain and clear coat another three inches, the whole shebang on another three inches. That way you have a reproducible process you know will work.
I'd also highly recommend a trip to the local library to pick up a copy of Flexner on Finishing which covers the lion's share of possible finishes and has a very nice pictures of various wood and finish combinations.