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
#!/bin/sh -x | |
# ------------------------ | |
# Configuration | |
BASE_URL=http://ftp.kddilabs.jp/infosystems/apache/lucene/solr | |
VERSION=3.3.0 | |
DEPLOY_DIR=/your/tomcatorlikethat/webapps | |
SOLR_WAR_NAME=solr | |
WORK_DIR=~/solr_update_work | |
BACKUP_DIR=~/solr_backup |
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
/* | |
<dependency> | |
<groupId>com.sun.jersey.jersey-test-framework</groupId> | |
<artifactId>jersey-test-framework-grizzly2</artifactId> | |
<version>${jersey.version}</version> | |
<scope>test</scope> | |
</dependency> | |
*/ | |
package restful.server.resource; |
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 StringSupport(s: String) { | |
def reverseOrder: String = s.toList.foldLeft(Nil: List[Char])((result, c) => c :: result).mkString | |
def reverseCase: String = s.toList.map { | |
case c if c.isUpper => c.toLower | |
case c if c.isLower => c.toUpper | |
case c => c | |
}.mkString |
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
Query failed to complete | |
MarketplaceDiscoveryStrategy failed with an error | |
Cannot complete request to | |
http://marketplace.eclipse.org/api/p/search/apachesolr_search/JUnit?product=org.eclipse.epp.package.jee.product&os=win32&runtime.version=3.6.0.v20100505&client=org.eclipse.epp.mpc.core&java.version=1.6.0_24&product.version=1.3.2.20110218-0812&ws=win32: Element type "tag" must be followed by either attribute specifications, ">" or "/>". | |
Element type "tag" must be followed by either attribute specifications, ">" or "/>". |
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
/** | |
* Daimon.scala #8 やってみよう | |
* http://d.hatena.ne.jp/seratch2/20110507/1304777166 | |
* 以下のPlayer、Gameをそれぞれアクターとして定義して山手線ゲームをコメント例のように実行できるようにしてください。 | |
*/ | |
import actors.Actor | |
case object Get | |
case class IsUsed(station: Station) |
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
/** | |
* Daimon.scala #9 やってみよう | |
* http://d.hatena.ne.jp/seratch2/20110802/1312305023 | |
* scala -cp .:akka-actor-1.1.3.jar yamanote-akka.scala | |
* 実装例: https://gist.github.com/1121859 | |
*/ | |
import akka.actor.Actor | |
import akka.actor.ActorRef | |
import akka.actor.Actor._ |
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
/** | |
* Daimon.scala #9 やってみよう | |
* http://d.hatena.ne.jp/seratch2/20110802/1312305023 | |
* scala -cp .:akka-actor-1.1.3.jar yamanote-akka.scala | |
*/ | |
import akka.actor.Actor | |
import akka.actor.ActorRef | |
import akka.actor.Actor._ |
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
// *** S-99: Ninety-Nine Scala Problems *** | |
// http://aperiodic.net/phil/scala/s-99/ | |
// | |
// wget http://www.scala-tools.org/repo-releases/org/scalatest/scalatest_2.9.0-1/1.6.1/scalatest_2.9.0-1-1.6.1.jar | |
// scala -cp scalatest-*.jar s99.scala | |
import org.scalatest.matchers.ShouldMatchers._ | |
// P01: Find the last element of a list. | |
def last[T](list: List[T]): T = { // TODO } |
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
val ids = List(1,2,3,4,5) | |
val names = List("Andy", "Brian", "Kent", "Taro", "John") | |
ids zip names foreach { | |
case (id, name) => println("id:" + id + ",name:" + name) | |
} | |
// id:1,name:Andy | |
// id:2,name:Brian | |
// id:3,name:Kent | |
// id:4,name:Taro | |
// id:5,name:John |
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
// *** S-99: Ninety-Nine Scala Problems *** | |
// http://aperiodic.net/phil/scala/s-99/ | |
// | |
// wget http://www.scala-tools.org/repo-releases/org/scalatest/scalatest_2.9.0-1/1.6.1/scalatest_2.9.0-1-1.6.1.jar | |
// scala -cp scalatest-*.jar s99-11-20.scala | |
import org.scalatest.matchers.ShouldMatchers._ | |
class NotImplementedYet extends RuntimeException |