- GitHub Staff
- @belinburgh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kotlin.System.flush(); | |
(function () { | |
'use strict'; | |
var _f = { | |
f0: function () { | |
Kotlin.println('Hello world!'); | |
} | |
} | |
, classes = function () { | |
var c0 = Kotlin.createClass({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.* | |
abstract class LivingThingy(val age : Int) { | |
} | |
trait Badass { | |
public fun bark() { | |
println("Wouf wouf!") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app.controllers', []) | |
Object.keys require('./src/controllers'), (name, controller) -> | |
angular.module('app.controllers').controller(name, controller) | |
angular.module('app.directives', []) | |
Object.keys require('./src/directives'), (name, directive) -> | |
angular.module('app.directives').directive(name, directive) | |
# REFACTOR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module = angular.module('app.controllers', []) | |
module.controller('HelloCtrl', ['$scope', ($scope) -> | |
$scope.name = "John Smith" | |
$scope.average = [1,65,2,77,34].average() | |
]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application = require 'application' | |
AppView = require 'views/app_view' | |
HomeView = require 'views/home_view' | |
App = {Router: {}} | |
class App.Router.Home extends Backbone.Router | |
routes: | |
'': 'home' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Foo = {} | |
Foo.DataSource = {} | |
class Foo.DataSource.REST | |
(baseUrl) -> | |
@baseUrl = baseUrl | |
fetchAll: !-> | |
@doRequest("GET", @baseUrl, { | |
success: (data, event, response) -> | |
console.debug data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Map from CRUD to HTTP for our default `Backbone.sync` implementation. | |
var methodMap = { | |
'create': 'POST', | |
'update': 'PUT', | |
'delete': 'DELETE', | |
'read': 'GET' | |
}; | |
// Override this function to change the manner in which Backbone persists | |
// models to the server. You will be passed the type of request, and the |
NewerOlder