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
#include <jni.h> | |
#include <string> | |
#define _MACRO_CONCAT(a,b) a ## b | |
#define _MACRO_2_STR(a) #a | |
#define _TOSTR(a) _MACRO_2_STR(a) | |
#define JMETHOD_VAR(n) _MACRO_CONCAT(jmethodId, n) | |
#define JMETHOD_DECLARE(cn,n,s) static jmethodID JMETHOD_VAR(n); | |
#define JMETHOD_GET(cn, n,s) JMETHOD_VAR(n) = jEnv->GetMethodID(_MACRO_CONCAT(jclass, cn), #n, s); |
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 main | |
import ( | |
"image" | |
"os" | |
"io/ioutil" | |
"math" | |
"golang.org/x/image/bmp" | |
"log" | |
"bytes" |
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
#include "jni.h" | |
JNIEXPORT jlong JNICALL | |
Java_com_XXX_opus_Encoder_create(JNIEnv* env | |
, jobject thiz) | |
{ | |
(void)env;(void)thiz; | |
int error; | |
void* enc = (void*)opus_encoder_create(16000, 1, OPUS_APPLICATION_VOIP, &error); |
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
import React from 'react'; | |
import { | |
View, | |
ListView, | |
Image, | |
Animated, | |
PanResponder, | |
} from 'react-native'; | |
import LinearGradient from 'react-native-linear-gradient'; |
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 main | |
import( | |
"golang.org/x/image/bmp" | |
"image" | |
"io/ioutil" | |
"fmt" | |
"strconv" | |
"net/http" | |
"log" | |
//"mime/multipart" |
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
//github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-local/local.go | |
import "golang.org/x/net/proxy" | |
import "github.com/elazarl/goproxy" | |
import "net/http" | |
func main(){ | |
//... | |
parseServerConfig(config) |
NewerOlder