Wednesday, November 18, 2009

Distinct in datatable

This is how to do a distinct in a datatable in Visual Basic. It is derived from http://support.microsoft.com/default.aspx?scid=kb;en-us;326176#1 and also look at this definition http://weblogs.asp.net/eporter/archive/2005/02/10/370548.aspx for multiple columns / fields.

Private

Function ColumnEqual(ByRef A As Object, ByRef B As Object) As Boolean

' Compares two values to see if they are equal. Also compares DBNULL.Value.
' Note: If your DataTable contains object fields, then you must extend this
' function to handle them in a meaningful way if you intend to group on them.

If IsDBNull(A) And IsDBNull(B) Then

Return True

End If

If IsDBNull(A) Or IsDBNull(B) Then

Return False

End If

If A = B Then

Return True

End If

End Function

Public Function SelectDistinct(ByVal TableName As String, ByRef SourceTable As DataTable, ByVal FieldName As String) As DataTable

Dim dt As New DataTable(TableName)

Dim dr As DataRow

dt.Columns.Add(FieldName, SourceTable.Columns(FieldName).DataType)

Dim LastValue As Object = DBNull.Value

For Each dr In SourceTable.Select("", FieldName)

If IsDBNull(LastValue) Or Not ColumnEqual(LastValue, dr(FieldName)) Then

LastValue = dr(FieldName)

dt.Rows.Add(LastValue)

End If

Next

Return dt

End Function

Monday, November 16, 2009

What really ticks me off..

is that I like some of the things on Al-Gore TV, otherwise known as current_tv. God help me.

http://current.com/sarah-haskins/

Actually, this is the only person that I follow...and she isn't for kids. Dang it, why do the political gods do this to me?

Friday, November 6, 2009

Tyranny Again

Pelosi Breaks Pledge to Put Final Health Care Bill Online for 72 Hours Before Vote

http://www.weeklystandard.com/weblogs/TWSFP/2009/11/pelosi_breaks_pledge_to_put_he.asp

Evidently, it is too much to submit the bill to the stupid american public before the house votes to end freedom as we know it. The health plan will put our LIVES into the hands of faceless bureaucrats that take our money at the threat of imprisonment and will eventually bankrupt our country. I though Social Security would eventually do that, but it seems that we are bound to destroy our country a lot faster than that.

I have gone from loving my country and principles to hating what we have done with it.

Friday, October 30, 2009

Net Neutrality

I listen to Glenn Beck and he recently is against "Net Neutrality". I have yet to understand why conservatives are against this. The only thing I can think of is that they don't want government intrusion, which I understand, but that isn't the thrust of the situation. This has to deal with corporations stopping other competing corporations. For example, I get Netflix and I stream movies to my computer. My cable company (internet provider) is also contemplating entering into the same market. What the Net Neutrality legislation is to correct is stopping my cable company "slowing down" Netflix or "Speeding Up" their service. If Netflix becomes so slow, I would switch to the cable company's offering. This is to stop anti-competative behavior. Most cable companies are monopolies and are already regulated. Net Neutrality is to force Internet Providers to not filter datastreams and showing favoritism for any reason, other than legal ones.
 
Am I missing something here? I don't want my cable company effectively limiting my choice of where I go on the internet. I don't want a faster stream to CNN than Fox News.

Wednesday, October 28, 2009

The Speech

Ronald Reagan.

http://video.google.com/videoplay?docid=-1777069922535499977

http://www.ronaldreagan.com/sp_23.html

This is the issue of this election. Whether we believe in our capacity for self-government or whether we abandon the American Revolution and confess that a little intellectual elite in a far-distant capital can plan our lives for us better than we can plan them ourselves.

Transformers - Revenge of the Fallen

Rating:
Category:Movies
Genre: Science Fiction & Fantasy
I've only watched 20 minutes of this horror and I couldn't take it anymore. I felt myself losing IQ points. So, the shard falls (one of them, I find) and creates little robots. All is cool. They start shooting up the place. Can't the cube create nice little robots like the autobots or are they all gung-ho to kill everything? Bumblebee comes it to save the day, and all Shia can do is berate him for leaving the garage? And that girl....what an aweful performance. The script is worse than Star Wars at times without any of the redeeming qualities.

