Tuesday 31 March 2015

C Language Keywords

Standard ANSI C recognizes the following keywords:

Open 


Getting Started with Java on Linux

Click

Working of Java Servlet


A Java servlet is a Java programming language program that extends the capabilities of a server. Although servlets can respond to any types of requests, they most commonly implement applications hosted on Web servers.[1] Such Web servlets are the Java counterpart to other dynamic Web content technologies such as PHP and ASP.NET.

The following is a typical user scenario of these methods.
  1. Assume that a user requests to visit a URL.
    • The browser then generates an HTTP request for this URL.
    • This request is then sent to the appropriate server.
  2. The HTTP request is received by the web server and forwarded to the servlet container.
    • The container maps this request to a particular servlet.
    • The servlet is dynamically retrieved and loaded into the address space of the container.
  3. The container invokes the init() method of the servlet.
    • This method is invoked only when the servlet is first loaded into memory.
    • It is possible to pass initialization parameters to the servlet so that it may configure itself.
  4. The container invokes the service() method of the servlet.
    • This method is called to process the HTTP request.
    • The servlet may read data that has been provided in the HTTP request.
    • The servlet may also formulate an HTTP response for the client.
  5. The servlet remains in the container's address space and is available to process any other HTTP requests received from clients.
    • The service() method is called for each HTTP request.
  6. The container may, at some point, decide to unload the servlet from its memory.
    • The algorithms by which this decision is made are specific to each container.
  7. The container calls the servlet's destroy() method to relinquish any resources such as file handles that are allocated for the servlet; important data may be saved to a persistent store.
  8. The memory allocated for the servlet and its objects can then be garbage collected.

Finding IP address in Yahoo! Mail

1. Log into your Yahoo! mail with your username and password.
2. Click on Inbox or whichever folder you have stored your mail.

3. Open the mail.

4. If you do not see the headers above the mail message, your headers are not displayed. To display the headers,
* Click on Options on the top-right corner
* In the Mail Options page, click on General Preferences
* Scroll down to Messages where you have the Headers option
* Make sure that Show all headers on incoming messages is selected
* Click on the Save button
* Go back to the mails and open that mail

5. You should see similar headers like this:
Yahoo! headers : name
Look for Received: from followed by the IP address between square brackets [ ]. Here, it is 202.65.138.109.
That is be the IP address of the sender

6. Track the IP address of the sender
Imp note….
When you receive an email, you receive more than just the message. The email comes with headers that carry important information that can tell where the email was sent from and possibly who sent it. For that, you would need to find the IP address of the sender. The tutorial below can help you find the IP address of the sender. Note that this will not work if the sender uses anonymous proxy servers.

HOW TO FIND WHO IS INVISIBLE IN YAHOO MESSENGER

The following two tricks lets you see who is invisibe in yahoo messenger.without his or her knowing that you are aware of his or her presence.This is a working trick.
Trick 1
1..Open the conversation window of the person..whom you suspect to be online.
2..Click on IMvironments.find doodle from the imvironments.click on it
3..you will see a screen..”Waiting for your buddy to load doodle”….Wait sometime
4..After sometime if it is able to load….it means your so called buddy is online n he or she doesnot want to talk to you..
5..if it doesnot load….you can be sure that he or she is really offline
also u can find it out by using www.xeeber.com

How to Multiple Log In Google-Talk

1. Right-click on the desktop
2. Select New
3. Select Shortcut
4. Paste this into the text box:
    “c:\program files\google\google talk\googletalk.exe” /nomutex
    (dont miss even a comma)
5. Click Next
6. Name it whatever: Google Talk Multiple, etc.
7. Click OK until you are done.

How to add your own photo in My Computer properties

To do this:
1. Open Notepad.

2. Type the following:[General]Manufacturer=”Abdul Kader”Model=HP d530 
SFF(DC578AV)[Support Information]Line1= Your Ph NoLine2= Your Address…..

3. Save as “oeminfo.ini” in the System32 folder.(Without Quote)

4. Create a bmp file(Your Photo) and save it the System32 folder as “oemlogo.bmp”(Without Quote).

5. Now Check your My Computer Properties

 ===================================

