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
license: mit |
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
let softmax = (arr) => (index) => Math.exp(arr[index]) / arr.map(y => Math.exp(y)).reduce((a, b) => a + b); |
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
function getClassMethods(className) { | |
if (!className instanceof Object) { | |
throw new Error("Not a class"); | |
} | |
let ret = new Set(); | |
function methods(obj) { | |
if (obj) { | |
let ps = Object.getOwnPropertyNames(obj); |
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
@Injectable() | |
export class RuntimeMetadataResolverWrapper extends RuntimeMetadataResolver { | |
directiveResolver; | |
viewResolver; | |
_directiveCache = new Map(); | |
constructor(_directiveResolver: DirectiveResolver, _pipeResolver: PipeResolver, | |
_viewResolver: ViewResolver, @Optional() @Inject(PLATFORM_DIRECTIVES) _platformDirectives, @Optional() @Inject(PLATFORM_PIPES) _platformPipes) { | |
super(_directiveResolver, _pipeResolver, _viewResolver, _platformDirectives, _platformPipes); | |
this.directiveResolver = _directiveResolver; |
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
import { | |
Directive, | |
View, | |
Component, | |
AfterContentInit, | |
ElementRef, | |
OnChanges, | |
ContentChild, | |
Input, | |
Output, |
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
import {Component, Input, OnInit, Output, EventEmitter} from "angular2/core"; | |
import {MdList, MdListItem, MdInput, MdInputContainer} from "ng2-material/all"; | |
@Component({ | |
selector: "md-autocomplete", | |
directives: <Array<any>>[MdList, MdListItem, MdInput, MdInputContainer], | |
template: ` | |
<md-input-container> | |
<label>{{placeholder}}</label> | |
<input md-input type="search" |
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
import {Input, OnInit, Component, Attribute, Output, EventEmitter} from "angular2/core"; | |
import {KeyCodes} from "ng2-material/core/key_codes"; | |
import {OnChanges} from "../../../../node_modules/angular2/ts/src/core/linker/interfaces"; | |
@Component({ | |
selector: "md-dialog-advanced", | |
host: { | |
"(body:keydown)": "documentKeypress($event)" | |
}, | |
template: ` |
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
How to deal with dependencies which depend on dependencies referenced with github.com rather than a version | |
Works for Build Servers which do not have access to the Internet, having all npm dependencies cached in local registry e.g. nexus | |
In case you introduce a new library or upgrade one, which relies on github.com somewhere | |
Fixes | |
npm install [email protected] | |
npm ERR fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz |
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 __extends = (this && this.__extends) || function (d, b) { | |
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
/** | |
* @desc - hacky way of intercepting the class (all properties and methods inside are private - just a temp solution until it gets | |
* added to the ag-grid functionality | |
*/ | |
/// <reference path="../typings/ag-grid/ag-grid.d.ts" /> |
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
const webpackConfig = require('../webpack.config.js'); | |
module.exports = function (config) { | |
config.set({ | |
basePath: '../', | |
files: [ | |
'build/angular2.js', | |
// 'build/bundle.js', | |
'test/unit/app.ts', |