1
vote
0answers
8 views

Series sum calculator

This is my program currently to calculate sum of following series: $$\frac{x^2}{2!} + \frac{x^4}{4!} + \frac{x^6}{6!} \dots$$ ...
0
votes
0answers
6 views

Boost::pool based STL vector allocator

I wrote an STL Allocator which uses boost::pool to allocate the memory for std::vector container. This is my first time I implement Allocator and while working on this class I found that STL ...
3
votes
0answers
7 views

Parse OpenFoam files in Python

I'm writing a Python parser for OpenFoam mesh files. When the mesh is big, I face performance issues. Here is the format of the file describing the points: ...
0
votes
0answers
11 views

Working with Exceptions

The task: there is an AccountManager that makes transfers. it receives 2 arrays of the same size. one of them -- accounts, the second one -- sums that need to be transferred to the accounts ...
1
vote
1answer
14 views

Finding the most common character in a string with a hash map

I created a method for finding the most common character in a string (using hash-map) : ...
-2
votes
0answers
15 views

Optimizing performance by altering inner joins or adding indexes [on hold]

Sorry to bother everyone with this, but I have been recently introduced to SQL Server, and I am having major trouble trying to optimize this query. I managed to get it down from 12 min to 8min, but ...
-1
votes
0answers
16 views

Program is Bit slow in calculating sum of array elements to its left and right

I am using C++ to code for the following logic. An Array is given we have to traverse the array such that sum of array elements to its left must be equal to sum of elements to its right. BTW this is ...
5
votes
2answers
281 views

Microsoft logo animation

