25 Nov 2011 @ 11:14 PM 


Gabriel Iglesias Presents Stand-Up Revolution
Gabriel Iglesias – Evolution of Life
www.comedycentral.com
Comedy Central Funny Videos Funny TV Shows

Print Friendly
Share
Posted By: Glenn
Last Edit: 25 Nov 2011 @ 11:14 PM

EmailPermalinkComments Off
Tags
Categories: Humor, Life Issues, Video

 10 Nov 2011 @ 7:32 PM 

With every release of the .NET Framework, more power has been placed in the developer’s hands.  We can now concentrate on the overall process of our applications rather than developing the low-level functionality.  In this post, I’ll start creating a simple RSS reader using ASP.NET and LINQ.

Feed Definitions

The first step is to decide how to define the RSS feed information and how our program will use it.  The basic information we’re going to need will be:

  • The name of the feed.
  • The URL of the feed.

For ease of maintenance, and to allow updating the list without having to edit our source code, we’ll store the feed definitions in an external file.  There are many options for this and we’ll use the easiest option: XML.  Our file will have a basic format, only storing the basic information that we need:

Selec All Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!--?xml version="1.0" encoding="utf-8" ?-->
<Feeds>
  <Feed>
    <Name>Stuck In Customs</Name>
    <Url>http://www.stuckincustoms.com/feed/</Url>
  </Feed>
  <Feed>
    <Name>2000 Things You Should Know About C#</Name>
    <Url>http://csharp.2000things.com/feed/</Url>
  </Feed>
  <Feed>
    <Name>There, I Fixed It!</Name>
    <Url>http://feeds.feedburner.com/ThereIFixedIt</Url>
  </Feed>
</Feeds>

We’ll store this information in a basic class:

Selec All Code:
1
2
3
4
5
public class FeedDefinition
{
    public string Name { get; set; }
    public string Url { get; set; }
}

Loading the Feed Definitions

Now that we have our feed definitions stored in an external file and a class defined to store the information, we need to load that data into our application. Before we had the .NET Framework, we would have to read in the file and create our own XML parser in order to load the data. This process has become easier with each version of the .NET Framework.

By utilizing LINQ, the process of obtaining the data from an XML file has become quite easy:

Selec All Code:
1
2
3
4
5
6
7
8
XDocument feedDefinitions = XDocument.Load(Server.MapPath("Feeds.xml"));
 
var feeds = from feed in feedDefinitions.Descendants("Feed")
            select new FeedDefinition()
            {
                Name = (string)feed.Element("Name"),
                Url = (string)feed.Element("Url"),
            };

Using just one line of code (line 1), the entire feed definition file is loaded and parsed for you. The contents are stored in an XDocument object.  Processing this object using LINQ (lines 3-8), we obtain a collection of FeedDefinition objects (IEnumerable<FeedDefinition>) that we will use in our web page.

Building The Display

Now that we have our data, we need to be able to display it to the user. We will use a drop-down list control that will allow the user to select a feed for reading. In our ASP.NET content page, we’ll define the our display as this:

Selec All Code:
1
2
3
4
5
6
7
8
9
10
<div class="feedList">
    Feed:
    <asp:DropDownList ID="FeedList"
                      DataValueField="Url"
                      DataTextField="Name"
                      runat="server" />
    <asp:Button ID="OpenButton"
                Text="Open"
                runat="server" />
</div>

The drop-down list box will be bound to our feed data that we read in earlier. However, we have two fields in our data. Using the DropDownList control, we can display the Name property to the user and use the Url property for processing later on.

Putting It Together

Now that we have our feed definitions and our display, we just need to put them both together:

Selec All Code:
1
2
FeedList.DataSource = feeds;
FeedList.DataBind();

This code binds our feed definition collection to the drop-down list control. All we need to do now is put our code into our content page’s Page_Init method so that it’ll populate our control the first time our page is loaded.

Selec All Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
protected void Page_Init()
{
    XDocument feedDefinitions = XDocument.Load(Server.MapPath("Feeds.xml"));
 
    var feeds = from feed in feedDefinitions.Descendants("Feed")
                select new FeedDefinition()
                {
                    Name = (string)feed.Element("Name"),
                    Url = (string)feed.Element("Url"),
                };
 
    FeedList.DataSource = feeds;
    FeedList.DataBind();
}

It’s important that you load the feed definitions in Page_Init() rather than in Page_Load().  Putting them in Page_Init() will prevent the drop-down list control from getting reinitialized during postback when we implement our Open button in Part 2.

When we load our website, we get our list of feeds neatly displayed in our control:

Conclusion

In this post, we wrote the first half of our simple RSS reader web application. By using the .NET Framework and the LINQ feature, we were able to load a list of RSS feeds into our web page without writing a lot of code.

In part 2, we’ll show how to get a list of posts from the feed and display them along with other data related to the posts.

Print Friendly
Share
Posted By: Glenn
Last Edit: 10 Nov 2011 @ 07:35 PM

EmailPermalinkComments Off
Tags
Categories: Development

 21 Jul 2011 @ 7:33 AM 

Shortly before 6am, those of us who live in Southwest Florida were treated, once again, to the signature “Boom Boom” from the space shuttle after another successful mission into space.  This is one of the many benefits that we get in this part of the country.

I remember the first time I heard the double sonic booms.  It rattled my whole house and my reaction was “WHAT WAS THAT!!!!”  I thought someone had set off an explosion and used a little bit too much nitro.  Then, I came to my senses and realized that the space shuttle was returning and that the sound I heard was the double sonic booms that I had heard so much about.

This morning, although it was a sweet sound to hear, it was also bitter.  This was the last time that I will ever hear that sound.  Today was the last time that a space shuttle will ever land because the entire program has been shut down.  For thirty years, the space shuttle has been the workhorse of our space program.  For most people in this country, the space shuttle is all that they know.

Sadly, there is no program that is ready to take its place.  For the foreseeable future, the United States will have to rely on other countries to get humans into space.  Much of the technology that exists in our society, from food preservation to computers, traces its roots back to NASA and the space program.  Many industries were formed as a result of the space program in the past forty years since the first Mercury flight in 1959.

Another sad result of the cancellation of the shuttle program is the hundreds of people connected with the program at NASA that are being laid off.  When you combine this with even more that will suffer the same fate at companies that are connected with the program, many thousands will loose their jobs during one of the worst economic times in our country.  This will have a drastic effect on our technology programs and our economics.

The NASA budget is just a small fraction of the budget of this country.  Yet, the economic benefit that has resulted from it more than pays for the program.  The “Return on Investment” from the NASA budget far exceeds that from any other budget item, including education, welfare and other pork projects that our “elected” leaders come up with.

My hope is that someday we will return to space.  The benefits of the space program far out-weigh the risks.

Print Friendly
Share
Posted By: Glenn
Last Edit: 21 Jul 2011 @ 07:33 AM

EmailPermalinkComments Off
Tags
Categories: News, Space, Technology

 18 Mar 2011 @ 7:53 PM 

embedded by Embedded Video

Print Friendly
Share
Posted By: Glenn
Last Edit: 18 Mar 2011 @ 07:53 PM

EmailPermalinkComments Off
Tags
Categories: Life Issues, News, Video

 18 Mar 2011 @ 7:45 PM 

embedded by Embedded Video

Print Friendly
Share
Posted By: Glenn
Last Edit: 18 Mar 2011 @ 07:45 PM

EmailPermalinkComments Off
Tags

 11 Feb 2011 @ 9:48 PM 

 Originally Posted February 2, 2011 in the Baptist Press


Posted on Feb 2, 2011 | by Art Stricklin

ARLINGTON, Texas (BP)–NFL experts and newspaper headline writers have been quick to label Green Bay starting quarterback Aaron Rodgers the "Leader of the Pack."

Something about 4,712 yards passing and 34 touchdowns, and leading the Packers to the verge of their first Super Bowl title in more than a decade will do that for you.

But Rodgers made it clear in Tuesday’s jam-packed Super Bowl XLV Media Day he only wants to be a leader of God’s pack when it comes to influencing others to see his faith in Jesus Christ.

"We all have a platform, we all have a message in our lives," Rodgers told Baptist Press and a worldwide media turnout, which ringed his individual interview area. "I just try to follow Jesus’ example, leading by example."

During his six years with the Packers, his career has seen enough twists and turns, dead ends and detours to test anyone’s faith. An expected top 10 draft choice, he lasted until the end of the first round for reasons he never understood. He stood on the sidelines for three seasons while Packers quarterback Brett Favre went through his yearly will-he-or-won’t-he retirement routine as Packers QB.

Finally given a chance to start three years ago, he has matured into one of the top quarterbacks in the league, but not forgetting his past, present and future in Christ.

"God always has a plan for us, a path. Sometimes we wish we knew it sooner," Rodgers said with a bit of a laugh, "but He always shows up His way."

He credits his parents, Ed and Darla Rodgers, who still live in Northern California where he was raised, for showing him a loving and Christ-centered household. He also remains close to his two longtime accountability partners, Pastors Andrew Burchett of the Neighborhood Church in Chico, Calif., and Young Life Christian youth group leader Matt Hock.

Even in the midst of the craziness of Super Bowl week and Tuesday’s Media Day at Cowboys Stadium, Rodgers had already checked in with his accountability team.

"They won’t be here Sunday, but they’ve been calling and texting me," he said. "Matt sent me a photo of his entire Young Life group decked out in Packers gear."

Rodgers’ quiet and humble testimony has been enough to inspire Christian NFL fans everywhere and his own teammates as well.

Rookie defensive end C.J. Wilson, whose father is a Pentecostal minister in Mt. Olive, N.C., said he really didn’t know what to expect when he showed up for his first NFL season this year. But when he saw the experience of his star quarterback and his witness, Wilson felt encouraged with his own professional football faith.

"I think it does help when your superstar quarterback is walking with God. I’ve been blessed to be around him and see how God makes all things possible in our lives," Wilson said.

Packers wide receiver Greg Jennings is one of Rodgers’ receivers and teammates on the field, but more importantly, a spiritual brother on and off the field. He said he’s determined to let Sunday’s game against the Pittsburgh Steelers be his platform for God.

"I just want to let people know what it’s all about. One of the Scriptures I refer to a lot is, ‘to whom much is given, much is required,’ and I’m required to have a voice [for God] because I have a stage and a platform," Jennings said.

"Number one, all glory goes to God. That’s where it starts and that’s where it finishes."

His father, Greg, Sr., is the pastor of Progressive Deliverance Ministries in Kalamazoo, Mich.

Packers defensive tackle Ryan Pickett has been inspired to join an anti-pornography campaign in the NFL this year to help rid the destructive influence among his friends and teammates. He said he had to turn down the invitations of his teammates this week and other times who wanted him to go places he knew was not right.

"I value my family and my wife. I try to stay away from that," Pickett said.

Green Bay kicker Mason Crosby doesn’t have to be reminded about the number of Super Bowl games which have come down to a final touchdown or field goal, including the last Super Bowl held in Texas when the New England Patriots won on a last-second kick in Houston.

But he said his faith in Christ won’t allow him to be defined by a single kick.

"I think He helps me knowing that kicking is what I do, not who I am. It’s not everything that I am. I can escape knowing that my relationship with Christ is what carries me."

Crosby has also noticed his quarterback’s faith and his example to his teammates and the sports world.

"Aaron has a great relationship with the Lord," Crosby said. "He’s the face of the franchise and it helps to see he’s living the message all of the time.

"I’m always reading in the Proverbs and Psalms to relax my mind before we play," Crosby added. "I know that God cares for me all the time regardless of any outcome here."

–30–

Art Stricklin is a Dallas-based sports correspondent. With reporting by Jerry Pierce, managing editor of the Southern Baptist TEXAN (www.texanonline.net), newsjournal of the Southern Baptists of Texas Convention.

 

Print Friendly
Share
Posted By: Glenn
Last Edit: 11 Feb 2011 @ 09:48 PM

EmailPermalinkComments Off
Tags
Categories: Religion, Sports

 11 Feb 2011 @ 8:56 PM 

embedded by Embedded Video

Print Friendly
Share
Posted By: Glenn
Last Edit: 11 Feb 2011 @ 08:56 PM

EmailPermalinkComments Off
Tags
Categories: Life Issues, News, Politics, Video





 Last 50 Posts
 Back
Change Theme...
  • Users » 3
  • Posts/Pages » 248
  • Comments » 22
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight