0
votes
0answers
3 views

Packet Scout (show traffic on specified port)

I've just made a github repository for a simple packet scout in C#. It is my first time using C# (other than Neoaxis 3D engine logic) since I am more familiar with C#. Below is the main bulk of the ...
0
votes
0answers
3 views

Count keys in a file

Below classes are to count keys in a text file. The file has key, value pair like below examples John, 12 Sara, 2 Adam, 19 John, 1 Adam, 3 and the main class ...
2
votes
0answers
9 views

HTML/CSS MS Word style navigation ribbon

I made a MS Word style ribbon header, but it all seems very hacky, and I'm not really sure how to simplify it to something more reasonable. Rolling over one of the navigation icons changes the related ...
2
votes
2answers
29 views

FizzBuzzWoofFooBar - follow-up

I took all your suggestions to heart and I think it improved the code a lot. The Map got it's own typedef: ...
-1
votes
1answer
24 views

Updating a list in Python

I currently have a list and I want to update this list by removing any of the entries that meet a particular criteria. So, for example I have the following: ...
2
votes
2answers
36 views

Finding the nth triangular number

def triangularNumber(n): if(n == 1): return 1 else: return triangularNumbers(n-1)+n works great to find the nth triangular number up to ...
0
votes
1answer
33 views

Smoothing Code Blocks [on hold]

I have the following two blocks of code. I also have other similar sections with similar blocks and want to reduce the complexity of it all. As it is, it is impossible to follow anything. What kind of ...
3
votes
3answers
261 views

Basic OS login program

I have just finished the sololearn C++ course and wanted to create a basic login program in the vein of a basic operating system. ...
0
votes
0answers
22 views

Handling multiple click events

You are first confronted by three links. Each link triggers divs to slide out. The link 'john smith' slides out and in at the speed we want. When it slides out the first line slides out then when ...
1
vote
0answers
21 views

Finite State Machine supporting shortest path transitions

In our automated test framework, written in Java 8, there are different entities representing test data, having different states and transitions between them. To model this behavior, I started to ...
0
votes
0answers
9 views

Updating table with cross join and select [on hold]

I have three tables: ...
2
votes
1answer
31 views

Creating Sudoku generator and validator

I've created two classes that contain only sudoku logic. One class Sudoku generates sudoku grid and returns SudokuGrid object ...
2
votes
2answers
17 views

2D OpenGL Tile Atlas Fragment Shader

I am currently using the following glsl code to retrieve separate textures from a tile atlas: ...
0
votes
0answers
12 views

Cross tab PHP data [on hold]

I have a query that is pulling data from a MySQL database using PHP. As the while loop progresses the variables $student, ...
4
votes
1answer
53 views

Am I missing something by using generics rather than System.Object?

I recently created a custom static class in C# to encode, hopefully, any object it is given (or collection of objects), because I was, at the time, unaware of a native C# library that did the same ...
1
vote
0answers
23 views

Compare two directories, apply the changes, backup and restore

