Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3....
分类:
其他好文 时间:
2014-04-29 13:47:20
阅读次数:
251
会话清除与过期
程序主动清除session数据
设置会话失效:session.invalidate()
移除会话中一个属性:
语法:public void removeAttribute(String name);
服务器主动清除长时间没有再次发出请求的session
设置会话过期时间
方法一:public void setMaxInactiveInterval(int interv...
分类:
编程语言 时间:
2014-04-28 10:36:41
阅读次数:
322
记录一下,自己用过的打开第三方应用的两种方法;
1.//根据包名类名启动第三方应用(要启动的应用的包名,要启动的activity)
openApp("com.xx.test", "com.xx.test.TestActivity");
private void openApp(String pname,String aname){
// changeInputSo...
分类:
其他好文 时间:
2014-04-28 10:25:41
阅读次数:
400
欢迎加入我们的QQ群,无论你是否工作,学生,只要有c / vc / c++ 编程经验,就来吧!158427611
所谓的unicode文件,无非就是在文件头部插入了 0xFFFE的标志。。。读写的时候对应的读写 就可以了。
namespace fileStream
{
bool readFile_Unicode( const string &file ,wstr...
分类:
编程语言 时间:
2014-04-28 10:22:41
阅读次数:
678
java的String是不可变类。为了提高效率,java为String类提供了String池。
当我们使用形如String s="abc"的代码为字符串赋值时,JVM首先会检查字符串常量池中是否有"abc"这个字符串,如果有就直接将其地址赋给s;若没有,则在Stirng池中创建一个字符串对象“abc”,再将其地址赋给s。...
分类:
编程语言 时间:
2014-04-27 22:48:10
阅读次数:
486
原文出自:http://cmsblogs.com/?p=863。尊重作者的成果,转载请注明出处! 个人站点:http://cmsblogs.com----------------------------------------------------------------------------------------------------------------------...
分类:
编程语言 时间:
2014-04-27 22:44:20
阅读次数:
337
主调函数分配内存块;在被调用函数中使用;
//写一个函数,;写一个主函数,用被调用函数,求出字符串1.在字符串2中间出现过几次!
#define _CRT_SECURE_NO_WARNINGS
#include"stdio.h"
#include"stdlib.h"
#include"string.h"
char mycount(char *myp, char *mysub, int *n)
{
...
分类:
其他好文 时间:
2014-04-27 22:33:20
阅读次数:
325
合并并且排序指针数组和二维数组里面存放的字符串用函数调用的格式,C里面的内存模型;
#define _CRT_SECURE_NO_WARNINGS
#include"stdio.h"
#include"stdlib.h"
#include"string.h"
char **sortArray1Array2_01(char **pArray1, int nArray1Num, char(*pArray2)[30], int nArray2Num, int *nArray3Num)...
分类:
其他好文 时间:
2014-04-27 22:16:05
阅读次数:
411
#define _CRT_SECURE_NO_WARNINGS
#include"stdio.h"
#include"stdlib.h"
#include"string.h"
/*
键值对(”key = valude”)字符串,在开发中经常使用
要求1:请自己定义一个接口,实现根据key获取valude;40分
要求2:编写测试用例。30分
要求3:键值对中间可能有n多空格,请去除空格30分
注意...
分类:
其他好文 时间:
2014-04-27 22:11:20
阅读次数:
488
program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace Tst
{
class Program
{
static void Main(string[] arg...
分类:
移动开发 时间:
2014-04-27 21:35:59
阅读次数:
467