//判断一个汉子等于两个字符function getByteLen(val) { var len =
0; for (var i = 0; i < val.length; i++) { var a = val.charAt(i); if
(a.match(/[...
分类:
Web程序 时间:
2014-05-26 20:47:25
阅读次数:
205
Scala中的match, 比起以往使用的switch-case有著更強大的功能, 1. 傳統方法
def toYesOrNo(choice: Int): String = choice match { case 1 => "yes" case 0
=> "no" case _ => "error"...
分类:
其他好文 时间:
2014-05-26 20:45:46
阅读次数:
285
LinearLayout linearLayoutMain = new
LinearLayout(this);//自定义一个布局文件 linearLayoutMain.setLayoutParams(new
LayoutParams( LayoutParams.MATCH_PARENT, ...
分类:
移动开发 时间:
2014-05-26 16:22:12
阅读次数:
257
Python能够成为流行的数据处理语言,部分原因是其简单易用的字符串和文本处理功能。大部分文本运算都直接做成了字符串对象的内置方法。对于更为复杂的模式匹配和文本操作,则可能需要用到正则表达式。pandas对此进行了加强,它使你能够对数组数据应用字符串表达式和正则表达式,而且能处理烦人的缺失数据。...
分类:
编程语言 时间:
2014-05-26 03:42:44
阅读次数:
443
注意两点
1.通过android:checkedButton="@+id/lunch"而不是item中的 android:checked="true"设置的某人被选中状态
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
a...
分类:
其他好文 时间:
2014-05-23 00:04:35
阅读次数:
344
这两天在做微软App-V应用程序虚拟化的试验,公司需要测试自有C/S架构产品在其上的部署。搭建过程比较顺利,突然的今天上班后发现App-VServer(域成员服务器)使用域用户登陆时报错:TheSecurityDatabaseontheServerDoesNotHaveaComputerAccountforThisWorkstationTrustRelations..
分类:
数据库 时间:
2014-05-22 18:09:28
阅读次数:
1107
import re
data = open('a.txt')
fh = open('b.txt', 'w')
"""Search the string begining with '【'"""
p = re.compile(r'\s*[\u3010]')
for each_d in data:
if re.match('\s*3\d{4}', each_d):
...
分类:
编程语言 时间:
2014-05-22 17:26:17
阅读次数:
293
转:适有修改并调试OKvar Sys = (function (ua) { var s = {};
s.IE = ua.match(/msie ([\d.]+)/) ? true : false; s.Firefox =
ua.match(/firefox\/([\d.]+)/) ...
分类:
其他好文 时间:
2014-05-22 15:24:55
阅读次数:
227
On using the sudo command if we see the
errorThis means that the user as whom we have logged in and are trying to run
the command "sudo" does not have...
分类:
其他好文 时间:
2014-05-22 00:57:35
阅读次数:
272
function
is_mobile(){$regex_match="/(nokia|iphone|android|motorola|^mot\-|softbank|foma|docomo|kddi|up\.browser|up\.link|";$regex_match.="htc|dopod|bl...
分类:
移动开发 时间:
2014-05-21 19:02:55
阅读次数:
302