- 博客(160)
- 资源 (2)
- 收藏
- 关注
原创 libevent:windows环境配置+QT使用
E:\libevent\libevent-2.1.11-stable下。E:\libevent\libevent-2.1.11-stable\include下。4、libevent解压的文件夹目录为:“E:\libevent\libevent-2.1.11-stable”E:\libevent\libevent-2.1.11-stable\WIN32-Code\nmake下。新建libevent目录下创建libevent.pri文件,并在libevent_test.pro文件中添加。
2023-07-18 14:49:14 1984 1
原创 QT 5.9.9 配置使用 ORACLE 数据库
因为版权问题,Qt本身不自带Oracle数据库的驱动,因此如果想要借用Qt操作Oracle数据库,需要手动进行编译。Oracle11g客户端安装配置_行孤、的博客-CSDN博客_oracle11g客户端安装步骤【Qt】下载与安装_华开发的博客-CSDN博客_qt下载安装安装组件时勾选 SOURCE 项本机QT 安装目录:D:\QT\QT_5.9ORACLE客户端 目录 :F:\oracle_clientQTCreator 打开QT源码 oci.pro 目录:D:\QT\QT_5.9\5.9.9\Src\qt
2022-06-10 09:01:52 958 4
原创 c++ 条件变量
pthread_cond_wait学习笔记 - 恋恋风辰 - 博客园Linux条件变量pthread_condition细节(为何先加锁,pthread_cond_wait为何先解锁,返回时又加锁) - it610.com
2021-04-20 08:59:41 201
转载 string、const char*、 char* 、char[]类型转化总结
string、const char*、 char* 、char[]四者类型经常会需要转化。一:转化总结形式如下:使用时,要对源格式和目标格式进行初始化。源格式赋值为具体的内容,目标格式赋值为空。 源格式 目标格式 string const char* char* char[] string NULL const char*=s...
2020-11-10 09:54:45 411
原创 串口通信(同步,异步)VC++
同步:SerialComm.h文件#pragma once//数据缓冲区长度#define MAX_BUF_LEN 10240//校验类型枚举typedef enum CheckType{ ctNoSet = 0, ctNoCheck, ctCRC};//生成CRC//参数说明:// BYTE* pBuf:输入参数,需要生成校验的数据指针// int dwLen:输入参数,需要生成校验的数据长度// 返回值:WOR
2020-10-23 15:12:59 1802
转载 2020-09-11
C++ 中using 的使用#include <iostream>using namespace std;class ClassOne {public: int w;protected: int a;};class ClassTwo{public: using ModuleType = ClassOne;};template <typename ClassType>class ClassThree : private C
2020-09-11 10:59:04 86
转载 boost 1.56.0 编译及使用
boost 1.56.0 编译及使用来源:http://www.cnblogs.com/zhcncn/p/3950477.htmlboost的编译和使用,经过搜集资料和总结,记录成文。感谢文后所列参考资料的作者。1 下载地址:http://sourceforge.net/projects/boost/files/boost/1.56.0/可以选择boost_1_56_0.7z下载。2 编译2.1 生成boost的自用的编译工具bjam.exe解压后,使用VS201...
2020-08-13 14:17:37 651
原创 ActiveX 控件的测试:找不到TSTCON32.exe
在VS2008中开发MFC ActiveX控件,开发完后,通常使用VS自带的容器ActiveX Control Test Container来运行ActiveX控件。此容器在VS安装后的文件中是找不到的,需要自己手动获取。如下所述:(1)按照你的VS所安装的路径,找到AllVCLanguageSamples.zip这个压缩文件,其在Samples下的名为2052文件夹中,如在我的电脑上,其所在路径为:C:\Program Files\Microsoft Visual Studio 9.0\Sample.
2020-07-14 09:53:11 502
原创 MFC 剪贴板 输入
if(!EmptyClipboard())return;CStringstr;GetDlgItem(IDC_EDIT2)->GetWindowText(str);HANDLEhClip=GlobalAlloc(GMEM_MOVEABLE,(str.GetLength()+1)*2);WCHAR*pBuf=(WCHAR*)GlobalLock(hClip);wcscpy(pBuf,str.GetBuffer());str.ReleaseBuffer()...
2020-07-11 11:53:16 124
原创 Assist 常用快捷键
VAssist 使用技巧查找文件 shift+alt+o (直接定位)查找符号 shift+alt+s选定内容改名 shift+alt+r在.h与.cpp文件中转换 alt+o函数声明定位 ...
2020-07-10 10:51:00 506
转载 VC++文件格式
.APS:存放二进制资源的中间文件,VC把当前资源文件转换成二进制格式,并存放在APS文件中,以加快资源装载速度。资源辅助文件。.BMP:位图资源文件。.BSC:浏览信息文件,由浏览信息维护工具(BSCMAKE)从原始浏览信息文件(.SBR)中生成,BSC文件可以用来在源代码编辑窗口中进行快速定位。用于浏览项目信息的,如果用source brower的话就必须有这个文件。可以在project options里去掉Generate Browse Info File,这样可以加快编译进度。.C:用.
2020-07-04 08:53:36 264
原创 MFC 数据类型转换(int/CString,CString/char*,LPTSTR/char*,LPTSTR/CString)
1,int / CString互转int 转CString :int s =123;CString str;str.Format(_T("%d"),s);////////////////////CString 转int :CString strl ;int nIndex = _ttoi(str);2,char *(或const char *) 转 Cstringchar *s = "char *";CString str;str.Format...
2020-07-02 14:39:56 340
原创 HDU 6230 Palindrome(主席树)
PalindromeTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 329 Accepted Submission(s): 129Problem DescriptionAlice like stri
2017-11-21 11:22:11 429
原创 POJ 3481 (Splay Tree树的基本操作)
Double QueueTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17438 Accepted: 7518DescriptionThe new founded Balkan Investment Group Bank (BIG-Bank) ope
2017-10-26 19:38:59 325
原创 HDU 4417 Super Mario (主席树,区间小于k的个数)
Super MarioTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7503 Accepted Submission(s): 3223Problem DescriptionMario is world
2017-10-17 21:58:15 610
原创 2588: Spoj 10628. Count on a tree (主席树,树上路径第K大值)
2588: Spoj 10628. Count on a treeTime Limit: 12 Sec Memory Limit: 128 MBSubmit: 7448 Solved: 1815[Submit][Status][Discuss]Description给定一棵N个节点的树,每个点有一个权值,对于M个询问(u,v,k),你需要回答u xor lastans和
2017-10-17 20:53:45 382
原创 1519. Formula 1 (插头DP,求哈密顿回路)
1519. Formula 1Time limit: 1.0 secondMemory limit: 64 MBBackgroundRegardless of the fact, that Vologda could not get rights to hold the Winter Olympic games of 20**, it is well-known,
2017-10-17 11:18:46 448
原创 HDU 5919 Sequence II (主席树+求区间不同数个数)
Sequence IITime Limit: 9000/4500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2355 Accepted Submission(s): 628Problem DescriptionMr. Frog has
2017-10-10 21:11:50 291
原创 zoj 2112 (主席树,树状数组套线段树)
Dynamic RankingsTime Limit: 10 Seconds Memory Limit: 32768 KBThe Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply
2017-09-22 18:10:44 342
原创 BZOJ 1568 Blue Mary开公司(线段树,标记永久化)
DescriptionInput第一行 :一个整数N ,表示方案和询问的总数。 接下来N行,每行开头一个单词“Query”或“Project”。 若单词为Query,则后接一个整数T,表示Blue Mary询问第T天的最大收益。 若单词为Project,则后接两个实数S,P,表示该种设计方案第一天的收益S,以及以后每天比上一天多出的收益P。1 提示:本题
2017-09-06 20:49:18 310
原创 hdu 5110 (DP+分块)
Problem DescriptionAlexandra and her little brother are playing a game called "Clash of Submarines" (COS, for short). In this game, one can build so many(about 100,000) submarines, and detect and
2017-08-09 18:49:24 281
原创 K - 炮 bzoj- 4806 (DP)
众所周知,双炮叠叠将是中国象棋中很厉害的一招必杀技。炮吃子时必须隔一个棋子跳吃,即俗称"炮打隔子"。 炮跟炮显然不能在一起打起来,于是rly一天借来了许多许多的炮在棋盘上摆了起来……他想知道,在N×M的矩形方格中摆若干炮(可以不摆)使其互不吃到的情况下方案数有几种。棋子都是相同的。Input一行,两个正整数N和M。NOutput一行,输出方案数mod
2017-08-04 08:38:49 768
原创 hdu 4960 Another OCD Patient(DP)
Problem DescriptionXiaoji is an OCD (obsessive-compulsive disorder) patient. This morning, his children played with plasticene. They broke the plasticene into N pieces, and put them in a line. Eac
2017-08-03 21:29:51 261
原创 HDU 6035 Colorful Tree (树形DP,dfs)
Problem DescriptionThere is a tree with n nodes, each of which has a type of color represented by an integer, where the color of node i is ci.The path between each two different nodes is uni
2017-07-28 14:20:16 235
原创 HDU 2167 Pebbles(轮廓线,状态压缩DP)
Problem DescriptionYou're given an unlimited number of pebbles to distribute across an N x N game board (N drawn from [3, 15]), where each square on the board contains some positive point value be
2017-07-24 08:59:00 469
原创 HDU 1565 方格取数(1)(插头DP||状态压缩)
Problem Description给你一个n*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。 Input包括多个测试实例,每个测试实例包括一个整数n 和n*n个非负数(n Output对于每个测试实例,输出可能取得的
2017-07-22 10:01:22 322
原创 HDU 1693 Eat the Trees(轮廓线DP)
Problem DescriptionMost of us know that in the game called DotA(Defense of the Ancient), Pudge is a strong hero in the first period of the game. When the game goes to end however, Pudge is not a s
2017-07-21 09:48:16 333
原创 POJ 2411 Mondriaan's Dream(插头DP,轮廓线)
DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw o
2017-07-19 09:11:58 252
原创 ZOJ 3471Most Powerful(状态压缩DP)
Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a lot of powe
2017-07-18 10:33:22 214
原创 HDU 3001 Travelling (状态压缩DP +TSP问题)
Problem DescriptionAfter coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing all the cities!And he does no
2017-07-18 09:51:18 276
原创 威尔逊定理,费马小定理,欧拉定理
一、威尔逊定理若p为质数,则p|(p-1)!+1亦:(p-1)! ≡ p-1 ≡ -1(mod p)例题:HDU 2973 YAPTCHA (威尔逊定理及其逆定理)解题报告见http://blog.csdn.net/synapse7/article/details/18728157二、费马小定理假如p是
2017-07-16 08:52:45 746
原创 SPOJ TTM - To the moon (主席树,区间更新,区间查询)
BackgroundTo The Moon is a independent game released in November 2011, it is a role-playing adventure game powered by RPG Maker.The premise of To The Moon is based around a technology
2017-07-14 11:22:42 347
原创 SPOJ DQUERY - D-query(主席树 ,求区间不同的数个数)
EnglishVietnameseGiven a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have to return the nu
2017-07-13 11:58:56 1067
原创 HDU 3333 Turing Tree (离线线段树,经典)
Problem DescriptionAfter inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree could easily have the solution. As well, wily 3xian made lots of
2017-07-13 11:54:24 292
原创 ZOJ 2112 Dynamic Rankings (主席树+单点修改,询问区间第K值)
The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest number of the given N numbers. They have developed
2017-07-13 08:43:24 658
原创 SHU 422 风力观测 (线段树,区间更新,区间询问历史最大值)
描述小Y正在观测y地区的风力情况,他在一条直线上依此设定了n个观测点,并观测与直线垂直方向的风力值,风力有时是正向的也有时是反向的,规定正向时的风力值为正数,他发现每次风力值的变化都可以表示为观测点上一条线段[L,R]上的同时增强或者减弱。小Y希望能够实时统计这些观测点的数据,并且实时分析这些观测点在历史中到达的风力最大绝对值,但是他无法同时对大量的观测点进行分析, 更重要的是他记不住
2017-07-10 18:17:48 720
原创 SHU OJ 420 购买装备(假装背包,其实贪心)
描述最近盛大的一款游戏传奇世界极其火爆。游戏玩家John,想购买游戏中的装备。已知游戏的商店里有n件装备,第i件装备具有属性值ai,购买需要花费bi个金币。John想去购买这些装备,但是账号中只有m个金币,John是个很贪婪的家伙,他想购买尽可能多的装备。并且在保证购买到最多件装备的情况下,他还想让他所购买的装备当中拥有最小属性值的装备的属性值尽可能大。输入输入
2017-07-10 17:27:43 493
转载 C++三种容器:list、vector和deque的区别
转自:原博主地址在写C++程序的时候会发现STL是一个不错的东西,减少了代码量,使代码的复用率大大提高,减轻了程序猿的负担。还有一个就是容器,你会发现要是自己写一个链表、队列,或者是数组的时候,既要花时间还要操心怎么去维护,里面的指针啊,内存够不够用啊,长度问题,有没有可能溢出啊等等一系列的问题等着我们去解决,还是比较头疼的。所以容器的出现解决了这一个问题,它将这些数据结构都封装成了一个类,只
2017-07-10 16:52:12 380
原创 HDU 5230 ZCC loves hacking(DP)
Problem DescriptionNow, a Codefires round is coming to end. ZCC has got C(0≤C≤106) points by solving all problems. He is amazed that all other contestants in his room have also solved the hardes
2017-07-10 10:57:59 263
串口通讯(同步,异步)
2020-10-26
杭电ACM课件.zip
2020-07-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人