- 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); |
Note: This gist may be outdated, thanks to all contributors in comments.
adb is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !
| #!/bin/bash | |
| #Whenever you clone a repo, you do not clone all of its branches by default. | |
| #If you wish to do so, use the following script: | |
| for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master | grep -v main `; do | |
| git branch --track ${branch#remotes/origin/} $branch | |
| done |
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: