在前一节使用数据库进行用户认证(form login using database)里,我们学习了如何把“登录帐号、密码”存储在db中,但是密码都是明文存储的,显然不太讲究。这一节将学习如何使用spring security3新加入的bcrypt算法,将登录加密存储到db中,并正常通过验证。一、Bc...
分类:
编程语言 时间:
2016-01-13 10:50:52
阅读次数:
457
C:\Program Files (x86)\MSBuild\14.0\Bin\csc.exe test.cs# test.csusing System;using System.Diagnostics;using System.Globalization;using System.IO;class...
分类:
Web程序 时间:
2016-01-13 10:41:36
阅读次数:
300
既然要提及工厂模式就需要提及一下简单工厂。简单工厂模式: 是类的创建模式,也可以称为静态工厂。可以这么理解。工厂可以生产一个类别的产品,产品必须归属于类别。就如飞机属于飞行器和鸡蛋不是同一类的一样。现在以飞行器为例子using System;using System.Collections.Gene...
分类:
其他好文 时间:
2016-01-13 10:34:31
阅读次数:
121
脚本用于遍历目录下文件,并用正则表达式匹配替换目标string.#!/usr/bin/perl -wuse strict;# Trave Target directory and modify files under it.# Modified files are matched using reg...
分类:
其他好文 时间:
2016-01-13 10:33:55
阅读次数:
212
代码:class MyQueue { // Push element x to the back of queue. Stack stack = new Stack(); Stack aux = new Stack(); public void push(int x) { ...
分类:
其他好文 时间:
2016-01-13 07:06:32
阅读次数:
227
1,首先定义一个数据库连接与操作的抽象类,这个里面写一些你需要用到的一些抽象方法。然后就是对应你的数据库写与之对应的类并继承你说定义的抽象类,并重写抽象类里面的方法!对应代码如下:using System;using System.Collections.Generic;using System.L...
分类:
数据库 时间:
2016-01-12 22:43:50
阅读次数:
262
1、copy(); 【语法】: public static string Copy (string str); 参数--str 要复制的string 返回值--与str具有相同值的新string// Sample for String.Copy()using System;cla...
分类:
其他好文 时间:
2016-01-12 21:25:44
阅读次数:
181
1 #include 2 #include 3 #include 4 using namespace std; 5 #define FILENAME "E:\\FUSHI\\test.txt" 6 7 int main() 8 { 9 /* 10 新建文件...
分类:
编程语言 时间:
2016-01-12 19:26:03
阅读次数:
242
题目大意:曼哈顿最小距离生成树算法讨论:同上。这回的模板真的准了。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int N = 100000 + 5...
分类:
其他好文 时间:
2016-01-12 19:25:31
阅读次数:
143
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.OleDb;namespace Framework.Common...
分类:
其他好文 时间:
2016-01-12 19:22:02
阅读次数:
123