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
public class FizzBuzz { | |
public static void main(String... args) { | |
for (int i = 1; i <= 100; i++) { | |
StringBuilder sb = new StringBuilder(); | |
if (i % 3 == 0) { sb.append("Fizz"); } | |
if (i % 5 == 0) { sb.append("Buzz"); } | |
if (sb.length() == 0) { sb.append(i); } | |
System.out.println(sb.toString()); | |
} |
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
public class FizzBuzz { | |
public static void main(String... args) { | |
for (int i = 1; i <= 100; i++) { | |
StringBuilder sb = new StringBuilder(); | |
if (i % 3 == 0) { sb.append("Fizz"); } | |
if (i % 5 == 0) { sb.append("Buzz"); } | |
if (sb.length() == 0) { sb.append(i); } | |
System.out.println(sb.toString()); | |
} |
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 | |
rootDirectory="$1" | |
stringToMatch="$2" | |
for jarfile in $(find "$rootDirectory" -name '*.jar') | |
do | |
grepOut=$(jar tvf "$jarfile" | grep "$stringToMatch") | |
if [[ $grepOut ]] | |
then |
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
public <T> T publishEndpointAndReturnProxy(Class<T> jaxWsAnnotatedInterface, T serviceImplementation) { | |
if (jaxWsAnnotatedInterface.isInterface() && | |
jaxWsAnnotatedInterface.getAnnotation(WebService.class) != null && | |
jaxWsAnnotatedInterface.isInstance(serviceImplementation)) { | |
String endpointUrl = getAvailableEndpointUrl(); | |
endpoint = Endpoint.publish(endpointUrl, serviceImplementation); | |
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); |
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
brew install -v macvim > /tmp/brew_install_v_macvim.txt | |
/private/tmp/homebrew-macvim-7.3-61-tfg2/b4winckler-macvim-af13572/src/configure: line 5558: Python: command not found | |
** BUILD FAILED ** | |
The following build commands failed: | |
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/x86_64/MMFullscreenWindow.o MMFullscreenWindow.m normal x86_64 objective-c com.apple.compilers.gcc.4_2 | |
(1 failure) | |
make[1]: *** [macvim] Error 65 | |
make: *** [first] Error 2 |
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.brinksys.camel; | |
import org.apache.activemq.ActiveMQConnectionFactory; | |
import org.apache.activemq.broker.BrokerService; | |
import org.apache.activemq.camel.component.ActiveMQComponent; | |
import org.apache.activemq.pool.PooledConnectionFactory; | |
import org.apache.camel.CamelContext; | |
import org.apache.camel.Exchange; | |
import org.apache.camel.Processor; | |
import org.apache.camel.ProducerTemplate; |
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
2445 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 0 | |
2447 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 1 | |
2460 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 2 | |
2466 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 3 | |
2472 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 4 | |
2479 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 5 | |
2482 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 6 | |
2485 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 7 | |
2488 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 8 | |
2490 [Camel (camel-1) thread #0 - JmsConsumer[Message.Group.Test]] INFO Route A - Received: 9 |
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 | |
mvn $* | awk ' | |
{ | |
print; | |
if($0 ~ ".*ERROR.*") system("/usr/local/bin/growlnotify -n mavenError -t Maven Error -m\""$0 "\"") | |
if($0 ~ ".*BUILD SUCCESSFUL.*") system("/usr/local/bin/growlnotify -n mavenComplete -t Maven Goals Complete -m\""$0 "\"") | |
} | |
END { | |
}' |
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
mvnsh(/):rice> mvn clean | |
org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException | |
role: org.apache.maven.settings.building.SettingsBuilder | |
roleHint: |
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
Number n = isTrue() ? Integer.valueOf(1) : Double.valueOf(1.0); |
OlderNewer