Skip to content

Instantly share code, notes, and snippets.

@bmwcmw
bmwcmw / testdg.java
Created August 21, 2019 06:33
Find relative tags
// This is the principal idea for the question and some thoughts that I didn't have time to explain.
// The simple version - O(CNM) where C number of queries, N number of log lines, M avg length of log line ==> O(NM) ?
static Set<String> findRelativeTags(Iterator<String> logStream, String[] queries) {
if (queries == null || queries.length == 0) {
return Collections.emptySet();
}
Set<String> relativeTags = new HashSet<>();
while (logStream.hasNext()) {
Set<String> logLineTagSet = splitTagSet(logStream.next());
@bmwcmw
bmwcmw / setup_thinkpad_keyboard.md
Last active June 13, 2018 15:58
ThinkPad Multi Connect Bluetooth Keyboard with Trackpoint

➜ ~ xmodmap -pp There are 12 pointer buttons defined.

Physical        Button
 Button          Code
    1              1
    2              2
    3              3
    4              4

5 5

Keybase proof

I hereby claim:

  • I am bmwcmw on github.
  • I am bmwcmw (https://keybase.io/bmwcmw) on keybase.
  • I have a public key ASAOv2Db2nDHxp_YsbL5y13lGZBezShiImhm9ukrYtnNkQo

To claim this, I am signing this object: