设有“学生Student(sID,sName)”,“课程Course(cID,cName)”,“选课StudentCourse(scID,sID,cID)”这三个表。一个学生可以选修0..n门课,一门课也可以被0..n个学生选修。请用一条SQL语句找出选修了所有课程的学生姓名。解:一个学生选择了全部课程说明不存在一个课程他是没有选的SelectsNamefromStudentwherenotexists//不存在没选的课程号,说明找出选修了所有的课程的学生
系统 2019-08-12 01:52:33 1937
--测试数据CREATETABLEtb(col1varchar(10),col2int)INSERTtbSELECT'a',2UNIONALLSELECT'a',3UNIONALLSELECT'a',6UNIONALLSELECT'a',7UNIONALLSELECT'a',8UNIONALLSELECT'b',3UNIONALLSELECT'b',5UNIONALLSELECT'b',6UNIONALLSELECT'b',7GO--已用编号分布查询SEL
系统 2019-08-12 01:51:40 1937
--计算两个日期之间相差的工作天数CREATEFUNCTIONf_WorkDateDiff(@dt_begindatetime,@dt_enddatetime)RETURNSintASBEGINDECLARE@workdayint,@iint,@bzbit,@dtdatetimeIF@dt_begin>@dt_endSELECT@bz=1,@dt=@dt_bsegin,@dt_begin=@dt_end,@dt_end=@dtELSESET@bz=0SEL
系统 2019-08-12 01:51:40 1937
上一篇博客讲的是atoi()函数的功能及举例,如今呢,就自己写写代码(依据atoi()的功能)来表示atoi()函数的实现。我在这里先把atoi()函数的功能贴出来,也好有个參考啊~~~atoi()函数的功能:将字符串转换成整型数;atoi()会扫描參数nptr字符串,跳过前面的空格字符,直到遇上数字或正负号才開始做转换,而再遇到非数字或字符串时('\0')才结束转化,并将结果返回(返回转换后的整型数)。atoi()函数实现的代码:/**name:xif*
系统 2019-08-12 01:32:51 1937
1window.onload=function(){2if(getCookie('name')!=null&&getCookie('phone')!=null&&getCookie('password')!=null){3$("#hid").css('display','block');4$("#bol").css('display','none');5}6}验证用户是否登录,是否有过注册信息
系统 2019-08-12 01:32:44 1937
Python中表达式和语句及for、while循环练习1)表达式常用的表达式操作符:x+y,x-yx*y,x/y,x//y,x%y逻辑运算:xory,xandy,notx成员关系运算:xiny,xnotiny对象实例测试:xisy,xnotisy比较运算:xy,x<=y,x>=y,x==y,x!=y位运算:x|y,x&y,x^y,x<>y一元运算:-x,+x,~x:幂运算:x**y索引和分片:x[i],x[i:j],x[i:j:stri
系统 2019-09-27 17:54:38 1936
一、简介1,使用微信,定时往指定的微信群里发送指定信息。2,需要发送的内容使用excel进行维护,指定要发送的微信群名、时间、内容。二、py库1,itchat:这个是主要的工具,用于连接微信个人账号接口。以下是一些相关的知识点网站。2,xlrd:这个是用来读Excel文件的工具。3,apscheduler:这个是用来定时调度时间的工具。三、实例代码#coding=utf-8fromdatetimeimportdatetimeimportitchatimpo
系统 2019-09-27 17:53:46 1936
python实现windows倒计时锁屏功能#倒计时锁屏importtimefromctypesimport*defclosewindows(closetime):whileclosetime>0:print(closetime)time.sleep(1)closetime-=1user32=windll.LoadLibrary('user32.dll')user32.LockWorkStation()if__name__=="__main__":clos
系统 2019-09-27 17:53:34 1936
执行效果如下:fromtkinterimport*importurllib.requestimportgzipimportjsonfromtkinterimportmessageboxroot=Tk()defmain():#输入窗口root.title('Python学习交流群:973783996')#窗口标题Label(root,text='请输入城市').grid(row=0,column=0)#设置标签并调整位置enter=Entry(root)#输
系统 2019-09-27 17:49:51 1936
接着上一篇交易记录整合交易类,这里描述区块的开发。首先我们要明白一个区块,需要的内容,包括交易记录集合,时间戳,哈希,上一个区块的哈希。明白了这个,下面就容易代码开发了。importdatetimeimporthashlibfromMessageimportDaDaMessage,InvalidMessagefromTransactionimportTransactionclassBlock:#不定参数,*args,区块集合def__init__(self
系统 2019-09-27 17:49:31 1936