I don't know if I'll ever watch the rest.

Saturday, September 5, 2009

Krauthammer's article

I thought this article was extremely insightful.

http://www.washingtonpost.com/wp-dyn/content/article/2009/09/03/AR2009090302859_pf.html

 

By Charles Krauthammer
Friday, September 4, 2009

What happened to President Obama? His wax wings having melted, he is the man who fell to earth. What happened to bring his popularity down further than that of any new president in polling history save Gerald Ford (post-Nixon pardon)?

The conventional wisdom is that Obama made a tactical mistake by farming out his agenda to Congress and allowing himself to be pulled left by the doctrinaire liberals of the Democratic congressional leadership. But the idea of Harry Reid and Nancy Pelosi pulling Obama left is quite ridiculous. Where do you think he came from, this friend of Chávista ex-terrorist William Ayers, of PLO apologist Rashid Khalidi, of racialist inciter Jeremiah Wright?

But forget the character witnesses. Just look at Obama's behavior as president, beginning with his first address to Congress. Unbidden, unforced and unpushed by the congressional leadership, Obama gave his most deeply felt vision of America, delivering the boldest social democratic manifesto ever issued by a U.S. president. In American politics, you can't get more left than that speech and still be on the playing field.

In a center-right country, that was problem enough. Obama then compounded it by vastly misreading his mandate. He assumed it was personal. This, after winning by a mere seven points in a year of true economic catastrophe, of an extraordinarily unpopular Republican incumbent, and of a politically weak and unsteady opponent. Nonetheless, Obama imagined that, as Fouad Ajami so brilliantly observed, he had won the kind of banana-republic plebiscite that grants caudillo-like authority to remake everything in one's own image.

Accordingly, Obama unveiled his plans for a grand makeover of the American system, animating that vision by enacting measure after measure that greatly enlarged state power, government spending and national debt. Not surprisingly, these measures engendered powerful popular skepticism that burst into tea-party town-hall resistance.

Obama's reaction to that resistance made things worse. Obama fancies himself tribune of the people, spokesman for the grass roots, harbinger of a new kind of politics from below that would upset the established lobbyist special-interest order of Washington. Yet faced with protests from a real grass-roots movement, his party and his supporters called it a mob -- misinformed, misled, irrational, angry, unhinged, bordering on racist. All this while the administration was cutting backroom deals with every manner of special interest -- from drug companies to auto unions to doctors -- in which favors worth billions were quietly and opaquely exchanged.

"Get out of the way" and "don't do a lot of talking," the great bipartisan scolded opponents whom he blamed for creating the "mess" from which he is merely trying to save us. If only they could see. So with boundless confidence in his own persuasiveness, Obama undertook a summer campaign to enlighten the masses by addressing substantive objections to his reforms.

Things got worse still. With answers so slippery and implausible and, well, fishy, he began jeopardizing the most fundamental asset of any new president -- trust. You can't say that the system is totally broken and in need of radical reconstruction, but nothing will change for you; that Medicare is bankrupting the country, but $500 billion in cuts will have no effect on care; that you will expand coverage while reducing deficits -- and not inspire incredulity and mistrust. When ordinary citizens understand they are being played for fools, they bristle.

After a disastrous summer -- mistaking his mandate, believing his press, centralizing power, governing left, disdaining citizens for (of all things) organizing -- Obama is in trouble.

Let's be clear: This is a fall, not a collapse. He's not been repudiated or even defeated. He will likely regroup and pass some version of health insurance reform that will restore some of his clout and popularity.

But what has occurred -- irreversibly -- is this: He's become ordinary. The spell is broken. The charismatic conjurer of 2008 has shed his magic. He's regressed to the mean, tellingly expressed in poll numbers hovering at 50 percent.

For a man who only recently bred a cult, ordinariness is a great burden, and for his acolytes, a crushing disappointment. Obama has become a politician like others. And like other flailing presidents, he will try to salvage a cherished reform -- and his own standing -- with yet another prime-time speech.

But for the first time since election night in Grant Park, he will appear in the most unfamiliar of guises -- mere mortal, a treacherous transformation to which a man of Obama's supreme self-regard may never adapt.

