-
Replied To a Post in Thousand threads write to one text file simultaneously
Yes. It's ok to have many threads updating many different files. You just need a simple check to handle those cases where two threads happen to want to update the … -
Replied To a Post in write any 3 java programs
This makes no sense. Please try to explain properly. -
Replied To a Post in Thousand threads write to one text file simultaneously
The answers remain the same. Either post all the updates toa llinked blocking queue and have a thread that takes entries from the q one at a time and writes … -
Replied To a Post in jtabbedpane is always opaque
You will also have to setOpaque(false) on the individual panels etc in your tabbed pane. -
Replied To a Post in why is this program not running properly
Ok guys, let's keep this friendly please. -
Replied To a Post in Write a program to that prompt user calculate mean and standard deviation
I presume it's referring to your mean method - the second parameter isn't a data value, it's some kind of aray index or size, which therefore has to be an … -
Replied To a Post in can someone help to understand this plz
CharAt charAt see the difference? ps: full English please - many of our members have English as a second or third language -
Replied To a Post in Help Storing Variables
I'm not a C<anything> enthusiast, but this sounds like a generic architecture question, and here's the standard generic answer. Normally you would have a "game" class that contains (or knows … -
Replied To a Post in How do I generate two random numbers?
Lines 16 & 18 generate two numbers, but you have only one variable to strore them, so the second one overwrites the first. So You need at least two variables … -
Replied To a Post in Write a program to that prompt user calculate mean and standard deviation
No time now to read the code, but... the message is clear - you have used double where an int is required. The compiler won't allow an automatic conversion because … -
Replied To a Post in how to transfer data into database after tokenization
OK Next you need to store that tokenised data in some variables or data structure ready to write it to the database. The best choice for that depends on what … -
Replied To a Post in bool for synchronization
while (!signalFromThreadB) { pthread_yield(); } Isn't that a flat-out polling loop that's going to burn 100% of the spare CPU time? Safe, maybe, but not good practice? -
Replied To a Post in Questions !
When someone runs your program from the command prompt (or batch file etc) they can add parameters to their command. You get a copy of those parameters in the String … -
Replied To a Post in how to transfer data into database after tokenization
Honestly now... if we are to give appropriate help then we need to know did you write that yourself from scratch, or did you copy from some web site? What's … -
Replied To a Post in JComboBox as a JTable Column editor
OK - that makes it a lot clearer. You should have said that right at the start to save time. My guess is that when the cell is rendered it … -
Replied To a Post in JComboBox as a JTable Column editor
We can't help you if you don't help us by answering our questions. "is not working" tells us nothing. Do you mean nothing happens at all? Or something happens but … -
Replied To a Post in simple code that lets me dump .txt file into a MS-Access database
Any code you find here is probably as simple as it can be to do the job. It may not be easy, but real programming is never easy. Just make … -
Gave Reputation to noobz32 in can someone help to understand this plz
inputChar.Equals.('F') is incorrect, equals method is on intended for string only not for characters -
Gave Reputation to noobz32 in Unable to catch input from for loop
use substring() method; input.subString(beginIndex, endIndex); -
Replied To a Post in JComboBox as a JTable Column editor
Before reading all that code... How much of the requirement is working already? How much is implemented, but not working properly (detail incorrect behaviour vs correct). How much isn't implemented … -
Replied To a Post in Language of choice for a Movie Database program
[Oracle's own tutorials](http://docs.oracle.com/javase/tutorial/reallybigindex.html) are excellent and comprehensive, and kept fully uo-to-date. (But that does mean that they are not always easy). Be aware that many tutorials on web are out … -
Replied To a Post in Language of choice for a Movie Database program
Depending on your video file formats (mp4 is good), Java has built-in capabilities for playing video files directly in its own GUI - no need to install/interface with an external … -
Replied To a Post in c++
http://bit.ly/1utv209 -
Replied To a Post in looping
DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules … -
Replied To a Post in become a reseller or create my own software
Key questions: Do you have the skills to create a commercial software product? Do you have an idea as to what the product should be? If so, develop it and … -
Gave Reputation to rubberman in AP Computer Science(Java) Question
To see what is going on, before line 8, put in a printf statement that will output i and j. That may help you see the behavior of the algorithm. … -
Replied To a Post in can someone help to understand this plz
It looks like inputChar is supposed to be a `char` that the user inputs? That's not a class that you need to define. It's just like the `int` and `String` … -
Replied To a Post in Counting the number of digits in the input number and printing the number
Your loop (line 6) keeps dividing `number` by 2 until it's zero - then you print it. So of course it's zero. One fix is to use a copy of … -
Replied To a Post in Unable to catch input from for loop
Why? The user enters N and the original code then loops N times. Your "correction" makes it loop N+1 times, which is not what the user exepects. -
Replied To a Post in what input is used
What EXACTLY is the error message? ps: reading a double, then assigning it to a float is a compile-time error becuase float is a "narrower" type than double - information … -
Replied To a Post in ios
I experimented with Yosemite in a VM on a fairly ordinary Core 2 machine (but with 8 Gig RAM - essential) amd performance wasn't noticably different from a 4Gig Mac … -
Replied To a Post in Why radioButton print NULL?
Here's the secret. ActionCommand defaults to the button's text but only if you ask the button itself. An explicit ActionCommand is actually stored in the Model but if you query … -
Replied To a Post in How to restrict my input textfield to a number and dot (.) can only typed
Use a JFormattedTextField. See http://docs.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html -
Replied To a Post in Closing a JTable Instace.
Simply call `dispose()` on the containing window (closes it and releases all its resources) and make sure you have no other references to the JTable so the garbage collecter can … -
Replied To a Post in Closing a JTable Instace.
Do you just want to close a JTable inside a window that stays open, or do you want to close/free a whole winodw, including the JTable that's in it? -
Replied To a Post in HI I NEED HELP TO WRITE THIS
> a double and a float are values with a decimal point such as 1.2345 while you set the initial value of your fields to be a whole number, "0" … -
Gave Reputation to SalmiSoft in programmingl
The terms Local and Global are, to my mind, out of date. Classifying variables as one or the other really relates to the way software used to be written, with … -
Replied To a Post in HI I NEED HELP TO WRITE THIS
Your IDE should give you a proper error message, not just an icon. The error message will tell you (or us) what the real problem is. Remember it may be … -
Replied To a Post in HI I NEED HELP TO WRITE THIS
You don't. ints are for whole numbers floats/doubles are for fractions and very large nunbers chars and Strings are for letters (as you will learn next week!) -
Replied To a Post in HI I NEED HELP TO WRITE THIS
It will execute all those instructions in the order you coded them so, yes, it will calculate after getting the input and before printing You calculate percentages the same way … -
Replied To a Post in HI I NEED HELP TO WRITE THIS
OK, that explains why you have a requirement that needs a String when you haven't learned them yet! In that case it's probably best of you just leave out the … -
Replied To a Post in HI I NEED HELP TO WRITE THIS
I'm quite certain your class has covered how to use String variables. I'm not going to do your homework for you. -
Replied To a Post in HI I NEED HELP TO WRITE THIS
1. Use a String variable for the name. At line 18 you can use Scanner's nextLine() method to read the user's input as a String, and down around line 40 … -
Replied To a Post in HI I NEED HELP TO WRITE THIS
I presume the code listing you posted earlier is now out of date. What have you done to your code in the last 13 hours? -
Replied To a Post in Creating a method that resembles ArrayList .add()
I don't think that's a safe assumption. Even if there's just a Coin class, how about public Coin(String name, int value) { ... or maybe class Coin ... class Dollar … -
Replied To a Post in Playing sounds according to what is called on the arraylist
Yes they overlap - that's how you programmed it!... you loop though the number of entries in tempq and for each one you create and start a new player (the … -
Replied To a Post in Playing sounds according to what is called on the arraylist
If the code you posted looks OK, maybe there's a problem with the contents of tempq? -
Replied To a Post in Creating a method that resembles ArrayList .add()
Your pocket class will hold a number of coins, so it will have to have some kind of Collection as an instance variable to hold all the instances of Coin. … -
Replied To a Post in Goto statements: When are they useful?
Beautifully argued and presented, but as a Java progammer I have to disagree.. CASE 1: loop1: for .... ... loop2: while ... ... break loop1; ... } } How much … -
Replied To a Post in total java
Fortunately the whole of "standard" Java is defined in just two documents - the Java Language Specification and the API JavaDoc. Oracle also maintain a detailed tutorial site that covers …
The End.