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
#!/usr/bin/env python | |
# vim: set fileencoding=utf-8 | |
# | |
# USAGE: | |
# Back up your tmux old config, run the script and redirect stdout to your conf | |
# file. Example: | |
# | |
# $ cp ~/.tmux.conf ~/.tmux.conf.orig | |
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf | |
# |
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
package io.github.mikovali.android; | |
import android.content.res.ColorStateList; | |
import android.graphics.drawable.Drawable; | |
import android.support.annotation.DrawableRes; | |
import android.support.annotation.Nullable; | |
import android.support.design.widget.TabLayout; | |
import android.support.v4.content.res.ResourcesCompat; | |
import android.support.v4.graphics.drawable.DrawableCompat; | |
import android.support.v4.view.PagerAdapter; |
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
@Test | |
public void canSplitIntoCharacterWithCombiningCharacters() throws UnsupportedEncodingException { | |
assert DataImageWriter.stringToCharacterWithCombiningChars("a").equals(Arrays.asList("a")); | |
assert DataImageWriter.stringToCharacterWithCombiningChars("ab").equals(Arrays.asList("a", "b")); | |
String umlautMark = new String(new byte[]{(byte)0xCC, (byte) 0x88}, "UTF-8"); | |
String marksFirst = umlautMark + umlautMark + "a"; | |
assert DataImageWriter.stringToCharacterWithCombiningChars(marksFirst).equals(Arrays.asList(umlautMark + umlautMark, "a")); | |
String charsThenMarks = "a" + umlautMark + "b"; | |
assert DataImageWriter.stringToCharacterWithCombiningChars(charsThenMarks).equals(Arrays.asList("a" + umlautMark, "b")); |