Sharesmagazine
 Home   Log In   Register   Our Services   My Account   Contact   Help 
 Stockwatch   Level 2   Portfolio   Charts   Share Price   Awards   Market Scan   Videos   Broker Notes   Director Deals   Traders' Room 
 Funds   Trades   Terminal   Alerts   Heatmaps   News   Indices   Forward Diary   Forex Prices   Shares Magazine   Investors' Room 
 CFDs   Shares   SIPPs   ISAs   Forex   ETFs   Comparison Tables   Spread Betting 
You are NOT currently logged in
 
Register now or login to post to this thread.

PC & MAC CLINIC - On line problem solving. (CPU)     

Crocodile - 16 Dec 2002 03:59

Haystack - 09 Nov 2010 18:34 - 9276 of 11003

Why does the code below produce this error? My son's homework. I don't write Java: -

"Console() has private access in java.io.Console"

package dice;
import java.util.Random;
import java.io.Console;
public class Main {
Console console = new Console();

//constructor for Main class/**

public Main(){
//create a random variable to generate a Random number
Random aNum = new Random();
// use the randomNum methhod to create and returd a Random number
int generatedNum1 = randomNum(aNum);
//create a second random number
int generatedNum2 = randomNum(aNum);

if (generatedNum1 == generatedNum2)
console.println("Draw");

if (generatedNum1 > generatedNum2)
console.println("Throw 1 wins");

if (generatedNum1 < generatedNum2)
console.println("Throw 2 wins");

//output both of throws
console.println("throw 1 = "+ generatedNum1 +" throw 2 = "+ generatedNum2);

}

public static void main(String[] args) {
new Main();
}
//use
public int randomNum(Random aNum)
{
return aNum.nextInt(6)+1;
}
}

ExecLine - 10 Nov 2010 09:49 - 9277 of 11003

Is it because you've spelt 'method' and 'returd' wrong...?

(cough cough)

ThePublisher - 10 Nov 2010 09:59 - 9278 of 11003

Exec - or anyone else for that matter.

I was having problems with one of the Computer Doctors' PC's and it turned out that my real problem was due to an external USB hub. At their suggestion I installed a Belkin PCI USB card and the machine now runs perfectly.

The card has four external sockets and one internal USB socket.

What should I be using the internal one for?

TP

Seymour Clearly - 10 Nov 2010 10:28 - 9279 of 11003

Anything that draws significant power e.g. an external HD.

Things like Meece and webcams could go on the external one.

HARRYCAT - 10 Nov 2010 10:39 - 9280 of 11003

I think I am correct in saying that the four external ports, which take their power from the motherboard, are drawing their power from the same source, so the more you plug in, the slower they will react [USB current (related to power) is allocated in units of 100 mA up to a maximum total of 500 mA per port. Therefore a compliant bus powered hub can have no more than four downstream ports and cannot offer more than four 100 mA units of current in total to downstream devices (since one unit is needed for the hub itself). ]
The internal port is wired seperately, so has doesn't share it's power, though still draws from the motherboard. Faster USB hubs now come with a power lead which independently plugs into a motherboard power outlet. The internal USB port still usually has to be routed to the outside though, so not quite sure why they put it there.

hilary - 10 Nov 2010 10:48 - 9281 of 11003

Haystack,

I would hazard an uneducated guess which is probably wrong ..............

Your son doesn't seem to be declaring the console variable in the code, so the compiler thinks you're instead trying to reference the console field in the class. The field is private, so you're getting the compilation error.

Doc,

You can have as many returds as you like if they're preceded by a couple of slashes in the line.

ThePublisher - 10 Nov 2010 10:56 - 9282 of 11003

SC & H,

It seems odd to me to put the 'best' port inside the case and then to have to route a piece of cable to the outside.

Might it be for an alternative boot system?

TP

HARRYCAT - 10 Nov 2010 11:03 - 9283 of 11003

