Wikipedia:Reference desk/Archives/Computing/2010 March 8
Computing desk | ||
---|---|---|
< March 7 | << Feb | March | Apr >> | March 9 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
March 8
[edit]Problems Downloading with Firefox
[edit]I use Firefox 3.5.8 as my main browser. The speed is great and I love the customization, but I can't download any files. When I click on a download link, it prompts me to ask whether to save the file or open it. When I select one of either of those options, it does nothing. This has forced me to use IE7 to make all downloads. Is this a common problem? MMS2013 01:47, 8 March 2010 (UTC)
- Enough that there are pages dedicated to the issue, such as this and more from this google search. --Tagishsimon (talk) 01:50, 8 March 2010 (UTC)
- Unrelated im sure, but a while ago i had a downloading problem, i could download things, but when i tried to open the things from the download window in Firefox it just asked me how i would like to open the file. Quite annoying. The only fix that i could find was to reinstall Ubuntu. – Elliott(Talk|Cont) 02:05, 8 March 2010 (UTC)
Properties
[edit]I'm trying to copy an Avast! installation file onto a CD. Windows Vista Home Premium says that "properties" can't be copied. Is that something I need for installing on another PC? Clarityfiend (talk) 03:35, 8 March 2010 (UTC)
- I cant see why Vista would tell you that. But i dont think it will stop you from installing it on another computer form the CD. If you have a few extra blank CDs i say burn it, and try to to use it. – Elliott(Talk|Cont) 04:29, 8 March 2010 (UTC)
- After a little digging i found this form that has some information on your problem. – Elliott(Talk|Cont) 06:02, 8 March 2010 (UTC)
- Thanks. It didn't give me that message when I tried again. I guess it must have copied the file already without me noticing it and thought I was trying to overwrite it. Clarityfiend (talk) 00:18, 9 March 2010 (UTC)
- It's because there are NTFS Alternate data streams associated with the file, and CDs don't use NTFS. 99% of the time, this just means that you downloaded the file from the internet, so Vista marked the file as originating in the "internet" zone, and thus untrustworthy. You can read more about it here. Indeterminate (talk) 02:08, 9 March 2010 (UTC)
Rewriting this for-each loop
[edit]How would you rewrite this code so as to not use the ":" on line 4?
public String toString()
{
String cardString = "";
for (PlayingCard c : list)
{
cardString = cardString + c + "\n";
}
}
198.188.150.134 (talk) 07:43, 8 March 2010 (UTC)
- Is this Java? The old-fashioned way to do that is to use an iterator. See [1] for some comparisons between for-each loops and loops with iterators. —Bkell (talk) 07:56, 8 March 2010 (UTC)
- Yep, this is Java. Could you show me the code on how you would write this with iterators? 198.188.150.134 (talk) 08:08, 8 March 2010 (UTC)
- Not directly—this sounds too much like a homework question. If the link I gave wasn't enough to give you a start, essentially the idea is that you should be able to get an iterator from your list by using the .iterator() method. Then you just write a regular old for loop (or a while loop) using the iterator's .hasNext() method as the loop condition and the iterator's .next() method to get the next item in the list. —Bkell (talk) 08:18, 8 March 2010 (UTC)
Okay then, would you mind telling me if this is correct?
public String toString() {
String cardString = "";
for (Iterator<PlayingCard> it = this.list.iterator(); it.hasNext(); /**/) {
PlayingCard c = it.next();
cardString = cardString + c + "\n";
}
}
198.188.150.134 (talk) 08:51, 8 March 2010 (UTC)
- Try it and see, doing so will tell you in less than 5 mins if it works or not.Taemyr (talk) 11:44, 8 March 2010 (UTC)
- If the reason you can't use for-each loops is that you are not using Java 5, then you won't be able to use generics either. --Spoon! (talk) 22:24, 9 March 2010 (UTC)
- Why not use a regular for loop: for(declaration; condition; increment)? Here's a hint: use List's size() method, and it's a lot less complicated than dealing with Iterators. Or is that not what you're looking for since it's technically not a "for-each" loop?--el Aprel (facta-facienda) 19:39, 10 March 2010 (UTC)
Recovery
[edit]My hard drive failed and it has important data on it. Is there any way to recover the files on it? The drive won't start up at all —Preceding unsigned comment added by Sandcastle41 (talk • contribs) 09:04, 8 March 2010 (UTC)
- Send it to IBAS? --Andreas Rejbrand (talk) 13:22, 8 March 2010 (UTC)
- Are you sure that the drive itself has failed, as opposed to the power supply wires to it, etc. ? Did it make any sounds before it stopped working ? Have you tried it in another computer ? You might want to try this before spending money for recovery. StuRat (talk) 16:37, 8 March 2010 (UTC)
Typography Questions...
[edit]Hi,
I was wondering if anyone here knew of a 'free' (GNU Sense) fonts whose metrics and look were broadly the same as either:
- Arial Black - ( The intention being to tweak the font so that I can use it as an alternative to 'Rail Alphabet' the official version of which is only available as a commercial font.)
- Gill Sans
- New Johnston
I'd also appreciate someone providing a link to a page on how to design fonts ( Fontforge tutorials are OK).
Sfan00 IMG (talk) 11:47, 8 March 2010 (UTC)
- i googled your question and found this web site.—Preceding unsigned comment added by 76.20.35.236 (talk • contribs) 01:50, 9 March 2010 (UTC)
temperature
[edit]What is the maximum room temperature a normal computer can work in? —Preceding unsigned comment added by Homac346 (talk • contribs) 11:50, 8 March 2010 (UTC)
- This is a particularly hard question to answer as there are many things in a computer that can fail at different temperatures, depending on your systems setup. I supose the easest way to answer this would be to just look at the CPU. This website has a chart of CPUs and their standard operating temperatures. This site has an answer, but does not cite a source. This site aslo has a chart for you to look at. This site also has some information on operating temperatures. For more reading, have a look at this, this, and this google searches. i hope this helped. —Preceding unsigned comment added by E smith2000 (talk • contribs)
- A "normal computer" has a thermal cutoff that will first sound an alarm when it gets hot and then turn off the computer when it gets too hot. So, the thermal cutoff is the limit for how hot will "work". -- kainaw™ 15:18, 8 March 2010 (UTC)
- An interesting feature of modern CPUs is that some of them throttle themselves downward in speed if they get hot, in order to consume less power and therefore cool down. See Dynamic frequency scaling. Comet Tuttle (talk) 17:37, 8 March 2010 (UTC)
regular expression help
[edit]i'm trying to turn a line looking like this, brackets are just for display, ( 1 005301.93 +002042.9 ) into this ( 1 00 53 01.93 +00 20 42.9 ) ie split the long number into 2 digit pairs, except for 2 digits before and after the decimal which should stay the same. I'm always guaranteed that the line is in format "single digit space 6digits decimal 2digits space plus or minus sign 6 digits decimal 1 digit". I've been trying stuff along the lines [^.]\d\d[^.] to match 2 digits that dont have a . either side, but it goes between matching 2 digits and matching 3 digit chunks. I'm using this in the replace tool inside kate where i then replace the match with "\0 " ie put the string back in with a space after it. Can anyone help with a better search regular expression? Thanks--137.205.124.72 (talk) 18:03, 8 March 2010 (UTC)
- If the format is always exactly as you say, match the entire thing. Depending on your exact version of regex, it will look something like: (\d)\s(\d\d)(\d\d)(\d\d)\.(\d\d)\s(.\d\d)(\d\d)(\d\d)\.(\d). Then, each parenthesis becomes something you can replace with: \1 \2 \3 \4.\5 \6 \7 \8.\9. -- kainaw™ 18:12, 8 March 2010 (UTC)
- (edit conflict) So, you're re-formatting a catalog of right ascension and declination, huh? I'm not familiar with the tool you're using, but in Perl, I would do something like this untested replacement:
s/^(\d+) (\d\d)(\d\d)(\d\d\.\d\d) ([-+]\d\d)(\d\d)(\d\d\.\d)/$1 $2 $3 $4 $5 $6 $7/g
- Although, honestly, I would probably split the parsing and re-printing into two steps, for clarity. -- Coneslayer (talk) 18:14, 8 March 2010 (UTC)
MS Word track changes disabled
[edit]I have a document created in OpenOffice writer. It was saved in Word 97/XP format. I opened it in Word 2007. I did the convert to bring the document up to the latest version of Word. I checked the protection and the document is not protected in any way. I tried to turn on "track changes", but it is disabled. Any clues why? -- kainaw™ 18:05, 8 March 2010 (UTC)
- You're not the only one, although that thread is no use. Have you tried re-saving the file in Word as 2003 or 2007, and then re-opening it? -- Coneslayer (talk) 18:50, 8 March 2010 (UTC)
Update vs. Upgrade
[edit]can someone please explain me the difference between Update and Upgrade? —Preceding unsigned comment added by 119.153.17.254 (talk) 18:21, 8 March 2010 (UTC)
- Usually an "update" is smaller and free, whereas an "upgrade" means you get more features and functionality, and you probably have to pay. When Adobe Photoshop goes from version 3.0 to 3.0.1, it's a bunch of bug fixes and small tweaks; this is called an "update". When it goes from 3.0 to 4.0, there are some major feature enhancements; this is called an "upgrade". We have articles on software update and the rather general upgrade. Comet Tuttle (talk) 18:27, 8 March 2010 (UTC)
- Some terminology for what Comet Tuttle is explaining... 3.0, 3.0.1, 3.1, 3.2.. are all referred to as "minor versions". Technically, it is the same version - just with fixes. 3.0 to 4.0 is a major version. There was something big in the change from version 3 to version 4. When someone says a program is a different version, they usually mean "major version", not "minor version". So, Comet Tuttle is saying that updating takes you from one minor version to another minor version. Upgrading takes you from one major version to another major version. -- kainaw™ 18:32, 8 March 2010 (UTC)
- Kainaw has crystallized my thoughts, eloquently. Comet Tuttle (talk) 18:45, 8 March 2010 (UTC)
- Yes, but it is not entirely that simple. For instance, Windows 2000 and Windows XP are two completely different operating systems. Yet their version numbers are 5.0 and 5.1, respectively. In addition, often version numbers have the four-element form Major.Minor.Release.Build. --Andreas Rejbrand (talk) 21:14, 8 March 2010 (UTC)
- Correct. It can be very complicated. I don't know if anyone is still using this minor version method, but back when I worked on some Amiga programs, the minor version numbers simply incremented such that version 3.12 was a much later version that version 3.4 because it was read as "Version 3 revision 12" and "Version 3 revision 4". Someone else (Knuth?) used prime numbers for major versions and non-primes for minor versions. So, version 4 was a minor version between major versions 3 and 5. -- kainaw™ 23:16, 8 March 2010 (UTC)
- Maybe they died because people got sick of waiting for the major version between 23 and 29? When it comes to Windows while Microsoft is not entirely consistent, they do generally follow the major version/minor version trend. Windows XP while a different OS is generally considered only a relatively minor change from Windows 2k. Similarly Windows 7 from Windows Vista. Windows 2k however was a major change from Windows NT 4 which was a major change from Windows NT 3.5. And similarly Windows 7 & Vista a major change from the 2k/XP/2k3 line. Nil Einne (talk) 13:45, 9 March 2010 (UTC)
- Correct. It can be very complicated. I don't know if anyone is still using this minor version method, but back when I worked on some Amiga programs, the minor version numbers simply incremented such that version 3.12 was a much later version that version 3.4 because it was read as "Version 3 revision 12" and "Version 3 revision 4". Someone else (Knuth?) used prime numbers for major versions and non-primes for minor versions. So, version 4 was a minor version between major versions 3 and 5. -- kainaw™ 23:16, 8 March 2010 (UTC)
- (edit conflict) Different people or companies may use the words to mean different things, but for something like Microsoft Windows, I would use "update" to mean bugfixes and security fixes for a particular version of Windows, like you would get through Windows Update. I would use "upgrade" to mean upgrading to a new version of Windows, like from Windows Vista to Windows 7. -- Coneslayer (talk) 18:29, 8 March 2010 (UTC)
Installing Linux when Windows won't do anything more than Safe Mode
[edit]My computer seems to only operate on safe mode right now, I can't get it to log in otherwise, despite System Restore attempts.
While I try and figure out how to fix Windows, I thought I'd try a Linux distribution of some sort. Is there a way to install Linux (preferably Ubuntu) or maybe PC-BSD, when I can't access Windows. I've only found ways of having the OS operate from a CD or USB, but I want it actually on the hard drive. -- Zanimum (talk) 18:34, 8 March 2010 (UTC)
(I'm wanting the end result to be a dual boot.) -- Zanimum (talk) 18:35, 8 March 2010 (UTC)
- Easy. Put the Linux install disk on DVD or CD and boot from the install disk. It doesn't use Windows for the install in any way. -- kainaw™ 18:39, 8 March 2010 (UTC)
- Sorry, I forgot a key element of my problem. My laptop CD drive konked a while back. Is there any sort of USB key equivilent of the ISO? -- Zanimum (talk) 18:47, 8 March 2010 (UTC)
- Looks like it can be done, though it requires some muckery to prepare the USB key: [2]. I assume that you need a USB key that's larger than the ~700MB ISO image. Paul Stansifer 18:56, 8 March 2010 (UTC)
- I had assumed that was only if you want to run the OS from the stick, not if you want to install to the hard drive from the stick. Which I suppose is better than my current OS-less state. I guess I'll give that method a try. -- Zanimum (talk) 18:59, 8 March 2010 (UTC)
- Of course you have to have a laptop which is able to boot from a USB-stick!
(I once wasted a lot of time trying to find out how to put an iso on a USB-stick and then install kubuntu from stick to hard drive, only to (finally) find out that the laptop was completely unable to boot from USB-flash-disks... ;-(
--Seren-dipper (talk) 20:05, 8 March 2010 (UTC)- Clarification: I guess it is not a problem on newer computers but, a few years back, some pc's could only boot from harddisk, floppy disk or cd-rom, but not from USB-flash-disks.
--Seren-dipper (talk) 04:43, 9 March 2010 (UTC)
- Clarification: I guess it is not a problem on newer computers but, a few years back, some pc's could only boot from harddisk, floppy disk or cd-rom, but not from USB-flash-disks.
- If your USB key isn't large enough, you could try following the above instructions, but with this ISO: [3]. Though I'm not totally sure that I understand what you said. Paul Stansifer 03:07, 9 March 2010 (UTC)
- Of course you have to have a laptop which is able to boot from a USB-stick!