Wikipedia:Reference desk/Archives/Computing/2011 June 27

= June 27 =

Thermal efficiency of FPGAs vs. conventional CPUs
How do field-programmable gate arrays compare to conventional CPUs in the amount of heat produced per operation, and in the amount produced in the process of loading a program versus reconfiguring an FPGA? Neon Merlin  07:43, 27 June 2011 (UTC)

Excel: Date Calculation
I've been sat here for a while trying to figure out the best solution or even an easy solution but I can't seem to find one to a calculation related with dates.

I have an Excel spreadsheet which has a column with =today so it displays todays date. I also have a column which includes the start and end date or a project as well as other columns for amount of days between and working days etc. Basically the issue is I would like to work out the percentage of time elapsed for each section. So using the date 27/06/2011 - if the start date was the 26/06/11 and end date - 27/06/08 it would say it was 100% complete. Is this even possible?

Many Thanks 195.49.180.85 (talk) 08:10, 27 June 2011 (UTC)
 * (I presume you mean 27/06/11 for the end date.) The basic formula would be =(TODAY-StartDate)/(EndDate - StartDate) (and then format the cell as a percentage), but you'd have to be careful if it was possible for Start date and end date to be the same - maybe =IF(StartDate=EndDate, 1, ). If you used NOW instead of TODAY you'd get a more precise figure - using TODAY will give very coarse results if the start and end are a small number of days apart. AndrewWTaylor (talk) 08:19, 27 June 2011 (UTC)
 * Yes you are right 27/06/11, Have no idea why I used 08. I will give that a try. Thank you :) 195.49.180.85 (talk) 08:25, 27 June 2011 (UTC)
 * Of course, you need to decide what you want to be displayed if EndDate is earlier than Today. If in this case you want to see 100% (rather than a figure that is greater than 100%) then you need to code another exception e.g.:
 * =IF ( OR ( TODAY >= EndDate, StartDate = EndDate), 1, )
 * Gandalf61 (talk) 09:09, 27 June 2011 (UTC)


 * Better to use enddate-startdate+1 for the denominator and not say it is finished till the day after the end. Anyway such dates just give how much should be completed rather than is completed. I'd advise getting a project planning tool if you start doing much of this, they can deal with dependencies and suchlike things nicely. Dmcq (talk) 11:22, 27 June 2011 (UTC)


 * Second that -- depending on what you "expect" to see, date conversion in project planning software is a fairly significant piece of the code.
 * The convention is normally that the beginning of a task starts at the beginning of a day, and the end of a task at the end of the day. In this manner, you get what you expect for a one-day task, i.e., it starts and ends on the same day.  The task which immediately follows that task, though, can't start until the next day, even though it might logically be only one minute later.
 * Trying to work around weekends and holidays in Excel will give you an even bigger headache. It really is a case where specialized software is worth it.  DaHorsesMouth (talk) 00:17, 28 June 2011 (UTC)

Desktop speaker volume detection?
How does my computer "know" my desktop speaker's volume (dial) setting? If I issued the " Ctrl" command from the Command Prompt and the speaker is turned up, the beep will be played from the speaker. However, if the speaker is turned down (or off), the beep will be played from the internal (PC) speaker instead. How does the computer do this? The only thing that connects the speaker and the computer is a TRS audio cable connected to the speaker's "Input" jack and the computer's "Front Output" audio jack. Many thanks. 118.96.163.71 (talk) 13:14, 27 June 2011 (UTC)


 * Completion (or not) of an electrical circuit, I’d imagine.  ¦ Reisio (talk) 14:46, 27 June 2011 (UTC)

Remote file system manipulation without FTP
Sorry for the confusion subject — I couldn't quite think of a pithier way to describe this.

I'm working on a project where I need to be able to put and remove files to a remote server.

The problem: the remote server only supports Secure WebDAV (WebDAV with HTTPS/SSH) as its mode of access. No FTP, no SFTP.

