Drat, I finished my books....

by Codewiz51 August 31, 2010 21:51

I admit it, I read the 2010 equivalent of dime store novels.  I love Simon Scarrow's "Eagle" books, and I follow Bernard Cornwell's The Grail Quest and The Saxon Stories.  I also read Stephen R. Donaldson's
Thomas Covenant chronicles.  My complaint is that I've devoured the books and now I've nothing left to read.  Scarrow's Gladiator is out on Amazon, but I will wait for my birthday to buy it.  Cornwell doesn't have anything coming out soon and Donaldson's next book isn't due until October.

I think I'll reread The Ten Thousand.  Steven Pressfield doesn't seem to have anything in the works, although Killing Rommel is worth reading three or four times.  The fall may be filled with the readings of new authors as I branch out.

Tags:

Life

Installing SQL Server 2008 Express

by Codewiz51 August 31, 2010 21:35

I work with multiple database servers: Oracle, SQL Server and MySQL.  I like to keep copies of the free versions, Oracle XE, SQL Server 2008 Express, SQL Server 2005 Express and MySQL on seperate VMWare machines at home for testing and experimentation.  You learn quickly that installed database servers on your base machine at home can get complicated (and may also slow you machine down if mutiple instances of servers are running on your desktop at home).  VMWare may seem a little expensive, but keeping your base machine clean is well worth the $200 cost.

I recently installed the full version of SQL Server 2008 Express edition and I discovered something that is not really obvious in the documentation.  You need to set up a service account to run your SQL Server services before you begin installation.  Setting this account up before you install, will ensure that your installation goes smoothly.  I've now had to uninstall and reinstall SQL Server 2008 twice on two different VMWare machines -- slow learner am I. Embarassed

Stuff that makes your head explode...

by Codewiz51 August 30, 2010 19:52

I've been experimenting with jQuery and AJAX in VS 2008.  Today, I ran into an issue that nearly made my head explode.  I have some javascript code that I use to detect if a user has a popup blocker installed.  This is an internal application and it makes use of popups to deliver information.  The code isn't strictly correct, but it works with the various versions of IE that we need to support.

Under the head tag, the following code block tests if a window can be opened from code:

<script type="text/JavaScript" language="JavaScript">
    var mine = window.open('', '', 'width=1,height=1,left=0,top=0,scrollbars=no');
    if (mine) {
        var popUpsBlocked = false;
        mine.close();
    }
    else
        var popUpsBlocked = true;
</script>

Just after the </body> tag the following code alerts the user to the state of their pop up blocker:

<script type="text/JavaScript" language="JavaScript">
    if (popUpsBlocked)
        alert('Please disable popup blocker software when using this web site.');
    else
        alert('No popup blocker.');
</script>

I added a script tag to the <head> tag of the html to load jQuery:


<script src="scripts/jquery-1.4.1.min.js" type="text/javascript"/>

Low and behold, my javascript code was borked with an exception that the var popUpsBlocked was not declared!

After much experimenting, I was able to add popUpsBlocked as a global variable as follows:

<script type="text/JavaScript" language="JavaScript">
    var popUpsBlocked = false;
</script>

The finished aspx page is coded as follows:

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>

<script src="scripts/jquery-1.4.1.min.js" type="text/javascript"/>

<script type="text/JavaScript" language="JavaScript">
    var popUpsBlocked = false;
</script>
 
<script type="text/JavaScript" language="JavaScript">
    var mine = window.open('', '', 'width=1,height=1,left=0,top=0,scrollbars=no');
    if (mine) {
        popUpsBlocked = false;
        mine.close();
    }
    else
        popUpsBlocked = true;
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    </div>
    </form>
</body>
<script type="text/JavaScript" language="JavaScript">
    if (popUpsBlocked)
        alert('Please disable popup blocker software when using this web site.');
    else
        alert('No popup blocker.');
</script>       
</html>

 

I guess the moral is, be prepared to experience something that frustrates the heck out of you everday. Cool

Oracle Database Frustrations

by Codewiz51 August 29, 2010 20:45

I've been working on a project, utilizing Oracle XE in a VMWare machine for database development.  The project has been rocking along properly, without hitches or hiccups on Oracle XE.  I began to move the system over to a full Oracle 10g database server on Friday.

My scripts ran without error on the staging server, and I had my databases built in maybe two hours.  I copied over the aspx pages and cs files and the application was up in another hour after I tweaked some code.

Then my troubles started as soon as I began unit testing.  My Oracle queries were taking forever to execute!  I mean forever.  Queries utilizing the same data on the Oracle XE server were completing in 3 to 4 seconds.  The same query on the 10g staging server was taking almost 30 minutes.  Absolutely amazing.

I ran the Oracle ODT query analyzer that ships with the 11h client and was hit with a "You must have a valid license... yakkity yakiity whatever message."  All I knew was we didn't have the license.  So now, I get to explain to my boss that something that was supposed to happen quickly is not going to happen quickly unless some sort of solution from heaven falls to earth and lands on my server.

I normally like working with Oracle databases and programming in PL/SQL. But, events like what happened Friday definitely dampen my enthusiasm. Embarassed

Summer is drawing to an end. (Well sort of...)

by Codewiz51 August 25, 2010 08:47

I have to admit, taking time away from blogging and working on code in the evenings has been a real eye opener.

I've lost about six pounds this month.  Mostly its due to some serious work in my backyard in 100° F heat in the afternoons and early evening.  (Part of my sprinkler system has quit functioning and I am following lines from the non-working heads to the main feeder pipe.  The ground is rock hard, but the exercise has done wonders for me.)

I have also been reading a lot in the evening, instead of looking at DCDFLib code.

All of this adds up to much sounder sleep, and much better relationships, as I am spending much more time with my extended family.  I've also found that my efficiency at work has increased dramatically.

While this "vacation" has been worthwhile, it has also helped me to better understand my needs.  Taking a break to exercise and taking time to talk to other people is a neccessity, a true requirement for living life. (I don't classify email exchanges as true conversation.  For me, true conversation involves eye contact.)

As for summer, well, the first cold front passed through a couple of days ago.  We're down into the upper 80's and low 90's.  Should stay this way for a while and it is truly refreshing to walk out into my garden in the coolness of the morning.  But the weather forecasters say there is a good possibility the heat will return next week.  The dog days of summer are upon us. I am really looking forward to Indian summer. Wink

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen | Modified by Mooglegiant


Disclaimer

This blog represents my personal hobby, observations and views. It does not represent the views of my employer, clients, especially my wife, children, in-laws, clergy, the dog, the cats or my daughter's horse. In fact, I am not even sure it represents my views when I take the time to reread postings.

All comments are moderated for content.

© Copyright 2008-2010