無名圖形驗證碼破解過程
- 5月 18 週一 200917:07
無名圖形驗證碼破解過程
- 4月 06 週一 200914:00
在 Google 瀏覽器 optgroup 無效用.
Chrome refuses to show a dynamically created OPTGROUP label in the following code. Works okay in IE6/7, Opera9, FF2/3. I'm sure this approach is DOM compliant. Copy & paste into an empty html file...
<script language="javascript">
function changeSelect(){
// create new option group
var oGroup = document.createElement('OPTGROUP');
oGroup.label = "My Label";
// get a reference to the `select' element
var oSelect = document.getElementById('select1');
// append the option group
oSelect.appendChild(oGroup);
// add an option after the group
oSelect.options[oSelect.options.length]= new Option('My new option','some value');
}
</script>
<form name="form1" id="form1">
<select name="select1" id="select1">
<option value='a0'>a0</option>
<option value='a1'>a1</option>
<option value='a2'>a2</option>
<option value='a3'>a3</option>
<option value='a4'>a4</option>
</select>
<input type="button" onclick="changeSelect()" value="Add an option group">
</form>
I tried to search for a technical developers group to discuss this but kept finding my way back to this Help group. So I guess this is the only place to ask? Thanks.
<script language="javascript">
function changeSelect(){
// create new option group
var oGroup = document.createElement('OPTGROUP');
oGroup.label = "My Label";
// get a reference to the `select' element
var oSelect = document.getElementById('select1');
// append the option group
oSelect.appendChild(oGroup);
// add an option after the group
oSelect.options[oSelect.options.length]= new Option('My new option','some value');
}
</script>
<form name="form1" id="form1">
<select name="select1" id="select1">
<option value='a0'>a0</option>
<option value='a1'>a1</option>
<option value='a2'>a2</option>
<option value='a3'>a3</option>
<option value='a4'>a4</option>
</select>
<input type="button" onclick="changeSelect()" value="Add an option group">
</form>
I tried to search for a technical developers group to discuss this but kept finding my way back to this Help group. So I guess this is the only place to ask? Thanks.
- 11月 12 週三 200816:33
[原創] 解決 Flash 動畫和下拉式選單鄰近 會產生衝突的問題

辛苦製作了網頁 ,並且也建立了唯美的下拉式選單 ,但是後來某些需求, 必須要在選單下方的位置加入一個FLASH動畫
當加入動畫之後 ,就發現問題了 ....
- 11月 05 週三 200813:08
[轉貼] 如何建立自己的RSS, 供別人訂閱.

