Wikipedia:Reference desk/Archives/Computing/2013 June 28

Computing desk
< June 27 << May | June | Jul >> June 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.


June 28

edit

Port Forwarding Through a Range Extender

edit

I have to use a range extender to be able to connect my Desktop to the network in order to get my internet. I have a cable running from the extender to my desktop and then the extender has a wireless connection to the router. I am trying to port forward my computer so that I can have a friend (who is in Australia, I am in America) can join on my private minecraft server for a project we are building. However when I port forward my computers IP address and the port the servers connected to like normal he can't connect. All my online searching keeps telling me that I just have to port forward like normal and it should work. However it's not working. My extender doesn't have port forwarding but does have it's own separate signal for wifi. I can even set the password to something completely different from the routers if I want to. I'm new to extenders as I haven't needed to use one until now so I am not sure how this is suppose to work. Does anyone know how I can get my server, which is on my computer, to be port forwarded through my extender and router so my friend can join me? This stuff confuses me so please be simple with explaining it. Thank you. 24.113.181.116 (talk) 02:41, 28 June 2013 (UTC)[reply]

It's likely to depend on the way the "extender" actually works. Do you have a manufacturer and model? --Phil Holmes (talk) 09:16, 28 June 2013 (UTC)[reply]

Netgear WiFi Range Extender WN2000RPTv224.113.181.116 (talk) 19:10, 1 July 2013 (UTC)[reply]

How do i add "Contents" table on a wikimedia site?

edit

I am wanting to make a table of contents like the one shown here:

http://en.wikipedia.org/wiki/Red_Dwarf

I noticed i can get the right justified images by clicking "Edit" on the article and finding the relevant code. However, i cant find the code for the Contents table. Right where its meant to be there is nothing. How can i achieve these highly useful tables? Thanks!

216.173.145.47 (talk) 03:41, 28 June 2013 (UTC)[reply]

It is added automatically if an article has sections. There is a way of suppressing it, but you don't have to do anything special to get it. Looie496 (talk) 04:04, 28 June 2013 (UTC)[reply]
That's nearly correct. The TOC will automatically be put in if the article has at least four sections. Dismas|(talk) 04:21, 28 June 2013 (UTC)[reply]

This information is correct. Thank you! 216.173.145.47 (talk) 04:27, 28 June 2013 (UTC)[reply]

You can add it manulay by adding __TOC__ in your article. Rabah201130 (talk) 16:05, 30 June 2013 (UTC)[reply]

Detecting HTML 5 support (in general, and specifically on Wikipedia)

edit

How does a web page detect if a browser can use HTML 5 video? If I go to WP:VE, it says I should use an "[HTML 5 video browser]" and the video won't play. But, if I go to Apple's HTML 5 test site [1], the video plays without any problems. So, generally, how does a website or widget detect whether or not I have an HTML 5 browser? And, specifically, why does Wikipedia think I don't have one, when the Apple HTML 5 video works fine? I haven't tried any other HTML 5 video, and I am using Safari 5.1.8. RudolfRed (talk) 06:16, 28 June 2013 (UTC)[reply]

HTML5 is a fairly large standard and also still at Candidate Recommendation (CR) so supporting HTML5 has a somewhat unclear meaning. In this particular case you seemed to be referring to HTML5 video, as our article notes, the standard specifies a method to include video on a page, it does not however specify any format that should be provided and supported. Because of opposition to formats which may require royalties to encode or decode in line with the support of the free content movement, all wikimedia projects only support Theora and VP8 for video but as our article shows, Safari only supports H.264. Nil Einne (talk) 13:09, 28 June 2013 (UTC)[reply]
Thanks for the explanation. RudolfRed (talk) 15:11, 28 June 2013 (UTC)[reply]

Excel number crunching - am I missing a trick?

edit

Hi there,

So I've got another question about excel lists and was wondering if anyone could help me.

Essentially the table looks a bit like the following table, except it's got over 15000 rows.

Name Value Date
Bob Jones 200 1/6
Mike Evans 32 1/6
Suzy Boo 109 2/6
Roger Smith 24 3/6
Bob Jones 51 3/6
Suzy Boo 67 3/6
Henry Rogers 33 3/6
Dan Edwin 110 3/6

