7,373 questions
0
votes
1
answer
54
views
While generating PDF using puppeteer sharp, the content under canvas tag for map is not displaying, instead displaying empty [closed]
I tried using Puppeteer Sharp in headless mode to generate a PDF for a dashboard that contains a map, which uses a <canvas> tag for its content. In the generated PDF, the heading is displayed ...
-3
votes
1
answer
110
views
C++Builder 13 Console Window is Truncated [closed]
I've revisited an old console app that generates output of more than 25 lines. Unlike my earlier experiences with C++Builder, the output window using C++Builder 13 truncates to 25 lines. I am ...
1
vote
1
answer
258
views
Configure IntelliJ to generate Java 25+ code using IO rather than System.out/System.in
Java 25 gained the convenience class IO for simpler access to the console, with print, println, & readln methods. See JEP 512: Compact Source Files and Instance Main Methods for details.
In my ...
1
vote
2
answers
137
views
How can I improve input validation in a C# console application? [closed]
I’m currently working on a Student Grade Management System in C# as part of my learning project. The application allows users to add students, assign grades, calculate averages, and display student ...
0
votes
0
answers
79
views
How to open a console window in a Windows GUI application and attach it to the console when launching a program from it [duplicate]
I want to make a C++ program in Windows that behaves the same way as on Linux: when you double-click the program, it starts, but the console does not open, and when you launch it from the console, the ...
1
vote
0
answers
167
views
Console Screen Buffer Info is incorrect
I have an application that when I run using the Windows Console (aka Command Prompt not Windows Terminal) in Windows 11, I have noticed has the following behaviour (unclear if it happened with earlier ...
1
vote
3
answers
172
views
Trying to print second last word but output shows only "L". What's wrong with my Java code? [closed]
A program that prints the second last word of a sentence.
public class secToLast{
public static void main(String args[]){
String gg = "I love India";
int len = gg.length()...
3
votes
0
answers
80
views
Reading `STDIN` on Windows in MSYS2
Setup
Symfony Console application.
Packed into a Phar with Box.
Distributed as an executable for Win, Linux, and MacOS with PHPMicro.
Execution
MSYS2 on Win11.
make import calls app import < &...
-1
votes
1
answer
109
views
Getting stack overflow while trying to add list to a list [closed]
So i am trying to make a chessbot in c#.
I have implemented almost everything, except king movement.
This is the code which determines if the king can move or not. It should prevent king movement if: ...
0
votes
1
answer
53
views
Need help connecting to a Windows share as logged-in user when console app runs as Admin
I've seen several questions and answers about trying to access a network share as an admin user, but I'm in a situation where I want to do the reverse.
I'm working on a C# Framework 4.8 console app ...
1
vote
0
answers
57
views
NewRelic custom instrumentation for .net console application does not publish transaction names as expected
So, I have a console .Net 6 application which runs as a BackgroundService using the extension method UseWindowsService(). In this app, I am using NewRelic custom instrumentations using a newrelic....
0
votes
0
answers
65
views
Prevent CommandPrompt/PowerShell from returning after launching a Windows GUI app in command mode [duplicate]
I have a Windows GUI app with wWinMain entry point due to SUBSYSTEM:WINDOWS setting. This GUI app can be launched in command mode by specifying a special argument. When launched in command mode, the ...
2
votes
1
answer
193
views
How to configure Serilog to write to console in .NET Framework console application?
Here is what I have in app.config of my .NET 4.8 console application:
<add key="serilog:minimum-level" value="Information" />
<add key="serilog:using:File" value=...
0
votes
0
answers
49
views
MudBlazor Styling Not Applied in Razor Class Library When Used in Host Application
I'm using MudBlazor in a Razor Class Library (RCL) and facing an issue with styles not being applied correctly when the RCL is used in another application.
Setup:
I have a Razor Class Library (RCL) ...
0
votes
0
answers
82
views
System.TypeLoadException on SqlConnection.Open method call
I have a console application which has a reference to the project which has package Microsoft.Data.SqlClient.
I am trying to fetch data from SQL Server using ADO.NET with the following method
private ...
0
votes
0
answers
72
views
Metadata file '... .dll' could not be found
I have a console application which has project reference of a web application.
This is how the project reference is added in the csproj file of the console application
<ItemGroup>
<...
3
votes
5
answers
221
views
How can I reduce console flickering when drawing walls in an infinite loop in my C++ snake game?
I'm trying to build a simple snake game that runs in the console:
#include <iostream>
#include <windows.h>
#define WIDTH 30
#define HEIGHT 50
void board(){
// COORD coord;
for(...
1
vote
1
answer
141
views
basic console animation in c [duplicate]
I want to know how to "animate" something in the windows console with c.
I am unsure of wich prompts/keywords i have to google to find the answers i want.
This is just a project for me to ...
1
vote
1
answer
122
views
How do I modify the template for the auto-generated global using file?
Following is the content of the auto-generated <ProjectName>.GlobalUsings.g.cs file when a Console Application or a Class Library project is created -
// <auto-generated/>
global using ...
1
vote
0
answers
135
views
Progress bars in c# console application overlapping
I'm trying to create a progress indicator in my C# console application that updates on the same line, but there is a bug that I haven't been able fix. When the view reaches the bottom and starts to ...
0
votes
1
answer
80
views
problem: mingw, _tmain(), UNICODE, console WinMain
I have a console program that I've been building with 64-bit MinGW. It has worked fine for years, but without Unicode support. However, I need to convert to Unicode now, because my program (a color ...
0
votes
3
answers
295
views
Resolving IConfiguration with environment-specific AppSettings.json
I have two settings files appsettings.json and appsettings.Development.json.
I am navigating between them by putting this code in Program.cs
if (Debugger.IsAttached)
{
configBuilder
....
0
votes
0
answers
81
views
Debugging simple C# application doesn't start the application
I am running into an issue with Visual Studio where starting my simple C# console application with debugger attached (F5) seems to not start the application. When clicking start, the debugger starts ...
0
votes
0
answers
61
views
I have a problem with picking up a file in a Visual Studio Console App
I've got some legacy code in C++ (working) that I want to use from a C# Winforms application. What I've done is call a C++ console app after writing a data file in the Winform app for the fitting ...
1
vote
1
answer
62
views
How do I erase the last word printed onto the terminal?
I would like to be able to erase the last word printed onto the terminal. The last word should be the last string of text following a space. The following code simulates what I am trying to achieve. I ...
-3
votes
1
answer
106
views
ASP.NET Core Web API calling .NET console aspp
I have an ASP.NET Core 8.0 Web API with a project reference to .NET 8.0 console app. An endpoint in the API controller calls the underlying console app (by direct method invocation and not by ...
1
vote
1
answer
150
views
Is Adaptive Sampling Disabled/Enabled by default by the application side on .NET Console App?
When we send Log To Application Insight using Telemetry Configuration and New TelemetryClient with CustomTelemetryInitializer Not using ApplicationInsight SDK Or Worker Service for a Console App.
Just ...
0
votes
1
answer
125
views
Task.WhenAny() (with Task.Delay()) not "timing out" [closed]
I'm finding an AsyncOperation seems to hang (I've asked about the specific hanging in another question) so I wanted to add a 'timeout', so I've implemented what I think is a fairly standard WhenAny() ...
-3
votes
1
answer
86
views
How can i call destructor explicitly? [duplicate]
In this problem, i have one class that is implement some functionality. But at the end i need to call destructor for perform some task. So how can i will call destructor in my main method.
Flight.cs ...
0
votes
1
answer
330
views
Is it possible to create an old-style single-threaded Linux application in Go?
I’m wondering is there any way to create a singe-threaded console application in Go?
Surely, I completely understand this is not the Golang way to do things (and we can create such application in C/...
0
votes
0
answers
159
views
What is the Fastest Function to Print Text Into the Terminal in C++? [duplicate]
I've recently been creating a console-based application that displays a rotating cube in 3d. To create this application, I needed to print text to the console quite quickly. I was wondering if there ...
1
vote
0
answers
167
views
Is there a ANSI escape sequence alternative for better performance
I am currently porting a graphics terminal renderer from Windows to Linux. The Windows version uses the win32 console API to render color, and it runs pretty smoothly. On Linux I'm trying to use ...
1
vote
1
answer
78
views
Console App - A named connection string was used, but the name 'DefaultConnection' was not found in the application's configuration
I have an issue where I am getting the following error when running my console app.
A named connection string was used, but the name 'DefaultConnection'
was not found in the application's ...
3
votes
1
answer
203
views
How to read the entire console buffer in Windows 11
I wrote a utility originally with Windows 7, which reads the entire console buffer and creates a text file with its contents. A stripped down version (no filing) is shown below, compiled as 32-bit ...
0
votes
0
answers
154
views
How can I attach a debugger to a dotnet console application in VS Code?
I've been at this for a couple hours now and I continue to be baffled at how intractable this is. I'm simply trying to attach a debugger to a running console application that I'm developing in VS Code,...
0
votes
1
answer
82
views
Making an Async Task generic
I am working on an internal console app that allows users to get a full set of results from our paged JSON API. We have many different types but all fall into the same base structure.
public class ...
0
votes
1
answer
121
views
How to replace values in an array that is inside of a class?
I have ran into a problem where I have a class that stores an array, and also a method that is supposed to change the values in that array. The problem is when the code continues the values that the ...
0
votes
1
answer
62
views
pascal's triangle code resulting in an infinite loop
title
i'm trying to program pascal's triangle in c# and i cant understand whats wrong with the code,
this is what i wrote:
static void Main(string[] args)
{
int numrows = int.Parse(Console....
0
votes
1
answer
191
views
Autofac Resolve is extremely slow in .NET Generic Host HostApplicationBuilder
We have been using Autofac since .net framework 4.8 and its performance has been looking fine. However when we are trying to use exactly the same code into Console Application which is based on .net ...
0
votes
1
answer
79
views
How do i read the embed files from a pdf (without an external lib) [closed]
I would like to develop a console application in Visual Studio that can read embedded files from a PDF. While I am aware that there are various libraries available to simplify this process, I am ...
0
votes
0
answers
55
views
FastReport.Net RTF export issue
I am trying export RTF file using .NET 8 console application and FastReport.Core.Skia.Demo v2025.1.4 nuget package.
Questions:
Export result second page layout is automatically changed
How to set ...
1
vote
0
answers
55
views
unknown type name 'SAL_acquire'
I am worknig on an application that runs on Windows 10 prompt. I am using Windows APIs, the program language is C and GCC as compiler. One year ago I was able to compile this project without errors, ...
0
votes
2
answers
70
views
How to dynamically handle and display varying numbers of columns (e.g., drink ingredients) in C#?
I’m working on a project that fetches drink details from an API (TheCocktailDB). Each drink can have up to 15 ingredients and corresponding measurements, but the actual number of ingredients varies by ...
-1
votes
2
answers
253
views
How to programmatically stop and start a console application?
I have a console application written in C# that I plan to deploy to Azure. I need to be able to programmatically control its execution — specifically, start and stop the app using code (c#).
Any ...
0
votes
1
answer
170
views
Can I get a console unicode characters screen width and if they can be overlapped?
I've dug through the properties of char and I'm not finding a way to see it. In forms, I'm could measure the font based on type and size, but clearly I can't do that with a console. I find I'm ...
1
vote
1
answer
53
views
How to prevent repeated error messages for consecutive invalid inputs in Java?
I am working on a Java program that requires user input validation. The program asks the user to enter a number greater than 10, and if the input is invalid (e.g., non-numeric or a number ≤ 10), it ...
0
votes
2
answers
195
views
Dependency Injection works in API, but failing in a .NET 8 console application
I am trying to utilize a library written to add Sharepoint functionality. Here is how the SharepointClient class is constructed in the library.
public class SharePointClient : ISharePointClient
{
...
1
vote
1
answer
81
views
PersistentVector Error, or 'long' error in a small tic tac toe game
My clojure tic tac toe game won't work and I have lost the thread.... I am not exactly sure which part is broken and I am having trouble figuring out my own code. Could someone help me understand why ...
0
votes
0
answers
63
views
MasmBasic assembly code to encrypt any file problem
I had problem with line 15
test.asm(15) : error A2008: syntax error : ,
the code
include \masm32\MasmBasic\MasmBasic.inc
.data
key db "AMU", 0
keyLength db 3,0
Init
Let esi = ...
4
votes
1
answer
2k
views
Newer easier ways to interact with the console in Java 25+? What is IO.println()?
I have seen mentions of new classes and methods for interacting with a console in a Java app. Like this:
You shouldn't use Scanner at all, really. It's not meant for keyboard input, and it has ...