text:
import assert from '../utils/assert'
import { parsePostFromPaste, setClipboardData, parsePostFromDrop } from '../utils/parse-utils'
import { filter, forEach } from '../utils/array-utils'
import Key from '../utils/key'
import TextInputHandler, { TextInputHandlerListener } from '../editor/text-input-handler'
import SelectionManager from '../editor/selection-manager'
import Browser from '../utils/browser'
import Editor, { TextUnit, Format } from './editor'
import { Logger } from '../utils/log-manager'
import { PartialSelection } from '../utils/selection-utils'

const ELEMENT_EVENT_TYPES = <const>[
  'keydown',
  'keyup',
  'cut',
  'copy',
  'paste',
  'keypress',
  'drop',
  'compositionstart',
  'compositionend',
]

declare global {
  interface HTMLElementEventMap {
    compositionstart: CompositionEvent
    compositionend: CompositionEvent
  }
}

export type DOMEventType = typeof ELEMENT_EVENT_TYPES[number]
export type DOMEventForType<T extends DOMEventType> = HTMLElementEventMap[T]
export type DOMEvent = HTMLElementEventMap[DOMEventType]

interface ModifierKeys {
  shift: boolean
}

type EventManagerListener = [
  HTMLElement,
  DOMEventType,
  (event: CompositionEvent | KeyboardEvent | ClipboardEvent | DragEvent) => void
]

export default class EventManager {
  editor: Editor
  logger: Logger
  modifierKeys: ModifierKeys
  started: boolean

  _isComposingOnBlankLine: boolean
  _listeners: EventManagerListener[]
  _textInputHandler: TextInputHandler
  _selectionManager: SelectionManager

  constructor(editor: Editor) {
    this.editor = editor
    this.logger = editor.loggerFor('event-manager')
    this._textInputHandler = new TextInputHandler(editor)
    this._listeners = []
    this.modifierKeys = {
      shift: false,
    }

    this._selectionManager = new SelectionManager(this.editor, this.selectionDidChange.bind(this))
    this.started = true
    this._isComposingOnBlankLine = false
  }

  init() {
    let {
      editor: { element },
    } = this
    assert(`Cannot init EventManager without element`, !!element)

    ELEMENT_EVENT_TYPES.forEach(type => {
      this._addListener(element, type)
    })

    this._selectionManager.start()
  }

  start() {
    this.started = true
  }

  stop() {
    this.started = false
  }

  registerInputHandler(inputHandler: TextInputHandlerListener) {
    this._textInputHandler.register(inputHandler)
  }

  unregisterInputHandler(name: string) {
    this._textInputHandler.unregister(name)
  }

  unregisterAllTextInputHandlers() {
    this._textInputHandler.destroy()
    this._textInputHandler = new TextInputHandler(this.editor)
  }

  _addListener(context: HTMLElement, type: DOMEventType) {
    assert(`Missing listener for ${type}`, !!this[type])

    let listener: (event: DOMEventForType<typeof type>) => void = event => this._handleEvent(type, event)
    context.addEventListener(type, listener)
    this._listeners.push([context, type, listener])
  }

  _removeListeners() {
    this._listeners.forEach(([context, type, listener]) => {
      context.removeEventListener(type, listener)
    })
    this._listeners = []
  }

  // This is primarily useful for programmatically simulating events on the
  // editor from the tests.
  _trigger(context: HTMLElement, type: DOMEventType, event: DOMEventForType<typeof type>) {
    forEach(
      filter(this._listeners, ([_context, _type]) => {
        return _context === context && _type === type
      }),
      ([context, , listener]) => {
        listener.call(context, event)
      }
    )
  }

  destroy() {
    this._textInputHandler.destroy()
    this._selectionManager.destroy()
    this._removeListeners()
  }

  _handleEvent(type: DOMEventType, event: DOMEventForType<typeof type>) {
    let { target: element } = event
    if (!this.started) {
      // abort handling this event
      return true
    }

    if (!this.isElementAddressable(element! as HTMLElement)) {
      // abort handling this event
      return true
    }

    ;(this[type] as (evt: typeof event) => void)(event)
  }

  isElementAddressable(element: Node) {
    return this.editor.cursor.isAddressable(element)
  }

  selectionDidChange(selection: PartialSelection /*, prevSelection */) {
    let shouldNotify = true
    let { anchorNode } = selection
    if (!this.isElementAddressable(anchorNode!)) {
      if (!this.editor.range.isBlank) {
        // Selection changed from something addressable to something
        // not-addressable -- e.g., blur event, user clicked outside editor,
        // etc
        shouldNotify = true
      } else {
        // selection changes wholly outside the editor should not trigger
        // change notifications
        shouldNotify = false
      }
    }

    if (shouldNotify) {
      this.editor._readRangeFromDOM()
    }
  }

  keypress(event: KeyboardEvent) {
    let { editor, _textInputHandler } = this
    if (!editor.hasCursor()) {
      return
    }

    let key = Key.fromEvent(event)
    if (!key.isPrintable()) {
      return
    } else {
      event.preventDefault()
    }

    // Handle carriage returns
    if (!key.isEnter() && key.keyCode === 13) {
      _textInputHandler.handleNewLine()
      editor.handleNewline(event)
      return
    }

    _textInputHandler.handle(key.toString())
  }

  keydown(event: KeyboardEvent) {
    let { editor } = this
    if (!editor.hasCursor()) {
      return
    }
    if (!editor.isEditable) {
      return
    }

    let key = Key.fromEvent(event)
    this._updateModifiersFromKey(key, { isDown: true })

    if (editor.handleKeyCommand(event)) {
      return
    }

    if (editor.post.isBlank) {
      editor._insertEmptyMarkupSectionAtCursor()
    }

    let range = editor.range

    switch (true) {
      // Ignore keydown events when using an IME
      case key.isIME(): {
        break
      }
      // FIXME This should be restricted to only card/atom boundaries
      case key.isHorizontalArrowWithoutModifiersOtherThanShift(): {
        let newRange
        if (key.isShift()) {
          newRange = range.extend(key.direction * 1)
        } else {
          newRange = range.move(key.direction)
        }

        editor.selectRange(newRange)
        event.preventDefault()
        break
      }
      case key.isDelete(): {
        let { direction } = key
        let unit = TextUnit.CHAR
        if (key.altKey && Browser.isMac()) {
          unit = TextUnit.WORD
        } else if (key.ctrlKey && !Browser.isMac()) {
          unit = TextUnit.WORD
        }
        editor.performDelete({ direction, unit })
        event.preventDefault()
        break
      }
      case key.isEnter():
        this._textInputHandler.handleNewLine()
        editor.handleNewline(event)
        break
      case key.isTab():
        // Handle tab here because it does not fire a `keypress` event
        event.preventDefault()
        this._textInputHandler.handle(key.toString())
        break
    }
  }

  keyup(event: KeyboardEvent) {
    let { editor } = this
    if (!editor.hasCursor()) {
      return
    }
    let key = Key.fromEvent(event)
    this._updateModifiersFromKey(key, { isDown: false })
  }

  // The mutation handler interferes with IMEs when composing
  // on a blank line. These two event handlers are for suppressing
  // mutation handling in this scenario.
  compositionstart(_event: KeyboardEvent) {
    let { editor } = this
    // Ignore compositionstart if not on a blank line
    if (editor.range.headMarker) {
      return
    }
    this._isComposingOnBlankLine = true

    if (editor.post.isBlank) {
      editor._insertEmptyMarkupSectionAtCursor()
    }

    // Stop listening for mutations on Chrome browsers and suppress
    // mutations by prepending a character for other browsers.
    // The reason why we treat these separately is because
    // of the way each browser processes IME inputs.
    if (Browser.isChrome()) {
      editor.setPlaceholder('')
      editor._mutationHandler.stopObserving()
    } else {
      this._textInputHandler.handle(' ')
    }
  }

  compositionend(event: CompositionEvent) {
    const { editor } = this

    // Ignore compositionend if not composing on blank line
    if (!this._isComposingOnBlankLine) {
      return
    }
    this._isComposingOnBlankLine = false

    // Start listening for mutations on Chrome browsers and
    // delete the prepended character introduced by compositionstart
    // for other browsers.
    if (Browser.isChrome()) {
      editor.insertText(event.data)
      editor.setPlaceholder(editor.placeholder)
      editor._mutationHandler.startObserving()
    } else {
      let startOfCompositionLine = editor.range.headSection!.toPosition(0)
      let endOfCompositionLine = editor.range.headSection!.toPosition(event.data.length)
      editor.run(postEditor => {
        postEditor.deleteAtPosition(startOfCompositionLine, 1, { unit: TextUnit.CHAR })
        postEditor.setRange(endOfCompositionLine)
      })
    }
  }

  cut(event: ClipboardEvent) {
    event.preventDefault()

    this.copy(event)
    this.editor.performDelete()
  }

  copy(event: ClipboardEvent) {
    event.preventDefault()

    let {
      editor,
      editor: { range, post },
    } = this
    post = post.trimTo(range)

    let data = {
      html: editor.serializePost(post, Format.HTML),
      text: editor.serializePost(post, Format.TEXT),
      mobiledoc: editor.serializePost(post, Format.MOBILEDOC),
    }

    editor.runCallbacks('willCopy', [data])

    setClipboardData(event, data, window)
  }

  paste(event: ClipboardEvent) {
    event.preventDefault()

    let { editor } = this
    let range = editor.range

    if (!range.isCollapsed) {
      editor.performDelete()
    }

    if (editor.post.isBlank) {
      editor._insertEmptyMarkupSectionAtCursor()
    }

    let position = editor.range.head
    let targetFormat = this.modifierKeys.shift ? 'text' : 'html'
    let pastedPost = parsePostFromPaste(event, editor, { targetFormat })

    editor.runCallbacks('willPaste', [pastedPost])

    editor.run(postEditor => {
      let nextPosition = postEditor.insertPost(position, pastedPost!)
      postEditor.setRange(nextPosition)
    })
  }

  drop(event: DragEvent) {
    event.preventDefault()

    let { clientX: x, clientY: y } = event
    let { editor } = this

    let position = editor.positionAtPoint(x, y)
    if (!position) {
      this.logger.log('Could not find drop position')
      return
    }

    let post = parsePostFromDrop(event, editor, { logger: this.logger })
    if (!post) {
      this.logger.log('Could not determine post from drop event')
      return
    }

    editor.run(postEditor => {
      let nextPosition = postEditor.insertPost(position!, post!)
      postEditor.setRange(nextPosition)
    })
  }

  _updateModifiersFromKey(key: Key, { isDown }: { isDown: boolean }) {
    if (key.isShiftKey()) {
      this.modifierKeys.shift = isDown
    }
  }
}


text:
using System;

