
C++
yiitz
码出精彩
展开
-
Qt——web网页和本地对象的交互
有时候可能需要在html网页中调用本地的对象方法。比如说我点击了一个视频文件的链接,希望调用本地的多媒体模块来播放这个视频文件, 如何实现?一、html中的JavaScript调用Qt本地对象方法过程如下:将本地的QObject对象暴露给webkit和JavaScript通过JavaScript调用本地QObject的槽下面对每个步骤进行详细的分析:转载 2012-09-07 23:43:56 · 497 阅读 · 0 评论 -
epoll_wait Interrupted system call
我们在利用 gdb 调试带有 epoll_wait select sem_wat 的多线程代码的时候可能会出现非正常返回 -1 的情况,错误原因是:Interrupted system call。这是由于gdb调试的时候会在断点处插入一条中断指令,当程序执行到该断点处的时候会发送一个SIGTRAP信号,程序转去执行中断相应,进而gdb让程序停下来进行调试. 对于sem_wait\wait\转载 2012-12-09 12:37:20 · 5964 阅读 · 1 评论 -
POJ1003
#include#includeusing namespace std;int main(){ //maxLen=0.0f; float maxLen; vector lens; vector lenss; while (true) { cin>>maxLen; if(maxLen<0.001f) { break; } lens.push_bac原创 2013-04-02 13:19:00 · 405 阅读 · 0 评论 -
POJ1004
#includeusing namespace std;int main(){ double money; double allmoney=0; int i=0; while (i++<12) { cin>>money; allmoney+=money; } cout<<"$"<<allmoney/12; return 0;}原创 2013-04-06 21:39:58 · 470 阅读 · 0 评论 -
POJ1005
#include#includeusing namespace std;const double PI=3.1415926;int main(){int count;cin>>count;double x,y;int i=0;while (i++{cin>>x>>y;cout}cout}原创 2013-04-06 22:09:21 · 601 阅读 · 2 评论 -
ACM题目:求高精度幂C++解法
求高精度幂Time Limit: 500MS Memory Limit: 10000KTotal Submissions: 87719 Accepted: 20833Description对数值很大、精度很高的数进行高精度计算是一类十分常见的问题。比如,对国债进行计算就是属于这类问题。原创 2013-03-16 13:11:01 · 2349 阅读 · 0 评论