Linked Questions

4
votes
2answers
55k views

Connect Four game in Java

I was wondering if you guys could point out any mistakes I've made in this program, and how to improve the code. It's a simple console-based Connect Four game. You use 0-5 to place your piece in the ...
3
votes
2answers
86 views

LinkedList using Node Class in C++

I implemented Linked List data structure in C++ for practice purpose. The LinkedList.h uses Node.h as nodes. Creates and insert ...
1
vote
2answers
2k views

Remove the occurences of an element from array if it occurs more than n times

I wanted to remove the occurrence of an element from an array if it occurs more than n times. For example: ...
8
votes
1answer
5k views

Encrypting strings in Golang

This is a an example application for testing some encryption and decryption functions in Golang. The functions encryptString(), ...
7
votes
1answer
4k views

Basic JavaScript template engine using replace, match and RegExp

To practice with regular expressions, I wrote this basic template engine in JavaScript in addition to a simple test case to make sure it works correctly. I am wondering if there is any improvements I ...
4
votes
1answer
67 views

Word Counter Project

I recently read K&R The C Programming Language and wanted to write a small program to count the occurrence of each word in the input (std-input - I piped a file with all shakespeare pieces in ...
4
votes
1answer
2k views

Animal inheritance hierarchy

I'm trying to figure out if I'm doing superclasses right. Also, I welcome critique on Java structure/syntax etc. Animal.java: ...
4
votes
1answer
3k views

HND Java module (vending machine simulator)

As part of the distinction requirement, I am required to ask for testing/review of my code. There was no time allotted for this in class, and as such I am turning to the folks of StackExchange for ...
4
votes
1answer
4k views

Check if a String is a valid Double

For a class, I need to ask the user for a double. To verify that the number can be safely passed to Double.parseDouble, I wrote ...
3
votes
1answer
568 views

Tic Tac Toe with Python and Kivy

Accomplishment: Tic Tac Toe game with Python & Kivy I have created a simple tic tac toe game with a random bot logic (really random after a user selects a mark). Next step would be to insert the ...
3
votes
1answer
285 views

String tokenization and replacing a numbered field

I created various functions for string manipulation in Lua, where the strings are composed of tokens separated by an ASCII character (which may be the point, comma, semicolon etc.). One of these is ...
2
votes
1answer
90 views

Populate the list based on which datacenter code is running on

This is a follow on to : Efficiently detect datacenter based on server hostname and return the full path. I have a library which is running in different datacenters in production. I have three ...
0
votes
1answer
181 views

Cleaning up 3D bin packing [closed]

This is a follow up question to 3D bin packing in Java I finished testing my code's result and started cleaning it up. Could anyone please tell me what I should do or fix to clean up this code more?...
0
votes
1answer
129 views

Calculating the prime numbers between two integers

I've wrote this code to calculate the prime numbers between two integers n and m, and I want to optimise it. ...
0
votes
1answer
191 views

Project Euler#18: Maximum Paths I: Brute Forced Depth First Search

Problem: Data: ...

15 30 50 per page