public class ViewHolder { // I added a generic return type to reduce the casting noise in client code @SuppressWarnings("unchecked") public static T g...
分类:
移动开发 时间:
2014-06-25 23:38:42
阅读次数:
319
#include #include int main( ){ using namespace std; using namespace stdext; hash_map hm1; hash_map :: const_iterator hm1_AcIter, hm1_RcIter;...
分类:
其他好文 时间:
2014-06-25 20:57:59
阅读次数:
140
var map=new Map();
map.put("a","A");map.put("b","B");map.put("c","C");
map.get("a"); //返回:A
map.entrySet() // 返回Entity[key,value]
map.containsKey('kevin') //返回:false
function Map() {
th...
分类:
编程语言 时间:
2014-06-25 00:05:28
阅读次数:
309
看到一篇博文写lambda和reduce函数,笔者小痒了一下,用Python实现一下:
#! /usr/bin/env python
# -*-coding:utf-8-*-
import time
import math
def test_reduce():
start_time = time.clock()
print reduce[A1] (lam...
分类:
编程语言 时间:
2014-06-24 20:37:10
阅读次数:
272
icemouse210写了一个Perl版本的,发挥了脚本高度封装的优势。我把代码贴出来,供大家参考分享。...
分类:
其他好文 时间:
2014-06-24 18:41:16
阅读次数:
277
sass在3.3引入map类型,它与JS的对象非常相似,它有两种定义模式。外面都是用小括号括括起来,每个键值对可以像JS那样与逗号分开。不同之后是,键名与键值之间的冒号不是 必须的不用对象的情况@charset "utf-8";//必须设置了这个才能编译有中文的注释//创建一个核心的颜色$bravo...
分类:
其他好文 时间:
2014-06-24 12:46:20
阅读次数:
290
var sp:Sprite=new Sprite(); sp.graphics.beginFill(0xffccdd); sp.graphics.drawRect(0,0,100,100); sp.graphics.beginFill(0x33eedd); sp.graphics.d...
分类:
其他好文 时间:
2014-06-24 12:13:29
阅读次数:
191
<?php function build_order_no(){ return date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8); ...
分类:
Web程序 时间:
2014-06-24 11:59:06
阅读次数:
345
原文地址:http://blog.csdn.net/chuyuqing/article/details/19629229在对《Set和hashCode()》的一篇原创文章写完后,由于对自己的一些论断产生了模糊和怀疑,因此又对Set进行了一些研究,形成本篇。在Set的使用场景中,我们不外乎看中了她存储...
分类:
编程语言 时间:
2014-06-24 11:50:33
阅读次数:
238
from:unix高级环境编程
unix/linux中共享内存是最高效的ipc方式。
有几种使用方式:
1)mmap /dev/zero设备:
fd = open("/dev/zero", O_RDWR);
area = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
close(fd);
加入MAP_SHARE...
分类:
其他好文 时间:
2014-06-22 06:21:16
阅读次数:
215