Blog | Mezzaninehttp://senexcanis.com/blog/feeds/atom/2016-11-14T18:32:32+00:00BlogPodcast feed for Connected Life Christian Church2016-11-14T18:32:32+00:00senex/blog/author/senex/http://senexcanis.com/blog/podcast-feed-for-connected-life-christian-church/<p>I've been going to Connected Life Christian Church for over a decade. Steve Downin has been capturing sermons at <a href="http://www.mycandycane.com/sermons/">http://www.mycandycane.com/sermons/</a> for a long time. Now I've created a podcast rss feed to make it easier to access on mobile devices. To use this, type the address <a href="/static/church/ConnectedLife.rss">http://senexcanis.com/static/church/ConnectedLife.rss</a> into your podcast application and enjoy. The rss feed is hosted on my site, but it uses all the resources on <a href="http://www.mycandycane.com/sermons/">http://www.mycandycane.com/sermons/</a>.</p>PulseAudio Sound Sink2014-07-06T00:12:09+00:00senex/blog/author/senex/http://senexcanis.com/blog/pulseaudio-sound-sink/<p>Like me, you may have an extra headless linux computer laying around where you want to send sound to it over the network from another linux computer. To do this you can use pulse audio and its networking capabilities. There are dozens of articles covering this already, but none of them worked for me.</p>
<p>Headless Computer setup</p>
<ul>
<li>First, be sure you have pulseaudio installed</li>
<li>edit /etc/default/pulseaudio and change PULSEAUDIO_SYSTEM_START to a 1</li>
<li>edit /etc/pulse/system.pa and append the following to the file</li>
</ul>
<pre>load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16
load-module module-zeroconf-publish
</pre>
<ul>
<li>restart your headless computer (Or you can (re)start pulseaudio</li>
</ul>
<p>On your desktop computer, you need to enable some things to see other network cards</p>
<ul>
<li>Makesure you have paprefs installed</li>
<li>run paprefs</li>
<li>Be sure to have the first tab called "Network Access" selected</li>
<li>Check "Make discoverable PulseAudio network sound devices available locally"</li>
<li>close</li>
<li>Under Ubuntu launch system settings</li>
<li>select sound</li>
<li>under Output, you can now select between your local soundcard and your headless computer</li>
</ul>
<p>Much of this came from <a href="http://www.raspberrypi.org/forums/viewtopic.php?f=38&t=11124">here</a> and many other articles</p>CppHeaderParser 2.4.3 Released2014-06-11T00:27:28+00:00senex/blog/author/senex/http://senexcanis.com/blog/cppheaderparser-243-released/<p>CppHeaderParser version 2.4.2 is now released</p>
<p>Fixed 2 bugs related to default parameters:</p>
<p>BitBucket <a href="https://bitbucket.org/senex/cppheaderparser/issue/15/failure-parsing-default-floating-point">#15</a>: Failure parsing default floating point values. The following function will now have all of its default values parsed correctly</p>
<pre class="source">add(int a=100, b=0xfd, float c=1.7e-3, float d=3.14)</pre>
<p>BitBucket <a href="https://bitbucket.org/senex/cppheaderparser/issue/16/small-typo-issue">#16</a>: defaultValue typo. This key has been corrected.</p>CppHeaderParser 2.4.2 Released2014-05-24T23:39:55+00:00senex/blog/author/senex/http://senexcanis.com/blog/cppheaderparser-242-released/<p>CppHeaderParser version 2.4.2 is now released<br><br>Fixed 2 more parsing bugs:<br>Bit Bucket <a href="http://bitbucket.org/senex/cppheaderparser/issue/13/unable-to-parse-typedef-strcut">#13</a>:Not able to parse typedef struct<br>Now can parse anonymous structs (will be named <anon-struct-x> where x is a unique number.<br>Also, can parse typedef struct like the following:</p>
<pre>typedef struct
{
int a;
} Raspberry;
</pre>
<p><br>Bit Bucket <a href="http://bitbucket.org/senex/cppheaderparser/issue/14/global-namespace-returns-attribute-of">#14</a>: Parsing methods returning variables that are globally namespaced results in parsing error</p>
<p>Can now parse bar from</p>
<pre>struct Example {
uint8_t foo() { return 4;}
::uint8_t bar() { return 0; }
};</pre>CppHeaderParser 2.4.1 Released2014-03-09T01:28:09+00:00senex/blog/author/senex/http://senexcanis.com/blog/cppheaderparser-241-released/<p>CppHeaderParser version 2.4.1 is now released.</p>
<p>This release accomplishes 3 things from BitBucket issue <a href="https://bitbucket.org/senex/cppheaderparser/issue/12/python3-installer-error">#12</a>:</p>
<ul>
<li>Proper install with pip3</li>
<li>Fixed import with python 3</li>
<li>No more separation between python 3 and python 2 version of the code</li>
</ul>
<p>The python 3 version of the code runs just fine in python 2 and runs just as fast while passing all regression tests. So now I just use that. This also makes the ugly installation errors with pip3 go away when it tries to jit the code.</p>
<p>Thanks 2to3.</p>
<p>As always, just grab the latest code at <a href="https://pypi.python.org/pypi/CppHeaderParser/2.4.1">pypi</a>, or use easy_install/pip/pip3.</p>CppHeaderParser 2.4 Released 2013-08-26T21:45:30+00:00senex/blog/author/senex/http://senexcanis.com/blog/cppheaderparser-24-released/<p>CppHeaderParser version 2.4 is now released. This is basically a bug fix release.<br></p><p><strong>Fixed Bugs:</strong><br>BitBucket issue <a title="#1" _mce_href="https://bitbucket.org/senex/cppheaderparser/issue/1/bad-classname-in-certains-cases" href="https://bitbucket.org/senex/cppheaderparser/issue/1/bad-classname-in-certains-cases">#1</a>: Fix line numbering when #define or comment is multi-line and only 2 lines<br>BitBucket issue <a title="#2" _mce_href="https://bitbucket.org/senex/cppheaderparser/issue/2/missing-class-in-parsing" href="https://bitbucket.org/senex/cppheaderparser/issue/2/missing-class-in-parsing">#2</a>: Work around classes defined after unsupported #define magic<br>Bitbucket issue <a href="https://bitbucket.org/senex/cppheaderparser/issue/3/still-errors-with-macros" _mce_href="https://bitbucket.org/senex/cppheaderparser/issue/3/still-errors-with-macros">#3</a>: Ignore list can now list macro functions to ignore such as "MAGIC_FUNC()". This will cause the parser to ignore this function and anything within the parens<br>BitBucket issue <a title="#4" _mce_href="https://bitbucket.org/senex/cppheaderparser/issue/4/typedefs-not-recorded-in" href="https://bitbucket.org/senex/cppheaderparser/issue/4/typedefs-not-recorded-in">#4</a>: Add support for regular typedefs to go into the typedefs list<br>BitBucket issue <a href="https://bitbucket.org/senex/cppheaderparser/issue/5/nested-class-error-unexpected-multiple" _mce_href="https://bitbucket.org/senex/cppheaderparser/issue/5/nested-class-error-unexpected-multiple">#5</a>: Nested class error: unexpected multiple definition<br>Bitbucket issue <a href="https://bitbucket.org/senex/cppheaderparser/issue/6/lineno-false-in-a-specific-case" _mce_href="https://bitbucket.org/senex/cppheaderparser/issue/6/lineno-false-in-a-specific-case">#6</a>: lines ending in / cause line numbers to be inacurate afterwards<br>BitBucket issue <a href="https://bitbucket.org/senex/cppheaderparser/issue/7/include-before-function-definition-polutes" _mce_href="https://bitbucket.org/senex/cppheaderparser/issue/7/include-before-function-definition-polutes">#7</a>: #include before function definition polutes return type<br>BitBucket issue <a href="https://bitbucket.org/senex/cppheaderparser/issue/8/friend-functions-can-cause-exceptions-to" _mce_href="https://bitbucket.org/senex/cppheaderparser/issue/8/friend-functions-can-cause-exceptions-to">#8</a>: friend functions can cause exceptions to be thrown<br>BitBucket bug <a href="https://bitbucket.org/senex/cppheaderparser/issue/9/multiple-variable-declaration-parsing" _mce_href="https://bitbucket.org/senex/cppheaderparser/issue/9/multiple-variable-declaration-parsing">#9</a>: Multiple variable declaration parsing error<br>SourceForge bug <a title="#54" _mce_href="https://sourceforge.net/p/cppheaderparser/bugs/54/" href="https://sourceforge.net/p/cppheaderparser/bugs/54/">#54</a>: Add support for __attribute__ by filtering it out<br>SourceForge bug <a title="#55" _mce_href="https://sourceforge.net/p/cppheaderparser/bugs/55/" href="https://sourceforge.net/p/cppheaderparser/bugs/55/">#55</a>: Add support for elaborate type specification of class</p>CppHeaderParser 2.3 Released 2012-12-04T21:32:38+00:00senex/blog/author/senex/http://senexcanis.com/blog/cppheaderparser-23-released/<p>CppHeaderParser version 2.3 is now released. This release fixed many bugs and added support for #defines, #includes, #pragmas, line numbers and more.</p>
<p>Project page can be found at <a href="/open-source/cppheaderparser/" _mce_href="/open-source/cppheaderparser/">http://senexcanis.com/open-source/cppheaderparser/</a><br _mce_bogus="1"></p><p><strong>Implemented Feature Request:</strong><br>
Added the attribute "line_number" to methods/properties/classes etc.<br>Now #defines, #includes, and #pragmas are parsed into defines, includes, and pragmas lists that are part of the CppHeader class</p><p><br>
<strong>Fixed bugs:</strong><br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3567172" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3567172">3567172</a>: Enums without inline definition are skipped such as enum Stem stem_property<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3567854" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3567854">3567854</a>: Not creating instances of anonymous unions. Now anonymous unions will act like anonymous structs, the variable name will be "" (empyt string)<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3568241" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3568241">3568241</a>: Crash parsing 2 anonymous unions in a struct. Now llow multiple variables of the same name if they are anonymous.<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3568629" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3568629">3568629</a>: Crash parsing free function with derefence<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3569663" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3569663">3569663</a>: Crashes parsing indented #define<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3569622" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3569622">3569622</a>: Crashes parsing ::enum<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3570105" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3570105">3570105</a>: Error parsing multi line non #define statements<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3577484" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3577484">3577484</a>: Class template specialization plus inheritance mis-parsed<br>
Ignore \f<br>
</p>DOLFIN Uses CppHeaderParser2012-08-30T20:32:22+00:00senex/blog/author/senex/http://senexcanis.com/blog/dolfin-uses-cppheaderparser/<p>The latest version of <a href="https://blueprints.launchpad.net/dolfin/+spec/use-cppheaderparser" _mce_href="https://blueprints.launchpad.net/dolfin/+spec/use-cppheaderparser">DOLFIN</a> now uses CppHeaderParser. DOLFIN is a C++/Python library that functions as the main user interface of <a href="http://fenicsproject.org/" _mce_href="http://fenicsproject.org/">FEniCS</a> (More <a href="http://fenicsproject.org/about/components.html" _mce_href="http://fenicsproject.org/about/components.html">here</a> on dolfin). FEniCS is a collection of free software with an extensive list of features for automated, efficient solution of differential equations.</p>
<p>CppHeaderParser is used in the module that JITs code. CppHeaderParser will parse the header files, from there SWIG code will be generated then compiled. This allows Python to call native C++ code without manually generating intermediary bridge code as is traditionally required by SWIG. </p>
<p>Thanks to Johan Hake for helping me find bugs and test improvements to CppHeaderParser.</p><p>
CppHeaderParser can be found in action in compile_extension_module(...) found in <a href="http://bazaar.launchpad.net/%7Edolfin-core/dolfin/trunk/view/head:/site-packages/dolfin/compilemodules/compilemodule.py" _mce_href="http://bazaar.launchpad.net/~dolfin-core/dolfin/trunk/view/head:/site-packages/dolfin/compilemodules/compilemodule.py">/site-packages/dolfin/compilemodules/compilemodule.py</a> which calls parse_and_extract_type_info(code) found in <a href="http://bazaar.launchpad.net/%7Edolfin-core/dolfin/trunk/view/head:/site-packages/dolfin_utils/cppparser/utils.py" _mce_href="http://bazaar.launchpad.net/~dolfin-core/dolfin/trunk/view/head:/site-packages/dolfin_utils/cppparser/utils.py">/site-packages/dolfin_utils/cppparser/utils.py</a><br _mce_bogus="1"></p>CppHeaderParser 2.2 Released2012-07-05T18:38:02+00:00senex/blog/author/senex/http://senexcanis.com/blog/cppheaderparser-22-released/<p>CppHeaderParser version 2.2 is now released. This release fixed many bugs and added support for parsing free functions.</p><p>Project page can be found at <a href="/open-source/cppheaderparser/" _mce_href="/open-source/cppheaderparser/">http://senexcanis.com/open-source/cppheaderparser/</a><br _mce_bogus="1"></p><p><strong>Implemented Feature Request:</strong><br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3536266" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3536266">3536266</a>: Parsing of free functions</p><p><strong>Fixed bugs:</strong><br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3531219" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3531219">3531219</a>: Nested Classes improperly parsed, when after a defined method<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3535465" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3535465">3535465</a>: Initialization of data in constructors parsed incorrectly<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3536069" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3536069">3536069</a>: templated base class crashes parser<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3536067" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3536067">3536067</a>: virtual base classes is not parsed (when virtual is 2nd key word)<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3536071" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3536071">3536071</a>: templated base class is not parsed<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3540172" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3540172">3540172</a>: defined free functions are not parsed <br _mce_bogus="1"></p>Python Sprinkler project 2.0 relesaed2012-05-14T21:40:02+00:00senex/blog/author/senex/http://senexcanis.com/blog/python-sprinkler-project-20-relesaed/<p>Version 2.0 of the Python Sprinkler Project has been released. 2.0 makes the sprinlker system smarter and includes a bug fix.</p><p>Skip threshold was expanded from just a 24 hour view to a 24 hour and 48 hour view. This allows for skipping a session if it rained heavily 2 days prior if that days rain was very heavy.</p>
<p>Code for detecting chance of rain was fixed, lookups should work now.</p>
<p>Added watering duration adjustment to reduce water when it rains even if our threshold isn't met. Reduciton is proportional to the amount of rain received compaired to the 24 hour threshold. Example: if the threshold is .08 inches and it rains .04 inches in the last 24 hours, it will activate the sprinklers for 1/2 the time.</p><p>The original story can be found at <a _mce_href="/blog/python-sprinkler-project/" href="/blog/python-sprinkler-project/">http://senexcanis.com/blog/python-sprinkler-project/</a><br _mce_bogus="1"></p><p>Project page can be found at <a _mce_href="/open-source/pysprinklers/" href="/open-source/pysprinklers/">http://senexcanis.com/open-source/pysprinklers/</a><br _mce_bogus="1"></p>CppHeaderParser 2.1 Released2012-05-13T14:49:39+00:00senex/blog/author/senex/http://senexcanis.com/blog/cppheaderparser-21-released/<p>CppHeaderParser version 2.1 is now released. This release fixed many bugs and added support for more complex C++ header files. Some features where handling and support were added and improved include:</p><ul><li>unions</li><li>templates</li><li>virtual inheritance</li><li>anonymous structs (and structs in general)<br></li><li>operator overloading functions</li><li>function pointers</li></ul><p>Project page can be found at <a href="/open-source/cppheaderparser/" _mce_href="/open-source/cppheaderparser/">http://senexcanis.com/open-source/cppheaderparser/</a><br _mce_bogus="1"></p><p><br><strong>Fixed bugs:</strong><br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488053" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488053">3488053</a>: Nested classes have incorrect member access specifiers<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488360" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488360">3488360</a>: Inheriting class with namespace causes error<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3487551" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3487551">3487551</a>: Return types of virtual functions start with 'virtual '<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488049" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488049">3488049</a>: Non-manifest constant arrays sizes cause incorrect parsing<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488358" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488358">3488358</a>: Option to suppress printing of warnings and errors<br> To suppress errors do the following:<br> CppHeaderParser.print_errors = 0<br> To supress warnings do the following:<br> CppHeaderParser.print_warnings = 0<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488054" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488054">3488054</a>: Out-of-line inlines / template methods<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488275" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488275">3488275</a>: Template methods reported incorrectly<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488275" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488275">3488275</a>: Template methods reported incorrectly<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491240" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491240">3491240</a>: Explicit constructors are reported as normal methods<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491178" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491178">3491178</a>: Certain template methods are not reported properly<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491232" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491232">3491232</a>: Nested struct causes incorrect access specifiers for parent<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491319" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491319">3491319</a>: Anonymous struct causes crash.<br> Also fixed variable instances followed by struct definitions detecting the type as that struct.<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491334" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491334">3491334</a>: Virtual inheritance causes crash<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3492237" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3492237">3492237</a>: Cast array size reports method named "["<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497164" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497164">3497164</a>: Anonymous structs causes crash<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497160" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497160">3497160</a>: Bad parse when friending forward class<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497155" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497155">3497155</a>: Function declarations cause crash<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497168" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497168">3497168</a>: Constant arithmetic reports bogus methods<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497166" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497166">3497166</a>: Forward struct reports bogus property<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497162" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497162">3497162</a>: Bad parse of nested union<br> Now treat unions like special classes since parsing is a subset<br>3497158 and 3517308: Fixed parsing of template declarations by filtering them out.<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3514728" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3514728">3514728</a>: Multi-line Preprocessor confuses parser<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3517289" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3517289">3517289</a>: Parser crashes if functions are declared under extern "C"<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3514671" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3514671">3514671</a>: Does not parse struct datatype as a struct/class property<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3515330" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3515330">3515330</a>: Namespace causes improper access level in nested classes<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3514672" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3514672">3514672</a>: Incorrect parse of operator=()<br> Added support for all operator oveloads<br> Cleaned up tab warnings<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497170" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3497170">3497170</a>: Function pointers confuse parser<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3523010" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3523010">3523010</a>: Support for multi-word accessor: Return type wrong<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3519178" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3519178">3519178</a>: Problems with namespaces and templates<br> Fixed return type having colons<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3523196" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3523196">3523196</a>: Problems with "advanced" namespace and template usage<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3524327" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3524327">3524327</a>: Pure virtual method lost its constness<br><br><strong>Resolve feature requests:</strong><br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488051" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488051">3488051</a>: Classes are well reported but structs (which are classes except for default access specifier) are not reported at all.<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488050" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3488050">3488050</a>: Identify array data members as arrays<br> Variables have the following 2 new attributes:<br> * array: 0 or 1 depending on if its an array<br> * array_size: If something is between [ and ], that will go here<br> <br><strong>Implement feature request:</strong><br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491220" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3491220">3491220</a>: structs are reported as classes<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3519502" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3519502">3519502</a>: Support for Qt Slots<br> Now curAccessSpecifier supports multi-word accessor specifiers such as "public slots"<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3523198" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3523198">3523198</a>: Add possibility to ignore some symbols<br>Now symbols in CppHeaderParser.ignoreSymbols are ignored.<br>Q_OBJECT is in the list initially<br><a href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3523235" _mce_href="https://sourceforge.net/tracker/?func=detail&group_id=231845&atid=1084294&aid=3523235">3523235</a>: Save "constness" of functions/methods<br> Accessed via the "const" tag</p>Setup Mercurial server with multiple repositories on OpenSUSE2012-02-13T20:39:02+00:00senex/blog/author/senex/http://senexcanis.com/blog/setup-mercurial-server-with-multiple-repositories-on-opensuse/<p>This tutorial is to configure a Mercurial/hg server for multiple repositories on OpenSUSE. Be sure to follow these steps on the server you want to host the repositories on.</p>
<p>First make sure Mercurial is installed</p>
<pre>zypper install hg</pre>
<p>Now create a location for the repositories</p>
<pre>mkdir -p /var/hg/repos</pre>
<p>Create some project as an example</p>
<pre>cd /var/hg/repos<br>hg init super_proj</pre>
<p>Create a config file for hg to know to what to serve (details <a href="http://mercurial.selenic.com/wiki/PublishingRepositories#Configuration_of_hgweb">here</a>). In /var/hg/hg_repos.conf insert the following</p>
<pre>[paths]<br>/ = /var/hg/repos/*<br><br>[web]<br>push_ssl = false<br>allow_push = *</pre>
<p>Now for a startup script (based on <a href="http://mercurial.selenic.com/wiki/hgserve">this</a>). In /etc/init.d/hg_serve put the following</p>
<pre>#! /bin/sh<br>#<br># Startup script for mercurial server.<br>#<br>### BEGIN INIT INFO<br># Provides: hg server <br># Required-Start: $local_fs $remote_fs $syslog $network <br># Required-Stop: $local_fs $remote_fs $syslog $network<br># Should-Start: $time sendmail httpd2 xntpd $named cron ndo2db<br># Should-Stop: sendmail ndo2db<br># Default-Start: 3 5<br># Default-Stop: 0 1 2 6<br># Short-Description: hg server <br># Description: hg server<br>### END INIT INFO<br># Change following ines<br>APP_BIN=/usr/bin/hg<br>SRC=/var/hg/repos<br># Path to PID file of running mercurial process.<br>PID_FILE=/var/hg/hg.pid<br>CONFIG_FILE=/var/hg/hg_repos.conf<br><br>state=$1<br><br>case "$state" in<br>'start')<br> echo "Mecurial Server service starting."<br> ${APP_BIN} serve --webdir-conf=$CONFIG_FILE -d -p 8001 --pid-file ${PID_FILE}<br> ;;<br><br>'stop')<br> if [ -f "${PID_FILE}" ]; then<br> PID=`cat "${PID_FILE}"`<br> if [ "${PID}" -gt 1 ]; then<br> kill -TERM ${PID}<br> echo "Stopping the Mercurial service PID=${PID}."<br> else<br> echo Bad PID for Mercurial -- \"${PID}\"<br> fi<br> else<br> echo No PID file recorded for mercurial<br> fi<br> ;;<br><br>'restart')<br> $0 stop<br> $0 start<br> ;;<br><br>*)<br> echo "$0 {start|stop|restart}"<br> exit 1<br> ;;<br>esac</pre>
<p>Now to finalize things</p>
<pre>chmod +x /etc/init.d/hg_serve<br>chkconfig --add hg_serve<br>service hg_serve start</pre>
<p>(If you are using Debian/Ubuntu, to activate the script run "update-rc.d hg_serve defaults")</p>
<p>Now you should be able to access the server via the web. Just point your web browser to http://<your server ip>:8001</p>
<p>Keep in mind, this setup is for internal servers. Refer to other resources for securing your data!</p>
<p>More information on Mercurial can be found at <a href="http://mercurial.selenic.com/guide/">http://mercurial.selenic.com/guide/</a></p>CppHeaderParser 2.0 released2011-12-31T15:47:45+00:00senex/blog/author/senex/http://senexcanis.com/blog/cppheaderparser-20-released/<p>Thanks to a great amount of work from <a _mce_href="http://www.blogger.com/profile/14287416587600419675" href="http://www.blogger.com/profile/14287416587600419675">HartsAntler</a>, CppHeaderParser has been greatly advanced. 2.0 adds support for parsing more complex C & C++. Resolves some types. Generates much more information for parsed code. 2.0 integrates all changes HartsAntler has done for converting RPython to Javascript in his RPythonic project as covered <a _mce_href="/blog/rpython-to-javascript-uses-cppheaderparser/" href="/blog/rpython-to-javascript-uses-cppheaderparser/">in this article</a>.</p><p>Project page at <a _mce_href="/open-source/cppheaderparser/" href="/open-source/cppheaderparser/">http://senexcanis.com/open-source/cppheaderparser/</a><br _mce_bogus="1"></p>Python Sprinkler project2011-11-10T21:16:30+00:00senex/blog/author/senex/http://senexcanis.com/blog/python-sprinkler-project/<p>When my sprinklers go off in the middle of the night after it was raining that day, I get annoyed. I wanted an intelligent home brew solution to this problem that was cheap and was mostly COTS and not requiring much electrical engineering know how. There are systems out there you can buy that do everything for you that cost hundreds, but thats no fun. I have a system that cost me $45 plus things I already had.</p><p>This system, pysprinklers, is written in python and targeted for Linux. With pysprinklers, you can configure when your sprinklers go off, for how long. Also, if it has rained enough in the past 24 hours it will skip watering the lawn that time to save water. Further, before watering, it will check the forecast to see if its likely to rain soon. If it is, then it will hold off a bit and try again in hopes to conserve water. Oh, and it tweets the whole thing along with rain activity. You can find its twitter account <a title="@jash_the_robot" _mce_href="http://twitter.com/#!/jash_the_robot" href="http://twitter.com/#%21/jash_the_robot">@jash_the_robot</a>.<br></p><p><br></p><h2>The Hardware<br></h2><p><strong>Linux Machine:</strong><br></p><p>I already have a Linux machine that acts as a hobby server. This is built out of an old laptop which hosts many things. I use <a _mce_href="http://www.opensuse.org" href="http://www.opensuse.org">openSUSE</a>. If you dont already have one (and who doesn't), this would be a great use of <a _mce_href="http://www.raspberrypi.org/" href="http://www.raspberrypi.org/">raspberrypi</a>.<br _mce_bogus="1"></p><p><strong>Rain Gauge:</strong></p><p>I found the<a _mce_href="http://www.lacrossetechnology.com/9005/index.php" href="http://www.lacrossetechnology.com/9005/index.php"> WS-9005TWC-IT</a> on clearance for $5. The display unit is useless. To this day it has never connected with the rain gauge. But the tipping bucket rain gauge was exactly what I needed... after a little hacking.</p><p><strong>Game Controller:</strong></p><p>I had an old USB Microsoft sidewinder game pad laying around.</p><p><strong>Window magnet sensor:</strong></p><p>I had one laying around, its one of <a _mce_href="http://www.homesecuritystore.com/p-202-943wg-wh-ademco-miniature-surface-contacts-white.aspx" href="http://www.homesecuritystore.com/p-202-943wg-wh-ademco-miniature-surface-contacts-white.aspx">these</a>.<br></p><p><strong>X10 controller & appliance module:</strong></p><p>You need some method of turning the sprinkler system on and off via a computer. You can control X10 from Linux, so I am using this. I got the controller & module as a gift so that made it a great candidate. The controller I have is a <a _mce_href="http://www.thehomeautomationstore.com/sw31a-cm15a.html" href="http://www.thehomeautomationstore.com/sw31a-cm15a.html">CM15A</a> and the module is a <a _mce_href="http://www.x10.com/automation/am466_s.html" href="http://www.x10.com/automation/am466_s.html">AM466</a>.<br></p><p><strong>Automatic Sprinkler system:</strong></p><p>In order for this solution to work, you need a sprinkler system where you can put it in a constant on state. While in the on state plugging it in turns the sprinklers on, unplugging it turns them off, plugging them in again turns them on and puts them in a new zone. Most houses with automatic sprinkler systems have exactly this.<br></p><h2>Rain Gauge</h2><p>A tipping bucket rain gauge basically teeter totters back and forth as it is raining. When 1 side fills up, it tips to the other side till the other side fills up. The method to read such a rain gauge is to detect when it "clicks". It will either be on the left (on position/close circuit) or it will be on the right position (off position/open circuit). A click is when we alternate between on and off. This particular rain gauge has a magnet on the bucket system. I first add a magnet sensor inside the rain gauge so that in one position it can read the magnet (making sure when the bucket is in the other direction it does not read the magnet). I then connect the wires for the magnet sensor to the game controller so that I can read the button as either being pressed or not pressed.<br></p><p><img title="Rain guage with added sensor" alt="Rain guage with added sensor" src="/site_media/uploads/rain_guage/rain_guage_hacked1.jpg" _mce_src="/site_media/uploads/rain_guage/rain_guage_hacked1.jpg" height="397" width="600"></p><p><br></p><p><img title="Rain guage with added sensor" alt="Rain guage with added sensor" src="/site_media/uploads/rain_guage/rain_guage_hacked2.jpg" _mce_src="/site_media/uploads/rain_guage/rain_guage_hacked2.jpg" height="640" width="400"><br></p><p>At this point the game controllers button state is the same as the rain gauge button state and you can use game controller software to read the rain gauge. In pysprinklers you can find rain_gauge_monitor.py that does exactly this. The clicks will be stored into a sqlite3 database for other applications to use. To use rain_gauge_monitor.py, just start the process and keep it running (Follow the included README).</p><h2>Sprinkler Control</h2><p>To control the sprinklers you first need to make sure you can do it via command line (in my case via X10). I found a project that can control my X10 module <a _mce_href="http://eclipsehomeauto.com/cm15a_on_linux/cm15a.shtml" href="http://eclipsehomeauto.com/cm15a_on_linux/cm15a.shtml">here</a>. With that, I created a wrapper called usbheyu. Connect the X10 controller to your Linux box and the appliance module to your sprinkler system. Make sure that you can turn the sprinklers on & off manually via command line. With this in place your sprinklers should be controllable via sprinkler_manager.py (view README for more info).</p><h2>Tweeting</h2><p>If you would like to have everything tweeted, including the rain activity you need to install the <a _mce_href="http://pypi.python.org/pypi/twitter" href="http://pypi.python.org/pypi/twitter">python twitter module</a>. This comes with a command line twitter tool. Run this so that it can update your desired twitter account.</p><p>With twitter setup, I run rain_tweeter.py every 5 minutes so it can poll for changes. When it detects raining started, it will post. When it detects its done raining, it will post again with the rain fall for the past 24 hours.</p><p>Also, when calling sprinkler_manager.py, use the --tweet option for it to tweet as well.</p><h2>Scheduling/Configuration</h2><p>So you have your rain gauge working, X10(or alternative) controlling your sprinkler system... How do you get it all to work?</p><p>First you need rain_gauge_monitor.py to always be running. I just have a script that keeps it running called keep_rain_gauge_monitor_alive.sh. After that, everything is just a cron job. Here is my crontab</p><p><br></p><pre>#Tweet rain activity<br>*/5 * * * * /opt/pysprinklers/rain_tweeter.py >> /var/lib/house/rain_tweeter.log<br><br>#Keep rain gauge alive (start up if machine was rebooted)<br>*/5 * * * * /bin/sh /opt/pysprinklers/keep_rain_gauge_monitor_alive.sh<br><br>#Run the sprinklers<br>00 02 * * thu,sun /opt/pysprinklers/sprinkler_manager.py --tweet \<br>>> /var/lib/house/sprinkler_manager.log<br><br>#Make sure sprinklers werent left on<br>* * * * thu,sun /opt/pysprinklers/sprinkler_manager.py --rs-check --tweet \<br>>> /var/lib/house/sprinkler_manager.log<br></pre><p>You will want to adjust when to run your sprinklers.</p><p>If you end up using this, let me know in the comments section and give me the twitter account for your bot. <a _mce_href="http://twitter.com/jash_the_robot" href="http://twitter.com/jash_the_robot">@jash_the_robot</a> would like to follow other pysprinkler robots out there.</p><p>Grab the software at <a _mce_href="https://bitbucket.org/senex/pysprinklers" href="https://bitbucket.org/senex/pysprinklers">https://bitbucket.org/senex/pysprinklers</a>, its opensource released under BSD 2.0</p><p>Post regarding version 2.0 available at <a _mce_href="http://senexcanis.com/blog/python-sprinkler-project-20-relesaed/" href="http://senexcanis.com/blog/python-sprinkler-project-20-relesaed/">http://senexcanis.com/blog/python-sprinkler-project-20-relesaed/</a><br _mce_bogus="1"></p>Boss Comic2011-07-10T20:49:37+00:00senex/blog/author/senex/http://senexcanis.com/blog/boss-comic/<p><img src="/site_media/uploads/comics/comic_5000_fish.png" _mce_src="/site_media/uploads/comics/comic_5000_fish.png" height="764" width="500"><br _mce_bogus="1"></p>RPython to Javascript uses CppHeaderParser2011-05-17T21:46:54+00:00senex/blog/author/senex/http://senexcanis.com/blog/rpython-to-javascript-uses-cppheaderparser/<p>A new opensource project at <a _mce_href="http://bit.ly/izHL1A" href="http://bit.ly/izHL1A">http://pyppet.blogspot.com/2011/04/rpython-to-javascript.html</a> used to convert RPython to Javascript uses <a _mce_href="http://senexcanis.com/open-source/cppheaderparser/" href="http://senexcanis.com/open-source/cppheaderparser/">CppHeaderParser</a>. CppHeaderParser included is heavily modified to support parsing of C++ source files. Should changes be integrated into the next release of CppHeaderParser?<br></p><p><br></p><p><br></p>CppHeaderParser 1.9 released2011-03-07T21:30:29+00:00senex/blog/author/senex/http://senexcanis.com/blog/cppheaderparser-19-released/<p>CppHeaderParser 1.9 has just been released. 1.9 is functionally equivelant to 1.8 except support for python 3 was added. More information on CppHeaderParser can be found at <a _mce_href="/open-source/cppheaderparser/" href="/open-source/cppheaderparser/">http://senexcanis.com/open-source/cppheaderparser/</a><br _mce_bogus="1"></p>How to add dropdown menus to mezzanine2011-02-07T21:21:52+00:00senex/blog/author/senex/http://senexcanis.com/blog/how-to-add-dropdown-menus-to-mezzanine/<p>This is a quick tutorial on how to get mezzanine to give you dropdown menus.</p><p>First, at the top of base.html where you link style sheets add the following line:</p><pre><link rel="stylesheet" href="{{ MEDIA_URL }}css/dropdown_menu.css" type="text/css" /></pre><p>Second you need to change base.html. Find somewhere at the top where you want your menu that is not within a grid960 container element. and add the following snippet:</p><pre><!-- start menu --><br><div class="container_12 clearfix" id="top-nav-section"><br> <div id="grid-top"><br> <div id="menu"><br> {% page_menu "pages/menus/tree.html" %}<br> </div><br> </div><br></div><br><!-- end menu --></pre><p>finally, create the file at {{MEDIA_URL}}css/dropdown_menu.css and insert the following content:</p><pre>/* Take from http://www.cssmenumaker.com/builder/menu_info.php?menu=057 */<br>#menu{<br> border:none;<br> border:0px;<br> margin:0px;<br> padding:0px;<br>}<br>#menu ul{<br> height:35px;<br> list-style:none;<br> margin:0;<br> padding:0;<br>}<br>#menu li{<br> float:left;<br> padding:0px;<br>}<br>#menu li a{<br> background:#000000;<br> color:#cccccc;<br> display:block;<br> font-weight:normal;<br> line-height:35px;<br> margin:0px;<br> padding:0px 25px;<br> text-align:center;<br> text-decoration:none;<br>}<br>#menu li ul{<br> background:#000000;<br> display:none;<br> height:auto;<br> padding:0px;<br> margin:0px;<br> border:0px;<br> position:absolute;<br> width:225px;<br> z-index:200;<br>}<br>#menu li:hover ul{<br> display:block;<br>}<br>#menu li li {<br> display:block;<br> float:none;<br> margin:0px;<br> padding:0px;<br> width:225px;<br>}<br>#menu li:hover li a{<br> background:none;<br>}<br>#menu li ul a{<br> display:block;<br> height:35px;<br> font-size:12px;<br> font-style:normal;<br> margin:0px;<br> padding:0px 10px 0px 15px;<br> text-align:left;<br>}<br>#menu li ul a:hover, #menu li ul li:hover a{<br> border:0px;<br> text-decoration:none;<br> color: #bbbbbb;<br>}<br>#menu p{<br> clear:left;<br>}</pre><p>Now if you hover over menu items with subpages you should see those secondary pages. You may have to change the background color from black to whatever fits best with your site.<br></p>alphaomegacontractors.com re-design complete!2011-01-30T13:19:41+00:00senex/blog/author/senex/http://senexcanis.com/blog/alphaomegacontractorscom-re-design-complete/<p>It's been a few months in the making, but the new <a _mce_href="http://alphaomegacontractors.com" href="http://alphaomegacontractors.com">alphaomegacontractors.com</a> is complte! With the new design clients and potential customers can do a search within the web site. There is no more flash, this means that iPhones and other mobile devices won't be greeted by broken sections within the web page. The entire site is pure html + css + javascript. Speaking of iPhones. If you access the site from a mobile device (Android, iPhone...), the site will look completely different. You will get the mobile version of the site that has that native app look and feel.</p><p>The new site is built on the latest tech! The quickly emerging <a _mce_href="http://python.org" href="http://python.org">Python</a> dynamic programming language. The <a _mce_href="http://www.djangoproject.com/" href="http://www.djangoproject.com/">Django </a>framework sky rocketing in use. And built atop the 2 is <a _mce_href="http://mezzanine.jupo.org/" href="http://mezzanine.jupo.org/">Mezzanine</a> which did all the hard work for me.</p><p>The new <a href="http://alphaomegacontractors.com/" _mce_href="http://alphaomegacontractors.com/">alphaomegacontractors.com</a> is a site that is now awesome. For a company that is awesome and filled with employees that are awesome.<br></p>How to enable editing of the home page from the admin interface for mezzanine2011-01-29T20:24:54+00:00senex/blog/author/senex/http://senexcanis.com/blog/how-to-enable-editing-of-the-home-page-fom-the-admin-interface-for-mezzanine/<h2>UPDATE</h2>
<p>Mezzanine has gone through a lot in 2+ years and has a proper way f supporting the home page now. Following are the new instructiosn that come with urls.py</p>
<pre> # HOMEPAGE AS AN EDITABLE PAGE IN THE PAGE TREE<br> # ---------------------------------------------<br> # This pattern gives us a normal ``Page`` object, so that your<br> # homepage can be managed via the page tree in the admin. If you<br> # use this pattern, you'll need to create a page in the page tree,<br> # and specify its URL (in the Meta Data section) as "/", which<br> # is the value used below in the ``{"slug": "/"}`` part.<br> # Also note that the normal rule of adding a custom<br> # template per page with the template name using the page's slug<br> # doesn't apply here, since we can't have a template called<br> # "/.html" - so for this case, the template "pages/"<br> # should be used if you want to customize the homepage's template.</pre>
<h2>Old method</h2>
<p>A drawback of using <a href="http://mezzanine.jupo.org/">mezzanine</a> is that you cannot edit the home page from the admin interface. Here are quick instructions of how to change this</p>
<p>1) Create a page and call it "home"</p>
<p>2) edit urls.py and add the following snippet</p>
<pre>from mezzanine.pages.views import page<br><br>def home_page(request):<br> request.path = "/"<br> return page(request, "home")</pre>
<p>3) Still in urls.py, replace</p>
<pre>url("^$", direct_to_template, {"template": ""}, name="home")</pre>
<p>with</p>
<pre>url("^$", home_page, name="home"),</pre>
<p>You should end up with something that looks like the following:</p>
<pre>urlpatterns = patterns("",<br> ("^admin/", include(admin.site.urls)),<br> url("^$", home_page, name="home"),<br> ("^", include("mezzanine.urls")),<strong><br><br><br></strong></pre>