码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
std::string在多字节字符集环境下substr的实现方法
昨天写到《使用多字节字符集的跨平台(PC、Android、IOS、WP)编码/解码方法》中提到服务端使用std::string处理字符串,std::string对多字节字符集支持并不是很完善,std::string中的函数没有对多字节字符集进行直接的支持。例如直接调用std::string的subs...
分类:其他好文   时间:2015-01-28 21:24:13    阅读次数:145
Demo2.模拟简单登陆 契约类
这两个类在客户端服务器通讯时需要用到 暂时称为契约类吧[ProtoContract] public class LoginContract { //用户ID [ProtoMember(1)] public string UserID { get...
分类:其他好文   时间:2015-01-28 21:22:19    阅读次数:223
java获取本机IP地址
/** * WIFI没打开:ip为127.0.0.1 * 获取本机IP地址字符串 * @return */public String getWifiIp() { if (!getWifiEnabled()) { return "127.0.0.1"; } WifiI...
分类:编程语言   时间:2015-01-28 21:05:37    阅读次数:160
ZigZag Conversion
The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo...
分类:其他好文   时间:2015-01-28 19:41:56    阅读次数:173
ASP.NET程序中常用的三十三种代码
1. 打开新的窗口并传送参数: 传送参数:response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") 接收参数:string a = Req...
分类:Web程序   时间:2015-01-28 19:37:17    阅读次数:205
c# 用户名 密码 访问 局域网共享
#region Ping 返回true则代表可以连接成功 public bool Ping(string remoteHost) { bool Flag = false; Process proc = new P...
分类:Windows程序   时间:2015-01-28 19:34:10    阅读次数:226
js和android交互
如何提示alert webview.setWebChromeClient(new WebChromeClient() { @Override public boolean onJsAlert(WebView view, String url, String message, final JsResu...
分类:移动开发   时间:2015-01-28 19:32:51    阅读次数:192
PHP中目录解析函数
dirname(string path):给出一个包含有指向一个文件的全路径的字符串,本函数返回去掉文件名后的目录名。 斜线(/)和反斜线(\)都可以用作目录分隔符。在其它环境下是斜线(/)。dirname(http://www.sina.com.cn/abc/de/fg.php?id=1)//返回...
分类:Web程序   时间:2015-01-28 19:30:55    阅读次数:233
浏览器获取ip地址
/** * 获取浏览器的ip地址 * @param request * @return */ public static String getIP(HttpServletRequest request) { String ip = request.getHeader("x-forward...
分类:其他好文   时间:2015-01-28 19:26:50    阅读次数:287
struts2_4_为Action属性注入值
Struts2为Action中的属性提供了依赖注入功能,在struts2的配置文件里,能够为Action中的属性注入值,属性必须提供setter方法。1)employeeAction类:public class employeeAction { private String savePath; pu...
分类:其他好文   时间:2015-01-28 19:21:10    阅读次数:176
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!