{"id":2605,"date":"2010-10-01T12:02:25","date_gmt":"2010-10-01T12:02:25","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2010\/10\/01\/be-notified\/"},"modified":"2010-10-01T12:02:25","modified_gmt":"2010-10-01T12:02:25","slug":"be-notified","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2010\/10\/01\/be-notified\/","title":{"rendered":"Be Notified"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p><b>A Special Announcement<\/b><\/p>\r\n   <p>Today marks the official deadline for entries to the <a href=\"https:\/\/blogs.mathworks.com\/pick\/2010\/09\/03\/two-amigos\/\">Two Amigos challenge<\/a>. Next week, Brett promises to unveil his own solution to the problem. To date, unfortunately, not a single reader has submitted\r\n      code. Brett will be insufferable if he is the only one who rises to the challenge. Anyone care to take a stab&#8212;to save us from\r\n      Brett&#8217;s ego? Even a reasonable effort is likely to garner a prize! Signed, Brett&#8217;s colleagues.\r\n   <\/p>\r\n   <p><b>This Week's Pick<\/b><\/p>\r\n   <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\">Jiro<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/28733-notifier\"><tt>Notifier<\/tt><\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/74912\">Benjamin Kraus<\/a>.\r\n   <\/p>\r\n   <p>You may have read the blog post <a href=\"https:\/\/blogs.mathworks.com\/loren\/2010\/09\/16\/my-first-use-of-sendmail\/\">\"My First Use of sendmail\"<\/a> on <a href=\"https:\/\/blogs.mathworks.com\/loren\/\">Loren on Art of MATLAB<\/a> and learned about sending emails directly from MATLAB. Benjamin's <tt>notifier<\/tt> is a great practical tool that incorporates this capability.\r\n   <\/p>\r\n   <p>Have you ever needed to run a long simulation overnight, and you wanted some status update on how the simulation went? With\r\n      <tt>notifier<\/tt>, it would send you an email when the simulation completed. But what I liked about it even more was that it would notify you\r\n      if an error occurred. It would send an email with the error message ID and the error message. There were a number of times\r\n      back in graduate school when I wanted to know about simulation failures so that I could go back and fix\/rerun the code.\r\n   <\/p>\r\n   <p>The utility is very well-documented, with a solid use of exception handling. Thanks for a nice entry, Benjamin!<\/p>\r\n   <p><b>Comments<\/b><\/p>\r\n   <p>Give it a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2605#respond\">here<\/a> or leave a comment for <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/28733-notifier#comments\">Benjamin<\/a>.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_614587cd13c9456186ab8731d7cd9787() {\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='614587cd13c9456186ab8731d7cd9787 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 614587cd13c9456186ab8731d7cd9787';\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 = 'Jiro Doke';\r\n        copyright = 'Copyright 2010 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<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>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_614587cd13c9456186ab8731d7cd9787()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.11<br><\/p>\r\n<\/div>\r\n<!--\r\n614587cd13c9456186ab8731d7cd9787 ##### SOURCE BEGIN #####\r\n%%\r\n% *A Special Announcement*\r\n%\r\n% Today marks the official deadline for entries to the\r\n% <https:\/\/blogs.mathworks.com\/pick\/2010\/09\/03\/two-amigos\/ Two Amigos\r\n% challenge>. Next week, Brett promises to unveil his own solution to the\r\n% problem. To date, unfortunately, not a single reader has submitted code.\r\n% Brett will be insufferable if he is the only one who rises to the\r\n% challenge. Anyone care to take a stab\u00e2\u20ac\u201dto save us from Brett\u00e2\u20ac\u2122s ego? Even a\r\n% reasonable effort is likely to garner a prize! Signed, Brett\u00e2\u20ac\u2122s\r\n% colleagues.\r\n%\r\n% *This Week's Pick*\r\n%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\r\n% Jiro>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/28733-notifier\r\n% |Notifier|> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/74912\r\n% Benjamin Kraus>.\r\n%\r\n% You may have read the blog post\r\n% <https:\/\/blogs.mathworks.com\/loren\/2010\/09\/16\/my-first-use-of-sendmail\/\r\n% \"My First Use of sendmail\"> on <https:\/\/blogs.mathworks.com\/loren\/ Loren\r\n% on Art of MATLAB> and learned about sending emails directly from MATLAB.\r\n% Benjamin's |notifier| is a great practical tool that incorporates this\r\n% capability.\r\n%\r\n% Have you ever needed to run a long simulation overnight, and you wanted\r\n% some status update on how the simulation went? With |notifier|, it would\r\n% send you an email when the simulation completed. But what I liked about\r\n% it even more was that it would notify you if an error occurred. It would\r\n% send an email with the error message ID and the error message. There were\r\n% a number of times back in graduate school when I wanted to know about\r\n% simulation failures so that I could go back and fix\/rerun the code.\r\n%\r\n% The utility is very well-documented, with a solid use of exception\r\n% handling. Thanks for a nice entry, Benjamin!\r\n%\r\n% *Comments*\r\n%\r\n% Give it a try and let us know what you think\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2605#respond here> or leave a comment\r\n% for <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/28733-notifier#comments\r\n% Benjamin>.\r\n\r\n##### SOURCE END ##### 614587cd13c9456186ab8731d7cd9787\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   A Special Announcement\r\n   Today marks the official deadline for entries to the Two Amigos challenge. Next week, Brett promises to unveil his own solution to the problem. To date, unfortunately,... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2010\/10\/01\/be-notified\/\">read more >><\/a><\/p>","protected":false},"author":35,"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\/2605"}],"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\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2605"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2605\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}