Top new questions this week:
|
I decided to take on the FizzBuzz challenge with as twist that I would use Java 8 concepts to make it a bit modular, yet still let it be a short, readable and understandable program.
This in contrary …
|
This is my first time writing JAVA, and I'm trying to start off on the right track.
Using my C++ knowledge, I was able to understand the syntax for the ternary operator, but I'm not sure how it …
|
I have created a tool that lets me calculate the profitability of doing certain actions in an MMORPG game which I play, it's more edging towards a quick-and-dirty solution than towards a neat solution …
|
If we have a set of classes or structs such as:
struct Point
{
float x;
float y;
};
struct Square
{
Point topLeft;
float width;
};
struct Circle
{
float radius;
Point …
|
for (var i = 1; i <= 100; ++i) {
var fizzBuzz = ""
if i % 3 == 0 {
fizzBuzz += "Fizz"
}
if i % 5 == 0 {
fizzBuzz += "Buzz"
}
if fizzBuzz == "" {
…
|
Since this problem involves small numbers (particularly with a small loop count of 100), it's possible to ease the modulo operation setup by simply working with 16-bit and 8-bit registers:
[AX] …
|
I'm trying to clean up redundant old code, so I'm asking this general question. Since all iOS 7 devices have a front camera, would it be safe to remove the code to check if the device has a front …
|
Greatest hits from previous weeks:
|
I've been working a lot recently with SerialPort in C# and I've come up with the following class as part of a class library I'm working on for another program. My question is, are there any more …
|
I made a program in Python and wanted it to be faster, so I wrote it on C# because it's compiled. To my surprise, the Python program is much faster. I guess there is something wrong with my C# code, …
|
Can you answer these?
|
I have written this small little program, to test how my Fraction type behaves when used with and without a custom FractionFormatter - I've implemented two custom formatters:
FractionFormatter, …
|
I'm learning CUDA and wrote a little program which generates prime numbers using the Sieve of Eratosthenes. (I know the limitations of CUDA, specially with memory sizes and limits, but this program is …
|
There are quite a large number of existing implementatons of FizzBuzz but I awoke this morning in a cold sweat with the terrible revelation that Code Review had no FizzBuzz implementation in Forth! …
|