This file contains hidden or 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
| # (c) 2018 Marcelo Novaes | |
| # License - MIT | |
| # Enable AptX and AAC codecs on bluetooth connections on macOS, fixes Sony WH-1000XM4 sony quality on mac catalina | |
| # hold in options key while clicking on the bluetooth icon, this enables debug. select your audio device and take a look at the codec used. Should be AAC (or aptx) | |
| sudo defaults write bluetoothaudiod "Enable AAC code" -bool true | |
| sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true | |
| # default is 128, changing to match most high quality streaming services (youtube music, high, 256kbps AAC) | |
| # https://support.google.com/youtubemusic/answer/9076559?hl=en |
This file contains hidden or 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.Collection; | |
| import java.util.SortedMap; | |
| import java.util.TreeMap; | |
| public class ConsistentHash<T> { | |
| private final HashFunction hashFunction; | |
| private final int numberOfReplicas; | |
| private final SortedMap<Integer, T> circle = new TreeMap<Integer, T>(); | |
This file contains hidden or 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.Collection; | |
| import java.util.SortedMap; | |
| import java.util.TreeMap; | |
| public class ConsistentHash<T> { | |
| private final HashFunction hashFunction; | |
| private final int numberOfReplicas; | |
| private final SortedMap<Integer, T> circle = new TreeMap<Integer, T>(); | |