1,678 Posted Topics

Member Avatar for bkatl

I doubt the OP wants to reinstall. And to run malwarebytes he'll probably have to run his machine in safe mode.

Member Avatar for pcs365_4
0
141
Member Avatar for the_mia_team
Member Avatar for helpmepassclass

If you're just doing number, operation, number, operation, number, etc for example: 5 + 2 * 3 - 1 then you can just use a loop and some function calls. Integer.parseInt() will be useful here and so will the % operator (to decide if the position is odd -- because …

Member Avatar for BestJewSinceJC
0
98
Member Avatar for squigworm

Yeah, just specify the entire file path. You can also look into how to use getResource() but it can be difficult.

Member Avatar for BestJewSinceJC
0
134
Member Avatar for ku95

[CODE]((Math.abs(row-empty_row)!= 1) [B]&& (Math.abs(col-empty_col))[/B][/CODE] Why would that work? You are treating the returned value of Math.abs(), which is an integer, as if it can be tested for a truth value. In Java, only boolean types can be tested for truth. So you need to put something like this [CODE]((Math.abs(row-empty_row)!= 1) …

Member Avatar for BestJewSinceJC
0
3K
Member Avatar for Famous16

I got my Dell custom built and shipped and it took less than 2 weeks .. I guess area may have something to do with it.

Member Avatar for jwenting
-1
183
Member Avatar for blackx

I don't know if this helps or not but check out Ezzaral's example on post #3 [url]http://www.daniweb.com/forums/thread187103.html[/url]

Member Avatar for BestJewSinceJC
0
35
Member Avatar for gnarly

Your regex isn't complicated enough. The first part is correct (although I'd wrap it in parenthesis), but you need a mechanism to read in the text [I]after[/I] the word 'Title:' which can be accomplished by saying (.*) and you also need to make sure the (.*) doesn't read in the …

Member Avatar for BestJewSinceJC
0
100
Member Avatar for scripter_tmrage

[QUOTE=scripter_tmrage;1194676]so my question is... how can i make it possible to like write 2x^2+3x-1 and then make it possible for me(through the program) to separate all the parts.. sorry didnt write that the language im using is JAVA...thats kind of vital to know ;) [/QUOTE] You're posting in the Java …

Member Avatar for scripter_tmrage
0
189
Member Avatar for Ozz017

Go to the directory where HelloWorld.java is located, then use the simpler command. From the command prompt, You can use cd directoryName to change directories on linux and (I think) Windows as well.

Member Avatar for jwenting
0
57
Member Avatar for Nick Evan

Haha. I view most of the threads posted in this forum, and I have to admit, I am usually guilty of telling the member 'use code tags' but I rarely hit the report bad post button. I'll do it in the future if it'll make you that happy. :)

Member Avatar for Nick Evan
0
166
Member Avatar for aimee_jc

probably the same as a binary search tree just a guess though, since I've never heard of a decision tree before and it looks like a binary search tree to me

Member Avatar for jwenting
-2
65
Member Avatar for zandiago

[QUOTE=ardav;1190970]and then have the parent(s)/guardians serve the shortfall of an adult-sized sentence?[/QUOTE] If the parent hasn't committed a crime, then they cannot and should not be charged with a crime.

Member Avatar for BestJewSinceJC
0
86
Member Avatar for Encrypted

Calling a String 'charArray' is pretty confusing to say the least. Anyway, here is an example to clear things up. This puts the first rows of chars into the variable temp. [CODE] char[][] chars = new char[10][10]; //Put some stuff in the 2d array for (int i = 0; i …

Member Avatar for Encrypted
0
156
Member Avatar for ushineon

Thanks guys, you just caused me to open the C++ thread and read 10 pages of Narue and Jwenting schooling Richard West 5 years ago. What a productive night I was supposed to spend writing javascript .... *sigh*

Member Avatar for jwenting
0
215
Member Avatar for jad0521

The next() method doesn't get an entire line of text, it only gets the next token, which by default, matches whitespace. So if you're reading in English sentences, it will have the effect of reading in a word at a time, not an entire sentence. The nextLine() method can be …

