text:
package com.drew.metadata.exif.makernotes;

import com.drew.lang.SequentialByteArrayReader;
import com.drew.lang.annotations.NotNull;
import com.drew.metadata.Directory;

import java.io.IOException;
import java.util.HashMap;

/**
 * The Olympus makernote is used by many manufacturers (Epson, Konica, Minolta and Agfa...), and as such contains some tags
 * that appear specific to those manufacturers.
 *
 * @author Drew Noakes https://drewnoakes.com
 */
@SuppressWarnings("WeakerAccess")
public class OlympusMakernoteDirectory extends Directory
{
    /** Used by Konica / Minolta cameras. */
    public static final int TAG_MAKERNOTE_VERSION = 0x0000;
    /** Used by Konica / Minolta cameras. */
    public static final int TAG_CAMERA_SETTINGS_1 = 0x0001;
    /** Alternate Camera Settings Tag. Used by Konica / Minolta cameras. */
    public static final int TAG_CAMERA_SETTINGS_2 = 0x0003;
    /** Used by Konica / Minolta cameras. */
    public static final int TAG_COMPRESSED_IMAGE_SIZE = 0x0040;
    /** Used by Konica / Minolta cameras. */
    public static final int TAG_MINOLTA_THUMBNAIL_OFFSET_1 = 0x0081;
    /** Alternate Thumbnail Offset. Used by Konica / Minolta cameras. */
    public static final int TAG_MINOLTA_THUMBNAIL_OFFSET_2 = 0x0088;
    /** Length of thumbnail in bytes. Used by Konica / Minolta cameras. */
    public static final int TAG_MINOLTA_THUMBNAIL_LENGTH = 0x0089;

    public static final int TAG_THUMBNAIL_IMAGE = 0x0100;

    /**
     * Used by Konica / Minolta cameras
     * 0 = Natural Colour
     * 1 = Black & White
     * 2 = Vivid colour
     * 3 = Solarization
     * 4 = AdobeRGB
     */
    public static final int TAG_COLOUR_MODE = 0x0101;

    /**
     * Used by Konica / Minolta cameras.
     * 0 = Raw
     * 1 = Super Fine
     * 2 = Fine
     * 3 = Standard
     * 4 = Extra Fine
     */
    public static final int TAG_IMAGE_QUALITY_1 = 0x0102;

    /**
     * Not 100% sure about this tag.
     * <p>
     * Used by Konica / Minolta cameras.
     * 0 = Raw
     * 1 = Super Fine
     * 2 = Fine
     * 3 = Standard
     * 4 = Extra Fine
     */
    public static final int TAG_IMAGE_QUALITY_2 = 0x0103;

    public static final int TAG_BODY_FIRMWARE_VERSION = 0x0104;

    /**
     * Three values:
     * Value 1: 0=Normal, 2=Fast, 3=Panorama
     * Value 2: Sequence Number Value 3:
     * 1 = Panorama Direction: Left to Right
     * 2 = Panorama Direction: Right to Left
     * 3 = Panorama Direction: Bottom to Top
     * 4 = Panorama Direction: Top to Bottom
     */
    public static final int TAG_SPECIAL_MODE = 0x0200;

    /**
     * 1 = Standard Quality
     * 2 = High Quality
     * 3 = Super High Quality
     */
    public static final int TAG_JPEG_QUALITY = 0x0201;

    /**
     * 0 = Normal (Not Macro)
     * 1 = Macro
     */
    public static final int TAG_MACRO_MODE = 0x0202;

    /**
     * 0 = Off, 1 = On
     */
    public static final int TAG_BW_MODE = 0x0203;

    /** Zoom Factor (0 or 1 = normal) */
    public static final int TAG_DIGITAL_ZOOM = 0x0204;
    public static final int TAG_FOCAL_PLANE_DIAGONAL = 0x0205;
    public static final int TAG_LENS_DISTORTION_PARAMETERS = 0x0206;
    public static final int TAG_CAMERA_TYPE = 0x0207;
    public static final int TAG_PICT_INFO = 0x0208;
    public static final int TAG_CAMERA_ID = 0x0209;

    /**
     * Used by Epson cameras
     * Units = pixels
     */
    public static final int TAG_IMAGE_WIDTH = 0x020B;

    /**
     * Used by Epson cameras
     * Units = pixels
     */
    public static final int TAG_IMAGE_HEIGHT = 0x020C;

    /** A string. Used by Epson cameras. */
    public static final int TAG_ORIGINAL_MANUFACTURER_MODEL = 0x020D;

    public static final int TAG_PREVIEW_IMAGE = 0x0280;
    public static final int TAG_PRE_CAPTURE_FRAMES = 0x0300;
    public static final int TAG_WHITE_BOARD = 0x0301;
    public static final int TAG_ONE_TOUCH_WB = 0x0302;
    public static final int TAG_WHITE_BALANCE_BRACKET = 0x0303;
    public static final int TAG_WHITE_BALANCE_BIAS = 0x0304;
    public static final int TAG_SCENE_MODE = 0x0403;
    public static final int TAG_SERIAL_NUMBER_1 = 0x0404;
    public static final int TAG_FIRMWARE = 0x0405;

    /**
     * See the PIM specification here:
     * http://www.ozhiker.com/electronics/pjmt/jpeg_info/pim.html
     */
    public static final int TAG_PRINT_IMAGE_MATCHING_INFO = 0x0E00;

    public static final int TAG_DATA_DUMP_1 = 0x0F00;
    public static final int TAG_DATA_DUMP_2 = 0x0F01;

    public static final int TAG_SHUTTER_SPEED_VALUE = 0x1000;
    public static final int TAG_ISO_VALUE = 0x1001;
    public static final int TAG_APERTURE_VALUE = 0x1002;
    public static final int TAG_BRIGHTNESS_VALUE = 0x1003;
    public static final int TAG_FLASH_MODE = 0x1004;
    public static final int TAG_FLASH_DEVICE = 0x1005;
    public static final int TAG_BRACKET = 0x1006;
    public static final int TAG_SENSOR_TEMPERATURE = 0x1007;
    public static final int TAG_LENS_TEMPERATURE = 0x1008;
    public static final int TAG_LIGHT_CONDITION = 0x1009;
    public static final int TAG_FOCUS_RANGE = 0x100A;
    public static final int TAG_FOCUS_MODE = 0x100B;
    public static final int TAG_FOCUS_DISTANCE = 0x100C;
    public static final int TAG_ZOOM = 0x100D;
    public static final int TAG_MACRO_FOCUS = 0x100E;
    public static final int TAG_SHARPNESS = 0x100F;
    public static final int TAG_FLASH_CHARGE_LEVEL = 0x1010;
    public static final int TAG_COLOUR_MATRIX = 0x1011;
    public static final int TAG_BLACK_LEVEL = 0x1012;
    public static final int TAG_COLOR_TEMPERATURE_BG = 0x1013;
    public static final int TAG_COLOR_TEMPERATURE_RG = 0x1014;
    public static final int TAG_WB_MODE = 0x1015;
//    public static final int TAG_ = 0x1016;
    public static final int TAG_RED_BALANCE = 0x1017;
    public static final int TAG_BLUE_BALANCE = 0x1018;
    public static final int TAG_COLOR_MATRIX_NUMBER = 0x1019;
    public static final int TAG_SERIAL_NUMBER_2 = 0x101A;

    public static final int TAG_EXTERNAL_FLASH_AE1_0 = 0x101B;
    public static final int TAG_EXTERNAL_FLASH_AE2_0 = 0x101C;
    public static final int TAG_INTERNAL_FLASH_AE1_0 = 0x101D;
    public static final int TAG_INTERNAL_FLASH_AE2_0 = 0x101E;
    public static final int TAG_EXTERNAL_FLASH_AE1 = 0x101F;
    public static final int TAG_EXTERNAL_FLASH_AE2 = 0x1020;
    public static final int TAG_INTERNAL_FLASH_AE1 = 0x1021;
    public static final int TAG_INTERNAL_FLASH_AE2 = 0x1022;

    public static final int TAG_FLASH_BIAS = 0x1023;
    public static final int TAG_INTERNAL_FLASH_TABLE = 0x1024;
    public static final int TAG_EXTERNAL_FLASH_G_VALUE = 0x1025;
    public static final int TAG_EXTERNAL_FLASH_BOUNCE = 0x1026;
    public static final int TAG_EXTERNAL_FLASH_ZOOM = 0x1027;
    public static final int TAG_EXTERNAL_FLASH_MODE = 0x1028;
    public static final int TAG_CONTRAST = 0x1029;
    public static final int TAG_SHARPNESS_FACTOR = 0x102A;
    public static final int TAG_COLOUR_CONTROL = 0x102B;
    public static final int TAG_VALID_BITS = 0x102C;
    public static final int TAG_CORING_FILTER = 0x102D;
    public static final int TAG_OLYMPUS_IMAGE_WIDTH = 0x102E;
    public static final int TAG_OLYMPUS_IMAGE_HEIGHT = 0x102F;
    public static final int TAG_SCENE_DETECT = 0x1030;
    public static final int TAG_SCENE_AREA = 0x1031;
//    public static final int TAG_ = 0x1032;
    public static final int TAG_SCENE_DETECT_DATA = 0x1033;
    public static final int TAG_COMPRESSION_RATIO = 0x1034;
    public static final int TAG_PREVIEW_IMAGE_VALID = 0x1035;
    public static final int TAG_PREVIEW_IMAGE_START = 0x1036;
    public static final int TAG_PREVIEW_IMAGE_LENGTH = 0x1037;
    public static final int TAG_AF_RESULT = 0x1038;
    public static final int TAG_CCD_SCAN_MODE = 0x1039;
    public static final int TAG_NOISE_REDUCTION = 0x103A;
    public static final int TAG_INFINITY_LENS_STEP = 0x103B;
    public static final int TAG_NEAR_LENS_STEP = 0x103C;
    public static final int TAG_LIGHT_VALUE_CENTER = 0x103D;
    public static final int TAG_LIGHT_VALUE_PERIPHERY = 0x103E;
    public static final int TAG_FIELD_COUNT = 0x103F;
    public static final int TAG_EQUIPMENT = 0x2010;
    public static final int TAG_CAMERA_SETTINGS = 0x2020;
    public static final int TAG_RAW_DEVELOPMENT = 0x2030;
    public static final int TAG_RAW_DEVELOPMENT_2 = 0x2031;
    public static final int TAG_IMAGE_PROCESSING = 0x2040;
    public static final int TAG_FOCUS_INFO = 0x2050;
    public static final int TAG_RAW_INFO = 0x3000;
    public static final int TAG_MAIN_INFO = 0x4000;

    public final static class CameraSettings
    {
        // These 'sub'-tag values have been created for consistency -- they don't exist within the Makernote IFD
        private static final int OFFSET = 0xF000;

        public static final int TAG_EXPOSURE_MODE = OFFSET + 2;
        public static final int TAG_FLASH_MODE = OFFSET + 3;
        public static final int TAG_WHITE_BALANCE = OFFSET + 4;
        public static final int TAG_IMAGE_SIZE = OFFSET + 5;
        public static final int TAG_IMAGE_QUALITY = OFFSET + 6;
        public static final int TAG_SHOOTING_MODE = OFFSET + 7;
        public static final int TAG_METERING_MODE = OFFSET + 8;
        public static final int TAG_APEX_FILM_SPEED_VALUE = OFFSET + 9;
        public static final int TAG_APEX_SHUTTER_SPEED_TIME_VALUE = OFFSET + 10;
        public static final int TAG_APEX_APERTURE_VALUE = OFFSET + 11;
        public static final int TAG_MACRO_MODE = OFFSET + 12;
        public static final int TAG_DIGITAL_ZOOM = OFFSET + 13;
        public static final int TAG_EXPOSURE_COMPENSATION = OFFSET + 14;
        public static final int TAG_BRACKET_STEP = OFFSET + 15;
        // 16 missing
        public static final int TAG_INTERVAL_LENGTH = OFFSET + 17;
        public static final int TAG_INTERVAL_NUMBER = OFFSET + 18;
        public static final int TAG_FOCAL_LENGTH = OFFSET + 19;
        public static final int TAG_FOCUS_DISTANCE = OFFSET + 20;
        public static final int TAG_FLASH_FIRED = OFFSET + 21;
        public static final int TAG_DATE = OFFSET + 22;
        public static final int TAG_TIME = OFFSET + 23;
        public static final int TAG_MAX_APERTURE_AT_FOCAL_LENGTH = OFFSET + 24;
        // 25, 26 missing
        public static final int TAG_FILE_NUMBER_MEMORY = OFFSET + 27;
        public static final int TAG_LAST_FILE_NUMBER = OFFSET + 28;
        public static final int TAG_WHITE_BALANCE_RED = OFFSET + 29;
        public static final int TAG_WHITE_BALANCE_GREEN = OFFSET + 30;
        public static final int TAG_WHITE_BALANCE_BLUE = OFFSET + 31;
        public static final int TAG_SATURATION = OFFSET + 32;
        public static final int TAG_CONTRAST = OFFSET + 33;
        public static final int TAG_SHARPNESS = OFFSET + 34;
        public static final int TAG_SUBJECT_PROGRAM = OFFSET + 35;
        public static final int TAG_FLASH_COMPENSATION = OFFSET + 36;
        public static final int TAG_ISO_SETTING = OFFSET + 37;
        public static final int TAG_CAMERA_MODEL = OFFSET + 38;
        public static final int TAG_INTERVAL_MODE = OFFSET + 39;
        public static final int TAG_FOLDER_NAME = OFFSET + 40;
        public static final int TAG_COLOR_MODE = OFFSET + 41;
        public static final int TAG_COLOR_FILTER = OFFSET + 42;
        public static final int TAG_BLACK_AND_WHITE_FILTER = OFFSET + 43;
        public static final int TAG_INTERNAL_FLASH = OFFSET + 44;
        public static final int TAG_APEX_BRIGHTNESS_VALUE = OFFSET + 45;
        public static final int TAG_SPOT_FOCUS_POINT_X_COORDINATE = OFFSET + 46;
        public static final int TAG_SPOT_FOCUS_POINT_Y_COORDINATE = OFFSET + 47;
        public static final int TAG_WIDE_FOCUS_ZONE = OFFSET + 48;
        public static final int TAG_FOCUS_MODE = OFFSET + 49;
        public static final int TAG_FOCUS_AREA = OFFSET + 50;
        public static final int TAG_DEC_SWITCH_POSITION = OFFSET + 51;
    }

