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
# | |
# Life Game by CoffeeScript | |
# @author yusugomori | |
# @license http://yusugomori.com/license/mit The MIT License | |
# | |
# Usage: | |
# <body><div id="lifegame"></div></body> | |
# | |
# $ -> | |
# L = new Lifegame() |
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
#!/usr/bin/env ruby -Ku | |
# -*- coding: utf-8 -*- | |
srand(0) | |
class BPNN | |
def initialize(ni, nh, no) | |
@ni = ni + 1 | |
@nh = nh | |
@no = no |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Originally from http://arctrix.com/nas/python/bpnn.py | |
import time, math, random | |
random.seed(0) | |
class BPNN: | |
def __init__(self, ni, nh, no): |
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
###! | |
* jquery.pinterest.js - placing your images with Pinterest look | |
* | |
* @version 1.0.0 | |
* @author yusugomori | |
* @license http://yusugomori.com/license/mit The MIT License | |
* | |
* More details on github: https://github.com/yusugomori/jQueryPinterest | |
### |
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
#checkbox { | |
display: none; | |
} | |
.toggle { | |
display: none; | |
} | |
#checkbox:checked ~ .toggle { | |
display: block; |
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
<label for="checkbox">PUSH</label> | |
<input type="checkbox" id="checkbox" name="checkbox" /> | |
<div class="toggle"> | |
toggled element | |
</div> |
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
.arrow { | |
height:0px; | |
width:0px; | |
border-top:#fc0000 16px solid; | |
border-bottom:0px solid transparent; | |
border-left:8px solid transparent; | |
border-right:8px solid transparent; | |
} |
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
/* | |
* <div class="face top"></div> | |
* <div class="face left"></div> | |
* <div class="face right"></div> | |
*/ | |
.face { | |
position: absolute; | |
overflow: hidden; | |
} | |
.top { |
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 (created by javascript) will be like below. | |
* | |
* <div id="DOMWindowOverlay"> | |
* <div id="DOMWindow"> | |
* <div class="view"> | |
* View contents come here. | |
* <div class="close">×</div> | |
* </div> | |
* </div> |
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 DOMWindow | |
constructor: () -> | |
@DOMWindowOverlay = '#DOMWindowOverlay' | |
@_DOMWindowOverlay = @DOMWindowOverlay.replace(/^\#/,"") | |
@DOMWindow = '#DOMWindow' | |
@_DOMWindow = @DOMWindow.replace(/^\#/,"") | |
@Lightbox = ".view" | |
render: () -> |