<?xml version="1.0" encoding="UTF-8"?><module fritzingVersion="0.3.16b.02.24.4002" moduleId="RevEd_PICAXE_40X2">
    <version>1.1</version>
    <author>Revolution Education Ltd</author>
    <title>PICAXE-40X2</title>
    IC
    <date>2010-05-26</date>
    <tags>
        <tag>PICAXE</tag>
        <tag>DIP</tag>
    </tags>
    <properties>
        <property name="family">Microcontroller Board (PICAXE)</property>
        <property name="variant">PICAXE-40X2</property>
    <property name="package">THT</property></properties>
    <description>PICAXE-40X2 from Revolution Education Ltd</description>
      <views>
        <iconView>
            <layers image="icon/PICAXE_40X2_icon.svg">
                <layer layerId="icon"/>
            </layers>
        </iconView>
        <breadboardView>
            <layers image="breadboard/PICAXE_40X2_breadboard.svg">
                <layer layerId="breadboard"/>
            </layers>
        </breadboardView>
        <pcbView>
            <layers image="pcb/dip_40_600mil_pcb.svg">
                <layer layerId="copper0"/>
                <layer layerId="silkscreen"/>
                <layer layerId="keepout"/>
                <layer layerId="soldermask"/>
                <layer layerId="outline"/>
            <layer layerId="copper1"/></layers>
        </pcbView>
        <schematicView>
            <layers image="schematic/PICAXE_40X2_schematic.svg">
                <layer layerId="schematic"/>
            </layers>
        </schematicView>
    </views>
    <connectors>
        <connector id="connector0" name="Reset" type="male">
            <description>Connect via a 4K7 resistor to the positive rail of the power supply in your circuit. This pin must be connected via the 4K7 resistor or the PICAXE will not operate correctly. This pin can also be connected to a switch to 0V (ground) to provide a manual 'reset button' for the PICAXE</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector1" name="A.0 / ADC 0 / C1-" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input. This pin can be used as an input for the internal 'C1' comparator</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector2" name="A.1 / ADC 1 / C2-" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input. This pin can be used as an input for the internal 'C2' comparator</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector3" name="A.2 / ADC 2 / C1+" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input. This pin can be used as an input for the internal 'C1' comparator</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector4" name="A.3 / ADC 3 / C2+" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input. This pin can be used as an input for the internal 'C2' comparator</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector5" name="Serial In" type="male">
            <description>Connect to the 22K resistor of the PICAXE download circuit</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector6" name="Serial Out / Out A.4" type="male">
            <description>Connect to the output pin of the download connector for the PICAXE download circuit. This pin can also be used as an independent digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector7" name="A.5 / ADC 5" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector8" name="A.6 / ADC 6" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector9" name="A.7 / ADC 7" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector10" name="+V" type="male">
            <description>Connect to the positive rail of the power supply in your circuit</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector11" name="0V" type="male">
            <description>Connect to the 0V (ground) of the power supply in your circuit</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector12" name="Resonator ( Optional )" type="male">
            <description>Connect to a resonator or crystal if you wish to use one. The PICAXE will operate without a resonator or crystal connected</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector13" name="Resonator ( Optional )" type="male">
            <description>Connect to a resonator or crystal if you wish to use one. The PICAXE will operate without a resonator or crystal connected</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector14" name="C.0 / Timer Clock" type="male">
            <description>This pin can be used as a digital input and a digital output. This pin can be used to increment the internal 'timer' variable of the PICAXE</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector15" name="C.1 / PWM C.1" type="male">
            <description>This pin can be used as a digital input and a digital output. This pin can be used to generate a background PWM output signal using the PWMOUT command</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector16" name="C.2 / PWM C.2 / HPWM A" type="male">
            <description>This pin can be used as a digital input and a digital output. This pin can be used to generate a background PWM output signal using the PWMOUT or HPWM commands</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector17" name="C.3 / I2C Clock / SPI Clock" type="male">
            <description>This pin can be used as a digital input and a digital output. If using the PICAXE with I2C devices this pin should connect to the 'I2C Clock' (SCL) pins of those devices and a 4K7 resistor should connect from this pin to the positive rail of the power supply in your circuit. If using the PICAXE with SPI devices this pin should connect to the 'SPI Clock' (SCK/SCLK) pins of those devices</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector18" name="D.0" type="male">
            <description>This pin can be used as a digital input and a digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector19" name="D.1" type="male">
            <description>This pin can be used as a digital input and a digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector20" name="D.2" type="male">
            <description>This pin can be used as a digital input and a digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector21" name="D.3" type="male">
            <description>This pin can be used as a digital input and a digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector22" name="C.4 / I2C Data / SPI Data In" type="male">
            <description>This pin can be used as a digital input and a digital output. If using the PICAXE with I2C devices this pin should connect to the 'I2C Data' (SDA) pins of those devices and a 4K7 resistor should connect from this pin to the positive rail of the power supply in your circuit. If using the PICAXE with SPI devices this pin should connect to the 'SPI Data Out' (DO/DOUT/SO) pins of those devices</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector23" name="C.5 / SPI Data Out" type="male">
            <description>This pin can be used as a digital input and a digital output. If using the PICAXE with SPI devices this pin should connect to the 'SPI Data In' (DI/DIN/SI) pins of those devices</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector24" name="C.6 / Hserout" type="male">
            <description>This pin can be used as a digital input and a digital output. This pin can be used to output high-speed serial data</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector25" name="C.7 / Hserin" type="male">
            <description>This pin can be used as a digital input and a digital output. This pin can be used to receive high-speed serial data</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector26" name="D.4" type="male">
            <description>This pin can be used as a digital input and a digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector27" name="D.5 / HPWM C" type="male">
            <description>This pin can be used as a digital input and a digital output. This pin can be used to generate a background PWM output signal using the HPWM command</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector28" name="D.6 / HPWM B / Keyboard Clock" type="male">
            <description>This pin can be used as a digital input and a digital output. This pin can be used to generate a background PWM output signal using the HPWM command. If using the PICAXE with a PS/2 keyboard this pin should connect to the 'PS/2 Keyboard Clock' signal ( pin 5 on a PS/2 mini-DIN connector ) and a 4K7 resistor should connect from this pin to the positive rail of the power supply in your circuit</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector29" name="D.7 / HPWM D / Keyboard Data" type="male">
            <description>This pin can be used as a digital input and a digital output. This pin can be used to generate a background PWM output signal using the HPWM command. If using the PICAXE with a PS/2 keyboard this pin should connect to the 'PS/2 Keyboard Data' signal ( pin 1 on a PS/2 mini-DIN connector ) and a 4K7 resistor should connect from this pin to the positive rail of the power supply in your circuit</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector30" name="0V" type="male">
            <description>Connect to the 0V (ground) of the power supply in your circuit</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector31" name="+V" type="male">
            <description>Connect to the positive rail of the power supply in your circuit</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector32" name="B.0" type="male">
            <description>This pin can be used as a digital input and a digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector33" name="B.1 / ADC 10 / Hint 1 / HPWM C" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input. This pin can be used to generate a background PWM output signal using the HPWM command. This pin can be used as an input trigger to initiate a 'hardware interrupt'</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector34" name="B.2 / ADC 8 / Hint 2 / HPWM B" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input. This pin can be used to generate a background PWM output signal using the HPWM command. This pin can be used as an input trigger to initiate a 'hardware interrupt'</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector35" name="B.3 / ADC 9" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector36" name="B.4 / ADC 11 / HPWM D" type="male">
            <description>This pin can be used as a digital input and a digital output or can be used as an analogue input. This pin can be used to generate a background PWM output signal using the HPWM command</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector37" name="B.5" type="male">
            <description>This pin can be used as a digital input and a digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector38" name="B.6" type="male">
            <description>This pin can be used as a digital input and a digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
        <connector id="connector39" name="B.7" type="male">
            <description>This pin can be used as a digital input and a digital output</description>
            <views>
                <breadboardView>

                </breadboardView>
                <schematicView>

                </schematicView>
                <pcbView>

