# All Questions

61,959 questions
Filter by
Sorted by
Tagged with
8 views

### Modifying to Get-MyBios

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: ...
8 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 ...
8 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: ...
26 views

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

everyone! I wrote a simple currency converter in Python. I'll appreciate some tips about how I can improve my little script; what new features would be nice to add to my project? Right now, my ...
26 views

### Pure python range implementation

I implemented class Range as an equivalent to Python built-in range for practicing purposes. No features were added. Hope it ...
28 views

### Script to download Annual Reports (~70,000 in total) from a Website

It's only 38 lines of code and I haven't worked with web scraping that much before. How heavy would my code be on their server? It's for Deep Learning purposes and I haven't ran it yet but ...
19 views

### Tokenizer Class for handling .csv files in c++17

I am a hobbyist computer programmer trying to learn modern C++ (in this case C++17). I thought it might be an interesting challenge to write a tokenizer class for ...
53 views

### How to make my “custom integer type” perform better?

During a project at my work I needed a convenient way to store values taking up the smallest amount of bits necessary, not in memory but later when they're serialized into an array of unsigned short ...
20 views

### MATLAB / vs Python np.linalg.solve, heat diffusion, Why Python is slow?

I am solving a simple 1D steady heat question using spectral method. I am a long time MATLAB and Mathematica user and trying to learn Python. I compare only linear solving times and Python is way ...
20 views

### Finding all simple (without internal cycles) paths in a directed graph with total >1.0 weight

