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 App = ({ foodItems, addFoodItem }) => ( | |
| <div> | |
| <ul> | |
| { | |
| foodItems.map(({ name, quantity }) => ( | |
| <li>{name}, quantity: {quantity}</li> | |
| )) | |
| } | |
| </ul> |
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 reducer = (state, { type, payload }) => { | |
| switch (type) { | |
| case 'ADD_FOOD_ITEM': | |
| return { | |
| foodItems: [ | |
| ...state.foodItems, | |
| payload | |
| ] | |
| } | |
| default: |
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 addFoodItem = item => ({ type: 'ADD_FOOD_ITEM', payload: item }) |
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
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
| <link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; |
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
| <link rel="import" href="../core-scaffold/core-scaffold.html"> | |
| <link rel="import" href="../core-header-panel/core-header-panel.html"> | |
| <link rel="import" href="../core-menu/core-menu.html"> | |
| <link rel="import" href="../core-item/core-item.html"> | |
| <link rel="import" href="../core-icon-button/core-icon-button.html"> | |
| <link rel="import" href="../core-toolbar/core-toolbar.html"> | |
| <link rel="import" href="../core-menu/core-submenu.html"> | |
| <polymer-element name="my-element"> |
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
| <link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
| <link rel="import" href="../core-menu/core-submenu.html"> | |
| <link rel="import" href="../core-item/core-item.html"> | |
| <link rel="import" href="../core-icon-button/core-icon-button.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { |
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
| diff -ru layoutlib_4-0-3-r1/Android.mk layoutlib_4-4-2-r1/Android.mk | |
| --- layoutlib_4-0-3-r1/Android.mk 2014-03-13 18:27:34.000000000 -0700 | |
| +++ layoutlib_4-4-2-r1/Android.mk 2014-03-13 18:28:01.000000000 -0700 | |
| @@ -25,12 +25,15 @@ | |
| # We need to process the framework classes.jar file, but we can't | |
| # depend directly on it (private vars won't be inherited correctly). | |
| # So, we depend on framework's BUILT file. | |
| -built_framework_dep := $(call java-lib-deps,framework) | |
| -built_framework_classes := $(call java-lib-files,framework) | |
| +built_framework_dep := $(call java-lib-deps,framework-base) |
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() { | |
| var images = [].slice.call(document.querySelectorAll('img')) | |
| try { | |
| images.forEach(function(img) { | |
| downloadImage(img) | |
| }) | |
| } catch (e) { | |
| alert("Download failed."); | |
| console.log('Download failed.', e); | |
| } |
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
| syntax on | |
| set ts=2 | |
| set shiftwidth=2 | |
| set autoindent | |
| set smartindent | |
| set expandtab | |
| set ruler | |
| highlight ExtraWhitespace ctermbg=red guibg=red |