node-java - Bridge API to connect with existing Java APIs.
Aqua Utopia|海の底で記憶を紡ぐ
we're not kids anymore.

Discoholic 🪩

JBB: An Artblog!
No title available
NASA
No title available
ojovivo
Today's Document

@theartofmadeline
$LAYYYTER

Kaledo Art

Janaina Medeiros

❣ Chile in a Photography ❣
todays bird

Kiana Khansmith
RMH
Monterey Bay Aquarium

shark vs the universe

izzy's playlists!

seen from Malaysia
seen from Italy

seen from Mexico
seen from Malaysia
seen from United States

seen from Malaysia

seen from China

seen from Türkiye

seen from United States

seen from United States

seen from Malaysia
seen from United States
seen from United States
seen from Türkiye

seen from Türkiye

seen from Germany
seen from United States

seen from United Kingdom

seen from United States
seen from United States
@cekstechnotes
node-java - Bridge API to connect with existing Java APIs.
MSSQL - Truncating All Test Tables
https://gist.github.com/ccw/5660391
To find out certain files contained in bunch of jar/zip files.
DB2 - Avoid "ERRORCODE=-4225 SQLSTATE=24514" Error on DB2 9.X
Adding certain JDBC connection properties to avoid those errors.
https://gist.github.com/2281993
SAS - Tip of Using SAS/Access to ODBC
Sometimes, especially for SAS Enterprise Guide, the general access to ODBC LIBNAME statement will not work (will encounter a ODBC driver not found error.) Therefore, in this case, NOPROMPT option will resolve the problem.
https://gist.github.com/2231376
SAS - Applying ACT to Objects
https://gist.github.com/2282054
Groovy - Sample Code of Modifying SAS SPK package
https://gist.github.com/2226396
Thought - My Next Major Programming Language
I have been using Java as my major programming language for a decade (partially for work, partially for personal interest.) And now, I think it should be the time to pick up an alternative to "repowering" my passion as well as to extend my career if any. The criteria to choose the language are only a few; mainly it must be interesting to learn and the underlying design principles have to fit my personal taste. Second, it should be good at solving at least one kind of domain problems. And finally, it will be nice if it is a platform independent language or a platform-crossing language. JVM only languages are not considered so far (though I really like the syntax design of Groovy), because it is more like to use another kind of Java in a degree. Here comes some candidates:
JavaScript/HTML5 - the keys of Web. Objective-C - quite attracting because it is the native language of iOS platform. Ruby - the fundamental of the Web development rock star framework. Smalltalk - seems fun to learn. Perl - useful and powerful. Python - seems an elegant language. C - persistence and everywhere. Clojure - kinda curious. Go - does it really the real "next C"? ActionScript - just in case...
SAS - IOM JDBC Driver Data Type Mapping
Seems like that there are only a few SQL data types supported in SAS 9.2 IOM JDBC driver. For example, only CHAR, CHARACTER, VARCHAR, INT, INTEGER, SMALLINT, FLOAT, DOUBLE and DATETIME can be used in a table creation statement; therefore, the corresponding Java data types (mapped from previous SQL data types) are as well kinda lacking. Following is the SQL/Java data type mapping table which is according to my recent test result:
SQL Data TypeJava Data Type DATETIMEjava.sql.Timestamp INTEGERjava.lang.Integer CHAR, CHARACTER, VARCHARjava.lang.String INT, SMALLINT, FLOAT, DOUBLEjava.lang.Double
* I really don't know why INT and SMALLINT are mapped to Java Double, but they are!
Groovy - Using GroovyWS as Web Service Client
It looks quite easy to use GroovyWS; however, it's not like that in my case.
In the beginning, if I just simply declare groovyws module in my maven project dependencies, I will always get an exception like this:
ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
After googling awhile, I finally found this article and understood what's the cause of ClassCastException, and resulting to manually adjust the project dependencies to solve this problem.
https://gist.github.com/2217114
SAS - Output Dataset as JSON
This example converts a SAS dataset to JSON notation strings and output to STDOUT; change the line 8 to any specific file names to write the result to the file instantly.
https://gist.github.com/2226430
Another example from Wade H. Van Buskirk.
Oracle - Change the Service Listening Ports of TNS Listener
Since version 9, Oracle database pre-bundled a XML DB serves both on port 8080 (HTTP) and 2020 (FTP). To change the default ports, we could use follow command in SQLPlus:
https://gist.github.com/2226467
SAS - Connect to SAS Shared Service with SAS JDBC Driver
Just an example demonstrates how to connect to SAS Shared Service with SAS JDBC driver
https://gist.github.com/2231349
Grails - Tips of Using Metro Plugin
Metro Integration
So far as I know, there are two ways to integrate web services into a grails application using Metro plugin:
Simply do nothing, Metro plugin will add relative jax-ws spring configuration (com.sun.xml.ws.transport.http.servlet.GrailsWsServlet) to web.xml.
Place self-defined sun.jaxws.xml in web-app/WEB-INF folder, and copy all generated Java source files to src/java. And then Metro plugin will add com.sun.xml.ws.transport.http.servlet.WSServletContextListener to web.xml during runtime automatically.
Enabling MTOM Support
To enable MTOM support is as well simple enough. What we have to do is to declare a @MTOM annotation tag in desired service classes, and use relative @XmlMimeType tags to annotate the MIME types we need before each web method's parameters (if any.) The only thing we need to take care of is, if the grails application not only serves as a Web Service server, but also a web application, in order to prevent the upload multi-part attachment from mixing up by the plugin, we need to exclude the url-pattern of all web services in the grails' UrlMappingsFilter (it means to add the url pattern to the excludes list in UrlMapping.groovy file.)
Example as below:
https://gist.github.com/2226202.js?file=UrlMapping.groovy
Grails - Metro Plugin Modification for Grails 1.3.3
Metro Plugin for Grails Framework is a little bit out dated, and currently not included in the official Grails plugin list. But it is the only plugin fulfill most of our needs to conduct an ideal web service server. To adopt the plugin to Grails 1.3.3 above applications, some tweaking are necessary needed.
https://gist.github.com/2226257.js?file=MetroGrailsPlugin.groovy
Mac OS X - Useful Tips
Absolutely useful:
Terminal Tips and Tricks For Mac OS X