text:
from sikuli import *
from SikuliXRobotLibrary.locators import PatternFinder
from SikuliXRobotLibrary import utils
from keywordgroup import KeywordGroup

class _ElementKeywords(KeywordGroup):
    def __init__(self):
        self._pattern_finder = PatternFinder()

    # Public

    """***************************** MOUSE ACTIONS ************************************
    Performs mouse actions on matching pattern that will serve as locators.
    Search region or setROI() value is set to the application in focus as default.
    Locators or patterns must be any of the following format: <image.png>, <image.png> = <sensitivity from 0.00 to 0.99>, <string>
    For example:
    |  Click Pattern    pattern.png = 0.90  |
    |  Click Pattern    pattern.png         |
    |  Click Pattern    Password            |
    """

    def click_region(self):
        """Left-clicks the center x,y coordinate of a specified ROI or search region.

        This keyword must be paired with any of the following keywords:
        `Set Search Region To Target Screen`, `Set New Search Region In Active App`,
        `Set Search Region To Application`, `Set New Search Region In Target Screen` or
        `Set New Search Region In Application`.

        See also `Double Click Region`, `Right Click Region`, `Get Text In Search Region`, `Hover At Region`
        and `Highlight Region`.

        Example:
        | Set New Search Region In Active App | 10, 60, -20, -270 | # Sets offset values to a region of active app.            |
        | Click Region                        |                   | # Clicks the center of the specified ROI or search region. |
        """
        reg = self.get_last_matching_region()
        self._info("Clicking specified ROI or search region '%s'" % (reg))
        reg.click()

    def double_click_region(self):
        """Double-clicks the center x,y coordinate of a specified ROI or search region.

        This keyword must be paired with any of the following keywords:
        `Set Search Region To Target Screen`, `Set New Search Region In Active App`,
        `Set Search Region To Application`, `Set New Search Region In Target Screen` or
        `Set New Search Region In Application`.

        See also `Click Region`, `Right Click Region`, `Get Text In Search Region`, `Hover At Region`
        and `Highlight Region`.

        Example:
        | Set New Search Region In Active App | 10, 60, -20, -270 | # Sets offset values to a region of active app.                   |
        | Double Click Region                 |                   | # Double-clicks the center of the specified ROI or search region. |
        """
        reg = self.get_last_matching_region()
        self._info("Double-clicking specified ROI or search region '%s'" % (reg))
        reg.doubleClick()

    def right_click_region(self):
        """Right-clicks the center x,y coordinate of a specified ROI or search region.

        This keyword must be paired with any of the following keywords:
        `Set Search Region To Target Screen`, `Set New Search Region In Active App`,
        `Set Search Region To Application`, `Set New Search Region In Target Screen` or
        `Set New Search Region In Application`.

        See also `Click Region`, `Double Click Region`, `Get Text In Search Region`, `Hover At Region`
        and `Highlight Region`.

        Example:
        | Set New Search Region In Active App | 10, 60, -20, -270 | # Sets offset values to a region of active app.                   |
        | Right Click Region                  |                   | # Right-clicks the center of the specified ROI or search region. |
        """
        reg = self.get_last_matching_region()
        self._info("Right-clicking specified ROI or search region '%s'" % (reg))
        reg.rightClick()

    def highlight_region(self, highlight_duration):
        """Highlights the specified ROI or search region for a specified ``highlight_duration`` in seconds.

        This keyword must be paired with any of the following keywords:
        `Set Search Region To Target Screen`, `Set New Search Region In Active App`,
        `Set Search Region To Application`, `Set New Search Region In Target Screen` or
        `Set New Search Region In Application`.

        See also `Click Region`, `Double Click Region`, `Right Click Region`, `Hover At Region` and `Get Text In Search Region`.

        Example:
        | Set New Search Region In Active App | 10, 60, -20, -270 | # Sets offset values to a region of active app.                 |
        | Highlight Region                    | 2                 | # Highlights the specified ROI or search region. for 2 seconds. |
        """
        reg = self.get_last_matching_region()
        self._info("Highlighting specified ROI or search region '%s' for '%s' seconds" % (reg, highlight_duration))
        reg.highlight(float(highlight_duration))

    def hover_at_region(self):
        """Hovers mouse pointer at center x,y coordinate of a specified ROI or search region.

        This keyword must be paired with any of the following keywords:
        `Set Search Region To Target Screen`, `Set New Search Region In Active App`,
        `Set Search Region To Application`, `Set New Search Region In Target Screen` or
        `Set New Search Region In Application`.

        See also `Double Click Region`, `Right Click Region`, `Get Text In Search Region`
        and `Highlight Region`.

        Example:
        | Set New Search Region In Active App | 10, 60, -20, -270 | # Sets offset values to a region of active app. |
        | Hover At Region                     |                   | # Hovers mouse pointer at the center of specified ROI or search region. |
        """
        reg = self.get_last_matching_region()
        self._info("Hovering at specified ROI or search region '%s'" % (reg))
        reg.hover()

    def type_text_at_region(self, text):
        """Types `text` at x,y coordinate of a specified ROI or search region.

        This keyword must be paired with any of the following keywords:
        `Set Search Region To Target Screen`, `Set New Search Region In Active App`,
        `Set Search Region To Application`, `Set New Search Region In Target Screen` or
        `Set New Search Region In Application`.

        See also `Paste Text At Region`.

        Example:
        | Set New Search Region In Active App | 10, 60, -20, -270 | # Sets offset values to a region of active app. |
        | Type Text At Region                 |  Hello World!     | # Types 'Hello World!' at specified ROI or search region. |
        """
        text = text.strip()
        reg = self.get_last_matching_region()
        self._info("Typing text '%s' at specified ROI or search region '%s'" % (text, reg))
        reg.type(text)

    def paste_text_at_region(self, text):
        """Pastes `text` at x,y coordinate of a specified ROI or search region.

        This keyword must be paired with any of the following keywords:
        `Set Search Region To Target Screen`, `Set New Search Region In Active App`,
        `Set Search Region To Application`, `Set New Search Region In Target Screen` or
        `Set New Search Region In Application`.

        See also `Type Text At Region`.

        Example:
        | Set New Search Region In Active App | 10, 60, -20, -270 | # Sets offset values to a region of active app.            |
        | Paste Text At Region                | Hello World!      | # Pastes 'Hello World!' at specified ROI or search region. |
        """
        text = text.strip()
        reg = self.get_last_matching_region()
        self._info("Pasting text '%s' at specified ROI or search region '%s'" % (text, reg))
        reg.paste(text)

    def click_last_match(self):
        """Left-clicks the center x,y coordinate of a last match.

        See also `Double Click Last Match`, `Right Click Last Match`, `Hover At Last Match`
        and `Highlight Last Match`.

        Example:
        | Click Last Match  | # Clicks the last matched pattern. |
        """
        self._info("Clicking last matched pattern.")
        click()

    def double_click_last_match(self):
        """Double-clicks the center x,y coordinate of a last match.

        See also `Click Last Match`, `Right Click Last Match`, `Hover At Last Match`
        and `Highlight Last Match`.

        Example:
        | Double Click Last Match  | # Double-clicks the last matched pattern. |
        """
        self._info("Double-clicking last matched pattern.")
        doubleClick()

    def right_click_last_match(self):
        """Right-clicks the center x,y coordinate of a last match.

        See also `Click Last Match`, `Double Click Last Match`, `Hover At Last Match`
        and `Highlight Last Match`.

        Example:
        | Right Click Last Match  | # Right-clicks the last matched pattern. |
        """
        self._info("Right-clicking last matched pattern.")
        rightClick()

    def hover_at_last_match(self):
        """Double-clicks the center x,y coordinate of a last match.

        See also `Click Last Match`, `Double Click Last Match`, `Right Click Last Match`, `Hover At Last Match`
        and `Highlight Last Match`.

        Example:
        | Hover At Last Match  | # Hovers at the last matched pattern. |
        """
        self._info("Hovering at last matched pattern.")
        hover()

    def click_pattern(self, pattern):
        """Perform a mouse `click` on the click point using the `left` button.
        Click point is at the `center` of the element identified by ``pattern``.

        Key attributes for arbitrary patterns are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.
        """
        self._info("Clicking element '%s'." % pattern)
        self._pattern_find(pattern, None, None).click()

    def click_pattern_at_coordinates(self, pattern, xoffset, yoffset):
        """Perform a mouse `click` on the click point using the `left` button.
        Click point is at `x/y` coordinates of the element identified by ``pattern``.

        Key attributes for arbitrary patterns are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.
        """
        self._info("Click element '%s' in coordinates '%s', '%s'." % (pattern, xoffset, yoffset))
        self._pattern_find(pattern, xoffset, yoffset).click()

    def right_click_pattern(self, pattern):
        """Perform a mouse `click` on the click point using the `right` button.
        Click point is at the `center` of the element identified by ``pattern``.

        Key attributes for arbitrary patterns are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.
        """
        self._info("Right-clicking element '%s'." % pattern)
        self._pattern_find(pattern, None, None).rightClick()

    def right_click_pattern_at_coordinates(self, pattern, xoffset, yoffset):
        """Perform a mouse `click` on the click point using the `right` button.
        Click point is at `x/y` coordinates of the element identified by ``pattern``.

        Key attributes for arbitrary patterns are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.
        """
        self._info("Right-clicking element '%s' in coordinates '%s', '%s'." % (pattern, xoffset, yoffset))
        self._pattern_find(pattern, xoffset, yoffset).rightClick()

    def double_click_pattern(self, pattern):
        """Perform a mouse `double-click` on the click point using the `left` button.
        Click point is at the `center` of the element identified by ``pattern``.

        Key attributes for arbitrary patterns are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.
        """
        self._info("Double-clicking element '%s'." % pattern)
        self._pattern_find(pattern, None, None).doubleClick()

    def double_click_pattern_at_coordinates(self, pattern, xoffset, yoffset):
        """Perform a mouse `double-click` on the click point using the `left` button.
        Click point is at `x/y` coordinates of the element identified by ``pattern``.

        Key attributes for arbitrary patterns are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.
        """
        self._info("Double-clicking element '%s' in coordinates '%s', '%s'." % (pattern, xoffset, yoffset))
        self._pattern_find(pattern, xoffset, yoffset).doubleClick()

    def highlight_pattern(self, pattern, highlight_duration):
        """Highlight element identified by ``pattern`` for a specified ``highlight_duration`` in seconds.

        Key attributes for arbitrary ``patterns`` are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.

        Example:
        | Highlight Pattern | pattern.png = 0.90 | 2   | This is a sample text. | # Type a text in element identified by pattern.png |
        """
        self._info("Highlighting element '%s' for '%s' second(s)." % (pattern, highlight_duration))
        self._pattern_find(pattern, None, None).highlight(float(highlight_duration))

    def hover_at_pattern(self, pattern):
        """Hover mouse pointer at center of element identified by ``pattern``.

        Key attributes for arbitrary ``patterns`` are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.
        """
        self._info("Hovering at element '%s'." % pattern)
        self._pattern_find(pattern, None, None).hover()

    def hover_at_pattern_at_coordinates(self, pattern, xoffset, yoffset):
        """Hover mouse pointer at `x/y` coordinates of the element identified by ``pattern``.

        Key attributes for arbitrary ``patterns`` are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.
        """
        self._info("Hovering at element '%s' in coordinates '%s', '%s'." % (pattern, xoffset, yoffset))
        self._pattern_find(pattern, xoffset, yoffset).hover()

    def move_mouse_at_coordinates(self, xoffset, yoffset):
        """Move mouse cursor coordinates at ``x/y`` coordinates of the `screen`.
        """
        self._info("Moving mouse at coordinates '%s', '%s'." % (xoffset, yoffset))
        mouseMove(int(xoffset), int(yoffset))

    def mouse_button_down(self, mouse_button):
        """Press the ``left`` mouse button `down`.
        Must be paired with `Mouse Button Up` keyword.
        """
        self._info("Mouse down at, '%s' button." % (mouse_button))
        mouseDown(self._mouse_button(mouse_button))

    def mouse_button_up(self, mouse_button):
        """Release the mouse button previously pressed.
        Must be paired with `Mouse Button Down` keyword.
        """
        self._info("Mouse up at, '%s' button." % (mouse_button))
        mouseUp(self._mouse_button(mouse_button))

    def scroll_from_pattern(self, pattern, scroll):
        """Scroll up or down as specified by the `scroll step` at center of the element identified by ``pattern``.
        Key attributes for arbitrary ``patterns`` are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.

        Examples:
        | Scroll From Pattern | Up = 10   | # Scroll up 10 steps. |
        | Scroll From Pattern | Down = 10 | # Scroll down 10 steps. |
        """
        self.hover_at_pattern(pattern)
        self._info("Scrolling '%s' in pattern '%s'." % (scroll, pattern))
        self._scroll_direction_and_steps_from_pattern(pattern, scroll, None, None)

    def scroll_from_pattern_at_coordinates(self, pattern, scroll, xoffset, yoffset):
        """Scroll up or down as specified by the `scroll` step at `x/y` coordinates of the element identified by ``pattern``.

        Key attributes for arbitrary ``patterns`` are `images` which is advisably in PNG format or `strings`.
        See `introduction` for details about locating elements.

        Examples:
        | Scroll From Pattern At Coordinates | pattern.png = 0.80 | Up = 10   | # Scroll up 10 steps.   |
        | Scroll From Pattern At Coordinates | pattern.png = 0.80 | Down = 10 | # Scroll down 10 steps. |
        """
        self.hover_at_pattern_at_coordinates(pattern, xoffset, yoffset)
        self._info("Scrolling '%s' in pattern '%s'  at coordinates '%s', '%s'." % (scroll, pattern, xoffset, yoffset))
        self._scroll_direction_and_steps_from_pattern(pattern, scroll, xoffset, yoffset)

    def scroll_x_steps(self, scroll):
        """Scroll up or down as specified by the `scroll` step.

        This keyword must be paired with `Hover At Pattern` in order to execute scrolling action within the region.
        Examples:
        | Hover At Pattern | pattern.png | # Hover at element identified by pattern.png |
        | Scroll X Steps   | Up = 10     | # Scroll up 10 steps.                        |
        | Scroll X Steps   | Down = 10   | # Scroll down 10 steps.                      |
        """
        self._info("Scrolling '%s'." % (scroll))
        self._scroll_direction_and_steps(scroll)

    """************************** MOUSE ACTIONS DRAG AND DROP *****************************"""
    def drag_pattern(self, pattern):
        """`Drag Pattern` and `Drop At Pattern` keywords must be used in pairs to complete a drag and drop action.

        Examples:
        | Drag Pattern    | pattern.png = 0.90 | # Drag element identified by pattern.png    |
        | Drop At Pattern | pattern.png = 0.90 | # Drag at element identified by pattern.png |
        """
        self._info("Dragging element '%s'." % pattern)
        drag(self._pattern_find(pattern, None, None))

    def drop_at_pattern(self, pattern):
        """`Drag Pattern` and `Drop At Pattern` keywords must be used in pairs to complete a drag and drop action.

        Examples:
        | Drag Pattern    | pattern.png | # Drag element identified by pattern.png    |
        | Drop At Pattern | pattern.png | # Drag at element identified by pattern.png |
        """
        self._info("Dropping at element '%s'." % pattern)
        dropAt(self._pattern_find(pattern, None, None))

    def drag_pattern_in_coordinates(self, pattern, xoffset, yoffset):
        """Drag element at `x/y` coordinates of the element identified by ``pattern``.
        """
        self._info("Dragging element '%s' in coordinates '%s', '%s'." % (pattern, xoffset, yoffset))
        drag(self._pattern_find(pattern, xoffset, yoffset))

    def drop_pattern_at_coordinates(self, pattern, xoffset, yoffset):
        """Drop or release mouse button element at `x/y` coordinates of the element identified by ``pattern``.
        """
        self._info("Dropping element '%s' in coordinates '%s', '%s'." % (pattern, xoffset, yoffset))
        dropAt(self._pattern_find(pattern, xoffset, yoffset))

    def drag_and_drop_element(self, pattern1, pattern2):
        """Drag and drop an element identified by ``pattern1`` to another element identified by ``pattern2``.

        Example:
        | Drag and drop | pattern1.png = 0.90 | pattern2.png = 0.90 | # Drag element identified by pattern.png |
        """
        self._info("Performing drag and drop from element '%s' to element '%s'." % (pattern1, pattern2))
        dragDrop(self._pattern_find(pattern1, None, None), self._pattern_find(pattern2, None, None))

    """***************************** KEYBOARD ACTIONS ************************************"""
    def paste_text_in_pattern(self, pattern, text):
        """Paste a `text` in element identified by ``pattern``.

        Example:
        | Paste Text In Pattern | pattern.png = 0.90 | This is a sample text. | # Paste a text in element identified by pattern.png |
        """
        text = str(text)
        self._info("Pasting text '%s' in pattern '%s'." % (text, pattern))
        self._pattern_find(pattern, None, None).paste(text)

    def paste_text_in_pattern_at_coordinates(self, pattern, text, xoffset, yoffset):

        """Paste a `text` at `x/y` coordinates of the element identified by ``pattern``.
        Example:
        | Paste Text In Pattern | pattern.png = 0.90 | 30 | 30 | This is a sample text. | # Paste a text in x/y coordinates of element identified by pattern.png |
        """
        self._info("Pasting text '%s' in '%s'  at coordinates '%s', '%s'." % (text, pattern, xoffset, yoffset))
        self._pattern_find(pattern, xoffset, yoffset).paste(text)

    def type_text_in_pattern(self, pattern, text):
        """Type a `text` in element identified by ``pattern``.

        Example:
        | Type Text In Pattern | pattern.png = 0.90 | This is a sample text. | # Type a text in element identified by pattern.png |
        """
        text = str(text)
        self._info("Typing '%s' in pattern '%s'." % (text, pattern))
        self._pattern_find(pattern, None, None).type(text)

    def type_text_in_pattern_at_coordinates(self, pattern, text, xoffset, yoffset):
        """Type a `text` at `x/y` coordinates of the element identified by ``pattern``.

        Example:
        | Type Text In Pattern | pattern.png = 0.90 | 30 | 30 | This is a sample text. | # Type a text in x/y coordinates of element identified by pattern.png |
        """
        self._info("Typing text '%s' in '%s'  at coordinates '%s', '%s'." % (text, pattern, xoffset, yoffset))
        self._pattern_find(pattern, xoffset, yoffset).type(text)

    """***************************** READ TEXTS IN PATTERN ************************************
    Note: OCR tessdata should downloaded then put in a local directory
    For Windows, it should be put inside C:\Users\<user>\AppData\Roaming\Sikulix\SikulixTesseract
    Or: User must select the last two options in the SikuliX installation to install both the script and tesseract.
    """

    def get_text_in_pattern(self, pattern, search_location):
        """Returns the text in an ``area`` at a ``spatial location`` in reference to an element identified by ``pattern``

        Examples:
        | Get Text In Pattern | pattern.png | None        | # Returns the text within 300px left of element identified by pattern.png  |
        | Get Text In Pattern | pattern.png | left = 300  | # Returns the text within 300px left of element identified by pattern.png  |
        | Get Text In Pattern | pattern.png | right = 400 | # Returns the text within 400px right of element identified by pattern.png |
        | Get Text In Pattern | pattern.png | above = 500 | # Returns the text within 500px above of element identified by pattern.png |
        | Get Text In Pattern | pattern.png | below = 600 | # Returns the text within 600px below of element identified by pattern.png |
        """
        self._info("Getting texts in pattern at '%s' of pattern '%s'." % (search_location, pattern))
        return self._read_text_in_pattern(pattern, search_location)

    def get_text_in_search_region(self, search_location):
        """Returns the text from a specified ``search location``.

        This keyword must be paired with any of the following keywords:
        `Set Search Region To Target Screen`, `Set New Search Region In Active App`,
        `Set Search Region To Application`, `Set New Search Region In Target Screen` or
        `Set New Search Region In Application`.

        See also `Click Region`, `Double Click Region`, `Right Click Region`,
        and `Highlight Region`.

        Examples:
        | Set New Search Region In Active App | 10, 60, -20, -270 | # Sets offset values to a region of active app.        |
        | Get Text In Search Region           | region            | # Returns the text within the specified search region. |
        | Get Text In Search Region           | left 300          | # Returns the text within the specified search region. |
        | Get Text In Search Region           | right 400         | # Returns the text within the specified search region. |
        | Get Text In Search Region           | above 500         | # Returns the text within the specified search region. |
        """
        self._info("Getting texts from at '%s' of specified ROI." % (search_location))
        return self._read_text_in_region(search_location)

    """***************************** DO SOMETHING IN MATCHING PATTERNS IN ACTIVE WINDOW ************************************
    Keywords used when multiple patterns on screen is present.
    Search region or setROI() value is set to the application in focus as default.
    Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
    """

    def get_pattern_count(self, pattern):
        """Returns the count of elements identified by ``pattern``.

        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.
        """
        self._info("Getting count of pattern '%s'." % pattern)
        return len(self._get_all_patterns(pattern))

    def click_nth_pattern(self, pattern, pattern_index):
        """Perform a mouse ``click`` on the click point using the ``left`` button.

        Click point is at the `center` of the nth element identified by ``pattern``.
        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at maximum level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Example:
        | Click Nth Pattern | pattern.png = 0.99 | 3 | # Clicks the third instance of an element identified by pattern.png |
        """
        self._info("Clicking '%s'nth pattern '%s'." % (pattern_index, pattern))
        self._get_nth_pattern(pattern, pattern_index).click()

    def right_click_nth_pattern(self, pattern, pattern_index):
        """Perform a mouse ``click`` on the click point using the ``right`` button.

        Click point is at the `center` of the nth element identified by ``pattern``.
        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Example:
        | Right Click Nth Pattern | pattern.png = 0.99 | 4 | # Right-clicks the fourth instance of an element identified by pattern.png |
        """
        self._info("Clicking '%s'nth pattern '%s'." % (pattern_index, pattern))
        self._get_nth_pattern(pattern, pattern_index).rightClick()

    def double_click_nth_pattern(self, pattern, pattern_index):
        """Perform a mouse ``double-click`` on the click point using the ``left`` button.

        Click point is at the `center` of the nth element identified by ``pattern``.
        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Example:
        | Double Click Nth Pattern | pattern.png = 0.99 | 5 | # Double-clicks the fifth instance of an element identified by pattern.png |
        """

        self._info("Double-clicking '%s'nth pattern '%s'." % (pattern_index, pattern))
        self._get_nth_pattern(pattern, pattern_index).doubleClick()

    def hover_at_nth_pattern(self, pattern, pattern_index):
        """Hovers mouse pointer at the center the nth element identified by ``pattern``.

        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Example:
        | Hover At Nth Pattern | pattern.png = 0.99 | 7 | # Hovers mouse pointer the seventh instance of an element identified by pattern.png |
        """

        self._info("Hovering at '%s'nth pattern '%s'." % (pattern_index, pattern))
        self._get_nth_pattern(pattern, pattern_index).hover()

    def highlight_nth_pattern(self, pattern, pattern_index, highlight_duration):
        """Highlights the nth element identified by ``pattern`` for a specified `highlight_duration` in seconds.

        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Example:
        | Highlight Nth Pattern | pattern.png = 0.99 | 6   | 2   |
        # Highlights the sixth instance of an element identified by pattern.png for 2 seconds.

        """

        self._info("Highlighting '%s'nth pattern '%s'  for '%s' second(s)." % (pattern_index, pattern, highlight_duration))
        self._get_nth_pattern(pattern, pattern_index).highlight(highlight_duration)

    def drag_nth_pattern(self, pattern, pattern_index):
        """Drag the nth element identified by ``pattern``.
        `Drag Nth Pattern ` and `Drop At Nth Pattern ` keywords must be used in pairs to complete a drag and drop action.

        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Examples:
        | Drag Nth Pattern    | pattern.png = 0.99 | 1  | # Drags the first instance of an element identified by pattern.png   |
        | Drop At Nth Pattern | pattern.png = 0.99 | 13 | # Drops at the 13th instance of an element identified by pattern.png |
        """

        self._info("Dragging '%s'nth pattern '%s'." % (pattern_index, pattern))
        drag(self._get_nth_pattern(pattern, pattern_index))

    def drop_at_nth_pattern(self, pattern, pattern_index):
        """Drop at the nth element identified by ``pattern``.
        `Drag Nth Pattern ` and `Drop At Nth Pattern ` keywords must be used in pairs to complete a drag and drop action.

        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Examples:
        | Drag Nth Pattern    | pattern.png = 0.99 | 13  | # Drags the 13th instance of an element identified by pattern.png   |
        | Drop At Nth Pattern | pattern.png = 0.99 | 1   | # Drops at the first instance of an element identified by pattern.png |
        """

        self._info("Dropping at '%s'nth pattern '%s'." % (pattern_index, pattern))
        dropAt(self._get_nth_pattern(pattern, pattern_index))

    def drag_and_drop_from_nth_pattern(self, pattern1, pattern1_index, pattern2, pattern2_index):
        """Drag and drop an nth element identified by ``pattern1`` to another nth element identified by ``pattern2``.

        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Examples:
        | Drag and drop | pattern1.png = 0.90 | 1 | pattern2.png = 0.90 | 2 | # Drag and drop the first instance of pattern1.png to the 2nd instance of pattern2.png |
        | Drag and drop | pattern.png = 0.90  | 3 | pattern.png = 0.90  | 4 | # Drag and drop the third instance to the fourth instance of pattern.png |
        """

        self._info("Performing drag and drop from element '%s' to element '%s'." % (pattern1, pattern2))
        dragDrop(self._get_nth_pattern(pattern1, pattern1_index),
                 self._get_nth_pattern(pattern2, pattern2_index))

    def paste_text_in_nth_pattern(self, pattern, pattern_index, text):
        """Paste a `text` at `x/y` coordinates of the element identified by ``pattern``.

        Example:
        | Type Text In Pattern | pattern.png = 0.90 | This is a sample text. | # Type a text in element identified by pattern.png |
        """

        self._info("Pasting text '%s' in '%s'nth pattern '%s'." % (text, pattern_index, pattern))
        self._get_nth_pattern(pattern, pattern_index).type(text)

    def type_text_in_nth_pattern(self, pattern, pattern_index, text):
        """Type a `text` in nth element identified by ``pattern``.

        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Example:
        | Type Text At Nth Pattern | pattern.png = 0.90 | 3 | This is a sample text. | # Type a text in third element identified by pattern.png |
        """

        self._info("Typing text '%s' in '%s'nth pattern '%s'." % (text, pattern_index, pattern))
        self._get_nth_pattern(pattern, pattern_index).type(text)

    def get_text_in_nth_pattern(self, pattern, pattern_index, search_location):
        """Return the `text` in nth element identified by ``pattern``.

        This Keyword is useful when multiple patterns on screen is present.
        Search region or setROI() value is set to the application in focus as default.
        Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections.
        Search for matching patterns is set to top > down > left > right.

        Examples:
        | Get Text In Nth Pattern At Location And Area | pattern.png | 1 | None        | # Returns the text of the first instance of pattern.png                     |
        | Get Text In Nth Pattern At Location And Area | pattern.png | 1 | left = 300  | # Returns the text within 300px left of the first instance of pattern.png   |
        | Get Text In Nth Pattern At Location And Area | pattern.png | 2 | right = 400 | # Returns the text within 400px right of the second instance of pattern.png |
        | Get Text In Nth Pattern At Location And Area | pattern.png | 3 | above = 500 | # Returns the text within 500px above of the third instance of pattern.png  |
        | Get Text In Nth Pattern At Location And Area | pattern.png | 5 | below = 600 | # Returns the text within 600px below of the fifth instance of pattern.png  |
        """

        self._info("Getting texts in '%s' nth pattern at '%s' of pattern '%s'." % (pattern_index, search_location, pattern))
        pattern = self._get_nth_pattern(pattern, pattern_index)
        return self._read_text(pattern, search_location)

    # Private
    """***************************** Internal methods ************************************"""
    def _pattern_find(self, pattern, xoffset, yoffset):
        """Finds ``pattern`` on search region set by active application.
        To do: dynamic search region where user can set the search region to either, active application, specific region or screen
        """

        matching_pattern = self._pattern_finder._find_pattern(pattern)
        try:
            if (xoffset != None or yoffset != None):
                xoffset = int(xoffset); yoffset = int(yoffset)
                element = find(matching_pattern.targetOffset(xoffset, yoffset))
            else:
                element = find(matching_pattern)
            return element
        except FindFailed, err:
            raise AssertionError("No matching pattern: %s found on screen." % (pattern))

    def _scroll_direction_and_steps(self, scroll):
        (scroll_direction, scroll_steps) = self._pattern_finder._parse_scroll_details(scroll)
        if (scroll_direction == "up"):
            scroll_direction = WHEEL_UP
        elif (scroll_direction == "down"):
            scroll_direction = WHEEL_DOWN
        return wheel(scroll_direction, scroll_steps)

    def _scroll_direction_and_steps_from_pattern(self, pattern, scroll, xoffset, yoffset):
        (scroll_direction, scroll_steps) = self._pattern_finder._parse_scroll_details(scroll)
        if (scroll_direction == "up"):
            scroll_direction = WHEEL_UP
        elif (scroll_direction == "down"):
            scroll_direction = WHEEL_DOWN
        return self._pattern_find(pattern, xoffset, yoffset).wheel(scroll_direction, scroll_steps)

    def _read_text_in_pattern(self, pattern, search_location):
        (location, search_area) = self._parse_spatial_location(search_location)
        pattern = self._pattern_find(pattern, None, None)
        if (location == "left"):
            pattern_text = pattern.left(search_area).text()
        elif (location == "right"):
            pattern_text = pattern.right(search_area).text()
        elif (location == "above"):
            pattern_text = pattern.above(search_area).text()
        elif (location == "below"):
            pattern_text = pattern.below(search_area).text()
        else:
            pattern_text = pattern.text()
        return pattern_text

    def _read_text_in_region(self, search_location):
        (location, search_area) = self._parse_spatial_location(search_location)
        if (location == "left"):
            region_text = left(search_area).text()
        elif (location == "right"):
            region_text = right(search_area).text()
        elif (location == "above"):
            region_text = above(search_area).text()
        elif (location == "below"):
            region_text = below(search_area).text()
        elif (location == "region"):
            region_text = Region(getX(), getY(), getW(), getH()).text()
        else:
            region_text = text()
        return region_text

    def _parse_spatial_location(self, search_location):
        assert search_location is not None and len(search_location) > 0
        search_location = search_location.lower()

        if (search_location == "region") :
            location = None
            search_area = None
        else:
            search_location = search_location.partition('=')
            location = search_location[0].strip()
            search_area = int(search_location[2].strip())
        return (location, search_area)

    def _mouse_button(self, mouse_button):
        assert mouse_button is not None and len(mouse_button) > 0
        mouse_button = mouse_button.lower()
        if(mouse_button == "left"):
            mouse_button = Button.LEFT
        elif(mouse_button == "middle"):
            mouse_button = Button.MIDDLE
        elif(mouse_button == "right"):
            mouse_button = Button.RIGHT
        return mouse_button

    def _set_image_order(self, match):
        return match.x, match.y

    def _get_all_patterns(self, pattern):
        list_of_patterns = []; sorted_patterns = []
        try:
            found_patterns =  findAll(self._pattern_finder._find_pattern(pattern))
            while found_patterns.hasNext():
                list_of_patterns.append(found_patterns.next())
            sorted_patterns = sorted(list_of_patterns, key=self._set_image_order)
            return sorted_patterns
        except FindFailed, err:
            AssertionError("No matching pattern(s): %s found on screen." % (pattern))

    def _get_nth_pattern(self, pattern, pattern_index):
        pattern_index = int(pattern_index) - 1
        nth_pattern = self._get_all_patterns(pattern)[pattern_index]
        return nth_pattern

