camera ic
OV2640 1600 1200
OV7620 640 480
PAL制式摄像头:OV6620、sonyCCD、LG CCD OV5116等
NTSC制式摄像头:OV7620、OV7640等
OV2640 1600 1200
OV7620 640 480
PAL制式摄像头:OV6620、sonyCCD、LG CCD OV5116等
NTSC制式摄像头:OV7620、OV7640等
ssh -oProxyCommand="nc -x 127.0.0.1:3128 %h %p" user@site.com
bsd-netcat has -x proxy
diskutil list
gpt
hdiutil
hdiutil burn -erase //fast erase
hdiutil burn -fullerase
hdiutil burn iso
hdiutil burn iso -device
hdiutil burn -list // list device
@class
@defs
@protocol @required @optional @end
@interface @public @package @protected @private @property @end
@implementation @synthesize @dynamic @end
@throw @try @catch @finally
@synchronized @autoreleasepool
@selector @encode
@compatibility_alias
@”string”
cmake . -LH //=./configure --help
cmake -DBUILD_SHARED_LIBS=NO -D CMAKE_INSTALL_PREFIX="/usr/local" .
BUILD_SHARED_LIBS
CMAKE_INSTALL_PREFIX
export CXXFLAGS="-std=c++11 -stdlib=libc++"
export LDFLAGS="-stdlib=libc++"
link to libc++ or libstdc++
the stl function symbol in object file are different in mac with xcode 7
when use std::vector as a argument
the argument symbol is St6vectorIiSaIi linking to libstdc++
the other is St3__16vectorIiNS6_9allocatorIi
this will cause linking errors
首先从静态库中解压 .o 文件
ar -x lib.a
nm查看符号表 找到重复的函数符号名
nm a.o
c和c++的符号表不一样
0000000000000000 T __Z4testv //c++
0000000000000000 T test //c
隐藏符号 相当于加 static
ld -r a.o -unexported_symbol __Z4testv -o c.o; rm a.o; mv c.o a.o //mac 下可使用
objcopy --localize-symbol=_Z4testv a.o
修改符号名称
ld -r a.o -alias __Z4testv test_c -unexported_symbol __Z4testv -o c.o //mac 下可使用
objcopy --redefine-sym _Z4testv=test_a a.o
如果其他 .o文件引用了这个函数 对每一个文件都要执行
判断字符串是否为整数
[[ "${str}" =~ ^-?[[:digit:]]*$ ]] //正则表达式 不能加引号
expr match "$str" "^-\?[0-9]*$"
判断字符串 包含 123
[[ "${str}" == *"123"* ]]
获取osx下的键盘输入
NSKeyDown事件需要 申请权限
(System Preferences → Security & Privacy → Accessibility)
NSDictionary *dict=@{(__bridge NSString *)kAXTrustedCheckOptionPrompt:@YES};
BOOL istrue=AXIsProcessTrustedWithOptions((__bridge CFDictionaryRef)dict);
NSLog(@"%d",istrue);
方法1 cocoa