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

From Wikipedia, the free encyclopedia
Computing desk
< October 10 << Sep | October | Nov >> October 12 >
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.


October 11[edit]

Any JavaScript (history API) expert in the audience?[edit]

I run the following code in facebook.com. The code hides all "People You May Know" (PMYK) boxes which appear in numerous areas of the site.

My problem:[edit]

The code works, but after executing it (either with Greasemonkey/Tampermonkey) I cannot access my faceook conversations page.

When navigating to the conversations page by clicking the messages icon, then, "See all in messenger", my conversations page appears as a blank page.

My code:[edit]

let utilityFunc = ()=>{
    let run = (run)=>{
            setInterval( ()=>{

                // PMYK:
                    document.querySelectorAll(' #timeline_tab_content, #pagelet_pymk_timeline ').forEach( (e)=>{
                        e.style.visibility = "hidden";
                    });
            }, 250);
    };

    let pS = window.history.pushState;
    let rS = window.history.replaceState;

    window.history.pushState = (a, b, url)=>{
        run(url);
        pS.apply(this, arguments);
    };

    window.history.replaceState = (a, b, url)=>{
        run(url);
        rS.apply(this, arguments);
    };

};

utilityFunc();

My question[edit]

Why would this code cause that

You might have more luck at www.stackoverflow.com with this type of question. That said, you could try changing "hidden" to another attribute that is different, but still visible: that would tell you if your code is directly modifying the conversations part of the page (it doesn't look like it should, but I'm not too familiar with Facebook's API). OldTimeNESter (talk) 11:11, 11 October 2017 (UTC)[reply]

Password manager for FreeBSD?[edit]

Currently I am running an 11.1 version of FreeBSD. Since few years I have been using Pass (software) as my password manager, and BlackBerry's default "password keeper" on my mobiles.

The pass is a command based software. I was wondering, if there are any other graphical manager? Minimalist graphics would work too. If the software is cross-platform, it would be better. Thanks a lot in advance. —usernamekiran(talk) 21:48, 10 October 2017 (UTC)[reply]

I would strongly suggest Password Safe. (Home page) --Guy Macon (talk) 01:43, 11 October 2017 (UTC)[reply]
Thanks Mr. Macon. (Calling someone "guy" feels odd even if it is their name or last name.) Also, your wording assured me about it. Without it, I wouldnt have considered much about looking into "Password Safe". I looked it up on official freeBSD forum, and on some other sites. It looks really good for my usecase. I have been using freeBSD since around 2007. Even though I am very good with them, I never relied on "Pass", "password keeper" or any other manager till now. I used to do everything manually, and never noted anything anywhere (neither soft nor hard-copy). I will install it after Oct 18th. I might let you know about my experince on your talkpage (in case this thread gets archived by then). See you around. :)
usernamekiran(talk) 17:13, 11 October 2017 (UTC)[reply]
Glad to hear it. I am looking forward to hearing how it works out for you.
I personally am old school: I have an ASCII text file with all of my usernames, passwords etc., which I keep encrypted using VeraCrypt using AES-Twofish-Serpent encryption and RIPEMD-160 hashing.
My VeraCrypt passphrase is 12 words/64+ characters which exists only in my brain -- I have never written it down or spoken it aloud. I store the encrypted file in multiple locations, but I only look at them using a dedicated laptop running Tails with no Internet connection. (I have been thinking about switching to OpenBSD for this -- any comments on that are welcome).
The individual website passwords all look like this:
  • Username: WQn6tisJ51s2jBtl (when possible. Wikipedia, for example, doesn't allow seperate login and displayed usernames)
  • Password: PGZGH%RhT7kZu3EG!ZFfRgwnfXGpXvg6
  • What is your mother's maiden name: Ickaysaf Biocus Eipgha Acwefdo
And each website gets a unique, hard to guess email address. (Tuffmail makes this easy to do).
Mandatory XKCD: https://xkcd.com/538/
BTW, "Guy Macon" is the name on my birth certificate. Then there was the time I visited Mexico with my friend, Don... --Guy Macon (talk) 17:57, 11 October 2017 (UTC)[reply]
The even more likely method to crack the password is to read it off the sticky note the owner leaves attached to the laptop, because the long, constantly changed password with a mixture of upper- and lowercase characters, numbers, and symbols makes it impossible to recall.
As for your name, you sound like a superhero in Macon, Georgia. :-) StuRat (talk) 21:19, 11 October 2017 (UTC)[reply]
@Guy Macon: By tails, do you mean that amnestic OS? That much of precaution would very much for me. I am sort of "meh, I will do it later/tomorrow" type of person lol.
I had brief experience with openBSD when I was a newbie at "real" computer science. But at that time, Internet was not as grown as it is now, and there wasn't much help available online. Also, I liked freeBSD's logo more lol. Later I switched to Wolvix, which I used for a fair amount of time. Now I've been using FreeBSD since around 2006-07. And one of the companies I worked for had a variant of freeBSD, so I feel very much comfortable around it. In theory, default installation of openBSD is supposed to be one of the most secure OS. But on some forum I had read freeBSD can be brought up to these standards through tweaking. But I think there would be a lot of tweaking necessary. Even though I don't exactly have experience with openBSD, I personally prefer freeBSD over it.
For keeping/creating passwords, I have written a program in C that generates random four alphabets, and four numbers. So my passwords are usually 17 character string of four lowercase characters, four uppercase, 8 numbers, and one special character. All random. I never write these passwords anywhere. I can recall my last 5-6 passwords. While working for another company, I had experience of working on their custom built password manager which used to handle literally hundreds of different passwords on an 8 hour shift basis. May I ask what's your current OS?
@StuRat: Your comment about sticky notes lol'ed me. —usernamekiran(talk) 02:02, 12 October 2017 (UTC)[reply]
For my main desktop OS I use mostly Slackware, and can dual boot to windows 10 N LTSB when I need to run something that WINE cannot handle.
Alas, Slackware refuses to boot on my new Lenovo ThinkPad N22 laptop. I tried replacing Slackware with FreeBSD, and after several days of trying, failed to get it to boot either. (I had no problems installing and running it on various Dell desktops). So on the laptop I am running Ubuntu.
I also have a need to use a computer in China where the local network at the company where I am doing the work can be reliably depended on to spy on my computer use and try to install spyware on my laptop (this is the toy industry, where industrial espionage is a way of life) , plus of course the government is also watching. For that situation I boot Tails (operating system) from a DVD, keep my data on a MicroSD card encrypted with VeraCrypt, and communicate over Tor (anonymity network). I had to request a special user right to be able to edit Wikipedia over Tor. --Guy Macon (talk) 05:56, 12 October 2017 (UTC)[reply]

