- Read every row in the table
- No reading of index. Reading from indexes is also expensive.
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
ant.importBuild 'build.xml' | |
def packages_dir = file('../packages') | |
clean { | |
doLast { delete 'bootstrap.js', 'bootstrap.css', 'bootstrap.json' } | |
} | |
refresh { | |
inputs.dir 'app' |
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<style> | |
#piechart { | |
top: 0; | |
left: 0; | |
width:100%; | |
height:100%; |
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
"""time.process_time() and time.perf_counter() for Python 2 on Ubuntu.""" | |
import ctypes | |
import errno | |
from ctypes.util import find_library | |
from functools import partial | |
CLOCK_PROCESS_CPUTIME_ID = 2 # time.h | |
CLOCK_MONOTONIC_RAW = 4 | |
clockid_t = ctypes.c_int |
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 java.lang.Math.* | |
import static java.math.RoundingMode.CEILING | |
class StandardDeviationCategory { | |
static Double mean(Collection list) { | |
list.with{ | |
scale(sum() / size()) | |
} | |
} |
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
CREATE OR REPLACE FUNCTION escape_json (text) RETURNS text AS $$ | |
SELECT replace($1, '''', '\'''); $$ LANGUAGE SQL IMMUTABLE; | |
CREATE OR REPLACE FUNCTION to_json(text) RETURNS text AS $$ | |
SELECT escape_json($1) $$ LANGUAGE SQL IMMUTABLE; | |
CREATE OR REPLACE FUNCTION to_json(KEY text, value text) RETURNS text AS $$ | |
SELECT '''' || to_json($1) || ''': ''' || to_json($2) || ''''; $$ LANGUAGE SQL IMMUTABLE; |
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.mapr.kafka.serializer.json; | |
import com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import org.apache.kafka.clients.producer.KafkaProducer; | |
import org.apache.kafka.clients.producer.ProducerConfig; | |
import org.apache.kafka.clients.producer.ProducerRecord; | |
import org.apache.kafka.connect.json.JsonSerializer; | |
import java.util.Properties; |
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
configurations { | |
mavenEmbedder | |
} | |
dependencies { | |
compile "org.apache.maven:maven-core:$mavenVersion" | |
compile "org.apache.maven:maven-plugin-api:$mavenVersion" | |
compile 'org.apache.maven.plugin-tools:maven-plugin-annotations:3.4' | |
mavenEmbedder "org.apache.maven:maven-embedder:$mavenVersion" |
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 | |
# afuse-sshfs mount helper to automatically mount remote machines. | |
# It is intended to be used as mount.afuse in command line. F.e. in /etc/fstab you may mount directory like: | |
# afuse# /mnt/remote afuse auto 0 0 | |
# And then as regular user just do: | |
# $ cd /mnt/remote/user@remote.host/remote/path | |
# and folder /mnt/remote/user@remote.host will be mounted automatically! | |
# | |
# On Mac some also recommend add defer_permissions,noappledouble mount options. |
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
environment: | |
SERVER_NAME: "myserver.doma.in" | |
# Dummy key, cert | |
SSL_KEY: |- | |
-----BEGIN RSA PRIVATE KEY----- | |
MIICXQIBAAKBgQD272jYrLm8Ph5QpMWFcWUO9Ua1EviykalP+tkMIg12yZ3GvezF | |
y8aayxdztB5vu68jqMeg6mOJlscWqFUhmAxj4mDknYenVzVX2CKzCgHlGninTKxY | |
61rXDaDZVpSZ+XIESJkaB0z9HHYtrSLr0coKmq4cT5TRptOnkpDlJxIRaQIDAQAB | |
AoGATcTYoGTFmiN2KK+8BWrRCQT2X9C5woNdb3LxKIEQ/HhC2HS4PRMQWW/c0vPH | |
IilZ30EoneUztAFochpRtWLNg4lJoLy04X/eNjEiC/imp0KSwWXmnuLhDcWcb0+M |
OlderNewer