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 udp_socket_writer = function(host, port, string) { | |
var string2ArrayBufferAndWrite = function(str) { // http://goo.gl/1eJnn | |
var bb = new WebKitBlobBuilder(); | |
bb.append(str); | |
var f = new FileReader(); | |
f.onload = function(e) { | |
var data = e.target.result; | |
chrome.experimental.socket.create( | |
'udp', {}, |
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
#!/bin/sh | |
java -cp /opt/src/checkstyle-5.5/checkstyle-5.5-all.jar com.puppycrawl.tools.checkstyle.Main \ | |
-c /opt/src/checkstyle-5.5/sun_checks.xml "$1" |
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
;; flymake + checkstyle | |
(require 'flymake-cursor) | |
(add-hook 'java-mode-hook | |
'(lambda () | |
(flymake-mode t))) | |
(when (load "flymake" t) | |
(defun flymake-java-checkstyle-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name |
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 jython | |
# -*- coding: utf-8 -*- | |
# Copyright : (c) SAEKI Yoshiyasu | |
# License : MIT-style license | |
# <http://www.opensource.org/licenses/mit-license.php> | |
# last updated: 2012/04/01 | |
from java.lang import String | |
from java.net import URL |
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
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2012/03/31 | |
**/ | |
import java.net.{URL, URLConnection, URLStreamHandler, URLStreamHandlerFactory} | |
import java.io.{InputStream, InputStreamReader, ByteArrayInputStream} |
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 Mode { | |
public static void main(String[] args) { | |
System.out.println(System.getProperty("sun.arch.data.model")); | |
} | |
} |
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 python | |
import struct | |
print(struct.calcsize("P")) # "P" = (void *) ; seealso: http://docs.python.org/library/struct.html#format-characters |
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
#include<stdio.h> | |
int main() { | |
printf("%ld\n", sizeof(void *)); | |
return 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
use warnings; | |
use strict; | |
use Config; | |
print $Config{ptrsize}; |
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 org.saekiyoshiyasu.common; | |
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2012/03/16 | |
**/ | |
import java.net.URL; |