Skip to content

Instantly share code, notes, and snippets.

import eventfax.core._
import eventfax.protocol._
import scala.actors._
import scala.actors.Actor._
import java.io.IOException
import java.util.Date
case class PingMessage(sessionId: String,message: String)
case class PongMessage(sessionId: String,message: String)
# crux of thin patch
def pre_process
# Add client info to the request env
@request.remote_address = remote_address
# Process the request calling the Rack adapter
@app.call(@request.env) do |result|
post_process(result)
end
rescue Object
package new_job
import scala.actors.{Actor}
import java.io.File
import scala.actors.Actor._
case class Job(folder: File, index: Int)
class MyScheduler(var jobs: List[Job]) extends Actor {
var done = List[Job]()
package new_job
import scala.actors.{Actor}
import java.io.File
import scala.actors.Actor._
case class Job(folder: File, index: Int)
class MyScheduler(var jobs: List[Job]) extends Actor {
var done = List[Job]()
find_header: checking for #include <iconv.h>
... -------------------- yes
"gcc -E -I. -I/opt/ruby186/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -g -DXP_UNIX -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <iconv.h>
/* end */
--------------------
require "rubygems"
require "active_support"
require "chronic"
module BackgrounDRb
class CronTrigger
WDAYS = { 0 => "Sunday",1 => "Monday",2 => "Tuesday",3 => "Wednesday", 4 => "Thursday", 5 => "Friday", 6 => "Saturday" }
LeapYearMonthDays = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
CommonYearMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
if (sc.connect (new InetSocketAddress (address, port))) {
// Connection returned immediately. Can happen with localhost connections.
// WARNING, this code is untested due to lack of available test conditions.
// Ought to be be able to come here from a localhost connection, but that
// doesn't happen on Linux. (Maybe on FreeBSD?)
// The reason for not handling this until we can test it is that we
// really need to return from this function WITHOUT triggering any EM events.
// That's because until the user code has seen the signature we generated here,
// it won't be able to properly dispatch them. The C++ EM deals with this
// by setting pending mode as a flag in ALL eventable descriptors and making
class QueueWorker < BackgrounDRb::MetaWorker
set_worker_name :queue_worker
QUEUE_WORKER_LIMIT = 2
def create(args = nil)
start_correct_number_of_workers
end
def start_correct_number_of_workers
1.upto(QUEUE_WORKER_LIMIT) do |worker_key|
//Some comments
1. patch -p0 < scouchdb.diff
2. patch is unable to pull httpclient jar because strangely enough maven mirros doesn't contain jar (http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/httpcomponents/httpcomponents-client/4.0-beta2/) and hence should be copied manually to "lib" direcotry.
3. sbt update
4. remove "Driver" object from "couch/json" because sbt will take care of running the test cases.
From 92f048e1082e66c54f13c76c5b8ca8b42dd00bf2 Mon Sep 17 00:00:00 2001
From: Hemant Kumar <gethemant@gmail.com>
Date: Thu, 6 Aug 2009 17:13:56 +0530
Subject: [PATCH] update rakefile for better path
---
Rakefile | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/Rakefile b/Rakefile