console

How to send keys data to a Console window without having focus

喜欢而已 提交于 2021-02-05 12:04:55
问题 I've been trying to send data to a console window without it having focus. I've used a simple Keyboard Hook from here: Capture keystroke without focus in console I've modified the code provided from the answer on that page to display the unicode values of keys that have been pressed; my modifications are as follows: private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam) { if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN) { var vkCode = Marshal.ReadInt32(lParam); var key =

How to send keys data to a Console window without having focus

笑着哭i 提交于 2021-02-05 12:04:43
问题 I've been trying to send data to a console window without it having focus. I've used a simple Keyboard Hook from here: Capture keystroke without focus in console I've modified the code provided from the answer on that page to display the unicode values of keys that have been pressed; my modifications are as follows: private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam) { if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN) { var vkCode = Marshal.ReadInt32(lParam); var key =

how do I register an invisible window class in a Win32 console application?

為{幸葍}努か 提交于 2021-02-05 09:26:19
问题 I am trying to register an invisible window in a Win32 console application. My goal is to listen for Raw Input in the WindowProc to (1) display it on the console, and (2) perform additional computation e.g. sending information over a Web socket. I followed this CodeProject article, but my WNDCLASSEX registration seems to fail. Here is the code that I have: approach 1 -- registration does not seem to work My main function WNDCLASSEX wndclass; wndclass.cbSize = sizeof(WNDCLASSEX); wndclass

What is “$” in Chrome console?

耗尽温柔 提交于 2021-02-05 08:09:59
问题 When we type $ in chrome console it returns a function. I am sure it's not jQuery's $ . If I want to use jQuery in console, What is the best way to trigger jQuery in chrome console as $ . 回答1: $ is an alias for document.querySelector. In the same vein there is $$ which is an alias for document.querySelectorAll. It is defined in the Command line (console) api. Command Line API Reference The Command Line API contains a collection of convenience functions for performing common tasks: selecting

Difference between using Task.Yield() in a User Interface and Console App

房东的猫 提交于 2021-02-05 07:23:10
问题 I'm trying to asynchronously show a progress form that says the application is running while the actual application is running. As following this question, I have the following: Main Form: public partial class MainForm : Form { public MainForm() { InitializeComponent(); } async Task<int> LoadDataAsync() { await Task.Delay(2000); return 42; } private async void Run_Click(object sender, EventArgs e) { var runningForm = new RunningForm(); runningForm.ShowRunning(); var progressFormTask =

Difference between using Task.Yield() in a User Interface and Console App

时光怂恿深爱的人放手 提交于 2021-02-05 07:22:27
问题 I'm trying to asynchronously show a progress form that says the application is running while the actual application is running. As following this question, I have the following: Main Form: public partial class MainForm : Form { public MainForm() { InitializeComponent(); } async Task<int> LoadDataAsync() { await Task.Delay(2000); return 42; } private async void Run_Click(object sender, EventArgs e) { var runningForm = new RunningForm(); runningForm.ShowRunning(); var progressFormTask =

How to prevent a user from getting password field value in console

旧巷老猫 提交于 2021-02-05 07:09:43
问题 I have been helping out some people with their computers and repairing them. One of these people asked me about the safety of storing passwords in the auto form field. I showed them a quick trick on how you can retrieve the password from a simple jQuery call in the console. While working on some websites, I have been trying to figure out a way of preventing the use of this trick to find out what the saved password is. To understand what im talking about if you dont know, try the following.

How to prevent a user from getting password field value in console

≯℡__Kan透↙ 提交于 2021-02-05 07:09:17
问题 I have been helping out some people with their computers and repairing them. One of these people asked me about the safety of storing passwords in the auto form field. I showed them a quick trick on how you can retrieve the password from a simple jQuery call in the console. While working on some websites, I have been trying to figure out a way of preventing the use of this trick to find out what the saved password is. To understand what im talking about if you dont know, try the following.

How to print Latin characters to the C++ console properly on Windows?

夙愿已清 提交于 2021-02-05 04:48:30
问题 I'm having a problem writing French characters to the console in C++. The string is loaded from a file using std::ifstream and std::getline and then printed to the console using std::cout . Here is what the string is in the file: La chaîne qui correspond au code "TEST_CODE" n'a pas été trouvée à l'aide locale "fr". And here is how the string is being printed: La cha¯ne qui correspond au code "TEST_CODE" n'a pas ÚtÚ trouvÚe Ó l'aide locale "fr". How can I fix this problem? 回答1: The issue is

Why isn't `toString` equivalent to `window.toString`?

∥☆過路亽.° 提交于 2021-02-05 02:40:28
问题 I'd believed that all global variables were accessible from the global object. So if I can access x (and x isn't bound locally), then window.x is the same value. However, in a webpage (on JSFiddle): window === this // true in Chrome and Firefox toString === window.toString // true in Chrome and Firefox But in the console: window === this // true in Chrome console and Firebug, false in Firefox web console toString === window.toString // false in Chrome, Firebug and Firefox web console Why is