Wikipedia:Reference desk/Archives/Computing/2012 April 16
Computing desk | ||
---|---|---|
< April 15 | << Mar | April | May >> | April 17 > |
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. |
April 16
[edit]Name of principle: "every lineal work can be copied"
[edit]Principle says that works line audio, films and ebooks can always be copied somehow. — Preceding unsigned comment added by XPPaul (talk • contribs) 00:48, 16 April 2012 (UTC)
- You might be looking for the Analog hole. RudolfRed (talk) 01:14, 16 April 2012 (UTC)
- We also have an article on serialization and serializability, which have several related meanings in computer science and software engineering. For example, in Java an object must implement the Serializable interface to satisfy your requirement; some objects intentionally are not serializable, which means that no valid Java program can manipulate that object as a stream of bytes. (So, to construct an algorithm, analog-hole or otherwise, that is capable of copying such an object, you would need to use something other than a Java program). Compare to a serializable object (or document), for which a simple trivial function can directly copy the byte representation; this is defined to be an exact copy for an object implementing the interface.
- Databases use serialization to manage concurrency; this is particularly important if the data is being modified by many processes. So, to generalize the principle, you must account for transactions on changing serializeable data, as well as on constant objects. Nimur (talk) 14:18, 16 April 2012 (UTC)
iFrame
[edit]I'm creating a single HTML document ("ComboBKMK.html") with multiple iFrames, containing multiple separate HTML documents with links within. However, when I click a link in any iFrame, it opens in that specific iFrame instead of "in" ComboBKMK.html like any other non-iFrame'd link would. Is there any way to get it to use the ComboBKMK.html instead when clicking the links? -- Tohler (talk) 00:54, 16 April 2012 (UTC)
- Figured it out; what needs to be done is add (target="_parent") to each individual link. In my case a simple find and replace of (">) to (" target="_parent">) worked. -- Tohler (talk) 07:14, 16 April 2012 (UTC)
What is this cable I see before me?
[edit]I have here a couple of cables with a USB Mini B connector on one end, perhaps a meter of wire, and two male 3.5mm TRS connectors on the other end. The TRS connector housing is colored pastel pink and green and labeled "MIC" and "SPK", respectively. What makes this truly bizarre is I have two of them and don't recall any application for them. Any idea what they're for? -- ke4roh (talk) 01:00, 16 April 2012 (UTC)
- My guess would be a headset (audio) which accepts a USB mini B connector. The other ends would plug into the computer. StuRat (talk) 01:02, 16 April 2012 (UTC)
- We know what it is, just need to know what it might have been used for. StuRat (talk) 23:11, 16 April 2012 (UTC)
- The coloring is pretty indicative it's meant to be used with a computer, if that helps any. ¦ Reisio (talk) 01:58, 17 April 2012 (UTC)
Strange crash in 3D Studio Max
[edit]Hmm, haven't done much tomfoolery with my system, but all of a sudden I end up getting crashes on Max upon starting it up. Even if I uninstall Max 2011, clean up registry entries, and downgrade to 2010, the error still shows up. The crash dump seems to have some references to the .NET Common Language Runtime, assemblies and other such stuff. As much as I would like to reinstall Windows I'm afraid I'm not that arsed enough due to the amount of work I had to do just to reconfigure things. Can anyone help me figure this thing out? Blake Gripling (talk) 06:56, 16 April 2012 (UTC)
- Have you tried starting from scratch? Can you give us an idea as to what you are trying to do? Mrlittleirish 14:21, 16 April 2012 (UTC)
- I suspect that the bug isn't in 3D Studio Max, but only manifested there first. Perhaps it was the first chunk of code to try to access the .NET routine which is now bad. How did it go bad ? Perhaps a single bit error on the disk on which it is stored ? Unfortunately, if this is the case, you may need to do a disk scan first, which will cordon off the bad sector(s), then reload the O/S. However, once sector's start going bad on a disk, the problem tends to spread. So, if bad sectors are found, you might want to get a new disk for the O/S. The old disk could still be used, but for less critical things, like storing music, pics, or movies. A single bit error may not even be noticed there. StuRat (talk) 15:18, 16 April 2012 (UTC)
- Windows did scan the drives before, but so far there weren't any bad sectors detected, only unlinked or orphaned files. Blake Gripling (talk) 23:30, 16 April 2012 (UTC)
How to create an Alternative DNS root
[edit]I'm having difficulty finding a guide or in fact any substantial information on the subject. I know that people have done it, and I also know it can't be *that* terribly hard or expensive to do. Could anyone give me some pointers?--Newbiepedian (Hailing Frequencies) 12:06, 16 April 2012 (UTC)
- It can be done with free software. Simply set up a BIND server, and do not configure it to resolve to any commercial internet service provider or other root DNS server... consult, e.g., the BIND Administrator Reference Manual for information on setting up the server in various roles, including as a root server. Direct your clients to use your server as their DNS server: configure any clients, including individual host PCs, routers, gateways, and DHCP servers, to point at your nameserver, as appropriate for your network configuration. Nimur (talk) 14:05, 16 April 2012 (UTC)
Javascript in body
[edit]Is there any limitation or thing to consider when using the <script> tag to use javascript within the <body></body> tags of a html page? Can it be nested into form or table tags? Are there things that may not allow it to work correctly? Cambalachero (talk) 14:21, 16 April 2012 (UTC)
- Like many JavaScript questions, the answer will depend on who you want to run the JavaScript. See Mozilla's "About JavaScript" for an introduction. Most modern web browsers will parse javascript code anywhere, including inline within HTML elements. Microsoft provides great documentation for JavaScript in Internet Explorer. Apple provides a developer reference for Safari, e.g., here, and elsewhere on the developer page; WebKit, JavaScript, and the DOM applies to many other browsers and environments that also use WebKit. There are lots of idiosyncrasies in various JavaScript implementations, and browser applications: there are many other ways that users can load an HTML page. For example, I often view pages in Lynx (browser), so I can read the scripts without executing them. So, it doesn't matter where the script is; I won't always run it. I may also load your HTML page within an iOS app as a WebKit view; or on my Mac in DashBoard, or any number of other places. If you expect that your HTML should appear properly, you need your script to behave well in all of these environments. Nimur (talk) 14:38, 16 April 2012 (UTC)
IE8 Print Preview
[edit]Hello. Is it possible to tweak Internet Explorer 8 so, when I select a body of text and ask for a print preview, it automatically shows "as selected on screen"? Thanks in advance. --Mayfare (talk) 14:31, 16 April 2012 (UTC)
- I'm not sure if you can set it as default, however when you select text, go to print preview, you are able to preview the selected body at the top of the window. Click the dropdown that says 'As displayed on screen', to 'As selected on screen'. Hope this helps you. Mrlittleirish 15:44, 16 April 2012 (UTC)
Setting up php in Nnginx in windows 7
[edit]I'm currently receiving a "No input file specified error". I really have no clue how does excatcly work. Though I will provide details
My current php configuration in nginx,conf is this
location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; }
I got the nginx folder like this
*Nginx --nginx.exe -*html ---index.htm ---Example.php -*conf ---nginx.conf ---fastcgi.conf ---start-nginx.bat (The command for starting php-cgi is: start c:\nginx\php\php-cgi.exe -b 127.0.0.1:9000 -c c:\nginx\php\php.ini) -*php ---php-cgi.exe ---php.ini (I'm not putting all of the files of course)
I don't know why isn't working.. I'm hoping maybe you could help me. Thanks — Preceding unsigned comment added by 190.60.93.218 (talk) 15:33, 16 April 2012 (UTC)
fastcgi_param SCRIPT_FILENAME ./html/$fastcgi_script_name;
- AvrillirvA (talk) 22:17, 16 April 2012 (UTC)
- I reloaded it, didn't work either 190.158.212.204 (talk) 23:36, 16 April 2012 (UTC)
- This is my nginx.conf http://pastebin.com/g4bUYc4x — Preceding unsigned comment added by 190.60.93.218 (talk) 14:18, 17 April 2012 (UTC)
Extended content
|
---|
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm index.php; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # #error_page 500 502 503 504 /50x.html; #location = /50x.html { # root html; #} # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME ./html/$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443; # server_name localhost; # ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_timeout 5m; # ssl_protocols SSLv2 SSLv3 TLSv1; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} } |
This config file is working for me, with
-c c:\nginx\php\php.ini
removed from the bat file. AvrillirvA (talk) 15:57, 17 April 2012 (UTC)
- I have changed the configuration file in lot's of ways and they don't seem to work, I would know what parameters are being passed to the php-cgi.exe... Because if I do it manually the php actually does his job. But I just can't find a way to nginx to tell the program the file it must open..190.158.212.204 (talk) 22:44, 17 April 2012 (UTC)
Virtual machine
[edit]I've got a laptop that's running Windows 7. I would like to use the Linux OS Ubuntu. Would it be possible to run two operating systems on the same machine? If so, then how could I do it? I don't want an Ubuntu pop-up window. I would like a choice during boot-up, e.g. press 1 for Windows, press 2 for Linux. — Fly by Night (talk) 18:28, 16 April 2012 (UTC)
- What you are referring to is dual boot, and it's definitely do-able. There are a couple of ways to do this. The first is the standard dual boot method: Dual boot, the second (which I haven't tried) is through Wubi: Wubi. - Akamad (talk) 22:32, 16 April 2012 (UTC)
- Wubi wont be availible for the latest ubuntu thats coming at the month end. THe one currently out (11.10) supports it though. Staticd (talk) 07:56, 17 April 2012 (UTC)
Changing images in a page
[edit]I have been working in a html page that runs the "Concentration" game. There's a grid of basic images (as turned cards, showing the back), all the same ones. Click on one card, it shows another image (as if turning a card and seeing the other side), click on another, it shows its own other side. If they are different, they show the basic image again in a pair of seconds. If they are the same, they stay that way, and the player gets a point (surely you know the rules of the game).
The page uses javascript to change the images back and forth, check if the pair selected is a pair of similar cards or not, what to do in each case, etc. For some reason, it worked in internet explorer 8, but not in firefox 11: each pair of cards I click, correct or incorrect, stay visible instead of showing the "back side" image again. Then, I noticed a detail: it DOES work in firefox, just not visually. If I click on a correct pair of cards I uncovered at different times, I get a point, so the page treats them as if they were covered cards. If I right-click to see the image info, it's not the name of the image I'm seeing, but the name of the image I should be seeing (the "back side" image).
Is there some known problem in firefox with javascript and this type of image switching, or in firefox itself? Perhaps something that needs configuration? So far I have the page and the associated images saved in the hard disk, but I don't think that should make any difference.
By the way, I know that the easiest answer would be to refresh the page, but no. That works for static pages, if I do that it simply begins a new game, loading the onload function Cambalachero (talk) 21:20, 16 April 2012 (UTC)
- English is too imprecise to really know what it is you're doing. If you can reduce the problem to a minimum case (which I guess need only be a couple of images and a few lines of javascript) that would make understanding what's going on easier. There's a half dozen ways to make images appear, change, move, or disappear (and you can bet some browser that has a daft problem with each one).
- In general:
- I know it's elementary stuff, but remember that images are loaded asynchronously. It's often wise to preload them (with them assigned to zero-size on-screen objects) so they get loaded and cached properly.
- Make sure the size of stuff is set explicitly (as things might get sized when the image hasn't loaded, and so the engine doesn't know how big it is yet). This should get resolved once the image is loaded, but if you're doing something complicated (like storing the image sizes yourself in Javascript) that might cause confusion.
- Try experimenting with generic DIVs with the image set using the CSS background property. That way you can temporarily just use a solid colour for background, which allows you to separate the logic to set the CSS from the additional issues specific to images.
- -- Finlay McWalterჷTalk 21:57, 16 April 2012 (UTC)
- Ooh, and remember that images that are not tied to an active DOM object can be flushed from the cache arbitrarily, even if they previously were displayed. -- Finlay McWalterჷTalk 22:19, 16 April 2012 (UTC)
archive time capsule
[edit]I want to archive 1GB of data in a time capsule and bury it in my garden. Which data storage method has the most chance of being recoverable after 50 years; CD-RW, hard drive, flash drive, printed paper? Please ignore all the issues about having computers that can read the data in 50 years or whatever; just assume aliens can figure it out. Thanks — Preceding unsigned comment added by 83.250.125.169 (talk) 22:07, 16 April 2012 (UTC)
- This, or related questions, has come up here several times before. You might like to review this and this. -- Finlay McWalterჷTalk 22:14, 16 April 2012 (UTC)
- The first link is all about the issues surrounding having appropriate computer equipment to read the storage medium, and the second link has few answers and links to the first link. I explicitly don't want information about whether or not old computers will be available in 50 years. Just assume they will be, or that aliens can magic up an appropriately old fashioned computer to read them. Then, which data storage solution is most likely to physically survive and be physically intact enough to be readable? 83.250.125.169 (talk) 22:30, 16 April 2012 (UTC)
- There's lots of existing examples of printed paper which are still perfectly readable after 50 years and longer. If you literally mean to bury the media in your garden, then you will probably need to take steps to ensure the paper does not get damaged by moisture or fungi.-gadfium 22:44, 16 April 2012 (UTC)
- I expect that if sealed in an opaque container, with very little humidity, and no UV light, all of those formats would survive for 50 years. Of those, I might have the most faith in the flash drive. The plastic might delaminate in the CD, and the paper might rot or the ink might fade. The moving parts on the hard disk might fail, although technically the data could still be recovered by taking it apart and scanning it with another device. StuRat (talk) 22:47, 16 April 2012 (UTC)
- The second link has some very good info in it. [1] discusses the issue in 1986. The Library of Congress has also apparently thought deeply about this question, so their conclusions should be of some interest to you. This study in particular. Shadowjams (talk) 23:14, 16 April 2012 (UTC)
- Also, the conclusion I gather from all of these studies, is that one of the best answers is redundancy. That is, put the same information in duplicate, and in different formats. And if you can, low level error correction. Redundancy. Be redundant. Shadowjams (talk) 23:18, 16 April 2012 (UTC)
- I second that suggestion. StuRat (talk) 23:27, 16 April 2012 (UTC)
- Also note that smaller and less expensive formats allow for more redundancy. So, this would favor the CD, with the flash drive a close 2nd. StuRat (talk) 02:02, 17 April 2012 (UTC)
- Sorry to say, but I don't think CDs and flash memory can survive 50 years of storage. Our sources say an average of 10 years, while other sites claim 25+, or 20-100 years in optimal conditions. FLASH memory will lose their charge after about 10 years, so it definitely won't survive 50 years without periodically refreshing the data on it. --Wirbelwindヴィルヴェルヴィント (talk) 19:26, 17 April 2012 (UTC)
- The Sandisk Memory Vault ([2] - other brands may be available) claims to be able to store photos for 100 years. It's marketed for storing photos, but I assume you could put whatever you like on it. --Kateshortforbob talk 11:47, 18 April 2012 (UTC)
- I just got a freaky idea. Get a simplest possible netbook, fill it with data and bury that! --Ouro (blah blah) 11:58, 18 April 2012 (UTC)
- That's pretty much the hard disk idea. However, if some types of battery leak, that could damage the hard drive. StuRat (talk) 18:25, 18 April 2012 (UTC)
- Yeah, but if you just bury the hard disk You still have to find something to access it. If you bury an entire computer that's taken care of, assuming, of course, that we still have electricity in 2062. --Ouro (blah blah) 16:31, 19 April 2012 (UTC)
- ...and assuming the laptop still works. StuRat (talk) 17:06, 19 April 2012 (UTC)
HD cameras
[edit]How good is the 720p quality of these cameras? It says 720p but is it really? I bought one once and it turned out it was 720x480 xvid at 15 fps. That's not what I consider HD — Preceding unsigned comment added by 83.250.125.169 (talk) 22:09, 16 April 2012 (UTC)
- If you give us specific models, we can find the specs, but not for every camera on that page. It's probably fairly straightforward to find the max res and max frames per second, but finding out which combos are supported may require the owners manual. Also beware that some may say they support a certain res, but that might have been upscaled from a lower res, resulting in a pic that looks like the lower res. Similarly, some of the frames may have been interpolated from the frames before and after. StuRat (talk) 22:52, 16 April 2012 (UTC)
- High-definition video just means anything with higer resolution then standard def. Unfortunately, even "standard def" does not have a standard definition (lol). However, I think it's pretty clear that 720x480 is NOT high definition. I think if you bought something labelled as HD with that resolution, you'd have a casae for false advertising. Of course, I'm not sure whether the term "HD" is legally protected, they might just have the letters HD on the box, but if they don't obscure the real resolution, they might just say it's a model number or something... I doubt a reputable brand would resort to that, but if it's a cheap chinese camera from ebay or something, I doubt there's a regulation they're forced or even compelled to compy with. Vespine (talk) 23:07, 16 April 2012 (UTC)
- If it's 720x480, it is categorically not 720p. --Phil Holmes (talk) 11:54, 17 April 2012 (UTC)
- I'm not sure what you intended to link to but for me the link goes to a page showing the 'latest offers' which will obviously vary over time and range from a £43.94 compact digital Fujifilm L55 to a £309.99 Nikon D3000 Digital SLR. It's a bit pointless to ask feature or quality questions about 'these cameras' with such a diverse range. As has been stated, 720x480 is not 720P. Nil Einne (talk) 15:57, 17 April 2012 (UTC)
Downloading pdf files.
[edit]I've attempted to download both individual articles and books in the pdf format. In each and every case I've been unable to save them or to open them with Adobe Acrobat. They'll cause Adobe Acrobat to crash each and every time. I've tried this on three separate Windows computers and on Mac OS computer. How can I fix this problem? Thanks! — Preceding unsigned comment added by Dhonaker (talk • contribs) 22:33, 16 April 2012 (UTC)
- That's not enough information to form a diagnosis. How many files have you tried to downlaod? Are they all coming from the same source? If yes, what's the site? From what you have described, that seems like the most likely source of the problem. Can you open other PDF files on those computers? Have you tried to install the latest acrobat reader? Are there any faqs or manuals on the site you are downloading the PDFs from? Vespine (talk) 22:55, 16 April 2012 (UTC)
All of the files that I'm having difficulty with are from Wikipedia. I'm able to download and open/print files from other sources without any problems. I do have the latest versions of Acrobat Reader on both the Windows and the Mac computers. — Preceding unsigned comment added by Dhonaker (talk • contribs) 23:06, 16 April 2012 (UTC)
- Ok, can you link a specific one? or two? Vespine (talk) 23:49, 16 April 2012 (UTC)
I'm having difficulties with the following files (articles), including but not limited to:
Metrolink (Southern California) EMD F40PH EMD F59PH Wabtec — Preceding unsigned comment added by Dhonaker (talk • contribs) 00:09, 17 April 2012 (UTC)
- Hmm. I just downloaded the pdf for Metrolink (Southern California) and had no difficulty opening it with Adobe Reader (latest version, Windows 7). You wrote Adobe Acrobat in your original query -- did you mean that, or Adobe Reader? They are not the same thing. Looie496 (talk) 01:34, 17 April 2012 (UTC)
- I also do not have a problem with that article.. Are there other articles you don't have problems with or does this happen to any article you try to download as PDF? The fact you are experiencing similar issues on both a PC and a Mac is a bit strange, I can't think of a reason why you'd have the same issue with two different systems unless the source was faulty, but it's obviously not if it works for other people. It might even be that you have two separate issues. Have you tried a third party PDF viewer like foxit reader? Vespine (talk) 03:44, 17 April 2012 (UTC)