Article of the day
  Walutport PA, Weather

Monday, March 10, 2010 »
Fair and 32 F

Fair
Winds are Calm. The pressure is 1015.1 mb and the humidity is 82%. Last Updated on Mar 10 2010, 2:51 am EST.


  This Day In History

Courrières Mine Disaster (1906)

The Courrières mine disaster, the worst mining accident in European history, killed 1,099 miners in Northern France. It is generally agreed that the majority of the deaths and destruction were caused by an explosion of dust which swept through the mine, however, it has never been ascertained what caused the coal dust to ignite in the first place. A group of thirteen survivors, later known as the rescapés, was found by rescuers twenty days after the explosion. How had they survived? Discuss

Learn More »
  Birthday Lore

Birthday Lore of the Day for Wednesday, March 10, 2010

With a quick perception and a keen understanding of human nature, you are led by suggestion rather than by force. The love and friendships you inspire are true and lasting, and you have no real enemies. You are observing, like to travel, and will do so extensively.

From The Old Farmer's Almanac.

Learn More »

  Technology

Determining Whether a String Is Contained Within a String Array (Case Insensitive)

About once every couple of months I need to write a bit of code that does one thing if a particular string is found within an array of strings and something else if it is not ignoring differences in case. For whatever reason, I never seem to remember the code snippet to accomplish this, so after spending 10 minutes of research today I thought I'd write it down here in an effort to help commit it to memory or, at the very least, serve as a quick place to find the answer when the need arises again.

So without further adieu, here it is:

Visual Basic Version:

If stringArrayName.Contains("valueToLookFor", StringComparer.OrdinalIgnoreCase) Then
    ...
Else
    ...
End If

C# Version:

if (stringArrayName.Contains("valueToLookFor", StringComparer.OrdinalIgnoreCase))
    ...
else
    ...

Without the StringComparer.OrdinalIgnoreCase the search will be case-sensitive. For more information on comparing strings, see: New Recommendations for Using Strings in Microsoft .NET 2.0.

Happy Programming!

Learn More »

  Additional News

Nigerian Army Failed to Heed Warnings

At least 200 Christian villagers were massacred on Sunday in central Nigeria. The killings are believed to have been carried out as revenge for the slaying of 300 people, mostly Muslims, in January. Now, a local Christian organization is accusing the army of ignoring warnings of the impending violence and of taking hours to respond after receiving a distress call. A local politician also claims to have informed military leaders several hours before the massacre that suspicious people with weapons had been seen by villagers, but the army apparently ignored the tip. Discuss

Learn More »