??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品无码久久久久YW,亚洲精品蜜夜内射,国产AV无码专区亚洲AV手机麻豆http://www.tkk7.com/algz/Purple Butterfly Flying QQ?7101519 Flex,Ext,Spring,Hibernate,EOS,SpringSecurity,Struts http://algz.googlecode.com/svn/trunk/zh-cnThu, 27 Mar 2025 10:06:19 GMTThu, 27 Mar 2025 10:06:19 GMT60Java发送httph (get ?postҎh)http://www.tkk7.com/algz/articles/412732.html紫蝶∏飛揚↗紫蝶∏飛揚↗Mon, 21 Apr 2014 05:24:00 GMThttp://www.tkk7.com/algz/articles/412732.htmlhttp://www.tkk7.com/algz/comments/412732.htmlhttp://www.tkk7.com/algz/articles/412732.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/412732.htmlhttp://www.tkk7.com/algz/services/trackbacks/412732.html阅读全文

紫蝶∏飛揚↗ 2014-04-21 13:24 发表评论
]]>
反射生成W记http://www.tkk7.com/algz/articles/404420.html紫蝶∏飛揚↗紫蝶∏飛揚↗Wed, 25 Sep 2013 07:40:00 GMThttp://www.tkk7.com/algz/articles/404420.htmlhttp://www.tkk7.com/algz/comments/404420.htmlhttp://www.tkk7.com/algz/articles/404420.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/404420.htmlhttp://www.tkk7.com/algz/services/trackbacks/404420.html
//*********创徏实例***********
Type t = typeof(ClassTest);//表示cd声明Q类cd、接口类型、数l类型、值类型、枚丄型、类型参?..?/span>
object obj = Activator.CreateInstance(t);//通过反射创徏对象实例,如果是静态类则不d例化
//obj = ass.CreateInstance("ReflectionTest.ClassTest"); //cȝ全限定名.命名I间.cd
//*********创徏和调用方?**********
MethodInfo method = t.GetMethod("WriteString"); //搜烦h指定名称的公共方法?/span>
String s = (String)method.Invoke(obj, new Object[] { "123" });//反射cȝ对象实例,Ҏ参数 
//静态方?/span>         
method = type.GetMethod("StaticWriteString");
method.Invoke(nullnew string[] { "test" }); //如果是静态方?W?个参数则忽略,设ؓnull  
 
//无参的静态方?/span>
method = type.GetMethod("NoneParaWriteString");  
method.Invoke(nullnull);//无参则第2个参数设为null.
 
System.Diagnostics.Trace.WriteLine(s);//输出?调试--H口--xH口"
 
C#反射学习时几Ҏ意内容:
1Q指定类库文件必M用绝对\径,不能使用相对路径Q其实感觉有点不合理Q不太方便)
3Q第5行如果反的cM用的是静态方?则第1个参数须调ؓnull?/span>
4Q由于这个方法有两个参数Q可以用q种Object的方法指定参C可以直接写method.Invoke(obj, new Object[] { "test", 1 });
5Q调用的Ҏ是一个静态方法,q时候Invoke的时候,对于W一个参数是无视的,也就是我们写什么都不会被调用,即我们随便new了一个anyq样的ObjectQ当然这U写法是不推荐的。但是对应在例子1U我们如果Invoke的时候用了类型不一致的实例来做为参数的话,会D一个运行时的错误?/span>
6Q第三个例子是一个调用无参数静态方法的例子Q这时候两个参数我们都不需要指定,用null可以了?/span>
再说一个问题,如果调用的类是静态类的时候,需要注意一个问题,肯定我们会想C个问题,静态类是不能实例化的,q时候,31行的cȝ实例化的Ҏ我们׃需要了Q直接用Invoke可以实玎ͼ否则会出现q行时的错误Q同L道理Q第一个参数将会被无视Q只要我们传对了参数可以了?/span>


紫蝶∏飛揚↗ 2013-09-25 15:40 发表评论
]]>
JAVA语言___文g下蝲功能模板.http://www.tkk7.com/algz/articles/396077.html紫蝶∏飛揚↗紫蝶∏飛揚↗Tue, 05 Mar 2013 06:11:00 GMThttp://www.tkk7.com/algz/articles/396077.htmlhttp://www.tkk7.com/algz/comments/396077.htmlhttp://www.tkk7.com/algz/articles/396077.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/396077.htmlhttp://www.tkk7.com/algz/services/trackbacks/396077.htmlJS:
{
text : '下蝲导入模板',
iconCls : 'Import',
handler : function() {
window.location.href="../BuinessPlanDownloadServlet";
}
}
java:
package com.sysware.customize.hd.investment.productionMaterialsManagement.buinessPlan;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class BuinessPlanDownServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
this.doPost(request, response);
}
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String filePath = request.getSession().getServletContext().getRealPath("")+ File.separator+ "template.files"+ File.separator+ "buinessPlanDown" + File.separator + "buinessPlanTempl.xls";
response.reset();
response.setCharacterEncoding("UTF-8");
File file = new File(filePath);
if (!file.exists()) {
PrintWriter out = response.getWriter();
out.print("{failure:true}");
return;
}
response.setContentType("application/x-msdownload");
response.setHeader("Content-Disposition", "attachment;filename="+ new String(file.getName().getBytes("gb2312"), "iso8859-1"));
ServletOutputStream out = response.getOutputStream();
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(filePath));
BufferedOutputStream bos = new BufferedOutputStream(out);
byte[] buff = new byte[2048];
int bytesRead;
while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
bos.write(buff, 0, bytesRead);
}
if (bis != null) {
bis.close();
}
if (bos != null) {
bos.flush();
bos.close();
}
}
}


紫蝶∏飛揚↗ 2013-03-05 14:11 发表评论
]]>
[转]hibernate之生成的和默认的属性?使用generatedh实体)http://www.tkk7.com/algz/articles/395824.html紫蝶∏飛揚↗紫蝶∏飛揚↗Thu, 28 Feb 2013 01:55:00 GMThttp://www.tkk7.com/algz/articles/395824.htmlhttp://www.tkk7.com/algz/comments/395824.htmlhttp://www.tkk7.com/algz/articles/395824.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/395824.htmlhttp://www.tkk7.com/algz/services/trackbacks/395824.html阅读全文

紫蝶∏飛揚↗ 2013-02-28 09:55 发表评论
]]>
CENTOS 介和镜像下蝲http://www.tkk7.com/algz/articles/394336.html紫蝶∏飛揚↗紫蝶∏飛揚↗Thu, 17 Jan 2013 01:41:00 GMThttp://www.tkk7.com/algz/articles/394336.htmlhttp://www.tkk7.com/algz/comments/394336.htmlhttp://www.tkk7.com/algz/articles/394336.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/394336.htmlhttp://www.tkk7.com/algz/services/trackbacks/394336.html一、CENTOS下蝲各国镜像地址

http://www.centos.org/modules/tinycontent/index.php?id=32

二、中国大陆镜像部?/h2>

China CMCC Taian BranchQ泰安移动)

http://mirrors.ta139.com/centos/

China NetEaseQ?63|易Q?/p>

http://mirrors.163.com/centos/

China Northeastern University, Shenyang LiaoniQ东北大学)

http://mirror.neu.edu.cn/centos/

China Sohu Inc, Beijing P.R. ChinaQ搜狐CentOS镜像Q?/p>

http://mirrors.sohu.com/centos/

China Star Studio of UESTCQ电子科技大)

http://mirrors.stuhome.net/centos/

China University of Science and Tech of ChinaQ中U大Q?/p>

http://centos.ustc.edu.cn/centos/

此外Q还有香港、台湾CentOS镜像地址也很快,具体参见上文官方|页Q搜索Hong Kong或Taiwan?/p>

三、CentOS免费q是收费的?

参照?a style="color: rgb(16, 92, 182); text-decoration: underline;" target="_blank">CentOS 单介l,centos完全免费、redhat商业服务是要攉?/a>》一文说法:

“CentOS q不向用h供商业支持,当然也不负上M商业责Q?#8221;Q所以:

CentOS各版本系l都是免费下载和使用的,但是要获得支持或者某些定制YӞ也可能是需求,则要付费?/strong>

四、CentOS LiveCD、LiveDVD和BinDVD区别在哪里?

BinDVD?#8212;—是普通安装版Q需安装到计机盘才能用,bin一般都比较大,而且包含大量的常用YӞ安装时无需再在U下载(大部分情况)?/p>

LiveDVD?#8212;—是一个光盘CentOSpȝQ可通过光盘启动电脑Q启动出CentOSpȝQ也有图形界面,也有l端。也可以安装到计机Q但是有些内容可能还需要再ơ到|站下蝲Q自动)?/p>

LiveCD?#8212;—相比LiveDVD是个_的光盘CentOSpȝ。体U更,便于l护使用?/p>

此外Q还有个更Mini的CentOSpȝ版本Q上文中的CentOS-6.0-i386-minimal.iso是Q再下面的是|络安装版,你懂的,肯定隄?/p>

名词Q?/strong>

SRPMS——Source RPM

RPM——Red Hat Package Manager

更多参考:

官方主页: http://www.centos.org/

邮g列表: http://www.centos.org/modules/tinycontent/index.php?id=16

论坛: http://www.centos.org/modules/newbb/

文档: http://www.centos.org/docs/

Wiki: http://wiki.centos.org/

镜像列表: http://www.centos.org/modules/tinycontent/index.php?id=32



-------------------------------------------------------------------------------------------------------------

CentOSQCommunity ENTerprise Operating SystemQ是Linux发行版之一Q它是来自于Red Hat Enterprise Linux依照开放源代码规定释出的源代码所~译而成。由于出自同L源代码,因此有些要求高度E_性的
服务?/a>以CentOS替代商业版的Red Hat Enterprise Linux使用。两者的不同Q在于CentOSq不包含闭源代码Y件?/span>

概述
  CentOSQ我们有很多人叫它社Z业操作系l,不管你怎么叫它Q它都是linux的一个发行版本。CentOS是企业Linux发行版领头羊Red Hat Enterprise LinuxQ以下称之ؓRHELQ的再编译版本,RHEL是很多企业采用的linux发行版本Q需要向RedHat付费才可以用,q能得到付过费用的服务和技术支持和版本升。这个CentOS可以像REHL一L构筑linuxpȝ环境Q但不需要向RedHat付Q何的费用Q同样也得不CQ何有偿技术支持和升服务。典型的CentOS用户包括q样一些组l和个hQ他们ƈ不需要专门的商业支持p开展成功的业务。CentOS面向那些需要企业操作pȝE_性,但ƈ不想负担认证和支持方面开销的h?    
CentOS计划是在2003q红帽决定不再提供免费的技术支持及产品认证之后的部?U帽重徏?QRed Hat rebuildersQ之一?  CentOS和科学Linux QScientific LinuxQ、甲骨文LinuxQOracle LinuxQ、费cLinuxQFermi LinuxQ等都以U帽所发布的源代码去除商标重徏Red Hat Enterprise Linux的翻版,q修正了已经发现了的redhat的bug?  CentOS?Caos Linux"独立计划的一个分枝,在Lawrence Berkeley 国家实验室担ȝ理员与程序设计师的Kurtzer 表示。但后来Caos基金会最受欢q的计划变成是RHEL的重建?/span>

历史
  Red Hat公司的品中Q有RedHat LinuxQ如Redhat8,9Q和针对企业发行的版本Red Hat Enterprise LinuxQ都能够通过|络FTP免费的获得ƈ使用Q但是在2003q的时候,redhat com发布redhat 9(写ؓrh9)后,不再开发redhat 10Q?1……Q全面{向redhat enterprise linux(写ؓrhel)的开发,和以往不同的是Q新的rhel 3要求用户先购买lisenceQredhat com承诺保证产品的稳定性,安全性。rhel 3二进制代码不再提供下载,而是作ؓredhat 服务的一部分Q但源代码依然是open。它的项目由Fedora Projectq个目所取代Qƈ以Fedora Coreq个名字发行q提供普通用户免费用(自Fedora 7开始去?Core"Q。Fedora Coreq个Linux发行版更新很快,大约半年左右有新的版本出来Q目前的版本是Fedora 15Q这个Fedora试验的韵x较浓厚,每次发行都有新的功能被加入到其中Q得到的成功l果被采用到RHEL的发布中。虽说这P频繁的被改进更新的不安定产品对于企业来说q不是最好的选择Q大多数企业q是会选择有偿的RHEL产品?  在构成RHEL的大多数软g包中Q都是基于GPL协议发布的,也就是我们常说的开源YӞ正因为是q样QRed Hat公司也遵循这个协议,构成RHEL的Y件包公开发布Q只要是遵@GPL协议QQ何h都可以在原有的Y件构成的基础上再开发和发布。CentOS是q样在RHEL发布的基上将RHEL的构成克隆再现的一个Linux发行版本。RHEL的克隆版本不只CentOS一个,q有Oracle LinuxQScientific LinuxQFermi Linux{。。但q不保障对应RHEL的Y件在CentOS上面能也?00%的正常工作。ƈ且安全漏z的修正和Y件包的升U对应RHEL的有偿服务和技术支持来_数日数星期数个月的gq情况也有?/span>

]]>
JS 创徏c?--混合的构造函?原型方式http://www.tkk7.com/algz/articles/384711.html紫蝶∏飛揚↗紫蝶∏飛揚↗Fri, 03 Aug 2012 08:50:00 GMThttp://www.tkk7.com/algz/articles/384711.htmlhttp://www.tkk7.com/algz/comments/384711.htmlhttp://www.tkk7.com/algz/articles/384711.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/384711.htmlhttp://www.tkk7.com/algz/services/trackbacks/384711.htmlJS 创徏c?--混合的构造函?原型方式
prototype:原型.此对象的所有实例共享原型定义的数据?对象)引用.一般用于防止重复创建函?费内存.
原型中定义的所有函数和引用的对象都只创Z?构造函C的方法则会随着实例的创建重复创?如果有对象或Ҏ的话).
不管在原型中q是构造函C,属??都不׃n.
创徏cȝ最好方式是用构造函数定义属性,用原型定义方法?/div>
q种方式同样适用于承机Ӟ用对象冒充承构造函数的属性,用原型链l承 prototype 对象的方法?/div>
//构造函?/div>
function Car(sColor,iDoors,iMpg) {
  this.color = sColor; //定义属?/div>
  this.doors = iDoors; //定义属?/div>
  this.mpg = iMpg;     //定义属?/div>
  this.drivers = new Array("Mike","John");//定义数组对象.每个实例创徏一个单独的对象
}
//公共Ҏ(׃n),属性不׃n.
Car.prototype={
  value:1,                        //属性不׃n
  objs:new Array("A","B"),        //对象׃n引用
  showColor : function() {        //Ҏ׃n引用.
    alert(this.color);
  }
};
var oCar1 = new Car("red",4,23);
var oCar2 = new Car("blue",3,25);
oCar1.drivers.push("Bill");       //构造方法中的对象都是各个独立的.
oCar1.value=2;                     //属性不׃n.
oCar1.objs.push('C');             //原型中的对象都是׃n引用?
document.write(oCar1.drivers + "<br/>" );
  //Mike1,John,Bill
oCar1.showColor();                         //red
document.write(oCar2.objs + "<br/>" );
     //A,B          oCar1:A,B,C
document.write( "<br/>" +oCar2.value);     //1
document.write( "<br/>" +oCar2.drivers);   //Mike1,John


]]>MyEclipse 布v相同分支的项目时Q报?Exploded location overlaps an existing deployment解决办法.http://www.tkk7.com/algz/articles/380860.html紫蝶∏飛揚↗紫蝶∏飛揚↗Fri, 15 Jun 2012 06:29:00 GMThttp://www.tkk7.com/algz/articles/380860.htmlhttp://www.tkk7.com/algz/comments/380860.htmlhttp://www.tkk7.com/algz/articles/380860.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/380860.htmlhttp://www.tkk7.com/algz/services/trackbacks/380860.html右键目->properties->MyEclipse->Web->Web Context-root的名字ؓ重命名之后的名字卛_?/span>

]]>
Django1.4 报错QError: No module named mysite 解决Ҏhttp://www.tkk7.com/algz/articles/380007.html紫蝶∏飛揚↗紫蝶∏飛揚↗Tue, 05 Jun 2012 03:30:00 GMThttp://www.tkk7.com/algz/articles/380007.htmlhttp://www.tkk7.com/algz/comments/380007.htmlhttp://www.tkk7.com/algz/articles/380007.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/380007.htmlhttp://www.tkk7.com/algz/services/trackbacks/380007.html开发环境:Python2.7+Django1.4+PyCharm
使用 PyCharm 开?nbsp;Django Ӟ在settings.py的INSTALLED_APPS中只需要添加app名就可以了,?'mysite',
如果输入"django_example.mysite",则报错:

Error: No module named mysite




]]>
[转]UMLcdW号 各种关系说明以及举例http://www.tkk7.com/algz/articles/378313.html紫蝶∏飛揚↗紫蝶∏飛揚↗Wed, 16 May 2012 07:49:00 GMThttp://www.tkk7.com/algz/articles/378313.htmlhttp://www.tkk7.com/algz/comments/378313.htmlhttp://www.tkk7.com/algz/articles/378313.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/378313.htmlhttp://www.tkk7.com/algz/services/trackbacks/378313.htmlUML中描q对象和cM间相互关pȝ方式包括Q依赖(DependencyQ,兌QAssociationQ,聚合QAggregationQ,l合QCompositionQ,泛化QGeneralizationQ,实现QRealizationQ等?/p>

依赖 QDependencyQ:元素A的变化会影响元素BQ但反之不成立,那么B和A的关pL依赖关系QB依赖AQ类属关pd实现关系在语义上讲也是依赖关 p,但由于其有更Ҏ的用途,所以被单独描述。uml中用带箭头的虚线表示Dependency关系Q箭头指向被依赖元素?/p>

泛化QGeneralizationQ:通常所说的l承Q特D个?is kind of 一般个体)关系Q不必多解释了。uml中用带空心箭头的实线U表CGeneralization关系Q箭头指向一般个体?/p>

实现QRealizeQ:元素A定义一个约定,元素B实现q个U定Q则B和A的关pLRealizeQB realize A。这个关pL常用于接口。uml中用I心I心头和虚U表CRealize关系Q箭头指向定义约定的元素?/p>

兌QAssociationQ:元素间的l构化关p,是一U弱关系Q被兌的元素间通常可以被独立的考虑。uml中用实线表示Association关系Q箭头指向被依赖元素?/p>

