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
1. load document in domain.com which contains iframe that points to sub.domain.com | |
2. document loaded from sub.domain.com should automatically set document.domain=domain.com | |
- this is required so that the parent frame can access the child frame | |
3. from parent document: new frames[0].XMLHttpRequest() | |
- now you have an XHR document which can open and send to sub.domain.com | |
4. if uses jquery, pass this XHR into $.ajax() via options | |
This should work in every modern web browser, including IE7 |
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.Generic; | |
using System.Linq; | |
using System.Reflection; | |
namespace Clearwave.ServiceBus { | |
public class MessageHandlerCollection { | |
private readonly static Type messageHandlerOpenGenericType = typeof(IMessageHandler<>); | |
private IDictionary<Type, ISet<DispatchInfo>> messageHandlers = new Dictionary<Type, ISet<DispatchInfo>>(); |
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 readonly static Type messageHandlerOpenGenericType = typeof(IMessageHandler<>); | |
public static IEnumerable<Type> WhereMessageHandlerType(this IEnumerable<Type> types) { | |
return types.Where(x => x.IsClass && | |
!x.IsAbstract && | |
x.GetInterfaces().Any(i => i.IsGenericType && | |
i.GetGenericTypeDefinition() == messageHandlerOpenGenericType)); | |
} |
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 ($) { | |
"use strict" | |
/* SORTABLELIST PUBLIC CLASS DEFINITION | |
* ============================== */ | |
var SortableList = function (element, options) { | |
//this.$element = $(element) | |
//this.options = $.extend({}, $.fn.sortableList.defaults, 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
CREATE TABLE [Foo] ( | |
[FooId] [int] NOT NULL, | |
[SomeDateTime] [datetime2](7) NOT NULL, | |
-- ... OTHER COLUMNS | |
[Version] rowversion NOT NULL, | |
CONSTRAINT [PK_Foo] PRIMARY KEY CLUSTERED ([FooId]) | |
) | |
CREATE TABLE [FooBar] ( | |
[FooBarId] [int] NOT NULL, |
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="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
if (window.myCode == undefined) window.myCode = function () { } | |
myCode.asyncManager = function () { | |
} | |
myCode.asyncManager.prototype = { | |
waitingOn: 0, | |
waitingFor: new Array(), |
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.Configuration; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace Example.Web { | |
public class MvcApplication : HttpApplication { | |
protected void Application_EndRequest() { | |
var context = new HttpContextWrapper(Context); | |
// If we're an ajax request, and doing a 302, then we actually need to do a 401 |
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
<UserSettings> | |
<ApplicationIdentity version="9.0"/> | |
<ToolsOptions> | |
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"> | |
<ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package"> | |
<PropertyValue name="ShowMiscFilesProject">false</PropertyValue> | |
<PropertyValue name="AutoloadExternalChanges">false</PropertyValue> | |
<PropertyValue name="CheckForConsistentLineEndings">false</PropertyValue> | |
<PropertyValue name="SaveDocsAsUnicodeWhenDataLoss">false</PropertyValue> | |
<PropertyValue name="InitializeOpenFileFromCurrentDocument">true</PropertyValue> |
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> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script> | |
if (typeof (nfvalidate) == "undefined") nfvalidate = {}; | |
// An array of validators to push your validators to | |
nfvalidate.validators = new Array(); | |
nfvalidate.validators.push({ |
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
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SplitGuids]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) | |
DROP FUNCTION [dbo].[SplitGuids] | |
GO | |
CREATE FUNCTION [dbo].[SplitGuids] | |
( | |
@List varchar(2000) | |
) | |
RETURNS | |
@ParsedList table |