    @NotNull
    protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();

    static {
        _tagNameMap.put(TAG_MAKERNOTE_VERSION, "Makernote Version");
        _tagNameMap.put(TAG_CAMERA_SETTINGS_1, "Camera Settings");
        _tagNameMap.put(TAG_CAMERA_SETTINGS_2, "Camera Settings");
        _tagNameMap.put(TAG_COMPRESSED_IMAGE_SIZE, "Compressed Image Size");
        _tagNameMap.put(TAG_MINOLTA_THUMBNAIL_OFFSET_1, "Thumbnail Offset");
        _tagNameMap.put(TAG_MINOLTA_THUMBNAIL_OFFSET_2, "Thumbnail Offset");
        _tagNameMap.put(TAG_MINOLTA_THUMBNAIL_LENGTH, "Thumbnail Length");
        _tagNameMap.put(TAG_THUMBNAIL_IMAGE, "Thumbnail Image");
        _tagNameMap.put(TAG_COLOUR_MODE, "Colour Mode");
        _tagNameMap.put(TAG_IMAGE_QUALITY_1, "Image Quality");
        _tagNameMap.put(TAG_IMAGE_QUALITY_2, "Image Quality");
        _tagNameMap.put(TAG_BODY_FIRMWARE_VERSION, "Body Firmware Version");
        _tagNameMap.put(TAG_SPECIAL_MODE, "Special Mode");
        _tagNameMap.put(TAG_JPEG_QUALITY, "JPEG Quality");
        _tagNameMap.put(TAG_MACRO_MODE, "Macro");
        _tagNameMap.put(TAG_BW_MODE, "BW Mode");
        _tagNameMap.put(TAG_DIGITAL_ZOOM, "Digital Zoom");
        _tagNameMap.put(TAG_FOCAL_PLANE_DIAGONAL, "Focal Plane Diagonal");
        _tagNameMap.put(TAG_LENS_DISTORTION_PARAMETERS, "Lens Distortion Parameters");
        _tagNameMap.put(TAG_CAMERA_TYPE, "Camera Type");
        _tagNameMap.put(TAG_PICT_INFO, "Pict Info");
        _tagNameMap.put(TAG_CAMERA_ID, "Camera Id");
        _tagNameMap.put(TAG_IMAGE_WIDTH, "Image Width");
        _tagNameMap.put(TAG_IMAGE_HEIGHT, "Image Height");
        _tagNameMap.put(TAG_ORIGINAL_MANUFACTURER_MODEL, "Original Manufacturer Model");
        _tagNameMap.put(TAG_PREVIEW_IMAGE, "Preview Image");
        _tagNameMap.put(TAG_PRE_CAPTURE_FRAMES, "Pre Capture Frames");
        _tagNameMap.put(TAG_WHITE_BOARD, "White Board");
        _tagNameMap.put(TAG_ONE_TOUCH_WB, "One Touch WB");
        _tagNameMap.put(TAG_WHITE_BALANCE_BRACKET, "White Balance Bracket");
        _tagNameMap.put(TAG_WHITE_BALANCE_BIAS, "White Balance Bias");
        _tagNameMap.put(TAG_SCENE_MODE, "Scene Mode");
        _tagNameMap.put(TAG_SERIAL_NUMBER_1, "Serial Number");
        _tagNameMap.put(TAG_FIRMWARE, "Firmware");
        _tagNameMap.put(TAG_PRINT_IMAGE_MATCHING_INFO, "Print Image Matching (PIM) Info");
        _tagNameMap.put(TAG_DATA_DUMP_1, "Data Dump");
        _tagNameMap.put(TAG_DATA_DUMP_2, "Data Dump 2");
        _tagNameMap.put(TAG_SHUTTER_SPEED_VALUE, "Shutter Speed Value");
        _tagNameMap.put(TAG_ISO_VALUE, "ISO Value");
        _tagNameMap.put(TAG_APERTURE_VALUE, "Aperture Value");
        _tagNameMap.put(TAG_BRIGHTNESS_VALUE, "Brightness Value");
        _tagNameMap.put(TAG_FLASH_MODE, "Flash Mode");
        _tagNameMap.put(TAG_FLASH_DEVICE, "Flash Device");
        _tagNameMap.put(TAG_BRACKET, "Bracket");
        _tagNameMap.put(TAG_SENSOR_TEMPERATURE, "Sensor Temperature");
        _tagNameMap.put(TAG_LENS_TEMPERATURE, "Lens Temperature");
        _tagNameMap.put(TAG_LIGHT_CONDITION, "Light Condition");
        _tagNameMap.put(TAG_FOCUS_RANGE, "Focus Range");
        _tagNameMap.put(TAG_FOCUS_MODE, "Focus Mode");
        _tagNameMap.put(TAG_FOCUS_DISTANCE, "Focus Distance");
        _tagNameMap.put(TAG_ZOOM, "Zoom");
        _tagNameMap.put(TAG_MACRO_FOCUS, "Macro Focus");
        _tagNameMap.put(TAG_SHARPNESS, "Sharpness");
        _tagNameMap.put(TAG_FLASH_CHARGE_LEVEL, "Flash Charge Level");
        _tagNameMap.put(TAG_COLOUR_MATRIX, "Colour Matrix");
        _tagNameMap.put(TAG_BLACK_LEVEL, "Black Level");
        _tagNameMap.put(TAG_COLOR_TEMPERATURE_BG, "Color Temperature BG");
        _tagNameMap.put(TAG_COLOR_TEMPERATURE_RG, "Color Temperature RG");
        _tagNameMap.put(TAG_WB_MODE, "White Balance Mode");
        _tagNameMap.put(TAG_RED_BALANCE, "Red Balance");
        _tagNameMap.put(TAG_BLUE_BALANCE, "Blue Balance");
        _tagNameMap.put(TAG_COLOR_MATRIX_NUMBER, "Color Matrix Number");
        _tagNameMap.put(TAG_SERIAL_NUMBER_2, "Serial Number");
        _tagNameMap.put(TAG_EXTERNAL_FLASH_AE1_0, "External Flash AE1 0");
        _tagNameMap.put(TAG_EXTERNAL_FLASH_AE2_0, "External Flash AE2 0");
        _tagNameMap.put(TAG_INTERNAL_FLASH_AE1_0, "Internal Flash AE1 0");
        _tagNameMap.put(TAG_INTERNAL_FLASH_AE2_0, "Internal Flash AE2 0");
        _tagNameMap.put(TAG_EXTERNAL_FLASH_AE1, "External Flash AE1");
        _tagNameMap.put(TAG_EXTERNAL_FLASH_AE2, "External Flash AE2");
        _tagNameMap.put(TAG_INTERNAL_FLASH_AE1, "Internal Flash AE1");
        _tagNameMap.put(TAG_INTERNAL_FLASH_AE2, "Internal Flash AE2");
        _tagNameMap.put(TAG_FLASH_BIAS, "Flash Bias");
        _tagNameMap.put(TAG_INTERNAL_FLASH_TABLE, "Internal Flash Table");
        _tagNameMap.put(TAG_EXTERNAL_FLASH_G_VALUE, "External Flash G Value");
        _tagNameMap.put(TAG_EXTERNAL_FLASH_BOUNCE, "External Flash Bounce");
        _tagNameMap.put(TAG_EXTERNAL_FLASH_ZOOM, "External Flash Zoom");
        _tagNameMap.put(TAG_EXTERNAL_FLASH_MODE, "External Flash Mode");
        _tagNameMap.put(TAG_CONTRAST, "Contrast");
        _tagNameMap.put(TAG_SHARPNESS_FACTOR, "Sharpness Factor");
        _tagNameMap.put(TAG_COLOUR_CONTROL, "Colour Control");
        _tagNameMap.put(TAG_VALID_BITS, "Valid Bits");
        _tagNameMap.put(TAG_CORING_FILTER, "Coring Filter");
        _tagNameMap.put(TAG_OLYMPUS_IMAGE_WIDTH, "Olympus Image Width");
        _tagNameMap.put(TAG_OLYMPUS_IMAGE_HEIGHT, "Olympus Image Height");
        _tagNameMap.put(TAG_SCENE_DETECT, "Scene Detect");
        _tagNameMap.put(TAG_SCENE_AREA, "Scene Area");
        _tagNameMap.put(TAG_SCENE_DETECT_DATA, "Scene Detect Data");
        _tagNameMap.put(TAG_COMPRESSION_RATIO, "Compression Ratio");
        _tagNameMap.put(TAG_PREVIEW_IMAGE_VALID, "Preview Image Valid");
        _tagNameMap.put(TAG_PREVIEW_IMAGE_START, "Preview Image Start");
        _tagNameMap.put(TAG_PREVIEW_IMAGE_LENGTH, "Preview Image Length");
        _tagNameMap.put(TAG_AF_RESULT, "AF Result");
        _tagNameMap.put(TAG_CCD_SCAN_MODE, "CCD Scan Mode");
        _tagNameMap.put(TAG_NOISE_REDUCTION, "Noise Reduction");
        _tagNameMap.put(TAG_INFINITY_LENS_STEP, "Infinity Lens Step");
        _tagNameMap.put(TAG_NEAR_LENS_STEP, "Near Lens Step");
        _tagNameMap.put(TAG_LIGHT_VALUE_CENTER, "Light Value Center");
        _tagNameMap.put(TAG_LIGHT_VALUE_PERIPHERY, "Light Value Periphery");
        _tagNameMap.put(TAG_FIELD_COUNT, "Field Count");
        _tagNameMap.put(TAG_EQUIPMENT, "Equipment");
        _tagNameMap.put(TAG_CAMERA_SETTINGS, "Camera Settings");
        _tagNameMap.put(TAG_RAW_DEVELOPMENT, "Raw Development");
        _tagNameMap.put(TAG_RAW_DEVELOPMENT_2, "Raw Development 2");
        _tagNameMap.put(TAG_IMAGE_PROCESSING, "Image Processing");
        _tagNameMap.put(TAG_FOCUS_INFO, "Focus Info");
        _tagNameMap.put(TAG_RAW_INFO, "Raw Info");
        _tagNameMap.put(TAG_MAIN_INFO, "Main Info");

        _tagNameMap.put(CameraSettings.TAG_EXPOSURE_MODE, "Exposure Mode");
        _tagNameMap.put(CameraSettings.TAG_FLASH_MODE, "Flash Mode");
        _tagNameMap.put(CameraSettings.TAG_WHITE_BALANCE, "White Balance");
        _tagNameMap.put(CameraSettings.TAG_IMAGE_SIZE, "Image Size");
        _tagNameMap.put(CameraSettings.TAG_IMAGE_QUALITY, "Image Quality");
        _tagNameMap.put(CameraSettings.TAG_SHOOTING_MODE, "Shooting Mode");
        _tagNameMap.put(CameraSettings.TAG_METERING_MODE, "Metering Mode");
        _tagNameMap.put(CameraSettings.TAG_APEX_FILM_SPEED_VALUE, "Apex Film Speed Value");
        _tagNameMap.put(CameraSettings.TAG_APEX_SHUTTER_SPEED_TIME_VALUE, "Apex Shutter Speed Time Value");
        _tagNameMap.put(CameraSettings.TAG_APEX_APERTURE_VALUE, "Apex Aperture Value");
        _tagNameMap.put(CameraSettings.TAG_MACRO_MODE, "Macro Mode");
        _tagNameMap.put(CameraSettings.TAG_DIGITAL_ZOOM, "Digital Zoom");
        _tagNameMap.put(CameraSettings.TAG_EXPOSURE_COMPENSATION, "Exposure Compensation");
        _tagNameMap.put(CameraSettings.TAG_BRACKET_STEP, "Bracket Step");

        _tagNameMap.put(CameraSettings.TAG_INTERVAL_LENGTH, "Interval Length");
        _tagNameMap.put(CameraSettings.TAG_INTERVAL_NUMBER, "Interval Number");
        _tagNameMap.put(CameraSettings.TAG_FOCAL_LENGTH, "Focal Length");
        _tagNameMap.put(CameraSettings.TAG_FOCUS_DISTANCE, "Focus Distance");
        _tagNameMap.put(CameraSettings.TAG_FLASH_FIRED, "Flash Fired");
        _tagNameMap.put(CameraSettings.TAG_DATE, "Date");
        _tagNameMap.put(CameraSettings.TAG_TIME, "Time");
        _tagNameMap.put(CameraSettings.TAG_MAX_APERTURE_AT_FOCAL_LENGTH, "Max Aperture at Focal Length");

        _tagNameMap.put(CameraSettings.TAG_FILE_NUMBER_MEMORY, "File Number Memory");
        _tagNameMap.put(CameraSettings.TAG_LAST_FILE_NUMBER, "Last File Number");
        _tagNameMap.put(CameraSettings.TAG_WHITE_BALANCE_RED, "White Balance Red");
        _tagNameMap.put(CameraSettings.TAG_WHITE_BALANCE_GREEN, "White Balance Green");
        _tagNameMap.put(CameraSettings.TAG_WHITE_BALANCE_BLUE, "White Balance Blue");
        _tagNameMap.put(CameraSettings.TAG_SATURATION, "Saturation");
        _tagNameMap.put(CameraSettings.TAG_CONTRAST, "Contrast");
        _tagNameMap.put(CameraSettings.TAG_SHARPNESS, "Sharpness");
        _tagNameMap.put(CameraSettings.TAG_SUBJECT_PROGRAM, "Subject Program");
        _tagNameMap.put(CameraSettings.TAG_FLASH_COMPENSATION, "Flash Compensation");
        _tagNameMap.put(CameraSettings.TAG_ISO_SETTING, "ISO Setting");
        _tagNameMap.put(CameraSettings.TAG_CAMERA_MODEL, "Camera Model");
        _tagNameMap.put(CameraSettings.TAG_INTERVAL_MODE, "Interval Mode");
        _tagNameMap.put(CameraSettings.TAG_FOLDER_NAME, "Folder Name");
        _tagNameMap.put(CameraSettings.TAG_COLOR_MODE, "Color Mode");
        _tagNameMap.put(CameraSettings.TAG_COLOR_FILTER, "Color Filter");
        _tagNameMap.put(CameraSettings.TAG_BLACK_AND_WHITE_FILTER, "Black and White Filter");
        _tagNameMap.put(CameraSettings.TAG_INTERNAL_FLASH, "Internal Flash");
        _tagNameMap.put(CameraSettings.TAG_APEX_BRIGHTNESS_VALUE, "Apex Brightness Value");
        _tagNameMap.put(CameraSettings.TAG_SPOT_FOCUS_POINT_X_COORDINATE, "Spot Focus Point X Coordinate");
        _tagNameMap.put(CameraSettings.TAG_SPOT_FOCUS_POINT_Y_COORDINATE, "Spot Focus Point Y Coordinate");
        _tagNameMap.put(CameraSettings.TAG_WIDE_FOCUS_ZONE, "Wide Focus Zone");
        _tagNameMap.put(CameraSettings.TAG_FOCUS_MODE, "Focus Mode");
        _tagNameMap.put(CameraSettings.TAG_FOCUS_AREA, "Focus Area");
        _tagNameMap.put(CameraSettings.TAG_DEC_SWITCH_POSITION, "DEC Switch Position");
    }

    public OlympusMakernoteDirectory()
    {
        this.setDescriptor(new OlympusMakernoteDescriptor(this));
    }

    @Override
    @NotNull
    public String getName()
    {
        return "Olympus Makernote";
    }

    @Override
    public void setByteArray(int tagType, @NotNull byte[] bytes)
    {
        if (tagType == TAG_CAMERA_SETTINGS_1 || tagType == TAG_CAMERA_SETTINGS_2) {
            processCameraSettings(bytes);
        } else {
            super.setByteArray(tagType, bytes);
        }
    }

    private void processCameraSettings(byte[] bytes)
    {
        SequentialByteArrayReader reader = new SequentialByteArrayReader(bytes);
        reader.setMotorolaByteOrder(true);

        int count = bytes.length / 4;

        try {
            for (int i = 0; i < count; i++) {
                int value = reader.getInt32();
                setInt(CameraSettings.OFFSET + i, value);
            }
        } catch (IOException e) {
            // Should never happen, given that we check the length of the bytes beforehand.
            e.printStackTrace();
        }
    }

    public boolean isIntervalMode()
    {
        Long value = getLongObject(CameraSettings.TAG_SHOOTING_MODE);
        return value != null && value == 5;
    }

    @Override
    @NotNull
    protected HashMap<Integer, String> getTagNameMap()
    {
        return _tagNameMap;
    }

    // <summary>
    // These values are currently decoded only for Olympus models.  Models with
    // Olympus-style maker notes from other brands such as Acer, BenQ, Hitachi, HP,
    // Premier, Konica-Minolta, Maginon, Ricoh, Rollei, SeaLife, Sony, Supra,
    // Vivitar are not listed.
    // </summary>
    // <remarks>
    // Converted from Exiftool version 10.33 created by Phil Harvey
    // http://www.sno.phy.queensu.ca/~phil/exiftool/
    // lib\Image\ExifTool\Olympus.pm
    // </remarks>
    public static final HashMap<String, String> OlympusCameraTypes = new HashMap<String, String>();

