Jump to content

Wikipedia:Reference desk/Archives/Computing/2012 March 22

From Wikipedia, the free encyclopedia
Computing desk
< March 21 << Feb | March | Apr >> March 23 >
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 22

[edit]

500 Internal Server Error

[edit]

A website I go to all of the time is now displaying the following error. Is there anything in the messages it's delivering which can help to explain what the problem is?

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@xxxxxx.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

69.62.243.48 (talk) 03:47, 22 March 2012 (UTC)[reply]

Nothing you can do at your end, no, it sounds like they need to look into it at their end. You might want to email them, as they suggest, in case nobody is at the switch. StuRat (talk) 04:14, 22 March 2012 (UTC)[reply]
Specifically what it means is that the custom software running on the server(like databases, custom scripts, or even primitive web servers that have bugs) are failing in an operation in a way that makes the script unable to continue. By FAR the most common cause of this on websites is database connection errors, but the nature of a 500 error obscures what actually went wrong(in an attempt to keep malicious users from exploiting the error). 162.111.235.14 (talk) 20:10, 22 March 2012 (UTC)[reply]

Rogue antivirus... how to remove it fast?

[edit]
Resolved

My computer is Windows XP running through Boot Camp on a Macbook Pro. I just had "Security Shield" install itself on my computer, and I'm currently trying to remove it the "slow" way of scanning my computer with an anti-malware program that is known to find it, then using that to remove it. However, it's the middle of the night here, and I can't move my laptop (the computer it's on) because unplugging it will cause a BSOD due to something wrong with the display driver. I also don't feel comfortable shutting it down with the malware still on it. My laptop is on my bed, and I'd like to go to sleep sometime tonight! Is there a faster way? Help! - Purplewowies (talk) 05:12, 22 March 2012 (UTC)[reply]

A lot of Windows badware has known locations and filenames, quite frequently somewhere in the ordinarily hidden directories around here: C:\Users\foo\someDirHere\. You can probably get it faster by limiting your search to those directories. If you're worried about it running, you can reboot to something like http://sysresccd.org/ and find it and delete it from there. You shouldn't worry about shutting it down with the badware still on it, though: when the computer is powered off nothing is going to be going on. ¦ Reisio (talk) 05:33, 22 March 2012 (UTC)[reply]
I found out the filename about five seconds or so after the rogue started "scanning." My real antivirus told me it didn't know the threat risk for the file, and that's how I got its name. It took forever to find it, but I managed to find it like two seconds after I decided to turn on the trial on the real anti-malware I had downloaded. Then about 30 seconds later the antimalware detected the rogue trying to open, and I watched it disappear forever. :) Thanks for the help you provided, even though I really didn't end up using any of it. - Purplewowies (talk) 17:05, 22 March 2012 (UTC)[reply]

Are there implementations of C++ without system headers as text files?

[edit]

The language standard for C++ defines that the use of #include <...> to include a system header in the source has the effect to make available a certain set of classes, functions, and objects, and the standards define which system header has to be used for which features. However, the language standard appears to be carefully worded to allow for implementations where the system headers do not have to exist in the form of source files. (See for example this question on Stack Overflow.) Do such implementations really exist? (I think the situation is the same for C, but I am not sure.) —Tobias Bergemann (talk) 10:29, 22 March 2012 (UTC)[reply]

