Skip to content

Instantly share code, notes, and snippets.

View akjava's full-sized avatar

Aki Miyazaki akjava

View GitHub Profile
@akjava
akjava / VelocityUtils.java
Created May 19, 2013 13:43
util class for use velocity in Google App Engine/Java
import java.io.StringWriter;
import java.util.Map;
import javax.servlet.ServletContext;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
@akjava
akjava / metaconvert.js
Created May 27, 2013 05:03
Conver meta text to document for Google Apps Script works in Document container. metas line equals #page , do page break line ends with #14b ,line convert to font-size 14 and bold text
/**
Conver meta text to document
metas
line equals #page , do page break
line ends with #14b ,line convert to font-size 14 and bold text
todo
#{font-size}{i|b|p|ib};
@akjava
akjava / DropVerticalPanelBase.java
Created June 1, 2013 06:46
Vertical Panel support drop file ,Test on Chrome 27
package com.akjava.gwt.html5.client.file.ui;
import com.google.gwt.event.dom.client.DragLeaveEvent;
import com.google.gwt.event.dom.client.DragLeaveHandler;
import com.google.gwt.event.dom.client.DragOverEvent;
import com.google.gwt.event.dom.client.DragOverHandler;
import com.google.gwt.event.dom.client.DropEvent;
import com.google.gwt.event.dom.client.DropHandler;
import com.google.gwt.event.dom.client.HasDragLeaveHandlers;
import com.google.gwt.event.dom.client.HasDragOverHandlers;
@akjava
akjava / ServletMaker.java
Created June 4, 2013 11:19
GWT paste receive test.
package com.akjava.gwt.servletmaker.client;
import com.akjava.gwt.lib.client.LogUtils;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.dom.client.DataTransfer;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
@akjava
akjava / GWTWebWorkersSample.gwt.xml
Created September 11, 2014 09:30
GWTWebWorker Sample
<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module rename-to='gwtwebworkerssample'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
@akjava
akjava / tileMapToCubeTextureImages
Created March 6, 2019 07:50
convert TileMap Image(4x3 Old equirectangular format) to cube texture map on three.js
function tileMapToCubeTextureImages(image){//image must be loaded
var positions=[
[2,1],//right
[0,1],//left
[1,0],//up
[1,2],//down
[1,1],//front
[3,1],//back
]
var images=[];