Skip to content

Instantly share code, notes, and snippets.

premraj10 / gist:94d4ee1c45d747dff9196d5854c7dc06
Created May 7, 2017 — forked from Mithrandir0x/gist:3639232
Difference between Service, Factory and Provider in AngularJS
View gist:94d4ee1c45d747dff9196d5854c7dc06
// Source:!topic/angular/hVrkvaHGOfc
// jsFiddle:
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
premraj10 /
Created May 20, 2016 — forked from ksauzz/
Proxy sample code with java.lang.reflect.Proxy and CGLib
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;
public class CGLibProxySample {