Ruby On Cheap ruby block templating

by Jeff Berg, November 22, 2008 17:38

I believe it is the same no...

33763c130a29de64914e684ded67f02f Talk

Ruby On Cheap ruby block templating

by Alistair, November 22, 2008 17:34

That's cool thanks. I was p...

95d8510ef03567cd7d014d4790116b0d Talk
1
2
3
4
  def label_block(caption)
    concat("<label>")
    concat("<span>#{caption}</span>")
...

Ruby On Cheap ruby block templating

by Jeff Berg, November 22, 2008 17:29 Star_fullStar_fullStar_fullStar_full

That is the best way unless...

33763c130a29de64914e684ded67f02f Talk

Ruby On Bindings on caller

by Tj Holowaychuk, November 22, 2008 15:48

Cool thanks! not overly pra...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
def capitalize_args(bind)
  eval("local_variables", bind).each do |var|
    var = eval(var, bind)
...

Ruby On Bindings on caller

by tmpr, November 22, 2008 11:12
Avatar Talk
1
2
3
4
#!/usr/bin/perl -w

use strict;
...

Perl On Apache log file sorting

by hourback, November 21, 2008 15:33

Modified the capitalization...

066739a7a44b7fb8be64e73f9f4323cb Talk
1
/^(?!www\.)(?:\w+\.)*example\.com$/

Ruby On Shortest regular expression...

by Daniel Schierbeck, November 21, 2008 12:17 Star_fullStar_fullStar_fullStar_fullStar_full

This ought to do it.

5da4c52f43677f395aff5bde775593c2 Talk
1
2
3
4
require 'uri'

module URI
...

Ruby On Shortest regular expression...

by Tj Holowaychuk, November 21, 2008 07:53 Star_full

I would maybe consider exte...

F1e3ab214a976a39cfd713bc93deb10f Talk

C++ On Counting Sort

by pardus1, November 21, 2008 07:32

I did not understand why th...

Avatar Talk
1
2
3
4
module NameAssociation
  def self.extended(object)
    object.instance_eval(<<-EOS, '(__NAME_ASSOCIATION__)', 1)
...

Ruby On Similar virtual attributes ...

by Adam, November 21, 2008 06:12
A8d3f35baafdaea851914b17dae9e1fc Talk
1
2
3
4
module ChildAccessor
  def attr_child_accessor(obj,attr_name)
    child_name = obj.name.downcase
...

Ruby On Similar virtual attributes ...

by Josh N, November 21, 2008 05:55

removed string based class_...

60888d58de3bf08cbc0c73e67fd6fd86 Talk
1
2
3
4
class SchoolYear < ActiveRecord::Base
  has_many :semesters
end
...

Ruby On Arrays, loops, strings...

by Adam, November 21, 2008 05:23

I get the feeling you would...

A8d3f35baafdaea851914b17dae9e1fc Talk
1
2
3
4
results = %w[first second third forth].map do |semester|
  (1..5).map {|n| "pdp_#{semester}_semesters.objetive_#{n} AS #{semester}_objetive_#{n}"}
end
...

Ruby On Arrays, loops, strings...

by Josh N, November 21, 2008 04:34

Putting it on one line whil...

60888d58de3bf08cbc0c73e67fd6fd86 Talk
1
2
3
4
# a module that code gens the attributes
module ChildAccessor
  def attr_child_accessor(obj,attr_name)
...

Ruby On Similar virtual attributes ...

by Josh N, November 21, 2008 03:08

This solution may be overki...

60888d58de3bf08cbc0c73e67fd6fd86 Talk

Ruby On Arrays, loops, strings...

by Ceritium, November 20, 2008 22:11

testing...

7841fbf022cfe78bff34942b50c483e1 Talk
1
2
3
  LETTERS = ('A'..'Z').entries + ['All']
...

Ruby On Creating an alphabetic for ...

by starshine, November 20, 2008 17:17

Thanks so much for this! I ...

Avatar Talk

C# On Check type is XML Serializable

by sbehnke.myopenid.com, November 20, 2008 16:22

That's an interesting use o...

Avatar Talk
1
2
3
4
class Publication < ActiveRecord::Base

  def publisher_name
...

Ruby On Similar virtual attributes ...

by Spreelanka, November 20, 2008 15:12

no doubt there is a better ...

Avatar Talk
1
2
3
4
private static bool canBeXmlSerialized(object @object)
{
	return @object is IXmlSerializable || @object.GetType().IsSerializable;
...

C# On Check type is XML Serializable

by Elij, November 20, 2008 01:55 Star_fullStar_fullStar_fullStar_full

If you have an instance at ...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
/* Lets say we have two numbers: 27 and 145 (just two random values) into two separate variable */

int min = 27;  // 00011011 binary 8bit for 27  
...

C On How to find max, min of thr...

by Eineki, November 20, 2008 00:52 Star_fullStar_fullStar_fullStar_fullStar_full

It is quite simple, once yo...

5a00a3a98dcf6f9cd717440fd2b606e5 Talk

C On How to find max, min of thr...

by Tien Dung, November 20, 2008 00:01

Hi Eineki, please explain h...

5071c5b861341c0dcfcf6ac86327701f Talk
1
/(?<part>(w(?!ww)|w(?=[a-z0-9]{3,})|[a-vx-z0-9])[a-z0-9]*)\.example\.com/

Ruby On Shortest regular expression...

by troethom, November 19, 2008 18:58

Did a little logical thinki...

628b75cc5fce9ab14d9e8584a0b3681c Talk
1
2
3
4
require File.dirname(__FILE__) + '/memcached'

class Object
...

Ruby On Caching Methods

by Tj Holowaychuk, November 19, 2008 18:11

Added transparent hard cach...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
class Object
  
  def self.cache_method(method, options = {})
...

Ruby On Caching Methods

by Tj Holowaychuk, November 19, 2008 17:29

Heres what I have so far

F1e3ab214a976a39cfd713bc93deb10f Talk

Ruby On Caching Methods

by Tj Holowaychuk, November 19, 2008 17:04

Heres a stupid question. Ho...

F1e3ab214a976a39cfd713bc93deb10f Talk