Thursday, August 28, 2008

My version of a literary review

Not of books. Of movies. Because a good movie done right is far better and descriptive than a book.

AeonFlux - 2005

Find the truth. Don't follow an ideal blindly or based on prejudice. Classic Sci-fi style of a movie, definitely well composed visually. The story remains simple and easy to follow as the movie explains the setting and story. The movie brings up a valid point of cloning, what will cloning do to one's mind? Thumbs up.

(Did I mention that I watched all of Firefly in 2 or 3 days?! Ya when I watch something, I watch it all)

The Prestige - 2007

Well done. A bit jumpy and unclear in the timeline. The movie required a second watching for me to completely put the sequence of events and location in order. Spoiler Warning: The first time I watched the movie I was unsure whether or not Tesla actually built a device that duplicated an object while also transporting the object, or if Tesla used the hats and cat to further convince and con Robert Angier. The answer is clearly evident at the end of the movie. I'm unsure if the director was seeking to have this question raised in a viewer's mind. It could be that I am just an engineer and if I am not mistaken, Tesla was more interested in research of transmitting electricity/power in replace of objects. The more I think about the ending, the more disturbing the plot appears. Thumbs up.

Both movies watched twice, and for once, I returned the items on time to the library.

Tuesday, August 26, 2008

Textbox submit NOW!


Good ol' Internet Explorer won't handle a button click event with a page postback form an enter key with only 1 textbox.

1. Add an invisible textbox (as the solution from above article)
2. Put in a panel and set DefaultButton

Sunday, August 24, 2008

Friday: Work summer retreat. Things I learned: [1] People at my work are amazing. [2] I can't think on my feet, or sitting.

I think so much, that I find it hard to explain my thoughts through the limit of tongue and mouth. Do I have mental issues? Probably.

So after the work summer retreat, I went to Robert Morris park to play disc golf. For old times sake, and because I had a bit of time on my hands, I parked at the nature trail and walked 20 minutes to the park. My legs were still tired from a 5k that I ran in 27 minutes the previous night.

The disc golfing: First 9 holes I played by myself, I was able to kinda follow where the holes kinda went. One hole, my disc landed under a small pine tree. As I reached for the disc, I saw a small snake, which took me by surprise. I'm pretty sure it was just a garter snake, but I'm not a snake expert. Anyways, I got my disc and the snake did not cause any problems. Second 9 holes I ran into Zak a fellow kamsc classmate. He recognized me before I recognized him. He and his 2 friends let me play along. They are far better at disc golf than me, plus they had to help me find my disc multiple times. Thanks, I am very grateful. The tall grass of a large open field is difficult to find a disc as well as the tall grass irritating the skin.

