Time of Update: 2018-12-04
<html><head><script src="jquery-1.3.2.min.js"></script><script>$(function(){/* 1、$("#c li").bind("click",function(){ alert($(this).html()); });*//*2、$("#c li").live("click",function(){alert($(this).html());});*/$("#c").
Time of Update: 2018-12-04
SQL where 條件順序對效能的影響有哪些經常有人問到oracle中的Where子句的條件書寫順序是否對SQL效能有影響,我的直覺是沒有影響,因為如果這個順序有影響,Oracle應該早就能夠做到自動最佳化,但一直沒有關於這方面的確鑿證據。在網上查到的文章,一般認為在RBO最佳化器模式下無影響(10G開始,預設為RBO最佳化器模式),而在CBO最佳化器模式下有影響,主要有兩種觀點: a.能使結果最少的條件放在最右邊,SQL執行是按從右至左進行結果集的篩選的; b.有人實驗表明,能使結果最少
Time of Update: 2018-12-04
結構:<c:choose> <c:when test=""> 如果 </c:when> <c:otherwise> 否則 </c:otherwise> </c:choose>代碼:<c:choose> <c:when test="${sessionScope.USERTYPE == 'inner'}"> <c:set
Time of Update: 2018-12-04
1.PreparedStatement是先行編譯的,對於批量處理可以大大提高效率. 也叫JDBC預存程序2.使用 Statement 對象。在對資料庫只執行一次性存取的時侯,用 Statement 對象進行處理。PreparedStatement 對象的開銷比Statement大,對於一次性操作並不會帶來額外的好處。3.statement每次執行sql語句,相關資料庫都要執行sql語句的編譯,preparedstatement是先行編譯得,
Time of Update: 2018-12-04
* 計算兩個日期之間相差的天數(沒有順序要求;格式可以是20080808) * * @param str1 * String * @param str2 * String * @return int */ public static int getDateDifference(String str1, String str2) { java.util.Date date1 = null; java.util.Date date2
Time of Update: 2018-12-04
http://tomhat.iteye.com/blog/1141117initialSize :串連池啟動時建立的初始化串連數量(預設值為0)maxActive :串連池中可同時串連的最大的串連數(預設值為8,調整為20,高峰單機器在20並發左右,自己根據應用情境定) maxIdle:串連池中最大的閒置串連數,超過的空閑串連將被釋放,如果設定為負數表示不限制(預設為8個,maxIdle不能設定太小,因為假如在高負載的情況下,串連的開啟時間比關閉的時間快,會引起串連池中idle的個數
Time of Update: 2018-12-04
使用 CollectionUtils 中四個方法之一執行集合操作.這四種分別是 union(),intersection();disjunction(); subtract();下列例子就是示範了如何使用上述四個方法處理兩個 Collection;注: 這些方法都是數學的集合演算法 import java.util.Arrays;import java.util.Collection;import java.util.Collections;import
Time of Update: 2018-12-04
android開發中經常會在setContentView(R.layout.XXX);
Time of Update: 2018-12-04
如顯示彈出一個半透明框java代碼://清空資料private void ShowPopup() {LayoutInflater mLayoutInflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);ViewGroup mView = (ViewGroup) mLayoutInflater.inflate(R.layout.soft_calendar_popup, null, true);final
Time of Update: 2018-12-04
擷取Android4.0源碼,也可以參考Android官網的下載步驟:官網下載參考第一步,首先建立repo環境,把此目錄添加到環境變數中。mkdir ~/binPATH=~/bin:$PATH第二步,下載repo工具。sudo apt-get install git-core curlcurl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repochmod a+x ~/bin/repo第三步,建立源碼目錄,
Time of Update: 2018-12-04
xml檔案代碼:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:orientation="horizontal" android:layout_width="fill_parent"android:layout_height="fill_parent"> <EditText
Time of Update: 2018-12-04
//引入匯入的hibernate包 import net.sf.hibernate.cfg.Configuration; import net.sf.hibernate.HibernateException; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.Session; import net.sf.hibernate.Transaction; import java.util.List; import
Time of Update: 2018-12-04
test01 跳到test02的activity中,並且傳輸資料.test02擷取資料 ,同時也可以返回資料給test01.test01的activity:package cn.test01;import android.app.Activity;import android.content.ComponentName;import android.content.Intent;import android.os.Bundle;import android.view.View;import
Time of Update: 2018-12-04
1、Spotlight搜尋“終端”,開啟[終端]程式2、輸入如下代碼並斷行符號:sudo find / -name ".DS_Store" -depth -exec rm {} \;複製代碼3、如果提示你需要管理員密碼,輸入確認即可。命令列中輸入的時候是不可見的,別輸錯了4、進程會自動找到所有.DS_Store檔案並刪除它們不過以後系統還是會建立新的.DS_Store 檔案,如果需要禁止系統建立,那麼可以在終端中運行如下代碼並斷行符號:defaults write
Time of Update: 2018-12-04
Ø瞬時對象(Transient Objects):使用new操作符初始化的對象不是立刻就持久的。它們的狀態是瞬時的,也就是說它們沒有任何跟資料庫表相關聯的行為,只要應用不再引用這些對象(不再被任何其它對象所引用),它們的狀態將會丟失,並由記憶體回收機制回收。Ø持久化對象(Persist
Time of Update: 2018-12-04
<!-- android:screenOrientation="" 固定螢幕顯示模式,portrait表示橫向,landscape表示縱向 --> <!-- android:theme="@style/Sub" 設定activity的樣式 --><activity android:name=".Test" android:theme="@style/Sub" android:screenOrientation="portrait">&
Time of Update: 2018-12-04
//login button // .h 中定義 UIButton *_loginBtn; @property (strong,nonatomic)UIButton *loginBtn; // .m 中實現設定按鈕 @synthesize loginBtn = _loginBtn;//使用備份變數名 //設定按鈕的 形狀
Time of Update: 2018-12-04
表 4.1. Hibernate JDBC屬性 屬性名稱用途hibernate.connection.driver_classjdbc驅動類hibernate.connection.urljdbc URLhibernate.connection.username資料庫使用者hibernate.connection.password資料庫使用者密碼hibernate.connection.pool_size串連池容量上限數目但Hibernate內建的串連池演算法相當不成熟.
Time of Update: 2018-12-04
Hibernate使用Tmocat的串連池的配置過程:1.在Tomcat的server.xml裡加入<Context path="/ttt" docBase="ttt"debug="5" reloadable="true" crossContext="true"><Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"maxActive="100" maxIdle="30"
Time of Update: 2018-12-04
一般在項目開發過程中,使用比較多的就是先建好表,再利用hibernate反向工程產生*.hbm.xml檔案跟POJO類,個人認為由於目前所使用的資料庫都是關聯式資料庫,而hibernate作為一個ORM,把對資料庫的操作都對象化了,更應當從對象出發,產生資料庫裡面相關表,這樣更加符合人認知事物的習慣。由於hibernate3提供了內建的工具hbm2ddl,建立根據你的對象建立資料庫是一件非常簡單的事情。。1、建立java項目2、建立User