    static {
        OlympusCameraTypes.put("D4028", "X-2,C-50Z");
        OlympusCameraTypes.put("D4029", "E-20,E-20N,E-20P");
        OlympusCameraTypes.put("D4034", "C720UZ");
        OlympusCameraTypes.put("D4040", "E-1");
        OlympusCameraTypes.put("D4041", "E-300");
        OlympusCameraTypes.put("D4083", "C2Z,D520Z,C220Z");
        OlympusCameraTypes.put("D4106", "u20D,S400D,u400D");
        OlympusCameraTypes.put("D4120", "X-1");
        OlympusCameraTypes.put("D4122", "u10D,S300D,u300D");
        OlympusCameraTypes.put("D4125", "AZ-1");
        OlympusCameraTypes.put("D4141", "C150,D390");
        OlympusCameraTypes.put("D4193", "C-5000Z");
        OlympusCameraTypes.put("D4194", "X-3,C-60Z");
        OlympusCameraTypes.put("D4199", "u30D,S410D,u410D");
        OlympusCameraTypes.put("D4205", "X450,D535Z,C370Z");
        OlympusCameraTypes.put("D4210", "C160,D395");
        OlympusCameraTypes.put("D4211", "C725UZ");
        OlympusCameraTypes.put("D4213", "FerrariMODEL2003");
        OlympusCameraTypes.put("D4216", "u15D");
        OlympusCameraTypes.put("D4217", "u25D");
        OlympusCameraTypes.put("D4220", "u-miniD,Stylus V");
        OlympusCameraTypes.put("D4221", "u40D,S500,uD500");
        OlympusCameraTypes.put("D4231", "FerrariMODEL2004");
        OlympusCameraTypes.put("D4240", "X500,D590Z,C470Z");
        OlympusCameraTypes.put("D4244", "uD800,S800");
        OlympusCameraTypes.put("D4256", "u720SW,S720SW");
        OlympusCameraTypes.put("D4261", "X600,D630,FE5500");
        OlympusCameraTypes.put("D4262", "uD600,S600");
        OlympusCameraTypes.put("D4301", "u810/S810"); // (yes, "/".  Olympus is not consistent in the notation)
        OlympusCameraTypes.put("D4302", "u710,S710");
        OlympusCameraTypes.put("D4303", "u700,S700");
        OlympusCameraTypes.put("D4304", "FE100,X710");
        OlympusCameraTypes.put("D4305", "FE110,X705");
        OlympusCameraTypes.put("D4310", "FE-130,X-720");
        OlympusCameraTypes.put("D4311", "FE-140,X-725");
        OlympusCameraTypes.put("D4312", "FE150,X730");
        OlympusCameraTypes.put("D4313", "FE160,X735");
        OlympusCameraTypes.put("D4314", "u740,S740");
        OlympusCameraTypes.put("D4315", "u750,S750");
        OlympusCameraTypes.put("D4316", "u730/S730");
        OlympusCameraTypes.put("D4317", "FE115,X715");
        OlympusCameraTypes.put("D4321", "SP550UZ");
        OlympusCameraTypes.put("D4322", "SP510UZ");
        OlympusCameraTypes.put("D4324", "FE170,X760");
        OlympusCameraTypes.put("D4326", "FE200");
        OlympusCameraTypes.put("D4327", "FE190/X750"); // (also SX876)
        OlympusCameraTypes.put("D4328", "u760,S760");
        OlympusCameraTypes.put("D4330", "FE180/X745"); // (also SX875)
        OlympusCameraTypes.put("D4331", "u1000/S1000");
        OlympusCameraTypes.put("D4332", "u770SW,S770SW");
        OlympusCameraTypes.put("D4333", "FE240/X795");
        OlympusCameraTypes.put("D4334", "FE210,X775");
        OlympusCameraTypes.put("D4336", "FE230/X790");
        OlympusCameraTypes.put("D4337", "FE220,X785");
        OlympusCameraTypes.put("D4338", "u725SW,S725SW");
        OlympusCameraTypes.put("D4339", "FE250/X800");
        OlympusCameraTypes.put("D4341", "u780,S780");
        OlympusCameraTypes.put("D4343", "u790SW,S790SW");
        OlympusCameraTypes.put("D4344", "u1020,S1020");
        OlympusCameraTypes.put("D4346", "FE15,X10");
        OlympusCameraTypes.put("D4348", "FE280,X820,C520");
        OlympusCameraTypes.put("D4349", "FE300,X830");
        OlympusCameraTypes.put("D4350", "u820,S820");
        OlympusCameraTypes.put("D4351", "u1200,S1200");
        OlympusCameraTypes.put("D4352", "FE270,X815,C510");
        OlympusCameraTypes.put("D4353", "u795SW,S795SW");
        OlympusCameraTypes.put("D4354", "u1030SW,S1030SW");
        OlympusCameraTypes.put("D4355", "SP560UZ");
        OlympusCameraTypes.put("D4356", "u1010,S1010");
        OlympusCameraTypes.put("D4357", "u830,S830");
        OlympusCameraTypes.put("D4359", "u840,S840");
        OlympusCameraTypes.put("D4360", "FE350WIDE,X865");
        OlympusCameraTypes.put("D4361", "u850SW,S850SW");
        OlympusCameraTypes.put("D4362", "FE340,X855,C560");
        OlympusCameraTypes.put("D4363", "FE320,X835,C540");
        OlympusCameraTypes.put("D4364", "SP570UZ");
        OlympusCameraTypes.put("D4366", "FE330,X845,C550");
        OlympusCameraTypes.put("D4368", "FE310,X840,C530");
        OlympusCameraTypes.put("D4370", "u1050SW,S1050SW");
        OlympusCameraTypes.put("D4371", "u1060,S1060");
        OlympusCameraTypes.put("D4372", "FE370,X880,C575");
        OlympusCameraTypes.put("D4374", "SP565UZ");
        OlympusCameraTypes.put("D4377", "u1040,S1040");
        OlympusCameraTypes.put("D4378", "FE360,X875,C570");
        OlympusCameraTypes.put("D4379", "FE20,X15,C25");
        OlympusCameraTypes.put("D4380", "uT6000,ST6000");
        OlympusCameraTypes.put("D4381", "uT8000,ST8000");
        OlympusCameraTypes.put("D4382", "u9000,S9000");
        OlympusCameraTypes.put("D4384", "SP590UZ");
        OlympusCameraTypes.put("D4385", "FE3010,X895");
        OlympusCameraTypes.put("D4386", "FE3000,X890");
        OlympusCameraTypes.put("D4387", "FE35,X30");
        OlympusCameraTypes.put("D4388", "u550WP,S550WP");
        OlympusCameraTypes.put("D4390", "FE5000,X905");
        OlympusCameraTypes.put("D4391", "u5000");
        OlympusCameraTypes.put("D4392", "u7000,S7000");
        OlympusCameraTypes.put("D4396", "FE5010,X915");
        OlympusCameraTypes.put("D4397", "FE25,X20");
        OlympusCameraTypes.put("D4398", "FE45,X40");
        OlympusCameraTypes.put("D4401", "XZ-1");
        OlympusCameraTypes.put("D4402", "uT6010,ST6010");
        OlympusCameraTypes.put("D4406", "u7010,S7010 / u7020,S7020");
        OlympusCameraTypes.put("D4407", "FE4010,X930");
        OlympusCameraTypes.put("D4408", "X560WP");
        OlympusCameraTypes.put("D4409", "FE26,X21");
        OlympusCameraTypes.put("D4410", "FE4000,X920,X925");
        OlympusCameraTypes.put("D4411", "FE46,X41,X42");
        OlympusCameraTypes.put("D4412", "FE5020,X935");
        OlympusCameraTypes.put("D4413", "uTough-3000");
        OlympusCameraTypes.put("D4414", "StylusTough-6020");
        OlympusCameraTypes.put("D4415", "StylusTough-8010");
        OlympusCameraTypes.put("D4417", "u5010,S5010");
        OlympusCameraTypes.put("D4418", "u7040,S7040");
        OlympusCameraTypes.put("D4419", "u9010,S9010");
        OlympusCameraTypes.put("D4423", "FE4040");
        OlympusCameraTypes.put("D4424", "FE47,X43");
        OlympusCameraTypes.put("D4426", "FE4030,X950");
        OlympusCameraTypes.put("D4428", "FE5030,X965,X960");
        OlympusCameraTypes.put("D4430", "u7030,S7030");
        OlympusCameraTypes.put("D4432", "SP600UZ");
        OlympusCameraTypes.put("D4434", "SP800UZ");
        OlympusCameraTypes.put("D4439", "FE4020,X940");
        OlympusCameraTypes.put("D4442", "FE5035");
        OlympusCameraTypes.put("D4448", "FE4050,X970");
        OlympusCameraTypes.put("D4450", "FE5050,X985");
        OlympusCameraTypes.put("D4454", "u-7050");
        OlympusCameraTypes.put("D4464", "T10,X27");
        OlympusCameraTypes.put("D4470", "FE5040,X980");
        OlympusCameraTypes.put("D4472", "TG-310");
        OlympusCameraTypes.put("D4474", "TG-610");
        OlympusCameraTypes.put("D4476", "TG-810");
        OlympusCameraTypes.put("D4478", "VG145,VG140,D715");
        OlympusCameraTypes.put("D4479", "VG130,D710");
        OlympusCameraTypes.put("D4480", "VG120,D705");
        OlympusCameraTypes.put("D4482", "VR310,D720");
        OlympusCameraTypes.put("D4484", "VR320,D725");
        OlympusCameraTypes.put("D4486", "VR330,D730");
        OlympusCameraTypes.put("D4488", "VG110,D700");
        OlympusCameraTypes.put("D4490", "SP-610UZ");
        OlympusCameraTypes.put("D4492", "SZ-10");
        OlympusCameraTypes.put("D4494", "SZ-20");
        OlympusCameraTypes.put("D4496", "SZ-30MR");
        OlympusCameraTypes.put("D4498", "SP-810UZ");
        OlympusCameraTypes.put("D4500", "SZ-11");
        OlympusCameraTypes.put("D4504", "TG-615");
        OlympusCameraTypes.put("D4508", "TG-620");
        OlympusCameraTypes.put("D4510", "TG-820");
        OlympusCameraTypes.put("D4512", "TG-1");
        OlympusCameraTypes.put("D4516", "SH-21");
        OlympusCameraTypes.put("D4519", "SZ-14");
        OlympusCameraTypes.put("D4520", "SZ-31MR");
        OlympusCameraTypes.put("D4521", "SH-25MR");
        OlympusCameraTypes.put("D4523", "SP-720UZ");
        OlympusCameraTypes.put("D4529", "VG170");
        OlympusCameraTypes.put("D4531", "XZ-2");
        OlympusCameraTypes.put("D4535", "SP-620UZ");
        OlympusCameraTypes.put("D4536", "TG-320");
        OlympusCameraTypes.put("D4537", "VR340,D750");
        OlympusCameraTypes.put("D4538", "VG160,X990,D745");
        OlympusCameraTypes.put("D4541", "SZ-12");
        OlympusCameraTypes.put("D4545", "VH410");
        OlympusCameraTypes.put("D4546", "XZ-10"); //IB
        OlympusCameraTypes.put("D4547", "TG-2");
        OlympusCameraTypes.put("D4548", "TG-830");
        OlympusCameraTypes.put("D4549", "TG-630");
        OlympusCameraTypes.put("D4550", "SH-50");
        OlympusCameraTypes.put("D4553", "SZ-16,DZ-105");
        OlympusCameraTypes.put("D4562", "SP-820UZ");
        OlympusCameraTypes.put("D4566", "SZ-15");
        OlympusCameraTypes.put("D4572", "STYLUS1");
        OlympusCameraTypes.put("D4574", "TG-3");
        OlympusCameraTypes.put("D4575", "TG-850");
        OlympusCameraTypes.put("D4579", "SP-100EE");
        OlympusCameraTypes.put("D4580", "SH-60");
        OlympusCameraTypes.put("D4581", "SH-1");
        OlympusCameraTypes.put("D4582", "TG-835");
        OlympusCameraTypes.put("D4585", "SH-2 / SH-3");
        OlympusCameraTypes.put("D4586", "TG-4");
        OlympusCameraTypes.put("D4587", "TG-860");
        OlympusCameraTypes.put("D4591", "TG-870");
        OlympusCameraTypes.put("D4809", "C2500L");
        OlympusCameraTypes.put("D4842", "E-10");
        OlympusCameraTypes.put("D4856", "C-1");
        OlympusCameraTypes.put("D4857", "C-1Z,D-150Z");
        OlympusCameraTypes.put("DCHC", "D500L");
        OlympusCameraTypes.put("DCHT", "D600L / D620L");
        OlympusCameraTypes.put("K0055", "AIR-A01");
        OlympusCameraTypes.put("S0003", "E-330");
        OlympusCameraTypes.put("S0004", "E-500");
        OlympusCameraTypes.put("S0009", "E-400");
        OlympusCameraTypes.put("S0010", "E-510");
        OlympusCameraTypes.put("S0011", "E-3");
        OlympusCameraTypes.put("S0013", "E-410");
        OlympusCameraTypes.put("S0016", "E-420");
        OlympusCameraTypes.put("S0017", "E-30");
        OlympusCameraTypes.put("S0018", "E-520");
        OlympusCameraTypes.put("S0019", "E-P1");
        OlympusCameraTypes.put("S0023", "E-620");
        OlympusCameraTypes.put("S0026", "E-P2");
        OlympusCameraTypes.put("S0027", "E-PL1");
        OlympusCameraTypes.put("S0029", "E-450");
        OlympusCameraTypes.put("S0030", "E-600");
        OlympusCameraTypes.put("S0032", "E-P3");
        OlympusCameraTypes.put("S0033", "E-5");
        OlympusCameraTypes.put("S0034", "E-PL2");
        OlympusCameraTypes.put("S0036", "E-M5");
        OlympusCameraTypes.put("S0038", "E-PL3");
        OlympusCameraTypes.put("S0039", "E-PM1");
        OlympusCameraTypes.put("S0040", "E-PL1s");
        OlympusCameraTypes.put("S0042", "E-PL5");
        OlympusCameraTypes.put("S0043", "E-PM2");
        OlympusCameraTypes.put("S0044", "E-P5");
        OlympusCameraTypes.put("S0045", "E-PL6");
        OlympusCameraTypes.put("S0046", "E-PL7"); //IB
        OlympusCameraTypes.put("S0047", "E-M1");
        OlympusCameraTypes.put("S0051", "E-M10");
        OlympusCameraTypes.put("S0052", "E-M5MarkII"); //IB
        OlympusCameraTypes.put("S0059", "E-M10MarkII");
        OlympusCameraTypes.put("S0061", "PEN-F"); //forum7005
        OlympusCameraTypes.put("S0065", "E-PL8");
        OlympusCameraTypes.put("S0067", "E-M1MarkII");
        OlympusCameraTypes.put("SR45", "D220");
        OlympusCameraTypes.put("SR55", "D320L");
        OlympusCameraTypes.put("SR83", "D340L");
        OlympusCameraTypes.put("SR85", "C830L,D340R");
        OlympusCameraTypes.put("SR852", "C860L,D360L");
        OlympusCameraTypes.put("SR872", "C900Z,D400Z");
        OlympusCameraTypes.put("SR874", "C960Z,D460Z");
        OlympusCameraTypes.put("SR951", "C2000Z");
        OlympusCameraTypes.put("SR952", "C21");
        OlympusCameraTypes.put("SR953", "C21T.commu");
        OlympusCameraTypes.put("SR954", "C2020Z");
        OlympusCameraTypes.put("SR955", "C990Z,D490Z");
        OlympusCameraTypes.put("SR956", "C211Z");
        OlympusCameraTypes.put("SR959", "C990ZS,D490Z");
        OlympusCameraTypes.put("SR95A", "C2100UZ");
        OlympusCameraTypes.put("SR971", "C100,D370");
        OlympusCameraTypes.put("SR973", "C2,D230");
        OlympusCameraTypes.put("SX151", "E100RS");
        OlympusCameraTypes.put("SX351", "C3000Z / C3030Z");
        OlympusCameraTypes.put("SX354", "C3040Z");
        OlympusCameraTypes.put("SX355", "C2040Z");
        OlympusCameraTypes.put("SX357", "C700UZ");
        OlympusCameraTypes.put("SX358", "C200Z,D510Z");
        OlympusCameraTypes.put("SX374", "C3100Z,C3020Z");
        OlympusCameraTypes.put("SX552", "C4040Z");
        OlympusCameraTypes.put("SX553", "C40Z,D40Z");
        OlympusCameraTypes.put("SX556", "C730UZ");
        OlympusCameraTypes.put("SX558", "C5050Z");
        OlympusCameraTypes.put("SX571", "C120,D380");
        OlympusCameraTypes.put("SX574", "C300Z,D550Z");
        OlympusCameraTypes.put("SX575", "C4100Z,C4000Z");
        OlympusCameraTypes.put("SX751", "X200,D560Z,C350Z");
        OlympusCameraTypes.put("SX752", "X300,D565Z,C450Z");
        OlympusCameraTypes.put("SX753", "C750UZ");
        OlympusCameraTypes.put("SX754", "C740UZ");
        OlympusCameraTypes.put("SX755", "C755UZ");
        OlympusCameraTypes.put("SX756", "C5060WZ");
        OlympusCameraTypes.put("SX757", "C8080WZ");
        OlympusCameraTypes.put("SX758", "X350,D575Z,C360Z");
        OlympusCameraTypes.put("SX759", "X400,D580Z,C460Z");
        OlympusCameraTypes.put("SX75A", "AZ-2ZOOM");
        OlympusCameraTypes.put("SX75B", "D595Z,C500Z");
        OlympusCameraTypes.put("SX75C", "X550,D545Z,C480Z");
        OlympusCameraTypes.put("SX75D", "IR-300");
        OlympusCameraTypes.put("SX75F", "C55Z,C5500Z");
        OlympusCameraTypes.put("SX75G", "C170,D425");
        OlympusCameraTypes.put("SX75J", "C180,D435");
        OlympusCameraTypes.put("SX771", "C760UZ");
        OlympusCameraTypes.put("SX772", "C770UZ");
        OlympusCameraTypes.put("SX773", "C745UZ");
        OlympusCameraTypes.put("SX774", "X250,D560Z,C350Z");
        OlympusCameraTypes.put("SX775", "X100,D540Z,C310Z");
        OlympusCameraTypes.put("SX776", "C460ZdelSol");
        OlympusCameraTypes.put("SX777", "C765UZ");
        OlympusCameraTypes.put("SX77A", "D555Z,C315Z");
        OlympusCameraTypes.put("SX851", "C7070WZ");
        OlympusCameraTypes.put("SX852", "C70Z,C7000Z");
        OlympusCameraTypes.put("SX853", "SP500UZ");
        OlympusCameraTypes.put("SX854", "SP310");
        OlympusCameraTypes.put("SX855", "SP350");
        OlympusCameraTypes.put("SX873", "SP320");
        OlympusCameraTypes.put("SX875", "FE180/X745"); // (also D4330)
        OlympusCameraTypes.put("SX876", "FE190/X750"); // (also D4327)

        //   other brands
        //    4MP9Q3", "Camera 4MP-9Q3'
        //    4MP9T2", "BenQ DC C420 / Camera 4MP-9T2'
        //    5MP9Q3", "Camera 5MP-9Q3" },
        //    5MP9X9", "Camera 5MP-9X9" },
        //   '5MP-9T'=> 'Camera 5MP-9T3" },
        //   '5MP-9Y'=> 'Camera 5MP-9Y2" },
        //   '6MP-9U'=> 'Camera 6MP-9U9" },
        //    7MP9Q3", "Camera 7MP-9Q3" },
        //   '8MP-9U'=> 'Camera 8MP-9U4" },
        //    CE5330", "Acer CE-5330" },
        //   'CP-853'=> 'Acer CP-8531" },
        //    CS5531", "Acer CS5531" },
        //    DC500 ", "SeaLife DC500" },
        //    DC7370", "Camera 7MP-9GA" },
        //    DC7371", "Camera 7MP-9GM" },
        //    DC7371", "Hitachi HDC-751E" },
        //    DC7375", "Hitachi HDC-763E / Rollei RCP-7330X / Ricoh Caplio RR770 / Vivitar ViviCam 7330" },
        //   'DC E63'=> 'BenQ DC E63+" },
        //   'DC P86'=> 'BenQ DC P860" },
        //    DS5340", "Maginon Performic S5 / Premier 5MP-9M7" },
        //    DS5341", "BenQ E53+ / Supra TCM X50 / Maginon X50 / Premier 5MP-9P8" },
        //    DS5346", "Premier 5MP-9Q2" },
        //    E500  ", "Konica Minolta DiMAGE E500" },
        //    MAGINO", "Maginon X60" },
        //    Mz60  ", "HP Photosmart Mz60" },
        //    Q3DIGI", "Camera 5MP-9Q3" },
        //    SLIMLI", "Supra Slimline X6" },
        //    V8300s", "Vivitar V8300s" },
    }
}


