My Recent Pastes (74 and counting)

Pastes by Alexander Ross (74 and counting)

Pages:

Below are the 14 most recent pasties by Alexander Ross.

September 08, 2006
2:37PM EDT
by Alexander Ross

>>> import timeit
>>> t = timeit.Timer("'word1 word2 word3 word'.split()")
>>> t.timeit()
2.5699281692504883
>>> t = timeit.Timer("['word1', 'word2', 'word3', 'word4']")

September 08, 2006
2:36PM EDT
by Alexander Ross

0.87361502647399902

September 06, 2006
8:51PM EDT
by Alexander Ross

def counter(maximum):
    i = 0
    while True:
        if i == maximum:
            break

August 31, 2006
8:08PM EDT
by Alexander Ross

<html>
<head>
<script>
    function add_hi() {
        var p = document.createElement("P");

August 30, 2006
11:45PM EDT
by Alexander Ross

<html>
  <head>
    <script>
      function f(obj) {
        if(obj.style.visibility == "hidden"){

August 30, 2006
11:07PM EDT
by Alexander Ross

def format(text, indent='', width=70):
    out = []
    stack = [word for word in text.replace("\n", " ").split(" ") if word]
    while stack:
        line = []

August 30, 2006
11:05PM EDT
by Alexander Ross

def format(text, indent='', width=70):
    out = []
    stack = [word for word in text.replace("\n", " ").split(" ") if word]
    while stack:
        line = []

August 30, 2006
11:00PM EDT
by Alexander Ross

def format(text, indent='', width=70):
    out = []
    stack = [word for word in text.replace("\n", " ").split(" ") if word]
    while stack:
        line = ""

August 30, 2006
10:59PM EDT
by Alexander Ross

def format(text, indent='', width=70):
    out = []
    stack = [word for word in text.replace("\n", " ").split(" ") if word]
    while stack:
        line = ""

August 30, 2006
10:54PM EDT
by Alexander Ross

import re
def format(s, indent='', width=70):
    out = []
    s = s.replace("\n", " ")
    s = re.compile("  +").sub(" ", s)

August 30, 2006
10:46PM EDT
by Alexander Ross

                {        name = 'source.js.embedded.html';
                        begin = '(?:^\s+)?<((?i:script))\b(?![^>]*/>)';
                        end = '(?<=</(script|SCRIPT))>(?:\s*\n)?';

August 30, 2006
10:46PM EDT
by Alexander Ross

                        end = '(?<=</(script|SCRIPT))>(?:\s*\n)?';

August 30, 2006
10:44PM EDT
by Alexander Ross

<html>
  <head>
    <script>
      function f(state) {
        return 5;

August 30, 2006
10:43PM EDT
by Alexander Ross

<html>
  <head>
    <script>
      function f(state) {
        return 5;

Previous page