我的評論
re: 位圖排序[未登錄] weidagang2046 2008-01-07 20:17
10^7 bit和1M誰更大?
re: 數(shù)據(jù)挖掘數(shù)據(jù)集網(wǎng)站 weidagang2046 2007-03-15 16:02
http://www.sogou.com/labs/dl/q.html
不知道這個(gè)對你是否有用。
不知道這個(gè)對你是否有用。
re: 芒果軟件XMIND 2007 weidagang2046 2007-01-16 20:20
試用了一下,是個(gè)不錯(cuò)的創(chuàng)意,但現(xiàn)在還比較簡陋,需要繼續(xù)努力!
re: 服務(wù)器端可控情形的Javascript跨域訪問解決方法 weidagang2046 2007-01-13 19:39
因?yàn)锽ookmark Servlet對javascript一無所知,只當(dāng)成一般的網(wǎng)頁文本返回,所以我認(rèn)為和一般瀏覽器的訪問沒有區(qū)別,用session維護(hù)狀態(tài)是完全可以的。
re: 服務(wù)器端可控情形的Javascript跨域訪問解決方法 weidagang2046 2007-01-13 18:05
創(chuàng)建javascript對象的時(shí)候指定id屬性可以避免覆蓋;也可以按id查找對象來判斷是否已經(jīng)返回,如果找到的話就可以看情況刪除。關(guān)于id的維護(hù)問題辦法應(yīng)該很多。比如,維護(hù)一個(gè)全局計(jì)數(shù)器。
如果一定要同步的話(比如,第一次返回才能發(fā)第二次),建議看看javascript的wait()函數(shù)。
ps: 我的javascript經(jīng)驗(yàn)也不多,上面的建議還需要實(shí)踐檢驗(yàn)。歡迎交流!
如果一定要同步的話(比如,第一次返回才能發(fā)第二次),建議看看javascript的wait()函數(shù)。
ps: 我的javascript經(jīng)驗(yàn)也不多,上面的建議還需要實(shí)踐檢驗(yàn)。歡迎交流!
re: 如何用jsp寫一個(gè)ajax跨域代理? weidagang2046 2006-12-16 14:17
需求還不太明確,ajax跨域類型比較多,不知道你具體要做成怎樣的。
re: Ruby真有那么好嗎? weidagang2046 2006-12-11 20:09
不看好Ruby,理由是和C編碼風(fēng)格類似的語言才可能有廣大的群眾基礎(chǔ),尤其在中國。
re: 編碼問題 weidagang2046 2006-12-08 00:27
上次看你另一篇文章,對編碼分析得很詳細(xì),很有幫助。再接再厲!
re: Maven2快速入門教程 weidagang2046 2006-12-02 16:17
比較關(guān)心Maven能不能方便地與eclipse集成?
re: JDK 在linux下支持epoll了 weidagang2046 2006-11-20 09:53
能否介紹一下5種模型?
re: 獲取象素的RGB weidagang2046 2006-11-16 17:06
原理很簡單,只需要簡要的三步。既:獲取屏幕DC、得到當(dāng)前鼠標(biāo)所在的像素值、分解出像素值中的紅、綠、藍(lán)三色既可,很簡單吧!
關(guān)鍵代碼實(shí)現(xiàn):
1、 獲取屏幕DC
HDC hDC = ::GetDC(NULL); //獲取屏幕DC
2、 獲取當(dāng)前鼠標(biāo)位置像素值
CPoint pt;
GetCursorPos(&pt); //得到當(dāng)前鼠標(biāo)所在位置
COLORREF clr = ::GetPixel(hDC, pt.x, pt.y); //獲取當(dāng)前鼠標(biāo)點(diǎn)像素值
3、 分解出像素點(diǎn)中的紅、綠、藍(lán)顏色值
CString ClrText;
ClrText.Format("%d",GetRValue(clr)); //分解出紅色值
ClrText.Format("%d",GetGValue(clr)); //分解出綠色值
ClrText.Format("%d",GetBValue(clr)); //分解出藍(lán)色值
::ReleaseDC(NULL, hDC); //釋放屏幕DC
關(guān)鍵代碼實(shí)現(xiàn):
1、 獲取屏幕DC
HDC hDC = ::GetDC(NULL); //獲取屏幕DC
2、 獲取當(dāng)前鼠標(biāo)位置像素值
CPoint pt;
GetCursorPos(&pt); //得到當(dāng)前鼠標(biāo)所在位置
COLORREF clr = ::GetPixel(hDC, pt.x, pt.y); //獲取當(dāng)前鼠標(biāo)點(diǎn)像素值
3、 分解出像素點(diǎn)中的紅、綠、藍(lán)顏色值
CString ClrText;
ClrText.Format("%d",GetRValue(clr)); //分解出紅色值
ClrText.Format("%d",GetGValue(clr)); //分解出綠色值
ClrText.Format("%d",GetBValue(clr)); //分解出藍(lán)色值
::ReleaseDC(NULL, hDC); //釋放屏幕DC
re: google的可怕之處 weidagang2046 2006-11-15 18:15
Google不如騰訊厲害。如果某一天有人比Google做得更好,我們可以馬上不用google,但是不管誰做出比騰訊更好的系統(tǒng)都沒有人會拋棄QQ。知識關(guān)聯(lián)的價(jià)值還無法與人的關(guān)聯(lián)的價(jià)值相比。
re: snoics-reptile 網(wǎng)頁爬蟲2.1 (2006-10-27日更新) weidagang2046 2006-10-27 22:35
有沒有文檔之類的?
re: Eclipse(3.1) Plugin Framework(基于OSGI的Plugin Architecture) weidagang2046 2006-09-07 17:41
希望能出一篇文章講講分析過程。
re: DND入門學(xué)習(xí) weidagang2046 2006-09-05 05:26
作為插件運(yùn)行還需要?jiǎng)?chuàng)建plugin.xml文件,用PDE創(chuàng)建plugin project with view可得。
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.views">
<category
name="DND Category"
id="com.blogspot.weidagang2046.dnd">
</category>
<view
name="DND View"
icon="icons/sample.gif"
category="com.blogspot.weidagang2046.dnd"
class="com.blogspot.weidagang2046.dnd.views.DNDView"
id="com.blogspot.weidagang2046.dnd.views.DNDView">
</view>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<view
ratio="0.5"
relative="org.eclipse.ui.views.TaskList"
relationship="right"
id="com.blogspot.weidagang2046.dnd.views.DNDView">
</view>
</perspectiveExtension>
</extension>
</plugin>
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.views">
<category
name="DND Category"
id="com.blogspot.weidagang2046.dnd">
</category>
<view
name="DND View"
icon="icons/sample.gif"
category="com.blogspot.weidagang2046.dnd"
class="com.blogspot.weidagang2046.dnd.views.DNDView"
id="com.blogspot.weidagang2046.dnd.views.DNDView">
</view>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<view
ratio="0.5"
relative="org.eclipse.ui.views.TaskList"
relationship="right"
id="com.blogspot.weidagang2046.dnd.views.DNDView">
</view>
</perspectiveExtension>
</extension>
</plugin>
re: Perl 模塊多平臺下安裝方法 weidagang2046 2006-05-16 18:43
set HTTP_PROXY=http://hostname:8080中http://不能省略,否則會報(bào)Error: 501 Protocol scheme '' is not supported。
re: vi中如何使用:s 命令實(shí)現(xiàn)字串的替換 weidagang2046 2006-02-10 11:50
:%s/str1/str2/g 實(shí)現(xiàn)全局替換。
re: 對于關(guān)于EJB3.0隨筆的感觸 weidagang2046 2006-02-07 20:46
不錯(cuò),支持你!
re: 怎樣把一個(gè)二維數(shù)組寫入文件 weidagang2046 2006-01-19 15:49
map(...)
map(function, sequence[, sequence, ...]) -> list
Return a list of the results of applying the function to the items of
the argument sequence(s). If more than one sequence is given, the
function is called with an argument list consisting of the corresponding
item of each sequence, substituting None for missing values when not all
sequences have the same length. If the function is None, return a list of
the items of the sequence (or a list of tuples if more than one sequence).
map(function, sequence[, sequence, ...]) -> list
Return a list of the results of applying the function to the items of
the argument sequence(s). If more than one sequence is given, the
function is called with an argument list consisting of the corresponding
item of each sequence, substituting None for missing values when not all
sequences have the same length. If the function is None, return a list of
the items of the sequence (or a list of tuples if more than one sequence).
re: 問個(gè)昨天的MSN面試題 weidagang2046 2005-11-11 23:12
a[n][n]為矩陣,查找x
for(i=0,j=n-1;i<n && j>=0 && a[i][j]!=x;i+=a[i][j]<x,j-=a[i][j]>x);
for(i=0,j=n-1;i<n && j>=0 && a[i][j]!=x;i+=a[i][j]<x,j-=a[i][j]>x);
re: Java中存儲數(shù)據(jù)的地方 weidagang2046 2005-10-28 21:51
關(guān)于你的舉例,你怎么確定一個(gè)在堆棧,一個(gè)在堆的?請教!
re: Multiple inheritance and the this pointer weidagang2046 2005-10-25 21:36
寫了個(gè)小小的測試程序:
#include<cstdio>
#include<algorithm>
using namespace std;
class A
{
private:
int a;
public:
A()
{
printf("A: %p\n", this);
}
};
class B
{
private:
int b;
public:
B()
{
printf("B: %p\n", this);
}
};
class C : public A, public B
{
private:
int c;
public:
C()
{
printf("C: %p\n", this);
}
};
int main()
{
C objC;
return 0;
}
#include<cstdio>
#include<algorithm>
using namespace std;
class A
{
private:
int a;
public:
A()
{
printf("A: %p\n", this);
}
};
class B
{
private:
int b;
public:
B()
{
printf("B: %p\n", this);
}
};
class C : public A, public B
{
private:
int c;
public:
C()
{
printf("C: %p\n", this);
}
};
int main()
{
C objC;
return 0;
}
re: 為tomcat頁面設(shè)置訪問權(quán)限(j_security_check) weidagang2046 2005-09-03 20:47
自己測試了一下,下面是我的web.xml配置文件:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<security-constraint>
<web-resource-collection>
<display-name>Example Security Constraint</display-name>
<web-resource-name>welcome_info</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>role1</role-name>
<role-name>tomcat</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>welcome_info</realm-name>
</login-config>
</web-app>
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<security-constraint>
<web-resource-collection>
<display-name>Example Security Constraint</display-name>
<web-resource-name>welcome_info</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>role1</role-name>
<role-name>tomcat</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>welcome_info</realm-name>
</login-config>
</web-app>
re: 為tomcat頁面設(shè)置訪問權(quán)限(j_security_check) weidagang2046 2005-09-03 20:45
注意這里的url-pattern <url-pattern>/ddly/admin/*</url-pattern>其實(shí)是以本web app為根的相對路徑。
re: C/C++數(shù)組名與指針區(qū)別深入探索 weidagang2046 2005-08-24 12:45
真慚愧,一直沒有弄清楚數(shù)組名和指針的區(qū)別,現(xiàn)在終于撥云見日了!
re: 《深入淺出Hibernate》讀書筆記(1)——實(shí)體對象生命周期 weidagang2046 2005-07-28 12:57
寫得不錯(cuò),支持!
re: Introduction to DOM weidagang2046 2005-04-23 16:59
寫得很不錯(cuò)!DOM的概念講得很透徹。DOM只是一系列與獨(dú)立于實(shí)現(xiàn)的interfaces,它提供了訪問和修改Document Object的接口。
re: 如何使用線程 weidagang2046 2005-04-21 04:10
Timer部分對我來說比較新鮮
re: 全世界所有程序員都會犯的錯(cuò)誤-蔡學(xué)鏞 weidagang2046 2005-04-20 00:22
第一次聽說class constructor的概念