Happy New Year

Now the dictionary includes, FOLDOC- The free online dictionary of computing. It has around 14000 computer terms. Try it out.

6 Responses to “Happy New Year”

  1. Keith Gaughan Says:

    Slightly offtopic, but I thought of a simple way you could lessen the load on your server.

    You mentioned in your explaination that you were using the onkeyup event to send the requests. A way of stopping the /. weenies from borking your server would be to change the code in the code to the following:

    var idTimer = null;

    function SendQuery(key)
    {
    var url = “http://www.objectgraph.com/dictionary/dict.aspx?k=” + key;

    // Stop the previous timer (if any) from firing.
    if (idTimer != null)
    window.clearTimeout(idTimer);

    // This code is ran if a key hasn’t been pressed for quarter a second.
    var handler = function()
    {
    Initialize();

    if (req != null)
    {
    req.onreadystatechange = Process;
    req.open(”GET”, url, true);
    req.send(null);
    }
    };

    // Set the handler to run after a quarter a second.
    idTimer = window.setTimeout(handler, 250);
    }

    I wish Blogger allowed preformatted blocks. :-(
    This makes it wait until the user has stopped typing for a reasonable period (250ms) before firing back to the server to pull stuff from the dictionary.

    Note that I just typed this up off the top of my head and haven’t tested it, so you should make sure it works before you put it online.

  2. Anonymous Says:

    Cool Idea,

    the only problem i have is, if the person just leaves the computer idle with some text already typed in the box, wouldnt that keep on hitting the server?

  3. Keith Gaughan Says:

    No, once the event fires, it should disappear. Timeout isn’t for recurring events, just once-offs. Even then, you could cancel it once it fires even if it did.

  4. gavi Says:

    Cool,

    I will implement this and post the source code.
    Thank you for the suggestion.

  5. Anonymous Says:

    I really like what you’ve done here. I will probably dream tonight as I sleep about this program hooking up with onelook.com

  6. Anonymous Says:

    OFF TOPIC! Fun things to do….
    Please Delete this post if this is not ok!

    Inspirational Posters

    Adult Sexo Novelties

    Sex & Swingers Personals

    Free Online Poker

    BDSM & Alternative Personals

Leave a Reply