- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
N/A
- Interests
- My work!
- PC Specs
- Computer's config isn't important, Brain config is everything.
Re: Well guys.. im new for MS SQL.. i have a solution & it worked perfectly with me. while creating table just add an extra attribute using identity keyword: [CODE]attributename int identity(1,1)[/CODE] so everytime you insert any row, it will increase 1. so there will a unique number for every row … | |
Re: Hie guys! Heres something i have created to display all the prime numbers from zero up to the number entered by user. [CODE=csharp]using System; class pnumber { public static void Main() { int value; // Value Enter By User! int count,count2; // For inner & outer loop int prime; // … | |
Greetings, Hmm, Im not sure Is this the right place to ask this question, Well If im wrong please correct me. Im working in a company as Java programmer that also provide professional training for Java and two of my trainees have created "Stick Snake" and "Snake and ladders" game … | |
Re: hmmm, Im 18 years old and i just purchased SCJP voucher. Im the youngest in my town. LOL :P .. just kidding. Im also interested to know, please share your experiences with us. :D | |
Re: Hello, try this : [CODE] double pound = .0453592; double inches = .0254; Scanner scan = new Scanner(System.in); System.out.println("Please enter in your weight: "); double weight = scan.nextDouble(); System.out.println("Please enter in your height: "); double height = scan.nextDouble(); weight *= pound; height *= inches; double BMI = weight/(height*height); //rounds the … | |
Re: Hello, Heres another way to read the file: [CODE=java]import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; public class TestURLReading { static protected void readURL() { String u = "http://afterextratime.net/game/ita/1/Laz.txt"; URL url; InputStream is; InputStreamReader isr; BufferedReader r; String str; try { System.out.println("Reading URL: " + u); … | |
Re: Hello, You cant set decimal values in int type variables. You have to use double or float type. Regards, | |
This program consists of a function in one class. It demonstrates the "Left To Right" Principle used by most of the languages. | |
Re: [QUOTE=musi77;963739]i am running this midlet on sun wireless toolkit 2.5.5. i can create many objects of same midlet from that toolkit ....[/QUOTE] Hello, Firstly, read the rules before you post. You should post code inside the CODE tags. Im not sure what you mean by creating objects from toolkit, Problem … | |
Re: [QUOTE=Pmarcoen;962618]I seem to have a problem displaying an image from the phone's filesystem in J2ME. The following code works for images that are in the res folder but not if the path references to a file on the filesystem .. path = "file:///C:/Data/Images/200908/25082009004.jpg"; try { image = Image.createImage(path); } catch … | |
Re: [QUOTE=gunjannigam;962953]I want to create a custom NumberFormat which returns empty string for negative values and the double number iteslf for +ve and zero values. Please guide me....................[/QUOTE] Hello, This is for you. [CODE=java] public class CustomNumberType extends Number{ public double doubleValue() { return 0; } public float floatValue() { return … | |
Re: [CODE] public void commandAction(Command command, Displayable displayable) { if(command==exit) { destroyApp(true); notifyDestroyed(); } else if(command==start) { try { recordstore=RecordStore.openRecordStore("My RecordStore",true); // LINE 1 } catch(Exception error) { alert=new Alert("Error Creating",error.toString(),null,AlertType.WARNING); alert.setTimeout(Alert.FOREVER); display.setCurrent(alert); } try { String outPutData[]={"Mary","Bob","Adam"}; for(int x=0;x<3;x++) { byte[] byteOutPutData=outPutData[x].getBytes(); recordstore.addRecord(byteOutPutData,0,byteOutPutData.length); } } catch(Exception error) { alert=new Alert("Error … | |
Re: Hello, Study on File , ByteArrayInputStream, ByteArrayOutputStream, DataInputStream and DataOutputStream classes of java.io package. This is all you have to do. If you do a smart search, You will get code for this program as its really common. use listFiles() method of java.io.File class to get list of all files … | |
Re: Hello, Please post the code related to the problem so we can check and help you on it. Still... You are using JPanel.getGraphics() to get the Graphics object to draw on. You should be drawing only within the paintComponent() method using the graphics object supplied as the argument. Hope this … | |
Re: [QUOTE=moyphus;954394]Hi To All, I have an equation in string like this ((BASIC+HRA)*(30/100)) Using replace function Now i replaced this into values... String formula = ((10000+3000)*(30/100)) whole thing as a string now 'Formula'... How can i calculate this formula float amt = formula; Now i have an error...type casting....i can't calculate … | |
Re: A way to add rows to JTable : [CODE=java] // Header Object[] col = new Object[]{"Col1","Col2"}; // Data Object[][] data = {}; // Blank DefaultTableModel model = new DefaultTableModel(data,col); JTable table = new JTable(model); // OR table.setModel(model); // Adding Rows model.addRow(new Object[]{"Data1","Data2"}); [/CODE] Hope this will help you. | |
Re: Well, Im not sure what you meant by comparing images. If you are trying to compare images based on pixels colors then you can use getPixelColor method of Robot class. getPixelColor(int x, int y) Returns the color of a pixel at the given screen coordinates. but still it will be … | |
Hello, I just discovered that we can use unicode anywhere in the program. EG :[CODE=java] public class CheckUnicode { public static void m\u0061in(String\u005B\u005D args) { System.out.println("Hello World!"); } } [/CODE] \u0061 = 'a' .. \u005B = '[' .. \u005D = ']' This program will execute fine without any errors. But … | |
Re: Hello, I think, the problem is in the encryption and decryption formula. I tried to find it out by googling on it. But i didn't get anything related to the formula that you are using. So can you please post the encryption and decryption formula here ? and a test … | |
Re: Hello, Firstly, Please post your code inside the [ CODE ] [ / CODE] tag. There are many problems with your code and you really need to do hard work on it. Its not a big deal to solve your programming mistakes but the thing that matters is, you will … | |
Re: [QUOTE=JustmeVSI;872324]Hi. My problem i guess it is simple but i guess I'm simple as well :). The problem is the flowing: I have a JTextFead and a search method for IDs. The IDs are 7 char long. I want to be able when the user enters 7 chars the search … | |
Re: [QUOTE=mostafanageeb;859572]Please how to get a specified data from a file?? in java and what is the substitution of the seek function in java??? I need information Thanks[/QUOTE] Hello, Lesson : Basic I/O [url]http://java.sun.com/docs/books/tutorial/essential/io/index.html[/url] File I/O : To manipulates files. File I/O Streams : To read and write. Next time, Please … | |
Re: Hey, Please post your code related to problem, so we can check and help you :P Regards, | |
Re: [QUOTE=sandhya_r;858890]hi, i am useing the netbeans for the first time n i am trying to connect to a MS Access DB through the wizard but i am not able to. I entered for a DSNless connection: Name:JDBC-ODBC Bridge. Driver: sun.jdbc.odbc.JdbcOdbcDriver Database URL: jdbc:odbc: Driver={Microsoft Access Driver (.*mdb)};dbq=C:\Users\Vamsi\Documents\PIN.mdb; the issue its … | |
Re: Hey :D [code]import javax.swing.JFrame; import javax.swing.JOptionPane; public class Demo extends JFrame { public Demo(){ setSize(500, 500); setTitle("Hello World"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); // This is your loop. do{ methodToCall(); }while(JOptionPane.showConfirmDialog(this, "Do you wan to play again ?") == JOptionPane.YES_OPTION); } public void methodToCall(){ // your working method. JOptionPane.showInputDialog(this,"Input numbers:"); } public static … | |
| |
Re: Hello, Check out java.util package. [url]http://java.sun.com/j2se/1.4.2/docs/api/java/util/package-summary.html[/url] Regards, | |
Hello Everyone, Few days ago, There was active thread on creating own DBMS in Java. Its not an easy task so i decided to create Object-Relational Mapping Framework and i have done so. I have tested all methods and its working perfectly. Now i have decided to make it available … | |
Hello everyone, Im back, with a new problem. LOL! I need to change Java datatypes to SQL types. I have sql queries as String object. like this one : [CODE=sql]create table MyTable ( id bigint, name String , city String , state String ) OR create table MyTable ( id … | |
Re: Hello, Code is working perfectly! No NPException. Using Eclipse SDK Version: 3.4.0. Best of luck! |