﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-yzx99-最新评论</title><link>http://www.cnblogs.com/yzx99/CommentsRSS.aspx</link><description /><language>zh-cn</language><pubDate>Thu, 21 Aug 2008 08:05:29 GMT</pubDate><lastBuildDate>Thu, 21 Aug 2008 08:05:29 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: 工会电子阅览室经营计划书</title><link>http://www.cnblogs.com/yzx99/archive/2008/08/21/1273132.html#1293591</link><dc:creator>aax</dc:creator><author>aax</author><pubDate>Thu, 21 Aug 2008 06:48:35 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/08/21/1273132.html#1293591</guid><description><![CDATA[电子阅览室就是阅览室，硬要加入培训因素，这就是工会不采用这个方案的原因。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">aax</a> 2008-08-21 14:48 <a href="http://www.cnblogs.com/yzx99/archive/2008/08/21/1273132.html#1293591#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 工会电子阅览室经营计划书</title><link>http://www.cnblogs.com/yzx99/archive/2008/08/21/1273132.html#1293583</link><dc:creator>水果阿生</dc:creator><author>水果阿生</author><pubDate>Thu, 21 Aug 2008 06:43:36 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/08/21/1273132.html#1293583</guid><description><![CDATA[您干吗呢？<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">水果阿生</a> 2008-08-21 14:43 <a href="http://www.cnblogs.com/yzx99/archive/2008/08/21/1273132.html#1293583#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: VS2008 javascript智能感知</title><link>http://www.cnblogs.com/yzx99/archive/2008/08/11/1264835.html#1283205</link><dc:creator>rex</dc:creator><author>rex</author><pubDate>Mon, 11 Aug 2008 03:03:26 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/08/11/1264835.html#1283205</guid><description><![CDATA[关注<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">rex</a> 2008-08-11 11:03 <a href="http://www.cnblogs.com/yzx99/archive/2008/08/11/1264835.html#1283205#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: javascript画图库</title><link>http://www.cnblogs.com/yzx99/archive/2008/08/06/1260838.html#1278922</link><dc:creator>yzx99</dc:creator><author>yzx99</author><pubDate>Tue, 05 Aug 2008 17:07:08 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/08/06/1260838.html#1278922</guid><description><![CDATA[<p>由于它的画图方法是用一个个的DIV来组合而成，只是有些优化而已，下图就是说明它是如何优化的<br />
<br />
<img height="134" alt="" src="http://images.cnblogs.com/cnblogs_com/yzx99/08080601.gif" width="350" border="0" /><br />
脚本中插入元素的关键代码如下：<br />
&#8230;&#8230;<br />
//将一个矩形框加入HTML中<br />
function _mkDivIe(x, y, w, h)<br />
{<br />
&nbsp;this.htm += '%%'+this.color+';'+x+';'+y+';'+w+';'+h+';';<br />
}<br />
&#8230;&#8230;<br />
//用正则表达式替换成DIV元素<br />
var _regex =&nbsp; /%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;<br />
function _htmRpc()<br />
{<br />
&nbsp;return this.htm.replace(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _regex,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&lt;div </p>
<p>style="overflow:hidden;position:absolute;background-color:'+<br />
&nbsp;&nbsp;'$1;left:$2;top:$3;width:$4;height:$5"&gt;&lt;/div&gt;\n');<br />
}<br />
&#8230;&#8230;</p>
<p>如果我们对第一段代码如用下去替换：<br />
var _i=0;<br />
var _c=new Array("pink","black","red","blue","yellow","green");<br />
function _mkDivIe(x, y, w, h)<br />
{<br />
&nbsp;_i++;<br />
&nbsp;_i = _i % 6;<br />
&nbsp;this.htm += '%%'+_c[_i]+';'+x+';'+y+';'+w+';'+h+';';<br />
}<br />
你再画一些东西，用放大镜去看，就知道了。<br />
以下是代码&nbsp; jg.fillArc(20, 20, 40, 40, 220.0, 270.0); 画出来的对比图<br />
</p>
<p><img height="36" alt="" src="http://images.cnblogs.com/cnblogs_com/yzx99/080806A.gif" width="33" border="0" /><br />
<img height="146" alt="" src="http://images.cnblogs.com/cnblogs_com/yzx99/080806B.gif" width="150" border="0" /><br />
这种画图方式速度可能会慢（它的主页展示时，特别显示出花费时间，说明大家都担心它的时间问题），并且占的资源也会大（就我上面的示例HTML，在按钮点之前IE占的内存13484K，点之后内存为15372K，接近2M）。所以这种画图方法应该不会做为发展主流，因此你自己要决定是否要花时间去完善根据这种方法建立起来的图形脚本。<br />
</p>
<p>我是因为一个程序中想实现简单的甘特图功能，所以找到这个的。没有它，我自己也是要用DIV去实现，因此我在那个程序中使用了这个脚本。</p>
<p><br />
网页上画图的方法应该还有其它几种选择，如：SVG、OWC、VML等，大家应该根据自身情况去选择。</p>
<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">yzx99</a> 2008-08-06 01:07 <a href="http://www.cnblogs.com/yzx99/archive/2008/08/06/1260838.html#1278922#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: javascript画图库</title><link>http://www.cnblogs.com/yzx99/archive/2008/08/05/1260838.html#1278386</link><dc:creator>时间太快</dc:creator><author>时间太快</author><pubDate>Tue, 05 Aug 2008 06:23:43 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/08/05/1260838.html#1278386</guid><description><![CDATA[要是客户端屏蔽JavaScript脚本，这个功能就无法使用？？<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">时间太快</a> 2008-08-05 14:23 <a href="http://www.cnblogs.com/yzx99/archive/2008/08/05/1260838.html#1278386#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: javascript画图库</title><link>http://www.cnblogs.com/yzx99/archive/2008/08/05/1260838.html#1278308</link><dc:creator>wwwyfjp</dc:creator><author>wwwyfjp</author><pubDate>Tue, 05 Aug 2008 05:06:49 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/08/05/1260838.html#1278308</guid><description><![CDATA[请问一下能画出比较复杂的饼图， 或者是折线图吗？ 比如说有立体效果的， 并且带有数据支持的。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">wwwyfjp</a> 2008-08-05 13:06 <a href="http://www.cnblogs.com/yzx99/archive/2008/08/05/1260838.html#1278308#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: javascript返回多个参数</title><link>http://www.cnblogs.com/yzx99/archive/2008/08/05/1260561.html#1278210</link><dc:creator>火无极</dc:creator><author>火无极</author><pubDate>Tue, 05 Aug 2008 03:41:39 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/08/05/1260561.html#1278210</guid><description><![CDATA[返回数组，以前也遇到过。<br/>后面的一种以对象的形式返回结果，使用命名参数的形式，学习了。呵呵<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">火无极</a> 2008-08-05 11:41 <a href="http://www.cnblogs.com/yzx99/archive/2008/08/05/1260561.html#1278210#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: string的相关知识点</title><link>http://www.cnblogs.com/yzx99/archive/2008/08/02/1258501.html#1275375</link><dc:creator>陈晨</dc:creator><author>陈晨</author><pubDate>Sat, 02 Aug 2008 02:15:39 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/08/02/1258501.html#1275375</guid><description><![CDATA[String s1=new String('*', 5);<br/>生成&quot;*****&quot;这个字符串给s1<br/>-----------------------------<br/>构造函数：public String (char c,int count)<br/>初始化为由重复指定次数的指定 Unicode 字符指示的值<br/><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">陈晨</a> 2008-08-02 10:15 <a href="http://www.cnblogs.com/yzx99/archive/2008/08/02/1258501.html#1275375#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 《大话设计模式》第八章</title><link>http://www.cnblogs.com/yzx99/archive/2008/07/29/1255964.html#1271481</link><dc:creator>yzx99</dc:creator><author>yzx99</author><pubDate>Tue, 29 Jul 2008 14:41:25 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/07/29/1255964.html#1271481</guid><description><![CDATA[using System;<br/><br/>class m<br/>{<br/> public static void Main()<br/> {<br/>  OperationFactory of=new OperationFactory();<br/>  Operation o1=of.CreateOperate(&quot;+&quot;);<br/>  o1.NumberA = 12;<br/>  o1.NumberB = 13;<br/>  Console.WriteLine(o1.GetResult());<br/><br/>  Operation o2=of.CreateOperate(&quot;+&quot;);<br/>  o2.NumberA = 32;<br/>  o2.NumberB = 72;<br/>  Console.WriteLine(o2.GetResult());<br/><br/>//***************************<br/><br/>  IFactory F1=new AddFactory();<br/><br/>  Operation O1=F1.CreateOperation();<br/>  O1.NumberA = 12;<br/>  O1.NumberB = 13;<br/>  Console.WriteLine(O1.GetResult());<br/><br/>  Operation O2=F1.CreateOperation();<br/>  O2.NumberA = 32;<br/>  O2.NumberB = 72;<br/>  Console.WriteLine(O2.GetResult());<br/> }<br/>}<br/><br/>class Operation<br/>{<br/> public double NumberA;<br/> public double NumberB;<br/><br/> public virtual double GetResult()<br/> {<br/>  return 0;<br/> }<br/>}<br/><br/>class Add : Operation<br/>{<br/> public override double GetResult()<br/> {<br/>  return NumberA + NumberB;<br/> }<br/>}<br/><br/>class Sub : Operation<br/>{<br/> public override double GetResult()<br/> {<br/>  return NumberA - NumberB;<br/> }<br/>}<br/><br/>class Mul : Operation<br/>{<br/> public override double GetResult()<br/> {<br/>  return NumberA * NumberB;<br/> }<br/>}<br/><br/>class Div : Operation<br/>{<br/> public override double GetResult()<br/> {<br/>  if (NumberB==0)<br/>   throw new Exception(&quot;除数不能为0。&quot;);<br/>  else<br/>   return NumberA / NumberB;<br/> }<br/>}<br/><br/>class OperationFactory<br/>{<br/> public Operation CreateOperate(string sOperation)<br/> {<br/>  switch (sOperation)<br/>  {<br/>   case &quot;+&quot;:<br/>    return new Add();<br/>   case &quot;-&quot;:<br/>    return new Sub();<br/>   default:<br/>    return new Operation();<br/>  }<br/> }<br/>}<br/><br/>interface IFactory<br/>{<br/> Operation CreateOperation();<br/>}<br/><br/>class AddFactory : IFactory<br/>{<br/> public Operation CreateOperation()<br/> {<br/>  return new Add();<br/> }<br/>}<br/><br/>class SubFactory : IFactory<br/>{<br/> public Operation CreateOperation()<br/> {<br/>  return new Sub();<br/> }<br/>}<br/><br/>class MulFactory : IFactory<br/>{<br/> public Operation CreateOperation()<br/> {<br/>  return new Mul();<br/> }<br/>}<br/><br/>class DivFactory : IFactory<br/>{<br/> public Operation CreateOperation()<br/> {<br/>  return new Div();<br/> }<br/>}<br/><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">yzx99</a> 2008-07-29 22:41 <a href="http://www.cnblogs.com/yzx99/archive/2008/07/29/1255964.html#1271481#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 《大话设计模式》第七章</title><link>http://www.cnblogs.com/yzx99/archive/2008/07/29/1255952.html#1271471</link><dc:creator>yzx99</dc:creator><author>yzx99</author><pubDate>Tue, 29 Jul 2008 14:33:41 GMT</pubDate><guid>http://www.cnblogs.com/yzx99/archive/2008/07/29/1255952.html#1271471</guid><description><![CDATA[<pre style="font-family:宋体; font-size:9pt"><br>我想象的代理<br>using System;<br>class m<br>{<br> public static void Main()<br> {<br>  Girl jj=new Girl("娇娇");<br>  Boy  xc=new Boy("小蔡");<br>  Proxy dn=new Proxy("大鸟", xc);<br>  dn.GiveGift(jj, "洋娃娃");<br> }<br>}<br>class Man<br>{<br> public string name="";<br> public Man(string name)<br> {<br>  this.name=name;<br> }<br>}<br>class Girl : Man<br>{<br> public Girl(string name):base(name)<br> {<br> }<br>}<br>interface action<br>{<br> void GiveGift(Girl g, string gift);<br>}<br>class Boy : Man, action<br>{<br> public Boy(string name):base(name)<br> {<br> }<br> public void GiveGift(Girl g, string gift)<br> {<br>  Console.WriteLine("{0} 送 {1} 给 {2}", name, gift, g.name);<br> }<br>}<br>class Proxy : Man, action<br>{<br> Boy b=null;<br> public Proxy(string name, Boy b):base(name)<br> {<br>  this.b=b;<br> }<br> public void GiveGift(Girl g, string gift)<br> {<br>  Console.WriteLine("{0} 对 {1} 说：", name, g.name);<br>  b.GiveGift(g, gift);<br> }<br>}<br></pre><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/yzx99/" target="_blank">yzx99</a> 2008-07-29 22:33 <a href="http://www.cnblogs.com/yzx99/archive/2008/07/29/1255952.html#1271471#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>