In-Collaboration's site is loading ...

Requires Javascript.
Wiki for Chris Ashley - In-Collaboration Ltd
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0em 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0em 1em;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which use a logographic writing system and need larger font sizes.
***/

/*{{{*/
body {font-size:0.8em;}

#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}

.subtitle {font-size:0.8em;}

.viewer table.listView {font-size:0.95em;}

.htmlarea .toolbarHA table {border:1px solid ButtonFace; margin:0em 0em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These InterfaceOptions for customising TiddlyWiki are saved in your browser

Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)

<<option txtUserName>>
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkRegExpSearch>> RegExpSearch
<<option chkCaseSensitiveSearch>> CaseSensitiveSearch
<<option chkAnimate>> EnableAnimations

----
Also see AdvancedOptions
* A tiddler's tags are show ''above'' the tiddlers title (instead of in a right-floated box).
* A tiddler's tagging list is shown ''below'' the tiddlers content (instead of in a left-floated box).
These layout changes are done with small changes to ViewTemplate (See TagglyTaggingViewTempplate) and EditTemplate (see TagglyTaggingEditTemplate) and with some CSS from TagglyTaggingStyles.
The default TW tagging macro is called "tagging". TagglyTagging provides an enhanced version of this called "tagglyTagging". So in the TagglyTaggingViewTemplate, macro="tagging" is replaced by "macro="tagglyTagging". The tagglyTagging macro lets you do things like:
* Sort the tagged list ascending or descending by title, modified date or created date
* Format the list in columns
* Hide the tagged list
It also remembers your preference on a per-tiddler basis. 
The "New Here" button is optional but very useful. It lets you quickly create a new tiddler that is automatically tagged with the tag you're looking at. Eg if you are looking at Addresses, clicking "new here" creates a new Address.
This is also optional. Because we often want to view a tag as a tiddler this makes the default action when you click on a tag. You can access to other tag functions by clicking the drop down icon to the right of the tag.
TagglyTagging (also known as "TagglyWiki Style Tagging") is set of plugins, templates and styles you can install in your TiddlyWiki that let you use tagging in powerful and useful ways.
Actually a lot less than there used to be since TiddlyWiki version 2.0! (TagglyTagging introduced the concept that a tag was a tiddler and vice-versa. Since version 2.0 this concept central to tagging in TiddlyWiki. See "Where did it come from?" below for more information).
TagglyTagging lets you better utilise the power of tagging your TiddlyWiki data. 
A brief list of what you can do with TagglyTagging:
* Dynamically define the structure of your data.
* Avoid hand maintaining "index" pages of your tiddlers.
* Make all your data easily locatable via your tag heirachy.

Other reasons you should give TagglyTagging a try:
* You find you aren't getting a lot of value from tagging your tiddlers in TiddlyWiki.
* You are sometimes annoyed by tag popup menus especially when they are longer than your page.

Sounds good but I'm not feelin' it...
* It is hard to explain without a demonstration. Try the TagglyTaggingTutorial.
The easiest way is to download an empty file from [[Download]]. You can of course install each component listed at TagglyTagging.
See [[TagglyTagging History]].
!Bill
* Go over TPS reports

!Milton 
* Get Back Stapler
<<tag acronym>>s with tiddlers.
<<tabs title
Computing "Computing Acronyms" "Computing Acronyms"
OpTier "OpTier Acronyms" "OpTier Acronyms"
Financial "Financial Acronyms" "Financial Acronyms"
Tiddlers "Acronyms with Tiddlers" "Acronyms with Tiddlers"
>>
Consistently providing high quality software engineering solutions to cutting edge problems across heterogeneous languages <<tag java>> <<tag c++>> <<tag ada>> and environments <<tag linux>> <<tag pc>> <<tag osx>> levering the synergy of open source solutions with custom development.

Domains of experience include: Financial,  WEB, grid/data grid, e-retailing, mobile apps, ATC, PIMs, real-time, and embedded.

Please explore the menu links to the left. If you found this site with a search engine, try re-entering your search here, as google is not smart enough yet to jump to the relevant tiddly wiki page:
 
<<search>>

For my CV please visit [[cv-library|http://www.cv-library.co.uk/cgi-bin/quickview.cgi?ref=931013]] and click [[here for my linked in profile|http://www.linkedin.com/in/chrisashley]]
My obfuscated e-mail address is: chris (dot) ashley (at) in-collaboration.co.uk
http://www.itjobswatch.co.uk/
DataSynapse http://www.datasynapse.com/
DataSynapse Support http://customer.datasynapse.com 
OpTier http://www.optier.com/
OpTier Support https://na1.salesforce.com/sserv/login.jsp?orgId=00D3000000009uB


http://fifarms/ [[Fixed Income Farm Information]]

[[Tangosol]] http://www.tangosol.com/
Rami's OpTier Builds \\ldndwm342423\Optier\

Oracle http://www.oracle.com chris.ashley@b a r c a p.com

!Ports

|8000|DS Manager|
|8080/apex|Oracle DB manager|
|8081/corefirst|CoreFirst Server|
|5566|[[CoreFirst Agent]]|
|8181|Tomcat admin-admin|

Farm Owners
Y:\Ldn\it\HPC\Application_support\Inventory\LDN Farms.xls

http://www.ece.osu.edu/ssh/
*[[CoreFirst Terms]]
*[[DataSynapse Terms]]
*[[Financial Terms]]
*[[Computing Terms]]
*[[Java Terms]]
*[[Mathematical Terms]]

*[[Apama Terms]]
16/07/08 SCJP Sun Certified Java Programmer 5.0  self study, exam taken and passed.
../../08 Financial Modeling - Excelian Option trading, pricing....
22/01/07 DS 1 day admin course - Barclays Bank by Barry Childe
10/01/07 Tangasol Coherance - onsite Dave Oliva
23/11/06 OpTier CoreFirst Developers 2 day course 
05/11/06 DataSynapse Administrators 2 day course 
<html><br><a href="http://www.maploco.com/view.php?id=768218"><img border=0 src="http://www.maploco.com/vmap/768218.png" alt="Visitor Map"></a><br><a href="http://www.maploco.com/">Create your own visitor map!</a><br></html>

<html>
<!-- Start of Globel Code -->
<a href="http://www.statistics.001.c-o-u-n-t.com?count=in-collaoration-wiki" target="_blank">
<img src="http://001.c-o-u-n-t.com/count-010.pl?count=in-collaoration-wiki&type=links&prog=unique" border="0" alt="Myspace" title="Myspace"></a>
<br><a href="http://www.c-o-u-n-t.com" target="_blank">
<font size="1">Myspace</font></a>
<noscript>The following text will not be seen after you upload your website,
please keep it in order to retain your counter functionality 
<br><a href="http://www.5wd.net/bikes/" target="_blank">Motorbikes</a><br> 
</noscript>
<!-- End of Globel Code -->
</html>
Application Configuration Information Database or Atomicity Consistency Isolation Durability
Applications Functional Heads
!Asynchronous JavaScript and Xml

Dev technique to make web pages more interactive by tweaking small amounts of of data, so a web page dose not have to be reloaded.

XMLHttpRequest object is used to exchange data with the web server.
!Aspect Oriented Programming

Adding new methods into a class, before/after/around for either the caller or callee sides of a method call. [[Javassist]] is an example to enable ASP, and so to is the AOP interface in spring.

[[Poin Cut]] is a [[Join Point]] plus an [[Aspect]]
[[Join Point]] the target position for code changes, i.e. before or after a method call (often this will be multiple methods)
[[Aspect]] is the method calls to be inserted at the [[Join Point]] 
[[Advice]] is the concrete implementation of the Aspect, i.e. the actual code
!GTD and TW 2.0
This is TiddlyWiki <<version>> using StyleSheet and PageTemplate tiddlers for the GTD Theme.

GTD Tiddly Wiki is a GettingThingsDone adaptation by NathanBowers of JeremyRuston's Open Source TiddlyWiki. The purpose of GTD Tiddly Wiki is to give users a single repository for their GTD lists and support materials so they can create/edit lists, and then print directly to 3x5 cards for use with the HipsterPDA.

!Features Include:
* Free and Open Source.
* Easy to update.
* Prints directly to 3x5.
* Searchable.
* Exists as a single, portable, cross platform file.
* It runs on your computer, so you can make changes when you're not online. It's not a ServerSide thing.
!Get started:
Start by saving GTDTiddlyWiki to your computer (right click on [[this link|#]] and select 'Save link as...' or 'Save target as...' See SaveChanges for details).
 
You can edit entries, or "Tidders", by clicking "edit" or double clicking anywhere on the Tiddler. When you click "done" or press [ctrl+enter] your changes are saved.

There are some pre-populated action lists in the MainMenu on the left. If you want to start with a blank slate, here is an [[empty template|http://www.checkettsweb.com/tw/gtd_empty.htm]].

!!More information:
*SupportedBrowsers
*KeyFeatures
*KeyboardShortcuts
*[[Print3x5]]
*FormattingInstructions (create lists, headings, and other formatting)
*AboutTiddlers
*CreateTiddlers
*DeleteTiddlers
* PermaView
*KnownBugs
* HowToUpgrade
* ServerSide version.
*Jeremy's original HelloThere.

Thanks to JeremyRuston for creating such a great Open Source project!
----
TiddlyWiki and GTD Tiddly Wiki are published under an OpenSourceLicense and carry NoWarranty.

Current Version: <<version>> | RevisionHistory | UpdateNotification
Manages user access to Calypso applications and functions. Runs adjunct to the DataServer.
<<forEachTiddler 
 where 
 'tiddler.tags.contains("acronym")'
 write
'"|[["+tiddler.title+"]]|"+tiddler.text.slice(0,tiddler.text.indexOf("\n")).replace("!","")+"|\<\<tags "+tiddler.title+"\>\>|\n"'
>>
/%
// The Macros tag source was modified by CJA to produce tags in one line
config.macros.tags.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 params = paramString.parseParams("anon",null,true,false,false);
// var theList = createTiddlyElement(place,"ul");
 var title = getParam(params,"anon","");
 if(title && store.tiddlerExists(title))
 tiddler = store.getTiddler(title);
 var sep = getParam(params,"sep"," ");
 var lingo = config.views.wikified.tag;
 var prompt = tiddler.tags.length == 0 ? lingo.labelNoTags : lingo.labelTags;
// createTiddlyElement(theList,"li",null,"listTitle",prompt.format([tiddler.title]));
 for(var t=0; t<tiddler.tags.length; t++)
 {
 
 if (!tiddler.tags[t].contains("acronym"))
 createTagButton(place,tiddler.tags[t],tiddler.title);
// createTagButton(createTiddlyElement(theList,"li"),tiddler.tags[t],tiddler.title);
// if(t<tiddler.tags.length-1)
// createTiddlyText(theList,sep);
 }
}

%/
Springs implementation of an MQ

Advantages, simple to use. Dowlaod and run (no configuration, at least to start with)

ActiveMQ Console at {{{http://localhost:8161/admin}}}  - can; view queues, monitor, empty, and purge
ActiveMQ Web Demos at {{{http://localhost:8161/demo}}} 


example JmsContext.properties
{{{

	<!--  ActiveMQ destinations to use  -->
	<amq:queue id="rmQueue" physicalName="undadog.jms.rmqueue" />
  
    <!-- a pooling based JMS provider -->
	<bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFactory"
		destroy-method="stop">
		<property name="connectionFactory">
			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
				<property name="brokerURL">
					<value>${jms.brokerURL}</value>
				</property>
			</bean>
		</property>
	</bean>
  
  
    <!-- Spring JMS Template -->
	<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
		<property name="connectionFactory" ref="jmsFactory" />
	</bean>

}}}

example code to write an object to a queue
{{{
	private JmsTemplate jmsTemplate;
	private Destination rmQueue;
		
	@Override
	public void handleEvent(final RmEvent event) {
		jmsTemplate.send(rmQueue, new MessageCreator() {
			public Message createMessage(Session session) throws JMSException {
				logger.debug("Sending event message");
				ObjectMessage message = session.createObjectMessage(event);
				return message;
			}
		});
	}
}}}

example reading from a queue
{{{
public class RmMessageListener implements MessageListener, ApplicationContextAware {

	private ApplicationContext applicationContext;
	
	public void onMessage(Message message) {
		try {
			if (message instanceof ObjectMessage) {
				try {
					Object o = ((ObjectMessage) message).getObject();
					logger.debug("Message received "+o.getClass().getName());
}}}
Amdahl's Law measures the speedup gained by adding more processors; states that there is an upper limit on the speed improvements yielded by adding more processors. 

According to the law, if as little as 10% of computing power is invested in overhead, then even a hundred-fold increase in processing power yields only 9.17 times the processing speed.

The [[Scalability Crash Barrier]] and the [[Scalability Cost Barrier]] when scaling either makes little or no difference or just costs too much to gain any significant return.

Any application that shares data , partial results at checkpoints, is four our purposes stateful and sooner or later succumbs to Amdahl's Law.

[[IMDG]] ~In-Memory Data Grid is the antidote for Amdahl's Law, by overcoming the statefulness challenge.
|[[CEP]]|Complex Event Processing|
|[[EPL]]|Event Processing Language|
|monitor|The outer most structure in EPL, akin to a class in Java/C++|
|action|Similar to a method or procedure|
|event|A well ordered structure of data|
For transaction that are handled by the same thread:
RequestID + ThreadID
otherwise
RequestID + in-tier ID
!Binary Large O''b''ject

see also [[CLOB]]
The ''Bank of England'' is now 300 years old and started life as a private bank to raise money to go to war for William and Mary.

Now it is nationalised and is responsible for the financial stability of the country, which it maintains via the [[MPC]] which sets the [[Repo rate]], effectively the [[Base Rate]] according to inflation targets set by the government and measured by [[CPI]].

Occasionally the Bank of England steps in to ensure stability, such as propping up Northern Rock and stopping the first run on a UK bank for 150 years. However it dose not always do so, as in the cases of BCCI Bank and Bearings Banks.
Singleton class for use with CoreFirst dynamic instrumentation.

It assumes that the thread on which these calls are made has a valid [[Transaction Context]] saved
! Complex Event Processing

In particular Apama's approach to turn the store-index-query traditional data processing on its head through a real-time correlator and collaborating  [[Monitor]]s in effect query-index-store.
/***
''Name:'' Calendar plugin
''Version:'' <<getversion calendar>> (<<getversiondate calendar "DD MMM YYYY">>)
''Author:'' SteveRumsby

''Configuration:''

|''First day of week:''|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|
|''First day of weekend:''|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|

''Syntax:'' 
|{{{<<calendar>>}}}|Produce a full-year calendar for the current year|
|{{{<<calendar year>>}}}|Produce a full-year calendar for the given year|
|{{{<<calendar year month>>}}}|Produce a one-month calendar for the given month and year|
|{{{<<calendar thismonth>>}}}|Produce a one-month calendar for the current month|
|{{{<<calendar lastmonth>>}}}|Produce a one-month calendar for last month|
|{{{<<calendar nextmonth>>}}}|Produce a one-month calendar for next month|

***/
// //Modify this section to change the text displayed for the month and day names, to a different language for example. You can also change the format of the tiddler names linked to from each date, and the colours used.

// // ''Changes by ELS 2005.10.30:''
// // config.macros.calendar.handler()
// // ^^use "tbody" element for IE compatibility^^
// // ^^IE returns 2005 for current year, FF returns 105... fix year adjustment accordingly^^
// // createCalendarDays()
// // ^^use showDate() function (if defined) to render autostyled date with linked popup^^
// // calendar stylesheet definition
// // ^^use .calendar class-specific selectors, add text centering and margin settings^^

//{{{
config.macros.calendar = {};

config.macros.calendar.monthnames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
config.macros.calendar.daynames = ["M", "T", "W", "T", "F", "S", "S"];

config.macros.calendar.weekendbg = "#c0c0c0";
config.macros.calendar.monthbg = "#e0e0e0";
config.macros.calendar.holidaybg = "#ffc0c0";

//}}}
// //''Code section:''
// (you should not need to alter anything below here)//
//{{{
if(config.options.txtCalFirstDay == undefined)
  config.options.txtCalFirstDay = 0;
if(config.options.txtCalStartOfWeekend == undefined)
  config.options.txtCalStartOfWeekend = 5;

config.macros.calendar.tiddlerformat = "0DD/0MM/YYYY";  // This used to be changeable - for now, it isn't// <<smiley :-(>> 

version.extensions.calendar = { major: 0, minor: 6, revision: 0, date: new Date(2006, 1, 22)};
config.macros.calendar.monthdays = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];

config.macros.calendar.holidays = [ ]; // Not sure this is required anymore - use reminders instead
//}}}

// //Is the given date a holiday?
//{{{
function calendarIsHoliday(date)
{
 var longHoliday = date.formatString("0DD/0MM/YYYY");
 var shortHoliday = date.formatString("0DD/0MM");

 for(var i = 0; i < config.macros.calendar.holidays.length; i++) {
   if(config.macros.calendar.holidays[i] == longHoliday || config.macros.calendar.holidays[i] == shortHoliday) {
     return true;
   }
 }
 return false;
}
//}}}

// //The main entry point - the macro handler.
// //Decide what sort of calendar we are creating (month or year, and which month or year)
// // Create the main calendar container and pass that to sub-ordinate functions to create the structure.
// ELS 2005.10.30: added creation and use of "tbody" for IE compatibility and fixup for year >1900//
// ELS 2005.10.30: fix year calculation for IE's getYear() function (which returns '2005' instead of '105')//
//{{{
config.macros.calendar.handler = function(place,macroName,params)
{
   var calendar = createTiddlyElement(place, "table", null, "calendar", null);
   var tbody = createTiddlyElement(calendar, "tbody", null, null, null);
   var today = new Date();
   var year = today.getYear();
   if (year<1900) year+=1900;
   if (params[0] == "thismonth")
  {
      cacheReminders(new Date(year, today.getMonth(), 1, 0, 0), 31);
      createCalendarOneMonth(tbody, year, today.getMonth());
  } 
  else if (params[0] == "lastmonth") {
      var month = today.getMonth()-1; if (month==-1) { month=11; year--; }
      cacheReminders(new Date(year, month, 1, 0, 0), 31);
      createCalendarOneMonth(tbody, year, month);
   }
   else if (params[0] == "nextmonth") {
      var month = today.getMonth()+1; if (month>11) { month=0; year++; }
      cacheReminders(new Date(year, month, 1, 0, 0), 31);
      createCalendarOneMonth(tbody, year, month);
   }
   else {
      if (params[0]) year = params[0];
      if(params[1])
      {
         cacheReminders(new Date(year, params[1]-1, 1, 0, 0), 31);
         createCalendarOneMonth(tbody, year, params[1]-1);
      }
      else
      {
         cacheReminders(new Date(year, 0, 1, 0, 0), 366);
         createCalendarYear(tbody, year);
      }
   }
  window.reminderCacheForCalendar = null;
}
//}}}
//{{{
//This global variable is used to store reminders that have been cached
//while the calendar is being rendered.  It will be renulled after the calendar is fully rendered.
window.reminderCacheForCalendar = null;
//}}}
//{{{
function cacheReminders(date, leadtime)
{
  if (window.findTiddlersWithReminders == null)
    return;
  window.reminderCacheForCalendar = {};
  var leadtimeHash = [];
  leadtimeHash [0] = 0;
  leadtimeHash [1] = leadtime;
  var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);
  for(var i = 0; i < t.length; i++) {
    //just tag it in the cache, so that when we're drawing days, we can bold this one.
     window.reminderCacheForCalendar[t[i]["matchedDate"]] = "reminder:" + t[i]["params"]["title"]; 
  }
}
//}}}
//{{{
function createCalendarOneMonth(calendar, year, mon)
{
  var row = createTiddlyElement(calendar, "tr", null, null, null);
  createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, true, year, mon);
  row = createTiddlyElement(calendar, "tr", null, null, null);
  createCalendarDayHeader(row, 1);
  createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}

//{{{
function createCalendarMonth(calendar, year, mon)
{
  var row = createTiddlyElement(calendar, "tr", null, null, null);
  createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, false, year, mon);
  row = createTiddlyElement(calendar, "tr", null, null, null);
  createCalendarDayHeader(row, 1);
  createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}

//{{{
function createCalendarYear(calendar, year)
{
  var row;
  row = createTiddlyElement(calendar, "tr", null, null, null);
  var back = createTiddlyElement(row, "td", null, null, null);
  var backHandler = function() {
      removeChildren(calendar);
      createCalendarYear(calendar, year-1);
    };
  createTiddlyButton(back, "<", "Previous year", backHandler);
  back.align = "center";

  var yearHeader = createTiddlyElement(row, "td", null, "calendarYear", year);
  yearHeader.align = "center";
  yearHeader.setAttribute("colSpan", 19);

  var fwd = createTiddlyElement(row, "td", null, null, null);
  var fwdHandler = function() {
    removeChildren(calendar);
    createCalendarYear(calendar, year+1);
  };
  createTiddlyButton(fwd, ">", "Next year", fwdHandler);
  fwd.align = "center";

  createCalendarMonthRow(calendar, year, 0);
  createCalendarMonthRow(calendar, year, 3);
  createCalendarMonthRow(calendar, year, 6);
  createCalendarMonthRow(calendar, year, 9);
}
//}}}

//{{{
function createCalendarMonthRow(cal, year, mon)
{
  var row = createTiddlyElement(cal, "tr", null, null, null);
  createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);
  createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);
  createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);
  row = createTiddlyElement(cal, "tr", null, null, null);
  createCalendarDayHeader(row, 3);
  createCalendarDayRows(cal, year, mon);
}
//}}}

//{{{
function createCalendarMonthHeader(cal, row, name, nav, year, mon)
{
  var month;
  if(nav) {
    var back = createTiddlyElement(row, "td", null, null, null);
    back.align = "center";
    back.style.background = config.macros.calendar.monthbg;

/*
    back.setAttribute("colSpan", 2);

    var backYearHandler = function() {
      var newyear = year-1;
      removeChildren(cal);
      cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);
      createCalendarOneMonth(cal, newyear, mon);
    };
    createTiddlyButton(back, "<<", "Previous year", backYearHandler);
*/
    var backMonHandler = function() {
      var newyear = year;
      var newmon = mon-1;
      if(newmon == -1) { newmon = 11; newyear = newyear-1;}
      removeChildren(cal);
      cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
      createCalendarOneMonth(cal, newyear, newmon);
    };
    createTiddlyButton(back, "<", "Previous month", backMonHandler);


    month = createTiddlyElement(row, "td", null, "calendarMonthname", name)
//    month.setAttribute("colSpan", 3);
    month.setAttribute("colSpan", 5);

    var fwd = createTiddlyElement(row, "td", null, null, null);
    fwd.align = "center";
    fwd.style.background = config.macros.calendar.monthbg; 

//    fwd.setAttribute("colSpan", 2);
    var fwdMonHandler = function() {
      var newyear = year;
      var newmon = mon+1;
      if(newmon == 12) { newmon = 0; newyear = newyear+1;}
      removeChildren(cal);
      cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
      createCalendarOneMonth(cal, newyear, newmon);
    };
    createTiddlyButton(fwd, ">", "Next month", fwdMonHandler);
/*
    var fwdYear = createTiddlyElement(row, "td", null, null, null);
    var fwdYearHandler = function() {
      var newyear = year+1;
      removeChildren(cal);
      cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);
      createCalendarOneMonth(cal, newyear, mon);
    };
    createTiddlyButton(fwd, ">>", "Next year", fwdYearHandler);
*/
  } else {
    month = createTiddlyElement(row, "td", null, "calendarMonthname", name)
    month.setAttribute("colSpan", 7);
  }
  month.align = "center";
  month.style.background = config.macros.calendar.monthbg;
}
//}}}

//{{{
function createCalendarDayHeader(row, num)
{
  var cell;
  for(var i = 0; i < num; i++) {
    for(var j = 0; j < 7; j++) {
      var d = j + (config.options.txtCalFirstDay - 0);
      if(d > 6) d = d - 7;
      cell = createTiddlyElement(row, "td", null, null, config.macros.calendar.daynames[d]);

      if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))
        cell.style.background = config.macros.calendar.weekendbg;
    }
  }
}
//}}}

//{{{
function createCalendarDays(row, col, first, max, year, mon)
{
  var i;
  for(i = 0; i < col; i++) {
    createTiddlyElement(row, "td", null, null, null);
  }
  var day = first;
  for(i = col; i < 7; i++) {
    var d = i + (config.options.txtCalFirstDay - 0);
    if(d > 6) d = d - 7;
    var daycell = createTiddlyElement(row, "td", null, null, null);
    var isaWeekend = ((d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))? true:false);

    if(day > 0 && day <= max) {
      var celldate = new Date(year, mon, day);
      // ELS 2005.10.30: use <<date>> macro's showDate() function to create popup
      if (window.showDate) {
        showDate(daycell,celldate,"popup","DD","DD-MMM-YYYY",true, isaWeekend); 
      } else {
        if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;
        var title = celldate.formatString(config.macros.calendar.tiddlerformat);
        if(calendarIsHoliday(celldate)) {
          daycell.style.background = config.macros.calendar.holidaybg;
        }
        if(window.findTiddlersWithReminders == null) {
          var link = createTiddlyLink(daycell, title, false);
          link.appendChild(document.createTextNode(day));
        } else {
          var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);
        }
      }
    }
    day++;
  }
}
//}}}

// //We've clicked on a day in a calendar - create a suitable pop-up of options.
// //The pop-up should contain:
// // * a link to create a new entry for that date
// // * a link to create a new reminder for that date
// // * an <hr>
// // * the list of reminders for that date
//{{{
function onClickCalendarDate(e)
{
  var button = this;
  var date = button.getAttribute("title");
  var dat = new Date(date.substr(6,4), date.substr(3,2)-1, date.substr(0, 2));

  date = dat.formatString(config.macros.calendar.tiddlerformat);
  var popup = createTiddlerPopup(this);
  popup.appendChild(document.createTextNode(date));
  var newReminder = function() {
    var t = store.getTiddlers(date);
    displayTiddler(null, date, 2, null, null, false, false);
    if(t) {
      document.getElementById("editorBody" + date).value += "\n<<reminder day:" + dat.getDate() +
                                                                                         " month:" + (dat.getMonth()+1) +
                                                                                         " year:" + (dat.getYear()+1900) + " title: >>";
    } else {
      document.getElementById("editorBody" + date).value = "<<reminder day:" + dat.getDate() +
                                                                                       " month:" + (dat.getMonth()+1) +
                                                                                       " year:" + (dat.getYear()+1900) + " title: >>";
    }
  };
  var link = createTiddlyButton(popup, "New reminder", null, newReminder); 
  popup.appendChild(document.createElement("hr"));

  var t = findTiddlersWithReminders(dat, [0,14], null, 1);
  for(var i = 0; i < t.length; i++) {
    link = createTiddlyLink(popup, t[i].tiddler, false);
    link.appendChild(document.createTextNode(t[i].tiddler));
  }
}
//}}}

//{{{
function calendarMaxDays(year, mon)
{
 var max = config.macros.calendar.monthdays[mon];
 if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) {
 max++;
 }
 return max;
}
//}}}

//{{{
function createCalendarDayRows(cal, year, mon)
{
 var row = createTiddlyElement(cal, "tr", null, null, null);

 var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
 if(first1 < 0) first1 = first1 + 7;
 var day1 = -first1 + 1;
 var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
 if(first2 < 0) first2 = first2 + 7;
 var day2 = -first2 + 1;
 var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
 if(first3 < 0) first3 = first3 + 7;
 var day3 = -first3 + 1;

 var max1 = calendarMaxDays(year, mon);
 var max2 = calendarMaxDays(year, mon+1);
 var max3 = calendarMaxDays(year, mon+2);

 while(day1 <= max1 || day2 <= max2 || day3 <= max3) {
 row = createTiddlyElement(cal, "tr", null, null, null);
 createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
 createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;
 createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;
 }
}
//}}}

//{{{
function createCalendarDayRowsSingle(cal, year, mon)
{
 var row = createTiddlyElement(cal, "tr", null, null, null);

 var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
 if(first1 < 0) first1 = first1+ 7;
 var day1 = -first1 + 1;
 var max1 = calendarMaxDays(year, mon);

 while(day1 <= max1) {
 row = createTiddlyElement(cal, "tr", null, null, null);
 createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
 }
}
//}}}

// //ELS 2005.10.30: added styles
//{{{
setStylesheet(".calendar, .calendar table, .calendar th, .calendar tr, .calendar td { font-size:10pt; text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }", "calendarStyles");
//}}}
<<calendar year>>
http://www.calypso.com 

MainEntry - TaskStation LegalEntityChooser
DataServer - AccessServer
EventServer

[[Calypso workflow]]
[[Calypso events|PSEvent]] PSEvent, PSEventDomainChange, PSEventTrade handled by PSConnection passing in a PSSubscriber implementation.
[[Calypso status]]

![[Calypso Engine]]s
|[[AccountingEngine]]|
|[[BalanceEngine]]|
|[[BillingEngine]]|
|[[CreSenderEngine]]|
|[[DiaryEngine]]|
|[[ImportMessageEngine]]|
|[[IncommingMessageEngine]]|
|[[InventoryEngine]]|
|[[LimitEngine]]|
|[[LiquidityEngine]]|
|[[MarginCallPositionEngine]]|
|[[MessageEngine]]|
|[[MutationEngine]]|
|[[PositionEngine]]|
|[[PositionMonitorEngine]]|
|[[SchedulingEngine]]|
|[[SenderEngine]]|
|[[TaskEngine]]|
|[[TransferEngien]]|

{{{com.calypso.engine.Engine}}} abstract base class for all Engines. implements PSSubscriber

An engine is any application that automatically responds to certain type of events from the EventServer.

1. Write engine, one abstract method to implement: {{{process(PSEvent event)}}}

2. Establish engine and its subscriptions via [[SQL]] in the database.


Events are dynamically generated based upon the [[Calypso workflow]] configuration. For each "[[Calypso status]]" in a [[Calypso workflow]], an event is generated when the trade / transfer / message reaches this [[Calypso status]].

E.g When a trade moves to status VERIFIED it generates the event VERIFIED_TRADE event.
!Calypso Status

''Calypso Status'' Is synonymous with a state within a state digram know as a [[Calypso workflow]]. A ''Calypso status'' changes as the workflow is followed from state to state, and [[Calypso events]] are generated with each transition.
Workflow is required to carryout any back office functionality.
 
The idea is for the work flow to carryout [[STP]] and for the user only to intervene in exceptional circumstances.

There are a number of engines running in the background, which react to events, e.g. a trade is saved, a quote is saved. a payment is settled. Based on the configuration of the workflow, new  events will be generated: a [[confirmation]], a payment, a [[posting]], a [[position]].

The workflow is managed by the Calypso DataServer. No engines need to run, however tasks with kick-off cut-off timers will need the [[TaskEngine]].

For my CV you can visit [[cv-library|http://www.cv-library.co.uk/cgi-bin/quickview.cgi?ref=931013]]
My obfuscated e-mail address is: chris (dot) ashley (at) in-collaboration.co.uk
see [[Chris Ashley]]
/***
|Name:|CloseOnCancelPlugin|
|Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.commands.cancelTiddler,{

	handler_mptw_orig_closeUnsaved: config.commands.cancelTiddler.handler,

	handler: function(event,src,title) {
		this.handler_mptw_orig_closeUnsaved(event,src,title);
		if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))
			story.closeTiddler(title,true);
	 	return false;
	}

});

//}}}

Oracle bought Tangosol Coherence

http://www.tangosol.com/index.jsp

Coherence is a Data Grid, a distributed memory store, aims are reliability, availability, performance. With automatic discovery and self healing architecture that uses no fail over, no master slaves, no central registries, & no voting.

P2P architecture, No Voting, each cache node maintains a cluster state.
Custom UDP packaging of messages for broadcast information, TCP for PPP

Get: Local, if not local then get from remote cache node.
Put: Synchronous to Primary cache node and backup (mandated to be on a remote machine), asynchronous invalidates modified object stored in remote “Near” caches.

N levels of backup of each object, where each object is stored on a different machine.

Key is an object, from which a hash is used to determine which machine it will be found on, if the target machine is down, then has used again to the backup

Grid automatically reconfigures upon the loss of a cache nodes.

Mutation queues to modify objects in the grid.

Continuous object queries distributed, built up from java/c++ object (not SQL).
Aggregators are distributed to the objects that are being watched.

Core system written in Java
C++/Java no 3rd party libraries

Terms:

[[Data Grid]]
[[Near Cache]]
[[PIF]]/[[POF]]

Limitations:

1000 nodes joining simultaneously, C++ extensions are in development (implemented .NET)
Network, is the main bottle neck, but maximised by the custom network packet building and UDP.


!Questions

1. What self balancing is carried out to mitigate the different CPU, Disk, & Network performance of each data cache node with relation to the location and quantity of objects stored at each node?

2. What are the performance trade-offs associated with the benefits of increased data integrity gained from increasing the levels of backup?

3. What strategy is used for choosing the location of backup objects and can this be modified to take into account physical topology?

4. WAN? How dose Tangosol coherence approach the problem of high latency nodes?

!Answers by me

1. At the moment no consideration is given, although it is being looked into.

2. A put into the cache will not return until all the backups have been safely completed, hence the time taken will be dependant upon the slowest node. In the extreme case every node holds a copy, which is a Replicated Topology that has limited scalability but is ideal for caching of involitile data.

3. None at present.

4. Best not to include high latency nodes in the same cluster, instead synchronise data between two separate clusters.
Name: MptwBlue
Background: #fff
Foreground: #000
PrimaryPale: #cdf
PrimaryLight: #57c
PrimaryMid: #114
PrimaryDark: #012
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

[[Computing Acronyms]]

|[[ACID]]|Atomicity Consistency Isolation Durability|<<tag database>>|
|ACL|Access Control List|<<tag security>>|
|[[AOP]]|Aspect Oriented Programming|<<tag java>>|
|[[AJAX]]|Asynchronous JavaScript and Xml|<<tag xml>> <<tag javascript>>|
|[[DCL]]|Data Control Language|<<tag sql>><<tag database>>|
|[[DML]]|Data Manipulation Language|<<tag sql>><<tag database>>|
|[[DDL]]|Data Definition Language|<<tag sql>><<tag database>>|
|[[DDT]]|Direct Data Transfer|<<tag datasynapse>>|
|DNS|Domain Name System|<<tag networking>>|
|DS|DataSynapse|<<tag datasynapse>><<tag grid>>|
|[[EDT]]|Event Dispatch Thread|<<tag java>>|
|ESB|Enterprise Service Bus|enterprise|
|[[EJB]]|Enterprise Java Bean|<<tag ejb>> <<tag java>>|
|[[HKLM]]|HKEY_LOCAL_MACHINE|<<tag pcregistry>>|
|IoC|Inversion of Control|<<tag pattern>>|
|[[IPC]]|Interprocess Communication||
|[[IMDG]]|In-Memory Data Grid|<<tag datagrid>>|
|MIME|Multipurpose Internet Message Extensions e,g, {{{Content-type: application/octet-stream}}}| |
|[[JAD]]|Java Decompiler|<<tag java>>|
|[[JCP]]|Java Community Process|<<tag java>>|
|jBPM|java Business Process Management|<<tag java>>|
|[[JERI]]|Jini Extensible Remote Invocation|<<tag java>>|
|[[JMS]]|Java Message Service|<<tag ejb>> <<tag java>>|
|JMX|Java Management Extension|<<tag java>>|
|[[JNDI]]|Java Naming and Directory Interface [[javax.naming]]|<<tag java>>|
|JRMP|Java Remote Method Protocol|<<tag java>>|
|JSR|Java Specification Request|<<tag java..|
|[[LPCSTR]]|Long Pointer to Const String|<<tag c++>>|
|mBean|Managed Bean|<<tag java>>|
|[[MDB]]|Message Driven Bean, triggered by [[JMS]]|<<tag ejb>><<tag java>>|
|[[MVC]]|Model View Controller|<<tag pattern>>|
|MSI|Microsoft Installer||
|NIC|Network Information Centre|<<tag networking>>|
|NIS|Network Information Service|<<tag networking>>|
|NAT|Network Address Translation|<<tag networking>>|
|[[OPML]]|Outline Processor Markup Language|<<tag xml>>|
|PIF/POF|Portable Invocation Format/Portable Object Format|<<tag datagrid>><<tag coherence>>|
|[[POJO]]|Plain Old Java Object|<<tag java>>|
|[[RMI]]|Remote Method Invocation|<<tag java>>|
|RPM|Red Hat Package Manager|<<tag linux>>|
|RTE|Real Time Enterprise||
|SaaS|Software as a Service|
|SBA|Space Based Architecture|<<tag grid>><<tag datagrid>><<tag gigaspace>>|
|[[SID]]|System Identifier|<<tag oracle>> <<tag database>>|
|TLD|Top Level Domain|networking|
|[[TLS]]|Thread Local Storage|<<tag c++>>|
|TNS|Transparent Network Substrate|<<tag oracle>> <<tag database>>|
|TSM|Tivoli Storage Manager||
|[[UDP]]|User Datagram|<<tag networking>>|
|VPN|Virtual Private Network|<<tag networking>>|
|WLS|WebLogic Server|<<tag java>><<tag webserver>>|
|XTP|Xpress Transfer Protocol|<<tag networking>>|
|Abstraction|<<tag ooa/ood>>|Decomposition into appropriate classes, i.e. a Car into Engine, Wheels, Dashboard, etc.|
|Constructor Injection|<<tag designPattern>>|Injection of runtime values via constructor arguments|
|Dangling Pointer|<<tag c/c++>>|Pointer to an object for which its memory has been freed|
|Dependency Injection|<<tag designPattern>>|A flavour of IoC remove explicit dependence on container API's by using Setter & Constructor Injection through reflection instead of interfaces|
|Encapsulation|<<tag ooa/ood>>|Hiding functional details from the users of the class, i.e. making data private, interfaces|
|[[CNAME]]|<<tag network>>|Translates domain name to IP Address|
|Enterprise Service Bus [[ESB]]|Enterprise|unifies message oriented, event driven and service oriented approaches for integrating applications and service. |
|Flattening|<<tag file>>|Serialising an object to a file|
|globbing|<<tag unix>>|Comes from glob() function to expand filenames, simple pattern matching behavior|
|Hollywood Principle|<<tag designPattern>>|Don't call me, I'll call you|
|[[Inner Join]]|<<tag database>>|Result is the intersection of two tables|
|Inflating|<<tag file>>|Creating an object from data held in a file|
|Inversion of Control|<<tag design Pattern>>|IoC frame work calls your code, as in the Hollywood Principle|
|[[Outer Join]]|<<tag database>>|Returns all of the right or left table with data fields valid from the other table where the two intersect|
|[[UML]] Operation|<<tag UML>>|is synonymous to a method in Java|
|Tivoli Storage Manager [[ITSM]]| |is a centralized policy-based data backup and recovery software|
|[[SAN]] Tier1|<<tag disc>>|Highest availability disk storage, 7x24 Databases|
|[[SAN]] Tier2|<<tag disc>>|High availability based on standard RAID protection of disc, non-critical databases|
|Scale up| <<tag hpc>>|Increase the capacity of a singe machine, eg. add a second CPU|
|Scale out|<<tag hpc>>|Increase the capacity of a system by adding more machines|
|Setter Injection|<<tag designPattern>>|Injection of runtime values via JavaBean setters|
|Split Brain|<<tag datagrid>>|When a cluster splits apart due to a network break. On rejoin the biggest cluster wins, changes in the smaller cluster are lost.|
simon.baird/%%/@gmail.com
CoreFirstWhatWhyHow <<tag otti>> <<tag term otti>> <<tag te>>

!OpTier ~CoreFirst components
* [[OTTI]] sdk for development
* [[CoreFirst Server]] uses [[Oracle DB|CoreFirstOracle]]
* [[CoreFirst Agent]]
* [[CoreFirst Tier Extension]]

!~OpTier ~CoreFirst Concepts

*[[Tier]]
*[[Transaction Context]]
*[[UOW]]

--
[[JAD]] a very useful tool for looking inside 3rd party class files (Java decompiler).
[[Javassist]] a very useful technology to dynamically modify java byte code.
An agent sits between a Tier Extension [[TE]] and the [[CoreFirst Server]], and is responsible for classifying transactions and forwarding start,stop, and out of tier calls onto the server.
http access to the [[CoreFirst Server]] is usually {{{http://localhost:8081/corefirst}}} where ''localhost'' is replaced with your server's machine name.
Collects and analyzes chunks of data sent by [[Agents|CoreFirst Agent]] containing transaction data, onward calls and [[UOW]] timings. Data is limited to being stored in [[Oracle Databases|Oracle]].

Data can subsequently viewed vi the [[Console|CoreFirst Console]] connect with http://hostname:8081/corefirst 
|[[Association Key]]|Unique key for a UOW|
|Compound Transaction|A chain of //Transactions//|
|[[CoreFirst Agent]]|Run side by side to a Tier Extension, classifies ''transactions'' and forwards instrumentation data to the [[CoreFirst Server]]|
|Service Class|Defines the priority of a //Transaction//|
|Tier|A monitored software edifice, usually one process, but can also be a layer in a software stack|
|[[CoreFirst Tier Extension]]|Monitors & controls performance on a //tier// and sends captured data to //Context Agents//|
|CoreFirst Tier Handle|The tier handle returned by ottiTierStart and obtained when a tier starts|
|[[Invocation Key]]|Uniquely identifies a call to a UOW|
|[[Request Id]]|Unique key across tiers for a transaction|
|Transaction|Identifiable business process e.g. Account Balance Update|
|Transaction Class|Set of related normalised //Transactions// grouped together|
|Transaction Class Group|A set of related //Transaction Classes//|
|Transaction Context|Data associated with a //Transaction// that identifies it|
|[[Tier Extension]]|Code that adds instrumentation to a tier|
|Unit of Work|A [[UOW]] is the most granular object monitored by CoreFirst|
|User Transaction|1st transaction that starts a //Compound Transaction//|
see the acronym [[TE]]
!What:

End to End business transaction monitoring.
Visualization of enterprise architecture.
Ability to follow the flow of transactions.

Application monitoring software.
Classification of business transaction.
Prioritization of transactions across tiers. 

!Why:

Dependability - Critical business can be prioritized over the prosaic. 

Performance - Pinch points can be identified and improvements empirically proven with comparisons of historic data.

Utilization - By prioritizing transactions the peaks of demand can be smoothed making creating enhanced performance and maximum utilization of infrastructure.

Reliability - Notification of broken [[SLA]]s together with the enhanced ability to pin point the problems aids fast resolution.

Capacity Planning - Can see trends in historical transaction data and the infrastructure loadings, and use this to plan future needs.

!How:

Instrumentation is placed into tiers and within stacks, where it collects records and forwards measurements to a central server. On which, data is aggregated, collated and made available for both historical and real-time analysis.

Architecture:

|Tier|
|Client|
|[[Agent|CoreFirst Agent]]|

|[[CoreFirst Server]]|Oracle Database|


|Web browser to view[[CoreFirst Console]]|
Investment Banks

[[Primary Market]]
* [[New Issue]] - [[Equity]] & [[Bond]]
* [[Rights Issue]]
* [[M&A]]
* Research

|Company Name|Underwriter|Price Range|[[IPO]] Price|Current Price	|Return|
|Starent Networks	|Goldman Sachs	|$9.00-$11.00	|$12.00	|$14.01	|16.80%|
|Response Genetics	|Maxim Group LLC	|$7.00-$8.00	|$7.00	|$7.00	|0.00%|
					
/***
|''Name:''|CryptoFunctionsPlugin|
|''Description:''|Support for cryptographic functions|
***/
//{{{
if(!version.extensions.CryptoFunctionsPlugin) {
version.extensions.CryptoFunctionsPlugin = {installed:true};

//--
//-- Crypto functions and associated conversion routines
//--

// Crypto "namespace"
function Crypto() {}

// Convert a string to an array of big-endian 32-bit words
Crypto.strToBe32s = function(str)
{
	var be = Array();
	var len = Math.floor(str.length/4);
	var i, j;
	for(i=0, j=0; i<len; i++, j+=4) {
		be[i] = ((str.charCodeAt(j)&0xff) << 24)|((str.charCodeAt(j+1)&0xff) << 16)|((str.charCodeAt(j+2)&0xff) << 8)|(str.charCodeAt(j+3)&0xff);
	}
	while (j<str.length) {
		be[j>>2] |= (str.charCodeAt(j)&0xff)<<(24-(j*8)%32);
		j++;
	}
	return be;
};

// Convert an array of big-endian 32-bit words to a string
Crypto.be32sToStr = function(be)
{
	var str = "";
	for(var i=0;i<be.length*32;i+=8)
		str += String.fromCharCode((be[i>>5]>>>(24-i%32)) & 0xff);
	return str;
};

// Convert an array of big-endian 32-bit words to a hex string
Crypto.be32sToHex = function(be)
{
	var hex = "0123456789ABCDEF";
	var str = "";
	for(var i=0;i<be.length*4;i++)
		str += hex.charAt((be[i>>2]>>((3-i%4)*8+4))&0xF) + hex.charAt((be[i>>2]>>((3-i%4)*8))&0xF);
	return str;
};

// Return, in hex, the SHA-1 hash of a string
Crypto.hexSha1Str = function(str)
{
	return Crypto.be32sToHex(Crypto.sha1Str(str));
};

// Return the SHA-1 hash of a string
Crypto.sha1Str = function(str)
{
	return Crypto.sha1(Crypto.strToBe32s(str),str.length);
};

// Calculate the SHA-1 hash of an array of blen bytes of big-endian 32-bit words
Crypto.sha1 = function(x,blen)
{
	// Add 32-bit integers, wrapping at 32 bits
	add32 = function(a,b)
	{
		var lsw = (a&0xFFFF)+(b&0xFFFF);
		var msw = (a>>16)+(b>>16)+(lsw>>16);
		return (msw<<16)|(lsw&0xFFFF);
	};
	// Add five 32-bit integers, wrapping at 32 bits
	add32x5 = function(a,b,c,d,e)
	{
		var lsw = (a&0xFFFF)+(b&0xFFFF)+(c&0xFFFF)+(d&0xFFFF)+(e&0xFFFF);
		var msw = (a>>16)+(b>>16)+(c>>16)+(d>>16)+(e>>16)+(lsw>>16);
		return (msw<<16)|(lsw&0xFFFF);
	};
	// Bitwise rotate left a 32-bit integer by 1 bit
	rol32 = function(n)
	{
		return (n>>>31)|(n<<1);
	};

	var len = blen*8;
	// Append padding so length in bits is 448 mod 512
	x[len>>5] |= 0x80 << (24-len%32);
	// Append length
	x[((len+64>>9)<<4)+15] = len;
	var w = Array(80);

	var k1 = 0x5A827999;
	var k2 = 0x6ED9EBA1;
	var k3 = 0x8F1BBCDC;
	var k4 = 0xCA62C1D6;

	var h0 = 0x67452301;
	var h1 = 0xEFCDAB89;
	var h2 = 0x98BADCFE;
	var h3 = 0x10325476;
	var h4 = 0xC3D2E1F0;

	for(var i=0;i<x.length;i+=16) {
		var j,t;
		var a = h0;
		var b = h1;
		var c = h2;
		var d = h3;
		var e = h4;
		for(j = 0;j<16;j++) {
			w[j] = x[i+j];
			t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=16;j<20;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=20;j<40;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k2);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=40;j<60;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),(b&c)|(d&(b|c)),w[j],k3);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=60;j<80;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k4);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}

		h0 = add32(h0,a);
		h1 = add32(h1,b);
		h2 = add32(h2,c);
		h3 = add32(h3,d);
		h4 = add32(h4,e);
	}
	return Array(h0,h1,h2,h3,h4);
};


}
//}}}
!Data Control Language
*COMMIT
*SAVEPOINT
*ROLLBACK
*SET TRANSACTION
!Data Definition Language
*CREATE
*ALTER
*DROP
*TRUNCATE
*COMMENT
*GRANT
*REVOKE
!Direct Data Transfer

When on Clients communicate directly with Engines to pass parameters and collect results, instead of being funnelled through a [[Broker]].

DDT is more efficient, involving few network hops, but may not work because of [[FireWall]]s.
!Data Manipulation Language
*SELECT
*INSERT
*DELETE
*CALL
*EXPLAIN PLAN
*LOCK TABLE
*UPDATE
for bat files, make environment changes to a local copy only
|setlocal|endlocal|
!DataSynapse Tier Extension

Instruments a DataSynapse Manager running as a Director, Broker, or Director/Broker.
!DataSynapse's Data References

Instead of passing large data blocks around a network, DS has DataReference's which work very much like pointers used in C++ to pass data from function to function, but in this case the references are passed from machine to machine via serialisation.

The use of DataReference's saves network band-width by reducing the amount of unproductive data transfer. For example, a DataReference can be passed back to a client as a result from an [[Engine]], the client could then pass on the reference to another process/Engine for consumption without ever having to have received a much large result package.

C++ can benefit from using references as [[BLOB]]s in the for of {{{byte[]}}} although it cannot automatically pass Objects like Java, due to its inherent lack of serialization.
!~DataSynapse (DS)

* [[Manager]] also known as GridServer
** [[Director]]
** [[Broker]]
* EngineDaemon
* [[Engine]]
----
Driver,Service,Service Type,Service Session,Job,Task,DataReference
----
![[DataSynapse Install]]
!Client Log File
* DSLogDir=c:/temp/data/datasynapse/log

![[DataSynapse Tasks]]
![[DataSynapse Problems]]
![[DataSynapse SDK]]
----
Using a service:
#Write Service
#Deploy Service with GridServer resource deployment or manually.
#Register the Service Type on the GridServer Admin tool
#Create a Service session from a client
#Client makes requests to service

Route the services to the correct broker by assigning {{{DSPrimaryDirector}}} and {{{DSSecondaryDirector}}} in [[driver.properties]] and the user/password to log in with.
Select * from brokers

-- Number of jobs ran in one day
{{{
select count(*)
from jobs where 
broker_id =1
and
start_time > to_timestamp('2007-04-26 09:00','YYYY-MM-DD HH24:MI')
and
start_time < to_timestamp('2007-04-27 09:00','YYYY-MM-DD HH24:MI')
}}}
-- number of tasks ran in one day
{{{
select count(*)
from tasks
where
start_time > to_timestamp('2007-04-26 09:00','YYYY-MM-DD HH24:MI')
and
start_time < to_timestamp('2007-04-27 09:00','YYYY-MM-DD HH24:MI')
}}}
!! ClientCppDriverVersion does not match expected
broker/log/stdout.log
Turning away client: ClientCppDriverVersion=4.2.0.35 does not match expected: 4.2.0.31

log into Broker & set Manager->Manager Configuration->Admin->"Allow Driver Version Mismatch" = TRUE

!!Engine's Director address dose not match IP address
Engine's Director shown as http://XYZDirector:8000 instead http://ABCDirector:8000 even though the engine has been freshly installed.

Director is configured with the wrong host name. Solution is to reconfigure the director/broker.
Admin->Manager Configuration (next,next)
 HostName:

!LoadLibrary failure: DataSynpaseLoader: The operation completed successfully.

01/08/07 13:36:23.683 Warning: [JobSpacePlugin] [3280] DS Smoke Test-2541011437679901533-0, Task failed due to : java.lang.UnsatisfiedLinkError: LoadLibrary failure: DataSynpaseLoader: The operation completed successfully.

Using Linux DS GridServer 4_2-Update-7

DataSynapseLoader.dll dependant upon DSUTILV71.DLL, as found in cppbridge-win32-vc-71-4.2

No SOLUTION YET

!Unrecognized Windows Sockets error: 10106:
Running calculator test in eclipse, solution: In "run configuration" \"Environment" turn on "Append environment to native environment". The reason, being there is no PC env configured to carry out socket comms.

!java.lang.IllegalStateException: No internal database is available at this time
check that the $DS_BASEDIR is not pointing somewhere unexpected!

![Loginplugin] Can't Login to PrivateBrokerConnection:Login is not allowed at this time
by manuelyt
No SOLUTION YET
lib: DSDriver.jar


jobtutorials/ex1_hello

key classes:

[[com.livecluster.tasklet.Job]]
+++![Add NetProviderService]
Services->Service Type Registary:"netProviderService" dynamicLibrary [ADD]
** libraryName = DataSynapseLoader
** initMethod = init
** destroyMethod = destroy
** gridLibery = netprovider-win32
===
+++![Disable an Engine (Daemon)]
[Director] Engine->Engine Daemon Admin
Action->Disable a daemon
===
+++![Rename Broker]
[Director] Manager->BrokerAdmin
Show the column "Broker Name", click to edit.
===
+++![Set the Home Broker for an Engine]
[Director] Engine->Engine configuration
Select config to edit. scroll down *Director & Brokers*
|Home Broker||
===
+++![Set Primary Director for an Engine]
[Director] Engine->Engine Daemon Admin
|Primary Director|http://ldnpsr8000:8000|
or Manually:
1. Edit datasyanpse\engine\intranet.dat with new director
2. delete dirs; data, work, & profiles
!Start Engine from command line (debugging)
cd DataSyanpse/Engine; Engine.exe -console
===
+++![Number of Jobs/Task run per day]
[[DataSynapse Direct Query-count Jobs/Tasks]]
===
|affinity|is taking into account the type of engine or location of data when scheduling of a task|
|[[Broker]]|Manages Engines, and the distribution of jobs from a client|
|Broker discrimination|limiting engines or drivers to certain brokers|
|Compute Node| |
|DataReference|The passing of pointers to data from machine to machine, and only dereferencing when needed.|
|Direct Data Transfer [[DDT]]|Transfer of data to on from client to engine without going via a broker or manager|
|discriminators|the selection of a resource by favoring one attribute over another|
|[[Director]]|Manages the Brokers, and decides which of them will be used by which client, can be a primary or secondary|
|[[Engine]]| |
|Engine daemon|keeps engine instances alive, engine daemon shadow keeps the engine daemon alive|
|Engine black listing|Engines that have been removed from the available engine pool because of failed tasks|
|Engine weighted-based balancer|The distribution of engines to brokers based on broker weightings.|
|failover broker|A broker that becomes active only if NO other brokers are available|
|home Broker|the Broker to which an engine belongs and returns to when borrowed, a 2 tier sharing policy|
|[[Manager]]|Maybe configured as a Director, Broker, or Director/Broker|
|[[round robin]]|allocation in a circular one at a time order|
|resource partitioning|A broker configured to accept connections from certain Engines or Drivers|
|resource sharing|the borrowing of under utalised engines from another broker|
|secondary|A Director or Broker that is only active if the primary has failed|
|service| |
|state affinity|the scheduling of tasks based on an engines state to avoid re-calculations or data re-load|
|primary|A Director or Broker in this normally active. Antonym: secondary |
/***
''Date Plugin for TiddlyWiki version 2.x''
^^author: Eric Shulman - ELS Design Studios
source: http://www.TiddlyTools.com/#DatePlugin
license: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^
^^last update: <<date tiddler "DDD, MMM DDth, YYYY hh:0mm:0ss">>^^

There are quite a few calendar generators, reminders, to-do lists, 'dated tiddlers' journals, blog-makers and GTD-like schedule managers that have been built around TW.  While they all have different purposes, and vary in format, interaction, and style, in one way or another each of these plugins displays and/or uses date-based information to make finding, accessing and managing relevant tiddlers easier.  This plugin provides a general approach to embedding dates and date-based links/menus within tiddler content.

You can ''specify a date using a combination of year, month, and day number values or mathematical expressions (such as "Y+1" or "D+30")'', and then just display it as formatted date text, or create a ''link to a 'dated tiddler''' for quick blogging, or create a ''popup menu'' containing the dated tiddler link plus links to ''tiddlers that were changed'' as well as any ''scheduled reminders'' for that date.
!!!!!Usage
<<<
When installed, this plugin defines a macro: {{{<<date [mode] [date] [format] [linkformat]>>}}}.  All of the macro parameters are optional and, in it's simplest form, {{{<<date>>}}}, it is equivalent to the ~TiddlyWiki core macro, {{{<<today>>}}}.

However, where {{{<<today>>}}} simply inserts the current date/time in a predefined format (or custom format, using {{{<<today [format]>>}}}), the {{{<<date>>}}} macro's parameters take it much further than that:
* [mode] is either ''display'', ''link'' or ''popup''.  If omitted, it defaults to ''display''.  This param let's you select between simply displaying a formatted date, or creating a link to a specific 'date titled' tiddler or a popup menu containing a dated tiddler link, plus links to changes and reminders.
* [date] lets you enter ANY date (not just today) as ''year, month, and day values or simple mathematical expressions'' using pre-defined variables, Y, M, and D for the current year, month and day, repectively.  You can display the modification date of the current tiddler by using the keyword: ''tiddler'' in place of the year, month and day parameters.  Use ''tiddler://name-of-tiddler//'' to display the modification date of a specific tiddler.  You can also use keywords ''today'' or ''filedate'' to refer to these //dynamically changing// date/time values.  
* [format] and [linkformat] uses standard ~TiddlyWiki date formatting syntax.  The default is "YYYY.0MM.0DD"
>^^''DDD'' - day of week in full (eg, "Monday"), ''DD'' - day of month, ''0DD'' - adds leading zero^^
>^^''MMM'' - month in full (eg, "July"), ''MM'' - month number, ''0MM'' - adds leading zero^^
>^^''YYYY'' - full year, ''YY'' - two digit year, ''hh'' - hours, ''mm'' - minutes, ''ss'' - seconds^^
>^^//note: use of hh, mm or ss format codes is only supported with ''tiddler'', ''today'' or ''filedate'' values//^^
* [linkformat] - specify an alternative date format so that the title of a 'dated tiddler' link can have a format that differs from the date's displayed format

In addition to the macro syntax, DatePlugin also provides a public javascript API so that other plugins that work with dates (such as calendar generators, etc.) can quickly incorporate date formatted links or popups into their output:

''{{{showDate(place, date, mode, format, linkformat, autostyle, weekend)}}}'' 

Note that in addition to the parameters provided by the macro interface, the javascript API also supports two optional true/false parameters:
* [autostyle] - when true, the font/background styles of formatted dates are automatically adjusted to show the date's status:  'today' is boxed, 'changes' are bold, 'reminders' are underlined, while weekends and holidays (as well as changes and reminders) can each have a different background color to make them more visibly distinct from each other.
* [weekend] - true indicates a weekend, false indicates a weekday.  When this parameter is omitted, the plugin uses internal defaults to automatically determine when a given date falls on a weekend.
<<<
!!!!!Examples
<<<
The current date: <<date>>
The current time: <<date today "0hh:0mm:0ss">>
Today's blog: <<date link today "DDD, MMM DDth, YYYY">>
Recent blogs/changes/reminders: <<date popup Y M D-1 "yesterday">> <<date popup today "today">> <<date popup Y M D+1 "tomorrow">>
The first day of next month will be a <<date Y M+1 1 "DDD">>
This tiddler (DatePlugin) was last updated on: <<date tiddler "DDD, MMM DDth, YYYY">>
The SiteUrl was last updated on: <<date tiddler:SiteUrl "DDD, MMM DDth, YYYY">>
This document was last saved on <<date filedate "DDD, MMM DDth, YYYY at 0hh:0mm:0ss">>
<<date 2006 07 24 "MMM DDth, YYYY">> will be a <<date 2006 07 24 "DDD">>
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''DatePlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revision History
<<<
''2006.02.14 [2.0.5]''
when readOnly is set (by TW core), omit "new reminders..." popup menu item and, if a "dated tiddler" does not already exist, display the date as simple text instead of a link.
''2006.02.05 [2.0.4]''
added var to variables that were unintentionally global.  Avoids FireFox 1.5.0.1 crash bug when referencing global variables
''2006.01.18 [2.0.3]''
In 1.2.x the tiddler editor's text area control was given an element ID=("tiddlerBody"+title), so that it was easy to locate this field and programmatically modify its content.  With the addition of configuration templates in 2.x, the textarea no longer has an ID assigned.  To find this control we now look through all the child nodes of the tiddler editor to locate a "textarea" control where attribute("edit") equals "text", and then append the new reminder to the contents of that control.
''2006.01.11 [2.0.2]''
correct 'weekend' override detection logic in showDate()
''2006.01.10 [2.0.1]''
allow custom-defined weekend days (default defined in config.macros.date.weekend[] array)
added flag param to showDate() API to override internal weekend[] array
''2005.12.27 [2.0.0]''
Update for TW2.0
Added parameter handling for 'linkformat'
''2005.12.21 [1.2.2]''
FF's date.getYear() function returns 105 (for the current year, 2005).  When calculating a date value from Y M and D expressions, the plugin adds 1900 to the returned year value get the current year number.  But IE's date.getYear() already returns 2005.  As a result, plugin calculated date values on IE were incorrect (e.g., 3905 instead of 2005).  Adding +1900 is now conditional so the values will be correct on both browsers.
''2005.11.07 [1.2.1]''
added support for "tiddler" dynamic date parameter
''2005.11.06 [1.2.0]''
added support for "tiddler:title" dynamic date parameter
''2005.11.03 [1.1.2]''
when a reminder doesn't have a specified title parameter, use the title of the tiddler that contains the reminder as "fallback" text in the popup menu.  Based on a suggestion from BenjaminKudria.
''2005.11.03 [1.1.1]''
Temporarily bypass hasReminders() logic to avoid excessive overhead from generating the indexReminders() cache.  While reminders can still appear in the popup menu, they just won't be indicated by auto-styling the date number that is displayed.  This single change saves approx. 60% overhead (5 second delay reduced to under 2 seconds).
''2005.11.01 [1.1.0]''
corrected logic in hasModifieds() and hasReminders() so caching of indexed modifieds and reminders is done just once, as intended.  This should hopefully speed up calendar generators and other plugins that render multiple dates...
''2005.10.31 [1.0.1]''
documentation and code cleanup
''2005.10.31 [1.0.0]''
initial public release
''2005.10.30 [0.9.0]''
pre-release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].
<<<
!!!!!Code
***/
//{{{
version.extensions.date = {major: 2, minor: 0, revision: 5, date: new Date(2006,2,14)};
//}}}

//{{{
// 1.2.x compatibility
if (!window.story) window.story=window;
if (!store.getTiddler) store.getTiddler=function(title){return store.tiddlers[title]}
if (!store.addTiddler) store.addTiddler=function(tiddler){store.tiddlers[tiddler.title]=tiddler}
if (!store.deleteTiddler) store.deleteTiddler=function(title){delete store.tiddlers[title]}
//}}}

//{{{
config.macros.date = {
	format: "YYYY.0MM.0DD", // default date display format
	linkformat: "YYYY.0MM.0DD", // 'dated tiddler' link format
	weekendbg: "#c0c0c0", // "cocoa"
	holidaybg: "#c0ffee", // "coffee"
	modifiedsbg: "#bbeeff", // "beef"
	remindersbg: "#ffaace", // "face"
	holidays: [ "01/01", "07/04", "07/24", "11/24" ], // NewYearsDay, IndependenceDay(US), Eric's Birthday (hooray!), Thanksgiving(US)
	weekend: [ 1,0,0,0,0,0,1 ] // [ day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6 ]
};
//}}}

//{{{
config.macros.date.handler = function(place,macroName,params)
{
	// do we want to see a link, a popup, or just a formatted date?
	var mode="display";
	if (params[0]=="display") { mode=params[0]; params.shift(); }
	if (params[0]=="popup") { mode=params[0]; params.shift(); }
	if (params[0]=="link") { mode=params[0]; params.shift(); }
	// get the date
	var now = new Date();
	var date = now;
	if (!params[0] || params[0]=="today")
		{ params.shift(); }
	else if (params[0]=="filedate")
		{ date=new Date(document.lastModified); params.shift(); }
	else if (params[0]=="tiddler")
		{ date=store.getTiddler(story.findContainingTiddler(place).id.substr(7)).modified; params.shift(); }
	else if (params[0].substr(0,8)=="tiddler:")
		{ var t; if ((t=store.getTiddler(params[0].substr(8)))) date=t.modified; params.shift(); }
	else {
		var y = eval(params.shift().replace(/Y/ig,(now.getYear()<1900)?now.getYear()+1900:now.getYear()));
		var m = eval(params.shift().replace(/M/ig,now.getMonth()+1));
		var d = eval(params.shift().replace(/D/ig,now.getDate()+0));
		date = new Date(y,m-1,d);
	}
	// date format with optional custom override
	var format=this.format; if (params[0]) format=params.shift();
	var linkformat=this.linkformat; if (params[0]) linkformat=params.shift();
	showDate(place,date,mode,format,linkformat);
}
//}}}

//{{{
window.showDate=showDate;
function showDate(place,date,mode,format,linkformat,autostyle,weekend)
{
	if (!mode) mode="display";
	if (!format) format=config.macros.date.format;
	if (!linkformat) linkformat=config.macros.date.linkformat;
	if (!autostyle) autostyle=false;

	// format the date output
	var title = date.formatString(format);
	var linkto = date.formatString(linkformat);

	// just show the formatted output
	if (mode=="display") { place.appendChild(document.createTextNode(title)); return; }

	// link to a 'dated tiddler'
	var link = createTiddlyLink(place, linkto, false);
	link.appendChild(document.createTextNode(title));
	link.title = linkto;
	link.date = date;
	link.format = format;
	link.linkformat = linkformat;

	// if using a popup menu, replace click handler for dated tiddler link
	// with handler for popup and make link text non-italic (i.e., an 'existing link' look)
	if (mode=="popup") {
		link.onclick = onClickDatePopup;
		link.style.fontStyle="normal";
	}

	// format the popup link to show what kind of info it contains (for use with calendar generators)
	if (!autostyle) return;
	if (hasModifieds(date))
		{ link.style.fontStyle="normal"; link.style.fontWeight="bold"; }
	if (hasReminders(date))
		{ link.style.textDecoration="underline"; }
	if(isToday(date))
		{ link.style.border="1px solid black"; }

	if( (weekend!=undefined?weekend:isWeekend(date)) && (config.macros.date.weekendbg!="") )
		{ place.style.background = config.macros.date.weekendbg; }
	if(isHoliday(date)&&(config.macros.date.holidaybg!=""))
		{ place.style.background = config.macros.date.holidaybg; }
	if (hasModifieds(date)&&(config.macros.date.modifiedsbg!=""))
		{ place.style.background = config.macros.date.modifiedsbg; }
	if (hasReminders(date)&&(config.macros.date.remindersbg!=""))
		{ place.style.background = config.macros.date.remindersbg; }
}
//}}}

//{{{
function isToday(date) // returns true if date is today
	{ var now=new Date(); return ((now-date>=0) && (now-date<86400000)); }

function isWeekend(date) // returns true if date is a weekend
	{ return (config.macros.date.weekend[date.getDay()]); }

function isHoliday(date) // returns true if date is a holiday
{
	var longHoliday = date.formatString("0MM/0DD/YYYY");
	var shortHoliday = date.formatString("0MM/0DD");
	for(var i = 0; i < config.macros.date.holidays.length; i++) {
		var holiday=config.macros.date.holidays[i];
		if (holiday==longHoliday||holiday==shortHoliday) return true;
	}
	return false;
}
//}}}

//{{{
// Event handler for clicking on a day popup
function onClickDatePopup(e)
{
	if (!e) var e = window.event;
	var theTarget = resolveTarget(e);
	var popup = createTiddlerPopup(this);
	if(popup) {
		// always show dated tiddler link (or just date, if readOnly) at the top...
		if (!readOnly || store.tiddlerExists(this.date.formatString(this.linkformat)))
			createTiddlyLink(popup,this.date.formatString(this.linkformat),true);
		else
			createTiddlyText(popup,this.date.formatString(this.linkformat));
		addModifiedsToPopup(popup,this.date,this.format);
		addRemindersToPopup(popup,this.date,this.linkformat);
	}
	scrollToTiddlerPopup(popup,false);
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	return(false);
}
//}}}

//{{{
function indexModifieds() // build list of tiddlers, hash indexed by modification date
{
	var modifieds= { };
	var tiddlers = store.getTiddlers("title");
	for (var t = 0; t < tiddlers.length; t++) {
		var date = tiddlers[t].modified.formatString("YYYY0MM0DD")
		if (!modifieds[date])
			modifieds[date]=new Array();
		modifieds[date].push(tiddlers[t].title);
	}
	return modifieds;
}
function hasModifieds(date) // returns true if date has modified tiddlers
{
	if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();
	return (config.macros.date.modifieds[date.formatString("YYYY0MM0DD")]!=undefined);
}

function addModifiedsToPopup(popup,when,format)
{
	if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var mods = config.macros.date.modifieds[when.formatString("YYYY0MM0DD")];
	if (mods) {
		mods.sort();
		var e=createTiddlyElement(popup,"div",null,null,"changes:");
		for(var t=0; t<mods.length; t++) {
			var link=createTiddlyLink(popup,mods[t],false);
			link.appendChild(document.createTextNode(indent+mods[t]));
			createTiddlyElement(popup,"br",null,null,null);
		}
	}
}
//}}}

//{{{
function indexReminders() // build list of tiddlers with reminders, hash indexed by reminder date
{
	var reminders = { };

	if(window.findTiddlersWithReminders==undefined) return; // reminder plugin not installed

	var matches = store.search("reminder",false,false,"title","excludeSearch");
	var macroPattern = "<<([^>\\s]+)(?:\\s*)([^>]*)>>";
	var macroRegExp = new RegExp(macroPattern,"mg");
	var arr = [];
	for(var t=matches.length-1; t>=0; t--)
	{
		var targetText = matches[t].text;
		do {
			// Get the next formatting match
			var formatMatch = macroRegExp.exec(targetText);
			if(formatMatch)
			{
				if (formatMatch[1] != null && formatMatch[1].toLowerCase() == "reminder")
				{
                                       //Find the matching date.
                                       var params = formatMatch[2].readMacroParams();
                                       var dateHash = getParamsForReminder(params);
                                       var date = findDateForReminder(dateHash);
                                       if (date != null)
                                       {
						var dateindex = date.formatString("YYYY0MM0DD")
						if (!reminders[dateindex])
							reminders[dateindex]=new Array();
						reminders[dateindex].pushUnique(t);
                                       }
				}
			}
		} while(formatMatch);
	}
	return reminders;
}

function hasReminders(date) // returns true if date has reminders
{
        if (window.reminderCacheForCalendar != null)
          return window.reminderCacheForCalendar[date] != null;
	return false; // ELS 2005.11.03: BYPASS due to performance issues
	if (!config.macros.date.reminders) config.macros.date.reminders = indexReminders();
	return (config.macros.date.reminders[date.formatString("YYYY0MM0DD")]!=undefined);
}

function addRemindersToPopup(popup,when,format)
{
	if(window.findTiddlersWithReminders==undefined) return; // reminder plugin not installed

	var indent = String.fromCharCode(160)+String.fromCharCode(160);
	var reminders=findTiddlersWithReminders(when, [0,31],null,1);
	var e=createTiddlyElement(popup,"div",null,null,"reminders:"+(!reminders.length?" none":""));
	for(var t=0; t<reminders.length; t++) {
		link = createTiddlyLink(popup,reminders[t].tiddler,false);
		var diff=reminders[t].diff;
		diff=(!diff)?"Today":((diff==1)?"Tomorrow":diff+" days");
		var txt=(reminders[t].params["title"])?reminders[t].params["title"]:reminders[t].tiddler;
		link.appendChild(document.createTextNode(indent+diff+" - "+txt));
		createTiddlyElement(popup,"br",null,null,null);
	}
	if (readOnly) return;	// omit "new reminder..." link
	var link = createTiddlyLink(popup,indent+"new reminder...",true); createTiddlyElement(popup,"br");
	var title = when.formatString(format);
	link.title="add a reminder to '"+title+"'";
	link.onclick = function() {
		// show tiddler editor
		story.displayTiddler(null, title, 2, null, null, false, false);
		// find body 'textarea'
		var c =document.getElementById("tiddler" + title).getElementsByTagName("*");
		for (var i=0; i<c.length; i++) if ((c[i].tagName.toLowerCase()=="textarea") && (c[i].getAttribute("edit")=="text")) break;
		// append reminder macro to tiddler content
		if (i<c.length) {
			if (store.tiddlerExists(title)) c[i].value+="\n"; else c[i].value="";
			c[i].value += "<<reminder day:"+when.getDate()+" month:"+(when.getMonth()+1)+" year:"+(when.getFullYear())+' title:"Enter a title" >>';
		}
	};
}
//}}}
[[@Agenda]]
[[@Visitors]]
[[In-Collaboration Ltd]]
/***
|''Name:''|DeprecatedFunctionsPlugin|
|''Description:''|Support for deprecated functions removed from core|
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin) {
version.extensions.DeprecatedFunctionsPlugin = {installed:true};

//--
//-- Deprecated code
//--

// @Deprecated: Use createElementAndWikify and this.termRegExp instead
config.formatterHelpers.charFormatHelper = function(w)
{
	w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);
};

// @Deprecated: Use enclosedTextHelper and this.lookaheadRegExp instead
config.formatterHelpers.monospacedByLineHelper = function(w)
{
	var lookaheadRegExp = new RegExp(this.lookahead,"mg");
	lookaheadRegExp.lastIndex = w.matchStart;
	var lookaheadMatch = lookaheadRegExp.exec(w.source);
	if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
		var text = lookaheadMatch[1];
		if(config.browser.isIE)
			text = text.replace(/\n/g,"\r");
		createTiddlyElement(w.output,"pre",null,null,text);
		w.nextMatch = lookaheadRegExp.lastIndex;
	}
};

// @Deprecated: Use <br> or <br /> instead of <<br>>
config.macros.br = {};
config.macros.br.handler = function(place)
{
	createTiddlyElement(place,"br");
};

// Find an entry in an array. Returns the array index or null
// @Deprecated: Use indexOf instead
Array.prototype.find = function(item)
{
	var i = this.indexOf(item);
	return i == -1 ? null : i;
};

// Load a tiddler from an HTML DIV. The caller should make sure to later call Tiddler.changed()
// @Deprecated: Use store.getLoader().internalizeTiddler instead
Tiddler.prototype.loadFromDiv = function(divRef,title)
{
	return store.getLoader().internalizeTiddler(store,this,title,divRef);
};

// Format the text for storage in an HTML DIV
// @Deprecated Use store.getSaver().externalizeTiddler instead.
Tiddler.prototype.saveToDiv = function()
{
	return store.getSaver().externalizeTiddler(store,this);
};

// @Deprecated: Use store.allTiddlersAsHtml() instead
function allTiddlersAsHtml()
{
	return store.allTiddlersAsHtml();
}

// @Deprecated: Use refreshPageTemplate instead
function applyPageTemplate(title)
{
	refreshPageTemplate(title);
}

// @Deprecated: Use story.displayTiddlers instead
function displayTiddlers(srcElement,titles,template,unused1,unused2,animate,unused3)
{
	story.displayTiddlers(srcElement,titles,template,animate);
}

// @Deprecated: Use story.displayTiddler instead
function displayTiddler(srcElement,title,template,unused1,unused2,animate,unused3)
{
	story.displayTiddler(srcElement,title,template,animate);
}

// @Deprecated: Use functions on right hand side directly instead
var createTiddlerPopup = Popup.create;
var scrollToTiddlerPopup = Popup.show;
var hideTiddlerPopup = Popup.remove;

// @Deprecated: Use right hand side directly instead
var regexpBackSlashEn = new RegExp("\\\\n","mg");
var regexpBackSlash = new RegExp("\\\\","mg");
var regexpBackSlashEss = new RegExp("\\\\s","mg");
var regexpNewLine = new RegExp("\n","mg");
var regexpCarriageReturn = new RegExp("\r","mg");

}
//}}}
This software is opensource and will always be free. However donations will encourage the continued enhancement and maintenance of MPTW (and also MonkeyGTD). Please use the link below if you would like to donate. Thank you!
<html><form target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="simon.baird@gmail.com">
<input type="hidden" name="item_name" value="Support and appreciation for MonkeyPirateTiddlyWiki. Thanks!">
<input type="hidden" name="item_number" value="">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1" height="1">
</form></html>
Right click on the following download link and select "Save link as..." or "Save target as...". Save the downloaded file on your desktop (or anywhere you like) then double click it to start using it.

{{downloadLink{
[[Download|http://mptw.tiddlyspot.com/empty.html]]
}}}

!!Updating from a 2.3 or higher MPTW
(Note, you can find your MPTW version number using {{{<<mptwVersion>>}}}. Current latest version is <<mptwVersion>>).
* Click backstage, import
* Select MptwUpgradeURL from predefined feeds and click open
* Tick all by clicking the checkbox in the column heading
* Untick "Keep these tiddlers linked..."
* Click import
* Save and reload

!!Updating from an older MPTW
* Since there's lots of changes you need to download a fresh MPTW using the above link then import your content. Try not to import any of the MPTW plugins from your old file. There is a thread [[here|http://groups.google.com/group/TiddlyWiki/browse_thread/thread/93b4c6edd3b6cd16]] that includes more details. (If you're not using Tiddlyspot then just skip the first part about downloading your site).
Buy the juxtaposition of DynamicLauncher into a java application's start command, dynamic instrumentation ([[AOP]]) can be added to modify an application's behavior at run time . 
!Event Dispatch Thread
[[SWING]] GUI components are not thread safe, so their use must be done on a single thread (EDT) to avoid [[deadlock]]. The EDT executes events in order, including repaints.

A thread can be tested to see if it is the EDT.

invokeLater is ideally used by other threads that wish to make calls to [[SWING]] components.
invokeLaterAndWait cannot be called on the EDT, and is typically used to obtain the state of SWING components form another tread.

[[javax.swing.Timer]] class is for SWING actions that are to be deferred or done regally.
[[javax.swing.SwingWorker]] (JDK 1.6) is a pattern for offloading time consuming tasks from the EDT. Override {{{finished}}} to make the GUI updates upon completion.

!Enterprise Java Bean

EJB is a server-side component that encapsulates the business logic of an application. 

[[EJB]]s are of only any value inside a EJB server, unlike [[POJO]]s beans which define naming standards for getters and setters and are used in all manor of component architectures. 

[[EJB]]s come in three variety; [[Session Bean]]s, Message Driven Beans [[MDB]]s, and [[Entity Bean]]s (now replaced by the Java Persistence API [[JPA]] in EJB 3.00)..	 

To build a bean:
1) Code bean class - with all business knowledge.
2) Code 2 interfaces - "home" and "component"
3) Create an XML deployment descriptor - named ejb-jar.xml
4) put bean, interfaces, and descriptor into an ejb-jar
5) Deploy bean into the server
!Element Language

eg. {{{${bean.attribute.attribute} }}}

is equivalent to the Java code  {{{bean().attribute().attribute();}}}

where the object {{{bean}}} has the member function {{{getAttribute()}}} defined where the returned object also has a member function {{{getAttribute()}}}

In short the use of ''EL'' eliminates the tedious use of ''get'' and ''set'' to access attributes that confirm to the JavaBean specification. 
Eclipse SQL plugin http://eclipsesql.sourceforge.net/

If on start up Eclipse hangs or exits, check the logs in {{{<workspace>.metadata\.log}}} for out of memory errors. Then create or modify the short cut/command to start Eclipse thus: {{{-vmargs -Xms128m -Xmx256m}}}

Plugins
| UML | http://www.eclipsedownload.com/download/free/eclipse_3x/index.html |

^ SHIFT T - class list - if opened when highlighting an interface it will bring up all the implementing classes.
^O - member list
<!--{{{-->
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler wikibar'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
Questions? Comments? Bugs? Please use the GTD Tiddly Wiki GTDTWForum. It's the best way to get a response and you'll have more eyes on your issue.

To email me use my [[mail form|http://snapgrid.com/contact/]]. I can't always reply to everyone, but I do try to read all emails.

To contact the original creator of TiddlyWiki, EmailJeremy.
Engines per form computations, also known as Compute Nodes in a grid.

Usually there is one engine per core, running on a machine, controlled by a single [[Engine Daemon]] instance.
On startup an engine daemon logs into its [[Director]] and is routed to register with a [[Broker]]. It also starts up an keeps alive [[Engine Instances]], usually one per CPU core present on a machine.
The engine daemon monitors its host and kills/restarts [[Engine Instance]]s.
A market leader in [[Grid]], [[Instrumentation]], & [[MUREX]] Consultancy firm.

http://excelian.com
/***
|Name:|ExtentTagButtonPlugin|
|Description:|Adds a New tiddler button in the tag drop down|
|Version:|3.2 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{

window.onClickTag_mptw_orig = window.onClickTag;
window.onClickTag = function(e) {
	window.onClickTag_mptw_orig.apply(this,arguments);
	var tag = this.getAttribute("tag");
	var title = this.getAttribute("tiddler");
	// Thanks Saq, you're a genius :)
	var popup = Popup.stack[Popup.stack.length-1].popup;
	createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
	wikify("<<newTiddler label:'New tiddler' tag:'"+tag+"'>>",createTiddlyElement(popup,"li"));
	return false;
}

//}}}

!Foreign Exchange

Investment banks FX:

*Clients - import/exporters
*Proprietary Trading
a JVM error when the return to a function is missing. Normally the compile catches this but with [[AOP]] and [[Javassist]] it is possible to modify code in such away as to miss the return!
![[Financial Acronyms]]

|ABS|Asset-backed security|
|APR|Annual Percentage  Rate|
|APY|Annual Percentage Yeild|includes intrest on intrest|
|ARM|Adjustable-Rate Mortgage|
|BP|Basis Points|
|CIBM|Corporate Investment Banking & Markets|
|CDO|Collateralized debt obligation|an asset backed security product|
|CFD|Contract For Difference|
|CMBS|Commercial Mortgages Backed Securities|
|ECB|European Central Bank|
|ECN|Electronic exchange|
|EOD|End of Day|
|EPS|Earnings Per Share|
|FRA|Forward Rate Agreements|
|FRNs|Floating Rate Notes|
|FX|Foreign Exchange|
|GDP|Gross Domestic Product|
|GNP|Gross National Product|
|HPA|House Purchase Assistance|
|HPA|House Price Appreciation|
|[[IPO]]|Initial Public Offering|
|LIBOR|London Interest Bank Offer Rate|
|MPT|Modern Portfolio Theory|
|OID|Original Issue Discount|
|OTC|Over The Counter|
|NPV|Net Present Value|
|PV|Present Value|
|RMBS|Residential Mortgage Backed Security|
|ROE|Return On Equity|
|SPV|Special Purpose Vehicle|
|STP|Straight Through Processing|
|VaR|Value at Risk,probability of portfolio losses|
|YTM|Yield To Maturity|

|CBOT|Chicago Board of Trade|

http://www.riskglossary.com/
|[[American option]]|An [[option]] that can be taken at any time|
|arbitrage|attempt to make risk-free profit from price discrepancies between markets by simultaneous sale/purchase or purchase/sale|
|[[Asian option]]|An [[option]] whose pay off depends upon the average price|
|arbrule|Take the market price of a future discounted back for the implied price, used for calc index spot prices from index futures.|
|amortize|To pay off (as a mortgage) gradually usually by periodic payments|
|[[Barrier option]]|An [[option]] that the underlying security's price must reach some trigger level before the exercise can occur.|
|[[Bermudan option]]|An [[option]] that can be taken on a number of specific dates||
|Basis Points|The smallest measure used in quotations|
|blotter|A record of trades carried out during a day|
|[[call option]]|the right but not the obligation to buy|
|Capital Market|debt greater than one year|
|collateral|An asset pledged by a borrower to a lender until a loan is repaid.|
|coupon|Regular interest payment|
|Current Yield|For bonds = annual coupon/price|
|Derivatives Market|[[derivative]] trading is not in the underlying securities, but in instruments whose value is derived from the securities. This is where futures, options & forward contracts are traded|
|[[European option]]|An [[option]] taken at term|
|[[Margin]]|Deposit given when levering trades to cover potential losses|
|Moving Average|smooth out fluctuation in price over a period of time|
|Securities|Receipts for money lent is known as securities, where their is a collateral pledge to secure the loan|
|Gilt Edge Bond|A Bond (a type of security) issued by the government|
|Hedge|Hedging is taking action to eliminate or reduce exposure to risk. A perfect hedge removes the possibility of future gain or loss|
|instrument|Financial instrument are used to trade, they are varied and have wildly different structures, and often result in a price|
|liquidity|Easy of turn into cash|
|Money Market|debt less than one year|
|[[Mote Carlo]]|A simulation of  future asset prices|
|[[netting]]|Reducing transfers of funds between subsidiaries or separate companies to a net amount|
|Futures market|Assets trades for future delivery at a specified price|
|Over The Counter OTC|Made up of computer screens and telephones (not a securities exchange, which takes place on a trading floor)|
|Primary Market|The first time a security is issued, traded once, price set by issuer|
|[[put option]]|the right but not the obligation to sell|
|[[repo]]|Repurchase agreement|
|Return On Equity (ROE)|profit company earned in comparison to the total amount of shareholder equity|
|[[Secondary Market]]|Provides liquidity, price set by the market|
|Spot Market|Trade for immediate delivery, also known as the cash market|
|[[swaption]]|An [[option]] on a [[swap]], normally an interest rate swap <<tag option>>|
|VaR|Value at Risk,probability of portfolio losses|
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.8 (2007-04-12)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description

Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.

''Syntax:'' 
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]] is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|

See details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].

!Revision history
* v1.0.8 (2007-04-12)
** Adapted to latest TiddlyWiki 2.2 Beta importTiddlyWiki API (introduced with changeset 2004). TiddlyWiki 2.2 Beta builds prior to changeset 2004 are no longer supported (but TiddlyWiki 2.1 and earlier, of cause)
* v1.0.7 (2007-03-28)
** Also support "pre" formatted TiddlyWikis (introduced with TW 2.2) (when using "in" clause to work on external tiddlers)
* v1.0.6 (2006-09-16)
** Context provides "viewerTiddler", i.e. the tiddler used to view the macro. Most times this is equal to the "inTiddler", but when using the "tiddler" macro both may be different.
** Support "begin", "end" and "none" expressions in "write" action
* v1.0.5 (2006-02-05)
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make "JSLint" conform
*** "Only install once"
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features: 
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen) 
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features: 
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs: 
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features: 
*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".
*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.
*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).
*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version

!Code
***/
//{{{

 
//============================================================================
//============================================================================
// ForEachTiddlerPlugin
//============================================================================
//============================================================================

// Only install once
if (!version.extensions.ForEachTiddlerPlugin) {

if (!window.abego) window.abego = {};

version.extensions.ForEachTiddlerPlugin = {
 major: 1, minor: 0, revision: 8, 
 date: new Date(2007,3,12), 
 source: "http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin",
 licence: "[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",
 copyright: "Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)"
};

// For backward compatibility with TW 1.2.x
//
if (!TiddlyWiki.prototype.forEachTiddler) {
 TiddlyWiki.prototype.forEachTiddler = function(callback) {
 for(var t in this.tiddlers) {
 callback.call(this,t,this.tiddlers[t]);
 }
 };
}

//============================================================================
// forEachTiddler Macro
//============================================================================

version.extensions.forEachTiddler = {
 major: 1, minor: 0, revision: 8, date: new Date(2007,3,12), provider: "http://tiddlywiki.abego-software.de"};

// ---------------------------------------------------------------------------
// Configurations and constants 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler = {
 // Standard Properties
 label: "forEachTiddler",
 prompt: "Perform actions on a (sorted) selection of tiddlers",

 // actions
 actions: {
 addToList: {},
 write: {}
 }
};

// ---------------------------------------------------------------------------
// The forEachTiddler Macro Handler 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler.getContainingTiddler = function(e) {
 while(e && !hasClass(e,"tiddler"))
 e = e.parentNode;
 var title = e ? e.getAttribute("tiddler") : null; 
 return title ? store.getTiddler(title) : null;
};

config.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 // config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);

 if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);
 // --- Parsing ------------------------------------------

 var i = 0; // index running over the params
 // Parse the "in" clause
 var tiddlyWikiPath = undefined;
 if ((i < params.length) && params[i] == "in") {
 i++;
 if (i >= params.length) {
 this.handleError(place, "TiddlyWiki path expected behind 'in'.");
 return;
 }
 tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");
 i++;
 }

 // Parse the where clause
 var whereClause ="true";
 if ((i < params.length) && params[i] == "where") {
 i++;
 whereClause = this.paramEncode((i < params.length) ? params[i] : "");
 i++;
 }

 // Parse the sort stuff
 var sortClause = null;
 var sortAscending = true; 
 if ((i < params.length) && params[i] == "sortBy") {
 i++;
 if (i >= params.length) {
 this.handleError(place, "sortClause missing behind 'sortBy'.");
 return;
 }
 sortClause = this.paramEncode(params[i]);
 i++;

 if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {
 sortAscending = params[i] == "ascending";
 i++;
 }
 }

 // Parse the script
 var scriptText = null;
 if ((i < params.length) && params[i] == "script") {
 i++;
 scriptText = this.paramEncode((i < params.length) ? params[i] : "");
 i++;
 }

 // Parse the action. 
 // When we are already at the end use the default action
 var actionName = "addToList";
 if (i < params.length) {
 if (!config.macros.forEachTiddler.actions[params[i]]) {
 this.handleError(place, "Unknown action '"+params[i]+"'.");
 return;
 } else {
 actionName = params[i]; 
 i++;
 }
 } 
 
 // Get the action parameter
 // (the parsing is done inside the individual action implementation.)
 var actionParameter = params.slice(i);


 // --- Processing ------------------------------------------
 try {
 this.performMacro({
 place: place, 
 inTiddler: tiddler,
 whereClause: whereClause, 
 sortClause: sortClause, 
 sortAscending: sortAscending, 
 actionName: actionName, 
 actionParameter: actionParameter, 
 scriptText: scriptText, 
 tiddlyWikiPath: tiddlyWikiPath});

 } catch (e) {
 this.handleError(place, e);
 }
};

// Returns an object with properties "tiddlers" and "context".
// tiddlers holds the (sorted) tiddlers selected by the parameter,
// context the context of the execution of the macro.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {

 var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);

 var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;
 context["tiddlyWiki"] = tiddlyWiki;
 
 // Get the tiddlers, as defined by the whereClause
 var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);
 context["tiddlers"] = tiddlers;

 // Sort the tiddlers, when sorting is required.
 if (parameter.sortClause) {
 this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);
 }

 return {tiddlers: tiddlers, context: context};
};

// Returns the (sorted) tiddlers selected by the parameter.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlers = function(parameter) {
 return this.getTiddlersAndContext(parameter).tiddlers;
};

// Performs the macros with the given parameter.
//
// @param parameter holds the parameter of the macro as separate properties.
// The following properties are supported:
//
// place
// whereClause
// sortClause
// sortAscending
// actionName
// actionParameter
// scriptText
// tiddlyWikiPath
//
// All properties are optional. 
// For most actions the place property must be defined.
//
config.macros.forEachTiddler.performMacro = function(parameter) {
 var tiddlersAndContext = this.getTiddlersAndContext(parameter);

 // Perform the action
 var actionName = parameter.actionName ? parameter.actionName : "addToList";
 var action = config.macros.forEachTiddler.actions[actionName];
 if (!action) {
 this.handleError(parameter.place, "Unknown action '"+actionName+"'.");
 return;
 }

 var actionHandler = action.handler;
 actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);
};

// ---------------------------------------------------------------------------
// The actions 
// ---------------------------------------------------------------------------

// Internal.
//
// --- The addToList Action -----------------------------------------------
//
config.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {
 // Parse the parameter
 var p = 0;

 // Check for extra parameters
 if (parameter.length > p) {
 config.macros.forEachTiddler.createExtraParameterErrorElement(place, "addToList", parameter, p);
 return;
 }

 // Perform the action.
 var list = document.createElement("ul");
 place.appendChild(list);
 for (var i = 0; i < tiddlers.length; i++) {
 var tiddler = tiddlers[i];
 var listItem = document.createElement("li");
 list.appendChild(listItem);
 createTiddlyLink(listItem, tiddler.title, true);
 }
};

abego.parseNamedParameter = function(name, parameter, i) {
 var beginExpression = null;
 if ((i < parameter.length) && parameter[i] == name) {
 i++;
 if (i >= parameter.length) {
 throw "Missing text behind '%0'".format([name]);
 }
 
 return config.macros.forEachTiddler.paramEncode(parameter[i]);
 }
 return null;
}

// Internal.
//
// --- The write Action ---------------------------------------------------
//
config.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {
 // Parse the parameter
 var p = 0;
 if (p >= parameter.length) {
 this.handleError(place, "Missing expression behind 'write'.");
 return;
 }

 var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);
 p++;

 // Parse the "begin" option
 var beginExpression = abego.parseNamedParameter("begin", parameter, p);
 if (beginExpression !== null) 
 p += 2;
 var endExpression = abego.parseNamedParameter("end", parameter, p);
 if (endExpression !== null) 
 p += 2;
 var noneExpression = abego.parseNamedParameter("none", parameter, p);
 if (noneExpression !== null) 
 p += 2;

 // Parse the "toFile" option
 var filename = null;
 var lineSeparator = undefined;
 if ((p < parameter.length) && parameter[p] == "toFile") {
 p++;
 if (p >= parameter.length) {
 this.handleError(place, "Filename expected behind 'toFile' of 'write' action.");
 return;
 }
 
 filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));
 p++;
 if ((p < parameter.length) && parameter[p] == "withLineSeparator") {
 p++;
 if (p >= parameter.length) {
 this.handleError(place, "Line separator text expected behind 'withLineSeparator' of 'write' action.");
 return;
 }
 lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);
 p++;
 }
 }
 
 // Check for extra parameters
 if (parameter.length > p) {
 config.macros.forEachTiddler.createExtraParameterErrorElement(place, "write", parameter, p);
 return;
 }

 // Perform the action.
 var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
 var count = tiddlers.length;
 var text = "";
 if (count > 0 && beginExpression)
 text += config.macros.forEachTiddler.getEvalTiddlerFunction(beginExpression, context)(undefined, context, count, undefined);
 
 for (var i = 0; i < count; i++) {
 var tiddler = tiddlers[i];
 text += func(tiddler, context, count, i);
 }
 
 if (count > 0 && endExpression)
 text += config.macros.forEachTiddler.getEvalTiddlerFunction(endExpression, context)(undefined, context, count, undefined);

 if (count == 0 && noneExpression) 
 text += config.macros.forEachTiddler.getEvalTiddlerFunction(noneExpression, context)(undefined, context, count, undefined);
 

 if (filename) {
 if (lineSeparator !== undefined) {
 lineSeparator = lineSeparator.replace(/\\n/mg, "\n").replace(/\\r/mg, "\r");
 text = text.replace(/\n/mg,lineSeparator);
 }
 saveFile(filename, convertUnicodeToUTF8(text));
 } else {
 var wrapper = createTiddlyElement(place, "span");
 wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
 }
};


// ---------------------------------------------------------------------------
// Helpers
// ---------------------------------------------------------------------------

// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
 return {
 place : placeParam, 
 whereClause : whereClauseParam, 
 sortClause : sortClauseParam, 
 sortAscending : sortAscendingParam, 
 script : scriptText,
 actionName : actionNameParam, 
 actionParameter : actionParameterParam,
 tiddlyWikiPath : tiddlyWikiPathParam,
 inTiddler : inTiddlerParam, // the tiddler containing the <<forEachTiddler ...>> macro call.
 viewerTiddler : config.macros.forEachTiddler.getContainingTiddler(placeParam) // the tiddler showing the forEachTiddler result
 };
};

// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of 
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
 if (!idPrefix) {
 idPrefix = "store";
 }
 var lenPrefix = idPrefix.length;
 
 // Read the content of the given file
 var content = loadFile(this.getLocalPath(path));
 if(content === null) {
 throw "TiddlyWiki '"+path+"' not found.";
 }
 
 var tiddlyWiki = new TiddlyWiki();

 // Starting with TW 2.2 there is a helper function to import the tiddlers
 if (tiddlyWiki.importTiddlyWiki) {
 if (!tiddlyWiki.importTiddlyWiki(content))
 throw "File '"+path+"' is not a TiddlyWiki.";
 tiddlyWiki.dirty = false;
 return tiddlyWiki;
 }
 
 // The legacy code, for TW < 2.2
 
 // Locate the storeArea div's
 var posOpeningDiv = content.indexOf(startSaveArea);
 var posClosingDiv = content.lastIndexOf(endSaveArea);
 if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
 throw "File '"+path+"' is not a TiddlyWiki.";
 }
 var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
 
 // Create a "div" element that contains the storage text
 var myStorageDiv = document.createElement("div");
 myStorageDiv.innerHTML = storageText;
 myStorageDiv.normalize();
 
 // Create all tiddlers in a new TiddlyWiki
 // (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
 var store = myStorageDiv.childNodes;
 for(var t = 0; t < store.length; t++) {
 var e = store[t];
 var title = null;
 if(e.getAttribute)
 title = e.getAttribute("tiddler");
 if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
 title = e.id.substr(lenPrefix);
 if(title && title !== "") {
 var tiddler = tiddlyWiki.createTiddler(title);
 tiddler.loadFromDiv(e,title);
 }
 }
 tiddlyWiki.dirty = false;

 return tiddlyWiki;
};


 
// Internal.
//
// Returns a function that has a function body returning the given javaScriptExpression.
// The function has the parameters:
// 
// (tiddler, context, count, index)
//
config.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {
 var script = context["script"];
 var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";
 var fullText = (script ? script+";" : "")+functionText+";theFunction;";
 return eval(fullText);
};

// Internal.
//
config.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {
 var result = [];
 var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);
 tiddlyWiki.forEachTiddler(function(title,tiddler) {
 if (func(tiddler, context, undefined, undefined)) {
 result.push(tiddler);
 }
 });
 return result;
};

// Internal.
//
config.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {
 var message = "Extra parameter behind '"+actionName+"':";
 for (var i = firstUnusedIndex; i < parameter.length; i++) {
 message += " "+parameter[i];
 }
 this.handleError(place, message);
};

// Internal.
//
config.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {
 var result = 
 (tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
 ? 0
 : (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
 ? -1 
 : +1; 
 return result;
};

// Internal.
//
config.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {
 var result = 
 (tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
 ? 0
 : (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
 ? +1 
 : -1; 
 return result;
};

// Internal.
//
config.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {
 // To avoid evaluating the sortClause whenever two items are compared 
 // we pre-calculate the sortValue for every item in the array and store it in a 
 // temporary property ("forEachTiddlerSortValue") of the tiddlers.
 var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);
 var count = tiddlers.length;
 var i;
 for (i = 0; i < count; i++) {
 var tiddler = tiddlers[i];
 tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);
 }

 // Do the sorting
 tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);

 // Delete the temporary property that holds the sortValue. 
 for (i = 0; i < tiddlers.length; i++) {
 delete tiddlers[i].forEachTiddlerSortValue;
 }
};


// Internal.
//
config.macros.forEachTiddler.trace = function(message) {
 displayMessage(message);
};

// Internal.
//
config.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {
 var message ="<<"+macroName;
 for (var i = 0; i < params.length; i++) {
 message += " "+params[i];
 }
 message += ">>";
 displayMessage(message);
};


// Internal.
//
// Creates an element that holds an error message
// 
config.macros.forEachTiddler.createErrorElement = function(place, exception) {
 var message = (exception.description) ? exception.description : exception.toString();
 return createTiddlyElement(place,"span",null,"forEachTiddlerError","<<forEachTiddler ...>>: "+message);
};

// Internal.
//
// @param place [may be null]
//
config.macros.forEachTiddler.handleError = function(place, exception) {
 if (place) {
 this.createErrorElement(place, exception);
 } else {
 throw exception;
 }
};

// Internal.
//
// Encodes the given string.
//
// Replaces 
// "$))" to ">>"
// "$)" to ">"
//
config.macros.forEachTiddler.paramEncode = function(s) {
 var reGTGT = new RegExp("\\$\\)\\)","mg");
 var reGT = new RegExp("\\$\\)","mg");
 return s.replace(reGTGT, ">>").replace(reGT, ">");
};

// Internal.
//
// Returns the given original path (that is a file path, starting with "file:")
// as a path to a local file, in the systems native file format.
//
// Location information in the originalPath (i.e. the "#" and stuff following)
// is stripped.
// 
config.macros.forEachTiddler.getLocalPath = function(originalPath) {
 // Remove any location part of the URL
 var hashPos = originalPath.indexOf("#");
 if(hashPos != -1)
 originalPath = originalPath.substr(0,hashPos);
 // Convert to a native file format assuming
 // "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
 // "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
 // "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
 // "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
 var localPath;
 if(originalPath.charAt(9) == ":") // pc local file
 localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
 else if(originalPath.indexOf("file://///") === 0) // FireFox pc network file
 localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
 else if(originalPath.indexOf("file:///") === 0) // mac/unix local file
 localPath = unescape(originalPath.substr(7));
 else if(originalPath.indexOf("file:/") === 0) // mac/unix local file
 localPath = unescape(originalPath.substr(5));
 else // pc network file
 localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\"); 
 return localPath;
};

// ---------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// ---------------------------------------------------------------------------
//
setStylesheet(
 ".forEachTiddlerError{color: #ffffff;background-color: #880000;}",
 "forEachTiddler");

//============================================================================
// End of forEachTiddler Macro
//============================================================================


//============================================================================
// String.startsWith Function
//============================================================================
//
// Returns true if the string starts with the given prefix, false otherwise.
//
version.extensions["String.startsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.startsWith = function(prefix) {
 var n = prefix.length;
 return (this.length >= n) && (this.slice(0, n) == prefix);
};



//============================================================================
// String.endsWith Function
//============================================================================
//
// Returns true if the string ends with the given suffix, false otherwise.
//
version.extensions["String.endsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.endsWith = function(suffix) {
 var n = suffix.length;
 return (this.length >= n) && (this.right(n) == suffix);
};


//============================================================================
// String.contains Function
//============================================================================
//
// Returns true when the string contains the given substring, false otherwise.
//
version.extensions["String.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.contains = function(substring) {
 return this.indexOf(substring) >= 0;
};

//============================================================================
// Array.indexOf Function
//============================================================================
//
// Returns the index of the first occurance of the given item in the array or 
// -1 when no such item exists.
//
// @param item [may be null]
//
version.extensions["Array.indexOf"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.indexOf = function(item) {
 for (var i = 0; i < this.length; i++) {
 if (this[i] == item) {
 return i;
 }
 }
 return -1;
};

//============================================================================
// Array.contains Function
//============================================================================
//
// Returns true when the array contains the given item, otherwise false. 
//
// @param item [may be null]
//
version.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.contains = function(item) {
 return (this.indexOf(item) >= 0);
};

//============================================================================
// Array.containsAny Function
//============================================================================
//
// Returns true when the array contains at least one of the elements 
// of the item. Otherwise (or when items contains no elements) false is returned.
//
version.extensions["Array.containsAny"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAny = function(items) {
 for(var i = 0; i < items.length; i++) {
 if (this.contains(items[i])) {
 return true;
 }
 }
 return false;
};


//============================================================================
// Array.containsAll Function
//============================================================================
//
// Returns true when the array contains all the items, otherwise false.
// 
// When items is null false is returned (even if the array contains a null).
//
// @param items [may be null] 
//
version.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAll = function(items) {
 for(var i = 0; i < items.length; i++) {
 if (!this.contains(items[i])) {
 return false;
 }
 }
 return true;
};


} // of "install only once"

// Used Globals (for JSLint) ==============
// ... DOM
/*global document */
// ... TiddlyWiki Core
/*global convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink, 
 displayMessage, endSaveArea, hasClass, loadFile, saveFile, 
 startSaveArea, store, wikify */
//}}}


/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/
To change the format of a new journal, search and find: {{{<<newJournal 'DD/0MM/YYYY'>>}}}

TiddlyWiki uses Wiki style markup, a way of lightly "tagging" plain text so it can be transformed into HTML. Edit this Tiddler to see samples.

! Header Samples
!Header 1
!!Header 2
!!!Header 3
!!!!Header 4
!!!!!Header 5

! Unordered Lists:
* Lists are where it's at
* Just use an asterisk and you're set
** To nest lists just add more asterisks...
***...like this
* The circle makes a great bullet because once you've printed a list you can mark off completed items
* You can also nest mixed list types
## Like this

! Ordered Lists
# Ordered lists are pretty neat too
# If you're handy with HTML and CSS you could customize the [[numbering scheme|http://www.w3schools.com/css/pr_list-style-type.asp]]
## To nest, just add more octothorpes (pound signs)...
### Like this
* You can also
** Mix list types
*** like this
# Pretty neat don't you think?

! Tiddler links
To create a Tiddler link, just use mixed-case WikiWord, or use [[brackets]] for NonWikiWordLinks. This is how the GTD style [[@Action]] lists are created. 

Note that existing Tiddlers are in bold and empty Tiddlers are in italics. See CreatingTiddlers for details.

! External Links
You can link to [[external sites|http://google.com]] with brackets. You can also LinkToFolders on your machine or network shares.

! Images
Edit this tiddler to see how it's done.
[img[http://img110.echo.cx/img110/139/gorilla8nw.jpg]]

!Tables
|!th1111111111|!th2222222222|
|>| colspan |
| rowspan |left|
|~| right|
|colored| center |
|caption|c

For a complex table example, see PeriodicTable.

! Horizontal Rules
You can divide a tiddler into
----
sections by typing four dashes on a line by themselves.

! Blockquotes
<<<
This is how you do an extended, wrapped blockquote so you don't have to put angle quotes on every line.
<<<
>level 1
>level 1
>>level 2
>>level 2
>>>level 3
>>>level 3
>>level 2
>level 1

! Other Formatting
''Bold''
==Strike==
__Underline__
//Italic//
Superscript: 2^^3^^=8
Subscript: a~~ij~~ = -a~~ji~~
@@highlight@@
@@color(green):green colored@@
@@bgcolor(#ff0000):color(#ffffff):red colored@@
A [[IMDG]] data-grid solution using Spaces Based Architecture [[SBA]] by leaveraging the power of Sun's JavaSpace to enterprise grade solutions.

The 4 verbs: read/write/take/notify

Scalability Barriers:

Consistency Barrier - when cannot scale without damaging the business logic reliability demanded by users

Latency Barrier - when cannot scale without increasing end-to-end latency to an unacceptable level.

Coding Barrier - when cannot scale without changing application code.

[[Amdahl's Law|Amdahls Law]] - processing overhead causes [[Scalability Crash Barrier]] or [[Scalability Cost Barrier]] to be hit.

HKEY_LOCAL_MACHINE one of the subtrees of a PC registry.

Contains information about the hardware currently installed, and the settings for systems running on the machine. These are normally static for all users until a change is made.

see http://www.windowsnetworking.com/articles_tutorials/Understanding-Windows-2003-Registry.html
/***
|Name:|HideWhenPlugin|
|Description:|Allows conditional inclusion/exclusion in templates|
|Version:|3.1 ($Rev: 3919 $)|
|Date:|$Date: 2008-03-13 02:03:12 +1000 (Thu, 13 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}
***/
//{{{

window.hideWhenLastTest = false;

window.removeElementWhen = function(test,place) {
	window.hideWhenLastTest = test;
	if (test) {
		removeChildren(place);
		place.parentNode.removeChild(place);
	}
};


merge(config.macros,{

	hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( eval(paramString), place);
	}},

	showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !eval(paramString), place);
	}},

	hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.tags.containsAll(params), place);
	}},

	showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !tiddler.tags.containsAll(params), place);
	}},

	hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.tags.containsAny(params), place);
	}},

	showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !tiddler.tags.containsAny(params), place);
	}},

	hideWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.tags.containsAll(params), place);
	}},

	showWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !tiddler.tags.containsAll(params), place);
	}},

	hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);
	}},

	showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);
	}},

	hideWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.title == params[0], place);
	}},

	showWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.title != params[0], place);
	}},

	'else': { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !window.hideWhenLastTest, place);
	}}

});

//}}}


!~In-Memory Data Grid

The antidote for [[Amdahl's Law|Amdals Law]] by:
* Elimination database sessions.
* Removing the central contention for data & moves it closer to the application.

The special requirements for a Data-Aware Grid.
* Grid must know on which IMDG elements data is stored.
* A mechanism to assure Data-Affinity
Registered Office:      27 Chapel Street, Ely, Cambs, CB6 1AD
Registered in England and Wales: Company number: 2770553
/***
|Name:|InstantTimestampPlugin|
|Description:|A handy way to insert timestamps in your tiddler content|
|Version:|1.0.10 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#InstantTimestampPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Usage
If you enter {ts} in your tiddler content (without the spaces) it will be replaced with a timestamp when you save the tiddler. Full list of formats:
* {ts} or {t} -> timestamp
* {ds} or {d} -> datestamp
* !ts or !t at start of line -> !!timestamp
* !ds or !d at start of line -> !!datestamp
(I added the extra ! since that's how I like it. Remove it from translations below if required)
!!Notes
* Change the timeFormat and dateFormat below to suit your preference.
* See also http://mptw2.tiddlyspot.com/#AutoCorrectPlugin
* You could invent other translations and add them to the translations array below.
***/
//{{{

config.InstantTimestamp = {

	// adjust to suit
	timeFormat: 'DD/0MM/YY 0hh:0mm',
	dateFormat: 'DD/0MM/YY',

	translations: [
		[/^!ts?$/img,  "'!!{{ts{'+now.formatString(config.InstantTimestamp.timeFormat)+'}}}'"],
		[/^!ds?$/img,  "'!!{{ds{'+now.formatString(config.InstantTimestamp.dateFormat)+'}}}'"],

		// thanks Adapted Cat
		[/\{ts?\}(?!\}\})/ig,"'{{ts{'+now.formatString(config.InstantTimestamp.timeFormat)+'}}}'"],
		[/\{ds?\}(?!\}\})/ig,"'{{ds{'+now.formatString(config.InstantTimestamp.dateFormat)+'}}}'"]
		
	],

	excludeTags: [
		"noAutoCorrect",
		"noTimestamp",
		"html",
		"CSS",
		"css",
		"systemConfig",
		"systemConfigDisabled",
		"zsystemConfig",
		"Plugins",
		"Plugin",
		"plugins",
		"plugin",
		"javascript",
		"code",
		"systemTheme",
		"systemPalette"
	],

	excludeTiddlers: [
		"StyleSheet",
		"StyleSheetLayout",
		"StyleSheetColors",
		"StyleSheetPrint"
		// more?
	]

}; 

TiddlyWiki.prototype.saveTiddler_mptw_instanttimestamp = TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created) {

	tags = (typeof(tags) == "string") ? tags.readBracketedList() : tags;
	var conf = config.InstantTimestamp;

	if ( !tags.containsAny(conf.excludeTags) && !conf.excludeTiddlers.contains(newTitle) ) {

		var now = new Date();
		var trans = conf.translations;
		for (var i=0;i<trans.length;i++) {
			newBody = newBody.replace(trans[i][0], eval(trans[i][1]));
		}
	}

	// TODO: use apply() instead of naming all args?
	return this.saveTiddler_mptw_instanttimestamp(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created);
}

// you can override these in StyleSheet 
setStylesheet(".ts,.ds { background-color:#ddd; font-style:italic; }","instantTimestampStyles");

//}}}

!What:

End to End business transaction monitoring.
Visualisation of enterprise architecture.
Ability to follow the flow of transactions.

Application monitoring software.
Classification of business transaction.
Prioritisation of transactions across tiers.

!Why:

Dependability - Critical business can be prioritised over the prosaic.

Performance - Pinch points can be identified and improvements empirically proven with comparisons of historic data.

Utilisation - By prioritising transactions the peaks of demand can be smoothed making creating enhanced performance and maximum utilisation of infrastructure.

Reliability - Notification of broken SLAs together with the enhanced ability to pin point the problems aids fast resolution.

Capacity Planning - Can see trends in historical transaction data and the infrastructure loadings, and use this to plan future needs.

!How:

use CoreFirst for instrumentation and [[Ganglia]] or BigBrother for machine monitoring
An investment bank's roles are:

* [[Loan arrangement]]
* [[FX]]
* [[Corporate Finance]]
* [[Investment Management]]
* [[Securities Trading]]
Uniquely identifies a call to a [[UOW]]

The invocation key will be the same on two sides of a tier.

{{{
 Tier1 Tier2
 | |
 A -----> B
 | |
}}}
Inversion Of Control

The concept behind Inversion of Control is often expressed in the Hollywood Principle: "Don't call me, I'll call you." IoC moves the responsibility for making things happen into the framework, and away from application code. Whereas your code calls a traditional class library, an IoC framework calls your code.
J2EE adds to enterprise components to [[J2SE]] [[EJB]]s and web services.

[[J2EE 5 SDK]] server {{{asadmin start-domain domain1}}}
Down load from javaadmin port 4848 http port 8080 https port 8181
MQ 4.1 App Server 9.1 Update 2 Java Beans 3.0 JSF 1.2 

To start server {{{/Users/chris/dev/JEESDK/bin/asadmin start-domain domain1}}}
!Java Decompiler
www.kpdus.com/jad.html 
e.g. {{{jad -r -d Src com*/**/id/*.class}}}
java command line options:
{{{-XX:+TraceClassLoading}}} display from which jar each class is loaded


<<tag java>> [[Java Terms]] <<tag javakeyword>>
[[J2EE]] [[EJB]] [[MQ]]
JBoss [[Seam]]
[[Tomcat]]

[[SpringFramework]] [[Velocity]] [[ActiveMQ]][[SpringBatch]]
[[log4j]]
[[JUnit]] [[testng (Next Generation)|testng]]


<<tag javaerror>>
<<tag javaeg>>

[[class]]
<<tag java.rmi>>
<<tag java.net>> [[Socket|java.net.Socket]] [[ServerSocket|java.net.ServerSocket]]
<<tag java.io>>
<<tag java.lang>> [[Thread|java.lang.Thread]] [[Comparable|java.lang.Comparable]]
<<tag java.lang.reflect>> [[Method|java.lang.relfect.Method]]
<<tag java.util>> [[Collection|java.util.Collection]]  [[WeakHashMap|java.util.WeakHashMap]] [[Comparator|java.util.Comparator]] [[Date|java.util.Date]]
<<tag java.text>> [[java.text.DateFormt]]

[[annotation]]
[[generics]]
[[Collections|java.util.Collection]]
[[Dates|java.util.Date]]
[[Threads|java.lang.Thread]]
[[Regex]]
[[boxing]]
[[numbers]]

[[IBM diagnostic document |http://publib.boulder.ibm.com/infocenter/javasdk/v1r4m2/index.jsp?topic=/com.ibm.java.doc.diagnostics.142j9/html/contents.html]] 

|byte| 8bits | -128 .. 127 |
|short|16 bits| signed |
|char|16 bits| unsigned |
|int |32 bits| ..2147483647 |
|long|64 bits| |
|float| |
|double| |

[[SCJP]] [[SCJP java summary]]
!Using different JBoss port configurations
Edit jboss/server/default/conf/jboss-service.xml and find the "org.jboss.services.binding.ServiceBindingManager", uncomment the block and chose the "ServerName" for the bindings configured by <attribute name="StoreURL">, the examples provide some pre-canned alternatives port settings in ${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml
!Java Data Object API
Jini Extensible Remote Invocation

Adds security lacking in RMI for operating over an WAN (JRMP).
Defines a uniform mechanism to make remote objects available to answer remote method calls (object exporting),

http://www.javaworld.com/javaworld/jw-12-2003/jw-1219-jiniology_p.html?page=1
!Java Persistence API

Typically persists [[POJO]]s into relation database tables, using annotations.
JPA is a relational mapping persistence API where as [[JDO]] Java Data Object is an object mapping persistence API. 

see also Java Persistence Query Language JPQL
!Java Server Pages


{{{<%-- comment --%%>}}} Comment
{{{<% code fragment %>}}} Code fragment
{{{<%=  expression %>}}} Expression
{{{${ EL expression} }}} [[EL]] Element Language expression
<<tag jsptip>>
<<tag javascripttip>>

Not a <<tag javakeyword>>, ie. a variable, method name, class name, or interface name

Cannot start with a number or an operator, or decimal point.

Can start with a currency symbol. an underscore, or a letter i.e. int $;  int _;  int a;

!Valid
{{{
$abc
_abc
£xyz___can_be_also_very_log
}}}

!Invalid
{{{
-a;
.b;
:c;
!d;
f#;
6fred;
}}}

All Identifiers should be use camelCase, further more class and interface name should use capitalised CamelCase.
|[[abstract]]|<<tag javakeyword>>|a class or method that must be extended to be used, can provide concrete behavior|
|anonymous [[inner class]]| |A class created within a method without a name|
|anonymous arrays| |{{{MyClass.myMethod( new int[5] );}}} creates just-in-time arrays|
|[[boxing]]| |automatic conversion from a primitive to the equivalent {{{java.lang}}} class|
|[[class]]|<<tag javakeyword>>|a template for a Java object defining variables, and methods|
|abstract method| see [[abstract]]|a method with no implementation|
|concrete method| |an implementation of an abstract method|
|[[constant specific class body]]| |An enumeration constant overriding an inherited method|
|covariant returns| |An overridden method that changes its return type, so long as its a subclass of the original return|
|[[erasure]]|<<tag generics>>|The removal by the compile of everything between {{{<}}} and {{{>}}}|
|[[encapsulation]]| |Provide an easy to use interface, hiding implementation details, ie Java bean standard|
|event-dispatching thread [[EDT]]| |A [[SWING]] thread to process GUI events and re-painting, where events are processed in order and do not interrupt each other or re-painting (to prevent [[deadlock]]) |
|[[identifier|Java Identifier]]| |not a keyword, ie. variable, method name, class name, interface name |
|[[inner class]]| |A named class created within a method, also see anonymous inner class|
|[[interface]]|<<tag javakeyword>>|contract of functionality, but no behavior|
|method|<<tag javakeyword>>|encapsulates behavior for a class (known as an Operation in [[UML]])|
|[[monitor]]|<<tag threads>>|Added to any Object or class to provide a lock for serialising access by threads|
|most specific constructor| |A constructor(null) if not ambiguous, will call the most subclassed constructor, that will not cause a runtime error |
|object| |an instance of a class, holding state (variables) and behavior (methods)|
|[[overload]]| |Methods that have the same name but different parameter signatures are said to be overloaded|
|[[override]]| |A feature of [[polymorphisms]] where a subclass can change the behavior of a superclass's method|
At the heart GigaSpace and [[SBA]]

Uses just four verbs: read, take, write, & notify
!Java Programming Assistant
Using Javassist it is possible to alter, modify, & change java classes for which there is either no source code available or other reasons for not being able to change a class, such as being a JVM class. This is achieved by the replacement of the standard class loader with Javassis's own, that dynamically modifies the byte code of classes as they are loaded.

[[AOP]] with Javassist enables one to:
* insert code before a method
* insert code after a method
* add a field
* modify a calls within methods.

http://www.csg.is.titech.ac.jp/~chiba/javassist/

!Special characters
| ''char'' | ''description'' |
| $0 |method's class, {{{null}}} for static methods|
| $1,$2,,,$n |corrispond to parameters eg. method(a,b,c)   $3 = c|
| $$ |all parameters ie. $1,$2,,,,$n|
| $_ |return parameter|

Remember to use [[XML]] codes {{{&lt;}}} (<) or {{{ &gt;}}} (>) {{{ &amp;}}} (&)

LINUX Tip <<tag linuxtip>>

[[ssh]]
[[bash]]
[[crontab]]

! [[LINUX How to Networking]]

!File Locations

/etc/rc.d * starts/stops services depending on the runlevel scipt
/etc/init.d * service daemons

[[LINUX Apps]]
[[Veritas]] - Symantec's Enterprise Application Manager
[[Wily Introscope]]  - CA's Web Applications Management tool
Long Pointer to Const String

{{{#define LPCSTR const char*}}}

It is better to use TCHAR* and _T() macro to define string constants.

!Legal Entity Chooser
Dialog allows user to choose one or more [[LegalEntity]] with a specific role. Returns a string.
/***
|Name:|LessBackupsPlugin|
|Description:|Intelligently limit the number of backup files you create|
|Version:|3.0.1 ($Rev: 2320 $)|
|Date:|$Date: 2007-06-18 22:37:46 +1000 (Mon, 18 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/#LessBackupsPlugin|
|Author:|Simon Baird|
|Email:|simon.baird@gmail.com|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Description
You end up with just backup one per year, per month, per weekday, per hour, minute, and second.  So total number won't exceed about 200 or so. Can be reduced by commenting out the seconds/minutes/hours line from modes array
!!Notes
Works in IE and Firefox only.  Algorithm by Daniel Baird. IE specific code by by Saq Imtiaz.
***/
//{{{

var MINS  = 60 * 1000;
var HOURS = 60 * MINS;
var DAYS  = 24 * HOURS;

if (!config.lessBackups) {
	config.lessBackups = {
		// comment out the ones you don't want or set config.lessBackups.modes in your 'tweaks' plugin
		modes: [
			["YYYY",  365*DAYS], // one per year for ever
			["MMM",   31*DAYS],  // one per month
			["ddd",   7*DAYS],   // one per weekday
			//["d0DD",  1*DAYS],   // one per day of month
			["h0hh",  24*HOURS], // one per hour
			["m0mm",  1*HOURS],  // one per minute
			["s0ss",  1*MINS],   // one per second
			["latest",0]         // always keep last version. (leave this).
		]
	};
}

window.getSpecialBackupPath = function(backupPath) {

	var now = new Date();

	var modes = config.lessBackups.modes;

	for (var i=0;i<modes.length;i++) {

		// the filename we will try
		var specialBackupPath = backupPath.replace(/(\.)([0-9]+\.[0-9]+)(\.html)$/,
				'$1'+now.formatString(modes[i][0]).toLowerCase()+'$3')

		// open the file
		try {
			if (config.browser.isIE) {
				var fsobject = new ActiveXObject("Scripting.FileSystemObject")
				var fileExists  = fsobject.FileExists(specialBackupPath);
				if (fileExists) {
					var fileObject = fsobject.GetFile(specialBackupPath);
					var modDate = new Date(fileObject.DateLastModified).valueOf();
				}
			}
			else {
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
				var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
				file.initWithPath(specialBackupPath);
				var fileExists = file.exists();
				if (fileExists) {
					var modDate = file.lastModifiedTime;
				}
			}
		}
		catch(e) {
			// give up
			return backupPath;
		}

		// expiry is used to tell if it's an 'old' one. Eg, if the month is June and there is a
		// June file on disk that's more than an month old then it must be stale so overwrite
		// note that "latest" should be always written because the expiration period is zero (see above)
		var expiry = new Date(modDate + modes[i][1]);
		if (!fileExists || now > expiry)
			return specialBackupPath;
	}
}

// hijack the core function
window.getBackupPath_mptw_orig = window.getBackupPath;
window.getBackupPath = function(localPath) {
	return getSpecialBackupPath(getBackupPath_mptw_orig(localPath));
}

//}}}

Plugins on this site will always be free of charge and open source. They are licensed under TheBSDLicense.
!Mergers And Acquisitions
MPTW is a distribution or edition of TiddlyWiki that includes a standard TiddlyWiki core packaged with some plugins designed to improve usability and provide a better way to organise your information. For more information see http://mptw.tiddlyspot.com/.
!Microsoft Installer
!Model View Controller

Model - storage e.g. database
Controller - logic e.g. EJB
View - display e.g. Browser

	
[[@Acronyms]]
[[@Terms]]
CoreFirst
[[Calypso]]
+++(grid)![Grid...|DataSynapse,GigaSpace,Tangsole,Gemstone,...]
DataSynapse
GigaSpace
[[Coherence]]
[[GemStone]]
===
+++(os)![OS...|OSX,LINUX,PC]
[[LINUX]]
[[OS X]]
[[PC|PC Apps]]
===
+++(java)![Java...|Eclipse,JBoss, etc...]
[[JAVA]]
<<tag java>>
[[JSP]]
[[JavaSpace]]
[[Eclipse]]
[[JBoss]]
+++(web)![Web...]
[[HTML]]
[[javascript]]
[[JSP]]
===
+++(db)![Database...| Oracle,MySQL etc]
[[SQL]]
[[Oracle]]
[[MySQL]]
===
++++(calendar)![Calendar...]
<<calendar thismonth>>
[[CalendarYear]]
A DataSynapse Manager distributes service requests to [[Engine]]s.

A manager component roles are:

* Director/Broker
* [[Director]]
* [[Broker]]

And each of these roles can be function as either a [[Primary]] or a [[Secondary]].

[[Client]]s connect to a manager through a service to have their jobs distributed by [[Broker]]s to [[Engine]]s which carry out the computations.

Communication of job parameters and results to Engines is either funnelled through the [[Broker]]s with [[DDT]] ''off'' or more efficiently carried out directly [[Client]] to [[Engine]] with [[DDT]] ''on''.
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
<!--}}}-->

<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>In-Collaboration's site</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>
|[[derivative]]|The slope of a graph|
|[[differentiation]]|The process of finding the [[derivative]]|
|inflection|the point on a curve changes direction|
|calculus|The study of limits, differentiation, and integration|
|[[integration]]|finding the area under a graph|
|[[normal distribution]]| mean of zero, variance of one |
|[[partial differentiation]]|is differentiation with respect to one term of a function|
+++[Percentages]
P% = X/Y x 100
===
+++[Powers & Exponentials]
Powers prevail in valuation formulas involving compound interest
Y^^Z^^ = Y x Y x Y x ... (Z times)

Exponential functions

Y = c^^z^^ where c = the base, z = the index

Exponential Coefficient

(e) is a constant which is the limiting value of the expression:

(1+1/n)^^n^^ as n approaches infinity.

e=2.71828182846 which is a transcendental number (like pi). 
===
+++[Logarithms]
===
+++[Percentage Changes]
===
+++[Periodic Changes]
===
+++[Continuous Compounding]
===
MonkeyGTD is a Getting Things Done&trade;* system powered by MonkeyPirateTiddlyWiki. 

The currently stable version is based on TW 2.0.x and can be found at http://monkeygtd.tiddlyspot.com/

There is also a pretty usable (if you have Firefox) alpha over at http://mgtd-alpha.tiddlyspot.com/ (right click [[here|http://mgtd-alpha.tiddlyspot.com/empty.html]] to download) and a MonkeyGTD blog at http://monkeygtd.blogspot.com/
That's what MPTW stands for.
* [[WordCountMacro|http://wordcountmacro.tiddlyspot.com/]] - a one-liner that displays a tiddler's word count
* [[LinkToMeMacro|http://linktomemacro.tiddlyspot.com/]] - another one-liner that automatically makes a link to the current TiddlyWiki file

Older and experimental stuff:
* http://mptw-beta.tiddlyspot.com/
* http://mptw2.tiddlyspot.com/
* http://mptw1.tiddlyspot.com/
A simulation of the multiple paths that an asset can take

Drift + Log Normal Randon price change * volatility

C++
{{{
double mu = runData.getParamValue("Drift"); 
double sigma = runData.getParamValue("Volatility"); 
for(int j=0; j<numberOfRealisations; j++){ 
currentState[j][0] += currentState[j][0] * 
( mu*timeStep + 
random.nextGaussian()*sigma*Math.sqrt(timeStep) ); 
} 
}}
Name: MptwBlack
Background: #000
Foreground: #fff
PrimaryPale: #333
PrimaryLight: #555
PrimaryMid: #888
PrimaryDark: #aaa
SecondaryPale: #111
SecondaryLight: #222
SecondaryMid: #555
SecondaryDark: #888
TertiaryPale: #222
TertiaryLight: #666
TertiaryMid: #888
TertiaryDark: #aaa
Error: #300

This is in progress. Help appreciated.


Name: MptwBlue
Background: #fff
Foreground: #000
PrimaryPale: #cdf
PrimaryLight: #57c
PrimaryMid: #114
PrimaryDark: #012
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

/***
|Name:|MptwConfigPlugin|
|Description:|Miscellaneous tweaks used by MPTW|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
!!Note: instead of editing this you should put overrides in MptwUserConfigPlugin
***/
//{{{
var originalReadOnly = readOnly;
config.options.chkHttpReadOnly = false; // means web visitors can experiment with your site by clicking edit
readOnly = false;						// needed because the above doesn't work any more post 2.1 (??)
config.options.chkInsertTabs = true;    // tab inserts a tab when editing a tiddler
config.views.wikified.defaultText = ""; // don't need message when a tiddler doesn't exist
config.views.editor.defaultText = "";   // don't need message when creating a new tiddler 

config.mptwVersion = "2.3.7";

config.macros.mptwVersion={handler:function(place){wikify(config.mptwVersion,place);}};

if (config.options.txtTheme == '')
	config.options.txtTheme = 'MptwTheme';

// add to default GettingStarted
config.shadowTiddlers.GettingStarted += "\n\nSee also [[MPTW]].";

// add select theme and palette controls in default OptionsPanel
config.shadowTiddlers.OptionsPanel = config.shadowTiddlers.OptionsPanel.replace(/(\n\-\-\-\-\nAlso see AdvancedOptions)/, "{{select{<<selectTheme>>\n<<selectPalette>>}}}$1");

// these are used by ViewTemplate
config.mptwDateFormat = 'DD/MM/YY';
config.mptwJournalFormat = 'Journal DD/MM/YY';

//}}}
Name: MptwGreen
Background: #fff
Foreground: #000
PrimaryPale: #9b9
PrimaryLight: #385
PrimaryMid: #031
PrimaryDark: #020
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

Name: MptwRed
Background: #fff
Foreground: #000
PrimaryPale: #eaa
PrimaryLight: #c55
PrimaryMid: #711
PrimaryDark: #500
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

|Name|MptwRounded|
|Description|Mptw Theme with some rounded corners (Firefox only)|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
|PageTemplate|MptwTheme##PageTemplate|
|StyleSheet|MptwRoundTheme##StyleSheet|

!StyleSheet
/*{{{*/

[[MptwTheme##StyleSheet]]

.tiddler,
.sliderPanel,
.button,
.tiddlyLink,
.tabContents
{ -moz-border-radius: 1em; }

.tab {
	-moz-border-radius-topleft: 0.5em;
	-moz-border-radius-topright: 0.5em;
}
#topMenu {
	-moz-border-radius-bottomleft: 2em;
	-moz-border-radius-bottomright: 2em;
}

/*}}}*/

Name: MptwSmoke
Background: #fff
Foreground: #000
PrimaryPale: #aaa
PrimaryLight: #777
PrimaryMid: #111
PrimaryDark: #000
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

|Name|MptwStandard|
|Description|Mptw Theme with the default TiddlyWiki PageLayout|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
Name: MptwTeal
Background: #fff
Foreground: #000
PrimaryPale: #B5D1DF
PrimaryLight: #618FA9
PrimaryMid: #1a3844
PrimaryDark: #000
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #f8f8f8
TertiaryLight: #bbb
TertiaryMid: #999
TertiaryDark: #888
Error: #f88
|Name|MptwTheme|
|Description|Mptw Theme including custom PageLayout|
|PageTemplate|MptwTheme##PageTemplate|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
|StyleSheet|MptwTheme##StyleSheet|

http://mptw.tiddlyspot.com/#MptwTheme ($Rev: 1829 $)

!PageTemplate
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
	<div class='headerShadow'>
		<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
		<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
	</div>
	<div class='headerForeground'>
		<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
		<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
	</div>
</div>
<!-- horizontal MainMenu -->
<div id='topMenu' refresh='content' tiddler='MainMenu'></div>
<!-- original MainMenu menu -->
<!-- <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> -->
<div id='sidebar'>
	<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
	<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
	<div id='messageArea'></div>
	<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->

!ViewTemplate
<!--{{{-->
[[MptwTheme##ViewTemplateToolbar]]

<div class="tagglyTagged" macro="tags"></div>

<div class='titleContainer'>
	<span class='title' macro='view title'></span>
	<span macro="miniTag"></span>
</div>

<div class='subtitle'>
	(updated <span macro='view modified date {{config.mptwDateFormat?config.mptwDateFormat:"MM/0DD/YY"}}'></span>
	by <span macro='view modifier link'></span>)
	<!--
	(<span macro='message views.wikified.createdPrompt'></span>
	<span macro='view created date {{config.mptwDateFormat?config.mptwDateFormat:"MM/0DD/YY"}}'></span>)
	-->
</div>

<div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">
	<div class='viewer'><pre macro='view text'></pre></div>
</div>
<div macro="else">
	<div class='viewer' macro='view text wikified'></div>
</div>

<div class="tagglyTagging" macro="tagglyTagging"></div>

<!--}}}-->

!ViewTemplateToolbar
<!--{{{-->
<div class='toolbar'>
	<span macro="showWhenTagged systemConfig">
		<span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></span>
	</span>
	<span macro="showWhenTagged systemTheme"><span macro="applyTheme"></span></span>
	<span macro="showWhenTagged systemPalette"><span macro="applyPalette"></span></span>
	<span macro="showWhen tiddler.tags.contains('css') || tiddler.title == 'StyleSheet'"><span macro="refreshAll"></span></span>
	<span style="padding:1em;"></span>
	<span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler > fields syncing permalink references jump'></span> <span macro='newHere label:"new here"'></span>
	<span macro='newJournalHere {{config.mptwJournalFormat?config.mptwJournalFormat:"MM/0DD/YY"}}'></span>
</div>
<!--}}}-->

!EditTemplate
<!--{{{-->
<div class="toolbar" macro="toolbar +saveTiddler saveCloseTiddler closeOthers -cancelTiddler cancelCloseTiddler deleteTiddler"></div>
<div class="title" macro="view title"></div>
<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>
<div macro='annotations'></div>
<div macro="showWhenExists EditPanelTemplate">[[EditPanelTemplate]]</div>
<div class="editLabel">Content</div><div class="editor" macro="edit text"></div>
<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>
<div class="editorFooter"><span macro="message views.editor.tagPrompt"></span><span macro="tagChooser"></span></div>
<!--}}}-->

!StyleSheet
/*{{{*/

/* a contrasting background so I can see where one tiddler ends and the other begins */
body {
	background: [[ColorPalette::TertiaryLight]];
}

/* sexy colours and font for the header */
.headerForeground {
	color: [[ColorPalette::PrimaryPale]];
}
.headerShadow, .headerShadow a {
	color: [[ColorPalette::PrimaryMid]];
}

/* separate the top menu parts */
.headerForeground, .headerShadow {
	padding: 1em 1em 0;
}

.headerForeground, .headerShadow {
	font-family: 'Trebuchet MS' sans-serif;
	font-weight:bold;
}
.headerForeground .siteSubtitle {
	color: [[ColorPalette::PrimaryLight]];
}
.headerShadow .siteSubtitle {
	color: [[ColorPalette::PrimaryMid]];
}

/* make shadow go and down right instead of up and left */
.headerShadow {
	left: 1px;
	top: 1px;
}

/* prefer monospace for editing */
.editor textarea, .editor input {
	font-family: 'Consolas' monospace;
	background-color:[[ColorPalette::TertiaryPale]];
}


/* sexy tiddler titles */
.title {
	font-size: 250%;
	color: [[ColorPalette::PrimaryLight]];
	font-family: 'Trebuchet MS' sans-serif;
}

/* more subtle tiddler subtitle */
.subtitle {
	padding:0px;
	margin:0px;
	padding-left:1em;
	font-size: 90%;
	color: [[ColorPalette::TertiaryMid]];
}
.subtitle .tiddlyLink {
	color: [[ColorPalette::TertiaryMid]];
}

/* a little bit of extra whitespace */
.viewer {
	padding-bottom:3px;
}

/* don't want any background color for headings */
h1,h2,h3,h4,h5,h6 {
	background-color: transparent;
	color: [[ColorPalette::Foreground]];
}

/* give tiddlers 3d style border and explicit background */
.tiddler {
	background: [[ColorPalette::Background]];
	border-right: 2px [[ColorPalette::TertiaryMid]] solid;
	border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;
	margin-bottom: 1em;
	padding:1em 2em 2em 1.5em;
}

/* make options slider look nicer */
#sidebarOptions .sliderPanel {
	border:solid 1px [[ColorPalette::PrimaryLight]];
}

/* the borders look wrong with the body background */
#sidebar .button {
	border-style: none;
}

/* this means you can put line breaks in SidebarOptions for readability */
#sidebarOptions br {
	display:none;
}
/* undo the above in OptionsPanel */
#sidebarOptions .sliderPanel br {
	display:inline;
}

/* horizontal main menu stuff */
#displayArea {
	margin: 1em 15.7em 0em 1em; /* use the freed up space */
}
#topMenu br {
	display: none;
}
#topMenu {
	background: [[ColorPalette::PrimaryMid]];
	color:[[ColorPalette::PrimaryPale]];
}
#topMenu {
	padding:2px;
}
#topMenu .button, #topMenu .tiddlyLink, #topMenu a {
	margin-left: 0.5em;
	margin-right: 0.5em;
	padding-left: 3px;
	padding-right: 3px;
	color: [[ColorPalette::PrimaryPale]];
	font-size: 115%;
}
#topMenu .button:hover, #topMenu .tiddlyLink:hover {
	background: [[ColorPalette::PrimaryDark]];
}

/* make 2.2 act like 2.1 with the invisible buttons */
.toolbar {
	visibility:hidden;
}
.selected .toolbar {
	visibility:visible;
}

/* experimental. this is a little borked in IE7 with the button 
 * borders but worth it I think for the extra screen realestate */
.toolbar { float:right; }

/* fix for TaggerPlugin. from sb56637. improved by FND */
.popup li .tagger a {
   display:inline;
}

/* makes theme selector look a little better */
#sidebarOptions .sliderPanel .select .button {
  padding:0.5em;
  display:block;
}
#sidebarOptions .sliderPanel .select br {
	display:none;
}

/* make it print a little cleaner */
@media print {
	#topMenu {
		display: none ! important;
	}
	/* not sure if we need all the importants */
	.tiddler {
		border-style: none ! important;
		margin:0px ! important;
		padding:0px ! important;
		padding-bottom:2em ! important;
	}
	.tagglyTagging .button, .tagglyTagging .hidebutton {
		display: none ! important;
	}
	.headerShadow {
		visibility: hidden ! important;
	}
	.tagglyTagged .quickopentag, .tagged .quickopentag {
		border-style: none ! important;
	}
	.quickopentag a.button, .miniTag {
		display: none ! important;
	}
}

/* get user styles specified in StyleSheet */
[[StyleSheet]]

/*}}}*/

|Name|MptwTrim|
|Description|Mptw Theme with a reduced header to increase useful space|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
|PageTemplate|MptwTrimTheme##PageTemplate|
|StyleSheet|MptwTrimTheme##StyleSheet|

!StyleSheet
/*{{{*/
[[MptwTheme##StyleSheet]]
/*}}}*/


!PageTemplate
<!--{{{-->

<!-- horizontal MainMenu -->
<div id='topMenu' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<span refresh='content' tiddler='SiteTitle' style="padding-left:1em;font-weight:bold;"></span>:
<span refresh='content' tiddler='MainMenu'></span>
</div>
<div id='sidebar'>
	<div id='sidebarOptions'>
		<div refresh='content' tiddler='SideBarOptions'></div>
		<div style="margin-left:0.1em;"
			macro='slider chkTabSliderPanel SideBarTabs {{"tabs \u00bb"}} "Show Timeline, All, Tags, etc"'></div>
	</div>
</div>
<div id='displayArea'>
	<div id='messageArea'></div>
	<div id='tiddlerDisplay'></div>
</div>
For upgrading. See [[ImportTiddlers]].
URL: http://mptw.tiddlyspot.com/upgrade.html
/***
|Description:|A place to put your config tweaks so they aren't overwritten when you upgrade MPTW|
***/
//{{{

config.mptwDateFormat = 'DD/MM/YY';
config.mptwJournalFormat = 'Journal DD/MM/YY';
//config.mptwDateFormat = 'MM/0DD/YY';
//config.mptwJournalFormat = 'Journal MM/0DD/YY';

config.options.txtTheme = 'MptwTheme';

//}}}
/***
''NestedSlidersPlugin for TiddlyWiki version 1.2.x and 2.0''
^^author: Eric Shulman
source: http://www.elsdesign.com/tiddlywiki/#NestedSlidersPlugin
license: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^

Quickly make any tiddler content into an expandable 'slider' panel, without needing to create a separate tiddler to contain the slider content. Optional syntax allows ''default to open'', ''custom button label/tooltip'' and ''automatic blockquote formatting.''

You can also 'nest' these sliders as deep as you like (see complex nesting example below), so that expandable 'tree-like' hierarchical displays can be created. This is most useful when converting existing in-line text content to create in-line annotations, footnotes, context-sensitive help, or other subordinate information displays.

For more details, please click on a section headline below:
++++!!!!![Configuration]>
Debugging messages for 'lazy sliders' deferred rendering:
<<option chkDebugLazySliderDefer>> show debugging alert when deferring slider rendering
<<option chkDebugLazySliderRender>> show debugging alert when deferred slider is actually rendered
//''note: Enabling these settings may produce unexpected results. Use at your own risk.''//
===
++++!!!!![Usage]>
When installed, this plugin adds new wiki syntax for embedding 'slider' panels directly into tiddler content. Use {{{+++}}} and {{{===}}} to delimit the slider content. Additional optional syntax elements let you specify 'default to open', 'cookiename', 'heading level', 'custom label/tooltip', 'automatic blockquote' and 'deferred rendering'.
//{{{
++++(cookiename)!!!!![label|tooltip]>...
content goes here
===
//}}}
where:
* {{{+++}}} (or {{{++++}}}) and {{{===}}}^^
marks the start and end of the slider definition, respectively. When the extra {{{+}}} is used, the slider will be open when initially displayed.^^
* {{{(cookiename)}}}^^
save the slider opened/closed state, and restore this state whenever the slider is re-rendered.^^
* {{{!}}} through {{{!!!!!}}}^^
displays the slider label using a formatted headline (Hn) style instead of a button/link style^^
* {{{[label]}}} or {{{[label|tooltip]}}}^^
uses custom label/tooltip. (defaults are: ">/more..." and "</less...")^^
* {{{">"}}} //(without the quotes)//^^
automatically adds blockquote formatting to slider content^^
* {{{"..."}}} //(without the quotes)//^^
defers rendering of closed sliders until the first time they are opened. //Note: deferred rendering may produce unexpected results in some cases. Use with care.//^^

//Note: to make slider definitions easier to read and recognize when editing a tiddler, newlines immediately following the {{{+++}}} 'start slider' or preceding the {{{===}}} 'end slider' sequence are automatically supressed so that excess whitespace is eliminated from the output.//
===
++++!!!!![Examples]>
simple in-line slider: 
{{{
+++
 content
===
}}}
+++
 content
===
----
default to open: 
{{{
++++
 content
===
}}}
++++
 content
===
----
use a custom label: 
{{{
+++[label]
 content
===
}}}
+++[label]
 content
===
----
use a custom label and tooltip: 
{{{
+++[label|tooltip]
 content
===
}}}
+++[label|tooltip]
 content
===
----
content automatically blockquoted: 
{{{
+++>
 content
===
}}}
+++>
 content
===
----
all options combined //(default open, custom label/tooltip, blockquoted)//
{{{
++++(testcookie)[label|tooltip]>
 content
===
}}}
++++(testcookie)[label|tooltip]>
 content
===
----
complex nesting example:
{{{
+++[get info...|click for information]>
 put some general information here, plus a slider with more specific info:
 +++[view details...|click for details]>
 put some detail here, which could include some +++[definitions]>explaining technical terms===
 ===
===
}}}
+++[get info...|click for information]>
 put some general information here, plus a slider with more specific info:
 +++[view details...|click for details]>
 put some detail here, which could include some +++[definitions]>explaining technical terms===
 === 
=== 
===
+++!!!!![Installation]>
import (or copy/paste) the following tiddlers into your document:
''NestedSlidersPlugin'' (tagged with <<tag systemConfig>>)
===
+++!!!!![Revision History]>

++++[2006.01.03 - 1.6.2]
When using optional "!" heading style, instead of creating a clickable "Hn" element, create an "A" element inside the "Hn" element. (allows click-through in SlideShowPlugin, which captures nearly all click events, except for hyperlinks)
===

+++[2005.12.15 - 1.6.1]
added optional "..." syntax to invoke deferred ('lazy') rendering for initially hidden sliders
removed checkbox option for 'global' application of lazy sliders
===

+++[2005.11.25 - 1.6.0]
added optional handling for 'lazy sliders' (deferred rendering for initially hidden sliders)
===

+++[2005.11.21 - 1.5.1]
revised regular expressions: if present, a single newline //preceding// and/or //following// a slider definition will be suppressed so start/end syntax can be place on separate lines in the tiddler 'source' for improved readability. Similarly, any whitespace (newlines, tabs, spaces, etc.) trailing the 'start slider' syntax or preceding the 'end slider' syntax is also suppressed.
===

+++[2005.11.20 - 1.5.0]
 added (cookiename) syntax for optional tracking and restoring of slider open/close state
===

+++[2005.11.11 - 1.4.0]
 added !!!!! syntax to render slider label as a header (Hn) style instead of a button/link style
===

+++[2005.11.07 - 1.3.0]
 removed alternative syntax {{{(((}}} and {{{)))}}} (so they can be used by other
 formatting extensions) and simplified/improved regular expressions to trim multiple excess newlines
===

+++[2005.11.05 - 1.2.1]
 changed name to NestedSlidersPlugin
 more documentation
===

+++[2005.11.04 - 1.2.0]
 added alternative character-mode syntax {{{(((}}} and {{{)))}}}
 tweaked "eat newlines" logic for line-mode {{{+++}}} and {{{===}}} syntax
===

+++[2005.11.03 - 1.1.1]
 fixed toggling of default tooltips ("more..." and "less...") when a non-default button label is used
 code cleanup, added documentation
===

+++[2005.11.03 - 1.1.0]
 changed delimiter syntax from {{{(((}}} and {{{)))}}} to {{{+++}}} and {{{===}}}
 changed name to EasySlidersPlugin
===

+++[2005.11.03 - 1.0.0]
 initial public release
===

===
+++!!!!![Credits]>
This feature was implemented by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]] based on considerable research, programming and suggestions from RodneyGomes, GeoffSlocock, and PaulPetterson
===
***/
// //+++!!!!![Code]
//{{{
version.extensions.nestedSliders = {major: 1, minor: 6, revision: 2, date: new Date(2006,1,3)};
//}}}

//{{{
// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkDebugLazySliderDefer==undefined) config.options.chkDebugLazySliderDefer=false;
if (config.options.chkDebugLazySliderRender==undefined) config.options.chkDebugLazySliderRender=false;
//}}}

//{{{
config.formatters.push( {
 name: "nestedSliders",
 match: "\\n?\\+{3}",
 terminator: "\\s*\\={3}\\n?",
 lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\!*)?(\\[[^\\]]*\\])?(\\>?)(\\.\\.\\.)?\\s*",
 handler: function(w)
 {
 var lookaheadRegExp = new RegExp(this.lookahead,"mg");
 lookaheadRegExp.lastIndex = w.matchStart;
 var lookaheadMatch = lookaheadRegExp.exec(w.source)
 if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
 {
 // default to closed, no cookie
 var show="none"; var title=">"; var tooltip="show"; var cookie="";

 // extra "+", default to open
 if (lookaheadMatch[1])
 { show="block"; title="<"; tooltip="hide"; }

 // cookie, use saved open/closed state
 if (lookaheadMatch[2]) {
 cookie=lookaheadMatch[2].trim().substr(1,lookaheadMatch[2].length-2);
 cookie="chkSlider"+cookie;
 if (config.options[cookie]==undefined)
 { config.options[cookie] = (show=="block") }
 if (config.options[cookie])
 { show="block"; title="<"; tooltip="hide"; }
 else
 { show="none"; title=">"; tooltip="show"; }
 }

 // custom label/tooltip
 if (lookaheadMatch[4]) {
 title = lookaheadMatch[4].trim().substr(1,lookaheadMatch[4].length-2);
 if ((pos=title.indexOf("|")) != -1)
 { tooltip = title.substr(pos+1,title.length); title = title.substr(0,pos); }
 else
 { tooltip += " "+title; }
 }
 // use "Hn" header format instead of button/link
 if (lookaheadMatch[3]) {
 var lvl=(lookaheadMatch[3].length>6)?6:lookaheadMatch[3].length;
 var btn = createTiddlyElement(createTiddlyElement(w.output,"h"+lvl,null,null,null),"a",null,null,title);
 btn.onclick=onClickNestedSlider;
 btn.setAttribute("href","javascript:;");
 btn.setAttribute("title",tooltip);

 }
 else
 var btn = createTiddlyButton(w.output,title,tooltip,onClickNestedSlider);
 var panel = createTiddlyElement(w.output,"span",null,"sliderPanel",null);
 btn.sliderCookie = cookie;
 btn.sliderPanel = panel;
 panel.style.display = show;
 w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
 if (!lookaheadMatch[6] || show=="block") {
 w.subWikify(lookaheadMatch[5]?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
 }
 else {
 var src = w.source.substr(w.nextMatch);
 var endpos=findMatchingDelimiter(src,"+++","===");
 panel.setAttribute("raw",src.substr(0,endpos));
 panel.setAttribute("blockquote",lookaheadMatch[5]?"true":"false");
 panel.setAttribute("rendered","false");
 w.nextMatch += endpos+3;
 if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
 if (config.options.chkDebugLazySliderDefer)
 alert("deferred '"+title+"':\n\n"+panel.getAttribute("raw"));
 }
 }
 }
 }
)

// TBD: ignore 'quoted' delimiters (e.g., "{{{+++foo===}}}" isn't really a slider)
function findMatchingDelimiter(src,starttext,endtext) {
 var startpos = 0;
 var endpos = src.indexOf(endtext);
 // check for nested delimiters
 while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
 // count number of nested 'starts'
 var startcount=0;
 var temp = src.substring(startpos,endpos-1);
 var pos=temp.indexOf(starttext);
 while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
 // set up to check for additional 'starts' after adjusting endpos
 startpos=endpos+endtext.length;
 // find endpos for corresponding number of matching 'ends'
 while (startcount && endpos!=-1) {
 endpos = src.indexOf(endtext,endpos+endtext.length);
 startcount--;
 }
 }
 return (endpos==-1)?src.length:endpos;
}
//}}}

//{{{
function onClickNestedSlider(e)
{
 if (!e) var e = window.event;
 var theTarget = resolveTarget(e);
 var theLabel = theTarget.firstChild.data;
 var theSlider = theTarget.sliderPanel
 var isOpen = theSlider.style.display!="none";
 // if using default button labels, toggle labels
 if (theLabel==">") theTarget.firstChild.data = "<";
 else if (theLabel=="<") theTarget.firstChild.data = ">";
 // if using default tooltips, toggle tooltips
 if (theTarget.getAttribute("title")=="show")
 theTarget.setAttribute("title","hide");
 else if (theTarget.getAttribute("title")=="hide")
 theTarget.setAttribute("title","show");
 if (theTarget.getAttribute("title")=="show "+theLabel)
 theTarget.setAttribute("title","hide "+theLabel);
 else if (theTarget.getAttribute("title")=="hide "+theLabel)
 theTarget.setAttribute("title","show "+theLabel);
 // deferred rendering (if needed)
 if (theSlider.getAttribute("rendered")=="false") {
 if (config.options.chkDebugLazySliderRender)
 alert("rendering '"+theLabel+"':\n\n"+theSlider.getAttribute("raw"));
 var place=theSlider;
 if (theSlider.getAttribute("blockquote")=="true")
 place=createTiddlyElement(place,"blockquote");
 wikify(theSlider.getAttribute("raw"),place);
 theSlider.setAttribute("rendered","true");
 }
 // show/hide the slider
// DISABLED: animation sets overflow:hidden, which clips nested sliders...
// if(config.options.chkAnimate)
// anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
// else
 theSlider.style.display = isOpen ? "none" : "block";
 if (this.sliderCookie && this.sliderCookie.length)
 { config.options[this.sliderCookie]=!isOpen; saveOptionCookie(this.sliderCookie); }
 return false;
}
//}}}
// //===
There is now a blog for MPTW. Check it out [[here|http://monkeypiratetiddlywiki.blogspot.com/]].
!!Theme overhaul plus theme and palette switcher
Click options and try "select theme" and "select palette". Also there is no longer the empty_nolayout. You can just download the empty.html and change theme to MptwStandard. If you like to customise your templates see [[Note about customising templates]].
!!Slice based tagging list modes
You can now show tagging lists with all slices or description slices. See [[systemConfig]] for an example of the description slice. To use these click the excerpts button to cycle through the modes.
!!New plugins
I've included InstantTimestampPlugin and PrettyDatesPlugin as part of the standard MPTW distribution.
!!Latest TW core
Finally. <<version>>. Sorry about the long wait.
/***
|Name:|NewHerePlugin|
|Description:|Creates the new here and new journal macros|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
	newHere: {
		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
		}
	},
	newJournalHere: {
		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			wikify("<<newJournal "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
		}
	}
});

//}}}

/***
|Name:|NewMeansNewPlugin|
|Description:|If 'New Tiddler' already exists then create 'New Tiddler (1)' and so on|
|Version:|1.1 ($Rev: 2263 $)|
|Date:|$Date: 2007-06-13 04:22:32 +1000 (Wed, 13 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/empty.html#NewMeansNewPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Note: I think this should be in the core
***/
//{{{

String.prototype.getNextFreeName = function() {
       var numberRegExp = / \(([0-9]+)\)$/;
       var match = numberRegExp.exec(this);
       if (match) {
               var num = parseInt(match[1]) + 1;
               return this.replace(numberRegExp," ("+num+")");
       }
       else {
               return this + " (1)";
       }
}

config.macros.newTiddler.checkForUnsaved = function(newName) {
	var r = false;
	story.forEachTiddler(function(title,element) {
		if (title == newName)
			r = true;
	});
	return r;
}

config.macros.newTiddler.getName = function(newName) {
       while (store.getTiddler(newName) || config.macros.newTiddler.checkForUnsaved(newName))
               newName = newName.getNextFreeName();
       return newName;
}


config.macros.newTiddler.onClickNewTiddler = function()
{
	var title = this.getAttribute("newTitle");
	if(this.getAttribute("isJournal") == "true") {
		var now = new Date();
		title = now.formatString(title.trim());
	}

	title = config.macros.newTiddler.getName(title); // <--- only changed bit

	var params = this.getAttribute("params");
	var tags = params ? params.split("|") : [];
	var focus = this.getAttribute("newFocus");
	var template = this.getAttribute("newTemplate");
	var customFields = this.getAttribute("customFields");
	story.displayTiddler(null,title,template,false,null,null);
	var tiddlerElem = document.getElementById(story.idPrefix + title);
	if(customFields)
		story.addCustomFields(tiddlerElem,customFields);
	var text = this.getAttribute("newText");
	if(typeof text == "string")
		story.getTiddlerField(title,"text").value = text.format([title]);
	for(var t=0;t<tags.length;t++)
		story.setTiddlerTag(title,tags[t],+1);
	story.focusTiddler(title,focus);
	return false;
};

//}}}

MPTW is now using the new theme framework from TW 2.3. It's pretty new and not well documented so I will make some notes here for those who want to customise their MPTW. 

Take a look at the tiddlers tagged with <<tag systemTheme>>. The slices there specify the templates and stylesheets used by that theme. Notice also that you can use the new Tiddler##Section notation to use a section of a tiddler.

If you want to customise your templates make a new systemTheme copied from MptwTheme then modify that as required.
start
#item1
#item2
##item2.1
##item2.2
##item2.3
#item3
##item3.1
###item3.1.1
###item3.1.2

end
!Outline Processor Markup Language
Exchange lists of web feeds between web feed aggregators.
[[OS X Apps]]
[[OS X UNIX]]

<<tag osxtip>>
!Comms
Cisco [[VPN]] Client

[[FreeMind]] Personal mind maps, for all ones ideas
[[ArtRage]] Great free version, well worth the upgrade if you use it.

!Files
[[Cyberduck|]] Excellent free FTP client.
[[OS X Apps]]

OS X UNIX tips : <<tag osxunixtip>>
!OpTier Transaction Tracking Interface

OpTier's CoreFirst SDK is known as OTTI and can be used to develop custom Tier Extensions [[TE]] in C++ and Java.

!! Methods for instrumentation
Methods such as start tier, stop tier, call to next tier started, call to next tier finished are present in the thin API, to trace transactions through tiers.
The makers of CoreFirst instrumentation product
![[OpTier Acronyms]]

|CF|CoreFirst|
|[[DSTE]]|DataSynapse Tier Extension|
|[[ET]]|Elapsed Time|
|[[UOW]]|Unit Of Work|
|[[OTTI]]|OpTier Transaction Tracking Interface|
|[[TE]]|Tier Extension|
|[[ST]]|Service Time, dose not include time waiting for other tiers|
!Connection

!JDBC drivers
* port - 1521
!!JDBC Oracle Thin
100% java, platform independent
* class name - oracle.jdbc.driver.OracleDriver 
* jars - Oracle\ora92\jdbc\lib\ojdbc14.jar for java 1.4 or above
* url - jdbc:oracle:thin:@<server>[:<1521>]:<database_name>
!!JDBC Oracle OCI
* class name- oracle.jdbc.driver.OracleDriver
* jars - add Oracle\ora92\jdbc\classes12.jar to CLASS_PATH 
* libraries - add Oracle\ora92\bin to path for ocijdb9.dll + other dependent dlls.
* url - e.g. jdbc:oracle:oci:HPCCF_OWNER/HPCCF_OWNER@ORFLND21
!Development
*[[cygwin]] gives PC the power of basic UNIX commands http://cygwin.com/
*Incredibuild
*Bugbase
*XmlSpy
*ClearCase
*PerForce
*Process Explorer {{{procexp.exe}}}
*VisualStudio
*[[MSI]]

!Comms
*[[Putty]] remember to run pageant and add ssh keys
*[[WinScp|http://winscp.net/eng/index.php]] ftp free download
*[[VNC]]
*Lotus Notes - email
*Same Time - instance messenger
{{{mstsc}}} Microsoft remote desktop


!Compression
*[[winrar|http://www.rarlab.com]] - for .rar files, naff GUI
*winzip - naff GUI

!Database
*RapidSQL
*[[Embracadero]] - SQL client

!Editors
*Crimson - nothing good to say about this.
*UltraEdit - not much better, have to put up using it until something better comes along. 

!Java
*[[Eclipse]]
*[[JAD]]

!Start run... shortcuts
|cmd|
|excel|
|eventvwr|PC Event viewer|
|mspaint|
|notepad|
|service.msc|Service control panel|
Edit it with {{{regedit.exe}}}

HKEY_CURRENT_USER\Environment

System variables are found in the key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment 

Note that service don't pick up these changes until a reboot.
A publish and subscribe client connection to the EventServer
{{{PSEvent}}} is passed between applications via the EventServer, and tell apps just enough information to know what has happened.

Apps subscribe for subclasses of {{{PSEvent}}}

PSEventDomainChange - Static data has changed - type of data 
PSEventTrade - A user has created, modified, or deleted a - key trade data before/after
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
When the parent thread that started a number of children threads dies, these child threads become orphaned.

A solutions, catch any exceptions in the parent thread and programmatiaclly inform the children via a flag.

Symptoms: program that locks up without the printing of stack traces to standard error.
/***
|Name:|PrettyDatesPlugin|
|Description:|Provides a new date format ('pppp') that displays times such as '2 days ago'|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#PrettyDatesPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Notes
* If you want to you can rename this plugin. :) Some suggestions: LastUpdatedPlugin, RelativeDatesPlugin, SmartDatesPlugin, SexyDatesPlugin.
* Inspired by http://ejohn.org/files/pretty.js
***/
//{{{
Date.prototype.prettyDate = function() {
	var diff = (((new Date()).getTime() - this.getTime()) / 1000);
	var day_diff = Math.floor(diff / 86400);

	if (isNaN(day_diff))      return "";
	else if (diff < 0)        return "in the future";
	else if (diff < 60)       return "just now";
	else if (diff < 120)      return "1 minute ago";
	else if (diff < 3600)     return Math.floor(diff/60) + " minutes ago";
	else if (diff < 7200)     return "1 hour ago";
	else if (diff < 86400)    return Math.floor(diff/3600) + " hours ago";
	else if (day_diff == 1)   return "Yesterday";
	else if (day_diff < 7)    return day_diff + " days ago";
	else if (day_diff < 14)   return  "a week ago";
	else if (day_diff < 31)   return Math.ceil(day_diff/7) + " weeks ago";
	else if (day_diff < 62)   return "a month ago";
	else if (day_diff < 365)  return "about " + Math.ceil(day_diff/31) + " months ago";
	else if (day_diff < 730)  return "a year ago";
	else                      return Math.ceil(day_diff/365) + " years ago";
}

Date.prototype.formatString_orig_mptw = Date.prototype.formatString;

Date.prototype.formatString = function(template) {
	return this.formatString_orig_mptw(template).replace(/pppp/,this.prettyDate());
}

// for MPTW. otherwise edit your ViewTemplate as required.
// config.mptwDateFormat = 'pppp (DD/MM/YY)'; 
config.mptwDateFormat = 'pppp'; 

//}}}

The GTD Tiddly Wiki has been designed to print "HipsterPDA" 3x5 index cards. All you have to do is use your browser's "Print" button or shortcut key.

!Print Features:
* Print directly to 3x5 from your browser. There is no "printer friendly" link.
* Pagination: Each Tiddler (or GTD list) will print on it's own sheet. You could have all your lists open and print them all at once.
* If you know any CSS, you can completely customize the print output.
* List bullets are circles to help you mark off completed tasks in your HipsterPDA.

[img[http://img15.echo.cx/img15/57/lists2jb.jpg]]

!How to customize print style, typeface, or font size:
* Edit the StyleSheet Tiddler (it helps to know a little CSS).

!KnownBugs with print:
* Firefox/Mac has no "page properties" interface for removing the page URL, page numbers, etc... from printed pages. This is pretty lame. Try entering about:config in Firefox's URL bar and look for "print" to configure it the hard way.
* WIN/IE 6 inserts one blank page because it does not recognize the :first-child CSS psuedo element.
* You'll probably need to tweak your browser print settings to remove the page URL, pagination, timestamp, and ensure that the output is sized and paged correctly.
* Your mileage may vary because of platform, font, browser, and printer differences. If you find something that's broken or needs help, visit the GTDTWForum.
Quartz is a full-featured, open source job scheduling system

http://www.opensymphony.com/quartz/
/***
|Name:|QuickOpenTagPlugin|
|Description:|Changes tag links to make it easier to open tags as tiddlers|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
config.quickOpenTag = {

	dropdownChar: (document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE?

	createTagButton: function(place,tag,excludeTiddler) {
		// little hack so we can do this: <<tag PrettyTagName|RealTagName>>
		var splitTag = tag.split("|");
		var pretty = tag;
		if (splitTag.length == 2) {
			tag = splitTag[1];
			pretty = splitTag[0];
		}
		
		var sp = createTiddlyElement(place,"span",null,"quickopentag");
		createTiddlyText(createTiddlyLink(sp,tag,false),pretty);
		
		var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
                        config.views.wikified.tag.tooltip.format([tag]),onClickTag);
		theTag.setAttribute("tag",tag);
		if (excludeTiddler)
			theTag.setAttribute("tiddler",excludeTiddler);
    		return(theTag);
	},

	miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var tagged = store.getTaggedTiddlers(tiddler.title);
		if (tagged.length > 0) {
			var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,
                        	config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);
			theTag.setAttribute("tag",tiddler.title);
			theTag.className = "miniTag";
		}
	},

	allTagsHandler: function(place,macroName,params) {
		var tags = store.getTags(params[0]);
		var filter = params[1]; // new feature
		var ul = createTiddlyElement(place,"ul");
		if(tags.length == 0)
			createTiddlyElement(ul,"li",null,"listTitle",this.noTags);
		for(var t=0; t<tags.length; t++) {
			var title = tags[t][0];
			if (!filter || (title.match(new RegExp('^'+filter)))) {
				var info = getTiddlyLinkInfo(title);
				var theListItem =createTiddlyElement(ul,"li");
				var theLink = createTiddlyLink(theListItem,tags[t][0],true);
				var theCount = " (" + tags[t][1] + ")";
				theLink.appendChild(document.createTextNode(theCount));
				var theDropDownBtn = createTiddlyButton(theListItem," " +
					config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);
				theDropDownBtn.setAttribute("tag",tags[t][0]);
			}
		}
	},

	// todo fix these up a bit
	styles: [
"/*{{{*/",
"/* created by QuickOpenTagPlugin */",
".tagglyTagged .quickopentag, .tagged .quickopentag ",
"	{ margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }",
".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }",
".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}",
"/* extra specificity to make it work right */",
"#displayArea .viewer .quickopentag a.button, ",
"#displayArea .viewer .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink ",
"	{ border:0px solid black; }",
"#displayArea .viewer .quickopentag a.button, ",
"#mainMenu .quickopentag a.button ",
"	{ margin-left:0px; padding-left:2px; }",
"#displayArea .viewer .quickopentag a.tiddlyLink, ",
"#mainMenu .quickopentag a.tiddlyLink ",
"	{ margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }",
"a.miniTag {font-size:150%;} ",
"#mainMenu .quickopentag a.button ",
"	/* looks better in right justified main menus */",
"	{ margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }", 
"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }",
"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }",
"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }",
"/*}}}*/",
		""].join("\n"),

	init: function() {
		// we fully replace these builtins. can't hijack them easily
		window.createTagButton = this.createTagButton;
		config.macros.allTags.handler = this.allTagsHandler;
		config.macros.miniTag = { handler: this.miniTagHandler };
		config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;
		store.addNotification("QuickOpenTagStyles",refreshStyles);
	}
}

config.quickOpenTag.init();

//}}}

!Remote Method Invocation [[java.rmi]] API

RMI is used so a client can execute a method on a server running on a physically different machine (port 1099).

As well as a Client and a Server application, two other parts are needed:
* a remote object interface
* a remote object implementation (of interface)

|-Djava.rmi.server.codebase=|location of classes. A path to a jar file or directory (''with trailing /'')|eg. http://zaphod/~ann/classes/|
|-Djava.rmi.server.hostname=|Address of server on which stubs for RMI objects, set if needed to be different to getLocalHost|eg. zaphod.east.sun.com|
RMI tools: 
* [[rmic]] - Java RMI stub compiler, later versions generate these on the fly.
* [[rmiregistry]] - Java remote object registry
* [[rmid]] - Java RMI activation system daemon
Also need a http server for class files: try http://www.jibble.org/miniwebserver/

----
Runtime information on the transport used by RMI:
{{{
String hostIp = TCPTransport.getClientHost();
Method getSocketMethod = sun.rmi.transport.tcp.TCPConnection.class.getMethod("getSocket", null);
((Socket)getSocketMethod.invoke(connection, null)).getInetAddress();
}}}
java.lang.regex

Pattern
Matcher

|{{{\d}}}|any digit char| 0-9|
|{{{\w}}}|any word char| not a space|
|{{{\s}}}|space| char |
|{{{\.}}}| the dot char|

|+| one or more (greedy) |+? non-greedy|
|.|one character|
|?|zero or one |
|*|zero or more (greedy)| *? non-greedy|

!Example

Find:
{{{private Alphanumeric parcelConsignmentNumber =}}} ''(Alphanumeric) add''{{{(new Alphanumeric("parcelConsignmentNumber",RequirementType.Manditory,8,20));}}}
With:
{{{
\((.*?)\) add
}}}
Get enough sleep. It cannot be stated how important this is to aid memory, recall and storage of new information.
!Recall
Emotions effect recall, "test anxiety","on the tip of the tongue".

Relax. Move on and then come back, as the answer is likely to pop into the mind.
Increase the faith one has in ones own memory, trust it.
!Attention
Paying attention is to focus, and dose not occur when multi-tasking.
Proof: States have laws against talking on a cell phone and driving.
!Organisation
Identify in new information parts that you already know & part that can be figured out.
Categorise information as an iterative process, progressively refining it. This is, more beneficial for adults than for children.
Proof: It is well known that it is easier to remember a list of related items, eg. chair, table, cupboard, tea cup. Than un-related items, e.g. jet, C++, cash, window. 
!Association
We learn best by associating the new with what we already know. Rote memory is worst, because of the lack of association.

Associations are most effective when they are visual images.
Proof: Neurophysiologically the brain devotes vastly more neurons to vision than hearing, language, etc.

Use diagrams, doodles, more than pure text. Images should be based on nouns, which are concrete and easy to image. Link images together to form stories.

Recall of memory is its strongest in the same location as it was created.
Proof: Suba divers remembered associated list better when learnt and recalled under-water, as opposed to being learnt under-water and recalled on land or visa versa.
!Chunking
Our internal scratch pad is limited to 7 +/- 2 items, hence (local) phone numbers are 7 digits. If items are changed in the mental scratch pad too quickly, then consolidation is impaired. 
!Rehearsal
Learning must be rehearsed to aid consolidation. 
Proof: Motor neural feats, such as piano, typing, and dancing are 
perfected by numerous repetitions. 
Last 5-10 minutes of a lesson should be used to consolidate the mental scratch pad, before the scratch pad is filled by new material. Cumulative rehearsal needs to be explicitly taught and practised by poor learners.
Rehearsal needs to go on every day, even if for a few minutes to achieve effective consolidation. Good teaching reduces the amount of rehearsal needed.

Bad rehearsal is cramming for exams, as this only uses short term memory. Test should be based on the philosophical precept that learning should be permanent. 

Multiple choice test primarily test recognition and not recall which is the ability to generate the right answer from scratch.
!The Ten Minute Rule
Take new material in for 10 minutes, then rehears the new material for 10 minutes. Successively link new material towards a greater mastery of a large set of competencies. 
Logic: Reduces mental scratch pad interference, optimises chunking, association, and attentiveness.

http://www.uncwil.edu/cte/et/articles/Vol7_1/Klemm.htm
http://thankyoubrain.com/
/***
|Name:|RenameTagsPlugin|
|Description:|Allows you to easily rename or delete tags across multiple tiddlers|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
Rename a tag and you will be prompted to rename it in all its tagged tiddlers.
***/
//{{{
config.renameTags = {

	prompts: {
		rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",
		remove: "Remove the tag '%0' from %1 tidder%2?"
	},

	removeTag: function(tag,tiddlers) {
		store.suspendNotifications();
		for (var i=0;i<tiddlers.length;i++) {
			store.setTiddlerTag(tiddlers[i].title,false,tag);
		}
		store.resumeNotifications();
		store.notifyAll();
	},

	renameTag: function(oldTag,newTag,tiddlers) {
		store.suspendNotifications();
		for (var i=0;i<tiddlers.length;i++) {
			store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old
			store.setTiddlerTag(tiddlers[i].title,true,newTag);  // add new
		}
		store.resumeNotifications();
		store.notifyAll();
	},

	storeMethods: {

		saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,

		saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields) {
			if (title != newTitle) {
				var tagged = this.getTaggedTiddlers(title);
				if (tagged.length > 0) {
					// then we are renaming a tag
					if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))
						config.renameTags.renameTag(title,newTitle,tagged);

					if (!this.tiddlerExists(title) && newBody == "")
						// dont create unwanted tiddler
						return null;
				}
			}
			return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields);
		},

		removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,

		removeTiddler: function(title) {
			var tagged = this.getTaggedTiddlers(title);
			if (tagged.length > 0)
				if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))
					config.renameTags.removeTag(title,tagged);
			return this.removeTiddler_orig_renameTags(title);
		}

	},

	init: function() {
		merge(TiddlyWiki.prototype,this.storeMethods);
	}
}

config.renameTags.init();

//}}}

Unique key across tiers for a transaction
!Space Based Architecture

Using Sun's JavaSpace as the centre of architecture design to remove physical IP location from design solutions.
!Sun Certified Java Programer

    * Two top-level public classes cannot be in the same source file.
    * main() cannot call an instance (non-static) method.
    * Methods can have the same name as the constructor(s).
    * Watch for thread initiation with classes that don't have a run() method.
    * Local classes cannot access non-final variables.
    * Case statements must have values within permissible range.
    * ''Watch for Math class being an option for immutable classes.''
    * instanceOf is not the same as instanceof.
    * Constructors can be private.
    * Assignment statements can be mistaken for a comparison; e.g., if(a=true)...
    * Watch for System.exit() in try-catch-finally blocks.
    * Watch for uninitialized variable references with no path of proper initialization.
    * Order of try-catch-finally blocks matters.
    * main() can be declared final.
    * ''-0.0 == 0.0 is true.''
    * A class without abstract methods can still be declared abstract.
    * ''RandomAccessFile descends from Object and implements DataInput and DataOutput.''
    * ''Map does not implement Collection.''
    * ''Dictionary is a class, not an interface.''
    * ''Collection (singular) is an Interface, but Collections (plural) is a helper class.''
    * Class declarations can come in any order (e.g., derived first, base next, etc.).
    * Forward references to variables gives a compiler error.
    * Multi-dimensional arrays can be "sparse" -- i.e., if you imagine the array as a matrix, every row need not have the same number of columns.
    * Arrays, whether local or class-level, are always initialized
    * Strings are initialized to null, not empty string.
    * An empty string is not the same as a null reference.
    * ''A declaration cannot be labeled.''
    * ''continue must be in a loop (e.g., for, do, while). It cannot appear in case constructs, or labeled if statements.''
    * Primitive array types can never be assigned to each other, even though the primitives themselves can be assigned. For example, ArrayofLongPrimitives = ArrayofIntegerPrimitives gives compiler error even though longvar = intvar is perfectly valid.
    * A constructor can throw any exception (not limited by parent).
    * Initializer blocks are executed in the order of declaration.
    * Instance initializers are executed only if an object is constructed.
    * ''All comparisons involving NaN and a non-NaN always result in false.''
    * Default type of a numeric literal with a decimal point is double.
    * ''int and long operations / and % can throw an ArithmeticException, while float and double / and % never will (even in case of division by zero).''
    * == gives compiler error if the operands are cast-incompatible.
    * {{{(Double.NaN == Double.NaN)}}} is unexpectantly false, where as {{{(Double.MAX_VALUE == Double.MAX_VALUE)}}} is true
    * You can never cast objects of sibling classes (sharing the same parent).
    * ''equals() returns false if the object types are different. It does not raise a compiler error.''
    * No inner class can have a static member. ''but can have final static member''
    * File class has no methods to deal with the contents of the file.
    * ''InputStream and OutputStream are abstract classes, while DataInput and DataOutput are interfaces.''
 
Compiler, will not compile unreachable code; {{{while (false) { out.print("never); } }}}
Compiler, will not compile used uninitialised variables; {{{ int x; if (x ==0) { } }}}
Compiler, will not compile uninitialised final static variables.

Classes, Only nested class can be marked with static to make them a Top Level Class.
Classes, Non nested classes cannot be marked protected, or private, only public or implicit package
Classes, The one and only {{{public}}} class cannot be marked static, as its already a 
Classes, that are nested and marked as private are invisible outside the java file.
Inner Classes, cannot have static initialization sequences.
Inner Classes, need to be top level i.e. static to have their own static variables, or methods.
Inner Classes, inside methods can never be top level, i.e. using static is invalid.

Interfaces, are implicitly {{{public abstract}}}
Interfaces, All methods must be and are implicitly public
Interfaces, All variables must be and are implicitly public final static
Interfaces, can extend, but not implement.

Variables, final static variables MUST be initialised.
Variables, boolean (unknown), byte 8, char 16, short 16, int 32, long 64
Variables, float 32, double 64
Variables, 10 implicitly integer, 10.0 implicitly double

String, String s ="abc", s2 ="abc"; s == s2 is true because implicit s.intern() & s2.intern();
String, {{{"abcdef".substring(1,3)}}} = "bcd" 

Boxing, -128..127 are cached objects for new Byte, Integer, and Long
Boxing, boolean isTrue = new Long(127) == new Long(127), isFalse = new Long(128) == new Long(128)
Boxing, new Character(32) is invalid, parameter must be 'c', but {{{char c = 32}}}; is ok,
Boxing, 

Numbers,  -0.0 == 0.0 is true   1.0 / 0 is infinity 0.0 / 0 is Double.NaN
Numbers,  Double.Nan == Double NaN is false, x!=x when x is NaN.
Numbers, Math defines final static double PI and E. Remember DOUBLE not float.
Numbers,  Math.round(float) returns int
Numbers,  Math.round(double) returns long
Numbers,  Math package, floor and ceil are only for double, as are cos, sin, etc 


Methods, super classes may define their own methods as supper classes methods marked private.
Methods marked as static cannot override or be overridden. 

Collections, {{{java.util.Collection}}} is an interface, {{{java.util.Collections}}} is a class 
Collections, List, Queue implement Collection, Map dose not; none are Serialiszable.
Collections, are shallow copy Cloneable.
Collections, legacy classes Vector, and Hashtable both have synchronized methods
Collections, legacy Vector 
Collections, legacy Hashtable, non null keys or values
Collections, HashTable dose not exits ! see above.
Collections, Map 
Collections, binarySearch() return index, if not found adds one and negates i.e. insert position 0 becomes -1.
 
Collections, PriotityQueue implements Queue offer(), peek(), poll()
Collections, LinkedList implements List, Queue


Generics. List<?> is spoken as"List of any object", whereas List<Object> is spoken ad a List of Object.
Generics List<Integer> is spoke as "List of Integer".
Generics, ? or ? extends, cannot add to a collection, but can remove
Generics, {{{?}}} cannot be used in a class def, must be class {{{MyClass<T>}}}
Generics, {{{List<?>[] question = new List<?>[16];}}} Ok
Generics, {{{List<?> question2 = new ArrayList<Integer>();}}} Ok
Generics, {{{List<?>[] question3 = new List<Integer>[16];}}} ERROR
Generics, {{{instanceof List<Integer>}}} ERROR
Generics, {{{(List<Integer>)list}}} Warning, unchecked.
Generics, class conflict;  {{{ class Pair<T> {} class Pair<S,V> {} }}}
Generics, method conflict; {{{ class Pait<S,V> { void m(S) {} void m(V) {} }}}

Threads, wait/notify must be inside a synchronised block, otherwise RTE java.lang.IllegalMonitorStateException();
Threads, yeild is static and take no parameters, Thread.yeild();
Threads, join is not static. threadA.join()  joins the current thread to threadA
!System Identifier
A unique name for an Oracle instance.The SID is included in the CONNECT DATA parts of the connect descriptors in a tnsnames.ora file, and in the definition of the network listener in a listener.ora file.

http://download-uk.oracle.com/docs/cd/B10501_01/win.920/a95491/glossary.htm
!Structured Query Language

[[DCL]] Data Control Language
[[DML]] Data Manipulation Language
[[DDL]] Data Definition Language
[[square root]] function in excell
!Straight Through Processing
/***
|Name:|SaveCloseTiddlerPlugin|
|Description:|Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#SaveCloseTiddlerPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
To use these you must add them to the tool bar in your EditTemplate
***/
//{{{
merge(config.commands,{

	saveCloseTiddler: {
		text: 'done/close',
		tooltip: 'Save changes to this tiddler and close it',
		handler: function(e,src,title) {
			config.commands.saveTiddler.handler(e,src,title);
			config.commands.closeTiddler.handler(e,src,title);
			return false;
		}
	},

	cancelCloseTiddler: {
		text: 'cancel/close',
		tooltip: 'Undo changes to this tiddler and close it',
		handler: function(e,src,title) {
			config.commands.cancelTiddler.handler(e,src,title);
			config.commands.closeTiddler.handler(e,src,title);
			return false;
		}
	}

});

//}}}

!Turn debug on
Include seam-debug.jar in the WAR file. If this jar is deployed in WEB-INF/lib, along with the Facelets, and if you set the following Seam property in web.xml or seam.properties:

<context-param>
 <param-name>org.jboss.seam.core.init.debug</param-name>
 <param-value>true</param-value>
</context-param>
Then http://host:port/todo-seam/debug.seam
By [[Investment Bank]]s both proprietary and for clients

[[Secondary Market]]
* [[Bond]] & [[Share]]
* [[Derivative]]s
/***
|Name:|SelectThemePlugin|
|Description:|Lets you easily switch theme and palette|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#SelectThemePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
* Borrows largely from ThemeSwitcherPlugin by Martin Budden http://www.martinswiki.com/#ThemeSwitcherPlugin
* Theme is cookie based. But set a default by setting config.options.txtTheme in MptwConfigPlugin (for example)
* Palette is not cookie based. It actually overwrites your ColorPalette tiddler when you select a palette, so beware. 
!Usage
* {{{<<selectTheme>>}}} makes a dropdown selector
* {{{<<selectPalette>>}}} makes a dropdown selector
* {{{<<applyTheme>>}}} applies the current tiddler as a theme
* {{{<<applyPalette>>}}} applies the current tiddler as a palette
* {{{<<applyTheme TiddlerName>>}}} applies TiddlerName as a theme
* {{{<<applyPalette TiddlerName>>}}} applies TiddlerName as a palette
***/
//{{{

config.macros.selectTheme = {
	label: {
      		selectTheme:"select theme",
      		selectPalette:"select palette"
	},
	prompt: {
		selectTheme:"Select the current theme",
		selectPalette:"Select the current palette"
	},
	tags: {
		selectTheme:'systemTheme',
		selectPalette:'systemPalette'
	}
};

config.macros.selectTheme.handler = function(place,macroName)
{
	var btn = createTiddlyButton(place,this.label[macroName],this.prompt[macroName],this.onClick);
	// want to handle palettes and themes with same code. use mode attribute to distinguish
	btn.setAttribute('mode',macroName);
};

config.macros.selectTheme.onClick = function(ev)
{
	var e = ev ? ev : window.event;
	var popup = Popup.create(this);
	var mode = this.getAttribute('mode');
	var tiddlers = store.getTaggedTiddlers(config.macros.selectTheme.tags[mode]);
	// for default
	if (mode == "selectPalette") {
		var btn = createTiddlyButton(createTiddlyElement(popup,'li'),"(default)","default color palette",config.macros.selectTheme.onClickTheme);
		btn.setAttribute('theme',"(default)");
		btn.setAttribute('mode',mode);
	}
	for(var i=0; i<tiddlers.length; i++) {
		var t = tiddlers[i].title;
		var name = store.getTiddlerSlice(t,'Name');
		var desc = store.getTiddlerSlice(t,'Description');
		var btn = createTiddlyButton(createTiddlyElement(popup,'li'),name ? name : title,desc ? desc : config.macros.selectTheme.label['mode'],config.macros.selectTheme.onClickTheme);
		btn.setAttribute('theme',t);
		btn.setAttribute('mode',mode);
	}
	Popup.show();
	return stopEvent(e);
};

config.macros.selectTheme.onClickTheme = function(ev)
{
	var mode = this.getAttribute('mode');
	var theme = this.getAttribute('theme');
	if (mode == 'selectTheme')
		story.switchTheme(theme);
	else // selectPalette
		config.macros.selectTheme.updatePalette(theme);
	return false;
};

config.macros.selectTheme.updatePalette = function(title)
{
	if (title != "") {
		store.deleteTiddler("ColorPalette");
		if (title != "(default)")
			store.saveTiddler("ColorPalette","ColorPalette",store.getTiddlerText(title),
					config.options.txtUserName,undefined,"");
		refreshAll();
		if(config.options.chkAutoSave)
			saveChanges(true);
	}
};

config.macros.applyTheme = {
	label: "apply",
	prompt: "apply this theme or palette" // i'm lazy
};

config.macros.applyTheme.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	var useTiddler = params[0] ? params[0] : tiddler.title;
	var btn = createTiddlyButton(place,this.label,this.prompt,config.macros.selectTheme.onClickTheme);
	btn.setAttribute('theme',useTiddler);
	btn.setAttribute('mode',macroName=="applyTheme"?"selectTheme":"selectPalette"); // a bit untidy here
}

config.macros.selectPalette = config.macros.selectTheme;
config.macros.applyPalette = config.macros.applyTheme;

config.macros.refreshAll = { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
	createTiddlyButton(place,"refresh","refresh layout and styles",function() { refreshAll(); });
}};

//}}}

<<list shadowed>>
[[In-Collaboration Ltd|http://www.in-collaboration.co.uk]]
[[Wiki for Chris Ashley|Chris Ashley]]
/***
|''Name:''|SparklinePlugin|
|''Description:''|Sparklines macro|
***/
//{{{
if(!version.extensions.SparklinePlugin) {
version.extensions.SparklinePlugin = {installed:true};

//--
//-- Sparklines
//--

config.macros.sparkline = {};
config.macros.sparkline.handler = function(place,macroName,params)
{
	var data = [];
	var min = 0;
	var max = 0;
	var v;
	for(var t=0; t<params.length; t++) {
		v = parseInt(params[t]);
		if(v < min)
			min = v;
		if(v > max)
			max = v;
		data.push(v);
	}
	if(data.length < 1)
		return;
	var box = createTiddlyElement(place,"span",null,"sparkline",String.fromCharCode(160));
	box.title = data.join(",");
	var w = box.offsetWidth;
	var h = box.offsetHeight;
	box.style.paddingRight = (data.length * 2 - w) + "px";
	box.style.position = "relative";
	for(var d=0; d<data.length; d++) {
		var tick = document.createElement("img");
		tick.border = 0;
		tick.className = "sparktick";
		tick.style.position = "absolute";
		tick.src = "data:image/gif,GIF89a%01%00%01%00%91%FF%00%FF%FF%FF%00%00%00%C0%C0%C0%00%00%00!%F9%04%01%00%00%02%00%2C%00%00%00%00%01%00%01%00%40%02%02T%01%00%3B";
		tick.style.left = d*2 + "px";
		tick.style.width = "2px";
		v = Math.floor(((data[d] - min)/(max-min)) * h);
		tick.style.top = (h-v) + "px";
		tick.style.height = v + "px";
		box.appendChild(tick);
	}
};


}
//}}}
/***

''Inspired by [[TiddlyPom|http://www.warwick.ac.uk/~tuspam/tiddlypom.html]]''

|Name|SplashScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#SplashScreenPlugin|
|Version|0.21 |
|Requires|~TW2.08+|
!Description:
Provides a simple splash screen that is visible while the TW is loading.

!Installation
Copy the source text of this tiddler to your TW in a new tiddler, tag it with systemConfig and save and reload. The SplashScreen will now be installed and will be visible the next time you reload your TW.

!Customizing
Once the SplashScreen has been installed and you have reloaded your TW, the splash screen html will be present in the MarkupPreHead tiddler. You can edit it and customize to your needs.

!History
* 20-07-06 : version 0.21, modified to hide contentWrapper while SplashScreen is displayed.
* 26-06-06 : version 0.2, first release

!Code
***/
//{{{
var old_lewcid_splash_restart=restart;

restart = function()
{   if (document.getElementById("SplashScreen"))
        document.getElementById("SplashScreen").style.display = "none";
      if (document.getElementById("contentWrapper"))
        document.getElementById("contentWrapper").style.display = "block";
    
    old_lewcid_splash_restart();
   
    if (splashScreenInstall)
       {if(config.options.chkAutoSave)
			{saveChanges();}
        displayMessage("TW SplashScreen has been installed, please save and refresh your TW.");
        }
}


var oldText = store.getTiddlerText("MarkupPreHead");
if (oldText.indexOf("SplashScreen")==-1)
   {var siteTitle = store.getTiddlerText("SiteTitle");
   var splasher='\n\n<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>'+siteTitle +'</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>';
   if (! store.tiddlerExists("MarkupPreHead"))
       {var myTiddler = store.createTiddler("MarkupPreHead");}
   else
      {var myTiddler = store.getTiddler("MarkupPreHead");}
      myTiddler.set(myTiddler.title,oldText+splasher,config.options.txtUserName,null,null);
      store.setDirty(true);
      var splashScreenInstall = true;
}
//}}}
Batch processing framework - uses [[Quartz]] schedualing 
SpringBean
e-mail [[Velocity]]
JMS ActiveMQ
/*{{{*/
.downloadLink {
	font-size:110%;
	padding-left:2em;
}
.downloadLink a {
	border:2px solid #ddd;
	padding:0.5em;
}
/*}}}*/
!!Tier Extension
Tier Extensions ([[TE]]) contain the instrumentation points needed to capture data for CoreFirst, which is forwarded through a [[CoreFirst Agent]] to the [[CoreFirst Server]].

In the case of [[JAVA]] tiers, extension externally modify class files. For C++ tiers, the instrumentation must be embedded into the tier's code.

Out of the box tier extensions are available for Oracle, Web Logic Server [[WSL]], DataSynapse [[DSTE]], and many more.
!Thread Local Storage
<<allTags excludeLists>>
<<tabs txtMoreTab "Tags" "All Tags" TabAllTags "Miss" "Missing tiddlers" TabMoreMissing "Orph" "Orphaned tiddlers" TabMoreOrphans "Shad" "Shadowed tiddlers" TabMoreShadowed>>
<<allTags excludeLists [a-z]>>
Note, this stuff is a bit old and in need of redrafting in some places. Apologies.

!Chapter 1
Early versions of TiddlyWiki didn't have tagging. A couple of smart TiddlyWiki hackers realised that being able to tag your data in TiddlyWiki would be really good and (as is often the case with TiddlyWiki) they were inspired to have a go at adding it themselves. The result was two TiddlyWiki adaptations that implemented tagging, one called TagglyWiki created by Jody Foo, and one called TiddlyTagWiki by Johnny ~LeRoy. 

TiddlyTagWiki used a 'tags as separate things' philosophy, space separated tags and popup menus when you click on a tag. TagglyWiki (and there was also a GTDTagglyWiki) had a 'tiddler is a tag is a tiddler' philosophy, had comma separated tags and introduced the concept of tiddlers displaying a list of their tagged tiddlers.

When Jeremy added tagging to the official TiddlyWiki version he considered both approaches and decided on the TiddlyTagWiki implementation. Jody Foo stopped maintaining TagglyWiki at around that time so TagglyWiki fans like me were forced to stick with their aging [[TagglyWiki]]s, missing out on numerous upgrades and cool new features as each revision of TiddlyWiki came out, until eventually they couldn't take it any more and started wondering what they could do to get hold of an up-to-date TiddlyWiki with TagglyWiki style tagging. (Okay, maybe that last part was just me!)

So when TiddlyWiki began to support enhancements via systemConfig plugins I decided to try to write a version of TagglyWiki style tagging as a plugin. It turned out to be easier than I thought. I managed to get it working and created MonkeyPirateTiddlyWiki (see [[Ancient Stuff]]) to share it (and my other plugins). Since then there have been a few enhancements like dynamic updating of tagged lists and the new sort controls.

TiddlyTagWiki has continued to be maintained by Johnny and now contains some interesting new plugins.

!Chapter 2
In TiddlyWiki version 2.0 Jeremy incorporated the "tiddler is a tag is a tiddler" concept into TiddlyWiki and introduced the "tagging" list, the other central component of TagglyTagging. Some of the main reasons for TagglyTagging's existence had vanished! But instead of disappearing TagglyTagging became the set of tools it is now, an enhanced tagging list with sort controls, some layout changes and a few other simple tools (NewHerePlugin, QuickOpenTagPlugin and RenameTagsPlugin) that facilitate using tags in the powerful TagglyTagging way.

!Chapter 3
After the TiddlyWiki 2.1 release TagglyTaggingPlugin was completely rewritten. Some new features were added like site map mode and better support for columns. Also support for the new refresh mechanism was added which greatly improved the efficiency of dynamically updating the tagging lists.
You can do this right here and now. Maybe you should print this out so it's easy to follow while working on screen. I presume you have some familiarity with TiddlyWiki basics. If you are having trouble following this then try this [[excellent tutorial|http://www.blogjones.com/TiddlyWikiTutorial.html]] first.

!Getting started: Create some content
* First hit "close others" to clear up your screen
* Click "new tiddler" from the main menu.
* Name the tiddler "~MyStuff" by typing into the title box.
* Add some contents to the contents box, for example "This is my stuff"
* Click the Done button to save the new tiddler. (We will return to this one later).
* Let's say you just returned from a meeting and want to enter a couple of notes about it
** Click "new tiddler"
** Enter tiddler title as "Meeting with Leo - 12 Oct"
** Add some meeting notes in the content box
** Don't click Done just yet...

!Tagging your content
* Before you save the "Meeting with Leo..." tiddler let's add some tags
** It's a meeting so let's give it a tag called "Meetings". Type Meetings in the tags box.
** The meeting was with Leo so let's give it a tag called Leo. Type Leo in the tags box.
** Let's say the meeting was about budget planning for example. Type Budget in the tags box.
** So your tags box should look like this: {{{Meetings Leo Budget}}}
*Now save the tiddler by clicking the Done button.

!Using the tags
*No big deal so far, right? Now we start to get into TagglyTagging territory.
*Notice the tags appear above the title. They are italicised to indicate they don't exist yet (just like any other tiddler that doesn't exist yet).
*Click on the Leo tag. You will open an empty tiddler called Leo.
**Give it some content like "Leo Runcible, ext 1234. Likes cats". Or whatever.
**Leo's a person so give him a tag of "People" by typing People in the tags box.
**Save it by clicking Done.

!Lets pick up the pace
*Go back to your "Meeting with Leo..." tiddler.
** Click on Meetings. Give Meetings a tag of ~MyStuff and save it.
** Click on People. Give People a tag of ~MyStuff and save it.
** Click on Budget. Give Budget a tag of Projects. Type something about the Budget project in the tiddler contents if you want. Save it.
** Now above the Budget title click on the Projects tag. Give Projects a tag of ~MyStuff. Save that.
* Now find your ~MyStuff tiddler. Look at the tagged tiddler list which appears at the bottom of the tiddler. It should be a list containing Meetings, People and Projects.
* Close a few tiddlers and try navigating to your meeting tiddler from ~MyStuff using the tagged tiddler lists.

That's a quick look at the basics of TagglyTagging. Hopefully by now you have some idea about what TagglyTagging can do. Play around with it a little more if you like. Then continue to...

!The New Here Button
* Click on People.
* Do you know any other people?
* If so click, "new here" in the People tiddler
** Notice that the tags box already contains the tag People. (This is what the new here button does. It creates a new tiddler with the tag already filled in).
** Type someone's name and some notes on that person. Click Done to Save.
* Add a couple more people for fun
** Notice what happens to the "tagged tiddler" list at the bottom of the People tiddler.

!Changing the structure of your data
Let's look at how easy it is to change your structure. Suppose you decide that you want to have different types of Projects: Ongoing, Current and Future
* Go to your Budget tiddler. Edit it and change the Projects tag to OngoingProjects. Save.
* Click the OngoingProjects tag. Give that a tag of "Projects".
* That's it. You're done. Well actually you haven't added the Ongoing and Future Projects but you can see that's not hard. Maybe click "new here" at the Projects tiddler. Or maybe just tag a project as Future Projects and do it from the bottom up.

!Another example
* Suppose your original meeting had an action item for you. Type it into the meeting notes as a wiki word or {{{[[}}}Do Something{{{]]}}}.
* Now click on it and give it a tag of Todo. Type any extra information about how you're going to do it when it's due by etc into the contents. Put a reminder in there if you have ReminderPlugin installed.
* Now make sure you can get to your Todos by tagging Todo tiddler as MyStuff.
* For convenience let's put a link to MyStuff in your MainMenu. This will put all your new organised information at your fingertips at all times.

!Sort Controls and Columns
* If you mouse over a tagged tiddler list you should see some buttons. Try them out. Note that if you save it remembers your choice.

!Wrapup
Hopefully you can see that TagglyTagging gives you a powerful way to organise and structure your information. Don't forget that you can still use conventional wiki links to navigate around your tiddlers. TagglyTagging just gives you another way to do cool stuff with your TiddlyWiki.


~~This tutorial is a draft. Feedback is welcome. Please [[contact|Contact]] me with comments and suggestions.~~
See [[TagglyTagging FAQ]].
/***
|Name:|TagglyTaggingPlugin|
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
|Version:|3.1 ($Rev: 4092 $)|
|Date:|$Date: 2008-03-24 12:32:33 +1000 (Mon, 24 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
config.taggly = {

	// for translations
	lingo: {
		labels: {
			asc:        "\u2191", // down arrow
			desc:       "\u2193", // up arrow
			title:      "title",
			modified:   "modified",
			created:    "created",
			show:       "+",
			hide:       "-",
			normal:     "normal",
			group:      "group",
			commas:     "commas",
			sitemap:    "sitemap",
			numCols:    "cols\u00b1", // plus minus sign
			label:      "Tagged as '%0':",
			excerpts:   "excerpts",
			descr:      "descr",
			slices:     "slices",
			contents:   "contents",
			sliders:    "sliders",
			noexcerpts: "title only"
		},

		tooltips: {
			title:    "Click to sort by title",
			modified: "Click to sort by modified date",
			created:  "Click to sort by created date",
			show:     "Click to show tagging list",
			hide:     "Click to hide tagging list",
			normal:   "Click to show a normal ungrouped list",
			group:    "Click to show list grouped by tag",
			sitemap:  "Click to show a sitemap style list",
			commas:   "Click to show a comma separated list",
			numCols:  "Click to change number of columns",
			excerpts: "Click to show excerpts",
			descr:    "Click to show the description slice",
			slices:    "Click to show all slices",
			contents: "Click to show entire tiddler contents",
			sliders:  "Click to show tiddler contents in sliders",
			noexcerpts: "Click to show entire title only"
		}
	},

	config: {
		showTaggingCounts: true,
		listOpts: {
			// the first one will be the default
			sortBy:     ["title","modified","created"],
			sortOrder:  ["asc","desc"],
			hideState:  ["show","hide"],
			listMode:   ["normal","group","sitemap","commas"],
			numCols:    ["1","2","3","4","5","6"],
			excerpts:   ["noexcerpts","excerpts","descr","slices","contents","sliders"]
		},
		valuePrefix: "taggly.",
		excludeTags: ["excludeLists","excludeTagging"],
		excerptSize: 50,
		excerptMarker: "/%"+"%/"
	},

	getTagglyOpt: function(title,opt) {
		var val = store.getValue(title,this.config.valuePrefix+opt);
		return val ? val : this.config.listOpts[opt][0];
	},

	setTagglyOpt: function(title,opt,value) {
		if (!store.tiddlerExists(title))
			// create it silently
			store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),"");
		// if value is default then remove it to save space
		return store.setValue(title,
			this.config.valuePrefix+opt,
			value == this.config.listOpts[opt][0] ? null : value);
	},

	getNextValue: function(title,opt) {
		var current = this.getTagglyOpt(title,opt);
		var pos = this.config.listOpts[opt].indexOf(current);
		// a little usability enhancement. actually it doesn't work right for grouped or sitemap
		var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);
		var newPos = (pos + 1) % limit;
		return this.config.listOpts[opt][newPos];
	},

	toggleTagglyOpt: function(title,opt) {
		var newVal = this.getNextValue(title,opt);
		this.setTagglyOpt(title,opt,newVal);
	}, 

	createListControl: function(place,title,type) {
		var lingo = config.taggly.lingo;
		var label;
		var tooltip;
		var onclick;

		if ((type == "title" || type == "modified" || type == "created")) {
			// "special" controls. a little tricky. derived from sortOrder and sortBy
			label = lingo.labels[type];
			tooltip = lingo.tooltips[type];

			if (this.getTagglyOpt(title,"sortBy") == type) {
				label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
				onclick = function() {
					config.taggly.toggleTagglyOpt(title,"sortOrder");
					return false;
				}
			}
			else {
				onclick = function() {
					config.taggly.setTagglyOpt(title,"sortBy",type);
					config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
					return false;
				}
			}
		}
		else {
			// "regular" controls, nice and simple
			label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
			tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
			onclick = function() {
				config.taggly.toggleTagglyOpt(title,type);
				return false;
			}
		}

		// hide button because commas don't have columns
		if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
			createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
	},

	makeColumns: function(orig,numCols) {
		var listSize = orig.length;
		var colSize = listSize/numCols;
		var remainder = listSize % numCols;

		var upperColsize = colSize;
		var lowerColsize = colSize;

		if (colSize != Math.floor(colSize)) {
			// it's not an exact fit so..
			upperColsize = Math.floor(colSize) + 1;
			lowerColsize = Math.floor(colSize);
		}

		var output = [];
		var c = 0;
		for (var j=0;j<numCols;j++) {
			var singleCol = [];
			var thisSize = j < remainder ? upperColsize : lowerColsize;
			for (var i=0;i<thisSize;i++) 
				singleCol.push(orig[c++]);
			output.push(singleCol);
		}

		return output;
	},

	drawTable: function(place,columns,theClass) {
		var newTable = createTiddlyElement(place,"table",null,theClass);
		var newTbody = createTiddlyElement(newTable,"tbody");
		var newTr = createTiddlyElement(newTbody,"tr");
		for (var j=0;j<columns.length;j++) {
			var colOutput = "";
			for (var i=0;i<columns[j].length;i++) 
				colOutput += columns[j][i];
			var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
			wikify(colOutput,newTd);
		}
		return newTable;
	},

	createTagglyList: function(place,title) {
		switch(this.getTagglyOpt(title,"listMode")) {
			case "group":  return this.createTagglyListGrouped(place,title); break;
			case "normal": return this.createTagglyListNormal(place,title,false); break;
			case "commas": return this.createTagglyListNormal(place,title,true); break;
			case "sitemap":return this.createTagglyListSiteMap(place,title); break;
		}
	},

	getTaggingCount: function(title) {
		// thanks to Doug Edmunds
		if (this.config.showTaggingCounts) {
			var tagCount = store.getTaggedTiddlers(title).length;
			if (tagCount > 0)
				return " ("+tagCount+")";
		}
		return "";
	},

	getExcerpt: function(inTiddlerTitle,title,indent) {
		if (!indent)
			indent = 1;

		var displayMode = this.getTagglyOpt(inTiddlerTitle,"excerpts");
		var t = store.getTiddler(title);

		if (t && displayMode == "excerpts") {
			var text = t.text.replace(/\n/," ");
			var marker = text.indexOf(this.config.excerptMarker);
			if (marker != -1) {
				return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
			}
			else if (text.length < this.config.excerptSize) {
				return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
			}
			else {
				return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
			}
		}
		else if (t && displayMode == "contents") {
			return "\n{{contents indent"+indent+"{\n" + t.text + "\n}}}";
		}
		else if (t && displayMode == "sliders") {
			return "<slider slide>\n{{contents{\n" + t.text + "\n}}}\n</slider>";
		}
		else if (t && displayMode == "descr") {
			var descr = store.getTiddlerSlice(title,'Description');
			return descr ? " {{excerpt{" + descr  + "}}}" : "";
		}
		else if (t && displayMode == "slices") {
			var result = "";
			var slices = store.calcAllSlices(title);
			for (var s in slices)
				result += "|%0|<nowiki>%1</nowiki>|\n".format([s,slices[s]]);
			return result ? "\n{{excerpt excerptIndent{\n" + result  + "}}}" : "";
		}
		return "";
	},

	notHidden: function(t,inTiddler) {
		if (typeof t == "string") 
			t = store.getTiddler(t);
		return (!t || !t.tags.containsAny(this.config.excludeTags) ||
				(inTiddler && this.config.excludeTags.contains(inTiddler)));
	},

	// this is for normal and commas mode
	createTagglyListNormal: function(place,title,useCommas) {

		var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));

		if (this.getTagglyOpt(title,"sortOrder") == "desc")
			list = list.reverse();

		var output = [];
		var first = true;
		for (var i=0;i<list.length;i++) {
			if (this.notHidden(list[i],title)) {
				var countString = this.getTaggingCount(list[i].title);
				var excerpt = this.getExcerpt(title,list[i].title);
				if (useCommas)
					output.push((first ? "" : ", ") + "[[" + list[i].title + "]]" + countString + excerpt);
				else
					output.push("*[[" + list[i].title + "]]" + countString + excerpt + "\n");

				first = false;
			}
		}

		return this.drawTable(place,
			this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
			useCommas ? "commas" : "normal");
	},

	// this is for the "grouped" mode
	createTagglyListGrouped: function(place,title) {
		var sortBy = this.getTagglyOpt(title,"sortBy");
		var sortOrder = this.getTagglyOpt(title,"sortOrder");

		var list = store.getTaggedTiddlers(title,sortBy);

		if (sortOrder == "desc")
			list = list.reverse();

		var leftOvers = []
		for (var i=0;i<list.length;i++)
			leftOvers.push(list[i].title);

		var allTagsHolder = {};
		for (var i=0;i<list.length;i++) {
			for (var j=0;j<list[i].tags.length;j++) {

				if (list[i].tags[j] != title) { // not this tiddler

					if (this.notHidden(list[i].tags[j],title)) {

						if (!allTagsHolder[list[i].tags[j]])
							allTagsHolder[list[i].tags[j]] = "";

						if (this.notHidden(list[i],title)) {
							allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
										+ this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";

							leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers

						}
					}
				}
			}
		}

		var allTags = [];
		for (var t in allTagsHolder)
			allTags.push(t);

		var sortHelper = function(a,b) {
			if (a == b) return 0;
			if (a < b) return -1;
			return 1;
		};

		allTags.sort(function(a,b) {
			var tidA = store.getTiddler(a);
			var tidB = store.getTiddler(b);
			if (sortBy == "title") return sortHelper(a,b);
			else if (!tidA && !tidB) return 0;
			else if (!tidA) return -1;
			else if (!tidB) return +1;
			else return sortHelper(tidA[sortBy],tidB[sortBy]);
		});

		var leftOverOutput = "";
		for (var i=0;i<leftOvers.length;i++)
			if (this.notHidden(leftOvers[i],title))
				leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + this.getExcerpt(title,leftOvers[i]) + "\n";

		var output = [];

		if (sortOrder == "desc")
			allTags.reverse();
		else if (leftOverOutput != "")
			// leftovers first...
			output.push(leftOverOutput);

		for (var i=0;i<allTags.length;i++)
			if (allTagsHolder[allTags[i]] != "")
				output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(allTags[i]) + this.getExcerpt(title,allTags[i]) + "\n" + allTagsHolder[allTags[i]]);

		if (sortOrder == "desc" && leftOverOutput != "")
			// leftovers last...
			output.push(leftOverOutput);

		return this.drawTable(place,
				this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
				"grouped");

	},

	// used to build site map
	treeTraverse: function(title,depth,sortBy,sortOrder) {

		var list = store.getTaggedTiddlers(title,sortBy);
		if (sortOrder == "desc")
			list.reverse();

		var indent = "";
		for (var j=0;j<depth;j++)
			indent += "*"

		var childOutput = "";
		for (var i=0;i<list.length;i++)
			if (list[i].title != title)
				if (this.notHidden(list[i].title,this.config.inTiddler))
					childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);

		if (depth == 0)
			return childOutput;
		else
			return indent + "[["+title+"]]" + this.getTaggingCount(title) + this.getExcerpt(this.config.inTiddler,title,depth) + "\n" + childOutput;
	},

	// this if for the site map mode
	createTagglyListSiteMap: function(place,title) {
		this.config.inTiddler = title; // nasty. should pass it in to traverse probably
		var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));
		return this.drawTable(place,
				this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
				"sitemap"
				);
	},

	macros: {
		tagglyTagging: {
			handler: function (place,macroName,params,wikifier,paramString,tiddler) {
				var refreshContainer = createTiddlyElement(place,"div");
				// do some refresh magic to make it keep the list fresh - thanks Saq
				refreshContainer.setAttribute("refresh","macro");
				refreshContainer.setAttribute("macroName",macroName);
				if (params[0])
					refreshContainer.setAttribute("title",params[0]);
				else {
        			refreshContainer.setAttribute("title",tiddler.title);
				}
				this.refresh(refreshContainer);
			},

			refresh: function(place) {
				var title = place.getAttribute("title");
				removeChildren(place);
				addClass(place,"tagglyTagging");
				if (store.getTaggedTiddlers(title).length > 0) {
					var lingo = config.taggly.lingo;
					config.taggly.createListControl(place,title,"hideState");
					if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
						createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));
						config.taggly.createListControl(place,title,"title");
						config.taggly.createListControl(place,title,"modified");
						config.taggly.createListControl(place,title,"created");
						config.taggly.createListControl(place,title,"listMode");
						config.taggly.createListControl(place,title,"excerpts");
						config.taggly.createListControl(place,title,"numCols");
						config.taggly.createTagglyList(place,title);
					}
				}
			}
		}
	},

	// todo fix these up a bit
	styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
"	margin-top:0px; padding-top:0.5em; padding-left:2em;",
"	margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
"	color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
"	border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active  {",
"	border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryDark]]; }",
".excerptIndent { margin-left:4em; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
".tagglyTagging .contents { border-bottom:2px solid [[ColorPalette::TertiaryPale]]; padding:0 1em 1em 0.5em;",
"  margin-bottom:0.5em; }",
".tagglyTagging .indent1  { margin-left:3em;  }",
".tagglyTagging .indent2  { margin-left:4em;  }",
".tagglyTagging .indent3  { margin-left:5em;  }",
".tagglyTagging .indent4  { margin-left:6em;  }",
".tagglyTagging .indent5  { margin-left:7em;  }",
".tagglyTagging .indent6  { margin-left:8em;  }",
".tagglyTagging .indent7  { margin-left:9em;  }",
".tagglyTagging .indent8  { margin-left:10em; }",
".tagglyTagging .indent9  { margin-left:11em; }",
".tagglyTagging .indent10 { margin-left:12em; }",
"/*}}}*/",
		""].join("\n"),

	init: function() {
		merge(config.macros,this.macros);
		config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
		store.addNotification("TagglyTaggingStyles",refreshStyles);
	}
};

config.taggly.init();

//}}}

/***
InlineSlidersPlugin
By Saq Imtiaz
http://tw.lewcid.org/sandbox/#InlineSlidersPlugin

// syntax adjusted to not clash with NestedSlidersPlugin
// added + syntax to start open instead of closed

***/
//{{{
config.formatters.unshift( {
	name: "inlinesliders",
	// match: "\\+\\+\\+\\+|\\<slider",
	match: "\\<slider",
	// lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
	lookaheadRegExp: /(?:<slider)(\+?) (.*?)(?:>)\n((?:.|\n)*?)\n(?:<\/slider>)/mg,
	handler: function(w) {
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart ) {
			var btn = createTiddlyButton(w.output,lookaheadMatch[2] + " "+"\u00BB",lookaheadMatch[2],this.onClickSlider,"button sliderButton");
			var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
			panel.style.display = (lookaheadMatch[1] == '+' ? "block" : "none");
			wikify(lookaheadMatch[3],panel);
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
   },
   onClickSlider : function(e) {
		if(!e) var e = window.event;
		var n = this.nextSibling;
		n.style.display = (n.style.display=="none") ? "block" : "none";
		return false;
	}
});

//}}}

See [[TagglyTagging Tutorial]].
Assigns Tasks to back office clerks, so that they can resolve issues arising from the processing of Trades.

There is one owner of a task, which may also be sent to multiple people, any of which may resolve it.

Monitors the proper execution of automated tasks, and act upon certain manual tasks.

Events are dynamically generated based upon the workflow configuration. For each "[[Calypso status]]" in a [[Calypso workflow]], an event is generated when the trade / transfer / message reaches this [[Calypso status]].

E.g When a trade moves to status VERIFIED it generates the event VERIFIED_TRADE event.
@@border:solid 1px black;display:block;padding:1em 2em 2em;background:#ffe;margin:1em;
Copyright (c) 2007-2008, Simon Baird
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name Simon Baird nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@
TiddlyWiki is a personal [[wiki|Wiki]] that runs in your web browswer. It is created and maintained by JeremyRuston. Try these links for more information:
*http://www.tiddlywiki.com/
*http://www.tiddlywiki.org/
*http://en.wikipedia.org/wiki/Tiddlywiki]]
A software edifices. Classic 3 tier architecture:

|User Interface|
|Functional Processing|
|Data-store|

CoreFirst views a tier as monitored software entity that processes [[transactions|CoreFirst Transaction]].
{{{
<FORM METHOD=POST ACTION="detail.htm">
 <INPUT id="currentClaimedBy" TYPE=CHECKBOX NAME="CLAMIED_BY" onChange="filterBy('vouchersTable',this.checked);"> Claimed_By,<br/>
 <INPUT TYPE=SUBMIT VALUE="Do it !">
</FORM>

<%
  boolean showCurrentClaimedBy = request.getParameter("CLAMIED_BY") != null;
%>
<h2>CLAIMED_BY=<%= request.getParameter("CLAMIED_BY") %></h2>
<h2>CLAIMED_BY=${param.CLAMIED_BY}</h2>
}}}
jsp
{{{

<script>
function addElement(_string) {
  var ni = document.getElementById('myDiv');
  var numi = document.getElementById('theValue');
  var num = (document.getElementById('theValue').value -1)+ 2;
  numi.value = num;
  var newdiv = document.createElement('div');
  var divIdName = 'my'+num+'Div';
  newdiv.setAttribute('id',divIdName);
  newdiv.innerHTML = _string;
  ni.appendChild(newdiv);
}
</script>
 
<input type="hidden" value="0" id="theValue" />
<div id="myDiv"> </div>
<script>

}}}
!re-ask for IP from DHCP
rcnetwork reset
!host name from IP address
host -a 127.0.0.1
!slow network & do_ypcall: clnt_call: RPC: Timed out 
/etc/init.d/ypbind stop - worked for me
{{{
# Add the new group to NetInfo
#
# add group and essential properties
dscl . create /groups/$group
dscl . create /groups/$group name $group
dscl . create /groups/$group passwd "*"
dscl . create /groups/$group gid $gid
#dscl . create /groups/$group users "" breaks add-user2group if added as a blank value
}}}
/usr/ucb/ps auxww
!dismount cdrom|unmount 
/media/cdrom
ftp_a_file.sh
{{{
#!/bin/sh
HOST=ftp.europaedi.co.uk
FULLNAME=`echo $1 | sed -e s/.to_send//`
NAME=`basename $FULLNAME`
echo `pwd`
echo about to send $1 as $NAME to $HOST
ftp -n << END_SCRIPT
open $HOST
user ftpnakedwine password
cd input
put $1 $NAME
get $NAME retrieval.$$
bye
END_SCRIPT

if [ -f retrieval.$$ ]
then
	echo "FTP of $1 to $HOST worked"
	mv $1 $FULLNAME.sent
	rm -f retrieval.$$
else
	echo "FTP of $1 did not work"
fi
}}}

Combine {{{ftp_a_file.sh}}} with {{{find}}} and run with [[crontab]] to periodically send all files marked {{{*.to_sned}}}

run_ftp.sh
{{{
find ~ -name *.to_send -print -exec ftp_a_file.sh {} \;
}}}
{{{

function isExpired(dd_mm_yyyyString,now)
{
    var show = false;
    
	if (dd_mm_yyyyString)
	{   // Extract Date
	    // 0123456789
		// dd/mm/yyyy 
		if (dd_mm_yyyyString.charAt(0) == '0')
			var day = parseInt(dd_mm_yyyyString.substring(1,2));
		else
			var day = parseInt(dd_mm_yyyyString.substring(0,2));

	    if (dd_mm_yyyyString.charAt(3) == '0')
	    	var month = parseInt(dd_mm_yyyyString.substring(4,5));
	    else
			var month = parseInt(dd_mm_yyyyString.substring(3,5));
		
		var year = parseInt(dd_mm_yyyyString.substring(6,10));
		
		month = month -1;
		var cellDate = new Date();
		cellDate.setDate(day);
		cellDate.setMonth(month);
		cellDate.setYear(year);
    	cellDate.setHours(0);
    	cellDate.setMinutes(0);
		cellDate.setSeconds(0);
		show = (cellDate < now);		
	}

	return show;
}
}}}
{{{
 find /var/opt/oracle/optier/agents -name ContextAgentConfig.xml -exec grep address {} \;
}}}
!which version

{{{
cat /etc/redhat-relase
cat /etc/release
uname -a
cat /proc/meminfo
}}}
/***
|Name:|ToggleTagPlugin|
|Description:|Makes a checkbox which toggles a tag in a tiddler|
|Version:|3.1.0 ($Rev: 4331 $)|
|Date:|$Date: 2008-04-12 13:42:50 +1000 (Sat, 12 Apr 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ToggleTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Usage
{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}
* TagName - the tag to be toggled, default value "checked"
* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler
* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'
(If a parameter is '.' then the default will be used)
* TouchMod flag - if non empty then touch the tiddlers mod date. Note, can set config.toggleTagAlwaysTouchModDate to always touch mod date
!!Examples
|Code|Description|Example|h
|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|
|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|
|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|
|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|
|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|
!!Notes
* If TiddlerName doesn't exist it will be silently created
* Set label to '-' to specify no label
* See also http://mgtd-alpha.tiddlyspot.com/#ToggleTag2
!!Known issues
* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing
* Should convert to use named params
***/
//{{{

if (config.toggleTagAlwaysTouchModDate == undefined) config.toggleTagAlwaysTouchModDate = false;

merge(config.macros,{

	toggleTag: {

		createIfRequired: true,
		shortLabel: "[[%0]]",
		longLabel: "[[%0]] [[%1]]",

		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			var tag   = (params[0] && params[0] != '.') ? params[0] : "checked";
			var title = (params[1] && params[1] != '.') ? params[1] : tiddler.title;
			var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);
			var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;
			var touchMod = (params[3] && params[3] != '.') ? params[3] : "";
			label = (label == '-' ? '' : label); // dash means no label
			var theTiddler = (title == tiddler.title ? tiddler : store.getTiddler(title));
			var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {
				if (!store.tiddlerExists(title)) {
					if (config.macros.toggleTag.createIfRequired) {
						var content = store.getTiddlerText(title); // just in case it's a shadow
						store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
					}
					else 
						return false;
				}
				if ((touchMod != "" || config.toggleTagAlwaysTouchModDate) && theTiddler)
						theTiddler.modified = new Date();
				store.setTiddlerTag(title,this.checked,tag);
				return true;
			});
		}
	}
});

//}}}

A transaction context is a unique identification for a transaction. The context is ideally serialized and sent [[in-band]] between tiers.
/***
Contains the stuff you need to use Tiddlyspot
Note you must also have UploadPlugin installed
***/
//{{{

// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'in-collaboration';

// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)

// disable autosave in d3
if (window.location.protocol != "file:")
	config.options.chkGTDLazyAutoSave = false;

// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
	SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
	SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
	OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
	DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[Welcome to Tiddlyspot]] ");
	MainMenu = MainMenu.replace(/^/,"[[Welcome to Tiddlyspot]] ");
}

// create some shadow tiddler content
merge(config.shadowTiddlers,{

'Welcome to Tiddlyspot':[
 "This document is a ~TiddlyWiki from tiddlyspot.com.  A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //What now?// &nbsp;&nbsp;@@ Before you can save any changes, you need to enter your password in the form below.  Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
 "<<tiddler TspotControls>>",
 "See also GettingStarted.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working online// &nbsp;&nbsp;@@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// &nbsp;&nbsp;@@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick.  You can make changes and save them locally without being connected to the Internet.  When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Help!// &nbsp;&nbsp;@@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]].  Also visit [[TiddlyWiki Guides|http://tiddlywikiguides.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help.  If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// &nbsp;&nbsp;@@ We hope you like using your tiddlyspot.com site.  Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),

'TspotControls':[
 "| tiddlyspot password:|<<option pasUploadPassword>>|",
 "| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . .  " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<<br>>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
 "| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[announcements|http://announce.tiddlyspot.com/]], [[blog|http://tiddlyspot.com/blog/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),

'TspotSidebar':[
 "<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . .  " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),

'TspotOptions':[
 "tiddlyspot password:",
 "<<option pasUploadPassword>>",
 ""
].join("\n")

});
//}}}
!Unit Of Work

The most granular object measured by CoreFirst, and collected in respect to a [[Transaction Context]], recording:
#total time spent (real time)
#CPU flops spent
#I/O

There may be many UOW related to a transaction, by way of synchronous and asynchronous calls to other tiers.
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 06/01/2009 09:26:22 | ChrisAshley | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . | ok |
| 07/01/2009 12:45:10 | ChrisAshley | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . |
| 10/02/2009 14:58:41 | YourName | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . | ok |
| 10/02/2009 15:33:16 | YourName | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . |
| 23/02/2009 10:34:21 | Chris Ashley | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . | ok |
| 23/02/2009 10:44:51 | Chris Ashley | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . | ok |
| 23/02/2009 15:21:41 | Chris Ashley | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . |
| 26/02/2009 09:17:14 | Chris Ashley | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . |
| 03/03/2009 11:00:49 | Chris Ashley | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . |
| 12/03/2009 15:08:31 | Chris Ashley | [[/|http://in-collaboration.tiddlyspot.com/]] | [[store.cgi|http://in-collaboration.tiddlyspot.com/store.cgi]] | . | [[index.html | http://in-collaboration.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
	major: 1, minor: 0, revision: 2, 
	date: new Date("Apr 19, 2007"),
	source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
	coreVersion: '2.2.0 (Beta 5)'
};

config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");

merge(config.macros.option.types, {
	'pas': {
		elementType: "input",
		valueField: "value",
		eventName: "onkeyup",
		className: "pasOptionInput",
		typeValue: config.macros.option.passwordInputType,
		create: function(place,type,opt,className,desc) {
			// password field
			config.macros.option.genericCreate(place,'pas',opt,className,desc);
			// checkbox linked with this password "save this password on this computer"
			config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);			
			// text savePasswordCheckboxLabel
			place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
		},
		onChange: config.macros.option.genericOnChange
	}
});

merge(config.optionHandlers['chk'], {
	get: function(name) {
		// is there an option linked with this chk ?
		var opt = name.substr(3);
		if (config.options[opt]) 
			saveOptionCookie(opt);
		return config.options[name] ? "true" : "false";
	}
});

merge(config.optionHandlers, {
	'pas': {
 		get: function(name) {
			if (config.options["chk"+name]) {
				return encodeCookie(config.options[name].toString());
			} else {
				return "";
			}
		},
		set: function(name,value) {config.options[name] = decodeCookie(value);}
	}
});

// need to reload options to load passwordOptions
loadOptionsCookie();

/*
if (!config.options['pasPassword'])
	config.options['pasPassword'] = '';

merge(config.optionsDesc,{
		pasPassword: "Test password"
	});
*/
//}}}

/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.0|
|''Date:''|May 5, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (#3125)|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
	major: 4, minor: 1, revision: 0,
	date: new Date("May 5, 2007"),
	source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	coreVersion: '2.2.0 (#3125)'
};

//
// Environment
//

if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false;	// true to activate both in Plugin and UploadService
	
//
// Upload Macro
//

config.macros.upload = {
// default values
	defaultBackupDir: '',	//no backup
	defaultStoreScript: "store.php",
	defaultToFilename: "index.html",
	defaultUploadDir: ".",
	authenticateUser: true	// UploadService Authenticate User
};
	
config.macros.upload.label = {
	promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
	promptParamMacro: "Save and Upload this TiddlyWiki in %0",
	saveLabel: "save to web", 
	saveToDisk: "save to disk",
	uploadLabel: "upload"	
};

config.macros.upload.messages = {
	noStoreUrl: "No store URL in parmeters or options",
	usernameOrPasswordMissing: "Username or password missing"
};

config.macros.upload.handler = function(place,macroName,params) {
	if (readOnly)
		return;
	var label;
	if (document.location.toString().substr(0,4) == "http") 
		label = this.label.saveLabel;
	else
		label = this.label.uploadLabel;
	var prompt;
	if (params[0]) {
		prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0], 
			(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
	} else {
		prompt = this.label.promptOption;
	}
	createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};

config.macros.upload.action = function(params)
{
		// for missing macro parameter set value from options
		var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
		var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
		var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
		var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
		var username = params[4] ? params[4] : config.options.txtUploadUserName;
		var password = config.options.pasUploadPassword; // for security reason no password as macro parameter	
		// for still missing parameter set default value
		if ((!storeUrl) && (document.location.toString().substr(0,4) == "http")) 
			storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
		if (storeUrl.substr(0,4) != "http")
			storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
		if (!toFilename)
			toFilename = bidix.basename(window.location.toString());
		if (!toFilename)
			toFilename = config.macros.upload.defaultToFilename;
		if (!uploadDir)
			uploadDir = config.macros.upload.defaultUploadDir;
		if (!backupDir)
			backupDir = config.macros.upload.defaultBackupDir;
		// report error if still missing
		if (!storeUrl) {
			alert(config.macros.upload.messages.noStoreUrl);
			clearMessage();
			return false;
		}
		if (config.macros.upload.authenticateUser && (!username || !password)) {
			alert(config.macros.upload.messages.usernameOrPasswordMissing);
			clearMessage();
			return false;
		}
		bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password); 
		return false; 
};

config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir) 
{
	if (!storeUrl)
		return null;
		var dest = bidix.dirname(storeUrl);
		if (uploadDir && uploadDir != '.')
			dest = dest + '/' + uploadDir;
		dest = dest + '/' + toFilename;
	return dest;
};

//
// uploadOptions Macro
//

config.macros.uploadOptions = {
	handler: function(place,macroName,params) {
		var wizard = new Wizard();
		wizard.createWizard(place,this.wizardTitle);
		wizard.addStep(this.step1Title,this.step1Html);
		var markList = wizard.getElement("markList");
		var listWrapper = document.createElement("div");
		markList.parentNode.insertBefore(listWrapper,markList);
		wizard.setValue("listWrapper",listWrapper);
		this.refreshOptions(listWrapper,false);
		var uploadCaption;
		if (document.location.toString().substr(0,4) == "http") 
			uploadCaption = config.macros.upload.label.saveLabel;
		else
			uploadCaption = config.macros.upload.label.uploadLabel;
		
		wizard.setButtons([
				{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption, 
					onClick: config.macros.upload.action},
				{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
				
			]);
	},
	refreshOptions: function(listWrapper) {
		var uploadOpts = [
			"txtUploadUserName",
			"pasUploadPassword",
			"txtUploadStoreUrl",
			"txtUploadDir",
			"txtUploadFilename",
			"txtUploadBackupDir",
			"chkUploadLog",
			"txtUploadLogMaxLine",
			]
		var opts = [];
		for(i=0; i<uploadOpts.length; i++) {
			var opt = {};
			opts.push()
			opt.option = "";
			n = uploadOpts[i];
			opt.name = n;
			opt.lowlight = !config.optionsDesc[n];
			opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
			opts.push(opt);
		}
		var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
		for(n=0; n<opts.length; n++) {
			var type = opts[n].name.substr(0,3);
			var h = config.macros.option.types[type];
			if (h && h.create) {
				h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
			}
		}
		
	},
	onCancel: function(e)
	{
		backstage.switchTab(null);
		return false;
	},
	
	wizardTitle: "Upload with options",
	step1Title: "These options are saved in cookies in your browser",
	step1Html: "<input type='hidden' name='markList'></input><br>",
	cancelButton: "Cancel",
	cancelButtonPrompt: "Cancel prompt",
	listViewTemplate: {
		columns: [
			{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
			{name: 'Option', field: 'option', title: "Option", type: 'String'},
			{name: 'Name', field: 'name', title: "Name", type: 'String'}
			],
		rowClasses: [
			{className: 'lowlight', field: 'lowlight'} 
			]}
}

//
// upload functions
//

if (!bidix.upload) bidix.upload = {};

if (!bidix.upload.messages) bidix.upload.messages = {
	//from saving
	invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
	backupSaved: "Backup saved",
	backupFailed: "Failed to upload backup file",
	rssSaved: "RSS feed uploaded",
	rssFailed: "Failed to upload RSS feed file",
	emptySaved: "Empty template uploaded",
	emptyFailed: "Failed to upload empty template file",
	mainSaved: "Main TiddlyWiki file uploaded",
	mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
	//specific upload
	loadOriginalHttpPostError: "Can't get original file",
	aboutToSaveOnHttpPost: 'About to upload on %0 ...',
	storePhpNotFound: "The store script '%0' was not found."
};

bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
	var callback = function(status,uploadParams,original,url,xhr) {
		if (!status) {
			displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
			return;
		}
		if (bidix.debugMode) 
			alert(original.substr(0,500)+"\n...");
		// Locate the storeArea div's 
		var posDiv = locateStoreArea(original);
		if((posDiv[0] == -1) || (posDiv[1] == -1)) {
			alert(config.messages.invalidFileError.format([localPath]));
			return;
		}
		bidix.upload.uploadRss(uploadParams,original,posDiv);
	};
	
	if(onlyIfDirty && !store.isDirty())
		return;
	clearMessage();
	// save on localdisk ?
	if (document.location.toString().substr(0,4) == "file") {
		var path = document.location.toString();
		var localPath = getLocalPath(path);
		saveChanges();
	}
	// get original
	var uploadParams = Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
	var originalPath = document.location.toString();
	// If url is a directory : add index.html
	if (originalPath.charAt(originalPath.length-1) == "/")
		originalPath = originalPath + "index.html";
	var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
	var log = new bidix.UploadLog();
	log.startUpload(storeUrl, dest, uploadDir,  backupDir);
	displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
	if (bidix.debugMode) 
		alert("about to execute Http - GET on "+originalPath);
	var r = doHttp("GET",originalPath,null,null,null,null,callback,uploadParams,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

bidix.upload.uploadRss = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		if(status) {
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
			bidix.upload.uploadMain(params[0],params[1],params[2]);
		} else {
			displayMessage(bidix.upload.messages.rssFailed);			
		}
	};
	// do uploadRss
	if(config.options.chkGenerateAnRssFeed) {
		var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
		var rssUploadParams = Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
		bidix.upload.httpUpload(rssUploadParams,convertUnicodeToUTF8(generateRss()),callback,Array(uploadParams,original,posDiv));
	} else {
		bidix.upload.uploadMain(uploadParams,original,posDiv);
	}
};

bidix.upload.uploadMain = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		var log = new bidix.UploadLog();
		if(status) {
			// if backupDir specified
			if ((params[3]) && (responseText.indexOf("backupfile:") > -1))  {
				var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
				displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
			}
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
			store.setDirty(false);
			log.endUpload("ok");
		} else {
			alert(bidix.upload.messages.mainFailed);
			displayMessage(bidix.upload.messages.mainFailed);
			log.endUpload("failed");			
		}
	};
	// do uploadMain
	var revised = bidix.upload.updateOriginal(original,posDiv);
	bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};

bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
	var localCallback = function(status,params,responseText,url,xhr) {
		url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
		if (xhr.status == httpStatus.NotFound)
			alert(bidix.upload.messages.storePhpNotFound.format([url]));
		if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
			alert(responseText);
			if (responseText.indexOf("Debug mode") >= 0 )
				responseText = responseText.substring(responseText.indexOf("\n\n")+2);
		} else if (responseText.charAt(0) != '0') 
			alert(responseText);
		if (responseText.charAt(0) != '0')
			status = null;
		callback(status,params,responseText,url,xhr);
	};
	// do httpUpload
	var boundary = "---------------------------"+"AaB03x";	
	var uploadFormName = "UploadPlugin";
	// compose headers data
	var sheader = "";
	sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
	sheader += uploadFormName +"\"\r\n\r\n";
	sheader += "backupDir="+uploadParams[3] +
				";user=" + uploadParams[4] +
				";password=" + uploadParams[5] +
				";uploaddir=" + uploadParams[2];
	if (bidix.debugMode)
		sheader += ";debug=1";
	sheader += ";;\r\n"; 
	sheader += "\r\n" + "--" + boundary + "\r\n";
	sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
	sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
	sheader += "Content-Length: " + data.length + "\r\n\r\n";
	// compose trailer data
	var strailer = new String();
	strailer = "\r\n--" + boundary + "--\r\n";
	data = sheader + data + strailer;
	if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
	var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
	if (!posDiv)
		posDiv = locateStoreArea(original);
	if((posDiv[0] == -1) || (posDiv[1] == -1)) {
		alert(config.messages.invalidFileError.format([localPath]));
		return;
	}
	var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
				store.allTiddlersAsHtml() + "\n" +
				original.substr(posDiv[1]);
	var newSiteTitle = getPageTitle().htmlEncode();
	revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
	revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
	revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
	revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
	revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
	return revised;
};

//
// UploadLog
// 
// config.options.chkUploadLog :
//		false : no logging
//		true : logging
// config.options.txtUploadLogMaxLine :
//		-1 : no limit
//      0 :  no Log lines but UploadLog is still in place
//		n :  the last n lines are only kept
//		NaN : no limit (-1)

bidix.UploadLog = function() {
	if (!config.options.chkUploadLog) 
		return; // this.tiddler = null
	this.tiddler = store.getTiddler("UploadLog");
	if (!this.tiddler) {
		this.tiddler = new Tiddler();
		this.tiddler.title = "UploadLog";
		this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
		this.tiddler.created = new Date();
		this.tiddler.modifier = config.options.txtUserName;
		this.tiddler.modified = new Date();
		store.addTiddler(this.tiddler);
	}
	return this;
};

bidix.UploadLog.prototype.addText = function(text) {
	if (!this.tiddler)
		return;
	// retrieve maxLine when we need it
	var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
	if (isNaN(maxLine))
		maxLine = -1;
	// add text
	if (maxLine != 0) 
		this.tiddler.text = this.tiddler.text + text;
	// Trunck to maxLine
	if (maxLine >= 0) {
		var textArray = this.tiddler.text.split('\n');
		if (textArray.length > maxLine + 1)
			textArray.splice(1,textArray.length-1-maxLine);
			this.tiddler.text = textArray.join('\n');		
	}
	// update tiddler fields
	this.tiddler.modifier = config.options.txtUserName;
	this.tiddler.modified = new Date();
	store.addTiddler(this.tiddler);
	// refresh and notifiy for immediate update
	story.refreshTiddler(this.tiddler.title);
	store.notify(this.tiddler.title, true);
};

bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir,  backupDir) {
	if (!this.tiddler)
		return;
	var now = new Date();
	var text = "\n| ";
	var filename = bidix.basename(document.location.toString());
	if (!filename) filename = '/';
	text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
	text += config.options.txtUserName + " | ";
	text += "[["+filename+"|"+location + "]] |";
	text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
	text += uploadDir + " | ";
	text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
	text += backupDir + " |";
	this.addText(text);
};

bidix.UploadLog.prototype.endUpload = function(status) {
	if (!this.tiddler)
		return;
	this.addText(" "+status+" |");
};

//
// Utilities
// 

bidix.checkPlugin = function(plugin, major, minor, revision) {
	var ext = version.extensions[plugin];
	if (!
		(ext  && 
			((ext.major > major) || 
			((ext.major == major) && (ext.minor > minor))  ||
			((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
			// write error in PluginManager
			if (pluginInfo)
				pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
			eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
	}
};

bidix.dirname = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(0, lastpos);
	} else {
		return filePath.substring(0, filePath.lastIndexOf("\\"));
	}
};

bidix.basename = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("#")) != -1) 
		filePath = filePath.substring(0, lastpos);
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(lastpos + 1);
	} else
		return filePath.substring(filePath.lastIndexOf("\\")+1);
};

bidix.initOption = function(name,value) {
	if (!config.options[name])
		config.options[name] = value;
};

//
// Initializations
//

// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);

// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");

//optionsDesc
merge(config.optionsDesc,{
	txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
	txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
	txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
	txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
	txtUploadUserName: "Upload Username",
	pasUploadPassword: "Upload Password",
	chkUploadLog: "do Logging in UploadLog (default: true)",
	txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});

// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');


/* don't want this for tiddlyspot sites

// Backstage
merge(config.tasks,{
	uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");

*/


//}}}
Virtual Private Network
Symantec's Veritas provides a centralised command and control of enterprise applications:
http://www.veritas.com

In Roman mythology, Veritas (meaning truth) was the goddess of truth.

Commands:

/opt/VRTSvcs/bin/hagrp -list
/opt/VRTSvcs/bin/hagrp -clear calypso

$ export DISPLAY=128.30.108.154:0.0
$ /opt/VRTSvcs/bin/hagui &
<!--{{{-->
<div>
	<span style='float:right;' class='subtitle'>
		Edited by <span macro='view modifier link'></span>, 
		<span macro='view modified date [[DD MMM YYYY]]'></span> 
		(created <span macro='view created date [[DD MMM YYYY]]'></span>)
	</span>

<div class='titleContainer'>
 <span class='title' macro='view title'></span>
 <span macro="miniTag"></span>
 <span class="tagglyTagged" macro="tags"></span></div>
<div>	

<div class='toolbar'>
 <span macro="showWhenTagged systemConfig">
 <span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></span>
 </span>
 <span style="padding:1em;"></span>
 <span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler permalink references jump'></span>
 <span macro='newHere label:"new here"'></span>
 <span macro='newJournalHere {{config.mptwJournalFormat?config.mptwJournalFormat:"MM/0DD/YY"}}'></span>
</div>
<hr>


<div macro="showWhenExists ViewPanelTemplate">[[ViewPanelTemplate]]</div>

<div macro="hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">
 <div class='viewer' macro='view text wikified'></div>
<HR>
</div>

<div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">
 <div class='viewer'><pre macro='view text'></pre></div>
</div>

<div macro="showWhenExists ViewDashboardTemplate">[[ViewDashboardTemplate]]</div>

<div class="tagglyTagging" macro="tagglyTagging"></div>

<!--}}}-->
<html><img src="http://simonbaird.com/images/mptwlogosml.gif" alt="logo" align="right"></html>Welcome to MPTW, the TiddlyWiki formerly known as MonkeyPirateTiddlyWiki. MPTW is a distribution or edition of TiddlyWiki that includes a standard TiddlyWiki core packaged with some [[plugins|systemConfig]] designed to improve usability and provide a better way to [[organise your information|TagglyTagging]].
* [[Why use MPTW?]]
* [[Using "TagglyTagging" to organise your data|TagglyTagging]]
* [[MPTW Plugins|systemConfig]]

MPTW has all the power and convenience of standard TiddlyWiki but it includes a new way of managing your data called TagglyTagging. TagglyTagging makes it easier to keep your information organised and structured. It does this using an enhanced version of the built in tagging macro and a few other complimentary tools like the 'new here' button. To learn more see the [[FAQ|TagglyTagging FAQ]] and the [[Tutorial|TagglyTagging Tutorial]].
If you've no idea what a wiki is then perhaps you're jumping in the deep end a little bit. But you can read [[this page in WikiPedia|http://en.wikipedia.org/wiki/Wiki]], the most famous wiki of all. Note that TiddlyWiki is different to other wikis in that:
* it doesn't require a server and a database to run
* it's focus is on personal use rather than multi-user collaboration
CA Wily Introscope monitors complex, SOA Web applications in production 24x7 and automatically detects and alerts you.

/***
|''Name:''|YourSearchPlugin|
|''Version:''|2.1.1 (2007-03-11)|
|''Source:''|http://tiddlywiki.abego-software.de/#YourSearchPlugin ([[del.icio.us|http://del.icio.us/post?url=http://tiddlywiki.abego-software.de/index.html%23YourSearchPlugin]])|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2006 [[abego Software|http://www.abego-software.de]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; ~InternetExplorer 6.0|
!About YourSearch
YourSearch gives you a bunch of new features to simplify and speed up your daily searches in TiddlyWiki. It seamlessly integrates into the standard TiddlyWiki search: just start typing into the 'search' field and explore!

For more information see [[Help|YourSearch Help]].
!Compatibility
This plugin requires TiddlyWiki 2.1. 
Check the [[archive|http://tiddlywiki.abego-software.de/archive]] for ~YourSearchPlugins supporting older versions of TiddlyWiki.
!Source Code
***/
/***
This plugin's source code is compressed (and hidden). Use this [[link|http://tiddlywiki.abego-software.de/archive/YourSearchPlugin/Plugin-YourSearch-src.2.1.1.js]] to get the readable source code.
***/
///%
if(!version.extensions.YourSearchPlugin){version.extensions.YourSearchPlugin={major:2,minor:1,revision:1,source:"http://tiddlywiki.abego-software.de/#YourSearchPlugin",licence:"[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",copyright:"Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)"};if(!window.abego){window.abego={};}if(!Array.forEach){Array.forEach=function(_1,_2,_3){for(var i=0,len=_1.length;i<len;i++){_2.call(_3,_1[i],i,_1);}};Array.prototype.forEach=function(_5,_6){for(var i=0,len=this.length;i<len;i++){_5.call(_6,this[i],i,this);}};}abego.toInt=function(s,_9){if(!s){return _9;}var n=parseInt(s);return (n==NaN)?_9:n;};abego.createEllipsis=function(_b){var e=createTiddlyElement(_b,"span");e.innerHTML="&hellip;";};abego.shallowCopy=function(_d){if(!_d){return _d;}var _e={};for(var n in _d){_e[n]=_d[n];}return _e;};abego.copyOptions=function(_10){return !_10?{}:abego.shallowCopy(_10);};abego.countStrings=function(_11,s){if(!s){return 0;}var len=s.length;var n=0;var _15=0;while(1){var i=_11.indexOf(s,_15);if(i<0){return n;}n++;_15=i+len;}return n;};abego.getBracedText=function(_17,_18,_19){if(!_18){_18=0;}var re=/\{([^\}]*)\}/gm;re.lastIndex=_18;var m=re.exec(_17);if(m){var s=m[1];var _1d=abego.countStrings(s,"{");if(!_1d){if(_19){_19.lastIndex=re.lastIndex;}return s;}var len=_17.length;for(var i=re.lastIndex;i<len&&_1d;i++){var c=_17.charAt(i);if(c=="{"){_1d++;}else{if(c=="}"){_1d--;}}}if(!_1d){if(_19){_19.lastIndex=i-1;}return _17.substring(m.index+1,i-1);}}};abego.select=function(_21,_22,_23,_24){if(!_24){_24=[];}_21.forEach(function(t){if(_22.call(_23,t)){_24.push(t);}});return _24;};abego.TiddlerFilterTerm=function(_26,_27){if(!_27){_27={};}var _28=_26;if(!_27.textIsRegExp){_28=_26.escapeRegExp();if(_27.fullWordMatch){_28="\\b"+_28+"\\b";}}var _29=new RegExp(_28,"m"+(_27.caseSensitive?"":"i"));this.tester=new abego.MultiFieldRegExpTester(_29,_27.fields,_27.withExtendedFields);};abego.TiddlerFilterTerm.prototype.test=function(_2a){return this.tester.test(_2a);};abego.parseNewTiddlerCommandLine=function(s){var m=/(.*?)\.(?:\s+|$)([^#]*)(#.*)?/.exec(s);if(!m){m=/([^#]*)()(#.*)?/.exec(s);}if(m){var r;if(m[3]){var s2=m[3].replace(/#/g,"");r=s2.parseParams("tag");}else{r=[[]];}var _2f=m[2]?m[2].trim():"";r.push({name:"text",value:_2f});r[0].text=[_2f];return {title:m[1].trim(),params:r};}else{return {title:s.trim(),params:[[]]};}};abego.parseTiddlerFilterTerm=function(_30,_31,_32){var re=/\s*(?:(?:\{([^\}]*)\})|(?:(=)|([#%!])|(?:(\w+)\s*\:(?!\/\/))|(?:(?:("(?:(?:\\")|[^"])+")|(?:\/((?:(?:\\\/)|[^\/])+)\/)|(\w+\:\/\/[^\s]+)|([^\s\)\-\"]+)))))/mg;var _34={"!":"title","%":"text","#":"tags"};var _35={};var _36;re.lastIndex=_31;while(1){var i=re.lastIndex;var m=re.exec(_30);if(!m||m.index!=i){throw "Word or String literal expected";}if(m[1]){var _39={};var _3a=abego.getBracedText(_30,0,_39);if(!_3a){throw "Invalid {...} syntax";}var f=Function("tiddler","return ("+_3a+");");return {func:f,lastIndex:_39.lastIndex,markRE:null};}if(m[2]){_36=true;}else{if(m[3]){_35[_34[m[3]]]=1;}else{if(m[4]){_35[m[4]]=1;}else{var _3c=m[6];var _3d=m[5]?window.eval(m[5]):m[6]?m[6]:m[7]?m[7]:m[8];var _3e=abego.copyOptions(_3e);_3e.fullWordMatch=_36;_3e.textIsRegExp=_3c;var _3f=[];for(var n in _35){_3f.push(n);}if(_3f.length==0){_3e.fields=_3e.defaultFields;}else{_3e.fields=_3f;_3e.withExtendedFields=false;}var _41=new abego.TiddlerFilterTerm(_3d,_3e);var _42=_3c?_3d:_3d.escapeRegExp();if(_42&&_36){_42="\\b"+_42+"\\b";}return {func:function(_43){return _41.test(_43);},lastIndex:re.lastIndex,markRE:_42?"(?:"+_42+")":null};}}}}};abego.BoolExp=function(s,_45,_46){this.s=s;var _47=_46&&_46.defaultOperationIs_OR;var _48=/\s*(?:(\-|not)|(\())/gi;var _49=/\s*\)/g;var _4a=/\s*(?:(and|\&\&)|(or|\|\|))/gi;var _4b=/\s*[^\)\s]/g;var _4c=/\s*(\-|not)?(\s*\()?/gi;var _4d;var _4e=function(_4f){_4c.lastIndex=_4f;var m=_4c.exec(s);var _51;var _52;if(m&&m.index==_4f){_4f=_4c.lastIndex;_51=m[1];if(m[2]){var e=_4d(_4f);_49.lastIndex=e.lastIndex;if(!_49.exec(s)){throw "Missing ')'";}_52={func:e.func,lastIndex:_49.lastIndex,markRE:e.markRE};}}if(!_52){_52=_45(s,_4f,_46);}if(_51){_52.func=(function(f){return function(_55){return !f(_55);};})(_52.func);_52.markRE=null;}return _52;};_4d=function(_56){var _57=_4e(_56);while(1){var l=_57.lastIndex;_4a.lastIndex=l;var m=_4a.exec(s);var _5a;var _5b;if(m&&m.index==l){_5a=!m[1];_5b=_4e(_4a.lastIndex);}else{try{_5b=_4e(l);}catch(e){return _57;}_5a=_47;}_57.func=(function(_5c,_5d,_5e){return _5e?function(_5f){return _5c(_5f)||_5d(_5f);}:function(_60){return _5c(_60)&&_5d(_60);};})(_57.func,_5b.func,_5a);_57.lastIndex=_5b.lastIndex;if(!_57.markRE){_57.markRE=_5b.markRE;}else{if(_5b.markRE){_57.markRE=_57.markRE+"|"+_5b.markRE;}}}};var _61=_4d(0);this.evalFunc=_61.func;if(_61.markRE){this.markRegExp=new RegExp(_61.markRE,_46.caseSensitive?"mg":"img");}};abego.BoolExp.prototype.exec=function(){return this.evalFunc.apply(this,arguments);};abego.BoolExp.prototype.getMarkRegExp=function(){return this.markRegExp;};abego.BoolExp.prototype.toString=function(){return this.s;};abego.MultiFieldRegExpTester=function(re,_63,_64){this.re=re;this.fields=_63?_63:["title","text","tags"];this.withExtendedFields=_64;};abego.MultiFieldRegExpTester.prototype.test=function(_65){var re=this.re;for(var i=0;i<this.fields.length;i++){var s=store.getValue(_65,this.fields[i]);if(typeof s=="string"&&re.test(s)){return this.fields[i];}}if(this.withExtendedFields){return store.forEachField(_65,function(_69,_6a,_6b){return typeof _6b=="string"&&re.test(_6b)?_6a:null;},true);}return null;};abego.TiddlerQuery=function(_6c,_6d,_6e,_6f,_70){if(_6e){this.regExp=new RegExp(_6c,_6d?"mg":"img");this.tester=new abego.MultiFieldRegExpTester(this.regExp,_6f,_70);}else{this.expr=new abego.BoolExp(_6c,abego.parseTiddlerFilterTerm,{defaultFields:_6f,caseSensitive:_6d,withExtendedFields:_70});}this.getQueryText=function(){return _6c;};this.getUseRegExp=function(){return _6e;};this.getCaseSensitive=function(){return _6d;};this.getDefaultFields=function(){return _6f;};this.getWithExtendedFields=function(){return _70;};};abego.TiddlerQuery.prototype.test=function(_71){if(!_71){return false;}if(this.regExp){return this.tester.test(_71);}return this.expr.exec(_71);};abego.TiddlerQuery.prototype.filter=function(_72){return abego.select(_72,this.test,this);};abego.TiddlerQuery.prototype.getMarkRegExp=function(){if(this.regExp){return "".search(this.regExp)>=0?null:this.regExp;}return this.expr.getMarkRegExp();};abego.TiddlerQuery.prototype.toString=function(){return (this.regExp?this.regExp:this.expr).toString();};abego.PageWiseRenderer=function(){this.firstIndexOnPage=0;};merge(abego.PageWiseRenderer.prototype,{setItems:function(_73){this.items=_73;this.setFirstIndexOnPage(0);},getMaxPagesInNavigation:function(){return 10;},getItemsCount:function(_74){return this.items?this.items.length:0;},getCurrentPageIndex:function(){return Math.floor(this.firstIndexOnPage/this.getItemsPerPage());},getLastPageIndex:function(){return Math.floor((this.getItemsCount()-1)/this.getItemsPerPage());},setFirstIndexOnPage:function(_75){this.firstIndexOnPage=Math.min(Math.max(0,_75),this.getItemsCount()-1);},getFirstIndexOnPage:function(){this.firstIndexOnPage=Math.floor(this.firstIndexOnPage/this.getItemsPerPage())*this.getItemsPerPage();return this.firstIndexOnPage;},getLastIndexOnPage:function(){return Math.min(this.getFirstIndexOnPage()+this.getItemsPerPage()-1,this.getItemsCount()-1);},onPageChanged:function(_76,_77){},renderPage:function(_78){if(_78.beginRendering){_78.beginRendering(this);}try{if(this.getItemsCount()){var _79=this.getLastIndexOnPage();var _7a=-1;for(var i=this.getFirstIndexOnPage();i<=_79;i++){_7a++;_78.render(this,this.items[i],i,_7a);}}}finally{if(_78.endRendering){_78.endRendering(this);}}},addPageNavigation:function(_7c){if(!this.getItemsCount()){return;}var _7d=this;var _7e=function(e){if(!e){var e=window.event;}var _81=abego.toInt(this.getAttribute("page"),0);var _82=_7d.getCurrentPageIndex();if(_81==_82){return;}var _83=_81*_7d.getItemsPerPage();_7d.setFirstIndexOnPage(_83);_7d.onPageChanged(_81,_82);};var _84;var _85=this.getCurrentPageIndex();var _86=this.getLastPageIndex();if(_85>0){_84=createTiddlyButton(_7c,"Previous","Go to previous page (Shortcut: Alt-'<')",_7e,"prev");_84.setAttribute("page",(_85-1).toString());_84.setAttribute("accessKey","<");}for(var i=-this.getMaxPagesInNavigation();i<this.getMaxPagesInNavigation();i++){var _88=_85+i;if(_88<0){continue;}if(_88>_86){break;}var _89=(i+_85+1).toString();var _8a=_88==_85?"currentPage":"otherPage";_84=createTiddlyButton(_7c,_89,"Go to page %0".format([_89]),_7e,_8a);_84.setAttribute("page",(_88).toString());}if(_85<_86){_84=createTiddlyButton(_7c,"Next","Go to next page (Shortcut: Alt-'>')",_7e,"next");_84.setAttribute("page",(_85+1).toString());_84.setAttribute("accessKey",">");}}});abego.LimitedTextRenderer=function(){var _8b=40;var _8c=4;var _8d=function(_8e,_8f,_90){var n=_8e.length;if(n==0){_8e.push({start:_8f,end:_90});return;}var i=0;for(;i<n;i++){var _93=_8e[i];if(_93.start<=_90&&_8f<=_93.end){var r;var _95=i+1;for(;_95<n;_95++){r=_8e[_95];if(r.start>_90||_8f>_93.end){break;}}var _96=_8f;var _97=_90;for(var j=i;j<_95;j++){r=_8e[j];_96=Math.min(_96,r.start);_97=Math.max(_97,r.end);}_8e.splice(i,_95-i,{start:_96,end:_97});return;}if(_93.start>_90){break;}}_8e.splice(i,0,{start:_8f,end:_90});};var _99=function(_9a){var _9b=0;for(var i=0;i<_9a.length;i++){var _9d=_9a[i];_9b+=_9d.end-_9d.start;}return _9b;};var _9e=function(c){return (c>="a"&&c<="z")||(c>="A"&&c<="Z")||c=="_";};var _a0=function(s,_a2){if(!_9e(s[_a2])){return null;}for(var i=_a2-1;i>=0&&_9e(s[i]);i--){}var _a4=i+1;var n=s.length;for(i=_a2+1;i<n&&_9e(s[i]);i++){}return {start:_a4,end:i};};var _a6=function(s,_a8,_a9){var _aa;if(_a9){_aa=_a0(s,_a8);}else{if(_a8<=0){return _a8;}_aa=_a0(s,_a8-1);}if(!_aa){return _a8;}if(_a9){if(_aa.start>=_a8-_8c){return _aa.start;}if(_aa.end<=_a8+_8c){return _aa.end;}}else{if(_aa.end<=_a8+_8c){return _aa.end;}if(_aa.start>=_a8-_8c){return _aa.start;}}return _a8;};var _ab=function(s,_ad){var _ae=[];if(_ad){var _af=0;var n=s.length;var _b1=0;do{_ad.lastIndex=_af;var _b2=_ad.exec(s);if(_b2){if(_af<_b2.index){var t=s.substring(_af,_b2.index);_ae.push({text:t});}_ae.push({text:_b2[0],isMatch:true});_af=_b2.index+_b2[0].length;}else{_ae.push({text:s.substr(_af)});break;}}while(true);}else{_ae.push({text:s});}return _ae;};var _b4=function(_b5){var _b6=0;for(var i=0;i<_b5.length;i++){if(_b5[i].isMatch){_b6++;}}return _b6;};var _b8=function(s,_ba,_bb,_bc,_bd){var _be=Math.max(Math.floor(_bd/(_bc+1)),_8b);var _bf=Math.max(_be-(_bb-_ba),0);var _c0=Math.min(Math.floor(_bb+_bf/3),s.length);var _c1=Math.max(_c0-_be,0);_c1=_a6(s,_c1,true);_c0=_a6(s,_c0,false);return {start:_c1,end:_c0};};var _c2=function(_c3,s,_c5){var _c6=[];var _c7=_b4(_c3);var pos=0;for(var i=0;i<_c3.length;i++){var t=_c3[i];var _cb=t.text;if(t.isMatch){var _cc=_b8(s,pos,pos+_cb.length,_c7,_c5);_8d(_c6,_cc.start,_cc.end);}pos+=_cb.length;}return _c6;};var _cd=function(s,_cf,_d0){var _d1=_d0-_99(_cf);while(_d1>0){if(_cf.length==0){_8d(_cf,0,_a6(s,_d0,false));return;}else{var _d2=_cf[0];var _d3;var _d4;if(_d2.start==0){_d3=_d2.end;if(_cf.length>1){_d4=_cf[1].start;}else{_8d(_cf,_d3,_a6(s,_d3+_d1,false));return;}}else{_d3=0;_d4=_d2.start;}var _d5=Math.min(_d4,_d3+_d1);_8d(_cf,_d3,_d5);_d1-=(_d5-_d3);}}};var _d6=function(_d7,s,_d9,_da,_db){if(_da.length==0){return;}var _dc=function(_dd,s,_df,_e0,_e1){var t;var _e3;var pos=0;var i=0;var _e6=0;for(;i<_df.length;i++){t=_df[i];_e3=t.text;if(_e0<pos+_e3.length){_e6=_e0-pos;break;}pos+=_e3.length;}var _e7=_e1-_e0;for(;i<_df.length&&_e7>0;i++){t=_df[i];_e3=t.text.substr(_e6);_e6=0;if(_e3.length>_e7){_e3=_e3.substr(0,_e7);}if(t.isMatch){createTiddlyElement(_dd,"span",null,"marked",_e3);}else{createTiddlyText(_dd,_e3);}_e7-=_e3.length;}if(_e1<s.length){abego.createEllipsis(_dd);}};if(_da[0].start>0){abego.createEllipsis(_d7);}var _e8=_db;for(var i=0;i<_da.length&&_e8>0;i++){var _ea=_da[i];var len=Math.min(_ea.end-_ea.start,_e8);_dc(_d7,s,_d9,_ea.start,_ea.start+len);_e8-=len;}};this.render=function(_ec,s,_ee,_ef){if(s.length<_ee){_ee=s.length;}var _f0=_ab(s,_ef);var _f1=_c2(_f0,s,_ee);_cd(s,_f1,_ee);_d6(_ec,s,_f0,_f1,_ee);};};(function(){function alertAndThrow(msg){alert(msg);throw msg;}if(version.major<2||(version.major==2&&version.minor<1)){alertAndThrow("YourSearchPlugin requires TiddlyWiki 2.1 or newer.\n\nCheck the archive for YourSearch plugins\nsupporting older versions of TiddlyWiki.\n\nArchive: http://tiddlywiki.abego-software.de/archive");}abego.YourSearch={};var _f3;var _f4;var _f5=function(_f6){_f3=_f6;};var _f7=function(){return _f3?_f3:[];};var _f8=function(){return _f3?_f3.length:0;};var _f9=4;var _fa=10;var _fb=2;var _fc=function(s,re){var m=s.match(re);return m?m.length:0;};var _100=function(_101,_102){var _103=_102.getMarkRegExp();if(!_103){return 1;}var _104=_101.title.match(_103);var _105=_104?_104.length:0;var _106=_fc(_101.getTags(),_103);var _107=_104?_104.join("").length:0;var _108=_101.title.length>0?_107/_101.title.length:0;var rank=_105*_f9+_106*_fb+_108*_fa+1;return rank;};var _10a=function(_10b,_10c,_10d,_10e,_10f,_110){_f4=null;var _111=_10b.reverseLookup("tags",_110,false);try{var _112=[];if(config.options.chkSearchInTitle){_112.push("title");}if(config.options.chkSearchInText){_112.push("text");}if(config.options.chkSearchInTags){_112.push("tags");}_f4=new abego.TiddlerQuery(_10c,_10d,_10e,_112,config.options.chkSearchExtendedFields);}catch(e){return [];}var _113=_f4.filter(_111);var _114=abego.YourSearch.getRankFunction();for(var i=0;i<_113.length;i++){var _116=_113[i];var rank=_114(_116,_f4);_116.searchRank=rank;}if(!_10f){_10f="title";}var _118=function(a,b){var _11b=a.searchRank-b.searchRank;if(_11b==0){if(a[_10f]==b[_10f]){return (0);}else{return (a[_10f]<b[_10f])?-1:+1;}}else{return (_11b>0)?-1:+1;}};_113.sort(_118);return _113;};var _11c=80;var _11d=50;var _11e=250;var _11f=50;var _120=25;var _121=10;var _122="yourSearchResult";var _123="yourSearchResultItems";var _124;var _125;var _126;var _127;var _128;var _129=function(){if(version.extensions.YourSearchPlugin.styleSheetInited){return;}version.extensions.YourSearchPlugin.styleSheetInited=true;setStylesheet(store.getTiddlerText("YourSearchStyleSheet"),"yourSearch");};var _12a=function(){return _125!=null&&_125.parentNode==document.body;};var _12b=function(){if(_12a()){document.body.removeChild(_125);}};var _12c=function(e){_12b();var _12e=this.getAttribute("tiddlyLink");if(_12e){var _12f=this.getAttribute("withHilite");var _130=highlightHack;if(_12f&&_12f=="true"&&_f4){highlightHack=_f4.getMarkRegExp();}story.displayTiddler(this,_12e);highlightHack=_130;}return (false);};var _131=function(){if(!_126){return;}var root=_126;var _133=findPosX(root);var _134=findPosY(root);var _135=root.offsetHeight;var _136=_133;var _137=_134+_135;var _138=findWindowWidth();if(_138<_125.offsetWidth){_125.style.width=(_138-100)+"px";_138=findWindowWidth();}var _139=_125.offsetWidth;if(_136+_139>_138){_136=_138-_139-30;}if(_136<0){_136=0;}_125.style.left=_136+"px";_125.style.top=_137+"px";_125.style.display="block";};var _13a=function(){if(_125){window.scrollTo(0,ensureVisible(_125));}if(_126){window.scrollTo(0,ensureVisible(_126));}};var _13b=function(){_131();_13a();};var _13c;var _13d;var _13e=new abego.PageWiseRenderer();var _13f=function(_140){this.itemHtml=store.getTiddlerText("YourSearchItemTemplate");if(!this.itemHtml){alertAndThrow("YourSearchItemTemplate not found");}this.place=document.getElementById(_123);if(!this.place){this.place=createTiddlyElement(_140,"div",_123);}};merge(_13f.prototype,{render:function(_141,_142,_143,_144){_13c=_144;_13d=_142;var item=createTiddlyElement(this.place,"div",null,"yourSearchItem");item.innerHTML=this.itemHtml;applyHtmlMacros(item,null);refreshElements(item,null);},endRendering:function(_146){_13d=null;}});var _147=function(){if(!_125||!_126){return;}var html=store.getTiddlerText("YourSearchResultTemplate");if(!html){html="<b>Tiddler YourSearchResultTemplate not found</b>";}_125.innerHTML=html;applyHtmlMacros(_125,null);refreshElements(_125,null);var _149=new _13f(_125);_13e.renderPage(_149);_13b();};_13e.getItemsPerPage=function(){var n=(config.options.chkPreviewText)?abego.toInt(config.options.txtItemsPerPageWithPreview,_121):abego.toInt(config.options.txtItemsPerPage,_120);return (n>0)?n:1;};_13e.onPageChanged=function(){_147();};var _14b=function(){if(_126==null||!config.options.chkUseYourSearch){return;}if((_126.value==_124)&&_124&&!_12a()){if(_125&&(_125.parentNode!=document.body)){document.body.appendChild(_125);_13b();}else{abego.YourSearch.onShowResult(true);}}};var _14c=function(){_12b();_125=null;_124=null;};var _14d=function(self,e){while(e!=null){if(self==e){return true;}e=e.parentNode;}return false;};var _150=function(e){if(e.target==_126){return;}if(e.target==_127){return;}if(_125&&_14d(_125,e.target)){return;}_12b();};var _152=function(e){if(e.keyCode==27){_12b();}};addEvent(document,"click",_150);addEvent(document,"keyup",_152);var _154=function(text,_156,_157){_124=text;_f5(_10a(store,text,_156,_157,"title","excludeSearch"));abego.YourSearch.onShowResult();};var _158=function(_159,_15a,_15b,_15c,_15d,_15e){_129();_124="";var _15f=null;var _160=function(txt){if(config.options.chkUseYourSearch){_154(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);}else{story.search(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);}_124=txt.value;};var _162=function(e){_160(_126);return false;};var _164=function(e){if(!e){var e=window.event;}_126=this;switch(e.keyCode){case 13:if(e.ctrlKey&&_128&&_12a()){_128.onclick.apply(_128,[e]);}else{_160(this);}break;case 27:if(_12a()){_12b();}else{this.value="";clearMessage();}break;}if(String.fromCharCode(e.keyCode)==this.accessKey||e.altKey){_14b();}if(this.value.length<3&&_15f){clearTimeout(_15f);}if(this.value.length>2){if(this.value!=_124){if(!config.options.chkUseYourSearch||config.options.chkSearchAsYouType){if(_15f){clearTimeout(_15f);}var txt=this;_15f=setTimeout(function(){_160(txt);},500);}}else{if(_15f){clearTimeout(_15f);}}}if(this.value.length==0){_12b();}};var _168=function(e){this.select();clearMessage();_14b();};var args=_15d.parseParams("list",null,true);var _16b=getFlag(args,"buttonAtRight");var _16c=getParam(args,"sizeTextbox",this.sizeTextbox);var btn;if(!_16b){btn=createTiddlyButton(_159,this.label,this.prompt,_162);}var txt=createTiddlyElement(_159,"input",null,null,null);if(_15b[0]){txt.value=_15b[0];}txt.onkeyup=_164;txt.onfocus=_168;txt.setAttribute("size",_16c);txt.setAttribute("accessKey",this.accessKey);txt.setAttribute("autocomplete","off");if(config.browser.isSafari){txt.setAttribute("type","search");txt.setAttribute("results","5");}else{txt.setAttribute("type","text");}if(_16b){btn=createTiddlyButton(_159,this.label,this.prompt,_162);}_126=txt;_127=btn;};var _16f=function(){_12b();var _170=_f7();var n=_170.length;if(n){var _172=[];for(var i=0;i<n;i++){_172.push(_170[i].title);}story.displayTiddlers(null,_172);}};var _174=function(_175,_176,_177,_178){invokeMacro(_175,"option",_176,_177,_178);var elem=_175.lastChild;var _17a=elem.onclick;elem.onclick=function(e){var _17c=_17a.apply(this,arguments);_147();return _17c;};return elem;};var _17d=function(s){var _17f=["''","{{{","}}}","//","<<<","/***","***/"];var _180="";for(var i=0;i<_17f.length;i++){if(i!=0){_180+="|";}_180+="("+_17f[i].escapeRegExp()+")";}return s.replace(new RegExp(_180,"mg"),"").trim();};var _182=function(){var i=_13c;return (i>=0&&i<=9)?(i<9?(i+1):0):-1;};var _184=new abego.LimitedTextRenderer();var _185=function(_186,s,_188){_184.render(_186,s,_188,_f4.getMarkRegExp());};var _189=TiddlyWiki.prototype.saveTiddler;TiddlyWiki.prototype.saveTiddler=function(_18a,_18b,_18c,_18d,_18e,tags,_190){_189.apply(this,arguments);_14c();};var _191=TiddlyWiki.prototype.removeTiddler;TiddlyWiki.prototype.removeTiddler=function(_192){_191.apply(this,arguments);_14c();};config.macros.yourSearch={label:"yourSearch",prompt:"Gives access to the current/last YourSearch result",handler:function(_193,_194,_195,_196,_197,_198){if(_195.length==0){return;}var name=_195[0];var func=config.macros.yourSearch.funcs[name];if(func){func(_193,_194,_195,_196,_197,_198);}},tests:{"true":function(){return true;},"false":function(){return false;},"found":function(){return _f8()>0;},"previewText":function(){return config.options.chkPreviewText;}},funcs:{itemRange:function(_19b){if(_f8()){var _19c=_13e.getLastIndexOnPage();var s="%0 - %1".format([_13e.getFirstIndexOnPage()+1,_19c+1]);createTiddlyText(_19b,s);}},count:function(_19e){createTiddlyText(_19e,_f8().toString());},query:function(_19f){if(_f4){createTiddlyText(_19f,_f4.toString());}},version:function(_1a0){var t="YourSearch %0.%1.%2".format([version.extensions.YourSearchPlugin.major,version.extensions.YourSearchPlugin.minor,version.extensions.YourSearchPlugin.revision]);var e=createTiddlyElement(_1a0,"a");e.setAttribute("href","http://tiddlywiki.abego-software.de/#YourSearchPlugin");e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">"+t+"<font>";},copyright:function(_1a3){var e=createTiddlyElement(_1a3,"a");e.setAttribute("href","http://www.abego-software.de");e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">&copy; 2005-2006 <b><font color=\"red\">abego</font></b> Software<font>";},newTiddlerButton:function(_1a5){if(_f4){var r=abego.parseNewTiddlerCommandLine(_f4.getQueryText());var btn=config.macros.newTiddler.createNewTiddlerButton(_1a5,r.title,r.params,"new tiddler","Create a new tiddler based on search text. (Shortcut: Ctrl-Enter; Separators: '.', '#')",null,"text");var _1a8=btn.onclick;btn.onclick=function(){_12b();_1a8.apply(this,arguments);};_128=btn;}},linkButton:function(_1a9,_1aa,_1ab,_1ac,_1ad,_1ae){if(_1ab<2){return;}var _1af=_1ab[1];var text=_1ab<3?_1af:_1ab[2];var _1b1=_1ab<4?text:_1ab[3];var _1b2=_1ab<5?null:_1ab[4];var btn=createTiddlyButton(_1a9,text,_1b1,_12c,null,null,_1b2);btn.setAttribute("tiddlyLink",_1af);},closeButton:function(_1b4,_1b5,_1b6,_1b7,_1b8,_1b9){var _1ba=createTiddlyButton(_1b4,"close","Close the Search Results (Shortcut: ESC)",_12b);},openAllButton:function(_1bb,_1bc,_1bd,_1be,_1bf,_1c0){var n=_f8();if(n==0){return;}var _1c2=n==1?"open tiddler":"open all %0 tiddlers".format([n]);var _1c3=createTiddlyButton(_1bb,_1c2,"Open all found tiddlers (Shortcut: Alt-O)",_16f);_1c3.setAttribute("accessKey","O");},naviBar:function(_1c4,_1c5,_1c6,_1c7,_1c8,_1c9){_13e.addPageNavigation(_1c4);},"if":function(_1ca,_1cb,_1cc,_1cd,_1ce,_1cf){if(_1cc.length<2){return;}var _1d0=_1cc[1];var _1d1=(_1d0=="not");if(_1d1){if(_1cc.length<3){return;}_1d0=_1cc[2];}var test=config.macros.yourSearch.tests[_1d0];var _1d3=false;try{if(test){_1d3=test(_1ca,_1cb,_1cc,_1cd,_1ce,_1cf)!=_1d1;}else{_1d3=(!eval(_1d0))==_1d1;}}catch(ex){}if(!_1d3){_1ca.style.display="none";}},chkPreviewText:function(_1d4,_1d5,_1d6,_1d7,_1d8,_1d9){var _1da=_1d6.slice(1).join(" ");var elem=_174(_1d4,"chkPreviewText",_1d7,_1d9);elem.setAttribute("accessKey","P");elem.title="Show text preview of found tiddlers (Shortcut: Alt-P)";return elem;}}};config.macros.foundTiddler={label:"foundTiddler",prompt:"Provides information on the tiddler currently processed on the YourSearch result page",handler:function(_1dc,_1dd,_1de,_1df,_1e0,_1e1){var name=_1de[0];var func=config.macros.foundTiddler.funcs[name];if(func){func(_1dc,_1dd,_1de,_1df,_1e0,_1e1);}},funcs:{title:function(_1e4,_1e5,_1e6,_1e7,_1e8,_1e9){if(!_13d){return;}var _1ea=_182();var _1eb=_1ea>=0?"Open tiddler (Shortcut: Alt-%0)".format([_1ea.toString()]):"Open tiddler";var btn=createTiddlyButton(_1e4,null,_1eb,_12c,null);btn.setAttribute("tiddlyLink",_13d.title);btn.setAttribute("withHilite","true");_185(btn,_13d.title,_11c);if(_1ea>=0){btn.setAttribute("accessKey",_1ea.toString());}},tags:function(_1ed,_1ee,_1ef,_1f0,_1f1,_1f2){if(!_13d){return;}_185(_1ed,_13d.getTags(),_11d);},text:function(_1f3,_1f4,_1f5,_1f6,_1f7,_1f8){if(!_13d){return;}_185(_1f3,_17d(_13d.text),_11e);},field:function(_1f9,_1fa,_1fb,_1fc,_1fd,_1fe){if(!_13d){return;}var name=_1fb[1];var len=_1fb.length>2?abego.toInt(_1fb[2],_11f):_11f;var v=store.getValue(_13d,name);if(v){_185(_1f9,_17d(v),len);}},number:function(_202,_203,_204,_205,_206,_207){var _208=_182();if(_208>=0){var text="%0)".format([_208.toString()]);createTiddlyElement(_202,"span",null,"shortcutNumber",text);}}}};var opts={chkUseYourSearch:true,chkPreviewText:true,chkSearchAsYouType:true,chkSearchInTitle:true,chkSearchInText:true,chkSearchInTags:true,chkSearchExtendedFields:true,txtItemsPerPage:_120,txtItemsPerPageWithPreview:_121};for(var n in opts){if(config.options[n]==undefined){config.options[n]=opts[n];}}config.shadowTiddlers.AdvancedOptions+="\n<<option chkUseYourSearch>> Use 'Your Search' //([[more options|YourSearch Options]]) ([[help|YourSearch Help]])// ";config.shadowTiddlers["YourSearch Help"]="!Field Search\nWith the Field Search you can restrict your search to certain fields of a tiddler, e.g"+" only search the tags or only the titles. The general form is //fieldname//'':''//textToSearch// (e."+"g. {{{title:intro}}}). In addition one-character shortcuts are also supported for the standard field"+"s {{{title}}}, {{{text}}} and {{{tags}}}:\n|!What you want|!What you type|!Example|\n|Search ''titles "+"only''|start word with ''!''|{{{!jonny}}} (shortcut for {{{title:jonny}}})|\n|Search ''contents/text "+"only''|start word with ''%''|{{{%football}}} (shortcut for {{{text:football}}})|\n|Search ''tags only"+"''|start word with ''#''|{{{#Plugin}}} (shortcut for {{{tags:Plugin}}})|\n\nUsing this feature you may"+" also search the extended fields (\"Metadata\") introduced with TiddlyWiki 2.1, e.g. use {{{priority:1"+"}}} to find all tiddlers with the priority field set to \"1\".\n\nYou may search a word in more than one"+" field. E.g. {{{!#Plugin}}} (or {{{title:tags:Plugin}}} in the \"long form\") finds tiddlers containin"+"g \"Plugin\" either in the title or in the tags (but does not look for \"Plugin\" in the text). \n\n!Boole"+"an Search\nThe Boolean Search is useful when searching for multiple words.\n|!What you want|!What you "+"type|!Example|\n|''All words'' must exist|List of words|{{{jonny jeremy}}} (or {{{jonny and jeremy}}}"+")|\n|''At least one word'' must exist|Separate words by ''or''|{{{jonny or jeremy}}}|\n|A word ''must "+"not exist''|Start word with ''-''|{{{-jonny}}} (or {{{not jonny}}})|\n\n''Note:'' When you specify two"+" words, separated with a space, YourSearch finds all tiddlers that contain both words, but not neces"+"sarily next to each other. If you want to find a sequence of word, e.g. '{{{John Brown}}}', you need"+" to put the words into quotes. I.e. you type: {{{\"john brown\"}}}.\n\nUsing parenthesis you may change "+"the default \"left to right\" evaluation of the boolean search. E.g. {{{not (jonny or jeremy)}}} finds"+" all tiddlers that contain neither \"jonny\" nor \"jeremy. In contrast to this {{{not jonny or jeremy}}"+"} (i.e. without parenthesis) finds all tiddlers that either don't contain \"jonny\" or that contain \"j"+"eremy\".\n\n!'Exact Word' Search\nBy default a search result all matches that 'contain' the searched tex"+"t. E.g. if you search for {{{Task}}} you will get all tiddlers containing 'Task', but also '~Complet"+"edTask', '~TaskForce' etc.\n\nIf you only want to get the tiddlers that contain 'exactly the word' you"+" need to prefix it with a '='. E.g. typing '=Task' will find the tiddlers that contain the word 'Tas"+"k', ignoring words that just contain 'Task' as a substring.\n\n!~CaseSensitiveSearch and ~RegExpSearch"+"\nThe standard search options ~CaseSensitiveSearch and ~RegExpSearch are fully supported by YourSearc"+"h. However when ''~RegExpSearch'' is on Filtered and Boolean Search are disabled.\n\nIn addition you m"+"ay do a \"regular expression\" search even with the ''~RegExpSearch'' set to false by directly enterin"+"g the regular expression into the search field, framed with {{{/.../}}}. \n\nExample: {{{/m[ae][iy]er/"+"}}} will find all tiddlers that contain either \"maier\", \"mayer\", \"meier\" or \"meyer\".\n\n!~JavaScript E"+"xpression Filtering\nIf you are familiar with JavaScript programming and know some TiddlyWiki interna"+"ls you may also use JavaScript expression for the search. Just enter a JavaScript boolean expression"+" into the search field, framed with {{{ { ... } }}}. In the code refer to the variable tiddler and e"+"valuate to {{{true}}} when the given tiddler should be included in the result. \n\nExample: {{{ { tidd"+"ler.modified > new Date(\"Jul 4, 2005\")} }}} returns all tiddler modified after July 4th, 2005.\n\n!Com"+"bined Search\nYou are free to combine the various search options. \n\n''Examples''\n|!What you type|!Res"+"ult|\n|{{{!jonny !jeremy -%football}}}|all tiddlers with both {{{jonny}}} and {{{jeremy}}} in its tit"+"les, but no {{{football}}} in content.|\n|{{{#=Task}}}|All tiddlers tagged with 'Task' (the exact wor"+"d). Tags named '~CompletedTask', '~TaskForce' etc. are not considered.|\n\n!Access Keys\nYou are encour"+"aged to use the access keys (also called \"shortcut\" keys) for the most frequently used operations. F"+"or quick reference these shortcuts are also mentioned in the tooltip for the various buttons etc.\n\n|"+"!Key|!Operation|\n|{{{Alt-F}}}|''The most important keystroke'': It moves the cursor to the search in"+"put field so you can directly start typing your query. Pressing {{{Alt-F}}} will also display the pr"+"evious search result. This way you can quickly display multiple tiddlers using \"Press {{{Alt-F}}}. S"+"elect tiddler.\" sequences.|\n|{{{ESC}}}|Closes the [[YourSearch Result]]. When the [[YourSearch Resul"+"t]] is already closed and the cursor is in the search input field the field's content is cleared so "+"you start a new query.|\n|{{{Alt-1}}}, {{{Alt-2}}},... |Pressing these keys opens the first, second e"+"tc. tiddler from the result list.|\n|{{{Alt-O}}}|Opens all found tiddlers.|\n|{{{Alt-P}}}|Toggles the "+"'Preview Text' mode.|\n|{{{Alt-'<'}}}, {{{Alt-'>'}}}|Displays the previous or next page in the [[Your"+"Search Result]].|\n|{{{Return}}}|When you have turned off the 'as you type' search mode pressing the "+"{{{Return}}} key actually starts the search (as does pressing the 'search' button).|\n\n//If some of t"+"hese shortcuts don't work for you check your browser if you have other extensions installed that alr"+"eady \"use\" these shortcuts.//";config.shadowTiddlers["YourSearch Options"]="|>|!YourSearch Options|\n|>|<<option chkUseYourSearch>> Use 'Your Search'|\n|!|<<option chkPreviewText"+">> Show Text Preview|\n|!|<<option chkSearchAsYouType>> 'Search As You Type' Mode (No RETURN required"+" to start search)|\n|!|Default Search Filter:<<option chkSearchInTitle>>Title ('!')     <<option chk"+"SearchInText>>Text ('%')     <<option chkSearchInTags>>Tags ('#')    <<option chkSearchExtendedFiel"+"ds>>Extended Fields<html><br><font size=\"-2\">The fields of a tiddlers that are searched when you don"+"'t explicitly specify a filter in the search text <br>(Explictly specify fields using one or more '!"+"', '%', '#' or 'fieldname:' prefix before the word/text to find).</font></html>|\n|!|Number of items "+"on search result page: <<option txtItemsPerPage>>|\n|!|Number of items on search result page with pre"+"view text: <<option txtItemsPerPageWithPreview>>|\n";config.shadowTiddlers["YourSearchStyleSheet"]="/***\n!~YourSearchResult Stylesheet\n***/\n/*{{{*/\n.yourSearchResult {\n\tposition: absolute;\n\twidth: 800"+"px;\n\n\tpadding: 0.2em;\n\tlist-style: none;\n\tmargin: 0;\n\n\tbackground: #ffd;\n\tborder: 1px solid DarkGra"+"y;\n}\n\n/*}}}*/\n/***\n!!Summary Section\n***/\n/*{{{*/\n.yourSearchResult .summary {\n\tborder-bottom-width:"+" thin;\n\tborder-bottom-style: solid;\n\tborder-bottom-color: #999999;\n\tpadding-bottom: 4px;\n}\n\n.yourSea"+"rchRange, .yourSearchCount, .yourSearchQuery   {\n\tfont-weight: bold;\n}\n\n.yourSearchResult .summary ."+"button {\n\tfont-size: 10px;\n\n\tpadding-left: 0.3em;\n\tpadding-right: 0.3em;\n}\n\n.yourSearchResult .summa"+"ry .chkBoxLabel {\n\tfont-size: 10px;\n\n\tpadding-right: 0.3em;\n}\n\n/*}}}*/\n/***\n!!Items Area\n***/\n/*{{{*"+"/\n.yourSearchResult .marked {\n\tbackground: none;\n\tfont-weight: bold;\n}\n\n.yourSearchItem {\n\tmargin-to"+"p: 2px;\n}\n\n.yourSearchNumber {\n\tcolor: #808080;\n}\n\n\n.yourSearchTags {\n\tcolor: #008000;\n}\n\n.yourSearc"+"hText {\n\tcolor: #808080;\n\tmargin-bottom: 6px;\n}\n\n/*}}}*/\n/***\n!!Footer\n***/\n/*{{{*/\n.yourSearchFoote"+"r {\n\tmargin-top: 8px;\n\tborder-top-width: thin;\n\tborder-top-style: solid;\n\tborder-top-color: #999999;"+"\n}\n\n.yourSearchFooter a:hover{\n\tbackground: none;\n\tcolor: none;\n}\n/*}}}*/\n/***\n!!Navigation Bar\n***/"+"\n/*{{{*/\n.yourSearchNaviBar a {\n\tfont-size: 16px;\n\tmargin-left: 4px;\n\tmargin-right: 4px;\n\tcolor: bla"+"ck;\n\ttext-decoration: underline;\n}\n\n.yourSearchNaviBar a:hover {\n\tbackground-color: none;\n}\n\n.yourSe"+"archNaviBar .prev {\n\tfont-weight: bold;\n\tcolor: blue;\n}\n\n.yourSearchNaviBar .currentPage {\n\tcolor: #"+"FF0000;\n\tfont-weight: bold;\n\ttext-decoration: none;\n}\n\n.yourSearchNaviBar .next {\n\tfont-weight: bold"+";\n\tcolor: blue;\n}\n/*}}}*/\n";config.shadowTiddlers["YourSearchResultTemplate"]="<!--\n{{{\n-->\n<span macro=\"yourSearch if found\">\n<!-- The Summary Header ============================"+"================ -->\n<table class=\"summary\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">"+"<tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Result <span class=\"yourSearchRange\" macro=\"yourSearc"+"h itemRange\"></span>\n\t\t&nbsp;of&nbsp;<span class=\"yourSearchCount\" macro=\"yourSearch count\"></span>\n"+"\t\tfor&nbsp;<span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>\n\t</td>\n\t<td class=\"yourSea"+"rchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch chkPreviewText\"></span><span class=\"chkBoxLabel"+"\">preview text</span>\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch openAllButton\"></span>\n\t\t<span macro=\"yourSearch lin"+"kButton 'YourSearch Options' options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkB"+"utton 'YourSearch Help' help 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch clo"+"seButton\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n\n<!-- The List of Found Tiddlers ================="+"=========================== -->\n<div id=\"yourSearchResultItems\" itemsPerPage=\"25\" itemsPerPageWithPr"+"eview=\"10\"></div>\n\n<!-- The Footer (with the Navigation) ==========================================="+"= -->\n<table class=\"yourSearchFooter\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody"+">\n  <tr>\n\t<td align=\"left\">\n\t\tResult page: <span class=\"yourSearchNaviBar\" macro=\"yourSearch naviBar"+"\"></span>\n\t</td>\n\t<td align=\"right\"><span macro=\"yourSearch version\"></span>, <span macro=\"yourSearc"+"h copyright\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n<!-- end of the 'tiddlers found' case ========="+"================================== -->\n</span>\n\n\n<!-- The \"No tiddlers found\" case ================="+"========================== -->\n<span macro=\"yourSearch if not found\">\n<table class=\"summary\" border="+"\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Resu"+"lt: No tiddlers found for <span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>.\n\t</td>\n\t<t"+"d class=\"yourSearchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Options'"+" options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Help' help"+" 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch closeButton\"></span>\n\t</td>\n  <"+"/tr>\n</tbody></table>\n</span>\n\n\n<!--\n}}}\n-->\n";config.shadowTiddlers["YourSearchItemTemplate"]="<!--\n{{{\n-->\n<span class='yourSearchNumber' macro='foundTiddler number'></span>\n<span class='yourSea"+"rchTitle' macro='foundTiddler title'/></span>&nbsp;-&nbsp;\n<span class='yourSearchTags' macro='found"+"Tiddler field tags 50'/></span>\n<span macro=\"yourSearch if previewText\"><div class='yourSearchText' macro='fo"+"undTiddler field text 250'/></div></span>\n<!--\n}}}\n-->";config.shadowTiddlers["YourSearch"]="<<tiddler [[YourSearch Help]]>>";config.shadowTiddlers["YourSearch Result"]="The popup-like window displaying the result of a YourSearch query.";config.macros.search.handler=_158;var _20c=function(){if(config.macros.search.handler!=_158){alert("Message from YourSearchPlugin:\n\n\nAnother plugin has disabled the 'Your Search' features.\n\n\nYou may "+"disable the other plugin or change the load order of \nthe plugins (by changing the names of the tidd"+"lers)\nto enable the 'Your Search' features.");}};setTimeout(_20c,5000);abego.YourSearch.getStandardRankFunction=function(){return _100;};abego.YourSearch.getRankFunction=function(){return abego.YourSearch.getStandardRankFunction();};abego.YourSearch.getCurrentTiddler=function(){return _13d;};abego.YourSearch.closeResult=function(){_12b();};abego.YourSearch.getFoundTiddlers=function(){return _f3;};abego.YourSearch.getQuery=function(){return _f4;};abego.YourSearch.onShowResult=function(_20d){highlightHack=_f4?_f4.getMarkRegExp():null;if(!_20d){_13e.setItems(_f7());}if(!_125){_125=createTiddlyElement(document.body,"div",_122,"yourSearchResult");}else{if(_125.parentNode!=document.body){document.body.appendChild(_125);}}_147();highlightHack=null;};})();}
//%/
An {{{abstract class}}} is a class from which no Objects can be created, instead subclasses must be used that complete all the methods marked as {{{abstract}}}.

An {{{abstract method}}} is a method within an abstract class that has no implementation.

Abstract methods cannot be {{{priavte}}}, but conversely implemented ones can be.

{{{
public abstract class AbstractClass

   public abstract void abstractMethod();

   protected abstract void protectedAbstractMethod();

   // NOT ALLOWED private abstract void priateAbstractMethod();

   private void X() { }
   public void Y{ X() }
}
}}}

{{{
   interface ABC { void abc(); )

   abstract class MyClass implements ABC {}   // VALID

   abstract class AnotherClass implements ABC
   { void abc() { } }    // INVALID - why ? All interface methods must be public.
}}}

Annotation adds meta data to Java methods and members.

There are three built in annotations:
@Override
@Deprecated
@SuppressWarnings

New annotation can be defined with @interface
And these can be further meta-annotated with @Target @Retention, @Documented, @Inherited

{{{assert}}} used to be a valid identifier prior to java -source 1.4 but is now a key word for the runtime checking of assumptions during the development/testing stages and should be disabled upon release, which is why by default assertions are off.

Assertions can be turned on with the command line {{{-enableassertions}}} or {{{-ea}}} followed by a package or class name. With assertions enabled, specific class or packages can be turned off with {{{-disableassertions}}} or {{{-da}}}

The parameters of public methods should not be checked using assertions, which should instead throw [[java.lang.InvalidParamterException]]

int x = 3;
{{{assert x >3: x;}}} 
{{{assert x==3;}}} 
{{{assert x;}}} * compile error 
{{{assert x =1;}}} * compile error

When an assertion is fails the JVM throws an java.lang.Assert error, not derived from Exception, and  which should not be caught.
search replace:
{{{x=${x/a.b.c/ABZ} }}}

{{{
echo /root/Documents/Jenna.m3u | sed 's%/[^/]*$%%'
/root/Documents
}}}
dirname basename
{{{

ARGS=
for x in $*
do
  echo $x
  if [ $x = "com.calypso.apps.startup.StartDataServer" ]
  then 
     echo "com.calypso.apps.startup.StartDataServer found"
     x="com.optier.corefirst.plugin.instrument.DynamicLauncher $x"
  fi

  ARGS="$ARGS $x"

done
}}}
Java 1.5 introduces boxing and un-boxing of primitive types to and from their equivalent objects.

{{{
Integer i = 2;               // references 2 in the cache therfore
Integer ii = 2;
boolean equal = i == ii; // true for all integers -128..127 (Byte,Short,Integer,Long) 
boolean notEqual = new Integer(2) == new Integer(2); // on demand objects created.

Short s = 128, ss = 128;
notEqual = s == ss;
}}}

Remeber {{{Long l = 2L; }}} // Still needs the L or l 
A call option is a financial instrument that gives the buyer the right, but not the obligation, to buy at the excise price.

A buyer of this option wants the underlying price to rise to be in the money.

[[pay off]] = MAX[(S-K):0]

Where K is the [[strike price]] and S is the [[spot price]]

[img[http://upload.wikimedia.org/wikipedia/en/7/7f/CallOption.png]]
To get the parent of an inner class: {{{A.B.class.getDeclaredField("this$0");}}}
Legacy (since 1.0) synchronized access
*[[java.util.Vector]]
*[[java.util.Stack]]
*[[java.util.Hastable]] dose not allow nulls
*[[java.util.Properties]]

JSE 1.2
*[[java.util.WeakHashMap]]

JSE 1.4
*[[java.util.LinkedHashSet]]
*[[java.util.LinkedHashMap]]
*[[java.util.IdentityHashMap]]

JSE 1.5
*[[java.util.EnumSet]]
*[[java.util.EnumMap]]
*[[java.util.PriorityQueue]]
*{{{java.util.concurrent,*}}}

interfaces:

List, Set implements [[java.util.Collection]]
ArrayList LinkedList implements |[[java.util.List]]
HashSet TreeSet implements [[java.util.Set]] 
HashMap TreeMap implements [[java.util.Map]] Map.Entry 

java.lang.Iteratable Iterator

[img[http://www.in-collaboration.co.uk/images/Java%20Collections.jpg]]
[img[http://www.in-collaboration.co.uk/images/Java%20Collections-Enumerations.jpg]]
Extend Job an override methods.

At is simplest:
# In constructor call {{{setTasklet}}} to set worker
# override {{{createTasksInputs}}} to create initial tasks
# override {{{taskComputed}}} to output each task
Then to run
# create job.
# {{{job.setJarFile}}}
# call {{{Job.execute()}}} to submit synchronously 
An enumeration constant with its own code.

e.g. England has a ''constant specific class body''  which overrides {{{getCurrency}}}, where as the other counties don't.
{{{
public class ConstantSpecificClassBody {

	enum Country{ England() { public String getCurrency()  {return "GBP";}  { this.currency = "GBP"; }  }, Spain, France;
	
	public String getCurrency() { return "EURO"; }

	private String currency;	
	}
}
}}}

''{{{this.currency = "GDP"; }}}'' will not compile ! Because ''constant specific class bodies'' are sublcasses of their super class enum, therefore {{{protected}}} or {{{public}}} correct the compilation error.
{{{crontab -e}}} to open vi editor to add a job

{{{
# m h  dom mon dow   command
*/15 * * * * /home/devbatch/bin/batch_run.sh
}}}
run batch every 15 minutes m=*/15    *=anytime
Financial instruments whose value is derived from the value of something else.

Common Derivatives are:
*[[future]]s/[[forward]]s
*[[option]]s
*[[swap]]s
----
In maths a derivative is the slope of a graph, and [[differentiation]] is the act of finding the slope.


Differantials to know:
|y|dy/dx|
|sin x |cos x|
|ln x|1/x|
|tan x| sec^2x|
|cos x|-sin x|
|e^x|e^x|

functions of functions - use chain rule (power rule)
product of functions
quotients of functions
Java 1.5's {{{enum}}} keyword is used to define enumerations based on {{{java.lang.Enum}}} which is an abstract class that cannot be extended.

# cannot be extended, but can implement further interfaces to Compariable, Serializable
# can have abstract member functions, so long as they are implemented by enums.
# ''constant specific functions'' can override superclass's methods.
# final String name() cannot be overridden and returns the enum constatns' name.
Erasure is the removal of everything between {{{<}}} and {{{>}}} by the compiler and replacing it with:
*<T> replace by Object
* <T extends Serializable> replaced by Serializable
* casts added to make source type correct.

* {{{if (list instanceof List<Integer> // ILEGAL }}}
* cannot use class type parameter <T> in static members, but can e.g. <String> 
/***
===============================================================================
Author : Dawn Ahukanna
Version : $Id: Plugin_hypergraph.js 455 2007-02-19 18:48:24Z dahukanna $
===============================================================================
----
''Name:'' hypergraph
''Summary:'' <<getPlugin hypergraph summary>>
''Description:'' <<getPlugin hypergraph description>>
''Version:'' <<getPlugin hypergraph >>
''Date:'' <<getPlugin hypergraph date>>
''Author:'' <<getPlugin hypergraph author>>
''Source:'' <<getPlugin hypergraph code>>
''Documentation:'' <<getPlugin hypergraph doc>>
''License:'' [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]
''Browsers:'' InternetExplorer 6.0, FireFox 1.5.x, FireFox 2.0.x
''~CoreVersion:'' <<getPlugin hypergraph coreVersion>>
''Java Virtual Machine(JVM) Version:'' 1.4+
''Hypergraph jar version:'' [[hypergraph 0.6.3|http://hypergraph.sourceforge.net/]].
''Download'': [[hypergraph-213.zip|/download/hypergraph-213.zip]].
----
!Code
***/
//{{{
version.extensions.hypergraph = {major: 2, minor: 1, revision: 1, date: new Date("Feb 19, 2007"), code: "http://project.dahukanna.net/tiddlywiki/twextensions.htm#hypergraph", doc: "http://project.dahukanna.net/tiddlywiki/twextensions.htm#hypergraphDoc", author:"DawnAhukanna dawn[at]dahukanna[dot]net", summary:"_HyperGraph for TiddlyWiki version 2.1.3 or above.", description: "Uses HyperGraph 0.6.3 applet(http://HyperGraph.sourceforge.net/) to create navigation graphs.", coreVersion: "2.1.0"};
//Options for generating hypergraph XML for current TiddlyWiki document

//txtHypergraphXMLfile - Default xml file for menu hypergraph and saving generated file.
merge(config.options,{chkHypergraphMenugraphTiddlers: true, chkHypergraphMenugraphTags: true, chkHypergraphMenugraphTagged: true, chkHypergraphMenugraphDates: true, chkHypergraphMenugraphShadowed: true, chkHypergraphMenugraphModifiers: true, chkHypergraphMenugraphStructured: false, txtHypergraphXMLfile: "./graphs/tiddlerMap.xml"});

//Define macro properties.
config.macros.hypergraph = {
 dateFormat: "DD MMM YYYY",
 applets: {mainMenuApplet:"mainMenuApplet", demoApplet1:"demoApplet", demoApplet2:"menuApplet", demoApplet3:"orgApplet", demoApplet4:"hyperApplet"},
 graphXMLPath:"../common/GraphXML.dtd", 
 hypergraphJar:{path:"./common/hyperapplet-0.6.3.jar", width:"100%", height:200, tiddler:"DemoDisplayHypergraphXML"}, 
 label:{centre:"Centre %0", saveXML:"Save XML"}, 
 prompt:{centre:"Centre %0", saveXML:"Save hypergraph XML %0 for current Tiddlywiki"},
 messages:{saveXMLError:"XML error %0- select xml file", appletError:"Applet error %0- ", hypergraphXMLSaved:"Saved xmlgraph file", hypergraphXMLSavedError:"Failed to save xmlgraph file"},
 node:{main:{colour:"black",fill:"#d0d0ff"}, group:{colour:"black",fill:"#eeeeee"}, child:{colour:"green",fill:"white"}, tiddler:{colour:"blue",fill:"#c0d0f0",shadow:"#eeeeee"}
 },
 edge:{centre:{colour:"green", lineStyle:"solid"}, tiddler:{colour:"blue", lineStyle:"dashed",shadowcolour:"#d0d0ff"}}
}

//Shadow tiddlers for default main menu hypergraph applet
//=== Set hypergraph shadow Tiddler.
config.shadowTiddlers.menuGraph = "<html><div><applet class='sitemap' align='baseline' code='hypergraph.applications.hexplorer.HExplorerApplet.class' name = '"+ config.macros.hypergraph.applets.mainMenuApplet +"' archive='"+ config.macros.hypergraph.hypergraphJar.path +"' width='"+ config.macros.hypergraph.hypergraphJar.width +"' height='"+ config.macros.hypergraph.hypergraphJar.height +"'> <param name='file' value='" + config.options.txtHypergraphXMLfile + "'></applet></div></html>";
config.shadowTiddlers.debug = "";
//=== Set hypergraph menu options shadow Tiddler.
var setHyperGraphOptions = true;
config.shadowTiddlers.hyperGraphOptions = "\n <<option chkHypergraphMenugraphTiddlers>> Add tiddlers to menugraph.\n <<option chkHypergraphMenugraphShadowed>> Add shadow tiddlers to menugraph.\n <<option chkHypergraphMenugraphTags>> Add tags to menugraph.\n <<option chkHypergraphMenugraphTagged>> Add tagged tiddlers to menugraph.\n <<option chkHypergraphMenugraphDates>> Add dates to menugraph.\n <<option chkHypergraphMenugraphModifiers>> Add modifiers to menugraph. \n <<hypergraph saveXML>> Create new XML file with the options selected.";

//=== Set hypergraph menu options in SideBarOptions shadow Tiddler.
var oldSideBarOptions = config.shadowTiddlers.SideBarOptions;
config.shadowTiddlers.SideBarOptions = "<<hypergraph saveXML>><<hypergraph centre>> [[hyperGraphOptions]]" + oldSideBarOptions;

//Define macro functions.
config.macros.hypergraph.handler = function(place,macroName,params){
 /* params[0]: Function, params[1]: Applet Name, params[2]: Hypergraph xml file. */
 var applet=null;
 var prompt=null;
 var label=null;

 /* Check for valid appletname in param[1]*/
 if ((params[1] == this.applets.demoApplet1) || (params[1] == this.applets.demoApplet2) || (params[1] == this.applets.demoApplet3) || (params[1] == this.applets.demoApplet4)){
 applet=params[1];
 } else {
 applet=this.applets.mainMenuApplet;
 }
 /* Execute instruction in param[0]*/
 switch (params[0]) {
 case "centre":
 prompt = this.prompt.centre.format([applet]);
 label = this.label.centre.format([applet]);
 createTiddlyButton(place,label,prompt,function(){centreTree(applet); return false;});
 break;
 case "saveXML":
 if(!readOnly) {
 prompt = this.prompt.saveXML.format([applet]);
 label = this.label.saveXML.format([applet]);
 createTiddlyButton(place,label,prompt,function(){saveHypergraph(); return false;});
 }
 break;
 default:
 var graphInfo = null;
 graphInfo = showGraphInfo(applet);
 createTiddlyElement(place,"span",null,null,graphInfo);
 }
 //Helper functions
 function valueInDateArray(dateArray,value){
 var key = -1;
 if (!(dateArray == null || dateArray == undefined)){
 for(var i = 0;i<dateArray.length;i++){
 if(dateArray[i][0] == value){
 key = i;
 break;
 }
 if(key >- 1)
 break;
 }
 }
 return key;
 }
 
 //Helper functions for tiddlers.
 function getModifiers(){
 var results = [];
 var tiddlers = store.getTiddlers("modifier","excludeLists");
 for(var i=0; i<tiddlers.length; i++){
 var modifier = tiddlers[i].modifier;
 var f = false;
 for(var j=0; j<results.length; j++){
 if(results[j]==modifier){
 f = true;
 break;
 }
 }
 if(!f)
 results.push(modifier);
 }
 results.sort(function (a,b) {if(a.toLowerCase() == b.toLowerCase()) return(0); else return (a.toLowerCase() < b.toLowerCase()) ? -1 : +1; });
 return results;
 }
 
 function getTimelineArray(){
 var field = "modified";
 var tiddlers = store.getTiddlers(field);
 var dates=[];
 for(var i=0; i<tiddlers.length; i++){
 var tiddler = tiddlers[i];
 var theDate = tiddler[field].convertToYYYYMMDDHHMM().substr(0,8);
 var theDay = tiddler[field].convertToYYYYMMDDHHMM().substr(6,2);
 var theMonth = tiddler[field].convertToYYYYMMDDHHMM().substr(4,2);
 var theYear = tiddler[field].convertToYYYYMMDDHHMM().substr(0,4);
 var yearKey=-1;
 var monthKey=-1;
 var dayKey=-1;
 yearKey=valueInDateArray(dates,theYear);
 if (yearKey==-1){
 dates.push(new Array(theYear,new Array()));
 yearKey = dates.length-1;
 }
 monthKey=valueInDateArray(dates[yearKey][1],theMonth);
 if (monthKey==-1){
 dates[yearKey][1].push(new Array(theMonth,new Array()));
 monthKey = dates[yearKey][1].length-1;
 }
 dayKey=valueInDateArray(dates[yearKey][1][monthKey][1],theDay);
 if (dayKey==-1){
 dates[yearKey][1][monthKey][1].push(new Array(theDay,new Array()));
 dayKey = dates[yearKey][1][monthKey][1].length-1;
 }
 dates[yearKey][1][monthKey][1][dayKey][1].push(tiddler.title); 
 }
 return dates;
 }
 
 function getXMLFilePath () {
 var originalPath = document.location.toString();
 // Remove any location part of the URL
 var hashPos = originalPath.indexOf("#");
 if(hashPos != -1)
 originalPath = originalPath.substr(0,hashPos);
 // Convert to a native file format assuming
 // "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
 // "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
 // "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
 // "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
 var localPath;
 var finalPath;
 if(originalPath.charAt(9) == ":"){ // pc local file
 localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
 finalPath = localPath.substr(0,localPath.lastIndexOf("\\")) + "\\";
 }else if(originalPath.indexOf("file://///") == 0){ // FireFox pc network file
 localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
 finalPath = localPath.substr(0,localPath.lastIndexOf("\\"))+ "\\";
 }else if(originalPath.indexOf("file:///") == 0) {// mac/unix local file
 localPath = unescape(originalPath.substr(7));
 finalPath = localPath.substr(0,localPath.lastIndexOf("/"))+ "/";
 }else if(originalPath.indexOf("file:/") == 0){ // mac/unix local file
 localPath = unescape(originalPath.substr(5));
 finalPath = localPath.substr(0,localPath.lastIndexOf("/"))+ "/";
 }else{ // pc network file
 localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\");
 finalPath = localPath.substr(0,localPath.lastIndexOf("\\"))+ "\\";
 }
 return finalPath;
 }
 
 function encodeString(str){
 return(str.replace(/\'/mg,"&apos;").replace(/</mg,"&lt;").replace(/>/mg,"&gt;").replace(/\"/mg,"&quot;"));
 //return(escape(str));
 }
 
 //Helper functions for hypergraph object.
 function showGraphInfo(appletName){
 try {
 var graphApplet = document.applets[appletName];
 var graph = graphApplet.getGraphPanel().getGraph();
 return "Graph " + appletName + ": has " + graph.getNodes().size() + " nodes and " + graph.getEdges().size() + " edges." 
 }catch (exception) {
 displayMessage(config.macros.hypergraph.messages.appletError.format([applet]) + exception.message);
 }
 }
 
 function centreTree(appletName){
 try {
 var graphApplet = document.applets[appletName];
 var graphPanel = graphApplet.getGraphPanel();
 var graph = graphPanel.getGraph();
 var tree = graph.getSpanningTree();
 var attrManager = tree.getAttributeManager();
 var root = attrManager.getAttribute(attrManager.GRAPH_ROOT, tree);
 graphPanel.centerNode(root);
 }catch (exception) {
 displayMessage(config.macros.hypergraph.messages.appletError.format([applet])+exception.message);
 }
 }
 
 function saveHypergraph() {
 if(!readOnly) {
 var localPath = getXMLFilePath();
 var graphXMLFile = config.options.txtHypergraphXMLfile;
 var localgraphXMLFile = "";
 
 //If config.options.txtHypergraphXMLfile starts with './' remove and use result.
 if (config.options.txtHypergraphXMLfile.indexOf("./") >= 0 ) {
 localgraphXMLFile = config.options.txtHypergraphXMLfile.replace(new RegExp("./","i"),"");
 if (localPath.lastIndexOf("\\") >= 0) {
 graphXMLFile = localgraphXMLFile.replace(new RegExp("/","g"),"\\");
 } 
 }
 var xmlGraphPath = localPath + graphXMLFile;
 var xmlGraphSave = saveFile(xmlGraphPath,convertUnicodeToUTF8(generateHypergraphXML()));
 if(xmlGraphSave){
 displayMessage(config.macros.hypergraph.messages.hypergraphXMLSaved,xmlGraphPath);
 if(!startingUp)
 refreshAll();
 } else {
 alert(this.messages.hypergraphXMLSavedError);
 }
 }
 }
 
 function generateHypergraphXML(){
 var hyperGraph = [];
 var d = new Date();
 var siteUrl = store.getTiddlerText("SiteUrl",null);
 // Assemble the header
 hyperGraph.push("<?xml version='1.0'?>");
 hyperGraph.push("<!DOCTYPE GraphXML SYSTEM '"+ config.macros.hypergraph.graphXMLPath +"'>");
 hyperGraph.push("<GraphXML xmlns:xlink='http://www.w3.org/1999/xlink/namespace/'>");
 hyperGraph.push("<graph id='tiddlymap' version='"+ version.extensions.hypergraph.major + "." + version.extensions.hypergraph.minor + "." + version.extensions.hypergraph.revision+"'>");
 hyperGraph.push("<style>");
 hyperGraph.push("<!-- Node styles -->");
 hyperGraph.push("<line tag='node' class='main' colour='"+ config.macros.hypergraph.node.main.colour +"'/>");
 hyperGraph.push("<line tag='node' class='group' colour='"+ config.macros.hypergraph.node.group.colour +"'/>");
 hyperGraph.push("<line tag='node' class='child' colour='"+ config.macros.hypergraph.node.child.colour +"'/>");
 hyperGraph.push("<line tag='node' class='tiddler' colour='"+ config.macros.hypergraph.node.tiddler.colour +"'/>");
 hyperGraph.push("<!-- Edge styles -->");
 hyperGraph.push("<line tag='edge' class='centre' colour='"+ config.macros.hypergraph.edge.centre.colour +"'/>");
 hyperGraph.push("<line tag='edge' class='tiddler' colour='"+ config.macros.hypergraph.edge.tiddler.colour +"' linestyle='"+ config.macros.hypergraph.edge.tiddler.lineStyle +"'/>");
 hyperGraph.push("<line tag='edge' class='shadowed' colour='"+ config.macros.hypergraph.edge.tiddler.shadowcolour+"' linestyle='"+ config.macros.hypergraph.edge.tiddler.lineStyle +"'/>");
 hyperGraph.push("</style>");
 //Root node
 hyperGraph.push("<node class='main' name='home'><label>Home</label><dataref><ref xlink:href='" + siteUrl +"'/></dataref><style><fill colour='#e0e0ff'/></style></node>");
 hyperGraph.push("<!-- Groups nodes and edges-->");
 
 var groupName=null;
 var groupLabel=null;
 var currentTiddler=null;
 var tiddlers=null;
 
 if (config.options.chkHypergraphMenugraphTiddlers) {
 groupName="tiddlers";
 groupLabel="Tiddlers";
 // generate tiddler nodes and edges.
 hyperGraph.push("<node class='group' name='"+groupName+"'><label>"+groupLabel+"</label><style><fill colour='"+ config.macros.hypergraph.node.group.fill +"'/></style></node><edge source='home' target='"+groupName+"'/>");
 //hyperGraph.push(generateHypergraphSections ("group",[groupName,groupLabel]);
 tiddlers = store.getTiddlers("title","excludeLists");
 for (var i=0; i<tiddlers.length; i++) {
 currentTiddler = encodeString(tiddlers[i].title);
 hyperGraph.push("<node class='tiddler' name='"+currentTiddler+"'><label>"+currentTiddler+"</label><dataref><ref xlink:href='javascript:story.displayTiddler(null,\""+currentTiddler+"\")' xlink:title='"+currentTiddler+"'/></dataref><style><fill colour='"+ config.macros.hypergraph.node.tiddler.fill +"'/></style></node><edge class='tiddler' source='"+ groupName +"' target='"+currentTiddler+"'/>");
 }
 }
 if (config.options.chkHypergraphMenugraphShadowed) {
 groupName="shadowtiddlers";
 groupLabel="Shadow Tiddlers";
 // generate shadow tiddler nodes and edges.
 hyperGraph.push("<node class='group' name='"+groupName+"'><label>"+groupLabel+"</label><style><fill colour='"+ config.macros.hypergraph.node.group.fill +"'/></style></node><edge source='home' target='"+groupName+"'/>");
 //hyperGraph.push(generateHypergraphSections ("group",[groupName,groupLabel]);
 tiddlers = store.getShadowed();
 for (var i=0; i<tiddlers.length; i++) {
 currentTiddler = encodeString(tiddlers[i]);
 hyperGraph.push("<node class='tiddler' name='"+currentTiddler+"'><label>"+currentTiddler+"</label><dataref><ref xlink:href='javascript:story.displayTiddler(null,\""+currentTiddler+"\")' xlink:title='"+currentTiddler+"'/></dataref><style><fill colour='"+ config.macros.hypergraph.node.tiddler.shadow +"'/></style></node><edge class='shadowed' source='"+ groupName +"' target='"+currentTiddler+"'/>");
 }
 }
 if (config.options.chkHypergraphMenugraphTags) {
 groupName="tags";
 groupLabel="Tags";
 // generate tag nodes and edges.
 hyperGraph.push("<node class='group' name='"+groupName+"'><label>"+groupLabel+"</label><style><fill colour='"+ config.macros.hypergraph.node.group.fill +"'/></style></node><edge source='home' target='"+groupName+"'/>");
 //hyperGraph.push(generateHypergraphSections ("group",[groupName,groupLabel]);
 var tags = store.getTags();
 for (var i=0; i<tags.length; i++) {
 var currentTag = tags[i][0];
 hyperGraph.push("<node class='child' name='"+currentTag+"'><label>"+tags[i]+"</label><dataref><ref xlink:href='javascript:story.displayTiddler(null,\""+currentTag+"\")' xlink:title='"+currentTag+"'/></dataref></node><edge class='centre' source='"+ groupName +"' target='"+currentTag+"'/>");
 if (config.options.chkHypergraphMenugraphTagged) {
 var taggedTiddlers;
 taggedTiddlers = store.getTaggedTiddlers(currentTag);
 if (!(taggedTiddlers == null || taggedTiddlers == undefined)) {
 var strTiddlers="";
 taggedTiddlersCount = taggedTiddlers.length-1;
 for (var j=0; j<taggedTiddlers.length; j++) {
 taggedTiddlerTitle = (taggedTiddlers[j].title);
 strTiddlers+=taggedTiddlerTitle;
 if (j<taggedTiddlersCount) {
 strTiddlers+=", ";
 }
 hyperGraph.push("<node class='tiddler' name='tagRef"+currentTag+taggedTiddlerTitle+"'><label>"+taggedTiddlerTitle+"</label><dataref><ref xlink:href='javascript:story.displayTiddler(null,\""+taggedTiddlerTitle+"\")' xlink:title='"+taggedTiddlerTitle+"'/></dataref><style><fill colour='"+ config.macros.hypergraph.node.tiddler.fill +"'/></style></node><edge class='tiddler' source='"+currentTag+"' target='tagRef"+currentTag+taggedTiddlerTitle+"'/>");
 }
 }
 }
 }
 }
 if (config.options.chkHypergraphMenugraphDates) {
 groupName="dates";
 groupLabel="Dates";
 // generate date nodes and edges.
 hyperGraph.push("<node class='group' name='"+groupName+"'><label>"+groupLabel+"</label><style><fill colour='"+ config.macros.hypergraph.node.group.fill +"'/></style></node><edge source='home' target='"+groupName+"'/>");
 //hyperGraph.push(generateHypergraphSections ("group",[groupName,groupLabel]);
 var dated= getTimelineArray();
 for (var years=0; years<dated.length; years++) {
 //create year node and edge.
 currentYear = dated[years][0];
 hyperGraph.push("<node class='group' name='"+currentYear+"'><label>"+currentYear+"</label><style><fill colour='"+ config.macros.hypergraph.node.group.fill +"'/></style></node><edge source='"+groupName+"' target='"+currentYear+"'/>");
 for (var months=0; months<dated[years][1].length; months++) {
 //create month node and edge.
 currentMonth = dated[years][1][months][0];
 hyperGraph.push("<node class='group' name='"+currentYear+currentMonth+"'><label>"+currentMonth+"</label><style><fill colour='"+ config.macros.hypergraph.node.group.fill +"'/></style></node><edge source='"+currentYear+"' target='"+currentYear+currentMonth+"'/>");
 for (var days=0; days<dated[years][1][months][1].length; days++) {
 //create day node and edge.
 currentDay = dated[years][1][months][1][days][0]
 hyperGraph.push("<node class='group' name='"+currentYear+currentMonth+currentDay+"'><label>"+currentDay+"</label><style><fill colour='"+ config.macros.hypergraph.node.group.fill +"'/></style></node><edge source='"+currentYear+currentMonth+"' target='"+currentYear+currentMonth+currentDay+"'/>");
 for (var tiddler=0; tiddler<dated[years][1][months][1][days][1].length; tiddler++) {
 //create tiddler node and edge.
 currentTiddler = encodeString(dated[years][1][months][1][days][1][tiddler]);
 hyperGraph.push("<node class='tiddler' name='dateRef"+currentTiddler+"' isMetanode='true'><label>"+dated[years][1][months][1][days][1][tiddler]+"</label><dataref><ref xlink:href='javascript:story.displayTiddler(null,\""+currentTiddler+"\")' xlink:title='"+currentTiddler+"'/></dataref></node><edge class='tiddler' source='"+currentYear+currentMonth+currentDay+"' target='dateRef"+currentTiddler+"'/>");
 }
 }
 }
 }
 }
 if (config.options.chkHypergraphMenugraphModifiers) {
 groupName="modified";
 groupLabel="ModifiedBy";
 // generate tiddler nodes and edges.
 hyperGraph.push("<node class='group' name='"+groupName+"'><label>"+groupLabel+"</label><style><fill colour='"+ config.macros.hypergraph.node.group.fill +"'/></style></node><edge source='home' target='"+groupName+"'/>");
 //hyperGraph.push(generateHypergraphSections ("group",[groupName,groupLabel]);
 var modifiers= getModifiers();
 for (var i=0; i<modifiers.length; i++) {
 hyperGraph.push("<node class='child' name='"+modifiers[i]+"'><label>"+modifiers[i]+"</label><dataref><ref xlink:href='javascript:story.displayTiddler(null,\""+modifiers[i]+"\")' xlink:title='"+modifiers[i]+"'/></dataref></node><edge class='centre' source='"+ groupName +"' target='"+modifiers[i]+"'/>");
 }
 }
 if (config.options.chkHypergraphMenugraphShadowed && config.options.chkHypergraphMenugraphTags) {
 //Metanode
 hyperGraph.push("<node class='child' name='refTabTags1' isMetanode='true'><label>Goto TabTags</label><dataref><ref xlink:href='#TabTags'/></dataref><style><fill xlink:href='./images/point.gif'/></style></node><edge class='centre' source='tags' target='refTabTags1' isDirected='true'/>");
 }
 // Close open tags
 hyperGraph.push("</graph>");
 hyperGraph.push("</GraphXML>");
 
 // Output xml.
 return hyperGraph.join("\n");
 }
}
//}}}
e.g.
{{{
class X {
  private int i = 0;
 void method() {
    final int x = 2;
   class Inner { i = x; }
} }
}}}
#can access parents class's public, protected, and private vairables
#can only access variables declared as ''final'' from enclosing method 
#cannot have static fields or methods (only top level classes can)
A java interface is like a [[abstract class]] with no concrete methods.

Only nested class can be marked with {{{static}}} to make them a Top Level Class.
Classes cannot be marked {{{protected, or private}}} 

The one and only {{{public}} class cannot be marked static, as its already a Top Level class
All interfaces are implicitly {{{public abstract}}} 
All methods must be and are implicitly {{{public}}}
All variables must be and are implicitly {{{public final static}}}
Interfaces can extend, but not implement.

{{{
   interface ABC { void abc(); )

   abstract class MyClass implements ABC {}   // VALID

   abstract class AnotherClass implements ABC
   { void abc() { } }    // INVALID - why ? All interface methods must be public.
}}}
{{{
System.getProperties()

apple.awt.graphics.UseQuartz=true
awt.nativeDoubleBuffering=true
awt.toolkit=apple.awt.CToolkit
file.encoding=MacRoman
file.encoding.pkg=sun.io
file.separator=/
gopherProxySet=false
java.awt.graphicsenv=apple.awt.CGraphicsEnvironment
java.awt.printerjob=apple.awt.CPrinterJob
java.class.path=......
java.class.version=49.0
java.endorsed.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/endorsed
java.ext.dirs=/Users/chris/Library/Java/Extensions:/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext
java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
java.io.tmpdir=/tmp
java.library.path=......
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version=1.5.0_06-112
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.5
java.vendor=Apple Computer, Inc.
java.vendor.url=http://apple.com/
java.vendor.url.bug=http://developer.apple.com/java/
java.version=1.5.0_06
java.vm.info=mixed mode, sharing
java.vm.name=Java HotSpot(TM) Client VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.vendor="Apple Computer, Inc."
java.vm.version=1.5.0_06-64
line.separator=

mrj.version=1040.1.5.0_06-112
os.arch=i386
os.name=Mac OS X
os.version=10.4.7
path.separator=:
sun.arch.data.model=32
sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptionHandler
sun.boot.class.path=.......
sun.boot.library.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries
sun.cpu.endian=little
sun.cpu.isalist=
sun.io.unicode.encoding=UnicodeLittle
sun.jnu.encoding=MacRoman
sun.management.compiler=HotSpot Client Compiler
sun.os.patch.level=unknown
user.country=GB
user.dir=/Users/chris/is/wsBranchForChris/iScoreMenuEdit
user.home=/Users/chris
user.language=en
user.name=chris
user.timezone=Europe/London
}}}
{{{File}}}  specifies an abstract path (filename/directory name ) {{{createNewFile}}} returns true if created, and false if it already existed.

{{{Reader/Writer}}} handles character io
{{{Stream}}} handles byte io.

BufferedReader adds {{{readLine()}}}
BufferedWriter adds {{{newline()}}}
PrintWriter adds {{{println, printf, }}} plus constructors from {{{File}}} and {{{String}}}

When an Object implements the Serializable interface its state can be saved to a sequence of bytes, this process is known as "flattening" and carried out by java.io.ObjectOutputStream. A "persistent" object is one that can be "flattened" and "inflated". java.io.ObjectInputStream is used to "inflate" "persistent" objects by reading a sequence of bytes representing the object and thus reinstating an objects state. 

{{{transient}}} fields are not serialised. 

Override {{{wirteObject}}}, {{{readObject}}} for custom serialization 

!Object Cache
Watch out for cached objects! For performance and as a guard against recursion, an object will only ever be written once to the output stream, even if {{{writeObject(obj)}}} is call multiple times on the same object, AND even if that object is modified in between calls. {{{ObjectOutputStream.reset()}}} can be called to clear the cache, or the stream can be closed and reopened, if the modified object has to be written.

!Version Control
{{{serialver [object.class]}}} displays an objects [[UUID]] eg.
{{{static final long serialVersionUUID = 102753947383495L;}}}

If the serialVersionUUID of a persist object dose not match with the empty object used for inflation then {{{java.io.InvalidClassException}}} will be thrown and the only solution is to use manual version control by including a matching UUID in the empty object.

!XML Serialisation
Because of version control problems XML serialisation exhibits advantages over the java.io.Serializable interface for long term persistence of object between different releases of a application, but is far less efficient because of its loquacious format.
 

{{{
public int compareTo(Object object)
{
   if (this== object)
      return 0;
  if (this > object)
     return 1;
  if  (this < object)
    return -1;
}
}}}

Contrast with [[java.util.Comparator]]
For this particular type of runtime checks, the Security Manager is clearly not involved. Nothing shows up in the StackTrace. It happens at a lower level, in the JVM itself. Makes sense now: it would be really inefficient to invoke the SecurityManager for every non-public method call… (and who’d check the calls to the SecurityManager itself!?).

But still, Why does it work with the java command, but fails within an applet?

To help with performance, the JVM only enforces these checks on classes loaded by custom classloaders. Classes loaded by the standard class loaders (bootstrap, extensions and System) are considered trusted. There are “levels” of trust actually, (bootstrap being the most trusted), but for this particular case, even the System (classpath) class loader trusted my class.

Note: this can allso happen when using [[javassit]] and recursively calling OpTier's {{{DynamicLauncher}}} !
{{{Thread.sleep(/*milliseconds 1sec/1000*/ );}}}

t.join
t.setPriority( 1 .. 10 )
Thread.sleep()
Thread.inturrupted() returns and clears the interrupted flag
Thread.yeild()

 Thread.State
|NEW| |
|RUNNABLE| |
|WAITING| Thread.join, this.wait() |
|TIMMED_WAITING| this.wait(milliseconds) |
|BLOCKED| sychronized(object)  |

synchronized 

[[Pattern: Orphaned Thread bug]]
To find a method using a primitive array:

{{{
Method method_setOttiByteContext = InvocationEvent.class.getMethod(METHOD_NAME__SET_OTTI_BYTE_CONTEXT, new Class[] { byte[].class });

}}}
Open a server socket, forever: accept connection, read, write, and close socket

{{{
int port = 8055;
ServerSocket serverSocketIn = new ServerSocket(port);

while(true)
{
try { Socket =s serverSocketIn.accept();
}}}
 see [[java.net.Socket]] to read/write 
{{{
}
catch (IOException e) { }
}}}
Open a socket, write a message, read reply, and close connection.
{{{

final String EOL = "\n\r";
String toSend = "Message"+EOL;

Socket socket = new Socket(url.getHost(),url.getPort());
OutputStream out = socket.getOutputStream();
out.write(toSend.getBytes());
out.flush();


BufferedReader in = new BufferedReader(
 new InputStreamReader(socket.getInputStream()));

String reply = in.readLine();

socket.close();
}}}
see [[RMI]]

java.rmi.Remote - all remote objects extend this
java.rmi.RemoteException - all methods of a remote object throw this


If RMI uses a socket factory then UnicastRef2 otherwise UnicastRef for the transport.

Here is a good doc to look at http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-server9.html
The ''Collection'' interface implements {{{Iterable<E>}}}

Map is not a Collection! Why ? A map is not Iterable.

see [[collections]]
{{{
public int compare(Object aObject, Object bObject)
{
  Integer a = (Integer) aObject;
  Integer b = (Integer) bObject;
   if (a== b)
      return 0;
  if (a > b)
     return 1;
  if  (a < b )
    return -1;
}
}}}

Contrast with [[java.lang.Comparable]]
{{{java.lang.Date}}} represents a time zone intendant time stamp. Many of the convenience routines have been deprecated, for improved internationalization support, and simplified date manipulation through

[[java.lang.Local]] {{{getDefault(), new Local(String language,String country)}}}
[[java.text.DateFormat]] {{{getInstance( [SHORT, MEDIUM, LONG, ALL] , local); df.format(Date) }}}
[[java.lang.Calender]] {{{getInstance()}}}

 
Ideal for keeping references to object that ones dose not control the object life cycle for.

The key is a [[java.lang.ref.WeakReference]]
Whereas value is a normal strong binding.

A weak reference is a reference to an object that dose not count towards it being kept from being garbage collected. A normal strongly bound object will be kept until there is no references made to it.

<<tag jsptip>>
<<tag javascripttip>>

http://www.hunlock.com/blogs/Essential_Javascript_--_A_Javascript_Tutorial  Well worth looking at
{{{
	public static void main(String[] args) {
		 Properties props = new Properties();
		    props.put("mail.smtp.host", "library.undadog.co.uk");
		    props.put("mail.from", "help@nkdwines.com");
		    props.put("mail.debug", "true");

		    Session session = Session.getInstance(props, null);

		    try {
		        MimeMessage msg = new MimeMessage(session);
		        msg.setFrom();
		        msg.setRecipients(Message.RecipientType.TO,
		                          "christopher.ashley@nkdwines.com");
		        msg.setSubject("Where is my JavaMail hello world example");
		        msg.setSentDate(new Date());
		        msg.setText("Hello, world!\n");
		        Transport.send(msg);
		    } catch (MessagingException mex) {
		        System.out.println("send failed, exception: " + mex);
		    }
}}}
{{{-Dlog4j.debug}}} will then print info to standard output telling you how it is trying ot configure itself

example config files:
log4j.properties or log4j.xml or logger.properties

e.g. 
{{{
-Dlog4j.configuration=file://${OPTIER_HOME}/corefirst/conf/logger.properties
}}}
<html><div><applet class='sitemap' align='baseline' code='hypergraph.applications.hexplorer.HExplorerApplet.class' name = 'mainMenuApplet' archive='./common/hyperapplet-0.6.3.jar' width='100%' height='200'> <param name='file' value='./graphs/tiddlerMap.xml'></applet></div></html>
!native
Java Native Interface [[JNI]] defines the {{{native}}} keyword to inform the Java compiler that a method is provided by another language.

{{{
private native void doSomethingInC();
}}}

Note its only applicable to methods. There are no {{{native}}} classes, member variables, or static variables.
chars are treated the same as numbers.

{{{String s = 'a' + 10; System.out.println(s);}}} Prints 107
An ''option'' is a transaction with the right but not the obligation to ''exercise'' the transaction at future date.

[[call option]] is the right to buy.
[[put option]] is the right to sell.

*[[European option]] 
*[[Bermudan option]]
*[[American option]]
*[[Asian option]]
*[[Hawaiian option]]
*[[Barrier option]] the underlying security's price must reach some trigger level before the exercise can occur.
To find instrumentation points, print the stack trace to a file and then use [[JAD]] to decompile classes further up the stack.
{{{
java.io.File f = new java.io.File("c:\\temp\\stacktrace.txt");
java.io.FileWriter fWriter = new java.io.FileWriter(f,/*append*/true);
java.io.PrintWriter pWriter = new java.io.PrintWriter(fWriter);
(new java.lang.Exception("Test")).printStackTrace(pWriter);
pWriter.close();
fWriter.close();
}}}
To override is to change the behavior of a superclass, by matching a methods signature and providing a new body.

In Java, an overridden method can reduce the scope of the return parameter and the checked exception raised, and increase the scope of its visibility.
{{{

import java.io.FileNotFoundException;

class Return{ }

class ReturnSubclass extends Return { }

class A 
{
  protected Return a() throws FileNotFoundException { return new Return(); }
}

public class Override {
  // Widens access , dose not throw exception, and narrows the return
  public ReturnSubclass a() { return new ReturnSubclass(); }
	
  // NOTE classes narrowing the return of checked exception, must be subclasses of the original method's signature
}


}}}

Watch out for implicit public for method in interfaces
{{{
interface Tricky { void method(int i); }

class opps implements Tricky
{
	void method(int i) { }   // ERROR "public" is missing 
}
}}}
grant {
// Allow everything for now
permission java.security.AllPermission;
};
A put option is the right to sell at the excise price, but not the obligation.

The buyer of this options wants the underlying price to fall to be in the money.

[[pay off]] = max[(K − S) ; 0] 

Where K is the [[strike price]] and S is the [[spot price]].

[img[http://upload.wikimedia.org/wikipedia/en/d/d1/PutOption.png]]
Problems with singletons

# Is too much like global variables 
# Order of elaboration is unknown, especially when used by threads. 
# Testing, its more difficult/impossible to create mock objects for unit testing.
# No knowing where a singleton will be used.
SQRT(x)=x^1/2
Secure Shell


/usr.bin/keychain provides ong running ssh-agent
{{{
# first, upload public key from client to server
client$ scp ~/.ssh/id_rsa.pub server.example.org:

# next, setup the public key on server
server$ mkdir ~/.ssh
server$ chmod 700 ~/.ssh
server$ cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
server$ chmod 600 ~/.ssh/authorized_keys
server$ rm ~/id_rsa.pub
}}}
A common [[derivative]] contract where two parties agree to exchange streams of cash flows. Each ''stream'' is known as a ''leg''.

Test NG (Next Generation)

Very similar to JUnit, except uses java 1.5 annotations and removes the needs to inherit off of a test class.

Simple to use, with support for both ant and eclipse.

{{{
@Test( groups = { "all", "batch" }
class MyTest
{
  void test1() { Assert.assertTrue(true); }
  void test2() { Assert.assertTrue(true); }
}
}}}

Java threads.

A thread is serialised sequence of instructions, which might be happening concurrently with another thread with its own serialised sequence of instructions. On a single processor only one thread at a time can physically be running but via a context switch the processor can arbitrarily switch between the two giving the appearance of simultaneous execution.

A thread also has life cycle and states which effects if it will be run:

1. NEW (not started)
2. RUNNABLE  (may be running)
3. WAITING or TIMED_WAITING or BLOCKED (not running)
4. TERMINATED (finished)

Thread.sleep(x);
Thread.yeild();
t.join();



The trick is to loop throw a row's cell by tag name 'input' and then checking attribute type
{{{
var table= document.getElementById('orderLineContentsTable');

	for (var r = 1; r < table.rows.length; r++)
	{
		var inputelements = table.rows[r].cells[RETURN_QUANTITY_COLUMN].getElementsByTagName('input');
	    var maxj = inputelements.length;
	    for(j = 0; j < maxj; j++)
	    {
			var costPrice;

			if(inputelements[j].getAttribute('type') == 'hidden') {
				costPrice =  new Number(inputelements[j].value)
			}
			
	        if(inputelements[j].getAttribute('type') == 'text') {
				var returnQuantity = new Number(inputelements[j].value);
				var rtnPriceCell = table.rows[r].cells[RETURN_PRICE_COLUMN];
				rtnPriceCell.innerHTML = '£' + (returnQuantity * costPrice);
	        }
	    } 
}}}
To set say Neo Office as your default editor for word documents:

1. In the finder select a {{{.doc}}} file 
2. press command-i to open the info dialog
3. In the {{{Open With}}} panel select NeoOffice.
4. Click {{{change all..}}}
5. confirm.