windows

python launcher for windows: how to set python executable?

百般思念 提交于 2021-02-10 22:39:42
问题 I have multiple versions of python 3 installed on my windows 10: i have python 3.4, 3.5 and 3.6. Now I installed anaconda 3 with python 3.6.4, and I want to start it with py launcher. When I start py.exe it starts python 3.6 from c:\program\ files\python 3.6. I'm unable to tell py.exe to run python from d:\anaconda3. I tried to create py.ini file, I put it in c:\windows, c:\users\germano\appdata\local, but nothing, py.exe starts only python from c:\program files\pyton 3.6. Any help? 回答1:

CreateFile() Failed With GetLastError() = 5

我们两清 提交于 2021-02-10 20:34:14
问题 I have written a sample application to read the file from the other file. When I run this application form virtual machine I am getting Access denied. Below is the code. int _tmain(int argc, _TCHAR* argv[]) { WCHAR *wcsPath = L"\\\\150.160.130.22\\share\\123.XML"; HANDLE hFile = CreateFileW(wcsPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); if (NULL == hFile) { printf("failed - %d", GetLastError()); } return 0; } Please let me know any changes. 回答1: Error code 5 stands for

delete old PostgreSQL data directory in win7

纵然是瞬间 提交于 2021-02-10 20:31:49
问题 i'm not able to delete my old data directory in windows 7. i already uninstalled PostgreSQL, but there's still the system service user account "postgres", who's the only one with access-rights to the folder. possible solution would be to develop a service, running as "postgres" user, which deletes the folder, but there must be an easier way? 回答1: I haven't used Windows 7, but if I recall correctly, there should be a way to start an explorer session (the filemanager, not IE) under the Postgres

win32 strawberry perl PAR Packer make exe file

*爱你&永不变心* 提交于 2021-02-10 20:26:52
问题 i use on windows server : Summary of my perl5 (revision 5 version 30 subversion 0) configuration PAR::Packer is up to date (1.049). I can successfully build an exe file without error message. pp -o p.exe p.pl content p.pl use warnings; use strict; print "This is the Perl code!\n"; on the local machine run fine. Transfer the exe to other windows host and run script. No output :-( What am I doing wrong? Regards Thomas 来源: https://stackoverflow.com/questions/58817812/win32-strawberry-perl-par

numpy.float128 doesn't exist in windows, but is called from OpenGL

青春壹個敷衍的年華 提交于 2021-02-10 20:22:49
问题 I decided to try using OpenGL VBO in Python to improve FPS. I found code, that worked perfectly fine in Linux OS (Ubuntu), but when I tried launching in Windows OS, the code resulted in a message: "GLUT Display callback with (),{} failed: returning None module 'numpy' has no attribute 'float128'" So, I can't run the code specifically on Windows, but because I want to create a cross-platform application, I really need to solve this. I've done a lot of research and only found that numpy

how can i use fork() in Python3.3

巧了我就是萌 提交于 2021-02-10 20:21:54
问题 how can i use fork() in Python3.3 **This is My code : Input: #!/usr/bin/env python import os def Child_process(): print("We are in Child_Process") print("My PID: %d"%os.getpid()) print("Child_Process is exiting") def Parent_process(): print("-------Parent_process---------") wpid = os.fork() if wpid==0: print("wpid is 0 means We are in Child_process") print("Child :%d"%wpid) Child_process() else: print("Execute Parent_process") print("Parent_process %d"%wpid) Parent_process() Parent_process()

Why does malloc(0) cause a major memory leak on Windows?

走远了吗. 提交于 2021-02-10 19:59:55
问题 I have just concluded a happy 4.5 hours of debugging a nasty leak in my system. It turns out I was doing this: params = allocate(sizeof(Something*) * num_params); which in turns essentially calls malloc with the first argument passed in. When num_params is 0, it would call malloc(0) . Running this in a loop, the program would very quickly take up most of the memory. I fixed it by first checking if num_params == 0 , and if so avoiding the call to allocate . I know that the Standard dictates

Building QGIS for Windows with mingw and Cmake?

做~自己de王妃 提交于 2021-02-10 19:32:31
问题 Does anyone knows how to build QGIS for Windows with mingw and Cmake? Having that I have all required dependencies installed. 回答1: I found a really nice workaround at: http://www.webalice.it/marco.pasetti/qgis+grass/BuildFromSource.html 来源: https://stackoverflow.com/questions/3760395/building-qgis-for-windows-with-mingw-and-cmake

Building QGIS for Windows with mingw and Cmake?

痞子三分冷 提交于 2021-02-10 19:31:34
问题 Does anyone knows how to build QGIS for Windows with mingw and Cmake? Having that I have all required dependencies installed. 回答1: I found a really nice workaround at: http://www.webalice.it/marco.pasetti/qgis+grass/BuildFromSource.html 来源: https://stackoverflow.com/questions/3760395/building-qgis-for-windows-with-mingw-and-cmake

What does the D flag in the code segment descriptor do for x86-64 instructions?

谁说我不能喝 提交于 2021-02-10 18:14:50
问题 I'm trying to understand the workings of the D flag in the code segment descriptor when used in the x86-64 code. It's set in the D/B bit 22 of the code segment descriptor as shown on this diagram: The Intel documentation (from section 3.4.5 Segment Descriptors) states the following: D/B (default operation size/default stack pointer size and/or upper bound) flag Performs different functions depending on whether the segment descriptor is an executable code segment, an expand-down data segment,