namespace id
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.OutputEncoding = System.Text.Encoding.UTF8;
            Console.WriteLine("Ohjelmaa kertoo onko henkilötunnus oikea!");
            Console.WriteLine("Anna ohjelmalle henkilötunnus:");
            {
                string userInput = Console.ReadLine().Replace(" ", "").ToUpper();

                userInput = Remove(userInput.lenght - 1, 1).userInput.Replace("+", "").userInput.Replace("-", "").userInput.Replace("A", "");

                //int num = int.Parse(userInput);
                string idcheck = "0123456789ABCDEFHJKLMNPRSTUVWXY";
                int

                if
                {
                    Console.WriteLine("Henkilötunnus on OK");
                }
                else
                {
                    Console.WriteLine("Henkilötunnus on väärin");
                }

                //string idcheck = "0123456789ABCDEFHJKLMNPRSTUVWXY";

                //    if ((userInput.Length == 11) || (userInput.Substring(6, 7) != "-") && (userInput.Substring(6, 7) != "+") && (userInput.Substring(6, 7) != "A"))
                //    {
                //        Console.WriteLine("");
                //        Console.ReadLine();
                //    }
                //    else
                //    {
                //        Console.WriteLine("");
                //    }
                //    return realid.ToUpper();

                Console.ReadKey();
                //}

            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
\hypertarget{classmognetwork_1_1_i_runnable}{\section{mognetwork\-:\-:I\-Runnable Class Reference}
\label{classmognetwork_1_1_i_runnable}\index{mognetwork\-::\-I\-Runnable@{mognetwork\-::\-I\-Runnable}}
}

Create an execution function for the \hyperlink{classmognetwork_1_1_thread}{Thread} class.

{\ttfamily \#include $<$I\-Runnable.\-hh$>$}

Inheritance diagram for mognetwork\-:\-:I\-Runnable\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmognetwork_1_1_i_runnable}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
\hypertarget{classmognetwork_1_1_i_runnable_ac53515c8ecf2b2c79cb9c161fdd600d1}{virtual void \hyperlink{classmognetwork_1_1_i_runnable_ac53515c8ecf2b2c79cb9c161fdd600d1}{run} ()=0}\label{classmognetwork_1_1_i_runnable_ac53515c8ecf2b2c79cb9c161fdd600d1}

\begin{DoxyCompactList}\small\item\em The function to set, executed by the \hyperlink{classmognetwork_1_1_thread}{Thread}. \end{DoxyCompactList}\end{DoxyCompactItemize}

\subsection{Detailed Description}
Create an execution function for the \hyperlink{classmognetwork_1_1_thread}{Thread} class.

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item
include/mognetwork/\hyperlink{_i_runnable_8hh}{I\-Runnable.\-hh}\end{DoxyCompactItemize}


text:
<?php

namespace emilebons\moneybird\Contact;

use emilebons\moneybird\ConverterInterface;

class ContactConverter implements ConverterInterface
{

    public function convert($object)
    {
        // TODO: Implement convert() method.
    }

    public function parse(array $array)
    {
        $contact = new Contact();
        $contact->id = $array['id'];
        $contact->companyName = $array['company_name'];
        $contact->firstName = $array['firstname'];
        $contact->lastName = $array['lastname'];
        $contact->attention = $array['attention'];
        $contact->address1 = $array['address1'];
        $contact->address2 = $array['address2'];
        $contact->zipCode = $array['zipcode'];
        $contact->city = $array['city'];
        $contact->country = $array['country'];
        $contact->email = $array['email'];
        $contact->phone = $array['phone'];
        $contact->deliveryMethod = $array['delivery_method'];
        $contact->customerId = $array['customer_id'];
        $contact->taxNumber = $array['tax_number'];
        $contact->chamberOfCommerce = $array['chamber_of_commerce'];
        $contact->bankAccount = $array['bank_account'];
        $contact->sendInvoicesToAttention = $array['send_invoices_to_attention'];
        $contact->sendInvoicesToEmail = $array['send_invoices_to_email'];
        $contact->sendEstimatesToAttention = $array['send_estimates_to_attention'];
        $contact->sendEstimatesToEmail = $array['send_estimates_to_email'];
        $contact->sepaActive = $array['sepa_active'];
        $contact->sepaIban = $array['sepa_iban'];
        $contact->sepaIbanAccountName = $array['sepa_iban_account_name'];
        $contact->sepaBic = $array['sepa_bic'];
        $contact->sepaMandateId = $array['sepa_mandate_id'];
        $contact->sepaMandateDate = $array['sepa_mandate_date'];
        $contact->sepaSequenceType = $array['sepa_sequence_type'];
        $contact->creditCardNumber = $array['credit_card_number'];
        $contact->creditCardReference = $array['credit_card_reference'];
        $contact->creditCardType = $array['credit_card_type'];
        $contact->taxNumberValidatedAt = $array['tax_number_validated_at'];
        $contact->createdAt = $array['created_at'];
        $contact->updatedAt = $array['updated_at'];
        return $contact;
    }
}


text:
package org.apache.camel.component.microprofile.metrics;

import java.util.List;
import java.util.function.Function;

import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.component.microprofile.metrics.gauge.SimpleGauge;
import org.eclipse.microprofile.metrics.Metadata;
import org.eclipse.microprofile.metrics.MetricRegistry;
import org.eclipse.microprofile.metrics.Tag;

import static org.apache.camel.component.microprofile.metrics.MicroProfileMetricsConstants.HEADER_GAUGE_VALUE;
import static org.apache.camel.component.microprofile.metrics.MicroProfileMetricsHelper.findMetric;

public class MicroProfileMetricsGaugeProducer extends AbstractMicroProfileMetricsProducer<SimpleGauge> {

    public MicroProfileMetricsGaugeProducer(MicroProfileMetricsEndpoint endpoint) {
        super(endpoint);
    }

    @Override
    protected void doProcess(Exchange exchange, MicroProfileMetricsEndpoint endpoint, SimpleGauge gauge) {
        Message in = exchange.getIn();
        Number finalGaugeValue = getNumericHeader(in, HEADER_GAUGE_VALUE, endpoint.getGaugeValue());

        if (finalGaugeValue != null) {
            gauge.setValue(finalGaugeValue);
        }
    }

    @Override
    protected Function<MetricRegistry, SimpleGauge> registerMetric(Metadata metadata, List<Tag> tags) {
        return metricRegistry -> {
            Tag[] tagArray = tags.toArray(new Tag[0]);
            SimpleGauge existing = findMetric(metricRegistry, metadata.getName(), SimpleGauge.class, tags);
            if (existing == null) {
                return metricRegistry.register(metadata, new SimpleGauge(), tagArray);
            }
            return existing;
        };
    }
}


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

class Palindromes
{
	private static List<string> GetPalindromes(string text)
	{
		string[] words = text.Split(' ', ',', '.', '?', '!', ':', ';');
		List<string> palindromes = new List<string>();

		foreach (string word in words)
		{
			if (word.Equals(string.Empty))
				continue;

			bool isPalindrome = true;
			for (int i = 0; i < word.Length / 2; i++)
			{
				if (!word[i].Equals(word[word.Length - i - 1]))
				{
					isPalindrome = false;
					break;
				}
			}
			if (isPalindrome)
			{
				palindromes.Add(word);
			}
		}

		return palindromes;
	}

	static void Main(string[] args)
	{
		Console.WriteLine("Please enter the input strings:");
		string text = Console.ReadLine();
		List<string> palindromes = GetPalindromes(text);
		if (palindromes.Count == 0)
		{
			Console.WriteLine("There are no palindrones in the string");
		}
		else
		{
			Console.WriteLine("The palindrones are:");
			Console.WriteLine(string.Join(", ", palindromes));
		}
	}
}


text:
// Windows/FileDir.cpp

#include "StdAfx.h"

#ifndef _UNICODE
#include "../Common/StringConvert.h"
#endif

#include "FileDir.h"
#include "FileFind.h"
#include "FileName.h"

#ifndef _UNICODE
extern bool g_IsNT;
#endif

using namespace NWindows;
using namespace NFile;
using namespace NName;

namespace NWindows {
namespace NFile {
namespace NDir {

#ifndef UNDER_CE

bool GetWindowsDir(FString &path)
{
  UINT needLength;
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    TCHAR s[MAX_PATH + 2];
    s[0] = 0;
    needLength = ::GetWindowsDirectory(s, MAX_PATH + 1);
    path = fas2fs(s);
  }
  else
  #endif
  {
    WCHAR s[MAX_PATH + 2];
    s[0] = 0;
    needLength = ::GetWindowsDirectoryW(s, MAX_PATH + 1);
    path = us2fs(s);
  }
  return (needLength > 0 && needLength <= MAX_PATH);
}

bool GetSystemDir(FString &path)
{
  UINT needLength;
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    TCHAR s[MAX_PATH + 2];
    s[0] = 0;
    needLength = ::GetSystemDirectory(s, MAX_PATH + 1);
    path = fas2fs(s);
  }
  else
  #endif
  {
    WCHAR s[MAX_PATH + 2];
    s[0] = 0;
    needLength = ::GetSystemDirectoryW(s, MAX_PATH + 1);
    path = us2fs(s);
  }
  return (needLength > 0 && needLength <= MAX_PATH);
}
#endif

bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime)
{
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    ::SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    return false;
  }
  #endif

  HANDLE hDir = INVALID_HANDLE_VALUE;
  IF_USE_MAIN_PATH
    hDir = ::CreateFileW(fs2us(path), GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
        NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
  #ifdef WIN_LONG_PATH
  if (hDir == INVALID_HANDLE_VALUE && USE_SUPER_PATH)
  {
    UString superPath;
    if (GetSuperPath(path, superPath, USE_MAIN_PATH))
      hDir = ::CreateFileW(superPath, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
          NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
  }
  #endif

  bool res = false;
  if (hDir != INVALID_HANDLE_VALUE)
  {
    res = BOOLToBool(::SetFileTime(hDir, cTime, aTime, mTime));
    ::CloseHandle(hDir);
  }
  return res;
}

bool SetFileAttrib(CFSTR path, DWORD attrib)
{
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    if (::SetFileAttributes(fs2fas(path), attrib))
      return true;
  }
  else
  #endif
  {
    IF_USE_MAIN_PATH
      if (::SetFileAttributesW(fs2us(path), attrib))
        return true;
    #ifdef WIN_LONG_PATH
    if (USE_SUPER_PATH)
    {
      UString superPath;
      if (GetSuperPath(path, superPath, USE_MAIN_PATH))
        return BOOLToBool(::SetFileAttributesW(superPath, attrib));
    }
    #endif
  }
  return false;
}

bool SetFileAttrib_PosixHighDetect(CFSTR path, DWORD attrib)
{
  if ((attrib & 0xF0000000) != 0)
    attrib &= 0x3FFF;
  return SetFileAttrib(path, attrib);
}

bool RemoveDir(CFSTR path)
{
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    if (::RemoveDirectory(fs2fas(path)))
      return true;
  }
  else
  #endif
  {
    IF_USE_MAIN_PATH
      if (::RemoveDirectoryW(fs2us(path)))
        return true;
    #ifdef WIN_LONG_PATH
    if (USE_SUPER_PATH)
    {
      UString superPath;
      if (GetSuperPath(path, superPath, USE_MAIN_PATH))
        return BOOLToBool(::RemoveDirectoryW(superPath));
    }
    #endif
  }
  return false;
}

bool MyMoveFile(CFSTR oldFile, CFSTR newFile)
{
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    if (::MoveFile(fs2fas(oldFile), fs2fas(newFile)))
      return true;
  }
  else
  #endif
  {
    IF_USE_MAIN_PATH_2(oldFile, newFile)
      if (::MoveFileW(fs2us(oldFile), fs2us(newFile)))
        return true;
    #ifdef WIN_LONG_PATH
    if (USE_SUPER_PATH_2)
    {
      UString d1, d2;
      if (GetSuperPaths(oldFile, newFile, d1, d2, USE_MAIN_PATH_2))
        return BOOLToBool(::MoveFileW(d1, d2));
    }
    #endif
  }
  return false;
}

