Top new questions this week:
|
I've seen many, many UoW+Repository implementations. Whenever one was built on top of Entity Framework, I'd cringe at the added complexity.
Sure the complexity buys you (sometimes) full decoupling …
|
Continuing my C++ saga, this is the third project for my CS1 class:
Buoyancy is the ability of an object to float. Archimedes' principle
states that the buoyant force is equal to the weight of …
|
A friend sent me this question, and I'd love somebody to review this and give his opinion.
Write an algorithm that counts the number of ways you can paint a
fence with N posts using K colors …
|
What is a good way to compose std::function objects in C++?
I tried the following, and it seems to work well:
template<typename ... Fs>
struct compose_impl
{
compose_impl(Fs&& ... …
|
The code below works & as far as I can tell the result is correct. Would you please review and let me know what I could have done better?
I tried to use variables as much as possible, that way it …
|
I've written some code that uses a SortedDictionary to count the number of occurrences of a character in a string.
How can I improve this code? What should I be doing differently? Any advice at all …
|
This is my first attempt at a programme. Is it good form? Does it follow best practice? Or am I completely off the mark?
#include "stdafx.h"
#include <iostream>
#include <string>
…
|
Greatest hits from previous weeks:
|
is there a more elegant way to solve this problem?
List<String> paramList = new ArrayList<String>( );
paramList.add( "param1" );
paramList.add( "param2" );
StringBuilder result = new …
|
For a while I have been interested in seeing if some tasks work well when split across multiple threads.
On the one project I have been busy with I have been creating a lot of small utility apps, to …
|
Can you answer these?
|
I have several large numeric vectors (close to 1e6 entries each) and I need to make some computations with their values:
iters=100
iters2=100
set.seed(91)
sampleSubset<-sample(1:1e6, iters)
mR12 …
|
I have written two queries for searching, but I want to simplify them as it seems needed.
def searching(term: String): List[String] = {
DB.withConnection { implicit c =>
var list = …
|
cout << format(
"%? %?!\n" // Hello world!
"%1% %3% :)\n" // Hello again :)
"%%05X: %05X\n" // %05X: 01234
"%%g: %g\n" // %g: 3.14159
"%%.3f: …
|