Skip to content

Instantly share code, notes, and snippets.

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.
List opportunities = new List();
var sync = new object();
Parallel.ForEach(proxyOpportunities, (proxyOpportunity) =>
{
try
{
Opportunity convertedOpportunity = proxyOpportunity.ConvertToOpportunity();
lock (sync)
{
[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);
}
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);
}
});
});
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
)
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>
using System;
using NServiceBus;
using hbulens.ServiceBus.Messages;
namespace hbulens.ServiceBus.Publisher
{
class Program
{
static void Main()
{
busConfiguration.UseTransport<AzureServiceBusTransport>().ConnectionString("Endpoint=sb://FINDYOURKEYINAZURESERVICEBUS");
busConfiguration.UseTransport<SqlServerTransport>().ConnectionString(@"data source=THERESTOFYOURCONNECTIONSTRING");
using System;
using NServiceBus;
namespace hbulens.ServiceBus.Subscriber
{
class Program
{
static void Main(string[] args)
{
BusConfiguration busConfiguration = new BusConfiguration();