Jcat
宠辱不惊,闲看庭前花开花落~~
posts - 173,comments - 67,trackbacks - 0
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 阅读(765) | 评论 (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 阅读(344) | 评论 (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 阅读(408) | 评论 (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 阅读(301) | 评论 (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 阅读(236) | 评论 (0)编辑 收藏
孙悦和菲尔.jpg
湖人vs雄鹿,第四节垃圾时间,孙悦终于替补出场。

孙悦失误了队友安慰他.jpg
上来就3个犯规,1个运球失误,显得很紧张,身体僵硬。又失误了,队友安慰他。
然后1个三分的机会,没进,动作很僵硬。

孙悦投进NBA第一球.jpg
终于有个中距离的机会,孙悦投中了,全场鼓掌!
后来又有一个反击的机会,孙悦篮下打板进了,继续鼓掌!


恭贺菜鸟的第一次NBA亮相!
posted @ 2008-12-08 13:07 Jcat 阅读(269) | 评论 (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 阅读(258) | 评论 (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 阅读(1324) | 评论 (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 阅读(1423) | 评论 (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 阅读(1654) | 评论 (3)编辑 收藏
仅列出标题
共17页: 上一页 1 2 3 4 5 6 7 8 9 下一页 Last