In Windows XP How to Fix System32 hal.dll Errors


If you run the Windows operating system on your computer, there are a few problems you are simply going to have to deal with from time to time. Sometimes your applications will crash or refuse to open altogether. There may be instances when the system fails, interrupting your activities with a blue screen error or your PC crashing altogether.
When this is the case, you may be greeted with a message that resembles something like:
Windows could not start because the following file is missing or corrupt: system32 hal.dll
This means that either the hal dll file is either not present, damaged or one of your boot.ini files is corrupt. Both typically mean that you have a serious issue on your hands, one that needs to be addressed quickly.


What Causes a System32 hal.dll Error?

Such a dll error usually means that the specified file has been moved or deleted from its original location. Aside from the being a damaged or missing dll or boot.ini file, this problem could also be related to a hard disk drive that suffered physical damage. Fortunately, this error can be fixed and there are a few different angles from which you can approach it.

Recover the Missing or Damaged File

The easiest way to fix this problem is to utilize the installation disc that contains your copy of Windows. There is a good chance that the disc will be able to repair the missing or corrupt files and get rid of the system32 hal.dll error.
  • Insert the Windows disc, restart your PC, and press any key to boot from the CD.
  • Once the setup files have finished loading, press the "R" key to repair the error using the Recovery Console utility.
  • Once inside, type in the following command "expand d:\i386\hal.dl_ c:\windows\system32\hal.dll" and press enter.
  • When you are prompted to overwrite the file, press the "Y" key for Yes.
  • Exit and then press "Enter" at the command prompt.
  • Reboot your computer and see if the error returns. If it does, the issue is probably related to a damaged or corrupted partition.

Use Recovery Software

In the event that you no longer have the original installation disc, don't worry because there are other measures you can take to get rid of the system32 hal dll missing or corrupt error.
Due to the fact that this particular error has been such a menace for so many users, numerous third-party companies have developed software solutions specifically designed to fix the problem. These programs make it easy to repair and install the required files whether they are corrupt or missing all together. This type of software will ultimately help to get your PC running at an optimal level again.
While you can get rid of the error by completely reinstalling Windows, this often proves to be very cumbersome when considering all your data that will need to be backed up.


Conclusion

Dealing with the system32 hal dll missing or corrupt error can be very frustrating to say the least. Unlike many other errors related to Microsoft software, this one can prevent you from running Windows entirely. The good thing is that it can be resolved with relative ease when the right tools are at your disposal. If you can't find your original Windows disc, do a little research and find yourself a good program that will automatically clear up the troublesome system32 hal.dll error.

How to make your pc work faster

Here you can find useful tips you can do to make your pc work faster in a few minutes , just follow these tips and you will definitely have a much faster and more reliable PC!
Quote:
1. Wallpapers: They slow your whole system down, so if you’re willing to compromise, have a basic plain one instead!

2. Minimizing: If you want to use several programs at the same time then minimize those you are not using. This helps reduce the overload on RAM.

3. Boot Faster: The ‘starting Windows 9x , xp’ message on startup can delay your booting for a couple of seconds. To get rid of this message go to c:\ and find the file Msdos.sys. Remove the Read-Only option. Next, open it in Notepad or any other text editor. Finally, go to the text ‘Options’ within the file and make the following changes: Add BootDelay=0. To make your booting even faster, set add Logo=0 to remove the Windows logo at startup.

4. Restart only Windows: When restarting your PC, hold down Shift to only restart Windows rather than the whole system which will only take a fraction of the time.

5. Turn Off Animations: Go to Display Settings from the Control Panel and switch to the Effects Tab. Now turn off Show Windows Content While Dragging and Smooth Edges on Screen Fonts. This tip is also helpful with Windows XP because of the various fade/scroll effects.

6. Resolutions: If you are willing to do anything for faster performance from your PC, then try lowering your display resolution. The lower it is, the faster your PC

7. Start Up Programs: Windows can be slowed down when programs run on start up. To eliminate this, check your Start up folder. You can access it from the start menu: Start, Programs, Start Up. Another way to eliminate programs from loading even before Windows actually starts is by doing the following: Click on Start, then Run. Type msconfig. It will take quite a long time for this program to load, but when you finally see it on your screen, explore the different tabs. They all have to do with how quickly your PC boots, so select what you want, and uncheck what you don’t want!

