.TH HDPARM 8 "October 2018" "Version 9.58"

.SH NAME
hdparm \- get/set SATA/IDE device parameters
.SH SYNOPSIS
.B hdparm
[options] [device ...]
.SH DESCRIPTION
.BI hdparm
provides a command line interface to various kernel interfaces
supported by the Linux SATA/PATA/SAS "libata" subsystem
and the older IDE driver subsystem.  Many newer (2008 and later)
USB drive enclosures now also support "SAT" (SCSI-ATA Command Translation)
and therefore may also work with hdparm.  E.g. recent WD "Passport" models
and recent NexStar-3 enclosures.
Some options may work correctly only with the latest kernels.
.SH OPTIONS
When no options are given,
.B -acdgkmur
is assumed.
For "Get/set" options, a query without the optional parameter (e.g. \-d) will query (get)
the device state, and with a parameter (e.g., \-d0) will set the device state.
.TP
.I -a
Get/set sector count for filesystem (software) read-ahead.
This is used to improve performance in sequential reads of large files,
by prefetching additional
blocks in anticipation of them being needed by the running task.
Many IDE drives also have a separate built-in read-ahead function,
which augments this filesystem (software) read-ahead function.
.TP
.I -A
Get/set the IDE drive\'s read-lookahead feature (usually ON by default).
Usage:
.B -A0
(disable) or
.B -A1
(enable).
.TP
.I -b
Get/set bus state.
.TP
.I -B
Get/set Advanced Power Management feature, if the drive supports it. A low value
means aggressive power management and a high value means better performance.
Possible settings range from values 1 through 127 (which permit spin-down),
and values 128 through 254 (which do not permit spin-down).
The highest degree of power management is attained with a setting of 1,
and the highest I/O performance with a setting of 254.
A value of 255 tells hdparm to disable Advanced Power Management altogether
on the drive (not all drives support disabling it, but most do).
.TP
.I -c
Get/set (E)IDE 32-bit I/O support.  A numeric parameter can be
used to enable/disable 32-bit I/O support.
Currently supported values include
.B 0
to disable 32-bit I/O support,
.B 1
to enable 32-bit data transfers, and
.B 3
to enable 32-bit data transfers with a special
.B sync
sequence required by many chipsets.  The value
.B 3
works with nearly all
32-bit IDE chipsets, but incurs slightly more overhead.
Note that "32-bit" refers to data transfers across a PCI or VLB bus to the
interface card only; all (E)IDE drives still have only a 16-bit connection
over the ribbon cable from the interface card.
.TP
.I -C
Check the current IDE power mode status, which will always be one of
.B unknown
(drive does not support this command),
.B active/idle
(normal operation),
.B standby
(low power mode, drive has spun down),
or
.B sleeping
(lowest power mode, drive is completely shut down).
The
.B -S, -y, -Y,
and
.B -Z
options can be used to manipulate the IDE power modes.
.TP
.I -d
Get/set the "using_dma" flag for this drive.  This option now works
with most combinations of drives and PCI interfaces which support DMA
and which are known to the kernel IDE driver.
It is also a good idea to use the appropriate
.B -X
option in combination with
.B -d1
to ensure that the drive itself is programmed for the correct DMA mode,
although most BIOSs should do this for you at boot time.
Using DMA nearly always gives the best performance,
with fast I/O throughput and low CPU usage.
But there are at least a few configurations of chipsets and drives
for which DMA does not make much of a difference, or may even slow
things down (on really messed up hardware!).  Your mileage may vary.
.TP
.I --dco-freeze
DCO stands for Device Configuration Overlay, a way for vendors to selectively
disable certain features of a drive.  The
.B --dco-freeze
option will freeze/lock the current drive configuration,
thereby preventing software (or malware)
from changing any DCO settings until after the next power-on reset.
.TP
.I --dco-identify
Query and dump information regarding drive configuration settings
which can be disabled by the vendor or OEM installer.
These settings show capabilities of the drive which might be disabled
by the vendor for "enhanced compatibility".
When disabled, they are otherwise hidden and will not show in the
.B -I
identify output.  For example, system vendors sometimes disable 48_bit
addressing on large drives, for compatibility (and loss of capacity)
with a specific BIOS.  In such cases,
.B --dco-identify
will show that the drive is 48_bit capable, but
.B -I
will not show it, and nor will the drive accept 48_bit commands.
.TP
.I --dco-restore
Reset all drive settings, features, and accessible capacities back to factory defaults
and full capabilities.  This command will fail if DCO is frozen/locked,
or if a
.B -Np
maximum size restriction has also been set.
This is
.B EXTREMELY DANGEROUS
and will very likely cause massive loss of data.
.B DO NOT USE THIS COMMAND.
.TP
.I --direct
Use the kernel\'s "O_DIRECT" flag when performing a
.B -t
timing test.  This bypasses the page cache, causing the reads
to go directly from the drive into hdparm's buffers, using so-called
"raw" I/O.  In many cases, this can produce results that appear
much faster than the usual page cache method, giving a better indication
of raw device and driver performance.
.TP
.I --drq-hsm-error
.B VERY DANGEROUS, DON'T EVEN THINK ABOUT USING IT.
This option causes hdparm to issue an IDENTIFY command
to the kernel, but incorrectly marked as a "non-data" command.
This results in the drive being left with its DataReQust(DRQ) line
"stuck" high.  This confuses the kernel drivers, and may crash the system
immediately with massive data loss.  The option exists to help in testing
and fortifying the kernel against similar real-world drive malfunctions.
.B VERY DANGEROUS, DO NOT USE!!
.TP
.I -D
Enable/disable the on-drive defect management feature,
whereby the drive firmware tries to automatically manage
defective sectors by relocating them to "spare" sectors
reserved by the factory for such.  Control of this feature
via the
.B -D
option is not supported for most modern drives
since ATA-4; thus this command may fail.
.TP
.I -E
Set cd/dvd drive speed.  This is NOT necessary for regular operation,
as the drive will automatically switch speeds on its own.
But if you want to play with it, just supply a speed number
after the option, usually a number like 2 or 4.
This can be useful in some cases, though, to smooth out DVD video playback.
.TP
.I -f
Sync and flush the buffer cache for the device on exit.
This operation is also performed internally as part of the
.B -t
and
.B -T
timings and other options.
.TP
.I --fallocate
This option currently works only on ext4 and xfs filesystem types.
When used, this must be the only option given.
It requires two parameters: the desired file size in kilo-bytes
(byte count divided by 1024), followed by the pathname for the new file.
It will create a new file of the specified size,
but without actually having to write any data to the file.
This will normally complete very quickly, and without thrashing the storage device.
.IP
E.g. Create a 10KByte file:
.B hdparm --fallocate 10 temp_file
.TP
.I --fibmap
When used, this must be the only option given.
It requires a file path as a parameter, and will print
out a list of the block extents (sector ranges)
occupied by that file on disk.
Sector numbers are given as absolute LBA numbers,
referenced from sector 0 of the physical device rather
than from the partition or filesystem.
This information can then be used for a variety of purposes,
such as examining the degree of fragmenation of larger files, or
determining appropriate sectors to deliberately corrupt
during fault-injection testing procedures.
.IP
This option uses the new FIEMAP (file extent map) ioctl() when available,
and falls back to the older FIBMAP (file block map) ioctl() otherwise.
Note that FIBMAP suffers from a 32-bit block-number interface,
and thus not work beyond 8TB or 16TB.  FIBMAP is also very slow,
and does not deal well with preallocated uncommitted extents
in ext4/xfs filesystems, unless a sync() is done before using this option.
.TP
.I --fwdownload
When used, this should be the only option given.
It requires a file path immediately after the
option, indicating where the new drive firmware should be read from.
The contents of this file will be sent to the drive using the
(S)ATA
.B DOWNLOAD MICROCODE
command, using either transfer protocol 7 (entire file at once),
or, if the drive supports it, transfer protocol 3 (segmented download).
This command is
.B EXTREMELY DANGEROUS
and could destroy both the drive and all data on it.
.B DO NOT USE THIS COMMAND.
The
.B --fwdownload-mode3
,
.B --fwdownload-mode3-max
, and
.B --fwdownload-mode7
variations on basic
.B --fwdownload
allow overriding automatic protocol detection in favour of
forcing hdparm to use a specific transfer protocol, for testing purposes only.
.TP
.I -F
Flush the on-drive write cache buffer (older drives may not implement this).
.TP
.I -g
Display the drive geometry (cylinders, heads, sectors),
the size (in sectors) of the device,
and the starting offset (in sectors) of the device from
the beginning of the drive.
.TP
.I -h
Display terse usage information (help).
.TP
.I -H
Read the temperature from some (mostly Hitachi) drives.
Also reports if the temperature is within operating condition range
(this may not be reliable). Does not cause the drive to spin up if idle.
.TP
.I -i
Display the identification info which the kernel drivers (IDE, libata)
have stored from boot/configuration time.  This may differ from the
current information obtainable directly from the drive itself
with the
.B -I
option.
The data returned may or may not be current, depending on activity
since booting the system.
For a more detailed interpretation of the identification info,
refer to
.I AT Attachment Interface for Disk Drives,
ANSI ASC X3T9.2 working draft, revision 4a, April 19/93, and later editions.
.TP
.I --idle-immediate
Issue an ATA IDLE_IMMEDIATE command, to put the drive into a lower power state.
Usually the device remains spun-up.
.TP
.I --idle-unload
Issue an ATA IDLE_IMMEDIATE_WITH_UNLOAD command, to unload or park the heads
and put the drive into a lower power state.  Usually the device remains spun-up.
.TP
.I -I
Request identification info directly from the drive,
which is displayed in a new expanded format with considerably
more detail than with the older
.B -i
option.
.TP
.I --Iraw <pathname>
This option dumps the drive's identify data in raw binary to the specified file.
.TP
.I --Istdin
This is a special variation on the
.B -I
option,
which accepts a drive identification block as standard input
instead of using a /dev/hd* parameter.
The format of this block must be
.B exactly
the same as that found in the /proc/ide/*/hd*/identify "files",
or that produced by the
.B --Istdout
option described below.
This variation is designed for use with collected "libraries" of drive
identification information, and can also be used on ATAPI
drives which may give media errors with the standard mechanism.
When
.B --Istdin
is used, it must be the *only* parameter given.
.TP
.I --Istdout
This option dumps the drive's identify data in hex to stdout,
in a format similar to that from /proc/ide/*/identify, and suitable for
later use with the
.B --Istdin
option.
.TP
.I -J
Get/set the Western Digital (WD) Green Drive's "idle3" timeout value.
This timeout controls how often the drive parks its heads and enters
a low power consumption state.  The factory default is eight (8) seconds,
which is a very poor choice for use with Linux.  Leaving it at the default
will result in hundreds of thousands of head load/unload cycles in a very
short period of time.  The drive mechanism is only rated for 300,000 to 1,000,000
cycles, so leaving it at the default could result in premature failure,
not to mention the performance impact of the drive often having to wake-up
before doing routine I/O.
.IP
WD supply a WDIDLE3.EXE DOS utility for tweaking this setting,
and you should use that program instead of hdparm
if at all possible.  The reverse-engineered implementation in hdparm
is not as complete as the original official program, even though it does
seem to work on at a least a few drives.  A full power cycle is required
for any change in setting to take effect, regardless of which program is
used to tweak things.
.IP
A setting of 30 seconds is recommended for Linux use.
Permitted values are from 8 to 12 seconds, and from 30 to 300 seconds
in 30-second increments.
Specify a value of zero (0) to disable the WD idle3 timer completely
(NOT RECOMMENDED!).
.TP
.I -k
Get/set the "keep_settings_over_reset" flag for the drive.
When this flag is set, the drive will preserve the
.B -dmu
settings over a soft reset, (as done during the error recovery sequence).
This option defaults to off,
to prevent drive reset loops which could be caused by combinations of
.B -dmu
settings.  The
.B -k
option should therefore only be set after one has achieved confidence in
correct system operation with a chosen set of configuration settings.
In practice, all that is typically necessary to test a configuration
(prior to using \-k) is to verify that the drive can be read/written,
and that no error logs (kernel messages) are generated in the process
(look in /var/log/messages on most systems).
.TP
.I -K
Set the drive\'s "keep_features_over_reset" flag.  Setting this enables
the drive to retain the settings for
.B -APSWXZ
over a soft reset (as done during the error recovery sequence).
Not all drives support this feature.
.TP
.I -L
Set the drive\'s doorlock flag.  Setting this to
.B 1
will lock the door mechanism of some removable hard drives
(e.g. Syquest, ZIP, Jazz..), and setting it to
.B 0
will unlock the door mechanism.  Normally, Linux
maintains the door locking mechanism automatically, depending on drive usage
(locked whenever a filesystem is mounted).  But on system shutdown, this can
be a nuisance if the root partition is on a removable disk, since the root
partition is left mounted (read-only) after shutdown.  So, by using this
command to unlock the door
.B after
the root filesystem is remounted read-only, one can then remove the cartridge
from the drive after shutdown.
.TP
.I -m
Get/set sector count for multiple sector I/O on the drive.  A setting of
.B 0
disables this feature.  Multiple sector mode (aka IDE Block Mode), is a feature
of most modern IDE hard drives, permitting the transfer of multiple sectors per
I/O interrupt, rather than the usual one sector per interrupt.  When this
feature is enabled, it typically reduces operating system overhead for disk
I/O by 30-50%.  On many systems, it also provides increased data throughput
of anywhere from 5% to 50%.  Some drives, however
(most notably the WD Caviar series),
seem to run slower with multiple mode enabled.  Your mileage may vary.
Most drives support the minimum settings of
2, 4, 8, or 16 (sectors).  Larger settings may also be possible, depending on
the drive.  A setting of 16 or 32 seems optimal on many systems.
Western Digital recommends lower settings of 4 to 8 on many of their drives,
due tiny (32kB) drive buffers and non-optimized buffering algorithms.
The
.B -i
option can be used to find the maximum setting supported by an installed drive
(look for MaxMultSect in the output).
Some drives claim to support multiple mode, but lose data at some settings.
Under rare circumstances, such failures can result in
.B massive filesystem corruption.
.TP
.I --make-bad-sector
Deliberately create a bad sector (aka. "media error") on the disk.
.B EXCEPTIONALLY DANGEROUS.  DO NOT USE THIS OPTION!!
This can be useful for testing of device/RAID error recovery mechanisms.
The sector number is given as a (base10) parameter after the option.
Depending on the device, hdparm will choose one of two possible ATA commands for
corrupting the sector.  The WRITE_LONG works on most drives, but only up to the 28-bit
sector boundary.  Some very recent drives (2008) may support the new WRITE_UNCORRECTABLE_EXT
command, which works for any LBA48 sector.  If available, hdparm will use that in
preference to WRITE_LONG.  The WRITE_UNCORRECTABLE_EXT command itself presents a
choice of how the new bad sector should behave.
By default, it will look like any other bad sector, and the drive may take some
time to retry and fail on subsequent READs of the sector.
However, if a single letter
.B f
is prepended immediately in front of the first digit of the sector number parameter,
then hdparm will issue a "flagged" WRITE_UNCORRECTABLE_EXT, which causes the drive
to merely flag the sector as bad (rather than genuinely corrupt it), and subsequent
READs of the sector will fail immediately (rather than after several retries).
Note also that the
.B --repair-sector
option can be used to restore (any) bad sectors when they are no longer needed,
including sectors that were genuinely bad (the drive will likely remap those
to a fresh area on the media).
.TP
.I -M
Get/set Automatic Acoustic Management (AAM) setting. Most modern harddisk drives
have the ability to speed down the head movements to reduce their noise output.
The possible values are between 0 and 254. 128 is the most quiet (and therefore
slowest) setting and 254 the fastest (and loudest). Some drives have only two
levels (quiet / fast), while others may have different levels between 128 and 254.
At the moment, most drives only support 3 options, off, quiet, and fast.
These have been assigned the values 0, 128, and 254 at present, respectively,
but integer space has been incorporated for future expansion, should this change.
.TP
.I -n
Get or set the "ignore_write_errors" flag in the driver.
Do NOT play with this without grokking the driver source code first.
.TP
.I -N
Get/set max visible number of sectors, also known as the
.B Host Protected Area
setting.  Without a parameter,
.B -N
displays the current setting, which is reported as two values: the first
gives the current max sectors setting, and the second shows
the native (real) hardware limit for the disk.
The difference between these two values indicates how many sectors of the disk
are currently hidden from the operating system, in the form of a
.B Host Protected Area (HPA).
This area is often used by computer makers to hold diagnostic software,
and/or a copy of the originally provided operating system for recovery purposes.
Another possible use is to hide the true capacity of a very large disk
from a BIOS/system that cannot normally cope with drives of that size
(eg. most current {2010} BIOSs cannot deal with drives larger than 2TB,
so an HPA could be used to cause a 3TB drive to report itself as a 2TB drive).
To change the current max (VERY DANGEROUS, DATA LOSS IS EXTREMELY LIKELY),
a new value should be provided (in base10) immediately
following the
.B -N
option.
This value is specified as a count of sectors, rather than
the "max sector address" of the drive.
Drives have the concept of a temporary (volatile) setting which is
lost on the next hardware reset, as well as a more permanent (non-volatile)
value which survives resets and power cycles.  By default,
.B -N
affects only the temporary (volatile) setting.  To change the permanent
(non-volatile) value, prepend a leading
.B p
character immediately before the first digit of the value.
Drives are supposed to allow only a single permanent
change per session.  A hardware reset (or power cycle) is required
before another permanent
.B -N
operation can succeed.  Note that any attempt to set this value
may fail if the disk is being accessed by other software at the same time.
This is because setting the value requires a pair of back-to-back drive commands,
but there is no way to prevent some other command from being inserted between
them by the kernel.  So if it fails initially, just try again.
Kernel support for
.B -N
is buggy for many adapter types across many kernel versions,
in that an incorrect (too small) max size value is sometimes reported.
As of the 2.6.27 kernel, this does finally seem to be working on most hardware.
.TP
.I --offset
Offsets to given number of GiB (1024*1024*1024) when performing
.B -t
timings of device reads.
Speed changes (about twice) along many mechanical drives.
Usually the maximum is at the beginning, but not always.
Solid-state drives (SSDs) should show similar timings regardless of offset.
.TP
.I -p
Attempt to reprogram the IDE interface chipset for the specified PIO mode,
or attempt to auto-tune for the "best" PIO mode supported by the drive.
This feature is supported in the kernel for only a few "known" chipsets,
and even then the support is iffy at best.  Some IDE chipsets are unable
to alter the PIO mode for a single drive, in which case this option may cause
the PIO mode for
.I both
drives to be set.  Many IDE chipsets support either fewer or more than the
standard six (0 to 5) PIO modes, so the exact speed setting that is actually
implemented will vary by chipset/driver sophistication.
.I Use with extreme caution!
This feature includes zero protection for the unwary,
and an unsuccessful outcome may result in
.I severe filesystem corruption!
.TP
.I -P
Set the maximum sector count for the drive\'s internal prefetch mechanism.
Not all drives support this feature, and it was dropped from the official spec
as of ATA-4.
.TP
.I --prefer-ata12
When using the SAT (SCSI ATA Translation) protocol, hdparm normally prefers
to use the 16-byte command format whenever possible.
But some USB drive enclosures don't work correctly with 16-byte commands.
This option can be used to force use of the smaller 12-byte command format
with such drives.  hdparm will still revert to 16-byte commands for things
that cannot be done with the 12-byte format (e.g. sector accesses beyond 28-bits).
.TP
.I -q
Handle the next option quietly, suppressing normal output (but not error messages).
This is useful for reducing screen clutter when running from system startup scripts.
Not applicable to the
.B -i
or
.B -v
or
.B -t
or
.B -T
options.
.TP
.I -Q
Get or set the device's command queue_depth, if supported by the hardware.
This only works with 2.6.xx (or later) kernels, and only with
device and driver combinations which support changing the queue_depth.
For SATA disks, this is the Native Command Queuing (NCQ) queue depth.
.TP
.I -r
Get/set read-only flag for the device.  When set, Linux disallows write operations on the device.
.TP
.I -R
Get/set Write-Read-Verify feature, if the drive supports it.
Usage:
.B -R0
(disable) or
.B -R1
(enable).  This feature is intended to have the drive firmware automatically
read-back any data that is written by software, to verify that the data was
successfully written.  This is generally overkill, and can slow down disk
writes by as much as a factor of two (or more).
.TP
.I --read-sector
Reads from the specified sector number, and dumps the contents in hex to standard output.
The sector number must be given (base10) after this option.
hdparm will issue a low-level read (completely bypassing the usual block layer read/write mechanisms)
for the specified sector.  This can be used to definitively check whether a given sector is bad
(media error) or not (doing so through the usual mechanisms can sometimes give false positives).
.TP
.I --repair-sector
This is an alias for the
.B --write-sector
option.  VERY DANGEROUS.
.TP
.I -s
Enable/disable the power-on in standby feature, if supported by
the drive.
.B VERY DANGEROUS.
Do not use unless you are absolutely certain
that both the system BIOS (or firmware) and the operating system kernel
(Linux >= 2.6.22) support probing for drives that use this feature.
When enabled, the drive is powered-up in the
.B standby
mode to allow the controller to sequence the spin-up of devices,
reducing the instantaneous current draw burden when many drives
share a power supply.  Primarily for use in large RAID setups.
This feature is usually disabled and the drive is powered-up in the
.B active
mode (see \-C above).
Note that a drive may also allow enabling this feature by a jumper.
Some SATA drives support the control of this feature by pin 11 of
the SATA power connector. In these cases, this command may be
unsupported or may have no effect.
.TP
.I -S
Put the drive into idle (low-power) mode, and also set the standby
(spindown) timeout for the drive.  This timeout value is used
by the drive to determine how long to wait (with no disk activity)
before turning off the spindle motor to save power.  Under such
circumstances, the drive may take as long as 30 seconds to respond to
a subsequent disk access, though most drives are much quicker.  The
encoding of the timeout value is somewhat peculiar.  A value of zero
means "timeouts are disabled": the device will not automatically enter
standby mode.  Values from 1 to 240 specify multiples of 5 seconds,
yielding timeouts from 5 seconds to 20 minutes.  Values from 241 to
251 specify from 1 to 11 units of 30 minutes, yielding timeouts from
30 minutes to 5.5 hours.  A value of 252 signifies a timeout of 21
minutes. A value of 253 sets a vendor-defined timeout period between 8
and 12 hours, and the value 254 is reserved.  255 is interpreted as 21
minutes plus 15 seconds.  Note that some older drives may have very
different interpretations of these values.
.TP
.I --set-sector-size
For drives which support reconfiguring of the Logical Sector Size,
this flag can be used to specify the new desired sector size in bytes.
.B VERY DANGEROUS.  This most likely will scramble all data on the drive.
The specified size must be one of 512, 520, 528, 4096, 4160, or 4224.
Very few drives support values other than 512 and 4096.
.TP
.I -t
Perform timings of device reads for benchmark and comparison purposes.
For meaningful results, this operation should be repeated 2-3 times on
an otherwise inactive system (no other active processes) with at least a
couple of megabytes of free memory.  This displays the speed of reading
through the buffer cache to the disk without any prior caching of data.
This measurement is an indication of how fast the drive can sustain
sequential data reads under Linux, without any filesystem overhead.  To
ensure accurate measurements, the buffer cache is flushed during the
processing of
.I -t
using the BLKFLSBUF ioctl.
.TP
.I -T
Perform timings of cache reads for benchmark and comparison purposes.
For meaningful results, this operation should be repeated 2-3 times
on an otherwise inactive system (no other active processes) with at
least a couple of megabytes of free memory.  This displays the speed
of reading directly from the Linux buffer cache without disk access.
This measurement is essentially an indication of the throughput of the
processor, cache, and memory of the system under test.
.TP
.I --trim-sector-ranges
For Solid State Drives (SSDs).
.B EXCEPTIONALLY DANGEROUS.  DO NOT USE THIS OPTION!!
Tells the drive firmware
to discard unneeded data sectors, destroying any data that may have
been present within them.  This makes those sectors available for
immediate use by the firmware's garbage collection mechanism, to
improve scheduling for wear-leveling of the flash media.
This option expects one or more sector range pairs immediately after the option:
an LBA starting address, a colon, and a sector count (max 65535), with no intervening spaces.
.B EXCEPTIONALLY DANGEROUS.  DO NOT USE THIS OPTION!!
.IP
E.g.
.B hdparm --trim-sector-ranges 1000:4 7894:16 /dev/sdz
.TP
.I --trim-sector-ranges-stdin
Identical to
.B --trim-sector-ranges
above, except the list of lba:count pairs is read from stdin
rather than being specified on the command line.  This can be used
to avoid problems with excessively long command lines.  It also permits
batching of many more sector ranges into single commands to the drive,
up to the currently configured transfer limit (max_sectors_kb).
.TP
.I -u
Get/set the interrupt-unmask flag for the drive.  A setting of
.B 1
permits the
driver to unmask other interrupts during processing of a disk interrupt,
which greatly improves Linux\'s responsiveness and eliminates "serial port
overrun" errors.
.B Use this feature with caution:
some drive/controller combinations do
not tolerate the increased I/O latencies possible when this feature is enabled,
resulting in
.B massive filesystem corruption.
In particular,
.B CMD-640B
and
.B RZ1000
(E)IDE interfaces can be
.B unreliable
(due to a hardware flaw) when this option is used with kernel versions earlier
than 2.0.13.  Disabling the
.B IDE prefetch
feature of these interfaces (usually a BIOS/CMOS setting)
provides a safe fix for the problem for use with earlier kernels.
.TP
.I -v
Display some basic settings, similar to \-acdgkmur for IDE.
This is also the default behaviour when no options are specified.
.TP
.I -V
Display program version and exit immediately.
.TP
.I --verbose
Display extra diagnostics from some commands.
.TP
.I -w
Perform a device reset
.B (DANGEROUS).
Do NOT use this option.
It exists for unlikely situations where a reboot might otherwise be
required to get a confused drive back into a useable state.
.TP
.I --write-sector
Writes zeros to the specified sector number.  VERY DANGEROUS.
The sector number must be given (base10) after this option.
hdparm will issue a low-level write (completely bypassing the usual block layer read/write mechanisms)
to the specified sector.  This can be used to force a drive to repair a bad sector (media error).
.TP
.I -W
Get/set the IDE/SATA drive\'s write-caching feature.
.TP
.I -X
Set the IDE transfer mode for (E)IDE/ATA drives.
This is typically used in combination with
.B -d1
when enabling DMA to/from a drive on a supported interface chipset, where
.B -X mdma2
is used to select multiword DMA mode2 transfers and
.B -X sdma1
is used to select simple mode 1 DMA transfers.
With systems which support UltraDMA burst timings,
.B -X udma2
is used to select UltraDMA mode2 transfers (you\'ll need to prepare
the chipset for UltraDMA beforehand).
Apart from that, use of this option is
.B seldom necessary
since most/all modern IDE drives default to their fastest PIO transfer mode
at power-on.  Fiddling with this can be both needless and risky.
On drives which support alternate transfer modes,
.B -X
can be used to switch the mode of the drive
.B only.
Prior to changing the transfer mode, the IDE interface should be jumpered
or programmed (see
.B -p
option)
for the new mode setting to prevent loss and/or corruption of data.
.I Use this with extreme caution!
For the PIO (Programmed Input/Output)
transfer modes used by Linux, this value is simply the desired
PIO mode number plus 8.
Thus, a value of 09 sets PIO mode1, 10 enables PIO mode2,
and 11 selects PIO mode3.
Setting 00 restores the drive\'s "default" PIO mode, and 01 disables IORDY.
For multiword DMA, the value used is the desired DMA mode number
plus 32.  for UltraDMA, the value is the desired UltraDMA mode number
plus 64.
.TP
.I -y
Force an IDE drive to immediately enter the low power consumption
.B standby
mode, usually causing it to spin down.
The current power mode status can be checked using the
.B -C
option.
.TP
.I -Y
Force an IDE drive to immediately enter the lowest power consumption
.B sleep
mode, causing it to shut down completely.  A hard or soft reset
is required before the drive can be accessed again
(the Linux IDE driver will automatically handle issuing a reset if/when needed).
The current power mode status can be checked using the
.B -C
option.
.TP
.I -z
Force a kernel re-read of the partition table of the specified device(s).
.TP
.I -Z
Disable the automatic power-saving function of certain Seagate drives
(ST3xxx models?), to prevent them from idling/spinning-down
at inconvenient times.
.TP
.SH ATA Security Feature Set
.PP
These switches are
.B DANGEROUS
to experiment with, and might not work with some kernels.
.B USE AT YOUR OWN RISK.
.TP
.I --security-help
Display terse usage info for all of the \--security-* options.
.TP
.I --security-freeze
Freeze the drive\'s security settings.
The drive does not accept any security commands until next power-on reset.
Use this function in combination with \--security-unlock to protect drive
from any attempt to set a new password. Can be used standalone, too.
No other options are permitted on the command line with this one.
.TP
.I --security-prompt-for-password
Prompt for the --security PWD rather than getting from the command line args.
This avoids having passwords show up in shell history or in /proc/self/cmdline during execution.
.TP
.I --security-unlock PWD
Unlock the drive, using password PWD.
Password is given as an ASCII string and is padded with NULs to reach 32 bytes.
The applicable drive password is selected with the \--user-master switch
(default is "user" password).
No other options are permitted on the command line with this one.
.TP
.I --security-set-pass PWD
Lock the drive, using password PWD (Set Password)
.B (DANGEROUS).
Password is given as an ASCII string and is padded with NULs to reach 32 bytes.
Use the special password
.B NULL
to set an empty password.
The applicable drive password is selected with the \--user-master switch
(default is "user" password)
and the applicable security mode with the \--security-mode switch.
No other options are permitted on the command line with this one.
.TP
.I --security-disable PWD
Disable drive locking, using password PWD.
Password is given as an ASCII string and is padded with NULs to reach 32 bytes.
The applicable drive password is selected with the \--user-master switch
(default is "user" password).
No other options are permitted on the command line with this one.
.TP
.I --security-erase PWD
Erase (locked) drive, using password PWD
.B (DANGEROUS).
Password is given as an ASCII string and is padded with NULs to reach 32 bytes.
Use the special password
.B NULL
to represent an empty password.
The applicable drive password is selected with the \--user-master switch
(default is "user" password).
No other options are permitted on the command line with this one.
.TP
.I --security-erase-enhanced PWD
Enhanced erase (locked) drive, using password PWD
.B (DANGEROUS).
Password is given as an ASCII string and is padded with NULs to reach 32 bytes.
The applicable drive password is selected with the \--user-master switch
(default is "user" password).
No other options are permitted on the command line with this one.
.TP
.I --user-master USER
Specifies which password (user/master) to select.
.B Defaults to "user" password.
Only useful in combination with \--security-unlock, \--security-set-pass,
\--security-disable, \--security-erase or \--security-erase-enhanced.
        u       user password
        m       master password

.TP
.I --security-mode MODE
Specifies which security mode (high/maximum) to set.
.B Defaults to high.
Only useful in combination with \--security-set-pass.
        h       high security
        m       maximum security

.B THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
.SH FILES
/etc/hdparm.conf
.SH BUGS
As noted above, the
.B -m sectcount
and
.B -u 1
options should be used with caution at first, preferably on a
read-only filesystem.  Most drives work well with these features, but
a few drive/controller combinations are not 100% compatible.  Filesystem
corruption may result.  Backup everything before experimenting!
.PP
Some options (e.g. \-r for SCSI) may not work with old kernels as
necessary ioctl()\'s were not supported.
.PP
Although this utility is intended primarily for use with SATA/IDE hard disk
devices, several of the options are also valid (and permitted) for use with
SCSI hard disk devices and MFM/RLL hard disks with XT interfaces.
.PP
The Linux kernel up until 2.6.12 (and probably later) doesn\'t handle the
security unlock and disable commands gracefully and will segfault and in some
cases even panic. The security commands however might indeed have been executed
by the drive. This poor kernel behaviour makes the PIO data security commands
rather useless at the moment.
.PP
Note that the "security erase" and "security disable" commands have been
implemented as two consecutive PIO data commands and will not succeed on a
locked drive because the second command will not be issued after the segfault.
See the code for hints how patch it to work around this problem. Despite the
segfault it is often still possible to run two instances of hdparm
consecutively and issue the two necessary commands that way.
.SH AUTHOR
.B hdparm
has been written by Mark Lord <mlord@pobox.com>, the original primary
developer and maintainer of the (E)IDE driver for Linux, and current contributor
to the libata subsystem, along with suggestions and patches from many netfolk.
.PP
The disable Seagate auto-powersaving code
is courtesy of Tomi Leppikangas(tomilepp@paju.oulu.fi).
.PP
Security freeze command by Benjamin Benz, 2005.
.PP
PIO data out security commands by Leonard den Ottolander, 2005.
Some other parts by Benjamin Benz and others.
.SH SEE ALSO
.B http://www.t13.org/
Technical Committee T13 AT Attachment (ATA/ATAPI) Interface.
.PP
.B http://www.serialata.org/
Serial ATA International Organization.
.PP
.B http://www.compactflash.org/
CompactFlash Association.


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
  serializedVersion: 6
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_Name: 06_Unlit_Textured_Trans_Cutoff_DoubleSide
  m_Shader: {fileID: 4800000, guid: c4edd00ff2db5b24391a4fcb1762e459, type: 3}
  m_ShaderKeywords: _ALPHATEST_ON _BLENDMODE_ALPHA _DOUBLESIDED_ON _SURFACE_TYPE_TRANSPARENT
  m_LightmapFlags: 4
  m_EnableInstancingVariants: 0
  m_DoubleSidedGI: 1
  m_CustomRenderQueue: 3000
  stringTagMap:
    RenderType: Transparent
  disabledShaderPasses:
  - Forward
  - DepthOnly
  - DepthForwardOnly
  - ForwardOnly
  - GBuffer
  - GBufferWithPrepass
  - MOTIONVECTORS
  - TransparentDepthPrepass
  - META
  - SHADOWCASTER
  - TransparentBackface
  - TransparentBackfaceDebugDisplay
  - TransparentDepthPostpass
  - RayTracingPrepass
  m_SavedProperties:
    serializedVersion: 3
    m_TexEnvs:
    - _AnisotropyMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _BaseColorMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _BentNormalMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _BentNormalMapOS:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _DetailMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _DistortionVectorMap:
        m_Texture: {fileID: 8400000, guid: f330dd40525168e41af9843c1433c8ec, type: 2}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _EmissiveColorMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _HeightMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _MainTex:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _MaskMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _NormalMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _NormalMapOS:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _SpecularColorMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _SubsurfaceRadiusMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _TangentMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _TangentMapOS:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _ThicknessMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _UnlitColorMap:
        m_Texture: {fileID: 2800000, guid: b23bea53bdbdb5a4aaacf12522910599, type: 3}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    m_Floats:
    - _ATDistance: 1
    - _AddPrecomputedVelocity: 0
    - _AlbedoAffectEmissive: 0
    - _AlphaCutoff: 0.5
    - _AlphaCutoffEnable: 1
    - _AlphaDstBlend: 10
    - _AlphaSrcBlend: 1
    - _AlphaToMask: 0
    - _AlphaToMaskInspectorValue: 0
    - _Anisotropy: 0
    - _BlendMode: 0
    - _CoatCoverage: 1
    - _CoatIOR: 0.5
    - _CullMode: 0
    - _Cutoff: 0.5
    - _DepthOffsetEnable: 0
    - _DetailAlbedoScale: 1
    - _DetailNormalScale: 1
    - _DetailSmoothnessScale: 1
    - _DisplacementLockObjectScale: 1
    - _DisplacementLockTilingScale: 1
    - _DisplacementMode: 0
    - _DistortionBlendMode: 0
    - _DistortionBlurBlendMode: 0
    - _DistortionBlurDstBlend: 1
    - _DistortionBlurRemapMax: 1
    - _DistortionBlurRemapMin: 0
    - _DistortionBlurScale: 1
    - _DistortionBlurSrcBlend: 1
    - _DistortionDepthTest: 0
    - _DistortionDstBlend: 1
    - _DistortionEnable: 1
    - _DistortionOnly: 1
    - _DistortionScale: 5
    - _DistortionSrcBlend: 1
    - _DistortionVectorBias: -1
    - _DistortionVectorScale: 2
    - _DoubleSidedEnable: 1
    - _DoubleSidedNormalMode: 1
    - _Drag: 1
    - _DstBlend: 10
    - _EmissiveColorMode: 1
    - _EmissiveExposureWeight: 1
    - _EmissiveIntensity: 1
    - _EmissiveIntensityUnit: 0
    - _EnableBlendModePreserveSpecularLighting: 1
    - _EnableFogOnTransparent: 0
    - _EnableSpecularOcclusion: 0
    - _EnableWind: 0
    - _HdrpVersion: 2
    - _HeightAmplitude: 0.02
    - _HeightCenter: 0.5
    - _HeightMax: 1
    - _HeightMin: -1
    - _IOR: 1
    - _IncludeIndirectLighting: 1
    - _InitialBend: 1
    - _InvTilingScale: 1
    - _LinkDetailsWithBase: 1
    - _MaterialID: 1
    - _Metallic: 0
    - _NormalMapSpace: 0
    - _NormalScale: 1
    - _OpaqueCullMode: 2
    - _PPDLodThreshold: 5
    - _PPDMaxSamples: 15
    - _PPDMinSamples: 5
    - _PPDPrimitiveLength: 1
    - _PPDPrimitiveWidth: 1
    - _PreRefractionPass: 0
    - _RefractionMode: 0
    - _ShiverDirectionality: 0.5
    - _ShiverDrag: 0.2
    - _Smoothness: 1
    - _SmoothnessRemapMax: 1
    - _SmoothnessRemapMin: 0
    - _SrcBlend: 1
    - _StencilRef: 0
    - _StencilRefDepth: 0
    - _StencilRefDistortionVec: 4
    - _StencilRefMV: 32
    - _StencilWriteMask: 6
    - _StencilWriteMaskDepth: 8
    - _StencilWriteMaskDistortionVec: 4
    - _StencilWriteMaskMV: 40
    - _Stiffness: 1
    - _SubsurfaceProfile: 0
    - _SubsurfaceRadius: 1
    - _SurfaceType: 1
    - _TexWorldScale: 1
    - _Thickness: 1
    - _ThicknessMultiplier: 1
    - _TransparentCullMode: 2
    - _TransparentSortPriority: 0
    - _TransparentZWrite: 0
    - _UVBase: 0
    - _UVDetail: 0
    - _UseEmissiveIntensity: 0
    - _ZTestDepthEqualForOpaque: 4
    - _ZTestMode: 8
    - _ZTestModeDistortion: 8
    - _ZTestTransparent: 4
    - _ZWrite: 0
    m_Colors:
    - _BaseColor: {r: 1, g: 1, b: 1, a: 1}
    - _Color: {r: 0, g: 0, b: 0, a: 1}
    - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
    - _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
    - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
    - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
    - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
    - _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
    - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
    - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
    - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
    - _UnlitColor: {r: 1, g: 1, b: 1, a: 1}
    - _UnlitColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
  m_BuildTextureStacks: []
--- !u!114 &6549346817917000746
MonoBehaviour:
  m_ObjectHideFlags: 11
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  version: 9


/* (c) 2018 Open Source Geospatial Foundation - all rights reserved
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */
package org.geoserver.api.features;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import java.io.IOException;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.geoserver.api.APIRequestInfo;
import org.geoserver.api.AbstractCollectionDocument;
import org.geoserver.api.CollectionExtents;
import org.geoserver.api.Link;
import org.geoserver.api.QueryablesDocument;
import org.geoserver.catalog.FeatureTypeInfo;
import org.geoserver.config.GeoServer;
import org.geoserver.config.ServiceInfo;
import org.geoserver.ows.URLMangler;
import org.geoserver.ows.util.ResponseUtils;
import org.geotools.geometry.jts.ReferencedEnvelope;
import org.geotools.util.logging.Logging;
import org.opengis.feature.type.FeatureType;
import org.springframework.http.MediaType;