So it's easy for me to manually put files onto said server. But I'd like to be able to do it with PHP. PHP doesn't natively support WebDAV. There is only one PHP WebDAV class on the web that I've found, and it doesn't support secure connections. You can compile PHP to have WebDAV support, but the server I'm hosting the PHP on does not have it compiled into their version of PHP and it doesn't seem likely that I can convince them to do so.

So for the moment I'm trying to brainstorm other options. The remote server can run PHP. So I've been thinking about using some sort of script on the server itself which would receive the file data, e.g. through some sort of secure connection. I don't really know what this would be called. It's not the sort of thing I have experience with, but presumably you could have one that would act as kind of a mini-FTP server. Is this a possibility? Does something like this have a name? Would it work?

Any other ideas? --Mr.98 (talk) 15:37, 27 June 2011 (UTC)


 * One other (odd) idea: the "incoming" files to the remote server are all coming from one source, which does have FTP access. I could imagine a script on the remote server that would receive (encrypted?) instructions from the source telling it to connect via FTP (using PHP's built-in FTP functions) and download files to various locations. Kind of a hassle, though.
 * Another idea is to try and drop into a shell and use rsync or something like that. (Though now that I look at it, it doesn't look like rsync natively supports secure WebDAV either. Damn!) --Mr.98 (talk) 15:48, 27 June 2011 (UTC)


 * If you're on Linux (and the like) you can use davfs2 to mount the remote filesystem locally, over WebDAV. The manual page shows examples of it being mounted with an https URL. With the filesystem mounted locally, you can use whatever you like to manipulate the files, as if they were really stored locally. I've never personally used this (nor WebDAV at all) - I'd be interested to know how you get on. -- Finlay McWalter ☻ Talk 16:02, 27 June 2011 (UTC)


 * The problem is that I'm not doing this locally. Ideally the "local" aspects of this would all be hosted on another (different) remote server. I doubt that the Bluehost server which will be hosting the scripts in question will be able to mount drives. This whole thing is such a mess because the main (academic) webservers have been apparently configured by monkeys, and are apparently not meant to be useful to anyone, hence having to do ten thousand work-arounds for what ought to be a simple CMS... --Mr.98 (talk) 16:09, 27 June 2011 (UTC)


 * Ah yes, I remember you suffering the last time with this setup. Are you utterly attached to PHP? The PyDAV Python library supports https connections, and the example enclosed with it suggest that to put a single file you'd do nothing fancier than:


 * -- Finlay McWalter ☻ Talk 16:33, 27 June 2011 (UTC)


 * Yeah, I'm pretty attached to PHP — both because it's what I know the best, and because this whole thing is going to be paired up with WordPress one way or another, alas... Blargh. I am not quite paid enough to deal with this idiotic server. --Mr.98 (talk) 16:50, 27 June 2011 (UTC)


 * You can use a command-line tool easily in PHP. For example, you can use cadaver (if you are on Linux) with popen. I would use $pf=popen("cadaver https://your.server.info", "w"); so you can then pump commands to it with fputs($pf, "YourPassword"); or fputs($pf, "put YourNewFile"); Then, wrap that up in a function like function my_cool_secure_webdav($filename). -- k a i n a w &trade; 18:28, 27 June 2011 (UTC)


 * I checked cadaver and it is a bit finicky, so I'd use proc_open instead with read/write to interact with it properly. -- k a i n a w &trade; 18:45, 27 June 2011 (UTC)

Robots.txt
Somebody on the NTSB added robots.txt to the website. This means that the arhcived content at http://www.ntsb.gov is now unavailable

Has anyone found a way to bypass robots.txt so that one can look at the content on http://web.archive.org/*/http://www.ntsb.gov ? What arguments could I use if I was corresponding with NTSB officials and asking them to remove robots.txt from the site?

The US government documents are in the public domain, and stuff on the public website is not classified, so I do not know why the NTSB added robots.txt. WhisperToMe (talk) 18:10, 27 June 2011 (UTC)


 * Adding robots.txt reduces load on the server from search engine spiders. Because information is free, does not mean it must be available in the specific manner that you want to receive it. They could place it on file in a file cabinet in the basement of an old missile silo in a corn field in Kansas and still claim it is free - you are free to go and find it. So, any argument you make is going to be seen as, "I want you to change how you do things because I don't want to change how I do things and I'm offering nothing in return." -- k a i n a w &trade; 18:30, 27 June 2011 (UTC)
 * Responding to that argument, I would say "you already did things X way, so why are you changing it now?" (the documents had been on the NTSB website for years) - It would be far easier for the NTSB to leave the old content up than to remove it and then face inquiries asking for the NTSB to restore the material.
 * And my point of view is "The agency works for the American people, so it must continue to offer the same level of access to this information unconditionally"
 * WhisperToMe (talk) 18:42, 27 June 2011 (UTC)


 * They probably won't give you a (decent) answer as to why they changed it. I'm not aiming this at you personally, but I wouldn't, it's none of anyones business how I run my webservers. But what we do know is they have intentionally tried to blocked respectable crawlers which could be either because they didn't like the resources they used up trawling the site, they didn't like the idea of someone else caching the site or easily copying everything or they just simply want people to enter the site and search it using their own tools (or any other reason).  ZX81    talk  18:52, 27 June 2011 (UTC)
 * If this was a private webserver, I could totally understand "but I wouldn't, it's none of anyones business how I run my webservers" - However in this case I have a different attitude because the NTSB is an agency of the US government, and I am a US citizen and I believe the agency's job is to serve the American people by continuing to provide the information on old accidents. I could potentially ask my federal representatives to look into the matter. WhisperToMe (talk) 19:58, 27 June 2011 (UTC)
 * Sorry I meant no offence, but from what I now understand (based purely on the text above/below), they've already removed that information from their site and basically you were just using archive.org to view it because it wasn't on the real site anymore? I have no idea about US laws or what they're required to do with public information (I live in the UK), but I'm guessing that like Kainaw said right at the top the information is probably still available, just not in the way you want to retrieve it. But it certainly wouldn't hurt to ask them, I was just trying to say I don't think you'll get a very helpful reply back.  ZX81    talk  20:45, 27 June 2011 (UTC)
 * It's okay - I understand that the argument above was just a devil's advocate response :) - Anyway, the information was taken down from the previous locations and the NTSB has not stated if there were any new locations for the data - the site search I used did not find the public docket info I was looking for. I have sent e-mails to the NTSB, and I am hoping to receive responses.
 * It's possible that the NTSB could charge a fee if it asks me to order CDs of the information, while when it was on the NTSB website it was free.
 * WhisperToMe (talk) 21:46, 27 June 2011 (UTC)
 * I don't think there's a way to bypass it. According to the faq page "When a URL has been excluded at direct owner request from being archived, that exclusion is retroactive and permanent." That seems to imply that they destroy all previous archived snapshots of a site if robots.txt is added. This page also states that adding robots.txt to a site "will remove all documents from [the] domain from the Wayback Machine." Whether they actually delete the previous archives or just block them from public view I don't know; it would be a huge loss if they really did just delete them all. AvrillirvA (talk) 18:49, 27 June 2011 (UTC)
 * From my understanding they just block them from view. There was a case where a website once had robots.txt (Sosoliso Airlines website) - See this revision - but when that went away, lo and behold, all of the documents became visible again, and now Wikipedia links to websites on that website's archive. WhisperToMe (talk) 19:52, 27 June 2011 (UTC)


 * (After e/c)
 * To answer the basic question : No. There is no way to fool Archive.org into thinking a site has different permissions than it really has.
 * Of course robots.txt has no technical power. It's based entirely on the honor system, but Archive.org honors it.  And with good reason. If they became known as a malicious spider it would severely hamper their ability to do their job. APL (talk) 18:53, 27 June 2011 (UTC)
 * In that case, I may have to wait maybe 10-15 years (or however much time until robots.txt is removed?) - Or see if the NTSB will re-upload the content, or see if my federal representatives could ask the agency to restore the materials in the public docket related to accidents in the late 1990s and early 2000s. WhisperToMe (talk) 20:01, 27 June 2011 (UTC)


 * This CRS document may be of use; the Obama administration has declared that they want the US government to be more transparent than ever before. You should be able to talk someone at the NTSB into agreeing with you that the new robots.txt addition has made it less transparent, even though, if I understand the above correctly, this has to do with organizations outside of the control of the NTSB; and therefore it's at odds with the government's goals as expressed in this document and the directives it cites.  Comet Tuttle (talk) 20:40, 27 June 2011 (UTC)
 * Thanks for finding that, Comet Turtle! That's really helpful.
 * If there were outside agencies that asked for robots.txt, I'm not sure who it could be. The file could be reconfigured so that only material from the outside agencies would be affected.
 * WhisperToMe (talk) 21:49, 27 June 2011 (UTC)


 * What I meant was: The impact upon you (of adding the robots.txt file) was entirely at archive.org, if I understand correctly, so from the point of view of the NTSB webmaster, you're complaining about some external website he has no control over.  I think a useful angle, when discussing this with anyone at the NTSB, would be to discuss how archive.org helps disseminate this information, which is totally within the Obama administration's transparency mandate discussed in that linked document; so if they can help out archive.org by modifying one file, they oughta do it.  Comet Tuttle (talk) 22:14, 27 June 2011 (UTC)
 * In this case the webmaster does have control. Web.archive.org does not display archived pages on a particular domain if a robots.txt file is on the current domain. The NTSB just recently included a robots.txt file with its new website, so all of the old archives are blocked. If the NTSB modified or removes the robots.txt file, web.archive.org will display the archives again. WhisperToMe (talk) 22:35, 27 June 2011 (UTC)
 * Yes, I understand all of that. But the NTSB webmaster doesn't control that behavior over at archive.org.  It's not his fault that they behave the way they do.  Comet Tuttle (talk) 00:23, 28 June 2011 (UTC)


 * If information is not available on the NTSB website, you can pleasantly write to the NTSB web administrator and ask them to please provide a link to the content you want. If you are certain that the NTSB is withholding documents from you, you can file a Freedom of Information Act request at http://www.foia.gov/ - and your government representatives will mail, email, fax, or otherwise transmit any documents that they have.  FOIA is administered by a separate Federal agency, with the intent that FOIA representatives will not collaborate with any "coverup" by any particular agency.  There are certain legal requirements that documents, if they exist, must be delivered in a certain amount of time; but of course, specific documents that don't exist can not be delivered!  And you must trust the administrator of your FOIA request is diligently looking for the information you have requested.  If, even after a FOIA request, you still feel that the Federal Government is withholding information, you can pursue civil and legal actions, under the advice of an attorney, to sue the Federal Government for access to the information you are requesting; and a judge will decide what the best course of action is.  But let's be clear: just because something used to be on the public website does not mean that the Federal Government is required to host it on the internet in perpetuity.  Furthermore, just because the Federal Government is legally obligated to provide access to documents does not mean that they must provide access via any particular internet website.  Nimur (talk) 22:30, 27 June 2011 (UTC)
 * Thank you for letting me know about the FOIA, Nimur. In this case, all of the documents have existed. I'm going to see what the NTSB says when it e-mails me back. Honestly, I would be okay if I got all of the contents from those public dockets, so the contents can be re-published on wikisource and/or the Commons. WhisperToMe (talk) 22:39, 27 June 2011 (UTC)


 * Just a correction to what is otherwise correct in Nimur's post: FOIA is not administered by a separate federal agency. It is administered by FOIA divisions within the agencies in question. They are very much "in house," which becomes very clear if you file a lot of them. (In my experience, paradoxically, the more "closed" the agency, the better they are at handling FOIA requests. Give me FBI and CIA processing my requests any day — they know what they're doing. NARA, not so much.) There is FOIA oversight for guidelines, procedures, etc., but they are very much administered by the individual agencies. --Mr.98 (talk) 00:17, 28 June 2011 (UTC)
 * My error. "Each federal agency processes its own records in response to FOIA requests."  Thanks for the correction.  Nimur (talk) 03:32, 28 June 2011 (UTC)
 * http://www.amtonline.com/article/article.jsp?siteSection=1&id=8331 says that beginning in 2009 all public dockets should be released to the NTSB website in accordance with the FOIA plan... - I'm checking to see if the older dockets will still be online, though... WhisperToMe (talk) 16:50, 28 June 2011 (UTC)

