次のようにproject/Build.scala を編集する。
object ApplicationBuild extends Build {
// ...
val appDependencies = Seq(
"commons-daemon" % "commons-daemon" % "1.0.10"
)
// ...
| import play.api._ | |
| Play.start(new Application(new java.io.File("."), getClass.getClassLoader, None, Mode.Dev)) |
| <%@ page language="java" import="twitter4j.*,java.util.List" contentType="text/html; charset=UTF-8" session="false" %> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html;charset=UTF-8"> | |
| </head> | |
| <style> | |
| .username { | |
| font-size: 12pt; | |
| } | |
| .description{ |
| @GrabResolver ( | |
| name='ATILIKA dependencies', | |
| root='http://www.atilika.org/nexus/content/repositories/atilika') | |
| @Grab ('org.atilika.kuromoji:kuromoji:0.7.6') | |
| import org.atilika.kuromoji.Token | |
| import org.atilika.kuromoji.Tokenizer | |
| import org.atilika.kuromoji.Tokenizer.Mode | |
| def tokenizer = Tokenizer.builder().build() |
| package com.esperia09.android.utils; | |
| import com.esperia09.android.BuildConfig; | |
| import android.util.Log; | |
| public class Logger { | |
| private static final boolean debug = BuildConfig.DEBUG; | |
| private static final int TRACE_CALLER_COUNT = 2; |
| using System; | |
| using System.Text.RegularExpressions; | |
| using OpenQA.Selenium; | |
| using OpenQA.Selenium.Support.UI; | |
| namespace WebDriverTest { | |
| public class BingSearch { | |
| public static BingSearch Create(IWebDriver driver) { | |
| var instance = new BingSearch(driver); | |
| driver.Url = "http://www.bing.com"; |
| var http = require('http'), | |
| httpProxy = require('http-proxy'), | |
| logger = require('./logger'); | |
| // localhost:8001 に普通のExpressアプリ -> http://test.nov1.jp/ | |
| // localhost:8002 にWebSocketを使ったExpressアプリ -> http://😄.nov1.jp/, http://chat.nov1.jp/ | |
| // Proxy for Chat app | |
| var proxy = new httpProxy.HttpProxy({ | |
| target: { |
| @Grapes([ | |
| @Grab("org.apache.pivot:pivot-core:2.0"), | |
| @Grab("org.apache.pivot:pivot-wtk:2.0"), | |
| @Grab("org.apache.pivot:pivot-wtk-terra:2.0") | |
| ]) | |
| import org.apache.pivot.wtk.* | |
| //メソッドはバインディング変数(クロージャ)で作成しないといけない | |
| createLabel = { window -> | |
| def label = new Label() |
| http { | |
| map $uri $backend_port { | |
| include port_map; | |
| } | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $http_host; | |
| server { |
| @Grab(group='commons-httpclient', module='commons-httpclient', version='3.1') | |
| import org.apache.commons.httpclient.* | |
| import org.apache.commons.httpclient.methods.* | |
| import groovy.json.* | |
| class GistFetcher { |