Computer Related Questions-Volume 206 [Read Only] - Dynamic Dave

***** This thread is now closed, please CLICK HERE to go to Volume 207 *****


In this thread you may ask any computer related question for which you need help, advice, suggestions or whatever.

Usual rules apply,

No motoring related discussion,
No politics,
No Speeding, speed cameras, traffic calming
No arguments or slanging matches
Nothing which we think is not following the spirit of the thread
Nothing that risks the future of this site (please see the small print for details www.honestjohn.co.uk/credits/index.htm )

Any of the above will be deleted. If the thread becomes difficult to maintain it will simply be removed.

There is a wealth of knowledge in here, much of which is not motoring related, but most of which is useful.

This is Volume 206. Previous Volumes will not be deleted.


A list of previous volumes can be found by clicking Here

PLEASE NOTE:

When posting a NEW question, please "Reply to" the first message in this thread, i.e. this one. This keeps each question in it's own separate segment and stops each new question from getting mixed up in amongst existing questions. Also please remember to change the subject header.

Edited by Dynamic Dave on 09/01/2010 at 21:14

Please help with internet connection - BobbyG
F_I_L's Dell laptop crashed a couple of weeks ago. Goodness knows what he had done to it but as he is not one to have many files, I copied the photos to an external hard drive and tried reinstalling Vista from scratch.
Anyway didn't work, took to a local bucket shop who, for £40, took the computer back to day one, Vista reinstalled and its going better than it ever has!
However.....
He cannot connect to the internet. He has a wireless router that he has a contract with AOL down his BT phone line. His laptop connects to the router, but no internet. When I try to connect to the internet in his house with my wireless phone, again I connect but no internet.
However, if I bring his laptop up to my house it connects to my wireless router without any problems and straight onto the internet.

So is it fair to say that the problem is 100% an issue with his internet connection (The lights on his router are all lit the way they should be). When I hard wire into the router it still does not connect.

Any thoughts what I can do?

Edited by Dynamic Dave on 27/12/2009 at 02:02

Please help with internet connection - Rattle
Just about to have a bath so others will reply before me but what router do you have?
Please help with internet connection - Altea Ego
did you reboot his router?

what router is it?
Please help with internet connection - BobbyG
TBH will need to check tomorrow what router it is but yes, I unplugged it, pressed the reset button etc. Its the router that was supplied by aol when he signed up to them last year.
Please help with internet connection - Altea Ego
once we know what router it is, we can tell you how to log onto to it to get the netstats
Please help with internet connection - BobbyG
OK cheers, I remember on the rear of it it has a website type number thingy to access it, the type that has 3 numbers,3 numbers.1 number sort of thing!
But when I tried that it didn't do anything.
Will try to find out more tomorrow. Ta
Please help with internet connection - Altea Ego
The internal, LAN-IP address is normally set to a default, private number. Linksys routers, for example, use 192.168.1.1 for their internal IP address. D-Link and Netgear routers typically use 192.168.0.1. Some US Robotics routers use 192.168.123.254, and some SMC routers use 192.168.2.1. No matter the brand of router, its default internal IP address should be provided in documentation. Administrators often have the option to change this IP address during router setup. In any case, however, the private LAN-IP address remains fixed once set. It can be viewed from the router's administrative console.

The external, WAN-IP address of the router is set when the router connects to the Internet service provider. This address can also be viewed on the router's administrative console. Alternatively, the WAN-IP address can be found by visiting a Web-based IP address lookup service like checkip.dyndns.org/ from any computer on the home LAN.

Another way to identify the public IP addresses of routers, involves executing a ping or "traceroute" command. From inside a home network, the (DOS) command "ping -r 1" will send a message through the home router that will cause its IP address to be displayed. For example, "ping -r 1 www.yahoo.com" should result in a message like the following displayed on the command prompt:


Reply from 66.94.230.43: bytes=32 time=294ms TTL=56
Route: 209.179.21.76


Please help with internet connection - BobbyG
Cheers AE, will try to pop down there tomorrow and find out the necessary info and report back.
Please help with internet connection - smokie
The shop may have left a firewall active, unusual if it stops browsing but if you are connecting to the router but not getting anywhere that's a possibility. Check the Windows Firewall isn't on.
Please help with internet connection - theterranaut
Bobby-

Before you go checking WAN IPs, are you picking up a local IP on the PC?
Some variants of WEP for example will appear to connect but not actually hand you an IP via DHCP. I've seen this using Open mode when Shared was needed. Makes it look like you are connected but in fact arent.

You should be able to do this from a command prompt. Type the command:

ipconfig /all

then return

