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
<script type="text/javascript"> | |
function getFullUrl(url) { | |
var urlparts = url.split(/&|\?/g); | |
var urlpath = urlparts[0]; | |
if (urlpath.indexOf('://') < 0) { | |
if (urlpath[0]== '/') { | |
return urlpath; | |
} | |
else { | |
var startpathloc = window.location.pathname.lastIndexOf('/'); |
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 org.apache.maven.shared.utils.io; | |
import java.io.File; | |
/** | |
* <p>Visitor pattern for the DirectoryScanner. A ScanConductor controls the scanning process.</p> | |
* | |
* <p>Create an instance and pass it to {@link org.apache.maven.shared.utils.io.DirectoryScanner#scan(ScanConductor)}. | |
* You will get notified about every visited directory and file. You can use the {@link ScanAction} | |
* to control what should happen next.</p> |
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/sh | |
if [ "$1" = "ondemand" ]; then | |
echo "setting cpu governer ONDEMAND" | |
for f in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | |
do | |
echo ondemand> "$f" | |
done | |
exit | |
else |
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
@ApplicationScoped | |
public class CountryService { | |
private @Inject Cache<String, Country> cache; | |
private @Inject CountryService self; | |
public Country getByIsoA3(String isoA3) { |
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
@FacesConverter(forClass = String.class) | |
public class StringConverter implements Converter{ | |
@Override | |
public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException { | |
if (component instanceof HtmlInputText || component instanceof HtmlInputTextarea) { | |
return (value != null) ? StringUtils.trimToNull(value) : null; | |
} | |
return value; | |
} |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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.tomcat.maven</groupId> | |
<artifactId>tomcat7-maven-plugin</artifactId> | |
<version>2.0-beta-1</version> | |
<dependencies> | |
<dependency> | |
<groupId>de.odysseus.juel</groupId> | |
<artifactId>juel-api</artifactId> | |
<version>${juel.version}</version> | |
</dependency> |
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 java.util.concurrent.ConcurrentHashMap; | |
public class Test { | |
public static void main(String[] args) { | |
ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>(); | |
map.put("A", "B"); | |
map.keySet(); | |
} |
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/sh | |
# shell script to propagate the Apache OpenWebBeans dist area | |
cd $1 | |
curl -O https://repository.apache.org/content/groups/public/org/apache/openwebbeans/openwebbeans-distribution/${1}/openwebbeans-distribution-${1}-binary.tar.gz | |
curl -O https://repository.apache.org/content/groups/public/org/apache/openwebbeans/openwebbeans-distribution/${1}/openwebbeans-distribution-${1}-binary.tar.gz.asc | |
curl -O https://repository.apache.org/content/groups/public/org/apache/openwebbeans/openwebbeans-distribution/${1}/openwebbeans-distribution-${1}-binary.tar.gz.md5 | |
curl -O https://repository.apache.org/content/groups/public/org/apache/openwebbeans/openwebbeans-distribution/${1}/openwebbeans-distribution-${1}-binary.tar.gz.sha1 | |
curl -O https://repository.apache.org/content/groups/public/org/apache/openwebbeans/openwebbeans-distribution/${1}/openwebbeans-distribution-${1}-binary.zip |
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
@RequestScoped | |
@Named("conversation") | |
public class ConversationWrapper { | |
private @Inject Conversation conv; | |
public Conversation get() { | |
return conv; | |
} | |
} | |
OlderNewer