redpajama_set_name: RedPajamaGithub


A co-operative, tactical 1-4 player game based on the Jagged Alliance series. Lead, train and gear up your mercs to take back Arulco!German Rules Added!
889 backers pledged €65,802 to help bring this project to life.
we have finally managed to get a new sample of the box and we have a good news/bad news situation, but mostly good news.
Printing, shipping, playing! German Rulebook!
Minis are here and rule-book Sneak Peek!
a lot of you have complained about high shipping costs and wonder how these are calculated and why they are so high.
hope you got through summer and now that it is getting a bit cooler, it's time to turn to more in-house activities...like board gaming.
Happy New Year - We need your vote on BGG!
New Features: HQ cards and non-linear campaign!
Pledge manager, final merc roster announced and BGG votes needed!
THIS IS GREAT! You guys are the best!
12 hours to the finish line. 12 votes to make it onto the list!
100% happy and wildcard vote is on!
We are getting closer! 91% and counting...Thank you all for the continued support!
we had a full day today at SPIEL, demoing 10 hours straight with barely a toilet break. Great fun!
OK, we are at 60% funding and we have unlocked another social goal, so you will have another ally to choose from! Let's keep this going!!!


Nelly De Vuyst BioAcne, an innovative and high-performance line certified organic by COSMOS® and Ecocert®. A reference in organic products, without aggressive agents, for oily and acne prone skin. Anti-recurrence formulas dedicated to durably control and prevent visible symptoms of acne such as papules, pustules, excess sebum, blackheads and acne scars.