/** Description of a single collection, that will be serialized to JSON/XML/HTML */
@JsonPropertyOrder({"id", "title", "description", "extent", "links"})
@JacksonXmlRootElement(localName = "Collection", namespace = "http://www.opengis.net/wfs/3.0")
public class CollectionDocument extends AbstractCollectionDocument {
    static final Logger LOGGER = Logging.getLogger(CollectionDocument.class);

    FeatureTypeInfo featureType;
    String mapPreviewURL;
    List<String> crs;

    public CollectionDocument(GeoServer geoServer, FeatureTypeInfo featureType, List<String> crs) {
        super(featureType);
        // basic info
        String collectionId = featureType.prefixedName();
        this.id = collectionId;
        this.title = featureType.getTitle();
        this.description = featureType.getAbstract();
        ReferencedEnvelope bbox = featureType.getLatLonBoundingBox();
        setExtent(new CollectionExtents(bbox));
        this.featureType = featureType;
        this.crs = crs;

        // links
        Collection<MediaType> formats =
                APIRequestInfo.get().getProducibleMediaTypes(FeaturesResponse.class, true);
        String baseUrl = APIRequestInfo.get().getBaseURL();
        for (MediaType format : formats) {
            String apiUrl =
                    ResponseUtils.buildURL(
                            baseUrl,
                            "ogc/features/collections/" + collectionId + "/items",
                            Collections.singletonMap("f", format.toString()),
                            URLMangler.URLType.SERVICE);
            addLink(
                    new Link(
                            apiUrl,
                            Link.REL_ITEMS,
                            format.toString(),
                            collectionId + " items as " + format.toString(),
                            "items"));
        }
        addSelfLinks("ogc/features/collections/" + id);

        // describedBy as GML schema
        String describedByHref =
                ResponseUtils.buildURL(
                        baseUrl,
                        "wfs",
                        new HashMap<String, String>() {
                            {
                                put("service", "WFS");
                                put("version", "2.0");
                                put("request", "DescribeFeatureType");
                                put("typenames", featureType.prefixedName());
                            }
                        },
                        URLMangler.URLType.SERVICE);
        Link describedBy =
                new Link(describedByHref, "describedBy", "application/xml", "Schema for " + id);
        addLink(describedBy);

        // queryables
        addLinksFor(
                "ogc/features/collections/"
                        + ResponseUtils.urlEncode(featureType.prefixedName())
                        + "/queryables",
                QueryablesDocument.class,
                "Queryable attributes as ",
                "queryables",
                null,
                "queryables");

        // map preview
        if (isWMSAvailable(geoServer)) {
            Map<String, String> kvp = new HashMap<>();
            kvp.put("LAYERS", featureType.prefixedName());
            kvp.put("FORMAT", "application/openlayers");
            this.mapPreviewURL =
                    ResponseUtils.buildURL(baseUrl, "wms/reflect", kvp, URLMangler.URLType.SERVICE);
        }
    }

