Rss Feed

Access Linux files on Windows

As Linux is catching up, with the increasing popularity and aggressive marketing strategies of Ubuntu, many new users are trying Ubuntu on a dual boot. Those of you, who're using Windows and Linux on a dual boot might sometime need to access your Linux filesystem's stuff while working on Windows. For the n00bs its a serious problem. Here's the simplest solution. Just download Ext2IFS app and install it on Windows, and you're done! You can get it here http://www.fs-driver.org/extendeddl.html. Enjoy!

Higher Computer Education Online

Who says higher technical education is costly in India??? lol Many say!! And it is true to a large extent. Most of the talented students never get a chance to get themselves enrolled in IITs or NITs for a reason or another. But still the talented ones have passion to study and get what they deserve, through a bypass route. Admission to private engg. institutions is pretty easy but they charge loads of money. And, barring a few, most of them have pretty low grade quality of education.
SOciety apart, let me come to the point. Ambitious and passionate create their own paths to success! I'm writing this post to help such students find appropriate targetted study stuff online. Most of the stuff pertaining to the syllabi of B.E./B.Tech is available online but scattered quite badly. On performing a few searches, I found lots of stuff online that I'm enumerating here.

0. NPTEL Online Stuff
NPTEL stands for National Programme on Technology Enhanced Learning and is an initiative from various IITs to provide IIT lecture notes and videos to non-IITians online. So, far the best congregation of online study material for engineering students.
http://nptel.iitm.ac.in/


1. Rai Foundation Open Courseware
Rai university has its lecture notes online as per its open courseware program. Here's the link to the stuff for B.E./B.Tech in CS/IT and BCA/MCA:
http://www.rocw.raifoundation.org/course-computing.htm
Almost all the subjects of most of the university syllabi are covered. AICTE already has recommended a uniform syllabus for all technical universities.

2. Springer Link
Springer link has a congreagation of high level papers related to all the fields of engineering. Here's the link to computer science section. Use the search box in the right pane to find your desired syllabus.
http://www.springerlink.com/computer-science/

3. FreeTechBooks
FreeTechBooks.Com has open source public domain books for computer science and IT branches. A really good one:
http://www.freetechbooks.com/

4. IIT Lectures on YouTube
Recently IIT launched a program according to which all the classroom lecture videos will be made online on YouTube. Follow the link and search for ur subject. Now, you don't need to be in IIT to study in IIT
http://www.youtube.com/results?search_type=&search_query=iit+lectures&aq=f

5. WikiPedia
Leaving WikiPedia in the list will be a big blunder! WikiPedia has the largest congreagation of human knowledge on the Internet. To search for a particular topic on WikiPedia, type the following query in Google Search box and hit the I'm Feeling Lucky button:

site:"en.wikipedia.org" <topic name>

Example:
site:"en.wikipedia.org" Dynamic Programming


Thats enough dose for now! Study well, and bring up a bright future for yourself and for India. Jai Hind!!!

Automatic Wallpaper Changer in Ubuntu

Remember "Webshots Desktop" on windows??? 'Twas a cool program which thrived in Windows 98 age. It used to change wallpapers automatically at fixed time intervals. But it used to sit in the system tray and eat up lots of valuable resources. Now, its the Ubuntu Era!!! Ubuntu is catching up in the Desktop OSes race. So, a boring evening and I thought of finding the best automatic wallpaper changer for GNOME. After lots of googling I found many options. Most of them were python scripts, adaptation of someone else's starving labour!!! Scripts aren't good for newbies and like to whew them away. I tried some of them, some worked and others tried mixing up the grey matter inside my mind. At last I found a nice one with intuitive GUI. Its called "wallpaper-tray". To install it, search for it in "Synaptic Package Manager" and install it. After installation open a terminal and type "wallpaper-tray" and hit that damned "Return" button!!! You can select a folder(or multiple ones) from which images will be displayed. Set the time in minutes for shuffling. To add it in Startup, so that you don't need to launch it manually everytime you boot, just open the "System" menu, there click "Sessions" in the "Preferences" submenu. Add it there. And you're done! And , its not a resource hog like the nasty Webshots on Windows.
Enjoy ;)

