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
mergeSort :: (Ord a) => [a] -> [a] | |
mergeSort x | |
| len <= 1 = x | |
| otherwise = combine (mergeSort upper) (mergeSort lower) | |
where len = length x | |
middle = quot len 2 | |
upper = take middle x | |
lower = drop middle x | |
combine x [] = x | |
combine [] x = x |
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
prime :: Int -> Bool | |
prime x | |
| x == 1 = False | |
| x == 2 = True | |
| x == 3 = True | |
| x `mod` 2 == 0 = False | |
| x `mod` 3 == 0 = False | |
| otherwise = all (\y -> x `mod` y /= 0) $ dividends x | |
where | |
dividends z = |
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 | |
#echo "" | |
#echo "==== Remote update-hooks/file-hooks/enforce-eol.sh ====" | |
#Initialize | |
ref="$1" | |
old_rev="$2" | |
new_rev="$3" |
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 | |
#echo "" | |
#echo "==== Remote update-hooks/file-hooks/limit-size.sh ====" | |
#Initialize | |
ref="$1" | |
old_rev="$2" | |
new_rev="$3" |
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 com.thinkaurelius.titan.core.TitanFactory; | |
import com.thinkaurelius.titan.core.TitanGraph; | |
import com.thinkaurelius.titan.core.TitanKey; | |
import com.thinkaurelius.titan.core.attribute.Geoshape; | |
import com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration; | |
import com.tinkerpop.blueprints.Edge; | |
import com.tinkerpop.blueprints.Vertex; | |
import com.tinkerpop.blueprints.util.ElementHelper; | |
import org.apache.commons.configuration.BaseConfiguration; | |
import org.apache.commons.configuration.Configuration; |
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
mvn versions:display-dependency-updates | |
mvn versions:display-plugin-updates |
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
mvn release:clean | |
mvn release:prepare | |
mvn release:perform |
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
# place this at ~/.zshrc | |
setfont sun12x22 | |
zstyle ':completion:*' completer _complete _ignored | |
zstyle :compinstall filename '/home/freemo/.zshrc' | |
autoload -Uz compinit | |
compinit | |
# End of lines added by compinstall |
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.apache.commons.lang3.StringUtils; | |
import java.util.ArrayList; | |
import java.util.List; | |
public final class StringSimilarityUtils { | |
private StringSimilarityUtils() { | |
throw new IllegalStateException("Should not be able to instantiate this class"); | |
} |
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
mvn -Dmaven.test.failure.ignore=true clean org.jacoco:jacoco-maven-plugin:prepare-agent test jacoco:report verify sonar:sonar |
OlderNewer