windows

How to prevent (python) Selenium webdriver from triggering “Microsoft Malicious Software Removal Tool” to ask if it may reset browser settings?

爱⌒轻易说出口 提交于 2021-02-10 06:39:08
问题 Recently Selenium chrome webdriver started to run into problems by triggering Microsoft Malicious Software Removal Tool to request if it may reset browser settings. How to get around this? Is there an argument to add to options like --disable-extensions solved a popup problem before? from selenium import webdriver options = webdriver.chrome.options.Options() options.add_argument("--disable-extensions") driver = webdriver.Chrome(chrome_options=options) A temporary solution may be driver.find

MinGW GCC wildcard

那年仲夏 提交于 2021-02-10 06:26:26
问题 I'm using MinGW GCC compiler on windows how to compile all C files in a directory. I used gcc *.c -o Output after I entered the required folder and I got this error gcc: error: *.c: Invalid argument gcc: fatal error: no input files compilation terminated. the used version of GCC is 4.7.1 回答1: For anyone else like me who's come across this problem: I ran into this problem when I installed MinGW-w64 on my tablet after having run it for a few years on my desktop. Basically, I have a ruby script

How keep a UWP AppWindow fullscreen when another AppWindow enters Fullscreen on 2nd monitor?

孤人 提交于 2021-02-10 06:24:29
问题 I'm trying to open 2 AppWindows ( appWindowOne & appWindowTwo ) on separate monitors in full screen but when appWindowTwo opens appWindowOne minimizes. I've tried making the AppWindow re-enter full screen programmatically but it causes the other AppWindow to minimize. When manually clicked in the taskbar it restores to full screen without affecting the other but I would like to know if it's possible to do it programmatically? public static async void ShowAppWindows() { AppWindow appWindowOne

read() syscall on windows fails to read binary file

我是研究僧i 提交于 2021-02-10 06:18:39
问题 I would like to read image file to keep them in memory before using them with SDL. I just realized that open() and read() on windows fails to read my file entirely but on linux/BSD it works! This is my code: #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #define IMGPATH "rabbit.png" int main(int argc, char *argv[]) { int fd; struct stat st; void *data; size_t nbread; fd = open(IMGPATH, O_RDONLY); if (fd < 0) exit(1); fstat(fd, &st); data = malloc(st.st_size);

read() syscall on windows fails to read binary file

≯℡__Kan透↙ 提交于 2021-02-10 06:16:07
问题 I would like to read image file to keep them in memory before using them with SDL. I just realized that open() and read() on windows fails to read my file entirely but on linux/BSD it works! This is my code: #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #define IMGPATH "rabbit.png" int main(int argc, char *argv[]) { int fd; struct stat st; void *data; size_t nbread; fd = open(IMGPATH, O_RDONLY); if (fd < 0) exit(1); fstat(fd, &st); data = malloc(st.st_size);

UWP: How to call WinAPI Method

假如想象 提交于 2021-02-10 05:45:47
问题 My question is simple. How can I call a WinAPI Method like emptyClipboard in an UWP app? I included the 'Windows Desktop Extensions for the UWP' The method is listed under Windows API Index / Data Exchange / Clipboard Reference / Clipboard Functions I've tried the following ( js ): Windows.emptyClipboard(); Windows.WinAPI.emptyClipboard(); Windows.ApplicationModel.emptyClipboard(); Windows.DataExchange.emptyClipboard(); Windows.DataExchange.Clipboard.emptyClipboard(); each of them giving me

Python lambda function to sort list according to dictionary

試著忘記壹切 提交于 2021-02-10 05:29:05
问题 The sample codes bellow retrieve all the runing procces and print them. They've bee written following the 3rd example here and final one from here. Problem is I cannot figure out why only the first one retrieves process sorted as desired. I think it is related to the lambda function construction. But the rightly running sample, the first one, seems to mix the local p variable of the for statement with the p.dict dictionary, making me get stuck. First Sample: import psutil procs = [] for p in

Problem with Rcmd.exe when installing packages

被刻印的时光 ゝ 提交于 2021-02-10 03:16:41
问题 I'm getting the following error when installing packages from github: > devtools::install_github("pmartinezarbizu/pairwiseAdonis/pairwiseAdonis") Downloading GitHub repo pmartinezarbizu/pairwiseAdonis@HEAD Erro: Failed to install 'pairwiseAdonis' from GitHub: System command 'Rcmd.exe' failed, exit status: -1, stdout + stderr empty With find_rtools, I get the following message (I was reading these posts, but couldn't solve my problem: https://github.com/r-lib/devtools/issues/2031 and R CMD

Problem with Rcmd.exe when installing packages

两盒软妹~` 提交于 2021-02-10 03:15:24
问题 I'm getting the following error when installing packages from github: > devtools::install_github("pmartinezarbizu/pairwiseAdonis/pairwiseAdonis") Downloading GitHub repo pmartinezarbizu/pairwiseAdonis@HEAD Erro: Failed to install 'pairwiseAdonis' from GitHub: System command 'Rcmd.exe' failed, exit status: -1, stdout + stderr empty With find_rtools, I get the following message (I was reading these posts, but couldn't solve my problem: https://github.com/r-lib/devtools/issues/2031 and R CMD

“error: can't find main class scala.tools.nsc.MainGenericRunner” when running scala in windows

江枫思渺然 提交于 2021-02-09 12:01:15
问题 after downloaded scala 2.10.2 for windows, and run scala I met such error: "错误: 找不到或无法加载主类 scala.tools.nsc.MainGenericRunner" which means "error: can't find or load main class scala.tools.nsc.MainGenericRunner". So I check the scala.bat for reasons, and I found such function: :set_home set _BIN_DIR= for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi echo in set_home: %_BIN_DIR% set _SCALA_HOME=%_BIN_DIR%.. goto :eof After this function the _SCALA_HOME become D:\program files\scala\files