Skip to main content

Posts

So confusing Oracle left join

Starting with Oracle9i, the confusing outer join syntax using the ‘(+)’ notation has been superseded by ISO 99 outer join syntax.  As we know, there are three types of outer joins, left, right, and full outer join.  The purpose of an outer join is to include non-matching rows, and the outer join returns these missing columns as NULL values.  Let’s review the syntax differences between these variations in join syntax: Left outer join:  Oracle8i select    last_name,    department_name from    employees e,    departments d where    e.department_id = d.department_id(+); Left outer join:  Oracle9i select    last_name,    department_name from    employees e left outer join    departments d on    e.department_id = d.department_id;

iBatis and Log4j

log4j.rootLogger=DEBUG, A2   # SqlMap logging configuration...   log4j.logger.com.ibatis=DEBUG   log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG   log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG   log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG   log4j.logger.java.sql.Connection=DEBUG   log4j.logger.java.sql.Statement=DEBUG   log4j.logger.java.sql.PreparedStatement=DEBUG   log4j.logger.java.sql.ResultSet=DEBUG   # Console output...   log4j.appender.stdout=org.apache.log4j.ConsoleAppender   log4j.appender.stdout.layout=org.apache.log4j.PatternLayout   log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n       log4j.appender.A2=org.apache.log4j.FileAppender   log4j.appender.A2.File=C:/dcsi/twacs.log   #...

javascript code segments

In the gap of two sprints, I have sometime  to review the basic knowledge. Here we go. #1 Image <img name="news" src="xxx"> js: document.images.news.src = xxxx; you can also do this way, newsOff = new Image(); newsOff.src = "xxx"; #2 Eval() The  eval() method handles nicely if you want to dynamically create JavaScript code. e.g. eval(“document.images.news.src = xxxx;”

Examples of using Quartz

Here are some full examples: Expression Meaning 0 0 12 * * ? Fire at 12pm (noon) every day 0 15 10 ? * * Fire at 10:15am every day 0 15 10 * * ? Fire at 10:15am every day 0 15 10 * * ? * Fire at 10:15am every day 0 15 10 * * ? 2005 Fire at 10:15am every day during the year 2005 0 * 14 * * ? Fire every minute starting at 2pm and ending at 2:59pm, every day 0 0/5 14 * * ? Fire every 5 minutes starting at 2pm and ending at 2:55pm, every day 0 0/5 14,18 * * ? Fire every 5 minutes starting at 2pm and ending at 2:55pm, AND fire every 5 minutes starting at 6pm and ending at 6:55pm, every day 0 0-5 14 * * ? Fire every minute starting at 2pm and ending at 2:05pm, every day 0 10,44 14 ? 3 WED Fire at 2:10pm and at 2:44pm every Wednesday in the month of March. 0 15 10 ? * MON-FRI Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday 0 15 10 15 * ? Fire at 10:15am on the 15th day of every month 0 15 10 L * ? Fire at 10:15am on the last day of every month 0 15 1...

Code segments about JSTL

<c:set var="myuri" value="${pageContext.request.contextPath}" />  <c:choose>         <c:when test="${fn:contains(myuri, '/xxx')}">             <script type="text/javascript" src="javascript/xxx.js"></script>         </c:when>         <c:otherwise>             <script type="text/javascript" src="xxx.js"></script>         </c:otherwise>     </c:choose>

Struts2 + FreeMarker Tempalte (FTL)

Struts2 + FreeMarker Tempalte (FTL) Integration example By  Viral Patel  on August 28, 2012 Welcome to Freemarker Tutorial Series. In previous post we created  Spring MVC based Hello World Freemarker Template example . We learned few APIs of freemarker and also how to integrate it with Spring MVC based application. Following are the list of tutorials from Freemarker tutorial series. FreeMarker Tutorial Series Part 1: Introduction to Freemarker Templates Part 2: Freemarker Hello World example Part 3: Freemarker + Servlet Integration tutorial Part 4: Freemarker + Spring MVC Integration tutorial Part 5: Freemarker + Struts2 Integration tutorial Today we will create a Struts2 based application that uses Freemarker FTL as view instead of JSP. This would give you a good insight in Struts2 + Freemarker integration. The application is similar to previous tutorial’s User app, where a list of users will be displayed and we can add new user. The a...