Lưu trữ cho 2

Oracle table case-sensitive

Table in-case-sensitive

SELECT * FROM myusers

Table case-sensitive

select table_name from user_tables where table_name='MYUSERS';

OpenOffice và Java

Cài đặt service trên Windows:

soffice -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager

Kiểm tra cổng TCP mở trên Windows:

netstat -anp tcp hoặc netstat -an | find "8100"

Cài đặt trên Linux

/user/local/oo2/program/soffice -accept="socket,port=8100;urp;StarOffice.ServiceManager" -display :1.0

Kiểm tra cổng trên Linux:

netstat -an | grep 8100

Thư viện cần dùng

dom4j-1.4.jar
jooconverter.jar
jootemplates.jar
juh.jar
jurt.jar
ognl-2.6.5.jar
ridl.jar
sandbox.jar
unoil.jar
xerces-2.6.2.jar
xstream-1.0.1.jar

Servlet mẫu:

package net.phpvietnam.java;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.joott.uno.DocumentConverter;
import net.sf.joott.uno.DocumentConverterFactory;
import net.sf.joott.uno.DocumentFormat;

/**
 * Servlet implementation class for Servlet: PDFServlet
 *
 * @web.servlet name = "PDFServlet"
 * @web.servlet-mapping url-pattern = "/PDFServlet"
 *
 */
public class PDFServlet extends HttpServlet {

  /*
   * (non-Java-doc)
   *
   * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request,
   *    HttpServletResponse response)
   */
  protected void doGet(HttpServletRequest request,
      HttpServletResponse response) throws ServletException, IOException {
    System.out.println("Servlet.Start.");
    String fileName = request.getParameter("file");

    try {
      String inputPath = this.getServletContext().getRealPath("/WEB-INF/" + fileName);
      System.out.println(inputPath);
      File inputFile = new File(inputPath);

      String outputPath0 = "/WEB-INF/output.pdf"
          + Thread.currentThread().getId();
      String outputPath = getServletContext().getRealPath(outputPath0);
      File outputFile = new File(outputPath);
      System.out.println(outputPath);

      DocumentConverter converter = DocumentConverterFactory.getConverter();

      try {
            converter.convert(inputFile, outputFile,
            DocumentFormat.PDF_WRITER);
      } catch (IOException e) {
        e.printStackTrace();
      }

      response.setHeader("Cache-Control", "");
      response.setHeader("Pragma", "");
      response.setContentType(DocumentFormat.PDF_WRITER.getMimeType());
      FileInputStream in = new FileInputStream(outputFile);
      OutputStream os = response.getOutputStream();
      byte[] buffer = new byte[2048];
      int bytes;

      while ((bytes = in.read(buffer, 0, 2048)) != -1) {
        os.write(buffer, 0, bytes);
      }
      in.close();
      os.close();
      outputFile.delete();

    } catch (Exception e) {

      e.printStackTrace();
    }

    System.out.println("Servlet.End.");

  }

}

Khắc phục xung đột cổng trên Windows

Liệt kê danh sách các cổng đang mở:

netstat -a -o -n

Xác định số hiệu của tiến trình mở cổng 80 (hay xxx) và

TASKLIST /FI "PID eq 332" (332 là số PID)

Kill một tiến trình:

TASKKILL /PID 332

Oracle’s REPLACE

Chương trình mailing đột nhiên ngừng chạy. Thì ra hồi tháng 7 mình có patch đoạn convert kí tự đặc biệt về html printable khiến cho các email trở nên có định dạng “”"Phan Huong”"<phan@xxx.com>”

Biểu thức đại diện vẫn match đây là email nhưng đem chuỗi này làm chỉ mục để match với thông tin cấu hình mà hôm nay code vào thì die soon. Buồn là có đến 1700+ thư bị kiểu này kể từ bản patch hồi tháng 7 mà không test.

Oracle REPLACE là cứu cánh.

UPDATE pdf_requests
SET reply_to = REPLACE(reply_to, '"', '"')
where reply_to like '"%'


