Instantly share code, notes, and snippets.

View require_autoload.php
<?php
require './vendor/autoload.php';
View php_debugbar.volt
<html>
<head>
<?php echo $debugbarHeader ?>
</head>
<body>
<?php echo $debugbarBody ?>
</body>
</html>
View ajax-test.js
/** Ajax POSTテスト */
function ajaxTest(){
$.ajax({
type : "POST",
url : "/test/",
data : {"test":"hoge"},
scriptCharset : "UTF-8",
success : function(msg, status){
var json = eval(msg);
View routes.php
<?php
Route::any(
"/test"
, function (){
Log::debug( Input::get('test') );
}
);
View app.php
<?php
return array(
//Application Debug Mode
'debug' => true,
'url' => 'http://localhost',
);
View BaseController.php
<?php
class BaseController extends Controller {
public $layout='layout';
/**
* Setup the layout used by the controller.
*
* @return void
*/
View layout.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript">
<!--
var baseUrl = '{{BaseController::getBaseUrl()}}';
View hello.ts
/// <reference path="typings/angular2/angular2.d.ts" />
import {Component, View, bootstrap} from 'angular2/angular2';
// Annotation section
@Component({
selector: 'my-app'
})
@View({
View currying_sample.scala
●リスト1――カリー化する前の例
object myapp {
def main(args: Array[String]) = {
println("100から200までの合計:" + total(100, 200))
}
def total(min: Int, max: Int) = {
var res:Int = 0
for(n:Int <- Range(min,max + 1))