Posts which you will also like.

Tuesday, April 5, 2011

Tricks to Make Computer Booting and Shut Down faster !!!

There are various issues for slow computer shutdown(both Hardware and Software)
Following article deals with both of them. Please note the system boot speed before and after using the tricks to appreciate the difference.

1.LIMITING SERVICES THAT LOADS : Well,we have a conception that older the installed Operating System gets slower it would be. Quite so. But the reason being that we clog it by numerous programs and utilities. For this Soluto is a excellent utility which can be downloaded for free from here or you can use a excellent utility Bootvis which can be downloaded from here . If you have problem using Bootvis click here
2. BIOS : Go to BIOS and then go to boot menu. In most modern BIOS you would find option of Quick Boot ,ENABLE it. Also put Hard Disk in the highest priority in Boot Device Priority.
3. MSCONFIG : To restrict unwanted start up programs from loading in the RUN (Win+R) type MSCONFIG then enter. There in the startup tab would be listed utilities the load on boot up. Check here in case of confusion (whether its necessary or not)
4. LAN : If you are connected to LAN and DHCP server is enabled. Then every time you boot it is tested whether or not you have a valid IP address. To wipe off this time use a static IP address by assigning values in RUN(Win+R) -> NCPA.CPL -> local area network -> Properties -> Internet Protocols TCP/IP -> Properties . Fill your static IP ,subnet,default gateway,DNS server.
5. USB/COM Ports : If you don't use USB/COM ports to connect devices .Disable the devices at Control Panel -> System -> Hardware ->Device Manager.
6. Pagefile.sys :For security reason pagefile.sys is cleared before shutdown. It stores various sensitive data . If you have a Personal Computer and it doesn't deals with sensitive data then disable this default clearing of pagefile.sys by RUN(Win+R) -> Regedit then navigate to : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Change the value of ClearPageFileAtShutdown to 0. Close Registry and reebot.

7. Recent Documents : It stores the recent documents used. After a certain time this list gets long and has a adverse effect . Clear it time to time else go to RUN (Win+R) -> Regedit and navigate to :

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Create a DWORD value named ClearRecentDocsOnExit and give it a data value of 1

In case of any problem in applying any of the trick or for any suggestion,feel free to revert.
Read More ->>

Sunday, March 27, 2011

Playing with Google:I am feeling lucky

Here are some tweaks you can play with google I am feeling lucky option.
1.google holiday:shows the holiday logo and events in style of google
2.google bsd:show the linux version of google
3.google linux:show the linux version of google
4.google easter egg:lets you to play the easter egg game
5.google scholar:Useful for scholars
6.google suggest:this will give you suggestions in your search
7.early google:shows the earliest version of google when it was not too popular as today
8.elgoog:reverses the name of google
9.google blog search:lets your search to be blog specific
10.google heart page:shows the bouncing heart following your mouse at the screen
11.google zeitgeist:lets you to search patterns,trends,and surprises (provides very accurate search)
12.gogole moms:A page of google for mother's day
13.xx-hacker:Shows the search page suitable for hackers!
14.google mentalplex:Search smarter and faster with Google's MentalPlex
press I am feeling lucky after typing these keywords and see the result(do not type ':' with keywords).
Read More ->>

Friday, February 11, 2011

A JAVA Program:Barchart

Program to make Barchart

import javax.swing.JFrame;
import java.awt.Graphics;
import java.awt.Font;
import java.awt.Color;
import javax.swing.JPanel;
class bc extends JPanel
{  
  
