rotten69 20 Posting Whiz

That's all what I was getting, mate.

rotten69 20 Posting Whiz

@ Norm.. I think it's showing at what line the error is occuring. 99 and 113 and 240 are assumed to be the line numbers. I want to trace the lines but I couldn't find them in the program I was tryin to run.

rotten69 20 Posting Whiz

Hey,

I'm getting this error every time I run my program. I dunno what it means and how to fix it.

Uncaught error fetching image:
java.lang.NullPointerException
	at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:99)
	at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:113)
	at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240)
	at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
	at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
rotten69 20 Posting Whiz

Hello,

Are we allowed to assign different values to just one variable? For example, gender = [Female, female, fEmale] so if one a user enters any of the specified ones then he/she will be taken to the next step/level.

I'm just doing a tute at the moment and coming up with close solution to what I want to do.

public static void main (String args[]){
		String gen1 = "Male";
		String gen2 = new ArrayList;       has errors
		String gen2 =[Female, female];   has errors 
		String userInput;
		//Taking user input now.
		Scanner scan = new Scanner(System.in);
		
		System.out.println("Please enter your gender:");
		userInput = scan.nextLine();
			
		if (userInput.equals(gen1)) {
			System.out.println("Yes, true. You're a boy");
		}else{
			System.out.println("No, you Are not a boy. So, you must be a girl");
			
		}


Anyone could tell the difference between .equals() function and == function and when they are used since they're very much doing the same job that is comparing two things.
rotten69 20 Posting Whiz

I solved the problem by just declaring a package name which was undeclared before and Eclipse did not complain about it.


Thanks all,

rotten69 20 Posting Whiz

AWESOME. This is working now. It would have stopped me from using the laptop keyboard if I didn't seek for a fix button.

Thanks,

rotten69 20 Posting Whiz

Hi everyone,

I'm using a mk320 logitech that is connected to my laptop wirelessly. When I want to use the built-in keyboard on my windows7 starter, keys are giving me the values as they're expected to give like pressing button p gives me numeric value and likewise for o,l and k.

How do I change these buttons to the default settings?

Thanks,

rotten69 20 Posting Whiz

Thanks. I will try upgrading it.

rotten69 20 Posting Whiz

I opened the update manager to see whether there is an option for upgrading my system or not. There is an option for updating apps, not the system. So, this means that I'd have to upgrade manually(downloading the version I want and then installing it and so on..).

rotten69 20 Posting Whiz

Or maybe, I can upgrade it in a terminal?

rotten69 20 Posting Whiz

Yeah, I'm using 10.4. If I install 10.10, Will I be able to keep/transfer all apps to my ubuntu 10.10?

Cheers,

rotten69 20 Posting Whiz

Hi there,

To fix your PHP code,

<?php

echo "My first program and its a failure" ;

?>

a semi-colon was missing.

Also, to fix your HTML

<head> 
              <title> My first PHP program </title>
        </head>

Always, try keeping your tags in lower case letters like <head> </head> <body> </body>. You should be able to run a successful one now. Here is a good site to learn PHP http://phpacademy.org/videos/index.php?all

rotten69 20 Posting Whiz

I am not too sure why it is messing with Nvidia. I get to the GRUB screen where I have to choose which OS I want to use. Then, I choose ubuntu to run after a few seconds, I see the screen going black and it doesn't get me to log-in screen.

What happened was I had this app called Burg-manager installed and I was playing around with it to change the background image and log-in background image and stuff. Then, my OS crashes badly so I can not log in normally.

rotten69 20 Posting Whiz

I've got ubuntu and win7

rotten69 20 Posting Whiz

This is not helping at all, guys. I don't want to change anything written in those classes because they seem to be built on the top of each other.

rotten69 20 Posting Whiz

Bear in mind that I'm still new to Java language..

rotten69 20 Posting Whiz

They are both database langauages and I think the difference between them is to do with the version of PHP that is used in the application. For example, if you're using the latest version of PHP and that is php5, you will need to use mySQLi because it's the improved and newer version of mySQL. Therefore, mySQLi gives PHP developers new features to use such as

1-Object-oriented interface .

2-Support for Prepared Statements .

3-Support for Multiple Statements .

4-Support for Transactions .

5-Enhanced debugging capabilities .

6-Embedded server support .

For more information on the differences between them and what features they offer, here is a link for you


I hope this helps you.

Thanks,

rotten69 20 Posting Whiz

These are the print-screen images as requested before and hopefully are illustrating well to you guys. Looking forward to getting a solution to this problem from you all. Thanks in advance.


cheers,

rotten69 20 Posting Whiz

they are supposed to be in the src folder ,but when I imported the files, the child files got into their parent folder (well, they were in their parent folder)if this makes sense.

rotten69 20 Posting Whiz

Just an update on my system at the moment, it does not take me to the desktop enviroment. But, I can access the ubuntu BIOS screen. OK, what happens when I start my laptop now is that it loads till the boot-loader screen then I choose ubuntu to run then the screen looks unpleasing. It seems to be messing around with my graphics card which apparently is not loading properly.

What can I do to solve this? Before this happens, I played around with boot loader manager ( changing background images and things)

rotten69 20 Posting Whiz

It is strange that eclipse doesn't find any code to execute. How do you think I can possibly fix the issue?

rotten69 20 Posting Whiz

I clicked on SRC then imported the packages I wanted to run with their accompanying files that support them.


@ Masijade, These packages and projects are from a book. Therefore, they are not written for readers to complete them; they're meant to help readers understand how an app works and play around with the code.

rotten69 20 Posting Whiz

Hello everyone,

I have a book called "Java Genesis" and it has some files such as packages, projects and hints to enhance learning. So, I have set up a file structure in Eclipse and it shows that there are errors and warnings. When I tried running a Java Application using these files, a major message came up "Editor does not contain a main type". I went through the code and there was

public static void main (String [] args) {

Your help is greatly appreciated and Thanks in advance.

rotten69 20 Posting Whiz

Hi,

How are you doin there? I'm just doing an example here. I wanted to access all elements that our user 'George' has.

$players = array(
	'George' => array('Age'=>20, 'Hair Color'=>'Black', 'Cars'=>array('BMW', 'Toyota', 'Nissan', 'Shitty Cars lol') ),

	 'Mikayla' => array('Age'=> 16, 'Hair Color'=> 'Bruntte'),
	 
         'Mel'=> array('Age' =>21, 'Hair Color' =>'Grey')
	);
	
	echo ( "Ario's hair colour is:" .$players['George']['Hair Color'] );
	echo ("<br/>");
	echo ( "His age is:" .$players['George']['Age'] );
	echo ("<br/>");
	echo ( "His age is:" .$players['George']['Cars'][0][1][2][3] );  <<<<--- I want to do something like this. I want to access all items that our user has.

Thanks..

rotten69 20 Posting Whiz

I installed the system from a CD if that is what you're saying there. How/where do I get a stable ubuntu for actual use?

cheers

rotten69 20 Posting Whiz

I'm using ubuntu 11.04 and it is the latest version. OK, I fixed the problems. Then, the top navigation bar has gone for some reasons. To tell you more about I have installed, there is no compiz or gnome 3. I tried installing them then the system was UNABLE to locate the packages location. What I did was I installed Navigator window something.. that is the name of the software for custimizing the desktop. After a few mintues of using it, I was not happy to keep it then I uninstalled it and restart my laptop. I activated the graphics card and had to restart the laptop then it's all gone in a sudden.


cheers,

rotten69 20 Posting Whiz

I also face this problem that is giving me errors whenever I try installing softwares; the error is

E: Unable to locate package Avant
E: Unable to locate package Window
E: Unable to locate package Navigator
rotten69 20 Posting Whiz

Hi people,


I just re-installed Linux on my machine and I am trying to update it by using the command

sudo apt-get update

and the error messages I get in the terminal are

Err http://security.ubuntu.com natty-security InRelease
  
Err http://extras.ubuntu.com natty InRelease
  
Err http://security.ubuntu.com natty-security Release.gpg
  Could not resolve 'security.ubuntu.com'
Err http://extras.ubuntu.com natty Release.gpg
  Could not resolve 'extras.ubuntu.com'
Err http://au.archive.ubuntu.com natty InRelease
  
Err http://au.archive.ubuntu.com natty-updates InRelease
  
Err http://au.archive.ubuntu.com natty Release.gpg
  Could not resolve 'au.archive.ubuntu.com'
Err http://au.archive.ubuntu.com natty-updates Release.gpg
  Could not resolve 'au.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/natty/InRelease  

W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/natty-updates/InRelease  

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease  

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/Release.gpg  Could not resolve 'security.ubuntu.com'

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Could not resolve 'extras.ubuntu.com'

W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/natty/Release.gpg  Could not resolve 'au.archive.ubuntu.com'

W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/natty-updates/Release.gpg  Could not resolve 'au.archive.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.

How do I fixall these problems above mentioned ? and I also have a problem whenever I download GNOME 3. My desktop enviroment plays up when I adjust it. So, the bar where the three icons are (close window, minimise/ maximise and hide) is gone for some reasons. The desktop runs really really slow and usually, I would …

rotten69 20 Posting Whiz

I know. I fixed the problem already. I still have a problem with GNOME 3. It always complains about broken packages. I try fixing them but they apparently can not be fixed?? I don't know why.


How do you make your ubuntu stable? I want to customize my desktop and when I do so, the system plays up a little.

rotten69 20 Posting Whiz

Hi everyone,

I am just having a few issues with Ubuntu system on my machine. It doesn't fix broken packages and everytime, I want to install/remove a software from my machine, it says "can't locate PACKAGE NAME"

Now, I want to re-install Ubuntu. I logged into my other OS which is Win 7 and couldn't find un-install icon as I usually find. Please can anyone tell me what to do now?

cheers,

rotten69 20 Posting Whiz

I think w3schools.com is your source of the language you're using. And also, webdesign.about.com could be helpful.

rotten69 20 Posting Whiz

@snips,, I am not after an instruction on how to install PHP server. I think the title is clearer. But, anyway, thanks for the link. Others might benefit from it.

rotten69 20 Posting Whiz

Show us your HTML form( all fields) please,,,

rotten69 20 Posting Whiz

Line 16 needs a ;

it's OK. Sometimes, you write a bunch of lines and when you're trying to run them, you don't find an obvious mistake.But, having someone to look at your code helps a lot.

rotten69 20 Posting Whiz

it is safer and cleaner to separate PHP section/query. Therefore, try putting all PHP codes into a PHP file. Then, name it, for example query.php, then put the name into the action attribute of your form. In regard to adding/updating data on your site, I can NOT see any fields in your form except the submit button. OK, here is a simple way of doing this, in your form where you have the input fields, have an attribute

name = "nic"

then in your PHP file. Call it to get the data from users like

$nic = $_POST['nic']

I hope this helps.

rotten69 20 Posting Whiz

I'd be very happy with firefox working. I have stopped IE for development reasons. It also crashes all the time !

Good luck with it, mate.

rotten69 20 Posting Whiz

Just a piece of suggestion for you. I think you should use CSS rather than using CSS properties in PHP because it gets a little harder to debug a piece of combined code. It's like a container inside another inside another. If one was broken, you would have to fix 1st one then 2nd then 3rd and so on.

Good luck with it.

rotten69 20 Posting Whiz

I think you may have to change file size that is specified in your php.ini in the apache server. As I can slightly remember the line, it is " upload size maximum" or something like this. Because by default, it only allows you to upload a maximum of 4 MB, I think.

And in your HTML form, you may also have to add this line after your submit button.
The below code is just an example to illustrate to you.

File to upload: <input type="file" name="userfile" size="20" /> <br />
	<input type="submit" value="submit" />
	
	<!-- MAX FILE SIZE IN BYTES -->
        <!-- You add the size in value atrribute and it's BYTES -->

	<input type="hidden" name="MAX_FILE_SIZE" value=" ...">

I hope this helps.

rotten69 20 Posting Whiz

Thanks all for the comments and wonderful advice. All are well-appreciated.

rotten69 20 Posting Whiz

Thanks. The only thing annoys me is that getting the logic. How do you people get the logic of any programming/scripting language? Especially, with having different syntax.

rotten69 20 Posting Whiz

Thanks all for passing by and giving me advice.

To vibhadevit, Thanks a lot again. I do agree with you at the point that is what to read since there are heaps and heaps of tutorials. What I want to do at the moment is to get the basics down and master the language. Would that be a good idea to learn PHP and JavaScript at the same time? How secure is PHP? How can you tell the diffs between PHP 5 and 4 and 3? Are they way different?

rotten69 20 Posting Whiz

Absolutely, PHP is just an amazing and powerful language to learn. However,with the goal you're trying to achieve, you will need AJAX (Asynchronous Javascript And XML) and PHP to build a web app that allows users to comment on things and the system get updated asynchronously.

Good luck..

diafol commented: necroposting -3
rotten69 20 Posting Whiz

Hi people,

I am so interested in learning PHP as it is a powerful language in the web. I know a little bit of PHP so you can say that I've got an intro to PHP at this stage. What I am really struggling the logic of PHP. What would you suggest for me to do or learn as a beginner?

If anyone is out there using this Book Called "PHP Cookbook ", Please do tell me about it. Is it easy to understand from the first attempt reading it? Is it useful?

I saw the book on O'relly site and I think I will get it. So, before I buy the book, I want people using the book to tell me about it please.

rotten69 20 Posting Whiz

Please anyone take the time to explain what's wrong the code. I'm just a php noob..

rotten69 20 Posting Whiz

Die(); // at the end of your code may be useful.

Depending on what you're doing in the PHP coding.

rotten69 20 Posting Whiz

Hey all,

I'm just hoping to receive great help from you people..

I'm tryin to fix my PHP coding and it looks good,but the server says that a particular line is broken..

<?php
	$hd = fopen('content.txt', 'r');
	$line = fgets($hd);
	$content = array();
	
	while($line)
	{
		$word = explode(',', $line);
		$content [$word[0]] => array('img_path' => $word[1], 'description' => $word[2], 'price' => $word[3]);      // the error message is indicating this line is broken!!  Is it because of an equal sign missing? I tried putting an equal sign, but still it doesn't run.
		
		$line = fgets($hd);
	}
	fclose($hd);

And also, I'm trying to implement a log-in system without using Database management system.. I just want to use an array..

session_start();
	$users = array("user1" =>"3202", "user2" =>"2002", "user3" =>"1061", "user4"=>"1400", "user5"=>"1001");

//So, inside the if statement .... Would that be ok to use $_REQUEST or GET or even isSet?



if($_REQUEST['username'] == "user" && $_REQUEST['password'] == "3202"){ 

 <-- This condition is NOT right.. and I don't really know how to re-set it up..   like how to check if the username is matching with its corresponding password

		
		$_SESSION['username'] = "user1" ;
		$_SESSION['password'] = "3202" ;
		
		$_SESSION['username'] = "user2" ;
		$_SESSION['password'] = "2002" ;
		
		$_SESSION['username'] = "user" ;
		$_SESSION['password'] = "1001" ;
		
		$_SESSION['username'] = "user3" ;
		$_SESSION['password'] = "1061" ;
		
		$_SESSION['username'] = "user4" ;
		$_SESSION['password'] = "1400" ;
		header("Location: home.php ");

I'm looking forward to hearing from you Champions..