標籤

4GL (1) 人才發展 (10) 人物 (3) 太陽能 (4) 心理 (3) 心靈 (10) 文學 (31) 生活常識 (14) 光學 (1) 名句 (10) 即時通訊軟體 (2) 奇狐 (2) 爬蟲 (1) 音樂 (2) 產業 (5) 郭語錄 (3) 無聊 (3) 統計 (4) 新聞 (1) 經濟學 (1) 經營管理 (42) 解析度 (1) 遊戲 (5) 電學 (1) 網管 (10) 廣告 (1) 數學 (1) 機率 (1) 雜趣 (1) 證券 (4) 證券期貨 (1) ABAP (15) AD (1) agentflow (4) AJAX (1) Android (1) AnyChart (1) Apache (14) BASIS (4) BDL (1) C# (1) Church (1) CIE (1) CO (38) Converter (1) cron (1) CSS (23) DMS (1) DVD (1) Eclipse (1) English (1) excel (5) Exchange (4) Failover (1) Fedora (1) FI (57) File Transfer (1) Firefox (3) FM (2) fourjs (1) Genero (1) gladiatus (1) google (1) Google Maps API (2) grep (1) Grub (1) HR (2) html (23) HTS (8) IE (1) IE 8 (1) IIS (1) IMAP (3) Internet Explorer (1) java (4) JavaScript (22) jQuery (6) JSON (1) K3b (1) ldd (1) LED (3) Linux (117) Linux Mint (4) Load Balance (1) Microsoft (2) MIS (2) MM (51) MSSQL (1) MySQL (27) Network (1) NFS (1) Office (1) OpenSSL (1) Oracle (126) Outlook (3) PDF (6) Perl (60) PHP (33) PL/SQL (1) PL/SQL Developer (1) PM (3) Postfix (2) postfwd (1) PostgreSQL (1) PP (50) python (5) QM (1) Red Hat (4) Reporting Service (28) ruby (11) SAP (234) scp (1) SD (16) sed (1) Selenium (3) Selenium-WebDriver (5) shell (5) SQL (4) SQL server (8) sqlplus (1) SQuirreL SQL Client (1) SSH (2) SWOT (3) Symantec (2) T-SQL (7) Tera Term (2) tip (1) tiptop (24) Tomcat (6) Trouble Shooting (1) Tuning (5) Ubuntu (37) ufw (1) utf-8 (1) VIM (11) Virtual Machine (2) VirtualBox (1) vnc (3) Web Service (2) wget (1) Windows (19) Windows (1) WM (6) Xvfb (2) youtube (1) yum (2)

2013年7月27日 星期六

不能用的三種人


不能用的三種人

不能用的三種人
在我長期的工作經驗中,我最怕遇到三種人:笨、慢、懶,這三種人被我列為三不用,因為團隊中只要有這三種人,輕則降低了整個團隊的工作節奏,嚴重的則會損害組織整體的工作成果。只要有這三種人,要不就改變他們,要不就趕走他們。

第 一種人--笨,是情節最輕的,這種人最明顯的劇情是:被動,你交代什麼事,他就做什麼,而且通常是用最低的標準來完成。剛開始我還不敢把這種人列為不能用 的範圍,因為人有賢愚,智商有高低,我們怎能嫌棄智商較差的人呢?但經過仔細的觀察,這種人通常不是真的笨,他們在很多其他地方是聰明的,只有在工作上 笨,或者應該說是「裝笨」,因為聰明的工作者是自我麻煩,在組織上會越來越忙。這種人的「笨」,是因為不肯花心思在工作上,不具研究精神,不想把事情做 好,最後因為態度的消極而變成主管眼中的「笨蛋」!

第二種人--慢,表面的問題也很輕微,因為他做事往往慢一拍,通常無法按照你的期待完成任務。 剛開始我也一樣,有人急如烈火,有人後後而來。更何況,慢還有一種正向的解釋,那就是「慢工出細活」、「忙中會有錯」,凡事仔細思考之後,才能一步步穩當 的把事情做好。我眼中慢的人通常會用這種理由來告訴我,不應急、不能急,要慢慢來!但長期下來,我終於能分辨:因深思熟慮而慢,還是本質上,習慣性的慢的 差異。深思熟慮的人,必要的時候,節奏是可以快的,而習慣性的慢,是無可救藥的拖延,往往要別人更多的時間才能完成,這種習慣性的慢,就不是我能忍受的。

