Friday, April 29, 2011

Java store in BLOB

http://www.kodejava.org/examples/279.html


http://www.kodejava.org/browse/55.html

Oracle Thin Driver setup

Download Squirrel SQL Client.

Installation and running both needs Admin Right.


Use Oracle Thin Driver and load the ojdbc14.jar

jdbc:oracle:thin:@[:<1521>]:

Thursday, April 28, 2011

getting the most interactive fds

SELECT actor_id, message, comments.count, comments.comment_list, likes.count, likes.sample from stream where source_id=me() and (likes.count > 0 or comments.count > 0)

==============================================

SELECT actor_id, message, comments.count, comments.comment_list, likes.count, likes.sample from stream where source_id in (SELECT target_id FROM connection WHERE source_id=me()) and (likes.count > 0 or comments.count > 0)


SELECT actor_id from stream where source_id in (SELECT target_id FROM connection WHERE source_id=me() and target_type='user')

===============================================================
select uid, name from user where uid in (
SELECT actor_id, message from stream where source_id in (SELECT uid2 FROM friend WHERE uid1=me())
)

SELECT target_id, message from stream where source_id=me()

select uid, name from user where uid in (
SELECT actor_id from stream where source_id=me())


Get user's post:
SELECT post_id from stream where source_id=me()

Get those friend's comment on user's post:
select fromid from comment where post_id in (
SELECT post_id from stream where source_id=me())

Get those friend's comment on user's posts:
select uid, name from user where uid in (
select fromid from comment where post_id in (
SELECT post_id from stream where source_id=me()))

Get those friend's that likes user's posts:
select uid, name from user where uid in (
SELECT likes.friends from stream where source_id=me()
)

Friday, April 22, 2011

Discuss 工作版Post

30歲前有超過20k一個月的你,付出了多少?

http://www.discuss.com.hk/viewthread.php?tid=13947885&extra=page%3D2


Wednesday, April 13, 2011

Javascript Ajax Upload Plugin

https://github.com/valums/ajax-upload