Wikipedia:Reference desk/Archives/Computing/2016 June 17

From Wikipedia, the free encyclopedia
Computing desk
< June 16 << May | June | Jul >> June 18 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded 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 17[edit]

MSIE oddity[edit]

Can anyone explain why when I view Periodic table with MSIE and search using Ctrl-F for mer it finds and highlights "Mercury", ditto if I search for "cury". But if I search for anything including "rc", it fails to find the element in the table. Thus Mer is OK but Merc fails. It all seems good in firefox. -- SGBailey (talk) 08:32, 17 June 2016 (UTC)[reply]

No idea, but I can confirm it's not just you. Rojomoke (talk) 09:10, 17 June 2016 (UTC)[reply]
It has a hidden hyphen in the middle. You can confirm this by either making the IE window much narrower, and "mercury" wraps, or by viewing the page source.--Phil Holmes (talk) 09:29, 17 June 2016 (UTC)[reply]
Foregotten a space charakter in the search string? --Hans Haase (有问题吗) 11:05, 17 June 2016 (UTC)[reply]
(No space in Mercury, Hans!) There's neither a space nor a hyphen in the template. Where does it get inserted? Dbfirs 13:22, 17 June 2016 (UTC)[reply]
It does appear to be something to do with the wrapping - "Zirconium" is found by an "rc" and "rco" search, but not a "con" search: and, indeed, when the table is shrunk, "Zirconium" wraps as "Zirco-nium". Perhaps the template talk page or WP:VPT is the place to continue this. Tevildo (talk) 17:13, 17 June 2016 (UTC)[reply]
{{Periodic table}} calls {{element cell-named}} which uses {{Element cell/id2shyphen-name}} which says mer{{shy}}cury to insert a soft hyphen. MSIE can apparently not ignore a soft hyphen when searching. This "mercury" has no soft hyphen of any type. This "mer­cury" has the html character entity &shy;. This "mer­cury" has the html numeric character reference &#173;. This "mer­cury" has the Unicode character U+00AD. PrimeHunter (talk) 23:49, 17 June 2016 (UTC)[reply]
I searched the above paragraph in IE 9.0. A search on "mercury" with no soft hyphen in the search string didn't find any of the three variants with soft hyphens. A search on "mer­cury" with a soft hyphen in the search string found all three but didn't find any "mercury" without a soft hyphen. Firefox 47.0 finds all occurrences regardless whether the search string itself has a soft hyphen. PrimeHunter (talk) 23:56, 17 June 2016 (UTC)[reply]

So, is there anything we can/should do about this, or is it just "one of those things"? -- SGBailey (talk) 06:55, 18 June 2016 (UTC)[reply]

Well, I would recommend using a browser other than IE if this bothers you. Other than that I am afraid there isn't much you can do. If many people complain about it then Microsoft may update IE one day. (((The Quixotic Potato))) (talk) 12:50, 18 June 2016 (UTC)[reply]

Driver[edit]

Why does the discontinued True Crypt driver written for Windows XP still work on Windows Vista, 7, 8, 8.1, and 10, but my webcam driver written for Windows XP only works on Windows XP and nothing else? How can one driver work across multiple versions but another wont work on anything except the version it was specifically written for? Is it a deliberate plot the make people buy a new webcam every time they upgrade the OS? 200.165.153.116 (talk) 16:49, 17 June 2016 (UTC)[reply]

It's a conspiracy I tell you... though seriously, it depends on what the driver hooks into on the OS, I would imagine that the XP webcam driver is trying to reference something which has been dramatically changed in newer OSs. What is the model of your webcam, I'd be shocked if a USB webcam doesn't work 'out of the box' for most modern operating systems -- samtar talk or stalk 16:56, 17 June 2016 (UTC)[reply]
Have you tested if the webcam driver works on Windows versions newer than WinXP? Sometimes manufacturers claim that a device only works on one specific operating system, even though it works on newer versions of the same operating system as well. (((The Quixotic Potato))) (talk) 18:02, 17 June 2016 (UTC)[reply]
The fact that one old driver might work fine under newer versions, while another does not, is one of the symptoms of the backwards compatibility wars that rage forever across the computing landscape.
It's not (usually) that Microsoft wants to force all vendors to rewrite every driver for each new Windows release, and most device vendors truly don't want to, either. In hopes that they won't have to, Microsoft (or any OS vendor) publishes various rules and guidelines for writing drivers. "Write them this way", the rules and guidelines say, "do call these well-documented support functions, and don't use any of these other nonstandard techniques which are not guaranteed to work in the next version."
Now, some device driver writers read and follow those rules and guidelines carefully, because they want their drivers to work in the next release. But there are others who either (a) have not even read the guidelines, or (b) are of a peculiarly creative bent which compels them to always find reasons why they just have to do something nonstandard. But then, sure enugh, their code doesn't work under the next version. --Steve Summit (talk) 19:45, 19 June 2016 (UTC)[reply]

Client-side Javascript[edit]

