1
2
3
4
require 'ruby_camping'
require 'camping_guests'

...

Ruby Help!! undefined method for...

by tragicdancer.myopenid.com, July 27, 2010 10:06, 6 refactorings, tagged with ruby

Hi! Ive posted before about...

Avatar Talk
1
2
3
4
require 'ruby_camping'
require 'camping_guests'

...

Ruby Help!! undefined method for...

by tragicdancer.myopenid.com, July 27, 2010 10:05, No refactoring, tagged with ruby

Hi! Ive posted before about...

Avatar Talk
1
2
3
4
require 'ruby_camping'
require 'camping_guests'

...

Ruby Help!! undefined method for...

by tragicdancer.myopenid.com, July 27, 2010 10:05, 1 refactoring, tagged with ruby

Hi! Ive posted before about...

Avatar Talk
1
2
3
4
module Rack
  class SslBlock
    def initialize app, options = {}
...

Ruby Rack Middleware

by https://www.google.com/accounts/o8/id?id=AItOawkgnP7evEXOMIOnxq71Y4yEhDFN2oe3qi4, July 26, 2010 14:34, 2 refactorings, tagged with rack, middleware

any optimisations on this l...

Avatar Talk
1
2
3
4
    def isSyncronized(self):
        NO_SYNC = 1
        UNDER_DATE = 2
...

Python nested if blocks

by marcosvanetta, July 25, 2010 01:28, No refactoring, tagged with python, method, metaprogramming

I wanna know if anyone can ...

Avatar Talk
1
2
3
4
// Check to make sure value is non-null and matches CSS grammar
// A property may contain more than one class name so we need to
// check each potential class name in the string.
...

Java Validate CSS classnames in ...

by Zack Mulgrew, July 23, 2010 17:08, No refactoring, tagged with string, foreach, regex

I have a map of strings whe...

05a80d2c7b26a787f4f1742644f76054 Talk
1
2
3
4
require 'guest'
require 'parking_lot' 

...

