1
vote
1answer
6 views

Optional statements in a function

I'm writing a python script to find restrictionplaces. I was wondering if there is a better way to write the following: ...
0
votes
0answers
2 views

WBQuiz - A 4-person quiz made with Node.js, Vue and WebSockets

I've made a quiz in Node.js at the backend, Vue at the frontend and WebSockets for communication. The quiz is made for 4 players. There's also a screen that shows the questions at ...
0
votes
0answers
7 views

2048 game implementation in Clojure

This is my first Clojure program. Source code and run instructions are posted here https://github.com/achikin/game2048-clj
1
vote
0answers
13 views

Player statistics class architecture

I've made a stats hierarchy for my Unity game project, it consists of 1 base class and few derived ones. abstract class Stats : MonoBehaviour ...
0
votes
0answers
6 views

Game where two players take turns picking numbers until a target sum (part 3)

Here is a continued discussion (Game where two players take turns picking numbers until a target sum (part 2)), since it is new code and new topic for discussion, I start a new thread. Working on the ...
-3
votes
0answers
10 views

I need help refactoring some Rails code that looks clunky [on hold]

Write an application that prompts a professor to enter grades for five different courses each for 10 students. Prompt the professor to enter data for one student at a time, including student ID and ...
-1
votes
0answers
12 views

I want to display element of the array that user chose [java] [on hold]

I am having problem with my codes ;ㅁ; What I want to do is, first, I want to repeat the process of exploremenu>movestepsize>pick for five times so i can pick up to ingredients Also, I want to show ...
3
votes
0answers
16 views

Pitch detection library, basic architecture

I'm a mechanical engineer/amateur programmer trying to learn modern C++. I'm working on a personal project where I'm building a library that uses PortAudio to abstract some basic audio processing, ...
0
votes
1answer
11 views

Get height for tallest possible stack of boxes

This code is meant to compute the height for the tallest stack of boxes out of a given collection of boxes. A box has width, height, and depth dimensions. The height of a stack of boxes is the sum of ...
1
vote
0answers
22 views

Email thousands of customers from a PHP form using a MySQLi query on a MySQL database

How can a large internet service provider email certain customers to warn them about an impending service interruption? I'm providing what I think is a reasonable solution, but I have not tested it. ...
-1
votes
0answers
5 views

Best way to search column and based upon cell contents, place text in different column of same row [on hold]

I have a spreadsheet that has numerous columns. There is one column that contains over 3,000 four character text, some of which are duplicates. I need to search this column and based upon the cell ...
0
votes
1answer
21 views

Creating a border using ncurses

The biggest question is if it's worth it to use a useless if statement to make the x and y ...
0
votes
0answers
3 views

Express.js MVC controller router

So in the vein of an old dog trying to learn new tricks, I've decided to try to polish up my JavaScript skills. I've used it a lot but I don't claim expertise. I'm looking for any critique on the ...
4
votes
0answers
25 views

Generating RPG Characters (Objects)

I am a beginner Java programmer. I have just finished up an assignment and would appreciate some advice and/or constructive criticism on my program. I am trying to ensure I do not advance my knowledge ...
0
votes
0answers
9 views

Implementation of dynamical forms for JSON ActiveRecord using JavaScript

I have some data in my database I store as JSON (PostgreSQL supports it). The data can be pretty flexible, something like work-experience, with names of previous companies and positions or education ...
1
vote
0answers
13 views

Shakesort Python3

Hello I've done the Shakesort Algorithm win O(N²) but doesnt seem that O(N²) is correct because it takes 6-9 steps in the while loop for a list of 4 integers and 4² is 8. ~1975 steps for 80 entries. I'...
0
votes
0answers
9 views

Swift 3: Thread 1 Sigabrt and EXC_BAD_INSTRUCTION (Please Help) [on hold]

iOS 10 came out and I updated my app and it runs on iOS 10 but there's still one problem. Every time I run the app and move to the Artwork View it crashes and gives me Error Sigabrt. The link should ...
1
vote
0answers
22 views

Generate random URL and download HTML from website

I'm very new to Python and I wrote the following program as my first program. My code works as intended but it's really really slow and sometimes it gets stuck for multiple minutes. I don't really ...
5
votes
0answers
21 views

Bitex - Cryptocurrency Exchange API Framework for Python

BitEx is a python module I've been working on for a little over 9 months now, as a side project. It was published 6 months ago on GitHub, and as I edge closer to my 1.0 release, I wanted to take the ...
4
votes
1answer
29 views

Vigenere cipher in Haskell

I implemented vignere cipher in haskell as a part of exercises for haskell programming from first principles. Though the code isn't all that long, I feel it could use some refactoring to simplify ...
3
votes
0answers
10 views

Filling random values in two sheets from a single sheet via Excel VBA

I fill out random values in two sheets (Testfall-Input_Vorschlag) and (Testfall-Input_Antrag) out of another sheet (ADMIN_ARB11). I have 371 rows in sheet (Testfall-Input_Vorschlag) and I have 488 ...
2
votes
0answers
19 views

EF code-first solution architecture, which exposes freely the data repo to the UI controllers

