<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
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]];}

	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]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#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]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}

#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 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 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:0 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 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

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

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

.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding: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 0;}
.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 0 0 0.5em;}
.tab {margin:0 0 0 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 0 14em;}

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

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

.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:0 0.25em; padding:0 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 0; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin: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;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding: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 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;}
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox where print preview displays the noscript content */
<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 class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
<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 id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></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 [[ToolbarCommands::EditToolbar]]'></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 excludeLists'></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]]
I am currently pursuing an undergraduate degree in physics at [[LUMS|http://lums.edu.pk]], trying to play lots of football, and doing some other really cool stuff you can find out about in about 2020.

My interests range from rationality to football to physics to leadership to computers to music. I hold strong opinions on everything from the nature of the universe to the best ball points to work with, and plan to write on some of them pretty soon.

What I have already written can be found in [[Writings]].

If you are interested, you can check out my [[Curriculum Vitae]].

If you would like to contact me please check [[Contact]].

This website is a [[TiddlyWiki]]. Please check [[TiddlyWiki]] and [[MPTW]] if you intrigued.
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|Description|Add checkboxes to your tiddler content|
This plugin extends the TiddlyWiki syntax to allow definition of checkboxes that can be embedded directly in tiddler content.  Checkbox states are preserved by:
* by setting/removing tags on specified tiddlers,
* or, by setting custom field values on specified tiddlers,
* or, by saving to a locally-stored cookie ID,
* or, automatically modifying the tiddler content (deprecated)
When an ID is assigned to the checkbox, it enables direct programmatic access to the checkbox DOM element, as well as creating an entry in TiddlyWiki's config.options[ID] internal data.  In addition to tracking the checkbox state, you can also specify custom javascript for programmatic initialization and onClick event handling for any checkbox, so you can provide specialized side-effects in response to state changes.
>see [[CheckboxPluginInfo]]
2008.01.08 [*.*.*] plugin size reduction: documentation moved to [[CheckboxPluginInfo]]
2008.01.05 [2.4.0] set global "window.place" to current checkbox element when processing checkbox clicks.  This allows init/beforeClick/afterClick handlers to reference RELATIVE elements, including using "story.findContainingTiddler(place)".  Also, wrap handlers in "function()" so "return" can be used within handler code.
|please see [[CheckboxPluginInfo]] for additional revision details|
2005.12.07 [0.9.0] initial BETA release
version.extensions.CheckboxPlugin = {major: 2, minor: 4, revision:0 , date: new Date(2008,1,5)};
config.checkbox = { refresh: { tagged:true, tagging:true, container:true } };
config.formatters.push( {
	name: "checkbox",
	match: "\\[[xX_ ][\\]\\=\\(\\{]",
	lookahead: "\\[([xX_ ])(=[^\\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) {
			// get params
			var checked=(lookaheadMatch[1].toUpperCase()=="X");
			var id=lookaheadMatch[2];
			var target=lookaheadMatch[3];
			if (target) target=target.substr(1,target.length-2).trim(); // trim off parentheses
			var fn_init=lookaheadMatch[4];
			var fn_clickBefore=lookaheadMatch[5];
			var fn_clickAfter=lookaheadMatch[6];
			var tid=story.findContainingTiddler(w.output);  if (tid) tid=tid.getAttribute("tiddler");
			var srctid=w.tiddler?w.tiddler.title:null;
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
} );
config.macros.checkbox = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		if(!(tiddler instanceof Tiddler)) { // if no tiddler passed in try to find one
			var here=story.findContainingTiddler(place);
			if (here) tiddler=store.getTiddler(here.getAttribute("tiddler"))
		var srcpos=0; // "inline X" not applicable to macro syntax
		var target=params.shift(); if (!target) target="";
		var defaultState=params[0]=="checked"; if (defaultState) params.shift();
		var id=params.shift(); if (id && !id.length) id=null;
		var fn_init=params.shift(); if (fn_init && !fn_init.length) fn_init=null;
		var fn_clickBefore=params.shift();
		if (fn_clickBefore && !fn_clickBefore.length) fn_clickBefore=null;
		var fn_clickAfter=params.shift();
		if (fn_clickAfter && !fn_clickAfter.length) fn_clickAfter=null;
		var refresh={ tagged:true, tagging:true, container:false };
	create: function(place,tid,srctid,srcpos,defaultState,id,target,refresh,fn_init,fn_clickBefore,fn_clickAfter) {
		// create checkbox element
		var c = document.createElement("input");
		c.srctid=srctid; // remember source tiddler
		c.srcpos=srcpos; // remember location of "X"
		c.container=tid; // containing tiddler (may be null if not in a tiddler)
		c.tiddler=tid; // default target tiddler 
		c.refresh = {};
		c.refresh.container = refresh.container;
		c.refresh.tagged = refresh.tagged;
		c.refresh.tagging = refresh.tagging;
		// set default state
		// track state in config.options.ID
		if (id) {
			c.id=id.substr(1); // trim off leading "="
			if (config.options[c.id]!=undefined)
		// track state in (tiddlername|tagname) or (fieldname@tiddlername)
		if (target) {
			var pos=target.indexOf("@");
			if (pos!=-1) {
				c.field=pos?target.substr(0,pos):"checked"; // get fieldname (or use default "checked")
				c.tiddler=target.substr(pos+1); // get specified tiddler name (if any)
				if (!c.tiddler || !c.tiddler.length) c.tiddler=tid; // if tiddler not specified, default == container
				if (store.getValue(c.tiddler,c.field)!=undefined)
					c.checked=(store.getValue(c.tiddler,c.field)=="true"); // set checkbox from saved state
			} else {
				var pos=target.indexOf("|"); if (pos==-1) var pos=target.indexOf(":");
				if (pos==0) c.tag=target.substr(1); // trim leading "|" or ":"
				if (pos>0) { c.tiddler=target.substr(0,pos); c.tag=target.substr(pos+1); }
				if (!c.tag.length) c.tag="checked";
				var t=store.getTiddler(c.tiddler);
				if (t && t.tags)
					c.checked=t.isTagged(c.tag); // set checkbox from saved state
		// trim off surrounding { and } delimiters from init/click handlers
		if (fn_init) c.fn_init="(function(){"+fn_init.trim().substr(1,fn_init.length-2)+"})()";
		if (fn_clickBefore) c.fn_clickBefore="(function(){"+fn_clickBefore.trim().substr(1,fn_clickBefore.length-2)+"})()";
		if (fn_clickAfter) c.fn_clickAfter="(function(){"+fn_clickAfter.trim().substr(1,fn_clickAfter.length-2)+"})()";
		c.init=true; c.onclick(); c.init=false; // compute initial state and save in tiddler/config/cookie
	onClickCheckbox: function(event) {
		if (this.init && this.fn_init) // custom function hook to set initial state (run only once)
			{ try { eval(this.fn_init); } catch(e) { displayMessage("Checkbox init error: "+e.toString()); } }
		if (!this.init && this.fn_clickBefore) // custom function hook to override changes in checkbox state
			{ try { eval(this.fn_clickBefore) } catch(e) { displayMessage("Checkbox onClickBefore error: "+e.toString()); } }
		if (this.id)
			// save state in config AND cookie (only when ID starts with 'chk')
			{ config.options[this.id]=this.checked; if (this.id.substr(0,3)=="chk") saveOptionCookie(this.id); }
		if (this.srctid && this.srcpos>0 && (!this.id || this.id.substr(0,3)!="chk") && !this.tag && !this.field) {
			// save state in tiddler content only if not using cookie, tag or field tracking
			var t=store.getTiddler(this.srctid); // put X in original source tiddler (if any)
			if (t && this.checked!=(t.text.substr(this.srcpos,1).toUpperCase()=="X")) { // if changed
				if (!story.isDirty(t.title)) story.refreshTiddler(t.title,null,true);
		if (this.field) {
			if (this.checked && !store.tiddlerExists(this.tiddler))
				store.saveTiddler(this.tiddler,this.tiddler,"",config.options.txtUserName,new Date());
			// set the field value in the target tiddler
			// DEBUG: displayMessage(this.field+"@"+this.tiddler+" is "+this.checked);
		if (this.tag) {
			if (this.checked && !store.tiddlerExists(this.tiddler))
				store.saveTiddler(this.tiddler,this.tiddler,"",config.options.txtUserName,new Date());
			var t=store.getTiddler(this.tiddler);
			if (t) {
				var tagged=(t.tags && t.tags.indexOf(this.tag)!=-1);
				if (this.checked && !tagged) { t.tags.push(this.tag); store.setDirty(true); }
				if (!this.checked && tagged) { t.tags.splice(t.tags.indexOf(this.tag),1); store.setDirty(true); }
			// if tag state has been changed, update display of corresponding tiddlers (unless they are in edit mode...)
			if (this.checked!=tagged) {
				if (this.refresh.tagged) {
					if (!story.isDirty(this.tiddler)) // the TAGGED tiddler in view mode
					else // the TAGGED tiddler in edit mode (with tags field)
				if (this.refresh.tagging)
					if (!story.isDirty(this.tag)) story.refreshTiddler(this.tag,null,true); // the TAGGING tiddler
		if (!this.init && this.fn_clickAfter) // custom function hook to react to changes in checkbox state
			{ try { eval(this.fn_clickAfter) } catch(e) { displayMessage("Checkbox onClickAfter error: "+e.toString()); } }
		// refresh containing tiddler (but not during initial rendering, or we get an infinite loop!) (and not when editing container)
		if (!this.init && this.refresh.container && this.container!=this.tiddler)
			if (!story.isDirty(this.container)) story.refreshTiddler(this.container,null,true); // the tiddler CONTAINING the checkbox
		return true;
	refreshEditorTagField: function(title,tag,set) {
		var tagfield=story.getTiddlerField(title,"tags");
		if (!tagfield||tagfield.getAttribute("edit")!="tags") return; // if no tags field in editor (i.e., custom template)
		var tags=tagfield.value.readBracketedList();
		if (tags.contains(tag)==set) return; // if no change needed
		if (set) tags.push(tag); // add tag
		else tags.splice(tags.indexOf(tag),1); // remove tag
		for (var t=0;t<tags.length;t++) tags[t]=String.encodeTiddlyLink(tags[t]);
		tagfield.value=tags.join(" "); // reassemble tag string (with brackets as needed)
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
You can contact me at 	firstname [dot] lastname [dot] s [at] gmail .

I am active on facebook, but I generally never add people who I have not talked personally to at least once.
//July 18, 2011//
//Posted at: [[http://theboxmove.weebly.com/1/post/2011/08/crop-rag-hearts.html]]//

'Go rap her carts.'
'Strap her cargo.'
'Crop rag hearts.'
'Chop Ra's garter.'

The first is what Karim from Kamila Shamsie's Kartography wanted to be. The others a rearrangement of the word that he and Raheen made up. Both are important to the story, I mean cartography and anagrams. The whole story is an anagram of sorts, you can dissect it in so many different ways, arranging and rearranging the parts, giving importance here, disregarding there, and every time coming up with something that makes some sense.

Yet, I have a feeling I didn't quite make the anagram that Kamila Shamsie really meant the story to be, and that makes total complete sense. If she meant a particular anagram that is. Perhaps the strength of the story lies in the fact that even though each anagram makes only some sense on it's own, together they all form a cohesive whole that gets the idea across.

Which idea anyways? There are so many. The blurb at the back made me start off by trying to read it as a love story. Clearly, I should have postponed my judgement. There were strains of adolescent love, of a friendship I could not find a parallel of in my own life, and the mysteries of the swapped fiances was enough to keep me hooked.

The story turned out to be more about Pakistan and it's heart of sorts Karachi. It was about the break up of the country. It put it more eloquently than ever, 'How can Pakistan still be when the whole is gone and  we are left with a part?' I have never really read about the breakup outside of government prescribed textbooks. To see it enacted of sorts in fiction, to see people I could believe existed play out parts, was a chilling experience.

Statistics have a horrible way of distorting reality. They reduce people to numbers. Stories too distort reality, but in a different way. They don't reduce people to numbers, rather ignore most of them and speak to us of the lives of only a few. The good stories make us feel. Kartography made me feel. It made me feel the pressure people lived in, the loss of life and how it affected those who stayed on. 

Then again, I could have felt more. For some reason or the other, Pakistani writers have a habit of writing about a class of people who don't exist. The ten thousand strong elites of the country, the ones who go to binge drinking parties, who travel back and forth across the world, who have 'contacts', who have millions hidden in their bank accounts, are lost to me among the teeming one eighty million strong that make up this country. In all my life, I haven't actually seen any of these people. Few of us ever do. They do exist. They exist in the sense that perhaps they do control the country. They really are richer than the rest of the country put together.

My question is, do they define Pakistan? Do they get to be the ones who we picture in our heads when we think of a Pakistani? How is the life of a typical Pakistani, and that of an 'elite'? Kamila Shamsie, Mohsin Hamid, Mohammad Hanif, food for thought?

The love story in Kartography came back in the later half. Inspiring as it was, I couldn't remove the nagging thought at the back of my mind, isn't this slightly overmuch melodramatic? Love is melodramatic. In the common lives around me, I see it everyday. To be human, love and drama always go together. Yet, there are always moments of sanity that seemed missing from Kartography. Perhaps, she glossed over those moments, in the same way she glossed over the one eighty million strong. I was sad. I wanted the anagram of love to touch me. I tried to draw parallels with my own life. Kamila Shamsie turned out to be a bad cartographer. Her map corresponded little with the reality of my life, and I was lost soon after the magic of adolescent love.

Three anagrams I saw I have mentioned here. I think the anagram of the break up of Pakistan would last with me the longest. The chills I felt down my spine, I know will stay for a long time. Pakistan is perhaps worse off then the times this story was written about. Kartography doesn't bog you down, it doesn't just make you sad. It gives you strength. By making you feel it, it hardens your resolve to fix it all. It never comes out and says it. I doubt if Kamila Shamsie had this in mind when she wrote it. Her words, unconsciously, anagram into this message too. We have suffered enough in the past on one occasion. Let there be no repeat, the anagram says. Fix it, it says. 
|''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);
	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);

Abdullah Khalid
452 AA Phase IV,
D.H.A. Lahore Cantt.,
Lahore, Pakistan
+92 332 439 4833

B.S. Physics, Lahore University of Management Sciences, School of Science and Engineering, 2008 - (2012).
GCSE A Levels, Resource Academia, 2006 - 2008.
GCSE O Levels, The Lahore Alma, 2003 - 2006.

• Domestic Concentrated Solar Thermal Co-generation Plants for Pakistan. Senior Project. Dr. Sabieh Anwar,
Nauman Zaffar. Fall 2011 - Spring 2012.
• A Genetic Algorithm for Finding Pulse Sequences for NMR Quantum Computing. Computational Physics.
Dr. Fakharul Inam. Spring 2012.
• Bayesian Inference and Model Selection in Cosmology. Topics in Applied General Relativity and Astro-
physics. Dr. Babar Qureshi. Spring 2012.
• The Success of Guerrilla Warfare in Cuba. Debating Revolutions. Dr. Ali Nobil Ahmad. Spring 2012.
• The Role of Structure vs Agency in Revolutions. Debating Revolutions. Dr. Ali Nobil Ahmad. Spring 2012.
• Interactive Region-Based Linear 3D Face Models. Computer Vision Fundamentals. Dr. Sohaib Khan. Fall
• Observing the Quantum Nature of Light Using Single Photon Detection and Correlation. Experimental
Physics III. Dr. Sabieh Anwar. Spring 2011.
• A Gentle Introduction to Quantum Computing. Independent Study. Dr. Sabieh Anwar. Spring 2011.
• Shor’s Algorithm - The End of RSA. Mathematical Cryptography. Dr. Arif Zaman. Spring 2011.
• The Maximum Entropy Formalism of Statistical Mechanics. Statistical Mechanics. Dr. Babar Qureshi. Fall
• Construction of a Geiger-Muller Tube Counter. Introductory Electronics Laboratory. Dr Abubakr Muham-
mad. Fall 2010.
• Romanticism and Pragmatism in Pride and Prejudice. Introduction to English Literature. Dr. Saeed Ghazi.
Spring 2010.
• A Traffic Simulation using Matlab. Problem Solving Using Computers. Dr. Arif Zaman. Dr. Sohaib Khan.
Winter 2008.
Poster Presentations
• Abdullah Khalid, Hassan Bukhari. Domestic Concentrated Solar Thermal Co-generation Plants for Pakistan.
Conference on Pakistan’s Energy Options: Technology, Availability, Affordability, and the Role of Regional
Grids. Islamabad, Pakistan, 20-21 March, 2012.

Teaching Assistantships
• Mechanics. Dr. Pervez Hoodbhoy. Fall 2011.
Responsible for conducting tutorials, writing homework solutions and checking assignments
• Electricity and Magnetism. Dr. Pervez Hoodbhoy. Spring 2011.
Responsible for conducting tutorials, writing homework solutions and checking assignments
• Calculus 1. Dr. Irfan Ullah Chaudhary. University of Engineering and Technology. Fall 2010.
Responsible for writing solutions to assignments.

Important Courses
• Problem Solving using Computers
• Discrete Mathematics (audit)
• Introduction to Programming (audit)
• Mathematical Cryptography
• Computer Vision Fundamentals

Conferences Attended
• Conference on Pakistan’s Energy Options: Technology, Availability, Affordability, and the Role of Regional
Grids. Islamabad, Pakistan, 20-21 March, 2012.
• Startup Weekend Lahore. Lahore University of Management Sciences, Lahore. February 17-19, 2012. Top
fifteen startup ideas reached.
• YGL Indo-Pak Cooperation Initiative, Climate Change and Disaster Risk Management - Managing Risks:
Sharing Benefits. Lahore University of Management Sciences, Lahore. July 08-09, 2011.
• National Symposium on Quantum Information Processing. COMSATS Institute of Information Technol-
ogy, Islamabad. April 09, 2011.
• International Conference on Water Resources Engineering and Management. University of Engineering and
Technology, Lahore. March 7-8, 2011.
• Conference on General Relativity and Gravitation. Punjab University, Lahore. February 11-13, 2010.

• Member, LUMS Boxing team. 2011 - 2012.
• Member, Society for Promotion and Development of Engineering and Sciences (SPADES). 2009 - 2012.
• Member, LUMS parliamentary debating team. 2009.
• Head of Student Council, Resource Academia. 2007 - 2008.
• Sports Secretary, The Lahore Alma. 2005 - 2006.

• Abdullah Khalid. "Mathematical Adventures in Wonderland". The Box Move. Issue 1. Vol 1.
• Abdullah Khalid. "Renovation Required". The Box Move. Issue 1. Vol 1.
• Contributor to the popular science blog The Box Move.

Academic Honors
• NSTC - 4 - Physics, training sessions. International Physics Olympiad, 2008.
• A Levels. 4 As, 1B.
• O Levels. 7 As, 1 B.

Professional Associations
• Alumni, National Science Talent Contest.
Organization responsible for selecting and training the national team for IPhO, IMO etc.
Volunteer for recruiting and training new students.

Community Service
• Taught underprivileged schools for one month with CARE. Lahore, Pakistan. Summer 2007.
Last updated: May 14, 2012
[[Abdullah Khalid]]
Ahmed Umer Ashraf, Link will appear when he makes it public.
[[Muhammad Haris Baig|http://mohammadharisbaig.weebly.com/index.html]]
[[Syed Ali Raza|http://saliraza.weebly.com/index.html]]
*[[Eliezer Yudkowsky|http://yudkowsky.net/]]
*[[Robin Hanson|http://www.overcomingbias.com/]]
*[[Paul Graham|http://www.paulgraham.com/index.html]]
*Richard Feynman
|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) $|
|Author:|Simon Baird <simon.baird@gmail.com>|
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) {


	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);



//March 21, 2011//

Injuries and love for sports don't go together. There you are, playing the game you love, the game you eat, sleep, breathe and live every second of your life and then you get injured. Ah! The torture of it all. To be able to live but to not play the game. They say that the lost lover is the worst torture of all. I have experienced lost lovers and I have experienced injuries, and I tell you, not being able to play the game is much much worse. All you dream about all day is the time when you will return to the field and weave your magic again. How you will play the game the way it is meant to be played. Where you will respect and be respected. Your body screams and whines, asking you to give in and just go onto the field. You resist the temptation, the hardest treat you can deny yourself. It takes every ounce of your will to do it, but you do it because deep down you know that a game today will cost you another few months of off the field time - maybe more. You are the sportsman. You carry yourself with discipline and honor. You do what is necessary to play the game right.

Those months, when everyday is a fight. You go to sleep, you dream about you on the field. You think it's the real world and you start to feel guilty about playing. You struggle with yourself, trying desperately to pull yourself off the field. The game tempts you. You are caught in a trap. Then finally, discipline wins. You pull yourself away. You wake up with a start, all sweaty, almost panting from the fight. A few moments you don't know where you are. Then reality catches on. Your tensed body relaxes a little, but not enough. You turn over and try to go to sleep again. You lay awake, contemplating the day you will truly return to the field.

Weeks have passed. You have had enough. You decide it's time to test out. A light jog will decide the progress on the injury. You have never gone to the doctor, because the he might tell you you can never play again. You think the fool's hope is better than the idea of never being able to work the magic again. But it's not that simple. You spend a week in contemplation. Planning the run. You think about your gear. You consider your sleeping routine, trying to align the peak of your daily cycle with the time of your run. You consider the food you are taking. You push yourself to eat more healthy. A few more vegetables, a few more fruits here and there. You think what you will do if there is no pain. You think about what you will do if there is pain. You run through all the possibilities in your head, thinking and contemplating. You picture the best case scenario and the worst case.  An hour or so before the run, you go off alone by yourself. You dream some more. You do some more thinking. You prepare yourself a bit more. You stare up at the moon and bask in it's beauty. You go and put on your gear. You walk to the jogging field. You put some music on your mobile.

You start jogging...
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
>see [[InlineJavascriptPluginInfo]]
2008.06.11 [1.9.3] added $(...) function as 'shorthand' convenience syntax for document.getElementById()
2008.03.03 [1.9.2] corrected declaration of wikifyPlainText() for 'TW 2.1.x compatibility fallback' (fixes Safari "parse error")
2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' attribute on link element (fixes IE errors)
2008.02.21 [1.9.0] 'onclick' scripts now allow returned text (or document.write() calls) to be wikified into a span that immediately follows the onclick link.  Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed).  Thanks to Xavier Verges for suggestion and preliminary code.
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
version.extensions.inlineJavascript= {major: 1, minor: 9, revision: 3, date: new Date(2008,6,11)};

config.formatters.push( {
	name: "inlineJavascript",
	match: "\\<script",
	lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",

	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) {
			var src=lookaheadMatch[1];
			var label=lookaheadMatch[2];
			var tip=lookaheadMatch[3];
			var key=lookaheadMatch[4];
			var show=lookaheadMatch[5];
			var code=lookaheadMatch[6];
			if (src) { // load a script library
				// make script tag, set src, add to body to execute, then remove for cleanup
				var script = document.createElement("script"); script.src = src;
				document.body.appendChild(script); document.body.removeChild(script);
			if (code) { // there is script code
				if (show) // show inline script code in tiddler output
				if (label) { // create a link to an 'onclick' script
					// add a link, define click handler, save code in link (pass 'place'), set link attributes
					var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
					var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
					link.code="function _out(place){"+fixup+"\n};_out(this);"
						try{ var r=eval(this.code);
							if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
								var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
							if((typeof(r)==="string")&&r.length) {
								return false;
							} else return r!==undefined?r:false;
						} catch(e){alert(e.description||e.toString());return false;}
					var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
					URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
					if (key) link.accessKey=key.substr(0,1); // single character only
				else { // run inline script code
					var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
					var code="function _out(place){"+fixup+"\n};_out(w.output);"
					try { var out=eval(code); } catch(e) { out=e.description?e.description:e.toString(); }
					if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
} )

// // Backward-compatibility for TW2.1.x and earlier
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
	if(limit > 0) text = text.substr(0,limit);
	var wikifier = new Wikifier(text,formatter,null,tiddler);
	return wikifier.wikifyPlain();

// // $(...) function: 'shorthand' convenience syntax for document.getElementById()
if (typeof($)=="undefined") { // avoid redefinition
function $() {
	var elements=new Array();
	for (var i=0; i<arguments.length; i++) {
		var element=arguments[i];
		if (typeof element=='string') element=document.getElementById(element);
		if (arguments.length==1) return element;
	return elements;
//February 21, 2011//

She was always strong, always far out of reach, never... Yet he loved her. Her heart always was closed, to him and to everyone around her. Yet he loved her. Only once she revealed himself to him. It was a moment of weakness that should not have been. It did happen. She revealed himself to him. His heart overflowed with even more love for her, deeper and stronger than ever before. Yet, she was not to be. The same loving heart told him that died and was reborn in love again and again like the phoenix. The debate ever happened in his heart. Tired he was, doubting and considering if he should go on. He stood at the cross roads and pondered...
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Date:''|mar 17, 2007|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
version.extensions.LoadRemoteFileThroughProxy = {
 major: 1, minor: 1, revision: 0, 
 date: new Date("mar 17, 2007"), 
 source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};

if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};

bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
 if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){ 
 url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
 return bidix.core.loadRemoteFile(url,callback,params);
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/.

The version I am using currently is <<mptwVersion>>.
//May 20, 2011//
//Posted at: [[http://www.facebook.com/note.php?note_id=10150199101363293]]//

//Written in the heat of the moment, this is a record of a way-of-looking-at-life-changing moment. The bad language is just a reflection of my emotions.//

The football field can be a magical place at dawn. You sit in one of those dirty little seats along the sidelines, their backs too low because football fans are always supposed to be leaning forward in excitement. Or maybe they always seem to be excited because the backs of the seats are too low. 

The moon from last night is still sitting up in the sky, it's light now barely perceivable. The sun has a habit of creeping up on you and surprising you. You think it's still night time. A few minutes later, the morning light has lit it up all around you. You can see the birds going about their morning business. They chirp and hop and look for food. 

The magic lies in nature and it's beauty. Fields are nature. But there is a little bit more magic hidden in the football field. If you are not a fan, you will just have to look a little bit harder. 

Life is a cruel place to be in. There is plenty of hardship and toil and heartbreaks. You would think it's like the beautiful field, the grass green and the flowers blooming.  It really isn't. Life and the people in it have habit of slapping you down. With your face in the dirt, the field doesn't look all that pretty. 

That is where football comes in, and where the football field comes in. Football has a way of training you about life. teaching you how to deal with all the pain. The world of football is like a simple form of life played out for you. 

See, the thing with life is that what you get hurt by is not your enemies, but your friends. Like in football. Opposing teams come and go. You win against some, lose against some. In the long run, you don't really care about them. After all, you have to live with your team mates, and not your enemies. 

See, football restores your faith in the world. When you are on the field, you are on the field. All you care about winning the game, so does every one of your teammates. Then you become brothers in arms. You lose the self and become one with the team. Then there are no betrayals and no heartbreaks. If there is pain, it only comes from losing. That really isn't pain, because there are so many of you to share it with. 

When the world slaps you down, and you stand heartbroken, wondering what to do, that is when the magic sets in. It makes you forget, even for a little while. It makes you forget that the people you care about, and their cruelty. It makes you forget life and it's iron fist. It reminds you that in life, there are no teams. The only team is you. That is if you want to  live with any sort of sanity. 

The people around you, even the ones you care about, don't act like the way that brothers in arms do on the magic field of football. If you try to put them in your own team, they have a habit of scoring for the other team in your own goal, the other team of coldhearted life. You really have to put other people in the other team. Even if you have to start imaginary wars with them. For they do belong there. That is the lesson from football. You have to take it. 

For then those people can only beat you like other teams can beat you. But the pain of losing is not really pain, because there are eleven of you inside. Then you can be a little brave and hope they will be wise enough to settle for a draw, though they often don't. You on the other hand never try to win. For you know this is not a game. 

The football field at dawn is a magical place. It brings it all back. The lessons and the memories from yesteryear. You remember, and you are rejuvenated for another day, another life. The sun is up. The moon is gone. It's time for you to get up and go and get to work.
[[About|Abdullah Khalid]]
<div id="statcounter_image" style="display:inline;">
<a title="godaddy analytics" class="statcounter" href="http://statcounter.com/godaddy_website_tonight/"><img src="http://c.statcounter.com/6661264/0/30570f40/1/" alt="godaddy analytics" style="border:none;"/>
//December 25, 2010//
//Posted at: [[http://theboxmove.weebly.com/1/post/2010/12/mathematical-adventures-in-wonderland.html]]//

What happens when a Lecturer in Mathematics at Oxford takes delight in wordplay puzzles, wants to entertain children with stories, and does not like the new developments in the mathematics of his age? Why, you get the wonderful Alice’s Adventures in Wonderland, Through the Looking Glass, and other delightful stories and poems, of course. Written by Lewis Carroll and still in print, these are the among the most popular pieces of fiction, bringing delight to countless children. However, there is more to Lewis Carroll than meets the eye.

Lewis Carroll, whose real name was Charles Lutwidge Dodgson, lived in a time when a revolution was taking place in the world of mathematics and logic. The old guard of that time, of which Dodgson considered himself a part of, believed that “mathematics should be based on axioms, the truth of which ought to be self-evident”. In contrast, the new guard recognized “that the most we can hope for is a set of postulates which we choose to accept.” The difference might not seem too important for someone not familiar with mathematics, but this new idea is the basis of almost all of modern mathematics. Though the Alice stories on the surface seem meant to entertain children, there were in fact designed by Dodgson to illustrate to his peers in the field of mathematics and logic what he thought was so inherently wrong with their new ideas.

One of Carroll’s favourite ways of doing this is by taking the idea his peers championed and taking them to their logical limits, where they took up an absurd form. In fact, the whole of the Alice adventures take place in a completely new world that can be seen as Carroll's idea of what the world in which the new mathematical ideas were accepted would look like. Consider, for instance, the scene of Alice’s meeting with the Duchess and her baby. Everything is wrong with this world. The Duchess is a very bad aristocrat and a horrible mother, paying no attention to her crying baby. The Cook, if anything, is of the worst kind, putting too much pepper in the soup and throwing pots and pans at her mistress for no reason at all. In the middle of this the baby is a ‘queer-shaped little creature” (p.62) whose legs stick out in all directions. Alice takes it outside, only to find that it turns into a pig albeit with it’s legs sticking out and small eyes like those of the baby! What’s happening here is that Carroll is mocking the idea of continuous functions in topology (then the field of projective geometry). The idea is that if an object is varied in a set manner within certain limits, some of it’s properties don’t change. This was a new idea in Carroll’s time and in Carroll’s opinion a step in the wrong direction from the rigidity of Euclid’s elements that he valued so highly being of the old guard. Ridiculing this idea is easy enough for Carroll. In topology the objects being transformed are usually geometric figures, but he ignores this for a moment as he takes the idea of objects being transformed, takes it to it’s logical limit and comes up with the absurdity of an ‘ugly’ baby (p.62) turning it into a ‘handsome pig’ (p.62).

Another of Carroll method’s of making his points is through clever word play and puns. For example, when the caterpillar advises Alice to “keep your temper”,  if all we do is to find him incredibly rude or at least extremely mysterious we are missing the pun that Carroll intended. In his times, the ‘temper’ was not only used in the sense of anger but also to mean the properties of an object. “Keep your temper.” actually means to for Alice to keep her properties or proportions. In Alice’s tale, this might only mean for her to return to her proper size and proportions, which she is finding very hard to do. However, in the real world it’s a references to symbolic algebra and new mathematical inventions such as imaginary numbers, which as the name suggests have no physical interpretation - or a sense of ‘proportion’.

Later on, in Through the Looking Glass, Alice encounters Humpty Dumpty- the one from the popular nursery rhyme - perched on a very thin wall, and unknown to him very likely to fall. Alice is initially confused when Humpty Dumpty uses words that don’t seem to fit into the context of the sentence in which they are used. When she admits that she doesn’t know what he means, Humpty Dumpty smiles and informs her, “Of course you don't -- till I tell you...”(p.196) This leads up to the following exchange:

//'When I use a word,' Humpty Dumpty said in rather a scornful tone, 'it means
just what I choose it to mean -- neither more nor less.'

'The question is,' said Alice, 'whether you CAN make words mean so many
different things.'

'The question is,' said Humpty Dumpty, 'which is to be master-- that's all.'(p.197)//

Alice is much too confused to ask what he means by ‘master’, and instead relents to his viewpoint for a while, asking him what he means by words he uses in the dialogue that follows. But later when she leaves him she declares to herself, “of all the unsatisfactory people I ever met” (p.203), but never finishes the sentence on account of a loud crash that is nothing other than Humpty Dumpty falling off his wall. The message is clear. Humpty Dumpty is none other than new age mathematicians, who choose to give symbols names as they wish, and who unknown to themselves are in a very precarious position and are soon to fall down to their destruction.

Carroll had a penchant not only for including math and logic in his literary works, but also of making his arguments in the field of logic and math in literary style. Most notable among these is What the Tortoise Said to Achilles (1895), in which Carroll borrows the Tortoise and Achilles from the paradoxes of motion of Zeno. In this piece, the tortoise asks Achilles to convince him using logic to accept the conclusions of a simple syllogistic argument based on the given premises. In the highly entertaining dialogue that follows, Carroll sets up a logical paradox that has yet to properly answered. The paradox deals with the metalanguage, the language that describes language itself. For example “my last sentence was about metalanguage” is a statement of metalanguage, for it describes what a statement of language (and not I) talked about. The purpose of the paradox is to note that metalanguage is itself governed by rules similar to those governing language, and so there can exist a meta-metalanguage that describes statements of metalanguage. But then there also exists meta-meta-metalanguage and so on and so forth until we have an infinite number of metalanguages. This is a problem once one realizes that rule of inference which lets us say that “Socrates is a man” and “all men are mortal” and then conclude that “Socrates was mortal”, is correct because metalanguage says so. But then to validate this rule, there needs to be a rule in meta-metalanguage about this rule. But for that we need a rule in meta-meta-language... And so we have a infinite regress that has never been properly resolved.

Carroll alludes to this problem with the field of logic much earlier in Through the Looking Glass. A dialogue between Alice and the White Knight takes place in the following way:

//'You are sad,' the Knight said in an anxious tone: 'let me sing you a song to
comfort you.'

'Is it very long?' Alice asked, for she had heard a good deal of poetry that
“The name of the song is called "HADDOCKS' EYES."'

'Oh, that's the name of the song, is it?' Alice said, trying to feel interested.

'No, you don't understand,' the Knight said, looking a little vexed. 'That's what the name is CALLED. The name really IS "THE AGED AGED MAN."'

'Then I ought to have said "That's what the SONG is called"?' Alice corrected herself.

'No, you oughtn't: that's quite another thing! The SONG is called "WAYS AND MEANS": but that's only what it's CALLED, you know!'

'Well, what IS the song, then?' said Alice, who was by this time completely bewildered.

'I was coming to that,' the Knight said. 'The song really IS "A-SITTING ON A GATE": and the tune's my own invention.' (p.224)//

A first the reader himself might be quite confused by the semantics of the Knight. But a closer reading reveals that Carroll is talking about metalanguage. The poem belongs to the language level, the name of the song belongs to the level of metalanguage, but what the name of the song is called belongs one level up in meta-metalanguage. Poor Alice fails to keep this distinction, and gets horribly confused by the answers she receives, though all the Knight is doing is keeping his semantics clean and correct.

It was in these ways that Carroll sought to save the mathematics he knew from the birth of new ideas that were trying to change it into something he was not comfortable with it at all. But he was no martyr. The ideas he was trying to repress were the very ideas that were at the centerfold of mathematics in the decades to come, and resulted in unimaginable developments in human knowledge in ways unforeseen. Without those ideas, the world would have been a much poorer place indeed. But he was no devil either. In at least one place, his contribution is still remembered and debated upon. In other places, which were not the subject of this piece, he had many notable contributions and he is well remembered  for them. But forgetting the issue of mathematical and logical contributions for a moment, we can remember that Lewis Carroll wrote two wonderful tales, tales that have brought supreme delight to countless people across a century and a half and from the looks of it will keep on doing so for a long long time. That is contribution enough.

!!!!Further Reading:

Warren Weaver, “The Mathematical Manuscripts of Lewis Carroll”. Proceedings of the American Philosophical Society, Vol. 98, No. 5 (Oct. 15, 1954), pp. 377-381.

Sophie Marret, “Metalanguage in Lewis Carroll”. SubStance, Vol. 22, No. 2/3, Issue 71/72: Special Issue: Epistémocritique (1993), pp. 217-227, University of Wisconsin Press, http://www.jstor.org/stable/3685282

Carroll, Lewis. "What the Tortoise Said to Achilles". Mind, n.s., 4 (1895), pp. 278–80.

Carroll, Lewis. “The Complete Illustrated Lewis Carroll”. Wordsworth Edition, 1996.

Melanie Bayley, “Alice's adventures in algebra: Wonderland solved”. New Scientist, Magazine issue 2739, 16 December 2009, http://www.newscientist.com/article/mg20427391.600-alices-adventures-in-algebra-wonderland-solved.html
//February 12, 2011//
//Posted at: [[http://theboxmove.weebly.com/1/post/2011/02/media-writing.html]]//

"President Hosni Mubarak of Egypt resigned his post and turned over all power to the military on Friday, ending his nearly 30 years of autocratic rule and bowing to a historic popular uprising that has transformed politics in Egypt and around the Arab world.?" ([[source|http://www.nytimes.com/2011/02/12/world/middleeast/12egypt.html?_r=2&hp]])

The above is the opening sentence from a story  by the New York Times. In journalism speak it's called the lead. Actually, it's a hard lead, owing to it's direct style that aims to quickly give the reader the most crucial pieces of information and gets him hooked for the rest of the story. What I am employing right now is a soft lead. I am taking my time to reel you in, slowly coming to the point of the story.

I am taking a course in Media Writing this semester. As the name suggests, it's aims to make journalists out of us - not just by teaching us how to write for Media but also other stuff like making a documentary. The instructor is reasonable good, though not great. However, what's great about it is that unlike courses on Fiction Writing that don't help you much beyond the world of story telling, this course teaches you the nuts and bolts of effectively reaching out to an audience, telling them what you need to tell them in the best possible way. Incidentally, I am now in the nut-graph part of my post.

It's very important, to master the art of communication. One of my (our?) heroes Feynman was called "The Great Explainer" because he was so good at teaching. His books and lectures are famous for that very reason. They explain things so simply yet in so deep a manner, that you fully understand the topic. His renowned book QED: The Strange Theory of Light and Matter, written for the layman with no knowledge of mathematics, is frequently a part of graduate physics courses. The reason: He simplifies things to the simplest possible level, but not anymore. That is why the intuitions that he forms in our heads are the right ones. A piece of advice from him that I quoted [[yesterday|http://theboxmove.weebly.com/1/post/2011/02/the-huckleberry-boot-camp.html]], " "Don't say 'reflected acoustic wave.' Say [echo]." Or, "Forget all that 'local minima' stuff. Just say there's a bubble caught in the crystal and you have to shake it out." Nothing made him angrier than making something simple sound complicated."

That is the goal. That was half the goal when I tried to [[explain about falling bodies|http://theboxmove.weebly.com/1/post/2011/02/rebuttal-to-galileo-galellie-galeleilelo.html]]. If you are into the same, trying to learn how to talk to people so they understand you, how to teach them when you have to teach them, then Media Writing is a course you should consider when it is offered in your university. Though perhaps you should wait around for my review of the course once I am done with it.
|Description:|Miscellaneous tweaks used by MPTW|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Author:|Simon Baird <simon.baird@gmail.com>|
!!Note: instead of editing this you should put overrides in MptwUserConfigPlugin
var originalReadOnly = readOnly;
var originalShowBackstage = showBackstage;

//config.options.chkHttpReadOnly = false; 		// means web visitors can experiment with your site by clicking edit
readOnly = true;								// needed because the above doesn't work any more post 2.1 (??)
showBackstage = true;							// show backstage for same reason

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.options.chkSaveBackups = true;			// do save backups
config.options.txtBackupFolder = 'twbackup';	// put backups in a backups folder

config.options.chkAutoSave = (window.location.protocol == "file:"); // do autosave if we're in local file

config.mptwVersion = "2.5.3";


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';

|Description|Mptw Theme with some rounded corners (Firefox only)|



{ -moz-border-radius: 1em; }

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


|Description|Mptw Theme with the default TiddlyWiki PageLayout and Styles|
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
|Description|Mptw Theme including custom PageLayout|

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

<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 class='headerForeground'>
		<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
		<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
<!-- 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 id='displayArea'>
	<div id='messageArea'></div>
	<div id='tiddlerDisplay'></div>


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

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

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

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


<div class='toolbar'>
	<span macro="showWhenTagged systemConfig">
		<span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></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>

<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 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>


/* 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;
.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;

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

/* more subtle tiddler subtitle */
.subtitle {
	font-size: 90%;
	color: [[ColorPalette::TertiaryMid]];
.subtitle .tiddlyLink {
	color: [[ColorPalette::TertiaryMid]];

/* a little bit of extra whitespace */
.viewer {

/* 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 {
/* undo the above in OptionsPanel */
#sidebarOptions .sliderPanel br {

/* horizontal main menu stuff */
#displayArea {
	margin: 1em 15.7em 0em 1em; /* use the freed up space */
#topMenu br {
	display: none;
#topMenu {
	background: [[ColorPalette::PrimaryMid]];
#topMenu {
#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 {
.selected .toolbar {

/* 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 {

/* makes theme selector look a little better */
#sidebarOptions .sliderPanel .select .button {
#sidebarOptions .sliderPanel .select br {

/* 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 */


For upgrading. See [[ImportTiddlers]].
URL: http://mptw.tiddlyspot.com/upgrade.html
//February 19, 2011//
//Posted at: [[http://theboxmove.weebly.com/1/post/2011/02/on-landau.html]]//

To him [Landau] fell the tragic fate of dying twice. The first time it happened was six years earlier on 7 January 1962 when on the icy road, en route from Moscow to Dubna, his car skidded and collided with a lorry coming from the opposite direction. The epic story of the subsequent struggle to save his life is primarily a story of the selfless labour and skill of numerous physicians and nurses. But it is also a story of a remarkable feat of solidarity. The calamitous accident agitated the entire community of physicists, arousing a spontaneous and instant response. The hospital in which Landau lay unconscious became a centre to all those his students and colleagues - who strove to make whatever contributions they could to help the physicians in their desperate struggle to save Landau's life. 

"Their feat of comradeship commenced on the very first day. Illustrious scientists who, however, had no idea of medicine, academicians, correspond- corresponding members of the scientific academies, doctors, candidates, men of the same generation as the 54-year-old Landau as well as his pupils and their still more youthful pupils - all volunteered to act as messengers, chauffeurs, intermediaries, suppliers, secretaries, members of the watch and, lastly, porters and labourers. Their spontaneously established headquarters was located in the office of the ~Physician-in-Chief of Hospital No. 50 and it became a round-the-clock organizational centre for an unconditional and immediate implementation of any instruction of the attending physicians. 

"Eighty-seven theoreticians and experimenters took part in this voluntary rescue team. An alphabetical list of the telephone numbers and addresses of any one and any institution with which contact might be needed at any instant was compiled, and it contained 223 telephone numbers! It included other hospitals, motor transport bases, airports, customs offices, pharmacies, ministries, and the places at which consulting physicians could most likely be reached. 
"During the most tragic days when it seemed that 'Dau is dying' - and there were at least four such days - 8-10 cars could be found waiting at any time in front of the seven-storey hospital building. . . . 

"When everything depended on the artificial respiration machine, on 12 January, a theoretician suggested that it should be immediately constructed in the workshops of the Institute of Physical Problems. This was unnecessary and naive, but how amazingly spontaneous! The physicists obtained the machine from the Institute for the Study of Poliomyelitis and carried it in their own hands to the ward where Landau was gasping for breath. They saved their colleague, teacher, and friend. 

"The story could be continued without limit. This was a real fraternity of physicists. . . "

Nothing really needs to be said.

By E. M. I.ifshitz who wrote if for the Russian edition of Landau's Collected Papers via Mechanics by L. D. Landau and E. M. Lifshitz. 

//June 5, 2011//

//I originally wrote this on Tuesday, April 21, 2009 at 4:12pm. But never posted it. Maybe, this deserves the light of the day.// 

Yesterday at around 4 pm in the morning a drunk driver crashed, or rather crushed, the car of Waheeb Alam. Waheeb Alam was a third year LUMS student. He died on the spot. His two companions were injured. 

Yesterday, at around 11 pm, I attended my first rally. The protest had simple objectives. The drunk driver was politically well connected. The police had, therefore, not properly collected the evidence- perhaps even tampered with it. The first objective was to force the police to properly evaluate the situation and collect as much evidence as possible, and release the reports. The second demand was that blood tests of the driver be taken. These had not been taken in a bid to protect the said driver. The third demand was to arrest the driver and his two companions, as is normal in these circumstances. This had also not been done, and the culprits had been allowed to leave the area. 

Around four hundred LUMS students attended the rally. First the road leading to the site of the accident was blocked off. Later, the rally was moved to Masjid Chowk- which is a major intersection- to create more pressure on the concerned authorities. Everything was conducted peacefully. There were no chants. No emotional speeches. No unnecessary inconvenience was caused to either the Police or passerbys- as far as I could see. After six hours, results started to show. A prominent politician showed up to promise justice. The evidence list was released. Two arrests were made and promises of the third were made. The blood tests were also made (which later came out positive). All in all the whole thing went well. I was happy with how my first rally went. 

However, I still think that it could have been done better. There were certain areas in which improvements could have been made (please note that I have already mentioned the positive points above). The first problem was the problem of internal disagreements made external. The people who had taken up the responsibility of the movement had their disagreements. And very rightly so. Disagreements within any decision making body should not only be allowed but should always be actively encouraged. It is one of the better ways of coming up with better decisions. However, what should also be done is to resolve the disagreements into one final concrete course of action. The followers should never be made aware off the disagreements of their leaders (unless the committee decides there are specific political advantages to be gained from creating that awareness). A united leadership creates the environment of trust that allows the followers to be more united. This was what did not happen completely. The disagreements were made public, different people gave conflicting "orders". Even though it did not cause the type of harm that it might have, it is something to be avoided in the future. 

The second area of improvement was organization, which is to a large extent tied to the above. Even though no overall organization errors were made, on the micro level there was a certain bit of disorganization that I was very surprised to see. I had the perception that LUMS being heavily active in protests, rallies and the like would have strong managers who would be able to efficiently implement decisions made. My perceptions proved to be not entirely correct. I would suggest that the Law and Politics society (or any other society for that matter) should have a trained team which helps any society or group in LUMS to organize rallies and protests and similar events. What most concerns me now was that even though there was an awareness at the top level of the dangers of a suicide attack, no real actions were taken to minimize this risk. In fact, the protesters were not even informed of this risk till the very end. 

The third area of improvement was the dispersal of information. I believe that keeping followers aware of what is going on is essential to keeping a movement going. A dis-informed following is a disinterested one is a general principle that I think is true. Telling followers exactly what the facts are helps keeps rumors at bay, but more importantly it gives them the sense of involvement, which is so essential to keep a movement going. This was not done. The facts were laid out, but not in a simple way. Updates were given frequently, but I believe not frequently enough- especially towards the end. Any future protest should be more careful with this. 

There is a fourth area but I have not properly formulated my beliefs on the issue, and till that time I keep that criticism- if it may be that- in my mind. 

It was a good rally.
|<html><a name="Top"/></html>''Name:''|PartTiddlerPlugin|
|''Version:''|1.0.9 (2007-07-14)|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license]]|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|
!Table of Content<html><a name="TOC"/></html>
* <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Description',null, event)">Description, Syntax</a></html>
* <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Applications',null, event)">Applications</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('LongTiddler',null, event)">Refering to Paragraphs of a Longer Tiddler</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Citation',null, event)">Citation Index</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('TableCells',null, event)">Creating "multi-line" Table Cells</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Tabs',null, event)">Creating Tabs</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Sliders',null, event)">Using Sliders</a></html>
* <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Revisions',null, event)">Revision History</a></html>
* <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Code',null, event)">Code</a></html>
!Description<html><a name="Description"/></html>
With the {{{<part aPartName> ... </part>}}} feature you can structure your tiddler text into separate (named) parts. 
Each part can be referenced as a "normal" tiddler, using the "//tiddlerName//''/''//partName//" syntax (e.g. "About/Features").  E.g. you may create links to the parts (e.g. {{{[[Quotes/BAX95]]}}} or {{{[[Hobbies|AboutMe/Hobbies]]}}}), use it in {{{<<tiddler...>>}}} or {{{<<tabs...>>}}} macros etc.

|>|''<part'' //partName// [''hidden''] ''>'' //any tiddler content// ''</part>''|
|//partName//|The name of the part. You may reference a part tiddler with the combined tiddler name "//nameOfContainerTidder//''/''//partName//. <<br>>If you use a partName containing spaces you need to quote it (e.g. {{{"Major Overview"}}} or {{{[[Shortcut List]]}}}).|
|''hidden''|When defined the content of the part is not displayed in the container tiddler. But when the part is explicitly referenced (e.g. in a {{{<<tiddler...>>}}} macro or in a link) the part's content is displayed.|
|<html><i>any&nbsp;tiddler&nbsp;content</i></html>|<html>The content of the part.<br>A part can have any content that a "normal" tiddler may have, e.g. you may use all the formattings and macros defined.</html>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|
<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!Applications<html><a name="Applications"/></html>
!!Refering to Paragraphs of a Longer Tiddler<html><a name="LongTiddler"/></html>
Assume you have written a long description in a tiddler and now you want to refer to the content of a certain paragraph in that tiddler (e.g. some definition.) Just wrap the text with a ''part'' block, give it a nice name, create a "pretty link" (like {{{[[Discussion Groups|Introduction/DiscussionGroups]]}}}) and you are done.

Notice this complements the approach to first writing a lot of small tiddlers and combine these tiddlers to one larger tiddler in a second step (e.g. using the {{{<<tiddler...>>}}} macro). Using the ''part'' feature you can first write a "classic" (longer) text that can be read "from top to bottom" and later "reuse" parts of this text for some more "non-linear" reading.

<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!!Citation Index<html><a name="Citation"/></html>
Create a tiddler "Citations" that contains your "citations". 
Wrap every citation with a part and a proper name. 

<part BAX98>Baxter, Ira D. et al: //Clone Detection Using Abstract Syntax Trees.// 
in //Proc. ICSM//, 1998.</part>

<part BEL02>Bellon, Stefan: //Vergleich von Techniken zur Erkennung duplizierten Quellcodes.// 
Thesis, Uni Stuttgart, 2002.</part>

<part DUC99>Ducasse, Stéfane et al: //A Language Independent Approach for Detecting Duplicated Code.// 
in //Proc. ICSM//, 1999.</part>

You may now "cite" them just by using a pretty link like {{{[[Citations/BAX98]]}}} or even more pretty, like this {{{[[BAX98|Citations/BAX98]]}}}.

<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!!Creating "multi-line" Table Cells<html><a name="TableCells"/></html>
You may have noticed that it is hard to create table cells with "multi-line" content. E.g. if you want to create a bullet list inside a table cell you cannot just write the bullet list
* Item 1
* Item 2
* Item 3
into a table cell (i.e. between the | ... | bars) because every bullet item must start in a new line but all cells of a table row must be in one line.

Using the ''part'' feature this problem can be solved. Just create a hidden part that contains the cells content and use a {{{<<tiddler >>}}} macro to include its content in the table's cell.

|subject1|<<tiddler ./Cell1>>|
|subject2|<<tiddler ./Cell2>>|

<part Cell1 hidden>
* Item 1
* Item 2
* Item 3

Notice that inside the {{{<<tiddler ...>>}}} macro you may refer to the "current tiddler" using the ".".

BTW: The same approach can be used to create bullet lists with items that contain more than one line.

<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!!Creating Tabs<html><a name="Tabs"/></html>
The build-in {{{<<tabs ...>>}}} macro requires that you defined an additional tiddler for every tab it displays. When you want to have "nested" tabs you need to define a tiddler for the "main tab" and one for every tab it contains. I.e. the definition of a set of tabs that is visually displayed at one place is distributed across multiple tiddlers.

With the ''part'' feature you can put the complete definition in one tiddler, making it easier to keep an overview and maintain the tab sets.

The standard tabs at the sidebar are defined by the following eight tiddlers:
* SideBarTabs
* TabAll
* TabMore
* TabMoreMissing
* TabMoreOrphans
* TabMoreShadowed
* TabTags
* TabTimeline

Instead of these eight tiddlers one could define the following SideBarTabs tiddler that uses the ''part'' feature:
<<tabs txtMainTab 
    Timeline Timeline SideBarTabs/Timeline 
    All 'All tiddlers' SideBarTabs/All 
    Tags 'All tags' SideBarTabs/Tags 
    More 'More lists' SideBarTabs/More>>
<part Timeline hidden><<timeline>></part>
<part All hidden><<list all>></part>
<part Tags hidden><<allTags>></part>
<part More hidden><<tabs txtMoreTab 
    Missing 'Missing tiddlers' SideBarTabs/Missing 
    Orphans 'Orphaned tiddlers' SideBarTabs/Orphans 
    Shadowed 'Shadowed tiddlers' SideBarTabs/Shadowed>></part>
<part Missing hidden><<list missing>></part>
<part Orphans hidden><<list orphans>></part>
<part Shadowed hidden><<list shadowed>></part>

Notice that you can easily "overwrite" individual parts in separate tiddlers that have the full name of the part.

E.g. if you don't like the classic timeline tab but only want to see the 100 most recent tiddlers you could create a tiddler "~SideBarTabs/Timeline" with the following content:
		sortBy 'tiddler.modified' descending 
		write '(index < 100) ? "* [["+tiddler.title+"]]\n":""'>>
<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!!Using Sliders<html><a name="Sliders"/></html>
Very similar to the build-in {{{<<tabs ...>>}}} macro (see above) the {{{<<slider ...>>}}} macro requires that you defined an additional tiddler that holds the content "to be slid". You can avoid creating this extra tiddler by using the ''part'' feature

In a tiddler "About" we may use the slider to show some details that are documented in the tiddler's "Details" part.
<<slider chkAboutDetails About/Details details "Click here to see more details">>
<part Details hidden>
To give you a better overview ...

Notice that putting the content of the slider into the slider's tiddler also has an extra benefit: When you decide you need to edit the content of the slider you can just doubleclick the content, the tiddler opens for editing and you can directly start editing the content (in the part section). In the "old" approach you would doubleclick the tiddler, see that the slider is using tiddler X, have to look for the tiddler X and can finally open it for editing. So using the ''part'' approach results in a much short workflow.

<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!Revision history<html><a name="Revisions"/></html>
* v1.0.9 (2007-07-14)
** Bugfix: Error when using the SideBarTabs example and switching between "More" and "Shadow". Thanks to cmari for reporting the issue.
* v1.0.8 (2007-06-16)
** Speeding up display of tiddlers containing multiple pard definitions. Thanks to Paco Rivière for reporting the issue.
** Support "./partName" syntax inside <<tabs ...>> macro
* v1.0.7 (2007-03-07)
** Bugfix: <<tiddler "./partName">> does not always render correctly after a refresh (e.g. like it happens when using the "Include" plugin). Thanks to Morris Gray for reporting the bug.
* v1.0.6 (2006-11-07)
** Bugfix: cannot edit tiddler when UploadPlugin by Bidix is installed. Thanks to José Luis González Castro for reporting the bug.
* v1.0.5 (2006-03-02)
** Bugfix: Example with multi-line table cells does not work in IE6. Thanks to Paulo Soares for reporting the bug.
* v1.0.4 (2006-02-28)
** Bugfix: Shadow tiddlers cannot be edited (in TW 2.0.6). Thanks to Torsten Vanek for reporting the bug.
* v1.0.3 (2006-02-26)
** Adapt code to newly introduced Tiddler.prototype.isReadOnly() function (in TW 2.0.6). Thanks to Paulo Soares for reporting the problem.
* v1.0.2 (2006-02-05)
** Also allow other macros than the "tiddler" macro use the "." in the part reference (to refer to "this" tiddler)
* v1.0.1 (2006-01-27)
** Added Table of Content for plugin documentation. Thanks to RichCarrillo for suggesting.
** Bugfix: newReminder plugin does not work when PartTiddler is installed. Thanks to PauloSoares for reporting.
* v1.0.0 (2006-01-25)
** initial version
<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!Code<html><a name="Code"/></html>
<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>
//                           PartTiddlerPlugin

// Ensure that the PartTiddler Plugin is only installed once.
if (!version.extensions.PartTiddlerPlugin) {

version.extensions.PartTiddlerPlugin = {
    major: 1, minor: 0, revision: 9,
    date: new Date(2007, 6, 14), 
    type: 'plugin',
    source: "http://tiddlywiki.abego-software.de/#PartTiddlerPlugin"

if (!window.abego) window.abego = {};
if (version.major < 2) alertAndThrow("PartTiddlerPlugin requires TiddlyWiki 2.0 or newer.");

// Common Helpers

// Looks for the next newline, starting at the index-th char of text. 
// If there are only whitespaces between index and the newline 
// the index behind the newline is returned, 
// otherwise (or when no newline is found) index is returned.
var skipEmptyEndOfLine = function(text, index) {
	var re = /(\n|[^\s])/g;
	re.lastIndex = index;
	var result = re.exec(text);
	return (result && text.charAt(result.index) == '\n') 
			? result.index+1
			: index;

// Constants

var partEndOrStartTagRE = /(<\/part>)|(<part(?:\s+)((?:[^>])+)>)/mg;
var partEndTagREString = "<\\/part>";
var partEndTagString = "</part>";

// Plugin Specific Helpers

// Parse the parameters inside a <part ...> tag and return the result.
// @return [may be null] {partName: ..., isHidden: ...}
var parseStartTagParams = function(paramText) {
	var params = paramText.readMacroParams();
	if (params.length == 0 || params[0].length == 0) return null;
	var name = params[0];
	var paramsIndex = 1;
	var hidden = false;
	if (paramsIndex < params.length) {
		hidden = params[paramsIndex] == "hidden";
	return {
		partName: name, 
		isHidden: hidden

// Returns the match to the next (end or start) part tag in the text, 
// starting the search at startIndex.
// When no such tag is found null is returned, otherwise a "Match" is returned:
// [0]: full match
// [1]: matched "end" tag (or null when no end tag match)
// [2]: matched "start" tag (or null when no start tag match)
// [3]: content of start tag (or null if no start tag match)
var findNextPartEndOrStartTagMatch = function(text, startIndex) {
	var re = new RegExp(partEndOrStartTagRE);
	re.lastIndex = startIndex;
	var match = re.exec(text);
	return match;

// Formatter

// Process the <part ...> ... </part> starting at (w.source, w.matchStart) for formatting.
// @return true if a complete part section (including the end tag) could be processed, false otherwise.
var handlePartSection = function(w) {
	var tagMatch = findNextPartEndOrStartTagMatch(w.source, w.matchStart);
	if (!tagMatch) return false;
	if (tagMatch.index != w.matchStart || !tagMatch[2]) return false;

	// Parse the start tag parameters
	var arguments = parseStartTagParams(tagMatch[3]);
	if (!arguments) return false;
	// Continue processing
	var startTagEndIndex = skipEmptyEndOfLine(w.source, tagMatch.index + tagMatch[0].length);
	var endMatch = findNextPartEndOrStartTagMatch(w.source, startTagEndIndex);
	if (endMatch && endMatch[1]) {
		if (!arguments.isHidden) {
			w.nextMatch = startTagEndIndex;
		w.nextMatch = skipEmptyEndOfLine(w.source, endMatch.index + endMatch[0].length);
		return true;
	return false;

config.formatters.push( {
    name: "part",
    match: "<part\\s+[^>]+>",
	handler: function(w) {
		if (!handlePartSection(w)) {
} )

// Extend "fetchTiddler" functionality to also recognize "part"s of tiddlers 
// as tiddlers.

var currentParent = null; // used for the "." parent (e.g. in the "tiddler" macro)

// Return the match to the first <part ...> tag of the text that has the
// requrest partName.
// @return [may be null]
var findPartStartTagByName = function(text, partName) {
	var i = 0;
	while (true) {
		var tagMatch = findNextPartEndOrStartTagMatch(text, i);
		if (!tagMatch) return null;

		if (tagMatch[2]) {
			// Is start tag
			// Check the name
			var arguments = parseStartTagParams(tagMatch[3]);
			if (arguments && arguments.partName == partName) {
				return tagMatch;
		i = tagMatch.index+tagMatch[0].length;

// Return the part "partName" of the given parentTiddler as a "readOnly" Tiddler 
// object, using fullName as the Tiddler's title. 
// All remaining properties of the new Tiddler (tags etc.) are inherited from 
// the parentTiddler.
// @return [may be null]
var getPart = function(parentTiddler, partName, fullName) {
	var text = parentTiddler.text;
	var startTag = findPartStartTagByName(text, partName);
	if (!startTag) return null;
	var endIndexOfStartTag = skipEmptyEndOfLine(text, startTag.index+startTag[0].length);
	var indexOfEndTag = text.indexOf(partEndTagString, endIndexOfStartTag);

	if (indexOfEndTag >= 0) {
		var partTiddlerText = text.substring(endIndexOfStartTag,indexOfEndTag);
		var partTiddler = new Tiddler();
		partTiddler.abegoIsPartTiddler = true;
		return partTiddler;
	return null;

// Hijack the store.fetchTiddler to recognize the "part" addresses.
var hijackFetchTiddler = function() {
	var oldFetchTiddler = store.fetchTiddler ;
	store.fetchTiddler = function(title) {
		var result = oldFetchTiddler.apply(this, arguments);
		if (!result && title) {
			var i = title.lastIndexOf('/');
			if (i > 0) {
				var parentName = title.substring(0, i);
				var partName = title.substring(i+1);
				var parent = (parentName == ".") 
						? store.resolveTiddler(currentParent)
						: oldFetchTiddler.apply(this, [parentName]);
				if (parent) {
					return getPart(parent, partName, parent.title+"/"+partName);
		return result;	

// for debugging the plugin is not loaded through the systemConfig mechanism but via a script tag. 
// At that point in the "store" is not yet defined. In that case hijackFetchTiddler through the restart function.
// Otherwise hijack now.
if (!store) {
	var oldRestartFunc = restart;
	window.restart = function() {
} else

// The user must not edit a readOnly/partTiddler

config.commands.editTiddler.oldIsReadOnlyFunction = Tiddler.prototype.isReadOnly;

Tiddler.prototype.isReadOnly = function() {
	// Tiddler.isReadOnly was introduced with TW 2.0.6.
	// For older version we explicitly check the global readOnly flag
	if (config.commands.editTiddler.oldIsReadOnlyFunction) {
		if (config.commands.editTiddler.oldIsReadOnlyFunction.apply(this, arguments)) return true;
	} else {
		if (readOnly) return true;

	return this.abegoIsPartTiddler;

config.commands.editTiddler.handler = function(event,src,title)
	var t = store.getTiddler(title);
	// Edit the tiddler if it either is not a tiddler (but a shadowTiddler)
	// or the tiddler is not readOnly
	if(!t || !t.abegoIsPartTiddler)
		return false;

// To allow the "./partName" syntax in macros we need to hijack 
// the invokeMacro to define the "currentParent" while it is running.
var oldInvokeMacro = window.invokeMacro;
function myInvokeMacro(place,macro,params,wikifier,tiddler) {
	var oldCurrentParent = currentParent;
	if (tiddler) currentParent = tiddler;
	try {
		oldInvokeMacro.apply(this, arguments);
	} finally {
		currentParent = oldCurrentParent;
window.invokeMacro = myInvokeMacro;

// To correctly support the "./partName" syntax while refreshing we need to hijack 
// the config.refreshers.tiddlers to define the "currentParent" while it is running.
(function() {
	var oldTiddlerRefresher= config.refreshers.tiddler;
	config.refreshers.tiddler = function(e,changeList) {
		var oldCurrentParent = currentParent;
		try {
			currentParent = e.getAttribute("tiddler");
			return oldTiddlerRefresher.apply(this,arguments);
		} finally {
			currentParent = oldCurrentParent;

// Support "./partName" syntax inside <<tabs ...>> macro
(function() {
	var extendRelativeNames = function(e, title) {
		var nodes = e.getElementsByTagName("a");
		for(var i=0; i<nodes.length; i++) {
			var node = nodes[i];
			var s = node.getAttribute("content");
			if (s && s.indexOf("./") == 0)
	var oldHandler = config.macros.tabs.handler;
	config.macros.tabs.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
		var result = oldHandler.apply(this,arguments);
		if (tiddler)
			extendRelativeNames(place, tiddler.title);
		return result;

// Scroll the anchor anchorName in the viewer of the given tiddler visible.
// When no tiddler is defined use the tiddler of the target given event is used.
window.scrollAnchorVisible = function(anchorName, tiddler, evt) {
	var tiddlerElem = null;
	if (tiddler) {
		tiddlerElem = document.getElementById(story.idPrefix + tiddler);
	if (!tiddlerElem && evt) {
		var target = resolveTarget(evt);
		tiddlerElem = story.findContainingTiddler(target);
	if (!tiddlerElem) return;

	var children = tiddlerElem.getElementsByTagName("a");
	for (var i = 0; i < children.length; i++) {
		var child = children[i];
		var name = child.getAttribute("name");
		if (name == anchorName) {
			var y = findPosY(child);

} // of "install only once"

<html><sub><a href="javascript:;" onclick="scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2006 ([[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.


<html><sub><a href="javascript:;" onclick="scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>
//February 12, 2011//
//Posted at: [[http://www.facebook.com/note.php?note_id=10150158892343293]]//

One of the reasons I took up the freshmen Electricity and Magnetism TAship was that I wanted to pass along the baton [1]. It's old news now that the School of Science and Engineering has lost the awesomeness of the first year. Yet some of us from the old guard still try in various ways to improve the standards. Some go along political lines, trying to reform the administration - perhaps pushing for the appointment of a dean worthy of being called a dean. Others try to reform the faculty, pushing for better instructors, complaining against the not so great ones - though I doubt flying paper planes in class is any kind of solution.Yet there are others who try to instill some of the values inculcated into the old guard by the faculty now all flown away, into the younger crop - they will be pushing for peer advising for the next batch, stay tuned!

I have worked in all three departments over the last two years, (mostly as an AD :P), and have faced too little success. SSE dilutes everyday. My latest venture is to reach out to the prospective physics majors in the freshmen. The reason are two fold.

First, I realized that instead of one world class instructor giving freshmen physics lectures with five or six world class instructors providing support in recitations and supporting material, now there is just one world class instructor. 'Sohnai par sohaga' the not-so-good-at-math-wanna-be-biology-and-chemistry-majors-and-other freshmen complaints over the years have resulted in the severe dilution of the freshmen physics and math courses, so that the new classes look more like English composition classes rather than math based ones. Even though this might be a level of the course more appropriate for everyone (I severely disagree) it results in the under training of the prospective physics (and math) majors. I am sure it will even lead up to higher level maths and physics courses becoming much easier over the years because the new students won't be able to handle the harder-should-be-taught material.

Second, we noticed that the percentage of pure science majors in the second batch of SSE was much less than in the first batch. This is not a statistical anomaly. Among the numerous possible reasons, one was that the pure sciences were never pitched to them properly. Now, I deeply believe that people should study and do what they want to do. I would never dream of convincing someone against their will to take up a major or career that they don't want to. That is exactly the reason I want to pitch them the pure sciences. There is a strong pressure created by parents/society/peers on young ones to take up 'practical' career paths that would easily lead them up to good jobs - even if the young ones want to play at something else. This in economic terms is a case of a market failure. Our response. Create an opposing pressure that cancels out the above pressure. Balance out everything and let the young ones pick their own toy.[2]

Till now I have failed miserably. The smart freshmen (read prospective physics majors) don't really come to the tutorials because they don't need to. They don't come to us in office hours because they don't need to. I really should have put more thought into it before taking up the TAship offer. My latest plan is to send out an email to the freshmen and ask them to come talk to us/me if they are interested in physics [3]. Perhaps this will have some effect. But I want better ways. The deadlines for their choice of major is fast approaching and this is the time for action. Ideas anyone?

//[1] Before anyone says so, the other reasons for taking up a TAship were that I wanted an item on my CV and earn some money. But why I took up the EM TAship particularly is as stated.
[2] I won't go into a deep discussion on the rights and wrongs in this because this has already been discussed to death all over space and time. I stand by my position.
[3] This should correspondingly happen with the other majors too. But the spirit should always be to help them decide what they really want to to, and not what you want them to do.//
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Date:''|Apr 19, 2007|
|''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
			// checkbox linked with this password "save this password on this computer"
			// text savePasswordCheckboxLabel
		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]) 
		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

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

		pasPassword: "Test password"
|>|{{{allTags}}} lists all tags. Clicking on a tag lists all the tiddlers assigned that tag. |
|>|Closes all open tiddlers |
|list all|{{{<}}}{{{<list all>>}}}|
|>|lists all tiddlers in alphabetical order |
|list missing|{{{<}}}{{{<list missing>>}}}|
|>|Lists all WikiWords in the TiddlyWiki that don't have tiddlers created for them |
|list orphans|{{{<}}}{{{<list orphans>>}}}|
|>|Lists all Tiddlers that aren't linked to directly by another tiddler |
|>| |
|>| |
|>| |
|>| |
|>| |
|slider|{{{<}}}{{{<slider ID Tiddler Label>>}}}|
|>| |
|tabs|{{{<}}}{{{<tabs ID Label Tip Tiddler>>}}}|
|>| |
|tag|{{{<}}}{{{<tag tagName>>}}}|
|>| |
|tiddler|{{{<}}}{{{<tiddler Tiddler>>}}}|
|>| |
|>| |
|>| |
|>| |
|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) $|
|Author:|Simon Baird <simon.baird@gmail.com>|
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");
		var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
		if (excludeTiddler)

	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,
			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)
		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] + ")";
				var theDropDownBtn = createTiddlyButton(theListItem," " +

	// 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; }",

	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;



|>| !Text Markup |
|>|<html><tt>{{{Monospaced Text}}}</tt></html> |
|>|<html><pre>{{{<br/>Monospaced<br/>Multi-line<br/>Block<br/>}}}</pre></html> |
|>|{{{''}}}''Bold''{{{''}}} |
|>|{{{//}}}//Italics//{{{//}}} |
|>|{{{__}}}__Underine__{{{__}}} |
|>|{{{==}}}==Strike Through=={{{==}}} |
|>|{{{~~}}}~~sub~~{{{~~}}}script |
|>|{{{^^}}}^^super^^{{{^^}}}script |
|>| !Colors (see ColorChart) |
|>|{{{@@}}}@@highlight@@{{{@@}}} |
|>|{{{@@color(green):}}}@@color(green):green@@{{{@@}}} |
|>|{{{@@bgcolor(green):}}}@@bgcolor(green):green@@{{{@@}}} |
|>| !Links |
|>|any WikiWord |
|>|{{{[[Manual Link]]}}}<html><br/></html>Makes: [[Manual Link]] |
|>|Pretty Link<html><br/></html>{{{[[Help|QuickRef]]}}}<html><br/></html>Makes: [[Help|QuickRef]] |
|>|External Link<html><br/></html>{{{http://www.msn.com}}}<html><br/></html>Makes: http://www.msn.com |
|>|Pretty External Link<html><br/></html>{{{[[go|http://www.msn.com]]}}}<html><br/></html>Makes: [[go|http://www.msn.com]] |
|>| !Folder Links |
|>|{{{[[Link Text|OS Path]]}}} |
|>| !Path Formats |
|>|Windows Share:<html><br/></html>{{{file://///server/share}}} |
|>|Windows Local:<html><br/></html>{{{file:///c:/folder/file}}} |
|>|Un*x Local File:<html><br/></html>{{{file://folder/file}}} |
|>|Relative File<html><br/></html>{{{folder/file}}} |
|>| !Lists |
|>|{{{*}}} Bullet Lists<html><br/></html>{{{#}}} Numbered Lists |
|>|Nest with multiple {{{*}}}'s or {{{#}}}'s |
|>|{{{*}}}Bullet<html><br/></html>{{{##}}}Number |
|>|<html><ul><li>Bullet<ol><li>Numbered</li></ol></li></ul></html> |
|>| !blockquotes |
|>|{{{>}}} Blockquote<html><br/></html>{{{>>}}} Nested Blockquote |
|>|<html><blockquote>Blockquote<blockquote>Nested Blockquote</blockquote></blockquote></html> |
|>|<html><tt><<<</tt><br/>multi-line<br/>blockquote<br/><tt><<<</tt></html> |
|>|<html><blockquote>multi-line<br/>blockquote</blockquote></html> |
|>| !Images |
|>|{{{[img[favicon.ico]]}}} -> [img[http://www.tiddlywiki.com/favicon.ico]] |
|>| !Headings |
|>|<html><h1>!Heading H1</h1><h2>!!Heading H2</h2><h3>!!!Heading H3</h3><h4>!!!!Heading H4</h4><h5>!!!!!Heading H5</h5></html> |
|>| !Horizontal Rule |
|>|{{{----}}} |
|>|<html><hr/></html> |
|>| !Tables |
| {{{|}}} |Column Seperator |
| {{{!}}} |Header |
| {{{>}}} |Column Span |
| {{{~}}} |Row Span |
| {{{|Left |}}} |Left Align |
| {{{| Right|}}} |Right Align|
| {{{| Center |}}} |Center Align |
| {{{|Caption|c}}} |Table Caption |
|>| !Table Sample |
|>|{{{|}}} !header {{{|}}} !header {{{|}}}<html><br/></html>{{{|>|}}}colspan=2 {{{|}}}<html><br/></html>{{{|}}} rowspan {{{|}}}left align {{{|}}}<html><br/></html>{{{||}}} center {{{|}}}<html><br/></html>{{{|}}}bgcolor(green):color{{{|}}} right{{{|}}}<html><br/></html>{{{|}}}table caption{{{|}}}c<html><br/></html> |
|>| <html><table width="80%" border=1><tbody><tr><th align="center">header</th><th align="center">header</th></tr><tr><td colspan="2" align="center">colspan="2"</td></tr><tr><td rowspan="2" align="center">rowspan</td><td align="left">left align</td></tr><tr><td align="center">centered</td></tr><tr><td bgcolor="green">green</td><td align="right">right</td></tr><caption valign="bottom">table caption</caption></tbody></table></html> |

People are always mistaken about what physicists do.. Let me tell you that all physicists want to do is to write down the laws of the universe on tshirts, so that they can wear them and score on the geeky chics!!
//February 10, 2011//
//Posted at: [[http://theboxmove.weebly.com/1/post/2011/02/rebuttal-to-galileo-galellie-galeleilelo.html]]//

Hassan just [[posted|http://theboxmove.weebly.com/1/post/2011/02/galileo-galellie-galeleilelo.html]] on the misconceptions surrounding falling bodies. Now, he is right that heavier bodies do fall faster than lighter ones when there is air resistance. But his explanation is wrong. Let me go over it all over again and hope that I manage to eradicate a wrong idea from your head.

Let's start with the simple case. When there is no air resistance, for instance when your ball is falling in a vacuum, then it will fall at the same rate whatever it's mass. If you drop a heavy and a light ball they will end up splat on the ground at the same time - exactly - not a nanosecond worth of difference. And this is because of how Hassan explained it to be. When the earth pulls something down, it pulls down proportional to the weight of the body. So heavy bodies get pulled down more than light bodies, and so they fall down at the same rate.

Now let's inject some air into the scenario. Now we have air resistance. And what affects this air resistance? Three things: the type of surface, the surface area and the speed. As far as types of surfaces go, the rougher the surface the more air resistance there will be - with some subtle qualifiers I won't mention. The other thing is the total surface area. That is why a flat sheet of paper falls down slower than a ball of paper. The third thing is the speed. The faster that a body is moving through air, the more air resistance it feels. This is half the reason cars have top speeds. The faster they are going, the more the air resistance and the harder the engine has to work to push them against this resistance. On one side the resistance is increasing as your speed goes up. On the other side, your power is not increasing past a maximum. Eventually, the resistance is equal to the resistance power and you you what physicists call 'terminal velocity'. Terminal in the sense that you can't do better than it. You can't go faster without more power. This is not the reason that lighter bodies fall faster than heavier one.

Let's talk about what happens to the rate now. Does the heavier ball fall down faster than the lighter one? Yes, indeed it does. But why so? The secret is the speed. And Newton's second law. The world's most famous equation is E = mc^2. I bet if it was F = ma instead, Hassan might not have made his mistake.

Let me explain. When I say air resistance, I am talking about the force on the ball that slows it down. Imagine not dropping the two balls from the tower of Pisa. Rather, throwing them down at exactly the same speed. Now the force due to this friction at this starting moment will be same. Right? The speeds are the same and we have made the surface type and surface are the same for both balls. Then there is the force of gravity- the earth pulling down upon the balls. We know that the earth pulls down on the heavier balls more than light balls. So, then the total force that we have on heavy ball is more than on the light ball.

Now the subtle point. When we had no air resistance, the greater mass of the heavy ball compensated exactly for greater force (then just because of gravity) and we had the same acceleration. Now, this does not happen. The greater mass does not compensate for the greater force exactly. Rather, it undercompensates. And so the acceleration of the heavier body is more and so it falls faster and ends up at the bottom of the Tower of Pisa before the lighter ball.

Which is really the real explanation for why the heavier ball falls faster. The balls do not have to reach terminal velocity. They just have to fall and the interplay of air resistance, gravity and masses will be such that the heavy ball will fall faster.

(For the technical minded, the solution to the differential equation of a body falling under gravity with air resistance is determined by two parameters: b, which accounts for the resistance; and m, which accounts for the force of gravity. The solution is a complicated expression involving exponentials which is nevertheless a strictly increasing function of m.)
Around the website you will find [[non fiction|Recommended Nonfiction]], [[fiction|Recommended Fiction]], [[people|Great People]], [[text books|Recommended Textbooks]], [[movies|Recommended Movies]] and [[everything else|Miscellaneous Recommendations]] I would recommend that everyone experience.
*[[Harry Potter and the Methods of Rationality|http://www.fanfiction.net/s/5782108/1/Harry_Potter_and_the_Methods_of_Rationality]], Eliezer Yudkowsky.
*Lord of the Rings, J. R. R. Tolkien.
*The Hitchhiker's Guide to the Galaxy, Douglas Adams.
*Love Story, Eric Segal.
*The Broken Wings, Khalil Gibran.
*Sherlock Holmes, Conan Doyle.
*The Old Man and the Sea, Hemmingway.
*For Whom the Bell Tolls, Hemmingway.
Fight Club.
The Godfather I and II.
Annie Hall.
Voices of a Distant Star.
5 Centimeters Per Second.
*Gödel, Escher, Bach: An Eternal Golden Braid, Douglas Hofstadter.
*Hackers and Painters, Paul Graham.
*QED: The Strange Theory of Light and Matter, Richard Feynman.
*The Character of Physical Law, Richard Feynman.
*The Meaning of It All: Thoughts of a Citizen Scientist, Richard Feynman
*"Surely You're Joking, Mr. Feynman!": Adventures of a Curious Character, Richard Feynman.
*"What Do You Care What Other People Think?": Further Adventures of a Curious Character, Richard Feynman.
The Feynman Lectures on Physics, Richard P. Feynman, Robert B. Leighton and Matthew Sands.
Structure and Interpretation of Computer Programs, Hal Abelson, Jerry Sussman and Julie Sussman.
Electricity and Magnetism, Purcell.
|Description|MptwRoundTheme with reduced width|

<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 class='headerForeground'>
		<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
		<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
<!-- horizontal MainMenu -->
<div id='topMenu' refresh='content' tiddler='MainMenu'></div>
<!-- original MainMenu menu -->
<!-- <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> -->
<div id='Wrapper'>
	<div id='sidebar'>
		<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
		<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
	<div id='displayArea'>
		<div id='messageArea'></div>
		<div id='tiddlerDisplay'></div>



.headerForeground, .headerShadow {
	font-size: 90%;
.tiddler {
	font-size: 105%;

#Wrapper {
	width: 90em;
	margin: 0em auto;

#displayArea {
	float: left;
	width: 73em;
	margin: 1em 0em; 

#sidebar {
	position: relative;
	right: 1em;
	float: right;
	width: 16em;

#topMenu {
	padding: 0 10%;


|Description:|Allows you to easily rename or delete tags across multiple tiddlers|
|Version:|3.0 ($Rev: 5501 $)|
|Date:|$Date: 2008-06-10 23:11:55 +1000 (Tue, 10 Jun 2008) $|
|Author:|Simon Baird <simon.baird@gmail.com>|
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) {
		for (var i=0;i<tiddlers.length;i++) {

	renameTag: function(oldTag,newTag,tiddlers) {
		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

	storeMethods: {

		saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,

		saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created) {
			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":""])))

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

		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":""])))
			return this.removeTiddler_orig_renameTags(title);


	init: function() {



|Description:|Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler|
|Version:|3.0 ($Rev: 5502 $)|
|Date:|$Date: 2008-06-10 23:31:39 +1000 (Tue, 10 Jun 2008) $|
|Author:|Simon Baird <simon.baird@gmail.com>|
To use these you must add them to the tool bar in your EditTemplate

	saveCloseTiddler: {
		text: 'done/close',
		tooltip: 'Save changes to this tiddler and close it',
		handler: function(ev,src,title) {
			var closeTitle = title;
			var newTitle = story.saveTiddler(title,ev.shiftKey);
			if (newTitle)
				closeTitle = newTitle;
			return config.commands.closeTiddler.handler(ev,src,closeTitle);

	cancelCloseTiddler: {
		text: 'cancel/close',
		tooltip: 'Undo changes to this tiddler and close it',
		handler: function(ev,src,title) {
			// the same as closeTiddler now actually
			return config.commands.closeTiddler.handler(ev,src,title);



//July 18, 2011//
//Posted at: [[http://theboxmove.weebly.com/1/post/2011/07/scientific-conferences-in-pakistan.html]]//

Turns out scientific conferences at Pakistan can be reasonably good. I had the the chance of attending the National Symposium on Quantum Information Processing held at COMSATS in Islamabad early this April. The defining factor was the keynote speech by the legendary Dr. Sabieh Anwar. The others provided a good encore.

The problem was not with the research. There was some good work being presented. I won't be able to comment in detail, because I am as of yet not too familiar with the field and the work being presented was mostly experimental with a lot of jargon incomprehensible to me. Yet I could say that the quality was better than some of us would have expected.

The problem for me was with the presentation. Only two presenters were able to give a good a presentation, Dr. Sabieh Anwar and Dr. Abu Bakr Muhammad. This might seem like institutional bias. It really is not. There were clear differences in presentations. On one side were people presenting their work, and on the other a pair who was trying to make their work comprehensible to the audience, many of whom were not deeply into the field.

As proof of my being not institutionally biased I will say this out. Dr. Abu Bakr only made a good presentation. He did not talk about anything deep or very exciting. His talk was really the review of a few papers, very accessible and comprehensible to me when I looked at them later. He did not make any deep points, and though this talk was illuminating to me, I doubt it was so much for the real scientists present.

The other thing I noticed was something that has been talked about elsewhere. The conference started off with approximately over an hour of introductory speeches from various administrative members and organizers of the conference who had little to be talk of besides the accomplishments of each other. It was an elaborate set up where everyone got praised by someone or the other.

There was one good thing to remember. Dr. Sabieh and Dr. Abu Bakr made requests multiple times during the conference that the academic community needs to join hands together against the government's idea of dissolving the HEC. By the end, they managed to convince the organizing community of the their views and a resolution was quickly drafted and signed by all present.

It was an interesting conference, giving me faith that more can happen for Pakistan's scientific community, that it can grow to something that can make real and substantial contributions to human knowledge. I have hope.
|Description:|Lets you easily switch theme and palette|
|Version:|1.0.1 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Author:|Simon Baird <simon.baird@gmail.com>|
* 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. 
* {{{<<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: {

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

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);
	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:t, desc?desc:config.macros.selectTheme.label['mode'], config.macros.selectTheme.onClickTheme);
	return stopEvent(e);

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

config.macros.selectTheme.updatePalette = function(title)
	if (title != "") {
		if (title != "(default)")

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('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(); });


//June 8, 2011//
//Posted at: [[http://www.facebook.com/note.php?note_id=10150218213963293]]//

Two months ago, I made an [[open call|Passing Along the Baton]] for ideas on how to help the freshmen make a more informed choice of major. As a followup we managed to implement a few seminar sessions where we taught the freshmen some mathematics and physics. Applauds to Usman Naseer for coming up with the idea, and him and Umer Ashraf aka Umer Scientist for conducting the sessions. 

Using the age old physics and mathematics technique of generalizing everything in sight, I came up with the following idea. We managed to implement a seminar session of students taught by students. Why not do it for other subjects, and make it open to everyone? Hasnain Lakhani is already doing something along these lines in computer science. 

The problem with college is that you can only take semester big bites. Sometimes, you just one smaller ones and they don't let you take it. But suppose you want to understand group theory but not take the whole algebra course to find out? Why not find five people who are interested in the same thing and get someone who understands group theory to teach you in a couple of sessions over a week?

It's a win-win situation for everyone. The 'students' learn something they want to, and the 'instructor' gets to polish his teaching skills. And hey, don't they say you don't really understand a subject till you can teach it. 

I decided to give it some more thought. We need to reward the instructors a bit more. Since, only science is liable to be taught easily by students still in their undergraduate, I thought of SPADES. If these seminar sessions can take place under the auspices of our very beloved science society, if we work out a scheme where the instructors are rewarded in some way by the society... 

Not sure though if we really need it. I know several people who would be more than happy to teach just for the heck of teaching. 

The market would be reasonable big, I would say. Lots of people hang around the university during the vacations, and nothing better than to learn something new, eh? 

What do people think? Implementable? Doable? Wantable?
I am not afraid of silence. To be silent does not mean you are not communicating. Rather what speeches you can make in the realm of silence to your lover are unmatched by the finest of words said out loud. Nothing can compare to the story that the eyes tell, or the emotion that the touch of the hand to the hand can transfer. Love, fear, longing, happiness, these are all the inhabitants of the country of silence, who are but an unhappy lot in the land of speech. 

How the soul speaks to the soul, can tongues ever speak like that? The lovers kiss under the spring blossom, pure and beautiful, can be a lifetime in which all season come and go, but the tale of the two lovers continues. A tale without a word being spoken, but the experience of it all more powerful, deeper and longer lasting than the best poetry that the tongues and pens of men have carved out.

Silence transcends speech. Speech is the poor beggar at the doors of silence's mansion. Do not be afraid of silence. Walk into the doors, for silence is all accepting. Lose your garments and take a bath in the water drawn by silence in the silent morning from the well. Then be wreathed in the clothes woven by silence in the silent afternoons. Feast at silent table in the evening. Sleep peacefully under the silent full moon in the bed silence has prepared for you. But do not speak. Be silent and be powerful. Feel what is in the air. You will be as rich as the silence. You will have a part in the infinite and never ending treasure of silence.

But be silent.
on the path to rationality...
Abdullah Khalid
What do you get when you mate philanthropy with profit-making? Social Entrepreneurship. 

Traditionally, there were in the broad sense two kinds of organizations. One were the capitalist profit making business that in simplistic terms did all they could to mint money with no regard for the type of impact they were making on the world. On the other side were philanthropic and charity type organizations that asked countless donors to give them money so they could do some social good. Then people realized that between the two extremes - the black and white - there was a scale - the shades of gray. The idea was simple. How about create organizations whose goal is to social good but who also earn money to sustain themselves. In other words, cut out the dependence of the charity and goodwill of donors and try to make it on your own.

Take the example of [[CEMEX|http://www.cemex.com/]] who decided to sell cement and other building materials to poor households in Mexico at low cost and with the option of paying in installments. Imagine trying to get donors to pay the bills for the houses of a poor families. At best bet, you would get a couple of hundred - perhaps a few thousand - houses built before funding dries up. CEMEX took up a different approach in their program "Patrimonio Hoy" which started in 1998 and which has since then served over 150,000 families. The difference is clear.

In 1996 the Nobel Peace Prize was given to Muhammad Yunus for starting the microfinance institution, Grameen Bank. This idea is extremely innovative, and in terms of the impact it has made to the world it is simply outstanding. A typical bank does not fund the poor because the poor are unable to pay the heavy installments, and more importantly they can make much more profit by concentrating on the higher strata of society. Step in Grameen Bank and other microfinance institution who fund poor people to start simple businesses for themselves with the loans given out at very low interest rates. A poor unemployed person does not need much. A loan of a few thousand rupees can allow him to set up a small shop or buy the materials needed to start his craft workshop. The cost per person is very low. The overall impact across thousands of people is indeed Nobel Peace Prize winning.
//July 28, 2011//
//Posted at: [[http://theboxmove.weebly.com/1/post/2011/07/solving-technological-challenges.html]]//

At the recent talk on graduate school applications, Dr. Asad Abidi made two points that I would like to reiterate. The first of these was regarding senior year projects. Don't make gadgets and toys, he said. Everyone out there is making them. You have to stand out and make something that really demonstrates your skills. (My memory is pretty shaky and he might not have used these words, but the general gist is correct).

The second point was his parting message. Pakistan's problems are not going to be fixed by the current generation. They will have to be fixed the new one - us. The future is yours.

Not wonderfully new, I admit. There is something to the connection between it and the first point that I was hoping he would make, but he did not. 

See, a lot of the problems this country faces can be fixed by lazy, incompetent and corrupt politicians being replaced by hardworking, competent and honest ones. Yet, some of those problems can also be solved in different ways. Let me illustrate.

One of the biggest problems this country faces is electricity generation. We need our politicians to approve new dams, set up those new power plants etc etc. They are not going to do it fast enough, if at all. The demand keeps growing and the supply keeps falling behind.

Hassan Bukhari's solution to the above problem is the following. Make a concentrated solar power unit for individual homes that generates enough power to substantially cut down the from-grid electricity consumption. For those of you who don't know, a concentrated solar power unit uses mirrors to reflect sunlight onto a single point, the point heats up, and then you can use that heat to generate electricity or heat water or run an air chiller. These are pretty neat machines and currently have efficiencies much better than photovoltaic (solar cells) based electricity generation. The problem is that the units developed so far (and development is underway all across the world) are so expensive that the electricity savings don't recover costs quickly enough or in the lifetime of the unit.

Hence, the specific technological challenge that two teams from the batch of 2012 are trying to solve during their senior year project is making concentrated solar power units that are cheap, made from locally available material, and highly efficient.

Which is a sort of problem I believe a lot of us should be doing. The whole country is infested with technological challenges in every domain that can be solved by a group of senior year students working for an year. Don't make toys and gadgets. Solve the country's problems by being smart and coming up with solutions that don't require government officers getting off their lazy backs.

To help along with this, Hassan and I had the idea of creating a forum where people from our batch can discuss their senior year projects. Consequently we created [[http://sproj2012.tk/]]. It's a bit late granted, and a lot of people have settled on their ideas, but things haven't been formalized as yet and we hope that this forum will allow everyone to come up with the right sort of ideas for their senior year projects. 

Hala SSE!
|Author|Eric Shulman|
|Description|'convenience' classes for common formatting, alignment, boxes, tables, etc.|

These 'style tweaks' can be easily included in other stylesheet tiddler so they can share a baseline look-and-feel that can then be customized to create a wide variety of 'flavors'.

/* text alignments */
	{ display:block;text-align:left; }
	{ display:block;text-align:center; }
.center table
	{ margin:auto !important; }
	{ display:block;text-align:right; }
	{ display:block;text-align:justify; }
	{ display:block;margin:0;padding:0;border:0;margin-left:2em; }
	{ float:left; }
	{ float:right; }
.valignTop, .valignTop table, .valignTop tbody, .valignTop th, .valignTop tr, .valignTop td
	{ vertical-align:top; }
.valignBottom, .valignBottom table, .valignBottom tbody, .valignBottom th, .valignBottom tr, .valignBottom td
	{ vertical-align:bottom; }
	{ clear:both; }
	{ white-space:normal; }
	{ white-space:nowrap; }
	{ display:none; }
	{ display:inline !important; }
	{ display:span; }
	{ display:block; }
	{ position:relative; }
	{ position:absolute; }

/* font sizes */
	{ font-size:14pt;line-height:120% }
	{ font-size:12pt;line-height:120% }
	{ font-size:9pt;line-height:120% }
	{ font-size:8pt;line-height:120% }
	{ font-size:7pt;line-height:120% }
	{ font-size:6pt;line-height:120% }
	{ font-size:120%; }
	{ font-size:80%; }

/* font styles */
	{ font-weight:bold; }
	{ font-style:italic; }
	{ text-decoration:underline; }

/* plain list items (no bullets or indent) */
.nobullets li { list-style-type: none; margin-left:-2em; }

/* vertical tabsets - courtesy of Tobias Beer */
.vTabs .tabset {float:left;display:block;padding:0px;margin-top:.5em;min-width:20%;}
.vTabs .tabset .tab {display:block;text-align:right;padding:2px 3px 2px 7px; margin:0 1px 1px 0;}
.vTabs .tabContents {margin-left:20%;max-width:80%;padding:5px;}
.vTabs .tabContents .tabContents {border:none; background:transparent;}

/* multi-column tiddler content (not supported in Internet Explorer) */
.twocolumns { display:block;
	-moz-column-count:2; -moz-column-gap:1em; -moz-column-width:50%; /* FireFox */
	-webkit-column-count:2; -webkit-column-gap:1em; -webkit-column-width:50%; /* Safari */
	column-count:2; column-gap:1em; column-width:50%; /* Opera */
.threecolumns { display:block;
	-moz-column-count:3; -moz-column-gap:1em; -moz-column-width:33%; /* FireFox */
	-webkit-column-count:3; -webkit-column-gap:1em; -webkit-column-width:33%; /* Safari */
	column-count:3; column-gap:1em; column-width:33%; /* Opera */
.fourcolumns { display:block;
	-moz-column-count:4; -moz-column-gap:1em; -moz-column-width:25%; /* FireFox */
	-webkit-column-count:4; -webkit-column-gap:1em; -webkit-column-width:25%; /* Safari */
	column-count:4; column-gap:1em; column-width:25%; /* Opera */

/* page breaks */
.breakbefore { page-break-before:always; }
.breakafter { page-break-before:always; } 

/* show/hide browser-specific content for InternetExplorer vs. non-IE ("moz") browsers */
	{ display:none; } /* hide in moz (uses CSS selector) */
* html .mozOnly, *:first-child+html .mozOnly
	{ display: none; } /* hide in IE (uses IE6/IE7 CSS hacks) */

/* borderless tables */
.borderless, .borderless table, .borderless td, .borderless tr, .borderless th, .borderless tbody
	{ border:0 !important; margin:0 !important; padding:0 !important; }
.widetable, .widetable table
	{ width:100%; }

/* thumbnail images (fixed-sized scaled images) */
.thumbnail img { height:5em !important; }

/* stretchable images (auto-size to fit tiddler) */
.stretch img { width:95%; }

/* grouped content */
	{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; }
	{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#fff; color:#000; }
.menubox .button, .menubox .tiddlyLinkExisting, .menubox .tiddlyLinkNonExisting
	{ color:#009 !important; }
	{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#ffe; color:#000; }
.groupbox a, .groupbox .button, .groupbox .tiddlyLinkExisting, .groupbox .tiddlyLinkNonExisting
	{ color:#009 !important; }
.groupbox code
	{ color:#333 !important; }
	{ margin:0;padding:0;border:0;margin-left:1em; border-left:1px dotted; padding-left:.5em; }
	{ margin:0;padding:0;border:0;margin-right:1em; border-right:1px dotted; padding-right:.5em; }
	{ margin:0;padding:1px 0;border:0;border-bottom:1px dotted; margin-bottom:1px; padding-bottom:1px; }
	{ margin:0;padding:0;border:0;border-top:1px dotted; margin-top:1px; padding-top:1px; }

/* scrolled content */
.scrollbars { overflow:auto; }
.height10em { height:10em; }
.height15em { height:15em; }
.height20em { height:20em; }
.height25em { height:25em; }
.height30em { height:30em; }
.height35em { height:35em; }
.height40em { height:40em; }

/* compact form */
	{ white-space:nowrap; }
.smallform input, .smallform textarea, .smallform button, .smallform checkbox, .smallform radio, .smallform select
	{ font-size:8pt; }

/* stretchable edit fields and textareas (auto-size to fit tiddler) */
.stretch input { width:99%; }
.stretch textarea { width:99%; }

/* compact input fields (limited to a few characters for entering percentages and other small values) */
.onechar input   { width:1em; }
.twochar input   { width:2em; }
.threechar input { width:3em; }
.fourchar input  { width:4em; }
.fivechar input  { width:5em; }

/* text colors */
.white { color:#fff !important }
.gray  { color:#999 !important }
.black { color:#000 !important }
.red   { color:#f66 !important }
.green { color:#0c0 !important }
.blue  { color:#99f !important }

/* rollover highlighting */
	{color:[[ColorPalette::TertiaryLight]] !important;}
.mouseover a
	{color:[[ColorPalette::TertiaryLight]] !important;}
.selected .mouseover
	{color:[[ColorPalette::Foreground]] !important;}
.selected .mouseover .button, .selected .mouseover a
	{color:[[ColorPalette::PrimaryDark]] !important;}

/* rollover zoom text */
	{ font-size:80% !important; }
.selected .zoomover
	{ font-size:100% !important; }

/* [[ColorPalette]] text colors */
.Background	{ color:[[ColorPalette::Background]];	 }
.Foreground	{ color:[[ColorPalette::Foreground]];	 }
.PrimaryPale	{ color:[[ColorPalette::PrimaryPale]];	 }
.PrimaryLight	{ color:[[ColorPalette::PrimaryLight]];	 }
.PrimaryMid	{ color:[[ColorPalette::PrimaryMid]];	 }
.PrimaryDark	{ color:[[ColorPalette::PrimaryDark]];	 }
.SecondaryPale	{ color:[[ColorPalette::SecondaryPale]]; }
.SecondaryLight	{ color:[[ColorPalette::SecondaryLight]];}
.SecondaryMid	{ color:[[ColorPalette::SecondaryMid]];	 }
.SecondaryDark	{ color:[[ColorPalette::SecondaryDark]]; }
.TertiaryPale	{ color:[[ColorPalette::TertiaryPale]];	 }
.TertiaryLight	{ color:[[ColorPalette::TertiaryLight]]; }
.TertiaryMid	{ color:[[ColorPalette::TertiaryMid]];	 }
.TertiaryDark	{ color:[[ColorPalette::TertiaryDark]];	 }
.Error		{ color:[[ColorPalette::Error]];	 }

/* [[ColorPalette]] background colors */
.BGBackground	  { background-color:[[ColorPalette::Background]];	}
.BGForeground	  { background-color:[[ColorPalette::Foreground]];	}
.BGPrimaryPale	  { background-color:[[ColorPalette::PrimaryPale]];	}
.BGPrimaryLight	  { background-color:[[ColorPalette::PrimaryLight]];	}
.BGPrimaryMid	  { background-color:[[ColorPalette::PrimaryMid]];	}
.BGPrimaryDark	  { background-color:[[ColorPalette::PrimaryDark]];	}
.BGSecondaryPale  { background-color:[[ColorPalette::SecondaryPale]]; 	}
.BGSecondaryLight { background-color:[[ColorPalette::SecondaryLight]];	}
.BGSecondaryMid	  { background-color:[[ColorPalette::SecondaryMid]];	}
.BGSecondaryDark  { background-color:[[ColorPalette::SecondaryDark]]; 	}
.BGTertiaryPale	  { background-color:[[ColorPalette::TertiaryPale]];	}
.BGTertiaryLight  { background-color:[[ColorPalette::TertiaryLight]]; 	}
.BGTertiaryMid	  { background-color:[[ColorPalette::TertiaryMid]];	}
.BGTertiaryDark	  { background-color:[[ColorPalette::TertiaryDark]];	}
.BGError	  { background-color:[[ColorPalette::Error]];	 	}
<<allTags excludeLists>>
<<tabs txtMoreTab
'TiddlyWiki Syntax' ' ' QuickRef
'Macros' ' ' QuickMacros
<<tabs txtMoreTab "Miss" "Missing tiddlers" TabMoreMissing "Orph" "Orphaned tiddlers" TabMoreOrphans "Shad" "Shadowed tiddlers" TabMoreShadowed>>
<<allTags excludeLists>>
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
|Version:|3.3.1 ($Rev: 9828 $)|
|Date:|$Date: 2009-06-03 21:38:41 +1000 (Wed, 03 Jun 2009) $|
|Author:|Simon Baird <simon.baird@gmail.com>|
See http://mptw.tiddlyspot.com/#TagglyTagging


	parseTagExpr: function(debug) {

		if (this.trim() == "")
			return "(true)";

		var anyLogicOp = /(!|&&|\|\||\(|\))/g;
		var singleLogicOp = /^(!|&&|\|\||\(|\))$/;

		var spaced = this.
			// because square brackets in templates are no good
			// this means you can use [(With Spaces)] instead of [[With Spaces]]
			replace(/\[\(/g," [[").
			replace(/\)\]/g,"]] "). 
			// space things out so we can use readBracketedList. tricky eh?
			replace(anyLogicOp," $1 ");

		var expr = "";

		var tokens = spaced.readBracketedList(false); // false means don't uniq the list. nice one JR!

		for (var i=0;i<tokens.length;i++)
			if (tokens[i].match(singleLogicOp))
				expr += tokens[i];
				expr += "tiddler.tags.contains('%0')".format([tokens[i].replace(/'/,"\\'")]); // fix single quote bug. still have round bracket bug i think

		if (debug)

		return '('+expr+')';


	getTiddlersByTagExpr: function(tagExpr,sortField) {

		var result = [];

		var expr = tagExpr.parseTagExpr();

		store.forEachTiddler(function(title,tiddler) {
			if (eval(expr))

			sortField = "title";

		result.sort(function(a,b) {return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);});
		return result;

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':",
			exprLabel:  "Matching tag expression '%0':",
			excerpts:   "excerpts",
			descr:      "descr",
			slices:     "slices",
			contents:   "contents",
			sliders:    "sliders",
			noexcerpts: "title only",
			noneFound:  "(none)"

		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"

		tooDeepMessage: "* //sitemap too deep...//"

	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: "/%"+"%/",
		siteMapDepthLimit: 25

	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) {
		// create it silently if it doesn't exist
		if (!store.tiddlerExists(title)) {
			store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),"");

			// <<tagglyTagging expr:"...">> creates a tiddler to store its display settings
			// Make those tiddlers less noticeable by tagging as excludeSearch and excludeLists
			// Because we don't want to hide real tags, check that they aren't actually tags before doing so
			// Also tag them as tagglyExpression for manageability
			// (contributed by RA)
			if (!store.getTaggedTiddlers(title).length) {

		// 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);
		// supposed to automagically don't let cols cycle up past the number of items
		// currently broken in some situations, eg when using an expression
		// lets fix it later when we rewrite for jquery
		// the columns thing should be jquery table manipulation probably
		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);

	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() {
					return false;
			else {
				onclick = function() {
					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() {
				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++) 

		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
		return newTable;

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

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

	getTiddlers: function(titleOrExpr,sortBy,isTagExpr) {
		return isTagExpr ? store.getTiddlersByTagExpr(titleOrExpr,sortBy) : store.getTaggedTiddlers(titleOrExpr,sortBy);

	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,isTagExpr) {

		var list = config.taggly.getTiddlers(title,this.getTagglyOpt(title,"sortBy"),isTagExpr);

		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);
					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,isTagExpr) {
		var sortBy = this.getTagglyOpt(title,"sortBy");
		var sortOrder = this.getTagglyOpt(title,"sortOrder");

		var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);

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

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

		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)

		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")
		else if (leftOverOutput != "")
			// leftovers first...

		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...

		return this.drawTable(place,


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

		var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);

		if (sortOrder == "desc")

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

		var childOutput = "";

		if (depth > this.config.siteMapDepthLimit)
			childOutput += indent + this.lingo.tooDeepMessage;
			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,false);

		if (depth == 0)
			return childOutput;
			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,isTagExpr) {
		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"),isTagExpr);
		return this.drawTable(place,
				this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic

	macros: {
		tagglyTagging: {
			handler: function (place,macroName,params,wikifier,paramString,tiddler) {
				var parsedParams = paramString.parseParams("tag",null,true);
				var refreshContainer = createTiddlyElement(place,"div");

				// do some refresh magic to make it keep the list fresh - thanks Saq

				var tag = getParam(parsedParams,"tag");
				var expr = getParam(parsedParams,"expr");

				if (expr) {
				else {
					if (tag) {
					else {

			refresh: function(place) {
				var title = place.getAttribute("title");
				var isTagExpr = place.getAttribute("isTagExpr") == "true";
				var showEmpty = place.getAttribute("showEmpty") == "true";
				var countFound = config.taggly.getTiddlers(title,'title',isTagExpr).length
				if (countFound > 0 || showEmpty) {
					var lingo = config.taggly.lingo;
					if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
								isTagExpr ? lingo.labels.exprLabel.format([title]) : lingo.labels.label.format([title]));
						if (countFound == 0 && showEmpty)

	// 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,",
" {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; }",
".tagglyNoneFound { margin-left:2em; color:[[ColorPalette::TertiaryMid]]; font-size:90%; font-style:italic; }",

	init: function() {
		config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;



By Saq Imtiaz

// 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");
			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;


|''Description:''|A simple task manager|
|''Date:''|Sep 11, 2006|
|''Documentation:''|[[TaskOrganizerPlugin Documentation|TaskOrganizerPluginDoc]]|
|''Author:''|Paulo Soares|
|''License:''|[[Creative Commons Attribution-Share Alike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Requires:''|CheckboxPlugin (Eric Shulman), InlineJavascriptPlugin (Eric Shulman) and PartTiddlerPlugin (Udo Borkowski)|
|''Optional:''|ReminderMacros (Jeremy Sheeley)|
config.macros.button = {};

config.macros.button.handler=function(place,macroName,params,wikifier,paramString,tiddler) {
 if(params.length<3) return;
 var myFunction = eval(params[2]);

config.macros.taskOrganizer = {};

config.macros.taskOrganizer.options = {
 pendingTask: "Pending",
 completedTask: "Completed",
 newTask: {label: "New task", tooltip: "Add a new task"},
 addTaskCategory: {label: "New category", tooltip: "Add a new task category"},
 deleteTaskCategory: {label: "Delete category", tooltip: "Delete this task category"},
 deleteCategoryConfirmation: "Are you sure you want to delete this category?",
 deleteTasksConfirmation: "Are you sure you want to delete all tasks associated to the category?",
 newTaskCategoryPrompt: "Enter the new task category name:"

config.macros.taskOrganizer.addCategory = function() {
 var cm = config.macros.taskOrganizer;
 if(typeof arguments[0] != 'string'){
 var newTask = prompt(cm.options.newTaskCategoryPrompt,"");
 var rebuild = false;
 var taskTag = this.parentNode.getAttribute("tag");
 var title = this.parentNode.getAttribute("tiddlerTitle");
 } else {
 var newTask = arguments[0];
 var holder= document.getElementById("tiddler"+arguments[1]);
 var taskTag = holder.getAttribute("tag");
 var title = arguments[1];
 var rebuild = true;
 if(!newTask) return;

 var tabTiddler = new Tiddler();
 tabTiddler.title = title+ ":" + newTask;
 tabTiddler.tags[0] = taskTag;
 tabTiddler.tags[1] = "excludeLists";
 tabTiddler.modifier = config.options.txtUserName;
 var titleTask = newTask.replace(/ /g,"=");

 tabTiddler.text = "<<tabs \"top" + title + ":" + titleTask + "\"\n" + cm.options.pendingTask + " " + cm.options.pendingTask + " \"" + title + ":" + newTask + "/Pending" + "\"\n";
 tabTiddler.text += cm.options.completedTask + " " + cm.options.completedTask + " \"" + title + ":" + newTask + "/Completed" + "\"\n>>\n";
 tabTiddler.text += "<<button '" + cm.options.newTask.label + "' '" + cm.options.newTask.tooltip + "' 'config.macros.taskOrganizer.newTask'>>";
 tabTiddler.text += " <<button '" + cm.options.deleteTaskCategory.label + "' '" + cm.options.deleteTaskCategory.tooltip + "' 'config.macros.taskOrganizer.deleteCategory'>>\n";

 tabTiddler.text += "<part Pending hidden>";
 tabTiddler.text += "<script>\n var list = \"\";\n";
 tabTiddler.text += "var tiddlers = store.getTaggedTiddlers(\"" + taskTag + "." + newTask + "\", \"created\");\n";
 if(config.macros.reminders) tabTiddler.text += "var regexp = new RegExp(\"<<re\"+\"minder .+>>\", \"g\");\n"
 tabTiddler.text += "for(var i=0; i<tiddlers.length; i++){\nif(!tiddlers[i].tags.contains (\"completed\")){\nvar newEntry=tiddlers[i].title.split(\"#\");\nlist+=\"[X(\"+tiddlers[i].title+\":completed)] [[\"+newEntry[newEntry.length-1]+\"|\"+tiddlers[i].title+\"]]\\n\";\n";
 tabTiddler.text += "var reminder = tiddlers[i].text.match(regexp);\n";
 tabTiddler.text += "if(reminder){\n for(var j=0; j<reminder.length; j++){\n list += \"*\" + reminder[j] + \"\\n\";}}";
 tabTiddler.text+= "}}\n return list;\n";
 tabTiddler.text += "</script>";
 tabTiddler.text += "</part>\n";

 tabTiddler.text += "<part Completed hidden>";
 tabTiddler.text += "<script>\n var list = \"\";\n";
 tabTiddler.text += "var tiddlers = store.getTaggedTiddlers(\"" + taskTag + "." + newTask + "\", \"created\");\n";
 tabTiddler.text += "for(var i=0; i<tiddlers.length; i++){if(tiddlers[i].tags.contains (\"completed\")){\n var newEntry=tiddlers[i].title.split(\"#\");\nlist+=\"[X(\"+tiddlers[i].title+\":completed)] [[\"+newEntry[newEntry.length-1]+\"|\"+tiddlers[i].title+\"]]\\n\";}}\n";
 tabTiddler.text+= "return list;\n";
 tabTiddler.text += "</script>";
 tabTiddler.text += "</part>";

 if(!rebuild) story.refreshTiddler(title,DEFAULT_VIEW_TEMPLATE,true);

 if(typeof arguments[0] != 'string'){
 var category = this.parentNode.firstChild.className.split(":")[1];
 category = category.replace(/=/g," ");
 var rebuild = false;
 var taskTag = this.parentNode.parentNode.parentNode.getAttribute("tag");
 var title = this.parentNode.parentNode.parentNode.getAttribute("tiddlerTitle");
 } else {
 var category = arguments[0].split(":")[1];
 var rebuild = true;
 var holder= document.getElementById("tiddler"+arguments[1]);
 var taskTag = holder.getAttribute("tag");
 var title = arguments[1];

 var cm = config.macros.taskOrganizer;
 var conf = true;
 if(!rebuild) conf = confirm(cm.options.deleteCategoryConfirmation); 
 store.removeTiddler(title+ ":" + category);
 var tiddlers = store.getTaggedTiddlers(taskTag + "." + category);
 conf = confirm(cm.options.deleteTasksConfirmation); 
 for(var i=0; i<tiddlers.length; i++) store.removeTiddler(tiddlers[i].title);

 var category = this.parentNode.firstChild.className.split(":")[1];
 category = category.replace(/=/g," ");
 var cm = config.macros.taskOrganizer;
 var taskTag = this.parentNode.parentNode.parentNode.getAttribute("tag");
 var title = this.parentNode.parentNode.parentNode.getAttribute("tiddlerTitle");
 var tiddlerName = title + "#" + category + "#";
 var newTiddler = new Tiddler();
 newTiddler.title = tiddlerName;
 newTiddler.tags[0] = taskTag + "." + category;
 newTiddler.tags[1] = "excludeLists";
 newTiddler.modifier = config.options.txtUserName;
 newTiddler.text = "<<newReminder>>";
 } else {newTiddler.text = "";}

config.macros.taskOrganizer.handler=function(place,macroName,params,wikifier,paramString,tiddler) {
 if(!(version.extensions.CheckboxPlugin && version.extensions.inlineJavascript && version.extensions.PartTiddlerPlugin)){
 var text = "Some required macros are missing!\nPlease check the requirements of this macro [[here|TaskOrganizerPlugin]].";
 } else {
 if(!params) return;
 var taskTag=params[0];
 var rebuild = false;
 if(params[1]=='rebuild') rebuild = true;
 var cm = config.macros.taskOrganizer;
 var tiddlerTitle;
 var tiddlers = store.getTaggedTiddlers(taskTag,"modified");
 var title = tiddler.title;
 var holder= document.getElementById("tiddler"+title);
 var text = "<<tabs 'top" + title + "'\n";
 for(var i=0; i<tiddlers.length; i++) cm.deleteCategory(tiddlers[i].title.split(":")[1], title);
 for(var i=0; i<tiddlers.length; i++) cm.addCategory(tiddlers[i].title.split(":")[1], title);
 for(var i=0; i<tiddlers.length; i++){
 tiddlerTitle = tiddlers[i].title.substring(title.length+1);
 text += "\"" + tiddlerTitle + "\" \"" + tiddlerTitle + "\" [[" + tiddlers[i].title + "\]]\n";
 text += ">>\n";
 text += "<<button '" + cm.options.addTaskCategory.label + "' '" + cm.options.addTaskCategory.tooltip + "' 'config.macros.taskOrganizer.addCategory'>>";

config.shadowTiddlers.TaskOrganizerPluginDoc="The documentation is available [[here.|http://www.math.ist.utl.pt/~psoares/addons.html#TaskOrganizerPluginDoc]]";

A blog run by students from LUMS, mainly from various science majors. It can be found online at [[here|http://theboxmove.weebly.com]].
//February 10, 2011//
//Posted at: [[http://theboxmove.weebly.com/1/post/2011/02/the-huckleberry-boot-camp.html]]//

I attended a talk today that I can only call a 'boot camp', in the way that we were treated by the speaker Dr. A.T. Huckleberry. He worked us hard - very very hard - and in the process taught us something that can never be taught any other way.

The idea that he was trying to drive home was perhaps simple. It wasn't even new. It has been said before. Rather, it was the way he made us realize it that was impressive.

He started off by picking up a very simple thing, the position of a particle. Then he asked us //what we meant by position//. Somebody tried to define position in terms of coordinate axes. //But then what is a coordinate?// Some random mumbling on our behalf, or as he called it //blah blah//. Then, //let me simplify it a bit, what is 'x'?// Blank stares. Some more random mumbling. //blah blah, tell me what 'x' is?// This went on for quite a while. Any answer we gave was not good enough for him. Simply because we did not know the answer. He pushed us. He made fun of us. He picked out problems in our naive views when we dared present them. Yet he kept the pressure on. Kept pushing us to come up with something substantial, but mostly what we did come up with was just //blah blah//.

There were lot of smart people in that auditorium. People from physics, mathematics, computer science. From sophomores to seniors to transfer students. Yet all of us sat there, feeling completely stupid and realizing that we did not know the answer to the most simplest of questions.  No one complained. No one felt bad that we were being insulted. We knew we deserved it. Every bit of it. And finally, when he did reveal the answer, when he did tell us what 'x' really was, I at least wanted to shoot myself. Because it was so simple. It was a simple question with a simple answer. But we did not know it.

People have always said that we must always concentrate on the fundamentals. Not just scientists. I have seen football coaches scream it out in practice, philosophers do it all the time, drill instructors at boot camps do it. I myself have always believed it - something I learned from football. I have never really understood how Quantum Mechanics - let alone Quantum Field Theory - can be taught by spending months on Functional Analysis. Something akin to what Feynman used to do. Daniel Hillis [[describes how he taught him|http://longnow.org/essays/richard-feynman-connection-machine/]], " "Don't say 'reflected acoustic wave.' Say [echo]." Or, "Forget all that 'local minima' stuff. Just say there's a bubble caught in the crystal and you have to shake it out." Nothing made him angrier than making something simple sound complicated."

Yet, when I went through our own little one hour boot camp, did I truly realize what concentrating on the fundamentals really meant. In the way [[Donald Rumsfeld would have said|http://en.wikipedia.org/wiki/There_are_known_knowns]] it. Before there were things I knew that I did not know. So I used to try to know them. But Huckleberry showed me stuff that I did not know that I did not know - the unknown unknowns. That was humbling.

Huckleberry also showed us the way to go about learning this stuff. He suggested that we always ask ourselves the "minus one question". If do go down deep into some field, we usually stop when we have answered the first question or the zeroth question. He said that we must go down one step more and ask ourselves the minus one question. Smart.

All I wish for is that we had lectures like this every so often, boot campish as they might be.
[[TiddlyWiki|http://tiddlywiki.com]] is 'a reusable non-linear web notebook', created by Jeremy Ruston, and maintained by him and a very active community.

|Description:|Makes a checkbox which toggles a tag in a tiddler|
|Version:|3.1.0 ($Rev: 4907 $)|
|Date:|$Date: 2008-05-13 03:15:46 +1000 (Tue, 13 May 2008) $|
|Author:|Simon Baird <simon.baird@gmail.com>|
{{{<<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
|{{{<<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'>>|
* 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;


	toggleTag: {

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

		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			var tiddlerTitle = tiddler ? tiddler.title : '';
			var tag   = (params[0] && params[0] != '.') ? params[0] : "checked";
			var title = (params[1] && params[1] != '.') ? params[1] : tiddlerTitle;
			var defaultLabel = (title == tiddlerTitle ? 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 == tiddlerTitle ? 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);
						return false;
				if ((touchMod != "" || config.toggleTagAlwaysTouchModDate) && theTiddler)
						theTiddler.modified = new Date();
				return true;


Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.

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

// 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)
window.showBackstage = true; // show backstage too

// 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(/^/,"[[WelcomeToTiddlyspot]] ");
	MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");

// create some shadow tiddler content

 "tiddlyspot password:",
 "<<option pasUploadPassword>>",

 "| 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/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"

 "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.org|http://tiddlywiki.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."

 "<<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>"

| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 03/08/2011 18:47:15 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . |
| 28/08/2011 18:22:54 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . |
| 28/08/2011 18:26:47 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . |
| 28/08/2011 18:31:12 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . |
| 28/08/2011 18:31:17 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . | ok |
| 15/11/2011 00:02:36 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . |
| 18/01/2012 16:02:04 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . | ok |
| 18/01/2012 16:03:05 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . |
| 03/07/2012 03:18:26 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . | ok |
| 03/07/2012 04:42:05 | Abdullah Khalid | [[/|http://abd.tiddlyspot.com/]] | [[store.cgi|http://abd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://abd.tiddlyspot.com/index.html]] | . |
|''Description:''|Save to web a TiddlyWiki|
|''Date:''|Feb 24, 2008|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
version.extensions.UploadPlugin = {
	major: 4, minor: 1, revision: 3,
	date: new Date("Feb 24, 2008"),
	source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	coreVersion: '2.2.0'

// 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)
	var label;
	if (document.location.toString().substr(0,4) == "http") 
		label = this.label.saveLabel;
		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
		if (!params) params = {};
		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) {
			return false;
		if (config.macros.upload.authenticateUser && (!username || !password)) {
			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();
		var markList = wizard.getElement("markList");
		var listWrapper = document.createElement("div");
		var uploadCaption;
		if (document.location.toString().substr(0,4) == "http") 
			uploadCaption = config.macros.upload.label.saveLabel;
			uploadCaption = config.macros.upload.label.uploadLabel;
				{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption, 
					onClick: config.macros.upload.action},
				{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
	options: [
	refreshOptions: function(listWrapper) {
		var opts = [];
		for(i=0; i<this.options.length; i++) {
			var opt = {};
			opt.option = "";
			n = this.options[i];
			opt.name = n;
			opt.lowlight = !config.optionsDesc[n];
			opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
		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) {
	onCancel: function(e)
		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) {
		if (bidix.debugMode) 
		// Locate the storeArea div's 
		var posDiv = locateStoreArea(original);
		if((posDiv[0] == -1) || (posDiv[1] == -1)) {
	if(onlyIfDirty && !store.isDirty())
	// save on localdisk ?
	if (document.location.toString().substr(0,4) == "file") {
		var path = document.location.toString();
		var localPath = getLocalPath(path);
	// get original
	var uploadParams = new 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);
	if (bidix.debugMode) 
		alert("about to execute Http - GET on "+originalPath);
	var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
	if (typeof r == "string")
	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:")));
		} else {
	// do uploadRss
	if(config.options.chkGenerateAnRssFeed) {
		var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
		var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
		var rssString = generateRss();
		// no UnicodeToUTF8 conversion needed when location is "file" !!!
		if (document.location.toString().substr(0,4) != "file")
			rssString = convertUnicodeToUTF8(rssString);	
	} else {

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:")));
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
		} else {
	// do uploadMain
	var revised = bidix.upload.updateOriginal(original,posDiv);

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 == 404)
		if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
			if (responseText.indexOf("Debug mode") >= 0 )
				responseText = responseText.substring(responseText.indexOf("\n\n")+2);
		} else if (responseText.charAt(0) != '0') 
		if (responseText.charAt(0) != '0')
			status = null;
	// 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; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
	if (typeof r == "string")
	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)) {
	var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
				store.allTiddlersAsHtml() + "\n" +
	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();
	return this;

bidix.UploadLog.prototype.addText = function(text) {
	if (!this.tiddler)
	// 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)
			this.tiddler.text = textArray.join('\n');		
	// update tiddler fields
	this.tiddler.modifier = config.options.txtUserName;
	this.tiddler.modified = new Date();
	// refresh and notifiy for immediate update
	store.notify(this.tiddler.title, true);

bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir,  backupDir) {
	if (!this.tiddler)
	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 + " |";

bidix.UploadLog.prototype.endUpload = function(status) {
	if (!this.tiddler)
	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) 
	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) 
	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");

	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

// Backstage
	uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}


//August 2, 2011//

White tufts of clouds spread across the evening sky. The sun sinks into the west, down out of sight. One shaft of light, one last shaft reaches across the sky from west to east. It hits the white rim of a great tuft turning it into gold. Down north lightening among the evening clouds. A broken heart under a sweat drenched chest.
I go through a rewrite of my belief system every couple of years. Anything written two years previous to your reading it should be considered obsolete and not my opinion in any way.

Please check out [[The Box Move|http://theboxmove.weebly.com/blog.html]]. My posts there are tagged [[The Box Move]].

|Description:|A place to put your config tweaks so they aren't overwritten when you upgrade MPTW|
See http://www.tiddlywiki.org/wiki/Configuration_Options for other options you can set. In some cases where there are clashes with other plugins it might help to rename this to zzMptwUserConfigPlugin so it gets executed last.

// example: set your preferred date format
//config.mptwDateFormat = 'MM/0DD/YY';
//config.mptwJournalFormat = 'Journal MM/0DD/YY';

config.options.chkAnimate = false;
config.options.chkAutoSave = false;
config.options.chkCaseSensitiveSearch = false;
config.options.ckhConfirmDelete = true;
config.options.chkHttpReadOnly = false;
config.options.chkIncrementalSearhc = true;
config.options.chkInsertTabs = false;
config.options.chkOpenInNewWindow = true;
config.options.chkRegExpSearch = true;
config.options.chkSaveBackups = false;
config.options.chkSaveEmptyTemplate = false;
config.options.txtMainTab = 'All';
config.options.txtMoreTab = 'Shad';
config.options.chkSliderOptionsPanel = false;
config.options.txtTheme = "MptwRoundTheme";
config.options.txtUploadUserName = "Abdullah Khalid";
config.options.txtUserName = "Abdullah Khalid";