——referenceJava is Pass by Value and Not Pass by Reference其实这个问题是一个非常初级的问题,相关的概念初学者早已掌握,但是时间长了还是容易混淆,特此总结一下一、值传递和引用传递 首先这里我们先看下两者的异同:值传递:方法调用时,实际参数把它....
分类:
编程语言 时间:
2015-05-13 00:23:40
阅读次数:
186
安裝完zabbix後,默認的監控mysql模板是不能用的,即使添加上去了,也是顯示為紅色的unsupper,因此我們需要做一些配置.首先需要在想要監控的mysqlserver上新建授權用戶,讓zabbix_agent對數據庫有查詢,以及狀態監測等權限.mysql-uroot-p<PASS>-e"GRANTUSAGEON*.*TO‘zab..
分类:
数据库 时间:
2015-05-12 19:10:45
阅读次数:
202
==========主从状态监控=================exportLANG=en_US.UTF-8#monitormaster-slave监控主从同步hostip="10.136.13.92"user="root"pass="test@2015"message=""#监控主从同步状态slaveStatus=$(mysql-u${user}-p${pass}mysql-e"showglobalstatuslike‘slave_running‘\G"|grep-..
分类:
数据库 时间:
2015-05-12 19:08:07
阅读次数:
149
Time Limit:1000MSMemory Limit:32767KB64bit IO Format:%I64d & %I64uHDU 1029Description"OK, you are not too bad, em... But you can never pass the next t...
分类:
其他好文 时间:
2015-05-10 18:53:13
阅读次数:
112
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.相比...
分类:
其他好文 时间:
2015-05-08 12:40:15
阅读次数:
95
//第一种方法使用jsonp的方式 $_GET['loginuser'], "pass" => $_GET['loginpass'], "name" => 'response');echo $_GET['jsoncallback'] . "(".json_encode($arr)."...
分类:
Web程序 时间:
2015-05-07 20:26:23
阅读次数:
113
host=$host; $this->user=$user; $this->pass=$pass; $this->database=$database; $this->charset=$charset; $this->connect(); } function connect(){ mysql_co...
分类:
微信 时间:
2015-05-07 13:54:10
阅读次数:
240
Python中字符串查找方式有多种,常见的有re.match/search
or str.find
用一个例子来说明各种方式的效率如下:
from timeit import timeit
import re
def find(string, text):
if string.find(text) > -1:
pass
def re_find(string, t...
分类:
编程语言 时间:
2015-05-06 22:59:55
阅读次数:
247
反向代理: proxy_pass: 负载均衡: upstream 负载均衡,有四种方式: a/ 轮询(weight) b/ ip_hash c/ fair d/ url_hash 详细见 相关链接的负载均衡详解相关链接:http://www.jbxue.com/arti...
分类:
其他好文 时间:
2015-05-06 12:58:32
阅读次数:
131
功能模块化带来可自由组装的便利:使用python的mixin特性装配class ThreadHTTPServer(ThreadingMixin, HTTPServer): pass上面表示1个请求1个线程式的HTTP服务器使用参数式形式进行装配class CGIHTTPServer(HTT...
分类:
其他好文 时间:
2015-05-06 10:31:23
阅读次数:
144