Java中对Map(HashMap,TreeMap,Hashtable等)的排序时间
首先简单说一下他们之间的区别: HashMap: 最常用的Map,它根据键的HashCode
值存储数据,根据键可以直接获取它的值,具有很快的访问速度。HashMap最多只允许一条记录的键为Null(多条会覆盖);...
分类:
编程语言 时间:
2014-05-08 13:44:25
阅读次数:
333
c# 获取字符串中的数字 /// /// 获取字符串中的数字 /// /// 字符串 /// 数字
例子1: public static decimal GetNumber(string str) { decimal result = 0; if (str
!= null && str != str...
分类:
其他好文 时间:
2014-05-08 13:32:21
阅读次数:
347
1:默认初始化如果对类中的变量不进行初始化,系统则会初始化变量为对应的值 比如int = 0,
bool = fase String = null;2:手动初始化变量private int age = 23;3:初始化块{ id = 201245; age
= 23;}4:构...
分类:
编程语言 时间:
2014-05-08 12:57:43
阅读次数:
361
static BOOL flag=NO;
dispatch_queue_t myQueue=dispatch_queue_create("identifier", NULL);
dispatch_async(myQueue, ^{
for (int i=0; i
NSLog(@"...
分类:
编程语言 时间:
2014-05-07 21:37:21
阅读次数:
305
Explain的type显示的是访问类型,是较为重要的一个指标,结果值从好到坏依次是:system
> const > eq_ref > ref > fulltext > ref_or_null > index_merge
> unique_subquery > index_subquery > r...
分类:
其他好文 时间:
2014-05-07 21:26:56
阅读次数:
282
建立数据库: mysql>create database test;
//建立一个名为"test"的数据库建立数据库表: mysql> create table test -> (name char(16) not
null, -> passwd...
分类:
数据库 时间:
2014-05-07 21:22:19
阅读次数:
378
std::string GetFilePath() { char
exepath[MAX_PATH];std::string strdir,tmpdir;memset(exepath,0,MAX_PATH);
GetModuleFileName(NULL,exepath,MAX_PATH); tmp...
分类:
其他好文 时间:
2014-05-07 14:59:14
阅读次数:
240
今天下午做了一个滚动浏览效果,贴在此,积累$(function(){ /* * 滚动浏览 */
$.fn.autoScroll = function(o){ o = $.extend({ speed: 20, step : 1, up : null,
down : null }, o || {})....
分类:
其他好文 时间:
2014-05-07 01:49:02
阅读次数:
234
1.SQL TO String :只返回一个查询结果 例如查询某条记录的总数 rs =
stmt.executeQuery(replacedCommand); if (rs != null && rs.next()) // rs
only contains one row and one colu....
分类:
数据库 时间:
2014-05-07 00:18:30
阅读次数:
600
实现一个函数复制一个复杂链表。在复杂链表中,每个结点除了有一个m_pNext指针指向下一个结点外,还有一个m_pSibling指向链表中的任意结点或者NULL。
分类:
其他好文 时间:
2014-05-06 23:48:50
阅读次数:
461