Code Review Stack Exchange Community Digest

Top new questions this week:

std::array based push-only circular buffer

Minimal implementation of a circular buffer based on std::array, where elements can only be pushed and iterated. I'm interested on potential failures and very trivial optimizations, as I'd like to ...

c++ array circular-list  
asked by Sdra Score of 6
answered by G. Sliepen Score of 6

A probability distribution function, to be called repeatedly during numerical integration

I am trying to speed up as much a possible this function in C++. As I explained in another post, Implementing multidimensional integral for a custom function in C++, this function will be used inside ...

c++ performance statistics numerical-methods  
asked by CafféSospeso Score of 4
answered by harold Score of 5

improved "tee" utility

We have modified the tee program with your suggestions from the previous pull request. Did I implement well? I would like to optimize the program even more, what ...

c reinventing-the-wheel linux io posix  
asked by Mike Score of 3
answered by pacmaninbw Score of 2

Calculate the first largest factor of 600851475143

┘ŹProblem description: The prime factors of 13195 are 5, 7, 13 and 29. Largest prime factor 13195 is 29. What is the largest prime factor of the number 600851475143 ? Prime Factor: any of the prime ...

python programming-challenge primes  
asked by Amir Motefaker Score of 3
answered by Joffan Score of 3

Playing a game of ConHex in Python

Background ConHex is game by Michail Antonow where two players try to create a connected chain of cells from one side of the board to the other side. They do this by claiming one empty position each ...

python python-3.x game  
asked by agtoever Score of 3

Kosaraju's algorithm in C simple implementation

I am wondering can I please get some feedback for my simple implementation of the Kosaraju algorithm. More specifically how I de-allocate the things I allocated using ...

algorithm c graph  
asked by Node.JS Score of 3
answered by chux - Reinstate Monica Score of 3

Calculate average of each line of input

I made a program that will loop and calculate the average of the input given by the user. There are no problems here. I just want to know if there is a better way to do this, or a way to optimize this ...

c  
asked by manungsa Score of 3
answered by Toby Speight Score of 3

Greatest hits from previous weeks:

Update only modified fields in Entity Framework

I'm working on a website on ASP.NET MVC4 and EF5. I want to ensure that only modified values are updated in the database. I'm using a unit of work pattern and repositories for data work. Here's the ...

c# entity-framework asp.net-mvc-4  
asked by Narayana Score of 35
answered by Max Score of 30

Python username and password program

Can the following code be simplified? I think that the program that I have created is very excessive and quite slow. The program runs fine, but I would like to understand if this could actually be ...

python beginner python-3.x authentication  
asked by Greg Score of 10
answered by Quintec Score of 11

Tiny text adventure

I made a small text adventure. I'm not trying to make it appealing to anyone, but rather just to practice my Python skills. I am fairly new to Python and this was my next step after making a console ...

python optimization beginner adventure-game  
asked by Elliott Rhys Score of 14
answered by rreillo Score of 16

Snake game using PyGame

I wrote a simple Python snake game which is about 250 lines of code. Can someone give me some advice on how I can refactor/make it better? game.py ...

python array pygame snake-game  
asked by Ryan Score of 26
answered by Gareth Rees Score of 28

Count number of each char in a String

I know there is a simpler way of doing this, but I just really can't think of it right now. Can you please help me out? ...

java strings  
asked by statius Score of 17
answered by Marco Acierno Score of 35

Postfix evaluation using a stack

I just wrote the code to evaluate a postfix expression and would like it if someone reviews it for me, it works perfectly fine but I'm having trouble adding the character "=" at the end. ...

java stack math-expression-eval  
asked by Scarl Score of 2
answered by Simon Forsberg Score of 2

Python Tic Tac Toe Game

I made this as a personal challenge. It seems to work fine as I can't find any bugs and am happy with how it runs, but I am interested in what I should do to make the code more professional. I think ...

python tic-tac-toe  
asked by Joseph10545 Score of 8
answered by 200_success Score of 6

Can you answer these questions?

Plot a 2D vector field with radial symmetry in Python

I computed a 2D vector field U = (u(x,y), v(x,y)) with radial symmetry, parametrized as (u,v) = a(r) (x,y) + b(r) (-y,x), where a(r), b(r) are given as solution of an IVP which I solved using ...

python matplotlib data-visualization  
asked by Max Score of 3

Multithreaded tcp server accepting two clients with task factory and graceful shutdown

as an exercise from multithreading and networking I have decided to create my own implementation of TCP server accepting connections from two clients (which is I think a pretty common case e.g. chess ...

c# multithreading networking tcp  
asked by Artur Score of 1

Algorithm for solving `subsequence with highest win rate`

Problem Inputs: 1. min length of subsequence 2. binary sequence outputs: 1. starting index of sequence 2. subsequence length The task is to find a subsequence ...

algorithm rust  
asked by Hamza Zubair Score of 2
You're receiving this message because you subscribed to the Code Review community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038

<3