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 | |
# testExceptions | |
# Parses mondrian's megatest.log; | |
# generates a list of failed tests, one per line. | |
awk ' | |
/^ \[java\] [0-9]+) / { | |
s = $0; | |
gsub(/[^)]*) /, "", s); | |
gsub(/).*$/, "", s); |
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 | |
# | |
# megex - Archives megatest.log (the output from a run of | |
# mondrian/bin/megatest) to megatest.n.log, and generates | |
# megatest.n.summary.log, which contains one line for each test | |
# error/failure. | |
# | |
# Determines 'n' to be after all other megatest.n.log files in the | |
# current directory. | |
# |
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
// In the SqlStatement class | |
private static FileWriter fw; | |
private static PrintWriter pw; | |
private static Set<String> statements = new HashSet<String>(); | |
static { | |
try { | |
fw = new FileWriter(new File("/tmp/x.sql")); | |
pw = new PrintWriter(fw); | |
} catch (IOException e) { |
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 | |
JAR=~/.m2/repository/pentaho/mondrian-data-foodmart-json/0.2/mondrian-data-foodmart-json-0.2.jar | |
mkdir /tmp/json | |
cd /tmp/json | |
jar xvf $JAR | |
for i in *.json; do | |
mongoimport --db foodmart --collection ${i/.json/} --file $i | |
done |
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
/** | |
* Benchmark that measures alternative implementations of a map with case-insensitive | |
* string keys. The first implementation is a hash-map whose keys are converted to | |
* upper-case. The second implementation is a list whose entries are compared using | |
* String.equalsIgnoreCase. | |
* | |
* <p>The two interesting variables are n (the number of elements in the collection) | |
* and name(int x) (the function that generates the list of entries). | |
* | |
* <p>We access each element of the collection once, because that will be typical for |
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 static class Record4_0 implements java.io.Serializable { | |
public Double f0; | |
public long f1; | |
public Double f2; | |
public long f3; | |
public Record4_0(Double f0, long f1, Double f2, long f3) { | |
this.f0 = f0; | |
this.f1 = f1; | |
this.f2 = f2; | |
this.f3 = f3; |
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 to create Oracle's "SCOTT" schema with tables | |
-- EMP, DEPT, BONUS, SALGRADE, DUMMY. Originally demobld.sql. | |
-- | |
-- In a format suitable for pasting into RexTester: | |
-- https://rextester.com/l/oracle_online_compiler | |
-- | |
drop table dept | |
\\ | |
drop table emp | |
\\ |
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 to create Oracle's "SCOTT" schema with tables | |
-- EMP, DEPT, BONUS, SALGRADE, DUMMY. Originally demobld.sql. | |
-- | |
-- In a format suitable for pasting into SQL Fiddle: | |
-- http://sqlfiddle.com/#!4 | |
-- | |
create table dept( | |
deptno number(2,0) not null, | |
dname varchar2(14), | |
loc varchar2(13)); |
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 to create Oracle's "SCOTT" schema with tables | |
-- EMP, DEPT, BONUS, SALGRADE, DUMMY. Originally Oracle's demobld.sql. | |
-- | |
-- In a format suitable for pasting into SQL Fiddle for PostgreSQL: | |
-- http://sqlfiddle.com/#!17 | |
create table dept( | |
deptno decimal(2,0) not null, | |
dname varchar(14), | |
loc varchar(13)); | |
create table emp( |
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 to create, in Google BigQuery, | |
-- Oracle's "SCOTT" schema with tables | |
-- EMP, DEPT, BONUS, SALGRADE, DUMMY. | |
-- | |
-- In a format suitable for pasting into Cloud Console. | |
-- Before you run this script, create a dataset called 'Scott' in your current project. | |
-- | |
drop table if exists scott.dept; | |
drop table if exists scott.emp; | |
drop table if exists scott.bonus; |
OlderNewer