11 2015 档案
摘要:#kmp class Solution(object): def strStr(self, haystack, needle): """ :type haystack: str :type needle: str :rtype: int ...
        阅读全文
                
摘要:class Solution(object): def removeElement(self, nums, val): """ :type nums: List[int] :type val: int :rtype: int ...
        阅读全文
                
摘要:class Solution(object): def removeDuplicates(self,nums): if len(nums) <= 0: return 0 j=0 for i in range(0,len(nums)): if...
        阅读全文
                
摘要:# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solutio...
        阅读全文
                
摘要:# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solutio...
        阅读全文
                
摘要:upstream proxy_1 { server 127.0.0.1:8080; #连接到上游服务器的最大并发空闲keepalive长连接数(默认是未设置,建议与Tomcat Connector中的maxKeepAliveRequests值一样) #当这个...
        阅读全文
                
摘要:参数说明示例$remote_addr客户端地址211.28.65.253$remote_user客户端用户名称--$time_local访问时间和时区18/Jul/2012:17:00:01 +0800$request请求的URI和HTTP协议"GET /article-10000.html HTT...
        阅读全文
                
摘要:http keepalive 减少tcp 连接 (三次握手的消耗)tcp keepalive 检测死链接的session 在tcp连接中, src_ip + src_port + dest_ip + dest_port generate a unique session id
        阅读全文
                
摘要:# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solutio...
        阅读全文
                
摘要:这个模块(build-in)实现了一个堆的数据结构,完美的解决了Top-K问题,以后解决Top-K问题的时候,直接把这个模块拿来用就可以了注意,默认的heap是一个小顶堆! heapq模块提供了如下几个函数:heapq.heappush(heap, item) 把item添加到heap中(heap是...
        阅读全文
                
摘要:# 解题思路:列举出所有合法的括号匹配,使用dfs。如果左括号的数量大于右括号的数量的话,就不能产生合法的括号匹配class Solution(object): def generateParenthesis(self, n): """ :type n: int ...
        阅读全文
                
摘要:curl -H "Content-Type: application/json" http://127.0.0.1:8000 -X POST -d 'xxxx'php$strParam = $GLOBALS['HTTP_RAW_POST_DATA'];
        阅读全文
                
摘要:# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solutio...
        阅读全文
                
摘要:# 解题思路: # 创建一个字典映射关系 dicts# 使用一个栈stk 遍历字符串s 得到一个新的字符串curItem 如果lastItem在dicts中的value和它相等 不做任何操作# 如果不等 入栈 有lastItem的 先append lastItem 然后是curItem ## 最后判...
        阅读全文
                
摘要:# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solutio...
        阅读全文
                
摘要:class Solution(object): def fourSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[List[...
        阅读全文
                
摘要:class Solution(object): def letterCombinations(self, digits): """ :type digits: str :rtype: List[str] """ if len...
        阅读全文
                
摘要:class Solution(object): def threeSumClosest(self, nums, target): """ :type nums: List[int] :type target: int :rtype: in...
        阅读全文
                
摘要:upstream.confupstream grey_1 ...
        阅读全文
                
摘要:http request parameter addhtmlspecialcharshost?vendor_id=1000000&q=Some%20children%20wish%20to%20be%20writers&loc=103.844915%2C36.014027&lang=zh-CN&s=...
        阅读全文
                
摘要:# sort the array# loop from i = 0 # then left=i+1 right=len(nums)-1# try nums[i] - ( nums[left]+nums[right]) = 0 # class Solution(object): def thre...
        阅读全文
                
摘要:class Solution(object): def longestCommonPrefix(self, strs): """ :type strs: List[str] :rtype: str """ if len(st...
        阅读全文
                
摘要:class Solution(object): def romanToInt(self, s): """ :type s: str :rtype: int """ numerals = { "M": 1000, "D": 5...
        阅读全文
                
摘要:class Solution(object): def intToRoman(self, num): """ :type num: int :rtype: str """ if num > 3999 or num = val...
        阅读全文
                
摘要:# add / location /app/ { proxy_pass http://$backend/;}#location /app/ { proxy_pass http://$backend; }1 加斜杠:请求 http://domain/app/demo.ph...
        阅读全文
                
摘要:$args$content_length$content_type$document_root$document_uri$host$http_user_agent$http_cookie$limit_rate$request_body_file$request_method$remote_addr$...
        阅读全文
                
摘要:class Solution(object): def maxArea(self, height): """ :type height: List[int] :rtype: int """ intSum = ...
        阅读全文
                
摘要:# 查看静态态依赖库ldd ./nginx #查看安装了哪些模块./nginx -V
        阅读全文
                
摘要:./configure --prefix=/home/admin/local/tengine --with-http_stub_status_module --with-http_ssl_module --with-http_upstream_check_module --with-http_con...
        阅读全文
                
摘要:class Solution(object): def isPalindrome(self, x): """ :type x: int :rtype: bool """ if x < 0: return...
        阅读全文
                
摘要:#php proxytotal sent request num: 507total handle read times: 506506 fetches, 2 max parallel, 2.7129e+06 bytes, in 20 seconds5361.45 mean bytes/fetche...
        阅读全文
                
摘要:class Solution(object): def myAtoi(self, str): """ :type str: str :rtype: int """ intMax=2147483647 intMi...
        阅读全文
                
摘要:class Solution(object): def reverse(self, x): """ :type x: int :rtype: int """ answer = 0 sign = ...
        阅读全文
                
摘要:class Solution(object): def longestPalindrome(self, s): """ :type s: str :rtype: str """ lenStr = len(s) ...
        阅读全文
                
摘要:# @link http://www.cnblogs.com/zuoyuan/p/3759682.htmlclass Solution(object): def findMedianSortedArrays(self, nums1, nums2): """ :typ...
        阅读全文
                
摘要:class Solution(object): def lengthOfLongestSubstring(self, s): """ :type s: str :rtype: int """ if len(s) maxLe...
        阅读全文
                
摘要:class Solution(object): def climbStairs(self, n): """ :type n: int :rtype: int """ if n <= 2: return ...
        阅读全文
                
摘要:# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solutio...
        阅读全文
                
 
                    
                
 浙公网安备 33010602011771号
浙公网安备 33010602011771号