Front End Masters Ember.js Workshop - Setup
You can verify that you have node.js by running node -v and you should see something like v0.12.7
| convert("one hundred five"); // "105" | |
| convert("six hundred and fifty three"); // "653" | |
| convert("zero zero one two three"); // "123" | |
| convert("twelve o three"); // "1203" | |
| convert("thirteen zero nine"); // "1309" | |
| convert("fifteen sixteen"); // "1516" | |
| convert("fourteen ninety two"); // "1492" | |
| convert("nineteen ten"); // "1910" | |
| convert("twelve hundred"); // "1200" | |
| convert("twenty three hundred"); // "2300" |
| apt update | |
| apt -y install wget gnupg dirmngr | |
| wget -q -O - https://archive.kali.org/archive-key.asc | gpg --import | |
| gpg --keyserver hkp://keys.gnupg.net --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6 | |
| echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" >> /etc/apt/sources.list | |
| gpg -a --export ED444FF07D8D0BF6 | sudo apt-key add - | |
| apt update | |
| apt -y upgrade | |
| apt -y dist-upgrade | |
| apt -y autoremove --purge |
You can verify that you have node.js by running node -v and you should see something like v0.12.7
Take Cycle's primal example, on the README:
import Cycle from 'cyclejs';
let {Rx, h} = Cycle;
let name$ = Cycle.createStream(function model(changeName$) {| return movieLists.map( | |
| // map receives 3 args | |
| // cat - element to iterate | |
| // cIndex - index in the array of the element | |
| // cCollection - movieLists array | |
| // same applies for the rest if the code | |
| (cat, cIndex, cCollection) => { | |
| //v for videos object | |
| return cat.videos.map ( (v,vIndex,vCollection) => { |
| $g = array( | |
| 'halley' => 'amarelo', | |
| 'encke' => 'vermelho', | |
| 'wolf' => 'preto', | |
| 'kushida' => 'azul' | |
| ); | |
| $l = array( | |
| 'a' => 1, | |
| 'z' => 26 |
| var fib = [1,2] , i=0;j=1 , index=2 , sum=2; | |
| while ( fib[j]<4*Math.pow(10,6) ){ | |
| fib[index] = fib[i]+fib[j]; | |
| if (4*Math.pow(10,6)<=fib[index]) { | |
| break; | |
| } | |
| if ( !(fib[index]%2) ) | |
| sum+=fib[index]; |
| #include <dlfcn.h> | |
| void OverrideForRecording() { | |
| NSInteger (*SBSSpringBoardServerPort)() = dlsym(RTLD_NEXT, "SBSSpringBoardServerPort"); | |
| NSInteger (*SBSetShowsOverridesForRecording)(NSInteger, NSInteger) = dlsym(RTLD_NEXT, "SBSetShowsOverridesForRecording"); | |
| SBSetShowsOverridesForRecording(SBSSpringBoardServerPort(), 1); | |
| } |
| console.time('mapping in js'); | |
| var isAType = {}; | |
| isAType._array = "[object Array]"; | |
| isAType._function = "[object Function]"; | |
| isAType._string = "[object String]"; | |
| isAType.isFunction = function(fn) { | |
| return Object.prototype.toString.call(fn) === this._function; | |
| } |
| var isPalindrome = function(text){ | |
| while(text.length!=1){ | |
| var firstChar = text.charAt(0); | |
| var lastChar = text.charAt(text.length-1); | |
| if (firstChar===lastChar){ | |
| text = text.substr(1,text.length-2); | |
| } | |
| else{ | |
| return false; | |
| } |