<script type="text/javascript">

            var name = prompt("İsminizi giriniz", "");
...

JavaScript if statement

by https://www.google.com/accounts/o8/id?id=AItOawklsPC-zdgQIYnufSjvbkRUA4yDrplBbBc, September 26, 2011 01:33, 3 refactorings, tagged with short

how do ı write short?

55502f40dc8b7c769880b10874abc9d0 Talk
<form name="search" id="search" action="" method="post" accept-charset="utf-8">
  <input type="text" name="search[client]" id="searchclient" />
  <input type="text" name="search[ipaddr]" id="searchipaddr" />
...

PHP search with clean URL's

by https://www.google.com/accounts/o8/id?id=AItOawm0fOP9BUK8JyuvV7Z3omSYLYIBrsBSPBw, August 15, 2011 12:05, 2 refactorings, tagged with short, php, clean

I'm looking ideas on how to...

55502f40dc8b7c769880b10874abc9d0 Talk
//2. Complex timer tick event method - It is suitable extract foreach cycles in this methods to the separate methods?

        private void DispatcherTimerForPing_Tick(object sender, EventArgs eventArgs)
...

C# simplify the timer tick met...

by https://www.google.com/accounts/o8/id?id=AItOawnHEON1clAcojjad6LcdjWlIMytK_DPJKQ, January 24, 2011 17:30, 2 refactorings, tagged with short, readability, simplify

My problem is that I use in...

55502f40dc8b7c769880b10874abc9d0 Talk
//Constructors has many arguments

        [ImportingConstructor]
...

C# simplify the constructor

by https://www.google.com/accounts/o8/id?id=AItOawnHEON1clAcojjad6LcdjWlIMytK_DPJKQ, January 24, 2011 17:27, 2 refactorings, tagged with short, readability

Hi, I use caliburn micro as...

55502f40dc8b7c769880b10874abc9d0 Talk
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string colName = parameter.ToString();
...

C# if / switch horror

by https://www.google.com/accounts/o8/id?id=AItOawnHEON1clAcojjad6LcdjWlIMytK_DPJKQ, January 24, 2011 16:35, 6 refactorings, tagged with short, readability

Hi, I try refractor this ho...

55502f40dc8b7c769880b10874abc9d0 Talk
using System;
    using System.Linq;
    using System.Collections.Generic;
...

C# Validate a week

by Dave, December 20, 2010 23:18, 9 refactorings, tagged with short

The following is simple, bu...