Lots of info here, but you want to see something like this:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8168D(P)/8111D(P) PCI-E G
igabit Ethernet NIC
Physical Address. . . . . . . . . : 00-19-66-CC-FA-07
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.29
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 158.152.1.43

Which is from my PC. You'd be looking for a description that matches the wireless device in your machine of course- the above is from a wired connection.

C:Documents and SettingsAdministrator>

tt

Edited by theterranaut on 27/12/2009 at 11:05

Please help with internet connection - rtj70
Since the rebuilt, FIL has done the obvious and rejoined the wireless LAN with the correct security credentials (WEP password for example)?

Before the rebuilt it would have rejoined the known wireless network automatically but will have needed setting up again.
Please help with internet connection - BobbyG
OK, have phoned my f-i-l and he has given me these details from his router:
It is a Netgear wireless router , model DT834G

It is pasword protected, so have used this to connect to the router (as I did with my phone).

So what do I do now?

I will need to print any replies of and then go down there to try them out !

Cheers
Please help with internet connection - Falkirk Bairn
Run CD supplied drivers etc by AOL
connect to router with cable -

Call aol 08444995555

It is usually India calling but you will get there eventually
Please help with internet connection - jbif
AOL UK with >> Netgear wireless router , model DT834G >>

Here you go:
help.aol.co.uk/configure-your-netgear-dg834g-wirel...1

Please help with internet connection - BobbyG
ok down looking at this router just now. Followed advice above and downloaded the aol installation at home and brought down. So far so good but have connected as instructed ie by ethernet cable to start with. Instructions say that one of the numbered port lights will be lit to indicate which one the cable is plugged into. Although i have tried 3 different ethernet cables the numbered port light does not light, no matter which port i plug into. Tried diff cables, ports but no change. The port lights do light when i press the reset button on the router so its not a case of light not working. As a result the installation is not allowing me to progress as it is saying that it cant detect the router and to check the cables! Have also tried different phone sockets and filters but no success. What do i do now and keep it simple and easy for me!
Please help with internet connection - BobbyG
guys, no more answers please, I have now handed this over to my brother to try and sort as I am way out my knowledge and dont want to make things any worse!
Thanks for all help so far though. Much appreciated.
Please help with internet connection - BobbyG
To update, took modem and laptop up to my brother who had conveniently travelled up from Bishops Stortford today and he got it sorted by using his laptop to connect into the router and do all sorts of things that I didn't have a clue about!
Thanks again for all advice and help offered.
Some idiot thinks my email address is his - Rattle
I have a gmail account which is my name at googlemail.com. I have a very common name and I keep receiving other peoples mail (its not spam). I havechanged my password, have pop3 turned off and there is nothing in sent so nobody is accessing it its just somebody dosn't know thier own email address.

What can I do about this?
Some idiot thinks my email address is his - smokie
Presume this is personal kind of mail rather than advertising junk. If so, reply to the sender and explain, ask them to contact the intended recipient to get their correct email address and advise that they may have given out wrong address.

If it's advertising mails from trustorthy places, unsubscribe.
Disk Boot Failure, Insert System Disk error - janliv18
Hello, after the helpful response I had from my other computer related problem, my son has asked me to post the following problem he has had with Windows 7..

I have brought a new samsung HD103SJ 1TB (SATA) hard drive and also Windows 7. The first drive got sent back as I kept getting Desk Boot failure errors every 5 times out of 10 I switched the pc on.

I have now had a new drive (same model etc) and I am getting the same errors. This time it happens more often. Is this windows 7 at fault or the drive?

Windows 7 installs fine but when restarting the pc or turning it on I get this error.
Ive read that old Samsung drives had errors but I thought they had sorted it out on the new ones.



advice needed please,


thank you
Disk Boot Failure, Insert System Disk error - bell boy
maybe your computer power supply is running out of power spinning one tig?
Disk Boot Failure, Insert System Disk error - Rattle
Could also be faulty SATA cable or motherboard controller.
Disk Boot Failure, Insert System Disk error - janliv18
strange thing is I never had any problem with my old maxtor Sata drive (640mb)

(i have just attached a new sata cable to try)

Edited by janliv18 on 27/12/2009 at 23:53

Disk Boot Failure, Insert System Disk error - janliv18
My pc (a Compaq SR1909UK) is SATA 1.

This shouldnt make any difference should it as the Samsung drive is SataII ?


Disk Boot Failure, Insert System Disk error - Rattle
it should be backward comptable but your BIOS probably needs updating to support larger disks.
Disk Boot Failure, Insert System Disk error - smokie
While SATA and SATA II are sort of compatible, SATA II is supposed to auto-negotiate with the system to set it's operating parameters (speed etc) but this sometimes fails on SATA motherboards. So drive manufacturers include a jumper which can be set to force this and override auto negotiation.