I made an animation of the Microsoft logo. It's available as a CodePen doodle, also. Would anyone be so kind as to check my style and say if there is anything I could've improved? (I am sure there ...
3
votes
2answers
298 views

Game server packet handler

I am developing an online game and my code is getting pretty hard to work with. I would appreciate any suggestions how to clean it up or make it simpler to work with. Thanks for any suggestions. ...
1
vote
0answers
11 views

Directed graph path enumerator in Java - follow-up

I have refactored the graph path enumerator. DirectedGraphNode was not changed, so refer to the link above in case you want to have a look at it. The node type is ...
1
vote
0answers
9 views

Skip-List that uses a Singly-Linked-List implementation

I've implemented this skip-list yesterday, and I'd like suggestions on how to improve this code, and my coding practices. ...
-3
votes
0answers
5 views

Source Code for creating Backup Application for sms with tutorial [on hold]

I want to create android app to backup & Restore APplication,SMS,contacts,MMS,logs, etc... on SD Card plus cloud drive like gmail.... Please help me with the source code or any reference or guide ...
5
votes
1answer
29 views

Java calculator using postfix conversion and evaluation

I'm trying to create a program that converts infix expression to postfix (using stack) and evaluate the result of the postfix expression. I already have a solution that works, but I feel that it's ...
0
votes
2answers
26 views

Root-finding by iterated bisection

Both of the following code give the same result. But I'm not sure where should I put the raise statement. ...
-2
votes
0answers
16 views

I dont want to reload all the php page after dropbox selection in a div [on hold]

I have a php page to present in a table, some results from DB after you select a name in a dropbox. I have a -- div id="sidebar"-- and a --div id="top_menu" --for the left menu.. After that there is ...
4
votes
2answers
18 views

Balanced expression checker

This program detects whether an expression is balanced or not. I would like to know how I can make this more efficient. ...
1
vote
0answers
9 views

Working with Clojure Maps

In an attempt to learn better functional programing I've attempted to convert some Python to idiomatic Clojure, but I'm not sure how well I did with parts of it. One thing I found myself doing a lot ...
2
votes
1answer
21 views

Terrain height map generator

I wrote a Perl script that implements the algorithm described in this article to generate terrain height maps. The idea is to raise a random hill \$i\$ of size \$r_i\$ centered at point \$(x_i, ...
8
votes
0answers
29 views

C SIMD Matrix Multiplication

I recently started toying with SIMD and came up with the following code for matrix multiplication, I would greatly appreciate if someone with more experience with these things could tell me how far ...
7
votes
1answer
242 views

Integer to Roman Numeral converter

I have implemented an Integer to Roman Numeral converter that converts any number in the range \$[1 \le x \le4999]\$ to its Roman number equivalent. Any comments on improving my code style or ...
3
votes
0answers
30 views

Solution to challenge of making a list

This is the answer to this challenge: Description Thanks for that list you made me, my thoughts are way more organised! I've got a few problems though that I thought you might be able to ...
3
votes
0answers
23 views

Template integer range, version 2

This question is a follow-up. The original question was itself a follow-up to an older question by @LokiAstari. The idea is to provide a compile-time integer range. This version incorporates ...
15
votes
5answers
542 views

Console window to debug Windows Applications

Since I was having some difficulties to debug the next step for Scrolly - A (very) simple infinite mouse "scroll", I've decided to make a console-like class that allows to add messages to it. This ...
1
vote
0answers
17 views

Handling screen rotation with volley request

To handle screen rotation when performing a volley request, I've written this code: ...
-1
votes
0answers
21 views

Queue consumator

I am consuming messages from Kafka (a queue). There are multiple consumer which are reading. What do they do? They simply read message as a String, parse them and ...
4
votes
4answers
62 views

Project Euler 42 - finding triangle number V2

This is my revised solution to Problem 42 from Project Euler, based on suggestions in this original post Project Euler 42 - Finding triangle numbers ...
3
votes
0answers
31 views

Multithreading readied Median Filtering

So I've been confronted with a rather simple problem in the Java chat on Stack Overflow. It's about doing a median filter with a sliding reference window. For the purpose of the task we can assume ...
2
votes
2answers
28 views

Loading more items for an activity feed that uses a global page counter

I have this script which is for a news feed. A button click will grab more data from the server if there is any and then add it to the box. It doesn't allow any more than 10 pages of results currently ...
6
votes
2answers
85 views

Simple Mastermind game in OOP form

I'm currently learning Java. I'm trying to get a good grasp on determining what becomes a class. I've started translating old games in to simple Java programs. I'm looking for any critique of use ...
1
vote
0answers
22 views

Efficient Sets and Maps with Treaps

I wrote up a Treap implementation to serve as the base class for a bunch of augmented data structures (interval sets, plane (2D) sets, order statistic trees), replacing my RB-tree base. Some ...
-5
votes
0answers
15 views

Create a service for authentication: [on hold]

Service communication aplication - Create a service for authentication: The user sends a username and password, and service returns information on whether the user with those data in the database. ...
4
votes
1answer
63 views

HackerEarth Challenge Find Maximum Taste of Fruits

Problem Statement: Samu had got N fruits. Sweetness of ith fruit is given by A[i]. Now she wants to eat all the fruits , in such a way that total taste is maximised. Total Taste is ...
2
votes
0answers
29 views

Select two numbers from interlaced blocks of numbers

Select one of two number selection strategies and select two numbers using that strategy. The strategy is selected using an enum implementation of the strategy pattern. Strategy one: ...
2
votes
2answers
96 views

Wrapping primitives in a simple class

I made this Primitive class recently for my OpenGL engine. It basically wraps all basic primitive shapes, like cones, toruses, and cubes, which the user can use for ...
4
votes
2answers
58 views

Creating and Editing a UtilityMeter

I have some functionality that allows the user to create a Meter, which counts your gas, water, and electricity usage. A Meter ...
4
votes
1answer
49 views

Diary applications with accounts

I didn't write the login code yet. Main ...
2
votes
2answers
55 views

Immutable subclass of a Set class

If I'm creating an immutable class from an existing class, should I override methods that mutate the property or have an instance of it and write my own methods to read from the property? I have an ...
5
votes
2answers
101 views

Merge k Sorted Arrays

Please review my answer for this interview question: Merge k sorted arrays, using min heap. ...
7
votes
2answers
48 views

Return lambda expression based on parameters

This function returns a lambda expression based on the parameters sent. I am sure there is a better way to do this. ...
0
votes
0answers
29 views

Java Interface implementation [on hold]

I am working on an assignment in my Java class that requires me to implement methods in a Product Database Implementation class. I have populated the methods per instruction (I believe) and would like ...
3
votes
0answers
21 views

Recent top tags in Tumblr blog

A friend of mine asked me to write a script for showing the most used tags in her Tumblr blog in the last days. I saw it as a great opportunity for learning JavaScript and accepted it, as it seemed ...
1
vote
0answers
29 views

Lock-free ordered singly linked-list behaves unpredictably [on hold]

I wrote an algorithm for lock-free singly ordered list, that uses only one pointer mark to function - kind of novelty. However it behaves strangely, that is under more pressure > 20 threads it breaks, ...
4
votes
0answers
24 views

Helper for DropDownLists with extension method

Is the following helper idiomatic ASP.NET MVC? All the built-in DropDownListFor helpers only accept ...
12
votes
5answers
875 views

Credit card validation

I started following Harvard's CS50 (Introduction to Computer Science) on edX, and as part of their Hacker edition set 1 was the following assignment: I am supposed to write a program (in C), that ...
1
vote
0answers
34 views

Creating CSV to email [on hold]

While this isn't a problem, I wanted to hear if someone could please check the format string I use when I create an CSV file? It does work, but it looks kind of "weird" and was wondering if this was ...
-2
votes
1answer
72 views

Java code needs reviewing [on hold]

This code technically works, however I endeavour to know the correct way to structure this? If possible could you explain where code could be improved, I am very new to this and aspire to learn as ...
-3
votes
0answers
15 views

Implementing Tree data structure in C# with Generics [on hold]

While searching for generic implementation of tree in C# I found below solution provided by @Aron Gage in question But I am unable to implement it. What would be the way to implement it? ...
9
votes
1answer
94 views

I made an implementation of std::deque, in my own way…?

In fact, entire deque header, though. According to Wikipedia, common implementations of std::deque include: Storing deque contents in a circular buffer, and only resizing when the buffer ...
9
votes
1answer
94 views

A low tech approach to measuring game speed

Whilst developing a game I needed a delay routine capable of doing delays ranging from 0.5 sec to just a few msec. The obvious choice was to use the BIOS delay function 86h on int 15h. In a true real ...
6
votes
2answers
37 views

Shell sort function

I wrote a Python sort function that uses shell sort: ...

15 30 50 per page