项目确定
今天看到个个人空间申请想起了这里。呵呵我还真是不负责哦。
昨天开始写,本来好久之前就想写了,可是本来有一个travianl,用着还可以,不过最近两天网络是在不好,它那种运行模式对我们这种网络不好的是在是种考验,而且它对建造的判断,我一直是很郁闷。觉得浪费好多时间,所以终于下定决心开始写,可是我又是一个没耐心的人,所以希望有人能看到这篇文章,支持我下,这样我就能写下去了。呵呵。
今天终于写好登录部分了。现在闲着在这里码字,呵呵。~我好懒哦。~
今天看到个个人空间申请想起了这里。呵呵我还真是不负责哦。
昨天开始写,本来好久之前就想写了,可是本来有一个travianl,用着还可以,不过最近两天网络是在不好,它那种运行模式对我们这种网络不好的是在是种考验,而且它对建造的判断,我一直是很郁闷。觉得浪费好多时间,所以终于下定决心开始写,可是我又是一个没耐心的人,所以希望有人能看到这篇文章,支持我下,这样我就能写下去了。呵呵。
今天终于写好登录部分了。现在闲着在这里码字,呵呵。~我好懒哦。~
弄了两天。终于弄明白了idhttp对cookie的控制。网络上的文章大多数真是害人。
idhttp的allowcookies属性只要是true。idhttp就支持cookie了。根本不需要网上说的加idcookiemanager控件。而且idcookiemanager控件在它的onnewcookie事件里。我操作总是出错。不知道是我的原因,还是都是。
idttp会在产生COOKIE后自动下次使用。很麻烦。而修改也只需要修改 idhttp.request.rawheaders.values['cookie']的值就可以。
用idhttp操作POST还是主要看封包结构。多截取几个封包看看。我最开始就停到这里了。以为要完整定义头呢。郁闷~
呵呵。现在终于弄好了。
http://support.microsoft.com/kb/q180366/
| Article ID | : | 180366 |
| Last Review | : | July 1, 2004 |
| Revision | : | 2.1 |
| • | In the case of a page with no frames, DocumentComplete is fired once after everything is done. |
| • | In case of multiple frames, DocumentComplete gets fired multiple times. Not every frame fires this event, but each frame that fires a DownloadBegin event fires a corresponding DocumentComplete event. |
| • | The DocumentComplete event has a IDispatch* parameter, which is the IDispatch of the frame (shdocvw) for which DocumentComplete is fired. |
| • | The top-level frame fires the DocumentComplete in the end. So, to check if a page is done downloading, you need to check if the IDispatch* parameter is same as the IDispatch of the WebBrowser control.
For Visual Basic, here is code that performs this check: Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object,
URL As Variant)
If (pDisp Is WebBrowser1.Object) Then
Debug.Print "Web document is finished downloading"
End If
End Sub
|
To handle the DocumentComplete event in Visual C++ and determine if the download of the Web page is complete, follow these steps.
Note that the steps you follow depend on the way you use the WebBrowser control.
| • | If you are creating the WebBrowser control in a CWnd/CView object, you must follow steps 1 to 4. |
| • | If you are creating the WebBrowser control in a CDialog/CFormView object, only need to follow step 4. |
| • | If you are using the CHtmlView class provided with Visual C++ 6.0, override CHtmlView::DocumentComplete() and follow step 4, using the m_pBrowserApp member of the CHtmlView class to access the WebBrowser control. |
| 1. | Define the OnDocumentComplete method in the header file for your CWnd/CView-derived class:
|
| 2. | Declare the event sink in the same header file:
|
| 3. | In the implementation file (.cpp) for your CWnd/CView-derived class, implement the event sink map:
|
| 4. | Implement the OnDocumentComplete method:
|
This approach works when the WebBrowser control navigates to a page that changes the top-level frame. Say if the navigation occurs within a frame itself, then the final DocumentComplete that is fired is that of the frame and not the top-level frame. For example, consider the following scenario.
The WebBrowser control is hosting a frameset. Within one frame of the frameset, the user clicks on a link that opens a new page in the frame itself and keeps the rest of the frameset intact. The new page could contain multiple frames again. So, there will be multiple DocumentComplete notifications (one for each new frame). But, since the top-level frame has not changed, the final DocumentComplete would be that of the frame that has changed.
If you are interested in checking for the final document complete in this scenario, you could do the following:
Here is some sample C++ code:
LPDISPATCH glpDisp = NULL; // global LPDISPATCH, can also
// be of class scope
// NavigateComplete2 event
void CWebbrDlg::OnNavigateComplete2Explorer1(LPDISPATCH pDisp,
VARIANT FAR* URL)
{
// Check if glpDisp is NULL. If NULL, that means it is
// the top level NavigateComplete2. Save the LPDISPATCH
if (!glpDisp)
glpDisp = pDisp;
}
void CWebbrDlg::OnDocumentCompleteExplorer1(LPDISPATCH pDisp,
VARIANT FAR* URL)
{
if (glpDisp && glpDisp == pDisp)
{
// if the LPDISPATCH are same, that means
// it is the final DocumentComplete. Reset glpDisp
TRACE("Document is done downloading");
glpDisp = NULL;
}
}
在网上看到这个.开心之余开始奇怪真正的程序员难道都是独行侠或者在某个地方被人雪藏着?
不仅仅国内有吃白饭的“程序员”,国外也常出现一个程序员和一群电脑白吃工作的事。下面就是一个经历了这种事的程序员的搞笑日记:
五月-20: 今天是工作的第一天!我工作的部门是“网络管理部”,里面会有很多有趣的人。这远超过了我期望从银行得到的工作!
五月-22: 我今天遇见了Diane,她正在进行“Repo”数据库项目。她说她肯定很快就会需要我的帮助。
五月-23: 我今天遇见了April。她看起来很漂亮,虽然有点多余但我还是想提一下,她的桌子上摆满了宠物小精灵的周边商品。她的另一项爱好,正如她所说的,是玩在线第一人称射击游戏。除此之外,没事做的头几天还真无聊。
五月-24: 今天认识了Steven。他是国内一些站点的ASP程序员。就在下午快过去的时候,他停下来玩魔方,看起来闷闷不乐。引用他的话说:“你将不得不在这方面帮帮我,因为我对ASP根本一无所知。”
五月-27: Diane说她在“Repo”数据库上需要一点帮助。她说她会需要我的。我再也没别的事可做。
六月-04: 和April(那个宠物小精灵女孩)聊了一会儿虚拟锦标赛。她在一个“战队”里。她的任务,很显然,是跑到一片开阔区域的正中央,然后让敌人射击她,这样她的队友就能确定敌人的位置。
七月-08: Diane想知道我是否能帮她做“Repo”数据库。我说能,她说她很快就会需要我的帮助。
七月-18: Steven今天到得真的很晚。显然,在他上火车时鞋给车门夹住了,并留在了站台上。他不得不再坐回去拿鞋。
八月-20: Diane又一次问我是否能帮她做“Repo”数据库。我说行,第二次了。
八月-26: 一个新来的,Colt,今天开始工作了,他从银行投资部转来。他之所以转到这里来是因为他觉得自己在这方面很厉害。
八月-27: 突然发现,Colt,对轻武器有一种病态的痴迷。有谁会在钱包里放自己枪的照片?
九月-16: 今天当我问Diane她在做什么时,她突然对我大吼。引用她的话:“我正忙着做Repo数据库!”
九月-17: Diane因为昨天向我大吼而向我道歉。Repo实在给了她太大的压力。
十月-09: Colt今天弄坏了我的键盘。我赞扬了他的新鞋子。“谢谢。”他回答道。然后,他抓起旁边的一杯水倒在我的桌上。这使得一大片水滴进了键盘里。他接着抬起他的一条腿,脱下鞋放在桌子上。他把鞋用力地在水上摩擦,并说:“在水中也有很好的附着力。”然后就走了。
十月-14: 另一个新人来了,David,今天开始工作。他实际上想离开主机然后基本上想投身页面开发。他基本上比我赚的钱更多,因为他实际上比我在银行呆的时间更长。基本上除此之外,他并不擅长页面开发。嗯,他实际上总是这样说话。
十月-22: 最后我去看了看那个“Repo”数据库。这是一个有三个表格的Access数据库,里面还包括一个名称为Form1的“数据窗体向导”表单。这个表单没有任何意义。这就是Diane六个月来的成果。
十一月-04: Don让我去看一下David的代码,因为这是他第一次在全彩屏幕上编写代码。他正在编写一个预算计划计算器,里面有很多需要用户填写的项目,比如食物、电费、汽油等等。每一个项目的旁边都有一个下拉框,里面有“每周”、“每月”、“每年”这几个选项。
十一月-05: 我看了一下David的代码。我建议说,他应该把这几个选项放在一个数组里来使用,而不是在代码里放上20几个多余的“每周”、“每月”、“每年”。他很高兴学到了新东西。
十一月-08: David给我看了他修改过后的代码。在现在的代码里,不只有一个数组,而是差不多声明了20个数组,每个数组都包含了“每周”、“每月”和“每年”,同时每个下拉框都使用了不同的数组。我告诉他其实只需要使用一个数组,因为它们都是一样的。
十一月-13: David想让我知道他已经修正了代码,于是我又看了一遍代码。这就是我看见的东西:
arrayOne = "每周", "每月", "每年"
arrayTwo = arrayOne
arraythree = arrayOne
arrayFour = arrayOne
...
原文:
Diary of a Third-Class Programmer
Most first-class (consultants & employees) and second-class (contractors) programmers don’t realize that there’s an entire class of programmers below them. These programmers C the third-class programmers C work in Developer Purgatory with far less responsibilities, no latitude to make any decision at any level, and always get assigned the “dirty work.” In fact, some even consider it an act of charity to call these poor folks “programmers” at all.
Most third-class programmers are third-class for a reason. There is simply no way they could ever get a job anywhere else. Occasionally, recent graduates get sucked in to Developer Purgatory by the allure of a “real programming job,” never realizing the stigma that goes along with it. Andrew is one of these poor souls, desperately trying to get out. And this is his diary.
May-20: First day on the job! I guess the department is officially titled “Internet Administration” (whatever that means), and has some fun people it. Not at all what I expected from The Bank!
May-22: Met Diane today, she just started working on the “Repo” database project. She said she’ll definitely be asking for my help on it soon.
May-23: I met April today. She seemed nice, though it was a bit odd that her entire desk was covered with Pokemon merchandise and stickers. Her other passion, so she said, was playing First Person Shooter games online. Other than that, it’s been a slow first few days with nothing to do.
May-24: Met Steven today. He’s an ASP programmer for some internal sites. Later in the afternoon, he stopped by cube, worried. To quote: “You're going to have to help me on this, because I know absolutely nothing about ASP.”
May-27: Diane said she might need some help on the “Repo” database. She’ll let me know. I don’t have anything else going on.
Jun-04: Chatted with April (Pokemon girl) about Unreal Tournament. She’s in a “clan.” It is her mission, apparently, to run out into the middle of an open area and get shot down so her teammates could spot the enemy.
Jun-18: Don (our manager) got really peeved today. We were playing foursquare between cubes again, and the ball bounced twice in his. He should have been out, but he kept insisting that a desk-bounce doesn’t count as a bounce. Anyway, he stormed out of the office, saying he’ll never play again, and went home early.
July-08: Diane asked if I had free time to help her on the “Repo” database. I did, she said she’ll let me know soon how I can help.
July-18: Steven was really late today. Apparently, he was getting onto the train and his shoe got stuck in the door and left behind on the platform. He had to go back and fetch it.
Aug-20: Diane asked, again, if could help her on the “Repo” database. I said yes, again.
Aug-26: New guy, Colt, started today, transferred from Investment Banking. He moved here because he felt he was stronger in this area.
Aug-27: Colt, as it turns out, has an unhealthy obsession with firearms. Who keeps pictures of their guns in their wallet!?
Sep-16: Diane snapped at me today when I asked how she was doing. To quote: “I’m too busy working on Repo to chit-chat!”
Sep-17: Diane apologized for yelling at me. She’s been under a lot of stress with Repo.
Oct-09: Colt broke my keyboard today. I complimented his new shoes. “Thanks,” he replied. And then, he proceeded to grab a nearby glass of water and tipped it over onto my desk. This caused a large puddle of water that started dripping onto the keyboard. He then lifted up one of his legs, and put his shoe on the desk, in the middle of the water. He then grabbed his ankle, tugging at it, and said, “good grip in the wet too.” And then he walked away.
Oct-14: Another new guy, David, started today. He virtually wanted to move away from mainframes and basically move into web development. He basically got a lot more money than I did because he'd virtually been working at the bank longer. Basically though, he wasn't very good at web development. Oh, and he virtually spoke like this all the time.
Oct-22: Finally got to see the “Repo” database. It was literally three tables in an Access database and had a “form wizard” form called Form1. The form didn’t do anything. This is what Diane has been working on for six months.
Nov-04: Don asked me to review David’s code, as it was his first coding on a full-color screen. He had been working on a Budget Planner calculator that had lots of amounts the user could enter. Food, electricity, gas, etc. Next to each of these items was a drop down box with “Weekly,” “Monthly,” “Annually.”
Nov-05: I took a look at David’s code. I suggested that, instead of having twenty odd “Weekly,” “Monthly,” “Yearly” options throughout the page, he should put them into an array and reference that. He was happy to learn a better way of doing things.
Nov-08: David showed me his revised code. In the code now, there was not just one array, but about 20 arrays declared, each array containing “Weekly,” “Monthly,” and “Yearly,” with each drop down box pointing to a different array. I told him he should just be using one array, as they are all the same.
Nov-13: David let me know that he fixed the code again, so I took a look. This is exactly what I found:
arrayOne = "Weekly", "Monthly", "Yearly" arrayTwo = arrayOne arrayThree = arrayOne arrayFour = arrayOne ...
1、先来个Desktopography的,它上面有超过40个科幻的主题壁纸,都是一些专业人士设计的,而且网站的设计相当漂亮,华丽的界面和震撼的音乐。

