Top new questions this week:
|
I am not happy with this code as I am sure there are better ways to do what I'm trying to achieve. I'm a beginner and I've used what I know to date to complete this.
import java.util.Random;
import …
|
I'm hoping to get some feedback on how to improve and optimise a program I wrote which takes three values as input (via the terminal) and uses them in the quadratic formula.
I'm aware this is mostly …
|
I am applying to a university to study Computational Linguistics, and as I read, it would be recommended to have a background in Artificial Intelligence.
The Admission board asked me to prepare a …
|
I've been working on a Sudoku solver as an introduction to the Java programming language. I know there's a bunch of ways to program a Sudoku solver, including a brute force/recursive approach and a …
|
I am slowly learning C and C++, and decided after a few lessons to dive in myself without any help. I developed this Prime Number generator. It seems fast, but I'm wondering if I'm following the best …
|
I have the below enum. I need to get the description by code. It is working but can it be improved still?
public enum Maps {
COLOR_RED("ABC", "abc description");
private final String code;
…
|
I am creating a class to be the end all defacto class for handling unit conversions. This is particularly difficult in my company's industry where imperial architectural strings are used as units. I …
|
Greatest hits from previous weeks:
|
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 LEFT(int …
|
I am looking for a more efficient or shorter way to achieve the following output using the following code:
timeval curTime;
gettimeofday(&curTime, NULL);
int milli = curTime.tv_usec / 1000;
…
|
Can you answer these?
|
I'm upgrading my project from YouTube's V2 API to their V3 API. I'm also taking the time to upgrade to Jasmine 2.0 since I already need to look at my test cases.
Here's a couple of test cases and the …
|
I was inspired to write a BBCode to HTML converter as I'm currently learning functional programming. I wanted achieve functional cohesion. jsFiddle
I'd like feedback on:
How to structure functional …
|
I need to extract some metrics from ManagedBeans and store the collected metrics in an object bean.
The object bean is defined with member variables to hold the metrics. In this case, is it right to …
|