- Grab the policy file here
- Use the following command
$ java -Djava.security.manager -Djava.security.policy=/home/jwelzel/Downloads/1010_server.policy -Dderby.security.port=1527 -Dderby.install.url=file:/home/jwelzel/apps/db-derby-10.10.1.1-bin/lib/ -cp "lib/*" org.apache.derby.drda.NetworkServerControl start
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
//generate the javascript content of method cloudpassSetUsername to inject into the current page | |
function injectSetUsernameFunc(usernameFieldIsId,usernameField){ | |
var js = 'window.cloudpassSetUsername = function(username){'; | |
if(usernameFieldIsId){ | |
js += 'forceChangeField( document.getElementById("'+usernameField+'"), username);'; | |
}else{ | |
js += 'forceChangeField( document.getElementsByName("'+usernameField+'")[0], username);'; | |
} | |
js += '};'; | |
return js; |
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
// An example generic Mixin that you can add to any component that should react | |
// to changes in a Backbone component. The use cases we've identified thus far | |
// are for Collections -- since they trigger a change event whenever any of | |
// their constituent items are changed there's no need to reconcile for regular | |
// models. One caveat: this relies on getBackboneModels() to always return the | |
// same model instances throughout the lifecycle of the component. If you're | |
// using this mixin correctly (it should be near the top of your component | |
// hierarchy) this should not be an issue. | |
var BackboneMixin = { | |
componentDidMount: function() { |
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
import org.scribe.builder.api.DefaultApi10a; | |
import org.scribe.model.OAuthConstants; | |
import org.scribe.model.OAuthRequest; | |
import org.scribe.model.Verb; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import branda.media.exception.CacheException; | |
public class OAuthRequestValidator { |
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
#!/bin/bash | |
JERSEY_VERSION=2.7 | |
HK2_VERSION=2.3.0-b03 | |
JAVASSIST_VERSION=3.18.1-GA | |
MODULES_DIR=`pwd`/modules | |
OSGI_CACHE_DIR=`pwd`/domains/domain1/osgi-cache/felix | |
processArtifact() { |
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
import static javax.ws.rs.core.MediaType.APPLICATION_JSON; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
import java.io.PrintWriter; | |
import java.lang.annotation.Annotation; | |
import java.lang.reflect.Type; |
#First "cd" to the top directory you want to start in. (Don't be stupid and run this from your root....)
To get a confirmation for every file use:
find . -type f -name "*.bak" -exec rm -i {} \;
Or if you're feeling confident use:
find . -type f -name "*.bak" -exec rm -f {} \;
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
// 2MB | |
if (picture.length > 2 * 1024 * 1024) { | |
throw new FDNFileTooLargeException("2MB."); | |
} |
####Local archetype
Execute this inside your archetype project $ mvn install archetype:update-local-catalog
. After that, create a new project using the newly installed archetype by using $ mvn archetype:generate -DarchetypeCatalog=local
, choose the archetype number corresponding to the one you just installed and follow the on screen instructions. Here's a good example of an archetype to get you started.
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
@MappedSuperclass | |
public abstract class Bean<PK extends Serializable> implements Serializable { | |
private static final long serialVersionUID = 1L; | |
@Version | |
@Column(name = "VERSION", nullable = false) | |
private Long version; | |
public Bean(PK id, Long version) { |