/** Gets the parent path from full name (Ex: /a/b/c.Ext => /a/b). */extern OSGDB_EXPORT std::string getFilePath(const std::string& filename);/** Gets ...
分类:
数据库 时间:
2014-08-19 10:35:33
阅读次数:
285
QSettings写ini配置文件(Qt版本5.2):#include "inidemo.h"#include #include IniDemo::IniDemo(QWidget *parent) : QMainWindow(parent){ ui.setupUi(this); Q...
分类:
其他好文 时间:
2014-08-19 02:06:33
阅读次数:
218
一、控制器 <?php if (!defined(‘BASEPATH‘)) ??? exit(‘No direct script access allowed‘); class Topics extends CI_Controller { ??? function __construct() ??? { ??????? parent::__cons...
分类:
数据库 时间:
2014-08-19 01:04:43
阅读次数:
309
leetcode中和括号匹配相关的问题共有三个,分别是:
Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets m...
分类:
其他好文 时间:
2014-08-18 20:35:52
阅读次数:
221
数据字段在报表中有着重要的作用。StimusoftReports报表中数据字段的使用简明易懂,在报表工具中也有着显著优势。数据源的值可用于表达式中。若要从数据源中引用一个字段,你必须提供一个该字段的字符串表示形式。引用的语法很简单——在大括号中给出数据源名称,并且字段名用..
分类:
其他好文 时间:
2014-08-18 18:48:43
阅读次数:
240
优先队列实现完整哈夫曼树,一大段英文都是介绍哈夫曼树的。
外面用了一个pre来找parent,其实可以把这个项放入结构体中。
特别注意当有一个结点的情况不能用优先队列,另外判断下
#include
#include
#include
#include
#include
#include
using namespace std;
#define maxn 256
s...
分类:
其他好文 时间:
2014-08-18 14:36:12
阅读次数:
198
typedef int elemtype;
typedef struct
{
elemtype weight;
int parent,l_child,r_child;
} binarytree;
//2、构建最优二叉树
void CreateHuffman(int leafnum, binarytree *huffmantree)
{
//leafnum个叶子,决定nodenu...
分类:
其他好文 时间:
2014-08-17 14:22:32
阅读次数:
280
1、题目链接地址 http://poj.org/problem?id=11612、源代码#include using namespace std;int parent[30001];int suspect[30001]; int find(int x){ if(parent[x] == x) ...
分类:
其他好文 时间:
2014-08-16 23:37:01
阅读次数:
181
过了样例就能AC
注意一点 0条边特意判断下。是否无法构成生成树也要判断
#include
#include
#include
using namespace std;
#define maxn 110
int parent[maxn];
int N,M;
struct edge
{
int u,v,w;
}edges[maxn*maxn];
int cmp(void const *a,vo...
分类:
其他好文 时间:
2014-08-16 21:08:41
阅读次数:
190
android的listview的一个关键技术就是重绘利用。
public View getView(int position, View convertView, ViewGroup parent) {
return null;
}
从Adatper的getview函数我们可以知道,函数提供了一个convertView的对象,这个对象是我们可以在一个列表中重复利用避免每次getvie...
分类:
移动开发 时间:
2014-08-16 18:33:30
阅读次数:
220