See this page for details for Samsung drives.
www.samsung.com/global/business/hdd/faqView.do?b2b...1

Firefox thinks it's in America. - Pugugly
Apple Mac Book Pro running latest version of Firefox.. Brilliant in all respects other than when you search Amazon or Ebay using the search box it brings back results for the US sites - how can I localise it to the UK
Firefox thinks it's in America. - Manatee
Don't do Apples. But I see that when I look at available search engines in FF under Win7, I see Amazon.co.uk (not .com) and similarly for ebay.

It's not obvious how to change it. The bottom of the search box drop down offers "manage search engines" but does NOT give an edit option for the URLs. However, if you click "get more search engines" it opens a tab and you should find the various countries' Amazon and ebay sites listed. You can add the ones you want, then delete the .com ones you have.

You might just find that your region/location is incorrectly set, and if you correct it and reboot it will default to the correct ones - but that's me guessing.
Firefox thinks it's in America. - Pugugly
No you were right with the first suggestion - spent the best part of an hour trying to resolve it and it was that simple - trees and woods eh ? Thanks a lot.
Firefox thinks it's in America. - rtj70
PU, go to the search engine drop down and select Manage Search Engines (bottom of the list).

Then delete Ebay and Amazon and click on the "Get More Search Engines" hyperlink.

From there you can search for and add in the UK ones that you want.
Firefox thinks it's in America. - Pugugly
Sorted thanks.
Goodmans GV500 15" LCD monitor - pda
I've had this monitor for about 6 yrs now and it's served me well but recently I've seemed to have trouble with the focus.
This morning I've noticed that there is a definate shading in 3 vertical sections of the screen. The text appears bolder and fuzzy.
When I use the system file checker the text is half on the left and half on the right of the screen with a blank section in the middle.
When I boot up a brief blue screen appears with the HP Logo but that has a black broad stripe down the centre.
I run Windows Vista and IE8 an I have tried to optomise the view with the ATI Catalyst control centre in advanced mode as well as with the monitor adjustment button all to no avail.
Is this terminal and should I be off to the sales to look for a new one or can I do some supervised tinkering with your help please?

Pat
Goodmans GV500 15" LCD monitor - cheddar
Could be the graphics card in the PC, can you try a different monitor on the PC to rule this out?

EDIT: spellin'

Edited by cheddar on 02/01/2010 at 11:06

Goodmans GV500 15" LCD monitor - Dynamic Dave
Pat, I've just moved your question to the correct place in this thread. It's a new question, but you tagged it onto Pugugly's "Firefox thinks it's in America" question.

Please try and remember to reply to the first post in this, and the IHAQ threads when you're asking a new question. There is a risk when I or one of the other mods moves a post, that it could end up getting lost or deleted - as what happened the other day to one of your other questions.

Thanks, DD.
Goodmans GV500 15" LCD monitor - Stuartli
If the monitor is faulty and you have had six years' service out of it, then it owes you very little.

You can get a much larger screen size monitor with superior performance from a major brand name for around £100. See, for instance:

tinyurl.com/ylfgrgq

tinyurl.com/yj73a5d

tinyurl.com/ygk7cfj
Goodmans GV500 15" LCD monitor - pda
Thanks Stuart for that advice. It got worse very quickly this morning so we've been and purchased a new one:)

Dave, it would seem you all got out of the wrong side of bed this morning, was there a party last night we didn't get invited to? There is no point in being a Mod if you don't have anything to do, I know that's right because I am one on our forums.
Having said that, I always do my telling off by email, tactfully:)

Pat
Goodmans GV500 15" LCD monitor - Manatee
>>Having said that, I always do my telling off by email, tactfully:)

I think you get dealt with publicly pour encourager les autres ;-)
Goodmans GV500 15" LCD monitor - pda
Yes, but I was brought up proper:)

Countdown to who's going to put the ly on the end for me!!

Pat
Goodmans GV500 15" LCD monitor - Dynamic Dave
There is no point in being a Mod if you don't have anything to do


Pat, as pointed out, moving a post to another location in a thread is not an easy task. First it has to be moved out of the thread and then searched for to find where it ends up, before then moving it back into the correct place using a unique 6 digit code that is required. Despite all the years I've been a moderator, the editing tools we have at our disposal aren't always that user friendly.
Having said that I always do my telling off by email tactfully:)


I did mention it to you via email the other day when I lost one of your other questions in cyberspace while attempting to move it to the correct place.

This also acts as a reminder to others as well when posting a new question to Comp related, IHAQ & a handful of other threads that are sequentially laid out.

DD
IE 6 Locking Up - Ramite
My laptop keeps 'locking up' on a regular basis.When I am on the internet, the internet explorer e in the top right corner turns into a small white box.It then will stay on for anywhere between 5 seconds and a couple of minutes.It doesnt just do it on the internet though just the majority of the time.Any help would be great as it seems to be doing it more and more.

Edited by Pugugly on 02/01/2010 at 19:45

IE 6 Locking Up - Manatee
IE6 is pretty old hat and is likely to have problems with some websites anyway. Try upgrading it and see if that fixes the problem. Or use a different browser like Firefox.

Does the laptop work properly when IE6 isn't running? Have you done a scan with an up to date AV?
IE 6 Locking Up - Ramite
It still locks up even if internet is not on.If I am using works or word it still locks up just not as much when I am on internet.I am using norton I scan it a couple of times a month but comes back ok.Used to use mcafee before that. AV Whats that ?
IE 6 Locking Up - rtj70
AV = anti-virus

But you need to scan for other malware like trojans, etc. So you need software in addition to anti-virus.
IE 6 Locking Up - Fullchat
"I am using norton"

Not a fan. If you have any other AV software installed I have found it causes conflicts and other problems.

Edited by Fullchat on 02/01/2010 at 22:18

IE 6 Locking Up - Ramite
But you need to scan for other malware like trojans, etc. So you need software in addition to anti-virus
What would you recommend ?

Edited by Ramite on 02/01/2010 at 22:30

IE 6 Locking Up - Jcoventry
Uninstall any existing antivirus you might have installed.

Install Microsoft Security Essentials - this is a free AV and it works very well. Run a quick scan.

Then install Malware Bytes Anti-Malware, again this is free and protects you from malware. Run a quick scan.

Then finally install SuperAntiSpyware - does a similar thing to malware bytes, but catches some it doesn't know about. Run a quick scan.

Now your system should be clean. You should only ever have one AV installed and running. But you can install as many anti adware/malware/spyware ones as you like - as long as they are not all running in the background at the same time, since that is basically a waste of memory/cpu.

BTW, I repair computers for a living - I use these three programs all the time and have found they all work excellently together.
IE 6 Locking Up - Jcoventry
A word of caution about Norton and McAfee. In my experience I have found that both of these are slow and rubbish at actually protecting your system from viruses. I cannot count the number of times I have had to remove viruses from a machine that has Norton or McAfee installed. Norton slows things down so much that it is almost laughable.

So, be wise and switch to a free antivirus - there's three good ones out there that I recommend. Microsoft Security Essentials, AVG and Avast all work well. You only need one of these though.

To remove Norton or McAfee, use the Uninstaller through Add/Remove programs. AFTER doing that, then you must remove the stuff the Uninstaller ignores.

Both Symantec and McAfee released removal tools that are separate to the uninstallers - shows just how crummy this software is.

For the Norton Removal Tool:
service1.symantec.com/Support/tsgeninfo.nsf/docid/...9

For the McAfee Removal Tool:
service.mcafee.com/FAQDocument.aspx?id=TS100507
IE 6 Locking Up - Manatee
Just seen jcoventry's replies. I don't mend computers for a living and I'm not disagreeing.

As it happens I use AVG and an occasional scan with SuperAntiSpyware. The free version of the latter doesn't run all the time but it does put its updater in Startup which you can disable - apart from waiting for it to load every time, it always pops up an update message. I just start it when I want to use it and update it then.
IE 6 Locking Up - Manatee
From re-reading your question Ramite, I infer that it isn't crashing, just running slowly, almost stopping, then resumes? If that's the case it might be just be something, or an accumulation of things, using a lot of CPU (processing power).

Try using Task Manager to see what's using your processor the most. Open it with Control-Alt-Delete, then click the 'Processes' tab, and click the 'CPU' column so it sorts the running processes in order of the CPU they are using. That might tell you what's keeping your PC busy.

You might also check what's running automatically every time you start the PC. An easy way to do this is with CCleaner (free download). If you don't have it, install it. Run it. Select 'Tools', 'Startup'. You'll see a list of programs that run every time you start up. Disable the ones you think you don't need to do this - things like 'updaters', TomTomHome, Openoffice quickstarter, Adobe reader speed launcher, in fact any programs you recognise but never use or don't need to run all the time.

The CPU usage, if that is the problem, might just be caused by a conflict of some kind. I hesitate to suggest it's anything to do with Norton (I think the later versions are better) but it might be something to keep in mind - there are other security programs that cost nothing, including Microsoft Security Essentials.
IE 6 Locking Up - Ramite
Will put those on and see how it goes.I have got ccleaner and ive now disabled a few things see how it goes.The CPU usage it shows system idle process taking about 80 -90.Is this about right ?
IE 6 Locking Up - Stuartli
Read the System IDLE Process section in this Black Viper website link:

www.blackviper.com/WinXP/strangeservice.htm

This is a very informative and useful website, especially the Services Configuration.
Puppy linux - thanks bell boy - maz64
Following the failure of the hard disk on my (work) laptop, I'm now running puppy linux off a USB flash drive; thanks to bell boy for recommending it in a previous thread.

I did have a go at putting Ubuntu on a flash drive, but it seemed like I needed the Ubuntu iso in a CD drive as well as the Ubuntu live CD to set up the flash drive. In puppy linux you have an option to create a puppy flash drive from the main menu, and it's all fairly straightforward.

Hopefully work will give me a shiny new laptop tomorrow...

Edited by Focus {P} on 03/01/2010 at 17:16

Puppy linux - thanks bell boy - maz64
Hopefully work will give me a shiny new laptop tomorrow...


Well... have gone from a 1.1GHz Pentium M with 80Gb disk and 1280x768 screen to, er, 1.4GHz Pentium M with 40Gb disk and 1024x768 screen :-(

It's just an old Dell X300 they had lying around, which appears to be similar to the X1 which it's replacing, and I'll have to put in a request for a brand new one (and hope it gets signed off). Fair enough - not much spare cash around at the moment.

Just looking at the current Dell laptops, anyone got a Vostro 1220/V13/1320? I need the smaller screen for working on the train, and at ~£400 these look a lot cheaper than the small screen Latitudes at £1000+.
Dimension 3000 in endless bootup loop, any ideas? - SpamCan61 {P}
Evenin' all;

My neighbour has just given me a PC as above, it broke in some unspecified way, someone tried to fix it by doing a clean Windows install and trashed all his data, now it just tries to run Windows, gets half way through booting safe mode then goes back to BIOS and starts all over again.

I've got a spare HDD and optical drive + IDE cables so have been swapping everything around with little result. I've tried all sorts of master /slave configs, the HDD shows up in the BIOS boot list but not the optical drive.

I have booted successfully from a Ubuntu live USB stick, bizarrely enough the HDD and optical drive both show up using this.

The 4 telltale LEDs on the back panel just continually cycle green /amber so are no use for diagnostics.

I know it isn't really worth trying to fix this, but I've got nothing better to do at the moment so any suggestions for new things to try would be welcome. cheers

Dimension 3000 in endless bootup loop, any ideas? - cheddar
Have you tried removing the BIOS battery (CR2032?) from the MoBo for 10 mins to default the BIOS?
Dimension 3000 in endless bootup loop, any ideas? - SpamCan61 {P}
whoops, sorry Cheddar I should've mentioned I tried that.:-/

I would say there's a hardware problem with the IDE busses but it all seems OK running Ubuntu from USB, files from the HDD or optical can be read fine.
Dimension 3000 in endless bootup loop, any ideas? - Altea Ego
had this very same thing quite recently.

Its a screwed master boot record (windows can do this in certain circumstances)


You need to fdisk & reformat the drive using another source. the ubunto stick will do, format it in ntfs

then do a clean windows install again.

Edited by Altea Ego on 05/01/2010 at 19:50

Dimension 3000 in endless bootup loop, any ideas? - SpamCan61 {P}
Thanks AE, I was wondering about the MBR but that's stretching my PC knowledge somewhat. Will have a bash tomorrow. I don't have the original Windows recovery disk for this machine,and the previous 'helper' has trashed the recovery partition so I'll try the Windows disk for the Dell 4400 I've just pensioned off.

Edited by SpamCan61 {P} on 05/01/2010 at 19:54

Dimension 3000 in endless bootup loop, any ideas? - maz64
Isn't there a command to restore the MBR, or am I confusing it with something else? Had to use it once but can't remember the exact circumstances.

EDIT: www.techzonez.com/forums/archive/index.php/t-3975....l

Edited by Focus {P} on 05/01/2010 at 20:34

Dimension 3000 in endless bootup loop, any ideas? - maz64
...and in my case I didn't need to reformat anything; the FIXMBR was enough (IIRC).

Edited by Focus {P} on 05/01/2010 at 20:37

Dimension 3000 in endless bootup loop, any ideas? - SpamCan61 {P}
Thanks for that, I suspect the previous dabbling has made an easy fix unlikely but you never know.
Dimension 3000 in endless bootup loop, any ideas? - Altea Ego
In this instance Windows makes such a good job of screwing it, its only recoverable with an fdisk.
Dimension 3000 in endless bootup loop, any ideas? - SpamCan61 {P}
Just an update to say I've finally got this machine going reliably ( so far...) I think there's still something fishy with the mobo / BIOS, as every time I re-configured or changed the HDD or optical drives I had to power down and remove the backup battery before the BIOS setup would recognise the change. I don't think that's normal.

Anyway, stuck a different HDD in, used an old Dell XP home backup disk, after 3 attempts machine finally installed Windows properly. Did SP2 as one 257 meg download then a further 57 security updates; seems to be running OK now. Well I'm typing this on it anyway. fingers crossed. Thanks for advice offered. :-)
Dimension 3000 in endless bootup loop, any ideas? - bell boy
have you tried letting the bios settings be set to basic fail safe?
reason i ask is im always messing and had the same problem as you last week,also the nvram kept going through lots of numbers before the thing would work,a google also told me faulty battery but it was my fingers in the bios that dun it
Dimension 3000 in endless bootup loop, any ideas? - SpamCan61 {P}
I notice there is a newer BIOS version available on the Dell support site, I might try that but at the moment It's not particularly broken so I'd better not try any more fixing.
Dimension 3000 in endless bootup loop, any ideas? - jbif
used an old Dell XP home backup disk, after 3 attempts machine finally installed Windows properly. Did SP2 as one 257 meg download >>


Why SP2? SP3 was released in May 2008.

You may be able to make a new integrated SP3 CD from your backup disk for future use:
www.theeldergeek.com/slipstreamed_xpsp3_cd.htm

Dimension 3000 in endless bootup loop, any ideas? - SpamCan61 {P}
I'm not sure why I didn't go straight to SP3 really, that's probably what the 57 updates it did this morning are. I might well have a bash at slipstreaming in case I break it again.
One for the software engineers - Rattle
I have a bit of problem I am writing a simple computer game in C# which is similar to lemondade tycoon but more complicated and with more playability. It is purely for fun and also so I can relearn programming.

I thought I had been doing well writing lots of neat methods and such but now I have come across a simple snag.

I need to generate random numbers and well they are not random. I have simplified this code for the purpose simplicity, this code simply generates a random value of sales given certain variables.

if (price[0] > 2.70 && year < 3)
{
//own brand larger beer sales
int returnValue = RandomNumber(45, 105);
sold[0] = returnValue;
//country ale

returnValue = RandomNumber(35, 85);
sold[1] = returnValue;

//standard bitter
returnValue = RandomNumber(45, 105);
sold[2] = returnValue;

}

.*********

I have declared the random number at the top of the form class namespace as follows

private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
}

