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
// Finder | |
try (Tx tx = new Tx(sf)) { | |
{ | |
DBTest test = tx.from(DBTest.class).uniq(); | |
assertNotNull(test); | |
} | |
{ | |
DBTest test = tx.from(DBTest.class).where("name = 'aaa'").uniq(); | |
assertNotNull(test); | |
} |
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 info.kinumi.common; | |
import static org.junit.Assert.assertNotNull; | |
import static org.junit.Assert.assertNull; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.cfg.Configuration; | |
import org.junit.Test; | |
public class TxTest { |
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 info.kinumi.common; | |
import org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.Transaction; | |
/** | |
* try-with-resourcesを使ったトランザクション | |
* | |
* try (Tx tx = new Tx(sf)) { |
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 load = this.load; | |
this.win.addEventListener("open", function() { | |
load(); | |
}); | |
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
Ti.include("win_search.js"); | |
var tabGroup = Titanium.UI.createTabGroup(); | |
var tab1 = Titanium.UI.createTab({ | |
icon: "KS_nav_views.png", | |
title: "検索", | |
window: (new SearchWindow1().win) | |
}); |
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
#pragma Public APIs | |
-(id)stringFromShiftJISData:(id)args | |
{ | |
ENSURE_SINGLE_ARG(args, NSObject); | |
if ([args isKindOfClass:[TiBlob class]]) { | |
TiBlob *blob = (TiBlob*)args; | |
return [[[NSString alloc] initWithData:blob.data encoding:NSShiftJISStringEncoding] autorelease]; | |
} | |
else { |
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
Target[cputemp]: `/usr/bin/sensors | grep temp1 | awk '{print $2}' | sed -e 's/+//' -e 's/[^0-9+\.].*//';echo 0.0` | |
MaxBytes[cputemp]: 100 | |
Title[cputemp]: CPU Temperature | |
PageTop[cputemp]: <h1>CPU Temperature</h1> | |
Options[cputemp]: growright,absolute,gauge,nopercent,noinfo | |
WithPeak[cputemp]: ymw | |
#unscaled[cputemp]: dwmy | |
YLegend[cputemp]: Temperature | |
ShortLegend[cputemp]: C | |
LegendI[cputemp]: CPU |
NewerOlder