- 浏览: 155801 次
- 性别:
- 来自: 贵州
最新评论
-
qingmuxiang:
学无止境
通用数据库分页 扩展dbutil (附代码下载) -
haiyangyiba:
你好,下载了你的例子,主要看了如下方法:public < ...
通用数据库分页 扩展dbutil (附代码下载)
文章列表
apache solr4.72 使用
- 博客分类:
- 信息检索
solr 自带中间件运行测试:
1、解压solr-4.7.2.zip,
2、启动:在cmd中运行 java -jar start.jar,这样jetty就监听在8983端口,
3、浏览:在浏览器中输入: http://127.0.0.1:8080/solr/
下一步:
1、复制工程:
solr-4.7.2\example\solr(包含solr目录) 到我的工程目录中:D:\resin-pro-4.0.37\
solr-4.7.2\example\lib\ext(不包含ext目录,只是其中的jar) 到我的工程目录中:D:\resin-p ...
mysql 允许远程登陆
- 博客分类:
- 数据库方案
当安装完数据库后,会发现由于权限控制,导致不能远程连接。
这需要我们手动去打开远程连接。
有2种方法:
一种是允许所有客户端连接
GRANT ALL PRIVILEGES ON *.* TO '用户名'@'%' IDENTIFIED BY '用户密码' WITH GRANT OPTION;
另一种是允许这用户在某个IP上使用
GRANT ALL PRIVILEGES ON *.* TO '用户'@'授权IP' IDENTIFIED BY '用户密码' WITH GRANT OPTION;
工作日计算方法 工作日加减
- 博客分类:
- JAVA
import java.text.ParseException;
import java.text.SimpleDateFormat;
import org.apache.commons.lang.time.DateUtils;
public class App {
static SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd E");
/**
* 工作日计算类(工作日不包括周末和周 ...
mysqldump --add-drop-table -u帐户 -p密码 website > /www/mysqldbbak/2014/01/17.sql
D:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump --add-drop-table -u root -
p website > ../2014-1110.sql
Enter password: ***********
D:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump --add-dr ...
nginx 负载均衡
- 博客分类:
- 负载均衡
#y
proxy_connect_timeout 2s;
upstream tomcat_pool {
server 10.10.1.144:8080;
server 10.10.1.152:80;
server 10.10.1.155:8080;
}
upstream report_pool {
server 10.10.1.150:8080;
#server 127.0.0.1:8081 down;
}
#y
server {
listen 80;
server_n ...
@echo off
copy C:\Program Files\MySQL\MySQL Server 5.5\php.ini %SystemRoot% /y >nul
copy C:\Program Files\MySQL\MySQL Server 5.5\my.ini %SystemRoot% /y >nul
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld.exe" --install mysql --defaults-file="C:\Program Files\MySQL\MySQL ...
table不超过最大值。
- 博客分类:
- JQuery
$(function(){
var tableMax=580;
$("table").each(function(){
if($(this).attr("width")>tableMax||$(this).css("width")>tableMax){
$(this).attr("width",tableMax);
$(this).css("width",tableMax+"px");
}
});
});
mysql 授权用户远程登陆
- 博客分类:
- 数据库方案
你想myuser使用mypassword从任何主机连接到mysql服务器的话。 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%'IDENTIFIED BY 'mypassword' WITH GRANT OPTION; 如果你想允许用户myuser从ip为192.168.1.6的主机连接到mysql服务器,并使用mypassword作为密码 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3'IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
resin3连接池配置
- 博客分类:
- 中间件
<database>
<character-encoding>utf-8</character-encoding>
<jndi-name>jdbc/eBuilder</jndi-name>
<driver type="org.gjt.mm.mysql.Driver">
<url>jdbc:mysql://localhost:3306/website?useOldAliasMetadataBehavior=true&useUnicode=true&am ...
dwr 日期时间转换
- 博客分类:
- DWR
/*时间格式化 http://www.naoqiu.com*/
Date.prototype.format = function (format) {
var o = {
"M+": this.getMonth() + 1,
"d+": this.getDate(),
"H+": this.getHours(),
"m+": this.getMinutes(),
"s+": this.getS ...
javascript 获得网站路径
- 博客分类:
- JavaScript
//获取当前网址,如: http://localhost:8080/Tmall/index.jsp
var curWwwPath=window.document.location.href;
//获取主机地址之后的目录如:/Tmall/index.jsp
var pathName=window.document.location.pathname;
var pos=curWwwPath.indexOf(pathName);
//获取主机地址,如: http://localhost:8080
var localhostPaht=curWwwPath.substring ...
linux 复制禁用提醒
- 博客分类:
- OS
yes|cp -r /www/webSite /www/app/resin/webapps
Java 相对路径转绝对网络绝对路径
- 博客分类:
- JAVA
/**
* 自动得到相对文件的路径
* @param fileSrc 源css出现的文件(/abc/def/h1.css)
* @param srcFileString css文件中的相对路径[./a.jpg][../../c.jpg]
* @return String
*/
public static String autoResetPath(final String filePath,final String srcFileString){
if(srcFileString.toLowerCase().indexOf("http" ...
Java Xss半角转全角防攻击
- 博客分类:
- 安全
/**
* 将容易引起xss漏洞的半角字符直接替换成全角字符
*
* @param s
* @return
*/
private String xssEncode(String s) {
if (s == null || s.equals("")) {
return s;
}
try {
s = URLDecoder.decode(s, UTF8);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catc ...
DWR取session
- 博客分类:
- DWR
org.directwebremoting.WebContext wc = org.directwebremoting.WebContextFactory.get();
HttpSession session = wc.getSession();