Does anybody know how I can make this more reliable? I know there are a few software engineers on here.

I was thinking of perhaps writing a method which counts down the seconds since a certain date, then trim the last two digits and add them onto the random number generator output but it seems really long winding and messy.

Any better ideas?

I seem to have some how triggered the swear filter and didn't save what I wrote. Basicaly the numbers generated are not random sometimes upon execution they are identical other times may be -10 or +10.

I think I need to join a programming forum :( I posterd here because I know there are some software engineers on here.

Edited by Rattle on 05/01/2010 at 23:53

One for the software engineers - Rattle
To explain the above in a nice simple way price[0] and price[2] always come back with the same value given or take +10 or -10

E.g excution 1

100
90

second time

84
74

Third time

63
83

etc.

PS my code was nealty formated but the site formated it, wonder if this works

[code]
if (test=false)
{
arh();
}
[/code]

Edited by Rattle on 05/01/2010 at 23:58

One for the software engineers - Rattle
May just write a method to count the seconds from 60 then trim the last digit to get 0 to 9 and add it onto the random output, that should solve it but its messy
One for the software engineers - maz64
Rattle - a (pseudo-)random number generator uses a formula (can be quite simple) to generate s fixed sequence of numbers from a given starting value or seed. You can specify the seed using new Random(seed), but if you don't, I think the system generates one somehow, perhaps using the current date/time.

(I'm C rather than C#, but I looked at this:
articles.techrepublic.com.com/5100-10878_11-566328...l
)

So I think that's why the numbers you get each time are different, but similar, if you see what I mean. Try specifying a seed eg. 0 and see if the sequence is the same each time.

In C the standard random number generator isn't very random, and there are better functions available - Google appears to imply it's the same for C#.
One for the software engineers - maz64
Thinking about it....

The problem I think is that because you create the Random object inside the RandomNumber function, the function always returns the 1st value in the sequence, ie. the seed, or perhaps the generator function applied to the seed. So if the seed is based on the current time, then successive calls will result in similar values eg. the time between calls in milli- or micro-seconds, or clock ticks?

If you put an empty loop between the calls to take up a bit of time, does the difference between values increase?

I think (as a C programmer) that the Random object should be outside the RandomNumber function, so that the seed is only set once, implicitly or explicitly. Then the values should look more 'random'.
One for the software engineers - maz64
Anyway, instead of just writing games, why not do something useful, and break a record at the same time:
news.bbc.co.uk/1/hi/technology/8442255.stm
:-)
One for the software engineers - Rattle
This is very odd, the first block of IF statements do work the number is random, but the second block the random number is just the previous number +10 or 10. I have tried all sorts of the above and the same get the same output. This is not a scientific project, it is not controlling planes so I will write something to hide the fact from the user.