    private boolean isWMSAvailable(GeoServer geoServer) {
        ServiceInfo si =
                geoServer
                        .getServices()
                        .stream()
                        .filter(s -> "WMS".equals(s.getId()))
                        .findFirst()
                        .orElse(null);
        return si != null;
    }

    @JsonIgnore
    public FeatureType getSchema() {
        try {
            return featureType.getFeatureType();
        } catch (IOException e) {
            LOGGER.log(Level.INFO, "Failed to compute feature type", e);
            return null;
        }
    }

    @JsonIgnore
    public String getMapPreviewURL() {
        return mapPreviewURL;
    }

    public List<String> getCrs() {
        return crs;
    }
}


name = "frontend"
type = "webpack"
account_id = ""
workers_dev = true
route = ""
zone_id = ""

[site]
bucket = "public"
entry-point = "workers-site"


//
//     Generated by class-dump 3.5 (64 bit).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//

#import <objc/NSObject.h>

@class ACAccountStore;

@interface ACRemoteCommandHandler : NSObject
{
    ACAccountStore *_accountStore;
}

- (void).cxx_destruct;
- (id)_localAccountMatchingRemoteAccount:(id)arg1;
- (void)_deleteAccount:(id)arg1 withCompletion:(CDUnknownBlockType)arg2;
- (void)_promptUserForAccountCredential:(id)arg1 withOptions:(id)arg2 completion:(CDUnknownBlockType)arg3;
- (void)_authenticateAccount:(id)arg1 withCompletion:(CDUnknownBlockType)arg2;
- (void)_updateAccount:(id)arg1 withCompletion:(CDUnknownBlockType)arg2;
- (void)_saveAccount:(id)arg1 completion:(CDUnknownBlockType)arg2;
- (void)_addAccount:(id)arg1 withOptions:(id)arg2 completion:(CDUnknownBlockType)arg3;
- (void)_removeAllAccountsWithCompletion:(CDUnknownBlockType)arg1;
- (void)handleCommand:(id)arg1 forAccount:(id)arg2 options:(id)arg3 completion:(CDUnknownBlockType)arg4;
- (id)init;

