# All Questions

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

### HttpClient Wrapper for standardized API communication

This is our company's first attempt at an API and a mobile friendly web project, primarily we are desktop developers. We are using Identity Server 4 for serving up tokens and authentication, we have ...
70 views

### cleaning up c# code which connects to sql database using windows form

All I would like is for help with putting this code into separate classes as I cant seem to figure it out. I would just like to understand how this would be possible with this set of code. ...
37 views
+200

### Angular control for inputting latitude and longitude with validation

I've built a custom control to handle user input in a human-readable format, but save in a machine-format. It needs to have input validation, and to convert UI-input to a base format. I'm interested ...
24 views

### OOP parsing for DB dump XML Python

I am parsing large XML (DB dump). So, the content looks like many different objects with their properties and dependencies (foreign keys). My way to do it - using lxml.etree (iterparse): ...
60 views

### Iterator for traversing a tree

What I want to achieve is the following: ...
63 views

### High Performance Blocking Queue C#

I am developing a high-performance(real-time) system, it requires message passing between its component. speed and accuracy is at most priority. I have explored a few options. ...
37 views

### Not sending XML command with header via TCP/IP using Java [on hold]

This code is part of java application that I use for sending an XML command with a header to a server over TCP/IP. The server responds back with the XML data. I want to send XML request using the ...
79 views

### Min Heap Tree Implementation in python 3

I wrote a min-heap using a binary tree. How can I improve the time complexity of insert and delete function to be $\mathcal{O}(log(n))$? ...
2k views

...
20 views

### Spreadsheet to increment two levels of data indices

I'm posting this after reviewing the Meta Q&A, Non-code formula spreadsheet, and I believe I've got something here that meets the criteria there. Edit: I've added documentation of the formulas ...
26 views

### Google Foorbar - Prepare the Bunnies' Escape [closed]

I have been working on Google Foobar for a few days. I am currently stuck in the "Prepare the Bunnies' Escape." challenge. I have checked some earlier posts but it still could not pass the hidden ...
39 views

### Active Directory security groups Search application optimization

I have a Web API method that returns the Active Directory security groups for the specific login user. The below code was working fine but it was taking so munch time nearly 45 sec to get the results....
17 views

### AssertionError when using matplotlib errorbars [closed]

I have been really struggling to figure out why this code isn't working. I have a list of ufloat values(from uncertainties package), and I am trying to plot them with the uncertainties as the y-value ...
924 views

### Java code for scoring bowling

I've prepared a tenpin bowling scoring game in Java - https://github.com/chalcrow/DiusBowlingGame I'd like a critical review of the code to identify potential improvements. The code runs like this: ...
65 views

### Maximum element in Unique Path [on hold]

Problem Statement:- Max has a garden full of roses. He planted roses in a certain pattern of rows and columns. Say there are N rows and M columns. Max has to move from start to finish in a minimum ...
35 views

### Algorithm for building a string by appending and cloning substrings [on hold]

I have a problem where I need to construct a given string from scratch for a minimum cost by either: Appending a new character for a cost A Appending a substring of my existing string for a cost B ...
22 views

### Python image combiner reading writing

I am writing a simple script that will combine two images at a pixel level, selecting every other pixel from one image, and the other pixels from a second image. ...
31 views

### Codestyle - return a function call or capture it in variable [closed]

I already have some programming skills and I really love doing my code readable, well at least I try to. Recently I thought about some code snippets ...
56 views

### Anagram (Python, JavaScript)

Problem Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is a string that contains same characters ([A-Za-z0-9]) and the order of ...
11 views

### Create bar chart with descending order to missing data [closed]

Tried to create a bar chart with descending order to show continents with most missing HIV data. ...
15 views

### function of cin.get() in the following code? [closed]

I am confused about the purpose of the cin.get(c) that is inside the while loop. Moreover, how will the condition while ( c != '\n' ) be satisfied when we are not ...
44 views

### Converting an input of space delimited integers to a list

tablou = input("Enter values delimited by space: ") b = tablou.split() t = [] # initial list with int() contents for l in b: r = int(l) t.append(r) I ...
58 views

### StringBuilder: To Build or Not to Build

StringBuilder class is a common class that many have become accustom to, including me. An individual posted a question regarding if there was a comparable method in typescript. Several solutions were ...
52 views

### LeetCode 65: Valid Number (C++)

