Archive for the ‘quick tips’ Category
Dos to Unix (Dos2Unix) with Eclipse
Wednesday, July 21st, 2010
1. Open the file in Eclipse that you wish to “Dos2Unix”
2. File -> Convert Line Delimiters To -> Unix
Profit!
Tags: dos2unix, eclipse
Posted in quick tips | No Comments »
JAXB @XmlAnyElement example
Monday, June 7th, 2010
The problem
I was recently working on a JAXB centric app which was required to capture “arbitary” xml. e.g.
<a>
<b></b>
<c></c>
<d>
<!-- "Unknown" XML here -->
<maybee></maybee>
<maybef></maybef>
<!-- etc etc -->
<d />
</d></a>
How could I ever capture the contents of
(more...)
Tags: annotations, java, jaxb, xml
Posted in Development, quick tips | No Comments »
How to convert a CLOB to an XMLType in Oracle
Thursday, June 3rd, 2010
Not much comment to add here; code says it all
PROCEDURE clobToXMLType(myClob IN CLOB)
IS
l_xmlType XMLTYPE;
-- do something
BEGIN
l_xmltype := XMLTYPE.createXML(myClob);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END clobToXMLType;
Tags: oracle, plsql, xml
Posted in Development, quick tips | No Comments »
Reset Gnome desktop the easy way
Sunday, May 16th, 2010
I recently upgraded Ubuntu on one of machines from 9.10 (Karmic Koala) to 10.04 (Lucid Lynx). In the old version I had installed a lot of widgets, messed up the fonts, buttons – loads of things. I needed an easy way to restore/reset the Gnome desktop back to the default look and feel.
I could of course have used the gui’s to undo all the changes I made but why bother? This is Linux after all!
# cd # [sudo] rm -rf .gnome .gnome2 .gconf .gconfd .metacity
Tags: gnome, linux, ubuntu
Posted in quick tips | No Comments »
Show and search list of installed packages (Ubuntu)
Saturday, January 2nd, 2010
To show the complete list:
dpkg --get-selections
To filter the list
dpkg --get-selections | grep XXX
Tags: linux, ubuntu
Posted in Development, quick tips | 1 Comment »
