https://mega.nz/folder/dLIWkbCB#0MH4CBGlj0JUA6n00EbpDg
https://mega.nz/folder/oWAwAR5Y#WsyNfvNK_SkoFXS4WJKcTA
https://mega.nz/folder/RGBgHJIS#qOsdOXynX41S5TFOP0PqHg
https://mega.nz/folder/5bQAFTCZ#q3HkgHHDSjPk_q0Uq0QQ4w
https://mega.nz/folder/YXIC2DqA#_A9kVgMPzl652Qfqi9lhlA
https://mega.nz/folder/JeZ2RTTI#s4jjLfA1ef27bIQH_1ei3Q
https://mega.nz/folder/UGRQnTaI#L6B62U_3jUOuRkCEH4DZvw
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
#define PRINT(tag, fmt, ...) printf("%s %s " fmt"", get_cur_time(), tag, ##__VA_ARGS__) | |
inline char* get_cur_time() { | |
static char s[32] = {0}; | |
time_t t; | |
struct tm* ltime; | |
struct timeval stamp; | |
gettimeofday(&stamp, NULL); | |
ltime = localtime(&stamp.tv_sec); |
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
import cv2 | |
import os, time | |
samplePath = "sample" | |
index = 0 | |
def mark(filename): | |
old_img_path = os.path.join(samplePath, filename) | |
print("old_path: ", old_img_path) |
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
import java.io.IOException; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) throws IOException { | |
// 直接读取多行数据 | |
Scanner sc = new Scanner(System.in); | |
while (sc.hasNext()) { | |
int a = sc.nextInt(); | |
int b = sc.nextInt(); |
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
bool UYVYRotate90(unsigned char *src, unsigned char *dst, int width, int height) { | |
const int copyBytes = 4; | |
const int bytesPerLine = width << 1; | |
const int step = height << 2; | |
const int offset = (height - 1) * bytesPerLine; | |
if (NULL == dst) { | |
return false; | |
} | |
unsigned char *dest = dst; |
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
int fromColor = Color.rgb(0, 0, 255); | |
int toColor = Color.rgb(255, 0, 0); | |
for (int i = 0; i < data.length; i++) { | |
double ratio = (data[i] - mintemp) / (maxtemp - mintemp); | |
int red = (int) (Color.red(fromColor) * (1.0f - ratio) + Color.red(toColor) * ratio); | |
int green = (int) (Color.green(fromColor) * (1.0f - ratio) + Color.green(toColor) * ratio); | |
int blue = (int) (Color.blue(fromColor) * (1.0f - ratio) + Color.blue(toColor) * ratio); | |
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
private float a, b, c, d; | |
private int red, green, blue; | |
private static final float minTemp = 20.0f; | |
private static final float maxTemp = 40.0f; | |
private void setAbcd() { | |
a = minTemp + (maxTemp - minTemp) * 0.2121f; | |
b = minTemp + (maxTemp - minTemp) * 0.3182f; | |
c = minTemp + (maxTemp - minTemp) * 0.4242f; | |
d = minTemp + (maxTemp - minTemp) * 0.8182f; |
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
Bitmap image = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888); | |
int[] list = GetSingleColorList(Color.rgb(0, 0, 255), Color.rgb(255, 0, 0), (int) (maxtemp - mintemp) + 1); | |
//根据温度获取每个点的颜色 | |
for (int i = 0; i < data.length; i++) { | |
int c = GetColor(list, data[i], maxtemp, mintemp); | |
image.setPixel(i % 32, i / 32, c); | |
} |
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> | |
#include "ProcessWatcher.h" | |
extern ProcessBase *g_process; | |
JNIEXPORT jboolean JNICALL | |
Java_com_example_free_watcher_Watcher_createWatcher(JNIEnv *env, jobject instance, jstring objname_, | |
jstring type_) { | |
const char *objname = env->GetStringUTFChars(objname_, 0); | |
const char *type = env->GetStringUTFChars(type_, 0); |
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
public class JNIClass { | |
static { | |
System.loadLibrary("loopjni"); | |
} | |
public static native void createProcess(String pid); | |
public void restartActivity() { | |
try { |