console

Allowing redirection of StandardInput of a C# application when doing “Console.ReadKey”

偶尔善良 提交于 2020-12-03 09:43:32
问题 I have 2 applications, A & B. A calls B within a Process. B do some stuffs like Console.WriteLine and Console.ReadLine Thanks to this MSDN Article, I manage somehow to redirect the output of B and to feed its input as well. What I don't manage to do , is to have the Console.ReadKey function in B work. I made a try catch block arround this function and I got this error message: Cannot read keys when either application does not have a console, or when console input has been redirected from a

Console application: How to update the display without flicker?

ぐ巨炮叔叔 提交于 2020-12-02 05:53:25
问题 Using C# 4 in a Windows console application that continually reports progress how can I make the "redraw" of the screen more fluid? I'd like to do one of the following: - Have it only "redraw" the part of the screen that's changing (the progress portion) and leave the rest as is. - "Redraw" the whole screen but not have it flicker. Currently I re-write all the text (application name, etc.). Like this: Console.Clear(); WriteTitle(); Console.WriteLine(); Console.WriteLine("Deleting:\t{0} of {1}

Console application: How to update the display without flicker?

空扰寡人 提交于 2020-12-02 05:53:11
问题 Using C# 4 in a Windows console application that continually reports progress how can I make the "redraw" of the screen more fluid? I'd like to do one of the following: - Have it only "redraw" the part of the screen that's changing (the progress portion) and leave the rest as is. - "Redraw" the whole screen but not have it flicker. Currently I re-write all the text (application name, etc.). Like this: Console.Clear(); WriteTitle(); Console.WriteLine(); Console.WriteLine("Deleting:\t{0} of {1}

Console application: How to update the display without flicker?

社会主义新天地 提交于 2020-12-02 05:53:11
问题 Using C# 4 in a Windows console application that continually reports progress how can I make the "redraw" of the screen more fluid? I'd like to do one of the following: - Have it only "redraw" the part of the screen that's changing (the progress portion) and leave the rest as is. - "Redraw" the whole screen but not have it flicker. Currently I re-write all the text (application name, etc.). Like this: Console.Clear(); WriteTitle(); Console.WriteLine(); Console.WriteLine("Deleting:\t{0} of {1}

How to run Ruby code from terminal?

依然范特西╮ 提交于 2020-11-30 02:15:05
问题 I need to run a few lines of Ruby code from terminal, but I can't find the needed parameter for it. Can you explain how to do this? 回答1: If Ruby is installed, then ruby yourfile.rb where yourfile.rb is the file containing the ruby code. Or irb to start the interactive Ruby environment, where you can type lines of code and see the results immediately. 回答2: You can run ruby commands in one line with the -e flag: ruby -e "puts 'hi'" Check the man page for more information. 来源: https:/

How to clear terminal/screen in scala

心已入冬 提交于 2020-11-29 21:21:11
问题 I need to clear console screen in Scala I've tried standard ANSI Clear screen which was suggested as "Terminal control/Clear the screen" by rosettacode.org here object Cls extends App {print("\033[2J")} I got following error: Error:(8, 14) octal escape literals are unsupported: use \u001b instead println("\033[2J") 回答1: I found solution for my question and I'll share it here for others, apparently from Scala 2.10 Octal litherals are deprecated see here. In question above "\033[2J" didn't work

How to clear terminal/screen in scala

匆匆过客 提交于 2020-11-29 21:16:57
问题 I need to clear console screen in Scala I've tried standard ANSI Clear screen which was suggested as "Terminal control/Clear the screen" by rosettacode.org here object Cls extends App {print("\033[2J")} I got following error: Error:(8, 14) octal escape literals are unsupported: use \u001b instead println("\033[2J") 回答1: I found solution for my question and I'll share it here for others, apparently from Scala 2.10 Octal litherals are deprecated see here. In question above "\033[2J" didn't work

How to clear terminal/screen in scala

╄→гoц情女王★ 提交于 2020-11-29 21:11:58
问题 I need to clear console screen in Scala I've tried standard ANSI Clear screen which was suggested as "Terminal control/Clear the screen" by rosettacode.org here object Cls extends App {print("\033[2J")} I got following error: Error:(8, 14) octal escape literals are unsupported: use \u001b instead println("\033[2J") 回答1: I found solution for my question and I'll share it here for others, apparently from Scala 2.10 Octal litherals are deprecated see here. In question above "\033[2J" didn't work

How to clear terminal/screen in scala

血红的双手。 提交于 2020-11-29 21:10:09
问题 I need to clear console screen in Scala I've tried standard ANSI Clear screen which was suggested as "Terminal control/Clear the screen" by rosettacode.org here object Cls extends App {print("\033[2J")} I got following error: Error:(8, 14) octal escape literals are unsupported: use \u001b instead println("\033[2J") 回答1: I found solution for my question and I'll share it here for others, apparently from Scala 2.10 Octal litherals are deprecated see here. In question above "\033[2J" didn't work

Get-Help for .trim / -trim, .replace / -replace, .split / -split and other string operators

这一生的挚爱 提交于 2020-11-28 18:14:41
问题 PowerShell has a pretty good built-in help system that I use a lot and I'm able to see all help options with Get-Help * and query Cmdlets or can look up Topics with Get-Help about_* and then say Get-Help about_compar* to open the Comparison Operators topic which is all very good. However, I was trying to find how to get help on the various string operators, like .replace, .compare, .split, .substring. Does anyone know how to pull these topics up on the PowerShell console (possibly, they might