- 下载
wget --no-check-certificate https://pypi.python.org/packages/source/s/supervisor/supervisor-3.0.tar.gz
- 安装
tar xzf supervisor-3.0.tar.gz && cd supervisor-3.0
python setup.py install
#!/bin/bash | |
# 对第三列求和 | |
awk -F "," '{sum+=$3} END {print sum}' test.csv | |
# 对第三列匹配求和 | |
awk -F "," ' $3 ~ /^CG/ {sum+=$5} END { print sum}' test.csv | |
# git clone |
wget --no-check-certificate https://pypi.python.org/packages/source/s/supervisor/supervisor-3.0.tar.gz
tar xzf supervisor-3.0.tar.gz && cd supervisor-3.0
python setup.py install
package main | |
import ( | |
"fmt" | |
"time" | |
"strconv" | |
"strings" | |
"io/ioutil" | |
"net/http" | |
"net/url" |
# -*- coding: utf-8 -*- | |
MAX_TAX = 500 | |
MAX_PRICE = 1000 | |
class Item(object): | |
"""商品类""" | |
def __init__(self, price, tax_rate, category): |
ffmpeg -loglevel debug -report -i recordUnity3D.mov -acodec libfaac -b:a 128k -vcodec libx264 -b:v 1200k -r 24 -flags +aic+mv4 -pix_fmt yuv420p -threads 0 -y output.mp4 | |
ffmpeg started on 2014-09-13 at 23:11:04 | |
Report written to "ffmpeg-20140913-231104.log" | |
ffmpeg version 2.3.2 Copyright (c) 2000-2014 the FFmpeg developers | |
built on Aug 14 2014 07:21:22 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) | |
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.3.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid | |
libavutil 52. 92.100 / 52. 92.100 | |
libavcodec 55. 69.100 / 55. 69.100 | |
libavformat 55. 48.100 / 55. 48.100 | |
libavdevice 55. 13.102 / 55. 13.102 |
#import <Foundation/Foundation.h> | |
int main(int argc, const char *argv[]) { | |
@autoreleasepool { | |
NSError *error; | |
NSURL *url = [NSURL URLWithString: @"http://127.0.0.1:6100/user/10167/profile/"]; | |
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url | |
cachePolicy:NSURLRequestUseProtocolCachePolicy | |
timeoutInterval: 10]; | |
NSData *received = [NSURLConnection sendSynchronousRequest:request |
#import <Foundation/Foundation.h> | |
int main(int argc, const char *argv[]) { | |
@autoreleasepool { | |
// formatter datetime | |
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; | |
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_us"]; | |
[formatter setLocale:locale]; | |
[formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; |
#import <Foundation/Foundation.h> | |
int main(int argc, const char *argv[]) { | |
@autoreleasepool { | |
NSArray *people = @[ | |
@{@"name": @"John", @"age": @23, @"gender": @YES}, | |
@{@"name": @"Tom", @"age": @25, @"gender": @YES}, | |
@{@"name": @"Lucy", @"age": @20, @"gender": @NO}, | |
]; | |
if ([NSJSONSerialization isValidJSONObject:people]) { |
#import <Foundation/Foundation.h> | |
@interface Person : NSObject | |
@property NSString *firstName; | |
@property NSString *lastName; | |
@property NSNumber *age; | |
@end |
#import <Foundation/Foundation.h> | |
@interface Square : NSObject | |
{ | |
float area; | |
} | |
- (void)calculateAreaOfSide: (CGFloat)side; | |
- (void)printArea; | |
@end |