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
// Quick & Unsafe way... | |
// + with eval your var MUST be global & you MUST know its name | |
var obj = {"a": {"b": {"c": "hey"}}}; | |
var path = "a.b.c"; | |
console.log(magic(obj, path)); // hey | |
console.log(eval("obj."+path)); // hey | |
console.log(obj.a.b.c); // hey | |
var wrongPath = "b.c"; |
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('my.cordova.plugins', ['ionic']) | |
// for media plugin : http://plugins.cordova.io/#/package/org.apache.cordova.media | |
.factory('MediaSrv', function($q, $ionicPlatform, $window){ | |
var service = { | |
loadMedia: loadMedia, | |
getStatusMessage: getStatusMessage, | |
getErrorMessage: getErrorMessage | |
}; |
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', []) | |
.config(function($provide, debug){ | |
// catch exceptions in angular | |
$provide.decorator('$exceptionHandler', ['$delegate', function($delegate){ | |
return function(exception, cause){ | |
$delegate(exception, cause); | |
var data = { | |
type: 'angular', |
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
package org.knuchel.playground; | |
import java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.HashMap; |
NewerOlder