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
// Run when we initialize the database, along with uploading indices and stuff | |
session.Store(new FacetSetup() | |
{ | |
Facets = HomeSearchFacetSetup.Facets().ToList(), | |
Id = HomeSearchFacetSetup.HomeSearchFacetDocumentId | |
}); | |
namespace DWH.Website.Facets | |
{ | |
public class HomeSearchFacetSetup |
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; | |
namespace DWH.Website.ViewModels | |
{ | |
public class MapMarkerData | |
{ | |
public enum MarkerType | |
{ | |
Community, | |
CentralLiving, |
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.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Hosting; | |
using Cassette; | |
using Cassette.HtmlTemplates; | |
using Cassette.IO; | |
using Cassette.Scripts; |
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; | |
namespace DWH.Website | |
{ | |
public static class IMediaService | |
{ | |
public interface Community | |
{ |
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 NUnit.Framework; | |
using Raven.Abstractions.Data; | |
using Raven.Client; | |
using Raven.Client.Embedded; | |
using Raven.Database.Json; | |
using Raven.Json.Linq; | |
using SharpTestsEx; | |
namespace RavenDB.SanityCheck | |
{ |
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 Students_ByCourse : AbstractIndexCreationTask<Student> | |
{ | |
public Students_ByCourse() | |
{ | |
Map = students => from student in students | |
select new {student.Course}; | |
Indexes.Add(s => s.Course, FieldIndexing.Analyzed); | |
} |
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 doc = { | |
"Id": "a04d38cd-ab02-41cd-ac67-2070f214daf5", | |
"MarketId": "778ac624-2337-4c6c-a741-20175aa694e7", | |
"Name": "Katy", | |
"StateAbbreviation": "TX" | |
}; |
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 static int GetRandomUnusedPort() | |
{ | |
var listener = new TcpListener(IPAddress.Any, 0); | |
listener.Start(); | |
var port = ((IPEndPoint)listener.LocalEndpoint).Port; | |
listener.Stop(); | |
return port; | |
} |
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 void Clear() | |
{ | |
const string exe = "RunDll32.exe"; | |
const string args = "InetCpl.cpl,ClearMyTracksByProcess 8"; | |
var si = new ProcessStartInfo(exe, args) | |
{ | |
UseShellExecute = false, | |
CreateNoWindow = true | |
}; | |
var process = Process.Start(si); |
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
/// <reference path="~/scripts/lib"/> | |
$(function() { | |
var auctionHub = $.connection.auctionHub; | |
auctionHub.onBidAccepted = function(itemId, itemName, amount) { | |
$.pnotify({ | |
pnotify_title: "Out bid", | |
pnotify_text: "The new high bid for " + itemName + " is " + amount + ".", | |
pnotify_sticker: false | |
}); | |
}; |