    String [] x={"2004","2005","2006","2007","2008"};//plot varaibles Converted this to String for convenience
    int [] y={50,60,68,79,90,100};//Data to be plotted
    Color clr;
    int Hspace,Xpos;
    int Xrect,Yrect;
    public bc()
    {
        //default constructor
    }
    public bc(int [] data,String [] caption)
    {
        y=data;
        x=caption;
    }
    public void setValues(int [] data,String [] caption)
    {
        y=data;
        x=caption;
    }
    public void set(Color c)
    {
        clr=c;
    }
    public Color get()
    {
        return clr;
    }
    public Color reset()
    {
        clr=Color.RED;
        return clr;
    }
    public void paintComponent(Graphics g)
    {
        super.paintComponent(g);
        g.drawLine(40,10,40,410);
        g.drawLine(40,410,570,410);
        g.setFont(new Font("serif",Font.BOLD+Font.ITALIC,14));
        set(Color.RED);
        g.setColor(get());
        g.drawString("100%",15,20);
        g.drawString("75%",15,120);
        g.drawString("50%",15,220);
        g.drawString("25%",15,320);
        Hspace=(530/x.length);//570-40
        Xpos=45;
        for(int i=0;i
        {
            // g.drawString((new Integer(x[i])).toString(),Xpos,430);
            g.drawString(x[i],Xpos,430);
            Yrect=4*(100-y[i])+10;//Scaling factor
            g.drawRect(Xpos+10,Yrect,15,410-Yrect);
            g.setColor(Color.GREEN);
            g.fillRect(Xpos+15,Yrect+10,5,400-Yrect);
            Xpos+=Hspace;
            g.setColor(reset());
        }
      
      
      
    }
  
}
class barchartp
{
    public static void main(String args[])
    {  
        bc b=new bc();
        JFrame jr=new JFrame("Barchart program");
        jr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jr.add(b);
        jr.setSize(600,600);
        jr.setLocationRelativeTo(null);
        jr.setVisible(true);
      
  
    }
}

OUTPUT:



Read More ->>

Wednesday, January 26, 2011

A JAVA Program:Bouncing ball with color change on collision with walls

In this program a ball is created which bounces back and forth and also changes its color on collision with the walls of the container.

CODE:

import java.awt.Graphics;
import java.util.Random;
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JOptionPane;
class bounceball extends JPanel
{
    private static final int win_w=640;
    private static final int win_h=480;
    private float rad=100;// radius of the ball
    private float x=rad+50;
    private float y=rad+20;//center coordinates of the ball
    private float sx=4;
    private float sy=3;       //change in the coordinates(x and y)
    private static final int update_rate=30;//refresh of screen per second
    // Now constructor
    private Random r;
    private Color clr=Color.BLUE;
    public void set(Color c)
    {
        clr=c;
    }
    public Color get()
    {
        return clr;
    }
    public bounceball()
    {
        r=new Random();
        setPreferredSize(new Dimension(win_w,win_h));//size of the panel is set to
        //the size of the window
        Thread ballthread=new Thread(){
            public void run(){
                                while(true)
                                {
                                    x+=sx;
                                    y+=sy;
                                    //here we handle collision with the window walls
                                    //checking the horizontal collision
                                    if(x-rad<0)
                                    {  
                                        sx=-sx;//reverse the direction
                                        x=rad;
                                        set(new Color(r.nextInt(256),r.nextInt(256),r.nextInt(256)));
                                      
                                    }
                                    else if(x+rad>win_w)
                                    {
                                        sx=-sx;
                                        x=win_w-rad;
                                        set(new Color(r.nextInt(256),r.nextInt(256),r.nextInt(256)));
                                    }
                                    //checking the vertical collision
                                    if(y-rad<0)
                                    {
                                        sy=-sy;
                                        y=rad;
                                        set(new Color(r.nextInt(256),r.nextInt(256),r.nextInt(256)));
                                    }
                                    else if(y+rad>win_h)
                                    {  
                                        sy=-sy;
                                        y=win_h-rad;
                                        set(new Color(r.nextInt(256),r.nextInt(256),r.nextInt(256)));
                                    }
                                    repaint();
                                    try
                                    {
                                        Thread.sleep(1000/update_rate);
                                    }
                                    catch(InterruptedException e)
                                    {
                                        JOptionPane.showMessageDialog(null,"Please don't interrupt me while sleeping !","Disturbed",JOptionPane.ERROR_MESSAGE);
                                    }
                                }
                             }
                            };
        ballthread.start();//start the thread's execution      
    }
    public void paintComponent(Graphics g)
    {
        super.paintComponent(g);
        g.setColor(Color.BLACK);
        g.fillRect(0,0,win_w,win_h);
        g.setColor(get());
        g.fillOval((int)(x-rad),(int)(y-rad),(int)(2*rad),(int)(2*rad));
        g.setColor(Color.WHITE);
        String s=String.format("Position:[%3.0f,%3.0f]",x,y);
        g.drawString(s,20,40);
    }
    public static void main(String [] args)
    {
        JFrame jr=new JFrame("Bouncing ball.");
        bounceball ball=new bounceball();
        jr.add(ball);
        jr.setVisible(true);
        jr.setSize(650,500);
        jr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jr.pack();
    }
}

OUTPUT:


More on this at techcresendo.com

Read More ->>
DMCA.com Protected by Copyscape Online Plagiarism Tool