Posts Tagged ‘code’

…i needed to get the type of the model that a given controller is associated with. and then i have to traverse it’s properties(through reflection…etc) and do some string manipulation to generate custom method signatures and custom anonymous types. i also wanted to filter the list of properties that will be used in these parameters and anon types….

a bit too complex title eh? sorry about that. i am finally blogging about something after a long while. its a good idea to use the revision number of your source tree in thee release versions of your software. because it will enable you to ‘connect and identify’ your release versions with your source tree’s [...]

i recently needed to use Enum.GetValues on a .netcf project. but unfortunately it is not there in .netcf. googling gives a lot of solutions that we can use in .netcf. but i couldn’t find one that worked exactly as Enum.GetValue did.
Retrieves an array of the values of the constants in a specified enumeration.
is the method [...]

noob alert!: I am pretty new to RoR. so i might not be solving the problem with the best possible solution.
Scenario 1: many-to-many + one-to-many
Task: I have two models. Contact and ContactSource. a Contact belongs to a ContactSource. and a Contact can be synced with one or more ContactSource(s). i need to get the ContactSource(s) [...]

Think: In the Entity Framework…
you have two models like this:
Item{ID, Name, Category}, Category{ID, Name}
With a Relationship like this:
Item belongs to a Category. and a Category may have zero or more Items.
if you try to sort the Items by their Category(which doesn’t make sense in the first place! ) by doing something like:
YourObjectContext.Items.OrderBy(“it.Category”)
you would get [...]

I am new to all these JS libraries like jQuery and ExtJS(there are many more out there…). when i got started with asp.net mvc i looked in to jQuery. and i was absolutely amazed with all the functionality it offered with very simple and neat syntax! a while ago i did a post on “Ajax [...]

we all agree that most of the google web apps our there are simple. i love simple things too. in fact i am a firm ‘believer’ of the KISS philosophy. any ways getting in to the subject. google search have been very simple so far. and it still is very much simple. but i feel [...]

The MVCContrib project provides a nice Grid ‘control’ for use with MVC framework. Currently it does not support some what magical generation of javascript. so that you can have a ajaxified grid control. but with jQuery its pretty easy to ajaxify it. Today i finished ajaxifiying the paging of the grid, with a little bit of jQuery. So this is how i did it. i am sure that there must be betters ways of doing it. but this is what i came up with :P

Recently i had the chance to work with ASP.net membership(http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx). after deciding on adding the database schema required by asp.net to our application database it self. there were some questions left on how to use the data in these (asp.net services)tables(the data related to user logins were in aspnet_Membership table) with some other non server [...]

this is a tiny ruby script that i wrote some time back. it does a very simple(but helpful, at least for me ) task, that is it will send a given message to a pre configured list of gmail(actually anything that do jabber) accounts. and after this it will wait and listen for any [...]