原创 solrJ使用指南

Setting the classpath     Ant   The jars required in the classpath for SolrJ are, commons-codec-1.3.jar (*) commons-f

原创 mysql複製表的某些字段到其他表

 Insert是T-sql中常用語句,Insert INTO table(field1,field2,...) values(value1,value2,...)這種形式的在應用程序開發中必不可少。但我們在開發、測試過程中,經常會遇到需

原创 使用solr爲mysql構建全文搜索引擎

安裝 Solr 1. 下載後解壓 solr ,建議解壓到 solr目錄. 2. 進入 solr/example目錄,這個目錄下自帶有jetty,可以直接運行. 3. 啓動solr  “java -jar startup.jar” 4. 通

原创 判斷是否是遨遊瀏覽器

function ismaxthon(){    if (window.external.max_version){        return true;    }else{        return false;    } } 調

原创 Ubuntu installing Cacti

Installing CactiTo install the Cacti package from the distribution software repositories, issue the following command:a

原创 grails可配置數據源(datasource)

[list] 方法一:在conf/spring目錄下添加一個resources.xml,配置一個dataSource數據源,覆蓋DataSource.groovy中的數據源 方法二:修改conf/config.groovy 文件,覆蓋現

原创 ubuntu下部署snmpd,並允許遠程訪問

sudo apt-get install snmpdsudo vim /etc/snmp/snmpd.conf修改配置文件,紅色部分爲新增#       sec.name  source          communitycom2sec

原创 client denied by server configuration: proxy:ajp:

To suppress the client denied by server configuration error with ajp and Apache (I suppose you already did a a2enmod p

原创 讓ubuntu10.04支持mysql的innodb引擎

在ubuntu10上安裝的mysql ,默認不支持mysql的innodb插件。 所以導致mysql不能使用innode. 只需要做如下改動就能解決這個問題:   將下列配置寫入/etc/apparmor.d/usr.sbin.mysql

原创 smbclient 使用方法

1,列出某個IP地址所提供的共享文件夾smbclient -L 198.168.0.1 -U username%password 2,像FTP客戶端一樣使用smbclientsmbclient //192.168.0.1/tmp  -U

原创 grails上傳文件

def upload = {  def f = request.getFile('myFile')  if(!f.empty) {  f.transferTo( new File('/some/local/dir/myfile.txt')

原创 Ubuntu rsync同步文件實例

服務器端:Ubuntu 9.10 - 192.168.1.3客戶端:Ubuntu 10.04 - 192.168.1.73我們先來設置一下服務器端的配置1.ubuntu系統安裝完之後,rsync服務默認不是啓動的,我們要修改下面的文件。$

原创 ubuntu sever 命令行 使用 u盤

  如果是ubuntu桌面環境的話,不用mount,接入的U盤就可以直接被系統識別,訪問起來非常方便,但如果沒有桌面環境呢,比如在ubuntu server端,如何訪問U盤呢?   第一步:查看U盤信息sudo fdisk -l 得到類

原创 No row with the given identifier exists

class A { B b } class B { String name } If you have an A has B relationship. If from the database end, A says has

原创 ubuntu 不能使用sudo

ubuntu默認關閉了root賬號, 所以是通過一個默認賬號使用sudo 命令來代替root執行。 如果更改了此用戶的用戶組,可能導致無法使用sudo, 並收到XXX is not in the sudoers file 的提示。   解