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;
}
 

Wind powered cellphone charger

While travelling with Indian Railways, sometimes especially during long journeys I experience my phone's battery falling short of electron flow. Although in AC boggies they provide charging points near every berth but not everyone always travels in AC boggies. In sleeper boggies, in most trains they do provide 4 charging points in every boggy but they aren't enough and occupied most of the time by rogues who keep listening to music in full volume with their phones' speakers while charging, hence not letting others charge their phones.
One such situation at hand, and the inquisitive me started thinking of something cool that would work perfectly. I stood at the gate of my boggy feeling the wind at 100KM/hr(that was train's direction in east, so wind's velocity for me was 100KM/hr in the west) with my palm, and then came the EUREKA moment!!!! A smile spread throughout my face. Yeah, I had got the idea! Why not someone build a portable wind powered mobile charger?
How will it work? There can be a wheel with blades which will rotate fast when wind strikes it. The wheel and axle machanism should be connected to a dynamo, a small one used in bicycles for lighting. A 12V/3W will work perfectly. Now the passenger can take his/her hands out of the window or may even stand at the exit gate holding the whole thing in his/her hand. When wind falls on the wheel, it rotates, in turn rotating the dynamo axle which produces an alternating current. Using a rectifier it can be converted to DC. A capacitor with appropriate specifications can be used to smoothen the waveforms produced by the rectifier. This output can be fed to a IC7805 which stabilises the voltage at 5V DC which is required by most mobile phones for charging. Take this output, connect it to a multi-model pin connector which can be used to charge any brand's phone. Now pack this whole makeup in a cool looking case, label it and sell it!!!! Done! Earn loads of money.
It will be very helpful for the travellers who can very practically stay online during long journeys keeping their cellphones charged :)

Registry Migration

Registry files are database of configurations for applications using the windows kernel.The centralise approach to registry databases makes it difficult for users to hunt down individual registry entries of application and then back them up or transfer them to another machine.The particular location of the registry entries of applications can be found in the documentation of the application where available or on FAQs or troubleshooting websites that involves modifing the registry values.The find tool in Regedit , an application in window for editing registry enteries, also works for hunting down the registry entries of particular programs.However these registry entries tend to be scattered around different locations of the database, and there may be a number of registry entries making it a troublesome process to find and use individual registry entries. An easier but wasteful approach is to transfer all registry values, the entire registry database from a windows installation to the WINE platform on Linux machine.Transferring registry enteries across operating system is a simple trick to make some windows based applications work on Linux machine.This is not a sure fire trick to make every windows application work on a Linux system, but is usually a good idea when applications dont seem to run well on WINE.What we will be doing is to export the registry entries on a Linux machine.There are some pre-requisites for this operation though. You will need a Linux machine setup and have installed WINE on it.WINE is a babkronym for wine is not an Emulator and emulates a windows environment.WINE is different from a virtual machine and the application run in the same desktop environment as other Linux applications.WINE creates a virtual C drive and a rudimentary windows directory structure without partitioning the hard drive on which WINE is installed.All windows applications run from a virtual C:/program files location. Before starting the procedure you will have to install the windows version on a windows machine.Continue with any past installation procedures that the software might have, including activation and verification. After this you will have to install the same version of the software on the Linux machine using WINE, make sure that the software license you have allows you to do this. This procedure will work for the same machine in a dual boot setup or multiple machine. Now you are ready to transfer the registry enteries from one machine to another. Remember that the same procedure can essentially be used on two windows machine as well or for that matter between two linux on one of which this operation has been carried out.Go to start>Run>regedit. The repistry editor window will open up.Select the topmost segment in the registry directory and go to File>Export. Give any file name to the file , and save the file as .reg file.If you have lot of application installed this will take some time and the machine will appear to hang wait for regedit to export the file.Now transfer the .reg file to an external storage device and start up the linux machine or boot up the linux operating system if you are using a dual boot setup Drive on a fresh installation of WINE there should be only two folders, program files and windows, Navigate to windows and run regedit.exe If you have other application installed through WINE, backup the existing registry entries in case anything goes wrong. Now go to File>Impnrt and select the exported registry entries.

Transferring application data files between machine

This should be the last resort when installin applications intended for windows machines on a linux system.If the application is located in C:/program files/applications, transfer it to the identical location in the virtual C : drive created by WINE on your Linux machine.The application will be in correct location as long as it installed on the C : drive on the windows machine.Make sure that the paths are also the same.Windows application use .dll files which are not always saved in the same location as the application.The most common directory for these .dll files are C:/windows/system 32 and C:/windows/system. Copy the .dll files from these directories to the same location on the virtual C drive on WINE.If there is no lack of hard disk space on the Linux machine, you can transfer the entire C: drive from windows machine to the virtual C: drive on the Linux Machine.

Dual Booting Windows

If you've decided to make the move to windows 7 but aren't convinced you'll be sticking with it, or are concerned about other issues, a dual boot option is probably wisest.To dual-boot a pc you'll need to partition your hard drive using a program such as partition Magic (http://partitionmagic.com) .You need to create NTFS partition and will require at least 20 GB of available hard disk space if you wish to run two operating systems alongside each other.Remember that you'll also need to retain a comparable amount of space for your existing XP or Vista system.Once you've got a suitably partioned drive, boot back into windows and you should find a new drive in My Computer.Double click you can open it.To install windows 7,insert the disc as soon as the PC starts up or insert while your existing version of windows is running.When the screen appears asking where you want to install windows, ensure you choose the partition matching the drive letter you've just created.Because that partition is empty , windows 7 will perform a clean installation.