Some notes on software development... RSS 2.0
# Tuesday, 15 July 2008

From MSDN here:

image

Tuesday, 15 July 2008 16:50:26 (GMT Standard Time, UTC+00:00)  #    -
Reporting Services
# Monday, 14 July 2008

To achieve alternate row colouring you can use the following expression for the BackgroundColor property:

=IIF(RowNumber("DATASETNAME") Mod 2, "AliceBlue", "White")

Monday, 14 July 2008 09:30:46 (GMT Standard Time, UTC+00:00)  #    -
Reporting Services
# Wednesday, 09 July 2008

Eric White has a great example of using LINQ to stream a text file rather than load the whole file in to memory here.

The StreamReaderSequence class provides an extension method for the StreamReader class called Lines which will load each line one by one.

The code taken from Erics blog article:

image

Using the above technique means you can process very large text files using a small memory footprint, great stuff!

Notes:
You cannot use aggregation query operators because they need to iterate all the results to compute their own result. That means you cannot use Aggregate, Average, Count, LongCount, Max, Min and Sum operators.
You cannot use sequenced operators such as OrderBy, OrderByDescending and Reverse for similar reasons to above.

Links:
Eric White's Blog
Eric White LINQ to Text File (streaming) article

Tuesday, 08 July 2008 23:11:10 (GMT Standard Time, UTC+00:00)  #    -
LINQ
# Wednesday, 25 June 2008

To run multiple on load JavaScript events you can use Simon Willson's excellent addLoadEvent function:

 

function addLoadEvent(func)
{
    var oldonload = window.onload;
    if (typeof window.onload != 'function')
    {        window.onload = func;
    } else
    {
        window.onload = function()
        {
            oldonload();
              func();
          }
     }
}

addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);
addLoadEvent(function(){  /* more code to run on page load */   });
 

Download the full addeventhandler file here: addeventhandler.js

 

Links:
Closures and executing JavaScript on page load
Executing JavaScript on page load

 

Wednesday, 25 June 2008 08:24:34 (GMT Standard Time, UTC+00:00)  #    -

Navigation

Sign In
Extras
Statistics
Total Posts: 116
This Year: 0
This Month: 0
This Week: 0
Comments: 36
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2018
Hadrian Phillips

All Content © 2018, Hadrian Phillips
DasBlog theme 'Business' created by Christoph De Baene (delarou)