Our Digital World uses a contemporary approach to traditional computer concepts learning by integrating text and engaging technologies. It connects concepts learning with the way individuals use today's various online technology through a web-centric experience. Students view videos, play with interactive hands-on tools, connect with their classmates through blogs and wikis, and discover where technology is headed by watching videos online.
Cirrus provides access to all the Our Digital World content, delivered in a series of scheduled assignments that report to a grade book to track student progress and achievement.
The chapter introduction activities establish the learning objectives for the chapter and provide a starting point for class discussion.
Take a Survey Activities invite students to answer a few questions on a topic related to the chapter.
Technology in Your Future Videos explore cutting edge technologies and computing concepts in videos followed by short comprehension quizzes.
Cirrus for Our Digital World delivers interactive assignments to guide student learning.
Watch and Learn Lessons offer opportunities to view the content for each chapter in a video presentation, read the content for each section, and complete a short multiple-choice quiz for each section.
Take the Next Step Activities expand on the content taught in the section and include a brief quiz.
Ethics and Technology Blog Activities prompt students to blog about some of the ethical questions related to living and working with technology.
An interactive version of the Summing Up chapter summary provides pop-up definitions of the bolded chapter key terms.
Terms to Know flash cards can help students review content before the chapter exam.
Arrange It activities prompt students to organize a series of images such as a sequence of events.
Label It activities ask students to identify different parts of an image such as a motherboard or a URL.
Additional review activities include a multiple-choice quiz and a matching quiz.
Our Digital World provides clear instruction and hands-on practice to foster student success and skills development.
Learning Objectives establish clear goals and help students focus their study of the chapter. Numbers align with the major sections of the chapter.
The Why Does It Matter? feature provides context to help students picture the practical reasons for learning the chapter content.
Chapter introductions briefly summarize topics in the chapter, and the Cirrus Course Content box reminds students to go to their Cirrus course to take a pre-chapter survey and watch the Technology in Your Future Video.
Cirrus Course Content boxes indicate additional section-based activities available in the Cirrus online course.
Thought-provoking quotes scattered throughout the text provide insights into what the famous and the not-so-famous think about our digital world.
Tables organize data and summarize concepts.
Computers in Your Career features give ideas for how students' computer studies could help them succeed in a career they may not have considered.
Illustrations help students visualize processes and concepts explained in the text. Even if students are not visual learners, they may find that a picture can save them reading a thousand words.
Playing It Safe margin boxes provide practical tips for using the web safely and responsibly.
The Review and Assessment section begins with Summing Up, a recap of the chapter concepts. The Cirrus Course Content box reminds students to go to their Cirrus course to access additional training and assessment resources.
Completing the Chapter Projects allow students to put their new knowledge to work, either on their own or as members of a team. These activities let students demonstrate the kind of thinking and problem-solving needed in today's workplace—plus students can use popular social media, such as wikis, in the process. The projects can be found in their book or in the Cirrus course, where they can upload and submit files to their instructors.
In the final Review and Assessment Activities, students get a chance to talk about some key ideas and to share their thoughts on the effects of current and future technology applications. Students can take their discussion online (if instructors set this section up as a blog) or extend their conversations in class with the challenging questions presented in the Class Conversations section.
Planning resources, such as lesson plans, teaching tips, and sample course syllabi.
Delivery resources, such as PowerPoint® presentations with lecture notes.
Assessment resources, including answer keys and rubrics for evaluating chapter work and a concept item bank for each chapter that can be used to create custom exams.


