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 System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Glimpse.Core.Extensibility; | |
using Raven.Client.Document; | |
namespace Glimpse.RavenDb | |
{ |
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
public class Repository { | |
private gReadieModelContext _Ctx = gReadieModelContext.Create(gReadieModelContext.ConnectionString); | |
public Func<gReadieModelContext, IEnumerable<Folder>> Query_FoldersWithUnreadPosts = | |
CompiledQuery.Compile((gReadieModelContext db) => db.Folders.Where(d => d.UnreadCount != 0).AsEnumerable()); | |
public IEnumerable<Folder> GetFoldersWithUnreadPosts() { | |
return Query_FoldersWithUnread(_Ctx); | |
} | |
} |
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
if (((double)DeviceStatus.ApplicationCurrentMemoryUsage / (double)DeviceStatus.ApplicationMemoryUsageLimit) * 100d > 97d) { | |
// We are using too much memory, try clean a few things up | |
if (_Ctx != null) | |
_Ctx.Dispose(); | |
_Ctx = new gReadieModelContext(gReadieModelContext.ConnectionString); | |
GC.Collect(); | |
if (((double)DeviceStatus.ApplicationCurrentMemoryUsage / (double)DeviceStatus.ApplicationMemoryUsageLimit) * 100d > 97d) { | |
// We couldn't recover enough memory, so we are really running out, lets be nice and bail | |
NotifyComplete(); | |
return; |
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
"C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool\ISETool.exe" ts de b8c6eab0-543c-4b55-be96-0b3da982df37 "C:\Users\chris_sainty\Desktop\IsoStore" | |
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
<ul data-bind="template: { name : 'tweetTemplate', foreach: tweets }"></ul> | |
<input type="text" placeholder="search..." data-bind="value: searchTerm" /> | |
<button data-bind="click: search">Search</button> | |
<script type="text/x-jquery-tmpl" id="tweetTemplate"> | |
<li class="tweet"> | |
<img src="${profile_image_url}" alt="${from_user}" /> | |
<p class="content"> |
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
public class ApiModule : NancyModule | |
{ | |
private readonly IDataStore _Data; | |
public ApiModule(IDataStore data) : base("/api") | |
{ | |
_Data = data; | |
Get["/messages/list"] = p => Response.AsJson(_Data.GetMessages()); |
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 http = require('http'); | |
http.createServer(function(request, response) { | |
response.statusCode = 200; | |
response.setHeader('Content-Type', 'text/plain'); | |
response.end('Hello World'); | |
}).listen(8080); |
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.Linq; | |
using MongoDB.Driver; | |
using Nancy; | |
using NancyMongo.Models; | |
namespace NancyMongo | |
{ | |
public class ApiModule : NancyModule | |
{ | |
private readonly MongoCollection<Message> _Messages; |
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 nwebkit = require('node-webkit'); | |
nwebkit.init({ | |
'url' : 'index.html', | |
'width' : 800, | |
'height' : 600 | |
}); |
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 nwebkit = require('node-webkit'), | |
http = require('http'); | |
var server = http.createServer(function(request, response) { | |
response.writeHead(200, { 'Content-Type': 'text/plain'}); | |
response.end('Hello'); | |
}).listen(3000, '127.0.0.1'); | |
nwebkit.init({ | |
'url' : 'views/index.html', |