Jcat
          寵辱不驚,閑看庭前花開花落~~
          posts - 173,comments - 67,trackbacks - 0
          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          迷路ing

          常用鏈接

          留言簿(13)

          隨筆分類(171)

          相冊

          Doc_Database

          Doc_Java

          Favorites

          Java牛人們

          My friends

          Oracle牛人們

          Search Engine

          搜索

          •  

          積分與排名

          • 積分 - 115789
          • 排名 - 506

          最新評論

          SunOS是Sun的操作系統最初叫法,SunOS主要是基于BSDUnix版本;
          SunOS 5.0開始,SUN的操作系統開發開始轉向System V Release 4,并且有了新的名字叫做Solaris2.0
          Solaris 2.6以后,SUN刪除了版本號中的"2,因此,SunOS 5.10就叫做Solaris 10

          最后"SunOS"這個詞被用做專指Solaris操作系統的內核;而Solaris被認為是由SunOS,圖形化的桌面計算環境, 以及它網絡增強部分組成。
          ?
            
          ---Solaris與Sunos的版本轉換---
          Solaris 10 = SunOS 5.10
          Solaris 9 = SunOS 5.9
          Solaris 8 = SunOS 5.8
          Solaris 7 = SunOS 5.7

          Solaris 2.6 = SunOS 5.6
          Solaris 2.5 = Sunos 5.5

            

          ------------------
          Solaris也有分服務器版和個人版,它們分別是:
          ?? 服務器版:sparc
          ?? 個人版:x86
          雖然Solaris在SPARC上擁有強大的處理能力和硬件支持,但是在Intel x86上性能卻未如人意。
          posted @ 2009-03-13 12:19 Jcat 閱讀(821) | 評論 (2)編輯 收藏
          為了跟老外聊天,裝了個Skype。后來發現可以用來打IP電話,超值!

          skype.JPG

          這東西很適合我們這些北漂專門用來給家里打長途:

          1. 地點固定,我都是周末的晚上在家往老家打電話,肯定是在電腦前的
          2. 因為Skype不分本地長途,用來打長途更體現優勢
          3. 通話時間長,我一般一周打一次,每次30分鐘左右,就更更體現優勢了


          不適合打本地電話:

          1. 撥打的地點都是不可預期的,總不能要電話了,還得把電腦打開、上網
          2. 上班的時候倒是都在電腦前,但可以用公司的座機嘛,免費的
          3. 省錢的優勢不明顯:移動2.5;固話2.2角(管前三分鐘),之后1.1



          Sample: 每月往家打100分鐘(一周一次,每次25分鐘)
          ?? Skype=100*0.075+3=10.5元
          ?? 手機9點前=100*0.35=35元
          ?? 手機9點后=100*0.22=22元

          posted @ 2009-02-27 13:52 Jcat 閱讀(378) | 評論 (0)編輯 收藏
          基金的買賣時間和大盤一樣,但是網上一般可以隨時下單;如果是閉盤時間下的單,就順延到下一個開盤日購買。

          今天看到的基金凈值,其實是昨天的值。
          今天購買的基金,其凈值明天才能看見。

          下午3點以前購買基金,算作今天購買;3點以后,算作明天購買,即凈值要在后天才能看見。

          基金管理費:一般為1%左右,每天根據資產總額提取,凈值是已經提取了管理費和托管費后的價格。

          ---------------------------

          基民首先要弄清楚“認購”與“申購”的區別。
          1. 認購是針對新基金而言的,這個時候所認購的基金并不產生份額凈值,成交價以1元面值為基準。
          2. 申購則指在基金成立后,投資者申請購買基金份額的行為。

          無論是認購還是申購,交易時間內投資者可以提交認/申購申請。
          投資者只有在交易日下午3點收盤之前提交申購請求才能在當日生效,并可能成功交易。

          一般來說,投資者在份額發售期內已經正式受理的認購申請不得撤銷。
          對于申購申請,投資者只有在當日 15:00前提交撤銷申請,才能予以撤銷。

          在基金申購的過程中,投資者面臨著一個“未知成交價”的交易風險,這是因為申購價格以當日的基金份額凈值為基準進行計算,而成交當日的基金份額凈值只能在下午3點收盤之后誕生,這個凈值一般會在下一個交易日開始之前公告。

          ------------------------------

          收購費率是有折扣的(根據不同的銀行),如易方達前端申購費率是0.8%,但是如果用廣發卡費率是0.3%,1w元能省50元呢。
          "優惠費率不按金額分檔,持有廣東發展銀行理財通卡的個人投資者的優惠認購費率或申購費率統一為0.3%。"-- From 易方達
          posted @ 2009-02-22 17:18 Jcat 閱讀(453) | 評論 (2)編輯 收藏
          Habit 1: Be Proactive
          Change starts from within, and highly effective people make the decision to improve their lives through the things that they can influence rather than by simply reacting to external forces.

          Habit 2: Begin with the End in Mind
          Develop a principle-centered personal mission statement. Extend the mission statement into long-term goals based on personal principles.

          Habit 3: Put First Things First
          Spend time doing what fits into your personal mission, observing the proper balance between production and building production capacity. Identify the key roles that you take on in life, and make time for each of them.

          Habit 4: Think Win/Win
          Seek agreements and relationships that are mutually beneficial. In cases where a "win/win" deal cannot be achieved, accept the fact that agreeing to make "no deal" may be the best alternative. In developing an organizational culture, be sure to reward win/win behavior among employees and avoid inadvertantly rewarding win/lose behavior.

          Habit 5: Seek First to Understand, Then to Be Understood
          First seek to understand the other person, and only then try to be understood. Stephen Covey presents this habit as the most important principle of interpersonal relations. Effective listening is not simply echoing what the other person has said through the lens of one's own experience. Rather, it is putting oneself in the perspective of the other person, listening empathically for both feeling and meaning.

          Habit 6: Synergize
          Through trustful communication, find ways to leverage individual differences to create a whole that is greater than the sum of the parts. Through mutual trust and understanding, one often can solve conflicts and find a better solution than would have been obtained through either person's own solution.

          Habit 7: Sharpen the Saw
          Take time out from production to build production capacity through personal renewal of the physical, mental, social/emotional, and spiritual dimensions. Maintain a balance among these dimensions.

          ?

          posted @ 2008-12-25 16:35 Jcat 閱讀(335) | 評論 (0)編輯 收藏
          很多時候,在我們進行數據庫操作時,比如drop user,drop table等,經常會遇到這樣的錯誤:
          ORA-00604: error occurred at recursive SQL level 1 .

          關于Recursive SQL錯誤:
          我們知道,當我們發出一條簡單的命令以后,Oracle數據庫要在后臺解析這條命令,并轉換為Oracle數據庫的一系列后臺操作,這些后臺操作統稱為遞歸SQL。
          比如create table這樣一條簡單的DDL命令,Oracle數據庫在后臺,實際上要把這個命令轉換為對于obj$,tab$,col$等底層表的插入操作。Oracle所作的工作可能比我們有時候想的要復雜的多.。

          所以對于這樣的提示,很多時候是沒有絲毫用處的。

          這時,我們需要更詳細的信息,sql_trace就是一個好辦法。
          sql_trace實際上就是Oracle內部事件10046的第一個級別,即level=1。通過event 10046, 我們可以得到詳細的數據庫會話的信息,每個會話究竟在干什么,在等什么。通過對這個事件的學習,我們可以深入的理解和調整Oracle。


          結合eygle的文章整理的,SQL Trace更詳細的用法請見原文


          ----------

          Event 10046是oracle用于系統性能分析時的一個最重要的事件。當激活這個事件后,將通知oracle kernel追蹤會話的相關即時信息,并寫入到相應trace文件中。這些有用的信息主要包括sql是如何進行解析,綁定變量的使用情況,話中發生的等待事件等。
          Trace文件將會存放在 user_dump_dest 所指向的目錄,如,C:\ent\oracle\admin\o10g01\udump

          Event 10046可分成不同的級別(level),分別追蹤記錄不同程度的有用信息。對于這些不同的級別,應當注意的是向下兼容的,即高一級的trace信息包含低于此級的所有信息。
          ??? level 1:跟蹤sql語句,包括解析、執行、提取、提交和回滾等。
          ??? level 4:包括變量的詳細信息
          ??? level 8:包括等待事件
          ??? level 12:包括綁定變量與等待事件
          其中,level 1相當于打開了sql_trace。

          在當前會話啟用event,可以利用alter session + 事件名稱 + level:
          SQL> alter session set event ‘10046 trace name context forever, level 12’;

          關閉當前會話的event:
          SQL> alter session set event ‘10046 trace name context off’;

          這里應當值得一提的是,TRACE將消耗相當的系統資源,因此我們在使用TRACE的時候應當慎重。對于正式的系統,應當只在必要的時候進行TRACE操作,并且應當及時關閉。
          posted @ 2008-12-19 15:19 Jcat 閱讀(263) | 評論 (0)編輯 收藏
          孫悅和菲爾.jpg
          湖人vs雄鹿,第四節垃圾時間,孫悅終于替補出場。

          孫悅失誤了隊友安慰他.jpg
          上來就3個犯規,1個運球失誤,顯得很緊張,身體僵硬。又失誤了,隊友安慰他。
          然后1個三分的機會,沒進,動作很僵硬。

          孫悅投進NBA第一球.jpg
          終于有個中距離的機會,孫悅投中了,全場鼓掌!
          后來又有一個反擊的機會,孫悅籃下打板進了,繼續鼓掌!


          恭賀菜鳥的第一次NBA亮相!
          posted @ 2008-12-08 13:07 Jcat 閱讀(303) | 評論 (1)編輯 收藏
          2008

          11-25 XX is a brilliant scientist.

          11-26 She used to knit her brows when meeting with a difficult problem.

          11-27 The tea bubbled in the pot.

          11-28 I budgeted for a daily expenditure of 15 dollars.

          11-29 The elephant lowered its huge bulk.

          11-30 She bumped her arm against the door.

          12-1 He has lost the bunch of keys and cannot unlock the door.

          12-2 We collected a bundle of old clothes to be given to them.

          12-3 He has found a job in the Washington Bureau of the Associated Press.

          12-4 Whenever I have to stand up to make a speech, I get butterflies in my stomach.

          12-5 How much does it cost for the first cabin.

          12-6 Put all these documents into a filing cabinet.

          12-7 The messages have come by cable.

          12-8 He has calculated the advantage and disadvantage before making the decision.

          12-9 The calendar shows that Christmas will fall on a Monday.

          12-10 He announced that he would campaign for the senate.

          12-11 The Princeton campus has developed into one of the most attractive school in the USA.

          終于還是沒堅持下來,看來堅持不懈做一件很小的事也是很難的。



          posted @ 2008-12-03 12:07 Jcat 閱讀(300) | 評論 (0)編輯 收藏
          Oracle Database的大版本號由兩部分組成:數字+字母,數字自然是大版本號,字母則是代表了這個版本的“中心思想”

          8i(1998),9i(2001):那時候正好互聯網興起,i就代表internet(網絡)

          10g(2003),11g(2007):現在主推分布式計算,g就代表grid(網格)



          另外,還有個11i,這容易引起混淆,其實11i是指Oracle EBS(E-Business Suite電子商務套件)的版本號,其實就是Oracle ERP。(這好像跟Oracle Database沒什么必然聯系,我也不知道這個i代表什么)

          這也說明Oracle不等于Oracle Database。平常我們說“Oracle”,一般都是指Oracle Database,當然這是它最著名的產品;不過,其實Oracle早就已經不是一家數據庫廠商了,而是航母級廠商,東收西購,啥都有了。


          我見過這樣的問題:“
          從版本命名來看8i-9i-10g-11i,是不是意味著grid只是曇花一現?”顯然這就是混淆了Oracle Database和Oracle ERP。



          ----以下是一些參考----
          In 1998, Oracle announced Oracle8i, which is sometimes referred to as Version 8.1 of the Oracle8 database. The i was added to denote added functionality supporting Internet deployment in the new version. Oracle9i followed, with Application Server available in 2000 and Database Server in 2001.

          Oracle Database 10g was introduced in 2003; the g denotes Oracle's focus on emerging grid deployment models.

          Oracle 11i refers to the Oracle ERP Application Suite (often called Oracle E-Business Suite) and really has nothing to do with the database. The latest release (12) will be referred to as 12i. The confusing part is that Oracle used to call its database "i" for "internet" in releases 8 and 9, but now calls the database "g" for "grid". So, to summarize, Oracle 11i refers to the apps and Oracle 11g refers to the database




          posted @ 2008-11-17 22:32 Jcat 閱讀(1353) | 評論 (1)編輯 收藏
          Groovy把最常用的東西都設置成default了,經常可以省這省那的(比如括號、分號、public等);又加上閉包,初學的時候,有些代碼,一眼望去,都分不清是方法、是類、還是閉包。
          這里先簡單總結一下常用的修飾符。

          package?jcat.bit.g

          /*
          修飾符有三類:
          1.?static
          2.?作用域:public(默認),?private,?protected.
          3.?類型:def(默認,動態),?void(無類型,靜態),?其它常規靜態類型
          */
          class?Test?{
          ????
          static?def?a_static_def?=?'a_static_def'
          ????
          static?a_static?=?'a_static'
          ????def?a_def?
          =?'a_def'

          ????
          static?void?main(strs)?{
          ????????println?a_static_def
          ????????println?a_static

          ????????println?t_static_def()
          ????????println?t_static()


          ????????
          new?Test().with?{
          ????????????println?a_def

          ????????????println?t_public_def()
          ????????????println?t_public()
          ????????????println?t_def()
          ????????}
          ????}

          ????
          static?def?t_static_def()?{?//?def?=?可以返回任何類型,包括void
          ????????return?"t_static_def"
          ????}

          ????
          static?t_static()?{?//?有其它修飾符可以省略def(默認public?+?def
          ????????return?"t_static"
          ????}

          ????
          public?def?t_public_def()?{
          ????????
          return?"t_public_def"
          ????}

          ????
          public?t_public()?{?//?默認def
          ????????return?"t_public"
          ????}

          ????def?t_def()?{?
          //?至少要有一個修飾符,所以這個def不能省略;?且默認public
          ????????return?"t_def"
          ????}

          ????
          static?void?t_static_void()?{
          ????????
          //return?"t_static_void"????//?cannot?return?an?object?from?a?method?that?returns?"void"
          ????}
          }
          posted @ 2008-11-10 12:30 Jcat 閱讀(1454) | 評論 (0)編輯 收藏

          用JDBC操作數據庫,對比一下Java和Groovy。

          環境:SQL Server 2000 (記得打補丁SP4,不然JDBC訪問會報錯)
          JDBC Driver:msbase.jar,mssqlserver.jar,msutil.jar

          Java版

          package ?jcat.bit.java;

          import ?java.sql. * ;

          public ? class ?JDBC?{
          ????
          public ? static ? void ?main(String[]?args)? throws ?ClassNotFoundException,?SQLException?{
          ????????Class.forName(
          " com.microsoft.jdbc.sqlserver.SQLServerDriver " );
          ????????Connection?conn?
          = ?DriverManager.getConnection(
          ????????????????
          " jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs " ,
          ????????????????
          " sa " ,? "*** " );

          ????????Statement?stmt?
          = ?conn.createStatement();
          ????????ResultSet?rs?
          = ?stmt.executeQuery( " select?top?10?*?from?authors " );

          ????????
          while ?(rs.next())?{
          ????????????System.out.println(rs.getString(
          2 ) + " ? " + rs.getString( 3
          ));??//?數id
          ????????}


          ????????rs.close();
          ????????stmt.close();
          ????????conn.close();

          ????}
          }



          Groovy版
          package?jcat.bit.groovy

          import?groovy.sql.Sql

          class?JDBC?{
          ????
          static?void?main(args)?{
          ????????Sql?sql?
          =?Sql.newInstance(
          ????????????????
          "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs",
          ????????????????
          "sa",?"***",
          ????????????????
          "com.microsoft.jdbc.sqlserver.SQLServerDriver")
          ????????sql.eachRow(
          "select?top?10?*?from?authors")?{row?->
          ????????????println?row.au_fname?
          +?"?"?+?row.au_lname????//直接用數據庫的字段名就可以操作結果集了,不用去數id
          ????????}

          ????}
          }


          總結
          1. 建立查詢,差別不大,都是JDBC那一套;Groovy不用處理異常
          2. 處理查詢結果,Groovy因為有閉包,處理這些迭代問題很方便
          3. Groovy不用關閉
          posted @ 2008-11-07 15:02 Jcat 閱讀(1684) | 評論 (3)編輯 收藏
          僅列出標題
          共17頁: 上一頁 1 2 3 4 5 6 7 8 9 下一頁 Last 
          主站蜘蛛池模板: 吴桥县| 长沙县| 黑河市| 什邡市| 微山县| 绍兴市| 拜城县| 郸城县| 台南县| 鄂托克前旗| 龙海市| 兴安县| 渭源县| 鄯善县| 海淀区| 砚山县| 左贡县| 柞水县| 饶平县| 将乐县| 吕梁市| 通江县| 江源县| 汉源县| 宁化县| 宁南县| 二连浩特市| 视频| 开江县| 梨树县| 威海市| 赤水市| 嘉义市| 门头沟区| 兴国县| 即墨市| 开平市| 高州市| 崇阳县| 志丹县| 绵竹市|