存档

2008年2月 的存档

pdf and postscript

2008年2月26日 3 条评论

when you want to covert postscript’s file to pdf file
you can use ghostscript and gsview .

ghostscript’s install.
next is gs copy the system’s font to itself  .

I fond this in cidfmap …
%!
% cidfmap generated automatically by mkcidfm.ps from fonts found in
%   C:/WINDOWS/fonts

% Substitutions
/BatangChe << /FileType /TrueType /SubfontID 1 /CSI [(Korea1) 3] /Path (C:/WINDOWS/fonts/batang.ttc) >> ;
/GungsuhChe << /FileType /TrueType /SubfontID 3 /CSI [(Korea1) 3] /Path (C:/WINDOWS/fonts/batang.ttc) >> ;
/Batang << /FileType /TrueType /SubfontID 0 /CSI [(Korea1) 3] /Path (C:/WINDOWS/fonts/batang.ttc) >> ;
/MS-Mincho << /FileType /TrueType /SubfontID 0 /CSI [(Japan1) 3] /Path (C:/WINDOWS/fonts/msmincho.ttc) >> ;
/NSimSun << /FileType /TrueType /SubfontID 1 /CSI [(GB1) 2] /Path (C:/WINDOWS/fonts/simsun.ttc) >> ;
/SimHei << /FileType /TrueType /SubfontID 0 /CSI [(GB1) 2] /Path (C:/WINDOWS/fonts/simhei.ttf) >> ;
/DotumChe << /FileType /TrueType /SubfontID 3 /CSI [(Korea1) 3] /Path (C:/WINDOWS/fonts/gulim.ttc) >> ;
/Gulim << /FileType /TrueType /SubfontID 0 /CSI [(Korea1) 3] /Path (C:/WINDOWS/fonts/gulim.ttc) >> ;
/Gungsuh << /FileType /TrueType /SubfontID 2 /CSI [(Korea1) 3] /Path (C:/WINDOWS/fonts/batang.ttc) >> ;
/MS-UI-Gothic << /FileType /TrueType /SubfontID 2 /CSI [(Japan1) 3] /Path (C:/WINDOWS/fonts/msgothic.ttc) >> ;
/MS-Gothic << /FileType /TrueType /SubfontID 0 /CSI [(Japan1) 3] /Path (C:/WINDOWS/fonts/msgothic.ttc) >> ;
/MS-PGothic << /FileType /TrueType /SubfontID 1 /CSI [(Japan1) 3] /Path (C:/WINDOWS/fonts/msgothic.ttc) >> ;
/MS-PMincho << /FileType /TrueType /SubfontID 1 /CSI [(Japan1) 3] /Path (C:/WINDOWS/fonts/msmincho.ttc) >> ;
/Dotum << /FileType /TrueType /SubfontID 2 /CSI [(Korea1) 3] /Path (C:/WINDOWS/fonts/gulim.ttc) >> ;
/GulimChe << /FileType /TrueType /SubfontID 1 /CSI [(Korea1) 3] /Path (C:/WINDOWS/fonts/gulim.ttc) >> ;
/MingLiU << /FileType /TrueType /SubfontID 0 /CSI [(CNS1) 2] /Path (C:/WINDOWS/fonts/mingliu.ttc) >> ;
/PMingLiU << /FileType /TrueType /SubfontID 1 /CSI [(CNS1) 2] /Path (C:/WINDOWS/fonts/mingliu.ttc) >> ;
/SimSun << /FileType /TrueType /SubfontID 0 /CSI [(GB1) 2] /Path (C:/WINDOWS/fonts/simsun.ttc) >> ;

% Aliases
/STFangsong-Light /SimSun ;
/HYSMyeongJo-Medium /Batang ;
/HeiseiMin-W3 /MS-Mincho ;
/STKaiti-Regular /SimHei ;
/STSong-Light /SimSun ;
/MKai-Medium /MingLiU ;
/MHei-Medium /MingLiU ;
/Ryumin-Medium /MS-Mincho ;
/HeiseiKakuGo-W5 /MS-Gothic ;
/MSung-Medium /MingLiU ;
/GothicBBB-Medium /MS-Gothic ;
/HYRGoThic-Medium /Gulim ;
/Ryumin-Light /MS-Mincho ;
/HYGoThic-Medium /Dotum ;
/STHeiti-Regular /SimHei ;
/MSung-Light /MingLiU ;

when you have gsview,you must edit the gsview32.ini

[GSview-4.9]
Version=4.9
GSversion=861
GhostscriptDLL=D:\Program Files\gs\gs8.61\bin\gsdll32.dll
GhostscriptInclude=D:\Program Files\gs\gs8.61\lib;D:\Program Files\gs\fonts;D:\Program Files\gs\gs8.61\Resource;C:/WINDOWS/fonts
GhostscriptOther=-dNOPLATFONTS -sFONTPATH=”c:\psfonts”
Configured=1

sometimes you cant find the specific fonts in your country such as China’s founder and huaguang.
when you open the ps file, the message is fallow.

————————————————————
Substituting font Courier for JZDX.
Can’t find (or can’t open) font file D:\Program Files\gs\gs8.51\Resource/Font/JDH.
Can’t find (or can’t open) font file JDH.
Didn’t find this font on the system!

ps-error1.jpg

 

 

 

 

 

 

 

 

 

 

 

——

 error2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

gs need fonts in C:\windows\fonts
also   D:\Program Files\gs\gs8.51\Resource/Font

so you must put the Font JDH in the directorys.
like this : D:\Program Files\gs\gs8.51\Resource/Font/JDH.

————————————————————
But I fond the founder and huaguang’fonts can’t agree with the ghostscript.

and the CMap also haven’t this fonts.

Someone say founder’s fonts isn’t the standard ps file.  🙁
————————————————————
I will try to find how to resolve it!!

 

分类: OpenSource 标签:

Java Support on Pocket PC

2008年2月20日 评论已被关闭

Name & Version

NSIcom CrEme 3.2.2

SavaJe OS 2.0

Sun Personal Java

Blackdown J2RE (ARM port)

Esemertec Jeode

IBM WebSphere Studio

Supported OS

CE.net, PocketPC/2002

WinCE 2.11

Familiar Linux

WinCE 2.11, PocketPC,
Linux

WinCE 2.11, PocketPC

JVM Compatibility

PersonalJava compliant

J2ME MIDP 2.0

PersonalJava compliant

Java 2 (1.3.1)

PersonalJava compliant

J2ME MIDP 1.0

Speed

Fast

Very fast

Fast

Slow start, reasonable execution.

Fast

Fast (Ahead of time compile)

Additional Supported Packages 

SWING COMM, CORBA, SQL, JSSE

SWING, JINI, COMM

All available under Linux

Supported Hardware

PocketPC/ARM, Palm, HPC

PocketPC/ARM

MIPS, SH3

iPAQ H36xx  (or better)

Dell Axim X5

PocketPC/ARM,WinCE, PalmOS, Windows, Wind River..

Cost

Contact NSIcom

Contact SavaJe

Free – Sun EOL

Free

$49.95 from Handango

Web site

 

Name & Version

Ewe VM

SuperWaba VM

Kada

Hewlett Packard ChaiVM

Supported OS

Linux, PocketPC/2002, Windows, Palm, HPC Pro

PocketPC, Palm

WinCE 2.11/3.0

Familiar Linux
PocketPC

WinCE 2.11, PocketPC

JVM Compatibility

PersonalJava compliant,
Java 1.1, Java 1.2

Check web site

J2ME MIDP 2.0

Kaffe
PersonalJava compliant

PersonalJava compliant

Speed

Medium-Fast

Medium

Fast (Ahead of time compile)

Slow

Additional Supported Packages 

Waba, ActiveSync

Waba

J2ME, PersonalJava

Kaffe (AWT, J2SE)

Supported Hardware

PocketPC/ARM, Sharp Zaurus, Palm, HPC, Linux, Win32

 

PocketPC/ARM, Palm

PocketPC/ARM

PocketPC/ARM PocketPC/ARM

PocketPC/ARM

Cost

Free

Free

Contact Kada

Free
$19.95

Free

(Note: ‘-‘ in a cell indicates this information is unknown or unavailable, please contact us if you can help)

 

SavaJe XE

Description: Fully featured Native Java OS
Notes: PocketPC port was recently sold to  recently sold to MochaWorks who have not released anything yet. Early versions demonstrated a Java OS with neat UI, MP3 player, organizer etc with support for PC card 802.11, CF & PC card Ethernet and MODEM.
URL: http://www.mochaworks.com

Sun PersonalJava

Description: Sun抯 own Java runtime environment for handhelds.
Notes: This product has been discontinued, though a CE 2.11 version is available from Sun’s EOL(End Of Life) site. Fairly fast and well implemented, AWT components look same as those on desktop machines, a useful console window is provided for debugging etc, is also very well documented and supported. Only problem is that it does not manage memory or threads very well, command line options can be used to help slightly (by assigning more memory), though many simultaneous threads and large data structures always cause a crash.
URL: http://java.sun.com/products/personaljava/index.html

 

Blackdown J2RE

 

Description: Blackdown’s Java 2 JDK for Linux ported to ARM

Notes: Requires Linux on iPAQ

