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

Computing desk
< October 2 << Sep | October | Nov >> October 4 >
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 3

edit

Precision in web searching

edit

Web search engines typically allow the use of double quotation marks for exactitude. Thus "tinpot dictator" (in quotation marks) won't merely point you to pages that have both words; it will point you to pages that have this exact string. Except that it will also point you to "tin-pot dictator" (not that this normally matters). Try searching for something less common, such as "tin dictator" (again in quotes), and the search engine will typically give you lots of near-hits (such as "tinpot dictator").

Does Wikipedia have an article, or part of an article, on precision in web searching? And if not, does any of the various engines have a (perhaps little-publicized) "I want exactly what I tell you I want; nothing else" option? -- Hoary (talk) 03:32, 3 October 2017 (UTC)[reply]

It's even more complex, because you probably do want to allow some variation, such as uppercase versus lowercase. We'd need a panel that allows us to specify which things can vary and which can't.
One interesting mismatch I've found happens when it ignores punctuation. For example, a search on "Donald Trump" might return "...then passed his cards to Donald. Trump was declared as..." StuRat (talk) 16:56, 3 October 2017 (UTC)[reply]
StuRat, that's just the kind of mismatch that I want to avoid. For the quotes-enclosed search string "Donald Trump", it may occur one in a hundred or more times and thus break the monotony and be interesting. For much less likely string, it may occur ninety-nine times in a hundred and be very tiresome.
Indeed, I'd be happy if the search were case-sensitive.
My uneducated guess is that this isn't possible, because the search engines store data that, with the aim of compactness, are stripped of the nuances that concern few people even if from time to time they happen to concern me. Thus I'm limited to the BYU and other corpora, and to running grep on what I can download. But I was hoping against hope.... -- Hoary (talk) 23:54, 3 October 2017 (UTC)[reply]
You would think they could use the current method as a pre-search, then go to each page found, and check if it's an exact match or not. This would be rather time-consuming with a large number of pages, so I'd expect they would need to just double check a few pages at a time. If you have 10 links listed per search result page, for example, they could double-check each link on that page. Then, when you flip to page 2 of the search results, they could double check those links. This could also avoid the problem I've run into, that a search points me to a page that formerly contained what I was searching for, but no longer does. StuRat (talk) 01:20, 4 October 2017 (UTC)[reply]
Yes indeed, StuRat. In the meantime, I suppose I'll have to be content with Corpus of Contemporary American English and the other BYU corpora, and grepping a discreet download of Project Gutenberg -- Hoary (talk) 12:27, 4 October 2017 (UTC)[reply]

Does anyone know how CCleaner was infected with malware? A Quest For Knowledge (talk) 11:21, 3 October 2017 (UTC)[reply]

