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
Verifying that +ymnk is my openname (Bitcoin username). https://onename.io/ymnk |
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
// The following code is from http://www.academicpub.org/PaperInfo.aspx?PaperID=14496 . | |
import java.math.BigInteger; | |
import java.security.*; | |
import java.security.spec.*; | |
import javax.crypto.KeyAgreement; | |
public class ECCKeyAgreement { | |
public static void main(String[] args) throws Exception { | |
KeyPairGenerator kpg; | |
kpg = KeyPairGenerator.getInstance("EC","SunEC"); |
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
http://devtesting.jp/tddbc/?TDDBC%E4%BB%99%E5%8F%B003/%E8%AA%B2%E9%A1%8C |
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
class Interval { | |
private Point upper; | |
private Point lower; | |
private Interval(Point lower, Point upper) { | |
if (lower != infinite && upper != infinite | |
&& !inclusive(lower.p).greater(upper.p)) | |
throw new IllegalArgumentException(lower + " " + upper); | |
this.lower = lower; |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
<!-- | |
// Geolocation API[1] を使って、 | |
// 開始地点と現在地の緯度・経度、及び両者の差を表示するためのプログラム | |
// [1] http://en.wikipedia.org/wiki/W3C_Geolocation_API | |
// 開始地点の緯度・経度を保持する変数 | |
var start_latitude; |
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
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ | |
import com.jcraft.jsch.*; | |
import java.awt.*; | |
import javax.swing.*; | |
import java.io.*; | |
import java.util.zip.GZIPInputStream; | |
public class Shell{ | |
public static void main(String[] arg){ |
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
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ | |
/** | |
* This program will demonstrate how to use "aes128-cbc". | |
* | |
*/ | |
import com.jcraft.jsch.*; | |
import java.awt.*; | |
import javax.swing.*; | |
public class AES{ |
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
$ scala | |
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) Client VM, Java 1.6.0_16). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> :paste | |
// Entering paste mode (ctrl-D to finish) | |
trait X { | |
val a = "" |
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
ymnk@ubuntu:~/tmp/jruby-1.6.5$ ./bin/jruby -v -e "require 'zlib'; while true; Zlib::Deflate.new; end" | |
jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.6.0_29) [linux-i386-java] | |
Killed | |
ymnk@ubuntu:~/tmp/jruby-1.6.5$ ../jruby/bin/jruby -v -e "require 'zlib'; while true; Zlib::Deflate.new; end" | |
jruby 1.7.0.dev (ruby-1.8.7-p330) (2011-11-04 fbeb240) (Java HotSpot(TM) Client VM 1.6.0_29) [linux-i386-java] |
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 'zlib' | |
dict = "hello" | |
str = "hello, hello!" | |
d = Zlib::Deflate.new | |
d.set_dictionary(dict) | |
comp_str = d.deflate(str) | |
comp_str << d.finish |
NewerOlder