⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
/*! | |
* jQuery.fn.hasAttr() | |
* | |
* Copyright 2011, Rick Waldron | |
* Licensed under MIT license. | |
* | |
*/ | |
(function( jQuery ) { | |
jQuery.fn.hasAttr = function( name ) { | |
for ( var i = 0, l = this.length; i < l; i++ ) { |
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
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 |
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
// 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 |
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
// #### 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 |
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
// {{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/) |
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
//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) |
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
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; |
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
<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> |
OlderNewer