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 <iostream> | |
using namespace std; | |
int | |
main (int argc, char *argv[]) | |
{ | |
cout << "Press ENTER to continue....." << endl << endl; | |
cin.ignore(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
static const std::string | |
getWindowsErrorString(int err = 0) | |
{ | |
LPSTR s; | |
if (err == 0) err = GetLastError(); | |
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, | |
NULL, | |
err, |
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 express = require('express') | |
, path = require('path') | |
, stylus = require('stylus') | |
, nib = require('nib') | |
, mongoose = require('mongoose'); | |
var app = express(); | |
app.locals.title = 'My Web App'; |
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 pending_asops = 0; | |
var global_data; | |
startingAsop(); | |
asyncFunction('param1', 'param2', function(err, data) { global_data = data; } ); | |
function allDone() { | |
// Use the complete data! |
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
class FilePtr { | |
public: | |
FilePtr() { fp = nullptr; } | |
FilePtr(FILE *fp_) { fp = fp_; } | |
FilePtr & operator = (FILE *fp_) { assert(fp == nullptr); fp = fp_; return *this; } | |
~FilePtr() { if (fp != nullptr) fclose(fp); } | |
operator FILE * () { return fp; } | |
private: | |
FILE *fp; | |
}; |
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()); |
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
{ | |
'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
<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
"use strict"; | |
var path = require('path'); | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
express: { | |
defaults: { | |
options: { | |
port: 3000, |
OlderNewer