4
votes
1answer
11 views

Tiny JavaScript live filter

I'm looking for feedback on this live-filter I wrote in JavaScript. You can test it using the included snippet. ...
-2
votes
0answers
20 views

Geometric or Arithmetic sequence checker

Check if geometric, arithmetic, or neither sequence. Find "nth" term. How can I make this cleaner? ...
0
votes
0answers
16 views

C++ Polling Application [on hold]

I am working on a project for class and I'm kind of stuck on one part. Its a polling program that right now runs fine, it asks 5 total questions where they rate importance. It allows for 10 users to ...
6
votes
2answers
31 views

Copy data to another worksheet

I have the following but it takes long time to run, it is a simple wherein the user select a file and data from Sheet1 is copied to another workbook. ...
6
votes
1answer
103 views

Foundation for 2D dungeon crawler game

A game I've created to implement everything I've learned and to further build upon. I just recently learned classes so I'm probably using them wrongly. Every bit of criticism is appreciated, I don't ...
-1
votes
0answers
11 views

Local variable vs. object attribute access when firing callbacks for added and removed entities

I just realized that I have a habit of optimizing attribute access. Here's a code example: ...
4
votes
0answers
17 views

Quad Tree and Collision Detection Implementation

I have an implementation of a quad tree and abstract collision detection classes. The code works but looks very ugly, but I don't know what I could change to make it better. The reason I used two ...
2
votes
1answer
39 views

QuickSort in Java

I've written my first implementation of quick sort in Java 8. Please let me know of any improvements that I can make (e.g. whether I'm creating any Lists ...
2
votes
2answers
29 views

Census data from file input (text)

The program takes census data from a text file in the format age, gender, marital status, district. It then gives a list of residents by district (there are 22) and by 5 age groups. Any suggestions ...
2
votes
1answer
16 views

An implementation of a double linked list

Here is my implementation of double linked list. Is it possible to reduce the code and improve it? Some methods here: head (returns head of the list) tail (returns tail of the list); append ...
7
votes
3answers
113 views

Picking random lines out of text files

So I was doing something which creates an airplane with an actual airline code, number, airplane type and so on. The airline code and airplane type are stored in a txt file so I can add more later to ...
1
vote
0answers
12 views

Python CSV command line tool to import CSV into MySQL

I've written my first Python program longer than 15 rows and, of course, it looks terrible. I'd be very glad to receive comments and suggestion about how to implement a similar tool correctly. ...
2
votes
1answer
32 views

Shared access point

In my game, people connect to my server. The server creates a GamePeer per connection. GamePeer creates one ...
3
votes
0answers
34 views

Passing a password to a viewmodel

I've got a project I've been working on that connect to a file server and writes some data to a text file. In order to do this I added a textbox for the user to type their username and a passwordbox ...
5
votes
3answers
141 views

Login and registration functions

I'm currently learning C# as first programming language and I've made a simple program to exercise the basic concepts. It's nothing fancy especially compared to advanced stuff you normally talk about, ...
-1
votes
0answers
20 views

should URLs be meaningful where HTTP methods are explicit [on hold]

there is a discussion in the group I'm working with regarding pattern of URLs for a backend api, although we are using different http methods to do different operations on an object, if the urls also ...
3
votes
2answers
43 views

Implementation of the merge_sort - comparing the timing of an array versus a vector

I'm going through the book Introduction to Algorithms. I made a comparison between merge-sort for an array of integers versus a vector. Could I have structured this program better? Why is the ...
-1
votes
1answer
44 views

multiple If statements that are similar [on hold]

I have the following code: if(a>0){ System.out.println(a);} if(b>0){ System.out.println(b);} if(c>0){ System.out.println(c);} Is there a way to ...
-2
votes
0answers
11 views

code c++ for noise power [on hold]

I want to calculate the noise power after getting received N samples of noise, I should implement this in C++. Here is my code and I think that is not correct ...
2
votes
0answers
28 views

Removing checks that are only necessary on first pass

I've got a function that's executed in a game loop. There are a couple of checks that are really only necessary during the first pass of the game loop. How can I remove these? There is more code like ...
4
votes
0answers
31 views

Encrypting a string using AES/CBC/PKCS5PADDING

The code below takes a String and encrypts it using AES/CBC/PKCS5PADDING as transformation. I am learning as I go and I have a few questions about my code. Is ...
0
votes
0answers
10 views

Replacing text using DrawString [on hold]

I have a sliding puzzle table and after finding the solution I want to animate it and move the empty tile around until I reach the solution. I have no problem with the generation of the solution, but ...
-2
votes
0answers
17 views

Utopian Tree in Golang

Please review my code. Utopian tree ...
4
votes
2answers
60 views

Creating lists of events (pitches, velocities, delta-times, durations) from a MIDI track

I am trying to understand good design patterns in Python and I cannot think of a way to break this huge function into smaller parts without making the code cluttered, overly complex or plain ugly. I ...
0
votes
0answers
23 views

Add user to a database and perform relevant checks