#ifndef UNDER_CE

EXTERN_C_BEGIN
typedef BOOL (WINAPI *Func_CreateHardLinkW)(
    LPCWSTR lpFileName,
    LPCWSTR lpExistingFileName,
    LPSECURITY_ATTRIBUTES lpSecurityAttributes
    );
EXTERN_C_END

bool MyCreateHardLink(CFSTR newFileName, CFSTR existFileName)
{
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    return false;
    /*
    if (::CreateHardLink(fs2fas(newFileName), fs2fas(existFileName), NULL))
      return true;
    */
  }
  else
  #endif
  {
    Func_CreateHardLinkW my_CreateHardLinkW = (Func_CreateHardLinkW)
        ::GetProcAddress(::GetModuleHandleW(L"kernel32.dll"), "CreateHardLinkW");
    if (!my_CreateHardLinkW)
      return false;
    IF_USE_MAIN_PATH_2(newFileName, existFileName)
      if (my_CreateHardLinkW(fs2us(newFileName), fs2us(existFileName), NULL))
        return true;
    #ifdef WIN_LONG_PATH
    if (USE_SUPER_PATH_2)
    {
      UString d1, d2;
      if (GetSuperPaths(newFileName, existFileName, d1, d2, USE_MAIN_PATH_2))
        return BOOLToBool(my_CreateHardLinkW(d1, d2, NULL));
    }
    #endif
  }
  return false;
}

#endif

/*
WinXP-64 CreateDir():
  ""                  - ERROR_PATH_NOT_FOUND
  \                   - ERROR_ACCESS_DENIED
  C:\                 - ERROR_ACCESS_DENIED, if there is such drive,

  D:\folder             - ERROR_PATH_NOT_FOUND, if there is no such drive,
  C:\nonExistent\folder - ERROR_PATH_NOT_FOUND

  C:\existFolder      - ERROR_ALREADY_EXISTS
  C:\existFolder\     - ERROR_ALREADY_EXISTS

  C:\folder   - OK
  C:\folder\  - OK

  \\Server\nonExistent    - ERROR_BAD_NETPATH
  \\Server\Share_Readonly - ERROR_ACCESS_DENIED
  \\Server\Share          - ERROR_ALREADY_EXISTS

  \\Server\Share_NTFS_drive - ERROR_ACCESS_DENIED
  \\Server\Share_FAT_drive  - ERROR_ALREADY_EXISTS
*/

bool CreateDir(CFSTR path)
{
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    if (::CreateDirectory(fs2fas(path), NULL))
      return true;
  }
  else
  #endif
  {
    IF_USE_MAIN_PATH
      if (::CreateDirectoryW(fs2us(path), NULL))
        return true;
    #ifdef WIN_LONG_PATH
    if ((!USE_MAIN_PATH || ::GetLastError() != ERROR_ALREADY_EXISTS) && USE_SUPER_PATH)
    {
      UString superPath;
      if (GetSuperPath(path, superPath, USE_MAIN_PATH))
        return BOOLToBool(::CreateDirectoryW(superPath, NULL));
    }
    #endif
  }
  return false;
}

/*
  CreateDir2 returns true, if directory can contain files after the call (two cases):
    1) the directory already exists
    2) the directory was created
  path must be WITHOUT trailing path separator.

  We need CreateDir2, since fileInfo.Find() for reserved names like "com8"
   returns FILE instead of DIRECTORY. And we need to use SuperPath */

static bool CreateDir2(CFSTR path)
{
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    if (::CreateDirectory(fs2fas(path), NULL))
      return true;
  }
  else
  #endif
  {
    IF_USE_MAIN_PATH
      if (::CreateDirectoryW(fs2us(path), NULL))
        return true;
    #ifdef WIN_LONG_PATH
    if ((!USE_MAIN_PATH || ::GetLastError() != ERROR_ALREADY_EXISTS) && USE_SUPER_PATH)
    {
      UString superPath;
      if (GetSuperPath(path, superPath, USE_MAIN_PATH))
      {
        if (::CreateDirectoryW(superPath, NULL))
          return true;
        if (::GetLastError() != ERROR_ALREADY_EXISTS)
          return false;
        NFind::CFileInfo fi;
        if (!fi.Find(us2fs(superPath)))
          return false;
        return fi.IsDir();
      }
    }
    #endif
  }
  if (::GetLastError() != ERROR_ALREADY_EXISTS)
    return false;
  NFind::CFileInfo fi;
  if (!fi.Find(path))
    return false;
  return fi.IsDir();
}

bool CreateComplexDir(CFSTR _path)
{
  #ifdef _WIN32

  {
    DWORD attrib = NFind::GetFileAttrib(_path);
    if (attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_DIRECTORY) != 0)
      return true;
  }

  #ifndef UNDER_CE

  if (IsDriveRootPath_SuperAllowed(_path))
    return false;

  unsigned prefixSize = GetRootPrefixSize(_path);

  #endif

  #endif

  FString path (_path);

  int pos = path.ReverseFind_PathSepar();
  if (pos >= 0 && (unsigned)pos == path.Len() - 1)
  {
    if (path.Len() == 1)
      return true;
    path.DeleteBack();
  }

  const FString path2 (path);
  pos = path.Len();

  for (;;)
  {
    if (CreateDir2(path))
      break;
    if (::GetLastError() == ERROR_ALREADY_EXISTS)
      return false;
    pos = path.ReverseFind_PathSepar();
    if (pos < 0 || pos == 0)
      return false;

    #if defined(_WIN32) && !defined(UNDER_CE)
    if (pos == 1 && IS_PATH_SEPAR(path[0]))
      return false;
    if (prefixSize >= (unsigned)pos + 1)
      return false;
    #endif

    path.DeleteFrom(pos);
  }

  while (pos < (int)path2.Len())
  {
    int pos2 = NName::FindSepar(path2.Ptr(pos + 1));
    if (pos2 < 0)
      pos = path2.Len();
    else
      pos += 1 + pos2;
    path.SetFrom(path2, pos);
    if (!CreateDir(path))
      return false;
  }

  return true;
}

bool DeleteFileAlways(CFSTR path)
{
  /* If alt stream, we also need to clear READ-ONLY attribute of main file before delete.
     SetFileAttrib("name:stream", ) changes attributes of main file. */
  {
    DWORD attrib = NFind::GetFileAttrib(path);
    if (attrib != INVALID_FILE_ATTRIBUTES
        && (attrib & FILE_ATTRIBUTE_DIRECTORY) == 0
        && (attrib & FILE_ATTRIBUTE_READONLY) != 0)
    {
      if (!SetFileAttrib(path, attrib & ~FILE_ATTRIBUTE_READONLY))
        return false;
    }
  }

  #ifndef _UNICODE
  if (!g_IsNT)
  {
    if (::DeleteFile(fs2fas(path)))
      return true;
  }
  else
  #endif
  {
    /* DeleteFile("name::$DATA") deletes all alt streams (same as delete DeleteFile("name")).
       Maybe it's better to open "name::$DATA" and clear data for unnamed stream? */
    IF_USE_MAIN_PATH
      if (::DeleteFileW(fs2us(path)))
        return true;
    #ifdef WIN_LONG_PATH
    if (USE_SUPER_PATH)
    {
      UString superPath;
      if (GetSuperPath(path, superPath, USE_MAIN_PATH))
        return BOOLToBool(::DeleteFileW(superPath));
    }
    #endif
  }
  return false;
}

bool RemoveDirWithSubItems(const FString &path)
{
  bool needRemoveSubItems = true;
  {
    NFind::CFileInfo fi;
    if (!fi.Find(path))
      return false;
    if (!fi.IsDir())
    {
      ::SetLastError(ERROR_DIRECTORY);
      return false;
    }
    if (fi.HasReparsePoint())
      needRemoveSubItems = false;
  }

  if (needRemoveSubItems)
  {
    FString s (path);
    s.Add_PathSepar();
    const unsigned prefixSize = s.Len();
    NFind::CEnumerator enumerator;
    enumerator.SetDirPrefix(s);
    NFind::CFileInfo fi;
    while (enumerator.Next(fi))
    {
      s.DeleteFrom(prefixSize);
      s += fi.Name;
      if (fi.IsDir())
      {
        if (!RemoveDirWithSubItems(s))
          return false;
      }
      else if (!DeleteFileAlways(s))
        return false;
    }
  }

  if (!SetFileAttrib(path, 0))
    return false;
  return RemoveDir(path);
}

#ifdef UNDER_CE

bool MyGetFullPathName(CFSTR path, FString &resFullPath)
{
  resFullPath = path;
  return true;
}

#else

bool MyGetFullPathName(CFSTR path, FString &resFullPath)
{
  return GetFullPath(path, resFullPath);
}

bool SetCurrentDir(CFSTR path)
{
  // SetCurrentDirectory doesn't support \\?\ prefix
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    return BOOLToBool(::SetCurrentDirectory(fs2fas(path)));
  }
  else
  #endif
  {
    return BOOLToBool(::SetCurrentDirectoryW(fs2us(path)));
  }
}

bool GetCurrentDir(FString &path)
{
  path.Empty();
  DWORD needLength;
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    TCHAR s[MAX_PATH + 2];
    s[0] = 0;
    needLength = ::GetCurrentDirectory(MAX_PATH + 1, s);
    path = fas2fs(s);
  }
  else
  #endif
  {
    WCHAR s[MAX_PATH + 2];
    s[0] = 0;
    needLength = ::GetCurrentDirectoryW(MAX_PATH + 1, s);
    path = us2fs(s);
  }
  return (needLength > 0 && needLength <= MAX_PATH);
}

#endif

bool GetFullPathAndSplit(CFSTR path, FString &resDirPrefix, FString &resFileName)
{
  bool res = MyGetFullPathName(path, resDirPrefix);
  if (!res)
    resDirPrefix = path;
  int pos = resDirPrefix.ReverseFind_PathSepar();
  resFileName = resDirPrefix.Ptr(pos + 1);
  resDirPrefix.DeleteFrom(pos + 1);
  return res;
}

bool GetOnlyDirPrefix(CFSTR path, FString &resDirPrefix)
{
  FString resFileName;
  return GetFullPathAndSplit(path, resDirPrefix, resFileName);
}

bool MyGetTempPath(FString &path)
{
  path.Empty();
  DWORD needLength;
  #ifndef _UNICODE
  if (!g_IsNT)
  {
    TCHAR s[MAX_PATH + 2];
    s[0] = 0;
    needLength = ::GetTempPath(MAX_PATH + 1, s);
    path = fas2fs(s);
  }
  else
  #endif
  {
    WCHAR s[MAX_PATH + 2];
    s[0] = 0;
    needLength = ::GetTempPathW(MAX_PATH + 1, s);;
    path = us2fs(s);
  }
  return (needLength > 0 && needLength <= MAX_PATH);
}