text:
Class 333 Arriving At Bradford Forster Square, Pic… Class333 Departing Bradford Forster Square, Bradfo… Class 333 Departing Bradford Forster Square, Pictu… Sunlight, Bradford, West Yorkshire, England(UK), 2… Old Speckled Hen, University Of Bradford Union Bar… Northern Trains #158753, Bradford Interchange, Bra… GNER #91106, "East Lothian," Leeds New Station, Le… GNER #91106, "East Lothian," Picture 2, Leeds New… Northern Trains #s 158756 & 158737, Leeds New Stat… First Transpennine Express #185140 at Leeds New St… Missed Freight, Leeds New Station, Leeds, West Yor… First Transpennine Express #185140, Picture 2, Lee… Class 185 DMU Arriving At Leeds New Station, Leeds… Silverlink #321423 At Leeds New Station, Leeds, We… Virgin Voyager In The Rain At Leeds New Station, L… First Northern #155347 At Leeds New Station, Leeds… First Northern (Metro Trains) #333010 At Leeds New… Class 333s At Bradford Forster Square, Bradford, W… Great Hall, National Railway Museum, York, North Y… LMS #7050, Great Hall, National Railway Museum, Yo… BR #D6700, "National Railway Museum," Great Hall,… Guy Fawkes pub, York, North Yorkshire, England(UK) York Minster, York, North Yorkshire, England(UK),… Bradford Midland Hotel, Bradford, West Yorkshire,… Class 333 Arriving At Bradford Forster Square, Pic… Bradford Wool Exchange Ceiling, Bradford, West Yor… Former Wool Exchange, Now A Bookstore, Bradford, W… Tyrell Street In Bradford, West Yorkshire, England… Bradford City Hall, Bradford, West Yorkshire, Engl… Hotel Great Victoria, Bradford, West Yorkshire, En… Departure From London King's Cross, London, Englan… Metro Trains Advertising Livery On A Class 155 DMU… New Northern Trains Livery On A Class 158 Express… Metro Trains #155344, Bradford Interchange, Bradfo… Leeds, West Yorkshire, England(UK), 2007 Doncaster Station, Doncaster, South Yorkshire, Eng… Newark Flat Crossing, Newark North Gate, Nottingha… Picture 2, Grantham, Lincolnshire, England(UK), 20… Grantham, Lincolnshire, England(UK), 2007 GBRf # 66714 & 66711, Picture 2, unknown location… GBRf #66714 & 66711, unknown location KX-Peterboro… GNER Intercity 225s At London King's Cross, London… MAV Diner, Rolling At 140 Km/h+ somewhere near Dec… ZSSK #350 008-9 Pulling EC170, the "Hungaria," int… Freight Past Sunset, Nadrazi Holesovice, Holesovic…
British Railway Photos British Railway Photos
Rail Photos Rail Photos
Old Flickr Rail Photos Old Flickr Rail Photos
train •
forster square •
emu •
station •
class 333 •
Class 333 EMU Arriving At Bradford Forster Square, Bradford, West Yorkshire, England(UK), 2007
Bradford, a city of a quarter of a million people, is large enough to have two major rail stations, Bradford Interchange, which hosts diesel trains, and Bradford Forster Square, which can also host electrics. This is the throat for Bradford Forster Square, as you can see from the cantenary. The train is a Class 333 EMU, once used only on Heathrow Express services in London but now common in other parts of Britain as well, most notably on the Metro Trains services operated by First Northern in West Yorkshire, as here. These trains, while only EMUs designed for local services, and originally the Heathrow Express, can operate as fast as 100 m.p.h., and do so even on the Heathrow Express, making them the fastest trains in Greater London. This, however, is not London. :-)

redpajama_set_name: RedPajamaCommonCrawl


