Skip to main content

All Questions

Tagged with
8 votes
5 answers
2k views

Python code using *args to print warnings in color

I have this code, which works for the simple tasks I want. But I have questions. ...
aschultz's user avatar
  • 351
1 vote
1 answer
99 views

A calculator in C without #include

I made a calculator in C without #include. Now, I want to make my code shorter and better. But I don't know how. Here is my code: ...
Arian's user avatar
  • 9
0 votes
3 answers
223 views

A calculator in C++

I want to make my calculator code shorter. Here is my code: ...
Arian's user avatar
  • 65
3 votes
1 answer
89 views

Print file out 1 character at a time in the terminal - Python

This program opens a file and prints the text out to the terminal 1 character at a time and at a predetermined speed using time.sleep() Simple and maybe, if you ...
johnashu's user avatar
  • 423
1 vote
1 answer
1k views

Calculate average from .txt file

I have made an exercise where I need to calculate the average per row of a .txt file. (see below) ...
Reno De Corte's user avatar
1 vote
1 answer
231 views

Program that deletes near duplicate directories and directories that have .ini like files

The program needs to only keep directories that have at least 1 .osu (.ini like) file with certain restrictions in them. It also needs to delete duplicate .osu files. But since duplicate files are ...
Manuel's user avatar
  • 89
2 votes
1 answer
3k views

Multi threaded console IO

For many console applications it is handy to be able to receive input and output at the same time from multiple threads. This is supposed to allow receiving input commands from multiple threads, while ...
KaareZ's user avatar
  • 191
6 votes
1 answer
80 views

Get only intended input from user through the console

I finally worked out all of the bugs in this bit of code. I'm pretty proud of it and I wanted to give it to all of you so that you could have it if you wanted it for any console programs that you make....
user103722's user avatar
2 votes
0 answers
144 views

Write to terminal and buffer

...
mpen's user avatar
  • 201
5 votes
1 answer
93 views

Prompt system from reading a text file

I worked starting from basic example code from an exercise in chapter 10 of Java: A Beginner's Guide, Sixth Edition, the code in the exercise was not very good and I wanted to improve upon it and make ...
Phrancis's user avatar
  • 20.4k
3 votes
2 answers
88 views

Constraining stdin in Python, v2.0

Rags, again. This is the rewrite of Read stdin like a dictator. From that post: All too often I find myself wanting to allow only a certain list of characters to be written to stdin, and only ...
cat's user avatar
  • 977
5 votes
2 answers
748 views

Print output one word per line - K&R Exercise 1-12

When writing this code I found myself getting more and more complex. When I got to the solution I trimmed the excess parts I'd thought I needed from before, but didn't actually need. The example of wc....
cody.codes's user avatar
  • 1,935
3 votes
1 answer
110 views

Pass the password back

This code simply receives a very basic 'password' (numbers, letters, nothing fancy). After you press enter, it will display it back. The only special key I'm handling is backspace (code ...
Ismael Miguel's user avatar
4 votes
2 answers
5k views

Calculating and generates a report card for a student

I'm working on this small program for practice and would like to know how I could improve it from here. I'm still a relative beginner with C++ and would like to know if there is a better why to design ...
Beck's user avatar
  • 53
4 votes
1 answer
4k views

The right way to use IPC::Open3 in Perl

Here is the function which does exactly what is specified by its name: ...
Oleksiy's user avatar
  • 163

15 30 50 per page