一哥们叫我写篇单点登录。我就记录一下我们项目中的单点登录实现吧,其实超级简单。 项目中通常都用的记录session来控制单点登录的。直接上代码吧 /**
* sesssion列表
*/
private static Map<String, HttpS...
分类:
Web程序 时间:
2015-04-23 15:59:48
阅读次数:
122
importjava.io.File;publicclassreadFile{publicstaticvoidmain(String[]args)throwsException{//递归显示C盘下所有文件夹及其中文件Fileroot=newFile("C:/Users/Administrator/Desktop");showAllFiles(root);}publicstaticvoidshowAllFiles(Filedir)throwsException{File[]fs=..
分类:
其他好文 时间:
2015-04-23 15:56:26
阅读次数:
162
#include
#include
using namespace std;
bool is_circle(string src,string des)
{
if(src.empty()||des.empty())
return false;
string temp=src;
temp+=src;
string::size_type pos=0;
pos=temp.find(des)...
分类:
其他好文 时间:
2015-04-23 15:50:07
阅读次数:
131
项目中要在string.xml 中显示特殊符号,如>号冒号等,直接写肯定不行啦。。只能考虑使用ASCII码进行显示:
@号 @
:号 :
空格
以下为常见的ASCII十进制交换编码:
& #032;-->
& #033;-->!
& #034;-->"
& #035;-->#
& #036;-->$
& #037;-->%
& #038;-->&
...
分类:
移动开发 时间:
2015-04-23 15:42:23
阅读次数:
133
///
/// 获取相应的标签内容
///
/// 地址链接
/// css路径
///
public static IEnumerable GetUrlInfo(string url, string cssLoad)
{
HtmlAgilityPack.H...
分类:
其他好文 时间:
2015-04-23 15:42:13
阅读次数:
337
12345678910publicvoidclickReportIcon(){String initialWindowHandle = driver.getWindowHandle();//保存原始的浏览器窗口page.getReportIcon().click();//这个操作之后将会弹出另外一个...
分类:
其他好文 时间:
2015-04-23 15:39:08
阅读次数:
127
function FormatEx(const AFormatStr: string; AParams: array of const): PChar;var MssageBuf: PChar; MssageParam: PDWORDArray; i, Len: Integer;begin ...
分类:
其他好文 时间:
2015-04-23 15:21:01
阅读次数:
155
可以使用url重写机制来解决这个问题(1)什么是url重写?在浏览器访问web服务器上的某个地址时,使用服务器生成的地址(会在地址后面添加sessionId)。(2)如何进行url重写?//用来链接地址、表单提交地址response.encodeURL(String url);//用在重定向地址re...
分类:
其他好文 时间:
2015-04-23 15:19:54
阅读次数:
195
大部分程序员在编程中都遇到过Java中文问题,但是只要你知道了Java系统的中文问题原理,我们就可以对中文问题说拜拜。最古老的解决方案是使用String的字节码转换,这种方案问题是不方便,我们需要破坏对象封装性,进行字节码转换。还有一种方式是对J2EE容器进行编码设置,如果J..
分类:
编程语言 时间:
2015-04-23 13:47:18
阅读次数:
140
首先建立服务器端程序:
1.MyServerSocket.java
package com.test.test;
public class MyServerSocket {
public static void main(String[] args) {
new ServerListener().start();
}
}
2.ServerListen...
分类:
移动开发 时间:
2015-04-23 13:29:11
阅读次数:
222