user-avatar
Today is Saturday
June 7, 2025

Archives: November 2010

November 18, 2010

1. Fox and the holes

by viggy — Categories: Fun, Puzzle — Tags: , , , , Leave a comment

This is another series of blogs I will be writing to archive all the good puzzles that I find. The reason behind this is that by blogging I will make sure that I understand not only the puzzle properly but also the way to find its solution. And the main cream in the puzzle is the simplicity of the technique through which u reach the solution and not the solution itself. So here is the Fox and the holes puzzle.

In a jungle, there are six holes in a line. A fox sleeps in one of these holes every night in such a way that it never sleeps in the same hole in two nights in a row. Also it always selects a hole right or left to the hole in which it slept the previous night. Now as a hunter, you have one chance every midnight to select any one and only one hole and catch the fox while he is sleeping. Device a strategy to find the minimum number of nights you will need to catch the fox.

Points to be noted: 1) If the fox is sleeping in the leftmost hole, then the next night he can sleep only in the hole right to it i.e. the second leftmost.
2) As mentioned, the fox will not sleep consecutively two nights in the same hole.

November 16, 2010

Split .avi video and .mp3 audio files in Ubuntu linux

by viggy — Categories: linux, tech, ubuntu — Tags: , , , , , Leave a comment

I am presently thinking of bringing out a collection of music which I like very much. It wont include any voice but just music. For that I mainly had two issues, first to split video files that I had in .avi format and second to split audio files that I had in .mp3 format.

For video files, I used ffmpeg utility

ffmpeg -i input.avi -ss 00:01:10 -t 00:04:45 output_file.avi

where input.avi is the file from which you want to extract the music.
-ss is the start point of the music
-t is the duration from the start time till when the music is to be extracted
output_file.avi is the file in this the extracted music will be stored.

It will be in .avi format only. If required you can also convert it into audio files.
This gave me the exact chunk of the music video that I wanted for collection.

For Audio files, I used mp3splt utility. I used its gui, mp3splt-gtk which is very easy to use.
All I need to do was select the file from which I wanted to extract music. Select two splitpoints, one for the start and second for the end. And select split button given at the top of the gui. Its as simple as that. Since this utility was available in Ubuntu Repository, I didnt have issues even with installing it

November 14, 2010

Viggy’s day OUT!!

by viggy — Categories: experience, Fun — Tags: , , , Leave a comment

Today I went out with Vivek and Sunny. The plan was that Vivek will bring his friend Sunny and I will bring Tushar with me and both will go to celebrate my joining of Intel and Vivek’s bday. However since I informed Tushar about this plan at the last moment, he was not able to make it. Hence only me, vivek and Sunny were left to enjoy the evening and BOY did we enjoy it.
First, I picked Vivek and Sunny from Jayadeva and then we went in Auto to MG Road. The plan was to go to Oxygen Pub. Vivek has heard a lot about it and even I had always wanted to a pub. So we went to MG road and roamed around a bit before entering Oxygen. I gave the Rs. 900 cover charge and when we entered there were two doors. One led to a lighted hall which had seats all around it and a lot of space in between. However old Hindi songs were being played. The next door led to a disc where Rock songs were being played but it was nearly empty. Only one or two table were occupied and they looked completely drunk. We asked a waiter if this was all as we were disappointed. We were expecting a disc full of couples dancing however we didn’t find any room remotely interesting. Waiter told us that one room was a disc and other was a Girls dance bar. Since the disc was completely empty we thought of trying out the girl’s dance bar. It was truly a dance bar and soon after we entered around 5 girls in Saree which was exposing their hip entered the room and they stood in front of us. They didn’t start dancing yet but they were shaking their hip and clearly trying to entice us. We were feeling very awkward and I was scared to death. I knew that a dance bar was banned in India and didn’t trust these guys to be doing it legally. Hence we all decided to grab a beer ( KF Strong was Rs. 300) to cover our cover charges and run from here soon. Soon people started to pour in the bar and some looked regular chatting with waiters on their way in. And music also changed to latest item songs. The girls had not yet started dancing as such but they were making more movements. One person among the audience took a bundle of Rs. 10 and gave it to waiter nearby. He started dropping it over the head of a girl who was dancing nearby. This made me more awkward. One that money was being dropped in such a way and two that the girls were dancing like that for the money. Soon around 3 more girls came and they also started dancing. Though most of the girls were around 25-30 years old, I noticed one who looked very young and was probably around 20-22 years old. She was beautiful and to see her in this way made me sad. We soon finished our beers and left. Since one of my friend wanted to drink more and it was just around 8, we decided to go to some other pub. As we had heard about Le Rock and we didnt want to try some other unknown pub, we decided to go to Le Rock. The cover charge there was Rs. 400. We were thinking that we wouldnt be able to drink enough to cover the cover charge. However we paid the cover charge and entered. The ambiance looked perfect for a pub and with Bose woofers near our seat, it made sure that we feel every beat of the song. We decided to order a Tower of beer but since it was not there, we ordered a Pitcher and 3 tequilas. However I refused to have a Tequila and Vivek drank mine. We completed one in no time and Vivek ordered one more. Meanwhile we went on with our photoshoot posing in different poses. I was not very with the service there as we had ordered a Potato basket along with our first pitcher and it was brought to us only after we refused to accept the second pitcher if the potato basket was not served soon. Potato basket was really good, especially with Potato’s cut in shape of round faces and some with cream inside them. By this time my head had already started spinning and I was feeling dizzy. This was the first time I had drank so much and even though I didnt have the Tequila shot but even beer was too much for me. I was trying to hold me as much as possible but clearly alcohol does impair your reaction time. In all we had three beer pitchers and the total bill was Rs. 2472. :). And I thought we wouldnt even make it to Rs. 1200. Anyways on our way back we had a fight with an AutoRickshaw driver. He was trying to cheat us by taking a longer route. We took another Auto and were safely back home. So that was my day out with Vivek and Sunny. Overall a wonderful evening with a great new experience of the dance bar. Dont know if I will want to go there again though.

