I hereby claim:
- I am alexyork on github.
- I am alexyork (https://keybase.io/alexyork) on keybase.
- I have a public key whose fingerprint is E0D3 B6F8 49EE 8165 F008 7387 1C81 1BDA 57DA 2B48
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
var names = new[] { "Bill", "Bill", "Bob", "Mary", "Bartholomew", "Shane", "Elisabeth", "Dave", "Bartholomew" }; | |
var query = names.Distinct() | |
.Where(n => n.Length > 6) | |
.OrderByDescending(n => n) | |
.ToArray(); | |
// result: { "Elisabeth", "Bartholomew" } |
private static void FlattenData() | |
{ | |
var dictionary = new Dictionary<string, string[]> { | |
{ "Foo", new [] { "foo-1", "foo-2" }}, | |
{ "Bar", new [] { "bar-1", "bar-2" }} | |
}; | |
IEnumerable<string> flattenedData; | |
// Using LINQ |
// Running code in Parallel in C# | |
// Sequential | |
DoSomething(); | |
DoSomethingElse(); | |
DoAnotherThing(); | |
// Parallel | |
Parallel.Invoke( | |
DoSomething, |
// Error: | |
// Wrapper type 'MonoTouch.Twitter.TWTweetComposeViewController' is missing its native ObjectiveC class 'TWTweetComposeViewController'. Please check if it's been linked. | |
// Other Info: | |
// - I am targetting v 5.0 | |
// - I have tried switching linking on and off, to no avail | |
// - I have the latest MonoTouch installed | |
// My code: |
// Before: | |
<script> | |
$("td .foo input").whatever(); // worked fine | |
</script> | |
<html> | |
<table><!-- "legacy" HTML where <table> is used for layout/columns --> | |
<tr> | |
<td> |
// With compiler directives | |
public class SpaceInvadersGame | |
{ | |
private Vector2 screenRes; | |
public SpaceInvadersGame() | |
{ | |
#if WINDOWS_PHONE | |
screenRes = new Vector2(800,480); |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
using MonoTouch.ObjCRuntime; | |
namespace CustomTableCellApp | |
{ | |
public class TableCellFactory<T> where T : UITableViewCell |
using System; | |
using System.Web; | |
public class MyJsonHttpHandler : IHttpHandler | |
{ | |
public bool IsReusable | |
{ | |
get { return false; } | |
} |
prepareSnacks({ | |
'biscuits': "Hobnobs", | |
'crisps': "Quavers", | |
'peanuts': "Lots and lots!", | |
'olives': "The ones with feta cheese inside", | |
// etc etc | |
}); |