# All Questions

61,995 questions
Filter by
Sorted by
Tagged with
5 views

### Adding a term to Polynomial class, approach with dynamic arrays

I am trying to program a Polynomial class. I am kind of stuck on the coefficient adding. ...
6 views

### Basic Pong game using C++ and SFML

I am trying to make use of C++ and SFML to make a basic Pong game. So far I have made it so that there are two players who can control the paddle on each side and the ball will bounce off screen and ...
14 views

### Java For Arraylist

Good morning guys, I need help. I search the Internet for a way to read two values from the keyboard n and m then save the i values to an Arraylist. Subsequently, I intend to scan the arraylist for ...
18 views

### Extract, filter and match three letters from the given arguments and predict the name

Case 1: rank1_naming This function takes two arguments list_proteins_pattern_available best_match_protein_name Objective: Extract the three letter pattern from the both arguments. Match the ...
6 views

7 views

### Splitting up a custom hook

I've got this custom hook that is suffering from a bad case of violation of SRI. This is a simple 5x5 board where a car can move around. Together with a server side check if the move is valid or not....
9 views

### Does google consider html comments in inside JSON Schema to be a violation of the “schema must match content” rule?

I currently have a small jobs website, which generates a json schema for google to publish it in google jobs: http://qkids.co/online-jobs/Illinois/Chicago/60629/127090/64 this url produces a JSON ...
3 views

### How to differentiate web fonts font-face font-weights?

What do you guys think: OPTION #1 (same font-face name and change font-weight) ...
32 views

### Schelling's model of Segregation Python implementation with Geopandas (Follow-up)

This is the repost of the following question as suggested by @HoboProber . Again, if you don't know what is Schelling's model of segregation, you can read it here. The Schelling model of ...
38 views

### Weapon class firing logic in JavaScript

I'm making a program to compare Borderlands 3 weapon damage over time in a graphic. There's still some work to be done, like implementing elemental damage, but I'd like to know if I'm doing a good job ...
70 views

### Get the encrypted payload from an unencrypted wrapper PDF document

This is code, written by our dev team, and SonarQube tells me that the Cognitive Complexity is too high: 21, and the current (default, out of the box) metric limit is 15. I've had a go at reducing the ...
13 views

### sql like operator %string% taking too much time on very few records

i have a small database with 7 tables with 6 reference table i need to do search on the base of key word so i write a procedure as follows ...
12 views

### PHP, HTML dynamically create table and merge cells of class schedules [on hold]

I have an array from my query result, i want to display the values in a table dynamically since every result may vary depends on the schedule of the student. The table has a fixed header of MONDAY-...
26 views

### C# LINQ CODE REFACTORING [on hold]

I'm using entity framework to get data from a db, I'm also using linq to group the data and some stuffs linke that, and I've just wrote a method which is grouping data by it's status: ...
15 views

### What is the Idiomatic way to handle error in go when populating a struct

Here is a simplified version of my code struct and the function that populates it. ...
21 views

### Double precision variance [on hold]

I have a motion profile generator which calculates a position 1000/sec. During the decelerating portion of the move, the following calculation is used: ...
9 views

### Polling an SFTP server to list files in a directory

When is it better to instantiate the sftp client globally vs inside a function as shown below? What considerations favor one method over the other? For a long ...
28 views

### “Block a website” script with vanilla JavaScript

