console

Can I get Console to show Chinese?

孤者浪人 提交于 2021-02-07 11:54:53
问题 I've always wondered if it would be possible to show UTF8 or UTF16-Chinese text in a Console window, e.g., Console.WriteLine(chinese). For the time being, it shows up as ???. Is it possible to kick up a Console session that supports Chinese characters? 回答1: urxvt, the Unicode rxvt, is a Xwindow "console" that will show Chinese characters. Assuming you're using Windows, this can work under Cygwin or coLinux. also see Unicode characters in Windows command line - how?. I haven't yet figured out

Java Console; readPassword, how does an array protect from determining the password value?

可紊 提交于 2021-02-07 11:48:41
问题 I was reading about the java.io.Console class in one of the java certification books, possibly I've missed something fundamental from a previous chapter, but can someone explain the below? It mentions, that the readPassword method returns a character array instead of a String, to prevent a potential hacker from finding this String and then finding the password. How is a character array safer? If you could obtain the values in the array then could you not create a script to loop through

Where does console output go in an IIS hosted app?

微笑、不失礼 提交于 2021-02-07 11:40:35
问题 Say I have a WCF app hosted in IIS. And in that app I run this line of code: Console.WriteLine("Testing, testing 1 2 3"); Where will that be written to? Or is it ignored and just lost? Is there someway to capture it when needed? 回答1: Nowhere. More specifically: NullStream , which is defined as "A Stream with no backing store.". All the methods do nothing or return nothing. It is an internal class to Stream . The following code is taken from Microsoft's source code. Basically, when one of the

Where does console output go in an IIS hosted app?

一曲冷凌霜 提交于 2021-02-07 11:40:03
问题 Say I have a WCF app hosted in IIS. And in that app I run this line of code: Console.WriteLine("Testing, testing 1 2 3"); Where will that be written to? Or is it ignored and just lost? Is there someway to capture it when needed? 回答1: Nowhere. More specifically: NullStream , which is defined as "A Stream with no backing store.". All the methods do nothing or return nothing. It is an internal class to Stream . The following code is taken from Microsoft's source code. Basically, when one of the

How to control interactive console input/output from Python on Windows?

偶尔善良 提交于 2021-02-07 09:36:26
问题 I need to control a Windows program, which reads input directly from console by calling _kbhit and _getch from <conio.h> . An example of such program can be found here: https://stackoverflow.com/a/15603102/365492 On Linux I can use pty.openpty() to create new pseudo-terminal and to emulate key presses. See this example: https://code.google.com/p/lilykde/source/browse/trunk/lilykde/py/runpty.py On Windows I tried to write to CONIN$ / CONOUT$ but all I can see is that my data is appearing on

How to have a application with caliburn for both console and wpf?

爷,独闯天下 提交于 2021-02-07 09:34:49
问题 We have an application that shall support a "batch mode". So we want to make it callable from the console, just like devenv.exe. The application has a WPF user interface, which is the default interface for most users. We use caliburn.micro with a bootstrapper for the mainwindow. Think we should have a different bootstrapper for that. (Or no bootstrapper at all) How can we "choose" what the environment is? Is there any way to do anything before the bootstrapper begins his job? 回答1: If I

SetCurrentConsoleFontEx isn't working for long font names

做~自己de王妃 提交于 2021-02-07 06:41:45
问题 I can't get this to work for font names that are 16 characters or longer, but the console itself obviously doesn't have this limitation. Does anyone know a programmatic way to set the font that will work with the built-in "Lucida Sans Typewriter" or the open source "Fira Code Retina"? This following code works: I have copied PInvoke code from various places, particularly the PowerShell console host, and the Microsoft Docs Note that the relevant docs for CONSOLE_FONT_INFOEX and

Why does the console window shrink when using GetConsoleScreenBufferInfoEx in Windows?

喜你入骨 提交于 2021-02-06 12:52:14
问题 I'm trying to set the background and foreground colors of the Windows command line console by using GetConsoleScreenBufferInfoEx and SetConsoleScreenBufferInfoEx . I'm doing it in Python, by using wintypes, and sofar it works. But there's something odd happening: the window shrinks a little at every call. This is how the calling code looks like: def GetConsoleScreenBufferInfoEx(handle): csbi = CONSOLE_SCREEN_BUFFER_INFOEX() # a structure csbi.cbSize = 96 # needs to be set success =

How to schedule Artisan commands in a package?

家住魔仙堡 提交于 2021-02-05 20:09:49
问题 I have a package that contains Artisan commands. I’ve registered these commands with Artisan via my service provider like so: /** * Register the application services. * * @return void */ public function register() { // Register Amazon Artisan commands $this->commands([ 'App\Marketplace\Amazon\Console\PostProductData', 'App\Marketplace\Amazon\Console\PostProductImages', 'App\Marketplace\Amazon\Console\PostProductInventory', 'App\Marketplace\Amazon\Console\PostProductPricing', ]); } However,

How to schedule Artisan commands in a package?

…衆ロ難τιáo~ 提交于 2021-02-05 20:09:38
问题 I have a package that contains Artisan commands. I’ve registered these commands with Artisan via my service provider like so: /** * Register the application services. * * @return void */ public function register() { // Register Amazon Artisan commands $this->commands([ 'App\Marketplace\Amazon\Console\PostProductData', 'App\Marketplace\Amazon\Console\PostProductImages', 'App\Marketplace\Amazon\Console\PostProductInventory', 'App\Marketplace\Amazon\Console\PostProductPricing', ]); } However,