UPDATE pdf_requests
SET reply_to = REPLACE(reply_to, '<', '<')
where reply_to like '%<%'


UPDATE pdf_requests
SET reply_to = REPLACE(reply_to, '>', '>')
where reply_to like '%>%'

CFA- Chartered Financial Analyst

Trang web chính: http://cfainstitute.org/
CFA là chứng chỉ cao nhất về đầu tư tài chính (được xếp vào dạng Professional Qualifications)
CFA có 3 level, được thiết kế để hoàn tất trong 3 năm. Tuy nhiên trung bình trên thế giới thời gian để qualify CFA là 4 năm
CFA được tổ chức thi như sau:
- Tháng sáu: thi level 1 và 2 và 3 (tại VN là ở HN và HCMC)
- Tháng 12: thi level 1 only (chỉ tổ chức tại Vietnam, HCMC từ năm 2007)
Các kỳ thi của CFA chỉ được sử dụng 2 loại calculator cho phép là Texas Instruments BAII Plus/Pro và Hewlett Packard 12C/12C Platinum
Thi đậu 3 lần lượt 3 kỳ thi và có đủ 3 năm kinh nghiệm trong ngành đầu tư sẽ được cấp chứng chỉ CFA.
Candidate Profile:

Gender:

Male 75%
Female 25%

Age:

21-25 19%
26-30 40%
31-35 24%
36-40 10%
41-45 4%
46-50 2%
51-55 1%

Education:

Bachelor’s degree or higher 96%
Other 4%

Geographic Distribution:

Africa/Middle East 5%
Asia 5%
Canada 9%
China Mainland 7%
Europe 15%
Latin America 2%
Pacific Asia 21%
United States 36%

CFA Candidate Body of Knowledge (CBOK)

I. ETHICAL AND PROFESSIONAL STANDARDS

A. Professional Standards of Practice

B. Topical Issues

II. QUANTITATIVE METHODS

A. Time Value of Money

B. Basic Statistical Concepts

C. Probability Concepts and Random Variables

D. Common Probability Distributions

E. Sampling and Estimation

F. Statistical Inference and Hypothesis Testing

G. Correlation Analysis and Linear Regression

H. Multivariate Regression

I. Time Series Analysis

J. Portfolio Concepts

III. ECONOMICS

A. Market Forces of Supply and Demand

B. Elasticity

C. The Firm and Industry Organization

D. Supply and Demand for Productive Resources

E. Measuring National Income

F. Economic Fluctuations and Unemployment

G. The Monetary System

H. Inflation: Causes and Consequences

I. International Trade

J. International Finance

K. The Macroeconomics of an Open Economy

L. Aggregate Demand and Aggregate Supply

M. Sources of Economic Growth

N. Government Regulation

O. Natural Resource Markets

P. Relationship of Economic Activity to the Investment Process

IV. FINANCIAL STATEMENT ANALYSIS

A. Financial Reporting System

B. Principal Financial Statements

C. Earnings Quality and Nonrecurring Items

D. Analysis of Inventories

E. Analysis of Long-Lived Assets

F. Analysis of Income Taxes

G. Analysis of Financing Liabilities

H. Analysis of Leases

I. Analysis of Off-Balance-Sheet Assets and Liabilities

J. Analysis of Pensions, Stock Compensation, and Other Employee Benefits

K. Analysis of Inter-Corporate Investments

L. Analysis of Business Combinations

M. Analysis of Multinational Operations

N. Ratio and Financial Analysis

V. CORPORATE FINANCE

A. Fundamental Issues

B. Capital Investment Decisions

C. Business and Financial Risk

D. Long Term Financial Policy

E. Mergers and Acquisitions

F. Valuation Implications of Corporate Finance

VI. ANALYSIS OF EQUITY INVESTMENTS

A. Organization and Functioning of Securities Markets

B. Security Market Indexes and Benchmarks

C. Equity Risk Definition (e.g., statistical, economic, downside, relative, absolute, political) and Measurement

D. Fundamental Analysis

E. Special Applications of Fundamental Analysis

F. Technical Analysis

VII. ANALYSIS OF DEBT INVESTMENTS

A. Debt Securities

B. Risks Associated with Investing in Bonds

C. Global Bond Sectors and Instruments

D. Yield Spreads

E. Introduction to the Valuation of Debt Securities

F. Yield Measures, Spot Rates, and Forward Rates

G. Measurement of Interest Rate Risk

H. The Term Structure and Volatility of Interest Rates

I. Valuing Bonds with Embedded Options

J. Mortgage-Backed Securities (MBS)

K. Asset-Backed Securities

L. Valuing Mortgage-Backed and Asset-Backed Securities

M. Assessing Trading Strategies

N. Principles of Credit Analysis

VIII. ANALYSIS OF DERIVATIVES

A. Derivative Markets and Instruments

B. Forward Markets and Instruments

C. Futures Markets

D. Options Markets

E. Swaps Markets

IX. ANALYSIS OF ALTERNATIVE INVESTMENTS

A. Real Estate

B. Investment Companies

C. Venture Capital

D. Hedge Funds (e.g., characteristics, fee structure, leverage, short versus long)

E. Closely-held Companies and Inactively Traded Securities

F. Distressed Securities/Bankruptcies

G. Commodity Markets and Commodity Derivatives

X. PORTFOLIO MANAGEMENT

A. Capital Market Theory

B. Management of Individual Investor Portfolios

C. Management of Institutional Investor Portfolios

D. Pension Plan and Employee Benefit Funds

E. Endowment Funds and Foundations

F. Insurance Companies

G. Other Corporate Investors (investment policy considerations)

H. Capital Market Expectations

I. Asset Allocation

J. Portfolio Construction and Revision

K. Equity Portfolio Management Strategies

L. Debt Portfolio Management Strategies

M. Real Estate and Alternative Investments in Portfolio Management

N. Risk Management

O. Performance Measurement

P. Presentation of Performance Results

Thử chuyển sang dùng Eclipse PDT thay Zend Studio

Eclispe không phải là IDE tuyệt vời cho Java sau khi Netbeans trở lại quá quyến rũ với bản 4.1 ba bốn năm về trước. Với Java tôi chỉ dùng Netbeans. Nhưng dùng Eclipse PDT thay thế cho Zend Studio lại là một câu chuyện khác.