I don't know that the information has been released. (An FBI investigation is pending.) Most people are assuming somone managed to compromise an Avast employee's computer. Probably with some kind of targeted phishing attack.
That would fit the attackers' MO, because the attack seemed designed to target only individuals working at specific companies.(Samsung, Cisco, Linksys) (If you were a home user, you'd get infected, but it wouldn' tdo anything.)[1] These people were trying to quietly plant backdoors in high places they could later use to do real damage. A daring plan. Good thing it was caught.
ApLundell (talk) 14:06, 3 October 2017 (UTC)[reply]
Ver 5.33 was affected. --Hans Haase (有问题吗) 14:10, 3 October 2017 (UTC)[reply]
@ApLundell: That's what I was afraid of. This means that "trusted" software can no longer be trusted. A Quest For Knowledge (talk) 15:22, 3 October 2017 (UTC)[reply]
What? I assume that by "trusted software" you mean software digitally signed by reputable organizations. The trust in that model rests on two factors: (1) those organizations will keep their private cryptographic keys private, and (2) the underlying cryptography and implementation is sound. "trusted" software can no longer be trusted would mean that (2) was breached, but not only is that a priori much, much less probable than a violation of (1), available evidence in this particular case seems to point to (1) as well. If you just discovered that (1) is not a surefire assumption, you are clearly new here - maybe this incident means that CCleaner and its parent companies are not to be trusted anymore (because it reveals faulty security practices etc.), but it does not impact how much you can trust other companies (if anything, those might improve a bit as the incident pushes to better security). TigraanClick here to contact me 16:49, 3 October 2017 (UTC)[reply]
Actually, it does impact how much you can trust other companies. This is the first time (at least in recent memory) where hackers were able to infect a legitimate software publisher's software, and if it can happen to Periform, it can happen to any company. In other words, it's a new "class" of attack. A Quest For Knowledge (talk) 01:48, 7 October 2017 (UTC)[reply]
Um NotPetya???????? (Okay we don't know for sure it was hackers, but we don't know for sure this case is hackers either.) I do agree this recent spate does suggest that attackers seem to finally be looking at this avenue. I'm frankly surprised it took them so long, I always wondered about the release security of all these random companies. I mean the website and database etc security always seemed to strongly suggest it often wasn't very strong. Possibly one of the reasons why it hasn't happened yet is that as scary as it sounds, attackers have seen the cost too high compared to the potential benefits and compared to the other options. Both of the recent attacks seem to have been fairly sophisticated, with specific aims even of NotPetya's aim was apparently partly to cause widespread destruction, so I'm not sure if even this has really changed. Still Tigraan has a point that all these attacks actually show is what was widely expected all along and you should have always been wary of these avenues, since if you weren't you could have easily been the victim of the first one. I guess it's possible these attacks will inspire others, since it is a little interesting we've had 2 in such quick succession, but it may simply be that these cases are largely a coincidence and any attacker capable of pulling of these attacks was well aware of the avenue. Nil Einne (talk) 12:26, 8 October 2017 (UTC)[reply]

Switching Windows Control in Selenium Webdriver with Java

edit

I am automating a scenario where i have to switch control from parent window to a child window in Selenium .The code works fine when executed on a machine with Windows 7 with IE 11 but the code fails to transfer control to child window when run on a machine with Windows10 and IE11.The same issue persists when i access the application through VPN.161.69.206.27 (talk) 17:03, 3 October 2017 (UTC)[reply]

Google hit numbers

edit

Hello, on this Google seach result page, I get a hit number of 160.000 indicated, but just one page further – and that is the last page retrievable for this search – it says only 438 results! Now, how does that exactly come about?--Tuchiel (talk) 18:03, 3 October 2017 (UTC)[reply]

I got 425 hits. Close to your 2nd figure of 438, and there always seem to be some diffs when different people do the same search, for reasons that have never been clear to me. I don't know what the first number is, possibly the same search without the quotes ? StuRat (talk) 18:19, 3 October 2017 (UTC)[reply]
Google "why google results differ" and you'll find stuff like https://www.awsp.com/google-search-results-different/ (((The Quixotic Potato))) (talk) 20:52, 3 October 2017 (UTC)[reply]
https://www.awsp.com/google-search-results-different/ ... which in turn lists as a reference our own article Google Personalized Search. 14.2.224.5 (talk) 23:47, 4 October 2017 (UTC)[reply]
@StuRat: Interesting. Now I get 440 hits... ???--Tuchiel (talk) 18:29, 3 October 2017 (UTC)[reply]
Google only allows the first 1000 hits to be shown, and some of those may be removed as too similar. PrimeHunter (talk) 18:42, 3 October 2017 (UTC)[reply]

ASP.NET Core: keeping track of state

edit

I am new to ASP.NET Core, although I have experience of ASP.NET Web Forms. I have to make a simple browser-based game where the player can move between rooms. I have the logic pretty much figured out, but there is one fundamental question:

How can I keep track of the current state of the game between requests, for instance which room the player is currently in? Does ASP.NET core provide any easy way to access session state?

Keeping in with the MVC model, I should perhaps create a new model class for the state and bind it to the controller, but how do I store the model? I did a Google search for "ASP.NET Core model" but all I found were tutorials for adding a database context to store the model in, and I think a database context is overkill for this. I just need to store the model in memory state so subsequent requests can access it. JIP | Talk 21:09, 3 October 2017 (UTC)[reply]