# All Questions

59,133 questions
129 views

### reusing Body in http.Requests (goproxy)

Goproxy is a Go package implementing an HTTP proxy. I am using it to store requests from a client (eg: a web browser) for further processing. In an ...
8 views

### Extract the IP address from the output of ipconfig when connected to multiple wireless networks

I am trying to extract the ip address of my machine when connected to multiple wireless networks. The motivation here is then I can make a socket connection on that ip when I have two networks that ...
6 views

### LeetCode 773. Sliding Puzzle - DFS Logic

I tried to solve the LeetCode Sliding Logic Puzzle using BFS and DFS. My BFS solution worked, but my DFS solution did not ... and I cannot figure out why. Here is the original question: https://...
19 views

### Optimizing graph partitioning by connected components of generated subgraph

I'm trying to optimize a function in a process which is going to be run millions of times. The function is supposed to partition the vertices of a graph, which will be used to make a quotient graph. ...
34 views

### Get a map containing elements which are present in unordered map A but are not present in unordered map B [on hold]

I would like to create a function which returns a map containing differences between two unordered maps. Here is the code: ...
736 views

### Compiling and throwing simple dynamic exceptions at runtime for JVM

I've been using my Dynamic Exception with C# for quite some time already and it saved me a lot of time. This means, I don't have to create a new exception ...
21 views

### Different payment details in a common list, to be casted

I need to be able to access a number of different payment methods in a common list. They can be different methods - credit card, cheque, direct debit etc. The only common attributes are the payment ...
32 views

### Two cases for indicating consent for a ticket

I have two cases here: the person who ordered a ticket clicks on "Permission" and the OrderConsentUpdate View updates the database. is the attendee him- or herself ...
8 views

### Putting a Queue Between HTTP Request/Response

We currently have two legacy systems: the Consumer and the Worker. These systems are massively complex in ways that are not important to this review, but it is enough to say that a large-scale re-...
31 views

### Minimal Haskell Unit Testing Framework

I'm trying to come up with a unit testing framework for Haskell that is small and self-contained produces TAP-compatible output exits abnormally on failure (instead of relying on the TAP consumer to ...
132 views

### Simulate round-robin tournament draw

I decided to implement the round robin algorithm in Python. My code takes a list of teams as input and prints the schedule. This is my first try to write something by my own after taking some online ...
13 views

### Primitive Full-Text-Search on some Properties of an Object

I am not a JS/TS Guru, so i wanted to ask if one could write this better. I needed a very primitive Full-Text-Search of some properties of an Object. What do you think? ...
242 views

### Java converter from Arabic to Roman Numerals

I am learning Java and would like to get feedback on the code I wrote. I have written an implementation of an algorithm (found here) for converting any decimal Arabic number to Roman numeral string. ...
5k views

### One Time Pad algorithm for encryption and decryption

I have written my own one time pad algorithm for encryption and decryption, but I would like to listen to your opinions about its correctness and eventually how could I improve it. My idea was to keep ...
209 views

### Script to encrypt a file and add it to IPFS(ipfs.io)

Here is the script that I would like reviewed for the following: Best practices and design pattern usage Correctness in unanticipated cases The script is made to store (IPFS) Interplanetary File ...
12 views

### Modal pops up after ajax call completes instead of before

I have a modal that I am using to tell the viewer "Please wait" while an AJAX call is made. It may be something as simple as how I am making the call. When I click my web link, it appears to be ...
8 views

### What is the classes in MapReduce check for stragglers and speculate tasks? [on hold]

From my limited knowledge of Hadoop, I understand that the TaskTracker is in charge of Map and Reduce tasks. I am attempting to modify the decision to speculate slow reduce tasks by (1) checking for ...
49 views

### Quicksort implementation with pivotal calculated as middle element

I read quick sort algorhitm and implemented in like this: ...
22 views

### Parse through an xdocument efficiently and match values to matching object

Minimum viable test program: ...
25 views

### Encrypts using AES GCM for data with limited visibility and long rest

This is the third iteration of my venture on creating an encryption/decryption solution. I asked a question here, which led to this question here, which led to this answer here, which led me to ...
63 views

### New Year Chaos JavaScript, needs to be sped up

Similar to this question but this is for Python Original problem with description on hacker rank I am currently trying to iterate through a large number of arrays and count how many times numbers ...
27 views

### Python breakpoints in Vim (Vimscript)

I recently decided that putting strategically placed print statements scattered about my python programs to debug was getting to be a little messy. I had thought ...
20 views

### Django authentication against Exchange server

