Posts Tagged ‘C++’
-
“8020 Distributed Dental Management System” Milestone 1 Code Complete
“8020 Distributed Dental Management System” is a project and a program based on .NET Framework 3.5 and WCF (Windows Communication Foundation) Technique. It is also a project for my postgraduation thesis. It is designed for several concatenated dental clinics, in another word, a dental clinics group, to build their own networking and synchronizable management system. It will combine and keep synchronizing on patients’ medical records and their teeth X-ray photos between clinics.
With a whole month’s effort, I just finished designing, coding on Milestone 1 of 8020System. I learnt WCF Technique, decided to code this project on .NET, designed both of database and program architecture, and then painted windows forms with plenty of events and functions bound on, programmed data access tier and business logic tier. All the work on the project is done by myself. Maybe it is a small task for a programming team, but actually it is a huge project for me.
For the thesis inspection on this Sunday, I have to make a milestone for my project to let my tutor check it out and give me some suggestion. I just implemeted some basic functions such as patient information, dental users including dentists and nurses mangament, work scheduling, reservation on so on. There is a special function in the program, and we can send/receive short messages using my project. I enriched its functions and give much convenience to nurses. With a SMS modem and a SIM card, you can send/receive any messages you want to the patients and workers.
In the server tier, I put a visible control program and use Web Services with WS-Security for safely data transferring. And I also implemented duplex transmission between server and clients although HTTP protocol is an stateless one. Thanks for the powerful WCF! It’s cool!
And I used abundant LINQ sentences for high efficient programming and less code lines. Thanks for the intern experience on Microsoft MBD, I can use LINQ habitually.
For the meeting of Sunday and first thesis draft due on middle September, I have to turned myself to documentation making. I should write down the first chapter of my thesis and a directory of contents tomorrow (actually it is today!). Keep walking and keep improving myself.
-
最大子序列算法
周日的软件技术实现课上,Xin Zou 老师给我们出了一道题。在一个数字数组里面,求一个连续数字之和的最大值子序列,返回最大的值,以及这个子序列的起始位置、终止位置。
我们小组使用了动态规划算法实现,实现方法如下(用C++实现,关键代码):
/*
问题描述:
有一串数字(可正可负的int,放在数组Num里),要求找到起始位置start和终止位置end,使得从start位置到end位置的所有数字之和最大,返回这个最大值max。算法阐述:
最简单的方法是用动态规划算法实现:
设 f[x] 为以 a[x] 终止且包含 a[x] 的最大序列的和,有:
f[1] = a[1];
f[x+1] = f[x] > 0 ? f[x] + a[x+1] : a[x+1]
那么最大子序列的和就是 f[1] .. f[n] 中最大的一个。
算法的时间复杂度为O(n)
*/void MaxSubSeq::MaxSubseq_DP(int nums[], int count, int &resStart, int &resEnd, int &resMax)
{
// 求数组nums[]中连续子序列的最大和,并标出该子序列
// 设 f[x] 为以 a[x] 终止且包含 a[x] 的最大序列的和,有:
// f[1] = a[1];
// f[x+1] = f[x] > 0 ? f[x] + a[x+1] : a[x+1]
// 那么最大子序列的和就是 f[1] .. f[n] 中最大的一个
int start, max;
int i;
start = resStart = resEnd = 0; //初始化当前子序列和最大子序列为nums[0]
max = resMax = nums[0];for (i = 1; i < count; ++i) {
if (max > 0) {
max += nums[i];
} else {
max = nums[i]; //抛弃当前子序列
start = i; //开始新的子序列搜索
}
if (resMax < max) { //更新最大子序列
resMax = max;
resStart = start;
resEnd = i;
}
}//forreturn;
}
Paul’s Online Services
Dynamic Tag Cloud
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Recent Posts
- AIX Storage Learning 1
- 春节快乐! Happy Spring Festival!
- Sun is to the end of life
- 为cos-html-cache插件增加页面(Page)、标签(Tag)和分类(Category)的静态化功能
- How to configure Subversion in OpenSolaris
- 转载:IIS FastCGI PHP 环境下搭建 WordPress
- 在OpenSolaris下动态绑定域名
- Goodbye 2009, Hello 2010
- This Is It
- A Morse Code Exchanger
Recent Comments
- 新视界 (New Vision) » 在OpenSolaris下动态绑定域名 on 使用ZFS打造家庭廉价数据中心
- paul on Wordpress数据库转移网址变换的方法
- 知识 on Wordpress数据库转移网址变换的方法
- WP Super Cache V0.98 and IIS7 « Anders Heie on Speed up your WordPress Blog on IIS 7 by using WP-Super-Cache
- 博沈 on This Is It
- paul on 使用ZFS打造家庭廉价数据中心
- Anonymous on OpenSolaris 上的 Samba 服务器
- Anonymous on 使用ZFS打造家庭廉价数据中心
- Anonymous on OpenSolaris 上的 Samba 服务器
- Paul on 十年前和十年后的我们