# ---------------------------------------------------------------
# Option 1
# http://facets.rubyforge.org/doc/api/core/classes/Module.html
...

Ruby On Retrieve class name only

by Casper, November 07, 2008 05:48

Two options come to mind:

...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk
$$(".fieldpair").each(function(fieldpair) {
      if (fieldpair.down("input:checked")) {
...

JavaScript On How to Refactor from a Loop...

by Casper, January 13, 2008 14:05 Star_fullStar_fullStar_fullStar_full

Yes a construction like tha...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk

JavaScript On How to Refactor from a Loop...

by Casper, January 13, 2008 12:16 Star_fullStar_fullStar_fullStar_full

Change the '+' to '~' and y...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk
# Untested since I don't have your database, but it should be 
# something like this:
grouped_count = Messages.count(:conditions => "user_id = #{current_user.id}",
...

Ruby On Rails has_many count

by Casper, January 11, 2008 09:51 Star_fullStar_fullStar_fullStar_full

Or..come to think of it. Th...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk
# Get all messages for the current user
messages_for_user = current_user.messages

...

Ruby On Rails has_many count

by Casper, January 11, 2008 08:59 Star_fullStar_fullStar_fullStar_full

Not going to comment on the...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk

JavaScript On How to Refactor from a Loop...

by Casper, January 09, 2008 20:22

Jermaine you are welcome. ...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk
// Nice to have for debugging purposes if you don't happen
...

JavaScript On How to Refactor from a Loop...

by Casper, January 09, 2008 14:18 Star_fullStar_fullStar_fullStar_full

You have a couple of bugs. ...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk

JavaScript On How to Refactor from a Loop...

by Casper, January 02, 2008 00:19

There was a semicolon missi...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk
// Nice to have for debugging purposes if you don't happen
...

JavaScript On How to Refactor from a Loop...

by Casper, January 01, 2008 22:03

Hi. The Prototype code is s...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk
<!-- Load jQuery -->
...

JavaScript On How to Refactor from a Loop...

by Casper, January 01, 2008 09:41 Star_fullStar_fullStar_fullStar_fullStar_full

I like to do these kinds of...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk
<?php if (the_ID() == 8) { ?>
...

PHP On Output div block with PHP c...

by Casper, December 07, 2007 19:35 Star_fullStar_fullStar_full

You have a missing close br...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk
<!-- Import jQuery -->
...

JavaScript On Javascript threading

by Casper, December 07, 2007 16:54

Like BK said you have globa...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk

C On Socket read line in C

by Casper, December 06, 2007 23:15 Star_fullStar_fullStar_fullStar_full

Several comments.

1: What ...

B849433e0e1a3f4ca0cf7cc55b8acd53 Talk