今回は定期実行に便利なタイマーです。 ストップウォッチを例題にTimer処理のポイントを3つ、紹介します。 マルチスレッド処理について TimerやTimerTaskはcancelメソッド実行後は再利用できない Androidの描画手順(UI Threadを使うシングルスレッドモデル) Androidでもjava.util.Timerが利用可能です。 ご存じの通り、Timerは新しいタスク(スレッド/Thread)を作成して、指定した遅延時間がたつと実行されます。 AndroidでTimerを使う際は、とくにスレッド処理について意識する必要があります。 経験上、タイマーを使う際は処理のついでに描画を更新したいときが多いのですが、Activityの描画ロジックがシングルスレッド前提で設計されているためです。 最初に1.スレッドについて紹介します。次に、ストップウォッチを例に2.タイマー処理を
一定時間後にこの処理を実行、などということをJavaでやるにはTimerTaskとTimerなどを使う。Androidでもそれはできるけど、TimerでやるとGUIを動かしてるメインスレッドと別のスレッドで動くことになるから結局Handler経由で操作しなきゃいけないし、毎回TimerTaskをnewする必要なんかもあったりするのはAndroidみたいな環境では嬉しくない。 android.os.Handlerを使いましょう。 public class AndroidTest extends Activity { private int count = 0; private final Context context = this; private final Handler handler = new Handler(); private final Runnable showMessa
オーストラリアの永住権も取った。会社も興した。結婚も(離婚も)した。そして今、日本のためにやりたいことが村上福之さんにはある。 「これだけは絶対書いてね。みんな、ブログを読んでくれてありがとう。タイの募金もありがとうって」――村上福之さんは2011年10月、洪水で被害にあったタイへの義損金を募るエントリーをオルタナティブ・ブログに書いた。主旨に賛同した読者の数406人、3日間で280万円もの義損金が集まった。 経過報告はタイ大使館に義損金を持参した際の受取証や、大使館からの感謝状などの写真とともに行われ、感謝の気持ちを込めて協力者の一覧が掲載された。 村上さんは、アルファブロガー運営委員会が主催する「アルファブロガー・アワード2010」で個人ブログ部門を受賞した村上福之の「ネットとケータイと俺様」を執筆する人気ブロガーであり、Android用電子書籍ビューワー「androbook」や個人が
著者の五十嵐さん櫻井さんに献本をおねだりしてお送りしていただきました。 たのしい開発 スタートアップRuby 作者: 大場寧子,大場光一郎,五十嵐邦明,櫻井達生出版社/メーカー: 技術評論社発売日: 2012/07/31メディア: 単行本(ソフトカバー)購入: 3人 クリック: 140回この商品を含むブログ (15件) を見る この本は、Ruby言語の使い方そのものではなく、それをとりまく文化や、アジャイル開発など、現在の「ふつう」の開発現場について説明した本です。 もくじ Chapter 1 : 「たのしい開発」を求めて Chapter 2 : Ruby の基礎知識 Chapter 3 : Ruby を使ってみよう Chapter 4 : Ruby on Rails とは Chapter 5 : Rails を触ってみよう Chapter 6 : Ruby の文化 Chapter 7 :
Ruby support can be added to any modern Android application by adding JRuby as a dependency. The Ruboto project aims to add some additional sample code to make the integration between Java, Ruby, and the Android platform a pleasant developer experience. The Apps created thereafter depend on JRuby (jruby-jars) at runtime to provide full access to Android's Java APIs. Installation is straight-forwar
This document discusses using Jenkins to run continuous integration jobs on Amazon EC2 instances. It describes how to launch a Jenkins slave node on an EC2 instance using the EC2 API tools and SSH. The Jenkins slave node runs jobs and reports back to the Jenkins master, and the EC2 instance can be automatically started before jobs and stopped afterwards to avoid costs when not in use.Read less
Setting up continuous integration for Rails has been a complicated undertaking in the past. Rails needs to be tested against different Ruby versions and various modes (such as running test cases in isolation/non-isolation, running ActiveRecord with identitymap enabled/disabled). This made the test suite run for an isanely long time (up to 2 hours on 1.9.2 alone) and required regular maintenance by
Try TeamCity - the powerful Continuous Integration and Deployment tool for Developers and DevOps Engineers.
Captcha security check appelier.com is for sale Please prove you're not a robot View Price Processing
CruiseControl is both a continuous integration tool and an extensible framework for creating a custom continuous build process. It includes dozens of plugins for a variety of source controls, build technologies, and notifications schemes including email and instant messaging. A web interface provides details of the current and previous builds. And the standard CruiseControl distribution is augment
継続的インテグレーション 継続的インテグレーションツールとは、バージョン管理システムにある最新ソースを定期的に取得してビルドおよびテストを実行し、テスト結果を出力するものです(参考)。継続的にテストを行うことで、システム全体の品質改善が期待され、統合に伴う問題を減らすことができます。ここでは代表的なツールであるJenkinsを使って、RSpecのテストコードを定期的に実行するための設定方法と結果表示を紹介し、継続的インテグレーションの概要を説明します。 以下の条件を前提とします。 ・Ruby1.9.3 ・Rails2.3.1 ・RSpec2.8.0 ・Subversionによるコード管理 1.対象とするアプリケーションの準備 既にRSpecのテストコードが含まれたアプリケーションがあれば、このセクションをスキップしても構いませんが、JenkinsでRuby1.9系を用いてカバレージを取得す
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く