<commit_before>/*
 * ----------------------------------------------------------------------------
 * "THE COKE-WARE LIBRARY LICENSE" (Revision 255):
 * <NAME> <gsantner.github.io> wrote this file. You can do whatever
 * you want with this stuff. If we meet some day, and you think this stuff is
 * worth it, you can buy me a coke in return. Provided as is without any kind
 * of warranty. No attribution required.                  - <NAME>
 * ----------------------------------------------------------------------------
 */

/*
 * Get updates:
 *  https://github.com/gsantner/onePieceOfCode/blob/master/java/AppSettingsBase.java
 * This is a wrapper for settings based on SharedPreferences
 * with keys in resources. Extend from this class and add
 * getters/setters for the app's settings.
 * Example:
    public boolean isAppFirstStart() {
    return getBool(prefApp, R.string.pref_key__app_first_start, true);
    }

    public void setAppFirstStart(boolean value) {
    setBool(prefApp, R.string.pref_key__app_first_start, value);
    }

    public boolean isAppFirstStartCurrentVersion() {
    int value = getInt(prefApp, R.string.pref_key__app_first_start_current_version, -1);
    setInt(prefApp, R.string.pref_key__app_first_start_current_version, BuildConfig.VERSION_CODE);
    return value != BuildConfig.VERSION_CODE && !BuildConfig.IS_TEST_BUILD;
    }

 * Maybe add a singleton for this:
 * Whereas App.get() is returning ApplicationContext
    private AppSettings(Context context) {
        super(context);
    }<commit_msg>Update opoc/AppSettingsBase<commit_after>/*
 * ---------------------------------------------------------------------------- *
 * <NAME> <gsantner.github.io> wrote this file. You can do whatever
 * you want with this stuff. If we meet some day, and you think this stuff is
 * worth it, you can buy me a coke in return. Provided as is without any kind
 * of warranty. No attribution required.                  - <NAME>
 *
 * License: Creative Commons Zero (CC0 1.0)
 *  http://creativecommons.org/publicdomain/zero/1.0/
 * ----------------------------------------------------------------------------
 */

/*
 * Get updates:
 *  https://github.com/gsantner/onePieceOfCode/blob/master/java/AppSettingsBase.java
 * This is a wrapper for settings based on SharedPreferences
 * with keys in resources. Extend from this class and add
 * getters/setters for the app's settings.
 * Example:
    public boolean isAppFirstStart() {
    return getBool(prefApp, R.string.pref_key__app_first_start, true);
    }

    public void setAppFirstStart(boolean value) {
    setBool(prefApp, R.string.pref_key__app_first_start, value);
    }

    public boolean isAppFirstStartCurrentVersion() {
    int value = getInt(prefApp, R.string.pref_key__app_first_start_current_version, -1);
    setInt(prefApp, R.string.pref_key__app_first_start_current_version, BuildConfig.VERSION_CODE);
    return value != BuildConfig.VERSION_CODE && !BuildConfig.IS_TEST_BUILD;
    }

 * Maybe add a singleton for this:
 * Whereas App.get() is returning ApplicationContext
    private AppSettings(Context context) {
        super(context);
    }
{'fraction_non_alphanumeric': 0.17982176957352006, 'fraction_numerical': 0.003182686187141948, 'mean_word_length': 2.4690949227373067, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5451986', 'n_tokens_mistral': 875, 'n_tokens_neox': 851, 'n_words': 254}