JNI (Java Native Interface) allows implementing methods in C/C++, and use them in Java.
class JNIExample {
// Native method, no body.
import com.squareup.moshi.Json | |
data class DbSchema(@field:Json(name = "formatVersion") val formatVersion: Int? = 0, @field:Json( | |
name = "database") val database: Database? = Database()) | |
data class Database(@field:Json(name = "version") val version: Int = 0, @field:Json(name = "identityHash") val identityHash: String? = "", @field:Json( | |
name = "entities") val entities: List<Entity?>? = listOf(), @field:Json(name = "setupQueries") val setupQueries: List<String?>? = listOf()) |
public class OkHttpStack extends BaseHttpStack { | |
public OkHttpStack() { | |
} | |
@Override | |
public HttpResponse executeRequest(Request<?> request, Map<String, String> additionalHeaders) throws IOException, AuthFailureError { | |
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder(); | |
int timeoutMs = request.getTimeoutMs(); |
#!/bin/sh | |
# License for any modification to the original (linked below): | |
# ---------------------------------------------------------------------------- | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# Sebastiano Poggi wrote this file. As long as you retain | |
# this notice you can do whatever you want with this stuff. If we meet some day, | |
# and you think this stuff is worth it, you can buy us a beer in return. | |
#### SETUP/USAGE INSTRUCTIONS #### |
package com.viorsan.test.android.Utils; | |
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Circle Internet Financial | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
android.permission.ACCESS_ALL_DOWNLOADS | |
android.permission.ACCESS_BLUETOOTH_SHARE | |
android.permission.ACCESS_CACHE_FILESYSTEM | |
android.permission.ACCESS_CHECKIN_PROPERTIES | |
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY | |
android.permission.ACCESS_DOWNLOAD_MANAGER | |
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED | |
android.permission.ACCESS_DRM_CERTIFICATES | |
android.permission.ACCESS_EPHEMERAL_APPS | |
android.permission.ACCESS_FM_RADIO |
package be.digitalia.common.widgets; | |
import android.content.Context; | |
import android.os.Build; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
import android.support.annotation.NonNull; | |
import android.support.v4.util.LongSparseArray; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.view.ActionMode; |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
import Foundation | |
@objc(EnvConfig) | |
class EnvConfig: NSObject { | |
#if ENVConfigStaging | |
class var isProduction:Bool { | |
return false | |
} |
A collection of peer-to-peer decentralized projects. Contact me to add your project!
More project can be found here: https://www.gnunet.org/links/