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
#!/usr/bin/env bash | |
set -e | |
ROOT=`realpath $(dirname "$BASH_SOURCE")` | |
cd ${ROOT} | |
cd .. | |
devices=($(adb devices | awk '{if($2=="device") print $1}')) | |
if [ ${#devices[@]} == 0 ]; then | |
echo "No device found." |
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 <stdlib.h> | |
#include <string.h> | |
#include "libcurl_demo.h" | |
struct string { | |
char *ptr; | |
size_t len; | |
}; |
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
/** 0x01 **/ | |
struct Animal: Codable { | |
let name: String | |
let age: Int | |
} | |
let animal = Animal(name: "旺财", age: 1) | |
let jsonEncoder = JSONEncoder() | |
let jsonData = try jsonEncoder.encode(animal) | |
if let str = String(data: jsonData, encoding: .utf8) { |