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
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<com.example.android.camera2basic.AutoFitTextureView | |
android:id="@+id/texture" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
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
#include <iostream> | |
enum SumOfWeights { | |
N | |
}; | |
template<class T> | |
class is_time_point { | |
template<typename U> static auto test(U const* u) -> decltype(u->time_since_epoch(), std::true_type()); | |
template<typename> static std::false_type test(...); |
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
#ifndef almost_private | |
#define almost_private private | |
#endif | |
class A { | |
private: | |
void Private(); | |
almost_private: | |
void AlmostPrivate(); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Audio Recorder</title> | |
<style> | |
audio { | |
display: block; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Audio Recorder</title> | |
<style> | |
audio { | |
display: block; | |
} |
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.thunks | |
public class SomeClass { | |
private long m_nativeCallback; | |
public native void callback(int arg1, long arg2); | |
} |
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
#include <jni.h> | |
JNIEXPORT void JNICALL | |
Java_com_example_thunks_SomeClass_callback(JNIEnv *env, jobject obj, jint arg1, jlong arg2) | |
{ | |
jclass SomeClass = (*env)->GetObjectClass(env, obj); | |
jfieldID nativeCallback_ID = (*env)->GetFieldID(env, SomeClass, "m_nativeCallback", "J"); // it would be wise to cache this ID | |
void (*callbackPtr)(int, long) = (void (*)(int, long)) (*env)->GetLongField(env, object, nativeCallback_ID); | |
callbackPtr(arg1, arg2); | |
} |
NewerOlder