Friday, June 20, 2008

firefox 3



为什么3对2的插件大部分不兼容?要逼很多人重写插件么?


在这个问题没解决之前,我认为还没法用。


Monday, June 09, 2008

《PTT》、《再战江湖》复刻测试版

此为测试版,使用方法为先下载字体文件与DLL文件(可到“《苍龙逐日》复刻版”那里找到下载的地址),再下载exe文件,并将全部文件解压到原游戏目录。

字体文件和DLL文件可以在《苍龙逐日复刻版》那里找到。其实字体文件也可以在很多地方下载到。

到这里下载:http://scc.ys168.com/

现在没把这些传上来,是可能还有修改。

已知问题:

PTT:
PTT版并没有使用新的技术,所以如果复刻的难度与苍龙逐日是相同的。
某些动画不完美。

再战江湖:
某些文字显示错位;
马贼洞不可以一直站立在某个地点等待敌人,必须走动才有效;
在某些场景可能走到不适合的地点;
某些动画不完美;
启用了第二伤害公式,所以防御拐点又出现了(这个现象并不合理)。

整合版某些使用不方便,先不做了。

此外另有几个使用相当新技术的版本,几乎是不可能重现的。就不再专门制作了。

新型事件的截图:

image image

 

 

Friday, June 06, 2008

字体

中文字体

Windows自带的字体中,比较好的显示中文的字体大概有 明体,宋体,标楷体,微软雅黑,微软正黑。后面3种是Vista下面添加的,不过其他系统想获得它们也并非难事。

实际上宋体和明体都是同一种风格字体,起源也相同,只是发展到今天在笔画上有细节的不同。

在系统中预装的宋体是中易宋体,同时“新宋体”与它也是同源的。在Vista之前,一直以系统的默认字体为人熟知。该字体的英文字符是等宽的。

从设计上来说,简体中文的字体经常在细节上有瑕疵。例如同为系统标准字体,日文的PMincho字体在小字符上的表现就好很多。

与中易黑体一起,此字体已被Unicode组织催促放入正确区域的字符。不过看起来它们是难有大的更新了。Vista中已经更换了默认字体,而且今后的Windows 7也绝不可能使用这个字体,它变得不再像以前那么重要了。

备注:即便是现在看来做着一件好事的Unicode组织,他们对中文的处理方法也备受诟病。简单地说,他们是一群程序设计的专家,而不是研究汉字的专家。

200px-Simsun

细明体和新细明体通常作为繁体(正体)中文的默认字体,与中易宋体相对应。二者其实都是宋体,但细明体的波澜看来要多些。

细明体的英文部分是等宽的,而新细明体则使用更为适合的非等宽设计。特别地,如今细明体中已经包含了全部的Unicode字符,可以正确显示简体中文,具有更大的通用性。而中易宋体同样作为使用人数众多的字体,字符集却并不完整。Windows上有宋体大字符集可以代替中易宋体。

250px-Ming

标楷体是繁体中文地区通用的楷体,设计比较美观。由于完整支援Unicode,所以也可以正常显示简体中文,但在一些笔画的细节上与大陆通行的写法并不完全相同。简体中文系统中似乎缺少对应标楷体的字体。Office中附带的华文楷体在美观程度上并不能与之相比。

220px-KAI

微软雅黑是在Vista中引入的简体中文的默认字体。支持GBK,Unicode,Big5,GB2312等字符集,是非常通用的字体。而在此之前,华文细黑(曾在苹果公司的操作系统中使用)也几乎支持全部的字符集,但是并没有微软雅黑那么广泛地被使用。微软雅黑的粗体字是另外的一个字体,并非使用计算的方法。

微软雅黑在显示简体中文上表现得非常出色,但是在显示繁体中文的时候效果较差。但是实际上这样的机会并不多。

此外,微软雅黑在少数字符的设计上有瑕疵。例如“一一”这两个字,由于在“一”的两端预留的空白不够,使之难以与破折号区分开来。

255px-MSYH2

微软正黑是繁体中文Vista中的默认字体,在繁体中文的显示上比微软雅黑更为出色(但显示简体中文的效果实在太差了,他们是不是商量好的)。同样涵盖全部的中文字符集。

在用于显示简体中文的时候,文字的风格与大陆的书写习惯并不一致,通常大陆用户会略感别扭。

MSZH

 

英文字体

即便完全不懂英文(以及任何应用拉丁字母的语言)的人也不可能离开拉丁字母,所以英文字体也是非常重要的。

Times New Roman 是大部分英文书籍杂志使用的标准字体,在英文世界里有最为广泛的应用。最早使用它的是《泰晤士报》。大概正是因为其广泛,很少有人认为它是一种出色的字体。

Windows系统中使用的字体称为Times New Roman PS,实际上这个后缀并没有使它看起来有什么不同。

该字体的斜体的风格更接近手写,适合用于公式排版。

250px-Times_New_Roman_font_svg

Courier 是最为通用的等宽字体。

众所周知,在程式设计中,等宽字体比非等宽字体更加适合。因此在源码的显示中,Courier以及其变体至今仍被最为广泛的应用。

Courier New 与Courier 在行距以及某些标点上有所不同。

250px-CourierWC

Calibri 是Vista中附带的一种字体,并作为Office 2007的默认字体取代了Times New Roman。基本上可以认为它是英文字体的新贵。

230px-Calibri_font_svg

Consolas 也是Vista中附带的一种字体,也可以在Visual Studio中获得,它是一种等宽字体。在此之前,Courier和Lucida Console均是程式代码显示中常用的字体,在显示的时候可以控制是否打开边缘柔和,而Consolas本身就是边缘柔和的,如果不开启ClearType,效果会大打折扣。

字体中的0和o分别很明显,比较适合用于显示源代码。从微软发行它的态度来看,大约就是这个目的。

240px-ConsolasSP_svg

 

其他

明瞭体是日文Vista的默认字体,字体名为Meiryo。风格与微软雅黑和正黑颇为相近,可以显示中文,但是效果一般。

 

图片取自维基百科。

Wednesday, June 04, 2008

C#和Object Pascal


下载了一个C#的速成版,似乎是免费的。

在编写一个基于窗口的程序时,program.cs的内容如下:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

 

再看看Delphi自己生成的代码:

program shift;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

这两个的风格实在太像了!

也难怪,二者都是快速开发工具的代表,只是最终实现的平台侧重不同。Delphi使用CLX类库可以做Linux下的快速开发,而C#则是致力于.NET的跨平台实现。相对来说,.NET出现得更晚,将来也是主流之选(Delphi也有对应的版本,其实就是跟微软的风了)。

 

其他:

Delphi是把类的声明与实现都写在Unit文件里面,各个Unit之间可以很随意地互相访问。一个Unit中可以有名义上的全局变量。另外代码中已经为类创建了相应对象。

C#秉承C的习惯,把声明与实现分成两个文件,Unit之间的互访必须先声明,只有名义上的全局变量。

尽管如此,在快速开发的时候,二者实在太像了。

关于复刻版的bug


确定存在并难以解决的的问题:

大地图某些贴图顺序错误,谁有更好的计算贴图顺序的方法?

某些地方不能连续通过,是解决这个还是允许按键刷对话?

无法确定是否存在的问题:

战斗时人物错位,代码看来没错误,可能需要某个触发条件?

至于其他功能现在就不添加了。

虽然我还不打算马上公开源码,但是既然我把的目的定在MOD制作上,代码是肯定会公开的,只是早晚的问题。不管这份代码是否漂亮(我不觉得漂亮,只能算是完成了任务),总算比汇编好懂多了。我相信有许多比我更强的高手能写出更漂亮的代码来。

等bug基本排尽之后,我会对几个流行的MOD重新制作一下。但是有些使用的技术太复杂,做不出来就只能算了。

之后我就可以退休了?

Tuesday, June 03, 2008

IT人应有的30个技能



这不是不相关的东西,在这个时代里不管干什么想不跟IT打交道是不可能的事。就算你只是个在实验室里修电脑的,本文也值得一看。


中文是我简单翻译的,可能与原意并不完全相同。


The 30 skills every IT person should
have


An IT manager's guide on how to be better
at what you do, no matter how experienced you are




By Richard Casselberry


June 02, 2008

On MSN the other day, I noticed an article
called "75 skills every man should master." It included some skills
I have and some I don't. For example, I can tie a knot and hammer a
nail, but frankly I can't recite a poem from memory, and bow ties
still confuse me.


It was an interesting read and made me
realize I could be more well-rounded than I am. To be honest, we
all could be.


So in the spirit of personal growth, I
developed a list of skills every IT person should have.


1. Be able to fix basic PC issues.
These can be how to map a printer, back up files, or add a network
card. You don't need to be an expert and understand how to
overclock a CPU or hack the registry, but if you work in IT, people
expect you to be able to do some things.


[ Ifyou have IT staffers who
aren't up to snuff, fire them.
Learn how to do it right.
]


懂得配置电脑。你要知道怎样配置一个打印机,备份文件,添加网卡。不必懂得如何去超频CPU或去做hacker,但总得知道些什么。


2. Work the help desk. Everyone,
from the CIO to the senior architect, should be able to sit down at
the help desk and answer the phones. Not only will you gain a new
appreciation for the folks on the phones, but you will also teach
them more about your process and avoid escalations in the
future.


接受咨询。从CIO到资深设计师,都应该坐在咨询台前面去接受咨询。要听的话不只是感激,也要告诉他们关于你的工程,避免未来的升级。(为什么避免升级?大概译错了?)


3. Do public speaking. At least
once, you should present a topic to your peers. It can be as simple
as a five-minute tutorial on how IM works, but being able to
explain something and being comfortable enough to talk in front of
a crowd is a skill you need to have. If you are nervous, partner
with someone who is good at it, or do a roundtable. This way, if
you get flustered, someone is there to cover for you.


作公开讲话。至少应有一次对你的同事陈述你的观点,尽管聊天软件可能更简单,但在人前自在地讲话是一个必备的技能。


4. Train someone. The best way to
learn is to teach.


培训。最好的学习方式是去教别人。


5. Listen more than you speak. I
very rarely say something I didn't already know, but I often hear
other people say things and think, "Darn, I wish I knew that last
week."


听多于说。


6. Know basic networking. Whether
you are a network engineer, a help desk technician, a business
analyst, or a system administrator, you need to understand how
networks work and simple troubleshooting. You should understand DNS
and how to check it, as well as how to ping and trace-route
machines.


基本的网络工作原理。应该懂得如何配置DNS,怎样去ping网络中其他的电脑。


7. Know basic system administration.
Understand file permissions, access levels, and why machines talk
to the domain controllers. You don't need to be an expert, but
knowing the basics will avoid many headaches down the
road.


基本系统管理。了解文件权限,级别,如何在域中工作。这可以避免很多令人头痛的问题。(文件打不开?共享中的文件别人打不开?看看权限吧。)


8. Know how to take a network trace.
Everyone in IT should be able to fire up wireshark, netmon, snoop,
or some basic network capturing tool. You don't need to understand
everything in it, but you should be able to capture it to send to a
network engineer to examine.


网络追踪。至少能把像样的问题报告发给网管。(不要发一堆浆糊过来。)


9. Know the difference between latency
and bandwidth.
Latency is the amount of time to get a packet
back and forth; bandwidth is the maximum amount of data a link can
carry. They are related, but different. A link with high-bandwidth
utilization can cause latency to go higher, but if the link isn't
full, adding more bandwidth can't reduce latency.


延迟和带宽。二者是相关的,高利用率的带宽必定会增加延迟,但是如果连接不满,增大带宽也不会降低延迟。(不要作无谓的猜想。)


10. Script. Everyone should be able
to throw a script together to get quick results. That doesn't mean
you're a programmer. Real programmers put in error messages, look
for abnormal behavior, and document. You don't need to do that, but
you should be able to put something together to remove lines, send
e-mail, or copy files.


脚本。写一个脚本加快你的工作。这不是说你要做一个程序员,真正的程序员能够做更多的东西。你需要的大致是快速移除你文档中的空行,自动发送E-Mail,复制文件等。(不会写的话叫人帮你写吧。)


11. Back up. Before you do anything,
for your own sake, back it up.


备份。在你要做重大修改之前。


12. Test backups. If you haven't
tested restoring it, it isn't really there. Trust me.


测试备份。这份备份真的能恢复吗?(你要修改的是不是你用来恢复备份的那个脚本?)


13. Document. None of the rest of us
wants to have to figure out what you did. Write it down and put it
in a location everyone can find. Even if it's obvious what you did
or why you did it, write it down.


文档。其他人不会知道你做过什么。记录下来,即使你对它很清楚。


14. Read "The Cuckoo's Egg." I don't
get a cut from Cliff Stoll (the author), but this is probably the
best security book there is -- not because it is so technical, but
because it isn't.


“杜鹃的蛋”。这个故事出色地描述了一个安全问题,说它出色是因为正确的做法与故事中的完全相反。(这是个什么故事?)


15. Work all night on a team
project.
No one likes to do this, but it's part of IT. Working
through a hell project that requires an all-nighter to resolve
stinks, but it builds very useful camaraderie by the time it is
done.


通宵的小组工作。这是IT行业的一部分。


16. Run cable. It looks easy, but it
isn't. Plus, you will understand why installing a new server
doesn't really take five minutes -- unless, of course, you just
plug in both ends and let the cable fall all over the place. Don't
do that -- do it right. Label all the cables (yes, both ends), and
dress them nice and neat. This will save time when there's a
problem because you'll be able to see what goes where.


电缆。把你的电缆两端都做上明显的标记。(此外,不要在不插电缆时问“为何共享无法打开”这样的问题。)


17. You should know some energy rules of
thumb.
For example: A device consuming 3.5kW of
electricity requires a ton of cooling to compensate for the heat.
And I really do mean a ton, not merely "a lot." Note that 3.5kW is
roughly what 15 to 20 fairly new 1U and 2U servers consume. One ton
of cooling requires three 10-inch-round ducts to handle the air; 30
tons of air requires a duct measuring 80 by 20 inches. Thirty tons
of air is a considerable amount.


了解一些电学知识。比如你需要多少空气去冷却一个电源,用什么设备去驱动空气。(这个问题谁想过?)


18. Manage at least one project.
This way, the next time the project manager asks you for a status,
you'll understand why. Ideally, you will have already sent the
status report because you knew it would be asked for.


管理至少一个工程。下次工程经理问你,你就会知道他需要的是什么。


19. Understand operating costs versus
capital projects.
Operating costs are the costs to run the
business. Capital equipment is made of assets that can have their
cost spread over a time period -- say, 36 months. Operating costs
are sometimes better, sometimes worse. Know which one is better --
it can make a difference between a yes and no.


了解经费与资本项目。(这句不是很懂。)


20. Learn the business processes.
Being able to spot improvements in the way the business is run is a
great technique for gaining points. You don't need to use fancy
tools; just asking a few questions and using common sense will
serve you well.


了解业务流程。(同上)


21. Don't be afraid to debate something
you know is wrong
. But also know when to stop arguing. It's a
fine line between having a good idea and being a pain in the
ass.


不要害怕辩论的东西是错的。但是要懂得何时结束争辩。


22. If you have to go to your boss with
a problem, make sure you have at least one solution.


问你老板问题时你需要有一个自己的答案。


23. There is no such thing as a dumb
question, so ask it ... once.
Then write down the answer so
that you don't have to ask it again. If you ask the same person the
same question more than twice, you're an idiot (in their
eyes).


问答案显而易见的问题并没什么,但是只问一次。之后写下答案。如果问的太多,会被认为是白痴。


24. Even if it takes you twice as long
to figure something out on your own versus asking someone else,
take the time to do it yourself.
You'll remember it longer. If
it takes more than twice as long, ask.


如果一个问题你自己做会比问别人需要花费两倍的时间,那就自己做。这会使你记得更深。但是如果超过两倍了,还是去问吧。


25. Learn how to speak without using
acronyms.


不要用缩写词讲话。记住它们的全名。


26. IT managers: Listen
to your people.
They know more than you. If not, get rid of
them and hire smarter people. If you think you are the smartest
one, resign.


作为领导,听自己手下的意见。他们比你了解的更多。如果不是这样,解雇他们再雇更聪明的人。如果你认为你是最聪明的一个,辞职。


27. IT managers: If you
know the answer, ask the right questions for someone else to get
the solution; don't just give the answer.
This is hard when you
know what will bring the system back up quickly and everyone in the
company is waiting for it, but it will pay off in the long run.
After all, you won't always be available.


作为领导,如果你知道答案,用适当的问题去问其他人而不是直接给出答案。如果你知道怎样使系统备份更快的方法而其他人都在等,那你也许会自己去做,但是这不是好主意。今后你的空闲时间会变少。


28. IT managers: The
first time someone does something wrong, it's not a mistake -- it's
a learning experience.
The next time, though, give them hell.
And remember: Every day is a chance for an employee
to learn something else. Make sure they learn something valuable
versus learning there's a better job out there.


作为领导,你的手下第一次做错时,不应视为错误——他们在学习经验。下一次,让他们知道什么是地狱。每天都是积累经验的机会。确保你的雇员了解有用的东西而不是认为别处有一个更好的工作。


29. IT managers: Always
give people more work than you think they can handle.
People
will say you are unrealistic, but everyone needs something to
complain about anyway, so make it easy. Plus, there's nothing worse
than looking at the clock at 2 p.m. and thinking, "I've got nothing
to do, but can't leave." This way, your employees won't have that
dilemma.


作为领导,给你的手下多于你认为他能力所限的工作。不要担心他们抱怨,否则他们也会抱怨别的。至少他们不会在下午两点的时候就没事干。


30. IT managers: Square
pegs go in square holes.
If someone works well in a team but
not so effectively on their own, keep them as part of a
team.


作为领导,知人善用。如果某人适合团体工作而单独工作时没有效率,让他做团体工作。