• Member Avatar for Traevel
    Traevel

    Began Watching php calculation returns -1

    Hi Everyone, I have the following php calulation $tplaunch = $tplaunch - $tpsold; This calculates as you would expect. I am helping to build a website that offers the first …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in php calculation returns -1

    You could use [max()](http://php.net/manual/en/function.max.php) to set a bottom limit of 0. `$tplaunch = max(0,($tplaunch - $tpsold));`
  • Member Avatar for Traevel
    Traevel

    Began Watching Random username and password

    Hello, I would create Login page. which - separate Php for random username password generator - this is just a dummy login with random username and password generator. No database …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Random username and password

    Check Antonio Conte's posts on [here](http://www.larryullman.com/forums/index.php?/topic/1155-generate-multiple-usernames-and-passwords/). #7 might be close to what you want as far as generating goes.
  • Member Avatar for Traevel
    Traevel

    Began Watching Mysql relationship

    I'm new to mysql and I need a ralationship tutorial.. like for example I made a table called MovieList with 1 column name TitleMovie and now I want to create …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Mysql relationship

    You'll want to define a [foreign key constraint](http://dev.mysql.com/doc/refman/5.7/en/create-table-foreign-keys.html) on the `acc1` and `acc2` tables with a reference to the movie id. Something along the likes of CREATE TABLE MovieList( id …
  • Member Avatar for Traevel
    Traevel

    Began Watching payroll

    hi Iam doing a payroll system for a compny where I have to implement a program to calculate workers pay. for commission paid workers, hourly paid workers and fixed monthly …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in payroll

    Well you never seem to set the `hours_worked` to anything other than 0. Also, keep in mind that when you write if(hours_worked == 40 * 120) total_deductions = calGrossF(gross_pay, deductions); …
  • Member Avatar for Traevel
    Traevel

    Began Watching Cannot find symbol - method

    public class ICMA42 // instance variables - replace the example below with your own private int alpha; private int bravo; private int sum; /** * Constructor for objects of class …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Cannot find symbol - method

    Aside from the usage of pete, the compiling issue could just be the missing `{` after `public class ICMA42`.
  • Member Avatar for Traevel
    Traevel

    Began Watching Show input text fields according to number entered

    Hi, so i have an input text `<input type="text" name="numguest" id="number-of-guests">` and a button `Okay`. When a number say, 4 is entered into that text box and clicked okay, 4 …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Show input text fields according to number entered

    Apart from the `Hide()` it's working here. You're making a clone of clone though, and `var target = $(".guests-tbody");` is technically a list of elements, so it will append to …
  • Member Avatar for Traevel
    Traevel

    Gave Reputation to JamesCherrill in problem in showing balls

    No no no! Only ever draw on a Swing Graphics when you override `paintComponent(Graphics g)` (or, sometimes, `paint(Graphics g)`) Swing has all kinds of internal optimisation, including double-buffering that you …
  • Member Avatar for Traevel
    Traevel

    Gave Reputation to Benny_1 in Java snacktime bot

    The class is now over and our bot turned out awesome! There was a giant snacktime tournament and our bot got to the finals! Sadly, for the finals match our …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Unable to add attribute to item model. c# SQL Server

    Well the whole purpose of Entity Framework is to stop writing data-access code, so I wouldn't do that. Basically the only queries you want to write are things like: List<Products> …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in problem in showing balls

    You could request the Graphics object from the super class (in this case, the jPanel you're drawing on). But you have be sure that it's not null. In other words, …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in problem in showing balls

    I don't know what your goal is, but what I'm seeing is a blue rectangle moving away from pacman yes. It could be that there are 10 balls that all …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in problem in showing balls

    You mean behind in drawing position? If I run your code now the balls are not moving and it just draws a rectangle at the first coordinate position. Which is …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in problem in showing balls

    If you don't extend Balls to a jComponent, then no you can't use that method in that manner.
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in problem in showing balls

    Because Balls does not extend jPanel (more specifically, a jComponent). You're overriding the method `paintComponent` in the super class. If you add `@Override` above that method in the Mypanel class, …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in problem in showing balls

    Placing outside of both will make it update at the same pace, if that's what you meant with being behind yes. if((xPos%2)==0){ arcMouth=360; } else{ arcMouth=300; } updateball(); pacmanball.moveBalls(); Duplicating …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in problem in showing balls

    If by behind you mean they don't get updated at the same pace as pacman it's because you're only updating the balls when pacman has its mouth open.
  • Member Avatar for Traevel
    Traevel

    Began Watching Artificial Neural Networks

    please help me ..how to start working on ANN
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Artificial Neural Networks

    For a fun, practical way to get started with neural networks (or other types of machine learning) you could have a look at [NetLogo](http://ccl.northwestern.edu/netlogo/index.shtml). It's a modelling environment in which …
  • Member Avatar for Traevel
    Traevel

    Began Watching problem in showing balls

    Hi, I need some help please i could not show the balls,when my pacman is moving,i want my pacman will through balls when it's moving.but i could not show his …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in problem in showing balls

    You're not adding any balls. for(Balls bb:ball){ ball.add(new Balls(xPos,yPos)); } That means: for each ball in the list of balls, add a new ball. The list is empty at first, …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Unable to add attribute to item model. c# SQL Server

    EF is Entity Framework, and on top of that tutorial page it does say: > Code features in this tutorial: Entity Framework Code First In the part where you create …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Unable to add attribute to item model. c# SQL Server

    Are you using Entity Framework? It sounds like a database issue, not a code issue. Double check your names and objects. The variables in the objects need to have the …
  • Member Avatar for Traevel
    Traevel

    Began Watching How to set spaces between characters.

    Hello, Can anyone show me how to set width between character in java. I'm looking for something like this. Items NumOfItems Price A 2 $10 B 1 $5 When I …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in How to set spaces between characters.

    You could use `System.out.format` to achieve that result. It requires a format string and variables. A format string is built up as follows. String contentFormat = "%-15s %-8d %-15s %n"; …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Javascript Ajax

    You could look at the firebug console by pressing the bug (F12 brings that one up for me). An alternative console could be `ctrl-shift-j`. Which button can't be pressed? You …
  • Member Avatar for Traevel
    Traevel

    Began Watching PHP - Wrong calculation

    Hello, PHP gives me wrong calculation results. !? Example, PHP says that: (47,60*554,82)/100 = 263,7 The right result is: 264 My code: function kurs_usd($value) { // in use (usd to …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in PHP - Wrong calculation

    echo round(((47.60 * 554.82) / 100), 2); Gives me 264.09, you're rounding on two decimals so it will never be 264, but it shouldn't give you 263.7 either. However, if …
  • Member Avatar for Traevel
    Traevel

    Began Watching Javascript Ajax

    Does anybody sees a fault in this? both codes are in the same file. It seems it doesnt gets in the javascript/ajax script because the alert doesnt work but i …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Javascript Ajax

    It's working fine here, after adding <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> above your script. Did you include jQuery on your page? The `$.trim()` method is working as well, I get the alert when …
  • Member Avatar for Traevel
    Traevel

    Began Watching I have a file that shows a table twice but there is only one table

    Here is the page: <?php include( "mypath.php" ); include( "{$filepath}/config/clientdbconnect.php" ); if ( ------------------------- ) { #exit( "Security Violation" ); } include( "header.php" ); $sqle = "select * from helpconfig …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in I have a file that shows a table twice but there is only one table

    Your table is being echoed in a `while` loop though, so it's not impossible to have it show up more than once, if there is more than one item in …
  • Member Avatar for Traevel
    Traevel

    Began Watching Unable to add attribute to item model. c# SQL Server

    Hey guys, having a bit of trouble with a customized eCommerce. The part I want to focus on is the adding of an item to the shopping cart (and the …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Unable to add attribute to item model. c# SQL Server

    You have a CartItem object with a ProductId, a ProductName, a ProductPrice ..and a Product? Could it be that you are mixing your CartItem and Product entities? That you are …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Java snacktime bot

    There's not a lot of documentation on snacktime that I can find, but there are similar programs out there and a lot of helper methods like calculate heading/bearing of yourself …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Validating input through a constructor

    Do you validate the input in setters themselves? Or in separate validation methods? If so you could do something along the lines of: try{ record.setName(name); }catch(YourException e){ //input not valid …
  • Member Avatar for Traevel
    Traevel

    Began Watching Validating input through a constructor

    I need help with my constructor that should call for all the user inputs, for example their first name, and the information gets checked to make sure it's valid. For …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Validating input through a constructor

    You can validate the user input before creating the object. Store the inputs in variables, validate them as they come in (so you can warn the user and have him/her …
  • Member Avatar for Traevel
    Traevel

    Began Watching Java snacktime bot

    I'm new in java, so I'm not very good at it yet and my teacher has stumped me. We are supposed to make a bot for a game called snacktime, …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Java snacktime bot

    Not familiar with the game, but it sounds fun. If you're not feeling at home with java perhaps try a simple solution first, like heading towards the one with the …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in ASP.net with Jquery save values to database.

    Ok, I'm not really familiar with ADO myself but as far as the top and left coordinates go I'm not really sure what you mean. You have a jpg map …
  • Member Avatar for Traevel
    Traevel

    Began Watching Interchangeble children list

    Hi, I have come across another programming challenge again and hopefully I wont close the thread myself this time. I am expecting good suggestions or examples from you to do …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in Interchangeble children list

    You could give jsTree a look: [Click Here](http://www.jstree.com/) It has a move_node event which contains old parent and old position information and a move_node method which you could use to …
  • Member Avatar for Traevel
    Traevel

    Began Watching ASP.net with Jquery save values to database.

    First of all I should have to say that I do have a good knowledge in C# and but not much knowledge in JS and Jquery. I’m going to develop …
  • Member Avatar for Traevel
    Traevel

    Replied To a Post in ASP.net with Jquery save values to database.

    You could post the data to your controller using JSON, then save it to a database using an SQL connection. [Click Here](http://www.c-sharpcorner.com/UploadFile/c4cfca/how-to-save-data-into-database-using-jquery-and-json-in-asp/) You might also want to look into the …

The End.