Tuesday, August 19, 2008

JScreenFix

from http://avbcd.blogspot.com/ 三章

今次介紹這個不是什麼圖像軟件,JScreenFix 是一個web 2.0(在線)修理LCD光點或死點的軟件;它透過一連串在瀏覽器上以快速、重覆及共振活動,達至激活LCD上的晶體,從而把死點、光點復活過來。
當然它不能保證100%修理好,但對付輕微或初期的光點、死點症狀,甚為有效。
由於它免費而且不需要安裝,如果你有LCD出現光點或死點打算丟棄或修理,不妨花20分鐘來試一試,或者會有意想不到的收獲。
JScreenFix - Fix stuck pixels

另外,JScreenFix還有deluxe版本,供Plasma電視使用。除了修理能光點、死點外,還可以修復鬼影(Screen burn-in)問題。不過deluxe版本需要收費。

Sunday, August 17, 2008

Firefox 突然唔 save cookies?

Suddenly, all cookies can't store in firefox, login and save info in google and yahoo 之後重開又要 login過, 試過晒 remove cookies, clear data, 都係咁.

隔左好耐終於忍唔住上網查下咩事...

http://support.mozilla.com/tiki-view_forum_thread.php?locale=en-US&forumId=1&comments_parentId=97006#threadId97036

Q and cor-el post 左解決方法:
1. 關閉所有firefox
2. 開始->執行->enter
%APPDATA%
3. 入去 Mozilla\Firefox\Profiles\xxxxx.default
4. 入面有個cookies.sqlite, 將佢改名 cookies.sqlite.old
5. 重新開過firefox 就ok.


問題應該係因為cookies file入面有d野撞左...所以要連file initial part 再create...
好彩firefox 識自動重新 create the cookies file

Saturday, August 9, 2008

xoops,可以登入,但馬上又登出

個人架設的xoops網站近日發生問題,可以登入,但馬上又登出,無法進入管理介面,本以為死了,要重新再來,資料又很多,真慘!在拜過google大神,得到解答,真是有求必應。把文章貼上供大家參考。
參考網址:http://forum.tpc.edu.tw/ShowPost.aspx?PostID=4431

[xoops]xoops_session table毀損記
今早,家裡瞬間停電(我的電腦因當機強迫關機), 我的主機重開機後,fsck自動將一些錯誤修正,但是我的網站卻有不正常的現象,一直無法Post、Edit...看一些內容文章等...因為經歷上次老 婆的網站差點毀掉的教訓後,寫了網站自動備份的Script(還是備份在本機上),但是這次的現象不太像資料毀壞,因此決定採細部修復而不採備份回復的方 式(最近備份日期是2005/05/01,回復後會有資料遺失的風險)。
於是開始trace那裡出問題:
首先,因為發現以 Anonymous的身份,newbb內的文章可以讀,以註冊身份登入(要清除cookie方能再登入,而且要勾選自動登入才行),初步懷疑前些日子使用 的自動登入hack出問題,備份回未改前的狀態後,情況依舊,於是再改回,據此判斷應為mysql中的xoops的資料表出問題。
於是用mysqldump將xoops資料dump出來,出現了一個訊息:
引文:

....Can't open file: 'xoops_session.MYD'. (errno: 145).

所以應該是xoops_session這個table因瞬間停電造成毀損。 
於是用phpmyadmin將xoops_session這個table刪除,再將之前備份的xoops.sql中擷取xoops_session段重新建立:
xoops_session.sql
引文:

CREATE TABLE xoops_session (
sess_id varchar(32) NOT NULL default '',
sess_updated int(10) unsigned NOT NULL default '0',
sess_ip varchar(15) NOT NULL default '',
sess_data text NOT NULL,
PRIMARY KEY (sess_id),
KEY updated (sess_updated)
) TYPE=MyISAM;

Tuesday, August 5, 2008

EasyPHP - access phpMyAdmin and MySql from outside

33. How to have access to phpMyAdmin from my local network or Internet ?
  • In phpMyAdmin's configuration file (config.inc.php), set
    $cfgPmaAbsoluteUri = "http://$_SERVER[HTTP_HOST]:$_SERVER[SERVER_PORT]/mysql/";
  • Search for phpMyAdmin in Apache's configuration file. In Directory, add IP adresses of the computers you want to give the right to use phpMyAdmin. For example:
    Allow from 192.168.69.1


43. How to connect to MySql from the outside
Edit the configuration file from MySql and comment the following ligne:
bind-address=127.0.0.1


from: http://www.easyphp.org/faq.php

Friday, July 25, 2008

ExecuteNonQuery 傳回值

ExecuteNonQuery 方法不會返回任何 data record row, 它只會返回整數值, 來表示成功或受影響的data row 數目.

If use ExecuteNonQuery to create or modify database structure, eg. create table, this method returns -1 if success, returns 0 if fail.

If use ExecuteNonQuery to INSERT, UPDATE, DELETE, this method returns the Number of affected data row, but if fail, it returns 0.

Wednesday, June 4, 2008

Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

使用ado.net使資料更新時.常常會發生
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
並行違規: UpdateCommand 已經影響必須是 1 記錄的 0.

解決的方式為
當使用TableAdapter Configuration Wizard定義時,選Advanced Options,把Use Optimistic concurrency選項去除,讓產生的update,delete語法只使用key值比對即可解決

而此訊息說真的蠻困擾的,有時是不定時發生 :(

可以參考說明 http://msdn2.microsoft.com/en-us/library/aa0416cz(VS.80).aspx

Wednesday, April 23, 2008

EasyPHP IP problem

在剛安裝完成 EasyPHP1.8時.. 請進安裝目錄下的Apache Folder 中找 httpd.conf <--- 這個檔案, 其中有一段如下:


# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the
# directive.
#
#Listen 3000
#Listen 12.34.56.78:80
Listen 127.0.0.1:80 <-- 改成 Listen:80 (把127.0.0.1拿掉)
存檔重新Restart your EasyPHP 就可以了...


因為這裡的設定已經強制為 127.0.0.1 聽 80埠.
所以你打 http://localhost/ 或是 http://127.0.0.1/是可以的
但是打你的IP是不行的.. 你試著拿掉試試看. 我想應該就可以了. (記得先停止你的 IIS). 一般我裝安Apache 時的預設值是 Listen:80, 可是 EasyPHP1.8 是 Listen 127.0.0.1:80
所以別人永遠連不上你,你也無法打自己的IP 連自己.