A mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.
0
votes
0answers
7 views
main.c with getopts and scans for terminal input
My main uses getopts to meet the requirements ./a.out --version and ...
7
votes
2answers
132 views
First C# program (Snake game)
I've just started out using C#. I've used Scratch (drag and drop programming for kids) for quite some time. Since Scratch didn't have classes and methods I have a feeling this code could be a lot more ...
3
votes
0answers
18 views
2
votes
1answer
79 views
C++ Console variables
I've written some code for console variables. They support different types e.g. integer, string, vector, float, etc.
Is there a better way to do this? Like with an interface and a class for each ...
3
votes
1answer
24 views
Displaying a table of shell aliases
I'm just getting into bash and sh scripting. I mostly just stub out little convenience or exercise scripts for myself, but I recognize I may be flaunting best practices at times.
My question is ...
-1
votes
0answers
46 views
png2jpeg, a utility for converting PNG to JPEG (rev. 3/3)
Revisions:
Revision 1
Revision 2
Revision 3 (you are here)
png2jpeg is a simple command-line converter of PNG to JPEG.
The source code requires the libpng and libjpeg development libraries to be ...
6
votes
2answers
232 views
First program: a simple calculator
I'm reading this very good book, C# Player's Guide, to learn C#. I then plan to make video games with Unity 3D after.
In one of the chapters, he asks us to make a (really) simple calculator as a ...
2
votes
2answers
123 views
png2jpeg, a utility for converting PNG to JPEG (rev. 2/3)
Revisions:
Revision 1
Revision 2 (you are here)
Revision 3
png2jpeg is a simple command-line converter of PNG to JPEG.
The source code requires the libpng and libjpeg development libraries to be ...
2
votes
1answer
87 views
C# console roulette game
I made a C# console roulette game. Check it out and give opinions on how to improve or ideas for some other features? It's not finished yet so it has lots of room for improvement. I am very new so ...
3
votes
1answer
49 views
A Java library for formatting console output
In perl, there is that format facility for console output. I thought it might be good to practice some library design instead of algorithms once in a while. This may be compared to a GUI library: you ...
7
votes
2answers
223 views
png2jpeg, a utility for converting PNG to JPEG (rev. 1/3)
Revisions:
Revision 1 (you are here)
Revision 2
Revision 3
I've been working on a simple command-line png2jpeg utility. Its purpose is to convert images from PNG format to JPEG.
The source code ...
3
votes
1answer
24 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 ...
2
votes
2answers
40 views
Copy directory to multiple directories - I/O performance matters
I am working on below python copy utility that should work on windows & linux,
But I am looking for a more efficient approach that could optimize my I/O correction, as my target location is ...
3
votes
1answer
43 views
Template for PHP service (/etc/init.d) script
I wanted a template for a service script that is versatile and easily configurable.
Along with producing similar outputs to the SSH and Samba daemons, I request the code to be as clean, simple and ...
1
vote
0answers
49 views
A command line Java program for computing grade point average - follow-up
(See the previous and initial iteration.)
I have refactored the API based on excellent review by cbojar. Also, a honorary mention goes to janos for pruning some unnecessary code out of the transcript ...
7
votes
3answers
90 views
A command line Java program for computing grade point average
(See the next iteration.)
I have this command line program for computing GPA (grade point average). Given credit sequence \$\langle c_1, c_2, \dots, c_n \rangle\$ and grade sequence \$\langle g_1, ...
5
votes
2answers
83 views
Coloring a string in a terminal
I have this code which makes it easy to color a string in terminal but it is looking really repetitive. Is there a more idiomatic way of writing this? Also is there a functional way of doing this more ...
5
votes
1answer
99 views
Text-based Dungeon Crawl game
This code is an answer to an exercise I found on the cplusplus forums.
I'm a beginner so any reviews will be appreciated :)
Make a program that outputs a simple grid based gameboard to the screen ...
7
votes
2answers
48 views
CLI Twitter client in Python
Here is a simple client for Wwitter that I wrote based on the twitter library in Python. The aim is to be able to read the feeds from different twitter accounts ...
1
vote
0answers
110 views
Interactive command line YouTube downloader with option to burn subtitles into video
This is only used on Mac machines. I know that there is a Python implementation of youtube-dl and several for ffmpeg, however I chose to use subprocess so that I can see the real-time stdout/stderr ...
4
votes
1answer
70 views
Application for encrypting and decrypting files in Java - follow-up
(Everything needed for running the app is here.)
I have refactored my previous version a bit.
App.java:
...
3
votes
1answer
91 views
Application for encrypting and decrypting files in Java
(See the next iteration.)
I have that application for en-/decrypting files. Here, I will post the actual GUI and command line code. In order to run the program refer to this GitHub repository.
Some ...
4
votes
1answer
55 views
File creation program
I have written a program that is very simple, with a very specific purpose. However, having written it in approximately 2 hours, (with a bit of cut/paste from some of my other programs and MSDN) it's ...
2
votes
1answer
33 views
Bash script menu
Any comments on this?
Like there is a way to get rid of all the if-statements or a better way to # check model and build (which ...
5
votes
2answers
174 views
First Tic Tac Toe game
I've been learning Objective C for a few days so to test my skills I went ahead and made a simple Tic Tac Toe game using the console. I already have some experience with languages such as C++, Java ...
2
votes
0answers
132 views
Execute commands over Telnet, logging to a file
I have made some code that will login to a device and send all your additional commands. It also logs the commands and the returned values to a file on the local system.
Hope somebody can tell me if ...
3
votes
2answers
42 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 ...
4
votes
2answers
87 views
Colorful output on terminal
I went from manually outputting escape codes in each string to creating a utility struct/class full of static functions and variables that needed to be initialized in source files (static private ...
4
votes
2answers
80 views
Un*x terminal history wiper
Using various answers from Stack Overflow and Ask Ubuntu, I've hacked together this simple C program that wipes terminal history. It works but I'm relatively new to C so I'm not sure if everything is ...
4
votes
3answers
176 views
Filter column and row according to regex in header
I'm writing a script that can grep the rows and columns from a text file that match a regex. I have an implementation but I'm looking to make it more elegant.
input.tsv
...
2
votes
1answer
138 views
Connect4 With AI
I have made a connect 4 console application in C++ and would love some feedback. In this project I have learned about inheritance and using virtual functions.
Main.cpp
...
6
votes
2answers
231 views
Command Prompt TicTacToe in C#
I wrote a basic command prompt Tic Tac Toe Game. I want to know what can be improved in terms of modeling and what mistakes I've made (if any).
...
3
votes
1answer
51 views
Terminal ESC Sequence Decoder
The goal of this code is to read-in a stream of terminal ESC sequences, and break them down and fill a vector of parameterized sequences for processing later on.
For example ...
6
votes
1answer
95 views
Read stdin like a dictator
Rags.
Introduction
All too often I find myself wanting to allow only a certain list of characters to be written to stdin, and only recently did I actually ...
5
votes
3answers
505 views
Dr. Nim game in Java
This video should explain how the game works, but in simple form, it's a game where you enter a number between 1 and 3, This number is than removed from 12, in doing so the computer will then pick a ...
4
votes
1answer
50 views
JavaScript (ES7) LOC counter
I've been writing JavaScript for a couple years but nobody's ever really looked at my code.
This is a small library I wrote to check code modularity, w/ input like ...
57
votes
6answers
9k views
How clean is my snow?
I just wrote a snow animation in Python. I think this is fairly clean but I have a few things that I don't like.
...
4
votes
1answer
114 views
FFmpeg command line for showing two videos side by side
Here is command line for playing two videos side by side in sync in FFmpeg (ffplay). It can be useful for comaring videos, for example.
...
7
votes
1answer
163 views
Connect Four - Console Application
I have attempted to make the classic game Connect Four in C++, and I would love some feedback on this project. I have done everything myself without using the help of a tutorial or guide, so sorry if ...
3
votes
1answer
120 views
Battleships console game
I have built a light version of a battleships program and would love for anyone to critique it. The game does not feature OOP, AI nor multiple boards. I aimed more for functionality than correct ...
2
votes
3answers
72 views
Systems management using SSH for my school
I wrote this script in order to generate a hosts.txt file with the IP addresses of the laptops in my school.
Each laptop is assigned a number, and their IP addresses are assigned to them with the ...
5
votes
1answer
230 views
Tic Tac Toe - Console Application
I feel that I have done as much as my knowledge base allows me to on developing this tic tac toe program. I would love for anyone to critique it and tell me of any good/bad points.
Includes two ...
8
votes
2answers
76 views
“Drone Racer” now shipping in your local area
This question is a follow-up of this one; where I present a software to plan and manage drone races. I might come with a new question about the SQL part in a few days as well.
The code can still be ...
3
votes
2answers
84 views
Console animations
I'm a coder who's relatively new to Python and I wanted to spice up my console applications a bit by making animations. The code I've written works perfectly, but I just wanted to know if it was good ...
2
votes
0answers
54 views
Termios/Xterm line editor for APL interpreter
As an interesting sub-part of an interpreter -- just the Read part of the REPL -- I present my raw-mode line-oriented editor that I intend to use for my APL interpreter. (The Eval part has been posted ...
7
votes
2answers
276 views
Hexadecimal command line file viewer
I have been working on a project for several days. It is a command line program for viewing files in hexadecimal. It is usually very fast, but is there any way I could make it more efficient?
...
4
votes
2answers
75 views
Closing InputStream of a running process
Let's say you want to extract the output of a console application till you've found a certain keyword. If you have found the keyword the started console process still should be running, however the ...
16
votes
3answers
701 views
Tic Tac Toe - console application
I have made a little Tic Tac Toe console application using OOP techniques and would love to get some advice and guidance on what I have done. I have tried to structure the program to be as organized ...
3
votes
0answers
67 views
Console Command module (in-game console or base for script engine)
I've created a console/terminal command handling module that allows the programmer to bind functions to a command name and later execute them from std::string. What's new is that it handles most stuff ...
10
votes
3answers
105 views
Counting characters
I'm a beginner at coding, and I am looking to improve the structure of how I write code and will take any tips. Posted a simple program that takes your name as input, then runs the string through a ...