text:
To J. D. Hooker 15 [May 1862]1
Leith Hill Place, Dorking (where we stay till this day week)
My dear Hooker
I would not have sent Leschenaultia, had I known that Sir William was away, & you so busy;2 for Emma has only just shown me Mrs. Hooker's note.3 I am going to beg Mrs. Hooker to have the great kindness to send me here two answers from you: (1) address where I can get best paper for drying plants for Henrietta4 (2) what must I call the simple microscope made by Ross?? (where does he live?) which you recommend for young Surgeons, & about what does it cost?—5
The remainder of this letter read at any time. You stated at Linn. Soc. that different sets of seedling Cinchona grew at very different rate, & from my Primula case you attributed it probably to two sorts of pollen;6 I confess I thought you rash, but I now believe you were quite right. I find the yellow & crimson anthers of same flower in the Melastomatous Heterocentron roseum, have different powers; the yellow producing on the same plant thrice as many seeds as the crimson anthers;7 I got my neighbours most skilful gardener8 to sow both kinds of seeds & yesterday he came to me & said it is a most extraordinary thing that though both lots have been treated exactly alike one lot all remain dwarfs, & the other lot are all rising high up. The dwarfs were produced by the pollen of the crimson anthers.9 In Monochætum ensiferum the facts are more complex & still more strange; as the age & position of the pistil comes into play in relation to the two kinds of pollen.10 These facts seem to me so curious, that I do not scruple to ask you, (mind, when you have a little leisure) to see whether you can lend me any Melastomatad, just before flowering, with a not very small flower, & which will endure for a short time a greenhouse or sitting room; when fertilised & watched, I could send it to Mr Turnbulls11 to a cool Stove to mature seed. I fully believe the case is worth investigation.
Farewell, my dear old fellow. Yours affect. | C. Darwin
You will not have time at present to read my orchid book:12 I never before felt half so doubtful about anything which I published: when you read it, do not fear "punishing" me, if I deserve it. Adios.— I am come here to rest, which I much want.—13
Whenever you have ocasion to write pray tell me whether you have Rhododendrum Boothii from Bhootan with a smallish yellow flower & pistil bent the wrong way; if so I would ask Oliver to look for nectary, for it is an abominable error of nature, that must be corrected.— I could hardly believe my eyes, when I saw the pistil.—14
The date is established by reference to the Darwins' stay at Leith Hill Place, home of Josiah Wedgwood III (see n. 13, below).
CD had asked Hooker to examine the stigma of Leschenaultia biloba (see letter to J. D. Hooker, 1 May [1862]), and had apparently sent him specimens at Hooker's request (see letter from J. D. Hooker, [5 May 1862], and letter to J. D. Hooker, 9 May [1862]). Hooker's father, William Jackson Hooker, was director of the Royal Botanic Gardens, Kew.
Frances Harriet Hooker's letter to Emma Darwin has not been found.
Henrietta Emma Darwin.
The reference is to the optician and scientific instrument maker, Thomas Ross, whose father, Andrew Ross, had been one of the pre-eminent manufacturers of microscopes in Victorian London (Turner 1989, p. 154). Ross's factory was at 2 and 3 Featherstone Buildings, High Holborn, London (Post Office London directory 1861). See also letter from J. D. Hooker, [17 May 1862].
Hooker's comments may have been made either following CD's presentation of his paper, 'Dimorphic condition in Primula', before the Linnean Society of London on 21 November 1861, or during the Linnean Society meeting of 3 April 1862.
The reference is apparently to the results of pollination experiments that CD carried out on Heterocentron roseum between October 1861 and January 1862. The results of these experiments, showing that crosses with pollen from the yellow anthers produced twice as much seed as those with pollen from the crimson anthers, are recorded in a note dated 3 February 1862 (DAR 205.8: 46; see also letter to George Bentham, 3 February [1862]).
The reference is probably to John Horwood, gardener to CD's neighbour, George Henry Turnbull; Horwood had supplied CD with specimens of Heterocentron roseum and Monochaetum ensiferum (see DAR 205.8: 24 and 47). He had previously assisted CD with his study of orchids (see Correspondence vol. 9), and is acknowledged in Orchids, p. 158.
There is a note recording this observation, dated 14 May 1862, in DAR 205.8: 49. CD recorded similar observations on 30 May and 9 August 1862 (see DAR 205.8: 49–50).
CD had observed that the position of the pistil in flowers of Monochaetum ensiferum changed over time (see letters to Asa Gray, 16 February [1862] and 15 March [1862]). For CD's attempts to understand the significance of these changes, see the dated experimental notes relating to this species in DAR 205.8: 22–43.
George Henry Turnbull (see n. 8, above).
CD had sent Hooker a presentation copy of Orchids, and had asked Hooker to inform him of any errors that he found (see Correspondence vol. 10, Appendix IV, and letter to J. D. Hooker, 9 May [1862]).
The Darwins stayed at the home of Emma's brother, Josiah Wedgwood III, from 15 to 22 May 1862 (see Emma Darwin's diary (DAR 242) and 'Journal' (Correspondence vol. 10, Appendix II)).
CD refers to Daniel Oliver. CD had previously observed that in rhododendrons, the pistils were bent so as to be in the path of insects seeking to reach the nectar (see Correspondence vol. 8, letters to J. D. Hooker, 26 April [1860] and 27 April [1860]). There is a note, dated May 1862, describing CD's observation on R. boothii in DAR 49: 72, which is marked 'Dichogamy'. See also the more detailed note on this subject, dated 16 May 1862, in DAR 49: 77–8. Hooker had collected many species of Rhododendron during his expedition to the Himalayas, 1848–50, and his The rhododendrons of Sikkim-Himalaya (J. D. Hooker 1849) had widened the interest of horticulturalists in using rhododendrons as garden plants. For Hooker's reply to CD's request, see the letter from J. D. Hooker, 23 May 1862.
Yellow anthers of Heterocentron produce on the same plant thrice as many seeds as the crimson anthers. Crimson anther seeds produce dwarf plants, others rise high up. Monochaetum ensiferum facts are still more strange. Wants to investigate the case, and asks for a plant of the Melastomataceae just before flowering.
Has JDH a Rhododendron boothii from Bhutan with pistil bent the wrong way?
DCP-LETT-3548
Joseph Dalton Hooker
Leith Hill Place
DAR 115: 151
Hooker, J. D.
Darwin Correspondence Project, "Letter no. 3548," accessed on 18 July 2019, https://www.darwinproject.ac.uk/letter/DCP-LETT-3548.xml
Darwin in letters, 1862: A multiplicity of experiments


For a Limited Time at Your Denny's Fair Oaks Blvd.
Special Promotions at Denny's Fair Oaks Blvd.
About Denny's Fair Oaks Blvd.
Recent Reviews For Denny's Fair Oaks Blvd.
I ordered online by my mistake I chose to pick and wanted delivery. When I realized this, I call the store they said they could not hep me. I had no way to get there. I was charged anyway could not find a way online to change the order and there number was only contact info.
Food was great, there just wasn't no condiments in our bag.
My muffin was extremely burnt and the ranch I asked for was not in the bag. Cant forget the hashbrowns were cold as ice.
We used to get all of our deliveries from another Denny's and everything was great. Ever since we have been forced to get our deliveries from this Denny's, food is terrible! My order has shown up wrong every single time. My food is cold & soggy. There's always something missing as well. Don't order your food from this Denny's! You will definitely be disappointed.
This restaurant is outstanding. Great food, dynamite staff and fast service. Always enjoy brining my family here.
The salad was good, however they gave me the wrong dressing and forgot the croutons. Also, I ordered for pickup at 12:30 pm and it wasn't ready until close to 12:50.
This Denny's location has the best customer services. Ordering to do or dining in, they give great services.
My food was not ready when I arrived. I waited an additional 15 to 20 minutes. Then i was asked what did you order. I had to tell them my order all over again. No apology for my wait.Then when I received my order I was still missing an item. Had to drive back to fix it. I waited an additional 5 plus minutes for the missing item. The rest of the food was cold. But the overall taste of the food was delicious. Except my bacon wasn't cooked thoroughly it was still partially raw. So why did I wait so long for a item that wasn't cooked enough. The guy apologized for my item that was missing.
If I could leave zero stars I would!
I did not receive the cheesecake I ordered and paid for. BUMMER!
Always ready and always delicious!
The food was ok. Not great. I haven't been to Denny's in years. It used to be so much better and the portions were much larger.
The food here is always good, but the service times for the evening are very long. I ordered food to go via the app, and was told it would be ready in 20 minutes. I arrived at the restaurant shortly before this, and had to wait an additional 45 minutes for my food. Over an hour for a to go order is far too long.
I have always had great food served in a timely manor..with smiling faces.. Love my Denny..


text:
in Cannabis, News
The cannabis industry's next big threat: Hacks and fraud – CNN
by homegrownreview February 20, 2020, 3:53 pm 1.9k Views
Security experts have long warned that the cannabis industry is susceptible to both cybercriminal and fraudulent activities. It's not exactly the Wild West anymore: Businesses and state-legal markets have matured. But risks and concerns about criminal activity and fraud haven't waned.
Just weeks into 2020, the cannabis industry has been the subject of several high-profile incidents: a reported dispensary point-of-sale system hack that potentially exposed the data of 30,000 people; the US Securities and Exchange Commission charging two men who allegedly used a fake cannabis company as a front for a Ponzi scheme; and the conviction of a former Colorado cannabis entrepreneur in one of the state's largest fraud cases.
"These industries are targets just because they're new and there is lots of controversy — whether it's political or social — with some of the things they're doing," Michael Bruemmer, the vice president of data breach resolution and consumer protection for consumer credit reporting company Experian, told CNN Business.
Experts are cautioning companies to shore up their security practices and for consumers to be mindful of opportunities that seem too good to be true.
Cannabis' emerging market status makes it a prime target fraud, said Jodi Avergun, a former federal prosecutor and DEA chief who now heads law firm Cadwalader, Wickersham & Taft's white-collar defense and investigations group.
"Consumer and retail investors are not taking appropriate precautions," she said.
The cannabis industry is teeming with interest and speculation, she said. Most cases brought by the US Securities and Exchange Commission involve operations that purport to be cannabis businesses but instead are schemes — typically of the Ponzi and pump-and-dump variety, she said.
The recent cannabis cases include allegations of a Ponzi scheme tied to a fictitious cannabis company and charges of securities fraud tied to an alleged criminal ring in Colorado.
"The unscrupulous people who have always existed — the out-and-out fraudsters — take advantage of investors who want to make a buck quickly," Avergun said.
Although cannabis remains illegal under federal law and largely unregulated, some federal agencies continue to keep a close watch for potential nefarious activity. The US Federal Bureau of Investigation last year warned that it saw a "public corruption threat emerge in the expanding cannabis industry," and agencies such as the SEC have sought criminal charges.
In 2014, when Colorado and Washington State started selling recreational cannabis, the SEC suspended several cannabis stocks and issued an investor alert to warn of questionable practices, alleged illegal stock sales and market manipulation. The agency issued yet another investor alert in 2018 highlighting past enforcement actions and continued warnings.
The SEC Office of Investor Education and Advocacy "regularly receives complaints about marijuana-related investments, and the SEC continues to bring enforcement actions in this area," the SEC warned then. "If you are thinking about investing in a marijuana-related company, you should beware of the risks of investment fraud and market manipulation."
The hype — and potential for fraudulent investing schemes — may have abated in recent months as valuations have sunk and companies have restructured to ensure near- and long-term stability.
"But as soon as demand returns, so will the opportunistic fraudsters who seek to take advantage of those who see dollar signs in the cannabis industry," Avergun said.
Experian's "Data Breach Industry Forecast" for 2020 predicted that emerging industries such as cannabis, green energy and cryptocurrency would be increasingly become targets for cyberattacks. In 2019, these industries accounted for fewer than 10% of the breaches tracked by Experian, but they remain vulnerable because they're emerging industries, Experian's Bruemmer said.
"These controversial industries make great targets because they're more focused on growing their business and starting up than they are necessarily putting the appropriate focus on cybersecurity," he said.
Three years ago, a leading seed-to-sale tracking software provider was hit with two cyberhacks in a six-month period. The incidents consisted of a "sophisticated sequence of malicious attacks directed against the company," an attorney for the targeted company MJ Freeway, now named Akerna, said at the time.
The company spent at least $200,000 to upgrade its cybersecurity and enterprise software capabilities following the 2017 breaches, according to financial filings made with the SEC.
Jessica Billingsley, chief executive officer of Akerna, told CNN Business in December that the company no longer uses the software targeted in the attack and the next generation program is far more robust.
In January, internet security researchers for vpnMentor reported a breach at THSuite, a cannabis point-of-sale provider. The vpnMentor researchers said that more than 30,000 individuals had their information exposed, including photo IDs, addresses and protected health information.
Officials for THSuite did not return multiple calls and emails for comment. Some of the dispensary clients identified in the vpnMentor report told CNN Business that they were quickly taking action to determine how much of their customers' information might have been affected.
RJ Starr, compliance director for Bloom Medicinals, said he was aware that his company's technology vendor experienced a data breach and was conducting a thorough investigation.
"Once we've identified any affected patients, we will notify each individual patient and follow HIPAA breach notification protocols," Starr said. "Bloom Medicinals serves tens of thousands of patients in multiple states, and we take patient privacy very seriously. Rest assured, we will implement any corrective action necessary to both remedy and ensure that this doesn't happen again."
Consumers and companies can be proactive in protecting themselves from fraud and cybercriminal activity, Avergun and Bruemmer said.
Avergun said that consumers should check the price history of companies' stocks and research the background of the advisers and executives who are selling shares and running the company.
"If it sounds too good to be true, it probably is — as with any investment," she said.
As for business investors, it comes down to due diligence.
"There is nothing to substitute for adequate research into company financials, its state compliance policies and processes, and its management before investing in an emerging cannabis company," she said, noting to be aware of special state-specific risks. "If a manager or owner of a cannabis company was previously operating before cannabis was state legal, that causes problems with licensing in state and may raise the risk of federal prosecutions."
Bruemmer highlighted three key tips for companies to button-up their security: Ensure that everyone — not just the information technology experts — keeps data security in mind and not make simple mistakes such as clicking on a nefarious link; research and employ credible security technology but don't be reliant on solely the software; have a proactive plan in place if a security breach occurs.
"A lot of businesses think about it as an after-thought," he said. But they should pre-plan."
Previous article The 4 Biggest Cannabis Stock Catalysts in 2020 – Motley Fool
Next article Are cans draining THC potency from cannabis beverages? – Leafly
Written by homegrownreview
in Dispensaries, News
ZenLeaf, Aurora, Illinois' 1st recreational marijuana dispensary, opening today – WLS-TV
Debate Over Medical Marijuana – WJTV
Filmmaker Jay Baruchel Discusses Cinematography, Creativity, And Cannabis – High Times
Missouri: Licensed Medical Cannabis Retailers Now Open for Business – Norml
Surprising Benefits of Cannabis – WGN Radio
Cannabis influencers: He strives to steer people in the right direction – NJ.com
More From: Cannabis
by homegrownreview October 19, 2020, 7:20 pm
Irish Farmers Association ask Government to legalise medical cannabis – Irish Post
Cannabis retail trends not as high as you'd expect – The American Genius
Commissioners approve marijuana dispensary outside Granby – Sky Hi News
by homegrownreview August 26, 2020, 5:41 pm
'SO FAR APART:' UP tribe's venture into cannabis highlights tension with state as potential compact talks continue – MiBiz: West Michigan Business News
N.J. cannabis industry's biggest conference looks at 'road to legalization.' – NJ.com
by homegrownreview February 15, 2020, 6:53 pm
Qualifying for medical cannabis – The Spokesman-Review
Massachusetts Cannabis Sales on Track for Record Q1 2020 – Yahoo Finance
by homegrownreview April 7, 2020, 1:00 pm
5 Applied Questions For Priscilla Vilchis, A Latina Cannabis Trailblazer – Forbes
The 4 Biggest Cannabis Stock Catalysts in 2020 – Motley Fool
Are cans draining THC potency from cannabis beverages? – Leafly


text:
Home > Vol 9, No 4 (2017) > Danso-Bamfo
Clinical electives at the University of Michigan from the perspective of Ghanaian medical students: A qualitative study
S Danso-Bamfo, N A Abedini, H Mäkiharju, K A Danso, T R B Johnson, J Kolars, C A Moyer
Background. Participation in international electives is an integral part of medical training for many medical students, yet little research explores the experiences of students from low-income countries who travel to high-income countries for medical electives.
Methods. One hundred and two Ghanaian medical students who participated in 3 - 4-week clinical rotations at the University of Michigan between January 2008 and December 2011 were invited to participate in a mixed-methods study. Face-to-face, semi-structured interviews were conducted with 15 respondents from the larger group who agreed to take part in follow-up interviews. The 60- to 90-minute interviews were audio-recorded and transcribed verbatim, and transcripts were coded by three investigators in an iterative process of thematic identification, codebook generation and revision and consensus discussions.
Results. Respondents described perceived differences between Ghana and the USA, including: exposure to 'new' aspects of medicine; differences between Ghanaian and US patients, healthcare workers, and patient-provider relationships; and aspects of the US system that they would like to see emulated in Ghana.
Conclusion. This preliminary study suggests that international bilateral exchange programmes have lasting value for participants from low-income nations. Further research is needed to determine if the different types of experiences yield measurably different benefits.
S Danso-Bamfo, Harvard T H Chan School of Public Health, Boston, Mass., USA; Department of Emergency Medicine, Massachusetts General Hospital, Boston, Mass., and Division of Hospital Medicine, Department of Internal Medicine, University of Washington, Seattle, Wash., USA
N A Abedini, Division of Hospital Medicine, Department of Internal Medicine, University of Washington, Seattle, Wash., USA
H Mäkiharju, Hematology and Oncology Division, Department of Internal Medicine, University of Michigan Medical School, Ann Arbor, USA
K A Danso, School of Medical Sciences, College of Health Sciences, Kwame Nkrumah University of Science and Technology, Kumasi, Ghana
T R B Johnson, Department of Obstetrics and Gynaecology, University of Michigan Medical School, Ann Arbor, USA
J Kolars, Departments of Learning Health Sciences and Obstetrics and Gynaecology, University of Michigan Medical School, Ann Arbor, USA; Global REACH, University of Michigan Medical School, Ann Arbor, USA
C A Moyer, Departments of Learning Health Sciences and Obstetrics and Gynaecology, University of Michigan Medical School, Ann Arbor, USA; Global REACH, University of Michigan Medical School, Ann Arbor, USA
Medical elective; Global south; Medical education


JAMBO!! i can't get into my sympatico mail, which is very frustrating, but for some reason this blog website is free! So here goes, it's been a week and a half since Diana, Jamie, Matt and Brian took off, and i miss them terribly....someone asked me today whether i could live over here permanently and for sure, i have to say no, though i have spent almost 10 months of my life here, most of it in this little village of mto wa mbu wedged beneath the awesome rocky strength of the Rift Valley, which stretches all the way from Egypt down to South Africa - so hot and dusty this year, this little place, windy, the fine red dust sweeping up dirt potholed laneways, into my eyes, skin, freshly washed hair. HOt, like nowhere else i have been over here, the locals are complaining, and they never do..|I realize that i am okay as long as i stop focusing on my discomfort, once i do, i have had it, hot flashes way beyond my time, coming in waves from the inside out, the little band of tiny red ants making their way each night horizontally across the grouting of my small tiled bathroom, towards the toothpaste, the soap, but then in moments they seem to disappear. Spiders motionless in shiny robin's egg blue toilet rooms at ICA,little fires alongside the road en route from where i stay over to \mi Casa everynight for my hit of rice, greens and a great sauce, with a glass of white wine, mostly on my own, a flashlight, and these days engrossed in Three Cups of Tea, if you haven't read it, it is incredible!
Ah...but the days are wonderful...a half hour of yoga reminding me of Zoja my pilates teacher back home, wherever that is...a cup of espresso like instant coffee mixed with freshly pumped and boiled milk, a kitembuo - a small round fried rice bun and omlette, with two eggs...and off to the office. Charles intersected me the other morning over coffee - my subconscious swelling micro financing, we hit the office admidst 80 members of the four People |Living with HIV AIDS groups, mostly women, all getting together to amalgamate themselves into one big group, strength in numbers. I have seen these women coming in and out of ICA over the past four years, have assisted a few of them into small businesses, have visited their homes. WE stand there in the middle of it all, and it occurs to me that why not set up a micro financing program right here in the midst of all this energy, these incredible people who have endured so much. Many of whom have been thrown out of their homes, by families with small children in toe, weakened by the disease, distraught now without support, their jobs lost, their money gone, and no where to go. They end up at ICA, and here find support from others who understand only too well what they are going through. Months later, they have been tested voluntarily, HIV positive, and are now working their way into a life long process with the Anti Retro Viral drugs, free of charge, which cannot destroy this deadly virus, but which can keep it at bay, allowing them a life of renewed strength and hope.
So....we started, two days ago, interviewing each of these people, one by one, with the idea of creating a Micro Financing program, to enable those without credit or credibility now, to borrow a small amount of money which will enable them to expand and embellish the small businesses they now work at.
So another project is born.
This seems to be my job now over here, not running around the countryside as i once did at the beginning but to hone it deeply, to come across situations i know well, and to figure out, with Charles, how we can best be of assistance.
Majengo...working out our new budget...and after extensive interviews with our 8 staff members, figuring out how we can help them with their kids education..taking a load off them, thus ensuring for ourselves, that these great people will be with us for a long time. Dancing with the kids the other night, singing, taking pictures, teaching English..oh i wish everyone out there could come to visit, if even for a few hours, just to see what their donations have given.
This post has been dry...i am buried in a dark windowless room down the road from To Wa \mbu which i have just discovered..they are charging tourist rates for this machine, but a blessing to know it is here, i am stunned...so close by..
hey..coming home soon...looking forward to it, and i know, when i am there, that i will long to be back here too....but dying to see my kids...those grand kids....and my friends, wake up in the morning as spring breaks through, hey, even a hit of winter would be great now...less than a minute to go!!


