This file contains hidden or 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 enum RecognitionTaskType implements Parcelable { | |
HOTWORD, | |
OFFLINE, | |
ONLINE, | |
MIX, | |
RECORD_ONLY; | |
@Override | |
public int describeContents() { | |
return 0; |
This file contains hidden or 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 ( | |
"log" | |
"os" | |
) | |
var ( | |
fileInfo *os.FileInfo | |
err error |
This file contains hidden or 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 BluetoothGattCallback mGattCallback = new BluetoothGattCallback() { | |
@Override | |
public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { | |
super.onConnectionStateChange(gatt, status, newState); | |
Log.v(TAG, "Connection State Changed: " + (newState == BluetoothProfile.STATE_CONNECTED ? "Connected" : "Disconnected")); | |
if (newState == BluetoothProfile.STATE_CONNECTED) { | |
setState(State.CONNECTED); | |
gatt.discoverServices(); | |
} else { | |
setState(State.IDLE); |
This file contains hidden or 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 com.example.android.bluetoothleadvertiser; | |
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothDevice; | |
import android.bluetooth.BluetoothGatt; | |
import android.bluetooth.BluetoothGattCharacteristic; | |
import android.bluetooth.BluetoothGattDescriptor; | |
import android.bluetooth.BluetoothGattServer; | |
import android.bluetooth.BluetoothGattServerCallback; | |
import android.bluetooth.BluetoothGattService; |
This file contains hidden or 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
//发送get请求 | |
func get(url string) string { | |
response, err := http.Get(url) | |
if err != nil { | |
fmt.Printf("%s", err) | |
os.Exit(1) | |
} else { | |
defer response.Body.Close() | |
contents, err := ioutil.ReadAll(response.Body) | |
if err != nil { |
This file contains hidden or 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
// | |
// ViewController.m | |
// AutoLayoutDemo | |
// | |
// Created by Ting Sun on 6/17/15. | |
// Copyright (c) 2015 sunting. All rights reserved. | |
// | |
#import "ViewController.h" |
This file contains hidden or 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
//classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0' | |
//classpath 'com.github.dcendents:android-maven-plugin:1.2' | |
apply plugin: 'com.android.library' | |
apply plugin: 'com.github.dcendents.android-maven' | |
apply plugin: 'com.jfrog.bintray' | |
version '1.5.0' | |
android { |
This file contains hidden or 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 android.opengl.GLES20; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.nio.FloatBuffer; | |
import java.util.ArrayList; | |
import xyz.sunting.opengles.light.model.TSApplication; | |
import xyz.sunting.opengles.light.model.util.TSMatrixState; | |
import xyz.sunting.opengles.light.model.util.TSShaderUtil; |
This file contains hidden or 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 android.opengl.Matrix; | |
import android.util.Log; | |
/** | |
* 矩阵变换工具类 | |
* | |
* @author tinker <[email protected]> | |
*/ | |
public class TSMatrixState { | |
private static final int MATRIX_F4V_SIZE = 16; |
This file contains hidden or 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
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
apply plugin: 'application' | |
mainClassName = 'hello.HelloWorld' | |
// tag::repositories[] | |
repositories { | |
mavenCentral() | |
} |