View mackerel_jvm8_heap.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import urllib2
import json
import os
import tempfile
import codecs
from optparse import OptionParser
View kadokawa.scala
import scala.util.Random
val r = new Random()
r.shuffle(List("", "" ,"" ,"", "", "")).take(4).mkString
View CodingGameEasy3.scala
import math._
import scala.util._
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
object Player {
def main(args: Array[String]) {
View CodingGameTraining.scala
import math._
import scala.util._
/**
* The code below will read all the game information for you.
* On each game turn, information will be available on the standard input, you will be sent:
* -> the total number of visible enemies
* -> for each enemy, its name and distance from you
* The system will wait for you to write an enemy name on the standard output.
* Once you have designated a target:
View hoge.vb
Dim As Integer
For = 0 To 5
'ループ内の処理
Next
Dim As Integer
For = 0 To 5
'ループ内の処理
View QuickSort.scala
def qSort[T <% Ordered[T]](data: List[T]): List[T] = {
data match {
case Nil => data
case x::xs => {
qSort(xs.filter(_ < x)) ++ List(x) ++ qSort(xs.filter(x <= _))
}
}
}
qSort(List(2, 44, 5, 3, 1, 3, 9, 56, 7, 8, 4, 111, 0, 3, 4)) foreach println
View BubbleSort.scala
def bubbleSort(arr: Array[Int]): Array[Int] = {
for(i <- 0 until arr.length - 1; j <- 0 until arr.length - 1 - i) {
if (arr(j) > arr (j + 1)) {
val temp = arr(j)
arr(j) = arr(j + 1)
arr(j + 1) = temp
}
}
arr
}
View gist:5972013
class MyException(message: String, cause: Throwable) extends RuntimeException(message, cause) {
def this() = this(null, null)
def this(message: String) = this(message, null)
def this(cause: Throwable) = this(null, cause)
}
View Vagrantfile.template
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "centos64_64"
View gist:5363696

step1

パラメータを受け取るコントローラを作る

object Application extends Controller {
  def parameterExample(parameter: String) = Action  {
    Ok(views.html.index(parameter))
  }
}