8. Fonts: When Windows starts, it loads every single font in the Fonts folder. Therefore, the more fonts you have, the slower the booting process. To get rid of unwanted fonts, simply go to the Fonts folder under c:\windows and remove whatever you don’t want. Fonts that have a red letter ‘A’ as their icon are system fonts, so don’t delete them.

 ------------------------------------------------------------------

BLOCK WEBSITES WITHOUT ANY SOFTWARE:

Steps1] Browse C:\WINDOWS\system32\drivers\etc2] Find the file named “HOSTS” 3] Open it in notepad
4] Under “127.0.0.1 localhost” Add 127.0.0.2 www.orkut.com , and that site will no longer be accessable.

example :
127.0.0.1 localhost
127.0.0.2 http://www.orkut.com-
www.orkut.com is now unaccessable
For every site after that you want to add, just add “1” to the last number in the internal ip (127.0.0.2) and then the addy like before.
ie:
127.0.0.3 www.yahoo.com
127.0.0.4 www.msn.com
127.0.0.5 www.google.com
This also works with banner sites, just find the host name of the server with the banners and do the same.

---------------------------------------------------------------

How to create files and folders without any name.

Just follow the following steps:
1.Select any file or folder.
2.Right click on it,press rename or simply press F2.
3.Press and hold the alt key.While holding the Alt key,type numbers 0160 from the numpad.
Note:Type the numbers 0160 from the numpad,that is,the numbers present on the right side of the keyboard.Dont type the numbers which are present on top of the character keys.
4.Press Enter and the nameless file or folder will be created.
Reason:The file or folder that seems nameless is actually named with a single space.
But what if you want to create another nameless file or folder in the same directory ?
For this you will have to rename the file with 2 spaces.Just follow these steps below:
1.Select file,press F2.
2.Hold alt key and type 0160 from the numpad.
3.Release the alt key.Now without doing anything else,again hold alt key and press 0160.
4.Press enter and you will have second nameless file in the same directory.
5.Repeat step 3 to create as many nameless files or folders in the same directory

---------------------------------------------------------------

Increase your ram speed at no cost

Here I will give you a cool tip to increase your system RAM while working for no cost.
1)Start any application, say window window media player.Start playing any song.

2)Now start the Task Manager Processor tab and sort the list in descending order on Memory Usage.
You will notice that Wmp.exe will be somewhere at the top, using multiple MBs of memory.

3)Now go back to media player and simply minimize it.

4)Now go back to the Task Manager and see where Wmp.exe is listed. Most probably you will not find it at the top. You will typically have to scroll to the bottom of the list to find Word.
Now check out the amount of RAM it is using.The memory utilization has reduced by a huge amount.
So,simple-minimize each application that u are currently not working on by clicking on the Minimize button and you can increase the amount of available RAM by a great margin.
Depending upon the number and type of applications you use together, the difference can be as much as 50 percent of extra RAM and all this is free of cost.  In any multitasking system, minimizing an application means that it won’t be utilized by the user right now.

-=============================

Easy way to Change your processor name

SHOW YOUR PC PENTIUM 5 OR ABOVE
GO TO START>RUN>TYPE
REGEDIT>HKEY_LOCAL_MACHINE>HARDWARE>
DISCRIPTION>SYSTEM>CENTRALPROCESSOR>0
ON RIGHT HAND SIDE, RIGHT CLICK ON “PROCESSOR NAME STRING” AND CLICK ON MODIFY
AND WRITE WHAT EVER YOU WANT

====================================

Solution for fixing corrupted windows files in XP

This tutorial has been made so people that are having problems with corrupted files, can learn how to fix them easy.
Requirement:
1. Windows XP CD
Now, follow this steps:
1. Place the xp cd in your cd/dvd drive
2. Go to start
3. run
4. type “sfc /scannow” (without “)
Now sit back and relax, it should all load and fix all your corrupted file on win XP.

=======================================

How to Hide the drives(C:D:E:F) in My PC:

