Calvin Hsia's WebLog

thoughts from a professional developer

August, 2007

  • Calvin Hsia's WebLog

    Cool Linq Query

    • 8 Comments
    Now that Visual Studio 2008 Beta 2 is out the door, I can write about some cool Linq Queries, and you can run them. Foxpro has had Language Integrated Query (Linq) in the form of embedded SQL statements (Create Table/Select/Update/Insert/Delete...
  • Calvin Hsia's WebLog

    C# and Fox versions of Cool Linq Query

    • 6 Comments
    In my prior post ( Cool Linq Query ) I promised a C# and Fox versions of a query to sort all the “Words” found in many files in a C++ project and sort them by frequency of occurrence. The C# version: it’s almost the same as the VB version. Try...
  • Calvin Hsia's WebLog

    Install Northwind for SQL Express and use Visual Studio and DLINQ to query it

    • 6 Comments
    SQLExpress is free and comes with Visual Studio, but the sample Northwind database isn’t included. You can download sample databases Northwind and Pubs from http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&displaylang...
  • Calvin Hsia's WebLog

    Find which DLLs in your system are rebased

    • 6 Comments
    You can use CreateToolhelp32Snapshot and its family of functions to enumerate the running processes on your machine, including the modules loaded by each process My prior post ( DLL Image base addresses are the same in XP, different on Vista ) described...
  • Calvin Hsia's WebLog

    Add an interactive map to your web page

    • 6 Comments
    It’s pretty cool to play with the maps at http://Local.Live.com You can zoom in to various locations, add pushpins, save sets of pushpins as Collections. Aerial, Bird’s Eye and 3D view are fun too! When you sign in, your collections are visible...
  • Calvin Hsia's WebLog

    Why the order of shutdown events is important

    • 4 Comments
    Try running this code: PUBLIC xx xx= CREATEOBJECT ("MyClass") quit && quit Foxpro DEFINE CLASS MyClass as Custom PROCEDURE init CREATE CURSOR DummyCursor ( name c(10)) && create a cursor PROCEDURE destroy ...
  • Calvin Hsia's WebLog

    Linq Queries for .Net Framework members

    • 3 Comments
    How many members in the .Net framework contain the string ‘file” ? Make a query like this: Dim q As Object q = From Assembly In AppDomain.CurrentDomain.GetAssemblies _ From typ In Assembly.GetTypes _ From Member In typ.GetMembers...
  • Calvin Hsia's WebLog

    Use Stored Procedures when you can for efficiency

    • 2 Comments
    In this post ( Install Northwind for SQL Express and use Visual Studio and DLINQ to query it ) I posted a fairly complex SQL command. Of course, it’s important to keep in mind that a more efficient way of executing this query may be by keeping all the...
  • Calvin Hsia's WebLog

    It's easy to resize your disk volumes on Vista

    • 1 Comments
    On one of my Vista machines, I have a 140G hard drive partitioned into C (20g), D (80G) and E (40g). Drive E was getting full, and I wanted to make it bigger. Isn’t it ironic that in the year 2007, we still are using letters of the alphabet to refer...
Page 1 of 1 (9 items)