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 org.springframework.stereotype.Service; | |
import org.springframework.transaction.annotation.Propagation; | |
import org.springframework.transaction.annotation.Transactional; | |
import java.util.function.Supplier; | |
@Service | |
public class TransactionHandler { | |
@Transactional(propagation = Propagation.REQUIRED) |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
default_box = "rockylinux/9" | |
default_cpus = 2 | |
default_mem = 1024 | |
nodes = [ | |
{ | |
ip_addr: '192.168.56.10', |
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 org.apache.lucene.search.DocIdSetIterator; | |
import org.apache.lucene.util.BitSetIterator; | |
import org.apache.lucene.util.FixedBitSet; | |
import org.apache.lucene.util.RoaringDocIdSet; | |
import java.io.IOException; | |
public class SimpleDisjunctionDISI extends DocIdSetIterator | |
{ | |
private final DISIWrapper[] heap; |
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 StreamAsIterable | |
{ | |
public static void main (String[] args) | |
{ | |
for (String s : (Iterable<String>) Stream.of ("This", "is", "a", "stream")::iterator) | |
{ | |
System.out.println (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
ZigZag-Encoding | |
--------------- | |
Maps negative values to positive values while going back and | |
forth (0 = 0, -1 = 1, 1 = 2, -2 = 3, 2 = 4, -3 = 5, 3 = 6 ...) | |
(i >> bitlength-1) ^ (i << 1) | |
with "i" being the number to be encoded, "^" being | |
XOR-operation and ">>" would be arithemtic shifting-operation |