Why I will not vote for Obama



I will not vote for Barack Obama for President of the United States, and here's why.

Fair warning: This is going to be a long one. I've begun with a short summary. If you'd like to know the details behind each claim, read on.

Short version

  1. He is the most pro-abortion president in history, arguing even for the killing of born children*.
  2. He has thrown out the 1st Amendment by directly attacking the freedom of religion.
  3. He is the most financially irresponsible president in history.


Long version


(more…)

Read More

New Alert

Override alert() With jQuery UI Dialog

This is a quick trick I wanted to share.

Have you ever wanted to customize the appearance of alerts to fit the theme of your website? If you're using jQuery UI, it's almost stupid how easy it is.

Check it out:

Just add this to the top of your javascript

1
2
3
4
5
6
7
8
9
10
11
12
13
window.alert = function(message){
    $(document.createElement('div'))
        .attr({title: 'Alert', 'class': 'alert'})
        .html(message)
        .dialog({
            buttons: {OK: function(){$(this).dialog('close');}},
            close: function(){$(this).remove();},
            draggable: true,
            modal: true,
            resizable: false,
            width: 'auto'
        });
};

And add a little bit of CSS to make it look nicer

1
2
3
4
5
6
7
8
9
.alert
{
    font-size: 1.3em;
    padding: 1em;
    text-align: center;
    white-space: nowrap;
    width: auto;
    word-wrap: normal;
}

Usage

Now, calling:

1
alert('This is a test of the <strong>new</strong> alert!');

Gives you:

(With the jQuery UI Smoothness theme)

Notice, you can use HTML in your alerts now.

Caveats

Since the old alert was an actual modal window, and this new one is simply mimicking it from inside the main document, there are a few differences in behavior that are worth noting.

  • The new alert will not raise a window event like the old alert did. If your window is not in focus, the user will have no idea anything has happened.
  • The new alert does not block javascript execution like the old alert did. With the old alert, as soon as it's triggered, all javascript stops and waits for the user to close the alert box.
  • Because the new alert is non-blocking, you can have multiple alerts open at the same time. In the case of multiple alerts, the user will see them in reverse chronological order, which can be confusing.

Fallback

If you simply have to have your window-event-raising, javascript-execution-blocking, one-at-a-time, boring alerts, then you could also provide a fallback like so:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
window.old_alert = window.alert;
window.alert = function(message, fallback){
    if(fallback)
    {
        old_alert(message);
        return;
    }
    $(document.createElement('div'))
        .attr({title: 'Alert', 'class': 'alert'})
        .html(message)
        .dialog({
            buttons: {OK: function(){$(this).dialog('close');}},
            close: function(){$(this).remove();},
            draggable: true,
            modal: true,
            resizable: false,
            width: 'auto'
        });
};

Then use like so:

1
2
3
4
5
6
7
// New Alert
alert('This is a <strong>new</strong> alert!');

// Old Alert:
alert('This is an old, boring alert.', true);
// Or:
old_alert('This is an old, boring alert.');

Conclusion

As long as the caveats aren't a problem for you (hint: they shouldn't be in a well-designed web application) or the fallback works for you, enjoy your snazzy new alerts!

Read More

GeorgeWashingtonPraying

What Thanksgiving Is All About

"Prayer at Valley Forge" by Arnold Friberg

Today is an important day for our country. It is the national holiday of Thanksgiving, characterized by a parade, a huge turkey dinner, football, and a day of sale-fueled insanity to follow.

These days, so many people try to break us away from the distractions and tell us what Thanksgiving is all about. They say it's spending time with family, thanking the people around us, remembering how fortunate we are, etc. While these sentiments are all true in some respect, they miss the whole truth of why Thanksgiving was established in the first place.

Rather than trying to explain it, why not refer to the words of the man who declared it as a holiday in the first place?

That man was our first president, George Washington, and this is what he said:

WHEREAS it is the duty of all nations to acknowledge the providence of Almighty God, to obey His will, to be grateful for His benefits, and humbly to implore His protection and favour; and Whereas both Houses of Congress have, by their joint committee, requested me "to recommend to the people of the United States a DAY OF PUBLIC THANKSGIVING and PRAYER, to be observed by acknowledging with grateful hearts the many and signal favors of Almighty God, especially by affording them an opportunity peaceably to establish a form of government for their safety and happiness:

NOW THEREFORE, I do recommend and assign THURSDAY, the TWENTY-SIXTH DAY of NOVEMBER next, to be devoted by the people of these States to the service of that great and glorious Being who is the beneficent author of all the good that was, that is, or that will be; that we may then all unite in rendering unto Him our sincere and humble thanks for His kind care and protection of the people of this country previous to their becoming a nation; ...

Source: Early America

You should also check out the image of the original document, "Thankfgiving" spelling and all.

So take a minute today to remember where we came from, what has happened before us, and most importantly, to pray and give thanks to God for this country and everything else with which He has blessed us.

After all, that is, in fact, what this holiday is all about.

home

Read More