static bool CreateTempFile(CFSTR prefix, bool addRandom, FString &path, NIO::COutFile *outFile)
{
  UInt32 d = (GetTickCount() << 12) ^ (GetCurrentThreadId() << 14) ^ GetCurrentProcessId();
  for (unsigned i = 0; i < 100; i++)
  {
    path = prefix;
    if (addRandom)
    {
      char s[16];
      UInt32 val = d;
      unsigned k;
      for (k = 0; k < 8; k++)
      {
        unsigned t = val & 0xF;
        val >>= 4;
        s[k] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
      }
      s[k] = '\0';
      if (outFile)
        path += '.';
      path += s;
      UInt32 step = GetTickCount() + 2;
      if (step == 0)
        step = 1;
      d += step;
    }
    addRandom = true;
    if (outFile)
      path += ".tmp";
    if (NFind::DoesFileOrDirExist(path))
    {
      SetLastError(ERROR_ALREADY_EXISTS);
      continue;
    }
    if (outFile)
    {
      if (outFile->Create(path, false))
        return true;
    }
    else
    {
      if (CreateDir(path))
        return true;
    }
    DWORD error = GetLastError();
    if (error != ERROR_FILE_EXISTS &&
        error != ERROR_ALREADY_EXISTS)
      break;
  }
  path.Empty();
  return false;
}

bool CTempFile::Create(CFSTR prefix, NIO::COutFile *outFile)
{
  if (!Remove())
    return false;
  if (!CreateTempFile(prefix, false, _path, outFile))
    return false;
  _mustBeDeleted = true;
  return true;
}

bool CTempFile::CreateRandomInTempFolder(CFSTR namePrefix, NIO::COutFile *outFile)
{
  if (!Remove())
    return false;
  FString tempPath;
  if (!MyGetTempPath(tempPath))
    return false;
  if (!CreateTempFile(tempPath + namePrefix, true, _path, outFile))
    return false;
  _mustBeDeleted = true;
  return true;
}

bool CTempFile::Remove()
{
  if (!_mustBeDeleted)
    return true;
  _mustBeDeleted = !DeleteFileAlways(_path);
  return !_mustBeDeleted;
}

bool CTempFile::MoveTo(CFSTR name, bool deleteDestBefore)
{
  // DWORD attrib = 0;
  if (deleteDestBefore)
  {
    if (NFind::DoesFileExist(name))
    {
      // attrib = NFind::GetFileAttrib(name);
      if (!DeleteFileAlways(name))
        return false;
    }
  }
  DisableDeleting();
  return MyMoveFile(_path, name);

  /*
  if (attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_READONLY))
  {
    DWORD attrib2 = NFind::GetFileAttrib(name);
    if (attrib2 != INVALID_FILE_ATTRIBUTES)
      SetFileAttrib(name, attrib2 | FILE_ATTRIBUTE_READONLY);
  }
  */
}

bool CTempDir::Create(CFSTR prefix)
{
  if (!Remove())
    return false;
  FString tempPath;
  if (!MyGetTempPath(tempPath))
    return false;
  if (!CreateTempFile(tempPath + prefix, true, _path, NULL))
    return false;
  _mustBeDeleted = true;
  return true;
}

bool CTempDir::Remove()
{
  if (!_mustBeDeleted)
    return true;
  _mustBeDeleted = !RemoveDirWithSubItems(_path);
  return !_mustBeDeleted;
}

}}}


text:
/*
 * Program:	Default driver linkage
 *
 * Author:	Mark Crispin
 *		Networks and Distributed Computing
 *		Computing & Communications
 *		University of Washington
 *		Administration Building, AG-44
 *		Seattle, WA  98195
 *		Internet: MRC@CAC.Washington.EDU
 *
 * Date:	13 June 1995
 * Last Edited:	23 May 2007
 */

  mail_link (&imapdriver);		/* link in the imap driver */
  mail_link (&nntpdriver);		/* link in the nntp driver */
  mail_link (&pop3driver);		/* link in the pop3 driver */
  mail_link (&dummydriver);		/* link in the dummy driver */
  auth_link (&auth_ext);		/* link in the ext authenticator */
  auth_link (&auth_md5);		/* link in the md5 authenticator */
  auth_link (&auth_pla);		/* link in the plain authenticator */
  auth_link (&auth_log);		/* link in the log authenticator */
  mail_versioncheck (CCLIENTVERSION);	/* validate version */


text:
package taiga.beans;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import taiga.interfaces.ErrorCode;
import taiga.interfaces.ModelException;

class BeanPropertyDescriptor {
	private Object propName;
	private Method readMethod;
	private Method writeMethod;
	private Class<?> type;
	private Class<?> objectType;

	public BeanPropertyDescriptor(Object propName, Method readMethod, Method writeMethod, Class<?> type, Class<?> objectType) {
		super();
		this.propName = propName;
		this.readMethod = readMethod;
		this.writeMethod = writeMethod;
		this.type = type;
		this.objectType = objectType;
	}

	public Class<?> getBaseClass() {
		return objectType;
	}

	public Object get(BeanNode<?> node, Object bean) throws ModelException {
		try {
			Object result = readMethod.invoke(bean);
			return result;
		} catch (IllegalArgumentException e) {
			throw new ModelException(e, ErrorCode.PROPERTY_GET_FAILED, propName);
		} catch (IllegalAccessException e) {
			throw new ModelException(e, ErrorCode.PROPERTY_GET_FAILED, propName);
		} catch (InvocationTargetException e) {
			Exception ex = e;
			Throwable inner = e.getCause();
			if(inner instanceof Error) {
				if(!(inner instanceof AssertionError))
					throw (Error)inner;
			}
			else if(inner instanceof Exception)
				ex = (Exception) inner;
			throw new ModelException(ex, ErrorCode.PROPERTY_GET_FAILED, propName);
		}
	}

	public void set(BeanNode<?> node, Object bean, Object value) throws ModelException {
		Class<?> leftClass = node.getPropertyBaseClass(propName);
		if(writeMethod == null)
			throw new ModelException(ErrorCode.PROP_SET_NOT_SUPPORTED, propName);
		try {
			writeMethod.invoke(bean, value);
		} catch (IllegalArgumentException e) {
			throw new ModelException(e, ErrorCode.INCOMPATIBLE_TYPES, leftClass, value.getClass());
		} catch (IllegalAccessException e) {
			throw new ModelException(e, ErrorCode.PROPERTY_SET_FAILED, propName);
		} catch (InvocationTargetException e) {
			Exception ex = e;
			Throwable inner = e.getCause();
			if(inner instanceof Error) {
				if(!(inner instanceof AssertionError))
					throw (Error)inner;
			}
			else if(inner instanceof Exception)
				ex = (Exception) inner;
			throw new ModelException(ex, ErrorCode.PROPERTY_SET_FAILED, propName);
		}
	}

}


text:
#ifndef PMCppHelper_H_
#define PMCppHelper_H_

#include "PMCppCallbackHelper.h"
#include "PMCppUtilityHelper.h"

class PMCppHelper
{
private:
    std::string m_failureMessage;

public:
    static OCPersistentStorage s_ps;

    PMCppHelper();

    static FILE* clientOpen(const char *UNUSED_PARAM, const char *mode);

    bool provisionInit(const std::string& dbPath = CLIENT_DB_01);

    static FILE* clientOpen2(const char *UNUSED_PARAM, const char *mode);

	bool provisionInit2(const std::string& dbPath = CLIENT_DB_01);

    bool pdmCleanupForTimeout(OCStackResult expectedResult);

    bool configSelfOwnership(OCStackResult expectedResult);

    bool setRandomPinPolicy(size_t pinSize, OicSecPinType_t pinType, OCStackResult expectedResult);

    bool setDisplayPinCB(GeneratePinCallback displayPin, OCStackResult expectedResult);

    bool unsetDisplayPinCB(OCStackResult expectedResult);

    bool registerInputPinCallback(InputPinCB inputPinCB,
            InputPinCallbackHandle* inputPinCallbackHandle, OCStackResult expectedResult);

    bool deregisterInputPinCallback(InputPinCallbackHandle inputPinCallbackHandle,
            OCStackResult expectedResult);

    bool registerDisplayPinCallback(DisplayPinCB displayPinCB,
            DisplayPinCallbackHandle* displayPinCallbackHandle, OCStackResult expectedResult);

    bool deregisterDisplayPinCallback(DisplayPinCallbackHandle displayPinCallbackHandle,
            OCStackResult expectedResult);

    bool setInputPinCallback(InputPinCallback inputPin, OCStackResult expectedResult);

    bool unsetInputPinCallback(OCStackResult expectedResult);

    bool registerDisplayNumCallback(DisplayNumCB displayNumCB, OCStackResult expectedResult);

    bool deregisterDisplayNumCallback(OCStackResult expectedResult);

    bool registerUserConfirmCallback(UserConfirmNumCB userConfirmCB, OCStackResult expectedResult);

    bool deregisterUserConfirmCallback(OCStackResult expectedResult);

    bool discoverUnownedDevices(int time, DeviceList_t& data, OCStackResult expectedResult);

    bool discoverSingleDevice(unsigned short timeout, const OicUuid_t* deviceID,
            std::shared_ptr< OCSecureResource > &foundDevice, OCStackResult expectedResult);

    bool discoverSingleDeviceInUnicast(unsigned short timeout, const OicUuid_t* deviceID,
            const std::string& hostAddress, OCConnectivityType connType,
            std::shared_ptr< OCSecureResource > &foundDevice, OCStackResult expectedResult);

    bool discoverOwnedDevices(int time, DeviceList_t& data, OCStackResult expectedResult);

    bool getDevInfoFromNetwork(unsigned short time, DeviceList_t& ownedDevList,
            DeviceList_t &unownedDevList, OCStackResult expectedResult);

    bool setOwnerTransferCallbackData(int num, OTMCallbackData_t& data, InputPinCallback inputPin,
            OCStackResult expectedResult);

    bool doOwnershipTransfer(DeviceList_t &data, ResultCallBack resultCallback,
            OCStackResult expectedResult);

    bool provisionACL(DeviceList_t& deviceList, const OicSecAcl_t* acl,
            ResultCallBack resultCallback, OCStackResult expectedResult);

    bool provisionCredentials(DeviceList_t& deviceList, const Credential &cred,
            const OCSecureResource &device2, ResultCallBack resultCallback,
            OCStackResult expectedResult);

    bool provisionPairwiseDevices(DeviceList_t& deviceList, const Credential &cred,
            const OicSecAcl_t* acl1, const OCSecureResource &device2, const OicSecAcl_t* acl2,
            ResultCallBack resultCallback, OCStackResult expectedResult);

    bool getLinkedDevices(DeviceList_t& deviceList, UuidList_t &uuidList,
            OCStackResult expectedResult);

    bool getOTMethod(DeviceList_t& deviceList, OicSecOxm_t* oxm, OCStackResult expectedResult);

    bool getSelectedOwnershipTransferMethod(DeviceList_t& deviceList, OicSecOxm_t expectedResult);

    bool unlinkDevices(DeviceList_t& deviceList, const OCSecureResource &device2,
            ResultCallBack resultCallback, OCStackResult expectedResult);

    bool removeDevice(DeviceList_t& deviceList, unsigned short waitTimeForOwnedDeviceDiscovery,
            ResultCallBack resultCallback, OCStackResult expectedResult);

    bool removeDeviceWithUuid(unsigned short waitTimeForOwnedDeviceDiscovery, std::string uuid,
            ResultCallBack resultCallback, OCStackResult expectedResult);

