# All Questions

64,714 questions
Filter by
Sorted by
Tagged with
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 ...
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 ...
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. ...
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 ...
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 ...
12 views

### Nested conversion

I wrote this module that converts json to a nested structure based on its parent id. Takes this json input: ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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? ...
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 ...
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 ...
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 ...
56 views

### Please check my HTTPServlet route parsing extension for quality

Please critique my codebase https://github.com/davidbyng/acme-simple-servlet-extension ...
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 ...
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 ...
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} ...
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 ...
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 ...
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. ...
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 ...
44 views

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, ...
27 views

### Filtering files and directories

I want to filter directories and files by what they start with. ...
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 ...
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 ...
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 ...
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. ...
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. ...
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: ...
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....
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 ...
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 ...
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 ...
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 ...
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: ...
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 ...
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 ...
45 views

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 ...
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 ...
77 views

### Yet another hash tuple in C++17

Is there something terribly wrong with this implementation? ...
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 ...
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. ...
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 ...