This file contains 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 Clock = rxify((initialProps, prop$) => { | |
return prop$ | |
.pipe( | |
filter(pd => pd.differences.includes('running')), | |
map(pd => pd.next.running), | |
switchMap(running => running ? interval(0, 1000) : empty()), | |
startWith(1), | |
map(_ => (<span className="time">{new Date().toLocaleTimeString()}</span>)) | |
) | |
}); |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Collections.Concurrent; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace myApp | |
{ | |
class Program |
This file contains 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
{ | |
"links": { | |
"self": "http://example.com/articles", | |
"next": "http://example.com/articles?page[offset]=2", | |
"last": "http://example.com/articles?page[offset]=10" | |
}, | |
"data": [{ | |
"type": "articles", | |
"id": "1", | |
"attributes": { |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<Client name="Chromecast"> | |
<!-- Author: Derek Fowler. --> | |
<TranscodeTargets> | |
<VideoProfile protocol="http" container="mkv" codec="h264" audioCodec="aac" context="streaming"> | |
<Setting name="VideoEncodeFlags" value="-x264opts bframes=3:cabac=1" /> | |
</VideoProfile> | |
<MusicProfile container="wav" codec="pcm_s16le"/> | |
<PhotoProfile container="jpeg" /> | |
<SubtitleProfile container="ass" codec="ass" /> |
This file contains 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
/// <summary> | |
/// Allows UI and code operations to be executed sequentially. | |
/// </summary> | |
public class Sequence | |
{ | |
private Sequence _start; | |
private Sequence _next; | |
private bool _alreadyRun = false; | |
public Sequence() |
This file contains 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
using System; | |
using System.Collections.Generic; | |
public class MyClass | |
{ | |
public static void RunSnippet() | |
{ | |
// http://blog.robustsoftware.co.uk/2010/04/currying-with-c.html | |
// http://gist.github.com/360105 | |
NewerOlder