This guide will get you started using Spark on Heroku/Cedar. Spark is basically a clone of Sinatra for Java. 'Nuff said.
Create a single Java main class in src/main/java/HelloWorld.java:
:::java
import static spark.Spark.*;
import spark.*;
| package android.support.v4.preference; | |
| import android.app.Activity; | |
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import android.os.Handler; | |
| import android.os.Message; | |
| import android.preference.Preference; | |
| import android.preference.PreferenceManager; | |
| import android.preference.PreferenceScreen; |
| /* | |
| * Copyright 2012 CodeSlap - Cristian Castiblanco | |
| * | |
| * 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 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| package t::Util; | |
| BEGIN { | |
| unless ($ENV{PLACK_ENV}) { | |
| $ENV{PLACK_ENV} = 'test'; | |
| } | |
| if ($ENV{PLACK_ENV} eq 'deployment') { | |
| die "Do not run a test script on deployment environment"; | |
| } | |
| } | |
| use File::Spec; |
基礎知識
読み物系
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| =head1 SYNOPSIS | |
| % md_preview.pl markdown.md | |
| =cut |
!SLIDE