- 浏览: 927478 次
最新评论
-
bo_hai:
不知道性能和快捷键是否有提升?
Eclipse Kepler 4.3 正式版发布
文章列表
putget_server.py
#encoding=utf-8
import socket
import common
import sys
import thread
import threading
class connection:
def __init__(self, s):
self.socket = s
self.status = "Read"
self.data = ""
self.data_len = 0
def read_command(self):
buf = "&quo ...
- 2009-05-21 14:27
- 浏览 605
- 评论(0)
用twisted写一个替换掉网站上某个文件的代理,作用参见http://lifesinger.org/blog/?p=40
“如何直接调试线上页面的JavaScript和CSS”这篇文章,有了这个就不用fidder了,而且使用更加方便,替换时把要把原来的文件的content-length这个header去掉:
from twisted.web import http
from twisted.web import proxy
from twisted.internet import reactor
from twisted.python import log
import sy ...
- 2009-05-21 06:52
- 浏览 462
- 评论(0)
工作中需要了解Squid TCP_MISS/000 的意义,看了一下squid代码:在代码Enums.h中:先定义了枚举量:HTTP_STATUS_NONE = 0,
下面这个 sline结构的status,最后会赋值到在log中看到的TCP_MISS后面000这个http->code变量这个 sline变量的status值在初始化的时候被初始化为HTTP_STATUS_NONE, 也就是0:voidhttpStatusLineInit(HttpStatusLine * sline){ HttpVersion version; httpStatusLineSet(sline, ver ...
- 2009-01-17 14:57
- 浏览 876
- 评论(0)
import urllib2import socketimport threadingimport fcntl#import portalockerdef test_urls(f1,f2,f3,f4,threadnum): while 1: fcntl.flock(f1, fcntl.LOCK_EX) urlstr=f1.readline() fcntl.flock(f1,fcntl.LOCK_UN) if urlstr: datastream=None try: request = urllib2.Request(urlstr) opener = urllib2.build_opener() ...
- 2008-09-25 10:47
- 浏览 382
- 评论(0)
#include "iostream"#include "string.h"#include "iostream"#include "fstream"#include <vector>#include <algorithm>using namespace std;typedef struct url_n_time{ string url; int times; bool operator <(const url_n_time& i1)const { return times & ...
- 2008-09-10 17:41
- 浏览 470
- 评论(0)
穿透防火墙的方法---http tunnel:我的理解和疑惑 欢迎交流!!
楼主HuangRG(.....)<clk>2004-07-27 13:32:21 在 VC/MFC / <nobr id="clickeyekey1" style="border-bottom: 1px dotted rgb(102, 0, 255); text-decoration: underline; color: rgb(102, 0, 255); background-color: transparent;" onclick="$cE. ...
- 2008-07-26 15:24
- 浏览 453
- 评论(0)
1、如何在下面的test函数里加入代码可以使程序运行起来输入和输出的相等? (环境是vc6Debug方式下)#include<stdio.h>void test(){int t; scanf("%d",&t); 在这里加入代码 }main(){int m; test(); printf("m=%d",m);}
引用 68 楼 hong8292 的回复: C/C++ code1、//在这里加入代码__asm { mov eax, [ebp-8] push esi mov esi,[ebp] ...
- 2008-07-25 22:42
- 浏览 381
- 评论(0)
Web缓存技术概述王世克 吴集 金士尧(国防科技大学计算机学院并行与分布国家重点实验室 长沙410073)摘要WWW是互联网上最受欢迎的应用之一,其快速增长导致网络拥塞和服务器超载,缓存技术被认为是减轻服务器负载、降低网 ...
- 2008-07-10 14:38
- 浏览 232
- 评论(0)
Abridged from: http://blog.chinaunix.net/u/16292/showart_393309.htmlLinux系统进程控制编程(六)——wait和waitpid函数
zieckey (http://zieckey.cublog.cn) wait(等待子进程中断或结束)表头文件 ...
- 2008-03-10 10:35
- 浏览 411
- 评论(0)
#include "iostream"#include "string.h"#include "iostream"#include "fstream"#include <vector>#include <algorithm>
using namespace std;
char ch[100];struct msd //marksixdata{ int year; int term; int n_norm[6]; int n_special;};vector<msd> vec_m ...
- 2008-02-06 01:32
- 浏览 529
- 评论(0)
系列C++问题请教高手之九:buffer overflow
ZhengKarl
亮仔
等 级:
发表于:2007-10-24 13:41:51 楼主
近日走火入魔,看了一下bufferoverflow,在以下代码中:在VC6中打印出来的信息是:Addressoffunction:0x0040100f,但在LINUX中打印出来 ...
- 2007-10-29 14:57
- 浏览 562
- 评论(0)
Makefile is not Make love.(http://blog.csdn.net/fudan_abc/archive/2007/06/19/1657883.aspx)
We usually make a positive definition like: What is something.
But now we use negative definition because of.....
However, Makefile is so important for Linux!
Abridged:
有几个地方值得解释一下的。首先,我在定义大部分变量的时候使 用的是 : ...
- 2007-08-17 20:50
- 浏览 490
- 评论(0)
/** USB Skeleton driver - 2.0** Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com)**This program is free software; you can redistribute it and/or*modify it under the terms of the GNU General Public License as*published by the Free Software Foundation, version 2.** This driver is based on the ...
- 2007-07-30 09:43
- 浏览 407
- 评论(0)
Usually our computers are attacked by viruses or other spyware website.
I don't know whetherthey modified files in our computer,especially execute files, or maybe HTML files.
Now, make a program to compare two files if they are exactly the same. I'd like use it to compare suspected file withe backu ...
- 2007-06-10 11:19
- 浏览 424
- 评论(0)
in my Lab,thenet is Education Research net,I need to use a proxy for getting access to foreign country site. and sometimes the proxy of our school is not work well,but I still have agood friend's proy.As for me,I don't like to change to it in IE by through many click and input the proxy server,port.
...
- 2007-06-07 10:43
- 浏览 385
- 评论(0)