Problem Validate if a given string can be interpreted as a decimal or scientific number. Examples: ...
60 views

### Converting JSON to CSV with Javascript

I wrote the following function which coverts a JSON format into a CSV. I'll be glad to have a code review because I know that it could be done in a simpler way and with less lines and iterations. ...
44 views

### Optical dispersion calculation from spectrograms with Python

First, I'd like to provide a little explanation what's my code is supposed to do. It is part of a middle-sized project. I restructured the code to work on it's own, and also added little comments to ...
33 views

### A class and a function to create and light up buttons in PyGame

This is my first ever try at making reusable code. The function makes use of two images to give the illusion of turning on and turning off a button in pygame. I would like to know what would you do ...
67 views

### Extremely lightweight dependency injection

I need to have access to a set of common data inside a few functions. The data values are determined only at runtime, and are far away in terms of control flow, so handing them to the function as an ...
42 views

### Beginner tic-tac-toe implementation

I finally made tic tac toe as a beginner(took a month and a bit) and I want to know if I made things more complicated than they should. It seems like a lot of code for a simple game but I'm not sure. ...
37 views

### BST with node count

I took a simple BST implementation which is only really a set (i.e. just element, not key value), and decided to add a node count. I was translating this, which is explained here. In particular the ...
39 views

### better multiple fields validation on ruby/rails

I have a form for an item (Job Item), that has sets of 2 fields based on a type. field and field + _dolar e.g: ...
597 views

### LeetCode 65: Valid Number (Python)

Problem Validate if a given string can be interpreted as a decimal or scientific number. Some examples: ...
23 views

### How Do You Create a 2D Numpy Array out of a string [closed]

On project Euler 67 they give you this triangle ...
24 views

### Reactive, multi-step service method [on hold]

I've found many examples online of simple reactive services to do CRUD. I'm thinking about more complex services, specifically, what would be the best way to handle a "do A then do B then ..." method. ...
76 views

### Distance between two different sets of points, optimization

Before writing this post I looked around for a library that could solve this problem. I didn't find much so I decided to try to write this. My problem is the following: I have two sets of points with ...
23 views

### Should one stick to the convention in the Django documentation? [on hold]

The Django documentation and much other material structures a view function like this: ...
44 views

### Russian Peasant Multiplication Algorithm

For university, we have just started to learn C++ as a language, and one of our challenges to do in our spare time is to write an algorithm for 'Peasant multiplication'. In the challenge, we have been ...
70 views

### Displaying the total and average for an array input

I'm currently taking my first class for c++ and our current lab is asking us to: declare an array with a maximum of 100 integer display total of all the scores display the average of scores entered ...
73 views

### A custom String class implementation

This is my first implementation of a "container" using the Rule of Five, any feedback I'll gladly accept. I've tried to make it as Exception-Safe as possible. I've made it for an assignment. Header <...
35 views

### Stream wrapper for base 64 string

We have a scenario where we are receiving file as base64 string. This is not ideal and should be a binary stream. Because with file size memory utilization grows very rapidly as base64 representation ...
56 views

### Elegant way to add a value to a member variable inside a vector

I need to add an offset to a time variable inside my class. The code below works, how do i make it more efficient, and elegant. ...
43 views

### MaxProductOfThree in C#

This is my solution for the MaxProductOfThree from codility, it scores 100%, but I'm not a fan of the if if if structure it has going on. Task description ...
52 views

### Find mobile phone contact according to number typed

I am using the code below trying to replicate the mobile phone feature that displays one or more contact names according to the numbers typed. This code is intended to be used on a JavaScript course ...
43 views

### Chess game in JavaScript

I have created a chess game in JavaScript. Right now you can only play against another human. ...
29 views

### Implement Fibonacci range

I am implementing a Fibonacci range in C++17 such that it supports ...
60 views

### is there any way to make this javascript shorter but execute the same things (rock/papers/scissors/lizard/spock) [on hold]

So i wrote this javascript to link buttons to the respectfull function. but i was wondering if there is a way to write this shorter. i have to do it for computerscience but i have no idea on how to ...
43 views

### Python Rock Paper Scissors Game

Any chance people can read my game code and see if reformatting or rewriting is necessary for a better overall code? I'd really appreciate it. ...
8 views

### why docker run giving error? [closed]

I'm trying to build a docker image & run a container of it, need to run an app based on django webframework. Images builds without errors, but when am trying to run a container of it, it gives ...