posts - 59, comments - 34, trackbacks - 0, articles - 0

置顶随笔

PEM : Privacy Enhanced Mail 隐私增强邮件
      是使用多种加密方式提供机密性、认证、信息完整性的因特网电子邮件,在因特网中没有被广泛配置;
      而现在更多的是用作密钥格式,并且可包含私钥(RSA和DSA)、公钥(RSA和DSA)、X509证书,它存储ASCII包装的BASE64编码的DER数据,适用于系统之间的文本模式传输。

DER : Distinguished Encoding Rules 分布式编码规则
      也可包含私钥、公钥和证书,它是大多数浏览器的默认证书格式,并且按ASN 1 DER 格式存储进行存储。(它没有头部-PEM是有文本头部包装的DER)。

VoIP : Voice over Internet Protocol 网络语音传输

SIP : Session Initiation Protocol 会话发起协议

posted @ 2009-03-04 15:42 Fingki.li 阅读(15) | 评论 (0)编辑 收藏

Good Address:

Command Line Tools for win32  
http://www.vkill.net/tools.html

脚本中心脚本库网址:
http://www.microsoft.com/china/technet/community/scriptcenter/scripts/default.mspx

有关用户和组的脚本(找得我好辛苦呀)
http://www.microsoft.com/china/technet/community/scriptcenter/user/default.mspx

最近发现一个不错的jdk6 source网站,收藏一下:
http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Modules-sun/security/sun/security/krb5/internal/ktab/KeyTab.java.htm

http://developer.classpath.org/doc/

http://fuseyism.com/classpath/doc/

http://kickjava.com/src/

http://www.docjar.com/

VbScript语言参考
http://book.chinaz.com/VBScript/vbsdocs/vbstoc.htm

SUN网站
http://www.java.sun.com
http://java.sun.com/javase/technologies/security/


posted @ 2008-07-21 11:50 Fingki.li 阅读(26) | 评论 (0)编辑 收藏

2009年5月21日

     摘要: jquery css hover  阅读全文

posted @ 2009-05-21 10:51 Fingki.li 阅读(881) | 评论 (0)编辑 收藏

2009年4月23日

