软件艺术思考者  
混沌,彷徨,立志,蓄势...
公告
日历
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

导航

随笔分类(86)

随笔档案(85)

搜索

  •  

最新评论

阅读排行榜

评论排行榜

 
       未上大学前,我没有感觉到知识(基础知识)的重要,只是敬畏于它的神秘,因为那时我知道它们是千百年来经验的总结。带着这种神秘感,我进入了大学之门。
       直到上个月,我在一次笔试中碰到一个题目,看似简单,但实际上是只能列出三个方程却有四个未知量的方程组,当时我的直觉是他们把题目出错了,三个方程怎么能解出四个未知量呢?但想到这个试卷有可能经历多人,所以觉得还是应该尽力做下去。当时我解出了几个未知量的关系,但也只能做到这里了,因为再往下解不出来,我猜测是不是可以先假设其中一个未知量的值,从而解出其他变量?但我实验了两次后最终还是失败了。当时因为时间的限制我不可能继续假设下去,所以也只能放弃了。
       当我回家后忽然意识到:这种题型正好是<<线性代数>>里的求非齐次线性方程组普通解系的问题。对这种变量数多于方程数的问题,我们可以把未知量的系数和等号右边的数列组成一个增广矩阵B,然后对它进行初等行变换,先变成阶梯矩阵,求得其R(A)R(B)它们相等才有解,且等于变量数n时有唯一解,小于变量数有无穷解),然后再变成行最简矩阵,用它来求固定未知量a自由未知量b(注意b能让我们知道可以对哪些变量进行假设值,a对哪些变量不能设值)的关系,然后对自由未知量设值就能求出一组解,当用c1和c2乘以这组解,它们便变成了这组非齐次线性方程组普通解系我们可以使用这个解系里的任何一组解来满足非齐次线性方程组。
      当然,这只是线性代数的一个方面的功能,它还是概率论的基础,是计算机图形学的工具,以便我们能更方便的求解其他方面的问题。
      另外我感觉大学课程对软件开发有直接帮助的课程有:数据结构,C,英语,数据库,java,软件工程等等,也许还没想全,其他课程也肯定能开拓我们的思维,对逻辑能力有很好的训练作用,而逻辑能力是设计软件或者硬件最重要的能力。
       希望各位能珍惜我们大学里的每一门课,每一节课。

       感谢我的妻子竹竹,是她在背后支持我继续上完大学的,她的厨艺绝对比我写程序的水平高,使我们在不富裕的日子里也能吃上饭店级的饭菜。呵呵
posted on 2007-06-02 19:55 智者无疆 阅读(1294) 评论(11)  编辑  收藏 所属分类: SOFT ART
评论:
  • # re: 我为什么崇拜知识  cheng Posted @ 2007-06-02 20:14
    祝福楼住,你很幸福,因为有这样一个女朋友在背后支持着你!:P
    珍惜吧~~~~~  回复  更多评论   

  • # re: 我为什么崇拜知识  曲强 Nicky Posted @ 2007-06-02 20:41
    哎~说句实话现在在上大学,没那么深感觉。不过,如果都要在大学才能学到知识,那么现在中国估计还会停留在70年代~~~~~呵呵~下面播放器不错,收下了。  回复  更多评论   

  • # re: 我为什么崇拜知识[未登录]  Jerry Posted @ 2007-06-03 10:33
    和楼主有同感啊。基础知识的确很重要啊。  回复  更多评论   

  • # re: 我为什么崇拜知识[未登录]  cc Posted @ 2007-06-03 12:36
    感谢我的妻子竹竹,是她在背后支持我继续上完大学的,她的厨艺绝对比我写程序的水平高,使我们在不富裕的日子里也能吃上饭店级的饭菜。呵呵


    羡慕啊~~~~~~~~~~~~~~~~~  回复  更多评论   

  • # re: 我为什么崇拜知识  sitinspring Posted @ 2007-06-03 15:48
    比知识更重要的是创新能力.  回复  更多评论   

  • # 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等等。一点经验,到此备忘/  回复  更多评论   

  • # 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不定?? 问题点数:0、回复次数:4Top

    1 楼totodo(土豆仙)回复于 2004-01-10 13:50:40 得分 0
    动态数可以定的。
    InternetAddress[]也是可以的。
    Top

    2 楼stonecsdn(东东)回复于 2004-01-13 09:44:18 得分 0
    你的问题是不是string[]中含有多个mail地址,把他们解析后组装成一个InternetAddress[]?可以直接把多个mail组装成一个String 类的对象to,以逗号分隔,使用InternetAddress.parse(to)即可产生一个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 发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("发邮件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);
    //向数据库插入数据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;
    }

    }
      回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 
 
Copyright © 智者无疆 Powered by: 博客园 模板提供:沪江博客


   观音菩萨赞