mysql和mongoDB

https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/05.6.md

2017-06-14 · 1 min · word · Me

couchbaselabs mini-hacks

https://github.com/couchbaselabs/mini-hacks Important !! channels-users-roles https://github.com/couchbaselabs/mini-hacks/tree/master/channels-users-roles ===== level-1:未註冊使用者(發文要核準) level-2:註冊使用者(發文不用核準) level-3:版主(可核準或取消) 程式動態新增role 藍線:建立role 綠線:回覆結果 .角色(Roles)和使用者(users) 是可以被授權 而訪問 Channels. 使用者(users) 被附予角色(Roles),則可以 用角色的授權 進而訪問 Channels .channel(channelname) 有讀取權限 access(doc.owner, channelname); 給 寫入權限 requireUser(doc.owner) requireRole(doc.role) 也可以給 寫入權限 document content (using throw) ??? 讀和寫權限是分開的。 寫的權限完全是用sync function控制:除非sync function拒絕……… Write requireUser(username) 是否是該使用者(User) requireRole(rolename) 是否有該角色(Role) requireAccess(channels) 是否有該Channel curl -vX POST -H ‘Content-Type: application/json’ \ –cookie ‘SyncGatewaySession=d007ceb561f0111512c128040c32c02ea9d90234’ \ :4984/db/ \ -d ‘{“type”: “review”, “role”: “level-1”, “owner”: “jens”}’ {“type”: “review”, “role”: “level-1”, “owner”: “jens”} => ...

2016-04-20 · 1 min · 147 words · Me

Can not understand couchbase todolite demo Q1: doucment id p:xxoooxx Q2:facebook login auto add user

http://stackoverflow.com/questions/30905279/can-not-understand-couchbase-todolite-demo/30931841#30931841

2015-06-19 · 1 min · word · Me

[轉]Couchbase Lite stops syncing when an app resumes from background

http://stackoverflow.com/questions/20822285/couchbase-lite-stops-syncing-when-an-app-resumes-from-background answered Dec 30 ‘13 at 12:55 MonkeyBonkey Looks like if I set the replication to “persistent” it resumes on app backgrounding e.g._pull.persistent = YES;

2015-06-18 · 1 min · 25 words · Me

couchbase todolist get database sync part

https://github.com/couchbaselabs/ToDoLite-Android Write ToDoLite database sync guy is very good. OK, take out. android studio:new project then Copy todolist four java : Application.java、BaseActivity.java、Preferences.java、Synchronize.java Edit java : MainActivityjava、AndroidManifes.xml 1、app/src/main/AndroidManifest.xml <application add android:name=“com.sandk.groupaccountbook.Application” 2、app/src/main/java/com/sandk/groupaccountbook/MainActivity.java change public class MainActivity extends ActionBarActivity => public class MainActivity extends BaseActivity { If have new activity, just change extends to BaseActivity, then can use application.getDatabase(). four java : any use facebook just // or delete now database = application.getDatabase() is ok~~ ...

2015-06-16 · 1 min · 116 words · Me