Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/bin/sh | |
### BEGIN INIT INFO | |
## END INIT INFO | |
# Path to play install folder | |
PLAY_HOME=/usr/share/play | |
PLAY=$PLAY_HOME/play | |
# Path to the JVM | |
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk |
package controllers | |
import play.api._ | |
import play.api.mvc._ | |
object Application extends Controller { | |
def zip = Action { | |
import play.api.libs.iteratee._ | |
import java.util.zip._ |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
package enumtest | |
import play.api.libs.json._ | |
object EnumUtils { | |
def enumReads[E <: Enumeration](enum: E): Reads[E#Value] = new Reads[E#Value] { | |
def reads(json: JsValue): JsResult[E#Value] = json match { | |
case JsString(s) => { |
// Check Iranian National Code Validity - Clojure, C#, F#, Ruby, JavaScript, Dart, Python, Scala, Java 8, PHP, C, Go, Swift, Kotlin, Groovy, Rust, Haskell, Erlang, Elixir, Power Query M Language, VBA, R, Lua, Fortran, Pascal/Delphi, Excel, Stored Procedure / MySQL | |
// بررسی صحت کد ملی ایران - کلوژر، سیشارپ، افشارپ، روبی، جاوااسکریپت، دارت، پایتون، اسکالا، جاوا ۸، پیاچپی، سی، گو، سوئیفت، کاتلین، گرووی، راست، هسکل، ارلنگ، الکسیر، پاورکوئری ام، ویبی ای، آر، لوآ، فرترن، پاسکال/دلفی، اکسل، مایاسکیوال | |
// در نسخههای قبل یکسان بودن اعداد نا معتبر تشخیص داده میشد ولی | |
// اعداد یکسان نامعتبر نیست https://web.archive.org/web/20170706081048/http://www.fardanews.com/fa/news/127747/رندترین-شماره-ملی-بلای-جان-صاحبش-شد | |
// بعضی از پیادهسازیها سریع نیستند، میتوانید نسخهٔ خود را بر پایهٔ | |
// نسخهٔ سی یا گو ایجاد کنید که بهترین سرعت را داشته باشد | |
/** |
#!/bin/bash | |
# | |
# ========================================================================= | |
# Copyright 2014 Rado Buransky, Dominion Marine Media | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
/* | |
* robotMaze.js | |
* | |
* The blue key is inside a labyrinth, and extracting | |
* it will not be easy. | |
* | |
* It's a good thing that you're a AI expert, or | |
* we would have to leave empty-handed. | |
*/ |
/******************** | |
* crispsContest.js * | |
******************** | |
* | |
* The Algorithm is almost in our grasp! | |
* At long last, we will definitively establish | |
* that 3SAT is solvable in polynomial time. It's | |
* been a long, strange journey, but it will all be | |
* worth it. | |
* |
/************************** | |
* exceptionalCrossing.js * | |
************************** | |
* | |
* Sorry, old friend, but I'm afraid I can't share | |
* co-authorship on this paper. You've done a very | |
* good job getting this Algorithm for me. The bit | |
* with the keys was especially clever! I wouldn't | |
* have thought of it myself. But then, of course, | |
* that's why you were here in the first place. |
/************* | |
* lasers.js * | |
************* | |
* | |
* Time to unleash the killer lasers! Each laser will kill you | |
* unless you have the appropriate color. Too bad you can't | |
* see which color corresponds to which laser! | |
*/ | |
function getRandomInt(min, max) { |