2
votes
0answers
4 views

Resource-constrained project scheduling

I'm trying to implement an algorithm for a resource-constrained project scheduling problem. I have several resources, resource constraints and all of this is in ...
1
vote
0answers
5 views

Improving a program which reads digits of a number

I made a program which reads digits of series of numbers and then tells you which would need the largest number of "lines" to be written with a classic digital calculator (example: for 1 you need two ...
3
votes
1answer
12 views

Print “n” number of “hello world”

I had come up with the following code: ...
1
vote
0answers
6 views

Edmonds-Karp algorithm for maximum flow in Java

I have this implementation of Edmonds-Karp algorithm for finding maximum flow in networks. It runs in \$\mathcal{O}(VE^2)\$ time. What do you think? AbstractMaximumFlowFinder.java: ...
-1
votes
0answers
7 views

Accordion/collapsible

The code I wrote to do this effect stays "fixed" on top or on bottom. I did it the manual hard-coded way and wanted some advice on the best way to write something like this. jsFiddle ...
2
votes
0answers
10 views

Dynamic display of number converted to different numeral system

The program is displaying given number (right now it is only signed int) converted to different numeral system (binary,octal and hexadecimal for now). Number can be input in the text box and the ...
1
vote
0answers
6 views

Web form to send an email

I started messing around in ASP.NET recently, so please go easy on me. I only have 2 classes, Register.aspx and Register.aspx.cs. I want the user to fill out the form and hit submit and have the ...
-1
votes
0answers
13 views

Current best practice for Java package, interface, and implementation organization? [on hold]

When I last did a lot of Java programming, I'd do this: All classes in a package would be default (package) visibility. Each package would have a public PackageNamePack factory class, e.g. ...
2
votes
0answers
13 views

Kruskal's algorithm in Java - follow-up

The previous and initial iteration at Kruskal's algorithm in Java Now what I did is remove the fields and let the actual Kruskal-routine create the required data structures in the local scope, ...
2
votes
0answers
14 views

Iterating a list to make API calls

I'm new to JavaScript and was hoping there was a cleaner way to write this. It's a block of code that looks at a group of documents in a collection (called Messages), and makes a call to the GitHub ...
7
votes
2answers
131 views

99 bottles of beer on the wall

I'm super new to this so please be nice. I tried solving Chris Pine's challenge to print the entire lyrics to 99 bottles of beer on the wall. This seems to work, but is there a better/more efficient ...
1
vote
0answers
18 views

Converting Delphi colors between TColor, RGB, CMYK, and HSV

I wrote a record which encapsulates conversion of colors between TColor, RGB values, CMYK ...
0
votes
0answers
13 views

ECS Event/Messaging implementation

I am experimenting with ECS design and I am looking for a solid way to implement messaging between the different systems. Here is a stripped-down version of my current implementation: ...
1
vote
1answer
23 views

Populate ItemList

In my app, I have an ObservableCollection of MenuItems: ...
2
votes
1answer
18 views

Disjoint-set data structure in Python 3

Inspired by this question, I decided to implement a Disjoint-set data structure in Python 3. I mainly followed this description for understanding the algorithm (but did not do the optimizations for ...
2
votes
0answers
11 views

handle drag and drop operations

I've come up with the following code to handle drag and drop operation. It's composed of a constructor function that returns an objects with methods to attach to event handlers. Notes about this ...
6
votes
1answer
33 views

Simple dishwasher C++ code

I have a project in embedded systems and I have to write the code in C, and make it simple. This is my first time, and it's only a simulation of how it should work. ...
3
votes
1answer
49 views

Walk a directory tree recursively

Any suggestions are welcome. ...
2
votes
0answers
37 views

Updating the coordinates of items possessed by a moving person

A Person has coordinates and an Item has coordinates as well, and hence both are derived from ...
2
votes
0answers
16 views

Printing a triangle of stars

I've got a rather long function that will take the size of a triangle print it with stars and give the user the option of whether or not they want stars printed inside the triangle, and the ...
6
votes
3answers
108 views

Workout tracker

Around June of last year, I made my very first GUI 'app.' Wish I knew of this amazing site then, I thought for posterity's sake it would be great to get it reviewed. It's a simple I/O window just to ...
3
votes
2answers
106 views

Basic complex number class

As part of my C++ training, I wanted to create a basic complex number class for basic complex number calculations. The class should have the following: constructor (non explicit, for implicit ...
8
votes
2answers
990 views

How much is 2 + 2?

I'm currently working on a kind of PHP Quiz about mathematical calculations. We show a mathematical equation, and user need to input his answer. Currently, this is what I have written: ...
3
votes
0answers
18 views

Using list of tasks to obtain and cache data

I develop Windows Phone App with Prism framework (MVVM). I use data caching. To get data I use proxy service. Proxy service creates two ...
3
votes
1answer
38 views

Calculator - C++ operator-overloading

I am new to object-oriented concepts. The following is my attempt at creating a basic calculator using class and operator overloading concepts. Please review it for improvements. Also, how do I make ...
2
votes
1answer
15 views

Get list of the executables in the current directory

This is what I've done; ...
3
votes
3answers
114 views

Count chars, words and lines

Any suggestions are welcome. ...
3
votes
2answers
41 views

Counting the proportion of vowels in substrings

I'm looking for an algorithm to make my code faster and better for big strings. Problem link Let the simple prettiness of a string be the count of vowels (I, E, A, O, U, Y) divided by the length of ...
2
votes
0answers
18 views

HTML5/CSS live Validation w/jQuery

I've been working on a live form validation project, initially I intended on finding a way to solely use CSS for said validation but it quickly became apparent I would require some jQuery to get it to ...
1
vote
0answers
17 views

Finding bad Narutos

While looking for Naruto posts (= overlooked accepted answers well worthy of upvotes), I noticed some odd false positives, selfie answers, where the user who asked the question accepted his own answer ...
0
votes
0answers
7 views

Storing JSON NSdictioanry to Core Data [on hold]

I m inserting values in core data but values are not inserting. Core Data Model Name - chats.xcdatamodelId My Entity Name - Chat My Attribute - onlineUsers - Type String My JSON ...
-1
votes
0answers
13 views

C# Console Emulator [on hold]

Hi I have made a C# emulator... and wondered what you think I could improve on it? It is large so I have put it here for you guys to take a look and review it? This is a community released source so ...
2
votes
0answers
38 views

Websocket-based server for Raspberry Pi

I am trying to build a websocket server to run on the Raspberry Pi. The websocket server has to push periodic realtime update to a browser. Here is a sample code that I am planning to use. The example ...
0
votes
0answers
8 views

Laravel Eloquent source code: an application of __call magic method [on hold]

I'm reviewing Laravel source code, and find this one is pretty difficult to understand for me ...
8
votes
3answers
262 views

“Alien” distinguisher

I am practicing some simple Java coding problems in an attempt to learn while doing them. I would like to know if my code is redundant/is there an easier way to accomplish the same thing? Question: ...
4
votes
3answers
91 views

Area Calculator in Java

This is a simple Area Calculator coded in Java. What this does is that it prompts the user to select a shape, and asks for the details needed to calculate the area of that specific shape. Main.java: ...
2
votes
0answers
19 views

Generic GUI background task runner (Java 8+)

Here is the culprit; headers omitted for brevity, and also, see notes afterwards: ...
1
vote
2answers
45 views

Guess My Number Game in Java

Basically, what this program does is that this generates a random number, and asks the user to guess it with multiple chances. So, if the user is close, it says that the user is close, and if the user ...
2
votes
2answers
41 views

Displaying current date and time using JavaScript and HTML time tag

I am creating a simple support ticket system. I thought It would be a nice little feature to show the current date and time. Since I want to show the current time I thought JavaScript would be best ...
0
votes
0answers
10 views

What makes more sense for an implementation of a stage/scene setup? [on hold]

I have the setup for a game using a stage/scene model. Stage will handle a collection of scenes that can be changed from one scene to the other. The scene will handle what is displayed. What's inside ...
3
votes
0answers
35 views

Storing large amount of iterations (of multiple variables) in a single object

I am writing a simulation program in C++ which must be able to iterate over multiple variables over multiple classes (according by user input). The basic design of the device is as following: ...
4
votes
1answer
44 views

Seed to Flower/Mushroom

Here you see my first ever "program"! What it is supposed to do is explained in the comments, because it was already in there when I started making it. I am totally new to C++, I have about 2 weeks of ...
0
votes
0answers
17 views

Javascript constructor function creating object vs regular object [on hold]

Sorry about the maybe misleading title, but I wonder why is this way of creating objects and adding properties and methods: ...
3
votes
1answer
26 views

Finding candidate with the most matching values

I haven't coded all winter, and it seems like everything I learned about efficiency from my data structures class leaked out my head. I was wondering if I can get some help in making my code less ...
3
votes
2answers
58 views

Displaying a random poem from a database

I'm new to web development, and I'm constantly torn between good code and bad code. I was wondering if you could help me improve my following code and see if I'm doing it right in terms of how I use ...
6
votes
1answer
33 views

Basic String class

I wanted to create a basic String class that will hold a CString and have: constructor, destructor, copy constructor ...
1
vote
0answers
10 views

A Powershell Script to Backup Single User PC Data

I wrote a PS script to back up data from single user pcs to their network homedrive. The purpose of this tool is to save some time and ensure process consistency when reimaging/replacing machines. I ...
-1
votes
0answers
20 views

Ping Pong game c++ [on hold]

So I'm coding a simple ping pong game. I've started doing the if statements for the ball collisions and I'm a bit stuck. I want the ball to bounce of the rackets when it comes in contact with them. ...
7
votes
1answer
83 views

Finding answers where happy customers commented “thanks”

To find answers where users expressed their gratitude (by mentioning "thank" in comments), I put together this SEDE query (latest): ...

15 30 50 per page