Fedora core3 自動載入 USB 設定

http://fedoranews.org/krishnan/tips/tip040.shtml

2004-02-11 Fedora Tips 40:
Reading and writing files to USB-key can be just two clicks away if you are using Gnome. No "mount" or "umount" commands. To enjoy 2-click method, you've got to follow just two easy steps.

1. as root (or through "$su -l" from a user account) with Vim, Gedit or any other text-editor add a line to your /etc/fstab file

/dev/sda1 /mnt/usbkey vfat user,iocharset=utf8,umask=0,sync,quiet,exec,codepage=866,noauto 0 0
2. as root (or through "$su -l" from a user account) create a directory in /mnt/ file
#mkdir /mnt/usbkey
In fact it doesn't matter which step goes first.

Now reboot, so that your changes take effect.

You are about to enjoy Gnome 2-click USB method.

Plug in your usb-key right click (1st click) on desktop, in dropdown menu choose "disks". Here you go - see usbkey? Choose it by left-clicking (2nd click) and on your desktop there will be a nice icon of a USB drive. Work with it, like you would do with a regular folder. To unmount USB-key, right-click on that icon again and choose "unmount". As easy as that. Now any time you want to use your flash drive - plug, right-click & left-click to choose the drive. - submitted by Sergey Samoylov


在Fedora core3 下安裝字體


* 字体安装
将Microsoft Windows下的相应TrueType拷贝到Fedora相应目录。我是放在/usr/share/fonts/windows目录下。
然后以root执行下面的命令

cd /usr/share/fonts/windows
ttmkfdir .
cp fonts.scale fonts.dir
chkfontpath --add /usr/share/fonts/windows


參考





Sourdough Design 一個 PHP5 的物件整合工具

