This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| reserved-dhcp-165-124-223-118:migrate davidyip$ RAILS_ENV=development rake db:migrate | |
| (in /Users/davidyip/Projects/pathcore/pathcore) | |
| == 20080812182649 AddUniqueIndexToCollectionGroupsRequisitionIdentifier: migrating | |
| -- add_index(:collection_groups, :requisition_identifier, {:unique=>true}) | |
| rake aborted! | |
| SQLite3::SQLException: SQL logic error or missing database: CREATE UNIQUE INDEX "index_collection_groups_on_requisition_identifier" ON "collection_groups" ("requisition_identifier") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Bits | |
| import Data.Word (Word32, Word64) | |
| -- Utilities | |
| concatBytes :: (Bits a) => a -> a -> a | |
| concatBytes b1 b2 = (.|.) (shiftL b1 8) b2 | |
| le4 :: [Word32] -> [[Word32]] | |
| le4 (x4:x3:x2:x1:[]) = [x1,x2,x3,x4]:[] | |
| le4 (x4:x3:x2:x1:xs) = [x1,x2,x3,x4]:le4 xs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> | |
| </head> | |
| <body> | |
| <div id="container"> | |
| <div id="header"> | |
| Header | |
| </div> | |
| <div id="sidebar"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'RMagick' | |
| Width = 960.0 | |
| TotalDivisions = 24 | |
| Divisions = [ 4 + 1, 16 - 1, 4 ] | |
| Colors = [ '#6c7174', '#c3c7cb', '#4b4d4e' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0 | |
| OrgName: RIPE Network Coordination Centre | |
| OrgID: RIPE | |
| Address: P.O. Box 10096 | |
| City: Amsterdam | |
| StateProv: | |
| PostalCode: 1001EB | |
| Country: NL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.on('beforewrite', function (store, action, record, options) { | |
| var proceed = !!(record.event && !record.event.phantom); | |
| if (proceed && record.createInProgress) { | |
| queued.push(record); | |
| return false; | |
| } | |
| if (proceed && record.phantom) { | |
| record.createInProgress = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- calculate sequence of die rolls needed to hit some probability target; | |
| -- most useful in conjunction with take, e.g. | |
| -- | |
| -- take 25 (dieProb 12 1%7) | |
| -- | |
| -- originally written by me @ http://guyblade.livejournal.com/159423.html, and archived here | |
| -- | |
| module DieProb where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 95e94b3960aac7d08f9305cf59c84c18fafe0a9b Mon Sep 17 00:00:00 2001 | |
| From: David Yip <[email protected]> | |
| Date: Wed, 9 Sep 2009 17:22:15 -0500 | |
| Subject: [PATCH 2/2] First cut at a patch for key interpolation problems in validates_uniqueness_of. | |
| --- | |
| Manifest.txt | 1 + | |
| lib/composite_primary_keys.rb | 1 + | |
| lib/composite_primary_keys/base.rb | 2 + | |
| .../validations/uniqueness.rb | 170 ++++++++++++++++++++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main(int argc, char **argv) | |
| { | |
| int a = 0x7FFFFFFF; | |
| int i; | |
| for(i = 0; i < 5; ++i) { | |
| a = ( a < 0 ? --a : a++ ); | |
| printf("%d\n", a); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Megahal | |
| COMMAND = 'megahal' | |
| OPTIONS = ['--no-prompt', '--no-wrap', '--no-banner'] | |
| def start_megahal | |
| @io = IO.popen("#{COMMAND} #{OPTIONS.join(' ')}", 'w+') | |
| end | |
| def stop_megahal | |
| @io.close |
OlderNewer