Member Avatar for jad0521
0
3K
Member Avatar for Tops

Then why don't you do the obvious thing and put print statements in each of those functions, run the example, and see how many things get printed. This hardly looks like rocket science.

Member Avatar for BestJewSinceJC
0
193
Member Avatar for Sammich

[CODE] number something = 1234; String s = something + ""; char[] chars = s.toCharArray(); [/CODE] I'm not sure if that will work; you may want to try it though.

Member Avatar for BestJewSinceJC
0
451
Member Avatar for Raiko

Use string.split(","); then use a for loop to iterate over the array it returns. Use the Integer.parseInt(string) method to convert each String in the array into an int.

Member Avatar for BestJewSinceJC
0
98
Member Avatar for at004
Member Avatar for at004
0
141
Member Avatar for sean12

[QUOTE=sean12;1194604]I no I need to set up another scanner to read in the users choice but Im not sure how. Please help.[/QUOTE] [CODE] /* An example that's been given hundreds of times */ Scanner keyboard = new Scanner(System.in); System.out.println("Enter one word:"); String input = keyboard.next(); [/CODE] And you should use …

Member Avatar for BestJewSinceJC
0
211
Member Avatar for 88omar

How can you expect us to help you when you didn't ask anything? Read your lecture notes. Attempt some answers. Post them here and someone will probably help. I'll usually go out of my way to help someone if they're getting no responses, but if you don't ask a question, …

Member Avatar for jwenting
0
115
Member Avatar for Imberto

Variable scope. Read about it. The "args" array only exists within the main method, since that is where it was declared (in the method header). If you want to use it from within your ReadFile method, then you had better declare ReadFile as taking a String[] as a parameter. But …

Member Avatar for Imberto
0
110
Member Avatar for the_preface

It'd be helpful if you showed us the code segment that gave you the compiler error.

Member Avatar for BestJewSinceJC
0
131
Member Avatar for BestJewSinceJC

How can I create a semaphore using the above functions that will allow [I]any[/I] process access to the semaphore? I've been playing around with global variables for hours thinking I was doing it wrong, but now I believe I was misled. I think the problem is that the other processes …

0
79
Member Avatar for BobbieJean

Just so you know, the switch statement you have might need 'break' statements after each 'case' statement is over. Otherwise it will execute the code in the other case statements as well.

Member Avatar for kvass
0
2K
Member Avatar for NightOwls

What is the problem? You just start at the last node and work your way back. It is the same code as going forward except you use the 'back' Node instead of the 'next' Node and you stop when back == null and you start at the end instead of …

Member Avatar for NightOwls
0
511
Member Avatar for FancyShoes

You're trying to call the static method as if it is a constructor. [url]http://leepoint.net/notes-java/flow/methods/50static-methods.html[/url] Read the section on calling static methods.

Member Avatar for FancyShoes
0
155
Member Avatar for bigbags911

Use code tags and give better information. What do you mean you "hope that's it"? It is relatively easy to pinpoint a problem to a section of code. Did the code before that point execute properly? Did the code after it ever execute at all?

Member Avatar for jwenting
0
93
Member Avatar for WesFox13

[CODE]if (divmod >= 0.0 || divmod < 0.1)[/CODE] One of the above two conditions is always true. You wanted to use the && symbol. [CODE]if (divmod >= 0.0 && divmod < 0.1)[/CODE]

Member Avatar for jwenting
0
211
Member Avatar for ticktock

Becoming a good programmer isn't about being a genius. Hard work and perseverance are more important than intelligence. A high level of intelligence makes learning easier, but a lower level usually does not make learning impossible. I find it likely that you're being too rough on yourself and your confidence, …

Member Avatar for rajarajan2017
0
216
Member Avatar for BestJewSinceJC

[CODE] wait(mutex); ... body of function ... if (next_count > 0) signal(next); else signal(mutex); [/CODE] I think I understand how semaphores work so I understand the wait(mutex) and signal(mutex) operations but despite a couple hours of reading different materials I don't understand the next_count or the signal(next). From my book: …

