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 Chart = props => ( | |
<div className={styles.container}> | |
<VictoryChart domain={[0, 10]}> | |
{ | |
props.data.driveTrains.map((data, i) => { | |
return( | |
<VictoryGroup color={data.color} key={i}> | |
<VictoryLine data={data.gears} /> | |
<VictoryScatter labelComponent={<VictoryTooltip/>} data={data.gears} /> | |
</VictoryGroup> |
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 getItem = function(key: string): Object { | |
return JSON.parse(localStorage.getItem(key)); | |
}; |
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 element --> | |
<polymer-element name="my-counter" attributes="counter"> | |
<template> | |
<style> /*...*/ </style> | |
<div id="label"><content></content></div> | |
Value: <span id="counterVal">{{counter}}</span><br> | |
<button on-tap="{{increment}}">Increment</button> | |
</template> | |
<script> | |
Polymer({ |
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
parallel([ | |
parallel([ | |
series([ | |
step1(()=> console.log("step1")), | |
step2(()=> console.log("step1")), | |
step3(()=> console.log("step1")) | |
]) | |
]), | |
task1(()=> console.log("task1")), | |
task2(()=> console.log("task2")) |
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
getLast12MonthsFromNow1 = function() { | |
return _.map(_.range(12), function(n) { | |
return { | |
name: moment().subtract(n, 'month').format('MMMM'), | |
value: moment().subtract(n, 'month').startOf('month').format('YYYY-MM-DD') | |
}; | |
}); | |
}; | |
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
{div} = React.DOM | |
options = | |
render: ()=> | |
(div "Hello {this.props.name}") | |
HelloMessage = React.createClass options | |
msg = HelloMessage name: "John" |
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
'original': 358901047252272,6011,2014/12/02,14:17:25,-37.84817,145.00287,24.9,9.3,0.0,0.0,1229,121.7,8,1.0,9894,0.0,13.6,9,1,0.0,0,'vin': 358901047252272,'deviceID': 358901047252272,'code': 6011,'date': 2014/12/02,'time': 14:17:25,'latitude': -37.84817,'longitude': 145.00287,'altitude': 24.9,'speed': 9.3,'acceleration': 0.0,'deceleration': 0.0,'rpm': 1229,'headingDegree': 121.7,'satellitesUsed': 8,'gpsAccuracy': 1.0,'milesAccumulated': 9894,'fuelConsumption': 0.0,'batteryVoltage': 13.6,'gpsSignalStrength': 9,'gpsStatus': 1,'fuelLevel': 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
*********************++++++++++######WWWWWWWWWWWWWWWW#############################################################+#+######++++##+##+#################+######### | |
********************++++++++++++#####WWWWWWWWWWWWWWWW########################################################################################################+## | |
********************++++++++++++#####WWWWWWWWWWWWWWWWW#W######################################################################################################## | |
*****************+++*+++++++++++#####WWWWWWWWWWWWWWWWWWWW####################################################################################################### | |
********************++++++++++++#####WWWWWWWWWWWWWWWWWWW#W###################################################################################################### | |
********************++++++++++++######WWWWWWWWWWWWWWWWWW#W###################################################################################################### | |
*****************+**++++++++++++#####WWWWWWWWWWWWWWWWWWWWW |
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
.star-rating { | |
font-size: 0; | |
white-space: nowrap; | |
display: inline-block; | |
width:250px; | |
height:50px; | |
overflow: hidden; | |
position: relative; | |
background: url('data:image/svg+xml;utf-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="22px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve"><polygon fill="#fff" stroke="#B4B4B4" points="10,0 13.09,6.583 20,7.639 15,12.764 16.18,20 10,16.583 3.82,20 5,12.764 0,7.639 6.91,6.583 "/></svg>'); | |
background-size: contain; |
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
<script> | |
Polymer('my-directions', { | |
getDirectionsOptions: function() { | |
var directionsOptions = this.super(); | |
directionsOptions["waypoints"] = [{location:'Halifax, NS', stopover:false}, {location:'toronto, ont', stopover:false}]; | |
// other options here | |
return mapOptions; | |
} | |
}); | |
</script> |
NewerOlder