Skip to content

Instantly share code, notes, and snippets.

View gmbeard's full-sized avatar

Greg Beard gmbeard

  • Rochdale, UK
  • 21:27 (UTC +01:00)
View GitHub Profile
@gmbeard
gmbeard / zero_padded.cpp
Created September 17, 2015 14:36
Parse zero-padded number
#include <iostream>
#include <string>
#include <stdexcept>
int main(int, char *[])
{
using std::string;
using std::cin;
using std::cout;
using std::endl;
@gmbeard
gmbeard / test.js
Created January 22, 2015 10:57
Testing prototype inheritance in Chrome v8
"use strict";
var c = new A_Child();
c.methodA();
c.methodB();
@gmbeard
gmbeard / gist:23c77114cd4c1bc3103d
Created January 5, 2015 19:43
Chaining std::bind to perform arbitrary searches of custom types using std::find_if
#include <iostream>
#include <functional>
#include <vector>
class Item
{
private:
std::string m_ItemId;
int m_Price;
int m_Count;