51% attacks on BOINC?[edit]

Are volunteer computing projects such as BOINC susceptible to something analogous to the "51% attack" some cryptocurrency experts worry about, in cases where there is suspected to be a well-funded interest in distorting the output of the computations (e.g. climate-change forecasting)? If I understand correctly, BOINC will accept an output that has been produced by 2 apparently-independent nodes. It's not clear to me what happens when those 2 nodes disagree; but even if the response is always to fail over to a perfectly trustworthy computer, then anyone who controls 50% of the computing power and IP addresses can control 25% of the output, and with 71% one can control 50%. (Which is better than cryptocurrency blockchains, where -- as I understand -- controlling 51% of the hashing power means controlling much more than 51% of the blockchain's contents, but still worrisome.) NeonMerlin 03:28, 11 October 2017 (UTC)[reply]

No. Bitcoin is vulnerable because it has no central authority. With BOINC, whoever controls the server can spot check the output of the clients, comparing the answer they gave to the answer his own computer gives. --Guy Macon (talk) 04:50, 11 October 2017 (UTC)[reply]
Right, but how many BOINC beneficiaries are savvy enough to do that? And how reliably can they do so, given how much tighter their computational constraints are than the BOINC network (assuming the difference was enough that they had a good reason to turn to BOINC in the first place)? NeonMerlin 05:14, 11 October 2017 (UTC)[reply]
We probably need to know what task is being computed to discuss further. There are quite a few problems where checking a solution is trivial compared to finding it. For instance, if the task is finding a hash collision (à la BitCoin), it is trivially easy to check even if it takes firepower to find. I have no ref right now, but quite a few protein folding problems boil down to "find the lowest-energy configuration" (in a very large configuration space); it is easy to check that a given configuration has the claimed energy, so if at any point in the calculations you find node B has found a lower-energy configuration than node A by using the same algorithm, you can kick out node A and all the results it gave you previously because something fishy is going on; presumably, if you rotate the association of pairs of nodes, eventually the good nodes will kick out the evil ones. TigraanClick here to contact me 09:21, 11 October 2017 (UTC)[reply]
Also if there are disagreements, then the job is farmed out to more nodes to check, until there is agreement in the result. Graeme Bartlett (talk) 09:10, 11 October 2017 (UTC)[reply]
And if there are a lot of disagreements, somebody is going to be doing some serious research regarding who is right and why some nodes are giving wrong answers. Is it some sort of conspiracy? Did we just discover something like the Pentium FDIV bug? are two different revisions of our code giving us different answers when the changes supposedly didn't effect the math? --Guy Macon (talk) 09:49, 11 October 2017 (UTC)[reply]

Does anyone know where that site is hosted?--Tuchiel (talk) 12:58, 11 October 2017 (UTC)[reply]

