Thursday, March 25, 2010

Making a bootable pendrive

This following method works for making bootable pen-drive, I have taken it from HERE

1. Insert your USB (4GB+ preferable) stick to the system and backup all the data from the USB as we are going to format the USB to make it as bootable.

2. Open elevated Command Prompt. To do this, type in CMD in Start menu search field and hit Ctrl + Shift + Enter. Alternatively, navigate to Start > All programs >Accessories > right click on Command Prompt and select run as administrator.

3. When the Command Prompt opens, enter the following command:

DISKPART and hit enter.

LIST DISK and hit enter.

Once you enter the LIST DISK command, it will show the disk number of your USB drive. In the below image my USB drive disk no is Disk 1.

4. In this step you need to enter all the below commands one by one and hit enter. As these commands are self explanatory, you can easily guess what these commands do.

SELECT DISK 1 (Replace DISK 1 with your disk number)

CLEAN

CREATE PARTITION PRIMARY

SELECT PARTITION 1

ACTIVE

FORMAT FS=NTFS

(Format process may take few seconds)
ASSIGN

EXIT

Don’t close the command prompt as we need to execute one more command at the next step. Just minimize it.

5. Insert your Windows DVD in the optical drive and note down the drive letter of the optical drive and USB media. Here I use “D” as my optical (DVD) drive letter and “H” as my USB drive letter.

6. Go back to command prompt and execute the following commands:

D:CD BOOT and hit enter. Where “D” is your DVD drive letter.

CD BOOT and hit enter and write BOOTSECT.EXE/NT60 H:

(Where “H” is your USB drive letter)

You will get message "Successfully updated NTFS file system bootcode". and "Bootcode was successfully updated on all targeted volumes."

7. Copy Windows DVD contents to USB.

You are done with your bootable USB. You can now use this bootable USB as bootable DVD on any computer that comes with USB boot feature (most of the current motherboards support this feature).

Note that this bootable USB guide will not work if you are trying to make a bootable USB on XP computer.

Learning Programing Fast Track

I found this really cool stuff on net surfing for the web tutorials for learning programing at fast pace. If you are a starter the basic things you are going to need is to learn C, that's the basic and mother of all the language as far as we all believe. The logic in C applies everywhere. So knowing C is a great help for learning programing.

