Skip to content

Instantly share code, notes, and snippets.

@codeyu
codeyu / LRU.cs
Created September 6, 2016 02:31
LRU cache
void Main()
{
dynamic model = new System.Dynamic.ExpandoObject();
model.IsTransferOut = null;
model.OwnerId = -1;
if(model.IsTransferOut == true)
{
Console.WriteLine(model.IsTransferOut);
}
var t1 = Convert.ToDateTime("2016-05-02");
@codeyu
codeyu / dnd.js
Created February 25, 2016 07:14 — forked from npow/dnd.js
PhantomJS drag and drop
var page = require('webpage').create();
page.open('http://jsbin.com/ifuma#noedit', function () {
setTimeout(function () {
page.sendEvent("mousedown", 10, 10);
page.sendEvent("mousemove", 200, 200);
page.sendEvent("mouseup", 200, 200);
page.render('ss.png');
phantom.exit();
}, 3000);
});