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

          導(dǎo)航

          隨筆分類(86)

          隨筆檔案(85)

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

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

                 感謝我的妻子竹竹,是她在背后支持我繼續(xù)上完大學(xué)的,她的廚藝絕對(duì)比我寫程序的水平高,使我們?cè)诓桓辉5娜兆永镆材艹陨巷埖昙?jí)的飯菜。呵呵
          posted on 2007-06-02 19:55 智者無(wú)疆 閱讀(1305) 評(píng)論(11)  編輯  收藏 所屬分類: SOFT ART
          評(píng)論:
          • # re: 我為什么崇拜知識(shí)  cheng Posted @ 2007-06-02 20:14
            祝福樓住,你很幸福,因?yàn)橛羞@樣一個(gè)女朋友在背后支持著你!:P
            珍惜吧~~~~~  回復(fù)  更多評(píng)論   

          • # re: 我為什么崇拜知識(shí)  曲強(qiáng) Nicky Posted @ 2007-06-02 20:41
            哎~說(shuō)句實(shí)話現(xiàn)在在上大學(xué),沒(méi)那么深感覺(jué)。不過(guò),如果都要在大學(xué)才能學(xué)到知識(shí),那么現(xiàn)在中國(guó)估計(jì)還會(huì)停留在70年代~~~~~呵呵~下面播放器不錯(cuò),收下了。  回復(fù)  更多評(píng)論   

          • # re: 我為什么崇拜知識(shí)[未登錄](méi)  Jerry Posted @ 2007-06-03 10:33
            和樓主有同感啊。基礎(chǔ)知識(shí)的確很重要啊。  回復(fù)  更多評(píng)論   

          • # re: 我為什么崇拜知識(shí)[未登錄](méi)  cc Posted @ 2007-06-03 12:36
            感謝我的妻子竹竹,是她在背后支持我繼續(xù)上完大學(xué)的,她的廚藝絕對(duì)比我寫程序的水平高,使我們?cè)诓桓辉5娜兆永镆材艹陨巷埖昙?jí)的飯菜。呵呵


            羨慕啊~~~~~~~~~~~~~~~~~  回復(fù)  更多評(píng)論   

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

          • # re: 我為什么崇拜知識(shí)  sitinspring Posted @ 2007-06-03 15:49
            樓主上大學(xué)前就結(jié)婚啊?  回復(fù)  更多評(píng)論   

          • # re: 我為什么崇拜知識(shí)  智者無(wú)疆 Posted @ 2007-06-03 18:54
            沒(méi)有啊,呵呵。謝謝各位善意的留言,我們程序員雖然很苦很累(甚至很窮),但我很滿足,因?yàn)槲业钠拮印?nbsp; 回復(fù)  更多評(píng)論   

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

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

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

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

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

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

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

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

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

            }
            catch (Exception ex) {

            }
              回復(fù)  更多評(píng)論   

          • # re: 我為什么崇拜知識(shí)  智者無(wú)疆 Posted @ 2007-07-19 19:05
            Spring 發(fā)html格式的郵件時(shí),要這樣設(shè)置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::");
            //得到頁(yè)面的用戶輸入的信息
            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ù)庫(kù)插入數(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>試驗(yàn)內(nèi)容</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(" ");//應(yīng)該還可以是其他分隔符
            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);
            }
            // 必須是豆號(hào)分隔的才行 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ù)  更多評(píng)論   


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


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


             觀音菩薩贊

          主站蜘蛛池模板: 萨嘎县| 徐州市| 庆云县| 盐池县| 富蕴县| 平湖市| 会泽县| 楚雄市| 永靖县| 古浪县| 岗巴县| 灵山县| 渝北区| 仁怀市| 京山县| 福海县| 封丘县| 新田县| 全椒县| 达拉特旗| 邯郸市| 嵩明县| 台安县| 廊坊市| 和静县| 波密县| 航空| 隆子县| 澎湖县| 大洼县| 枞阳县| 永修县| 邯郸市| 介休市| 桐乡市| 怀宁县| 南投市| 奇台县| 沂南县| 新干县| 三河市|