聚合QAggregationQ:兌关系的一U特例,表示部分和整体(整体 has a 部分Q的关系。uml中用带空心菱形头的实U表CAggregation关系Q菱形头指向整体?/p>

l?合(CompositionQ:l合是聚合关pȝ变种Q表C元素间更强的组合关pR如果是l合关系Q如果整体被破坏则个体一定会被破坏,而聚合的个体则可 能是被多个整体所׃n的,不一定会随着某个整体的破坏而被破坏。uml中用带实心菱形头的实U表CComposition关系Q菱形头指向整体?/p>

其中依赖QDependencyQ的关系最弱,而关联(AssociationQ,聚合QAggregationQ,l合QCompositionQ表C的关系依次增强。换a之关联,聚合Q组合都是依赖关pȝ一U,聚合是表明对象之间的整体与部分关pȝ兌Q而组合是表明整体与部分之间有相同生命周期关系的聚合?/p>

而关联与依赖的关pȝ一句话概括下来是Q依赖描qC对象之间的调用关p,而关联描qC对象之间的结构关pR?/p>

后面的例子将针对某个具体目的来独立地展示各种关系。虽然语法无误,但这些例子可q一步精|在它们的有效范围内包括更多的语义?br />

依赖QDependencyQ?br />

实体之间一?#8220;使用”关系暗示一个实体的规范发生变化后,可能影响依赖于它的其他实例(图DQ?更具体地_它可转换为对不在实例作用域内的一个类或对象的Mcd的引用。其中包括一个局部变量,寚w过Ҏ调用而获得的一个对象的引用Q如下例所 C)Q或者对一个类的静态方法的引用Q同时不存在那个cȝ一个实例)。也可利?#8220;依赖”来表C包和包之间的关pR由于包中含有类Q所以你可根据那些包中的 各个cM间的关系Q表C出包和包的关系?/p>

图D


兌QAssociationQ?br />

实体之间的一个结构化关系表明对象是相互连接的。箭头是可选的Q它用于指定D能力。如果没有箭_暗示是一U双向的D能力。在Java中,兌Q?strong>图EQ?转换Z个实例作用域的变量,像图E?#8220;Java”区域所展示的代码那栗可Z个关联附加其他修饰符。多重性(MultiplicityQ修饰符暗示 着实例之间的关pR在C代码中,Employee可以?个或更多的TimeCard对象。但是,每个TimeCard只从属于单独一?Employee?/p>

图E

聚合QAggregationQ?br />

聚合Q?strong>图FQ是兌的一UŞ式,代表两个cM间的整体/局部关pR聚合暗C着整体在概念上处于比局部更高的一个别,而关联暗CZ个类在概念上位于相同的别。聚合也转换成Java中的一个实例作用域变量?br />
兌和聚合的区别Ua是概念上的,而且严格反映在语义上。聚合还暗示着实例图中不存在回路。换a之,只能是一U单向关pR?/p>

图F



合成QCompositionQ?br />

合成 Q?strong>图GQ?是聚合的一U特DŞ式,暗示“局?#8221;?#8220;整体”内部的生存期职责。合成也是非׃n的。所以,虽然局部不一定要随整体的销毁而被销毁,但整体要么负责保持局 部的存活状态,要么负责其销毁。局部不可与其他整体׃n。但是,整体可将所有权转交l另一个对象,后者随卛_承担生存期职责?/p>

Employee和TimeCard的关pL许更适合表示?#8220;合成”Q而不是表C成“兌”?/p>

图G

泛化QGeneralizationQ?br />

泛化Q?strong>图HQ表CZ个更泛化的元素和一个更具体的元素之间的关系。泛化是用于对承进行徏模的UML元素。在Java中,?em>extends关键字来直接表示q种关系?/p>

图H


实现QRealizationQ?br />

实例Q?strong>图IQ关pL定两个实体之间的一个合同。换a之,一个实体定义一个合同,而另一个实体保证行该合同。对Java应用E序q行建模Ӟ实现关系可直接用implements关键字来表示?/p>

图I




转自:http://blog.csdn.net/kingofbirdzjy/article/details/1967871 



]]>L?02.130.82.97子网屏蔽码ؓ255.255.192.0Q它所处的|络Z?/title><link>http://www.tkk7.com/algz/articles/378170.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Tue, 15 May 2012 03:42:00 GMT</pubDate><guid>http://www.tkk7.com/algz/articles/378170.html</guid><wfw:comment>http://www.tkk7.com/algz/comments/378170.html</wfw:comment><comments>http://www.tkk7.com/algz/articles/378170.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/algz/comments/commentRss/378170.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/algz/services/trackbacks/378170.html</trackback:ping><description><![CDATA[<pre mb10"="" id="content-525389197" style="margin-top: 0px; margin-bottom: 10px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; white-space: pre-wrap; word-wrap: break-word; zoom: 1; line-height: 24px; background-color: #ffffff; "> (1)先了解基q算 <pre mb10"="" id="content-525389197" style="margin-top: 0px; margin-bottom: 10px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; white-space: pre-wrap; word-wrap: break-word; zoom: 1; ">异或q算Q相同ؓ0Q不同ؓ1 与运:两者ؓ1时ؓ1Q有0? 或运:?? <br /> <br />(2)IP|段的计和划分 <br /> IP和子|掩? 我们都知道,IP是由四段数字l成Q在此,我们先来了解一?cd用的IP <br /> AcIPD? 0.0.0.0 ?27.255.255.255 <br /> BcIPD? 128.0.0.0 ?91.255.255.255 <br /> CcIPD? 192.0.0.0 ?23.255.255.255 <br /><br /> XP默认分配的子|掩码每D只?55? <br />Acȝ默认子网掩码 255.0.0.0 一个子|最多可以容U?677万多台电? <br />Bcȝ默认子网掩码 255.255.0.0 一个子|最多可以容U?万台电脑 <br />Ccȝ默认子网掩码 255.255.255.0 一个子|最多可以容U?54台电? <br /> 我以前认为,要想把一些电脑搞在同一|段Q只要IP的前三段一样就可以了,今天Q我才知道我错了。如果照我这说的话,一个子|就只能容纳254台电脑?真是有点W话。我们来说详l看看吧? <br /><br /> 要想在同一|段Q只要网l标识相同就可以了,那要怎么看网l标识呢Q首先要做的是把每段的IP转换Zq制。(有h_我不会{换Ӟ没关p,我们用Windows自带计算器就行。打开计算器,Ҏ?gt;U学型,输入十进制的数字Q再点一?#8220;二进?#8221;q个单选点Q就可以切换至二q制了。) <br /> 把子|掩码切换至二进Ӟ我们会发玎ͼ所有的子网掩码是由一串连l的1和一串连l的0l成的(一?D,每段8位,一?2位数Q? <br /> 255.0.0.0 11111111.00000000.00000000.00000000 <br /> 255.255.0.0 11111111.11111111.00000000.00000000 <br /> 255.255.255.0 11111111.11111111.11111111.00000000 <br /> q是A/B/C三类默认子网掩码的二q制形式Q其实,q有好多U子|掩码,只要是一串连l的1和一串连l的0可以了Q每D都?位)。如11111111.11111111.11111000.00000000Q这也是一D合法的子网掩码。子|掩码决定的是一个子|的计算机数目,计算机公式是2的mơ方Q其中,我们可以把m看到是后面的多少?。如255.255.255.0转换成二q制Q那是11111111.11111111.11111111.00000000Q后面有8?Q那m是8Q?55.255.255.0q个子网掩码可以容纳2?ơ方Q台Q电脑,也就?56収ͼ但是有两个IP是不能用的,那就是最后一D不能ؓ0?55Q减去这两台Q就?54台。我们再来做一个? <br /> 255.255.248.0q个子网掩码可以最多容U_台电脑Q? 计算ҎQ? 把将其{换ؓ二进制的四段数字Q每D要?位,如果?Q可以写??Q也是00000000Q? 11111111.1111111.11111000.00000000 然后Q数数后面有几颗0Q一共是?1颗,那就??1ơ方Q等?048Q这个子|掩码最多可以容U?048台电脑? <br /> 一个子|最多可以容U_台电脑你会了吧,下面我们来个逆向法的题? 一个公司有530台电脑,l成一个对{局域网Q子|掩码设多少最合适? 首先Q无疑,530台电脑用BcIP最合适(AcM用说了,太多QCcd不够Q肯定是Bc)Q但是Bc默认的子网掩码?55.255.0.0Q可以容U?万台电脑Q显然不太合适,那子|掩码设多少合适呢Q我们先来列个公式? 2的mơ方Q?60 首先Q我们确?一定是大于8ơ方的,因ؓ我们知道2?ơ方?56Q也是CcIP的最大容U电脑的数目Q我们从9ơ方一个一个试2?ơ方?12Q不?60Q??0ơ方?024Q看??0ơ方最合适了。子|掩码一q32位组成,已确定后?0位是0了,那前面的22位就?Q最合适的子网掩码是Q?1111111.11111111.11111100.00000000Q{换成10q制Q那是255.255.252.0? 分配和计子|掩码你会了吧,下面Q我们来看看IP地址的网Dc? 怿好多人都和偶一P认ؓIP只要前三D늛同,是在同一|段了,其实Q不是这LQ同P我样把IP的每一D{换ؓ一个二q制敎ͼq里拿IPQ?92.168.0.1Q子|掩码:255.255.255.0做实验吧? 192.168.0.1 11000000.10101000.00000000.00000001 Q这里说明一下,和子|掩码一P每段8位,不8位的Q前面加0补齐。) IP 11000000.10101000.00000000.00000001 子网掩码 11111111.11111111.11111111.00000000 在这里,向大家说一下到底怎么h同一|段? 要想在同一|段Q必需做到|络标识相同Q那|络标识怎么呢Q各cIP的网l标识算法都 是不一L。AcȝQ只第一DcBc,只算W一、二DcCc,第一、二、三Dc? 法只要把IP和子|掩码的每位数AND可以了? <br /> ANDҎQ??Q? 0?Q? 1?Q? 如:And 192.168.0.1Q?55.255.255.0Q先转换Zq制Q然后AND每一? IP 11000000.10101000.00000000.00000001 子网掩码 11111111.11111111.11111111.00000000 得出ANDl果 11000000.10101000.00000000.00000000 转换为十q制192.168.0.0Q这是|络标识Q? 再将子网掩码反取Q也是00000000.00000000.00000000.11111111Q与IP AND 得出l果00000000.00000000.00000000.00000001Q{换ؓ10q制Q即0.0.0.1Q? q?.0.0.1是L标识。要惛_同一|段Q必需做到|络标识一栗? 我们再来看看q个改ؓ默认子网掩码的BcIP 如IPQ?88.188.0.111Q?88.188.5.222Q子|掩码都设ؓ255.255.254.0Q在同一|段吗? 先将q些转换成二q制 188.188.0.111 10111100.10111100.00000000.01101111 188.188.5.222 10111100.10111100.00000101.11011010 255.255.254.0 11111111.11111111.11111110.00000000 分别ANDQ得 10111100.10111100.00000000.00000000 10111100.10111100.00000100.00000000 |络标识不一P即不在同一|段? 判断是不是在同一|段Q你会了吧,下面Q我们来点实际的? 一个公司有530台电脑,l成一个对{局域网Q子|掩码和IP讑֤最合适? 子网掩码不说了,前面出l果来了11111111.11111111.11111100.00000000Q也是255.255.252.0 我们现在要确定的是IP如何分配Q首先,选一个BcIPD,q里?88.188.x.x? q样QIP的前两段定的,关键是要定W三D,只要|络标识相同可以了。我们先来确定网l号。(我们把子|掩码中?和IP中的?对就hQ??对应hQ如下:Q? <br />255.255.252.0 11111111.11111111.11111100.00000000 <br />188.188.x.x 10111100.10111100.??????**.******** <br />|络标识 10111100.10111100.??????00.00000000 由此可知Q?处随便填Q只能用0?填,不一定全??Q,我们q全填0吧,*处随便,q样呢,我们的IP是 10111100.10111100.000000**.********Q一共有530台电脑,IP的最后一D??54可以分给254台计机Q?30/254Q?.086Q采用进1法,得整?Q这P我们定了IP的第三段要分成三个不同的数字Q也是_?00000**中的**填三ơ数字,只能??Q而且每次的数字都不一P至于填什么,随我们便了Q如00000001Q?0000010Q?0000011Q{换成二进Ӟ分别?Q?Q?Q这PW三D也定了,q样Q就可以把IP分成188.188.1.yQ?88.188.2.yQ?88.188.3.yQy处随便填Q只要在1?54范围之内Qƈ且这530台电脑每台和每台的IP不一P可以了?</pre> </pre><img src ="http://www.tkk7.com/algz/aggbug/378170.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/algz/" target="_blank">紫蝶∏飛揚↗</a> 2012-05-15 11:42 <a href="http://www.tkk7.com/algz/articles/378170.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Extjs.tree.treePanel 自动查找nodehttp://www.tkk7.com/algz/articles/376965.html紫蝶∏飛揚↗紫蝶∏飛揚↗Sat, 28 Apr 2012 06:36:00 GMThttp://www.tkk7.com/algz/articles/376965.htmlhttp://www.tkk7.com/algz/comments/376965.htmlhttp://www.tkk7.com/algz/articles/376965.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/376965.htmlhttp://www.tkk7.com/algz/services/trackbacks/376965.htmlvar node_id= Ext.getCmp('partId').getValue() 
(1)快速定?Ҏnode.id
注: EXT 树的节点如果不展开,数据是获取不到的( getNodeById() 报异?Q即使你load了数据不展开节点前,一栯取不到?/span>
    var node=treepanel.getNodeById(node_id);
    // treepanel.expandPath(node.getPath())
    treepanel.getSelectionModel().select(node)
    node.fireEvent('click',node)
(2)递归查找,一层一层联查?br />? 虽然能解?1)中取不到数据的问?但访问速度?而且U联查找时会层层扩展开.
  treepanel.getRootNode().cascade(function(n) {
if (!n.isLeaf() && !n.isLoaded()) {
n.reload();
return true;
}
if (n.attributes['id'] == Ext.getCmp('partId').getValue()) {
node = n;
treepanel.getSelectionModel().select(node)
node.fireEvent('click', node)
return false;
}
return true;
  });


]]>Myeclipse7.0和Myeclipse8.5 安装插g(采用link方式)http://www.tkk7.com/algz/articles/372071.html紫蝶∏飛揚↗紫蝶∏飛揚↗Fri, 16 Mar 2012 13:03:00 GMThttp://www.tkk7.com/algz/articles/372071.htmlhttp://www.tkk7.com/algz/comments/372071.htmlhttp://www.tkk7.com/algz/articles/372071.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/372071.htmlhttp://www.tkk7.com/algz/services/trackbacks/372071.html1.下蝲所需的插件包
2.link方式d插g
?
在D:\Program Files\MyEclipse 6.6\eclipse\links日录?新徏XXX.link文g.
内容? path = D:/Program Files/MyEclipse 6.6/myeclipse_plugins(自定义文件夹)/STP(插g?
?必须讄路径?\\?span style="color: #99cc00; ">/.


Myeclipse 安装所有插件有两种方式Q一U可以直接放?安装路径下\eclipse\plugins中。但q种安装方式在重?Myeclipse时插件还得重新装?nbsp; 
另外一U是利用link文g链接安装Q?nbsp; 
1.插件包解压Q放?攑ֈ某\径下 \eclipse\plugins 文g夹中Q如果解压之后含有plugins文g夹则直接攑ֈeclipse文g夹下QM要保证含有\eclipse\plugins 形式的\径)。由于这某\径是用来存放所有插件的Q所以推荐规范一些,比如我的D:\plugin\axis_plugin\eclipse\pluginsQplugin表示q是插g文g夹,axis_plugin表示q是axis插g。axis那两个插件就攑֜\eclipse\plugins下。)Q如果有其他插g可在D:\plugin下依照规则徏立其他文件夹?nbsp; 
2.在MyEclipse 安装路径下的\eclipse\links文gҎ件夹中(如我的在D:\Program Files\MyEclipse 6.5\eclipse\linksQ,建立 XXX.link文gQ如Axis2_plugin.link。用C本打开在里面编辑第一步的 “某\?#8221;Q在\eclipse之前Q\径中要用“\\”Q原因是\要进行符可{换,和程序中遇到的一PQ如我的路径配置 path=D:\\plugin\\axis_plugin Q这L序就会自己找该\径下 \eclipse\plugins 中的插gQ?nbsp; 
3删除 MyEclipse 路径下\eclipse\configuration中的org.eclipse.update文g夏V?nbsp; 
4启动MyEclipse 选择“File->New->Other”可以看到如下界面  
 
表示插gd成功。其他插件也可用cM的方法找到图标,比如svn插g可以?工具栏window->show view ->other中找到图标?nbsp; 
你成功

?Myeclipse8.5
在MyEclipse的dropins目录下新Z个svn.link(ps:q里什么文件名和后~名都没关p?,

里面内容是path=插g的\径,其他cMMyeclipse7.5



]]>
javascript中的IZQfalse,? 比较q算关系http://www.tkk7.com/algz/articles/371885.html紫蝶∏飛揚↗紫蝶∏飛揚↗Wed, 14 Mar 2012 13:30:00 GMThttp://www.tkk7.com/algz/articles/371885.htmlhttp://www.tkk7.com/algz/comments/371885.htmlhttp://www.tkk7.com/algz/articles/371885.html#Feedback1http://www.tkk7.com/algz/comments/commentRss/371885.htmlhttp://www.tkk7.com/algz/services/trackbacks/371885.htmljavascript中的 IZQfalse,?
包含了一个运的规则Q相{运符判断Ӟ
其中一个是trueQ先转换?(false则{换ؓ0)再做比较?nbsp;
"" == falseQ现false转化?Q即Q判?" == 0?/div>
IZ转换成数?Q?==0Q所?nbsp;
alert("" == false)昄的是true?nbsp;


]]>软g设计师重炚w?--原码,反码,补码,Uȝ计算方式http://www.tkk7.com/algz/articles/371231.html紫蝶∏飛揚↗紫蝶∏飛揚↗Sun, 04 Mar 2012 14:55:00 GMThttp://www.tkk7.com/algz/articles/371231.htmlhttp://www.tkk7.com/algz/comments/371231.htmlhttp://www.tkk7.com/algz/articles/371231.html#Feedback1http://www.tkk7.com/algz/comments/commentRss/371231.htmlhttp://www.tkk7.com/algz/services/trackbacks/371231.html(1)正数

原码和反码,补码都是一LQ都是正数本w?/span>


(2)负数

原码是符号位?,数值部分取Xl对值的二进制?/span>
反码是符号位?,其它位是原码取反?/span>
补码是符号位?,其它位是原码取反Q未位加1?/span>也就是说Q负数的补码是其反码未位??/span>

正负0都ؓ0 000.

(3) Uȝ

是符号位取反的补?无论正数和负?0除外,0的补码和Uȝ相同.

也可以理解成:不算W号位外,最高数据位的进?最高数据位?,W号位ؓ0;?,W号位ؓ1.

?

原码 反码 补码 Uȝ

+0 0 000 0 000 0 000 1 000

-0 1 000 1 111 0 000 0 000

1011 原码Q?1011 反码Q?1011 //正数Ӟ反码Q原?补码Q?1011 //正数Ӟ补码Q原?UȝQ?1011 //原数+10000 Q?011 原码Q?1011 反码Q?0100 //负数Ӟ反码为原码取?补码Q?0101 //负数Ӟ补码为原码取反+1 UȝQ?0101 //原数+10000 0Q?101 原码Q?.1101 反码Q?.1101 //正数Ӟ反码Q原?补码Q?.1101 //正数Ӟ补码Q原?UȝQ?.1101 //原数+1 Q?Q?101 原码Q?.1101 反码Q?.0010 //负数Ӟ反码为原码取?补码Q?.0011 //负数Ӟ补码为原码取反+1 UȝQ?.0010 //原数+1



]]>
软g设计师重炚w?--盘格式化容?非格式化定w,数据传输率计?/title><link>http://www.tkk7.com/algz/articles/371179.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Sat, 03 Mar 2012 13:22:00 GMT</pubDate><guid>http://www.tkk7.com/algz/articles/371179.html</guid><wfw:comment>http://www.tkk7.com/algz/comments/371179.html</wfw:comment><comments>http://www.tkk7.com/algz/articles/371179.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/algz/comments/commentRss/371179.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/algz/services/trackbacks/371179.html</trackback:ping><description><![CDATA[<p> </p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">非格式化定w   =   位密?#215;内圆周长×每面道?#215;记录面数 </span><br style="font-family: simsun; line-height: 23px; text-align: left; " /><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">      格式化容?  =   扇区大小×每磁道扇区数×每面道?#215;记录面数 </span><br style="font-family: simsun; line-height: 23px; text-align: left; " /><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">      数据传输?  =   扇区大小×每磁道扇区数×转?  </span> <br /></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; ">计算定w?单位应统一.CM换成MM;MB换成KB; 位{换成字节=除以8.<br /></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; ">(1)单记录面道?道密度<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(盘面外半?盘面内半?</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(2)非格式化定w=</span> 记录<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">位密?/span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">内圆周长</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">单记录面道?/span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">记录面数</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">ȝ道数= </span> <span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">单记录面道?/span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">记录面数</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; ">内圆周长=3.14*内圆直径=<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 26px; white-space: pre-wrap; ">2</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><a target="_blank" style="color: #005599; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; line-height: 26px; white-space: pre-wrap; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #005599; ">圆周?/a><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 26px; white-space: pre-wrap; ">半径 = 圆周?/span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 26px; white-space: pre-wrap; ">直径</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(3)格式化容?记录面数</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">单记录面道?/span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">每个道扇区?/span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">扇区字节?/span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(4)一个磁道存储的字节?盘扇区?/span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">扇区字节</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(5)数据传输?</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">每磁道扇区数×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">扇区大小×</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">转?/span> </p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(6)q_{待旉=盘转速时间的一?/span><br /><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">q_存取旉是反应磁盘数据操作速度的指标,单位是毫U(msQ,他包?个时间段Q^均寻道时_q_定位旉Q{动gq,其中后面两个l称为等待时间?/span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; "> </p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; "><font size="4"><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 19px; color: #ff0000; "><font color="#000000" face="Arial">举例Q?br />假设一个有3个盘片的盘Q共?个记录面Q{速ؓ7200/分钟Q盘面有效记录区域的外直径ؓ30CMQ内直径?0CMQ记录位密度?50?MMQ磁道密度ؓ8?mmQ每个磁道分16扇区Q每扇区512字节?/font></span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 19px; color: #ff0000; "></span><br /></font>ȝ道数QCt=盘面数*(外直?内直?/2*道密度=4*(30-10)*10/2*8=3200<br />非格式化定wQCuf=ȝ道数*内径道周长*位密?3200*(3.14*10*10)*(250/8)字节=29.95M<br />格式化容量:Cf=ȝ道数×每扇区数×每扇区字节数=4*=25M<br />q_数据传输速率QCgQ每道扇区?6×每扇区字节数512KB×转?7200/60S)=983040=960KB/S</p> <p> </p><img src ="http://www.tkk7.com/algz/aggbug/371179.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/algz/" target="_blank">紫蝶∏飛揚↗</a> 2012-03-03 21:22 <a href="http://www.tkk7.com/algz/articles/371179.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>软g设计师重炚w点——系l可靠性计?/title><link>http://www.tkk7.com/algz/articles/371157.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Fri, 02 Mar 2012 15:02:00 GMT</pubDate><guid>http://www.tkk7.com/algz/articles/371157.html</guid><wfw:comment>http://www.tkk7.com/algz/comments/371157.html</wfw:comment><comments>http://www.tkk7.com/algz/articles/371157.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/algz/comments/commentRss/371157.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/algz/services/trackbacks/371157.html</trackback:ping><description><![CDATA[<p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><strong>软g设计师重炚w?#8212;—pȝ可靠性计?/strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  pȝ可靠性计是软g设计师考试的一个重点,q些q几乎每ơ考试都会考到Q但q个知识点的隑ֺ不高Q了解基本的q算公式Q即可轻村ֺ寏V?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  可靠性计主要涉及三U系l,即串联系l、ƈ联系l和冗余pȝQ其中串联系l和q联pȝ的可靠性计都非常单,只要了解其概念,公式很容易记住。冗余系l要复杂一些。在实际的考试当中Q考得最多的是串ƈ混合pȝ的可靠性计。所以要求我们对串联pȝ与ƈ联系l的特点有基本的了解Q对其计公式能理解、运用。下面将对这些计的原理及公式进行详l的说明?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  <strong>串联pȝ</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  假设一个系l由n个子pȝl成Q当且仅当所有的子系l都能正常工作时Q系l才能正常工作,q种pȝUCؓ串联pȝQ如?所C。 </p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/1.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  讄l各个子pȝ的可靠性分别用R<sub>1</sub>QR<sub>2</sub>Q?#8230;…QR<sub>n</sub>表示Q则pȝ的可靠性R=R<sub>1</sub>×R<sub>2</sub>×…×R<sub>n</sub> ?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  如果pȝ的各个子pȝ的失效率分别?#955;<sub>1</sub>Q?#955;<sub>2</sub>Q?#8230;…Q?#955;<sub>n</sub>来表C,则系l的失效?#955;=λ<sub>1</sub>×λ<sub>2</sub>×…×λ<sub>n</sub> ?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  <strong>q联pȝ</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  假如一个系l由n个子pȝl成Q只要有一个子pȝ能够正常工作Q系l就能正常工作,如图2所C?/p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/2.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  讄l各个子pȝ的可靠性分别用R<sub>1</sub>QR<sub>2</sub>Q?#8230;…QR<sub>n</sub>表示Q则pȝ的可靠性R=1Q(1QR<sub>1</sub>Q?#215;Q?QR<sub>2</sub>Q?#215;…×Q?QR<sub>n</sub>Q??/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  假如所有子pȝ的失效率均ؓλQ则pȝ的失效率?#956;Q?/p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/3.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  在ƈ联系l中只有一个子pȝ是真正需要的Q其余n-1个子pȝ都被UCؓ冗余子系l。该pȝ随着冗余子系l数量的增加Q其q_无故障时间也会增加?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  <strong>串ƈ混合pȝ</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  串ƈ混合pȝ实际上就是对串联pȝ与ƈ联系l的l合应用。我们在此以实例说明串ƈ混合pȝ的可靠性如何计?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  ?Q?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  某大型Y件系l按功能可划分ؓ2DP1和P2。ؓ提高pȝ可靠性,软g应用单位设计了如下图l出的Y件冗余容错结构,其中P1和P2均有一个与其完全相同的冗余备䆾。若P1的可靠度?.9QP2的可靠度?.9Q则整个pȝ的可靠度??/p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/04.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><span style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  供选择的答?/span><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  A. 0.6561</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  B. 0.81</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  C. 0.9801</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  D. 0.9</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  试题分析</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  当系l采用串联方式时Q其可靠度R可由公式R=R1R2…Rn求得。当pȝ采用q联方式Ӟ其可靠度R可由公式R=1-Q?-R1Q?(1-R2)…(1-Rn)求得。这个系lȝ来说是串?但分成两个ƈ联部分。第一部分的可靠度为:R1=1-(1-0.9)*(1-0.9)=0.99Q第二部分的可靠度也为:R2=0.99Q所以整个系l的可靠度ؓQR=R1*R2=0.9801 QC{案?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  试题{案</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  C</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  上面的例题是属于常规形式的可靠性计题Q如果把q种试题再拨高一个层ơ,可以?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  ?Q?/p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  1台服务器?台客h?台打印机构成了一个局域网Q如?所C)。在该系l中Q服务器Ҏ某台客户机的hQ数据在一台打印机上输出。设服务器、各客户机及各打印机的可靠度分别为a、b、cQ则该系l的可靠度ؓ ?/p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/05.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  AQab3c3</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  BQa(1-b3)(1-c2)</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  CQa(1-b)3(l-c)2</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  DQa(1-(1-b)3)(1-(l-c)2)</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  <strong>例题分析</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  在试题给出的pȝ中,客户Z间是q联的(M一台客h出现故障Q对其他客户机没有媄响)Q同理,打印Z间是也ƈ联关pR然后,客户机、服务器、打印机之间再组成一个串联关pR因此,我们可以把该pȝ化ؓQ?/p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/6.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  已知服务器、各客户机及各打印机的可用性分别ؓa、b、cQ因此整个系l的可用性ؓQR=Q?-Q?-bQ?sup>3</sup>QaQ?-Q?-cQ?sup>2</sup>Q?aQ?-Q?-bQ?sup>3</sup>Q(1-Q?-cQ?sup>2</sup>Q?br /> <br />  例题{案D</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  <strong>4Q模冗余pȝ</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  m模冗余系l由m个(m=2n+1为奇敎ͼ相同的子pȝ和一个表军_l成Q经q表军_表决后,m个子pȝ中占多数相同l果的输出可作ؓpȝ的输出,如图5所C?/p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/7.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><span style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">  在m个子pȝ中,只有n+1个或n+1个以上的子系l能正常工作Q系l就能正常工作ƈ输出正确l果。假设表军_是完全可靠的Q每个子pȝ的可靠性ؓR0Q则m模冗余系l的可靠性ؓQ?/span><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/8.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><img src ="http://www.tkk7.com/algz/aggbug/371157.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/algz/" target="_blank">紫蝶∏飛揚↗</a> 2012-03-02 23:02 <a href="http://www.tkk7.com/algz/articles/371157.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>EditorGridPanel 控制单元格的~辑功能http://www.tkk7.com/algz/articles/370609.html紫蝶∏飛揚↗紫蝶∏飛揚↗Thu, 23 Feb 2012 10:13:00 GMThttp://www.tkk7.com/algz/articles/370609.htmlhttp://www.tkk7.com/algz/comments/370609.htmlhttp://www.tkk7.com/algz/articles/370609.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/370609.htmlhttp://www.tkk7.com/algz/services/trackbacks/370609.html

具体描述Q?/span>

      表格W一列(其它列也行)为类型选择列,采用ComboBox为编辑器Q当选择某一cdQ如Q类?Q时表格当前?/strong>的某些列Q如Q第2列~W?列)变Z可编辑状态,q显CZ同的样式Q类gbutton的disableQ?/p>

       当选择其它cdQ如Q类?Q时表格当前?/strong>的不可编辑单元格又变成可~辑的?/p>

(1)
是否可编辑样式可以在列模型的renderer中操?nbsp;

renderer : function(data, meta){ 
   if(xxx){ 
      meta.css += " x-item-disabled"; 
   } 


(2)
是否可编辑逻辑可以在grid的beforeedit事g中拦截判?nbsp;
grid.on("beforeedit", function(e){ 
/* 
                e = { 
                    grid: this, 
                    record: r, 
                    field: field, 
                    value: r.data[field], 
                    row: row, 
                    column: col, 
                    cancel:false 
                }; 
*/ 
   if(xxx){ 
      return false; // 中止Q不让编?nbsp;
   } 
}); 


]]>
[转] JSON-lib框架Q{换JSON、XML不再困难http://www.tkk7.com/algz/articles/370571.html紫蝶∏飛揚↗紫蝶∏飛揚↗Thu, 23 Feb 2012 02:56:00 GMThttp://www.tkk7.com/algz/articles/370571.htmlhttp://www.tkk7.com/algz/comments/370571.htmlhttp://www.tkk7.com/algz/articles/370571.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/370571.htmlhttp://www.tkk7.com/algz/services/trackbacks/370571.html阅读全文

]]>
JS 数组对象的JohnҎhttp://www.tkk7.com/algz/articles/367520.html紫蝶∏飛揚↗紫蝶∏飛揚↗Thu, 29 Dec 2011 10:23:00 GMThttp://www.tkk7.com/algz/articles/367520.htmlhttp://www.tkk7.com/algz/comments/367520.htmlhttp://www.tkk7.com/algz/articles/367520.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/367520.htmlhttp://www.tkk7.com/algz/services/trackbacks/367520.html
<script type="text/javascript">
var arr = new Array(3)
arr[0] = "George"
arr[1] = "John"
arr[2] = "Thomas"
document.write(arr.join("."))
</script>
输出Q?/div>
George.John.Thomas


]]>
JS 双竖U运符http://www.tkk7.com/algz/archive/2011/12/29/367518.html紫蝶∏飛揚↗紫蝶∏飛揚↗Thu, 29 Dec 2011 10:20:00 GMThttp://www.tkk7.com/algz/archive/2011/12/29/367518.htmlhttp://www.tkk7.com/algz/comments/367518.htmlhttp://www.tkk7.com/algz/archive/2011/12/29/367518.html#Feedback1http://www.tkk7.com/algz/comments/commentRss/367518.htmlhttp://www.tkk7.com/algz/services/trackbacks/367518.htmlJS 双竖U运符:是或比较.如null||'1',q回'1';'2'||'1',q回'2'.xq算W中,W一个ؓ?后面的就不用计算?所以得'2'.哈哈.


]]>q接字符串代?写的不错)http://www.tkk7.com/algz/articles/366904.html紫蝶∏飛揚↗紫蝶∏飛揚↗Wed, 21 Dec 2011 02:01:00 GMThttp://www.tkk7.com/algz/articles/366904.htmlhttp://www.tkk7.com/algz/comments/366904.htmlhttp://www.tkk7.com/algz/articles/366904.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/366904.htmlhttp://www.tkk7.com/algz/services/trackbacks/366904.html    public static String join(Object array[], String separator)
    {
        if(array == null)
            return null;
        if(separator == null)
            separator = "";
        int arraySize = array.length;
        int bufSize = arraySize != 0 ? arraySize * ((array[0] != null ? array[0].toString().length() : 16) + (separator == null ? 0 : separator.length())) : 0;
        StringBuffer buf = new StringBuffer(bufSize);
        for(int i = 0; i < arraySize; i++)
        {
            if(separator != null && i > 0)
                buf.append(separator);
            if(array[i] != null)
                buf.append(array[i]);
        }

        return buf.toString();
    }


]]>[转]Hibernate Annotation几种兌映射 虽然是{?但仔l看q是很有帮助?http://www.tkk7.com/algz/articles/366838.html紫蝶∏飛揚↗紫蝶∏飛揚↗Tue, 20 Dec 2011 06:10:00 GMThttp://www.tkk7.com/algz/articles/366838.htmlhttp://www.tkk7.com/algz/comments/366838.htmlhttp://www.tkk7.com/algz/articles/366838.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/366838.htmlhttp://www.tkk7.com/algz/services/trackbacks/366838.html
Hibernate Annotation几种兌映射
一对一(One-To-One)
使用@OneToOne注解建立实体Bean之间的一对一兌。一对一兌有三U情况:(1).兌的实体都׃n同样的主键,(2).其中一个实体通过外键兌到另一个实体的主键(注意要模拟一对一兌必须在外键列上添加唯一U束)Q?3).通过兌表来保存两个实体之间的连接关p?要模拟一对一兌必须在每一个外键上d唯一U束)?/div>
 
1.׃n主键的一对一兌映射Q?/div>
@Entity
@Table(name="Test_Body")
public class Body {
   private Integer id;
   private Heart heart;
   @Id
   public Integer getId() {
      return id;
   }
   public void setId(Integer id) {
      this.id = id;
   }
   @OneToOne
   @PrimaryKeyJoinColumn
   public Heart getHeart() {
      return heart;
   }
   public void setHeart(Heart heart) {
      this.heart = heart;
   }
}
@Entity
@Table(name="Test_Heart")
public class Heart {
   private Integer id;
   @Id
   public Integer getId() {
      return id;
   }
   public void setId(Integer id) {
      this.id = id;
   }
}
通过@PrimaryKeyJoinColumnҎ定义了一对一兌
 