至 於第三種人--懶,則是毫無爭議不可用的人,這種人最明顯的特徵是:多一事不如少一事,基本上是不做事的人。而一旦被逼得一定要做事,他們通常會用最低的 標準來完成。而且最嚴重的是:他們會盡其可能的簡化工作方法,簡化工作流程,甚至不惜犧牲品質,目的只有一個--要減輕自己的工作量,減輕自己的付出。 「懶」只是這種人的表徵,其實所有的問題來自他內心的工作態度的不正確,想用最少的投入,得到最大的工作成果。這是投機取巧、好逸惡勞的人。這種人當然是 我絕對不能忍受的人。

當我仔細分辨出這三種人之後,其實這三種人根本是一種人,所有的根源都是「懶」,因為第一種「笨」,其實是因為他懶,所以變 笨,因為懶,所以不肯多想、不肯多學,所以長期下來就變成什麼都不會的人。第二種「慢」,其實也是因為「懶」,所以任何事快不起來,只不過拿深思熟慮來搪 塞而已。遠離笨、慢、懶,變成我挑選部屬的重要原則。只不過這三項通常在面試時,看不出來;只有在時間印證,要仔細分辨才能體會!

文/何飛鵬

企業里的三種人:人手,人才,人物

【企業里的三種人:人手,人才,人物】

1)人手就是安排什麼做什麼,不安排絕對不做,等著下命令的人;

2)人才就是每天發自內心做事,為公司操心的 人;

3)人物就是全神投入,用靈魂做事,必須要和老闆一起做一番事業的人;

4)企業倒閉靠人手;

5)企業發展靠人才;

6)企業做大靠人物!

企業要用三種人

企業要用三種人:一是震山的虎,二是拉磨的驢,三是忠誠的狗。

企業靠震山的虎去樹立企業形象和品牌,靠拉磨的驢去創造利潤,靠忠誠的狗去搞監督。

應該先拴狗,後養虎,再餵驢。如果用不好就會:逼走震山的虎,攆走拉磨的驢,餓死忠誠的狗。
  
在民營企業中:如果你是震山的虎,那你就得“虎假狐威”(這個狐是老板);如果你是拉磨的驢,那你就吃飽了拼命再去拉;如果你是忠誠的狗,那你就是狗眼看人——只有一個是主人,其余是小偷。

張亞勤:企業不要的三種人

 “那麼哪三種人我們不要呢,
第一種把他叫作負面人,對於什麼事兒都持予否定的這種態度,怨天怨地,負能量我們講,正能量恰恰相反,那麼正能量可以傳染, 這個負能量啊傳染速度更快;
第二種呢,是我們講的雙面人,就是每件事兒他會有各種各樣的版本,喜歡玩辦公室政治,到處説各種閒話,讓大家都不安寧,這種人 趕快讓他走了,最好不要;
第三種人是玩世不恭的,就是對什麼事兒都沒有激情,你公司或者産業有什麼很激動人心的一些進展和他沒關係。”

——微軟副總裁張亞 勤

2013年7月17日 星期三

Reporting Service, 32 bit 64 bit, BadImageException, Oracle Client

今天寫了一支Reporting Service 程式,在Windows 2008 R2 64 bit 上面。install了Oracle client 32 bit and 64 bit,但是在BI Management Sudio上面,可以抓到32 bit,傳上Reporting Server後,就是會出現BadImageException,說什麼32 bit 64 bit...

後來想到用ODBC,結果ODBC也有問題,後來才知道ODBC在64 bit server上有32 bit and 64 bit ODBC :

Use this ODBC Manager to Review 64-Bit Data Source Names
c:\windows\system32\odbcad32.exe
Use this ODBC Manager to Review 32-Bit Data Source Names
c:\windows\sysWOW64\odbcad32.exe

