10/28: JDBC logging for JBoss
How to Log SQL on JBoss - betweenGo
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
<!-- param name="Threshold" value="INFO"/ -->
<param name="Threshold" value="DEBUG"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
</layout>
<!-- Hajime's change -->
<category name="org.jboss.ejb.plugins.cmp.jdbc">
<priority value="DEBUG"/>
</category>
<category name="org.hibernate.SQL">
<priority value="DEBUG"/>
</category>
</appender>
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
<!-- param name="Threshold" value="INFO"/ -->
<param name="Threshold" value="DEBUG"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
</layout>
<!-- Hajime's change -->
<category name="org.jboss.ejb.plugins.cmp.jdbc">
<priority value="DEBUG"/>
</category>
<category name="org.hibernate.SQL">
<priority value="DEBUG"/>
</category>
</appender>
10/21: Eclipse > MAT
Date and Time handling in Python - Python Code Snippet
print time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))
print time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))
10/01: Java > Mail, SMTP, javaMail
MimeUtility (Java EE 6 - DRAFT)
There are a set of methods to encode and decode MIME headers as per RFC 2047. Note that, in general, these methods are not needed when using methods such as setSubject and setRecipients; JavaMail will automatically encode and decode data when using these "higher level" methods. The methods below are only needed when maniuplating raw MIME headers using setHeader and getHeader methods. A brief description on handling such headers is given below:
RFC 822 mail headers must contain only US-ASCII characters. Headers that contain non US-ASCII characters must be encoded so that they contain only US-ASCII characters. Basically, this process involves using either BASE64 or QP to encode certain characters. RFC 2047 describes this in detail.
There are a set of methods to encode and decode MIME headers as per RFC 2047. Note that, in general, these methods are not needed when using methods such as setSubject and setRecipients; JavaMail will automatically encode and decode data when using these "higher level" methods. The methods below are only needed when maniuplating raw MIME headers using setHeader and getHeader methods. A brief description on handling such headers is given below:
RFC 822 mail headers must contain only US-ASCII characters. Headers that contain non US-ASCII characters must be encoded so that they contain only US-ASCII characters. Basically, this process involves using either BASE64 or QP to encode certain characters. RFC 2047 describes this in detail.