</pcbView>
            </views>
        </connector>
    </connectors>
    <buses>
        <bus id="ground">
            <nodeMember connectorId="connector11"/>
            <nodeMember connectorId="connector30"/>
        </bus>
        <bus id="plusV">
            <nodeMember connectorId="connector10"/>
            <nodeMember connectorId="connector31"/>
        </bus>
    </buses>
</module>


'use strict'
// this file handles outputting usage instructions,
// failures, etc. keeps logging in one place.
const stringWidth = require('string-width')
const objFilter = require('./obj-filter')
const path = require('path')
const setBlocking = require('set-blocking')
const YError = require('./yerror')

module.exports = function usage (yargs, y18n) {
  const __ = y18n.__
  const self = {}

  // methods for ouputting/building failure message.
  const fails = []
  self.failFn = function failFn (f) {
    fails.push(f)
  }

  let failMessage = null
  let showHelpOnFail = true
  self.showHelpOnFail = function showHelpOnFailFn (enabled, message) {
    if (typeof enabled === 'string') {
      message = enabled
      enabled = true
    } else if (typeof enabled === 'undefined') {
      enabled = true
    }
    failMessage = message
    showHelpOnFail = enabled
    return self
  }

  let failureOutput = false
  self.fail = function fail (msg, err) {
    const logger = yargs._getLoggerInstance()

    if (fails.length) {
      for (let i = fails.length - 1; i >= 0; --i) {
        fails[i](msg, err, self)
      }
    } else {
      if (yargs.getExitProcess()) setBlocking(true)

      // don't output failure message more than once
      if (!failureOutput) {
        failureOutput = true
        if (showHelpOnFail) yargs.showHelp('error')
        if (msg || err) logger.error(msg || err)
        if (failMessage) {
          if (msg || err) logger.error('')
          logger.error(failMessage)
        }
      }

      err = err || new YError(msg)
      if (yargs.getExitProcess()) {
        return yargs.exit(1)
      } else if (yargs._hasParseCallback()) {
        return yargs.exit(1, err)
      } else {
        throw err
      }
    }
  }

  // methods for ouputting/building help (usage) message.
  let usages = []
  let usageDisabled = false
  self.usage = (msg, description) => {
    if (msg === null) {
      usageDisabled = true
      usages = []
      return
    }
    usageDisabled = false
    usages.push([msg, description || ''])
    return self
  }
  self.getUsage = () => {
    return usages
  }
  self.getUsageDisabled = () => {
    return usageDisabled
  }

  self.getPositionalGroupName = () => {
    return __('Positionals:')
  }

  let examples = []
  self.example = (cmd, description) => {
    examples.push([cmd, description || ''])
  }

  let commands = []
  self.command = function command (cmd, description, isDefault, aliases) {
    // the last default wins, so cancel out any previously set default
    if (isDefault) {
      commands = commands.map((cmdArray) => {
        cmdArray[2] = false
        return cmdArray
      })
    }
    commands.push([cmd, description || '', isDefault, aliases])
  }
  self.getCommands = () => commands

  let descriptions = {}
  self.describe = function describe (key, desc) {
    if (typeof key === 'object') {
      Object.keys(key).forEach((k) => {
        self.describe(k, key[k])
      })
    } else {
      descriptions[key] = desc
    }
  }
  self.getDescriptions = () => descriptions

  let epilog
  self.epilog = (msg) => {
    epilog = msg
  }

  let wrapSet = false
  let wrap
  self.wrap = (cols) => {
    wrapSet = true
    wrap = cols
  }

  function getWrap () {
    if (!wrapSet) {
      wrap = windowWidth()
      wrapSet = true
    }

    return wrap
  }

  const deferY18nLookupPrefix = '__yargsString__:'
  self.deferY18nLookup = str => deferY18nLookupPrefix + str

  const defaultGroup = 'Options:'
  self.help = function help () {
    normalizeAliases()

    // handle old demanded API
    const base$0 = path.basename(yargs.$0)
    const demandedOptions = yargs.getDemandedOptions()
    const demandedCommands = yargs.getDemandedCommands()
    const groups = yargs.getGroups()
    const options = yargs.getOptions()

    let keys = []
    keys = keys.concat(Object.keys(descriptions))
    keys = keys.concat(Object.keys(demandedOptions))
    keys = keys.concat(Object.keys(demandedCommands))
    keys = keys.concat(Object.keys(options.default))
    keys = keys.filter(key => {
      if (options.hiddenOptions.indexOf(key) < 0) {
        return true
      } else if (yargs.parsed.argv[options.showHiddenOpt]) {
        return true
      }
    })
    keys = Object.keys(keys.reduce((acc, key) => {
      if (key !== '_') acc[key] = true
      return acc
    }, {}))

    const theWrap = getWrap()
    const ui = require('cliui')({
      width: theWrap,
      wrap: !!theWrap
    })

    // the usage string.
    if (!usageDisabled) {
      if (usages.length) {
        // user-defined usage.
        usages.forEach((usage) => {
          ui.div(`${usage[0].replace(/\$0/g, base$0)}`)
          if (usage[1]) {
            ui.div({text: `${usage[1]}`, padding: [1, 0, 0, 0]})
          }
        })
        ui.div()
      } else if (commands.length) {
        let u = null
        // demonstrate how commands are used.
        if (demandedCommands._) {
          u = `${base$0} <${__('command')}>\n`
        } else {
          u = `${base$0} [${__('command')}]\n`
        }
        ui.div(`${u}`)
      }
    }

    // your application's commands, i.e., non-option
    // arguments populated in '_'.
    if (commands.length) {
      ui.div(__('Commands:'))

      const context = yargs.getContext()
      const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : ''

      commands.forEach((command) => {
        const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}` // drop $0 from default commands.
        ui.span(
          {
            text: commandString,
            padding: [0, 2, 0, 2],
            width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4
          },
          {text: command[1]}
        )
        const hints = []
        if (command[2]) hints.push(`[${__('default:').slice(0, -1)}]`) // TODO hacking around i18n here
        if (command[3] && command[3].length) {
          hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`)
        }
        if (hints.length) {
          ui.div({text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right'})
        } else {
          ui.div()
        }
      })

      ui.div()
    }

    // perform some cleanup on the keys array, making it
    // only include top-level keys not their aliases.
    const aliasKeys = (Object.keys(options.alias) || [])
      .concat(Object.keys(yargs.parsed.newAliases) || [])

    keys = keys.filter(key => !yargs.parsed.newAliases[key] && aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1))

    // populate 'Options:' group with any keys that have not
    // explicitly had a group set.
    if (!groups[defaultGroup]) groups[defaultGroup] = []
    addUngroupedKeys(keys, options.alias, groups)

    // display 'Options:' table along with any custom tables:
    Object.keys(groups).forEach((groupName) => {
      if (!groups[groupName].length) return

      ui.div(__(groupName))

      // if we've grouped the key 'f', but 'f' aliases 'foobar',
      // normalizedKeys should contain only 'foobar'.
      const normalizedKeys = groups[groupName].map((key) => {
        if (~aliasKeys.indexOf(key)) return key
        for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) {
          if (~(options.alias[aliasKey] || []).indexOf(key)) return aliasKey
        }
        return key
      })

      // actually generate the switches string --foo, -f, --bar.
      const switches = normalizedKeys.reduce((acc, key) => {
        acc[key] = [ key ].concat(options.alias[key] || [])
          .map(sw => {
            // for the special positional group don't
            // add '--' or '-' prefix.
            if (groupName === self.getPositionalGroupName()) return sw
            else return (sw.length > 1 ? '--' : '-') + sw
          })
          .join(', ')

        return acc
      }, {})

      normalizedKeys.forEach((key) => {
        const kswitch = switches[key]
        let desc = descriptions[key] || ''
        let type = null

        if (~desc.lastIndexOf(deferY18nLookupPrefix)) desc = __(desc.substring(deferY18nLookupPrefix.length))

        if (~options.boolean.indexOf(key)) type = `[${__('boolean')}]`
        if (~options.count.indexOf(key)) type = `[${__('count')}]`
        if (~options.string.indexOf(key)) type = `[${__('string')}]`
        if (~options.normalize.indexOf(key)) type = `[${__('string')}]`
        if (~options.array.indexOf(key)) type = `[${__('array')}]`
        if (~options.number.indexOf(key)) type = `[${__('number')}]`

        const extra = [
          type,
          (key in demandedOptions) ? `[${__('required')}]` : null,
          options.choices && options.choices[key] ? `[${__('choices:')} ${
            self.stringifiedValues(options.choices[key])}]` : null,
          defaultString(options.default[key], options.defaultDescription[key])
        ].filter(Boolean).join(' ')

        ui.span(
          {text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4},
          desc
        )

        if (extra) ui.div({text: extra, padding: [0, 0, 0, 2], align: 'right'})
        else ui.div()
      })

      ui.div()
    })

    // describe some common use-cases for your application.
    if (examples.length) {
      ui.div(__('Examples:'))

      examples.forEach((example) => {
        example[0] = example[0].replace(/\$0/g, base$0)
      })

      examples.forEach((example) => {
        if (example[1] === '') {
          ui.div(
            {
              text: example[0],
              padding: [0, 2, 0, 2]
            }
          )
        } else {
          ui.div(
            {
              text: example[0],
              padding: [0, 2, 0, 2],
              width: maxWidth(examples, theWrap) + 4
            }, {
              text: example[1]
            }
          )
        }
      })

      ui.div()
    }

    // the usage string.
    if (epilog) {
      const e = epilog.replace(/\$0/g, base$0)
      ui.div(`${e}\n`)
    }

    return ui.toString()
  }

  // return the maximum width of a string
  // in the left-hand column of a table.
  function maxWidth (table, theWrap, modifier) {
    let width = 0

    // table might be of the form [leftColumn],
    // or {key: leftColumn}
    if (!Array.isArray(table)) {
      table = Object.keys(table).map(key => [table[key]])
    }

    table.forEach((v) => {
      width = Math.max(
        stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]),
        width
      )
    })

    // if we've enabled 'wrap' we should limit
    // the max-width of the left-column.
    if (theWrap) width = Math.min(width, parseInt(theWrap * 0.5, 10))

    return width
  }

  // make sure any options set for aliases,
  // are copied to the keys being aliased.
  function normalizeAliases () {
    // handle old demanded API
    const demandedOptions = yargs.getDemandedOptions()
    const options = yargs.getOptions()

    ;(Object.keys(options.alias) || []).forEach((key) => {
      options.alias[key].forEach((alias) => {
        // copy descriptions.
        if (descriptions[alias]) self.describe(key, descriptions[alias])
        // copy demanded.
        if (alias in demandedOptions) yargs.demandOption(key, demandedOptions[alias])
        // type messages.
        if (~options.boolean.indexOf(alias)) yargs.boolean(key)
        if (~options.count.indexOf(alias)) yargs.count(key)
        if (~options.string.indexOf(alias)) yargs.string(key)
        if (~options.normalize.indexOf(alias)) yargs.normalize(key)
        if (~options.array.indexOf(alias)) yargs.array(key)
        if (~options.number.indexOf(alias)) yargs.number(key)
      })
    })
  }

  // given a set of keys, place any keys that are
  // ungrouped under the 'Options:' grouping.
  function addUngroupedKeys (keys, aliases, groups) {
    let groupedKeys = []
    let toCheck = null
    Object.keys(groups).forEach((group) => {
      groupedKeys = groupedKeys.concat(groups[group])
    })

    keys.forEach((key) => {
      toCheck = [key].concat(aliases[key])
      if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) {
        groups[defaultGroup].push(key)
      }
    })
    return groupedKeys
  }

  self.showHelp = (level) => {
    const logger = yargs._getLoggerInstance()
    if (!level) level = 'error'
    const emit = typeof level === 'function' ? level : logger[level]
    emit(self.help())
  }

  self.functionDescription = (fn) => {
    const description = fn.name ? require('decamelize')(fn.name, '-') : __('generated-value')
    return ['(', description, ')'].join('')
  }

  self.stringifiedValues = function stringifiedValues (values, separator) {
    let string = ''
    const sep = separator || ', '
    const array = [].concat(values)

    if (!values || !array.length) return string

    array.forEach((value) => {
      if (string.length) string += sep
      string += JSON.stringify(value)
    })

    return string
  }

  // format the default-value-string displayed in
  // the right-hand column.
  function defaultString (value, defaultDescription) {
    let string = `[${__('default:')} `

    if (value === undefined && !defaultDescription) return null

    if (defaultDescription) {
      string += defaultDescription
    } else {
      switch (typeof value) {
        case 'string':
          string += `"${value}"`
          break
        case 'object':
          string += JSON.stringify(value)
          break
        default:
          string += value
      }
    }

    return `${string}]`
  }

  // guess the width of the console window, max-width 80.
  function windowWidth () {
    const maxWidth = 80
    if (typeof process === 'object' && process.stdout && process.stdout.columns) {
      return Math.min(maxWidth, process.stdout.columns)
    } else {
      return maxWidth
    }
  }

  // logic for displaying application version.
  let version = null
  self.version = (ver) => {
    version = ver
  }

  self.showVersion = () => {
    const logger = yargs._getLoggerInstance()
    logger.log(version)
  }

  self.reset = function reset (localLookup) {
    // do not reset wrap here
    // do not reset fails here
    failMessage = null
    failureOutput = false
    usages = []
    usageDisabled = false
    epilog = undefined
    examples = []
    commands = []
    descriptions = objFilter(descriptions, (k, v) => !localLookup[k])
    return self
  }

  let frozen
  self.freeze = function freeze () {
    frozen = {}
    frozen.failMessage = failMessage
    frozen.failureOutput = failureOutput
    frozen.usages = usages
    frozen.usageDisabled = usageDisabled
    frozen.epilog = epilog
    frozen.examples = examples
    frozen.commands = commands
    frozen.descriptions = descriptions
  }
  self.unfreeze = function unfreeze () {
    failMessage = frozen.failMessage
    failureOutput = frozen.failureOutput
    usages = frozen.usages
    usageDisabled = frozen.usageDisabled
    epilog = frozen.epilog
    examples = frozen.examples
    commands = frozen.commands
    descriptions = frozen.descriptions
    frozen = undefined
  }

  return self
}


