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
| angular.module('datatable',[]) | |
| .controller('DatatableController', ['$scope', '$attrs', '$filter', function ($scope, $attrs, $filter) { | |
| var sEcho = 0; | |
| $scope.openDateTo = function($event,param) { | |
| $event.preventDefault(); | |
| $event.stopPropagation(); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://d3js.org/d3.v4.js"></script> | |
| <style> | |
| body {margin: 0 } | |
| svg { background-color: #86B2EB; } | |
| svg circle.old { fill: green; } | |
| svg circle.new { fill: blue; } |
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
| [ | |
| { | |
| "daystamp": { | |
| "value": "2017-03-01 00:00:00.000" | |
| }, | |
| "PL": -13496 | |
| }, | |
| { | |
| "daystamp": { | |
| "value": "2017-03-02 00:00:00.000" |
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
| fetch('http://HOST/api', | |
| { | |
| method: 'post', // 'put' | |
| headers: { 'Accept': 'application/json, text/plain', 'Content-Type': 'application/json' }, | |
| body: JSON.stringify( {"User_employee_id":"1","template_id":0,"data":[{"id":1509003681672,"contract":"EuroDollar@SEP18"}]} ), | |
| // cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached | |
| // credentials: 'same-origin', // include, same-origin, *omit | |
| // mode: 'cors', // no-cors, cors, *same-origin | |
| // redirect: 'follow', // manual, *follow, error | |
| // referrer: 'no-referrer', // *client, no-referrer |
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
| class MyCmp extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { data: 2000 }; | |
| } | |
| render() { | |
| return React.createElement('div', null, [ | |
| React.createElement('div', {}, `Agent ${this.props.initValue} ${this.state.data} had arrived `), | |
| ]); |
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 stats = new Stats(); | |
| document.body.appendChild(stats.dom); | |
| requestAnimationFrame(function loop() { | |
| stats.update(); | |
| requestAnimationFrame(loop) | |
| }); | |
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 isPromise = obj => Boolean(obj) && typeof obj.then === 'function'; | |
| const next = (iter, callbacks, prev = undefined) => { | |
| const { onNext, onCompleted } = callbacks; | |
| const item = iter.next(prev); | |
| const value = item.value; | |
| if (item.done) { | |
| return onCompleted(); |
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 lessThan = function(end, value) { | |
| return function(value) { | |
| return value < end; | |
| }; | |
| } | |
| // 25 alphabet character letters | |
| const lessThan26 = lessThan(26); | |
| const lazyMap = function* (iterable, callback) { |
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 redditMachine = Machine( | |
| { | |
| id: 'reddit', | |
| initial: 'idle', | |
| context: { | |
| question: 'em', | |
| }, | |
| states: { |
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 wait = ms => new Promise(r => setTimeout(() => r(), ms)) | |
| const fetchResource = async ({ url, fakeDelayMs = 0 }) => { | |
| await wait(fakeDelayMs) | |
| return fetch(url).then(res => res.json()) | |
| } | |
| const constants = { | |
| MAX_QUESTION_SCORE: 3, | |
| MAX_RETRIES: 15, |
OlderNewer