Top new questions this week:
|
Assume I have the following list (List<string>)
G
G
M
T
I'd like this to be in an order where the same letter will not occur twice, such as
G
M
G
T
(I appreciate other variations would also …
|
I have this basic Java code to find average of eight immediate neighbors of a matrix.
Is there any way to simplify or merge any part of it, or can I refactor it?
I'm a beginner in Java programming …
|
As an exercise, I decided to create a simple Tic-Tac-Toe game. It is Ruby on Rails based, but as for now I'm not using the server side for anything (I intend to build up on it in the future, though).
…
|
Below is the code that I've written for matrix multiplication:
import java.text.DecimalFormat;
import java.util.InputMismatchException;
import java.util.Scanner;
public class MatrixMultiplication {
…
|
Is this a good approach or is there some other solution that I am not aware of?
//C++ program to count number of words in text file
#include<fstream>
#include<iostream>
…
|
I've just finished creating this form validation but I want to make it public for beginner 'contact us forms'.
I was wondering if I can have some peoples' input on if they can understand/read my …
|
Inspired by some older questions, I decided to create my own postfix calculator using Java 8. I'd like to have all aspects reviewed.
public enum Operator implements DoubleBinaryOperator {
PLUS …
|
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 wrote a solution to the Knapsack problem in Python, using a bottom-up dynamic programming algorithm. It correctly computes the optimal value, given a list of items with values and weights, and a …
|
Can you answer these?
|
I am running my shell script on machineA which copies the files from machineB and machineC to machineA.
If the file is not there in machineB, then it should be there in machineC for sure. So I will …
|
I've been writing far too many routines in JavaScript that get a record from a an object or array based off a matching property, much like jQuery does with DOM elements. Since all the good names are …
|
I am wondering if I have overdone it with repositories in the following code, which is to save a sales order.
I understand that the purpose of a repository is to decouple the domain layer from the …
|