1
vote
0answers
7 views

Java NIO server Selector loop

I have a server that uses Java NIO in non-blocking mode. Right now I'm using a single thread for the selector, and four worker threads to process the bytes after ...
0
votes
0answers
5 views

Writing simple base code for a program that keeps track of my work hours and pay in C

When I compile my code it says that everything checks out but when I run it nothing happens. The program just runs until I kill the terminal. ...
-2
votes
0answers
74 views

Need urgent help on this simple multiplication code [on hold]

I have this code that gets the product of two numbers using the Long Method Multiplication I only have 3 hours to get this done or I'll fail my Subject. The program will ask you to input two numbers ...
2
votes
1answer
12 views

“Space and Time Efficient” way of finding all anagram groups

I have written a program to find all anagram groups in a text file. I used first 26 Prime numbers as a mapper for 26 characters for finding anagram groups (Since character_set of all anagrams of a ...
-2
votes
0answers
3 views

Inserting JSON data to MongoDB after API call [on hold]

How would one insert data from an API call to GoogleBooks? Write a PHP script> Is this something that can be done in the Mongodb GUI? for example call out to ...
1
vote
0answers
5 views

Attempt at solution for Dining Philosopher algorithm

I know there are a lot of different solutions to solve the "Dining Philosophers" problem, but I wanted to get some feedback on a solution that I have so far. My motivation for working on this is to ...
1
vote
0answers
13 views

AES and RSA using javax.crypto

So I am assuming that I did something wrong, and my AES and RSA encryption and decryption classes are insecure. I plan on using them for a larger project, and want to make sure I didn't completely ...
2
votes
1answer
11 views

Python simple battleship game

I'm relatively new to Python, I decided to make a simple battleship game. Is there anything I should do to make it shorter, or in practice, "better"? ...
0
votes
0answers
11 views

UDP Server Design and Performance

What I'm doing I am writing a server to work as my games backend. The server is being written in C# using UDP as the protocol, while the game is in C++. The biggest thing I've been focusing on was ...
4
votes
0answers
16 views

Sorting an array of time-specific tasks of varying importance

RULES: Strict tasks must occur at the time the user selected no matter what. Flex tasks are in a priority order. Even if there is a gap big enough to fit several flex tasks with lower priority, no ...
3
votes
0answers
11 views

SqlDataConnection update method

I'm using Microsoft's SqlDataConnection type provider. However, the only way I've seen to update a row in the database is to use something similar to this where it updates mutable values: ...
8
votes
2answers
82 views

Stack Exchange Chat Caret Pathfinder

In The Nineteenth Byte, we have an excessive amount of carets (carrots, if you will) that direct one's attention to another message. For example: Amidst the confusion, I made a userscript that ...
8
votes
1answer
195 views

RPG Currency System

I just spent the last few days constructing the currency system for my game, and was wondering if you guys had any suggestions on how—if at all—I could improve it. Before I show the code, let me ...
3
votes
1answer
20 views

ECMAScript 6 budget calculator

I never get to use ECMA6 in production/work, so I am hoping you all can help me write better code by reviewing my finished sample: ...
0
votes
0answers
12 views

jQuery to JavaScript [on hold]

Firstly I would like to apologise if this is off topic. I am unsure if it is, as the code written works fine. Just wondering how I might convert this to JavaScript from JQuery? The code below expands ...
0
votes
0answers
18 views

Type erasure and allocators: what's the expected behavior? [on hold]

Consider the following code: ...
3
votes
1answer
30 views

Comparing a string that can hold a numeric value

I am refactoring a part of big old system developed in Java. I came across a situation where we are migrating some data types, and there will be use of both types. For compatibility, as all the old ...
2
votes
1answer
10 views

Webpack loader for Phaser.io asset files

The following is a webpack loader for Phaser asset files. The way this is supposed to work is that it looks at the json string, and finds all of values with "url" keys in the json object, and ...
3
votes
1answer
42 views

Detect and Fix Switching over an Enum Without Handling all Members

VSDiagnostic's latest refactoring and code fix detects when a switch does not contain case statements for each of the ...
1
vote
0answers
10 views

Displaying a list of attributes and differentiate them from attributes already selected

attributes is an array with all attributes selected by the user. attributeList is a Mongo collection declared in [root]/lib and ...
1
vote
0answers
12 views

CasperJS continue equivalent inside for loop with casper.then

CasperJS doesn't allow continue statement inside a casper.then functions. This was my solution but I'm not happy about it. Is ...
3
votes
1answer
35 views

SlidingNumberTile Program Efficiency

I created a Sliding Number Tile Game, and am looking for input on how to make the code better organized & more efficient. ...
3
votes
1answer
34 views

C++ template Partial Specialization Member Function; Am I doing right?

I'm trying to improve my C++ template metaprogramming skills. From my understanding, I can't partially specialize a function(either member function or not). So, I need to define another class that can ...
7
votes
2answers
170 views

Conditionally deleting rows in a worksheet

I have used loops to remove lines that are doing various things, but all are deleting rows where certain criteria is met. Some are deleting less than certain numbers, deleting blanks, removing ...
2
votes
0answers
23 views

Brainf*** Interpreter in JavaScript 3

I have this Brainf*** interpreter (this is the JavaScript part): ...
-5
votes
0answers
18 views

Vending Machine Code Java, how so i do this [on hold]

OKay guys I'm trying to work on a vending machine code and not sure how to approach this. Here's what I have to do: Vending Machine ***: Write a program that mimics the operations of a vending ...
3
votes
1answer
35 views

Arithmetic quiz with class database and score analysis

I have done this quiz project and I have tried as hard as I could when I was writing to make it user friendly to read. Could you help me on improving and making it more user friendly please. ...
1
vote
0answers
11 views

WPF Track child collection validation errors

I have a need to get notified about validation errors that occur in a child collection of my ViewModel. For validation I use the ...
1
vote
1answer
18 views

Global site settings middleware for Slim Framework 3

I have created this middleware code for slim. I just want to know that is this right way to store site settings globally. so, I can use where ever I want. What do you think about my class structure ...
2
votes
1answer
31 views

c# Multi process, multi thread read write on a single file

I've got a job to create a library that would be able to support multi threaded and multi process read and write to a single file. On that single file we would store c# models in an array in json ...
2
votes
4answers
40 views

Dynamic array of integers: another attempt

This is follow up to this one. In the previous some minor errors slipped, so I couldn't update the code. Also took some advice. So final version is below. header: ...
0
votes
0answers
5 views

Export node hierarchy and sets from Maya

The requirement here is to export an asset (a hierarchy defined by a root node) and all objectSets that include nodes in that asset. My assumptions/findings were: ...
-4
votes
0answers
20 views

Tic Tac Toe game. Wanted AI [on hold]

I've created this simple tic tac toe game using the turbo c++ compiler. Please check out the code. I'd like to develop an AI (computer player) for the game but I'm really not getting any ideas for the ...
-4
votes
0answers
10 views

Scala spark add new column rdd containing matching values [duplicate]

I am a beginner in spark Scala . Given rdd1 and rdd2 ...
1
vote
0answers
33 views

Priority message sending

We have created a message queue system using priority messages. The idea behind this code is as follows: We have a list of clients. All clients know if (and what kind of priority) messages they have ...
3
votes
2answers
73 views

Tail recursive FizzBuzz in Common Lisp

I solved FizzBuzz using tail recursion. Is it efficient enough? ...
-2
votes
0answers
10 views

My code returns a value for the last iteration date, and not for the entire iteration [on hold]

My function reads a CSV file consisting of dates with times and sentiments(positive, negative and neutral). It returns three dictionaries (positive_dict, ...
-2
votes
0answers
14 views

Confusion in SQL Stored Procedure [on hold]

I have following block of code in my SQL Stored Procedure. An issue that occurred is, the stored procedure was working fine, but few days back we realized that for a particular one record only the ...
0
votes
0answers
18 views

Remove IE8 compatiblity in HTML

I wrote Angular code and I know it's not optimal (I'm a new developer in Angular). The problem is that I just followed some web tutorial some I don't understand all what I wrote in my code. By the ...
-4
votes
0answers
23 views

Processing data spark scala function [on hold]

I am a beginner in spark Scala . Given rdd1 and rdd2 ...
4
votes
2answers
47 views

Coloring a string in a terminal

I have this code which makes it easy to color a string in terminal but it is looking really repetitive. Is there a more idiomatic way of writing this? Also is there a functional way of doing this more ...
2
votes
1answer
31 views

Improving performance for Depth-first search algorithm

I am using the following Depth-first search algorithm to compute value of a property called rotation_absolute based on previous values of ...
1
vote
2answers
40 views

Dynamic array of integers

I implemented a vector class in C for integers. Any feedback welcome. header: ...
-1
votes
1answer
21 views

Calling the backend REST interfaces to get a timetable of the train

I'm very new to AngularJS and just started in a new project which uses AngularJS for Web UI. I was looking into our code and found out that we have huge functions in controllers. Like, one 100-LOC ...
-1
votes
1answer
26 views

Creating a calculator to multiply area of a rectangle/triangle using four functions [on hold]

I'm taking a JavaScript class and am having a hard time understanding why my functions aren't working (or, well, how to make functions work in general honestly). I need to make a calculator that takes ...
1
vote
0answers
8 views

Kivy language code of my Vehicle Details app

So I've written my first android app in kivy. This app takes a Vehicle License Number as input from the user and submits it to a sites and shows the results from the site. The complete Source Code ...
1
vote
0answers
9 views

Heightmap generation using midpoint displacement

I am writing a program to generate a heightmap following the midpoint displacement algorithm (somewhat similar to diamond-square). I'm at the point where the first step works and I need to convert it ...
1
vote
1answer
22 views

Preforming some async operations with Rx.js

I tried to come up with a good challenge to learn some Rx.js programming and I came up with this chain of operations below. As well as a bit of code that works and does these things. Take github ...
-3
votes
1answer
49 views

Four-function calculator with a text menu

This code works but I don't know if I am doing this correctly. I want to have a do-while loop for the menu and app. How could I ...

15 30 50 per page