A princípio, temos quatro seletores importantes:
document.getElementById(id);
document.getElementsByClassName(className);
document.getElementsByTagName(tagName);
document.getElementsByName(nameAttr);| [ | |
| { "keys": ["alt+up"], "command": "scroll_lines", "args": {"amount": 1.0} }, | |
| { "keys": ["alt+down"], "command": "scroll_lines", "args": {"amount": -1.0} }, | |
| { "keys": ["shift+alt+up"], "command": "select_lines", "args": {"forward": false} }, | |
| { "keys": ["shift+alt+down"], "command": "select_lines", "args": {"forward": true} } | |
| ] |
| 1 - Instala o git (Software de Versionamento) | |
| $ sudo apt-get install git | |
| 2 - Instala o NVM (Gerenciador de pacotes pra javascript e node) seguindo os passos da documentação do mesmo no git | |
| https://github.com/creationix/nvm#install-script | |
| 3 - Instala as versões atuais do node usando o NVM | |
| $ nvm install 5.8.0 | |
| $ nvm install 4.4.0 | |
| $ nvm use 5.8.0 |
| # install openjdk | |
| sudo apt-get install openjdk-7-jdk | |
| # download android sdk | |
| wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
| tar -xvf android-sdk_r24.2-linux.tgz | |
| cd android-sdk-linux/tools | |
| # install all sdk packages |
| let AND = (...exp) => _.reduce(exp, (acc, next) => next? acc: next, true); | |
| let OR = (...exp) => _.reduce(exp, (acc, next) => !next? acc: next, false); | |
| console.log(AND ( | |
| 1 < 2, | |
| 2 >= 3, | |
| 'apple' == 'apple', | |
| 30 == 31 | |
| )); // => false |
| 'use strict'; | |
| let NOT = (arg) => !arg; | |
| let AND = (...args) => _.reduce(args, (acc, next) => next? acc: next, true); | |
| let NAND = _.compose(NOT, AND); | |
| let OR = (...args) => _.reduce(args, (acc, next) => NOT(next)? acc: next, false); | |
| let NOR = _.compose(NOT, OR); | |
| let XOR = (...args) => |
| the | |
| of | |
| to | |
| and | |
| a | |
| in | |
| is | |
| it | |
| you | |
| that |
| const tail = arr => arr.slice(1 - arr.length); | |
| const head = arr => arr[0]; | |
| // Implementing the higher order function foldl or reduce | |
| const foldl = (arr, fn, init) => { | |
| const [x, xs] = [head(arr), tail(arr)]; | |
| const [hasInitialValue, arrHasMoreElementsThanOne] = [init !== undefined, arr.length > 1]; | |
| const acc = hasInitialValue? fn(init, x): x; | |
| return arrHasMoreElementsThanOne? foldl (xs, fn, acc): acc; | |
| }; |
| //led for visualization (use 13 for built-in led) | |
| int speakerPin = 8; | |
| //speaker connected to one of the PWM ports | |
| #define c 261 | |
| #define d 294 | |
| #define e 329 | |
| #define f 349 | |
| #define g 391 |
| # Main link! | |
| https://atom.io/packages/sync-settings |