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 com.tonal.trainer.anvilcompilers | |
import com.google.auto.service.AutoService | |
import com.squareup.anvil.annotations.ContributesTo | |
import com.squareup.anvil.compiler.api.AnvilContext | |
import com.squareup.anvil.compiler.api.CodeGenerator | |
import com.squareup.anvil.compiler.api.GeneratedFile | |
import com.squareup.anvil.compiler.api.createGeneratedFile | |
import com.squareup.anvil.compiler.internal.asClassName | |
import com.squareup.anvil.compiler.internal.buildFile |
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
const val LIST = "list" | |
const val OTHER = "other" | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
val navController = rememberNavController() | |
ComposeSampleTheme { | |
Scaffold( |
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 android.app.Application | |
import androidx.work.Constraints | |
import androidx.work.ExistingPeriodicWorkPolicy | |
import androidx.work.PeriodicWorkRequestBuilder | |
import androidx.work.WorkManager | |
import java.util.concurrent.TimeUnit | |
class App: Application(){ | |
override fun onCreate() { |
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 android.annotation.SuppressLint; | |
import android.media.MediaCodec; | |
import android.media.MediaExtractor; | |
import android.media.MediaFormat; | |
import android.media.MediaMetadataRetriever; | |
import android.media.MediaMuxer; | |
import android.util.Log; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; |
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
#sudo apt-get remove maven2 | |
sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main" | |
sudo apt-get update | |
sudo apt-get install maven3 | |
#If you encounter this: | |
#The program 'mvn' can be found in the following packages: | |
# * maven | |
# * maven2 |
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
1. The texture target needs to be GLES20.GL_TEXTURE_EXTERNAL_OES instead of GL_TEXTURE_2D, e.g. in the glBindTexture calls and glTexParameteri calls. | |
2. In the fragment shader define a requirement to use the extension: | |
#extension GL_OES_EGL_image_external : require | |
3. For the texture sampler used in the fragment shader, use samplerExternalOES instead of sampler2D. | |
Everything below here is all in the C code, no more Java. | |
4. In the C code, use glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, eglImage) to specify where the data is, instead of using glTexImage2D family of functions. |
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
CXXFLAGS = -O2 -g -Wall -fmessage-length=0 `pkg-config opencv --cflags ` -I /usr/include/libusb-1.0 | |
OBJS = freenectopencvmat.o | |
LIBS = `pkg-config opencv --libs` -lfreenect | |
TARGET = kinectopencv | |
$(TARGET):$(OBJS) | |
$(CXX) -o $(TARGET) $(OBJS) $(LIBS) | |
all:$(TARGET) | |
clean: | |
rm -f $(OBJS) $(TARGET) |