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 table t (b boolean); | |
create table f (b boolean); | |
insert into t select true from generate_series(1, 1000000); | |
insert into f select false from generate_series(1, 1000000); | |
DO $$ | |
DECLARE | |
v_ts TIMESTAMP; | |
v_repeat CONSTANT INT := 100; | |
rec RECORD; |
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
-- Copyright Data Geekery GmbH | |
-- | |
-- Licensed under the Apache License, Version 2.0 (the "License"); | |
-- you may not use this file except in compliance with the License. | |
-- You may obtain a copy of the License at | |
-- | |
-- http://www.apache.org/licenses/LICENSE-2.0 | |
-- | |
-- Unless required by applicable law or agreed to in writing, software | |
-- distributed under the License is distributed on an "AS IS" BASIS, |
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
with recursive | |
dims (r1, r2, i1, i2, s, it, p) as (values (-2::float, 1::float, -1.5::float, 1.5::float, 0.01::float, 100, 256.0::float)), | |
sprites (s) as (values (st_makepolygon(st_geomfromtext('linestring (0 0, 0 1, 1 1, 1 0, 0 0)')))), | |
n1 (r, i) as (select r, i from dims, generate_series((r1 / s)::int, (r2 / s)::int) r, generate_series((i1 / s)::int, (i2 / s)::int) i), | |
n2 (r, i) as (select r::float * s::float, i::float * s::float from dims, n1), | |
l (cr, ci, zr, zi, g, it, p) as ( | |
select r, i, 0::float, 0::float, 0, it, p from n2, dims | |
union all | |
select cr, ci, zr*zr - zi*zi + cr, 2 * zr * zi + ci, g + 1, it, p from l where g < it and zr*zr + zi*zi < p | |
), |
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
lukas@DESKTOP-F2SE3C1 MINGW64 ~/test | |
$ ll | |
total 1 | |
-rw-r--r-- 1 lukas 197609 12 Sep 14 19:50 test.txt | |
lukas@DESKTOP-F2SE3C1 MINGW64 ~/test | |
$ cat test.txt | |
a | |
b | |
c |
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
-- Copyright Data Geekery GmbH | |
-- | |
-- Licensed under the Apache License, Version 2.0 (the "License"); | |
-- you may not use this file except in compliance with the License. | |
-- You may obtain a copy of the License at | |
-- | |
-- http://www.apache.org/licenses/LICENSE-2.0 | |
-- | |
-- Unless required by applicable law or agreed to in writing, software | |
-- distributed under the License is distributed on an "AS IS" BASIS, |
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
/* | |
* Copyright Data Geekery GmbH | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 org.jooq.testscripts; | |
import java.sql.Connection; | |
import java.sql.PreparedStatement; | |
import java.sql.Statement; | |
import org.jooq.SQLDialect; | |
import org.jooq.test.setup.DatabaseSetup; | |
import org.jooq.test.setup.DatabaseSetup.Config; | |
import org.jooq.tools.StopWatch; |
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
List<MappedTable> mappedTables1() { | |
if (mappedTables == null) { | |
mappedTables = T_BOOK | |
.getSchema() | |
.getTables() | |
.stream() | |
.map(t -> { | |
Table<?> l = lookupTable(t.getName()); | |
return l == null ? null : new MappedTable().withInput(t.getName()).withOutput(l.getName()); | |
}) |
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 TwoMains { | |
public static void main(String[] args) { | |
System.out.println("main"); | |
mаin(args); | |
} | |
public static void mаin(String[] args) { | |
System.out.println("other mаin"); | |
} | |
} |
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 java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.List; | |
public class ListSurprise { | |
public static void mаin(String[] args) { | |
System.setSecurityManager(new SecurityManager()); | |
List<Integer> numbers = new ArrayList<>(); | |
Collections.addAll(numbers, 3, 1, 4, 1, 5, 5, 9); |
NewerOlder