0
votes
0answers
2 views

Bad and Good Programming practices

I'm a beginner and am self taught and was hoping I could get help from others more educated than me to show me what bad practices I might be forming before I go on further. Any feedback whatsoever ...
1
vote
0answers
6 views

Convert Roman Numeral to Arabic

I've been learning Haskell recently and I decided I needed to work on a (somewhat) realistic problem. What I'm most interested in getting feedback on is how well I've used the tools in Haskell to ...
2
votes
0answers
6 views

Octree creation for Barnes-Hut algorithm

I am trying to implement quadtree for my barnes-hut algorithm implementation. I am not sure that the code I've wrote so far is good implementation - it is dirty, and tend to be slow. Of course I am ...
0
votes
0answers
6 views

Python Generate and Execute Statements

I have a series of statements that needs to evaluated with every iteration Currently I'm able to print the statements but I'm unable to execute them ...
0
votes
0answers
4 views

Delete node in a list with passing by reference in C

Given the following code for deletion of an element in a doubly linked list not circular: ...
0
votes
1answer
8 views

Custom Kit Form Validation

I have an HTML form where I need to do the following when value of Select Box changes to initial "Not Selected" value (where values of the option is 0), I am to highlight the select box, when it's ...
1
vote
0answers
2 views

Swift is there better Solution to Leetcode “Longest Substring Without Repeating Characters”

LeetCode medium 3. Longest Substring Without Repeating Characters Question: Given a string, find the length of the longest substring without repeating characters. Examples: Given ...
1
vote
1answer
11 views

Refining an ASP.Net MVC VeiwModel for a Table to display worked hours

I am writing an ASP.Net MVC app which has a page that will display a standard table which will contain a person's hours for the week. The basic structure of the table would be a 7 column, muti-row ...
1
vote
0answers
15 views

Union Find implementation

I am trying to complete this challenge. The user should enter a sequence of instructions, = to link two numbers, and ? to query ...
2
votes
0answers
8 views

JavaScript idle managing structure

I am just getting into the world of javascript, coming from the world of classical inheritance. The following is a library I wrote to track when a webapp is idling and I wrote it like I write ...
0
votes
0answers
13 views

Generating social security numbers - take two

Original post here I took the advice I got to heart, and rewrote quite a few methods + changed the structure a little. Once again I would really appreciated input on the following: Code style ...
2
votes
1answer
24 views

PHP Custom $_GET checker function performance

I'm trying to follow the DRY programming philosophy and I am tired of running isset() and an if not empty statements for each ...
4
votes
2answers
33 views

Is this the right way to implement a simple hash table in C++?

