User Profile
Collapse
-
Navigate Droid from the unix shell start up
I have a droid and I need to get files off an old computer that wont work properly. So how can I navigate (or copy) files from mac to my Droid phone using the unix shell of my mac (start up using CMD-S)? Where is the device located? -
Alright thanks, I figured out my last problem. -
How to get more than one row of information from MySQL query
I'm working on this webiste/database. It's currently setup with two tables one for the user information and other for other stuff. I'm using the id column in my tables as my primary key. So the say the first user would have id = 1 and so on. The other table also has a id column so that each row is assigned to a certain user. Now i'm trying to output all the data for a certain user. Can anyone make a suggestions because right now its only giving me... -
PHP login script
For some reason its not pulling the id and username from my database and putting the values into the correlated sessions. Can anyone help?
...Code:<?php session_start(); $err = array(); // Will hold our errors if(!$_POST['username'] || !$_POST['password']) $err[] = 'All the fields must be filled in!'; if(!count($err)) { $username = $_POST['username']; -
-
i declared the variable 'number' outside the loop ... but now my program is saying the the variable might not have been initializedLeave a comment:
-
okay i changed the code a little bit:
...Code:System.out.println("Please enter the number you think the die will roll. The number must be between 1 and 6"); for (boolean numRun=true; numRun;) { Scanner sc = new Scanner(System.in); int numInput = sc.nextInt(); if(numInput >= 1 && numInput <= 6) { int number = numInput; numRun =Leave a comment:
-
How do I loop this?
Here is my code:
...Code:System.out.println("Please enter the number you think the die will roll. The number must be between 1 and 6"); for (boolean numRun=true; numRun;) { Scanner sc = new Scanner(System.in); if (sc.hasNext()) { numInput = sc.nextInt(); if (numInput >= 1 && numInput <= 6) { -
I don't want people to write my whole code for me.. but seem to keep running into problems. Here is what i have so far
...Code:import java.util.Scanner; import java.util.Random; import java.io.*; package dicegame; public class Main { @SuppressWarnings("empty-statement") public static void main(String[] args) throws IOException { Random generatorLeave a comment:
-
thanks guys for the help. THe program works fine now. I just started using this site and i can see its very helpful already. :DLeave a comment:
-
alright so I have edited the code to do what I want it to do. my first set of code was to be used farther along in the project. The code below is only supposed to get the input from the user and test if its an integer.
...Code:import java.util.Scanner; import java.util.Random; import java.io.*; package dicegame; public class Main { @SuppressWarnings("empty-statement") publicLeave a comment:
-
Test Input Java
Hello, I'm fairly new to java and I need some help with my first program. I'm trying to make a program in which the user makes bet that he will roll a certain number on a die. But I am having trouble trying to test the input i receive. I need to see if the bet entered is a integer, if its not then they need to renter the bet. I am used to GoTo statements used in Visual Basic but I'm not sure how to accomplish this affect in java. Help is appreciated....
No activity results to display
Show More
Leave a comment: