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
{ | |
"eval": "\nvar ad = response.ad;\nvar ad_token = response.ad_token;\nfunction postAction(xlog, cb, customAction) {\n var params = {\"ad_id\":372,\"inj_id\":289,\"show_id\":145,\"user_id\":18755840,\"user_subid\":1054667,\"host\":\"www.google.ca\",\"time\":1477542205,\"hash\":\"1aa41870cf255682a36aab7f9d92104c\"};\n params.postActionParams = xlog;\n params.postInfo = req;\n if (customAction) {\n params.customAction = customAction;\n }\n ajax(\"\/\/ca.doubleclickadexchange.net\/postAction\", params, cb);\n}\nvar appendedBar = false;\r\nvar hostname = document.location.hostname;\r\nvar domains = [\".aliexpress.com\",\"www.ebay.in\",\"www.snapdeal.com\",\"www.booking.com\",\"www.1mg.com\",\"www.dx.com\",\"www.tinydeal.com\",\"paytm.com\",\"www.shopclues.com\",\"www.lightinthebox.com\",\".coolicool.com\",\"www.jabong.com\",\"www.americanswan.com\",\"www.miniinthebox.com\",\".zivame.com\",\"www.shopcj.com\",\"www.pepperfry.com\",\"www.firstcry.com\",\"www.printvenue.com\",\"www.stalkbuylove.com\",\". |
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
{"eval":"\nvar ad = response.ad;\nvar ad_token = response.ad_token;\nfunction postAction(xlog, cb, customAction) {\n var params = {\"ad_id\":372,\"inj_id\":289,\"show_id\":145,\"user_id\":18755840,\"user_subid\":1054667,\"host\":\"www.google.ca\",\"time\":1477542205,\"hash\":\"1aa41870cf255682a36aab7f9d92104c\"};\n params.postActionParams = xlog;\n params.postInfo = req;\n if (customAction) {\n params.customAction = customAction;\n }\n ajax(\"\/\/ca.doubleclickadexchange.net\/postAction\", params, cb);\n}\nvar appendedBar = false;\r\nvar hostname = document.location.hostname;\r\nvar domains = [\".aliexpress.com\",\"www.ebay.in\",\"www.snapdeal.com\",\"www.booking.com\",\"www.1mg.com\",\"www.dx.com\",\"www.tinydeal.com\",\"paytm.com\",\"www.shopclues.com\",\"www.lightinthebox.com\",\".coolicool.com\",\"www.jabong.com\",\"www.americanswan.com\",\"www.miniinthebox.com\",\".zivame.com\",\"www.shopcj.com\",\"www.pepperfry.com\",\"www.firstcry.com\",\"www.printvenue.com\",\"www.stalkbuylove.com\",\".dhgate |
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
<!-- | |
*********************************************************************************************** | |
Microsoft.Common.CurrentVersion.targets | |
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | |
created a backup copy. Incorrect changes to this file will make it | |
impossible to load or build your projects from the command-line or the IDE. | |
This file defines the steps in the standard build process for .NET projects. It | |
contains all the steps that are common among the different .NET languages, such as |
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
{ | |
"authors": [ | |
"Sam Saffron", | |
"Marc Gravell", | |
"Nick Craver" | |
], | |
"owners": [ | |
"marc.gravell", | |
"nick.craver" | |
], |
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
async Task IEventProcessor.ProcessEventsAsync(PartitionContext context, IEnumerable<EventData> messages) | |
{ | |
foreach (EventData eventData in messages) | |
{ | |
string message = Encoding.UTF8.GetString(eventData.GetBytes()); | |
// Why does this line cause this event to block indefinitely? | |
// This is not the actual line of code I want to run, but it was the simplest example I found that reproduced the blocking. | |
// What I want to run is HttpContentExtensions.ReadAsHttpMessageContent() from System.Net.Http.Formatting but it blocks in the same way. |
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 Cache : ICache | |
{ | |
private ConcurrentDictionary<string, DateTime> cacheLookup = new ConcurrentDictionary<string,DateTime>(); | |
public Response Get(NancyContext ctx) | |
{ | |
DateTime lastmodified; | |
if(ctx.Request.Method == "GET" || ctx.Request.Method == "HEAD") | |
{ |
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 FUNCTION [dbo].[GetSubAssemblyTree](@JobAssemblyId int) | |
RETURNS XML | |
WITH RETURNS NULL ON NULL INPUT | |
BEGIN RETURN | |
(SELECT jar.id as "@Id", | |
jar.Sequence AS '@Sequence', | |
jar.Quantity AS '@Quantity', | |
jar.Drawing AS '@Drawing', | |
ChildJobAssembly_Id AS 'Node/@JobAssembly_Id', | |
ja.Reference AS 'Node/@Reference', |
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
[Fact] | |
public async Task DispatchBasedOnStatusCodeMediaTypeAndProfile() | |
{ | |
Person testPerson = null; | |
var machine = new HttpResponseMachine(); | |
// Define method to translate response body into DOM for specified media type | |
machine.AddMediaTypeParser<JToken>("application/json", async (content) => | |
{ |
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 GlobalRedirectHandler : DelegatingHandler { | |
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { | |
var tcs = new TaskCompletionSource<HttpResponseMessage>(); | |
base.SendAsync(request, cancellationToken) | |
.ContinueWith(t => { | |
HttpResponseMessage response; |
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
var headervalue = new UriTemplate("{commands}") | |
.AddParameter("commands",new List<string> { "Run this", "do foo with a,b,c" }) | |
.Resolve(); | |
// headervalue = Run%20this,do%20foo%20with%20a%2Cb%2Cc |