All Questions

2
votes
0answers
10 views

Password validator making zxcvbn easy to use with Django

This is a translatable password validator for django, based on zxcvbn-python and available with ...
3
votes
1answer
16 views

CareerCup (Bloomberg): Check if string is valid based on brackets

The goal of this problem is to determine if a string with brackets is valid. Below is a summary of the question from careercup. Check if string s is valid based on brackets ...
1
vote
2answers
13 views

Regex version of strip() - Ch. 7 Automate the Boring Stuff

Here is a practice exercise — Regex version of strip() \$-\$ Write a function that takes a string and does the same thing as the ...
2
votes
0answers
31 views

A simple TCP command executer

In https://github.com/pc-magas/tcp_command as an attempt to learn C++ I made a simplistic TCP server in GNU/Linux that will receives simple "commands" in ASCII form. Each command ends with '\n' and a ...
3
votes
0answers
8 views

Convert to and from variable length quantities

As part of small MIDI library i've implemented the conversion of a VLQ (variable length quantity) for byte[] -> bigint and ...
1
vote
1answer
33 views

Parsing Game Entities

Could use some help with my presentation in Software Development. I'm presenting how I reworked a game's parser (SpaceTaxi). Basically we take in a .txt file with ASCII characters and convert them ...
2
votes
2answers
30 views

Simple calculator in Object-oriented JavaScript

There is a simple form which takes two numbers num1, num2 and an operation op. After ...
2
votes
0answers
29 views

Find sum of neighbors in a 2D array

Write a function that takes 2 inputs: a matrix, for example 2-dimensional array, and indices, for example [row, col] This function should return the sum of all the second input's neighbors (up, ...
2
votes
0answers
20 views

CV written in LaTeX

