0
votes
0answers
8 views

The following code should Blink an LED as a function of an input frequency [on hold]

I wrote a code to blink an LED using PIC 16F17889. It compiles using MPLAB X but nothing happens on my board. I set the frequency to some value to test it but the LED doesn't blink at all. I dont know ...
-1
votes
1answer
16 views

Prints each number from array and the times it has been repeated in array. Unable to print the last element [on hold]

The below code should print 1 is displayed 3 times ... 311 is displayed 1 time . ...
0
votes
0answers
23 views

Indexed Properties in C#

Someone on IRC asked the question if C# supports indexed properties, the answer of course being no. We then came to two very different implementations of this concept. ...
-1
votes
0answers
10 views

Thread-safe (generic) value wrapper in Swift [on hold]

I needed a way to coordinate access to a value from various threads, so I decided to write a generic class in Swift to do it. Here it is: ...
1
vote
1answer
24 views

Selection handler for color picker

At some point, I have this function which updates a color picker according the the mouse position, according to whether the user clicked a mouse button and according to its previous state: ...
3
votes
0answers
13 views

OVH email manager script using docopt

This is what I coded to realize a command line program to make it easier to manage emails on ovh shared hostings. It's working ok but it seems ugly. I'm a beginner with Python and ...
6
votes
2answers
88 views

Beginning calculator program

I am a beginner in Java and programming at all. I decide to try to write a calculator, as a my first "complete" program. It works for me, however I am curious is it worth anything in reality. I would ...
1
vote
1answer
18 views

Hash read/write/delete functions

Here is my JavaScript function to manipulate the hash: ...
3
votes
2answers
42 views

bash script for constructing RNA pipeline

I have written a bash script that consists of multiple commands and Python scripts. The goal is to make a pipeline for detecting long non coding RNA from a certain input. Ultimately I would like to ...
3
votes
1answer
19 views

Square spiral matrix

I've written a Python script to generate the closest square spiral matrix to a given number. I'm new to code reviews as a practice, and I'm interested in ways to improve. Please suggest improvements ...
6
votes
2answers
135 views

C++ Linked List Implementation

I'm learning C++ and also about data structures, so I am trying to implement some. This is my linked list. I've included two different ways of getting the length of the list, with a ...
5
votes
1answer
38 views

Adding ranks to objects in an array

This works, and I personally find it elegant and kind of "neat," but then I worry it's a bit too tricky. Comments welcome: ...
3
votes
1answer
24 views

Factors sieve optimization

I have written a more powerful version of the sieve of Eratosthenes: this sieve returns the number of factors of all the numbers below the limit. Sadly the running ...
7
votes
1answer
175 views

Let's Break Down the Party

This is a rags-to-riches question, the original is here: Coin dispenser program There are three parts to this, a Denomination ...
1
vote
0answers
9 views

Erlang handling errors in concurrent programs

I have two tasks: Write a function that starts and monitors several worker processes. If any of the worker processes dies abnormally, restart it Here is the code that I built: ...
0
votes
0answers
4 views

Design of actions handlers requiring some order [migrated]

I have a REST application where 'actions' can be executed to perform anything in the system. For example: user.save, user.get, etc... I also have pre and post execution 'handlers'. For example a ...
3
votes
0answers
25 views

Script to upload CV

I have created a script which presents a popup on every 5th pageview. It's pretty ugly, and I was wondering if I could have some feedback. ...
3
votes
0answers
12 views

Laravel controller for a commenting system

Can someone review my Controller? I should follow these guidelines: Code should be written with MVC pattern and to use OOP. The code now works fine, but I need to improve it. Also, should I use ...
4
votes
1answer
33 views

Function returning higher order function

For the below given exercise: Define a function cycle which takes in three functions as arguments: f1, f2, f3. cycle will then return another function. The returned fuction should take in an ...
0
votes
0answers
11 views

Stream file to opencsv with the least amount of I/O possible

I have the following code snippet where I'm picking up a file from an ftp server and then streaming it to opencsv. I have very little experience with streams, so I'd like to have someone review this ...
6
votes
1answer
33 views

“Lost in the Woods” text-based game

This is my first Python text-based game. Let me know if there's something I should improve on or fix in the way that my code is written because I feel that I am being very redundant in my code but I'm ...
1
vote
0answers
17 views

Custom forum paginator for navigating through topics

I've made my own pagination service for my forum that I'm working on. I'm quite happy how it turned out but it feels a bit rough around the edges so I would like to know how I can shorten this code ...
1
vote
0answers
9 views

Is it okay to use Twitter Bootstrap columns without wrapping them in rows?

I have code that dynamically adds blocks of information to my page. I don't know in advance how many blocks there will be. I want to utilize Twitter Bootstrap (3.x) to layout them in three columns ...
0
votes
0answers
22 views

Skidding car animation [on hold]

How I can do a better calc on this lines: ...
0
votes
0answers
7 views

popup pictures in a Front end javascript website [on hold]

I am looking for some help to solve a problem that I am having... I am playing around with a template I found online and I am trying to use another JavaScript script on the template to change the ...
0
votes
0answers
14 views

java.lang.NumberFormatException: For input string: “” [on hold]

