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
class LRUElement { | |
constructor (data, master, index) { | |
this.data = data; | |
this.master = master; | |
this.index = index; | |
this.lastAccess = new Date(); | |
} | |
get value () { | |
return this.data; |
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
function initWatchProperty (obj, key) { | |
if (obj['$$watchers$$' + key]) | |
return; | |
Object.defineProperty(obj, key, { | |
get: function () { | |
return this['$$' + key]; | |
}, | |
set: function (val) { | |
var old = this['$$' + key]; |
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'); | |
var server = http.createServer(onRequest); | |
function onRequest (req, res) { | |
res.writeHead(403, 'You are forbidden to visit this page due to Qujing\'s parental control.'); | |
res.write('You are forbidden to visit this page due to Qujing\'s parental control.'); | |
res.end(); | |
} |
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
<style> | |
ul, li { padding: 0; margin: 0; } | |
ul { width: 400px; } | |
li { | |
display: inline; | |
font-family: "Charis SIL"; | |
font-style: italic; | |
} |
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 fs = require('fs'); | |
function guardInit (init) { | |
var delayedCalls = []; | |
var status = 'not initialized'; | |
return function () { | |
if (status == 'initializing') | |
return delayedCalls.push(arguments); | |
if (status == 'initialized') |
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
<html lang="cmn-Hans-CN"> | |
<head> | |
<style type="text/css"> | |
#block { | |
width: 10em; | |
margin-left: 5em; | |
text-align: justify; | |
-webkit-hyphens: auto; | |
} | |
i { |
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"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
#picture-select { | |
display: block; | |
} | |
#canvas { |
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
{-# LANGUAGE DeriveDataTypeable, TemplateHaskell, TypeFamilies, FlexibleInstances, FlexibleContexts, InstanceSigs #-} | |
module Data.VCodePool where | |
import Data.Data (Data, Typeable) | |
import Data.SafeCopy (base, deriveSafeCopy, SafeCopy(..)) | |
import Control.Applicative ((<$>), (<*>)) | |
import Control.Monad.Reader (ask) | |
import Control.Monad.State (get, put) |
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
<style> | |
html { | |
font-family: Helvetica; | |
} | |
body { | |
width: 30em; | |
margin: auto; | |
} | |
p { | |
width: 581px; |
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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
{-# LANGUAGE UnicodeSyntax #-} | |
import Prelude hiding (putStrLn) | |
import Data.Text.Lazy.IO (putStrLn) | |
import Control.Monad.Writer | |
-- Monoid Instance -- |
OlderNewer