在最近新学fragment的时候出现了一个错误:Themethodreplace(int,Fragment)inthetypeFragmentTransactionisnotapplicableforthearguments(int,MyFragment)
新建fragment的时候Fragmentnewfragment=newMyFragment();fragmentTransaction.replace(R.layout.activity_main,newfra..
分类:
移动开发 时间:
2014-11-02 00:42:06
阅读次数:
198
replace的第四个形式就是接收正则表达式,但是注意,最后一个参数必须是0或者1,否则第二个参数不会被看作正则。下面是一个例子:> (replace "[\\s\\S]*?" "abcdfff" "" 0)
"abcd"
0 表示是PCRE正则1 表示大小写不敏感并且replace默认替换掉所有找到的字符串如果最后一个参数是0x8000,则只替换第一个找到的。...
分类:
其他好文 时间:
2014-11-02 00:37:46
阅读次数:
182
?序言: 用户注册时候,录入了全角手机号码,所以导致短信系统根据手机字段发送短信失败,现在问题来了,如何把全角手机号码变成半角手机号码?1,手机号码全角转换成半角先查询出来全角半角都存在的手机号码的数据SELECT a.username ,COUNT(1) AS numFROM(SELECT REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE...
分类:
数据库 时间:
2014-11-01 23:17:23
阅读次数:
512
指令1、restrict:指令声明四种表现形式:A(属性)、C(类)、E(元素)、M(注释),使用“restrict”来进行配置。2、template:指令中生成的字符串html模版3、templateUrl:模版的地址4、replace:将原指令所在标签替换为模版内容时,是否保存原指令html,为...
分类:
Web程序 时间:
2014-11-01 00:53:47
阅读次数:
280
1.get_alert_log 获取alert文件的路径和名称 set serveroutput on --设置输出,让sqlplus在屏幕上可以输出。(要加入到login.sql中!) create or replace procedure get_alert_log is alert_name ...
分类:
其他好文 时间:
2014-10-31 21:55:15
阅读次数:
127
先来看个简单的实例但是其数组长度却是25,而不是3。下面这种方法是先将“[111cn.net]”替换成一个特殊字符,比如$,在根据这个字符执行Split例如下面我要根据[111cn.net]分割的话 代码如下 复制代码 string[] arrstr2 = str.Replace("[111cn.n...
分类:
Web程序 时间:
2014-10-31 21:52:29
阅读次数:
222
--字符串拆分成行 declare@strvarchar(8000) set@str='a1,b1,c2,d1,e3,f5' --,换成 union all select set@str='select name='''+replace(@str,',',''' union all select '...
分类:
其他好文 时间:
2014-10-31 15:35:04
阅读次数:
210
ip2long IP地址转换成整型。 long2ip 整型数据转换成IP。 子网掩码转换成掩码长度方式: $slash_notation = strlen(preg_replace("/0/", "", decbin(ip2long($subnet_mask)))); $bits=strpos(decbin(ip2long($mas...
分类:
Web程序 时间:
2014-10-31 12:13:27
阅读次数:
300
1:算法 find,count:读算法,头文件algorithm; copy, replace,replace_copy:写算法,头文件algorithm; find_first_of,accumulate:读算法,头文件numeric; fill,fill_n:写算法,头文件xutility; b...
分类:
编程语言 时间:
2014-10-30 18:35:48
阅读次数:
196
create or replace function refresh_product_usage() returns void as $$declare rec record; sub_rec record; init_pro_id integer; parent_product_id integ....
分类:
数据库 时间:
2014-10-30 09:20:25
阅读次数:
275