@end


# This file is part of the Sylius package.
# (c) Paweł Jędrzejewski

default:
    suites:
        ui_locales:
            contexts:
                - sylius.behat.context.hook.doctrine_orm

                - sylius.behat.context.transform.channel
                - sylius.behat.context.transform.locale
                - sylius.behat.context.transform.shared_storage
                - sylius.behat.context.transform.lexical

                - sylius.behat.context.setup.channel
                - sylius.behat.context.setup.locale
                - sylius.behat.context.setup.product

                - sylius.behat.context.ui.channel
                - sylius.behat.context.ui.shop.locale
                - sylius.behat.context.ui.shop.product

            filters:
                tags: "@locales && @ui"


(module Jack_6.35mm_Neutrik_NRJ4HF_Horizontal (layer F.Cu) (tedit 5BF470E4)
  (descr "Slim Jacks, 6.35mm (1/4in) mono jack, switched, fully threaded nose, https://www.neutrik.com/en/product/nrj4hf")
  (tags "neutrik jack slim")
  (fp_text reference REF** (at 6.35 -3.5) (layer F.SilkS)
    (effects (font (size 1 1) (thickness 0.15)))
  )
  (fp_text value Jack_6.35mm_Neutrik_NRJ4HF_Horizontal (at 6.35 15) (layer F.Fab)
    (effects (font (size 1 1) (thickness 0.15)))
  )
  (fp_text user %R (at 6.35 5.715) (layer F.Fab)
    (effects (font (size 1 1) (thickness 0.15)))
  )
  (fp_line (start 25.85 1.73) (end 16.95 1.73) (layer F.Fab) (width 0.1))
  (fp_line (start 25.85 12.73) (end 25.85 1.73) (layer F.Fab) (width 0.1))
  (fp_line (start 16.95 12.73) (end 25.85 12.73) (layer F.Fab) (width 0.1))
  (fp_line (start -7.35 -2.09) (end 16.95 -2.09) (layer F.Fab) (width 0.1))
  (fp_line (start -7.35 13.66) (end -7.35 -2.09) (layer F.Fab) (width 0.1))
  (fp_line (start 16.95 13.66) (end -7.35 13.66) (layer F.Fab) (width 0.1))
  (fp_line (start 16.95 -2.09) (end 16.95 13.66) (layer F.Fab) (width 0.1))
  (fp_line (start -7.85 14.16) (end 26.35 14.16) (layer F.CrtYd) (width 0.05))
  (fp_line (start 26.35 14.16) (end 26.35 -2.59) (layer F.CrtYd) (width 0.05))
  (fp_line (start 26.35 -2.59) (end -7.85 -2.59) (layer F.CrtYd) (width 0.05))
  (fp_line (start -7.85 14.16) (end -7.85 -2.59) (layer F.CrtYd) (width 0.05))
  (fp_line (start 16.95 -2.09) (end 16.95 13.66) (layer Dwgs.User) (width 0.1))
  (fp_line (start -7.47 13.78) (end 17.07 13.78) (layer F.SilkS) (width 0.12))
  (fp_line (start -7.47 13.78) (end -7.47 -2.21) (layer F.SilkS) (width 0.12))
  (fp_line (start 25.97 12.85) (end 17.07 12.85) (layer F.SilkS) (width 0.12))
  (fp_line (start 25.97 12.85) (end 25.97 1.61) (layer F.SilkS) (width 0.12))
  (fp_line (start 25.97 1.61) (end 17.07 1.61) (layer F.SilkS) (width 0.12))
  (fp_line (start 17.07 -2.21) (end 17.07 13.78) (layer F.SilkS) (width 0.12))
  (fp_line (start -7.47 -2.21) (end 17.07 -2.21) (layer F.SilkS) (width 0.12))
  (pad T thru_hole circle (at 0 0) (size 3 3) (drill 1.5) (layers *.Cu *.Mask))
  (pad S thru_hole circle (at 12.7 0) (size 3 3) (drill 1.5) (layers *.Cu *.Mask))
  (pad SN thru_hole circle (at 12.7 11.43) (size 3 3) (drill 1.5) (layers *.Cu *.Mask))
  (pad "" np_thru_hole circle (at 3.15 2.13) (size 3 3) (drill 3) (layers *.Cu *.Mask))
  (pad "" np_thru_hole circle (at 9.5 11.43) (size 2 2) (drill 2) (layers *.Cu *.Mask))
  (pad "" np_thru_hole circle (at 9.5 0) (size 2 2) (drill 2) (layers *.Cu *.Mask))
  (pad TN thru_hole circle (at 0 11.43) (size 3 3) (drill 1.5) (layers *.Cu *.Mask))
  (model ${KISYS3DMOD}/Connector_Audio.3dshapes/Jack_6.35mm_Neutrik_NRJ4HF_Horizontal.wrl
    (at (xyz 0 0 0))
    (scale (xyz 1 1 1))
    (rotate (xyz 0 0 0))
  )
)


 Uploaded File Details

            ${uploadedFile}
            FileName:
            ${uploadedFile.fileName}

            Type:
            ${uploadedFile.contentType}


