Top new questions this week:
|
Just trying out my T-SQL foo.
Wrote a script to get the average time (in seconds) to first answer for a specified language.
-- Could not get this so that the user entered
-- the language in a box at …
|
I have written two code pieces of to find if a given string is a palindrome:
public static bool FirstMethod(string str)
{
int i = 0;
int j = str.Length - 1;
while (i<j)
{
…
|
I'm writing a console application where I need to provide detailed error messages in case anything goes wrong. As a result of this, I find myself splitting up my code into many pieces and making sure …
|
I have been wanting to learn programming for some time now and decided to really give it a shot today. I have edited and read lots of things in Java to fix small issues but never written from scratch. …
|
I've decided that I want to take a stab at test first programming. So, before I tackled writing an isPrime function, I wrote this unit test. It's my first and I'm not sure I'm doing this right.
I was …
|
Is using a static variable in a lambda function ok, or considered a bad practice? The code below works as intended (fills a vector with consecutive numbers).
#include <iostream>
#include …
|
I am building a simple adventure game that has "upgrades" feature.
In this game, user controls one player, that can be upgraded to increase things such as:
Amount of gold earned
Maximum health
…
|
Greatest hits from previous weeks:
|
I have written this code to search for a string in a .txt file. Is it possible to optimize the code so that it searches for the string in fastest manner possible? Assuming the text file would be a …
|
I have the following .click() functions:
$('.tab').click(function(){
$('.tab').removeClass('activeTab');
$(this).addClass('activeTab');
});
$('.edit').click(function(){
$(this).hide();
…
|
Can you answer these?
|
Here's a partial binomial heap implementation in Haskell (just merge and insert):
module BinomialHeap where
data BinomialTree a = Tree { key :: a
, order :: Integer
…
|
One thing nagged me about the compass vertical rhythm module; in the case the headline is too long and it occupies more than one line the line-height between the two lines looks way too massive and …
|
This is my first SQL post over here, and in fact, I have more or less the experience of a regular SQL programmer, except that the task at hand this time was way harder than normal.
I am expecting, …
|