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
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="2.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns="http://www.w3.org/1999/xhtml"> | |
<xsl:template match="/"> | |
<html> | |
<style TYPE="text/css"> | |
body{margin-left:1em} | |
.listbody{margin-left:1em} | |
</style> |
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
//[How do you Invert signed numbers? | Oracle Community](https://community.oracle.com/thread/1253898) | |
public class InvertSignedNumbersTest { | |
private static void print(int i) { | |
System.out.println(i); | |
System.out.format(" :%d\n", (~i+1)); | |
System.out.format(" :%d\n", (i>0?-1:1)*Math.abs(i)); | |
System.out.format(" :%d\n", (~--i)); | |
} | |
public static void main(String[] args) { | |
print(256); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var canvas = document.getElementById('canvas1'); | |
if ( !canvas || !canvas.getContext ) { return false; } | |
var w = canvas.width; | |
var h = canvas.height; | |
var ctx = canvas.getContext('2d'); |
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
javascript:(function(){var l=location,m=l.href.match("^https?://(.+)(api[^+]+|technotes[^+]+)");if(m)l.href='https://docs.oracle.com/javase/8/docs/'+decodeURIComponent(m[2]).replace(/\+.*$/,'').replace(/\[\]/g,':A').replace(/, |\(|\)/g,'-');}()); |
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 example; | |
//-*- mode:java; encoding:utf-8 -*- | |
// vim:set fileencoding=utf-8: | |
//http://java-swing-tips.blogspot.jp/2008/03/jprogressbar-in-jtable-cell.html | |
//at.terai@gmail.com | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.util.*; | |
import java.util.List; |
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 example; | |
//-*- mode:java; encoding:utf-8 -*- | |
// vim:set fileencoding=utf-8: | |
//@homepage@ | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.util.*; | |
import java.util.List; | |
import javax.swing.*; | |
import javax.swing.event.*; |
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 example; | |
//-*- mode:java; encoding:utf-8 -*- | |
// vim:set fileencoding=utf-8: | |
// http://ateraimemo.com/ | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.util.Arrays; | |
import javax.swing.*; | |
import javax.swing.table.*; |
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
# -*- encoding: utf-8 -*- | |
include Java | |
java_import java.awt.BorderLayout | |
java_import java.awt.Color | |
java_import java.awt.Dimension | |
java_import java.util.Random | |
java_import java.util.Vector | |
java_import java.util.concurrent.Executors | |
java_import javax.swing.BorderFactory | |
java_import javax.swing.JButton |
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
# -*- encoding: utf-8 -*- | |
include Java | |
java_import javax.swing.UIManager | |
java_import javax.swing.WindowConstants | |
java_import javax.swing.table.DefaultTableModel | |
def make_ui | |
m = DefaultTableModel.new(nil, ["No.", "Name", "Path"].to_java) | |
m.add_row java.util.Vector.new(["テスト", "あああ", "いいいい"]) | |
m.add_row ["aaa", "bbb", "ccc"].to_java | |
t = javax.swing.JTable.new m |
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
# -*- encoding: utf-8 -*- | |
include Java | |
java_import java.awt.Color | |
java_import java.awt.EventQueue | |
java_import java.awt.Font | |
java_import java.awt.RenderingHints | |
java_import java.awt.event.ActionListener | |
java_import java.awt.font.FontRenderContext | |
java_import java.awt.font.TextLayout | |
java_import javax.swing.JComponent |