---
-api-id: P:Windows.UI.Input.Spatial.SpatialInteractionSourceLocation.AngularVelocity
-api-type: winrt property
---

<!-- Property syntax.
public IReference<Vector3> AngularVelocity { get; }
-->

# Windows.UI.Input.Spatial.SpatialInteractionSourceLocation.AngularVelocity

## -description
Gets the angular velocity of a hand or motion controller.

## -property-value
The angular velocity.

## -remarks
The angular velocity is expressed in an axis-angle representation.  The unit vector is the axis of rotation and the magnitude is the angular speed in radians per second, following the right-hand rule.

## -see-also

## -examples


Before posting an issue:
 - avoid opening a new issue if you need a simple or a yes/no answer, use `gitter` instead
 - check if the same issue has already been reported
 - check if the enhancement is already mentioned in the `TODO project`

When writing an issue:
 - use the markdown formatting to make the issue easier to read
 - if the issue is specific to some git version start the title with `[git]` or `[git:<branch>]`
 - don't worry about being sarcastic ;-)
 - for bugs/unexpected behavior, use the following "template"
 - remove the template text you don't need, like these first 11 lines

**Open different issues for different and unrelated bugs/requests**

---

Short description of the issue, if the title isn't enough.

#### Expected Behavior

#### Actual Behavior

#### Step to reproduce


<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Role uuid="336cfdb1-cab1-4b40-bc08-e39b999ec65e">
		<Properties>
			<Name>Админ</Name>
			<Synonym>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Админ</v8:content>
				</v8:item>
			</Synonym>
			<Comment/>
		</Properties>
	</Role>
</MetaDataObject>


// SPDX-License-Identifier: GPL-2.0
//
// Copyright 2009 Simtec Electronics

#include <linux/gpio.h>
#include <linux/clk.h>
#include <linux/module.h>

#include <sound/soc.h>

#include <linux/platform_data/asoc-s3c24xx_simtec.h>

#include "s3c24xx-i2s.h"
#include "s3c24xx_simtec.h"

static struct s3c24xx_audio_simtec_pdata *pdata;
static struct clk *xtal_clk;

static int spk_gain;
static int spk_unmute;

/**
 * speaker_gain_get - read the speaker gain setting.
 * @kcontrol: The control for the speaker gain.
 * @ucontrol: The value that needs to be updated.
 *
 * Read the value for the AMP gain control.
 */
static int speaker_gain_get(struct snd_kcontrol *kcontrol,
			    struct snd_ctl_elem_value *ucontrol)
{
	ucontrol->value.integer.value[0] = spk_gain;
	return 0;
}

/**
 * speaker_gain_set - set the value of the speaker amp gain
 * @value: The value to write.
 */
static void speaker_gain_set(int value)
{
	gpio_set_value_cansleep(pdata->amp_gain[0], value & 1);
	gpio_set_value_cansleep(pdata->amp_gain[1], value >> 1);
}

/**
 * speaker_gain_put - set the speaker gain setting.
 * @kcontrol: The control for the speaker gain.
 * @ucontrol: The value that needs to be set.
 *
 * Set the value of the speaker gain from the specified
 * @ucontrol setting.
 *
 * Note, if the speaker amp is muted, then we do not set a gain value
 * as at-least one of the ICs that is fitted will try and power up even
 * if the main control is set to off.
 */
static int speaker_gain_put(struct snd_kcontrol *kcontrol,
			    struct snd_ctl_elem_value *ucontrol)
{
	int value = ucontrol->value.integer.value[0];

	spk_gain = value;

	if (!spk_unmute)
		speaker_gain_set(value);

	return 0;
}

static const struct snd_kcontrol_new amp_gain_controls[] = {
	SOC_SINGLE_EXT("Speaker Gain", 0, 0, 3, 0,
		       speaker_gain_get, speaker_gain_put),
};

/**
 * spk_unmute_state - set the unmute state of the speaker
 * @to: zero to unmute, non-zero to ununmute.
 */
static void spk_unmute_state(int to)
{
	pr_debug("%s: to=%d\n", __func__, to);

	spk_unmute = to;
	gpio_set_value(pdata->amp_gpio, to);

	/* if we're umuting, also re-set the gain */
	if (to && pdata->amp_gain[0] > 0)
		speaker_gain_set(spk_gain);
}

/**
 * speaker_unmute_get - read the speaker unmute setting.
 * @kcontrol: The control for the speaker gain.
 * @ucontrol: The value that needs to be updated.
 *
 * Read the value for the AMP gain control.
 */
static int speaker_unmute_get(struct snd_kcontrol *kcontrol,
			    struct snd_ctl_elem_value *ucontrol)
{
	ucontrol->value.integer.value[0] = spk_unmute;
	return 0;
}

/**
 * speaker_unmute_put - set the speaker unmute setting.
 * @kcontrol: The control for the speaker gain.
 * @ucontrol: The value that needs to be set.
 *
 * Set the value of the speaker gain from the specified
 * @ucontrol setting.
 */
static int speaker_unmute_put(struct snd_kcontrol *kcontrol,
			    struct snd_ctl_elem_value *ucontrol)
{
	spk_unmute_state(ucontrol->value.integer.value[0]);
	return 0;
}

/* This is added as a manual control as the speaker amps create clicks
 * when their power state is changed, which are far more noticeable than
 * anything produced by the CODEC itself.
 */
static const struct snd_kcontrol_new amp_unmute_controls[] = {
	SOC_SINGLE_EXT("Speaker Switch", 0, 0, 1, 0,
		       speaker_unmute_get, speaker_unmute_put),
};

void simtec_audio_init(struct snd_soc_pcm_runtime *rtd)
{
	struct snd_soc_card *card = rtd->card;

	if (pdata->amp_gpio > 0) {
		pr_debug("%s: adding amp routes\n", __func__);

		snd_soc_add_card_controls(card, amp_unmute_controls,
				     ARRAY_SIZE(amp_unmute_controls));
	}

	if (pdata->amp_gain[0] > 0) {
		pr_debug("%s: adding amp controls\n", __func__);
		snd_soc_add_card_controls(card, amp_gain_controls,
				     ARRAY_SIZE(amp_gain_controls));
	}
}
EXPORT_SYMBOL_GPL(simtec_audio_init);

#define CODEC_CLOCK 12000000

/**
 * simtec_hw_params - update hardware parameters
 * @substream: The audio substream instance.
 * @params: The parameters requested.
 *
 * Update the codec data routing and configuration  settings
 * from the supplied data.
 */
static int simtec_hw_params(struct snd_pcm_substream *substream,
			    struct snd_pcm_hw_params *params)
{
	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
	struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
	int ret;

	ret = snd_soc_dai_set_sysclk(codec_dai, 0,
				     CODEC_CLOCK, SND_SOC_CLOCK_IN);
	if (ret) {
		pr_err( "%s: failed setting codec sysclk\n", __func__);
		return ret;
	}

