This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
(function($) { | |
var observer = $({}); | |
$.subscribe = function(topic, handler, context) { | |
observer.on(topic, $.proxy(handler, context)); | |
}; | |
$.unsubscribe = function(topic, handler, context) { | |
observer.off(topic, $.proxy(handler, context)); | |
}; |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
..... | |
<dependencies> | |
<dependency> | |
<groupId>org.codehaus.plexus</groupId> | |
<artifactId>plexus-compiler-javac</artifactId> | |
<version>1.8.6</version> | |
</dependency> |
package cz.novoj.spring.security.aop; | |
import cz.novoj.spring.security.annotation.RulesRelation; | |
import cz.novoj.spring.security.annotation.RulesRelation.BooleanOperation; | |
import org.springframework.core.annotation.AnnotationUtils; | |
import org.springframework.security.access.ConfigAttribute; | |
import org.springframework.security.access.method.AbstractMethodSecurityMetadataSource; | |
import org.springframework.security.access.prepost.*; | |
import org.springframework.util.Assert; | |
import org.springframework.util.ClassUtils; |
//Turn off visibility for all fields when serializing (forces @JsonProperty annotations on entities) | |
setVisibilityChecker(getSerializationConfig().getDefaultVisibilityChecker() | |
.withCreatorVisibility(JsonAutoDetect.Visibility.NONE) | |
.withFieldVisibility(JsonAutoDetect.Visibility.NONE) | |
.withGetterVisibility(JsonAutoDetect.Visibility.NONE) | |
.withIsGetterVisibility(JsonAutoDetect.Visibility.NONE) | |
.withSetterVisibility(JsonAutoDetect.Visibility.NONE)); | |
//Turn off visibility for all fields when deserializing (forces @JsonProperty annotations on entities) |
// {{compare unicorns ponies operator="<"}} | |
// I knew it, unicorns are just low-quality ponies! | |
// {{/compare}} | |
// | |
// (defaults to == if operator omitted) | |
// | |
// {{equal unicorns ponies }} | |
// That's amazing, unicorns are actually undercover ponies | |
// {{/equal}} | |
// (from http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/) |
// #### it's compilable -prefix-free | |
// © 2011 Artem Sapegin http://sapegin.ru | |
// + 2011 Grawl http://grawl.ru | |
// + radial-gradient and other rules with vendor prefixes added by Grawl. | |
// add your fixes to My table of vendor prefixes there: http://goo.gl/3hPfR | |
/* mask: | |
parameter() | |
-webkit-parameter arguments | |
-moz-parameter arguments | |
-ms-parameter arguments |
// Lack of tail call optimization in JS | |
var sum = function(x, y) { | |
return y > 0 ? sum(x + 1, y - 1) : | |
y < 0 ? sum(x - 1, y + 1) : | |
x | |
} | |
sum(20, 100000) // => RangeError: Maximum call stack size exceeded | |
// Using workaround |
package com.bmchild.security.access.expression; | |
import org.aopalliance.intercept.MethodInvocation; | |
import org.apache.log4j.Logger; | |
import org.springframework.security.access.expression.SecurityExpressionRoot; | |
import org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler; | |
import org.springframework.security.core.Authentication; | |
/** | |
* @author bchild |