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
define(['knockout','numeral'],function(ko,numeral){ | |
ko.bindingHandlers.money = { | |
update: function (element, valueAccessor,allBindingsAccessor) { | |
var format = allBindingsAccessor().format || "00,000"; | |
var value = ko.utils.unwrapObservable(valueAccessor()); | |
$(element).text(numeral(value).format(format)); | |
} | |
}; | |
}); |
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
define(['knockout'],function(ko){ | |
ko.bindingHandlers.cuttext = { | |
update: function (element, valueAccessor,allBindingsAccessor) { | |
var length = allBindingsAccessor().length || 4294967295; //SAFE MAX_INT | |
var trailing = allBindingsAccessor().trailing || ""; | |
var value = ko.utils.unwrapObservable(valueAccessor()); | |
if (length<value.length){ | |
value = value.substr(0,length)+trailing; | |
} | |
$(element).text(value); |
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
/* | |
Style for the scrollarea: | |
.scrollarea{ | |
height:500px; | |
overflow: hidden; | |
} | |
*/ | |
//scroll speed | |
var speed = 100; |
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 {PipeTransform, Pipe} from 'angular2/core'; | |
@Pipe({ name: 'highlight' }) | |
export class HighLightPipe implements PipeTransform { | |
transform(text: string, [search]): string { | |
return search ? text.replace(new RegExp(search, 'i'), `<span class="highlight">${search}</span>`) : text; | |
} | |
} | |
/** Usage: |
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
interface WorkflowFn { | |
<A, B, C, D, E, R> (wf: (param1: A, param2: B, param3: C, param4: D, param5: E) => R, param1: A, param2: B, param3: C, param4: D, param5: E): Promise<WorkflowResult<R>>; | |
<A, B, C, D, R> (wf: (param1: A, param2: B, param3: C, param4: D) => R, param1: A, param2: B, param3: C, param4: D): Promise<WorkflowResult<R>>; | |
<A, B, C, R> (wf: (param1: A, param2: B, param3: C) => R, param1: A, param2: B, param3: C): Promise<WorkflowResult<R>>; | |
<A, B, R> (wf: (param1: A, param2: B) => R, param1: A, param2: B): Promise<WorkflowResult<R>>; |
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
// Type definitions for jasminewd2 2.0 | |
// Project: https://github.com/angular/jasminewd | |
// Definitions by: Sammy Jelin <https://github.com/sjelin> | |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
// TypeScript Version: 2.1 | |
/// <reference types="jasmine" /> | |
declare function it(expectation: string, assertion?: () => Promise<void>, timeout?: number): void; | |
declare function fit(expectation: string, assertion?: () => Promise<void>, timeout?: number): void; |
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
describe('Test Suite name', () => { | |
// page objects and services | |
let login: Login; | |
beforeEach(async () => {}); | |
afterEach(async () => {}); | |
it('should ....', async () => { | |
}); | |
it('should ...', async () => { | |
expect(...); |
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
from functools import wraps | |
def async_test(): | |
""" | |
class ExampleTest(unittest.TestCase): | |
@async_test() | |
async test_something(): | |
pass | |
""" | |
def decorator(f): | |
@wraps(f) |
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
on-off->20DF10EF | |
energy->20DFA956 | |
av. mode->20DF0CF3 | |
input->20DFD02F | |
tv/rad->20DF0FF0 | |
1->20DF8877 | |
2->20DF48B7 | |
3->20DFC837 | |
4->20DF28D7 | |
5->20DFA857 |
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
.blob-num, | |
.blob-code-inner { | |
font-size: 17px; | |
font-family: "CamingoCode"; | |
-webkit-font-smoothing: subpixel-antialiased; | |
line-height: 25px; | |
} | |
.blob-num, | |
.blob-code-inner, |