Skip to content

Instantly share code, notes, and snippets.

@ashigeru
ashigeru / MEMO.md
Created March 1, 2014 05:09
Headless Eclipse Plug-in Installation memo
eclipse \
  -nosplash \
  -application org.eclipse.equinox.p2.director \
  -repository <update-site-urls> \
  -installIU <install-unit-id>
  • <update-site-urls> はカンマ区切りでURLを複数指定可能
  • `` は Eclipseの Help &gt; About &gt; Installation Details の `Id` カラムの値
public class Hibernate {
public static void main(String[] args) throws Exception {
// 次の状態を起動して、終わったらその次の状態を保存
save(restore().call());
}
@MakeCallable
static Callable<?> start() {
System.out.println("最初");
@ashigeru
ashigeru / Scan.java
Created February 4, 2010 14:07
レンジスキャンのアレ
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.NavigableSet;
import java.util.Queue;
import java.util.SortedSet;
import java.util.TreeSet;
public class Scan {
@ashigeru
ashigeru / CursorReviewServlet.java
Created February 11, 2010 00:45
QueryResultList
package com.example;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@ashigeru
ashigeru / CursorReviewServlet.java
Created February 11, 2010 00:50
QueryResultIterator
package com.example;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@ashigeru
ashigeru / gist:304094
Created February 14, 2010 15:37
slim3 gtx discussion on #ajn5
// #ajn5 でビール飲みながら討論したgtxネタ。
差分は
>>
old
--
new
<<
な感じで書きます。
**** トランザクションエンティティの寄生
package slim3.controller;
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.datastore.Datastore;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Transaction;
public class HelloController extends Controller {
@ashigeru
ashigeru / AddController.java
Created May 12, 2010 15:11
Z曲線とかどうなの?
package com.ashigeru.appengine.query.tiling.controller.zorder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.arnx.jsonic.JSON;
@ashigeru
ashigeru / DatastoreClassLoader.java
Created June 4, 2010 17:07
プロダクション環境でHot Reloadingしたい。
/*
* Copyright 2010 @ashigeru.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
import static org.junit.Assert.*;
import org.junit.Test;
import org.slim3.tester.AppEngineTestCase;
import com.google.appengine.api.datastore.Entity;
public class HasParentButIsIncomplete extends AppEngineTestCase {
@Test