`
zjnbshifox
  • 浏览: 312834 次
  • 性别: Icon_minigender_1
  • 来自: 宁波
社区版块
存档分类
最新评论
收藏列表
标题 标签 来源
apache mpm
<IfModule mpm_winnt.c>
ThreadsPerChild    3000
ThreadLimit     3500
MaxRequestsPerChild    10000
#ThreadsPerChild 1000
#MaxRequestsPerChild  5000
</IfModule>
自定义的属性编辑器
自动注入日期格式转换错误问题,解决办法:定制一个WebBindingInitialize,注册一个自定义的属性编辑器 


    <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">  
            <property name="cacheSeconds" value="0" />  
            <property name="webBindingInitializer">  
                <bean class="com.fsj.spring.util.MyWebBinding" />  
            </property>  
        </bean>  




    package com.fsj.spring.util;  
      
    import java.util.Date;  
    import org.springframework.web.bind.WebDataBinder;  
    import org.springframework.web.bind.support.WebBindingInitializer;  
    import org.springframework.web.context.request.WebRequest;  
      
    public class MyWebBinding implements WebBindingInitializer {  
      
        public void initBinder(WebDataBinder binder, WebRequest request) {  
            //1. 使用spring自带的CustomDateEditor  
            //SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");  
            //binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));  
              
            //2. 自定义的PropertyEditorSupport  
            binder.registerCustomEditor(Date.class, new DateConvertEditor());  
      
        }  
      
    }  
bash
pid=`ps -o pid,command ax | grep mongod | awk '!/awk/ && !/grep/ {print $1}'`; 
if [ "${pid}" != "" ]; then 
    kill -2 ${pid}; 
fi 

sql server 2005 重建日志 
--该重建日志方法来自微软技术支持 

alter database dbname set emergency 
go 
alter database dbname set single_user with rollback immediate 
go 
use master 
go 
alter database dbname Rebuild Log on 
(name=dbname_log,filename='D:\Log\dbname_log.LDF') 
go 
alter database dbname set multi_user
jquery 随机选择元素
(function($){ 
    var random = 0; 

    $.expr[':'].random = function(a, i, m, r) { 
        if (i == 0) { 
            random = Math.floor(Math.random() * r.length); 
        } 
        return i == random; 
    }; 

})(jQuery); 

// This is how you use it: 
$('li:random').addClass('glow');
flash back
flashback table xcp to timestamp to_timestamp('2011-12-23 10:49:30,'yyyy-MM-dd hh24:mi:ss');
Global site tag (gtag.js) - Google Analytics