A young boy, bewitched by his fathers unrelenting passion to fly; a desperate craving that absorbs his every waking minute, finds himself entranced by the dream. When his father goes to war and does not return it seems the spell is broken . .
Much later, the boy, now a young man finds himself drawn once more to his fathers drawings and failed experiments. Finally able to make his fathers dream a reality he flies. Will his own son be visited by this unrelenting passion?


text:
/**
 *
 */
package com.UBC.EECE514;

import org.junit.Assert;
import org.junit.Test;

import com.UBC.EECE514.model.Column;
import com.UBC.EECE514.model.LSideTheme;

/**
 * @author 2nday
 *
 */
public class LSideThemeSettingsTest  extends BaseTest {

	/**
	 *
	 */
	public LSideThemeSettingsTest() {
		// TODO Auto-generated constructor stub
	}

	private LSideTheme theme;
	private Column column;

	public void changeUnderlineColor() {
		// make column visible that has left parts
		column = new Column(driver);
	    column.setColumnStyle("ColsNumberIsTwoR");

	    theme = new LSideTheme(driver);
	    theme.setUnderlineColorByTextBox("#888");
	}

	@Test
	public void testPartsUnderlineColor_1() {
		changeUnderlineColor();
	    Assert.assertEquals("rgb(136, 136, 136)", theme.getUnderline_1_Color());
    }

	@Test
	public void testPartsUnderlineColor_2() {
		changeUnderlineColor();
	    Assert.assertEquals("rgb(136, 136, 136)", theme.getUnderline_2_Color());
    }

	@Test
	public void testPartsUnderlineColor_3() {
		changeUnderlineColor();
	    Assert.assertEquals("rgb(136, 136, 136)", theme.getUnderline_3_Color());
    }

}


text:
Startup Mistakes
Don't Make These 10 Startup Mistakes
Entrepreneur and Connector
May 14, 2014 8 min read
Starting a business is difficult. Launching a startup is even more challenging. Aside from facing the challenge of attempting to build a company from the ground up, many entrepreneurs have little prior experience in the business world. Even when they have an incredibly awesome idea, complex problems arise, such as managing the young enterprise, handling finances and hiring employees on a budget.
Due to a lack of experience, many startups endure the misfortune of failure -- if they launch at all. Be sure to not add to their tales of disaster. Here are 10 startup mistakes to avoid at all cost:
Related: 17 Absentminded Mistakes That Will Cost Your Business Big Time
1. Going it alone. How many startups that have met with success have only one founder? Larry Ellison's Oracle is an exception.
Indeed establishing a company is hard work and it often takes more than a single individual to launch a business. There are highs and lows, not to mention some tasks that few can undertake alone. Crushing blows and setbacks sometimes make it hard to continue on without another person's encouragement. Then there's a need to market the plan and build the product or service. Money has to be raised to launch the startup.
In most situations, it's an incredibly daunting to tackle all this alone. A little help from friends and professional colleagues can help in launching the startup.
2. Skimping on the business plan. Having a solid business plan plays a vital role in determining future success. A business plan, after all, serves to guide the startup in the right direction by answering the following questions:
What is the purpose of the company? Who are the potential customers? What are the mission and values?What's the direction desired for the company? Who are the company's competitors and what are they doing? How can the company measure success?
In other words, a sound business plan determines every aspect of the startup. And whenever the company is stuck or a new venture is to be launched, refer to the business plan.
There's no need to go creating a business plan in as formal a manner as someone would in business school. But having a business plan is recommended since it will help determine the company's direction over the long term.
Related: My Biggest Mistake: Not Closely Examining the Numbers
3. Handling money incorrectly. When it comes to startups, having money is very much a big deal and it needs proper handling.
One of the biggest mistakes is spending too much, which may occur when a business owner or founder becomes overly eager and hires a ton of people. At first, the entrerpreneur may believe all the new employees are needed. But this will just mean burning through the startup's finances faster. To avoid this, hire those only those truly needed and take staffing up step by step.
A founder may be tempted to blow through a lot of cash pretty quickly, spending on unnecessary expenses. Instead of these funds going to good use, they're just wasted.
If a venture capital firm just handed the company a big, fat check, it may be expecting a big fat result very soon. No more fooling around. It's time to get to work.
And what if the business suddenly has to undertake a costly change and insufficient funds have been set aside? What happens if the original plan must be scratched in favor of a backup plan? What if an investor backs out or a client doesn't pay? What if a vital element for the business costs too much? Is there money to handle such scenarios?
Without proper management and use of its finances, a new business may never set sail. Be sure that someone good with numbers can help out with this.
Related: Do Pivots Matter? Yes, in Almost Every Case.
4. Lacking the ability to pivot. Every entrepreneur will say that nothing ever goes as planned. But being able to pivot is part of the game. At one time Nokia had a paper mill and made rubber boots. Today, it's a telecommunications company.
Odeo once existed as a podcasting platform. But when Apple launched its podcasting platform, Odeo had to pivot. Today Odeo is that social media outlet known as Twitter.
To become a successful business owner, keep a backup plan for every worse-case scenario but also be flexible and able to pivot if the original proposal isn't going to work.
5. Thinking too small. If an entrepreneur thinks too much outside the box (meaning targeting a very tiny niche market), success may be elusive. Investor Paul Graham, the founder of startup incubator Y Combinator, explained in "The 18 Mistakes That Kill Startups" that many entrepreneurs believe it's safer to target a smaller crowd so the competition isn't as fierce. But "if you make anything good, you're going to have competitors, so you may as well face that," Graham said. "You can only avoid competition by avoiding good ideas."
Related: Getting Your Small Business to Scale Like a Tech Startup
6. Choosing the wrong location. Siting a business has always been important. Setting up shop in the right location is key, considering the cost and the geoposition of potential customers and the industry as a whole.
For example, Rowland H. Macy originally started a store in Massachusetts, but it didn't pan out. So, he learned from the mistakes and relocated his business to Sixth Avenue in New York City. The enterprise was successful and resulted in the retail giant known as Macy's.
And consider the fact that many successful tech companies tend to emerge from tech hubs like Silicon Valley, Seattle, Portland, Ore., and Boston.
But there's another reason why location matters: venture capitalists. Graham observed how most venture capitalists fund startups that are located about an hour's drive away. This may be because investors learn of startups through someone else in their network. So to receive funds, site the startup close to where the money is.
Related: Should You Go East Or West for Your Venture Capital?
7. Ignoring a hunch. There's nothing quite like the instincts of an entrepreneur. It's probably the reason many get far with their startups. So don't ignore that hunch. Use it to advantage.
But make sure that that entertaining a hunch is balanced with engaging in number crunching, viewing key performance indicators and developing business strategies based on research.
8. Launching at an inopportune time. When launching a startup, timing is everything. While certain circumstances lie outside of control (like the economy or natural disasters), launching at the right time can be arranged. Never mind the exhaustive scientific approach. Just make sure the company doesn't launch too early or wait too long.
Launching too soon might put the entire enterprise at risk. Consider the following: Is this a product or service that people really want? Is it ready to be marketed? After all, there's nothing worse than rushing a startup to market out of a desire to beat the competition or start making revenue. Be sure that the startup is ready to go before making it public.
On the flip side, don't wait too long. Otherwise there's the chance all the money will be exhausted or that a competitor will be first to market a product. Make sure that everything is ready to roll but don't procrastinate. Establish deadlines and meet them.
Related: 6 Signs It's Time to Find a New Hiring Strategy
9. Getting the hiring process wrong. Be sure that hiring doesn't start too quickly. That will drain the entreprise financially. But the part o the hiring process that's constantly tweaked is the attempt to recruit the right people.
So many startups have folded because the people hired were just not right for the company, perhaps a friend who lacked skilled for the work role. Or someone didn't fit in with the team because of a personality mismatch. Be sure to have qualified people working at the startup.
And ensure that everything is documented. No one wants an ex-employee to sue because a huge chunk of the company was promised in exchange for services, an agreement that was only sealed with a handshake.
10. Having too much outside influence. Whether it's advice or criticism, feedback from an outside source sometimes is a great assist. Would Facebook have taken off if Sean Parker had not suggested to Mark Zuckerberg that he move to California and change his project's name from Thefacebook to just Facebook?
Of course too much feedback can be detrimental. Along a company's journey, many will say what's best for it. If everyone's advice is followed, the business would no longer bear a resemblance to the original idea. Being pulled in too many different directions just isn't good for a business.
Even though Zuckerberg took Parker's advice, he still kept a vision of what he wanted Facebook to be. He didn't take every piece of advice offered. He just used the suggestions that he knew would work for his company.
Related: 14 Books Every Entrepreneur Should Read in '14
The Power of Passive Income
Success is Easy
Start Your Own Photography Business
Start Your Own Freelance Writing Business
Start Your Own Etsy Business
The Bodega Effect: Lessons In Branding From the Rise and Fall of a Startup
Small Business Heroes
The 6 Biggest Startup Mistakes Entrepreneurs Make
10 Deadly Startup Mistakes to Avoid
5 Mistakes to Avoid When Starting Your First Business
Mark Cuban's 12 Rules for Startups


