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 times = (func,n)=>{for(var i=n;i>0;i--)func(n-i)} |
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 bitSize = num=>num===0?1:Math.floor(Math.log(num)/Math.log(2))+1 |
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 popup= (url, title, w, h)=>{ | |
| var y = window.outerHeight / 2 + window.screenY - ( h / 2) | |
| var x = window.outerWidth / 2 + window.screenX - ( w / 2) | |
| return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + y + ', left=' + x); | |
| } |
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 cloneDeep = (obj, clone={})=>{ | |
| for(var i in obj) | |
| clone[i] = typeof obj[i] === "object" ? cloneDeep(obj[i], obj[i].constructor()) : obj[i]; | |
| return clone; | |
| } |
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
| module.exports={ | |
| entry: { | |
| 'bundles/client.specs': __dirname+'/client/unitTest/client.specs.js', | |
| 'bundles/E2E.specs':__dirname+'/client/E2ETest/E2E.specs.js', | |
| 'bundles/main':__dirname+'/client/lib/Director.js', | |
| '../bin/kaaashop':[__dirname+'/client/panel.js'] // <-- only this with a libraryTarget commonjs | |
| }, | |
| output: { | |
| path: __dirname + '/client', | |
| filename: '[name].bundle.js', |
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
Show hidden characters
| [ | |
| { "button": "scroll_down", "modifiers": ["ctrl"], "command": "null" }, | |
| { "button": "scroll_up", "modifiers": ["ctrl"], "command": "null" }, | |
| { "keys": ["ctrl+h"], "command": "move", "args": {"by": "characters", "forward": false} }, | |
| { "keys": ["ctrl+l"], "command": "move", "args": {"by": "characters", "forward": true} }, | |
| { "keys": ["ctrl+k"], "command": "move", "args": {"by": "lines", "forward": false} }, | |
| { "keys": ["ctrl+j"], "command": "move", "args": {"by": "lines", "forward": true} }, | |
| { "keys": ["shift+ctrl+h"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true} }, | |
| { "keys": ["shift+ctrl+l"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true} }, |
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
| // app/app.ts | |
| import {bootstrap} from 'angular2/platform/browser'; | |
| import {Component} from 'angular2/core'; | |
| @Component({ | |
| selector:"app", | |
| template:"<h1>coucou</h1>" | |
| }) | |
| class TodoApp {} |
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
| { | |
| "folders": | |
| [ | |
| { | |
| "path": "*", | |
| "folder_exclude_patterns": [".git", "node_modules"], | |
| "file_exclude_patterns":["*.js","*.js.map"] | |
| } | |
| ] | |
| } |
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
| f=n=>n<=1?n:f(n-2)+f(n-1) | |
| f(10) // return 55 |
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 convertiseurSeconde(secondes){ | |
| var d = [["s",60],["m",60],["h",24],["j",30],["m",12],["a",100],["s",10],["m",Infinity]]; | |
| var cur = 0, out = ""; | |
| return ((function (last){ | |
| out = Math.floor(last)%d[cur][1]+d[cur][0]+" "+out; | |
| if(last >= d[cur][1]) arguments.callee((cur++,last / d[cur][1])); | |
| })(secondes),out); | |
| } |