在开发的项目的时候,你是否经常遇到需要重复编写一些类似的代码,比如是否经常会使用 for、foreach ? 在编写这两个循环语句的时候,你是一个字符一个字符敲还是使用 Visual Studio 提供的Code Snippet 工具自动帮你生成呢?神奇之处 你只需要在代码编辑器中输入for,就.....
分类:
其他好文 时间:
2014-10-11 11:17:55
阅读次数:
383
相信很多人喜欢sublime编辑工具有两个原因:第一sublime很轻巧方便;第二sublime提供很多自定义拓展功能,包括很简单且和很好用的代码片段功能snippet文件。今天,在这里就介绍下sublime如何自定义各种代码片段,先来感受一下效果:上面看到的是我用sublime初始化一个html文...
分类:
其他好文 时间:
2014-10-02 20:23:03
阅读次数:
246
defall_index(l,o):deffind_index(l,o,start=0):try:index=l.index(o,start)except:index=-1returnindexindexs=[]i=0whileTrue:idx=find_index(l,o,i)ifidx==-1:...
分类:
编程语言 时间:
2014-09-25 21:59:47
阅读次数:
212
参考资料:http://www.oschina.net/code/snippet_166763_6502//以下是常用到的Intent的URI及其示例,包含了大部分应用中用到的共用Intent。//一、打开一个网页,类别是Intent.ACTION_VIEWUri uri = Uri.parse(“...
分类:
移动开发 时间:
2014-09-24 00:34:45
阅读次数:
230
This recipe is a small code snippet of showing how to distinguish attribute and item in Python language....
分类:
编程语言 时间:
2014-09-21 13:03:30
阅读次数:
198
转:http://www.eoeandroid.com/thread-100389-1-1.htmlandroid 动态壁纸开发参考:http://www.ophonesdn.com/article/show/278推荐:http://www.oschina.net/code/snippet_203...
分类:
移动开发 时间:
2014-09-17 21:48:02
阅读次数:
420
http://www.oschina.net/code/snippet_86738_3128效验是否为银行卡,用于验证现行 16 位银联卡现行卡号开头 6 位是 622126~622925 之间的,7 到 15 位是银行自定义的,可能是发卡分行,发卡网点,发卡序号,第 16 位是校验码。16 位卡号...
分类:
其他好文 时间:
2014-09-11 10:57:41
阅读次数:
237
//转自http://www.oschina.net/code/snippet_136241_3980 1 procedure CheckResult(b: Boolean); 2 begin 3 if not b then 4 raise Exception.Create(SysErr...
分类:
其他好文 时间:
2014-08-29 17:33:48
阅读次数:
225
首先申明解决的问题 在修改模板和宏失败之后,利用vs的插件Vassist的功能之一:Snippet Editor来实现在c文件头添加注释先来货:/***********************************************************************...
分类:
编程语言 时间:
2014-08-27 20:18:08
阅读次数:
218
文章出自:http://www.oschina.net/code/snippet_1242747_23565#region DataTable 转换为Json字符串实例方法/// /// GetClassTypeJosn 的摘要说明/// public class GetClassTypeJosn ...
分类:
Web程序 时间:
2014-08-27 18:18:58
阅读次数:
177