0
votes
0answers
5 views

Display tabular data with jQuery Datatable plugin

I have this list of results which I display with the jQuery Datatable plugin. This is the Result class and list of results being returned in the JSON format: ...
1
vote
1answer
11 views

Building categories block based on JSON

I'm not even sure if this is how you're supposed to do it, but this is what I have so far: ...
0
votes
1answer
14 views

Character-to-string converter

I created a program that will convert a 3-character combo into a 3-string combo. I used a lot of if statements to accomplish the conversion. I'm wondering if there ...
1
vote
2answers
21 views

High order functions on Array.prototype

In order to better understand functional programming in Javascript, I thought I'd try to recreate (as well as extend) some of the higher order functions on the Array object. These methods don't intend ...
2
votes
1answer
18 views

Removing duplicates from a linked list without a buffer

I am practicing a problem in "Cracking the Coding Interview". The problem is to remove duplicates in a linked list without the use of a buffer. I interpreted this as not using a list or any large data ...
1
vote
0answers
14 views

Object Oriented Graph Hierarchy with Depth First Search revisited

This question is follow up to Object Oriented Graph Hierarchy with Depth First Search. I tried to fulfill every point which @LokiAstari mentioned. I think I succeeded in everything except Visitor ...
1
vote
2answers
45 views

A function that implements a query

I have some parameterized queries in Access 2010. They are often used in VBA functions having the same parameters. In such cases, I give the query and function the same name. The following is such a ...
1
vote
0answers
28 views

Collating creature descriptors spread across multiple stanzas

I have been using Python for only a few days, so I am trying to learn about some best practices. An explanation of what this code is supposed to do is at the bottom of this post. It is an exercise to ...
5
votes
0answers
16 views

Report Building (Data Retrieval, Validation, Aggregation, Business Logic, Report Building, Visual Presentation)

This: Is a data table we get from our financial platform with lots of useful information. For reference, "--" is also the string they use to denote empty values. This: Is a spreadsheet I built ...
1
vote
1answer
21 views

Updating register_globals code for importing $_GET and $_POST data

I'm updating a bunch of PHP code that relies on register_globals and uses request data globally. In the process of fixing/updating I spend a lot of time writing ...
3
votes
2answers
189 views

Write a method to determine if two strings are anagrams of each other

Is this code a good solution for the question, or is there a better way to do it? ...
4
votes
1answer
34 views

Remove duplicates from string without additional buffer

I completed an exercise from the Cracking the Coding Interview: Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or ...
1
vote
2answers
29 views

Compare two associative arrays by key

I am currently for a program I am writing needing to compare two associative arrays by key and value in PHP and get the common elements as well as the difference between the common elements. I have ...
2
votes
2answers
23 views

Draw a graph using braille characters

I hacked together a way to make a small graph using Braille unicode codepoints by abusing unicodedata: ...
1
vote
0answers
37 views

RFC 2812 message validation regex

In my ongoing quest for an IRC client, I'm working on more stringent validation per RFC 2812. As with everything else I'm doing on this project, I'm trying to implement it all from scratch for the ...
2
votes
0answers
15 views

Generating string primary keys with sequence in SQLAlchemy

I need improvement on solution to the following problem: Generating random string keys in SQA is relatively simple, something like: ...
0
votes
1answer
24 views

Creating controls on a page which differ slightly depending on an external state

I've got a part of my application which deals with tracking the dates a particular item is worked on. It is a single aspnet page, which displays controls to either start or stop tracking, depending on ...
5
votes
4answers
496 views

Beginner - Guessing Game

In the past few days i have started to learn python 3 in my spare time and i am really enjoying it so far. I have attempted many simple programs such as a palindrome checker and reverse a string in ...
-5
votes
0answers
33 views

A forked version of an IRC bot with more functionalities than the original version [on hold]

Am I contributing properly to this IRC bot project? The original project was written 3 years ago with minimal functionalities. I started out trying to add testing to the application, but so far what ...
0
votes
1answer
37 views

Battle Ships - Console Application

I have built a light version of a battle ships program and would love for anyone to critique it. The game does not feature OOP, AI nor multiple boards. I aimed more for functionality than correct ...
8
votes
4answers
603 views

Arabic to Greek numeral converter, 1 - 10

JavaScript is one of the most popular technologies at the moment. It's modern, runs on every browser (more or less) and can do pretty much anything. One of the things JavaScript does quite well is ...
3
votes
0answers
28 views

Perform loop through process on all sheets at once

I have workbook having multiple sheets and having same data on it. Currently I am using macro that .autofilterand copy paste on respective sheets. I am using looping process like:- ...
-2
votes
0answers
28 views

Optimum Tree traversal algorithm Topcoder [on hold]

I'm practicing a 1000 point algorithm problem on the topcoder.com arena. The problem is as follows:      You work for an electric company, and the power goes out in a rather large apartment complex ...
1
vote
1answer
27 views

Iterative depth-first search and topological sort in Java

This is the iterative depth-first search, that does not abuse the stack. Also, I gathered some information from DFS that may be useful; for example, I am able to do topological sort using the result ...
2
votes
2answers
27 views

Split string at index field length or just before that if there is white space

