DimitriV's Profile User Rating: ****-

Reputation: 587 Enlightened
Active Posts:
2,756 (1.58 per day)
24-July 11
Profile Views:
Last Active:
User is offline Jan 07 2016 10:31 AM

Previous Fields

OS Preference:
Favorite Browser:
Who Cares
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Dream Kudos:

Latest Visitors

Icon   DimitriV forgot about this place, again.

Posts I've Made

  1. In Topic: Simple multiple instances not working

    Posted 23 May 2015

    View Postneal7, on 24 May 2015 - 06:00 AM, said:

    I did this:
    public class NewThread { 
    	public NewThread(String item) {  
    		NewRunner r = new NewRunner(item);
    		Thread t = new Thread(r);

    Maybe it's simple, but: in EchoClient, System.out.print it's only for testing;
    what would be the best way to get each EchoClient "output" and working with them while they constantly update? Thank you anyway and always.

    I think the fact that you've got a whole new class just to start a thread is just pointless bloat - all it does is start the thread - it doesn't even store a reference to the NewRunner object that you create, so you can't stop the thread, or access any of the members of the respective NewRunner objects once you create them.
    As for getting their output, do you mean something like just storing the output in a list, or processing it?
  2. In Topic: [link] Vanilla JS functions and plug-ins

    Posted 22 May 2015

    In the limited scope of web developing I do, I've avoided using any sort of plugins or anything like that. Maybe it's just the nature of me as a programmer, but I find that using plugin after plugin to accomplish the simplest of jobs just takes away from the fun of writing a solution (I did just say fun) and when you're attempting to learn how something works, I don't think it's best to learn it through layers and layers of bubble-wrapped abstraction. Then again, I think the fact that I try to implement most things from scratch is the reason I don't get much finished.
    I also just couldn't bring myself to seeing the purpose of including hundreds of kilobytes of junk on top just to use one function that I couldn't figure out how to implement myself.
  3. In Topic: Send data to db over php by using Android app

    Posted 22 May 2015

    if(!mysqli_query($con, "INSERT INTO user (name, age, username, password) VALUES ('$name', '-1', '$username', '$password')"))

    Uh-oh, what are you doing? You haven't escaped your inputs and that means you've got a high chance of somebody sneakily injecting some SQL into that statement and doing some serious damage if they wanted to. If you aren't going to use a prepared statement, at least escape the input by using mysqli_real_escape_string().

    I can't see anywhere that you're using the User objects that are being returned by your doInBackground functions.
    That, and how could you expect a connection to a server named: "http://MY LOCAL IP OR LOCALHOST HERE" to work?
  4. In Topic: multiple sprites collisions

    Posted 22 May 2015

    Don't do your logic within your drawing code. Your logic must occur x amount of times per second to deliver a consistent game experience, and if there are any delays while drawing to screen you're going to experience inconsistent updates which could throw the game into disarray.

    Update and then draw.
  5. In Topic: Program Help

    Posted 22 May 2015

    I can't see line 50 - where you have one of your errors. But with the expected while
    If you have a do just sitting there, it's going to think that it should be between a while so that it knows what to loop and under what conditions, etc…
    I already said that you do not need a loop given that you're only taking one input. Remove that do.

    I suggest you fix up your indentation as well, such as when you're testing the amount of kilowatts input - it really isn't pleasing on the eyes and if this were a larger project it could make it harder to maintain.

My Information

Member Title:
vexing conundrum
17 years old
May 24, 1998
Programming Languages:
Decent enough:

C++, PHP, JavaScript

Contact Information