- 博客(30)
- 资源 (12)
- 收藏
- 关注
原创 Relational Algebra [关系代数]
<br />Relational Algebra is essential in database since it plays an important role in query optimization. To reach this goal, the first step is transforming the SQL to Relational Algebra.<br /> <br />Many materials can be found on the net, such as http://w
2010-12-07 17:29:00
924
原创 Tips of Programming in Google App Engine
The page cant not be written out if the database is not initialed. My solution of this problem is the step-complex but easy one. It is to write the database with random data at first, and then d
2009-11-12 12:26:00
532
原创 a way to Integrate massive webpages in Python
from google.appengine.api import urlfetch class test(webapp.RequestHandler): def get(self): url = "http://www.google.com/" result = urlfetch.fetch(url) if re
2009-08-26 21:56:00
489
原创 stop unexpectedly
I would like to begin in the problem I encountered this morning. The bug occurred when I was connection network in Android. I was confused at that time, because I have tried that code in Android i
2009-08-26 10:43:00
639
原创 Jet Aircraft
Mr. Retain is so clever that he creates a jet aircraft by himself. A jet aircraft is an aircraft propelled by jet engines. Jet aircraft fly much faster than propeller-powered aircrafts and at higher a
2009-04-21 01:49:00
743
原创 Heirloom
When Mr. Macpet gets a heritage he doesnt feel so happy, because he needs a password to open it. This password is a number which can be got as followed.For any positive integer a, an integer fun
2009-04-21 01:48:00
568
原创 Indegested Posters
In Nankai University, the poster board in front of Third Student Dining Hall is the most popular one among students. There are so many posters expected to be post there that the Students Union have t
2009-04-21 01:48:00
605
原创 God's Note
Train ticket office is always busy, especially during the Spring Festival. In those days many people who want train tickets fall in an agony of waiting and no tickets, including Mr. Govern. His awful
2009-04-21 01:43:00
656
原创 Excellent Plan
Mr. AngelClover is fond of Neokart which is a kind of racing game on PC, and he spends much time on it. As Mr. AngelClover wants a high score in this game, he has to play as many rounds as possible. T
2009-04-21 01:21:00
625
原创 Fantasic Game
Mr. Fantasy likes magic show very much. He does not only like watching magic show, but also like to play magic. This time, he creates a new magic game.In this game, an assistant is needed.
2009-04-20 13:12:00
505
原创 Distance Over The World
After graduated from Nankai University, Mr. AngelClover and his classmates goes to different places all over the world. Now Mr. AngelClover has a project. In this project he needs to know the distance
2009-04-20 12:31:00
611
原创 Challenge From XOR
Mr. AngelClover just learnt XOR on his Computer Class. XOR is a bit arithmetic operator that returns one value if one, but not both, of its operands is one. It is also called Exclusive-OR. Now Mr. Ang
2009-04-20 00:25:00
606
原创 Binary Path
After read Dr. D.E.Knuths book, Mr. Bpt finds an interesting thing.As we all known, a decimal number may be represented in binary form. For example, we are able to use (101)2 represent (5)10. And d
2009-04-19 23:50:00
704
原创 A Perfect Tour
Mr. Perfect is working as an intern in a travel agency, and he should always deal with strange and difficult questions. Now he would like to share one of them with you. In order to make it easy to und
2009-04-19 23:39:00
552
原创 二进制序列枚举
将一个二进制序列枚举出来,例如4位的二进制数按如下序列枚举出来:111101111011110111100011010101101001110000010010010010000000可以发现,数中0的个数是从0到n的,n为二进制数的位数。编写函数如下: void change(bool* record,int n,int&
2009-04-18 06:47:00
2101
转载 设置php和mysql
首先说一下我用的软件版本。 PHP 5.1.6 APACHE 2.0.59(注意:APACHE 2.2.X版本以上要增加插件才支持PHP 5的) MYSQL 5.0.24a 好了,现在开始安装,我先装的php5,直接解压文件到C:/php(安装到哪里并不会有影响,凭个人喜号,本文中的所有路径都以我的安装路径,请大家在自己的机器上安装的时候注意修改为自己的路径),接着安装APACHE,我直接把它装到
2009-01-27 22:23:00
721
原创 多写几个.java
今天终于知道利用Eclipse使多个.java能互相引用各自定义的函数。只要这n(n>1).java文件里有可以只有一个public static void mian()函数。而其他.java文件的编写和正常的.java文件一样,同时也可以有一个public static void mian()函数。这几个.java都放在同一个工程下。先将每个.java都编译一遍,再选择要作为主函数的.jav
2008-12-12 22:33:00
507
转载 内核添加系统调用
在Windows下添加系统调用不像Linux那样容易,Windows系统调用与用户程序之间还有Ntdll.dll层,而这一层微软没有提供源代码,但是我们从系统调用的实现机制出发,不管是在linux还是Windows系统调用的实现都是通过中断来实现的,可以利用中断的方式调用新添加的系统调用。 下面以本实验添加的系统调用为例详细介绍添加和使用方法。下面是添加系统调用的基本过程,添加的系统调用
2008-12-10 19:05:00
899
原创 使用JBDC访问SQL Server 2000
方法一:使用数据库的专用驱动程序 这种方法不用创建数据源就能存取相应的数据库。 首先,下载驱动程序,并安装。到下面的页面去下载“SQL Server 2000 Driver for JDBC”:http://www.microsoft.com/china/sql/download/2000/jdbc.asp,或者自己到网上搜一下。下载后,在SQL Server 2000 Dri
2008-11-29 11:11:00
1171
原创 单车道问题 - 进程同步互斥与死锁问题的解决
一、 同步互斥关系在这条南北双向的国家公路和共享单车道的隧道上,存在如下的同步互斥关系:1、 同一个车道上,前面的车没有前进,则后面的车不能前进;2、 对于每一辆将进入隧道的车,只有没有迎面而来的汽车时才能使用隧道。因此,设置6个传感器和2个信号灯,如下图所示: 传感器A、B、C和D、E、F分别用于获取南、北车道上的信息。A
2008-11-28 00:12:00
3634
原创 语法树
语法树能使程序具有层次性,使要翻译的程序更具有语义特点。比如,对于同一段程序中不同地方都出现的代码int a;在语法树中可以体现出其不同的状态和性质。设计语法树中的结点的数据结构如下:typedef struct ParseNode //语法树结点数据结构{ int NodeID;
2008-11-27 22:10:00
2553
原创 ProtoThreads - Producer&Consumer
Swedish Institute of Computer Science的Adam Dunkels写的模拟解决生产者-消费者问题的C语言代码,在这个文件包里主要的文件有pt.h,pt-sem.h,lc.h,lc-switch.h,lc-addrlabel.h,详细请看http://www.sics.se/~adam/pt/pt-1.4-refman/main.html。接下来,我将我对这些代码的
2008-11-16 13:09:00
1805
1
原创 计算数组的二进制表示的01个数
以下是自写的一个比较简单的计算二进制中1的个数及其起始和终止位置的程序,这个程序可扩展成对一个数组的计算。/**CaculateOnes.cpp*Powered by Keamou*/#include int start;int end;int ones;void main(){ char obj[2]={d,a}; c
2008-11-16 13:04:00
818
原创 熟悉Parse Generator
/*Powered by Keamou@CS@CITS@NKU */1. 将所有的词法分析功能均放在yygettoken函数内实现,为+、-、*、/、(、)每个运算符及整数分别定义一个单词类别,在yygettoken内实现代码,能识别这些单词,并将单词类别返回给词法分析程序。答:定义单词类别定义如下: 记号类别名
2008-10-31 16:59:00
4435
1
原创 For翻译成堆栈机代码
/* Power by Keamou@CS@CITS@NKU */为C语言的for语句设计翻译模式如下:lines : lines stmt /n { printf("%s/n", $2); } | lines /n | ;stmt : for(expr;{gettmp($$);
2008-10-31 16:39:00
1603
原创 构造编译器的第一步
/* Power by Keamou@CS@CITS@NKU */1 用自然语言结合代码实例描述你的C语言编译器所支持语言特性的语法和语义。答: 赋值(=)语句语法结构是:变量名 = 表达式语义是:将表达式计算所得的值赋给变量。产生式为:stmt → id = expr if 分支语句语法结构是:
2008-10-31 16:33:00
1219
原创 多优先级队列调度算法
一、多优先级队列调度算法的描述该算法有多个队列,同一个队列中的进程优先级相同,不同队列中进程优先级不同;最高优先级上的进程运行1个时间片,次高优先级上的进程运行2个时间片,再下一级运行4个时间片,依此类推;每次从队列头开始运行进程,每当一个进程在一个优先级队列中用完它的时间片后,就移到队列的尾部;只有当高优先级队列为空时才会从不为空的低优先级队列中选择进程运行;在低优先级队列中等待时
2008-10-31 15:58:00
5862
原创 ++
今天同学突然又在讨论史Sir课上“透露”的百度的笔试题。(根据史Sir的说法,这个题本来就是送分题,身为CS人,这是最基础的了。但是竟然还是有很多人不会=.=#)题目大概如下:#includevoid main(){ int gg ; int mm ; gg = 1 ; mm = ( gg ++ ) + ( ++ gg ) + gg ;
2008-10-19 22:41:00
730
5
原创 Symbols are found~
根据windows的配置指南配置debug环境,却遇到了头疼的“Symbols are not found.”的问题。看了Windbg的英文文档(英文啊=.=),直到现在才弄明白了。虽然Symbols路径是D:/Symbols/WindowsWRK;srv*D:/Symbols/WindowsWRK*http://msdl.microsoft.com/download/symbols但
2008-10-14 10:19:00
952
1
转载 C语言之联合(union)
1. 联合说明和联合变量定义 联合也是一种新的数据类型, 它是一种特殊形式的变量。 联合说明和联合变量定义与结构十分相似。其形式为: union 联合名{ 数据类型 成员名; 数据类型 成员名; ... } 联合变量名; 联合表示几个变量公用一个内存位置, 在不同的时间保存不同的数据类型 和不
2008-10-12 15:57:00
766
《Programming Active Server Pages (2.0)》
2008-12-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人