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
private int GetIEVersion() | |
{ | |
var r = new Regex(@"(\d{1,2})\.(\d{1,2})\.[\d]+.[\d]+"); | |
var m = r.Match(Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Internet Explorer").GetValue("Version").ToString()); | |
var ver1 = Convert.ToInt32(m.Groups[1].Value); | |
var ver2 = Convert.ToInt32(m.Groups[2].Value); | |
if (ver1 == 9 && ver2 > 9) | |
{ |
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
<?php | |
class AssignedRolesSeeder extends Seeder { | |
/** | |
* Run the database seeds. | |
* | |
* @return void | |
*/ | |
public function run() |
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
"--------------- | |
" Neobundle | |
"---------------- | |
set nocompatible | |
filetype off | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim | |
call neobundle#rc(expand('~/.vim/bundle/')) | |
endif |
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
# Liquid filter | |
# format_date 2013年01月01日 | |
# w3cdtf_date 2013-01-01 | |
module Jekyll | |
module AssetFilter | |
def format_date(date) | |
"#{date.strftime('%Y年%m月%d日')}" | |
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
# 使用している jekyll, compass のバージョンを取得する plugin | |
# {% varsion markup %} | |
# @markup jekyll, compass | |
require 'rubygems' | |
require 'compass' | |
module Jekyll | |
class VersionTag < Liquid::Tag | |
def initialize(tag_name, markup, tokens) |
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
$(".more-link").click(function() { | |
var $this = $(this); | |
var $more = $this.parents(".entry-more"); | |
var $content = $more.parents(".entry-content"); | |
var file = $this.attr("href").replace("/#more", "/"); | |
$more.remove(); | |
$content.after("<div class='entry-content-more'><p class='more-loading'><span>now loading...</span></p></div>"); | |
var $more_content = $content.next(); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<rdf:RDF xml:lang="en" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:skos="http://www.w3.org/2004/02/skos/core#"> | |
<skos:Concept rdf:about="http://example.com/glossary/html"> | |
<skos:prefLabel>HyperText Markup Language</skos:prefLabel> | |
<skos:altLabel>HTML</skos:altLabel> | |
</skos:Concept> | |
</rdf:RDF> |
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
// 小文字 | |
for($i=0; $i<26; $i++){ | |
echo chr(97+$i); | |
} | |
// 大文字 | |
for($i=0; $i<26; $i++){ | |
echo chr(65+$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
var data = new Array(); | |
for(var i=1; i<=100; i++){ | |
if(i%3 ===0||i%5 === 0){// 3か5で割り切れるとき | |
var word = ""; | |
if(i%3 === 0){// 3で割り切れるとき | |
word += "Fizz";// Fizz追加 | |
} | |
if(i%5 === 0){// 5で割り切れるとき | |
word += "Buzz";// Buzz追加 |
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
// xor128 class | |
var xor128 = { | |
// member | |
x: 123456789, | |
y: 362436069, | |
z: 521288629, | |
w: 88675123, | |
// method | |
setSeed: function(seed){ |