2.使用外键q行实体一对一兌Q?/div>
@Entity
@Table(name="Test_Trousers")
public class Trousers {
   @Id
   public Integer id;
   @OneToOne
   @JoinColumn(name = "zip_id")
   public TrousersZip zip;
}
@Entity
@Table(name="Test_TrousersZip")
public class TrousersZip {
   @Id
   public Integer id;
   @OneToOne(mappedBy = "zip")
   public Trousers trousers;
}
上面的例子是指Trousers通过Trousers的外键列zip_id和TrousersZip兌Q@JoinColumnҎ定义了联接列Q该Ҏ和@ColumnҎ有点cMQ但是多了一个名为referencedColumnName的参数。该参数定义了所兌目标实体中的联接列,注意Q当referencedColumnName兌到非主键列的时候,兌的目标类必须实现SerializableQ还要注意的是所映像的属性对应单个列Q否则映无效)
一对一兌可能是双向的Q在双向兌中,有且仅有一端作Z体(ownerQ端存在Q主体端负责l护联接列(x斎ͼQ对于不需要维护这U关pȝ从表则通过mappedNy属性进行声明。mappedBy的值指向主体的兌属性。例子中QmappedBy的gؓzip。最后,不必也不能再在被兌端(ownedsideQ定义联接列了,因ؓ已经在主体端声明了?/div>
如果在主体没有声明@JoinColumnQ系l自动进行处理:在主表(owner tableQ中创接列Q列名ؓQ主体的兌属性名+下划U?被关联端的主键列名。上面的例子中是zip_id,因ؓTrousers中的兌属性名为zipQTrousersZip的主键是id?/div>
 
3.通过兌表定义一对一兌
@Entity
@Table(name="Test_People")
public class People {
   @Id
   public Integer id;
   @OneToOne
   @JoinTable(name ="TestPeoplePassports",
      joinColumns =@JoinColumn(name="people_fk"),
      inverseJoinColumns =@JoinColumn(name="passport_fk")
   )
   public Passport passport;
}
@Entity
@Table(name="Test_Passport")
public class Passport {
   @Id
   public Integer id;
   @OneToOne(mappedBy = "passport")
   public People people;
}
People通过名ؓTestPeoplePassports的关联表和Passport兌。该兌表拥有名为passport_fk的外键列Q该外键指向Passport表,该信息定义ؓinverseJoinColoumns的属性|而people_fk外键列指向People表,该信息定义ؓjoinColumns的属性倹{?/div>
q种兌可能是双向的Q在双向兌中,有且仅有一端作Z体(ownerQ端存在Q主体端负责l护联接列(x斎ͼQ对于不需要维护这U关pȝ从表则通过mappedNy属性进行声明。mappedBy的值指向主体的兌属性。例子中QmappedBy的gؓpassport。最后,不必也不能再在被兌端(ownedsideQ定义联接列了,因ؓ已经在主体端声明了?/div>
以上是一对一兌的三UŞ式,下面介绍多对一兌?/div>
 
 
 
多对一(Many-to-One)
使用@ManyToOneҎ来实现多对一兌?/div>
@ManyToOneҎ有一个名为targetEntity的参敎ͼ该参数定义了目标实体名,通常不需要定义该参数Q因为在大部分情况下默认?表示兌关系的属性类?可以很好的满需求了。不q下面这U情况下q个参数显得有意义了:使用接口作ؓq回D不是常见的实体?/div>
@ManyToOne(targetEntity=CompanyImpl.class)
@JoinColoumn(name=”COPM_ID”)
Public Company getCompany(){
   return company;
}
多对一的配|方式有两种Q?1)通过@JoinColoumn映像(2)通过兌表的方式来映?/div>
 
(1)           通过@JoinColoumn映射
SRD Framework中Company,Category例子Q?/div>
CompanyQ?/div>
@ManyToOne
   @JoinColumn(name = "CATEGORY_OPTION_ID")
   private Category category = null;
   CategoryQ?/div>
@DiscriminatorValue("Category")
public class Category extends Option {
}
(2)           通过兌表映?/div>
通过@JoinTableҎ定义兌表,该关联表包含了指回实体表的外?通过@JoinTable.joinColoumns)以及指向目标实体表的外键(通过@JoinTable.inverseJoinColoumns)
@Entity
@Table(name="Test_TreeType")
public class TreeType {
   private Integer id;
   private String name;
   private ForestType forestType;
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinTable(name="Test_Tree_Forest",
      joinColumns = @JoinColumn(name="tree_id"),
      inverseJoinColumns = @JoinColumn(name="forest_id") )
public ForestType getForestType() {// forestType的getterQsetterҎ必须在这里,否则会出?/div>
      return forestType;
   }
   public void setForestType(ForestType forestType) {
      this.forestType = forestType;
   }
   @Id
   @GeneratedValue
   public Integer getId() {
      return id;
   }
   public void setId(Integer id) {
      this.id = id;
   }
   public String getName() {
      return name;
   }
   public void setName(String name) {
      this.name = name;
   }
}
@Entity
@Table(name="Test_ForestType")
public class ForestType {
   private Integer id;
   private String name;
   private Set<TreeType> trees;
   @OneToMany(mappedBy="forestType")
public Set<TreeType> getTrees() {// trees的getterQsetterҎ必须在这里,否则会出?/div>
      return trees;
   }
   public void setTrees(Set<TreeType> trees) {
      this.trees = trees;
   }
   @Id @GeneratedValue
   public Integer getId() {
      return id;
   }
   public void setId(Integer id) {
      this.id = id;
   }
   public String getName() {
      return name;
   }
   public void setName(String name) {
      this.name = name;
   }
}
 
一对多(One-to-Many)
使用@OneToManyҎ可定义一对多兌Q一对多兌可以是双向关联?/div>
在EJB3规范中多对一q端几乎L双向兌中的M(owner)端,而一对多q端兌Ҏ为@OneToMany(mappedBy...)
@Entity
Public class Troop{
   @OneToMany(mappedBy=”troop”)
Public Set<Soldier> getSoldiers(){
......
}
@Entity
Public class Soldier{
   @ManyToOne
   @JoinColumn(name=”troop_fk”)
Public Troop getTroop(){
......
}
Troop通过troop属性和Soldier建立一对多的双向关联,在mappedBy端不必也不能再定义Q何物理映?/div>
对于一对多的双向映,如果要一对多q一端维护关联关p,你需要删除mappedBy元素q将多对一q端的@JoinColoumn的insertable和updatabel讄为false。这U方案不会得C么明昄优化Q而且q会增加一些附加的UPDATE语句?/div>
 
单向Q?/div>
通过在被拥有的实体端(owned entity)增加一个外键列来实C对多单向兌是很见的,也是不推荐的Q徏议通过一个联接表来实现这U关?下面会讲??/div>
@JoinColoumnҎ来描q这U单向关联关p?/div>
@Entity
Public class Customer{
   @OneToMany
@JoinColoumn(name=”CUST_ID”)
Public Set<ticket> getTickets() {
......
}
@Entity
Public class Ticket{
   ...
}
Customer通过CUST_ID列和Ticket建立了单向关联关p?/div>
通过兌表处理单向关联:
通过联接表处理单向一对多兌是首选方式,q种兌通过@JoinTableҎq行描述
@Entity
Public class Trainer{
@OneToMany
@JoinTable(
   name = "TrainedMonkeys",
   jonColumns = {@JoinColumn(name = "trainer_id")},
   inverseJoinColumns = @JoinColumn(name = "monkey_id")
   )
public Set<Monkey> getTrainedMonkeys() {
      return trainedMonkeys;
   }
......
}
@Entity
public class Monkey {
...//no bidir
}
上面q个例子中,Trainer通过TrainedMonkeys表和Monkey建立了单向关联,其中外键trainer_id兌到Trainer(joinColoumn),而外键monkey_id兌到Monkey(inversejionColoumns)
默认处理机制Q?/div>
通过联接表来建立单向一对多兌不需要描qCQ何物理映像,表名׃下三个部分组成:主表(ownertable)表名+从表(the other side table)表名Q指向主表的外键名:主表表名+下划U?主表主键列名Q指向从表的外键名:主表所对应实体的属性名+下划U?从表主键列名Q指向从表的外键定义为唯一U束Q用来表CZ对多的关联关pR?/div>
@Entity
public class Trainer{
   @OneToMany
   Public Set<Tiger> getTrainedTigers(){
... ...
}
@Entity
public class Tiger{
.. ..//no bidir
}
上面q个例子中,Trainer和Tiger通过联接表Trainer_Tiger建立单向兌关系Q其中外键trainer_id兌到Trainer,而外键trainedTigers_id兌到Tiger
 
多对?Many-to-Many)
使用@ManyToManyҎ可定义多对多兌Q同Ӟ你也许要通过Ҏ@JoinTable描述兌表和兌条g。如果是双向兌Q其中一D必d义ؓOwnerQ另一端必d义ؓinverse(在对兌表进行更新操作时q一端将被忽?
@Entity()
public class Employer implements Serializable {
   private Integer id;
   private Collection employees;
   @ManyToMany(
targetEntity = org.hibernate.test.annotations.manytomany.Employee.class,
      cascade = {CascadeType.PERSIST, CascadeType.MERGE}
   )
   @JoinTable(
         name = "EMPLOYER_EMPLOYEE",
         joinColumns = {@JoinColumn(name = "EMPER_ID")},
         inverseJoinColumns = {@JoinColumn(name = "EMPEE_ID")}
   )
   public Collection getEmployees() {
      return employees;
   }
...
}
@Entity()
public class Employee implements Serializable {
   @ManyToMany(
         cascade = {CascadeType.PERSIST, CascadeType.MERGE},
         mappedBy = "employees"
         targetEntity = Employer.class
   )
public Collection<Employer> getEmployers() {
      return employers;
   }
.. ..
}
@JoinTableҎ定义了联接表的表名,联接列数l,以及invers联接列数l,后者是兌表中兌到Employee主键的列(the “other side”)?/div>
被关联端不必也不能描q物理映:只需要一个简单的mappedBy参数Q该参数包含了主体端的属性名Q这样就l定了双方的关系?/div>
默认|
和其它许多批注一P在多对多兌中很多值是自动生成Q党双向多对多关联中没有定义M物理映射ӞHibernateҎ以下规则生成相应的|兌表名Q主表表?下划U?从表表名Q关联到主表的外键名Q主表名+下划U?主表中的主键列名Q关联到从表的外键名Q主表中用于兌的属性名+下划U?从表的主键列名,以上规则对于双向一对多兌同样一栗?/div>
 
以上是整理的一点简单的几种映射Q可参考EJB3.pdf中P111——P131Qhibernate_annotation.pdf W二?/div>
在这里没有具体的例子Q有很多内容q需要仔l查看文档?/div>


]]>[转] 关于oracle with table as 创徏临时表的用法CZhttp://www.tkk7.com/algz/articles/365688.html紫蝶∏飛揚↗紫蝶∏飛揚↗Tue, 06 Dec 2011 08:47:00 GMThttp://www.tkk7.com/algz/articles/365688.htmlhttp://www.tkk7.com/algz/comments/365688.htmlhttp://www.tkk7.com/algz/articles/365688.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/365688.htmlhttp://www.tkk7.com/algz/services/trackbacks/365688.html1、with table as 相当于徏个时表Q用于一个语句中某些中间l果攑֜临时表空间的SQL语句Q,Oracle 9i 新增WITH语法Q可以将查询中的子查询命名,攑ֈSELECT语句的最前面?/span>

语法是
with tempname as (select ....)
select ...

例子Q?/span>
with t as (select * from emp where depno=10)
select * from t where empno=xxx

with
wd as (select did,arg(salary) q_工资 from work group by did),
em as (select emp.*,w.salary from emp left join work w on emp.eid = w.eid)
select * from wd,em where wd.did =em.did and wd.q_工资>em.salary;



2、何时被清除
临时表不都是会话l束p动被PGA清除? 但with as临时表是查询完成后就被清除了Q?/span>
23:48:58 SCOTT@orcl> with aa as(select * from dept)
23:57:58   2  select * from aa;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

已用旉:  00: 00: 00.12
23:58:06 SCOTT@orcl> select * from aa;
select * from aa
              *
W?1 行出现错?
ORA-00942: 表或视图不存?/span>


已用旉:  00: 00: 00.02
23:58:14 SCOTT@orcl>

3、就q一功能来说Q子查询可以达到啊Qؓ什么要用with呢? 用with有什么好处?
都能写,但执行计划不同的。当有多个相似子查询的时候,用with写公共部分,因ؓ子查询结果在内存临时表中Q执行效率当然就高啦~

4、问题:
有张表数据如下:
aaa ?/span>
bbb ?/span>
aaa ?/span>
aaa ?/span>
bbb ?/span>
bbb ?/span>
需要得C列结?
  ??/span>
aaa 2 1
bbb 1 2
?SQL 语句怎么写?Q?/span>

{案Q?/span>
with tt as (
  select 'aaa' id, '? value from dual union all
  select 'bbb' id, '? value from dual union all
  select 'aaa' id, '? value from dual union all
  select 'aaa' id, '? value from dual union all
  select 'bbb' id, '? value from dual union all
  select 'bbb' id, '? value from dual)
SELECT id,
       COUNT(decode(VALUE, '?, 1)) ?
       COUNT(decode(VALUE, '?, 1)) ?/span>
  FROM tt
 GROUP BY id;
===================================================================
扩展Q?/span>
Oracle9i新增WITH语法Q可以将查询中的子查询命名,攑ֈSELECT语句的最前面?/span>

  一个简单的例子:

SQL> WITH
2 SEG AS (SELECT SEGMENT_NAME, SUM(BYTES)/1024 K FROM USER_SEGMENTS GROUP BY SEGMENT_NAME),
3 OBJ AS (SELECT OBJECT_NAME, OBJECT_TYPE FROM USER_OBJECTS)
4 SELECT O.OBJECT_NAME, OBJECT_TYPE, NVL(S.K, 0) SIZE_K
5 FROM OBJ O, SEG S
6 WHERE O.OBJECT_NAME = S.SEGMENT_NAME (+)
7 ;
OBJECT_NAME OBJECT_TYPE SIZE_K
------------------------------ ------------------- ----------
DAIJC_TEST TABLE 128
P_TEST PROCEDURE 0
IND_DAIJC_TEST_C1 INDEX 128

  通过WITH语句定义了两个子查询SEG和OBJQ在随后的SELECT语句中可以直接对预定义的子查询进行查询。从上面的例子也可以看出Q用WITH语句Q将一个包含聚集、外q接{操作SQL清晰的展现出来?/span>

  WITH定义的子查询不仅可以使查询语句更加简单、清晎ͼ而且WITH定义的子查询q具有在SELECT语句的Q意层均可见的特点?/span>

  即是在WITH的定义层中,后定义的子查询都可以使用前面已经定义好的子查?

SQL> WITH
2 Q1 AS (SELECT 3 + 5 S FROM DUAL),
3 Q2 AS (SELECT 3 * 5 M FROM DUAL),
4 Q3 AS (SELECT S, M, S + M, S * M FROM Q1, Q2)
5 SELECT * FROM Q3;
S M S+M S*M
---------- ---------- ---------- ----------
8 15 23 120

  利用WITH定义查询中出现多ơ的子查询还能带来性能提示。Oracle会对WITHq行性能优化Q当需要多ơ访问WITH定义的子查询ӞOracle会将子查询的l果攑ֈ一个时表中,避免同样的子查询多次执行Q从而有效的减少了查询的IO数量?/span>

WITH能用在SELECT语句中,UPDATE和DELETE语句也是支持WITH语法的,只是需要版本支?
http://www.oracle.com.cn/viewthread.php?tid=83530

=============================================================================
with
sql1 as (select to_char(a) s_name from test_tempa),
sql2 as (select to_char(b) s_name from test_tempb where not exists (select s_name from sql1 where rownum=1))
select * from sql1
union all
select * from sql2
union all
select 'no records' from dual
       where not exists (select s_name from sql1 where rownum=1)
       and not exists (select s_name from sql2 where rownum=1);

再D个简单的例子

with a as (select * from test)

select * from a;

其实是把一大堆重复用到的SQL语句攑֜with as 里面Q取一个别名,后面的查询就可以用它

q样对于大批量的SQL语句起到一个优化的作用Q而且清楚明了


q是搜烦到的英文文档资料(说得比较?但是本h英文特菜,q没具体了解?希望各高手具体谈谈这个with
as 的好?

About Oracle WITH clause
Starting in Oracle9i release 2 we see an incorporation of the SQL-99 “WITH clause”, a tool for materializing subqueries to save Oracle from having to re-compute them multiple times.

The SQL “WITH clause” is very similar to the use of Global temporary tables (GTT), a technique that is often used to improve query speed for complex subqueries. Here are some important notes about the Oracle “WITH clause”:

   ? The SQL “WITH clause” only works on Oracle 9i release 2 and beyond.
   ? Formally, the “WITH clause” is called subquery factoring
   ? The SQL “WITH clause” is used when a subquery is executed multiple times
   ? Also useful for recursive queries (SQL-99, but not Oracle SQL)

To keep it simple, the following example only references the aggregations once, where the SQL “WITH clause” is normally used when an aggregation is referenced multiple times in a query.
We can also use the SQL-99 “WITH clause” instead of temporary tables. The Oracle SQL “WITH clause” will compute the aggregation once, give it a name, and allow us to reference it (maybe multiple times), later in the query.

The SQL-99 “WITH clause” is very confusing at first because the SQL statement does not begin with the word SELECT. Instead, we use the “WITH clause” to start our SQL query, defining the aggregations, which can then be named in the main query as if they were “real” tables:

WITH
subquery_name
AS
(the aggregation SQL statement)
SELECT
(query naming subquery_name);

Retuning to our oversimplified example, let’s replace the temporary tables with the SQL “WITH  clause”:

WITH
sum_sales AS
  select /*+ materialize */
    sum(quantity) all_sales from stores
number_stores AS
  select /*+ materialize */
    count(*) nbr_stores from stores
sales_by_store AS
  select /*+ materialize */
  store_name, sum(quantity) store_sales from
  store natural join sales
SELECT
   store_name
FROM
   store,
   sum_sales,
   number_stores,
   sales_by_store
where
   store_sales > (all_sales / nbr_stores)
;

Note the use of the Oracle undocumented “materialize” hint in the “WITH clause”. The Oracle materialize hint is used to ensure that the Oracle cost-based optimizer materializes the temporary tables that are created inside the “WITH” clause. This is not necessary in Oracle10g, but it helps ensure that the tables are only created one time.

It should be noted that the “WITH clause” does not yet fully-functional within Oracle SQL and it does not yet support the use of “WITH clause” replacement for “CONNECT BY” when performing recursive queries.

To see how the “WITH clause” is used in ANSI SQL-99 syntax, here is an excerpt from Jonathan Gennick’s great work “Understanding the WITH Clause” showing the use of the SQL-99 “WITH clause” to traverse a recursive bill-of-materials hierarchy

The SQL-99 “WITH clause” is very confusing at first because the SQL statement does not begin with the word SELECT. Instead, we use the “WITH clause” to start our SQL query, defining the aggregations, which can then be named in the main query as if they were “real” tables:

WITH
subquery_name
AS
(the aggregation SQL statement)
SELECT
(query naming subquery_name);

Retuning to our oversimplified example, let’s replace the temporary tables with the SQL “WITH” clause”:


]]>
Hibernate 注解映射 讄默认值的异常及解x?/title><link>http://www.tkk7.com/algz/articles/365534.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Mon, 05 Dec 2011 01:21:00 GMT</pubDate><guid>http://www.tkk7.com/algz/articles/365534.html</guid><wfw:comment>http://www.tkk7.com/algz/comments/365534.html</wfw:comment><comments>http://www.tkk7.com/algz/articles/365534.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/algz/comments/commentRss/365534.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/algz/services/trackbacks/365534.html</trackback:ping><description><![CDATA[<div><div>Oracle 数据?<br />Hibernate annotation :<br /><div><div><span style="white-space:pre"> </span>@Column(name="NUMBERS",columnDefinition="NUMBER(20,3) default 0 ")</div><div><span style="white-space:pre"> </span>public BigDecimal getNumbers() {</div><div><span style="white-space:pre"> </span>return numbers;</div><div><span style="white-space:pre"> </span>}<br /><br />异常:</div></div>Caused by: org.hibernate.HibernateException: Wrong column type: NUMBERS, expected: NUMBER(20,3) default 0 </div><div><span style="white-space:pre"> </span>at org.hibernate.mapping.Table.validateColumns(Table.java:261)</div><div><span style="white-space:pre"> </span>at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1083)</div><div><span style="white-space:pre"> </span>at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)</div><div><span style="white-space:pre"> </span>at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:317)</div><div><span style="white-space:pre"> </span>at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)</div><div><span style="white-space:pre"> </span>at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)</div><div><span style="white-space:pre"> </span>at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)</div><div><span style="white-space:pre"> </span>... 122 more<br />解决Ҏ:<br /><div><div><span style="white-space:pre"> </span>@Column(name="NUMBERS",columnDefinition="number(20,3) default 0 ")</div><div><span style="white-space:pre"> </span>public BigDecimal getNumbers() {</div><div><span style="white-space:pre"> </span>return numbers;</div><div><span style="white-space:pre"> </span>}<br />原因:hibernate 在列定义选项?数据库中的所有类型应为小写number. hibernate在此直接面对数据?所以区分大写.</div></div></div></div><img src ="http://www.tkk7.com/algz/aggbug/365534.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/algz/" target="_blank">紫蝶∏飛揚↗</a> 2011-12-05 09:21 <a href="http://www.tkk7.com/algz/articles/365534.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转] Oracle 语法?OVER (PARTITION BY ..) 及开H函?/title><link>http://www.tkk7.com/algz/articles/365263.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Thu, 01 Dec 2011 02:00:00 GMT</pubDate><guid>http://www.tkk7.com/algz/articles/365263.html</guid><wfw:comment>http://www.tkk7.com/algz/comments/365263.html</wfw:comment><comments>http://www.tkk7.com/algz/articles/365263.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/algz/comments/commentRss/365263.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/algz/services/trackbacks/365263.html</trackback:ping><description><![CDATA[<span id="9jfr9j9" class="Apple-style-span" style="color: #454545; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 14px; background-color: #ffffff; "><div>oracle的分析函数over 及开H函?/div><div><font size="2">一Q分析函?strong style="color: black; background-color: #a0ffff; ">over</strong><br /><strong style="color: black; background-color: #ffff66; ">Oracle</strong>?.1.6开始提供分析函敎ͼ分析函数用于计算Zl的某种聚合|它和聚合函数的不同之处是<br />对于每个l返回多行,而聚合函数对于每个组只返回一行?nbsp;<br />下面通过几个例子来说明其应用?nbsp;                                      </font><div><font size="2">1Q统计某商店的营业额?nbsp;       </font></div><div><font size="2">     date       sale<br />     1           20<br />     2           15<br />     3           14<br />     4           18<br />     5           30<br />    规则Q按天统计:每天都统计前面几天的总额<br />    得到的结果:<br />    DATE   SALE       SUM<br />    ----- -------- ------<br />    1      20        20           --1?nbsp;          <br />    2      15        35           --1天+2?nbsp;          <br />    3      14        49           --1天+2天+3?nbsp;          <br />    4      18        67            .          <br />    5      30        97            .<br />     <br />2:l计各班成WW一名的同学信息</font></div><div><font size="2">    NAME   CLASS S                         <br />    ----- ----- ---------------------- <br />    fda    1      80                     <br />    ffd    1      78                     <br />    dss    1      95                     <br />    cfe    2      74                     <br />    gds    2      92                     <br />    gf     3      99                     <br />    ddd    3      99                     <br />    adf    3      45                     <br />    asdf   3      55                     <br />    3dd    3      78              <br />   <br />    通过Q?nbsp;  <br />    --<br />    select * from                                                                       <br />    (                                                                            <br />    select name,class,s,rank()<strong style="color: black; background-color: #a0ffff; ">over</strong>(partition by class order by s desc) mm from t2<br />    )                                                                            <br />    where mm=1 <br />    --<br />    得到l果Q?br />    NAME   CLASS S                       MM                                                                                        <br />    ----- ----- ---------------------- ---------------------- <br />    dss    1      95                      1                      <br />    gds    2      92                      1                      <br />    gf     3      99                      1                      <br />    ddd    3      99                      1          <br />   <br />    注意Q?br />    1.在求W一名成l的时候,不能用row_number()Q因为如果同班有两个q列W一Qrow_number()只返回一个结?nbsp;         <br />    2.rank()和dense_rank()的区别是Q?br />      --rank()是蟩跃排序,有两个第二名时接下来是W四?br />      --dense_rank()l是连l排序,有两个第二名时仍然跟着W三?br />     <br />     <br />3.分类l计 (q显CZ?</font></div><div><font size="2">    A   B   C                      <br />    -- -- ---------------------- <br />    m   a   2                      <br />    n   a   3                      <br />    m   a   2                      <br />    n   b   2                      <br />    n   b   1                      <br />    x   b   3                      <br />    x   b   2                      <br />    x   b   4                      <br />    h   b   3</font></div><div><font size="2">   select a,c,sum(c)<strong style="color: black; background-color: #a0ffff; ">over</strong>(partition by a) from t2                <br />   得到l果Q?br />   A   B   C        SUM(C)<strong style="color: black; background-color: #a0ffff; ">OVER</strong>(PARTITIONBYA)      <br />   -- -- ------- ------------------------ <br />   h   b   3        3                        <br />   m   a   2        4                        <br />   m   a   2        4                        <br />   n   a   3        6                        <br />   n   b   2        6                        <br />   n   b   1        6                        <br />   x   b   3        9                        <br />   x   b   2        9                        <br />   x   b   4        9                        <br />  <br />   如果用sumQgroup by 则只能得?br />   A   SUM(C)                            <br />   -- ---------------------- <br />   h   3                      <br />   m   4                      <br />   n   6                      <br />   x   9                      <br />   无法得到B列?nbsp;      <br />  <br />Q=Q=Q?/font></div><div><div><p><font face="verdana, arial, helvetica" size="2"><span id="rz5jhlp" class="javascript" id="text2200299" style="font-size: 12px; ">select * from test<br /><br />数据:<br />A B C <br />1 1 1 <br />1 2 2 <br />1 3 3 <br />2 2 5 <br />3 4 6 <br /><br /><br />---B栏位值相同的对应的C 栏位值加?br />select a,b,c, SUM(C) OVER (PARTITION BY B) C_Sum<br />from test<br /><br />A B C C_SUM <br />1 1 1 1 <br />1 2 2 7 <br />2 2 5 7 <br />1 3 3 3 <br />3 4 6 6 <br /><br /><br /><br />---如果不需要已某个栏位的值分?那就要用 null<br /><br />eg: 是C的栏位值summary 攑֜每行后面<br /><br />select a,b,c, SUM(C) OVER (PARTITION BY null) C_Sum<br />from test<br /><br />A B C C_SUM <br />1 1 1 17 <br />1 2 2 17 <br />1 3 3 17 <br />2 2 5 17 <br />3 4 6 17</span></font></p><p><font face="verdana, arial, helvetica" size="2"></font> </p><p><font face="verdana, arial, helvetica" size="2"><span id="vnplrzd" class="javascript" style="font-size: 12px; ">求个人工资占部门工资的百分比</span></font></p><font face="verdana, arial, helvetica" size="2"><p><font face="verdana, arial, helvetica" size="2"><span id="jtpnljx" class="javascript" id="text3005546" style="font-size: 12px; ">SQL> select * from salary;<br /><br />NAME DEPT SAL<br />---------- ---- -----<br />a 10 2000<br />b 10 3000<br />c 10 5000<br />d 20 4000<br /><br />SQL> select name,dept,sal,sal*100/sum(sal) over(partition by dept) percent from salary;<br /><br />NAME DEPT SAL PERCENT<br />---------- ---- ----- ----------<br />a 10 2000 20<br />b 10 3000 30<br />c 10 5000 50<br />d 20 4000 100</span></font></p></font></div></div><div><font size="2">二:开H函?nbsp;          <br />      开H函数指定了分析函数工作的数据窗口大,q个数据H口大小可能会随着行的变化而变化,举例如下Q?nbsp;<br />1Q?nbsp;    <br />   <strong style="color: black; background-color: #a0ffff; ">over</strong>Qorder by salaryQ?按照salary排序q行累计Qorder by是个默认的开H函?br />   <strong style="color: black; background-color: #a0ffff; ">over</strong>Qpartition by deptnoQ按照部门分?br />2Q?br />  <strong style="color: black; background-color: #a0ffff; ">over</strong>Qorder by salary range between 5 preceding and 5 followingQ?br />   每行对应的数据窗口是之前行幅度g过5Q之后行q度g过5<br />   例如:对于以下?br />     aa<br />     1<br />     2<br />     2<br />     2<br />     3<br />     4<br />     5<br />     6<br />     7<br />     9<br />   <br />   sum(aa)<strong style="color: black; background-color: #a0ffff; ">over</strong>Qorder by aa range between 2 preceding and 2 followingQ?br />   得出的结果是<br />            AA                       SUM<br />            ---------------------- ------------------------------------------------------- <br />            1                       10                                                      <br />            2                       14                                                      <br />            2                       14                                                      <br />            2                       14                                                      <br />            3                       18                                                      <br />            4                       18                                                      <br />            5                       22                                                      <br />            6                       18                                                                <br />            7                       22                                                                <br />            9                       9                                                                 <br />             <br />   是_对于aa=5的一?Qsum?nbsp;  5-1<=aa<=5+2 的和<br />   对于aa=2来说 Qsum=1+2+2+2+3+4=14     Q?br />   又如 对于aa=9 Q?-1<=aa<=9+2 只有9一个数Q所以sum=9    Q?br />              <br />3Q其它:<br />     <strong style="color: black; background-color: #a0ffff; ">over</strong>Qorder by salary rows between 2 preceding and 4 followingQ?br />          每行对应的数据窗口是之前2行,之后4?nbsp;<br />4Q下面三条语句等效:           <br />     <strong style="color: black; background-color: #a0ffff; ">over</strong>Qorder by salary rows between unbounded preceding and unbounded followingQ?br />          每行对应的数据窗口是从第一行到最后一行,{效Q?br />     <strong style="color: black; background-color: #a0ffff; ">over</strong>Qorder by salary range between unbounded preceding and unbounded followingQ?br />           {效<br />     <strong style="color: black; background-color: #a0ffff; ">over</strong>(partition by null)</font></div></div></span><img src ="http://www.tkk7.com/algz/aggbug/365263.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/algz/" target="_blank">紫蝶∏飛揚↗</a> 2011-12-01 10:00 <a href="http://www.tkk7.com/algz/articles/365263.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转] 面中调用系l常用的对话框需要用到的classidhttp://www.tkk7.com/algz/articles/365132.html紫蝶∏飛揚↗紫蝶∏飛揚↗Tue, 29 Nov 2011 09:50:00 GMThttp://www.tkk7.com/algz/articles/365132.htmlhttp://www.tkk7.com/algz/comments/365132.htmlhttp://www.tkk7.com/algz/articles/365132.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/365132.htmlhttp://www.tkk7.com/algz/services/trackbacks/365132.html■打开■ 
<input name=Button onClick=document.all.WebBrowser.ExecWB(1,1) type=button value=打开> 
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT> 
■另存?#9632; 
<input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存?gt;<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT> 
■属?#9632; 
<input name=Button onClick=document.all.WebBrowser.ExecWB(10,1) type=button value=属?gt;<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT> 
■打印■ 
<input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) type=button value=打印><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT> 
■打印预览■ 
<input name=Button onClick=document.all.WebBrowser.ExecWB(7,1) type=button value=打印><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT> 

■面讄■ 
<input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=面讄><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT> 
■h■ 
<input type=button value=h name=refresh onclick="window.location.reload()"> 
■导入收藏■ 
<input type="button" name="Button" value="导入收藏? onClick=window.external.ImportExportFavorites(true,);> 
■导出收藏■ 
<input type="button" name="Button3" value="导出收藏? onClick=window.external.ImportExportFavorites(false,);> 
■加入收藏■ 
<INPUT name=Button2 onclick="window.external.AddFavorite(location.href, document.title)" type=button value=加入收藏?gt; 
■整理收藏?#9632; 
<INPUT name=Submit2 onclick="window.external.ShowBrowserUI(OrganizeFavorites, null)" type=button value=整理收藏?gt; 
■查看原文?#9632; 
<INPUT name=Button onclick=window.location = "view-source:" + window.location.href type=button value=查看源文?gt; 
■语言讄■ 
<INPUT name=Button onclick="window.external.ShowBrowserUI(LanguageDialog, null)" type=button value=语言讄> 
■前进■ 
<INPUT name=Submit onclick=history.go(1) type=submit value=前进> 
■后退■ 
<INPUT name=Submit2 onclick=history.go(-1) type=submit value=后退>

]]>
[转] WebBrowser.ExecWB的完整说?/title><link>http://www.tkk7.com/algz/articles/365131.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Tue, 29 Nov 2011 09:48:00 GMT</pubDate><guid>http://www.tkk7.com/algz/articles/365131.html</guid><wfw:comment>http://www.tkk7.com/algz/comments/365131.html</wfw:comment><comments>http://www.tkk7.com/algz/articles/365131.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/algz/comments/commentRss/365131.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/algz/services/trackbacks/365131.html</trackback:ping><description><![CDATA[<span id="dvdrnpt" class="Apple-style-span" style="color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><div id="f3fzh3x" class="article" id="article" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><table id="content" cellspacing="10" cellpadding="0" width="650" border="0" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; font-size: 12px; table-layout: fixed; width: 650px; "><tbody style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><tr style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; "><td style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10pt; "><font style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: #ffffff; "><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT> <br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(1,1) type=button value=打开><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(2,1) type=button value=关闭所?gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(4,1) type=button value=另存?gt; <br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(6,1) type=button value=打印><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(6,6) type=button value=直接打印><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(7,1) type=button value=打印预览><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(8,1) type=button value=面讄><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(10,1) type=button value=属?gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(17,1) type=button value=全?gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(22,1) type=button value=h><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><input name=Button .Click=document.all.WebBrowser.ExecWB(45,1) type=button value=关闭></font></div></td></tr></tbody></table></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowserlg的execWBҎ</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">1. <object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">2. 调用Ҏ:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB nCmdID, nCmdExecOpt, [pvaIn], [pvaOut]</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">3. 参数说明:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(a).nCmdID </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_OPEN = 1, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_NEW = 2, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_SAVE = 3, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_SAVEAS = 4, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_SAVECOPYAS = 5, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_PRINT = 6, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_PRINTPREVIEW = 7, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_PAGESETUP = 8, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_SPELL = 9, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_PROPERTIES = 10, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_CUT = 11, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_COPY = 12, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_PASTE = 13, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_PASTESPECIAL = 14, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_UNDO = 15, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_REDO = 16, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_selectALL = 17, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_CLEARselectION = 18, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_ZOOM = 19, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_GETZOOMRANGE = 20 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_updateCOMMANDS = 21 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_REFRESH = 22 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_STOP = 23 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_HIDETOOLBARS = 24 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_SETPROGRESSMAX = 25 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_SETPROGRESSPOS = 26 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_SETPROGRESSTEXT = 27 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_SETTITLE = 28 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_SETDOWNLOADSTATE = 29 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDID_STOPDOWNLOAD = 30 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">上面的关键词都可以在览器的菜单里面扑ֈ对应的选项H大家一看就明白的﹗ </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(b).nCmdExecOpt </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDEXECOPT_DODEFAULT = 0, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDEXECOPT_PROMPTUSER = 1, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">LECMDEXECOPT_DONTPROMPTUSER = 2, </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OLECMDEXECOPT_SHOWHELP = 3 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">对于q个参数H一般来_?可以了?/div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">4.常用:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(1,1) 打开</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(2,1) 关闭现在所有的IEH口Qƈ打开一个新H口</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(4,1) 保存|页</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(6,1) 打印</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(7,1) 打印预览</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(8,1) 打印面讄</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(10,1) 查看面属?/div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(15,1) 好像是撤销Q有待确?/div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(17,1) 全?/div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(22,1) h</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WebBrowser.ExecWB(45,1) 关闭H体无提C?/div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">5.CZH?/div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(a)调用IE?#8221;另存?#8221;功能的示例﹕</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href=".:WebBrowser.ExecWB(4,1);">Save-存储</A></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(b)l过改写的登陆模?/div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><body .load="showModalDialog('login_access.asp',0,'Status:NO;dialogWidth:418px;dialogHeight:288px');document.all.WebBrowser.ExecWB(45,1);"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(1,1) type=button value=打开></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(2,1) type=button value=关闭所?gt;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(4,1) type=button value=另存?gt; </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(6,1) type=button value=打印></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(6,6) type=button value=直接打印></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(7,1) type=button value=打印预览></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(8,1) type=button value=面讄></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(10,1) type=button value=属?gt;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(17,1) type=button value=全?gt;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(22,1) type=button value=h></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><input name=Button .Click=document.all.WebBrowser.ExecWB(45,1) type=button value=关闭></div></span><img src ="http://www.tkk7.com/algz/aggbug/365131.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/algz/" target="_blank">紫蝶∏飛揚↗</a> 2011-11-29 17:48 <a href="http://www.tkk7.com/algz/articles/365131.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>hibernate U联(联表)删除的问?/title><link>http://www.tkk7.com/algz/articles/364066.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Thu, 17 Nov 2011 04:47:00 GMT</pubDate><guid>http://www.tkk7.com/algz/articles/364066.html</guid><wfw:comment>http://www.tkk7.com/algz/comments/364066.html</wfw:comment><comments>http://www.tkk7.com/algz/articles/364066.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/algz/comments/commentRss/364066.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/algz/services/trackbacks/364066.html</trackback:ping><description><![CDATA[<div><div>dao.getHibernateSession().createQuery(hql).setParameter("bookid", bookid).setParameter("batch", batch).executeUpdate(); <br /><br />(1)String hql="delete from TbProduceplanaccount ppa where ppa.tbBusinessplanaccount.batch=:batch and ppa.tbProduceplanbook.id=:bookid ";<br />异常:<br /><div><div>Hibernate: delete from Tb_ProducePlanAccount, Tb_BusinessplanAccount tbbusiness1_ where batch=? and ProducePlanBook_ID=?<br />2011-11-17 11:50:16,166 WARN  [JDBCExceptionReporter] SQL Error: 933, SQLState: 42000<br />2011-11-17 11:50:16,166 ERROR [JDBCExceptionReporter] ORA-00933: SQL 命o未正结?nbsp;<br /><br />(2)hql="delete from TbProduceplanaccount ppa where ppa in (from TbProduceplanaccount ppa where ppa.tbBusinessplanaccount.batch=:batch and ppa.tbProduceplanbook.id=:bookid)";</div><div><div><span id="zjhth17" class="Apple-style-span" style="white-space: pre;">执行正常.</span></div></div></div><br />ȝ: hibernate的理解方式与Z?不能自动生成子查?<span style="color: #99cc00; ">更新或删除操作是不允许联表的,必须通过子查询找出数?</span><br />题外?U联删除是要讄映射?<br /><div><div></div></div></div></div><img src ="http://www.tkk7.com/algz/aggbug/364066.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/algz/" target="_blank">紫蝶∏飛揚↗</a> 2011-11-17 12:47 <a href="http://www.tkk7.com/algz/articles/364066.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>sql plus操作oracel(windowsq_)基础之简易新手篇 http://www.tkk7.com/algz/articles/356201.html紫蝶∏飛揚↗紫蝶∏飛揚↗Wed, 10 Aug 2011 03:29:00 GMThttp://www.tkk7.com/algz/articles/356201.htmlhttp://www.tkk7.com/algz/comments/356201.htmlhttp://www.tkk7.com/algz/articles/356201.html#Feedback0http://www.tkk7.com/algz/comments/commentRss/356201.htmlhttp://www.tkk7.com/algz/services/trackbacks/356201.html

?dSQLPLUS时报?如下:
误入用户名:  system
输入口o:
ERROR:
ORA-12560: TNS: 协议适配器错?br />原因:
是ORCAL实例没启?net [start/stop] 服务?.与Linux相反,不在SQLPLUS中启动实?

q_: windows server 2003 Enterprise Editon , oracle 10g(10.02.00.01)

 

  1. q行"开?>E序\Oracle - OraDb10g_home1\配置和移植工?中的"Database Configuration Assistant"Q创Z个数据库?
  2. 创徏成功后,q行"开?>E序\Oracle - OraDb10g_home1\应用E序开?中的"SQL Plus".用户名:sys 密码Q?23456 as sysdba(密码后面要加I格asI格sysdba) L字符Ԍ如果是本机可不填?
  3. 从命令提C符下用sql*plus
    sqlplus/nolog
    conn 用户?密码 as sysdba 出现”已连?#8220;后就是成功了?br />

    
  接下来,我们在SQL*Plus中实战一下,为我们下面将要做的打好基?br />  用system登陆到SQL*Plus后,我们做如下操?q次没有截图Q有详细的说?
-----------如登陆成功此1-3步不必做Q直接做W??---------------
  1. SQL>create user maxuan identified by max; #创徏口o为max的用户maxuan
  2. SQL>grant connect,resource to maxuan; #为用户maxuan授权
  3. SQL>conn maxuan/max; #以用户maxuanq行q接
  4. SQL>create table test(a number); #建立一个名为test的表Q只有字D名为A的一列,数据cd为数?
  5. SQL>insert into test values(1); #插入一条记?
  6. SQL>select * from test; #查询记录Q此时A列的W一行ؓ1
  7. SQL>update test set a=2; #更改记录Q此时A列的W一行已改ؓ2
  8. SQL>commit; #提交.在完成数据库的插入,删除和修Ҏ作时Q只有当事务提交到数据库才算完成?
  9. SQL>delete from test; #删除test表中所有的记录Q此时test表中没有记录
  10. SQL>roll; #回滚到提交前Q此时再查询test表,A列第一行值又回复?
  
  oracle的数据类?/strong>
  在数据库中创建数据表的时候,我们需要定义表中所有字D늚cdQ数据类型大致分为:character,numberic,date,lob和raw{,q些是最基本的数据类型。当然在oracle中也允许自定义数据类型!
  
  在oracle中提供的character数据cd:
  char():固定长度字符Ԍ最大长度ؓ2000字节Q如果不指定长充Q缺省ؓ1个字节长?br />  varchar2():可变长度的字W串Q最大长度ؓ4000字节Q具体定义时指明最大长度,q咱cd可以放数字、字母以及ASCII码字W集(或者EBCDIC{数据库pȝ接受的字W集标准)中的所有符受如果数据长度没有达到最大|oracle会根据数据大自动调节字D长度。是
  
  最长用的数据类型?br />  nchar():Ҏ字符集而定的固定长度字W串Q最大长?000字节?br />  nvarchar2():Ҏ字符集而定的可变长度字W串Q最大长?000字节?br />  long:可变长字W列Q最大长度限制ؓ2GBQ用于不需要作字符串搜索的长串数据。此cd是一个遗留下来的而且来不会被支持的数据cdQ逐渐被BLOBQCLOBQNCLOB{大的数据类型所取代?br />  
  numberic数据cd用来存储负的和正的整敎ͼ分数和Q点型数据Q在oracle中提供的numberic数据cdQ?br />  number(,):可变长的数值列Q允?、正值及负|m是所有的有效数字的位敎ͼn是小数点以后的位数?br />  
  在oracle中提供的date数据cd:
  date:~省格式是dd-mon-yy(??q?
  
  在oracle中提供的lob数据cd:
  blob、clob、nclobQ三U大型对?lob)Q用来保存较大的囑Ş文g或带格式的文本文Ӟ如word文档Q以及音频、视频等非文本文Ӟ最大长充是4GB。晕些数据存储在数据库内部保存?br />  bfile:在数据库外部保存的大型二q制对象文gQ最大长度是4GBQ这U外部的LOBcdQ通过数据库记录变化情况,但是数据的具体保存是在数据库外部q行的?br />  
  在oracle中提供的raw数据cd:
  raw():可变长二q制数据Q具体定义字D|必须指明最大长度,q种格式用来保存较小的图形文件或带格式的文本文gQ它也是一U较老的数据cdQ将被lob数据cd所取代?br />  long raw:可变长二q制数据Q最大长度是2GBQ可以用来保存较大的囑Ş或带格式的文本文Ӟ以及音频、视频等非文本文Ӟq也是一U较老的数据cdQ将被lob数据cd所取代?br />  
  其它的数据类型:
  rowid:q是oracle数据表中的一个伪例,它是数据表中每行数据内在的唯一标识
  integer:整数cd
  
补充知识Q?br />SQL(Structure Query Language)语言是结构化查询语言Q是数据库的核心语言Q是面向集合的描q性非q程化语a。SQL语言共分为四大类Q数据查询语aDQL,数据操纵语言DMLQ数据定义语aDDL,数据库控制语aDCL?br />  
  1.数据查询语言DQL的基本结构是由select子句Qfrom子句Qwhere子句l成的查询块Q?br />  select <字段名表> from <表或视图?gt; where <查询条g>
  
  2.数据操纵语言DML完成在数据库中确定、修攏V添加、删除某一数据值的d(以下是部分常用DML语句):
  insert  增加数据行到?br />  delete  从表中删除数据行
  Update  更改表中数据
  
  3.数据定义语言DDL完成定义数据库的l构Q包括数据库本n、数据表、目录、视囄数据库元?以下是部分常用DDL语句)
  create table  创徏?br />  create index  创徏索引
  create view  创徏视图
  alter table  增加表列Q重定义表列Q更改存储分?br />  drop table  删除?br />  drop index  删除索引
  
  4.数据库控制语aDCL用来授予或回收访问数据库的某U特权,q控制数据库操纵事务发生的时间及效果Q对数据库实行监视等。如Q?br />  grant    权限或角色授予用户或其它角?br />  revoke    回收用户权限
  roll    回滚Q是当某个对话更改了数据库中的数据后Q由于某U原因用户不x交此更改Ӟoracle所采取的保护操作。这是一个把信息恢复到用户update、insert、delete前最后提交的状态?br />  commit    提交。在完成数据库的插入Q删除和修改操作Ӟ只有当事务提交到数据库才完成,有提交前只有操作数据库的本h才能看到Q别人只有在最后提交完成才可以看到?br />
  一?strong>购物|站后台数据?/strong>实例Q?br />  现在我们回到用J2EE体系开发购物网站的主题Q开始实战徏购物|站的后台数据库?br />  Z实现购物|站的基本的功能Q我们需要徏立四个表Q商品列?products)、商品类型表(item)、订单列?orders)和管理员列表(admin)。表l构如下所C:
  
  item表结构(商品cd?
  字段名称  数据cd    允许I  主键/外键  备注  
  type_id  INTEGER(自动~号) 否  主键   商品cdID标记
  type   varchar2(30)   否    商品cd名称
  
  product表结?商品列表)
  字段名称   数据cd   允许I  主键/外键  备注
  product_id INTEGER(自动~号) 否   主键  商品ID标记
  title   varchar2(30)   否     商品名称
  type_id   INTEGER    否   外键  商品cd标记
  info   varchar2(80)   是     商品?br />  price   number(16,2)   否     商品h
  
  orders表结?订单列表)
  字段名称  数据cd    允许I  主键/外键  备注
  order_id  INTEGER(自动~号) 否   主键  订单ID标记
  name   varchar2(20)   否     ֮姓名
  address   varchar2(100)   是     发货地址
  tel   number(16)  是     联系电话
  email   varchar2(30)  否     联系email
  btime   date    是     订购日期
  product_id  INTEGER   否   外键  商品标记
  uword   varchar2(100) 是     ֮留言
  
  admin表结?理员列?
  字段名称  数据cd    允许I  主键/外键  备注
  admin_id  INTEGER(自动~号) 否   主键   理员ID标记
  adminname  varchar2(20)   否     理员名U?br />  password  varchar2(20)   否     理员密?br />  
  设计完表l构后,我们p开始创Z?br />  创徏表我惛_l不是什么难事了Q那么我们要注意的是product、item、ordersq三个表之间的关联,q有自动~号?br />  
  下面是完整的SQL语句Q在后面我会l出详细的说明,你可以在SQL*Plus里对照着输入Q也可以它存ؓSQL脚本文gQ在SQL*Plus或SQLPlus Worksheet里执行。当然也可以把代码直接拷贝到SQL*Plus里执行!
  
  代码Q?br />  rem ///BY MAXUAN 开?//
  create table item(
  type_id integer not null,
  type varchar2(30),
  constraint item_pk primary key(type_id)
  );
  
  create table product(
  product_id integer not null,
  title varchar2(30) not null,
  type_id integer not null,
  info varchar2(80),
  price number(16,2) not null,
  constraint product_pk primary key (product_id),
  constraint product_fk foreign key(type_id) references item(type_id)
  );
  
  create table orders(
  order_id integer not null,
  name varchar2(20) not null,
  address varchar2(100),
  tel number(16),
  email varchar2(30) not null,
  btime date,
  product_id integer not null,
  uword varchar2(100),
  constraint orders_pk primary key(order_id),
  constraint orders_fk foreign key(product_id) references product(product_id)
  );
  
  create table admin(
  admin_id integer not null,
  adminname varchar2(20) not null,
  password varchar2(20) not null,
  constraint admin_pk primary key(admin_id)
  );


]]>EOS让失业的工h扑ֈ工作,让专业的技术h员下?http://www.tkk7.com/algz/archive/2011/06/23/352855.html紫蝶∏飛揚↗紫蝶∏飛揚↗Thu, 23 Jun 2011 01:21:00 GMThttp://www.tkk7.com/algz/archive/2011/06/23/352855.htmlhttp://www.tkk7.com/algz/comments/352855.htmlhttp://www.tkk7.com/algz/archive/2011/06/23/352855.html#Feedback1http://www.tkk7.com/algz/comments/commentRss/352855.htmlhttp://www.tkk7.com/algz/services/trackbacks/352855.htmlq段日子Q普元到我们公司来推销EOSQ看了一下演C,感觉实做的不错。完全基于EclipseQ不但后台逻辑可视化,现在前台面也可以可视化开发。这个页面可视化开发不仅仅指的是像DW那样的可视,它集成了很多功能。比如:验证可以讄Q综合查询可以自由添加条Ӟ只要修改面Q,分页昄。针对单表,多表模式Q各有向|基本下一步,下一步就可以了。页面显C字D什么的Q在eclipse里面讄一下就可以了。也是说不页面还是后収ͼ你都不用declipsed成,以前q要开dwQ或则文本编辑器来写面Q用xmlbuddy来修改xml配置Q比如写了一个action,daction配置什么的Q而且完全可视话,面之间的流向完全可视话Q如果要换流到另外一个页面,把箭头拉一拉就可以了?
     后台逻辑在Eclipse里可以调试。而且有一个后台监控系l,感觉做的不错。出错的话,记录数据QsqlQ还有执行时_模块什么的Q基本上不用Llog扑ּ怺Q一般都能看出错误来?
     自带了权限系l。集成了工作?
     后期l护非常方便Q随便哪个h都可以维护,以前如果代码写的不好Q找bug能篏MhQ现在基本上来说是比较简单的Q玩不出花样来,大家都是一个样?
     可以生成完整的文档。对囑Ş做的注释什么的Q可以完全以htm,pdf的格式导出。这h档和开发可以保持一致?
     以前我们自己Zibatis,webwork,springQ写插g通过加注释生成了很多文g来完成后台开发,但感觉麻烦的是即使你后台文g全部生成了,但前台哪些链接也蛮麻烦的Q而且q要调试。我想写个插g向导用模板来完成面。现在看到EOSQ比我自己想象中做的q要好?
     感觉对于不是很复杂的pȝQ我们公司做的大部分pȝQ,天哪Q我要懂q么多框架干嘛,struts,webwork,hibernate,ibatis,spring{等Q用q些框架q要有很多繁琐的配置Q于是就自己来做很多自动生成的工作。现在,只要懂一个EOS可以了Q拖拖拉拉就可以完成Q那我要q些框架q吗Q不是完成q个pȝ嘛?
     虽然我感觉EOS完全是面向过E的Q但我们做的一般项目都不复杂,一般的目完全可以用它来开发。但感觉会砸了很多h的饭,因ؓ普通的开发h员,公司随便招个人就可以代替你?/div>

]]>
վ֩ģ壺 ĻӰԺ4hu| MVȫƵվ| ղһ| ˳ӰԺ߹ۿ | Ƶ߹ۿ| 츾avһ| һëƬ| 69˾ƷƵ | ¾þƵ| ѺܻڵƵëƬ| Ʒv߹ۿ| ƵѲ| ëƬ| ɫƷ | 97޳ҹҹ| ޿ѿ| ޾ƷƬþò| ɫվ߹ۿ | Ļһ| aƬ߹ۿ| һƷ| aػƵƬƵ| պѵӰ߹ۿ| Ʒ| 69ʽƵ| һaƵۿվ| Ʒ޾Ʒպͼ| ɫһ| AV| ߾Ʒ޵һ| һëƬ߲ŷƵ| δʮ˽˸ӰԺ| | ŷպĻһ| ޾Ʒר| ƷƬ߻| һ߹ۿ| Ƶ߹ۿ| 99þѾƷƵ| վѹۿ޹ | ɫһ|