0
votes
0answers
8 views

Raise, Handle and Note down the Custom Exceptions

I am creating a custom Exception class and trying to log the CallerFilePath, CallerMemberName & CallerLineNumber in the Error log file along with the error message which is my main Motive Here is ...
0
votes
1answer
7 views

Read binary serial data and parse integers

I'm reading serial data in binary format from a stream and am currently not happy how I extract the data because it takes so much operations to extract the binary data from a simple line of binary ...
1
vote
0answers
12 views

Streamlining function that gets the length of each value

The code works well but before I added sections (13) and (14), it ran in 6 minutes and now runs in 16 minutes. If there is a way to streamline this to cut down the runtime, that would be ...
-1
votes
0answers
8 views

Excel macro to move data across workbooks using an ADO connection

I am writing a macro to move data from a CSV to an excel template. Currently, I have the code set to search for a keyword in column A of the CSV, and extract data from specified columns in the ...
3
votes
0answers
19 views

PHP MYSQLI wrapper classe

Disclaimer 1 - i am very new to PHP / MYSQL and web application development ( started looking at it 2 days ago but i have a ok understanding of java and oop) Disclaimer 2 - i have used a few open ...
-1
votes
0answers
17 views

returning a string found in a continuous sequence of letters [on hold]

The idea behind the return is here. I have a list of combinations of letters and i am trying to run them past a continuous string to see if they're present and then return whichever one it finds, if ...
1
vote
0answers
9 views

Moving DTOs between server/client - How to implement communication and DTO conversion?

I am developing a server for a web-client. Basically it's just a simple CMS to modify some data. My problem is that I never had a project like this where I have to take care about the server and the ...
0
votes
0answers
23 views

Generate the combinations [duplicate]

I must write a program that given the elements in a list , generates all combinations of these elements . For example, if I [A, B , C ] , the possible combinations are [ A] , [B ] , [ C ] , [A, B ] . ...
2
votes
0answers
23 views

Selection from different collection by using GroupBy

Is it possible to simplify this code? Maybe we can use linq? ...
-1
votes
2answers
37 views

Algorithm of combionations (problem with time and space)

my algorithm generates combinations of elements . For example having [A , B , C ] creates the following combinations [ A] , [ B ] , [ C ] , [ AB ] , [ AC ] , [ B , C ] , [ ABC ] . Unfortunately for ...
0
votes
1answer
24 views

Use presets to change a form

I intend to populate some fields in a form based on some presets values. The user choose the presets from a list. The following code is working, but as I'm a newbie, I would like to know if I done it ...
4
votes
3answers
40 views

Generic getting single value from DB in C#

Few months ago I posted my code Getting a single value from the DB. I implemented suggested changes and this is how it looks like right now: ...
-2
votes
0answers
16 views

Access the table cell ,below a given cell in a html table. [on hold]

How can I use jQuery to access the cell (td) , below a given cell in a html table. Here is my table. I want to find out the index of each column in 3rd row belongs to first and second row. ie is I ...
5
votes
1answer
34 views

Boiler Plate Singleton / Lazy Initialiser

I'm working with an existing code base here and while I don't have the time/budget to re-do the entire thing (ultimate solution), I do get a bit of leeway to enhance the code base, as well as ...
-2
votes
0answers
20 views

Unit Of Work and locking construct, EF and ASP.NET webforms [on hold]

I am working on an existing ASP.NET web application that uses the repository pattern and EF. In some cases, I noticed errors when saving because of for e.g. taking max value from database for code ...
7
votes
2answers
446 views

Web crawler that filters out non diseases

It is very messy and I lack the experience to make it eloquent so I wanted some help with it. The process time is also very slow. Currently it goes into the first page and goes through the links in ...
2
votes
2answers
171 views

Project Euler Problem 5

I wrote up a small script to calculate the answer to Project Euler Problem 5: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What ...
0
votes
0answers
28 views

C++ 2D shape intersections - template reduction

I've created a short piece of code to determine whether or not various 2D shapes (circles/lines/rectangles) intersect. It was a job interview question, but now it's just about self-improvement. I'd ...
9
votes
2answers
368 views

Checking all checkboxes

Problems: Wanting to check all checkboxes when the checkbox w/id=checkall is checked. Wanting to uncheck the "checkall" box when any other checkbox is unchecked. Solution: ...
5
votes
0answers
19 views

Type Validation using State Monad

I am attempting to build a compiler for a stack-based (or concatenative) programming language in Haskell. I've done fine getting the lexer and parser up and running, but now that I'm into the meat of ...
11
votes
0answers
48 views

Barnes-Hut N-body simulator

I've written an n-body simulator, implementing the Barnes-Hut algorithm. Please comment on anything you can see wrong with this. Wikipedia Barnes-Hut page This is a screen shot of the simulation ...
2
votes
2answers
51 views

Project Euler #3

I wrote some code to solve this question and I was wondering if it was efficient or not. I just started learning code last week and I would like to get some input so I can get in the habit of writing ...
2
votes
1answer
33 views

Graph, and a search that visits each edge exactly once in each direction

My assignment was to write a method that is capable of visiting each edge in a graph in each direction exactly once. With it, I included a basic Graph class to test it with. What I'd like a review ...
1
vote
0answers
9 views

AngularJS Cookie Manager