後來 進入 c:\windows\sysWOW64\odbcad32.exe,設定ODBC後傳上reporting server才能跑...

2013年7月14日 星期日

Oracle 12c TOP-N SQL

http://www.oracle-base.com/articles/12c/row-limiting-clause-for-top-n-queries-12cr1.php

Introduction

A Top-N query is used to retrieve the top or bottom N rows from an ordered set. Combining two Top-N queries gives you the ability to page through an ordered set. This concept is not a new one. In fact, Oracle already provides multiple ways to perform Top-N queries, as discussed here. These methods work fine, but they look rather complicated compared to the methods provided by other database engines. For example, MySQL uses a LIMIT clause to page through an ordered result set.
SELECT * 
FROM   my_table 
ORDER BY column_1
LIMIT 0 , 40
Oracle 12c has introduced the row limiting clause to simplify Top-N queries and paging through ordered result sets.

Setup

To be consistent, we will use the same example table used in the Top-N Queries article.
Create and populate a test table.
DROP TABLE rownum_order_test;

CREATE TABLE rownum_order_test (
  val  NUMBER
);

INSERT ALL
  INTO rownum_order_test
  INTO rownum_order_test
SELECT level
FROM   dual
CONNECT BY level <= 10;

COMMIT;
The following query shows we have 20 rows with 10 distinct values.
SELECT val
FROM   rownum_order_test
ORDER BY val;

       VAL
----------
         1
         1
         2
         2
         3
         3
         4
         4
         5
         5
         6

       VAL
----------
         6
         7
         7
         8
         8
         9
         9
        10
        10

20 rows selected.

SQL>

Top-N Queries

The syntax for the row limiting clause looks a little complicated at first glance.
[ OFFSET offset { ROW | ROWS } ]
[ FETCH { FIRST | NEXT } [ { rowcount | percent PERCENT } ]
    { ROW | ROWS } { ONLY | WITH TIES } ]
Actually, for the classic Top-N query it is very simple. The example below returns the 5 largest values from an ordered set. Using the ONLY clause limits the number of rows returned to the exact number requested.
SELECT val
FROM   rownum_order_test
ORDER BY val DESC
FETCH FIRST 5 ROWS ONLY;

       VAL
----------
        10
        10
         9
         9
         8

5 rows selected.

SQL>
Using the WITH TIES clause may result in more rows being returned if multiple rows match the value of the Nth row. In this case the 5th row has the value "8", but there are two rows that tie for 5th place, so both are returned.
SELECT val
FROM   rownum_order_test
ORDER BY val DESC
FETCH FIRST 5 ROWS WITH TIES;

       VAL
----------
        10
        10
         9
         9
         8
         8

6 rows selected.

SQL>
In addition to limiting by row count, the row limiting clause also allows us to limit by percentage of rows. The following query returns the bottom 20% of rows.
SELECT val
FROM   rownum_order_test
ORDER BY val
FETCH FIRST 20 PERCENT ROWS ONLY;

       VAL
----------
         1
         1
         2
         2

4 rows selected.

SQL>

Paging Through Data

Paging through an ordered resultset was a little annoying using the classic Top-N query approach, as it required two Top-N queries, one nested inside the other. For example, if we wanted the second block of 4 rows we might do the following.
SELECT val
FROM   (SELECT val, rownum AS rnum
        FROM   (SELECT val
                FROM   rownum_order_test
                ORDER BY val)
        WHERE rownum <= 8)
WHERE  rnum >= 5;

       VAL
----------
         3
         3
         4
         4

4 rows selected.

SQL>
With the row limiting clause we can achieve the same result using the following query.
SELECT val
FROM   rownum_order_test
ORDER BY val
OFFSET 4 ROWS FETCH NEXT 4 ROWS ONLY;

       VAL
----------
         3
         3
         4
         4

4 rows selected.