2、Vista Wallpaper ,放心,这不是只提供vista壁纸下载的网站。这个网站的壁纸能让你有回归大自然的感觉。(德文网站)

3、c’t Wallpapers 上面有很多关于企鹅的壁纸,不知道是否和linux有关呢?

4、ArtLebedev Wallpapers and Posters ,不要被下面的单张壁纸迷惑倒,它不是提供apple壁纸的网站。

5、Social Wallpapering ,web2.0相关的壁纸。壁纸是又匿名用户上传的。

6、Wallpapers Flickr Pool,超过20000张漂亮的壁纸供你下载。

7、Mexivista ,每个季度都有新的壁纸推出,可惜的是有些壁纸尺寸太小。

8、Gallery of Art ,提供的壁纸大多都是黑色背景的。需要注意的是你可能需要关闭“阻止弹出窗口”。

9、Adobe CS3 Wallpaper,这个的确和Adobe有点关系。

10、Design Is… Pool,壁纸由用户上传,来自Flickr。需要翻墙查看。

11、Wallpaperstock.net,有回家的感觉吗?

12、13 Fantastic Free Wallpaper Images,够科幻吗?

13、Gamers Wallpapers Gallery,提供游戏壁纸下载,尤其是赛车游戏。壁纸超过8千张。而且像素都是非常高的。

14、Mike Bonnell’s Wallpaper,很有艺术感吧?里面还有更多。

15、Four,这个下载站点的名字比较有趣。站点里面的壁纸可能比较适合女生。

以上壁纸提供站点由Jason Ng收集整理自Smashing Magazine
最新评论