Wikipedia:Reference desk/Archives/Computing/2007 May 7

Computing desk
< May 6 << Apr | May | Jun >> May 8 >
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.


May 7 edit

why does windows sometimes resurrect deleted photos? edit

My boss uses Windows, and once she complained to me that the more she tried to delete JPEGs from a directory, the more new copies appeared. I didn't believe her until I saw it for myself, and today I saw it on another Windows computer. It happens whether one is deleting, or just moving to another folder. At first it seems to work, and then about five seconds later new copies of the pictures, with successively higher numbers, pop back into the original folder. Maybe the weirdest thing is that it doesn't happen 100% of the time, so that my solution to the problem is simply to keep deleting, like whack-a-mole, until they're finally all gone. Why does this happen? As a Mac user, I don't really care if I find a practical solution to this; I'm just curious to understand it because it's one of the oddest things I've ever seen a computer do. --Allen 01:22, 7 May 2007 (UTC)[reply]

I've seen that too. I think it happens because they are loaded into memory in a program which is currently running, which then recreates any pics that are deleted. The solution, then, is to close any running programs before attempting the move. StuRat 03:04, 7 May 2007 (UTC)[reply]
I've seen this happen in a corporate network and it has been to do with file synchronisation. Without analysing the network specifically I don't think there is a standard fix you can apply. Keeping things neat and tidy or getting a profile reset once in a while can help, as can not using the off-line file feature, as long as you understand what that means. Vespine 03:13, 7 May 2007 (UTC)[reply]
Thanks for the answers! I bet it has something to do with an old attempt to network these computers, because I don't think I had any other programs open. It's still weird that it doesn't happen all the time, though. --Allen 15:35, 7 May 2007 (UTC)[reply]
Other programs, such as explorer.exe, could be accessing it. Unlocker will allow you to check that no processes are using it before you delete :). JoshHolloway 19:18, 7 May 2007 (UTC)[reply]

Japanese language in Windows edit

Its Windows XP btw. Usually, when I installed Windows it was enough to check the "Install files for East Asian languages" checkbox in Regional and Language Options in Control Panel to get full suport for Japanese language. That means I was able to both type japanese language and read japanese language. The current version of Windows Im using now seems to be screwed up. When I check that box I still cant add Japanese to keyboard layouts, and when reading I can read only hiragana, no kanji. [1]. Oh and I also cant choose Hungarian language in Keyboard layout options (Input languages). Can this be fixed short of reinstalling Windows XP? Shinhan 08:12, 7 May 2007 (UTC)[reply]

Usually it takes some sort of Office is well to have full support of complex languages. This is one of the reasons I switched to Linux. You can try uncheck that box, ok, restart, and then check it to do a reinstallation of the East Asian pack. --antilivedT | C | G 10:03, 7 May 2007 (UTC)[reply]

GCC register allocation edit

Is there any way I can get GCC to tell me which variables are in which registers (e.g., by annotating generated assembly)? Can I do this without going through the assembly and working it out myself? --User:Taejo|대조 08:25, 7 May 2007 (UTC)[reply]

You could compile with debugging (-g -S) and look at stab debugging entries in the assembly file, though that isn't particularly easy... One problem is that a quality register allocator will split live ranges. This means that a variable doesn't reside in the same register all the time. At one place in the program a variable can be in one register, then in another register, then on the stack, ... There is no unambiguous simple answer "variable 'x' is in register '%r7' in this procedure". Weregerbil 12:12, 7 May 2007 (UTC)[reply]
The easiest way out of the box is to compile with debugging, and use objdump to see the C source intermingled with the assembler output. As Weregerbil says, it's not going to be explicit or long-lived, especially in register-poor environments like x86. Example below. --TotoBaggins 17:24, 7 May 2007 (UTC)[reply]
$ cat foo.c
int my_func(int x) {
    int num = x * x;
    while (num < 0xDeadBeef)
        num++;
    int half = num / 2;
    return half;
}