Guys, http://web.archive.org/web/20070321223455/http://www.ntsb.gov/events/KAL801/ is working now! Robots.txt seems to have been altered to let us see old archives. YES! WhisperToMe (talk) 17:00, 28 June 2011 (UTC)

Swedish IPRED Law - keeping logs mandatory
The law / directive implemented by Sweden named IPRED (or somesuch) prompted several ISPs to start destroying their logs, to prevent the authorities from getting their hands on them. This was a while back. Has this law been changed, or have any new laws been passed, that force ISPs and other service providers to keep logs of all activity? I know of at least 2 (Swedish) VPNs (one of which is the Pirate Bay's webhost) that claim that they don't log anything, so I'm not sure what to make of this. Temptre.22 (talk) 19:11, 27 June 2011 (UTC)
 * To the best of my knowledge, and from my reading of Ipred-lagen, the law has not been changed. It should be noted, however, that
 * (...) Rättighetsinnehavare har dock möjlighet att begära att tingsrätten, med stöd av 26 § i lagen (1996:242) om domstolsärenden, förbjuder internetoperatörer att radera informationen, i väntan på att utredningen om ett eventuellt informationsförläggande har slutförts (...)
 * Meaning roughly, that a court of law may at its discretion prohibit ISPs from deleting logs after a plaintiff has brought a request for information before it, until the case has concluded, as this could constitute spoliation of evidence. See also WP:IANAL. Regards,  (talk) 07:16, 28 June 2011 (UTC)

firefox
how to backup favorites in firefox 5 ? — Preceding unsigned comment added by Tsp12345 (talk • contribs) 19:46, 27 June 2011 (UTC)
 * Ctrl+Shift+B should bring up the bookmarks library, then click "import and backup" AvrillirvA (talk) 20:54, 27 June 2011 (UTC)


 * Backing up your profile will get all your prefs and bookmarks and other goodies. To use with a new/different installation, you can just copy the contents into another profile dir (over the existing), or use Firefox's   option. ¦ Reisio (talk) 17:51, 28 June 2011 (UTC)

Wikipedia content automatically posted on Facebook
Apparently someone is using a bot to automatically create Facebook pages for Wikipedia articles. E.g this page.

Initially I thought someone had added it manually but I heard that it happens more often. Is it someone who wants to promote Wikipedia who does it or some search engine spammer?

I know it must be some bot because I improved said article a bit a while back and the lead picture changed on Facebook soon after I changed it on WP. SpeakFree (talk) 21:06, 27 June 2011 (UTC)
 * I don't use facebook but it looks like they're hosting a mirror of Wikipedia. Mirrors_and_forks/Def has some information. AvrillirvA (talk) 21:15, 27 June 2011 (UTC)
 * Well they are welcome to do so as they cite the license and link to the contributors. I guess Zuck & co. do it to generate more traffic to their site. SpeakFree (talk) 21:23, 27 June 2011 (UTC)


 * I've been aware of this for sometime, maybe a year - it appears to be fairly systematic.
 * Additionally I've noticed that two versions of articles are often created, one truncated article eg http://www.facebook.com/pages/MaK-G1206/110205232364409?sk=info and one full article eg http://www.facebook.com/pages/MaK-G1206/110205232364409?sk=wiki
 * It's not clear if this is a facebook official effort, or if someone is using a bot. OR WHY ??83.100.186.201 (talk) 21:26, 27 June 2011 (UTC)
 * If you look at a Facebook page that has a Wikipedia article, in my experience you'll see that there's not much else there. It's probably done so that these pages actually have some content. Wabbott9 (talk) 15:22, 28 June 2011 (UTC)

The only thing which is a bit iffy in a legal way is their use of images from Wikimedia Commons without citing the creators per the CC licence. But I guess they don't care, there must be millions of copyright infringing images on Facebook. SpeakFree (talk) 21:33, 27 June 2011 (UTC)
 * Edit: If you click on the image on the page it takes you to the Wikimedia Commons page. Don't know if that's enough though for citing the creators. SpeakFree (talk) 18:29, 28 June 2011 (UTC)
 * It should be since we do the same thing a lot of the time. The only risk with linking to an external site for the contrib history is you remain responsible for following the license so if the page disappears or changes to something unexpected you may find yourself violating the licence Nil Einne (talk) 15:35, 29 June 2011 (UTC)

Facebook community pages may incorporate content from Wikipedia— such use complies with Wikipedia policies on reuse of content. We at Wikipedia have no control over how the content is included nor can we help to remove it. Facebook does have a topic on Community pages and profile connections on their Help Center. ---— Gadget850 (Ed)  talk 12:19, 29 June 2011 (UTC)
 * Although unsurprisingly they did speak to the foundation about it and offer to work with them in some fashion an offer that was accepted     Nil Einne (talk) 15:35, 29 June 2011 (UTC)

Transferring DVDs to computer
My dad recently got our old home videos transferred from the original cassettes onto DVD. Now I want to put those files onto Windows Movie Maker to edit out all the boring junk like dance recitals and keep all the cute and funny stuff. But Movie Maker doesn't recognize that there's anything on the disc, and Windows Media Player doesn't recognize there's anything to rip. When I play the DVD on PowerDVD it works fine, but when I try to play on Media Player there's no sound... What can I do to be able to import these videos into Movie Maker? If it makes a difference, when I open up the DVD drive in Windows Explore, it shows the files on the DVD as having VOB, IFO, and BUP file extensions. I've never heard of those before. (When replying, please bear in mind that I have a good working knowledge of computers, but no clue about technical stuff. So when in doubt, dumb it down! :) Thanks.) Cherry Red Toenails (talk) 21:31, 27 June 2011 (UTC)


 * I don't think Windows Movie Maker understands VOB files, so you will need to convert them into a format which it does understand. Windows Movie Maker lists the formats it will understand. You can use free programs like Handbrake, MEncode, AutoGK or Avidemux to convert them into a suitable format, probably .avi would be best. Here's a guide for converting with Avidemux. In addition, Avidemux offers limited editing capability so depending on how complex the task is that might be good enough AvrillirvA (talk) 21:49, 27 June 2011 (UTC)


 * The VOB, BUP, and IFO files are the normal format for commercial movie DVDs (not Blu-ray). Note that there may be region codes with this format which only allow them to (legally) played in certain geographic areas.  There is a lot of software out there to rip those, but the one I use is Linux, so I'll let others make suggestions for Windows. StuRat (talk) 22:03, 27 June 2011 (UTC)


 * Of the software suggested by AvrillirvA, the easiest to use is probably Handbrake. It's super easy to turn DVD files into AVI files. --Mr.98 (talk) 23:16, 27 June 2011 (UTC)


 * I tried Handbrake, but could only get it to make m4v files (which Movie Maker still doesn't recognize). How do I get it to convert to avi? Cherry Red Toenails (talk) 05:34, 28 June 2011 (UTC)
 * I just checked and .avi support was removed in version 0.9.4, sorry. Version 0.9.3 is available here AvrillirvA (talk) 09:33, 28 June 2011 (UTC)


 * Thanks AvrillirvA! I got it as an avi file now. My new problem is that Movie Maker recognizes it as an audio track, not video. And even when I put it in the audio line, there's still no audio. Just a silent black screen... If anybody knows how to fix that, I'd sure appreciate it :) Cherry Red Toenails (talk) 19:07, 28 June 2011 (UTC)


 * I take it back--I do have audio. But still no video. Cherry Red Toenails (talk) 19:08, 28 June 2011 (UTC)

It has been ages since I last used Movie Maker (back on my old Windows ME edition!) but I always got the impression that Microsoft made it as difficult as possible to import anything other than Windows Media Video, so that customers were forced into using that proprietary video format. 213.102.128.195 (talk) 22:17, 28 June 2011 (UTC)


 * Fantastic :P (Also, why does that not surprise me...?) Any suggestions how to convert to that? Cherry Red Toenails (talk) 05:27, 29 June 2011 (UTC)