bhags
Big Hairy Audacious Goals
-
-
最適化のために参考になるアルゴリズム
Karatsuba 法による乗算 n 桁の乗算を行うには Ο(n2) の計算量が必要であるが、Karatsuba法では Ο(nlog23)で可能 http://www.finetune.co.jp/~lyuka/technote/fract/bmul.html バケットSort 一般にソートはΟ(nlogn)が必要だが制限付きでΟ(n)で実現する Wiki バケットSort Consistent hashing コンシステントハッシュ法 (Consistent hashing) はスロットの追加や削除に対して、最小限のキーのスロットへのマッピングの変更で、ハッシュテーブルの機能を提供することのできる特殊なハッシュ法。 http://www.hyuki.com/yukiwiki/wiki.cgi?ConsistentHashing
-
Flash tutorial
まず読むべき http://help.adobe.com/ja_JP/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e36.html
-
swf間でメッソドよびだし
action script3 swf間でのコミュニケーション Official document http://kb2.adobe.com/community/publishing/918/cpsid_91887.html http://www.fabiobiondi.com/blog/2009/08/swf-to-swf-communication-in-flash-csx-how-to-call-methods-between-swf-files/ Commentの loader.load( new URLRequest(“Page.swf”), new LoaderContext(false, new ApplicationDomain())); がkeypoint
-
interface メソッド build が互換性のない署名を使用して…
JavaプログラマーがActionscript3コードを書くと言語仕様に起因する幾つかの問題に直面する。 例えば以下の仕様 – enumの不在 -Abstractの不在 その中で悩みの種となったのはinterfaceの実装の際、戻り値が厳格すぎることである。 例えばinterfaceの戻り値がClass Aのオブジェクトであれば実相時は必ずClass Aのオブジェクトを 返す必要がある。Class AのSuper Class, Sub Class 共にだめである。 以下サイトに識者らのやりとりが参考になる。 http://stackoverflow.com/questions/7837855/actionscript-overriding-methods-in-extended-interfaces-vs-java
-
Vert.x 3.1.0 Tutorial – 2 : Hello World TEST
Vert.x applicationはJUnitとvertx-unitでunitテストが可能なので 今回は前回のHello WorldのUnitテスト手順を投稿 本家の説明はこちら 前回の記事はこちら 今回のソースはこちら 1.依存関係追加 JUnitとvertx-unitテスト用の依存関係をpom.xmlに追加 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>io.vertx</groupId> <artifactId>vertx-unit</artifactId> <version>3.1.0</version> <scope>test</scope> </dependency> 追加後libraryを更新[Maven Project パネルより->Reimport all maven projectsを実施] 2.テストソース 以下ソースをsrc/test/java/tutorial/vertx/HelloVerticleTest.javaに生成 /** * Created by bhags on 15/11/08. */ package tutorial.vertx; import io.vertx.core.Vertx; import io.vertx.ext.unit.Async; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.junit.VertxUnitRunner; import io.vertx.core.logging.LoggerFactory; import io.vertx.core.logging.Logger; import org.junit.After; import org.junit.Before;…
-
Vert.x 3.1.0 Tutorial – 1 : Hello World
Vert.xの紹介は本家サイト(http://vertx.io/)に譲ってとりあえずHello Word! まず、今回のソースコードはこちら 0.開発環境 Mac OS X java 1.8 以上 IntelliJ 14. 1 : IntelliJでmaven新規プロジェクト作成 File ->New -> Project Mavenを選択しNext maven project 設定 GroupId : totorial.vertx ArtifactId : hello-verticle Version : 1.0-SNAPSHOT Project name / location name : hello-virticle location : すきなところへ 2 : pom.xml に依存関係を追加 以下の依存関係およびbuildをpom.xml のversionの下に追加 <dependencies> <dependency> <groupId>io.vertx</groupId> <artifactId>vertx-core</artifactId> <version>3.1.0</version> </dependency> </dependencies>…
-
Vert.x 3.1.0 Service Tutorial
[前置き] Vert.x 3.0よりv直接classnameもしくはscript nameを利用しdeployせずに, ServicVerticleFactoryを利用しdeployすることが可能。 [Tutorial] 1.pom.xmlに以下のService Factory Dependencyを追加 <dependency> <groupId>io.vertx</groupId> <artifactId>vertx-service-factory</artifactId> <version>3.0.0</version> </dependency> ServiceFactoryはservice nameを元にverticleをdeployするためのVeticleFactoryの実装 2.First Sample Service – Serviceが呼び出されたら”This is my test service”を出力 package biz.playport.vertx.services; import io.vertx.core.AbstractVerticle; import io.vertx.core.logging.Logger; import io.vertx.core.logging.LoggerFactory; /** * Created by bhags on 15/11/07. */ public class FirstServiceVerticle extends AbstractVerticle { private final static Logger log = LoggerFactory.getLogger(FirstServiceVerticle.class); @Override…
-
Vert.x Web IntelliJ First Web Site
[Vert.x]でRest Application Serverを構築することになったのでテスト Firt To Go http://vertx.io/blog/my-first-vert-x-3-application/ VertX init.d http://vertx.io/blog/vert-x-3-init-d-script/ //TEST JSON http://52.32.87.126:8080/api/whiskies //VertX run fatjar with instance setup vertx run io.vertx.blog.first.MyFirstVerticle -cp my-first-app-1.0-SNAPSHOT-fat.jar -instances 10
-
install Vert.x on EC2
Vert.xをEC2にインストール 公式サイト:http://vertx.io/vertx2/install.html 1.instance type [c4.xlarge] = 公式なおすすめサーバのリストより。 (HVM設定を強くおすすめされた。) 2.yum update とりあえずyum update 3.JDK install (require version >1.7) rpm -ivh ./jdk-8u65-linux-x64.rpm 4.設置確認 ls -l /usr/java/ 5.add bin path on ~/.bash_profile PATH=$PATH:$HOME/bin:/usr/java/default/bin/ 6.refresh source ~/.bash_profile [Install Vert.x] 1.download wget https://bintray.com/artifact/download/vertx/downloads/vert.x-2.1.5.tar.gz 2.unarchived tar -zxf vert.x-2.1.5.tar.gz 3.add bin path PATH=$PATH:$HOME/bin:/usr/java/default/bin/:/root/vert.x-2.1.5/bin 4.refresh source ~/.bash_profile 5.check version vertx version 6.TEST –…