Saturday, August 22, 2009

HC Monstrosity revisited.

http://blog.flecksoflife.com/2009/07/19/the-hc-monstrosity/

Enjoy the read as much as I did. Incredible that anybody even printed this, let alone have it pass committee.

Post Turtle

While suturing a cut on the hand of a 75 year old rancher, who's hand
was caught in the gate while working cattle, the doctor struck up a
conversation with the old man.. Eventually the topic got around to
Obama.

The old rancher said, 'Well, ya know, Obama is a 'Post Turtle''.
Not being familiar with the term, the doctor asked him what a 'post turtle' was.
The old rancher said, 'When you’re driving down a country road and you
come across a fence post with a turtle balanced on top, that's a 'post
turtle'.

The old rancher saw the puzzled look on the doctor's face so he
continued to explain. ‘You know he didn't get up there by himself, he
doesn't belong up there, and he doesn't know what to do while he's up
there, and you just wonder what kind of dumb ass put him up there to
begin with.’

Wednesday, August 19, 2009

Obamanomics don't fly.

A great article on our president and health care.

http://www.bloomberg.com/apps/news?pid=20601039&sid=aJ01reSCujDQ

The proliferation of Obama’s gaffes and non sequiturs on health care has exceeded the allowable limit. He has failed repeatedly to explain how the government will provide more (health care) for less (money). He has failed to explain why increased demand for medical services without a concomitant increase in supply won’t lead to rationing by government bureaucrats as opposed to the market. And he has failed to explain why a Medicare-like model is desirable when Medicare itself is going broke.

The public is left with one of two unsettling conclusions: Either the president doesn’t understand the health-insurance reform plans working their way through Congress, or he understands both the plans and the implications and is being untruthful about the impact.

Neither option is good; ignorance is clearly preferable to the alternative.

Sunday, August 16, 2009

Harry Potter and the Half Blood Prince.

Rating:★★★
Category:Movies
Genre: Science Fiction & Fantasy
Yes, there were some portions that were left out for the movie. Overall though, I wasn't that impressed with this movie. I wasn't that impressed with this book, to be quite frank. I guess a weak book makes for a weak movie.

Tuesday, July 28, 2009

The foolishness of wind dependency

http://www.investors.com/NewsAndAnalysis/ArticlePrint.aspx?id=483403

...legislators are promoting "green" energy and jobs, via new mandates, standards, tax breaks and subsidies. However, the U.S. would need 180,000 1.5-megawatt wind turbines by 2020, just to generate the 600 billion kilowatt-hours of electricity needed to comply with the Waxman-Markey global warming bill, retired energy and nuclear engineering professor James Rust calculates.

Erecting these forests of concrete and steel would require millions of acres of scenic, habitat and agricultural lands, and 126 million tons of concrete, steel, fiberglass and "rare earth" minerals for the turbines (700 tons per turbine); prodigious quantities of concrete, steel, copper and land for new transmission lines; and still more land, fuel and raw materials for backup gas-fired generators.

I don't think our legislators have a feakin' clue.

Saturday, July 25, 2009

Tuesday, July 21, 2009

Some more in the health care debate.

A great article is here.

http://www.bostonherald.com/blogs/news/lone_republican/index.php/2009/07/21/no-obamacare/

Obama’s plan to reform health care is dangerous.  It is not the right prescription for the United States.

Here are some concerns to consider:

1. Government should not take over 17% of GNP.  To quote Michael Steele, it is “reckless.”

2. Joe Biden admitted that the Obama administration “misread” the economy.  That mistake cost us $787 billion.  What if the Obama administration is wrong about their health care plan?  It could cost us trillions of dollars.

3. As I have stated before, if the government-run plan is so great, then why are no Congressional Democrats supporting the amendment to require that lawmakers use the same system?

4. Did you know that if a government health care bureaucrat denies a medical procedure, you cannot pay for it with your own money?  You will not be allowed to privately hire doctors.  And they say there is no rationing happen in this bill.

5. Check out this chart on how it will work.  88 government agencies will oversee health care.

6.  How does the agency of “Cultural & Linguistic Competence Training” improve health care or lower the costs?