$ gcc -c -g foo.c
$ objdump --source --no-show-raw-insn foo.o
...
00000000 <my_func>:
int my_func(int x) {
   0:  push   %ebp
   1:  mov    %esp,%ebp
   3:  sub    $0x10,%esp
    int num = x * x;
   6:  mov    0x8(%ebp),%eax
   9:  imul   0x8(%ebp),%eax
   d:  mov    %eax,0xfffffff8(%ebp)
    while (num < 0xDeadBeef)
  10:  jmp    17 <my_func+0x17>
        num++;
  12:  lea    0xfffffff8(%ebp),%eax
  15:  incl   (%eax)
  17:  mov    0xfffffff8(%ebp),%eax
  1a:  cmp    $0xdeadbeee,%eax
  1f:  jbe    12 <my_func+0x12>
    int half = num / 2;
  21:  mov    0xfffffff8(%ebp),%edx
  24:  mov    %edx,%eax
  26:  shr    $0x1f,%eax
  29:  add    %edx,%eax
  2b:  sar    %eax
  2d:  mov    %eax,0xfffffffc(%ebp)
    return half;
  30:  mov    0xfffffffc(%ebp),%eax
}
  33:  leave  
  34:  ret

Downloading Webpages edit

Is there a firefox plugin that can be used to download an entire website to use for later offline viewing?

--Grey1618 13:50, 7 May 2007 (UTC)[reply]

