This file contains 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 example | |
class Delegate() { | |
fun get(obj: String, desc: PropertyMetadataImpl) : String = obj.toString() + ".log" | |
} | |
val String.log by Delegate() | |
fun main(args : Array<String>) { | |
println("Hello, world!".log) |
This file contains 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('EventTarget',[]) | |
.run(['$injector',function($injector){ | |
function removeFromList(list,item) { | |
var next = item.next || null | |
var prev = item.prev || null | |
if (prev) { | |
prev.next = next | |
} | |
else { |
This file contains 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
(function(angular){ | |
"use strict"; | |
/** | |
* Patched $injector.invoke | |
* | |
* It allows in many situations to avoid promise related boilerplate like | |
* | |
* factory('$loggedUser',['$login','$loadedConfig',function($login,$loadedConfig){ | |
* return $login.then(function($login){ |
OlderNewer