Wikipedia:Reference desk/Archives/Computing/2008 August 13
Computing desk | ||
---|---|---|
< August 12 | << Jul | August | Sep >> | August 14 > |
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. |
August 13
editls/dir command in C
editHow does one do a directory search in GNU C? I can't figure out for the life of me how to do it, and online documentation is simply horrendous. Magog the Ogre (talk) 00:22, 13 August 2008 (UTC)
- See this example. -- kainaw™ 00:24, 13 August 2008 (UTC)
- The easiest way to get the most powerful result is to use the Unix philosophy: use find and read its input with popen() or similar. --Sean 01:13, 13 August 2008 (UTC)
- And instead of writing output with puts, putchar, and printf, you could system("echo")! Running external commands to avoid reinventing complex functionality is a good idea, but readdir isn't that complex. --tcsetattr (talk / contribs) 04:58, 13 August 2008 (UTC)
- Moreover, relying on the formatting of the output of external programs makes for fragile and unportable programs. The behaviour of readdir is specified by POSIX; the output format of programs like find and ls isn't, and can vary remarkably between platforms and revisions. For example, the (unaliased) ls -l format varies between a RHEL3 machine and a current Ubuntu one (and they're both using versions of ls from GNU fileutils/coreutils, albeit several years apart). Unfortunately the "unix philosphy" breaks down in the face of the (often pointless) diversity of details and options for command line programs. I've so often seen how, perhaps contrary to how one might expect, C language source code turns out to be more portable (with fewer annoying checks for "if we're running on x then y") across *nix versions and variants than an equivalent shell script. Doris the Nymph (talk) 11:18, 13 August 2008 (UTC)
- Actually POSIX does specify some strict output formats now. Even for ls -l, historically intended only for human consumption (see <http://www.opengroup.org/onlinepubs/009695399/utilities/ls.html#tag_04_81_10>). Good news for shell script writers. Still, C programmers should use readdir(), scandir(), glob(), ftw() rather than popen()ing ls and find. --tcsetattr (talk / contribs) 20:05, 13 August 2008 (UTC)
- I have to point out, though, that none of the functions you just mentioned are part of the C standard, and programs using them will probably only be portable to Unixy environments. Visual C++ doesn't have readdir() or scandir() or glob() to my knowledge, though it does have popen(). There's no portable way to read the contents of a directory in C. -- BenRG (talk) 00:02, 14 August 2008 (UTC)
Magic Memory Optimizer
edit< Question removed due to the high likelihood of that this being an advertisement. Diff > --antilivedT | C | G 06:39, 13 August 2008 (UTC)
Working with stupid Vista
editSince it first came out, I've enjoyed Rollercoaster Tycoon and its expansion packs, so I'm just now trying to install it on my relatively new Vista-equipped HP laptop, which has only one user account, an administrator account of course. The original works fine, but the other CD (both expansions, Corkscrew Follies and Loopy Landscapes, together) gives me an "Access Denied" message because there's some sort of error. Looking online, I find that there are other people complaining on various online forums about the same problem, but others who get it to work fine. I've had other problems with the computer not always treating me like the administrator, and I'm wondering if this is a factor in the Loopy Landscapes access problem. Any ideas on what I can do to get around the administrator thing, so that it lets me perform administrator duties without holding me up like this? Nyttend (talk) 04:30, 13 August 2008 (UTC)
- My only suggestion is trying to run it in compatibility mode while using an administrator account. If you do not know how to get into Compatibility you need to right click over the .exe file in the CD used for installing and go to the bottom and click properties and look for one for compatibility. Change it to XP. To get to the CD you go to (this is assuming your Disc drive is Drive F but it should be obvious if the CD is in) my computer and right click over drive f and click on browse or something of that nature. Running it as XP should work and make sure to log in as an admin...also..you may want to turn off M$ security settings. RgoodermoteNot an admin 06:41, 13 August 2008 (UTC)
- Still doesn't work: I made Setup.exe for the original RCT work as if it were in XP, made the original RCT work as if it were in XP (program worked fine), made Setup.exe for the expansions work as if were in XP, made the expension work as if it were in XP, but it still gave me the same access problem bit and failed to open. Can you tell me how to turn off "M$" security settings, and explain what M$ means? Nyttend (talk) 16:28, 13 August 2008 (UTC)
- M$ = MS = Microsoft. Term used by Mac users, Linux users, and other similar groups of noobs =)--mboverload@ 17:49, 13 August 2008 (UTC)
- Only the annoying ones. -- Consumed Crustacean (talk) 02:30, 16 August 2008 (UTC)
- M$ = MS = Microsoft. Term used by Mac users, Linux users, and other similar groups of noobs =)--mboverload@ 17:49, 13 August 2008 (UTC)
- P.S. I gotta agree with you on that. Even the noob part..would have been better if spelled n00b though. =). Also..looked this up because I too have this problem..it is Vista. RobNot an admin 02:27, 16 August 2008 (UTC)
- Still doesn't work: I made Setup.exe for the original RCT work as if it were in XP, made the original RCT work as if it were in XP (program worked fine), made Setup.exe for the expansions work as if were in XP, made the expension work as if it were in XP, but it still gave me the same access problem bit and failed to open. Can you tell me how to turn off "M$" security settings, and explain what M$ means? Nyttend (talk) 16:28, 13 August 2008 (UTC)
- If it's the game not running properly, try running it with elevated permissions: r-click the shortcut, click 'run as administrator'. If it's the installer for the expansion packs, find setup.exe on the disc and run that as administrator. If you installed the game to C:\Program Files, try uninstalling the game, creating a new folder like C:\Games, and reinstalling it there (backup your saves, obviously). For compatibility mode on a game that old; I'd set it to NT4 or perhaps 2000, rather than XP - I know this works for Homeworld. CaptainVindaloo t c e 18:32, 13 August 2008 (UTC)
- You might want to disable the User Account Control for a while and see if that helps. That can be done from Control Panel -> User Accounts. I wasn't able, for example, to install one of the drivers (an MSI package, not an executable file) when it was on (the setup wizard was telling me to log in as an administrator, although I am one!) ARTYOM 19:16, 13 August 2008 (UTC)
- I've disabled User Account Control and set both the install and the program itself — both for the original version (which still works fine) and for the expansions — to work on 98/ME (we never had Windows 2000 or NT, but it worked for us fine on ME), but all it does is give me the same error message as before. Should I just give up? Nyttend (talk) 23:46, 13 August 2008 (UTC)
- When exactly does it give you the error? When you double click on the setup file, or somewhere through the installation process? Also, you said you were trying to install this stuff from a CD, right? ARTYOM 01:08, 14 August 2008 (UTC)
- No, setup and installation both seem to work fine: it's when I actually open the program that I get a message. And yes, I'm working this from the original CD. Nyttend (talk) 01:32, 14 August 2008 (UTC)
- Okay. When you right click on the program's executable file and go to properties, do you have a Security tab in there? If so, go to it, locate your username in the top list, and see if all permissions in the bottom list are set to "Allow". The only time I was ever getting an "Access denied" error trying to open a file was when my user account didn't have permissions to open it. ARTYOM 01:42, 14 August 2008 (UTC)
- No, setup and installation both seem to work fine: it's when I actually open the program that I get a message. And yes, I'm working this from the original CD. Nyttend (talk) 01:32, 14 August 2008 (UTC)
- When exactly does it give you the error? When you double click on the setup file, or somewhere through the installation process? Also, you said you were trying to install this stuff from a CD, right? ARTYOM 01:08, 14 August 2008 (UTC)
- I've disabled User Account Control and set both the install and the program itself — both for the original version (which still works fine) and for the expansions — to work on 98/ME (we never had Windows 2000 or NT, but it worked for us fine on ME), but all it does is give me the same error message as before. Should I just give up? Nyttend (talk) 23:46, 13 August 2008 (UTC)
Problems about Decompiler Flash
editI recently plan on converting flash format by Decompiler Flash. I'm new at flash decompiler, i can export data, but i dont know how to replace image. Thanks for any help —Preceding unsigned comment added by Pdonbuff (talk • contribs) 06:33, 13 August 2008 (UTC)
You may first add flash file to resources list. Then select the images of flash files you want to edit, click the button "Replace Image", after that browse a image to replace current one at the replace image window, at last check the "OK" button to confirm the change. —Preceding unsigned comment added by Lsonfey (talk • contribs) 06:45, 13 August 2008 (UTC)
- Note to readers: this question was almost certainly planted by a spammer trying to stir up interest in this product. (See my comments under #I have Memory Improve Professional, but I don't know how to use its "smart list". below.) Don't bother checking it out; it must suck hard if this is the only way it can get attention. --tcsetattr (talk / contribs) 04:21, 14 August 2008 (UTC)
- My recommendation would be to get Flash Decompiler Trillix, instead. I've never heard of "Flash Decompiler Gold." It's probably a horrible program.--67.166.55.248 (talk) 04:46, 14 August 2008 (UTC)
about Digital Audio Editor
editCan Digital Audio Editor split mp3 files into desired size? —Preceding unsigned comment added by Rick well (talk • contribs) 07:39, 13 August 2008 (UTC)
- The product page doesn't mention anything to that end, have you checked the help file that came with the program? — QuantumEleven 14:59, 13 August 2008 (UTC)
- You may want to consider the (free) program SoX (with LAME) for this purpose. -- KathrynLybarger (talk) 00:26, 14 August 2008 (UTC)
This program can split the music file and combine into new one.
Maybe you can follow the user manual and konw how to split the music. —Preceding unsigned comment added by Yorkking (talk • contribs) 07:19, 14 August 2008 (UTC)
- Spam alert! Add Rick well and Yorkking to the list (along with Greenlanop, Crystal AB, Lsonfey, and Pdonbuff) of spammers pretending to ask each other questions on the refdesks to create the false impression that their software actually has users! See the sections #Problems about Decompiler Flash and #I have Memory Improve Professional, but I don't know how to use its "smart list". Check the WHOIS. "Jun Tang", the registrant of decompileflash.com, is the billing contact for audioeditor.us. Caught you again, spamming bastard! I'm sure you've got plenty more stupid products to spam us about, but you're not smart enough to make your fake questions look real, especially now that I'm onto your M.O. So why don't you just give up? --tcsetattr (talk / contribs) 07:45, 14 August 2008 (UTC)
- That really is a nifty scheme. -- Consumed Crustacean (talk) 08:14, 14 August 2008 (UTC)
- I made an official report at Wikipedia:Suspected sock puppets#User:Greenlanop if anyone wants to see what happens. I'm curious myself to see if admins care about this type of thing. --tcsetattr (talk / contribs) 09:39, 14 August 2008 (UTC)
Setting Default Application for File Extension on Mac
editHow can I set my iBook to open .doc documents in NeoOffice instead of TextEdit, and get it to do it for ALL .doc documents automatically without me having to do each one individually using CTRL-click>open with....>use as default?--ChokinBako (talk) 15:48, 13 August 2008 (UTC)
- (a) Highlight a .doc in the finder. (b) Hit cmd-I, or right-click and choose "Get Info". (c) Where it says "Open with", pick NeoOffice, and hit the "change all" button. --jpgordon∇∆∇∆ 16:43, 13 August 2008 (UTC)
Does law enforcement ever bust all these people doing DDoS attacks?
editDoes law enforcement ever bust all these people doing DDoS attacks? Basically lots of websites I visit that are on dedicated servers sometimes go down due to DDoS. I also hear about lots of DDoS attacks on other sites I don't go to, as well. Also pretty much every shared website host I've hosted with if it's popular will get regular DDoS attacks. It seems like law enforcement just does nothing except for one time when someone hit yahoo, ebay, and some billionaire companies. Is law enforcement every working to track down these people or does law enforcement just not care? William Ortiz (talk) 16:14, 13 August 2008 (UTC)
- Americans and Western Europeans who perpetrate DDOS attacks are often caught. I've seen news stories every few months about them getting arrested. Castle Cops caught one a while ago. However, most of the computers that perform DDOS attacks are zombies. And many of the bot operators are in third-world countries that do not care about it. Many of the zombies also "reflect" their packets off of other computers by spoofing their IP addresses. Thus, the computers that a victim's server sees are simply other computers under attack attempting to reply to a victim that never sent a packet. That's why many of the people who get caught are the amateurs who don't know how to hide their tracks, often teenagers.--67.166.55.248 (talk) 16:21, 13 August 2008 (UTC)
- According to botnet, several have been shut down by law enforcement. See for example this story, about a 1.5-million strong botnet being used for DDoS-based extortion. Algebraist 16:23, 13 August 2008 (UTC)
- Maybe I haven't been paying attention, but I read the infosecurity news every day, and have never seen any people participating in DDoS get in trouble with the law. I believe DDoS's legality is also currently, not certain— albeit not the opinion of a victim. Mac Davis (talk) 04:10, 14 August 2008 (UTC)
Hotmail on Thunderbird
editWhat are the settings needed to get Hotmail on Thunderbird, using a Mac?--ChokinBako (talk) 20:52, 13 August 2008 (UTC)
- You can't, for the most part. This article talks about the subject a bit. ---J.S (T/C/WRE) 21:40, 13 August 2008 (UTC)
- Yes, you can. It is somewhat complicated - but I do it and it works (albeit on Windows, but that shouldn't make any difference). You'll need an extension. There is information here. —Preceding unsigned comment added by Willnz0 (talk • contribs) 23:09, 13 August 2008 (UTC)