I don't believe so, mainly because it would likely have problems getting to every directory and knowing what that site is. Depending on the website though, you might be able to download it. It would help if you told us what it was- if it's something like a wiki, it might have dumps you can download and search through -- Phoeba WrightOBJECTION! 14:51, 7 May 2007 (UTC)[reply]
I'd be looking to download fairly basic, static HTML websites. --Grey1618 15:06, 7 May 2007 (UTC)[reply]
wget will do this and is free. --TotoBaggins 16:59, 7 May 2007 (UTC)[reply]
Yeah, use wget. It is out-of-control awesome. --140.247.242.96 19:40, 7 May 2007 (UTC)[reply]
Just hold down option when you click on a link. It downloads the page instead of going to it. Ignatzmicetalkcontribs 20:26, 7 May 2007 (UTC)[reply]
Alt on Windows — Matt Eason (Talk &#149; Contribs) 11:34, 9 May 2007 (UTC)[reply]

Remapping URLs in browser edit

When I type in "google" to get to www.google.com, I find that if I mistype any single letter this is likely to take me to some bogus site which takes advantage of these typos to try to sell crap. What I would like to do is have a list of sites which, when typed in a browser, would remap to google, so I can avoid this. Ideally, it should work in all browsers. I realize there are other solutions, like downloading the Google toolbar or making the site a favorite, but I would prefer to type in "google", instead. There are many other sites where I would like to do the same thing. So, is there a way to do this remapping of URLs ? StuRat 14:52, 7 May 2007 (UTC)[reply]

You could always include your favorite typos in your "hosts" file, forcing your address translation rather than allowing DNSto route you to a cybersquatter.
Atlant 15:41, 7 May 2007 (UTC)[reply]
Note that that will not work in all cases because many webserververs are configured to do virtual hosting based on what hostname the browser asks for. You could use hosts to point to a local server that would redirect to the proper hostname but that seems like too much work. -- Diletante 16:00, 7 May 2007 (UTC)[reply]
(edit: these solutions do URL typo correction, not search typo correction) OpenDNS does this by default, though it will send you to its search page if it's uncertain, which could be a bit annoying. There's also a Firefox extension that corrects some common typos, but it's a bit limited. -- Consumed Crustacean (talk) 21:42, 7 May 2007 (UTC)[reply]
From typosquatting; microsoft makes this. And a typo in google's URL will probably still take you to google.com because they have bought many of the common typo urls. Aaadddaaammm 02:11, 8 May 2007 (UTC)[reply]
Firefox user? Good, then add google as a bookmark. Right click its entry in the bookmark menu and select properties. Type your fave typo under Keyword, and you're done. This is more commonly used for doing a search, but there is no reason why it wouldn't work here. Add as many bookmarks in the same way for however many typos you want. --h2g2bob (talk) 18:33, 8 May 2007 (UTC)[reply]

Thanks for the info, all. StuRat 17:57, 11 May 2007 (UTC)[reply]

Processor edit

Can anybody tell what does the 64 bit means in a 64 bit processor. Is it the length of registers or is it something else?? —The preceding unsigned comment was added by Freaky guy (talkcontribs) 16:47, 7 May 2007 (UTC).[reply]

Yep, from 64-bit, "64-bit CPU and ALU architectures are those that are based on registers, address buses, or data buses of that size." and "'64-bit' computer architecture generally has integer registers that are 64 bits wide. -- Diletante 16:55, 7 May 2007 (UTC)[reply]

What to do with old CRT monitors? edit

Hey All!

Was looking for any creative suggestions for what to do w/ old CRT monitors that either don't work, or just don't look good enough to use anymore. I have a few of them laying around.

The best blog post I have found just shows how to turn it into a trash bin... appropriate, no?

I don't think my city has an electronics recycler (or at least he/she hasn't made himself too well known...) Are there any 'national' component recycling services? Is it possible to open them up and manually extract anything of value? Any other ideas? (I'm looking for something I can either sell, or do and sell.)

Thanks!

NByz 18:03, 7 May 2007 (UTC)[reply]

For recycling, if you live in the United States, you might find this EPA page useful. I believe HP also offers some recycling services. In some cases, there is a small charge for recycling monitors. I can't help you with the sell/resell portion of your query. --LarryMac 18:20, 7 May 2007 (UTC)[reply]
How about offer it on Gumtree (select region) or craigslist (again, select region)? JoshHolloway 18:57, 7 May 2007 (UTC)[reply]
I live in sort of a smaller city in Canada. It's not worth the shipping costs to get them somewhere else (for anyone, I think...) and there isn't really a market for them in my local papers or online auction sites. I was hoping to MAKE my own market somehow, but can't really think of anything... NByz 19:17, 7 May 2007 (UTC)[reply]
Lots of information on recycling programs in Canada, here. --LarryMac 20:21, 7 May 2007 (UTC)[reply]
There must be something cool you can do with them, don't you think? They are vacuum tubes, after all. And a cool type at that. —Bromskloss 19:53, 7 May 2007 (UTC)[reply]
I must stress that you do not do this ! The inside of a CRT can, as noted below, hold extremely lethal charges for an extremely long period of time, not to mention that there is a very real possibility that your monitor was made with things that could poison you or in some other way harm you if you were to open it. Opening a CRT is like opening a house with asbestos insulation. You just don't do it, you get a professional to handle it -- Phoeba WrightOBJECTION! 21:55, 7 May 2007 (UTC)[reply]
Firstly, I must concur with the above: opening up a CRT is a very bad idea. Mind you, many years ago I had a computer (an Amstrad PCW) that had most of its components integrated into the casing of the monitor, so fitting extra chips to the motherboard required you to open up that case, something that was required to expand the memory until the advent several years later of plug-in "RAM packs". I remember the dire warnings given in 8000 Plus (a PCW magazine) to the effect that if you were going to upgrade the chips, you should leave the thing unplugged for several days before even thinking about taking the cover off. Loganberry (Talk) 00:27, 9 May 2007 (UTC)[reply]
Um, firstly, Phoeba Wright and Loganberry advises against two different things – breaking the glass tube itself and opening the casing of the monitor, respectively. I, in the post that was generously struck over, assumed that the casing was already off, but did not mean that you should break the glass. That would ruin all the fun! A unbroken CRT is an evacuated glass tube with an electron gun and some other things. Awesome, that must be useful for something cool, was my idea. —Bromskloss 22:06, 14 May 2007 (UTC)[reply]
Film something like this on YouTube? The only sensible thing I can think of is recycling. x42bn6 Talk 20:10, 7 May 2007 (UTC)[reply]
Just keep in mind that monitors store a large electrical charge that can injure you (even after the monitor has been off/unplugged for a long time). Even if you discharge the tube properly there are still large capacitors that can shock you. -- Diletante
So remember to stand on a plastic box! (kidding, don't do it anyway) JoshHolloway 22:46, 7 May 2007 (UTC)[reply]

Email server edit

Ok everyone. I've googled and googled but I can't find a mail server (smtp and pop3) for a mac. Could someone help me? I would prefer open source, and I reallllly don't want to pay for one. Thanks to all who help!--Ryan 23:24, 7 May 2007 (UTC)[reply]

If you are on OSX, all the standard unix daemons (sendmail, qmail, exim) should work. List_of_mail_servers has a nice table that shows compatability too. -- Diletante 23:36, 7 May 2007 (UTC)[reply]

There used to be a free product called Stalker Internet Mail Server (SIMS) which did POP3/SMTP for Mac OS 9, if you are looking for that. Don't know if it works for OS X but if you Google around you can find it. --24.147.86.187 01:52, 8 May 2007 (UTC)[reply]
No idea if it will compile on OS X but I use postfix as my smtp daemon and have it deliver mail to Maildir's (done in the main.cf config file, put a slash on the end of the delivery path). I then use courier mailserver to access my inboxes from around the lan (www.courier-mta.org). You'll need authdaemon first and then the server to install afterwards (I use imap, but they have pop3 too). All free, if they work on your platform :). —Phill Upson