日志
-
2011-06-12 12:45
-
2009-05-23 22:59
阅读全文»分类:编程技术|回复:0|浏览:2302
<?php
$bondary = "---------------------------7d4a6d158c9";
$body = "--" . $bondary . "\r\n";
$body .= "Content-Disposition: form-data; name=\"data\"; filename=\"test.data\"\r\n";
$body .= "Content-Type: application/octet-stream\r\n\r\n";
$end_body = "\r\n--" . $bondary . "--\r\n";
$file = file_get_contents("test.data");
$header = "POST /myserver/upload.php HTTP/1.1\r\ ..
-
2011-06-12 12:44
-
2009-04-05 17:03
阅读全文»分类:编程技术|回复:0|浏览:2728
linux下的real_path()函数在Mandriva 2009中出现了buffer overflow的错误,这可能是它的一个BUG,现在通过在启动脚本(.sh)中切换到可执行文件所在的目录的方式解决获取可执行文件路径的问题:
程序:
int main(int argc, char **argv)
{
.................
boost::filesystem::path appPath;
#ifdef _WIN32
appPath = boost::filesystem::complete(argv[0]);
#else
appPath = boost::filesystem::current_path() / "MyExeFileName";
#endif
..............
}
启动脚本:
#!/bin/sh
exedir=`dirname $0` ..
-
2011-06-12 12:43
-
2009-03-09 10:14
阅读全文»分类:编程技术|回复:0|浏览:1276
记一下我用到的boost库编译方法,免得以后再用的时候老看帮助
Windows下:
bjam.exe--build-type=minimal --with-date_time --with-filesystem--with-program_options --with-regex --with-serialization --with-system--with-thread toolset=msvc-9.0 variant=release link=staticthreading=multi stageLinux下:
./bjam --build-type=minimal --with-date_time --with-filesystem--with-program_options --with-regex --with-serialization --with-system--with-thread variant=release link=static threading=multi ..
-
2011-06-12 12:43
-
因为Windows下的Zend Server用到了Qt(Qt 4.3.3),而自己的本地C接口DLL也用到了Qt(Qt4.4.3),因为有可能在DLL中用到了老版本的Qt所没有的功能或没有包含的模块,所以需要在用新版本的Qt对应文件覆盖掉ZendServer用的Qt文件,这样Java Bridge就能正常运行JNI的jar/dll(依赖于C接口DLL)。
阅读全文»分类:编程技术|回复:0|浏览:1056
-
2011-06-12 12:43
-
2009-02-27 17:19
阅读全文»分类:编程技术|回复:0|浏览:1620
愚蠢啊,今天才发现,琢磨Qt文档中这句话的意思:
In addition to providing pure rendering features, HTML documents can bemade fully editable to the user through the use of the contenteditableattribute on HTML elements.
它的意思是什么?以前一直在Qt提供的类里找所谓的contenteditable属性,。。。。。今天忽然发现,它是在HTML源代码中的HTML元素,也就是说将要显示的HTML代码的HTML元素加上contenteditable属性,那用QWebView打开的网页,就是可编辑的了。
测试了一下,在Firefox、Opera、Chrome下都支持 ..
-
2011-06-12 12:40
-
MySQL启动不来的原因之一可能是默认是InnoDB数据库引擎,只要删除data目录下的ibdata1、ib_logfile1等即可。
阅读全文»分类:系统使用|回复:0|浏览:1245
-
2011-06-12 12:36
-
在PHP中读、写EXCEL文件,建议使用Apache POI来进行,对此需要在PHP中配置Java Bridget支持
阅读全文»分类:编程技术|回复:0|浏览:1209
-
2011-06-12 12:36
-
原文见:http://hi.baidu.com/xchinux/blog/item/26c2f424d20b463e8644f97e.html
阅读全文»分类:编程技术|回复:0|浏览:1301
Windows下使用Nokia Qt SDK做Symbian S60开发
2010-06-24 21:09
好久没有上Qt官网,今天上去看了一下,发现Nokia Qt SDK 1.0发布了,集成了Qt forSymbian和Maemo的开发工具包,一次安装即可,这要比以前做Symbain S60开发方便多了,以前要安装carbide、s60 xthsdk、qt forsymbian、activeperl至少四个包,中间还要小心翼翼的,生怕哪一步出错了,现在方便多了,一次性安装就OK了,只是文件太大了点,有900M之巨,安装完成后占空间4G。
下面开始步骤: ..