Pay for 7 days using 1 7-segment gold bar and 2 cuts

You've got someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?

Source : http://www.sellsbrothers.com/fun/msiview/default.aspx?content=question.htm

[Probability] Divide 100 marbles into two piles

How would you divide 50 black and 50 white marbles into two piles so that the probability of picking a white marble as follows is maximized: we first pick one of the piles uniformly at random, then we pick a marble in that pile uniformly at random?

Source : http://gurmeetsingh.wordpress.com/puzzles/

Find the poisoned wine barrel

An enemy spy has poisoned one out of 1000 barrels of wine in a king’s cellar. Even a sip of the poisoned wine has potency to kill. However, the effects of the poison show only in 30 days. The king asks the royal jailor to identify the poisoned barrel within 30 days. What is the least number of prisoners the jailor must employ to identify the poisoned barrel

Source : http://gurmeetsingh.wordpress.com/2008/09/12/puzzle-poisoned-wine-barrels/

ping.fm - better than friendfeed, just what I want

Experimenting with ping.fm's Y! bot. You can post to the huge set of social networks http://ping.fm supports - all using their integration with IMs, SMS and Web. Prety cool :)

Rope Escape

Rajeev is trapped atop a building 200m high. He has with him a rope 150m long.There is a hook at the top where he stands.

Looking down, he notices that midway between him and the ground, at a height of 100m, there is a ledge with another hook. In his pocket lies a Swiss knife.

How might he be able to come down using the rope, the two hooks and the Swiss knife?

Source : http://gurmeetsingh.wordpress.com/puzzles/

[ALGO] Six Colored Balls

We have two red, two green and two yellow balls. For each color, one ball is heavy and the other is light. All heavy balls weigh the same. All light balls weigh the same. How many weighings on a beam balance are necessary to identify the three heavy balls?

Source : http://gurmeetsingh.wordpress.com/puzzles/

svn:ignore

I have a build which produces some extra files (not to be checked in).
Every time a do a build, svn shows these files as non versioned, new files and I have to ignore them.

Enter -
svn propset svn:ignore
. Here is how it worked for me :
prompt> svn status
? test.log
? test.log.1
..... (other src code)


Look at those test.log entries - my test case generated them and I'm least bothered to delete them. However, it corrupts my svn status output :-)

So will create an ignore file :
prompt> cat ifile
test*


and ask svn to ignore these file patterns :

prompt> svn propset -R svn:ignore --file ifile .
prompt> svn status
M .
M src
M src/test
... (other src code)


There - the test.log entries no longer show up in svn status

prompt> svn commit


Detailed reading on svn property set : http://svnbook.red-bean.com/en/1.1/ch07s02.html
 
Moviehole-madhurtanwani © 2010 | Designed by Chica Blogger | Back to top