This file contains hidden or 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
import java.util.*; | |
import java.util.concurrent.*; | |
public class Fib5 { | |
private ExecutorService exec = Executors.newCachedThreadPool(); | |
public class Task implements Callable<Integer> { | |
private final int n; |
This file contains hidden or 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
import java.util.concurrent.RecursiveTask; | |
import java.util.concurrent.ForkJoinPool; | |
public class Fib7 extends RecursiveTask<Integer>{ | |
private final int n; | |
Fib7(int n){ | |
this.n = n; | |
} |
This file contains hidden or 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
public class Fib { | |
public static int fib(int n){ | |
if (n == 0){ | |
return 0; | |
} else if(n == 1){ | |
return 1; | |
} else { | |
return fib(n-1) + fib(n-2); | |
} |
This file contains hidden or 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
const D = require('Diagnostics'); | |
const Scene = require('Scene') | |
const TouchGestures = require('TouchGestures'); | |
const heart = Scene.root.find('heart'); | |
TouchGestures.onTap().subscribe((e) => { | |
heart.hidden = false; | |
}); |
This file contains hidden or 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
import tornado.ioloop | |
import tornado.web | |
from jinja2 import Environment, FileSystemLoader | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
env = Environment(loader=FileSystemLoader('./', encoding='utf8')) | |
template = env.get_template('./login.html') | |
self.write(template.render()) |
This file contains hidden or 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
" 作者: | |
" @hiroga_cc | |
""""""一般"""""" | |
set history=500 | |
"set autoread | |
"ex mode遷移を無効化 | |
nnoremap Q <Nop> |
This file contains hidden or 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"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"> | |
<link rel="stylesheet" href="https://pingendo.com/assets/bootstrap/bootstrap-4.0.0-beta.1.css" type="text/css"> </head> | |
<body> |
This file contains hidden or 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
<pre class="code" data-lang="c#" data-unlink=""> | |
void Update () { | |
Animator anim = GetComponent<animator> (); | |
AnimatorStateInfo state = anim.GetCurrentAnimatorStateInfo (0);<br /> | |
if (Input.GetKeyDown (KeyCode.Space)) { | |
anim.SetTrigger ("Jump"); | |
}<br />} | |
</pre> |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import scrapy | |
class B2016Spider(scrapy.Spider): | |
name = "b2016" | |
allowed_domains = ["http://2016.spaceappschallenge.org/challenges/earth/sea-ice-app/projects"] | |
start_urls = ['http://2016.spaceappschallenge.org/challenges/earth/sea-ice-app/projects/'] | |
# 要するにdef process_requestという名前でresponseを返すクラスが登録されていればいいのだろうか |
This file contains hidden or 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
#!python | |
#-*-coding:utf-8-*- | |
# before run this source, | |
# 1. pip install selenium | |
# 2. npm install -g phantomjs | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys as keys | |
import time |