Sourdough 以 php5 語法實作,是一個物件整合的工具,可以提供程式人員以簡單的方式,使用各個 object 。
如果不想重頭以 object 架構一個專案,使用 Sourdough 是不錯的選擇,
我已嘗試將 sfs3 (http://sfscvs.tcc.edu.tw) 改以 Sourdough 架構,讓程式更為簡化且具有擴充性。

參考 sourdough網站說明

http://sourdough.phpee.com/index.php?node=18



ADMIN Migrate postgres databases from SQL_ASCII to UNICODE

from : http://www.mail-archive.com/pgsql-admin@postgresql.org/msg14324.html


If you have blobs you must split your SQL_ASCII to convert it
with iconv.
I export my full database.
I create a new SQL_ASCII database with only tables that don't
contains blobs. (db_without_blobs)
I create a new SQL_ASCII database with only tables that contains
blobs. (db_with_blobs)
Export your db_without_blobs.
convert it with iconv
Create your UNICODE database.
import db_without_blobs.
import db_with_blobs.

 (閱讀全文)


如何將一個table 中的部份資料加入另一個 table

以下的語法在 postgresql 中執行

INSERT INTO plan_item_reg (SELECT  * FROM plan_item_reg_backup WHERE  us_id='aaa');


我的 ASUS M2N notebook 終於有完整的功能了

我的工作大部份要在 Linux 平台完成,但自從換了新的Notebook (ASUS M2400N),安裝 Fedora core 1 後,我只能有一部殘缺功能的 Notebook ,總共少了電源管理、音效、無線網路等功能,常為了要使用無線網路或聽音樂而切換到 XP,真是不方便,不過也因此花更多時間尋找 Fedora 使用 centrino 的修正文件,前些天,總算找到一個完整的修正步驟,http://jouston.no-ip.com/archives/000055.html , 按步一一安裝修正,我的Notebook 殘缺的電源管理、音效、無線網路又回來了,真是令人高興,要特別感謝 文章作者 HOM ,
看來我離 Windows 愈來愈遠了~



Install Fedora on ASUS M2N notebook(M2474PDV)

from  http://jouston.no-ip.com/archives/000055.html

In this short HOWTO, we have few tasks: (In fact, you have to do a lot of things...)
1. Install Fedora on this elegant business notebook.
2. Enabling ACPI for sound card, pc card and power management support.
3. Enabling build-in ICH software modem
4. Download synaptic driver from http://tuxmobil.org/touchpad_driver.html
5. Enabling Intel Wireless Pro 2100 802.11b build-in wireless mini-pci card

 (閱讀全文)


為-面向-對像-而生的PHP5

轉載自 http://www.twbb.org/forum/?board=80;action=display;threadid=2919

 (閱讀全文)


plog 檔案中心的縮圖,如果無法正確產生,須修改 php.ini 的設定

php 預設的 memory limit 為  8M,
如果圖檔太大, 當 plog 呼叫  ImageCreateFromJPEG 時,會超過 8M ,造成錯誤

plog 在 class/gallery/resizers/gallerygdresizer.class.php 的縮圖處理, 將錯誤訊息隱藏 ,造成除錯的不易

$this->img["src"] = @ImageCreateFromJPEG ($imgfile);

修正方法: 將 /etc/php.ini 的  memory_limit = 8M  改大一些  如
memory_limit = 20M ,重新啟動 apache 即可解決!



wakka .hdaccess 設定備忘

wakka 在 apache 2 安裝好後須改 .hdaccess 這個檔,將預設的檔案改為

 

RewriteEngine on
RewriteRule ^(wakka.php?.*)$ - [S=1]
RewriteRule ^(.*)$ /wakka/wakka.php?wakka=$1 [QSA,PT,L]
 


再修改 /etc/httpd/conf/httpd.conf 加入
 

Alias /wakka/ /var/www/wakka/

AllowOverride All

重新啟動 apache

 (閱讀全文)


讓 plog 也可以收big5 的rss

1. 自己動手加入一個函式

vi class/xml/rssitem.class.php

加入 

 function getBig5Title()
                {
                        return iconv("Big5","UTF8",$this->_title);
                }

2.將 下列的語法加入你的樣版中(以 free.tnc.edu.tw 為例)

<div id="sectionHeader">free.tnc.edu.tw </div>
    <div id="sectionContent">
     {if $rss->parse("http://free.tnc.edu.tw/backend.php")}
  {foreach from=$rss->getItems() item=rssItem}
    <a href="{$rssItem->getLink()}">{$rssItem->getBig5Title()}</a><br/>
  {/foreach}
 {else}
   <b>There was an error parsign the feed!</b>
 {/if}

    </div>





在FreeBSD 下安裝 LDAP 伺服器

1. 利用port 安裝

# cd /usr/ports/net/openldap22-server/
# make install

2. 產生一個密碼檔

srv# /usr/local/sbin/slappasswd
New password:
Re-enter new password:
{SSHA}xuMYO0holC9CQHuwl9t8wFt3at9HXl+x


2.修改設定檔,並將 rootpw 改為 {SSHA}xuMYO0holC9CQHuwl9t8wFt3at9HXl+x

# ee /usr/local/etc/openldap/slapd.conf
...
#######################################
# ldbm database definitions
#######################################

database bdb
suffix "dc=tccboe"
rootdn "cn=admin,dc=tccboe"
rootpw {SSHA}xuMYO0holC9CQHuwl9t8wFt3at9HXl+x
....


 (閱讀全文)


在 LDAP 下使用中文

資料來源
http://netlab.cse.yzu.edu.tw/~statue/freebsd/zh-tut/ldap.html

如果是要將 .ldif 轉入,必須先將中文轉成 utf-8。

安裝 converter/iconv, 假設要轉碼的檔案是 big5.ldif,轉出來的檔案是 utf-8.ldif。

% iconv -f big5 -t utf-8 big5.ldif > utf-8.ldif

然後就可以用 ldapadd 來將 utf-8.ldif 轉入 ldap 了。




plog 修正檔 templateview.class.php

plog 使用者上傳自己的模版後,無法以 op=Template 的方式使用自己的樣板

trace 了一下程式,找到 class/view/templateview.class.php 中少傳了一個值

修正檔下載 5-templateview.class.txt

/**
* Renders the template
*/
function render()
{
$blogSettings = $this->_blogInfo->getSettings();
//少傳了$this->_blogInfo
$template =
$this->_templateService->Template( $this->_templateFile,
$blogSettings->getValue( "template" ),$this->_blogInfo);
$template->assign( $this->_params->getAsArray());

print( $template->fetch());
}
}



讓 mozilla 印得出中文

在 Linux 環境下,要印出中文字須修改

/usr/local/mozilla/defaults/pref/unix.js

372 pref("print.postscript.nativefont.x-western", "");
373 //pref("print.postscript.nativefont.zh-CN", "");
374 //pref("print.postscript.nativefont.zh-TW", "");
375 pref("print.postscript.nativefont.zh-CN", "BousungEG-Light-GB-GB-EUC-H");
376 pref("print.postscript.nativefont.zh-TW", "ShanHeiSun-Light-B5-H");
377 pref("print.postscript.nativecode.zh-CN", "gb2312");
378 pref("print.postscript.nativecode.zh-TW", "big5");





«上一頁   1 2