2015年11月21日

linux c++知识

摘要: 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。作者:Lippi OuYang链接:http://www.zhihu.com/question/20124494/answer/29689762来源:知乎Webbench是一个在linux下使用的非常简单的网站压测工具。它使用for... 阅读全文

posted @ 2015-11-21 19:13 冰尨 阅读(310) 评论(0) 推荐(0)

2015年2月7日

win8下cocos2dx-3.2+VS2012环境配置及项目创建

摘要: 转自http://88cto.com/996655/article/details/33738.html这是本人CSDN的第一篇博客,因为假期在学校做实训项目接触到了cocos2dx,觉得是一个特别适用强大,有不错的可移植性(虽然可移植性不错,但实际上写好的游戏往Android上移植,我的队友废了好... 阅读全文

posted @ 2015-02-07 17:00 冰尨 阅读(204) 评论(0) 推荐(0)

2015年1月22日

Lua基础 coroutine —— Lua的多线程编程

摘要: Lua的coroutine跟thread的概念比较相似,但是也不完全相同。一个multi-thread的程序,可以同时有多个thread 在运行,但是一个multi-coroutines的程序,同一时间只能有一个coroutine在运行,而且当前正在运行的coroutine只有在被显式地要求挂起时,... 阅读全文

posted @ 2015-01-22 20:14 冰尨 阅读(1222) 评论(0) 推荐(0)

协同与迭代器

摘要: -----------------------------生产数组的全排列--------------------------------function permgen(a, n) n = n or #a --默认n为a的大小 if n <= 1 then --print... 阅读全文

posted @ 2015-01-22 19:22 冰尨 阅读(188) 评论(0) 推荐(0)

生产者消费者

摘要: producer =coroutine.create(function () --生产者 while true do local x = io.read() --生产新的值 send(x) --发送给消费者 endend)fun... 阅读全文

posted @ 2015-01-22 18:51 冰尨 阅读(155) 评论(0) 推荐(0)

协同程序

摘要: --[[协同程序的四种状态挂起(suspended)、运行(running)、死亡(dead)和正常(normal)status yield --挂起程序coroutine.create(function(a, b, c) --coroutine.resume(co, 1, 2, 3) 分别把1,... 阅读全文

posted @ 2015-01-22 18:40 冰尨 阅读(173) 评论(0) 推荐(0)

2014年12月22日

EditPlus 搭建 Lua 开发环境

摘要: 转自http://blog.csdn.net/dofy/article/details/8513698准备学一门语言之前,有个得心应手的编辑器是很有必要的(编辑器是程序员圈子中永恒的话题),因为我一直在用 EditPlus,所以这里介绍一下如何在 EditPlus 中搭建 Lua 开发环境。当然动手... 阅读全文

posted @ 2014-12-22 14:28 冰尨 阅读(338) 评论(0) 推荐(0)

2014年12月21日

sudo apt-get update 不了

摘要: Ubuntu 11.04 (Natty) 已经停止支持,但可以使用old-releases源了,先备份源列表文件:sudo cp /etc/apt/sources.list /etc/apt/sources.list.backupsudo gedit /etc/apt/sources.list把里面... 阅读全文

posted @ 2014-12-21 16:23 冰尨 阅读(788) 评论(0) 推荐(0)

2013年6月14日

砝码称重

摘要: 来源:NOIP1996(提高组) 第四题【问题描述】设有1g、2g、3g、5g、10g、20g的砝码各若干枚(其总重<=1000),用他们能称出的重量的种类数。【输入文件】a1 a2 a3 a4 a5 a6(表示1g砝码有a1个,2g砝码有a2个,…,20g砝码有a6个,中间有空格)。【输出文件】Total=N(N表示用这些砝码能称出的不同重量的个数,但不包括一个砝码也不用的情况)。【输入样例】1 1 0 0 0 0【输出样例】TOTAL=3 1 #include <stdio.h> 2 #include <memory.h> 3 #define MAX 1001 阅读全文

posted @ 2013-06-14 21:39 冰尨 阅读(252) 评论(0) 推荐(0)

2013年5月28日

how to install foxit reader

摘要: first you should install the wine. the command maybe :sudo add-apt-repository ppa:ubuntu-wine/ppasudo apt-get updatesudo apt-get install wine1.3then download the deepinwine-foxitreader package, there maybe have two versions:1:http://packages.linuxdeepin.com/deepin/pool/main/d/deepinwine-foxitreader4 阅读全文

posted @ 2013-05-28 20:20 冰尨 阅读(167) 评论(0) 推荐(0)

导航