Saturday, July 3, 2010

How to build a Standard Gambrel truss

To build a Standard Gambrel truss only requires the Pythagorean theorem and knowing the width of the gambrel.

A standard Gambrel is 1/2 as high as its width, has equal length slopes (labeled 'c'), and fits inside a semi-circle. The slopes meet at a 45 degree angle from the center, and each end will be cut at a 22.5 degree angle.

So basically if you know the Pythagorean theorem, and the width - you can calculate the length of each slope.

If you see the square (two sides are dashed lines) in the picture above - the diagonal splitting the square is the same length as the height and half of the width (This is labeled 'h'). We need to find the length of a:
Pythagorean Theorem:
a^2 + b^2 = h^2
Since this is a square, a and b are equal, so: 2a^2 = h^2
or: a^2 = ( h^2 / 2)


To calculate b, we take half the width 'h', and subtract 'a' that we just calculated.
b = h - a

And finally, to calculate the length of the slope, use the Pythagorean Theorem again:
a^2 + b^2 = c^2

So to put it all into one formula:
(h^2)/2 + ( h - sqrt((h^2) / 2) )^2 = c^2


If you are trying to build an 8 x 8 shed, the Gambrel width will be 8', so: h = w/2 = 4
(4^2)/2 + ( 4 - sqrt((4^2) / 2) ) ^2 = c^2
8 + ( 4 - sqrt(8) ) ^2 = c^2
8 + 1.37 = c^2
sqrt(9.37) = c
3.06ft = c
So each slope is: 36.72 inches



Friday, August 7, 2009

Goodbye Immculate Conception



When I was 13 or 14 years old, one of the greatest things happened to me, and I didn't even know it. I was asked to accompany a small choir in the West End of Johnstown, PA. on their Adam Stein Pipe Organ. I had only been playing in church for a few years, and my dad agreed to jockey me across town every Thursday for practice, and again every Sunday morning until I got my drivers license. At that age, it is hard to appreciate... almost anything. but this choir, and this organ, in this church was amazing. The organ is not an overly large instrument - 32 Ranks - but what it lacked in size, it had in quality.

The instrument was unique to me, as I had never seen and organ that did not have a concave, fanned-out pedal board. This one is complete flat and the pedals are perpendicular to the organ case. Having been moved twice, and surviving multiple fires, the instrument was converted to electronic action from the original tracker action sometime in the 1980's (prior to my experience at the church).

I played at Immaculate Conception for years, was married there, and my oldest child was baptised there. I stopped quite a few years ago, just before my family and I relocated from Johnstown to Pittsburgh. This past June, I received a phone call from one of the choir members informing me that the church is scheduled to close in July, and asked if I would be willing to accompany them for a farewell concert at the end of June. Needless to say - I jumped at the chance.

The concert was on a Saturday evening and the expected turnout was 75-100 people at best..., but that evening, people came through the church doors by the dozens. In all my years at that church, I have never seen a crowd like the one that showed up that night. 300+ people filled the pews, and there was not much standing room left the back of the church. I played a few Midnight Mass's on Christmas Eve that came close, but not like that. It was not my best performance playing that night, but I loved every minute of it. And so did the people. I do not think a person left during the 1.5hour presentation - and the church, not being air conditioned, was quite warm. I had the honor of staring the performance with the Pachabel Cannon, and also ending it with a favorite of the parishioners - The Battle Hymn of the Republic - in which the arrangement has very nice 4 part harmony (sung a Capella), and ends with powerful full-organ Amens! The choir director - also the organ builder that restored this particular organ - played "Come Holy Ghost" which if I remember correctly he arranged himself.

Certainly going to miss that instrument... and sure wish I would have got better pictures...




Sun IDM - Testing if an Account Exists in a Resource

I am currently working on a an IDM project where only a certain type of user was added to the IDM directory on the initial load. This presented a problem when a user came across the ActiveSync resource (FlatFile in this case) that was already present in the resource, but not in IDM.

The standard <Disable> when feedOp != create, was not sufficient, because feedOp equals create for users in this case, and default calculations would take place in IDM wiping out the updated data that already existed in the resource (LDAP).

To work around this issue, I wrapped all the fields that should only be calculated/modifyed on a "CREATE" process in a <Field> and the set the <Disable> on that field to a Rule that queries the LDAP resource looking for the uid and if it is found - disables those fields.

The Rule code:
<block>
<invoke name='getResourceObjects' class='com.waveset.ui.FormUtil'>
<ref>:display.session</ref>
<s>User</s>
<s>ldap</s>
<map>
<s>searchScope</s>
<s>subtree</s>
<s>searchFilter</s>
<block>
<concat>
<s>(uid=</s>
<ref>waveset.accountId</ref>
<s>)</s>
</concat>
</block>
<s>searchAttrsToGet</s>
<list>
<s>uid</s>
</list>
</map>
</invoke>
</block>


And the sample <Form> <Field>:
<Field name='LdapCreateFields'>
<Disable>
<neq>
<rule name='IsAccountInLDAPRule'/>
<null/>
</neq>
</Disable>
<Field name='global.SecretQuestion1'>
<Default>
<s> </s>
</Default>
</Field>
<Field name='global.SecretQuestion2'>
<Default>
<s> </s>
</Default>
</Field>
<Field name='global.UIDNumber'>
<Expansion>
<rule name='calcUid'/>
</Expansion>
</Field>
...
...
</Field>