# All Questions

6 views

### need a simple code to print a christian style cross

i need to print a cross in which i can chose the size and the character it's made of. for example, this cross' size is 6 and the character is M. i need to be able to chose whatever size i want and ...
10 views

### My Python interpreter for Self-modifying Brainf*** has a bug [on hold]

I wrote this Python interpreter for a language called Self-modifying Brainf*** (SMBF). Today I discovered a bug where if the program dynamically creates code at the initial cell or after on the tape, ...
30 views

### Easier user input in C++

I've always been a little bothered by the fact, that in order to get user input in C++, one had to use up to three lines of code in an ugly manner like the below to get user input for a specific type, ...
6 views

### Dump of ColdFusion cache

I am trying to give show a UI friendly dump of the cache status ...
8 views

### Strand Sort in Python

After reading about Strand Sort on Wikipedia and testing the provided Python version, I decided to try my hand at a faster implementation. I've studied the "Time Complexity" page, read many different ...
22 views

### Risk battle simulator

I've written a program to find the odds of either side winning a battle in Risk, and how many men they would have left. I've finished, but I feel that it can be improved since it doesn't function if ...
7 views

### Simulating dynamic systems and postprocessing

I wrote a script which runs a simple simulation and post-processes it using P5*js (an official js port of the Processing API). Unfortunately, it is not performing well, but as i am a new to javascript ...
12 views

...
18 views

### Iterator range for console class that handles multiple buffers

This question is a spiritual successor to Console class that handles multiple buffers. I was mostly interested in implementing one of the suggestions of using an iterator range and fixing the ...
12 views

### OpenGL ES frustum culling not working [on hold]

I am trying to draw a square but even after frustum culling my square is just a rectangle. My onSurfaceChanged and onDrawFrame ...
21 views

### Trying to refactor code into a library

I am trying to turn my code into a working library. (My first) Currently you simply call GridNav() and it sets up and executes. I am currently refactoring out all ...
13 views

So I have part of a library which deals with scopes in Google+ integration, and I'm curious on the overall view of it. Yes, things are stringly typed in one of the methods, that is because this has ...
22 views

### Create matrices of a certain format

I need to create matrices that follow a specific format: the matrix is a square NxN matrix and the off-diagonals all have the same value (param) and the diagonals ...
14 views

### Purchase-ordering

This is the Save function on my PurchaseOrder model in my real world production system. This code needs to write the state of ...
19 views

### Generate key from array

What do you think about quality of code in this method? It should: Generate new key based on keys in array The key should start with "TG" Code should find the max number in array keys with "TG-" ...
47 views

### Project Euler: #36 Binary and Base 10 Palindromes

