Skip to content

Instantly share code, notes, and snippets.

View JackFan-Z's full-sized avatar

Jack Fan JackFan-Z

View GitHub Profile
@JackFan-Z
JackFan-Z / MyFilteredClassifier.java
Created June 24, 2016 07:00
MyFilteredClassifier
package com.example;
/**
* A Java class that implements a simple text classifier, based on WEKA.
* To be used with MyFilteredLearner.java.
* WEKA is available at: http://www.cs.waikato.ac.nz/ml/weka/
* Copyright (C) 2013 Jose Maria Gomez Hidalgo - http://www.esp.uem.es/jmgomez
* <p/>
* This program is free software: you can redistribute it and/or modify
* it for any purpose.
* <p/>
@JackFan-Z
JackFan-Z / MeasureFps.java
Created May 26, 2016 14:13
Simple class to dump frame rate
import android.util.Log;
/**
* Created by jackf on 2014/6/10.
*/
public class MeasureFps {
final String TAG = "MeasureFps";
// Current code easily fails to update wristband
public GattConnection(Context context, BluetoothDevice device, int handleCommandId) {
...
if (DeviceContentUtils.isNeedNotificationEnabled(this.mContext, mDevice.getAddress(), TAG)) {
DLog.i(TAG, "> connectGatt auto");
mBluetoothGatt = mDevice.connectGatt(this.mContext, Boolean.TRUE, mGattCallBack);
this.mIsNeedNotificationEnabled = true;
} else {
DLog.i(TAG, "> connectGatt non-auto");
mBluetoothGatt = mDevice.connectGatt(this.mContext, Boolean.FALSE, mGattCallBack);
//
// main.cpp
// CodeFun
//
// Created by YUAN CHANG FAN on 2014/10/4.
// Copyright (c) 2014年 MyCompany. All rights reserved.
//
#include <iostream>