Sunday, May 08, 2011

Folder Option Missing

Many of us sometimes find the folder options missing in windows explorer.
Here's the solution-->

Open Run and then type "gpedit.msc".
Now goto User Configuration > Administrative templates > Windows Component > Windows Explorer.
Click on Windows Explorer you will find the 3rd option on the right side of screen "Removes the Folder Option menu item from the Tools menu" Just check it, if it is not configured then change it to enable by double clicking on it and after applying again set it to not configured.

Whether a Number is Palindrome or Not?

import java.io.*;
class rev
{
public static void main(String a[ ])
{
int n, m, rev = 0;
int k = Integer.parseInt(a[0]);
n = k;
while( n > 0 )
{
m = n % 10;
rev = ( rev * 10 ) + m;
n = n / 10;
}
if( rev == k )
System.out.println("palindrome" );
else
System.out.println(" not palindrome" );
}
}

Saturday, May 07, 2011

Fibbonacci(LINUX)

#!/bin/sh
echo "Enter the Number :"
read a
echo "Enter Second Number :"
read b
i=1
echo "enter The Number of Terms :"
read n
echo "Fibonacci Series of The Entered Number is "
echo $a
echo $b
while [ $i -le $( expr $n - 2 ) ]
do
c=$( expr $a + $b )
i=$( expr $i + 1 )
echo $c
a=$b
b=$c
done
exit 0

Fibbonacci(C++)

#include<iostream.h>
#include<conio.h>
 class fibo
 {
    int n,a,b,c;
 public:
    fibo()
    {
        cout<<"Enter the numbers of terms ";
        cin>>n;
        a=1;
        b=1;
    }
    void proceed()
    {
        for(int i=1;i<=n;i++)
        {
            c=a+b;
            a=b;
            b=c;
        }
    }
    ~fibo()
    {
        cout<<"The Result for the series is: "<<c;
    }
 };
void main()
{
    clrscr();
    fibo f;
    f.proceed();
    getch();
}

Friday, May 06, 2011

How take a snapshot of Graphics Programs?

It's very easy.
Just Install DOS BOX in your system, and RUN it. To Download it CLICK HERE
Type mount a(Any alphabet from a-z) path of your BGI folder(By default its: C:\TC\BGI) and hit enter
Example : mount a C:\TC\BGI
and you will see that line
drive A is mounted as local directory C:\TC\BGI
Now, type A:(OR THE APLHABET YOU HAVE CHOOSEN) or hit enter
You will goes to A:(Directory), which refers your BGI folder. Then it will shows like this
A:\>
Now write your program name like as graphics.exe and hit enter,
Now you will be able to take snapshots of your program.
To make an exe of your C\C++ program run it at least one time and exe will be generated in BIN folder, Copy it and Paste it into BGI folder.
NOTE: Your exe file of your program must be in the BGI folder, other wise its give an error.
That's All....
Thank You..............

How add a JxImage panel to your projects

In the NetBeans you need a JAR file which consist the class or function of JXImage panel to ADD, Show an Image in Your Project. The name of this JAR file is swingx.jar. To add an Image Panel in your project follow these steps given below:
1. Goes to Tools>Palette >Swing/AWT Components.

2. After that you will see this Palette Manager.




3. Now click on Add from JAR, After clicking you will see that window.

Now, Browse your Jar File and click on Next Button.
4. After that you will see a list of many Swing and AWT Componenets, like this

5.From this list choose your JXImage Panel and click on Next Button. After clicking on next button you will see that window.

6.Then Choose Your category where you want to put it and click on Finish Button.

After that you will be able to use it.
Open your Palette window and Drag it from your category and add it to your project.
That's All.
Thank You..........