xidui.github.io
Go语言学习笔记 | xidui is very lazy
http://xidui.github.io/2016/03/06/Go语言学习笔记
Xidui is very lazy. Package, imports 略. Error msg: cannot use [3]int literal (type [3]int) as type []int in return argument. Return array but slice needed. Std: vector int slice. B = a / 赋值,但a,b底层所指的数组是同一份,在堆中. FmtPrintln(a) / [1 0 0]. FmtPrintln(b) / [1 0 0]. FmtPrintln(a) / [1 2 0] 其实和b是同一份数据,因为a的长度还是3,所以只输出了3个. FmtPrintln(b) / [1 2 0 4]. A) / 0x820246000 a对象中的array指针地址已变,指向了更长的数组,但a变量本身并不会更改位置. FmtPrintln(a) / [1 2 0 5 6 7 8]. FmtPrintln(b) / [1 2 0 5]. Go get golang.org/x/tools/cmd/goimports.
xidui.github.io
谈谈项目的重构与测试 | xidui is very lazy
http://xidui.github.io/2015/12/09/谈谈项目重构与测试
Xidui is very lazy. Result 1 = sync call 1(some params). Result 2 = sync call 2(some params). If you don't want to refactor. Just call it as it always be. Result 1 = sync call 1(some params). Result 2 = yield. Async call 2(some params). 的方式 仅限于Python 2.7. Isinstance(e, gen.Return):. Return the value raised by logic. Title : {type : String. Time : {type : Date. Now(), required : true. Comments : [{. Content : {type : String. Test 1 user 1 user 2 add friend. Test 2 user 1 user 2 del friend. And save it in ...
xidui.github.io
算法训练——GCJ-2008-R1A-B-Milkshakes | xidui is very lazy
http://xidui.github.io/2016/03/27/算法训练笔记——GCJ-2008-R1A-B-Milkshakes
Xidui is very lazy. 题目链接: https:/ code.google.com/codejam/contest/32016/dashboard#s=p1. 如果所有用户至少有两种喜欢的奶昔,那么必然有一种是 unmalted ,那只要保证所有奶昔种类都是 malted 就解决了。 逻辑流程走到这里,表示必须做成 malted 的奶昔已经处理完毕,后续的逻辑可以不用考虑这种奶昔的存在,重新回到 1. 主循环体退出的条件 客户列表为空或者已经不存在只偏好某一种 malted 奶昔的客户. C = int(f.readline(). N = int(f.readline(). M = int(f.readline(). Tmp = {}. Line = f.readline().strip().split(). Ans = {}. Solution logic insert below. New malted = None. New malted = c.keys()[ 0. Del list = []. Res = "Case #{0}:". Res = " IMPOSSIBLE".
xidui.github.io
async源码阅读笔记 | xidui is very lazy
http://xidui.github.io/2015/12/24/async源码阅读笔记
Xidui is very lazy. Arg1, arg2, callback. Arg1 now equals 'one' and arg2 now equals 'two'. Arg1 now equals 'three'. Result now equals 'done'. Run( index, args, cb. Task = tasks[index];. Index = = tasks.length) {. Cb & cb.apply( null. Var rest = arguments.slice(1); / arguments并没有slice方法,因此这样会报错. Rest = [].slice.call( arguments. Run( index , rest, cb);. Taskslength = = 0. Cb & cb();. Run( index , [], cb);. Log([].slice.call( arguments. One", "two", "three"]. 123; '0': 'one', '1': 'two', '2': 'three' }.
xidui.github.io
在linode服务器上安装kubernetes集群 | xidui is very lazy
http://xidui.github.io/2016/05/30/在linode服务器上安装kubernetes集群
Xidui is very lazy. Module Size Used by. Root@localhost: $ uname -a. Linux localhost 4.5.0-x86-linode84 #2 SMP Mon Mar 14 18:19:49 EDT 2016 i686 i686 i686 GNU/Linux. Root@li85-212 ]# uname -a. Linux li85-212.members.linode.com 3.10.0-327.18.2.el7.x86 64 #1 SMP Thu May 12 11:03:55 UTC 2016 x86 64 x86 64 x86 64 GNU/Linux. Module Size Used by. Xt comment 12504 1. Ip6t rpfilter 12546 1. Ip6t REJECT 12939 2. 这里有一点要注意,linode默认rebuild的时候是没有开启 Auto-configure Networking 的,把最下面那个选上,再rebuild即可。 主题 - NexT.Mist.
xidui.github.io
celery初探 | xidui is very lazy
http://xidui.github.io/2016/01/13/celery初探
Xidui is very lazy. App = Celery( 'not important'. Broker= 'redis:/ 127.0.0.1/0'. App = Celery( 'celery worker'. Broker= 'redis:/ 127.0.0.1/0'. Celery -A celery worker worker - loglevel=info. Python celery producer.py. 2016-01-13 23:55:33,905: INFO/MainProcess] Received task: celery worker.add[c39b1acc-22e1-4d6c-a323-4a7a0da1864c]. 虽然从输出看,他的app名称是not important,但它的tasks却是celery worker.add. 主题 - NexT.Mist.
xidui.github.io
标签 | xidui is very lazy
http://xidui.github.io/tags
Xidui is very lazy. 主题 - NexT.Mist.
xidui.github.io
浅析tornado协程运行原理 | xidui is very lazy
http://xidui.github.io/2016/01/26/浅析tornado协程运行原理
Xidui is very lazy. 去年有一段时间一直在研究各种python协程框架,包括gevent, asyncio, tornado。 Wait time = random.randint( 1. Print( 'URL {} took {}s to get! Format(url, wait time). GenReturn( url, wait time). Before = time.time(). Coroutines = [get url(url) for. After = time.time(). Print( 'total time: {} seconds'. Name = ' main '. IOLoop.current().run sync(outer coroutine). URL URL1 took 1s to get! URL URL2 took 2s to get! URL URL3 took 2s to get! Apos;URL1', 1), ('URL2', 2), ('URL3', 2)]. Func, replace callback). Any(isins...
xidui.github.io
nginx中map模块的使用及性能测试 | xidui is very lazy
http://xidui.github.io/2016/07/13/nginx——map性能测试
Xidui is very lazy. Http:/ hostname/discuss/ topic id / topic name. Http:/ hostname/topic/ topic id / topic slug. Map hash max size 204800;. Map hash bucket size 204800;. Map $request uri $new {. Include /etc/nginx/conf.d/*.conf;. If ($new) {. Rewrite https:/ discuss.leetcode.com$new redirect;. Location / {. Resend( 'Hello World n'. Log( 'Server running at http:/ 0.0.0.0:1337/'. M2 = hashlib.md5(). Current = "hello world". F = open( './url.map'. Current = m2.hexdigest(). If ($new) {. 主题 - NexT.Mist.
xidui.github.io
xidui is very lazy
http://xidui.github.io/page/4
Xidui is very lazy. Lib文件夹是js核心模块所在的目录,在编译的时候会使用v8自带的js2c.py 在tools目录下 将这些js代码编译成c代码,然后再编译进二进制可执行文件中。 Nodejs 调用 C addon的学习. 主题 - NexT.Mist.