I've created a CV eager for corrections. Once it is properly written it'd be converted into a template, in order to share it with the community. Can you suggest some starting corrections or ideas? (I'...
1
vote
0answers
15 views

Using Curl/Post to execute a HTTP request

I have a loop in a php file to HTTP_Request Server Via CURL->POST. But I don't know if I'm missing any security considerations. Also, is there a better way to perform this http request? ...
-1
votes
0answers
8 views

System.InvalidOperationException(An exception was thrown while attempting to evaluate a LINQ query parameter expression) [on hold]

I don't know what's wrong with my LINQ query, everything looks fine but I got above error on the following code: if (!dbcontext.AndroidUser.Any(user => user.Equals(value.UserName))) Here's my complete ...
9
votes
0answers
26 views

Continuous Fourier integrals by Ooura's method

I have a PR implementing Ooura and Mori's method for continuous Fourier integrals. I used it here to compute an oscillatory integral that Mathematica got completely wrong, and then I thought "well ...
2
votes
2answers
69 views

Fantasy game inventory — Ch. 5 Automate the Boring Stuff

Here is a practice exercise — Fantasy Game Inventory \$-\$ You are creating a fantasy video game. The data structure to model the player’s inventory will be a dictionary where the keys are string ...
1
vote
0answers
15 views

Java: Hashing array of strings as Merkle tree in one function

I want to hash array of strings into one hash as shown on scheme on image below. But I do not want to implement some class based merkle tree. It's just a simple function. Is this a good implementation ...
8
votes
1answer
188 views

Credit card validation in C

I am relatively new to C programming and I am currently working through the CS50 EDX course. The problem I have solved below is for week 1 (credit). Any suggestions on how to improve this code to ...
2
votes
1answer
12 views

Showing a “back-to-top”-button after scrolling a certain amount

I have a "back to top"-button on the page, It should be visible after the user has scrolled a certain amount*. This means I have to add or remove a class active ...
4
votes
2answers
168 views

Object-oriented design implementation of an Elevator

I am a newbie when it comes to Object Oriented Programming and I have read a lot of online articles and lessons so I want to try it out on my own. I've written a console app in C# and tried ...
-2
votes
0answers
21 views

How's my SceneManager? [on hold]

0 I looked up a few tutorials and made my own from a mish-mash of them. I ask because, I tend to find out that there's a far better was that won't come back to bite me later on. What I do is store ...
10
votes
3answers
508 views

Explicit song lyrics checker

To stay in practice with my Python I've decided to write an explicit song checker. It checks each word in the song against an array of 14 explicit words contained in the text file. I've decided not to ...
1
vote
1answer
21 views

Adding elements of 2 linked list in reverse order

I solved a problem with JavaScript which has the following requirements: Two non-empty linked lists representing two non-negative integers. Digits stored in reverse order Each node contains a single ...
3
votes
0answers
29 views

CUDA matrix class

I started to work on this CUDA C matrix class to learn both the object oriented programming in C++ and to learn CUDA. The initial goal of this project was to make a matrix class that can have almost ...
0
votes
0answers
3 views

Companion object and static functions in kotlin [on hold]

Is it good idea to define static functions as compananion object in Kotlin under util nd use this way... ...
1
vote
0answers
31 views

Make a bmp mirror image in C [on hold]

I have been trying to make a mirror image of a 24 bit bmp in C, but when i start the program the image gets distorted. I have a structure for getting image width, height and all that works fine. I ...
1
vote
1answer
28 views

Thoughts on using curly-brackets-less while loop with a try/catch? [on hold]

I need to fetch data from an server that isn't always reliable and unfortunately fixing that is out of my hands. My team determined we would attempt the request up to 3 times. So I thought of using a ...
2
votes
1answer
45 views

Coding Challenge: Return The Smaller String

A coding challenge in which we are to write a function that compares two strings and returns the one that is smaller. The comparison is both lexicographical and numerical, depending on the content of ...
2
votes
0answers
30 views

msmq bulk send in c# [on hold]

Please review the code below and provide constructive feedback to improve. Multiple threads call the SendMessageToMSMQ method to send messages to a msmq queue. ...
1
vote
0answers
12 views

Select splat in a subquery [on hold]

Obviously, 'select *' is never a good idea. HOWEVER, I have taken a job with an org that allowed this cancer to spread. They have huge queries, using ...
2
votes
0answers
6 views

Thread safe Shareable and Splittable Buffer with Safe Memory (Project)

Backstory This is a buffer I wrote for use in multiple personal projects. It is designed to handle pretty much any data in pretty much any way. In particular I intend to use it in such instances as ...
2
votes
2answers
40 views

Minimizing a file path

I have a simple program that "minimizes" a file path. Minimizing simply means replacing unnecessary file entries with entries that mean the same thing: ...
-2
votes
0answers
23 views

Fixing storing a backup and adding items Python [on hold]

I'm trying to fix some methods such as "restore a backup" in my public library system.. But I've been stuck for weeks. Can someone help me out? The code is below, but it's a lot. Not that complicated ...
4
votes
1answer
37 views

Java Mandelbrot Set Viewer

I'm writing my own version of a Mandelbrot set generator, with pan and zoom functionality. (There's not yet a color overlay of sets generated with various beta values; the beta value is changed ...
4
votes
0answers
25 views

Sandbox file system for Java

I've recently started work on a hobby project that's basically a sandbox file system written in Java, slightly inspired by PhysicsFS. The point of the project is to separate what files a user can read/...
3
votes
0answers
28 views

Alternative for VLOOKUP/Index-Match in VBA

I am sharing this function I wrote with the community to provide an alternative to slow VLOOKUP and/or Index-...
4
votes
1answer
41 views

Collecting all relevant data from xlsm files

Is there a way to speed this guy up? The code is designed to go into a directory, open up all of the .xlsm files in the folder, and copy specific data into a target file. This code works as is, but it ...
-3
votes
0answers
27 views

Absolute difference of sum of diagonals in a square matrix [on hold]

WHY IS THIS NOT WORKING? Please review this code ...
1
vote
1answer
46 views

Should I re-throw exceptions within a method, or is there a better way to handle it? [on hold]

When handling errors in C#, is it acceptable/appropriate to re-throw exceptions that are caught in a try/catch? My scenario is that I am making an HTTP request and ...
0
votes
2answers
37 views

(Leetcode) Valid parentheses

This is a Leetcode problem - Given a string containing just the characters '(', ')', '{', ...
5
votes
2answers
59 views

Character Picture Grid exercise - automatetheboringstuff

Regarding the Character picture exercise located at the end the following page: https://automatetheboringstuff.com/chapter4/ Say you have a list of lists where each value in the inner lists is a ...
6
votes
2answers
64 views

Positive cumulative sum of difference

I have a water reservoir with input and output rates. I want to determine when the input is exceeding the output by a certain constant. To accomplish this, I need to cumulatively sum all cases where ...
1
vote
0answers
17 views

Webshop Conversion - Binary testing is not even

Everytime a new visitor comes to my webshop I write a cookie (1d) which sets a session entry with mt_rand(1,2) to A or B group. ...
2
votes
0answers
15 views

Two CSS grids side by side, one is scrollable, the other isn't

I've made a section of my site to have two grids side by side. On the left-hand side is one big static (sticky in my case) image, on the right-hand side is a (grid) long column of several other images,...
6
votes
2answers
85 views

Class to generate a pdf invoice

I am learning to work with OOP design patterns and so I challenged myself with the idea of creating a way to generate a pdf invoice based on some information entered. So, this is what I have done so ...
2
votes
0answers
27 views

Parsing Long Excel Report Files for Predefined Results

I work as an IT intern in a multinational and I was given a tedious task of combing through a 2500+ long multi-column excel report file in search of inactive servers. Here's a sample row from that ...
6
votes
1answer
22 views

Updating generated file

With this algorithm I update an automatically generated verilog-file. The update within this file is done by commenting the assigned wires to specific ports of module instances. Is there a better, ...
2
votes
1answer
36 views

Most efficient way to check if user is allowed to update an object

So I have an user which can create his own Locations. I implemented a webservice in order to add and update locations. If the user is not the owner of the location i want to throw an appropriate ...
1
vote
2answers
35 views

Leetcode 15 - 3 sum

This is a Leetcode problem - Given an array nums of n integers, are there elements \$a, b, c\$ in ...
0
votes
0answers
9 views

Wrapping table text JavaFX [on hold]

columns[i].setCellFactory(new Callback, TableCell>() { @Override public TableCell call(TableColumn arg0) { return new TableCell() { private Text ...
-4
votes
0answers
29 views

Simple Tic Tac Toe python finish [on hold]

I'm a beginner in programming and I'm trying to make a tic tac toe program, but I have no idea on how to finish it. I like it simple, but interactive. Any tips? ...
2
votes
0answers
15 views

Whiten black contours around a skewed image

I have this image: I want to whiten the black contours (borders) around it without affecting the image content. Here is the code I used: ...
2
votes
1answer
36 views

Prioritize objects using PriorityQueue and custom comparator in Java

I have a list of objects and a query. I need to rank the objects, based on how do they match the query. A object would match the query 100% if it contains all properties in the query. My program ...

15 30 50 per page