1 2 3 4
require 'ruby_camping' require 'camping_guests' ...
Ruby Help!! undefined method for...
Hi! Ive posted before about...
1 2 3 4
require 'ruby_camping' require 'camping_guests' ...
Ruby Help!! undefined method for...
Hi! Ive posted before about...
1 2 3 4
module Rack class SslBlock def initialize app, options = {} ...
Ruby Rack Middleware
any optimisations on this l...
1 2 3 4
def isSyncronized(self): NO_SYNC = 1 UNDER_DATE = 2 ...
Python nested if blocks
I wanna know if anyone can ...
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 ...
I have a map of strings whe...
1 2 3 4
require 'guest' require 'parking_lot' ...
Ruby `initialize': wrong number ...
Hi Im getting this error wh...
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...
Hi, I am pretty new to JS, ...
1 2 3 4
def is_pos_activation? if session[:pos_activation] block_given? ? yield : true ...
Ruby better way?
i like this code, but exist...
1 2 3 4
<?php class MyClass { ...
PHP Exception handling
I've got this pattern all o...
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| ...
1 2 3 4
require 'guest' require 'parking_lot' ...
Ruby undefined method for nil:Ni...
Hi!
whn i try and run my p...
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
I tried implementing this b...
1 2 3 4
require 'yaml' module Actions ...
Ruby instance extending problem
I want to extend givin inst...
1 2 3 4
def self.status_name(status) holder = [] Issue.all.each do |record| ...
Ruby Named Scope Trouble
Hi,
A partner and I were t...
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...
I'm looking for a compact w...
1 2 3 4
public class Singleton { // Private constructor prevents instantiation from other classes private Singleton() {} ...
Java Laisy Singleton patern
There is a very important g...
1 2 3 4
(x..y).each do |n| // do something with n, p=nil end ...
Ruby dummy data tree (without ro...
generate a dummy data tree ...
1 2 3
function dataStringToArray(dataStr) { var arr = dataStr.split("|"), ...
JavaScript Delimited data string to ne...
Given a string in this form...
1 2 3 4
class Hash def keys_to_sym hash2 = {} ...
Ruby val.respond_to? x, but val....
Hash#keys_to_sym is broken....
1 2 3 4
def name_repair(var) car_names1 = ["HONDA", ...
Ruby Can I remove the return sta...
What this method does is; I...
1 2 3
void splitpath(const char *path, char *directory, char *filename, char *extension) { ...
C Extracting directory, filen...
I am new to C. Following co...
1 2 3 4
def run_loop until @socket.eof? ...
Ruby IRC Connection command pars...
I need a serious refactorin...
1 2 3 4
#!/usr/bin/env ruby # encoding: utf-8 require 'irc/connection' ...
Ruby IRC::Client very small base
I feel the need to learn so...
1 2 3 4
#!/usr/bin/env python from twisted.internet.protocol import ClientCreator, Protocol ...
Python Twisted tcp client
I've an application in twis...
Hi! Ive posted before about...