P.S. Since this is the first time I am accepting publicly that I drink beer, if you are one of my relatives please keep it to yourselves. Others can wait to find it out. 🙂

November 9, 2010

3. The Donkey in the well

by viggy — Categories: Panchatantra — Tags: , , , , Leave a comment

Original Source :: http://www.market4us.com/donkey/index.html

One day a farmer’s donkey fell down into a well. The animal cried piteously for hours as the farmer tried to figure out what to do. Finally he decided the animal was old and the well needed to be covered up anyway, it just wasn’t worth it to retrieve the donkey.
So he invited all his neighbors to come over and help him. They all took a shovel and began to shovel dirt into the well. At first, the donkey realised what was happening and cried horribly. Then, to everyone’s amazement, he quieted down. A few shovel loads later, the farmer finally looked down the well and was astonished at what he saw.
With every shovel of dirt that hit his back, the donkey was doing something amazing. He would shake it off and take a step up. As the farmer’s neighbors continued to shovel dirt on top of the animal, he would shake it off and take a step up. Pretty soon, everyone was amazed as the donkey stepped up over the edge of the well and trotted off!
Moral: Life is going to shovel dirt on you, all kinds of dirt. The trick to getting out of the well is to shake it off and take a step up. Each of our troubles is a stepping stone. We can get out of the deepest wells just by not stopping, never giving up! Shake it off and take a step up!

November 9, 2010

2. Importance of small things

by viggy — Categories: Panchatantra — Tags: , , Leave a comment

Original source:: http://cityblogger.com/archives/2010/11/01/recycling-the-buddha-way

Buddha, one day, was in deep thought about the worldly activities and the ways of instilling goodness in human beings. The following is the text of conversation between him and his disciple.

One of the disciples approached him and said humbly “Oh my teacher! While you are so much concerned about the world and others, why don’t you look into the welfare and needs of your own disciples also?”.

Buddha: OK…Tell me how I can help you?

Disciple: Master, My attire is worn out and is beyond the decency to wear the same. Can I get a new one please?

Buddha found the robe indeed was in a bad condition which needed replacement. He asked the store keeper to give the disciple a new robe to wear on. The disciple thanked Buddha and retired to his room.

Though he met his disciple’s requirement, Buddha was not all that contended on his decision. He realized he missed out some point. A while after, he realized, what he should have asked the disciple? He went to his disciple’s place and asked him “Is your new attire comfortable? Do you need anything more?”

