My Recent Pastes (264508 and counting)

All Pasties (over 264,508 and counting)

Pages: 1 8537 8539 8541 13226

Below are summaries of the most recent pasties.

October 30, 2007
10:54PM EDT
by Michael D. Ivey

1
2
3
4
5
# The ResponderMixin adds methods that help you manage what
# formats your controllers have available, determine what format(s)
# the client requested and is capable of handling, and perform
# content negotiation to pick the proper content format to
# deliver.

October 30, 2007
9:51PM EDT

1
2
3
4
5
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>

October 30, 2007
9:50PM EDT

1
2
3
4
5
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

/* getprotobyname */

October 30, 2007
9:43PM EDT

1
2
3
4
5
# require AR
require 'rubygems'
require 'active_record'

# connect to the database

October 30, 2007
9:41PM EDT

1
2
3
4
5
# This file is autogenerated. Instead of editing this file, please use the
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.

ActiveRecord::Schema.define(:version => 18) do

October 30, 2007
9:41PM EDT

1
2
3
4
5
# This file is autogenerated. Instead of editing this file, please use the
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.

ActiveRecord::Schema.define(:version => 18) do

October 30, 2007
9:27PM EDT
by bitsweat

1
2
3
4
5
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb
index eee2c6a..0984f7a 100644
--- a/actionpack/lib/action_view/helpers/prototype_helper.rb
+++ b/actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -384,24 +384,15 @@ module ActionView

October 30, 2007
9:25PM EDT

1
2
3
4
5
# Customize to match your system. Then, place this file in ~/.arm-cc-specs
# (where ~ represents your home dir).
PREPROCESS=/Developer/SDKs/iPhone/bin/llvm-gcc
CPPFLAGS=-E -U__i386__ -U__ppc__ -D__arm__ -mmacosx-version-min=10.4 -isystem /Developer/SDKs/iPhone/include -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include -F /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks
LLVM_GCC=/Developer/SDKs/iPhone/bin/llvm-gcc

October 30, 2007
9:25PM EDT

1
2
3
4
5
<?php
/** WordPress's config file **/
/** Do not upload this file to server. This config file is only good for this machine so you can run a local instance of WP. **/
/** http://wordpress.org/   **/

October 30, 2007
9:12PM EDT

1
2
3
4
5
extconf.rb:1: command not found: mysql_config5 --include
extconf.rb:8: command not found: mysql_config5 --libs_r
extconf.rb:8: command not found: mysql_config5 --libs
/usr/bin/ld: warning multiple definitions of symbol _setregid
/usr/local/lib/libruby.dylib(process.o) definition of _setregid

October 30, 2007
8:57PM EDT

1
2
3
4
5
YDN.HeadlineScroller = Class.create();
YDN.HeadlineScroller.prototype = {
        
        initialize: function(id, speed) {
                //Set the variables that are passed in to be instance variables

October 30, 2007
8:47PM EDT

1
2
3
4
5
## not working code

class MusicBrain < ActiveRecord::Base
  validates_uniqueness_of :mbid
  belongs_to :track

October 30, 2007
8:25PM EDT

1
2
3
4
5
<body>
<div id='content'>
   <%= yield %>
</div>

October 30, 2007
8:25PM EDT

1
2
3
4
5
SELECT e.event_id, e.event_name, e.event_location, e.event_date,
               e.email_begin_date, e.email_end_date,
               GROUP_CONCAT(substring(u.user_id,0,1)) as num_users,
               GROUP_CONCAT(ISNULL(q.sent_daily), '|',
                   ISNULL(q.sent_weekly) separator '^') as num_quotes

October 30, 2007
8:24PM EDT
by nicksieger

1
2
3
4
5
$ ruby -e "p File.lstat('/')"
#<File::Stat dev=0xe000002, ino=2, mode=041775, nlink=32, uid=0, gid=80, rdev=0x0, size=1190, blksize=4096, blocks=0, atime=Tue Oct 30 18:40:27 -0500 2007, mtime=Tue Oct 30 08:23:51 -0500 2007, ctime=Tue Oct 30 08:23:51 -0500 2007>
$ bin/jruby -e "p File.lstat('/')"
JRubyFile.java:106:in `org.jruby.util.JRubyFile.getParent': java.lang.NullPointerException: null (NativeException)
  from JRubyFile.java:110:in `org.jruby.util.JRubyFile.getParentFile'

October 30, 2007
8:19PM EDT

1
2
3
4
5


## tag.rb

October 30, 2007
8:16PM EDT

1
2
3
4
5
f = open("MOVIES.LST")

a = []

a << f.readline.chomp while !f.eof?

October 30, 2007
8:15PM EDT

1
2
3
4
5
- (void)splitView:(NSSplitView*)sender resizeSubviewsWithOldSize:(NSSize)oldSize {
        NSView *leftSubview = [[sender subviews] objectAtIndex:0];
        NSView *rightSubview = [[sender subviews] objectAtIndex:1];
        
        float newHeight = [sender frame].size.height;

October 30, 2007
8:14PM EDT

1
2
3
4
5
                $ES("a[href*='remove']", page).addEvent("click", function(e){
                        e = new Event(e).stop(); var line = this.getParent();
                        new Ajax(this.getProperty("href"), {
                                method: "get",
                                onSuccess: function(){

October 30, 2007
8:13PM EDT

1
2
3
4
5
#!/usr/bin/env ruby

require "open-uri"

puts "Downloading descriptor file..."

Next page

Previous page