- Ubuntu 18.02
- Android NDK 20.0.5594570
- Protobuf v3.12.2
- Language C++ / Java
Use clang:
#include <stdio.h> | |
static void | |
minmax(int height[], int n, int *min, int *max) { | |
int i; | |
*min = *max = height[0]; | |
for (i=1;i<n;i++) { | |
if (height[i] < *min) | |
*min = height[i]; | |
else if (height[i] > *max) |
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools"> | |
<data> | |
</data> | |
<LinearLayout |
using UnityEngine; | |
using UnityEditor; | |
// @kurtdekker - easy cheesy add sphere colliders in a circle (for a torus) | |
// see notes below for how to make it go around a different axis | |
public class AddRingOfSphereColliders : EditorWindow | |
{ | |
int count = 24; | |
float largeRadius = 2.0f; |
import os | |
import requests | |
from urllib.parse import urljoin | |
from bs4 import BeautifulSoup | |
import argparse | |
#%% Example | |
# one pdf | |
# python all_pdf_dl.py -l https://memento.epfl.ch/academic-calendar/ --save-here | |
# many pdfs |
// Receive desptop`s udp broadcast package on Android, let Android app known desktop device`s ip | |
package top.gtf35.nekosdk.network | |
import kotlinx.coroutines.* | |
import top.gtf35.nekosdk.utils.LogUtil | |
import java.io.BufferedReader | |
import java.io.InputStreamReader | |
import java.net.DatagramPacket | |
import java.net.DatagramSocket | |
import java.net.InetAddress |
token = new Binder(); | |
try { | |
Context _context = android.app.ActivityThread.systemMain().getSystemContext(); | |
final Context context = new ContextWrapper(_context) { | |
@Override | |
public Object getSystemService(String name) { | |
if (Context.WINDOW_SERVICE.equals(name)) { | |
WindowManager wm = (WindowManager) super.getSystemService(name); | |
if (wm != null) { | |
((android.view.WindowManagerImpl) wm).setDefaultToken(token); |
On May 1, 2018, GitHub changed the suggested IP addresses to put on the A records for domains that use GitHub Pages. The new ones now support HTTPS for custom domains, but the old ones did not. Here are the old ones for historical purposes:
Here are the new ones:
int ystride = width; | |
int uvstride = ((width + 1) / 2) * 2; | |
uint8_t* yplane = (uint8_t *)cameraFrame; | |
uint8_t * uvplane = (uint8_t *)cameraFrame + (width * height); | |
uint8_t *newy = (uint8_t*)malloc(sizeof(uint8_t) * width * height); | |
uint8_t *newu = (uint8_t*)malloc(sizeof(uint8_t) * width * height / 4); | |
uint8_t *newv = (uint8_t*)malloc(sizeof(uint8_t) * width * height / 4); | |
int newuvstride = (width +1 ) / 2; |
// Exemplo de requisição GET | |
var ajax = new XMLHttpRequest(); | |
// Seta tipo de requisição e URL com os parâmetros | |
ajax.open("GET", "minha-url-api.com/?name=Henry&lastname=Ford", true); | |
// Envia a requisição | |
ajax.send(); | |
// Cria um evento para receber o retorno. |