Top new questions this week:
|
From Rosetta Code:
The Archimedean spiral is a spiral named after the Greek mathematician Archimedes. It can be described by the equation:
$$r=a+b\theta$$
with real numbers \$a\$ and \$b\$.
...
|
The goal of this code is to print the entity tree of a VHDL project. There are a readme and very minimal tests on the github repo.
I am trying to refactor the code to use generators in order to ...
|
I have a few of files, and total size of them is more than 5 GB. Each line of the files is a IP address, looks like:
127.0.0.1 reset success
...
127.0.0.2 reset success
how can i find ...
|
This code prints out a list of all the possible sums that can be made from a set of cash.
For example, say you have 2 fives and 2 tens in your wallet. With these, you can make exact change for $0, ...
|
It's my implementation. Can I get some opinions on it?
import random
import os
import time
class Game:
def __init__(self, turns, w, h):
self.board = []
for x in range(0, h):
...
|
After reading a certain question on the Stack Overflow website, I tried to write a solution to the problem just for fun. I'm, however, left with the nagging feeling there is a beautiful one-liner that ...
|
This code is supposed to search for a specific key in a object or an array or a mix between both. Is there anything I can improve?
function getAllObjectsIn(key, data, casesensitive){
var ...
|
Greatest hits from previous weeks:
|
I was recently given a coding test to complete for a potential client. It was a FizzBuzz-type of thing with a two-hour time limit. I had a request to write basic FizzBuzz, then add a special case, ...
|
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?
|
I tried to follow the generator pipeline style (see David Beazley's famous presentation) for finding duplicate files (similar to answers here). It seems pretty straightforward with MapReduce, so I ...
|
I had a task to create simple audio player.
So far I managed to do functionalities and all that is needed.
Other part of same task was to make it semantic and modular.
I read some blog posts and ...
|
Here is my crappy clone of Atomas, a puzzle game where you combine small atoms into more valuable ones.
# Pytomas (an Atomas build for Python)
# Author: Qwerp-Derp
from random import randint
# ...
|