Masaatoshi Ito の備忘録

主にザウルス(SL-C3100)に関する備忘録を書いています。更新停滞中&書く内容迷走中…。

NowMushバージョンアップ

2013年09月07日 17時49分51秒 | Android/自作ソフト
予定通りNowMushをバージョンアップしました。
日時ピッカー以外にダイアログでも値を変更できるようにしました。

NowMush - Google Play
https://play.google.com/store/apps/details?id=jp.mito.nowmush

APKファイルとソース - Google Code
https://code.google.com/p/mito-android-sources/downloads/detail?name=NowMush-1.4.0.apk
https://code.google.com/p/mito-android-sources/source/browse/tags/NowMush-1.4.0

そう言えば、Google Codeでのダウンロード機能が、その内無くなるんですよね。
とりあえず、どうしようかなぁと思ってみたりしています。
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

NowMushバージョンアップ予定

2013年09月06日 12時00分00秒 | Android/自作ソフト
ブログの更新低迷や書く内容が迷走している中で、とりあえず作成しているAndroidアプリについてでも書こうと思います。

現在、AndroidアプリのNowMushについてバージョンアップ予定です。

変換前の文字列を入力しなかった場合に、日時ピッカーだけでなく、某カレンダーアプリの時間入力のようなダイアログでの入力方法ができるように機能追加中です。
早い話がパクり参考にさせてもらいました。

結果、せっかく作った日時ピッカーの意味が薄れるとは思いますが…。
作った本人が言うのも何ですが、完全に新しい値を入力するのは不便ですし…。

とりあえずスクショです。
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

ZaurusのIME

2012年07月12日 22時54分56秒 | Zaurus
最近、現役でZaurusを使用している方は、IMEに何を使用しているのか、少し気になったりしています。
単純に、ブログのネタがないので、ふと思ったことを書いてみただけですが。

ちなみに、ZaurusのIMEは、AnthyとかQPOBoxとかSKKとかPRIMEとか標準とかが思い当たりますが、他にもありますでしょうか?

まあ、あまりおられないと思いますが、コメントとかに使用しているIMEを書いていただけると、個人的にありがたいです。
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

UIViewControllerのテンプレート

2011年02月24日 00時29分29秒 | Objective-C
いきなりですが、Zaurusではなく、iPhoneアプリの開発の話です。

最近、iPhoneアプリの開発を仕事でやっているので、色々なサイトを参考にしながらUIViewControllerのテンプレートを作って備忘録として書いてみました。
本来であれば、参考サイトを書いておくべきなのでしょうが、今回は保留とさせてください。(すみません、めんどくさがり屋なだけです。)
色々と独断と偏見が入っています。とりあえず、自分でMacは持っていないので空で打ってみました。
なので、コンパイルが通るかどうか不明です。
//
// TemplateViewController.h
//
#import <UIKit/UIKit.h>

@interface TemplateViewController : UIViewController {
 @private
  UIView   *outletView1_;  // 
  UIView   *allocView1_;   // 
  NSObject *valueObject1_; // 
  NSObject *valueObject2_; // 
}

@property(nonatomic,retain) IBOutlet UIView *outletView1; // 

+ (id)templateViewControllerWithObject:(NSObject *)object;
- (id)initWithObject:(NSObject *)object;

- (void)publicMethodWithObject:(NSObject *)object;

- (IBAction)action1:(id)sender;

@end

//
// TemplateViewController.m
//
#import "TemplateViewController.h"

@interface TemplateViewController()

@property(nonatomic,retain) UIView   *allocView1;   // 
@property(nonatomic,retain) NSObject *valueObject1; // 
@property(nonatomic,retain) NSObject *valueObject2; // 

@end

@interface TemplateViewController(Private)

- (void)privateMethodWithObject:(NSObject *)object;

@end

@implementation TemplateViewController

@synthesize outletView1  = outletView1_;  // 
@synthesize allocView1   = allocView1_;   // 
@synthesize valueObject1 = valueObject1_; // 
@synthesize valueObject2 = valueObject2_; // 

+ (id)templateViewControllerWithObject:(NSObject *)object {
  NSLog(@"%s", __FUNCTION__);
  return [[[self alloc] initWithObject:object] autorelease];
}

- (id)init {
  NSLog(@"%s", __FUNCTION__);
  return [self initWithObject:nil];
}

- (id)initWithObject:(NSObject *)object {
  NSLog(@"%s", __FUNCTION__);
  if(self = [super init]) {
    [self setValueObject1:object];
    [self setValueObject2:[[[NSObject alloc] init] autorelease]];
  }
  return self;
}

- (void)dealloc {
  NSLog(@"%s", __FUNCTION__);
  [self setOutletView1:nil];
  [self setAllocView1:nil];
  [self setValueObject1:nil];
  [self setValueObject2:nil];
  [super dealloc];
}

- (void)didReceiveMemoryWarning {
  NSLog(@"%s", __FUNCTION__);
  [super didReceiveMemoryWarning];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  NSLog(@"%s", __FUNCTION__);
  switch(interfaceOrientation) {
    case UIInterfaceOrientationPortrait:
    case UIInterfaceOrientationPortraitUpsideDown:
    case UIInterfaceOrientationLandscapeLeft:
    case UIInterfaceOrientationLandscapeRight:
      return YES;
    default:
      return NO;
  }
}

- (void)viewDidLoad {
  NSLog(@"%s", __FUNCTION__);
  [super viewDidLoad];
  UIView *view;
  view = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
  [[self view] addSubView:view];
  [self setAllocView1:view];
}