Microsoft Visual C++ allows precompiled headers, which are supposed to be functionally-identical to the situation if the .h files were read (that is, it's an optimisation). On every C compiler I've ever used, the difference between <> inclusion and "" inclusion has been wrt the INCLUDE_PATH (or the like) if at all; in plenty of compilers they both work the same. It sounds as if the C++ standard is leaving the difference between the two, if any, as compiler-dependent as it is in C. -- Finlay McWalterTalk 11:02, 22 March 2012 (UTC)[reply]
It's not just system headers. The standard in general speaks in terms of translation units rather than actual files. From C++2003 chapter 2.1:
Note: Source files, translation units and translated translation units need not necessarily be stored as files, nor need there be any one-to-one correspondence between these entities and any external representation. The description is conceptual only, and does not specify any particular implementation.
--Sean 13:49, 22 March 2012 (UTC)[reply]
I can't actually think of a practical case where a translation unit hasn't been a file - which is kind of a shame, as it forces things that could quite naturally be (e.g.) databases into being file-based. For example, it'd be handy to be able to say gcc -o foo -arch x86 git://git.sourceforge.com/15027957951b64cf874c3557a0f3547bd83b3ff6/targets/main and have the compiler pull sources directly from git itself. -- Finlay McWalterTalk 14:40, 22 March 2012 (UTC)[reply]
One candidate might be (might have been?) IBM VisualAge. I think it used to keep the sources in a database, but I am not sure. And even if it did, I am more looking for implementations that use "compiler magic" instead of physical include files (if you understand what I mean). —Tobias Bergemann (talk) 15:08, 22 March 2012 (UTC)[reply]
No, I really don't know what you mean. The nearest to magic I can think of is the precompiled headers, above; it's my understanding that MSVC++ chews .h files and emits what amounts to its internal parse tree (with lexemes and stored #defines etc.) serialised to a special file format. But for that to be valid the precompiled set has to be self-contained, and it can't be preceded by anything that might change it. As just about any #define can change or mangle subsequent #included text, that's a major limit on what kind of cleverness a compiler can hope to do and still be able to handle all the evil things people do with the preprocessor. I don't think there's any suggestion that header material isn't still going to be text; whether a compiler chooses to do some magical caching (like precompiled headers) should be operationally invisible. -- Finlay McWalterTalk 17:12, 22 March 2012 (UTC)[reply]
I'm pretty sure that such implementations do exist, though I don't have any examples. You don't have to do anything fancy with internal code representations. Just storing the headers as text resources inside the compiler executable would be enough to qualify.
To the people talking about translation units, note that a translation unit is a source file and all the headers it includes, directly and indirectly. In other words, it's the code that gets compiled into a single object file in a separate-compilation environment, hence the name. It's not just a politically correct term for "source file". -- BenRG (talk) 16:19, 23 March 2012 (UTC)[reply]

Keeping URL with an image

[edit]

In Windows 7, when I download an image, the "Downloads folder" tells me the file name and the URL which the image came from. But looking in the folder where I stored the image, I can't find the URL. Is there a convenient way to keep the URL info as a property of the image? Thanks, Wanderer57 (talk) 14:51, 22 March 2012 (UTC)[reply]

You could store it yourself, manually, in the EXIF metadata - right-click on the image file, and in the details tab there are all kinds of fields. You could, for example, chose to paste the URL into the comments field. But I don't know of a browser (or the like) that does this itself, so doing this isn't very convenient. -- Finlay McWalterTalk 15:06, 22 March 2012 (UTC)[reply]
It seems to be rather difficult to do what you ask. However, here is a different approach. Using the Firefox extension Shelve, you can set up your browser to download images to a separate folder for each website. So, for instance, you would have a folder named 'Flickr', another 'Facebook' and so on. This site has a regexp you can use for this effect. - Cucumber Mike (talk) 19:33, 22 March 2012 (UTC)[reply]

Listing all non-subpages using regex

[edit]
Resolved

Hello, what regex do I have to enter here in order to list all pages of the Main namespace that do not contain the character '/'? Tried with [^/]+ but does not work --LoStrangolatore (talk) 16:42, 22 March 2012 (UTC)[reply]

Found! The unwanted page titles are returned because the regex matches a substring instead of the whole string; ^[^/]+$ works --LoStrangolatore (talk) 19:10, 22 March 2012 (UTC)[reply]

clearing hard drive before i take it to the dump

[edit]

I want to remove everything on my hard drive before i take it to the electronic waste disposal at the dump. I understand that formatting does not do this because it leaves the files just makes them not visible. I understand that I need to overwrite all the old files. Can I take a huge directory on my computer of files I don't care whether anyone sees or not and copy that directory over and over again until my hard drive is filled to it's max limit with these neutral files? Then I'd be overwriting the 1's and 0's from all of my important files thereby making them completely unrecoverable from anyone who gets a hold of my computer after i drop it off at the e-waste disposal? Thanks. — Preceding unsigned comment added by 97.127.151.101 (talk) 20:04, 22 March 2012 (UTC)[reply]

DBAN: [1]--Aspro (talk) 20:23, 22 March 2012 (UTC)[reply]
Instead I'd recommend Hammer: [2]. It's much faster than DBAN (which has to write to the entire disk surface in series) and is more fun to use. -- Finlay McWalterTalk 20:44, 22 March 2012 (UTC)[reply]
Yes, DBAN does take time (although one could spend the time waiting to catch up on the Flinstones) but if you too, are direct a descendant of Bamm-Bamm Rubble, then I agree, it is much more in keeping with your nature to use a club-like wiping device – but then no one can salvage and recycle it – so this solution is not green (bad). Doing what feels good does not always mean its good for this planet.--Aspro (talk) 21:04, 22 March 2012 (UTC)[reply]
I don't see why busting the thing up should make it any harder to recycle. Of course it makes it impossible to reuse, but that's different, and only marginally plausible. Who uses old HDDs? --Trovatore (talk) 21:51, 22 March 2012 (UTC)[reply]
? Jet travel is cheap to-day, is it not? In no time at all one can find oneself in a country where Computer recycling is the only means that gives people the opportunity to join the rest of of the civilized world – especially if their uncle has half a billion dollars that they need to get out the their despot-of-a-country. With a computer and internet connection they can then request our bank account details to effect a transfer and save themselves from a life of cruelling and desperate poverty. You sound like an affluent individual – may I pass your details on to some of them?--Aspro (talk) 22:13, 22 March 2012 (UTC)[reply]
For those that have never left what ever continent you live on and think that 'everything' ends up in some landfill some where, then this might come as a surprise to you: B.C. students buy sensitive U.S. defence data for $40 in Africa, Dumped computers exploited by crims--Aspro (talk) 22:46, 22 March 2012 (UTC)[reply]
Most people would be perfectly fine with an older hard drive. It's not like they're ever going to fill it. If the market in used hard drives is small, it's probably only because people are afraid of leaking their data because they don't know about tools like DBAN. -- BenRG (talk) 16:02, 23 March 2012 (UTC)[reply]
"I understand that formatting does not do this because it leaves the files just makes them not visible."
Actually an ordinary ("full") format will overwrite the data, usually only what is called a "quick" format will not. With a new disk you should almost always do a quick format because a full format is likely to be a waste of time. With an old disk it's up to you whether you should do a full one to overwrite the old data. Regardless of how exactly you wipe it all, though, keep in mind that to date there is virtually no proof that more than one pass is worth your time (and that certain less common media may require further concern). ¦ Reisio (talk) 23:59, 22 March 2012 (UTC)[reply]
I'm not so sure that a full format writes the whole disk surface. I think it only reads the whole disk surface (to look for bad sectors). A low-level format is another matter, but that requires a drive-specific magic command and I'm not sure most drives even support it these days. -- BenRG (talk) 16:02, 23 March 2012 (UTC)[reply]
The major vendors' diagnostic tools have a "write zeros" feature (for example, Western Digital's Data Lifeguard Diagnostic Tools and Seagate's SeaTools for DOS). You could use this instead of DBAN. As already mentioned, writing zeros is enough to securely erase the drive. -- BenRG (talk) 16:02, 23 March 2012 (UTC)[reply]
Another option is to encrypt the drive with TrueCrypt using a long, unguessable passphrase, then forget the passphrase. This is somewhat slower, but has the advantage that your computer is still usable during the wiping process. -- BenRG (talk) 16:08, 23 March 2012 (UTC)[reply]
All the talk about recycling and hammers aside, the problem with writing a huge directory of stuff you don't care about is due to slack space... that is files are split up into chunks of varying size (fat 32 historically has 32k chunks I think). If you have a file that's 31 k long, then remaining 1 k won't be overwritten. Or a file that's 1 k will have 31 k unwritten at the end. And different file-system parameters may have different numbers. Moreover, files, like swap space (pagefile in Windows) and temp files, your browser cache, and other areas you might not think of, may have sensitive things, like passwords or social security numbers, bank accounts, etc.... That's why the safest way is to overwrite the disc completely with software as others have suggested. Shadowjams (talk) 02:29, 25 March 2012 (UTC)[reply]

One of these machines will do the trick, but most households don't have one just sitting around in the corner of the loungeroom. HiLo48 (talk) 03:01, 25 March 2012 (UTC)[reply]

Relationships in Visio

[edit]

When modeling a database in Visio, is there a way to make the relationship/arrow start and end at the appropriate entity/table attribute/row? Currently it just goes from any point on one table to any point on the other --178.208.209.16 (talk) 21:07, 22 March 2012 (UTC)[reply]

Are you saying Visio goes from any point you select to any other, which allows you to do what you need, but you would prefer to have it automatically snap to the proper place ? If so, this might be difficult because the matching entity in another table isn't always named the same. If not, then the relationship must be first defined elsewhere.
Or are you saying it just randomly picks a point in the selected table ? If so, that's bad. Can you move the table or arrow afterwards to make the arrow go to the right location ? StuRat (talk) 04:58, 23 March 2012 (UTC)[reply]