Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
{{firstletter{I}}} was born in [[Urumqi|http://en.wikipedia.org/wiki/%C3%9Cr%C3%BCmqi]], which is the capital of the Xinjiang Uyghur Autonomous Region of [[China|http://en.wikipedia.org/wiki/People%27s_Republic_of_China]]. I got my Bachelor's degree in Beijing Institute of Technology ([[BIT|http://english.bit.edu.cn/]]) in 2000 and Master's degree in Delft University of Technology ([[TUDelft|http://home.tudelft.nl/en/]]) in 2004 respectively. Since April 2005, I joined Prof. Thomas Bäck's group and began my <nowiki>PhD</nowiki> research. At present I am a <nowiki>postdoc</nowiki> at the department of Leiden Institute of Advanced Computer Science ([[LIACS|http://www.liacs.nl/home-english]]), [[Leiden University|http://www.leidenuniv.nl/en/index.html]] in the Netherlands.
* ''IEEE CEC student travel grants'', Hong Kong, China, 2008
* ''Best paper award'', <nowiki>EvoIASP'08</nowiki>, Napoli, Italy, 2008
* ''<nowiki>EvoIASP'07 student travel award</nowiki>'', Valencia, Spain, 2007
* ''ACM student travel award'', GECCO'06, Seattle, Washington, USA, 2006
* ''Best paper nomination'', <nowiki>EvoIASP'06</nowiki>, Budapest, Hungary, 2006
* ''<nowiki>EvoIASP'06 student travel award</nowiki>'', Budapest, Hungary, 2006
* ''The Leiden University Fund (LUF) award'', 2006
* ''Information engineering scholarship'', Beijing Institute of Technology (BIT), Beijing, China, 2000
* ''Excellent student award'', Beijing Institute of Technology (BIT), Beijing, China, 1998, 1999
* ''Excellent student award'', Xinjiang Uyghur Autonomous Region, China, 1996
[[Welcome]]
[[Research]]
[[Publications]]
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>>
Type the text for 'InterfaceOptions'
/***
|''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. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''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|
***/
//{{{
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);
}
//}}}
[[About Me]]
[[Research]]
[[Publications]]
[[Teaching]]
[[Awards]]
<<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
''//Rui Li (@@color(blue):ruili@liacs.nl@@)//''
''//Researcher@LIACS//''
<!--{{{-->
<div id='header' class='header'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu'>
<span refresh='content' tiddler='MainMenu'></span>
<span id='noticeBoard' refresh='content' tiddler='NoticeBoard'></span>
</div>
<div id='sidebar'>
<span class='searchBar' macro='search'></span>
<div id='sidebarOptions' refresh='content' tiddler='MochaSideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<div id='contentFooter' refresh='content' tiddler='contentFooter'></div>
<!--}}}-->
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
!!!Journal
*''<nowiki>Mixed-Integer</nowiki> Evolution Strategies for Parameters Optimization''. Rui Li, Michael T.M. Emmerich, Jeroen Eggermont, Thomas Bäck, Martin Schutz, Jouke Dijkstra, and Hans Reiber. Revising and will be resubmitted to Evolutionary Computation, MIT Press.
!!!Book Chapter
*''Optimizing A Medical Image Analysis System Using <nowiki>Mixed-Integer</nowiki> Evolution Strategies''. Rui Li, Michael T.M. Emmerich, Jeroen Eggermont, Ernst G.P. Bovenkamp, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. To appear in Evolutionary Image Analysis and Signal Processing, Studies in Computational Intelligence series, Springer, 2009. [[Download link|http://www.springer.com/engineering/book/978-3-642-01635-6?detailsPage=toc]]
!!!Peer Reviewed Conference Proceedings
*''How to Do Recombination in Evolution Strategies: An Empirical Study''. Juan Chen, Michael T. M. Emmerich, Rui Li, Joost Kok and Thomas Bäck. Third International Work Conference on the Interplay Between Natural and Artificial Computation, IWINAC 2009, Santiago de Compostela, Spain, June 22-26, 2009. [[Download link|http://www.springerlink.com/content/lv524l341x087877/]]
*''<nowiki>Mixed-Integer</nowiki> Bayesian Optimization Utilizing <nowiki>A-Priori</nowiki> Knowledge on Parameter Dependencies''. Michael T.M. Emmerich, Rui Li, Anyi Zhang, Ildiko Flesch and Peter Lucas. The 20th <nowiki>Belgian-Netherlands</nowiki> Conference on Artificial Intelligence (BNAIC 08), Enschede, the Netherlands, 2008.
*''<nowiki>Mixed-Integer</nowiki> Evolution Strategies with Dynamic Niching''. Rui Li, Jeroen Eggermont, Ofer M. Shir, Michael T.M. Emmerich, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. To appear in 10th International Conference on Parallel Problem Solving From Nature (PPSN X), Dortmund, Germany, 2008. [[Download link|http://www.springerlink.com/content/03xqm5g7156n1742/]]
*''<nowiki>Metamodel-Assisted Mixed-Integer</nowiki> Evolution Strategies and Their Applications to <nowiki>Intravascular Ultrasound</nowiki> Image Analysis''. Rui Li, Michael T.M. Emmerich, Jeroen Eggermont, Ernst G.P. Bovenkamp, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. Proceedings of IEEE CEC, Hong Kong, China, 2008. [[Download link|http://ieeexplore.ieee.org/search/wrapper.jsp?arnumber=4631169]]
*''Optimizing Computed Tomographic Angiography Image Segmentation using Fitness Based Partitioning''. Jeroen Eggermont, Rui Li, Ernst G.P. Bovenkamp, Henk Marquering, Michael T.M. Emmerich, Aad van der Lugt, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. To appear in the proceedings of the 10th european workshop on evolutionary computation in image analysis and signal processing (<nowiki>EvoIASP</nowiki>), Napoli, Italy, 2008. @@color(red):''(Best Paper Award)''@@ [[Download link|http://www.springerlink.com/content/a6v178p44pp480h1/]]
*''Towards Dynamic Fitness Based Partitioning for <nowiki>Intravascular Ultrasound</nowiki> Image Analysis''. Rui Li, Jeroen Eggermont, Michael T.M. Emmerich, Ernst G.P. Bovenkamp, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. Proceedings of the 9th european workshop on evolutionary computation in image analysis and signal processing (<nowiki>EvoIASP</nowiki>), LNCS 4448, 391-398, Valencia, Spain, 2007. [[Download link|http://www.springerlink.com/content/gn3438p401271950/]]
*''Optimizing IVUS Lumen Segmentations using Evolutionary Algorithms''. Ernst G.P. Bovenkamp, Jeroen Eggermont, Rui Li, Michael T.M. Emmerich, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. Proceedings of the 10th international conference conference on medical image computing and computer assisted intervention (MICCAI), Copenhagen, Denmark, 2006.
*''<nowiki>Mixed-Integer NK Landscapes</nowiki>''. Rui Li, Michael T.M. Emmerich, Jeroen Eggermont, Ernst G.P. Bovenkamp, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. Proceedings of the 9th international conference on parallel problem solving from nature (PPSN IX), LNCS 4193, 42-51, Reykjavik, Iceland, 2006. [[Download link|http://www.springerlink.com/content/j156u7333738681m/]]
*''<nowiki>Mixed-Integer</nowiki> Optimization of Coronary Vessel Image Analysis using evolution strategies''. Rui Li, Michael T.M. Emmerich, Jeroen Eggermont, Ernst G.P. Bovenkamp, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. Proceeding of genetic and evolutionary computation conference (GECCO), 1645-1652, Seattle, Washington, USA, 2006. [[Download link|http://portal.acm.org/citation.cfm?doid=1143997.1144268]]
*''<nowiki>Mixed-Integer</nowiki> Evolution Strategies and Their Application to <nowiki>Intravascular Ultrasound</nowiki> Image Analysis''. Rui Li, Michael T.M. Emmerich, Ernst G.P. Bovenkamp, Jeroen Eggermont, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. Proceeding of 8th european workshop on evolutionary computation in image analysis and signal processing (<nowiki>EvoIASP</nowiki>), LNCS 3907, 415-426, Budapest, Hungary, 2006. @@color(red):''(Best Paper Award Nomination)''@@ [[Download link|http://www.springerlink.com/content/n706705p121716j1/]]
*''Optimizing Parameters of <nowiki>Intravascular Ultrasound</nowiki> Image Analysis using <nowiki>Mixed-Integer</nowiki> Evolution Strategies''. Rui Li, Michael T.M. Emmerich, Thomas Bäck, Ernst G.P. Bovenkamp, Jeroen Eggermont, Jouke Dijkstra, and Hans Reiber. Proceedings of adaptive computing in design and manufacture (ACDM), Bristol, UK, 2006.
!!!Abstract
*''Gaussian Process Models for Metamodeling and Optimization in <nowiki>Mixed-Integer</nowiki> Spaces'', Rui Li, Jeroen Eggermont and Michael Emmerich. Workshop on Optimizing Drug Design, July, 2009.
*''Towards Dynamic Fitness Based Partitioning for <nowiki>Intravascular Ultrasound</nowiki> Image Analysis''. Rui Li, Jeroen Eggermont, Michael T.M. Emmerich, Ernst G.P. Bovenkamp, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. Proceedings of the 19th <nowiki>Belgium-Netherlands</nowiki> conference on artificial intelligence (BNAIC), Utrecht, The Netherlands, 2007.
*''Extending NK Landscapes to the <nowiki>Mixed-Integer</nowiki> Domain''. Jeroen Eggermont, Ernst G.P. Bovenkamp, Rui Li, Michael T.M. Emmerich, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. Proceedings of the 18th <nowiki>Belgium-Netherlands</nowiki> conference on artificial intelligence (BNAIC), Namur, Belgium, 2006.
*''Optimizing Parameters of Coronary Vessel Image Analysis using Evolution Strategies''. Michael T.M. Emmerich, Rui Li, Jeroen Eggermont, Ernst G.P. Bovenkamp, Thomas Bäck, Jouke Dijkstra, and Hans Reiber. Proceedings of the 18th <nowiki>Belgium-Netherlands</nowiki> conference on artificial intelligence (BNAIC), Namur, Belgium, 2006.
{{firstletter{N}}}ow I am a <nowiki>Postdoc</nowiki> at the department of Leiden Institute of Advanced Computer Science ([[LIACS|http://www.liacs.nl/home-english]]), [[Leiden University|http://www.leidenuniv.nl/en/index.html]] in the Netherlands. The research project which I am currently working on is called "[[SCALOPES|http://www.scalopes.eu/]]". More specifically, I am interested in Automated Design of Software Architectures using Model Transformations and Multi-objective Optimization.
My <nowiki>PhD</nowiki> research project is called "[[SAVAGE|http://www.lumc.nl/rep/cod/redirect/1010/lkebhome/english/research/ivus_cta_mi/ivus_savage/lkeb_ivus_savage.html]]" (<nowiki>Self-Adaptation</nowiki> of Vision Agents Through Genetic Evolution). This research project is funded by The Netherlands Organisation for Scientific ([[NWO|http://www.nwo.nl/nwohome.nsf/pages/SPPD_5R2QE7_Eng]]) and is carried out through co-operation between LIACS and [[LKEB|http://www.lumc.nl/rep/cod/redirect/1010/lkebhome/english/home_lkeb_english.html]]. At present I am preparing for my doctor thesis titled ''"<nowiki>Mixed-Integer</nowiki> Evolution Strategies for Parameter Optimization and Their Applications to Medical Image Analysis"''.
!!!Research Areas
* Multi-objective Optimization and their applications to Automated Design of Software Architectures
* Evolutionary Algorithms (<nowiki>EAs</nowiki>), in particular <nowiki>Mixed-Integer</nowiki> Evolution Strategies (ES) and their applications to real-world parameter optimization problems, e.g. parameter optimization for medical image analysis system.
* Ant colony optimization (ACO).
* Neural network such as radial basis function networks (RBFN).
* Bayesian network.
@@font-family:"Cambria";Rui Li@@
/*{{{*/
/*Mocha TiddlyWiki Theme*/
/*Version 1.0*/
/*Design and CSS originally by Anthonyy, ported to TiddlyWiki by Saq Imtiaz.*/
/*}}}*/
/*{{{*/
#contentWrapper{
margin: 0 3.4em;
font-family: Lucida Grande, Tahoma, Arial, Helvetica, sans-serif; /* Lucida Grande for the Macs, Tahoma for the PCs */
font-size: 11px;
line-height: 1.6em;
color: #666;
}
.firstletter{ float:left; width:0.75em; font-size:400%; font-family:times,arial; line-height:60%; }
.header {
background: #fff;
padding-top: 10px;
clear: both;
border-bottom: 4px solid #948979;
}
.headerShadow { padding: 2.6em 0em 0.5em 0em; }
.siteTitle {
font-family: 'Trebuchet MS' sans-serif;
font-weight: bold;
font-size: 32px;
color: #CC6633;
margin-bottom: 30px;
background-color: #FFF;
}
.siteTitle a{color:#CC6633; border-bottom:1px dotted #cc6633;}
.siteSubtitle {
font-size: 1.0em;
display: block;
margin: .5em 3em; color: #999999;
}
#mainMenu {
position:relative;
float:left;
margin-bottom:1em;
display:inline;
text-align:left;
padding: 2em 0.5em 0.5em 0em;
width:13em;
font-size:1em;
}
#sidebar{
position:relative;
float:right;
margin-bottom:1em;
padding-top:2em;
display:inline;
}
#displayArea {
margin: 0em 17em 0em 15em;
}
.tagClear {clear:none;}
#contentFooter {background:#575352; color:#BFB6B3; clear: both; padding: 0.5em 1em;}
#contentFooter a {
color: #BFB6B3;
border-bottom: 1px dotted #BFB6B3;
}
#contentFooter a:hover {
color: #FFFFFF;
background-color:#575352;
}
a,#sidebarOptions .sliderPanel a{
color:#CC6714;
text-decoration: none;
}
a:hover,#sidebarOptions .sliderPanel a:hover {
color:#CC6714;
background-color: #F5F5F5;
}
.viewer .button, .editorFooter .button{
color: #666;
border: 1px solid #CC6714;
}
.viewer .button:hover,
.editorFooter .button:hover{
color: #fff;
background: #CC6714;
border-color: #CC6714;
}
.viewer .button:active, .viewer .highlight,.editorFooter .button:active, .editorFooter .highlight{color:#fff; background:#575352;border-color:#575352;}
#mainMenu a {
display: block;
padding: 5px;
border-bottom: 1px solid #CCC;
}
#mainMenu a:link, #navlist a:visited {
color:#CC6714;
text-decoration: none;
}
#mainMenu a:hover {
background: #000000 url(arrow.gif) 96% 50% no-repeat;
background-color: #F5F5F5;
color:#CC6714;
}
#mainMenu a:hover, #mainMenu a:active, #mainMenu .highlight, #mainMenu .marked {
background: #000000 url(arrow.gif) 96% 50% no-repeat;
background-color: #F5F5F5;
color:#CC6714;
}
#mainMenu span {position:relative;}
#mainMenu br {display:none;}
#sidebarOptions a {
color:#999;
text-decoration: none;
}
#sidebarOptions a:hover {
color:#4F4B45;
background-color: #F5F5F5;border:1px solid #fff;
}
#sidebarOptions {line-height:1.4em;}
.tiddler {
padding-bottom: 40px;
border-bottom: 1px solid #DDDDDD;
}
.title {color:#CC6633;}
.subtitle, .subtitle a { color: #999999; font-size: 1.0em;margin:0.2em;}
.shadow .title{color:#948979;}
.selected .toolbar a {color:#999999;}
.selected .toolbar a:hover {color:#4F4B45; background:transparent;border:1px solid #fff;}
.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active{color:#4F4B45; background:transparent;border:1px solid #fff;}
.listLink,#sidebarTabs .tabContents {line-height:1.5em;}
.listTitle {color:#888;}
#sidebarTabs .tabContents {background:#fff;}
#sidebarTabs .tabContents .tiddlyLink, #sidebarTabs .tabContents .button{color:#999;}
#sidebarTabs .tabContents .tiddlyLink:hover,#sidebarTabs .tabContents .button:hover{color:#4F4B45;background:#fff}
#sidebarTabs .tabContents .button:hover, #sidebarTabs .tabContents .highlight, #sidebarTabs .tabContents .marked, #sidebarTabs .tabContents a.button:active{color:#4F4B45;background:#fff}
.tabSelected{color:#fff; background:#948979;}
.tabUnselected {
background: #ccc;
}
.tabSelected, .tabSelected:hover {
color: #fff;
background: #948979;
border: solid 1px #948979;
padding-bottom:1px;
}
.tabUnselected {
color: #999;
background: #eee;
border: solid 1px #ccc;
padding-bottom:1px;
}
#sidebarTabs .tabUnselected { border-bottom: none;padding-bottom:3px;}
#sidebarTabs .tabSelected{padding-bottom:3px;}
#sidebarTabs .tabUnselected:hover { border-bottom: none;padding-bottom:3px;color:#4F4B45}
#sidebarOptions .sliderPanel {
background: #fff; border:none;
font-size: .9em;
}
#sidebarOptions .sliderPanel a {font-weight:normal;}
#sidebarOptions .sliderPanel input {border:1px solid #999;}
.viewer blockquote {
border-left: 3px solid #948979;
}
.viewer table {
border: 2px solid [[ColorPalette::TertiaryDark]];
}
.viewer th, thead td {
background: #948979;
border: 1px solid #948979;
color: #fff;
}
.viewer pre {
border: 1px solid #948979;
background: #f5f5f5;
}
.viewer code {
color: #2F2A29;
}
.viewer hr {
border-top: dashed 1px #948979;
}
.editor input {
border: 1px solid #948979;
}
.editor textarea {
border: 1px solid #948979;
}
.popup {
background: #948979;
border: 1px solid #948979;
}
.popup li.disabled {
color: #000;
}
.popup li a, .popup li a:visited {
color: #eee;
border: none;
}
.popup li a:hover {
background: #575352;
color: #fff;
border: none;
}
.tagging, .tagged {
border: 1px solid #eee;
background-color: #F7F7F7;
}
.selected .tagging, .selected .tagged {
background-color: #eee;
border: 1px solid #BFBAB3;
}
.tagging .listTitle, .tagged .listTitle {
color: #bbb;
}
.selected .tagging .listTitle, .selected .tagged .listTitle {
color: #666;
}
.tagging .button, .tagged .button {
color:#aaa;
}
.selected .tagging .button, .selected .tagged .button {
color:#4F4B45;
}
.highlight, .marked {background:transparent; color:#111; border:none; text-decoration:underline;}
.tagging .button:hover, .tagged .button:hover, .tagging .button:active, .tagged .button:active {
border: none; background:transparent; text-decoration:underline; color:#000;
}
h1,h2,h3,h4,h5 { color: #666; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
h1 {font-size:18px;}
h2 {font-size:16px;}
h3 {font-size: 14px;}
#messageArea {
border: 4px solid #948979;
background: #f5f5f5;
color: #999;
font-size:90%;
}
#messageArea a:hover { background:#f5f5f5;}
#messageArea .button{
color: #666;
border: 1px solid #CC6714;
}
#messageArea .button:hover {
color: #fff;
background: #948979;
border-color: #948979;
}
* html .viewer pre {
margin-left: 0em;
}
* html .editor textarea, * html .editor input {
width: 98%;
}
.searchBar {float:right;font-size: 1.0em;}
.searchBar .button {color:#999;display:block;}
.searchBar .button:hover {border:1px solid #fff;color:#4F4B45;}
.searchBar input {
background-color: #FFF;
color: #999999;
border: 1px solid #CCC; margin-right:3px;
}
#sidebarOptions .button:active, #sidebarOptions .highlight {background:#F5F5F5;}
*html #contentFooter { padding:0.25em 1em 0.5em 1em;}
#noticeBoard {font-size: 0.9em; color:#999; position:relative;display:block;background:#fff; clear: both; margin-right:0.5em; margin-top:60px; padding:5px; border-bottom: 1px dotted #CCC; border-top: 1px dotted #CCC;}
#mainMenu #noticeBoard a,#mainMenu #noticeBoard .tiddlyLink {display:inline;border:none;padding:5px 2px;color:#DF9153 }
#noticeBoard a:hover {border:none;}
#noticeBoard br {display:inline;}
#mainMenu #noticeBoard .button{
color: #666;
border: 1px solid #DF9153;padding:2px;
}
#mainMenu #noticeBoard .button:hover{
color: #fff;
background: #DF9153;
border-color: #DF9153;
}
.searchbar {position:relative; width:11em;}
.searchbar .button{margin:0; width:11em;}
#header {display:inline-block;}
/*}}}*/
* ''Computer Architecture'' (<nowiki>MSc</nowiki>), LIACS, Leiden University, Semester 2006, 2007
* ''Introduction to Database'' (<nowiki>BSc</nowiki>), LIACS, Leiden University, Semester 2006, 2007 and 2008
* ''<nowiki>Multi-Objective</nowiki> Optimization and Decision Making'' (<nowiki>MSc</nowiki>), LIACS, Leiden University, Semester 2007
/***
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 = 'lerain';
// 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
merge(config.shadowTiddlers,{
'WelcomeToTiddlyspot':[
"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?// @@ 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// @@ 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// @@ 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!// @@ 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 :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),
'TspotControls':[
"| tiddlyspot password:|<<option pasUploadPassword>>|",
"| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
"| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),
'TspotSidebar':[
"<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),
'TspotOptions':[
"tiddlyspot password:",
"<<option pasUploadPassword>>",
""
].join("\n")
});
//}}}
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 14/04/2009 12:31:23 | YourName | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[store.cgi|http://lerain.tiddlyspot.com/store.cgi]] | . | [[index.html | http://lerain.tiddlyspot.com/index.html]] | . | ok | ok |
| 14/04/2009 12:49:58 | YourName | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[store.cgi|http://lerain.tiddlyspot.com/store.cgi]] | . | [[index.html | http://lerain.tiddlyspot.com/index.html]] | . |
| 14/04/2009 13:00:03 | YourName | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[store.cgi|http://lerain.tiddlyspot.com/store.cgi]] | . | [[index.html | http://lerain.tiddlyspot.com/index.html]] | . |
| 14/04/2009 13:00:06 | YourName | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[store.cgi|http://lerain.tiddlyspot.com/store.cgi]] | . | [[index.html | http://lerain.tiddlyspot.com/index.html]] | . | ok | ok |
| 14/04/2009 13:04:04 | YourName | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/]] | . | [[lerain.html | file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | | failed |
| 14/04/2009 13:04:32 | YourName | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/]] | . | [[lerain.html | file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | | failed |
| 14/04/2009 13:04:59 | YourName | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/]] | . | [[lerain.html | file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | | failed |
| 14/04/2009 13:32:11 | YourName | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[store.cgi|http://lerain.tiddlyspot.com/store.cgi]] | . | [[index.html | http://lerain.tiddlyspot.com/index.html]] | . | ok |
| 14/04/2009 16:37:02 | Rui Li | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[store.cgi|http://lerain.tiddlyspot.com/store.cgi]] | . | [[index.html | http://lerain.tiddlyspot.com/index.html]] | . | ok |
| 14/04/2009 16:54:28 | Rui Li | [[lerain.html|file:///C:/Documents%20and%20Settings/R.Li/My%20Documents/My%20Website/lerain.html]] | [[store.cgi|http://lerain.tiddlyspot.com/store.cgi]] | . | [[index.html | http://lerain.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
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)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
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) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
options: [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine"
],
refreshOptions: function(listWrapper) {
var opts = [];
for(i=0; i<this.options.length; i++) {
var opt = {};
opts.push();
opt.option = "";
n = this.options[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
};
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = 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);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = 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);
bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == 404)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
//}}}
{{firstletter{T}}}his is my personal website and hope you can get to know me well.
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?// @@ 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://lerain.tiddlyspot.com/controlpanel]] (your control panel username is //lerain//).
<<tiddler TspotControls>>
See also GettingStarted.
@@font-weight:bold;font-size:1.3em;color:#444; //Working online// @@ 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// @@ 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!// @@ 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 :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions.
[[TiddlyWiki|http://www.tiddlywiki.com]] © Osmosoft
//{{{
//This ensures that the footer sticks to the bottom of the screen when there are no tiddlers open. If that is not desirable, it can be deleted.
function setFooter() {
if (document.getElementById && document.getElementById("contentFooter") ) {
var windowHeight=findWindowHeight();
if (windowHeight>0) {
var contentHeight= document.getElementById('mainMenu').offsetHeight + document.getElementById("header").offsetHeight + document.getElementById("contentFooter").offsetHeight;
var menu= document.getElementById('mainMenu');
if (windowHeight-(contentHeight)>=0) {
menu.style.position='relative';
menu.style.marginBottom=(windowHeight-(contentHeight))+'px';
}
else {
menu.style.position='';
menu.style.marginBottom='';
}
}
}
}
window.onresize = function() {
setFooter();
}
Story.prototype.refreshTiddler_footerhack=Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function (title,template,force)
{
var theTiddler = Story.prototype.refreshTiddler_footerhack.apply(this,arguments);
setFooter();
return theTiddler;}
//}}}