This is my code and i am frustrated by the error: ...
-2
votes
0answers
16 views

C# Fouier Series Calculator, q is not calculated, only shows a zero [on hold]

namespace Tutorial_3_3 { public partial class Form1 : Form { public Double x1, x2, t1, t2, k, a, q; public Form1() { InitializeComponent(); } ...
0
votes
0answers
27 views

Type checking at runtime

For the below given exercise question: Many procedures require a certain type of argument. For example, many arithmetic procedures only work if given numeric arguments. If given a non-number, an ...
0
votes
0answers
20 views

Network Send and Reply

I have developed a TCP listener to receive messages from a client machine, take that string and put it in a db, then send back a response with some data relating to that string. First attempt at a tcp ...
1
vote
0answers
24 views

SQL Dependency with Broker

I have written a windows service for one of our local servers. This service works like a gem on my local machine, does what it's supposed to (ACCP to exchange db data), but I'm not overly familiar ...
1
vote
1answer
16 views

NumPy eliminate double loop

How can I vectorize this code snippet and eliminate this double loop? Even with "only" 1001 elements in a this takes almost 30s. ...
0
votes
0answers
10 views

Designing a Solution for generalization and future scope with Inheritance [on hold]

I have below code/classes/interfaces with me: An Interface: public interface Animal{ void fight(A otherAnimal); } 2.Tiger class which is implementing Animal ...
1
vote
1answer
11 views

Implementing a Trie in Python using lists alone

I've been working on implementing a Trie in Python for educational purposes. I tried implementing one using dictionaries and I was successful; find below my attempt at implementing a trie using lists ...
4
votes
2answers
253 views

Amazon web scraper

I am trying to improve my programming and programming design skills (poor at the moment). I created a small Amazon scraper program. It is a working program. I would be very grateful if you could ...
1
vote
1answer
30 views

Interface injection and common functionality between classes

I'm trying to get my head around the OOP principles and coding my own classes. As a means to learn, I have decided to convert a couple of functions I have written in Wordpress to OOP classes. These ...
1
vote
0answers
26 views

Generating a histogram efficiently from the datasets in a Map

I have a map in which I store total bytes as the key and count of users as the value: ...
1
vote
0answers
14 views

Conway's Game of Life in Python3 (follow-up)

I asked for a review of my code, and after making the suggested changes I feel that now the OOP version is clearer in its meaning and overall the code looks cleaner. ...
0
votes
0answers
9 views

Calculate Parking Hours using javascript functions [on hold]

This is the full question Write a complete for charging the parking fee for each customer based on the number of hour parking. Ask user to enter the total hour using prompt() Calculate the ...
0
votes
0answers
12 views

Multiple custom file input fields with jQuery

I've modified this example to better suit my needs in handling multiple custom file uploads on the same page. It also renders the filename or truncates if it is too long for each of the 3 file fields. ...
5
votes
5answers
267 views

Database abstraction in Java

I am working on a project in Java which includes a lot of database related tasks. For instance, I would have to insert, update, retrieve data so many times within the application. To use code ...
2
votes
2answers
56 views

Web-scraper for a larger program

I have a web scraper that I use in a part of a larger program. However, I feel like I semi-repeat my code a lot and take up a lot of room. Is there any way I can condense this code? ...
0
votes
0answers
21 views

ReturnCode code class uses generics to hold an object [on hold]

I have a series of methods that need to make database queries, and at any point, it might need to return a return code (a boolean and message) indicating that the query has failed. However, it ...
11
votes
4answers
525 views

Singly Linked List in Java

I created my own implementation of a Singly Linked List. Is there anything I can improve on, in terms of effciency. Also, what other methods would you recommend for me to try and implement. My goal is ...
4
votes
1answer
33 views

High udpclient CPU use

I have a bunch of different ports I want to listen on and the iterate over the available data to send to a Dataflow pipeline. In total I'm listening on 14 ports. I'm looking for any advice on how to ...
2
votes
1answer
19 views

Selecting a subset of the data from a list

I have a list called all_dates which contains timestamps for a number of days (hourly). I wanted to select each day (i.e every 24 items in the list) and pass it to ...
0
votes
1answer
41 views

Wrapper classes for objects returned by 3rd party APIs

I am building a WPF application which uses a third party library to fetch objects which I want to allow the user to interact with. The objects are returned as interface types. Am I right in thinking ...
12
votes
4answers
601 views

Coin dispenser program

I've decided to go tech and learn a language. I have been reading Java for a week and here is my first attempt. I am making a habit to write JUnit test cases so that I start on correct path. Here is ...
0
votes
0answers
20 views

Extract and rename specific columns of a CSV data file

I have a CSV data file with 3,896 columns (variables), and I am attempting to extract a particular subset of columns for use in a data analysis project. To avoid the burden of having to constantly ...
2
votes
1answer
47 views

Enums for measurement units, with possible circular dependency

I have some enums that define measurement information, such as volume, mass, distance etc... They are defined as such: ...
2
votes
1answer
20 views

CSV manipulation with Python

I've prepared a script to manipulate csv files in Windows that simply adds quotes as requested. The script creates a backup of the original files and overwrite the wrong originals in its same folder. ...

15 30 50 per page