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
| #define FIRST_PIN 2 | |
| #define COUNT 6 | |
| void setup() { | |
| for (int i = 0; i < COUNT; ++i) { | |
| pinMode(i + FIRST_PIN, OUTPUT); | |
| } | |
| } | |
| int current = 0; |
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 elements like modal with router | |
| // /catalog?cart (open catalog with cart modal) | |
| // /about?menu (open menu on about page) | |
| // /about?cart&menu (open menu on about page with cart modal) | |
| const App = () => ( | |
| <BrowserRouter> | |
| <MainLayout> | |
| <QueryMatch query={{ menu: null }} component={Menu} /> | |
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
| #ifndef REDUX_MIDDLEWARE_CALLER_H | |
| #define REDUX_MIDDLEWARE_CALLER_H | |
| namespace Redux { | |
| template<template<typename> typename Current, template<typename> typename ...Others> | |
| struct MiddlewareCaller; | |
| template<template<typename> typename Current> | |
| struct MiddlewareCaller<Current> { |
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
| #include <mapbox/variant.hpp> | |
| #include <redux.hpp> | |
| struct Increment | |
| { | |
| }; | |
| struct Decrement | |
| { | |
| }; |
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> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="apple-touch-icon" href="apple-touch-icon.png"> | |
| <!-- Place favicon.ico in the root directory --> |
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 { createSelector } = require('reselect'); | |
| const state = { | |
| data: [1, 2, 3], | |
| }; | |
| const filter = (data) => { | |
| console.log('call super show filter'); | |
| return data.filter(i => i < 3); | |
| }; |
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
| import React, { PropTypes } from 'react'; | |
| import { View, DeviceEventEmitter, Animated } from 'react-native'; | |
| const KeyboardAvoid = React.createClass({ | |
| propTypes: { | |
| duration: PropTypes.number.isRequired, | |
| additionalHeight: PropTypes.number.isRequired, | |
| }, | |
| getInitialState() { |
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 data = [1, 2, 3]; | |
| const sum = a => b => a + b; | |
| const result = data.map(sum(3)); | |
| console.log(result); |
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 data = [1, 2, 3]; | |
| var sum = function (a) { | |
| return function (b) { | |
| return a + b; | |
| } | |
| }; | |
| var result = data.map(sum(3)); | |
| console.log(result); // [4, 5, 6] |
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
| extract() { | |
| local c e i | |
| (($#)) || return | |
| for i; do | |
| c='' | |
| e=1 | |
| if [[ ! -r $i ]]; then |