console

Windows console width in environment variable

爱⌒轻易说出口 提交于 2020-01-27 08:17:27
问题 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

Autohotkey wrong keystrokes sent to console

你离开我真会死。 提交于 2020-01-24 06:27:27
问题 I am trying to understand this bug and I am looking for a workaroud. Using this script: #NoEnv #SingleInstance force SendMode Input ;Alt+t to send keystrokes !t::Send, /[] It send the correct keystrokes / [ ] to all windows but the windows console (cmd) Additional Info: Using autohotkey v1.1.09.02 With an english US keyboard layout, it sends: ' 9 0 With a french canadian multilingual keyboard layout, it sends: é ^ ç Any idea of what can fix it? 回答1: Try this: #NoEnv #SingleInstance force

Command-line dialog tool for Windows

喜你入骨 提交于 2020-01-24 03:13:06
问题 I need a dialog tool similar to cdialog (or whiptail), but one that will work on Windows. I have MinGW and compiling something from source is no problem, but both cdialog and whiptail, the only ones that I know of, contain code that is UNIX-specific, and so they will not compile on Windows. Are there any alternatives that I can use? I'd rather not have to figure out and replace the platform-specific code myself. 回答1: I remember the E Text Editor using wxCocoaDialog for that purpose:

Not able to remove Google App engine Service from the admin console

二次信任 提交于 2020-01-23 07:06:06
问题 How to delete Google app engine services from admin console which was added through developer email login. After paid google hosting now I am not able to login with developer email account Its now only allow with the email account which I open for this domain email account. I set all the permission (Super Admin, Groups Admin, User Management Admin, Help Desk Admin, Services Admin) but still when I try to remove Google app engine service from admin console it give this error, You do not have

Cannot start a console in newly installed Pycharm in Windows

天涯浪子 提交于 2020-01-23 06:11:35
问题 On Windows 7 machine, Pycharm (community or professional) and Python 3.4 (tried Anaconda 3 as well) were installed newly. There were not problems running Python scripts interactively in main editor. However, when I tried to select View > Tool Windows > Python Console , it generates the following error messages and more. Basically, I couldn't bring up a console window in Pycharm. C:\Users\user\Anaconda3\python.exe -u C:\Program Files (x86)\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevconsole.py

Proper way to print unicode characters to the console in Python when using inline scripts

青春壹個敷衍的年華 提交于 2020-01-23 01:58:27
问题 I am looking for a way to print unicode characters to a UTF-8 aware Linux console, using Python 2.x's print method. What I get is: $ python2.7 -c "print u'é'" é What I want: $ python2.7 -c "print u'é'" é Python detects correctly that the console is configured for UTF-8. $ python2.7 -c "import sys; print sys.stdout.encoding" UTF-8 I have looked at 11741574, but the proposed solution uses sys.stdout , whereas I am looking for a solution using print . I have also looked at 5203105, but using

How do you disable os_log_info and os_log_debug messages in Xcode console?

三世轮回 提交于 2020-01-23 01:20:11
问题 Modern API for Logging is easy configurable in Terminal. However, Xcode seems to output all levels including INFO and DEBUG which is very annoying. Because most of the time you want to see only os_log_error and NSLog aka “something went wrong” and “this is important”. So is there any way to display only particular levels in Xcode Console? os_log_info(OS_LOG_DEFAULT, "Info"); os_log_debug(OS_LOG_DEFAULT, "Debug"); os_log_error(OS_LOG_DEFAULT, "Error"); os_log_fault(OS_LOG_DEFAULT, "Fault"); os

How do I center text in a console application? [duplicate]

人盡茶涼 提交于 2020-01-22 16:35:10
问题 This question already has answers here : Centering text in C# console app only working with some input (3 answers) Closed 5 years ago . I am creating a console application and I need to center the text. Is there an easy way to do that, or do I have to place spaces before the text until it is centered? Thank you for your help. Example, using '|' as the center of the console: Hello|World 回答1: string s = "Hello|World"; Console.SetCursorPosition((Console.WindowWidth - s.Length) / 2, Console

Capture Console in Delphi 2009 and above

妖精的绣舞 提交于 2020-01-22 12:56:33
问题 The code below works for Delphi XE, but the 2400 buffersize is pretty ugly. Anyone have some suggestions on cleaning this routine up ?? And making the 2400 limit disappear (without defining a 64000 buffer). Thanks procedure TForm1.Button1Click(Sender: TObject); begin CaptureConsoleOutput('c:\windows\system32\ipconfig','',Memo1); end; procedure TForm1.CaptureConsoleOutput(const ACommand, AParameters: String; AMemo: TMemo); const CReadBuffer = 2400; var saSecurity: TSecurityAttributes; hRead:

Can anyone help me check my BMI Calculator? (C#)

萝らか妹 提交于 2020-01-21 18:59:28
问题 I just started programming a week ago and my first assignment was to code a BMI calculator. It is supposed to look like this when launched: BMI Calculator Your weight in kg: x Your height in cm: x Gender (m/f): x -> You are underweight/normal/overweight Here is my code so far: Console.WriteLine("BMI Calculator"); Console.WriteLine("==========="); Console.WriteLine(); Console.Write("Weight in kg: "); int kg; kg = Convert.ToInt32(Console.ReadLine()); Console.Write("Height in cm: "); int m; m =