- 浏览: 70192 次
- 性别:
- 来自: 大连
最新评论
文章列表
String ip = request.getHeader("x-forwarded-for");
request.getHeader("Proxy-Client-IP");
ip = request.getHeader("WL-Proxy-Client-IP");
ip = request.getRemoteAddr();
////
Enumeration names = request.getHeaderNames();
while(names.hasMoreElements()){
String str = (String) ...
select sum(if(win_user<0,-50,100)) from t;
select count(win_user)*-50 from t where win_user < 0;
select (count(win_user))*100 from t where win_user >= 0;
gbd 调试main
set follow-fork-mode child
tar -zxvf memcached-1.4.15.tar.gz
cd memcached
./configure
make & make install
./memcached -d -m 512 -p 11211
启动
访问:
telnet 192.168.145.128 11211
mysql导入备份,数据量大的时候会导入失败。
在my.ini中加入以下参数即可。
max_allowed_packet = 3000M (实际值可以根据实际来设置)
项目中需要俩个table列宽要保持一致的情况,尽管每个td都设置了width,试了好多种方法,都会根据列里面的内容微妙的增宽导致对不齐。最后找到这个,设上之后就OK了。
<TABLE style="table-layout:fixed;">
其它:
nowrap="nowarp" 不换行
style='word-break:break-all;word-wrap:break-word'换行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
</head>
<body>
<div style="position:fixed;top:0px;overflow: visible ...
:g/^\s*<.*$/d
意思就是删除空格开头的有<号的那一行
^开头
\s空格
<
.任意字符
$结束符
: g 表示全局搜索替换
:d 删除?
#---start memory set----
JAVA_OPTS="-Xms2048M -Xmx2048M -Xmn512M -Xss256k -XX:PermSize=512M"
#---end momory set----
http://stackoverflow.com/questions/2308479/simple-java-https-server
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
在上面增加这俩行~就相当于开了22 跟5432端口
service iptables restart
SSLContext ssl = xxx;
HttpsConfigurator configurator = new HttpsConfigurator(ssl);
// 设置发布路径等
httpsServer = HttpsServer.create(new InetSocketAddress("127.0.0.1", 8080),200);
httpsServer.setHttpsConfigurator(configurator);
HttpContext httpContext = httpsServer.createConte ...