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
require 'net/http' | |
module Xvideos | |
class Fetcher | |
JPHOST = 'www.xvideos.jp' | |
def initialize(path,host = JPHOST) | |
http = Net::HTTP.new(JPHOST) | |
@res = http.get(path).body | |
end | |
def title |
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(var i = 0; i < 1000; i++){ | |
console.log((function (i){ | |
if((i % (3 * 5)) == 0){ | |
return 'FizzBuzz'; | |
} else if(i % 3 == 0){ | |
return 'Fizz'; | |
} else if(i % 5 == 0){ | |
return 'Buzz'; | |
} else { | |
return 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
<?php | |
function bmi ($height,$mass){ | |
return $mass / pow($height/100,2); | |
} | |
function h($str) { | |
return htmlspecialchars($str, ENT_QUOTES, "UTF-8"); | |
} | |
?> | |
<!DOCTYPE html> |
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
//dialog/oauth?の時に動作させる。 | |
// Get app_id | |
var app_id = ''; | |
for(var i in document.getElementById('platformDialogForm').childNodes){ | |
if(document.getElementById('platformDialogForm').childNodes[i].name == 'app_id'){ | |
app_id = document.getElementById('platformDialogForm').childNodes[i].value; | |
} | |
} |
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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) (float64,int) { | |
z := 1.0 | |
buf := 0.0 |
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 lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>JS</title> | |
<script> | |
function isLive(){ | |
// 約20%の確率?で返事をしなくなる。 | |
return Math.random() < 0.8 ? true : false; | |
} |
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 end = 150; | |
for (var i = 0; i <= end;i++){ | |
console.log(function(){ | |
var ret = '' | |
// Fizz | |
ret += function(){ | |
return (i % 3) == 0 ? 'Fizz' : ''; | |
}(); |
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 end = 150; | |
for (var i = 0; i <= end;i++){ | |
console.log(function(){ | |
return (i % 15) == 0 ? 'FizzBuzz' : (i % 5) == 0 ? 'Buzz' : (i % 3) == 0 ? 'Fizz' : 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 end = 200; | |
var fizzbuzz = []; | |
fizzbuzz[0] = undefined; | |
fizzbuzz[1] = 1; | |
fizzbuzz[2] = 2; | |
fizzbuzz[3] = 'Fizz'; | |
fizzbuzz[4] = 4; | |
fizzbuzz[5] = 'Buzz'; | |
fizzbuzz[6] = 'Fizz'; | |
fizzbuzz[7] = 7; |
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 python3 | |
def isOdd(i): | |
return False if (i >> 1 << 1) == i else True | |
def isEven(i): | |
return not isOdd(i) | |
if __name__ == '__main__': | |
for x in range(100): |
OlderNewer