Welcome![Sign In][Sign Up]
Location:
Search - B-52

Search list

[ELanguage编译原理及实践

Description:

目      录
译者序
前言
第1章   概论 1
1.1   为什么要用编译器 2
1.2   与编译器相关的程序 3
1.3   翻译步骤 5
1.4   编译器中的主要数据结构 8
1.5   编译器结构中的其他问题 10
1.6   自举与移植 12
1.7   TINY样本语言与编译器 14
1.7.1   TINY语言 15
1.7.2   TINY编译器 15
1.7.3   TM机 17
1.8   C-Minus:编译器项目的一种语言 18
练习 19
注意与参考 20
第2章   词法分析 21
2.1   扫描处理 21
2.2   正则表达式 23
2.2.1   正则表达式的定义 23
2.2.2   正则表达式的扩展 27
2.2.3   程序设计语言记号的正则表达式 29
2.3   有穷自动机 32
2.3.1   确定性有穷自动机的定义 32
2.3.2   先行、回溯和非确定性自动机 36
2.3.3   用代码实现有穷自动机 41
2.4   从正则表达式到DFA 45
2.4.1   从正则表达式到NFA 45
2.4.2   从NFA到DFA 48
2.4.3   利用子集构造模拟NFA 50
2.4.4   将DFA中的状态数最小化 51
2.5   TINY扫描程序的实现 52
2.5.1   为样本语言TINY实现一个扫描
程序 53
2.5.2   保留字与标识符 56
2.5.3   为标识符分配空间 57
2.6   利用Lex 自动生成扫描程序 57
2.6.1   正则表达式的Lex 约定 58
2.6.2   Lex输入文件的格式 59
2.6.3   使用Lex的TINY扫描程序 64
练习 65
编程练习 67
注意与参考 67
第3章   上下文无关文法及分析 69
3.1   分析过程 69
3.2   上下文无关文法 70
3.2.1   与正则表达式比较 70
3.2.2   上下文无关文法规则的说明 71
3.2.3   推导及由文法定义的语言 72
3.3   分析树与抽象语法树 77
3.3.1   分析树 77
3.3.2   抽象语法树 79
3.4   二义性 83
3.4.1   二义性文法 83
3.4.2   优先权和结合性 85
3.4.3   悬挂else问题 87
3.4.4   无关紧要的二义性 89
3.5   扩展的表示法:EBNF和语法图 89
3.5.1   EBNF表示法 89
3.5.2   语法图 91
3.6   上下文无关语言的形式特性 93
3.6.1   上下文无关语言的形式定义 93
3.6.2   文法规则和等式 94
3.6.3   乔姆斯基层次和作为上下文无关
规则的语法局限 95
3.7   TINY语言的语法 97
3.7.1   TINY的上下文无关文法 97
3.7.2   TINY编译器的语法树结构 98
练习 101
注意与参考 104
第4章   自顶向下的分析 105
4.1   使用递归下降分析算法进行自顶向下
的分析 105
4.1.1   递归下降分析的基本方法 105
4.1.2   重复和选择:使用EBNF 107
4.1.3   其他决定问题 112
4.2   LL(1)分析 113
4.2.1   LL(1)分析的基本方法 113
4.2.2   LL(1)分析与算法 114
4.2.3   消除左递归和提取左因子 117
4.2.4   在LL(1)分析中构造语法树 124
4.3   First集合和Follow集合 125
4.3.1   First 集合 125
4.3.2   Follow 集合 130
4.3.3   构造LL(1)分析表 134
4.3.4   再向前:LL(k)分析程序 135
4.4   TINY语言的递归下降分析程序 136
4.5   自顶向下分析程序中的错误校正 137
4.5.1   在递归下降分析程序中的错误
校正 138
4.5.2   在LL(1)分析程序中的错误校正 140
4.5.3   在TINY分析程序中的错误校正 141
练习 143
编程练习 146
注意与参考 148
第5章   自底向上的分析 150
5.1   自底向上分析概览 151
5.2   LR(0)项的有穷自动机与LR(0)分析 153
5.2.1   LR(0)项 153
5.2.2   项目的有穷自动机 154
5.2.3   LR(0)分析算法 157
5.3   SLR(1)分析 160
5.3.1   SLR(1)分析算法 160
5.3.2   用于分析冲突的消除二义性
规则 163
5.3.3   SLR(1)分析能力的局限性 164
5.3.4   SLR(k)文法 165
5.4   一般的LR(1)和LALR(1)分析 166
5.4.1   LR(1)项的有穷自动机 166
5.4.2   LR(1)分析算法 169
5.4.3   LALR(1)分析 171
5.5   Yacc:一个LALR(1)分析程序的
生成器 173
5.5.1   Yacc基础 173
5.5.2   Yacc选项 176
5.5.3   分析冲突与消除二义性的规则 180
5.5.4   描述Yacc分析程序的执行 183
5.5.5   Yacc中的任意值类型 184
5.5.6   Yacc中嵌入的动作 185
5.6   使用Yacc生成TINY分析程序 186
5.7   自底向上分析程序中的错误校正 188
5.7.1   自底向上分析中的错误检测 188
5.7.2   应急方式错误校正 188
5.7.3   Yacc中的错误校正 189
5.7.4   TINY中的错误校正 192
练习 192
编程练习 195
注意与参考 197
第6章   语义分析 198
6.1   属性和属性文法 199
6.1.1   属性文法 200
6.1.2   属性文法的简化和扩充 206
6.2   属性计算算法 207
6.2.1   相关图和赋值顺序 208
6.2.2   合成和继承属性 212
6.2.3   作为参数和返回值的属性 219
6.2.4   使用扩展数据结构存储属性值 221
6.2.5   语法分析时属性的计算 223
6.2.6   语法中属性计算的相关性 226
6.3   符号表 227
6.3.1   符号表的结构 228
6.3.2   说明 230
6.3.3   作用域规则和块结构 232
6.3.4   同层说明的相互作用 236
6.3.5   使用符号表的属性文法的一个
扩充例子 237
6.4   数据类型和类型检查 241
6.4.1   类型表达式和类型构造器 242
6.4.2   类型名、类型说明和递归类型 246
6.4.3   类型等价 248
6.4.4   类型推论和类型检查 253
6.4.5   类型检查的其他主题 255
6.5   TINY语言的语义分析 257
6.5.1   TINY的符号表 258
6.5.2   TINY语义分析程序 259
练习 260
编程练习 264
注意与参考 264
第7章   运行时环境 266
7.1   程序执行时的存储器组织 266
7.2   完全静态运行时环境 269
7.3   基于栈的运行时环境 271
7.3.1   没有局部过程的基于栈的环境 271
7.3.2  带有局部过程的基于栈的环境 281
7.3.3   带有过程参数的基于栈的环境 284
7.4   动态存储器 286
7.4.1   完全动态运行时环境 286
7.4.2   面向对象的语言中的动态存储器 287
7.4.3   堆管理 289
7.4.4   堆的自动管理 292
7.5   参数传递机制 292
7.5.1   值传递 293
7.5.2   引用传递 294
7.5.3   值结果传递 295
7.5.4   名字传递 295
7.6   TINY语言的运行时环境 296
练习 297
编程练习 303
注意与参考 304
第8章   代码生成 305
8.1   中间代码和用于代码生成的数据
结构 305
8.1.1   三地址码 306
8.1.2   用于实现三地址码的数据结构 308
8.1.3   P-代码 310
8.2   基本的代码生成技术 312
8.2.1   作为合成属性的中间代码或目标
代码 312
8.2.2   实际的代码生成 314
8.2.3   从中间代码生成目标代码 317
8.3   数据结构引用的代码生成 319
8.3.1   地址计算 319
8.3.2   数组引用 320
8.3.3   栈记录结构和指针引用 325
8.4   控制语句和逻辑表达式的代码生成 328
8.4.1   if 和while 语句的代码生成 328
8.4.2   标号的生成和回填 330
8.4.3   逻辑表达式的代码生成 330
8.4.4   if 和while 语句的代码生成过程
样例 331
8.5   过程和函数调用的代码生成 334
8.5.1   过程和函数的中间代码 334
8.5.2   函数定义和调用的代码生成过程 336
8.6   商用编译器中的代码生成:两个案
例研究 339
8.6.1   对于80×86的Borland 3.0版C编
译器 339
8.6.2   Sun SparcStation的Sun 2.0 C编
译器 343
8.7   TM:简单的目标机器 346
8.7.1   Tiny Machine的基本结构 347
8.7.2   TM模拟器 349
8.8   TINY语言的代码生成器 351
8.8.1   TINY代码生成器的TM接口 351
8.8.2   TINY代码生成器 352
8.8.3   用TINY编译器产生和使用TM
代码文件 354
8.8.4   TINY编译器生成的TM代码文
件示例 355
8.9   代码优化技术考察 357
8.9.1   代码优化的主要来源 358
8.9.2   优化分类 360
8.9.3   优化的数据结构和实现技术 362
8.10   TINY代码生成器的简单优化 366
8.10.1   将临时变量放入寄存器 366
8.10.2   在寄存器中保存变量 367
8.10.3   优化测试表达式 367
练习 368
编程练习 371
注意与参考 372
附录A   编译器设计方案 373
附录B   小型编译器列表 381
附录C   Tiny Machine模拟器列表 417


Platform: | Size: 7612048 | Author: wesong | Hits:

[Bookseoe_android特刊8

Description: 【eoe特刊】第八期 :Android开发技巧 当掌握了一门开发语言以及一个平台的开发模式以后,基本上就可以进行开发了。但是写程序 是门很有意思的事情,特别是现在使用Java这样的语言开发,我们又了强大的开发工具,我们又了 更好的UI交互的平台,所以也诞生了很多使用的开发技巧,如果能够掌握这些小技巧无疑能为我们 的开发提速不少。 目录: 4 本期简介............................................................................2 上传 EOEMARKET 让社区帮你推广..........................................2 《GOOGLE ANDROID 开发入门与实战》简介............................3 1.1.1.1.最常用的 ECLIPSE 快捷键&模拟器快捷键.......................6 1.1ECLIPSE 快捷键.............................................................6 1.2 模拟器快捷键............................................................... 8 2.ECLISPE 使用技巧.......................................................... 10 2.1 密技篇:.................................................................... 10 2.2 外挂篇:.................................................................... 10 2.3 一般插件安装...............................................................11 2.4 安装 MYECLIPSE.......................................................12 2.5 自定义注释................................................................14 2.6 查看 JDK 源代码..........................................................14 3.JAVA 开发小技巧............................................................15 4. ANDROID最佳实践....................................................... 19 4.1 为性能设计:.............................................................. 19 4.2 为响应灵敏性设计........................................................ 22 4.3 为无缝设计:.............................................................. 24 5.多资源文件的引用........................................................... 27 6.ANDROID 调试 LOGCAT技巧...........................................29 7. 用 ANDROID 运行最简单的 C 程序....................................31 8.开发技巧杂集.................................................................33 8.1 一些源于 CSS 的组合实现技巧........................................33 8.2 关于 SEARCH 搜索框的使用...........................................33 8.3ANDROID 是否有网络连接...............................................34 8.4ACTIVITY 全屏和 无标题栏..............................................35 8.5 使用 VIEWSTUB 延迟展开视图........................................35 8.6 删除窗口背景................................................................35 8.7 使用主题......................................................................36 8.8 预先缩放图像到视图大小...................................................36 8.9 使用 GETSTRING (INT RESID, OBJECT... FORMATARGS)的技巧.37 8.10 横竖屏切换时不重新加载 ONCREATE.......................................38 8.11ANDROID TRANSLUCENTTHEME 半透明主题............................38 8.12 模拟器玩 PING....................................................................38 8.13 通过 GSM CALL 命令打电话\发短信..........................................39 9.9.9.9. 在 ANDROID中使用 MAP需要注意的技巧..............................40 10.每个人应该会用的四个GOOGLE ANDROID小技巧........................... 42 10.1 小技巧 1:随时使用 MPEG-4 H.264.........................................42 10.2 小技巧 2:硬检索关键字.........................................................42 10.3 技巧 3 使用手机摄像头拍摄商品条码消费.....................................42 10.4 小技巧 4:快捷键..................................................................42 总结:..................................................................................43 11. GOOGLE ANDROID SDK1.6 发布以及重大性能提升!...................44 系统新功能................................................................................. 44 新平台新技术................................................................................46 11.EOEMARKET..........................................................................48 A 每日一句................................................................................. 52 B APPSHARES............................................................................53 12.介绍特刊组成员....................................................................... 54 13.其他..................................................................................... 55 15. 游戏诞生记 真的要生 蛋了.........................................................56 15.1 游戏诞生记一月总结............................................................... 56 15.2 游戏诞生记 所有资源汇集贴......................................................58
Platform: | Size: 4344702 | Author: shuishouqq@gmail.com | Hits:

[Game Programquake3-1-32b-source

Description: 在QuakeCon 2005大会上,John Carmack曾表示,《Quake 3》源代码将在近期发布,任何有兴趣的人都可以下载。 现在,id Software兑现了自己的诺言:《Quake 3 Arena》完整源代码1.32b版(Quake 3 Arena Full Source Code v1.32b)已经公布,包括完整的游戏源代码、各种编译工具和Q3Radiant地图编辑器build 200f,大小为22.4MB(压缩包大小5.46MB)。用VC++2003,打开工程后直接就能编译成功。-Quakecon.org 2005 in the General Assembly, said John Romero, "Quake 3" source code will be released in the near future, any interested person can download. Now, id Software fulfill their promise : "Quake 3 Arena" complete source code version 1.32 b (Quake 3 Arena Full Source Code v1.32b) has been published, including the complete source code of the game, various compiler tools and Q3Radiant map editor build 200f. The size of 22.4 MB (compressed size 5.46MB). VC 2003 and opened the project can be compiled directly success.
Platform: | Size: 5726208 | Author: Henry | Hits:

[Crack HackBigInteger_src

Description: C# BigInteger class. BigInteger.cs is a csharp program. It is the BIgInteger class. It has methods: abs() , FermatLittleTest(int confidence) ,gcd(BigInteger bi) , genCoPrime(int bits, Random rand) , genPseudoPrime(int bits, int confidence, Random rand) , genRandomBits(int bits, Random rand) , isProbablePrime(int confidence) , isProbablePrime() , Jacobi(BigInteger a, BigInteger b) , LucasSequence(BigInteger P, BigInteger Q, BigInteger k, BigInteger n) ,max(BigInteger bi) , min(BigInteger bi) , modInverse(BigInteger modulus) , RabinMillerTest(int confidence) , -C# BigInteger class. BigInteger.cs is a cs harp program. It is the BIgInteger class. It has methods : abs (), FermatLittleTest (int confidence). gcd (BigInteger bi), genCoPrime (int bits, Random rand), genPseudoPrime (int bits, int confidence, Random rand). genRandomBits (int bits, Random rand). isProbablePrime (int confidence). isProbablePrime (), Jacobi (BigInteger a, BigInteger b), LucasSequence (BigInteger P, BigInteger Q, BigInteger k, BigInteger n), max (BigInteger bi), min (BigInteger bi). modInverse (BigInteger modulus). RabinMillerTest (int confidence),
Platform: | Size: 35840 | Author: jason.. | Hits:

[Database systemxiaoshou

Description: 人员采用点数来划分等级关系, 280点以下E级别, 280点以上D级别, 980点以上C级别, 6510点以上B级别, 39270点以上A级别。 加点进行业绩计算之前,需要先进行数据库备份,因为业绩计算后,是不能悔改的,如果计算错误或者有其他的问题的话,就可以用操作前备份的数据库进行覆盖恢复。 本业绩统计为 五个等级: E级会员15 D级推广员20 C级培训员30 B级代理员42 A级代理商52 其中E级别最低, -Points is used to divide the relationship between grade, 280 points below E-level, 280 points or more D-level, C level more than 980 points, 6510 points or more B-level, A level above 39,270 points. Increase the performance of the calculation points is required before the first database backup, because the performance of calculation, is not repentance, and if the calculation errors or other problems, it can be used to operate the database before the backup to restore coverage. The performance statistics for the five grades: E-class members of the promotion of 15 D-level 20 C-level staff training 30 B-class agent from 42 A-level agents of which 52 of the lowest level E,
Platform: | Size: 2585600 | Author: zyt | Hits:

[VHDL-FPGA-Verilogusb_fpga_1_2_latest.tar

Description: USB2.0的FPGA内核,使其可以通过FPGA控制CY公司出品的CY7C68013USB微控制器,对USB设备进行读写操作。-• Xilinx Spartan-3 XC3S400 FPGA • High-Speed (480 MBit/s) USB interface via Mini-USB connector (B-type) • Cypress CY7C68013A/14A EZ-USB-Microcontroller • 60 General Purpose I/O s (GPIO): ◦ 52 FPGA GPIO s ◦ 8 EZ-USB FX2 GPIO s (4 if Flash option is installed)
Platform: | Size: 328704 | Author: 赵恒 | Hits:

[JSP/Javajsp-mxnh

Description: 程序基于 JSP + JavaBean 开发,数据库可以使用Access,MySql,MSSQL,Oracle数据库。: ]9 ?9 [5 D, U1 s Z ~ 开发平台:Win2003 + Apache2.0.52 + Tomcat5.54 + Mod_jk 1.2.6 + JDK1.5- C8 y) g: ~. I, }5 k b* R 程序正常运行需要JVM(Java虚拟机)1.5以上的版本。 后台管理说明: 地址:admin/index.jsp 一定要输入文件名index.jsp,否则无法登录。 k: G9 F P5 e! V 用户名:admin $ n* K7 R8 b N! X! V f ^ 密码:admin -JSP+ JavaBean-based development program, the database can use Access, MySql, MSSQL, Oracle database. :] 9? 9 [5 D, U1 s Z ~ development platform: Win2003+ Apache2.0.52+ Tomcat5.54+ Mod_jk 1.2.6+ JDK1.5-C8 y) g: ~. I,} 5 k b* R program running requires JVM (Java Virtual Machine) 1.5 or later. Admin Description: Address: admin/index.jsp sure to enter the file name index.jsp, or can not log on. K: G9 F P5 e! V User name: admin $ n* K7 R8 b N! X! V f ^ Password: admin
Platform: | Size: 3048448 | Author: 对心锁爱 | Hits:

[SCM5

Description: 在缓冲区marklist中存放了10名同学的分数成绩,将其转换为相应的等级成绩,存入缓冲区gradelist中。转换过程采用子程序实现。 转换规则为: >=90:A >=80且<90:B >=60且<80:C <60:D 不用考虑边界情况,即假设输入的分数成绩都在0-100分中间。 数据段定义如下: data segment marklist db 92,82,72,52,90,80,60,30,99,88 gradelist db 10 dup(?) data ends 子程序接口定义如下: 子程序名:change 输入参数:AH,分数成绩 输出参数:AL,等级 -在缓冲区marklist中存放了10名同学的分数成绩,将其转换为相应的等级成绩,存入缓冲区gradelist中。转换过程采用子程序实现。 转换规则为: >=90:A >=80且<90:B >=60且<80:C <60:D 不用考虑边界情况,即假设输入的分数成绩都在0-100分中间。 数据段定义如下: data segment marklist db 92,82,72,52,90,80,60,30,99,88 gradelist db 10 dup(?) data ends 子程序接口定义如下: 子程序名:change 输入参数:AH,分数成绩 输出参数:AL,等级
Platform: | Size: 6144 | Author: tamakiramimy | Hits:

[Windows DevelopASCIIcode

Description: 计算机中,所有的数据在存储和运算时都要使用二进制数表示(因为计算机用高电平和低电平分别表示1和0),例如,象a、b、c、d这样的52个字母(包括大写)、以及0、1等数字还有一些常用的符号(例如*、#、@等)在计算机中存储时也要使用二进制数来表示,而具体用哪些二进制数字表示哪个符号,当然每个人都可以约定自己的一套(这就叫编码),而大家如果要想互相通信而不造成混乱,那么大家就必须使用相同的编码规则,于是美国有关的标准化组织就出台了所谓的ASCII编码,统一规定了上述常用符号用哪些二进制数来表示。-ASCII code ASCII code ASCII code ASCII code ASCII code ASCII code ASCII code ASCII code
Platform: | Size: 13312 | Author: 李四 | Hits:

[matlabpcgIM01c

Description: This implementation of Isometric Method was designed with respect to be used by a broad scientific community in different regions of science and engieneering. As a consequence specific demands of particular branches may not be fully satisfied. Interested persons are encouraged to test this code at his/her own risk. We do not guarantee absolutely perfect functionality when used in all possible configurations. The Isometric method is subject of permanent development. Consequently the IM code is from time to time revised and improved. Please follow this web page. In case of using IM, please do not forget to make reference to the authors of this algorithm (e.q. Malek et al.2007): Malek J., Ruzek B. and Kolar P., 2007. Isometric Method: Efficient Tool for Solving Non-linear Inverse Problems. Stud. geophys et geod., 52, xxx-yyy.
Platform: | Size: 7168 | Author: vahid | Hits:

[source in ebookdeck-of-cards

Description: 编写一个洗牌和发牌的程序,包含类Card, 类DeckOfCards和一个驱动程序 类Card有: a) int型的数据成员face和suit b) 接受两个int型数据表示面值和花色的构造函数用于初始化数据 c) 两个string类型的static数组代表面值和花色 d) 一个toString函数返回Card,形式是“face of suit”的字符串。可以用+运算符连接字符串 类DeckOfCards有: a) 一个名为deck的Card类vector,用于存储Card b) 代表下一个将要处理的牌的整型值currentCard c) 一个用来初始化deck中的Card的默认构造函数。构造函数使用vector的函数push_back将产生的牌添加到vector的末尾。这个过程对于deck的52张牌都要做一遍 d) 函数shuffle用于洗牌。洗牌算法应该在vector中反复做。对于每张牌,随机选取另一张牌,然后交换这两张牌 e) dealCard函数返回下一张牌 f) moreCards函数返回一个bool值,代表是否还有牌要处理 驱动程序产生DeckOfCards对象,洗牌,然后发牌。 -英语中文(简体)日语Write a reshuffle and licensing program, containing the class Card class DeckOfCards and a driver Class Card: a) int type data members face and suit b) accept two int type data amount and color of the constructor is used to initialize data c) both the static array representing the par value of the string type and color d) a toString function returns the Card, the form of the "face of suit" string. You can use the+ operator connection string Class DeckOfCards: a) a named deck Card class vector for storage Card b) represents the next card to be processed integer value currentCard c) a Card in the default constructor is used to initialize the deck. The constructor uses the vector function push_back card added to the end of the vector. This process for a deck of 52 cards have to do it again d) function is used to shuffle shuffle. The shuffling algorithm should be repeatedly done in the vector. Randomly selected for each card, another card, and then exchange these two ca
Platform: | Size: 2048 | Author: 张国 | Hits:

