176 Posted Topics

Member Avatar for isengwa

you could also look on the right to your initial post, and you will see 'similar threads.' I know there have been many posts recently on this subject.

Member Avatar for sam.udo
0
114
Member Avatar for Mr.Barca

another way I could think of doing this is building a two dimensional array of 6*2 length. on one column, you could save the indexes, and on the other, save the actual numbers you want to sort. then sort the array in the column where you have your actual values …

Member Avatar for bibiki
0
161
Member Avatar for pseudorandom21

I would recommend jGRASP. it is very easy to use, and it does not have the auto-complete feature of Eclipse. it does have features that make numbering the lines of code easy, as well as indentation. I have tried Eclipse, but left it for jGRASP. hope this helps.

Member Avatar for peter_budo
0
302
Member Avatar for liphoso

if you wanted to get back to six, you'd need to save somewhere the result of 6/2 first. that way, 6 = (6/2)*2 + 6%2, in general a = (a/b)*b + 1%b. (I'm assuming you work with Java, and declare your variables as int since 7/2 = 3 (not 3.5) …

Member Avatar for masijade
0
3K
Member Avatar for Dean_Grobler

if you just want to avoid using if-else for all 25 cases, you can use switch-case.

Member Avatar for JamesCherrill
0
290
Member Avatar for butz17

when you take the sentence in, you can then you StringTokenizer class to tokenize your sentence using as a token the empty space ' '. this will break your sentence into words. next, make a method that removes punctuation from each word, in case there is any, and save your …

Member Avatar for butz17
0
2K
Member Avatar for tracydo

let's say 24546 is an octal number! what it actually says is that you have: 2*8^4 + 4*8^3 + 5*8^2 + 4*8^1 + 6*8^0, which then equals = 8192 + 2048 + 320 + 32 + 6, which then equals 10598 decimal. notice how the power of eight is being …

Member Avatar for bibiki
0
478
Member Avatar for saisakthi

well, there are ways to see the bit/byte representation of an audio files. in linux, you type "od filename" (od standing for octal dump), and what you get is a hexadecimal representation of an audio file. there are different options you can pass to od to give you various results... …

Member Avatar for quuba
0
244
Member Avatar for paidinfull

say you want to set the price of the Furniture object held on 4th cell of your furniture array. you invoke the setPrice method of that object, that is: [CODE] furniture[3].setPrice(price)//that's it. note, though, that furniture[3] is 4th cell, since first is furniture[0] [/CODE] is this what you need help …

Member Avatar for bibiki
0
1K
Member Avatar for SCass2010

I don't really have a solution, but I am writing because I want to subscribe to the thread and see the solution if someone finds it. however, I do have an idea. If the length of all orders combined is less than the length of the bar, then the waste …

Member Avatar for bibiki
0
688
Member Avatar for n3red

yes there is. you can use StringTokenizer class, tokenize your string using an empty space as a token (' ' - this would be your token), and then in a while/for loop, you'd print out a new line every third iteration or so. perhaps there are other ways, but this …

Member Avatar for bibiki
0
121
Member Avatar for divyakrishnan

could be your escape character... try writing the location of your exec file as follows: d:\\example\\php_exe\\1436.exe I hope that works.

Member Avatar for bibiki
0
383
Member Avatar for masterjiraya

try reading each file's name, and classifying your files according to the extensions of the names. you can use strpos() method to find out if a string is a substring of another string, so use that to know if a file's name contains .jpeg, or anything you want. hope that …

Member Avatar for masterjiraya
0
207
Member Avatar for Gabit

I guess what you need is a controller class that has a main method inside it. then, in your main method, you instantiate an instance of your IPTPlogin class, and invoke the two methods just as you wrote above. I can't give you the code, but here is a guideline. …

Member Avatar for bibiki
0
204
Member Avatar for bibiki

hey there, I have the following piece of PHP code to retrieve a list of files on a directory, and then build links to each file: [CODE] <?php $dir=""; // Directory where files are stored if ($dir_list = opendir($dir)){ while(($filename = readdir($dir_list)) !== false){ ?> <li><a href="<?php echo $filename; ?>"><?php …

Member Avatar for bibiki
0
355
Member Avatar for bibiki

hey there, I have a simple page online, and tried to style it a little. here is my [URL="http://gagi.zxq.net/index.php"]page[/URL]. there are five links. I tried to build a simple, css-styled vertical menu. however, the button-like appearance of the links is not of equal length. would anyone tell me what part …

Member Avatar for ko ko
0
78
Member Avatar for bibiki

