Showing posts with label How-to. Show all posts
Showing posts with label How-to. Show all posts

Monday, December 30, 2013

[How to] How to call a function defined in the package

The following sql is to call a function defined in the package
 
declare
  outVal number;
begin
   -- Call the function
   outVal := mypackage.myfunction (100);
end;

Friday, August 9, 2013

Howto: Find the biggest value in the column

This article teaches you how to get the biggest value in the columns in the same table.

It could be done by the built-in function GREATEST

However, it does not work when there are null values in the column.

You may use NVL function as a work around.

Sunday, January 13, 2013

How to disable Java in Chrome Browser (Security)



U.S. warns on Java software as security concerns escalate
Extracted from Reuters
(Reuters) - The U.S. Department of Homeland Security urged computer users to disable Oracle Corp's Java software, amplifying security experts' prior warnings to hundreds of millions of consumers and businesses that use it to surf the Web.
http://www.reuters.com/article/2013/01/11/us-java-security-idUSBRE90A0S320130111


How to disable Java Plugin in Chrome


1. Open the chrome browser, and type chrome://plugins/ in the URL


2. Search Java in the list


3. Click Disable

Saturday, July 14, 2012

[How-to] Install Maven with Eclipse

This article shows you how to use Maven with Eclipse.

1. Open Eclipse, Click Help -> Install New Software in the menu tool bar

2. Select Maven in the drop down list.
If it does not exist, click "Add" to input the Maven link
http://download.eclipse.org/technology/m2e/releases 


3. Select m2e - Maven Integration for Eclipse and click Next button.

4. Click Next for the installation

5. Accept the license.

6. Download and install the software

7. Restart the Eclipse

8. Installation Completed!



Thursday, July 12, 2012

[RESOLVED] MySQL Workbench installation

No response after clicking the MySQL Workbench program.


Resolve:

Make sure the following components are installed in your machine.


1. Microsoft .NET Framework 4 Client Profile (Web Installer)
http://www.microsoft.com/en-us/download/details.aspx?id=17113


2. Microsoft Visual C++ 2010 Redistributable Package (x86)
http://www.microsoft.com/en-us/download/details.aspx?id=5555
 

3. In some cases, Windows Imaging Component is required
http://www.microsoft.com/en-us/download/details.aspx?id=32

Reference:

Download the MySQL workbench
http://dev.mysql.com/downloads/workbench/


Keywords:
MSSQL Studio, toad

Wednesday, July 4, 2012

Eclipse Development Platform Setup



The following tutorial shows how to setup the development environment for Java Application
You have to install the following software in your machine.
- JAVA SDK
- Eclipse
Steps by steps1. Download and Install the latest version of the Java SDK. 


2. Download Eclipse, either IDE for Java Developer or Java EE Developer is okay.

3. Unzip the eclipse, Open it with selecting a workspace

4. Done


Wednesday, June 27, 2012

Useful API converting PDF to image

1. Download the tool PDFBox (e.g. pdfbox-app-1.7.0.jar) via the following URL:


2. Include the library in your java program. The following source code is attached for your reference.



package com.test;

import java.awt.Toolkit;
import java.awt.image.BufferedImage;

import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.util.PDFImageWriter;

public class PDFBoxPreviewTest {

       /**
        * @param args
        */
       public static void main(String[] args) {
              try {
                     String path = "D:\\temp\\a.pdf";
                     PDFBoxPreviewTest t = new PDFBoxPreviewTest();
                     t.getDocument(path);
              } catch (Exception e) {

                     System.out.println(e.getMessage());
              }
       }

       private PDDocument getDocument(String path) throws Exception {
              PDDocument document = null;

              document = PDDocument.load(path);

              PDFImageWriter writer = new PDFImageWriter();
              boolean success = writer.writeImage(document, "jpg", "", 1, 1,
                           "myFileName", BufferedImage.TYPE_INT_RGB, Toolkit
                                         .getDefaultToolkit().getScreenResolution());
              System.out.println(success);

              return document;
       }
}

3. myFileName.jpg will be generated!


Source Code can be found here:
http://test-pdfbox.googlecode.com/svn/trunk/

Wednesday, February 22, 2012

Small Technique on using Java Decompiler in Eclipse

Here's my common use way on the Java Decompiler..

Method 1: Direct Access to the class by shortcut
1. Click Ctrl + T, and then input the class and input the class name

2. Eclipse will bring you to the class implementation.


Method 2: Direct Access to the class by Open Declaration (F3)
1. Mouse over to the corresponding class in the Java File and click F3
For example, mouse over javax.ejb.SessionBean and then  click F3


2. Eclipse will bring you to the class implementation.





Method 3: Use Java Browsing Perspective
1. Click the icon in the Red Box below to Open a new perspective


 2. Choose Java Browsing

3. You may find your class implementation as below.