- 浏览: 154163 次
- 性别:
- 来自: 杭州
最新评论
-
DavyJones2010:
knightdf 写道freezingsky 写道这年头代码和 ...
Java SE: How to Decompress File (.zip) -
knightdf:
freezingsky 写道这年头代码和内容都是copy来co ...
Java SE: How to Decompress File (.zip) -
freezingsky:
这年头代码和内容都是copy来copy去的,至少讲一讲过程分析 ...
Java SE: How to Decompress File (.zip)
文章列表
1. Create table
create table table_name(
column_name column_type [, column_attribute] [, column_default_value], --> Column Declaration
column_name column_type [, column_attribute] [, column_default_value], --> Column Declaration
......
)[charset=utf8/gbk];
Eg:
create table user(
...
1. Tables used
# 1. goods
select * from goods;
+----------+--------+------------+----------+
| goods_id | cat_id | goods_name | owner_id |
+----------+--------+------------+----------+
| 1 | 1 | CDMA Phone | 1 |
| 2 | 1 | GSM Phone | 1 |
| 3 | ...
Example to explain differences of left join and right join :
#################
select * from goods;
+----------+--------+------------+
| goods_id | cat_id | goods_name |
+----------+--------+------------+
| 1 | 1 | CDMA Phone |
| 2 | 1 | GSM Phone |
| 3 | ...
1. Example as below:
# 1. Goods table
select * from goods;
+----------+--------+------------+
| goods_id | cat_id | goods_name |
+----------+--------+------------+
| 1 | 1 | CDMA Phone |
| 2 | 1 | GSM Phone |
| 3 | 1 | 3G Phone |
+----------+------- ...
1. Union
1) Function: Combine the result sets from two query into one single result set.
# Single result set 1
select * from stu where stu_score > 40;
# Single result set 2
select * from stu where stu_score < 35;
# Combine result sets without union
select * from stu where stu_s ...
Introduction:
In this article, we focus on the configuration file beans.xml for IoC purpose.
Focusing on initialize beans whose property are collection types.
Including <list/> <set/> <map/> and <props/> elements corrosponding to List, Set, Map and Properti ...
Introduction:
In this article, we focus on the configuration file beans.xml for IoC purpose.
1. A simple bean injected with simple property
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi= ...
1. Import relevant jars for basic IoC purpose
1) Download spring-framework-3.2.2.RELEASE-dist.zip from http://www.springsource.org/download/community
2) Open eclipse and set up user library
3) Import relevant jars including:
(1) spring-core-3.2.2.RELEASE.jar
...
1. Get Class object (Three possible ways)
1) Using Class.forName(className). The static method of Class class
package edu.xmu.service;
import org.junit.Test;
public class UserServiceTest
{
@Test
public void test()
{
try
{
Class<?> userServiceClazz = Class.fo ...
1. Beans
package beans;
public class User
{
private String username;
private String password;
public User()
{
}
public User(String username, String password)
{
this.username = username;
this.password = password;
}
public String getUsername()
{
return username;
...
1. PopUpWindow
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" m ...
1. A good comprehension model:
1) Where expression: Fit this experssion into every row and get the true/false result.
#Where expression comprehension model
select * from stu where stu_name = 'zhangsan';
2) Row: Regard as variable which enables basic math operation.
#Row comprehension m ...
1. Using basic 'order by'
# Order stu by stu_score as the order of descendant
select * from stu order by stu_score desc;
2. Using 'order by' to order multiple columns
# Order table 'stu' by stu_score
# If two row's stu_score are the same, then use stu_name as secondary order restriction
se ...
# Here is an example for five sql caluse
# Pay attention to the sequence of the four clause
# select *** from *** where *** group by *** having *** order by *** limit ***
select stu_name, avg(stu_score) as avg_score from stu where stu_name != (select stu_name from stu where stu_score = 90) group ...
1. Main Application
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
preinitialize ...