    bool saveACL(const OicSecAcl_t* acl, OCStackResult expectedResult);

    bool provisionTrustCertChain(DeviceList_t& deviceList, OicSecCredType_t type, uint16_t credId,
            ResultCallBack resultCallback, OCStackResult expectedResult);

    static void createAcl(OicSecAcl_t *acl, const int dev_num, int nPermission,
            DeviceList_t &m_OwnedDevList);

    static OicSecAcl_t* createAclForLEDAccess(const OicUuid_t* subject);

    static void ownershipTransferCB(PMResultList_t *result, int hasError);

    static void provisionCB(PMResultList_t *result, int hasError);

    static void inputPinCB(char* pinBuf, size_t bufSize);

    static void OnInputPinCB(OicUuid_t deviceId, char* pinBuf, size_t bufSize);

    static void OnDisplayPinCB(char* pinData, size_t pinSize);

    static OCStackResult displayMutualVerifNumCB(uint8_t mutualVerifNum[MUTUAL_VERIF_NUM_LEN]);

    static OCStackResult confirmMutualVerifNumCB(void);

    static OicSecPdAcl_t* createPdAcl(int nPermission);

    bool deleteACLList(OicSecAcl_t* pAcl);

    OCProvisionDev_t* getDevInst(const OCProvisionDev_t* dev_lst, const int dev_num);

    std::string getFailureMessage();

    int waitCallbackRet();

    bool convertStrToUuid(std::string uuid, OicUuid_t* deviceID, OCStackResult expectedResult);
};

