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 FileContent | |
{ | |
NancyConventions conventions; | |
public FileContent(NancyConventions conventions) | |
{ | |
this.conventions = conventions; | |
} | |
public string this[string requestFile] |
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
this.get(/^\/([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])([\w\!\?-]+)?$/, function (context, year, month, day) { | |
sandbox.publish('statechange', '/events', { name: year + '-' + month + '-' + day }); | |
}); |
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 Nancy; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.Drawing.Text; | |
using System.IO; | |
using System.Web; | |
namespace Live_Tile_Generator | |
{ | |
public class Main : NancyModule |
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
Path.setup(function () { | |
this.get('/yadda', function () { | |
document.querySelector('h1').innerHTML = "OMG"; | |
}); | |
this.get('/yaddaweeehhh', function () { | |
document.querySelector('h1').innerHTML = "<a href='/yaddaNEW'>NEW LINK!!!!</a>"; | |
}); | |
this.get('/yaddaNEW', function () { | |
document.querySelector('h1').innerHTML = "OMG!!"; | |
}); |
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
Path.setup(new Route(function () { | |
this.get('/yadda', function () { | |
document.querySelector('h1').innerHTML = "OMG"; | |
}); | |
this.get('/yaddaweeehhh', function () { | |
document.querySelector('h1').innerHTML = "<a href='/yaddaNEW'>NEW LINK!!!!</a>"; | |
}); | |
this.get('/yaddaNEW', function () { | |
document.querySelector('h1').innerHTML = "OMG!!"; | |
}); |
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
//davepermen | |
interface IFilterer | |
{ | |
Expression<Func<Message, bool>> Filter(string Value); | |
} | |
static class Filterer | |
{ | |
static public IFilterer Get(FilterParameterOperatorEnum op) | |
{ |
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
// your code, shortened | |
public class FilterFactory | |
{ | |
public Expression<Func<Message, bool>> Filter(FilterGroupParameter filterGroupParameter) | |
{ | |
var factory = FiltererFactoryFactory.Get(filterGroupParameter.Key); | |
return factory.Get(filterGroupParameter); | |
} | |
} |
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
// your code, shortened | |
public class FilterFactory | |
{ | |
public Expression<Func<Message, bool>> Filter(FilterGroupParameter filterGroupParameter) | |
{ | |
var factory = FiltererFactoryFactory.Get(filterGroupParameter.Key); | |
return factory.Get(filterGroupParameter); | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title></title> | |
</head> | |
<body> | |
<p></p> | |
<h1></h1> |
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 get = function (path, callback) { | |
var xhr = new XMLHttpRequest(); | |
xhr.onload = function () { | |
if (this.status === 200) { | |
callback(this.responseText); | |
} | |
}; | |
xhr.open('get', path); | |
xhr.send(); | |
}; |
OlderNewer