- (void)viewDidUnload {
  NSLog(@"%s", __FUNCTION__);
  [self setOutletView1:nil];
  [self setAllocView1:nil];
  [super viewDidUnload];
}

- (void)viewWillAppear:(BOOL)animated {
  NSLog(@"%s", __FUNCTION__);
  [super viewWillAppear:animated];
}

- (void)viewDidAppear:(BOOL)animated {
  NSLog(@"%s", __FUNCTION__);
  [super viewDidAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated {
  NSLog(@"%s", __FUNCTION__);
  [super viewWillDisappear:animated];
}

- (void)viewDidDisappear:(BOOL)animated {
  NSLog(@"%s", __FUNCTION__);
  [super viewDidDisappear:animated];
}

- (void)publicMethodWithObject:(NSObject *)object {
  [self setValueObject1:object];
  [self setValueObject2:object];
}

- (IBAction)action1:(id)sender {
  [self privateMethodWithObject:sender];
}

@end

@implementation TemplateViewController(Private)

- (void)privateMethodWithObject:(NSObject *)object {
  [self setValueObject2:object];
}

@end
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

ZauCashのxslファイル

2010年12月02日 22時52分55秒 | Zaurus
私は、Zaurusで家計簿を付けるのに、以前はHancomSheetを使用していたのですが、最近(とは言っても半年ぐらい前から)ZauCashを使用させていただいています。
かなり時間が経ってしまっているため、詳しいことを忘れてしまいましたが、PCのFirefoxなどで家計簿のデータのxmlを開くとき、zaucash.xslを用意しておくと見やすく表示させることができます。
その機能を使用して、集計等をできる機能を実現していたのですが、久しぶりにブログのネタ&備忘録として記載しておきます。
以下が私が使用しているzaucash.xslファイルです。

zaucash.xsl
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- ルート要素 -->
<xsl:template match="/">
<html>
<head>
<title>ZauCashデータ</title>
</head>
<body text="#000000" bgcolor="#ffffff">
<h1>ZauCashデータ</h1>
<xsl:apply-templates mode="table"/>
<p></p>
<xsl:apply-templates mode="kindof"/>
<p></p>
<xsl:apply-templates mode="total"/>
</body>
</html>
</xsl:template>

<!-- 一覧表 -->
<xsl:template match="zaucash" mode="table">
<table border="1" cellpadding="4" cellspacing="0">
<tr bgcolor="#ccffff">
<th>日付</th>
<th><font color="gold">■</font>収入</th>
<th><font color="blue">■</font>支出</th>
<th>費目</th>
<th>メモ</th>
</tr>
<xsl:for-each select="record">
<xsl:sort select="@date" order="ascending"/>
<tr bgcolor="#ffffcc">
<td><xsl:value-of select="substring-before(@date,' ')"/></td>
<xsl:if test="@type='収入'">
<td align="right">
<xsl:value-of select="format-number(@money, '###,##0')"/>
</td>
<td align="right">-</td>
</xsl:if>
<xsl:if test="@type='支出'">
<td align="right">-</td>
<td align="right">
<xsl:value-of select="format-number(@money, '###,##0')"/>
</td>
</xsl:if>
<td><xsl:value-of select="@category"/></td>
<td><xsl:value-of select="@memo"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>


<!-- 項目別 -->
<xsl:template match="zaucash" mode="kindof">
<table border="1" cellpadding="4" cellspacing="0">
<tr bgcolor="#ccffff">
<th>種別</th>
<th>費目</th>
<th>合計</th>
</tr>
<xsl:for-each select="record">
<xsl:sort select="@type"/>
<xsl:sort select="@category"/>
<xsl:variable name="v1" select="@type" />
<xsl:variable name="v2" select="@category" />
<!-- 自分よりも前に同じノードがあった場合は集計済みなので無視 -->
<xsl:if test="count(preceding-sibling::record[@type=$v1][@category=$v2]) = '0'">
<!-- 自分よりも後ろにあるノードの集計 -->
<tr bgcolor="#ffffcc">
<xsl:if test="@type='収入'">
<td><font color="gold">■</font><xsl:value-of select="@type"/></td>
</xsl:if>
<xsl:if test="@type='支出'">
<td><font color="blue">■</font><xsl:value-of select="@type"/></td>
</xsl:if>
<td><xsl:value-of select="@category"/></td>
<td align="right"><xsl:value-of select="format-number(sum(following-sibling::record[@type=$v1][@category=$v2]/@money)+@money, '###,##0')"/></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:template>

<!-- 合計表 -->
<xsl:template match="zaucash" mode="total">
<xsl:variable name="incomeTotal">
<xsl:choose>
<xsl:when test="record/@money[../@type='収入']">
<xsl:value-of select="sum(record/@money[../@type='収入'])"/>
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="expendTotal">
<xsl:choose>
<xsl:when test="record/@money[../@type='支出']">
<xsl:value-of select="sum(record/@money[../@type='支出'])"/>
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<table border="1" cellpadding="4" cellspacing="0">
<tr bgcolor="#ccffff">
<th><font color="gold">■</font>収入</th>
<th><font color="blue">■</font>支出</th>
<th>残金</th>
</tr>
<tr bgcolor="#ffffcc">
<td align="right"><xsl:value-of select="format-number($incomeTotal, '###,##0')"/></td>
<td align="right"><xsl:value-of select="format-number($expendTotal, '###,##0')"/></td>
<td align="right"><xsl:value-of select="format-number($incomeTotal - $expendTotal, '###,##0')"/></td>
</tr>
</table>
</xsl:template>

</xsl:stylesheet>

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする