@SimonAndréForsberg Since last time we spoke, I have ..... built a laundry, unpacked a container, been out of the country.... twice, built a box, been to a wedding, bought two cars, sold one, installed a driveway, and a pathway, planted some trees, dug some holes, and more.
@SimonAndréForsberg Without an hex editor, and not being able to see the difference, it took me that long. I have a validator that was dying on that string. And I had to investigate
I actually had a real life need (outside work, no less) to come up with every single permutation of N elements (the N in my case being 12, so a total of 12! = 479,001,600) and run each one against a simple evaluation to produce some metric in order to determine which permutation is the most optim...
You have only 1 reputation on Stack Exchange network, you were given access to this room explicitly in order to write (I'm not sure who did that, but someone did). Normally users need at least 20 reputation in order to chat anywhere.
At church yesterday, the question of the week was "How many sheep were supposed to be in the fold?" - referring to the parable of the 100 sheep, 1 lost.
This code put or change ID3 tags to media files based on their file names. It assumes the files are in this format:
morbid angel - maze of torment.mp3
The resulting tag would be:
Artist: morbid angel
Title: maze of torment
I used (boost::filesystem)[http://www.boost.org/doc/libs/release/libs...
http://www.commitstrip.com/en/2015/08/24/the-most-difficult-hello-world-of-your-life/ CommitStrip - Blog relating the daily life of web agencies developers The most difficult “Hello World” of your life CommitStrip 1440438738
I while ago I experimented with macros in C and came up with the idea of implementing a generic vector library using macros.
This code uses the non standard typeof extension that returns the type of an expression.
#ifndef VECTOR_H
#define VECTOR_H
#include <stdlib.h>
#include <string.h>
#defi...
In C++ the term vector comes from the "fact" that the list is a linked list, where it has a value (magnitude), and a pointer to "next" (direction). Over time, the concept has evolved so much it is hardly relevant any more, though.
For example, it's not really just a linked list, anymor.e
It's easy to look at numbers; numbers tell us that billions of developers have been helped by what we built. That alone is very warming and makes us feel exceptionally great about what we're doing, wouldn't it be nice to take a little time on a Friday to share some stories that the numbers can't ...
I took up the job to redesign a blog (wordpress using minamaze theme) - I thought it should not be too hard, until the employer asked me to change the language of the "Read More" button into a different language. I tried with the wp-admin tools with no success. After digging around on the Interne...
I took up the job to redesign a blog (wordpress using minamaze theme) - I thought it should not be too hard, until the employer asked me to change the language of the "Read More" button into a different language. I tried with the wp-admin tools with no success. After digging around on the Interne...
Jon Skeet isn't an expert at everything.
I've always seen excellent answers from Jon Skeet. He is a legendary contributor to the site. His answers always strive to explain the why behind the problem, and for someone like myself who strives to collect as much knowledge about their profession as...
> I have a bit of a problem with a "Setter" function. Setters don't return true. Setters just set a value, and don't return anything: a setter isn't a Function, it's an Action - an Action delegate that takes one parameter. Don't ask me the VB syntax for it though.
I admire your want to optimize your program, but right now the way you are asking your question lends itself to a broadness that seems as though you are looking more for a coding service, which SO is not. So I have to flag this post. This may be better for Code Review on stack exchange. — ThatGuyRussell28 secs ago
I've written a 'Mini Twitter' (that's what I've called it) in Python. It includes a text-based login screen and user panel where you can create Tweets, and change your username and password.
User's names, passwords and whether or not it is an administrator is logged in a text file. It also logs ...
It's not really clear why Odometer is a class. You only ever create one instance of it, and don't actually need any of the instance attributes. The only thing you could sensibly store as a class/instance attribute, the Geod instance, you actually recreate on every call.
Also, the error handling ...
This is a request for any who would like to review my processor kernel driver source code available in the GitHub
where intelfreq.c is the driver which reads CPU c-states counters every second ; and corefreqd.c aggregates them into performance ratios .
The key ideas are :
One kernel thread per...
I am looking for the best way of parsing JSON in Swift 2.0.
I have this JSON
{
"latitude": 37.8267,
"longitude": -122.423,
"currently": {
"time": 1440110395,
"summary": "Clear" // optional field
}
}
and field summary is NOT always visible in response.
My model object and pars...
This is a calculator I've made in C#.
namespace Calculator
{
using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
Dictionary<int, Func<double, double, double>> MyDict =
new Dictionary<int, Func<double, do...
with generic type constraints, you can also tell the compiler that any T in Smutf<T> is implementing interface IFoo, or is derived from FooBase - or any TEntity in IRepository<TEntity> is a reference type (i.e. a class)
Public Interface IViewModelControlMapping
End Interface
This is called a marker interface - an interface that does nothing. It's a design smell more often than not, because it's misusing interfaces to convey metadata. The .net framework has attributes for that; when you need metadata for a type...
@JeroenVannevel For example, say I defined the class TwoTuple<TItem1, TItem2> and I only want the types TItem1 and TItem1 to be int, long, or double. Is that possible?
Considering the popularity of this question and the interest behind such a function I am surprised to see that there is no answer involving T4 yet.
In this sample code I will demonstrate a very simple example of how you can use the powerful templating engine to do what the compiler pretty much d...