Skip to content

Instantly share code, notes, and snippets.

View jmahoney's full-sized avatar

Joe Mahoney jmahoney

View GitHub Profile
@codescv
codescv / gist:6146378
Created August 3, 2013 13:04
bit vector (aka bitmap) implementation in C
#include <stdio.h>
typedef struct {
char* bits;
int size;
}bitvector;
bitvector* create_bitvec(int n_bits) {
bitvector* vec = (bitvector*)malloc(sizeof(bitvector));
int size = sizeof(bitvector) * ceil(n_bits/8.0);
@johnnyreilly
johnnyreilly / DemoAreaRegistration.cs
Last active October 29, 2019 13:43
What you need to unit test MVC controllers using MOQ.
using System.Web.Mvc;
namespace DemoApp.Areas.Demo
{
public class DemoAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{