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
(function($) | |
{ | |
$.fn.myPlugin = function(optionsOrCommand, commandOptions) | |
{ | |
if (optionsOrCommand == 'someCommand') | |
{ | |
return this.each(function() | |
{ | |
this.myPlugin.someOtherFunction(); | |
}); |
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 b=document.body;b.className=b.className?b.className+' js':'js'; |
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
<!-- use IE Conditional comments to add identifying wrapper | |
divs to support valid IE-version-specific CSS selectors | |
to target version-specific rendering bugs --> | |
<!--[if IE]><div id="ie"><![endif]--><!--[if IE 6]><div id="ie6"><![endif]--><!--[if IE 7]><div id="ie7"><![endif]--><!--[if IE 8]><div id="ie8"><![endif]--> | |
<!-- close our IE Conditional wrapper divs --> | |
<!--[if IE 8]></div><![endif]--><!--[if IE 7]></div><![endif]--><!--[if IE 6]></div><![endif]--><!--[if IE]></div><![endif]--> |
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
public static IEnumerable<SelectListItem> ToSelectItems(this IEnumerable<String> items) | |
{ | |
foreach (var item in items) | |
{ | |
yield return new SelectListItem() | |
{ | |
Text = item, | |
Value = item | |
}; | |
} |
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
dir Microsoft.* | foreach ($_) {dir $_.FullName -Recurse -Filter *.dll} | foreach ($_) {cp $_.FullName reference\} |
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> | |
/// Gets the version stamp from your assembly info. | |
/// </summary> | |
/// <remarks> | |
/// source: http://mikehadlow.blogspot.com/2010/10/use-single-version-file-for-all.html | |
/// </remarks> | |
public string GetVersionStamp() { | |
Version v = Assembly.GetExecutingAssembly().GetName().Version; | |
string versionStamp = String.Format("Version: {0}.{1}.{2}.{3}", v.Major, v.Minor, v.Build, v.MinorRevision); | |
return versionStamp; |
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
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Manos.Tool.Driver' threw an exception. ---> System.TypeLoadException: Could not load type 'Libev.Loop' from assembly 'manos, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. | |
at Manos.Tool.Environment..ctor() | |
at Manos.Tool.Driver..cctor() in E:\Users\davida\lib\manos.git\src\manos.exe\Driver.cs:line 43 | |
--- End of inner exception stack trace --- | |
at Manos.Tool.Driver.Main(String[] args) |
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
david@WONDERLAND ~/dev/zenboard.git (master) | |
$ rake -T | |
c:/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path': can't find executable r | |
ake for rake-0.8.7 (Gem::Exception) | |
from c:/Ruby192/bin/rake:19:in `<main>' |
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
private class GroupedWhenConditionValidator : ExpressiveValidator<Person> | |
{ | |
public GroupedWhenConditionValidator() | |
{ | |
When(x => x.Id != 0) | |
.Check(RuleFor(x => x.Age).GreaterThan(4)) | |
.Check(RuleFor(x => x.Discount).Equal(10m)); | |
} | |
} |
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
When(x => x.Id != 0) | |
.Check(RuleFor(x => x.Age).GreaterThan(4)) | |
.Check(RuleFor(x => x.Discount).Equal(10m)) | |
.Unless(x => x.Id == 5); | |
Check(RuleFor(x => x.Age).GreaterThan(4)) | |
.Check(RuleFor(x => x.Discount).Equal(10m)) | |
.Unless(x => x.Id == 5); | |
OlderNewer