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
$ gem install htty |
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
delegate TResult Func<T1, | |
T2, | |
T3, | |
T4, | |
T5, | |
T6, | |
T7, | |
T8, | |
T9, | |
T10, |
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; | |
class Nightclub | |
{ | |
private readonly List<Person> occupants = new List<Person>(); | |
public Nightclub() | |
{ | |
occupants = new List<Person>(); |
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 mintonsPlayhouseCirca1941 = new Nightclub(); | |
mintonsPlayhouseCirca1941.Bouncer = delegate(person) | |
{ | |
// Welcome, paying customers! | |
var customer = person as ICustomer; | |
if ((customer != null) && (customer.CashOnHand > 0)) return true; | |
// Feel free to sit in ... if you can play, that is. | |
var musician = person as IMusician; | |
if ((musician != 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
<?xml version='1.0' encoding='utf-8' ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html lang='en-US' xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<title> | |
passwordComplexity jQuery plugin demo | |
</title> | |
<style type='text/css'> | |
* { | |
font-family: Helvetica, Arial, sans-serif; |
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
catch :foo do | |
catch :bar do | |
do_something_that_can_throw_foo_or_bar | |
end | |
end |
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
begin | |
do_something_error_prone | |
rescue AParticularKindOfError | |
# Insert heroism here. | |
rescue Exception | |
write_to_error_log | |
raise | |
end |
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
rich_tevye = Tevye.new | |
def rich_tevye.rich_man? | |
true | |
end | |
result = catch(:miracle_of_miracles) do | |
rich_tevye.live | |
end |
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
require 'tevye' | |
poor_tevye = Tevye.new | |
result = catch(:miracle_of_miracles) do | |
poor_tevye.live | |
end |
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
module DirectoriesAndFiles | |
module ClassMethods | |
def directories(path) | |
new(path).directories | |
end | |
def files(path) | |
new(path).files |