This file contains 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 blob = new Blob([document.querySelector('#worker1').textContent], { type: "text/javascript" }; | |
var worker = new Worker(window.URL.createObjectURL(blob)); // Do the rest of the work here. |
This file contains 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
List opportunities = new List(); | |
var sync = new object(); | |
Parallel.ForEach(proxyOpportunities, (proxyOpportunity) => | |
{ | |
try | |
{ | |
Opportunity convertedOpportunity = proxyOpportunity.ConvertToOpportunity(); | |
lock (sync) | |
{ |
This file contains 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
[OutputCache(Duration = 14400, VaryByParam = "none")] | |
public async Task<PartialViewResult> GenerateSlideDeck() | |
{ | |
HomeViewModel viewModel = new HomeViewModel(); | |
Task<IEnumerable<Slide>> slidesTask = this.Worker.GetSlides(); | |
viewModel.Slides = await slidesTask; | |
return PartialView("_Slider", viewModel); | |
} |
This file contains 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 site = site || {}; site.baseUrl = site.baseUrl || ""; | |
$(document).ready(function (e) { | |
$(".partialContents").each(function (index, item) { | |
var url = site.baseUrl + $(item).data("url"); | |
if (url && url.length > 0) | |
{ | |
$(item).load(url); | |
} | |
}); | |
}); |
This file contains 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
for /f "Tokens=*" %%f in ('dir /l/b/a-d') do (rename "%%f" "%%f") | |
for /r /d %%x in (*) do ( | |
pushd "%%x" | |
for /f "Tokens=*" %%f in ('dir /l/b/a-d') do (rename "%%f" "%%f") | |
popd | |
) |
This file contains 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 NServiceBus.Config; | |
using NServiceBus.Config.ConfigurationSource; | |
public class OrderMessage : IEvent | |
{ | |
public Guid Id { get; set; } | |
public string Description { get; set; } | |
} | |
class ConfigErrorQueue : IProvideConfiguration<MessageForwardingInCaseOfFaultConfig> |
This file contains 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 NServiceBus; | |
using hbulens.ServiceBus.Messages; | |
namespace hbulens.ServiceBus.Publisher | |
{ | |
class Program | |
{ | |
static void Main() | |
{ |
This file contains 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
busConfiguration.UseTransport<AzureServiceBusTransport>().ConnectionString("Endpoint=sb://FINDYOURKEYINAZURESERVICEBUS"); |
This file contains 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
busConfiguration.UseTransport<SqlServerTransport>().ConnectionString(@"data source=THERESTOFYOURCONNECTIONSTRING"); |
This file contains 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 NServiceBus; | |
namespace hbulens.ServiceBus.Subscriber | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
BusConfiguration busConfiguration = new BusConfiguration(); |