Wikipedia:Reference desk/Archives/Computing/2009 September 30

Computing desk
< September 29 << Aug | September | Oct >> October 1 >
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.


September 30

edit

Mindspark search engine

edit

There is a search engine called Mindspark that, uninvited, got onto the toolbar of our computer. We thought we got rid of it but it's back again.(But not on the toolbar.) Has anyone heard of this thing? Thanks.Rich (talk) 04:53, 30 September 2009 (UTC)[reply]

This suggests you run Malwarebytes' Anti-Malware. Clarityfiend (talk) 05:49, 30 September 2009 (UTC)[reply]
thanks. 04:17, 1 October 2009 (UTC)Rich (talk) 04:20, 1 October 2009 (UTC)[reply]

Quick C question

edit
/* Convert Fahrenheit to Celsius*/
#include <stdio.h>

int
main(void)
{
        double fahrenheit;
        double celsius;
        scanf("%lf", &fahrenheit);
        printf("The temperature in Fahrenheit is %.2f.\n",  fahrenheit);

        /* convert */
        celsius = 5 / 9 (fahrenheit - 32);

        /* display celsius */
        printf("The temperature in celsius is %.2f degrees.\n", celsius);

        return (0);
}

Why doesn't this work? My compiler says:
FtoC.c: In function âmainâ:
FtoC.c:13: error: called object â9â is not a function

which makes little since to me. What can be done to make this work? (I am an extreme newb at C) -- penubag  (talk) 06:51, 30 September 2009 (UTC)[reply]

You have to have an operator between the 9 and the parenthesis. Try "celsius = (5 / 9)*(fahrenheit - 32); and see if that works for you. Dismas|(talk) 07:03, 30 September 2009 (UTC)[reply]
Thanks it now compiles correctly! But unfortunately, when I execute it and input any number for Fahrenheit, the program always returns 0.00 degrees. What has to be done to fix this? -- penubag  (talk) 07:17, 30 September 2009 (UTC)[reply]
(5. / 9) *(fahrenheit - 32);. Because 5 and 9 both have type int, the result of 5/9 will always be zero (see integer division). Adding a "." will cause one of the literals to have type double, and the other will be implicitly converted to that type. decltype (talk) 07:34, 30 September 2009 (UTC)[reply]
Thank you very much, it works now! But one more question, why are Fahrenheit and Celsius ints? I told them to be doubles at the top? -- penubag  (talk) 07:43, 30 September 2009 (UTC)[reply]
They're not. But 5 and 9 are ints. --Spoon! (talk) 07:46, 30 September 2009 (UTC)[reply]
Yes. It is the types of the operands that determine the type of the result. Consider the expression:
 double d = 1 / 2;
