console-application

Data Warehouse Management Command Line Application - PowerShell or C# Console App

孤人 提交于 2019-12-22 08:13:06
问题 I'll preface this question by saying this is for a Microsoft only shop. If you were to write a console app to manage a data warehouse what would you use: 1) Writing a custom environment for PowerShell (ala the latest flavors of Exchange / SQL Server) 2) Write it as a C# Console App If #2 are there any frameworks that offload writing a "menu system" or any other tasks for you. If this app needed to last 6 to 8 years - would you use PowerShell? No one on the team currently has PowerShell

How clear screen in QT console?

╄→гoц情女王★ 提交于 2019-12-22 06:56:08
问题 I need clear QT console. What is the comand? main.cpp: int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); cout<<"How delete this?"; //system("CLS")? return a.exec(); } 回答1: You can execute: QProcess::execute("CLS"); This will of course only work on Windows. On Linux/Unix-ish systems, you'll need to do: QProcess::execute("clear"); If all you need to do is clear the screen, these things will work. However, if you're trying to build a more sophisticated text-based interface

In a Dart console application, is there a library for an HTTP Request that doesnt require DOM access?

倾然丶 夕夏残阳落幕 提交于 2019-12-22 06:09:07
问题 I started off by trying to use HTTPRequest in dart:html but quickly realised that this is not possible in a console application. I have done some Google searching but can't find what I am after (only finding HTTP Server), is there a method of sending a normal HTTP request via a console application? Or would I have to go the method of using the sockets and implement my own HTTP request? 回答1: There's an HttpClient class in the IO library for making HTTP requests: import 'dart:io'; void main() {

In a Dart console application, is there a library for an HTTP Request that doesnt require DOM access?

僤鯓⒐⒋嵵緔 提交于 2019-12-22 06:09:07
问题 I started off by trying to use HTTPRequest in dart:html but quickly realised that this is not possible in a console application. I have done some Google searching but can't find what I am after (only finding HTTP Server), is there a method of sending a normal HTTP request via a console application? Or would I have to go the method of using the sockets and implement my own HTTP request? 回答1: There's an HttpClient class in the IO library for making HTTP requests: import 'dart:io'; void main() {

How to handle java passwd reading when System.console() returns null?

冷暖自知 提交于 2019-12-22 06:04:47
问题 I'm writing a commandline program that prompts for a passwd and I don't want it to do local echo of the password characters. After some searches, I have stumbled upon System.console().readPassword() , which seems great, except when dealing with pipes in Unix. So, my example program (below) works fine when I invoke it as: % java PasswdPrompt but fails with Console == null when I invoke it as % java PasswdPrompt | less or % java PasswdPrompt < inputfile IMHO, this seems like a JVM issue, but I

How to handle java passwd reading when System.console() returns null?

非 Y 不嫁゛ 提交于 2019-12-22 06:03:15
问题 I'm writing a commandline program that prompts for a passwd and I don't want it to do local echo of the password characters. After some searches, I have stumbled upon System.console().readPassword() , which seems great, except when dealing with pipes in Unix. So, my example program (below) works fine when I invoke it as: % java PasswdPrompt but fails with Console == null when I invoke it as % java PasswdPrompt | less or % java PasswdPrompt < inputfile IMHO, this seems like a JVM issue, but I

Create a standalone .exe file

社会主义新天地 提交于 2019-12-22 05:54:09
问题 I have a console application built in visual studio 2010. When I actually build the project I am getting .exe file under \bin\Debug\MyProj.exe. When I Paste and run this .exe from other location it is expecting other files too. Any thoughts how can I make this as Stand alone exe file. 回答1: There should be other DLL's in the Debug library. You need those to run your exe. If there are no DLL's there, make sure you set the 'Copy local' property of the required references to True, and build again

cscript - print output on same line on console?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 04:11:45
问题 If I have a cscript that outputs lines to the screen, how do I avoid the "line feed" after each print? Example: for a = 1 to 10 WScript.Print "." REM (do something) next The expected output should be: .......... Not: . . . . . . . . . . In the past I've used to print the "up arrow character" ASCII code. Can this be done in cscript? ANSWER Print on the same line, without the extra CR/LF for a=1 to 15 wscript.stdout.write a wscript.stdout.write chr(13) wscript.sleep 200 next 回答1: Use WScript

How do I start a second console application in Visual Studio when one is already running

瘦欲@ 提交于 2019-12-22 01:39:54
问题 I am working through some examples in a WCF book. There is a Host project and Client project within a single solution. Both are console applications. The Host is the startup app, but the Client app doesn't seem to open the Console like the book says. Book says while the Host is running, run the Client. The Run button is disabled tho as it is already running. The book example definitely has them in the same solution and a single instance of Visual Studio. Anyways, what am I missing here? I

The definitive code that prevents a c# console app from exiting [until custom cleanup code has completed]

瘦欲@ 提交于 2019-12-21 21:36:52
问题 Can we work together to come up with something that works for control-c, control-break, log off, window X button pressed, etc? Here is what I have so far: class Program { private static ConsoleEventHandlerDelegate consoleHandler; delegate bool ConsoleEventHandlerDelegate(CtrlTypes eventCode); static void Main(string[] args) { consoleHandler = new ConsoleEventHandlerDelegate(ConsoleCtrlCheck); SetConsoleCtrlHandler(consoleHandler, true); System.Diagnostics.Process.GetCurrentProcess().Exited +=