windows-10

PS1 bash command substitution not working on windows 10

独自空忆成欢 提交于 2020-06-12 05:06:10
问题 This is my script that sets up my bash PS1 # Reset Color_Off="\[\033[0m\]" # Text Reset # Regular Colors Black="\[\033[0;30m\]" # Black Red="\[\033[0;31m\]" # Red Green="\[\033[0;32m\]" # Green Yellow="\[\033[0;33m\]" # Yellow Blue="\[\033[0;34m\]" # Blue Purple="\[\033[0;35m\]" # Purple Cyan="\[\033[0;36m\]" # Cyan White="\[\033[0;37m\]" # White # Bold BBlack="\[\033[1;30m\]" # Black BRed="\[\033[1;31m\]" # Red BGreen="\[\033[1;32m\]" # Green BYellow="\[\033[1;33m\]" # Yellow BBlue="\[\033[1

C++17 filesystem using nuwen MinGW on Windows 10

萝らか妹 提交于 2020-06-12 02:52:53
问题 I wanted to try out the new filesystem library in C++17, so tried copying the std::filesystem::current_path example from cppreference.com and compiling it using the latest version (16.0) of the MinGW distribution from nuwen.net on my Windows 10 x64 machine. This includes gcc v8.1 which should support the filesystem library according to cppreference.com compiler support page. Here is the code that I am trying to compile: #include <iostream> #include <filesystem> namespace fs = std::filesystem;

C++17 filesystem using nuwen MinGW on Windows 10

为君一笑 提交于 2020-06-12 02:49:27
问题 I wanted to try out the new filesystem library in C++17, so tried copying the std::filesystem::current_path example from cppreference.com and compiling it using the latest version (16.0) of the MinGW distribution from nuwen.net on my Windows 10 x64 machine. This includes gcc v8.1 which should support the filesystem library according to cppreference.com compiler support page. Here is the code that I am trying to compile: #include <iostream> #include <filesystem> namespace fs = std::filesystem;

Is setting ExecutionPolicy to Unrestricted for CurrentUser a security breach?

半腔热情 提交于 2020-06-11 07:52:26
问题 I have a couple of aliases I like to have in my PowerShell on my Windows 10. I want them to persist between sessions, so I have put them in a profile.ps1 file under C:\Users{username}\Documents\WindowsPowerShell. I am getting this annoying "cannot be loaded because running scripts is disabled on this system." error message, and have found this page on how to get rid of it: https://social.technet.microsoft.com/Forums/en-US/3e4a9006-d47d-4e19-96f4-10327ae0c5b1/not-able-to-run-script-in-windows

Retrieve state of Windows 10 Power mode slider

耗尽温柔 提交于 2020-06-10 03:42:31
问题 Is there any API to retrieve a state of Windows 10 Power mode slider? I was looking at Windows.System.Power namespace. But PowerManager class seem to provide only an immediate state of the power system, but not user preferences set by the slider. The slider also exists somehow in parallel with previous "power plan" settings. It does not seem that the slider state is reflected directly in Win32_PowerPlan. 回答1: Change the position of the slider, and the registry key: HKLM\SYSTEM\ControlSet001

windows 10 screen coordinates are offset by 7

雨燕双飞 提交于 2020-06-10 02:02:11
问题 I'm coding in c++ on windows 10 - straight win32 API. I wanted to make a window show up in the top right of the screen. As I was doing this, I noticed that screen coordinates for a maximized window are left=-8, top=-8, right=1936, bottom=1088. Also, when I position a window so right=1920 and top=0, there's about an 8 pixel gap on the right. I tried moving the window around to see what screen coordinates I got. rect.left for a nonmaximized window can go from -7 to 1912. so things are slid by 7

VC6 on Win 10 Debugging when a DLL in another DLL gives User Breakpoint hit

痴心易碎 提交于 2020-06-01 06:11:42
问题 I just installed a Windows 10 machine, since Windows 7 is now dropped... along with the old, classic VC6. Plus the Service pack 6, and the Platform SDK installed. I have been using it this way with no issues on my Windows 7 machine for decades (too long to go into why not upgrade to VS 2010, 2012, 2015, 2017, 2019, yada yada, yada... Subject for a different debate) I brought up an existing project I was working in before the end of the year. Big exe, several DLLs in it, C++ objects, etc...

VC6 on Win 10 Debugging when a DLL in another DLL gives User Breakpoint hit

Deadly 提交于 2020-06-01 06:10:25
问题 I just installed a Windows 10 machine, since Windows 7 is now dropped... along with the old, classic VC6. Plus the Service pack 6, and the Platform SDK installed. I have been using it this way with no issues on my Windows 7 machine for decades (too long to go into why not upgrade to VS 2010, 2012, 2015, 2017, 2019, yada yada, yada... Subject for a different debate) I brought up an existing project I was working in before the end of the year. Big exe, several DLLs in it, C++ objects, etc...

CreateParams(&H2000000) does't work anymore on Windows 10 Creator Edition

会有一股神秘感。 提交于 2020-05-30 08:01:41
问题 Protected Overrides ReadOnly Property CreateParams() As CreateParams Get Dim result As CreateParams = MyBase.CreateParams result.ExStyle = result.ExStyle Or &H2000000 ' WS_EX_COMPOSITED Return result End Get End Property 来源: https://stackoverflow.com/questions/43581224/createparamsh2000000-doest-work-anymore-on-windows-10-creator-edition

How to acess Linux bash terminal with new Windows Terminal

本小妞迷上赌 提交于 2020-05-28 08:35:46
问题 A few months ago Microsoft announced a new open source terminal they are working on: As you can see in the Trailer of the video you can access an Ubuntu/Debian etc bash terminal from the Windows terminal. My question is how do you access this? Do you have to enable the Linux sub-system for Windows and then download the distro form the Windows store? If so something I'd also like to ask is what are the downsides of enabling such a thing? Does it close down your boot time? Does it risk borking