	if (pdata->use_mpllin) {
		ret = snd_soc_dai_set_sysclk(cpu_dai, S3C24XX_CLKSRC_MPLL,
					     0, SND_SOC_CLOCK_OUT);

		if (ret) {
			pr_err("%s: failed to set MPLLin as clksrc\n",
			       __func__);
			return ret;
		}
	}

	if (pdata->output_cdclk) {
		int cdclk_scale;

		cdclk_scale = clk_get_rate(xtal_clk) / CODEC_CLOCK;
		cdclk_scale--;

		ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_PRESCALER,
					     cdclk_scale);
	}

	return 0;
}

static int simtec_call_startup(struct s3c24xx_audio_simtec_pdata *pd)
{
	/* call any board supplied startup code, this currently only
	 * covers the bast/vr1000 which have a CPLD in the way of the
	 * LRCLK */
	if (pd->startup)
		pd->startup();

	return 0;
}

static const struct snd_soc_ops simtec_snd_ops = {
	.hw_params	= simtec_hw_params,
};

/**
 * attach_gpio_amp - get and configure the necessary gpios
 * @dev: The device we're probing.
 * @pd: The platform data supplied by the board.
 *
 * If there is a GPIO based amplifier attached to the board, claim
 * the necessary GPIO lines for it, and set default values.
 */
static int attach_gpio_amp(struct device *dev,
			   struct s3c24xx_audio_simtec_pdata *pd)
{
	int ret;

	/* attach gpio amp gain (if any) */
	if (pdata->amp_gain[0] > 0) {
		ret = gpio_request(pd->amp_gain[0], "gpio-amp-gain0");
		if (ret) {
			dev_err(dev, "cannot get amp gpio gain0\n");
			return ret;
		}

		ret = gpio_request(pd->amp_gain[1], "gpio-amp-gain1");
		if (ret) {
			dev_err(dev, "cannot get amp gpio gain1\n");
			gpio_free(pdata->amp_gain[0]);
			return ret;
		}

		gpio_direction_output(pd->amp_gain[0], 0);
		gpio_direction_output(pd->amp_gain[1], 0);
	}

	/* note, currently we assume GPA0 isn't valid amp */
	if (pdata->amp_gpio > 0) {
		ret = gpio_request(pd->amp_gpio, "gpio-amp");
		if (ret) {
			dev_err(dev, "cannot get amp gpio %d (%d)\n",
				pd->amp_gpio, ret);
			goto err_amp;
		}

		/* set the amp off at startup */
		spk_unmute_state(0);
	}

	return 0;

err_amp:
	if (pd->amp_gain[0] > 0) {
		gpio_free(pd->amp_gain[0]);
		gpio_free(pd->amp_gain[1]);
	}

	return ret;
}

static void detach_gpio_amp(struct s3c24xx_audio_simtec_pdata *pd)
{
	if (pd->amp_gain[0] > 0) {
		gpio_free(pd->amp_gain[0]);
		gpio_free(pd->amp_gain[1]);
	}

	if (pd->amp_gpio > 0)
		gpio_free(pd->amp_gpio);
}

#ifdef CONFIG_PM
static int simtec_audio_resume(struct device *dev)
{
	simtec_call_startup(pdata);
	return 0;
}

const struct dev_pm_ops simtec_audio_pmops = {
	.resume	= simtec_audio_resume,
};
EXPORT_SYMBOL_GPL(simtec_audio_pmops);
#endif

int simtec_audio_core_probe(struct platform_device *pdev,
			    struct snd_soc_card *card)
{
	struct platform_device *snd_dev;
	int ret;

	card->dai_link->ops = &simtec_snd_ops;
	card->dai_link->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
				  SND_SOC_DAIFMT_CBM_CFM;

	pdata = pdev->dev.platform_data;
	if (!pdata) {
		dev_err(&pdev->dev, "no platform data supplied\n");
		return -EINVAL;
	}

	simtec_call_startup(pdata);

	xtal_clk = clk_get(&pdev->dev, "xtal");
	if (IS_ERR(xtal_clk)) {
		dev_err(&pdev->dev, "could not get clkout0\n");
		return -EINVAL;
	}

	dev_info(&pdev->dev, "xtal rate is %ld\n", clk_get_rate(xtal_clk));

	ret = attach_gpio_amp(&pdev->dev, pdata);
	if (ret)
		goto err_clk;

	snd_dev = platform_device_alloc("soc-audio", -1);
	if (!snd_dev) {
		dev_err(&pdev->dev, "failed to alloc soc-audio devicec\n");
		ret = -ENOMEM;
		goto err_gpio;
	}

	platform_set_drvdata(snd_dev, card);

	ret = platform_device_add(snd_dev);
	if (ret) {
		dev_err(&pdev->dev, "failed to add soc-audio dev\n");
		goto err_pdev;
	}

	platform_set_drvdata(pdev, snd_dev);
	return 0;

err_pdev:
	platform_device_put(snd_dev);

err_gpio:
	detach_gpio_amp(pdata);

err_clk:
	clk_put(xtal_clk);
	return ret;
}
EXPORT_SYMBOL_GPL(simtec_audio_core_probe);

int simtec_audio_remove(struct platform_device *pdev)
{
	struct platform_device *snd_dev = platform_get_drvdata(pdev);

	platform_device_unregister(snd_dev);

	detach_gpio_amp(pdata);
	clk_put(xtal_clk);
	return 0;
}
EXPORT_SYMBOL_GPL(simtec_audio_remove);

MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
MODULE_DESCRIPTION("ALSA SoC Simtec Audio common support");
MODULE_LICENSE("GPL");


var http = require('http')
var url = require('url')

var https = module.exports

for (var key in http) {
  if (http.hasOwnProperty(key)) https[key] = http[key]
}

https.request = function (params, cb) {
  params = validateParams(params)
  return http.request.call(this, params, cb)
}

https.get = function (params, cb) {
  params = validateParams(params)
  return http.get.call(this, params, cb)
}

function validateParams (params) {
  if (typeof params === 'string') {
    params = url.parse(params)
  }
  if (!params.protocol) {
    params.protocol = 'https:'
  }
  if (params.protocol !== 'https:') {
    throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"')
  }
  return params
}


