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
| const MulticastSource = require('most/lib/source/MulticastSource'); | |
| const PropagateTask = require('most/lib/scheduler/PropagateTask'); | |
| const CompoundDisposable = require('most/lib/disposable/CompoundDisposable'); | |
| module.exports = ReplaySource; | |
| function ReplaySource(source) { | |
| this._buffer = []; | |
| this._ended = false; | |
| MulticastSource.call(this, source); |
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
| # ---------------------------------------------------------------------------------------------------------------------------- | |
| # Generic VC++ Make Script | |
| # ---------------------------------------------------------------------------------------------------------------------------- | |
| # Note: Make sure that vcvars.bat has been run in the current powershell session | |
| # | |
| # Power Shell Reference: http://ss64.com/ps/ | |
| # VC++ Compiler Options: https://msdn.microsoft.com/en-us/library/19z1t1wy.aspx | |
| # VC++ Linker Options: https://msdn.microsoft.com/en-us/library/y0zzbyt4.aspx | |
| # Plugin handling library: http://apolukhin.github.io/Boost.DLL/ | |
| # ---------------------------------------------------------------------------------------------------------------------------- |
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
| function runInScope(main, sources, context, ...args) { | |
| if(!main) { | |
| throw new Error('A "main" function must be supplied, which will be called in scope and from which a (sinks) object will be returned'); | |
| } | |
| if(!sources) { | |
| throw new Error('A source drivers object must be supplied, to which scoping can be applied'); | |
| } | |
| if(!context) { | |
| throw new Error('A scope context object must be supplied, either as a string, or as an object of key/value pairs'); | |
| } |
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
| 'use strict'; | |
| import {Router5, RouteNode} from 'router5'; | |
| import logger from '../logger'; | |
| // The set of valid sink functions includes synchronous state-affecting router functions that do not require a callback | |
| // and which do not have a significant return value other than the router object itself. | |
| const validSinkFuncs = ['add','addNode','canActivate','deregisterComponent','navigate','registerComponent','setOption','start','stop']; | |
| function validateAndRemapSinkArgument(arg) { |
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 logger from './logger'; | |
| let log = logger('Category'); | |
| log.trace('Just tracing stuff'); | |
| log.debug('Here is a debug message'); | |
| log.success('The successful thing happened that we wanted to happen'); | |
| log.info('Information makes the world go around, and here is that string:', str); | |
| log('An info message can be logged using short form'); | |
| log.warn('You better be careful about this kind of thing'); |
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 {Rx} from '@cycle/core'; | |
| export default function (responses, strings) { | |
| var log = responses.log.create('Sample'); | |
| var str$ = Rx.Observable | |
| .from(strings) | |
| .do(str => { | |
| log.trace('Just tracing stuff'); | |
| log.debug('Here is a debug message'); | |
| log.success('The successful thing happened that we wanted to happen'); |
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
| <template> | |
| <require from="./linked-data"></require> | |
| <table> | |
| <tbody> | |
| <tr repeat.for="pair of pairs()"> | |
| <td>${pair.predicate}</td> | |
| <td> | |
| <linked-data subject.bind="this" predicate.bind="pair.predicate" value.bind="pair.value"></linked-data> | |
| </td> | |
| </tr> |
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
| std::shared_ptr<FontAtlas> generateFontAtlas(int fontId, int fontSizeInPixels, int sdfPadding) | |
| { | |
| /* ACTION PLAN: | |
| create a new list (vector) in which to stage a set of character glyphs, each prepared in isolation | |
| for each character: | |
| load the character and its metrics from the font engine, using a very large font size (10 times the requested font size) | |
| create a new image expanded to include padding for the distance field | |
| copy the character bitmap into the centre of the image | |
| render the distance field into the image | |
| downsize the 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
| $postbuild = "" | |
| foreach ($arg in $args) { | |
| switch ($arg) { | |
| "run" { $postbuild = "run" } | |
| "debug" { $postbuild = "debug" } | |
| } | |
| } | |
| if (!(test-path build)) { mkdir build } | |
| if (!(test-path build/obj)) { mkdir build/obj } |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using SharpDX; | |
| using SharpDX.D3DCompiler; | |
| using SharpDX.Direct3D; | |
| using SharpDX.Direct3D11; | |
| using SharpDX.DXGI; |