console-application

Suppress 3rd party library console output?

≡放荡痞女 提交于 2019-12-03 01:55:39
I need to call a 3rd party library that happens to spew a bunch of stuff to the console. The code simply like this... int MyMethod(int a) { int b = ThirdPartyLibrary.Transform(a); // spews unwanted console output return b; } Is there an easy way to suppress the unwanted console output from ThirdPartyLibrary? For performance reasons, new processes or threads cannot be used in the solution. Well you can use Console.SetOut to an implementation of TextWriter which doesn't write anywhere: Console.SetOut(TextWriter.Null); That will suppress all console output though. You could always maintain a

How to add a live (interactive) console window to Atom?

吃可爱长大的小学妹 提交于 2019-12-03 01:30:55
Is it possible to add a live (interactive) console window to Atom? Note that this is similar to the article on adding a live console session to LightTable , except that it is for Atom. Essentially, I am interested in the integrated terminal emulation that Geany is capable of doing: Is there any way to do this in the Atom text editor from Github? AtomTips You might take a look at Atom Terminal Panel packages. MRamazan Yes it is possible. Don't know how they did, but there is a package "paltformio-ide". Installing it would add the windows powershell in atom, like this one: Being used to webstorm

How do I make my java application open a console/terminal window?

↘锁芯ラ 提交于 2019-12-03 00:58:26
Is there any way I can make an executable .jar that will open up the command line when double clicked? I'm making a text-based adventure game. As of right now it is just a maze with rooms. Eventually it is going to be much bigger and more in depth but for now I just want to get the basic structure down. Anyways, to make this work I've been getting output and input from the System.out.printf command and the java.util.Scanner. It's all working beautifully so far but I've realized I'm going to run into a problem when I try to send this to other people that don't know how or just don't want to run

How do I make a console app always run as an administrator?

房东的猫 提交于 2019-12-02 23:39:18
I have a console application that was developed to be called by a erp software. They call my app inside the erp and when they do it, i always get errors related to the insufficient permission to do it. I have checked the "run this program as an administrator" checkbox in the properties of the exe for all users but the result is the same. I have read something about adding a manifest that will make the app prompt for the uac dialog, but thats not what i want because the app will be called from erp on the server and clients will not see the dialog on server. Can someone explain me how to make

#include iostream before stdafx.h in c++

江枫思渺然 提交于 2019-12-02 23:10:03
问题 I created a C++ Console Application in Visual Studio Community 2017. There is only a main.cpp file in the project. Here is my main.cpp file: #include <iostream> #include "stdafx.h" int main() { std::cout << "hello world!"; return 0; } I get a compilation error that 'cout' is not a member of std. But if I include iostream after stdafx.h, that is, #include "stdafx.h" #include <iostream> int main() { std::cout << "hello world!"; return 0; } then it compiles just fine. So why does it not work

Multiple objects drawing (OpenGL)

拜拜、爱过 提交于 2019-12-02 23:06:26
The issue is that I can't figure out how to properly draw two objects, because my another object isn't being drawn. Here's the main code: GLuint VertexArrayID; glGenVertexArrays(1, &VertexArrayID); glBindVertexArray(VertexArrayID); GLuint VertexArrayID2; glGenVertexArrays(1, &VertexArrayID2); glBindVertexArray(VertexArrayID2); GLuint programID = LoadShaders( "SimpleVertexShader.vertexshader", "SimpleFragmentShader.fragmentshader" ); GLuint MatrixID = glGetUniformLocation(programID, "MVP"); GLuint MatrixID2 = glGetUniformLocation(programID, "MVP2"); glm::mat4 Projection = glm::perspective(45.0f

How do I redirect a console program's output to a text box in a thread safe way?

ぃ、小莉子 提交于 2019-12-02 22:59:43
I am having trouble redirecting console output to a windows forms text box. The problem is thread related. I am running a console app in the following way, private void RunConsoleApp() { Process proc = new Process(); proc.StartInfo.FileName = "app.exe"; proc.StartInfo.Arguments = "-a -b -c"; proc.StartInfo.UseShellExecute = false; // set up output redirection proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.RedirectStandardError = true; proc.EnableRaisingEvents = true; proc.StartInfo.CreateNoWindow = true; // Set the data received handlers proc.ErrorDataReceived += proc

HttpUtility.UrlEncode in console application

这一生的挚爱 提交于 2019-12-02 21:57:25
I'd like to use HttpUtility.UrlEncode in a console application, VB.NET, VS 2010 Beta 2. System.Web.HttpUtility.UrlEncode(item) Error message: 'HttpUtility' is not a member of 'Web'. In this question Anjisan suggests to add a reference to System.Web, as follows: In your solution explorer, right click on references Choose "add reference" In the "Add Reference" dialog box, use the .NET tab Scroll down to System.Web, select that, and hit ok However, I don't have a System.Web entry at that location. Rubens Farias System.Web is there, but seems Visual Studio doesn't sort by name by default. You'll

Difference between Crawling and getiting links with Html Agility pack,

ぃ、小莉子 提交于 2019-12-02 21:33:26
问题 i am getting links of a website using Html Agility pack with console application c#, by giving the divs that i want and get the links from those divs, my question is the thing i am doing is crawling or parsing, if not then what is crawling 来源: https://stackoverflow.com/questions/36324098/difference-between-crawling-and-getiting-links-with-html-agility-pack

Windows 7 taskbar state with minimal code

北战南征 提交于 2019-12-02 19:35:27
What would be the shortest code to set the state of a Windows 7 taskbar button for a known window handle? The goal is to write a console utility that changes the progress and state (colour) of the console window taskbar item from a batch script. While the script performs different tasks, the taskbar item of its console window should represent the current state. I get the window handle with the GetConsoleWindow() function, but then it seems to require loads of COM and Shell API stuff that I don't understand. One example I've found uses a whole GUI application with MFC to demonstrate the API,