(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS
    mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css"));
  else if (typeof define == "function" && define.amd) // AMD
    define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod);
  else // Plain browser env
    mod(CodeMirror);
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode("htmlmixed", function(config, parserConfig) {
  var htmlMode = CodeMirror.getMode(config, {name: "xml",
                                             htmlMode: true,
                                             multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
                                             multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag});
  var cssMode = CodeMirror.getMode(config, "css");

  var scriptTypes = [], scriptTypesConf = parserConfig && parserConfig.scriptTypes;
  scriptTypes.push({matches: /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,
                    mode: CodeMirror.getMode(config, "javascript")});
  if (scriptTypesConf) for (var i = 0; i < scriptTypesConf.length; ++i) {
    var conf = scriptTypesConf[i];
    scriptTypes.push({matches: conf.matches, mode: conf.mode && CodeMirror.getMode(config, conf.mode)});
  }
  scriptTypes.push({matches: /./,
                    mode: CodeMirror.getMode(config, "text/plain")});

  function html(stream, state) {
    var tagName = state.htmlState.tagName;
    var style = htmlMode.token(stream, state.htmlState);
    if (tagName == "script" && /\btag\b/.test(style) && stream.current() == ">") {
      // Script block: mode to change to depends on type attribute
      var scriptType = stream.string.slice(Math.max(0, stream.pos - 100), stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);
      scriptType = scriptType ? scriptType[1] : "";
      if (scriptType && /[\"\']/.test(scriptType.charAt(0))) scriptType = scriptType.slice(1, scriptType.length - 1);
      for (var i = 0; i < scriptTypes.length; ++i) {
        var tp = scriptTypes[i];
        if (typeof tp.matches == "string" ? scriptType == tp.matches : tp.matches.test(scriptType)) {
          if (tp.mode) {
            state.token = script;
            state.localMode = tp.mode;
            state.localState = tp.mode.startState && tp.mode.startState(htmlMode.indent(state.htmlState, ""));
          }
          break;
        }
      }
    } else if (tagName == "style" && /\btag\b/.test(style) && stream.current() == ">") {
      state.token = css;
      state.localMode = cssMode;
      state.localState = cssMode.startState(htmlMode.indent(state.htmlState, ""));
    }
    return style;
  }
  function maybeBackup(stream, pat, style) {
    var cur = stream.current();
    var close = cur.search(pat), m;
    if (close > -1) stream.backUp(cur.length - close);
    else if (m = cur.match(/<\/?$/)) {
      stream.backUp(cur.length);
      if (!stream.match(pat, false)) stream.match(cur);
    }
    return style;
  }
  function script(stream, state) {
    if (stream.match(/^<\/\s*script\s*>/i, false)) {
      state.token = html;
      state.localState = state.localMode = null;
      return html(stream, state);
    }
    return maybeBackup(stream, /<\/\s*script\s*>/,
                       state.localMode.token(stream, state.localState));
  }
  function css(stream, state) {
    if (stream.match(/^<\/\s*style\s*>/i, false)) {
      state.token = html;
      state.localState = state.localMode = null;
      return html(stream, state);
    }
    return maybeBackup(stream, /<\/\s*style\s*>/,
                       cssMode.token(stream, state.localState));
  }

  return {
    startState: function() {
      var state = htmlMode.startState();
      return {token: html, localMode: null, localState: null, htmlState: state};
    },

    copyState: function(state) {
      if (state.localState)
        var local = CodeMirror.copyState(state.localMode, state.localState);
      return {token: state.token, localMode: state.localMode, localState: local,
              htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
    },

    token: function(stream, state) {
      return state.token(stream, state);
    },

    indent: function(state, textAfter) {
      if (!state.localMode || /^\s*<\//.test(textAfter))
        return htmlMode.indent(state.htmlState, textAfter);
      else if (state.localMode.indent)
        return state.localMode.indent(state.localState, textAfter);
      else
        return CodeMirror.Pass;
    },

    innerMode: function(state) {
      return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
    }
  };
}, "xml", "javascript", "css");

CodeMirror.defineMIME("text/html", "htmlmixed");

});


# Test linking an OBJ with a reference to an out-of-date PDB type server
# RUN: cd %S/Inputs
# RUN: yaml2obj %s -o %t.obj
# RUN: lld-link %t.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s
# RUN: cd %S

# CHECK: warning: Cannot use debug info for '{{.*}}.obj'
# CHECK-NEXT: The signature does not match; the file(s) might be out of date

# Also test linking an OBJ with a reference to *valid* PDB type server
# RUN: cd %S/Inputs
# RUN: yaml2obj %S/Inputs/pdb-type-server-valid-signature.yaml -o %t2.obj
# RUN: lld-link %t2.obj -out:%t2.exe -debug -pdb:%t2.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s -check-prefix=VALID-SIGNATURE -allow-empty
# RUN: cd %S

# VALID-SIGNATURE-NOT: warning: Cannot use debug info for '{{.*}}.obj'
# VALID-SIGNATURE-NOT: The signature does not match; the file(s) might be out of date

# Test an invalid path reference to a PDB type server; as a fallback LLD should try to load the PDB in the same path as the OBJ
# RUN: yaml2obj %S/Inputs/pdb-type-server-invalid-path.yaml -o %t3.obj
# RUN: cp %S/Inputs/pdb-diff-cl.pdb %T
# RUN: lld-link %t3.obj -out:%t3.exe -debug -pdb:%t3.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s -check-prefix=INVALID-PATH -allow-empty

# INVALID-PATH-NOT: warning: Cannot use debug info for '{{.*}}3.obj' [LNK4099]
# INVALID-PATH-NOT: failed to load reference 'c:\some_invalid_path_AABB98765\pdb-diff-cl.pdb': {{[Nn]}}o such file or directory

--- !COFF
header:
  Machine:         IMAGE_FILE_MACHINE_AMD64
  Characteristics: [  ]
sections:
  - Name:            '.debug$S'
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    Alignment:       1
    Subsections:
      - !Symbols
        Records:
          - Kind:            S_GPROC32_ID
            ProcSym:
              CodeSize:        3
              DbgStart:        0
              DbgEnd:          2
              FunctionType:    4199
              Flags:           [  ]
              DisplayName:     main
          - Kind:            S_FRAMEPROC
            FrameProcSym:
              TotalFrameBytes: 0
              PaddingFrameBytes: 0
              OffsetToPadding: 0
              BytesOfCalleeSavedRegisters: 0
              OffsetOfExceptionHandler: 0
              SectionIdOfExceptionHandler: 0
              Flags:           [ AsynchronousExceptionHandling, OptimizedForSpeed ]
          - Kind:            S_PROC_ID_END
            ScopeEndSym:
      - !Lines
        CodeSize:        3
        Flags:           [  ]
        RelocOffset:     0
        RelocSegment:    0
        Blocks:
          - FileName:        'c:\src\llvm-project\build\t.c'
            Lines:
              - Offset:          0
                LineStart:       1
                IsStatement:     true
                EndDelta:        0
            Columns:
      - !FileChecksums
        Checksums:
          - FileName:        'c:\src\llvm-project\build\t.c'
            Kind:            MD5
            Checksum:        270A878DCC1B845655B162F56C4F5020
      - !StringTable
        Strings:
          - 'c:\src\llvm-project\build\t.c'
    Relocations:
      - VirtualAddress:  44
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_SECREL
      - VirtualAddress:  48
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_SECTION
      - VirtualAddress:  100
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_SECREL
      - VirtualAddress:  104
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_SECTION
  - Name:            '.debug$T'
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    Alignment:       1
    Types:
      - Kind:            LF_TYPESERVER2
        TypeServer2:
          Guid:            '{01DF191B-22BF-6B42-96CE-5258B8329FE5}'
          Age:             18
          Name:            'pdb-diff-cl.pdb'
  - Name:            '.text$mn'
    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
    Alignment:       16
    SectionData:     33C0C3
symbols:
  - Name:            '.debug$S'
    Value:           0
    SectionNumber:   1
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          328
      NumberOfRelocations: 4
      NumberOfLinenumbers: 0
      CheckSum:        0
      Number:          0
  - Name:            '.debug$T'
    Value:           0
    SectionNumber:   2
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          564
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        0
      Number:          0
  - Name:            '.text$mn'
    Value:           0
    SectionNumber:   3
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          3
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        4021952397
      Number:          0
  - Name:            main
    Value:           0
    SectionNumber:   3
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
...


## New

NAN provides a `Nan::New()` helper for the creation of new JavaScript objects in a way that's compatible across the supported versions of V8.

 - Nan::New()
 - Nan::Undefined()
 - Nan::Null()
 - Nan::True()
 - Nan::False()
 - Nan::EmptyString()

### Nan::New()

`Nan::New()` should be used to instantiate new JavaScript objects.

Refer to the specific V8 type in the [V8 documentation](https://v8docs.nodesource.com/io.js-3.0/d1/d83/classv8_1_1_data.html) for information on the types of arguments required for instantiation.

Signatures:

Return types are mostly omitted from the signatures for simplicity. In most cases the type will be contained within a `v8::Local<T>`. The following types will be contained within a `Nan::MaybeLocal<T>`: `v8::String`, `v8::Date`, `v8::RegExp`, `v8::Script`, `v8::UnboundScript`.

Empty objects:

```c++
Nan::New<T>();
```

Generic single and multiple-argument:

```c++
Nan::New<T>(A0 arg0);
Nan::New<T>(A0 arg0, A1 arg1);
Nan::New<T>(A0 arg0, A1 arg1, A2 arg2);
Nan::New<T>(A0 arg0, A1 arg1, A2 arg2, A3 arg3);
```

For creating `v8::FunctionTemplate` and `v8::Function` objects:

_The definition of `Nan::FunctionCallback` can be found in the [Method declaration](./methods.md#api_nan_method) documentation._

```c++
Nan::New<T>(Nan::FunctionCallback callback,
            v8::Local<v8::Value> data = v8::Local<v8::Value>());
Nan::New<T>(Nan::FunctionCallback callback,
            v8::Local<v8::Value> data = v8::Local<v8::Value>(),
            A2 a2 = A2());
```

Native number types:

```c++
v8::Local<v8::Boolean> Nan::New<T>(bool value);
v8::Local<v8::Int32> Nan::New<T>(int32_t value);
v8::Local<v8::Uint32> Nan::New<T>(uint32_t value);
v8::Local<v8::Number> Nan::New<T>(double value);
```

String types:

```c++
Nan::MaybeLocal<v8::String> Nan::New<T>(std::string const& value);
Nan::MaybeLocal<v8::String> Nan::New<T>(const char * value, int length);
Nan::MaybeLocal<v8::String> Nan::New<T>(const char * value);
Nan::MaybeLocal<v8::String> Nan::New<T>(const uint16_t * value);
Nan::MaybeLocal<v8::String> Nan::New<T>(const uint16_t * value, int length);
```

Specialized types:

```c++
v8::Local<v8::String> Nan::New<T>(v8::String::ExternalStringResource * value);
v8::Local<v8::String> Nan::New<T>(Nan::ExternalOneByteStringResource * value);
v8::Local<v8::RegExp> Nan::New<T>(v8::Local<v8::String> pattern, v8::RegExp::Flags flags);
```

Note that `Nan::ExternalOneByteStringResource` maps to [`v8::String::ExternalOneByteStringResource`](https://v8docs.nodesource.com/io.js-3.0/d9/db3/classv8_1_1_string_1_1_external_one_byte_string_resource.html), and `v8::String::ExternalAsciiStringResource` in older versions of V8.

### Nan::Undefined()

A helper method to reference the `v8::Undefined` object in a way that is compatible across all supported versions of V8.

Signature:

```c++
v8::Local<v8::Primitive> Nan::Undefined()
```

### Nan::Null()

A helper method to reference the `v8::Null` object in a way that is compatible across all supported versions of V8.

Signature:

```c++
v8::Local<v8::Primitive> Nan::Null()
```

### Nan::True()

A helper method to reference the `v8::Boolean` object representing the `true` value in a way that is compatible across all supported versions of V8.

Signature:

```c++
v8::Local<v8::Boolean> Nan::True()
```

### Nan::False()

A helper method to reference the `v8::Boolean` object representing the `false` value in a way that is compatible across all supported versions of V8.

Signature:

```c++
v8::Local<v8::Boolean> Nan::False()
```

### Nan::EmptyString()

Call [`v8::String::Empty`](https://v8docs.nodesource.com/io.js-3.0/d2/db3/classv8_1_1_string.html#a7c1bc8886115d7ee46f1d571dd6ebc6d) to reference the empty string in a way that is compatible across all supported versions of V8.

Signature:

```c++
v8::Local<v8::String> Nan::EmptyString()
```

### Nan::NewOneByteString()

An implementation of [`v8::String::NewFromOneByte()`](https://v8docs.nodesource.com/io.js-3.0/d2/db3/classv8_1_1_string.html#a5264d50b96d2c896ce525a734dc10f09) provided for consistent availability and API across supported versions of V8. Allocates a new string from Latin-1 data.

Signature:

```c++
Nan::MaybeLocal<v8::String> Nan::NewOneByteString(const uint8_t * value,
                                                  int length = -1)
```


#include <bits/stdc++.h>

using namespace std;

void debug_out() { cerr << endl; }
template <typename H, typename... T> void debug_out(H h, T... t) {  cerr << " " << (h);  debug_out(t...); }
void read() {}
template <typename H, typename... T> void read(H &h, T&... t) { cin >> h; read(t...) ;}
template <typename H, typename... T> void read(vector<H> &h, T&... t) { for (auto &i : h) read(i); read(t...) ;}

#ifndef LOCAL
#define endl '\n'
#define debug(...) //
#else
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#endif

const int MAXS = 4000 * 19 + 100;
const int MAXC = '9' - '0' + 1;
bitset<5001> out[MAXS];
int f[MAXS]; // Failure function
int g[MAXS][MAXC]; // Goto function, or -1 if fail.

int buildMatchingMachine(const vector<string> &words,
    char lowestChar = '0',
    char highestChar = '9') {

  for (int i = 0; i < MAXS; ++i)
    out[i].reset();

  memset(f, -1, sizeof f);
  memset(g, -1, sizeof g);

  int states = 1; // Initially, we just have the 0 state

  for (int i = 0; i < int(words.size()); ++i) {
    const string &keyword = words[i];
    int currentState = 0;
    for (int j = 0; j < int(keyword.size()); ++j) {
      int c = keyword[j] - lowestChar;
      if (g[currentState][c] == -1) { // Allocate a new node
        g[currentState][c] = states++;
      }
      currentState = g[currentState][c];
    }
    out[currentState].set(i); // There's a match of keywords[i] at node currentState.
  }

  for (int c = 0; c < MAXC; ++c) {
    if (g[0][c] == -1) {
      g[0][c] = 0;
    }
  }

  queue<int> q;
  for (int c = 0; c <= highestChar - lowestChar; ++c) {  // Iterate over every possible input
    // All nodes s of depth 1 have f[s] = 0
    if (g[0][c] != -1 and g[0][c] != 0) {
      f[g[0][c]] = 0;
      q.push(g[0][c]);
    }
  }
  while (q.size()) {
    int state = q.front();
    q.pop();
    for (int c = 0; c <= highestChar - lowestChar; ++c) {
      if (g[state][c] != -1) {
        int failure = f[state];
        while (g[failure][c] == -1) {
          failure = f[failure];
        }
        failure = g[failure][c];
        f[g[state][c]] = failure;
        out[g[state][c]] |= out[failure]; // Merge out values
        q.push(g[state][c]);
      }
    }
  }

  return states;
}

int findNextState(int currentState, char nextInput, char lowestChar = 0) {
  int answer = currentState;
  int c = nextInput - lowestChar;
  while (g[answer][c] == -1) answer = f[answer];
  return g[answer][c];
}

long long dp[20][MAXS][2];

int main() {
#ifndef LOCAL
  ios_base::sync_with_stdio(false); cin.tie(NULL);
#endif
  long long n;
  while (cin >> n && n) {
    string border = to_string(n);
    int m; cin >> m;
    vector<string> bad(m);
    for (auto &w : bad)
      cin >> w;

    debug(border.size());

    int states = buildMatchingMachine(bad);
    debug(states);

    for (int i = 0; i < states; i++) {
      for (int j = 0; j < 2; j++) {
        dp[border.size()][i][j] = 1;
      }
    }

    for (int id = border.size() - 1; id >= 0; id--) {
      for (int state = 0; state < states; state++) {
        for (int top = 0;  top < 2; top++) {
          int mmax = top ? border[id] - '0' : 9;
          long long ans = 0;
          for (int i = 0; i <= mmax; i++) {
            int nxt = findNextState(state, i);
            if (out[nxt].count() == 0) {
              ans += dp[id + 1][nxt][top && i == mmax];
            }
          }
          dp[id][state][top] = ans;
        }
      }
    }

    debug(n);

    cout << n - dp[0][0][1] + 1 << endl;
  }
  return 0;
}


      SUBROUTINE ccsdt_lr_beta_2_5_4(d_a,k_a_offset,d_b,k_b_offset,d_c,k
     &_c_offset)
C     $Id$
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p10 p11 h9 h13 )_vtrbtra + = -2 * Sum ( p2 ) * tra ( p2 p10 h9 h13 )_tra * i2 ( p11 p2 )_vtrb
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER d_a
      INTEGER k_a_offset
      INTEGER d_b
      INTEGER k_b_offset
      INTEGER d_c
      INTEGER k_c_offset
      INTEGER nxtask
      INTEGER next
      INTEGER nprocs
      INTEGER count
      INTEGER p10b
      INTEGER p11b
      INTEGER h9b
      INTEGER h13b
      INTEGER dimc
      INTEGER l_c_sort
      INTEGER k_c_sort
      INTEGER p2b
      INTEGER p10b_1
      INTEGER p2b_1
      INTEGER h9b_1
      INTEGER h13b_1
      INTEGER p11b_2
      INTEGER p2b_2
      INTEGER dim_common
      INTEGER dima_sort
      INTEGER dima
      INTEGER dimb_sort
      INTEGER dimb
      INTEGER l_a_sort
      INTEGER k_a_sort
      INTEGER l_a
      INTEGER k_a
      INTEGER l_b_sort
      INTEGER k_b_sort
      INTEGER l_b
      INTEGER k_b
      INTEGER l_c
      INTEGER k_c
      EXTERNAL nxtask
      nprocs = GA_NNODES()
      count = 0
      next = nxtask(nprocs,1)
      DO p10b = noab+1,noab+nvab
      DO p11b = noab+1,noab+nvab
      DO h9b = 1,noab
      DO h13b = h9b,noab
      IF (next.eq.count) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p10b-1)+int_mb(k_spin+p11b
     &-1)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      IF (int_mb(k_spin+p10b-1)+int_mb(k_spin+p11b-1) .eq. int_mb(k_spin
     &+h9b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+p10b-1),ieor(int_mb(k_sym+p11b-1),ieor(int_m
     &b(k_sym+h9b-1),int_mb(k_sym+h13b-1)))) .eq. ieor(irrep_v,ieor(irre
     &p_trb,irrep_tra))) THEN
      dimc = int_mb(k_range+p10b-1) * int_mb(k_range+p11b-1) * int_mb(k_
     &range+h9b-1) * int_mb(k_range+h13b-1)
      IF (.not.MA_PUSH_GET(mt_dbl,dimc,'noname',l_c_sort,k_c_sort)) CALL
     & ERRQUIT('ccsdt_lr_beta_2_5_4',0,MA_ERR)
      CALL DFILL(dimc,0.0d0,dbl_mb(k_c_sort),1)
      DO p2b = noab+1,noab+nvab
      IF (int_mb(k_spin+p10b-1)+int_mb(k_spin+p2b-1) .eq. int_mb(k_spin+
     &h9b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+p10b-1),ieor(int_mb(k_sym+p2b-1),ieor(int_mb
     &(k_sym+h9b-1),int_mb(k_sym+h13b-1)))) .eq. irrep_tra) THEN
      CALL TCE_RESTRICTED_4(p10b,p2b,h9b,h13b,p10b_1,p2b_1,h9b_1,h13b_1)
      CALL TCE_RESTRICTED_2(p11b,p2b,p11b_2,p2b_2)
      dim_common = int_mb(k_range+p2b-1)
      dima_sort = int_mb(k_range+p10b-1) * int_mb(k_range+h9b-1) * int_m
     &b(k_range+h13b-1)
      dima = dim_common * dima_sort
      dimb_sort = int_mb(k_range+p11b-1)
      dimb = dim_common * dimb_sort
      IF ((dima .gt. 0) .and. (dimb .gt. 0)) THEN
      IF (.not.MA_PUSH_GET(mt_dbl,dima,'noname',l_a_sort,k_a_sort)) CALL
     & ERRQUIT('ccsdt_lr_beta_2_5_4',1,MA_ERR)
      IF (.not.MA_PUSH_GET(mt_dbl,dima,'noname',l_a,k_a)) CALL ERRQUIT('
     &ccsdt_lr_beta_2_5_4',2,MA_ERR)
      IF ((p2b .le. p10b)) THEN
      CALL GET_HASH_BLOCK(d_a,dbl_mb(k_a),dima,int_mb(k_a_offset),(h13b_
     &1 - 1 + noab * (h9b_1 - 1 + noab * (p10b_1 - noab - 1 + nvab * (p2
     &b_1 - noab - 1)))))
      CALL TCE_SORT_4(dbl_mb(k_a),dbl_mb(k_a_sort),int_mb(k_range+p2b-1)
     &,int_mb(k_range+p10b-1),int_mb(k_range+h9b-1),int_mb(k_range+h13b-
     &1),4,3,2,1,1.0d0)
      END IF
      IF ((p10b .lt. p2b)) THEN
      CALL GET_HASH_BLOCK(d_a,dbl_mb(k_a),dima,int_mb(k_a_offset),(h13b_
     &1 - 1 + noab * (h9b_1 - 1 + noab * (p2b_1 - noab - 1 + nvab * (p10
     &b_1 - noab - 1)))))
      CALL TCE_SORT_4(dbl_mb(k_a),dbl_mb(k_a_sort),int_mb(k_range+p10b-1
     &),int_mb(k_range+p2b-1),int_mb(k_range+h9b-1),int_mb(k_range+h13b-
     &1),4,3,1,2,-1.0d0)
      END IF
      IF (.not.MA_POP_STACK(l_a)) CALL ERRQUIT('ccsdt_lr_beta_2_5_4',3,M
     &A_ERR)
      IF (.not.MA_PUSH_GET(mt_dbl,dimb,'noname',l_b_sort,k_b_sort)) CALL
     & ERRQUIT('ccsdt_lr_beta_2_5_4',4,MA_ERR)
      IF (.not.MA_PUSH_GET(mt_dbl,dimb,'noname',l_b,k_b)) CALL ERRQUIT('
     &ccsdt_lr_beta_2_5_4',5,MA_ERR)
      CALL GET_HASH_BLOCK(d_b,dbl_mb(k_b),dimb,int_mb(k_b_offset),(p2b_2
     & - noab - 1 + nvab * (p11b_2 - noab - 1)))
      CALL TCE_SORT_2(dbl_mb(k_b),dbl_mb(k_b_sort),int_mb(k_range+p11b-1
     &),int_mb(k_range+p2b-1),1,2,1.0d0)
      IF (.not.MA_POP_STACK(l_b)) CALL ERRQUIT('ccsdt_lr_beta_2_5_4',6,M
     &A_ERR)
      CALL DGEMM('T','N',dima_sort,dimb_sort,dim_common,1.0d0,dbl_mb(k_a
     &_sort),dim_common,dbl_mb(k_b_sort),dim_common,1.0d0,dbl_mb(k_c_sor
     &t),dima_sort)
      IF (.not.MA_POP_STACK(l_b_sort)) CALL ERRQUIT('ccsdt_lr_beta_2_5_4
     &',7,MA_ERR)
      IF (.not.MA_POP_STACK(l_a_sort)) CALL ERRQUIT('ccsdt_lr_beta_2_5_4
     &',8,MA_ERR)
      END IF
      END IF
      END IF
      END DO
      IF (.not.MA_PUSH_GET(mt_dbl,dimc,'noname',l_c,k_c)) CALL ERRQUIT('
     &ccsdt_lr_beta_2_5_4',9,MA_ERR)
      IF ((p10b .le. p11b)) THEN
      CALL TCE_SORT_4(dbl_mb(k_c_sort),dbl_mb(k_c),int_mb(k_range+p11b-1
     &),int_mb(k_range+h13b-1),int_mb(k_range+h9b-1),int_mb(k_range+p10b
     &-1),4,1,3,2,-1.0d0)
      CALL ADD_HASH_BLOCK(d_c,dbl_mb(k_c),dimc,int_mb(k_c_offset),(h13b
     &- 1 + noab * (h9b - 1 + noab * (p11b - noab - 1 + nvab * (p10b - n
     &oab - 1)))))
      END IF
      IF ((p11b .le. p10b)) THEN
      CALL TCE_SORT_4(dbl_mb(k_c_sort),dbl_mb(k_c),int_mb(k_range+p11b-1
     &),int_mb(k_range+h13b-1),int_mb(k_range+h9b-1),int_mb(k_range+p10b
     &-1),1,4,3,2,1.0d0)
      CALL ADD_HASH_BLOCK(d_c,dbl_mb(k_c),dimc,int_mb(k_c_offset),(h13b
     &- 1 + noab * (h9b - 1 + noab * (p10b - noab - 1 + nvab * (p11b - n
     &oab - 1)))))
      END IF
      IF (.not.MA_POP_STACK(l_c)) CALL ERRQUIT('ccsdt_lr_beta_2_5_4',10,
     &MA_ERR)
      IF (.not.MA_POP_STACK(l_c_sort)) CALL ERRQUIT('ccsdt_lr_beta_2_5_4
     &',11,MA_ERR)
      END IF
      END IF
      END IF
      next = nxtask(nprocs,1)
      END IF
      count = count + 1
      END DO
      END DO
      END DO
      END DO
      next = nxtask(-nprocs,1)
      call GA_SYNC()
      RETURN
      END


<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Queue
 * @subpackage Stomp
 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: ConnectionInterface.php 24593 2012-01-05 20:35:02Z matthew $
 */

/**
 * The Stomp client interacts with a Stomp server.
 *
 * @category   Zend
 * @package    Zend_Queue
 * @subpackage Stomp
 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
interface Zend_Queue_Stomp_Client_ConnectionInterface
{
    /**
     * @param  string  $scheme ['tcp', 'udp']
     * @param  string  host
     * @param  integer port
     * @param  string  class - create a connection with this class; class must support Zend_Queue_Stomp_Client_Connection_Interface
     * @return boolean
     */
    public function open($scheme, $host, $port);

    /**
     * @param  boolean $destructor
     * @return void
     */
    public function close($destructor = false);

    /**
     * Check whether we are connected to the server
     *
     * @return true
     * @throws Zend_Queue_Exception
     */
    public function ping();

    /**
     * write a frame to the stomp server
     *
     * example: $response = $client->write($frame)->read();
     *
     * @param  Zend_Queue_Stomp_FrameInterface $frame
     * @return $this
     */
    public function write(Zend_Queue_Stomp_FrameInterface $frame);

    /**
     * tests the socket to see if there is data for us
     */
    public function canRead();

    /**
     * reads in a frame from the socket or returns false.
     *
     * @return Zend_Queue_Stomp_Frame|false
     * @throws Zend_Queue_Exception
     */
    public function read();

    /**
     * Set the frame class to be used
     *
     * This must be a Zend_Queue_Stomp_FrameInterface.
     *
     * @param  string $class
     * @return Zend_Queue_Stomp_Client_ConnectionInterface;
     */
    public function setFrameClass($class);

    /**
     * Get the frameClass
     *
     * @return string
     */
    public function getFrameClass();

    /**
     * create an empty frame
     *
     * @return Zend_Queue_Stomp_FrameInterface class
     */
    public function createFrame();
}