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
package jp.osima.android.mindmemo; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.util.AttributeSet; | |
import android.view.MotionEvent; |
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
--- xhtml-to-xslfo.xsl 2011-08-25 21:32:10.934401544 +0900 | |
+++ xhtml-to-xslfo.xsl.changed 2011-08-25 21:32:22.450401527 +0900 | |
@@ -178,32 +178,25 @@ | |
margin-right="72pt" margin-left="72pt" | |
margin-bottom="36pt" margin-top="72pt"> | |
<fo:region-body margin-bottom="50pt"/> | |
- <fo:region-after region-name="ra-right" | |
- extent="25pt"/> | |
+ <fo:region-after region-name="ra-right" extent="25pt"/> | |
</fo:simple-page-master> |
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
@Grab(group='org.apache.xmlgraphics', module='fop', version='1.0') | |
import org.apache.fop.apps.* | |
import javax.xml.transform.* | |
import javax.xml.transform.sax.SAXResult | |
import javax.xml.transform.stream.StreamSource | |
def fo = new File(args[0]) |
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
copy = { File src,File dest-> | |
def input = src.newDataInputStream() | |
def output = dest.newDataOutputStream() | |
output << input | |
input.close() | |
output.close() | |
} |
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
json = '{"twitter":"@osima.jp","web site":["http://osima.jp/","http://www.my-notebook.net/"]}' | |
println groovy.json.JsonOutput.prettyPrint(json) |
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.io.*; | |
public class Test{ | |
private static char SPACE='\u3000'; | |
public static void main(String[] args){ | |
if(args.length<1){ | |
System.exit(0); |
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.awt.Image | |
import java.awt.image.BufferedImage | |
import javax.imageio.ImageIO | |
// 事前準備 | |
// resize メソッドを追加する | |
java.awt.Image.metaClass.resize = { mWidth,mHeight-> | |
def imgScaled = delegate.getScaledInstance(mWidth,mHeight,Image.SCALE_SMOOTH) | |
def img2 = new BufferedImage((int)imgScaled.width,(int)imgScaled.height,BufferedImage.TYPE_4BYTE_ABGR) |
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
@Grab(group='commons-httpclient', module='commons-httpclient', version='3.1') | |
import org.apache.commons.httpclient.* | |
import org.apache.commons.httpclient.methods.* | |
def encoding = 'UTF-8' | |
def gistUrl = 'https://gist.github.com/raw/949445' | |
def hc = new HttpClient() |
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.regex.* | |
def br = System.getProperty('line.separator') | |
def getNoteBody = { | |
def out = ''<<'' | |
def noteHeaderEnd=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
// | |
// http://www.my-notebook.net/3556cc11-42d5-471e-ba0b-c6946269a118.html | |
// | |
package test; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.net.URLEncoder; |