#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <committees>
      <billCommittees>
        <item>
          <systemCode>ssva00</systemCode>
          <chamber>Senate</chamber>
          <name>Veterans' Affairs Committee</name>
          <subcommittees />
          <type>Standing</type>
          <activities>
            <item>
              <date>2017-05-24T16:36:04Z</date>
              <name>Referred to</name>
            </item>
          </activities>
        </item>
        <item>
          <systemCode>hsvr00</systemCode>
          <chamber>House</chamber>
          <name>Veterans' Affairs Committee</name>
          <subcommittees>
            <item>
              <systemCode>hsvr03</systemCode>
              <name>Health Subcommittee</name>
              <activities>
                <item>
                  <date>2017-04-06T13:28:09Z</date>
                  <name>Reported by</name>
                </item>
                <item>
                  <date>2017-03-29T15:56:29Z</date>
                  <name>Hearings by</name>
                </item>
                <item>
                  <date>2017-03-27T15:52:11Z</date>
                  <name>Referred to</name>
                </item>
              </activities>
            </item>
          </subcommittees>
          <type>Standing</type>
          <activities>
            <item>
              <date>2017-05-22T21:25:46Z</date>
              <name>Reported by</name>
            </item>
            <item>
              <date>2017-05-17T13:26:40Z</date>
              <name>Markup by</name>
            </item>
            <item>
              <date>2017-03-15T20:31:10Z</date>
              <name>Referred to</name>
            </item>
          </activities>
        </item>
      </billCommittees>
    </committees>
    <notes />
    <titles>
      <item>
        <title>VA Prescription Data Accountability Act</title>
        <titleType>(Extracted from GPO) Short Titles as Passed House</titleType>
        <chamberName>House</chamberName>
        <chamberCode>H</chamberCode>
        <parentTitleType />
      </item>
      <item>
        <title>VA Prescription Data Accountability Act</title>
        <titleType>(Extracted from GPO) Short Titles as Reported to House</titleType>
        <chamberName>House</chamberName>
        <chamberCode>H</chamberCode>
        <parentTitleType />
      </item>
      <item>
        <title>VA Prescription Data Accountability Act</title>
        <titleType>(Extracted from GPO) Short Titles as Introduced</titleType>
        <chamberName />
        <chamberCode />
        <parentTitleType />
      </item>
      <item>
        <title>VA Prescription Data Accountability Act 2017</title>
        <titleType>Short Titles as Passed House</titleType>
        <chamberName>House</chamberName>
        <chamberCode>H</chamberCode>
        <parentTitleType>Short Titles House of Representatives</parentTitleType>
      </item>
      <item>
        <title>VA Prescription Data Accountability Act 2017</title>
        <titleType>Short Titles as Reported to House</titleType>
        <chamberName>House</chamberName>
        <chamberCode>H</chamberCode>
        <parentTitleType>Short Titles House of Representatives</parentTitleType>
      </item>
      <item>
        <title>VA Prescription Data Accountability Act 2017</title>
        <titleType>Short Titles as Introduced</titleType>
        <chamberName />
        <chamberCode />
        <parentTitleType />
      </item>
      <item>
        <title>To amend title 38, United States Code, to clarify the authority of the Secretary of Veterans Affairs to disclose certain patient information to State controlled substance monitoring programs, and for other purposes.</title>
        <titleType>Official Title as Introduced</titleType>
        <chamberName />
        <chamberCode />
        <parentTitleType />
      </item>
      <item>
        <title>VA Prescription Data Accountability Act 2017</title>
        <titleType>Display Title</titleType>
        <chamberName />
        <chamberCode />
        <parentTitleType />
      </item>
    </titles>
    <billNumber>1545</billNumber>
    <version>1.0.0</version>
    <calendarNumbers>
      <item>
        <calendar>U00093</calendar>
        <number />
      </item>
    </calendarNumbers>
    <sponsors>
      <item>
        <party>D</party>
        <bioguideId>K000382</bioguideId>
        <middleName>M.</middleName>
        <state>NH</state>
        <identifiers>
          <gpoId />
          <bioguideId>K000382</bioguideId>
          <lisID>2145</lisID>
        </identifiers>
        <district>2</district>
        <byRequestType />
        <firstName>Ann</firstName>
        <fullName>Rep. Kuster, Ann M. [D-NH-2]</fullName>
        <lastName>Kuster</lastName>
      </item>
    </sponsors>
    <title>VA Prescription Data Accountability Act 2017</title>
    <laws />
    <actions>
      <actionByCounts>
        <houseOfRepresentatives>17</houseOfRepresentatives>
        <senate>1</senate>
      </actionByCounts>
      <item>
        <actionDate>2017-05-24</actionDate>
        <committee>
          <name>Veterans' Affairs Committee</name>
          <systemCode>ssva00</systemCode>
        </committee>
        <links />
        <sourceSystem>
          <name>Senate</name>
          0
        </sourceSystem>
        <text>Received in the Senate and Read twice and referred to the Committee on Veterans' Affairs.</text>
        <type>IntroReferral</type>
      </item>
      <item>
        <type>Floor</type>
        <links />
        <text>Motion to reconsider laid on the table Agreed to without objection.</text>
        <actionTime>15:48:43</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H38310</actionCode>
        <actionDate>2017-05-23</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H4473</name>
            <url>https://www.congress.gov/congressional-record/volume-163/house-section/page/H4473</url>
          </link>
        </links>
        <text>On motion to suspend the rules and pass the bill Agreed to by voice vote. (text: CR H4473)</text>
        <actionTime>15:48:42</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H37300</actionCode>
        <actionDate>2017-05-23</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links />
        <text>Passed/agreed to in House: On motion to suspend the rules and pass the bill Agreed to by voice vote.</text>
        <actionTime>15:48:42</actionTime>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <committee />
        <actionCode>8000</actionCode>
        <actionDate>2017-05-23</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H.R. 1545</name>
            <url>https://www.congress.gov/bill/115th-congress/house-bill/1545</url>
          </link>
        </links>
        <text>DEBATE - The House proceeded with forty minutes of debate on H.R. 1545.</text>
        <actionTime>15:36:04</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H8D000</actionCode>
        <actionDate>2017-05-23</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H4473-4475</name>
            <url>https://www.congress.gov/congressional-record/volume-163/house-section/page/H4473-4475</url>
          </link>
        </links>
        <text>Considered under suspension of the rules. (consideration: CR H4473-4475)</text>
        <actionTime>15:36:02</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H30000</actionCode>
        <actionDate>2017-05-23</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links />
        <text>Mr. Roe (TN) moved to suspend the rules and pass the bill.</text>
        <actionTime>15:36:01</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H30300</actionCode>
        <actionDate>2017-05-23</actionDate>
      </item>
      <item>
        <type>Calendars</type>
        <links />
        <text>Placed on the Union Calendar, Calendar No. 93.</text>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H12410</actionCode>
        <actionDate>2017-05-22</actionDate>
      </item>
      <item>
        <type>Committee</type>
        <links>
          <link>
            <name>H. Rept. 115-144</name>
            <url>https://www.congress.gov/congressional-report/115th-congress/house-report/144</url>
          </link>
        </links>
        <text>Reported by the Committee on Veterans' Affairs. H. Rept. 115-144.</text>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee>
          <name>Veterans' Affairs Committee</name>
          <systemCode>hsvr00</systemCode>
        </committee>
        <actionCode>H12200</actionCode>
        <actionDate>2017-05-22</actionDate>
      </item>
      <item>
        <type>Committee</type>
        <links>
          <link>
            <name>H. Rept. 115-144</name>
            <url>https://www.congress.gov/congressional-report/115th-congress/house-report/144</url>
          </link>
        </links>
        <text>Reported by the Committee on Veterans' Affairs. H. Rept. 115-144.</text>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <committee>
          <name>Veterans' Affairs Committee</name>
          <systemCode>hsvr00</systemCode>
        </committee>
        <actionCode>5000</actionCode>
        <actionDate>2017-05-22</actionDate>
      </item>
      <item>
        <actionDate>2017-05-17</actionDate>
        <committee>
          <name>Veterans' Affairs Committee</name>
          <systemCode>hsvr00</systemCode>
        </committee>
        <links />
        <sourceSystem>
          <name>House committee actions</name>
          1
        </sourceSystem>
        <text>Ordered to be Reported by Voice Vote.</text>
        <type>Committee</type>
      </item>
      <item>
        <actionDate>2017-05-17</actionDate>
        <committee>
          <name>Veterans' Affairs Committee</name>
          <systemCode>hsvr00</systemCode>
        </committee>
        <links />
        <sourceSystem>
          <name>House committee actions</name>
          1
        </sourceSystem>
        <text>Committee Consideration and Mark-up Session Held.</text>
        <type>Committee</type>
      </item>
      <item>
        <actionDate>2017-04-06</actionDate>
        <committee>
          <name>Health Subcommittee</name>
          <systemCode>hsvr03</systemCode>
        </committee>
        <links />
        <sourceSystem>
          <name>House committee actions</name>
          1
        </sourceSystem>
        <text>Forwarded by Subcommittee to Full Committee by Voice Vote .</text>
        <type>Committee</type>
      </item>
      <item>
        <actionDate>2017-03-29</actionDate>
        <committee>
          <name>Health Subcommittee</name>
          <systemCode>hsvr03</systemCode>
        </committee>
        <links />
        <sourceSystem>
          <name>House committee actions</name>
          1
        </sourceSystem>
        <text>Subcommittee Hearings Held.</text>
        <type>Committee</type>
      </item>
      <item>
        <actionDate>2017-03-27</actionDate>
        <committee>
          <name>Health Subcommittee</name>
          <systemCode>hsvr03</systemCode>
        </committee>
        <links />
        <sourceSystem>
          <name>House committee actions</name>
          1
        </sourceSystem>
        <text>Referred to the Subcommittee on Health.</text>
        <type>Committee</type>
      </item>
      <item>
        <type>IntroReferral</type>
        <links />
        <text>Referred to the House Committee on Veterans' Affairs.</text>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee>
          <name>Veterans' Affairs Committee</name>
          <systemCode>hsvr00</systemCode>
        </committee>
        <actionCode>H11100</actionCode>
        <actionDate>2017-03-15</actionDate>
      </item>
      <item>
        <type>IntroReferral</type>
        <links />
        <text>Introduced in House</text>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <committee />
        <actionCode>Intro-H</actionCode>
        <actionDate>2017-03-15</actionDate>
      </item>
      <item>
        <type>IntroReferral</type>
        <links />
        <text>Introduced in House</text>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <committee />
        <actionCode>1000</actionCode>
        <actionDate>2017-03-15</actionDate>
      </item>
      <actionTypeCounts>
        <referredToCommittee>1</referredToCommittee>
        <billReferrals>1</billReferrals>
        <motionToReconsiderResults>1</motionToReconsiderResults>
        <reportedToHouse>1</reportedToHouse>
        <passedAgreedToInHouse>1</passedAgreedToInHouse>
        <introducedInTheHouse>1</introducedInTheHouse>
        <committeeReportOfABill>1</committeeReportOfABill>
        <motionMadeToSuspendTheRules>1</motionMadeToSuspendTheRules>
        <introducedInHouse>1</introducedInHouse>
        <generalDebate>1</generalDebate>
        <placeholderTextForH>3</placeholderTextForH>
        <unionCalendarAssignment>1</unionCalendarAssignment>
        <considerationByHouse>1</considerationByHouse>
        <actionStageOverride>1</actionStageOverride>
        <prayer>1</prayer>
        <finalPassageUnderSuspensionOfTheRulesResults>1</finalPassageUnderSuspensionOfTheRulesResults>
      </actionTypeCounts>
    </actions>
    <introducedDate>2017-03-15</introducedDate>
    <relatedBills>
      <item>
        <number>1567</number>
        <latestTitle>VA Prescription Data Accountability Act of 2017</latestTitle>
        <congress>115</congress>
        <relationshipDetails>
          <item>
            <type>Related bill</type>
            <identifiedBy>CRS</identifiedBy>
          </item>
        </relationshipDetails>
        <latestAction>
          <actionDate>2017-07-13</actionDate>
          <text>Read twice and referred to the Committee on Veterans' Affairs.</text>
        </latestAction>
        <type>S</type>
      </item>
    </relatedBills>
    <billType>HR</billType>
    <cboCostEstimates>
      <item>
        <pubDate>2017-05-19T19:02:00Z</pubDate>
        <title>H.R. 1545, VA Prescription Data Accountability Act 2017</title>
        <url>https://www.cbo.gov/publication/52745</url>
      </item>
    </cboCostEstimates>
    <originChamber>House</originChamber>
    <cosponsors>
      <item>
        <sponsorshipWithdrawnDate />
        <district>2</district>
        <identifiers>
          <bioguideId>W000815</bioguideId>
          <gpoId />
          <lisID>2152</lisID>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName>R.</middleName>
        <bioguideId>W000815</bioguideId>
        <fullName>Rep. Wenstrup, Brad R. [R-OH-2]</fullName>
        <state>OH</state>
        <party>R</party>
        <lastName>Wenstrup</lastName>
        <firstName>Brad</firstName>
        <sponsorshipDate>2017-03-15</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>1</district>
        <identifiers>
          <bioguideId>B001301</bioguideId>
          <gpoId />
          <lisID>2333</lisID>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <bioguideId>B001301</bioguideId>
        <fullName>Rep. Bergman, Jack [R-MI-1]</fullName>
        <state>MI</state>
        <party>R</party>
        <lastName>Bergman</lastName>
        <firstName>Jack</firstName>
        <sponsorshipDate>2017-03-15</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>26</district>
        <identifiers>
          <bioguideId>B001285</bioguideId>
          <lisID>2106</lisID>
          <gpoId />
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <bioguideId>B001285</bioguideId>
        <fullName>Rep. Brownley, Julia [D-CA-26]</fullName>
        <state>CA</state>
        <party>D</party>
        <lastName>Brownley</lastName>
        <firstName>Julia</firstName>
        <sponsorshipDate>2017-03-15</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>1</district>
        <identifiers>
          <bioguideId>S001170</bioguideId>
          <lisID>1861</lisID>
          <gpoId>7528</gpoId>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName />
        <bioguideId>S001170</bioguideId>
        <fullName>Rep. Shea-Porter, Carol [D-NH-1]</fullName>
        <state>NH</state>
        <party>D</party>
        <lastName>Shea-Porter</lastName>
        <firstName>Carol</firstName>
        <sponsorshipDate>2017-05-17</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>2</district>
        <identifiers>
          <bioguideId>W000813</bioguideId>
          <gpoId />
          <lisID>2128</lisID>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName />
        <bioguideId>W000813</bioguideId>
        <fullName>Rep. Walorski, Jackie [R-IN-2]</fullName>
        <state>IN</state>
        <party>R</party>
        <lastName>Walorski</lastName>
        <firstName>Jackie</firstName>
        <sponsorshipDate>2017-05-17</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>6</district>
        <identifiers>
          <bioguideId>C001106</bioguideId>
          <gpoId />
          <lisID>2266</lisID>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName>A.</middleName>
        <bioguideId>C001106</bioguideId>
        <fullName>Rep. Costello, Ryan A. [R-PA-6]</fullName>
        <state>PA</state>
        <party>R</party>
        <lastName>Costello</lastName>
        <firstName>Ryan</firstName>
        <sponsorshipDate>2017-05-17</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>0</district>
        <identifiers>
          <bioguideId>S001177</bioguideId>
          <gpoId>8018</gpoId>
          <lisID>1962</lisID>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName>Kilili Camacho</middleName>
        <bioguideId>S001177</bioguideId>
        <fullName>Rep. Sablan, Gregorio Kilili Camacho [D-MP-At Large]</fullName>
        <state>MP</state>
        <party>D</party>
        <lastName>Sablan</lastName>
        <firstName>Gregorio</firstName>
        <sponsorshipDate>2017-05-18</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>41</district>
        <identifiers>
          <gpoId />
          <bioguideId>T000472</bioguideId>
          <lisID>2110</lisID>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName />
        <bioguideId>T000472</bioguideId>
        <fullName>Rep. Takano, Mark [D-CA-41]</fullName>
        <state>CA</state>
        <party>D</party>
        <lastName>Takano</lastName>
        <firstName>Mark</firstName>
        <sponsorshipDate>2017-05-18</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>2</district>
        <identifiers>
          <bioguideId>P000611</bioguideId>
          <lisID>2247</lisID>
          <gpoId />
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName />
        <bioguideId>P000611</bioguideId>
        <fullName>Rep. Poliquin, Bruce [R-ME-2]</fullName>
        <state>ME</state>
        <party>R</party>
        <lastName>Poliquin</lastName>
        <firstName>Bruce</firstName>
        <sponsorshipDate>2017-05-18</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>52</district>
        <identifiers>
          <bioguideId>P000608</bioguideId>
          <lisID>2113</lisID>
          <gpoId />
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName>H.</middleName>
        <bioguideId>P000608</bioguideId>
        <fullName>Rep. Peters, Scott H. [D-CA-52]</fullName>
        <state>CA</state>
        <party>D</party>
        <lastName>Peters</lastName>
        <firstName>Scott</firstName>
        <sponsorshipDate>2017-05-18</sponsorshipDate>
      </item>
      <item>
        <sponsorshipWithdrawnDate />
        <district>5</district>
        <identifiers>
          <bioguideId>E000293</bioguideId>
          <lisID>2114</lisID>
          <gpoId />
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName>H.</middleName>
        <bioguideId>E000293</bioguideId>
        <fullName>Rep. Esty, Elizabeth H. [D-CT-5]</fullName>
        <state>CT</state>
        <party>D</party>
        <lastName>Esty</lastName>
        <firstName>Elizabeth</firstName>
        <sponsorshipDate>2017-05-18</sponsorshipDate>
      </item>
    </cosponsors>
    <congress>115</congress>
    <recordedVotes />
    <updateDate>2017-09-11T03:02:56Z</updateDate>
    <latestAction>
      <text>Received in the Senate and Read twice and referred to the Committee on Veterans' Affairs.</text>
      <links />
      <actionDate>2017-05-24</actionDate>
    </latestAction>
    <summaries>
      <billSummaries>
        <item>
          <updateDate>2017-03-15T04:00:00Z</updateDate>
          <versionCode>00</versionCode>
          <lastSummaryUpdateDate>2017-07-19T17:45:20Z</lastSummaryUpdateDate>
          <actionDesc>Introduced in House</actionDesc>
          <text><![CDATA[
VA Prescription Data Accountability Act 2017

This bill directs the Department of Veterans Affairs (VA) to disclose information about an individual who is dispensed medication prescribed by a VA employee or by a non-VA provider authorized to prescribe such medication by the VA (currently, about a veteran or the dependent of a veteran) to a state controlled substance monitoring program to the extent necessary to prevent misuse and diversion of prescription medicines.
]]></text>
          <actionDate>2017-03-15</actionDate>
          <name>Introduced in House</name>
        </item>
        <item>
          <updateDate>2017-05-22T13:58:42Z</updateDate>
          <versionCode>79</versionCode>
          <lastSummaryUpdateDate>2017-07-19T17:45:37Z</lastSummaryUpdateDate>
          <actionDesc>Reported to House without amendment</actionDesc>
          <text><![CDATA[
(This measure has not been amended since it was introduced. The summary has been expanded because action occurred on the measure.)

VA Prescription Data Accountability Act 2017

(Sec. 2) This bill directs the Department of Veterans Affairs (VA) to disclose information about an individual who is dispensed medication prescribed by a VA employee or by a non-VA provider authorized to prescribe such medication by the VA (currently, about a veteran or the dependent of a veteran) to a state controlled substance monitoring program to the extent necessary to prevent misuse and diversion of prescription medicines.
]]></text>
          <actionDate>2017-05-22</actionDate>
          <name>Reported to House without amendment</name>
        </item>
        <item>
          <updateDate>2017-05-23T14:10:28Z</updateDate>
          <versionCode>81</versionCode>
          <lastSummaryUpdateDate>2017-07-19T17:45:57Z</lastSummaryUpdateDate>
          <actionDesc>Passed House without amendment</actionDesc>
          <text><![CDATA[
(This measure has not been amended since it was introduced. The expanded summary of the House reported version is repeated here.)

VA Prescription Data Accountability Act 2017

(Sec. 2) This bill directs the Department of Veterans Affairs (VA) to disclose information about an individual who is dispensed medication prescribed by a VA employee or by a non-VA provider authorized to prescribe such medication by the VA (currently, about a veteran or the dependent of a veteran) to a state controlled substance monitoring program to the extent necessary to prevent misuse and diversion of prescription medicines.
]]></text>
          <actionDate>2017-05-23</actionDate>
          <name>Passed House without amendment</name>
        </item>
      </billSummaries>
    </summaries>
    <createDate>2017-03-16T05:28:12Z</createDate>
    <committeeReports>
      <committeeReport>
        <citation>H. Rept. 115-144</citation>
      </committeeReport>
    </committeeReports>
    <constitutionalAuthorityStatementText><![CDATA[
From the Congressional Record Online through the Government Publishing Office [www.gpo.gov]By Ms. KUSTER of New Hampshire:H.R. 1545.Congress has the power to enact this legislation pursuantto the following:Under Article I, Section 8 of the Constitution, Congresshas the power ``to make all Laws which shall be necessary andproper for carrying into Execution the foregoing Powers, andall other Powers vested by this Constitution in theGovernment of the United States, or any Department or Officerthereof''[Page H2083]
]]></constitutionalAuthorityStatementText>
    <policyArea>
      <name>Armed Forces and National Security</name>
    </policyArea>
    <amendments />
    <subjects>
      <billSubjects>
        <legislativeSubjects>
          <item>
            <name>Drug trafficking and controlled substances</name>
          </item>
          <item>
            <name>Health information and medical records</name>
          </item>
          <item>
            <name>Prescription drugs</name>
          </item>
          <item>
            <name>State and local government operations</name>
          </item>
          <item>
            <name>Veterans' medical care</name>
          </item>
        </legislativeSubjects>
        <policyArea>
          <name>Armed Forces and National Security</name>
        </policyArea>
      </billSubjects>
    </subjects>
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>


