Philip's Files
Thursday, January 08, 2015
Unable to run mqsi commands on Linux installation
+1 http://webspheremqmb.wordpress.com/tag/libimbcmdlib-so/
Friday, August 15, 2014
Fonts suited to programming
Playing with fonts suited for text editors and IDEs:
http://www.fontex.org/download/pro-font-windows.ttf
http://blog.typekit.com/2012/09/24/source-code-pro/
The feature set is that there are some extra considerations:
usually monospaced.
0 and O, 1 and l, etc. need to be distinguishable
brackets, square brackets, etc. need to be aesthetically pleasing
Friday, April 05, 2013
Using bind variables in XSLT transforms in OSB
Using Parameters for XSLT tranforms in OSB
Recently I wanted to use parameters in XSLT resources in OSB.The procedure is relatively straightforward, but I could find a nice summary anywhere - so here it is:
For Oracle Service Bus 11gR1 using the web interface:
- In the XSLT resource add a XSLT parameter:
<xsl:param name="TransactionID"/>
- Access it in the rest of the transform (within the templates) as follows:
<xsl:value-of select="$TransactionID"/>e.g.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:get="http://redacted.corp/VcIDV/wsdls/getPersonDetailsA"
xmlns:get2="http://redacted.corp/VcIDV/wsdls/getPersonDetails"
exclude-result-prefixes="http://redacted.corp/VcIDV/wsdls/getPersonDetailsA">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
<xsl:param name="TransactionID"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="SearchCriteria[SearchCriteria]">
<SearchCriteria>
<CombinationType>AND</CombinationType>
<TransactionID><xsl:value-of select="$TransactionID"/></TransactionID>
<xsl:apply-templates select="@* | *"/>
</SearchCriteria>
</xsl:template>
<xsl:template match="get:getPersonDetailsA">
<get2:getPersonDetails>
<xsl:apply-templates select="@* | *"/>
</get2:getPersonDetails>
</xsl:template>
</xsl:stylesheet>
Then when adding an XSLT resource, after having selected it, it should show up as a Bind Variable on the addition page.
e.g. using it in an Assign:
- Select the expression.
- Then select XSLT Resources
- This should allow you to choose the XSLT resource:
- After selecting it the parameter should show up as a Bind Variable which you can set.

Wednesday, May 30, 2012
Creating a filesystem URL in a JSP file.
I've been playing with producing SVG and PDF files by using JSP files to render the markup and then using a converter (e.g. Batik or Flying Saucer) to produce the final output using a transcoding servlet.
One problem with this approach is that the converter doesn't usually understand the URLs contained in the JSP markup.
I'm using the following recipe to convert relative paths to produce file URLs:
<%=(new java.io.File(application.getRealPath("/")+"relative_path_to/file.PNG")).toURL()%>Explanation:
- <%= is the Sciptlet Expression Tag. The following text will be a java snippet that will be run and it's output will be included in the generated page output.
- application is an Implicit object automatically defined for a JSP. It exposes the ServletContext object.
- getRealPath is called on the ServletContext object and returns the real filesystem path associated with a virtual path. This is called on "/" to get the base of the expanded WAR file.
- new java.io.File() is called on the string resulting from the relative path appended to the real path to create (but not open!) a File object.
- .toURL() is called on the file object to produce a File URL that most generators should understand.
This works for me on JBoss 4.5 - it might not work in all contexts.
The WAR is assumed to be exploded/expanded and not contained in a single Zip file.
Example use:
E.g. in a stylesheet:
See A related StackOverflow question
.head-item {
padding: 0%;
background-color: red;
text-align: center;
font-style: bold;
font-size: 150%;
background-image: url(<%=(new java.io.File(application.getRealPath("/")+"horisontal_red_to_pink_fade.PNG")).toURL()%>);
}
Friday, April 13, 2012
Custom Hebrew Fonts on Android
Using this post:
http://www.barebonescoder.com/2010/05/android-development-using-custom-fonts/
and AIDE.
I was able to get the SBL Hebrew Unicode TTF font to load and display in an android app on my Asus Transformer.
I used Gen 1:1 from tanach.us.
I'm still having some left-to-right/right-to-left issues when trying to test if the vowel and accent rendering though...
The XML editor in AIDE is also slightly confused by the Right-to-left strings.
Monday, August 21, 2006
Blendermania
I'm currently interested in visualisation and animation of 3d graphics using Blender:
http://www.blender.org
Tuesday, August 16, 2005
Memex
The computer as extension of thought.
This, the previous (and probaly the next few posts) are an experiment - an attempt to formulate and communicate a paradigm that has seeds and even roots everywhere.
I read an article about the Memex idea a few days ago.
One thought, probably the central thought I want to communicate is his idea of "associative trails" - I might not be using the same word used in the article, or even in his original essay.
The original Memex article was one of the shaping factors in hypertext.
What I find missing in the web, however, is exactly this concept.
To me what should be achieved is the ability to relate, to annotate not only to refer or link.
I've recently come across bitty browser at del.icio.us.
I like the concept (would like to fiddle with the implementation - something which bitty browser expressly forbids -as far as I can tell-).
A number of ideas and concept that have been surfacing every once in a while has finally resulted in the rough journey which should (might :) ) start with this post.



