码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
php过滤字符串函数
function StripHTML($string){$pattern=array ("''si", "''si", "']*?>'si", "'([\r\n])[\s]+'", "'&(quot|#34);'i", "'&(amp|#38);'i", "'&(lt|#60);'i", "'&am
分类:Web程序   时间:2015-05-13 11:56:16    阅读次数:196
base解密代码
封装加密方法: public string DecodeBase64(string code_type, string code) { string decode = ""; byte[] bytes = Convert.FromBase64String(code); try { decode = Encoding.GetEncoding(code_type).G...
分类:其他好文   时间:2015-05-13 10:43:38    阅读次数:236
base64加密代码
封装加密方法: public string EncodeBase64(string codepe,_ty string code) { string encode = ""; byte[] bytes = Encoding.GetEncoding(code_type).GetBytes(code); try { encode = Convert.ToBase64St...
分类:其他好文   时间:2015-05-13 10:42:53    阅读次数:116
MD5加密代码
方法: public string getMD5(string source) { string result = ""; try { MD5 getmd5 = new MD5CryptoServiceProvider(); byte[] targetStr = getmd5.ComputeHash(UnicodeEncoding.UTF8.GetByte...
分类:其他好文   时间:2015-05-13 10:42:28    阅读次数:114
Struts数据验证---验证嵌套属性
有一类特殊的属性,即这个属性的类型是另外一个JavaBean,如有一个User类,代码如下: package data; public class User {     private String name;     private int age;     public String getName()     {         return name;  ...
分类:其他好文   时间:2015-05-13 10:38:35    阅读次数:128
【项目1 - 存储班长信息的学生类】
class Stu //声明基类 { public: Stu(int n, string nam ); //基类构造函数 void display( ); //成员函数,输出基类数据成员 protected: //(*)访问权限为保护型的数据成员 int num; //学生学号 string name; ...
分类:其他好文   时间:2015-05-13 10:22:14    阅读次数:89
JDBC的操作步骤和实例
1、加载JDBC驱动程序:       在连接数据库之前,首先要加载想要连接的数据库的驱动到JVM(Java虚拟机),       这通过java.lang.Class类的静态方法forName(String  className)实现。       例如:       try{       //加载MySql的驱动类       Class.forName("com.mysql.jdbc...
分类:数据库   时间:2015-05-13 10:17:17    阅读次数:134
SpringMVC自定义属性编辑器
Spring MVC有一套常用的属性编辑器,这包括基本数据类型及其包裹类的属性编辑器,String属性编辑器,JavaBean的属性编辑器等。但我们还需要自己注册一些自定义的属性编辑器,如特定时间格式的属性编辑器就是一个典型的例子。 Spring MVC允许向整个Spring框架注册属性编辑器,对所有的Controller都起作用。(通过AnnotationMethodHandlerAdapte...
分类:编程语言   时间:2015-05-13 10:16:00    阅读次数:155
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 non...
分类:其他好文   时间:2015-05-13 10:14:58    阅读次数:90
C#发送邮件功能的实现
该随便主要是记录下面的方法,便于以后方便查找;public string GetSendEmail(string from, string to, string smtp, string password, string subject, string body) { ...
分类:Windows程序   时间:2015-05-13 10:12:02    阅读次数:226
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!