A 20 minute walk back to my car and a ride home. Saturday, I decided to pick up a putter, the innova polecat (which I'm officially calling the purty pink polecat putter). My parents purchased it for my birthday along with the drum sticks that I received early.

Glad the Olympics are over and that it's a clear night for star gazing!

Wednesday, August 20, 2008

Oh, bomba

I had a friend tell me:
"i dont think mccain will do a good job controlling government spending"

I got to reading Obama's view on technology. The amount of money that Obama wants to spend on technology alone is starting to blow my mind:

-"Barack Obama will use the most current technological tools..."
because we know that most current technologies are really cheap and the employment of the people with professional technical skills of the most current technologies is even cheaper.

-"He will require his appointees to employ all the technological tools available to allow citizens not just to observe, but also to participate and be heard in these meetings."
Right. Actually, let me post the entire bullet point:
-"Requiring his appointees who lead Executive Branch departments and rulemaking agencies to conduct the significant business of the agency in public, so that any citizen can watch a live feed on the Internet as the agencies debate and deliberate the issues that affect American society. He will ensure that these proceedings are archived for all Americans to review, discuss and respond. He will require his appointees to employ all the technological tools available to allow citizens not just to observe, but also to participate and be heard in these meetings. "
This just sounds expensive. Big Brother the reality tv show meets Big Brother the government. Also, how exactly do 300,000,000 people participate in a meeting?

I don't think Obama understands that everyone can't his every decisions. We elect officials to make decisions for us. Obama is a little child who is incapable of making a decision for himself. Let me get back on focus instead of his immaturity.

Actually I'm sick of reading Obama's page of crap. Basically, Barack's idea for technology:
1. Spend more money
2. Spend even more money
3. Spend yet even more money because he can't make is own decisions.

Barack Obama doesn't knows the basics of government, he's young and immature. He wants to conqurer the world by spending my money.

Tuesday, August 19, 2008

... of a down

5. And now my bass drum pedal broke.

Yup, I'm one of those people, I only buy what I need. Right now, I feel like putting aside drumming. Time for a break of unknown length. I am not sure if playing every Sunday this past summer has made me lose interest or the frustrations and time commitment has lead to this conclusion.

With classes only a hop and a skip away, maybe the mindset of putting drums aside is good. I'm not sure, but time will only tell. Time. Time to move on.

Monday, August 18, 2008

News of a down

1. There is a big rip in my resonant snare head from I don't know.
2. You can't enter in a race until you upgrade your class level. Class-sitting is no longer allowed.
3. Class 4 with a bad cart
4. Cloudy tonight, no star gazing. Not going to see 32 shooting stars in one hour now like I did 8/12/2008.

like you cared.


I played tennis after work today and played 2 matches (best of 3 sets). The wind was off/on down at the wmu courts but not overwhelming. I won the first match 6-2, 6-2. I switched raquets to my backup raquet (which is bent). The second game went about the same, I won 6-2, 6-0.

Unfortunately, my game was far below par. My forearm has been fairly sore and thus my serve was more hit or miss than usual. Building my leg muscles from biking seems like I could move around the court better, but I think I've just grown to be lazy because my legs felt like bricks.

That's all I got to say about that.

Thursday, August 14, 2008

Row Numbering

I came across a precarious situation today at work. I needed to write a paging stored procedure for use with a DetailsView. The situation and solution for start to finish is described at Unfortunately the sql database was currently running on an instance of sql 2000. Row_Number() is a specific function avaliable with sql 2005, not sql 2000.

The sql query I developed seems to work for an equivalent to Row_Number(). My case only had one sorting method, and I know that my column that is being sorted is unique. thus simplifying some matters.

Let's presume we have a Table1 with columns ID as an int, Code as a varchar, and Name. Table1 should be sorted by the column Code.

SELECT ID, Code, Name
FROM Table1
WHERE (Code < (SELECT Code FROM Table1 WHERE (ID = t.ID)))
) AS RowNum FROM Table1 AS t ORDER BY Code

Whilst this may not be very efficient or pretty, it gets the job done. Basically this query has a sub query to count the number of rows that are less than the current Code (which is selected by a further sub query).

Unorthodox probably, as bad as a GOTO statement maybe, works under the right circumstances.

Wednesday, August 13, 2008

Viewing the details

Frustrations I came about using DetailsView for that are obvious but can be overlooked.

For custom Next/Previous/First/Last buttons:
CommandName="Page" CommandArgument="..."
[Command arguments paramters]
Yes the buttons need to be in a template of the DetailsView control, they cannot be outside. Make sure they aren't outside if they aren't working....grrrr.

To access an item in the Pager template:

In the aspx page, set the DataKeyNames to allow SQL Statements to be updated/deleted.


Tuesday, August 12, 2008

For each string cheese in package

Classic lines actually used in a program for a computer science class:

foreach (string cheese in the_package)


/// the answer is in the pop (not the soda)
/// aka not in_mouth.Soda()
return in_mouth.Pop();

Quite possibly Nerd Levels of 4 (Nerd Levels)

Friday, August 08, 2008

not funny

A comedian tells a joke to a crowd, people will laugh if the joke is funny, people will laugh if other people are laughing, or people won't laugh because the joke was not funny.

A comedian tells a joke to an individual, the person will laugh because the joke is funny, the person will not laugh because they do not understand the joke, or the person will not laugh because the joke was not funny.

