#若已存在该表,就将其删除;否则创建新的表。DROP table IF EXISTS users;CREATE TABLE users( `user_name` varchar(5) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;#若已存在该存.....
分类:
Web程序 时间:
2014-09-12 13:13:33
阅读次数:
283
问题:使用游标遍历时,发现使用select var into tmp where var=?然后判断if tmp is null时,不能走完所有的遍历。经debug发现,当var为空时,则跳出游标的遍历。解决方式:使用if not exists(select var into tmp where v...
分类:
数据库 时间:
2014-09-12 13:11:43
阅读次数:
249
--查看某个对象的依赖对象EXEC sp_MSforeachdb 'use ? ; IF EXISTS(SELECT top 1 1 FROM sys.syscomments WHERE text LIKE ''%test%'')SELECT ''?'' as dbname,object_name(...
分类:
数据库 时间:
2014-09-12 10:05:33
阅读次数:
219
public void DownLoad( ){ string filePath = Server.MapPath( @"\UserFile\" );//这里注意了,你得指明要下载文件的路径. if ( System.IO.File.Exists( filePath ) ) ...
分类:
Web程序 时间:
2014-09-11 18:44:12
阅读次数:
195
Sawtooth Puzzle
Time Limit: 10 Seconds Memory Limit: 65536 KB
Recently, you found an interesting game called Sawtooth Puzzle. This is a single-player game played on a grid with 3 x 3 cells....
分类:
其他好文 时间:
2014-09-11 09:42:44
阅读次数:
248
Given a graph G(V, E), a clique is a sub-graph g(v, e), so that for all vertex pairs v1, v2 in v, there exists an edge (v1, v2) in e. Maximum clique is the clique that has maximum number of
vertex.
...
分类:
其他好文 时间:
2014-09-11 08:47:58
阅读次数:
260
// 创建文件上传路径 public static void mkdir(String path) { File fd = null; try { fd = new File(path); if (!fd.exists()...
分类:
编程语言 时间:
2014-09-11 07:39:51
阅读次数:
195
比如在Northwind数据库中有一个查询为SELECT c.CustomerId,CompanyName FROM Customers cWHERE EXISTS(SELECT OrderID FROM Orders o WHERE o.CustomerID=c.CustomerID)这里面的EX...
分类:
数据库 时间:
2014-09-10 17:35:40
阅读次数:
221
fromosimport*defset_name(**k):assertlen(k)==1name,obj=k.items()[0]obj.func_name=namereturnobjdefmain():f=set_name(CheckExists=lambda:path.exists('1'))...
分类:
编程语言 时间:
2014-09-10 09:29:10
阅读次数:
236
几种排序方法:冒泡 希尔 插入 快排 堆排 归并
sort.h
#ifndef _SORT_H_
#define _SORT_H_
void insert_sort(int*, int);
void bubble_sort(int*, int);
void shell_sort(int *, int);
void quick_sort(int*, int, int);
voi...
分类:
其他好文 时间:
2014-09-09 23:04:39
阅读次数:
369