mandelserver.scala
来自「resetful样式的ws样例,一种面向资源的webservices服务」· SCALA 代码 · 共 27 行
SCALA
27 行
package com.sun.jersey.samples.mandelobject MandelServer { import com.sun.net.httpserver.HttpServer import com.sun.jersey.api.container.httpserver.HttpServerFactory def run() { val server = HttpServerFactory.create("http://localhost:9998/mandelbrot"); server.start(); println("Server running"); println("Visit: http://localhost:9998/mandelbrot/(-2.2,-1.2),(0.8,1.2)"); println("The query parameter 'limit' specifies the limit on number of iterations"); println("to determine if a point on the complex plain belongs to the mandelbrot set"); println("The query parameter 'imageSize' specifies the maximum size of the image"); println("in either the horizontal or virtical direction"); println("Hit return to stop..."); System.in.read(); println("Stopping server"); server.stop(0); println("Server stopped"); } def main(args: Array[String]) { run() }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?