最近看老罗视频,做了一个简单的用户注册系统。用户通过网页(JSP)输入用户名、真名和密码,Servlet接收后通过JDBC将信息保存到MySQL中。虽然是个简单的不能再简单的东西,但麻雀虽小,五脏俱全,在此做一归纳和整理。下面先上源码:一、index.jsp
<%
String path = request.getContextPath();
String basePath = request.g...
分类:
数据库 时间:
2014-06-29 07:24:04
阅读次数:
366
题目
Given a string s, partition s such that every substring of the partition is a palindrome.
Return the minimum cuts needed for a palindrome partitioning of s.
For example, given s = "a...
分类:
其他好文 时间:
2014-06-20 13:44:18
阅读次数:
234
20140603
对error.c 的源代码进行分析
继续看error.c中的函数
现将代码和自己查阅的资料整理如下:
1.#include
2 #include
3 #include
4 #include
5 #include
6 #include "error.h"
7 #include "dxyh_thread.h"
8...
分类:
其他好文 时间:
2014-06-20 10:00:11
阅读次数:
194
进入vi的命令 vi filename :打开或新建文件,并将光标置于第一行首 vi +n
filename :打开文件,并将光标置于第n行首 vi + filename :打开文件,并将光标置于最后一行首 vi +/pattern
filename:打开文件,并将光标置于第一...
分类:
系统相关 时间:
2014-06-20 08:46:49
阅读次数:
406
平时我们老说的控制反转依赖注入是什么东西?其实说白了就是一个松紧耦合的问题,咱们可以想一想,一个javabean里面可能会有很多属性比如像下面的代码:public
class KnightOfTheRoundTable implements Knight { private String na...
分类:
编程语言 时间:
2014-06-13 14:14:08
阅读次数:
271
概要:
实例代码详解:
目录结构
Car.java
package com.coslay.beans.factorybean;
public class Car {
private String brand;
private double price;
public String getBrand() {
return brand;
}
...
分类:
编程语言 时间:
2014-06-07 13:54:02
阅读次数:
252
题目
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
For example, given
s = "leetcode",
dict =...
分类:
其他好文 时间:
2014-06-07 13:53:28
阅读次数:
247
在做根据日期来检索的时候普通的格式化会出错,试了好多种只有一种可行
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
String time = "lostTime:["+sdf.format(new Date())+" TO "+sdf.format(new Date())+"]";...
分类:
其他好文 时间:
2014-06-07 12:48:43
阅读次数:
256
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca...
分类:
其他好文 时间:
2014-06-07 12:21:30
阅读次数:
284
例如输入:I love programming
输出:I evol gnimmargorp
算法思路就是:根据空格提取每一个单词,存放在一个buffer里进行翻转处理,再添加到新的字符串。最后新的字符串就完成整个方法过程。
public class ReserveString {
public String reserve(String sentence){
Strin...
分类:
编程语言 时间:
2014-06-07 12:20:14
阅读次数:
246