• Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Help with homework assignment

    > The constructor should store the fraction in reduced form. So you should perform the reduction in the constructor. Google *Euclidean algorithm* for a good way to compute the GCD
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in I failed this code challenge design

    Thanks. I did have fun with the lambdas for the rules, but I'm equally excited by the IntStream to generalise the "iteration pattern". To show its versatility here's a simple …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in I failed this code challenge design

    Line 3 looks like a direct equivalent for `square = sequence.map(i -> i*i);` but is there a simple equivalent to `sequence = IntStream.range(1, 100)` or `IntStream generate(IntSupplier s)` that uses …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in I failed this code challenge design

    Hey, thats really neat. Lambas are relatively new in Java, so I'm still learning and discovering more and more uses for them. Great fun. How about a VB equivalent for …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Reverend Jim in I failed this code challenge design

    >It's what I asked for but it's not what I want. Typical user response upon receiving software.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in I failed this code challenge design

    @tinstaafl: Yes, I typed `continue` instead of `break` by mistake. And missed the number printing. Sorry - I just hacked that into the edit window to illustrate what I was …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in I failed this code challenge design

    If this is in the context of a Senior Java Developer then maybe they are looking for some more genrelaised approach such as define a functional interface Rule that takes …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited Assignment Help || AllassignmentHelp

    Allassignmenthelp have well educated experts for writing assignment.Our assignment experts works hard to live up to the expectations and provide total peace of mind.We provide best [assignment help]().If you want …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Assignment Help || AllassignmentHelp

    It's hard to express fully what scum these people are. They prey on worried students and take their money in exchange for which: The student fails to learn whatever the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Jacob_14 in Assignment Help || AllassignmentHelp

    Allassignmenthelp have well educated experts for writing assignment.Our assignment experts works hard to live up to the expectations and provide total peace of mind.We provide best [assignment help]().If you want …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in email not validating

    No no. Regexs will work with hundreds of chars. I was just saying that when they get long they are so hard to read and understand. So it's amazing that …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in email not validating

    Personally I'm always amazed that any regex more than about a dozen chars ever works. Anyway, maybe you could try this link, which has regex for various languages that they …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Understanding observers, a simple program

    Yes. I did look at it and it's possible to create an interface using default methods that gives you a working listener add-in. (Requires Java 8 or later, but nobody …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to John_191 in Memory leak in Observer pattern

    I don't believe that you ever really meant this: for(Observer user : users){ for(Product currentProduct : products){ currentProduct.addObserver(user); currentProduct.setAvailable(true); } } You meant this: for(Product currentProduct : products){ for(Observer user …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Understanding observers, a simple program

    Yes, that's it. It really is that simple. But it's power to simplify structure is vast - it changes what would be a two-way dependency to a one-way dependency. That …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Pascal loops

    At line 10 your variable "a" tells you how many asterisks to print. SO you can use a second loop there. Execute the new loop "a" times and print a …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Design in games

    I'm not sure why this is a programming question - it's really a combination of aesthetics and ergonomics. But in terms of programming the important thing is not to hard-code …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in leader clustering algorithm vs overlapping clustering algorithm

    Crossposted https://stats.stackexchange.com/questions/336732/leader-clustering-and-overlapping-clustering-algorithms and at https://stackoverflow.com/questions/49487927/leader-clustering-algorithm-vs-overlapping-clustering-algorithm
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Help me understand

    An object is a combination of some data and some methods that together represent some kind of entity eg an employee, an invoice, an IP address etc etc. Constructors are …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in C#

    OK, that's good. In my experience, licencing per-machine for small companies is full of problems. The client has a hardware crash and needs to run the app on another machine …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in C#

    Like I said, you can incorporate a check at install and/or startup time that accesses a licence server that you control. In your licence server you can check which copy …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Hello everybody

    Hi, welcome to Daniweb
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in C#

    You can incorporate a check at instal and/or startup that accesses a licence server that you control. Send a formal letter explaining the problem and offering a discounted price for …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Generate a 2D Maze Recursively

    I also did a random maze program (Java) a while back, and was very happy to discover Kruskal's algorithm. It generates random perfect (exactly one solution) mazes very efficiently, and …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Post http and get returned/echoed data

    More info needed: Exactly what response did you expect, and exactly what did you get? "some HTML code" is no help.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Newbie..!

    Hi Mike
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in encryption in c# and decryption in Java

    Manoj: don't hijack old topics. Start you own.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to manoj_12 in encryption in c# and decryption in Java

    can you please tell encryption in java and decryption in C#
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to manoj_12 in encryption in c# and decryption in Java

    can you please tell encryption in java and decryption in C#
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Bizarre connection request

    Dani. Thank you so much for starting my day with a really good laugh. You couldn't make it up.. JC :) :)
  • Member Avatar for JamesCherrill
    JamesCherrill

    Marked Solved Status for VPN Router

    Hi Guys. I knw what I want to achieve but not how to achieve it! Any hints would be gratefuly received, or, if it's not possible, tell me so I …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in VPN Router

    FYI (if anyone was wondering) I found a solution and this is it: I replace both routers with a single Asus running Merlin (enhanced Asus-wrt) that supports OpenVPN with routing …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in test for check more 5 items

    Kang: do you want me to delete this topic? JC
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in test for check more 5 items

    `(item_count > 5)` should work in most of the languages you have tagged this topic with, given a suitable variable declaration. What you have posted is roughly equivalent to: "change …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Restaurant Bill

    Don't expect us to guess - tell us exactly what problems you are having difficulty with.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Why won't inheritance work with my three classes in my program?

    Regardless of any language or syntax problems, your class hierarchy is wrong. Inheritance is a "is-a-kind-of" relationship, as in: Mammal is a kind of Animal Cat is a kind of …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Created VPN Router

    Hi Guys. I knw what I want to achieve but not how to achieve it! Any hints would be gratefuly received, or, if it's not possible, tell me so I …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Inverted Number Pyramid I dont know how to do it

    There's nothing "on the right" Show what you have done so far.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Programing Language C#

    OK, I have written it. Have you? You can buy my version for only 99USD and pretend its yours if you want. Then you will pass your course and everyone …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Edited python to java conversion

    class robot: def __init__(self, length = 20.0): self.x = 0.0 self.y = 0.0 self.orientation = 0.0 self.length = length self.steering_noise = 0.0 self.distance_noise = 0.0 self.steering_drift = 0.0 def set(self, …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in python to java conversion

    I speak Java but not Python, so I don't understand all the original code, but looking at the Java in its own right... it looks like you should remove line …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Simple mobile Iphone apps

    Hi Crystal I clicked your link feeling very suspicious, but when I read the page I was really impressed. Absolutely excellent essential advice. It's terrifying how many people start to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to crystal_1 in Simple mobile Iphone apps

    hey robert i think i have some tips for you if you wanna develop your own app then you should read this carfully to [build your first mobile app](https://branex.com/blog/build-your-first-mobile-app-in-12-simple-steps/).
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Tortoise and hare problem?

    I can't imagine why. Your code is clearer, simpler, shorter. Just one small error in line 129 where you forgot to print `"_"` Did your teacher give any justification for …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in python

    I too am confused by this. Shouldn't `word[6:11]` be `" good"`, not `"good"`?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Simple mobile Iphone apps

    err, no, no way, absolutely not "This tutorial only works for Xcode 4.6 or lower." The current version is 9.2 and it uses Objective C rather than Swift, which was …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in c++ assignment

    Mansoor. It's incomprehensible how you could read the previous posts then add yours on the end. Read them now. Then read the thread that the previous post links to.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in receipt

    @Elifas. Did you bother to spend even a few moments reading the "Read this before posting a question" at the top of the page? We do not waste time helping …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in logical mode + ER diagram

    You know the rules: we only help people who are showing some effort. Show what you have done so far, explain what's stopping you going further, and someone wil help.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to john_111 in SQL Error: ORA-00907: missing right parenthesis?

    IN('PROCESS','FULFILLED,'BACKORDER,'CANCELLED')) can you spot the error? Look at the ' and the ,

The End.