How do you install a solar light tube through an outside wall into the basement?

Question: In renovating a basement, is it possible to install a solar-light-tube through the wall to the outside and still gather light?
Answer: I'm assuming you need at least one bend to do this? Otherwise you could just put in a window. Adding bends significantly decreases light transmission. The inlet also needs an open view of the sky for maximum light gathering. An inlet on or next to a wall cuts access at least in half, possibly more depending on orientation.
You could run it up to the roof just like a chimney, but added length also diminishes light transmission. These tubes are best with fairly straight, short runs. Complex installations are just not worth it. From what I've seen, even with simple installations, the transmitted light is only decent on bright sunny days. It's relatively weak otherwise.
In the end, the precise details of your installation would determine if this is practical. The manufacturer has recommended maximum bends and lengths in their installation instructions, based on a roof top inlet. The maximums should be reduced significantly for wall installations.
Answer: Will the tube be straight? Are you running the tube above the foundation and sill and under the floor joists? So the tube is sneaking just over the outside foundation?
If so, it will be like a round window and gather some light. If you put it on a sunny wall it will bring in good light, especially when the sun hits it.
I put one on the north side of my roof in an attic. Even without direct sunlight it brings in a lot of light.
Answer: This can work well.  Your choices are wall mount or roof mount.  The wall mount can be a straight shot, which will gather light when the wall is illuminated.  The roof mount involves a 90 degree bend which is supported by the tube skylight vendors.
Post pictures for more advice.


Portfolio Optimization : Shrinkage of Covariance Matrix when data is available

Question: It seems that shrinking the covariance matrix is especially useful if the number of individual stocks is greater than the number of data points. However is there any special gain if you're not constrained by the data ?
Comment: Just as a short comment: if the number of stocks is greater than the number of data points (e.g. days) then the sample covariance matrix is singular. Optimizers will reject such matrices as they allow for pathological results (if constraints do not prevent this). Furthermore if I have e.g. 250 days of data and 400 stocks (this something like $400*399/2$ correlations to estimate) how can I do this in a consistent way on 250 days - we should not believe too much in such an estimate.
Comment: No, there are 2 misunderstandings: shrinkage (or some other reduction technique) is necessary if you have more stocks than days AND (!) it is useful in general. For your second sentence: it must not depend on your sources. If you are a professional portflio manager then you have data for thousands of stocks. Obviously you might want to do some analysis on say 500 stocks using 1 year of look-back period. Then you need shrinkage. Count the stocks in big indices. You universe is not limited by online ressources but it is detemerined by the market that you want to cover and the look-back period.
Comment: You don't want to use 10 years of data just because your universe contains a lot of stocks. It is debatable whether you want to use pre-2008 data for an optimization with a holding period of say 6 months from now.
Comment: So it really seems like shrinkage is useful in this setup but not when the number of days is greater than the number of stocks. I don't really understand how, given the incredible amount of ressources online, one could be in the situation where one has more stocks than days.
Comment: Thank you, the paper didn't make it clear it was useful in general. I thought the greater the look back period the better but you're raising an interesting point.
Comment: What do you mean by data points in terms of "Portfolio Optimization"?
Comment: In Richard's example, with 250 days worth of data you still can compute returns and variances for each individual asset and covariance pairwise, http://en.wikipedia.org/wiki/Modern_portfolio_theory
Answer: There's more than one way to shrink a covariance matrix. You can think of shrinking a covariance matrix as part of general class of estimators that limit the norms of a matrix. You could alternately think of shrinkage as a form of Bayesian analysis. Given the broad set of techniques one could use, it can be more helpful to think in terms of techniques to reduce estimation risk.
For instance, suppose you simulate some data (really you want to simulate a mean and covariance with error and then simulate data using those parameters) and then apply techniques that reduce the impact of estimation error while constructing an efficient frontier. If you do this many times, you will find that the techniques that reduce the estimation error will be closer to what the frontier would look like if you knew the true mean and covariance than if you used the sample parameters. So to this extent, techniques do reduce estimation error would be a good thing.
In practice, the techniques lead to more diversified (less concentrated) portfolios and increase stability over time, which tends to reduce turnover. It's not necessarily clear that the techniques would lead to better returns, however.
Comment: Well thanks a lot for all the info. But I'm still wondering if it's useful if I have enough data. I'm using the technique in "Honey, I shrunk the sample covariance matrix"
Comment: You seem to be focused on shrinkage only to ensure the covariance matrix is positive definite. That's not the only reason to use shrinkage. Reduction of estimation error is another reason. My answer focused on the benefits of reducing estimation error.
Comment: Oh but that's exactly what I'm trying to do. I'm contemplating the idea of shrinkage to reduce the estimation error of the sample covariance matrix, I'm just not sure if it's useful.
Answer: When using the estimated covariance in the context of mean-variance optimization, then, yes, shrinking the covariance matrix is useful even when you have sufficient data.
A good reference is Golts and Jones, A Sharper Angle on Optimization, who discuss convariance shrinkage among other techniques and give two examples of the usefulness of shrunk covariance estimates in forming (unconstrained) optimal portfolios. The first is desensitizing the optimizer to small variations in alphas of highly correlated assets. The second is controlling leverage.


CSS: UL elements takes incorrect size when wrapping LI elements

Question: I seem to have hit a wall with this layout issue:
I've got a specifically positioned
 with a
 inside of it. Each
 of the grid has an  with an  in it (thumbnails), linking to the larger image. This forms a decent image grid, flexible in size as the
 elements wrap in smaller window sizes. Pretty basic, degrades nicely, etc...
The problem is that now I would like to center the grid within the
. I am setting the
 to float: left; so that it contracts to the size of the contained items instead of the default 100% width. I then use position: relative; right: 50%; on it, and then position: relative; left 50%; on the
. This should have the effect of moving the list centered in the div (you can get a better idea of what I'm going for from reading this article), but the problem is that the
 is trying to stretch as wide as it can to accommodate the overflowing list, and is therefore wider than the area of its containing elements. The end result is that the calcultions are thrown off, and my grid isn't centered.
If that needs clarification, I'll do my best, but the question is: is it possible to force a containing element (in this case a
) to shrink to the size of its child elements in a situation where wrapping is occurring? I'm trying to avoid javascript completely.
Answer: facepalm

 and
 fixes that right up. Should have known it'd hit me right after posting!


Was God actively involved in bringing out the Holocaust?

Question: Did the Holocaust occur due to G-d's active involvement, or was it due to Him merely removing His protection from them?
Comment: Since HASHEM is transcendent beyond time, there is no distinction between creating a universe in which the Holocaust "will" happen and actively "causing" it to happen. The "why" of it is entirely speculative absent explicit prophecy.
Comment: So. I see three answers here, one saying yes, one saying no, and one saying maybe. This is Judaism; I should have expected no less.
Comment: Related: http://judaism.stackexchange.com/q/8855 http://judaism.stackexchange.com/q/38809
Comment: If you don't want to be considered heretic suggesting things can happen without G-d's control, I'd suggest you add "in our view" or "in our eyes".
Answer: According to Rabbi Yissachar Shlomo Teichtal, author of Eim Habanim Smeicha,  Hashem personally orchestrated it. For those unfamiliar with the book, he wrote it while hiding in Budapest, with all sources quoted from memory. He breaks from typical Chareidi thought and encourages aliyah. I will quote from the English translation, as that's the copy i own.
It's a very long book, and i don't know where exactly the quote can be found, but someone said that it's written that people asked him where Hashem is, and he said in the Nazi ovens, i.e. He is the cause of this.
In any case, simply looking at some of the subtitles show that this was indeed his opinion.
In chapter 1 IV, The sole purpose of our afflictions is to arouse us to return to the Holy Land.
In chapter 3 I, in the section titled Today's hardships are God's way of telling us to return to our Land, he writes:

Now, however, the Gentiles have taken away our very right to live; they have deprived us of all means of sustenance; they have broken our staff of bread. Therefore, it is clear that the Holy One Blessed be He has removed this "promise of exile." It is as if He is telling us explicitly, "My children, I do not want you to remain in the lands of exile anymore. Therefore, I will no longer protect your stay in Diaspora. Rise up, go to your mother's bosom, and return to the Land of your forefathers." (emphasis mine)

Also, in section VI, there is a part titled Hashem afflicts us so that we will return to our Land, which again says that Hashem is doing this to cause us to return to Israel.
So, according to some, Hashem was certainly personally actively involved in bringing out the Holocaust.
Answer: I might think that not all would agree on this matter.
However, the psalmist seems very convinced that Jewish defeat and slaughter are very much in the hand of God. My Hebrew skills are not sufficient to say whether or not he suggests that "for your sake we are being killed" indicates that it is the reason that they are being targeted by their enemies or that they die as a kind of sacrifice to God. See verses 20-25 below:

