Friday, November 19, 2010

Code Syntax Highlighting

This blog server as a tutorial for me to highlight some code syntax in blogger.com, but I believe you guys may also find it helpfull.

First you have to download SyntaxHighlighter from Syntax Highlighter ver.1.5.1 for version 1.5.1 or
SyntaxHighlighter ver.3.0.83 for version 3.0.83 (the current, as of this blog written).  I used to use version 1.5.1 then I change  it to version 3.0.83.

Installation:
Upload a couple of needed file into some hosting sites.  I chose google sites, and created a dummy website to hold the needed files.
The needed files are :

  • shCore.css (from styles folder)
  • shThemeDefault.css (from styles folder)
  • shCore.js (from scripts folder)
  • shBrushVb.js  (from scripts folder)
  • shBrushPlain.js  (from scripts folder)


You may notice that there are a couple of brushes included in the syntaxhighlighter_3.0.83.rar (scripts folder), I only uploaded shBrushVb.js and shBrushPlain.js since currently I only needed to share some VBScript and some plain text to the world.

Once you uploaded add the following syntax to your blogging template.

Just after the <Head> Tag
<Head>
<link href='https://sites.google.com/site/techrevisit/shCore.css' rel='stylesheet' type='text/css'/>
<link href='https://sites.google.com/site/techrevisit/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script language='javascript' src='https://sites.google.com/site/techrevisit/shCore.js'/>
<script language='javascript' src='https://sites.google.com/site/techrevisit/shBrushVb.js'/>
<script language='javascript' src='https://sites.google.com/site/techrevisit/shBrushPlain.js'/>
...

</Head>

Just BEFORE the </body> tag
<Body>

...

<script type="text/javascript">
     SyntaxHighlighter.all()
</script>

</Body>

How to use:
Now once we are done with the template, everytime you post a code you add a <pre> tag before the code.  In blogger.com's posting HTML mode :
<pre class="brush :vb">

... code ...

</pre>

References :
Alex Gorbatchev's Syntax Highlighter

Automating Essbase Client - Excel with VBScript/Macro (1)

To start Essbase-Excel VBScript programming or even Excel Macro programming you may want to look into a comprehensive help guide made by Oracle|Hyperion.

It is located on your Essbase Client installation folder. The help file name is "essexcel".  In my case it is located on "C:\Hyperion\common\EssbaseRTC\9.3.1\bin"

List of VB Functions and Macro Functions are listed on the help file, along with the syntax of programming.


You may also want to open my case study.