现在位置: 首页 > guolimei发表的所有文章
  • 09月
  • 28日
综合 ⁄ 共 5914字 评论关闭
文章目录 整体设计 项目地址:http://code.alibabatech.com/wiki/display/dubbo/Home-zh 自开源后,已有不少非阿里系公司在使用Dubbo,参见:已知用户 那么,Dubbo是什么? Dubbo[]是一个分布式服务框架,致力于提供高性能和透明化的RPC远程服务调用方案,以及SOA服务治理方案。 其核心部分包含: 远程通讯: 提供对多种基于长连接的NIO框架抽象封装,包括多种线程模型,序列化,以及“请求-响应”模式的信息交换方式。 集群容错: 提供基于接口方法的透明远程过程调用,包括......
阅读全文
  • 06月
  • 21日
综合 ⁄ 共 4660字 评论关闭
在centos 上使用yum很是顺手,到了redhat上就不是那么回事了,需要多费些周折; 不过经过配置也可以在redhat上正常使用,原本redhat就带有yum,只不过是需要花些钱去注册。 所以只要把 yum的更新地址改成开源的就行了。而限定yum更新地址的文件在/etc/yum.repos.d/里。(记得先备份这些东东) 建立新的配置文件: [root@jason ~]# cd /etc/yum.repos.d  [root@jason ~]# touch rhel-debuginfo.repo  [root@jason ~]# touch mirrors-rpmforge  [root@jason ~]# touch rpmforge.repo  往新的配置文件写东西:  [root@jason ~]#vi r......
阅读全文
  • 05月
  • 25日
综合 ⁄ 共 6424字 评论关闭
什么是 Play 框架? Play是一个开源的现代web框架,用于编写Java和Scala的可扩展Web应用程序。它通过自动重载变化来提高生产力,由于设计的就是一个无状态、无阻塞的架构,所以用Play框架来编写横向扩展Web应用程序是很容易的。 为什么要用它? 我的原因是: 开发人员生产力:我已经写了8年的Java,但在过去的几个月里我把更多的时间花在了Python和JavaScript (Node.js) 上。用动态语言工作时最让我吃惊的,就是用它编写程序的速度是如此之快。Java EE和Spring框架并不是快速原型和开发的理想选择,但在用Play框架时,你更......
阅读全文
  • 02月
  • 14日
综合 ⁄ 共 2921字 评论关闭
Problem Description GTY has n gay friends. To manage them conveniently, every morning he ordered all his gay friends to stand in a line. Every gay friend has a characteristic value ai , to express how manly or how girlish he is. You, as GTY’s assistant, have to answer GTY’s queries. In each of GTY’s queries, GTY will give you a range [l,r] . Because of GTY’s strange hobbies, he wants there is a permutation [1..r−l+1] in [l,r]. You need to let him know if there is such a permutation or n......
阅读全文
  • 10月
  • 10日
综合 ⁄ 共 2926字 评论关闭
双连通总结 这类问题分为,边-双连通,点-双连通 边双连通 边双连通,求出来后,连接没一个双连通的分量的就是割边,因此可以缩点成一棵树,把问题转化为在树上搞,割边的定义为:去掉这条边后图将不连通 基本这类题都一个解法,求双连通分量,然后缩点成树,进行操作 或者就是直接要求割边,做跟割边相关的操作 模板: #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> using namespace std; const int N = 10005; const int M = 20005; ......
阅读全文
  • 10月
  • 03日
综合 ⁄ 共 1523字 评论关闭
一、跨平台锁文件:manual_lock.h //////////////////////////////////////////////////////////////// // //Descript: mannual lock. // Author: guowenyan // Date: 2013.12.16 // //////////////////////////////////////////////////////////////// #ifndef _MANUAL_LOCK_H_ #define _MANUAL_LOCK_H_ #ifdef WIN32 #include <Windows.h> #else #include <pthread.h> #endif class base_lock { public: virtual ~base_lock() { } public: virtual void lock() = 0; virtual void unlock() = 0; }; #if......
阅读全文
  • 05月
  • 07日
综合 ⁄ 共 636字 评论关闭
  对于经常使用Linux系统的人员来说,少不了将本地的文件上传到服务器或者从服务器上下载文件到本地,rz / sz命令很方便的帮我们实现了这个功能,但是很多Linux系统初始并没有这两个命令。今天,我们就简单的讲解一下如何安装和使用rz、sz命令。 1.软件安装 (1)编译安装 root 账号登陆后,依次执行以下命令: 1 cd /tmp 2 wget http://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz 3 tar zxvf lrzsz-0.12.20.tar.gz && cd lrzsz-0.12.20 4 ./configure && mak......
阅读全文
  • 05月
  • 02日
综合 ⁄ 共 2004字 评论关闭
Stars Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 30   Accepted Submission(s) : 6 Problem Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to the right of the given star. Astronomers want to know the distribution of the levels of the stars. For example, look at th......
阅读全文
  • 04月
  • 20日
综合 ⁄ 共 39279字 评论关闭
下面简单记录一下如何Cocos2d-x中创建输入编辑框。在引擎中为我们提供了这样两个类:CCEditBox  和  CCTextFieldTTF。 一、CCEditBox ①这个类文件的位置 ②这个类是继承自 CCControlButton 和 CCIMEDelegate。其中的CCIMEDelegate代理类中定义了四个代理方法,在使用的时候根据需要选择实现相应的委托方法,从方法名就可以大致知道是什么意思了。 查看文本copy to clipboard打印? class CCEditBoxDelegate     {    public:        virtual ~CCEditBoxDelegate() {};                /**        * This method is called w......
阅读全文
  • 04月
  • 08日
综合 ⁄ 共 1177字 评论关闭
code segment     assume cs:codehexidec proc far        push ds        sub ax,ax        push axstart:  call hexibin        cmp al,1bh        jz exit        call crlf        call binidec        call crlf        jmp startexit:   rethexidec endphexibin proc near        mov bx,0inhex:  mov ah,1        int 21h        cmp al,1bh        jz hexend        sub al,30h        jl hexend        cmp al,10h        jl add_to        sub al,7        cmp al,10        jl hexend        cmp al,16        jl add_t......
阅读全文
  • 01月
  • 23日
综合 ⁄ 共 21881字 评论关闭
buildroot制作编译环境全过程解决 2009-08-06 22:30 在下载了最新的buildroot之后,解压后,开始了全新的编译过程:crifan@ubuntu904:~/develop/buildroot/buildroot-2009.05$ make xconfigmake: *** 没有规则可以创建目标“xconfig”。 停止。 只是想试试图形界面的配置而已,既然不能用,就懒得去折腾了,本来也就是习惯用menuconfig了。 crifan@ubuntu904:~/develop/buildroot/buildroot-2009.05$ make menuconfigmake CC="/usr/bin/gcc" -C package/config conf mconfmake[1]: 正在进入目录 `/home/crifan/develop/buildroot......
阅读全文
  • 01月
  • 20日
综合 ⁄ 共 2336字 评论关闭
前言: 我们知道Quartz是一个功能全面的,开源的作业调度服务,它可以集成、使用于任何的Java EE或Java SE程序 。 具体说明参照:http://quartz-scheduler.org/ 这里我们说一下它在Spring框架中的使用。 依赖的jar包:org.springframework.context.support-3.1.1.RELEASE.jar 一、写一个被用于作业调度的类 package com.dt5000.quartz; public class QuartzJob { public void doJob(){ System.out.println(new Date()+"执行Quartz的任务"); } } 二、编写spring的配置文件 <?xml version="1.0" encoding="UTF-......
阅读全文