7. Here in Massachusetts we already know that when the government interfere that costs increase.  Over the past 2 years, small business have been hit hard with a 50% increase in health insurance premiums.  The cause of this drastic increase is the government mandates.

8. The Obama Administration claims that their plan is not going to add to the national debt.  No one can believe that hogwash!  According to the President, this plan will save money because people will no longer visit emergency rooms for non-emergencies.  Yeah right.  That’s what they thought here in Massachusetts.  Emergency rooms visits have not decreased.

9. Health care costs will continue to rise under this bill.  For example, it does not address the issue of medical liability.  With costs skyrocketing, the middle class will be forced to join the government-run insurance option and hence we will have socialized medicine.

Overall we have the best health care system in the world.  Let’s fix it not ruin it!

(Please see previous posts on ideas for health care reforms.)

 

On page 16 of the house bill states:

(A) I

N GENERAL.—Except as provided in this paragraph, the individual health insurance issuer offering such coverage does not enroll any individual in such coverage if the first effective date of coverage is on or after the first day of Y1.

 

So, you can't buy individual insurance after this. Great. Damn politicians.

Saturday, July 4, 2009

Why democrats do what they do.

http://bighollywood.breitbart.com/tslagle/2009/07/03/trust/

Great article.

There is nothing more secure to Democrats than a big bureaucracy–it makes them feel safe. Perhaps that’s why so many of them linger on in colleges longer than the average American. Inefficient bureaucracies and musty old buildings with union swept halls are warm fuzzy places for them.  These people are the kind that like being looked after–it is the natural state of the Left.

They want to live under a huge bureaucracy that will direct their life, from the time they are born into a government hospital through their time in government schools, then punch the clock at a government job until a government appointed doctor gives them an assisted suicide. A Democrat Utopia would be like a human zoo where the lions are kept separate from the zebras, every one is fed, and the doctor comes round once a year. Just keep re-electing Democrats who will insure the air is clean, your food is safe, your retirement is secure, and the tithe is paid.

That’s a big one. When you decide to become a Democrat, the need for you to ever contribute to charity is completely eliminated. Every election cycle Democrat candidates are exposed for being skinflints when the 1040s are released. There is always a ridiculously small number on the lines of where charitable deductions are listed. The contribution is always so small you would think it was an accident, like they thought their $100 donation to the Breast Foundation was a subscription to a porn site.

In actuality, I think they believe that membership in the Democrat Party is their donation to charity. The Party is their Church and the leaders are their clerics. Why should Al Gore give more than a couple hundred bucks to charitable causes when he has made his life work saving the earth from prosperity? (That could explain why so many of Obama’s appointees didn’t feel the need to pay taxes–churches are tax-exempt.)

Perhaps we'll all understand the phrase "Give me liberty, or give me death."

Friday, June 26, 2009

Global Warming Bill

This piece of **** just passed the house. Kirk, senate hopeful in Illinois appears to have voted for it. He just lost my vote.

Absolute facist despots these people are. I don't want to go through my life shedding a tear each time I read the constitution.

He gives us his reasons below.

http://www.wlsam.com/getpodcast.aspx?sid=17451&lid=5149&id=1396255&source=2&url=http://wlsam.1871dev.com/content/img/f50629/dr-with-mark-kirk-7-2-total.mp3

BS. The reason that he voted this way is because he took money from certain PACs. It is always money. I'll donate to his challenger. 

BTW, why wind wont work.

http://www.americanthinker.com/2009/07/taking_the_hot_air_out_of_wind.html

Saturday, June 6, 2009

Some humor

U.S. gives Flight 93 site landowners one week to sell

http://www.philly.com/philly/news/local/20090606_U_S__gives_Flight_93_site_landowners_one_week_to_sell.html

What a stupid country. These people selflessly died to save others, and now the government forces people off their land to memorialize it. Words cannot express.

Terminator Salvation

Rating:★★★
Category:Movies
Genre: Science Fiction & Fantasy
Eh. Not so much.

At least they didn't disown the third movie, like the Superman series. It didn't tie it up in a bow, but I was very surprised to see Arnold again, if only in CGI. Other than that, there wasn't much to recommend this. Some things were hard to swallow.

http://www.ericdsnider.com/movies/terminator-salvation/