Top new questions this week:
|
I am trying to code Battleship. It should be a text one-player game against computer where computer and human player take turns in shooting at opponent's ships. I decided to start implementation with …
|
I've been programming for a few months now, and have used Stack Overflow a great deal, but this is my first post. Anyway, I wrote this code for Project Euler problem 75, and was curious if anyone knew …
|
Is there a way of writing this correctly working query more efficiently? I'm asking only to learn LINQ better:
var cpuInfo = edgeLPs
.GroupBy(k => k.CPU.ID, e => e.CPU)
…
|
I have the following C++ program:
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <vector>
void printVector (std::vector<int>& vec)
{
for (int …
|
I chanced upon this code written by the Solution Architect for a MS CRM project and I am lost for words. Am I going crazy or is this code OK?
string returnedOptionSetStringValue=string.Empty;
int …
|
The code checks many more conditions like the one below. I was thinking to memoize it, but I can't think about how (writers block). How else could I optimize this? I know it seems silly, but my code …
|
This is a function I just wrote that tries to condense a set of strings into grouped lines. It actually works, but looks ugly. Is there a better way to achieve the same thing?
Take 4 filtering empty …
|
Greatest hits from previous weeks:
|
Below is a C code to solve a sudoku using Backtracking.
#include <stdio.h>
int isAvailable(int sudoku[][9], int row, int col, int num)
{
int i, j;
for(i=0; i<9; ++i)
if( …
|
FileBro is a basic GUI based File Browser.
FileBro Functionality
Directory tree - shows the file system roots at start-up, but is otherwise built lazily as the user browses around the file …
|
Can you answer these?
|
I 've been working in PHP since almost three years ago. In these time i builded a framework as base for my projects.
I want it to be improved, and which other best option there are that use …
|
My goal is to have a reusable pattern for doing concurrent stream processing in Go.
The stream has to be closable from any node.
Errors should cleanly close the stream and forward the error to the …
|
I wanted to wrap the jkeymaster library in a Clojure wrapper (for my own use, but perhaps also to save others some time). I'm just learning Clojure so I'm still not quite sure what "idiomatic …
|