Disciple: Thank you my Master. The attire is indeed very comfortable. I need nothing more.
Buddha: Having got the new one, what did you do with your old attire?
Disciple: I am using it as my bedspread.
Buddha: Then…hope you have disposed off your bed spread.
Disciple: No…no…Master. I am using my old bedspread as my window curtain.
Buddha: What about your old curtain?
Disciple: Being used to handle hot utensils in the kitchen
Buddha: Oh…I see…Can you tell me what they did with the old cloth they
used in Kitchen?
Disciple: They are being used to wash the floor.
Buddha: Then, the old rug being used to wash the floor…????
Disciple: Master, since they were torn off so much, we could not find
any better use, but to use as a twig in the oil lamp, which is right
now lit in your study room….

Buddha smiled in contentment and left for his room.

November 8, 2010

1. The Best Salesman Ever !!

by viggy — Categories: Fun, Panchatantra — Tags: , , 1 Comment

Original source: http://gpraveenkumar.wordpress.com/2010/11/08/the-best-salesman-ever/

A keen immigrant Indian Marwadi lad applied for a salesman’s job at London ‘s premier downtown department store. In fact, it was the biggest store in the world – you could get anything there.

The boss asked him, “Have you ever been a salesman before?” “Yes sir, I was a salesman in India “, replied the lad. The boss liked the cut of him and said, “You can start tomorrow and I’ll come and see you.”

The day was long and arduous for the young man, but he got through it. And finally 6:00 PM came around. The boss duly fronted up and asked, “How many sales did you make today?” “Sir, Just ONE sale.” said the young salesman. “Only one sale?” blurted the boss. “No! No! You see here, most of my staff make 20 or 30 sales a day. “If you want to keep this job, you’d better be doing better than just one sale. By the way “How much was the sale worth?”

93300534.00 pounds” said the young Marwadi. “What”,” How did you manage that?” asked the flabbergasted boss.

“Well”, said the salesman, “This man came in and I sold him a small fish hook, then a medium hook and finally a really large hook. Then I sell him new fishing rod and some fishing gear. Then I asked him where he was going fishing and he said down the coast. So I told him he’d be needing a boat, so I took him down to the boat department and sold him that twenty-foot schooner with the twin engines. Then he said his Volkswagen probably wouldn’t be able to pull it, so I took him to our automotive department and sold him that new Deluxe 4X4 Blazer.

I then asked him where he’ll be staying, and since he had no accommodation, I took him to camping department and sold him one of those new igloo 6-sleeper camper tents. Then the guy said, while we’re at it, I should throw in about $100 worth of groceries and two cases of beer.

The boss took two steps back and asked in astonishment, “You sold all that to a guy who came in for a fish hook!!”

“No” answered the salesman, “he came in to buy a headache relief tablet and I said to him, “Sir, fishing is best headache removal”

Boss – “You sit in my chair…….

Moral of the story::
According to me, the salesman was able to make that sale not because of his convincing power or ability to sale but due to his ability to understand the complete use case for the customer. A normal salesman would have sold the tablet that he was asked for and be happy but this salesman actually tried to understand the customer’s problem and helped him to solve the problem. Again this can become true only in ideal scenarios where a salesman has time enough to understand the customer problem. But I think it is a good quality for a salesman to have.

November 8, 2010

My own Panchatantra collections

by viggy — Categories: Fun, Panchatantra — Tags: , , Leave a comment

I have always liked to read small stories which have great meaning and moral behind them. It can be those of Panchatantra or those written by Leo Tolstoy. However many times I find that I forget these stories and hence I will now start documenting them here. It might not necessary be a popular story, even a small incident described by someone in form a story will do for this section. The idea is to keep a record of such instances so that they can be taken as an experience in future to decide something. However as his might clearly lead to some copyright issues, I would like to clearly state here that I am doing this only for the reasons stated above and not for any commercial gains. Also all the content shared by me here will be under CC by SA license if their original sources dont have any problems with that. I would also mention the original sources every time I come to know of it.

November 8, 2010

My tweek to change proxy easily for my house and for my office

by viggy — Categories: linux — Tags: , Leave a comment

As use the same laptop in my house that use in my office, I usually have to keep chaning my proxy connection after I come back to home. In my house, I dont use a proxy but in my office I have to use one for Internet access. In firefox there is a beautiful add-on FoxyProxy which can be used for the same purpose