[angular js] Module ~ factory service provider
區分這三者的不同。
公告版位
目前分類:CODE (61)
- Sep 30 Mon 2013 11:02
[angular js] Module ~ factory service provider
- Sep 05 Thu 2013 10:57
[angularjs] angularjs with firebase
- Mar 30 Sat 2013 17:09
[ruby] `require': no such file to load -- bindata (LoadError)
pc_liao@tw-pcliao1[~/code/git-tools/parse_index_file]{17:06}$ ruby parse_index_file.rb ../.git/index
parse_index_file.rb:10:in `require': no such file to load -- bindata (LoadError)
from parse_index_file.rb:10
pc_liao@tw-pcliao1[~/code/git-tools/parse_index_file]{17:06}$ gem install bindata
Fetching: bindata-1.4.5.gem (100%)
Successfully installed bindata-1.4.5
1 gem installed
Installing ri documentation for bindata-1.4.5...
Installing RDoc documentation for bindata-1.4.5...
pc_liao@tw-pcliao1[~/code/git-tools/parse_index_file]{17:08}$
- Mar 25 Mon 2013 17:30
[java]guice injector.getInstance
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
final Config config1 = injector.getInstance(ConfigFactory.class).createNew(cluster, "t1",
new HashMap<String, String>() {{
put("prop1", "val1");
}});
config1.setVersionTag("1");
config1.persist();
cf.
guice源代码分析(一)injector.getInstance - 编程思索 | Thoughts of Coding
http://tocspblog.appspot.com/?p=54001
- Mar 25 Mon 2013 17:13
[java]LinkedHashMap
最近常常看這樣樣形式的 LinkedHashMap 用法
繼承 hashmap 以獲得 put method。
Methods inherited from class java.util.HashMap clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
Map<String, Object> properties = new LinkedHashMap<String, Object>();
若要得到有序的hashtable便可以使用這個ADT,
另外可參照 treehashmap,hashmap
cf.
Difference between HashMap, LinkedHashMap and SortedMap in java - Stack Overflow
http://stackoverflow.com/questions/2889777/difference-between-hashmap-linkedhashmap-and-sortedmap-in-java
老紫竹JAVA提高教程(14)-认识Map之LinkedHashMap - 老紫竹的专栏 - 博客频道 - CSDN.NET
- Jan 18 Fri 2013 15:55
[java] Autoboxing
Autoboxing is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes.
For example, converting an int to an Integer, a double to a Double, and so on.
If the conversion goes the other way, this is called unboxing.
- Jan 18 Fri 2013 15:52
[java]Type inference
Type inference is a Java compiler's ability to look at each method invocation and corresponding declaration to determine the type argument (or arguments) that make the invocation applicable
- Jan 18 Fri 2013 14:06
[java] use the terms "type parameter" and "type argument"
Generic Types (The Java™ Tutorials > Learning the Java Language > Generics (Updated))
http://docs.oracle.com/javase/tutorial/java/generics/types.html
Type Parameter and Type Argument Terminology: Many developers use the terms "type parameter" and "type argument" interchangeably, but these terms are not the same. When coding, one provides type arguments in order to create a parameterized type. Therefore, the T in Foo is a type parameter and the String in Foo f is a type argument. This lesson observes this definition when using these terms.
- Oct 22 Mon 2012 13:55
[java]@Override 限定 Override 父類方法 - Override
關於 @Override Annotation 的說明
限定 Override 父類方法 - Override
http://caterpillar.onlyfun.net/Gossip/JavaGossip-V2/AnnotationOverride.htm
- Jun 06 Wed 2012 16:56
[js]jquery sort table by data attr 排序表格
[js]jquery sort table by data attr 排序表格
javascript 區段加入
$(document).ready(function() {
$('.link-sort-table1').click(function(e) {
var $sort = this;
var $table = $('#sort-table1');
var $rows = $('tbody > tr',$table);
- Apr 14 Sat 2012 14:39
andorid looper.class handler.class
清楚了解 android.os 源碼中的Looper,Handler,Message,MessageQueue « Milochen's Blog for hacking
http://milochen.wordpress.com/2011/03/25/understanding-android-os-src-looperhandler-message-messagequeue/
- Apr 11 Wed 2012 18:02
javascript function callback
在找javascript function callback的資訊的時候,
找到這個資料。
原來在javascript的function宣告,
這樣命名方式的解釋。
The EZPZ Way – How to build a personal mashup page with jQuery
http://theezpzway.com/2009/5/1/how-to-build-a-personal-mashup-page-with-jquery
var myPopup = {
message: "Hello!",
- Mar 29 Thu 2012 00:30
bitbucket git note
Clone your new repo
Set up Git on your machine if you haven't already done so.
$ mkdir /path/to/your/project
$ cd /path/to/your/project
$ git init
$ git remote add origin https://peicheng@bitbucket.org/peicheng/tt.git
Make changes and push
- Mar 20 Tue 2012 13:47
[perl]cpan install WWW/Mechanize.pm
cpan
install WWW/Mechanize.pm
- Mar 20 Tue 2012 13:29
[shell script]check file exist use regex / process file 排除檔案名
[shell script]check file exist use regex / process file
早上zz 在討論一個問題,
他想排除ls 出來的file list 的某些檔案,
使用的是regex。
jar_file="./ggyy-zz.jar"
if [ $jar_file == "~/ggyy-*.jar" ]; then
echo "ok"
- Mar 13 Tue 2012 16:30
[jquery]圖片輪播 jQuery Cycle Plugin
[jquery]圖片輪播
中午接到電話有個圖片要改圖片輪播,
稍微查了一下
使用了 jQuery Cycle Plugin
JQuery Cycle Plugin - Beginner Demos
http://malsup.com/jquery/cycle/begin.html
The Will Will Web | 撰寫跑馬燈/廣告輪播的好工具:jQuery Cycle Plugin
http://blog.miniasp.com/post/2008/08/Writing-Marquee-and-Banner-Rotate-with-jQuery-Cycle-Plugin.aspx
- Feb 28 Tue 2012 01:23
[zenphoto]javascript 加上上一頁 下一頁快速鍵 hotkey
[zenphoto]javascript 加上上一頁 下一頁快速鍵hotkey
之前在使用zenphoto這個相簿,
進入之後上下翻頁,
少了一點方便性。
加上了javascript hokey 下一頁快速鍵
<script type="text/javascript">
- Feb 15 Wed 2012 19:50
[CS] top k 問題
怎样从10亿查询词找出出现频率最高的10个 | 董的博客 very nice artical
http://dongxicheng.org/big-data/select-ten-from-billions/
非常棒的思路,因為在現今多核的年代裡面,
處理top k就有不同的組合。
4. 总结
- Jan 31 Tue 2012 01:39
[blog]blog per day log analysis
花了點時間做了blog per day log analysis
統計了每天每人從哪裡連結過來,
主要是利用
$_SERVER['HTTP_REFERER']
- Jan 28 Sat 2012 11:43
dotcloud ssh登入
關鍵細節總在文件中
dotcloud的help寫的分常詳細
DotCloud Documentation
http://docs.dotcloud.com/guides/copy/
Generic SSH (scp, rsync...)
If you are used to scp or rsync, you can also setup a SSH configuration file to use direct SSH connection to your service. Here is how.
-
Retrieve the SSH parameters (user, host, and port) of your service, using dotcloud info myapp.myservice.
-
Append the following section to your ~/.ssh/config file (create this file if it does not exist), replacing HOST, PORT and USER with the values shown by dotcloud info: