Saturday, November 29, 2008

20 款免费的高清视频资源

【在线高清视频流媒体】

Apple
Microsoft
SmoothHD
Hulu
Vimeo
Adobe
Vuze
DailyMotion
YouTube
MotionBox
NASA
NY Times

【高清广播电视频道】

CBS
ABC
NBC

【高清 TV 资源】

Boxee.TV
vudu
AppleTV
XBox 360
Tivo HD

TOP20 最佳的在线图形编辑工具

Alilg.com
Aviary Phoenix
DrPic.com
FlantR.com
FotoFlexer.com
Lunapic.com
MyImager.com
Online-Image-Editor.com
OnlineImageEditor.info
Phixr.com
Photoshop.com
Picture2Life.com
PikiPimp.com
Pixenate.com
Pixer.us
Pixlr.com
Picnik.com
Snipshot.com
Splashup.com
Webresizer.com

Thursday, November 27, 2008

Optimize Startup for Faster Boot Times

Few operating systems seem to boot quickly enough, and unfortunately Ubuntu is amongst them. However, you can do four things to reduce delays and generally speed up startup:

  1. Reduce or eliminate the boot menu countdown.
  2. Make boot runtime scripts start in parallel.
  3. Build a read-ahead profile personalized to your PC.
  4. Reduce the number of GNOME startup programs.

Some of these edits tweak essential system files, so check what you type against what you read here. Then check again before finally saving any files.

1. Reducing the Boot Menu Delay

If you dual-boot Ubuntu and Windows on your computer, the boot menu appears for ten seconds, during which you can select either Windows or Ubuntu. If you have only Ubuntu installed, a prompt appears for three seconds telling you that you can hit a key to see the boot menu.

This delay can feasibly be reduced to one second, provided you have quick enough reactions—hitting a key during that second will cause the countdown timer to stop so you can make your choice at leisure. Alternatively, you can configure the system so the boot menu never appears. This will deny access to the other boot menu options, but if Ubuntu is the only operating system on your computer, then this could be a good arrangement.

Start by opening the boot menu configuration file in Gedit:

gksu gedit /boot/grub/menu.lst

Then search for the line that reads timeout 10, and change the 10 to read either 1 for a one-second countdown or 0 to disable the boot menu completely. See the screenshot for an example from my test PC.


Save the file, and then reboot to test the settings.

2. Run Boot-Time Scripts in Parallel

Whenever Ubuntu boots, it runs several scripts that start necessary background services. By default, these are set to run one by one, but if you have a processor with more than one core, such as Intel’s CoreDuo series or AMD’s Athlon X2, you can configure Ubuntu to run the scripts in parallel. This way, all the cores are utilized, and you can save quite a bit of time at each boot.

To make the change, type the following to open the necessary configuration file in Gedit:

gksu gedit /etc/init.d/rc

Look for the line that reads CONCURRENCY=none, and change it so it reads CONCURRENCY=shell. Then save the file and reboot your computer.

Using this method I managed to shave a massive twenty seconds off my desktop PC’s usual startup time of just less than a minute.

3. Build a Readahead Profile Personalized to Your Computer

Ubuntu includes a software called readahead that, according to the official blurb, “allows the user to specify a set of file to be read into the page cache to accelerate first time loading of programs.” In other words, it allows Ubuntu to cache frequently accessed file to avoid searching around for them at startup. A default readahead profile is included with Ubuntu, but you can create your own, tailored to your system.

Reboot Ubuntu, and at the boot menu, ensure the usual Ubuntu entry is highlighted. Then hit e. This will let you temporarily edit the boot menu entry. Use the cursor keys to move the highlight down to the second line, which begins with the word kernel, and hit e again. Use the right arrow key to move to the end of the line, and after the words quiet and splash, add the word profile. For an example taken from my test PC, see the screenshot. Then hit Enter and then b to boot your computer. Note that the first boot will be slow because the readahead cache will have to be rebuilt. In subsequent boots, however, you should see speed improvements.


I experienced a couple of seconds of improvement by building a new readahead profile. This isn’t a dramatic increase, but it was certainly worth doing.

4. Trimming the GNOME Startup Programs

Once you’ve logged into the GNOME desktop, you’ll face yet another delay as all the GNOME background software starts. You can save a few seconds by trimming this list using the GNOME Sessions program (System --> Preferences --> Sessions). Ensure the Startup Programs tab is selected, and then look through the list for items you might want to prune. For example, if you’re never going to use Evolution’s alarm function, then you can disable Evolution Alarm Notifier by removing the check alongside it. One word of warning: Volume Manager isn’t related to audio. Instead, it enables the automatic detection of external storage devices that are attached to your computer. As such, it should always be enabled. Nor should you disable NetworkManager—-this is necessary to get Ubuntu online.

Ensure Ubuntu Always Knows the Time

Several of my computers sometimes mysteriously lose minutes when switched off so that the time they display slowly becomes more and more behind. Luckily, I have Ubuntu installed. This can periodically synchronize with the main Ubuntu time server and thus never let the computers get out of step with the rest of the world.

To set this up, use Synaptic to install the ntp package. Once the package is installed, restart your computer. Configuration is automatic.

Get More Data onto CD-R Discs

Overburn is the process of cramming a little extra data onto CD-Rs, in excess of the manufacturer’s recommendations. Typically an average 700MB CD-R will take 734MB. Sometimes it works, sometimes it doesn’t, and discs created this way aren’t guaranteed to work on all computers (there have been some suggestions that overburning can even damage CD-R/RW drives). To enable overburn for Nautilus’ CD/DVD Creator (Places --> CD/DVD Creator), entirely at your own risk, open gconf-editor (hit Alt+F2 and type gconf-editor), and head over to /apps/nautilus-cd-burner in the list on the left. Then put a check alongside overburn on the right.

Install All the Multimedia Playback Codecs You’ll Ever Need

Ubuntu will install the codecs you need for a multimedia file whenever you try to play it. The problem is that you have to be online for this to work. What if you’ve just installed Ubuntu and are about to hop on a plane, with the intention of watching movies during the journey? To install all the usual codecs before leaving the house, click Applications --> Add/Remove, and then in the Show drop-down list select All Available Applications. Ensure All is selected in the list on the left, and then use the Search box to search for gstreamer. In the list of results, put a check alongside the following—-once done, click the Apply Changes button:

GStreamer extra plugins
GStreamer ffmpeg video plugin
Ubuntu restricted extras
GStreamer plugins for mms, wavpack, quicktime, musepack
GStreamer plugins for aac, xvid, mpeg2, faad
GStreamer fluendo MPEG2 demuxing plugin

Once the software is installed (it may take some time, and you might have to agree to one or two license agreements that will pop up), click the Close button in the dialog box that appears.


To enable DVD movie playback, you’ll need to complete one extra step. Ensure Synpatic is closed (and no other software installation application is currently running, such as Update Manager), and then open a terminal window. Type the following:

sudo /usr/share/doc/libdvdread3/install-css.sh

Note that you will need to install the Xine version of the Totem movie player if you want fuss-free DVD movie playback, as explained in the next tip.

Get Better DVD Movie Playback

If you followed the previous tip to enable DVD movie playback, you might have noticed that Totem doesn’t provide access to individual chapters from the Go menu. In fact, in my tests, clicking entries on the Go menu while a DVD movie was playing did nothing.

To get around this, you can install the Xine version of Totem instead. This uses the Xine multimedia back end, which is used in the KDE desktop but is otherwise nearly completely identical. It fully supports DVD menus and chapter navigation using the Go menu.

Simply open Synaptic, and then search for and install totem-xine. Once it’s installed, you’ll need to tweak a setting so that totem-xine automatically starts when a DVD movie is inserted. Open a terminal window, and type the following:

sudo update-alternatives --config totem

Then type 2 to select the second option from the list presented. After this, all movies will play back in the Xine version of Totem. Unfortunately, with Ubuntu 8.04 at least, there appears to be no way of making just DVDs play back in the Xine version of Totem (changes to the system configuration using gconf-editor that should do the trick don’t work). However, the Xine version of Totem is functionally identical to Xine, so there should be no difference in usability.


If you ever get confused about which version of Totem you’re using (Ubuntu’s own or Xine), click Help --> About, and look at the line that begins Movie Player using... The native Ubuntu version will read Movie Player using GStreamer, while the Xine version will read Movie Player using xine-lib....

Create ZIP Files Using Maximum Compression

When you right-click a file or folder and select Create Archive, File Roller steps in to shrink things down. However, it will use only “normal” compression for ZIP files. This is for a reason—-not all operating systems are compatible with the more aggressive “maximum” compression, and it can also take quite a bit longer to crunch/uncrunch files. Yet the savings in file size can be worthwhile, and the truth is that both Windows and Mac OS X are fine with maximally compressed files.

To switch File Roller to use maximum compression by default, start gconf-editor (hit Alt+F2 and type gconf-editor), and navigate to /apps/file-roller/general in the list on the left. Then change the compression_level key to read maximum. The changes will take effect straight away whenever you next opt to compress a file.

Get a High-Quality (and Free) Command-Line Word Processor with Microsoft Word

If there’s one piece of software the Linux world seemingly lacks, then it’s a good-quality command-line word processor (which is to say, one that works entirely within a terminal window). There are
some excellent text editors, of course. There are even some text editors with word-processor-like features. However, there are none that include the likes of easy formatting tools or built-in spell checking.

The solution? Download and install an old DOS version of Microsoft Word that is now offered for free from Microsoft’s website. You can then use the DOSBox software to run it. It really does work! (But you can’t print—-at least not unless you want to hook up your old dot matrix printer...).

Here’s how to get it all working:

  1. Use Synaptic to install dosbox. This is a DOS emulator and virtualization program primarily designed for old games, but we’re going to use it to do some magic.
  2. The first thing to do is create a virtual hard disk for DOSBox by creating an empty folder in your /home folder-—you can call it anything, but drive_c is a good a name as any.
  3. Download the old DOS version of Microsoft Word. It’s free for all to download nowadays and is just over 3MB in size.
  4. Copy the downloaded file into your virtual hard disk folder using Nautilus. Then start DOSBox (Applications --> Games), and connect to the virtual hard disk you created earlier by typing mount C foldername, replacing foldername with the name of the folder. Then switch to the new hard drive by typing C:.
  5. Still in the DOSBox window, type Wd55_ben.exe to uncompress the installer. You’ll see a few errors about files that already exist. Just ignore the errors—overwrite or don’t overwrite. It’s up to you.
  6. Once the decompression has finished, type setup.exe to run the installer. Work through the installation options. Don’t let Word alter your system settings or add a new mouse driver—DOSBox takes care of all that for you.
  7. Once installation has finished, type word.exe to run Word. See it in action in the screenshot below. It’s still a useful bit of software for basic word processing tasks.


Every time you start DOSBox, you’ll need to remount the virtual hard disk, as described in the third step above, and this can be annoying. To avoid this, start DOSBox, and type CONFIG -writeconf dosbox.conf. This will write out a configuration file. Quit DOSBox, open the new config file in Gedit (gedit ~/dosbox.conf), and add the following two lines to the end of the file:

mount C foldername
C:

Again, you should replace foldername with the name of the virtual hard disk folder you created earlier. Now, whenever you start DOSbox, it will mount and switch to the fake drive C: automatically.

Add Drop Shadows to Screenshots

Taking screenshots of your Ubuntu desktop is easy-—simply press the Print Screen key (or Alt+Print Screen to capture the currently active window). You can automatically add a stylish drop shadow to screenshots by loading gconf-editor (hit Alt+F2 and type gconf-editor) and looking up /apps/gnome-screenshot in the list on the left. Then change the border_effect key so that it reads shadow. To add a slight black outline, type border instead. Screenshots are saved as PNG files with a transparent background, so the shadowed screenshot can be used against virtually any background in a document or website.

To disable the automatic addition of drop shadows or black borders, should you want, change the border_effect key to read none.

Stop the Cursor from Blinking

I have nothing against a blinking cursor myself, but some find it distracting. To stop Ubuntu’s cursor from blinking, open gconf-editor (hit Ctrl+F2 and type gconf-editor), navigate to /desktop/gnome/interface, and remove the check from cursor_blink. Then log out and back in again. Note that Evolution appears to ignore this setting, but most other applications will now have a still cursor.

Alternatively, by changing the value in cursor_blink_time, you can simply make it blink more slowly. A value of 5000 equates to five seconds—each unit is 1ms. Be aware that a setting such as 5000 means the cursor will be visible for five seconds at a time and then invisible for the same length of time.

Play MP3/Ogg Files at the Command Line

So, you’ve tweaked Ubuntu into a state of disrepair. Any hope of a GUI is a pipe dream, at least for the moment. While you hack away fixing things, wouldn’t it be nice to have some music to console you at the console?

Just switch to an unused virtual console, log in, and type sudo apt-get install vlc. VLC is a GUI media playback application, but it can also run with a text-mode interface-—just start it with the -I ncurses command option (note that’s a capital I, not L). For example, to play back filename.mp3, I would type vlc -I ncurses filename.mp3. Multiple files can be specified one after the other, thus
creating a playlist, or a wildcard can be used to play back all files in a particular folder (that is, vlc -I ncurses ~/Music/*.mp3). Use a and z to alter the volume.

To alter the master volume, switch to a different console and type alsamixer. Hey, presto—-a primitive but useful text-mode fader. Use the left and right cursor keys to move between faders, if you see more than one. Use the up and down keys to change the values. Hit Esc to quit.


Add RAR File Compression Support to Ubuntu

Although ZIP is the main compression file format used on most desktop computers, some people prefer to use the RAR format. To install support for extracting files from a RAR archive, use Synaptic to search for and install unrar. After this, File Roller-—Ubuntu’s default archive manager-—will be able to extract files from RAR archives. You can also use the command from the prompt by simply typing unrar e filename.rar, replacing filename.rar with what you downloaded. Note that unrar doesn’t require a dash before the e command option.

To be able to create RAR files, you’ll need to install the rar package using Synaptic. But beware that this is a shareware program—-after installation, you must register at http://www.rarlab.com within 40 days.

To create an archive at the prompt once the package is installed, use the rar command, first specifying the a command option, then specifying the name of the new archive, and finally specifying the file or folders. For example, to create a rar archive of filename.doc, type rar a filename.rar filename.doc. To create an archive of your Desktop directory, type rar a desktop.rar ~/Desktop/. Once the rar package is installed, you will also be able to create a RAR archive in the usual manner for Ubuntu, by right-clicking a file, selecting Creating Archive, and selecting .rar in the drop-down list of compression types.

Tuesday, November 25, 2008

WII软件破解全教程---基础篇

关于WII破解很长一段时间都是硬件破解为基础来运行WII游戏,随着时间的推移软件破解已经慢慢开始有替代加直读这种传统破解的趋势了,下面我就为大家讲解下WII软件破解的基本。

其实WII的破解和PSP基本相同,都是通过漏洞来做的,最开始PSP也是通过一些游戏存在的BUG来实现的,WII同样也是需要特定游戏的BUG来实现 破解软件的刷写。wii这次就是人气很高的塞尔达-黄昏公主的一个BUG,wii游戏在开始的村庄有个大叔,bug就在这里啦,读入特定的存档林克只要和 大叔说话,立刻黑屏TPHack,这样就可以运行相关的wii能识别的BOOT.ELF或BOOT.DOL文件了,elf和dol实际就是WII的可执行文件。这样就直接读入写好破解文件了,包括各种实用工具只要是BOOT.ELF货BOOT.DOL他就自己运行,不过这样老搞太麻烦了,所以就有了homebrew channel这个频道


下面就介绍下具体使用方法。

准备工作:
1..塞尔达--黄昏公主游戏一张,什么版本主机就用什么版。我这里使用的日版。(什么???没有这个游戏,那下面不用看了
2.一张SD卡不超2g,不要用SDHC的,不支持。

破解开始(要来真的啦!)

首先下载破解软件包

下载后解压,把(软件ic hbc9)目录下所有程序拷贝到SD卡里。顺便说下SD卡用FAT32格式化。

下面讲解下里面目录结构:如下图就是根目录下所有文件


1.要进入漏洞,必须得有TP存档,而Wii存档又需要一个严格的格式,这个private文件夹,便是已经按照格式指定排列好的TP存档,插入Wii进入存档管理便能认出来。这个里面有美日欧三个版本的存档,即是说,在 根目录:\private\wii\title这个文件夹下,有3个文件夹:rzdj,rzde,rzdp,里面是3个版本的存档,j对应日版,e对应美版,p对应欧版。留下对应你黄昏公主游戏的版本的存档,将另外两个删除。

2.然后讲boot.dol这个文件,这个就是已经改好名放在根目录下的homebrew channel了(以后简称hbc)。
hbc实际上就是一个引导程序。安装了hbc后,你的wii上便会出现一个名为homebrew channel的新频道,你点进去这个频道,所有你SD卡中的应用程序都已经列成表供你使用,再也不需要改名,不需要塞尔达的游戏光碟。这样就不用老去和大叔那个了。。。


3.apps文件夹就是hbc所能识别的程序目录了,sd卡里那些软件都要放在这个目录



里面所有目录都代表一个软件,随便进入看下目录结构:

所有应用程序都是由这3个文件组成。
boot.elf:主程序文件。名字还是必须为boot。比如这个文件夹下的boot.elf其实就是wad-manage.elf
icon.PNG:图标文件。在hbc频道下所显示的对应程序的标志图形,可以理解为windows的ico文件。
meta.xml:说明文件。在hbc频道下所显示的对应程序的文字说明。


关于应用程序现在确实很多,下载包里稍微介绍下.
anyregion changer-改区工具
dmp-MP3播放器
fceugx-FC模拟器
geexbox-影音播放器
genplus-世嘉Genesis模拟器
homebrew_browser-在线更新程序软件
hugo-PC Engine模拟器
NuGaSa-NGC记忆卡备份程序
ocarina-Wii用金手指
smsplus-世嘉Master System & Game Gear模拟器
Snes9xGX-SFC模拟器
vbawii-GBA模拟器
wad-manager-频道安装程序(比如有些下载回来的Wiiware就要用这个软件装)
wii64-N64模拟器(不过目前还不成熟)
GeckoOS107b-解除跨区限制(比如有些游戏带升级程序的话,可以运行此软件把升级程序屏蔽掉)
Backup Launcher-软直读(适合机器没有装IC的朋友使用)
shop update- wii shop的升级(适用于机器还是3.2版本的wii)
ios5 Inst-请和shop update配套使用
Mii Extractor-將Mii存到SD
Mii Installer-將SD內Mii存回Wii

下面开始正式操作:
1.插入上面拷好程序包的sd卡,进入主机存档界面,进入sd存档选项把对应你主机版本的存档考入wii主机里,如果之前玩过此游戏的请删除原版存档。
2.进入塞尔达游戏读档
3.和大叔说话,屏幕变黑,进入黑底白字的我们称为WiiDos的画面,这个时候屏幕上的英文会告诉你Press ACCEPT to continue or CANCEL to exit to the System Menu,按手柄上的1那个键,一路按1,安装结束后自动从启。

现在可以看到频道那里多了HBC的软件,进去就可以看到sd卡里的程序了。
下面说下比较实用的几个软件:
GEEXBOX:相当强大的视频播放软件,MP4,MKV,AVI自不必说,连RMVB和FLV也可以
直接播放,而且支持外挂字幕,支持从USB硬盘播放,最新hbc9对这个有些bug,要把SD卡的lock键锁上才能用。

wad-manager
很重要,基本上Wii上所有后来安装的频道,比如wiiware,VC,都可以通过程序转化为一个WAD文件,而这个文件可以被其他人所用来装对应的频道,非常方便,于是就有了wad-manager。常用软件用它安装成一个频道很方便,不用老插SD卡了。
安装:
将xxx.wad文件拷入SD卡根目录下的WAD文件夹内,然后将SD卡插入wii,运行homebrew channel,运行wad-manager,这个时候又会进入WiiDos界面,你可以按上下选到需要安装的wad,然后按“+”键,程序就会告诉你要 安装此wad请按A,按下A,等一会便会安装完毕,按手柄任意键重启即可看到新频道。

卸载:
与安装完全相同的步骤,是的,wad文件夹内也必须有对应的想删除的wad,只不过是在选到要卸载的wad的情况下按“-”键!

Saturday, November 22, 2008

利用本地DNS缓存来加速UBUNTU的上网浏览速度 分享

A DNS server resolves domain names into IP addresses. So when you request “yahoo.com” for example, the DNS server finds out the address for the domain, and sends your request the right way.

You can run a DNS cache on your computer. This will speed up the process of looking up domain names when browsing. The difference is about 30-60 ms. Multiply that difference by the number of websites you visit a day for an approximate estimate of the speed improvement.

The following instructions are for someone with a broadband internet connection, where the computer gets it’s local IP address using DHCP from the router in your home or office.

Install dnsmasq in Ubuntu

Dnsmasq is a lightweight, easy to configure, DNS forwarder and DHCP server. It is designed to provide DNS and optionally, DHCP, to a small network. It can serve the names of local machines which are not in the global DNS. The DHCP server integrates with the DNS server and allows machines with DHCP-allocated addresses to appear in the DNS with names configured either in each host or in a central configuration file. Dnsmasq supports static and dynamic DHCP leases and BOOTP for network booting of diskless machines.

First you need to make sure that Universe repository is enabled in your sources.list file

Install dnsmasq Using the following command

sudo apt-get install dnsmasq

uncomment the following line (remove “#” in the beginning) in the file /etc/dnsmasq.conf

listen-address=127.0.0.1

Now edit

/etc/dhcp3/dhclient.conf

and make sure the section below exactly like this, especially the line that says “prepend domain-name-servers 127.0.0.1;”

#supersede domain-name “fugue.com home.vix.com”;
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope;

In the normal case, when you get a new dhcp lease, the dhcp3 client (tool) on your computer gets a new lease, and updates the

/etc/resolv.conf

file on your computer with the right values for the DNS servers to use (usually some machine in the network of your hosting provider). Adding the “prepend” option as we did above ensures that “127.0.0.1″ will appear on the top of the list of DNS servers. That magic number refers to your own computer. So in the future, whenever your computer needs to resolve a domain name, it will forward that request to dnsmasq (which is running at 127.0.0.1 - your computer). If the details for the domain name are already in you cache, well and good, dnsmasq will serve it up and make the process real fast. If it is not in the cache, then dnsmasq will look at the /etc/resolv.conf file and use the nameservers listed below the “127.0.0.1″. I hope that explains things.

Now open the file

/etc/resolv.conf

in your text editor. It probably looks like:

search yourisp.com
nameserver 217.54.170.023
nameserver 217.54.170.024
nameserver 217.54.170.026

The 127.0.0.1 is missing right now since you haven’t renewed your lease after you edited the /etc/dhcp3/dhclient.conf file. So, let us add that in manually this one time. After you do, your /etc/resolv.conf file will look like the following:

search yourisp.com
nameserver 127.0.0.1
nameserver 217.54.170.023
nameserver 217.54.170.024
nameserver 217.54.170.026

Now you need to restart the dnsmasq using the following command

sudo /etc/init.d/dnsmasq restart.

Now you are running a local DNS cache.

Testing Your Local DNS Cache

If you want to measure your speed improvement, type the command

dig yahoo.com

You will see something like “;; Query time: 38 msec” there.

Now type the command again, and you should see something like:”;; Query time: 2 msec”

Friday, November 21, 2008

18 款免费的导航用 iPhone Apps

十一月 21, 2008

18 款免费的导航用 iPhone Apps

由. Z'HuNG 将文章归档于 MACs

pic

MapQuest
InstaMapper [iTunes]
Trapster [iTunes]
AroundMe [iTunes]
Nearby [iTunes]
Yelp [iTunes]
Goodrec [iTunes]
Target [iTunes]
Coffee Finder [iTunes]
CareerBuilder [iTunes]
iBart [iTunes]
Subway in Korea Lite [iTunes]
Taxi! [iTunes]
Zhiing [iTunes]
Over Here [iTunes]
MapWith.Us [iTunes]
Graffitio [iTunes]
Google Earth [iTunes]

Tuesday, November 18, 2008

Count the amount of '1' in a 7-bit vector

4 full-adder units are necessary to count the amount of “1″s in a 7-bit vector.

fa_01.png The most important thing to notice is that a full-adder “counts” the amount of “1″s of it’s inputs. If you are not convinced , then a brief look in the component’s truth table will prove this to you. The output is a binary represented 2-bit number.

The next picture shows how to connect the four full-adders in the desired way. The first stage generates two 2-bit numbers, each represents the amount of “1″s among its respected three input bits. The second stage adds those two binary numbers together and uses the carry_in of one full-adder for the 7th bit. fa_solution.png

As I mentioned when I posted the puzzle, I used this in an actual design. In clock and data recovery circuits (CDRs) it is necessary to integrate the amount of “ups” and “downs” a phase detector outputs (if this tells you nothing, please hold on till the CDR post I am planning). Basically, you receive two vectors of a given length, one represents “ups” the other “downs”. You have to sum up the amount of “1″s in each vector and subtract one from the other. Summing up the amount of “1″s is done using this full-adder arrangement. Another way would be using a LUT (posts on LUTs are planned as well…).

Friday, November 14, 2008

CVS服务安装设置

1.安装CVS,在新立得包管理器里面选中cvs(系统-系统管理-新立得软件包管理器,在右边的软件包列表中随便选中一个,然后键盘上按cvs这 三个字母,就会定位到以这三个字母开头的软件包),然后点击鼠标右键,在菜单中选中标记以便安装。然后点击上方工具栏中的应用,系统会自动下载包,然后安 装。

2.安装CVSD,同上,选中cvsd,安装。安装cvsd后,会提示设置repository的位置,这个地方只要输入相对于 RootJail 的位置就可以。RootJail在/etc/cvsd/cvsd.conf中进行设置,缺省的RootJail是/var/lib/cvsd。也就是说, 在这一步里面输入/myrepos就可以了。

3. 打开一个命令行窗口,创建这个/myrepos。

  1. cd /var/lib/cvsd
  2. sudo mkdir myrepos

4.初始化这个/myrepos。

  1. sudo cvs -d /var/lib/cvsd/myrepos init

5.设置cvsd的用户认证方式,缺省的是系统级的,一般来说cvs的用户都是单独设置的。

  1. sudo gedit /var/lib/cvsd/myrepos/CVSROOT/config

添加以下几行: SystemAuth=no PamAuth=no LockDir=/tmp/myrepos 然后保存退出。注意此处的/tmp/myrepos是指相对于RootJail的路径。

6.创建LockDir

  1. sudo mkdir /var/lib/cvsd/tmp/myrepos

7.添加用户

  1. sudo cvsd-passwd /var/lib/cvsd/myrepos cvsuser

8.编辑cvsd的配置文件,配置那个该死的RootJail。

  1. sudo gedit /etc/cvsd/cvsd.conf

缺省的应该是: RootJail /var/lib/cvsd Repos /myrepos 注意此处的Repos的路径也是相对于RootJail的。 另外,如果有些变态的网管喜欢封端口的话,这里可以设置cvsd的监听端口,比如可以改缺省的2401端口为8080。 Listen * 8080

10.设置目录权限。

  1. sudo chown cvsd:cvsd /var/lib/cvsd -R

11. 重新启动cvsd。

  1. sudo /etc/init.d/cvsd restart

12. 在eclipse或者其他的cvs客户端中配置使用此cvs服务器。 connection type:pserver host:your ip port:8080 repository path:/myrepos user:cvsuser

其实这个cvsd的安装,主要是参照它的README,只不过它是一个压缩文件,一开始没想解开看看而已。/usr/share/doc/cvsd/README.gz。

Wednesday, November 12, 2008

Ubuntu 8.04上如何讓Firefox 3.01能看Windows Media Player及QuickTime格式影片

Ubuntu 8.04上如何讓Firefox 3.01能看Windows Media Player及QuickTime格式影片

  1. 不要裝mozilla-mplayer
  2. 要安裝totem-mozilla,用它的libtotem-narrowspace-plugin.so來撥放 QuickTime影音
  3. 要裝gecko-mediaplayer,用它的gecko-mediaplayer-wmp.so來撥放Windows Media Player影音

檢查以下4個目錄有沒有多餘的插件檔,若有link也必須刪掉:

  • /usr/lib/mozilla/plugins
  • /usr/lib/xulrunner/plugins
  • /usr/lib/xulrunner-addons/plugins
  • /usr/lib/firefox/plugins
  • /usr/lib/firefox-addons/plugins

QuickTime目前最新版是7.5,因為gecko-mediaplayer-qt.so太舊,常無法撥放QuickTime7的影音,所以刪掉它,用totem-mozilla的libtotem-narrowspace-plugin.so。

  • sudo rm /usr/lib/mozilla/plugins/gecko-mediaplayer-qt.*
  • sudo rm /usr/lib/xulrunner/plugins/gecko-mediaplayer-qt.*
  • sudo rm /usr/lib/firefox/plugins/gecko-mediaplayer-qt.*

RealPlayer用原廠的插件(nphelix.so),因此刪除totem-mozilla及gecko-mediaplayer的:

  • sudo rm /usr/lib/xulrunner-addons/plugins/libtotem-complex-plugin.*
  • sudo rm /usr/lib/mozilla/plugins/gecko-mediaplayer-rm.*
  • sudo rm /usr/lib/xulrunner/plugins/gecko-mediaplayer-rm.*
  • sudo rm /usr/lib/firefox/plugins/gecko-mediaplayer-rm.*

Windows Media Player用gecko-mediaplayer的gecko-mediaplayer-wmp.so,將totem-mozilla的libtotem-gmp-plugin.so廢掉:

  • sudo rm /usr/lib/xulrunner-addons/plugins/libtotem-gmp-plugin.*

測試QuickTime: http://www.apple.com/trailers/
測試Windows Media Player: http://www.bloomberg.com/tvradio/tv/
測試RealPlayer: http://news.bbc.co.uk/