Sunday, May 27, 2012
AKKA
http://typesafe.com/stack/download
http://typesafe.com/resources/getting-started/tutorials/getting-started.html
For AKKA/Java:
> g8 typesafehub/akka-java-maven
For AKKA/Scala:
> g8 typesafehub/akka-scala-sbt
For Play/Java:
> g8 typesafehub/play-java
For Play/Scala:
> g8 typesafehub/play-scala
Thursday, May 17, 2012
Android's component-oriented architecture
To make the reuse concept concrete, suppose you’re creating a drawing app that lets users choose a color from a palette, and suppose that another app has developed a suitable color chooser and permits this component to be reused. In this scenario, the drawing app can call upon that other app’s color chooser to have the user select a color rather than provide its own color chooser. The drawing app doesn’t contain the other app’s color chooser or even link to this other app. Instead, it starts up the other app’s
color chooser component when needed.
Android starts a process when any part of the app (such as the aforementioned color chooser) is needed, and instantiates the Java objects for that part. This is why Android’s apps don’t have a single entry point (no C-style main() function, for example). Instead, apps use components that are instantiated and run as needed.
Monday, April 23, 2012
Start/Stop ADB with Trace Turned On
platform-tools $ ADB_TRACE=all ./adb.exe kill-server
system/core/adb/adb.c::main():Handling commandline()
system/core/adb/adb_client.c::_adb_connect():_adb_connect: host:kill
system/core/adb/sysdeps_win32.c::socket_loopback_client():socket_loopback_client: port 5037 type tcp => fd 100
system/core/adb/transport.c::writex():writex: fd=100 len=4: 30303039 0009
system/core/adb/transport.c::writex():writex: fd=100 len=9: 686f73743a6b696c6c host:kill
system/core/adb/transport.c::readx():readx: fd=100 wanted=4
system/core/adb/transport.c::readx():readx: fd=100 wanted=4 got=4
4f4b4159 OKAY
system/core/adb/adb_client.c::_adb_connect():_adb_connect: return fd 100
platform-tools $ ADB_TRACE=all ./adb.exe kill-server
system/core/adb/adb.c::main():Handling commandline()
system/core/adb/adb_client.c::_adb_connect():_adb_connect: host:kill
system/core/adb/sysdeps_win32.c::socket_loopback_client():socket_loopback_client: port 5037 type tcp => fd 100
system/core/adb/transport.c::writex():writex: fd=100 len=4: 30303039 0009
system/core/adb/transport.c::writex():writex: fd=100 len=9: 686f73743a6b696c6c host:kill
system/core/adb/transport.c::readx():readx: fd=100 wanted=4
system/core/adb/sysdeps_win32.c::_socket_set_errno():_socket_set_errno: unhandled value 10054
system/core/adb/transport.c::readx():readx: fd=100 error 22: Invalid argument
system/core/adb/sysdeps_win32.c::adb_close():adb_close: 100(lo-client:5037)
* server not running *
platform-tools $ ADB_TRACE=all ./adb.exe start-server
system/core/adb/adb.c::main():Handling commandline()
system/core/adb/adb_client.c::_adb_connect():_adb_connect: host:version
system/core/adb/sysdeps_win32.c::socket_loopback_client():socket_loopback_client: could not connect to tcp:5037
system/core/adb/adb_client.c::adb_connect():adb_connect: service host:start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Saturday, April 14, 2012
Git - Single Developer Mode
> git config --global user.name "david"
> git config --global user.email "dmak168@gmail.com"
> git config --global color.diff auto
> git config --global color.status auto
> git config --global color.branch auto
(make a repository)
> mkdir ~/Project
> cd ~/Project
> git init
> git status
> echo "Hello There!" > readme.txt
> git status
> git add readme.txt (add a new file)
> git commit
> git status
> git log
> echo "modified again" >> readme.txt
> git add readme.txt (the second add put readme.txt into staging area)
> git reset (this is to reset staging area which result in doing nothing when commit)
> git add readme.txt
> git commit (this is to commit change to the repository)
(if you don't want to use "git add" for every change you made to a file
then you can just use "git commit -a" which will by pass the staging area)
Note 1:
1. Subversion works on repository and repository is represented as number starts at 1.
2. CVS works on File and each version of file is represented as 1.1, 1.2, 1.3 ...
3. Git works on commit, each commit gets a number (SHA1 hash) - which can guarantee the content of the repository. It promises that what we put in is what we get out by using the unique hash number.
Note 2:
> git reset (will not remove your changes but just reset the staging which means cannot commit)
> git reset --hard (will reset staging and also remove your changes and put it back to its last commit)
Note 3:
In Git our working copy is a local copy which is a full repository, and the commit is a local commit.
> git config --global user.email "dmak168@gmail.com"
> git config --global color.diff auto
> git config --global color.status auto
> git config --global color.branch auto
(make a repository)
> mkdir ~/Project
> cd ~/Project
> git init
> git status
> echo "Hello There!" > readme.txt
> git status
> git add readme.txt (add a new file)
> git commit
> git status
> git log
> echo "modified again" >> readme.txt
> git add readme.txt (the second add put readme.txt into staging area)
> git reset (this is to reset staging area which result in doing nothing when commit)
> git add readme.txt
> git commit (this is to commit change to the repository)
(if you don't want to use "git add" for every change you made to a file
then you can just use "git commit -a" which will by pass the staging area)
Note 1:
1. Subversion works on repository and repository is represented as number starts at 1.
2. CVS works on File and each version of file is represented as 1.1, 1.2, 1.3 ...
3. Git works on commit, each commit gets a number (SHA1 hash) - which can guarantee the content of the repository. It promises that what we put in is what we get out by using the unique hash number.
Note 2:
> git reset (will not remove your changes but just reset the staging which means cannot commit)
> git reset --hard (will reset staging and also remove your changes and put it back to its last commit)
Note 3:
In Git our working copy is a local copy which is a full repository, and the commit is a local commit.
Wednesday, April 4, 2012
Application errors notification with Logback
http://maciejwalkowiak.pl/blog/2012/04/03/application-errors-notification-with-logback/
Logback in conjunction with SLF4J provides great API and fast and powerful implementation of logging framework. Reasons why to switch to Logback from log4j are not topic of this post and they are already described in details on logback website.
Thanks to SLF4J migration tool migration from log4j api to SLF4J is super fast. I’ve decided to switch all projects to Logback and after several months I have to say that I am really satisfied with that decision.
Logback in conjunction with SLF4J provides great API and fast and powerful implementation of logging framework. Reasons why to switch to Logback from log4j are not topic of this post and they are already described in details on logback website.
Thanks to SLF4J migration tool migration from log4j api to SLF4J is super fast. I’ve decided to switch all projects to Logback and after several months I have to say that I am really satisfied with that decision.
Subscribe to:
Posts (Atom)