Does this look like a proper implementation of a hash table in C++? Any errors anyone can find? Thanks in advance (: ...
0
votes
1answer
21 views

Mergesorting a stack in Java

I have this small program for sorting a stack using mergesort. Basically, the aim was to use as little aid from JDK library as possible. See what I have: StackMergesort.java: ...
1
vote
0answers
8 views

Return the best factors of a whole number

I've just finished writing my code to return the prime factors of a number and I feel the GetBestFactors function could be improved. The ...
0
votes
0answers
10 views

Save Custom Product Kit using Web Application

How far do I break down individual tasks within a typical scenario of "Web application reacts to user input"? For example, in the case below, say a scenario is "User submits a form, causing user data ...
0
votes
0answers
12 views

Handler for incoming network packages

I want to let you look through my NetHandler which is basically the component which gets notified when a full packet arrived (not like tcp-packet but my own type of ...
2
votes
1answer
41 views

A simple builder pattern implementation for building immutable objects

This is a Builder Pattern implementation to build Immutable Person objects. Person Class ...
1
vote
1answer
8 views

Excel VBA to create a visual timeline of events using an XY scatter chart

I have details of key decisions made by a business in a worksheet Decision Record, my data is laid out as follows: I have written some code to create a timeline ...
-4
votes
0answers
9 views

How do you create a knockout tournament on python 3 [on hold]

how would i program a knockout soccer tournament with 16 teams in it so that the winner of each round advances to the next round until there is a final winner. ie: 16 vs 1 (16 wins) and 8 vs 9 (8 ...
4
votes
0answers
29 views

Genetic Algorithm in java

I have written some codes in java implementing simplest genetic algorithm. The code finds (or rather tries to) the maximum value possible for a user-defined number of bits. For example, for 16 bit ...
3
votes
0answers
32 views

Intersections of two lists

Given two python lists a and b. These lists may intersect (It is possible that lists intersect more than once). An example: ...
0
votes
0answers
14 views

How do I calculate marks of Online exam in c#? [on hold]

On onclick event of the button , I’ve fetch the controls form the aspx page, and further I’ve used if statement in order to see which radio button is active and have store the corresponding value in ...
1
vote
1answer
33 views

Expanding pixels in an image

Custom class Image takes a 2-D array of 0's and 1's upon initialization. Method transform returns a modified array by modifying 0's adjacent to a 1, such that ...
0
votes
0answers
31 views

Updating many fields based on data from a web service

I have to receive data from a webservice and need to compare the received data with the data in our DB. Its easy like: get a streetname from the WS, if its not null and not equals the Db entry -> ...
3
votes
1answer
41 views

Basic MVC Framework

I want to improve my skills so i startet a very basic MVC framework. Its my first MVC based Framework. Index I rewrited all requests through index.php and the ...
1
vote
1answer
26 views

What is the best way to extract method?

The code snippet is what I want to do. Previously I use a different version of my code. But it is out of joint according to Python coding guidelines because I was assigned my lambda function to a ...
2
votes
1answer
25 views

Maximize points won by flipping coins

So, there is this king-of-the-hill challenge going on at PPCG SE to which I submitted my participation. I won't change it further in terms of behaviour, so I wanted to know what you think of the code. ...
4
votes
0answers
19 views

Variant class that I don't think is missing anything

My goal is to learn a bit more about Generic Programming in C++. So, one of the trickiest things I've heard you can do is creating a Variant class. This took me a while and I needed to read and study ...
-4
votes
0answers
13 views

Read a specific row in csv on python [on hold]

I have a csv file on exel: ["11811818","apple" ,"0.75"] ["11811817","bannana","0.60"] In my python program I need the user to input a barcode [column 1] and the ...
-4
votes
0answers
24 views

This is my working code of a simple game called - “rock,paper,scissor” [on hold]

.I wanted to know is there any way to add classes to show inheritance in this program? If yes,,help me in doing so asap ! ...
1
vote
2answers
26 views

Sorting and slicing array, based on another “weight” array?

I have the following input array: ...
1
vote
0answers
15 views

Passive FTP port assignment synchronization

I've created the following class to manage the assignment of port numbers to passive FTP server sockets. Notice that Semaphore here is to make the thread wait in ...
2
votes
1answer
75 views

How do you name a something as approximately equal?

Let's say I following have code: ...
1
vote
1answer
27 views

Longest Palindromic Substring

I wrote the following code for this problem. The problem is to find the longest palindromic substring. I think it is correct and is working correctly for all the test cases I entered myself. Now, the ...
0
votes
1answer
41 views

C++ lazy constructor

I'm implementing a lazy constructor in C++. The goal is that for a type T, lazy<T>(args...) returns a callable object ...
0
votes
1answer
18 views

disable other defualt row- Entity framework

I have a table that name is Store , In Store Table , just one row can IsDefault=true at ...
0
votes
2answers
71 views

Idiomatic word counting in Rust

My goal is to read from standard input, break up the input into words, case-insensitively, and produce a report to standard output, where each line is a word followed by a space followed by its count. ...
1
vote
1answer
47 views

Java application processing GUI input when “Done” is clicked

Right now, I've got this really ugly loop in my code that waits for a boolean to be true before the method can return. It's triggered when "Done" is clicked. I'm ...
2
votes
1answer
37 views

Middleware for a client

I'm developing a middleware for my client and it's found that there are some delay when executing the process. We are currently investigating what's the exact causes of the issue, from architecture ...
2
votes
2answers
29 views

Automatically keyed map

I have written a class that is designed to be an automatically keyed Map in Java. Here is my implementation: ...
1
vote
0answers
15 views

Implementing a HashTable in Objective-C

I am trying to implement a hash table in Objective-C. I did some testing and the implementation seems to work. I am using an NSMutableArray to store linked lists ...
1
vote
1answer
14 views

Demographics information for EDI report

I am going through some of my companies EDI reports to see if I can make them faster/less expensive. There is a query that takes ~55 seconds to complete, and I am not sure that it should. I do not see ...
4
votes
1answer
40 views

Program to convert binary to hex

I wrote this program to convert binary to hex, it ignores other characters between the binary digits. I would like to receive any recommendations on how to improve it. ...
2
votes
0answers
15 views

Write to terminal and buffer

...
4
votes
0answers
48 views

Pseudo-parallel depth-first search

I'm writing a small program, that generates a file containing an adjancency matrix, it then reads from that file, constructs a graph and does something like a parallel dfs on it. How can I make the ...
3
votes
0answers
12 views

Event-driven UDP listener wrapper

I wrote this wrapper around the UdpClient,using events for new datagrams: ...
1
vote
2answers
40 views

Compare function for lists

I need to sort a list of lists. The following is a compare function: ...

15 30 50 per page