To disable the display of local or networked drives when you click My Computer.1. Go to start->run.2. Type regedit. Now go to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Now in the right pane create a new DWORD item and name it NoDrives(it is case sensitive). Now modify it’s value and set it to 3FFFFFF (Hexadecimal). Now restart your computer. So, now when you click on My Computer, no drives will be shown(all gone…). To enable display of drives in My Computer, simply delete this DWORD item that you created. Again restart your computer. You can now see all the drives again.

============================================

Windows 7 and XP tricksz:

Hidden Programs In Windows Xp
1) Private Character Editor
This program is for designing icons and Characters(Alphapet)
Click :start
Then :run
type :EUDCEDIT
……………………………………………………………………………………………………………………………….
2) iExpress
This Program is for converting your files to EXECUTABLE files
Click : start
Then : run
type : iexpress
……………………………………………………………………………………………………………………………….
3)Disk Cleanup
This program used for cleaning harddisk to offer space
Click : start
Then : run
type : cleanmgr
……………………………………………………………………………………………………………………………….
4)Dr Watson
This program Is for repairing problems in Windows
Click : start
Then : run
type : drwtsn32
……………………………………………………………………………………………………………………………….
5)Windows Media Player 5.1
Opens the old media player
Click : start
Then : run
type : mplay32
……………………………………………………………………………………………………………………………….
Program …………. CODE
__________ __________
Character Map = charmap
————————————
DirectX diagnosis = dxdiag
————————————
Object Packager = packager
————————————
System Monitor = perfmon
————————————
Program Manager = progman
————————————
Remote Access phone book = rasphone
————————————
Registry Editor = regedt32
————————————
File signature verification tool = sigverif
————————————
Volume Control = sndvol32
————————————
System Configuration Editor = sysedit

C PROGRAMMING LAB ( WEEK 2 & WEEK 3)

EQUATION:

/* Write a C program to calculate the following Sum:
    Sum=1-x2/2! +x4/4!-x6/6!+x8/8!-x10/10!
*/

#include <stdio.h>
#include <math.h>

void main()
{
int counter,f_coun;
float sum=0,x,power,fact;
clrscr();

printf("<-----------------------PROGRAM FOR SUM OF EQ. SERIES----------------------->");
printf("\n\n\tEQUATION SERIES : 1- X^2/2! + X^4/4! - X^6/6! + X^8/8! - X^10/10!");

printf("\n\n\n\tENTER VALUE OF X : ");
scanf("%f",&x);

for(counter=0, power=0; power<=10; counter++,power=power+2)
{
fact=1;
//CALC FACTORIAL OF POWER VALUE
for(f_coun=power; f_coun>=1; f_coun--)
        fact *= f_coun;
//EQ. FOR SUM SERIES
sum=sum+(pow(-1,counter)*(pow(x,power)/fact));
}

printf("SUM : %f",sum);
getch();

}

ROOTS OF QUADRATIC EQUATION:
/* Write a C program toe find the roots of a quadratic equation. */
#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
float a,b,c,root1,root2;
clrscr();
printf("\n Enter values of a,b,c for finding roots of a quadratic eq:\n");
scanf("%f%f%f",&a,&b,&c);

/*checking condition*/
if(b*b>4*a*c)
{
 root1=-b+sqrt(b*b-4*a*c)/2*a;
 root2=-b-sqrt(b*b-4*a*c)/2*a;
 printf("\n*****ROOTS ARE*****\n");
 printf("\n root1=%f\n root2=%f",root1,root2);
}
else
 printf("\n Imaginary Roots.");
 getch();
}

FACTORIAL FOR BOTH RECURSSIVE & NON-RECURSIVE:
/* Write C programs that use both recursive and non-recursive functions
   To find the factorial of a given integer.*/

#include<stdio.h>
#include<conio.h>

unsigned int recr_factorial(int n);
unsigned int iter_factorial(int n);

void main()
{
  int n,i;
  long fact;
  clrscr();
  printf("Enter the number: ");
  scanf("%d",&n);

  if(n==0)
    printf("Factorial of 0 is 1\n");
  else
  {
    printf("Factorial of %d Using Recursive Function is %d\n",n,recr_factorial(n));
    printf("Factorial of %d Using Non-Recursive Function is %d\n",n,iter_factorial(n));
   }
   getch();
}

