I hereby claim:
- I am RobThree on github.
- I am robiii (https://keybase.io/robiii) on keybase.
- I have a public key whose fingerprint is 8FCA 6E28 8E13 F77A 628D BADA B3F7 16D6 6A0A A857
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* Dynamically merges objects; it allows for string-values to be 'expanded' into actual object values following a simple | |
* syntax: $objectname.property or $objectname.property.property.property[foo] or $objectname[1] | |
* | |
* Example: | |
* | |
* $source = array('customer' => $customerobject, 'order' => $orderobject); | |
* $dest = json_decode('{ "myreference": "abc-123", "customer_id": "{$customer.id}", "order_id": "{$order.id}" }'); | |
* |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Linq; | |
using System.Xml; | |
//Usage: | |
// var tables = new WordTableExtractor().ExtractTables(@"path\to\my\file.docx"); |
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var duplicates = new DirectoryInfo(@"G:\sampling") |
<?php | |
/* Very simple, crude, rate limiter */ | |
/* | |
Assumes _MEMCACHEDSITEPREFIX, _MEMCACHEDHOST and _MEMCACHEDPORT are `defined`: | |
define('_MEMCACHEDHOST', '127.0.0.1'); | |
define('_MEMCACHEDPORT', 11211); | |
define('_MEMCACHEDSITEPREFIX', 'mysite'); | |
*/ |
public interface IFood | |
{ | |
bool IsTasty { get; } | |
} | |
public class Hamburger : IFood | |
{ | |
public bool IsTasty { get { return true; } } | |
} |
using System; | |
using System.Linq; | |
using System.Text; | |
//Demonstrate usage | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var ww = new WhitespaceWatermarker(); |
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
//Sample program demonstrating the linq extensions (below Progam class) | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Demonstrate Diff |
using System; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
/// <summary> | |
/// Tries to grab phonenumbers from an active control (selected text) in an active window. Uses | |
/// a <see cref="TextSelectionReader"/> internally. | |
/// </summary> | |
public class PhonenumberGrabber | |
{ |