Not knowing much of anything about Javascript, I'm somewhat confused to read the "Using sortable tables" section of Help:Sorting, which notes the actual sorting process will happen on your computer using client-side JavaScript.

Consider this table, which uses the rowspan feature to split up the multi-county bits for Alliance, unless you re-sort it, in which case it creates two separate lines in place of the partially-merged-and-partially-separate original appearance:

Jurisdiction Classification County 2010 pop. Photo
Aberdeen Village Brown 397
Alliance City Mahoning 22,322
Stark
Eagle Township Brown 1,344

How does this work? Does the page source use Javascript tell my computer to sort stuff in accordance with predetermined rules (and if so, is something like rowspan included), or does the Javascript include the rules for sorting, or something else? Particularly confusing is the way that it creates an entire separate line once you sort the table that's rowspan equipped: the other stuff is just rearranging what's already there, but sorting causes the creation of a new line with new content that appears in an entirely separate place. Nyttend (talk) 17:35, 17 June 2016 (UTC)[reply]

The sortable-table behaviour, as described at that help page, is mostly specific to MediaWiki (it's implemented by this library). That library does have some support for rowspan and colspan in tables, but your example here may be too much for it (or may have some defect). As it's really a Wikpedia-specific issue, you'll surely find people with experience of this particular feature and its foibles at WP:VPT. -- Finlay McWalter··–·Talk 18:24, 17 June 2016 (UTC)[reply]
Okay, thanks. I hadn't originally gone VPT basically because it's not somehow a problem; I was just trying to understand for myself how the software interpreted the commands (not how I was supposed to format them), just as I would ask about software run by another website. Nyttend (talk) 18:58, 17 June 2016 (UTC)[reply]
As to how things work - HTML has tables, but they're basic, and don't have any dynamic behaviour. Javascript has access to HTML elements (it can read and write them, add and delete them, and can process events from clicks and stuff) but it has no higher level concept about things like sortable tables. So for websites to do something useful, dynamically, a bunch of code need to be written in Javascript. That code comes from the specific website you're looking at. A great deal of the modern behaviour we've all become accustomed to seeing on websites comes from such user-interface libraries - things like form validation, date or calendar widgets, image slideshows and carousels, autocompletion, and fancier kinds of diagrams, page layouts, and animations. These days sites might load a dozen or more libraries that do different things, some of them very fancy. Wikipedia has traditionally been very conservative about things like this (which is one reason people have always claimed it's "old fashioned"), and mostly limits things to stuff like sortable tables and incremental search, where everything would still mostly work even if Javascript was disabled. If you want a glimpse at what we might end up having in some magical future Wikipedia, check out some of the examples of the D3.js library here. -- Finlay McWalter··–·Talk 19:33, 17 June 2016 (UTC)[reply]

Installing Windows 7 OS from scratch[edit]

My desktop internal hard drive got broken, self-destoyed, I had to recover software and purchase a new Windows 7 OS directly from MS. I have done OS installation many times in the past but now reading the envelope where DVD is located I got scared.

"This software is intended for pre-installation to the hard drive of the fully assembled computer system, using OEM pre-installation tools. For information about using OEM pre-installation tools, see [1] Each individual software license inside this package is intended for distribution with a fully assembled computer system."

What does it all mean? I went to that website and there is a forest of gibberish and nothing simple that can be understood. I need help, thanks --AboutFace 22 (talk) 18:20, 17 June 2016 (UTC)[reply]

Backup the data from the hard drive if possible, using a Linux live CD and an external hard drive. Download the Windows 10 ISO file from any computer You trust, burn the ISO to a DVD or use ISO2USB, Microsoft links to it, to prepare an USB stick which is being formatted, loosing all data on it. From this USB stick oder DVD, install Win 10 on the Computer, using Your Win7 or Win8.x license key, before end of July this Year to get the update for free and owning a fuctional installation media. If You have the Linux on an USB stick, and a second USB stick with 4 to 8GB, it can be done on Your computer. --Hans Haase (有问题吗) 19:08, 17 June 2016 (UTC)[reply]
You can download, and use, a Windows 7 DVD for free. It will accept the Certificate of Authority key on the outside of the case. You might be able to return the DVD to the store aslong as you haven't opened the envelope and read its CoA. LongHairedFop (talk) 20:11, 17 June 2016 (UTC)[reply]
Basically, it appears to violate the OEM Windows license agreement to install it on a machine that you didn't build yourself for resale. But people do it all the time, and it seems to be informally okay with Microsoft. OEM Windows can be installed just like retail Windows. There's no technical requirement to use the preinstallation kit, though it may be a legal requirement. There's more information in this article.
(You shouldn't need to buy a new Windows license in the first place; the old license is still valid.) -- BenRG (talk) 21:14, 17 June 2016 (UTC)[reply]

Thanks. Life is getting more complicated every year. My wife has Windows 10, I hate it, so I will try to avoid it. I purchased Windows 7 OS after talking to customer service for half an hour. They actually sold it to me. I believe it covers all legal bases. Thank you much for explanations. --AboutFace 22 (talk) 01:21, 18 June 2016 (UTC)[reply]

Well, well, well. I just read the paper pointed to by BenRG who is a reliable and proficient contributor to many desks here. Yes, there is more information for sure but this is a problem. One has to hire a lawyer to interpret it all. I want to give a brief history of this computer. It is a Rack Mount R5400. I purchased it perhaps 10 years ago but it was absolutely top of the line at that time, I took care of it. The OS was either XP or Vista, I don't remember. I had an MSDN membership at that time and they would give you free software DVD's or you could download what you wanted like SQL Server. The license was "for research." Over the years I've upgraded hardware on my own, including a faster internal disk drive (velociraptor) and OS install: Vista, then Win 7. The hard disk drive crashed with Windows 7. I cannot understand the idea of being "pre-installed" and most likely will go ahead with installing Win 7 OS to a brand new velociraptor. I hope the system will be upgraded over time if I am able to install it. It is still a computer that is fast and serves my needs perfectly. I purchased new Win 7 OS straight from Microsoft and they charged me $150.00 plus tax. Does not seem to be a bad deal given that some distributors charge $260 or so as I just learned from that paper. Thanks, --AboutFace 22 (talk) 17:22, 18 June 2016 (UTC)[reply]

Notifications page[edit]

I'm no longer able to load the Special:Notifications page. I'm guessing the software was updated in the past couple weeks and is no longer supported by my browser. If this is the case, is there any way I can access the older software? (I'd rather not switch everything to email alerts). Reidgreg (talk) 19:23, 17 June 2016 (UTC)[reply]

Works for me. You might be better asking on wp:Village Pump/Technical, who are interesting in how Wikipedia works. LongHairedFop (talk) 20:08, 17 June 2016 (UTC)[reply]

How many sequences in Boggle[edit]

Given a concrete combination of dice (that is 16 letters in a 4x4 grid) and following the rules of Boggle, how many possible sequences are there? — Preceding unsigned comment added by Hofhof (talkcontribs) 20:57, 17 June 2016 (UTC)[reply]

After Googling that exact question, the first result was this website- http://www.danvk.org/wp/2007-08-02/how-many-boggle-boards-are-there/ I hope that helps! RedLinkJ (talk) 21:47, 17 June 2016 (UTC)[reply]
Not at all, although this is a complement to the question. The article linked above tries to find a rough upper limit to the number of boards. I am trying to find the number of possible sequences when you already have a board.--Hofhof (talk) 21:54, 17 June 2016 (UTC)[reply]
My apologies! I guess I read what I wanted the question to be, and not what the question actually was. Assuming I'm understanding your use of "sequences" correctly (i.e., how many paths are actually able to be made across the 4x4 grid), does this answer your question? https://www.quora.com/How-many-potential-words-exist-on-a-boggle-board RedLinkJ (talk) 22:06, 17 June 2016 (UTC)[reply]
That's in the right direction, at least as a top number. However, still does not include all constrains. It appears to accept patterns with non-contiguous letters (if it's already on the pattern), a pattern which is acceptable for an Android password, but not in Boggle. It would have to take into account that letters can (and probably will) be repeated. So, two aes near each other won't count as two starting points, if the patterns moves to a letter near both of them. It seems a much tougher problem than calculating permutations with a Haskell script.
Hofhof (talk) 22:24, 17 June 2016 (UTC)[reply]
I suspect that the Haskell script does apply the path continuity restriction. Since there are 16 distinct letters, the case where all blocks are distinct does apply, and this trivial backtracking Python (3) program produces the answer 12 029 540 (which is one typo away from the Quora answer):
SIZE=4
HSIZE=(SIZE+1)//2               # must include center if SIZE odd
NEIGHBORS=8
MINLEN=3

def hfactor(i): return 2-(i==SIZE//2)

def offset(n):
  if n>3: n+=1                  # avoid self
  return n%3-1,n//3-1

count=0
# A further optimization would be to restrict paths starting on the
# diagonal or midline to start out on one side of it.
for i0 in range(HSIZE):
  for j0 in range(i0,HSIZE):
    c1=0

    path=[(i0,j0)]
    turn=[-1]
    while True:
      while path:
        t=turn[-1]+1
        if t==NEIGHBORS: turn.pop(); path.pop()
        else: turn[-1]=t; break
      else: break

      i,j=path[-1]
      di,dj=offset(t)
      i+=di; j+=dj
      if 0<=i<SIZE and 0<=j<SIZE:
        p=i,j
        if p not in path:
          path.append(p)
          turn.append(-1)
          if len(path)>=MINLEN: c1+=1

    print(i0,j0,c1)
    count+=c1*hfactor(i0)*hfactor(j0)*(2-(i0==j0))

print(count)
Altering it to test for uniqueness given a certain letter grid probably just involves keeping a set of all words found so far and discarding the HSIZE optimization, which will probably extend the runtime from 1 to about 20 minutes. The memory consumption might be a problem, in which case the set could be kept only for each unique starting letter (rather than visiting them in grid order). --Tardis (talk) 15:45, 18 June 2016 (UTC)[reply]