Wikipedia:Reference desk/Archives/Computing/2012 November 20
Computing desk | ||
---|---|---|
< November 19 | << Oct | November | Dec >> | November 21 > |
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. |
November 20
[edit]This article talks about performance of multiple cores versus one, but seems entirely focused on how to get the optimal performance out of a single program, assuming nothing else is running. What I'm more interested in is the real world, where each PC has dozens of processes either running or idle at any given time. How does having multiple cores impact that situation ? Specifically, can you put the program you care most about, let's say a streaming video you are watching, on one core, and keep everything else off of that core, so that that program will not lag whenever a virus scan runs or a piece of software decides to look for an update ? StuRat (talk) 02:11, 20 November 2012 (UTC)
- Yes, see processor affinity for starters. ¦ Reisio (talk) 02:16, 20 November 2012 (UTC)
- Although affinity may not be sufficient to esnure a virus scanner will not lag your video - processes not only compete for CPU, but also for memory, disk and perhaps the network. Good video players that want to avoid interrupted playback, should also take care to Data buffer enough data so that it still has something to play if the virusscanner outcompeted it for hard disk access, and lock its memory pages so that it doesn't get swapped out entirely by that memory-hungry scanner. Unilynx (talk) 20:43, 20 November 2012 (UTC)
- You might also look at scheduling (computing)#Operating system scheduler implementations, which is different from what you suggested, but also deals with prioritizing the use of CPU resources for specific programs. Dragons flight (talk) 13:03, 20 November 2012 (UTC)
Quickly open list of links as tabs in Firefox
[edit]Hello! I'm currently in a situation where I have very intermittent access to the Internet via Wifi (Internet access for about 5 minutes at a time), so what I've been doing is saving a copy of the HTML of the websites I like to visit, and then read them offline at my leisure. These HTML pages contain links to images and other content I'd like to view, so I save those links, one per line, in a text file to copy and paste into Firefox next time I'm in Internet range. Obviously, following a long list of links can be a slow and tedious task, so I wondering if there is a more efficient and quick way of opening a file of links into tabs with Firefox. I would expect that this could be accomplished with Greasemonkey, but I have no experience using that plugin, so I would need a beginner's explanation for that. Thank you for your time and help.--el Aprel (facta-facienda) 07:16, 20 November 2012 (UTC)
- No doubt a number of extensions for this purpose. ¦ Reisio (talk) 08:12, 20 November 2012 (UTC)
- I don't have firefox installed to test it right now, but try right-clicking on a folder in your bookmarks - I think there is an option to open the contents in new tabs. 209.131.76.183 (talk) 12:33, 20 November 2012 (UTC)
- You can use the built-in functionality (rightclick on a tab, select bookmark all tabs, give the folder with all the bookmarks a name. Then go to your bookmarks, browse to the folder you just created, right click it and chose open all in new tabs) or you can try CopyAllURLs. Install, restart Firefox. You can find it at the bottom of the Edit-menu. If the menubar is hidden press the left Alt key. Trio The Punch (talk) 12:52, 20 November 2012 (UTC)
- Here is a "semi-automatic" option using Wikipedia's external link feature:
- 1. Edit any page, for example by entering "wp:sb" in Wikipedia's search box and clicking the "Edit" tab. Or store http://wiki.riteme.site/w/index.php?title=Wikipedia:Sandbox&action=edit in your browser bookmarks and select that.
- 2. Clear the edit box (for example with Ctrl+A and Del) and copy-paste the url's. They can be formatted with one per line if you start the line with a colon.
- 3. Click "Show preview" (not "Save page"), hold down Ctrl and click on each url.
- PrimeHunter (talk) 14:31, 20 November 2012 (UTC)
- Snap Links Plus is your friend, it opens multiple links contained in a selected area in new tabs. Trio The Punch (talk) 14:53, 20 November 2012 (UTC)
- Continuing from the first part of #3 of PrimeHunter's response above, if you want to open said links even quicker: Click and hold once on the first link, "drag the link off the link" (yeah, that's the only way I can describe it -- so it doesn't actually navigate to the link), then hold Ctrl and press ↵ Enter, press Tab ↹ to move to the next link, then do Ctrl+↵ Enter again, and so on. -- 143.85.199.242 (talk) 16:23, 20 November 2012 (UTC)
https://addons.mozilla.org/en-us/firefox/addon/selection-links/ AvrillirvA (talk) 16:28, 20 November 2012 (UTC)
- This plugin is simply wonderful for this task. Many thanks.--el Aprel (facta-facienda) 04:26, 21 November 2012 (UTC)
![](http://upload.wikimedia.org/wikipedia/en/thumb/f/fb/Yes_check.svg/20px-Yes_check.svg.png)
Clipboard
[edit]Is it possible to write some javascript to place some javascript derived text into the windows clipboard? -- SGBailey (talk) 09:01, 20 November 2012 (UTC)
- In some cases. Some info. Its easy if you want it to work on just one computer with one browser. Trio The Punch (talk) 13:04, 20 November 2012 (UTC)
set top box
[edit]when i attached my analog cable line to tuner(model: zeb-c2010) there was no disterbence but through a set top box then the picture of monitor disappear for a second and then appear again disappear and repeated it. this is the same when I attached my sony cyber shot camera and play a video taking by this camera . can you fix my problem please. Rikisupriyo (talk) 09:52, 20 November 2012 (UTC)
- What inputs are you using to the monitor, in each case ? If you have alternate inputs you can use, in each case, try those. So, if you are using an HDMI input, try either another HDMI port, if there is another on the monitor, or try a different input method completely, like DVI.
- There might also be settings for the monitor which need to be changed to accept different inputs. What model monitor is it ? StuRat (talk) 05:44, 21 November 2012 (UTC)
Multiple threads
[edit]Is there an order where threads receive the output or is it totally random? Can I make a random generator out of it?
There are two threads, one writes '.' and other writes 'M', both are for loops. Executing the program multiple times, gets this:
Extended content
|
---|
MMM.MM.M.M.M.MMMMMMMM.M.MM.M.M.M.MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM......................................................................................... MMMMMMMMM.M.M.MMMM.M.M.M.MMMM.M.M.M.M..M.M.M.M.M.M.M.M..M.M.M.M.M..M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M............ MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM.................................................................................................... ...M.M.M.MMMMMMMMMMMMMMMMMMMM.M.M.......M.M.MMMMMMMMMMMM.M.M.M.MM.M.MMMMMMMM.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.MMMMMMMMMMMM..........................................M......M..MMMMMMMMMMMMM...... |
So how does it work? 190.60.93.218 (talk) 16:30, 20 November 2012 (UTC)
- Thread scheduling depends on the load imposed on the CPU by other tasks, the state of the CPU and RAM caches, on the occurrence of real-world events like timers and hardware interrupts, and on the (often quite sophisticated) cpu and io scheduling algorithms. So there's a fair amount of real-world randomness, and it's a complicated system to begin with. So, as a reasonably approximation, you can consider thread scheduling to have a random component. You can't safely rely on the OS scheduling one thread after another - the best you can do is hint to the scheduler with thread, thread-group, process, and process-group parameters like priority and affinity. There are much much better ways to efficiently collect the entropy available to a system - see Entropy (computing). -- Finlay McWalterჷTalk 16:41, 20 November 2012 (UTC)
- Incidentally, stuff like this is especially prone to Heisenbugginess - simply by putting in those prints you've made additional system calls and generated additional IO, which will directly alter what's running and how threads get scheduled. Tracing systems like DTrace are less likely to cause this. -- Finlay McWalterჷTalk 18:11, 20 November 2012 (UTC)
- Instead of having it write just M and ., make ten threads that do digits from 0 to 9. That should give you a better view of what kinds of patterns are discernible or not from the data. There are loads of tests one can run on such numbers to see if they conform to technical definitions of randomness. --Mr.98 (talk) 19:02, 20 November 2012 (UTC)
- But you could only be sure that the pattern holds on that system, as currently configured, and under a similar load as when the test was run. Different programs running, new updates, driver changes, a screensaver triggering, dynamic CPU reclocking for power saving, network traffic (that could be triggered entirely externally), free memory, playing media and tons of other things can all have subtle effects on how threads are scheduled. 209.131.76.183 (talk) 13:32, 21 November 2012 (UTC)
Can I Still Update Win95?
[edit]I am about to load Win95 onto a PC so that I can use it to play some old favourite games. My guess is that the installation CD that I have sent for will be the raw Win95 and will not have any of the subsequent updates. My question is, if I connect to the Windows Update website with a machine running Win95, will the update site still update that old OS? Or have they stripped all that historic stuff off their site by now? Gurumaister (talk) 19:55, 20 November 2012 (UTC)
- I doubt it.. I haven't got Win95 around, but I dug up an old copy of Windows 98 Second Edition, and it was unable to access windows update - it got stuck in a redirect loop, and trying to update the browser failed too (Microsoft tried to provide IE8 for WinXP, whose installer doesn't even launch, as it expects NT-specific APIs). So if Win98SE fails, it's unlikely that Win95 would work. However, the service packs that Windows update provided have always been available for download too, so the updates will still be out there on the internet... somewhere. Microsoft's links to it are dead, but they still have some Windows 95 stuff floating around on their FTP server - this seems to be service pack 1 for Windows: ftp://ftp.microsoft.com/softlib/MSLFILES/setup.exe Unilynx (talk) 20:33, 20 November 2012 (UTC)
- Are you sure your old favorite games don't work on your ordinary Windows install with the compatibility set to Windows 95? ¦ Reisio (talk) 21:18, 20 November 2012 (UTC)
- I would recommend installing Win95 in a virtual computer. You can use Virtual PC 2007, download it here. I found some pretty detailed tutorials. The "Virtual Machine Additions" support Win95, install them next. The latest version of Win95 is the OEM Service Release 2.5 (from here, more info here). The Microsoft Plus! 95 Pack for Windows 95 is very useful. You won't need Windows Update. Trio The Punch (talk) 21:32, 20 November 2012 (UTC) p.s. If (some of) the games you want to play have a DOS version as well you can use DOSBox.
- (ec)Microsoft ended all support for Windows 95 a decade ago (this ref says 2002, this one 2001). -- Finlay McWalterჷTalk 23:02, 20 November 2012 (UTC)
- Yes, and you probably can run all these games in any one of their newer OSes just fine, or you can run a VM... however, that they ended support doesn't necessarily mean you can't upgrade the OS to whatever the last version they put out was. Shadowjams (talk) 23:04, 20 November 2012 (UTC)
Thanks Guys. The VM option doesn't work well as I can only get a rather small VM window within which my Win95 sits. It isn't a realistic environment in which to run software. I'm not sure how to use the 'compatibility mode' suggested by Reiso - any hints will be much appreciated. Gurumaister (talk) 07:22, 21 November 2012 (UTC)
- Did you change the screen resolution? Did you try dragging the window to make it bigger? If you tried that and it didn't work, did you try temporarily decreasing the resolution of the host OS? http://support.microsoft.com/kb/292533/en-us?fr=1 Trio The Punch (talk) 11:42, 21 November 2012 (UTC)
Thanks Trio - the screen won't drag but changing resolution might do it. Gurumaister (talk) 11:47, 21 November 2012 (UTC)
- You asked about Compatibility mode. Versions of Windows from Win2000 onwards allow you to fool programs into thinking you are running them on an older version. To activate it, right-click on the icon of the program in question and select Properties. Choose the Compatibility tab in the box that appears. You can then choose from the drop-down to select a version of Windows in which the program is known to work. There are also other options such as restricting the colour depth which you can try various combinations of to get the program running. Info from Microsoft on this feature is available here. - Cucumber Mike (talk) 14:53, 21 November 2012 (UTC)
Thanks Cucumber Mike. I will try that. Presumably that also means I will have to run the Game's installation program in compatibility mode. Gurumaister (talk) 16:17, 21 November 2012 (UTC)
- Maybe, although in my experience the installers often work well - if a little clunky looking. I'd suggest trying it 'straight' first, then going through the compatibility options if you have trouble.
I'm back again. . . . I have tried using compatibility mode to install (Settlers II Gold Edition) but I get a message window telling me that it objects to being run on a 64 bit system. Ah well, maybe I need to continue with my plan to load an old PC with Win95. Thanks for all your help though. 82.71.20.194 (talk) 19:45, 21 November 2012 (UTC)
- Oh, bummer. This article tells you about the reasons. Unfortunately there doesn't seem to be much you can do in Compatibility Mode. However, you may find these instructions helpful. They show how you can use Dosbox to run Settlers II. If you have other games from around the same era I can highly recommend Dosbox for getting them working. - Cucumber Mike (talk) 20:53, 21 November 2012 (UTC)
- Compatibility mode won't work, but I think using a virtual computer will. There is a remake btw. Trio The Punch (talk) 20:55, 21 November 2012 (UTC)
maps of the world
[edit]There are zillions of maps of the world on the web. I'd like to see either something like what I describe below or something that can be used for the same purpose, especially if it's simpler.
Let (x1, y1), (x2, y2), (x3, y3), . . . . . ., (x1 zillion, y1 zillion) be a sequence of points along the coast of a continent so arranged that if you draw a line connecting the first to the second, then a line connecting the second to the third, and so on, until you get to the end then connect the last to the first, you get a reasonable map of the continent, and there's no pointless backtracking, and in each pair, the first coordinate is the longitute and the second the latitude (or vice-versa if you like).
Then I could feed each point into some function for which I wrote the code myself, getting a sequence of points on a plane, and my function determines what map projection it is.
Is the data---the sequence of pairs of coordinates described above---in some reasonable downloadable form on the web somewhere, for the continents and islads that would usually be clearly visible on a globe? Michael Hardy (talk) 23:28, 20 November 2012 (UTC)
- To give you an idea of how detailed NOAA-WVS is, this map is rendered from that dataset. You may find that WVS is far too detailed (and you can have lots of maths fun simplifying astonishingly detailed polygons to the desired resolution). -- Finlay McWalterჷTalk 23:52, 20 November 2012 (UTC)
- They have less detailed maps too (scroll to the bottom). (Paraview fans click here). [1]. Need to reduce the complexity? GPSbabel uses the Douglas-Peucker algorithm to reduce the level of detail. Trio The Punch (talk) 23:49, 20 November 2012 (UTC)
- I prefer GSHHS [2], which comes in several different resolutions depending upon need. Dragons flight (talk) 18:24, 21 November 2012 (UTC)