patterns

What Are The Most Popular jQuery Plugin Patterns?

I'm writing an open-source mini-book on jQuery Plugin Development Patterns and am interested in hearing what you guys feel are the most popular plugin patterns at the moment. (If you could provide an example too when answering that would be a big plus) There are at least 4 unique ones which I've identified so far, including DRY, but wha...

Composite Application Block - Is there a suitable replacement available?

I have two very large WinForm applications built on the now dead Composite Application Block ("CAB") from Microsoft Patterns & Practices. I was an earlier adopter and jumped in first to embrace and use CAB. Well, now that it's truly dead I'm starting to think more and more about the future and what framework I can migrate to. What I l...

jQuery shortcuts / technique for toggling classes

Hi! In jQuery, is there another way to write this? Version 1 $("#date_filter-enable").click(function() { $("#search_dates").removeClass("hidden"); }); $("#date_filter-disable").click(function() { $("#search_dates").addClass("hidden"); }); Version 2 $("input[id^=date_filter-]").click(funct...

Searching childs

Hello I have class A. Class A is responsible for managing the lifetime of B objects and it contains container of B objects that is map<BGuid,B>, and each B object contains container of C objects which is map<CGuid,C>.I have one global A object for the entire application. I have the following problem: I have CGuid object and I want to u...

how to determine that one instance of a service is down and launch a new instance

Hey I have the following situation: a WinService which is processing some stuff from a queue, writing to other tables (during processing) and after it finishes it deletes the entry and moves to the next one. I would need a mechanism to determine if the instance is alive and going and if not to start or wake up a second instance. What I...

Find a string pattern in a set of strings

I have a set of strings, set<string>, and a string to check, I would like to do a binary search over it, obviously, a set is sorted. The purpose is to find the longer string in the set that is contained in the supplied string to check. It's basically to check for urls and registered handlers. I'm digging in the std algorithms and com...