This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private enum UriType { | |
DEPARTMENT( "#/" + DB_Department.TABLE_NAME , DB_Department.TABLE_NAME, DB_Department.TYPE_ELEM_TYPE), | |
COLLEGUE("#/" + DB_Collegue.TABLE_NAME, DB_Collegue.TABLE_NAME, DB_Collegue.TYPE_ELEM_TYPE), | |
COLLEGUE_RELATION("#/" + DB_Collegue_relation.TABLE_NAME, DB_Collegue_relation.TABLE_NAME, DB_Collegue_relation.TYPE_ELEM_TYPE), | |
DEPARTMENT_RELATION("#/" + DB_Department_relation.TABLE_NAME, DB_Department_relation.TABLE_NAME, DB_Department_relation.TYPE_ELEM_TYPE), | |
DEPARTMENT_UIN( "#/" + DB_Department.TABLE_NAME + "/UIN/#", DB_Department.TABLE_NAME, DB_Department.TYPE_ELEM_TYPE), | |
COLLEGUE_CorpUIN("#/" + DB_Collegue.TABLE_NAME + "/UIN/#", DB_Collegue.TABLE_NAME, DB_Collegue.TYPE_ELEM_TYPE), | |
COLLEGUE_RELATION_UIN("#/" + DB_Collegue_relation.TABLE_NAME + "/UIN/#", DB_Collegue_relation.TABLE_NAME, DB_Collegue_relation.TYPE_ELEM_TYPE), | |
DEPARTMENT_RELATION_CorpUIN("#/" + DB_Department_relation.TABLE_NAME + "/UIN/#", DB_Department_relation.TABLE_NAME, DB_De |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://en.wikipedia.org/wiki/Base64#URL_applications | |
//http://stackoverflow.com/questions/11106393/url-safe-base64-in-objective-c | |
//http://stackoverflow.com/questions/10812140/facebook-signed-request-for-ios-hmac-sha256 | |
public class RequestMaker { | |
private static final String KEY = "testkey"; | |
private static final int BASE64_FLAG = Base64.URL_SAFE | Base64.NO_WRAP | Base64.NO_PADDING | Base64.NO_CLOSE; | |
public RequestMaker() { | |
} | |
public String getRequestPayload(String token, String user_id, String expires) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//java code | |
public class MainActivity extends Activity { | |
private WebView webView; | |
private static final String TAG = "MainActivity"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
this.webView = (WebView) findViewById(R.id.webview); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RSAEncrypt { | |
private static final String DEFAULT_PUBLIC_KEY= | |
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChDzcjw/rWgFwnxunbKp7/4e8w" + "\r" + | |
"/UmXx2jk6qEEn69t6N2R1i/LmcyDT1xr/T2AHGOiXNQ5V8W4iCaaeNawi7aJaRht" + "\r" + | |
"Vx1uOH/2U378fscEESEG8XDqll0GCfB1/TjKI2aitVSzXOtRs8kYgGU78f7VmDNg" + "\r" + | |
"XIlk3gdhnzh+uoEQywIDAQAB" + "\r"; | |
private static final String DEFAULT_PRIVATE_KEY= | |
"MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAKEPNyPD+taAXCfG" + "\r" + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nobody; | |
worker_processes auto; | |
error_log logs/error.log notice; | |
worker_rlimit_nofile 65535; | |
pid /var/run/nginx.pid; | |
events { | |
accept_mutex off; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* compile with: | |
on linux: gcc -g stack_traces.c | |
on OS X: gcc -g -fno-pie stack_traces.c | |
on windows: gcc -g stack_traces.c -limagehlp | |
*/ | |
#include <signal.h> | |
#include <stdio.h> | |
#include <assert.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"android_logcat_time": { | |
"title": "Android logcat with time", | |
"description": "logcat generated by command 'adb logcat -v time'", | |
"url": "https://developer.android.com/studio/command-line/logcat.html", | |
"timestamp-format": [ | |
"%m-%d %H:%M:%S.%L" | |
], | |
"regex": { | |
"std-logcat-time": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"android_logcat_time": { | |
"title": "Android logcat with time", | |
"description": "logcat generated by command 'adb logcat -v time'", | |
"url": "https://developer.android.com/studio/command-line/logcat.html", | |
"timestamp-format": [ | |
"%m-%d %H:%M:%S.%L" | |
], | |
"regex": { | |
"std-logcat-time": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package base | |
import ( | |
"errors" | |
"fmt" | |
"github.com/manucorporat/try" | |
"github.com/simpleton/beego" | |
"github.com/streadway/amqp" | |
"math/rand" | |
"model/helper" |
OlderNewer