SQL>
The starting point for the FETCH is OFFSET+1.
The OFFSET is always based on a number of rows, but this can be combined with a FETCH using a PERCENT.
SELECT val
FROM   rownum_order_test
ORDER BY val
OFFSET 4 ROWS FETCH NEXT 20 PERCENT ROWS ONLY;

       VAL
----------
         3
         3
         4
         4

4 rows selected.

SQL>
Not surprisingly, the offset, rowcount and percent can, and probably should, be bind variables.
VARIABLE v_offset NUMBER;
VARIABLE v_next NUMBER;

BEGIN
  :v_offset := 4;
  :v_next   := 4;
END;
/

SELECT val
FROM   rownum_order_test
ORDER BY val
OFFSET :v_offset ROWS FETCH NEXT :v_next ROWS ONLY;

       VAL
----------
         3
         3
         4
         4

SQL>

Extra Information

  • The keywords ROW and ROWS can be used interchangeably, as can the FIRST and NEXT keywords. Pick the ones that scan best when reading the SQL like a sentence.
  • If the offset is not specified it is assumed to be 0.
  • Negative values for the offset, rowcount or percent are treated as 0.
  • Null values for offset, rowcount or percent result in no rows being returned.
  • Fractional portions of offset, rowcount or percent are truncated.
  • If the offset is greater than or equal to the total number of rows in the set, no rows are returned.
  • If the rowcount or percent are greater than the total number of rows after the offset, all rows are returned.
  • The row limiting clause can not be used with the FOR UPDATE clause, CURRVAL and NEXTVAL sequence pseudocolumns or in an fast refresh materialized view.
For more information see:

2013年7月12日 星期五

Oracle Pipelined Table Functions

http://www.oracle-base.com/articles/misc/pipelined-table-functions.php

由於pipleline table function相對於table function,不用大量記憶體 ,所以執行速度也較快。這在文章後面有提到

Table Functions

-- Create the types to support the table function.
DROP TYPE t_tf_tab;
DROP TYPE t_tf_row;

CREATE TYPE t_tf_row AS OBJECT (
  id           NUMBER,
  description  VARCHAR2(50)
);
/

CREATE TYPE t_tf_tab IS TABLE OF t_tf_row;
/

-- Build the table function itself.
CREATE OR REPLACE FUNCTION get_tab_tf (p_rows IN NUMBER) RETURN t_tf_tab AS
  l_tab  t_tf_tab := t_tf_tab();
BEGIN
  FOR i IN 1 .. p_rows LOOP
    l_tab.extend;
    l_tab(l_tab.last) := t_tf_row(i, 'Description for ' || i);
  END LOOP;

  RETURN l_tab;
END;
/

-- Test it.
SELECT *
FROM   TABLE(get_tab_tf(10))
ORDER BY id DESC;

        ID DESCRIPTION
---------- --------------------------------------------------
        10 Description for 10
         9 Description for 9
         8 Description for 8
         7 Description for 7
         6 Description for 6
         5 Description for 5
         4 Description for 4
         3 Description for 3
         2 Description for 2
         1 Description for 1

10 rows selected.

SQL>
 
 
------------------------------------------------------------------
 

Pipelined Table Functions

 
-- Build a pipelined table function.
CREATE OR REPLACE FUNCTION get_tab_ptf (p_rows IN NUMBER) RETURN t_tf_tab PIPELINED AS
BEGIN
  FOR i IN 1 .. p_rows LOOP
    PIPE ROW(t_tf_row(i, 'Description for ' || i));   
  END LOOP;

  RETURN;
END;
/

-- Test it.
SELECT *
FROM   TABLE(get_tab_ptf(10))
ORDER BY id DESC;

        ID DESCRIPTION
---------- --------------------------------------------------
        10 Description for 10
         9 Description for 9
         8 Description for 8
         7 Description for 7
         6 Description for 6
         5 Description for 5
         4 Description for 4
         3 Description for 3
         2 Description for 2
         1 Description for 1

10 rows selected.

SQL>
 

Oracle Linux 6 How-to Enable the Yum Repository

http://tutorialforlinux.com/2011/05/oracle-linux-6-enable-yum-repository/

