Posts Tagged ‘C++’

  • 8020 Distributed Dental Management System” Milestone 1 Code Complete

    Date: 2009.08.29 | Category: Programming Language | Response: 1

    8020 Dist­ri­bu­ted Den­tal Mana­ge­ment System” is a pro­ject and a pro­g­ram based on .NET Fra­me­work 3.5 and WCF (Win­dows Commu­ni­ca­tion Foun­da­tion) Tech­ni­que. It is also a pro­ject for my postg­ra­dua­tion the­sis. It is desi­g­ned for seve­ral con­ca­te­na­ted den­tal cli­nics, in ano­ther word, a den­tal cli­nics group, to build their own netwo­r­king and syn­ch­ro­ni­za­ble mana­ge­ment system. It will combine and keep syn­ch­ro­ni­zing on patients’ medi­cal reco­rds and their teeth X-ray pho­tos between clinics.

    With a whole month’s effort, I just fini­shed desi­g­ning, coding on Mile­stone 1 of 8020System. I lea­rnt WCF Tech­ni­que, deci­ded to code this pro­ject on .NET, desi­g­ned both of data­base and pro­g­ram archi­te­cture, and then pain­ted win­dows forms with plenty of events and fun­ctions bound on, pro­g­ra­mmed data access tier and busi­ness logic tier. All the work on the pro­ject is done by myself. Maybe it is a small task for a pro­g­ra­mming team, but actua­lly it is a huge pro­ject for me.

    image
    Patient Info­ma­tion Page

    For the the­sis inspe­ction on this Sun­day, I have to make a mile­stone for my pro­ject to let my tutor check it out and give me some sug­ge­stion. I just imple­me­ted some basic fun­ctions such as patient info­r­ma­tion, den­tal users inclu­ding den­ti­sts and nur­ses man­ga­ment, work sche­du­ling, reserva­tion on so on. There is a spe­cial fun­ction in the pro­g­ram, and we can send/receive short messa­ges using my pro­ject. I enri­ched its fun­ctions and give much conve­nience to nur­ses. With a SMS modem and a SIM card, you can send/receive any messa­ges you want to the patients and workers.

    image
    SMS Page

    In the server tier, I put a visi­ble con­t­rol pro­g­ram and use Web Servi­ces with WS-Security for safely data tran­sfer­ring. And I also imple­men­ted duplex tran­smi­ssion between server and clients although HTTP pro­to­col is an sta­te­less one. Thanks for the power­ful WCF! It’s cool!

    imageServer Side

    And I used abun­dant LINQ sen­ten­ces for high effi­cient pro­g­ra­mming and less code lines. Thanks for the intern expe­rience on Mic­ro­soft MBD, I can use LINQ habitually.

    For the mee­ting of Sun­day and first the­sis draft due on middle Septe­mber, I have to tur­ned myself to docu­men­ta­tion making. I should write down the first cha­pter of my the­sis and a dire­ctory of con­tents tomo­r­row (actua­lly it is today!). Keep walking and keep imp­roving myself.

    • Share/Bookmark
  • 最大子序列算法

    Date: 2008.07.03 | Category: Algorithm, Microsoft | Response: 0

    周日的软件技术实现课上,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;
            }
        }//for

        return;
    }

    Read the rest of this entry »

    • Share/Bookmark

Paul’s Online Services

Dynamic Tag Cloud

Recent Posts

Recent Comments

Tags

2008.11.Trip-of-GuangXi ASP.net C++ China Chrome css dotNet FCGuoAn Firefox Football gmail IBM IE IIS IT Association Joke Microsoft music mysql NLP Nokia ntfs NumPy OpenSolaris open source Open Team php pidgin PKUSS Python Python Challenge qq Samba SciPy Learning shell solaris SQL SUN Thunderbird Travel web host Win 7 WordPress X11 zfs