Wikipedia:Reference desk/Archives/Computing/2009 May 28

Computing desk
< May 27 << Apr | May | Jun >> May 29 >
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 28 edit

Another trivial pascal question edit

One tutorial I've been reading says that "Reciprocal calls wastes stacked much faster than recursive calls" - is this right ? I can't see why they would be different.

Also the statement

proceedure whatevername (variables etc here) ; forward ;

for setting up a later defined proceedure for reciprocal calls - this is just a directive to the compiler right - to prevent it getting confused - it has no major effect on the final compiled code?77.86.10.194 (talk) 02:37, 28 May 2009 (UTC)[reply]

See Tail recursion for why straight recursion can be much more efficient. And yes the forward declaration is just to make life easy for the first pass of the compiler, it shouldn't affect the code produced. Dmcq (talk) 08:02, 28 May 2009 (UTC)[reply]
Thanks. Tail recursion made sense of it. The tutotial just mentioned it in passing. I wasn't expecting any sort of optimisation on that sort of thing (as I'd never heard of tail recursion before).77.86.10.194 (talk) 11:20, 28 May 2009 (UTC)[reply]
I think the tutorial is wrong. I'm not sure what "reciprocal calls" is supposed to mean but I guess it means mutual recursion, in which case it's wrong to contrast it with "recursive calls", since mutual recursion is recursion too. Tail recursion optimization is not limited to self-recursive functions. An implementation might optimize only the self-recursive case, but there's no reason to expect that, unless the tutorial is geared to a specific implementation that happens to behave that way. -- BenRG (talk) 10:36, 28 May 2009 (UTC)[reply]
Thanks. In context the 'recursive calls' meant calls from procA to procA, and 'reciprocal calls' meant calls from A to B and also B to A, as you rightly infered/guessed. I would imagine that the writer is guessing that only self recursive calls are optimised - as you suggest...
(reply edited):Isn't it more difficult to tell if a mutually recursive call can be optimised - depending on whether the two calls use the same variables etc (I'm still trying to work it out).77.86.10.194 (talk) 11:31, 28 May 2009 (UTC)[reply]
What would normally happen is that one might be inlined in the other because it is small, and then the tail recursion optimisation is applied. It would not normally be considered worthwhile doing the optimisation where both are large routines. So yes a good optimising compiler would stick the two together in most of the important cases. Dmcq (talk) 15:07, 28 May 2009 (UTC)[reply]
The tail recursion optimization is virtually always worthwhile when you can do it. It is touchier when calling a function other than yourself, that's true. You can't usually tail recurse if there's some local state like an exception frame that needs to be torn down before you return, but when you're calling yourself you might be able to arrange to reuse the same exception frame. If you're using a caller-popped calling convention (like the one normally called the "C" convention on x86) then you can't call a function that takes more stack arguments than you did, which might be a problem in the mutually recursive case. If it's callee-popped (like the one called "Pascal") then this isn't a problem. I don't actually know whether x86 Pascal implementations use the Pascal convention. According to x86 calling conventions, Delphi uses a (different) callee-popped convention, but a web search suggests that Delphi doesn't do any tail-call optimization anyway. -- BenRG (talk) 21:08, 28 May 2009 (UTC)[reply]
Thanks - I guess that if using the 'replace call with jump' compiler method for tailend recursion it's quite possible that the return to the original proceedure call may happen in a different subrouting (ie Call A (A and B recursing each other) but the return conditions happen in B) - in this case it's best if the caller does the popping, rather than the callee(the subroutine).. because procB might be expecting more or less on the stack to pop than procA.?
I think I've least half understood anyway, which is better than 0. Thanks/77.86.10.194 (talk) 17:30, 29 May 2009 (UTC)[reply]

Wrong search redirection edit

Whenever I click on anything at the search results page, I am taken to some different website. The websites taken are stubs and nothing but advertisers (ex. [1], [2],etc.). It isn't that I am taken to them everytime, but that's 7/10 times. It doesn't matter I do the search from live.com or google.com, anycase I wound up at some spam website. 218.248.80.114 (talk) 05:01, 28 May 2009 (UTC)[reply]

Sounds like spyware. Shadowjams (talk) 06:28, 28 May 2009 (UTC)[reply]
Run a virus scan on your computer. If you don't have a virus scanner see list of antivirus software which lists free as well as commercial products. 62.78.198.48 (talk) 07:53, 28 May 2009 (UTC)[reply]
my guess would be that your hosts file has been compromised, and your winsock corrupted. As mentioned above, an AV program is important. You may want to look for a fixwinsock, or winsockfix program if you have a way to do that as well. In some minor cases, I have seen the command: "netsh winsock reset" (without quotes) make things a bit more functional. You may find this site helpful in finding tools and information. — Ched :  ?  16:37, 28 May 2009 (UTC)[reply]
Are you sure you're not just seeing search engine spam? APL (talk) 17:41, 28 May 2009 (UTC)[reply]
I had this problem from clicking on two Wikipedia results, in Google. A third result (from the next page) seemingly identical to the first, came up with the correct Wikipedia page. Shortly afterwards I noticed the iexplore.exe process running (although I never use Internet Explorer) and it kept restarting after being forced to terminate, through Task Manager. A number of different virus scans showed nothing, but a scan with RootRepeal immediately showed various Trojans, and some DLL's with 35-character names beginning with UAC. Getting rid of these stopped both the site redirections and the background running of IE.KoolerStill (talk) 21:29, 28 May 2009 (UTC)[reply]

