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 static class DropDownListForExtensions | |
{ | |
public static IEnumerable<SelectListItem> EnumToSelectList<TEnum>(this TEnum enumObj, string defaultItem = null) where TEnum : struct | |
{ | |
if (!typeof(TEnum).IsEnum) throw new ArgumentException("An Enumeration type is required.", "enumObj"); | |
var list = new List<SelectListItem>(from TEnum e in Enum.GetValues(typeof(TEnum)) | |
select new SelectListItem{Value = e.ToString(), Text = System.Text.RegularExpressions.Regex.Replace( | |
e.ToString(), | |
"([A-Z])", |
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
source 'http://rubygems.org' | |
#source 'http://gems.engineyard.com' | |
gem 'rails', '3.0.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'compass' | |
gem 'haml' |
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
# SQLite version 3.x | |
# gem install sqlite3-ruby (not necessary on OS X Leopard) | |
development: | |
adapter: <%= defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' %> | |
database: db/development.sqlite3 | |
pool: 5 | |
timeout: 5000 | |
# Warning: The database defined as "test" will be erased and | |
# re-generated from your development database when you run "rake". |
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
$(function () { | |
var ele_id = 'appResource'; | |
var auto_complete = $( '#' + ele_id); | |
var auto_complete_hidden = $('<input id="' + ele_id + '_auto_complete_hidden' + '" type="hidden"/>'); | |
auto_complete_hidden.insertAfter(auto_complete); | |
auto_complete.autocomplete({ | |
source: app_resource_url, | |
minLength: 1, |
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
name: Castle.Facilities.NHibernateIntegration | |
description: The NHibernate Facility enables the usage of NHibernate O/R framework for your components. | |
build: msbuild;profile=net40;project=src\Castle.Facilities.NHibernateIntegration\Castle.Facilities.NHibernateIntegration-vs2010.csproj | |
depends: openwrap anchored content | |
depends: castle.windsor | |
depends: log4net | |
depends: castle.services.transaction | |
depends: nhibernate | |
depends: Castle.Facilities.AutomaticTransactionManagement |
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
function Create-VirtualDir($Parent, $FriendlyName, $VirPath) | |
{ | |
$newdir = $Parent.Create("IISWebVirtualDir", $FriendlyName) | |
[Void]$newdir.Put("Path", $VirPath) | |
[Void]$newdir.Put("AccessRead", $true) | |
[Void]$newdir.Put("AccessWrite",$true) | |
[Void]$newdir.Put("AccessScript", $true) | |
[Void]$newdir.AppCreate2(1) | |
[Void]$newdir.Put("AppFriendlyName", $FriendlyName) | |
[Void]$newdir.SetInfo() |
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
function getJSONObject(url, params, ajaxCallBack, ajaxErrorHandler, excludeProgress){ | |
var e = (ajaxErrorHandler) ? ajaxErrorHandler : validationErrorCallBack; | |
var s = (ajaxCallBack) ? ajaxCallBack : jsonCallBack; | |
if (!excludeProgress) | |
$('#working').show(); | |
$.ajax({ | |
type: "POST", | |
url: url, | |
cache: false, | |
data: params, |
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
source 'http://rubygems.org' | |
source 'http://gems.engineyard.com' | |
gem 'rails' | |
gem 'compass' | |
gem 'haml' | |
gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3' | |
gem 'nokogiri' |
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
# SQLite version 3.x | |
# gem install sqlite3-ruby (not necessary on OS X Leopard) | |
development: | |
adapter: <%= defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' %> | |
database: db/development.sqlite3 | |
pool: 5 | |
timeout: 5000 | |
# Warning: The database defined as "test" will be erased and | |
# re-generated from your development database when you run "rake". |
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
class AsmInfoBuilder | |
attr_reader :buildnumber | |
def initialize(baseVersion, properties) | |
@properties = properties; | |
@buildnumber = baseVersion + (ENV["CCNetLabel"].nil? ? '0' : ENV["CCNetLabel"].to_s) | |
@properties['Version'] = @properties['InformationalVersion'] = buildnumber; | |
end |