2
votes
0answers
8 views

Coin Estimator by Weight

i've created a mini project where the user will enter the total weight of the coins and the program will compute how many coins they have and how many wrappers they'll need. I initially found this ...
0
votes
1answer
14 views

Beginner Python programmer, need help in making code shorter

Using third party library named "nsetools" for fetching stock data ...
-2
votes
0answers
8 views

how i can Using functions from both the “drawingLibrary.js” and the “dateLibrary.js” and some methods of the Date object type [on hold]

to Draw a colored line. b. Create a Date object representing your date of birth and display it in the short form. (e.g. 12/10/1980) c. Display the month name of your birthday date. d. Draw a colored ...
-1
votes
0answers
8 views

records were on a new line and not separated by commas [on hold]

help to do so would when downloading images in the database there is a new field is now just poyavlyaestsya separated by commas, but as I have only after reloading the page problem here as I ...
-1
votes
0answers
7 views

Trying to use IBAction to make a button change a lable [on hold]

Everytime I try adding this to my code I get an error that states only Instance Methods can be declared @IBAction ...
3
votes
1answer
16 views

Effective STL Item 24: add_or_update for std::map with perfect forwarding and emplace

In Scott's Effective STL Item 24, his template function of "efficientAddorUpdate" does not take advantage of rvalue references. I've tried implementing a modern equivalent with perfect forwarding ...
4
votes
0answers
17 views

Probabilistic Matrix Inspection - Suggested by a paper, implemented by me

I have read this paper and I actually found it interesting. This is an attempt to implement the proposed algorithm. I would like to know: Is my algorithm correct by what is discribed in the paper? ...
1
vote
0answers
14 views

C# GDI+ rendering method performance

I am looking for any performance insights or better coding style for my rendering method. ...
4
votes
2answers
26 views

Increment all values in a Map by 1

What's the neatest way to increment all values in a HashMap by 1? The map is <String, Integer>, but the key doesn't matter ...
0
votes
1answer
10 views

async.waterfall call

Does anyone have any recommendations for how I could make this async.waterfall call neater? Ideally I'd be able to do something like: ...
3
votes
1answer
15 views

Show the results of linked list operations in sequence

I'm working on a basic linked list programs. In this program I can insert elements at the beginning, at the middle (after one specific element) of the list and at the end. I also can delete a specific ...
-2
votes
0answers
14 views

Scala - multiple nested ifs [on hold]

recently I had to program such logic: ...
3
votes
1answer
20 views

Google Foobar Level 3 - Lucky Triples (Find the Access Codes)

I have been working on this problem for 3 days now. I wrote a piece of java code that works perfectly on my machine testing in Eclipse, but when I put it in Foobar, it either returns "Error(400) Bad ...
3
votes
1answer
20 views

Connect Four (the OO approach)

I saw some approach to the connect four game at the site. They all where not that much OO like. Therefore I'd like to present my implementation and request suggestions on how to make this code more ...
0
votes
0answers
16 views

Find path from source to destination in tilt maze (part 2)

For a tilt maze general reference, you can refer to for example, this one. Previous related code review discussion could be referred by this, and my major ideas how to define tilt maze data structure ...
4
votes
0answers
20 views

Rainfall challenge solution using Union-find

I have tried to implement a solution to the Rainfall challenge based on the suggestions from 200_success♦ (Rainfall challenge). Problem Statement A group of farmers has some elevation data, ...
3
votes
0answers
29 views

Multi-threaded webserver

Edit: I've been told my queue is not thread safe. Could I get some pointers on what I could do to fix it? Or an example of a thread safe queue? Can I get some help optimizing this webserver? Simple ...
0
votes
1answer
23 views

Get reputation Badge from given score

I have written code that gets the reputation badge from given score like this: I use an if-else statement here: ...
-4
votes
0answers
17 views

Raw_Input help in python. Not defined? [on hold]

I'm making a character customization feature to my unmade "game" and I'm running into some error when I run this: ...
3
votes
0answers
10 views

ActivityLifecycleHelper implementation advice

Description The ActivityLifecycleHelper uses wrap(Context)to create the class & save a global ...
2
votes
0answers
15 views

Splitting an array into stride by 2

i've written a basic function to split an array into stride by 2: ...
2
votes
0answers
16 views

Distributed web crawler

I am building a distributed web crawler using akka streams. I have built a flow that works, however, I don't know what is truly ran in parallel. ...
4
votes
2answers
18 views

Using an API to obtain JSON data and get the date string and determine if data is stale

This is a nagios check that will use an API URL, get JSON data, flatten the data into a usable perl hash, and ultimately obtain a date string. Once the date is obtained, it should recognize the ...
3
votes
1answer
24 views

CLRS Implementation of BFS and DFS in C++

I tried to implement BFS and DFS from Introduction to Algorithms by Cormen. Any suggestions on how to improve my code? GraphStructures.h ...
3
votes
0answers
8 views

Clean up duplicate string references and centralize properties/error handling

I don't like the idea of sprinkling process.env all over the place and wanted to abstract it out a bit. I'm new to Node and know there must be a better way to do a few things. Not repeat the name 4 ...
2
votes
1answer
18 views

Register page for website

I've been working on a simple forum website as a toy project, to start learning PHP and SQL. I've implemented all of the functionality I want, but I thought I'd run the code by the Code Review ...
-5
votes
0answers
19 views

Do while loop issue [on hold]

For reference, here is my project statement: You're working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, ...
2
votes
1answer
20 views

Fitting multiple images in a given width

I was looking for a function which would take the overall width, max height, min height parameters as the input and fit multiple images in the given overall width adjusting their width. For an ...
4
votes
2answers
35 views

Python REST API clients

I am working on a project right now, where we need to search different APIs, then clean & persists data to database and finally pushing to Elasticsearch. The high level code looks like this: <...
-1
votes
2answers
32 views

Which CountHolder implementaion is thread safe?

Is it sufficient to only synchronize the incrementCount? Is it possible for all other threads to get the updated value all the time? ...
4
votes
1answer
37 views

Pool allocator in C

This is an allocator that is used in replace of malloc if you do a lot of rapid, but small allocations on the heap. I wrote this for reducing system calls to improve performance. It works, but I've ...
8
votes
2answers
547 views

Making a deck of cards in Python

I want to have a deck of cards that looks like this: ['H1', 'H2', 'H3', 'H4', 'H5', 'H6'...] For that I wrote the following code: ...
5
votes
1answer
47 views

Connect Four Game (Java)

I wrote this program as an assignment for an introductory programming course in Java, which I then decided to improve past the minimum assignment requirements. It allows two human players to play ...
-1
votes
0answers
16 views

Compile time error on 'Day 10: Binary Numbers' at HackerRank [on hold]

I tried to solve the Day 10: Binary Numbers on HackerRank with my poor algorithmic skills. This solution works on my PC: ...
4
votes
3answers
99 views
5
votes
2answers
42 views

Quarto game in Python revisited

A while ago, I posted about advice for refactoring a game of Quarto I had coded before. I got some good advice, and did some revisions in lieu of this. ...
4
votes
1answer
31 views

Email redirection script in python

I am new to python and wrote a email redirect script. It extracts mails from a server and than resend them. I would like to get some feedback: ...
-4
votes
0answers
21 views
2
votes
0answers
21 views

Splines on Unity3D

I've written this small code chunk to implement a very basic spline system for object motions. As I've only used C# on Unity3D so far I would appreciate feedbacks on this, especially on access levels, ...
2
votes
1answer
38 views

Partition Equal Subset Sum Challenge LeetCode

I solved this problem in LeetCode. Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both ...
0
votes
1answer
22 views

nodeJS, fs, path - creating new directorties

I wrote this function that takes 2 arguments - the path to an existing file - file, and the newRoot name. The function splits ...
2
votes
2answers
270 views

Optional arguments in a function [on hold]

I'm writing a python script to find restrictionplaces. I was wondering if there is a better way to write the following: ...
0
votes
0answers
4 views

WBQuiz - A 4 player quiz made with Node.js, Vue and WebSockets

I've made a quiz in Node.js at the backend, Vue at the frontend and WebSockets for communication. The quiz is made for 4 players. There's also a screen that shows the questions at ...
4
votes
0answers
32 views

2048 game implementation in Clojure

This is my first Clojure program. If you want to run it locally please check out https://github.com/achikin/game2048-clj core.clj ...
1
vote
0answers
29 views

Player statistics class architecture

I've made a stats hierarchy for my Unity game project, it consists of 1 base class and few derived ones. abstract class Stats : MonoBehaviour ...
0
votes
0answers
8 views

Game where two players take turns picking numbers until a target sum (part 3)

Here is a continued discussion (Game where two players take turns picking numbers until a target sum (part 2)), since it is new code and new topic for discussion, I start a new thread. Working on the ...
-5
votes
0answers
15 views

I need help refactoring some Rails code that looks clunky [on hold]

Write an application that prompts a professor to enter grades for five different courses each for 10 students. Prompt the professor to enter data for one student at a time, including student ID and ...
-1
votes
0answers
15 views

I want to display element of the array that user chose [java] [on hold]

I am having problem with my codes ;ㅁ; What I want to do is, first, I want to repeat the process of exploremenu>movestepsize>pick for five times so i can pick up to ingredients Also, I want to show ...
3
votes
0answers
29 views

Pitch detection library, basic architecture

I'm a mechanical engineer/amateur programmer trying to learn modern C++. I'm working on a personal project where I'm building a library that uses PortAudio to abstract some basic audio processing, ...
2
votes
2answers
67 views

Get height for tallest possible stack of boxes

This code is meant to compute the height for the tallest stack of boxes out of a given collection of boxes. A box has width, height, and depth dimensions. The height of a stack of boxes is the sum of ...

15 30 50 per page