I had to write a function to split a string that goes into a field if it(the string) were too long for the field, as it would disappear and be unreadable. How's the code lookin' ? ...
3
votes
2answers
58 views

Gilbreath's conjecture in Python

I've written some code for testing Gilbreath's conjecture in python (2.x). The conjecture was shown (in the 90s) to be true up to n=1012. My code uses the primesieve module to quickly generate primes ...
0
votes
0answers
12 views
1
vote
0answers
9 views

How to remove if condition from my tableView:cellForRowAtIndexPath method?

I have "fetchData" method which fills my "imagesArray": ...
0
votes
0answers
37 views

Npm-module: socket-event

I've written a small npm module. It is my first module. I'm asking you to review several things: The code. I am rather starter, so any wise critic will be super. Any suggestions or ideas on the ...
-4
votes
0answers
13 views

Stylize select listbox html not listbox asp.net control [on hold]

i wanna change my select listbox html (not asp.net) into shown in following image: How can i change for all browser (Chrome, Firefox, IE): Scrollbar arrows into #B6171C and bar white (#FFFFFF) ...
1
vote
0answers
9 views

Inserting and Populating Chart with Excel VBA

My Code uses a data set which has been modified using another script Calculating Time Difference and then inserts and populates a Chart with that Data. Save a Macro enabled WorkBook as Book1.xlsm ...
0
votes
1answer
42 views

Creating multiple new child forms from a single form

I have a simple application reading IO and plotting chart on UI. There is one instance that I need to plot three graphs at a time, and to make this easier, I made a graph form where I declared all ...
1
vote
0answers
25 views

Picking the top 5 results for each individual

For loops are the devil. I can't see a way to speed this up with apply or other more speedy functions though... ...
-1
votes
0answers
15 views

Creating a BST of minimum height given a sorted array [on hold]

Problem statement is : Given a sorted (increasing order) array with unique integer elements, write an algorithm to create a binary search tree with minimal height. My Implementation : ...
4
votes
1answer
65 views

Gamma function in Rust

The gamma function is one of a couple nice continuous extensions to the traditional factorial function. I used this Python program as a reference, which in turn, uses this Ada program. As the Ada ...
2
votes
0answers
30 views

JavaScript/jQuery math game

I wrote this entire program earlier today, and would like to get it reviewed. It is an arcade style math game, where you are presented with two expressions on the left and right side. You will ...
2
votes
2answers
37 views

Find the range of index of consecutive integers from a sorted array

I would like to know how can improve my solution. ...
1
vote
1answer
45 views

Check if a given path exists in a graph

I'm using BFS to see if a given path exists in a graph: ...
5
votes
2answers
75 views

Pagination algorithm based on scores

I need to divide scoreResult into pages (which is already ordered by score column from highest to lowest), and each page cannot contain too many records (e.g. 12 is ...
3
votes
2answers
32 views

Extracting RAR files in a directory

I just started programming, and something is telling me that this working function looks to big for what it does. Can you give a better version of the code so I can understand how to code faster, ...
3
votes
2answers
43 views

Multiple connection string in Web API 2

I have a Web API 2 using Dapper.net, and it's accessed by various client with their own database. Currently, I'm using custom header called Client-Id to identify ...
5
votes
2answers
54 views

Random jagged int array generator

I've been working on learning about irregular arrays and thought making a generator such as this one would be a good exercise in applying what I have learned. The following class generates an array ...
4
votes
0answers
18 views

Swift menu code

I want to know what do you think about the structure of this code. If you think that there is some structural improvement to be made, tell me! Here is a github link: ...
1
vote
0answers
14 views

UserScript that tracks Views Since Last Visit

I try keep an eye on any questions or answers that I have posted here within the StackExchange network and I like to prioritize my updates and improvements based on ones that get frequent visits. I ...
1
vote
1answer
27 views

JS form verification

I have three checboxes in my form. I have to check which one is checked and start the action. What do you think? Is this the easiest way of doing it? Checkbox 1 = cat Checkbox 2 = dog Checkbox 3 = ...
-1
votes
1answer
16 views

improving parser code

In a toy language I wrote (very LISP-like), the most inelegant part is the parsing. The language is organized as one class per programming construct, each class with its own parsing method. If the ...
2
votes
1answer
61 views

Check if a game of Tic-Tac-Toe has a winner

I've implemented a Tic Tac Toe game with a public method checkWin() to check if the game has a winner. This is my code. ...
3
votes
2answers
89 views

setTimeout and setInterval

Problem statement After 10 sec of execution of a program, start reading the property descriptors of each property of an object and continue reading all remaining properties each, every 3 ...
1
vote
0answers
16 views

Fluent API of a RBAC implementation - follow-up

In the past I posted a question that tried to implement a nice API to support RBAC authorization to resources. And due to the epoch and probably to the bount it was moderatly well received by the ...
6
votes
4answers
178 views

Reordering a list in python so that no neighboring elements are equal

Basically I need to order a list, so that an element is not the same as the element that comes after or before it. For example [1,2,2,3,1,3,3] should come out as [3,1,2,3,1,2,3], [3,2,3,1,2,3,1] or ...

15 30 50 per page