This file contains hidden or 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 class AlbumCrudAction | |
{ | |
private readonly IRepository _repository; | |
public AlbumCrudAction(IRepository repository) | |
{ | |
_repository = repository; | |
} | |
[UrlForNew(typeof(Album))] |
This file contains hidden or 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 static void addOrder(ICriteria criteria, string sidx, string sord) | |
{ | |
var firstDotPos = sidx.IndexOf("."); | |
if(firstDotPos == -1) | |
{ | |
criteria.AddOrder( | |
sord == "asc" | |
? Order.Asc(sidx) | |
: Order.Desc(sidx)); | |
} else |
This file contains hidden or 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
#!/usr/bin/env ruby | |
def print_help | |
puts "USAGE: /> ruby symlink.rb {Destination Directory}" | |
exit | |
end | |
print_help if ARGV.empty? | |
if ARGV.first == "/?" | |
print_help |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# thanks to jim weirich | |
# run ./servefiles from the root directory | |
require 'webrick' | |
include WEBrick | |
dir = Dir::pwd | |
port = (ARGV.first || (12000 + (dir.hash % 1000))).to_i |
This file contains hidden or 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
/* Lists */ | |
ul, ol {list-style: none;} | |
ul, ol {margin: 5px 0; display: block;} | |
li {padding: 5px; } | |
ul.list-shadow > li | |
{ | |
-moz-box-shadow: 1px 1px 6px #888; | |
-webkit-box-shadow: 1px 1px 6px #888; |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using FieldBook.Core.Domain.Employees; | |
using FieldBook.Core.Domain.Equipments; | |
using FieldBook.Core.Domain.OperationCenter; | |
using NHibernate; | |
using NHibernate.Criterion; | |
using NHibernate.SqlCommand; | |
using NHibernate.Transform; |
This file contains hidden or 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
[TestFixture] | |
public class SearchExtensionTester | |
{ | |
private FubuRegistry _fubuRegistry; | |
private BehaviorGraph _graph; | |
[SetUp] | |
public void setup() | |
{ | |
_fubuRegistry = new FubuRegistry(); |
This file contains hidden or 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
.bd dl {margin:5px 0 0 0; padding:1px; overflow:hidden;} | |
.bd dl dt {margin:0; float:left; width:115px; } | |
.bd dl dd {margin:0; float:left; } | |
.bd dd ul, .bd dd li {margin:0; padding:0;} | |
.bd dd li {margin:0; padding-bottom:5px;} | |
.bd dd li.active {font-weight:bold;} |
This file contains hidden or 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 class CrudJsonOutputPolicy : IConfigurationAction | |
{ | |
public void Configure(BehaviorGraph graph) | |
{ | |
graph.Behaviors | |
.Where(x => x.LastCall().OutputType().CanBeCastTo<CrudReport>()) | |
.Each(b => | |
{ | |
b.AddToEnd(new RenderJsonNode(typeof(CrudReport))); | |
}); |
This file contains hidden or 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 class AgentFubuRegistry : FubuRegistry | |
{ | |
public AgentFubuRegistry() | |
{ | |
Output.ToJson.WhenTheOutputModelIs<AjaxResponse>(); | |
} | |
} |