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
(function(global, $) { | |
"use strict"; | |
var util = { | |
// ブラウザのデフォルトの動作と、イベントの伝播をキャンセルする | |
stop: function(e) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
}, | |
// strを指定の長さで切り取る |
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"> | |
<title>HTML5 でドラッグ&ドロップ</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script src="jquery.drop-file.js"></script> | |
<script> | |
// strを指定の長さで切り取りtailをくっつける | |
function cutoff(str, len, tail) { |
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
;(function(global, $) { | |
"use strict"; | |
/** | |
* 呼び出し元のjQueryオブジェクトをファイルドロップ可能にする | |
* @param {Object} opt 設定ファイル | |
* @return {this} 呼び出し元のjQueryオブジェクト | |
*/ | |
$.fn.fileDrop = function(opt) { |
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
#include <iostream> | |
#include <vector> | |
#define REP(i, n) for ( int i = 0; i < n; i++ ) | |
using namespace std; | |
int main() { | |
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
// start: 2013/07/11 3:12 | |
// end: 2013/07/12 12:50 | |
#include <cmath> | |
#include <climits> | |
#include <iostream> | |
#include <vector> | |
#include <queue> | |
#define REP(i, n) for ( int i = 0; i < n; i++ ) | |
#define INF INT_MAX |
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
// start: 2:41 | |
// AC: 3:02 | |
#include <iostream> | |
#include <vector> | |
#include <queue> | |
#define REP(i, n) for ( int i = 0; i < n; i++ ) | |
#define MP(a, b) make_pair(a, b) | |
#define MAX 101 |
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
// start: 1:45 | |
// AC: 2:34 | |
#include <cmath> | |
#include <iostream> | |
#include <vector> | |
#define REP(i, n) for ( int i = 0; i < n; i++ ) | |
using namespace std; |
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
// start: 0:34 | |
// end: 2:00 | |
#include <cmath> | |
#include <algorithm> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#define REP(i, n) for ( int i = 0; i < n; i++ ) |
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
<?php | |
error_reporting(1); | |
require("workflows.php"); | |
// 設定ファイルに登録されたユーザ名を返す | |
function get_user_name() { | |
$f = fopen("./user", "r"); | |
return fgets($f); | |
} |
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
<?php | |
require_once('workflows.php'); | |
$wf = new Workflows(); | |
$url = "{query}"; | |
// htmlを取得してtitleタグを抜き出し | |
$html = $wf->request($url); | |
preg_match("/<title>(.*?)<\/title>/i", $html, $match); |