• Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in need help with exception

    On another topic re that code... The use of a single shared actionPerformed for every control in the window leads to a horribly long if/ese/else if/... mess that's hard to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in need help with exception

    You didn't quote the full error message, not even the relevant line number, so you are making this hard for anyone who wants to help. But at a quick scan …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited need help with exception

    below is the code i have and i am getting an unhandled IOException in the inputstreams: import java.nio.file.*; import java.io.*; import static java.nio.file.AccessMode.*; import static java.nio.file.StandardOpenOption.*; import javax.imageio.ImageIO; import javax.swing.*; …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Algorithm to find the minimum number of combinations required

    > minimum 2 of 3 states correct I've been trying to follow this topic, but am still stuck on the first paragraph. What is the formal definition of "correct" in …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help with a graphics sorter

    1. AWT and Applet are decades out of date. You should be using Swing and JApplet. 2. I can't be bothered to load and read your word docx. What exactly …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Things I hate about TV shows

    I watch almost everything via a recording, so I can always skip the ads, but I still have to put with "coming after the break " followed by a preview …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in PHP how to create a new database named after login button is clicked

    Read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question and then start again.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Tarek_2 in I got assignment in Java. PLZ Help...

    Hi, If it must run in a web browser then you must learn (or search codes in) J2EE (Servlets/JSP) not simply Java (J2SE). Good Luck.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Transferring program output in Java [including user input] to txt file?

    Hi Tarek Wha you say is true, but OP wants to redirect his ordonary output - ie the stuff he prints to System.out By using System.setOut he can set System.out …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited Array

    I have input string in shape of:polygons=[(4,5),(6,8),(5,3),(11.4,6);(3,8),(2,9),(1,2)],each semicolon tells me 1polygon entered user can input up to 100 polygons and 100 points in each polygon i want to store the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited Array

    I have input string in shape of:polygons=[(4,5),(6,8),(5,3),(11.4,6);(3,8),(2,9),(1,2)],each semicolon tells me 1polygon entered user can input up to 100 polygons and 100 points in each polygon i want to store the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited Array

    I have input string in shape of:polygons=[(4,5),(6,8),(5,3),(11.4,6);(3,8),(2,9),(1,2)],each semicolon tells me 1polygon entered user can input up to 100 polygons and 100 points in each polygon i want to store the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Array

    A 100x100 array of integers is only 40kbytes, so that's perfectly feasible in most environments. Just loop through the input keeping one index for the current polygon and one for …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help creating a forestry management program

    > Do an object oriented analysis and design Is that right Heather? If so you just wasted a whole load of my time (and yours) by hiding that fundamental requirement.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help creating a forestry management program

    You were right to put add/display etc into separate methods. Now your forestName and forest variables need to be declared where they are visible to all those methods - ie …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to xrjf in vb.net connection with sql from another network

    I'm a newbie for sql server, but I did the installation yesterday. After several errors from a .net application another pc in the home group, a list box is populated. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help creating a forestry management program

    Well, yes. You just add 1 to the location when you print it, as in `System.out.println ( (i+1) + ": " etc` ps: creating classes is really important in Java. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in how to solve error unfortunately myapp has stopped ?????

    Just think about this from my viewpoint for a moment. You have something called myapp that has stopped. Do you know how many programs called myapp you can find on …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help creating a forestry management program

    It sounds like you have not covered creating classes in your course yet, so if that's the case it would be a bad idea for me to try to overlap …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help creating a forestry management program

    OK, that's a good start. Next step is decide how you will represent your forest of trees inside your program. There are 10 trees, and each tree has a height …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help creating a forestry management program

    Has your course covered the idera of defining a class? The obvious approach is to create a Tree class with the tree's height and growth rate and the related methods. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Transferring program output in Java [including user input] to txt file?

    You need to execute the `System.setOut(printStream);` *before* you execute any statements that generate output. In other words all output goes to the default System.out until you call setOut. After that …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    DaniWeb is a resource that everyone can contribute to and everybody can use, so please keep your question in the forum so others can help answer it and more people …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    That conversion String -> BI -> String works, so it looks like the problem is somewhere else in the code. (The square just means you have generated an invalid character …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    OK, looking back I think I've been diverted by the talk about numbers, and maybe sent you in a wrong direction. If you want to store the characters of a …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    Just create a new BigInteger using the constructor that takes a String, eg String s = "123"; BigInteger bi = new BigInteger(s); System.out.println(bi);
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    Yes. `println` (and the other similar methods) automatically call `toString()` for each of the objects they are printing. BigInteger's `toString()` method returns a printable version of it's value, just like …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in I got assignment in Java. PLZ Help...

    Start by reading this https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question then post again
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    You are mixing character representations of numbers ('1'. '2' etc) and numeric Unicode/ASCII values incorrectly. I'm assuming your input string consists of valid ASCII characters (Unicode values <128) - if …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    What code are you using to convert user input from Scanner to a byte array? WIthout seeing the code it's not possible to tell youwhat is wrong with the code!
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited windows 10 related problem and its solution

    A few weeks ago my laptop browsing and windows apps error. When i am on my facebook account i can watch youtube videos posted on feeds but other videos pos …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    > Do you have idea if it contains method that generates prime number and the primitive root That's what the API documentation is for. It lists every public method in …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in windows 10 related problem and its solution

    Do you have any problems with applications that are not dependent on the internet? If you have got as far as re-installing WIndows then maybe the problem is internet-related. You …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    OK, that's `modPow` not `modpow` then. Did you mean java.lang.Math or some other Math library? java.lang.Math has no support for BigInteger
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    There's no method called `modpow` in the standard Java API, so it looks like you have access to another library - maybe that has methods that will help? If not …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Elgamal encryption decryption using java

    How far have you got? How much Java do you know? What exactly are you stuck on?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java MVC and multiple objects

    If you have a view that's a view of a single model instance then it's common practice to pass the model instance as a parameter inthe view's constructor. In which …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in how can i add two values of 20 digits

    Hi jaina Please read the whole topic before replying, especally for threads that are 6 years old. The original question was about solving the problem using arrays in C++. While …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Magic Constants Case Sensitive or case In-sensitive ?

    I'm not a php user, but just reading what you posted... these constants have a name and value (which depends on the context). The name appears to be case-insensitive (ie …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Help on my bank account code

    OK. I don't have time to read 555 lines of code in detail right now, but I did a few spot checks and was very happy with what I saw. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in DATABASE

    Your source code has errors that prevented java from creating an executable class file. You need to read all the error messages from the compiler and fix those before trying …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Free VPN

    I'm with rproffitt. Opera Developer version includes a free built-in VPN. Couldn't be easier, couldn't be cheaper. Great for Pirate Bay if you live in a repressive country like the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java MVC and multiple objects

    I'm happy with that. (Can't speak for anyone else!).
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is your current favorite hobby (besides technology) ?

    Learning/playing guitar. I've been able to strum along with sing-song stuff since I was a teenager, but now I have more time I'm learning to play proper Jazz guitar. It's …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Reverend Jim in Visual Regular Expressions

    For anyone who is having trouble with regular expressions, I suggest you have a look at [this site](https://regexper.com/#%5Cd%7B1%2C3%7D) by Jeff Avallone. It takes a regular expression in the native (cryptic) …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in auto search textbox

    Does the ID have a known fixed length? If so you can have a text changed event listener that ignores text less than the necessary length, and starts the search …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java MVC and multiple objects

    I've been spending some time going back over the origins of MVC (Smalltalk through to Swift) and I think I've just understood something about how it was intended vs how …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java MVC and multiple objects

    To me that seems like a violation of everything that OO is about. A Circle should know how to tell you its radius, circumference, area etc. Which of those is …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Solving a tripple sudoku

    Start by slowly and carefully solving one or two by hand. Make a note of what you are doing at each step and why. When you have finished those notes …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java MVC and multiple objects

    I agree with jkon, with the very minor exception that I would be happy to see other methods (more than just get/set) in the Student class, if that's where they …

The End.