/* Recursive Function*/
unsigned int recr_factorial(int n) {
    return n>=1 ? n * recr_factorial(n-1) : 1;
}

/* Non-Recursive Function*/
unsigned int iter_factorial(int n) {
    int accu = 1;
    int i;
    for(i = 1; i <= n; i++) {
    accu *= i;
    }
    return accu;
}

GCD:

/* Write C programs that use both recursive and non-recursive functions
   To find the GCD (greatest common divisor) of two given integers.*/

#include<stdio.h>
#include<conio.h>
#include<math.h>

unsigned int GcdRecursive(unsigned m, unsigned n);
unsigned int GcdNonRecursive(unsigned p,unsigned q);

int main(void)
{
  int a,b,iGcd;
  clrscr();

  printf("Enter the two numbers whose GCD is to be found: ");
  scanf("%d%d",&a,&b);

  printf("GCD of %d and %d Using Recursive Function is %d\n",a,b,GcdRecursive(a,b));
  printf("GCD of %d and %d Using Non-Recursive Function is %d\n",a,b,GcdNonRecursive(a,b));

  getch();
}

/* Recursive Function*/
unsigned int GcdRecursive(unsigned m, unsigned n)
{
 if(n>m)
        return GcdRecursive(n,m);
 if(n==0)
         return m;
 else
     return GcdRecursive(n,m%n);
}

/* Non-Recursive Function*/
unsigned int GcdNonRecursive(unsigned p,unsigned q)
{
 unsigned remainder;
 remainder = p-(p/q*q);

 if(remainder==0)
     return q;
 else
     GcdRecursive(q,remainder);
}

TOWERS OF HANOI:

/* Write C programs that use both recursive and non-recursive functions
   To solve Towers of Hanoi problem.*/

#include<conio.h>
#include<stdio.h>

/* Non-Recursive Function*/
void hanoiNonRecursion(int num,char sndl,char indl,char dndl)
{
  char stkn[100],stksndl[100],stkindl[100],stkdndl[100],stkadd[100],temp;
  int top,add;
  top=NULL;

  one:
    if(num==1)
    {
      printf("\nMove top disk from needle %c to needle %c ",sndl,dndl);
      goto four;
    }
  two:
    top=top+1;
    stkn[top]=num;
    stksndl[top]=sndl;
    stkindl[top]=indl;
    stkdndl[top]=dndl;
    stkadd[top]=3;
    num=num-1;
    sndl=sndl;
    temp=indl;
    indl=dndl;
    dndl=temp;

    goto one;

  three:
    printf("\nMove top disk from needle %c to needle %c ",sndl,dndl);
    top=top+1;
    stkn[top]=num;
    stksndl[top]=sndl;
    stkindl[top]=indl;
    stkdndl[top]=dndl;
    stkadd[top]=5;
    num=num-1;
    temp=sndl;
    sndl=indl;
    indl=temp;
    dndl=dndl;

    goto one;

  four:
    if(top==NULL)
      return;
    num=stkn[top];
    sndl=stksndl[top];
    indl=stkindl[top];
    dndl=stkdndl[top];
    add=stkadd[top];
    top=top-1;
    if(add==3)
      goto three;
    else if(add==5)
      goto four;
}

/* Recursive Function*/
void  hanoiRecursion( int num,char ndl1, char ndl2, char ndl3)
{
    if ( num == 1 ) {
    printf( "Move top disk from needle %c to needle %c.", ndl1, ndl2 );
    return;
     }

     hanoiRecursion( num - 1,ndl1, ndl3, ndl2 );
     printf( "Move top disk from needle %c to needle %c.", ndl1, ndl2 );
     hanoiRecursion( num - 1,ndl3, ndl2, ndl1 );
}

void main()
{
  int no;
  clrscr();
  printf("Enter the no. of disks to be transferred: ");
  scanf("%d",&no);

  if(no<1)
     printf("\nThere's nothing to move.");
  else
     printf("Non-Recursive");
     hanoiNonRecursion(no,'A','B','C');
     printf("\nRecursive");
     hanoiRecursion(no,'A','B','C');

  getch();
}

