现在位置: 首页 > motorway发表的所有文章
  • 11月
  • 21日
综合 ⁄ 共 4097字 评论关闭
文章目录 抓包分析 查找有问题的Memcached的版本 查找bug发生的原因: 为什么这个bug隐藏了这么久 这个bug的危害 Memcached二进制协议比文本协议要快多少? 缘起 最近有个分布式限速的需求。支付宝的接口双11只允许每秒调用10次。 单机的限速,自然是用google guava的RateLimiter。 http://docs.guava-libraries.googlecode.com/git-history/master/javadoc/com/google/common/util/concurrent/RateLimiter.html 分布式的ReteLimiter,貌似没有现在的实现方案。不过用memc......
阅读全文
  • 08月
  • 03日
综合 ⁄ 共 9790字 评论关闭
http://levipereira.wordpress.com/2011/07/19/monitoring-the-cluster-in-real-time-with-chm-cluster-health-monitor/ Why Cluster Health Monitor ? Oracle Clusterware & Oracle database performance/node reboot due to lack of CPU/Memory resources cause Customers to ask how to monitor their OS. Some customers have rudimentary scripts that utilize vmstat, mpstat but they are often node collected at regular intervals. In some cases, we have seen customers collect this once per hour which does n......
阅读全文
文章目录 2.1 第1章——软件架构 2.2 第2章——基于网络应用的架构 2.3 第3章——基于网络的架构风格 2.4 第4章——设计 Web 架构:问题与领悟 2.5 第5章——表述性状态转移(REST) 1. 概述 Roy Fielding博士(见个人主页)是IETF发布的HTTP和URI协议的主要设计者。HTTP和URI是两个最为重要的Web基础技术架构协议,因此Fielding博士可谓是Web架构的奠基者之一。 除了学术上的卓越成就之外,Fielding博士还参与过很多开源软件的设计和开发工作。他是libwww-perl(世界上最早的HTTP开......
阅读全文
文章目录 程序如下所示: 预备知识 每一个类都可以提供一个构造函数,用于类对象创建时的初始化.构造函数是一种特殊的成员函数,定义时必须和类同名,这样编译器才能够将它和类的其他成员函数区分开来.构造函数各其他函数之间的一个重大差别是构造函数不能返回值,因此对它们不可以指定返回类型.通常情况下,构造函数声明为public. UML图如下所示: 程序如下所示: // Instantiating multiple objects of the GradeBook class and using the GradeBook constructor to specify th......
阅读全文
  • 12月
  • 26日
综合 ⁄ 共 206字 评论关闭
学习一下。 # code #1 def filie(x): a,b,t=1,1,0 if x==1 or x==2: return 1 while t<x-2: a,b,t,=b,a+b,t+1 return b n = input("place input a integer:") for i in range(1,n): print filie(i) # code #2 a,b,i=1,1,0 n=input() while i<n: a,b,i=b,a+b,i+1 print a
阅读全文
  • 09月
  • 04日
综合 ⁄ 共 1136字 评论关闭
 Android开发环境将分为SDK相关内容、Eclipse ADT相关内容、模拟器AVD相关内容、调试器DDMS相关内容、日志LogCat相关内容、连接驱动ADB相关内容、内存泄露检测工具MAT相关内容、GDB调试、Android Market、非eclipse/java开发环境、官方文档几部分讲解,希望对初学者有个系统的指导,也希望大家对知识内容不断补充!1、Android SDK 各个目录及其作用分析    http://www.apkbus.com/android-79679-1-1.html 2、Android SDK安装    http://www.apkbus.com/android-148-1-1.html 3、安装 Android SDK    http://www......
阅读全文
  • 05月
  • 25日
综合 ⁄ 共 3297字 评论关闭
UIViewController生命周期控制 UIViewController介绍 官方的介绍如下 The UIViewController class provides the fundamental view-management model for all iOS apps. You rarely instantiate UIViewController objects directly. Instead, you instantiate subclasses of the UIViewController class based on the specific task each subclass performs. 简单的说就是一个视图控制器类 ios6以后的一般的生命周期 ios6以后取消了viewWillUnload方法,apple官方文档说没必要了(我勒个去了),大体就是view和显示分开了,当内存紧张的......
阅读全文
  • 05月
  • 19日
综合 ⁄ 共 4691字 评论关闭
通过前面两篇关于Spring Batch文章的介绍,大家应该已经对Spring Batch有个初步的概念了。这篇文章,将通过一个”Hello World!”实例,和大家一起探讨关于Spring Batch的一些基本配置和实现。使大家从开发的角度对Spring Batch有一个真切的体会。       说明:1,本实例使用的是spring-batch 2.1.8              2,本实例没有像前面讲的那样配置ItemReader、ItemProcessor和ItemWriter,而是之间在Step中调用Tasklet,由Tasklet完成”Hello World!”的输出。       工程结构如下图:                            JobLaunch.jav......
阅读全文
  • 05月
  • 12日
综合 ⁄ 共 3678字 评论关闭
  转载:http://www.365freshdays.com/?p=6   方式一:mutt命令 mutt获取地址:http://www.mutt.org/ 使用方法可以参见:mutt -v, 其常用的参数有 -s、-c、-a等参数,如果要发送中文且$LANG不是zh_CN,则需要执行命令export LANG=zh_CN,例如: echo "内容" | mutt -s "邮件标题" -a "$HOME/test.log" -c "others@gmail.com" "to@gmail.com" 方式二:mail命令 相关资源:http://linux.about.com/od/commands/l/blcmdl1_Mail.htm mail命令发送,其参数具体见man mail命令结果,如果要发送中文且$LANG不是zh_CN,则需要执行命令exp......
阅读全文
  • 03月
  • 30日
综合 ⁄ 共 922字 评论关闭
假如有两台服务器:192.100.1.100和192.100.1.140;192.100.1.140要同步192.100.1.100的目录/data/app_service/。 在192.100.1.100上 (1)首先以root身份登陆,或用sudo (2)配置/etc/rsyncd.conf,文件内容如下: uid = root gid = root use chroot = no max connections = 50 pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock log file = /var/log/rsyncd.log [app_service] path = /data/app_service/ comment = BACKUP CLIENT IS SOLARIS 8 E250 ignore errors read only = yes list = no auth users = dsp......
阅读全文
  • 03月
  • 17日
综合 ⁄ 共 1971字 评论关闭
传送门: http://ting.hujiang.com/wanwujianshi/15154661676/ And ocean salinity of course represented only the merest sliver(细条) of my ignorance. I didn't know what a proton was, or a protein, didn't know a quark from a quasar, didn't understand how geologists could look at a layer of rock on a canyon wall and tell you(连读) how old it was, didn't know anything really.I became gripped(抓紧->引起兴趣) by a quiet, unwonted(异常的) urge to know a little about these matters and to understa......
阅读全文
  • 02月
  • 01日
综合 ⁄ 共 726字 评论关闭
           bullet中btCollisionObject类是其他碰撞对象的父类:           今天看了一下Bullet中的btCollisionObject类的一些函数,暂时记录下来: 第组个函数: 00315 void setInterpolationLinearVelocity(const btVector3& linvel) 00316 { 00317 m_interpolationLinearVelocity = linvel; 00318 } 00325 const btVector3& getInterpolationLinearVelocity() const 00326 { 00327 return m_interpolationLinearVelocity; 00328......
阅读全文