Randomly named DLL files are signs of infection by a Trojan (Or Trojans). Scans by Malwarebytes' Anti-Malware and SUPERAntiSpyware are needed immediately. This infection falls under adware/redirection Trojans. (Unless there are even more infections) Hosts file modification and/or Winsock corruption are possible. If the hosts file has been modified; delete it then replace it with either the MVPS hosts file or the HpHosts file to help prevent future infections. There are fixes available if Winsock has been corrupted. Finally, an effective anti-virus is required to help keep your computer secure. If you want a free one, try avast! or Avira AntiVir. --Xp54321 (Hello!Contribs) 02:01, 29 May 2009 (UTC)[reply]

I agree all sudden strange behaviour warrants a virus or malware scan. Neither of those 2 mentioned above picked up the DLL files involved.They were "hidden to Windows API" and not in the file system, failing to show up even through the command line when searched by the name known after detection by RootRepeal. HijackThis also showed them, but did not allow removal. The Trojan appeared to have been downloaded by the first redirected search result, which was probably the result of page hijacking.(The machine had been freshly scanned and cleaned, and was being run without a firewall for testing purposes). The constant renewal of the IE process, I imagine, is connected to an attempt by the Trojan(s) to send data back to their "mothership".KoolerStill (talk) 09:29, 29 May 2009 (UTC)[reply]

Windows Sound Recorder edit

The Windows Sound Recorder (sndrec32.exe, if I remember correctly) in Windows XP had not changed much (if all) since Windows 95, or perhaps even since version 3.1. In Windows Vista, however, Microsoft improved it slightly when they removed the audio file duration limit (which was truly annoying!), and added support for WMA (with simple metadata, but at the same time they also removed support for all other formats, i.e. WAV files with different bitrates, channels etc.). However, all other changes were for the worse. Almost all additional features (such as effects, and simple merging of audio files) were removed. Now, the only button or menu item left is "Start/Stop recording"! Have Microsoft improved this extremely primitive sound recorder in Windows 7?--Andreas Rejbrand (talk) 17:02, 28 May 2009 (UTC)[reply]

Why even bother when the free and much better Audacity is available? --antilivedT | C | G 04:07, 29 May 2009 (UTC)[reply]
That's not a helpful answer. I don't know OP, hopfully someone with Windows 7 experience will come along soon and be able to tell you —Preceding unsigned comment added by 82.44.54.169 (talk) 04:28, 29 May 2009 (UTC)[reply]
And here I am, now rebooted to Windows 7! No, it looks exactly the same as the one in Vista. --antilivedT | C | G 04:45, 29 May 2009 (UTC)[reply]
OK, thanks! --Andreas Rejbrand (talk) 10:58, 29 May 2009 (UTC)[reply]
  Resolved

Saving my favorites edit

If I'm getting a new PC and I have to transfer all data from the old one to the new one, can I do this with my 'favorites' from Windows Explorer? I guess there's a file somewhere that holds them all?Popcorn II (talk) 18:16, 28 May 2009 (UTC)[reply]

You probably mean "Windows Internet Explorer" (Windows Explorer is the name of the shell in Microsoft Windows, i.e. explorer.exe). If you use Windows Vista, this is very easy: all your favourites are located in the C:\Users\<User Name>\Favourites folder (just as documents are stored in ...\Documents, images in ...\Pictures, downloads in ...\Downloads and so on). --Andreas Rejbrand (talk) 18:29, 28 May 2009 (UTC)[reply]

Sorry, yes I mean Internet Explorer and I use XP.Popcorn II (talk) 18:55, 28 May 2009 (UTC)[reply]

For me, the folder with the links is located at "C:\Documents and Settings\YourUsernameHere\Favorites". Just copy and paste those onto a flashs tick and then from there onto you new computer. Thanks, 99.224.117.66 (talk) 20:09, 28 May 2009 (UTC)[reply]

Will do, thanksPopcorn II (talk) 20:45, 28 May 2009 (UTC)[reply]

error in installing edit

I have a pc with core 2 due processor and on it windows xp is installed.Now a days I have eperiened a problem with it .when i insert a flash derive and try to open it with double lick ,a message appear ," Error loading ,\RECYLER\S-5-3-42-28-------\jwgkvsq.vm.The speified module could not be found " But after right clik menu appear has first option as autoplay but it does not work ,but if click an other option " open " , it works. More ever ,when i try to install some programmes it does not work ,but i have instlled some of these programmes already. but now they do not work . Also —Preceding unsigned comment added by 119.154.35.156 (talk) 19:02, 28 May 2009 (UTC)[reply]

Backup important files and format it. Seems like it had been infected by some virus but was improperly removed. --antilivedT | C | G 04:06, 29 May 2009 (UTC)[reply]

Capturing video from a window edit

  Resolved

I want some software for my Windows XP machine that will capture what occurs in a game window on the screen, to a video file. Last time I looked into this a couple of years ago, Camtasia Studio 4 seemed to do most of what I wanted; but it seemed expensive. This YouTube video of Starcraft II is of very high quality, just what I'd like - assuming it's a capture of something that takes place in a window. What do other people use for video capturing what occurs in a window? Tempshill (talk) 22:14, 28 May 2009 (UTC)[reply]

Check out Comparison_of_screencasting_software 161.222.160.8 (talk) 00:43, 29 May 2009 (UTC)[reply]
Perfect and thank you! Tempshill (talk) 05:50, 29 May 2009 (UTC)[reply]