Ordered set.
[1, 2] != [2, 1]
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<configSections> | |
<sectionGroup name="elmah"> | |
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" /> | |
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /> | |
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" /> | |
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" /> | |
</sectionGroup> | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> |
using System; | |
using System.Linq.Expressions; | |
using System.Web.Mvc; | |
namespace MvcHtmlHelpers | |
{ | |
public static class HtmlHelperExtensions | |
{ | |
/// <summary> | |
/// Return the raw DisplayName attribute of a property of a Model, |
[ryankirkman@cloud9]:/workspace$ npm install | |
npm ERR! Error: No compatible version found: trycatch@'>=0.1.0- <0.2.0-' | |
npm ERR! Valid install targets: | |
npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7","0.0.8","0.0.9"] | |
npm ERR! at installTargetsError (/mnt/ws/users/ryankirkman/npm/lib/cache.js:424:10) | |
npm ERR! at /mnt/ws/users/ryankirkman/npm/lib/cache.js:406:17 | |
npm ERR! at saved (/mnt/ws/users/ryankirkman/npm/lib/utils/npm-registry-client/get.js:136:7) | |
npm ERR! at Object.cb [as oncomplete] (/mnt/ws/users/ryankirkman/npm/node_modules/graceful-fs/graceful-fs.js:36:9) | |
npm ERR! Report this *entire* log at: | |
npm ERR! <http://github.com/isaacs/npm/issues>; |
byDateGroup: { | |
map: function(doc) { | |
if (doc.date && (doc.group == "group1" || doc.group == "group2")) { | |
emit(doc.date, null); | |
} | |
} | |
} |
// ProxyRequest proxies a request to a JSON-based API | |
// to avoid the cross origin request issue. | |
// It assumes the API supports POST. | |
// JsonResult is an ASP.NET MVC construct. | |
private JsonResult ProxyRequest(string url, string data) | |
{ | |
HttpWebRequest wr = (HttpWebRequest)HttpWebRequest.Create(url); | |
wr.Method = "POST"; | |
wr.ContentType = "application/json"; |
// See: http://api.jquery.com/jQuery.ajaxPrefilter/ | |
$.ajaxPrefilter( function( options ) { | |
if ( options.crossDomain ) { | |
var newData = {}; | |
// Copy the options.data object to the newData.data property. | |
// We need to do this because javascript doesn't deep-copy variables by default. | |
newData.data = $.extend({}, options.data); | |
newData.url = options.url; | |
// Reset the options object - we'll re-populate in the following lines. |
-- Sourced from: http://decipherinfosys.wordpress.com/2007/02/13/counting-number-of-records-for-all-the-tables-sql-server/ | |
-- with only slight modifications | |
SELECT SUM(ind.rows) AS Total_Rows_in_all_user_tables | |
FROM sysobjects AS obj | |
INNER JOIN sysindexes AS ind | |
ON obj.id = ind.id | |
WHERE obj.xtype = 'u' | |
AND ind.indid < 2 |
using System; | |
using System.Data.Odbc; | |
using System.Data.SqlClient; | |
namespace ODBC_Import | |
{ | |
// Sourced from: http://darrylagostinelli.com/2011/06/27/create-a-sql-table-from-a-datatable-in-c-net/ | |
// with modifications for copying from an ODBC data source | |
class SqlServerTableCreator | |
{ |
// You need to have the following installed: | |
// https://github.com/admc/wd | |
// https://github.com/kriskowal/q | |
// https://github.com/holidayextras/node-saucelabs | |
var wd = require('wd') | |
, Q = require('q') | |
, assert = require('assert') | |
, sauce = require('saucelabs') | |
, host = "ondemand.saucelabs.com" |