config.options.chkHttpReadOnly = false;\n
John,\n\nI asked the question " Is there a setting needed to allow byte-range\nrequests? " on the Amazon Web Services Developer Connection forum for\nS3, and got this encouraging answer back:\n\n "S3 does not return the header "Accept-Ranges: bytes". See\nhttp://developer.amazonwebservices.com/connect/thread.jspa?messageID=56146�\n But it does allow Range GETs, i.e. you can specify a range with a\nGET request: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?RESTObjectGET.html\n It's a matter of configuring (if possible) the client application\nto not look for this header "Accept-Ranges: bytes"\n\nSachin -- can you rebuild NetCDF-Java with this mod so we can try it out?\n\nThanks,\nRich\n\nOn Sat, Sep 13, 2008 at 8:23 AM, Rich Signell <rsignell@usgs.gov> wrote:\n> > John,\n> >\n> > I went back and read some more about S3, and it actually appears that\n> > S3 *is* supposed to support byte range request.\n> >\n> > In the article "Building GrepTheWeb in the Cloud, Part 2: Best\n> > Practices" (at http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1633),\n> > it says:\n> >\n> > "End-to-end transfer data rates in Amazon S3 are best when large files\n> > are stored instead of small tiny files (sizes in the lower KBs). So\n> > instead of storing individual files on Amazon S3, multiple files were\n> > bundled and compressed (gzip) into a blob (.gz) and then stored on\n> > Amazon S3 as objects. The files were retrieved (streamed) using the\n> > standard HTTP GET request by providing a URL (bucket and key), offset\n> > (byte-range), and size (byte-length). As a result, the overall cost of\n> > storage was reduced due to reduction in the overall size of the\n> > dataset (because of compression) and consequently the lesser number of\n> > PUT requests required than otherwise."\n> >\n> > So I'm not sure why it's not working, but when I try to view the\n> > netCDF file I placed on S3, say, using the toolsUI tool\n> > (http://www.unidata.ucar.edu/software/netcdf-java/v4.0/webstart/netCDFtools.jnlp),\n> > I get:\n> >\n> > "NetcdfDataset.open cant open\n> > http://ricsigltxp2.s3.amazonaws.com/cblast_3sec_cf.nc\n> > Server does not support byte Ranges"\n> >\n> > Any ideas?\n> >\n> > Thanks,\n> > Rich\n> >\n> > On Fri, Sep 12, 2008 at 12:37 PM, Rich Signell <rsignell@usgs.gov> wrote:\n>> >> Guys,\n>> >>\n>> >> I decided that the likelihood of lots of people downloading my netcdf\n>> >> file and causing me to go broke is quite remote, so I granted it read\n>> >> access if you want to try S3 access:\n>> >>\n>> >> http://ricsigltxp2.s3.amazonaws.com/cblast_3sec_cf.nc\n>> >>\n>> >> -Rich\n>> >>\n>> >> On Fri, Sep 12, 2008 at 11:02 AM, John Caron <caron@unidata.ucar.edu> wrote:\n>>> >>> Hi Rich et al:\n>>> >>>\n>>> >>> byte range is standard HTTP 1.1, although apache server, for example, does not enable by default.\n>>> >>>\n>>> >>> Im surprised S3 doesnt support it. I wasnt able to verify, getting a 403 (Forbidden) return. Maybe ask Amazon why they dont support it, perhaps it can be enabled. What do they charge, BTW?\n>>> >>>\n>>> >>> John\n>>> >>>\n>>> >>> Rich Signell wrote:\n>>>> >>>> Matthew,\n>>>> >>>>\n>>>> >>>> The byte range request feature of HTTP seems to be little known and\n>>>> >>>> little used, but NetCDF-Java uses it to extract hyperslabs of data\n>>>> >>>> from remote NetCDF files. In the Gulf of Maine Model Output\n>>>> >>>> Interoperability Experiment, four of our six providers simply place\n>>>> >>>> their NetCDF files on their institutions web sites, and these files\n>>>> >>>> are referenced within the USGS THREDDS Data Server catalog (NcML),\n>>>> >>>> where extra attributes and mods are made using NcML to make them\n>>>> >>>> CF-compliant. Users can then access the data using OpenDAP, WCS, or\n>>>> >>>> NetCDF Subset service by sending service requests to the USGS THREDDS\n>>>> >>>> server. When a request comes in, THREDDS (via NetCDF-Java) makes the\n>>>> >>>> appropriate byte-range request to the remote NetCDF file to extract\n>>>> >>>> the information or data requested. So if S3 would have supported\n>>>> >>>> byte range, we instantly could have had THREDDS serving data from S3.\n>>>> >>>> It wouldn't have been the most efficient thing, but it would have\n>>>> >>>> been a cool way to start to show the potential. In practice, this is\n>>>> >>>> a sociological aspect we have found: if you tell model providers they\n>>>> >>>> have to rewrite their data to be CF compliant and then install an\n>>>> >>>> OpenDAP server, they are often hem and haw and say their IT people are\n>>>> >>>> really busy. But if you ask them is they can just put a NetCDF file\n>>>> >>>> on their web site, they usually agree. Then when they see what cool\n>>>> >>>> clients are available for them to work with their data (because\n>>>> >>>> they've made it interoperable) they get jazzed, and say: "This is cool\n>>>> >>>> -- but how we we make it faster?" And we say it's simple - just\n>>>> >>>> install their own THREDDS server. We've got two new THREDDS servers\n>>>> >>>> in our region so far, using this approach, and I'm confident we'll get\n>>>> >>>> the rest.\n>>>> >>>>\n>>>> >>>> So since the HTTP byte range request didn't work with S3, I guess\n>>>> >>>> you'll have to build a new back end for THREDDS, which I guess means\n>>>> >>>> adding a S3 reader layer for NetCDF-Java using the S3 API, right?\n>>>> >>>> I'd be interested in hearing what you are planning (or maybe I just\n>>>> >>>> need to read one of your proposals).\n>>>> >>>>\n>>>> >>>> Thanks,\n>>>> >>>> Rich\n>>>> >>>>\n>>>> >>>> On Thu, Sep 11, 2008 at 11:32 PM, Matthew Arrott <marrott@ucsd.edu> wrote:\n>>>>> >>>>> Rich,\n>>>>> >>>>>\n>>>>> >>>>> Excellent to hear that you playing with it. A good first set of tests. Can\n>>>>> >>>>> you explain "HTTP byte Range request"?\n>>>>> >>>>>\n>>>>> >>>>> Yes one has to pay to put and get data – not necessary good model for\n>>>>> >>>>> academics. We have accounted for this in OOI and have plan on how to change\n>>>>> >>>>> this with Amazon. We are will be approaching them with a network peering\n>>>>> >>>>> agreement where academics coming from Internet2 and the National Lambda Rail\n>>>>> >>>>> will not pay for transit in and out of the cloud. We believe we have good\n>>>>> >>>>> arguments and leverage. Plan to approach Amazon after FDR, which is in\n>>>>> >>>>> November.\n>>>>> >>>>>\n>>>>> >>>>> If this fails then we will have to rely on Academic cloud solutions, which\n>>>>> >>>>> are also coming online. The same strategy works, but NSF has to fund the\n>>>>> >>>>> computional base. For now AWS is just the testing/playground.\n>>>>> >>>>>\n>>>>> >>>>> Matthew\n>>>>> >>>>>\n>>>>> >>>>>\n>>>>> >>>>> On 9/11/08 7:35 PM, "Rich Signell" <rsignell@usgs.gov> wrote:\n>>>>> >>>>>\n>>>>> >>>>> Matthew,\n>>>>> >>>>>\n>>>>> >>>>> I decided to try out Amazon S3 to see what you guys were talking\n>>>>> >>>>> about. I thought it would be interesting to see if I could access a\n>>>>> >>>>> regular old NetCDF file on S3 using NetCDF-Java. I dropped a NetCDF\n>>>>> >>>>> file in, changed the ACL to anonymous (using s3fox - very slick!), and\n>>>>> >>>>> verified that I could download the file using\n>>>>> >>>>>\n>>>>> >>>>> http://ricsigltxp2.s3.amazonaws.com/cblast_3sec_cf.nc\n>>>>> >>>>>\n>>>>> >>>>> But alas, when I tried to access it using our "cf_info" command in\n>>>>> >>>>> Matlab (which uses NetCDF-Java).\n>>>>> >>>>>\n>>>>>>> >>>>>>> uri='http://ricsigltxp2.s3.amazonaws.com/cblast_3sec_cf.nc'\n>>>>>>> >>>>>>> cf_info(uri)\n>>>>> >>>>> Unable to open the dataset:\n>>>>> >>>>> http://ricsigltxp2.s3.amazonaws.com/cblast_3sec_cf.nc\n>>>>> >>>>> Server does not support byte Ranges\n>>>>> >>>>>\n>>>>> >>>>> Bummer. S3 does not support the HTTP byte Range request. Ah well, I\n>>>>> >>>>> guess that would have been too easy.\n>>>>> >>>>>\n>>>>> >>>>> BTW, I quickly changed the ACL back after reading this:\n>>>>> >>>>> http://www.codingaloud.com/2008/01/going-bankrupt-with-amazon-s3.html\n>>>>> >>>>>\n>>>>> >>>>> I didn't realize you had to pay to retrieve the data as well. So if\n>>>>> >>>>> we start serving all of NOAA's model output from S3, the more people\n>>>>> >>>>> love it, the more expensive it will be, right? Might require a\n>>>>> >>>>> different funding model!\n>>>>> >>>>>\n>>>>> >>>>> -Rich\n>>>>> >>>>> --\n>>>>> >>>>> Dr. Richard P. Signell (508) 457-2229\n>>>>> >>>>> USGS, 384 Woods Hole Rd.\n>>>>> >>>>> Woods Hole, MA 02543-1598\n>>>>> >>>>>\n>>>>> >>>>>\n>>>>> >>>>>\n>>>> >>>>\n>>>> >>>>
/***\n| Name:|CloseOnCancelPlugin|\n| Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|\n| Version:|6.9.3|\n| Date:|30-Sep-2006|\n| Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n***/\n//{{{\nmerge(config.commands.cancelTiddler,{\n\n handler_orig_closeUnsaved: config.commands.cancelTiddler.handler,\n\n handler: function(event,src,title) {\n this.handler_orig_closeUnsaved(event,src,title);\n if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))\n story.closeTiddler(title,true);\n return false;\n }\n\n});\n\n//}}}\n\n
//{{{\nconfig.options.chkHttpReadOnly = false; // means web visitors can experiment with your site by clicking edit\nconfig.options.chkInsertTabs = true; // tab inserts a tab when editing a tiddler\nconfig.views.wikified.defaultText = ""; // don't need message when a tiddler doesn't exist\nconfig.views.editor.defaultText = ""; // don't need message when creating a new tiddler \n//}}}\n
CommunitySedimentTransportModel
[[MptwEditTemplate]]\n
/***\n| Name:|HideWhenPlugin|\n| Description:|Allows conditional inclusion/exclusion in templates|\n| Version:|6.1.2|\n| Date:|20-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\nFor use in ViewTemplate and EditTemplate. Eg\n{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}\n{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}\n***/\n//{{{\n\nwindow.removeElementWhen = function(test,place) {\n if (test) {\n removeChildren(place);\n place.parentNode.removeChild(place);\n }\n};\n\nmerge(config.macros,{\n\n hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( eval(paramString), place);\n }},\n\n showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( !eval(paramString), place);\n }},\n\n hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( tiddler.tags.containsAll(params), place);\n }},\n\n showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( !tiddler.tags.containsAll(params), place);\n }},\n\n hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( tiddler.tags.containsAny(params), place);\n }},\n\n showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( !tiddler.tags.containsAny(params), place);\n }},\n\n hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);\n }},\n\n showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);\n }}\n\n});\n\n//}}}\n\n
/***\n|''Name:''|LegacyStrikeThroughPlugin|\n|''Description:''|Support for legacy (pre 2.1) strike through formatting|\n|''Version:''|1.0.1|\n|''Date:''|Jul 21, 2006|\n|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|\n|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|\n|''License:''|[[BSD open source license]]|\n|''CoreVersion:''|2.1.0|\n|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|\n\n***/\n\n//{{{\n\n// Ensure that the LegacyStrikeThrough Plugin is only installed once.\nif(!version.extensions.LegacyStrikeThroughPlugin)\n {\n version.extensions.LegacyStrikeThroughPlugin = true;\n\nconfig.formatters.push(\n{\n name: "legacyStrikeByChar",\n match: "==",\n termRegExp: /(==)/mg,\n element: "strike",\n handler: config.formatterHelpers.createElementAndWikify\n});\n\n} // end of "install only once"\n//}}}\n
MyProjects MyDocuments
''Increase JVM heap space in Matlab''\n\nSteps to increase JVM heap space in matlab\n\n* Know the current max memory for JVM allocated in matlab\n{{{\n>> java.lang.Runtime.getRuntime.maxMemory\n}}}\n\n* If you still think you need to increase JVM heap size, then go to the directory shown below\n{{{\n$MATLABROOT/bin/$ARCH\n\nIn order to know the $MATLABROOT, type\n>> matlabroot\n\nIn order to know $ARCH, type\n>> computer('arch')\n\n}}}\n\n* Create a file 'java.opts' in $MATLABROOT/bin/$ARCH with these lines in it\n{{{\n-Xms128mb\n-Xmx512mb\n}}}\n\nyou can change the max memory via -Xmx<heap size>mb upto max of 1024mb.\n* Restart matlab. Type 'java.lang.Runtime.getRuntime.maxMemory' to find the increased memory size.\n\n* Details about the same issue as above has been explained on Matlab forum as well. Please look at\nhttp://www.mathworks.com/support/solutions/data/1-18I2C.html\n\n* If you are using versions earlier than 2008a, then please consult this bug report.\n http://www.mathworks.com/support/bugreports/details.html?rp=398525\n\n\n''Running Java on matlab ERRORS''\n\n??? Error: File: /home/username/<M-file_name>\nLine: 1651 Column: 8\nArguments to IMPORT must either end with ".*"\nor else specify a fully qualified class name:\n"<class_name>" fails this test. The import statement is referencing a Java™ class (<class_name>) that the MATLAB Compiler product (if the error occurs at compile time) or the MCR (if the error occurs at run time) cannot find.\n\nTo work around this, ensure that the JAR file that contains the Java class is stored in a directory that is on the Java class path. (See matlabroot/toolbox/local/classpath.txt for the class path.) If the error occurs at run time, the classpath is stored in matlabroot/toolbox/local/classpath.txt when running on the development machine. It is stored in <mcr_root>/toolbox/local/classpath.txt when running on a target machine.\n\n\n* Use 'usejava('jvm') command to see if jvm is running on the machine or not.\n* use 'version -java' to see which version you are running. It has to be 1.5 or higher
/***\n| Name:|MptwLayoutPlugin|\n| Description:|A package containing templates and css for the MonkeyPirateTiddlyWiki layout|\n| Version:|6.1.2|\n| Date:|02-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#MptwLayoutPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n!Notes\nPresumes you have TagglyTaggingPlugin installed.\n***/\n//{{{\nconfig.shadowTiddlers.GettingStarted += "\sn\snSee also MonkeyPirateTiddlyWiki.";\n\n//}}}\n\n//{{{\nmerge(config.shadowTiddlers,{\n\nMptwStyleSheet:[\n "/*{{{*/",\n "/* a contrasting background so I can see where one tiddler ends and the other begins */",\n "body {",\n " background: [[ColorPalette::TertiaryLight]];",\n "}",\n "",\n "/* sexy colours and font for the header */",\n ".headerForeground {",\n " color: [[ColorPalette::PrimaryPale]];",\n "}",\n ".headerShadow, .headerShadow a {",\n " color: [[ColorPalette::PrimaryMid]];",\n "}",\n ".headerForeground, .headerShadow {",\n " padding: 1em 1em 0;",\n " font-family: 'Trebuchet MS' sans-serif;",\n " font-weight:bold;",\n "}",\n ".headerForeground .siteSubtitle {",\n " color: [[ColorPalette::PrimaryLight]];",\n "}",\n ".headerShadow .siteSubtitle {",\n " color: [[ColorPalette::PrimaryMid]];",\n "}",\n "",\n "/* make shadow go and down right instead of up and left */",\n ".headerShadow {",\n " left: 1px;",\n " top: 1px;",\n "}",\n "",\n "/* prefer monospace for editing */",\n ".editor textarea {",\n " font-family: 'Consolas' monospace;",\n "}",\n "",\n "/* sexy tiddler titles */",\n ".title {",\n " font-size: 250%;",\n " color: [[ColorPalette::PrimaryLight]];",\n " font-family: 'Trebuchet MS' sans-serif;",\n "}",\n "",\n "/* more subtle tiddler subtitle */",\n ".subtitle {",\n " padding:0px;",\n " margin:0px;",\n " padding-left:0.5em;",\n " font-size: 90%;",\n " color: [[ColorPalette::TertiaryMid]];",\n "}",\n ".subtitle .tiddlyLink {",\n " color: [[ColorPalette::TertiaryMid]];",\n "}",\n "",\n "/* a little bit of extra whitespace */",\n ".viewer {",\n " padding-bottom:3px;",\n "}",\n "",\n "/* don't want any background color for headings */",\n "h1,h2,h3,h4,h5,h6 {",\n " background: [[ColorPalette::Background]];",\n " color: [[ColorPalette::Foreground]];",\n "}",\n "",\n "/* give tiddlers 3d style border and explicit background */",\n ".tiddler {",\n " background: [[ColorPalette::Background]];",\n " border-right: 2px [[ColorPalette::TertiaryMid]] solid;",\n " border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;",\n " margin-bottom: 1em;",\n " padding-bottom: 2em;",\n "}",\n "",\n "/* make options slider look nicer */",\n "#sidebarOptions .sliderPanel {",\n " border:solid 1px [[ColorPalette::PrimaryLight]];",\n "}",\n "",\n "",\n "/* the borders look wrong with the body background */",\n "#sidebar .button {",\n " border-style: none;",\n "}",\n "",\n "/* displays the list of a tiddler's tags horizontally. used in ViewTemplate */",\n ".tagglyTagged li.listTitle {",\n " display:none",\n "}",\n ".tagglyTagged li {",\n " display: inline; font-size:90%;",\n "}",\n ".tagglyTagged ul {",\n " margin:0px; padding:0px;",\n "}",\n "",\n "/* this means you can put line breaks in SidebarOptions for readability */",\n "#sidebarOptions br {",\n " display:none;",\n "}",\n "/* undo the above in OptionsPanel */",\n "#sidebarOptions .sliderPanel br {",\n " display:inline;",\n "}",\n "",\n "/* horizontal main menu stuff */",\n "#displayArea {",\n " margin: 1em 15.7em 0em 1em; /* use the freed up space */",\n "}",\n "#topMenu br {",\n " display: none;",\n "}",\n "#topMenu {",\n " background: [[ColorPalette::PrimaryMid]];",\n " color:[[ColorPalette::PrimaryPale]];",\n "}",\n "#topMenu {",\n " padding:2px;",\n "}",\n "#topMenu .button, #topMenu .tiddlyLink, #topMenu a {",\n " margin-left: 0.5em;",\n " margin-right: 0.5em;",\n " padding-left: 3px;",\n " padding-right: 3px;",\n " color: [[ColorPalette::PrimaryPale]];",\n " font-size: 115%;",\n "}",\n "#topMenu .button:hover, #topMenu .tiddlyLink:hover {",\n " background: [[ColorPalette::PrimaryDark]];",\n "}",\n "",\n "/* make it print a little cleaner */",\n "@media print {",\n " #topMenu {",\n " display: none ! important;",\n " }",\n " /* not sure if we need all the importants */",\n " .tiddler {",\n " border-style: none ! important;",\n " margin:0px ! important;",\n " padding:0px ! important;",\n " padding-bottom:2em ! important;",\n " }",\n " .tagglyTagging .button, .tagglyTagging .hidebutton {",\n " display: none ! important;",\n " }",\n " .headerShadow {",\n " visibility: hidden ! important;",\n " }",\n " .tagglyTagged .quickopentag, .tagged .quickopentag {",\n " border-style: none ! important;",\n " }",\n " .quickopentag a.button, .miniTag {",\n " display: none ! important;",\n " }",\n "}",\n "/*}}}*/",\n ""\n].join("\sn"),\n\nMptwPageTemplate:[\n "<!--{{{-->",\n "<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>",\n " <div class='headerShadow'>",\n " <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> ",\n " <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>",\n " </div>",\n " <div class='headerForeground'>",\n " <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> ",\n " <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>",\n " </div>",\n "</div>",\n "<!-- horizontal MainMenu -->",\n "<div id='topMenu' refresh='content' tiddler='MainMenu'></div>",\n "<!-- original MainMenu menu -->",\n "<!-- <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> -->",\n "<div id='sidebar'>",\n " <div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>",\n " <div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>",\n "</div>",\n "<div id='displayArea'>",\n " <div id='messageArea'></div>",\n " <div id='tiddlerDisplay'></div>",\n "</div>",\n "<!--}}}-->",\n ""\n].join("\sn"),\n\nMptwViewTemplate:[\n "<!--{{{-->",\n "",\n "<div class='toolbar'>",\n " <span macro=\s"showWhenTagged systemConfig\s">",\n " <span macro=\s"toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'\s"></span>",\n " </span>",\n " <span style=\s"padding:1em;\s"></span>",\n " <span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler undoChanges permalink references jump newHere newJournalHere'></span>",\n "</div>",\n "",\n "<div class=\s"tagglyTagged\s" macro=\s"tags\s"></div>",\n "",\n "<div class='titleContainer'>",\n " <span class='title' macro='view title'></span>",\n " <span macro=\s"miniTag\s"></span>",\n "</div>",\n "",\n "<div class='subtitle'>",\n " <span macro='view modifier link'></span>,",\n " <span macro='view modified date [[DD-mmm-YY]]'></span>",\n " (<span macro='message views.wikified.createdPrompt'></span>",\n " <span macro='view created date [[DD-mmm-YY]]'></span>)",\n "</div>",\n "",\n "<div macro=\s"showWhenExists ViewPanelTemplate\s">[[ViewPanelTemplate]]</div>",\n "",\n "<div macro=\s"hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')\s">",\n " <div class='viewer' macro='view text wikified'></div>",\n "</div>",\n "<div macro=\s"showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')\s">",\n " <div class='viewer'><pre macro='view text'></pre></div>",\n "</div>",\n "",\n "<div macro=\s"showWhenExists ViewDashboardTemplate\s">[[ViewDashboardTemplate]]</div>",\n "",\n "<div class=\s"tagglyTagging\s" macro=\s"tagglyTagging\s"></div>",\n "",\n "<!--}}}-->",\n ""\n].join("\sn"),\n\nMptwEditTemplate:[\n "<!--{{{-->",\n "<div class=\s"toolbar\s" macro=\s"toolbar +saveTiddler closeOthers -cancelTiddler deleteTiddler\s"></div>",\n "<div class=\s"title\s" macro=\s"view title\s"></div>",\n "<div class=\s"editLabel\s">Title</div><div class=\s"editor\s" macro=\s"edit title\s"></div>",\n "<div class=\s"editLabel\s">Tags</div><div class=\s"editor\s" macro=\s"edit tags\s"></div>",\n "<div class=\s"editorFooter\s"><span macro=\s"message views.editor.tagPrompt\s"></span><span macro=\s"tagChooser\s"></span></div>",\n "<div macro=\s"showWhenExists EditPanelTemplate\s">[[EditPanelTemplate]]</div>",\n "<div class=\s"editor\s" macro=\s"edit text\s"></div>",\n "<!--}}}-->",\n ""\n].join("\sn"),\n\nMonkeyPirateTiddlyWiki:[\n "[[MonkeyPirateTiddlyWiki|http://mptw.tiddlyspot.com]] is a distribution of [[TiddlyWiki|http://www.tiddlywiki.com/]] created by Simon Baird. See [[the web site|http://mptw.tiddlyspot.com/]] for more information.",\n "!!Upgrading ~MonkeyPirateTiddlyWiki",\n "This \s"empty\s" ~MonkeyPirateTiddlyWiki file comes pre-installed with the core ~MonkeyPirateTiddlyWiki plugins. You can upgrade these core plugins to the latest version by doing the following:",\n "* Click ImportTiddlers",\n "* Click \s"Choose...\s" and select \s"~MptwUpgradeURL\s"",\n "* Click \s"fetch\s"",\n "* Click the checkbox in the first column heading to select all tiddlers",\n "* Click \s"More actions...\s" and select \s"Import these tiddlers\s"",\n "* Click \s"OK\s" to confirm you want to overwrite the tiddlers",\n "* Save and reload",\n ""\n].join("\sn")\n\n});\n//}}}\n
For upgrading directly from tiddlyspot. See [[ImportTiddlers]].\nURL: /proxy/mptw.tiddlyspot.com/upgrade.html\n
For upgrading. See [[ImportTiddlers]].\nURL: http://mptw.tiddlyspot.com/upgrade.html\n
Need to add some documentation here...
/***\n| Name:|NewHerePlugin|\n| Description:|Creates the new here and new journal toolbar commands|\n| Version:|6.1.6|\n| Date:|06-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\nTo use edit your ViewTemplate and add newHere to the toolbar div, eg\n{{{<div class='toolbar' macro='toolbar ... newHere'></div>}}}\nNote: would be good if we could do this instead some day\n{{{<<newTiddler tag:{{tiddler.title}} label:'new here'>>}}}\n***/\n//{{{\nmerge(config.commands,{\n\n newHere: {\n text: 'new here',\n tooltip: 'Create a new tiddler tagged as this tiddler',\n hideReadOnly: true,\n handler: function(e,src,title) {\n if (!readOnly) {\n clearMessage();\n var t=document.getElementById('tiddler'+title);\n story.displayTiddler(t,config.macros.newTiddler.title,DEFAULT_EDIT_TEMPLATE);\n story.setTiddlerTag(config.macros.newTiddler.title, title, 0);\n story.focusTiddler(config.macros.newTiddler.title,"title"); // doesn't work??\n return false;\n }\n }\n },\n\n newJournalHere: {\n //text: 'new journal here', // too long\n text: 'new journal',\n hideReadOnly: true,\n dataFormat: 'DD MMM YYYY', // adjust to your preference\n //dataFormat: 'YYYY-0MM-0DD', \n tooltip: 'Create a new journal tiddler tagged as this tiddler',\n handler: function(e,src,title) {\n if (!readOnly) {\n clearMessage();\n var now = new Date();\n var t=document.getElementById('tiddler'+title);\n var newtitle = now.formatString(this.dataFormat)\n story.displayTiddler(t,newtitle,DEFAULT_EDIT_TEMPLATE);\n story.setTiddlerTag(newtitle, title, 0);\n story.focusTiddler(newtitle,"title");\n return false;\n }\n }\n }\n\n});\n//}}}\n
[[MptwPageTemplate]]\n
/***\n| Name:|QuickOpenTagPlugin|\n| Description:|Changes tag links to make it easier to open tags as tiddlers|\n| Version:|6.1.1|\n| Date:|01-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n***/\n//{{{\nconfig.quickOpenTag = {\n\n dropdownChar: (document.all ? "\su25bc" : "\su25be"), // the little one doesn't work in IE\n\n createTagButton: function(place,tag,excludeTiddler) {\n // little hack so we can to <<tag PrettyTagName|RealTagName>>\n var splitTag = tag.split("|");\n var pretty = tag;\n if (splitTag.length == 2) {\n tag = splitTag[1];\n pretty = splitTag[0];\n }\n \n var sp = createTiddlyElement(place,"span",null,"quickopentag");\n createTiddlyText(createTiddlyLink(sp,tag,false),pretty);\n \n var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,\n config.views.wikified.tag.tooltip.format([tag]),onClickTag);\n theTag.setAttribute("tag",tag);\n if (excludeTiddler)\n theTag.setAttribute("tiddler",excludeTiddler);\n return(theTag);\n },\n\n miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var tagged = store.getTaggedTiddlers(tiddler.title);\n if (tagged.length > 0) {\n var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,\n config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);\n theTag.setAttribute("tag",tiddler.title);\n theTag.className = "miniTag";\n }\n },\n\n allTagsHandler: function(place,macroName,params) {\n var tags = store.getTags();\n var theDateList = createTiddlyElement(place,"ul");\n if(tags.length == 0)\n createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags);\n for (var t=0; t<tags.length; t++) {\n var theListItem = createTiddlyElement(theDateList,"li");\n var theLink = createTiddlyLink(theListItem,tags[t][0],true);\n var theCount = " (" + tags[t][1] + ")";\n theLink.appendChild(document.createTextNode(theCount));\n var theDropDownBtn = createTiddlyButton(theListItem," " +\n config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);\n theDropDownBtn.setAttribute("tag",tags[t][0]);\n }\n },\n\n // todo fix these up a bit\n styles: \n"/*{{{*/\sn"+\n"/* created by QuickOpenTagPlugin */\sn"+\n".tagglyTagged .quickopentag, .tagged .quickopentag \sn"+\n" { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }\sn"+\n".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }\sn"+\n".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}\sn"+\n"/* extra specificity to make it work right */\sn"+\n"#displayArea .viewer .quickopentag a.button, \sn"+\n"#displayArea .viewer .quickopentag a.tiddyLink, \sn"+\n"#mainMenu .quickopentag a.tiddyLink, \sn"+\n"#mainMenu .quickopentag a.tiddyLink \sn"+\n" { border:0px solid black; }\sn"+\n"#displayArea .viewer .quickopentag a.button, \sn"+\n"#mainMenu .quickopentag a.button \sn"+\n" { margin-left:0px; padding-left:2px; }\sn"+\n"#displayArea .viewer .quickopentag a.tiddlyLink, \sn"+\n"#mainMenu .quickopentag a.tiddlyLink \sn"+\n" { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }\sn"+\n"a.miniTag {font-size:150%;} \sn"+\n"#mainMenu .quickopentag a.button \sn"+\n" /* looks better in right justified main menus */\sn"+\n" { margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }\sn" + \n"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }\sn" +\n"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }\sn" +\n"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }\sn" +\n"/*}}}*/\sn"+\n "",\n\n init: function() {\n // we fully replace these builtins. can't hijack them easily\n window.createTagButton = this.createTagButton;\n config.macros.allTags.handler = this.allTagsHandler;\n config.macros.miniTag = { handler: this.miniTagHandler };\n config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;\n if (store)\n store.addNotification("QuickOpenTagStyles",refreshStyles);\n else\n config.notifyTiddlers.push({name:"QuickOpenTagStyles", notify: refreshStyles});\n }\n\n}\n\nconfig.quickOpenTag.init();\n\n//}}}\n
Installing XML libs:\n\nA. ''libxml2: 2.6.28 :'' \n\nDownload: ftp://xmlsoft.org/libxml2/libxml2-2.6.28.tar.gz\n\n1. untar\n\n2. Create a local install directory 'xmllibs'(or any other convenient name) in your home directory or anywhere.\nWe will use '$HOME/xmllibs' as an example here for local install.\n\n3. run \n{{{\n$ ./configure --prefix=$HOME/xmllibs\n}}}\n4. run\n{{{\n$ make\n}}}\n5. run\n{{{\n$ make install\nThis will install the required libs and exe files into $HOME/xmllibs\n}}}\n6. Add '$HOME/xmllibs/bin' to the system PATH.\n{{{\nexport PATH=$HOME/xmllibs/bin:$PATH\nor\nsetenv PATH $HOME/xmllibs/bin:$PATH\n}}}\n\nB. ''XML::LibXML::Common-0.13:''\n\nDownload: http://search.cpan.org/CPAN/authors/id/P/PH/PHISH/XML-LibXML-Common-0.13.tar.gz\n\n\n1. untar\n\n2. Use the same local install directory as above. i.e'$HOME/xmllibs'\n\n3. run \n{{{\n$ perl Makefile.PL INSTALLSITEARCH=$HOME/xmllibs\n}}}\n4. run\n{{{\n$ make\n}}}\n5. run\n{{{\n$ make test\nThis will test the compilation.\n}}}\n6. run\n{{{\n$ make install\nThis will install the required libs and exe files into $HOME/xmllibs\n}}}\n \n\nC. ''XML::LibXML: 1.65:''\n\nDownload: http://search.cpan.org/CPAN/authors/id/P/PA/PAJAS/XML-LibXML-1.65.tar.gz\n\n1. untar\n\n2. Use the same local install directory as above. i.e'$HOME/xmllibs'\n\n3. run \n{{{\n$ perl Makefile.PL INSTALLSITEARCH=$HOME/xmllibs\n}}}\n4. run\n{{{\n$ make\n}}}\n5. run\n{{{\n$ make test\nThis will test the compilation.\n}}}\n6. run\n{{{\n$ make install\nThis will install the required libs and exe files into $HOME/xmllibs\n}}}\n\nAfter Compilation of all the above software packages: \n\n{{{\nCopy $HOME/xmllibs/auto/XML/LibXML/* to $REGRESSION_HOME/lib/auto/XML/LibXML\n}}}\n\n\nThis will copy the .so/.bs/.dll files.\n\nCompiled on: \n\nJavelin[368] skbhate$ more /proc/version \nLinux version 2.6.5-7.283_lustre-1.6.0.1-papi (geeko@buildhost) (gcc version 3.3.3 (SuSE Linux)) #2 SMP Thu Aug 30 11:24\n:31 CDT 2007
/***\n| Name:|RenameTagsPlugin|\n| Description:|Allows you to easily rename or delete tags across multiple tiddlers|\n| Version:|6.1.18|\n| Date:|18-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\nRename a tag and you will be prompted to rename it in all its tagged tiddlers.\n***/\n//{{{\nconfig.renameTags = {\n\n prompts: {\n rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",\n remove: "Remove the tag '%0' from %1 tidder%2?"\n },\n\n removeTag: function(tag,tiddlers) {\n store.suspendNotifications();\n for (var i=0;i<tiddlers.length;i++) {\n store.setTiddlerTag(tiddlers[i].title,false,tag);\n }\n store.resumeNotifications();\n store.notifyAll();\n },\n\n renameTag: function(oldTag,newTag,tiddlers) {\n store.suspendNotifications();\n for (var i=0;i<tiddlers.length;i++) {\n store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old\n store.setTiddlerTag(tiddlers[i].title,true,newTag); // add new\n }\n store.resumeNotifications();\n store.notifyAll();\n },\n\n storeMethods: {\n\n saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,\n\n saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields) {\n if (title != newTitle) {\n var tagged = this.getTaggedTiddlers(title);\n if (tagged.length > 0) {\n // then we are renaming a tag\n if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))\n config.renameTags.renameTag(title,newTitle,tagged);\n\n if (!this.tiddlerExists(title) && newBody == "")\n // dont create unwanted tiddler\n return null;\n }\n }\n return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields);\n },\n\n removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,\n\n removeTiddler: function(title) {\n var tagged = this.getTaggedTiddlers(title);\n if (tagged.length > 0)\n if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))\n config.renameTags.removeTag(title,tagged);\n return this.removeTiddler_orig_renameTags(title);\n }\n\n },\n\n init: function() {\n merge(TiddlyWiki.prototype,this.storeMethods);\n }\n}\n\nconfig.renameTags.init();\n\n//}}}\n\n
config.options.chkAutoSave = false;\n
my work related notes and documents
Sachin's TechWiki
[[MptwStyleSheet]]\n
1. MAC OS \n\nMac OS 10.5.4 build 9E17 Kernel Version: Darwin 9.4.0\n\nDarwin Corbin-lmac.SSC.HPC.MsState.Edu 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun 9 19:30:53 PDT 2008; rootnu-1228.5.20~1/RELEASE_I386 i386\nCorbin-lmac\n\nperl: \n{{{\nThis is perl, v5.8.8 built for darwin-thread-multi-2level\n(with 1 registered patch, see perl -V for more detail)\n\n}}}\n\n\nlibxml2:\n\n{{{\n'xml2-config --version' 2.6.16\n}}}\n\nsubversion -yes\n\n$pwd\n\n/Users/corbin\n\nROMS: /Users/corbin/roms-cstm\n\nregression: /Users/corbin/regression\n\nError message which comes on this machine. \n\n{{{\n./bin/runRegression\nXML::LibXML object version 1.60 does not match bootstrap parameter 1.65 at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/DynaLoader.pm line 253.\nBEGIN failed--compilation aborted at /Users/corbin/regression/lib/XML/LibXML.pm line 116.\nCompilation failed in require at /Users/corbin/regression/lib/XMLInterface.pm line 34.\nBEGIN failed--compilation aborted at /Users/corbin/regression/lib/XMLInterface.pm line 34.\nCompilation failed in require at ./bin/runRegression line 32.\nBEGIN failed--compilation aborted at ./bin/runRegression line 32.\nCorbin-lmac:regression corbin$ pwd\n/Users/corbin/regression\nCorbin-lmac:regression corbin$ ./bin/runRegression\nXML::LibXML object version 1.60 does not match bootstrap parameter 1.65 at /System/Library\n}}}\n
/***\n| Name:|TagglyTaggingPlugin|\n| Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|\n| Version:|6.1.5|\n| Date:|05-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n!Notes\nSee http://mptw.tiddlyspot.com/#TagglyTagging\n***/\n//{{{\nconfig.taggly = {\n\n // for translations\n lingo: {\n labels: {\n asc: "\su2191", // down arrow\n desc: "\su2193", // up arrow\n title: "title",\n modified: "modified",\n created: "created",\n show: "+",\n hide: "-",\n normal: "normal",\n group: "group",\n commas: "commas",\n sitemap: "sitemap",\n numCols: "cols\su00b1", // plus minus sign\n label: "Tagged as '%0':"\n },\n\n tooltips: {\n title: "Click to sort by title",\n modified: "Click to sort by modified date",\n created: "Click to sort by created date",\n show: "Click to show tagging list",\n hide: "Click to hide tagging list",\n normal: "Click to show a normal ungrouped list",\n group: "Click to show list grouped by tag",\n sitemap: "Click to show a sitemap style list",\n commas: "Click to show a comma separated list",\n numCols: "Click to change number of columns"\n }\n },\n\n config: {\n showTaggingCounts: true,\n listOpts: {\n // the first one will be the default\n sortBy: ["title","modified","created"],\n sortOrder: ["asc","desc"],\n hideState: ["show","hide"],\n listMode: ["normal","group","sitemap","commas"],\n numCols: ["1","2","3","4","5","6"]\n },\n valuePrefix: "taggly."\n },\n\n getTagglyOpt: function(title,opt) {\n var val = store.getValue(title,this.config.valuePrefix+opt);\n return val ? val : this.config.listOpts[opt][0];\n },\n\n setTagglyOpt: function(title,opt,value) {\n if (!store.tiddlerExists(title))\n // create it silently\n store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),null);\n // if value is default then remove it to save space\n return store.setValue(title,\n this.config.valuePrefix+opt,\n value == this.config.listOpts[opt][0] ? null : value);\n },\n\n getNextValue: function(title,opt) {\n var current = this.getTagglyOpt(title,opt);\n var pos = this.config.listOpts[opt].indexOf(current);\n // a little usability enhancement. actually it doesn't work right for grouped or sitemap\n var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);\n var newPos = (pos + 1) % limit;\n return this.config.listOpts[opt][newPos];\n },\n\n toggleTagglyOpt: function(title,opt) {\n var newVal = this.getNextValue(title,opt);\n this.setTagglyOpt(title,opt,newVal);\n }, \n\n createListControl: function(place,title,type) {\n var lingo = config.taggly.lingo;\n var label;\n var tooltip;\n var onclick;\n\n if ((type == "title" || type == "modified" || type == "created")) {\n // "special" controls. a little tricky. derived from sortOrder and sortBy\n label = lingo.labels[type];\n tooltip = lingo.tooltips[type];\n\n if (this.getTagglyOpt(title,"sortBy") == type) {\n label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];\n onclick = function() {\n config.taggly.toggleTagglyOpt(title,"sortOrder");\n return false;\n }\n }\n else {\n onclick = function() {\n config.taggly.setTagglyOpt(title,"sortBy",type);\n config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);\n return false;\n }\n }\n }\n else {\n // "regular" controls, nice and simple\n label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];\n tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];\n onclick = function() {\n config.taggly.toggleTagglyOpt(title,type);\n return false;\n }\n }\n\n // hide button because commas don't have columns\n if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))\n createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");\n },\n\n makeColumns: function(orig,numCols) {\n var listSize = orig.length;\n var colSize = listSize/numCols;\n var remainder = listSize % numCols;\n\n var upperColsize = colSize;\n var lowerColsize = colSize;\n\n if (colSize != Math.floor(colSize)) {\n // it's not an exact fit so..\n upperColsize = Math.floor(colSize) + 1;\n lowerColsize = Math.floor(colSize);\n }\n\n var output = [];\n var c = 0;\n for (var j=0;j<numCols;j++) {\n var singleCol = [];\n var thisSize = j < remainder ? upperColsize : lowerColsize;\n for (var i=0;i<thisSize;i++) \n singleCol.push(orig[c++]);\n output.push(singleCol);\n }\n\n return output;\n },\n\n drawTable: function(place,columns,theClass) {\n var newTable = createTiddlyElement(place,"table",null,theClass);\n var newTbody = createTiddlyElement(newTable,"tbody");\n var newTr = createTiddlyElement(newTbody,"tr");\n for (var j=0;j<columns.length;j++) {\n var colOutput = "";\n for (var i=0;i<columns[j].length;i++) \n colOutput += columns[j][i];\n var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class\n wikify(colOutput,newTd);\n }\n return newTable;\n },\n\n createTagglyList: function(place,title) {\n switch(this.getTagglyOpt(title,"listMode")) {\n case "group": return this.createTagglyListGrouped(place,title); break;\n case "normal": return this.createTagglyListNormal(place,title,false); break;\n case "commas": return this.createTagglyListNormal(place,title,true); break;\n case "sitemap":return this.createTagglyListSiteMap(place,title); break;\n }\n },\n\n getTaggingCount: function(title) {\n // thanks to Doug Edmunds\n if (this.config.showTaggingCounts) {\n var tagCount = store.getTaggedTiddlers(title).length;\n if (tagCount > 0)\n return " ("+tagCount+")";\n }\n return "";\n },\n\n // this is for normal and commas mode\n createTagglyListNormal: function(place,title,useCommas) {\n\n var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));\n\n if (this.getTagglyOpt(title,"sortOrder") == "desc")\n list = list.reverse();\n\n var output = [];\n for (var i=0;i<list.length;i++) {\n var countString = this.getTaggingCount(list[i].title);\n if (useCommas)\n output.push((i > 0 ? ", " : "") + "[[" + list[i].title + "]]" + countString);\n else\n output.push("*[[" + list[i].title + "]]" + countString + "\sn");\n }\n\n return this.drawTable(place,\n this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),\n useCommas ? "commas" : "normal");\n },\n\n // this is for the "grouped" mode\n createTagglyListGrouped: function(place,title) {\n var sortBy = this.getTagglyOpt(title,"sortBy");\n var sortOrder = this.getTagglyOpt(title,"sortOrder");\n\n var list = store.getTaggedTiddlers(title,sortBy);\n\n if (sortOrder == "desc")\n list = list.reverse();\n\n var leftOvers = []\n for (var i=0;i<list.length;i++)\n leftOvers.push(list[i].title);\n\n var allTagsHolder = {};\n for (var i=0;i<list.length;i++) {\n for (var j=0;j<list[i].tags.length;j++) {\n\n if (list[i].tags[j] != title) { // not this tiddler\n\n if (!allTagsHolder[list[i].tags[j]])\n allTagsHolder[list[i].tags[j]] = "";\n\n allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"\n + this.getTaggingCount(list[i].title) + "\sn";\n leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers\n }\n }\n }\n\n var allTags = [];\n for (var t in allTagsHolder)\n allTags.push(t);\n\n var sortHelper = function(a,b) {\n if (a == b) return 0;\n if (a < b) return -1;\n return 1;\n };\n\n allTags.sort(function(a,b) {\n var tidA = store.getTiddler(a);\n var tidB = store.getTiddler(b);\n if (sortBy == "title") return sortHelper(a,b);\n else if (!tidA && !tidB) return 0;\n else if (!tidA) return -1;\n else if (!tidB) return +1;\n else return sortHelper(tidA[sortBy],tidB[sortBy]);\n });\n\n var leftOverOutput = "";\n for (var i=0;i<leftOvers.length;i++)\n leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + "\sn";\n\n var output = [];\n\n if (sortOrder == "desc")\n allTags.reverse();\n else if (leftOverOutput != "")\n // leftovers first...\n output.push(leftOverOutput);\n\n for (var i=0;i<allTags.length;i++)\n output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(leftOvers[i]) + "\sn" + allTagsHolder[allTags[i]]);\n\n if (sortOrder == "desc" && leftOverOutput != "")\n // leftovers last...\n output.push(leftOverOutput);\n\n return this.drawTable(place,\n this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),\n "grouped");\n\n },\n\n // used to build site map\n treeTraverse: function(title,depth,sortBy,sortOrder) {\n\n var list = store.getTaggedTiddlers(title,sortBy);\n if (sortOrder == "desc")\n list.reverse();\n\n var indent = "";\n for (var j=0;j<depth;j++)\n indent += "*"\n\n var childOutput = "";\n for (var i=0;i<list.length;i++)\n if (list[i].title != title)\n childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);\n\n if (depth == 0)\n return childOutput;\n else\n return indent + "[["+title+"]]" + this.getTaggingCount(title) + "\sn"+childOutput;\n },\n\n // this if for the site map mode\n createTagglyListSiteMap: function(place,title) {\n var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));\n return this.drawTable(place,\n this.makeColumns(output.split(/(?=^\s*\s[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic\n "sitemap"\n );\n },\n\n macros: {\n tagglyTagging: {\n handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n var refreshContainer = createTiddlyElement(place,"div");\n // do some refresh magic to make it keep the list fresh - thanks Saq\n refreshContainer.setAttribute("refresh","macro");\n refreshContainer.setAttribute("macroName",macroName);\n refreshContainer.setAttribute("title",tiddler.title);\n this.refresh(refreshContainer);\n },\n\n refresh: function(place) {\n var title = place.getAttribute("title");\n removeChildren(place);\n if (store.getTaggedTiddlers(title).length > 0) {\n var lingo = config.taggly.lingo;\n config.taggly.createListControl(place,title,"hideState");\n if (config.taggly.getTagglyOpt(title,"hideState") == "show") {\n createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));\n config.taggly.createListControl(place,title,"title");\n config.taggly.createListControl(place,title,"modified");\n config.taggly.createListControl(place,title,"created");\n config.taggly.createListControl(place,title,"listMode");\n config.taggly.createListControl(place,title,"numCols");\n config.taggly.createTagglyList(place,title);\n }\n }\n }\n }\n },\n\n // todo fix these up a bit\n styles: \n"/*{{{*/\sn"+\n"/* created by TagglyTaggingPlugin */\sn"+\n".tagglyTagging { padding-top:0.5em; }\sn"+\n".tagglyTagging li.listTitle { display:none; }\sn"+\n".tagglyTagging ul {\sn"+\n" margin-top:0px; padding-top:0.5em; padding-left:2em;\sn"+\n" margin-bottom:0px; padding-bottom:0px;\sn"+\n"}\sn"+\n".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\sn"+\n".tagglyTagging table { margin:0px; padding:0px; }\sn"+\n".tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\sn"+\n".tagglyTagging .button, .tagglyTagging .hidebutton {\sn"+\n" color:[[ColorPalette::TertiaryLight]]; font-size:90%;\sn"+\n" border:0px; padding-left:0.3em;padding-right:0.3em;\sn"+\n"}\sn"+\n".tagglyTagging .button:hover, .hidebutton:hover {\sn"+\n" background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];\sn"+\n"}\sn"+\n".selected .tagglyTagging .button {\sn"+\n" display:inline;\sn"+\n"}\sn"+\n".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }\sn"+\n".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }\sn"+\n".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }\sn"+\n".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }\sn"+\n".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}\sn"+\n".tagglyTagging ul ul li {margin-left:0.5em; }\sn"+\n".editLabel { font-size:90%; padding-top:0.5em; }\sn"+\n".tagglyTagging .commas { padding-left:1.8em; }\sn"+\n"/*}}}*/\sn"+\n "",\n\n init: function() {\n merge(config.macros,this.macros);\n config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;\n if (store)\n store.addNotification("TagglyTaggingStyles",refreshStyles);\n else\n config.notifyTiddlers.push({name:"TagglyTaggingStyles", notify: refreshStyles});\n }\n};\n\nconfig.taggly.init();\n\n//}}}\n\n
/***\n| Name:|ToggleTagMacro|\n| Description:|Makes a checkbox which toggles a tag in a tiddler|\n| Version:|6.1.2|\n| Date:|20-Oct-2006|\n| Source:|http://tiddlyspot.com/mptw/#ToggleTagMacro|\n| Author:|SimonBaird|\n| License:|[[BSD open source license]]|\n| CoreVersion:|2.1|\n!Usage\n{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}\n* TagName - the tag to be toggled, default value "checked"\n* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler\n* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'\n(If a parameter is '.' then the default will be used)\n\nExamples:\n\n|Code|Description|Example|h\n|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|\n|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|\n|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|\n|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|\n|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|\n(Note if TiddlerName doesn't exist it will be silently created)\n\n!Known issues\n* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing. Should it stick the tag in the edit box?\n\n***/\n//{{{\n\nmerge(config.macros,{\n\n toggleTag: {\n\n doRefreshAll: true,\n createIfRequired: true,\n shortLabel: "[[%0]]",\n longLabel: "[[%0]] [[%1]]",\n\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var tag = (params[0] && params[0] != '.') ? params[0] : "checked";\n var title = (params[1] && params[1] != '.') ? params[1] : tiddler.title;\n var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);\n var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;\n var theTiddler = title == tiddler.title ? tiddler : store.getTiddler(title);\n var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {\n if (!store.tiddlerExists(title)) {\n if (config.macros.toggleTag.createIfRequired) {\n var content = store.getTiddlerText(title); // just in case it's a shadow\n store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);\n }\n else \n return false;\n }\n //store.suspendNotifications(); \n store.setTiddlerTag(title,this.checked,tag);\n //refreshDisplay(); \n //store.resumeNotifications();\n return true;\n });\n }\n }\n});\n\n//}}}\n\n
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |\n| 9/3/2007 11:49:57 | YourName | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/3/2007 11:50:20 | YourName | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/3/2007 12:6:22 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/3/2007 12:8:32 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/3/2007 12:9:13 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/3/2007 12:10:25 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/3/2007 13:3:8 | skumar | [[/|http://skumar.tiddlyspot.com/#%5B%5BRegression%20TEST%20%5D%5D%20%5B%5BMy%20Menu%5D%5D]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/3/2007 13:18:14 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/3/2007 13:19:10 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/3/2007 12:38:31 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 10/3/2007 12:39:2 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 10/3/2007 12:44:42 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 15/3/2007 12:59:25 | YourName | [[skumar(4).html|file:///C:/downloads/skumar(4).html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 15/3/2007 16:15:21 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 15/3/2007 16:17:50 | Sachin | [[skumar(5).html|file:///C:/downloads/skumar(5).html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 15/3/2007 16:19:22 | Sachin | [[skumar(5).html|file:///C:/downloads/skumar(5).html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 15/3/2007 16:20:42 | Sachin | [[skumar(5).html|file:///C:/downloads/skumar(5).html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 15/3/2007 16:23:2 | Sachin | [[skumar(5).html|file:///C:/downloads/skumar(5).html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 15/3/2007 16:23:57 | Sachin | [[skumar(5).html|file:///C:/downloads/skumar(5).html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 16/3/2007 9:29:8 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 16/3/2007 13:29:32 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 16/3/2007 13:37:1 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 16/3/2007 14:10:52 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 16/3/2007 14:20:15 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 19/3/2007 10:12:34 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 19/3/2007 11:0:2 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 19/3/2007 11:2:48 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 19/3/2007 11:42:10 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 19/3/2007 11:43:29 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 19/3/2007 11:50:51 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 19/3/2007 12:5:25 | Sachin | [[skumar.html|file:///C:/skbhate/dev/nopp/doc/skumar.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 12/4/2007 15:35:44 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 14/5/2007 9:37:15 | Sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 14/5/2007 9:40:0 | Sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 14/5/2007 9:42:9 | Sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 14/5/2007 9:46:45 | Sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 14/5/2007 9:55:58 | Sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 21/5/2007 14:18:0 | Sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 21/5/2007 14:24:11 | Sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 21/5/2007 14:26:7 | Sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 21/5/2007 14:26:24 | Sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 21/5/2007 15:33:16 | sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 21/5/2007 15:37:23 | sachin | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 6/7/2007 12:50:55 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 6/7/2007 12:53:17 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 6/7/2007 12:58:6 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 10/7/2007 13:9:27 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 13/7/2007 15:38:42 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 13/7/2007 15:39:43 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 13/7/2007 16:15:41 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 13/7/2007 16:19:31 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 8/8/2008 10:1:47 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 8/8/2008 10:2:2 | skumar | [[/|http://skumar.tiddlyspot.com/]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 8/8/2008 10:6:45 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 8/8/2008 10:7:44 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 8/8/2008 10:19:55 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 8/8/2008 10:19:58 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 8/8/2008 10:20:2 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok | Ok |\n| 8/8/2008 10:20:12 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 22/8/2008 14:30:40 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 22/8/2008 15:26:13 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 22/8/2008 15:27:12 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 22/8/2008 15:29:20 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 22/8/2008 16:48:48 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 22/8/2008 16:48:55 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 22/8/2008 16:48:57 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 25/8/2008 10:11:5 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 25/8/2008 11:5:17 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html#Regression]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 25/8/2008 11:6:47 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 2/9/2008 12:26:46 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 2/9/2008 12:30:51 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 2/9/2008 12:32:4 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 2/9/2008 12:34:9 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 2/9/2008 12:34:54 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 2/9/2008 12:37:30 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 3/9/2008 15:46:19 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 3/9/2008 15:53:19 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 4/9/2008 10:23:4 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 15/9/2008 12:2:17 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 15/9/2008 13:15:5 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 18/9/2008 14:46:41 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 25/9/2008 22:45:25 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 26/1/2009 10:29:53 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 26/1/2009 10:40:58 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 26/1/2009 16:56:31 | YourName | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 26/1/2009 21:9:21 | YourName | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 27/1/2009 9:43:9 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 27/1/2009 10:12:8 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 27/1/2009 10:41:39 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 27/1/2009 10:58:49 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 27/1/2009 11:2:35 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 27/1/2009 11:39:1 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 27/1/2009 12:59:57 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 27/1/2009 13:26:2 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 27/1/2009 13:55:45 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 12/2/2009 22:12:42 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 12/2/2009 22:13:35 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 23/2/2009 16:4:18 | skumar | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 23/3/2009 11:44:12 | skbhate | [[index.html|http://skumar.tiddlyspot.com/index.html]] | [[store.cgi|http://skumar.tiddlyspot.com/store.cgi]] | . | index.html | . |
/***\n|''Name:''|UploadPlugin|\n|''Description:''|Save to web a TiddlyWiki|\n|''Version:''|3.4.4|\n|''Date:''|Sep 30, 2006|\n|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|\n|''Documentation:''|http://tiddlywiki.bidix.info/#UploadDoc|\n|''Author:''|BidiX (BidiX (at) bidix (dot) info)|\n|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|\n|''~CoreVersion:''|2.0.0|\n|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|\n|''Include:''|config.lib.file; config.lib.log; config.lib.options; PasswordTweak|\n|''Require:''|[[UploadService|http://tiddlywiki.bidix.info/#UploadService]]|\n***/\n//{{{\nversion.extensions.UploadPlugin = {\n major: 3, minor: 4, revision: 4, \n date: new Date(2006,8,30),\n source: 'http://tiddlywiki.bidix.info/#UploadPlugin',\n documentation: 'http://tiddlywiki.bidix.info/#UploadDoc',\n author: 'BidiX (BidiX (at) bidix (dot) info',\n license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',\n coreVersion: '2.0.0',\n browser: 'Firefox 1.5; InternetExplorer 6.0; Safari'\n};\n//}}}\n\n////+++!![config.lib.file]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.file) config.lib.file= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\nconfig.lib.file.dirname = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(0, lastpos);\n } else {\n return filePath.substring(0, filePath.lastIndexOf("\s\s"));\n }\n};\nconfig.lib.file.basename = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("#")) != -1) \n filePath = filePath.substring(0, lastpos);\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(lastpos + 1);\n } else\n return filePath.substring(filePath.lastIndexOf("\s\s")+1);\n};\nwindow.basename = function() {return "@@deprecated@@";};\n//}}}\n////===\n\n////+++!![config.lib.log]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.log) config.lib.log= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 1}, \n date: new Date(2006,8,19)\n};\nconfig.lib.Log = function(tiddlerTitle, logHeader) {\n if (version.major < 2)\n this.tiddler = store.tiddlers[tiddlerTitle];\n else\n this.tiddler = store.getTiddler(tiddlerTitle);\n if (!this.tiddler) {\n this.tiddler = new Tiddler();\n this.tiddler.title = tiddlerTitle;\n this.tiddler.text = "| !date | !user | !location |" + logHeader;\n this.tiddler.created = new Date();\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[tiddlerTitle] = this.tiddler;\n else\n store.addTiddler(this.tiddler);\n }\n return this;\n};\n\nconfig.lib.Log.prototype.newLine = function (line) {\n var now = new Date();\n var newText = "| ";\n newText += now.getDate()+"/"+(now.getMonth()+1)+"/"+now.getFullYear() + " ";\n newText += now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+" | ";\n newText += config.options.txtUserName + " | ";\n var location = document.location.toString();\n var filename = config.lib.file.basename(location);\n if (!filename) filename = '/';\n newText += "[["+filename+"|"+location + "]] |";\n this.tiddler.text = this.tiddler.text + "\sn" + newText;\n this.addToLine(line);\n};\n\nconfig.lib.Log.prototype.addToLine = function (text) {\n this.tiddler.text = this.tiddler.text + text;\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[this.tiddler.tittle] = this.tiddler;\n else {\n store.addTiddler(this.tiddler);\n story.refreshTiddler(this.tiddler.title);\n store.notify(this.tiddler.title, true);\n }\n if (version.major < 2)\n store.notifyAll(); \n};\n//}}}\n////===\n\n////+++!![config.lib.options]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.options) config.lib.options = {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\n\nconfig.lib.options.init = function (name, defaultValue) {\n if (!config.options[name]) {\n config.options[name] = defaultValue;\n saveOptionCookie(name);\n }\n};\n//}}}\n////===\n\n////+++!![PasswordTweak]\n\n//{{{\nversion.extensions.PasswordTweak = {\n major: 1, minor: 0, revision: 3, date: new Date(2006,8,30),\n type: 'tweak',\n source: 'http://tiddlywiki.bidix.info/#PasswordTweak'\n};\n//}}}\n/***\n!!config.macros.option\n***/\n//{{{\nconfig.macros.option.passwordCheckboxLabel = "Save this password on this computer";\nconfig.macros.option.passwordType = "password"; // password | text\n\nconfig.macros.option.onChangeOption = function(e)\n{\n var opt = this.getAttribute("option");\n var elementType,valueField;\n if(opt) {\n switch(opt.substr(0,3)) {\n case "txt":\n elementType = "input";\n valueField = "value";\n break;\n case "pas":\n elementType = "input";\n valueField = "value";\n break;\n case "chk":\n elementType = "input";\n valueField = "checked";\n break;\n }\n config.options[opt] = this[valueField];\n saveOptionCookie(opt);\n var nodes = document.getElementsByTagName(elementType);\n for(var t=0; t<nodes.length; t++) \n {\n var optNode = nodes[t].getAttribute("option");\n if (opt == optNode) \n nodes[t][valueField] = this[valueField];\n }\n }\n return(true);\n};\n\nconfig.macros.option.handler = function(place,macroName,params)\n{\n var opt = params[0];\n if(config.options[opt] === undefined) {\n return;}\n var c;\n switch(opt.substr(0,3)) {\n case "txt":\n c = document.createElement("input");\n c.onkeyup = this.onChangeOption;\n c.setAttribute ("option",opt);\n c.className = "txtOptionInput "+opt;\n place.appendChild(c);\n c.value = config.options[opt];\n break;\n case "pas":\n // input password\n c = document.createElement ("input");\n c.setAttribute("type",config.macros.option.passwordType);\n c.onkeyup = this.onChangeOption;\n c.setAttribute("option",opt);\n c.className = "pasOptionInput "+opt;\n place.appendChild(c);\n c.value = config.options[opt];\n // checkbox link with this password "save this password on this computer"\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option","chk"+opt);\n c.className = "chkOptionInput "+opt;\n place.appendChild(c);\n c.checked = config.options["chk"+opt];\n // text savePasswordCheckboxLabel\n place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));\n break;\n case "chk":\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option",opt);\n c.className = "chkOptionInput "+opt;\n place.appendChild(c);\n c.checked = config.options[opt];\n break;\n }\n};\n//}}}\n/***\n!! Option cookie stuff\n***/\n//{{{\nwindow.loadOptionsCookie_orig_PasswordTweak = window.loadOptionsCookie;\nwindow.loadOptionsCookie = function()\n{\n var cookies = document.cookie.split(";");\n for(var c=0; c<cookies.length; c++) {\n var p = cookies[c].indexOf("=");\n if(p != -1) {\n var name = cookies[c].substr(0,p).trim();\n var value = cookies[c].substr(p+1).trim();\n switch(name.substr(0,3)) {\n case "txt":\n config.options[name] = unescape(value);\n break;\n case "pas":\n config.options[name] = unescape(value);\n break;\n case "chk":\n config.options[name] = value == "true";\n break;\n }\n }\n }\n};\n\nwindow.saveOptionCookie_orig_PasswordTweak = window.saveOptionCookie;\nwindow.saveOptionCookie = function(name)\n{\n var c = name + "=";\n switch(name.substr(0,3)) {\n case "txt":\n c += escape(config.options[name].toString());\n break;\n case "chk":\n c += config.options[name] ? "true" : "false";\n // is there an option link with this chk ?\n if (config.options[name.substr(3)]) {\n saveOptionCookie(name.substr(3));\n }\n break;\n case "pas":\n if (config.options["chk"+name]) {\n c += escape(config.options[name].toString());\n } else {\n c += "";\n }\n break;\n }\n c += "; expires=Fri, 1 Jan 2038 12:00:00 UTC; path=/";\n document.cookie = c;\n};\n//}}}\n/***\n!! Initializations\n***/\n//{{{\n// define config.options.pasPassword\nif (!config.options.pasPassword) {\n config.options.pasPassword = 'defaultPassword';\n window.saveOptionCookie('pasPassword');\n}\n// since loadCookies is first called befor password definition\n// we need to reload cookies\nwindow.loadOptionsCookie();\n//}}}\n////===\n\n////+++!![config.macros.upload]\n\n//{{{\nconfig.macros.upload = {\n accessKey: "U",\n formName: "UploadPlugin",\n contentType: "text/html;charset=UTF-8",\n defaultStoreScript: "store.php"\n};\n\n// only this two configs need to be translated\nconfig.macros.upload.messages = {\n aboutToUpload: "About to upload TiddlyWiki to %0",\n backupFileStored: "Previous file backuped in %0",\n crossDomain: "Certainly a cross-domain isue: access to an other site isn't allowed",\n errorDownloading: "Error downloading",\n errorUploadingContent: "Error uploading content",\n fileLocked: "Files is locked: You are not allowed to Upload",\n fileNotFound: "file to upload not found",\n fileNotUploaded: "File %0 NOT uploaded",\n mainFileUploaded: "Main TiddlyWiki file uploaded to %0",\n passwordEmpty: "Unable to upload, your password is empty",\n urlParamMissing: "url param missing",\n rssFileNotUploaded: "RssFile %0 NOT uploaded",\n rssFileUploaded: "Rss File uploaded to %0"\n};\n\nconfig.macros.upload.label = {\n promptOption: "Save and Upload this TiddlyWiki with UploadOptions",\n promptParamMacro: "Save and Upload this TiddlyWiki in %0",\n saveLabel: "save to web", \n saveToDisk: "save to disk",\n uploadLabel: "upload" \n};\n\nconfig.macros.upload.handler = function(place,macroName,params){\n // parameters initialization\n var storeUrl = params[0];\n var toFilename = params[1];\n var backupDir = params[2];\n var uploadDir = params[3];\n var username = params[4];\n var password; // for security reason no password as macro parameter\n var label;\n if (document.location.toString().substr(0,4) == "http")\n label = this.label.saveLabel;\n else\n label = this.label.uploadLabel;\n var prompt;\n if (storeUrl) {\n prompt = this.label.promptParamMacro.toString().format([this.toDirUrl(storeUrl, uploadDir, username)]);\n }\n else {\n prompt = this.label.promptOption;\n }\n createTiddlyButton(place, label, prompt, \n function () {\n config.macros.upload.upload(storeUrl, toFilename, uploadDir, backupDir, username, password); \n return false;}, \n null, null, this.accessKey);\n};\nconfig.macros.upload.UploadLog = function() {\n return new config.lib.Log('UploadLog', " !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |" );\n};\nconfig.macros.upload.UploadLog.prototype = config.lib.Log.prototype;\nconfig.macros.upload.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {\n var line = " [[" + config.lib.file.basename(storeUrl) + "|" + storeUrl + "]] | ";\n line += uploadDir + " | " + toFilename + " | " + backupDir + " |";\n this.newLine(line);\n};\nconfig.macros.upload.UploadLog.prototype.endUpload = function() {\n this.addToLine(" Ok |");\n};\nconfig.macros.upload.basename = config.lib.file.basename;\nconfig.macros.upload.dirname = config.lib.file.dirname;\nconfig.macros.upload.toRootUrl = function (storeUrl, username)\n{\n return root = (this.dirname(storeUrl)?this.dirname(storeUrl):this.dirname(document.location.toString()));\n}\nconfig.macros.upload.toDirUrl = function (storeUrl, uploadDir, username)\n{\n var root = this.toRootUrl(storeUrl, username);\n if (uploadDir && uploadDir != '.')\n root = root + '/' + uploadDir;\n return root;\n}\nconfig.macros.upload.toFileUrl = function (storeUrl, toFilename, uploadDir, username)\n{\n return this.toDirUrl(storeUrl, uploadDir, username) + '/' + toFilename;\n}\nconfig.macros.upload.upload = function(storeUrl, toFilename, uploadDir, backupDir, username, password)\n{\n // parameters initialization\n storeUrl = (storeUrl ? storeUrl : config.options.txtUploadStoreUrl);\n toFilename = (toFilename ? toFilename : config.options.txtUploadFilename);\n backupDir = (backupDir ? backupDir : config.options.txtUploadBackupDir);\n uploadDir = (uploadDir ? uploadDir : config.options.txtUploadDir);\n username = (username ? username : config.options.txtUploadUserName);\n password = config.options.pasUploadPassword; // for security reason no password as macro parameter\n if (!password || password === '') {\n alert(config.macros.upload.messages.passwordEmpty);\n return;\n }\n if (storeUrl === '') {\n storeUrl = config.macros.upload.defaultStoreScript;\n }\n if (config.lib.file.dirname(storeUrl) === '') {\n storeUrl = config.lib.file.dirname(document.location.toString())+'/'+storeUrl;\n }\n if (toFilename === '') {\n toFilename = config.lib.file.basename(document.location.toString());\n }\n\n clearMessage();\n // only for forcing the message to display\n if (version.major < 2)\n store.notifyAll();\n if (!storeUrl) {\n alert(config.macros.upload.messages.urlParamMissing);\n return;\n }\n // Check that file is not locked\n if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {\n if (BidiX.GroupAuthoring.lock.isLocked() && !BidiX.GroupAuthoring.lock.isMyLock()) {\n alert(config.macros.upload.messages.fileLocked);\n return;\n }\n }\n \n var log = new this.UploadLog();\n log.startUpload(storeUrl, toFilename, uploadDir, backupDir);\n if (document.location.toString().substr(0,5) == "file:") {\n saveChanges();\n }\n var toDir = config.macros.upload.toDirUrl(storeUrl, toFilename, uploadDir, username);\n displayMessage(config.macros.upload.messages.aboutToUpload.format([toDir]), toDir);\n this.uploadChanges(storeUrl, toFilename, uploadDir, backupDir, username, password);\n if(config.options.chkGenerateAnRssFeed) {\n //var rssContent = convertUnicodeToUTF8(generateRss());\n var rssContent = generateRss();\n var rssPath = toFilename.substr(0,toFilename.lastIndexOf(".")) + ".xml";\n this.uploadContent(rssContent, storeUrl, rssPath, uploadDir, '', username, password, \n function (responseText) {\n if (responseText.substring(0,1) != '0') {\n displayMessage(config.macros.upload.messages.rssFileNotUploaded.format([rssPath]));\n }\n else {\n var toFileUrl = config.macros.upload.toFileUrl(storeUrl, rssPath, uploadDir, username);\n displayMessage(config.macros.upload.messages.rssFileUploaded.format(\n [toFileUrl]), toFileUrl);\n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n });\n }\n return;\n};\n\nconfig.macros.upload.uploadChanges = function(storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var original;\n if (document.location.toString().substr(0,4) == "http") {\n original = this.download(storeUrl, toFilename, uploadDir, backupDir, username, password);\n return;\n }\n else {\n // standard way : Local file\n \n original = loadFile(getLocalPath(document.location.toString()));\n if(window.Components) {\n // it's a mozilla browser\n try {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]\n .createInstance(Components.interfaces.nsIScriptableUnicodeConverter);\n converter.charset = "UTF-8";\n original = converter.ConvertToUnicode(original);\n }\n catch(e) {\n }\n }\n }\n //DEBUG alert(original);\n this.uploadChangesFrom(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password);\n};\n\nconfig.macros.upload.uploadChangesFrom = function(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var startSaveArea = '<div id="' + 'storeArea">'; // Split up into two so that indexOf() of this source doesn't find it\n var endSaveArea = '</d' + 'iv>';\n // Locate the storeArea div's\n var posOpeningDiv = original.indexOf(startSaveArea);\n var posClosingDiv = original.lastIndexOf(endSaveArea);\n if((posOpeningDiv == -1) || (posClosingDiv == -1))\n {\n alert(config.messages.invalidFileError.format([document.location.toString()]));\n return;\n }\n var revised = original.substr(0,posOpeningDiv + startSaveArea.length) + \n allTiddlersAsHtml() + "\sn\st\st" +\n original.substr(posClosingDiv);\n var newSiteTitle;\n if(version.major < 2){\n newSiteTitle = (getElementText("siteTitle") + " - " + getElementText("siteSubtitle")).htmlEncode();\n } else {\n newSiteTitle = (wikifyPlain ("SiteTitle") + " - " + wikifyPlain ("SiteSubtitle")).htmlEncode();\n }\n\n revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");\n revised = revised.replaceChunk("<!--PRE-HEAD-START--"+">","<!--PRE-HEAD-END--"+">","\sn" + store.getTiddlerText("MarkupPreHead","") + "\sn");\n revised = revised.replaceChunk("<!--POST-HEAD-START--"+">","<!--POST-HEAD-END--"+">","\sn" + store.getTiddlerText("MarkupPostHead","") + "\sn");\n revised = revised.replaceChunk("<!--PRE-BODY-START--"+">","<!--PRE-BODY-END--"+">","\sn" + store.getTiddlerText("MarkupPreBody","") + "\sn");\n revised = revised.replaceChunk("<!--POST-BODY-START--"+">","<!--POST-BODY-END--"+">","\sn" + store.getTiddlerText("MarkupPostBody","") + "\sn");\n\n var response = this.uploadContent(revised, storeUrl, toFilename, uploadDir, backupDir, \n username, password, function (responseText) {\n if (responseText.substring(0,1) != '0') {\n alert(responseText);\n displayMessage(config.macros.upload.messages.fileNotUploaded.format([getLocalPath(document.location.toString())]));\n }\n else {\n if (uploadDir !== '') {\n toFilename = uploadDir + "/" + config.macros.upload.basename(toFilename);\n } else {\n toFilename = config.macros.upload.basename(toFilename);\n }\n var toFileUrl = config.macros.upload.toFileUrl(storeUrl, toFilename, uploadDir, username);\n if (responseText.indexOf("destfile:") > 0) {\n var destfile = responseText.substring(responseText.indexOf("destfile:")+9, \n responseText.indexOf("\sn", responseText.indexOf("destfile:")));\n toFileUrl = config.macros.upload.toRootUrl(storeUrl, username) + '/' + destfile;\n }\n else {\n toFileUrl = config.macros.upload.toFileUrl(storeUrl, toFilename, uploadDir, username);\n }\n displayMessage(config.macros.upload.messages.mainFileUploaded.format(\n [toFileUrl]), toFileUrl);\n if (backupDir && responseText.indexOf("backupfile:") > 0) {\n var backupFile = responseText.substring(responseText.indexOf("backupfile:")+11, \n responseText.indexOf("\sn", responseText.indexOf("backupfile:")));\n toBackupUrl = config.macros.upload.toRootUrl(storeUrl, username) + '/' + backupFile;\n displayMessage(config.macros.upload.messages.backupFileStored.format(\n [toBackupUrl]), toBackupUrl);\n }\n var log = new config.macros.upload.UploadLog();\n log.endUpload();\n store.setDirty(false);\n // erase local lock\n if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {\n BidiX.GroupAuthoring.lock.eraseLock();\n // change mtime with new mtime after upload\n var mtime = responseText.substr(responseText.indexOf("mtime:")+6);\n BidiX.GroupAuthoring.lock.mtime = mtime;\n }\n \n \n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n }\n );\n};\n\nconfig.macros.upload.uploadContent = function(content, storeUrl, toFilename, uploadDir, backupDir, \n username, password, callbackFn) {\n var boundary = "---------------------------"+"AaB03x"; \n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n if (window.netscape){\n try {\n if (document.location.toString().substr(0,4) != "http") {\n netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');}\n }\n catch (e) {}\n } \n //DEBUG alert("user["+config.options.txtUploadUserName+"] password[" + config.options.pasUploadPassword + "]");\n // compose headers data\n var sheader = "";\n sheader += "--" + boundary + "\sr\snContent-disposition: form-data; name=\s"";\n sheader += config.macros.upload.formName +"\s"\sr\sn\sr\sn";\n sheader += "backupDir="+backupDir\n +";user=" + username \n +";password=" + password\n +";uploaddir=" + uploadDir;\n // add lock attributes to sheader\n if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {\n var l = BidiX.GroupAuthoring.lock.myLock;\n sheader += ";lockuser=" + l.user\n + ";mtime=" + l.mtime\n + ";locktime=" + l.locktime;\n }\n sheader += ";;\sr\sn"; \n sheader += "\sr\sn" + "--" + boundary + "\sr\sn";\n sheader += "Content-disposition: form-data; name=\s"userfile\s"; filename=\s""+toFilename+"\s"\sr\sn";\n sheader += "Content-Type: " + config.macros.upload.contentType + "\sr\sn";\n sheader += "Content-Length: " + content.length + "\sr\sn\sr\sn";\n // compose trailer data\n var strailer = new String();\n strailer = "\sr\sn--" + boundary + "--\sr\sn";\n //strailer = "--" + boundary + "--\sr\sn";\n var data;\n data = sheader + content + strailer;\n //request.open("POST", storeUrl, true, username, password);\n try {\n request.open("POST", storeUrl, true); \n }\n catch(e) {\n alert(config.macros.upload.messages.crossDomain + "\snError:" +e);\n exit;\n }\n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if (request.status == 200)\n callbackFn(request.responseText);\n else\n alert(config.macros.upload.messages.errorUploadingContent + "\snStatus: "+request.status.statusText);\n }\n };\n request.setRequestHeader("Content-Length",data.length);\n request.setRequestHeader("Content-Type","multipart/form-data; boundary="+boundary);\n request.send(data); \n};\n\n\nconfig.macros.upload.download = function(uploadUrl, uploadToFilename, uploadDir, uploadBackupDir, \n username, password) {\n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n try {\n if (uploadUrl.substr(0,4) == "http") {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n }\n else {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n }\n } catch (e) { }\n //request.open("GET", document.location.toString(), true, username, password);\n try {\n request.open("GET", document.location.toString(), true);\n }\n catch(e) {\n alert(config.macros.upload.messages.crossDomain + "\snError:" +e);\n exit;\n }\n \n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if(request.status == 200) {\n config.macros.upload.uploadChangesFrom(request.responseText, uploadUrl, \n uploadToFilename, uploadDir, uploadBackupDir, username, password);\n }\n else\n alert(config.macros.upload.messages.errorDownloading.format(\n [document.location.toString()]) + "\snStatus: "+request.status.statusText);\n }\n };\n request.send(null);\n};\n\n//}}}\n////===\n\n////+++!![Initializations]\n\n//{{{\nconfig.lib.options.init('txtUploadStoreUrl','store.php');\nconfig.lib.options.init('txtUploadFilename','');\nconfig.lib.options.init('txtUploadDir','');\nconfig.lib.options.init('txtUploadBackupDir','');\nconfig.lib.options.init('txtUploadUserName',config.options.txtUserName);\nconfig.lib.options.init('pasUploadPassword','');\nsetStylesheet(\n ".pasOptionInput {width: 11em;}\sn"+\n ".txtOptionInput.txtUploadStoreUrl {width: 25em;}\sn"+\n ".txtOptionInput.txtUploadFilename {width: 25em;}\sn"+\n ".txtOptionInput.txtUploadDir {width: 25em;}\sn"+\n ".txtOptionInput.txtUploadBackupDir {width: 25em;}\sn"+\n "",\n "UploadOptionsStyles");\nconfig.shadowTiddlers.UploadDoc = "[[Full Documentation|http://tiddlywiki.bidix.info/l#UploadDoc ]]\sn"; \nconfig.options.chkAutoSave = false; saveOptionCookie('chkAutoSave');\n\n//}}}\n////===\n\n////+++!![Core Hijacking]\n\n//{{{\nconfig.macros.saveChanges.label_orig_UploadPlugin = config.macros.saveChanges.label;\nconfig.macros.saveChanges.label = config.macros.upload.label.saveToDisk;\n\nconfig.macros.saveChanges.handler_orig_UploadPlugin = config.macros.saveChanges.handler;\n\nconfig.macros.saveChanges.handler = function(place)\n{\n if ((!readOnly) && (document.location.toString().substr(0,4) != "http"))\n createTiddlyButton(place,this.label,this.prompt,this.onClick,null,null,this.accessKey);\n};\n\n//}}}\n////===\n
\n<!--{{{-->\n\n<div class='toolbar'>\n <span macro="showWhenTagged systemConfig">\n <span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></span>\n </span>\n <span style="padding:1em;"></span>\n <span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler undoChanges permalink references jump newHere newJournalHere'></span>\n</div>\n\n<div class="tagglyTagged" macro="tags"></div>\n\n<div class='titleContainer'>\n <span class='title' macro='view title'></span>\n <span macro="miniTag"></span>\n</div>\n\n<div class='subtitle'>\n <span macro='view modifier link'></span>,\n <span macro='view modified date [[DD-mmm-YY]]'></span>\n (<span macro='message views.wikified.createdPrompt'></span>\n <span macro='view created date [[DD-mmm-YY]]'></span>)\n</div>\n\n<div macro="showWhenExists ViewPanelTemplate">[[ViewPanelTemplate]]</div>\n\n<div macro="hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer' macro='view text wikified'></div>\n</div>\n<div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer'><pre macro='view text'></pre></div>\n</div>\n\n<div macro="showWhenExists ViewDashboardTemplate">[[ViewDashboardTemplate]]</div>\n\n<div class="tagglyTagging" macro="tagglyTagging"></div>\n\n<!--}}}-->\n
''cstmToolBox' problems/tasks''\n\n* ''Array Indexing''\nSachin,\n\n\nOn Thu, Jul 10, 2008 at 10:25 AM, Sachin Bhate <skbhate@gmail.com> wrote:\n> Rich,\n>\n> I am writing/testing a parser to create mapping for\n> matlab array indexing and netcdf-java array indexing.\n>\n> Indexing issues being taken care of are ..\n>\n> 1. Retrieve NetCDF variable data:\n>\n> f{'myVariable'}(i, j, ...) % takes care of stride as well\n>\n> 2. Indexing defaults for NetCDF variables and attributes:\n> ":" means 'all', including unstated indices to the right.\n> Otherwise, unstated indices to the right default to 1.\n>\n> Last index:\n> The keyword "end" can serve as the last index for any\n> dimensional direction, as in "v(1:2:end, ...)".\n\nThis all sounds good.\n\n>\n> Do I need to consider input as in 'nc_varget' as well ?\n\nDo you mean handling the "start" "count" "stride" syntax? If so, NO!\n We only want the NetCDF Toolbox style.\n\n---------------------------------------------------------------------------\n\n* ''NJ_ATTGET''\n\nSachin,\n\n\n> 4.Run this attached test. 'testAttributes.m'. (gridded and non-gridded data\n> attributes)\n>\n> The new re factored java methods and function provides attributes in matlab\n> struct form.\n\n\n\n>\n> One important thing: When you run above test, you may encounter warning\n> related to\n> 'CPP-options' as invalid field. Matlab struct does not allow anything as\n> field name which\n> has non-alphanumeric characters except underscore.\n> Right now, I have the\n> option within the matlab\n> function to ignore such invalid fields. I can easily replace those\n> characters with valid ones\n> (like 'CPP-options' can be 'CPP_options'), but want to know your input\n> before I do that.\n\nYes, please replace non-valid characters with underscore.\n\n>\n> comments ? please check-in function into cf/trunk once u ok.\n\nIt worked fine! And I like your idea of returning all the attributes\nif you don't specify which ones you want as a struct. That is cool.\n\nI do have a few comments/suggestions:\n\nThe attributes all seem to get returned as strings, regardless of\ntheir original type, but they should be returned as properly typed\nvariables in the struct. In other words, if the attributes are\ndoubles, they should be returned as doubles.\n\nIn addition to getting all the attributes in a structure, I think we\nshould make it possible to return just the attribute value you are\nlooking for, whether from the global attributes or from a variable.\n\nIt also seems a bit unnatural to me to always return the global\nattributes structure when the user asks for the attributes of a\nvariable.\n\nHow about behavior like this:\n\n{{{\n\nnj_attget(uri) returns a struct with all global\nattributes (with proper typing of attributes)\nnj_attget(uri,var) return a struct with all attributes for\na variable (with proper typing of attributes)\nnj_attget(uri,var,att) returns a variable with the value for a\nspecific variable attribute\nnj_attget(uri,'global',att) returns a variable with the value of a\nglobal attribute\n\nThis would give us all the capabilities of the nc_attget function, and\nmuch more!!!\n\n}}}\n\n\n> ps: Next test will be OOP (i know you are waiting .. ).\n\nYes, the OOP stuff will be much nicer for attributes!\n\n--------------------------------------------------------------------\n\n* ''NJ_VARGET''\n\nI notice that with nj_varget2 you removed the option to read by\n[corner],[edges]. Would it be possible to leave that in?\n\nIt would be nice to be able to call nj_varget2 as\n\nnj_varget(uri,var,str)\n\nor\n\nnj_varget(uri,var,[corner],[edges],[stride])\nwith 1-based indexing.\n\ne.g: t=nj_varget(uri,'temp','1,end,1:40,1:2:end');\n\nor\n t=nj_varget(uri,'temp',[1 end 1 1],[1 1 end end],[1 1 1 2]\n\n------------------------------------------------------------------------\n\n\n* ''Mod for cf_subsetGrid''\n\nSachin,\n\nWe need to mod cf_subsetGrid so that if the requested bounding box\nexceeds the bounds of the data, you still whatever data is within the\nbounding box. Right now, if you request a bounding box that is\nlarger than the bounds of the lon/lat data, you get a "does not\nintersect grid" error.\n\nI found this out because I'd like to extract a certain time range of\ndata from some time series data using cf_subsetGrid.\n\nSo this data has lots of time values, and only 1 lon,lat value, but\nit's still a grid, and subsetGrid should work.\n\nIf I do this:\n\nuri='http://dods.ndbc.noaa.gov/thredds/dodsC/data/stdmet/44013/44013h2006.nc';\n\n[h,g]=cf_subsetGrid(uri,'wave_height',[-180 180 -90 90],[2006 4 7 0 0\n0],[2006 12 1 0 0 0]);\nJava exception occurred:\njava.lang.IllegalArgumentException: Invalid range:Request Bounding box\ndoes not intersect Grid\n\n at msstate.cstm.data.grid.JGeoGridUtil.subsetGrid(Unknown Source)\n\n at msstate.cstm.data.grid.JGeoGridUtil.subsetGrid(Unknown Source)\n\n\nActually, it would be nice if cf_subsetGrid could check arguments to\nsee if they are valid ways of specifying time or not:\ne.g. check to see if datenum(arg1), datenum(arg2) produces errors\nor not. Then if the user doesn't specify bounding box, just give\nthe user all the lon/lat data.\n\nThis would allow us to get the time series data without the bogus\n[-180 180 -90 90] argument, so we could just do:\n\n[h,g]=cf_subsetGrid(uri,'wave_height',[2006 4 7 0 0 0],[2006 12 1 0 0 0]);\n\n\nSound okay?\n\n--------------------------------------------------------------------------------\n\n\n\n
Output from ''/log/regression.log''.\n\n{{{\n\n>>>> New Log: Wed Mar 14 12:27:31 2007\n\n[SUCCESS][Wed Mar 14 12:27:31 2007][Read /cygdrive/c/skbhate/dev/nopp/skbhate_branch/ROMS/Include/cppdefs.h.]\n[SUCCESS][Wed Mar 14 12:27:31 2007][Running all applications one at a time]\n\nRunning Application: ESTUARY_TEST.\n\n[SUCCESS][Wed Mar 14 12:27:31 2007][Changed application to ESTUARY_TEST.]\n[SUCCESS][Wed Mar 14 12:32:29 2007][Compiled ROMS successfully.]\n[SUCCESS][Wed Mar 14 12:32:29 2007][Starting ROMS-SED in serial mode...]\n[ERROR][Wed Mar 14 12:32:29 2007][./bin/runRegression,run_application,Regression::test_roms_run][ROMS run unsucessful. Incomplete output.]\n[ERROR][Wed Mar 14 12:32:29 2007][./bin/runRegression,][Model run for ESTUARY_TEST could not be completed. Proceeding to new application.]\n\nRunning Application: INLET_TEST.\n\n[SUCCESS][Wed Mar 14 12:32:29 2007][Changed application to INLET_TEST.]\n[ERROR][Wed Mar 14 12:32:31 2007][./bin/runRegression,run_application][ROMS build failed. ROMS executables not created. Check 'build.err' for more info.]\n[ERROR][Wed Mar 14 12:32:31 2007][./bin/runRegression,][Model run for INLET_TEST could not be completed. Proceeding to new application.]\n\nRunning Application: LAKE_SIGNELL.\n\n[SUCCESS][Wed Mar 14 12:32:31 2007][Changed application to LAKE_SIGNELL.]\n[ERROR][Wed Mar 14 12:34:49 2007][./bin/runRegression,run_application][ROMS build failed. ROMS executables not created. Check 'build.err' for more info.]\n[ERROR][Wed Mar 14 12:34:49 2007][./bin/runRegression,][Model run for LAKE_SIGNELL could not be completed. Proceeding to new application.]\n\nRunning Application: MIXED_LAYER.\n\n[SUCCESS][Wed Mar 14 12:34:49 2007][Changed application to MIXED_LAYER.]\n[SUCCESS][Wed Mar 14 12:39:22 2007][Compiled ROMS successfully.]\n[SUCCESS][Wed Mar 14 12:39:22 2007][Starting ROMS-SED in serial mode...]\n[SUCCESS][Wed Mar 14 12:40:48 2007][ROMS run successful. History or Restart file created.]\n\n...................\n...................\n\n>>>> New Log: Wed Mar 14 15:46:34 2007\n\n[SUCCESS][Wed Mar 14 15:46:34 2007][Read /cygdrive/c/skbhate/dev/nopp/skbhate_branch/ROMS/Include/cppdefs.h.]\n\nRunning Application: SED_TOY.\n\n[SUCCESS][Wed Mar 14 15:46:34 2007][Changed application to SED_TOY.]\n[SUCCESS][Wed Mar 14 15:51:02 2007][Compiled ROMS successfully.]\n[SUCCESS][Wed Mar 14 15:51:02 2007][Starting ROMS-SED in serial mode...]\n[SUCCESS][Wed Mar 14 15:51:23 2007][ROMS run successful. History or Restart file created.]\n\nRunning NCO tools tests.......\n\n\nFile type: his\n[SUCCESS][Wed Mar 14 15:51:24 2007][Created ncdiff output.]\n[SUCCESS][Wed Mar 14 15:51:24 2007][Created ncks output.]\n\nFile type: rst\n[SUCCESS][Wed Mar 14 15:51:25 2007][Created ncdiff output.]\n[SUCCESS][Wed Mar 14 15:51:25 2007][Created ncks output.]\n\nFile type: avg\n[ERROR][Wed Mar 14 15:51:25 2007][./bin/runRegression,run_application][Master file for file type 'avg' not found in /cygdrive/c/skbhate/dev/nopp/regression/data/Master/SED_TOY. 'ncdiff' or 'ncks' output won't be created.]\n[ERROR][Wed Mar 14 15:51:25 2007][./bin/runRegression,run_application][Output file for file type 'avg' not found. 'ncdiff' or 'ncks' output won't be created.]\n\nFile type: dia\n[ERROR][Wed Mar 14 15:51:25 2007][./bin/runRegression,run_application][Master file for file type 'dia' not found in /cygdrive/c/skbhate/dev/nopp/regression/data/Master/SED_TOY. 'ncdiff' or 'ncks' output won't be created.]\n[ERROR][Wed Mar 14 15:51:25 2007][./bin/runRegression,run_application][Output file for file type 'dia' not found. 'ncdiff' or 'ncks' output won't be created.]\n\n}}}\n
!''Issues concerning Unidata's Netcdf-java libray version 2.22''\n\n!!1. ''Http Handler Problem''\n{{{\nPackage: ucar.nc2.dataset\nClass: NetcdfDataset\nMethod: isDODS(String Location)\n\nProblem: As reported on netcdf-java support [ [netcdf-java] specifying Http Handler ]\nDate: 01/29/2008\n\nJohn,\n\nWe have been involved from quite some time in creating a netCDFdata access layer for Matlab\nusing Netcdf-Java toolsUI API and it has been working out great, except in\nsome case where we do have to modify/extend the API to address issues with Matlab.\n\nWith regards to using the netcdf-java API within Matlab,\n we have been using the 'GridDataset.open' class to access a netcdf-file\nwhich is on a 'HTTP' server.\n\nBut, in some version of Matlab on linux we do get an error message, where\nit is unable to access the file from http server. The error is..\n>> GridDataset = GridDataset.open(uri);\n??? Java exception occurred:\njava.io.IOException:\nhttp://science.whoi.edu/users/kestons/redtide_2005_hindcast/OUT/avg_gom_0014.nc\nis not\na valid URL.Document not found on server\n at ucar.nc2.dataset.NetcdfDataset.isDODS(NetcdfDataset.java:360)\n at ucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:332)\n at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:175)\n at ucar.nc2.dataset.NetcdfDatasetCache.acquire(NetcdfDatasetCache.java:203)\n at ucar.nc2.dataset.NetcdfDatasetCache.acquire(NetcdfDatasetCache.java:183)\n at ucar.nc2.dataset.NetcdfDatasetCache.acquire(NetcdfDatasetCache.java:171)\n at ucar.nc2.dt.grid.GridDataset.open(GridDataset.java:72)\n\n\nI understand that the error is generated where a suitable 'http' handler is not assigned\nwhen I am running this code in Matlab. The quick solution which I found is to modify the 'isDODS' method\nwith utility method 'ucar.nc2.util.NetworkUtils.initProtocolHandler()', which specifies a\nhttp handler for the specified URL.\n\nThis approach works fine as a temporary solution, but would prefer if this solution is incorporated in\nyour ToolsUI distribution. Do you think it would be possible for you to add this solution to the\nToolsUI future release ?\n\n}}}\nNetcdf-java response: >>>\n{{{\n\n Subject: Re: [netcdf-java] specifying Http Handler\n> Date: Sun, 10 Feb 2008 15:31:35 -0700\n> From: John Caron <caron@unidata.ucar.edu>\n> To: skbhate@ngi.msstate.edu\n> References: <479F637C.2040800@ngi.msstate.edu>\n>\n> Hi Sachim:\n>\n> ucar.nc2.util.NetworkUtils.initProtocolHandler() is no longer called in the\n> netcdf-java library, and\n> i would be surprised if the standard sun http handler isnt already\n> registered.\n>\n> can you double check what is failing? "Document not found on server" sounds\n> like a standard 404\n> failure rather than a lack of a protocol handler.\n>\n> if it really seems to be the case that registering a protocol handler solves\n> the problem, can you\n> send the JVM and linux version?\n>\n> thanks....\n\n------------------------------------------------------------------------------------------------\n}}}\n\nPossible Solutions: >>>\n\n{{{\nProblem Identified: (For matlab versions 2007b and earlier). \nSolution: Use Matlab version higher than 2007b or modify 'isDODS' method to register http handler.\n\n\nLocal Fix: toolsUI-skb-0.1.jar\nFuture Release fix: Netcdf-Java 4.0 claims to fix this problem. But, this is more of a matlab problem\nthan netcdf-java. \n\n\n}}}\n\n\n!!2. ''Indexing error/bug for vertical transform''\n\n{{{\nPackage: ucar.unidata.geoloc.vertical\nClass: OceanS\nMethod: makeHeight\n\nProblem: As reported on netcdf-java support [[netcdf-java] indexing error/bug ]\nDate: 1/4/2008 \n\nHello,\n\nI am trying to get the array for vertical transform for 'temp'\ngrid for the dataset\nftp://ftp.ssc.hpc.msstate.edu/outgoing/skbhate/nopp/test_bora.nc'\n\nBut, I get this error,\n\n??? Java exception occurred:\njava.lang.ArrayIndexOutOfBoundsException: 1\n\n at ucar.unidata.geoloc.vertical.OceanS.makeHeight(OceanS.java:198)\n\n at \nucar.unidata.geoloc.vertical.OceanS.getCoordinateArray(OceanS.java:141)\n\n\nfor the code..\n\nGridDataset = GridDataset.open(uri);\n\n% get the grid associated with the variable name "temp" (temperature)\nGrid = GridDataset.findGridByName('temp');\n\n% get the coordinate system for this grid:\nGridCoordSys = Grid.getCoordinateSystem();\n\n% if 3D, get vertical coordinate\n zj = GridCoordSys.getVerticalTransform.getCoordinateArray(0); % \nvertical transform\n\n\nright now, the ' xi_rho' is the singleton dimension, but if I change the \ndimension to anything\nother than singleton, it works fine.\n\nCan you suggest me why ?\n}}}\n\nNetcdf-java response: >>>\n\n{{{\nHi Sachin:\n\nit is a bug in VerticalTransformImpl. I have fixed in release 2.2.22.16.\nIf was failing on the case when the x or y dimension had only one point.\n\nthanks for reporting!\n\n--------------------------------------------------------------------------\n}}}\n\nPossible Solution: >>>\n{{{\nFuture Release fix: Fixed in release 2.2.22.16. & Netcdf-Java 4.0.\n\n}}}\n\n!!3. ''openDAP vs Http Access''\n\n{{{\nPackage: ucar.nc2\nClass: Variable\nMethod: read(String sectionSpec)\n\nProblem: As reported on netcdf-java support [ [netcdf-java] Problem with Fortran syntax and OpenDAP files ]\nDate: 2/5/2008 \n\nJohn,\n\nUsing certain fortran type syntax to read data from OpenDAP files\nis resulting in 'NullPointer Exception'.\n\nFor example, when I call the 'read' method on variable and supply the \n'range' to read 'all'\ndata for a particular dimension using colon ":" syntax, it gives null \npointer, otherwise it works fine.\n >>>\nString range = ":,50,100";\n..........\nvarID=ncid.findVariable(var);\ndata = varID.read(range);\n........\n<<<<<\nTest file: \n'http://stellwagen.er.usgs.gov/cgi-bin/nph-dods/models/vs/vs012/his/ocean_his_0001.nc'\n\nWith little debugging, I found out that the method "public static List \nparseSpec(String sectionSpec)"\nin "ucar.ma2.Range" assigns "null" for colon syntax ":" while parsing \nthe string. Later, before the actual data is being read,\nthe 'null' assignment in the range list never gets changed to actual \ndimension size, thus resulting in exception.\n\nFor quick solution (till you find a better one) I have found that \nmodifying the method 'public Array read(String sectionSpec)'\nin 'ucar.nc2.Variable' with code below works fine.\n\n public Array read(String sectionSpec) throws IOException, \nInvalidRangeException {\n List section = Range.parseSpec(sectionSpec);\n\n //Update ----start ----\n // If any 'nulls' in the range list, try and change with actual size \nof the dimension.\n Variable vs = new Variable( this);\n Range.setDefaults( section, vs.shape);\n //---end\n\n return read( section);\n }\n\n\nIs this really a problem with API, or I am doing something wrong while \nreading data using Fortran type syntax ?\n\nbtw, if I use toolsUI GUI to read data (for test purpose) using the \nrange ':,50,100', it works fine.\nI think it's using 'Ncdump' class to read data which may be handling the \n':' syntax differently.\nJust my guess.\n}}}\n\nNetcdf-java response: >>>\n\n{{{\nNo response yet from netcdf-java\n\n}}}\n\nPossible Solutions: >>>\n{{{\n\nSolution: Modify the method as shown below.\n\n/**\n * Read data section specified by a "section selector", and return a memory resident Array. Uses\n * Fortran 90 array section syntax.\n *\n * @param sectionSpec specification string, eg "1:2,10,:,1:100:10". May optionally have ().\n * @return the requested data in a memory-resident Array\n * @see ucar.ma2.Range#parseSpec(String sectionSpec) for sectionSpec syntax\n */\n public Array read(String sectionSpec) throws IOException, InvalidRangeException {\n List section = Range.parseSpec(sectionSpec);\n // added - Sachin 02/04/08\n Variable vs = new Variable( this);\n Range.setDefaults( section, vs.shape);\n return read( section);\n }\n\n\nLocal Fix: toolsUI-skb-0.3.jar\nFuture Release fix: Netcdf-Java 4.0 claims to fix this problem. \n\n}}}\n\n\n!!4. ''Data access for files greater than 2GB''\n\n{{{\n\nPackage: ucar.unidata.io.http\nClass: HttpRandomAccessFile\nMethod: read(String sectionSpec)\n\nProblem: As reported on netcdf-java support [[netcdf-java] Accessing data files larger than 2GB.]\n and THREDDS support [ [THREDDS #TJT-397858]: Accessing data files larger than 2GB via THREDDS ]\n\nDate: 5/8/2008 [netcdf-java] 6/12/2008 [THREDDS]\n\n}}}\n\nReported on netcdf-java:\n\n{{{\nJohn,\n\nI am trying to access a really large NetCDF file (~3GB), but\nit results in error as shown below.\n\nuri='http://www.gri.msstate.edu/rsearch_data/nopp/fvcom_2.5gb.ncml';\n\n>>>>\nGridDataset gds = GridDataset.open(uri);\n\n?? Java exception occurred:\njava.io.IOException: Server has malformed Content-Length header\n\n at ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.java:110)\n ...........\n<<<<\n\nIn 'HttpRandomAccessFile.java', I see that this error is due to the 'content-length' in http header\n being parsed as 'Integer'. So, any file size exceeding the 32bit representation will have this problem.\n \n>>>> nj2.2.22\npublic HTTPRandomAccessFile(String url, int bufferSize) throws IOException {\n .....\n head = method.getResponseHeader("Content-Length");\n .......\n total_length = Integer.parseInt(head.getValue());\n } catch (NumberFormatException e) {\n throw new IOException("Server has malformed Content-Length header");\n }\n<<<<\n\nIs there any strong reason the 'Content-Length' cannot be parsed as 'Long' to accommodate file size > 2.1GB ?\nMy internal tests shows that changing the code to parse as 'long' surely solves the problem, but I am not sure\nif I am setting myself for some unforeseen disaster dealing with other aspects of netcdf-java API.\n\nWill appreciate your valuable input,\n}}}\n\nReported on THREDDS:\n\n{{{\nHello,\n\nI am trying to access the file (size > 2gb) served via THREDDS\nand encountering the following error for the uri shown below..\n\nuri='http://coast-enviro.er.usgs.gov/thredds/dodsC/fvcom/buzzbay/1998'\n\nimport ucar.nc2.dt.grid.GridDataset\n\nGridDataset gds = GridDataset.open(uri);\n\n>>>> error >>>\nJava exception occurred:\njava.io.FileNotFoundException: Cant open\nhttp://coast-enviro.er.usgs.gov/thredds/dodsC/fvcom/buzzbay/1998 or as\nDODS dods://coast-enviro.er.usgs.gov/thredds/dodsC/fvcom/buzzbay/1998\nError parsing server Error object!\nEncountered '-1' at line 2, column 12.\n\nWas expecting:\n\n <INT> ...\n\n at ucar.nc2.dataset.NetcdfDataset\n.openDODS(NetcdfDataset.java:402)\n\n<<<< end error\n\nThe error might be because of the file size greater than 2gb and exception\nis being thrown while parsing the 'Content-Length header'. When I access\nthe aggregated files directly using the following NCML I get the error..\n\nuri='http://www.gri.msstate.edu/rsearch_data/nopp/fvcom_buzz_agg_2gb.ncml';\n\n>> error>>>\njava.io.IOException: Server has malformed Content-Length header\n at ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.java:110)\n at ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.java:78)\n at ucar.nc2.NetcdfFile.getRaf(NetcdfFile.java:294)\n .....\n\n<<< end\n\nI had posted this question to netcdf-java mailing list (referenced below) also referencing the same\nproblem with netcdf-java API. I believe THREDDS API also uses the netcdf-java API to\nparse netcdf files. \n\n}}}\n\nResponse from THREDDS/netcdf-java: >>> 6/12/2008 \n\n{{{\n\nHi Bhate: sorry this has taken so long to get to.\n\nThere doesnt seem to be a problem with allowing Content-Length to be a long for HTTPRandomAccessFile. \nNote, however, that you cannot read more than 231 elements at a time. I am adding this fix to both 2.2 and 4.0. \n\nI am not sure whats happening when it is served through dods, however, and I will have to investigate that.\n\nThanks for the input!\n\n}}}\n\nPossible Solutions: >>>\n\n{{{\nSolution: \n\n public HTTPRandomAccessFile(String url, int bufferSize) throws IOException {\n...\n..\n try {\n\n //total_length = Integer.parseInt(head.getValue()); -sachin 05/07/08\n //Changing it to parseLong, as this results in exception for\n //large files. Although not sure it 'parseInt' is a typo here, or was\n // intentionally kept to restrict the file size.\n \n total_length = Long.parseLong(head.getValue());\n } catch (NumberFormatException e) {\n throw new IOException("Server has malformed Content-Length header");\n }\n....\n..\n\n\nLocal Fix: toolsUI-skb-0.4.jar\nFuture Release fix: Netcdf-Java 4.0 claims to fix this problem. \n\n}}}\n\n\n!!5. ''Time Index Issue''\n\n{{{\nPackage: ucar.nc2.dt.grid\nClass: GridCoordSys\nMethod: findTimeIndexfromDate(java.util.Date)\n\nReported on Netcdf-java: Not reported yet.\n\nProblem: \n\nuri='http://www.gri.msstate.edu/rsearch_data/nopp/avhrr_agg.ncml';\n>> [start,stop]=cf_time_index(uri,'sst','29-May-2008 08:30','29-May-2008 09:30');\n>> start\nstart =\n 445\n>> stop\nstop =\n 445\nbut\njdmat=cf_time(uri,'sst');\ndatestr(jdmat)\n>> ind=find(datenum('29-May-2008 08:30')<=jdmat&jdmat<=datenum('29-May-2008 09:30'))\n\nind =\n 444\n 445\n\nReason: \n\nThe netcdf-java method 'findTimeIndexFromDate' in ucar.nc2.dt.grid.GridCoordSys\n\nhttp://www.unidata.ucar.edu/software/netcdf-java/v2.2.22/javadocAll/ucar/nc2/dt/grid/GridCoordSys.html#findTimeIndexFromDate(java.util.Date)\n\ndoes not return the correct index of the GMT date string.\n\nSuppose, date array is\n\nd = ["'29-May-2008 07:00", '29-May-2008 08:30', '29-May-2008 09:30'];\n\nso, if you say 'findTimeIndexFromDate(''29-May-2008 08:00"), then it will return the index '1' instead of index '2'. It should return index '2' \nbecause it is the closest date available in the array.\nBut, it returns index '1' because the way logic is programmed in this method.\n\n}}}\n\nPossible Solution: >>>\n\n{{{\n \n public int findTimeIndexFromDate(java.util.Date d) {\n ...\n....\n // Sachin 06/10/08 -start\n long msecAhead = timeDates[index].getTime() - m;\n long msecBefore = m - timeDates[index-1].getTime();\n\n if (msecAhead > msecBefore) {\n return index - 1;\n } else {\n return index;\n }\n\n // -end\n\n\n\nLocal Fix: toolsUI-skb-0.5.jar\n\n}}}\n\n!!6. ''subsetting geogrid and missing vertical coordinates''\n\n{{{\n\nPackage: ucar.unidata.dt.grid\nClass: GridCoordSys\n\nProblem: As reported on netcdf-java support [[netcdf-java] subset GeoGrid problem] \nDate: 7/7/2008 [netcdf-java] \n\nHello,\n\nI am trying to query a subsetted GeoGrid for 'vertical axis', and\nit returns false when I know that the data has vertical axis.\nThe original grid does return 'true' for the presence of vertical axis,\nso it looks like the flag (hAxis/pAxis/zAxis) is not getting set after\nsubsetting the GeoGrid.\n\nJust wanted to report this as this method has been a loyal gatekeeper\nfor me when I am trying to get vertical coordinate data when there is none.\n\n>>>\nexample code:\n\nString uri='http://www.gri.msstate.edu/rsearch_data/nopp/bora_feb.nc';\nString var='temp';\n\nGridDataset gid = GridDataset.open(uri);\nGeoGrid Grid = gid.findGridByName(var);\nGridCoordSys gcs = (GridCoordSys) Grid.getCoordinateSystem();\n\nboolean vAxis = gcs.hasVerticalAxis(); // returns true.\n\n// subset geogrid\nGeoGrid subg = Grid.subset(null,null,null,1,1,1); GridCoordSys gcs2 = (GridCoordSys) subg.getCoordinateSystem();\n\nboolean vAxis2 = gcs2.hasVerticalAxis(); // returns false, should return true. \n\n}}}\n\nResponse from Netcdf-java: >>>\n\n{{{\n\nhi sachin:\n\nthanks for reporting, ill look into this.\nwhich version of the library are you using? \n\n}}}\n\nPossible Solution:>>>\n\n{{{\n\npublic GridCoordSys(GridCoordSys from, Range t_range, Range z_range, Range y_range, Range x_range) throws InvalidRangeException {\n...\n....\ncoordAxes.add(vertZaxis);\n // LOOK assign hAxis, pAxis or zAxis\n //-Sachin 10/09/08 Just adding this for testing : Unidata has to do a permenant fix.\n // Not sure the implications of this later somewhere else.\n //-start\n this.zAxis = vertZaxis;\n //-end\n }\n\n\nLocal Fix: toolsUI-skb-0.6.jar\nFuture Release fix: Netcdf-Java 4.0 claims to fix this problem. \n\n02/23/09: Problem still exist in stable release of nj4.0. \nReported back to netcdf-java on 02/23/09 subj: subset GeoGrid problem\n\n}}}\n\n!!7. ''Scaling issues''\n\n** ''NJ 2.22 not scaling aggregated int16 variables''\n\n{{{\n\nProblem: Reported on netcdf-java [ [netCDFJava #MUR-872515]: NJ 2.22 not scaling aggregated int16 ]\n\n> New Ticket: NJ 2.22 not scaling aggregated int16 variables\n>\n> John,\n>\n> We are having a problem with the scale_factor not being applied to\n> aggregated INT16 values in NJ 2.22.\n>\n> This is fixed in NJ 4.0, but with NJ 4.0 still in alpha, it would be\n> great to get the bug fixed in NJ 2.22 so that clients like the new\n> Environmental Data Connector (EDC) and our Matlab CF toolbox could\n> work with int16 aggregations.\n>\n> In particular, this is keeping us from including the NOAA Coastwatch\n> remote sensing data in our THREDDS catalog for the Gulf of Maine Model\n> Interoperability Experiment.\n>\n> To review the problem:\n>\n> A. This NcML works correctly, returning a scaled double array:\n>\n> <?xml version="1.0" encoding="UTF-8"?>\n> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">\n> <aggregation type="union">\n> <netcdf location="http://coast-enviro.er.usgs.gov/models/gom_interop/coastwatch_northeast_lonlat.nc"/>\n> <netcdf location="http://coastwatch.chesapeakebay.noaa.gov/dap/edac/avhrr/data/2008_150_0918_noaa16_ex1_sst.hdf"\n> />\n> </aggregation>\n> <variable name="sst">\n> <attribute name="coordinates" type="String" value="lon lat"/>\n> </variable>\n> <attribute name="Conventions" type="String" value="CF-1.0"/>\n> </netcdf>\n>\n>\n> B. This NcML does NOT work correctly, returning an unscaled INT16 array.\n>\n> <?xml version="1.0" encoding="UTF-8"?>\n> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">\n> <aggregation type="union">\n> <netcdf\n> location="http://coast-enviro.er.usgs.gov/models/gom_interop/coastwatch_northeast_lonlat.nc"/>\n> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">\n> <variable name="time" shape="time" type="long">\n> <attribute name="units" value="seconds since\n> 1970-01-01 00:00:00 UTC"/>\n> <attribute name="_CoordinateAxisType" value="Time"/>\n> <values>1210756889 1212052725</values>\n> </variable>\n> <aggregation dimName="time" type="joinNew">\n> <variableAgg name="sst"/>\n> <netcdf\n> location="http://coastwatch.chesapeakebay.noaa.gov/dap/edac/avhrr/data/2008_135_0921_noaa15_ex1_sst.hdf"/>\n> <netcdf\n> location="http://coastwatch.chesapeakebay.noaa.gov/dap/edac/avhrr/data/2008_150_0918_noaa16_ex1_sst.hdf"/>\n> </aggregation>\n> </netcdf>\n> </aggregation>\n> <variable name="sst">\n> <attribute name="coordinates" value="lon lat"/>\n> </variable>\n> <attribute name="Conventions" value="CF-1.0"/>\n> </netcdf>\n>\n>\n> If we had this fixed, we could just drop the new 2.2.XX into the EDC\n> and the Matlab CF toolbox.\n>\n> Thanks,\n> Rich\n-------------------------------------------------------------------\n\nResponse from Netcdf-java: >>>\n{{{\nim not sure if we can retrofit the bug fix, but ill see if its possible. -john caron\n\n\nFuture Release fix: Netcdf-Java 4.0 claims to fix this problem. \n\n}}}\n\n\n** ''Values are not scaled and missing values are not filled with NaNs'' \n\n{{{\n\nProblem similar as discussed above.\n\nIf I use cf_subsetGrid to access the attached NcML, the retrieved\nvalues are not scaled and missing values are not filled with NaNs.\nIf I instead use cf_subsetGrid to access one of the OpenDAP URLS in\nthe NcML directly, it works correctly.\n\nIs this a known bug?\n\nvar='analysed_sst';\n\n% access 1st time step from NcML Aggregation:\n\nuri='test.ncml';\ntic;[sst,g]=cf_subsetGrid(uri,var,[-127 -114 31 42.5],[2006 4 1 12 0 0]);toc\nsst(1,1)\n\nans =\n\n 1679 % incorrect unscaled value (int16)\n\n% access 1st time step via OpenDAP\n\nuri='http://dods.jpl.nasa.gov/opendap/sea_surface_temperature/GHRSST/data/L4/GLOB/UKMO/OSTIA/2006/091/20060401-UKMO-L4HRfnd-GLOB-v01-fv02-OSTIA.nc.bz2';\ntic;[sst,g]=cf_subsetGrid(uri,var,[-127 -114 31 42.5],[2006 4 1 12 0 0]);toc\n>> sst(1,1)\n\nans =\n\n 289.9400 % correct scaled version (single)\n\nI then tried to switch to toolsUI-4.0.jar instead of\ntoolsUI-2.2.22-skb0.6.jar to see if this might be fixed by 4.0, but I\ngot:\n\nJava exception occurred:\njava.lang.NoSuchMethodError:\nucar.nc2.dt.grid.GeoGrid.getVariable()Lucar/nc2/dataset/VariableEnhanced;\n\n at msstate.cstm.data.grid.JGeoGridDataset.readVarData(Unknown Source)\n\n\n}}}\n\nPossible Solutions:>>>\n{{{\nFuture Release fix: Netcdf-Java 4.0 claims to fix this problem. \n}}}\n\n\n!!8. ''Grib2 read error''\n\n{{{\n\nProblem: Reported on netcdf-java [ [netcdf-java] grib2 read error ]\n\nJohn,\n\nI am trying to read a section of aggregated grib2 data files.\nAll subsets are read fine except when start index for time range\nis '0'.\n\nI have tested this with nj2.22 as well as 4.0 (developmental version).\n\nA sample code is shown below.\n\n>>>> start\nString uri = ww3-multi.ncml;\nString var='Significant_height_of_combined_wind_waves_and_swell';\n\n GridDataset gid = GridDataset.open(uri);\n GeoGrid Grid = gid.findGridByName(var); \n Range trange = new Range(0,3,1); // start time index = 0 gives error, all other start time index have no problem\n Range yrange = new Range(1,20,1);\n Range xrange = new Range(1,40,2);\n\n GeoGrid subg = Grid.subset(trange,null,yrange,xrange);\n VariableEnhanced ve= subg.getVariable();\n Array d = ve.read();\n gid.close();\n\n<<<<<< end\n\nI get this error..\n\njava.lang.NullPointerException\n at ucar.grib.grib2.Grib2DataSection.jpeg2000Unpacking(Grib2DataSection.java:797)\n at ucar.grib.grib2.Grib2DataSection.<init>(Grib2DataSection.java:131)\n at ucar.grib.grib2.Grib2Data.getData(Grib2Data.java:129)\n at ucar.nc2.iosp.grib.Grib2ServiceProvider._readData(Grib2ServiceProvider.java:86)\n at ucar.nc2.iosp.grib.GribServiceProvider.readXY(GribServiceProvider.java:291)\n at ucar.nc2.iosp.grib.GribServiceProvider.readData(GribServiceProvider.java:253)\n at ucar.nc2.NetcdfFile.readData(NetcdfFile.java:1368)\n at ucar.nc2.Variable._read(Variable.java:926)\n at ucar.nc2.Variable.read(Variable.java:621)\n at ucar.nc2.ncml.Aggregation$Dataset.read(Aggregation.java:1250)\n at ucar.nc2.ncml.Aggregation.read(Aggregation.java:689)\n at ucar.nc2.dataset.VariableDS._read(VariableDS.java:277)\n at ucar.nc2.Variable.read(Variable.java:646)\n at SubsetGrid.main(SubsetGrid.java:55)\n\n\nFor test purposes the NcML and grib files (zipped) can be accessed via\n\nhttp://www.gri.msstate.edu/rsearch_data/nopp/ww3-multi.zip \n}}}\n\nResponse from Netcdf-java:>>>>\n{{{\nok, we see the problem, ill get back to you, thanks\n}}}\n\nSolutions:>>>\n{{{\nPossible fix in future release of 4.0.\n}}}\n\n\n\n!!7. ''Authentification''\n\n{{{\n>> uri='http://<username>:<passwd>@apdrc.soest.hawaii.edu:80/dods/nlom_only/NCOM/ncom_salinity';\n>> cf_info(uri)\nFeb 12, 2009 10:06:36 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme\n\nINFO: basic authentication scheme selected\n\nFeb 12, 2009 10:06:36 PM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge\n\nINFO: No credentials available for BASIC 'nlom_only'@apdrc.soest.hawaii.edu:80\n\nUnable to open the dataset: http://<username>:<passwd>@apdrc.soest.hawaii.edu:80/dods/nlom_only/NCOM/ncom_salinity\nhttp://<username>:<passwd>@apdrc.soest.hawaii.edu:80/dods/nlom_only/NCOM/ncom_salinity HTTP/1.1 401 Authorization Required\nAttempt to reference field of non-structure array.\nAttempt to reference field of non-structure array.\n\nans =\n\n []\n\n}}}
How to redirect output and errors to /dev/null?\n\nI have a few scripts which I’m never interested in the output from: They run in a cron job, and if they fail every once in a while, I’m not too interested in the output.\n\nWhen you run said scripts or programs from the command line, the standard remedy is to add >/dev/null to redirect output to the bitbucket instead.\n\nHowever, when I run these from a cron job, any output that the script would send to stderr is sent as a mail to the owner of the script, which can be a tad annoying if the script runs regularily, with output you don’t need or want, or can do anything about.\n\nThe graceful way to handle this in any shell is as follows: Redirect the output of stderr to stdout, and then redirect this combined output to /dev/null:\n\n{{{\n./example.pl > /dev/null 2>&1\n}}}\n\n\nWhat happens here is as follows:\n\n 1. We send standard output to /dev/null, using > /dev/null.\n 2. 2>&1 - ensures that you send the standard error (file descriptor 2), to wherever standard output (file descriptor 1) is going, which is, as already established, to the bitbucket.\n\n\nA bit more from somewhere else/\n\n By default, each Unix process has 3 file descriptors (FDs) assigned to it, 0, 1 and 2; these are known as stdin, stdout, and stderr respectively. They are normally connected to your terminal: stdin is the keyboard; stdout and stderr are your screen.\n\nEach of these represents a stream that can be redirected to other places, such as files or pipes. The output streams, stdout and stderr can be combined and sent to the same place, or directed to different locations.\n\nIf you redirect stdout (FD1) to a file, stderr (FD2) will still go to your screen.\n{{{\n$ ls -ld /home /qwerty\nls: /qwerty: No such file or directory\ndrwxr-xr-x 11 root root 4096 Jul 11 02:58 /home\n}}}\n \n\nIf we redirect stdout to the bit bucket, the stderr will still be sent to the screen:\n\n{{{\n\n$ ls -ld /home /qwerty 1>/dev/null\nls: /qwerty: No such file or directory\n\n}}}\n\n\n(NOTE: the 1 can be left off; >xxxx implies 1>xxxx.)\n\nSimilarly, if we redirect stderr to the bit bucket, the stdout will still be sent to the screen:\n\n{{{\n$ ls -ld /home /qwerty 2>/dev/null\ndrwxr-xr-x 11 root root 4096 Jul 11 02:58 /home\n}}}\n\n\nOr we can redirect both stderr and stdout to the bit bucket:\n{{{\n$ ls -ld /home /qwerty >/dev/null 2>/dev/null\n}}}\n \n\nThis works with /dev/null, which isn't a real file, but redirecting both stdout and stderr to the same file individually will not work, as both redirections truncate the file:\n{{{\n$ ls -ld /home /qwerty >/tmp/xxx 2>/tmp/xxx\n}}}\n\n\n(The full explanation is too technical for this tip, but it is akin to redirecting output to the same file as the input.)\n\nTo redirect both stdout and stderr to the same file, we redirect one stream to the file, then redirect the other to the first stream:\n{{{\n$ ls -ld /home /qwerty >/tmp/xxx 2>&1\n}}}\n \n\nThe order of the redirections is important. This will send stderr to the terminal and stdout to the file /tmp/xxx:\n{{{\n$ ls -ld /home /qwerty 2>&1 >/tmp/xxx\n}}}\n\n\nSending stderr to stdout attaches the stream to wherever stdout is pointing at the time of the redirection. It is as if stdout and stderr are variables; you are doing the equivalent of:\n\n{{{\n## the defaults\nstdout=screen\nstderr=screen\n\n## redirect stderr\nstderr=$stdout\n\n## redirect stdout\nstdout=/dev/null\n \n}}}\n\nNow, stdout=/dev/null, and stderr=screen.\n\nIf you change the order, the result is different:\n\n{{{\n## the defaults\nstdout=screen\nstderr=screen\n\n## redirect stdout\nstdout=/dev/null\n\n## redirect stderr\nstderr=$stdout\n\n}}}\n \n\nNow, stdout and stderr are both pointing to /dev/null.
| tiddlyspot password:|<<option pasUploadPassword>>|\n| site management:|<<upload http://skumar.tiddlyspot.com/store.cgi index.html . . skumar>>//(requires tiddlyspot password)//<<br>>[[control panel|http://skumar.tiddlyspot.com/controlpanel]], [[download (go offline)|http://skumar.tiddlyspot.com/download]]|\n| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[announcements|http://announce.tiddlyspot.com/]], [[blog|http://tiddlyspot.com/blog/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|
In order for cstmToolBox to use nj4.0, the API changes needs to be addressed in toolbox. \n\n# nj2.2 -> nj4.0 API changes\n http://www.unidata.ucar.edu/software/netcdf-java/jarDiff.html\n\n# problems to be addressed in toolbox.\n\n* API change ucar.nc2.dataset.VariableEnhanced\n\nvar='analysed_sst';\n\n% access 1st time step from NcML Aggregation:\n\nuri='test.ncml';\ntic;[sst,g]=cf_subsetGrid(uri,var,[-127 -114 31 42.5],[2006 4 1 12 0 0]);toc\n sst(1,1)\n\nans =\n\n 1679 % incorrect unscaled value (int16)\n\n\n{{{\nI then tried to switch to toolsUI-4.0.jar instead of\ntoolsUI-2.2.22-skb0.6.jar to see if this might be fixed by 4.0, but I\ngot:\n\nJava exception occurred:\njava.lang.NoSuchMethodError:\nucar.nc2.dt.grid.GeoGrid.getVariable()Lucar/nc2/dataset/VariableEnhanced;\n\n at msstate.cstm.data.grid.JGeoGridDataset.readVarData(Unknown Source) \n}}}\n\nNote: This problem seems to be fixed in 4.0. Solution: Address the API change\nin toolbox. \n