URL url = new URL("https://dev.psigate.com:7989/Messenger/XMLMessenger");
				HttpURLConnection connection = (HttpURLConnection)url.openConnection();
				connection.setDoInput(true);		
...

Java PSiGate

by danielharan, January 30, 2009 01:46, 4 refactorings, tagged with xml, psigate, cc, webservice

This seems particularly egr...

880cbab435f00197613c9cc2065b4f5a Talk
var next = false;
for (var i = 0; i < el.options.length; i++) {
  if (next) {
...

JavaScript Check next option in select...

by Dmitry Polushkin, January 25, 2009 15:04, 5 refactorings, tagged with select, options, increment, next

Could be written in plain j...

832ed6ace46d61032151f4e1864c057f Talk
params[:name][:primary] # etc ...

Ruby Recursive population of has...

by Tj Holowaychuk, January 23, 2009 20:13, 11 refactorings

I do not even know where to...

F1e3ab214a976a39cfd713bc93deb10f Talk
include Form::Elements

...

Ruby Closure scoping issue

by Tj Holowaychuk, January 09, 2009 20:14, 5 refactorings, tagged with form

Below is the syntax I would...

F1e3ab214a976a39cfd713bc93deb10f Talk
require 'ostruct'
require 'rubygems'
require 'extlib/blank'
...

Ruby includes_all?

by Tj Holowaychuk, January 05, 2009 21:14, 5 refactorings

Having brain cramps today, ...

F1e3ab214a976a39cfd713bc93deb10f Talk
def run_once &block
  path = File.expand_path caller.first
  unless ($__run_once ||= []).include? path
...

Ruby Run once

by Tj Holowaychuk, December 16, 2008 21:30, 9 refactorings

Cleaner way?

F1e3ab214a976a39cfd713bc93deb10f Talk
# Working example
def test &block
...

Ruby Proc param names

by Tj Holowaychuk, December 12, 2008 23:20, 5 refactorings, tagged with binding

Below is the exact result I...

F1e3ab214a976a39cfd713bc93deb10f Talk
def test(a, b)
  capitalize_args
  puts a   # => Hello
...

Ruby Bindings on caller

by Tj Holowaychuk, November 22, 2008 06:16, 2 refactorings, tagged with binding

I dont really have a need f...

F1e3ab214a976a39cfd713bc93deb10f Talk
def monitor(uri)
  Thread.new(uri) do |uri|
    begin
...

Ruby Initial script execution ve...

by Tj Holowaychuk, November 22, 2008 02:27, 1 refactoring

Below is a little snippit o...

F1e3ab214a976a39cfd713bc93deb10f Talk
NAME:
  
...

Ruby suppress ERB newlines

by Tj Holowaychuk, November 22, 2008 02:16, No refactoring, tagged with erb

Just plain-jane ERB. What d...

F1e3ab214a976a39cfd713bc93deb10f Talk
class Something
  
...

Ruby Caching Methods

by Tj Holowaychuk, November 19, 2008 05:23, 6 refactorings, tagged with cache

Is it possible to cache met...

F1e3ab214a976a39cfd713bc93deb10f Talk
public static class DirectoryInfoExtensions
{
    public static void CopyTo(this String Source, String Destination, Boolean Overwrite)
...

C# DirectoryInfo.CopyTo

by GateKiller, November 11, 2008 17:10, 3 refactorings, tagged with .net, C#, directoryinfo, copyto

Because the .NET Framework ...

98c852e2d9b26249745ea92c72964d3f Talk
class Array
  def new_inject(initial, &block)
    self.each { |v| yield initial, v } 
...

Ruby Yield by 'reference'

by Tj Holowaychuk, October 23, 2008 22:25, 16 refactorings

This has been bugging me, i...

F1e3ab214a976a39cfd713bc93deb10f Talk
class Array
  def to_h
    hash = {}
...

Ruby Conversion from the 2d arra...

by Dmitry Polushkin, October 22, 2008 09:11, 7 refactorings, tagged with convert, hash, 2d array

Conversion from the 2d arra...

832ed6ace46d61032151f4e1864c057f Talk
WEEKDAYS = %w(mon tue wed thu fri sat sun)

dates = [
...

Ruby Open hours grouping

by Dmitry Polushkin, October 08, 2008 09:13, 4 refactorings, tagged with grouping, hours, weekdays

Actually I really don't kno...

832ed6ace46d61032151f4e1864c057f Talk
Declare @Index varchar(128)
...

C# Drop all Indexes in SQL Server

by GateKiller, October 07, 2008 10:48, 4 refactorings, tagged with sql, Index

The below is some code I re...

98c852e2d9b26249745ea92c72964d3f Talk
#!/usr/bin/env ruby

# == Synopsis
...

Ruby Source code analysis

by Tj Holowaychuk, September 26, 2008 03:04, 3 refactorings

Small class to analyze scri...

F1e3ab214a976a39cfd713bc93deb10f Talk
module CLI
  class Session 
    
...

Ruby Interactive CLI Session

by Tj Holowaychuk, September 23, 2008 16:06, 3 refactorings, tagged with cli shell

Again I am a Ruby newb (two...

F1e3ab214a976a39cfd713bc93deb10f Talk
#
  # Format filesize.
  #
...

Ruby Format Filesize

by Tj Holowaychuk, September 22, 2008 15:40, 3 refactorings, tagged with filesize format

Ruby-newb coming through. I...

F1e3ab214a976a39cfd713bc93deb10f Talk
#
  # Convert a string to CamelCase.
...

Ruby Camelize

by Tj Holowaychuk, September 22, 2008 15:38, 7 refactorings, tagged with camelcase

I am pretty new to Ruby (on...

F1e3ab214a976a39cfd713bc93deb10f Talk
Use Master

...

C# Backup All MS SQL Server Da...

by GateKiller, September 19, 2008 15:19, 2 refactorings, tagged with sql

I've recently blogged about...

98c852e2d9b26249745ea92c72964d3f Talk
"\xBD + \xBC".chars.normalize.to_s
=> "1/2 + 1/4"

Ruby On simplify multiple gsub

by Adam, August 27, 2008 13:42 Star_fullStar_fullStar_fullStar_fullStar_full

Perhaps I wasn't clear with...

A8d3f35baafdaea851914b17dae9e1fc Talk
data.chars.normalize!

Ruby On simplify multiple gsub

by Adam, August 27, 2008 04:07 Star_fullStar_fullStar_fullStar_fullStar_full

Why not use ActiveSupport::...

A8d3f35baafdaea851914b17dae9e1fc Talk
require 'transaction/simple/group'

def transact(objects, action)
...

Ruby On Code transactions

by Adam, August 20, 2008 14:06 Star_fullStar_fullStar_fullStar_fullStar_full
A8d3f35baafdaea851914b17dae9e1fc Talk
<span class="bluelinks-allsmall">
	<% if user.normal? %>
...

Ruby On Link to if else simple cond...

by Adam, August 20, 2008 13:51 Star_fullStar_fullStar_fullStar_full

You should be using named r...

A8d3f35baafdaea851914b17dae9e1fc Talk