URL: http://www.blackdown.org/

 

Jeode

 

Description: Well featured PocketPC VM

Notes: Comes free with some Compaq iPAQs (this version is limited to iPAQ devices only). Also available for Dell PDA’s from Handango. The only other way I found to purchase Jeode is to join their educational institution program, which seems very expensive.

URL – http://www.esmertec.com

 

NSICOM CrEme

 

Description: Quick, good support, very polished – an excellent product
Notes – Handles memory far better than Sun’s Personal Java, also faster. Supports Truffle and Tiny AWT AWT components which all work perfectly, it is provided with a useful launcher application.  Provides various useful command line switches (such as to remove WinCE task bar), comm support fully implemented & works perfectly (also tested with iButtons). Overall a very solid VM implementation.

URL: http://www.nsicom.com/

 

IBM WebSphere Studio

 

Description: VM is provided as part of Java development suite for embedded devices.

Notes: Commercial product, though Linux evaluation version are available for download

URL: http://www.ibm.com/websphere

 

Ewe VM

 

Description: An open source, free JVM with Active Sync toolkit. It is based on the popular Waba API www.wabasoft.com but extended to embrace the PocketPC.

Notes: Runs fast, stable, and the developer is very responsive to support questions.

URL: http://www.ewesoft.com

 

SuperWaba VM

 

Description: Another free JVM based on the Waba API, with support for both PalmOS and PocketPC with almost 100% source compatibility between the two platforms.

Notes: A lot of good GUI tools and libraries to extend the API to the platform.

URL: http://www.superwaba.com.br

 

Kaffe

 

Description: Clean room unlicensed (but legal) Java VM implementation.

Notes: Implementation is not complete and contains bugs.

URL: http://www.kaffe.org

 

jCompiler

 

Description: This is a Java IDE/compiler which runs on the PocketPC!
Notes: Doesn’t seem to be an official web site, contact jCompiler@hotmail.com for more info.

URL: [Handango Link]

 

Kada

 

Description: A commercial JVM for Palm and Pocket PC. It supports the J2ME programming model and Kada is the first to offer a MIDP 2.0 release.

Notes: They offer an ahead of time (AOT) compiler to improve efficiency.

URL: http://www.kadasystems.com

 

 

Hewlett Packard ChaiVM

 

Description: HP’s own clean room JVM implementation. Provided with its Jornada range of devices. No recent activity/releases.
Notes: Slow and slightly buggy implementation. Provided native compiler.

URL: http://www.hp.com

 

Another site you might might useful is Vik David’s page Java on PocketPC, the Unofficial FAQ  

 

This page was last updated on 20/6/03 by Dan Fitton (df (at) comp.lancs.ac.uk) with much help from Rod Montrose (rcm (at) avidwireless.com)

分类: java, OpenSource 标签:

Webalizer Install and configuration

2008年2月17日 评论已被关闭

Webalizer is a web access log analyzer tools
apache tomcat resin’s logs are OK!
Next is my Install & configuration on Webalizer.

1、related things

apache http://www.apache.org/
gd        http://www.boutell.com/gd/

make sure you have these package

jpeg     http://www.ijg.org/files/
libpng  http://www.libpng.org/
freetype  http://www.freetype.org/
zlib     http://www.zlib.net/

2、Install
http://www.mrunix.net/webalizer/

the lasted version is webalizer-2.01-10

tar -zxvf webalizer-2.01-10-src.tgz

##if your gd installed like this
##./configure && make && make install

./configure –with-language=simplified_chinese

##if your gd is install with this
##./configure –prefix=/usr/local/gd && make && make install

./configure –with-language=simplified_chinese –with-gdlib=/usr/local/gd –with-gd=/usr/local/gd

##–with-language=simplified_chinese  sometimes the graphic may mess;

3、Seting

cp /etc/webalizer.conf.sample /etc/webalizer.conf.2hei

mkdir /usr/local/apache/htodcs/2hei.net
##use apache’s htdocs as your web-root

vi /etc/webalizer.conf.yours

LogFile /usr/local/apache/logs/access_log

OutputDir /usr/local/apache/htdocs/2hei.net

HostName youdomain
Incremental yes
PageType htm*
PageType cgi
PageType php
PageType pl
IgnoreHist no
CountryGraph yes
IndexAlias index.cgi
IndexAlias index.php
HideReferrer Direct Request
HideURL *.gif
HideURL *.GIF
HideURL *.jpg
HideURL *.JPG
HideURL *.png
HideURL *.PNG

4、Run
su – root
crontab -e
5 0 * * * /usr/bin/webalizer -c /etc/webalizer.conf.2hei
##makebe your webalizer in the /usr/local/bin

