in

vbCity Blogs

New (temp) place for vbCity Blogs

Mike McIntyre's .NET Journal

January 2009 - Posts

  • Visual Studio 2010/.NET 4.0 - Memory-Mapped Files (it's a big deal!)

    The .NET Framework 4.0 provides  memory-mapped file API via its System.IO.MemoryMappedFiles namespace. System.IO.MemoryMappedFiles exposes Windows memory mapping functionality as first-class managed APIs. 

    I'm already imagining what I want to do with this .NET 4.0 namespace - "lazy loading" bits of a large file into memory, more efficient I/O, and creating shared memory for inter-process communication. 

    This is a big deal!

  • Windows Vista - Windows Calendar

     Though I've used Windows Vista for over two years I just got around to exploring its 'Windows Calendar'.

    Windows Calendar can be accessed fvia Start -> All Programs -> Windwos Calendar

    It supports the iCalendar format.  It can publish and subscribe to web-based calendars using HTTP and WebDAV, and to network drive web shares.

    It's a nice feature Microsoft bundled up with Vista.

    Windows Calendar

  • Visual Studio 2010/.NET 4.0 - ComplexNumber

    The .NET 4.0 Framework provides addtional core data structures.

    One is ComplexNumber

    Complex numbers are used in many different fields including applications in engineering, electromagnetism, quantum physics, applied mathematics, and chaos theory.

     

    This Wikipedia article does a much better job of explaining complext numbers that I can in this post:  Complex Numbers 

     

     

     

  • MS SQL Server Date without Time Solution for MS SQL Server versions 2005 and 2000

    SQL Server versions prior to 2008 did not provide Date and Time data types. 

    Below is a solution for SQL Server 2005 and 2000 that will strip time off a DateTime data type value.

    SELECT DATEADD(DAY,DATEDIFF(DAY,0,[DateTime]),0)

     

    Example Use

     

    -- Create a variable of type DATETIME and store a date and time it it.

    DECLARE @DateWithTime DATETIME

    DECLARE @DateWithoutTime DATETIME

     

    -- Store a date with time in the @DateWithTime variable.

    SET @DateWithTime = GETDATE()

     

    -- See date and time:

    SELECT @DateWithTime

     

    -- Use the solution to store only the date in the @DateWithoutTime variable.

    SET @DateWithoutTime = DATEADD(DAY,DATEDIFF(DAY,0,@DateWithTime),0)

     

    -- See date without time:

    SELECT @DateWithoutTime

     

  • Visual Studio 2010/.NET 4.0 - BigInteger

    The .NET 4.0 Framework provides addtional core data structures.

    One is BigInteger

    BigInteger - The BigInteger data type is supported where integer values are supported. However, BigInteger is intended for special cases where the integer values may exceed the range supported by the System.Int32 data type (int in C#, Integer in VB).

     

Copyright 1998-2009 vbCity.com LLC
Powered by Community Server (Non-Commercial Edition), by Telligent Systems