The random number element is only a small part of the gameplay which effects the actual sales.

As for the world record I would not know where to start, I am not a software engineer just a bored bedroom coder trying to recapture some long lost youth! I would not be even capable of doing such a thing, maths is not my strong point.
One for the software engineers - maz64
I have tried all sorts of the above and the same get the same
output.


Have you tried making the Random variable a global (or whatever it's called in C#) rather than local to the RandomNumber function?

Edited by Focus {P} on 06/01/2010 at 12:42

One for the software engineers - maz64
Morning Rattle - I've just downloaded the C#-for-linux Mono package onto my linux-only laptop; any chance you could email me the relevant files, if you don't mind (address in my profile)? I'm intrigued.

But don't worry if you've moved on.

Cheers
F
One for the software engineers - Rattle
Thanks will do, my commenting is a mess though and as I am not a software engineer there will be a lot of 'oh no!' why have I done that things.

The I am using Visual Studio Express, not sure if I should sent the entire project (which has lots of files) or just the source code which you will not be able to run but at least make sense off. There is also lots of incomplete bits of code so it won't make much sense at this point.

I am off out now to a job, customer is picking me up but when I get back I iwll comment the code a bit better and send it you. I will comment the bit where its going wrong because it sort of works, the first block the random number does work, the second block it is -10 or + 10.

Edited by Dynamic Dave on 07/01/2010 at 18:53

One for the software engineers - TheOilBurner
Thanks will do my commenting is a mess though and as I am not a
software engineer there will be a lot of lot of 'oh no!' why have I done that things.


I can tell you're not a software engineer Rattle, you're using comments! ;)

Everybody says we should always use them, and yet it seems everybody forgets...

Edited by Webmaster on 08/01/2010 at 01:16

One for the software engineers - maz64
I can tell you're not a software engineer Rattle you're using comments! ;)
Everybody says we should always use them and yet it seems everybody forgets...


Speak for yourself! :-)
One for the software engineers - Rattle
I learnt that the hard way, my final year project was to develop a site which would allow a visitor to choose their own PC by selecting all the components. An admin member just added the parts to a MySQL database and then the user would just select their choice. The program then checked it was all compatable. Fairly simple but you can imagine on an ASP.NET project the amount of code, I didn't comment and first and soon got lost in my own code.

So I always comment because it makes things easier to understand, otherwise I forget why I have used that logic or think that is just repative code and end up deleting an important method.

Sending the source code now :)
One for the software engineers - maz64
Sending the source code now :)


Received with thanks, and I'll try to look at it tomorrow.

BTW I emailed a reply, but got an immediate:

Delivery to the following recipient failed permanently: rattles@address
Technical details of permanent failure:
DNS Error: Domain name not found
One for the software engineers - Rattle
Very odd, I just tested it seemed to be working fine. What time did it go out?

Been having a few odd problems with my email at the moment will move to a different host when it expires next week.

I have a feeling my host may be on certain ISPs block lists because I have also sent out a couple of emails which people have not recieved and I know its not a problem at my end.

When investigating I found my host also hosts adult sites so that may be the route of the problem. I have a different host for my email and website but will probably just change the email to my websites provider.
One for the software engineers - Rattle
Fixed it now, I changed my email client yesterday and made a very very stupid mistake, my reply email address was wrong hence when you clicked reply it was a slightly different address to the one I sent you.

This is very very emberassing for me as you can imagine.

Operating computers and pain killers don't mix :( I think it is the effects of typing with one hand too. OK I feel very emberassed.

Edited by Rattle on 07/01/2010 at 23:12

One for the software engineers - maz64
:-) no problem
One for the software engineers - maz64
The I am using Visual Studio Express not sure if I should sent the entire
project (which has lots of files) or just the source code which you will not
be able to run but at least make sense off.


The latter would be fine (I think), cheers.
A Little Windows 7 Goodie - geoff1248
Those of you wanting to have a little more control over your Windows 7 settings try Googling "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}". For those who may prefer another religion it can equally be names BuddaMode, IslamMode, et al. GodMode was the name Microsoft gave this facility while developing Win 7; it is the {ED7BA470-8E54-465E-825C-99712043E01C} that is the important bit.
It also works on Vista but only the 32 bit version so far as I know.
A Little Windows 7 Goodie - JH
It will;

