Wednesday, October 9, 2013
Gmail Sucks
I’m now searching for an alternative email solution that will be sustainable and easy to manage. My preference at the moment is live.com. I’ve had a live.com address for years and it has remained easy to manage and frustration free. It seems like a logical transition.
If you know of other free email solutions, please let me know your thoughts.
Friday, July 20, 2012
The Water Runs Dark Once Again
Thursday, April 23, 2009
Using Generics To Perform a Dynamic Cast in .NET WinForms
UPDATE: I modified the article after tweaking the code some to make it more efficient. Instead of passing the entire parent control, I simply pass the control collection associated to the parent.
This is a solution I came up with to handle the issue of dynamic casting of controls. In this case I had a situation where I needed to be able to specify a control or form parent control collection and the name of the control I wanted to emulate and access the properties of. I wanted to be able to use a dynamic object to access the properties of an object embedded within a form without having to hard code any specific values associated to identifying that control.
Here's the actual class that implements the generic type that I will use to cast a located control from. The generic variable is itemType. I loop through the parent collection of controls and locate the control I seek to emulate as a Control type. Once found, perform a DirectCast to cast from Control type to the generic itemType. The function then returns the itemType specified in the object instantiation :
VB.NET
Public Class NewGenericControl(Of itemType As {Control, New})
Public Sub New()
End Sub
Public Function GetControlByName(ByVal controls As Control.ControlCollection, ByVal ctlName As String) As itemType
Dim newCtl As New itemType
' Loop trhough the controls on the parent to locate the desired control to manage
For Each ctl As Control In controls
If (ctl.Name.StartsWith(ctlName)) Then
newCtl = DirectCast(ctl, itemType)
Return newCtl
End If
Next ctl
Return newCtl
End Function
End Class
C#
public class NewGenericControl<itemType> where itemType : Control, new()
{
public NewGenericControl()
{
}
public itemType GetControlByName(Control.ControlCollection controls, string ctlName)
{
itemType newCtl = new itemType();
// Loop trhough the controls on the parent to locate the desired control to manage
foreach (Control ctl in controls) {
if ((ctl.Name.StartsWith(ctlName))) {
newCtl = (itemType)ctl;
return newCtl;
}
}
return newCtl;
}
}
Here's the code that accesses the class by specifying a control type. It's only two lines of code. In this case I am emulating a PictureBox that I used to act as a button. As you can see, I'm accessing the Enabled property of the control itself through the generic instance of the control:
VB.NET
Dim splitContainer As New NewGenericControl(Of ucQuestionManager)
splitContainer.GetControlByName(Me.TabPage2.Controls, "ucQuestionManager").JumpToQuestion(questionId)
C#
NewGenericControl<ucQuestionManager> splitContainer = new NewGenericControl<ucQuestionManager>();
splitContainer.GetControlByName(this.TabPage2.Controls, "ucQuestionManager").JumpToQuestion(questionId);
Here's another example with a TreeView control that was embedded in a SplitContainer panel control inside the form:
VB.NET
Dim splitContainer As New NewGenericControl(Of SplitContainer)
Dim newTree As New NewGenericControl(Of TreeView)
newTree.GetControlByName(DirectCast(splitContainer.GetControlByName(m_parent.ParentForm.Controls, "SplitContainer1").Panel1, Control).Controls, "treeAnswerList").Nodes(Me.QuestionId).Nodes.Add(1, m_answerValue)
C#
NewGenericControl<SplitContainer> splitContainer = new NewGenericControl<SplitContainer>();
NewGenericControl<TreeView> newTree = new NewGenericControl<TreeView>();
newTree.GetControlByName(((Control)splitContainer.GetControlByName(m_parent.ParentForm.Controls, "SplitContainer1").Panel1).Controls, "treeAnswerList").Nodes(this.QuestionId).Nodes.Add(1, m_answerValue);
As you can see you can directly access embedded controls even by passing in an emulated instance of the parent container control! Sweet...
Sunday, August 31, 2008
Why did John McCain vote against education programs designed to reduce the number of abortions when he claims to be pro-life?
In 2005 there was a bill proposed to increase the funding on this effort. John McCain voted against it. Here's the actual bill that he voted against:
Unintended Pregnancy Amendment
S AMDT 244 to S Con Res 18: To expand access to preventive health care services that reduce unintended pregnancy (including teen pregnancy), reduce the number of abortions, and improve access to women's health care.
Project Vote Smart's Synopsis:
Vote to adopt an amendment to the Senate's 2006 Fiscal Year Budget that allocates $100 million for the prevention of unintended pregnancies.
Highlights:
- Increases funding and access to family planning services
- Funds legislation that requires equitable prescription coverage for contraceptives under health plans
- Funds legislation that would create and expand teen pregnancy prevention programs and education programs concerning emergency contraceptives
Source: http://votesmart.org/issue_keyvote_detail.php?cs_id=V3489&can_id=53270
See John McCain's full voting record: http://votesmart.org/voting_category.php?can_id=53270
I'd personally like to know why John McCain feels that sex education programs are not important enough to deserve government funding. For a man who claims to be pro-life, why is he not interested in reducing the number of abortions? The root of the cause is lack of awareness and poor education. In the grand scheme of things, this is not a huge priority, but it is a big one none the less. It definitely deserves some strong government focus in my humble opinion. One of the lines in this bill's description that I find most important is "improve access to women's health care." Why is it that John McCain feels that this is an unworthy cause?
Conclusion, John McCain doesn’t get it. He just votes where his party tells him to vote without making any intelligent decisions on his own. This was only one of his voting blunders that I felt most disturbed about. Feel free to look at his entire voting history to see some of the others.
Wednesday, August 20, 2008
I'll take boring over brainless anyday...
- The belief that race accounts for differences in human character or ability and that a particular race is superior to others.
- Discrimination or prejudice based on race.
--------------------------------------------------------------------------------
spe·cies·ism (spē'shē-zĭz'əm, -sē-) n.
Human intolerance or discrimination on the basis of species, especially as manifested by cruelty to or exploitation of animals.
speciesist spe'cies·ist' adj. & n.Many of my friends and family have simply refused to watch the video series that I recently blogged about called "Earthlings". They fear that the contents of these video's is so gruesome and disturbing that they simply won't be able to bear it. I don't blame them for fearing this material. This series contains some of the most disturbing content that I've ever seen, but what is the point of living in a world in which you are too afraid to face the truth and too afraid to educate yourself about the realities of humanity. It is fear that enables these disturbing acts to continue.
Imagine what our world might be like today if people had been too afraid to face the truth about human slavery. If you had the chance to live during a time in which humans were bartered and traded as slaves, would you have sat in silence and done nothing? Would you have taken it upon yourself in the face of ridicule and insult to fight back against something that you knew was wrong?
It saddens me deeply that we are ok with treating life forms as objects rather than living beings that have meaning and life of their own. People are too afraid to face the truth let alone actually do something to change it. That's why I am considering participating in a demonstration against the Ringling Bros. Circus that is coming to Austin. IDA (In Defense of Animals) will be sponsoring demonstrations at the events. You can read about the specifics at the IDA Website.
If you need a little motivation, try watching these videos...
Sunday, August 17, 2008
Boycott Olympic Boxing…
I’m the first to admit I’m not a big sports fan. I don’t usually watch sports, but I’ve recently been sucked into the injustice that seems to be plaguing the Olympic Boxing events. If you’ve been watching these events then you already know what I’m talking about. The scoring process is severely flawed. Points are awarded inconsistently and it almost seems that certain countries are favored over others. The commentators of the boxing events made comments like “I can’t believe he didn’t get a point for that shot” or “this is unbelievable!” while laughing in a state of disgust at the poor scoring techniques employed by the judges.
I eventually reached a point where I could no longer watch this event because the scoring was so ridiculously all over the map that I just found myself getting more and more pissed off at the judges. I just had to change the channel. This is a complete joke and boxers who have worked hard and trained hard are being robbed of their hard work and dedication. While you’re watching this crap, you find yourself wanting to plead with someone to do something! I’m so disgusted that I would go so far as to say that the United States should boycott the boxing events for these Olympic Games. Seriously… This is ridiculous and so frustrating. I’m just disgusted.
Tuesday, July 29, 2008
A new path... Becoming a vegetarian...
As a human being and an inhabitant of the planet earth, I have a greater sense of reason and awareness than any other life form on this planet. That puts me and all of those who are like me in a position of great responsibility. It is up to us to care for and assist all the living creatures of this planet. It is our job to ensure their wellbeing and to protect them and do the best we can to give them a peaceful existence. In comparison to the simple life forms that exist on our planet, we are like living gods. Because of our self awareness and abilities to reason and comprehend pain and suffering, love and harmony, balance and instability, we have power over all things here. The life forms that exist around us rely on us to treat them as we would expect a living god to treat us. If you’ve ever believed in a higher power, then perhaps you already know what it’s like to want to reach out to something greater than us for help and guidance. We are in a position to give that to life forms that exist on this planet and any other planet that we explore or inhabit in the future.
Today I realized that becoming a vegetarian was no longer a choice of convenience, it is a choice to love. I choose to no longer support the barbaric practices that seek to support the harvest and torture of living creatures. There is so much suffering in this world, my choice will have little to no impact, but I believe in the future more humans will reach an enlightened state in which we all choose compassion over selfish desires, even our own selfish desire to survive. I realized today that the vegetarian life style is way ahead of its time. It’s composed of a minority of people who have the courage to stand up against those who are void of compassion and have the courage to accept their responsibility to protect the simpler life forms that we rule over. I find a fitting relation to those who have stood against human tyranny in our human history. Like the people who fought with their lives to abolish human slavery. We have much to learn as humans. We have so much power and so little wisdom to contain it.
If you’re interested in watching the video that I’m referring to, you can see it here:
Earthlings Part 1
Earthlings Part 2
Friday, June 27, 2008
Thursday, June 26, 2008
My new toy...
Yes, finally! I'm about to purchase this sweet bad boy. Well it's not much of a bad boy. This will be my first bike. It's a moderately low powered sport bike (250cc) and is perfect for a beginner like me. I'm scheduled to take my motorcycle class on the weekend of July 3rd. Shortly there after my new bike will be delivered to my house. Can't wait!

