- 博客(21)
- 资源 (1)
- 收藏
- 关注
原创 C调用python
#include int main(){ Py_Initialize(); PyRun_SimpleString("print /"hello, python c api/""); Py_Finalize(); return 0;}gcc -o test test.c -lpython2.6./testref: http://docs.python.org/c-api/
2010-12-18 08:29:00 612
转载 php使用curl上传文件
<br />http://dtbaker.com.au/random-bits/uploading-a-file-using-curl-in-php.htmlUploading a file using Curl in PHP<br />Here's how to upload files using curl in php: (it's very easy)<br />notice the @ infront of the file path, this is the magic part.<?php<b
2010-12-17 23:32:00 1015
原创 编程刷新explorer
<br /><br />from win32com.shell import shell, shellcon<br />def notify(f):<br /> shell.SHChangeNotify(shellcon.SHCNE_UPDATEITEM, shellcon.SHCNF_PATH|shellcon.SHCNF_FLUSHNOWAIT, f, None)<br /> <br />notify("c:/usr/local")
2010-12-17 21:59:00 1226
转载 windows图标叠加
<br /><br /> http://timgolden.me.uk/python/win32_how_do_i/add-my-own-icon-overlays.html#asterisk需要注意,运行程序注册完之后,需要重启explorerIsMemberOf函数是条件判断,返回S_OK则叠加指定的图标GetOverlayInfo返回图标文件地址Add my own icon overlays<br />Tim Golden > Python Stuff > Win32 How Do I...? >
2010-12-15 20:09:00 1764
转载 chrome浏览器设计文档
<br />https://sites.google.com/a/chromium.org/dev/developers/design-documents<br /> <br />Multi-process Architecture<br />This document describes Chromium's high-level architecture.Problem<br />It's nearly impossible to build a rendering engine that never
2010-12-11 17:17:00 2746
原创 gprof使用说明
<br />http://www.cs.utah.edu/dept/old/texinfo/as/gprof.htmlgcc使用 -pg 参数编译程序gcc -o test test.c -g -pg编译成功后运行程序,会在当前目录下生成gmon.out文件./test使用gprof和gmon.out运行程序gprof test gmon.out这时将输出程序的性能信息
2010-12-10 22:24:00 744
转载 tcmalloc使用说明
<br /><br />http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools<br /> <br /> <br />TC Malloc:gcc [...]-ltcmalloc<br />Heap Checker:gcc [...]-o myprogram -ltcmalloc<br />HEAPCHECK=normal ./myprogram<br />Heap Profiler:gcc [...]-o myprogram
2010-12-10 22:19:00 1927
原创 Foreign function interface
<br />http://en.wikipedia.org/wiki/Foreign_function_interface<br /> <br />http://sourceware.org/libffi/
2010-12-08 10:29:00 755
转载 web测试工具--HTTP LOAD
<br />http://www.acme.com/software/http_load/<br /> <br /><br />http_load runs multiple http fetches in parallel, to test the throughput of a web server. However unlike most such test clients, it runs in a single process, so it doesn't bog down the client
2010-12-08 10:21:00 804
转载 web测试工具--Apache AB
http://httpd.apache.org/docs/2.0/programs/ab.html<br /> ab - Apache HTTP server benchmarking tool<br />Available Languages: en | ko | tr <br />ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give
2010-12-08 10:18:00 636
原创 shell编程中使用数组
<br /><br />声明<br />declare -a arr<br /> <br />赋值<br />arr[1]=one<br />arr['a']=1<br /> <br />引用<br />val=${arr['a']}<br /> <br />删除<br />unset arr['a']<br /> <br />求长<br />len=${#arr[*]}<br /> <br />拷贝<br />newarr=( ${arr[*]} )<br /> <br />追加<br />arr=( $
2010-12-06 20:34:00 1181
原创 使用pycurl上传文件
import pycurlurl = "http://www.xxxxx.com/upload.php"field = "uploadFile"c = pycurl.Curl()c.setopt(c.POST, 1)c.setopt(c.URL, url)c.setopt(c.HTTPPOST, [(field, (c.FORM_FILE, "/home/rare/tmp/a.py"))])#c.setopt(c.VERBOSE, 1)c.perform()c.close()其中
2010-12-06 19:49:00 3663
转载 Scalable System Design Patterns
http://horicky.blogspot.com/2010/10/scalable-system-design-patterns.htmlLooking back after 2.5 years since my previous post on scalable system design techniques, I've observed an emergence of a set of commonly used design patterns. Here is my attempt to ca
2010-12-03 16:00:00 528
转载 The Full Stack
<br />http://calendar.perfplanet.com/2010/the-full-stack/<br /> <br />Dec 2010The Full Stackby Carlos Bueno<br />One of my most vivid memories from school was the day our chemistry teacher let us in on the Big Secret: every chemical reaction is a joining
2010-12-03 14:26:00 1247
转载 The State of Web Performance Optimization
http://calendar.perfplanet.com/2010/the-state-of-web-performance-optimization-2010/1stDec 2010The State of Web Performance Optimization – 2010by Patrick MeenanBack in 2008 I took a look at all of the pages that had been tested on WebPagetest to get an
2010-12-03 14:20:00 1124
转载 php拓展开发-处理可变个数的参数
http://theserverpages.com/php/manual/en/zend.arguments.variable.phpDealing with a Variable Number of Arguments/Optional Parameters If your function is meant to accept a variable number of arguments, the snippets just described are sometimes suboptimal so
2010-12-03 09:13:00 933
转载 php拓展开发
<br />Extension Writing Part I: Introduction to PHP and ZendSaraMG | 20 comments | Tuesday, March 1, 2005<br /><br />Introduction<br />What's an Extension?<br />Lifecycles<br />Memory Allocation<br />Setting Up a Build Environment<br />Hello World<br />Bui
2010-12-03 08:55:00 3228
转载 vim强大的g命令
<br /><br />http://vim.wikia.com/wiki/Power_of_g<br /> <br />The global command :g is very useful. Here are some examples showing the power of :g.Contents [show]Brief explanation of :g Edit:[range]g/<pattern>/cmd<br />An Ex command is one starting with
2010-12-03 08:50:00 8518
供VC6使用的sqlite的SDK
2008-12-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人