layouts = Dir.glob("_layouts/*")
layouts.each do |layout|
  layout.gsub!(/^_layouts\/(.*)\..*$/, '\1')
...

Ruby List the files in a directo...

by Aziz Light, February 01, 2012 08:46, 2 refactorings, tagged with ruby, ruby1.9

The title says it all, I'm ...

D69bd6b89f0c9204eed89de9d7ee4632 Talk
class Company
  has_many :stores
end
...

Ruby Active Record getting uniqu...

by kibyegn.myopenid.com, February 03, 2012 01:40, 1 refactoring, tagged with rails, short clean ruby, active record

I still think I could make ...

6d071ab3b1a56ebe43df404356331163 Talk
from itertools import product
def breadth_first_product(*args):
	"""Works like itertools.product but iterates "breadth first".
...

Python Breadth first cartesian pro...

by abrakadabra42.myopenid.com, January 02, 2012 17:28, 17 refactorings, tagged with iterators, cartesian product

There must be an easier way...

55502f40dc8b7c769880b10874abc9d0 Talk
<?php
	$location = htmlspecialchars($_SERVER['HTTP_REFERER']);
	$email = strtolower(mysql_real_escape_string($_REQUEST['email']));
...

PHP php refactoring

by openid.aol.com/zaknaji, January 15, 2012 23:31, 8 refactorings

Just completed this a week ...

9c5da7ae7d2aea9dc96dd57a9044fccc Talk
package BST;
import exceptions.DuplicateItemException;

...

Java first BST

by orangelight.myopenid.com, January 18, 2012 14:13, 5 refactorings

hi,

so i'm still a new p...

55502f40dc8b7c769880b10874abc9d0 Talk
public void setPageOption(String key, String value){
		if (key==null) return;
		Boolean boolValue = value==null? null: "true".equals(value);
...

Java Too many if statements

by https://www.google.com/accounts/o8/id?id=AItOawnvtFGh-r9ibK5ZHTYiZh2UzxDww7-bwI0, January 04, 2012 03:17, 5 refactorings

Too many if statements. Wan...

55502f40dc8b7c769880b10874abc9d0 Talk
var spanish = ["arbol", "casa", "el", "la", "quintas", "es", "verde", "y", "roja"];
var english = ["tree", "house", "the", "the", "crack", "is", "green", "and", "red"];
var traductor = function () {
...

JavaScript Learning JS

by claimid.com/ompemi, January 25, 2012 11:43, 5 refactorings

that's it

55502f40dc8b7c769880b10874abc9d0 Talk
Weeks = [["2012-01-15","2012-01-22"], ["2012-01-22","2012-01-29"], ["2012-01-29","2012-02-05"],["2012-02-05","2012-02-12"], ["2012-02-12","2012-02-19"], ["2012-02-19","2012-02-26"]]  

...

Ruby clean the code

by https://www.google.com/accounts/o8/id?id=AItOawlaTnwjQ00W1XCRaUEGIonvKgruTMebfak, January 30, 2012 03:54, 4 refactorings, tagged with ruby, rails 3

Plz help me clean the code
...

55502f40dc8b7c769880b10874abc9d0 Talk
if $0 == __FILE__
        total = 0

...

Ruby Euler Problem 2 solution

by https://www.google.com/accounts/o8/id?id=AItOawkD4xFlDWBQgag82x1DXUSXIYd_s8Ca8B4, January 24, 2012 18:43, 3 refactorings

Sorry if I shouldn't be pos...

55502f40dc8b7c769880b10874abc9d0 Talk
// First layer initialization with OpenLayers (removed 2 through 6 for cleanliness... but they are hii_2, hii_3,...,hii_6)
    hii_1 = new OpenLayers.Layer.MapServer("Land Cover","../../cgi-bin/mapserv.exe",{
        map:'C:/ms4w/Apache/htdocs/hii/hii_landcover.map'},{
...

JavaScript Multiple jQuery Sliders &am...

by https://www.google.com/accounts/o8/id?id=AItOawkpq_fK9eTyv4kT_L9oOdZmIj8FDIXXM58, January 13, 2012 22:18, 3 refactorings, tagged with jQuery, OpenLayers

I am having trouble refacto...

446fad1f42523db25d60d587b592c9f0 Talk
M = [["a", "b"], ["c", "d"], ["e", "f"]]

x = []
...

Ruby Array parsing in a block

by https://www.google.com/accounts/o8/id?id=AItOawmWMRp7fAci9domcwhxD3fNikoTak9bkYc, January 26, 2012 05:59, 1 refactoring, tagged with arrays, blocks, loops, array syntax

x should be ["a","c","e"] i...

55502f40dc8b7c769880b10874abc9d0 Talk
v

PHP Templating Engine

by https://www.google.com/accounts/o8/id?id=AItOawmqeWYiB7S-kJBQrA90kF0hQwFF-sWnQfI, January 10, 2012 17:13, 1 refactoring, tagged with php, templating, engine

gdg
</head>
<body>
<% ra...

55502f40dc8b7c769880b10874abc9d0 Talk
#include <stdio.h>

int main ()
...

C Test

by https://www.google.com/accounts/o8/id?id=AItOawkZuzVMryYKOU8sDRj12k_5P2R4U4Yf5Rw, January 10, 2012 00:58, 1 refactoring

It is just for Test.

55502f40dc8b7c769880b10874abc9d0 Talk
When /^I request test urls with headers "([^"]*)" "([^"]*)"$/ do |accept, headers|
  header_map = create_header_map_from_string(headers)
  test_urls = load_fixture("test-urls1.txt")
...

Ruby Looping over a file

by https://www.google.com/accounts/o8/id?id=AItOawnvtFGh-r9ibK5ZHTYiZh2UzxDww7-bwI0, January 11, 2012 09:15, 1 refactoring

The puts doesn't happen unt...

55502f40dc8b7c769880b10874abc9d0 Talk
Favour specialises in Affordable OHS Software, Recruitment Management & HR Software. We provide solutions to your OH&S and Human Resources functionality and capabilities. Visit us today to see how we can help you!

Bash ohs system, recruitment sof...

by bookerbrinley.myopenid.com, January 28, 2012 04:46, No refactoring, tagged with HR Software, OHS Software, OH&S Software, Recruitment Software, Human Resources Software, OHS System

Favour specialises in Affor...

A28e9a9bc86debda0d12ef97933de3d1 Talk
List<String> content = resource.getContent(ArrayList.class);

Java Type Safety

by https://www.google.com/accounts/o8/id?id=AItOawnvtFGh-r9ibK5ZHTYiZh2UzxDww7-bwI0, January 25, 2012 07:44, No refactoring

Is there a way to make this...

55502f40dc8b7c769880b10874abc9d0 Talk
public InputSource resolveEntity(String publicId, String systemId) {
		if (systemId.endsWith("/documents.xsd")) {
    		InputStream in = getClass().getResourceAsStream("/xsd/documents.xsd");
...

Java Long if ladder

by https://www.google.com/accounts/o8/id?id=AItOawnvtFGh-r9ibK5ZHTYiZh2UzxDww7-bwI0, December 01, 2011 09:18, 12 refactorings

Be nice to get rid of the i...

55502f40dc8b7c769880b10874abc9d0 Talk
ALPHA = ('a'..'z').to_a

def nextAlpha letter
...

Ruby String Incrementing

by caustic-interface.myopenid.com, December 20, 2011 18:24, 11 refactorings

It's intended to increment ...

55502f40dc8b7c769880b10874abc9d0 Talk
protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        GWportalDataContext db = new GWportalDataContext();
...

C# Refactor LINQ selection

by klim8d.myopenid.com, December 16, 2011 03:33, 9 refactorings, tagged with C# asp.net speed LINQ

I hope someone could refact...

55502f40dc8b7c769880b10874abc9d0 Talk
def battle
  # do something 
  if result=self.save
...

Ruby Unnecessary assignment near...

by https://www.google.com/accounts/o8/id?id=AItOawldXGtOvAVQC5k5Z7Y71zO75UzIQ98K5a0, December 12, 2011 07:36, 5 refactorings, tagged with return, observers

It feels like the assignmen...

55502f40dc8b7c769880b10874abc9d0 Talk
# Start of file, showing the name of the application
# Size, and all relevent parts of the title

...

Ruby Address Book

by https://www.google.com/accounts/o8/id?id=AItOawkiJON4MFJ9bopD8IvwQ1pbpH3ag7yrtnI, December 28, 2011 07:36, 5 refactorings, tagged with ruby, methods, regexp, regular expression

This is a fairly simple add...

55502f40dc8b7c769880b10874abc9d0 Talk
>> %w(Pending Processing Executed Canceled).each_with_index.map {|v, i| i}
=> [0, 1, 2, 3]

Ruby Get array of indexes from g...

by jibiel, December 08, 2011 00:18, 5 refactorings, tagged with rails, dry, ruby-1.9.2

Using it :in validates_incl...

4b3896c9b63e756621efa3746c32e91b Talk
#more elegante way? 
sector = Sector.create(:name => name) unless sector = Sector.find_by_name(sector)

Ruby more elegant way

by RoadHouse, December 01, 2011 09:52, 5 refactorings, tagged with ruby, activerecord, rails3

no ideas about it, rails 3....

70089e712ed13abb99bec89bd5bfba77 Talk
protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        GWportalDataContext db = new GWportalDataContext();
...

C# Refactor LINQ queries

by klim8d.myopenid.com, December 19, 2011 04:39, 4 refactorings, tagged with LINQ speed C# asp.net performance

Hello, my other thread went...

55502f40dc8b7c769880b10874abc9d0 Talk
def self.generate_required_data(orders)
      all_the_orders = []
      orders.each do |order|
...

Ruby Building an array from data...

by juo100@gmail.com, December 05, 2011 02:36, 4 refactorings, tagged with shorten

Just interested to see how ...

B543a43dc8cb0aae562278484db60d25 Talk