# All Questions

62,604 questions
Filter by
Sorted by
Tagged with
23 views

### Heap corruption error in the following program? [on hold]

I'm trying to implement dynamic array in C++ for practice. Here is my implementation: ...
29 views

### SQL Code That Looks for Dupes with Confidence Score, 3hr / 1.2 BILLION Rows Returned. Optimize?

OK, I have a customer list that has approx 80k records. I need to search and compare looking for duplicates, but duplicates could be an exact match, or a similar match (only some data matches) so it ...
630 views

### Iterator for traversing a tree [v2]

this is an update of the implementation after I followed the feedback from Iterator for traversing a tree. After that I did changed quite a bit on the design and decided to ask for another round of ...
47 views

### Caesar Cypher Implementation

I am learning C# and for an experiment I tried implementing the Caesar Cypher cryptography method which just offsets every character of the string n characters. How can I make this simple program ...
53 views

### Boyer Moore Horspool Search Algorithm in Go

I am practicing Go and try to implement Boyer Moore Horspool Algorithm in Go, It returns all ocurrance of a "phrase" in a given text. This code is working, but I would be pleased to have any feedback ...
38 views

### A python script to plot a joint probability mass function table

Consider this example Suppose that 3 balls are randomly selected from an urn containing 3 red, 4 white, and 5 blue balls. If we let X and Y denote, respectively, the number of red and white ...
22 views

### Initializing Group Data Mess

This is my OnAppearingAsync method where I as a page load in Xamarin I filter data, group it together, set data based on it, order the groups e.t.c. However the code is rather long and looks a bit ...
16 views

### Is Multi Authentication on one Endpoint Considered Bad Practice? [on hold]

Whilst this question is arguably opinion based, I am looking to gauge the opinions of other engineers on this matter in order to assist in settling a debate between two engineers. Consider the ...
58 views

### Webscraping cryptocurrency

In this class I made a webscraper for a cryptocurrency website to get the name and the price of each currency. There are maybe API's that I can also use, but I thought it is better to gain some ...
28 views

### JavaScript random BigInt

Problem: JavaScript does not provide a random BigInt so there is a need to generate a random BigInt within a given range that is evenly distributed. Solution I have tried many algorithms with a ...
51 views

### Color The Fence codeforces - TLE

I am trying to solve this problem: Igor has fallen in love with Tanya. Now Igor wants to show his feelings and write a number on the fence opposite to Tanya's house. Igor thinks that the larger ...
16 views

### Removing key value pair from yaml in python [on hold]

we would like to remove the key and the values from a yaml file using python, for example ...
33 views

### Simple projects planner on PyQt5

My task was : Create a Python application to display the active status of your IT project. Everyone the project has its own unique number that is generated at the stage of receipt project into the ...
34 views

### reading a file to create a Class maze consisting of 2d array of class cell [on hold]

I need to read a file ,but the problem i dont know the number of cells and rows, thus i will have to read it twice first to get the number of rows and columns and the second time in order to ...
20 views

### Programming the infinite fraction of the golden ratio [on hold]

