码迷,mamicode.com
首页 >  
搜索关键字:constant pool    ( 4909个结果
LeetCode-Sort List(Python)
【问题】 Sort a linked list in O(n log n) time using constant space complexity. 【代码】 # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # ...
分类:编程语言   时间:2014-06-28 08:29:23    阅读次数:222
简单实现内存池
#include "common.h"#include "pool.h"#include static inline void *objmem_to_obj(void *objmem){return objmem + sizeof(pool_obj_head_t);}static inline vo...
分类:其他好文   时间:2014-06-27 21:24:59    阅读次数:292
Sort List
Sort a linked list in O(n log n) time using constant space complexity.思路:使用O(nlogn)时间复杂度和常数空间复杂度,我们想到可以用归并排序。1)找到链表中间位置2)将两个链表按序合并链表3)对所给链表进行整体的归并排序/*...
分类:其他好文   时间:2014-06-27 00:22:37    阅读次数:303
深入理解C++中的mutable关键字
mutalbe的中文意思是“可变的,易变的”,跟constant(既C++中的const)是反义词。 在C++中,mutable也是为了突破const的限制而设置的。被mutable修饰的变量,将永远处于可变的状态,即使在一个const函数中。 我们知道,如果类的成员函数不会改变对象的状态,那么.....
分类:编程语言   时间:2014-06-26 21:28:25    阅读次数:283
gst-rtsp-server 转发rtsp流
//以下为rtsp的服务器A 1 #include 2 3 #include 4 #include 5 6 static gboolean 7 timeout (GstRTSPServer * server) 8 { 9 GstRTSPSessionPool *pool;10 11 ...
分类:其他好文   时间:2014-06-25 14:21:25    阅读次数:648
iOS_应用程序的生命周期
每一个iPhone程序都包含一个UIApplication对象,它管理整个程序的生命周期,从加载第一个显示界面开始,并且监听系统事件、程序事件调度整个程序的执行。 int main(int argc, char *argv[]) {       NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];       int ret...
分类:移动开发   时间:2014-06-25 06:55:38    阅读次数:268
php扩展mssql.so连接sqlserver2008
1、安装配置freetds wget http://mirrors.xmu.edu.cn/ubuntu/archive/pool/main/f/freetds/freetds_0.82.orig.tar.gz tar zxf freetds_0.82.orig.tar.gz
分类:数据库   时间:2014-06-23 00:01:54    阅读次数:415
Struts(2) struts.xml
通常struts.xml都是如下形式: struts元素下有五个元素,只讲解package、constant、include;package: 在Struts2框架中是通过包来管理action、result、interceptor、interceptor-stack等配置信息的。属性:n...
分类:其他好文   时间:2014-06-22 23:29:51    阅读次数:296
LeetCode::Sort List 详细分析
Sort a linked list in O(n log n) time using constant space complexity. 这道题目非常简短的一句话,给链表排序,看到nlogn,我们可以来简单复习一下排序。首先说一下这个nlogn的时间复杂度(根据决策树我们可以得出这个界限),是基于比较排序的最小上限,也就是说,对于没有一定范围情况的数据来说,最快的排序思路就是归并和快速排...
分类:其他好文   时间:2014-06-22 09:02:54    阅读次数:250
Zend_Db_Table::getDefaultAdapter is not working
在Bootstrap中使用 $url = constant ( "APPLICATION_PATH" ) . DIRECTORY_SEPARATOR . 'configs' . DIRECTORY_SEPARATOR . 'application.ini'; $dbconfig = new Zend_Config_Ini ( $url, "mysql" ); // $db = Zen...
分类:数据库   时间:2014-06-22 07:52:08    阅读次数:205
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!