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.Threading; | |
using System.Threading.Tasks; | |
namespace VolatileTrap | |
{ | |
class Widget | |
{ | |
private long count = 0; |
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.Threading; | |
using System.Threading.Tasks; | |
namespace cancelThis | |
{ | |
class Program | |
{ | |
static void WaitingOnCancellationToken() | |
{ |
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.Concurrent; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.ServiceBus; | |
namespace bussub | |
{ |
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
import UIKit | |
class Node : Equatable { | |
let name: String; | |
var previous: Node? = nil | |
var adjacents: [Node] = [] | |
init (name: String) { | |
self.name = name |
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
var Laws = { | |
drinking_age : function (fn) { | |
fn.call(this, this.age > 21); | |
} | |
} | |
/* snip */ | |
Laws.drinking_age.call(this, function (able_to_drink) { |
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
Would like to have a xaml (view) only method to change the textbox text to "Search ..." when the textbox is empty. | |
My xaml file has this: | |
<TextBox Name="searchBox" Text="{Binding Path=TextFilter, UpdateSourceTrigger=PropertyChanged}"/> | |
<TextBox.Style> | |
<Style TargetType="{x:Type TextBox}"> | |
<Style.Triggers> | |
<DataTrigger Binding="Text.Length, {Binding RelativeSource={RelativeSource = Self}}" Value="0"> |
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
This is an example of the type of domain syntax I'd want in a WPF UI automation testing feature: | |
Given the default user exists | |
When I enter "daniel" in the username textbox | |
And I enter "pass" in the password textbox | |
And I click the authenticate button | |
Then I should see the authentication panel | |
And the border of the username textbox should be red |
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
System\\CurrentControlSet\\Control\\Keyboard Layout |
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
#Add this line to development.rb to shut up ActiveRecord | |
ActiveRecord::Base.logger = Logger.new('/dev/null') |
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
<html> | |
<style type="text/css"> | |
div { float: right } | |
* { float: none } | |
</style> | |
<body> | |
<div class="floatright">float right</div> | |
<p>I'm defined under the right floated right div</p> |
NewerOlder