text:
package org.apache.zookeeper.server;

import static org.jboss.netty.buffer.ChannelBuffers.dynamicBuffer;

import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.Executors;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandler.Sharable;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
import org.jboss.netty.channel.WriteCompletionEvent;
import org.jboss.netty.channel.group.ChannelGroup;
import org.jboss.netty.channel.group.DefaultChannelGroup;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;

public class NettyServerCnxnFactory extends ServerCnxnFactory {
    private static final Logger LOG = LoggerFactory.getLogger(NettyServerCnxnFactory.class);

    ServerBootstrap bootstrap;
    Channel parentChannel;
    ChannelGroup allChannels = new DefaultChannelGroup("zkServerCnxns");
    HashMap<InetAddress, Set<NettyServerCnxn>> ipMap =
        new HashMap<InetAddress, Set<NettyServerCnxn>>( );
    InetSocketAddress localAddress;
    int maxClientCnxns = 60;

    /**
     * This is an inner class since we need to extend SimpleChannelHandler, but
     * NettyServerCnxnFactory already extends ServerCnxnFactory. By making it inner
     * this class gets access to the member variables and methods.
     */
    @Sharable
    class CnxnChannelHandler extends SimpleChannelHandler {

        @Override
        public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e)
            throws Exception
        {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Channel closed " + e);
            }
            allChannels.remove(ctx.getChannel());
        }

        @Override
        public void channelConnected(ChannelHandlerContext ctx,
                ChannelStateEvent e) throws Exception
        {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Channel connected " + e);
            }
            allChannels.add(ctx.getChannel());
            NettyServerCnxn cnxn = new NettyServerCnxn(ctx.getChannel(),
                    zkServer, NettyServerCnxnFactory.this);
            ctx.setAttachment(cnxn);
            addCnxn(cnxn);
        }

        @Override
        public void channelDisconnected(ChannelHandlerContext ctx,
                ChannelStateEvent e) throws Exception
        {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Channel disconnected " + e);
            }
            NettyServerCnxn cnxn = (NettyServerCnxn) ctx.getAttachment();
            if (cnxn != null) {
                if (LOG.isTraceEnabled()) {
                    LOG.trace("Channel disconnect caused close " + e);
                }
                cnxn.close();
            }
        }

        @Override
        public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
            throws Exception
        {
            LOG.warn("Exception caught " + e, e.getCause());
            NettyServerCnxn cnxn = (NettyServerCnxn) ctx.getAttachment();
            if (cnxn != null) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Closing " + cnxn);
                    cnxn.close();
                }
            }
        }

        @Override
        public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
            throws Exception
        {
            if (LOG.isTraceEnabled()) {
                LOG.trace("message received called " + e.getMessage());
            }
            try {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("New message " + e.toString()
                            + " from " + ctx.getChannel());
                }
                NettyServerCnxn cnxn = (NettyServerCnxn)ctx.getAttachment();
                synchronized(cnxn) {
                    processMessage(e, cnxn);
                }
            } catch(Exception ex) {
                LOG.error("Unexpected exception in receive", ex);
                throw ex;
            }
        }

        private void processMessage(MessageEvent e, NettyServerCnxn cnxn) {
            if (LOG.isDebugEnabled()) {
                LOG.debug(Long.toHexString(cnxn.sessionId) + " queuedBuffer: "
                        + cnxn.queuedBuffer);
            }

            if (e instanceof NettyServerCnxn.ResumeMessageEvent) {
                LOG.debug("Received ResumeMessageEvent");
                if (cnxn.queuedBuffer != null) {
                    if (LOG.isTraceEnabled()) {
                        LOG.trace("processing queue "
                                + Long.toHexString(cnxn.sessionId)
                                + " queuedBuffer 0x"
                                + ChannelBuffers.hexDump(cnxn.queuedBuffer));
                    }
                    cnxn.receiveMessage(cnxn.queuedBuffer);
                    if (!cnxn.queuedBuffer.readable()) {
                        LOG.debug("Processed queue - no bytes remaining");
                        cnxn.queuedBuffer = null;
                    } else {
                        LOG.debug("Processed queue - bytes remaining");
                    }
                } else {
                    LOG.debug("queue empty");
                }
                cnxn.channel.setReadable(true);
            } else {
                ChannelBuffer buf = (ChannelBuffer)e.getMessage();
                if (LOG.isTraceEnabled()) {
                    LOG.trace(Long.toHexString(cnxn.sessionId)
                            + " buf 0x"
                            + ChannelBuffers.hexDump(buf));
                }

                if (cnxn.throttled) {
                    LOG.debug("Received message while throttled");
                    // we are throttled, so we need to queue
                    if (cnxn.queuedBuffer == null) {
                        LOG.debug("allocating queue");
                        cnxn.queuedBuffer = dynamicBuffer(buf.readableBytes());
                    }
                    cnxn.queuedBuffer.writeBytes(buf);
                    LOG.debug(Long.toHexString(cnxn.sessionId)
                            + " queuedBuffer 0x"
                            + ChannelBuffers.hexDump(cnxn.queuedBuffer));
                } else {
                    LOG.debug("not throttled");
                    if (cnxn.queuedBuffer != null) {
                        if (LOG.isTraceEnabled()) {
                            LOG.trace(Long.toHexString(cnxn.sessionId)
                                    + " queuedBuffer 0x"
                                    + ChannelBuffers.hexDump(cnxn.queuedBuffer));
                        }
                        cnxn.queuedBuffer.writeBytes(buf);
                        if (LOG.isTraceEnabled()) {
                            LOG.trace(Long.toHexString(cnxn.sessionId)
                                    + " queuedBuffer 0x"
                                    + ChannelBuffers.hexDump(cnxn.queuedBuffer));
                        }

                        cnxn.receiveMessage(cnxn.queuedBuffer);
                        if (!cnxn.queuedBuffer.readable()) {
                            LOG.debug("Processed queue - no bytes remaining");
                            cnxn.queuedBuffer = null;
                        } else {
                            LOG.debug("Processed queue - bytes remaining");
                        }
                    } else {
                        cnxn.receiveMessage(buf);
                        if (buf.readable()) {
                            if (LOG.isTraceEnabled()) {
                                LOG.trace("Before copy " + buf);
                            }
                            cnxn.queuedBuffer = dynamicBuffer(buf.readableBytes());
                            cnxn.queuedBuffer.writeBytes(buf);
                            if (LOG.isTraceEnabled()) {
                                LOG.trace("Copy is " + cnxn.queuedBuffer);
                                LOG.trace(Long.toHexString(cnxn.sessionId)
                                        + " queuedBuffer 0x"
                                        + ChannelBuffers.hexDump(cnxn.queuedBuffer));
                            }
                        }
                    }
                }
            }
        }

        @Override
        public void writeComplete(ChannelHandlerContext ctx,
                WriteCompletionEvent e) throws Exception
        {
            if (LOG.isTraceEnabled()) {
                LOG.trace("write complete " + e);
            }
        }

    }

    CnxnChannelHandler channelHandler = new CnxnChannelHandler();

    NettyServerCnxnFactory() {
        bootstrap = new ServerBootstrap(
                new NioServerSocketChannelFactory(
                        Executors.newCachedThreadPool(),
                        Executors.newCachedThreadPool()));
        // parent channel
        bootstrap.setOption("reuseAddress", true);
        // child channels
        bootstrap.setOption("child.tcpNoDelay", true);
        /* set socket linger to off, so that socket close does not block */
        bootstrap.setOption("child.soLinger", -1);

        bootstrap.getPipeline().addLast("servercnxnfactory", channelHandler);
    }

    @Override
    public void closeAll() {
        if (LOG.isDebugEnabled()) {
            LOG.debug("closeAll()");
        }

        NettyServerCnxn[] allCnxns = null;
        synchronized (cnxns) {
            allCnxns = cnxns.toArray(new NettyServerCnxn[cnxns.size()]);
        }
        // got to clear all the connections that we have in the selector
        for (NettyServerCnxn cnxn : allCnxns) {
            try {
                cnxn.close();
            } catch (Exception e) {
                LOG.warn("Ignoring exception closing cnxn sessionid 0x"
                                + Long.toHexString(cnxn.getSessionId()), e);
            }
        }
        if (LOG.isDebugEnabled()) {
            LOG.debug("allChannels size:" + allChannels.size() + " cnxns size:"
                    + allCnxns.length);
        }
    }

    @Override
    public void closeSession(long sessionId) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("closeSession sessionid:0x" + sessionId);
        }
        NettyServerCnxn[] allCnxns = null;
        synchronized (cnxns) {
            allCnxns = cnxns.toArray(new NettyServerCnxn[cnxns.size()]);
        }
        for (NettyServerCnxn cnxn : allCnxns) {
            if (cnxn.getSessionId() == sessionId) {
                try {
                    cnxn.close();
                } catch (Exception e) {
                    LOG.warn("exception during session close", e);
                }
                break;
            }
        }
    }

    @Override
    public void configure(InetSocketAddress addr, int maxClientCnxns)
            throws IOException
    {
        configureSaslLogin();
        localAddress = addr;
        this.maxClientCnxns = maxClientCnxns;
    }

    /** {@inheritDoc} */
    public int getMaxClientCnxnsPerHost() {
        return maxClientCnxns;
    }

    /** {@inheritDoc} */
    public void setMaxClientCnxnsPerHost(int max) {
        maxClientCnxns = max;
    }

    @Override
    public int getLocalPort() {
        return localAddress.getPort();
    }

    boolean killed;
    @Override
    public void join() throws InterruptedException {
        synchronized(this) {
            while(!killed) {
                wait();
            }
        }
    }

    @Override
    public void shutdown() {
        LOG.info("shutdown called " + localAddress);
        if (login != null) {
            login.shutdown();
        }
        // null if factory never started
        if (parentChannel != null) {
            parentChannel.close().awaitUninterruptibly();
            closeAll();
            allChannels.close().awaitUninterruptibly();
            bootstrap.releaseExternalResources();
        }

        if (zkServer != null) {
            zkServer.shutdown();
        }
        synchronized(this) {
            killed = true;
            notifyAll();
        }
    }

    @Override
    public void start() {
        LOG.info("binding to port " + localAddress);
        parentChannel = bootstrap.bind(localAddress);
    }

    public void reconfigure(InetSocketAddress addr)
    {
       Channel oldChannel = parentChannel;
       LOG.info("binding to port " + addr);
        parentChannel = bootstrap.bind(addr);
        localAddress = addr;
        oldChannel.close();
    }

    @Override
    public void startup(ZooKeeperServer zks) throws IOException,
            InterruptedException {
        start();
        zks.startdata();
        zks.startup();
        setZooKeeperServer(zks);
    }

    @Override
    public Iterable<ServerCnxn> getConnections() {
        return cnxns;
    }

    @Override
    public InetSocketAddress getLocalAddress() {
        return localAddress;
    }

    private void addCnxn(NettyServerCnxn cnxn) {
        synchronized (cnxns) {
            cnxns.add(cnxn);
            synchronized (ipMap){
                InetAddress addr =
                    ((InetSocketAddress)cnxn.channel.getRemoteAddress())
                        .getAddress();
                Set<NettyServerCnxn> s = ipMap.get(addr);
                if (s == null) {
                    s = new HashSet<NettyServerCnxn>();
                }
                s.add(cnxn);
                ipMap.put(addr,s);
            }
        }
    }

}