Because 1 and 2 both have type int, the result of the division will also have type int. The result is the algebraic quotient with any fractional part discarded, yielding 0. Then, d is initialized with the value 0 converted to double. That is, the conversion to double happens after the expression (1/2) has been evaluated. decltype (talk) 08:06, 30 September 2009 (UTC)[reply]
I always teach first year C/C++ students that math expressions are right-to-left and boolean expressions are left-to-right. So, the example of
double d=1/2;
makes sense if you realize it goes right to left. You get a ;, so you know it is a statement. You get a 2. That's an int. You get a /. Division. Cool. You get a 1. You can do the division now. That is 1/2, which is zero (int division). You get a =. You need to assign the zero to something. You get a d. It is a variable. You get the double. You need to turn the int 0 into a double. No problem. You put 0.0 in d. So, while this "right-to-left" rule is not exactly true, you can (hopefully) see why it is beneficial for first year programmers who are trying to understand how things work. In the next year, I divulge more about how things really work because they should be past parsing math and boolean expressions. -- kainaw 12:37, 30 September 2009 (UTC)[reply]
Ohhhhh, I get it now! The compiler reads right to left. That makes much more since to me now. Thanks kainaw -- penubag  (talk) 17:36, 30 September 2009 (UTC)[reply]
YIKES!!! No, no, no! The compiler does not read from right to left - or left to right for that matter. (Sheesh! Baaad advice, Kainaw!) It uses the rules of precedence - just like in regular math. So divisions and multiplications happen before additions and subtractions - which happen before assignment. Somewhere in that book of yours, there is almost certainly a table listing the order that things happen in. The compiler actually says something like (at the beginning of the line) "I expect to see either a statement or a close bracket ('}') next...which is it? Well, no bracket - so it's a statement. Does the statement start with a name (in which case this is an assignment statement or a function call) or is it a reserved word of the language? Yep - it's the reserved word "double". Is that a type description or something like 'for', 'switch', 'while', 'do' or 'if' ? No - it's a type description. OK - so this is a declaration. What is being declared? Well, that's "d" and now we know it's a 'double'. OK - so now, we could either have a comma and another declaration - or a square bracket indicating that this is some kind of array - or an equals sign meaning that this is an initialised variable...and it's an '=' so this is an initialised variable. OK - so what is the initial value? It has to be an expression - so let's fire up the expression parser. The expression parser, figures out the math of an expression - then we look for either a comma (indicating that another variable is being declared - or a semicolon. It's a semicolon - so the statement is complete and we can go back to the beginning again."...Expression handling is hard to explain in words - but it does things in the order that they are done in elementary algebra or arithmetic. It's easy to find cases where it most certainly doesn't think right-to-left (eg x = 1 / 2 + 3 ;) and cases when it does (eg x = 1 + 2 / 3 ;) - as well as cases where it starts in the middle (eg x = 1 + 2 + 3 + 4 * 5 + 6 + 7 + 8 ;)...it's just not as simple as Kainaw says. SteveBaker (talk) 04:12, 2 October 2009 (UTC)[reply]
Then, what does x=y=z=5; produce? Order of precedence is only half of parsing mathematical equations. By telling someone that that is ALL there is to it, you are short-changing them. They'll hit this example and no clue what to do. If they were taught that math is right-to-left, they will understand this easily. Teaching is based on what confuses students. You start out with a simple foundation and build upon it. I find that many (if not most) programmers feel that the best way to teach is to cram as much complicated garbage down the throats of the students as possible and then laugh at them when they get confused. -- kainaw 17:16, 2 October 2009 (UTC)[reply]
You're right that in the event of equal precedence, the order on the line matters - but it's not the first thing to care about...and it's most certainly not a good rule to impart to a complete newbie! Read what you told our OP - and how (s)he leapt on it as making things so much simpler to understand! That's because it's not true. I agree that it's a part of the answer - and I'm sure you're aware of what the true answer is - but what you actually wrote was grossly incorrect!! The simplest and clearest way to explain it is that the compiler obeys the normal rules of arithmetic/algebra - but in difficult cases, and situations where you use operators that aren't in 'normal' mathematics, you need to read what the book says VERY carefully because there isn't one simple rule. When in doubt (and for clarity, even when you aren't in doubt), over-bracket. I don't want to have to remember what this means:
           x = a & b + c << d ^ e % f * (int) g+++++h ? -i-----j***k : l ;
Even if I do know - I'm going to bracket the shit out of that expression so that the next guy (or me, a week from now) will know what order it's going to be evaluated in. But for absolute 100% certain - it ain't anything close to "right to left" - which is what your post said! SteveBaker (talk) 15:47, 3 October 2009 (UTC)[reply]
In C, if you write a number without a decimal point, the compiler treats it as an integer. While it's evaluating math, it's lazy. If it sees an integer divided by another integer - it does integer math. So 5/9 is zero. When you subtract 32 from the Fahrenheit number, the compiler sees that although 32 is an integer, 'fahrenheit' is a double - so it knows to do that using double precision math - so it converts 32 to 32.0 and does the subtraction. Finally, it has to multply the result of 5/9 (which is the integer: zero) by the result of (fahrenheit-32.0). It sees that because one of the numbers is a double that it has to do the math in double precision - so it converts the zero to 0.0 and does the sum. Putting the decimal point in there tells the compiler that these are double-precision numbers - so it's forced to do all of the math in double precision.
In nicely written C code, all of the numbers in that expression ought to have decimal points because it's quite a lot of work for the computer to convert an integer into a double - so all of the constants (including 32) should be given as double's - even when (as in the case of the 32) it would have come out right. In general, it's awfully easy to screw up when you mix integers with floats or doubles - so it's safest to always use '.0' on the end of numbers used in expressions where you expect to get a float or double as a result. Also, it's bad form to write 5./9. (even though that's perfectly legal) because the '.' is kinda invisible to people reading your code - so to be super-professional, you should write 5.0/9.0 which really emphasises that you remembered to put that decimal point in there.
The art of good programming is not only to keep the computer and the compiler happy - but also to make things super-clear to other people who have to read your code. (And 'other people' includes you - a couple of weeks into the future when you have to read and re-understand your own software!)
SteveBaker (talk) 12:39, 30 September 2009 (UTC)[reply]
Thanks for further explaining the point, my C book did not mention this process at all. I'll be sure to do this in the future. -- penubag  (talk) 17:36, 30 September 2009 (UTC)[reply]
That's good advice for another reason too, you'll avoid having to convince your co-worker / instructor that (5./9) really is correct, portable, and guaranteed to produce the "right" result (although that may have a net positive effect in the long run). Regards, decltype (talk) 12:57, 30 September 2009 (UTC)[reply]
Not to veer into style and "best practices" too much, but ... in my experience 5.0, 9.0 (or maybe 5.0/9.0) and 32.0 should all be constants. If you declare them as const doubles, then there's less confusion about what decision the compiler is making for you. Constants also can make life simpler when programs have to be changed - suppose this was a larger program with calculations like this scattered throughout and that the value at which water freezes on the Fahrenheit scale changes in the future (not likely, but bear with me); you could search for every occurence of "32" in your source code and hope you change all the right ones, or you could change the declaration of "FahrenheitFreezingPoint" once. --LarryMac | Talk 13:19, 30 September 2009 (UTC)[reply]
Writing clear code is an art. Hard-and-fast rules are usually a bad idea. What we must strive for is a mind-set where readability is on the top of everyone's minds. So, in general, I agree that obscure constants should be named (either with a 'const' or a '#define' or whatever your programming language allows). However, in this specific case, I think that would do more harm than good. What could you possibly name them that would carry more meaning? Almost everyone knows that 5/9 x F - 32 is the equation to convert F to C. And replacing those numbers with names like 'const double five = 5.0 ;' doesn't add anything. You could perhaps name (5.0/9.0) as "FahrenheitToCentigradeMultiplier" and 32.0 as "FahrenheitToCentigradeOffset" or something - but if I'm trying to find a bug in this code, that's only going to annoy the heck out of me because now I have to hunt back up the source code - possibly through a bunch of header files in order to convince myself that you really gave those constants the correct value. Imagine how much harder this problem would have been for us to debug for our OP if (s)he had followed your advice! We might never have bothered to go find the definition of "FahrenheitToCentigradeMultiplier" - and just naturally assumed it was 5.0/9.0. As you explain - there is no way on earth those values will ever change! So in this specific case - I'd advise not moving the numbers off into 'const' variables or anything. Now - let's be really careful about that - I don't want to see 3.14159 written in there for 'pi' because the precise value has to be set up very carefully to get the best precision for float and double math - so you should be using something like 'M_PI' (the machine-specific value of PI for this hardware). Also, if you see the constant 16239 - you would doubtless prefer to see "STEVES_AGE_IN_DAYS_ON_JAN_1ST_2000". But in this case - I think the code is clearer with the numbers left precisely where they are. But better than that - in this case - I'd have liked to have seen:
   inline double FahrenheitToCentigrade ( double fahrenheit ) { return fahrenheit * 5.0 / 9.0 - 32.0 ; }
