This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc b/compiler/cpp/src/generate/t_cpp_generator.cc | |
| index 9b960bf..a4ce754 100644 | |
| --- a/compiler/cpp/src/generate/t_cpp_generator.cc | |
| +++ b/compiler/cpp/src/generate/t_cpp_generator.cc | |
| @@ -1586,7 +1586,7 @@ void t_cpp_generator::generate_service(t_service* tservice) { | |
| if (gen_cob_style_) { | |
| f_header_ << | |
| "#include <thrift/transport/TBufferTransports.h>" << endl << // TMemoryBuffer | |
| - "#include <tr1/functional>" << endl << | |
| + "#include <functional>" << endl << |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| dir=$(dirname $0) | |
| gconfdir=/apps/gnome-terminal/profiles | |
| echo # This makes the prompts easier to follow (as do other random echos below) | |
| ######################## | |
| ### Select a profile ### | |
| ######################## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sqlalchemy import create_engine, MetaData, Table | |
| from sqlalchemy.orm import sessionmaker, scoped_session, create_session, mapper | |
| from sqlalchemy.sql import exists | |
| db_engine = create_engine(DATABASE_CONNECTION_INFO, echo=False) | |
| metadata = MetaData(db_engine) | |
| DBSession = scoped_session( | |
| sessionmaker( | |
| autoflush=True, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2012. Matt Tierney. BSD Style License. | |
| // Author: [email protected] (Matt Tierney) | |
| #ifndef _QUEUE_H_ | |
| #define _QUEUE_H_ | |
| #include <ctime> | |
| #include <deque> | |
| #include <pthread.h> | |
| #include <sys/time.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSString *image_path = [[NSBundle mainBundle] pathForResource:@"koi" ofType:@"jpg"]; | |
| NSFileHandle *image_fh = [NSFileHandle fileHandleForReadingAtPath:image_path]; | |
| NSData *buffer = [image_fh readDataToEndOfFile]; | |
| NSString *base64_image = [QSStrings encodeBase64WithData:buffer]; | |
| NSLog(@"image %@.", [base64_image substringToIndex:25]); | |
| NSString *password = @"cryptogram"; | |
| NSString *sjcl_command = [NSString | |
| stringWithFormat:@"sjcl.encrypt(\"%@\", \"%@\");", | |
| password, base64_image]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| brew install python boost exiv2 | |
| curl -O http://launchpadlibrarian.net/61465005/pyexiv2-0.3.0.tar.bz2 | |
| tar xjvf pyexiv2-0.3.0.tar.bz2 | |
| cd pyexiv2-0.3.0 | |
| # https://answers.launchpad.net/pyexiv2/+question/140742 | |
| echo "env['FRAMEWORKS'] += ['Python']" >> src/SConscript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import time | |
| from random import randint | |
| from neo4j import GraphDatabase | |
| path = '/home/tierney/Downloads/neo4j-community-1.7/data/graph.db' | |
| _NUM_NODES = 1000000 | |
| db = GraphDatabase(path) | |
| def load(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: setup.py | |
| =================================================================== | |
| --- setup.py (revision 435) | |
| +++ setup.py (working copy) | |
| @@ -16,7 +16,7 @@ | |
| PYV8_HOME = os.path.abspath(os.path.dirname(__file__)) | |
| BOOST_HOME = None | |
| BOOST_PYTHON_MT = False | |
| -BOOST_STATIC_LINK = False | |
| +BOOST_STATIC_LINK = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array.prototype.binarySearch = function(find, comparator) { | |
| var low = 0, high = this.length - 1, i, comparison, prev_comparison; | |
| while (low <= high) { | |
| i = Math.floor((low + high) / 2); | |
| comparison = comparator(this[i], find); | |
| prev_comparison = comparison | |
| if (comparison < 0) { low = i + 1; continue; }; | |
| if (comparison > 0) { high = i - 1; continue; }; | |
| return i; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # Converts pyjamas-generated html code into more cleanly separated html and | |
| # javascript. | |
| import os | |
| import sys | |
| import re | |
| filename = sys.argv[1] |
NewerOlder