I’ve written a small utility tool capable of backing up a directory, restoring a backed up directory, syncing two directories (copying missing or changed files from ...
1
vote
1answer
14 views

Avoid jQuery in click event

I have the following controller: ...
4
votes
1answer
30 views

Scroll Magic Multiple Scenes

I am using Scroll Magic for the first time and I am in general very new to JavaScript/jQuery. I got it to work but it is very messy and repetitive code. Here is the fiddle. This is the messy code (I ...
0
votes
0answers
29 views

Can we make vector of references and retrieve successfully since C++11? [on hold]

Is it the solution implemented below, a standard viable way of doing things? What are the pro and cons in this approach? ...
2
votes
2answers
55 views

Scraper for words from Wiktionary

I wrote this code in Java using the Jaunt library. The program scrapes all words from Wiktionary from category "English_uncountable_nouns". And after save each world to text file. I am not sure that ...
6
votes
1answer
22 views

Nand2Tetris Code Module

I'm working through the Assembler assignment in the Nand2Tetris course (chapter 6). The suggested implementation contains 4 modules: Main, Parser, Code, SyntaxTree. Today I wanted to get some feedback ...
7
votes
1answer
23 views

Creating a page number array for pagination

I have written a small function to generate an array of page numbers for displaying a pagination. The inputs to the function is an active page number p, and the max page number. The function will ...
-2
votes
0answers
24 views

java for loop optimization [on hold]

I have the following question. Is there difference between 2 variants or java optimizer optimizes the second variant to first 1. ...
0
votes
0answers
13 views

Subclass a Class using Storyboard [on hold]

I have a class HomeViewController. I want a similar class SearchResultViewController. I just want a back button in ...
1
vote
4answers
37 views
2
votes
1answer
64 views

SQL Injection - Validating user supplied input

I was assigned a task to fix the SQL injection flaw reported by a code analysis tool and I am not the original author of the code and I do have fair amount of knowledge on SQL. ...
-3
votes
1answer
22 views

Multiple parent() method in jQuery [on hold]

To append data I am using parent() method five times in the code and I think it seems like an ugly way to do this. ...
0
votes
0answers
16 views

Flow of Angular Promises

I recently put in a submission for a small coding challenge using Angular. The challenge was to get a token and array of values using a GET request then make another GET request passing the token and ...
-1
votes
0answers
24 views

Suffix array construction in O(n (logn) ^2)

I wrote code for suffix array creation based in \$O(n (log n)^2)\$ on the tutorial in CodeChef. My code gets TLE on SPOJ and I'm not sure why it is not performing in \$O(n^2 log n)\$. ...
3
votes
2answers
59 views

CSV import-export in Python

I have finished a really short and small import / export script using Python 2.7, and now I would like to structure it using classes and methods where possible. Could anybody give me some advice on ...
1
vote
1answer
38 views

Sum of primes between two number from optimized Sieve of Eratosthenes

Here is the code that I wrote to give me sum of prime numbers between n and m: ...
-1
votes
0answers
17 views

Restricting mutliple async tasks from being executed in C# [on hold]

I have to restrict multiple async calls from being executed. I want to show a message when second task is trying to execute before the completion of a previous task. Please find my approach here. ...
-1
votes
0answers
29 views

“Split the Phone Numbers” challenge

We want to extract the information from a phone number as such: [Country code]-[Local Area Code]-[Number] There might either be a '-' (ASCII value 45), or a ' ' (space, ASCII value 32) ...
0
votes
0answers
11 views

Stock market investment design [on hold]

I'm dealing with stock market investments; I have an Account() which can have multiple Holdings()s and each ...
0
votes
0answers
11 views

In WinRT how can i align the Text as Center in TextBlock? [on hold]

I have set the VerticalContentAlignment, HorizontalContentAlignment and TextAlignment as Center as per the below code but the text is not aligned center in the TextBox. ...
1
vote
1answer
25 views

Parse strings and respond

I'm doing some exercises from another good website aimed at a similar problem - exercism.io, and my 1st C++ problem was to pass a certain test suite. Here is the README for relevant information: ...
1
vote
1answer
19 views

`std::vector` 'substring concatenator'

The point of this is to concatenate a vector of std::strings into one string starting at an index of the vector. ...
1
vote
0answers
21 views

Get ids from divs in a drop zone on button click [on hold]

I'm trying to find a way to get the ids from dragged divs after they are in the drop zone. All the drag components have an id ...
3
votes
1answer
18 views

Adding/removing background GIF images on scroll

This code adds and takes away background GIF images on scroll. I will be using this for 12 images on the same page but the code looks like it will get incredibly repetitive. My main concern is to get ...
2
votes
2answers
32 views

Fast tag replacements

This uses the Stack Exchange API to quickly batch replace tags in questions. I still need to fully comment and make the Wiki, but are there any glaring mistakes in it? I have tried to use ...
2
votes
1answer
28 views

Running alarms in python

My code is designed to simply trigger alarms; it is not supposed to be used by anyone but me. ...
8
votes
4answers
518 views

Checking if a point is on screen

I'm working on a tile-based game, and am looking to improve the efficiency of my code to slightly improve framerate. I call this method on every tile, every frame, so it is very performance critical. ...
8
votes
0answers
60 views

Isometric City Building Game

I have recently been working on my first game with an isometric perspective. For those who don't know, an isometric perspective is a pseudo 3D view created from 2D tiles. I am working off of this ...
-3
votes
0answers
7 views

Capture check_output value [on hold]

I am trying to capture the return value of check_output instead of having it automatically print to the command line. Unfortunately, my solution is not working and I'm not sure why. I've included my ...
1
vote
1answer
24 views

Javascript singleton to notify different objects of changes in viewport size

I'm working on a singleton object to manage size changes in the viewport, I wanted it to be a singleton because there may be different unrelated objects that need to be notified when a change in ...
3
votes
1answer
29 views

Concatenating CSV filenames into a single file

I've created a PHP script which take an array of filenames as a comma-separated parameter and concatenates them, serving them as one, single JavaScript file. I've also built a caching mechanism into ...
2
votes
0answers
11 views

Structured use of Android SQLite transactions

I got tired of following Android-SQLite's transaction idiom, briefly documented here. It requires too much boilerplate code, IMHO, especially when you add the obligatory null checks. So I came up ...
-5
votes
0answers
56 views

Optimization of matrix and loops [on hold]

This function works and am only looking for ideas on how to make it faster. Basically this function is a multidimensional search. These arrays can be huge but the resulting Matrix is usually sparse. ...
2
votes
1answer
27 views

User generated filter and content

I am writing a (multi) filter that is created when the user enters in the data through wordpress. There can be anywhere between 2 - 10 filters so I need this to be as dynamic as possible. My first ...

15 30 50 per page