当前位置:首页
开发技术指南» 文章正文
    引言:

 ·一个opengl的问题,高手帮忙    »显示摘要«
    摘要: 我写了一个opengl程序(vc6,win32编程),用一个循环不断重画场景,正常情况下 是50~60帧/秒,但是当我需要画其他模型,数量很多,比如说几百个档案柜,这个时候 计算机负荷明显加大,只有10帧/秒。我想说的是我只想每次重画几个档案柜,其他的只画 一次,不知道有什么方法。我听说模版缓存可能行,但不知道怎么用,请高手指点!!! ......
    摘要: 为什么我有时访问别人的电脑时. 正常来说, 就会弹出一个框叫我输入用户名与密码, 但有时, 用户名为灰色栏,处于不可选状态 . 请问这种方式是怎样弄出来的? http://www.freewebs.com/wentin/ ......


大家一个微软PetShow例子的问题

按照微软件的PetShop的例子,一个表可以定义一个类,如  
  public   class   LineItemInfo   {  
   
  //   Internal   member   variables  
  private   string   _id;  
  private   string   _productName;  
  private   int   _line;  
  private   int   _quantity;  
  private   decimal   _price;  
   
   
  public   LineItemInfo(){}  
   
  ///   <summary>  
  ///   Constructor   with   specified   initial   values  
  ///   </summary>  
  ///   <param   name="id">Item   Id</param>  
  ///   <param   name="line">Line   number</param>  
  ///   <param   name="qty">Quanity   in   order</param>  
  ///   <param   name="price">Order   item   price</param>  
  public   LineItemInfo(string   id,   string   name,   int   line,   int   qty,   decimal   price){  
  this._id   =   id;  
  this._productName   =   name;  
  this._line   =   line;  
  this._price   =   price;  
  this._quantity   =   qty;  
  }  
   
  //   Properties  
  public   string   ItemId   {  
  get   {   return   _id;   }  
  set   {   _id   =   value;   }  
  }  
   
  public   string   Name   {  
  get   {   return   _productName;   }  
  set   {   _productName   =   value;   }  
  }  
   
  public   int   Line   {  
  get   {   return   _line;   }  
  set   {   _line   =   value;   }  
  }  
   
  public   int   Quantity   {  
  get   {   return   _quantity;   }  
  set   {   _quantity   =   value;   }  
  }  
   
  public   decimal   Price   {  
  get   {   return   _price;   }  
  set   {   _price   =   value;   }  
  }  
   
  public   decimal   SubTotal   {  
  get   {   return   _price   *   _quantity;   }  
  }  
  }  
   
  操作的时间,可以这么写  
  itemParms[0].Value   =   item.Line;  
  itemParms[1].Value   =   item.ItemId;  
  itemParms[2].Value   =   item.Quantity;  
  itemParms[3].Value   =   item.Price;  
  现在存在点问题,如果给某个字段赋空值如何处理,前台传过来的是一个LineItemInfo   变量,它的整型属性没法赋成null。  
 

NO.1   作者: lovelxj

这个涉及到预先定义空值的问题     以前有想过  
    就比如说整型   中   哪个为空   0,-1,   还是   NULL?     当然这个NULL好象是没有的  
   
    又或者是   时间类型中的哪个时间是空?   0001   01   01么?    
    这都是需要定义的

NO.2   作者: listhome

这个问题我很早就注意到了,上网找了一下,没有什么太好的解决方法,只能你有可能是Null值的时候提前判断!  
   
  这样代码就看起来很不爽!


 ·怎么没人回答呀...    »显示摘要«
    摘要: 关于try...except,原程序是这样的 for i := 1 to (n - 1) do begin try y[i] := lwl / scale * (unit1.form1.adoquery8.fieldbyname(fn).asfloat * sqrt(g * (lwl / scale))) /nyu; except else y[i] := 0; end; 因为nyu可能会......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE