(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Rx.Observable.create(o => { | |
console.log("subscribing"); | |
o.onError(new Error("always fails")); | |
}).retryWhen(attempts -> { | |
return attempts.zip(Rx.Observable.range(1, 3), (n, i) => i).flatMap(i => { | |
console.log("delay retry by " + i + " second(s)"); | |
return Rx.Observable.timer(i * 1000); | |
}); | |
}).subscribe(); | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<!-- http://plnkr.co/edit/N98IKTcHoZMCs18FjSRF?p=preview --> | |
The directive assumes that the checkboxes array contains objects that have an isSelected property and a desc property. | |
<tri-state-checkbox checkboxes="listelements"></tri-state-checkbox> | |
or | |
<!-- http://plnkr.co/edit/PTnzedhD6resVkApBE9K?p=preview --> | |
If you prefer to have the directive only render the tri-stated checkbox, hence the individual checkboxes are in the HTML: | |
<tri-state-checkbox checkboxes="listelements" class="select-all-cb"> | |
</tri-state-checkbox>select all |
.arrowgasm(@position: top, @size : "4px", @background-color : #88b7d5, @border-width: "2px", @border-color : #c2e1f5, @arrowClass : "arrow_box"){ | |
(~".@{arrowClass}") { | |
position: relative; | |
background: @background-color; | |
border: @size solid @border-color; | |
} | |
(~".@{arrowClass}:after"), (~".@{arrowClass}:before") { | |
bottom: 100%; | |
border: solid transparent; |