全部博文(164)
发布时间:2013-07-31 17:42:50
1、linuxany.c代码如下:#include "stdio.h"void display(char* msg){ printf("%s\n",msg);} int add(int a,int b){ return a+b;}2、编译c代码.........【阅读全文】
发布时间:2013-07-31 16:32:56
Here's a demo:from ctypes import * foo = (c_char * 4)() #char数组foo.value = "foo" print foo.raw # => 'foo\x00' foo_ptr = cast(foo, c_char_p) print foo_ptr.value # => 'foo'......【阅读全文】
发布时间:2013-07-31 16:30:09
This article explains how to write a DLL/SO in C/C++ for PythonNote: Cython can also be used to create and wrap C libraries for Python, and might be a good alternative to the approach explained in this article.Create a new file and write, for example, a function .........【阅读全文】
发布时间:2013-07-12 14:20:12
Nginx环境在Nginx低版本中,是不支持PATHINFO的,但是可以通过在Nginx.conf中配置转发规则实现:在nginx配置文件中添加location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break;.........【阅读全文】
发布时间:2013-07-02 11:07:44
$raw_data = file_get_contents("php://input");var_dump($raw_data);if( !empty($raw_data) ){ $data = @json_decode($raw_data, true); if( $data ){ var_.........【阅读全文】