[转](多实例)mysql-mmm集群
一、需求说明
集群 | 角色 | 主机名 | IP | Mysql Port | Server ID | VIP Writer | VIP READER |
navy2 | Agent | db1 | 172.28.26.101 | 3307 | 11 | 172.28.26.107 | |
navy3 |
Agent
|
db2 | 172.28.26.102 | 3308 | 1 | |
172.28.26.110
|
navy2 |
Agent
|
db1 |
172.28.26.101
|
3307 | 22 | |
172.28.26.108
|
navy3 |
Agent
|
db2 |
172.28.26.102
|
3308 | 2 |
172.28.26.109
|
|
navy2/navy3 | Monitor |
Monitor
|
172.28.26.103
|
| | | |
1 vi /etc/mysql-mmm/mmm_common_navy2.conf
2 active_master_role writer
3 <host default>
4 cluster_interface eth1
5 agent_port 9912
6 mysql_port 3307
7 pid_path /var/run/mysql-mmm/mmm_agentd_navy2.pid
8 bin_path /usr/libexec/mysql-mmm/
9 replication_user slave
10 replication_password 123456
11 agent_user mmm_agent
12 agent_password 123456
13 </host>
14 <host db1>
15 ip 172.28.26.101
16 mysql_port 3307
17 mode master
18 peer db2
19 </host>
20 <host db2>
21 ip 172.28.26.102
22 mysql_port 3307
23 mode master
24 peer db1
25 </host>
26 <role writer>
27 hosts db1, db2
28 ips 172.28.26.107
29 mode exclusive
30 </role>
31 <role reader>
32 hosts db1, db2
33 ips 172.28.26.108
34 mode balanced
35 </role>
vi /etc/mysql-mmm/mmm_common_navy3.conf(navy的配置文件)
1 active_master_role writer
2 <host default>
3 cluster_interface eth1
4 agent_port 9913
5 mysql_port 3308
6 pid_path /var/run/mysql-mmm/mmm_agentd_navy3.pid
7 bin_path /usr/libexec/mysql-mmm/
8 replication_user slave
9 replication_password 123456
10 agent_user mmm_agent
11 agent_password 123456
12 </host>
13 <host db1>
14 ip 172.28.26.101
15 mysql_port 3308
16 mode master
17 peer db2
18 </host>
19 <host db2>
20 ip 172.28.26.102
21 mysql_port 3308
22 mode master
23 peer db1
24 </host>
25 <role writer>
26 hosts db1, db2
27 ips 172.28.26.109
28 mode exclusive
29 </role>
30 <role reader>
31 hosts db1, db2
32 ips 172.28.26.110
33 mode balanced
34 </role>
vi /etc/mysql-mmm/mmm_agent_navy2.conf(navy2的agent配置文件)
1 include mmm_common_navy2.conf
2 this db1
vi /etc/mysql-mmm/mmm_agent_navy3.conf(navy3的agent配置文件)
1 include mmm_common_navy3.conf
2 this db1
vi /etc/init.d/mysql-mmm-agent-navy2(navy2的agent启动脚本)
1 #!/bin/sh
2 # chkconfig: - 64 36
3 # description: MMM Agent.
4 # processname: mmm_agentd
5 # config: /etc/mysql-mmm/mmm_agent.conf
6 # pidfile: /var/run/mysql-mmm/mmm_agentd.pid
7 # Source function library and defaults file.
8 . /etc/rc.d/init.d/functions
9 . /etc/default/mysql-mmm-agent
10 # Cluster name (it can be empty for default cases)
11 CLUSTER='navy2'
12 LOCKFILE='/var/lock/subsys/mysql-mmm-agent_navy2'
13 prog='MMM Agent Daemon'
14 #-----------------------------------------------------------------------
15 # Paths
16 if [ "$CLUSTER" != "" ]; then
17 MMMD_AGENT_BIN="/usr/sbin/mmm_agentd @$CLUSTER"
18 MMMD_AGENT_PIDFILE="/var/run/mysql-mmm/mmm_agentd_$CLUSTER.pid"
19 else
20 MMMD_AGENT_BIN="/usr/sbin/mmm_agentd"
21 MMMD_AGENT_PIDFILE="/var/run/mysql-mmm/mmm_agentd.pid"
22 fi
23 start() {
24 if [ "${ENABLED}" != "1" ]; then
25 echo "$prog is disabled!"
26 exit 1
27 fi
28 echo -n "Starting $prog: "
29 if [ -s $MMMD_AGENT_PIDFILE ] && kill -0 `cat $MMMD_AGENT_PIDFILE` 2> /dev/null; then
30 echo " already running."
31 exit 0
32 fi
33 daemon $MMMD_AGENT_BIN
34 RETVAL=$?
35 echo
36 [ $RETVAL = 0 ] && touch $LOCKFILE
37 return $RETVAL
38 }
39 stop() {
40 # Stop daemon.
41 echo -n "Stopping $prog: "
42 killproc -p $MMMD_AGENT_PIDFILE $MMMD_AGENT_BIN
43 RETVAL=$?
44 echo
45 [ $RETVAL = 0 ] && rm -f $LOCKFILE
46 return $RETVAL
47 }
48 case "$1" in
49 start)
50 start
51 ;;
52 stop)
53 stop
54 ;;
55 status)
56 status -p $MMMD_AGENT_PIDFILE $MMMD_AGENT_BIN
57 RETVAL=$?
58 ;;
59 restart|reload)
60 stop
61 start
62 ;;
63 condrestart)
64 if [ -f $LOCKFILE ]; then
65 stop
66 start
67 fi
68 ;;
69 *)
70 echo "Usage: $0 {start|stop|restart|condrestart|status}"
71 ;;
72 esac
73 exit $RETVAL
赋予执行权限:
1 chmod +x /etc/init.d/mysql-mmm-agent-navy2
vi /etc/init.d/mysql-mmm-agent-navy3(navy3的agent启动脚本)
1 #!/bin/sh
2 # chkconfig: - 64 36
3 # description: MMM Agent.
4 # processname: mmm_agentd
5 # config: /etc/mysql-mmm/mmm_agent.conf
6 # pidfile: /var/run/mysql-mmm/mmm_agentd.pid
7 # Source function library and defaults file.
8 . /etc/rc.d/init.d/functions
9 . /etc/default/mysql-mmm-agent
10 ## Paths
11 #MMMD_AGENT_BIN="/usr/sbin/mmm_agentd"
12 #MMMD_AGENT_PIDFILE="/var/run/mysql-mmm/mmm_agentd.pid"
13 #LOCKFILE='/var/lock/subsys/mysql-mmm-agent'
14 #prog='MMM Agent Daemon'
15 # Cluster name (it can be empty for default cases)
16 CLUSTER='navy3'
17 LOCKFILE='/var/lock/subsys/mysql-mmm-agent_navy3'
18 prog='MMM Agent Daemon'
19 #-----------------------------------------------------------------------
20 # Paths
21 if [ "$CLUSTER" != "" ]; then
22 MMMD_AGENT_BIN="/usr/sbin/mmm_agentd @$CLUSTER"
23 MMMD_AGENT_PIDFILE="/var/run/mysql-mmm/mmm_agentd_$CLUSTER.pid"
24 else
25 MMMD_AGENT_BIN="/usr/sbin/mmm_agentd"
26 MMMD_AGENT_PIDFILE="/var/run/mysql-mmm/mmm_agentd.pid"
27 fi
28 start() {
29 if [ "${ENABLED}" != "1" ]; then
30 echo "$prog is disabled!"
31 exit 1
32 fi
33 echo -n "Starting $prog: "
34 if [ -s $MMMD_AGENT_PIDFILE ] && kill -0 `cat $MMMD_AGENT_PIDFILE` 2> /dev/null; then
35 echo " already running."
36 exit 0
37 fi
38 daemon $MMMD_AGENT_BIN
39 RETVAL=$?
40 echo
41 [ $RETVAL = 0 ] && touch $LOCKFILE
42 return $RETVAL
43 }
44 stop() {
45 # Stop daemon.
46 echo -n "Stopping $prog: "
47 killproc -p $MMMD_AGENT_PIDFILE $MMMD_AGENT_BIN
48 RETVAL=$?
49 echo
50 [ $RETVAL = 0 ] && rm -f $LOCKFILE
51 return $RETVAL
52 }
53 case "$1" in
54 start)
55 start
56 ;;
57 stop)
58 stop
59 ;;
60 status)
61 status -p $MMMD_AGENT_PIDFILE $MMMD_AGENT_BIN
62 RETVAL=$?
63 ;;
64 restart|reload)
65 stop
66 start
67 ;;
68 condrestart)
69 if [ -f $LOCKFILE ]; then
70 stop
71 start
72 fi
73 ;;
74 *)
75 echo "Usage: $0 {start|stop|restart|condrestart|status}"
76 ;;
77 esac
78 exit $RETVAL
赋予可执行权限:
1 chmod +x /etc/init.d/mysql-mmm-agent-navy3
启动服务:
1 /etc/init.d/mysql-mmm-agent-navy2 start
2 /etc/init.d/mysql-mmm-agent-navy3 start
1 scp /etc/mysql-mmm/mmm_common_navy2.conf 172.28.26.102:/etc/mysql-mmm/
2 scp /etc/mysql-mmm/mmm_common_navy3.conf 172.28.26.102:/etc/mysql-mmm/
3 scp /etc/mysql-mmm/mmm_agent_navy2.conf 172.28.26.102:/etc/mysql-mmm/
4 scp /etc/mysql-mmm/mmm_agent_navy3.conf 172.28.26.102:/etc/mysql-mmm/
5 scp /etc/init.d/mysql-mmm-agent-navy2 172.28.26.102:/etc/init.d/
6 scp /etc/init.d/mysql-mmm-agent-navy3 172.28.26.102:/etc/init.d/
修改agent配置文件:
1 sed -i 's/this db1/this db2/' /etc/mysql-mmm/mmm_agent_navy2.conf
2 sed -i 's/this db1/this db2/' /etc/mysql-mmm/mmm_agent_navy3.conf
赋予可执行权限
1 chmod +x /etc/init.d/mysql-mmm-agent-navy2
2 chmod +x /etc/init.d/mysql-mmm-agent-navy3
启动服务:
1 /etc/init.d/mysql-mmm-agent-navy2 start
2 /etc/init.d/mysql-mmm-agent-navy3 start
1 scp /etc/mysql-mmm/mmm_common_navy2.conf 172.28.26.103:/etc/mysql-mmm/
2 scp /etc/mysql-mmm/mmm_common_navy3.conf 172.28.26.103:/etc/mysql-mmm/
vi /etc/mysql-mmm/mmm_mon_navy2.conf
1 include mmm_common_navy2.conf
2 <monitor>
3 ip 127.0.0.1
4 port 9992
5 pid_path /var/run/mysql-mmm/mmm_mond_navy2.pid
6 bin_path /usr/libexec/mysql-mmm
7 status_path /var/lib/mysql-mmm/mmm_mond_navy2.status
8 ping_ips 172.28.26.101,172.28.26.102
9 auto_set_online 10
10 # wait_for_other_master 2
11 # The kill_host_bin does not exist by default, though the monitor will
12 # throw a warning about it missing. See the section 5.10 "Kill Host
13 # Functionality" in the PDF documentation.
14 #
15 # kill_host_bin /usr/libexec/mysql-mmm/monitor/kill_host
16 #
17 </monitor>
18 <host default>
19 monitor_user mmm_monitor
20 monitor_password 123456
21 </host>
22 debug 0
vi /etc/mysql-mmm/mmm_mon_navy3.conf
1 include mmm_common_navy3.conf
2 <monitor>
3 ip 127.0.0.1
4 port 9993
5 pid_path /var/run/mysql-mmm/mmm_mond_navy3.pid
6 bin_path /usr/libexec/mysql-mmm
7 status_path /var/lib/mysql-mmm/mmm_mond_navy3.status
8 ping_ips 172.28.26.101,172.28.26.102
9 auto_set_online 10
10 # wait_for_other_master 2
11 # The kill_host_bin does not exist by default, though the monitor will
12 # throw a warning about it missing. See the section 5.10 "Kill Host
13 # Functionality" in the PDF documentation.
14 #
15 # kill_host_bin /usr/libexec/mysql-mmm/monitor/kill_host
16 #
17 </monitor>
18 <host default>
19 monitor_user mmm_monitor
20 monitor_password 123456
21 </host>
22 debug 0
vi /etc/mysql-mmm/mmm_mon_log_navy2.conf
1 #log4perl.logger = FATAL, MMMLog, MailFatal
2 log4perl.logger = FATAL, MMMLog
3 log4perl.appender.MMMLog = Log::Log4perl::Appender::File
4 log4perl.appender.MMMLog.Threshold = INFO
5 log4perl.appender.MMMLog.filename = /var/log/mysql-mmm/mmm_mond_navy2.log
6 log4perl.appender.MMMLog.recreate = 1
7 log4perl.appender.MMMLog.layout = PatternLayout
8 log4perl.appender.MMMLog.layout.ConversionPattern = %d %5p %m%n
9 #log4perl.appender.MailFatal = Log::Dispatch::Email::MailSender
10 #log4perl.appender.MailFatal.Threshold = FATAL
11 #log4perl.appender.MailFatal.from = mmm@example.com
12 #log4perl.appender.MailFatal.to = root
13 #log4perl.appender.MailFatal.buffered = 0
14 #log4perl.appender.MailFatal.subject = FATAL error in mysql-mmm-monitor
15 #log4perl.appender.MailFatal.layout = PatternLayout
16 #log4perl.appender.MailFatal.layout.ConversionPattern = %d %m%n
vi /etc/mysql-mmm/mmm_mon_log_navy3.conf
1 #log4perl.logger = FATAL, MMMLog, MailFatal
2 log4perl.logger = FATAL, MMMLog
3 log4perl.appender.MMMLog = Log::Log4perl::Appender::File
4 log4perl.appender.MMMLog.Threshold = INFO
5 log4perl.appender.MMMLog.filename = /var/log/mysql-mmm/mmm_mond_navy3.log
6 log4perl.appender.MMMLog.recreate = 1
7 log4perl.appender.MMMLog.layout = PatternLayout
8 log4perl.appender.MMMLog.layout.ConversionPattern = %d %5p %m%n
9 #log4perl.appender.MailFatal = Log::Dispatch::Email::MailSender
10 #log4perl.appender.MailFatal.Threshold = FATAL
11 #log4perl.appender.MailFatal.from = mmm@example.com
12 #log4perl.appender.MailFatal.to = root
13 #log4perl.appender.MailFatal.buffered = 0
14 #log4perl.appender.MailFatal.subject = FATAL error in mysql-mmm-monitor
15 #log4perl.appender.MailFatal.layout = PatternLayout
16 #log4perl.appender.MailFatal.layout.ConversionPattern = %d %m%n
vi /etc/init.d/mysql-mmm-monitor-navy2
1 #!/bin/sh
2 #
3 # mysql-mmm-monitor This shell script takes care of starting and stopping
4 # the mmm monitoring daemon.
5 #
6 # chkconfig: - 64 36
7 # description: MMM Monitor.
8 # processname: mmm_mond
9 # config: /etc/mysql-mmm/mmm_mon.conf
10 # pidfile: /var/run/mysql-mmm/mmm_mond.pid
11 # Source function library and defaults file.
12 . /etc/rc.d/init.d/functions
13 . /etc/default/mysql-mmm-monitor
14 # Cluster name (it can be empty for default cases)
15 CLUSTER='navy2'
16 LOCKFILE='/var/lock/subsys/mysql-mmm-monitor_navy2'
17 prog='MMM Monitor Daemon'
18 if [ "$CLUSTER" != "" ]; then
19 MMMD_MON_BIN="/usr/sbin/mmm_mond @$CLUSTER"
20 MMMD_MON_PIDFILE="/var/run/mysql-mmm/mmm_mond-$CLUSTER.pid"
21 else
22 MMMD_MON_BIN="/usr/sbin/mmm_mond"
23 MMMD_MON_PIDFILE="/var/run/mysql-mmm/mmm_mond.pid"
24 fi
25 start() {
26 if [ "${ENABLED}" != "1" ]; then
27 echo "$prog is disabled!"
28 exit 1
29 fi
30 echo -n "Starting $prog: "
31 if [ -s $MMMD_MON_PIDFILE ] && kill -0 `cat $MMMD_MON_PIDFILE` 2> /dev/null; then
32 echo " already running."
33 exit 0
34 fi
35 daemon $MMMD_MON_BIN
36 RETVAL=$?
37 echo
38 [ $RETVAL = 0 ] && touch $LOCKFILE
39 return $RETVAL
40 }
41 stop() {
42 # Stop daemon.
43 echo -n "Stopping $prog: "
44 killproc -p $MMMD_MON_PIDFILE $MMMD_MON_BIN
45 RETVAL=$?
46 echo
47 [ $RETVAL = 0 ] && rm -f $LOCKFILE
48 return $RETVAL
49 }
50 case "$1" in
51 start)
52 start
53 ;;
54 stop)
55 stop
56 ;;
57 status)
58 status -p $MMMD_MON_PIDFILE $MMMD_MON_BIN
59 RETVAL=$?
60 ;;
61 restart|reload)
62 stop
63 start
64 ;;
65 condrestart)
66 if [ -f $LOCKFILE ]; then
67 stop
68 start
69 fi
70 ;;
71 *)
72 echo "Usage: $0 {start|stop|restart|condrestart|status}"
73 ;;
74 esac
75 exit $RETVAL
vi /etc/init.d/mysql-mmm-monitor-navy3
1 #!/bin/sh
2 #
3 # mysql-mmm-monitor This shell script takes care of starting and stopping
4 # the mmm monitoring daemon.
5 #
6 # chkconfig: - 64 36
7 # description: MMM Monitor.
8 # processname: mmm_mond
9 # config: /etc/mysql-mmm/mmm_mon.conf
10 # pidfile: /var/run/mysql-mmm/mmm_mond.pid
11 # Source function library and defaults file.
12 . /etc/rc.d/init.d/functions
13 . /etc/default/mysql-mmm-monitor
14 # Cluster name (it can be empty for default cases)
15 CLUSTER='navy3'
16 LOCKFILE='/var/lock/subsys/mysql-mmm-monitor_navy3'
17 prog='MMM Monitor Daemon'
18 if [ "$CLUSTER" != "" ]; then
19 MMMD_MON_BIN="/usr/sbin/mmm_mond @$CLUSTER"
20 MMMD_MON_PIDFILE="/var/run/mysql-mmm/mmm_mond-$CLUSTER.pid"
21 else
22 MMMD_MON_BIN="/usr/sbin/mmm_mond"
23 MMMD_MON_PIDFILE="/var/run/mysql-mmm/mmm_mond.pid"
24 fi
25 start() {
26 if [ "${ENABLED}" != "1" ]; then
27 echo "$prog is disabled!"
28 exit 1
29 fi
30 echo -n "Starting $prog: "
31 if [ -s $MMMD_MON_PIDFILE ] && kill -0 `cat $MMMD_MON_PIDFILE` 2> /dev/null; then
32 echo " already running."
33 exit 0
34 fi
35 daemon $MMMD_MON_BIN
36 RETVAL=$?
37 echo
38 [ $RETVAL = 0 ] && touch $LOCKFILE
39 return $RETVAL
40 }
41 stop() {
42 # Stop daemon.
43 echo -n "Stopping $prog: "
44 killproc -p $MMMD_MON_PIDFILE $MMMD_MON_BIN
45 RETVAL=$?
46 echo
47 [ $RETVAL = 0 ] && rm -f $LOCKFILE
48 return $RETVAL
49 }
50 case "$1" in
51 start)
52 start
53 ;;
54 stop)
55 stop
56 ;;
57 status)
58 status -p $MMMD_MON_PIDFILE $MMMD_MON_BIN
59 RETVAL=$?
60 ;;
61 restart|reload)
62 stop
63 start
64 ;;
65 condrestart)
66 if [ -f $LOCKFILE ]; then
67 stop
68 start
69 fi
70 ;;
71 *)
72 echo "Usage: $0 {start|stop|restart|condrestart|status}"
73 ;;
74 esac
75 exit $RETVAL
赋予可执行权限:
1 chmod +x /etc/init.d/mysql-mmm-monitor-navy2
2 chmod +x /etc/init.d/mysql-mmm-monitor-navy3
启动监控服务:
/etc/init.d/mysql-mmm-monitor-navy2 start
/etc/init.d/mysql-mmm-monitor-navy3 start
结果
1 [root@monitor ~]# mmm_control show
2 db1(172.28.26.101) master/ONLINE. Roles: writer(172.28.26.104)
3 db2(172.28.26.102) master/ONLINE. Roles:
4 db3(172.28.26.188) slave/ONLINE. Roles: reader(172.28.26.105)
5 db4(172.28.26.189) slave/ONLINE. Roles: reader(172.28.26.106)
6 [root@monitor ~]# mmm_control @navy2 show
7 db1(172.28.26.101) master/ONLINE. Roles: writer(172.28.26.107)
8 db2(172.28.26.102) master/ONLINE. Roles: reader(172.28.26.108)
9 [root@monitor ~]# mmm_control @navy3 show
10 db1(172.28.26.101) master/ONLINE. Roles: writer(172.28.26.109)
11 db2(172.28.26.102) master/ONLINE. Roles: reader(172.28.26.110)
12 [root@monitor ~]#
[转](多实例)mysql-mmm集群的更多相关文章
- 多图文,详细介绍mysql各个集群方案
目录 多图文,详细介绍mysql各个集群方案 一,mysql原厂出品 二,mysql第三方优化 三,依托硬件配合 四,其它 多图文,详细介绍mysql各个集群方案 集群的好处 高可用性:故障检测及迁移 ...
- MySQL分布式集群之MyCAT(转)
原文地址:http://blog.itpub.net/29510932/viewspace-1664499/ 隔了好久,才想起来更新博客,最近倒腾的数据库从Oracle换成了MySQL,研究了一段时间 ...
- MySQL Cluster 集群
本文转载 http://www.cnblogs.com/gomysql/p/3664783.html MySQL Cluster是一个基于NDB Cluster存储引擎的完整的分布式数据库系统.不仅仅 ...
- 基于keepalived搭建MySQL热机集群
背景 MySQL的高可用方案一般有如下几种: keepalived+双主,MHA,MMM,Heartbeat+DRBD,PXC,Galera Cluster 比较常用的是keepalived+双主,M ...
- MySQL分布式集群之MyCAT(一)简介【转】
隔了好久,才想起来更新博客,最近倒腾的数据库从Oracle换成了MySQL,研究了一段时间,感觉社区版的MySQL在各个方面都逊色于Oracle,Oracle真的好方便!好了,不废话,这次准备记录一些 ...
- mysql各种集群的优缺点
mysql各种集群的优缺点 1.主从架构:只是有数据备份的功能: 2.主主互备+keepalived:实现数据备份加高可用: 3.主主互备,主主下面分别挂个从: 4.A和B主主互备,把从库都挂到B下, ...
- 《综合》MMM集群
<综合>MMM集群 部署集群基础环境 MySQL-MMM架构部署 MySQL-MMM架构使用 1 部署集群基础环境 1.1 问题 本案例要求为MySQL集群准备基础环境,完成以下任务操作: ...
- MySQL数据库集群进行正确配置步骤
MySQL数据库集群进行正确配置步骤 2010-06-09 10:47 arrowcat 博客园 字号:T | T 我们今天是要和大家一起分享的是对MySQL数据库集群进行正确配置,我前两天在相关网站 ...
- Facebook揭密:如何让MySQL数据库集群自主运行
Facebook运行着全球最大的MySQL数据库集群,该集群分布在两个大洲上的多个数据中心中数以千计的服务器上.让人不解的是,Facebook只动用了一个很小的团队来管理这个庞大的MySQL数据库集群 ...
- zookeeper的单实例和伪集群部署
原文链接: http://gudaoyufu.com/?p=1395 zookeeper工作方式 ZooKeeper 是一个开源的分布式协调服务,由雅虎创建,是 Google Chubby 的开源实现 ...
随机推荐
- Linux操作系统下软件的安装方法大全
一.rpm包安装方式步骤: 1.找到相应的软件包,比如soft.version.rpm,下载到本机某个目录: 2.打开一个终端,su -成root用户: 3.cd soft.version.rpm所在 ...
- unity3d结合轮廓显示,实现完整的框选目标(附Demo代码)
原地址:http://dong2008hong.blog.163.com/blog/static/469688272013111554511948/ 在unity里实现,其实很简单,因为有两个前提:1 ...
- FreePlan Windows下默认乱码解决方案
FreePlan 做为一个开源的跨平台的思维导图软件非常好用. 笔者最近在Windows下使用时发现,新建导图文件时默认总是乱码,每次新建元素都需要手动设置一下字体才行. 研究一下,估计是默认模板问题 ...
- Dear Project Manager, I Hate You
项目经理,我恨你,而且我知道你也恨我.我真的不理解,你究竟是做什么的. 你是一个多么独特的角色呀,几乎每个公司都要雇用你这样的人.可在不管大大小小的项目中,你与其说是帮忙,不如说是添乱.我坚信,大部分 ...
- hdu 2481 Toy
好题!!!没话说…… 用到的知识面很多,这题的难点在于公式的推导. 原始推导过程见:http://hi.baidu.com/spellbreaker/item/d8bb3bda5af30be6795d ...
- 大陆 Google play 开发者注册(2016)
1:准备一个VPN, 如: https://vpnso.com 收费的,使用一两年了,还不错,很稳定2:准备一张普通的银行卡或者信用卡就可以了,能正常绑定支付宝就行3:在全球付上面申请一个 虚拟 ...
- Unity UGUI —— 鼠标穿透UI问题(Unity官方的解决方法)
解决方案 : http://www.cnblogs.com/fly-100/p/4570366.html 这里我们直接在使用Input.GetMouseButtonDown(0)的地方加了一个检测函数 ...
- spring @bean注解
1.@bean注解用于注册一个bean到 到ioc容器中.类似于@component注解 2.@configure注解,相当于指明这个类是配置文件 3.@bean还可以指定initMethod,des ...
- URLEncode转json
http://tool.chinaz.com/tools/urlencode.aspx?jdfwkey=zobsn2 http://www.bejson.com/
- EF 实体关系
基于共享主键的一对一: this.HasRequired(t => t.TRDConInfo) .WithOptional(t => t.TRDFoundationProjCheck); ...