I wrote an authentication app for Django and my worry is primarily about the security of my app. My Django authentication app uses exchangelib to authenticate ...
21 views

### React To-Do App [on hold]

Github This is my first "real" React project, it's a simple to-do app with features like creating a new note with a timestamp, marking a note as done (this will add a timestamp to show when the note ...
269 views

### Compute all the permutations for a given vector of integers

The task is to compute all the permutations for a given vector of integers (but of course the specific integer type is not relevant for the solution) The strategy is based on recursion + iterations ...
34 views

### Insert into SQLite3 database

I have a tsv file containing the mapping for two kinds of identifiers. ...
10 views

### feedback needed on c# data access library for mongodb [on hold]

i just pushed out v3.1 of MongoDAL which is a simplified data access layer wrapped around the mongodb c# driver. the api is quite easy to use compared to the official driver. an example query would ...
8k views

### Inserting 100000 records to MySQL takes too much time

I'm using spring boot, hibernate any MySQL for reading 100000 records from csv file and write the same to the database. I'm doing the batch insert where the data is committed at intervals equal to ...
41 views

### Powershell for syncing Minecraft save files

My code in full plus the task scheduler definition: https://gist.github.com/DaneWeber/0c5e7978bd3927734173e3afdc3d6338 This is my first non-trivial PowerShell script. This was a pretty major learning ...
352 views

### Compiling and throwing simple dynamic excepitons at runtime

I often need a simple exception with a meaningful name and some helpful message which usually just look like this one: ...
12 views

### Similar to boggle game [on hold]

Need help to edit this code to allow user to find words in the grid that are touching horizontally, vertically, and diagonally adjacent. For example, the board: Q W E R T A S D F G Z X C V B Y U A ...
19 views

### How to make another function in a loop? [on hold]

Is there any way for for loop not to be repeated in every function which I make for seperate pages? Because I don't want for loop...
174 views

I'm currently writing an API to work with Bioinformatic SAM records. Here's an example of one: ...
47 views

### Generically call static methods

I currently have two (core) classes : ...
21 views

### Beginning C character array explanation [on hold]

I have been following along the book 'The C Programming Language' 2nd edition by Kernighan and Ritchie. The below code is an exercise from the book. What I am confused about in this code is the ...
70 views

### Find the smallest element in a sorted and rotated array

I was solving a question asked in interview by Uber. It says: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. Find the minimum element in $O(\log n)$...
133 views

### Endless Runner Platform Sequence

I need some help/critique on some logic I am trying to figure out. What I have feels a bit messy and I wanted to reach out and see if there is a better way to approach this. I am creating a ...
139 views

### Reading from and writing to a file without passing around filename

I was looking for a way to write to and then read from a file in different parts of my code, without passing the filename around and without consumers needing to know it was coming from a file. I ...
108 views

### Convert human readable string to TimeSpan

I want to pass time interval as a string (to program args) and then I want to parse it to TimeSpan. I created simple class: ...
21 views

I'm trying to make a login system for my website which I'll be releasing in public later on. I have inserted some main samples of my code in here and I would like some useful advise or suggestions. ...
8 views

### Export OLEObject to a folder

I got this code from "https://www.pcreview.co.uk/threads/how-can-i-output-the-file.2824299/" The code launches each and every OLEObject in the sheet in new image viewer window, i tried to loop through ...
116 views

### Helper class for Fragments management

A Helper class for Fragment Management. The FragmentsManager class has methods to add and replace fragments. The replace method checks if the given fragment is present in backstack or not and if the ...
51 views

### Substituting variable placeholders that may be intermixed with HTML tags

I needed to substitute variables of the syntax {FIRST_NAME} in a HTML template. The problem is that the template comes from a WYSIWYG system, and so the ...
56 views

### Unmanaged byte array to managed structure

I have a need to turn byte arrays into various structures. First version: ...
99 views
+50

### Golf Physics “Game”

Continuation of this post I wrote a program in pygame that basically acts as a physics engine for a ball. You can hit the ball around and your strokes are counted, as well as an extra stroke for ...
148 views

### HoloLens Unity program

I recently finished writing an HoloLens proof-of-concept program. It involves generating a user interface based on a connection with an OPC server. OPC involves industrial PLCs, one or more PLCs send ...
42 views

I'm new to C language and want to read a string line by line, I made this function and want to know what do you think about it, can I rely on it a production environment ? ...
122 views

### two integers one line calculator

I created this simple one line calculator for two numbers only where user can input any two numbers and and operator in between for example 20+45 and computer will return result of 65. ...