Receive your e-mails through SMS for free

This post is beneficial for Indian people only.
MyToday.com provides free, instant, e-mail alert notifications via SMS. I discovered this just a week ago, although it existed since quite long and many of my friends were using it and me being totally ignorant about it!!!
To use the service, you just need to carry out the following two steps:
1. Send an SMS to 575758 with the following text MAIL START <your city name>
For example: MAIL START DELHI
or
MAIL START CHANDIGARH
If you live in a small city/town, then you may send your state's capital city name.
2. The next step is to login to your e-mail account and set an autoforwarder that sends every incoming mail to 91<ur 10 digit mob. no.>@m3m.in
Example: 919876543210@m3m.in

Now whenever any e-mail arrives in your inbox, your mail provider will forward a copy of it to mytoday, and they'll in turn send it to you immediately through SMS.

There are several applications of this service. It depends on your thought power and creativity to tap them. One simple one is instant sms alerts for orkut scraps.

For that, just login to your orkut account from PC and click settings. There in notifications set scrap notifications to be sent by e-mail. And thats it!!! Now, whenever anyone scraps you, you'll immediately receive an SMS.

This service is absolutely free, except for the first activation SMS that you sent. Airtel charges Rs.3 for that. I dunno about other operator charges.

Enjoy!!!

Download 2+MB through Airtel NOP




















Am gettin bored lyin on da bed tryin 2 sleep but sleep is milez away 4m my eyes. Ok, so empty brain is devilz worksop! So, I think of postin sumthin 2 ma blog n an idea popped up, n thatz 2 post da 2+MB download trick 4 NOP victims!!! Yes, victims! Many peepz hav askd me dis n I've repeated 1 less than a million times da same procedure. Dis 1 is da millionth tym n aftrwards I'll always point every1 2 dis blog. Ok, so lets start! And hey, 1 more thing. I'm makin dis post 4m my bellphone, oh pardon, cellphone, so I ain't using da 4mal english. Just compressin everyfin lyk n sms. So lets get ahead. 1st thing 2 know is d requirements. U need ne opera mini mod that has d download manager. All mods above ver2 have da d'load manager. And 2nd thing u need is a fone wid Airtel NOP connection. And hey, da phone shudn't be a Nokia s40 cuz s40 bricks don't allow java apps 2 connect 2 net thru NOP. Prefer an SE phone or an s60 symbian os 8 or above phone. Apart 4m d above 2, u need an average IQ 2 understand actually what's going on. Ok, now launch opera mini mod n open da site from where u wanna d'load da file. Click the link. A Download page will popup. Press the left softkey twice 2 get da download setup page as the screenshot given here. In this page scroll down 2 da checkbox labelled 'Loading on positions beginning-end'. Check the checkbox n in da input box below enter '0-2048000' without d quotes off course.
Leave everyfin else untouched n press d left soft key twice 2 start d download.Aftr d download completes repeat same steps again but this time in the input box '2048001-4096000' and below select the radio button labelled 'Resume Interrupted' instead of 'Auto Rename'. Repeat until you've downloaded the whole file in fragments of 2MB. You've 2 repeat d steps ceil(filesize in mb/2) times. Share d trick wid ur frns n enjoy downloading large songs thru NOP. Cheers!

Facebook's move for the advancements in CS

Facebook has started a fellowship program for Ph.D. students studying in US universities. The students will be encouraged to solve the complex problems pertaining to the field of CS in following areas: Internet economics, cloud computing, social computing, data mining, machine learning, and systems and information retrieval. They will pay the tution fees and provide an stipend of $30,000. This, according to me is a very good move by facebook to directly attack practical problems armed with the power of academia and proceed to some real advancements in CS

Implementing a list data structure using an array, in C

I planned to study lists, linked lists, stacks, queues, trees and graphs and implement them all using C.
 