On Oracle Linux 6 Repositories aren’t Enabled by Default…
If you wish to make Easier Installation of Dependencies you need to Enable the Repository for Yum.
  1. Download the Repository file
    su -
    cd /etc/yum.repos.d
    wget http://public-yum.oracle.com/public-yum-ol6.repo
  2. Enable the Repository
    nano public-yum-ol6.repo
    Change “enabled=0″ to “enabled=1″
    Now you are Ready 4 Yum on OL6 :)
The Secret YUM Guide:
Good Luck!

Oracle Linux 6 set up yum repository

http://sa-oracle.snapdedo.com/2012/05/oracle-linux-6-set-up-yum-repository.html




Oracle Linux 6 set up yum repository

Video Demo:
Oracle Linux has multiple ways for you to download the latest packages. One of the easiest ways to get the updates and packages you require from Oracle is the Oracle Linux yum repository. This repository has the latest patches oracle-asm libs and ocfs2 libs available and is freely available.
Oracle charges for support and not the Linux software itself. If you are working with a test area then Oracle yum repository is exactly what you need. Oracle comes built on top of a Red Hat Kernel but Oracle overlays its own UEK kernel for tighter integration with Oracle products.
Steps to Install and test yum configuration.
cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo
download_yum_repo
vi public-yum-ol6.repo
Verify that the latest is enabled by checking the “enabled” flag is set to 1 on the first entry “ol6_Latest”.
verified_latest_enabled
(optional) If you are using the UEK kernel you can enable the latest UEK kernel and UEK base repositories. I would recommend just leaving latest so as not to get beta UEK versions.
I’m not currently running UEK version due to driver incompatibles in certain rdac multi-pathing drivers and vmware issues. So I will skip this step.
verified_latest_kernel_enabled
After verifying all repositories are enabled run a check.
yum list
A list of the Linux packages in the repositories you have selected should come back.
yum-list
Run a test by installing Firefox
I recommend using Firefox as a Linux browser since it will be the most supported browser for Linux.
yum install Firefox
Agree to install, or if Firefox is already installed, it will say nothing to be done.
yum-install-firefox
I recommend install the gcc, kernel-headers and kernel-devel for modules which require kernel headers.
yum install kernel-uek-headers kernel-uek-devel, gcc

update your current packages
yum update
Agree to install.
update_system
(optional) Install sendmail packages. This is just a personal preference of mine to allow maintenance scripts easy access to mail. I put it here simply because it does not warrant a separate set up tutorial.
yum install sendmail
Agree to install
yum-install-sendmail
(optional) If you don’t have direct access to the server it would be wise to also install a vncserver.
yum install tigervnc tigervnc-server-module tigervnc-server
tigervnc
(optional) Install nmap for easy network testing
yum install nmap
(optional) Install vsftpd for ease of file transfer with secure ftp
yum install vsftpd

yum install net-snmp
yum install net-snmp-utils

Setting up Oracle Linux 6 with public-yum for all updates

https://blogs.oracle.com/wim/entry/setting_up_oracle_linux_6

Setting up Oracle Linux 6 with public-yum for all updates

I just wanted to give you a quick example on how to get started with Oracle Linux 6 and start using the updates we published on http://public-yum.oracle.com.
  • Download Oracle Linux (without the requirement of a support subscription) from http://edelivery.oracle.com/linux.
  • Install Oracle Linux from the ISO or DVD image
  • Log in as user root
  • Download the yum repo file from http://public-yum.oracle.com

    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-ol6.repo
    
  • If you want, you can edit the repo file and enable other repositories, I enabled [ol6_UEK_latest] by just setting enabled=1 in the file with a text editor.
  • Run yum repolist to show the registered channels and you see we are including everything including the latest published RPMs.
    Now you can just run yum update and any time we release new security errata or bugfix errata for OL6, they will be posted and you will automatically get them. It's very easy, very convenient and actually very cool. We do a lot more than just build OL RPMs and distribute them, we have a very comprehensive test farm where we test the packages extensively.
  • 在SAP Service Market Place 申請 Developer access key