Assume directed graph with each edge being weighted by some positive float. Problem: find all simple paths (in other words, ...
19 views

### Reverse-TCP client & server in python

I've written a small project, initially designed to help me remotely control my home PC from my office. I had to deal with an annoying firewall, so I've written it as a reverse TCP (meaning it's the ...
22 views

### Draw a spark line with SwiftUI

I am using a set of data points (currently randomly generated), and drawing a line graph inside a box: ...
34 views

### Edit file name method - run time complexity

I wrote a function in Java that edit file name, and replace each space char into dash char. Currently I iterate all the files in a specific directory, iterate in each file name, creating a new file ...
19 views

### Batch rename files recursively, and number the directory index

When dealing with iOS app bundle, It is not convenient to get the file by its path, but loading it by its name. Need to batch rename images recursively, with Mac Bash. And to make the name unique, ...
41 views

### Recursion to dynamic programming [on hold]

I was trying to solve a problem on de-arrangements (Number of partial derangement such that exactly prime number discs are found away from their natural positions? (Any number of non-prime K disks ...
44 views

### Is this how professionals code? [on hold]

as a self-taught programmer I have no idea what is going on in the real, professional world of Android development (and I am sure there are tons of other people here, too). I have just created the ...
17 views

### Processing language to draw scatter plot [on hold]

I am trying to plot the following data using the columns, ID, ACT_m and GPA into the scatter plot, but I don't see any data in my plot. Thank you so much for your time. ...
26 views

### Modelling a Call Center in Java (multithreading approach)

I wanted to give a shot to Modelling a Call Center from Cracking the Coding Interview. The problem statement is as follows: You have a call center with three levels of employees: Respondent, ...
23 views

### Function to determine state of Christmas tree lights? [on hold]

My friend and I are trying to automate some Christmas tree lights that I got on sale last year. I will be able to measure the output of the voltage, and there are 4 functions: steady on, blinky on, ...
15 views

### Django Dashboard View

What does my code do? I use Django and in the following snippet, I use a class together with a TemplateView to render an HTML page. I already tried to simplify it with methods, but my code still looks ...
26 views

### Python script for parsing links

I wrote a test that parses links from a web page, and in a loop, clicks on each of them, and then returns to the main page. But, each iteration is accompanied by parsing the entire web page again and ...
86 views

### An ES6 array of numbers - Double last number, delete the first number

I'm writing a JavaScript function for an array, based on a geographic sequence. $[1, 2, 4, 8, 16]$, etc. This function needs to populate the next number in the sequence item_n = item_{n-1} * ...
38 views

### Convert text file to html?

I have a script that converts a text file to html. The text file is an output of a program (needle). The function takes the text file as an input. I am aware the script is awful. I use this function ...
15 views

### delete a file using by another process in c# [on hold]

I want to delete a jpg file from my C# program but I can't do that because these files are in use by another process. I tried different things but none worked. Does anyone have a solution? This is my ...
24 views

### Remove duplicates from an unsorted Linked List in Ruby

Currently I'm going over the cracking the coding interview. I'm in the Linked List 2.1 question which is as follow: Remove Duplicates, write code to remove duplicates from an unsorted Linked List....
48 views

### Use math to project price rather than a loop

I have to project the price for a publicly traded contract when the price should be approximately matching the targeted profit or loss. I have written the following code, runs under 0.02ms.. could be ...
31 views

### Kotlin shared preferences

So I've written a class for storing user/device specific settings, but I've written the Kotlin pretty much like I would in Java: ...
18 views

### Using a thread to update a table automatically in Django

For my portfolio app using Django I made a thread that pulls out the usd exchange rates for various currencies every 6 hours and updates the database. The program kicks in as soon as the module ...
25 views

### How can I refactor my code for this coding challenge

I have finally complete the cash register challenge found on freecodecamp.org and I was wondering how I can further clean my code. I need help refactoring my code. Link to challenge here: https://...
38 views

### Query a product from a list of brands

I am quite new to F# and just wrote my first program. It checks if the query exists in the brand list and returns the matching brand. Query is the string you are searching for in the brand list. So ...
17 views

### Setting a request header with or without Context in Golang

I have two ways (middleware) of setting a specific header (if not set) to request but want to know if one is better/beneficial than the other and the reasons why. Note: At some point I will need to ...
33 views

### Find neighboring PINs on a numeric keypad

I am new to coding and to apply for an internship I need to solve several tasks. This is one of them. I wrote working code, but the program says it takes too long to complete. Help me speed up my code ...
12 views

### Defining notations after equation in Latex [on hold]

How can define notations in the equation containing text, so they are well aligned . for example ...
41 views

### Very basic Integer queue in C

I've never written a queue before and literally just took the concepts and tried to code something up. I decided to write a basic integer queue and as an example/driver I use a queue of size 5 which ...
78 views

### Check if is it possible to get to a point that is presented by a number

Problem description from an Iranian online course, translated with the help of Google Translate: Tired of coding, Mehdi has gone on to his childhood games. But because he doesn't know who to play ...
18 views

### Converting a binary string to hexadecimal using Rust

Once again, I am reinventing the wheel here to understand the fundamentals of rust. In a previous question I requested feedback on my function that performed a hexadecimal to binary conversion. In ...
62 views

### Python code to continue if a certain type is seen, otherwise try again to get valid input

I am very very new to programming, and this is my first day using Python. I want to check to see if an input is of type 'int' and to proceed with my program if the user has entered an 'int', ...
28 views

### This perl script renames all files in a directory to have an equal amount of digits

I took a lot of pictures with my camera and I wanted to make a time-lapse out of them. The camera saved the pictures as picture1, ...
12 views

### List files and folders in current dir with special handling for tty

I want to write a custom ls command to learn rust. This is what I've done as for the version 1.0. This display files and folders in a cyan or white if it's on a ...
15 views

### Fulfillment webhook with Dialogflow to operate on a Firestore database

I'm currently calling a fulfillment webhook with dialogflow in my node backend, performing crud operations on a firestore db. Is there a better, cleaner way to ...
17 views

### Running a shell command when a file is added to FTP on Linux Ubuntu

I've recently set up a continuous integration pipeline to deploy a .NET Core application to my Linux machine living on the cloud. My CI pipeline publishes my application, (specifically a .NET web ...
72 views

### Safe stack abstraction

Here is the stack abstraction that I've written. I've designed it to be safe and without undefined behavior. I use ugly_cast to discourage casting and to make ...
628 views

### Read string of any length in C

I've written code in C for reading a string of any length, and printing the string. It's one of my first C programs. I posted the program as part of a Stack Overflow question, and received a comment: ...
53 views
+100

### Calculator app in React

This is a simple calculator app that involves entering two numbers and allowing them to be editable and swappable. Calculations are done on the numbers, so the calculations should only be done when ...
22 views

### Batch rename files with Mac Bash,while the dir index should be recorded

I need to batch rename images with Mac Bash,while the directory index should be recorded. To rename files ,turn ...
20 views

### How to avoid race conditions during UNIX process handling in C? [on hold]

I'm trying to build a simple UNIX shell for educational purposes. My intention is to handle background processes correctly, displaying a message whenever it finishes it's job via the ...
1k views

I have been looking for answers for how to easily scrape data from Wikipedia into a CSV file with Beautiful Soup. This is the code so far. Is there an easier way to do it? ...
27 views

### Idiomatic quadtree implementation in Rust

I am learning Rust, coming from a Java background, and I was hoping to get some critique on my simple QuadTree implementation in Rust. This is as a learning exercise for me. Are there tips on how to ...