{{{\n weighted.mean(x, w, na.rm = FALSE)\n}}}\n* x: 用于求均值的数字向量.\n* w: 数字向量x的权重\n* 举例:\n{{{\n## GPA from Siegel 1994\nwt <- c(5, 5, 4, 1)/15\nx <- c(3.7,3.3,3.5,2.8)\nxm <- weighted.mean(x,wt)\n}}}\n* 要点:权重的含义与公式
其实只是一个指向/proc/self/fd/1的软链接\n不过这个需要特殊处理,直接链接过去,启动时还是会丢失。
!Gmail的新功能\nGmail现在可以直接将一些常见的富文件文件如doc, odt, pdf等直接dump成html来看。当然这一过程仍是以文字为主,至于图片、格式之类只怕不在考虑范围之内了。
写写我要做的几件事:\n# 把zeolite那篇论文搞定\n# 朱老师的物化实验处理程序\n# transistac相关计算及报告\n# 文献管理firefox插件的编写\n# 车票要寄给人家\n\n* 警告!不能再玩了!!
老裴让我问问兰州有没有一种叫乙脘嘧啶片的药。后来在网上一查才知这个药的刚后还有不少故事。乙脘嘧啶当年是用来治疟疾的,国内早已停产了。世界范围内也少见。这链接留下,备考。\n{{{\nhttp://www.cctv.com/news/society/20060320/100467.shtml\n}}}
* 创建压缩文件\n{{{\n7z a dir\n}}}\n 这样会直接压缩目录,生成dir.7z。注意dir后无目录'/'\n\n* 分卷压缩\n{{{\n7z a -v3m file_template dir\n}}}\n 这样压缩目录dir,并生成3m的分卷。注意其中的file_template不加7z扩展名。
This notebook attempts to capture the essence of a [["kinkless" GTD system|http://www.kinkless.com]] using TiddlyWiki. It is using the <<gtdVersion>> version of the GTD plugins, by Tom Otvos, and is based on version <<version>> of the [[TiddlyWiki|http://www.tiddlywiki.com]] stand-alone wiki project, by Jeremy Ruston. For customization info, see [[GTD TiddlyWiki|http://groups.google.com/group/GTD-TiddlyWiki]] and [[TiddlyWikiDev|http://www.tiddlywiki.com/dev/]].
!Welcome to version 1.0.10 of d-cubed.\nThis is a hasty bug-fix release to the previous 1.0.9 version, with the following fixes:\n* fixed [[Action Review]] to once again show project-less actions\n* fixed GTDStyleSheet to have a smaller menu width for non-fancy styles (see below).\nBecause this release is hot on the heels of the 1.0.9 release, here are the notes for that (in case you are just arriving to the party).\n\n!Welcome to version 1.0.9 of d-cubed.\nIn this release, there are the following changes:\n* changed all action lists to allow direct access to associated projects and contexts\n* added optional "floating" parameter to {{{<<gtdAction>>}}} to support creating actions that don't have to be strictly "next" to show up in action lists, as in:\n{{{\n<<gtdAction actionTitle @context floating>>\n}}}\n* added support for single-click updates of the ~TiddlyWiki core in [[Check for Updates|UpdateApplication]]\n* fixed a bug that caused odd tiddler behaviour when editing a "reference" tiddler and the main Reference tiddler was open\n* changed the default style rules to the popular GTDTW+ style, using the new GTDTWStyleSheet; to use this style, please note that:\n** this stylesheet is loaded automatically (you do not need to edit the StyleSheet tiddler)\n** if you are updating your d-cubed installation and have a custom PageTemplate, you will need to edit your PageTemplate to have a gradient of #000 to #464646 for the full effect\n** if you want to revert to the plain d-cubed style, or have your own style variations, simply disable the "fancy" style from the [[Configuration Options]]\n\n!Please do the survey\nIf you have not already done so (and you are an active user of d-cubed), please take a moment to fill in a short [[user survey|http://www.surveymonkey.com/s.asp?u=626142022640]]. It will help me to craft future releases of d-cubed knowing what you think about it.\n\n//This tiddler will only open automatically the first time you run d-cubed after an update. After that, you can freely delete it, or save it for future reference.//
!Welcome to your ''tiddlyspot.com'' ~TiddlyWiki!\n''[[tiddlyspot.com|http://tiddlyspot.com]]'' gives you an instant [[TiddlyWiki|http://tiddlywiki.com]] hosted on our ''tiddlyspot.com'' servers.\n\nWant to work online? No problem, you can go to your ''tiddlyspot.com'' URL (which is http://tiddlyspot.com/ybyygu/ ) and start editing. Click "save to web" and your changes are saved directly to your ''tiddlyspot.com'' home -- no messing about with local files or ftp.\n\nWant to work offline? No problem, your ''tiddlyspot.com'' ~TiddlyWiki is a real, fully functioning ~TiddlyWiki that you can save onto your hard drive or USB stick. Use the link below to save to your local computer. As you make changes, use the "save to disk" button to save to your local file. Whenever you're ready to sync up again, just click "save to web".\n\n!To save online\nEnter the upload password provided when you created your ~TiddlyWiki. Then click the "save to web" button below (or in the right side column) to save your ~TiddlyWiki.\nUpload Password: <<option pasUploadPassword>>\n<<upload http://tiddlyspot.com/ybyygu/store.cgi index.html . . ybyygu>>\n\n!To save offline\nTo take this ~TiddlyWiki offline, click [[Download|http://tiddlyspot.com/?action=download&site=ybyygu]]. Save the file locally then open it in your browser.\n\n\n!Learn more about ~TiddlyWiki\nFind out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki Guides|http://tiddlywikiguides.org]] for documentation on learning and using ~TiddlyWiki.\n\nThe [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]] is an excellent place to ask questions and get help.\n\n!Enjoy!\nWe hope you like using your ''tiddlyspot.com'' ~TiddlyWiki. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments.\n\n----
To make this system operate more efficiently, you should periodically archive completed projects and actions. When a project or action is archived, it is merely tagged in a special way to get it "out of sight", but all the information in the project and action tiddlers is preserved. This is important if you need to go back and find something. Click one of these buttons to view the current <<tag project-archive>> or <<tag action-archive>>.\n\n** Click <<gtdArchive archive>> if you would like to archive all completed projects and actions now.\n** Click <<gtdArchive unarchive>> if you would like to unarchive all previously archived projects and actions now.\n\nIf you are sure that you do not want to retain archived projects and actions, you can purge them completely from the system. //Once these archived items are removed, the only way they can be put back in is through manual importing or copy/paste.// ''For your safety, your file will be saved and a backup file will be automatically generated before an archive purge is performed.''\n\n** Click <<gtdArchive purge>> if you would like to purge your archive now.
*new 与delete\n{{{\nint *aa =new int[4];\ndelete [] aa;\n\nint *bb = new int (25); //给初值\ndelete bb;\n}}}\n* 内联函数(inline)有点cache的味道
config.options.chkHttpReadOnly = true;\n
These configuration options enable you to customize the default behaviour of this wiki. They are saved locally as cookies, just like other TiddlyWiki configuration options.\n\nThis is the tag used for the "reference" context, used to identify tiddlers that show up in the [[Reference]] list: \n<<option txtGTDReferenceContext>>\n\nThis is the tag used for the "someday-maybe" context, used to identify tiddlers that show up in the [[Someday-Maybe]] list:\n<<option txtGTDSomedayContext>>\n\nThis is the tag used for the "unfiled" context, used to tag actions when the context is not known (such as a deleted context):\n<<option txtGTDUnfiledContext>>\n\nThis value, if specified, is the number of days to keep completed actions in context and review action lists (leave blank to show all unarchived, completed actions):\n<<option txtGTDActionAging>>\n\n<<option chkGTDFancyStyle>> Use this checkbox to enable or disable the extended (fancy) GTD style specified by the GTDTWStyleSheet (you will need to reload the page to see your change)
关于\n关于蚊子\n关于沉默的蚊子\n释名
+++(gtdProjectsSliderState)[Projects]<<list tagged project>>===\n+++(gtdActionsSliderState)[Actions]<<list tagged context>>===\n+++(gtdReviewSliderState)[Review]\n*[[Project Review]]\n*[[Action Review]]\n*[[Reminders]]\n===\n\n[[Reference]] [[Someday-Maybe]]\n[[Configuration|Configuration Options]] [[Check for Updates|UpdateApplication]] [[Archives]]
/***\n''Name:'' GTDPlugins\n''Author:'' Tom Otvos\n''Version:'' <<gtdVersion>>\n\n''Macros:''\n*{{{<<gtdAction "}}}//title//{{{" "}}}//context list//{{{">>}}}\n*{{{<<gtdActionList {"}}}//context list//{{{" | "*" | "@" {"all"} }>>}}}\n** //if no parameters are specified, current context or project is used//\n** //specify "*" for actions across all projects, "@" for incomplete actions across all contexts (or "all" for all actions)//\n*{{{<<list tagged "}}}//tag list//{{{" {any | all}>>}}}\n** //if no parameters are specified, all tags are necessary//\n*{{{<<importUpdates "}}}//url//{{{" {updates | all} "}}}//buttonTitle//{{{" "}}}//buttonHelp//{{{" "}}}//importTiddlers params...//{{{">>}}}\n*{{{<<gtdArchive { archive | unarchive | purge }>>}}}\n\n''Commands:''\n*{{{newAction}}}\n*{{{newProjectAction}}}\n*{{{changeContext}}}\n*{{{deleteAction}}}\n*{{{deleteContext}}}\n*{{{deleteProject}}}\n*{{{deleteProjectAll}}}\n*{{{projectify}}}\n\n''Wiki formatting:''\n*{{{..new action title|context}}}\n\n***/\n//{{{\n\nversion.extensions.GTDPlugins = {major: 1, minor: 0, revision: 10, date: new Date(2006,4,26,0,0,0,0), source: "http://www.dcubed.ca/"};\n\nvar _GTD = {\n\n initialize: function ()\n {\n if (config.options.txtGTDReferenceContext == undefined) config.options.txtGTDReferenceContext = "reference";\n if (config.options.txtGTDSomedayContext == undefined) config.options.txtGTDSomedayContext = "someday";\n if (config.options.txtGTDUnfiledContext == undefined) config.options.txtGTDUnfiledContext = "unfiled";\n if (config.options.txtGTDActionAging == undefined) config.options.txtGTDActionAging = "";\n if (config.options.chkGTDFancyStyle == undefined) config.options.chkGTDFancyStyle = true;\n \n // some tricks to work when our script is loaded from an external file...\n if (!store) config.notifyTiddlers.push( {name: "GTDStyleSheet", notify: refreshStyles} );\n if (!store && config.options.chkGTDFancyStyle) config.notifyTiddlers.push( {name: "GTDTWStyleSheet", notify: refreshStyles} );\n if (!store) config.notifyTiddlers.push( {name: null, notify: _GTD.refreshActionViews} );\n if (!store) return;\n\n var tiddlers = [];\n tiddlers = tiddlers.concat(store.getTaggedTiddlers("project"), store.getTaggedTiddlers("context"), store.getTaggedTiddlers("action"));\n for (var i = 0; i < tiddlers.length; i++)\n tiddlers[i].changed();\n store.addNotification("GTDStyleSheet", refreshStyles);\n if (config.options.chkGTDFancyStyle) store.addNotification("GTDTWStyleSheet", refreshStyles);\n store.addNotification(null, _GTD.refreshActionViews);\n \n // force a display of release notes, if required\n var v = version.extensions.GTDPlugins;\n var releaseNotesTiddler = "About version " + v.major + '.' + v.minor + '.' + v.revision;\n if ((config.options.chkGTDReleaseNotes || config.options.chkGTDReleaseNotes == undefined) && store.tiddlerExists(releaseNotesTiddler)) {\n params = "open:\s"" + releaseNotesTiddler + "\s"";\n params = params.parseParams("open",null,false);\n config.options.chkGTDReleaseNotes = false;\n saveOptionCookie("chkGTDReleaseNotes");\n }\n },\n\n tiddlerHasTag: function (tiddler, tag)\n {\n if (typeof(tiddler) == "string") tiddler = store.getTiddler(tiddler);\n if (tiddler.tags.length == 0) return false;\n return (tiddler.tags.find(tag) != null);\n },\n \n tiddlerSwapTag: function (tiddler, oldTag, newTag)\n {\n for (var i = 0; i < tiddler.tags.length; i++)\n if (tiddler.tags[i] == oldTag) {\n tiddler.tags[i] = newTag;\n return true;\n }\n return false;\n },\n \n tiddlerHasChanged: function (tiddler, doSave)\n {\n tiddler.changed();\n //story.setDirty(tiddler.title, true);\n store.setDirty(true);\n if (doSave == undefined) doSave = true;\n if (config.options.chkAutoSave && doSave)\n saveChanges();\n },\n \n tiddlerAgeInDays: function(tiddler)\n {\n var now = new Date();\n return (now.getTime() - tiddler.modified.getTime()) / 1000 / 86400;\n },\n \n filteredActionTags: function (tags, filterTitle)\n {\n var actionTags = [];\n for (var i = 0; i < tags.length; i++)\n if (tags[i] != "action" && tags[i] != "done" && tags[i] != "floating" && tags[i] != filterTitle) actionTags.push(tags[i]);\n return actionTags;\n },\n \n toggleTag: function (tiddler, tag, toggle)\n {\n var tagIndex = -1;\n for (var i = 0; i < tiddler.tags.length; i++)\n if (tiddler.tags[i] == tag) {\n tagIndex = i;\n break;\n }\n \n if (toggle && tagIndex == -1) {\n tiddler.tags.push(tag);\n }\n else if (!toggle && tagIndex != -1) {\n tiddler.tags.splice(tagIndex, 1);\n }\n },\n \n refreshActionViews: function (tiddler)\n {\n if (tiddler) {\n if (typeof(tiddler) == "string") tiddler = store.getTiddler(tiddler);\n if (tiddler) {\n // do not do anything if we are not an action!\n if (!_GTD.tiddlerHasTag(tiddler, "action")) return;\n story.refreshTiddler(tiddler.title, null, true);\n for (var i = 0; i < tiddler.tags.length; i++)\n if (tiddler.tags[i] != "action" && tiddler.tags[i] != "done") {\n story.refreshTiddler(tiddler.tags[i], null, true);\n }\n }\n }\n \n var specialTiddlers = store.getTaggedTiddlers("review");\n for (var i = 0; i < specialTiddlers.length; i++)\n story.refreshTiddler(specialTiddlers[i].title, null, true);\n },\n \n appendProjectAction: function(projectTiddler, actionTitle, actionContext)\n {\n var actionInsertionPoint = -1, actionLeadin = "";\n \n var reActionWikitext = "^\s\s.{2}([^|\sn]+)(?:\s\s|?)(.*).*$";\n var reActionMacro = "(.*)<<gtdAction ((?:[^>]|(?:>(?!>)))*)>>.*$";\n var actionRe = new RegExp("(" + reActionWikitext + ")|(" + reActionMacro + ")", "mg");\n do {\n var formatMatch = actionRe.exec(projectTiddler.text);\n if (formatMatch) {\n actionLeadin = (formatMatch[1] ? "" : formatMatch[5]);\n actionInsertionPoint = actionRe.lastIndex;\n }\n } while(formatMatch);\n \n var actionProto = "\sn" + actionLeadin + "<<gtdAction \s"" + actionTitle + "\s" \s"" + actionContext + "\s">>";\n if (actionInsertionPoint == -1)\n projectTiddler.text += actionProto;\n else\n projectTiddler.text = projectTiddler.text.substring(0, actionInsertionPoint) + actionProto + projectTiddler.text.substr(actionInsertionPoint + 1);\n \n this.tiddlerHasChanged(projectTiddler);\n this.refreshActionViews(projectTiddler);\n },\n \n removeProjectAction: function(projectTiddler, actionTitle)\n {\n //var reActionWikitext = "^(\s\s.{2})(" + actionTitle + ")((\s\s|.*\sn)|(\sn))";\n var reActionWikitext = "^(\s\s.{2})(" + actionTitle + ")((\s\s|.*\sn?)|(.*\sn?))";\n var reActionMacro = "(.*<<gtdAction [\s"\s']?)(" + actionTitle + ")([\s"\s']?\s\ss+(?:[^>]|(?:>(?!>)))*>>.*\sn?)";\n projectTiddler.text = projectTiddler.text.replace(new RegExp(reActionWikitext, "mg"), "");\n projectTiddler.text = projectTiddler.text.replace(new RegExp(reActionMacro, "mg"), "");\n projectTiddler.changed();\n story.refreshTiddler(projectTiddler.title, null, true);\n },\n \n saveWithForcedBackup: function()\n {\n var saveBackups = config.options.chkSaveBackups;\n config.options.chkSaveBackups = true;\n saveChanges();\n config.options.chkSaveBackups = saveBackups;\n },\n \n isNextAction: function(actionTiddler)\n {\n if (actionTiddler.gtdProject && actionTiddler == actionTiddler.gtdProject.gtdNextAction)\n return true;\n return this.tiddlerHasTag(actionTiddler, "floating");\n }\n};\n\nconfig.macros.gtdVersion = {}\nconfig.macros.gtdVersion.handler = function(place)\n{\n var v = version.extensions.GTDPlugins;\n createTiddlyElement(place, "span", null, null, v.major + "." + v.minor + "." + v.revision + (v.beta ? " (beta " + v.beta + ")" : ""));\n}\n\nconfig.macros.list.tagged = {}\nconfig.macros.list.tagged.innerHandler = function(tagList, allTags)\n{\n var tiddlers = store.getTaggedTiddlers(tagList[0]);\n\n if (allTags) {\n var results = [];\n for (var i = 0; i < tiddlers.length; i++) {\n var tiddler = tiddlers[i], hasAllTags = true;\n for (var j = 1; hasAllTags && j < tagList.length; j++)\n hasAllTags &= _GTD.tiddlerHasTag(tiddler, tagList[j]);\n if (hasAllTags) results.push(tiddlers[i]);\n }\n return results;\n }\n else {\n for (var i = 1; i < tagList.length; i++) {\n var more = store.getTaggedTiddlers(tagList[i]);\n for (var j = 0; j < more.length; j++)\n tiddlers.pushUnique(more[j]);\n }\n return tiddlers;\n }\n}\nconfig.macros.list.tagged.handler = function(params) \n{\n var tags = params[1].readBracketedList();\n if (tags.length == 1) {\n if (config.options[tags[0]] == undefined)\n return store.getTaggedTiddlers(tags[0]);\n else\n return store.getTaggedTiddlers(config.options[tags[0]]);\n }\n else if (tags.length > 1) {\n var allTags = (params[2] == undefined || params[2] == 'all');\n var tiddlers = this.innerHandler(tags, allTags);\n tiddlers.sort(function (a,b) {if(a.title == b.title) return(0); else return (a.title < b.title) ? -1 : +1; });\n return tiddlers;\n }\n}\n\nconfig.macros.gtdAction = {}\nconfig.macros.gtdAction.createActionElement = function(place, actionTiddler, parentTiddler, tags)\n{\n if (typeof(actionTiddler) == "string") actionTiddler = store.getTiddler(actionTiddler);\n \n var actionElement = createTiddlyElement(place, "span", null, "gtdActionItem");\n // oddly, we barf when setting the checkbox type on an input if we use createTiddlyElement...\n var cb = document.createElement("input");\n cb.setAttribute("type", "checkbox");\n cb.setAttribute("actionTiddler", actionTiddler.title);\n cb.setAttribute("contextTiddler", parentTiddler);\n cb.onclick = this.onClickDone;\n actionElement.appendChild(cb);\n cb.checked = actionTiddler.gtdActionDone;\n createTiddlyLink(actionElement, actionTiddler.title, true);\n if (actionTiddler.gtdActionDone) actionElement.className = "gtdCompletedActionItem";\n if (_GTD.isNextAction(actionTiddler)) actionElement.className = "gtdNextActionItem";\n \n var actionTags = _GTD.filteredActionTags(tags, parentTiddler);\n //if (actionTags.length > 0) createTiddlyText(actionElement, " (" + actionTags.join(",") + ")");\n if (actionTags.length > 0) {\n createTiddlyText(actionElement, " [");\n for (var i = 0; i < actionTags.length; i++) {\n if (i > 0) createTiddlyText(actionElement, ", ");\n createTiddlyLink(actionElement, actionTags[i], true, "actionCrossReference");\n }\n createTiddlyText(actionElement, "]");\n }\n \n /*\n if (actionTiddler.gtdProject && actionTiddler.gtdProjectName != parentTiddler) {\n createTiddlyText(actionElement, " [");\n createTiddlyLink(actionElement, actionTiddler.gtdProjectName, true);\n createTiddlyText(actionElement, "]");\n }\n else {\n var actionTags = _GTD.filteredActionTags(tags, parentTiddler);\n if (actionTags.length > 0) createTiddlyText(actionElement, " (" + actionTags.join(",") + ")");\n }\n */\n \n return actionElement;\n}\n\nconfig.macros.gtdAction.onClickDone = function(e)\n{\n var tiddler = store.getTiddler(this.getAttribute("actionTiddler"));\n if (tiddler) {\n _GTD.toggleTag(tiddler, "done", this.checked);\n tiddler.gtdActionDone = this.checked;\n _GTD.tiddlerHasChanged(tiddler);\n _GTD.refreshActionViews(tiddler);\n }\n return true;\n}\n\nconfig.macros.gtdAction.handler = function(place,macroName,params)\n{\n var title = params[0], tags;\n var parentTiddler = story.findContainingTiddler(place).getAttribute("tiddler");\n var tiddler = store.getTiddler(title);\n if (!tiddler) {\n // we should *never* get here now for project actions, but keep code in case project code\n // trips up, or we use this macro somewhere else\n this.createAction(title, parentTiddler, params[1]);\n }\n else\n // use actual tiddler tags, not macro param, in case context changed!\n tags = tiddler.tags;\n var action = this.createActionElement(place, title, parentTiddler, tags);\n}\n\nconfig.macros.gtdAction.setNextAction = function(project)\n{\n project.gtdNextAction = null;\n for (var i = 0; i < project.gtdActions.length; i++)\n if (!project.gtdActions[i].gtdActionDone) {\n project.gtdNextAction = project.gtdActions[i];\n return;\n }\n}\n\nconfig.macros.gtdAction.createAction = function(title, parentTiddler, tagParams, extraTags)\n{\n var tags = ["action", parentTiddler];\n if (typeof(tagParams) == "string") tags = tags.concat(tagParams.readBracketedList());\n if (typeof(extraTags) == "string") tags = tags.concat(extraTags.readBracketedList());\n var templateText = store.getTiddlerText("NewActionTemplate", config.views.wikified.defaultText.format([title]));\n return store.saveTiddler(title, title, templateText, config.options.txtUserName, new Date(), tags);\n}\n\nconfig.macros.gtdActionCompleted = {}\nconfig.macros.gtdActionCompleted.handler = function(place,macroName,params)\n{\n var title = story.findContainingTiddler(place).getAttribute("tiddler");\n var tiddler = store.getTiddler(title);\n // oddly, we barf when setting the checkbox type on an input if we use createTiddlyElement...\n var cb = document.createElement("input");\n cb.setAttribute("type", "checkbox");\n cb.setAttribute("actionTiddler", title);\n cb.onclick = this.onClickDone;\n place.appendChild(cb);\n cb.checked = tiddler.gtdActionDone;\n}\n\nconfig.macros.gtdActionCompleted.onClickDone = function(e)\n{\n var tiddler = store.getTiddler(this.getAttribute("actionTiddler"));\n if (tiddler) {\n _GTD.toggleTag(tiddler, "done", this.checked);\n tiddler.gtdActionDone = this.checked;\n _GTD.tiddlerHasChanged(tiddler);\n _GTD.refreshActionViews(tiddler);\n }\n return true;\n}\n\nconfig.macros.gtdAction.inheritedChanged = Tiddler.prototype.changed;\nTiddler.prototype.changed = function()\n{\n config.macros.gtdAction.inheritedChanged();\n \n // Note that this is called both as part of normal tiddler changes AND as a part\n // of the initial TW loading process from DIVs...\n \n if (_GTD.tiddlerHasTag(this, "project")) {\n // (re)build the in-memory ordered action list\n this.gtdActions = [];\n this.gtdNextAction = null;\n if (this.text) {\n var reActionWikitext = "^\s\s.{2}([^|\sn]+)(?:\s\s|?)(.*)";\n var reActionMacro = "<<gtdAction ((?:[^>]|(?:>(?!>)))*)>>";\n var actionRe = new RegExp("(" + reActionWikitext + ")|(" + reActionMacro + ")", "mg");\n do {\n var formatMatch = actionRe.exec(this.text);\n if (formatMatch) {\n var macroParams = (formatMatch[1] ? null : formatMatch[5].readMacroParams());\n var actionTiddlerName = (formatMatch[1] ? formatMatch[2] : macroParams[0]);\n var actionTiddler = store.getTiddler(actionTiddlerName);\n if (!actionTiddler) {\n var actionTags = (formatMatch[1] ? formatMatch[3] : macroParams[1]);\n var extraTags = (formatMatch[1] ? '' : macroParams[2]);\n actionTiddler = config.macros.gtdAction.createAction(actionTiddlerName, this.title, actionTags, extraTags);\n }\n if (actionTiddler) {\n actionTiddler.gtdProject = this;\n if (this.gtdNextAction == null && !_GTD.tiddlerHasTag(actionTiddler, "done"))\n this.gtdNextAction = actionTiddler;\n this.gtdActions.push(actionTiddler);\n // handle project renaming in action\n if (actionTiddler.gtdProjectName && actionTiddler.gtdProjectName != this.title) {\n _GTD.tiddlerSwapTag(actionTiddler, actionTiddler.gtdProjectName, this.title);\n // action view won't get updated through any other refresh mechanism, so\n story.refreshTiddler(actionTiddler.title, null, true);\n }\n actionTiddler.gtdProjectName = this.title;\n }\n }\n } while(formatMatch);\n }\n }\n \n else if (_GTD.tiddlerHasTag(this, "context")) {\n if (this.gtdContextName == undefined)\n this.gtdContextName = this.title;\n else if (this.gtdContextName != this.title) {\n // propagate renamed context to affected actions\n var results = config.macros.list.tagged.innerHandler([ this.gtdContextName, "action"], true);\n for (var t = 0; t < results.length; t++) {\n _GTD.tiddlerSwapTag(results[t], this.gtdContextName, this.title);\n // action view won't get updated through any other refresh mechanism, so\n story.refreshTiddler(results[t].title, null, true);\n }\n this.gtdContextName = this.title;\n }\n }\n \n else if (_GTD.tiddlerHasTag(this, "action")) {\n if (this.gtdActionName == undefined)\n this.gtdActionName = this.title;\n else if (this.gtdActionName != this.title && this.gtdProject) {\n // ugh...dig into related project and update the wiki code to use new action name\n var reActionWikitext = "^(\s\s.{2})(" + this.gtdActionName + ")((\s\s|.*\sn)|(\sn))";\n var reActionMacro = "(<<gtdAction [\s"\s']?)(" + this.gtdActionName + ")([\s"\s']?\s\ss+(?:[^>]|(?:>(?!>)))*>>)";\n this.gtdProject.text = this.gtdProject.text.replace(new RegExp(reActionWikitext, "mg"), "$1" + this.title + "$3");\n this.gtdProject.text = this.gtdProject.text.replace(new RegExp(reActionMacro, "mg"), "$1" + this.title + "$3");\n this.gtdActionName = this.title;\n }\n this.gtdActionDone = _GTD.tiddlerHasTag(this, "done");\n // reset the next action on the associated project\n if (this.gtdProject) config.macros.gtdAction.setNextAction(this.gtdProject);\n }\n}\n\nconfig.formatters.push(\n {\n name: "gtdAction",\n match: "^\s\s.\s\s..*",\n lookahead: "^\s\s.\s\s.([^|]*)(?:\s\s|?)(.*)",\n handler: function(w)\n {\n var lookaheadRegExp = new RegExp(this.lookahead,"g");\n var lookaheadMatch = lookaheadRegExp.exec(w.matchText)\n if (lookaheadMatch) {\n var params = [ lookaheadMatch[1] ];\n if (lookaheadMatch[2].length > 0) params.push(lookaheadMatch[2]);\n config.macros.gtdAction.handler(w.output, "gtdAction", params);\n }\n }\n }\n);\n\nconfig.commands.newAction = { text: "action", tooltip: "Create a new action for this context", hideReadOnly: true };\nconfig.commands.newAction.handler = function(event, src, context)\n{\n var d = new Date();\n var newActionTitle = d.formatString("New Action hh:0mm:0ss");\n if (!store.tiddlerExists(newActionTitle)) {\n var tiddler = store.createTiddler(newActionTitle);\n var templateText = store.getTiddlerText("NewActionTemplate", config.views.wikified.defaultText.format([newActionTitle]));\n tiddler.assign(newActionTitle, templateText, config.options.txtUserName, new Date(), [ "action", context ]);\n \n story.displayTiddler(null, newActionTitle, DEFAULT_EDIT_TEMPLATE);\n story.focusTiddler(newActionTitle, "title");\n }\n return false;\n}\n\nconfig.commands.newProjectAction = { text: "action", tooltip: "Create a new action for this project", hideReadOnly: true };\nconfig.commands.newProjectAction.handler = function(event, src, project)\n{\n var d = new Date();\n var newActionTitle = d.formatString("New Action hh:0mm:0ss");\n if (!store.tiddlerExists(newActionTitle)) {\n var defaultContext = config.options.txtGTDUnfiledContext;\n _GTD.appendProjectAction(store.getTiddler(project), newActionTitle, defaultContext);\n \n var tiddler = store.createTiddler(newActionTitle);\n var templateText = store.getTiddlerText("NewActionTemplate", config.views.wikified.defaultText.format([newActionTitle]));\n tiddler.assign(newActionTitle, templateText, config.options.txtUserName, new Date(), [ "action", project, defaultContext ]);\n \n story.displayTiddler(null, newActionTitle, DEFAULT_EDIT_TEMPLATE);\n story.focusTiddler(newActionTitle, "title");\n }\n return false;\n}\n\nconfig.macros.gtdActionList = {}\nconfig.macros.gtdActionList.handler = function(place,macroName,params)\n{\n var theList = createTiddlyElement(place, "ul", null, "gtdActionList");\n var parentTiddler = story.findContainingTiddler(place).getAttribute("tiddler");\n var allActions = (params[1] == "all");\n var aging = parseInt(config.options.txtGTDActionAging, 10);\n aging = isNaN(aging) ? 0 : aging.clamp(0, Number.MAX_VALUE);\n \n if (params[0] == "*") { // actions for all projects\n var projects = store.getTaggedTiddlers("project");\n for (var i = 0; i < projects.length; i++) {\n var project = projects[i];\n if (!allActions) {\n var skipEmptyProject = true;\n if (project.gtdActions != undefined && project.gtdActions.length > 0)\n for (var k = 0; skipEmptyProject && k < project.gtdActions.length; k++)\n skipEmptyProject = project.gtdActions[k].gtdActionDone;\n if (skipEmptyProject) continue;\n }\n var theListItem = createTiddlyElement(theList, "li", null, "gtdActionListProject");\n createTiddlyLink(theListItem, project.title, true);\n if (project.gtdActions != undefined && project.gtdActions.length > 0) {\n var subList = createTiddlyElement(theList, "ul", null, "gtdActionList");\n for (var j = 0; j < project.gtdActions.length; j++) {\n var action = project.gtdActions[j];\n if (!allActions && aging > 0 && action.gtdActionDone && _GTD.tiddlerAgeInDays(action) > aging) continue;\n var subListItem = createTiddlyElement(subList, "li");\n var el = config.macros.gtdAction.createActionElement(subListItem, action, project.title, action.tags);\n }\n }\n }\n }\n else if (params[0] == "@") { // actions for all contexts\n var contexts = store.getTaggedTiddlers("context");\n for (var i = 0; i < contexts.length; i++) {\n var context = contexts[i];\n var actions = config.macros.list.tagged.innerHandler([context.title, "action"], true);\n if (actions.length > 0) {\n var firstAction = true, theListItem, subList;\n for (var j = 0; j < actions.length; j++) {\n var currentAction = actions[j];\n // if we are not displaying all actions, filter completed actions and non-next project actions\n if (!allActions && (currentAction.gtdActionDone || (currentAction.gtdProject && !_GTD.isNextAction(currentAction)))) continue;\n if (firstAction) {\n theListItem = createTiddlyElement(theList, "li", null, "gtdActionListContext");\n createTiddlyLink(theListItem, context.title, true);\n subList = createTiddlyElement(theList, "ul", null, "gtdActionList");\n firstAction = false;\n }\n var subListItem = createTiddlyElement(subList, "li");\n var el = config.macros.gtdAction.createActionElement(subListItem, currentAction, context.title, currentAction.tags);\n }\n }\n }\n }\n else { // actions tagged by current tiddler name\n // chain to our "tagged" list macro to get the tiddlers first\n var tags = (params.length == 0 ? [ parentTiddler ] : params[0].readBracketedList());\n tags.push("action");\n var results = config.macros.list.tagged.innerHandler(tags, true);\n // ??? do we want this list sorted by action name alone ???\n results.sort(function (a,b) {if(a.title == b.title) return(0); else return (a.title < b.title) ? -1 : +1; });\n for (var t = 0; t < results.length; t++) {\n var action = results[t];\n if (!allActions && aging > 0 && action.gtdActionDone && _GTD.tiddlerAgeInDays(action) > aging) continue;\n var theListItem = createTiddlyElement(theList, "li");\n var el = config.macros.gtdAction.createActionElement(theListItem, action, parentTiddler, action.tags);\n }\n }\n}\n\nconfig.commands.changeContext = { text: "context", tooltip: "Change context of this action", hideReadOnly: true, popupNone: "There are no contexts" };\nconfig.commands.changeContext.handler = function(event,src,title)\n{\n var popup = Popup.create(src);\n if (popup) {\n var contexts = store.getTaggedTiddlers("context");\n var tiddler = store.getTiddler(title);\n var c = false;\n var currentContext = config.options.txtGTDUnfiledContext;\n for (var i = 0; i < contexts.length; i++)\n if (_GTD.tiddlerHasTag(tiddler, contexts[i].title)) {\n currentContext = contexts[i].title;\n break;\n }\n \n for (i = 0; i < contexts.length; i++)\n if (contexts[i].title != currentContext) {\n var button = createTiddlyButton(createTiddlyElement(popup, "li"), contexts[i].title, '', this.onClickContext);\n button.setAttribute("actionTiddler", title);\n button.setAttribute("oldContext", currentContext);\n button.setAttribute("newContext", contexts[i].title);\n c = true;\n }\n if (!c)\n createTiddlyText(createTiddlyElement(popup, "li", null, "disabled"), this.popupNone);\n }\n \n Popup.show(popup, false);\n event.cancelBubble = true;\n if (event.stopPropagation) event.stopPropagation();\n // do *not* cause a browser navigation\n return false;\n}\n\nconfig.commands.changeContext.onClickContext = function(e)\n{\n var tiddler = store.getTiddler(this.getAttribute("actionTiddler"));\n if (tiddler) {\n var oldContext = this.getAttribute("oldContext");\n var newContext = this.getAttribute("newContext");\n if (_GTD.tiddlerSwapTag(tiddler, oldContext, newContext)) {\n _GTD.tiddlerHasChanged(tiddler);\n _GTD.refreshActionViews(tiddler);\n // be sure to refresh old context as well...\n story.refreshTiddler(oldContext, null, true);\n }\n }\n // do *not* cause a browser navigation\n return false;\n}\n\nconfig.commands.deleteAction = { text: "delete", tooltip: "Delete this action", hideReadOnly: true, warning: "Are you sure you want to delete '%0'?", altwarning: "Are you sure you want to delete '%0'? The action will also be removed from project '%1'." };\nconfig.commands.deleteAction.handler = function(event, src, title)\n{\n var tiddler = store.getTiddler(title);\n var ok = (tiddler.gtdProject ? confirm(this.altwarning.format([title, tiddler.gtdProject.title])) : confirm(this.warning.format([title])));\n if (ok) {\n if (tiddler.gtdProject) _GTD.removeProjectAction(tiddler.gtdProject, title);\n store.removeTiddler(title);\n story.closeTiddler(title,true,event.shiftKey || event.altKey);\n if(config.options.chkAutoSave)\n saveChanges();\n }\n \n return false;\n}\n\nconfig.commands.deleteContext = { text: "delete", tooltip: "Delete this context", hideReadOnly: true, warning: "Are you sure you want to delete '%0'? All associated actions will be tagged as 'unfiled'." };\nconfig.commands.deleteContext.handler = function(event, src, title)\n{\n if (confirm(this.warning.format([title]))) {\n store.suspendNotifications();\n this.unlinkActions(title);\n store.resumeNotifications();\n store.removeTiddler(title);\n story.closeTiddler(title,true,event.shiftKey || event.altKey);\n if(config.options.chkAutoSave)\n saveChanges();\n }\n \n return false;\n}\n\nconfig.commands.deleteContext.unlinkActions = function(contextTitle)\n{\n var tiddlers = config.macros.list.tagged.innerHandler([contextTitle, "action"], true);\n for (var i = 0; i < tiddlers.length; i++) {\n var tiddler = tiddlers[i];\n _GTD.tiddlerSwapTag(tiddler, contextTitle, config.options.txtGTDUnfiledContext);\n _GTD.tiddlerHasChanged(tiddler, false);\n // context removal will do view notification...\n }\n}\n\nconfig.commands.deleteProject = { text: "delete", tooltip: "Delete this project", hideReadOnly: true, warning: "Are you sure you want to delete '%0'? All associated actions will no longer be bound to this (or any) project." };\nconfig.commands.deleteProject.handler = function(event, src, title)\n{\n if (confirm(this.warning.format([title]))) {\n store.suspendNotifications();\n this.unlinkActions(title);\n store.resumeNotifications();\n store.removeTiddler(title);\n story.closeTiddler(title,true,event.shiftKey || event.altKey);\n if(config.options.chkAutoSave)\n saveChanges();\n }\n \n return false;\n}\n\nconfig.commands.deleteProject.unlinkActions = function(projectTitle)\n{\n var tiddlers = config.macros.list.tagged.innerHandler([projectTitle, "action"], true);\n for (var i = 0; i < tiddlers.length; i++) {\n var tiddler = tiddlers[i];\n tiddler.gtdProject = null;\n tiddler.tags.splice(tiddler.tags.find(projectTitle), 1);\n _GTD.tiddlerHasChanged(tiddler, false);\n // project removal will do view notification...\n }\n}\n\nconfig.commands.deleteProjectAll = { text: "delete all", tooltip: "Delete this project and its actions", hideReadOnly: true, warning: "Are you sure you want to delete '%0' and all its associated actions?" };\nconfig.commands.deleteProjectAll.handler = function(event, src, title)\n{\n if (confirm(this.warning.format([title]))) {\n store.suspendNotifications();\n this.deleteActions(title);\n store.resumeNotifications();\n store.removeTiddler(title);\n story.closeTiddler(title,true,event.shiftKey || event.altKey);\n if(config.options.chkAutoSave)\n saveChanges();\n }\n \n return false;\n}\n\nconfig.commands.deleteProjectAll.deleteActions = function(projectTitle)\n{\n var tiddlers = config.macros.list.tagged.innerHandler([projectTitle, "action"], true);\n for (var i = 0; i < tiddlers.length; i++) {\n var tiddler = tiddlers[i].title;\n store.removeTiddler(tiddler);\n story.closeTiddler(tiddler, true, false);\n // project removal will do view notification...\n }\n}\n\nconfig.commands.projectify = { text: "projectify", tooltip: "Convert this action to a project", hideReadOnly: true, warning: "Are you sure you want to convert '%0' to a project?" };\nconfig.commands.projectify.handler = function(event, src, title)\n{\n if (confirm(this.warning.format([title]))) {\n var tiddler = store.getTiddler(title);\n if (tiddler.gtdProject) _GTD.removeProjectAction(tiddler.gtdProject, title);\n tiddler.tags = [ "project" ];\n _GTD.tiddlerHasChanged(tiddler, true);\n // we need a broad notification here, not just refreshActionViews\n store.notify(title, true);\n }\n \n return false;\n}\n\nconfig.macros.touchRevision = {}\nconfig.macros.touchRevision.handler = function ()\n{\n var d = version.extensions.GTDPlugins.date;\n var tiddlers = config.macros.list.tagged.innerHandler(["systemConfig", "systemTiddler", "template", "gtd"], false);\n for (var i = 0; i < tiddlers.length; i++) {\n tiddlers[i].created = d;\n tiddlers[i].modified = d;\n }\n}\n\nStory.prototype.chooseTemplateForTiddler = function(title,template)\n{\n if (!template)\n template = DEFAULT_VIEW_TEMPLATE;\n\n // before reverting to default behaviour, check to see if a tag-based template exists\n if (template == DEFAULT_VIEW_TEMPLATE || template == DEFAULT_EDIT_TEMPLATE) {\n if (this.tagBasedTemplateCache == undefined) this.tagBasedTemplateCache = new Array();\n var templateRoot = (template == DEFAULT_VIEW_TEMPLATE ? "ViewTemplate" : "EditTemplate");\n var tiddler = store.getTiddler(title);\n if (tiddler) {\n for (var i = 0; i < tiddler.tags.length; i++) {\n var tag = tiddler.tags[i];\n var tagTemplate = tag + templateRoot;\n var tagCacheId = tag + template;\n // first check our cache to see if we have seen this template before\n if (this.tagBasedTemplateCache[tagCacheId] != undefined) {\n // make sure template still exists\n if (store.tiddlerExists(this.tagBasedTemplateCache[tagCacheId])) {\n template = this.tagBasedTemplateCache[tagCacheId];\n break;\n }\n else\n delete this.tagBasedTemplateCache[tagCacheId];\n }\n // go to the store to see if template exists\n if (store.tiddlerExists(tagTemplate)) {\n template = tagTemplate;\n this.tagBasedTemplateCache[tagCacheId] = tagTemplate;\n break;\n }\n }\n }\n }\n \n if (template == DEFAULT_VIEW_TEMPLATE || template == DEFAULT_EDIT_TEMPLATE)\n template = config.tiddlerTemplates[template];\n return template;\n}\n\nconfig.macros.importUpdates = { \n importMode: "updates",\n buttonTitle: "Update", \n buttonHelp: "Click here to update the application",\n preUpdateMessage: "Once the download is finished, you will need to reload your document to complete the update. In order to allow you to review the update tiddlers, this will not be done automatically. \sn\snClick \s"OK\s" start the update."\n}\nconfig.macros.importUpdates.handler = function(place, macroName, params)\n{\n var mode = params[1] ? params[1] : this.importMode;\n var title = params[2] ? params[2] : this.buttonTitle;\n var prompt = params[3] ? params[3] : this.buttonHelp;\n var button = createTiddlyButton(place, title, prompt, this.onClickUpdate);\n button.setAttribute("updateSource", params[0]);\n button.setAttribute("importMode", mode);\n if (params.length > 4) button.setAttribute("importExtras", params.slice(4).join(" "));\n}\n\nconfig.macros.importUpdates.onClickUpdate = function(e)\n{\n if (!confirm(config.macros.importUpdates.preUpdateMessage))\n return;\n var importParams = [ this.getAttribute("importMode"), this.getAttribute("updateSource") ];\n var importExtras = this.getAttribute("importExtras");\n if (importExtras) importParams = importParams.concat(importExtras.split(" "));\n importParams.push("force");\n // force a saveChanges with backup before the update\n _GTD.saveWithForcedBackup();\n // chain to the importTiddlers macro\n config.macros.importTiddlers.handler(this, "importTiddlers", importParams);\n // ensure that relevant release notes are displayed on first launch\n config.options.chkGTDReleaseNotes = true;\n saveOptionCookie("chkGTDReleaseNotes");\n // do *not* cause a browser navigation\n return false;\n}\n\nconfig.macros.gtdArchive = {}\nconfig.macros.gtdArchive.handler = function(place, macroName, params)\n{\n var archiveAction = params.length > 0 ? params[0] : "archive"\n var btn = createTiddlyButton(place, archiveAction, "", this.onClick);\n btn.setAttribute("archiveAction", archiveAction);\n}\n\nconfig.macros.gtdArchive.onClick = function(e)\n{\n var warning = "Are you sure you want to %0 all %1 projects and actions?";\n var status = "There were %0 project(s) and %1 action(s) %2d.";\n var archiveAction = this.getAttribute("archiveAction");\n \n var projectCount = 0, actionCount = 0;\n \n if (archiveAction == "archive") {\n if (confirm(warning.format([archiveAction, "completed"]))) {\n clearMessage();\n var projects = store.getTaggedTiddlers("project");\n for (var i = 0; i < projects.length; i++) {\n var project = projects[i];\n if (project.gtdActions == undefined || project.gtdActions.length == 0) continue;\n var projectComplete = true;\n for (var j = 0; projectComplete && j < project.gtdActions.length; j++)\n projectComplete = project.gtdActions[j].gtdActionDone;\n if (!projectComplete) continue;\n // if we get here, all project actions are done, so archive project\n story.closeTiddler(project.title, false, false);\n _GTD.tiddlerSwapTag(project, "project", "project-archive");\n _GTD.tiddlerHasChanged(project, false);\n projectCount++;\n for (j = 0; j < project.gtdActions.length; j++) {\n story.closeTiddler(project.gtdActions[j].title, false, false);\n _GTD.tiddlerSwapTag(project.gtdActions[j], "action", "action-archive");\n _GTD.tiddlerHasChanged(project.gtdActions[j], false);\n actionCount++;\n }\n }\n var actions = store.getTaggedTiddlers("action");\n for (i = 0; i < actions.length; i++) {\n var action = actions[i];\n if (action.gtdActionDone && !action.gtdProject) {\n story.closeTiddler(action.title, false, false);\n _GTD.tiddlerSwapTag(action, "action", "action-archive");\n _GTD.tiddlerHasChanged(action, false);\n actionCount++;\n }\n }\n displayMessage(status.format([projectCount, actionCount, archiveAction]));\n var saveClearMessage = clearMessage;\n clearMessage = function() {};\n if (config.options.chkAutoSave) saveChanges();\n clearMessage = saveClearMessage;\n store.notify(null, true);\n }\n }\n \n else if (archiveAction == "unarchive") {\n if (confirm(warning.format([archiveAction, "archived"]))) {\n clearMessage();\n var projects = store.getTaggedTiddlers("project-archive");\n for (var i = 0; i < projects.length; i++) {\n var project = projects[i];\n story.closeTiddler(project.title, false, false);\n _GTD.tiddlerSwapTag(project, "project-archive", "project");\n _GTD.tiddlerHasChanged(project, false);\n projectCount++;\n }\n var actions = store.getTaggedTiddlers("action-archive");\n for (i = 0; i < actions.length; i++) {\n var action = actions[i];\n story.closeTiddler(action.title, false, false);\n _GTD.tiddlerSwapTag(action, "action-archive", "action");\n _GTD.tiddlerHasChanged(action, false);\n actionCount++;\n }\n displayMessage(status.format([projectCount, actionCount, archiveAction]));\n var saveClearMessage = clearMessage;\n clearMessage = function() {};\n if (config.options.chkAutoSave) saveChanges();\n clearMessage = saveClearMessage;\n store.notify(null, true);\n }\n }\n \n else if (archiveAction == "purge") {\n if (confirm(warning.format([archiveAction, "archived"]))) {\n clearMessage();\n _GTD.saveWithForcedBackup();\n var projects = store.getTaggedTiddlers("project-archive");\n for (var i = 0; i < projects.length; i++) {\n var project = projects[i];\n story.closeTiddler(project.title, false, false);\n store.removeTiddler(project.title);\n projectCount++;\n }\n var actions = store.getTaggedTiddlers("action-archive");\n for (i = 0; i < actions.length; i++) {\n var action = actions[i];\n story.closeTiddler(action.title, false, false);\n store.removeTiddler(action.title);\n actionCount++;\n }\n displayMessage(status.format([projectCount, actionCount, archiveAction]));\n var saveClearMessage = clearMessage;\n clearMessage = function() {};\n if (config.options.chkAutoSave) saveChanges();\n clearMessage = saveClearMessage;\n store.notify(null, true);\n }\n }\n else\n alert("That archiving action is not supported");\n}\n\n_GTD.initialize();\n\n//}}}\n
/***\n!GTD specific styles\n***/\n\n/*{{{*/\n/* how annoying is that big header anyway?! */\n.headerForeground, .headerShadow {\n padding-top: 1em;\n}\n\n/* the tagging popup really gets in the way so push it off to the side */\n.tagging { float: right; }\n\n/* this unbullets actions in the actionList macro */\nul.gtdActionList { list-style-type: none; }\nli.gtdActionListProject, li.gtdActionListContext { margin-top: 1.0em; }\n\n.gtdCompletedActionItem { text-decoration: line-through; }\n.gtdNextActionItem { border-bottom: 1px solid red; }\n\na.actionCrossReference { color: #ff8c00; }\n\n/* necessary bits copied from enhanced stylesheet to render properly without it */\n#mainMenu {\n font-size: 1em;\n text-align: left;\n width: 12em;\n}\n\n#mainMenu * {\n font-size: 1em;\n font-weight: normal;\n padding: 0; margin: 0; border: 0;\n}\n\n#mainMenu ul {\n list-style: none;\n margin-bottom: 10px;\n}\n\n#mainMenu li {\n text-indent: 1em;\n}\n\n#mainMenu a.button, #mainMenu a.tiddlyLink, #mainMenu a.externalLink {\n display: block; margin: 0;\n}\n\n/*}}}*/\n\n/***\n!Imported 3x5 printing styles\n//adapted from the work of Clint Checketts, http://www.checkettsweb.com/tw/gtd_tiddlywiki.htm //\n***/\n\n/*{{{*/\n\n@media print {\n#mainMenu, #sidebar, #messageArea {display: none !important;}\n#displayArea {margin: 1em 1em 0em 1em;}\n\n\n/* LAYOUT ELEMENTS ========================================================== */\n*\n{\n margin: 0;\n padding: 0;\n}\n\n#contentWrapper\n{\n margin: 0;\n width: 100%;\n position: static;\n}\n\nbody {\n background: #fff;\n color: #000;\n font-size: 6.2pt;\n font-family: "Lucida Grande", "Bitstream Vera Sans", Helvetica, Verdana, Arial, sans-serif;\n}\n\nimg {\n max-width: 2.2in;\n max-height: 4.3in;\n}\n\n#header, #side_container, #storeArea, #copyright, #floater, #messageArea, .save_accesskey, .site_description, #saveTest, .toolbar, .header, .footer, .tagging, .tagged\n{\n display: none;\n}\n\n#tiddlerDisplay, #displayArea\n{\n display: inline;\n}\n\n.tiddler {\n margin: 0 0 2em 0;\n border-top: 1px solid #000;\n page-break-before: always;\n}\n\n.tiddler:first-child {\n page-break-before: ;\n}\n\n.title {\n font-size: 1.6em;\n font-weight: bold;\n margin-bottom: .3em;\n padding: .2em 0;\n border-bottom: 1px dotted #000;\n}\n\np, blockquote, ul, li, ol, dt, dd, dl, table\n{\n margin: 0 0 .3em 0;\n}\n\nh1, h2, h3, h4, h5, h6\n{\n margin: .2em 0;\n} \n\nh1\n{\n font-size: 1.5em;\n}\n\nh2\n{\n font-size: 1.3em;\n}\n\nh3\n{\n font-size: 1.25em;\n}\n\nh4\n{\n font-size: 1.15em;\n}\n\nh5\n{\n font-size: 1.1em;\n}\n\nblockquote\n{\n margin: .6em;\n padding-left: .6em;\n border-left: 1px solid #ccc;\n}\n\nul\n{\n list-style-type: circle;\n}\n\nli\n{\n margin: .1em 0 .1em 2em;\n line-height: 1.4em; \n}\n\ntable\n{\n border-collapse: collapse;\n font-size: 1em;\n}\n\ntd, th\n{\n border: 1px solid #999;\n padding: .2em;\n}\n\nhr {\n border: none;\n border-top: dotted 1px #777;\n height: 1px;\n color: #777;\n margin: .6em 0;\n}\n}\n/*}}}*/\n\n/***\n!Imported styles for calendar plugin\n***/\n\n/*{{{*/\n.calendar{\n border-bottom: 1px solid #550000;\n}\n\n.viewer .calendar{\n width: 220px;\n}\n\n#mainMenu .calendar{\n font-size: 8px;\n cursor: pointer;\n width: 100%;\n border: 0;\n border-collapse: collapse;\n}\n\n#mainMenu .calendar .button{\n border: 0;\n}\n\n#mainMenu .calendar td{\n font-size: 8pt;\n padding: 0;\n background: #fff;\n border: 0;\n}\n\n#mainMenu .calendar a{\n margin: 0;\n color: #000;\n background: transparent;\n}\n\n#mainMenu .calendar a:hover{\n color: #000;\n background: transparent;\n}\n\n#mainMenu .calendarMonthname,\n#mainMenu .calendar .calendarMonthTitle td a{\n color: #fff;\n}\n\n#mainMenu .calendarDaysOfWeek td{\n background: #500;\n color: #fff;\n}\n/*}}}*/\n\n\n\n\n
/***\n!Layout Rules /%==============================================%/\n***/\n/*{{{*/\n\nbody {\n /* this is required for proper layout on IE, for some reason... */\n _position: static;\n}\n\n.tagClear {\n /* this, too, is a necessary IE hack... */\n _margin-top: 10em; \n _clear: both;\n}\n\n.headerForeground, .headerShadow {\n padding-top: 1em;\n}\n\n.tiddler {\n margin: 0 0 0.9em 0;\n padding-bottom: 1em;\n}\n\n#mainMenu {\n width: 16em;\n font-size: 1em;\n text-align: left;\n padding-top: 0.5em;\n}\n\n#mainMenu * {\n font-size: 1em;\n font-weight: normal;\n padding: 0; margin: 0; border: 0;\n}\n\n#mainMenu ul {\n list-style: none;\n margin-bottom: 10px;\n}\n\n#mainMenu li {\n text-indent: 1em;\n}\n\n#mainMenu a.button, #mainMenu a.tiddlyLink, #mainMenu a.externalLink {\n display: block; margin: 0;\n}\n\n#displayArea {\n margin-left: 19em; margin-top: 0;\n}\n\n.toolbar .button {\n margin-left: 4px;\n}\n\n/*}}}*/\n\n/***\n!Generic Rules /%==============================================%/\n***/\n/*{{{*/\nbody {\n background: #464646;\n color: #000;\n}\n\nh1,h2,h3,h4,h5 {\n color: #000;\n background: #eee;\n}\n\n/*}}}*/\n/***\n!Header /%==================================================%/\n***/\n/*{{{*/\n.header {\n background: #000;\n}\n\n.headerForeground {\n color: #cf6;\n}\n\n.headerForeground a {\n font-weight: normal;\n color: #cf6;\n}\n\n/* ??? what is up when you specify a site title colour in IE ??? */\n/* .siteTitle { color: red; } */\n\n/*}}}*/\n/***\n!General tabs /%=================================================%/\n***/\n/*{{{*/\n\n.tabSelected {\n color: #fff;\n background: #960;\n border: none;\n}\n\n.tabUnselected {\n color: #fff;\n background: #660;\n}\n\n.tabContents {\n color: #004;\n background: #960;\n border: none;\n}\n\n.tabContents .button, .tabContents a {\n border: none;\n color: #fff;\n}\n\n.tabContents a:hover, .tabset a:hover {\n background: #000;\n}\n\n/* make nested tab areas look different */\n.tabContents .tabSelected, .tabContents .tabContents {\n background: #700;\n color: #fff;\n}\n\n.tabContents .tabContents {\n color: #eeb;\n}\n\n/*}}}*/\n/***\n!Main Menu /%=================================================%/\n***/\n/*{{{*/\n#mainMenu {\n background: #700;\n color: #fff;\n border-right: 3px solid #500;\n}\n\n#mainMenu * {\n color: #fff;\n}\n\n#mainMenu a.button, #mainMenu a.tiddlyLink, #mainMenu a.externalLink {\n border: none;\n border-bottom: 1px solid #500;\n border-top: 1px solid #900;\n}\n\n#mainMenu a:hover,\n#mainMenu a.button:hover {\n background-color: #b00;\n color: #fff;\n}\n\n/*}}}*/\n/***\n!Sidebar options /%=================================================%/\n~TiddlyLinks and buttons are treated identically in the sidebar and slider panel\n***/\n/*{{{*/\n#sidebar {\n color: #000;\n background: #eeb;\n border-right: 3px solid #bb8;\n border-bottom: 3px solid #520;\n}\n\n#sidebarOptions .sliderPanel {\n background: #fff;\n}\n\n#sidebarOptions .sliderPanel a {\n border: none;\n color: #700;\n}\n\n#sidebarOptions .sliderPanel a:hover {\n color: #fff;\n background: #700;\n}\n\n#sidebarOptions .sliderPanel a:active {\n color: #700;\n background: #fff;\n}\n\n#sidebarOptions a {\n color: #700;\n border: none;\n}\n\n#sidebarOptions a:hover, #sidebarOptions a:active {\n color: #fff;\n background: #700;\n}\n\n/*}}}*/\n/***\n!Message Area /%=================================================%/\n***/\n/*{{{*/\n#messageArea {\n border-right: 3px solid #da1;\n border-bottom: 3px solid #a80;\n background: #ffe72f;\n color: #014;\n}\n\n/*}}}*/\n/***\n!Popup /%=================================================%/\n***/\n/*{{{*/\n.popup {\n background: #cf6;\n border: none;\n}\n\n.popup hr {\n color: #000;\n}\n\n.popup li.disabled {\n color: #666;\n background: #cf6;\n}\n\n.popup li a, .popup li a:visited {\n color: #000;\n border: 1px outset #cf6;\n background: #cf6;\n}\n\n.popup li a:hover {\n color: #000;\n border: 1px outset #cf6;\n background: #ef9;\n}\n/*}}}*/\n/***\n!Tiddler Display /%=================================================%/\n***/\n/*{{{*/\n.tiddler {\n background: #fff;\n border-right: 3px solid #aaa;\n border-bottom: 3px solid #555;\n}\n\n.title {\n color: #900;\n}\n\n.toolbar {\n color: #000;\n}\n\n.toolbar .button {\n background: #eeb /*#cf6*/;\n border: 1px outset #eeb /*#cf6*/;\n}\n\n.toolbar .button:hover {\n background: #700 /*#ef9*/;\n color: #fff;\n}\n\n/*}}}*/\n
太让人惊奇了,python-cn邮件列表上的常客们几乎用的是清一色的gmail! 看来gmail在奇客心目中的地位就如同firefox在热爱web的人一样。
On 2006年07月16日 星期日 12时58分09秒, ybyygu imported tiddlers from\n[[/home/ybyygu/Desktop/ybyygu.html|/home/ybyygu/Desktop/ybyygu.html]]:\n<<<\nOut of 3 tiddlers in {{{/home/ybyygu/Desktop/ybyygu.html}}}:\n3 new tiddlers were added to your document.\n#[[AboutTiddlySpot]]\n#[[ConfigTweaks]]\n#[[UploadPlugin]]\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn 2006年07月16日 星期日 10时39分30秒, ybyygu imported tiddlers from\n[[/home/ybyygu/notes/mynotes.html|/home/ybyygu/notes/mynotes.html]]:\n<<<\nOut of 188 tiddlers in {{{/home/ybyygu/notes/mynotes.html}}}:\n167 new tiddlers were added to your document.\n3 tiddlers were skipped after asking.\n18 tiddlers were not imported.\n#[[ weighted.mean]]\n#[[/dev/stdout]]\n#[[2005年 12月 10日]]\n#[[2005年 12月 4日]]\n#[[2006年 4月 5日]]\n#[[7z]]\n#[[C++ primer笔记]]\n#[[Flashget中使用天网来搜索镜像文件]]\n#[[GTD-Style]]\n#[[Linux 下的ISO 文件]]\n#[[MainMenu]]^^\nskipped after asking^^\n#[[Openoffice中文加强版中无法调出scim]]\n#[[Ortep3]]\n#[[Outlook的使用]]\n#[[PLATON for Windows]]\n#[[R 常用操作]]\n#[[R 的图形输出]]\n#[[R读入空格分格的数据]]\n#[[SideBarOptions]]\n#[[SideBarTabs]]\n#[[SiteSubtitle]]^^\nskipped after asking^^\n#[[SiteTitle]]^^\nskipped after asking^^\n#[[TEX]]\n#[[TiddlyWikiCheatSheet]]\n#[[Win2000自动登录的设置方法]]\n#[[Windows下内外网双IP的设置──仿Linux]]\n#[[Xserver的设置]]\n#[[abook -- console 下的地址簿管理器]]\n#[[abook的几个问题]]\n#[[abook的问题]]\n#[[awk]]\n#[[bash 笔记]]\n#[[beep]]\n#[[blender学习笔记]]\n#[[bmpx,audacious;xmms2]]\n#[[cdargs-- 命令行下路径收藏器]]\n#[[cgdb -- 一个字符界面的gdb 调试器]]\n#[[chroot]]\n#[[convmv iconv]]\n#[[crontab]]\n#[[curl]]\n#[[dd--Linux下的镜像工具]]\n#[[debian chroot HOWTO]]\n#[[debian runlevel script setup]]\n#[[dos2unix & unix2dos]]\n#[[dpkg 常用操作]]\n#[[driver]]\n#[[english]]\n#[[exim 配置smarthost向外部邮箱发信]]\n#[[expand.grid]]\n#[[fcitx 的五笔码表]]\n#[[fetchmail]]\n#[[find]]\n#[[firefox 中的字体设置]]\n#[[firefox 备份文件列表]]\n#[[gaim登入gtalk服务]]\n#[[gdb tips]]\n#[[gdm]]\n#[[gentoo administratation]]\n#[[gif animatition]]\n#[[glxgears测显示测能]]\n#[[gnuplot基本命令]]\n#[[google toolbar]]\n#[[grep egrep]]\n#[[grub]]\n#[[hd-media的下载路径]]\n#[[hdparm]]\n#[[how to compile from debian source?]]\n#[[how to compile kernel in debian/ubuntu?]]\n#[[iptables]]\n#[[iptraf]]\n#[[iso 工具]]\n#[[jar 命令行压缩方法:]]\n#[[java 设置]]\n#[[jesred的配置]]\n#[[kile]]\n#[[krusader]]\n#[[ldap 使用初探]]\n#[[linux 下DVD刻录方法]]\n#[[linux下的文件保护]]\n#[[lsb_release]]\n#[[mkisofs]]\n#[[mpg123 ogg123]]\n#[[mplayer tips]]\n#[[mplayer 无法加载sub字幕]]\n#[[mutt tips]]\n#[[nautilus中的声音文件预听功能需要安装mpg321]]\n#[[nauture paper]]\n#[[nmap]]\n#[[nslookup]]\n#[[ntpdate]]\n#[[oggenc]]\n#[[patch]]\n#[[patch & diff]]\n#[[pdf 套件]]\n#[[perl 的调试方法]]\n#[[povray + vmd]]\n#[[privoxy的配置]]\n#[[python+curl+proxy]]\n#[[realplay 与 scim冲突]]\n#[[realplay 与scim冲突]]\n#[[rename]]\n#[[rename 工具]]\n#[[run level config]]\n#[[runif]]\n#[[samba 的配置]]\n#[[screen]]\n#[[sed TIPS]]\n#[[squid 竟然已经有了Win版,太赞了]]\n#[[squid的rewrite url功能]]\n#[[squid的配置]]\n#[[ssh]]\n#[[tar 使用总结]]\n#[[tex cjk设置的几个要点:]]\n#[[tor privoxy squid 配置实现加密上网]]\n#[[ubuntu 安装软件列表]]\n#[[udev]]\n#[[unicode 转义码]]\n#[[update-rc.d -- debian的启动管理]]\n#[[vim tips]]\n#[[vim 中的宏与寄存器]]\n#[[vim中的关键词自动完成]]\n#[[whiptail -- 终端对话框工具箱]]\n#[[wiki 样式的通讯录]]\n#[[win vs. wine vs. vmware]]\n#[[xev]]\n#[[xrandr]]\n#[[xvidtude]]\n#[[xxd]]\n#[[一个值得学习的好项目-sbackup]]\n#[[万方数据库文献]]\n#[[下载emacs CVS源码]]\n#[[下载中文xpi的地方]]\n#[[与网络相关的几个命令]]\n#[[从源代码编译的一些技巧]]\n#[[使用cat来查看组合键]]\n#[[使用dh_make来制作deb安装包]]\n#[[使用dovecot配置imap服务]]\n#[[使用zentify来显示GTK+对话框]]\n#[[公文包是个好东西]]\n#[[几个待研究的东西]]\n#[[启动管理]]\n#[[在R界面下直接搜索]]\n#[[在VMD中做标记的方法]]\n#[[在deb系统中,编译scim 的一点小技巧]]\n#[[在linux 下安装vmware]]\n#[[如何在启动时打开小键盘的数字锁定键?]]\n#[[如何查找网卡使用的模块]]\n#[[如何禁用IPV6]]\n#[[字符与命令的转换]]\n#[[安装cpan 模块的方法]]\n#[[安装win2000时不要使用120GB以上的大硬盘]]\n#[[师姐的事]]\n#[[帮忙翻译一下abook]]\n#[[常用软件列表]]\n#[[开始]]\n#[[我的crontab]]\n#[[改写qsubmit_gauss.sh]]\n#[[文件切割、合并]]\n#[[用FlashGet下载的几个小诀窍]]\n#[[用dch为deb添加新的修改]]\n#[[用gimp制做影响效果]]\n#[[用sed对某个文件替换字符串]]\n#[[给图片加阴影-效果好极了]]\n#[[网络校时的设置 --ntp]]\n#[[自动完成]]\n#[[补一点编译方面的基础知识]]\n#[[解决gentoo无比使用dchroot -d 的问题]]\n#[[设置]]\n#[[鼠标中键不能用了]]\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>
* linux 下制作iso 文件的方法\n{{{\ncat /dev/hdc > /mnt/images/image1.iso\n}}}\n其中hdc 为cdrom设备。也可以用cp 命令,但使用时会输出一个错误。\n* iso 文件的使用方法:\n{{{\nmount -t iso9660 -o loop,ro image1.iso /mnt/cdrom\n}}}
<<tiddler GTDMenu>>\n[[Help|http://www.blogjones.com/TiddlyWikiTutorial.html#EasyToEdit]][[About]]\n
/***\n''NestedSlidersPlugin for TiddlyWiki version 1.2.x and 2.0''\n^^author: Eric Shulman\nsource: http://www.elsdesign.com/tiddlywiki/#NestedSlidersPlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n\nQuickly make any tiddler content into an expandable 'slider' panel, without needing to create a separate tiddler to contain the slider content. Optional syntax allows ''default to open'', ''custom button label/tooltip'' and ''automatic blockquote formatting.''\n\nYou can also 'nest' these sliders as deep as you like (see complex nesting example below), so that expandable 'tree-like' hierarchical displays can be created. This is most useful when converting existing in-line text content to create in-line annotations, footnotes, context-sensitive help, or other subordinate information displays.\n\nFor more details, please click on a section headline below:\n++++!!!!![Configuration]>\nDebugging messages for 'lazy sliders' deferred rendering:\n<<option chkDebugLazySliderDefer>> show debugging alert when deferring slider rendering\n<<option chkDebugLazySliderRender>> show debugging alert when deferred slider is actually rendered\n//''note: Enabling these settings may produce unexpected results. Use at your own risk.''//\n===\n++++!!!!![Usage]>\nWhen installed, this plugin adds new wiki syntax for embedding 'slider' panels directly into tiddler content. Use {{{+++}}} and {{{===}}} to delimit the slider content. Additional optional syntax elements let you specify 'default to open', 'cookiename', 'heading level', 'custom label/tooltip', 'automatic blockquote' and 'deferred rendering'.\n//{{{\n++++(cookiename)!!!!![label|tooltip]>...\ncontent goes here\n===\n//}}}\nwhere:\n* {{{+++}}} (or {{{++++}}}) and {{{===}}}^^\nmarks the start and end of the slider definition, respectively. When the extra {{{+}}} is used, the slider will be open when initially displayed.^^\n* {{{(cookiename)}}}^^\nsave the slider opened/closed state, and restore this state whenever the slider is re-rendered.^^\n* {{{!}}} through {{{!!!!!}}}^^\ndisplays the slider label using a formatted headline (Hn) style instead of a button/link style^^\n* {{{[label]}}} or {{{[label|tooltip]}}}^^\nuses custom label/tooltip. (defaults are: ">/more..." and "</less...")^^\n* {{{">"}}} //(without the quotes)//^^\nautomatically adds blockquote formatting to slider content^^\n* {{{"..."}}} //(without the quotes)//^^\ndefers rendering of closed sliders until the first time they are opened. //Note: deferred rendering may produce unexpected results in some cases. Use with care.//^^\n\n//Note: to make slider definitions easier to read and recognize when editing a tiddler, newlines immediately following the {{{+++}}} 'start slider' or preceding the {{{===}}} 'end slider' sequence are automatically supressed so that excess whitespace is eliminated from the output.//\n===\n++++!!!!![Examples]>\nsimple in-line slider: \n{{{\n+++\n content\n===\n}}}\n+++\n content\n===\n----\ndefault to open: \n{{{\n++++\n content\n===\n}}}\n++++\n content\n===\n----\nuse a custom label: \n{{{\n+++[label]\n content\n===\n}}}\n+++[label]\n content\n===\n----\nuse a custom label and tooltip: \n{{{\n+++[label|tooltip]\n content\n===\n}}}\n+++[label|tooltip]\n content\n===\n----\ncontent automatically blockquoted: \n{{{\n+++>\n content\n===\n}}}\n+++>\n content\n===\n----\nall options combined //(default open, custom label/tooltip, blockquoted)//\n{{{\n++++(testcookie)[label|tooltip]>\n content\n===\n}}}\n++++(testcookie)[label|tooltip]>\n content\n===\n----\ncomplex nesting example:\n{{{\n+++[get info...|click for information]>\n put some general information here, plus a slider with more specific info:\n +++[view details...|click for details]>\n put some detail here, which could include some +++[definitions]>explaining technical terms===\n ===\n===\n}}}\n+++[get info...|click for information]>\n put some general information here, plus a slider with more specific info:\n +++[view details...|click for details]>\n put some detail here, which could include some +++[definitions]>explaining technical terms===\n === \n=== \n===\n+++!!!!![Installation]>\nimport (or copy/paste) the following tiddlers into your document:\n''NestedSlidersPlugin'' (tagged with <<tag systemConfig>>)\n===\n+++!!!!![Revision History]>\n\n++++[2006.01.03 - 1.6.2]\nWhen using optional "!" heading style, instead of creating a clickable "Hn" element, create an "A" element inside the "Hn" element. (allows click-through in SlideShowPlugin, which captures nearly all click events, except for hyperlinks)\n===\n\n+++[2005.12.15 - 1.6.1]\nadded optional "..." syntax to invoke deferred ('lazy') rendering for initially hidden sliders\nremoved checkbox option for 'global' application of lazy sliders\n===\n\n+++[2005.11.25 - 1.6.0]\nadded optional handling for 'lazy sliders' (deferred rendering for initially hidden sliders)\n===\n\n+++[2005.11.21 - 1.5.1]\nrevised regular expressions: if present, a single newline //preceding// and/or //following// a slider definition will be suppressed so start/end syntax can be place on separate lines in the tiddler 'source' for improved readability. Similarly, any whitespace (newlines, tabs, spaces, etc.) trailing the 'start slider' syntax or preceding the 'end slider' syntax is also suppressed.\n===\n\n+++[2005.11.20 - 1.5.0]\n added (cookiename) syntax for optional tracking and restoring of slider open/close state\n===\n\n+++[2005.11.11 - 1.4.0]\n added !!!!! syntax to render slider label as a header (Hn) style instead of a button/link style\n===\n\n+++[2005.11.07 - 1.3.0]\n removed alternative syntax {{{(((}}} and {{{)))}}} (so they can be used by other\n formatting extensions) and simplified/improved regular expressions to trim multiple excess newlines\n===\n\n+++[2005.11.05 - 1.2.1]\n changed name to NestedSlidersPlugin\n more documentation\n===\n\n+++[2005.11.04 - 1.2.0]\n added alternative character-mode syntax {{{(((}}} and {{{)))}}}\n tweaked "eat newlines" logic for line-mode {{{+++}}} and {{{===}}} syntax\n===\n\n+++[2005.11.03 - 1.1.1]\n fixed toggling of default tooltips ("more..." and "less...") when a non-default button label is used\n code cleanup, added documentation\n===\n\n+++[2005.11.03 - 1.1.0]\n changed delimiter syntax from {{{(((}}} and {{{)))}}} to {{{+++}}} and {{{===}}}\n changed name to EasySlidersPlugin\n===\n\n+++[2005.11.03 - 1.0.0]\n initial public release\n===\n\n===\n+++!!!!![Credits]>\nThis feature was implemented by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]] based on considerable research, programming and suggestions from RodneyGomes, GeoffSlocock, and PaulPetterson\n===\n***/\n// //+++!!!!![Code]\n//{{{\nversion.extensions.nestedSliders = {major: 1, minor: 6, revision: 2, date: new Date(2006,1,3)};\n//}}}\n\n//{{{\n// options for deferred rendering of sliders that are not initially displayed\nif (config.options.chkDebugLazySliderDefer==undefined) config.options.chkDebugLazySliderDefer=false;\nif (config.options.chkDebugLazySliderRender==undefined) config.options.chkDebugLazySliderRender=false;\n//}}}\n\n//{{{\nconfig.formatters.push( {\n name: "nestedSliders",\n match: "\s\sn?\s\s+{3}",\n terminator: "\s\ss*\s\s={3}\s\sn?",\n lookahead: "\s\sn?\s\s+{3}(\s\s+)?(\s\s([^\s\s)]*\s\s))?(\s\s!*)?(\s\s[[^\s\s]]*\s\s])?(\s\s>?)(\s\s.\s\s.\s\s.)?\s\ss*",\n handler: function(w)\n {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n // default to closed, no cookie\n var show="none"; var title=">"; var tooltip="show"; var cookie="";\n\n // extra "+", default to open\n if (lookaheadMatch[1])\n { show="block"; title="<"; tooltip="hide"; }\n\n // cookie, use saved open/closed state\n if (lookaheadMatch[2]) {\n cookie=lookaheadMatch[2].trim().substr(1,lookaheadMatch[2].length-2);\n cookie="chkSlider"+cookie;\n if (config.options[cookie]==undefined)\n { config.options[cookie] = (show=="block") }\n if (config.options[cookie])\n { show="block"; title="<"; tooltip="hide"; }\n else\n { show="none"; title=">"; tooltip="show"; }\n }\n\n // custom label/tooltip\n if (lookaheadMatch[4]) {\n title = lookaheadMatch[4].trim().substr(1,lookaheadMatch[4].length-2);\n if ((pos=title.indexOf("|")) != -1)\n { tooltip = title.substr(pos+1,title.length); title = title.substr(0,pos); }\n else\n { tooltip += " "+title; }\n }\n // use "Hn" header format instead of button/link\n if (lookaheadMatch[3]) {\n var lvl=(lookaheadMatch[3].length>6)?6:lookaheadMatch[3].length;\n var btn = createTiddlyElement(createTiddlyElement(w.output,"h"+lvl,null,null,null),"a",null,null,title);\n btn.onclick=onClickNestedSlider;\n btn.setAttribute("href","javascript:;");\n btn.setAttribute("title",tooltip);\n\n }\n else\n var btn = createTiddlyButton(w.output,title,tooltip,onClickNestedSlider);\n var panel = createTiddlyElement(w.output,"span",null,"sliderPanel",null);\n btn.sliderCookie = cookie;\n btn.sliderPanel = panel;\n panel.style.display = show;\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n if (!lookaheadMatch[6] || show=="block") {\n w.subWikify(lookaheadMatch[5]?createTiddlyElement(panel,"blockquote"):panel,this.terminator);\n }\n else {\n var src = w.source.substr(w.nextMatch);\n var endpos=findMatchingDelimiter(src,"+++","===");\n panel.setAttribute("raw",src.substr(0,endpos));\n panel.setAttribute("blockquote",lookaheadMatch[5]?"true":"false");\n panel.setAttribute("rendered","false");\n w.nextMatch += endpos+3;\n if (w.source.substr(w.nextMatch,1)=="\sn") w.nextMatch++;\n if (config.options.chkDebugLazySliderDefer)\n alert("deferred '"+title+"':\sn\sn"+panel.getAttribute("raw"));\n }\n }\n }\n }\n)\n\n// TBD: ignore 'quoted' delimiters (e.g., "{{{+++foo===}}}" isn't really a slider)\nfunction findMatchingDelimiter(src,starttext,endtext) {\n var startpos = 0;\n var endpos = src.indexOf(endtext);\n // check for nested delimiters\n while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {\n // count number of nested 'starts'\n var startcount=0;\n var temp = src.substring(startpos,endpos-1);\n var pos=temp.indexOf(starttext);\n while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }\n // set up to check for additional 'starts' after adjusting endpos\n startpos=endpos+endtext.length;\n // find endpos for corresponding number of matching 'ends'\n while (startcount && endpos!=-1) {\n endpos = src.indexOf(endtext,endpos+endtext.length);\n startcount--;\n }\n }\n return (endpos==-1)?src.length:endpos;\n}\n//}}}\n\n//{{{\nfunction onClickNestedSlider(e)\n{\n if (!e) var e = window.event;\n var theTarget = resolveTarget(e);\n var theLabel = theTarget.firstChild.data;\n var theSlider = theTarget.sliderPanel\n var isOpen = theSlider.style.display!="none";\n // if using default button labels, toggle labels\n if (theLabel==">") theTarget.firstChild.data = "<";\n else if (theLabel=="<") theTarget.firstChild.data = ">";\n // if using default tooltips, toggle tooltips\n if (theTarget.getAttribute("title")=="show")\n theTarget.setAttribute("title","hide");\n else if (theTarget.getAttribute("title")=="hide")\n theTarget.setAttribute("title","show");\n if (theTarget.getAttribute("title")=="show "+theLabel)\n theTarget.setAttribute("title","hide "+theLabel);\n else if (theTarget.getAttribute("title")=="hide "+theLabel)\n theTarget.setAttribute("title","show "+theLabel);\n // deferred rendering (if needed)\n if (theSlider.getAttribute("rendered")=="false") {\n if (config.options.chkDebugLazySliderRender)\n alert("rendering '"+theLabel+"':\sn\sn"+theSlider.getAttribute("raw"));\n var place=theSlider;\n if (theSlider.getAttribute("blockquote")=="true")\n place=createTiddlyElement(place,"blockquote");\n wikify(theSlider.getAttribute("raw"),place);\n theSlider.setAttribute("rendered","true");\n }\n // show/hide the slider\n// DISABLED: animation sets overflow:hidden, which clips nested sliders...\n// if(config.options.chkAnimate)\n// anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));\n// else\n theSlider.style.display = isOpen ? "none" : "block";\n if (this.sliderCookie && this.sliderCookie.length)\n { config.options[this.sliderCookie]=!isOpen; saveOptionCookie(this.sliderCookie); }\n return false;\n}\n//}}}\n// //===
Default description for new context (which you can change by editing the [[NewContextTemplate]]). You can edit this description as you like, but be sure to include the {{{gtdActionList}}} macro somewhere to see the active actions.\n\n<<gtdActionList>>
Default description for new project (which you can change by editing the [[NewProjectTemplate]]). Add actions to the project using the {{{gtdAction}}} macro, or the ".." wikitext notation. Note that actions will be tagged with the project name, so it would look nicer if the project name were somewhat concise.
原来是因为中文加强版的OOo自己使用的libstdc++.so版本与ubuntu 5.10中的不同导致的。\n解决的方法很简单:将OOo自己的libstdc++文件remove掉就可以了。
这个软件做出来的图形效果也很不错。\nhttp://www.chem.gla.ac.uk/~louis/software/ortep3/index.html
Outlook的个人数据文件只可以用来大部分的个人数据信息:如所有收、发的邮件、便笺、联系人等等。但不包括电子邮件帐户的设置。微软的思维逻辑与众不同。\n电子邮件帐户的信息保存在注册表中。如果系统重装或恢复后,自然所有的帐户信息都会丢失。\n在建立了所有邮件帐户信息后,把"HKCU\sSoftware\sMicrosoft\sWindows NT\sCurrentVersion\sWindows Messaging Subsystem\sProfiles\sOutlook"项导出,待需要的时候导入即可。这里面包含的信息有:个人数据文件的路径、电子邮件帐户等等。注意:电子邮件帐户的密码不在此项中保存,导入注册表项后可能需要重新设置一下访问密码。\n
{{{\nI do most crystallographic calculations with PLATON\n(http://www.cryst.chem.uu.nl/platon/), a must-have for any crystallographer,\nwhich will report RMS error, chi-squared test, sum of residuals, distances\nto the plane (with standard deviation) when fitting atoms to a plane,\nline,...\nIt is available for Windows and Unix/Linux, free for Academics; and it can\nbe used both in GUI and text mode.\n}}}\nhttp://www.chem.gla.ac.uk/~louis/software/platon/
<div class='header' macro='gradient vert #000 #464646'>\n<div class='headerShadow'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div class='headerForeground'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n</div>\n<div id='mainMenu' refresh='content' tiddler='MainMenu' force='true'></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{{{\npaste(x, collapse = "")\n}}}\n\n* apply\n{{{\napply(X, MARGIN, FUN, ...)\n}}}\n** X为一矩阵,MARGIN为1,2,分别代表row和col,FUN为施加的函数\n** 下面的例子求S矩阵的行加和向量\n{{{\napply(S, 1, sum)\n}}}\n*从vector a中减去vector b\n{{{\nsetdiff(a,b)\n}}}\n\n*exchange data between R and excel\n{{{\nin R\n > mydata<-read.delim("clipboard")\nto write from R\n > write.table(tab, "clipboard", sep = "\st", row.names = F)\n}}}\n*letters\n26个英文字母向量\n*{{{<<-}}}\n更改全局变量算符\n*runif,rnorm\n返回一随机正态分布的矢量?\naggregate,by,tapply,lapply\n* %%, %/%, round\n求余和整除,四舍五入?\n*怎样使曲线更光滑?\nlines(spline(xfit, yfit))\n*如何捕获命令输出?\noutfile <- file("regsumm.out", "w")\ncapture.output(summary(reg), file=outfile)\nclose(outfile)\n*主成份分析\nprincomp\nvery simple\n*letters and LETTERS(大小写字母数组)\n*进制转换\nintToBits
{{{\npostscript()\nplot ...\ndev.off()\n\nor \npng()\nplot ...\ndev.off()\n}}}
<<list tagged txtGTDReferenceContext any>>
\n!Overdue actions\n<<showReminders leadtime:-365...-1 tag:"action !done" format:"DATE: TIDDLER TITLE">>\n!Actions for today and tomorrow\n<<showReminders leadtime:0...1 tag:"action !done" format:"DIFF: TIDDLER TITLE">>\n!All reminders for the next week\n<<showReminders leadtime:0...7 tag:"!done" format:"DIFF: TIDDLER TITLE">>
{{{\ndata=read.delim("file.txt", header=F, sep="")\n}}}\nsep="" 可以表示多个空格分隔符。\n\n或者使用read.table
<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<upload http://tiddlyspot.com/ybyygu/store.cgi index.html . . ybyygu>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
DAY DAY UP!
沉默的蚊子
The following items are tagged for indefinite future action, using the configuration-specified "someday" context. Note that items here should ''not'' be actions or projects, but rather generic tiddlers with whatever supporting content is appropriate.\n\n<<list tagged txtGTDSomedayContext any>>\n
[[GTDStyleSheet]]\n\n/***\n!Personal preferences\n***/\n\n/*{{{*/\n/* make input fields in viewer (options) show up in correct size */\n.viewer input { font-size: 0.9em; }\n/*}}}*/\n\n
* 如何刷新文件名数据库?\n{{{\nsudo texhash\n}}}\n
/***\n''Name:'' TWUpdate\n''Author:'' Tom Otvos\n''Version:'' 1.0\n\n***/\n//{{{\n\nversion.extensions.twupdate = {major: 1, minor: 0, revision: 0, date: new Date(2006,4,23,0,0,0,0), source: "http://www.dcubed.ca/"};\n\nconfig.macros.twupdate = { \n label: "update",\n sourceUrl: "http://www.tiddlywiki.com/empty.html", \n lingo: {\n prompt: "Update this TiddlyWiki from TiddlyWiki.com", \n warning: "Are you sure you want to update this document with the latest version of TiddlyWiki (and do you know that all your plugins are compatible)?\sn\snIf you want to continue, your document will first be saved with a backup.",\n success: "Update was successful. Click on 'OK' to reload the document",\n errNoHttp: "Unable to allocate an HTTP request object for the update",\n errIncompatible: "This version of TiddlyWiki cannot be updated by this plugin. Sorry.",\n progressLoading: "Getting update from TiddlyWiki.com...",\n progressLoadSuccess: "File successfully loaded",\n progressLoadFailure: "File was not loaded successfully (%0)",\n progressMerging: "Merging with existing document..."\n }\n}\n\nconfig.macros.twupdate.handler = function(place,macroName,params)\n{\n if(!readOnly) {\n var label = params[0] ? params[0] : this.label;\n createTiddlyButton(place, label, this.lingo.prompt, this.onClick, null, null, null);\n }\n}\n\nconfig.macros.twupdate.onClick = function(e)\n{\n if (version.major != 2 || version.minor != 0 || version.revision < 7) {\n alert(config.macros.twupdate.lingo.errIncompatible);\n return;\n }\n \n if (!confirm(config.macros.twupdate.lingo.warning)) return;\n\n try {\n // force a save with backup\n var saveBackups = config.options.chkSaveBackups;\n config.options.chkSaveBackups = true;\n saveChanges();\n config.options.chkSaveBackups = saveBackups;\n \n var ajax = new AjaxHelper();\n displayMessage(config.macros.twupdate.lingo.progressLoading);\n ajax.getText(config.macros.twupdate.sourceUrl, config.macros.twupdate.performUpdate); \n }\n catch (e) {\n alert(e);\n }\n\n return false;\n}\n\n// Courtesy of http://www.worldtimzone.com/res/encode/...\nfunction utf8(wide) {\n var c, s;\n var enc = "";\n var i = 0;\n while(i<wide.length) {\n c= wide.charCodeAt(i++);\n // handle UTF-16 surrogates\n if (c>=0xDC00 && c<0xE000) continue;\n if (c>=0xD800 && c<0xDC00) {\n if (i>=wide.length) continue;\n s= wide.charCodeAt(i++);\n if (s<0xDC00 || c>=0xDE00) continue;\n c= ((c-0xD800)<<10)+(s-0xDC00)+0x10000;\n }\n // output value\n if (c<0x80) enc += String.fromCharCode(c);\n else if (c<0x800) enc += String.fromCharCode(0xC0+(c>>6),0x80+(c&0x3F));\n else if (c<0x10000) enc += String.fromCharCode(0xE0+(c>>12),0x80+(c>>6&0x3F),0x80+(c&0x3F));\n else enc += String.fromCharCode(0xF0+(c>>18),0x80+(c>>12&0x3F),0x80+(c>>6&0x3F),0x80+(c&0x3F));\n }\n return enc;\n}\n\nconfig.macros.twupdate.performUpdate = function(emptyHtml, status, statusText)\n{\n // note that this is begin called from a callback from an event handler, so\n // "this" is most definitely not defined!\n \n if (status == 200)\n displayMessage(config.macros.twupdate.lingo.progressLoadSuccess);\n else {\n displayMessage(config.macros.twupdate.lingo.progressLoadFailure.format([statusText]));\n return;\n }\n displayMessage(config.macros.twupdate.lingo.progressMerging);\n \n // very important...convert the response to UTF-8 to be fully TW-compatible\n var re = /[^\su0000-\su007F]/g ;\n emptyHtml = emptyHtml.replace(re, function($0) {return(utf8($0));});\n \n // the bulk of this is cribbed from saveChanges()...\n var originalPath = document.location.toString();\n // Check we were loaded from a file URL\n if (originalPath.substr(0,5) != "file:") {\n alert(config.messages.notFileUrlError);\n if (store.tiddlerExists(config.messages.saveInstructions))\n displayTiddler(null,config.messages.saveInstructions);\n return;\n }\n var localPath = getLocalPath(originalPath);\n\n // Locate the storeArea div's\n var posOpeningDiv = emptyHtml.indexOf(startSaveArea);\n var posClosingDiv = emptyHtml.lastIndexOf(endSaveArea);\n if ((posOpeningDiv == -1) || (posClosingDiv == -1)) {\n alert(config.messages.invalidFileError.format(['empty.html']));\n return;\n }\n\n // Save new file\n var revised = emptyHtml.substr(0,posOpeningDiv + startSaveArea.length) + \n convertUnicodeToUTF8(allTiddlersAsHtml()) + "\sn\st\st" +\n emptyHtml.substr(posClosingDiv);\n var newSiteTitle = convertUnicodeToUTF8((wikifyPlain("SiteTitle") + " - " + wikifyPlain("SiteSubtitle")).htmlEncode());\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 var save = saveFile(localPath, revised);\n if (save) {\n displayMessage(config.messages.mainSaved, "file://" + localPath);\n store.setDirty(false);\n alert(config.macros.twupdate.lingo.success);\n document.location.reload();\n }\n else\n alert(config.messages.mainFailed);\n}\n\nfunction AjaxHelper()\n{\n this.http = null;\n \n try\n {\n this.http = new XMLHttpRequest()\n }\n \n catch(e)\n {\n // if we don't get an internal object, try allocating it using ActiveX, with successive\n // fallbacks to earlier MSXML versions as necessary\n try\n {\n this.http = new ActiveXObject("Msxml2.XMLHTTP.4.0")\n } \n catch(e) \n {\n try\n {\n this.http = new ActiveXObject("MSXML2.XMLHTTP")\n } \n catch(e) \n {\n try\n {\n this.http = new ActiveXObject("Microsoft.XMLHTTP")\n } \n catch(e) \n {\n this.http = null\n }\n }\n }\n }\n \n if (!this.http) throw 'Unable to allocate an HTTP request object';\n}\n\nAjaxHelper.prototype.getText = function(url, callback, async, force)\n{\n if (!this.http) return;\n if (async == undefined) async = true;\n if (force == undefined) force = false;\n // ??? right now, we are not handling "forced" requests\n this._request("GET", url, callback, async, true, false);\n}\n\nAjaxHelper.prototype.getXML = function(url, callback, async, force)\n{\n if (!this.http) return;\n if (async == undefined) async = true;\n if (force == undefined) force = false;\n // ??? right now, we are not handling "forced" requests\n this._request("GET", url, callback, async, true, true);\n}\n\nAjaxHelper.prototype.getHead = function(url, callback, async, force)\n{\n if (!this.http) return;\n if (async == undefined) async = true;\n if (force == undefined) force = false;\n // ??? right now, we are not handling "forced" requests\n this._request("HEAD", url, callback, async, false, false);\n}\n\nAjaxHelper.prototype.abort = function()\n{\n if (this.http) this.http.abort();\n}\n\nAjaxHelper.prototype.setRequestHeader = function(name, value)\n{\n if (this.http) this.http.setRequestHeader(name, value);\n}\n\nAjaxHelper.prototype._request = function(method, url, callback, async, hasResponse, hasResponseXML)\n{\n if (!this.http) return;\n \n // get reference to request object so we can use it in closure\n var xmlHttp = this.http, helper = this;\n xmlHttp.onreadystatechange = function()\n {\n if (!async) return;\n if (xmlHttp.readyState == 4)\n callback((hasResponse ? (hasResponseXML ? xmlHttp.responseXML : xmlHttp.responseText) : null), xmlHttp.status, xmlHttp.statusText, helper._parsedResponseHeaders());\n }\n \n try {\n // need some cross-domain privileges for Firefox\n try {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n } \n catch (e) \n {\n }\n \n xmlHttp.open(method, url, async);\n xmlHttp.send(null);\n if (!async) callback((hasResponse ? (hasResponseXML ? xmlHttp.responseXML : xmlHttp.responseText) : null), xmlHttp.status, xmlHttp.statusText, this._parsedResponseHeaders());\n }\n \n catch (e)\n {\n alert(e);\n }\n}\n\nAjaxHelper.prototype._parsedResponseHeaders = function()\n{\n if (this.http) {\n var headersArray = new Array();\n var headers = this.http.getAllResponseHeaders().split("\sn");\n for (var i = 0; i < headers.length; i++) {\n var h = headers[i].trim();\n if (h.length == 0) continue;\n // value can have ':' so do not use split here!\n var sep = h.indexOf(':');\n headersArray[h.substring(0, sep).trim()] = h.substr(sep + 1).trim();\n }\n return headersArray;\n }\n else\n return null;\n}\n\n//}}}\n
This is a simple cheat sheet gleened from the [[TiddlyWiki Tutorial|http://www.blogjones.com/TiddlyWikiTutorial.html]]. It's also helpful when you are working on your StyleSheet.\n\n!Text formatting\n|!Example|>|>|!How|\n|''Bold Text''|' ' (without space)|words|' '|\n|==strikethrough text==| ==|words|==|\n|__underlined text__| __|words|__|\n|//italic text//| //|word|//|\n|^^superscript text^^| ^^|words|^^|\n|~~subscript text~~| ~~|words|~~|\n|@@color(green):colored text@@| @@|color(yourcolorhere):words|@@|\n|@@bgcolor(green):Background@@| @@|bgcolor(yourcolorhere):words|@@|\n|{{{Monospaced}}}| {{{|words|}}}|\n|~DewikifyAWikiWord| ~|~WikiLikeWord||\n|[[wikify a word]] | [[|non-wiki words|]]|\n\n!Monospaced block\n{{{\n {{{\n Just a silly example\n }}}\n}}}\n{{{\nJust a silly example\n}}}\n\n!Horizontal line\n{{{\n----\n}}}\n----\n\n!Lists and outlines\n{{{\n* Begin a list\n* List with subitems\n** Sub item 1\n** Sub item 2\n}}}\n* Begin a list\n* List with subitems\n** Sub item 1\n** Sub item 2\n\n!Numbered lists and outlines\n{{{\n# Begin a list\n# List with subitems\n## Sub item 1\n## Sub item 2\n}}}\n# Begin a list\n# List with subitems\n## Sub item 1\n## Sub item 2\n\n!External link\n{{{\n[[alternate text|image URL]]\n[[TiddlyWiki|http://tiddlywiki.com]]\n}}}\n[[TiddlyWiki|http://tiddlywiki.com]]\n\n!Embed image\n{{{\n[img[alternate text|image URL]]\n}}}\n\n!Tables\nYou can create a table by enclosing text in sets of vertical bars (||, or shift-backslash on your keyboard). \n{{{\n|!Headings: add an exclamation point (!) right after the vertical bar.|!Heading2|!Heading3|\n|Row 1, Column 1|Row 1, Column 2|Row 1, Column 3|\n|>|>|Have one row span multiple columns by using a >|\n|Have one column span multiple rows by using a ~|>| Use a space to right-align text in a cell|\n|~|>| Enclose text in a cell with spaces to center it |\n|>|>|bgcolor(green):Add color to a cell using bgcolor(yourcolorhere):|\n|Add a caption by ending the table with a vertical bar followed by a c|c\n}}}\n\n|!Headings: add an exclamation point (!) right after the vertical bar.|!Heading2|!Heading3|\n|Row 1, Column 1|Row 1, Column 2|Row 1, Column 3|\n|>|>|Have one row span multiple columns by using a >|\n|Have one column span multiple rows by using a ~|>| Use a space to right-align text in a cell|\n|~|>| Enclose text in a cell with spaces to center it |\n|>|>|bgcolor(green):Add color to a cell using bgcolor(yourcolorhere):|\n|Add a caption by ending the table with a vertical bar followed by a c|c\n\n!Block quotes\n{{{\n<<<\n"Beware the Jabberwock, my son!\nThe jaws that bite, the claws that catch!\nBeware the Jubjub bird, and shun\nThe frumious Bandersnatch!"\n<<<\n}}}\n<<<\n"Beware the Jabberwock, my son!\nThe jaws that bite, the claws that catch!\nBeware the Jubjub bird, and shun\nThe frumious Bandersnatch!"\n<<<\n\n!Headings\n{{{\n!Heading\n!!Sub-heading\n!!!Sub-heading 2\n!!!!Sub-heading 3\n!!!!!Sub-heading 4\n}}}\n!Heading\n!!Sub-heading\n!!!Sub-heading 2\n!!!!Sub-heading 3\n!!!!!Sub-heading 4
If you are connected to the Internet, you can always get the latest version of this application. There are ''three'' ways you can do this:\n\nClick the following button if you simply want to get the latest changes to any of the core tiddlers that make up this application. These tiddlers are tagged "gtd", and updating in this way will not overwrite any of the core tiddlers that you may have changed unless the core tiddlers are even newer than your changes. This is the recommended way to get updates:\n**<<importUpdates "http://www.dcubed.ca/gtd-update.html">>\n\nClick the following button if you would like to get the latest changes to any of the core tiddlers, but to interactively approve each and every updated tiddler as it is loaded into your system. If there are no updated tiddlers, you will not be prompted and the update will exit quietly:\n**<<importUpdates "http://www.dcubed.ca/gtd-update.html" updates "Update interactively" "Click here to interactively update the application" ask>>\n\nClick the following button if you want to download all of the core tiddlers, regardless of their modification date. Use this to absolutely ensure that you are running with the core application as it was originally written:\n**<<importUpdates "http://www.dcubed.ca/gtd-update.html" all "Update everything">>\n\n''For your safety, your file will be saved and a backup file will be automatically generated before any update is performed.''\n\n!!Update ~TiddlyWiki\nAs a convenience, you can easily update the ~TiddlyWiki core used by this application by clicking on the following button:\n**<<twupdate "Update TiddlyWiki">>\n\nNote that you do not //need// to use this to update ~TiddlyWiki; you can always use [[this technique|http://www.tiddlywiki.com/#HowToUpgrade]]. But a single click seems a whole lot easier!\n\n!!Import and export\nIf you want finer-grained control over moving tiddlers in and out of this system, the following tools will do the job:\n\n** +++[Import...|Import selected tiddlers from another wiki]<<importTiddlers inline>>===\n\n** +++[Export...|Export selected tiddlers from this wiki]<<exportTiddlers inline>>===\n
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |\n| 16/7/2006 13:2:17 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.php|file:///home/ybyygu/notes/store.php]] | | mynotes.html | |\n| 16/7/2006 13:3:11 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . | Ok |\n| 16/7/2006 13:4:18 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.php|file:///home/ybyygu/notes/store.php]] | | mynotes.html | |\n| 16/7/2006 13:4:41 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.php|file:///home/ybyygu/notes/store.php]] | | mynotes.html | |\n| 16/7/2006 13:5:52 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . | Ok |\n| 16/7/2006 13:9:35 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . | Ok |\n| 16/7/2006 19:52:56 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 16/7/2006 19:54:20 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 18/7/2006 22:21:12 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 19/7/2006 14:27:54 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 19/7/2006 14:40:31 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 19/7/2006 21:4:22 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . | Ok |\n| 19/7/2006 21:5:12 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . | Ok |\n| 19/7/2006 21:14:49 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . | Ok |\n| 19/7/2006 21:15:46 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . | Ok |\n| 19/7/2006 22:9:31 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 23/7/2006 11:3:53 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 27/7/2006 9:22:52 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 29/7/2006 14:37:25 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 30/7/2006 21:26:23 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 11/8/2006 12:54:20 | ybyygu | [[mynotes.html|file:///home/ybyygu/notes/mynotes.html]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 17/3/2009 23:40:50 | YourName | [[/|http://tiddlyspot.com/ybyygu/]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 17/3/2009 23:43:12 | ybyygu | [[/|http://tiddlyspot.com/ybyygu/#AdvancedOptions%20%2Fdev%2Fstdout]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |\n| 17/3/2009 23:45:7 | ybyygu | [[/|http://tiddlyspot.com/ybyygu/#AdvancedOptions%20%2Fdev%2Fstdout]] | [[store.cgi|http://tiddlyspot.com/ybyygu/store.cgi]] | . | index.html | . |
/***\n<<tiddler UploadPluginDoc>>\n!Code\n***/\n//{{{\nversion.extensions.UploadPlugin = {\n major: 3, minor: 3, revision: 3, \n date: new Date(2006,6,30),\n type: 'macro',\n source: 'http://tiddlywiki.bidix.info/#UploadPlugin',\n docs: 'http://tiddlywiki.bidix.info/#UploadPluginDoc'\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: 0}, \n date: new Date(2006,3,9)\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: 2, date: new Date(2006,3,11),\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 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 var size = 15;\n if (params[1])\n size = params[1];\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.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\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.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\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 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 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 errorDownloading: "Error downloading",\n errorUploadingContent: "Error uploading content",\n fileNotFound: "file to upload not found",\n fileNotUploaded: "File %0 NOT uploaded",\n mainFileUploaded: "Main TiddlyWiki file uploaded to %0",\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.dirname(storeUrl)]);\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.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 (storeUrl === '') {\n 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 \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 displayMessage(config.macros.upload.messages.aboutToUpload.format([this.dirname(storeUrl)]), this.dirname(storeUrl));\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 if (uploadDir) {\n rssPath = uploadDir + "/" + config.macros.upload.basename(rssPath);\n } else {\n rssPath = config.macros.upload.basename(rssPath);\n }\n displayMessage(config.macros.upload.messages.rssFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+rssPath]), config.macros.upload.dirname(storeUrl)+"/"+rssPath);\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 revised = revised.replace(new RegExp("<title>[^<]*</title>", "im"),"<title>"+ newSiteTitle +"</title>");\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 displayMessage(config.macros.upload.messages.mainFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+toFilename]), config.macros.upload.dirname(storeUrl)+"/"+toFilename);\n var log = new config.macros.upload.UploadLog();\n log.endUpload();\n store.setDirty(false);\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 + ";;\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 var data;\n data = sheader + content + strailer;\n //request.open("POST", storeUrl, true, username, password);\n request.open("POST", storeUrl, true);\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);\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 request.open("GET", document.location.toString(), true);\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()]));\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','');\nconfig.shadowTiddlers.UploadPluginDoc = "[[Full Documentation|http://tiddlywiki.bidix.info/l#UploadPluginDoc ]]\sn"; \n\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////===
[Run]regedit-->\n{{{\nHKEY_LOCAL_MACHINE\sSOFTWARE\sMicrosoft\sWindows NT\sCurrentVersion\sWinlogon\n}}}\n将[AutoAdminLogon]的键值设为1;如果没有此项,则新建之。\n将[DefalutDomainName]设为本机的计算机标识。\n将[DefaultUserName]设为默认登录的用户名。\n将[DefaultPassWord]设为默认登录的用户名密码。\n用户名、密码应该可以为空。\n
Windows麻烦点,启用双网卡,外网网卡设置为DHCP,内网网卡设置为内网IP。\n不要设置内网的网关,否则两个网卡只能用一个。\n这里用到的是两块实实在在的物理网卡,如果添加Windows自带的microsoft loopback虚拟网卡后,还无法做物理双网卡那样正常使用。原因不解。
* /etc/X11/xorg.conf\n## 使用 dpkg-reconfigure xserver-xorg来配置显卡\n一般来说安装都会正确的探测到显卡,并使用合适的显卡驱动。但对于某些显卡少不得还得一些手工干预,比如ATI 的X550。\n##设置正确的驱动:\n{{{\nSection "Device"\n Identifier "ATI Technologies, Inc. Radeon X600 (RV370)"\n Driver "fglrx"\n BusID "PCI:2:0:0"\n ChipID 0x3e50\nEndSection\n}}}\n这里使用到了一个比较特殊的技术:ChipID,用来标识X550显卡。因为显卡探测程序,将我的X550识别为X600了。driver也必须是fglrx而不是ati。\n## 去掉一个会跟fglrx冲突的模块\n{{{\nSection "Module"\n Load "GLcore"\n Load "i2c"\n Load "bitmap"\n Load "ddc"\n Load "dri"\n Load "extmod"\n Load "freetype"\n Load "glx"\n# Load "int10"\n Load "type1"\n Load "vbe"\nEndSection\n}}}\n## 设置正确的显示器刷新参数,这对能否使用到合适的刷新率至关重要。这些数字可以从显示器说明书可网上搜索的到。\n{{{Section "Monitor"\n Identifier "Generic Monitor"\n Option "DPMS"\n HorizSync 30-71\n VertRefresh 50-160\nEndSection\n}}}\n* /etc/X11/gdm/gdm.conf\n这里还需修正一个gdm的bug,启动Xserver 时设置正确的dpi。\n{{{\n[server-Standard]\nname=Standard server\ncommand=/usr/X11R6/bin/X -br -audit 0 -dpi 96\nflexible=true\n}}}
可以很好的与mutt 联合使用。\n\n在mutt中,\n*使用Q 键可以查询联系人\n*使用A 键来添加联系人
* 没有唯一标识,不识别重复联系人\n* 没有锁定机制,会造成联系人丢失\n* 不支持在mutt含空格的字串检索\n* 不支持写lock,当同时开多个abook时会造成数据丢失
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteAction'></div>\n<div class='title' macro='view title'></div>\n<div class='editor' macro='edit title'></div>\n<div class='editor' macro='edit text'></div>\n<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<div class='toolbar' macro='toolbar changeContext projectify -closeTiddler closeOthers +editTiddler permalink references jump'></div>\n<div class='title' macro='view title'></div>\n<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (created <span macro='view created date [[DD MMM YYYY]]'></span>)&nbsp;<span macro='gtdActionCompleted'></span>complete</div>\n<div class='tagging' macro='tagging'></div>\n<div class='tagged' macro='tags'></div>\n<div class='viewer' macro='view text wikified'></div>\n<div class='tagClear'></div><div macro='newReminder'></div>
awk example:\n\nawk '{print $2}' file
* Parameter Expansion\n{{{\n${parameter:-word}\n${parameter:=word}\n${parameter:?word}\n....\n}}}\n\n* $RANDOM是一个内置变量,是一个随机数。\n\n* bash 竟然不支持浮点数运算,可恶!\n变通的方法:\necho "12.8*5"|bc
*使用beep命令也可以奏出美妙的音乐来!\n*好处就在于无声卡的机子也可以播放,也不会受音亮的限制\n{{{\nbeep -f 3100 -l 100 -n -f 2500 -l 100\nbeep -f 1700 -l 100 -n -f 1 -l 110 -n -f 1700 -l 100 \nbeep -f 1000 -n -f 1500 -n -f 2000 -n -f 2500 -n -f 3000\n\nbeep -f 1000 -n -f 1000 -n -f 1500 -n -f 1500 -n -f 1700 -n -f 1700 -n -r 2 -f 1500 -n -f 1350 -n -f 1350 -n -f 1300 -n -f 1300 -n -f 1150 -n -f 1150 -n -f 1000 \n\nbeep -f 496.88 -l 500 # si\nbeep -f 496.88 -l 500 # si\nbeep -f 496.88 -l 500 # si\nbeep -f 496.88 -l 500 # si\nbeep -f 440 -l 500 # la\nbeep -f 392 -l 500 # sol\nbeep -f 392 -l 500 # sol\nbeep -f 370 -l 500 # fa\nbeep -f 329.63 -l 500 # mi\nbeep -f 329.63 -l 500 # mi\nbeep -f 392 -l 500 # sol\nbeep -f 496.88 -l 500 # si\nbeep -f 659.26 -l 500 # mi\nbeep -f 659.26 -l 500 # mi\nbeep -f 659.26 -l 500 # mi\nbeep -f 659.26 -l 500 # mi\nbeep -f 587.33 -l 500 # ré\nbeep -f 523.25 -l 500 # do\nbeep -f 523.25 -l 500 # do\nbeep -f 496.88 -l 500 # si\nbeep -f 440 -l 500 # la\nbeep -f 440 -l 500 # la\nbeep -f 496.88 -l 500 # si\nbeep -f 523.25 -l 500 # do\nbeep -f 496.88 -l 500 # si\nbeep -f 523.25 -l 500 # do\nbeep -f 496.88 -l 500 # si\nbeep -f 622.22 -l 500 # ré dièse\nbeep -f 523.25 -l 500 # do\nbeep -f 496.88 -l 500 # si\nbeep -f 496.88 -l 500 # si\nbeep -f 440 -l 500 # la\nbeep -f 392 -l 500 # sol\nbeep -f 392 -l 500 # sol\nbeep -f 370 -l 500 # fa\nbeep -f 329.63 -l 500 # mi\nbeep -f 370 -l 500 # fa\nbeep -f 370 -l 500 # fa\nbeep -f 370 -l 500 # fa\nbeep -f 370 -l 500 # fa\nbeep -f 392 -l 500 # sol\nbeep -f 370 -l 500 # fa\nbeep -f 370 -l 500 # fa\nbeep -f 329.63 -l 500 # mi\nbeep -f 311.11 -l 500 # ré dièse\nbeep -f 329.63 -l 500 # mi\n}}}
* 点(verticies)\n 在edit模式下,按CTRL+LMB添加点(verticies)\n* 边(edge)\n 在edit模式下,选中两点,按f键
有机会了要试试audacious\nhttp://audacious-media-player.org/Main_Page
# 安装: aptitude install cdargs\n# entter cv进入cv 世界
* source 界面和gdb 界面的切换\n类似于vi 的控制方式:\n{{{\nESV --> source interface\ni --> gdb interface\n}}}\n* 窗口大小的控制\n{{{\n- 减小source 窗口\n= 增加source 窗口\n_ 大减\n+ 大增\n}}}\n* 可以空格键来切换断点\n* 可以用T来切换tty 窗口
设置prompt标志\n\nin chroot enviroment\n{{{\n> vi /etc/chroot\n gentoo-amd64\n}}}\nedit .bashrc
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteContext'></div>\n<div class='title' macro='view title'></div>\n<div class='editor' macro='edit title'></div>\n<div class='editor' macro='edit text'></div>\n<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<div class='toolbar' macro='toolbar newAction -closeTiddler closeOthers +editTiddler permalink references jump'></div>\n<div class='title' macro='view title'></div>\n<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (created <span macro='view created date [[DD MMM YYYY]]'></span>)</div>\n<div class='tagged' macro='tags'></div>\n<div class='viewer' macro='view text wikified'></div>\n<div class='tagClear'></div>
*这个命令来将目录中的文件名转换编码, convmv还可以作大小写的转换\n*示例:\n{{{\nconvmv -f big5-eten -t utf8 -r --notest\n}}}\n*使用iconv做编码转换:\n{{{\niconv -f -t input_file\n-f: from encoding\n-t: to encoding\n}}}\n*比如:\n{{{\niconv -f utf-8 -t gb2312 wget.output\n}}}
*最常用的两个参数:\n{{{\ncrontab -l //列出cron项\ncrontab -e //编辑cron\n}}}\n*example\n{{{\n# minute (0-59),\n# | hour (0-23),\n# | | day of the month (1-31),\n# | | | month of the year (1-12),\n# | | | | day of the week (0-6 with 0=Sunday).\n# | | | | | commands\n*/5 * * * * fetchmail -aKv -m "usr/bin/procmail -d %T" >/dev/null 2>&1\n}}}\n*系统级任务\ngentoo 将几个系统cron任务放到了root帐户下执行,debian中这一切都是在/etc/crontab中设定。
*curl是功能超级强劲的命令行下载工具\n现在还没有发行它下载不了的东西。\n{{{\n使用代理: curl -x proxy_server:proxy_port URL\n使用post: curl -d "name=date" URL\n连接超时: curl -m secons URL\n链接跳转: curl -L URL\nCookies: curl -c /dev/null URL\n局部下载: curl -r 10-100 URL\n}}}
# 如何制作分区的镜像?\n{{{\ndd if=/dev/hda1 of=/mnt/hdb1/backup_dd_hda1.img\n}}}\n# 如何挂载镜像?\n{{{\nmount -o loop /mnt/hdb1/backup_dd_hda1.img /mnt/loop1\n}}}
# 下载debian系统中的debootstrap\n# purge ubuntu系统中的deboostrap,然后安装debian版的debootstrap\n# 准备工作:\n{{{\nsudo mkdir /debian\n}}}\n# 确保debian为一干净的目录\n# 使用debootstrap来安装debian\n{{{\nsudo debootstrap --arch i386 sid /debian/ http://mirror.dlut.edu.cn/debian/\n}}}\n# 复制host系统中的配置文件至debian(应视实际情况而定)\n{{{\n# sudo cp /etc/passwd /debian/etc/\n# sudo cp /etc/shadow /debian/etc/\n# sudo cp /etc/group /debian/etc/\n# sudo cp /etc/sudoers /debian/etc/\n# sudo cp /etc/hosts /debian/etc/\n}}}\n# 为chroot 系统设置共享的文件系统\n{{{\n# vi /etc/fstab\n> /home /debian/home none bind 0 0\n> /tmp /debian/tmp none bind 0 0\n> /dev /debian/dev none bind 0 0\n> /proc /debian/proc proc defaults 0 0\n> /usr/share/fonts /debian/usr/share/fonts none bind 0 0\n# mount -a\n}}}\n# 配置debian系统\n{{{\n# chroot /debian /bin/bash\n# dpkg-reconfigure locales\n# vi /etc/apt/sources.list\n> deb http://mirror.dlut.edu.cn/debian/ testing main non-free contrib\n> deb http://mirror.dlut.edu.cn/debian-security/ testing/updates main\n> deb http://mirror.dlut.edu.cn/debian/ unstable main non-free contrib\n> deb http://debian.info.cernet.cn/debian-uo/ unstable firefly java ustc misc rareware jrfonseca marillat\n\n}}}\n# 为了使host系统更方便的使用chroot中的程序,写一个小程序:\n{{{\n$ vi $HOME/chroot_debian.sh\n> #!/bin/sh\n> /usr/bin/dchroot -d "`echo $0 | sed 's|^.*/||'` $*"\n$ chmod 755 $HOME/chroot_debian.sh\n}}}\n# 为chroot系统设置标记:\n{{{\n# vi /debian/etc/chroot\n> debian-i386\n$ vi $HOME/.bashrc\n> if [ -z "$chroot" -a -r /etc/chroot ]; then\n> chroot=$(cat /etc/chroot)\n> fi\n> PS1="${RED}\su@${BLUE}${chroot:-\sh}:${NC}\sw\sn\s$ "\n}}}\n# 在debian系统中安装程序\n{{{\n$ dchoot -d\n$ sudo aptitude update\n$ sudo aptitude install mplayer \n}}}\n# 将chroot程序链接至host系统中\n{{{\n$ dchroot -d\n# ln -s /usr/bin/mplayer /usr/bin/dmplayer\n$ exit\n# ln -s $HOME/bin/chroot_debian /usr/bin/dmplayer\n}}}
debian runlevel script setup\n\nCopy the /etc/init.d/skeleton file to your own name, edit it as you\nsee fit to do whatever it is you need. Then install the symlinks to\nthe other rc directories.\n\n cd /etc/init.d\n cp skeleton mystartrc\n editor mystartrc\n update-rc.d mystartrc defaults\n\nTo remove the script and symlinks:\n\n cd /etc/init.d\n rm mystartrc\n update-rc.d mystartrc remove
++++![首先安装必须的工具]>\n{{{\nsudo aptitude install dpkg-dev dh-make fakeroot\n}}}\n这是一个不完全的列表,如果使用时缺包再安装就是了。\n===\n++++![步骤]>\n## 在源码目录下执行dh_make\n## 修改debian目录下的rules和control文件\nrules中configure、make、make install都分的很清楚,按照提示修改相应的部分就可以了。\n要点:修改rules文件时注意安装根目录应为 debian/package_name/\n## 编译deb 包可也\n{{{\ndpkg-buildpackage -rfakeroot # 完整版\nfakeroot debian/rules binary # 简化版,只生成deb包。\n}}}\n===\n\n++++![从某个目录来打包]>\n目录结构应遵守某种规范,可参考dh_make打包时生成的debian目录。\n打包命令使用:\n{{{\n# cd 至debian 目录之上\ndpkg-deb -b debian foobar.deb\n}}}\n===
dos2unix & unix2dos\n{{{\naptitude install sysutils\n}}}
dpkg -i foobar.deb\n这个用来安装软件\n\ndpkg -S foobar\n这个用来搜索到底是哪个软件包拥有这个文件\n\ndpkg -L foobar\n这个则相反,用来列出软件包安装的文件\n
Creative audiopci ES1371, ES1373
* Talk of the devil and he will appear\n说曹操,曹操就到。\n\n* zombie computer\n电脑僵尸,一个极其专业的词汇\n\n* idol\n偶像\n\n* true to form\n带有负面意味的一如继往\n\n* put one's best foot forward\n全力以赴\n\n* phlegmatic\n是人的一种类格,温和的,冷静的\n\n* indecisive\n说的不是我吧?\n\n* Free Software: "You don't pay back, you pay forward."\n -- Robert A. Heinlein\n\n* //''dandruff''// 头皮屑\n\n* GTK+ was created as a //''spin-off''// of another well-known open source project: the GNU Image Manipulation Program (GIMP).\nspin-off 副产品\n\n*Is there a way around this? # 指解决问题的方法\n\n*Sorry for the late reply on this message\n\n*dog and pony show # 盛大表演\n\n*glacial # 冰川期的\n\n*Still, this begs the question. What is an object?]\nbeg,一个非常形象的词\n\n*wean\n使断奶, 使丢弃, 使断念.\nwean yourself away from something\n\n*proprietary\n所有者, 所有权
* 首先安装exim4,注意:这可不是exim\n{{{\naptitude install exim4 exim4-config\n}}}\n* 配置exim4\n{{{\ndpkg-reconfigure exim4-config\n}}}\n## 配置exim4使用单个文件的配置文件;\n## 配置exim4使用smarthost来发送外部邮件;\n## 添加smarthost主机相关信息,比如smtp.eyou.com;\n* 编辑exim4的配置文件/etc/exim4/exim4.conf.template\n{{{\nAUTH_CLIENT_ALLOW_NOTLS_PASSWORDS='true'\n# Because AUTH PLAIN and AUTH LOGIN send the password in clear, we\n# only allow these mechanisms over encrypted connections by default.\n# You can set AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS to allow unencrypted\n# clear text password authentication on all connections.\n}}}\n* 编辑/etc/exim4/passwd.client 添加外部smtp信箱的验证信息\n格式如下:\n{{{\nsmtp.eyou.com:ybyygu:password\n}}}\n
这个用于生成平面网点。\n{{{\nx=1:10\ny=1:10\ngrid=expand.grid(list(x=x,y=y))\n}}}\n这在画三维图时有用。
# 对码表源文件的要求:\n## 编码为GB18030\n## 不能有重复的编码项\n# 编译方法\n{{{\ntxt2mb sourcefile targetfile\n}}}
fetchmail这个程序看起来很不经眼,想不到它的作者竟是大名鼎鼎的Eric Raymond。\n使用fetchmail的时候遇到很多问题,最终都通过某些设置解决了,这个程序毕竟是经受过时间的考验的。\n\n第一个问题:无法收取大邮件\n第二个问题:邮件重复\n第三个问题:maildrop无法投递
用于删除win生成的缩略图文件。路径中有特殊字符的处理方法(有更好?)\n{{{\nfind . -name Thumbs.db -printf '"%p" \sn' |xargs rm\n}}}\n\nfind . -type f -name '*.c' -print0 | xargs -0 grep "whatever"\n\nThe 'find' command doesn't actually look at the contents of\nfiles. It can find you a file by filename, by date of\ncreation, but permissions and so forth, but it won't\nactually look in the file. For that you need grep. If you\nwanted to search inside all the files named '*.c' for the\nstring '#include', say, you'd do something like so:\n\nfind . -name '*.c' -exec grep -H '#include' '{}' \s;\n\nIf you don't mind searching within *all* the files beneath\nyour current directory, you could use a much simpler\ncommand:\n\ngrep -r '#include' .\n\n'find' and 'grep' are perhaps the two most valuable tools in\nthe UNIX toolkit. They're definitely worth getting to know.
中英文是分开设置的。默认下,中文与英文使用不同的字体设置。
{{{\nbookmarks.html\ncert8.db\ncompreg.dat\ncookies.txt\nformhistory.dat\nhistory.dat\nkey3.db\nsignons.txt\n}}}
Google Talk使用了Jabber协议,因此linuxfans可以很happy地使用google的服务,设置如下:\n\n登入选项\n协议:Jabber\n用户名:gmail邮箱前缀\n服务器:gmail.com\n资源:google talk\n密码:gmail邮箱密码\n\n显示主要选项:\nJabber选项\n选中“若可用则使用tls和允许在不加密流上的纯文本验证\n端口:5222\n连接服务器:64.233.167.125
gview03 也可以单独操作分子fragement, alt + 鼠标. \n从gview03的帮助里看来的, 以前一直是导出到其它工具里做, 浪费了不少的时间和精力. 这再次证明了细读帮助手册的重要性.
# 更改运行时变量值\n{{{\nprint var=value\n}}}\n# 如何debug子进程?\n{{{\nset follow-fork-mode child\n}}}\n# attach到某个进程后调试\n{{{\ncgdb ./dchroot pid\n}}}\n# 观测变量\n{{{\nprint var\nprint array[0]\nprint array[0]@5 # 一次显示5个数组元素\ndisplay var # 运行时自动显示\n}}}
*gdm是桌面登录管理器\n*X服务器的管理\n{{{\n/etc/init.d/gdm restart\n}}}\n*在800X600的分辨率下需要固定X显示的dpi,以避免引起显示不一致。\n{{{\n*/bin -audio -dpi 96\n}}}
!gentoo软件包管理\n# 使用emerge 来下载、编译、安装软件包,比如:\nemerge foobar\n# 使用ebuild来管理单独的软件包,比如:\nebuild foo-bar.ebuild unpack\nebuild foo-bar.ebuild compile\n使用时要切换到foo-bar.ebuild所在目录下\n# 编译时的选择使用USE来控制\n*安装 gentoolkit\n{{{\n# emerge --usepkg gentoolkit\n}}}\n*使用 etcat 来查看已用的 USE 标识\n{{{\n# etcat uses gnumeric\n}}}
! 如何播放gif动画?\n animate是imagemagick套件中的一个小工具,用来播放动画倒也不错。\n Gnome下可以用 gthumb\n KDE 下可以用 gwenview 或 showimg\n .Net 的可以用 f-spot\n konqueror 和 firefox 等web浏览器也可\n! 如何制做gif动画?\nconvert -adjoin -loop 0 -delay 100 * animation.gif\n将当前目录下所有图片,连接成帧之间暂停一秒,无限循环的gif动画。\n{{{\nconvert a.png -background '#FFFFFF' -flatten -transparent '#FFFFFF' a.gif\ngifsicle -O2 -D bg -d 15 --colors 256 --loopcount=0 *.gif > ../aa.gif\n}}}\n\n{{{\nimage = pdb.gimp_file_load("/home/ybyygu/a.png", "")\ndrawable = pdb.gimp_image_get_active_drawable(image)\npdb.plug_in_semiflatten(image, drawable)\npdb.gimp_image_convert_indexed(image, 1, 0, 255, 0, 1, "")\npdb.gimp_file_save(image, drawable, "/home/ybyygu/b.gif", "")\n}}}
{{{\nglxgears -iacknowledgethatthistoolisnotabenchmark \n}}}
* 设置图形引擎:\n{{{\nset term x11\nset term svg\n...\n}}}\n* 设置输出文件\n{{{\nset output "file.ext"\n}}}\n* 指定坐标范围:\n{{{\nset xrange [from:to]\n}}}\n* 直接在plot 函数中指定范围\n{{{\nplot [from:to] sin(x)\n}}}
google toolbar的字词翻译器似乎在amd64下无法工作。
egrep -o "regexp" ...\n使用-o选项来提取匹配模式的字串\n\n-i 忽略大小写
grub-install /dev/sda\nupdate-grub\n\ngrub-set-default\n这个跟menu.lst里的savedefault选项有关。
{{{\nhttp://ubuntu.mirrors.tds.net/ubuntu/dists/dapper/main/installer-i386/current/images/hd-media/\n}}}
可以使用hdparm来测试硬盘速度\n{{{\nhdparm -t /dev/sda1\n}}}
* 需要下载三个文件,分别为foo.dsc foo.diff.gz foo.orig.tar.gz\n{{{\ndpkg-source -x foo_version-revision.dsc\n}}}\n* 或者使用\n{{{\napt-get source foobar\n}}}\n* 安装依赖包\n{{{\napt-get build-dep foobar\n}}}\n* 编译源码\n{{{\ndpkg-buildpackage -rfakeroot -b\n}}}
make-kpkg clean\nfakeroot make-kpkg --append-to-version=-20051001 --revision=1.0 kernel_image --initrd binary\n\nDebian kernel-image file names have the form\nkernel-image-(kernel-version)(--append-to-version)_(--revision)_(architecture).deb
{{{\niptables --list\n列出现有规则\n\niptables -F\n清除现有规则\n\niptables -P INPUT DROP\n设置INPUT和OUTPUT链的默认规则为DROP,既不允许任何包到达本机,也不允许本机向外发包\n\niptables -P INPUT ACCEP\n}}}
网络连接信息监视工具
all in mkisofs\n*isovfy\niso完整性校验工具\n*isoinfo\niso信息汇总。\n
{{{\njar -c -M directory/ > file.jar\n}}}\n这在firefox 的xpi 插件中会用得到。
* 安装\n 安装java相应版本的deb包\n* 运行环境设置\n{{{\nexport CLASSPATH="/usr/lib/j2sdk1.5-sun/lib/"\nexport JAVA_HOME="/usr/lib/j2sdk1.5-sun/"\n}}}\n* java 1.5 的中文设置\n/usr/lib/j2re1.5/jrelib/fonts目录下建立一个fallback子目录,并把中文字体文件拷贝或链接到该目录中即可
编辑 /etc/jesred.rules\n{{{\n# for google cache\nregexi ^http://[0-9]+\s.[0-9]+\s.[0-9]+\s.[0-9]+/search\s?q=cache(.*) http://66.102.7.104/u/berkeley?q=cache\s1\n}}}\n{{{\n# for wikipedia\nregexi ^http://en.wikipedia.org/(.*) http://www.78y.net/nph-internetproxy.cgi/010100A/http/en.wikipedia.org/\s1\n}}}
latex编辑软件
一个类例于total cmd的KDE 程序。\n放在这里做个记号吧!
* 安装之:\n{{{\nsudo aptitude install slapd\n}}}\n* 使用之\n默认下已可使用ldap服务了。\n几个关键点:\n## 本地IP\n## basedn: dc=localdomain\n## bind as: cn=admin,dc=localdomain\n* 其它配置:\n编辑 /etc/ldap/sldap.conf\n{{{\nrootdn "cn=admin,dc=localdomain"\nrootpw "password"\n}}}\n* 可使用ldap服务的邮件客户端:oe, thunderbird\n二者与ldap的整合度都较差,远不如kmail,kmail甚至支持ldap的写入。\n* slapdcat \n用于导出ldif数据\n*slapd -l foo.ldif\n用于导入ldif数据
{{{\ngrowisofs -speed 4 -Z /dev/dvd -joliet-long -r media/dvd/\n}}}\n使用-speed 设定记录速度。使用growisofs 可以路过制作iso 文件这一步了。\n\n{{{\ngrowisofs -dvd-compat -speed 8 -Z /dev/dvd=pedia.iso\n}}}\n这个可用来刻录iso 镜像文件。\n\n* GUI 工具\n## nautilus-cd-burner\ngnome 出品,简单的过份,可控制的选项太少,少到让人生气的程度。\n## k3b\nkde 出品,非常专业的工具。推荐以后使用。\n## GnomeBaker\n相当的不错,是首选。
Linux下最奇妙的事莫过于它可以删除任何文件,而绝不理会这个文件是否正在被读被写等等等等。也许这会让事实变得简单、方便,但从Windows过来的人对此会有些不安吧?想想吧,当你删除掉一首正在听着的MP3时,你会讶异的发现,这个文件真的不见了,虽然你还在听着它。真有点像是幽魂野鬼,明明没有了实在,但却透着声响哪。\n更古怪的是,这个没有实在的文件,可以活活的好好的,如果有机会将它再存一份的话,它还会得到再生,但当主进程一结束,一切都真的消失的无影无踪了。
用于输出版本信息\n{{{\n$ lsb_release -a\n\nLSB Version: n/a\nDistributor ID: Ubuntu\nDescription: Ubuntu (The Breezy Badger Release)\nRelease: 5.10\nCodename: breezy\n\n}}}
!mkisofs制作iso镜像文件 \n \n 原来命令行用起来也很舒服 ;-)\n  以下是几个得到成功检验的参数:\n  mkisofs -l -J -r -o isofile.iso directory_path/\n  参数释义:\n  \n   * -J Generate Joliet directory records in addition to regular iso9660\n   file names. This is primarily useful when the discs are to be\n   used on Windows-NT or Windows-95 machines. The Joliet filenames\n   are specified in Unicode and each path component can be up to 64\n   Unicode characters long. Note that Joliet is no standard - CD's\n   that use only Joliet extensions but no standard Rock Ridge\n   extensions may usually only be used on Microsoft Win32 systems.\n   Furthermore, the fact that the filenames are limited to 64\n   characters and the fact that Joliet uses the UTF-16 coding for\n   Unicode characters causes interoperability problems.\n  \n   -l Allow full 31 character filenames. Normally the ISO9660 file-\n   name will be in an 8.3 format which is compatible with MS-DOS,\n   even though the ISO9660 standard allows filenames of up to 31\n   characters. If you use this option, the disc may be difficult\n   to use on a MS-DOS system, but this comes in handy on some other\n   systems (such as the Amiga). Use with caution.\n  \n   * -R Generate SUSP and RR records using the Rock Ridge protocol to\n   further describe the files on the iso9660 filesystem.\n  \n   -r This is like the -R option, but file ownership and modes are set\n   to more useful values. The uid and gid are set to zero, because\n   they are usually only useful on the author's system, and not\n   useful to the client. All the file read bits are set true, so\n   that files and directories are globally readable on the client.\n   If any execute bit is set for a file, set all of the execute\n   bits, so that executables are globally executable on the client.\n   If any search bit is set for a directory, set all of the search\n   bits, so that directories are globally searchable on the client.\n   All write bits are cleared, because the CD-Rom will be mounted\n   read-only in any case. If any of the special mode bits are set,\n   clear them, because file locks are not useful on a read-only\n   file system, and set-id bits are not desirable for uid 0 or gid\n   0. When used on Win32, the execute bit is set on all files.\n   This is a result of the lack of file permissions on Win32 and\n   the Cygwin POSIX emulation layer. See also -uid -gid,\n   -dir-mode, -file-mode and -new-dir-mode.\n  \n   -f Follow symbolic links when generating the filesystem. When this\n   option is not in use, symbolic links will be entered using Rock\n   Ridge if enabled, otherwise the file will be ignored.\n  \n   -o filename\n   is the name of the file to which the iso9660 filesystem image\n   should be written. This can be a disk file, a tape drive, or it\n   can correspond directly to the device name of the optical disc\n   writer. If not specified, stdout is used. Note that the output\n   can also be a block special device for a regular disk drive, in\n   which case the disk partition can be mounted and examined to\n   ensure that the premastering was done correctly.\n
使用命令行来听歌是一种享受\n*实现循环乱序播放\n**把*.mp3 存在一个列表中,比如all.list\n{{{\nfor f in *.mp3;do echo $(pwd)/$f >>all.list; done\n}}}\n**执行如下命令\n{{{\n$mpg123 -@ mp3.list -Z 2>/dev/null &\n}}}\n*ogg123\n在linux下用ogg格式来存放歌曲是个比mp3更好的选择。虽然mp3更普及一下,但mp3的tag里不保存与编码相关的信息,很容易出现乱码的情况。ogg没有这个问题,而且在音质上可选择的余地也大。
* T键打开置顶模式\n\n* mplayer 播放DVD\nmplayer -dvd-device /dev/dvd dvd://1\ndvd-device后可跟目录\ndvd://后为DVD的章节\n\n*mplayer 截屏方法\n比如说 mplayer ,想要截取图像,就得暂时把 mplayer 的影片输出改为 X11\n如果你的 mplayer 没那么老的话(啥时候加入的忘记了……),在配置文件里面加入\nvf=screenshot=1\n\n播放的时候按 s 截图,保存在当前目录。
sub似乎要求字幕文件与avi文件同名,否则无法加载字幕,mplayer的字幕模糊搜索选项在此无效。
# thread的使用\n{{{\n& link threads\n# break threads\n}}}\n# 批量删除重复的邮件\n{{{\nT\n~=\n;d\n}}}\n# 如何将spamassassin处理过的垃圾还原?\n## 按e键编辑邮件;\n## 在vim中做如下操作:\n{{{\n:%!spamassassin -d\n:wq\n}}}\n## 完成\n# mutt 与abook的联合使用\n## 在mutt中添加联系人:\n使用A 键来完成此任务\n## 在mutt 中联系人的自动完成及搜索\n方法1:在index 模式下按Q 键,搜索相关的联系人,然后再开始写邮件;\n方法2:按m 键,输入联系人的部分信息,这是按^T键来完成联系人的搜索。\n# gpg 的使用
在二十一世纪杀人网络中连同SSH1的32位元循环冗余校验漏洞被崔妮蒂用以入侵发电站的能源管理系统。\n
* 使用online+nslookup为关键词可以google到很多在线的域名解析服务\n\n* 这几天总有一件奇怪的事:每到晚上10点以后天涯就无法访问。后来发现是DNS出了问题。真不明白为什么每天这个时段兰大的DNS就无法解析天涯的IP了呢?只好另找几个可用的DNS服务器,临时凑数了。以下是用nslookup验证过的(nslookup www.tianyaclub.com SERVER)\n{{{\n202.102.227.68\n202.96.128.68\n202.96.75.68\n61.139.2.69\n202.102.152.3\n202.100.4.15\n202.98.96.68\n}}}\n
*CERNET时间服务提供者列表 \n[[http://www.time.edu.cn/mem.htm]]\n\n{{{\n  级 域名 地理位置 负责人 邮件 电话\n  1 s1a.time.edu.cn 北京邮电大学 王振华 wzhdl at bupt.edu.cn 010-62283044-8003\n  1 s1b.time.edu.cn 清华大学 李艳玲 liyl02 at mails.tsinghua.edu.cn 010-62792161-204\n  1 s1c.time.edu.cn 北京大学 马皓 mah at pku.edu.cn 010-62753007\n  1 s1d.time.edu.cn 东南大学 徐加羚 jlxu at njnet.edu.cn 025-3794342-309\n  1 s1e.time.edu.cn 清华大学 刘亚娟 liuyj at cernet.edu.cn 010-62784049\n  2 s2a.time.edu.cn 清华大学 李艳玲 liyl02 at mails.tsinghua.edu.cn 010-62792161-204\n  2 s2b.time.edu.cn 清华大学 李艳玲 liyl02 at mails.tsinghua.edu.cn 010-62792161-204\n  2 s2c.time.edu.cn 北京邮电大学 王振华 wzhdl at bupt.edu.cn 010-62283044-8003\n  2 s2d.time.edu.cn 西南地区网络中心 刘瑶 nic at cdnet.edu.cn\n  2 s2e.time.edu.cn 西北地区网络中心 丁惠宁 dhn at xanet.edu.cn 029-2669037\n  2 s2f.time.edu.cn 东北地区网络中心 毛宇 maoy at neu.edu.cn 024-23966854\n  2 s2g.time.edu.cn 华东南地区网络中心 瞿庆海 qqh at sjtu.edu.cn 021-62932901-8101\n  2 s2h.time.edu.cn 四川大学网络管理中心 郑炳伦 zhengbl at scu.edu.cn 028-85414820\n  2 s2j.time.edu.cn 大连理工大学网络中心 于广辉 ygh at dlut.edu.cn 0411-4708642\n  2 s2k.time.edu.cn CERNET桂林主节点 胡进坤 jinkun at mailbox.gxnu.edu.cn 0773-5845246\n  2 s2m.time.edu.cn 北京大学 马皓 mah at pku.edu.cn 010-62753007\n}}}\n*linux中可使用ntpdate 来完成网络授时过程。\n{{{\nntpdate ntpserver\n}}}
一个用来压制ogg格式音频的工具。\n{{{\noggenc -q 8 file.wav\n # 用q来指定压制质量,可选范围1-10,默认值为3,也有人推荐用8的。\n #+ 据说此时的压制音质可达到平均256kbps以上,音质几可与无损压缩\n #+ 叫板。\n}}}
*怎么使用patch命令来给源码打补丁?\n{{{\npatch -p num < patchfile\n}}}\n*解释:\npatchfile对应于补丁文件。\nnum常数相对更加重要,至于具体的数值则取决于当前所在的目录了。\npatch -p0 对于使用全路径\npatch -p1 去掉第一层目录\n\n一般而言,比如给linux内核打补丁,当前所在目录与内核目录在同一目录下,则可以使用p0\n如果当前目录在内核目录下,则可以使用p1。\n如果出错可以查看patch信息的目录名称,再做相应的改动。
diff -Nur linux-2.4.15 linux\n\n参数N表示如果某个文件仅在一个目录中出现,则假定其在另一个目录中为空文件;u表示unified格式,r表示在目录中嵌套使用,linux-2.4.15显然是老核的目录名,而linux则为新核的目录名。
{{{\nfoxit reader\npdfcreator\n}}}\n前者是个阅读器,启动速度比acroreader 快很多。后者是个pdf生成工具,还是开源的。
安装ptkdb\n{{{\n sudo aptitude install libdevel-ptkdb-perl\n}}}\n\n{{{\nperl -d:ptkdb perlfile\n}}}\n这是一个tcl/tk程序,scim输入法无法使用。只能通过中键粘贴的方式输入。
如下参数打开png输出,色深32位,打开Alpha通道。\n{{{\npovray +H%h +W%w -I%s -O%s.png +FN32 +D +X +A +UA\npovray +H2064 +W2007 -I%s -O%s.png +FN32 +D +X +A +UA\n}}}\nvmd里做动画的代码:\n{{{\n# 做旋转动画\nfor { set i 0 } { $i < 360 } { incr i 10} { \nrotate y by 10\nset filename [format "%04d" $i].pov\nrender POV3 $filename\n} \n\n# 批量载入文件\nfor { set i 0 } { $i <= 9 } { incr i} { \nmol addfile $i.mol2\n}\n\n# 逐帧动画\nset num [molinfo top get numframes]\n# loop through the frames\nfor {set i 0} {$i < $num} {incr i} {\nanimate goto $i\ndisplay update \nset filename [format "%02d" $i].pov\nrender POV3 $filename\n}\n\n}}}
编辑 /etc/privoxy/config\n{{{\nforward-socks4a / 127.0.0.1:9050 .\n}}}
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteProject deleteProjectAll'></div>\n<div class='title' macro='view title'></div>\n<div class='editor' macro='edit title'></div>\n<div class='editor' macro='edit text'></div>\n<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<div class='toolbar' macro='toolbar newProjectAction -closeTiddler closeOthers +editTiddler permalink references jump'></div>\n<div class='title' macro='view title'></div>\n<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (created <span macro='view created date [[DD MMM YYYY]]'></span>)</div>\n<div class='tagged' macro='tags'></div>\n<div class='viewer' macro='view text wikified'></div>\n<div class='tagClear'></div>
使用python来重写那几个与代理相关的程序。\npython-curl应该很不错。
解决方案\n编辑 /usr/bin/realplay\n加入如下内容:\n{{{\nexport GTK_IM_MODULE="xim"\n}}}
编辑 /usr/bin/realplay,添加如下内容即可。\n{{{\nexport GTK_IM_MODULE="xim"\n}}}
使用rename来批量重名文件\n\n* 去除文件名中的换行符\n{{{\nrename 's/\sr|\sn/g/' *\n}}}
* 功能:重命名多个文件\n* 语法:rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]\n* 实例:\n##去掉.bak 文件后缀\n{{{\nrename 's/\s.bak$//' *.bak\n}}}\n## 将文件名中的大写转换为小写\n{{{\nrename 'y/A-Z/a-z/' *\n}}}
{{{\nupdate-rc.d something defaults\n}}}
正态分布函数,应该类似于电子表格软件中的rand函数\n{{{\nrunif(n=150,min=-1,max=1)\n}}}
# 安装软件包\n{{{\naptitude install samba\n}}}\n# 配置 samba\n{{{\nsudo vi /etc/samba/smb.conf\n}}}\n做两项更改\n## 打开主目录共享,打开写权限\n## 修改mask 值为755\n# 添加用户\n{{{\nsmbpasswd -a username\n}}}\n# restart service\n{{{\n/etc/init.d/samba restart\n}}}\n
*''可以理解为一个session容器''\n*''最常用的功能''\n{{{\n^+a,d # 断开会话\nscreen -r # 重新接入会话,如果有多个已断开的会话,则出理多个会话的列表i;\n #+ 此时可用screen -r session-name接入指定会话\nscreen -d # 断开某个已连接的会话\n^+a,H # 将会话输出记录到log文件\n}}}\n*''进入screen session后无法使用滚动条'':将下面内容加到screenrc文件中\n{{{\n termcapinfo xterm ti@:te@\n}}}
* 在sed中使用变量\n使用双引号来圈起代码,s操作符后可以跟不同于/的分隔符,这在替换路径时很有用。\n{{{\nsed -e "s:$var:foobar:" file\n}}}\n* 用来印出指定行号的字符串\n{{{\nsed -n "linenumber p" file\n}}}\n* 在指定行号下添加相关的字符串\n{{{\nsed '9 a librv:1124$squid_tor' somefile\n}}}
记上一笔,地址在这:\nhttp://www.acmeconsulting.it/SquidNT/
可以自己写,但用标准工具更好、更方便些。\n{{{\nsudo aptitude install jesred\nvi /usr/share/doc/jesred/README.Debian\n}}}\n\nhttp://www.linofee.org/~jel/webtools/jesred/\n\n
* 监听端口\n{{{\nhttp_port 1124\n}}}\n* 主机名\n{{{\nvisible_hostname localhost\n}}}\n* URL重写\n首先安装jesred,另见[[jesred的配置]]\n{{{\nredirect_program /usr/lib/squid/jesred\n}}}\n* 转发控制\n与privoxy配合使用,另见[[privoxy的配置]]\n{{{\ncache_peer localhost parent 8118 7 no-query default\nacl wiki dstdomain .wikipedia.org\nacl wordpress dstdomain .wordpress.com\nacl blogspot dstdomain .blogspot.com\nalways_direct deny wiki\nalways_direct deny wordpress\nalways_direct deny blogspot\nalways_direct allow all\n}}}\n* 其它\n{{{\ncache_mgr ybyygu_at_gmail.com\n}}}\n
* 如何在windows下访问内网的rdp服务?\n还是得用ssh 的端口转发功能,不过这次不能转发到本地来,因为windows很笨,不允许登陆到本地的3389端口。所以需要将内网的3389端口转到ssh 服务器的3389上。\n##首先ssh 到ssh_server上\n{{{\nssh ssh_server\n}}}\n## 然后再通过本地的ssh服务将内网的3389转发到ssh_server(也就是本地)的3389上。\n{{{\nssh -N -L ssh_server:3389:192.168.0.1:3389 127.0.0.1\n}}}\n* \n 今天宿舍里用Rdesktop时,突然从远程桌面连接中退了出来,奇哉怪也?难道实验室又停电了?折腾了一阵子,发现其它几台Linux主机都是好着的,就是那几台Windows的远程桌面连不过去。\n少不得又得跑一趟了。一顿小跑过去,发现实验室里的几台机子远程桌面一切正常!\n现在总算明白了:宿舍跟实验室的IP不是一个网段的。在宿舍那个IP段里远程桌面的3389端口网关被屏蔽了。现在用得上SSH的端口转发了:\n{{{\nssh -N -L 3389:physchem:3389 librv\n | | | |\n local port(any)| | |\n RDP server | |\n RDPport \n |\n 用来端口转发的主机 \n}}}\n\n然后用Rdesktop连接到本地的3389端口即可。\n有点用代理的味道。 \n主体思想是通过librv的ssh隧道功能将内网的physchem的3389端号转发到本地来。\n\n* ssh 排错\n使用 ssh -v 或者 ssh -vv
* 要点:\n## 参数要加到备份目录之前\n比如\ntar cvzf somefile.tar.gz --exclude=*.chk somedir\n## f参数后一般要接存档文件名\n* 列出tar归档文件\n{{{\ntar -tf foo.tar\ntar -tzf foo.tar.gz\n}}}\n* 提取特定文件\n## 可以这样来\n{{{\ntar -xvzwf foo.tar.gz -C somewhere/\n}}}\n用w参数来指定tar与用户交互要解压哪个文件。\n## 也可以指定要释放的文件\n{{{\ntar -xvf foo.tar.gz *.txt\n}}}\n\n* 系统备份\ntar cvpzf /someplace/somefile.tar.gz \s\n--exclude=/proc \s\n --exclude=/lost+found \s\n--exclude=/sys \s\n--exclude=/home \s\n--exclude=/usr \s\n--exclude=/chroot \s\n--exclude=/boot \s\n--exclude=/media \s\n--exclude=/gentoo \s\n--exclude=/backup /tar: --exclude=*.chk:无法 stat: 没有那个文件或目录\n
主要是针对linux系统而言,具体来说是debian下tetex的中文化,之所以有这些针对性没有什么特别的,因为我用的就是tetex,呵呵!\n\ntex安装完成后,制作中文文档需要做一些配置。对于debian下安装的tetex,中文化可\n分为一下三步:\n1.安装CJK软件包\n2.生成中文字体\n3.设置字体配置文件\n\n\n一、安装CJK软件包\napt-get install cjk-latex\n\n\n二、生成中文字体\n下载gbkfonts程序和字体simsun.ttf、simli.ttf、simhei.ttf、simkai.ttf、simfang.ttf、simyou.ttf……等等TrueType字体,采用以下命令:\ngbkfonts simsun.ttf song\ngbkfonts simli.ttf li\n………………\n等等生成Type1字体文件,和一些配置文件。(所有这些*.ttf文件都可以在windows的系统文件中找到,或者是对应的*.ttc文件,直接重命名为*.ttf即可)\n\n\n三、设置字体配置文件\n生成了上述字体后,还需要配置一下,这样Tex才能找到所需要的字体。\n\n1.将gbkfonts新生成的所有文件和目录拷贝到/usr/local/share/texmf中。\n\n2.让dvips使用Type1中文字体:\na) TeX 首先生成 dvi 文件,然后 dvi 可以被 dvips 这样的程序转成 PostScript(*.ps)或者被 dvipdfm 或 dvipdf 转换成 PDF。\nb) LaTeX 在生成的 dvi 文件里记录的汉字名称叫做 gbksong01,gbksong02, ...而不是在 begin{CJK}{song} 里指定的那个 "song",这是很容易混淆的。"song" 根据你使用的汉字不同,被CJK的fd文件映射为了 gbksong01, gbksong02...\nc) dvips 要使用汉字,就必须让 dvips 知道 Type1 字体在哪里。\nd) dvips 通过 cjk.map 来找到字体,cjk.map 是在第二步用 gbkfonts 生成 Type1字体时生成的文件,我们必须在 dvips 的配置文件中指定 cjk.map\ne) 在/usr/local/share/texmf/dvips/下新建一个目录,名为config。\nf) 把 gbkfonts 生成的 cjk.map 文件复制到刚才建立的 config 目录下,并将/etc/texmf/dvips 目录下的 config.ps 也复制到 这个 config 目录下,并在复制过来的 config.ps 文件中加入一行:\np +cjk.map\n\n说明:\na) /etc/texmf/ 一般称为 TEXMFMAIN 目录,保存着安装 tetex 时,自带的配置文件,而 /usr/local/share/texmf/ 一般称为 TEXMFLOCAL 目录,可以定制自己的配置文件,且重装 tetex 时不会删除掉,可以继续用。\nb) config.ps 文件中指定 dvips 使用的 cjk.map,可以不必把 cjk.map 文件复制到本目录下,只要在 config.ps 中指定 cjk.map 的位置即可。如:\np +/usr/local/share/texmf/cjk.map\nc) cjk.map 是一个映射文件。\nd) dvipdf 实际上利用的是 dvips,所以它和 dvipdfm 很不一样。\n\n3.dvipdfm-CJK 使用 Type1 中文字体:\ndvipdfm-CJK 是支持中日韩字体的 dvipdfm,它同样需要通过映射文件来找到名字对应的字体文件,需要哪些映射文件是在 $TEXMFLOCAL/dvipdfm/config/ 下由config 文件指定的。这和dvips 相似。如果你没有,就把 $TEXMFMAIN/dvipdfm/ 下的 config 文件拷贝过来,在复制过来的 config 文件中加入一行:\nf cid-x.map\n同样由于没有指定 cid-x.map 所在的目录,默认就在本目录下,所以应将 gbkfonts 生成的 cjk.map 文件复制到 $TEXMFLOCAL/dvipdfm/config/ 下。\n\n4.pdflatex 直接使用 Type1 中文字体:\n方法基本跟上面相同。\n将 $TEXMFMAIN/pdftex/ 下的 pdftex.cfg 文件复制到 $TEXMFLOCAL/pdftex/config/目录下,并将 cjk.map 文件复制到 $TEXMFLOCAL/pdftex/config/ 目录下,在复制过来的 config 文件中加入一行:\nmap +cjk.map\n同样这里的 cjk.map 也可以不用复制过来,只要在上面一行中加入路径即可。\n\n5.pdfTeX 直接使用 TrueType 中文字体:\na) 设置TTF字体路径\n需要告诉 TeX 系统 TTF 字体放在哪里。这个信息应该记录在 $TEXMFMAIN/texmf.cnf 文件里,在改文件中有一行:\nTTFONTS = .;$TEXMF/fonts/truetype//\n目录后的两根//表示寻找的时候搜索这个目录及其子目录,可以将 *.ttf 文件复制到上述目录中,也可以将 *.ttf 文件所在的目录加入到这一行中,目录之间用分号 ; 隔开。这里的 $TEXMF 指的是所有的 texmf 目录。\nb) 让 pdfTeX 找到字体\npdfTeX 还需要一些映射文件来决定字体文件的名字。这些映射文件都已经由 gbkfonts 生成了: gbksong.map, gbkkai.map,... 它们已经被拷贝到了$TEXMFLOCAL/pdftex/config 目录下,pdfTeX 还要知道使用哪些 map 文件。这个信息记录在 $TEXMFLOCAL/pdftex/config/pdftex.cfg 中. 如果没有这个文件,就把 $TEXMFMAIN/pdftex/ 下的 pdftex.cfg 文件拷贝过来,并将 gbkfonts 生成的pdftex.cfg 文件中的内容附在由 $TEXMFMAIN/pdftex/ 拷贝过来的 pdftex.cfg 文件后即可。\n\n说明:需要注意的是 ConText 要用到 pdfTex,如果 pdfTeX 使用 TrueType 中文字体,则配置好 ConText 后,编译生成幻灯片会出现:\nError: pdfetex (file /usr/share/fonts/zh_CN/TrueType/simsun.ttf): can't find ta\nble `maxp'\n==> Fatal error occurred, the output PDF file is not finished!\n的错误,无法解决。 而如果 pdfTeX 使用 Type1 中文字体就没有任何问题。这个问题确实是由于2000以后的MS系统带的simsun.ttc有问题,使用windows98中带的simsun.ttc就没有任何问题。\n\n6.ConText的中文配置!!!\n所有工作都是在 $TEXMFMAIN/tex/context/base/ 目录下进行。\na) 因为使用的是 GBK 编码的中文字体,编辑$TEXMFMAIN/tex/context/base/font-uni.tex文件,将下面这段代码前面的注释去掉。注意不要把 "%D starttypen" 和"%D stoptypen" 的注释给去掉了!\ndefineucharmapping{GBK}#1#2%\n{unicodeposition=#1\nadvanceunicodeposition -129\nmultiplyunicodeposition 190\nadvanceunicodeposition #2\nadvanceunicodeposition-ifnum#2>127 65else64fi\ndorepositionunicode}\nb) 编辑 $TEXMFMAIN/tex/context/base/cont-sys.ori 文件,在其中加上一行:\ndefcurrentucharmapping{GBK}\n这一行必须加在 protect endinput 一行前,否则不起作用。然后另存为 $TEXMFMAIN/tex/context/base/cont-sys.tex记得一定要另存为这样一个cont-sys.tex。\nc) 添加字体别名。\n此外,由于 ConTeXt 缺省定义的简体中文字体名分别为: gbsong gbkai gbhei gbfs gbli(具体参看 $TEXMFMAIN/tex/context/base/font-chi.tex), 所以如果系统里中文字体名不同的话,就必须修改 $TEXMFMAIN/tex/context/base/font-chi.tex 文件。如果系统使用的是 gbksong,...,gbkli, 可相应添加:\ndefinefontsynonym [gbsong] [gbksong] [encoding=gbk]\ndefinefontsynonym [gbsongsl] [gbksongsl] [encoding=gbk]\ndefinefontsynonym [gbhei] [gbkhei] [encoding=gbk]\ndefinefontsynonym [gbheisl] [gbkheisl] [encoding=gbk]\ndefinefontsynonym [gbkai] [gbkkai] [encoding=gbk]\ndefinefontsynonym [gbkaisl] [gbkkaisl] [encoding=gbk]\ndefinefontsynonym [gbfs] [gbkfs] [encoding=gbk]\ndefinefontsynonym [gbfssl] [gbkfssl] [encoding=gbk]\ndefinefontsynonym [gbli] [gbkli] [encoding=gbk]\ndefinefontsynonym [gblisl] [gbklisl] [encoding=gbk]\nd) 重新生成 ConTeXt 的格式文件\nConText 采用 texexec 脚本进行编辑,这个脚本用到了 perl,所以 MS 系统必须安装 perl (一般用 activeperl ),linux 下一般都已经装了 Perl,配置完 ConTeXt后,需要重新生成 ConTeXt 的格式文件,在 $TEXMFMAIN/tex/context/base/ 目录下运行:\ntexexec --make\n即可。\n\n\n至此,搞定,收工!\n\n\n说明:需要注意的是,每次增加了文件在 TeX 的目录树($TEXMF)里,都需要运行mktexlsr 来刷新文件名数据库ls-R,这样 TeX 的程序才能顺利找到各种文件。\n\n\n\n% The main tree, which must be mentioned in $TEXMF, below:\nTEXMFMAIN = /usr/share/texmf\n\n% A place for local additions to a "standard" texmf tree. For example:\nTEXMFLOCAL = /usr/local/share/texmf\nTEXMFOLDLOCAL = /usr/local/lib/texmf\n\nTEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFOLDLOCAL,!!$TEXMFMAIN}
* 安装相应的的软件包\n{{{\naptitude install tor squid\n}}}\n在ubuntu 系统中安装tor会自动安装privoxy。\n* 基本配置\n## 配置tor 访问限制,使用的端口等等。默认设置下tor 可以工作的很好。\n需要注意的有这两项:监听的端口以及只绑定内网地址。\n{{{\nsudo vi /etc/tor/torrc\n\n> SocksPort 9050 \n> SocksBindAddress 127.0.0.1 \n}}}\n## 配置privoxy 代理服务使用tor 来加密访问网页\n绑定内网IP; 设定访问控制;将8118链接转交给9050的tor 处理。\n{{{\nsudo vi /etc/privoxy/config\n\n> listen-address 127.0.0.1:8118\n> permit-access localhost\n> forward-socks4a / 127.0.0.1:9050 .\n}}}\n注意forward-socks4a后还有一个点。\n## tor + privoxy组合在访问速度上不太理想,所以还要配合使用squid 的cache来加速访问\n{{{\nsudo vi /etc/squid/squid.conf\n\n> http_port 1124\n> cache_peer localhost parent 8118 7 no-query default\n> dns_nameservers 202.201.0.131 202.201.0.132\n> acl ybyygu src 219.246.55.3\n> http_access allow ybyygu\n> cache_mgr ybyygu_at_gmail.com\n> visible_hostname localhost\n> never_direct allow all\n}}}\n还要设置squid 的cache目录\n{{{\nsquid -z\n}}}\n* 设了一把,效果很明显,中文维基可以访问了,呵呵!\n* tor 服务需要连接到国外的服务器,所以教育网内的机器无法享用tor 的便利。\n* 还有一个集成了firefox 和tor 的程序,名叫torpark
在debian中,udev是2.6内核中引入的一个方便移动存储使用的工具。\n在使用观感上极类似于windows XP的自动播放。\n\ndebian中使用要点:\n# 确认使用的2.6内核中已开启udev功能。\n# 确认用户属于plug dev组。\n# 用户不需要操心如何启用udev系统服务,只怕是也无法操心。debian的服务管理让人头昏。
{{{\necho -n 中 | iconv -f UTF-8 -t UCS-2BE |xxd -ps\n}}}
* 添加\nupdate-rc.d nat defaults\n* 删除\nupdate-rc.d nat remove
\n# vim中的字符映射表\n{{{\n:diagraphs\n}}}\n# 数字增减\n{{{\nctrl+A # 在normal模式下增大数字 \nctrl+X # 在normal模式下减小数字\n}}}\n\n# vim 的自动完成真是强大\n{{{\nThese commands are not available when the |+insert_expand| feature was\ndisabled at compile time.\n\nCompletion can be done for:\n\n1. Whole lines |i_CTRL-X_CTRL-L|\n2. keywords in the current file |i_CTRL-X_CTRL-N|\n3. keywords in 'dictionary' |i_CTRL-X_CTRL-K|\n4. keywords in 'thesaurus', thesaurus-style |i_CTRL-X_CTRL-T|\n5. keywords in the current and included files |i_CTRL-X_CTRL-I|\n6. tags |i_CTRL-X_CTRL-]|\n7. file names |i_CTRL-X_CTRL-F|\n8. definitions or macros |i_CTRL-X_CTRL-D|\n9. Vim command-line |i_CTRL-X_CTRL-V|\n10. keywords in 'complete' |i_CTRL-N|\n}}}\n# vim中处理多个文件时的方法:\n{{{\nvim *.txt\n:bn \n:bp\n}}}\nbn或bp对应于buffer next和buffer previous\n# vim 中 DOS和UNIX文本格式的转换\n{{{\n:set fileformat=unix\n:set fileformat=dos\n}}}
{{{\n"ay\n}}}\n释义:\n其中“a表示将使用a号寄存器来进行后面的操作。\n{{{\nqa\n}}}\n释义:\n使用a号寄存器来存储宏操作\n{{{\nq\n}}}\n释义:\n这个用来退出宏记录模式\n{{{\n@a\n}}}\n释义:\n这个用来执行a寄存器的宏。@前可使用加速数字。\n{{{\n”ap\n}}}\n释义:\n将a号寄存器中的内容放出来,以便编辑,然后还可放到a号寄存器中。
在插入模式下,使用^+n 和 ^+p来完成关键词的切换。\n
whiptail - display dialog boxes from shell scripts\n某天可能会用的上。
写一个类似于tiddlywiki的通讯录,特点:\n* 单一页面,处处可用,处处可写;\n* 每一个tiddler为一个通讯人项,可编辑,去掉引用链接之类的东西;\n* 支持导入导出;\n* tiddler的tag属性为通讯人分类;\n* 搜索功能应加强\n
用super pi 测试了一下硬件的运行速度\n配置:\nCPU amd64 3000+\nRAM 2G\n104万位的计算速度\nwin:48s\nwine:57s\nvmware:100s\n\n如此看来wine的速度还算理想吧。\n\n在PIV 3.0中的数据:\nwine: 56s\nqemu: 71s\nvmware:90s\n
print contents of X events\n用来查看按键和鼠标信息
一个显示刷新率小工具\n{{{\n SZ: Pixels Physical Refresh\n*0 1024 x 768 ( 313mm x 232mm ) *85 75 72 70 60 43\n 1 800 x 600 ( 313mm x 232mm ) 85 75 72 70 60 56 100 90\n 2 640 x 480 ( 313mm x 232mm ) 85 75 72 60 120 100 90\n 3 640 x 350 ( 313mm x 232mm ) 70\n 4 640 x 400 ( 313mm x 232mm ) 75 60\n 5 512 x 384 ( 313mm x 232mm ) 75\n 6 400 x 150 ( 313mm x 232mm ) 75 60\n 7 320 x 120 ( 313mm x 232mm ) 75 60\n 8 320 x 100 ( 313mm x 232mm ) 75 60\nCurrent rotation - normal\nCurrent reflection - none\nRotations possible - normal\nReflections possible - none\n}}}\n
调整显示屏幕偏移和刷新频率\n\n*在控制台下运行\n{{{\n# xvidtune\n}}}\n*会有一个设置显示器的图形工具,用left和right按钮调好屏幕位置,test一下,调到显示位于最中间为准,再show一下,将终端窗口上显示的那一行输出记下来,类似这样的语句,在控制台下用鼠标帖到编辑器上。\n{{{\n"1024x768" 94.50 1024 1088 1184 1376 768 769 772 808 +hsync +vsync\n}}}\n*编辑/etc/X11/XF86config-4或者是/etc/X11/XF86config这个文件\n*找到Section "Monitor"中当前分辨率的那段,应该你会看到类似\n{{{\nModeLine "1024x480" 65.00 1024 1032 1176 1344 480 488 494 563 -hsync -vsync\n}}}\n*在这句的前面加一个#号,注销掉,然后把你测试出来的如上面我说的类似的那个帖在编辑器的那个,帖在我们加#号的那句的前面,但要加一个ModeLine,也就成了如下的样子。ModeLine后面要有一个空格;\n{{{\nModeLine "1024x768" 94.50 1024 1088 1184 1376 768 769 772 808 +hsync +vsync\n}}}\n*把上面的一行,应该加在什么地方呢?请看实例:\n{{{\nSection "Monitor"\n\n#Option "dpms"\nIdentifier "Monitor0"\nVendorName "Monitor Vendor"\nModelName "Monitor Model"\nHorizSync 30.0 - 71.0\nVertRefresh 50.0 - 160.0\nModeLine "1024x768" 94.5 1024 1088 1184 1376 768 769 772 808 +hsync\n+vsync\nEndSection\n}}}\n*重启XWIN服务器,就能看到效果了。
可以在二进制和文本之间转换。
含S化合物 -> sulfur-containing molecules\n
http://sbackup.sourceforge.net
万方搜索不支持非IE浏览器。\n\n万方的地址:\n{{{\nhttp://www.wanfangdata.com.cn/qikan/periodical.articles/sydxxb/sydx2005/0506pdf/050632.pdf\n}}}\n兰大镜像地址:\n{{{\nhttp://202.201.7.10:8000/~kjqk/sydxxb/sydx2005/0506pdf/050632.pdf\n}}}\n\n在google学术搜索上找到链接后,做简单替换就可以了。\n
cvs -z3 -d:pserver:anonymous@cvs.sv.gnu.org:/cvsroot/emacs co -r emacs-unicode-2 emacs
{{{\nftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/\n}}}
看获取的IP:ifconfig\n看获取的网关:route -n\n看获取的DNS:cat /etc/resolv.conf
# 经典的“三板斧”\n{{{\n./configure\nmake\nmake install\n}}}\n# debian's way\n{{{\nauto-apt run ./configure\nmake\nsudo checkinstall -A amd64\n}}}\n# configure 时常用的一些参数\n{{{\n./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu\n}}}\n# 依赖性的问题\n大抵都是要安装相应的dev包\n# 如何获得source?\n\n* get from software website\n* get from gentoo source\n* get from debian source\n# compile from debian source\n[[how to compile from debian source?]]
可以使用cat来查看按键的字符码\n{{{\ncat\n^[[5A\n}}}
* 安装之\n{{{\nsudo aptitude install dovecot-imapd\n}}}\n* 配置之\n{{{\nprotocols = imap\ndefault_mail_env = mbox:~/Mail\n}}}\n
所谓"fix partition order"意指,如果分区的标识(in linux: sda1, sda2 ... )不依磁盘的物理磁道顺序时,可以使用fdisk的这个高级功能来处理。\n{{{\n# fdisk /dev/sda\n> m # show help\n> x # enter in expert mode\n> f # fix partition order\n> w # write to disk\n> q # quit\n}}}
* 首先通过kill 命令来获取可用的信号\n{{{\nkill -l\n}}}\n* 使用pkill 将信号传递到某个特定的进程\n{{{\npkill -SIGHUP fcitx\n}}}
* 目标:向远程主机上登录的用户发送图形化的通知信息,类似于Windows中“任务管理器”中的popup式的信息发送。\n* 需要用到的工具: ssh、zenity(在Ubuntu中默认安装)\n* 前提条件: 远程主机用户必须已通过xdm(gdm)登录。\n* 操作步骤:\n{{{\n> ssh remote_host # 远程登录\n> w # 使用w 命令来查看登录信息\n 10:54:32 up 2:48, 2 users, load average: 0.18, 0.11, 0.09\nUSER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT\nsomebody :0 - 08:08 ?xdm? 2:05m 0.50s x-session-manager\nyou pts/0 159.226.156.231 10:54 0.00s 0.14s 0.00s w\n# 从上面可以看出,somebody已经从X上登录,并且使用的是":0"显示区。\n> sudo su somebody\npasswd: # 使用sudo 来切换为somebody用户,输入自己密码\n> zenity --display=:0 --info --text "这里输入通知信息"\n}}}\n* 可参考这里: [[Pop up a text message on a remote machine|http://occy.net/node/65]]\n
{{{\nzenity --warning --text="今天天气不错!"\n}}}\n也可以指定display项,这样就可以用ssh远程发送了:\n{{{\nzenity --display=:0 --warning --text="see you"\n}}}
可以用来同步一些必要的文件。不过好像会用这个小东东的人也不多啊\n使用公文包可以把不同计算机上的文件同步.\n可能有的限制:\n# 几台不同的计算机间应该只有一个公文包,或者说公文包间不可互相引用.\n# 建议在公文包下复制"宿主"文件夹,在公文包下同步时可以同步此文件夹下的所有文件\s文件夹,包括已经被修改过的(在公文包下或在其它的宿主文件夹下)或新建的文件或文件夹.\n# 公文包下放置的应为可编辑的文件(如文本文件、word文档等),没有必要放入不需要同步的可执行程序等。\n# 复制将加入新的需要同步的文件;如果确实需要添加文件,可新建新的文件。\n\n有时候需要在宿主机子上打开一次公文包以使这个“包”获取访问取。\n
本WIKI & BLOG基于d3 ("d cubed"),见 http://www.dcubed.ca/\n"d cubed" 是tiddlywiki的一种变体,关于tiddlywiki请参考英文维基上的介绍:\nhttp://en.wikipedia.org/wiki/TiddlyWiki\n\n为了得到最佳呈现,推荐您使用Firefox 浏览器。\n[img[Rediscover the web|http://www.mozilla.com/images/firefox-logo-64x64.png]]\n不妨花几分钟[[下载|http://www.google.com/search?&q=firefox]]来用,不论是上网的体验或是你的系统的安全都能得到提升。
据维基百科载,常于人耳边“嗡嗡”而叫者,都为雌性。此“文”雄性,血型AB,不喜动,善沉默。人多不喜,视之为异类。
待得兴尽,走回宿舍时已是晚上十一点多了。摸黑进屋,开灯,躺在床上看书。\n一时耳边嗡嗡声四起。不由得想起回来时路上听来的趣闻:喀尔木的蚊子好厉害,一点声音都没有,胳膊上一咬一个大疙瘩,肿得手膊都疼。看来那里真是好地方,连蚊子都特别,下嘴爽快,不婆婆妈妈。高中时同屋里一个内蒙的小伙子跟我讲献血的好处:少年人血气方刚,多献血有助于降低社会犯罪率。当时谓为奇谈。现在想想被蚊子咬大概有相同的功效,不过它们可就得勤快些了,老这么哼哼叽叽、磨磨蹭蹭可不行。我虽有心“以身饲蚊”,却没什么耐心。小时候,姥姥教我,被蚊子咬时,记着要跟它套套近乎——好歹大家都有个“文字”嘛。这招小时是否曾经试过,已不大记得了;更至于蚊子兄弟是否认了我这门亲就更无从知晓了;即便真有肯认的,大概那一匹也早都随她老人家一起去了吧。 还是除恶勿尽吧,捧起“鹤壁天元”一阵狂扫。洗个手回来,静候片刻,啪啪声四起,那是蚊子落地的声音了。心想,嗯,该回家了,明天就买票。\n
sysctl 在运行时设置内核参数\nstrings 在运行时设置内核参数\nglxgear 测试opengl3D性能\ncol 过滤控制字符\n/dev/urandom 随机数相关\nmpack tools for encoding/decoding MIME messages
买个1G的优盘,害我换了三次。问题都是当使用的容易超过一半后,拷入的文件全部无效。去问销售商,答曰紫光自己都知道这个问题,不过为了打价格战,现在也顾不得了。\n看来紫光真是不惜令羽,以后遇到它的东西真该三思后行了。
{{{\nupdate-rc.d foobar defaults\n}}}
RSiteSearch('vim editor')
使用TCL界面:\n{{{\n# make the two selections\nset sel1 [atomselect top "resid 45 and name CA"]\nset sel2 [atomselect top "resid 99 and name N"]\n# get the coordinates\nlassign [$sel1 get {x y z}] pos1\nlassign [$sel2 get {x y z}] pos2\n# draw a white line between the two atoms\ndraw color white\ndraw line $pos1 $pos2 style dotted width 2\n}}}\n\n{{{\nproc label_atom {selection_string label_string} {\n set sel [atomselect top $selection_string]\n if {[$sel num] != 1} {\n error "label_atom: '$selection_string' must select 1 atom"\n }\n # get the coordinates of the atom\n lassign [$sel get {x y z}] coord\n # and draw the text\n draw text $coord $label_string\n}\n}}}
* 首先安装scim相关的依赖包,下面这个命令可不是一般的管用啊:\n{{{\napt-get build-dep scim\n}}}\n* 下面自然是compile三部曲了:configure; make; make install
# 下载两个文件\nvmware-distrib\nvmware-any-any-update\n# 配置系统\n{{{\naptitude install build-essential\n\n# gcc 必须与编译内核的版本一致\naptitude install gcc-3.4 g++-3.4\n\n# 安装与内核一致的头文件\naptitude install linux-headers-`uname -r`\n}}}\n# 安装vmware\n{{{\ncd vmware-distrib\n./vmware-install.pl\n}}}\n# 更新vmware\n{{{\nexport CC=gcc-3.4\ncd vmware-any-any-update\n./runme.pl\n}}}\n安装时的选项: 要指向特定的header目录,比如\n{{{\n/lib/modules/2.6.12-10-k7/build/include\n}}}\n# 当启动进入windows后,在vmware界面上点install vmware-tools来安装虚拟硬件的骚动。
在UTF-8 Linux系统下,播放音乐容易遇到的麻烦是音频标题乱码。这通常是一些MP3文件,因为Windows下的MP3 文件TAG信息通常用GBK编码,而古老的ID3-V1标准又不能存储TAG字符的编码信息,这正是乱码的根源。\n可行的解决方案有几种:\n* 在windows下将mp3文件转换为支持编码信息的文件格式,如ogg、mpc等等。不过,这应该不算上策,因为格式转换难免会带来音质的损失。\n* 在ID3信息上做文章,直接将ID3转换为UTF-8编码。这在UTF-8系统下使用倒是没事了,但在Windows下还会乱码。\n* 比较好的解决方法:将ID3v1的信息转换为支持存储编码信息的ID3V2格式,然后直接将多余的D3V1信息清除。这样在linux和windows都可正常使用。\n为了自己方便,用python写成的小工具:[[id3_convert.py|http://ybyygu.sitesled.com/python/id3_convert.py]]\n使用方法:\n{{{\nid3_convert.py *.mp3\nid3_convert.py *.mp3 -d # 只输出解码后的TAG信息,不写入MP3文件\n}}}\n编写时参考了这里:\n[[http://www.linuxfans.org/nuke/modules.php?name=Site_Downloads&op=geninfo&did=4415]]
打开 /etc/console-tools/config, 文件尾部找到:\n{{{\n# Turn on numlock by default\n LEDS=+num <== 取消此行的注释\n}}}
{{{\nmodconf\nSelect kernel/drivers/net modules\n......\nne2k-pci + PCI NE2000 and clones support\n\nmodinfo sky2\n}}}
# why\n国内网络使用IPV6会导致DNS解析过慢,会显著影响浏览网页的速度。\n# howto\n\n* 编辑 /etc/modprobe.d/aliases\n将\n{{{\nalias net-pf-10 ipv6\n}}}\n改为\n{{{\nalias net-pf-10 off\n}}}\n* 重新启动系统
{{{\nx <- "c(1,2)"\neval(parse(text = x))\n}}}
{{{\nsudo perl -MCPAN -e 'install whatever::modulename'\n}}}\n在此操作之前应尝试查找一下native 的deb 包\n{{{\naptitude search perl|grep something\n}}}
从网上看来的,2000对大硬盘支持不足,会在使用过程造成随机性的数据丢失。\n关键词:\n48bit LBA
http://abook.sourceforge.net/
* sun-java5-jre\n现在可以直接装java了,爽!但还是得手工设置中文字体。\n\n* chkrootkit\n用于检测rootkit木马的工具\n\n* gcolor2\n一个用于屏幕取色的小程序\n\n* 有趣的小游戏\n## ksudoku\n数独,类例于九宫\n## ksokoban\n推箱子\n* 系统管理\n##gdebi\n为deb软件包提供一个图形化的安装界面。不错。\n## sysv-rc-conf\nsysv启动管理工具,用来代替rconf\n* 绘图\n## vrweb\nvrml文件浏览器\n##labplot\nhttp://labplot.sourceforge.net/\n有点类似于windows下的origin\n##qtiplot\nhttp://soft.proindependent.com/qtiplot.html\n## g3data\n这是一个奇怪的东西,用来从图片中提取数据来着。\ng3data is used for extracting data from graphs. In publications graphs often are included, but the actual data is missing. g3data makes the extracting process much easier.\n##Xara Xtreme\n号称最快的矢量绘图工具\n\n* 英语学习\n## reciteword\n一个英语学习软件.有大学英语四六级.托福,雅思词汇等词库.有单词初记,趣味打靶,听力实战,打字神功等功能.很完美!\n* 音频播放\n## audacious\nbmp的后继者,不错。\nhttp://audacious-media-player.org/Main_Page\n## bmpx\n* 文件管理器\n##emelfm2\nhttp://emelfm2.net\n## GNOME Commander\nhttp://www.nongnu.org/gcmd/index.html
{{{\n5,35 * * * * fetchmail\n#\n0,20,40 * * * * $HOME/bin/checkproxy.sh\n#\n40 */4 * * * $HOME/bin/getproxy.sh\n}}}
增加自动“续算”未完成的gass任务。\n
可以使用split将文件切割为多块。\n可以使用dd将文件中的任意一部分读取出来:\n{{{\ndd if=input_file of=output skip=2\ndd if=input_file of=output count=2\n}}}\n\n合并文件可以用cat:\n{{{\ncat aa.rmvb bb.rmvb >cc.rmvb\n}}}
# 怎样无限制的增加线程数?(默认为10个)\n其实不需要改注册表的。当线程数增至10时,再增加线程时没反应,点减少,再点增加;这时总线程数会增一个。以此类推。记着把操作中被取消的线程打开\n# 可多多添加镜像站点。\n# 多代理的设置\nFlashGet在这方面做的不是很好,但该有的基本功能已经有了。软件是差了点,偶家还算足够的聪明,小小障碍不在话下。终于实现了用五台机子下同一个东西的目标。\n
{{{\nsudo aptitude install devscripts\n}}}\n\ncd到deb的主目录下,执行如下命令:\n{{{\ndch -i\n}}}\n这将产生一个新的修订版本并可写入变更日志。
{{{\nScript-Fu => 阴影 => 投影...\n}}}\n 可控参数较多
{{{\n sed -e "s:${D}::" -i "${D}"/usr/bin/${PN} \s\n || die "failed to set up vmd wrapper script"\n}}}\n直接修改,不需要使用临时文件
{{{\nconvert -page +2+2 window.png \s\n \s( +clone -background black -shadow 60x3+3+3 \s) +swap \s\n -background none -mosaic window.png\n}}}
* 安装 ntpdate\n{{{\naptitude install ntpdate\n}}}\n\n* 编辑文件: /etc/defaults/ntpdate\n{{{\nNTPSERVERS="s1a.time.edu.cn"\n}}}\n\n* 手工校时\n{{{\nntpdate ntpserver\n}}}
{{{\nTab Complete\nAlt-! Command Complete\nAlt-? Filename Complete\nAlt-~ Username Complete\nAlt-$ Variable Complete \n}}}
* gcc用来编译c程序\n{{{\ngcc foo.c -o foo\n}}}\n* g++用来编译c++程序\n{{{\ng++ foo.cpp -o foo\n}}}
很奇怪,在ubuntu中运行如下命令会出错的:\n{{{\ndchroot -d -c gentoo cmd\n}}}\n但不用-d选择则可行。\n变通的解决方案:\n{{{\nsudo chmod +s /usr/sbin/chroot\nchroot /gentoo firefox\n}}}
ybyygu 是我的网名,99.9%的人第一次见这个名字都会觉得奇怪,以为是字母的随机排列。其实不过是用五笔“加密”了我的中文名而已。全球华人与我同名的估计不在少数,但与我同名,又懂此法者只怕就唯有鄙人了。\n留下我的邮箱吧: \n[img[ybyygu at gmail dot com| http://static.flickr.com/49/193351536_55f472b63e.jpg]]
一件怪事。鼠标中键突然不能用了,搜索了半天,改了半天,看似都不起作用。结果重启以后就好了。没想到linux下重启的作用也不比windows小很多啊。