4、 编写一个过程。要求:有一个输入参数和一个输出参数,过程里面要有自定义异常。从学生表中(tab_student)中寻找符合指定学号等于输入参数的值,然后将找到的学生的姓名赋予输出参数,如果没有符合条件的值则触发异常。 Create table tab_student (sno char(8), sname varchar2(20), age integer, province varchar2(60), sex char(4)) insert into tab_student values(‘001’,’zhou’,20,’江苏徐州’,’男’) 上述表已经创建,只需针对此表编写即可。
上传时间: 2015-11-13
上传用户:362279997
哈夫曼树和哈夫曼编码: 从终端输入若干个字符及其对应的整数,将整数作为结点的权值,建立哈夫曼树,然后对各字符进行哈夫曼编码。最后打印哈夫曼树和对应的哈夫曼编码。 设计要求: ⑴ 哈夫曼殊和哈夫曼编码的存储表示参考教材事例 ⑵ 在程序中构造四个子程序为 ① int createhtree(HTree *t) /*根据输入的字符及其权值建立哈夫曼树*/ ② void coding(HTree *t, char *code) /*对哈夫曼树进行编码*/ ③ void printhtree(HTree *t, int* path) /*中序打印树*/ ④ void printcode(HTree *t) /*输出个字符的哈夫曼编码*/
上传时间: 2013-12-17
上传用户:二驱蚊器
2.[问题描述] 编写递归算法,在二叉树中求位于先序序列中第K个位置的结点 [输入] 按照先序序列的顺序输入该结点的内容。其输入abd eh cf i g 。输入要求的位置 [输出] 若二叉树不空,按先序序列输出,求出所求位置的结点 [存储结构] 采用二叉表存储 [算法的基本思想] 采用递归方法建立和遍历二叉树。首先建立二叉树的根结点,然后建立其左右子树,直到空子树为止,先序遍历二叉树时,先遍厉左子树,后遍厉右子树,最后访问根结点并计算出二叉树中叶子结点的数目和第K个位置的结点 #include<stdio.h> #include<malloc.h> struct node{ char info struct node*llink,*rlink } typedef struct node NODE
上传时间: 2014-01-13
上传用户:zm7516678
UC Library Extensions UnderC comes with a pocket implementation of the standard C++ libraries, which is a reasonably faithful subset. This documentation describes those UnderC functions and classes which are not part of the C++ standard. UC Library Builtin functions: Most of these are standard C functions, but there are a few unique to the UnderC system which give you runtime access to the compiler. You may evaluate expressions, execute commands, compile code, etc. * Expands the text in expr using the UnderC preprocessor, putting the result into buff. void uc_macro_subst(const char* expr, char* buff, int buffsize) * Executes a UC #-command, like #l or #help. uc_cmd() expects the name of the command, _without_ the hash, e.g. uc_cmd("l fred.cpp") or uc_cmd("help"). void uc_cmd(const char* cmd) * Evaluates any C++ expression or statement will return non-zero if unsuccessful.
标签: implementation Extensions libraries standard
上传时间: 2013-12-14
上传用户:leehom61
使用WebBrowser控件作为容器打开Word文档 === === === === === === === 这个源代码演示了使用WebBrowser控件作为容器打开Word文档的操作。需要在工程中添加的引用主要为Office支持库,本示例是以在OFFICEXP 2003的环境下打开。所需文件如下: Microsoft Word 11.0 Object Library (MSWord.olb) Microsoft Office 11.0 Object Library (MSO.dll) Microsoft Dialog Automation Objects (DlgObjs.dll) 具体一些功能,请查看源码示例。
标签: WebBrowser Word 控件 容器
上传时间: 2014-01-01
上传用户:rishian
这个是一个用Keil C51编写的16位串行AD芯片ADS1100的驱动程序示例,程序中含有写好的ADS1100.H标准驱动函数和LCD1602.H液晶驱动函数,用51模拟IIC总线进行数据采集。提供API式外部函数接口:void Init_ads1100(unsigned char mdata) unsigned int Rd_ads1100(void) 具体功能见程序中的*.C测试文件。
上传时间: 2014-06-25
上传用户:onewq
学会对文件的记录锁定,及解锁。#include <stdio.h> #include <unistd.h> #include <fcntl.h> int main() { int fd int i struct { char name[20] uint ID int age } myrec fd =open("name", O_RDWR|O_CREAT, 0755) if (fd == -1) return -1 printf("Input your name:") scanf("%s", myrec.name) printf("Inpute your ID :") scanf("%d", &myrec.ID) printf("Input your age :") scanf("%d", &myrec.age) lseek(fd, 0,SEEK_END) lockf(fd, 1, 0) write(fd, (void *)&myrec, sizeof(myrec)) lockf(fd, 0 ,0) return 0 } 执行命令cc lock.c –o lock.out Chmod +x lock.out ./lock.out
标签: 记录
上传时间: 2016-01-04
上传用户:亚亚娟娟123
使用说明: 双击Demo.bat文件便可以执行 (需要配置好jre||JDK环境) 请输入sql语法关键字来测试改程序谢谢 目前支持的语法关键字如下设置: text.getSettings().setCase_Insensitive(false) // 不区分大小写 text.getSettings().addKeyWord1("select") text.getSettings().addKeyWord1("commit") text.getSettings().addKeyWord1("from") text.getSettings().addKeyWord1("AND") text.getSettings().addKeyWord1("WHERE") text.getSettings().addKeyWord1("with ur") text.getSettings().addKeyWord1("VARCHAR") text.getSettings().addKeyWord2("inSert") text.getSettings().addKeyWord2("DECLARE") text.getSettings().addKeyWord2("distinct") text.getSettings().addKeyWord2("SET") text.getSettings().addFunctionKeyWord("int") text.getSettings().addFunctionKeyWord("COUNT") text.getSettings().setComment("--") //设置行注释 当前版本主要改进块注释的算法 块注释示例: /* 12312334 "测试字符串" select count(*) from where with ur */
上传时间: 2016-01-10
上传用户:l254587896
Linux 2.4.18 s3c2440 led driver 使用dev-C++撰寫,需要linux 2.4.18 kernel include,編譯完成後產生led module。 insmod main.o //安裝模組 mknod /dev/leds c 221 0 使用方法: int main(int argc, char *argv[]) { int testdev //led test... testdev = open("/dev/QuickMarkLed",O_RDWR) ioctl(testdev, 2, 1) //ioctl(device, led number, open/close) open=1 ioctl(testdev, argv[1][0]- 0 , argv[2][0]- 0 ) //ioctl(device, led number, open/close) open=1 close(testdev) return 0 }
标签: s3c2440 driver Linux dev-C
上传时间: 2014-01-01
上传用户:qlpqlq
* first open client.cpp and search for that USER_MSG_INTERCEPT(TeamInfo) over it u add this Code: USER_MSG_INTERCEPT(Health) { BEGIN_READ(pbuf,iSize) me.iHealth = READ_BYTE() return USER_MSG_CALL(Health) } * then we search for int HookUserMsg (char *szMsgName, pfnUserMsgHook pfn) and add this Code: REDIRECT_MESSAGE( Health ) *k now we have the health registered and can read it out i stop this hear know cuz i must thanks panzer and w00t.nl that they helped me with it first time! *ok now we go to int HUD_Redraw (float x, int y) and packing this draw code in it Code:
标签: USER_MSG_INTERCEPT TeamInfo client search
上传时间: 2016-01-22
上传用户:ynzfm