You'll see that some people appear in the table more than once. What I need to do is calculate the total "value" for each person - in some cases (eg in this example) they're going to have several entries (eg: Bob Jones = 200 + 51), and in some they'll only have one. I could sort it by name, but then I'll still have to go through it manually and find duplicate names. Is there an easy way to combine the "value" entry for identical "name" fields? In theory there's no limit to the number of times someone can appear in the table. Please let me know if you have any questions. Thank you! Seal Boxer (talk) 09:53, 28 June 2013 (UTC)[reply]

To get this:
Name Value Date Total
Bob Jones 200 1/6 251
Mike Evans 32 1/6 32
Suzy Boo 109 2/6 176
Roger Smith 24 3/6 24
Bob Jones 51 3/6 251
Suzy Boo 67 3/6 176
Henry Rogers 33 3/6 33
Dan Edwin 110 3/6 110
Use this formula in cell D2 (assuming the cell with "Name" in is A1): =SUMIF($A$2:$A$9,A2,$B$2:$B$9). Rixxin (talk) 12:58, 28 June 2013 (UTC)[reply]
I would export the spreadsheet to R via csv and then use tapply or the plyr package.

E.g. export to csv from excel resulting in something like this:

data.csv
name, value, date
Bob Jones, 200, 1/6
Mike Evans, 32, 1/6
Suzy Boo, 109, 2/6
Roger Smith, 24, 3/6
Bob Jones, 51, 3/6
Suzy Boo, 67, 3/6
Henry Rogers, 33, 3/6

and then in R run

data = read.csv('data.csv')
merged.value = tapply(data$value, data$name, sum)
# e.g. to see the highest values (and the associated names) run
tail(sort(merged.value))

Learning the basics of R might take an evening but it's quickly going to be worth it if the alternative is using excel for everything. --81.175.227.88 (talk) 13:03, 28 June 2013 (UTC)[reply]

Not sure how useful it is to send the OP off to use a different package from the software for which they wanted help. StewieCartman (talk) 13:33, 28 June 2013 (UTC)[reply]
Excel is horrible --81.175.227.88 (talk) 13:38, 28 June 2013 (UTC)[reply]
Thanks - that was interesting. But it doesn't prove that Excel is horrible. Anyway - I just feel like you've provided a whole bunch of information that wasn't asked for and would likely not even be used. StewieCartman (talk) 14:12, 28 June 2013 (UTC)[reply]
A pivot table will do what you want. --Phil Holmes (talk) 14:36, 28 June 2013 (UTC)[reply]
A pivot table would be messy if the OP needs the date information as well. StewieCartman (talk) 14:50, 28 June 2013 (UTC)[reply]
The specification was "an easy way to combine the "value" entry for identical "name" fields". No mention of date. A pivot table meets that spec simply and perfectly.--Phil Holmes (talk) 11:14, 29 June 2013 (UTC)[reply]
Will you source table ever grow or be updated? I've got a solution that is partly manual so you wouldn't want to repeat it too often.
Make a copy of your sheet. Sort on name, keeping the header information. Then in cell D3 place "=if(b2-b3,"duplicate","-"). Copy this down to the lowest row. Copy Column D and then paste with values. Then establish filters and delete the rows where Column D contains "duplicate". Now you have a list of unique names. Delete Column D.
Now use the SUMIFS function in Column D to accumulate the Value values from the original sheet for all instances of each name in the new sheet. Good luck. Hayttom 07:55, 29 June 2013 (UTC) — Preceding unsigned comment added by Hayttom (talkcontribs) [reply]

Copying and pasting the title of a newspaper adds additional text: what's the go with that?

edit

Hi all,
I've often noticed when I add citations to articles from online newspaper sources, there is often additional data attached to the plain text in the title.
Example: when I fixed a dead link here from this source I was expecting to be able to paste into the {{cite news}} "title" field just "Art's Great Whodunit: The Mona Lisa Theft of 1911". No such luck.

  • The text is "Art's Great Whodunit: The Mona Lisa Theft of 1911"
  • When copied, the text is "Art's Great Whodunit: The Mona Lisa Theft of 1911 Read more: http://www.time.com/time/arts/article/0,8599,1894006,00.html#ixzz2XUy8liNs".