0
59
Member Avatar for white feather

[CODE]Calendar myCal = Calendar.getInstance(); System.out.println(myCal.getActualMaximum(Calendar.DATE));[/CODE] That works, I just tested it on my machine. And according to the Javadoc, DATE is a synonym for DAY_OF_MONTH so day of month should work as well. Although it won't mess anything up, you shouldn't use your instance variable (calendar) to refer to a …

Member Avatar for BestJewSinceJC
0
152
Member Avatar for grady-lad

You need to use that random number to index the array. So buttons[randomNumber]

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for jnthn205

You can only refer to array indexes with integers, not ' ' as you have done. To see if an array is completely empty, you need to use a for loop. I believe array elements are automatically initialized to null, so if you want to check if some element of …

Member Avatar for jnthn205
0
4K
Member Avatar for Privoxy

Print out the value that "f.exists()" returns after you create the file. So do [CODE]System.out.println(f.exists());[/CODE] Also, why are you opening two methods of reading from the file? You created a Scanner and a BufferedReader on the same file. Are you sure that doesn't cause a problem? I wouldn't know because …

Member Avatar for BestJewSinceJC
0
100
Member Avatar for BuhRock

Many teachers consider it a violation of academic integrity to post your code online, so you should be careful about putting your name on things and about posting exact code if that is the case with your teacher. [CODE]/* *@author Brock Shelton *Date: April 12,2010 *Purpose: Write a lotter class …

Member Avatar for BestJewSinceJC
0
195
Member Avatar for ben1

> I have thought about it, I need to add 2 queues to the packing >>machines because it has to store the food, do I need a queue or is an ArrayList fine? Use Java's Queue class. An ArrayList is not the same thing as a queue; a queue is …

Member Avatar for ben1
0
127
Member Avatar for liujanet

[QUOTE=jwenting;1175587]in addition to that, I don't see the urgency.[/QUOTE] It refers to the timeframe in which we ignore his question.

Member Avatar for Truthful
0
299
Member Avatar for Imberto

Where do you consider one String to end and the next to begin? At a newline character? At a comma? For some other delimiting character or regular expression? For newlines (\n) you can use Scanner and use the nextLine() method, along with a while loop and the hasNextLine() method to …

Member Avatar for vchandra
0
126
Member Avatar for zandiago

No, teachers should not be paid based on their students' performance. Any accurate measure of performance is impossible to achieve, and teachers cannot force students to learn material, they only present the material. Teachers also cannot be held responsible for factors out of their control such as a wide variation …

Member Avatar for diafol
2
382
Member Avatar for JimD C++ Newb

[url]http://www.java2s.com/Tutorial/Java/0180__File/CreateBufferedReaderfromFileReader.htm[/url] Try that

Member Avatar for balmark
0
110
Member Avatar for LeonieJDB
Member Avatar for saggykulji
Member Avatar for OffbeatPatriot

[QUOTE=WaltP;1146322]What amazes me is each and every company can save you hundreds by switching from one of the others. That basically means you sign up and the insurance company gives you a $300 check! Then you can switch again and get $700 from the new one. It's a really useful …

Member Avatar for jwenting
1
212
Member Avatar for johndoe444

Seems ok to me. Who said it was overkill? (Although I think you should be using the Calendar class instead of Date..)

Member Avatar for jwenting
0
145
Member Avatar for anjal_pawar
Member Avatar for BestJewSinceJC

My sister has a windows vista machine and I have a windows 7. I want to connect remotely to her machine because she has a viruses, and I helped her track it to 'ave.exe' which is some trojan that edits registry values, starts itself when you start another process, won't …

Member Avatar for BestJewSinceJC
0
176
Member Avatar for selenask

Post code that small in the thread, in code tags. And your code contains no while loops.

Member Avatar for BestJewSinceJC
0
57
Member Avatar for beginner233

Use code tags. And you should be able to identify the problem area by debugging. Use print statements to determine the state of your variables at important points in your code.

Member Avatar for BestJewSinceJC
0
84

The End.