Sweet helmet to go with it perhaps? With a hefty price tag of about $700.00
Wednesday, June 25, 2008
Trip to Ridgeway, Colorado
Gorgeous waterfall near Red Stone
Working hard on the ranch, which oddly never felt like work

A spin on the ATV through the Aspen trees
These cows kept following me in every direction, earning me the title of cow whisperer
The peak of Cimmeron Ridge

Thursday, June 12, 2008
The Zoo in my back yard....
These little devils visit me just about every night. I feed them on occasion, so they keep coming back for more. I had an old chunk of BBQed pork in my fridge that I was going to throw away and decided to give it to the opossum instead. These guys appear to be very young. Opossums tend to get much larger than this.
It was rather amusing to watch them both drag this huge piece of meat around from one corner of the yard to the other. They were so enthralled by the tasty meat, that they completely ignored my presence. I was able to get within 3 or 4 feet of them and just sat there watching them enjoy their meal. They let me get a little closer to them every time I feed them. Some additional reading on Opossums: http://en.wikipedia.org/wiki/Common_Opossum
I'm frequently visited by many species of birds on a daily basis. There are about 3 families of Blue Jays, 2 families of Cardinals, 2 or 3 families of Mocking Birds, countless Morning Dove, and a lot more that I can't identify.
In addition I've got about 4 squirrels that visit me often as well. Unfortunately once I get Abby, all of the critters will no longer be welcome. Abby will more than likely run them all off.
Wednesday, June 11, 2008
It's official, Abby will be our new family member...
Tuesday, June 10, 2008
On My Way to Ridgeway, Colorado
I'll be leaving for Ridgeway on the morning of Monday 6/16 and returning 6/23. I'll be staying at my step dad's ranch "Sawtooth Mountain Ranch". I hope to do some hiking while I'm there as well as some Fly fishing with my brother-in-law Lee and nephew Caleb. Supposedly every morning you can see a large heard of Elk in the front yard of the ranch. The Courthouse Mountain and Sawtooth Mountains are within hiking distance of the ranch. I'm excited beyond words about making the trip. I'll definitely post some pics of the journey when I get back.
Trying to adopt Abby...
Monday, June 2, 2008
CAMELBAK: The best water bottle I've ever owned...

