一、安装1、# apt-get install wine安装完后在终端里运行wine:# wine会弹出一个对话框:This is the wine64-bin helper package, which does not provide wine itself,but instead exists...
function substr_text($str, $start=0, $length, $charset="utf-8", $suffix=""){ if(function_exists("mb_substr")){//mb_substr函数不是php内置函数,需要加载php.mbstring....
分类:
其他好文 时间:
2014-09-21 20:52:31
阅读次数:
217
原文http://www.helyar.net/2009/libvlc-media-player-in-c/There seems to be a massive misconception about using VLC inside an application and many, many l...
分类:
其他好文 时间:
2014-09-21 19:48:21
阅读次数:
488
原文http://www.helyar.net/2009/libvlc-media-player-in-c-part-2/I gave some simplified VLC media player code inpart 1to show how easy it was to do and ho...
分类:
其他好文 时间:
2014-09-21 19:34:01
阅读次数:
395
跟 column相关的常见的方法有:column_exists? (table_name, column_name, type = nil, options = {})add_column (table_name, column_name, type, options = {})remove_co....
分类:
其他好文 时间:
2014-09-21 18:38:31
阅读次数:
271
1.动态联通性问题描述:
有N个元素,开始时我们让每一个元素肚子构成一个集合。然后按一定的顺序将属于同一组中的元素合并,构成新的集合。其间要反复查询某个元素在哪个集合中。如下所示:
解决办法:
(1)Quick-Find
声明一个长度为N的数组id,数组中元素的值代表它所属组的编号。将数组中的元素初始化为每个元素的索引值,这样就表示开始时每个元素各自构成一个独立的集合...
分类:
其他好文 时间:
2014-09-21 17:40:11
阅读次数:
881
状态机在quick中是一个亮点,如果我们做一款RPG游戏,一个角色一般会拥有idle,attack,walk,run,death这些状态,如果游戏角色的状态采用分支条件判断的话,会造成非常庞大而难以维护,但一旦使用了状态机这种模式,就会显得简单方便。对于quick中的状态机是如何实现的咱们先不去了解,首先看看如何去使用它。总结起来,如果让一个类拥有状态机,主要有两步:1.创建状态机对象2.初始化状...
分类:
其他好文 时间:
2014-09-20 22:09:39
阅读次数:
318
TBOX提供了各种常用算法,对容器中的元素进行各种操作,这里主要介绍下排序和查找算法。 排序算法目前支持如下几种: 1. 快速排序:tb_quick_sort 2. 堆排序: tb_heap_sort 3. 插入排序:tb_bubble_sort 4. 冒泡...
分类:
其他好文 时间:
2014-09-20 19:38:49
阅读次数:
183
String separator = File.separator;String filename = "myfile.txt";String dir = "mydir1"+separator+"mydir2";File f = new File(dir,filename);if(f.exists....
分类:
其他好文 时间:
2014-09-20 18:22:29
阅读次数:
157