"With Epcot Center the Disney corporation has accomplished something I didn't think possible in today's world. They have created a land of make-believe that's worse than regular life." - P.J. O'Rourke
Scott Valentine
Los Alamos, NM
USA
Michael A. Vickers
Portland, CT
USA
Monday, February 25, 2008
I Blame Global Warming

The U.S. National Climatic Data Center (NCDC) reported that many American cities and towns suffered record cold temperatures in January and early February. According to the NCDC, the average temperature in January "was -0.3 F cooler than the 1901-2000 (20th century) average."

China is surviving its most brutal winter in a century. Temperatures in the normally balmy south were so low for so long that some middle-sized cities went days and even weeks without electricity because once power lines had toppled it was too cold or too icy to repair them.

Interestingly enough, the article ponders whether another ice age is on our doorstep.

Labels:


Emerging Commentary

Perfect.

Related: Emerging: Theological Crap

Labels: ,


Wednesday, February 20, 2008
For Auction: World's Largest Record Collection

Do you have at least three millions burning a hole in your wallet?

Labels:


Tuesday, February 19, 2008
Truth In Advertising: Windows Vista

 

Update (2/20/2008):

Here's a link to the source of this video, which was taken off YouTube due to a copyright claim.

Labels:


Thursday, February 14, 2008
Calculated Fields, XSL Sums, and Commas in SharePoint

I find that, programmatically, SharePoint is a witches brew of different technologies which work together as long as you don't need to do things your way.

In this instance I'm creating a list of Invoices which will serve as the parent item to a list of Invoice Items. Each Invoice Item row contains (among other fields) a field for quantity, the amount for each item, and the total. The total field is a calculated field, displaying the product of the amount and quantity fields.

Initially I had the total field set up as a number, which seemed to make sense considering I was working with an equation. Where it did not make any sense is when I put together a form which found all the Invoice Items for an Invoice and summed up the total field values to create an overall total for the Invoice.

In my initial tests everything actually ran fine until I tried putting in an amount of 1000 for a particular Invoice Item. Or, rather, put in an amount and quantity whose calculated total was 1000 or more. It turns out that by the time SharePoint does the calculation and hands off the value to the XSL for transformation, there is a comma in the value which the XSL sum function chokes on. I either received nothing on the web page or NaN, and I could not find a simple way to format the total field through the SharePoint interface.

I switched the total field to text format and that didn't help. I even switched the amount field to text and that didn't help. My original total field looked like this:

=Quantity*Amount

What I ended up doing after a mere 18 hours of research was keeping the amount field as a number, the total field as text, and using the following formula to calculate the total field:

=TEXT(VALUE(Quantity)*VALUE(Amount),"0.00")

The calls to VALUE are probably overkill, but in essence I told it to get the product and format it as a number with two decimal places. And, even though the total field is technically a text field, the sum function in the XSL operates on it properly.

This technique could also help out in a worst case scenario where you do an XSL calculation on a numeric field in SharePoint -- create a calculated field whose sole purpose is to transform the numeric field into a plain vanilla version.

Labels: ,


Get 'Em While They're Hot

Wow, a 7.5 terabyte drive for only $170.

Labels:


Tuesday, February 12, 2008
Livin' In a Box
I'm a livin' in a command-line box.

OK, that was lame, but using xcopy c:\folder\*.* /s/e/c/d/y d: still rocks and works much better than Windows Explorer.

Labels:


Wednesday, February 06, 2008
The Middle Class Squeeze -- Debunked?

Check out this commentary by un-noted economist Drew Carey.

Labels:






People We Know


People We Keep Up With


Categories of Interest


Ye Olde Archives

December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008

Useful Stuff


www.flickr.com
This is a Flickr badge showing public photos from Michael A. Vickers.

Subscribe to Idiotsyncrasies RSS Feed