Crazy piece of code: Checking query parameter

Dec 17
2007 22:47 (ASP.NET, Development) · Русский (2,925 views)

How often you are laughing out loud when looking on the someone’s code? Today I found great code in my current project and I can’t hold posting this to my blog. So,

if (Request.QueryString.HasKeys())
{
    string[] keys = Request.QueryString.AllKeys;
    foreach (string k in keys)
    {
        if (k == "memberpagemode" && (string)Request.QueryString.GetValues(k).GetValue(0) == "edit")
        {
            pSett.ChangeFormViewMode(FormViewMode.Edit);
        }
    }
}

And how do you search through the hash for a key with specified value?

Sphinx Client API 0.3.1 and 0.4.0 r909 for Sphinx 0.9.8 r909 released

Dec 09
2007 21:33 (MySQL, RoR Plugins) · Русский (2,904 views)

Sphinx Search Engine I have a good news: Sphinx Client API has been updated and now it supports all brand new features of the unstable Sphinx 0.9.8 development snapshot. What does it mean for you as a developer? What features you will get if you would decide to switch to the new version? I will describe most valuable improvements of the Sphinx in this article, and will show how to use them with new Sphinx Client API 0.4.0 r909.

Read the rest of entry »

 
Copyright © 2005 - 2008, Dmytro Shteflyuk