码迷,mamicode.com
首页 >  
搜索关键字:python long string    ( 244880个结果)
Python - 定制pattern的string模板(template) 详解
定制pattern的string模板(template) 详解本文地址: http://blog.csdn.net/caroline_wendy/article/details/28625179 string.Template的pattern是一个正则表达式, 可以通过覆盖pattern属性, 定义新的正则表达式.如: 使用新的定界符"{{", 把{{var}}作为变量语法.代码:# -*- coding: utf-8 -*- ''' Creat...
分类:编程语言   时间:2014-06-08 18:00:47    阅读次数:308
转换MFC CString 到std::string
std::string CStringToSTDStr(const CString& theCStr) { // Convert the CString to a regular char array const int theCStrLen = theCStr.GetLength(); char *buffer = (char*)malloc(sizeof(char)*(theCStrLe...
分类:其他好文   时间:2014-06-08 16:33:53    阅读次数:218
java 使用poi 结合Struts2导出execl表格
第一步写action方法:   public String exportActiveExcel()     {         String name ="活跃度列表.xls";         try {                 name = java.net.URLEncoder.encode(name, "UTF-8");                 fileNam...
分类:编程语言   时间:2014-06-08 15:18:02    阅读次数:295
检查输入的用户名是否符合规定
代码清单: <?php /** * 检测输入中是否含有错误字符 * @author ruxing.li * @param char $string 要检查的字符串名称 * @return boolean */ function is_badword($string) { $badwords = array("\\",'&',' ',"'",'"','/','*',',',''...
分类:其他好文   时间:2014-06-08 14:49:48    阅读次数:288
[LeetCode]Distinct Subsequences,解题报告
题目 Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from the original string by deleting some (can be...
分类:其他好文   时间:2014-06-08 14:49:14    阅读次数:347
判断字符串是否为 utf-8 编码
代码清单: <?php /** * 判断字符串是否为utf8编码,英文和半角字符返回ture * @author ruxing.li * @param $string * @return bool */ function is_utf8($string) { return preg_match('%^(?: [\x09\x0A\x0D\x...
分类:其他好文   时间:2014-06-08 10:47:58    阅读次数:267
使用mvc模式开发网站
看了韩顺平的j2ee的视频后,吧里面教的做了出来,感觉好极了,新手上路!!! 这个肯定不是原创,但是也不是转载,那我就姑且把它作为翻译吧,给其他看视频学习但是没有代码的同学一点福利吧 首先是login.jsp的登陆界面代码。 <% String path = request.getContextPath(); String basePath = request.getScheme()+":...
分类:Web程序   时间:2014-06-08 10:47:14    阅读次数:258
Python - 定制语法的string模板(template) 详解
定制语法的string模板(template) 详解本文地址: http://blog.csdn.net/caroline_wendy/article/details/28614491 string模板(template)参考: http://blog.csdn.net/caroline_wendy/article/details/27054263string.Template()内添加替换的字符, 使用"$"符号, 或 在字符串内, 使用"${}...
分类:编程语言   时间:2014-06-08 09:21:01    阅读次数:360
在SAE上使用Ueditor的图片上传功能
SAE上是没有目录读写权限的,所以要在SAE使用Ueditor的图片上传功能需要借助SAE的Storage服务。   一、开通Storage服务   在SAE控制台开通Storage服务,并新增一个domain。         二、修改Ueditor代码   Ueditor处理上传文件的方法在DjangoUeditor/jviews.py中,上传图片的请求是由下面...
分类:其他好文   时间:2014-06-08 08:53:44    阅读次数:285
supervisord监控详解
1 Supervisord的安装 Supervisord是运行在python环境下的服务监控程序。所以在安装supervisord之前必须有python环境。   如果系统没有PYTHON,键入:yum install python(CENTOS)或者apt-get installpython(UBUNTU)   键入:yum install python-setuptools...
分类:其他好文   时间:2014-06-08 08:35:43    阅读次数:235
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!