console

Chrome Developer Console question

北城余情 提交于 2020-02-02 12:11:27
问题 I'm trying to test a feature on my website that produces a random integer. I was wondering if it was possible to use the chrome developer console to trigger a button event with code, without physically pressing the button on the page. Also is it possible to send a different value than what the user put into my textbox. Let's say the user puts his name in "Tom", is there a way to trigger the button event via code in the console as well as change that user input for testing purposes. 回答1: You

Using git from Package Manager Console in Visual Studio

做~自己de王妃 提交于 2020-02-02 06:18:10
问题 I'm trying to use git from Package Manager Console window in Visual Studio 2010. And most git commands running as expected, except network-related. When I tried git push origin master Studio stops responding. The code were pushed to github.com account. I've noticed that ssh-* applications were fired and start hanging in system memory, so I switched to https authentication. But the Studio still not responding (and there is no ssh related stuff in memory). Does anybody knows how overcome this

ENABLE_VIRTUAL_TERMINAL_PROCESSING and DISABLE_NEWLINE_AUTO_RETURN failing

拜拜、爱过 提交于 2020-02-02 04:08:10
问题 The point was to make this little multiplayer game in the terminal, applying some basic graphics concepts to get a grasp on how it works and the maths behind it. Note I wish to do this for fun and I am fully aware there are way better alternatives out there to using a terminal. I'd need a console I could write to, so the point was to remove scroll bars and have the whole buffer printed to the screen. But because of the carriage return when characters get written to the end of the previous

Click on element via Javascript console

醉酒当歌 提交于 2020-01-31 06:46:52
问题 Imagine there is an element #button1 on website which is watched by jQuery: $('#button1').click(function(){ console.log("you clicked"); }; So how do I click this #button1 element via JavaScript console? Is there a command like click("#button1") ? Thanks. 回答1: You can trigger click functio like bellow Using JQuery $('#button1').click() using simple JS document.getElementById('button1').click(); 回答2: You can trigger a click by omitting the callback function: $('#button1').click(); 回答3: You can

MinGW, build GUI application with console

戏子无情 提交于 2020-01-30 19:28:01
问题 I'm using MinGW to build my application on Windows. When compiling and linking, the option "-mwindows" is put in command line to have Win32 API functions. To be more specific: when calling GCC of MinGW without "-mwindows" like this: c:\>g++ -c main.cpp c:\>g++ -o main.exe main.o The 'main.exe' after the 2 command lines above will run with a console, and Win32 API functions won't be usable. When calling GCC of MinGW with "-mwindows" like this: c:\>g++ -c main.cpp c:\>g++ -o main.exe main.o

Pydev source file hyperlinks in Eclipse console

此生再无相见时 提交于 2020-01-30 12:04:10
问题 When a python app crashes the console displays hyperlinks to the source code where the exceptions occurred. You just click the link and your source file is opened in the Eclipse editor. I have my own exception handler and would like to put links to source files in the console when my apps crash. I have looked for info on this a few times and cannot see how to do it or if it is possible at all. It seems that it can be done in java by writing to the console in the form ':' - A listener picks

Pydev source file hyperlinks in Eclipse console

五迷三道 提交于 2020-01-30 12:01:11
问题 When a python app crashes the console displays hyperlinks to the source code where the exceptions occurred. You just click the link and your source file is opened in the Eclipse editor. I have my own exception handler and would like to put links to source files in the console when my apps crash. I have looked for info on this a few times and cannot see how to do it or if it is possible at all. It seems that it can be done in java by writing to the console in the form ':' - A listener picks

Adding a GUI to existing Java console based program

不问归期 提交于 2020-01-30 05:19:51
问题 I've been working on a console based program that acts as an inventory of Plant objects. I have a parent class "Plant" that has child classes of "Flower", "Weed", etc... These objects are added, removed, displayed, searched through another class containing the main method and methods for the actions above. The methods/actions are chosen by the user via console input processed with a switch statement. My question is this: We are adding a GUI to this console based program using a JFrame,

javascript odd and even separation in an array of numbers

半世苍凉 提交于 2020-01-29 09:53:11
问题 i wants to separate an array with two groups (odd and even) sequentially. but when i try this: var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]; for (var i = 0; i < arr.length; i++) { if (arr[i]%2 == 0) { arr.push(arr.splice(i, 1)[0]); } } console.log(arr); console.log(arr); // [1, 3, 5, 7, 9, 4, 8, 6, 2] why 4,8,6,2 instead of 2,4,6,8? 回答1: Because you move every found even value to the end of the array: 0: 1 2 3 4 5 6 7 8 9 ^-------------v 1: 1 3 4 5 6 7 8 9 2 3 is not checked, because of the

Windows console width in environment variable

有些话、适合烂在心里 提交于 2020-01-27 08:18:44
问题 How can I get the current width of the windows console in an environment variable within a batch file? 回答1: I like the approach using the built-in mode command in Windows. Try the following batch-file: @echo off for /F "usebackq tokens=2* delims=: " %%W in (`mode con ^| findstr Columns`) do set CONSOLE_WIDTH=%%W echo Console is %CONSOLE_WIDTH% characters wide Note that this will return the size of the console buffer, and not the size of the window (which is scrollable). If you wanted the