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
jdbc.query(sql, singletonMap("id", aggregate.id), new ResultSetExtractor<Object>() { | |
@Override | |
public Object extractData(ResultSet rs) throws SQLException, DataAccessException { | |
int columns = rs.getMetaData().getColumnCount(); | |
for (int i = 1; i <= columns; i++) { | |
if (i > 1) { | |
System.out.print(", "); | |
} | |
System.out.print(rs.getMetaData().getColumnLabel(i)); |
I take the following as my definition of Truth:
The opinion which is fated to be ultimately agreed to by all who investigate, is what we mean by the truth, and the object represented in this opinion is the real. --by Charles Sanders Peirce.
I considere the following to be a given.
There is no way to know the actual Truth of any relevant statement[1].
1. A statement like "I think therefore I am" might be knowable True but isn’t relevant for anyone but the person stating it.
I take the following as my definition of Truth:
The opinion which is fated to be ultimately agreed to by all who investigate, is what we mean by the truth, and the object represented in this opinion is the real. --by Charles Sanders Peirce.
I considere the following to be a given.
There is no way to know the actual Truth of any relevant statement[1].
1. The statement "I think therefore I am" might be knowable True but aren’t relevatn for anyone but the person stating them.
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
https://twitter.com/johnsnolan/status/1019871024387641344 | |
https://blog.jonrshar.pe/2018/Jul/17/coed-ethics-2018.html | |
https://medium.com/code-for-america/the-problem-with-dull-knives-whats-the-defense-department-got-to-do-with-code-for-america-aefe6fe0bf1f | |
Take a look: | |
https://www.google.de/search?q=introduction+ethics&rlz=1C5CHFA_enDE730DE731&oq=introduction+ethics | |
https://www.youtube.com/watch?v=Ssks6y7Xskw Die Maschine erbt ihre Werte von der Gesellschaft in der sie existiert. | |
https://weaponsofmathdestructionbook.com/ | |
https://www.youtube.com/watch?time_continue=1&v=bmEVrIKCYtU |
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
static ResultSet mockResultSet(List<String> columns, Object... values) { | |
Assert.isTrue( // | |
values.length % columns.size() == 0, // | |
String // | |
.format( // | |
"Number of values [%d] must be a multiple of the number of columns [%d]", // | |
values.length, // | |
columns.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
import static org.hamcrest.Matchers.*; | |
import static org.junit.Assert.*; | |
import java.time.Duration; | |
import org.junit.Test; | |
import reactor.core.publisher.Flux; | |
import reactor.core.scheduler.Schedulers; |
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
// Do not use this: since the ChangeTrigger has state it can fail in all kinds of funny ways !!!!! | |
// similar to Flux::groupBy but closes the GroupedFlux whenever a different key value appears potentially opening another one for the same value later. | |
@Test | |
public void groupOnSwitch() { | |
StepVerifier | |
.create( | |
groupOnSwitch( | |
Flux.just("one", "two", "twenty", "tissue", "berta", "blot", "thousand"), |
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
class $12DynamicWithPixieDustTest extends LambdaBasedTests {{ | |
List<Integer> ints = asList(Integer.MAX_VALUE, Integer.MIN_VALUE, -1, 0, 1, 2, 10); | |
for (Integer i : ints) { | |
for (Integer j : ints) { | |
test(format("adding integers is commutative (%d, %d)", i,j), () -> { | |
assertEquals(i + j, j + i); | |
}); | |
} | |
} |
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 org.hamcrest.Matchers.containsString; | |
import static org.hamcrest.Matchers.is; | |
import static org.hamcrest.Matchers.not; | |
import static org.junit.Assert.assertThat; | |
public class SysoutRule implements TestRule { | |
private ByteOutputStream out; | |
public void contains(String string) { |
NewerOlder