This file contains 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
# @return [Integer] | |
# The number of records that were actually saved into the | |
# data-store | |
# | |
# @api semipublic | |
def create(resources) | |
created = 0 | |
resources.each do |resource| | |
if resource.cn.nil? || resource.cn.empty? | |
resource.cn = "test_#{rand(9999)}" |
This file contains 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
# Allow the metal piece to run in isolation | |
require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails) | |
class Datastore | |
def self.call(env) | |
if env['PATH_INFO'] =~ /^\/datastore(.*)/ | |
puts "PATH: -#{$1.inspect}-" | |
# if $1.nil? || $1.empty? | |
# env['PATH_INFO'] = '/' |
This file contains 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 'snmp' | |
module SNMP | |
class MIB | |
def get_name(oid) | |
# @names = @by_name.invert | |
# @names[oid] |
This file contains 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
# Dev/Apps Capistrano Deployment Script | |
# Copyright (c) 2009 Montana State University | |
# | |
# Version: 0.2 | |
# | |
# FILE: deploy.mysql.rb | |
# This deployment file will allow a user to deploy their application | |
# code to dev.msu.montana.edu | |
# | |
# PREREQUISITES |
This file contains 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
class Archive | |
include DataMapper::Resource | |
property :archive_id, Serial | |
property :archive_name, String, :nullable => false | |
property :archive_info, String, :nullable => false | |
property :archive_url, String, :nullable => false | |
def self.default_repository_name | |
:legacy |
This file contains 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
development: &defaults | |
:adapter: sqlite3 | |
:database: db/yogo_development.db | |
test: | |
<<: *defaults | |
:database: db/yogo_test.db | |
production: | |
<<: *defaults |
This file contains 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
dm-tpcc (ORM/DM implementation of TPC-C) | |
----------------------------------------------------------------------------- | |
DataMapper | |
----------------------------------------------------------------------------- | |
DataObjects Adapter | |
----------------------------------------------------------------------------- | |
SQLtoJSONQuery Translator | mysql | sqlserver | sqllite | oracle | postgres | | |
----------------------------------------------------------------------------- | |
Persevere| | |
----------------------------------------------------------------------------- |
This file contains 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
require 'ruby-debug' | |
module DataMapper | |
module TPCC | |
# | |
# This creates all the necessary data in the database tables to execute the TPC-C benchmark. | |
# This requires a set of data that is scaled by the number of warehouses in the database. | |
# The scaling factors are taken from the specification of TPC-C, section 1.2.1. | |
# | |
def self.load(num_warehouses = 1) |
This file contains 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
require 'yaml' | |
require 'pp' | |
module Yogo | |
class SQLParser | |
attr_accessor :script | |
def initialize | |
@script = "perl -e 'use SQL::Parser; use SQL::Statement; use YAML; use YAML::Dumper; $parser = SQL::Parser->new(); $parser->{RaiseError}=1; $dumper = YAML::Dumper->new; $dumper->indent_width(4); $stmt = SQL::Statement->new(\"%s\", $parser); delete $stmt->{\"opts\"}; print $dumper->dump($stmt);'" | |
end | |
This file contains 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
Dec 7, 2009 10:17:19 PM org.persvr.remote.PersevereFilter$DefaultHandler call | |
WARNING: java.lang.ClassCastException: org.mozilla.javascript.UniqueTag cannot be cast to org.mozilla.javascript.Function | |
Dec 7, 2009 10:17:19 PM org.persvr.remote.PersevereFilter$DefaultHandler call | |
WARNING: | |
java.lang.ClassCastException: org.mozilla.javascript.UniqueTag cannot be cast to org.mozilla.javascript.Function | |
at org.persvr.data.JsonPath.doJsonPath(JsonPath.java:122) | |
at org.persvr.data.JsonPath.doJsonPath(JsonPath.java:88) | |
at org.persvr.data.JsonPath.getTarget(JsonPath.java:79) | |
at org.persvr.remote.PersevereFilter$DefaultHandler.objectExistsForId(PersevereFilter.java:414) | |
at org.persvr.remote.PersevereFilter$DefaultHandler.call(PersevereFilter.java:516) |
OlderNewer