[SCMB-MCP2515-receive-onebyte-125kbps

Description: 通过CAN总线接接收一字节数据再串口转发出去 功能描述:CAN通信测试程序,CAN中继器的功能 IDE环境: keilC Init2515: 2515初始化程序 CAN_ Send: CAN发送子程序,查询发送 CAN_Receive:CAN接收子程序,中断接收 硬件连接: AT89S51/52+MCP2515-Via CAN bus interface receives a byte of data and then forwarded out the serial port Description: CAN communications test program, CAN repeater function IDE environment: keilC Init2515: 2515 initialization procedure CAN_ Send: CAN send subroutine, send a query CAN_Receive: CAN receives subroutine, interrupt reception Hardware connection: AT89S51/52+ MCP2515
Platform: | Size: 49152 | Author: | Hits:

[SCMButton-sends-8-bytes-of-data

Description: 通过CAN总线将b[8]={0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08}发送出去 CAN通信测试程序,CAN中继器的功能 IDE环境: keilC 2515初始化程序 CAN发送子程序,查询发送 CAN接收子程序,中断接收 硬件连接: AT89S51/52+MCP2515-Via CAN bus b [8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08} sent CAN communications test program, CAN repeater function IDE environment: keilC 2515 initialization procedure CAN send subroutine, send a query CAN receives subroutine, interrupt reception Hardware connection: AT89S51/52+ MCP2515
Platform: | Size: 48128 | Author: | Hits:

[SCMCAN-bus-cycle-sends-8-bytes

Description: 通过CAN总线将b[8]={0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08}发送出去 CAN通信测试程序,CAN中继器的功能 keilC 2515初始化程序 CAN发送子程序,查询发送 CAN接收子程序,中断接收 AT89S51/52+MCP2515-Via CAN bus b [8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08} sent CAN communications test program, CAN repeater function keilC 2515 initialization procedure CAN send subroutine, send a query CAN receives subroutine, interrupt reception AT89S51/52+ MCP2515
Platform: | Size: 36864 | Author: | Hits:

[Otherjinzhizhuanhuan

Description: 【问题描述】编写函数itob(n,s,b),用于把整数n转换成以b为基的字符串并存储到s中. 编写程序,使用函数itob(n,s,b)将输入的整数n,转换成字符串s,将s输出.转换后的字符串从最高的非零位开始输出。如果n为负数,则输出的字符串的第一个字符为’-’。b为大于1小于37的任意自然数值。当b=2时,输出字符只可能是’0’和’1’;当b=16时,输出字符串中可能含有字符为’0’-’9’,’a’-’f’(字母以小写输出)。b还可以是其它数值。比如输入n=33,b=17,则输出33的17进制值为"1g"。 【输入形式】控制台输入整数n和b,其中n可以为负数。n和b以空格分隔. 【输出形式】控制台输出转化后的字符串s. 【样例输入】5 2 【样例输出】101 【样例说明】5的二进制就是101 【评分标准】结果完全正确得20分,每个测试点4分。提交程序名为:itob.c-[Problem Description] Write a function itob (n, s, b), is used to convert the integer n base b string and stored in s. Written procedures, use the function itob (n, s, b) the input integer n, converted to a string s, the s output. strings converted from the highest non-zero bit to start output. If n is negative, the first character of the output is - . b is greater than a value of less than 37 of any nature. When b = 2, the output character can only be 0 and 1 When b = 16, the output string may contain characters 0 - 9 , a - f (letter in lower output). b may also be other values​ ​ . For example, enter n = 33, b = 17, the output 17 hex value "1g" 33 s. [Form] input console input integer n and b, where n can be negative. n and b separated by a space. [Output format] console output after conversion string s. Sample input [52] Sample output] 101 [Description] binary sample 5 is 101 [Standard] results entirely correct score 20 points, 4 points for each test poin
Platform: | Size: 362496 | Author: 服部半藏 | Hits:

[matlabDSPshiyanyi-

Description: 考察序列 x(n)=cos(0.48*pi*n)+cos(0.52*pi*n) a.0≤n≤10时,用DFT估计 的频谱;将 补零加长到长度为100点序列用DFT估计 的频谱。要求画出相应波形。 b.0≤n≤100时,用DFT估计 的频谱,并画出波形。-Inspection sequence x(n)=cos(0.48*pi*n)+cos(0.52*pi*n) A. 0 n 10 or less, or less using DFT spectrum estimation Will fill with zero length to the length of 100 point sequence DFT spectrum estimation.Draw the corresponding waveform requirement. B. 0 n 100 or less, or less using DFT spectrum estimation, and draw the waveform.
Platform: | Size: 13312 | Author: 廖铭文 | Hits:

[OtherUntitled4

Description: 实验实现邻接表表示下无向图的广度优先遍历。 程序的输入是图的顶点序列和边序列(顶点序列以*为结束标志,边序列以-1,-1为结束标志)。程序的输出为图的邻接表和广度优先遍历序列。例如: 程序输入为: a b c d e f * 0,1 0,4 1,4 1,5 2,3 2,5 3,5 -1,-1 程序的输出为: the ALGraph is a 4 1 b 5 4 0 c 5 3 d 5 2 e 1 0 f 3 2 1 the Breadth-First-Seacrh list:aebfdc - The experimental realization of the adjacency list shows the breadth first traversal of undirected graph. The input of the program is the sequence of vertices and edges of the graph (the end of the vertex sequence is a symbol, and the edge sequence is-1,-1 is the end symbol). The output of the program is the adjacency list and the breadth first traversal sequence. For example: Program input: A B C D E F * 0,1 0,4 1,4 1,5 2,3 2,5 3,5 -1,-1 The output of the program is: ALGraph is the A 41 B 540 C 53 D 52 E 10 F 321 Breadth-First-Seacrh list:aebfdc the
Platform: | Size: 1024 | Author: 王乐 | Hits:

[Otherafafa

Description: 本实验实现邻接表表示下无向图的广度优先遍历。 程序的输入是图的顶点序列和边序列(顶点序列以*为结束标志,边序列以-1,-1为结束标志)。程序的输出为图的邻接表和广度优先遍历序列。例如: 程序输入为: a b c d e f * 0,1 0,4 1,4 1,5 2,3 2,5 3,5 -1,-1 程序的输出为: the ALGraph is a 4 1 b 5 4 0 c 5 3 d 5 2 e 1 0 f 3 2 1 the Breadth-First-Seacrh list:aebfdc -In this experiment, the adjacency list shows the breadth first traversal of undirected graph. The input of the program is the sequence of vertices and edges of the graph (the end of the vertex sequence is a symbol, and the edge sequence is-1,-1 is the end symbol). The output of the program is the adjacency list and the breadth first traversal sequence. For example: Program input: A B C D E F * 0,1 0,4 1,4 1,5 2,3 2,5 3,5 -1,-1 The output of the program is: ALGraph is the A 41 B 540 C 53 D 52 E 10 F 321 Breadth-First-Seacrh list:aebfdc the
Platform: | Size: 1024 | Author: 王乐 | Hits:

[androidyuv2rgb24-master

Description: 对于yuv数据的操作处理,包括yuv转rgb格式,yuv数据的缩放等操作,已在Android上测试过可用-52/5000 Duìyú yuv shùjù de cāozuò chǔlǐ, bāokuò yuv zhuǎn rgb géshì,yuv shùjù de suōfàng děng cāozuò, yǐ zài Android shàng cèshìguò kěyòng For yuv data processing, including yuv rgb format, yuv data scaling and other operations, has been tested on Android available
Platform: | Size: 7168 | Author: 郭德刚 | Hits:

[OtherUntitled21

Description: 利用给定条件进行高斯投影坐标计算,包括正算与反算: (a) 椭球采用教材 P100 表 4-1 中的任一椭球,计算流程见 P193 的 框图; (b) 使用大地坐标 B = 17°33′55.7339″, L = 119°15′52.1159″ 中央子午线纬度 117°,实现高斯投影坐标正算; (c) 使用正算得到的高斯投影坐标(x, y),实现高斯投影坐标反算 (d) 将正、反算计算的结果进行比较,检验计算成果。(Gauss's positive and negative calculation)
Platform: | Size: 272384 | Author: HAIM | Hits:

CodeBus www.codebus.net