1
2
3
4
private string getMD5String(string PlainText)
{
   System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create();
...

C# Cryptography with MD5

by acidmind, September 01, 2008 13:19, 3 refactorings, tagged with MD5;C#;

This is a simple example of...

78f078ded4ae388e490c240c038c7f28 Talk
1
2
3
4
using System.Security.Cryptography;

public class CryptographyRSA()
...

C# Cryptography with RSA and B...

by acidmind, August 29, 2008 12:20, 2 refactorings, tagged with Cryptography;RSA;Base64

This is a simple example of...

78f078ded4ae388e490c240c038c7f28 Talk
1
2
3
4
/**
 * http://www.openjs.com/scripts/events/keyboard_shortcuts/
 * Version : 2.01.B
...

JavaScript Handling Keyboard Shortcuts...

by Tien Dung, July 29, 2008 09:30, 1 refactoring

I found below code very use...

5071c5b861341c0dcfcf6ac86327701f Talk
1
2
3
4
module ThinkingSphinx
  class Search
    class << self
...

Ruby How to extend a class prope...

by Tien Dung, July 29, 2008 04:09, No refactoring, tagged with ruby metaprogramming

Recently, I need to extend ...

5071c5b861341c0dcfcf6ac86327701f Talk
1
2
3
4
class AccountsController < ApplicationController

  layout 'application'
...

Ruby Password update code

by danielharan, July 16, 2008 16:59, 4 refactorings, tagged with rails, restful, authentication

Mostly straight from a tuto...

880cbab435f00197613c9cc2065b4f5a Talk
1
2
3
4
private static Regex _namedtags = new Regex
    (@"</?(?<tagname>\w+)[^>]*(\s|$|>)",
    RegexOptions.Singleline | RegexOptions.ExplicitCapture);
...

C# Balance HTML Tags

by Jeff Atwood, July 11, 2008 08:40, 25 refactorings, tagged with html, balance, tags, unbalanced

For the subset of HTML tags...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
4
private static Regex _tags = new Regex("<[^>]*(>|$)",
    RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
private static Regex _whitelist = new Regex(@"
...

C# Sanitize HTML

by Jeff Atwood, June 20, 2008 08:24, 51 refactorings, tagged with xss, sanitize, html

Takes a provided HTML strin...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
4
class JobBoard < ActiveRecord::Base
  has_many :job_board_postings
  
...

Ruby Ruby has_finder on has_many ?

by danielharan, April 01, 2008 16:10, 1 refactoring, tagged with has_finder rails

This smells... one of the m...

880cbab435f00197613c9cc2065b4f5a Talk
1
2
3
4
require 'rubygems'
require 'data_mapper'
require 'benchmark'
...

Ruby DataMapper threaded benchmark

by Kevin Williams, February 20, 2008 04:38, 3 refactorings, tagged with orm, datamapper, benchmark

third of three - slowest of...

267942571862781dd912de6482a35f46 Talk
1
2
3
4
require 'rubygems'
require 'sequel'
require 'benchmark'
...

Ruby Sequel threaded benchmark

by Kevin Williams, February 20, 2008 04:35, 5 refactorings, tagged with orm, sequel, benchmark

second of three, not as fas...

267942571862781dd912de6482a35f46 Talk
1
2
3
4
require 'rubygems'
require 'active_record'
require 'benchmark'
...

Ruby ActiveRecord threaded bench...

by Kevin Williams, February 20, 2008 04:33, No refactoring, tagged with orm, activerecord, benchmark

first of three benchmarks, ...

267942571862781dd912de6482a35f46 Talk
1
2
3
4
class Fixnum
  def <=>(b)
    self % b
...

Ruby Challenge: Ugliest Ruby Fiz...

by jamesgolick, December 20, 2007 21:54, 8 refactorings

So, after seeing some ugly ...

F6eddf2f983d23c2d031e407852625e9 Talk
1
2
3
class PostsController < ResourceController::Base
...

Ruby resource_controller: Redesi...

by jamesgolick, November 05, 2007 20:27, 5 refactorings, tagged with rails, resource, restful

Backstory on my blog: http:...

F6eddf2f983d23c2d031e407852625e9 Talk
1
2
3
document.write ('<noscript>\n');
document.write (imageClick);
document.write ("</noscript>");

JavaScript I care about older browsers...

by Gary Haran, October 30, 2007 22:30, 3 refactorings

I found this great piece of...

403e57e2be130d2218f992b86dfa8260 Talk
1
2
3
4
class String 
  def postal?  
    self.match(/[a-zA-Z]{1}\d{1}[a-zA-Z]{1}([\x20-])*\d{1}[a-zA-Z]{1}\d{1}/) ? true : false
...

Ruby Is This String Postal?

by Gary Haran, October 30, 2007 15:29, 6 refactorings, tagged with string, class, postal

We've had the debate over w...

403e57e2be130d2218f992b86dfa8260 Talk
1
2
3
4
namespace :migrations do
  
  desc 'reverts, renames and re-executes uncommitted migrations that conflict with already committed migrations'
...

Ruby Rails migration conflict re...

by danielharan, October 26, 2007 18:25, 1 refactoring, tagged with rails

Explained here: http://www....

880cbab435f00197613c9cc2065b4f5a Talk
1
2
3
4
require 'erb'
class ClientMigrator
  def self.create(fields)
...

Ruby Dynamic migrations for rails

by danielharan, October 12, 2007 04:27, 1 refactoring

How do you create a rails p...

880cbab435f00197613c9cc2065b4f5a Talk
1
2
3
4
if self.location_type.to_s == 'point'
  breaker = self.lang == 'fr' ? 'proximite' : 'near'
 else  
...

Ruby Iffy

by Gary Haran, October 11, 2007 19:15, 6 refactorings

With all the magic surround...

403e57e2be130d2218f992b86dfa8260 Talk
1
2
3
tab()
...

Bash On Open a new tab in current d...

by Marco Valtas, October 10, 2007 05:00

Macournoyer, I tried your f...

B8d457d2c39911ea4c74ba7d66b9c3f7 Talk
1
2
3

...

Java On Hello World

by Marco Valtas, October 06, 2007 15:40 Star_fullStar_fullStar_fullStar_full

Ok, your HelloWorld is not ...

B8d457d2c39911ea4c74ba7d66b9c3f7 Talk
1
2
3
4
class ITA
  
  class Number
...

Ruby On Integer puzzle

by danielharan, October 03, 2007 16:31 Star_fullStar_fullStar_fullStar_fullStar_full

Here is the full solution, ...

880cbab435f00197613c9cc2065b4f5a Talk
1
2
3
/* Copyright (c) 2007 the authors listed at the following URL, and/or
...

Java On Fastest way to sort doubles...

by Marco Valtas, October 02, 2007 21:49

I forgot to paste the Quick...

B8d457d2c39911ea4c74ba7d66b9c3f7 Talk
1
2
3
import java.util.Arrays;
...

Java On Fastest way to sort doubles...

by Marco Valtas, October 02, 2007 21:45

Well, first of all I'm not ...

B8d457d2c39911ea4c74ba7d66b9c3f7 Talk
1
2
@matches = @languages.collect {|s| s[0..1]} & SUPPORTED_LANGUAGES.flatten
# ["en"]

Ruby On Accept Language Array

by danielharan, October 02, 2007 13:54

You can get a list of match...

880cbab435f00197613c9cc2065b4f5a Talk

Java On Fastest way to sort doubles...

by Marco Valtas, October 02, 2007 06:41

There´s a reason to not us...

B8d457d2c39911ea4c74ba7d66b9c3f7 Talk