...and placed into "UnitConversions.h" someplace.
SteveBaker (talk) 03:51, 2 October 2009 (UTC)[reply]
Converting integer literals to doubles is not expensive, it's free, because it happens at compile time (even when optimizations are disabled). There's no reason to write them as doubles unless you think it helps clarity. Integer division doesn't happen because of laziness, but because it's a useful operation that's often what you want when you're dividing integers. (5.0 / 9.0) * x or x * (5.0 / 9.0) will compute 5.0/9.0 at compile time and do just a single multiplication at runtime. In contrast, x * 5.0 / 9.0 parenthesizes as (x * 5.0) / 9.0 and will most likely do a multiplication and a division at run time. There are circumstances where that might actually be better, because 5.0/9.0 is not exactly representable as a double while 5.0 and 9.0 both are. -- BenRG (talk) 00:33, 1 October 2009 (UTC)[reply]
You see - that's where things go off the rails. Where does it say in the C/C++ specification that this happens? It doesn't - you can't guarantee that. When you start writing sloppy code and saying "Oh - that's OK, the compiler will fix that." you're running into a slippery slope where you'll start to assume things that aren't true. There may well be some strange reason why the compiler can't - or doesn't fix it - and then you're screwed. Right now - you're code is being compiled - but who knows whether in 10 years time, there isn't some "just in time" compiler that has to compile your code at runtime or something? You can't know that - and you shouldn't assume it when it's just as easy to make your code "right by design". SteveBaker (talk) 03:51, 2 October 2009 (UTC)[reply]
On the other hand, your time is probably better spent making your code efficient on an algorithmic level, instead of this kind of micro-optimization. decltype (talk) 11:44, 2 October 2009 (UTC)[reply]
Finally, you can get rid of the weird characters in the error message by doing an "unset LC_CTYPE". --Sean 15:07, 30 September 2009 (UTC)[reply]
That did not seem to work. -- penubag  (talk) 17:36, 30 September 2009 (UTC)[reply]
Hrm. Try doing an "env | grep -i utf" and do an unset on anything mentioning utf8. This will probably make your greps and such 10 times faster, at the cost of not handling non-ASCII correctly. --Sean 21:33, 30 September 2009 (UTC)[reply]
Sorry I'm pretty much illiterate here. I tried typing "env | grep -i utf" and my compiler says "LANG=en_US.UTF-8". It still does not fix the issue but am I forgetting a step? -- penubag  (talk) 00:17, 1 October 2009 (UTC)[reply]
"unset LANG" might fix the messages. --Sean 16:57, 1 October 2009 (UTC)[reply]
Yup, it did. Thanks sean! Now my adventures in C should be a little easier. :)-- penubag  (talk) 00:47, 2 October 2009 (UTC)[reply]
OK, great. Just add that command to the bottom of ~/.bashrc or whatever to make it be in effect the next time you log in. --Sean 14:14, 2 October 2009 (UTC)[reply]
Wait, so I have to type "unset LANG ~/.bashrc" and this will become permanent? -- penubag  (talk) 05:57, 3 October 2009 (UTC)[reply]