text:
Dear Anisuzzaman,
you correctly point to a long list of political-economy obstacles which have, for long, impeded the adoption of more egalitarian reforms which would have reduced income inequality, educational and health inequality and so on.
The region where traditionally these reforms were most disattended was Latin America which - together a few Eastern/Southern African countries - detained the record of the highest inequality in the world. Inequality worsened further in the 1980s and 1990s in LA (and almost everywhere else), owing to the the sudden increase in in US interest rates in June 1981, the ensuing debt crisis and recession of the 1980s, and the negative distributional effects of 'premature/unfetterd liberalization and privatization' in developing and transitional economies. In WIDER we documented fairly accurately that in the 1980s and 1990s 73% of the countries with decent Gini data experienced a rise in inequality.
But things have started changing a bit since the beginning of the 2000s. The clearest case is Latin America (particulalrly South America), where btw 2002 and 2012 the average Gini coefficient of the distribution of disposable income per capita fell by almost 6 points, including during the turbulent years 2009-2013. In fact, inequality fell in 15 of the 18 countries of the region (Carribeans are not included). The 2014 OUP volume I edited - http://ukcatalogue.oup.com/product/9780198701804.do - (as well as other research on this topic) shows that such decline was driven to a good extent by 'progressive' policy changes in the field of macroeconomics, taxation, trade, labour market, public social expenditure (esp. in education), and social transfers. Yet, the most important point to drive home is that such changes (whose feasibility was facilitated till 2007 by a favourable global businnes cycle) were made possible by the election of 15 progressive (center-left regimes) following the disappointing results of neo-liberal policies in the region. An essential condition for the L.A. success was thus the restauration of democracy in the region - after 2 decades of authoritarian regimes, and the election of progressive regimes. Without such changes, it's unlikely LA would have enjoyed a decline in inequality. I enclose reference to a paper which tells part of this story, (http://www.disei.unifi.it/upload/sub/pubblicazioni/repec/pdf/wp14_2014.pdf) though chap. 3 in the above volume provides a detailed and convincing explanation of the change in the 'politics of policies'
The issue is therefore the nature and functioning of democracy in the different parts of the world, and the nature of (old and new) coalitions needed to support such regimes. As discussed in the above volume, political coalitions in L.A. have evolved importantly, and generally in an inclusive way, giving voice to ethnic groups (as in Peru, Bolivia and Ecuador), the organized poor (as in Argentina), and sections of the lower middle class once favorable to WC policies (as in Chile).
South East Asia. With Bruno Martorano, we did a paper for UNCTAD's TDB (http://unctad.org/en/PublicationsLibrary/osgdp20124_en.pdf) which looks - inter alia - at 4 countries part of the ESCAP region, i.e. S.Korea, Thailand, Philippines and Malaysia. There too, we found an improvement in Gini's (if smaller than in LA), which also on this case depended inter alia on the adoption of more progressive policies.
An analysis of SSA data - which is waht I am doing now - shows that inequality has declined in half of the 29 countries with acceptable data (mainly taken from WIDER's WIIDv3). We are now analyzing the possible causes of such phenomenon. It will be interesting to test if the gradual change in democratic institutions in the region made possible the adoption of more egalitarian policies, including social transfers which - as suggested by Isabel - are increasing in number and scope in many developing countries.
Finally, you may rightly object that inequality has risen during the last two decades in China and in South Asia where - at least in India - democracy is meant to work (less so in Bgds and Pakistan). This is an issue that needs to be explored, and to which I am unable to provide an answer ........ perhaps you and your colleagues can help us with this puzzle.
Prof. Giovanni Andrea Cornia
Department of Economics and Management, D6-55
via delle Pandette 9, 50127 Firenze.
Tel: 0039 055 275 9599
E-mail: giovanniandrea.cornia@unifi.it
http://www.dse.unifi.it/
http://www.dse.unifi.it/sviluppo/portale


text:
Q: Is there a Linux command for string subtraction between columns? I'm processing some SNP column into vcf format.
the input columns are as following :
ref     ALT
A       A G
A       A T
T       C T
G       G T
A       A G
C       C G T
G       A G
T       C T
T       A G T

expected output :
ref     ALT
A       G
A       T
T       C
G       T
A       G
C       G,T
G       A
T       C
T       A,G

A: This is nothing elegant here, just iterating through the fields on each line and deciding whether to print or not after comparing with the first column.
NR == 1 {print; next}
{
    printf "%s", $1
    sep = "\t"
    for (i = 2; i <= NF; ++i) {
        if ($i != $1) {
            printf "%s%s", sep, $i
            sep = ","
        }
    }
    print ""
}

$ awk -f a.awk file
ref     ALT
A   G
A   T
T   C
G   T
A   G
C   G,T
G   A
T   C
T   A,G

A: $ awk 'BEGIN{FS=OFS="\t"} NR>1{sub($1," ",$2); gsub(/^ +| +$/,"",$2); gsub(/ +/,",",$2)} 1' file
ref     ALT
A       G
A       T
T       C
G       T
A       G
C       G,T
G       A
T       C
T       A,G

The above will only work when $1 doesn't contain RE metachars and can't be a substring of any of the strings in $2.

A: Using perl instead of awk allows for a short one-liner:
$ perl -lane 'print $F[0], "\t", join(",", grep { $_ ne $F[0] } @F)' input.txt
ref ALT
A   G
A   T
T   C
G   T
A   G
C   G,T
G   A
T   C
T   A,G

redpajama_set_name: RedPajamaStackExchange


Brother-sister team Meryl and Geraldine Croizier are churning out absolutely delightful juice from their 5-hectare organic estate in the Ardèche - that hotbed of natural winemaking in the south of France. Pale pink rosé made from 100% syrah - peachy, floral but with a notable wet-stone minerality and flinty edge. Lip-smackingly dry and quenching, so invigorating, with an earthy funk, too. Complex and sure to satisfy the discerning pink drinker.


text:
Lace Your Face
Mariella Scott and Anita Sun Eisenburg hope the Sharks lace 'em up and invest in Lace Your Face, their skin care masks, in Shark Tank episode 922. Eisenburg, a Medical Esthetician, and Scott, a serial "beautyprenuer," got together in 2014 to form Dermovia, the company that makes and markets Lace Your Face.
Anita used cotton gauze to help heal burn plastic surgery patients' skin after treatment. The gauze helped keep skin compressed while delivering nutrients and retaining moisture. It also helped draw out excess material out of pores. When they decided to start Lace your Face, they developed a lace-like absorbent stretch cotton gauze that did what her surgical treatments did while looking feminine and elegant.
The Dermovia line of Lace Your Face products includes 8 different masks for a variety of skin conditions. There's an exfoliating mask, a hydrating mask, a pimple popper mask kit containing four different masks for weekly application, and other masks for a variety of skin conditions.
Each mask can be used twice. Simply put it on according to directions and leave it there for 15-20 minutes. Once done either save or throw away your mask and rub the remaining material into your skin. A set of four or five masks costs $55 and they're available on Amazon. They likely want a Shark's help getting more off-line distribution. Will a Shark want to wear this mask?
Posts about Lace Your Face on Shark Tank Blog
Dermovia
Lace Your Face Shark Tank Recap
Mariella and Anita Enter the Tank seeking $350,000 for 10% of their business. they give their patch and the Sharks chuckle because the masks look silly on the women. They give out samples and Robert pretends he's a bank robber with his. It costs $15 to make a 4 pack that sells for $55. Lifetime sales are $1.3 million with $750,000 coming in last year (2017). They are Nordstrom's Barney's and other department stores and Amazon. They have four patents: a design patent on the masks and three utility patents.
Robert sees too many challenges and is the first Shark out of the deal. Mark says he doesn't know enough about these kind of products; he's out. Bethanny offers $350,000 for 30% contingent on getting the 4-pack down to $39.99. Daymond says he knows nothing about the health and beauty space; he's out. Lori thinks people won't buy it unless it becomes a bigger brand; she's out.
They tell Bethanny they have a 1 million unit offer and counter with $350,000 for 15%. When Lori hears about the million unit order, she says she'll do the 15% deal. They agree!
Lace Your Face Shark Tank Update
The Shark Tank Blog constantly provides updates and follow-ups about entrepreneurs who have appeared on the Shark Tank TV show. The deal with Lori closed. In 2018 they introduced dry masks and their Skin Cycle brand of lotions, serums, cleansers and scrubs. As of June, 2021, this company is doing $4 million in annual revenue.


text:
Research Portfolio | CMS / Writing
Who are the South Asian Americans?
To create a more meaningful portrait of the South Asian American experience, MIT scholar and documentary filmmaker Vivek Bald explores a rich, nuanced, and nearly unknown story of identity in his book, Bengali Harlem and the Lost Histories of South Asian America (Harvard University Press, 2013).
Doors Opening
In 1965, the Hart-Cellar Immigration and Naturalization Act rewrote the rules determining who could legally immigrate to the United States. The legislation opened the doors to a major migration from South Asia (India, Pakistan, Bangladesh, Sri Lanka, and Nepal) that was dominated by highly educated professionals.
More Stories to Tell
This group of immigrants has become the dominant voice of America's South Asian community, says Vivek Bald, Assistant Professor of Writing and Digital Media in the School's Program in Writing and Humanistic Studies. Following the classic American arc from ethnic enclave to suburb, their success has overshadowed the story and experiences of the working class South Asian immigrants who came before and after them, he says.
"My work seeks to offer counter-representations of who South Asians are and what their experiences have been here," says Bald, whose previous films include Taxi-vala/Auto-biography and Mutiny: Asians Storm British Music.
A Multi-Ethnic Community
For his latest film and book project, "In Search of Bengali Harlem," Bald is working with Bangladeshi-American performer Aladdin Ullah to explore the story of Ullah's father Habib, a 14-year-old Indian sailor who landed in Boston in the 1920s. Left ashore by chance, he eventually settled in New York along with dozens of other South Asian maritime workers. These immigrants briefly transformed the city's cultural landscape, creating a "really astonishing" Harlem-based community of Bengali Muslim men, African-American, Latina, and Caribbean women and their children, Bald says.
Expanding Identity and Experience
"I'm interested in what exactly happened, why this multiracial working class immigrant community existed for a generation in the form that it did," Bald says. Through his film, Bald hopes "to challenge the hold of a very small set of mainstream media images of South Asians."
"I want the film and the book to expand people's idea of who South Asians are in the U.S.," Bald says.
Book Website
New York Times | Book Review
Vivek Bald
Story at MIT News
CMS / Writing
New York Times | India in New York