I can't say enough good things about the Camelback Hydrate or Die water bottle. It's ideal for any situation. It has a decent list of features as far as a water bottle goes not to mention that it's made by a high quality manufacturer known by most avid campers and hikers. I bought two of these bottles, one for each of my children. It has a spill proof flip top dispenser that will only dispense liquid when you bite down on it, which is ideal for my kids since they love to chew on their straws. It's dishwasher safe and very durable. It has a convenient handle at the top of the bottle that can be used to strap onto a backpack or other carrying device. The nozzle also flips down to conceal itself inside the top area. It will hold a little over 24oz of liquid, which equates to about 3 glasses of water. The bottle itself is made of a recyclable material. It's sturdy and attractive. I intend to buy a few more of these bottles to keep around the house for everyday use.

The price tag of these bottles starts at about $12.99 per bottle. Not cheap, but well worth it if you have kids and are constantly mixing drinks for them to take on the road. Especially since it gets so hot here in central Texas, this is ideal to help keep the kiddos hydrated during outings or even just to take to school with them to ensure that they always have a source of liquids that I know they'll drink during the day. There are many different colors available. I bought mine from the Sportsman's Warehouse in Round Rock, but I'm willing to bet they're easy to find. I give this bottle a 5 star rating where ever I see it. I highly recommend it.
Thursday, May 29, 2008
Gemma Hayes... The best kept secret
Found Stockwell's Scorpion Content
In addition, I have found the "What's That Bug" (http://www.whatsthatbug.com/) Website to be very informative as well. Although not as detailed as Dr. Stockwell's contributions, still educational and insightful.
I'm also considering getting a tattoo of a scorpion on my right upper arm. I've got a few sketches already. More on that later...
Giant rare moth finds its way into my house...
There are no words to describe my elation when I discovered this creature flapping around inside my home Tuesday (5/27) night. I first mistook the giant moth (here after known as Andre) for a small bird or a bat. I wasn't able to tell that it was in fact a moth until it landed near the peak of my ceiling.

It rested there long enough for me to grab a container to capture it in. I was extra careful not to harm him and he simply flew right into the container where he sat peacefully while I continued to snap photos of him. The markings on Andre were simply stunning and difficult to describe. The patterns on his wings seem to take on a bone like appearance. I laughed to myself as I thought, perhaps this is the moth of death coming to pay me a visit. In my 33 years of living in Round Rock, Texas I have never witnessed anything like this up close. I have no idea what type of moth this is and would be very interested in finding out more about it. I'll update this post at a later date when I have time to research this critter.
After snapping a few photos of Andre, I promptly released him back into the wild. I set him free in the backyard where he proceeding to fly off into the night sky. What a lucky experience this was. I sat and stared at him for a good 20 minutes or more studying his anatomy. He seemed only happy to oblige as he simply sat there in the microwaveable dish peacefully resting while I gazed upon his incredible markings.
Thursday, May 22, 2008
In Memory Of Sunny The Swissy