Các shortcut trong Eclipse:

  1. Xem danh sách: Ctrl+Shift+L. Giống như mở Firebug khi nó chưa bị disable. Có vẻ xem thông qua Windows -> Preferences -> General -> Keys
  2. Code completion: Gõ và Ctrl + Space. Tương tự như Zend Studio
  3. Xem cửa sổ Breakpoint: Alt+Shift+Q rồi B
  4. Run: Ctrl+F11
  5. Debug: F11. Với PDT thì chúng (3) chẳng khác gì nhau cả. Trừ khi set Breakpoint cho nó.
  6. Debug a PHP script: Alt+Shift+D rồi H. Không may là Alt+Shift+D rồi W chẳng chạy gì cả
  7. Dịch chuyển giữa các Perspective: Ctrl+Shift+F8.
  8. Nhảy đến một PHP API: Alt+Shift+G. Cái này thay thế cho tính năng Go To Declaration trong Zend Studio nhưng không tiện. Trong PDT, Go to Declaration được thay thế bằng Open Declaration trên context menu. Eclipse PDT cho phép hover chuột trên API để tìm ra location và description, tương tự như Zend Studio. Xem 17.
  9. Nhảy đến file bất kì: Ctrl+Shift+R rồi gõ tên file với sự hỗ trợ Live Suggestion, Wildcard. Kết quả tìm kiếm có vẻ như được cache lại cho lần search sau đó.
  10. Nhảy đến 1 lớp: Ctrl+Shift+T chăng. Không. PDT không phải là JDT. Xem 17.
  11. Nhảy đến một dòng cụ thể: Ctrl+L. Giống như Ctrl+G trong Zend Studio
  12. PHP Search: Ctrl+H để search theo tiêu chí class, constant, function hay General search với Ctrl+F
  13. Chuyển xuống dòng mã chỉnh sửa lần gần nhất: Ctrl+Q
  14. Xem mã nguồn của một lớp được import/include vào: Hover chuột lên tên lớp và giữ Ctrl
  15. Nhảy đến lớp mẹ từ lớp con: Ctrl + T. PDT không hỗ trợ
  16. Chuyển giữa các editor tab đang mở: Ctrl + E (hiện danh sách) và Ctrl + (giữ) F6 liên tục sẽ cho phép chuyển đến từng tab. Cũng có thể dùng Ctrl + Shift + Tab/Ctrl + Tab để chuyển focus lên điều khiển tab hiện thời rồi dùng <--> để chuyển giữa các file. Nếu là di chuyển 1 chiều thì Ctrl + Pgup hoặc Ctrl + Pgdown
  17. Xem declaration của một lớp: đặt chỏ chuột trên tên lớp extends hoặc lời gọi constructor rồi ấn F3 hoặc cũng có thể giữ Ctrl rồi hover chuột trên tên lớp đó cho đến khi hiện hyperlink rồi click. Áp dụng tương tự như với method hay functions.
  18. Format code theo từng dòng: Ctrl + I
  19. Di chuyển đến các tính năng của Eclipse 3.3: Ctrl + 3. Đây là bổ sung mới nhất của họ Eclipse 3.3. Nó sẽ hiện cho bạn một bảng các tính năng để bạn mở nó. Tính năng có tên là Quick Access.
  20. Joom in and joom out: bình thường là Ctrl + =Ctrl + - nhưng nó ko chạy trong PDT
  21. Biến chuỗi thành viết thường: Ctrl + Shift + I, tiện khi khai báo language key
  22. Biến chuỗi thành viết hoa: Ctrl + Shift + X. Tiện khi khai báo constant
  23. Đánh dấu 1 dòng để gán breakpoint: Ctrl + Shift + B

What they teach you on MBA course

Basics

  • Cơ chế vận hành Doanh nghiệp [Organizational Behavior]
  • Marketing  Quốc tế [International Marketing]
  • Luật Kinh doanh Quốc tế [International Business Law]
  • Thông tin và Giao tiếp Doanh nghiệp [Business Communication]
  • Lãnh đạo Doanh nghiệp [Business Governance]
  • Quản lí Nhân sự [Human Resources Management]
  • Marketing Tác nghiệp [ Marketing Research]
  • Tổng hợp về Quản lí Kinh doanh: Chức năng & Phân tích Tình huống Quốc tế [Global Business Management: Functions & Case Analyses in International Context]
  • Thị trường, Chiến lược và Tổ chức cơ cấu [Market, Strategies & Organizational Structures ]
  • Giao tiếp Kinh doanh liên Văn hoá [Intercultural Business Communication]

If you focus on International Business, more to take

  • Kế toán Doanh nghiệp (Managerial Accounting)
  • Quản lí Tài chính (Financial Management)
  • Quản lí Sản xuất & Qui trình Kiểm tra  (Production Management  & Control)
  • Tiền tệ, Ngân hàng & Tín dụng (Money, Banking & Credit)
  • Chiến lược Tài chính & Báo cáo Tài chính (Financial Strategy & Reporting)

Bài học đầu tiên về Kế toán Mĩ: The position of accounting

Họ nói, sự thành công hay thất bại của doanh nghiệp được measured in dollars mà đồng dollar đấy thì được recorded and reported using accounting và vì thế nó là language of business. Vậy nên no matter what role you may be miễn là bạn cứ involved in business là bạn có thể benefit from learning accounting.

Nhưng điều đó không có nghĩa là there is no difference between what you learn from textbook and practice. Vì thế điều quan trọng là bạn cần relate it directly to real world situations.

« Trang trước