The things that you are going to need is:
  1. A computer ( I am sure you have it, you don't you can beg, buy or steal, ok don't steal until you can get by other methods)
  2. A text editor (from notepad to vim, you can use anything, here are few that you can try, those are neat enough, EditPlus, Notepad++, Vi/Vim (available for Windows too, there are video tutorial to learn vim), or another that you are comfortable with.
  3. An IDE, there are many, you don't need an IDE if you can get a compiler working for you. IDE makes your work easy. (i.e TurboC, Codeblocks, Microsoft Visual C++ and Komodo)
  4. Resources for learning programing (Books, web tutorial, videos etc...)
Ok!!! Here's something for people on fast track learning, I was looking for good programing Videos and I have found some. This web page gives access to I think very cool interesting videos, http://academicearth.org/subjects/computer-science, for those who are into programing, I think this is one good place to learn. Lectures directly from finest universities. Personally, I am watching Mehran Sahami and Richard Buckland Videos and finding them very very interesting. Richard Buckland videos are not there on this link, but I guess you can find them, they are available just ask Google. And ya, how can I forget http://www.learnerstv.com/course.php?cat=Computers Learnerstv.com . They have some good collection of videos not only on computer science but on a vast variety of subjects.

Tuesday, February 16, 2010

Learning C/C++ Introduction Contd.. Class 2 Dated 4th Feburary 2010

Assembler (Wiki Assembler): is a small program that converts assembly language to machine language.

Translator (Wiki Translator ): converts any source code to designation or machine level language.

Compiler (Wiki Compiler):
  • It compiles and checks the whole program for any error
  • Execution is fast as compare to interpreter
  • Debugging is slower as compare to interpreter
Interpreter (Wiki Interpreter):
  • It checks the program line by line and converts to machine level language if no error found
  • Execution is slow
  • Debugging is faster
Variables (Wiki Variables): It is a name/space occupies the memory where a data is to be stored and retrieved i.e. int a=5;

Constant (Wiki Constant): It is a fixed value i.e. 0-9
  • Integer constant : 0-9
  • Float constant: with decimals
  • Character constant: a, b, c
  • String constant: "Name" with multiple characters
Rules of C programing (Wiki C_syntex):

  • It's written in lower care
  • Each statement ends with semicolon (;)
  • Each statement is written in the main under compound curly brackets i.e. main {program}
Rules of naming Variables (Wiki Variables):
  • It must start with alphabet i.e. a, b, c
  • Special symbols are not allowed
  • No blank space is allowed in between
  • Only underscore (_) is allowed
  • Numerical are not allowed
Header file (Wiki Header File):

#include < stdio.h >
(stdio= Standard input output)
#include < conio.h >
(Conio= Console input output) used for displaying

printf ("Enter the first number");
scanf ("%d", & a);
printf ("%d", a)

Data Types (Wiki Data_Types): types of data used in programming

Name Sign Size
char %c 1 Byte
int %d 2 Byte
float %f 4 Byte
long int %ld 4 Byte
double fload %lf 8 Byte

Simple C program - Addition

/*-----------------------------start of program-------------------------


#include
#include

void main()
{
int a, b, c;
printf ("Enter the first number = ");
scanf ("%d", & a);

printf ("Enter the second number = ");
scanf ("%d", & b);

c=a+b;

printf ("Addition = %d", c);
getch();
}

----------------------------------end of the program--------------------*/
Now in compiler

Compile = Alt+F9
Run = Ctrl+F9
Output = Alt + F5

Comments: It is a statement which can we written anywhere in the program to understand the logical function for future use. Syntax for comment is /* Comment */ anythign in between /* and */ wont be analyzed by compiler.

Learning C/C++ Introduction Class 1 Dated 3rd Feburary 2010

I was craving for learning C/C++ since long. I did try to learn it myself through various tutorials and few book, but unfortunately could not learn more and there were breaks in it. So I joined one institute. I am writing this for my reference and for those who intend to learn it. I am from non computing background and in research, I am learning it as I have interest in it. I would try to make it as easy as possible. I am sure there would be many flaws, try filling it from other resources too. I am also linking topics to the places on the web I think good for further references. You can also find copy pasted text from various places, just to make work easy for me and help me to organize it properly. Before you start you would need following:
  • A computer (anyone would do I guess, C/C++ doesn't need much)
  • A IDE there are various available, use Turbo C that is freely available, though it doesn't work well with Vista and Windows 7, if you are on any other OS it would just be fine, in Linux based system GCC would just be fine.
  • If you are on Vista or Windows 7 try this an older version of Turbo C, I could not find a place to upload a file, mail me if you need it at drsanjivk@gmail.com

Introduction (Wiki C (Programing Language)):

It is needed for starters, I know its all blah blah, but for some it is helpful and would be of interest in long run. Here we go.

Language: It is a medium of communication. (Various available, C, C++, VB, JAVA)

Generation of languages (Wiki Programming_language_generations):

1. Machine Level Language (Wiki First generation language):
All the instructions are given in 0 and 1 form (i.e. binary)
Advantages - no need of compilers and faster execution
Disadvantages - Difficult to understand
Learn Binary conversion i.e. digits to binary

2. Assembly Language (Wiki Assembly_Language):
All instructions are written in some mnemonic code i.e. + --> add
Advantage - language is machine dependent and faster to execute but less then machine language
Disadvantage- Not very easy to understand

3. Mid Level Language (Wiki C++):
C is supported by both machine language and high level language. C was developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system, California.
Advantage:
  • It has powerful patter
  • Its a procedural language
  • Supports both low and high level language
  • Command line argument based
  • Machine independent
4. High level language (Wiki High-level):
Advantage is that it is simple languages and is written in simple English. It is easy to understand, write and work with, i.e. C++, JAVA, VB, .net etc.

5.Fourth level language (Wiki Fourth-generation_programming_language):
Advantage is that multiple lines can be written in single command line i.e. select x from student where name = x i.e. mySQL, ORACLE, SQLplus. SQL was developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. This version, initially called SEQUEL, was designed to manipulate and retrieve data stored in IBM's original relational database product, System R.


Friday, January 8, 2010

Working with Ubuntu

Got busy for sometimes with the Windows again, anyways, writing some of the hints here for newbies for ease on Ubuntu Linux and for my ease, the links given here are personally tried and tested, those that are not will be mentioned, have a great time with linux.

How to configure Pidgin to work with Google Talk

I won't write much here as I found the link here http://www.manast.com/2007/05/11/how-to-configure-pidgin-to-work-with-google-talk and it works perfectly fine. Do let me know if the link is broken or not acessable, I will update.

How to Update Pidgin to the latest version

I tried from lots of sources but nothing worked, but it was easy. Go to System-->Administeration-->Synaptic Package Manager, search for pidgin, mark for 2.6.4 or whatever is the latest version that can be found from Pidgin home and apply, this did work for me. Hope it works for you too. Upgrading Pidgin solves many problem associated with yahoo earlier.