Below is a function that adds a new user to the database using their email and password. I am using Flask and SQLAlchemy. ...
3
votes
2answers
107 views

FreeDNS update script

I tried to write a script which takes a list of URLs, checks if their FreeDNS record points to the current IP, and updates the record if not. Intended use is that the script will be run periodically ...
2
votes
1answer
14 views

Determining cell direction in a 2D grid

I am making a simple function that retrieves a 3x3 cells out of NxM grid and determines the direction of cells base on their previous and next neighbor. It will return either any of the following ...
3
votes
2answers
16 views

Project Euler #1 in Ruby with duration

I have done #1 of Project Euler's in Ruby. Using two different approaches. One uses set, another uses reduce. ...
2
votes
0answers
27 views

Game of life in JavaScript - using Table

I finished coding Conway's Game of Life in JavaScript and HTML table. logic cells in a table will be assigned with unique id's and based on the ...
4
votes
2answers
114 views

Find function for strings in cells

In column A, I have many strings ~ 32000 cells each containing unique string values. I then have columns C to as many as 30/40 columns which all contain approximately 400 rows of text. Check column ...
5
votes
2answers
28 views

Open a comm port and send an ASCII string

This is my first ever project and first GUI. I have finished it (with help from Stack Overflow) and it works but is very slow. Can anyone suggest improvements for speed, best practices or usability.? ...
4
votes
1answer
55 views

Simple todo application

I have been learning HTML/JavaScript and CSS. I have gone through some of the online tutorials, PDFs and books as well. Though, now I am familiar with syntactical stuff, I wasn't sure how I should ...
2
votes
0answers
20 views

Debug logger for Free Pascal / Lazarus

Debug experience can be much improved in the Lazarus development interface. Please, if you use this free development environment and have the same felling, do not consider this affirmation simply as a ...
-3
votes
0answers
12 views

function to delete node with given value from BST [on hold]

I have a struct called TreeNode with an int key, and left right and parent. I am trying to delete a node from a tree with my DeleteNode function and it is not working. I am supposed to replace the ...
5
votes
1answer
153 views

Counting occurrences of substring in string

I need to know how many times a substring occurs in a given string. I figured that I might as well create an extension method: ...
4
votes
3answers
65 views

Pythonic implementation of Conway's Game of Life

I've just finished with my python implementation of Conway's Game of Life. Can I get some opinions on it? ...
10
votes
2answers
83 views

Text-based casino game

I have made this small text-based casino game in C++. How could I improve it? Be as picky as you'd like. ...
-1
votes
0answers
13 views

Decrypting opened textfile with unknown key using ASCII in Caesar cipher [on hold]

I was wondering how in a Caesar cipher one would detect the amount of shifts in a encrypted text file that is read from the program and then display that certain amount. I also read in a ...
1
vote
1answer
31 views

Swapping Elements in a list

Challenge: Swap positions in a list Specifications: Your program should accept as its first argument a path to a filename. The file contains several test cases, one on each line. Each ...
4
votes
1answer
43 views

Flexible generic event system that binds to objects

I have been trying to create an event queue system using SDL. I've been trying to use this for Pong. The game is not even finished yet, but I stopped work to examine how my event system is organized. ...
3
votes
0answers
39 views

Simplifying asynchronous “executeAsync” method along with “onFailure” callback

I have a system in which user id is "sharded" across all the machines which means each machine is responsible for certain user id data. I am working on a library which will take ...
4
votes
1answer
55 views

C++ custom memory allocator

I'm working on a C++ custom memory allocator, that would be kind of a replacement for the C flexible array syntax, you know, the stuff like that: ...
3
votes
0answers
17 views

Print the nodes of binary tree column-wise, using recursion and iteration

I am trying to code for both recursive and iterative approach to a problem. Below is a recursive code to print the nodes of binarytree column wise. Basically I have count of root as 0 and if I move ...
-3
votes
0answers
21 views
2
votes
1answer
31 views

Two error-reporting conventions for a command-parser

I need to implement some function and I would like to report about a fail made inside a function. If function doesn't fail I need to get a some result (for example, ...
4
votes
0answers
32 views

Porting x86 assembly that is used to increment a value

I'm working on a port of some existing inline x86_64 assembly code to AArch64 compatible assembly and would appreciate the feedback. I'll post below the original x86 and my ported AArch64 code. The ...
0
votes
0answers
26 views

Pulling specific random values from a PHP array [on hold]

On the page I'm creating there is graphic representation of pigeon-holes with five compartments for new comments. If there is new unread comment it should show up as graphic in one random compartment. ...
1
vote
1answer
21 views

Memoization of Fibonacci using generic Int => Int helper

I'm trying to understand memoization using Scala. I took the Fibonacci sequence as an example because of the high cost of recursively computing numbers in the sequence without memoization. ...
3
votes
1answer
31 views

Unit testing HTTP requests

I would like to unit test my web requests, so on top of my head I came up with the solution below. Since it seems to be working fine, I'm posting it on this site. Though it doesn't feel very dynamic, ...

15 30 50 per page