Skip to main content

Posts

如何正确的显示SVG ---- 关于CSM01作业第二步的基本指南

SVG+XSL+XML:很有意思的说!但想正确的捣鼓出来东西,还是有点麻烦,甚至烦人! 首先,这部分作业的要求是用SVG来显示XML里的坐标等信息。要取的XML中的信息必须用XSL(目前来看)。所以。。。。 1) 写XSL文件,包含SVG代码,取得XML中的数据 ! 这样显示XML文件是没有效果的,需要把XSL文件转换成SVG文件并最终用游览器显示出来。看看上篇文章,我说过我不知道XALAN是何妨妖孽 现在知道了,它就是用来转换的!具体信息可以看 XALAN官方网站 的介绍。 在命令窗口中运行: xalan -in rtm_tpeg.xml -xsl myxsl.xsl -out result.svg 就这句,转换完成!(rtm_tpeg.xml myxsl.xsl result.svg分别是你自己的文件名,请对号入坐!) 3)别高兴的太早。。。你有XALAN吗? 教程2:XALAN安装 去其官方下载,解压就是安装,配置CLASSPATH在你的环境变量里! 控制面板----系统----高级----环境变量 新建--->变量名:XALAN_HOME 变量值:D:\Programming\xerces-2_9_0 (xalan的路径) 修改--->变量名:CLASSPATH 变量值: %XALAN_HOME%\tools\xercesImpl.jar;%XALAN_HOME%\tools\xalan.jar;%XALAN_HOME%\tools\serializer.jar;%XALAN_HOME%\tools\xml-apis.jar; 前提,你的JAVA环境变量已经配置妥当!(在命令行里运行 javac 和 java 只要不出错误提示说明你JAVA环境没问题!) 检查环境变量CLASSPATH里是否有 %JAVA_HOME%\lib\tools.jar和%JAVA_HOME%\lib\dt.jar (%JAVA_HOME%为java的路径) 试着运行下面一句:这句是在命令行里可以直接执行的! java org.apache.xalan.xslt.Process -in 1.xml -xsl 2.xsl -out 3.svg 就可以生成3.svg 4:30了困,明天再说。。。

关于CSM01作业的几点理解。。。

我的 作业演示地址 (用IE打开!)。 基于 老师的PDF文件 ,我给出我对与每条要求的理解。。。 首先,给出几个可能有用的工具,对于大家写XML,XSL和CSS有帮助的: oXygen 点击进去自己看吧,是“看和写”XML最好用的工具,可下载试用。 TopStyle 最古老也是最好用的书写CSS的软件,可下载试用! firebug 如果你用的也是firefox,这个也许有用,是内嵌在FIREFOX中用于查看代码的,真的酷的一塌糊涂! VIM 这个是给所有程序员建议的,可免费下载。 关于Work Plan 1)老师PDF上的 第一个连接 是个BBC的页面,里面给出了作业要用的主要的文件 rtm_tpeg.xml和pti_tpeg.xml,在英国国旗的旁边,直接点击英国国旗旁边的连接你貌似会得到一个错误的页面,说XML文件有错(FIREFOX有错误,IE中没事),所以,只要右键另存为就可以了。。。。下载来看看再说。。。。另外,这两个XML文件都对应同一个 DTD文件 ,也要一并下下来。。。 2)至于这个 TPEG ,是一帮无聊的人搞的无聊的协议,也不过是两个XML文件而已,至于怎么用,再研究。。。。 3) 再有就是这句了java -jar xalan.jar -in bbc-rtm.xml -xsl bbc-rtm.xsl -out rtm-data.xml 其主要就在xalan,我是好几节课没去了,所以不知道xalan是何方妖孽,不过 在这 可以找到其介绍。老师给的XML文件(bbc-rtm.xsl)是无数据的,所以我估计这条命令是从bbc-rtm.xsl中生成数据到rtm-data.xml,而我目前准备用rtm_tpeg.xml。所以暂且放弃这块! 作业的主要任务: Section 1: 要求生成一个带有XSL的XHTML文件,此文件要显示rtm_tpeg.xml里的相关信息。最起码要包含 summary, time, latitude and longitude等,而且要自动调整表格的宽度以适应不同文字数量的summary,这个当然是用CSS实现!另外,时间的显示格式要也注意,如何很好的显示正确的时间格式是老师要求的,因为在rtm_tpeg.xml中,message_generation_time属性的时间是用最学术的格式写的,咱要显示成大众能看懂的格式,比如:...

Resource for Development

I am tyro for web programming, especially, Ajax and xml. There are some reference for web devlopment and others. 1. IBM DeveloperWork is general website for JAVA, Linux and Web development. There is site address for Chinese. 2. CSND is main site for Chinese programmers. 3. I has a Apple Laptop and I am loving its white surface. There is Apple developer website for base Mac system. To Be Continue....

RSA encryption arithmetic and be achieved by Python

The first approach of the algorithm , we random produce two prime numbers named p and q , Compute N = p * q note that N. Choose which should be less than N such that e and (p-1) (q-1) are relatively prime numbers. Public key is a pair of numbers (N, e). They should have no common factor other than 1. For example d is the decryption key, According to this algorithm (e*d) %( p-1) (q-1) = = = 1(identity sign), get d is the private key. Using the Euclidean algorithm to compute the modular inverse of e modulo N, the result is d. For example P is the ASCII code of a char in clear text. Then we take the RSA algorithm C = Pe % N. we can get C. Why chose python. Because there is a problem for the other language, big number operation but python can it directly. Main code: rsaEncrption.py N = p * q # two big prime number p and q d = 2 # d is the private key. it make the identic equation (e*d) % ((p-1)*(q-1)) === 1 while (e*d) %(p-1)*(q-1) != 1 d += 1 # public key : (N, e) ...

MSc. Information Systems Resources

CSM01 Web Publishing CSM03 Information Systems Development CSM04 Challenges for Computing Professionals CSM24 Introducation to Multimedia Security Other resources www.w3schools.com University of Surrey / WWW2 Documents My website in Surrey Welcome 2 my home Email of Surrey

Hello World again!

No one is free! I chose two blog hostings to publish my blog, althrough I was not often writting, the second one which the biggest and gorgeous host is Squarespace.com and I think it will free forever........ anyway, hello come back my new homepage again! I think moving is interesting when you just spent all night to finish a coursework. Faint!