Santomania

Addy Santo's occasional braindumps

  • Santomania

    XOR in C#

    • 4 Comments
    Random factoid: Use ^ for bitwise XOR in C#, for example: a = a ^ c; (or simply: a ^= c; )
  • Santomania

    Fighting the "InteropServices.SEHException: External component has thrown an exception" blues

    • 5 Comments
    <8/18/2004 update: see part II of this post, with a better solution: http://weblogs.asp.net/asanto/archive/2004/08/18/216825.aspx > .Net version 1.1 has a bug with XP Visual Styles which causes the following cryptic exception: "'System.Runtime.InteropServices...
  • Santomania

    Getting the POSITION() of the PARENT node using Xpath

    • 5 Comments
    I just spent waaaaaay too long figuring this out, so I'll leave a note of it for future projects: To enumerate the current node's position in the current nodeset, position() is great. However when using nested nodesets, getting the parent's position relative...
  • Santomania

    BlogWave FAQ

    • 36 Comments
    BlogWave Mini-FAQ Last Updated : 10/24/2004 Current Version : 0.99.1.5 (Beta 1.5) Download Link: http://www.addysanto.com/blog/blogwave/blogwave_vB15.zip (522K) Q. What is BlogWave? A. BlogWave is an "RSS Generator": a tool which can pull information...
  • Santomania

    Code Snippet: Working with Permissions (ACLs/ACEs) in C# under .Net 1.1

    • 3 Comments
    I've been working lately on adding "self-healing" capabilities to a certain application. The idea is to create a set of utility functions which will validate (and fix if needed) various environmental settings such as NTFS permissions, registry permissions...
  • Santomania

    "InteropServices.SEHException: External component has thrown an exception" - Solved!

    • 7 Comments
    I finally solved the problems with enabling XP Visual Styles (Themes) which I described here . My initial attempt worked on some computers but not others; apparently there is some mystic connection between the themed activation context, the color of my...
  • Santomania

    Introducing BlogWave !

    • 34 Comments
    Everyone, say hello to BlogWave ! This is an alpha (read: mostly functional and sort of stable) version of a tool which enables automated generation and scheduled publishing of RSS feeds. This allows, for example, publishing Sharepoint lists and libraries...
  • Santomania

    enter the Matrix jokes

    • 2 Comments
    User Friendly rockin the house!
  • Santomania

    WssDal - a Sharepoint Web Services alternative

    • 12 Comments
    About 2 months ago I asked if anyone was interested in an alternative to the WSS webservices . A few people responded and tried my WssDal library. The general consensus seems to be that while it isn't perfect, it is useful enough to continue developing...
  • Santomania

    Fixing Broken Links after Restoring a Sharepoint (WSS) Site with SMigrate

    • 4 Comments
    WSS 2.0 includes a utility called SMigrate which can be used to backup the content and structure of a site and to later recreate a site’s content and structure from the backup file. SMigrate also enables migration scenarios – by backing up a site and restoring it to a different URL, it is possible to migrate content between different sites or servers. When restoring content to a different URL SMigrate attempts to update the necessary links to ensure that the restored site will work correctly, i...
  • Santomania

    LINQ presentation slides

    • 4 Comments
    The PPT deck from my "LINQ For Mere Mortals" is available on NJ Code Camp , or here (direct link ).
  • Santomania

    Life imitating art : NASA working on lightsaber practice droid.

    • 1 Comments
    This is what happens when you give true geeks an unlimited budget... The article (from Wired ) has some simply awesome quotes: ... "The PSA started with a simple idea: to hook up astronauts with some of the cooler gadgetry from classic '60s and...
  • Santomania

    Programmatically caching Infopath templates using Application.CacheSolution

    • 1 Comments
    Infopath has a simple and elegent system for caching form templates - when you open a form with an unknown template, it extracts the template version and location information from an XML processing instruction (PI) in the form, and then loads the template...
  • Santomania

    Are the Sharepoint Web Services too complex? Looking for something better?

    • 9 Comments
    I'm looking for a few people to help beta-test an alternative to Sharepoint's web services. The solution allows a simple "object modelish" approach to working with WSS, as shown by the following sample code snippets: It also solves some of the WSS web service pain-points, such as download/upload, checkin/checkout, etc. Drop me a mail if you are interested. ...
  • Santomania

    So are we cool again now?

    • 5 Comments
    It will be interesting to see how the "Web 2.0" crowds reacts to the new "Windows Live" and "Office Live" offerings... Sometimes I think that many of them are too young to remember how Microsoft turned on a dime and conquered the previous internet...
  • Santomania

    The magic URL for fixing a broken Sharepoint page

    • 1 Comments
    I know it exists, but every time I need it I still spend 15 minutes searching. So, once and for all, here it is: ?contents=1 . Appending that to the URL of a web part page in WSS or SPS will display a list of web parts on the page with options to close...
  • Santomania

    Oh no, SelectSingleNode is evil!

    • 2 Comments
    I have been reflecting alot lately, however I was actually tipped off to this one via Lamont Harrington . Since it was news to me (and I'm typically not the slowest fish in the barrel), I find it worth mentioning: Decompile the XmlNode.SelectSingleNode...
  • Santomania

    VS.NET Bug? Easter Egg?

    • 4 Comments
    After "Collapsing to Definitions" (Cntl-M,Cntl-O), Visual Studio decided to color the collapsed code section in black, white and red: Can anyone clue me in on what/why that is? It happened consistently while VS.NET was open, but only for that specific...
  • Santomania

    Birthday thoughts...

    • 5 Comments
    Tomorrow will be the next day of the rest of my life. Same as yesterday and today , but with one small difference: Today was the 11680th day since I was born, or in other words- my 32nd birthday. Woohoo! I'm getting old! I can still remember the days...
  • Santomania

    MSN Search vs. Google

    • 5 Comments
    As a Microsoft employee, I want to do my small part in making MSN Search better. They have the little " Help us improve " link at the bottom of the MSN Search result page, but it isn't that easy to figure out what needs improving? So I cooked up this...
  • Santomania

    BlogWave version 0.3 (Alpha 3) - Released!

    • 19 Comments
    This release is full of cool new features. Drag-and-drop enables creating complex aggregate feeds in literally seconds. Context Menus. NNTP (newsgroup) support. A pluggable architecture and a C# code sample showing how to connect BlogWave to additional...
  • Santomania

    Code Snippet: Setting NTFS permissions

    • 2 Comments
    My previous post shows how to use Windows32.Security to read and set permissions to the registry. Doing the same for a NTFS is even simpler: public bool TestNTFSPermissions( string path, string userName) { SecurityDescriptor secDesc = SecurityDescriptor...
  • Santomania

    Anti-Agile development conference

    • 3 Comments
    Agile developers should get a smile (at least) from http://www.waterfall2006.com/ . This anti-agile conference couldn't possibly go wrong, they already have it planned down to the smallest detail: "Because it's possible you may want to attend all sessions...
  • Santomania

    Why doesn't InfoPath tell us who is the current user? Turns out there is a good reason...

    • 2 Comments
    This is a question I have often asked, and been asked by virtually every customer I have worked with: Infopath's User object includes the following two methods: IsCurrentUser(domain\username) returns True if the current(ly logged in) user matches the...
  • Santomania

    GDI + LINQ = Generate a bar graph in a single line of code

    • 3 Comments
    This is a simplified version of actual code from an app I'm working on. There are a few lines of setup, and then the cool part (the last statement): Using a select statement to iterate over a List < double > , creating a RectangleF object for each...
Page 1 of 12 (276 items) 12345»