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
| interface TasksRepository { | |
| fun createNewTask(message: String) | |
| fun getTasks(): List<Task> | |
| } |
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
| class MyApp : Application(), KodeinAware { | |
| override val kodein by Kodein.lazy { | |
| /* ... */ | |
| } | |
| } |
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
| dependencies { | |
| implementation 'com.github.salomonbrys.kodein:kodein:4.1.0' | |
| implementation 'com.github.salomonbrys.kodein:kodein-android:4.1.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
| dependencies { | |
| implementation 'com.google.dagger:dagger-android:2.x' | |
| implementation 'com.google.dagger:dagger-android-support:2.x' // if you use the support libraries | |
| annotationProcessor 'com.google.dagger:dagger-android-processor:2.x' | |
| } |
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
| // AsrSessionOperator.kt | |
| // nova metoda | |
| fun setSensitivityLevel(newLevel: Float): Observable<CommandResponse> { | |
| val bundle = Bundle() | |
| bundle.putFloat(AsrControlCommand.EXTRA_SENSITIVITY, newLevel) | |
| val cmd = AsrControlCommand(AsrControlCommand.CMD_UPDATE_SENSITIVITY_LEVEL, bundle) | |
| return AsrServiceConnection.operator.sendAsrControlCommand(cmd) | |
| } |
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
| // | |
| // Created by Filip Prochazka (@filipproch) | |
| // | |
| #include <jni.h> | |
| #ifdef __cplusplus | |
| extern "C" | |
| { | |
| #endif |
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
| #!/bin/sh | |
| java -Xms512M -Xmx1024M -XX:MaxPermSize=128M -jar spigot.jar |
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 void sendRequests() { | |
| new DataSender().execute(); | |
| } | |
| public static class DataSender extends AsyncTask<Void, Void, Void> { | |
| @Override | |
| protected Void doInBackground(Void... params) { | |
| db=openOrCreateDatabase("StudentDB", Context.MODE_PRIVATE, null); | |
| Cursor c=db.rawQuery("SELECT * FROM student", null); |
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
| task runChromeAppDebug(type: Exec) { | |
| executable "bash" | |
| args "--login", "-c", "google-chrome --load-and-launch-app=${projectDir}/${android.defaultConfig.applicationId}.android" | |
| } | |
| task copyChromeAppDebug(type: Copy) { | |
| from "${buildDir}/outputs/apk/${project.name}-debug.apk" | |
| into "${projectDir}/${android.defaultConfig.applicationId}.android/vendor/chromium/crx/" | |
| } |
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
| class AudioRecordThread implements Runnable { | |
| @Override | |
| public void run() { | |
| int bufferLength = 0; | |
| int bufferSize; | |
| short[] audioData; | |
| int bufferReadResult; | |
| try { | |
| bufferSize = AudioRecord.getMinBufferSize(sampleAudioBitRate, |