- 博客(18)
- 收藏
- 关注
原创 LeetCode.38.Count and Say
原题链接:Count and Say题目内容: The count-and-say sequence is the sequence of integers with the first five terms as following: 1 11 21 1211 111221 1 is read off as “one 1” or 11. 11 i...
2018-03-30 19:33:27 125
原创 LeetCode.125.Valid Palindrome
原题链接:Valid Palindrome 题目内容: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example, “A man, a plan, a canal: Panama” is a pa...
2018-03-30 19:03:15 114
原创 LeetCode.242.Valid Anagram
原题链接:Valid Anagram题目内容: Given two strings s and t, write a function to determine if t is an anagram of s.For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t = “car”, return fa...
2018-03-28 19:09:41 142
原创 LeetCode.387.First Unique Character in a String
原题链接:First Unique Character in a String题目内容: Given a string, find the first non-repeating character in it and return it’s index. If it doesn’t exist, return -1.Examples: s = “leetcode” re...
2018-03-28 18:07:30 111
原创 LeetCode.344.Reverse String
原题链接:Reverse String题目内容: Write a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.Pythonclass Solution(object): def...
2018-03-28 16:44:56 134
原创 LeetCode.326.Power of Three
原题链接:Power of Three题目内容: Given an integer, write a function to determine if it is a power of three.Follow up: Could you do it without using any loop / recursion?Credits: Special thanks to @d...
2018-03-28 14:30:58 203
原创 LeetCode.204.Count Primes
原题链接:Count Primes题目内容: Description:Count the number of prime numbers less than a non-negative number, n.Credits: Special thanks to @mithmatt for adding this problem and creating all test cases...
2018-03-28 11:54:27 114
原创 LeetCode.412.Fizz Buzz
原题链接:Fizz Buzz题目内容:Write a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of f...
2018-03-23 17:46:31 143
转载 Solution for hanging workers (Celery)
Celery文档两种解决方式:如果确认是应为当前worker的并发是prefork(多进程),并且可能是由于死锁原因造成!那么可以使用 CELERYD_FORCE = True ,这样可以有效防止死锁。即使不是这个原因造成的,也尽量加上。注意:这种处理方式在4.0之后的版本不支持了,使用时需检查版本,也可采用下面的方式第二种解决方式使用与大多数进程hanging的情况...
2018-03-23 17:22:41 245
原创 LeetCode.36.Valid Sudoku
原题链接:Valid Sudoku题目内容:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character ‘.’. A...
2018-03-23 17:19:53 147
原创 LeetCode.1.Two Sum
原题链接:Two Sum题目内容:Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you ma...
2018-03-20 18:09:49 126
原创 LeetCode.283.Move Zeroes
原题链接:Move Zeroes题目内容:Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12]...
2018-03-19 19:04:46 136
原创 LeetCode.66.Plus One
原题链接:Plus One题目内容:Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.You may assume the integer do not contain any leading zero, except the number 0 i...
2018-03-16 11:25:02 132
原创 翻译系统语言标识符以及各语言大小写汇总
##一、翻译系统支持的全部语言以及统一标识符{“zh_name”: “英语”, “en_name”: “english”, “short_name”: “en”},{“zh_name”: “德语”, “en_name”: “german”, “short_name”: “de”},{“zh_name”: “荷兰语”, “en_name”: “dutch”, “short_name”: “nl”},
2018-03-16 10:37:51 15
原创 几个重要的词典
一、灵格斯词典 二、Mdict词典 参考豆瓣文章: https://www.douban.com/note/496431304/ 有很大帮助 (1)Mdict程序 Mdict是一个词典程序,可以导入不同的词库,词库的格式一般是MDX的。 下载地址: http://www.mdict.cn/wp/?page_id=5227&lang=zh (2)词库制作工具 你可以使用词库制作...
2018-03-16 10:34:46 7
原创 一些Unicode字符总结
控制字符包含了\n\t\r\f等,将他们统一替换为空字符串。这里面没有包含空格。将U+007F->DEL也包含在里面了。control_chars = u”[\u0000-\u001F\u007f-\u009f]”标点和数字 替换为空 引号、中划线、加号除外other_chars = u”[\u0021-\u0026\u0028-\u002a\u002c\u002e-\u0040...
2018-03-16 10:32:22 1133
原创 nginx CORS 配置
nginx 跨域请求## Wide-open CORS config for nginx#location / {if ($request_method = ‘OPTIONS’) {add_header ‘Access-Control-Allow-Origin’ ‘*’;## Om nom nom cookies#add_header ‘Access-Contro...
2018-03-02 12:00:24 695
原创 常用正则表达式总结
1. 特殊要求正则ip地址\(\(\d\{1,2}\|1\d\{2}\|2[0-4]\d\|25[0-5]\)\.\)\{3}\(\d\{1,2}\|1\d\{2}\|2[0-4]\d\|25[0-5]\)日期格式^\d{4}-\d{1,2}-\d{1,2}中文Chinese[\u4e00-\u9fa5]+俄文Russian[АБВГ...
2018-03-01 16:20:28 446
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人