DirectoryComputersBlog Details for "Unique Technology Blog"

Unique Technology Blog

Unique Technology Blog
Blog About Amazing Computer Technology like home automation, Windows, Linux, Tips and tricks, photoshop etc
Articles: 1, 2, 3, 4, 5

Articles

JAVA PROGRAM TO GENERATE CONECNTRIC CIRCLES:
2007-07-11 11:39:00
In C++ to draw a circle on the screen, Radius of circle is used. But in Java to do the same task width of a circle and height of a circle is used. In C++ x and y coordinates are used for the center point of the circle but in JAVA x and y coordinates for top corner and left corner are used. So if we want to generate concentric circles in JAVA the following logic should be used.import java.awt.*;import java.applet.*;/**/public class appletdemo extends Applet{ public void paint(Graphics g) { try { for (int i=10;i { g.drawOval(200-i/2,200-i/2,i,i); Thread.sleep(100); // To generate a delay n miliseconds } } catch(Exception e) { } }};
More About: Program , Rate , Gram
JAVA PROGRAM FOR MULTIPLICATION OF TWO 3X3 MATRICES
2007-07-10 12:09:00
class matmul1{ public static void main(String[] args) { int p[][],q[][],r[][],s[][],temp=0,i,j,k,temp 1=0; p=new int[3][3]; q=new int[3][3]; r=new int[3][3]; s=new int[3][3]; for (i=0;i { for (j=0;j { p[i][j] = i; } } for (i=0;i { for (j=0;j { System.out.print(p[i][j]+" "); } System.out.println(); } System.out.println(); for (i=0;i { for (j=0;j { q[i][j] = j; } } for (i=0;i { for (j=0;j { System.out.print(q[i][j]+" "); } System.out.println(); } System.out.println(); for (k=0;k { for (i=0;i { for (j=0;j { temp=p[k][j]*q[j][i]; temp1=temp+temp1; ...
More About: Java , Program , Matrices , Gram
How To Compile and Run a JAVA Program :
2007-07-09 12:24:00
Step 1: Type your JAVA Program into any text editor like notepad or Edit (Dos Based Editor).Step 2: Save your program (filename.java). You should use four characters extension .java just for examplehello.java.Step 3: Compile your program with the follwing command at dos promptwhere your java compiler exist. in my case c:jdk folder. So first of all you have to change the directoryc:> cd jdk c:jdk> cd bin c:jdkin> JAVAC hello.java Java c is a java compiler.if compilation is successfully done, it will create a hello.class file.If your program contains 3 classes then it automatically creates 3 .class file, each file for each classes.It is the file which contains byte code.To run a java programc:jdkin>java hellowhere java is a interpreter and hello is a .class file. And you are done. you have sucessfully compiled and runyour java program.
More About: Gram
JAVA Program :
2007-07-09 12:21:00
// Java Program To Generate Follwing Pyramid//543212345//5432 2345//543 345//54 45//5 5class series{ public static void main(String[] args) { int a=1,z=0;for (int k=1;k{ for (int i=5;i>=a;i-- ) { System.out.print(i+""); } for (int j=1;j { System.out.print(" "); } for (int i=a;i { System.out.print(i+""); } System.out.println(); a=a+1; z=z+1;}}}
More About: Gram
C++ Program to scroll names by arrow keys
2007-06-13 12:25:00
This program will ask user to input 10 names that will be array of strings and then user has to press a down arrow key or up arrow key to scroll down or upwards. If users presses a down arrow key then name will be scroll one by one on the screen. If user presses up arrow key then previous name will be displayed on the screen. If last name is displayed and users presses again down arrow key then beep sound will be generated and then noscrolling will be there. Same way if users is already at first name and if he presses up arrow key then also beep sound will be generated and no scrolling will occured.#include<iostream.h>#include&l t;conio.h>#include<dos.h>#include<p rocess.h>main(){clrscr();char name[10][10];for (int i=0;i<=9;i++){cout <<"enter any name";cin >> name[i];}clrscr();int ch;i=0;while(1){ch = getch();if (ch==65){break;}if (i==-1){i=0;sound(700);delay(100);nosound ();}if (i==10){i=9;sound(700);delay(100);nosound ();}if (ch==80 && i>=0 && i<=10 &&...
More About: Programs , Program , Keys , Ames , Names
C++ program to controle an object through keyboard
2007-06-12 14:38:00
// C++ program to draw a circle on the screen and controlling it// through keyboard by direction keys.#include<iostream.h>#include<c onio.h>#include<dos.h>#include<grap hics.h>#include<stdlib.h>class snake{int x,y;int randx,randy;public :int success;snake(){int dv,mo;x=320;y=240;success=0;dv = DETECT;initgraph(&dv,&mo,"");circle(x ,y,4);randomize();nextPoint();}~snake(){g etch();closegraph();}moveUp(){cleardevice ();y -= 1;circle(x,y,4);if (x==randx & y==randy){randx=1+random(639);randy=1+ran dom(479);}nextPoint();}moveLeft(){clearde vice();x -= 1;circle(x,y,4);if (x==randx & y==randy){randx=1+rand()%639;randy=1+rand ()%479;}nextPoint();}moveRight(){cleardev ice();x += 1;circle(x,y,4);if (x==randx & y==randy){randx=1+random(639);randy=1+ran dom(479);}nextPoint();}moveDown(){clearde vice();y += 1;circle(x,y,4);if (x==randx & y==randy){randx=1+random(639);randy=1+ran dom(479);}nextPoint();}nextPoint(){circle (randx,randy,1);}};//snake dj(5);snake dj;main(){while(!0){int tch=...
More About: Programs , Keyboard , Program , Object , Gram
C++ Program to Generate Series 1 11 111 1111............
2007-06-07 11:57:00
#include<iostream.h>#include<conio. h>main(){clrscr();float k=1;float a=k;for (int i=1;i<=8;i++){cout << a <<endl;k = k*10;a=a+k;}getch();}
More About: Programs , Series , Program , Gene , Rate
Series 1 11 111 1111............
2007-06-07 11:54:00
#include<iostream.h>#include<conio. h>main(){clrscr();float k=1;for (int i=1;i<=8;i++){cout << k <<endl;k = k*10+1;}getch();}
More About: Programs , Series , Serie , Erie
C++ Program To Generate this Series: 1 10 100 1000 10000 100000
2007-06-07 11:52:00
#include<iostream.h>#include<conio. h>main(){clrscr();float k=1;for (int i=1;i<=8;i++){cout << k <<endl;k = k*10;}getch();}
More About: Programs , Series , Program , Gene , Rate
C++ program to draw and move a circle on the screen
2007-06-06 11:59:00
// C++ program to draw and move a circle on the screen (up and down). when hit any key from the keyboard circle will stop moving and program ends if you don't press any key from the keyboard circle will move on the screen infinite times. Here in this program kbhit() function isused. it checks for the keyboard keystroke.#include<iostream.h>#include <conio.h>#include<graphics.h>#inclu de<dos.h>main(){clrscr();int driver,mode;driver = DETECT;initgraph(&driver,&mode,"");wh ile (!kbhit()){for (int i=1;i<=400; i++){circle(300,i,10);delay(10);cleardevi ce();}for ( i=400;i>=1; i--){circle(300,i,10);delay(10);cleardevi ce();}}}
More About: Screen , Programs , Move , Program , Circle
C++ program
2007-06-05 12:03:00
//C++ program that will take input an integer for the month and displays users season (Indian season) name according to the input#include<iostream.h>#include<c onio.h>main(){clrscr();int m;cout <<"enter any months";cin >> m;if (m==12 || m==1 || m==2){cout << "It is a winter season" <<endl;}if (m==3 || m==4 || m==5 || m==6){cout << "It is a summer season";}if (m==7 || m==8 || m==9){cout <<"It is a rainy season";}if (m==10 || m==11){cout << "It is an autumn";}getch();}
More About: Programs , Program , Gram
Java Program to demonstrate multithreading
2007-06-04 12:38:00
class mt implements Runnable{Thread t;mt() { t = new Thread(this, "Demo thread"); t.start(); }public void run() { try { for(int i=1;i { System.out.println(i); t.sleep(1000); } } catch(InterruptedException e) { System.out.println("Thread is interrupted"); } }};class th{ public static void main(String[] args) { mt t = new mt(); try { for (int i=2;i { System.out.println(i); Thread.sleep(500); } } catch(InterruptedException e) { } }}
More About: Java , Program , Stra , Multithread
JAVA PROGRAM TO DEMONSTRATE MARKSHEET CALCULATIONS
2007-06-03 10:46:00
There are three functions in this program called add(), per() and Grade(). add() function will take marks as parameters and per() function will calculate percentage of given marks. while grade() will evaluate grade on the basis of percentage.class markproject{int h,e,p,c,m,totmark,percentage; int add(int h,int e,int p,int c,int m) { totmark = h+e+c+p+m; return totmark; } void per() { percentage = totmark/5; } void grade() { if (percentage>=45 && percentage { System.out.println("Grade is C"); } if (percentage>=60 && percentage { System.out.println("Grade is a"); } if (percentage>=80 && percentage { System.out.println("Grade is a+"); } }};class mark{ public static void main(String[] args) { markproject mp1; mp1 = new markproject(); int totmark=mp1.add(55,65,75,85,95); System.out.println(totmark); mp1.per(); System.out...
More About: Java , Program , Stra , Mark , Marks
HOW TO FORMAT NOKIA 6600
2007-06-02 14:45:00
If you have been facing some problem in your NOKIA 6600 handset like hanging, slowing so you need to format the handset. Warning: All data will be lost in your mobile handset if you format the phone so take backup of your important data before doing these. Disclaimer: If you damage something in your phone while doing this trick, there will be no responsibility of blogger or poster. Do all at your own risk Note: Make sure before formatting the NOKIA 6600, battery is full charged and there is no memory (MMC card) and SIM card in the handset. Step 1: Switch off your 6600 Handset. Step 2: Press and hold these keys simultaneously *, 3, Left Green Key, Power On/ Off switch. If you make some delay before pressing these keys, format function wont start. Progress indicator would display formatting. Wait when formatting is being done. Step 3: When formatting is done. Phone would automatically get started and you are done. Step 4: Restore your important data int...
More About: Nokia , Form , Format , Nokia 6600
JAVA program to demonstrate single dimensional array (Tutorial)
2007-06-02 12:36:00
// Array is a group of variables of same data types.class arrdemo{ public static void main(String[] args) { int marks[]; // array declaration that array would be of integer type marks =new int[5]; // new operator will allocates memory to the array int tot=0; for (int i=0;i { marks[i] = i; // storing values in array elements } for (int i=0;i { System.out.println(marks[i]); } for (int i=0;i { tot = marks[i] + tot; // adding array elements } System.out.println("Addition of array elements is="+tot); for (int i=4;i>=0 ;i-- ) { System.out.println(marks[i]); // printing value of array elements in reverse order } }}
More About: Tutorial , Java , Program , Demon , Single
Inheritance in JAVA
2007-06-01 13:13:00
//inheritance : class a is a superclass and class b is subclass. Class a is inherited class and class b that is inheriting.class a // superclass{ void add() { int a,b,c; a=10; b=20; c=a+b; System.out.println(c); }};// creating a subclassclass b extends a { void sub() { int a,b,c; a=10; b=20; c=a-b; System.out.println(c); }};class demo{ public static void main(String[] args) { b b1; // by object of subclass we can access member of superclass. b1 = new b(); b1.add(); b1.sub(); }}
More About: Java , Inheritance
//more than one class (JAVA Program)
2007-05-31 13:11:00
class demo1{ void add() { int a=10; int b=20; int c=a+b; System.out.println(c); }};class demo2 { void sub() { int a=10; int b=20; int c=a-b; System.out.println(c); }};class demo{ public static void main(String[] args) { demo1 d1; d1 = new demo1(); demo2 d2; d2 = new demo2(); d1.add(); d2.sub(); }}
More About: Java , Program , Class , Gram
JAVA program to demonstrate parameterized function
2007-05-28 14:57:00
class demo{void add(int a,int b) // method definition { int c=a+b; System.out.println(c); }};class adddemo{ public static void main(String[] args) { demo d1; d1 =new demo(); d1.add(10,20); // calling of a function }}
More About: Java , Program , Trat , Demon , Stra
JAVA program to demonstrate function
2007-05-28 14:53:00
class demo{void add() // method definition { int a,b,c; a=10; b=20; c=a+b; System.out.println(c); }};class adddemo{ public static void main(String[] args) { demo d1; d1 =new demo(); d1.add(); // calling of a function }}
More About: Java , Program , Trat , Demon , Stra
JAVA program to add two integers
2007-05-28 14:48:00
class adddemo{ public static void main(String[] args) { int a,b,c; a=10; b=20; c=a+b; System.out.println(c); }}
More About: Java , Program , Gram
C++ program to demonstrate Structure
2007-05-26 12:37:00
// This program will ask user to input Basic salary and program will// calculate da 10%, hra 10%, pf 15%, fpf 20% and netamount according to// this formula : net=bs +da+hra-pf-fpf#include<iostream.h>#inc lude<conio.h>struct student{int basicSalary;float da,hra,pf,fpf,net;void cal(){da = .1*basicSalary;hra = .1*basicSalary;pf = .15*basicSalary;fpf = .2*basicSalary;net= basicSalary*(1-.15);}};main(){clrscr();st udent s[5];for(int i=0;i<=4;i++){cout << "enter basic salary";cin >> s[i].basicSalary;s[i].cal();cout<<" net "<<s[i].net<<endl;}getch();}
More About: Programs , Program , Trat , Demon , Stra
C++ program to create dazzling effect by making concentric circles
2007-05-25 13:58:00
#include <iostream.h>#include <graphics.h>#include <conio.h>#include <dos.h>main(){int dv,mo;dv = DETECT;initgraph(&dv,&mo,"");// logic to make outer circlesfor(int j=40;j<=440;j+=80){for(int i=40;i<=600;i+=80){circle(i,j,40);}}// logic to make concentric circles in each circlesfor(j=40;j<=440;j+=80){for(int i=40;i<=600;i+=80){for(int k=0;k<=40;k++){circle(i,j,k);delay(10) ;setcolor(k%16);}}}// logic to remove alternate drawn concentric circles.setcolor(0);int p=0;for(j=440;j>=0;j-=80,p++)if (p%2 == 0){for(int i=600;i>=0;i-=160)for(int k=39;k>=0;k--){circle(i,j,k);delay(10);}} else{for(int i=40;i<600;i+=160)for(int k=39;k>=0;k--){circle(i,j,k);delay(10);}} getch();closegraph();}
More About: Programs , Effect , Program , Circle , Once
Fliptrack.com (Sponsored Post)
2007-04-14 14:47:00
Make Music Video With Fliptrack.Fliptrack is a web 2.0 service. They allows users to create a musical slideshows with their photos and hit music. Photos are synchronised to the beats of a song like a music video or movie soundtrack. They says Fliptrack and legal to share on the internet.They also says.All you need to do isYour Picture + Music from their library = Music Videosand then this music videos you can share legally on the internet.So why not put our life to music and why don't visit the fliptrack site. let's enjoy fliptrack.
More About: Post , Sponsored , Sponsor , Track , Rack
How to Improve Windows Vista Performance
2007-04-13 15:03:00
1. Adjusting Windows Vista for Best Performance :Many ways to improve performance of Windows Vista one of them is by adjusting visual effects if we reduce some visual effects then it will really improve performance of Windows Vista.Follow this setting and adjust your computer for best performance.Step 1: Click Start>Control Panel. Step 2: Then Click System and Maintenance > System > Advanced system settings. Windows Vista will ask for your permission to continue a dialogue box will be appeared on the screen. Click "Continue" button to go further. Step 3: "System Properties" dialogue box will appear on the screen. Click "Advanced" Tab and then click "Settings" button under performance option.Step 4: "Performance Option" Window will be appeared on the screen click "Adjust for the best performance" option button and then press "Ok" button to apply the setting and you are done.This above settings will disable all these features of Windows Vista.1. Animate controls and elements inside win...
More About: Improve
How to work with Zipped (Compressed) Folder in Windows Vista
2007-04-12 15:06:00
Compressed or zipped files take less space on any of the storage device so that you can store much data than uncompressed file. There is a great facility in Windows Vista to create a Zipped folder.How to create a zipped (compressed) folder in Windows Vista :There are two ways to create a zipped folder:First one:Step 1: Right click on the desktop area in Windows Vista.Step 2: Choose New > Compressed (Zipped) folder from the popup menu. It will create a new Zipped Folder (compressed) with a name "New Compressed (zipped) Folder". It looks like a folder but has a zip in it. You can also change its name by typing another one or you may change it later by renaming this folder. In this folder you can store files that will be compressed automatically and take less space on the storage device.Second one:How to send file in a zipped folder:Select file(s) then click right mouse button on it then choose "Send To" > Compressed (Zipped) Folder. It will automatically creates a zipped folder and sen...
More About: Work , Esse
Search Engine Optimization Campaigns (Sponsored Post)
2007-04-03 08:02:00
Search Engine Optimization Campaignse-visibility is specialist in following services :Search Engine Marketing (Paid Search)Organic Search Engine Optimization (SEO)Search Engine Media BuysLocal Internet MarketingOther Services they offers :Campaign OptimizationClient DashboardUsability TestingCompetitive Analysisevisibility has been working as a internet marketing agency with over 10 years. They are certified DART licensee. With technology for managing both large and small cot-per-click campaigns, They says they are the best in their industry for search engine marketing.
More About: Search Engine Optimization , Post , Search , Search Engine , Sponsored
Inkers (Sponsored Post)
2007-03-30 12:10:00
Inkers is a provider of a toner and inkjet printer cartridges (generic or compatible). They provide high quality ink cartridges for your Laser printer, Inkjet printer, multifunction printer and fax machines.They says "One best thing to purchase from them is they give guarantee against defect for one year and a 30 days no question ask money back guarantee they give.It is an cost effective alternative.Inkers delivers free ground shipping and usually they deliver same day of ordersIf you need any kind of guidance from them feel free to call them at their toll free number before 2PM Pacific at 800-848-7232 and they will be glad to guide you through. they always love to help your queries about ink cartrides.So when you think about ink cartridges think about Inkers.
More About: Post , Sponsored , Sponsor
Mac Poker Online (Sponsored Post)
2007-03-30 11:33:00
Mac Poker Online is an exclusive provider of information about poker and casino games for Mac users. It saves hours of Mac users.Mac Poker Online has association with PacificPoker and PartyPoker to offer their readers variouspoker bonuses.You can get a bonus of 25% up to $100 plus an extra $25 at Pacific Poker Plus get a free entry into this month's private $500 Pacific Poker freeroll!.Play Pary Poker for Mac and nd you'll get $50 extra added to your account when you deposit. Use bonus code 50MP.Overall they maintain information about various online poker and casino games for mac users they says that it is hard to find on net. You may find various kind of it there.
More About: Post , Sponsored , Sponsor
C++ program for Password input and check
2007-03-26 09:00:00
C++ program to input and check a given password. if user input a correct password then program to add two number will be executed and a user input a wrong password. A message "Wrong password" would appeared on the screen and terminates the proram.#include<iostream.h>#include< ;conio.h>main(){clrscr();for (int i=1;i<=5;i=i+1) // start, condition, increment{int a,b,c,x;cout << "enter your password here";cin >> x ;if (x==1){cout <<"enter first number";cin >> a;cout <<"enter second number";cin >> b;c=a+b;cout << c <<endl;}else{cout << "wrong password";break;}}getch();}
More About: Programs , Check , Password , Prog , Program
Inheritance In C++
2007-03-26 08:59:00
C++ program to demonstrate inheritance :#include<iostream.h>#include<conio .h>class demo1 // base class{public :void hello(){cout << "hello FROM DEMO1" <<endl;}};class demo2 : public demo1 // derived class{public :void hi(){cout << "hi FROM DEMO2" <<endl;}};main(){clrscr();demo2 d2;d2.hello();d2.hi();getch();}
More About: Programs , Inheritance
More articles from this author:
1, 2, 3, 4, 5
51142 blogs in the directory.
Statistics resets every week.


Contact | About
© Blog Toplist 2008 - Supported by Web Catalog - SEO by FeWorks
eXTReMe Tracker