Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read
Code Reviews

Requests for reviews of existing code (must already work).

23 posts · Subscribe
77%
+5 −0
stpecpy(): Design a better string copy function

I was directed a few days ago to a post about a string copy function, which IMO improves the commonly known string copy functions, including strlcpy(3BSD), strlcat(3BSD), and strscpy(9). It define...

2 answers  ·  posted 10mo ago by alx‭  ·  last activity 24h ago by alx‭

60%
+1 −0
Implement translatable UI in a Single Page Application when working with ngRx

I am currently working on an Angular SPA that supports multiple languages and relies on ngRx for state management. Although the application state is handled by ngRx, the current language is stored...

0 answers  ·  posted 16d ago by Alexei‭

66%
+2 −0
Setting the authentication token in an Angular application for generated API clients

This is a post of mine from Code Review Stack Exchange which did not get an answer yet. I am developing an Angular application that consumes an external REST API. I am using OpenAPI generator (Typ...

1 answer  ·  posted 2y ago by Alexei‭  ·  last activity 5mo ago by Alexei‭

75%
+4 −0
A state machine in Python

I've written the following code implementing a state machine in Python, and I'd like some feedback on it. The basic idea is that each state has a set of corresponding actions that trigger a state ...

2 answers  ·  posted 6mo ago by celtschk‭  ·  last activity 6mo ago by Nick Alexeev‭

75%
+4 −0
Measuring the impact of using exceptions instead of return values in an ASP.NET Core application

Context This Q&amp;A from SO suggests that throwing exceptions is incredibly expensive when compared to returning values (return codes): that with return codes instead of exceptions the same pr...

1 answer  ·  posted 7mo ago by Alexei‭  ·  last activity 7mo ago by Dirk Herrmann‭

83%
+8 −0
Solving logical puzzle with negation and undefined aspects in Prolog

Assume this trivial logic puzzle which I have made up: There are three boys, Fred, John and Max. No two of the boys have the same age. Max is older than John. Fred is not the oldest one. Quest...

0 answers  ·  posted 7mo ago by Dirk Herrmann‭  ·  edited 7mo ago by Dirk Herrmann‭

81%
+7 −0
Detecting balanced parentheses in Python

The problem Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets are closed by ...

4 answers  ·  posted 1y ago by Vinicius Brasil‭  ·  last activity 8mo ago by Dirk Herrmann‭

71%
+3 −0
A class to access dicts using attribute syntax

I've written a class that allows to access dictionary entries of arbitrary dicts with appropriate string keys through attribute access syntax on an instance of the class. My questions are: Is...

2 answers  ·  posted 1y ago by celtschk‭  ·  last activity 8mo ago by luser‭

75%
+4 −0
Measuring arithmetic overflow checking overhead in C#

Overflow checking for integral-type arithmetic operations is disabled by default and it can be explicitly enabled by using using checked function or the -checked compiler switch. Since I mainly de...

2 answers  ·  posted 10mo ago by Alexei‭  ·  last activity 10mo ago by Derek Elkins‭

77%
+5 −0
Counting Sundays without Python datetime module

The problem You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All t...

1 answer  ·  posted 1y ago by Vinicius Brasil‭  ·  edited 12mo ago by hkotsubo‭

81%
+7 −0
A simple game with pygame

I've just started playing around with pygame and have written a small game in it, of which I'd like a review. Note that I'm not only a complete beginner in pygame, but I also have very little exper...

1 answer  ·  posted 1y ago by celtschk‭  ·  last activity 1y ago by Peter Taylor‭

75%
+4 −0
Counting number of assignments that a `fscanf` format strings implies

I'm writing a function that counts the number of assignments for a fscanf format string. I studied the documentation in C standard 7.21.6.2 It looks like it works. It passes all test cases I have w...

3 answers  ·  posted 2y ago by klutt‭  ·  last activity 1y ago by klutt‭

81%
+7 −0
Is this HTML sanitizer safe?

I wrote this HTML sanitizer for use in web scraping. The idea is to safely copy content from a site but apply my own style-sheet and remove any unsafe elements. This whitelist approach seems very d...

1 answer  ·  posted 1y ago by mousetail‭  ·  edited 1y ago by Peter Taylor‭

66%
+4 −1
BMPL: The language I'll bring to life

Last year, I started working on a language I named SuperCode but then decided BMPL (Builder's Multi-Purpose Language) as the final name. The language would be written using C and up until now, the ...

1 answer  ·  posted 1y ago by General Sebast1an‭  ·  last activity 1y ago by Lundin‭

66%
+2 −0
Shared hosting Apache PCRE .htaccess file for personal MediaWiki websites

A shared hosting based Apache PCRE public_html/.htaccess file for a website with the common features: MediaWiki based (most of the website interaction is backendish --- there barely are any fron...

0 answers  ·  posted 1y ago by deleted user  ·  edited 1y ago by deleted user

50%
+0 −0
PHP for simple HTML-PHP-CSS contact form --- aimed solely for RTL websites

As a non PHP programmer I have tried to program some basic PHP mail() function code to send Right To Left (RTL) contact form messages to my local email client (i.e. an email client which is affilia...

0 answers  ·  posted 1y ago by deleted user

66%
+2 −0
C# WPF MVVM View & Get new record values

Just looking to hear some reviews on my current MVVM Implementation, If I am heading towards the right direction. :) Code BaseViewModel public class BaseViewModel : INotifyPropertyChanged { ...

1 answer  ·  posted 2y ago by gzi98‭  ·  last activity 2y ago by FoggyFinder‭

80%
+6 −0
C# MVVM Login Project

I was wondering if somebody can review my code? I am creating a simple login desktop application, just to get used to the MVVM pattern using WPF. View &lt;Window x:Class="Login_App.MainWindow" ...

2 answers  ·  posted 2y ago by gzi98‭  ·  last activity 2y ago by Peter Taylor‭

60%
+1 −0
Are any downsides of hiding the actual Entity Framework Core DbSets and exposing only some generic methods?

I have recently started a project based on the clean architecture principle and noticed that it did not rely on generic repositories since Entity Framework's DbSets are doing the job just fine. In ...

0 answers  ·  posted 2y ago by Alexei‭

80%
+6 −0
PHP script to create a KML square centred on a point.

The objective here is to create a set of square kml coordinates centered on a point. I use this to create a square map centered on a mountain peak and then turn that into a STL that I can 3D print....

2 answers  ·  posted 2y ago by Charlie Brumbaugh‭  ·  edited 2y ago by Moshi‭

75%
+4 −0
Improved Atkin-Bernstein sieve for generating primes

This is a class from my personal code library, and from a package which deals with integer sequences. It implements an interface package org.cheddarmonk.math.sequence; public interface IntegerSequ...

0 answers  ·  posted 2y ago by Peter Taylor‭

60%
+1 −0
Cache data using Redis Cache in an ASP.NET Core 3.1 project

This is an unanswered code review request of mine from Code Review Stack Exchange. Overview I have developed a small ASP.NET Core 3.1 Web API that provides information that is rarely changed (sever...

0 answers  ·  posted 2y ago by Alexei‭

66%
+2 −0
Measure ASP.NET Core 3.1 Web API action execution times

This is basically an unanswered code review request of mine from CodeReview Stack Exchange. I want to be able to log as accurately as possible, the time spent by a certain Web API action in an ASP....

0 answers  ·  posted 2y ago by Alexei‭