Texas. -- Finlay McWalter··–·Talk 13:09, 11 October 2017 (UTC)[reply]
Interesting, thanks a lot!--Tuchiel (talk) 13:17, 11 October 2017 (UTC)[reply]

Mobile Internet / Data[edit]

I possess "Sony XA Ultra Dual". I'm failing to turn on my "Whatsapp". I've topped-up my simcard, turned on my data roaming and mobile data option, still it states that I don't have internet connection as I press "NEXT" in the "Whatsapp" app, on the mobile phone entry page.

The network provider sent me two messages, first one fails to install everytime, second one was about "MMS" that successfully installs everytime...

I've also tried the 'built-in' option available on the phone that downloads the internet setting automatically, but was unsuccessful as it requests for internet connection.

I have a gut feeling that I would need internet connection (Wifi connection or something alike rather than just the mobile data) for the first time... If untrue, please guide me...

202.134.9.136 (talk) 16:23, 11 October 2017 (UTC)[reply]

Very few things need a wifi connection instead of mobile data (both of which would normally be internet connections) for the first time, although some may recommend it if they download a lot of data the first time. WhatsApp however should not need this. But anyway you seem to be putting the cart before the horse. It doesn't sound like you even know the internet is working on your phone (via mobile data). If you are having problems in one app which appears to suggest a lack of an internet connection, you should always try another and make sure the internet is actually working. Probably the best app to try would generally be the browser and visit something like a prominent search engine and make sure it's working (e.g. do a simple search which can't be just a saved page). If the internet is working, on the browser (and you can try another app too for good measure), then there's probably no reason to worry about the APN settings. If do need to change the settings and can't get the automatic ones to work, you could simply find out what they are supposed to be and manually enter then. You're obviously using internet now so could easily just do a simple search and find out what the settings should be. Nil Einne (talk) 18:05, 11 October 2017 (UTC)[reply]
I've checked it using Opera Mini and Chrome, the internet doesn't work at all. What should I do? 202.134.13.133 (talk) 19:17, 11 October 2017 (UTC)[reply]
Perhaps there is no reception. There may be some incompatibility, eg phone only does 2G, but sim and provider only have a 3G available. If it si a dual sim phone this can happen, you may be able to change positions. Another thing to check is if there is a usage limit. Note that in SIMs I have used it never has to "set up" with a SMS or MMS message, so I wonder if this has gone wrong and set the connection into some bozo mode. Graeme Bartlett (talk) 21:02, 11 October 2017 (UTC)[reply]
I couldn't find the exact mobile of yours. But I think it is "Sony Xperia XA ultra dual", right? In that case, it is an android phone, and it does not require any settings sent by your service provider through messages (SMS/MMS).
  • If it is dual-sim mobile, make sure you've selected the appropriate SIM for data use.
  • The second step would be to verify "APN settings" for that SIM. You would find it in wireless settings. The best option here would be to reset the APN settings to default. While resetting the APN settings, make sure correct SIM is selected for data use. Then try again to visit a page that wasn't visited before, or make a random search on either Google or Yahoo.
  • If the problem still persists, then reset the APN settings again, and restart the handset.
  • Assuming your internet starts working, do not open whatsapp. But go to play store, and update whatsapp to the version available. Old versions of whatsapp don't work. It's a "feature".
  • Whatsapp doesn't have any requirement about wi-fi vs mobile data. So as long as you have latest version, and Internet connectivity; whatsapp should work. Kindly comment here what happens. —usernamekiran(talk) 04:01, 12 October 2017 (UTC)[reply]

Chromecast etc confusion[edit]

I purchased a chromecast dongle a few months ago but have failed to get it to work with my android phone for casting music to my hifi via the dongle. It seems i need the googlehome app or some other casting app. I have tried to install it, and other casting apps but, although my phone says they are installed, the apps do not appear anywhere on my phone. I know i must be missing something simple. Can anyone tell me what im missing?--213.205.252.246 (talk) 23:34, 11 October 2017 (UTC)[reply]

The only app you need is the Google Home app. You set up the Chromecast through that app making sure you connect it to the same wifi network that your phone is on. To do that, make sure the chromecast is plugged in and powered, and look for it under the "Devices" tab in the Home app. Once that's connected, any app that has chromecast capability will automatically recognize it and allow you to "cast". You do that by tapping the chromecast symbol in app as highlighted hereMingmingla (talk) 01:19, 13 October 2017 (UTC)[reply]
I have downloaded Google home app a number of times. Yet it does not appear in my list of apps. When I try to download it, phone says its already installed.I cannot get the app to run. What am i doing wrong?--213.205.252.246 (talk) 22:53, 13 October 2017 (UTC)[reply]