Jump to content

Wikipedia:Reference desk/Archives/Computing/2016 April 20

From Wikipedia, the free encyclopedia
Computing desk
< April 19 << Mar | April | May >> April 21 >
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.


April 20

[edit]

Windows 10 updates

[edit]

I have a Windows 10 computer that is wanting to install updates. It wants to restart, but I have something running that takes weeks to finish, so I don't want to restart until I'm ready. The latest I was able to schedule a restart is a week away. I used to be able to tell it to download updates but not install them until I'm ready. Is there a way to do that in Windows 10? Bubba73 You talkin' to me? 04:47, 20 April 2016 (UTC)[reply]

https://support.microsoft.com/en-us/kb/3073930
https://websetnet.com/defer-block-uninstall-windows-10-updates/
http://www.zdnet.com/article/microsoft-releases-tool-to-hide-or-block-unwanted-windows-10-updates/
http://www.pcworld.com/article/2951807/software-utilities/optional-windows-10-utility-blocks-bad-updates-from-messing-with-your-pc.html
--Guy Macon (talk) 06:35, 20 April 2016 (UTC)[reply]
You can't trust Microsoft. So you need to remove the not yet installed files so that they can't be installed and thus delay the whole affair. There has been a release of a tool that terminates the Win10 update "request", use that. In the meantime block these addresses permanently. Someone else has to tell you the details. Another simple solution that MAY work is to yank the network cable. Bytesock (talk) 07:21, 20 April 2016 (UTC)[reply]
Thanks, I'd thought about disconnecting it from the network, but I use dropbox to send files back and forth. But that might be the simpliest solution. Bubba73 You talkin' to me? 20:51, 20 April 2016 (UTC)[reply]
In that case you can block everything BUT the dropbox service in you firewall (because you one?). Anyway, the long term solution is to have a program that permanently disables the Win10 upgrade, they exist I just can't recall the url. As usual backup your own files and in this case also the system files, such that you can reinstall. Also consider the option to put the whole windows installation into a VM-sandbox and have regular image backups. Bytesock (talk) 08:43, 21 April 2016 (UTC)[reply]

You can also just go into your router and block these websites how ever long you want.

http://windowsupdate.microsoft.com
http://*.windowsupdate.microsoft.com
https://*.windowsupdate.microsoft.com
http://*.update.microsoft.com
https://*.update.microsoft.com
http://*.windowsupdate.com
http://download.windowsupdate.com
http://download.microsoft.com
http://*.download.windowsupdate.com
http://test.stats.update.microsoft.com
http://ntservicepack.microsoft.com

https://technet.microsoft.com/en-us/library/bb693717.aspx Just have to read between the lines a little on this website. They are talking about how to setup a WSUS server for a large corporation. Sierravistaitsolutions (talk) 15:30, 20 April 2016 (UTC)[reply]

using the refs code doesn't stay within the section on the reference desk, it still goes to the "bottom" of the whole page, so it's advisable not to use it. There's a special code you can use instead but I can't remember it. Vespine (talk) 06:07, 21 April 2016 (UTC)[reply]
@Vespine: It is {{Reflist-talk}} or simply {{Reflist}}. They both catch and display all refs not displayed yet, so they work anywhere you want – see examples in my sandbox. --CiaPan (talk) 10:26, 21 April 2016 (UTC)[reply]

RegEx syntax for PHP's preg functions

[edit]

Because StackOverflow cannot answer this, I thought I'd ask here... Please note that the context of this question is in PHP's implementation of the preg functions.

Suppose I have a string: $s="XXXABCBCBCDXXX"; I want a regular expression that will match all of the BC substrings and return them in the matches array. I tried: /A(BC)+D/, assuming that (...)+ means "match the previous sequence multiple times". I expected to get match $matches[0]="ABCBCBCD", $matches[1]="BC", $matches[2]="BC", $matches[3]="BC". Using preg_match('/A(BC)+D/', $s, $matches);, I get $matches[0] as expected, but then I only get $matches[1]="BC". I don't get the other two matches. This is odd because $matches[0] contains all three BC values. I tried preg_match_all and got $matches[0][0]="ABCBCBCD" and $matches[1][0]="BC". Not any better. How can I get it to match BC multiple times, creating an index in the matches array for each match? 209.149.115.199 (talk) 18:08, 20 April 2016 (UTC)[reply]

It's not usually considered desirable to have the matches array be variable-length. You probably just have to do your match once and then call preg_match_all on the result with just the "BC" pattern. --Tardis (talk) 13:03, 21 April 2016 (UTC)[reply]
Thanks. So far, that looks like the simplest solution. For some reason, preg_match_all returns multiple hits when you don't use parenthesis, but only one hit when you do use parenthesis. 209.149.115.199 (talk) 14:55, 21 April 2016 (UTC)[reply]