-
Replied To a Post in calculating zakat
Please note our member rules, including > Do provide evidence of having done some work yourself if posting questions from school or work assignments -
Gave Reputation to ChrisHunter in Preventing Double Html Encoding Strings
Sorry I realise I've posted this in the wrong section, it's been a while since I've visited DaniWeb. -
Gave Reputation to ChrisHunter in Preventing Double Html Encoding Strings
Sorry I realise I've posted this in the wrong section, it's been a while since I've visited DaniWeb. -
Edited Preventing Double Html Encoding Strings
I'm currently doing some encoding work to protect a site from XSS attacks. We've stuck a bunch of `<script>debugger;</script>` tags in the db. Dispite my best efforts, the strings I've … -
Replied To a Post in i need your help pls? how to convert to integer jdatechooser?netbeans
That question is so vague that nobody could answer it sensibly. Please explain EXACTLY what you are trying to do, what you have done so far, and exactly what is … -
Replied To a Post in Student Database Program in Java for class 10 Students
Dipayan_1 Is this homework? In which case we can help you to do it, but nobody here will do it for you. Show us what you have done so far. -
Replied To a Post in Student Database Program in Java for class 10 Students
> databases don't have 'Arrays'. They have columns and records. Not correct, or at least incomplete. Relational databases have columns and records, but other databases use different formats. I used … -
Edited Student Database Program in Java for class 10 Students
Can you please Create a student database in java using string and arrays wherein we can store details of students Like their ROLL no, Name, Father's Name,DOB, Section and then … -
Replied To a Post in Hangman: Do-while loop 'yes or no' user input response
I don't mean to be picky, but a loop that needs to be executed at least once should be a `do/while` not a `while`, which would obviate the need for … -
Replied To a Post in Android Java: What makes my game crash?
Maybe you could use a try/catch for any Exception at the highest level in your code and see if you can output the message from there? -
Replied To a Post in Android Java: What makes my game crash?
Sorry, I’m all OSX, IOS, Win10, don’t know android at all. -
Replied To a Post in calculation is off
Just bad luck with the first test data. Triangle with sides 1, 2, 3 is valid, but it’s an extreme case... just visualise that... the 1 and 2 sides have … -
Replied To a Post in Android Java: What makes my game crash?
Just a random thought... Are the array sizes ok? Visually it looks like pcX is bigger than pcY, so there’s a possible array index out of range??? -
Replied To a Post in runtime error on voting system
I’m not offended, no worries. No need to apologise. Now, have you fixed the empty catch, and what is the message and stack trace from your error? Jc -
Replied To a Post in Student Scores
Look at line 127 -
Replied To a Post in Android Java: What makes my game crash?
“Crashes” doesn’t tell us much. How about an error message and a stack dump? -
Gave Reputation to tinstaafl in Student Test Score
Sorry I probably been should have been more verbose. It's my understanding that when there are no constructors defined a default constructor is automatically defined by the compiler. But if … -
Gave Reputation to cereal in Cross-Posting
diafol! Why delete? Keep the account and allow us to keep a contact with you, I cannot imagine this forum without your posts :( -
Replied To a Post in Student Test Score
Just for the record, a default constructor is not normally required... typically when you create a constructor with args then you deliberately do not have a default constructor because you … -
Replied To a Post in Why isn't my do while loop in the main method not working correctly?
I agree that’s how it works in the real world. But this is a training exercise, and the menu is a console print with greying not an option. Personally I … -
Replied To a Post in Why isn't my do while loop in the main method not working correctly?
That makes sense... only options 1 and 6 can be used at first because you can’t fetch, delete etc until there is something to fetch, delete etc. Or maybe you … -
Replied To a Post in Cross-Posting
Re noobs... I have been worried about the aggressive responses to some recent cross posts. Nowhere in advance do we tell them not to do it. Maybe the majority of … -
Replied To a Post in Why isn't my do while loop in the main method not working correctly?
> what I am confused about is the specific types of arguments that should be added those methods Look at the definitions of those methods. The first line tells you … -
Replied To a Post in Why isn't my do while loop in the main method not working correctly?
When you try to call those methods you are missing parameters or using parameters of the wrong type. -
Replied To a Post in Cross-Posting
> Anyway where are the rules? Yes indeed. I think it's poor practice for us to penalise people for breaking rules they don't know about. A link buried in the … -
Replied To a Post in Increment / decrement (x++, ++x...) not producing expected output
That's more or less my understanding too - order of execution was left undefined/unspecified in places where the experts thought it would allow compiler writers more scope for optimisation. Nowdays … -
Replied To a Post in Increment / decrement (x++, ++x...) not producing expected output
> Smart people ... decided that it was best to make stuff like this undefined Yes, I did understand that. My opinion was formed including that knowledge. I'm more worried … -
Replied To a Post in Increment / decrement (x++, ++x...) not producing expected output
Here's a definitive reference on order of evaluation http://en.cppreference.com/w/cpp/language/eval_order Note about half way down ("Undefined behavior") it discusses ++x specifically. Apparently it used to be "undefined", now it's just "unspecified". … -
Replied To a Post in Increment / decrement (x++, ++x...) not producing expected output
No reply from a C++ buff yet? At the risk of making a fool of myself I'll try. I'm no C++ expert, but this looks to me like another example … -
Replied To a Post in runtime error on voting system
To be fair, 266 of those lines are GUI code generated by NetBeans, never intended to be read. It was pointless posting that part. In the actual code the choice … -
Replied To a Post in Please help: Nested timers, or timer inside loop, or what? How?
Thank you for your thank you. The world is such a scary place that there's no such thing as being too kind or too nice. And yes, after putting effort … -
Replied To a Post in How can implement a perfect hashed data structure and their operations?
You shoud look at the JavaDoc for Java's HashTable for essential information. The source code for that is also on the web, so you can see how it's implemented (if … -
Replied To a Post in Please help: Nested timers, or timer inside loop, or what? How?
Hey, no need to apologise - I know how frustrating it can be when you look at code and you just can't see what you're looking for. I too started … -
Gave Reputation to Sinisa_1 in Please help: Nested timers, or timer inside loop, or what? How?
I knew my old single-task way of thinking was messing with my Java, but I didn't realize how much. (Pascal and fortran for DOS, 30 years ago.) I must apologize … -
Replied To a Post in Please help: Nested timers, or timer inside loop, or what? How?
.. still don't believe me? Ok then, here it is structured as above and working... import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import static java.lang.Math.random; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JButton; … -
Replied To a Post in Please help: Nested timers, or timer inside loop, or what? How?
... and just to be absolutely certain I have edited your code into the structure described above and tested it. It executes exactly as you described. It took a few … -
Replied To a Post in Please help: Nested timers, or timer inside loop, or what? How?
No, that's not right. It does exactly what you asked. Maybe you're not reading the pseudo code correctly? On the first move (timer event) the label will not be at … -
Replied To a Post in Please help: Nested timers, or timer inside loop, or what? How?
That has absolutely no resemblance to the pseudo-code I posted earlier (did you read it?), and definitely will not work. Maybe I confused things by talking about "ticks". In animation … -
Replied To a Post in Please help: Nested timers, or timer inside loop, or what? How?
The timer is a repeating timer that fires every 200ms Every time it fires you move the label 36 pixels right So it moves at a speed of 180 pixels … -
Replied To a Post in Please help: Nested timers, or timer inside loop, or what? How?
You are right about EDT choking. That's why all your "looping" has to be done by a repeating Timer, not a for/while/do loop. I'll say it again. You cannot use … -
Replied To a Post in Hii i want to convert the following source code in c++.
What help do you need, exactly? -
Replied To a Post in Please help: Nested timers, or timer inside loop, or what? How?
The reason this is confusing is that the code lines 52-57 are coded inside the loop 40-61 but they are not executed in that loop. They are executed only after … -
Replied To a Post in I want to convert the following java program into c++
As far as I can see that program has nothing specially "Java" about. It's a long time since I've seen a whole Java program entirely in static methods; it's even … -
Replied To a Post in Open partial view in a new popup window
> It opens a new tab instead of a new window That's a setting that is in the user preferences for Safari, and probably for other browsers as well. -
Replied To a Post in Convert UTC to local time MVC
> having written a LOT of time conversion software over the years Why? There's proven tested supported code out there that does it. Do you have some kind of magic … -
Replied To a Post in runtime error on voting system
I can't believe that after all this time you would still post this without a complete exact copy of the error message and stack trace! ps: please don't address these … -
Replied To a Post in javaFX How to setText() to a button from another class wtihout FXML
In OO each object has a public interface and a private implementation. No object has access to any other object's private implementation. This massively simplifies the overall architecture by restricting … -
Replied To a Post in Could you please help me fix my game of life code?
Great! In that case please mark this "solved". If you have any new questions you can start another topic. JC -
Replied To a Post in if statement
What is your question? -
Replied To a Post in Could you please help me fix my game of life code?
You can't do it with one array. You will need two arrays, one for the current state and one for the new state - so you check the number of …
The End.