package com.wzh.fun.chat.activity;

import android.os.Bundle;

import com.wzh.fun.R;
import com.wzh.fun.ui.activity.BaseActivity;

/**
 * Created by WZH on 2016/12/4.
 */

public class FindUserActivity extends BaseActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_find_user);
    }
}


// Souffle - A Datalog Compiler
// Copyright (c) 2019, The Souffle Developers. All rights reserved
// Licensed under the Universal Permissive License v 1.0 as shown at:
// - https://opensource.org/licenses/UPL
// - <souffle root>/licenses/SOUFFLE-UPL.txt

// example taken from tests/example/paths

.type Node <: symbol

.decl path   (node1:Node, node2:Node)
.output path   ()
.decl edge   (node1:Node, node2:Node)
.output edge   ()

edge("a","b").
edge("a","c").
edge("b","a").
edge("b","d").

path(X,Y) :- path(X,Z), edge(Z,Y).
path(X,Y) :- edge(X,Y).


<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Yaml\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Yaml\Exception\ParseException;

class ParseExceptionTest extends TestCase
{
    public function testGetMessage()
    {
        $exception = new ParseException('Error message', 42, 'foo: bar', '/var/www/app/config.yml');
        $message = 'Error message in "/var/www/app/config.yml" at line 42 (near "foo: bar")';

        $this->assertEquals($message, $exception->getMessage());
    }

    public function testGetMessageWithUnicodeInFilename()
    {
        $exception = new ParseException('Error message', 42, 'foo: bar', 'äöü.yml');
        $message = 'Error message in "äöü.yml" at line 42 (near "foo: bar")';

        $this->assertEquals($message, $exception->getMessage());
    }
}