Ruby `initialize': wrong number ...

by tragicdancer.myopenid.com, July 22, 2010 13:36, -1 refactorings, tagged with ruby

Hi Im getting this error wh...

Avatar Talk
1
2
3
4
$(document).ready(function(){
  $('#nav_menu_1').before('<a id="open_all" class="" href="#">Screen reader users can click here to open all menus</a>');
  $("#menu_column ul li").not("#menu_column ul li ul li").each(function(){
...

JavaScript Simple jQuery script - Opti...

by Gareth, July 22, 2010 10:30, No refactoring, tagged with jquery, javascript, cookies

Hi, I am pretty new to JS, ...

A959afc1b4415ada875f4d3eaa889132 Talk
1
2
3
4
  def is_pos_activation?
    if session[:pos_activation]
      block_given? ? yield : true
...

Ruby better way?

by RoadHouse, July 21, 2010 18:48, 5 refactorings, tagged with block, ruby, if

i like this code, but exist...

70089e712ed13abb99bec89bd5bfba77 Talk
1
2
3
4
<?php

class MyClass {
...

PHP Exception handling

by xrstf.myopenid.com, July 20, 2010 16:30, 2 refactorings, tagged with php, exceptions, transactions, pdo

I've got this pattern all o...

Avatar Talk
1
2
3
4
 def make_change(amount, coins = [100, 50, 20, 10, 5, 1, 0.5, 0.1])
    coins.sort! { |x, y| y <=> x }
    return coins.map!{ |coin|
...

Ruby change coins

by Howl Wong, July 20, 2010 02:39, 2 refactorings

change coins

9db7b935d620ed9b5efa68912e29005d Talk
1
2
3
4
require 'guest'
require 'parking_lot'

...

Ruby undefined method for nil:Ni...

by tragicdancer.myopenid.com, July 19, 2010 15:06, 3 refactorings, tagged with ruby

Hi!
whn i try and run my p...

Avatar Talk
1
2
3
4
 puts "Please enter the sentence to be encrypted: "
 plaintext = gets.chomp.upcase!
 puts "Please enter the vigenere key: "
...

Ruby Vigenere cipher implementation

by doctorno.myopenid.com, July 17, 2010 17:43, 3 refactorings, tagged with vigenere, ruby, cipher

I tried implementing this b...

Ca88e43e229390850b8be73459a418bf Talk
1
2
3
4
require 'yaml'

module Actions
...

Ruby instance extending problem

by Selman ULUG, July 15, 2010 21:47, 3 refactorings, tagged with instance, extend

I want to extend givin inst...

Dc844b49c0e04a920a1f07b8671b8b53 Talk
1
2
3
4
def self.status_name(status)
    holder = []
    Issue.all.each do |record|
...

Ruby Named Scope Trouble

by https://www.google.com/accounts/o8/id?id=AItOawmRvMhcLFwL72d7b-9gx7YpThiobwkY3Co, July 15, 2010 01:40, 2 refactorings, tagged with named_scope ruby rails

Hi,
A partner and I were t...

Avatar Talk
1
2
3
4
def setOrDefault
  setOrDefault = String.new
  if session[:orientation] then setOrDefault = session[:orientation] else setOrDefault = app_config ("orientation") end
...

Ruby default value if not define...

by https://www.google.com/accounts/o8/id?id=AItOawlgHbuNJETJ-PuMLyq1_KhU2wq1cc-KlCk, July 13, 2010 20:40, 2 refactorings

I'm looking for a compact w...

F4e37ffbbf81653b797ec4cf995a23b1 Talk
1
2
3
4
public class Singleton {
  // Private constructor prevents instantiation from other classes
  private Singleton() {}
...

Java Laisy Singleton patern

by jumar, July 13, 2010 02:31, No refactoring, tagged with java, singleton, patern

There is a very important g...

B6948c9d003a997fa34de0acda190ef5 Talk
1
2
3
4
(x..y).each do |n|
	// do something with n, p=nil
end
...

Ruby dummy data tree (without ro...

by Jandl, July 10, 2010 18:22, 2 refactorings

generate a dummy data tree ...

Avatar Talk
1
2
3
function dataStringToArray(dataStr) {
  var arr = dataStr.split("|"),
...

JavaScript Delimited data string to ne...

by squidsoup, July 07, 2010 23:33, 3 refactorings, tagged with javascript parsing

Given a string in this form...

8740fb2a869928fd0c39531902a83477 Talk
1
2
3
4
class Hash
  def keys_to_sym
    hash2 = {}
...

Ruby val.respond_to? x, but val....

by https://www.google.com/accounts/o8/id?id=AItOawn0gJnuVzWsNbJgQCOJhtcEq1z6qDPPlk0, July 07, 2010 04:07, 3 refactorings, tagged with Ruby Object respond_to runtime

Hash#keys_to_sym is broken....

Cdb15b84fe2146fa0f381240875081bd Talk
1
2
3
4
def name_repair(var) 
      
   car_names1 = ["HONDA",      
...

Ruby Can I remove the return sta...

by bain19.myopenid.com, July 04, 2010 06:31, 3 refactorings, tagged with ruby, logic, I, fail

What this method does is; I...

642d333608cc3483f64dba38cb81bdd2 Talk
1
2
3
void splitpath(const char *path, char *directory, char *filename, char *extension)
{
...

C Extracting directory, filen...

by Navaneeth, July 03, 2010 17:13, 8 refactorings, tagged with c string replace

I am new to C. Following co...

Avatar Talk
1
2
3
4
    def run_loop
      until @socket.eof?
        
...

Ruby IRC Connection command pars...

by https://www.google.com/accounts/o8/id?id=AItOawkSiXKxVb63AJp8Y2m73gvsQq9iyAnsdPk, July 03, 2010 14:05, No refactoring

I need a serious refactorin...

093d9ee83779122892ca58fea8886736 Talk
1
2
3
4
#!/usr/bin/env ruby
# encoding: utf-8
require 'irc/connection'
...

Ruby IRC::Client very small base

by https://www.google.com/accounts/o8/id?id=AItOawkSiXKxVb63AJp8Y2m73gvsQq9iyAnsdPk, July 03, 2010 11:23, No refactoring

I feel the need to learn so...

093d9ee83779122892ca58fea8886736 Talk
1
2
3
4
#!/usr/bin/env python                                                                                                                                             

from twisted.internet.protocol import ClientCreator, Protocol
...

Python Twisted tcp client

by https://www.google.com/accounts/o8/id?id=AItOawkapZWfDKPlzk45bKWi1klRG7GdRd4leuU, July 01, 2010 07:15, 1 refactoring, tagged with python twisted sockets net

I've an application in twis...

13d35cfcb64d83bd4019053045cd95b4 Talk