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 void getRotationVectorFromGyro(float timeFactor) { | |
System.out.println("getRotationVectorFromGyro"); | |
// Calculate the angular speed of the sample | |
float omegaMagnitude = (float) Math.sqrt(Math.pow(gyroscope[0], 2) | |
+ Math.pow(gyroscope[1], 2) + Math.pow(gyroscope[2], 2)); | |
// Normalize the rotation vector if it's big enough to get the axis | |
if (omegaMagnitude > EPSILON) { | |
gyroscope[0] /= omegaMagnitude; |
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 ApplicationModule extends AbstractModule { | |
private final EventBus eventBus = new EventBus("Default EventBus"); | |
@Override | |
protected void configure() { | |
bind(EventBus.class).toInstance(eventBus); | |
bindListener(Matchers.any(), new TypeListener() { | |
public <I> void hear(TypeLiteral<I> typeLiteral, TypeEncounter<I> typeEncounter) { | |
typeEncounter.register(new InjectionListener<I>() { | |
public void afterInjection(I i) { |
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 POST http://test.web-anatomy.com/bastek/Sknerus/public/pl/api/oauth | |
07-17 03:00:51.571 12096-12156/pl.sknerus.sknerusapp.dev D/TEST﹕ Content-Type: application/json | |
07-17 03:00:51.571 12096-12156/pl.sknerus.sknerusapp.dev D/TEST﹕ Content-Length: 188 | |
07-17 03:00:51.574 12096-12156/pl.sknerus.sknerusapp.dev D/TEST﹕ {"client_id":"mobile_app","client_secret":"d3wf4eg5rh6tj7y","device_os":"android","device_token":"324567","grant_type":"password","password":"xxx","response_type":"token","username":"xxx"} | |
07-17 03:00:51.575 12096-12156/pl.sknerus.sknerusapp.dev D/TEST﹕ ---> END HTTP (188-byte body) | |
07-17 03:00:51.981 12096-12156/pl.sknerus.sknerusapp.dev D/TEST﹕ <--- HTTP 404 http://test.web-anatomy.com/bastek/Sknerus/public/pl/api/oauth (406ms) | |
07-17 03:00:51.983 12096-12156/pl.sknerus.sknerusapp.dev D/TEST﹕ Date: Fri, 17 Jul 2015 07:00:25 GMT | |
07-17 03:00:51.983 12096-12156/pl.sknerus.sknerusapp.dev D/TEST﹕ Server: Apache/2.2.22 (Debian) | |
07-17 03:00:51.983 12096-12156/pl.sknerus.sknerusapp.dev D/TE |
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 RxTest { | |
public static void main(String[] args) { | |
String str = "sty"; | |
getDoubledString(str).subscribe(new Subscriber<Integer>() { | |
@Override | |
public void onCompleted() { | |
System.out.println("on complete"); | |
} |
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
String jsonArray = "[\"A\",\"B\",\"C\",\"D\"]"; | |
Gson gson = new Gson(); | |
Type type = new TypeToken<ArrayList<String>>() {}.getType(); | |
ArrayList<String> arrayList = gson.fromJson(jsonArray, type); | |
System.out.println(arrayList); |
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
AbstractCommandExecutor.execute | |
java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference | |
at com.good.android.gdmdm.command.executor.commandhandlers.blackwhitelist.SamsungBlackWhiteListAdapter.scanBlacklistedApps(SamsungBlackWhiteListAdapter.java:122) | |
at com.good.android.gdmdm.command.executor.commandhandlers.blackwhitelist.BlackWhiteListHandler.onBlackWhiteListSettingReceived(BlackWhiteListHandler.java:139) | |
at com.good.android.gdmdm.command.executor.device.SetBlackWhiteListSettingPackagesExecutor.executeCommand(SetBlackWhiteListSettingPackagesExecutor.java:38) | |
at com.good.android.gdmdm.command.executor.AbstractCommandExecutor.execute(AbstractCommandExecutor.java:42) | |
at com.good.android.gdmdm.command.manager.CommandManager.processCommand(CommandManager.java:37 |
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
11-26 13:41:08.941 D/GA-BLACK_WHITE_LIST: BlackWhiteListHandler.scanPackages | |
11-26 13:41:08.956 D/GA-BLACK_WHITE_LIST: SamsungBlackWhiteListAdapter.scanBlacklistedApps | |
11-26 13:41:09.026 D/GA-BLACK_WHITE_LIST: SamsungBlackWhiteListAdapter.disableApplication Disabled package = com.popularapp.fakecall - false | |
11-26 13:41:09.046 D/GA-BLACK_WHITE_LIST: SamsungBlackWhiteListAdapter.disableApplication Disabled package = com.popularapp.sevenmins - false | |
11-26 13:41:09.081 D/GA-BLACK_WHITE_LIST: BlackWhiteListHandler.onAppInfoReceived flipboard.boxer.app | |
11-26 13:41:09.081 D/GA-BLACK_WHITE_LIST: SamsungBlackWhiteListAdapter.handleNewPackageInfo flipboard.boxer.app | |
11-26 13:41:09.096 D/GA-BLACK_WHITE_LIST: BlackWhiteListHandler.onAppInfoReceived com.android.printspooler | |
11-26 13:41:09.096 D/GA-BLACK_WHITE_LIST: SamsungBlackWhiteListAdapter.handleNewPackageInfo com.android.printspooler | |
11-26 13:41:09.106 D/GA-BLACK_WHITE_LIST: BlackWhiteListHandler.onAppInfoReceived com.sec.android.app.minimode.res | |
11-26 13:41:09.106 |
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
/** | |
* Port from {@link https://github.com/ReactiveX/RxSwift} | |
*/ | |
RxTextView.textChanges(mSearchbar.getEditTextSearch()) | |
.subscribeOn(AndroidSchedulers.mainThread()) | |
//delay 500ms | |
//debounce and throttle will use different thread after | |
.throttleWithTimeout(300, TimeUnit.MILLISECONDS, AndroidSchedulers.mainThread()) | |
.distinct() | |
.filter(new Func1() { |
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
// A blacklist of absolute package path directories that will be excluded from the main dex list. ex: 'com/company/package/path' | |
// the package name can be partial, since class names encountered that start with any of the given package names will be discarded. | |
ext.packagesToDiscardFromMainDexFile = [] | |
def shouldDiscardClass(String className) { | |
packagesToDiscardFromMainDexFile.any { className.startsWith(it) } | |
} | |
def patchMainDexKeepList(Project proj, String variantName) { | |
Task collectTask = proj.tasks.findByName("collect${variantName.capitalize()}MultiDexComponents") |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>gd.wa</groupId> | |
<artifactId>minimal-pom</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> |
OlderNewer