Top new questions this week:
|
Description:
Bob is a lackadaisical teenager. In conversation, his responses are
very limited.
Bob answers 'Sure.' if you ask him a question.
He answers 'Whoa, chill out!' if you yell ...
|
(See the next iteration.)
I have this class for representing exact fractions. See what I have:
Fraction.java:
package net.coderodde.math;
import java.util.ArrayList;
import java.util.List;
/**
* ...
|
Problem:
Write a program that manages robot factory settings.
When robots come off the factory floor, they have no name.
The first time you boot them up, a random name is generated, such ...
|
I need a function to remove duplicated pairs from a list. The following is example list:
a = [1, 1, 1, 2, 3, 5, 4, 4, 5, 2, 3, 3, 2, 3, 1, 6, 6, 6, 6]
I need remove all pairs [a[i], a[i+1]] if a[i] ...
|
I tried to make a program to find a string whose MD5-hash starts like the digits of pi, where dot is omitted. Is there a faster way to do it than this:
import hashlib
import random
import string
n = ...
|
I wrote a C program that builds a social network graph of characters in a novel. The program takes two text files as input: a list of the names of the characters in the novel, and the file of the ...
|
I'm very new to Python, and so I'm trying to learn it by doing simple programs, like a calculator. But I don't know if this is the "Pythonic" way to do it, or if I am making beginner errors.
So ...
|
Greatest hits from previous weeks:
|
I was a TA for a first-year Java programming course this year. As a very simple example of iterables/iterators, I wrote the following code for the students. I am curious if any styling or other ...
|
I have made a basic calculator using methods. This is my first attempt at using methods and would like to see if I can improve on this as there is a lot of repeated code.
import java.util.Scanner;
...
|
Can you answer these?
|
Good morning!
I'm student in philosophy taking some course in programing in order to have a better understanding of artificial intelligence.
I'm actually doing my own Prolog compiler just like SWISH ...
|
I wrote a C++ implementation of a sparse table (I wrote it for an arbitrary function) and I want so much to ask for a review. I'd like to know how I can make it better, especially the consistency of ...
|
I wrote this wrapper around the UdpClient,using events for new datagrams:
Class EventedUDP
Implements IDisposable
Dim Client As Net.Sockets.UdpClient
Dim Endpoint As ...
|