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
System.Data.DataTable people = GetPeopleData(); | |
AutoMapper.Mapper.Reset(); | |
AutoMapper.Mapper.CreateMap<IDataReader, Person>(); | |
var results = AutoMapper.Mapper.Map<IDataReader, IList<Person>>(people.CreateDataReader()); |
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
/* | |
util object; setSpinnerNextTo, setSpinnerOff; globalAjaxErrorHandler | |
assumes you have a property on your namespace of env, most likely set via server side code | |
YOUR_NAMESPACE.env = "DEVELOPMENT"; // STAGING, PRODUCTION | |
YOUR_NAMESPACE.env = '<%= Rails.env.upcase %>'; // rails | |
YOUR_NAMESPACE.env = '<%= ApplicationState %>'; // asp, assuming you have an ApplicationState property :) | |
initialize the global error handling - http://api.jquery.com/ajaxError | |
jQuery(document).ajaxError(YOUR_NAMESPACE.util.globalAjaxErrorHandler); |
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
/* | |
see README: http://github.com/house9/jquery-iframe-auto-height | |
*/ | |
(function ($) { | |
$.fn.iframeAutoHeight = function (options) { | |
// set default option values | |
var options = $.extend({ | |
heightOffset: 0 | |
}, options); |
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
$fileName = "_2-DO_log.txt" | |
$max = 20 | |
$encoding = "ASCII" | |
# remove previous file if exists | |
if(Test-Path $fileName) { Remove-Item $fileName } | |
# dump 2-do report to the file system | |
Get-ChildItem –rec –include *.config,*.cs,*.js,*.cshtml,*.css,*.aspx | | |
where { $_ -notmatch 'lib' } | |
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.Web.Mvc; | |
using System.Web.Mvc.Html; | |
using System.Web.Routing; | |
public static class HtmlHelperExtensions | |
{ | |
/// <summary> | |
/// render script tag to include javascript file from cdn, but fallback to local if cannot be loaded | |
/// </summary> |
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
@Html.JavascriptIncludeFromCdnWithFallback( | |
"//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js", | |
"~/Scripts/lib/jquery/jquery-1.4.4.min.js", | |
"!window.jQuery" | |
) | |
@Html.JavascriptIncludeFromCdnWithFallback( | |
"//ajax.aspnetcdn.com/ajax/jquery.validate/1.7/jquery.validate.min.js", | |
"~/Scripts/lib/jquery/jquery.validate.min.js", | |
"!window.jQuery.validator" |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script>!window.jQuery && document.write(unescape('%3Cscript src="/Scripts/lib/jquery/jquery-1.4.4.min.js"%3E%3C/script%3E'))</script> | |
<script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.7/jquery.validate.min.js"></script> | |
<script>!window.jQuery.validator && document.write(unescape('%3Cscript src="/Scripts/lib/jquery/jquery.validate.min.js"%3E%3C/script%3E'))</script> | |
<script src="//ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js"></script> | |
<script>!window.jQuery.validator.unobtrusive && document.write(unescape('%3Cscript src="/Scripts/lib/jquery/jquery.validate.unobtrusive.min.js"%3E%3C/script%3E'))</script> |
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
<html> | |
<head> | |
<title>css rows and columns</title> | |
<style type="text/css"> | |
body { | |
font-family: Verdana; | |
} | |
div.rows div.row { | |
clear:both; |