text:
var path = require('path');
var should = require("chai").should();
var Animal = require(path.join(process.cwd() + '/lib/animal'));

describe('Mocha + Chai', function () {
    it('truthyness', function () {
    	true.should.be.true;
    	false.should.be.false;
    });
  });

describe('Thanks', function () {
	var thanks = require(path.join(process.cwd(),'/lib/thanks'));

	it('should thank me for downloading', function () {
		thanks.should.equal('Thanks for downloading my app!');
	})
})

describe('Animal', function() {
	describe('constructor', function () {
		it('should return an Animal object', function () {
			var animal = new Animal();

			animal.should.be.an('object');
			animal.should.be.an.instanceOf(Animal);
		})

		it('should be alive', function () {
			var animal = new Animal;

			animal.isAlive.should.be.true;
		});
		it('should have 100% health', function(){
			var animal = new Animal;
				animal.health.should.be.equal(1);

	});
		it('should accept a type', function () {
			var cat = new Animal('cat');
			var dog = new Animal('dog');
			cat.type.should.equal('cat');
			dog.type.should.equal('dog');
		});
	});

	describe.skip('#updateHealthStats()', function (){
		it('should change the health', function() {
			var animal = new Animal();
			var health = animal.health;

			animal.updateHealthStats(function() {
				animal.health.should.not.equal(health);
				done();
			});
		})
	})

	describe('#beCute()', function () {
		it('should be a prototype method', function() {
			var animal = new Animal();
			animal.should.respondTo('beCute');
			animal.should.not.have.ownProperty('beCute');
		});

		it('should make the animal cute', function () {
			var animal = new Animal();
			should.not.exist(animal.isCute);
			animal.beCute();
			animal.isCute.should.be.true;
		});
	});
});

	describe('Array', function () {
		describe('#filter()', function () {
			it('should return an array of items that return truthy in the inner fn', function () {
				var array = [1,2,3,4,5];

				var output = array.filter(function (item) {
					return item % 2;
				});

				output.should.eql([1,3,5]);
			});
		});
	});

describe('Array', function () {
	describe('#map()', function () {
		it('should return an array with the return value of the inner fn', function() {
			var array = [1,2,3,4,5];

			var output = array.map(function (item) {
				return item * item;
			});

			output.should.eql([1,4,9,16,25]);
		});

		it('should keep the same length', function () {
			var array = [1,2,3,4,5];

			var length = array.map(function () {
				return false;
			}) .length;

			length.should.eql(array.length);
		});

		it('should not mutate the original array', function () {
			var array = [1,2,3,4,5];

			array.map(function () {
				return false;
			});

			array.should.eql([1,2,3,4,5]);
		});
	});
});

redpajama_set_name: RedPajamaGithub


text:
Configuration.for('test') {
  database 'testdb'
}


text:
package org.droidparts.inner.reader;

import java.util.HashMap;

import android.content.Context;

import org.droidparts.util.L;

import static org.droidparts.util.Strings.isEmpty;

public class SystemServiceReader {

	static Object readVal(Context ctx, String serviceName, Class<?> valType) throws Exception {
		String name = isEmpty(serviceName) ? serviceRegistry.get(valType) : serviceName;
		if (name == null) {
			throw new Exception("Unknown service: " + serviceName);
		} else {
			return ctx.getSystemService(name);
		}
	}

	private static final HashMap<Class<?>, String> serviceRegistry = new HashMap<Class<?>, String>();

	static {
		HashMap<String, String> map = new HashMap<String, String>();
		map.put("power", "android.os.PowerManager");
		map.put("window", "android.view.WindowManager");
		map.put("layout_inflater", "android.view.LayoutInflater");
		map.put("account", "android.accounts.AccountManager");
		map.put("activity", "android.app.ActivityManager");
		map.put("alarm", "android.app.AlarmManager");
		map.put("notification", "android.app.NotificationManager");
		map.put("accessibility", "android.view.accessibility.AccessibilityManager");
		map.put("keyguard", "android.app.KeyguardManager");
		map.put("location", "android.location.LocationManager");
		map.put("country_detector", "android.location.CountryDetector");
		map.put("search", "android.app.SearchManager");
		map.put("sensor", "android.hardware.SensorManager");
		map.put("storage", "android.os.storage.StorageManager");
		map.put("wallpaper", "android.app.WallpaperManager");
		map.put("vibrator", "android.os.Vibrator");
		map.put("statusbar", "android.app.StatusBarManager");
		map.put("connectivity", "android.net.ConnectivityManager");
		map.put("throttle", "android.net.ThrottleManager");
		map.put("updatelock", "android.os.IUpdateLock");
		map.put("wifi", "android.net.wifi.WifiManager");
		map.put("wifip2p", "android.net.wifi.p2p.WifiP2pManager");
		map.put("servicediscovery", "android.net.nsd.NsdManager");
		map.put("audio", "android.media.AudioManager");
		map.put("media_router", "android.media.MediaRouter");
		map.put("phone", "android.telephony.TelephonyManager");
		map.put("clipboard", "android.text.ClipboardManager");
		map.put("input_method", "android.view.inputmethod.InputMethodManager");
		map.put("textservices", "android.view.textservice.TextServicesManager");
		map.put("appwidget", "android.appwidget.AppWidgetManager");
		map.put("backup", "android.app.backup.IBackupManager");
		map.put("dropbox", "android.os.DropBoxManager");
		map.put("device_policy", "android.app.admin.DevicePolicyManager");
		map.put("uimode", "android.app.UiModeManager");
		map.put("download", "android.app.DownloadManager");
		map.put("nfc", "android.nfc.NfcManager");
		map.put("bluetooth", "android.bluetooth.BluetoothAdapter");
		map.put("sip", "android.net.sip.SipManager");
		map.put("usb", "android.hardware.usb.UsbManager");
		map.put("serial", "android.hardware.SerialManager");
		map.put("input", "android.hardware.input.InputManager");
		map.put("display", "android.hardware.display.DisplayManager");
		map.put("scheduling_policy", "android.os.SchedulingPolicyService");
		map.put("user", "android.os.UserManager");

		for (String serviceName : map.keySet()) {
			String clsName = map.get(serviceName);
			try {
				Class<?> cls = Class.forName(clsName);
				serviceRegistry.put(cls, serviceName);
			} catch (ClassNotFoundException e) {
				L.i("%s service not available.", clsName);
			}
		}
	}

}


text:
namespace Box.V2.Utility
{
    /// <summary>
    /// Class for reporting progress.
    /// </summary>
    public class BoxProgress
    {
        /// <summary>
        /// Value from 0 - 100, indicating the percentage.
        /// </summary>
        public int progress;
    }
}


text:
Personnummer is a ruby class that handles [Swedish personal identity number](http://en.wikipedia.org/wiki/Personal_identity_number_(Sweden)).

### Installation

    $ gem install personnummer

### Example usage

```
>> p = Personnummer.new('830428-5912')
#>>Personnummer:0x007fc971369100 @valid=true, @control_digit=2, @divider="-", @serial=591, @born=#>>PersonnummerDate:0x007fc971368318 @divider="-", @day=28, @month=4, @year=1983> #<, @region="Skaraborgs län", @female=false> #<

>> p.valid?
=> true

>> p = Personnummer.new('830428')
=> ArgumentError: The supplied personnummer is invalid
```

### This implementation also supports co-ordination numbers

[Information about co-ordination numbers (in swedish)](https://www.skatteverket.se/rattsinformation/reglerochstallningstaganden/meddelanden/2010/meddelanden2010/skvm201003.5.233f91f71260075abe8800024297.html)

These numbers are obtained by adding 60 to the day of the birth date

```
>> p = Personnummer.new('830488-5912')
=> #<Personnummer:0x007fbafd1458d8 ...>
>> p.born
=> #<Date: 1983-04-28 ((2445453j,0s,0n),+0s,2299161j)>
>> p.co_ordination_number?
=> true
```

### Equality

```
>> p1 = Personnummer.new(8304285912)
=> #<Personnummer:0x007fb8fd816588 @valid=true, @control_digit=2, @divider="-", @serial=591, @born=#<Personnummer::Born:0x007fb8fd80fa80 @divider="-", @day=28, @month=4, @year=1983>, @region="Skaraborgs län", @female=false>

>> p1 == 8304285912
=> true
p1 == '8304285912'
=> true
```

### Note on "reservnummer"

"Reservnummer" is used in some special cases. There are only recommendations how it should be formatted, no formalized standard.

You can read more about it on [wikipedia](https://sv.wikipedia.org/wiki/Reservnummer#Format).


text:
class CSE_ALifeTrader;

class CALifeSurgeManager : public virtual CALifeSimulatorBase {
protected:
    typedef CALifeSimulatorBase inherited;

protected:
    xr_vector<ALife::_SPAWN_ID> m_temp_spawns;
    xr_vector<ALife::_SPAWN_ID> m_temp_spawned_objects;

private:
    void fill_spawned_objects();
    void spawn_new_spawns();

protected:
    void spawn_new_objects();

public:
    IC CALifeSurgeManager(xrServer* server, LPCSTR section);
    virtual ~CALifeSurgeManager();
};

#include "alife_surge_manager_inline.h"


text:
/**
 *
 */
package org.weekendsoft.mpa.dao;

import java.util.List;

import org.weekendsoft.mpa.entity.Category;
import org.weekendsoft.mpa.entity.SubCategory;

/**
 * @author Vivek Kant
 *
 */
public class SubCategoryTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {

		System.out.println( "----------- Creating new Category -----------" ) ;
		Category category = new Category() ;
		category.setInstanceId( "DEFAULT" ) ;
		category.setName( "Test Category" ) ;
		Category.create( category ) ;

		System.out.println( "----------- Creating new SubCategory -----------" ) ;
		SubCategory subcategory = new SubCategory() ;
		subcategory.setInstanceId( "DEFAULT" ) ;
		subcategory.setCategoryId( category.getId() ) ;
		subcategory.setName( "Test SubCategory" ) ;
		SubCategory.create( subcategory ) ;

		System.out.println( "----------- Get by Id -----------" ) ;
		SubCategory subcategory2 = SubCategory.get( subcategory.getId() ) ;
		System.out.println( subcategory2 ) ;

		System.out.println( "----------- Modify -----------" ) ;
		subcategory2.setName( "Test SubCategory 2" ) ;
		SubCategory.modify( subcategory2 ) ;

		System.out.println( "----------- Get All -----------" ) ;
		List<SubCategory> all = SubCategory.getAll( "DEFAULT" ) ;
		for( SubCategory sc : all ) {
			System.out.println( sc ) ;
		}

		System.out.println( "----------- Delete -----------" ) ;
		SubCategory.delete( subcategory2 ) ;

		System.out.println( "----------- Get All -----------" ) ;
		all = SubCategory.getAll( "DEFAULT" ) ;
		for( SubCategory sc : all ) {
			System.out.println( sc ) ;
		}

		System.out.println( "----------- Get by Category Id -----------" ) ;
		all = SubCategory.getSubCategoriesByCategory( category.getId(), "DEFAULT" ) ;
		for( SubCategory sc : all ) {
			System.out.println( sc ) ;
		}

		Category.delete( category ) ;
	}

}


text:
<!DOCTYPE html>

		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

		<meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">

	    <meta name="description" content="">
	    <meta name="author" content="">

	    <link rel="icon" href="http://static.tecnico.ulisboa.pt/favicon.png">

	    <title>SEPP</title>

	    <link href="./css/download.css" rel="stylesheet">

	    <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200' rel='stylesheet' type='text/css'>

	    <link href="./css/bootstrap.min.css" rel="stylesheet">

	    <link href="./css/modern-business.css" rel="stylesheet">

	    <link href="./font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                SEPP

                        Home

                        About

                        Lab Lessons

                                Lesson 1

                                Lesson 2

                                Lesson 3

                                Lesson 4

                                Lesson 5

                                Lesson 6

                                Lesson 7

                                Lesson 8

                                Lesson 9

                                Lesson 10

                                Lesson 11

                        Team

Lesson 2

                presentation

Questionnaires Details

If you would like to see more details about the questionnaires as well as the surveys please follow:

            Elderly Questionnaire
            Elderly Results
            Assistants Questionnaire
            Assistants Results


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
com.hazelcast.concurrent.countdownlatch (Hazelcast Root 3.4.2 API)
</TITLE>

<META NAME="date" CONTENT="2015-03-26">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Package com.hazelcast.concurrent.countdownlatch

This package contains ICountDownLatch functionality for Hazelcast.

 The ICountDownLatch is the distributed version of the CountDownLatch.

See:

          Description

Class Summary

CountDownLatchDataSerializerHook

CountDownLatchInfo

CountDownLatchProxy

CountDownLatchService

LatchKey

Package com.hazelcast.concurrent.countdownlatch Description

This package contains ICountDownLatch functionality for Hazelcast.

 The ICountDownLatch is the distributed version of the CountDownLatch.

Since:

3.2

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.


text:
<?php

namespace Magento\Framework\Session\Config\Validator;

class CookieLifetimeValidatorTest extends \PHPUnit_Framework_TestCase
{
    /** @var  \Magento\Framework\Session\Config\Validator\CookieLifetimeValidator   */
    private $model;

    public function setUp()
    {
        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
        $this->model = $objectManager->create('Magento\Framework\Session\Config\Validator\CookieLifetimeValidator');
    }

    public function testNonNumeric()
    {
        $this->assertFalse($this->model->isValid('non-numeric value'));
    }

    public function testNegative()
    {
        $this->assertFalse($this->model->isValid(-1));
    }

    public function testPositive()
    {
        $this->assertTrue($this->model->isValid(1));
    }

    public function testZero()
    {
        $this->assertTrue($this->model->isValid(0));
    }
}


text:
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Asp.NetCore.EF.Model;

namespace Asp.NetCore.EF.Migrations
{
    [DbContext(typeof(EFCoreContext))]
    [Migration("20161110064716_test two keys")]
    partial class testtwokeys
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
            modelBuilder
                .HasAnnotation("ProductVersion", "1.0.1")
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

            modelBuilder.Entity("Asp.NetCore.EF.Model.Blog", b =>
                {
                    b.Property<string>("Id");

                    b.Property<string>("Content");

                    b.Property<string>("Title");

                    b.Property<int>("UserId");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("Blog");
                });

            modelBuilder.Entity("Asp.NetCore.EF.Model.Publisher", b =>
                {
                    b.Property<string>("Id");

                    b.Property<string>("PubNo");

                    b.Property<string>("PublishName");

                    b.HasKey("Id", "PubNo");

                    b.ToTable("Publisher");
                });

            modelBuilder.Entity("Asp.NetCore.EF.Model.Role", b =>
                {
                    b.Property<int>("RoleId")
                        .ValueGeneratedOnAdd();

                    b.Property<int>("RoleTyp");

                    b.Property<int>("UserId");

                    b.HasKey("RoleId");

                    b.HasIndex("UserId");

                    b.ToTable("Roles");
                });

            modelBuilder.Entity("Asp.NetCore.EF.Model.User", b =>
                {
                    b.Property<int>("UserId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Location");

                    b.Property<string>("Name");

                    b.HasKey("UserId");

                    b.ToTable("Users");
                });

            modelBuilder.Entity("Asp.NetCore.EF.Model.Blog", b =>
                {
                    b.HasOne("Asp.NetCore.EF.Model.User", "BlogAuthor")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Asp.NetCore.EF.Model.Role", b =>
                {
                    b.HasOne("Asp.NetCore.EF.Model.User", "User")
                        .WithMany("Roles")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });
        }
    }
}


text:
#pragma once
#include <aws/auditmanager/AuditManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/DateTime.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace AuditManager
{
namespace Model
{

  /**
   *
 The notification that informs a user of an update in Audit Manager. For
   * example, this includes the notification that's sent when a control set is
   * delegated for review.

See Also:
   AWS
   * API Reference

   */
  class AWS_AUDITMANAGER_API Notification
  {
  public:
    Notification();
    Notification(Aws::Utils::Json::JsonView jsonValue);
    Notification& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
 The unique identifier for the notification.

     */
    inline const Aws::String& GetId() const{ return m_id; }

    /**
     *
 The unique identifier for the notification.

     */
    inline bool IdHasBeenSet() const { return m_idHasBeenSet; }

    /**
     *
 The unique identifier for the notification.

     */
    inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }

    /**
     *
 The unique identifier for the notification.

     */
    inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }

    /**
     *
 The unique identifier for the notification.

     */
    inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }

    /**
     *
 The unique identifier for the notification.

     */
    inline Notification& WithId(const Aws::String& value) { SetId(value); return *this;}

    /**
     *
 The unique identifier for the notification.

     */
    inline Notification& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}

    /**
     *
 The unique identifier for the notification.

     */
    inline Notification& WithId(const char* value) { SetId(value); return *this;}

    /**
     *
 The identifier for the assessment.

     */
    inline const Aws::String& GetAssessmentId() const{ return m_assessmentId; }

    /**
     *
 The identifier for the assessment.

     */
    inline bool AssessmentIdHasBeenSet() const { return m_assessmentIdHasBeenSet; }

    /**
     *
 The identifier for the assessment.

     */
    inline void SetAssessmentId(const Aws::String& value) { m_assessmentIdHasBeenSet = true; m_assessmentId = value; }

    /**
     *
 The identifier for the assessment.

     */
    inline void SetAssessmentId(Aws::String&& value) { m_assessmentIdHasBeenSet = true; m_assessmentId = std::move(value); }

    /**
     *
 The identifier for the assessment.

     */
    inline void SetAssessmentId(const char* value) { m_assessmentIdHasBeenSet = true; m_assessmentId.assign(value); }

    /**
     *
 The identifier for the assessment.

     */
    inline Notification& WithAssessmentId(const Aws::String& value) { SetAssessmentId(value); return *this;}

    /**
     *
 The identifier for the assessment.

     */
    inline Notification& WithAssessmentId(Aws::String&& value) { SetAssessmentId(std::move(value)); return *this;}

    /**
     *
 The identifier for the assessment.

     */
    inline Notification& WithAssessmentId(const char* value) { SetAssessmentId(value); return *this;}

    /**
     *
 The name of the related assessment.

     */
    inline const Aws::String& GetAssessmentName() const{ return m_assessmentName; }

    /**
     *
 The name of the related assessment.

     */
    inline bool AssessmentNameHasBeenSet() const { return m_assessmentNameHasBeenSet; }

    /**
     *
 The name of the related assessment.

     */
    inline void SetAssessmentName(const Aws::String& value) { m_assessmentNameHasBeenSet = true; m_assessmentName = value; }

    /**
     *
 The name of the related assessment.

     */
    inline void SetAssessmentName(Aws::String&& value) { m_assessmentNameHasBeenSet = true; m_assessmentName = std::move(value); }

    /**
     *
 The name of the related assessment.

     */
    inline void SetAssessmentName(const char* value) { m_assessmentNameHasBeenSet = true; m_assessmentName.assign(value); }

    /**
     *
 The name of the related assessment.

     */
    inline Notification& WithAssessmentName(const Aws::String& value) { SetAssessmentName(value); return *this;}

    /**
     *
 The name of the related assessment.

     */
    inline Notification& WithAssessmentName(Aws::String&& value) { SetAssessmentName(std::move(value)); return *this;}

    /**
     *
 The name of the related assessment.

     */
    inline Notification& WithAssessmentName(const char* value) { SetAssessmentName(value); return *this;}

    /**
     *
 The identifier for the control set.

     */
    inline const Aws::String& GetControlSetId() const{ return m_controlSetId; }

    /**
     *
 The identifier for the control set.

     */
    inline bool ControlSetIdHasBeenSet() const { return m_controlSetIdHasBeenSet; }

    /**
     *
 The identifier for the control set.

     */
    inline void SetControlSetId(const Aws::String& value) { m_controlSetIdHasBeenSet = true; m_controlSetId = value; }

    /**
     *
 The identifier for the control set.

     */
    inline void SetControlSetId(Aws::String&& value) { m_controlSetIdHasBeenSet = true; m_controlSetId = std::move(value); }

    /**
     *
 The identifier for the control set.

     */
    inline void SetControlSetId(const char* value) { m_controlSetIdHasBeenSet = true; m_controlSetId.assign(value); }

    /**
     *
 The identifier for the control set.

     */
    inline Notification& WithControlSetId(const Aws::String& value) { SetControlSetId(value); return *this;}

    /**
     *
 The identifier for the control set.

     */
    inline Notification& WithControlSetId(Aws::String&& value) { SetControlSetId(std::move(value)); return *this;}

    /**
     *
 The identifier for the control set.

     */
    inline Notification& WithControlSetId(const char* value) { SetControlSetId(value); return *this;}

    /**
     *
 Specifies the name of the control set that the notification is about.

     */
    inline const Aws::String& GetControlSetName() const{ return m_controlSetName; }

    /**
     *
 Specifies the name of the control set that the notification is about.

     */
    inline bool ControlSetNameHasBeenSet() const { return m_controlSetNameHasBeenSet; }

    /**
     *
 Specifies the name of the control set that the notification is about.

     */
    inline void SetControlSetName(const Aws::String& value) { m_controlSetNameHasBeenSet = true; m_controlSetName = value; }

    /**
     *
 Specifies the name of the control set that the notification is about.

     */
    inline void SetControlSetName(Aws::String&& value) { m_controlSetNameHasBeenSet = true; m_controlSetName = std::move(value); }

    /**
     *
 Specifies the name of the control set that the notification is about.

     */
    inline void SetControlSetName(const char* value) { m_controlSetNameHasBeenSet = true; m_controlSetName.assign(value); }

    /**
     *
 Specifies the name of the control set that the notification is about.

     */
    inline Notification& WithControlSetName(const Aws::String& value) { SetControlSetName(value); return *this;}

    /**
     *
 Specifies the name of the control set that the notification is about.

     */
    inline Notification& WithControlSetName(Aws::String&& value) { SetControlSetName(std::move(value)); return *this;}

    /**
     *
 Specifies the name of the control set that the notification is about.

     */
    inline Notification& WithControlSetName(const char* value) { SetControlSetName(value); return *this;}

    /**
     *
 The description of the notification.

     */
    inline const Aws::String& GetDescription() const{ return m_description; }

    /**
     *
 The description of the notification.

     */
    inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }

    /**
     *
 The description of the notification.

     */
    inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }

    /**
     *
 The description of the notification.

     */
    inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }

    /**
     *
 The description of the notification.

     */
    inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }

    /**
     *
 The description of the notification.

     */
    inline Notification& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}

    /**
     *
 The description of the notification.

     */
    inline Notification& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}

    /**
     *
 The description of the notification.

     */
    inline Notification& WithDescription(const char* value) { SetDescription(value); return *this;}

    /**
     *
 The time when the notification was sent.

     */
    inline const Aws::Utils::DateTime& GetEventTime() const{ return m_eventTime; }

    /**
     *
 The time when the notification was sent.

     */
    inline bool EventTimeHasBeenSet() const { return m_eventTimeHasBeenSet; }

    /**
     *
 The time when the notification was sent.

     */
    inline void SetEventTime(const Aws::Utils::DateTime& value) { m_eventTimeHasBeenSet = true; m_eventTime = value; }

    /**
     *
 The time when the notification was sent.

     */
    inline void SetEventTime(Aws::Utils::DateTime&& value) { m_eventTimeHasBeenSet = true; m_eventTime = std::move(value); }

    /**
     *
 The time when the notification was sent.

     */
    inline Notification& WithEventTime(const Aws::Utils::DateTime& value) { SetEventTime(value); return *this;}

    /**
     *
 The time when the notification was sent.

     */
    inline Notification& WithEventTime(Aws::Utils::DateTime&& value) { SetEventTime(std::move(value)); return *this;}

    /**
     *
 The sender of the notification.

     */
    inline const Aws::String& GetSource() const{ return m_source; }

    /**
     *
 The sender of the notification.

     */
    inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; }

    /**
     *
 The sender of the notification.

     */
    inline void SetSource(const Aws::String& value) { m_sourceHasBeenSet = true; m_source = value; }

    /**
     *
 The sender of the notification.

     */
    inline void SetSource(Aws::String&& value) { m_sourceHasBeenSet = true; m_source = std::move(value); }

    /**
     *
 The sender of the notification.

     */
    inline void SetSource(const char* value) { m_sourceHasBeenSet = true; m_source.assign(value); }

    /**
     *
 The sender of the notification.

     */
    inline Notification& WithSource(const Aws::String& value) { SetSource(value); return *this;}

    /**
     *
 The sender of the notification.

     */
    inline Notification& WithSource(Aws::String&& value) { SetSource(std::move(value)); return *this;}

    /**
     *
 The sender of the notification.

     */
    inline Notification& WithSource(const char* value) { SetSource(value); return *this;}

  private:

    Aws::String m_id;
    bool m_idHasBeenSet;

    Aws::String m_assessmentId;
    bool m_assessmentIdHasBeenSet;

    Aws::String m_assessmentName;
    bool m_assessmentNameHasBeenSet;

    Aws::String m_controlSetId;
    bool m_controlSetIdHasBeenSet;

    Aws::String m_controlSetName;
    bool m_controlSetNameHasBeenSet;

    Aws::String m_description;
    bool m_descriptionHasBeenSet;

    Aws::Utils::DateTime m_eventTime;
    bool m_eventTimeHasBeenSet;

    Aws::String m_source;
    bool m_sourceHasBeenSet;
  };

} // namespace Model
} // namespace AuditManager
} // namespace Aws