I don't think so. You can actually buy a blanking plate with a USB port on it or a hole in it to route to the internal port.
I wonder if the internal plug in boards are becoming a thing of the past, as you can now buy USB hubs which fit where the old 'A' drive was and have forward facing ports, so no more crawling round the back of the PC.

ThePublisher - 10 Nov 2010 12:31 - 9284 of 11003

Thanks guys about the USB.

The reason why I use them up so fast is because the PC is in a photographic studio and it has masses of incidental kit that needs to be permanently attached.

I guess the way I should use that internal USB is to attach a cable to it that can serve my external hard drives that I use for off-site backup. They are the ones I'd like to run fastest as they are the ones I find myself waiting to finish their b/u duty when I'm ready to lock up the studio and open the drinks cabinet!

TP

ThePublisher - 10 Nov 2010 14:48 - 9285 of 11003

Harrycat,

No rush - but if you have a spare moment could you point me to a blanking plate with either a hole or another USB port.

I have googled quite hard but maybe I am using the wrong keywords.

EDIT. I am not sure how one gets the socket through the hole unless it is quite large - but I am sure you have the answer!

Thanks.

TP

HARRYCAT - 10 Nov 2010 16:21 - 9286 of 11003

On the sublect of interior USB port:
"There are a couple uses...
One might be to simply connect to a port on the front of the case. If it was a DYI build and you bought a case that had ports on the front but the motherboard didn't have USB, then you could run a connection from the card to the port on the case.

Another use- something I've done- is to support an internal hard drive. I ran out of IDE channels once so I slapped a drive into a USB enclosure and put it inside the case and used that port.

You could also use it for something like Readyboost with Vista where vista can use a usb drive like ram..."

{TP - when I find the page ref your last post I will post here}.

ThePublisher - 10 Nov 2010 17:19 - 9287 of 11003

Look no futher HC.

Readyboost seems the best way to use it. I'm on W7 with 2gb of RAM. I'll pop in an 8gb memory stick.

TP

ThePublisher - 12 Nov 2010 09:43 - 9288 of 11003

For anyone with a use for a low overhead mail reader I'd advocate nPOP.

I have used it since the days of my earliest pocket PC as there are also versions that run on normal PC's. I was reminded of it as they introduced a new release this week.

This takes you to the forum from here you can migrate to the download site.

TP

Mega Bucks - 13 Nov 2010 18:26 - 9289 of 11003

Any sites showing the Boxing tonight and if so what time is it please.

Haystack - 13 Nov 2010 19:40 - 9290 of 11003

Merga Bucks

Try this

http://myp2p.eu/broadcast.php?matchid=95191∂=sports

It is a collection of peer to peer sites streaming it.

ExecLine - 25 Nov 2010 14:39 - 9291 of 11003

Go on! You know you always wanted to do it!

7 Videos on 'How to build a budget desktop PC'

and more besides

PlanB - 25 Nov 2010 17:11 - 9292 of 11003

Anyone know a fix to the search facility under Windows 7 Home (ie one that actually works!). Getting either no returns or partial returns on disk searches. Done a bit of googling on it, but I'm going round in circles at the moment. What a pile o' pants is MS!

ThePublisher - 25 Nov 2010 17:25 - 9293 of 11003

This is what I installed on Vista as I got bored with the MS offering.

It says it is not for W7, but I've just set it running and it seems to be doing its search.

Not the answer you expected - but it may help.

TP

iiwarm - 25 Nov 2010 22:14 - 9294 of 11003

PlanB
you're not by any chance looking for hidden or system files are you? If so you can unhide them in control panel>folder options>view

PlanB - 25 Nov 2010 22:50 - 9295 of 11003

> iiwarm
Nothing like that :) I have many folders of photos which I diligently labelled so that I can search back on them. All worked fine until something broke (is it system indexes?). Now I can't get a search result even when the file is right there in front of me! I need to dig further for a fix, but it's so annoying spending time fixing MS's nonsense when I could be creating.
Register now or login to post to this thread.