【app.use】 Mounts the middleware function(s) at the path. If path is not specified, it defaults to “/”. A route will match any path, which follows its
分类:
移动开发 时间:
2016-02-26 11:52:15
阅读次数:
232
需要用到系统函数php_sapi_name(),返回 cli 或 cli_server 1 /* 2 判断当前的运行环境是否是cli模式 3 */ 4 function is_cli(){ 5 return preg_match("/cli/i", php_sapi_name()) ? true :
分类:
Web程序 时间:
2016-02-25 11:58:14
阅读次数:
463
问题描写叙述与解决方式还是老问题。Linux系统中通过iptables配置的NAT无法在双向通信环境中使用,你无法配置一条NAT规则实现对两个方向主动发起的流量做NAT,解决问题的方案有好几种:1.配置两条NAT规则iptables的NAT配置本身就是先match再运行一个target,因此一条规则
分类:
其他好文 时间:
2016-02-24 14:17:49
阅读次数:
202
目标:改变软键盘的外观使enter显示为“DONE”或“完成”,监听点击事件。 实现: 1.在xml文件中定义一个EditText <EditText android:layout_width="match_parent" android:layout_height="40dp" android:i
分类:
其他好文 时间:
2016-02-23 13:01:32
阅读次数:
123
gravity的对齐方式有top,bottom,left,right,center可以用"|"同时选取。 wrap_content 适配内容,保证显示完整。 match_parent:父布局决定大小 默认人提示性文字:hint xml中给imageview添加图片:src= activity中设置图
分类:
其他好文 时间:
2016-02-22 20:42:28
阅读次数:
127
原型函数,功能非常easy,找到时钟的id,计算数值。到达抢购时间时运行任务。 function nwt() {var str=$('#deal_expiry_timer_e3cdcd2a').text(); var out=str.match(/\d+/g);console.log(out); v
分类:
Web程序 时间:
2016-02-22 15:15:48
阅读次数:
129
代码: 输出结果 补充: reg.lastIndex:下一次正则捕获的开始查找的索引位置 ->正则的懒惰性就是因为默认情况下lastIndex值都是0,我们不管执行几次exec,都是从字符串的开始位置查找,那么每一次捕获到的都是第一个符合的内容
分类:
其他好文 时间:
2016-02-19 19:04:38
阅读次数:
164
1,-Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.[ERROR] Maven execution term
分类:
其他好文 时间:
2016-02-19 10:22:03
阅读次数:
210
<android.support.v7.widget.Toolbar android:id="@+id/toolbar_top" android:layout_height="wrap_content" android:layout_width="match_parent" android:minH
分类:
移动开发 时间:
2016-02-18 21:36:30
阅读次数:
460
pythonRE的match()和group()疑问>>m=re.match(r"(..)+","a1b2c3")#Matches3times.
>>m.group(1)#Returnsonlythelastmatch.
‘c3‘
>>m.group(0)
‘a1b2c3‘
>>m.groups()
(‘c3‘,)注意到pattern中的+,应该是匹配偶数个字符.1.首先是match的问题.match是从开..
分类:
编程语言 时间:
2016-02-17 19:20:12
阅读次数:
258