text:
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

public class ModActivitySelectPage : Pagination<KeyValuePair<string, string>, UIElement>
{
    public ModActivityInfoPage InfoPagePrefab = null;

    public FilterButton FilterButton = null;
    public UIElement[] Options = null;

    public Color EnabledColor = Color.white;
    public Color DisabledColor = Color.white;

    protected override KeyValuePair<string, string>[] ValueCollection
    {
        get
        {
            return _mods;
        }
    }

    protected override UIElement[] ElementCollection
    {
        get
        {
            return Options;
        }
    }

    private IEnumerable<KeyValuePair<string, string>> FilteredModNames
    {
        get
        {
            IEnumerable<KeyValuePair<string, string>> modNames = ModSelectorService.Instance.GetAllModNamesAndDisplayNames();

            string filter = FilterButton.FilterText.ToLowerInvariant();
            if (!string.IsNullOrEmpty(filter))
            {
                modNames = modNames.Where((x) => x.Key.ToLowerInvariant().Contains(filter) || x.Value.ToLowerInvariant().Contains(filter));
            }

            return modNames.OrderBy((x) => ProfileManager.ActiveDisableSet.Contains(x.Key)).ThenBy((y) => y.Value.Replace("The ", ""));
        }
    }

    private KeyValuePair<string, string>[] _mods = null;

    protected override void Awake()
    {
        base.Awake();

        for (int optionIndex = 0; optionIndex < Options.Length; ++optionIndex)
        {
            int localOptionIndex = optionIndex;

            KMSelectable selectable = Options[optionIndex].GetComponent<KMSelectable>();
            selectable.OnInteract += delegate ()
            {
                Page.GetPageWithComponent(InfoPagePrefab).ModNameAndDisplayName = _mods[ValueOffset + localOptionIndex];
                Page.GoToPage(InfoPagePrefab);
                return true;
            };
        }

        FilterButton.FilterTextChange.AddListener(FilterTextChange);
    }

    protected override void OnDestroy()
    {
        base.OnDestroy();

        FilterButton.FilterTextChange.RemoveListener(FilterTextChange);
    }

    private void OnEnable()
    {
        if (ModSelectorService.Instance == null)
        {
            return;
        }

        //Detailed information is not automatically updated all the time - do it here now
        ProfileManager.UpdateProfileSelectionDetails();

        _mods = FilteredModNames.ToArray();
        SetPage(0);
    }

    public override void SetPage(int pageIndex, int pageOffset = 0)
    {
        if (_mods == null)
        {
            return;
        }

        base.SetPage(pageIndex, pageOffset);

        Page.HeaderText = string.Format("<b>Enabled/Disabled Mods</b>\n<size=16>{0}</size>", PageName);

        if (_mods.Length == 0)
        {
            KMSelectable pageSelectable = GetComponent<KMSelectable>();
            pageSelectable.DefaultSelectableIndex = 1;
            pageSelectable.Reproxy();
            return;
        }
    }

    protected override void SetElement(KeyValuePair<string, string> value, UIElement element)
    {
        element.Text = value.Value;
        element.BackgroundHighlight.UnselectedColor = ProfileManager.ActiveDisableSet.Contains(value.Key) ? DisabledColor : EnabledColor;
    }

    private void FilterTextChange(string filterText)
    {
        _mods = FilteredModNames.ToArray();
        SetPage(0);
    }
}


text:
@interface EXContacts (Serialization)

+ (nullable NSString *)assembleDisplayNameForContact:(CNContact * _Nonnull)person;
+ (nullable NSDictionary *)birthdayForContact:(NSDateComponents * _Nonnull) birthday;
+ (nullable NSArray *)addressesForContact:(CNContact * _Nonnull)person;
+ (nullable NSArray *)phoneNumbersForContact:(CNContact * _Nonnull) person;
+ (nullable NSArray *)emailsForContact:(CNContact * _Nonnull) person;
+ (nullable NSArray *)socialProfilesForContact:(CNContact * _Nonnull)person;
+ (nullable NSArray *)instantMessageAddressesForContact:(CNContact * _Nonnull)person;
+ (nullable NSArray *)urlsForContact:(CNContact * _Nonnull) person;
+ (nullable NSArray *)datesForContact:(CNContact * _Nonnull)person;
+ (nullable NSArray *)relationsForContact:(CNContact * _Nonnull)person;
+ (nullable NSDictionary *)encodeContainer:(CNContainer * _Nonnull)container;
+ (nullable NSDictionary *)encodeGroup:(CNGroup * _Nonnull)group;

+ (nullable NSDateComponents *)decodeBirthday:(nullable NSDictionary *)input contact:(CNContact *_Nonnull)contact;
+ (nullable NSMutableArray<CNLabeledValue *> *)decodeAddresses:(nullable NSArray *)input;
+ (nullable NSMutableArray<CNLabeledValue *> *)decodePhoneNumbers:(nullable NSArray *)input;
+ (nullable NSMutableArray<CNLabeledValue *> *)decodeEmailAddresses:(nullable NSArray *)input;
+ (nullable NSMutableArray<CNLabeledValue *> *)decodeSocialProfiles:(nullable NSArray *)input;
+ (nullable NSMutableArray<CNLabeledValue *> *)decodeInstantMessageAddresses:(nullable NSArray *)input;
+ (nullable NSMutableArray<CNLabeledValue *> *)decodeUrlAddresses:(nullable NSArray *)input;
+ (nullable NSMutableArray<CNLabeledValue *> *)decodeRelationships:(nullable NSArray *)input;
+ (nullable NSMutableArray<CNLabeledValue *> *)decodeDates:(nullable NSArray *)input;

@end


text:
from chainladder.workflow.gridsearch import GridSearch, Pipeline  # noqa (API import)
from chainladder.workflow.voting import VotingChainladder  # noqa (API import)


text:
Some help with managing deploying multiple-apps and multiple-branches to multiple-environments.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'deploy_nanny'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install deploy_nanny

## Usage

With an executable file called bin/babysit containing the following:
```ruby
#!/usr/bin/env ruby

require "deploy_nanny"
require "yaml"

environments        = YAML.load_file("environments.yml")
deploy_instructions = YAML.load_file("deploy_instructions.yml")
nannyrc             = YAML.load_file(".nannyrc")

DeployNanny.babysit(
  github_account: "yourgithubname",
  nannyrc: nannyrc,
  environments: environments,
  deploy_instructions: deploy_instructions,
)

```

Create a .nannyrc to specify were all your apps are stored.
This means you have to have every app nested in the same directory for Mrs. Doubtfire to work.

# .nannyrc
```
apps_directory: "/Users/username/app_folder"
```

##### Options
```bash
-h, --help                       Here are all the options Deploy Nanny takes
-n, --no-deploy                  Do not auto-deploy out-of-date apps
-s, --sleep=SLEEP                Time to sleep between sweeps in minutes.
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/deploy_nanny. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
package org.pebble.core;

/**
 * Interface used to access the mapping between an entry and the starting offset in bits of its encoded representation.
 */
public interface PebbleOffsetsStore {

    /**
     * Returns the offset of the start of the encoded representation of index-th entry.
     * @param index of entry.
     * @return offset in bits of the start of the encoded representation of index-th entry.
     */
    public long get(int index);

}


text:
using JetBrains.ReSharper.Feature.Services.Refactorings;

namespace VBSharper.Plugins.Refactorings.SharedToExtension
{
    public interface ISharedToExtensionWorkflowProvider : IRefactoringWorkflowProvider
    {

    }
}


text:
"""Exposures to KNX bus."""
from __future__ import annotations

from collections.abc import Callable

from xknx import XKNX
from xknx.devices import DateTime, ExposeSensor
from xknx.dpt import DPTNumeric
from xknx.remote_value import RemoteValueSensor

from homeassistant.const import (
    CONF_ENTITY_ID,
    STATE_OFF,
    STATE_ON,
    STATE_UNAVAILABLE,
    STATE_UNKNOWN,
)
from homeassistant.core import Event, HomeAssistant, State, callback
from homeassistant.helpers.event import async_track_state_change_event
from homeassistant.helpers.typing import ConfigType, StateType

from .const import KNX_ADDRESS
from .schema import ExposeSchema

@callback
def create_knx_exposure(
    hass: HomeAssistant, xknx: XKNX, config: ConfigType
) -> KNXExposeSensor | KNXExposeTime:
    """Create exposures from config."""
    address = config[KNX_ADDRESS]
    expose_type = config[ExposeSchema.CONF_KNX_EXPOSE_TYPE]
    attribute = config.get(ExposeSchema.CONF_KNX_EXPOSE_ATTRIBUTE)
    default = config.get(ExposeSchema.CONF_KNX_EXPOSE_DEFAULT)

    exposure: KNXExposeSensor | KNXExposeTime
    if (
        isinstance(expose_type, str)
        and expose_type.lower() in ExposeSchema.EXPOSE_TIME_TYPES
    ):
        exposure = KNXExposeTime(xknx, expose_type, address)
    else:
        entity_id = config[CONF_ENTITY_ID]
        exposure = KNXExposeSensor(
            hass,
            xknx,
            expose_type,
            entity_id,
            attribute,
            default,
            address,
        )
    return exposure

class KNXExposeSensor:
    """Object to Expose Home Assistant entity to KNX bus."""

    def __init__(
        self,
        hass: HomeAssistant,
        xknx: XKNX,
        expose_type: int | str,
        entity_id: str,
        attribute: str | None,
        default: StateType,
        address: str,
    ) -> None:
        """Initialize of Expose class."""
        self.hass = hass
        self.xknx = xknx
        self.type = expose_type
        self.entity_id = entity_id
        self.expose_attribute = attribute
        self.expose_default = default
        self.address = address
        self._remove_listener: Callable[[], None] | None = None
        self.device: ExposeSensor = self.async_register()
        self._init_expose_state()

    @callback
    def async_register(self) -> ExposeSensor:
        """Register listener."""
        if self.expose_attribute is not None:
            _name = self.entity_id + "__" + self.expose_attribute
        else:
            _name = self.entity_id
        device = ExposeSensor(
            self.xknx,
            name=_name,
            group_address=self.address,
            value_type=self.type,
        )
        self._remove_listener = async_track_state_change_event(
            self.hass, [self.entity_id], self._async_entity_changed
        )
        return device

    @callback
    def _init_expose_state(self) -> None:
        """Initialize state of the exposure."""
        init_state = self.hass.states.get(self.entity_id)
        state_value = self._get_expose_value(init_state)
        self.device.sensor_value.value = state_value

    @callback
    def shutdown(self) -> None:
        """Prepare for deletion."""
        if self._remove_listener is not None:
            self._remove_listener()
            self._remove_listener = None
        self.device.shutdown()

    def _get_expose_value(self, state: State | None) -> StateType:
        """Extract value from state."""
        if state is None or state.state in (STATE_UNKNOWN, STATE_UNAVAILABLE):
            value = self.expose_default
        else:
            value = (
                state.state
                if self.expose_attribute is None
                else state.attributes.get(self.expose_attribute, self.expose_default)
            )
        if self.type == "binary":
            if value in (1, STATE_ON, "True"):
                return True
            if value in (0, STATE_OFF, "False"):
                return False
        if (
            value is not None
            and isinstance(self.device.sensor_value, RemoteValueSensor)
            and issubclass(self.device.sensor_value.dpt_class, DPTNumeric)
        ):
            return float(value)
        return value

    async def _async_entity_changed(self, event: Event) -> None:
        """Handle entity change."""
        new_state = event.data.get("new_state")
        if (new_value := self._get_expose_value(new_state)) is None:
            return
        old_state = event.data.get("old_state")
        # don't use default value for comparison on first state change (old_state is None)
        old_value = self._get_expose_value(old_state) if old_state is not None else None
        # don't send same value sequentially
        if new_value != old_value:
            await self._async_set_knx_value(new_value)

    async def _async_set_knx_value(self, value: StateType) -> None:
        """Set new value on xknx ExposeSensor."""
        if value is None:
            return
        await self.device.set(value)

class KNXExposeTime:
    """Object to Expose Time/Date object to KNX bus."""

    def __init__(self, xknx: XKNX, expose_type: str, address: str) -> None:
        """Initialize of Expose class."""
        self.xknx = xknx
        self.expose_type = expose_type
        self.address = address
        self.device: DateTime = self.async_register()

    @callback
    def async_register(self) -> DateTime:
        """Register listener."""
        return DateTime(
            self.xknx,
            name=self.expose_type.capitalize(),
            broadcast_type=self.expose_type.upper(),
            localtime=True,
            group_address=self.address,
        )

    @callback
    def shutdown(self) -> None:
        """Prepare for deletion."""
        self.device.shutdown()


text:
react-css-devices
==================

React component for CSS Devices in your project.
*(NOTE: This project is still work in progress. Marvel Devices are however ready to use. More devices and customization coming soon.)*

![macbook](https://raw.githubusercontent.com/aswinckr/react-css-devices/master/lib/screenshots/macbook.png "Macbook made with CSS")

Installation
------------
`npm install --save react-css-devices`

**Important Note : You need to have a `css-loader` installed. for example with [webpack](https://github.com/webpack-contrib/css-loader)**

Props
-----
| Props  | Cool  | Prop Values |
| :------------- | :----- | :------ |
| `deviceName` *(String)*  | Name of the device | `iphone6`, `iphone6plus`, `iphone5s`, `iphone5c`, `ipad`, `iphone4s`, `nexus5`, `s5`, `htc-one`, `macbook`
| `color` *(String)*  |   Color ( only supported by `iphone5c` for now ) | `white`, `black`, `red`, `yellow`, `green`, `blue`
| `orientation` *(String)*  | Landscape or portrait | `landscape`, `portrait`
| `transform` *(Integer)*  | Scale the device to your size ( Size chart below ) | default is `1`

Size Chart
----------
| Device  | 1x Portrait Size ( Device )  | 1x Portrait Size ( Screen )
| :------------- | :----- | :----- |
| `iphone6`  | 423x887 | 375x667
| `iphone6plus`  | 466x960 | 414x736
| `iphone5s`  | 364x778 | 320x568
| `iphone5c`  | 364x778 | 320x568
| `ipad`  | 626x948 | 576x768
| `iphone4s`  | 374x738 | 320x480
| `nexus5`  | 350x668 | 320x568
| `s5`  | 356x688 | 320x568
| `htc-one`  | 370x740 | 320x568
| `macbook`  | 1048x720 | 960x600

Examples
--------
To create a black iphone in landscape you do
```
import { MarvelDevices } from 'react-css-devices'

