• Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Pizza program what can I do to make this program work - improvement

    Yes, I do know about Observer pattern. It's how Swing event listeners work. You create a Listener (Listener, Observer - they're the same thing) and when things happen or stuff …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Pizza program what can I do to make this program work - improvement

    Hi D2 - hadn't noticed that it was you! :) JC Sketching out a GUI is a good way to understand the requirements etc, but it's NOT the place to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited Why do I need +1-1?

    I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.) Made this in cpp.sh …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited Why do I need +1-1?

    I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.) Made this in cpp.sh …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Why do I need +1-1?

    OK everybody. This is getting too heated. I'm closing this thread. JC
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Write a C++ program to calculate the ZAKAT

    I ws going to post you a "Let me Google that for you" link, but in deference to your seniority I won't :) Anway... > The Zakat is a form …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Richard_36 in Why do I need +1-1?

    AssertNull Are you sound!? Sorry but I have to ask you that simple question. Go back and read my comments from the start. You joining the bandwagon will not do …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Richard_36 in Why do I need +1-1?

    AssertNull Are you sound!? Sorry but I have to ask you that simple question. Go back and read my comments from the start. You joining the bandwagon will not do …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited inserting multiple value

    hey guys ...... im trying to insert/ update the marks in marks table(database) of multiple students at one click of button in php ,how can do iit plzzz reply me …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Richard_36 in Why do I need +1-1?

    Reverend Jim >A simple test of the statements y = x - (1+1) and y = x - 1 + 1 shows that they give different results. #include <iostream> int …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Why do I need +1-1?

    Oh Richard, don't blame me or Rev Jim. You made a post with 3 points; the first was simply wrong, the second was critical while being unhelpful, and the third …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to implement ACH - NACHA Payment in C#

    Maybe you need to work on your Google technique. I Googled `ACH - NACHA payment C# ` for 38,600 relevant hits. On the very first page I found a [GitHub …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Subset sum problem... no idea how

    If you pop all the numbers used in a sucessful sum then you will not be abl to use any of those numbers in any other solution, eg with 2,3,2,1 …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in source code for android games

    Yes... and... ? Either contribute something, or ask a proper question.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Why do I need +1-1?

    1. `y = x - (1+1)` is NOT the same as `y = x - 1 + 1` You should learn about operator precedence and L-R execution before criticising 2. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Richard_36 in Why do I need +1-1?

    Your coding habit not to check presedence is bad buddy. On line 9, its better to group like `y = x - 1 + 1;` AS ` y = x …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Subset sum problem... no idea how

    Hi Scheppy Picking an unknow number of entries from an array of unknown length - you will have problems coding this with ordinary loops because you won't know how many …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Single Responsibility

    That makes total sense to me. You may also find that those 3 methods contain some functionality that is common to all 3 and which can therefore be factored out …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Single Responsibility

    Every rule has its exceptions, and this is one. It's very common that you end up with a bag full of assorted utility methods that are low-level things used in …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in retrive the image

    Did you notice the pinned Programming thread "Read this before posting a question"? It's there for a reason https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in string class implementation

    > replace the n-th word with the last one If you check that against the examples you will see that some words are reversed in order. It's not just a …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in JLabel status bar that displays counts of random shapes

    If you have numbers to display in a JLabel there are two steps: 1. create a String that contains the info you want to display by combining descriptive text with …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in string class implementation

    Nobody is goig to "share the code base" with you. That's what we call cheating. If you are prepared to do some work, and try to code it yourself, we …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in HELP- Converting C++ Procedural Program Into Object Oriented

    When thinking about how many classes, consider *cohesion and coupling* (Google it). The idea is that one class does one thing and contains just enough to do that thing, nothing …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in string class implementation

    It looks like the "manipulations" involve re-ordering the words, so the first stage would be to split the input into an array of words. ps: Have you identified the relationship …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in HELP- Converting C++ Procedural Program Into Object Oriented

    I agree with assertnull re naming. In fact I'm obsessive about it. Not only does it manage the readability of the code, but good naming makes mistakes jump out at …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in HELP- Converting C++ Procedural Program Into Object Oriented

    > would it not take away from the concept of encapsulation as it would result in having a class with members which are other classes objects? Absolutely not. It's rare …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in HELP- Converting C++ Procedural Program Into Object Oriented

    This is difficult, if only because the problem isn't rich enough to require much in the way of OO design or implementation. Anyway, here's one thought: We start with picking …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to find how many sentences start with a Capital letter

    I see you failed to test this code, because it doesn't get anywhere near the stated functionality. If you don't understand why try these test strings: "This data has one …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How DO you count Upper Case letters?

    Apart from being 11 years too late, your solution to counting capitals is way worse than the one in the previous post - not just longer more complex code, but …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Reading in a *.csv file and loading the data into an Array

    Strings are immutable - in other words once a String object has been created there is no way to change that String. Don't confuse String objects with String variables. A …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to AssertNull in multiple inheritance ambiguity problem

    > I despise C++ ... should have been strangled at birth Blasphemy. > You have one variable x that is defined in A and inherited in all its subclasses. > …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in multiple inheritance ambiguity problem

    OK. This is pushing the limits of my C++ knowledge (I despise C++ ... should have been strangled at birth) but: You need B and C each to have their …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Unendorsed pritaeas

  • Member Avatar for JamesCherrill
    JamesCherrill

    Endorsed pritaeas

  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Simple application with multiple windows - Java

    Hi avudai, welcome to Daniweb. Your thanks are welcome, but if you like a post you should show that by giving it an up-vote. Don't make a new post unless …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in multiple inheritance ambiguity problem

    Your question doesn't seem to make sense. You have one variable x that is defined in A and inherited in all its subclasses. That variable can only have one value …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in want to add a value in array

    OK, don't worry about your English - we will communicate somehow! Perhaps you are re-initiasing the array somewhere? Maybe the problem is in info_add? Without all the code it's hard …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Rewards Points

    I also cashed in once to see how it worked. But dividing the reward by the number of posts I made it's clear that the financial motivation was vanishingly close …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in want to add a value in array

    Look at line 18 If you try to create a value greater than 3 this will reject it
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in JAVA RSA encryption and padding with key file

    1. Google Java RSA 2. Click on any of the tutorial/example links that displays 3. Use some initiative and do a bit of work before posting another lazy request like …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Ackermann function

    > I promise no more question. Sorry, That's not what I meant. Please do ask questions. It's just that your post didn't ask a question, so nobody knew how to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Ackermann function

    So let's suppose I have done what you said and modified my Ackermann function successfully. Now, did you have question, or were you just issuing some kind of Xmas holiday …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to add tab in code - output to 2d barcode

    Yup, definitely not Java. Given the reference to iPhone I'll put my money on Swift. And to be fair, he did say "data matrix barcode" and "2D bar code".
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to add tab in code - output to 2d barcode

    I don't know. The syntax in the function call looks like Swift, but maybe it's someting else that I'm not familiar with. How comes you don't know?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to add tab in code - output to 2d barcode

    You have tagged this Java, but your posted code is not Java code.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in java shell execute

    You always need to split up the command and it parameters. Don't use special-case code like that, you should split up every command, ie new ProcessBuilder(cmd.split(" ")); In summary, the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in java shell execute

    Seriously - you commented out line 13? Are we wasting our time here?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Missing ). in Javascript ?

    Yes, you simply got your `for` and your `if` confused.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in how do i create executable file for java program?

    I have never tried any of these tools, so sorry, but I can't help you with them. Good luck. JC

The End.