Here is the Euler problem referenced, it says: The decimal number, 585 = 1001001001$_2$ (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which ...
17 views

### my code doesnt work at all i tried to write it but it doesnt go through at all [on hold]

i got the idea but dont seem to apply it right. i need to sort the string inputs in order alphabetically and i made it very confusing for some reason cant see the simple way. ...
43 views

### Grouping positive & negative reviews and counting the words

Can somebody help me make the code below smarter and free of redundancy? The code does exactly what I want, but I believe there are many redundant loops and arrays. ...
74 views

### Simple interpreter for a golfing language

This is the seconds version of an interpreter yesterday. It's supposed to be used for code golf, but it currently can't do much. ...
53 views

### What kind of Wall should it be? (for an RPG)

I'm creating an RPG type game, and now I am working on procedural town generation. The algorithm for that creates some roads going horizontally and vertically, and then attempts to place buildings in ...
59 views

### Faster(?) factorial calculations

I saw this question, but was unable to answer because of my inexistant knowledge of Rust, so I decided to try and write an algorithm on my own and put it for review. There is the casual way to ...
34 views

### App for a tabletop RP that generates hits and misses for weapons

I'm looking for tips on cleaning this up. I think it's legible, but it sure ain't pretty. In particular, I'd love to clean up the hitCheck function. I've dealt with ...
23 views

### need help on area of rectangle [on hold]

i need to ask the user to input the width and length of a rectangle then get the area (multiply) but i keep getting this error code. Traceback (most recent call last): File "", line 4, in area ...
595 views

### The Mysts of Altair C++ Text Adventure Game

This is my code for The Mysts of Aesthoth so far. I'd like to know if I'm following best practices, and what can be improved. ...
29 views

### Member function to turn class into dict

I'm working on a project where I often want to turn class instances into dictionaries to write them to MongoDB. I'd like some feedback on the following: ...
32 views

### Simple animation method with requestAnimationFrame code structure

I'm writing a animate method to perform DOM animations. I know there are a lot of libraries out there that already does that (and I use some ideas of them) but I usually prefer writing my own code to ...
17 views

### Asynchronous model fitting that allows termination in Python

The problem When you work with Python interactively (e.g. in an IPython shell or notebook) and run a computationally intensive operation like fitting a machine-learning model that is implemented in a ...
574 views

### Calculate someone's pay, including overtime

In this problem, you need to calculate someone's pay by multiplying their salary (double)by the hours (int) worked. If they worked for more than 8 hours, you pay them 1.5 times their salary for ...
84 views

### ASP MVC Controller Unit Test

So I've been writing a unit test using Rhino Mocks to a controller in my ASP MVC application. The test passes, but I'm interested in your opinion and if there's something I should be doing differently ...
10 views

### Counting and Displaying Odd and Even numbers in functions [on hold]

We're supposed to make an array that will ask the user for 10 numbers. Then, we would store them in different arrays by using functions. One will hold the even numbers and the other the odd numbers. ...
45 views

### Re-use of read/write object , for multiple objects

I have read a lot about serialization and I cannot figure out how I am able to serialize then deserialize multiple objects. I am very much a newb to Java, so please bear with me. My code currently ...
25 views

### samba setup for simple NAS - don't discuss here, goto superUser [on hold]

I'm setting up a music server for my family. It is actually working, which is why I'm on code review. I'm not happy that I understand enough about how samba is configured, to understand the security ...
9 views

### REST proxy in Meteor

I built a simple proxy using Meteor and its Iron Router. It currently fails at passing through other than 200 or 500 status codes, which i guess suffices. Is this ...
31 views

### Complicated inheritance [on hold]

I found the below code in our code base at work, and I think it looks strange. The class RetainCounting is used for implementing reference counting. Should the IProvider really derive from ...
35 views

### Noughts and Crosses GUI game in Java - Part 2/2: GUI

(See also Noughts and Crosses GUI game in Java - Part 1/2: AI) This part is dedicated to the View/Controller of the MVC pattern. So once again these are the building blocks of the Noughts and Crosses ...
38 views

### Noughts and Crosses GUI game in Java - Part 1/2: AI

(See also Noughts and Crosses GUI game in Java - Part 2/2: GUI) I was working on a GUI game of Noughts and Crosses, and this is what I finally got: Unfortunately, the entire source code for the ...
864 views

### Will multi-threading or other method make my program run faster?

I didn't use multi-threading so far as I didn't need to. But as far as I've read, implementing them will make my program slightly faster than it actually is. ...
21 views

### Cutting rectangle from circle

Can the following code snippet be optimized or am I doing it right? ...
17 views

### React table with column sorting (asc, desc), input filtering, and row ordering

I created a really modular way of creating a feature-rich table, including filter input text, sortable columns by ascending and descending order, and the ability to order table rows ...
26 views

### Creating a structured category list in F#

This takes a list of categories and organizes them into a tree-type structure based on their parentId. This code works, but is obviously a little over-complicated. ...
36 views

### Multiple choice game

This is a multiple choice game. It has a web page where you enter a question, which can have multiple answers along with multiple options. Can anyone recommend any improvements for my code? ...
31 views

### Correct way to write a unit test [on hold]

I have been thinking about how I write my unit tests and in most cases I go with my instincts; however I wanted to get the feedback from the larger engineering community to see if there is a well ...
12 views

### Parse JS cloudcode stopping after finding no data [on hold]

When it finds no data (as in no link to convert to an image), the code stops until the job is run manually again. It gives the error "Unsuccesfful http request" - an error term I created toward the ...
50 views

### Tic-Tac-Toe - iterative implementation of alpha beta tree search

Does anyone have tips to improve the speed, clarity and accuracy of this non-recursive alpha-beta algorithm? It's my first program written in C. ...
13 views

### How can I make this code write to a file on the drive instead of loading it to memory? [on hold]

I've been thinking about this for a while now but I can't see any way to get this to do what I want it to do. Basically, this part of my code exists within a thread of my application. It accepts TCP ...
12 views

### A Groovier way of inserting and updating database records

I've written a simple little Groovy class handling my database interactions. All it has to do is check if a row exists in a target table with primary key values which match those of an incoming map. ...
21 views

### Redis Object storage and convertion

I am stepping into a new Realm with this project, Reflection. I have written some working code (below) that will potentially store POCO objects in a redis cache (and eventually backed by Table or ...
108 views

### Program to replace tabs with blanks

From my C university book 'The C Programming Language' by Brain W.Kernighan and Dennis M.Ritchie. Excercise 1 - 20. Write a program detab that replaces tabs in the input with the proper number of ...