• Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in socket programming

    That question doesn't seem to make any sense. Pleae explain exactly what you want to do.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help designing some features of a system.

    It's impossible to give a definitive answer without complete info, but at first sight my gut feel is: Customer and CustomerEnquiry are clearly different things, witha clear "has-a" relationship. There's …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java

    There's no definitive "best" when the question is so wide open. Do you mean develop your own compression code, or use existing compression libraries as part of your own app? …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in deposit/withdraw account at index (issue with non static)

    You say you have a "Non-Static Method Cannot be referenced from static context.", but you forgot to tell us which line that was referring to. But then you say you …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Chat messenger in Java.

    If you search DaniWeb for Java Chat you will find lots of discussions abou this topic, including the kinds of problems people encounter and how they can be solved. But …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in for software engineers please HELP

    Although algorithms in general are used outside programming (eg in maths), in this context an algorithm is a way of solving a programming problem. If you don't have some knowledge …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in h writing a program in which after button click writing start on the anothe

    I wish you success, but I don't think there is anything else I can do to help you. Maybe someone else can be more useful to you? Good luck J
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in h writing a program in which after button click writing start on the anothe

    Yes yes yes. You said that many times already. Tell us something new!
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in how i can install MySQL on my PC with window 8

    Are you sure you mean RAM and not hard disk? Windows 8 occupies that much disk storage, but will run in a far smaller amount of RAM. Any machine that …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in h writing a program in which after button click writing start on the anothe

    That fragment of code opens a socket connection, sends some text, and disconnects. What did you expect?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in C# Image Transition code issue

    Could it be because you are closing the window while the transition animation is still in progress? Maybe try stopping the animations before closing the window?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Nested Loops

    Maybe your teacher didn't explain it because (s)he probably wanted you to go through the process of working it out for yourself. Give it your best shot before askiing for …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in C# windows

    It's an old Apple thing - modal means the computer is telling the user what they can or can't do, whereas, as far as is possible, the user should be …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in C# windows

    Good point. In Java all gui activity is serialised on a single thread, but I don't know aboutC#. If it is a problem then the simplest solution is probably to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in C# windows

    And there's more! Your data class can raise events whenever it's data changes and your windows can have handlers/listeners for those events so that when one window changes the data …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in C# windows

    That is ok for a simple case. If you have multiple windows that may be called in various sequences, and complex data to be shared, then the standard approach is …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Best and Free Software for Mac OS X

    XRG - gives you a little floating window with graphs of CPU, network disk etc usage in real time. I use it all the time because I have a lousy …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in My Chess Game (works)

    mayank read the previous two posts
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in MySQLSyntaxErrorException with MySQL and Netbeans Java

    Looking at your SQL statement (line 37) it lookslike you have a comma right at the end - just before the closing ) Maybe that's the syntax error?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to view the memory allocated in the program ?

    VisualVM will let you see what objects the VM has stored in its (heap) memory. https://visualvm.java.net/gettingstarted.html But it doesn't give you any access to actual memory locations. It just lists …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to darkagn in What is your preference when checking boolean values in If statements?

    In C# a bool method always returns a boolean value. In other languages such as PHP this is not necessarily the case, but since this question was in regards to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to view the memory allocated in the program ?

    Yes, that code creates a new String object with the value "hello" and it also creates a new variable called `hello` that contains a reference to the String. The String …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How Do I Display the Results of a Loop in JTextArea?

    JTextArea has an `append(String s)` method that you call to add text to the end of whatever is currently being displayed in the text area (which starts out empty). So …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to view the memory allocated in the program ?

    Here's Oracles brief operating instructions for jconsole https://docs.oracle.com/javase/tutorial/jmx/overview/javavm.html ... but what do you really want/need to know? I can't imagine that a memory address is going to be useful to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is your preference when checking boolean values in If statements?

    MyMethod was defined as returning a bool. how would it return anything other than true or false?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Start stop java program on PC with phone

    What level of phone - just a voice'n'texts basic model, or an internet-connected smartphone?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java switch

    Remember that a switch case will drop through into the following case unless it has a break; So you are on the right tracks there except that you don't need …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Main thread is exiting before the child thread java

    After a very quick look at that code I see 5 threads: The main thread obj1 obj1.t obj2 obj2.t of which main, obj1.t and ob2.t are started but you try …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Synchronization is not achieved. Need help java

    The `synchronised` keyword prevents two threads executing the synchronised code with the same lock. How you use it is up to you. If I understand your implied requirement properly you …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is your preference when checking boolean values in If statements?

    Agree Coding `<some boolean expression> == true` is a novice mistake. However the name of the method should include a verb and clearly express some assertion with obvious meanings for …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Synchronization is not achieved. Need help java

    Although your individual Bank methods are synchronised, this only means that calls to each of those methods *for the same Bank object* will not overlap. It looks like you want …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Can an Array access the instance variable of a constructor?

    Without seeing the exact code that generates that error messgae it's imposiible to say. But in general, if you have an array of objects you definitely can access their public …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in RegEx to match ipv6 address anyone?

    I think they were thinking about people who had to type an address in, rather than the people who had to write code to handle them. But then any language/API …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in RegEx to match ipv6 address anyone?

    Yes. In fact that's the case people usually mean when they talk about "leading zeros". Omitting leading zeros within a field is optional. Suzie's last example was more a case …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in RegEx to match ipv6 address anyone?

    Sorry Rubberman. Despite your impressive experience the first hex number is NOT separated from the rest by dual colons . Suzy's last post is correct. See RFC5952 https://tools.ietf.org/html/rfc5952#section-2.2 One (and …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in h writing a program in which after button click writing start on the anothe

    Again, Yes. You said that already. That's what I was answering.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in use geoFence by kitLocate in android(2)

    Please post the exact complete error message - copy/paste it, don't just give us your summarised version
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Read specific value in textfile in java using scanner

    Exactly what help do you need?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in JOptionPane Retrieving Results

    There's a complete example in the introductory description in the standard API documentation
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Box Blur Theory

    I suspect your loop conditoins - you go from -blurRad/2 to (+blurRad/2 -1). Changing the < to a <= should fix that.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Box Blur Theory

    You don't multiply the color values together! You multiply the color values by the corresponding values in the 3x3 matrix, then divide by the sum of the matrix. With a …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Display all words(duplicates included) from a text file

    There's nothing in that code that will behave differently between upper and lower case letters, other than Collections.sort will sort upper case letters before lower case (ASCII/Unicode order).
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Display all words(duplicates included) from a text file

    You split each line into words (line 19) but then you do nothing with that, you just add the complete line to your ArrayList. But anyway, the only way I …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Calculator for Binary Numbers

    The result could be as long as the longer input aray, or 1 digit longer than that (if you end up witha carry), so maybe the easiest way is to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Question About Comparable/compareTo

    "ascending" is defined by the compareTo method. a,b is ascending iff `a.compareTo(b) >0` If you reverse the test inside the compareTo so that `a.compareTo(b) <0` then you have just definied …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited How do JavaScript closures work?

    How do JavaScript closures work?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Oxiegen in New design live

    Hmm. I'm not entirely liking the new design. It's looks enlarged as if you're using the accessibility tools in Windows. We're not blind or elderly. You can tone down the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java Generics, Sort ArrayList in ascending order

    If you are supoosed to be swapping elements in the list then I would expect to see two calls to set(...)
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Mini project on Metro Rail

    We don't know where you're wrong either. What have you done so far?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in h writing a program in which after button click writing start on the anothe

    Yes. You said that already. That's what I was answering.

The End.