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
| import sinon from 'sinon'; | |
| let config = require('./path/to/config'); | |
| sinon.stub(config, 'get').returns({ port: 1234 }); | |
| import * as database from './path/to/database' | |
| //The port is whatever the default is from config. | |
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 node:latest | |
| MAINTAINER Ryan Boucher ryan.boucher@distributedlife.com | |
| RUN npm i ensemblejs -g | |
| ADD game /app/game | |
| ADD gulpfile.js /app/gulpfile.js | |
| ADD package.json /app/package.json | |
| ADD supporting-libs /app/supporting-libs |
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
| var state = { | |
| value: 0 | |
| }; | |
| var f = function(currentState) { | |
| var newState = copy(currentState); ///copy is magic deep-copy function | |
| newState.value += 1; | |
| return newState; | |
| }; |
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
| require 'polylines' | |
| points = Polylines::Decoder.decode_polyline(File.read("data")) | |
| reversed = points.map { |point| [point.last, point.first] } | |
| puts "{\"type\":\"LineString\", \"coordinates\": #{reversed}}" |
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
| if (collection->getCatalogue()->isMatch((*objectItr)->m_element), true) | |
| { | |
| // we have a match and our catalogue is not updated | |
| } | |
| if (collection->getCatalogue()->isMatch((*objectItr)->m_element, true)) | |
| { | |
| // we have a match and our catalogue is updated | |
| } |
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
| -The test team branch | |
| |-The Name of the System | |
| | |-quick-test |
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
| #include "BatchCatalogue.h" | |
| using namespace icnh::gf ; | |
| const bool BatchCatalogue::isMatch (const BatchableObject* object, const bool checkOnly) | |
| { | |
| if (!object) | |
| { | |
| return false ; | |
| } |
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
| void Trim (const char* Bloated, const char* Parameter) | |
| { | |
| long BloatedLength = strlen (Bloated) ; | |
| char* Trimmed = 0 ; | |
| long TrimmedLength = 0 ; | |
| long TrimFromStart = strspn (Bloated, " \t") ; | |
| long TrimFromEnd = 0 ; |
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
| NoDataChanges () ; |
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
| void ConfigureMethod (const char* const Method) | |
| { | |
| lr_save_string (Method, "Method") ; | |
| lr_save_string(lr_eval_string ("{Method}Response"), "Response"); | |
| lr_save_string(lr_eval_string ("{Method}Result"), "Result"); | |
| } |