I use this script to block access to a one or more websites with vanilla JavaScript. I find that it helps me avoid some addictive news websites that make me depressed. (Credit to Marat Tanalin for ...
26 views

### Computational Chemistry - is there a bug with my code? [on hold]

Hi Code Review Stack Exchange! I had originally posted this on Chemistry StackExchange, but they suggested I try here instead. Anyways: I was checking my RHF code and found a couple of bugs (which ...
34 views

### Swift: extract string with regex and range

In Swift, I have a string like this http://mnc-hdqp.oss-cn-shanghai.aliyuncs.com/user%2Fheat%2Fdefault.jpg?Signature=2BI%2BauSvy&Expires=1568682491&OSSAccessKeyId=LTAIQ8Lif1HHVkXd Need to ...
875 views

### Algorithm for competing cells of 0s and 1s

I'm working on a practice algorithm problem, stated as follows: There are eight houses represented as cells. Each day, the houses compete with adjacent ones. 1 represents an "active" house and 0 ...
38 views

### Java solution to CodeChef “Surgical Strikes” challenge

I've just recently completed this programming "challenge" called surgical strikes: $N$ Indian Air Force fighter planes are located in different bases across the country. Each airbase is described ...
22 views

### c# - PropertyInfo set value List<object> [on hold]

PropertyInfo set value List show error in convert list I tried to convert to json and I couldn't ...
9 views

### Fully uncontrolled component with a key and parent state changes [on hold]

I am learning reactjs (almost beginner) and I am writing a hagman game. I have 3 child components (a canvas of the hangman, a keyboard to click on letter keys and a display of the word). When letter ...
23 views

### Avoiding @SuppressWarnings(“unchecked”) [on hold]

I have the following code but in the method I needed to put in @SuppressWarnings("unchecked") to suppress this warning Warning:(49, 45) Unchecked method '...
45 views

### Determine if a string is a sequence of dictionary words

This is Leetcode problem 139: "Wordbreak" Problem: Given a non-empty string s and a dictionary wordDict containing a list ...
21 views

...
26 views

### Function to convert “path” into regular expression

This function converts a string like: /{?lang(2-5):lowercase}/{page(2+):lowercase}/{article}-{id:integer}*.html* Into the following regular expression: ...
32 views

### Automatic CRL files converter

In my job we use our internal CA runs on a Windows server. When I want to use it’s CRL on a Linux machine I have to do these steps: download root CA and intermediate CAs covert them to x509 merge ...
43 views

### Run the needle program for a query against the subject files and return the result

I have written the script to run locally the needle program for a query against the subject files. It returns the highest percentage result file as a string. In addition it also converts to html file (...
41 views

### A thread that can be interrupted before starting

As per the Java documentation: Interrupting a thread that is not alive need not have any effect. Particularly, interrupting a thread between the call to start() and the invocation of run() has no ...
18 views

### Plotting a parabola using Tkinter

I'm a beginner, and I have just written this basic code that simply plots a parabola in a graph. Is it possible to make my code more efficient? The process works by the creating lists of X and Y then ...
40 views

### Replace part of the string with n size with string of m size

I wanted to understand memory and pointers better before I endeavour into file path manipulations for larger project. This is simple replace part of the string test function that I need to rewrite ...
806 views

### Account creation and log-in system

I've been learning Python for about 1 - 1 1/2 weeks now and just finished my first small project to help solidify what I've learnt. It's a very basic (bad) login / create account system that I run in ...
24 views

Recently I did an exercise to understand Akka. I implemented a trading system with Akka to process orders with Actors. My code is like: Order: Immutable class with acts as the messages in the ...
29 views

### A Generic error occurred in GDI+ in Bitmap.Save method [on hold]

On the save Rtn.Save() method is causing exception "A generic error occurred in GDI+.".. Any ideas where I am going wrong? ...
46 views

I am writing a RSS reader Library which should be able to read the data from different sources. I am very new to writing libraries and not sure if I am going right with it. These are my base ...
157 views

### merge list of strings into one sorted string

So I was tasked the following: Given a list of strings, output a sorted string that consists of all lowercase characters (a-z) from each string in the list. Example [aba, xz] -> ...
35 views

### Faster way of Floyd-Warshall [on hold]

I've implemented the modified Floyd-Warshall method to determine all shortest paths between all pair of vertices (i.e., if there are multiple shortest paths between a vertex pair, then all of them are ...
47 views

### Effective fetching data algorithm

I'm fetching some data by using bs4, and want to know why access speed gets slower as my program progresses. I'm using thread, and I know threading isn't so fast because of GIL. My problem is that ...
43 views

### LeetCode: Time Based Key-Value Store C#

https://leetcode.com/problems/time-based-key-value-store/ Create a timebased key-value store class TimeMap, that supports two operations. ...
9 views

### Constructing constrained/validated objects

I'm trying to do some rudimentary DDD in validating my objects to ensure they are of a particular type. I.e. an Email object would always look like "my@example.com" ...
20 views

### Calling function in class in hotel reservation system (python) [on hold]

I dont know how to use and call the def function under class. I am not sure how to use the input data for the class. There are two text files which will be used, about the rooms: room id and price of ...
26 views

### Convenient way to make an UIImageView ExpressibleByStringLiteral

I want to reduce boiler-plate code and write like this when developing in iOS: let imgView: UIImageView = "share_fareware_text_bg" Here is implementation code: <...
138 views

### Extract numbers from the head of a string in BASH script

In my current BASH script project I am processing a string, which cannot have spaces. At one point I get to where it is possible to have a series of digits. The series can be of any length, including ...
34 views

### Dropdown menu that opens on click using plain Javascript

I made a simple dropdown menu which opens when clicked, and closes when the user clicks anywhere outside the menu. The following is the codebase: ...
19 views

### Modifying to Get-MyBios [on hold]

Trying to remove the begin and end statements to modify the script to Get-MyBios on PowerShell ISE and I don't know where to remove from this code: ...
20 views

### Promise-based AJAX calls base class

I am more than willing to use both a Promise library and an AJAX calls one if the situation calls for it. This base class sits at the very bare bones of my system and it needs to be done right. My ...
1k views

### LeetCode: Top K Frequent Elements C#

https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/799 Given a non-empty array of integers, return the k most frequent elements. Example 1: ...
62 views

### What should I change in my currency converter?

I wrote a simple currency converter in Python. Right now, my currency converter converts using the last available rate or converts using a specific date. Looking for: I'd appreciate any tips ...

15 30 50 per page