The first one on the target was lists. So I started off and wrote a lists demo program. I'm posting the program below. It may come handy to you if you are a student searching something for your assignment.
Compile it in GCC. You may also compile on Windoze but I haven't tested on Windoze.
The program allows to:
 
  1. Print all the values stored
  2. Insert a new value at specified position
  3. Insert a value at the end of the list(append)
  4. Delete a value at specified position
  5. Delete all occurences of a value from the list
  6. Find all occurences of an item
  7. Empty the list
 I've also made the text colourful using the escape sequences for colours. Those \33[31m things are for colouring the text displayed while executing the program.
 
 
Here's the program.
 
 

#include <stdio.h>
#define SIZE 65536
#define ENDMARKER -65535

int data[SIZE];

int print_all();
int add(int pos, int datum);
int delete(int pos);
int append(int datum);
int delall(int datum);
int find(int datum);
int print(int pos);
int empty();

int main(){
int pos, datum;
int option;
data[0]=ENDMARKER;
printf("\n\33[36mWelcome to the list data structure demonstration program! The program starts with a list of integers(initially empty). Through this program's interface, you can insert items into the list at desired positions, or at the end; delete an item from the list from an specific position, or all occurences of an item from the list; find the position(s) of an item in the list; view all the items of the list; view an item stored at a particular position; or you may also empty the list.\n");
while(option!='9'){
printf("\n\33[32mMenu\n----\n");
printf("1. View all the items");
printf("\n2. Add an item at a given position");
printf("\n3. Add an item at the end of the list");
printf("\n4. Delete an item at a given position");
printf("\n5. Delete all occurences of an item value");
printf("\n6. Print an item at the given position");
printf("\n7. Find all the occurances of an item");
printf("\n8. Empty the list.");
printf("\n9. Exit\nEnter your choice and hit the enter key:");
scanf("%d",&option);
switch(option){
case 1:
print_all();
break;
case 2:
printf("\n\33[33mPlease enter the position where item should be inserted: ");
scanf("%d",&pos);
printf("Please enter the item value to be inserted: ");
scanf("%d",&datum);
add(pos, datum);
break;
case 3:
printf("\n\33[33mPlease enter the item value to be inserted at the end of the list: ");
scanf("%d",&datum);
append(datum);
break;

case 4:
printf("\n\33[33mPlease enter the position of the item to be deleted: ");
scanf("%d",&pos);
delete(pos);
break;
case 5:
printf("\n\33[33mPlease enter the item to be deleted from the list: ");
scanf("%d",&datum);
delall(datum);
break;
case 6:
printf("\n\33[33mPlease enter the position of the item whose value is to be printed: ");
scanf("%d",&pos);
print(pos);
break;
case 7:
printf("\n\33[33mPlease enter the item value whose position is to be found: ");
scanf("%d",&datum);
find(datum);
break;
case 8:
empty();
break;
case 9:
printf("\n\33[34mThank you for using this program. Have a nice time!\n\33[37m");
return(1);
break;
default:
printf("\n\33[31mInvalid use. Please retry.\n");
break;
}
}
printf("\33[37m");
return (0);
}

int num_items(){
int num=0;
int i;
for(i=0;data[i]!=ENDMARKER;i++);
return i;
}

int print_all(){
if(data[0]==ENDMARKER){
printf("\n\33[31mNo items could be found in the list.\nYou may insert some data first, before experimenting.\n");
return 0;
}
printf("\nFollowing items were found in the list:\n\n");
printf("\33[35mPosition\tItem\n");
printf("--------\t----\n");
int i;
for(i=0;data[i]!=ENDMARKER;i++){
printf("%8d\t%4d\n",i,data[i]);
}
printf("\n");
return 1;
}

