My Recent Pastes (237854 and counting)

All Pasties (over 237,854 and counting)

Pages: 1 7851 7853 7855 11893

Below are summaries of the most recent pasties.

September 06, 2007
6:36PM EDT

1
2
3
4
5
>> def a(options={})
>>   options[:b] ||= 2
>>   options[:c] ||= 4
>>   p [options[:b],options[:c]]
>> end

September 06, 2007
6:27PM EDT
by Duane Johnson

1
2
3
4
5
development:
  sequel: &default
    adapter: mysql
    database: sample_development
    username: teh_user

September 06, 2007
6:20PM EDT

1
2
3
4
5
module AttachmentHelper
  def self.included(base) # :nodoc:
    base.extend ActMethods
  end

September 06, 2007
6:18PM EDT

1
2
3
4
5
=== mod_fastcgi.c
==================================================================
--- mod_fastcgi.c       (revision 2043)
+++ mod_fastcgi.c       (local)
@@ -49,6 +49,11 @@

September 06, 2007
6:18PM EDT
by Duane Johnson

1
2
3
4
5
# Add your own ruby code here for app specific stuff. This file gets loaded
# after the framework is loaded.
puts "Started merb_init.rb ..."

puts "Loading dependencies..."

September 06, 2007
6:16PM EDT

1
2
3
4
5
class CreateAttachments < ActiveRecord::Migration
  def self.up
    create_table :attachments do |t|
      t.column :content_type, :string
      t.column :filename, :string     

September 06, 2007
6:14PM EDT

1
2
3
4
5
oracle@beo1209 ~ $ dig kcbug.org

; <<>> DiG 9.3.4 <<>> kcbug.org
;; global options:  printcmd
;; Got answer:

September 06, 2007
6:13PM EDT

1
2
3
4
5
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Test of onclick handlers in a &lt;input type=&quot;text&quot; /&gt;</title>

September 06, 2007
6:10PM EDT
by Guillaume Nodet

1
Hey

September 06, 2007
5:58PM EDT

1
2
3
4
5
    public int diferenciasdias(String diauno, String diados) {
        int totaldias = 0;
        int diaunon = (new Integer(diauno.substring(0, 2))).intValue();
        int mesunon = (new Integer(diauno.substring(3, 5))).intValue();
        int aF1ounon = (new Integer(diauno.substring(6, diauno.length()))).intValue();

September 06, 2007
5:56PM EDT

1
2
3
4
5
class Admin::JobController < AdminController
  active_scaffold :job do |config|
      config.label = 'Gestion des projets'
      config.theme = :blue
      config.actions = [:list, :update, :show, :nested]

September 06, 2007
5:48PM EDT

1
2
3
4
5
ActionController::Routing::Routes.draw do |map|
  # The priority is based upon order of creation: first created -> highest priority.
  
  # Sample of regular route:
  # map.connect 'products/:id', :controller => 'catalog', :action => 'view'

September 06, 2007
5:43PM EDT

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

def foo
  yield "in foo"
end

September 06, 2007
5:43PM EDT

1
2
3
4
5
NUESTRA MALDITA VERSION
-----------------------

        function del($id = null, $cascade = true) {
                if ($id) {

September 06, 2007
5:41PM EDT

1
2
3
4
5
NameError (uninitialized constant Caboose::Acts::Paranoid::ActiveRecord::ConnectionAdapters):
    .//vendor/rails/activesupport/lib/active_support/dependencies.rb:263:in `load_missing_constant'
    .//vendor/rails/activesupport/lib/active_support/dependencies.rb:452:in `const_missing'
    .//vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:258:in `connection_without_query_cache='
    .//vendor/rails/activerecord/lib/active_record/query_cache.rb:54:in `connection='

September 06, 2007
5:36PM EDT

1
2
3
4
5
Ferret::FileNotFoundError (File Not Found Error occured at <except.c>:117 in xpop_context
Error occured in fs_store.c:329 - fs_open_input
        tried to open "/home/magicarsenal/admin/current/config/../index/production/product/_csp_8t.del" but it doesn't exist: <No such file or directory>

):

September 06, 2007
5:27PM EDT

1
2
3
4
5
## The but seeam not works, I have set in active_scaffold conf[:status].columns.ui_type = :select too
module JobHelper
  def status_form_column(record, select_name)
    select :record, :status, {'En attente de modération' => 'En attente de validation', 'Approuvé' => 'Approuvé', 'Clos' => 'Clos'}, :name => select_name 
  end

September 06, 2007
5:25PM EDT
by Scott

1
2
3
4
5
elseif(isset($_REQUEST['changepass'])) {
        print "blah";
        if($_REQUEST['changepass'] == "true") {
                print "blah";
        }

September 06, 2007
5:21PM EDT

1
2
3
4
5
  def after_save
    logger.debug "testing the status of the current file #{self.filename} #{self.content_type} #{self.public_filename} #{self.full_filename}"
    if movie?
      convert_video_to_flv
      grab_screenshot_from_video

September 06, 2007
5:18PM EDT

1
2
3
4
5
$ sudo puppetd --server 10.1.0.70 --test
notice: Ignoring cache
err: Could not retrieve configuration: Uncaught exception compile error
(erb):4: syntax error
_erbout

Next page

Previous page