<MarvelDevices deviceName={"iphone6"}
               color={"black"}
               orientation={"landscape"}
               transform={0.5}>

    {/*Paste your content here*/}
    <img src={"http://via.placeholder.com/667x375"}/>

</MarvelDevices>
```
Credits
-------
[Marvel devices](https://marvelapp.github.io/devices.css/)

Author
------
 Any suggestions / improvements / critics are welcome. I'm available on [@aswinckr](https://twitter.com/aswinckr)


text:
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require('@angular/core');
var bproxy_service_1 = require('./bproxy.service');
var bproxy_report_1 = require('./bproxy-report');
var StepTwoComponent = (function () {
    function StepTwoComponent(bproxyService) {
        this.bproxyService = bproxyService;
        this.report = bproxy_report_1.MOCK_REPORT;
    }
    ;
    StepTwoComponent = __decorate([
        core_1.Component({
            moduleId: module.id,
            selector: 'stepTwo',
            styleUrls: ['step-two.component.css'],
            templateUrl: 'step-two.component.html'
        }),
        __metadata('design:paramtypes', [bproxy_service_1.BProxyService])
    ], StepTwoComponent);
    return StepTwoComponent;
}());
exports.StepTwoComponent = StepTwoComponent;
//# sourceMappingURL=step-two.component.js.map


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Coprinus sororius P. Karst.

### Remarks
null


text:
layout: page
title: Joyce Productions Conference
date: 2016-05-24
author: Billy Prince
tags: weekly links, java
status: published
summary: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 05/03/2016
  endDate: 05/05/2016
  ctyhocn: CSBHHHX
  groupCode: JPC
published: true
---
Duis posuere ex sem, ac ullamcorper orci convallis quis. Donec tincidunt ante dolor, vitae luctus urna elementum sit amet. Maecenas porta vel erat ac semper. Morbi pulvinar malesuada neque, et fermentum erat rhoncus id. Integer id tristique nibh, at molestie sapien. Donec facilisis commodo ullamcorper. Sed ultricies lorem quis nulla elementum auctor.
Fusce hendrerit neque augue, eget rutrum lorem iaculis sit amet. Etiam eu metus consectetur, molestie mauris dignissim, gravida arcu. Nam ut eros ac est maximus hendrerit vel eu quam. Vivamus commodo congue efficitur. Ut fringilla eget tellus id pharetra. Ut sollicitudin eleifend felis in ornare. Phasellus dictum nec est non efficitur. Praesent sodales felis ut ligula ullamcorper dignissim. Aenean interdum aliquam elit, et auctor arcu. Sed rutrum, eros non finibus pulvinar, mauris erat dignissim nisl, sed pharetra enim urna in eros. Aenean risus ex, suscipit nec justo sollicitudin, tristique rutrum metus. Fusce a ante nunc. In malesuada purus in commodo molestie. Integer ullamcorper ligula est. Praesent et facilisis lorem.

1 Aenean vitae enim porttitor, dignissim nunc eu, tempor turpis
1 Integer pretium sem nec mollis molestie
1 Cras malesuada velit eget lorem blandit, non tempus ante tristique
1 Donec id magna non risus cursus euismod.

Suspendisse tortor mauris, mollis eget aliquet sit amet, imperdiet ut nibh. Curabitur ultricies diam sapien, eget pulvinar leo maximus sit amet. Phasellus aliquet feugiat dui, nec faucibus felis ullamcorper porta. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam rutrum commodo ante et ullamcorper. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac nulla at tellus laoreet vehicula. Maecenas enim nisl, malesuada quis lacus a, semper sollicitudin velit. Nulla facilisi. Cras tempus ligula a aliquam lobortis.


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
		http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

	<changeSet author="seava" id="TBL-AD_TARGET_RULE">
		<createTable tableName="AD_TARGET_RULE">
			<column name="ACTIVE" type="int(1)">
				<constraints nullable="false"/>
			</column>
			<column name="CLIENTID" type="varchar(64)">
				<constraints nullable="false"/>
			</column>
			<column name="CREATEDAT" type="datetime">
				<constraints nullable="false"/>
			</column>
			<column name="CREATEDBY" type="varchar(32)">
				<constraints nullable="false"/>
			</column>
			<column name="ID" type="varchar(64)">
				<constraints nullable="false"/>
			</column>
			<column name="MODIFIEDAT" type="datetime">
				<constraints nullable="false"/>
			</column>
			<column name="MODIFIEDBY" type="varchar(32)">
				<constraints nullable="false"/>
			</column>
			<column name="NOTES" type="text"/>
			<column name="REFID" type="varchar(64)">
				<constraints nullable="false"/>
			</column>
			<column name="SOURCEREFID" type="varchar(64)">
				<constraints nullable="false"/>
			</column>
			<column name="TARGETALIAS" type="varchar(255)">
				<constraints nullable="false"/>
			</column>
			<column name="TARGETTYPE" type="varchar(255)">
				<constraints nullable="false"/>
			</column>
			<column name="VERSION" type="bigint(10)"/>
		</createTable>
	</changeSet>

	<changeSet author="seava" id="PK-AD_TARGET_RULE">
		<addPrimaryKey
			constraintName="PK_AD_TARGET_RULE"
			tableName="AD_TARGET_RULE"
			columnNames="ID"/>
	</changeSet>

</databaseChangeLog>


text:
import flask
import httpexceptor
from oslo_utils import uuidutils

from enamel.api import version

REQUEST_ID_HEADER = 'Openstack-Request-ID'

def set_request_id():
    """A before_request function to set required-id."""
    flask.g.request_id = uuidutils.generate_uuid()

def send_request_id(response):
    """An after_request_function to send request-id header."""
    response.headers[REQUEST_ID_HEADER] = flask.g.request_id
    return response

def set_version():
    """A before_request function to set microversion."""
    try:
        flask.g.request_version = version.extract_version(
            flask.request.headers)
    except ValueError as exc:
        flask.g.request_version = version.parse_version_string(
            version.min_version_string())
        raise httpexceptor.HTTP406('unable to use provided version: %s' % exc)

def send_version(response):
    """An after_request function to send microversion headers."""
    vary = response.headers.get('vary')
    header = version.Version.HEADER
    value = flask.g.get('request_version')
    if value:
        if vary:
            response.headers['vary'] = '%s, %s' % (vary, header)
        else:
            response.headers['vary'] = header
        response.headers[header] = '%s %s' % (version.SERVICE_TYPE, value)
    return response


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Version.DotSequence
</TITLE>

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.sun.pkg.client

Class Version.DotSequence

java.lang.Object
  com.sun.pkg.client.Version.DotSequence

All Implemented Interfaces:
java.lang.Comparable<Version.DotSequence>

Enclosing class:
Version

public static class Version.DotSequence
extends java.lang.Object
implements java.lang.Comparable<Version.DotSequence>

The DotSequence class represents the x.y.z parts of a Version object.

Method Summary

 int
compareTo(Version.DotSequence d)

 boolean
equals(java.lang.Object v)

          Compare two DotSequences for equality.

 int
hashCode()

 boolean
isSubsequence(Version.DotSequence d)

          Determine if this DotSequence is a subsequence of another.

 boolean
matches(Version.DotSequence d)

 java.lang.String
toString()

          Returns a string form of the DotSequence.

Methods inherited from class java.lang.Object

getClass, notify, notifyAll, wait, wait, wait

Method Detail

equals

public boolean equals(java.lang.Object v)

Compare two DotSequences for equality.

Overrides:
equals in class java.lang.Object

Returns:
True if the two DotSequences are equal

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(Version.DotSequence d)

Specified by:
compareTo in interface java.lang.Comparable<Version.DotSequence>

matches

public boolean matches(Version.DotSequence d)

isSubsequence

public boolean isSubsequence(Version.DotSequence d)

Determine if this DotSequence is a subsequence of another.

 A Dotsequence is a subsequence of another if the other and this one
 have identical components, up to the length of this sequence.

Parameters:
d - the Dotsequence to compare

Returns:
true if this DotSequence is a subsequence of d

toString

public java.lang.String toString()

Returns a string form of the DotSequence.

Overrides:
toString in class java.lang.Object

Returns:
a string representing the DotSequence.  This are the numbers of
 the Dotsequence separated by periods.

      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
package com.wilshion.headlinenews.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.wilshion.utillib.util.NetworkUtils;
import com.wilshion.utillib.util.NetworkUtils.NetworkType;
import java.util.ArrayList;

/**
 * Created by Wilshion on 2017/8/6 19:14.
 * [description : 监听网络 的广播]
 * [version : 1.0]
 */
public class NetReceiver extends BroadcastReceiver {
    public static final String NET_CHANGE_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
    private static ArrayList<OnNetWorkChangeListener> mListeners;

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals(NET_CHANGE_ACTION)) {
            NetworkType netType = NetworkUtils.getNetworkType();
            if (mListeners.size() > 0)
            /** 挨个通知*/
                for (OnNetWorkChangeListener handler : mListeners) {
                    handler.onNetWorkChanged(netType);
                }
        }
    }

    public void addListener(OnNetWorkChangeListener listener) {
        if (mListeners == null)
            mListeners = new ArrayList<>();
        mListeners.add(listener);
    }

    public interface OnNetWorkChangeListener {
        void onNetWorkChanged(NetworkType netType);
    }
}


text:
rm -rf timings_omp.dat
rm -rf timings_omp.png
rm -rf out_*.pgm
rm -rf out_*.bmp

cd ../../src # go there to compile
make omp
cd ../analysis/shell # return here to analyse

n_threads=4
for N in 128 256 512 1024 2048 4096 8192
do
    export OMP_NUM_THREADS=$n_threads
    echo "Running mandel_omp with $n_threads threads on a grid of size $N"
    ../../src/mandel_omp $N 200 >> timings_omp.dat
done

gnuplot << EOF
set terminal png
set output 'timings_omp.png'
set multiplot layout 1,1
set key off

set logscale x
set logscale y
set xlabel "N [-]"
set ylabel "time [s]"
plot "timings_omp.dat" using 1:7 with lp
EOF

open timings_omp.png


text:
'use strict'

/**
 * Dependencies
 * @ignore
 */
const path = require('path')
const glob = require('glob')

/**
 * Keys
 * @ignore
 */
const getKeys = (dir) => {
  let files = glob.sync(`${dir}/*.js`)
  let descriptors = files.map(file => {
    return {
      name: path.basename(file, '.js'),
      folder: path.dirname(file)
    }
  })

  return descriptors.reduce((state, descriptor) => {
    let { name, folder } = descriptor
    state[name] = require(path.join(folder, name))
    return state
  }, {})
}

/**
 * Export
 * @ignore
 */
module.exports = glob.sync(`${__dirname}/**/`)
  .filter(dir => dir !== `${__dirname}/`)
  .reduce((state, dir) => {
    let name = path.basename(dir)
    state[name] = getKeys(dir)
    return state
  }, {})