想知道如何透過程式編寫RSS功能,讓您的網站可以產生RSS FEED功能,供訪客訂閱的程式開發者
若所使用的網頁開發語言為ASP.NET (C#) 則可以參考以下的這篇程式原始碼 ,個人覺得還蠻受用的 共享之
本文主要提供代码,创建自己的RSS,供别人订阅...
--- RSS.aspx
<%@ Page language="c#" Codebehind="RSS.aspx.cs" AutoEventWireup="false" Inherits="Socent.RSS" %>
--- RSS.aspx.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Socent
{
/// <summary>
/// 取得聚合文章
/// </summary>
public class RSS : System.Web.UI.Page
{
Components.GenRSS gr = new Components.GenRSS(); // 实例化对象
string strRSS = "";
private void Page_Load(object sender, System.EventArgs e)
{
Response.ContentType = "application/xml"; // 输出并按xml数据显示
Response.Write (GetRSS());
}
/// <summary>
/// 取得聚合文章
/// </summary>
public string GetRSS()
{
DataSet ds = gr.GenerateRSS(); // 调用GenerateRSS()方法,获得数据
strRSS = strRSS + "<rss version=\"2.0\">";
strRSS = strRSS + "<channel>";
strRSS = strRSS + "<title>土人制造</title>";
strRSS = strRSS + "<link>http://www.socent.com</link>";
strRSS = strRSS + "<description>土人制造</description>";
for(int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
strRSS = strRSS + "<item>";
strRSS = strRSS + "<title><![CDATA["+ds.Tables[0].Rows[i]["Title"]+"]]></title>";
strRSS = strRSS + "<link>http://www.socent.com/ArticleShow@"+ds.Tables[0].Rows[i]["ID"]+".html</link> ";
strRSS = strRSS + "<description><![CDATA["+ds.Tables[0].Rows[i]["Description"]+"]]></description>";
strRSS = strRSS + "<copyright>土人制造</copyright>";
strRSS = strRSS + "<pubDate>"+Convert.ToDateTime(ds.Tables[0].Rows[i]["AddDate"].ToString()).ToString("yyyy-MM-dd HH:mm")+"</pubDate>";
strRSS = strRSS + "<comments>http://www.socent.com/CommentShow@"+ds.Tables[0].Rows[i]["ID"]+".html</comments>";
strRSS = strRSS + "</item>";
}
strRSS = strRSS + "</channel>";
strRSS = strRSS + "</rss>";
return strRSS;
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
- 8月 02 週六 200812:19
[轉貼] API大全--控制項與訊息函數
控制項與消息函數:
AdjustWindowRect 給定一種視窗樣式,計算獲得目標客戶區矩形所需的視窗大小
AnyPopup 判斷螢幕上是否存在任何彈出式視窗
ArrangeIconicWindows 排列一個父視窗的最小化子視窗
AttachThreadInput 連接線程輸入函數
BeginDeferWindowPos 啟動構建一系列新視窗位置的過程
BringWindowToTop 將指定的視窗帶至視窗列表頂部
CascadeWindows 以層疊方式排列視窗
ChildWindowFromPoint 返回父視窗中包含了指定點的第一個子視窗的控制碼
ClientToScreen 判斷視窗內以客戶區座標表示的一個點的螢幕座標
CloseWindow 最小化指定的視窗
CopyRect 矩形內容複製
DeferWindowPos 該函數為特定的視窗指定一個新視窗位置
DestroyWindow 清除指定的視窗以及它的所有子視窗
DrawAnimatedRects 描繪一系列動態矩形
EnableWindow 指定的視窗裏允許或禁止所有滑鼠及鍵盤輸入
EndDeferWindowPos 同時更新DeferWindowPos調用時指定的所有視窗的位置及狀態
EnumChildWindows 為指定的父視窗枚舉子視窗
EnumThreadWindows 枚舉與指定任務相關的視窗
EnumWindows 枚舉視窗列表中的所有父視窗
EqualRect 判斷兩個矩形結構是否相同
FindWindow 尋找視窗列表中第一個符合指定條件的頂級視窗
FindWindowEx 在視窗列表中尋找與指定條件相符的第一個子視窗
FlashWindow 閃爍顯示指定視窗
GetActiveWindow 獲得活動窗口的控制碼
GetCapture 獲得一個視窗的控制碼,這個視窗位於當前輸入線程,且擁有滑鼠捕獲(滑鼠活動由它接收)
GetClassInfo 取得WNDCLASS結構(或WNDCLASSEX結構)的一個副本,結構中包含了與指定類有關的資訊
GetClassLong 取得視窗類的一個Long變數條目
GetClassName 為指定的視窗取得類名
GetClassWord 為視窗類取得一個整數變數
GetClientRect 返回指定視窗客戶區矩形的大小
GetDesktopWindow 獲得代表整個螢幕的一個視窗(桌面視窗)控制碼
GetFocus 獲得擁有輸入焦點的視窗的控制碼
GetForegroundWindow 獲得前臺窗口的控制碼
GetLastActivePopup 獲得在一個給定父視窗中最近啟動過的彈出式窗口的控制碼
GetParent 判斷指定視窗的父視窗
GetTopWindow 搜索內部視窗列表,尋找隸屬於指定視窗的頭一個視窗的控制碼
GetUpdateRect 獲得一個矩形,它描敘了指定視窗中需要更新的那一部分
GetWindow 獲得一個視窗的控制碼,該視窗與某源視窗有特定的關係
GetWindowContextHelpId 取得與視窗關聯在一起的幫助場景ID
GetWindowLong 從指定視窗的結構中取得資訊
GetWindowPlacement 獲得指定視窗的狀態及位置資訊
GetWindowRect 獲得整個視窗的範圍矩形,視窗的邊框、標題欄、捲軸及功能表等都在這個矩形內
GetWindowText 取得一個表單的標題(caption)文字,或者一個控制項的內容
GetWindowTextLength 調查視窗標題文字或控制項內容的長短
GetWindowWord 獲得指定視窗結構的資訊
InflateRect 增大或減小一個矩形的大小
IntersectRect 這個函數在lpDestRect裏載入一個矩形,它是lpSrc1Rect與lpSrc2Rect兩個矩形的交集
InvalidateRect 遮罩一個視窗客戶區的全部或部分區域
IsChild 判斷一個視窗是否為另一視窗的子或隸屬視窗
IsIconic 判斷窗口是否已最小化
IsRectEmpty 判斷一個矩形是否為空
IsWindow 判斷一個視窗控制碼是否有效
IsWindowEnabled 判斷視窗是否處於活動狀態
IsWindowUnicode 判斷一個視窗是否為Unicode視窗。這意味著視窗為所有基於文本的消息都接收Unicode文字
IsWindowVisible 判斷窗口是否可見
IsZoomed 判斷視窗是否最大化
LockWindowUpdate 鎖定指定視窗,禁止它更新
MapWindowPoints 將一個視窗客戶區座標的點轉換到另一視窗的客戶區坐標系統
MoveWindow 改變指定視窗的位置和大小
OffsetRect 通過應用一個指定的偏移,從而讓矩形移動起來
OpenIcon 恢復一個最小化的程式,並將其啟動
PtInRect 判斷指定的點是否位於矩形內部
RedrawWindow 重畫全部或部分視窗
ReleaseCapture 為當前的應用程式釋放滑鼠捕獲
ScreenToClient 判斷螢幕上一個指定點的客戶區座標
ScrollWindow 滾動視窗客戶區的全部或一部分
ScrollWindowEx 根據附加的選項,滾動視窗客戶區的全部或部分
SetActiveWindow 啟動指定的視窗
SetCapture 將滑鼠捕獲設置到指定的視窗
SetClassLong 為視窗類設置一個Long變數條目
SetClassWord 為視窗類設置一個條目
SetFocusAPI 將輸入焦點設到指定的視窗。如有必要,會啟動窗口
SetForegroundWindow 將視窗設為系統的前臺視窗
SetParent 指定一個視窗的新父
SetRect 設置指定矩形的內容
SetRectEmpty 將矩形設為一個空矩形
SetWindowContextHelpId 為指定的視窗設置幫助場景(上下文)ID
SetWindowLong 在視窗結構中為指定的視窗設置資訊
SetWindowPlacement 設置視窗狀態和位置資訊
SetWindowPos 為視窗指定一個新位置和狀態
SetWindowText 設置視窗的標題文字或控制項的內容
SetWindowWord 在視窗結構中為指定的視窗設置資訊
ShowOwnedPopups 顯示或隱藏由指定視窗所有的全部彈出式視窗
ShowWindow 控制視窗的可見性
ShowWindowAsync 與ShowWindow相似
SubtractRect 裝載矩形lprcDst,它是在矩形lprcSrc1中減去lprcSrc2得到的結果
TileWindows 以平鋪順序排列視窗
UnionRect 裝載一個lpDestRect目標矩形,它是lpSrc1Rect和lpSrc2Rect聯合起來的結果
UpdateWindow 強制立即更新窗口
ValidateRect 校驗視窗的全部或部分客戶區
WindowFromPoint 返回包含了指定點的視窗的控制碼。忽略遮罩、隱藏以及透明
AdjustWindowRect 給定一種視窗樣式,計算獲得目標客戶區矩形所需的視窗大小
AnyPopup 判斷螢幕上是否存在任何彈出式視窗
ArrangeIconicWindows 排列一個父視窗的最小化子視窗
AttachThreadInput 連接線程輸入函數
BeginDeferWindowPos 啟動構建一系列新視窗位置的過程
BringWindowToTop 將指定的視窗帶至視窗列表頂部
CascadeWindows 以層疊方式排列視窗
ChildWindowFromPoint 返回父視窗中包含了指定點的第一個子視窗的控制碼
ClientToScreen 判斷視窗內以客戶區座標表示的一個點的螢幕座標
CloseWindow 最小化指定的視窗
CopyRect 矩形內容複製
DeferWindowPos 該函數為特定的視窗指定一個新視窗位置
DestroyWindow 清除指定的視窗以及它的所有子視窗
DrawAnimatedRects 描繪一系列動態矩形
EnableWindow 指定的視窗裏允許或禁止所有滑鼠及鍵盤輸入
EndDeferWindowPos 同時更新DeferWindowPos調用時指定的所有視窗的位置及狀態
EnumChildWindows 為指定的父視窗枚舉子視窗
EnumThreadWindows 枚舉與指定任務相關的視窗
EnumWindows 枚舉視窗列表中的所有父視窗
EqualRect 判斷兩個矩形結構是否相同
FindWindow 尋找視窗列表中第一個符合指定條件的頂級視窗
FindWindowEx 在視窗列表中尋找與指定條件相符的第一個子視窗
FlashWindow 閃爍顯示指定視窗
GetActiveWindow 獲得活動窗口的控制碼
GetCapture 獲得一個視窗的控制碼,這個視窗位於當前輸入線程,且擁有滑鼠捕獲(滑鼠活動由它接收)
GetClassInfo 取得WNDCLASS結構(或WNDCLASSEX結構)的一個副本,結構中包含了與指定類有關的資訊
GetClassLong 取得視窗類的一個Long變數條目
GetClassName 為指定的視窗取得類名
GetClassWord 為視窗類取得一個整數變數
GetClientRect 返回指定視窗客戶區矩形的大小
GetDesktopWindow 獲得代表整個螢幕的一個視窗(桌面視窗)控制碼
GetFocus 獲得擁有輸入焦點的視窗的控制碼
GetForegroundWindow 獲得前臺窗口的控制碼
GetLastActivePopup 獲得在一個給定父視窗中最近啟動過的彈出式窗口的控制碼
GetParent 判斷指定視窗的父視窗
GetTopWindow 搜索內部視窗列表,尋找隸屬於指定視窗的頭一個視窗的控制碼
GetUpdateRect 獲得一個矩形,它描敘了指定視窗中需要更新的那一部分
GetWindow 獲得一個視窗的控制碼,該視窗與某源視窗有特定的關係
GetWindowContextHelpId 取得與視窗關聯在一起的幫助場景ID
GetWindowLong 從指定視窗的結構中取得資訊
GetWindowPlacement 獲得指定視窗的狀態及位置資訊
GetWindowRect 獲得整個視窗的範圍矩形,視窗的邊框、標題欄、捲軸及功能表等都在這個矩形內
GetWindowText 取得一個表單的標題(caption)文字,或者一個控制項的內容
GetWindowTextLength 調查視窗標題文字或控制項內容的長短
GetWindowWord 獲得指定視窗結構的資訊
InflateRect 增大或減小一個矩形的大小
IntersectRect 這個函數在lpDestRect裏載入一個矩形,它是lpSrc1Rect與lpSrc2Rect兩個矩形的交集
InvalidateRect 遮罩一個視窗客戶區的全部或部分區域
IsChild 判斷一個視窗是否為另一視窗的子或隸屬視窗
IsIconic 判斷窗口是否已最小化
IsRectEmpty 判斷一個矩形是否為空
IsWindow 判斷一個視窗控制碼是否有效
IsWindowEnabled 判斷視窗是否處於活動狀態
IsWindowUnicode 判斷一個視窗是否為Unicode視窗。這意味著視窗為所有基於文本的消息都接收Unicode文字
IsWindowVisible 判斷窗口是否可見
IsZoomed 判斷視窗是否最大化
LockWindowUpdate 鎖定指定視窗,禁止它更新
MapWindowPoints 將一個視窗客戶區座標的點轉換到另一視窗的客戶區坐標系統
MoveWindow 改變指定視窗的位置和大小
OffsetRect 通過應用一個指定的偏移,從而讓矩形移動起來
OpenIcon 恢復一個最小化的程式,並將其啟動
PtInRect 判斷指定的點是否位於矩形內部
RedrawWindow 重畫全部或部分視窗
ReleaseCapture 為當前的應用程式釋放滑鼠捕獲
ScreenToClient 判斷螢幕上一個指定點的客戶區座標
ScrollWindow 滾動視窗客戶區的全部或一部分
ScrollWindowEx 根據附加的選項,滾動視窗客戶區的全部或部分
SetActiveWindow 啟動指定的視窗
SetCapture 將滑鼠捕獲設置到指定的視窗
SetClassLong 為視窗類設置一個Long變數條目
SetClassWord 為視窗類設置一個條目
SetFocusAPI 將輸入焦點設到指定的視窗。如有必要,會啟動窗口
SetForegroundWindow 將視窗設為系統的前臺視窗
SetParent 指定一個視窗的新父
SetRect 設置指定矩形的內容
SetRectEmpty 將矩形設為一個空矩形
SetWindowContextHelpId 為指定的視窗設置幫助場景(上下文)ID
SetWindowLong 在視窗結構中為指定的視窗設置資訊
SetWindowPlacement 設置視窗狀態和位置資訊
SetWindowPos 為視窗指定一個新位置和狀態
SetWindowText 設置視窗的標題文字或控制項的內容
SetWindowWord 在視窗結構中為指定的視窗設置資訊
ShowOwnedPopups 顯示或隱藏由指定視窗所有的全部彈出式視窗
ShowWindow 控制視窗的可見性
ShowWindowAsync 與ShowWindow相似
SubtractRect 裝載矩形lprcDst,它是在矩形lprcSrc1中減去lprcSrc2得到的結果
TileWindows 以平鋪順序排列視窗
UnionRect 裝載一個lpDestRect目標矩形,它是lpSrc1Rect和lpSrc2Rect聯合起來的結果
UpdateWindow 強制立即更新窗口
ValidateRect 校驗視窗的全部或部分客戶區
WindowFromPoint 返回包含了指定點的視窗的控制碼。忽略遮罩、隱藏以及透明
- 5月 26 週一 200813:45
[VC6++] Build code 出現 cannot open file "cfgmgr32.lib" 錯誤訊息之解決

曾經從 codeproject 網站下載別人寫的 VC++ Code 不過build 時卻發生如標題的錯誤 ,通常問題是發生在於沒有正確安裝與設定 WinDDK 和 WinSDK 所致,
解決的方式很簡單 ,請參考以下的步驟 .
1. 下載並安裝 Windows platform SDK for Windows XP SP2
點選 這裡
- 5月 21 週三 200816:54
[PHP] 取得未來時間
總是使用 date('Y-m-d') 取得當前的系統日期 ,或者使用 date('W') 取得當前的週別
那麼 ,如果要取得下週的週別 或者 14天後的日期呢 ?
該如何做 ?
很簡單 ,一樣使用 date 函式 加上 mktime 指定搭配即可完成 .
下面的範例 ,便是簡單的應用 ,分別取得以系統日期時間為準的七天後的日期 ,及在一整年的週別為何 ?
那麼 ,如果要取得下週的週別 或者 14天後的日期呢 ?
該如何做 ?
很簡單 ,一樣使用 date 函式 加上 mktime 指定搭配即可完成 .
下面的範例 ,便是簡單的應用 ,分別取得以系統日期時間為準的七天後的日期 ,及在一整年的週別為何 ?
1