DWR 2.0.5,
方法使用对象参数时报错如下:
Erroring: batchId[0] message[org.directwebremoting.extend.MarshallException: Error marshalling test.User:

一个最可能的原因是 User没有一个无参的construction。

晕。。。
朋友们注意呀!

posted @ 2009-04-23 15:23 Fingki.li 阅读(911) | 评论 (0)编辑 收藏

2009年4月10日

对于以太网环境下UDP传输中的数据包长度问题

首先要看TCP/IP协议,涉及到四层:链路层,网络层,传输层,应用层。
其中以太网(Ethernet)的数据帧在链路层
IP包在网络层
TCP或UDP包在传输层
TCP或UDP中的数据(Data)在应用层
它们的关系是 数据帧{IP包{TCP或UDP包{Data}}}
在应用程序中我们用到的Data的长度最大是多少,直接取决于底层的限制。
我们从下到上分析一下:
在链路层,由以太网的物理特性决定了数据帧的长度为(46+18)-(1500+18),其中的18是数据帧的头和尾,也就是说数据帧的内容最大为1500,即MTU(Maximum Transmission Unit)为1500;
在网络层,因为IP包的首部要占用20字节,所以这的MTU为1500-20=1480;
在传输层,对于UDP包的首部要占用8字节,所以这的MTU为1480-8=1472;
所以,在应用层,你的Data最大长度为1472。
(当我们的UDP包中的数据多于MTU(1472)时,发送方的IP层需要分片fragmentation进行传输,而在接收方IP层则需要进行数据报重组,由于UDP是不可靠的传输协议,如果分片丢失导致重组失败,将导致UDP数据包被丢弃)。
从上面的分析来看,在普通的局域网环境下,UDP的数据最大为1472字节最好(避免分片重组)。
但在网络编程中,Internet中的路由器可能有设置成不同的值(小于默认值),Internet上的标准MTU值为576,所以Internet的UDP编程时数据长度最好在576-20-8=548字节以内。
MTU对我们的UDP编程很重要,那如何查看路由的MTU值呢?
对于windows OS: ping -f -l <data_length> <gateway_IP>
如:ping -f -l 1472 192.168.0.1
如果提示:Packets needs to be fragmented but DF set.
则表明MTU小于1500,不断改小data_length值,可以最终测算出gateway的MTU值;
对于linux OS: ping -c <number> -M do -s <data_length> <gateway_IP>
如: ping -c 1 -M do -s 1472 192.168.0.1
如果提示 Frag needed and DF set……
则表明MTU小于1500,可以再测以推算gateway的MTU。
当然要修改MTU的值,那就是网管的事了(一般人没这权限呀),我们只能申请加等待了 ^-^ .

posted @ 2009-04-10 16:35 Fingki.li 阅读(1225) | 评论 (0)编辑 收藏

2009年3月24日

从JDK5开始就已经增加了对VM的监控功能jconsole,JDK1.6也有了进一步的改进。
然而对linux特别是Ubuntu用户来说,会碰到一些小问题。
在终端进入java_home/bin目录下,
# jconsole
结果报错如下:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

原因就是在ubuntu下用java写Swing应用程序时不能使用SystemLookAndFeel
实际上出现这个问题是因为swing的默认laf采用systemlaf,而Ubuntu里却没有定义这个laf。
一种很方便的解决方法就是把语言环境改成英文:
# export LANG=en
但对中文用户很不方便(尽管swing程序可以运行)。
另一种方法就是程序启动时加上jvm运行时参数,比如 运行jconsole :
# jconsole -J-Dswing.systemlaf=javax.swing.plaf.metal.MetalLookAndFeel

另外,jconsole对于hostname也有要求,如果执行:
# hostname -i
显时 127.0.0.1,则需要在 /etc/hosts中把127.0.0.1改成机器的外网IP。
这下,我们就又多了一个jvm分析的利器。

posted @ 2009-03-24 11:45 Fingki.li 阅读(1222) | 评论 (2)编辑 收藏

2009年3月5日

Kraken plugin as IM gateway is developed separately from openfire.
It is built alongside openfire.
Kraken build Detail:http://kraken.blathersource.org/node/9
But I still encountered this problem when I did that.
When I run the step:ant release,I found the following error,although BUILD SUCCESS,
Error:
  [jasper2] 409  DEBUG No Java compiler available
  [jasper2] java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/env/INameEnvironment

NoClassDefFound,obviously,there is no class named 'INameEnvironment',
I run 'find ./ -name jdt*' ,there is nothing really.
I know that it need a jar named 'jdt-compiler' via google,so I download it.
If you can find it to download you can come the following site:
http://fisheye1.atlassian.com/viewrep/springframework/spring/lib/jdt     or
http://softwarelivre.sapo.pt/projects/ptpos/browser/openbravopos/trunk/build/zip/lib/jdt-compiler-3.1.1.jar?rev=35
I get jdt-compiler-3.1.1.jar from the site mentioned above,and put it into the java lib directory;
then,add a line :<pathelement location="${java.home}/../lib/jdt-compiler-3.1.1.jar"/> in classpath of taskdef named 'jasper2' in the build.xml of Openfire
So far so good ,I have fixed it.

posted @ 2009-03-05 17:47 Fingki.li 阅读(793) | 评论 (0)编辑 收藏

2009年3月4日

PEM : Privacy Enhanced Mail 隐私增强邮件
      是使用多种加密方式提供机密性、认证、信息完整性的因特网电子邮件,在因特网中没有被广泛配置;
      而现在更多的是用作密钥格式,并且可包含私钥(RSA和DSA)、公钥(RSA和DSA)、X509证书,它存储ASCII包装的BASE64编码的DER数据,适用于系统之间的文本模式传输。

DER : Distinguished Encoding Rules 分布式编码规则
      也可包含私钥、公钥和证书,它是大多数浏览器的默认证书格式,并且按ASN 1 DER 格式存储进行存储。(它没有头部-PEM是有文本头部包装的DER)。

VoIP : Voice over Internet Protocol 网络语音传输

SIP : Session Initiation Protocol 会话发起协议

posted @ 2009-03-04 15:42 Fingki.li 阅读(15) | 评论 (0)编辑 收藏

2009年2月27日

经过漫长的配置,终于搞定了windows AD、domain和Exchange2007,
新建了帐户后,用户 fingki 密码 ************** 邮件 fingki@mydomain.com 在另一台win xp上测试。
这里要注意DNS的配置,且要打开服务 services,确定pop3等邮件服务都已经启动。
首先加入该域 mydomain.com
然后 重启,用fingki登录该域,一切还算顺利。
再 测试邮件收发,启动Outlook,用fingki@mydomain.com新建一outlook帐户,邮件服务器用户名 fingki密码************;其他的是默认配置。
测试给administrator@mydomain.com发一封邮件,正常,然后再给自己发一封;
接收邮件时,提示:由于服务器拒绝接受发件人的电子邮件地址,这封邮件无法发送。...服务器响应: '530 5.7.1 Client was not authenticated', 端口: 25, 安全(SSL): 否, 服务器错误: 530, 错误号: 0x800CCC78.
奇怪。
后来发现,原来exchange2007默认是采用ssl安全传输的,需要对 pop3设置安全连接,端口会默认变为995。(即选中:“此服务器要求安全连接SSL”)。
按上面要求 设置pop3为SSL连接。接收邮件就正常了。
(网上也有朋友说是DNS的MX记录丢失,但显然我的不属于这种情况)。
另外,很有意思的是如果你为Exchange用户设定多个电子邮件地址(当然只会有一个为默认邮件地址,或叫主地址),当有人给你向这多个地址中发送邮件时,这些邮件都会发到你的主地址邮箱中。

posted @ 2009-02-27 11:05 Fingki.li 阅读(1160) | 评论 (0)编辑 收藏

2009年2月26日

View cpu information command:
1 # dmesg | grep CPU
2 # cat /proc/cpuinfo

you can find the following from the show :AMD Athlon(tm) 64 X2 Dual Core Processor 4000+
It tell you :64bit cpu

View OS version:
# cat /proc/version
you can see information similar to the following:
Linux version 2.6.24-21-generic (buildd@palmer) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Tue Oct 21 23:43:45 UTC 2008

View OS bit num:
# getconf LONG_BIT
you can see :32 or 64.


posted @ 2009-02-26 10:42 Fingki.li 阅读(34) | 评论 (0)编辑 收藏

2009年2月25日

     摘要: If you install im gateway plugin firstly, perhaps you did not encounter this problem.
If you upgrade your im gateway plugin, perhaps you have been in trouble.
Unfortunately,I encountered this problem some days ago.
I used the openfire 3.4.5, and it contains the gateway plugins;  阅读全文

posted @ 2009-02-25 16:58 Fingki.li 阅读(909) | 评论 (0)编辑 收藏

2009年2月23日

     摘要: sudoer application Launcher
On Ubuntu,run applications as sudo via Application Launcher  阅读全文

posted @ 2009-02-23 12:33 Fingki.li 阅读(980) | 评论 (0)编辑 收藏