Solving puzzle with programming

Today, I stumbled upon an interesting puzzle in whatsapp group. The puzzle goes as below:

100 people standing in a circle in an order 1 to 100.
No. 1 has a sword. He kills next person (i.e. no. 2) and gives sword to next to next (i.e no. 3). All person does the same until only 1 survives. Which number survives at the last?

Someone had already given answer but I thought to confirm it with programming as it could be a nice example of solving puzzle with programming. Before starting to code one must create logic/flow for it. This is how I broke down the puzzle.

'બે યાર' - મસ્ત મજાની ગુજરાતી ફિલ્મ

'બે યાર' નું ટ્રેલર રિલીઝ થયું ત્યારથી જ ફિલ્મ જોવાની ઈચ્છા હતી. અભિષેક જૈનનું 'કેવી રીતે જઈશ' જોયા પછી એમનું બીજું મુવી જોવાની ઉત્સુકતા રહે એ સમજાય એવી વાત છે. 'કેવી રીતે જઈશ'એ ગુજરાતી સિનેમા માટે નવા શિખરો સર કર્યા હતા અને 'બે યાર' નું ટ્રેલર જોયા પછી નક્કી જ થઇ જતું હતું કે આ ફિલ્મ ગુજરાતી સિનેમાને હજી આગળ વધારશે.

આખરે ગયા રવિવારે ફિલ્મ જોવાનું થયું અને સાચે જ ફિલ્મ જોઇને દિલ ખુશ થઇ ગયું. ખુબ જ સરસ મિત્રતાની વાર્તા, બધા જ કલાકારોનો અફલાતુન અભિનય, અદભુત સિનેમેટોગ્રાફી, જોરદાર બેકગ્રાઉન્ડ મ્યુઝીક, કોઈ ફાલતું આઇટમ સોંગ કે રોમાન્ટિક સોંગ નહી, બસ અઢી કલાકનું સંપૂર્ણ મનોરંજન.

Visit to Hathni Mata Waterfall

Last Sunday we visited Hathni Mata Waterfall. It is situated near Jambughoda Sanctuary and Pavagadh, around 75 KMs from Vadodara and 175 KMs from Ahmedabad. Going from Pavagadh, both the roads to reach there, from Shivrajpur and Jambughoda, are very narrow so you can stuck up in traffic jams on weekends when there are many visitors. Though you can enjoy the lush green surroundings on both the sides of roads which makes the drive very enjoyable. On reaching there we found that the place isn't properly developed yet. Local villagers have put up small stalls of refreshments but there is no restaurant around so for food you have to carry it yourself. Getting parking space isn't a problem as paid parking, created in the farms by locals, is available.

Install Elance Tracker, Adobe AIR and JAVA in Ubuntu

We are using Ubuntu in our company for all our PHP development work and Elance is one of the sources of projects for us. So, we happen to use Elance Tracker frequently. It's a nice tool to record the time you have worked on the project which client can easily review it and make payments according to it. Installing Elance Tracker in Windows is pretty simple, you just download the EXE file, run it and install. In Ubuntu, it's bit tricky as you first need to install Adobe AIR and then only you can install tracker. Also, after tracker is installed you must have java enabled in the system or it won't work. So, I have written the steps one can follow and install all these to make Elance Tracker work fully.

Send emails from local WordPress setup using SMTP

While doing testing of WordPress in local system many times we need to do the email testing and we can't do it as we don't have SMTP server installed on local system. Without going to option of installing SMTP server on local it would be easier to use free SMTP server to send emails from local WordPress setup. I have already given instructions on how to send emails using SMTP server from localhost which uses phpMailer script. WordPress also uses phpMailer to send emails so we can do the changes in coding files to use SMTP and provide username and password. But that is not a recommended option. We can do it easily using WP Mail SMTP plugin.