One last question:

#include <stdio.h>

int
main(void)
{
        char color, O, o, B, b, Y, y, G, g;
        printf("Input the first letter of the color: \n");
        scanf("%c", &color);
        if (color = O || o ) {
                printf("The content is ammonia\n"); }
        if (color = B || b ) {
                printf("The content is carbon monoxide\n"); }
        if (color = Y || y) {
                printf("The content is hydrogen\n"); }
        if (color = G || g) {
                printf("The content is oxygen\n"); }
        else { printf("Invalid color type\n"); }

return (0);
}

This simple program is supposed to return chemical names for the first letter of its color. When given a letter, the program says all of them are the chemicals. How can I make it skip each if statement if it is not true?-- penubag  (talk) 17:44, 30 September 2009 (UTC)[reply]

Your if statements are saying something like "if (color = O)" or "if o". "if o" will always be true (as will "if b", etc). You need to have the complete comparison on each side of the ||. A couple other things to conside would be using either toupper() or tolower() on your input, and/or using a switch statement instead of the ifs. --LarryMac | Talk 17:55, 30 September 2009 (UTC)[reply]
I haven't read that far into my book yet and don't know the syntax for any advanced commands (or basic ones for that matter). The first 130 pages do not mention switches yet. -- penubag  (talk) 00:17, 1 October 2009 (UTC)[reply]
Also if(color = O) {foo;} doesn't compare color to O, it assigns color to the value of O. And the if statement gets the value of that assignment operation, which IIRC is equal to the value of O. You should use if(color==O) instead.
Finaly at no point do you initialize the characters you are comparing with. So even the above whould compare color to a variable with random content. Taemyr (talk) 18:02, 30 September 2009 (UTC)[reply]
Ahh, thanks, that makes since. -- penubag  (talk) 00:17, 1 October 2009 (UTC)[reply]
dammit. i've always had a mental block on = vs ==; reason 489 why I'm a system designer not a developer --LarryMac | Talk 18:05, 30 September 2009 (UTC)[reply]
About that, some coding guidelines recommend placing the constant-expression (if there is one) at the left hand side, so that the compiler will catch those errors. For example:
if('O' = color) return 0; /* ill-formed */
I don't like it one bit, but I can understand the arguments in favor of it. decltype (talk) 18:53, 30 September 2009 (UTC)[reply]
I've heard that said - and I agree that the compiler can help out - but it makes reading the code really tough. I don't do that. SteveBaker (talk) 03:51, 2 October 2009 (UTC)[reply]
Others have pointed out your grave errors (your program has undefined behaviour, and is likely to make demons fly out of your nose[1]). When you've fixed those, you should prefix all your ifs, except for the first, with "else" or use a switch. That way, your program won't test your color against "B", when it's already determined that the color is "O". decltype (talk) 18:48, 30 September 2009 (UTC)[reply]
Basically you should be writing
if ( (color == O) || (color == o) { etc...
This was mentioned above but no-one seemed to say it explicitly. The reasons are given above. It's also explained here [2] 83.100.251.196 (talk) 22:45, 30 September 2009 (UTC)[reply]
That did the trick! Thanks very much! I'm still having a little issue with the "else": even if I define a valid letter, the program reads the else statement and prints the invalid chemical message.-- penubag  (talk) 00:18, 1 October 2009 (UTC)[reply]
The "else" block is only paired with the previous "if" block. So in this case it fires when the color isn't 'G' or 'g'. If you want it to go off only when none of the previous conditionals are true then use "if", "else if", "else if", ... , "else". Rckrone (talk) 01:04, 1 October 2009 (UTC)[reply]
That worked! My book didn't seem to mention this at all. Thanks !-- penubag  (talk) 01:10, 1 October 2009 (UTC)[reply]
Some final advice: Nobody can teach anything more than the bare rudiments of programming. The only way to get good at it is to write LOTS of code. Do it all the time - not just for class assignments - make up your own problems. You have to love doing programming for it's own sake. Most really good programmers come home from a day of programming at work - and think "Wow - now I can get to work on my home project!"...and think of that as a way to unwind and relax. You have to arrive at a point where you're no longer thinking about the programming language details - but at the algorithmic level. That probably seems tough now that you're still being mystified about why putting a '.0' after a nice round number should matter - or when to use '==' instead of '=' - but that phase goes away after not too many weeks of working at it. Eventually, you should be able to trot off dozens to hundreds of simple code snippets without your conscious mind having to think about it. You shouldn't have to think through things like: "How do I make a hash-table of these objects so I can look them up quickly using their ASCII names - yet still be able to loop through them all quickly with a simple 'for' loop?" - that level of coding should be almost automatic - so it comes out right every time. That leaves your mind free to examine 'the big picture' - to think at the level of an algorithm designer rather than a coder. This takes years to achieve - but you can tell when people reach that level of zen-like comfort with the art because the rate at which they create bugs drops off dramatically and their productivity can easily be 50 times that of a person who is still wondering whether to use a 'while' loop or a 'for' loop or a 'do...while' each time they need to loop. So: practice, practice, practice - and if you find yourself hating it - find a job in a different industry. SteveBaker (talk) 03:51, 2 October 2009 (UTC)[reply]

Why is license agreement popping up every time I start Photoshop or other adobe programs???

edit

I got Adobe Web Premium CS4 Student Edition.

I used to serial I got from Adobe.

Everytime I start Photoshop, dreamwaver or another adobe program I have to accept the license agreement.


Why does it do that?? And how do I make it stop? —Preceding unsigned comment added by 217.74.217.62 (talk) 09:26, 30 September 2009 (UTC)[reply]

It seems like you may already have a solution, or at least the start of one. The Adobe forums are probably the best place to get advice on a problem like this; they have the highest concentration of experienced users and Adobe "pros". The corrupt/incomplete installation already mentioned there does seem the most likely solution. Having said that, searching adobe photoshop "license agreement" "every time" gives some promising results which might offer alternative fixes. --Kateshortforbob talk 13:37, 30 September 2009 (UTC)[reply]

Update script, part 2

edit

Continuing from my previous question, I'm trying to write a greasemonkey script that will refresh a page and load any new changes, but will automatically stop refreshing if it detects a 404 error (I don't want it to keep refreshing because then all I'll have is the 404 error). So far I've managed to come up with this

var numMinutes = 5;window.setTimeout("document.location.reload();", numMinutes*60*1000);

That refreshes the page. Now all I need is a way to automatically stop the script when it detects 404. Any suggestions on how to do this? Many thanks! —Preceding unsigned comment added by 82.44.54.133 (talk) 11:57, 30 September 2009 (UTC)[reply]

How about something like this (not tested)?
function my_reload() {
    GM_xmlhttpRequest({
        method: 'GET',
        url: window.location.href,
        onload: function(responseDetails) {
             if (responseDetails.status != 200)
            {
                 alert("request failed");
                 return;
            }
            document.innerHTML = responseDetails.responseText; // Wrong: see note below
        }
    });
}
Here are the AJAX details for GM. --Sean 15:20, 30 September 2009 (UTC)[reply]
Oh, I see you can't use document.innerHTML. Perhaps add an iframe, and replace its HTML with the new document. You could also just refresh the iframe or current page if the AJAX call works, of course, but that leaves a small race condition where the first call works and the second one doesn't, which might be acceptable for your application. --Sean 15:51, 30 September 2009 (UTC)[reply]

ln -s not supported

edit

Assume you have a program that requires ln -s. However, your Linux box mounts from a Windows NFS. Windows doesn't support symbolic links. Is there a common solution or do you have to fiddle around with tricking the system into thinking a local Linux drive is somehow mounted under the Windows drive to trick the program into running ln -s on the local Linux drive? -- kainaw 16:32, 30 September 2009 (UTC)[reply]

A Windows... NFS? Do you mean a Windows Shared Folder using Samba? or Do you mean NTFS? Can you clarify the following: What file-system is the symbolic link target on? How is that file-system seen or mounted by the local linux environment? What file system is the symbolic link intended to be on? Nimur (talk) 17:46, 30 September 2009 (UTC)[reply]
The system between the local Linux machine and the remote Windows machine is unknown. /home on the Linux is NFS mounted (not Samba) in some way to the Windows machine /nethome (or should that be N:\\). The goal is to place a symbolic link in home (which is technically on the Windows machine) to the local Linux drive in /tmp. The error is a simple "Operation is not supported". I suspected Samba, but sambaclient is not running and I can see the entry for the Windows drive in /etc/mtab. Is it possible to use mtab to mount through Samba without having a sambaclient running? If so, then my suspicion that the problem is with Samba would be verified. -- kainaw 17:53, 30 September 2009 (UTC)[reply]
Microsoft Windows Services for UNIX has a Windows hosted NFS server; this was more necessary in the past, when Samba's netbios/smb client wasn't so hot, than it is now. Perhaps this is what Kainaw's windows machine is running. Incidentally NTFS does support symlinks (well, kinda) - NTFS junction points - I'd guess it was the WS4U-NFSd that doesn't (junction points are a tad esoteric, really). -- Finlay McWalterTalk 18:38, 30 September 2009 (UTC)[reply]
The only way I can think to do something like this is with a UnionFS overlay. Do the following sudo /bin/mount -t unionfs -o dirs=/tmp/kainaw:/home/kainaw none /home/kainaw2 (where /tmp/kainaw and /home/kainaw2 are intially empty directories). Now you can create symlinks in /home/kainaw2 (including ones that overlay stuff already there) and the changes are infact stored in /tmp/kainaw and leave /home/kainaw untouched, but /home/kainaw2 looks like your homedir, but with the symlinks you wanted. If you really need the symlinks to be in /home/kainaw then you'll have to figure out how to make the automounter mount that directory somewhere else. -- Finlay McWalterTalk 18:30, 30 September 2009 (UTC)[reply]

Parallel ports and Linux kernel drivers

edit

The first part of my Commodore 64 games restoration project - install a PCI parallel port replicator - is now completed, and so far works without problems. Still waiting for the next two phases - attach the 1541 disk drive, and install the necessary driver software. So therefore I have questions:

  1. How "hot-pluggable" are parallel port devices? Am I in danger of damaging the adapter, or my computer, if I plug/unplug the 1541 while the computer is on? What if I keep it plugged in, but power it up/down while the computer is on?
  2. I have only seen OpenCBM being mentioned as a 32-bit Linux kernel driver. My computer has a 64-bit processor and 64-bit Fedora Linux. Will the driver still work? JIP | Talk 16:52, 30 September 2009 (UTC)[reply]
In general, the IEEE 1284 compliant devices are very hot-pluggable - though watch out for devices that use a common ground / common live voltage in "unconventional" ways (other than setting a reference - in theory, there should be buffer amplifiers if the 5-volt is used for anything, but some creative hardware designers might be drawing power over the interface!). On the PC side, as long as the driver is properly written, the worst that should happen is a data timeout or error; but I assume that you know this, since you are writing the driver. (Avoid blocking I/O calls in the hardware access code - Whatever you do, don't hang the whole computer on bad/missing data! ). Are you writing the C64 emulator driver or just planning to use the OpenCBM driver? Nimur (talk) 17:32, 30 September 2009 (UTC)[reply]
Commodore serial-488 ports are very sensitive to being connected when powered - I once blew two 1541s when daisy-chaining them with the power on; the PC's parallel port is fairly robust by comparison. -- Finlay McWalterTalk 17:35, 30 September 2009 (UTC)[reply]
Like many parallel-port devices, that hardware is probably not standards-compliant. Technically the hardware must accept any voltage between -15 and +15 volts relative to the common ground - and I doubt the PC was even supplying this. It sounds like something was leaking power onto the parallel port unintentionally - maybe daisy-chaining shorted a pin which was otherwise assumed to be floating, etc. Again, well-designed hardware should never explode when you plug it in backwards (etc). Nimur (talk) 17:40, 30 September 2009 (UTC)[reply]
Thanks for the reply. I should therefore be safe with keeping the 1541 plugged in but only powering it up when I'm using it. (The 1541 is notorious for getting quite warm when powered up, so I wouldn't want to leave it on all the time, as I do with modern hardware.) I'm going to use the OpenCBM driver, which I'll compile from the sources. I don't know nearly enough about Linux kernel programming to write my own driver. JIP | Talk 17:38, 30 September 2009 (UTC)[reply]
It's been a quarter of a century since I last had to do this, but if memory serves one always turned the 1541 on before the c=64, and off after it. -- Finlay McWalterTalk 17:47, 30 September 2009 (UTC)[reply]
With me, I usually did it the opposite way, and never had any problems. We'll have to see if the 1541 still works after nearly two decades of inactivity. JIP | Talk 17:56, 30 September 2009 (UTC)[reply]

Software To Find Out What's Hogging All The Space On My Disk.

edit

Is there anything for Windows Vista that does this (preferably free)? I'm noticing that my disk space is getting noticeably smaller each time more or less every day (60GB disappeared over the weekend!) and I'd like to find out what's going on. TIA! --KageTora - SPQW - (影虎) (talk) 19:00, 30 September 2009 (UTC)[reply]

I can't say for sure, but I'd assume at least one of the programs in this archived section should work with Vista. --LarryMac | Talk 19:04, 30 September 2009 (UTC)[reply]
OverDisk makes nice pie-charts. Nimur (talk) 19:15, 30 September 2009 (UTC)[reply]
As per LarryMac's archive link, let me re-iterate: forget every other suggestion you might get here about SequoiaView and WinDirStat etc. Just get FolderSize for Windows. It adds a "folder size" column straight into Windows Explorer so you never have to run a separate application just to check out your folder sizes. I'm using it on XP but I'm sure it works on Vista too. It just WORKS. You'll easily be able to see and clear out your space-hogging files in no time. Check it out. Zunaid 23:03, 30 September 2009 (UTC)[reply]
Personally, I find the SequoiaView-like applications much better. The problem isn't just listing folder sizes, it's being able to really see where the memory is being taken up. With a graphical display, you instantly know, "oh, crap, I have a much of MPEGs I forgot about." With FolderSize, you see that a folder (probably WINDOWS) is huge, and have to drill down a few more times to figure out what's going wrong. Anyway, different strokes, different folks, but I do think we can say that these two programs provide different functionality. --Mr.98 (talk) 01:04, 1 October 2009 (UTC)[reply]
I disagree with Zunaid, I recommend using a graphical tool. The best part of SequoiaViewe and WinderStat is that it allows you to see INSIDE your folders at a glance.
Sure, I know my "Downloads" folder is large, It always is. But with SequoiaView or WinderStat, I can see that inside my downloads folder I have one huge folder that's substantially larger than all the others, and so I check it out. With Zunaid's method I probably wouldn't have even bothered investigating my "downloads" folder because would have expected to see a large number of moderate sized files that would have been a pain to search through.
With a graphical tool unusually large files and folders jump out at you, even if they're several layers deep and mixed in with a whole bunch of moderately sized files.
(Of course, FolderSize is a neat tool, too. But in my mind it is not a valid replacement for a disk visualization tool. ) APL (talk) 13:39, 1 October 2009 (UTC)[reply]
WinDirStat, ftw!!! --98.108.37.202 (talk) 00:12, 2 October 2009 (UTC)[reply]

memorex mini traveldrive MS-DOS boot problem

edit

Dear Wikipedians:

I have a 512 MB memorex mini traveldrive USB keydrive that I got from a friend ~2007. I used HP USB Disk Storage Format Tool to format it as an MS-DOS 6.22 bootable drive using the MSDOS.SYS and IO.SYS found in the first partition of my hard drive.

However, when I reboot into the USB key, the message "Starting MS-DOS..." is displayed, but then the system hangs. However it is still responsive to the Vulcan nerve pinch.

Note that I have previously used this USB key successfully as the boot-stick for my Slackware Linux.

I also have a Kingston DataTraveler 1GB USB keydrive that boots up MS-DOS perfectly. I also got the Kingston one in 2007. So I am greatly bewildered as to why one USB key can do it and the other one can't?

Thanks for your help.

70.52.150.94 (talk) 19:30, 30 September 2009 (UTC)[reply]

Blackberry Daylight Saving Time problem

edit

I'm in a country which is in the same time zone as a large US city, but is not in the US. The Blackberry Time Zone options list the US city only, so that is what it is set to. However, there's one big difference - the country I'm in does not use DST (Daylight Saving Time).

The BB software does not seem to have any options for turning off DST. When I sync it to my computer it takes the time from the computer, but touching the Date?Time applet on the device causes it to revert to DST, meaning that it sets the clock forward by an hour.

Does anyone know of a setting on the device I can use to turn off DST permanently? —Preceding unsigned comment added by 65.183.8.194 (talk) 19:36, 30 September 2009 (UTC)[reply]

Are you far enough west to be in the US's Mountain Time Zone? If so, try telling BB you're in Phoenix -- Arizona doesn't use DST.
If you're in (or "below") the Caribbean, that won't help much :-)
--DaHorsesMouth (talk) 20:12, 1 October 2009 (UTC)[reply]

XFX or Gigabyte (motherboard)

edit

I am looking for a motherboard for gaming. Which brand is better? I don't want SLI or Crossfire. Thank you --119.30.36.40 (talk) 21:29, 30 September 2009 (UTC)[reply]
P.S. I have heard number of freezing issue with XFX board

Have you gone to Newegg and browsed the Motherboard section to read the user comments? I have found the user comments very useful. Comet Tuttle (talk) 21:48, 30 September 2009 (UTC)[reply]
My second Gigabyte mobo just failed. I sent the first one back, and they sent me a new one after two weeks. It won't post. I think I'll order an Asus. After a few months with the first Gigabyte mobo, I smelled something burning, then the ethernet stopped working, and it wouldn't POST most of the time.--Drknkn (talk) 22:20, 30 September 2009 (UTC)[reply]