I do grok a little html, .css and .js, but I'm still 99.94% confused. Why does this happen? How does it work? Is this some way for the online works to keep track of their content?
Pete aka --Shirt58 (talk) 09:56, 28 June 2013 (UTC)[reply]

I've seen that happen - notably with MailOnline. I suspect they do it so they get the linkbait from unsuspecting people copy&pasting chunks out of their articles. Not entirely sure how, however. Seal Boxer (talk) 12:23, 28 June 2013 (UTC)[reply]
Since the Wikipedia edit window is plain text (for now at least), it should be easy to spot any additional link bait that gets caught up with your cut & paste. Another good argument against a visual editor??? Astronaut (talk) 15:26, 28 June 2013 (UTC)[reply]
If the visual editor can copy text without it showing up, it is a show-stopper, I'd have thought. How can anyone be held responsible for edits they can't see? AndyTheGrump (talk) 15:34, 28 June 2013 (UTC)[reply]
I left a comment on the VE feedback page. Astronaut (talk) 15:50, 28 June 2013 (UTC)[reply]
I just restored this text after I apparently deleted it with an ec... 209.131.76.183 (talk) 15:54, 28 June 2013 (UTC)[reply]
This can be implemented in javascript by hooking the copy event. The handler takes the highlighted text, adds the extra text, then moves it into the clipboard. I'm having trouble finding a reference for taking over the copy operation, but I see plenty of information on copying arbitrary text to the clipboard. I would expect the relevant keywords to be "javascript", "clipboard" and "hook", but maybe a different term is common for the practice. I might also be possible that they're catching the Ctrl+C key combination, not the actual copy event. Does the text get added if you right-click and select copy? 209.131.76.183 (talk) 15:53, 28 June 2013 (UTC)[reply]
"Does the text get added if you right-click and select copy?" : Yes, and it also shows in the Wikipedia edit window.
(As a decidedly Liberal Arts kind of nerd, I sometimes have a little naughty fun with folks who actually know about this stuff. One Saturday morning, I called my ISP's tech support centre, and told them that the internets wasn't working. After a little bit of remote diagnostics, the chap told me that my modem had been assigned an invalid IP address. I asked, "do I need to buy a new one at computer shop?" You could actually hear the poor guy's facepalm.)
Inside <script></script> tags in lines 76 to 98 in the HTML source for the page, there is javascript code that I guess appends the extra data. Line 84 is
s_time.prop14 = 'http://www.time.com/time/arts/article/0,8599,1894006,00.html';
which I think is what identifies the page and adds the extra data on select + right-click events.
And yeah, there is an "omnitureHookFunction" in the script (whatever that means).
Thanks, 209.131.76.183, you've answered my question just fine. (And why not create an account? You can chose a boring username like mine, get positively identified in lame edits wars, and get named in Wikipediocracy threads! Erm, on second thoughts...) Pete aka --Shirt58 (talk) 10:25, 29 June 2013 (UTC)[reply]

HTML analysis/compression/"un-templating"

edit

Is there a library out there that detects patterns in a stream of HTML pages and then separates the common and more or less varying parts? This is difficult to search for since I don't really know what would be the keywords. --81.175.227.88 (talk) 12:15, 28 June 2013 (UTC)[reply]

This is called Wrapper induction and in general this is a hard problem. For one simple approach, check out the perl module HTML::Untemplate. --Mark viking (talk) 15:10, 28 June 2013 (UTC)[reply]
Thanks. --81.175.227.88 (talk) 18:16, 29 June 2013 (UTC)[reply]

Old version of a PP 2002 file

edit

I think I know the answer to this one, but ... I'm advising someone who has saved an unwanted version of a PP 2002 file over the wanted one, thus losing hours of work. No back-up. I don't know if autosave was on. Is there any way to recover the earlier version? Itsmejudith (talk) 18:12, 28 June 2013 (UTC)[reply]

What operating system are they using? There are programs available that can retrieve "shadow copies" of files (previous versions) but apparently only Windows Vista and 7 (maybe 8?) do this. If they are using one of those, I've heard good things about Shadow Explorer, which can be used to retrieve these versions (if you are going to download that program, make sure you go to the downloads tab at the left of the page, underneath about - there are many spammy fake ad download buttons on that page...) Hope this helps! --Yellow1996 (talk) 01:06, 29 June 2013 (UTC)[reply]