Social conformity.

Sunny After Sunset

According to, tonight after the sunsets the weather will still be sunny out. Intriguing...


Oh and next time you go in for surgery, make sure your surgeon plays a wii.

Thursday, August 07, 2008

The Hard Style

I've been listening to the Hardstyle and Happy hardcore channels during work these past few weeks. At about 8 hours of music, say 3 minutes a song, that roughly 160ish different songs. Unlike regular fm radio stations where I would hear maybe 20 different songs in 8 hours. Some how the music seems to drive me.

Fog is when the dew point is just below the temperature. Hopefully tonight will offer some glimmering stars.

Monday, August 04, 2008

Pace of life

I always wish life would slow down, but I always tend to find myself making life busier and busier. My ability to plan underestimates the time/commitment/etc... of the activities. A day full of biking and exploring, a night full of stargazing wonders, somehow even that would find a way to get busy.

piece and cheers

Friday, August 01, 2008

Reporting Work

At work I've been assigned to upgrading reports that are in Access and Crystal Reports into SQL Server Reports. The project website is being developed in Visual Studio 2008 with the 3.5 framework. Naturally we wanted to develop the reports and have them contained in the 2008 project. Visual Studio 2008 supports reports but does not support a Report Server Project. My frustrations and solution to reports in VS 2008 is found below, however, we decided to stick with developing the reports in VS 2005 (BIDS).

Here is the best solution I was able to come up for building reports in Visual Studio 2008.

1. Create a new web application project (or open the your current project).

2. Add New Item to your project. Select a Report and give it a name. Note that these reports are rdlc not rdl. ( for information on rdlc versus rdl)

3. Now to add the dataset for the report data. Add New Item again, this time add a DataSet. This should walk you through a wizard for adding a new DataSet. Note that if you have a connection string in your web.config file to point to a database, you WILL still NEED to add a NEW connection string. It will give you servers to choose from that currently exist in the Server Explorer. Once you add a new connection string through this dataset wizard it will be avaliable for the next TableAdapter that you add. Grrrr... I'm going to stop here because I have many gripes...

4. A tableadapter for a dataset that you want for a report should now exist. Go back to the Report rdlc file (you may have to click around on the design area to get all the menu items to show up) and select Report, Data Sources..., find the DataSet that you just created and Add to Report

5. Build the report now that you have the dataset information.

Now let's say you have built many reports and want to use 1 report viewer to dynamically display the reports in a report viewer. Add a new page or open an existing aspx page. Add a Report Viewer to the page. (This is were I think things get ugly, and there may be a better solution, feel free to post a comment if there is a better solution)

Report View definition on aspx page:

The code behind to have the report viewer set the report:
' Report is going to run local on the website
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local
Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("ReportConnectionString").ConnectionString)
Dim cmd As New SqlCommand()
cmd.Connection = conn
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "sp" & Request.QueryString("reportname") ' Build stored procedure string from an example query string
Dim sqlAdapter As Object
Dim dt As Object

' Depending on what report you want to display, you'll need to call the right table adapter, hence why they are defined as objects at first
sqlAdapter = New DataSet1TableAdapters.[NameDefinedInDataSet1]TableAdapter()
dt = New DataSet1.[NameDefinedInDataSet1]DataTable


Dim Source As New ReportDataSource("DataSet1_[NameDefinedInDataSet]"), dt)
ReportViewer1.LocalReport.ReportPath = "Report.rdlc"

Now if you followed that jumbled piece of code, congrats. If you're smart you'll have the name defined in the data set match up to the report name so you can use the query string (or whatever other method). You'll still need a case statement or bunch of if's for defining the sqlAdapter and dt. Also, the ReportDataSource will be looking for the specific DataSet1_[NameOfTableAdapterDefinedInDataSet].

If you are thinking what on earth?, so am I. Hence why we decided to stick with the Reporting Service Project even though the project will need to be seperate and can only be done in Visual Studio 2005.

Cheers, I'm out, and I do not want to think about this again until reporting improves for Visual Studio 2008.