All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

Using Python to list recent files in directory

I'm working with directory of raw data .csv files, stored daily in a directory with the same name except date stamp in the name, for example ...
0
votes
0answers
52 views

Read consecutive blanks in array

I am writing a function that reads all consecutive blanks in a string, moves the pointer to the next non-blank char, and return a struct "token" that contains the blanks it found. The main function ...
0
votes
0answers
58 views

Shopping list sent by email using Python 3

This script sends the user's shopping list to the recipient's email address. Maybe you can help me correct some mistakes. ...
0
votes
0answers
247 views

BMI calculator with React Hooks

I wrote this Body-Mass Index calculator as part of a test. I'm new to React Hooks so I'm not sure whether this is good practice or not. When it comes to the component implementation and the tests, I'm ...
0
votes
0answers
162 views

Angular HTTP POST with Basic Auth and Form Data

I have an API that I need to use that requires 2 things Basic auth with user: username & password: api token The request ...
0
votes
0answers
12 views

Nested conversion

I wrote this module that converts json to a nested structure based on its parent id. Takes this json input: ...
0
votes
0answers
41 views

Mutex implementation using Windows APC

I just wrote this now and didn't test it much. This isn't a replacement for std::mutex, but for something like fun. I may develop it to make it shared across processes by storing the counters in a ...
0
votes
0answers
79 views

Implemeting multidimensional stencil in Cuda C/C++

I've constructed a system that contains multiple 2D lattice and a 1D cable all in a single vector of type double. Each 2D lattice is coupled to a site along the cable. For instance, there are 800 ...
0
votes
0answers
61 views

C++ Pair Data structure

I'm wondering if this is a kind of useful way to go about implementing a well performing and generally simple pair type or is it just plain stupid? By 'simple', I mean in the sense that it's just ...
0
votes
0answers
123 views

Create a simple job system using a mutex-locked task queue

Although an experienced gameplay programmer, I'm relatively new to multithreading. I've attempted an implementation of a job system that my WIP 2D engine uses: it provides "engine" and "game" workers, ...
0
votes
0answers
29 views

Salesforce Live Agent Chat Client Code in Java

I have to use SwingWorker for the first time today, and I'm pretty pleased with the result. Would you mind helping check that I used it correctly? My class starts ...
0
votes
0answers
28 views

Using per-page SystemJS configurations (because of misbehaving dependencies)

Background I'm writing a server-side-rendering (i.e. "traditional") web-application that uses a dependency-free client-side components library (specifically, Syncfusion Essential JS 2). Ostensibly ...
0
votes
0answers
20 views

Dynamic “compilation” of SQL stored procedures

I have a stored procedure which is called to create ( "compile" ) temporary stored procedures, code below, based on whether a flag in a database record is set - the various sub-procedures such as ...
0
votes
1answer
456 views

Predicting credit card default

I have this code for predicting credit card default and it works perfectly, but I am checking here to see if anybody could make it more efficient or compact. It is pretty long though, but please bear ...
0
votes
0answers
26 views

Tracking when a column was last modified using a trigger (in SQL Server)

How can I improve the following code to track when an Azure SQL Database column value was last modified? ...
0
votes
0answers
108 views

Recursive Dynamic programming with 3D arrays consuming time

I am trying to solve a question given on Codeforces involving dynamic programming with 3D arrays. F. Trucks and Cities There are \$n\$ cities along the road, which can be represented as a ...
0
votes
0answers
35 views

Templated JSON parsing methods that work with an element or elements array

Consider the following two Java methods. The first takes a JSON string representing one element, the second representing multiple elements. gson.fromJson() can be ...
0
votes
0answers
435 views

Voxel Engine with Vulkan

Here is my voxel engine. I want some review for performance on the renderer. What can be improved? What must change? Also I'm not sure it is efficient to use vkWaitQueueIdle for syncing. The end goal ...
0
votes
0answers
56 views

Please check my HTTPServlet route parsing extension for quality

Please critique my codebase https://github.com/davidbyng/acme-simple-servlet-extension ...
0
votes
1answer
130 views

Python implementation of Conway's Game of Life [closed]

For learning purpose I've started creating my implementation of Conway's Game of Life. I've used numpy to store big array, contating dead and alive cells, then I've apllied Conway's rules, to create ...
0
votes
0answers
246 views

Bucket sort algorithm in JavaScript

I was asked to implement bucket sort recently from my friend. Bucket sort is mainly useful when input is uniformly distributed over a range. For example, consider the following problem. Sort a ...
0
votes
0answers
112 views

Find the smallest subarray with sum greater than a given value

Given some array, find the smallest subarray with a sum that is greater than a value given. So for instance, given this array: {1, -4, -45, 6, 0, 19, 16, 17} ...
0
votes
0answers
2k views

Tic Tac Toe game in Python 3.X using tkinter GUI version 2

I am completely new to programming and to python and as my first self-learning project I am creating a simple Tic-Tac-Toe game. I have already posted a version of my code here on stack: Tic Tac Toe ...
0
votes
0answers
151 views

Python Program Generating N-Gram Language Model

I am pretty new to python, and I am writing this program to randomly generate sentences based on the n-gram language. It takes me very long to run this with the large input file I have, so it is very ...
0
votes
0answers
141 views

HttpListener Server for building reports in Excel

I have coded a web-based Excel file builder and sender, that serves the file over Http(example links in code). I would like to see improvements and any suggestions you might have. ...
0
votes
0answers
499 views

