-
Joe Celko's SQL for Smarties, 5th Edition
Chapter 32.1 - Finding Subregions of Size (n)
-
Finding the maximum contiguous sum in an array
This file contains hidden or 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
sudo openssl req -x509 -nodes \ | |
-days 365 \ | |
-newkey rsa:2048 \ | |
-keyout /etc/ssl/mydomain_com.key \ | |
-out /etc/ssl/mydomain_com.crt \ | |
-subj '/CN=mydomain.com' |
This file contains hidden or 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
alias j10="export JAVA_HOME=`/usr/libexec/java_home -v 10`; java -version" | |
alias j9="export JAVA_HOME=`/usr/libexec/java_home -v 9`; java -version" | |
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`; java -version" | |
alias j7="export JAVA_HOME=`/usr/libexec/java_home -v 1.7`; java -version" |
This file contains hidden or 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 io.vertx.core.Vertx | |
import io.vertx.core.json.Json | |
import io.vertx.ext.web.Router | |
data class Person( | |
val name: String, | |
val nationality: String | |
) { | |
} |
This file contains hidden or 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 BinaryTreeNode<T> { | |
private T value; | |
private BinaryTreeNode<T> leftChild; | |
private BinaryTreeNode<T> rightChild; | |
public T getValue() { | |
return value; | |
} |
This file contains hidden or 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 main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func Quicksort(elements []int, low int, high int) { | |
if (high > low) { |
This file contains hidden or 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
FROM cassandra:3.0 | |
ENV LOCAL_JMX no | |
COPY jmxremote.password /etc/cassandra/jmxremote.password | |
RUN chown cassandra:cassandra /etc/cassandra/jmxremote.password | |
RUN chmod 400 /etc/cassandra/jmxremote.password | |
RUN sed -i '/monitorRole readonly/a cassandra readwrite' /etc/java-8-openjdk/management/jmxremote.access | |
RUN sed -i '/JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT/a\ | |
\ \ JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=192.168.99.100"\ | |
' /etc/cassandra/cassandra-env.sh | |
CMD ["cassandra", "-f"] |