<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[Resent Article List]]></title>
<link><![CDATA[http://www.kkito.cn/]]></link>
<description><![CDATA[kkito | kkito.cn | www.kkito.cn ]]></description>
<language>zh_CN</language>
<pubDate>2010-09-05 08:41:14</pubDate>
<lastBuildDate>2010-09-05 08:41:14</lastBuildDate>
<generator>Kkito RSS Generator</generator>
<item>
<title><![CDATA[浏览器矢量库 raphael js]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p><a href="http://raphaeljs.com/" target="_blank">http://raphaeljs.com/</a></p>
<p><a href="http://raphaeljs.com/reference.html" target="_blank">http://raphaeljs.com/reference.html</a></p>
<div style="background:#000000"><span style="font-family: monospace;"> <font color="#ffff00">&nbsp;1 </font><font color="#00ffff">&lt;</font><font color="#ffff00">html</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">&nbsp;2 </font>&nbsp;&nbsp;<font color="#00ffff">&lt;</font><font color="#ffff00">head</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">&nbsp;3 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#00ffff">&lt;</font><font color="#ffff00">title</font><font color="#00ffff">&gt;</font><font color="#ff40ff">test raphael</font><font color="#00ffff">&lt;/</font><font color="#ffff00">title</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">&nbsp;4 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#00ffff">&lt;</font><font color="#ffff00">script</font><font color="#00ffff">&nbsp;</font><font color="#00ff00">type</font><font color="#00ffff">=</font><font color="#ff6060">"text/javascript"</font><font color="#00ffff">&nbsp;</font><font color="#00ff00">src</font><font color="#00ffff">=</font><font color="#ff6060">"raphael-min.js"</font><font color="#00ffff">&gt;</font><font color="#00ffff">&lt;/</font><font color="#ffff00">script</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">&nbsp;5 </font><font color="#ff40ff">&nbsp;&nbsp;</font><font color="#00ffff">&lt;/</font><font color="#ffff00">head</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">&nbsp;6 </font>&nbsp;&nbsp;<font color="#00ffff">&lt;</font><font color="#ffff00">body</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">&nbsp;7 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&lt;</font><font color="#ffff00">div</font><font color="#00ffff">&nbsp;</font><font color="#00ff00">id</font><font color="#00ffff">=</font><font color="#ff6060">"notepad"</font><font color="#00ffff">&nbsp;</font><font color="#00ff00">style</font><font color="#00ffff">=</font><font color="#ff6060">"border:1px red solid;"</font><font color="#00ffff">&gt;</font><font color="#00ffff">&lt;/</font><font color="#ffff00">div</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">&nbsp;8 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&lt;</font><font color="#ffff00">script</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">&nbsp;9 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#00ffff">var</font><font color="#ff40ff">&nbsp;paper = Raphael</font>(<font color="#ffff00">document</font><font color="#ff40ff">.getElementById</font>(<font color="#ff6060">"notepad"</font>)<font color="#ff40ff">, </font>320<font color="#ff40ff">, </font>200)<font color="#ff40ff">;</font><br /> <font color="#ffff00">10 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#00ffff">var</font><font color="#ff40ff">&nbsp;c = paper.circle</font>(50<font color="#ff40ff">, </font>50<font color="#ff40ff">, </font>40)<font color="#ff40ff">;</font><br /> <font color="#ffff00">11 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#00ffff">var</font><font color="#ff40ff">&nbsp;c = paper.circle</font>(100<font color="#ff40ff">&nbsp;, </font>50<font color="#ff40ff">, </font>40)<font color="#ff40ff">;</font><br /> <font color="#ffff00">12 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;paper.rect</font>(10<font color="#ff40ff">, </font>10<font color="#ff40ff">, </font>50<font color="#ff40ff">, </font>50)<font color="#ff40ff">;</font><br /> <font color="#ffff00">13 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;paper.ellipse</font>(50<font color="#ff40ff">, </font>50<font color="#ff40ff">, </font>40<font color="#ff40ff">, </font>20)<font color="#ff40ff">;</font><br /> <font color="#ffff00">14 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;paper.image</font>(<font color="#ff6060">"<a href="http://mail.google.com/mail/help/images/logo2.gif">http://mail.google.com/mail/help/images/logo2.gif</a>"</font><font color="#ff40ff">, </font>200<font color="#ff40ff">, </font>10<font color="#ff40ff">, </font>80<font color="#ff40ff">, </font>80)<font color="#ff40ff">;</font><br /> <font color="#ffff00">15 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;paper.text</font>(300<font color="#ff40ff">, </font>50<font color="#ff40ff">, </font><font color="#ff6060">"Raphael kicks butt!"</font>)<font color="#ff40ff">;</font><br /> <font color="#ffff00">16 </font><font color="#ff40ff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#00ffff">&lt;/</font><font color="#ffff00">script</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">17 </font>&nbsp;&nbsp;<font color="#00ffff">&lt;/</font><font color="#ffff00">body</font><font color="#00ffff">&gt;</font><br /> <font color="#ffff00">18 </font><font color="#00ffff">&lt;/</font><font color="#ffff00">html</font><font color="#00ffff">&gt;</font><br /> </span></div>
<p>&nbsp;</p>]]></description>
<pubDate>2010-9-2 11:05:28</pubDate>
</item>
<item>
<title><![CDATA[学习html5的canvas]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p>随便抽空看一下</p>
<p><a href="http://kb.operachina.com/node/190" target="_blank">http://kb.operachina.com/node/190</a></p>
<pre class="syntax_jscript">      var elem = document.getElementById('myCanvas');

      // Always check for properties 和 methods, to make sure your code doesn't break 
      // in other browsers.
      if (elem &amp;&amp; elem.getContext) {
        // Get the 2d context.
        // Remember: you can only initialize one context per element.
        var context = elem.getContext('2d');
        if (context) {
          // You are done! Now you can draw your first rectangle.
          // You only need to provide the (x,y) coordinates, followed by the width and 
          // height dimensions.
          context.fillStyle   = '#00f'; // blue
          context.strokeStyle = '#f00'; // red
          context.lineWidth   = 4;

          context.fillRect(10, 10, 150, 100);

          context.fillRect  (0,   0, 150, 50);
          context.strokeRect(0,  60, 150, 50);
          context.clearRect (30, 25,  90, 60);
          context.strokeRect(30, 25,  90, 60);
          alert(context);
          alert(context.drawLine);

        }
      }

</pre>
<p>&nbsp;</p>]]></description>
<pubDate>2010-8-30 17:23:01</pubDate>
</item>
<item>
<title><![CDATA[ruby active ldap]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p>之前说的ruby-ldap似乎不是很靠谱</p>
<p>用了activeldap</p>
<p><a href="http://ruby-activeldap.rubyforge.org/" target="_blank">http://ruby-activeldap.rubyforge.org/</a><br /><a href="http://ruby-activeldap.rubyforge.org/doc/" target="_blank">http://ruby-activeldap.rubyforge.org/doc/</a></p>
<p>&nbsp;</p>
<pre class="syntax_ruby">ActiveLdap::Base.setup_connection :host =&gt; '192.168.0.10', :base =&gt; 'dc=saybot,dc=com' , :bind_dn =&gt; 'cn=kk.shen,cn=users,dc=saybot,dc=com' , :password_block =&gt; Proc.new { 'mypassword' } , :try_sasl =&gt; true
ActiveLdap::Base.search(:base =&gt; 'dc=example,dc=com', :filter =&gt; '(uid=roo*)', :scope =&gt; :sub, :attributes =&gt; ['uid', 'cn'])
ActiveLdap::Base.search(:base =&gt; 'dc=saybot,dc=com' , :filter =&gt; '(uid=kk*)', :scope =&gt; :sub, :attributes =&gt; ['uid', 'cn'])

ActiveLdap::Base.search(:base =&gt; 'dc=saybot,dc=com' , :filter =&gt; '(uid=kk.shen,)', :scope =&gt; :sub, :attributes =&gt; ['uid', 'cn' , 'gidNumber' , 'userPassword'])
ActiveLdap::Base.search(:base =&gt; 'dc=saybot,dc=com' , :filter =&gt; '(uid=kk.shen)(gidNumber=100)', :scope =&gt; :sub, :attributes =&gt; ['uid', 'cn' , 'gidNumber' , 'userPassword'])
</pre>]]></description>
<pubDate>2010-8-23 14:43:19</pubDate>
</item>
<item>
<title><![CDATA[ruby ssh scp 和ldap]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p><a href="http://www.tutorialspoint.com/ruby/ruby_ldap.htm" target="_blank">http://www.tutorialspoint.com/ruby/ruby_ldap.htm</a><br /><a href="http://ruby-ldap.sourceforge.net/rdoc/" target="_blank">http://ruby-ldap.sourceforge.net/rdoc/</a><br />安装<br />gem install ruby-ldap<br />出错<br />装了个libsasl2-dev的包<br />gem install ruby-ldap成功</p>
<p>&nbsp;</p>
<p><a href="http://net-ssh.rubyforge.org/" target="_blank">http://net-ssh.rubyforge.org/</a></p>
<p><a href="http://net-ssh.rubyforge.org/scp/v1/api/classes/Net/SCP.html" target="_blank">http://net-ssh.rubyforge.org/scp/v1/api/classes/Net/SCP.html</a><br /><br /><a href="http://net-ssh.rubyforge.org/ssh/v2/api/index.html" target="_blank">http://net-ssh.rubyforge.org/ssh/v2/api/index.html</a></p>
<p>例子恩</p>]]></description>
<pubDate>2010-8-20 11:31:44</pubDate>
</item>
<item>
<title><![CDATA[php使用ldap]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p>看了下文档，没有试过，争取试试</p>
<p><a href="http://php.net/manual/en/book.ldap.php" target="_blank">http://php.net/manual/en/book.ldap.php</a><br /><a href="http://php.net/manual/en/ref.ldap.php" target="_blank">http://php.net/manual/en/ref.ldap.php</a><br /><a href="http://www.php.net/manual/en/function.ldap-connect.php" target="_blank">http://www.php.net/manual/en/function.ldap-connect.php</a></p>
<p>...</p>
<pre class="syntax_php">$ldapconn = ldap_connect($ldaphost, $ldapport);
$ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);
ldap_search($ldapconn,"dc=my-domain,dc=com", "(cn=*)")
$info = ldap_get_entries($conn, $result);
ldap_close($conn);
</pre>
<p>&nbsp;</p>]]></description>
<pubDate>2010-8-16 14:50:54</pubDate>
</item>
<item>
<title><![CDATA[php使用ssh scp等]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p>php需要远程登录的时候可以用</p>
<p><a href="http://php.net/manual/en/book.ssh2.php" target="_blank">http://php.net/manual/en/book.ssh2.php</a></p>
<p><a href="http://www.php.net/manual/en/function.ssh2-scp-send.php" target="_blank">http://www.php.net/manual/en/function.ssh2-scp-send.php</a></p>
<p>eg:</p>
<p>&nbsp;</p>
<pre class="syntax_php">$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
ssh2_scp_send($connection, '/local/filename', '/remote/filename', 0644);
</pre>
<p>&nbsp;</p>]]></description>
<pubDate>2010-8-16 14:43:31</pubDate>
</item>
<item>
<title><![CDATA[龙曲的工作职责]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p>
<p>1.<span style="white-space: pre;"> </span>Get reference price by understanding the raw material cost and material production process.</p>
<p>2.<span style="white-space: pre;"> </span>Search for new suppliers to get more competitive price, push SQE to survey new supplier,push RD/PE to run approval process until the new vendor is approved and MP smoothly .</p>
<p>3.<span style="white-space: pre;"> </span>Requst suppliers to provide formal quotation, and select the most competitive vendor by try all ways to let vendor to promote the best price.</p>
<p>4.<span style="white-space: pre;"> </span>Base on all vendors&rsquo; price and actual capacity to allocate order.</p>
<p>5.<span style="white-space: pre;"> </span>Co-work with RD to help vendor to innovate production processes or change raw material to save cost.</p>
<p>6.<span style="white-space: pre;"> </span>Audit vendors periodical to ensure vendors have enough capacity and safety quality.</p>
<p>7.<span style="white-space: pre;"> </span>Base on MPS to work out material demand schedule.</p>
<p>8.<span style="white-space: pre;"> </span>Provide forecast and PO to vendors, get vendors&rsquo; confirmation for delivery schedule (PSI).</p>
<p>9.<span style="white-space: pre;"> </span>Reduce inventory by JIT and VMI, monitor vendors&rsquo; JIT on time and stock in VMI</p>
</p>]]></description>
<pubDate>2010-8-9 13:00:18</pubDate>
</item>
<item>
<title><![CDATA[mysql union]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p><a href="http://dev.mysql.com/doc/refman/5.0/en/union.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/union.html</a></p>
<p>QA mm用子查询效率很慢找到了union的方法，我也顺带学习学习</p>
<p>发觉用处不大，不过挺搞怪的，可能零时查查还有些用户</p>]]></description>
<pubDate>2010-7-29 15:46:35</pubDate>
</item>
<item>
<title><![CDATA[amf3 socket server]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p>用了rocket amf ， 有些问题 ， Externalized的话没法处理，不过别的都不错</p>
<pre class="syntax_ruby">require 'rubygems'
require 'eventmachine'
require 'rocketamf'

RocketAMF::ClassMapper.define do |m|
  m.map :as =&gt; 'User', :ruby =&gt; 'User'
  #m.map :as =&gt; 'vo.User', :ruby =&gt; 'Model::User'
end

class User
  attr_accessor :name
  attr_accessor :age

  def initialize(name = 'kk' , age = 1)
    @name = name
    @age = age
  end

  def to_amf serializer
    stream = ""
    if serializer.version == 0
      p "to amf 0"
      data = {
        :name=&gt; @name,
        :age=&gt; @age
      }
      serializer.write_hash(data, stream)
    else
      p "to amf 3"
      serializer.write_object(self, stream)
    end
    ret = stream
    p ret
    ret
  end


end


class AmfServer &lt; EM::Connection
  def post_init
    p "post init!!!!!!!"
  end

  def unbind
    p  "unbinddding!!!!!"
  end

  def receive_data data
    p data
    obj = RocketAMF.deserialize(data, 3)
    p obj
    p obj.name
    p obj.age
  end

end

EM::run do
  EM::start_server 'localhost' , 8088 , AmfServer
end

</pre>
<p>&nbsp;</p>]]></description>
<pubDate>2010-7-9 15:54:41</pubDate>
</item>
<item>
<title><![CDATA[socket client amf3 ]]></title>
<link><![CDATA[http://www.kkito.cn]]></link>
<description><![CDATA[<p>// client.as</p>
<pre class="syntax_java">package
{
	import flash.display.Sprite;
	import flash.events.*;
	import flash.net.Socket;
	import flash.text.TextField;
	import flash.net.registerClassAlias;
	
	public class amfclient extends Sprite
	{
		protected var txt:TextField = new TextField();
		public function amfclient()
		{
			registerClassAlias("User", User);
			
			txt.text = 'hello world';
			txt.x = 10;
			txt.y = 10;
			txt.addEventListener(MouseEvent.CLICK , clickHandler);
			this.addChild(txt);
			
		}
		
		public function clickHandler(e:MouseEvent):void{
			txt.text = 'ok';
			var client:Socket = new Socket();
			client.connect('localhost' , 8088);
			var msg:String = "hello i am amf clientt1";
			msg = 'hello i ';
			//传过去还是带了一个长度信息在前面的
			//client.writeUTF(msg);
			var tt = ['aa' , 'bb'];
			var user = new User();
			client.writeObject(user);
			client.flush();
		}
	}
}
</pre>
<p>&nbsp;// User.as</p>
<pre class="syntax_java">package
{
	import flash.utils.IExternalizable;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;

	public class User implements IExternalizable
	{
		
		public var name:String;
		public var age:int;
		
		public function User()
		{
			name = 'helloo';
			age = 12;
		}
		
		public function readExternal(input:IDataInput):void {
			//id = input.readUnsignedInt();
			name = input.readUTF();
		}
		
		public function writeExternal(output:IDataOutput):void {
			//output.writeInt(age);
			output.writeUTF(name);
			
		}
	}
}
</pre>
<p>&nbsp;</p>]]></description>
<pubDate>2010-7-9 15:52:02</pubDate>
</item>
</channel>
</rss>