then you can find your webalizer in this URL
http://yourdomain/2hei.net/

 THE PICs:

01.jpg

 

 

 

 

 

02.jpg

 

 

 

 

 

 

 

 

 

 

 

03.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

04.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

05.jpg

分类: OpenSource 标签:

一个启用共享的bat文件

2008年2月11日 评论已被关闭

下面是一个从ghost的xp-sp2的系统里面发现的,把启动网络共享的dos命令写成了简单易用的bat文件,

虽然真正起作用的只是几句话,但是看着这个bat文件还是倍感亲切,拿出来与大家共享。

(其中有个reg文件 名字为:开通局域网共享(访问本机要填用户名和密码).reg)

This file can be saved as a bat file named “netshare.bat” 

ECHO OFF
@ ECHO.
@ ECHO.                            说      明
@ ECHO ——————————————————————–
@ ECHO 本批处理执行后,将作以下一些设置:
@ ECHO 1、允许SAM帐户和共享的匿名枚举(原版系统允许,本系统默认是禁用)。
@ ECHO 2、本机帐户若空密码,允许其它机访问本机。
@ ECHO 3、Windows防火墙:允许文件和打印机共享。
@ ECHO 4、共享方式:本地用户以自己的身份验证。
@ ECHO 5、来宾帐户:不启用。
@ ECHO ——————————————————————–
@ ECHO.
@ ECHO 采用这种共享方式,访问本机时必须要输入正确的用户名和密码,才能访问。
@ ECHO.
@ ECHO 无论采用哪一种共享方式,共享只是方便内部使用,在用路由器上网的场合,
@ ECHO 外网不能访问到您的机,无需担心共享了就会被入侵。您只需记住,单机拨号
@ ECHO 上网时,不要打开共享就可以了。
@ ECHO ——————————————————————–
@ ECHO.
PAUSE
regedit /s 开通局域网共享(访问本机要填用户名和密码).reg
net user Guest /active:no
cls
@ ECHO.
@ ECHO ——————————————————————-
@ ECHO 操作完成。
@ ECHO 无需重启,其它机现在就可以访问本机了。
@ ECHO.
@ ECHO 硬盘各分区的默认共享仍未打开。如需要打开,
@ ECHO 请到本目录找到注册表文件,双击导入即可。
@ ECHO ——————————————————————-
@ ECHO.
@ ECHO 常见疑问:
@ ECHO    经上述处理后,访问本机,如果仍然是直接就进去了,没出现提示输入帐
@ ECHO 号和密码的对话框,那是因为其他电脑的帐户名称跟本机帐户名一样(比如双
@ ECHO 方都是administrator),且本机无密码。您应该把本机帐户改名,或加密码。
@ ECHO 这样,未经授权的用户就不能随意访问您共享的资源了。
@ ECHO ——————————————————————-
PAUSE

分类: OpenSource 标签:

some Java decompilers — 一些java反编译工具

2008年2月1日 1 条评论

一些 Java decompilers 反编译工具


jad工具在使用时有如下错误的解决:

如:

E:\2hei.net\src\>jad -sjava HelloWorld.class
Parsing HelloWorld.class…The class file version is 48.0 (only 45.3 and 46.0 are supported)
JavaClassFileParseException: Class file version mismatch

可以使用UE编辑class文件。把class文件的第八个字节30或者31修改为2E,再使用jad反编译即可。

推荐使用DJ,可视化的界面,比较方便,默认是生成了后缀为jad的java源文件。

dj.jpg

 DJ 3.9.9的版本已经需要注册。老版本的还可以正常使用。

 

分类: java, OpenSource 标签: ,

set resin-status in resin’s config

2008年2月1日 评论已被关闭

resin3.1.3,follow the setting from the internet, add this line in web.xml

      <servlet-mapping servlet-class=’com.caucho.servlets.ResinStatusServlet’>
        <url-pattern>/resin-status</url-pattern>
        <init enable=”read”/>
      </servlet-mapping>

I got a error, can’t start up the resin3.1.3 in linux.

Find this info in the  resin’s website i add this in the resin.conf,

<web-app-default>

      <servlet-mapping servlet-class=’com.caucho.servlets.ResinStatusServlet’>
        <url-pattern>/resin-status</url-pattern>
        <init enable=”read”/>
      </servlet-mapping>

      <security-constraint>
        <web-resource-collection url-pattern=”/resin-status/*”/>
        <ip-constraint>
          <allow>127.0.0.1/32</allow>
        </ip-constraint>
      </security-constraint>

</web-app-default>

###############################

 <allow>127.0.0.1/32</allow>  is the IP you allow to visit resin-status’s manage page.

 

分类: resin 标签: ,