I have a project template and like to usually work with the following setup (grossly simplified, but that's the gist of it). CompanyName.ProjectName.Business.Entities I define my business objects. I ...
0
votes
0answers
23 views

Extracts features for 5 electrodes

This is part of my code that extracts features (PSD bands) for 5 electrodes. But I have other 14 electrodes from which I want to extract features too. The name of the 5 electrodes used here are C3, C4,...
-1
votes
0answers
14 views
2
votes
2answers
56 views

Computing the name of the month

I created the following program that transforms a numerical month into the corresponding textual month. I initially calculated the starPoint and ...
-1
votes
0answers
13 views

Parametric mergesort in Scala with paramerized arrays and implicit conversion

I have created a second version of the code, posted in this question: Merge sort in one Single Function in Scala But this time using 2 functions, one only for the merge. The one for merge is a local ...
0
votes
0answers
26 views

Ordered array item insertion based on binary method [on hold]

Array is sorted. I'm asking more about algorithm related stuff. I know that by naming conventions is not good here. Also error handling is not exists yet. ...
0
votes
1answer
53 views
3
votes
0answers
10 views

Responsive mixin in LESS

I wrote a responsive mixin for Less when I couldn't find a full featured one. Curious what other developers have done to solve this problem and hoping to improve/reduce my code since I'm very new to ...
3
votes
1answer
174 views

Removing duplicate files in a given directory

The following code is a python script that removes duplicate files in a given directory. At first I considered the most basic thing: relying on identical names, but you might have 2 different files ...
2
votes
0answers
17 views

Print Python docstrings when module is executed interactively

I have written a module, which should only be used by means of import, then call the functions as required. I do not want this module to do anything when ran interactively, other than printing out ...
-1
votes
0answers
10 views

Setting properties of an object on the basis of another tri-value property

I have an upvote/downvote function on a post with the following specs: Clicking on upvote/downvote will switch your upvote/downvote from the post. You cannot downvote your own post. You cannot remove ...
4
votes
1answer
56 views

Math expression evaluator

It is my second attempt to make a math expression evaluator. To evaluate an expression, I created a class that works like this: -it removes all the blank spaces -if brackets are present, it ...
3
votes
2answers
27 views

Parsing an XML file with elements for keys and values

I'm parsing an XML file that is structured like this: ...
0
votes
0answers
28 views

Find max in-order difference in array

Given an array A of integers, find the maximum of j - i subjected to the constraint of A[i] <= A[j]. If there is no solution possible, return 0. Example : A : [3 5 4 2] Output : 2 for the pair ...
-4
votes
0answers
22 views

How can I save a string as a list so that it can be checked for a certain word?(Find keywords in a string) [on hold]

So I am new to Python, I wanted to know how I can make it so, if I trigger a keyword in the input it will give a set response. For example, if in a sentence the word "puddle" is used, it will trigger ...
-3
votes
0answers
20 views

Converting txt file into csv in python for Analytics [on hold]

I just started to learn data analytics and recommendation system. For the first part of learning, I followed a web-page to build a food recommendation system. The first step is to change the dataset ...
0
votes
1answer
25 views

Ruby - Methods with same structure in a DRY manner

Let's say that I have the following methods ...
2
votes
0answers
12 views

Is there a better way to build this Observable?

I have a service with these methods: Observable<User> getUsers(); Observable<Role> getUserRoles(String userId); For each user, I want to get her ...
-1
votes
0answers
24 views

Task with Action Delegate accepting string parameter [on hold]

I have just started with parallel programming. I want to create an action delegate method that print a message on console. when i chenge Action<string> to <...
0
votes
2answers
87 views

Map easy for beginners to understand

I want to explain to beginners what is a "Map" in Java, with the assumption that beginners do not understand what a hashcode is. As I developed games (tarot, belote, president, pokemon), I know Java ...
0
votes
1answer
18 views

Custom TableRowSorter - New sort order

The purpose of this custom TableRowSorter is to provide me with a different sort order of the columns. It changes the sort order from...
1
vote
1answer
33 views

Disable button when required inputs are not filled in

Currently I'm having a big form, with steps and a lot of complex fields. To make sure the user fills the required inputs and don't make them crazy pushing down the button submit when one required ...
2
votes
0answers
26 views

Designing a toy dependency injection library

Just for learning purpose I thought to write a simple and useful dependency injection service which would just do dependency injection but also it should expose its core too which would let the client ...
0
votes
3answers
159 views

compute_ranks function

I've been working on optimizing such as loop unrolling, is there anything I can do to optimize this code to make it run faster/in less cycles? ...
2
votes
0answers
12 views

Complex views are a little slow

I have this view vw_RFQPartVendor that's based on these two views vw_requestVendor and ...
0
votes
1answer
21 views

Decrypting single byte XOR encryption

The code along with the utils module is also at github. If you'd also have any advice on how the whole crate is structured I'd love to hear it. :) ...
1
vote
2answers
163 views

Get character occurence count along with character in a string

I want to find character sequence count in a given string. Sample Input: aaaabbbbaaacccbbb Output: a4b4a3c3b3 My below function is working great and giving me the same result. but can this be ...
-4
votes
0answers
35 views

15 30 50 per page