Just looking for an initial steer on my AngularJS implementation. Background Started work on a clients new site which uses a popular CMS as the backend and AngularJS has been chosen as the client ...
-3
votes
0answers
27 views

What is wrong with this prime generator? [on hold]

I'm trying to solve SOJ's prime generator problem. Here is the question Peter wants to generate some prime numbers for his cryptosystem. Help him! Your task is to generate all prime numbers ...
6
votes
3answers
191 views

Sum pairs of numbers in array

This code takes a list of ints and sums their pairs, storing the summed pairs in an array sumPairs, then returning that array. If the supplied array ...
7
votes
2answers
150 views

Reusable, generic save method

I am developing a Python script that will process large amounts of data from an experiment. Files are read in, calculations are made, images are plotted and saved as .pngs, and calculated parameters ...
6
votes
5answers
642 views

Most Common Letter in string

Problem: Write a method that takes in a string. Your method should return the most common letter in the array, and a count of how many times it appears. Note: I solved it with Ruby, but the ...
6
votes
2answers
67 views

Splitting string by words to new strings

Function: ...
10
votes
2answers
319 views

Word Morph (changing one letter at a time)

Below is my implementation of Word Morph solver in Python. The challenge consists of transforming one word into another word by changing one letter at a time. Each word in the chain should be an ...
0
votes
0answers
38 views

make this code more quickly and take [on hold]

How to make this code more quickly and take? ...
4
votes
0answers
27 views

Rust language tag implementation

language-tags is my first crate, it is hosted on GitHub and I uploaded it to Crates.io. It parses language tags like en-US into useful parts, like language and ...
4
votes
1answer
32 views

Charting daily balance

I have been trying my hand at Python lately. I have been able to look at code examples and create a custom application that queries a Microsoft SQL Server, pulls out two columns (date, balance) and ...
-4
votes
0answers
20 views

C# I want to move to another switch (previous in this case) [on hold]

I want to get back to the previous switch when I press [1] - Move Back Also in another project I want to move from a switch to another. Is this possible? I'm totally new to this. I tried goto and ...
9
votes
2answers
192 views

Removing duplicates from an unsorted Array

I have written this program to remove the duplicates from an unsorted array. Please review and give me your input on how I can improve it a little more. ...
4
votes
1answer
103 views

HTML Form validation with PHP

I'm kinda new to PHP and I'm trying to make a script to validate a HTML form only with PHP (I know there are options to do so with JS, but I guess it's better to have a "cover" with a server-side ...
4
votes
2answers
179 views

Simple Tic Tac Toe game

I'm just starting to learn Java and I have written this simple Tic Tac Toe game. Please review it and give me some feedback, advice, guidance etc. Main method: ...
5
votes
1answer
68 views

CUDA Kernel - Neural Net

I'm building a spiking neural net (recurrent, integrate & fire), and I'm curious about how to reduce the warp divergence (and other problems) I may have. Here's a example with a few hand-placed ...
1
vote
2answers
82 views

JavaFX Tic-Tac-Toe Game

I programmed a Tic Tac Toe game using JavaFX, and I'm looking for a code review of it to improve my skills and practices in Java. It would highly be appreciated if you reviewers emphasize on these ...
1
vote
2answers
138 views

Sorting an Integer array

The program sorts the array from lowest to highest and outputs the index of the searched value: ...
2
votes
1answer
21 views

Using goroutines to bruteforce a secret code

For a puzzle I had to brute force a password. I've never used goroutines before, and I don't have much experience in concurrency. This is the cksum function, which takes an array of the ASCII code ...
2
votes
0answers
20 views

OAuth2 Client for Reddit, written using Tornado

I have a written some code which helps me to get OAuth Access Code from Reddit. Reddit uses standard OAuth2, so like any other OAuther server, here's are the steps to perform: The client/app sends ...
1
vote
1answer
25 views

Fast Event Manager

I've recently coded an event manager with performance as the main factor. I'd like to know what you think of it and what could be made better. ...
1
vote
2answers
102 views

Lotto/lucky draw

The following script draws 6 numbers at random. I input another 6 numbers and compare with random numbers generated, if they're the same, you win. ...
4
votes
2answers
53 views

Infrastructure for my 2D game using Allegro

I am making a small 2D game with the use of Allegro 5 library. I am making use of inheritance e.g. sprite class as the base class and player class as the child class, but I want to know if it's a good ...
3
votes
5answers
169 views

Making ArrayList.containsAll run faster

Whenever using ArrayList, the method containsAll(collection) runs in time \$\mathcal{O}(mn)\$, where \$n\$ is the size of ...
-1
votes
0answers
17 views

linked list query [on hold]

I used the following code to create a linked list of pointers, each having a length of the English alphabet plus one for the apostrophe. I'm trying to load words from a file, dictionary into a trie ...
1
vote
1answer
56 views

Sudoku verifier program

I implemented a Sudoku validation program. Can this be optimized even further in terms of performance? ...
2
votes
1answer
40 views

Object pooling for a top down shooting game - Revision #1

After the advise from this code review I have come up with the following changes. I'll go in the same order as my previous post. This post is mainly for an updated version so that others can see the ...
3
votes
2answers
41 views

Testing hard drive write/read performance

This is a simple example of script to run the CDM to test the performance consistency of the drive in Windows environment. Please let me know if you find any place can be better improved,(it may be a ...

15 30 50 per page