"Make a new folder on the desktop called "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}". The name doesn't matter, just the extension.
Not a big deal, but pretty much all configuration can be done here instead of going through the layers of control panel."

and I was hoping to end world famine. :-( And make it a bit warmer. And get a winning lottery ticket. Maybe cure the ache in my left knee. Hmm, what new car would it be, something suitably omnipotent...

JH
A Little Windows 7 Goodie - Rattle
I've used it a few times, it is very useful because it puts everyting into one place.
Cheapest source for a new PC? - Robin Reliant
I just want a box, Win 7 would be nice but XP would be aceptable, definately not Vista. Anyone know a good online retailer knocking them out at basement prices?

Ta for any info.
Cheapest source for a new PC? - Rattle
What does it need to do? If you want a basic email box then this is a bargain

www.microdirect.co.uk/Home/Product/43940/Medion-E2...B

That will be perfect for basic emai/office/word processing.

This is not a bad spec but you need to spend £85 on a monitor too

tinyurl.com/yhekx3f

Edited by Rattle on 09/01/2010 at 13:21

Cheapest source for a new PC? - Altea Ego
Oh dear no - its a 1.8g Atom.

Useless....


Dell starts at 299 inc vat and shipping and thats for a 2.7g Dual core pentium.
Cheapest source for a new PC? - Rattle
It depends what you want to use it for. Some people only ever use email and print some word processing jobs. Hoever I wonder if HJ would work on an Atom - probably not!!

The buget Dell's are very good providing you don't have all the extras. I repair a lot of hard drives on Dell's but I think its purely because of the amount of Dell's about.

I would say HP/Compaq seem to be the most reliable I rarely need to do hardware repairs on them but then there might not a huge amount about compared with Dell.

I am not knocking home made machines, all our systems in this house I have built but I have spent a lot on the power supplies and used decent RAM.
Cheapest source for a new PC? - Stuartli
BigPockets offers a number of low cost systems:

www.bigpockets.co.uk/cat.php?search=PCs+%26+Laptop...7


Cheapest source for a new PC? - Rattle
I tend to avice people against the firms which build PCs up now, too many nasties inside them such as cheap power supplies. There is always a big difference in the build quality of the big names and the cheap budget box. I used to build them many years ago in my first job and was quite digusted at the quality.

That said if its just a budget box and its not critical then it might be ok, I have a cheap PSU in my spare PC at the moment but I can't trust it until I least get a basic FSP in there.

Just replaced far too many blown power supplies in the past four years and hardly ever on the big name PCs, its always the budget system builders ones.

Edited by Rattle on 09/01/2010 at 13:31

Cheapest source for a new PC? - Stuartli
Rattle, if you are referring to BigPockets, have you actually scrolled down the full page?

Another way would probably be a BareBones system.

Edited by Stuartli on 09/01/2010 at 13:40

Cheapest source for a new PC? - Rattle
Yep they have some good branded stuff on there further down. Those desktop Dell's are very good.

My post was really to say to avoid most own brands unless you know what made of RAM and PSU you are getting. Hard drives will all be the same anyway really all HD manufacutrers are having problems.

And certainly avoid them from some computer shops, seen a lot coming with pirated versions of Windows too, not sure if that practice is still common though.

Cheapest source for a new PC? - Stuartli
>>all HD manufacutrers are having problems. >>

Not been my experience..:-)
Cheapest source for a new PC? - Altea Ego
bought 12 in the last 12 months, sizes between 500gb and 1Tb. All have been fine.

Not had any issues with drives since IBM stopped making Deathstars. (mind I still wont touch an Hitachi drive)


Cheapest source for a new PC? - Stuartli
Some years ago IBM hard drives were proving very unreliable, as AE suggests (before, IIRC, the link up with Hitachi).

Personal preference is for Western Digital and Seagate, but have had various brands over the past 14 or 15 years.

Edited by Stuartli on 09/01/2010 at 16:36

Cheapest source for a new PC? - smokie
Some Seagates had a problem a year or so back - I know cos I had one! - but generally reliability is good across the board. Occasionally a manufacturing defect can hit a whole batch (i.e. many thousands) of drives and, if not noticed, these are installed in systems. I was involved with a Dell recall some years back for corporates who had bought their laptops - we held "clinics" for their users to have their drives swapped - hundreds of them!

btw I may have mentioned, but it is perceived by some that Dell quality is lower since the manufacturing was moved to Eastern Europe...