码迷,mamicode.com
首页 >  
搜索关键字:cmp    ( 878个结果
Hibernate和Ibatis的区别
一、Hibernate简介Hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序员可以随心所欲的使用对象编程思维来操纵数据库。Hibernate可以应用在任何使用JDBC的场合,既可以在Java的客户端程序使用,也可以在Servlet/JSP的Web应用中使用,最具革命意义的是,Hibernate可以在应用EJB的J2EE架构中取代CMP,完成...
分类:Web程序   时间:2015-03-20 12:57:15    阅读次数:180
归并排序+快速排序
我们都知道STL中最常用的排序库函数:sort(v.begin(),biend())。 给出的是升序排序。 我一般不喜欢用迭代器,我一般用这个格式,对数组进行排序,指针替代迭代器。sort(a,a+n)//升序排序 sort(a,a+n,cpm); int cmp(type a,type b){//定义的比较格式 if(code) return 1; else return 0;...
分类:编程语言   时间:2015-03-19 13:19:02    阅读次数:211
map,vector,pair记录
vector的练习不是很完整,希望能在处理现实问题的时候能够进行补全,看了一些网络上的东西自己试着写了些#include#include#include#include#includeusing namespace std;bool cmp(int a,int b){ return a>b;}...
分类:其他好文   时间:2015-03-15 21:11:14    阅读次数:119
HDU 1004
#include #include #include struct seg { int count; char color[20];};struct seg rd[1100]; int mcolor;int cmp(const void *a, const void *b) { ...
分类:其他好文   时间:2015-03-13 20:34:55    阅读次数:149
nyoj 修路方案 (判断最小生成树是否唯一)
裸 1 #include 2 #include 3 #include 4 using namespace std; 5 6 struct node 7 { 8 int x, y, dis; 9 int flag;10 } a[200010];11 12 int cmp(nod...
分类:其他好文   时间:2015-03-13 09:16:35    阅读次数:313
poj slim span
#include using namespace std; #define N 105 #define INF 0x7ffffff struct Edge { int u; int v; int w; }edge[N*N/2]; int n, m, span, p[N], rank[N]; int cmp(Edge a, Edge b) { return a...
分类:其他好文   时间:2015-03-12 11:33:09    阅读次数:135
【python】常用的一些内置函数
1.cmp cmp(A,B)函数,比较A,B的大小,如果A大于B,返回1,A小于B返回-1,A等于B返回0print cmp(12,33)>>>-1print cmp("zlk","abc")>>>1 2. max和minprint max(35,33,44)>>>44print min("hfas...
分类:编程语言   时间:2015-03-12 08:31:13    阅读次数:166
优先队列 重写优先级
#include#includeusing namespace std;struct cmp //重写优先关系 从大到小{ bool operator () (const int a, const int b) const { return a%10 > b%1...
分类:其他好文   时间:2015-03-10 22:43:46    阅读次数:153
UVa 11039 - Building designing
题目大意:n个绝对值各不相同的非0整数,选出尽量多的数,排成一个序列,使得正负号交替且绝对值递增。分析:按照绝对值大小排一次序,然后扫描一次,顺便做个标记即可。#include#include#includeusing namespace std;int cmp(int a,int b){ r...
分类:其他好文   时间:2015-03-10 21:01:54    阅读次数:124
查找二,二叉树查找与2-3树红黑树
BST: 每个节点的键,都大于其左自述中的任意节点的键,而小于有字数的任意结点的键。 部分实现 get(Node x , Key key){ if(x == null) return null; cmp = key.compareTo(x.key); if(cmp0) retrun ...
分类:其他好文   时间:2015-03-09 20:42:44    阅读次数:172
878条   上一页 1 ... 64 65 66 67 68 ... 88 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!