JPS Psalm 44: 1For the Leader; [a Psalm] of the sons of Korah.
  Maschil. 2O God, we have heard with our ears, our fathers have told
  us; A work Thou didst in their days, in the days of old. 3Thou with
  Thy hand didst drive out the nations, and didst plant them in; Thou
  didst break the peoples, and didst spread them abroad. 4For not by
  their own sword did they get the land in possession, Neither did their
  own arm save them; But Thy right hand, and Thine arm, and the light of
  Thy countenance, Because Thou wast favourable unto them. 5Thou art my
  King, O God; Command the salvation of Jacob. 6Through Thee do we push
  down our adversaries; Through Thy name do we tread them under that
  rise up against us. 7For I trust not in my bow, Neither can my sword
  save me. 8But Thou hast saved us from our adversaries, And hast put
  them to shame that hate us. 9In God have we gloried all the day, And
  we will give thanks unto Thy name for ever. Selah 10Yet Thou hast cast
  off, and brought us to confusion; And goest not forth with our hosts.
  11Thou makest us to turn back from the adversary; And they that hate
  us spoil at their will. 12Thou hast given us like sheep to be eaten;
  And hast scattered us among the nations. 13Thou sellest Thy people for
  small gain, And hast not set their prices high. 14Thou makest us a
  taunt to our neighbours, A scorn and a derision to them that are round
  about us. 15Thou makest us a byword among the nations, A shaking of
  the head among the peoples. 16All the day is my confusion before me,
  And the shame of my face hath covered me, 17For the voice of him that
  taunteth and blasphemeth; By reason of the enemy and the revengeful.
  18All this is come upon us; yet have we not forgotten Thee, Neither
  have we been false to Thy covenant. 19Our heart is not turned back,
  Neither have our steps declined from Thy path; 20Though Thou hast
  crushed us into a place of jackals, And covered us with the shadow of
  death. 21If we had forgotten the name of our God, Or spread forth our
  hands to a strange god; 22Would not God search this out? For He
  knoweth the secrets of the heart. 23Nay, but for Thy sake are we
  killed all the day; We are accounted as sheep for the slaughter.
  24Awake, why sleepest Thou, O Lord? Arouse Thyself, cast not off for
  ever. 25Wherefore hidest Thou Thy face, And forgettest our affliction
  and our oppression? 26For our soul is bowed down to the dust; Our
  belly cleaveth unto the earth. 27Arise for our help, And redeem us for
  Thy mercy's sake. THE HOLY SCRIPTURES ACCORDING TO THE MASORETIC TEXT
  A NEW TRANSLATION Jewish Publication Society 1917

As pointed out in a comment, the appeal to God to "wake up" suggests some ambiguity.
Comment: could that mean that God did not prevent it? (why sleepest Thou)
Comment: There is some ambiguity. However, the fact that he seeks mercy suggests that he may see the abandonment to the enemies as a judgement rather than neglect. I added an acknowledgment of the ambiguity you pointed out to my answer.
Answer: The Ohr Hachayim Hakadosh mentions the oft quoted verse of Eicha, From above does not come forth the bad. This full verse is actually quoting the unbeliever as saying that both the bad and the good does not come from above. However, it is read this way as a Drush, very often.
The Medrash uses this verse to mean that good and evil is brought about by the person himself.
The Rambam in Moreh Nevuchim also describes the punishment as losing Hashgacha.
In summary, what happens is definitely within God's plan and permission. But it is in the form of the elements of the world playing out their true colors. Today, as well, there are plenty of those who would gladly commit another holocaust. Thank God they aren't getting their way. When we stopped meriting God's protection the outside elements do their thing. God did intervene at the moment it was to end.
The Gemara in Megilla mentions a related concept, that God is not happy when the evil are punished but He causes others to be happy. This generates an effect of suffering while others standby and laugh, that the whole universe is against you. But God Himself is not actually rejoicing.
Answer: Daniel's prayer in Daniel 9 suggests that the Holocaust was due to your first alternative:

"Lord, the great and awesome God, who keeps his covenant of love with those who love him and keep his commandments, 5 we have sinned and done wrong. We have been wicked and have rebelled; we have turned away from your commands and laws. 6 We have not listened to your servants the prophets, who spoke in your name to our kings, our princes and our ancestors, and to all the people of the land.
7 "Lord, you are righteous, but this day we are covered with shame—the people of Judah and the inhabitants of Jerusalem and all Israel, both near and far, in all the countries where you have scattered us because of our unfaithfulness to you. 8 We and our kings, our princes and our ancestors are covered with shame, Lord, because we have sinned against you. 9 The Lord our God is merciful and forgiving, even though we have rebelled against him; 10 we have not obeyed the Lord our God or kept the laws he gave us through his servants the prophets. 11 All Israel has transgressed your law and turned away, refusing to obey you.
"Therefore the curses and sworn judgments written in the Law of Moses, the servant of God, have been poured out on us, because we have sinned against you. 12You have fulfilled the words spoken against us and against our rulers by bringing on us great disaster. Under the whole heaven nothing has ever been done like what has been done to Jerusalem. 13 Just as it is written in the Law of Moses, all this disaster has come on us, yet we have not sought the favor of the Lord our God by turning from our sins and giving attention to your truth. 14 The Lord did not hesitate to bring the disaster on us, for the Lord our God is righteous in everything he does; yet we have not obeyed him.
15 "Now, Lord our God, who brought your people out of Egypt with a mighty hand and who made for yourself a name that endures to this day, we have sinned, we have done wrong. 16 Lord, in keeping with all your righteous acts, turn away your anger and your wrath from Jerusalem, your city, your holy hill. Our sins and the iniquities of our ancestors have made Jerusalem and your people an object of scorn to all those around us.


Back country solution to itchy insect bites

