码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
JSP项目中文乱码完全解决方案
先来说说几种常见的解决方案: (1)在response返回数据包之前设置它的encoding值 方法:response.setContentType("text/html;charset=utf-8");    response.setCharacterEncoding("UTF-8"); (2)使用String类来解决 方法:String chinese = "我只说中国话!"...
分类:Web程序   时间:2015-04-20 09:36:54    阅读次数:157
最长回文子串[中心扩展思想]
#include #include using namespace std; string findLongestPalindrome(string &s) { int length=s.size(); int maxlength=0; int start,j,k; for(i...
分类:其他好文   时间:2015-04-20 09:34:57    阅读次数:155
统计起始日期之间有多少个2月29日
题目:统计起始日期之间有多少个2月29。#include #include using namespace std;class Date { private: int month; int day; int year; static int getMonthFromString(const string &s) {...
分类:其他好文   时间:2015-04-20 09:29:38    阅读次数:172
JDK8的随笔(07)_行云流水般的Lambda表达式
好久没有更新啦,继续继续。 最近这个项目陷入了一个使用语言的怪圈。任何东西都想着原来的写法怎么能翻译到新的JDK 的写法。这其实就走入了歧途哇哇哇。 看下面这个例子,是一个很简单的例子。一般情况下我们都会这么写这样的逻辑。 public static void main(String ... args) { List list = new ArrayList<>(); ...
分类:其他好文   时间:2015-04-20 09:29:25    阅读次数:118
【ThinkingInJava】12、适配器设计模式
/** * 书本:《Thinking In Java》 * 功能:适配器设计模式 * 文件:Processor.java * 时间:2015年4月2日20:36:59 * 作者:cutter_point */ package Lesson9Interfaces.interfaceprocessor; public interface Processor { String name(); O...
分类:编程语言   时间:2015-04-20 09:28:38    阅读次数:145
周记 2015.04.20
1. 方法一: // 获取当前jar包所在路径 String path = ConfigTool.class.getProtectionDomain().getCodeSource().getLocation().toString(); int begin = path.indexOf(":").....
分类:其他好文   时间:2015-04-20 09:20:40    阅读次数:132
表达式树 Expression
转载泛型方法动态生成表达式树 Expression public string GetGridJSON(TraderInfo model) { IQueryable Temp = db.TraderInfo; if (model...
分类:其他好文   时间:2015-04-20 08:10:58    阅读次数:111
Servlet源码解析:Session、Request以及Response
首先我们来看看ServletRequest的源码: public interface ServletRequest { //获取request的属性(注意不是请求参数) public Object getAttribute(String name); //获取request的所有属性的名字 public Enumeration getAttributeName...
分类:其他好文   时间:2015-04-20 07:01:30    阅读次数:132
CSU1563 组合数学
C - Lexicography Time Limit:1000MS     Memory Limit:131072KB     64bit IO Format:%lld & %llu Submit Status Practice CSU 1563 Description An anagram of a string is any string that c...
分类:其他好文   时间:2015-04-20 01:52:44    阅读次数:152
《Thinking in Java》学习笔记(五)
1. Java异常补充 a.使用try/catch捕获了异常之后,catch之后的代码是会正常运行的,这是很多新手会犯的错误。public class ExceptionTest { public static void main(String [ ] args) { try{...
分类:编程语言   时间:2015-04-20 00:30:52    阅读次数:159
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!