Sunday 29 March 2015

Poem by Principal

Look at the battlefield in the snow. Who is willing to hold his place alone in the center.

The stallions and the golden arrows catch the sun's glory. 


But who can tell me where i am going.

Another is courage.  In a world of chaos and conflict. 

No matter how tough the obstacles.
I swear to turn turmoil into peace.


To turn foes into friends.  There's no need for weapons.
We'll move forward hand in hand. May war's end forever.
 

Free Windows 10 - Microsoft Will Distribute

The software giant announced the end of nearly 3 decades of history, launching its first free version of Windows. Microsoft recently unveiled Windows 10, its first update in 2 years, while announcing that a new operating system would be a free upgrade (only for the first year though) for users of Windows 7, Windows 8.1 and Windows Phone. Microsoft is planning to release Windows 10 later in 2015, but no specific date is set yet.
screenshot_382.png

However, there were even more surprises from Microsoft: the company also unveiled its headset, Hololens, which will work with Windows 10 by allowing people to interact with 3D holograms, including holographic Skype calls. It should be noted that the development comes shortly after Google shut down the development phase of Google Glass, its online-enabled headset.

The industry observers point out that the decision to distribute Windows 10 for free marks a major shift for Microsoft, because the company has always made most of its profits from selling its OS – Bill Gates launched its first version, Windows 1, back in 1985. Although the company does not provide specific figures for Windows’ revenues anymore, it is known that they were eclipsed by its Office suite of services in 2013.

Microsoft still dominates the market of personal computers, but loses to Google’s Android and Apple’s iOS in mobile computing. The company was previously called to offer its operating system for free in order to outrun its rivals, which do not charge for their software.

Windows 10 will be able to run across personal computers, mobiles, tablets and even Microsoft’s Xbox gaming console. The new version of Windows will also bring back Windows Start menu, which was dropped in Windows 8. The latter, by the way, failed to convince many Microsoft users to upgrade – the statistics say that the OS, launched three years ago, is currently on 10% of PCs and 20% of tablets.

Microsoft previewed the new version of Windows to business customers back in 2014 and announced that it would skip Windows 9 in its attempt to mark a break with the past (or maybe just because Windows 9 could have problems due to being confused with Windows 95 and 98 by some software). The developer preview has been downloaded 1.7 million times and 800,000 pieces of feedback have been left.

Bad News Twitter May Sell Tweets to Data Miners


Today, computer systems aggregate trillions of tweets in search of commercial opportunities. However, the data is mined not only in commercial interests – it can be used by large companies to surprise their clients and for many other purposes.
 

Nevertheless, selling data is just a tiny part of Twitter’s income, as its largest share of profits is derived from advertising. Now Twitter decided to increase the figures and acquired Chris Moody’s analytics company Gnip for $130m a year ago.

It is known that Google and Facebook have built their businesses around sharing information, but the concerns are raised over their control of the private and public data, which is an area fraught with ethical and reputational risk. In the meantime, not all Twitter users realize that they are addressing the world, or the company that wants to listen in to their tweets. For most of the users, their audience is their followers. Although Twitter users can’t choose who follow them, they can shape their following by blocking or muting nuisance or abusive users. However, when you use a hashtag or address another user via Twitter handle, this may be regarded as the intention to publish a tweet it for a wider audience. As a result, Twitter takes these moves into account when distributing its data.

Another potential use for Twitter data is using geolocation and language algorithms. The service can match its users to some corporation’s database of customers in order to provide targeted advertising. In this case, the profiles can be matched, for instance, by using emails. Twitter also resells information for other social networks, including Tumblr and Foursquare. The company guarantees that this is done in a completely anonymized fashion, i.e. it doesn’t share private data.

Geolocation and programs monitoring aggressive or negative reactions could be used to monitor football crowds, for example. In this particular case, tweets could help assess the reaction of fans during and after a match. This may be helpful for police to decide where to deploy resources in combating public disturbance. In the meantime, information is about the crowd, which is not a means for police to target individual fans.

While Twitter doesn’t share the content of direct messages, the company considers all their other musings entirely public property. Remember about that.