#-*- coding:UTF-8 -*-# 导入SQLite驱动:import sqlite3# 连接到SQLite数据库# 数据库文件是test.db# 如果文件不存在,会自动在当前目录创建:conn = sqlite3.connect('test.db')# 创建一个Cursor:cursor...
分类:
数据库 时间:
2014-07-16 19:59:59
阅读次数:
220
这个算是我的一点小总结吧,放出来分享给大家,原来在网上找这种算法都找了N久没找到,自己写也是走了许多弯路,就放出来遛一遛吧大家将就这个看看, 这是其中的一个主要的方法,其余的我就不放出来了,其中的IndexTag和endTag分别是首尾字节 1 public List Filter(ref byt....
分类:
其他好文 时间:
2014-07-16 19:51:05
阅读次数:
207
基础数据表:select * from dbo.RecommendationChanelVersionRelation;数据如下:要求按照ChannelVersionID分组,对每组中的OrderId根据ID由小到大的顺序,更新为1,2,3,4,5...方法一(分组PARTITION BY):IF ...
分类:
其他好文 时间:
2014-07-13 11:30:35
阅读次数:
226
例子table1结构如下id intname varchar(50)declare @id intdeclare @name varchar(50)declare cursor1 cursor for --定义游标cursor1select * from table1 ...
分类:
其他好文 时间:
2014-07-11 12:57:38
阅读次数:
214
我采用的是MySQLdb操作的MYSQL数据库。先来一个简单的例子吧:importMySQLdb
try:
conn=MySQLdb.connect(host=‘localhost‘,user=‘root‘,passwd=‘root‘,db=‘test‘,port=3306)
cur=conn.cursor()
cur.execute(‘select*fromuser‘)
cur.close()
conn.close()
exceptMySQLdb.Error,e..
分类:
数据库 时间:
2014-07-10 18:20:40
阅读次数:
282
注意部分:canvas的height和width不能再css中设定,应该在html中设定,否则会影响页面的分辨率。效果图:图1:代码css:#canvas{ cursor: crosshair;}button{ width: 80px;}.yellowBtn{ background...
分类:
其他好文 时间:
2014-07-08 22:31:32
阅读次数:
223
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
namespaceConsoleApplication1
{
classProgram
{
staticvoidMain(string[]args)
{
inti=10;//值类型
intj=10;//必须初始化
intk;//不需要初始化
int[]iarr={..
分类:
其他好文 时间:
2014-07-08 09:42:06
阅读次数:
221
以基本的学生选课为例,建立选课数据库,学生、班级、选课信息三张表,并分别对表进行插删改操作:importMySQLdb
try:
conn=MySQLdb.connect(host=‘localhost‘,user=‘root‘,passwd=‘root‘,db=‘xuanke‘,port=3306)
cur=conn.cursor()
cur.execute("CREATEDATABASExuanke")
..
分类:
数据库 时间:
2014-07-08 08:05:43
阅读次数:
479
DECLARE @TableName VARCHAR(119)DECLARE @TableID INTDECLARE @ColName VARCHAR(111)DECLARE Table_Cursor CURSOR FOR SELECT [name],id FROM sysobjects WHERE...
分类:
数据库 时间:
2014-07-06 15:11:47
阅读次数:
280
C#中方法的参数有四种类型:1. 值参数类型 (不加任何修饰符,是默认的类型) 2. 引用型参数 (以ref 修饰符声明) 3. 输出型参数 (以out 修饰符声明) 4. 数组型参数 (以params 修饰符声明)
分类:
其他好文 时间:
2014-07-05 17:46:21
阅读次数:
194