Wikipedia:Reference desk/Archives/Computing/2018 March 28

From Wikipedia, the free encyclopedia
Computing desk
< March 27 << Feb | March | Apr >> March 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.


March 28[edit]

Wikipedia can display category links directly on desktop browsers, but not on mobile browsers. There are several broswer extensions can manage userscript, some of them works with mobile devices. So is it possible to write an userscript to display the category links? --Great Brightstar (talk) 04:32, 28 March 2018 (UTC)[reply]

On the en.m site the categories are not loaded. So you cannot make them easily appear. Via other URLs you could get it, the easiest being to click on the desktop link at the bottom. Graeme Bartlett (talk) 07:26, 28 March 2018 (UTC)[reply]
Registered users on the mobile version can currently see categories by enabling Wikipedia βeta. Click the menu icon at the top left and click Settings. PrimeHunter (talk) 19:01, 29 March 2018 (UTC)[reply]

finding files that exist in one directory tree and not in the other[edit]

My scenario is as following: 2 Windows machines ,Win7 and Win10, where I have 2 directory trees, I'll name them A and B. The directory tree is completely different, but most files exist in both A and B. I need to locate and copy the files that exist on A but not in B. There are far too many files (on both A and B) to do this manually.

Help will be appreciated.

אילן שמעוני (talk) 06:24, 28 March 2018 (UTC)[reply]

Beyond Compare can do that - i.e. ignore the folder structure and "align" the files. Free trial. 196.213.35.147 (talk) 07:55, 28 March 2018 (UTC)[reply]
  • Two questions:
  1. The files are on two machines which might prove difficult to handle. Is that realistic to copy A into A' on the same machine as B, or the reverse, do the comparison-copy thing to extract the desired folder C, and then delete A'? If A or B is at most a few GB, that works, but if you are handling an enormous amount of data that will not be practical. (From your post, I would guess the problem is not the size of the files but rather their number.)
  2. What does it mean for a file to be "in A but not in B", exactly? Is it enough to compare file names, or could there be a file in A with the same name as a file in B but with different contents, and which must be copied? Could there be multiple files with the same name in either directory tree (in different folders)?
Assuming a positive answer to the first question, if 196.213.35.147's suggestion does not cut it, ping me with the answer to #2 and I can provide a quick Python script to do it. TigraanClick here to contact me 13:06, 28 March 2018 (UTC)[reply]
You were right to assume is the sheer number of files. there are about 150,000 of them. The comparison has to be by content - it is quite possible that two versions of the same file exist, one edited by machine A owner and the other by B's owner. Nobody used a versioning system, so both versions must coincide until someone will attend to merging both. That's not my problem. The task may run for a week straight and that is okay, though I fear some Murphy's law power failure or BSODs (A machine was handled by someone who literally installed everything he ever saw). As for a Python script - I very much appreciate the generous offer, but installing a python interpreter is beyond my limited knowledge. Any ideas? אילן שמעוני (talk) 14:40, 28 March 2018 (UTC)[reply]
So, if I understand correctly that both versions must coincide [until merged manually], what should actually be done is to check all files from A and from B; if they exist only in either directory, or in both but with the same content, copy it in the final result under the existing name (say, filename.ext); but if they both exist in different versions in A and B, copy them both (for instance, as filename-A.ext and filename-B.ext).
The fear of power failure or whatever can be soothed by keeping a log of what we are doing (see journaling file system).
I suggested Python because that's my playground, but it is not harder to install than any program, really (download the latest version and click through the installer). What you want to do can be done without fancy external packages, so there is no configuration to do either. But more importantly, I fail to see how anything else could be simpler, except if someone provides you with a compiled executable (i.e. a .exe file to run on your computer) - but that is a really, really dangerous thing to do. TigraanClick here to contact me 16:47, 28 March 2018 (UTC)[reply]
rsync can do this easily. I've only used the Unix version, but our article indicates that there are versions that run on Windows. CodeTalker (talk) 17:04, 28 March 2018 (UTC)[reply]
Despite the directories having a different structure? TigraanClick here to contact me 07:50, 29 March 2018 (UTC)[reply]
Thanks, everyone!. I managed to get physical access to the problematic machine, boot linux cd, copied the content to fat32 partition, took out the HD. I'll physically install it to machine B, and from there I think I have it. אילן שמעוני (talk) 16:38, 29 March 2018 (UTC)[reply]

Cursor movement[edit]

What do you call, the mouse cursor movement? 123.108.244.15 (talk) 14:28, 28 March 2018 (UTC)[reply]

Cursor movement is cursor movement. It appears that you are trying to detect cursor movement in a program. If that is the case, we need to know what programming language you are using. 209.149.113.5 (talk) 14:40, 28 March 2018 (UTC)[reply]
Some programming languages call such event onMouseOver --Hans Haase (有问题吗) 17:44, 28 March 2018 (UTC)[reply]