0
votes
0answers
5 views
Android SharedPreferencesManager class
I need someone review my sharedPreference class , which better to create sharedpreference with constant name MyPREFERENCES like this , or like they I do in class
...
-1
votes
0answers
6 views
C# Lua parser - what can be done better?
Here's a project I do in my free time: a MIT licensed Lua parser written in C#, full with unit tests and stuff.
Compiles under Windows (VS2015) and UNIX (Mono).
https://github.com/DarkWanderer/DW.Lua
...
0
votes
0answers
6 views
GitHub Auto Copy Committer via API [on hold]
I did write the GitHub Auto Copy Committer.
The purpose is to copy an existing public GitHub repository to in
another repository - commit per commit. It's reason is not a full copy
of a ...
-1
votes
0answers
6 views
how to support compatible version and avoid couple [on hold]
i have one project,and i want support older version and newer version,i hesitate whether i should add new interface and keep the old interface or add code in old
interface or use two separate project?
...
-1
votes
0answers
6 views
delete all elements in a singly linked list [on hold]
I am trying to free all of the memory in my SLL, but I can't seem to figure out what I am doing wrong...I keep getting memory leaks when ran with valgrind and seg faults...Here is my code:
...
5
votes
0answers
15 views
Unity3D native iOS plug-in to read pedometer data
I've made a plug-in for Unity3d for iOS. The plug-in's job is to get the Pedometer data from history within a specified period of time and return that to Unity for later use. I am confident in my C# ...
2
votes
1answer
13 views
Find unique variants of a product
I am writing a piece of code that returns all the unique variants that a product is available in for an ecommerce app. For example, a shirt product can be available in different colors, sizes, and ...
3
votes
0answers
17 views
Image duplicate finder
I have a bunch of exact-duplicate pictures that I've acquired over the years. I'd like to create a list of all them so I can eventually delete some. My idea was simple: dump the hash and location of ...
1
vote
0answers
9 views
Visualize the runtimes of list algorithms
I wrote a small script to visualize the runtimes of list algorithms.
The script works by creating a list of lists with sampled lengths from 1 to max_size. Next, I ...
2
votes
0answers
13 views
Auto-complete using Tries in Python with OOP
I am working on a problem to develop auto-complete functionality to practice different applications of Tries. The auto-complete function will return all the possible words in the wordlist given a ...
2
votes
1answer
11 views
My own twist on the classic “Guessing Game” script in Python
This is a (letter, or whatever the user decides to change it to) guessing game I wrote which implements both a mechanic to randomly change the order of elements in a list, as well as limit the number ...
-2
votes
0answers
8 views
Linked list cycle Floyd method [on hold]
This is part of a Linked List class that I'm doing for practice. Clearly we can see that the first while loop succeeds. But the second ...
1
vote
0answers
8 views
Node.js/Socket.io chat application
I would like to know how can I improve this chat application of mine. This has been my side-project for a while.
I have made it to support on desktops, tablets and smartphones.
GitHub link
Online ...
0
votes
0answers
6 views
PyQt5 validator for decimal numbers (V2)
This class is similar to QDoubleValidator, but it improves slightly on the editing comfort.
Are there any corner- or special cases of inputs I didn't consider, which would lead to bad behaviour?
Is ...
4
votes
3answers
74 views
Camp challenges in one program
My counselor in a camp I went to over the summer gave me a code challenge. To take 6 challenges (listed below) and have all of them in one program, and have the user choose which one to use. Please ...
2
votes
1answer
12 views
PyQt5 validator for decimal numbers
This class is similar to QDoubleValidator, but it improves slightly on the editing comfort. The comments mention "comma" but it's actually the decimal point of your locale (comma for me).
...
0
votes
0answers
10 views
-3
votes
0answers
9 views
Can I turn this php document into an html document? [on hold]
I have some php code I need to format as HTML, as the web server I'm using only supports HTML. (Switching to a different server isn't an option.) Here are the files (I also have CSS if it's ...
2
votes
1answer
18 views
Calculate conditional probabilities and perform naive bayes classification on a given data set
I wrote a class that I'm using to calculate conditional probabilities of a given distribution as well as perform naive bayes classification. I'd like to get a code review done to tell me if there is ...
-4
votes
0answers
18 views
Writting own malloc function [on hold]
Trying to write my own C malloc function, here is what I already wrote, please provide some help if you can. What am I doing wrong??
...
1
vote
0answers
5 views
Simple plotting abstract base class and example subclass
I came across a CocoaControl ZFPlot and wanted to extend here. I ended up writing a base class (ZFPlot shown below) as well as several extensions (ZFLine, ZFScatter, ZFBar, none shown here for ...
0
votes
0answers
7 views
Setting value of variable from multiple jQuery .val() with multiple selectors [on hold]
I have an application that consists of a bunch of survey questions. I am trying to save the index number of said and boxes to show them in a specific order.
With that being said, does the statement ...
3
votes
2answers
23 views
Extracting an XML config file from ZIP file and parsing it
I am currently working with an app that should load various info on a very specific zip file which contains the XML config file, using the DotNetZip library (https://github.com/haf/DotNetZip.Semverd) ...
2
votes
0answers
10 views
Haskell s-expression parser and quasiquoter
There are a number of questions on this site about s-expression parsing: e.g., Calculator parsing S-expressions and Code from "Write Yourself a Scheme in 48 Hours" tutorial.
However, these ...
3
votes
0answers
17 views
Binary trees in Rust: more iterators! (non-consuming variant)
This is a follow-up to Binary trees in Rust: iterators, where Shepmaster suggested that I implement a non-consuming iterator.
This was relatively straightforward.
I chose to mirror the design of the ...
-2
votes
0answers
29 views
how can i make my move method more efficient? (java) [on hold]
so im supposed to change my move method to make it more efficient
...
2
votes
0answers
7 views
Asynchronous request cloning using lua + openresty
I'm working on a project to clone a subset of requests going to our production servers to one or more non-production endpoints. I opted to do this in Nginx and Lua because at the time, I could not ...
0
votes
1answer
33 views
Uploading photos: Domain Model and Repository classes
In the database, I have a table with name photographs with the following columns:
id
...
4
votes
2answers
145 views
Package for testing network connection
I wrote this package for monitoring the state of a network connection in the terminal because my net connection would go down for a few minutes at a time and come back up. I think it could be used in ...
4
votes
1answer
54 views
Checking for valid date range in Rails
I am getting a date range from form inputs - the "from" month, day, and year, and the "to" month, day, and year, and then running a report on data for within that date range. I want to first check ...
-3
votes
0answers
19 views
Project Euler #10 code gives wrong result in Java [on hold]
I recently started to get back into Java and a friend told me to practice with Project Euler.
Now I am stuck at Problem #10 and can't figure out why... Maybe you have any idea what I've done wrong.
...
1
vote
0answers
15 views
Recode algorithm for merged cells on HTML table
Is there any way to improve this algorithm maybe making it so faster avoid using foreach? Maybe with a recursion?
The output of my algorithm is a table with 3 merged columns, each row will have its ...
-4
votes
0answers
14 views
How to send Files (pdf,doc,pictures,audios…) Client/Server Files in C [on hold]
how are you ?
it would be really appreciated if somebody posted the code in C
i want a code that can give you the permission to upload/download files (pdf,doc,pictures,audios...) from/to a ...
2
votes
0answers
16 views
Classes, one responsibility principle and magic methods
I am currently building a small application that allows users to create a slideshow, each slideshow consisting of slides that are either videos or images. Although this will be relatively small at ...
4
votes
0answers
18 views
Knight's Travails in ruby
The task was to build a knight_moves method which when called would display the simplest path from one given square to the other given square.
My Solution:
...
2
votes
0answers
13 views
Usertool For Website Admins — Follow up
Awhile ago I posted about creating a user tool for forum admins that allows them to add, edit, and delete users from their desktops. This still is not complete, posting for review on tool so far
I've ...
-3
votes
0answers
12 views
What is the most generic way to provide a variable amount of outputs from a Rust function? [on hold]
I am currently writing an API for machine learning algorithms in Rust and I would like for a single genetic algorithm, artificial neural network, or Bayesian network to provide multiple outputs so ...
3
votes
1answer
23 views
Controllers for interacting with a vacation service
I have a controller called VacationController; in this controller, I retrieve a list of vacations which will be displayed in a grid.
In the grid, I have the option to create a new vacation through a ...
3
votes
1answer
118 views
0
votes
0answers
21 views
Handling error in Java 8 Stream and determine behavior later [on hold]
I have the following code which has a not-so-nice way of tracking whether an exception occurred during some stream processing.
...
1
vote
2answers
20 views
Finding the object and the URL associated with a notification
I have a Notification model which inherits from the ActiveRecord class. Each notification is associated with a specific type of action, which is determined by an integer field (...
0
votes
0answers
18 views
Find the Preorder traversal from Inorder and Postorder traversals of a binary tree [on hold]
I was solving a problem where I was given Inorder and Preorder traversal and had to find the Postorder traversal of a binary tree with the code below.
...
3
votes
2answers
178 views
Using EqualityComparer to find contained value
While searching for a method in HashSet which allows me to actually find an object in \$O(1)\$ (not just Contains, I need the ...
3
votes
1answer
45 views
k-d tree implementation in C++11
I've written a k-d tree implementation in C++11 in order to learn and practice the finer points of the language. I'd appreciate feedback on the code, e.g. is it good C++ code, missing functionality, ...
1
vote
1answer
32 views
Drawing thousands of lines in WebGL or Canvas
I am trying to draw thousands of lines between nodes, and the line positions are constantly changing (i.e. consider a node being dragged while connected to thousands of children by these lines).
...
5
votes
3answers
301 views
Fetching, adding, and viewing games
This is a simple application that will eventually manage certain files for video games. For now, I'm only posting code that handles fetching, adding, and viewing games.
I'm trying to keep things ...
2
votes
3answers
43 views
TSP Brute Force Optimization in Python
I am currently working on a Python 3.4.3 project which includes solving the Traveling Salesman Problem using different algorithms. I have just written a brute force algorithm and I would love some ...
4
votes
2answers
83 views
Machine independent C library for printing the binary representation of data types to stdout
I'm curious as to peoples thoughts on this small library I have made. I noticed there are no functions in the C standard library to accomplish this task.
I have tried to make the code machine ...
1
vote
1answer
42 views
Another PHP login handler
I wrote this class to handle login sessions for a framework I'm writing for educational purposes.
My major areas of concern:
Style
I know my style is a little contrary to most coding conventions. ...
1
vote
0answers
27 views
Algorithm for motion detection using ultrasonic sensor on Arduino
I am using a ultrasonic sensor to detect motion by looking at the variance of the sensor readings, however my algorithm is very prone to give false positives thus errenously rising a motion event.
...