Top new questions this week:
|
I have the following Java class:
import java.util.Random;
public class RandomNameGenerator {
private Random rand;
private static String[] prefixes = { "Ultimate", "Bloody", "Crooked",
…
|
I wrote this code to show how wrong I was about Random Number Generators.
Context:
From Comments to this answer to Regularity in the "Rusty Towel of Mutual understanding"
that isn't …
|
The fourth project, continuing my C++ saga with terrible post names. :P
An approximate value of pi can be calculated using the series given
below:
$$ \pi \approx 4 \left[ 1 - \dfrac{1}{3} + …
|
I have this rather ghastly if statement and I'm sure there is a way to condense it, but I don't really know how. I was told a case statement would work but I've never used a case statement and I'm …
|
This is a multiplayer bowling simulator in Ruby. It allows for variable skill levels, and produces weighted random results for each roll based on those skill settings. The methods are grouped in four …
|
Please look over my new object-oriented version of my Hangman game I posted here about two weeks ago.
I know I should work more on commenting and be clearer and more descriptive of the methods and …
|
Recently, I had a test and I wrote this code, but they didn't like my code because it was "deplete and nested".
In order to improve my skills, what would be good ways to make this more readable and …
|
Greatest hits from previous weeks:
|
I want to search through an array of n numbers and find the numbers that are repeated. So far I have this code, which does the job, but I find it to be a rather cumbersome method, but I can't seem to …
|
Is this the correct implementation of Heap Sort using Java? How can it be improved further?
import java.util.Arrays;
public class HeapSort {
public static int heapSize;
public static int …
|
Can you answer these?
|
I have written a code for a project which aims at finding the Cox regression coefficients in a mixed model for microarray data. The study was carried out on the Affymetrix Hgu133a platform. In the …
|
This is my first time using Unity so bear with me for a moment. I have a sample Visual Studio 2012 solution with 4 projects (but only two of these projects will be used with Unity). This is the …
|
I've implemented for the first time Doctrine-ORM on my SOAP server application; can you tell me if I could optimize some of the written ORM-related code?
More specifically, is it a good practice to …
|