Top new questions this week:
|
I needed a better way to benchmark code, because, well, rewriting the same benchmarking code every time I need it is just...well...unpleasant.
So, here's a class which does just that, it runs an ...
|
I need to speed up this code so it can handle inputs in the thousands. It adds triangular numbers to a list based on input n, then it loops through to find if any two consecutive numbers squared in ...
|
I wanted to get some stats on who has done the most edits on Code Review, so I wrote the following query on SE Data Explorer. All improvement suggestions are welcome.
Note that I used a cursor to ...
|
Part of a project I'm getting started on requires access to the Stack Exchange API for certain data, as a result I built a .NET implementation to interact with it.
The implementation is pretty ...
|
As a first step in learning Haskell I am solving this problem, which involves finding the Rith-ranked numbers, given some input list and many Ri. In an imperative language I would make a zeroed array ...
|
I've been working on this pong game for the last 10 days, and I'd like to know of your opinions about it, what could I change to make my code better?
#include <stdio.h>
#include ...
|
My code prints the next 20 leap years:
def loop_year(year):
x = 0
while x < 20:
if year % 4 != 0 and year % 400 != 0:
year +=1
##print("%s is a common ...
|
Greatest hits from previous weeks:
|
The use case is to convert an array of objects into a hash map where one property is the key and the other property is the value. Common case of using this is converting a "link" object in a ...
|
This is my version of the Snake game, written in C++. How could it be improved, and what general advice would be useful for future projects?
#include <iostream>
#include <conio.h>
void ...
|
Can you answer these?
|
The method toggle of Element.classList expects a parameter which names a CSS-class.
You can't assign multiple classes at once by using for example an array.
So you have to write something like ...
|
I'm new in OCaml and just want to be sure that I write code in "ocaml way". My other first programs in OCaml was imperative and looks like python-code. So I decided to write simple code and share it ...
|
I've been working on a simple command-line png2jpeg utility. Its purpose is to convert images from PNG format to JPEG.
The source code requires the libpng and libjpeg development libraries to be ...
|