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<stdio.h> | |
#include<windows.h> | |
#include<malloc.h> | |
int main(void) | |
{ | |
int c; | |
int i; | |
int j; | |
nihao: |
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<stdio.h> | |
int main(void) | |
{ | |
float a,r1,r2,m; | |
char b,c; | |
printf("请输入加油量,汽油类型(a,b,c)以及服务类型(f,m,e)\n"); | |
printf("***************************************************\n"); | |
printf("请输入:"); |
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 <stdio.h> | |
int main (int argc, const char * argv[]) { | |
int a, b, i, t; | |
scanf("%d%d", &a, &b); | |
if (a < b) { | |
t = a; |
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
#pragma mark - | |
- (void)drawTestLine | |
{ | |
// test code : draw line between Beijing and Hangzhou | |
CLLocation *location0 = [[CLLocation alloc] initWithLatitude:39.954245 longitude:116.312455]; | |
CLLocation *location1 = [[CLLocation alloc] initWithLatitude:30.247871 longitude:120.127683]; | |
NSArray *array = [NSArray arrayWithObjects:location0, location1, nil]; | |
[self drawLineWithLocationArray:array]; | |
} |
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
# default.custom.yaml | |
# save it to: | |
# ~/.config/ibus/rime (linux) | |
# ~/Library/Rime (macos) | |
# %APPDATA%\Rime (windows) | |
patch: | |
schema_list: | |
- schema: luna_pinyin # 朙月拼音 | |
- schema: luna_pinyin_simp # 朙月拼音 简化字模式 |
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
# got this from http://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles | |
ffmpeg -i infile.mp4 -f srt -i infile.srt -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=chi outfile.mp4 | |
# confirmed working with the following ffmpeg | |
# (installed using `brew 'ffmpeg', args: ['with-libvorbis', 'with-libvpx']` ) | |
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers | |
built with Apple clang version 12.0.0 (clang-1200.0.32.2) | |
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libx |
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
func getSystemUUID() -> String? { | |
let dev = IOServiceMatching("IOPlatformExpertDevice") | |
let platformExpert: io_service_t = IOServiceGetMatchingService(kIOMasterPortDefault, dev) | |
let serialNumberAsCFString = IORegistryEntryCreateCFProperty(platformExpert, kIOPlatformUUIDKey as CFString, kCFAllocatorDefault, 0) | |
IOObjectRelease(platformExpert) | |
guard let ser: CFTypeRef = serialNumberAsCFString?.takeUnretainedValue() else { return nil } | |
if let result = ser as? String { | |
return result |
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 Foundation | |
/** | |
Set FourCharCode/OSType using a String. | |
Examples: | |
let test: FourCharCode = "420v" | |
let test2 = FourCharCode("420f") | |
print(test.string, test2.string) | |
*/ |