This file contains 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
#include <type_traits> | |
#include <iostream> | |
using std::enable_if; | |
using std::is_same; | |
using std::declval; | |
using std::integral_constant; | |
template <typename T> | |
using Invoke = typename T::type; |
This file contains 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
#include <codecvt> | |
using namespace std; | |
#if _MSC_VER >= 1900 | |
wstring_convert<codecvt_utf8<int32_t>, int32_t> utf32conv; | |
auto utf32 = utf32conv.from_bytes("The quick brown fox jumped over the lazy dog."); | |
// use reinterpret_cast<const char32_t *>(utf32.c_str()) | |
#else | |
wstring_convert<codecvt_utf8<char32_t>, char32_t> utf32conv; |
This file contains 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
cmake_minimum_required(VERSION 3.0) | |
#------------------------------------------------ | |
# Project + basics | |
# | |
project(GPCFontRasterizer) | |
set(${PROJECT_NAME}_MAJOR_VERSION 0) | |
set(${PROJECT_NAME}_MINOR_VERSION 1) |
This file contains 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
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var through = require('through2'); | |
/* Wrap the content of text files into CommonJS modules exporting that content as JS strings. | |
*/ | |
function textFileToCommonJS(filename, options) { | |
var lines = []; | |
This file contains 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
using namespace std; | |
ifstream fs(filename); | |
string s; | |
fs.seekg(0, ios::end); | |
s.reserve( (size_t) fs.tellg() ); | |
fs.seekg(0, ios::beg); | |
s.assign( istreambuf_iterator<char>(fs), istreambuf_iterator<char>() ); |
This file contains 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
"use strict"; | |
var path = require('path'); | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
express: { | |
defaults: { | |
options: { | |
port: 3000, |
This file contains 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
<script type="text/javascript" src="scripts/require.js" data-main="app/main"></script> | |
<script> | |
requirejs.config({ | |
paths: { | |
'underscore': 'lib/underscore', | |
'jquery' : 'lib/jquery-2.0.3', | |
'backbone' : 'lib/backbone', | |
'relational': 'lib/backbone-relational', | |
'css' : 'lib/css.min' | |
}, |
This file contains 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
{ | |
'targets': [ | |
{ | |
'target_name': 'lsexcel_node', | |
'include_dirs': [ 'support/' ], | |
'sources': [ 'bindings.cc', 'support/utils.cc' ], | |
'configurations': { | |
'Debug': { | |
'msvs_settings': { | |
'VCLinkerTool': { |
This file contains 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
render: function() { | |
this.$el.empty(); | |
var container = document.createDocumentFragment(); | |
// render each subview, appending to our root element | |
_.each(this._views, function(subview) { | |
container.appendChild(subview.render().el) | |
}); | |
this.$el.append(container); | |
} |
This file contains 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
// var index = ... hash of id => filename | |
return _.reduce(index, function(seq, filename, id) { | |
return seq.then( function() { return fs.read(filename); } ) | |
}, Q.resolve()); |