Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
Simple Particle Engine for a shooter game
Snake / Nibbles clone in C and Ncurses
Please improve
Parsing of XML data has high CPU usage
Convert simple Javascript to jQuery plugin
Active Record getting unique records
List the files in a directory without the directory name or the extension
clean the code
ohs system, recruitment software, hr software, oh&s software, human resources software, ohs software
Array parsing in a block
Popular
Parsing of XML data has high CPU usage
Please improve
Snake / Nibbles clone in C and Ncurses
List the files in a directory without the directory name or the extension
Convert simple Javascript to jQuery plugin
Simple Particle Engine for a shooter game
Active Record getting unique records
Breadth first cartesian product iterator
php refactoring
first BST
Pastable version of
An attempt at Ruby modules and namespaces
<pre class='prettyprint' language='ruby'>module Anubis module ShardAccess require "net/http" LIB_VERSION = 'r1b' class Read attr_accessor :path, :body, :headers def initialize( path_in, body_in, accept='xml', limit=10 ) self.path = path_in self.body = body_in self.headers = { 'Interface' => 'S1', 'Accept' => accept, 'Limit' => limit.to_s, 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'RB_SHARD_ACCESS_LIB_' + Anubis::ShardAccess::LIB_VERSION } end def call ( host, port ) http = Net::HTTP.new( host, port ) resp = http.post2( @path, @body, @headers ) end end end end host = 'IP.AD.RE.SS' port = 10001 path = '/message' body = "query_string" req = Anubis::ShardAccess::Read.new( path, body, 'csv', 1 ) data = req.call( host, port ) puts data.body</pre> <a href="http://www.refactormycode.com/codes/810-an-attempt-at-ruby-modules-and-namespaces" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>