Question: On a recent walk I got bitten to death by midgies. I was itching all day until I got home and put some antihistamine cream on them. Is there anything available (plants, etc.) that I could of applied to stop (or help with) the itching?
Comment: Your own saliva.
Answer: First of all don't scratch. blood sucking insects inject anti-coagulant under your skin to prevent your blood from clotting and forming a scab so they don't get their mouthes stuck inside you while sucking. If you scratch, you only manage to spread the anti-coagulant around under your skin, which intensifies the itch and makes things worse. Train your brain not to unconsciously scratch every itch, and they won't persist as long.
The go-to medicinal plant for pretty much everything is yarrow (Achillea millefolium). It's as common as plants come in North America, but I checked and it's apparently also native to the UK. We were taught to use it as kids to remedy stinging nettles, but it also works for other types of stings and bites by drawing the toxins out of your skin. Simply pick the fern-like leaves, chew on them a bit to partially mash them into a paste, then apply to the affected area. Relief is almost instant.
It also works well as a tea for relief of cold symptoms and fever, which doesn't surprise you after you've tasted it, since it tastes like a kinda minty but mostly sappy-bitter cough syrup. Whenever I use it on people suffering from a rash out the woods, I always get them to chew it up for me.
Answer: Over the counter antihistamine products - especially tablets (due to light weight and effectiveness), but also topical creams such as stop itch and antihistamines are the most effective solution. These should be carried in your first aid kit if you have a history of allergy problems. Even for those that normally don't have problems, the size and weight of antihistamine tablets is so small, and its importance a potential life saving treatment make it an item I always have in my first aid kit (Wasps are a real problem for us in summer).
As far as plants, the best I can think of is Aloe vera - although you are unlikely to find it when you need it most.  Others I have read about, but have not tried are Peppermint, Basil and apparently banana peel.
Comment: This is the most practical answer IMO. Even if natural antihistamines are available, it takes time to find them and apply them, and you may get quite dirty in the process. Appropriate medication us easy to carry and practically guaranteed to be effective. Benadryl or similar should be in any first aid kit anyways in case of insect stings.
Comment: Your correct, but it doesn't really answer my question. (Well the first bit doesn't) I was looking for alternatives to antihistamine
Answer: The only thing I can recommend from experience is mud: Cover the itching area with plenty of it and the itching will go away. After the mud dried out and has fallen off, sometimes the bites start to itch again, just reapply. But in most cases I never had to do that again.
Generally cold helps by dulling the itching. The opposite, heat, will temporarily  help as all histamines (proteins by the immune system which cause the itching) are released by heat. But the itching will come back. Just don't burn yourself.
There are also a variety of plants that have antihistamine properties. What will be available obviously depends on where you are. In Europe the ones you might find most likely are jewelweed, chamomile and echinacea. I don;t think (though I am not sure) that simply crushing and applying will do the job, I guess extracting by cooking to make a poultice will be needed. So the difficulty to find such plants and the preparation needed will make it quite unpractical as a solution on the go.
Comment: Plantain (plantago lanceolata) is used for calming wounds and sores: the leaves are crushed manually and applied on the skin. I don't think it's worth the hassle in the case of a mosquito bite, but this is at least a case of simple preparation.
Answer: Plantago works excellent againt nettle because of its anti-histamin properties and, in my experience, also against musquito bites. It grows usually in the neighbourhoud of nettle and might be the only plants that survices on a pathway.
You need to crush the leaves and apply it on the 'wound'. (it's like pressing water out of a stone, but it can be done).
Comment: Well, implicitely from my answer: it has very though fibrous leaves, it grows quite often in the neighbourhoud of nettle (because of something with soil acidity?), the flowers look a bit like flourishing grass (cone shaped) and it's usually the only plant that tolerates being treat upon. It's a very common plant, also in the city.
Comment: Any tips on identifying it? It looks familiar but it's quite generic looking..
Comment: [OHHH](https://upload.wikimedia.org/wikipedia/commons/1/17/Ribwort_600.jpg) yes I know this. That's a good one! Didn't know it was good for anything!
Answer: I remember buying in pharmacies a liquid prepared on the spot, from mint powder and saline solution (unfortunately this mix is sort of local-specific to our Romanian pharmacies, so I cannot provide a link). This was applied on mosquito bites and allergy rash - it stopped the itching for an hour or two. Based on this experience: try some sort of minty cream (or even toothpaste) to cool down the itchy feeling. Might sound a bit extreme, but worth a try.
Comment: *physiological serum* sounds very intriguing!
Comment: seems it was a bit of "mirror translation" - I meant the saline solution (https://en.wikipedia.org/wiki/Saline_(medicine))
Comment: ha ha, yes, that has a very different meaning! *physiological serum* sounds like something out of Frankenstein's monster!
Answer: If you expect itchy insect bites, I can recommend a dedicated heat stick for treating the bites.
Something like this: Therapik Mosquito Bite Reliever
It does work, at least temporarily. The mechanism is often said to be the denaturing of the proteins due to heat. However the heat is not sufficient for that. What apparently really happens is that the local pain receptors are overloaded by the heat and shut down.
For a study to show this actually works:

Locally administrated concentrated heat leads to fast amelioration of
  symptoms. - PMC


Select the highest number in mysql

Question: I am developing a trading site. Users will post some price, $100, $120 for certain products. And I wanted to display highest price for that product, which means current highest price will replace the previous highest price. Tables of mysql is:
<code>user_email //The user who gives price for the product
product//The product name
price//The prices that users posted
chosen//it will be 1 if it is highest otherwise 0
</code>
What I wanted to do is that if a user posted $100 for, for example, a book and it is currently highest price (chosen is one for this user) and site displays it. Another user posts $120 for that book and it is now highest price (chosen is 1) and for the previous user's chosen is 0. I could not figure out how to compare prices for certain products and change all of the lower prices chosen 0 for that product. How can i do this?  Sorry i am new:(
Comment: A database is not like a spreadsheet. It doesn't work to update all records when one changes. You probably want to derive the answer whenever you need it.
Comment: I have more than one chosen 1 because I could not pick the highest price:(
Answer: You can use the MAX function from MySQL to get the highest number of a colomn. Example :
<code>    SELECT MAX(field) FROM `table_name`
</code>
You just need to add WHERE and it will confine the search fields.
After, you update everything else with something like this
<code>    UPDATE `table_name` SET `field` = 0 WHERE `product` = "X" AND `id` != Y
</code>
X will be the product ID and Y will be the ID from the first query.
Answer: Something like this will do you,
<code>$q = $dbc -> prepare("SELECT price FROM table_name ORDER BY price DESC LIMIT 1");
</code>
Using the order by clause will get you the highest price available, now store it in a variable like so,
<code>$q -> execute();
$highest = $q -> fetch(PDO::FETCH_ASSOC);
</code>
Now change all the other users' price to zero,
<code>$q = $dbc -> prepare("UPDATE table_name SET price = 0 WHERE price != ?");
$q -> execute(array($highest));
</code>
Now this will eliminate the need for the chosen column in your database, as you only need the highest price for a bid, which can easily be found using the opposite of the above query with another parameter for the BID ID.
This example is using PDO which I highly suggest if you are making a trading site, I hope this was what you wanted to achieve,
Happy coding,
Comment: I think you need to add `DESC` to the end of the select query, and probably be good to add `LIMIT 1` after that.

Select the highest number in mysql


What story is the music video Snuff trying to portray?

Question: I absolutely love the song Snuff by Slipknot.  They have a rather interesting music video for the song, but for the life of me I don't really understand what the "story" of the video is.  Does anyone understand what the video is trying to portray?
Comment: I think it is fine considering the cinematic qualities of the video.
Comment: seeing how this floats, a la http://meta.movies.stackexchange.com/questions/729/what-do-you-think-of-this-music-video-question
Comment: are we going to allow music video question?
Comment: Nothing to do with an answer at all, but the way it slows down and speeds up like a record would do when you pull the plug on the player...  That part makes the video version SO much better than the CD version.
Comment: **he loves her too much to let her go. he dies then becomes her.
Answer: I am going to kick off this answer with 'I think', therefore it may not fall into the acceptable range as outlined by the FAQ. For that reason the question itself might be on shaky ground - but I would like to see a decent debate about it in the meta.
That said...
I think the video can be interpreted on several levels, but the main theme I took away from it was one of all-consuming love. The man in the film, initially presented as a stalker, has lost the love of his life. The woman entering the room, undressing and washing is a figment of his imagination. However, there is a point where the roles cross over and become blurred, evident by the reveal at the end that it is he who has taken on the woman's persona, clothes, make up and all.
For some reason I was reminded of Macbeth. For me, Macbeth was a weak character, controlled and ultimately possessed by Lady Macbeth, and in a way the woman in this story (through use of repeated voice over) is the possessing force, consuming the man's very soul. This is why we get the scenes of mental anguish as he struggles to adhere to his promise to her, to never let her go. There's even a bloody hand washing shot which made me think of "Out, damned spot..." but I might be stretching things a bit here.
Why does Malcolm McDowell's character react the way he does to the woman at the beginning and then to the man? Perhaps a time frame issue, or even another construct of the man's broken psyche.
I'm interested to read other interpretations for other users... but I'm also acutely aware that we are treading on thin ice here ;)
Comment: The "thinking" and analysis going on here is exactly why I love this site.  It allows for theories and plausible thought to be brought to a question, bringing an answer one might have never thought of.
Answer: I'm going to give you the literal translation of what I believe the video means. To me it looks as though we have a broken hearted man who's stalking his former lover to the point of obsession. Finally he breaks and kills her (backed up by the 2 second scene from 5:46-5:48). At this point he has undergone a complete mental break and begins to impersonate his lover, this is when Malcolm Mcdowell's character realizes the former tenant is actually an impostor. You can say that the video can be interpreted on multiple levels, but this is actually a fallacy called "argument to moderation". I'm not trying to insult anyone, as the first answer does seem to be well thought out and probably does have some relevance.
Answer: The way I interpret it is that he killed his girlfriend. The name of the song kinda made me think that. A Snuff film is when someone records a real murder and makes it into a movie.
I think the parts when he is dressed as a women is right after he did it and he's leaving dressed as her, that's when he is in the apartment. The rest of the time you see him in the apartment they are flashbacks, he's remembering things that happened there.
Answer: Broken hearted man consumed by thoughts and memories of her...like a ghostly memory throughout his apartment. She is dying and don't want him to forgether. She wanted him to hold on to her memory....why would he dress as a blonde woman? He is so consumed by her death he says 'You will never let go' instead of 'I;ll' never let go. She was selfish to ask him to do this, but he loved her so much he could not get over her no matter what he tried to do. A memory...he cant escape it. She, even in death, makes him angry at her for dying...'you sold me out to save yourself' -  as in  you put me on the line to make yourself...she just didn't want to die alone. Why does he wear a blonde wig when his gf is obviously dark skinned and a brunette? It's a metaphor on his state of mind and how everything he did was consumed by her. Him dressed as a woman walking in public is a metaphor on him finally accepting it and moving on, everybody knowing he's a broken man now.
Answer: Well as u guys actually had an idea opposite of mine..i guess i get to tell u that i think ure wrong.they both made promises.but mostly the guy.as he repeats what she say: i promise that you will never let go.see? You never let go.so the women leaves.as a huge sorrow for him and not wanting to break promises, he becames her.like just in mind.but forever


Why is beer in Czech Republic so cheap?

Question: I recently traveled to Prague where beer was extremely cheap, usually around $1-$2 USD in supermarkets for 16 oz. cans. Even brands like Heineken and Stella were this cheap. What are the main factors for this?
Answer: It is in my opinion mainly thanks to low excise duty on beer in the Czech republic.
Another factor is the fact that there are lower prices of almost everything in the Czech republic (I am talking mainly about local food and beverages).
And last but not least, Czech republic is I guess second or third in the whole world in beer consumption, which means there is high level of demand for traditional czech beer, which allows producers to produce beer in large quantities.
Comment: I made a little more research and came with an interesting result.

There is higher excise duty in the Czech republic than it is for example in Germany or France while beer is more expensive in both countries.

What does it say is that of the three mentioned reasons there is one more - historical market prizes of beer. Beer market in the Czech republic is wide. Consumers want low prizes, more producers are willing to fight with lower prizes and therefore the prize on the market stays low (beer is not really a money maker in most Czech pubs)
Comment: To add a little more detail to my answer
Answer: I am Czech and I would say there are few factors to it.
Firstly many grocery products are cheap as well as services which makes beer affordable even in restaurants.
Most importantly there is long historical tradition in drinking beer. It is common to drink it with lunch, it is usual to visit the pub for a chat with friends and drink 1,2 or 10 beers there. Beer is cheaper than water in restaurants and this is another reason why people prefer it to other drinks.
It is said that the government can do anything unless they increase the price of beer. The pub is often the cultural center of many villages where people meet after work and when we are there we drink beer.
Answer: Consumption of beer in the Czech Republic has been the highest in the world for many years. Bavarians claim that it is the highest in Bavaria, but they are not an independent country. Anyway, if we talked about historical lands then consumption of beer in Bohemia (Czechia's "mainland") would be higher than Bavaria.

Why is beer in Czech Republic so cheap?


What kind of lens do I need for low-light portraits for an Nikon D5100 camera?

Question: I just bought a Nikon D5100 kit with 18-55mm lens. I am now looking for a good portrait lens that should be good in low light conditions. I was thinking about buying Nikkor 1.8d 50mm or Nikkor 1.8G 50mm as my budget is very low. What factors should I consider in this decision, and are there other options I should look at as well?
Answer: A 50mm prime lens  is a lens for general purpose (street photo, social photo, landscapes, and sometimes body full portraits), but a prime lens it isn't a portrait lens. (Video: www.youtube.com/watch?v=1R94PGPFoi4) (Article: cazillo.com/articles/37-photography/281-50mm-prime-lens-is-not-a-portrait-lens.html) Sorry, I'm new here and I lack enough karma for links.
See the differences in these shots (backgrounds):

The king of portraits lens for Nikon is the AF-S 85mm 1.4G. But it's too expensive for a non-pro user,  $1.600 !! (Review: www.lenstip.com/264.1-Lens_review-Nikon_Nikkor_AF-S_85_mm_f_1.4G-Introduction.html)
The amateur alternative is the AF-S 85mm 1.8G. $500  Review
But if you want a more versatile lens and capable to do very good portraits, you might look for these others:
Nikon 105mm f/2.8 VR Micro (for macro-photograpy too).
The alternative for Nikon is the Tamron SP 90mm Di Macro (for macro-photograpy too), near quality and more cheaper.
Comment: Yes, for portraits you need longer focals.  So you can approach the background and blur it (bokeh), fixing the attention to the subject. I edited the answer to add a video and a article.
Comment: You can add links now. :)
Comment: it is not just for the blurred background you want a longer focal length. it also makes the subject look slimmer and the face more beautiful.
Comment: Perspective is determined by shooting distance: period. Focal length + film/sensor size determines what is in the frame at that shooting distance, but has zero effect on perspective.
Comment: If you were to compare the 85mm f/1.4 lens to a 50mm f/1.4 lens the results might be a better comparison than using the 'straw man' kit lens.
Answer: The Nikkor 50mm f/1.8G has a focus motor in the lens, the Nikkor 50mm f/1.8D does not. Some Nikon bodies include a focus motor in the body that can drive the focus mechanisms of "D" series lenses. Since your Nikon D5100 does not have a focus motor in the body that could drive the focus mechanism of the 50mm f/1.8D, if you use the "D" lens you would need to manually focus the lens for each shot.
Some folks may consider 50mm a little short for portrait work. A lot depends on exactly what type of portraits you are doing. Environmental portraits and full or three-quarters length portraits should be okay on your D5100 body that has a n APS-C sensor, but you might find that focal length requires you to get a little closer than you want for tighter head shots.
Of course you mentioned a fairly constrained budget, and the 50mm lenses certainly fit the bill there.
Comment: 50mm is a bit low for portraits, it is on the edge. and he asked about "Good portraits", which means 85-135mm on crop. You CAN make good ones with 50mm but I'd consider that to be "experimental". When ppl say portraits they dont mean full body, unless they say "full body portraits". Most ppl dont even know a full body shot can be called a portrait.
Comment: And the two 50mm lenses were specifically mentioned in the body of the actual question. *The budget considerations also point to the 50mm lenses*, and being that the D5100 is an APS-C body, will yield an acceptable FoV for full to half body portraits. The question does not specify "tight head shots", "1/4 length portraits", or any other such qualification.
Answer: Human faces are considered to have a flattering perspective at a distance of approximately 10'-15' (3m-4.5m).  Closer than that gives increasing perspective distortion than exaggerates the features and is comsidered unattractive (wide angle distortion). Further away flattens the feature but this is usually not as problematic. So ideally, you'd want a lens whose focal length shows as much of your subject in your frame as you'd like when standing at a distance of 10' (3m) or greater.  For a DX camera, a 50mm lens would be good for full body or 3/4 portraits. You'd need a longer focal length of around 200mm for a headshot at that distance.
A wide aperture is helpful for low light photography, and also helps to separate the subject from the background,  so a fast prime is a good choice.  If you are on a budget, f/1.8 is a good choice relative to f1.4 options, given the large difference in price for 2/3 stop difference in aperture.
So for you the Nikon 50mm f/1.8G is probably the best, most affordable choice for low light photography. A longer prime would be useful as well, but will be much more expensive.


Tether Android Phone to Raspberry Pi (for MMS/SMS)

Question: I recently got a RPI coming from the land of Arduino, and I was wondering as I've been searching Google for this has anyone found a way to tether their phone to their Pi. I'm looking to use my phone as a way to send MMS/SMS, so basically my RPI will send a signal to the phone via the usb wire to transmit some data via SMS. I'm looking into this as it will be more robust in my case than using a 3G USB Modem - since I won't need the USB powered adapter, etc. (I would assume this is possible except I haven't gotten around to trying it since I only have rev A with 1 usb port which I am using for keyboard/mice, and I'm awaiting B in the mail, so I thought I'd ask to see if there is a good way to go about doing this possibly.)
Comment: Are you planning to have SMS messages only sent to your phone, or anyones phone?
Comment: Other users phones will receive the text msg, so each phone would have to be set to send txt only to a specific number. Alternatively I have considered sending from multiple devices to the same remote phone with a unique id and then the clients can simply access their specific msgs via server.
Answer: This video explains the process quite well.  However, it uses email to send a SMS message instead of tethering to a phone:

Make sure you can use the mail command (sudo apt-get install mailutils) and setup your Raspberry Pi to send emails from the command line.
You need to look up the SMS gateway for the phone you want to send an SMS to.  An example of a number converted to an email would be firstname.lastname@example.com (for Verizon).
Send the email/SMS: $ echo "Test text" | mail -s "Test Mail" firstname.lastname@example.com
Comment: Thanks I will look into this and let you know how it goes!
Answer: I looked at the answers you have so far which are not very useful.
They have all missed the point that you do not have an internet connection.
I am wanting to do the same thing as you. Have you found a solution?


How do you use the new Facebook "download everything you've ever posted" feature?

Question: I read about this in the press today, but can't find it anywhere within Facebook. Perhaps the feature isn't live yet? I've tried clearing cache and reloading, but don't know where I should be looking.
Answer: It's in Account → Account Settings, near the end of the page. Here's a video about how to use it and where to find it, but keep in mind that the option hasn't been rolled out to everyone yet, so you might not see it right now.

How do you use the new Facebook "download everything you’ve ever posted" feature?


Complexity vs maintainability in modern hardware

Question: Today with the modern hardware and memory coming cheap, how much sense does it make to spend effort to analyze algoriths or data structure complexity?
Wouldn't it be better instead, to focus on clean, maintainable code, readable code than on optimizations for complexity?
Note:I not talking about embedded systems or systems with similar kinds of constraints.
Answer: First, I question the premise of your question. Nobody deliberately performs "optimizations for complexity". Optimizations are performed to beat performance or resource constraints, and complexity is tolerated if it gets the job done. When done well, analysis of algorithms and data structures enables you to recognize redundant information, needless work, and allows you to write simpler, more easily maintainable code, which also happens to perform better.
Second, while more powerful hardware might allow you to solve yesterday's problem in more obvious and straightforward ways, most of us have to move on to newer and harder problems. Your word processor is finally fast enough? Great, now  make it work entirely in a scripting language inside a web browser. You want to do a deep indexing of the entire internet every month? Fine. Google could do that ten years ago. Unfortunately, if you want to keep up with Google, you have to increase the number of page you crawl by an order of magnitude every year. It took us ten years to sequence the first copy of the human genome, now we want to be able do it in a day.
As powerful as hardware is getting, the difficulty of the problems we want to tackle is growing even faster.
Answer: Yes, it is always recommendable to focus on correctness first, then readability and maintainability, then - if ever - on performance. In the majority of cases nowadays, performance is not a significant constraint.
That said, it is still a best practice to choose your algorithms and data structures correctly. If this means just calling the right kind of standard library sorting method, or using the right type of container for a given usage pattern, that is usually easy to change later. But anytime you need to really implement some kind of nontrivial algorithm, it is well worth thinking about performance requirements in advance. It may be that there aren't much performance requirements, like if a string search algorithm will be called 10 times a day with a few dozen characters of text. Then it obviously isn't worth spending a lot of time researching/designing algorithm options and tuning its performance. However, if it is called thousands of times a day with a million characters each time, the lack of performance by a badly chosen/implemented algorithm may indeed bring your program to a halt.
So you need to look out and identify potential performance hot spots early enough, and design them carefully if there are such hot spots. Do back-of-the-envelope calculations to estimate the performance, throughput, response time etc. during the analysis and design phase. These may help uncover unrealistic expectations / assumptions about the system. Build an end-to-end skeleton of the system as early as possible, then you can conduct some rough measurements (with dummy data, simplistic workflows, whatever) to get a sense of the real vs expected performance. You also need to take into account expected short / long term increase in traffic. A web site may work well initially with 50 users, but it may get into serious trouble when its user base grows to thousands a year later. It is very painful and risky to try to solve performance problems when the system is already fully congested. Very often it is not obvious that the system is getting closer to its point of congestion - its performance may look acceptable all the time, then all of a sudden drops dramatically. If you can't foresee and prevent these problems in due time, you will need to solve them while angry users' calls are flooding the support lines and your boss is breathing into your neck waiting for the instant solution...
Comment: Database performance is especially critical to consider in design, it is much harder to refactor a database with  millions of records. And there are known performanc ekillers in database design that should generally be avoided from the start.
Answer:
Today with the modern hardware and memory coming cheap, how much sense does it make to spend effort to analyze algoriths or data structure complexity?

it still makes sense today.
perhaps the best example i can give is that of cpus' growth in numbers (moreso than in frequency). choosing the right algorithms and structures are still important because you still have these physical maximums - a well written program can take a fraction of the cpu time or resources.
one obvious alternative to choosing the right algos/implementations is to use parallel execution (PE). although it is fine in some cases, PE is not always a good solution:

it can become very complex to write.
it can be very difficult to debug, test, and maintain.
while many problems are good candidates for PE, many do not extend into the domain well.

given the effort it takes to implement PE correctly, the right algos and structures are still important and much simpler and powerful solutions for many cases.
so, let's say you have hit that ceiling: would you prefer to retrofit that program for PE, or would you prefer to use (or verify that your program is using) the proper types/algos/implementations?
even if you choose PE, your program will (in the majority of cases) end up consuming more peak/total resources in its execution = =.

Wouldn't it be better instead, to focus on clean, maintainable code, readable code than on optimizations for complexity?

the two can coexist. (although some languages or runtimes can affect this adversely, such that there is less overlap -- the question is language-agnostic)
Answer: From a user's perspective what matters is reactivity. Having a notebook or a tablet being ready as soon as it is switched on is very important. This is not achieved only with huge CPU frequencies and tiny memory latencies.
If by complecity you mean also algorithmic complexity, the important point is scalability. Hardware performance is a limited solution when your problem is O(exp N).
Answer: I can't imagine a day when breeders of fine, ever-faster, racehorses will be able to compensate for overweight, ever-fatter, jockeys.
Hardware engineers knock themselves out making finer and finer lithography, faster clocks, levels of caches, multiple CPUs on a chip.
Meanwhile the people who make the software those chips have to execute say "Performance - who cares?"
Performance does matter.
Slowness is like any other kind of bugs.
You should try not to make them.
But you will make them (if you're working) and you should know how to remove them.
Here's my favorite example.
Answer: Look to your requirements.  Codify in specific, measurable, objective terms what constitutes acceptable performance so you have a unified view across stakeholders, management and developer.  Let this be your guide in application architecture, application and hardware design, function and performance QA as to whether you have hit your mark and where to spend the time to optimize and when to not.
If you ignore performance and it comes back to bite you as an unarticulated requirement important to a key stakeholder then you are sr*wed because its a helluva lot easier to design in performance than it is to tack it on after the fact.


How can I install Tor from the source code in the Git repository?

Question: It is sometimes desirable to compile Tor from source, and perhaps run an unreleased version (e.g., to test the latest changes, use new features unavailable in the latest release, etc.). What is the procedure for doing so?
Answer: To compile and install Tor from git follow these steps:
Step 0: Make sure you have git, a working "C compiler" and "GNU make" installed on your linux box. You also need libevent-dev and libssl-dev libraries before you start.
If you're on debian/ubuntu type:
 sudo apt-get install git build-essential automake libevent-dev libssl-dev zlib1g-dev

Step 1: Clone Tor from git.torproject.org
git clone https://git.torproject.org/tor.git
Step 2: cd tor
Step 3: run ./autogen.sh
Step 4: run ./configure or ./configure --disable-asciidoc if you don't want to build the manpages.
(See 'note' if you get error at this step)
Step 5: run make
Step 6 (optional): run make install

Note: If you have problems finding libraries at step 4 try the following instead:
CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" \ ./configure

or
./configure --with-libevent-dir=/usr/local

And if you have mysterious autoconf failures while linking openssl,
consider setting your LD_LIBRARY_PATH to the openssl lib directory.
For example: setenv LD_LIBRARY_PATH /usr/your_username/lib.
see INSTALL for more details.
Comment: I very rarely make install at the end. Once I've run make, I have a src/or/tor binary and I can just run it in place. That way I don't have to worry about smearing anything over my filesystem.
Comment: Your INSTALL link points to the latest commit, which is not very helpful.
Comment: I added "make install" just to fit the question. Maybe it'd be better to change the question to "How to compile Tor from git?" and remove "make install"?
Comment: Is there an instruction how to run it with systemd?
Answer: UPDATE (after Roger Dingledine's comment):
Please, do not use the "--enable-bufferevents" feature for stable installations. It's not mature yet.
The --enable-bufferevents option has not ever worked. It is a partial feature that needs somebody to finish it.

./configure --disable-asciidoc

From changelog:

Tor can now optionally build with the "bufferevents" buffered IO
        backend provided by Libevent 2. To use this feature, make sure you
        have the latest possible version of Libevent, and pass the
        --enable-bufferevents flag to configure when building Tor from
        source. This feature will make our networking code more flexible,
        let us stack layers on each other, and let us use more efficient
        zero-copy transports where available.
Comment: Alas, the --enable-bufferevents option has not ever worked. It is a partial feature that needs somebody to finish it. Sorry for the confusion!
Comment: What are the "standard" build options? That is, what build options would yield a binary that's closest to the released binary? Where can that information be found?
Comment: @mirimir Good question. I read the script './configure' to realize all the options and its defaults values.
Comment: Yes, there are many options. Maybe I'm being obtuse. If there are options with defaults, the standard build obviously uses the defaults, right? But even so, I'd like confirmation from someone knowledgeable.
Answer: Git source is really easy stuff for install tor. But I want to tell the easiest alternative way for installing tor from official tor source code. This following commands for Centos. If you're using other Linux, install libevent-devel, groupinstall 'Development Tools' from your default package manager(apt-get or any other).
root @ Centos.

Step 1:wget https://dist.torproject.org/tor-0.4.3.4-rc.tar.gz
Step 2:tar -xf tor-0.4.3.4-rc.tar.gz and mv tor-0.4.3.4-rc tor
Step 3:sudo yum groupinstall 'Development Tools'

Step 4:yum install libevent-devel
Step 5:cd tor
Step 6:./configure
Step 7:make
Step 8:make install
Step 9:run tor

I hope this answer will helps you.
Comment: Tor has a Git repository. You can find it at https://gitweb.torproject.org/tor.git/
Comment: I could complete all steps successfully. But on running STEP 9 run tor. It runs tor but browser does not opens. Plesse guide


How do you checkmate with a rook?

Question: How do you checkmate with a Rook and King versus King? Is there a good and fast method? Can you explain it in a good way? Thanks!
Comment: Are you learning chess from the beginning again? :)
Comment: FIDE Masters ain't what they used to be!
Answer: I know you're a FIDE Master :), so I suppose you're more interested in this question from a teaching perspective.
The simplest way to understand a checkmate with King and Rook vs King is the idea of the rectangle of the opposing king. Consider this position-

Here, the Black King is restricted by the White Rook in this giant rectangular area of the chessboard. For simplicity, I am not considering the area restricted by the White King, which would be like this -

A simple way (I'll deal with optimizations later) to checkmate is to ensure that this rectangle gets smaller and smaller, so that the Black King is pushed to a corner of the board (more visual representation below with diagrams).
    [FEN "8/8/8/8/4k3/8/8/K6R w - - 0 1"]

     1. Re1+ Kd4 2. Kb1 Kd3 3. Kc1 Kd4 4. Re2 Kd3 5. Kd1 Kd4 6. Kd2 Kc4 7. Re3 Kd4
     8. Ke2 Kc4 9. Rd3 Kc5 10. Ke3 Kc4 11. Ke4 Kc5 12. Rd4 Kc6 13. Rd5 Kb6 14. Kd4
     Kc6 15. Kc4 Kb6 16. Rc5 Kb7 17. Kb5 Ka7 18. Rc6 Kb7 19. Kc5 Ka7 20. Rb6 Ka8 21.
     Kc6 Ka7 22. Kc7 Ka8 23. Ra6#

1. Re1+ Kd4

2. Kb1 Kd3 3. Kc1 Kd4 4. Re2 Kd3 5. Kd1

5...Kd4 6. Kd2 Kc4 7. Re3 Kd4

8. Ke2 Kc4 9. Rd3

9...Kc5 10. Ke3 Kc4 11. Ke4 Kc5 12. Rd4

12...Kc6 13. Rd5

13...Kb6 14. Kd4 Kc6 15. Kc4 Kb6 16. Rc5

16...Kb7 17. Kb5 Ka7 18. Rc6

18...Kb7 19. Kc5 Ka7 20. Rb6

Ka8 21.Kc6 Ka7 22. Kc7 Ka8 23. Ra6# 1-0

Of course, with this method, the one mistake that White must avoid is stalemate -

Rb7?? stalemate!

Optimizations and Tricks.
More experienced players can get to smaller rectangles quicker by looking further ahead.
One trick is to trap the king in a smaller rectangle if it comes too close to the rook. For this, White also has to use the king more actively.
   [FEN "8/8/8/8/4k3/8/8/K6R w - - 0 1"]

   1. Re1+ Kd4 2. Kb2 Kd3 3. Kb3! Kd2 4. Re4! Kd3 5. Rc4

Another trick is to give a rook check when the kings are in opposition.
   [FEN "8/8/8/2k5/8/2K5/8/4R3 w - - 0 6"]

   1. Re5+!? (1. Rd1!) Kd6 2.Kd4

This trick is not necessarily optimal. In the above example, White can actually mate faster with the move 1. Rd1!
   [FEN "8/8/8/2k5/8/2K5/8/4R3 w - - 0 6"]

   1. Rd1! Kb5 2. Rd5+! Kc6 3. Kc4

The above optimization is also made possible by the rook-waiting-move trick. If, in the above position, instead of going to c6, the Black king tries to escape via a4, then the following checkmate is possible.
 [FEN "8/8/8/1k6/8/2K5/8/3R4 w - - 0 7"]

 1. Rd5+ Ka4 2. Rc5! Ka3 3. Ra5#

One more idea is to use king-opposition (in combination with the rook) to push the enemy king behind.
 [FEN "8/8/8/2k5/8/8/2K5/4R3 w - - 0 4"]

 1. Kc3! (1...Kd5 2. Re3!) Kc6 2. Kc4! Kd6 3. Re4

Combining these different ideas, here are two of the most optimal mates possible from the starting position -
   [FEN "8/8/8/8/4k3/8/8/K6R w - - 0 1"]

   1. Re1+ (1. Kb2 Kf4 2. Kc3 Ke5 3. Re1+ Kf6 4. Kd4 Kf5 5. Re4 Kf6 6. Re5 Kg6 7.
   Ke4 Kf6 8. Kf4 Kg6 9. Re6+ Kg7 10. Kg5 Kf7 11. Re5 Kg7 12. Rf5 Kh7 13. Kf6! Kg8
   14. Rh5 Kf8 15. Rh8#) 1... Kd4 2. Kb2 Kd3 3. Kb3! Kd4 4. Kb4 $3 Kd3 5. Kc5! Kd2
   6. Re4 Kd3 7. Re5 Kc3 8. Rd5 Kb3 9. Rd3+ Kc2 10. Kc4 Kb2 11. Rd2+ Kc1 12. Kc3
   Kb1 13. Kb3 Kc1 14. Rd3 Kb1 15. Rd1# *

Comment: The "rectangle" method is much better on a large (square) board, where the length of the mating procedure is at most some multiple of the board size, whereas the length of the "king in opposition" approach grows as the square of the board size.
Comment: I actually didn't know the 'rectangle' method until now. I always used the 'king in opposition' method.
Comment: This is the best method to teach. It easy to remember and reproduce. I made a video on this - https://youtu.be/13doGCKqhFY
Answer: I would teach the slow but safe and easy way first: The rook divides the board in two halves. Then the attacking king tries to get in opposition to the enemy king (sometimes the rook has to swap sides or needs to make a waiting move for this to happen). Then the rook gives a check, hence pushing the king one field closer to the edge of the board. The mate follows exactly the same pattern.
Comment: This is how I learned it, but is it really simpler than the rectangle method?
Comment: I think it is. You have just two very simple rules: 1) Get the king in opposition and give a check, 2) If the rook is attacked, swing it over. No stalemates, no uncertainty regarding which piece to move. And the rectangle method is not totally different, you can see it as 2D extension of the 1D opposition method.
Answer: I would suggest --  Play this out with an opponent. That's the best way to get the feel of it. Otherwise just google and you will see lots of explanation -- with some nice graphics.
www.chess.com  and chesstempo.com even have some practice board where you can learn.
One link that covers good theory and explains slowly is
http://www.chesscorner.com/tutorial/basic/r_k_mate/r_k_mate.htm
Answer: Rule of thumb for checkmate with Rook against lone king:

Use the Rook to restrict the opponent's King.
Support the Rook with the King.
Confine the King to a box and make the box smaller  if possible.
If it is not possible to make the box smaller, move the King (a
waiting move to force back the opponent's King.).
Last but not least which leads to victory is
Force your opponent king to corner (Rank - 1st or 8th or File - a or h ).
Answer: Wes already gave a good answer from the teaching perspective for the OP. This answer is complementary to his answer. I am concentrating on the optimization and tricks still keeping beginners in mind (may not be useful to OP). If you haven't seen the basic technique read that form Wes's answer first, then read these tricks and finally go back to optimisation and tricks section of his answer.
The most basic tool in making it faster is flexibility
(eg: not sticking one method always whether it is king-in-opposition method or box-in-method)
Also, just to recall, our purpose is to confine the king to an edge, not to a corner. And we are not preoccupied with which edge it must be.
Though obvious, these fact helps to make it shorter.
Trick 1) When you use king-in-opposition, there is no need to go all the way to the end of the side.
So, instead of the following, you can make the check earlier if the king is confined enough (see the variation).
[FEN "8/8/8/4k3/R7/2K5/8/8 w - - 0 1"]

1.Kd3 Kf5 2.Ke3 Kg5 3.Kf3
( 3.Ra5+ Kf6
    ( 3...Kg4 4.Rb5 Kg3 5.Rg5+)
4.Ke4 Kg6 5.Ra6+ Kg5 6.Rb6 Kg4 7.Rg6+ )

5...Kh5 6.Kg3 Kg5 7.Ra5+ *
Trick 2) King can be inside the rectangle instead of outside
[FEN "8/8/1k6/8/2R5/1K6/8/8 w - - 0 3"]

3.Kb4 Kb7
( 3...Ka6 4.Rc6+ Kb7 5.Kb5 )
4.Kb5 Ka7 5.Rc7+
( 5.Kc6 Kb8 6.Ra4 )
*

How do you checkmate with a rook?


contact mic in water?

Question: i know hydrophones are used for this technique, but after seeing this: http://audiocookbook.org/sound_design/sounds-from-a-contact-mic-frozen-in-water-ice/
i thought, is it safe for contact mic to be in water? why do people use hydrophones then and not contact mics for underwater recordings?
Answer: The piezos used in contact microphones pick physical vibrations from solid surfaces as you can see here, for example: http://vimeo.com/31926631
In that case of ice recording it makes sense to use those, but I don't think (and I hope someone correct me if I am wrong) a contact microphone under water -- in any other state than solid -- won't pick up much vibrations which the piezo is able to transduce to an electric signal. For my experience the contact mic needs to be well attached to the surface you are trying to use, and sometimes you even have to exert some pressure in it with a tool or your own hands.
For the underwater recordings, I know it works acceptably well some simple small omnidirectional microphones with the advices given above.
Answer: As far as I'm aware, some hydrophones are actually made with contact mics (or piezo transducers) sealed inside a protective housing - so I think your logic is sound.
Actually, Jez Riley French makes some and it seems from his wording that that's how he makes his: http://hydrophones.blogspot.co.uk/2009/04/hydrophones-by-jrf.html
Cheers
Answer: You also could use a SM58 or any another microphone, put a condom over it, make a lot of gaffertape around it until it's dense and hold it in the water. (I would suggest to take your cheapest microphone :-).
A hydrophone is a specialized microphone for the use in the water. For example, if you drive thousands of miles to the north pole and want to record something special under water, you look quite bad if your SM58 in the condom get wet and breaks of the salt water. You look much worse if your expansive Neumann breaks and the most bad thing is, you can't make records anymore and you don't have a music shop around the corner. You can forget your records or drive back an get another one.
So if you have a hydrophone, you make your underwater record and get great results - hopefully. It's a kind of safety and it probably makes a clearer record. It's expansive but for important records I would really consider about it.
It always depends on the situation. ...and I'd love to have one.
Best
Guido
Comment: Good advice, but I'd suggest plumbers tape instead of gaffers. Since it's made of rubber and designed to seal water.
Comment: Yeah. Take something really strong. Gaffer tape probably get's off in the water

contact mic in water?


How do bitcoin vanity generator work?

Question: How do Bitcoin vanity generator work and why is there a limit to nine "specific" chars?
I tried looking up the usage, but couldn't find good articles explaining the methodology behind it.
Answer: They work by brute force.
As a private key is essentially a very large random number, and the encoding process from a public key to an address goes through a couple of hashing steps, the relation between the characters an address starts with and the underlying key is basically random.
Vanity key generators work by simply generating many, many private keys until one leads to an address that just happens to start with the desired characters. It is very similar to the block mining process in this sense.
Difficulty is estimated by the amount of effort it would take to produce an address starting with a desired pattern.
Bitcoin addresses (non-bech32) are encoded in base58, which has 58 possible characters. As the first character of an address is fixed to a 1 or a 3, we can ignore that.
To create an address starting with 1A, you effectively have a 1 in 58 chance, as the address distribution is random, and A could be any one of 58 possible values.
For one starting with 1AA, you are looking at a 1 in 58^2, or a 1 in 3364 chance. This exponential growth is why there is a limit (although the limit varies by how much computing power you can throw at a single address).
For the nine characters indicated in your question, the odds of a random address matching the desired pattern are 1 in 58^9, or 1 in 7,427,658,739,644,928. While this is a big number, it is an achievable one given a large enough cluster working on that one address, especially if you're using GPUs - even a 2-3 year old (high end) laptop CPU can hit several 10 million attempts per second, so this is still an achievable number if you have the resources.
Commercial vanity gen services further optimize this by simultaneously working on multiple independent addresses. The odds of finding an address go up proportionally with the number of addresses you are looking for.

As mentioned by Murch, the second character does not allow all 58 characters with even probability - details on why and how can be found in this question.
Comment: Those commercial vanity gen services probably store those generated addresses in a DB to directly output a few? Are there any known risks involved with using (commercial/or my own) vanity gen? Like backtracing the brute forced process?
Comment: @J.Doe Using public key combination methods, there are ways to generate an address without its generator having access to your private key. However, the generator would be able to see your balance and transactions you make. They can also use your newly generated address's transactions to find your other addresses.
Comment: Nit: The second character in Bitcoin addresses is not equally distributed, see e.g. https://bitcoin.stackexchange.com/q/18371/5406
Comment: @Murch Fair point, although I doubt it significantly changes the odds - will update the answer!

How do bitcoin vanity generator work?


Zabbix - Windows equivalent

Question: I'm currently using SpiceWorks to administer my network.  I've heard much about Zabbix and would like to use it, but I'm a Windows guy and don't know much about Linux/Unix.  Is there a free Windows software that matches or surpasses Zabbix?
Answer: I'm a Windows guy as well, and the only Linux machines I have are our Zabbix machines (of which we have a few).
If you're interested in getting your feet wet in Linux (it's really no more than a paddle pool, I promise), Zabbix is a great way to do so, because if you use Ubuntu Server, everything comes in neat packages that you install, very similar to how you'd expect to get it done on Windows, and once it's been set up, you can mostly leave the console alone and interact with it via a web interface.
To be fair though, I've dabbled in FreeBSD for around 10 years. Nothing serious, but enough to know the basic commands to get around, so although I don't really know how to run and administer Linux, I do know the basics
Answer: The pay version is PRTG.  I am using Cacti and I'm moderately happy with it but the install was a pain.
Answer: We are using Zabbix server and it work like a champ.
We don't even have to log on our zabbix once we had it finished configured. Once service is installed and its up and running you can customize it via web-interface.
I don't think there is a solution for Windows that will be as customizable, upgradeable and scalable like linux solution. Alot of option for linux, cacti, zabbix, nagios and alot more.
You might check Splunk that can be installed on Windows and linux. I tried it and it also work well, but I didn't like interface. There is a free and paid solution depending on the amount of data you check-in your database.
You should not really worry about linux, its pretty simple nowadays.
Linux's installation are now pretty straigth forward, easier than Windows Xp.
You will also find alot of installation guides or how-to for zabbix or almost any plugin you might want for linux.

Zabbix - Windows equivalent


When should I focus on reps?

Question: I started working out in January 2014, and managed to drop from 250-260lbs ish to 218lbs in a year and I felt very accomplished. For other reasons, I stopped training and got back to working out on June 6, 2015. I can feel myself getting stronger, and I can feel my muscles. But I can't see them. I don't carry a lot of weight. I only squat/bench a bit over half my weight which is not a lot, but, I don't want to focus a lot on pure strength since my goal is to burn as much fat as I can (without any supplements, pure dieting and gym). I've read reps are what gets you toned. I'm not looking to get hyper ripped either, but, I want my muscles to be noticeable. Should I drop weight on the bar and do more reps, while sacrificing the strength I've gained?
Answer:
I've read reps are what gets you toned.

While this may seem like a simple question to answer, in reality, there's more to it than just increasing reps.  That's only part of the total equation.  You'll also need to take a closer look at your current nutrition plan and other factors (cardio work, rest, recovery, discipline, consistency, etc.).  And, to complicate matters, your age may also play a role in how well you accomplish your goal.
You've indicated that you don't want to be "hyper ripped".  However, as a former bodybuilder, I can tell you that the process of revealing muscle mass is going to be the same.  Bodybuilders (natural – non drug using) just push the process a little further, typically through calorie manipulation.  In my experiences, when it came time to reveal (for competition) the muscle that I had worked so hard for, I tightened up my diet and mixed high rep training with normal strength training.  First, I would try to eat as "clean" as possible, and, do so on a regular consistent basis.  And, rather than "sacrificing the strength I've gained", I would plan my training to include bouts of high rep work while also attempting to maintain strength and size.  I also allowed myself a reasonable time period to accomplish my goal.

Should I drop weight on the bar and do more reps, while sacrificing
  the strength I've gained?

Experiment with your training while keeping your goals in mind.  See how your body reacts to different training stimulus whether it's high rep or low rep.  There's no reason why you can't do both. And, since you've not indicated any form of cardio work, I'd recommend you look into adding that to your training plan.  Then, stick with what provides you the results you want.
Answer: First off, let me start off with something: "toning" is a myth. Second, even if you are training for strength, you should still be doing a lot of reps. And a lot of sets. Sets and reps bring volume, volume stresses your body, and your body responds by adapting and becoming bigger and stronger. You would have a hard time finding a weak pro bodybuilder, or a small pro powerlifter. Those two things go together.
If you are lost, a good heuristic to balance your program is this: for each "heavy" rep (think in sets of 5 or less), you should have 2 "medium" reps (think sets of 8) and 3 "light" reps (think sets of 10 to 15) of isolation exercises. It's an approximation, but a good training session would have you do 12-15 heavy reps, 30-50 medium reps, 90-120 light reps, 3 to 4 times a week. This + a light caloric deficit (too big of a deficit = your muscles start wasting away) + time will get you to a better place than doing sets of 30 reps.
As for training in a caloric deficit, I covered that in this answer if you are interested in more details.

When should I focus on reps?


Can tickets for buses in Perú be purchased online?

Question: I'm traveling to Perú and I want to buy a bus ticket from Arequipa to Nazca.
Does there exists a web site where I can get my tickets before arriving to Arequipa?
Answer: As a peruvian, I can assure that you can buy the tickets before arriving to the city through the websites listed by @JoErNano or any other you may found on internet.
And additionally, I would suggest you to buy the tickets from well known companies, as OLTURSA (I traveled with this one and it's really comfortable and not so expensive), Cruz del Sur (This is good but a bit expensive), Ormeño, etc
Why? Because not every company is reliable when it comes to puntuality, comfortability, security, etc.
This doesn't mean that you won't suffer of any of this things but is less probable.
You can get cross prices with various of good companies on this link
Ps: Be sure that there is a direct route from where you are to where you want to go, sometimes that there is no direct route and you may need to use some local transports like public taxis , taxi motos, or make connections through differents buses.
Ps2: About @blackbird57 query , I believe that if you buy it on the local currency (soles) there won't be any extra charge, but if you buy it with your own currency (it will be changed as their will) which is probably, because paying through the website is with credit cards, the price may raise a bit. It's always "cheaper" to buy with soles, unless you buy on not so reliable companies which may give you a "gringo" rate.
Comment: Excellent +1. Can you by any chance answer [@blackbird57's query about foreigner rates here](http://travel.stackexchange.com/questions/65586/can-tickets-for-buses-in-per%c3%ba-be-purchased-online/65590#comment137918_65590)?
Comment: About his query @blackbird57 , I believe that if you buy it on the local currency (soles) there won't be any extra charge, but if you buy it with your own currency (it will be changed as their will) which is probably because paying through the website is with credit cards, the price may raise a bit. It's always "cheaper" to buy with soles, unless you buy on not so reliable companies which may give you a "gringo" rate
Comment: Excellent. Don't be afraid to add these details to your answer.
Answer: Rome2Rio says there are three bus companies running the Arequipa - Nazca route. You are looking at a total journey time of approximately 9 hours. Below are the company websites which can be used to purchase the tickets:

OLTURSA
Cruz del Sur
La Veloz del Norte
Comment: I'd be curious to know if these websites charge the gringo rate and if it's cheaper to buy locally
Answer: I am bit later in answering but you can also try a platform called CheckMyBus (one can change the domain to a specific country/currency/language) and there you can compare the prices of almost all the bus companies in the country (and worldwide) and you will be redirected to the company's website to book your ticket online.
Have a safe trip!
Answer: You can buy directly throw some of the companies
Best ones (but expensive)
Oltursa
Cruz del Sur
But the user experience is terrible
especially if you have a foreign credit card
I would recommend you to use Bus portal which is a peruvian startup that works like an OTA for buses
Answer: I was in Peru several months ago. I went from Arequipa to Ica. I just walked into the bus station in the morning and bought a ticket for that night. I bought a first class ticket and slept overnight on a big comfy chair. A simple dinner and breakfast was also served.
Buying a ticket there and then worked well for me, but I'm not sure if there's festivals happening when you're travelling.
I highly recommend the sand dunes of Huacachina


What is the backwards compatibility of blender?

Question: At what point does the backwards compatibility of blender break, and for what features? I know if I open a 2.49 blend file in 2.7x it will not have the animation data. I heard that 2.7x would break some features of old blender files, so is there a list anywhere of feature compatibility?
Comment: Did you have a look at the release logs? E.g. http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.70/More_Features
Comment: [Wikipedia](http://en.wikipedia.org/wiki/Blender_%28software%29#File_format) has a short list, but there are some 2.7 things which are not on it (so don't assume that it's exhaustive)
Answer: The mesh format has changed. 2.6+ uses BMesh and allows for N-gons (i.e. polygons with more than 4 vertices). 2.49 has only quads.
If you don't save with Save Legacy option, you will get only edges, no polygons!
N-gons will be deleted in 2.49.
The whole API, interface and the major version of Python have changed. No scripts are compatible between 2.5+ and 2.49. (Still, I'm suprised how many 2.x concepts in the API were considered good and made its way further to 2.5+ )
Linked libraries between 2.6+ files actually work in 2.49! You can append and link things from 2.6+ files :)
Many new modifiers were introduced in 2.6+.
If used, you won't get any 'Unknown' warning in 2.49. No, they will be anihillated instead. The same is (sadly) true about new types of nodes...
Names (of objects, materials) in 2.49 have length limits: 16 characters plus the .001 suffix. Also, no international characters are allowed. If you leave a long name in a 2.6+ file, it will end with [] symbol in 2.49. Editing such name in UI and pressing Enter will 'normalize' it.
2.6+ has no options per polygon (mostly game-related, but not only: like Collision, Invisible, alpha blending mode). In 2.6+ you need to set them per material and use "Blender Game" as the rendering engine.
2.49 will not recognize these settings. Also, 2.6+ will break the per-face mode (a bit field). You have to reset the bit field first:
polygon.mode = 5

to be able to use bitwise operations again, like:
polygon.mode &= ~(Mesh.FaceModes.INVISIBLE)

You will need these operations to recover per-polygon flags with Python.
2.6+ names new UV channels "UVMap" by default, while 2.49 uses "UVTex".
It's not an actual compatibility issue, but remember to name the two objects' channels identically before you join them (Ctrl+J). Otherwise, you will lose UV mapping on one of the objects!
The compatibility is quite good IMO :) taking into consideration how much has changed since 2.49.
Answer: What you're talking about is forward compatibility. Backward compatibility is the ability to open files in older versions of the product.
The release notes should give you a hint as to both, but it's always safest to assume neither exists.
AFAIK the Blender team doesn't guarantee either between even minor releases, let along the large step from the 2.4 branch to the 2.7 branch.
Comment: I've opened a simple file from blender 1.0 in 2.7, so there is certainly some effort to support this..
Comment: @gandalf3 effort or plain old luck? Just because some things haven't changed doesn't mean there's an active program to limit change...
Comment: It's a philosophical answer ("better not to have to deal with compatibility!") rather than a proper research ;) Surely Blender developers had the compatibility on their priority list for 2.5+. Just look how many things work  between the two major versions, despite a total codebase rewrite.
Comment: Just to clarify, quoting from [wikipedia](http://en.wikipedia.org/wiki/Backward_compatibility) "backward or downward compatible if it can work with input generated by an older product or technology."
Comment: I wasn't able to find any solid sources, but I'm convinced it isn't "luck". Some things I did find: [wikipedia](http://en.wikipedia.org/wiki/Blender_%28software%29#File_format), [blendernation](http://en.wikipedia.org/wiki/Blender_%28software%29#File_format). And from the  [dev blog](http://code.blender.org/index.php/2013/06/blender-roadmap-2-7-2-8-and-beyond/): "For 2.7x projects we will allow forward and (minor) backward compatibility breakage". That implies that it normally isn't allowed.


Where to find main shut off switch for breaker

Question: Where can I find the main shut off breaker It doesn't let upload my picture but my breaker is small but doesn't have  main shut off and meter doesn't have a switch either
Comment: My ca 1970 GE panel has no master breaker. I have to switch off four 2-pole breakers to turn off all power to the house. However, one of these 2-pole breakers is the "main" breaker for all the 120 V circuits in the structure. This breaker (60 A) feeds all the 15 A and 20 A breakers in the panel so with one flip I can turn off power to all the 120 V receptacles and lights. The other three 2-pole breakers are, respectively,  for the clothes dryer (30 A), the  a/c condensing unit (40 A), and the electric range (50 A).
Comment: Is it saying your picture is too large?  Or can you not find the button for uploading pictures?
Comment: The image is too big
Comment: Email it to yourself. The phone should automatically make the picture a smaller size appropriate for email.
Comment: @AnthonyAlvarez -- you can also try posting it to [imgur](https://imgur.com) and posting a link in the comments here, then we can edit it in :)
Comment: What does that 40A double pole breaker in spaces 5 and 7 turn off?
Comment: Also, is your meter on the same building as this panel?
Answer: You may have what is called a Rule of Six setup. This means that more than one, but no more than six, separate switches need to be turned off to turn off all power to the building. As I understand it, this was allowed many years ago in order to make large panels without having a really big main breaker, but it has been used in many different ways. It is not the normal way to do things today - I'm not sure if it is even allowed for new installations, but old "rule of six" installations that are functioning OK are grandfathered.
For example, in my house there are two pairs of fuse blocks to be pulled out in each of two fuse panels that came with the house (or at least have been there for a very long time) plus a main breaker in a subpanel added with my kitchen remodel, for a total of 5 items to be pulled or switched to cut off everything. If/when I finally get this all replaced with one nice big breaker panel, I will need to have the electric company pull the meter/cut power to do that. Of course, I'll want them to increase my total service at the same time, and the end result is a lot of work and money and..."someday".
Answer: You may not have one. I've twice owned houses where the main breaker panel did not have a single master breaker.
In those cases, shutting off power to the whole house involved having the professionals physically cut the lines where they reached the house. I chose to have a new breaker panel with a master shutoff installed in each case.
Comment: Where are you on this planet? Did those panels have two "banks" of breakers, one above the other?
Comment: No. They were normal two column panels as I regularly see in houses in the mid-west USA. Both were older houses.
Comment: Pull the meter why cut the line feed?
Comment: I don't recall.
Answer: BURNINATE THIS PANEL BEFORE IT BURNINATES YOUR HOUSE
You have a larger problem here than your inability to find a main breaker; namely, that your panel is one of those infamous FPE Stab-Lok firestarters.  I would have the meter pulled (or "pulled", most smart meters can disconnect the power to your house remotely upon utility request, and your average utility will do it for free if you call them during business hours) and this panel replaced with something of modern make ASAP.
Given that this panel never had room for anything other than a backfed main breaker to begin with, I seriously doubt it's anything more than a 100A unit, so a 24-space or 30-space, 100A, main breaker, NEMA 3R (outdoor) panel will suffice as a replacement.  That will take care of both the FPE fire hazard and the fact this panel violates the rule of six (it was intended to be used as a subpanel or a rule-of-six main panel with six two pole breakers, but was configured improperly by an installer who didn't know any better), all in one fell swoop.


Sim contacts on call screen?

Question: Is it possible to see contacts from SIM on the incoming call screen and in SMS messages? I did only find apps for managing them.
I am using Cyanogen 7.2 (that's Android 2.3.7) if that matters.
NOTE: I am not interested in paid apps.
Answer: "SIM Contacts" by "NEEDOM STUDIO" is a free app on the Android market that shows contacts from SIM on the incoming call screen. You have to enable the "incoming calls to remind" option for this.
I didn't find an app that shows them in the SMS or call log. I'd really like that.
Even better would be just an option in a normal contacts manager to include contacts on the SIM without having to copy them to the phone.
I like to keep my contacts on the SIM only so i can just put my SIM in my old phone (with longer battery life) and it shows all the contacts.

Sim contacts on call screen?