int add(int pos, int datum){
if((pos>num_items()) || pos<0){
printf("\n\33[31mYou can't enter an item at this location because the list is full upto %d position. You can enter items from 0th position upto %dth position.\n",num_items(),num_items());
return (0);
}
data[num_items()+1]=ENDMARKER;
int i;
for(i=num_items();i>=pos;i--){
data[i]=data[i-1];
}
data[pos]=datum;
printf("\nThe item %d has been successfully inserted at the position %d.\nThe modified list is as follows.\n\n",datum,pos);
printf("\33[35mPosition\tItem\n");
printf("--------\t----\n");
for(i=0;data[i]!=ENDMARKER;i++){
printf("%8d\t%4d\n",i,data[i]);
}
printf("\n");
return 1;
}

int append(int datum){
data[num_items()+1]=ENDMARKER;
data[num_items()]=datum;
printf("\nThe item %d has been successfully appended to the list.\n The modified list is as follows.\n\n",datum);
printf("\33[35mPosition\tItem\n");
printf("--------\t----\n");
int i;
for(i=0;data[i]!=ENDMARKER;i++){
printf("%8d\t%4d\n",i,data[i]);
}
printf("\n");
return 1;
}

int delete(int pos){
if((pos>num_items()) || pos<0){
printf("\n\33[31mThat location doesn't hold any data value. Please enter a location that contains a value. Locations from 0 up to %d hold data values.\n",num_items());
return (0);
}
if(num_items()==0){
printf("\n\33[31mThe list is empty. No deletion possible.\n");
return 0;
}
int i;
for(i=pos;i<=num_items();i++){
data[i]=data[i+1];
}
data[num_items()]=ENDMARKER;
printf("\nThe item stored at the position %d has been successfully deleted.\n The modified list is as follows.\n\n",pos);
printf("\33[35mPosition\tItem\n");
printf("--------\t----\n");
for(i=0;data[i]!=ENDMARKER;i++){
printf("%8d\t%4d\n",i,data[i]);
}
printf("\n");
return 1;
}

int delall(int datum){
int i;
if(num_items()==0){
printf("\n\33[31mThe list is empty. No deletion possible.\n");
return 0;
}
int found=0;
for(i=0;i<=num_items();i++){
if(data[i]==datum){
found=1;
break;
}
}
if(found==0){
printf("\n\33[31mThe requested item wasn't found in the list. Deletion not possible.\n");
return (0);
}
for(i=0;data[i]!=ENDMARKER;i++){
if(data[i]==datum){
int j;
for(j=i;data[j+1]!=ENDMARKER;j++){
data[j]=data[j+1];
}
data[j]=ENDMARKER;
i--;
}
}
printf("\nAll the occurences of %d have been deleted from the list. The modified list is as follows:\n\n",datum); 
printf("\33[35mPosition\tItem\n");
printf("--------\t----\n");
for(i=0;data[i]!=ENDMARKER;i++){
printf("%8d\t%4d\n",i,data[i]);
}
printf("\n");
return 1;
}

int find(int datum){
int i;
if(num_items()==0){
printf("\n\33[31mThe list is empty.\n");
return 0;
}
int found=0;
for(i=0;i<=num_items();i++){
if(data[i]==datum){
found=1;
break;
}
}
if(found==0){
printf("\n\33[31mThe requested item wasn't found in the list.\n");
return (0);
}
printf("\n\33[35mPosition\tItem\n");
printf("--------\t----\n");
for(i=0;i<=num_items();i++){
if(data[i]==datum)printf("%8d\t%4d\n",i,data[i]);
}
return 1;
}

int print(int pos){
if(num_items()==0){
printf("\n\33[31mThe list is empty.\n");
return 0;
}
if(pos<0 || pos>=num_items()){
printf("\n\33[31mThats an invalid location.\n");
return 0;
}
printf("\n\33[35mPosition\tItem\n");
printf("--------\t----\n");
printf("%8d\t%4d\n",pos,data[pos]);
return 1;
}

int empty(){
if(num_items()==0){
printf("\n\33[31mThe list is already empty.\n");
return 0;
}
data[0]=ENDMARKER;
printf("\nThe list has been successfully emptied.\n");
return 1;
}