Wikipedia:Reference desk/Archives/Computing/2012 October 11

= October 11 =

Organisation history visualisation
I wanted to make a chart showing the history of far-left organisations in my area. Anyone remotely familiar with the subject will know that such groups quite frequently undergo repeated splits and mergers (for those not familiar, think the People's Front of Judea and its associated splinter groups in Monty Python's Life of Brian) .Is there any kind of software that would be particularly suited to creating this sort of visualisation? I wanted to end up with something looking like this. Obviously it would be possible to do in any basic image editing program, but I was wondering if there was specialised software for this sort of thing. --149.135.146.88 (talk) 09:33, 11 October 2012 (UTC)


 * Clicking on your link pretty much took down my computer, so I assume it's some type of video. This seems unnecessary, to me.  A simple slide show presentation would be less CPU intensive, and would make it easier for users to step through it, to whatever point they want. StuRat(talk) 15:17, 11 October 2012 (UTC)


 * Uh? Mine or the OP's? The OP's is a blog post with a click-to-enlarge PNG file. Mine is a collection of 30+ thumbnails. Neither page did anything like taking down my computer. I'd suggest the problem's on your end, Stu. - Cucumber Mike (talk) 16:16, 11 October 2012 (UTC)


 * I placed my comment so as to make it obvious I'm talking about the OP's link. Yes, it was at my end, and I've since rebooted.StuRat (talk) 16:57, 11 October 2012 (UTC)


 * It remains impressive to me that you can blame the OP for your computer's problems, state quite baldly that you didn't see the page, make an assumption about what must have been on the page, criticize the page and/or OP (who can tell?) for doing it wrong (in your assumption), and offer up a non-sequitur of a suggestion for how to do it better based on your own misunderstanding of what the OP wants (an understand based, as you acknowledge, on your own computer's inability to let you see what they are linking to). What an utterly pointless exercise in foolishness, even by your standards.--Mr.98 (talk) 02:50, 14 October 2012 (UTC)


 * This comment does not belong on the Ref Desk. StuRat (talk) 03:01, 14 October 2012 (UTC)


 * Maybe Graphviz could be what you're looking for. I've never used it myself, but here are some examples of what it can do. - Cucumber Mike (talk) 15:08, 11 October 2012 (UTC)

Accumulated Double Declining Depreciation in Excel
The formula for computing double declining depreciation in Excel is relatively straightforward: DDB(Cost, Salvage Value, Useful Life, Current Period) So, for example, DDB(80000,8000,5,3) gives you 11520, the depreciation in year 3.

However, I cannot find a function that will give me accumulated depreciation (ie, the total amount of depreciation in previous periods, and the current one). In the above example, the answer would be 62720, which is basically DDB(80000,8000,5,1)+DDB(80000,8000,5,2)+DDB(80000,8000,5,3). Is there any way I can easily and automatically compute total accumulated double declining depreciation to date? Σ Α Π Φ (Sapph) Talk 12:11, 11 October 2012 (UTC)


 * You can use VDB to calculate over an arbitrary period, so you can set the start period to 1 and the end period to the period you want total depreciation on. VDB Documentation209.131.76.183 (talk) 12:27, 11 October 2012 (UTC)

Problems burning a CD-R: On The Fly error
I'm trying to create a backup copy of a software CD and I keep getting the error message "Could not complete the On-The-Fly disc copy process.". Here's the log data:

User Name   : Windows User Company Name : CyberLink CDKey       : REDACTED OS Version  : Windows 7 Home PremiumService Pack 1 C:\Program Files (x86)\CyberLink\Power2Go\Power2Go.exe : Version 6.1.0.3802 CBS.dll : Version 7.7.4810



Total physical memory : 3563MB (3649400KB) Free physical memory : 2181MB (2233952KB) Memory load	     : 38 percent

Number of CPU : 4 CPU Name     : AMD A6-3420M APU with Radeon(tm) HD Graphics CPU Speed    : 1497 MHz



11.10.2012 Task Type : Copy Disc

09:31:50, File(cl_DiscCopyCD.cpp), Line(90) -> Begin burning process Current drive:	 Current writing speed(x): 32.0 ====== Disc Info ======= Disc Type: CD-R Disc Status: Blank, Appendable Num. of Sessions: 1 	Num. of Tracks: 1 Disc Capacity: 336223LBs Free Size: 336223LBs Used Size: 0LBs ========================	->Burn on the fly Current reading speed(x): 16.0 Burn option: w/ buffer underrun protection Burn option: w/o simulation Burn option: w/o overburn Burn option: w/ verify disc Burn option: w/o extra long disc

09:31:55, File(cl_Cdwrite.cpp), Line(2697) -> Setup drive Sessn: 1, Sessn type: Disc At Once Disc physical format: CDROM_MODE1 Trk: 1, Trk mode: MODE1

09:31:55, File(cl_Cdwrite.cpp), Line(1966) -> Start session Sessn: 1, Start trk: 1, Last trk: 1

09:31:55, File(cl_Cdwrite.cpp), Line(1992) -> Start track Trk: 1, Track start addr(LBA): 0, Trk size(sectors): 303348, Sector size(bytes): 2048

09:32:27, File(cl_Cdwrite.cpp), Line(2430) -> Write end/Close disc Burn option: w/ close disc Burn mode: DAO

09:32:27, File(cl_DiscCopyCD.cpp), Line(935) -> Burning Fail, ErrCode: 0xeb020b88



Error Code : 0xeb020baf

Any clue why it's doing this? 199.241.185.195 (talk) 13:48, 11 October 2012 (UTC)


 * Usually the best way to solve problems like this is to Google for the error message. When I do so, I quickly see the following on a site called TechBlog:  "If you ever see the error 'Burning Fail, ErrCode: 0xeb020b88' then I've found the solution today; Turn down the write speed of the CD-R / DVD-R drive to a lower setting and this seems to do the trick.". Looie496 (talk) 14:52, 11 October 2012 (UTC)


 * Of course that's basically how you fix any error at all with burning. ¦ Reisio (talk) 02:56, 12 October 2012 (UTC)

A simpler solution is to dd the existing CD to a file as a backup, and read it in future with something like ImDisk or otherwise mounting as a loop device. ¦ Reisio (talk) 02:56, 12 October 2012 (UTC)

Thumbs.db
I've copied content from computer to computer for the last seven years, and whenever I backup my Windows 7 computer's hard drive, I notice the existence of multiple thumbs.db files. I've read Windows thumbnail cache, but just to be sure, I wanted to ask — do I understand rightly that deleting these images should have absolutely no effect on my system? I'm not going to waste time finding them to delete them, but I've always been mildly concerned when I get a note warning me that a thumbs.db file won't properly copy from place to place. Nyttend (talk) 16:00, 11 October 2012 (UTC)
 * Yes, it's fine to delete them. If there is a Thumbs.db file, Windows will display thumbnails from its cache. If there isn't, it will regenerate the cache. — cdwn 16:46, 11 October 2012 (UTC)


 * "Absolutely no effect" is a very strong term. By removing the thumbnail cache, you're incurring a non-zero amount of extra work for the system'sexplorer.exe process, who will re-generate the cache at some point in the future.  Now, I'll be the first to admit that this is usually pretty trivial, and in most normal cases, this extra processing load should be, in practice, indistinguishable from zero extra work; but computers are very precise machines, and for the sake of precision, it's usually best to refrain from "absolute" statements.  Nimur (talk) 16:58, 11 October 2012 (UTC)
 * Actually, it won't be anywhere close to "indistinguishable from zero extra work" in practise. Image processing is a fairly involved business. —cdwn 17:07, 11 October 2012 (UTC)
 * Oh, I see; the article's comments about other forms of image thumbnailing in Windows Vista and Seven made me think that thumbs.db wasn't even used by my operating system. Nyttend (talk) 17:19, 11 October 2012 (UTC)
 * Sorry, you are correct; if you are deleting Thumbs.db files from disks originally mounted in Windows XP, and then if you're only using them on Windows Vista or Windows 7 (or newer), the thumbs.db files need not be re-created in each directory. (Recent Windows versions use a centralized database for the thumbnails, as explained in our article and elsewhere on the web).  I apologize if I've confused the issue, I mis-read your problem-statement.  Nimur (talk) 03:02, 12 October 2012 (UTC)

ls -d in linux
Shouldn't ls -d show me the directories in a directory? (it shows .) Why is it like that? OsmanRF34 (talk) 17:05, 11 October 2012 (UTC)
 * I think you misunderstand how  operates at a low level. You can see what it is supposed to do here:


 * If you truly want to list the directories, you want, or something like the following:


 * As for why it is like that, it seems expected to me. ls with no files in its arguments runs ls on the current directory. ls -d with no files in its arguments does the same with . cdwn 17:13, 11 October 2012 (UTC)
 * lists all files in the current directory, not just directories.  is better.—Emil J. 14:15, 12 October 2012 (UTC)
 * That's not true, it will only list directories (and  is not defined by POSIX). — cdwn 04:23, 15 October 2012 (UTC)
 * Did you actually try it? -d means "if a directory is listed on the commandline, print its name rather than recursing into it." It has no effect on the behaviour for non-directories. Try it and see. Marnanel (talk) 04:25, 15 October 2012 (UTC)
 * Sorry, I misread the comment. Either way, as far as I know */ is only defined in POSIX as a symlink dereference. — cdwn 12:51, 15 October 2012 (UTC)

An alternative might be  ¦ Reisio (talk) 07:20, 12 October 2012 (UTC)
 * Does this not work in linux? (sorry I can only test in Solaris): ls -l|grep ^d Sandman30s (talk) 13:36, 12 October 2012 (UTC)
 * It works, though my shell insists that I quote the ^.—Emil J. 14:15, 12 October 2012 (UTC)

email and copyright verification
Note that this question has a legal dimension, but I'm not asking about the legal side, ie. whether something would actually stand up in court. I'm only wondering if there are any holes in this idea from a computing point of view. So let's say I have written a song, and I email the lyrics/ mp3 file to myself, and try to use this to prove copyright. If someone doubted it, I could just log in to my email, and show them the date of posting. Can this be faked? As a side question, I am curious if anyone knows of actual cases involving this, but just for reading interest. It's not legal advice, because I am a long way from having anything to worry about at this stage - just interested firstly in the forensic side, and (while I'm on the topic) if anyone has come across any news items on the legal side. From the legal point of view, I don't care which jurisdiction, just interested in any such cases that have made the news/ blogosphere. IBE(talk) 18:37, 11 October 2012 (UTC)


 * An email is just a text file; it's trivial to fake any part of it, including the sender and the date. I don't think one can do what you want withS/MIME either. There are Copyright registration services which, being trusted and accredited third parties, are a reliable way of dating a document; some may accept electronic submissions (I can't see why not). A simple email-self scheme, like other shonky forms of poor man's copyright, leaves many avenues open to later challenge. -- Finlay McWalterჷTalk 19:00, 11 October 2012 (UTC)


 * That said, sending it through a mail service often results in that service adding its own header lines. It might be possible for say HoTMaiL to confirm that a given mail was processed by their system at a given time - but as that's not the purpose of those headers, and confirming this kind of thing is HoTMaiL's job, one would not expect that using their headers to prove dates would be a trivial matter. -- Finlay McWalterჷTalk 19:08, 11 October 2012 (UTC)


 * If I email something to myself using, say, gmail, the message will reside on Google's server as long as I don't delete it, and the server will have a record of when it was sent. Unless I could hack into Google's server, I don't see how I could fake that. Looie496 (talk) 19:26, 11 October 2012 (UTC)


 * Sure, but getting Google to confirm (in court) what records the server has isn't easy. Google can reasonably say "we're an email service, not a notary - while we think the date records are accurate, we don't take sufficient steps to make totally sure they are, so we're not going to stand up in court and say so". That's the difference between them and a real notary or copyright registrar - being sure enough to testify about datesis their job (that's why you pay them). -- Finlay McWalterჷTalk 19:34, 11 October 2012 (UTC)


 * We may be talking at cross purposes here. Suppose I actually log in in front of someone. Can I fake things then? The date appears on the email, and is taken from Google's server, and the web address will appear on the browser, so it looks much harder to manipulate. Assume for answering the question that it does not involve contacting Google, just showing stuff on a computer. IBE (talk) 20:56, 11 October 2012 (UTC)


 * No, you're talking about the same thing but missing Finlay's point. You are likely right that items in your "Sent Mail" folder are exactly what you actually sent and can't be falsified by yourself, on a technical basis I would agree with you - but the legal response is "So what? It's plausible hearsay, but it is still hearsay. Where is your confirmation from Google that this specific item was submitted on this specific date?". And all that showing someone that you can log in and look at Sent Items does is let them swear an affidavit that they saw you type at a computer. Did they check where the wire went after it plugged into the wall? Even if you could persuade a judge to let you fire up a laptop in their courtroom, it's still just you typing at a computer. So you will need to get Google to provide a copy from their own server, certified by one of their staff as a true copy - which is just not going to happen, as Finlay says. What you are suggesting is enough to make an assertion of copyright, the same as faxing yourself chords and lyrics, or mailing the old way using a cancelled stamp on an envelope. (Both of which I'd suggest before or in addition to trying email) It will be enough for most purposes and even in court could stand up if combined with other proofs but it is not cast-iron by any means. So if you've just written the next Stairway to Heaven, use a notary or registrar. Or send it to me, I'll take care of it. :) Late note: possibly you could hire a major cyber-forensics firm to do an end-to-end evaluation of the Sent Item as an expert witness, for whatever that's worth.Franamax (talk) 21:54, 11 October 2012 (UTC)


 * An email could load external content when you open it. If you send yourself an email today to yourself you could later change this external content and the email message would show the reader what you want to show him. No need to fake date or hack the email server. It's quite simple and only low skills are required. For a better implementation, from a computational perspective, of the same idea see better Trusted timestamping. It's technically doable, but I don't know what to say about the legal aspect, how it stands in a court of law, and so on (it's also not the purpose of the RD). OsmanRF34 (talk) 20:58, 11 October 2012 (UTC)


 * Thanks for the answer - of course I'm still interested in any further comments on this, but it's exactly what I was wondering. I know the rules about legal advice, which is why I said I didn't care which jurisdiction. True legal advice requires a knowledge of a particular jurisdiction, so American examples would be useless to me in Australia if I were interested in advice. The significance of the legal angle is that it shows what experts have established in front of a judge, when money is at issue, hence establishing facts is taken very seriously. IBE(talk) 21:03, 11 October 2012 (UTC)


 * I actually think there is a potentially bigger problem then highlighted above. Gmail supports IMAP and therefore it's possible to migrate or import email including sent email . I've never done this personally so I'm not sure whether there's any actual sign of when or whether the emails were imported (rather then being added by Google themselves) but it wouldn't surprise me if there are no signs to the end user. That being the case, while Google may very well have their own internal records, getting them to testify about these is likely to be difficult as suggested above. So in fact spoofing emails which appear to have been sent at a certain time but weren't may be a technically trivial matter requiring no real hacking. You could use a service which doesn't provide IMAP, but you'd need to ensure there really is no way you simply aren't aware of to spoof emails on your account and perhaps more importantly, you always run the risk that the service adds something like IMAP which may enable such spoofing since it's unlikely to be a major concern for them as it's not their intention to be a timestamp service. If you use Google Apps and pay for something like Vault  it's possible there is something there sufficient but I'm not entirely sure and it seems a silly way to go about it if your sole intention for such a service is as suggested above.Nil Einne (talk) 03:39, 12 October 2012 (UTC)
 * I've semi confirmed my hunch with Gmail. Using Thunderbird I moved some emails from the sent folder of one of my Gmail accounts to another. Then using the webmail interface and also 'show original' I see no sign that the email was anything other then what it purports to be, an email sent at the time (in 2005). Going further I found that you cannot simply open an email you save as an EML (whether or not you modify it) and then copy it to the sent. While the date shows up correctly with no sign when you open the email it's anything other then what it seems to be (including if you show original), in the sent folder in Gmail it shows up as having been very recent/when it was uploaded (I think or may be it's when it was opened in Thunderbird). The same thing happens if you open and copy it to a local folder and then move it to the sent folder on Gmail. This does not happen if you move stuff from Gmail sent folder to a local folder then to another Gmail sent folder so clearly it's just something that Thunderbird is doing (I guess it's storing some internal date of when it was modified which it sends to Gmail when it uploads the message).
 * However to further prove the point, I moved some sent stuff to a local folder, modified it including the date and most headers (with a simple text editor when Thunderbird was not running) and uploaded it back. And no sign it was anything but what it purported to be/what I uploaded (well I accidentally added a 'X-Mozilla-Keys:' header but if anything that just shows you can do whatever you want).
 * I did come across one interesting errata. It seems if the date is before 2005 or sometime between Jan 2004 and Jan 2005 (perhaps when Gmail went public in 2004?), it sorts incorrectly. While the date as shown in the folder and elsewhere is correct, the earlier stuff shows up on the top above everything else including stuff sent after they were added. Albeit these are also sorted, in chronological order (so 1990 shows up before 2004). This IMO is a bug. While this may be before Google Mail existed, it doesn't make sense to sort in that fashion. It's obvious it was before Google existed but if you migrated your email to Google there's no reason you want the older stuff showing up at the top. (And if you're truly spoofing, the person who trusts a date before Google Mail existed is frankly an idiot.)
 * Nil Einne (talk) 05:13, 12 October 2012 (UTC)
 * P.S. Something which I have been thinking about and which (found while trying to find out what's up with the sorting) suggests, it's possible there are some signs you can find, perhaps via IMAP that everything is not as it seems since I'm only looking at stuff from a very high level abstraction. However again, it seems risky to trust them as it's possible there would be some way to fix those as well (and even more so over many years). For example if doing what I'm doing screws up the IMAP sequence numbers you could likely use some tool to fix these by downloading and deleting all the content and then reuploading it in order. (As suggested there even if it didn't work because of the way Thunderbird handles such stuff.) This does of course mean that if you're are trying to trick someone, other then the fact if they are sufficiently competent they'd realise they can't trust the date anyway, if you don't know what you're doing you could easily leave signs of what you did. Nil Einne (talk) 05:26, 12 October 2012 (UTC)
 * P.P.S. As it turns out the stuff from 2004 and before is now sorting correctly, I guess it was just a temporary issue. I actually seem to recall noticing something like this before but I can't remember when or where. But anyway if you trust my sent folder, you'd believe I emailed Bill Gates in 1990 inviting him to join Google mail. Nil Einne (talk) 05:30, 12 October 2012 (UTC)

Thanks everyone for the help. Feel free to add more. Also, I'm typing during a coffee break, so haven't had time to read it in full, but it looks clear and quite comprehensive. Just adding a thankyou note in case I'm caught up and have to read the full thing from the archives. IBE (talk) 05:06, 13 October 2012 (UTC)

Text in php/html
I have a website (php/html) and would like to translate it with poedit. In order to do so I need to write all texts (which are displayed on the site) as: <?= _('Text') ?>. Are there any tools/scripts that help me to find all such "text" in an html file or that find any non-replaced text?bamse (talk) 19:33, 11 October 2012 (UTC)
 * There are a variety of Linux tools that claim to do that. Would that be helpful to you?  If so, try googling for "html2po".  I'm not sure what will happen to your php code, though. Looie496 (talk) 23:45, 11 October 2012 (UTC)
 * Thank you. bamse (talk) 06:27, 12 October 2012 (UTC)


 * I would just note that in your case, it looks like the script may already be trying to be internationalized and has some of that already built in. The _('Text') formatting often means, "I have created a function named underscore, which checks this text against a localization table, and then returns whatever the equivalent is for whatever the language settings are." (This is how Wordpress, among other platforms, does localization.) You might poke around to see if there's an easier way than the way you are approaching it — the text may already be in a file, somewhere, either translated or in a format that's easy to translate without modifying the original. --Mr.98 (talk) 12:29, 12 October 2012 (UTC)


 * Not sure I understand what you mean. I don't have that _('Text') formatting yet in my html files. I am looking for an automatic way to add this formatting. After that, gettext will do the rest. bamse (talk) 20:38, 12 October 2012 (UTC)


 * Ah, I understand now. I misunderstood before. I thought you were trying to modify code that was already gettext'd. --Mr.98 (talk) 00:31, 13 October 2012 (UTC)