最近看老罗视频,做了一个简单的用户注册系统。用户通过网页(JSP)输入用户名、真名和密码,Servlet接收后通过JDBC将信息保存到MySQL中。虽然是个简单的不能再简单的东西,但麻雀虽小,五脏俱全,在此做一归纳和整理。下面先上源码:一、index.jsp
<%
String path = request.getContextPath();
String basePath = request.g...
分类:
数据库 时间:
2014-06-29 07:24:04
阅读次数:
366
编写高质量代码——运算符重载,是成员函数还是友元函数...
分类:
其他好文 时间:
2014-06-20 13:30:30
阅读次数:
164
题目:
Roman numerals come from the ancient Roman numbering system. They are based on specific letters of the alphabet which are combined to signify the sum (or, in some cases, the difference) of th...
分类:
其他好文 时间:
2014-06-20 12:27:09
阅读次数:
394
构造函数再探
构造函数初始值列表
Sales_data::Sales_data(const string &s, unsigned cnt, double price)
{
bookNo=s;
units_sold=cnt;
revenue=cnt*price;
}
这个构造函数和这个效果是一样的
Sales_d...
分类:
编程语言 时间:
2014-06-20 12:12:09
阅读次数:
370
关于使用这是一个heloworld教程,首先我们创建一个域domain,相当于一个表。
注意我们并不能做域之间的连接操作,单次查询都只能针对一个域,不能跨域,这是SimpleDB的一个限制,所以开发者应当规划好,别选错了域。另外所有的存储都是string,UTF-8编码的。...
分类:
数据库 时间:
2014-06-20 11:59:53
阅读次数:
224
抽象语法树(Abstract Syntax Tree)
抽象语法树(AST)表示组成程序的结构,可以让程序员更容易使用,F# 适宜这种开发的一个原因就是它的联合类型。这种类型非常适合表示语言,因为它可以用来表示相关而结构不相同的项目。下面就是抽象语法树的例子:
type Ast =
| Ident of string
| Val of System.Double...
分类:
其他好文 时间:
2014-06-20 11:33:28
阅读次数:
200
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
static void Main(string[] args)
{
//string path = @"LDAP://CN=sp\administrator";
string username = "administrator";
string password = "6yhn^YHN";
...
分类:
其他好文 时间:
2014-06-07 15:20:59
阅读次数:
275
题目
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
在WinForm或者Console程序中,可以通过可以遍历所有现在正在执行的进程,如果有同名的进程存在,那么说明这个程序已经启动了一个了,此处就不再启动了。如果没有同名进程的存在,说明这个程序还没有启动过,此时我们可以启动一个。
public static void Main()
{
string strModuleName = System.Diagnostics.Proce...
分类:
其他好文 时间:
2014-06-07 13:35:08
阅读次数:
269