text:
package com.akexorcist.roundcornerprogressbar;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.akexorcist.roundcornerprogressbar.common.BaseRoundCornerProgressBar;
import com.example.SaveChameleon.R;
/**
 * Created by Akexorcist on 9/16/15 AD.
 */
public class TextRoundCornerProgressBar extends BaseRoundCornerProgressBar implements ViewTreeObserver.OnGlobalLayoutListener {
    protected final static int DEFAULT_TEXT_SIZE = 16;
    protected final static int DEFAULT_TEXT_MARGIN = 10;

    private TextView tvProgress;
    private int colorTextProgress;
    private int textProgressSize;
    private int textProgressMargin;
    private String textProgress;

    public TextRoundCornerProgressBar(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public TextRoundCornerProgressBar(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected int initLayout() {
        return R.layout.layout_text_round_corner_progress_bar;
    }

    @Override
    protected void initStyleable(Context context, AttributeSet attrs) {
        TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.TextRoundCornerProgress);

        colorTextProgress = typedArray.getColor(R.styleable.TextRoundCornerProgress_rcTextProgressColor, Color.WHITE);

        textProgressSize = (int) typedArray.getDimension(R.styleable.TextRoundCornerProgress_rcTextProgressSize, dp2px(DEFAULT_TEXT_SIZE));
        textProgressMargin = (int) typedArray.getDimension(R.styleable.TextRoundCornerProgress_rcTextProgressMargin, dp2px(DEFAULT_TEXT_MARGIN));

        textProgress = typedArray.getString(R.styleable.TextRoundCornerProgress_rcTextProgress);

        typedArray.recycle();
    }

    @Override
    protected void initView() {
        tvProgress = (TextView) findViewById(R.id.tv_progress);
        tvProgress.getViewTreeObserver().addOnGlobalLayoutListener(this);
    }

    @Override
    protected void drawProgress(LinearLayout layoutProgress, float max, float progress, float totalWidth,
                                int radius, int padding, int colorProgress, boolean isReverse) {
        GradientDrawable backgroundDrawable = createGradientDrawable(colorProgress);
        int newRadius = radius - (padding / 2);
        backgroundDrawable.setCornerRadii(new float[]{newRadius, newRadius, newRadius, newRadius, newRadius, newRadius, newRadius, newRadius});
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            layoutProgress.setBackground(backgroundDrawable);
        } else {
            layoutProgress.setBackgroundDrawable(backgroundDrawable);
        }

        float ratio = max / progress;
        int progressWidth = (int) ((totalWidth - (padding * 2)) / ratio);
        ViewGroup.LayoutParams progressParams = layoutProgress.getLayoutParams();
        progressParams.width = progressWidth;
        layoutProgress.setLayoutParams(progressParams);
    }

    @Override
    protected void onViewDraw() {
        drawTextProgress();
        drawTextProgressSize();
        drawTextProgressMargin();
        drawTextProgressPosition();
        drawTextProgressColor();
    }

    private void drawTextProgress() {
        tvProgress.setText(textProgress);
    }

    private void drawTextProgressColor() {
        tvProgress.setTextColor(colorTextProgress);
    }

    private void drawTextProgressSize() {
        tvProgress.setTextSize(TypedValue.COMPLEX_UNIT_PX, textProgressSize);
    }

    private void drawTextProgressMargin() {
        ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) tvProgress.getLayoutParams();
        params.setMargins(textProgressMargin, 0, textProgressMargin, 0);
        tvProgress.setLayoutParams(params);
    }

    private void drawTextProgressPosition() {
//        tvProgress.setVisibility(View.INVISIBLE);
//        tvProgress.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
//            @SuppressWarnings("deprecation")
//            @Override
//            public void onGlobalLayout() {
//                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
//                    tvProgress.getViewTreeObserver().removeOnGlobalLayoutListener(this);
//                else
//                    tvProgress.getViewTreeObserver().removeGlobalOnLayoutListener(this);
//                setTextProgressAlign();
//            }
//        });
        clearTextProgressAlign();
        // TODO Temporary
        int textProgressWidth = tvProgress.getMeasuredWidth() + (getTextProgressMargin() * 2);
        float ratio = getMax() / getProgress();
        int progressWidth = (int) ((getLayoutWidth() - (getPadding() * 2)) / ratio);
        if (textProgressWidth + textProgressMargin < progressWidth) {
            alignTextProgressInsideProgress();
        } else {
            alignTextProgressOutsideProgress();
        }
    }

//    private void setTextProgressAlign() {
//        tvProgress.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
//            @SuppressWarnings("deprecation")
//            @Override
//            public void onGlobalLayout() {
//                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
//                    tvProgress.getViewTreeObserver().removeOnGlobalLayoutListener(this);
//                else
//                    tvProgress.getViewTreeObserver().removeGlobalOnLayoutListener(this);
//                tvProgress.setVisibility(View.VISIBLE);
//            }
//        });
//        int textProgressWidth = tvProgress.getMeasuredWidth() + (getTextProgressMargin() * 2);
//        float ratio = getMax() / getProgress();
//        int progressWidth = (int) ((getLayoutWidth() - (getPadding() * 2)) / ratio);
//        if (textProgressWidth + textProgressMargin < progressWidth) {
//            alignTextProgressInsideProgress();
//        } else {
//            alignTextProgressOutsideProgress();
//        }
//    }

    private void clearTextProgressAlign() {
        RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) tvProgress.getLayoutParams();
        params.addRule(RelativeLayout.ALIGN_LEFT, 0);
        params.addRule(RelativeLayout.ALIGN_RIGHT, 0);
        params.addRule(RelativeLayout.LEFT_OF, 0);
        params.addRule(RelativeLayout.RIGHT_OF, 0);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
            params.removeRule(RelativeLayout.START_OF);
            params.removeRule(RelativeLayout.END_OF);
            params.removeRule(RelativeLayout.ALIGN_START);
            params.removeRule(RelativeLayout.ALIGN_END);
        }
        tvProgress.setLayoutParams(params);
    }

    private void alignTextProgressInsideProgress() {
        RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) tvProgress.getLayoutParams();
        if (isReverse()) {
            params.addRule(RelativeLayout.ALIGN_LEFT, R.id.layout_progress);
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
                params.addRule(RelativeLayout.ALIGN_START, R.id.layout_progress);
        } else {
            params.addRule(RelativeLayout.ALIGN_RIGHT, R.id.layout_progress);
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
                params.addRule(RelativeLayout.ALIGN_END, R.id.layout_progress);
        }
        tvProgress.setLayoutParams(params);
    }

    private void alignTextProgressOutsideProgress() {
        RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) tvProgress.getLayoutParams();
        if (isReverse()) {
            params.addRule(RelativeLayout.LEFT_OF, R.id.layout_progress);
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
                params.addRule(RelativeLayout.START_OF, R.id.layout_progress);
        } else {
            params.addRule(RelativeLayout.RIGHT_OF, R.id.layout_progress);
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
                params.addRule(RelativeLayout.END_OF, R.id.layout_progress);
        }
        tvProgress.setLayoutParams(params);
    }

    public String getProgressText() {
        return textProgress;
    }

    public void setProgressText(String text) {
        textProgress = text;
        drawTextProgress();
        drawTextProgressPosition();
    }

    @Override
    public void setProgress(float progress) {
        super.setProgress(progress);
        drawTextProgressPosition();
    }

    public int getTextProgressColor() {
        return colorTextProgress;
    }

    public void setTextProgressColor(int color) {
        this.colorTextProgress = color;
        drawTextProgressColor();
    }

    public int getTextProgressSize() {
        return textProgressSize;
    }

    public void setTextProgressSize(int size) {
        this.textProgressSize = size;
        drawTextProgressSize();
        drawTextProgressPosition();
    }

    public int getTextProgressMargin() {
        return textProgressMargin;
    }

    public void setTextProgressMargin(int margin) {
        this.textProgressMargin = margin;
        drawTextProgressMargin();
        drawTextProgressPosition();
    }

    @Override
    public void onGlobalLayout() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
            tvProgress.getViewTreeObserver().removeOnGlobalLayoutListener(this);
        else
            tvProgress.getViewTreeObserver().removeGlobalOnLayoutListener(this);
        drawTextProgressPosition();
    }

    @Override
    protected Parcelable onSaveInstanceState() {
        Parcelable superState = super.onSaveInstanceState();
        SavedState ss = new SavedState(superState);

        ss.colorTextProgress = this.colorTextProgress;
        ss.textProgressSize = this.textProgressSize;
        ss.textProgressMargin = this.textProgressMargin;

        ss.textProgress = this.textProgress;
        return ss;
    }

    @Override
    protected void onRestoreInstanceState(Parcelable state) {
        if (!(state instanceof SavedState)) {
            super.onRestoreInstanceState(state);
            return;
        }

        SavedState ss = (SavedState) state;
        super.onRestoreInstanceState(ss.getSuperState());

        this.colorTextProgress = ss.colorTextProgress;
        this.textProgressSize = ss.textProgressSize;
        this.textProgressMargin = ss.textProgressMargin;

        this.textProgress = ss.textProgress;
    }

    private static class SavedState extends BaseSavedState {
        int colorTextProgress;
        int textProgressSize;
        int textProgressMargin;

        String textProgress;

        SavedState(Parcelable superState) {
            super(superState);
        }

        private SavedState(Parcel in) {
            super(in);

            this.colorTextProgress = in.readInt();
            this.textProgressSize = in.readInt();
            this.textProgressMargin = in.readInt();

            this.textProgress = in.readString();
        }

        @Override
        public void writeToParcel(Parcel out, int flags) {
            super.writeToParcel(out, flags);

            out.writeInt(this.colorTextProgress);
            out.writeInt(this.textProgressSize);
            out.writeInt(this.textProgressMargin);

            out.writeString(this.textProgress);
        }

        public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {
            public SavedState createFromParcel(Parcel in) {
                return new SavedState(in);
            }

            public SavedState[] newArray(int size) {
                return new SavedState[size];
            }
        };
    }
}