{"id":2198,"date":"2008-04-04T14:45:06","date_gmt":"2008-04-04T19:45:06","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2008\/04\/04\/html-calendar-generator\/"},"modified":"2018-06-19T13:37:52","modified_gmt":"2018-06-19T17:37:52","slug":"html-calendar-generator","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2008\/04\/04\/html-calendar-generator\/","title":{"rendered":"HTML calendar generator"},"content":{"rendered":"<div class=\"content\">\r\n\r\n<i>You may have noticed some recent changes in the format of this blog. Here\u2019s what to expect on a regular basis \u2013 two topics\r\nper week.<\/i>\r\n\r\n&nbsp;\r\n<div>\r\n<ul>\r\n\t<li><i>On Tuesdays Doug will provide MATLAB tutorials.<\/i><\/li>\r\n\t<li><i>On Fridays guest bloggers Jiro, Brett and Bob will highlight File Exchange submissions.<\/i><\/li>\r\n<\/ul>\r\n<\/div>\r\nBob's pick this week is <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=16192 (link no longer works)\">HTML calendar generator<\/a> by Tobin Driscoll.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/htmlcal.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\nThe screen shot above doesn't do an HTML calendar justice. Among other things it autoscales to fit the width of your browser window. You may also notice that\r\nSaturday and Sunday are not displayed. That's a clue to how Tobin uses this tool. From his description \"When I teach matlab-intensive\r\ncourses, I post a calendar on the class web page and create a link for each date to a matlab diary (or published output) of\r\nthat day.\" His students get weekends off, and Tobin gets <i>extra credit<\/i> for providing links to MATLAB content.\r\n\r\nMATLAB may have started as a humble tool for learning matrix arithmetic and solving linear algebra problems. For nearly a\r\nquarter century MATLAB has grown more powerful and broadly useful. As a dyed-in-the-wool<a href=\"http:\/\/en.wiktionary.org\/wiki\/dyed-in-the-wool\">[1]<\/a> MATLAB geek I just love to see creative and innovative uses like this. Tell us about yours.\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_ad2d28e8cf124bd48d55aeab9f625020() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='ad2d28e8cf124bd48d55aeab9f625020 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' ad2d28e8cf124bd48d55aeab9f625020';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Robert Bemis';\r\n        copyright = 'Copyright 2008 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\r\n\r\n\r\n\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">\r\n<a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code\r\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a>\r\n\r\nPublished with MATLAB\u00ae 7.6<\/p>\r\n\r\n<\/div>\r\n<!--\r\nad2d28e8cf124bd48d55aeab9f625020 ##### SOURCE BEGIN #####\r\n%%\r\n% _You may have noticed some recent changes in the format of this blog. Here\u00e2\u20ac&#x2122;s\r\n% what to expect on a regular basis \u00e2\u20ac\u201c two topics per week._\r\n%%\r\n% * _On Tuesdays Doug will provide MATLAB tutorials._\r\n% * _On Fridays guest bloggers Jiro, Brett and Bob will highlight File\r\n% Exchange submissions._\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectId=969735&objectType=author % Bob>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=16192 HTML calendar generator>\r\n% by Tobin Driscoll.\r\n%%\r\n% <<..\/images\/pick\/htmlcal.png>>\r\n%%\r\n% The screen shot above doesn't do an HTML calendar justice. Click\r\n% <..\/images\/pick\/htmlcal.html here>\r\n% to see an HTML example. Among other things it autoscales to fit the width\r\n% of your browser window. You may also notice that Saturday and\r\n% Sunday are not displayed. That's a clue to how Tobin uses this tool. From\r\n% his description \"When I teach matlab-intensive courses, I post a calendar\r\n% on the class web page and create a link for each date to a matlab diary (or\r\n% published output) of that day.\" His students get weekends off, and\r\n% Tobin gets _extra credit_ for providing links to MATLAB content.\r\n%%\r\n% MATLAB may have started as a humble tool for learning matrix arithmetic and\r\n% solving linear algebra problems. For nearly a quarter century MATLAB has\r\n% grown more powerful and broadly useful. As a dyed-in-the-wool\r\n% <http:\/\/en.wiktionary.org\/wiki\/dyed-in-the-wool [1]> MATLAB\r\n% geek I just love to see creative and innovative uses like this. Tell us\r\n% about yours.\r\n\r\n##### SOURCE END ##### ad2d28e8cf124bd48d55aeab9f625020\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n\r\nYou may have noticed some recent changes in the format of this blog. Here\u2019s what to expect on a regular basis \u2013 two topics\r\nper week.\r\n\r\n&nbsp;\r\n\r\n\r\n\tOn Tuesdays Doug will provide MATLAB... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2008\/04\/04\/html-calendar-generator\/\">read more >><\/a><\/p>","protected":false},"author":46,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2198"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2198"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2198\/revisions"}],"predecessor-version":[{"id":9884,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2198\/revisions\/9884"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}