วันอาทิตย์, พฤษภาคม 08, 2548
เทคนิคการใช้รูปปกหนังสือจาก Amazon.com
http://images.amazon.com/images/P/1590592433.01._PIdp-schmoo2,TopRight,7,-26_PE32_SCMZZZZZZZ_.jpg
PE32 แปลว่าลด 32% ถ้าลบออกก้อจะไม่มี คำว่า discount 32% เลข 32 อาจแก้ได้เป็น 99% ก้อได้
http://images.amazon.com/images/P/1590592433.01._PIdp-schmoo2,TopRight,7,-26_SCMZZZZZZZ_.jpg
ถ้าจะลบคำว่า look inside ก้อลบออกจนเหลือ url ข้างล่าง
http://images.amazon.com/images/P/1590592433.01._SCMZZZZZZZ_.jpg
image size ยังมีอีก 3 ขนาด
THUMBZZZ | 40 x 60 pixels, very small
MZZZZZZZ | 93 x 140 pixels, standard size
LZZZZZZZ | 317 x 475 pixels, very large
Thanks, K.sui (e-pro)
วันจันทร์, เมษายน 11, 2548
Using MySQL database with OC4J
? Copyright 2004 Debu Panda.
I received few requests to provide the steps to configure OC4J to use MySQL database. You can configure any database if you have a JDBC driver to be used with OC4J, however Oracle supports third-party databases like IBM DB2, Microsoft SQLServer, Sybase, etc. by using DataDirect JDBC drivers. The DataDirect drivers can be dowloaded from OTN (http://otn.oracle.com) for exclusive use with Oracle Application Server. In this blog entry, I will provide the steps to configure OC4J to use MySQL database. Please note that this note is for demonstration purpose only and is not officially supported by Oracle.
Assumption
This example assumes MySQL database is installed and configured. Let us assume that you have a name named EMP created in the Test database. Also you have downloaded the MySQL Connector/J JDBC driver from http://www.mysql.com/downloads/api-jdbc.html and readily available for use. Also I'm assuming that you are using OC4J 9.0.4 production or OC4J 10.0.3 Developer preview. You can download OC4J from http://otn.oracle.com/tech/java/oc4j/index.html.
1. Install JDBC Diver
You have to copy the JDBC driver library i.e. mysql-connector-java-3.0.11-stable-bin.jar to %OC4J_HOME%/j2ee/home/applib directory.
2. Create DataSource
Create the datasource entry for connecting to the MySQL database in the %OC4J_HOME%/j2ee/home/config/data-sources.xml as follows:
class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
name="mysqlDS"
location="jdbc/mysqlCoreDS"
xa-location="jdbc/xa/mysqlXADS"
ejb-location="jdbc/mysqlDS"
connection-driver="com.mysql.jdbc.Driver"
username="root"
password="welcome"
url="jdbc:mysql://144.25.134.24/Test"
inactivity-timeout="30"
/>
3. Test DataSourceYou have to restart OC4J before you can use the DataSource you created in the previous step. Here is a sample JSP that you can use to test the DataSource that you created in the previous step.
<%@ page import="java.sql.*, javax.naming.*, javax.sql.*" %>
<% try { InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/mysqlDS");
Connection con = ds.getConnection(); Statement statement = con.createStatement();
ResultSet rset = statement.executeQuery("select * from emp"); %>
Test OC4J with MySQL DB
<table align="center" border="1">
<% while (rset.next()) { %>
<tr><td>
<%= rset.getInt(1) %>
<tbody><tr><td>
<%= rset.getString(2) %>
<td>
<% } statement.close();
con.close(); }
catch(Exception e)
{ out.print(e.getMessage()); }
%>
วันศุกร์, เมษายน 08, 2548
Firefox Shortcut
To use the keyboard shortcuts hold down CTRL and press one of the following:
| T | Opens a new tab and takes the focus to the new tab |
| O | Open Local File. This is one of the biggest changes from IE where both Ctrl-O and Ctrl-L opened a dialogue box for a URL. |
| L | Changes focus to the Address bar |
| Tab | Scrolls through the tabs from current window towards the right. Loops back to the first tab when rightmost tab is reached |
| 1..0 | The numbers 1 to 0 takes the focus to Tab 1 to 10 |
| N | Opens a new window like IE |
| W | a tab or if there are no tabs, close the window |
| B | Open bookmark sidepanel |
| D | Bookmark current page |
| H | Brings up the history dialogue box on the right. Useful if you closed a page accidentally and forgot the URL. Or to make sure your kids are not looking at pr0n |
| U | Show page source |
| Y | Open downloads window |
| K | Focus goes to search bar |
Some of the more common shortcuts just for the heck of it.
| R | Refresh current page |
| F | Find in page |
| G | Find Again (used in conjunction with Ctrl F) |
| J | Page Info (same as properties in IE) |
| - | Decrease font size |
| + | Increase font size |
| S | Save current page to disk |
| P | Print current page |
| A | Select All |
A note about copy and pasting in Firefox; it is not integrated as closely as IE and the Office Suite for better or worse. For example copying the contents of a page directly in IE and pasting into Word for example keeps the formatting most of the time. Doing the same thing with Firefox results in plain text being copied over.
*edit An astute reader has pointed out another shortcut, "/" just the slash, not brackets which activates an incremental search; it will go to the first instance of the string that is typed in. Hit F3 to find again or hit ESC to cancel the search.
A more specific version of the incremental search is "'" which only finds links with the string entered.
*edit July 26th 2004 Thanks to August who pointed out yet a few more shortcuts as well as a small note - increasing the font size is the = and + key an would more correctly be CTRL =
F5 - refresh page
F6 - Same as CTRL-L, focus is taken to the address bar
CTRL Y - Open up the downloads window
CTRL K - Focus is taken to search bar
-----------------
Thanks to Achilles @www.tweakfactor.com