Archive for April, 2012

Configure Wireless Driver In Ubuntu
Above is the link to a very nice article from ubuntu documentation to configure wireless driver on Ubuntu. However the catch in the article is that for the manual driver configuration, after installing the driver when you try to activate it from “system->administration->hardware drivers” or “Additional Drivers” (if using unity), it gives error and you wont be able to load the driver on each restart and you have to do it manually. To overcome this, just add an entry of the driver in /etc/modules file. Like for e.g. in my case of bcm4312 bcm driver, append following line in /etc/modules:
b43
Now I am enjoying the Wifi in my Ubuntu 12.04. 🙂

Zen

Posted: April 28, 2012 in Technology
Tags: ,

A continuation of the post
Tales Of Zen Master Greg
Al Koans
Loginataka-A really good read

Gateless Gate-A compilation of 13th century tales of Zen Religion

A good read for newbies

Posted: April 28, 2012 in Technology
Tags: , ,

Read Here. Contains a lot of informations as well as many good links for newbies interested in Unix,Programming,becoming a hacker.

Back to childhood memories

Posted: April 26, 2012 in Uncategorized
Tags: ,

Was coming back from office when I saw a kid walking past me. She was walking fast enough to leave everyone else behind as if she was in some kind of competition with the other people taking longer steps than usual. Seeing her, I could not stop myself from having a smile on my face as I used to behave same. Whether I am walking or on a cycle, I always felt like I am in a competition and I have to get past of everyone ahead of me even if I saw a person ahead of me a mile and I used to set the target for myself like I have to get past that person before my walk is over (reached to destination). I remember cycling and competing with a guy on scooter. I was around 14 or 15 yr old. It wasn’t long that he realised that I was competing with him and he told me that “ok, lets see who win”. Though somehow, due to the traffic on the road, I somehow left him behind before the turn of the road came where he had to take a different path but I had a feel of pride that I did beat a guy scooter. However I never mentioned it at home (would surely had got the spankings for such an act on busy roads). Those Days 🙂

I just watched this video on youtube and it made me think is it really that whom we used to consider the weak till yesterday are the ones having more power due to the rules created to make them strong. Its everywhere whether its reservation based on cast, boys vs girls and so many more are the cases…just think

I was sitting in a meeting that did not involve much interaction from me and on the other hand I had a lot more work to do on my workstation but attending the meet was also important. Then I thought there must be some app in android till date which can allow an Remote Desktop Connection to my workstation and I started searching for it. Then I found this app 2X client which allows rdp connection as well as vpn connections but the interface was not good. Then I found this nice app Pocket Cloud Remote RDP/VNC and the way its interface is designed and the usability, it is really a great app. I have been using it regularly to drive my work while away from workstation.

Just found out this website which discusses about technical legal disputes among the giants of the Industry. Must check it out.

My colleague Arun posted about having a reminder using zenity in this post. When I saw this post, I told him that if its a reminder why not make it like an alarm in snoozed mode until unless it has been stopped properly, it should keep popping up reminding you of the task you have to do. Lets say you want a reminder after 10 minutes and then you want to keep popping it up in every 1 min, following is what you need to do in a terminal:
#crontab -e
Add following line
*/1 * * * * at -f ~/myjob now+10 min

first entry is minutes,then hours,then day of month,month and the last * can be replaced by day of week. last entry “at -f ~/myjob now+10 min” is the command which will be executed every single minute.
Save the File. Now in myjob file in your home directory, add the following lines as discussed in Arun’s post,
zenity –info –display=:0.0 –text \
“Time to get outta my face – your laptop”

When you have to turn off the reminder, just add a # in front of the first line as shown below:
#zenity –info –display=:0.0 –text \
“Time to get outta my face – your laptop”

and save the file. To change the message, edit the second line of myjob file,the text inside the quotes. Cheers

Problem A
Solution :
Following is the mapping of alphabets:
{‘a’,’b’,’c’,’d’,’e’,’f’,’g’,’h’,’i’,’j’,’k’,’l’,’m’,’n’,’o’,’p’,’q’,’r’,’s’,’t’,’u’,’v’,’w’,’x’,’y’,’z’}=>{‘y’,’h’,’e’,’s’,’o’,’c’,’v’,’x’,’d’,’u’,’i’,’g’,’l’,’b’,’k’,’r’,’z’,’t’,’n’,’w’,’j’,’p’,’f’,’m’,’a’,’q’}
Traverse for each character in input string and replace it with the mapped alphabet
Solution can be downloaded from here

Problem B
Solution:
For each score
avgScore = score/3;
difference = score – avgScore * 3;
if difference is 0 , best score is avgScore + 1 if its a surprised score else best score is avgScore
if difference is 1, best score is avgScore+1
if difference is 2, best score is avgScore + 2 if its surprised else its best score is avgScore+1
for each difference, keep count of scores for which best score is greater than or equal to P without being a surprised score
also for each difference, keep count of scores for which best score is greater than or equal to P with being a surprised score
answer will be pure_surprised_score + score>=P_without_being_surprised
Solution can be downloaded from here

Problem C
Solution :
Read A and B
Create a large array Arr of integers of size as that of the given range and initialize it to zero
For each X=A to X=B
recycle X to form the smallest no. T from digits of X
increment value of Arr[T] by 1
End For
Ans = 0
For count=0 to Size Of Arr
Ans += Arr[count] *(Arr[count]-1)/2 //combination of n occurrences of a recycled no. taking 2 at a time
End For
Return Ans

Solution Can be downloaded from here

Tao of programming

Posted: April 16, 2012 in Technology
Tags: ,

When I first joined Novell and I was very new to the Industry, Arun (My colleague) gave me the printout from this website. I read it the same night and I was quite amazed by the writing. Reading it was fun but at the same time , it was a lot of learning about what a real programmer is. It gave me an insight of what I might be facing in the Industry in coming future. I would say its a good read and those who love writing the pieces responsible for the execution of bytes, they are gonna love it.