- 自带的 language-python 已经支持一部分的自动补齐
- 更高级的可以使用 autocomplete-python
- 本机上使用 pip 安装过 flake8
- 安装 linter
- 安装 linter-flake8
/*! Returns the major version of iOS, (i.e. for iOS 6.1.3 it returns 6) | |
*/ | |
NSUInteger DeviceSystemMajorVersion() | |
{ | |
static NSUInteger _deviceSystemMajorVersion = -1; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
_deviceSystemMajorVersion = | |
[[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."][0] integerValue]; |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NSTimer *timer = [NSTimer timerWithTimeInterval:(0.1f) target:self selector:@selector(updateValue:) userInfo:nil repeats:YES]; | |
[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; | |
[[NSRunLoop mainRunLoop] addTimer:timer forMode:UITrackingRunLoopMode]; |
// First Config: target -> general -> Deployment Info -> Main Interface (Clear!) | |
// Then can move the Main.storyboard | |
// Only ViewController | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
ViewController *viewController = [[ViewController alloc] init]; | |
self.window.rootViewController = viewController; | |
[self.window makeKeyAndVisible]; | |
// With Navigation Controller |
几个常用的 curl 命令:
搭配测试的网站:
httpbin(1): HTTP Client Testing Service
再用本地的 Charles 做代理看整个的详情:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>广告统计</title> | |
<script src="jquery.js"></script> | |
</head> | |
<body> | |
<a href="http://localhost:8000/apple" ad-load-url="http://localhost:8000/apple/load" ad-click-url="http://localhost:8000/apple/click">apple</a> | |
<a href="http://localhost:8000/orange" ad-load-url="http://localhost:8000/orange/load" ad-click-url="http://localhost:8000/orange/click">orange</a> |
#!/usr/bin/env python | |
# coding: utf-8 | |
import socket | |
import sys | |
from thread import * | |
try: | |
listening_port = int(raw_input("[*] Enter Listening Port Number: ")) | |
except KeyboardInterrupt: | |
print("\n[*] User Requested An Interrupt") |
<?xml version="1.0" encoding="ISO-8859-1" ?> | |
<rss version="2.0"> | |
<channel> | |
<title>w3cschool Home Page</title> | |
<link>http://www.w3cschool.cc</link> | |
<description>Free web building tutorials</description> | |
<item> | |
<title>RSS Tutorial</title> | |
<link>http://www.w3cschool.cc/rss</link> |