在上一篇文章《搭建高可用MongoDB集群(一)——配置MongoDB》?提到了几个问题还没有解决。 主节点挂了能否自动切换连接?目前需要手工切换。 主节点的读写压力过大如何解决? 从节点每个上面的数据都是对数据库...
分类:
数据库 时间:
2014-11-10 15:53:48
阅读次数:
350
Ecshop中英双语版自动切换判断的个人方案,个人思路是根据浏览器语言自动判断,如果是中文浏览器,就使用中文模板,英文的就使用英文模板。中、英模板的区别是调用了不同的产品分类、文章分类,而模板中相同的固定文字可以设定language,这样就不用去建立两个网站了...
分类:
其他好文 时间:
2014-11-10 12:09:21
阅读次数:
197
做这么一个控件,图片自动切换,形成动画效果。 随便的码码,码完发现东西太少了,不过还算完善。 1 public class MyPictureBox : PictureBox 2 { 3 4 Timer timer = new Timer (); 5 6 ...
分类:
其他好文 时间:
2014-11-09 19:26:45
阅读次数:
233
Hadoop2NameNodeHA配置Hadoop2官方提供了两种NameNodeHA的实现方式,分别基于QJM和NFS,这里以基于QJM的HDFSHA为例。实验环境系统版本:CentOSrelease6.4(Final)Hadoop版本:ApacheHadoop2.5.1Hive版本:Hive0.13.1IP列表IPHostnameNameNodeDataNodeRMNodeManagerJournalNode192..
分类:
其他好文 时间:
2014-11-08 02:16:48
阅读次数:
322
ant -f .xml tagetjavac *.java -cp a.jar;b.jar;c.jar(跟上jar包)(Linux useradd 无效)cd vi .bash_profile 修改为PATH=$PATH:/usr/sbin/useraddyast(Linux 看GUI界面 ha.....
分类:
其他好文 时间:
2014-11-07 18:53:41
阅读次数:
191
1、用的地方不一样 where可以用在select update delete insert......into语句中 having只能用在select语句中2、执行顺序不一样 where的搜索条件是在执行语句进行分组之前应用 having的搜索条件是在分组条件之后执行的如果where和ha...
分类:
其他好文 时间:
2014-11-07 16:53:17
阅读次数:
167
#include#include#includeusing namespace std; #define HASHSIZE 7#define NULLKEY -32768 struct HashTable{ int *elem; int count;};void init(HashTable* ha...
分类:
其他好文 时间:
2014-11-05 23:04:37
阅读次数:
153
1.安装heartbeat下载需要的源:wgetftp://mirror.switch.ch/pool/1/mirror/scientificlinux/6rolling/x86_64/os/Packages/epel-release-6-5.noarch.rpm2.安装heartbeat:yum-yinstallheartbeat*3.配置heartbeat3.1.拷贝模板配置文件:cp/usr/share/doc/heartbeat-3.0.4/ha.cf/e..
分类:
其他好文 时间:
2014-10-30 19:24:48
阅读次数:
177
【题目】
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would ha...
分类:
编程语言 时间:
2014-10-30 17:02:57
阅读次数:
249
JavaScript实现网页背景自动变色,自己变换颜色,设定时间和颜色值即可,在你设定的颜色值、一定时间内自动切换网页背景颜色。背景自动变色背景自动变色
分类:
编程语言 时间:
2014-10-30 13:15:20
阅读次数:
202