The infinite fraction form of the famous mathematical constant (phi) is as follows: 1+1/(1+1/(1+1/(1+1/(........ I tried to program it in C using a recursive function (and calculating the fraction ...
14 views

### Comparing Schema Version from Database Table with version.php [on hold]

(I apologize in advance if this questions is posted in an improper or non-optimal venue.) I am trying to compare the version number of the database schema from the table below with that of \$...
261 views

### Inventory coding interview exercicse

This past week, I had a coding interview where I have failed badly. The feedback that I get from the recruiter was that my code reminded the team of older ways of coding in C#. This led them to ...
9 views

### If the lower limit were inclusive and the upper limit exclusive, which expression would properly generate values for the secret number? [migrated]

I'm trying to find out which one is inclusive and exclusive. I know that this code segment is inclusive //Generate a secret number between the lower and upper bounds (inclusive of both) ...
40 views

### LeetCode: Daily Temperatures C#

https://leetcode.com/problems/daily-temperatures/ Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until ...
67 views

### Fetch, plot, and send security incident statistics with Excel

TLDR: I don't develop for a living. If someone could point me in the right direction to make my script more readable/pythonic I would appreciate the assistance. In particular I'm struggling with the ...
19 views

### Synchronous use of Mongo-Scala Driver

The Mongo-Scala Driver (v2.6) currently only supports asynchronous operations, although my use cases often seem to lend themselves well to synchronous reads. This may be to block downstream code ...
190 views

### Magic Square (Python)

Problem Write a method to return a boolean if an input grid is magic square. A magic square is a $NxN$ square grid (where N is the number of cells on each side) filled with distinct positive ...
57 views

### Hackerearth challenge - Roy and Code Streak

Roy is working on HackerEarth Profile. Right now he is working on User Statistics. One of the statistics data (Code Streak) is as follows: Given the User Activity Data, find the maximum number ...
36 views

### Code reuse when generating dynamic variables [on hold]

I have some code that I want to repeat in the best way possible. I'm looking for some advice to an approach. Function, object, other? Thanks! ...
29 views

### Call the function multiple times [on hold]

I have a requirement where I need to make a database call to get sales record count(GetRecordCount in code) and then process 1000 records at a time(ProcessNewOtranRecords in code). If the salesrecords ...
36 views

### Handling heavy conditional rendering in react

I have a general question pertaining to a component from one of my apps. I have a function, renderConditionals that is at the core of my UI. It's incredibly ...
20 views

### Not using 'Service' as suffix in class names [on hold]

Suppose I am writing a class that is finding/fetching employees that have their birthdays matching the input date. I have chosen to keep the class name as ...
36 views

### Convert generic class into XML string of specific structure

There is a need to have a specific structure of XML string when interacting with 3rd party system. Here are two examples: ...
12 views

### Creating a dynamic menu from JSON with multiple nested and sub nested objects [on hold]

The menu is building except for the section GroupName: Employment Department Reports. I create the first sublevel with the SubGroupName menu name have problem adding the reports information under ...
34 views

### JSON to CSS in JavaScript

Hello Im working on a JSON to CSS converter in nodejs, which takes a .json file and generates a .css file with its utility classes from it. .json example ...
35 views

### Tips about Project architecture, Inheritance, Files names [on hold]

I am writing some application what I want to use later to help me gather tweets, extract some data from it, manage, make some machine learning on it. This is my structure so far. I always did like ...
132 views

### overlapping rectangles c#

I had to write code for a competition which calculates sum of the perimeter of three overlapping rectangles in a 2D space. rectangle A and rectangles B and rectangle c is overlapping each other.They ...
93 views

### Fetching counties and localities using JSON API calls

I'm using the below code to call different methods from an API: ...
30 views

### generate 10 random numbers that are not duplicates between 0 to 20 using arrays [on hold]

i have to generate a list of 10 random numbers between 0 to 20 using arrays.When i run the program, there are still duplicate numbers what am i doing wrong? ...
3k views

### Simple code that checks if you're old enough to drive

I made this small system that checks if you're old enough to drive. I'm new to C#, but I do know most of the basics since I also know Java. I'm trying to make my code more efficient. Any suggestions ...
79 views

### Simple todo script

This is my Todo script. It's working well. I'm looking for feedback on what I've done well, and what I could have done better. ...
76 views

### PDO Is this registration secure and well coded?

i finally have been moved to PDO (from MySQLi) and i m now trying to make simple login and registration page (for training purposes). This code does work! But i want to know if it is secure? Also ...
49 views

### a Python script to format plain text to markdown title

I wrote a Python script to format plain text to markdown title. for example, modify multiple lines ...
60 views

### Binary file reading and plotting data

This code reads binary file. Read data is converted into signed values and gets plotted if the user wants it. Data looks as below: ...
24 views

### Collision Detection Code doesn't detect all the collision [on hold]

I am doing capsule-capsule collision detection. It's not perfect; it lets through some collisions. I'm thinking it may have to do with floating point error, but I don't know how to correct for that. I ...
62 views

### An explicit cast for narrowing numeric conversions

Inspired by gsl::narrow_cast, I created my own implementation with the addition of a couple of features: a static assert on the types to ensure the cast is actually narrowing (if future changes to ...
24 views

### program options from command line initialize [v3 - after CR]

After my previous code review, I'm sharing my new code, and asking for better ways (which always exist) to improve the code, even with new libraries. The only thing that important to me, is the way of ...
34 views

### Remove outliers from N dimensional data

I have created a function that will remove outliers from a series of data. Generally the data n dimensional. Loosely, an outlier is considered an outlier if it +/- deviates by 1.5 standard_deviation's ...
25 views

### Code is returning an eigenvalue of 0 but should not [on hold]

The code I am writing is for the Jacobi method of approximating eigenvalues. I keep getting eigenvalues of 0 for any size matrix even though by hand I am not getting eigenvalues of 0. I think that my ...
129 views

### The Best™ class

Have you ever wanted to get just not one "best" element from a list, but all of them, or a random element of the best ones? That's what the Best class is here for. Opinion-based? Definitely not! ...
21 views

### Printing character in a string based upon index inputted by user [on hold]

The issue I'm having is, if I put in a string such as 'red' and then ask for index of 3 which is larger than the length, I get no output, but if I enter an index of 4 I will then get my intended ...
73 views

### Capitalize the First Letter of Words in a String (JavaScript, Python)

Problem Write a function that accepts a string, capitalizes the first letter of each word in the string, and returns the capitalized string. Examples ...
45 views

...