摘要:        
需要引用System.Web.Extensions dll类库 /// /// 将json数据反序列化为Dictionary /// /// json数据 /// private Dictionary JsonToDictionary(string jsonData) { //实例化JavaScriptSerializer类的新实例 JavaScriptSerializer jss = new JavaScriptSerializer(); ...    
阅读全文
            posted @ 2013-08-27 19:33
风言枫语
阅读(661)
推荐(0)
        
             
        
        
摘要:        
hibernate.cache.use_structured_entries Hibernate文档上介绍,该属性是用于把对象以一种更易读的方式放到二级缓存中,这样,在对二级缓存进行监控的时候就更容易理解放到二级缓存中对象的内容。只需要简单的设置 hibernate.cache.use_structured_entries true即可。那这个属性到底有什么作用呢?先简单看一下效果:准备数据代码和映射文件在前面一篇帖子中有:http://blog.csdn.net/stefwu/article/details/10349407下面是测试代码: @Test public void tes...    
阅读全文
            posted @ 2013-08-27 19:30
风言枫语
阅读(406)
推荐(0)
        
             
        
        
摘要:        
赤裸裸的线段树,借个模板,改写一下即可。代码:#include#include#include#includeusing namespace std;struct line{ int left,right,n; int mid(){return (left+right)/2;}}a[50010=r) return query(l,r,step*2); else if(midmid) Add(mid,r,step*2+1,x,y); else Add(l,mid,step*2,x,y); a[step].n=a[step*2...    
阅读全文
            posted @ 2013-08-27 19:28
风言枫语
阅读(199)
推荐(0)
        
             
        
        
摘要:        
求n个点能组成的最大三角形,一发旋转卡壳模板题。。。 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define FF(i, a, b) for(int i=a; i=b; i--) #define REP(i, n) for(int i=0; i 1 && Cross(...    
阅读全文
            posted @ 2013-08-27 19:25
风言枫语
阅读(304)
推荐(0)
        
             
        
        
摘要:        
There two methods to construct a heap from a unordered set of array. If a array has size n, it can be seen as a complete binary tree, in which the element indexed by i has its left children 2*i+1(if 2*i+10) { int p=(i-1)>>1; if(a[i]0) siftdown(a,i,...    
阅读全文
            posted @ 2013-08-27 19:23
风言枫语
阅读(210)
推荐(0)
        
             
        
        
摘要:        
现在随着手机功能的越来越强大,很多用户开始习惯于使用手机电子书阅读器。然而我们经常会遇到在网上下载的txt文件,在电脑上看是好好的,可是复制到手机上出现乱码的情况,相信很多人都遇到这类问题。 为了解决这个问题,我今天来教大家自己制作电子书app,通过我这个方法做出来的电子书,都是app形式的,类似微信这类应用程序,直接安装到手机里就能直接阅读了,不会再出现什么乱码情况。 所以呢,为了让更多的人受益,我决定还是专门写一篇文章来教大家如何自己制作电子书,其中制作过程中不用什么技术要求,轻松制作。 制作步骤只要2步: 第一步:登录应用之星网站(http://www.appstar.com....    
阅读全文
            posted @ 2013-08-27 19:21
风言枫语
阅读(966)
推荐(0)
        
             
        
        
摘要:        
一、java反射常用方法 获取Class的几种方式: Class class1 = String.class;// 该方法最为安全可靠,程序性能更高。 Class class2 = string.getClass(); Class class3 = Class.forName("java.lang.String");// 可能抛出ClassNotFoundException异常 Class class = Integer.TYPE;//不能用第一种方式 获取内部类: getDeclaredClasses() 获取本类中声明的字段: get...    
阅读全文
            posted @ 2013-08-27 19:19
风言枫语
阅读(181)
推荐(0)
        
             
        
        
摘要:        
本节主要讲C语言中的各种符号,包括注释符、单引号双信号以及逻辑运算符等。一、注释符注释符号和注释在程序的预编译期就已经被解决了,在预编译期间,编译器会将注释符号和注释符号之间的部分简单的替换成为空格。1.在程序中使用注释符号有以下几点需要注意(1)如果注释符号在数据类型和变量之间,那么将不会影响程序的正常运行。int/*...*/i;(2)如果注释符号位于数据类型之间,那么程序将不会正常运行,因为一个数据类型关键字中间出现一个空格,那么数据类型关键字也就不再是关键字了。/*不能正常运行*/ in/*...*/t i;(3)如果字符串之间出现注释符号,程序仍然可以正常运行。 char* s...    
阅读全文
            posted @ 2013-08-27 19:16
风言枫语
阅读(316)
推荐(0)
        
             
        
        
摘要:        
题目链接: http://pat.zju.edu.cn/contests/pat-a-practise/1012 题目描述:To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we encourage s    
阅读全文
            posted @ 2013-08-27 19:14
风言枫语
阅读(232)
推荐(0)
        
             
        
        
摘要:        
一.需求分析 最近公司软件Team 有个需求是这样的:能不能在局域网搭建一个Ubuntu 镜像服务器, 这样作的好处是可以节省Ubuntu某些常用工具的安装时间。 二.部署过程 2.1 测试环境 目前在公司内有一台能连接到外网的Ubuntu机器, IP : 192.168.8.173 , Ubuntu版本为Ubuntu 9.04 i686。 2.2 搭建步骤 为了创建Ubuntu mirror 服务器,最少需要60G硬盘空间,Ubuntu每个版本都有32 bit 和64 bit两个版本,有两组deb包。当然可以创建Ubuntu一个版本的32 b...    
阅读全文
            posted @ 2013-08-27 19:12
风言枫语
阅读(590)
推荐(0)