609 questions
0 votes
1 answer
122 views
In Release configuration formatting escape code dont work until cls
In Debug configuration escape codes works fine, but in Release configuration of unmodded Visual Studio 2017/2022 I get this problem. Just for example. #include <iostream> int main() { char ...
2 votes
2 answers
213 views
How to read accented letters from terminal in Java?
I have the following Java snippet: System.out.print("What is the first name of the Hungarian poet Petőfi? "); String correctAnswer = "Sándor"; Scanner sc = new Scanner(System.in); ...
0 votes
1 answer
167 views
ftp nlst command runs in Python, but not in Windows Command Line
I have exposed an API via python that connects to my ftp server via ftplib: from ftplib import FTP @app.route('/api/ftp/list', methods=['GET']) def ftp_list(): remote_dir = request.args.get('...
0 votes
1 answer
287 views
How can I launch PowerShell as a post-build step in MSBuild?
Currently, you cannot easily debug a binary PowerShell module in Visual Studio 2022 (not Code!). Instead of being required to manually open a PowerShell session, change the location to my project, ...
0 votes
1 answer
146 views
Foreground color doesn't work in Gnucobol for Windows
I am using GnuCobol for Win 10. I need to display a console screen with black background and green foreground but doesn't work, It doesn't using the foreground color, neither the background color does....
0 votes
0 answers
56 views
Python - textual - question marks instead of borders in DOS prompt [duplicate]
When I run this Python code in VS Code, it displays the borders fine. But in a Windows command-line (DOS prompt) I get question marks where borders should display. Code I use the code from Textual ...
0 votes
0 answers
172 views
UTF-8 characters not loading in properly
I have a school project that requires me to load a text file that includes UTF-8 characters like "ł,ą,ż,ź,ć,...", and then to do some editing on that text. The problem is that, if I use ...
0 votes
1 answer
547 views
Insert data into MySQL database using batch
I'm encountering difficulties when trying to insert data into my MySQL database using a batch script. Here's the script I'm currently using: set query=INSERT INTO `my_tbl` (`age` ,`birthdate`) VALUES (...
0 votes
1 answer
64 views
python can't find file when running script from command promt; it works when ran in pycharm [duplicate]
This is my code: import os print(list(os.listdir('test'))) When I run the code in Pycharm it outputs the following: ['test.txt'] However, when I run the same file with windows command prompt I get ...
3 votes
2 answers
3k views
Console.SetWindowSize() and Console.Clear() not working as expected
I'm writing a fairly simple console application and I'm wanting to set the console window to a specific size. I've been trying both Console.SetWindowSize() and Console.WindowHeight/WindowWidth, but ...
-1 votes
1 answer
77 views
_CrtisValidHeapPointer(block) error using SetConsoleCursorPosition function
Develop console Snake. At the end of the program gives an error _CrtisValidHeapPointer(block). Found out by experience, that the problem is in SetConsoleCursorPosition function in line 32 #include <...
6 votes
1 answer
1k views
I'm trying to "fork off" a background process in Go -- works perfectly on Mac and Linux, but dies when terminal is closed on Windows
Consider this trivial Go program, which demonstrates the standard way to "fork off" a background process in Go. When it's run, it should immediately send itself to the background where it ...
0 votes
0 answers
113 views
Can't change CHAR_INFO Attributes of box drawing characters with an IF() statements
I was playing around with Windows API console functions for a project that involves drawing an ASCII map. I got everything working the way I want it to until I got to fiddling with foreground and ...
0 votes
0 answers
98 views
How to get the contents of the console window, if FarManager is running in it
I have an application that use a CreateProcess() function and create a new console window with FarManager run inside. The FarManager is installed on the computer and registered in the environment ...
1 vote
2 answers
515 views
Printing text on the same line as previous input
This is essentially what I want to do: Write-Host "Enter username: " -NoNewLine $username = Read-Host -NoNewLine if ($username -eq "") { Write-Host "None" } If the ...