Posts

JDBC Data Types Equivalent in Java

SQL JDBC/Java setXXX getXXX VARCHAR java.lang.String setString getString CHAR java.lang.String setString getString LONGVARCHAR java.lang.String setString getString BIT boolean setBoolean getBoolean NUMERIC java.math.BigDecimal setBigDecimal getBigDecimal TINYINT byte setByte getByte SMALLINT short setShort getShort INTEGER int setInt getInt BIGINT long setLong getLong REAL float setFloat getFloat FLOAT float setFloat getFloat DOUBLE double setDouble getDouble VARBINARY byte[ ] setBytes getBytes BINARY byte[ ] setBytes getBytes DATE java.sql.Date setDate getDate TIME java.sql.Time setTime getTime TIMESTAMP java.sql.Timestamp setTimestamp getTimestamp CLOB java.sql.Clob setClob getClob BLOB java.sql.Blob setBlob getBlob ARRAY java.sql.Array setARRAY getARRAY REF java.sql.Ref SetRef getRef STRUCT java.sql.Struct SetStruct getStruct

Maven + Oracle XE + Sample App

<dependency>     <groupid>com.oracle</groupid>     <artifactid>ojdbc6</artifactid>     <version>11.2.0.3</version> </dependency> ... <repositories>     <repository>       <id>codelds</id>       <url>https://code.lds.org/nexus/content/groups/main-repo</url>     </repository>   </repositories> public class OracleSample {     public static final String DBURL = "jdbc:oracle:thin:@localhost:1521:XE";     public static final String DBUSER = "rtpmodern";     public static final String DBPASS = "P@ssw0rd";     public static void main(String[] args) throws SQLException {         // Load Oracle JDBC Driver         DriverManager.registerDriver(new oracle.jd...

How to add images in README.md in Github

README.md file in Github is the place to give information about your project, like a summary. So If you can add images into README.md file, you can do the following. ![alt tag] ('image absolute url')

Gender predictor sample app in AngularJS

Image
Get code from following Github location https://github.com/shakeelstha/birth

Weather@Richmond sample app in AngularJS

Image
Get the code from following Github repository. https://github.com/shakeelstha/weather-at-richmond

How to use two (multiple) Liferay UI Search Container tags in a single JSP

If you are trying to include multiple Liferay UI Search Container in one jsp, you might encounter problem in pagination. As a solution use curParam with different names for different search container. <liferay-ui:search-container delta="20" curParam="actualCurParam" deltaConfigurable="false" emptyResultsMessage="There are no bank balance recorded yet."> <liferay-ui:search-container delta="20" curParam="forcastCurParam" deltaConfigurable="false" emptyResultsMessage="There are no transactions recorded yet.">

Bad column names in liferay

Here are the list of column name that is bad practice to be used in liferay  custom table. The list is given from Liferay itself. abstract access active add alias all alter analyze and as asc asensitive assert auto before between bigint binary blob boolean both break by byte call cascade case catch change char character check class code collate column comment condition const constraint continue convert create cross currency current_date current_time current_timestamp current_user cursor data database databases date day_hour day_microsecond day_minute day_second dec decimal declare default delayed delete desc describe deterministic distinct distinctrow div do double drop dual each else elseif enclosed end enum escaped exists exit explain extends false featured fetch fields final finally float float4 float8 for force foreign from full fulltext goto grant group having hidden high_priority hour_microsecond hour_minute hour_second hyperlink id idd if ignore implements import in in...