1 /*** 2 * Licensed to the Apache Software
Foundation (ASF) under one or more 3 * contributor license agreements. See the
NOTICE file distribut...
分类:
编程语言 时间:
2014-06-16 10:37:31
阅读次数:
287
While it’s cool to make a custom element like
we did the the previous cast, it’s actually more common to do things like create
custom attributes. Thes...
分类:
Web程序 时间:
2014-06-16 10:19:04
阅读次数:
276
系统# uname -a # 查看内核/操作系统/CPU信息# head -n 1
/etc/issue # 查看操作系统版本# cat /proc/cpuinfo # 查看CPU信息# hostname # 查看计算机名# lspci -tv
# 列出所有PCI设备# lsusb -tv # 列出...
分类:
系统相关 时间:
2014-06-16 07:34:44
阅读次数:
302
Question:Given a stringsand a dictionary of
wordsdict, determine ifscan be segmented into a space-separated sequence of one
or more dictionary words.F...
分类:
其他好文 时间:
2014-06-16 07:32:47
阅读次数:
186
一般我们在linux上读取文件,是用vi工具,如果是写shell 脚本时,一般式通过cat 再
使用管道来达到流的处理。但如果文件太大,单纯的cat 可能会使用过多的内存,而且实现上还需要后续的加工,不大可取。下面我分享两个方法来读取部分文件。方法一sed
-n "10,20p" /opt/chen...
分类:
系统相关 时间:
2014-06-16 07:23:20
阅读次数:
308
条款一:指针与引用的区别指针与引用看上去完全不同(指针用操作符’*’和’->’,引用使用操作符’.’),但是它们似乎有相同的功能。指针与引用都是让你间接引用其他对象。你如何决定在什么时候使用指针,在什么时候使用引用呢?首先,要认识到在任何情况下都不能用指向空值的引用。一个引用必须总是指向某些对象。因...
分类:
编程语言 时间:
2014-06-16 07:20:39
阅读次数:
301
在ADO.NET数据访问层我们通常会将数据库连接字符串写成这样private static
readonly string _conStr =
"server=.;database=Product;uid=sa;pwd=sa";、这样的情况很多,比如单例模式可能是出于约定俗成吧,也可能是习惯了"海淘...
分类:
其他好文 时间:
2014-06-13 16:15:17
阅读次数:
268
POSIX风格.at可以匹配cat sat mat
#at点可以匹配任意字符[a-z]at[a-zA-Z]方括号中匹配一个集合类[^a-z]表示不属于该集合里的字符*表示可以被重复0次或更多次+表示可以被重复1次或更多次[[:alnum:]]+表示至少有一个字母字符()圆括号用于分割子表达式(ver...
分类:
Web程序 时间:
2014-06-12 14:02:18
阅读次数:
247