E15092c3465775e6095a7bd675777dce Talk
r13 w = map (\c -> chr ((((ord c + 13) - 97) `mod` 26) + 97) w

Haskell Shortest Rot13

by https://www.google.com/accounts/o8/id?id=AItOawkpAfEP31fRzpQ5wtVTGKZAHPi6zN5xh4w, November 08, 2010 22:40, 2 refactorings, tagged with short

Compo shortest rot 13

Cf3ca7d0045e5f823c16d5f6b7687060 Talk
g = getLine
r = toRational
c = concat
...

Haskell EGCD

by https://www.google.com/accounts/o8/id?id=AItOawkpAfEP31fRzpQ5wtVTGKZAHPi6zN5xh4w, November 08, 2010 08:18, No refactoring, tagged with short

please refactor to less cha...

Cf3ca7d0045e5f823c16d5f6b7687060 Talk
def include_class?(obj_class)
      stack = []
    
...

Ruby hash.include_class?, recursive

by unixcharles, August 09, 2010 00:20, 1 refactoring, tagged with short, ruby

I have a hash like this one...

23e6178f295b9cb7473d44d9e501a2b3 Talk
def create_files
  files = []
  sizes = ['10K', '100K', '500K', '1M', '2M', '5M', '10M', '20M']
...

Ruby Eliminate temporary collect...

by Josh, June 23, 2010 22:52, 3 refactorings, tagged with short

A simple method to create a...

D41d8cd98f00b204e9800998ecf8427e Talk
tl = Time.now.localtime
(0..356).each {|i| d =  (Date.new(tl.year, tl.month, tl.day) +i );
 printf("\n%03s\n\n", Date::ABBR_MONTHNAMES[d.month]) if d.day == 1;
...

Ruby Generate Days of a Year

by gregelin.myopenid.com, February 27, 2010 15:51, 2 refactorings, tagged with short

I wrote the following to ge...

57f954ba5409a6504af785ed8d42e009 Talk
for y in 0...height
  for x in 0...width
    # BGR => RGB & miror y
...

Ruby Symplify few loops

by darkleo.myopenid.com, January 30, 2010 20:36, 7 refactorings, tagged with short, ruby

I need to reformat .bmp dat...

61f1b34f172ee1fbc1af42ab3ce0eca9 Talk
Clip.find_by_sql(["select * from clips where not exists
        (select 'clip_id' from histories where histories.clip_id = clips.id
        and histories.user_id = ?) ORDER BY clips.created_at DESC LIMIT 20", user.id])

Ruby ActiveRecord find_by_sql

by David, January 17, 2010 20:52, 5 refactorings, tagged with rails, sql, short, ruby, activerecord

How can I turn this into so...

D41d8cd98f00b204e9800998ecf8427e Talk
101.times do |n|

  next if n == 0
...

Ruby Fizz Buzz

by jhindle, January 15, 2010 13:08, 11 refactorings, tagged with short, fizzbuzz

Wrote a Fizz Buzz http://en...

6bff7d5313e73334ef0edc691a7564f7 Talk
def sort
    if params[:fact_id]
      @fact = Fact.find_by_id(params[:fact_id]) || Fact.new
...

Ruby Ugly IF, ELSE

by serek.openid.pl, December 18, 2009 10:17, 3 refactorings, tagged with rails, short, dry

Trying to make this a lot c...

597821ce12359ab2d95437c8164d5254 Talk
q = "query1=apa&query2=apa2"
Hash[q.split("&").collect{|a| a.split("=")}.flatten]
=> {"query1"=>"apa", "query2"=>"apa2"}

Ruby Parse a querystring

by Simon, October 05, 2009 19:47, 2 refactorings, tagged with short, ruby, fun

I'm looking if someone can ...

865351a8b8bb963c7ee935b3f342854e Talk
# call-seq:
  #   StatisticsUtils.merge_sum(hash1, hash2, ...) -> merged_hash
  #
...

Ruby Total the values in multipl...

by Trejkaz, July 08, 2009 00:54, 2 refactorings, tagged with short, hash, sum, merge

This is obviously not very ...

42b570f6f4312a872c2fc671e3ddc82b Talk
compress :: [Int] -> [[Int]]
compress (x:xs) = let (y,ys) = walk x xs
                  in [x,y]:compress ys
...

Haskell compressing an array of int...

by sargon, April 15, 2009 16:52, 6 refactorings, tagged with short

I took the idea from "Alec ...

55ca8e1248605bf5e1819ce2c47c160f Talk
<%= f.select :something, 1.upto(10) do |i| i end %>

Ruby Select tags

by sfusion.myopenid.com, April 02, 2009 11:01, 9 refactorings, tagged with rails, short, select

I find myself doing this a ...

4f5d54213efb6502baab202f3fb2f09e Talk
brew = "rdadadroxmocpronogomocdmqzx"
alphabet = "abcdefghijklmnopqrstuvwxyz"
word = ""
...

Ruby Newb needs some cleanup

by redpidgin, December 23, 2008 16:16, 7 refactorings, tagged with short, ruby, decode

Some code I've written for ...

5ce36f73f075f18632c284f56cedd23d Talk
def space_out_camel_case(stringAsCamelCase):
    """Adds spaces to a camel case string.  Failure to space out string returns the original string.
    >>> space_out_camel_case('DMLSServicesOtherBSTextLLC')
...

Python CamelCase to Camel Case (Py...

by bigsassy.myopenid.com, December 18, 2008 19:06, 4 refactorings, tagged with short, camelcase, snippet, regular expression, camel case, re

Hi, I'm a python newbie. C...

Cc4c514481dbf2cf9f602188dee3c212 Talk
def factorial( n )
  if !(n.is_a? Integer)
    raise ArgumentError, "argument must be a positive integer"
...

Ruby A simple factorial program.

by lordzoner.myopenid.com, November 12, 2008 02:16, 9 refactorings, tagged with short, ruby, factorial

I'm quite new to Ruby, and ...

D41d8cd98f00b204e9800998ecf8427e Talk
res = []
      path_without_calculation.gsub(/\{(.*?)\}/) {|match|
        res << match[1.. match.size-2]
...

Ruby Extract text between {} bra...

by stephan, October 22, 2008 11:54, 4 refactorings, tagged with short, regexp, gsub

Can this be written shorten?

349779c687ad1de3e116f3a5feaf3f92 Talk
use File::Spec;

sub purge_archive{
...

Perl Delete files from a directory

by kire, October 14, 2008 21:12, 2 refactorings, tagged with short, perl

I want to remove all files ...

37fa9baa82d848871535d6e2101221e5 Talk
#!/usr/bin/python

import socket,time
...

Python Connection Detection script

by matthew.scouten.myopenid.com, October 02, 2008 01:06, 3 refactorings, tagged with short, python, sockets

This is a Quick and Dirty s...

55502f40dc8b7c769880b10874abc9d0 Talk