用于记录一些简短的想法
[view lockFocus];NSRect bounds = [view bounds];NSBitmapImageRep* rep;rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:bounds];[view unlockFocus];// 或者BitmapImageRep* rep = [view bitmapImageRepForCachingDisplayInRect:self.bounds];[view cacheDisplayInRect:self.bounds toBitmapImageRep:rep];NSData *data = [rep representationUsingType:NSJPEGFileType properties:nil];[data writeToFile:@"/path/to/file.jpg" atomically:NO];
git commit --amend
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes ./myapp
NSPoint point = [theEvent locationInWindow];NSDictionary *dict = [webView elementAtPoint:point];DOMNode *node = [dict objectForKey:@"WebElementDOMNode"];
int opt = 1;::setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&opt, sizeof(opt));
# echo 600 > /proc/sys/net/ipv4/tcp_keepalive_time# echo 60 > /proc/sys/net/ipv4/tcp_keepalive_intvl# echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes
« [2][3][4][5][6][7][8][9][10] » 6/45
你想加入百度吗?
查看结果
Reply
Reply
Reply
Reply
1. 在 Finder 中找到应用程序(*.app)
2. Cmd + C 复制
3. 启动 Preview
4. 选择菜单 File -> New From Clipboard Reply
同时, 还要修改操作系统的相关配置:
Reply
clang -lobjc -fobjc-arc -framework Foundation test.m Reply
:set paste
ctrl+v
:set nopaste Reply