Simple card game with updating GUI

I have coded a simple card game that updates the GUI each second and contains many nodes in game which are used to display game events and animation. People who have tried the game said that their ...
0
votes
0answers
44 views

Inter Thread communication between n thread

The following program takes 3 integer inputs(noOfThreadToBeCreate,fromNo,toNo) and print the Consecutive numbers based on the range using different threads e.g (Thread 1 - Print 1, Thread 2 - print 2, ...
0
votes
0answers
27 views

Filtering files and directories

I want to filter directories and files by what they start with. ...
0
votes
1answer
69 views

Android TCP server that maps data to an object and sends it to a service

This is a code for an android thread. This is a tcp server and gets data from socket, maps it to an object and sends that object back to the main service. If there is anything I'm doing wrong or if ...
0
votes
0answers
497 views

Upsert with .Net Core Web API

I am using .NET Core 2.2, EF Core and C#. I have created a web API project. I was requested to do an Upsert (insert or update). The entities structure is: Movie User Rating: this is used to give a ...
0
votes
0answers
475 views

Join (custom) query in Spring Data JPA

I'm trying to make a REST service using Spring Boot and Spring Data. I have written a query using join and have achieved the required o/p but I'm curious to know if ...
0
votes
0answers
66 views

Optimizing Datatables table of tens of thousands of client-provided rows

We have this employees table, that looks like this: that contains 16,530 employee rows. As expected, this table takes more than 30 seconds to load. I have been tasked with speeding it up somehow. ...
0
votes
0answers
47 views

Calling Eigen library to do the linear operation of the matrix

I am a rookie of coding and I have written a c++ procedure which calls the Eigen library to do the linear operation of the matrix. Please help me to improve the efficiency of the loop. ...
0
votes
1answer
65 views

Potential type-safety issues on object parsing function in DXL

I have inherited the maintenance of a DXL script (for IBM Doors). In this, I came across various examples of stuff that make me scratch my head. Take this example: ...
0
votes
1answer
985 views

Convert IEnumerable to HTML table string

My code can generate HTML table strings well, but it depends on JSON.NET. I'm converting IEnumerable to an HTML table string using Json.NET but I think I shouldn't....
0
votes
1answer
445 views

Calculate decile table with some loop in R

I wrote code which calculates: Decile threshold for every decile group Total income in the decile group Number of persons Share of decile in total income (%) Tax Share of tax (%) But unfortunately I ...
0
votes
2answers
86 views

Get property value from object tree in a recursive way

Consider the following structure, let condition = { and: [ { id: 3 }, { pageId: '1' } ] } I want to get the id property value ...
0
votes
1answer
106 views

Pure JS countdown clock not converting millisecond time correctly [closed]

I have a semisimple pure js countdown clock that I am having trouble converting the millisecond time correctly. Here is a working Plunker (besides the date counter) It Should only be 38 days instead ...
0
votes
1answer
344 views

PHP OOP MVC Project Structure

I'm a beginner in OOP and PHP frameworks. I used slim skeleton to create a project and designed the project in this way. Project structure is given by the slim skeleton. Object Mappers are added by ...
0
votes
0answers
61 views

Fibonacci-Counter implemented with React-Redux

After learning the basics of React-Redux I've made an app to familiarize myself more with the concepts. It's a counter which counts-up the Fibonacci-Number. Here's my code: ...
0
votes
1answer
85 views

Loop each folder and subfolder to get values

Any tips or improvement to speed my code? I'm looping each file in the specify folder and subfolders. I will open each file and get the values I need and copy it to my activesheet. It is taking quit ...
0
votes
1answer
23 views

Transform a javascript object to an array based on value of each key in the original object

I have an object of ingredients to be added to a burger. Its structure is as follows: Input ...
0
votes
0answers
45 views

License Manager PHP Class

I'm workin on this code that will be a licensing class integrated with an electron app. For now it's a simple object who will generate and check for a licence stored inside the electron app folder. I ...
0
votes
1answer
36 views

Swift append an array when it's been declared as Any

I'm learning Swift and I have a following problem: I create a dictionary containing some data, one of which is stored as an array. I want make an operation on this array to add some info. Currently I ...
0
votes
0answers
77 views

Yet another hash tuple in C++17

Is there something terribly wrong with this implementation? ...
0
votes
1answer
203 views

List with selectable and sortable elements

The code consists in making a list of elements sortable (with the drag on the right) and selectable (click on the text). However it seems a little too complex. https://codesandbox.io/s/434p397p74 ...
0
votes
1answer
52 views

Control the input of the user according to a sample string and get some info from it

I made this Python code that prints a sample string and ensures that the input of the user agrees with the sample, and then do an action with this inputted string, in this case a multiplication table. ...
0
votes
1answer
38 views

Image to HTML / CSS conversion using pure JS

Just for fun I wrote some JavaScript that "converts" an image into pure HTML / CSS. The user is able to select a local image. This image is loaded into an invisible canvas in order to extract ...
0
votes
1answer
37 views

Validate destinations of a piece in a board game

I'm programming a board game called Djambi, where most of its pieces can move like the queen from chess. I created a list to save all valid destinations of a piece, which can be in 8 different ...
0
votes
1answer
35 views

Best Approach for Assignment Code in Node.js (ES6 style) [closed]

Is there any way to improve this code? Using ES6 style i am using latest stable version of node.js. ...

15 30 50 per page