hey there, I havbe the following html and css files: [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> <link rel=StyleSheet href="style.css" type="text/css"> <title>My site</title> </head> <body> <div id="con"> <div id="navigation"> <ul> <li><a href="http://gagi.zxq.net/star.html">About me</a></li> <li><a href="http://gagi.zxq.net/ekes.html">Blog</a></li> <li><a href="http://gagi.zxq.net/mbretereshat.html">Links</a></li> <li><a href="http://gagi.zxq.net/bouncingball.html">News</a></li> </ul> </div> <hr> <div id="main"> …

Member Avatar for twiss
0
216
Member Avatar for veena1555

I am not sure if I understand you, but if I understood you correctly, then my advice is move on to MySQL, and be sure that it's very easy to connect to it with Java. you have a working class ready in a couple of recent threads here in Java …

Member Avatar for veena1555
0
91
Member Avatar for bibiki

hey there, I am trying to make my first connection to a mysql server with java. I took the following code from another thread: [CODE] import java.sql.Connection; import java.sql.DriverManager; public class Connect { public static Connection ConnectDB() { Connection conn = null; try { String userName = "root"; String password …

Member Avatar for bibiki
0
166
Member Avatar for loveman47

man, your code really is a mess. try fixing it a little first and then someone will surely help you. this problem is a simple problem that would easily be solved had you provided a complete class, one that includes the imports, a class name, putting pieces of code inside …

Member Avatar for loveman47
0
130
Member Avatar for ghsuan

hsuan, let us assume that the default color of keys on your painted keybord is red, and that when you press a key on your keyboard, the color is changed to blue. say now that you press key D and it turns blue on your screen. do you want it …

Member Avatar for tunlinaung
0
2K
Member Avatar for jasleen12345

alright, your application is all right, except for two minor defects. one, you only have your application reading time once, that's why it repaints the same time every time it repaints. you need to put your line 28 somewhere where it is run each time a repaint is needed. that …

Member Avatar for bibiki
0
169
Member Avatar for bibiki

hey there, I have a simple problem... but it seems overwhelming for me. I have a router, a desktop that runs XP, a laptop that runs Ubuntu 10.10. I want to make a home network with these devices I have. I have already managed to connect two computers, both running …

Member Avatar for bibiki
0
195
Member Avatar for aanders5

aanders, a couple of weeks ago I was hired to do some data mining, and the mechanism at the core of the task I was assigned was this what you are trying to accomplish. what i did is the following, and I believe this will help you, too. I accessed …

Member Avatar for aanders5
0
153
Member Avatar for bmaiorano

I hate to be the bearer of bad news, but nobody is going to do your homework. nobody did mine, either, so no hard feelings, ok :P seriously, you are expected to give the code you wrote and that does not work before anyone will give you any help. show …

Member Avatar for bibiki
0
154
Member Avatar for pooran.c

try k less than 7...it most likely won't work perfectly, but it will give you a hint. tell us what does your int[][] a parameter to the method hold. it's dimensions. besides, you could reach the effect with a one-dimensional array as well...

Member Avatar for pooran.c
0
165
Member Avatar for bibiki

hey there, I downloaded the jxbrowser package that comes in the following folder jxbrowser-2.8-cross-desktop-win_mac_linux . I put it on a directory JavaBrowser on my desktop. I tried writing a java class that makes use of the package but my compiler complains for absence of the package. anyways, after reading the …

Member Avatar for mKorbel
0
131
Member Avatar for yancouto

perhaps you can add some boolean variable and an if statement that check for truth value of the variable and call the repaint method only inside the if statement, which means that repaint will be called only while the boolean variable evaluates to true. hope that helps.

Member Avatar for hanvyj
0
1K
Member Avatar for mg120

I think you only need to pass to the constructor method of JTextArea two in variables, int rows and int cols, and they will appear. try that and see if it works, I haven't tried. and please, post your code

Member Avatar for mKorbel
0
73
Member Avatar for bibiki

hey there. I have the following code. I am trying to build an applet that displays all possible (92) ways of arranging eight queens on a chess board with no two of them on the same column, row, or diagonal. I built this as an application and it ran fine. …

Member Avatar for mKorbel
0
116
Member Avatar for bibiki

I am trying to build an application that finds all possible ways of arranging 8 queens on a chess board in such a way that no two of them are on either the same row, column, or diagonal. I am also trying to do this applying what I think is …

Member Avatar for bibiki
0
129
Member Avatar for clapclash

this is a Java forum man, I don't know how is this related to java, but anyways: say you have a binary number as follows 1001. that is, you have four digits. what 1001 actually says is that you have 1*2^3 + 0*2^2 + 0*2^1 + 1 *2^0 = 8 …

Member Avatar for bibiki
0
187
Member Avatar for bibiki

Hello people. I have the following class. [CODE] public class Model{ private Kutia[][] c; public Model(Kutia[][] x){ c = touch(x); } public void touch(Kutia[][] k){ for(int i = 0; i < 8; i++){ for(int j = 0; j < 8; j++){ if(k[i][j].occupied()){ touchHorizontal(k, i, j); touchVertical(k, i, j); } } …

Member Avatar for bibiki
0
200
Member Avatar for Puertorro

for comparing whether a number is between two and five (inclusive) digits in length, you can also do a test on whether it is grater or equal to ten and less than 100.000. another advantage of this is that someone could give your app an input such as 01, and …

Member Avatar for mKorbel
0
356
Member Avatar for sirlink99

an idea: say the shape is that of a star. you want more transparent stars to follow behind it. my idea is that you need to specify the number of stars first. say that are five stars, firs (1), second (2), 3, 4 5. when you initialize the app, each …

Member Avatar for sirlink99
0
86
Member Avatar for sateal8

your getScores() method does not contain a line to take input. inside your constructor method, there is a line that takes input through nextInt() method. you need similar code for your getScores() method so that your app can get scores. plus, you need some array variable to store your input …

Member Avatar for sateal8
0
196
Member Avatar for WolfShield

try woking with BigINteger class. there are ways to turn BigINteger to int and vice versa, I think. hope that helps.

Member Avatar for bibiki
0
103
Member Avatar for FlavaK

with a for loop inserted inside your main method I got the following result: Brown James 123456 24/3/85 Marketing Jenkins Susan 234567 11/12/80 Sales Turner Jane 345678 5/7/72 Sales Cavendish Paul 456789 22/9/76 Accounts Williams James 567890 19/1/81 Marketing Ford Karen 678901 15/8/79 Sales Other than the for loop inserted, …

Member Avatar for FlavaK
0
128
Member Avatar for javanoob101

hey javanoob101, you have one "monster" class. since you want more than one monster showing on your screen, you instantiate multiple instances of monster class. so, there is one single class, but multiple instances of it. now, when you do the instantiation, you store all instances on an array. and, …

Member Avatar for javanoob101
0
370
Member Avatar for saveme123

you're line 56 is messed up, that's likely why you get a complaint for line 11 as it refers to the method letterSearch(), which contains the line 56. check that line and correct as needed.

Member Avatar for saveme123
0
203
Member Avatar for Neversleepin

I tried to compile your code, but as I expected line 17 complains. besides, = is not a comparison operator, I assumed you meant ==. check that first!

Member Avatar for Neversleepin
0
9K
Member Avatar for k4it0xtr3me

if you know the standard used for naming methods and attributes, then it's actually easier. you tokenize the entire input file, and as James suggested, everything that's not a key word, is a class, method, or attribute name. now, you know class name follows keyword class. now, perhaps, method names …

Member Avatar for k4it0xtr3me
0
149
Member Avatar for plasticfood
Member Avatar for hao90

I think when you instantiate your instance of FileWriter you need to do so in appendable mode. to do that, you write as follows: new FileWriter(PassengerInfo.txt", true); let me know if that works.

Member Avatar for hao90
0
181
Member Avatar for pmark019

[QUOTE=;][/QUOTE] pmark, James said you need ANOTHER loop. not ONE loop. and he is right. you are reading one single line of your input file on line 23, and then iterating through that line with your loop, and that's it. if you want to read each line, then do as …

Member Avatar for JamesCherrill
0
220
Member Avatar for DarkLightning7

String s = "k" and char c = 'k' are different. you either need to tursn String s into a char or char c into a String before comparing. use proper methods for comparing though. hope that helps!

Member Avatar for JamesCherrill
0
260
Member Avatar for jsefraijeen

well, you are basically all done. except that your formula for calculating hypotenuse is wrong. and, inside your main method you do not need to declare multiple instances of Hypotenuse objects. one would suffice. p.s. what you are basically doing is finding the square root of 3*4 in the first …

Member Avatar for bibiki
0
3K
Member Avatar for prem2

from what I just read online, there is no scope resolution operator in java. google it, and you'll find your answer.

Member Avatar for Akill10
0
152
Member Avatar for plasticfood

are you trying to have the same method counting both consonants and vowels? this method you provided does not return the number of vowels. it does count the number of vowels, but it does not return it.

Member Avatar for plasticfood
0
102
Member Avatar for scottdurica

seems like there is some trim() method calling going on somewhere under the hood. there are ways to insert a new line inside a string like using "\n". there might be similar for inserting space. I know there is for inserting a tab. consider that instead of just adding an …

Member Avatar for scottdurica
0
207

The End.