Skip to content

Instantly share code, notes, and snippets.

View MythodeaLoL's full-sized avatar
💔
love is a ilusion 😿

Flo Rida MythodeaLoL

💔
love is a ilusion 😿
  • Dev
  • Brazil
  • 11:25 (UTC -03:00)
View GitHub Profile
<?php
header("Connection: close"); // not sure we need this one
header("Content-Encoding: none");
include ("config.php");
use Carbon\Carbon;
ignore_user_abort( true );
set_time_limit(0);
register_shutdown_function('shutdown');
@MythodeaLoL
MythodeaLoL / ClassName
Created August 9, 2016 16:24 — forked from MaximAlien/ClassName
[Android] [JNI] Method to get class name as std::string
static std::string getClassName(JNIEnv *env, jobject entity, jclass clazz)
{
jmethodID mid = env->GetMethodID(clazz, "getClass", "()Ljava/lang/Class;");
jobject clsObj = env->CallObjectMethod(entity, mid);
jclass clazzz = env->GetObjectClass(clsObj);
mid = env->GetMethodID(clazzz, "getName", "()Ljava/lang/String;");
jstring strObj = (jstring)env->CallObjectMethod(clsObj, mid);
const char* str = env->GetStringUTFChars(strObj, NULL);
std::string res(str);