軟件藝術思考者  
          混沌,彷徨,立志,蓄勢...
          公告
          日歷
          <2007年6月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          1234567

          導航

          隨筆分類(86)

          隨筆檔案(85)

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

           
                 未上大學前,我沒有感覺到知識(基礎知識)的重要,只是敬畏于它的神秘,因為那時我知道它們是千百年來經(jīng)驗的總結。帶著這種神秘感,我進入了大學之門。
                 直到上個月,我在一次筆試中碰到一個題目,看似簡單,但實際上是只能列出三個方程卻有四個未知量的方程組,當時我的直覺是他們把題目出錯了,三個方程怎么能解出四個未知量呢?但想到這個試卷有可能經(jīng)歷多人,所以覺得還是應該盡力做下去。當時我解出了幾個未知量的關系,但也只能做到這里了,因為再往下解不出來,我猜測是不是可以先假設其中一個未知量的值,從而解出其他變量?但我實驗了兩次后最終還是失敗了。當時因為時間的限制我不可能繼續(xù)假設下去,所以也只能放棄了。
                 當我回家后忽然意識到:這種題型正好是<<線性代數(shù)>>里的求非齊次線性方程組普通解系的問題。對這種變量數(shù)多于方程數(shù)的問題,我們可以把未知量的系數(shù)和等號右邊的數(shù)列組成一個增廣矩陣B,然后對它進行初等行變換,先變成階梯矩陣,求得其R(A)R(B)它們相等才有解,且等于變量數(shù)n時有唯一解,小于變量數(shù)有無窮解),然后再變成行最簡矩陣,用它來求固定未知量a自由未知量b(注意b能讓我們知道可以對哪些變量進行假設值,a對哪些變量不能設值)的關系,然后對自由未知量設值就能求出一組解,當用c1和c2乘以這組解,它們便變成了這組非齊次線性方程組普通解系我們可以使用這個解系里的任何一組解來滿足非齊次線性方程組。
                當然,這只是線性代數(shù)的一個方面的功能,它還是概率論的基礎,是計算機圖形學的工具,以便我們能更方便的求解其他方面的問題。
                另外我感覺大學課程對軟件開發(fā)有直接幫助的課程有:數(shù)據(jù)結構,C,英語,數(shù)據(jù)庫,java,軟件工程等等,也許還沒想全,其他課程也肯定能開拓我們的思維,對邏輯能力有很好的訓練作用,而邏輯能力是設計軟件或者硬件最重要的能力。
                 希望各位能珍惜我們大學里的每一門課,每一節(jié)課。

                 感謝我的妻子竹竹,是她在背后支持我繼續(xù)上完大學的,她的廚藝絕對比我寫程序的水平高,使我們在不富裕的日子里也能吃上飯店級的飯菜。呵呵
          posted on 2007-06-02 19:55 智者無疆 閱讀(1305) 評論(11)  編輯  收藏 所屬分類: SOFT ART
          評論:
          • # re: 我為什么崇拜知識  cheng Posted @ 2007-06-02 20:14
            祝福樓住,你很幸福,因為有這樣一個女朋友在背后支持著你?。篜
            珍惜吧~~~~~  回復  更多評論   

          • # re: 我為什么崇拜知識  曲強 Nicky Posted @ 2007-06-02 20:41
            哎~說句實話現(xiàn)在在上大學,沒那么深感覺。不過,如果都要在大學才能學到知識,那么現(xiàn)在中國估計還會停留在70年代~~~~~呵呵~下面播放器不錯,收下了。  回復  更多評論   

          • # re: 我為什么崇拜知識[未登錄]  Jerry Posted @ 2007-06-03 10:33
            和樓主有同感啊。基礎知識的確很重要啊。  回復  更多評論   

          • # re: 我為什么崇拜知識[未登錄]  cc Posted @ 2007-06-03 12:36
            感謝我的妻子竹竹,是她在背后支持我繼續(xù)上完大學的,她的廚藝絕對比我寫程序的水平高,使我們在不富裕的日子里也能吃上飯店級的飯菜。呵呵


            羨慕啊~~~~~~~~~~~~~~~~~  回復  更多評論   

          • # re: 我為什么崇拜知識  sitinspring Posted @ 2007-06-03 15:48
            比知識更重要的是創(chuàng)新能力.  回復  更多評論   

          • # re: 我為什么崇拜知識  sitinspring Posted @ 2007-06-03 15:49
            樓主上大學前就結婚啊?  回復  更多評論   

          • # re: 我為什么崇拜知識  智者無疆 Posted @ 2007-06-03 18:54
            沒有啊,呵呵。謝謝各位善意的留言,我們程序員雖然很苦很累(甚至很窮),但我很滿足,因為我的妻子。  回復  更多評論   

          • # re: 我為什么崇拜知識  webclerk Posted @ 2007-06-04 13:15
            恭喜樓主有個幸福的女朋友,:-)  回復  更多評論   

          • # re: 我為什么崇拜知識  myself Posted @ 2007-06-20 14:19
            eclipse myeclipse 版本匹配問題
            目前就我所知:eclipse3.2.2與myeclipse5.5.1最相匹配。
            eclipse3.2與myeclipse5.0.1最相匹配。
            如果這些版本安裝的時候沒注意匹配,很可能會造成一些煩人的小麻煩,比如tomcat啟動速度慢,myeclipse的visual jsp designer打不開jsp等等。一點經(jīng)驗,到此備忘/  回復  更多評論   

          • # re: 我為什么崇拜知識  SELF Posted @ 2007-07-09 20:12
            JavaMail問題:怎樣把一個string[]的mail地址 構造一個 InternetAddress[]的mail地址??string[]的length不定??
            樓主sjie_ji(青藤)2004-01-10 13:29:40 在 Java / J2EE / EJB / JMS 提問
            JavaMail問題:怎樣把一個string[]的mail地址 構造一個 InternetAddress[]的mail地址??string[]的length不定?? 問題點數(shù):0、回復次數(shù):4Top

            1 樓totodo(土豆仙)回復于 2004-01-10 13:50:40 得分 0
            動態(tài)數(shù)可以定的。
            InternetAddress[]也是可以的。
            Top

            2 樓stonecsdn(東東)回復于 2004-01-13 09:44:18 得分 0
            你的問題是不是string[]中含有多個mail地址,把他們解析后組裝成一個InternetAddress[]?可以直接把多個mail組裝成一個String 類的對象to,以逗號分隔,使用InternetAddress.parse(to)即可產(chǎn)生一個InternetAddress[]
            Top

            3 樓yuexiang(yuexiang)回復于 2004-01-13 10:11:58 得分 0
            具體問題沒說清楚?如果是樓上說的那樣,那樓上的方法就可以了Top

            4 樓liuxiao1217(空白)回復于 2004-01-13 14:06:02 得分 0

            String[] ss={"ss@sohu.com","ddd@hotmail.com"};//假設

            try {
            InternetAddress[] a=new InternetAddress[ss.length];
            for(int i=0;i<ss.length;i++){
            a[i]=new InternetAddress(ss[i]);
            }

            }
            catch (Exception ex) {

            }
              回復  更多評論   

          • # re: 我為什么崇拜知識  智者無疆 Posted @ 2007-07-19 19:05
            Spring 發(fā)html格式的郵件時,要這樣設置helper.setText(content,true);
            package com.wonibo.projectx.web.sendMail;

            import java.util.ArrayList;
            import java.util.Date;
            import java.util.HashMap;
            import java.util.StringTokenizer;

            import javax.mail.MessagingException;
            import javax.mail.internet.InternetAddress;
            import javax.mail.internet.MimeMessage;
            import javax.servlet.http.HttpServletRequest;
            import javax.servlet.http.HttpServletResponse;

            import org.springframework.mail.javamail.JavaMailSenderImpl;
            import org.springframework.mail.javamail.MimeMessageHelper;
            import org.springframework.web.servlet.ModelAndView;
            import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

            import com.wonibo.projectx.model.WbDistributorSell;
            import com.wonibo.projectx.model.WbProduct;
            import com.wonibo.projectx.model.WbShareHistory;
            import com.wonibo.projectx.model.WbShareLocation;
            import com.wonibo.projectx.model.WbShareType;
            import com.wonibo.projectx.model.WbUser;
            import com.wonibo.projectx.service.IDistributorSellService;
            import com.wonibo.projectx.service.IShareLocationService;
            import com.wonibo.projectx.service.IShareTypeService;
            import com.wonibo.projectx.service.ProductService;
            import com.wonibo.projectx.service.ShareHistoryService;
            import com.wonibo.projectx.web.util.WebUtil;

            public class sendMailController extends MultiActionController {
            // 以下是新加的方法zhanglijun----------------------------
            public ModelAndView sendMailsForUser(HttpServletRequest request,
            HttpServletResponse response)throws Exception{
            System.out.print("發(fā)郵件controller::");
            //得到頁面的用戶輸入的信息
            String [] toWhichMails=null;
            String toWhere=(String)request.getParameter("toMailNames").trim();
            String title=(String)request.getParameter("title");
            title=new String(title.getBytes("iso-8859-1"));
            String content=(String)request.getParameter("content");
            content=new String(content.getBytes("iso-8859-1"));
            String from=(String)request.getParameter("userName");
            String password=(String)request.getParameter("password");
            //得到productId
            pId =(Integer)request.getSession().getAttribute("sharePId");
            if(pId==null) return new ModelAndView("/app/home");
            WbProduct p= getProductService().getWbProductByProductId(pId);
            WbUser user=(WbUser)request.getSession().getAttribute("user");
            WbShareType shareType=shareTypeService.getWbShareTypeById(1);
            WbShareLocation shareLocation=getShareLocationService().getShareLocationById(3);
            //向數(shù)據(jù)庫插入數(shù)據(jù)1.distribute_sell(不用了),2.shareHistory
            Date d=new Date();
            /* reSell=new WbDistributorSell();
            reSell.setCreatedDate(d);reSell.setModifiedDate(d);
            reSell.setVersion((short)0); reSell.setWbProduct(p);
            reSell.setWbShareLocation(shareLocation);reSell.setWbUser(user);
            getDistributeSellService().saveDistributerSell(reSell);*/
            //添加播放器code代碼
            int pTypeid=p.getWbProductCategoryByTopProductCategoryId().getProductCategoryId();
            String snippet=WebUtil.getEmailSnippet(pTypeid, 3, pId, p.getFileImagePath());
            String head="<html><head><title>試驗內容</title></head><body>hi,您好:<br/>這是vonibo給您的一封郵件<br/>";
            String footer="</body></html>";
            content= content.concat("<br/>"+snippet);//企圖向email插入播放器代碼,失敗:email不支持播放器
            content=head+content+footer;
            //分隔郵件名
            toWhichMails=toWhere.split(" ");//應該還可以是其他分隔符
            InternetAddress[] a=new InternetAddress[toWhichMails.length];
            for(int i=0;i<toWhichMails.length;i++){
            a[i]=new InternetAddress(toWhichMails[i]);
            shareHistory=new WbShareHistory();
            shareHistory.setCreatedDate(d);shareHistory.setModifiedDate(d);
            shareHistory.setSharePath(toWhichMails[i]);
            shareHistory.setVersion((short)0);
            shareHistory.setWbProduct(p);
            shareHistory.setWbShareType(shareType);
            shareHistory.setWbUser(user);
            shareHistory.setWbShareLocation(shareLocation);
            getShareHistoryService().saveShareHistory(shareHistory);
            }
            // 必須是豆號分隔的才行 InternetAddress [] address=InternetAddress.parse(toWhere);
            // StringTokenizer strT1 = new StringTokenizer(toWhere," ,");
            // InternetAddress[] a=new InternetAddress[strT1.countTokens()];
            /* while(strT1.hasMoreTokens()){
            // a[i]=new InternetAddress(toWhichMails[i]);
            a[i]=new InternetAddress(strT1.nextToken());
            }*/
            this.sendMail2(a, from,content,title);
            return new ModelAndView("uploadFile/mailSendCode","message","successful");

            }



            public void sendMail2(InternetAddress[] to,String from,String content,String title){
            JavaMailSenderImpl sender = new JavaMailSenderImpl();
            sender.setHost(this.getMailHost());


            MimeMessage message = sender.createMimeMessage();
            try {
            MimeMessageHelper helper = new MimeMessageHelper(message,true,"GBK");
            helper.setTo(to);
            helper.setFrom(from);
            helper.setText(content,true);
            helper.setSubject(title);

            } catch (MessagingException e) {
            e.printStackTrace();
            }

            sender.send(message);

            }

            private String mailHost;
            private ShareHistoryService shareHistoryService;
            private IShareTypeService shareTypeService;
            private IShareLocationService shareLocationService;
            private IDistributorSellService distributeSellService;
            private ProductService productService;
            private Integer pId=null;
            private WbDistributorSell reSell=null;
            private WbShareHistory shareHistory;
            public String getMailHost() {
            return mailHost;
            }

            public void setMailHost(String mailHost) {
            this.mailHost = mailHost;
            }



            public IDistributorSellService getDistributeSellService() {
            return distributeSellService;
            }



            public void setDistributeSellService(
            IDistributorSellService distributeSellService) {
            this.distributeSellService = distributeSellService;
            }



            public ProductService getProductService() {
            return productService;
            }



            public void setProductService(ProductService productService) {
            this.productService = productService;
            }



            public ShareHistoryService getShareHistoryService() {
            return shareHistoryService;
            }



            public void setShareHistoryService(ShareHistoryService shareHistoryService) {
            this.shareHistoryService = shareHistoryService;
            }



            public IShareLocationService getShareLocationService() {
            return shareLocationService;
            }



            public void setShareLocationService(IShareLocationService shareLocationService) {
            this.shareLocationService = shareLocationService;
            }



            public IShareTypeService getShareTypeService() {
            return shareTypeService;
            }



            public void setShareTypeService(IShareTypeService shareTypeService) {
            this.shareTypeService = shareTypeService;
            }

            }
              回復  更多評論   


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導航:
           
           
          Copyright © 智者無疆 Powered by: 博客園 模板提供:滬江博客


             觀音菩薩贊

          主站蜘蛛池模板: 金塔县| 东阳市| 湄潭县| 利川市| 牟定县| 高阳县| 博客| 安义县| 金华市| 太原市| 和硕县| 乌鲁木齐市| 塔城市| 大渡口区| 当阳市| 滨海县| 册亨县| 丹阳市| 武功县| 偏关县| 皋兰县| 怀仁县| 左贡县| 宝坻区| 沙洋县| 祁连县| 密山市| 云梦县| 揭东县| 达州市| 军事| 汾阳市| 阿巴嘎旗| 资源县| 梓潼县| 萍乡市| 宁城县| 邯郸市| 天峨县| 温州市| 龙海市|