HDPARM
Section: Maintenance Commands (8)Updated: July 2009
Index Return to Main Contents
NAME
hdparm - get/set SATA/IDE device parametersSYNOPSIS
hdparm [ flags ] [device] ..DESCRIPTION
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. Eg. recent WD "Passport" models and recent NexStar-3 enclosures. Some options may work correctly only with the latest kernels.OPTIONS
When no flags are given, -acdgkmur is assumed. For Get/Set options, a query without an optional parameter (e.g. -d) will query (get) the device state, and with a parameter (e.g., -d0) will set the device state.- -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.
- -A
- Get/set the IDE drive's read-lookahead feature (usually ON by default). Usage: -A0 (disable) or -A1 (enable).
- -b
- Get/set bus state.
- -B
- Query/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).
- -c
- Query/enable (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 0 to disable 32-bit I/O support, 1 to enable 32-bit data transfers, and 3 to enable 32-bit data transfers with a special sync sequence required by many chipsets. The value 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.
- -C
- Check the current IDE power mode status, which will always be one of unknown (drive does not support this command), active/idle (normal operation), standby (low power mode, drive has spun down), or sleeping (lowest power mode, drive is completely shut down). The -S, -y, -Y, and -Z flags can be used to manipulate the IDE power modes.
- -d
- Disable/enable 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 -X option in combination with -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.
- --dco-freeze
- DCO stands for Device Configuration Overlay, a way for vendors to selectively disable certain features of a drive. The --dco-freeze flag will freeze/lock the current drive configuration, thereby preventing software (or malware) from changing any DCO settings until after the next power-on reset.
- --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 -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, --dco-identify will show that the drive is 48_bit capable, but -I will not show it, and nor will the drive accept 48_bit commands.
- --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 -Np maximum size restriction has also been set. This is EXTREMELY DANGEROUS and will very likely cause massive loss of data. DO NOT USE THIS COMMAND.
- --direct
- Use the kernel O_DIRECT flag when performing a -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.
- --drq-hsm-error
- VERY DANGEROUS, DON'T EVEN THINK ABOUT USING IT. This flag 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. VERY DANGEROUS, DO NOT USE!!
- -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 -D flag is not supported for most modern drives since ATA-4; thus this command may fail.
- -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.
- -f
- Sync and flush the buffer cache for the device on exit. This operation is also performed internally as part of the -t and -T timings and other flags.
- --fibmap
- When used, this must be the only flag given. It requires a file path as a parameter, and will print out a list of the device 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 (*not* 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.
- --fibmap-sector
- When used, this must be the only flag given. It requires a file path followed by a sector number as parameters. This sector number is given relative to the start of the file itself, not the device. hdparm will scan the device extents occupied by the file, and print out the absolute LBA number of the requested sector of the file. This LBA number is referenced from sector 0 of the physical device (not the partition or filesystem). This LBA value can then be used for a variety of purposes, including determining an appropriate sector to deliberately corrupt during fault-injection testing procedures.
- --fwdownload
- When used, this should be the only flag given. It requires a file path immediately after the flag, 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 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 EXTREMELY DANGEROUS and could destroy both the drive and all data on it. DO NOT USE THIS COMMAND. The --fwdownload-mode3 , --fwdownload-mode3-max , and --fwdownload-mode7 variations on basic --fwdownload allow overriding automatic protocol detection in favour of forcing hdparm to use a specific transfer protocol, for testing purposes only.
- -F
- Flush the on-drive write cache buffer (older drives may not implement this).
- -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.
- -h
- Display terse usage information (help).
- -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 -I flag. 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 AT Attachment Interface for Disk Drives, ANSI ASC X3T9.2 working draft, revision 4a, April 19/93, and later editions.
- -I
- Request identification info directly from the drive, which is displayed in a new expanded format with considerably more detail than with the older -i flag.
- --idle-immediate
- Issue an ATA IDLE_IMMEDIATE command, to put the drive into a lower power state. Usually the device remains spun-up.
- --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.
- --Istdin
- This is a special variation on the -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 exactly the same as that found in the /proc/ide/*/hd*/identify "files", or that produced by the --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 --Istdin is used, it must be the *only* parameter given.
- --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 --Istdin option.
- -k
- Get/set the keep_settings_over_reset flag for the drive. When this flag is set, the driver will preserve the -dmu options over a soft reset, (as done during the error recovery sequence). This flag defaults to off, to prevent drive reset loops which could be caused by combinations of -dmu settings. The -k flag 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/adm/messages on most systems).
- -K
- Set the drive's keep_features_over_reset flag. Setting this enables the drive to retain the settings for -APSWXZ over a soft reset (as done during the error recovery sequence). Not all drives support this feature.
- -L
- Set the drive's doorlock flag. Setting this to 1 will lock the door mechanism of some removable hard drives (eg. Syquest, ZIP, Jazz..), and setting it to 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 after the root filesystem is remounted read-only, one can then remove the cartridge from the drive after shutdown.
- -m
- Get/set sector count for multiple sector I/O on the drive. A setting of 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 -i flag 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 massive filesystem corruption.
- --make-bad-sector
- Deliberately create a bad sector (aka. "media error") on the disk. EXCEPTIONALLY DANGEROUS. DO NOT USE THIS FLAG!! This can be useful for testing of device/RAID error recovery mechanisms. The sector number is given as a (base10) parameter after the flag. 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 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 --repair-sector flag 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).
- -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.
- -N
- Get/set max visible number of sectors, also known as the Host Protected Area setting. Without a parameter, -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 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. To change the current max (VERY DANGEROUS, DATA LOSS IS EXTREMELY LIKELY), a new value should be provided (in base10) immediately following the -N flag. 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, -N affects only the temporary (volatile) setting. To change the permanent (non-volatile) value, prepend a leading 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 -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 -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.
- -n
- Get or set the "ignore write errors" flag in the driver. Do NOT play with this without grokking the driver source code first.
- -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 flag may cause the PIO mode for 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. Use with extreme caution! This feature includes zero protection for the unwary, and an unsuccessful outcome may result in severe filesystem corruption!
- -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 offical spec as of ATA-4.
- --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 flag 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 (eg. sector accesses beyond 28-bits).
- -q
- Handle the next flag 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 -i or -v or -t or -T flags.
- -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.
- -r
- Get/set read-only flag for the device. When set, Linux disallows write operations on the device.
- --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 flag. 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).
- --repair-sector
- This is an alias for the --write-sector flag. VERY DANGEROUS.
- -R
- Register an IDE interface (DANGEROUS). See the -U option for more information.
- -s
- Enable/disable the power-on in standby feature, if supported by the drive. 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 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 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.
- -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.
- -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.
- -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 -t using the BLKFLSBUF ioctl.
- --trim-sectors
- For Solid State Drives (SSDs). EXCEPTIONALLY DANGEROUS. DO NOT USE THIS FLAG!! 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 two parameters immediately after the flag: an LBA starting address, and a sector count. EXCEPTIONALLY DANGEROUS. DO NOT USE THIS FLAG!!
- -u
- Get/set interrupt-unmask flag for the drive. A setting of 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. 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 massive filesystem corruption. In particular, CMD-640B and RZ1000 (E)IDE interfaces can be unreliable (due to a hardware flaw) when this option is used with kernel versions earlier than 2.0.13. Disabling the IDE prefetch feature of these interfaces (usually a BIOS/CMOS setting) provides a safe fix for the problem for use with earlier kernels.
- -U
- Un-register an IDE interface (DANGEROUS). The companion for the -R option. Intended for use with hardware made specifically for hot-swapping (very rare!). Use with knowledge and extreme caution as this can easily hang or damage your system. The hdparm source distribution includes a 'contrib' directory with some user-donated scripts for hot-swapping on the UltraBay of a ThinkPad 600E. Use at your own risk.
- -v
- Display some basic settings, similar to -acdgkmur for IDE. This is also the default behaviour when no flags are specified.
- --verbose
- Display extra diagnostics from some commands.
- -w
- Perform a device reset (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.
- --write-sector
- Writes zeros to the specified sector number. VERY DANGEROUS. The sector number must be given (base10) after this flag. 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).
- -W
- Get/set the IDE/SATA drive's write-caching feature.
- -x
- Tristate device for hotswap (DANGEROUS).
- -X
- Set the IDE transfer mode for (E)IDE/ATA drives. This is typically used in combination with -d1 when enabling DMA to/from a drive on a supported interface chipset, where -X mdma2 is used to select multiword DMA mode2 transfers and -X sdma1 is used to select simple mode 1 DMA transfers. With systems which support UltraDMA burst timings, -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 flag is 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, -X can be used to switch the mode of the drive only. Prior to changing the transfer mode, the IDE interface should be jumpered or programmed (see -p flag) for the new mode setting to prevent loss and/or corruption of data. 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.
- -y
- Force an IDE drive to immediately enter the low power consumption standby mode, usually causing it to spin down. The current power mode status can be checked using the -C flag.
- -Y
- Force an IDE drive to immediately enter the lowest power consumption 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 -C flag.
- -z
- Force a kernel re-read of the partition table of the specified device(s).
- -Z
- Disable the automatic power-saving function of certain Seagate drives (ST3xxx models?), to prevent them from idling/spinning-down at inconvenient times.
- -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.
ATA Security Feature Set
These switches are DANGEROUS to experiment with, and might not work with every kernel. USE AT YOUR OWN RISK.
- --security-help
- Display terse usage info for all of the --security-* flags.
- --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 flags are permitted on the command line with this one.
- --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. No other flags are permitted on the command line with this one. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
- --security-set-pass PWD
- Lock the drive, using password PWD (Set Password) (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. Use the special password NULL to set an empty password. The applicable drive password is selected with the --user-master switch and the applicable security mode with the --security-mode switch. No other flags are permitted on the command line with this one. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
- --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. No other flags are permitted on the command line with this one. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
- --security-erase PWD
- Erase (locked) drive, using password PWD (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. Use the special password NULL to represent an empty password. The applicable drive password is selected with the --user-master switch. No other flags are permitted on the command line with this one. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
- --security-erase-enhanced PWD
- Enhanced erase (locked) drive, using password PWD (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. No other flags are permitted on the command line with this one. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
- --user-master USER
-
Specifies which password (user/master) to select.
Defaults to master.
Only useful in combination with --security-unlock, --security-set-pass,
--security-disable, --security-erase or --security-erase-enhanced.
u user password
m master passwordTHIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
- --security-mode MODE
-
Specifies which security mode (high/maximum) to set.
Defaults to high.
Only useful in combination with --security-set-pass.
h high security
m maximum securityTHIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
FILES
/etc/hdparm.confBUGS
As noted above, the -m sectcount and -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!Some options (eg. -r for SCSI) may not work with old kernels as necessary ioctl()'s were not supported.
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.
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.
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.
AUTHOR
hdparm has been written by Mark Lord<EMAIL_ADDRESS>the original primary developer and maintainer of the (E)IDE driver for Linux, and current contributer to the libata subsystem, along with suggestions and patches from many netfolk.The disable Seagate auto-powersaving code is courtesy of Tomi Leppikangas(tomilepp@paju.oulu.fi).
Security freeze command by Benjamin Benz, 2005.
PIO data out security commands by Leonard den Ottolander , 2005. Some other parts by Benjamin Benz and others.
SEE ALSO
http://www.t13.org/ Technical Committee T13 AT Attachment (ATA/ATAPI) Interface.http://www.serialata.org/ Serial ATA International Organization.
http://www.compactflash.org/ CompactFlash Association
Index
This document was created by man2html, using the manual pages.
Time: 05:34:26 GMT, December 24, 2015


More Winter Film Reviews A film review by Michael John Legeros Copyright 1995 Michael John Legeros
Contents ========
BOYS ON THE SIDE HIGHLANDER III IMMORTAL BELOVED IN THE MOUTH OF MADNESS MURDER IN THE FIRST THE JERKY BOYS RED TO LIVE
BOYS ON THE SIDE Rated "R" / 117 min. ================
Road trip! On their way to L.A., driving companions Whoopi Goldberg and Mary Louise-Parker stop to pick up a friend (Drey Barrymore) in Pittsburg. She's just ko-ed her abusive husband with a baseball bat and needs to both get away and stay away.  Sound familiar?
Call it another "chick flick," but this logical successor to THELMA AND LOUISE delivers an intriguing message about the price of freedom. From the POV of screenwriter Don Roos, the cost of empowerment includes pregnancy, AIDS, and a six-month jail sentence. Directed by Herbert Ross (STEEL MAGNOLIAS).
Grade: B-
HIGHLANDER III Rated "R" / 109 min. ==============
As an old science-fiction geek from long, long ago, I thought I'd find at least *something* to enjoy in the doomed HIGHLANDER III. Wrong. This is direct-to-video fare at it's finest, with plotting that would shame even the cheapest comic book. Mario Van Peebles (!) plays the sword-wielding villain, who returns from a 400-year imprisonment to battle Christopher Lambert and his mysterious accent.
There should've been only one.
Grade: F
IMMORTAL BELOVED Rated "R" / 121 min. ================
AMADEUS it ain't. Gary Oldman is certainly right for the role of Ludwig van Beethoven. He can brawl like the best rock star and brood like the most serious composer. He even plays his own piano, which, in this film, is no small feat. Too bad the CITIZEN KANE-like structure of writer/director Bernard Roses's biography-as-a-mystery never uncovers anything interesting. Great soundtrack, though, if you don't mind the conspicuous absence of period instruments.
Ode to joy indeed.
Grade: C+
IN THE MOUTH OF MADNESS Rated "R" / 108 min. =======================
Horror helmer John Carpenter is behind this painfully slow story of a hard-boiled insurance investigator (Sam Neill) trying to track down a missing Stephen King-sort (Jurgen Prochnow). The I.I. believes the disappearance to be a publicity stunt, until he ends up trapped in the author's fictional town.
The premise is great, but Carpenter's pacing is all wrong. He doesn't even frame the story very well. Neill does what he can with a very unappealing character. He's no fun to watch. A better mystery might be to figure out how John Glover, David Warner, and Charleton Heston (!) were corralled into this mess.
Grade: C-
THE JERKY BOYS Rated "R" / 82 min. ==============
They are a pair of pranksters from Queens who specialize in abusive, obscene phone calls. Their strengths are their voices, which help breath to life such unforgettable characters as the irate Frank Rizzo and the hapless Sal Rosenberg. What the Jerky Boys are *not* are actors, and this movie makes the mistake of trying treat them as same.
A truly innovative script would've kept the Boys (Johnny Brennan and Kamal) hidden off-screen for the entire film. This slop reveals their identities within the first five minutes--a mistake from which the film never recovers. Sure, the two recreate some of their better-known bits to amusing effect, but the bulk of the film is just one, long chase scene. And what are William Hickey, Alan Arkin, Ozzy Osbourne, and Tom Jones doing here?
Executive produced by Tony Danza and Emilio Estevez (!).
Grade: D+
MURDER IN THE FIRST Rated "R" / 130 min. ===================
This overdirected courtroom drama would like to be as exciting as A FEW GOOD MEN, but director Marc Rocco doesn't have enough sense to keep his camera still during the best parts. He swirls and twirls through every scene as if he were filming a wrestling match. Both Kevin Bacon and Gary Oldman (again!) are quite good, but Christian Slater is a loss. He's too much of a lightweight for this sort of stuff.
A long sit.
Grade: C
RED Rated "R" / 99 min. ===
You don't have to see either BLUE or WHITE to enjoy RED, director Krzysztof Kieslowski's final installment in his TROIS COLOURS trilogy. RED is also the final film for the director, who has announced his retirement. Chance encounters are one of the many ways that this captivating--and puzzling--film explores the idea that we are all connected in ways we never realize. Front and center is a love story between a fashion model (Irene Jacob) and a retired judge (Jean-Louis Trintignant). Subtitled.
Grade: A-
TO LIVE Not rated, suggested "PG-13" / 130 min. =======
If you're in the mood for another sweeping family saga ala LEGENDS OF THE FALL, then try TO LIVE. Director Zhang Yimou (RAISE THE RED LANTERN) recounts three decades of Chinese history as seen through the eyes of a poor, working-class couple (Ge You and Gong Li). You won't see anything like Brad Pitt here, but you *will* get a remarkably detailed portrait of Life Under Mao. Winner of two awards at last year's Cannes film festival including Best Actor. Subtitled.
Grade: A
-- Michael J. Legeros Raleigh, North Carolina
.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Before Change
base_name_to_sets_of_related_ops = get_base_name_to_sets_of_related_ops()
type_a_related_to_b = \
get_type_a_related_to_b(base_name_to_sets_of_related_ops)
matched_subgraph_pairs = get_matching_subgraph_pairs(gm_a, gm_b)
// split the subgraph pairs into one data structure for each model
nodes_and_names_to_instrument_a: List[Tuple[Node, str]] = []
nodes_and_names_to_instrument_b: List[Tuple[Node, str]] = []
for match_name, match in matched_subgraph_pairs.items():
(node_start_a, node_end_a), (node_start_b, node_end_b) = match
nodes_and_names_to_instrument_a.append((node_start_a, match_name))
nodes_and_names_to_instrument_b.append((node_start_b, match_name))
// populate the results, one model at a time
results: NSResultsType = {}
add_weight_info_to_dict(
model_name_a, gm_a, nodes_and_names_to_instrument_a, results)
add_weight_info_to_dict(
After Change
type_a_related_to_b = \
get_type_a_related_to_b(base_name_to_sets_of_related_ops)
tracer_a, tracer_b = NSTracer(), NSTracer()
gm_a = GraphModule(model_a, tracer_a.trace(model_a))
gm_b = GraphModule(model_b, tracer_b.trace(model_b))
return _compare_weights_impl(model_name_a, gm_a, model_name_b, gm_b)


@* * Copyright 2018 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import models.payments.Payment @import views.html.templates.formatters.dates._ @import views.html.templates.formatters.money._ @import java.time.LocalDate @(paymentDueDate: Option[LocalDate], isOverdue: Boolean, isError: Boolean)(implicit messages: Messages)
@if(isError){ @messages("vatDetails.error") }else{ @paymentDueDate.map{date => @displayDate(date)}.getOrElse(messages("payment.noPayment")) @if(isOverdue){ @messages("common.overdue") } }


Virtual Machines
Definition?
“A virtual machine (VM) is a software-based emulation of
a computer. Virtual machines operate based on computer
architecture and functions of real or hypothetical
computer.”
State of the World
A few people have woken up.
Who?
The creators of Vagrant, Chef, and Puppet.
Dev Environment
Requirements
- Interpretation or Compilation
- Run Integration Tests
- Run Isolation Tests
- External Dependencies
- Manually Test/Debug
- Edit Code
CI Environments
Requirements
- Interpretation or Compilation
- Run Integration Tests
- Run Isolation Tests
- External Dependencies
ReachLocal Problems
- RelEng / Bamboo
- Micro-Services
- Diverse Set of Environments
- Java/Grails/Spring/?
- Ruby/Rails
- PHP/Perl/Python
- Inconsistency
I don't know the future of BoxCI
I didn't come here to tell you how this is going to end
I came here to tell you how its going to begin
where we go from here is a choice I leave to you


|
|
| This document is available in: English Castellano ChineseGB Deutsch Francais Nederlands Portugues Russian Turkce Polish |
|
by Özcan Güngör <ozcangungor(at)netscape.net> About the author: I use Linux since 1997. Freedom, flexibility and opensource. These are the properties I like. Translated to English by: Özcan Güngör <ozcangungor(at)netscape.net> Content: |
The MySQL C APIAbstract: In this article, we will learn how to use the C APIs (Application Programming Interfaces) that come with MySQL. In order to understand this article well you need knowledge about prerequisites:
|
MYSQL
The following structure is communication handler that is used
to connect to a database.
typedef struct st_mysql { NET net; /* Communication parameters */ gptr connector_fd; /* ConnectorFd for SSL */ char *host,*user,*passwd,*unix_socket, *server_version,*host_info,*info,*db; unsigned int port,client_flag,server_capabilities; unsigned int protocol_version; unsigned int field_count; unsigned int server_status; unsigned long thread_id; /* Id for connection in server */ my_ulonglong affected_rows; my_ulonglong insert_id; /* id if insert on table with NEXTNR */ my_ulonglong extra_info; /* Used by mysqlshow */ unsigned long packet_length; enum mysql_status status; MYSQL_FIELD *fields; MEM_ROOT field_alloc; my_bool free_me; /* If free in mysql_close */ my_bool reconnect; /* set to 1 if automatic reconnect */ struct st_mysql_options options; char scramble_buff[9]; struct charset_info_st *charset; unsigned int server_language; } MYSQL;
MYSQL_RES
This structure represents the results of a query which returns
rows. The data returned data is called result-set.
typedef struct st_mysql_res { my_ulonglong row_count; unsigned int field_count, current_field; MYSQL_FIELD *fields; MYSQL_DATA *data; MYSQL_ROWS *data_cursor; MEM_ROOT field_alloc; MYSQL_ROW row; /* If unbuffered read */ MYSQL_ROW current_row; /* buffer to current row */ unsigned long *lengths; /* column lengths of current row */ MYSQL *handle; /* for unbuffered reads */ my_bool eof; /* Used my mysql_fetch_row */ } MYSQL_RES;
MYSQL_ROW
This structure is a type-safe representation of data in a row.
You cannot use this as a string that ends with null character
because data in this string can be binary and may include null
character.
typedef struct st_mysql_field { char *name; /* Name of column */ char *table; /* Table of column if column was a field */ char *def; /* Default value (set by mysql_list_fields) */ enum enum_field_types type; /* Type of field. Se mysql_com.h for types */ unsigned int length; /* Width of column */ unsigned int max_length; /* Max width of selected set */ unsigned int flags; /* Div flags */ unsigned int decimals; /* Number of decimals in field */ } MYSQL_FIELD;
my_ulonglong
The type used for the number of rows and for
mysql_affected_rows(), mysql_num_rows(), and mysql_insert_id().
This type provides a range of 0 to 1.84e19. On some systems,
attempting to print a value of type my_ulonglong will not work.
To print such a value, convert it to unsigned long and use the
%lu printf format. Example:
printf(Number of rows: %lu\n", (unsigned long)
mysql_num_rows(result));
typedef unsigned long my_ulonglong;
As said before MySQL libraries are in the mysqlclient library. So while compiling a MySQL program, it is necessary to add the -lmysqlclient compiler option. MySQL header files are under /usr/include/mysql (this may depend on your Linux distribution). The header of you program has then to look like this:
#include <mysql/mysql.h>
MySQL variable types and functions are included in this header file.
Then, we need to create the variable that is used to connect a database. This is simply done with:
MYSQL *mysql;
Before connecting to a database, we must call the following function to initiate the mysql variable:
mysql_init(MYSQL *mysql)
Then the
MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned int clientflag);
function is called to connect to a database. host is the hostname of the MySQL server. user is the user we want to connect as. passwd is the password. db is the database we want to connect to. port is the TCP/IP port number of MySQL server. unix_socket is connection type. clientflag is the flag that makes MySQL run ODBC-like. In this article it is set to 0. This function returns 0 when connection is established.
Now we can connect to a database and make a query:
char *query;
Using this string we can construct any SQL sentences and make a query. The function that executes the query is:
int STDCALL mysql_real_query(MYSQL *mysql, const char *q, unsigned int length);mysql is the variable we have used above. q is the SQL query string. length is the lenth of this string. If the query suceeds without error, the function returns 0.
After making a query, we need a variable in MYSQL_RES in order to be able to use query results. The following line creates this variable:
MYSQL_RES *res;Then
mysql_use_result(MYSQL *query)The function is used to read results.
Altough we can make queries easily, we need some other functions to use the results. The first one is:
MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result);This function tranforms results into rows. As you notice, the function returns a MYSQL_ROW type valiable. The following line creates such a variable:
MYSQL_ROW row;As explained above variable row is an array of strings. This means that row[0] is the first column of the first row, row[1] is second column of the first row.... When we use mysql_fetch_row, then the variable row gets the data of the next row of the result. When we reach the end of the result, then the function returns a negative value. In the end we need to close the connection:
mysql_close(MYSQL *mysql)
unsigned int STDCALL mysql_num_fields(MYSQL *mysql);This function returns the number of fields in the table.
To get the number of rows of query result use:
my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res);
my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql);
This function is used to know the number of rows that are affected by INSERT, DELETE, UPDATE queries. Note that the function returns the type my_ulonglong.Finally some example code:
#include <mysql/mysql.h> #include <stdio.h> void main(){ MYSQL *mysql; MYSQL_RES *res; MYSQL_ROW row; char *query; int t,r; mysql_init(mysql); if (!mysql_real_connect(mysql,"localhost","mysql", "mysql","deneme",0,NULL,0)) { printf( "Error connecting to database: %s\n",mysql_error(mysql)); } else printf("Connected...\n"); query="select * from Deneme"; t=mysql_real_query(mysql,query,(unsigned int) strlen(query)); if (t) { printf("Error making query: %s\n", mysql_error(mysql)); } else printf("Query made...\n"); res=mysql_use_result(mysql); for(r=0;r<=mysql_field_count(mysql);r++){ row=mysql_fetch_row(res); if(row<0) break; for(t=0;t<mysql_num_fields(res);t++){ printf("%s ",row[t]); } printf("\n"); } mysql_close(mysql); }
|
|
Webpages maintained by the LinuxFocus Editor team
© Özcan Güngör, FDL LinuxFocus.org |
Translation information:
|
2003-08-07, generated by lfparser version 2.38


1) Procedural -> breaking problem into steps the computer follows
2) Abstract -> 1+1=2
3) Systematic Debugging a) Collect Evidence b) Generate theories c) Test d) Fix
4) Technical Empathy -> what code means
5) Systems Thinking -> breaking down problem then create a plan
Web is a collection HTML (Hyper Text Markup Language) pages. Your computer uses the internet and the protocol HTTP to communicate with servers which house the HTML code of webpages.
HTML relies on tags so that browsers can correctly translate what will be displayed on the page. A good summary of tags tags can be seen here.
Inline elements are different from block in that a block element will create an invisble box around the text.
CSS, HTML, and Java Script are the three primary languages used in web design. HTML provdes structure (like the walls of a house), CSS provides style (decorations , paint, etc), while Java Script provides interactive components (like the garage door opener). In Chrome, clicking on the 3 stacked lines, then tools, then development tools will show you the structure of a page. It is best to think of elements being inside of an invisible box.
Boxes are nested inside other boxes. Each box provides the framwork for the for the text/video/image that you see on the screen. For example, HTML->Body->h1->text. HTML is thr trunk, body is a branch with other braches sprouting from it. The tip of the branch is what will be displayed inside that box on the screen by the browser. In other words, the tags represent the branches of a tree. The Document Object Model (DOM) is a page's tree structure.
When designing a site, start with a collection of boxes then fill them in. Each box should be defined by a div tag.
Scratchpad is the easiest to use when writing HTML and CSS however, it is the least powerful. Codepen can be used to write and share code.
Cascading Style Sheets (CSS) are used to add styles to classes in HTML code. This is language is essential in ensuring that programmers do not repeat themselves and can remain efficient.It does this by applying rules to elements/classes/descriptions.
This concept centers around the fact that properties are applied to specific elements and its descendants.
Margin -> Border -> Padding -> Content. Pro tip: Set boxes as a percentage so they will change along with a user's screen size.
1) Look for natural boxes
2) Look for repeated styles
3) Write HTML
4) Apply styles
5) Fix things


Pretty sure based on various examples (like the one here) I set things up correctly:
1) I created a file 'notfound.html' in the root directory of my site
2) I'm running xampp, ie. Apache web server, so based on the stuff I've read, Apache looks for a notfound.html in the root directory of a site when a non-existent page is typed in the browser, such as www.mysite.com/NotAValidPage.html and uses that notfound.html for the 404 error message
Here's what I've tried and the result of each attempt:
1test) I put my own notfound.html in my site's root directory and enter a non-existent page
1result) my notfound.html is not used, but instead the default 404 error from (I guess) my web server, appears and says:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try
again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
2/14/2012 9:11:29 AM
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
2test) I next added an .htaccess file to the root folder of my site and added this line in this .htaccess file:
ErrorDocument 404 /notfound.html
then I typed a non-existent page into my browser.
2result) I still see a default 404 error page, not my notfound.html, only this time the default error page says:
Not Found
The requested URL /mysite.com/indsadfaex.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying
to use an ErrorDocument to handle the request.
3test) I then modified my .htaccess file by removing the '/' before the name of my custom 404 error page filename as follows: ErrorDocument 404 notfound.html
3result) Now when I type my site name followed by a non-existent page, I no longer see the default 404 error page -- the browser window is completely blank except for the following at the top left corner:
notfound.html
Not sure what to do here, seems like I am missing some subtlety -- any ideas are really appreciated.
EDIT: I doubt it matters but there are 2 other statements in my .htaccess file for redirection situations:
RewriteEngine on
RewriteRule ^([^/\.]+)$ theHandlerPage.php?theArgumentPassedIn=$1 [L]
The regex here simply says 'go to the very end of the URL typed in and match a contiguous string of characters iff no '/' or '.' is in that contiguous stream of characters, then pass those in by way of $_GET[theArgumentPassedIn'] to the file theHandlerPage.php.
I don't think this rewrite rule is coming into play here because it will not match on a bad page name such as mysite/badpage.html because of the '.' in badpage.html.
Okay -- I discovered a bit of unexpectedness.
1) I move my notfound.html error file to the parent directory of my site -- whereas before the file was located at c:/xampp/htdocs/mysite/notfound.html
, I have now moved this file to c:/xampp/htdocs/notfound.html
.
2) then I use ErrorDocument 404 /notfound.html inside of my .htaccess
file, which is located at c:/xampp/htdocs/mysite/.htaccess
And now when I type in the browser bar mysite/aBadfilename.html
, my 404 notfound.html is showing up fine.
BUT THIS IS UNWORKABLE. I cannot have my notfound.html
reside in the parent directory of my site, because I need a different notfound.html for each site I develop. I must be able to put my site's notfound.html in its folder space, ie. inside c:/xampp/htdocs/mysite.
Because c:/xampp/htdocs
is the root folder of all web sites on the server.
Why is my web server looking for my-site's notfound.html
in the c:/xampp/htdocs
root directory instead of c:/xampp/htdocs/mysite
? After all, I type mysite/badfile.html so the web server (in my opinion) should understand that notfound.html is in the c:/xampp/htdocs/mysite
folder space.
notfound.html
accessible to Apache? (You definitely need the slash though.) – Pekka ์ Feb 14 '12 at 17:27notfound.html
directly in your browser? – Pekka ์ Feb 14 '12 at 17:32


I'm an Electrical Engineering and Computer Science doctorate student at the Massachusetts Institute of Technology. I work in the Computer Science and Artificial Intelligence Laboratory with the Learning and Intelligent Systems group. I'm interested in using machine learning techniques for learning robotic manipulation strategies. The wordle (shown above) was generated from my masters thesis on using reinforcement learning for robotic grasping.
I graduated from UC Santa Cruz with a Computer Engineering major in the Spring of 2012. During my tenure there, I researched with the Bionics Lab under Jacob Rosen PhD on Dental Robotics.
Stay tuned! I'm working on this section. Meanwhile, check out former research links:


Disclaimer: We have noticed problems occuring in our web version of the game on the Safari browser. We recommend using Firefox for the best gameplay experience.
Please download Knotris here! Currently avaialable in Windows, Mac, and Linux.
Did you like playing? Do you have feeback? Let us know here!
Want to look at our source code? Check out our repository! Let us know if you find any bugs!
We use google analytics to track page activity.
If you don't want Google Analytics to track you please click this button:


You are currently signed up to the Free Trial Plan.Upgrade now?
Monday July 12th, 2010 at 11:32am from <IP_ADDRESS> No error login attempts.
Sales this year


In order for the player to show its pretty waveform display, it needs access to the audio file peak data, which is saved in the player HTML using a text packing format that looks like this: track name
. This page is a little utility to generate the peak data for an audio file.
This page has been tested in Chrome, and likely only works in modern browsers. If it doesn't work for you, make sure you're using a modern browser, and check the console for errors.
| 1. | Select a file: | |
| 2. | Player width: |
Approximate width of player in pixels. Because wider players need more peak data. Do not double this figure for retina displays - I already do that. px |
| 3. | Then click this: | |
| 4. | Preview: | |
| 5. | Peak data: |
Copy and paste this into the data-peaks attribute of your waveform player HTML. |


References
1
Quantitative Assessment of a Tanzanian Integrated Conservation and Development Project Involving Butterfly Farming
Download


字
transform is applied in a reverse order
translate should come first (the last to be executed)
scale and rotate at the origin (can be swapped)


AdobeImageEditorCustomization Class Reference
| Inherits from | NSObject |
| Declared in | AdobeImageEditorCustomization.h |
Overview
This class provides a powerful interface for configuring AdobeUXImageEditorViewController’s appearance and behavior. While changing values after presenting an AdobeUXImageEditorViewController’s instance is possible, it is strongly recommended that you make all necessary calls to AdobeImageEditorCustomization before editor presentation. Example usage can be found in the iOS SDK Customization Guide.
Tasks
Imaging Methods
Appearance Methods
iPadOrientation Methods
NavigationBarButtons Methods
Localization Methods
ToolSettings Methods
-
+ setToolOrder:
-
+ setCropToolCustomEnabled:
-
+ setCropToolOriginalEnabled:
-
+ setCropToolInvertEnabled:
-
+ setCropToolPresets:
UserMessaging Methods
PCNSupport Methods
Class Methods
disableLocalization:
Configures the editor to use localization or not.
+ (void)disableLocalization:(BOOL)disableLocalization
Parameters
- disableLocalization
YES disables localization, NO leaves it enabled.
Discussion
Configures the editor to use localization or not.
By default, Aviary enables localization.
Declared In
AdobeImageEditorCustomization.h
purgeGPUMemoryWhenPossible:
Configures the editor to free GPU memory when possible.
+ (void)purgeGPUMemoryWhenPossible:(BOOL)purgeGPUMemory
Parameters
- purgeGPUMemory
YES purges GPU memory when possible, NO retains it.
Discussion
Configures the editor to free GPU memory when possible.
By default, the SDK keeps a small number of OpenGL objects loaded to optimize launches of the editor. Set this key to YES purge GPU memory when possible.
Declared In
AdobeImageEditorCustomization.h
setConfirmOnCancelEnabled:
Configures whether to ask the user for a confirmation when cancelling out of the editor with unsaved edits.
+ (void)setConfirmOnCancelEnabled:(BOOL)confirmOnCancelEnabled
Parameters
- tutorialsEnabled
whether to show the confirmation or not
Discussion
Configures whether to ask the user for a confirmation when cancelling out of the editor with unsaved edits.
By default, this returns YES.
Declared In
AdobeImageEditorCustomization.h
setCropToolCustomEnabled:
Enables or disables the custom crop size.
+ (void)setCropToolCustomEnabled:(BOOL)cropToolEnableCustom
Parameters
- cropToolEnableCustom
YES enables the custom crop size, NO disables it.
Discussion
Enables or disables the custom crop size.
The Custom crop preset does not constrain the crop area to any specific aspect ratio. By default, custom crop size is enabled.
Declared In
AdobeImageEditorCustomization.h
setCropToolInvertEnabled:
Enables or disables the invertability of crop sizes.
+ (void)setCropToolInvertEnabled:(BOOL)cropToolEnableInvert
Parameters
- cropToolEnableInvert
YES enables the crop size inversion, NO disables it.
Discussion
Enables or disables the invertability of crop sizes.
By default, inversion is enabled. Presets with names, i.e. Square, are not invertible, regardless of whether inversion is enabled.
Declared In
AdobeImageEditorCustomization.h
setCropToolOriginalEnabled:
Enables or disables the custom crop size.
+ (void)setCropToolOriginalEnabled:(BOOL)cropToolEnableOriginal
Parameters
- cropToolEnableOriginal
YES enables the original crop size, NO disables it.
Discussion
Enables or disables the custom crop size.
The Original crop preset constrains the crop area to photo’s original aspect ratio. By default, original crop size is enabled.
Declared In
AdobeImageEditorCustomization.h
setCropToolPresets:
Sets the availability and order of crop preset options.
+ (void)setCropToolPresets:(NSArray *)cropToolPresets
Parameters
- cropToolPresets
An array of crop option dictionaries.
Discussion
Sets the availability and order of crop preset options.
The dictionaries should be of the form:
@{kAdobeImageEditorCropPresetName:
When the corresponding option is selected, the crop box will be constrained to a kAdobeImageEditorCropPresetWidth:kAdobeImageEditorCropPresetHeight aspect ratio.
If Original and/or Custom options are enabled, then they will precede the presets defined here. If no crop tool presets are set, the default options are Square, 3x2, 5x3, 4x3, 6x4, and 7x5.
Declared In
AdobeImageEditorCustomization.h
setIconImage:forTool:
Sets the tool’s icon image in the editor’s home bottom bar.
+ (void)setIconImage:(UIImage *__nullable)image forTool:(NSString *)tool
Parameters
- image
The image to use.
- tool
The tool to set for the image. See the discussion for possible values.
Discussion
Sets the tool’s icon image in the editor’s home bottom bar.
The tool key must be one of the options listed at the top of this header.
Declared In
AdobeImageEditorCustomization.h
setLeftNavigationBarButtonTitle:
Sets the text of the editor’s left navigation bar button.
+ (void)setLeftNavigationBarButtonTitle:(NSString *)leftNavigationBarButtonTitle
Parameters
- leftNavigationBarButtonTitle
An NSString value represented by one of the three kAdobeImageEditorLeftNavigationTitlePreset keys.
Discussion
Sets the text of the editor’s left navigation bar button.
Attempting to set any string besides one of the kAdobeImageEditorLeftNavigationTitlePresets will have no effect.
Declared In
AdobeImageEditorCustomization.h
setNavBarImage:
Sets the editor’s navigation bar’s background image.
+ (void)setNavBarImage:(UIImage *__nullable)navBarImage
Parameters
- navBarImage
The image to use.
Discussion
Sets the editor’s navigation bar’s background image.
Warning: This method no longer has any effect.
Declared In
AdobeImageEditorCustomization.h
setRightNavigationBarButtonTitle:
Sets the text of the editor’s right navigation bar button.
+ (void)setRightNavigationBarButtonTitle:(NSString *)rightNavigationBarButtonTitle
Parameters
- rightNavigationBarButtonTitle
An NSString value represented by one of the three kAdobeImageEditorRightNavigationTitlePreset keys.
Discussion
Sets the text of the editor’s right navigation bar button.
Attempting to set any string besides one of the kAdobeImageEditorRightNavigationTitlePresets will have no effect.
Declared In
AdobeImageEditorCustomization.h
setStatusBarStyle:
Sets the editor’s preferred status bar style when running on a device running iOS 7 and later.
+ (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle
Parameters
- statusBarStyle
The status bar style to use.
Discussion
Sets the editor’s preferred status bar style when running on a device running iOS 7 and later.
Warning: This method no longer has any effect.
Declared In
AdobeImageEditorCustomization.h
setSupportedIpadOrientations:
Configures the orientations the editor can have on the iPad form factor.
+ (void)setSupportedIpadOrientations:(NSArray *)supportedOrientations
Parameters
- supportedOrientations
An NSArray containing NSNumbers each representing a valid UIInterfaceOrientation.
Discussion
Configures the orientations the editor can have on the iPad form factor.
On the iPhone form factor, orientation is always portrait.
Declared In
AdobeImageEditorCustomization.h
setToolOrder:
Sets the type and order of tools to be presented by the editor.
+ (void)setToolOrder:(NSArray *)toolOrder
Parameters
- toolOrder
An NSArray containing NSString values represented by one of the tool keys.
Discussion
Sets the type and order of tools to be presented by the editor.
The tool key must be one of the options listed at the top of this header.
Declared In
AdobeImageEditorCustomization.h
setTutorialsEnabled:
Configures whether to show tutorials explaining the editor’s features to users. By default, this is set to YES.
+ (void)setTutorialsEnabled:(BOOL)tutorialsEnabled
Parameters
- tutorialsEnabled
whether to enable the the tutorials or not
Discussion
Configures whether to show tutorials explaining the editor’s features to users. By default, this is set to YES.
Declared In
AdobeImageEditorCustomization.h
usePCNStagingEnvironment:
Configures the editor to point at the Premium Content Network’s staging environment.
+ (void)usePCNStagingEnvironment:(BOOL)usePCNStagingEnvironment
Parameters
- usePCNStagingEnvironment
YES points the editor to staging, NO points it to production.
Discussion
Configures the editor to point at the Premium Content Network’s staging environment.
By default, the editor points at the production environment. Call this method with YES before editor to launch to view the content in the Premium Content Network staging environment.
Declared In
AdobeImageEditorCustomization.h


Observations
Species
People
Places
Sorry, that doesn't exist!
Even our dedicated search mole couldn't find anything!


?Proserpinaca
intermedia
Mack.
Determined
by
Dr.
P.M.
Catling
-
May
2002
Agriculture
&
Agri-Food
Canada
DAO
Herbarium
SMITHSONIAN
INSTITUTION
From
THE
UNITED
STATES
NATIONAL
HERBARIUM
PLANTS
OF
CUBA
Isle
of
Pines
Proserpinaca
pectinata
Lam,
In
water
of
lake.
Along
road
to
San
Francisco
de
las
Piedras.
no.
e.
p.
KiLup,
coiiecto,
Jan.
21,
1955
01500409
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Higher: Value getting along with others. They have a more optimistic view of human nature. Lower: Value self interests over others. They are more skeptical of others' motives.
Active and genuine concern for the welfare of others.
Attitude of compassion for others; kindness.
Frank and genuine in expression; candid, blunt.
Level of belief in the sincerity and good intentions of others.
Dislike of confrontations. Responding to interpersonal conflict with a willingness to compromise.
Tendency to be unassuming and play down own achievements; humility.
Higher: More self-disciplined, dutiful, or aiming for achievement against measures or outside expectations. Lower: More likely to prefer the spontaneous over the planned.
The need for personal achievement and sense of direction.
Sense of duty; amount of emphasis placed on fulfilling obligations.
Will-power; the capacity to begin tasks and follow through to completion in spite of boredom or distractions.
Tendency to think things through before acting or speaking.
Belief in one's own competence.
Personal organization, tidiness, neatness.
Openness to experience. Higher: Intellectually curious, emotionally-aware, sensitive to beauty and willing to try new things. Lower: Preferring the plain, straightforward, and obvious over the complex, ambiguous, and subtle.
Emotional availability; awareness of own feelings.
Appreciation for art and beauty, both man-made and in nature.
Eagerness to trying new activities and experiencing new things.
Intellectual curiosity; openness to new ideas.
Openness to creating an inner world of fantasy.
Openness to re-examine own values and traditions; readiness to challenge authority.
Higher: More energetic and pronounced engagement with the external world. Likes high group visibility, talking, and asserting themselves. Lower: Needs less stimulation and are more independent of their social world. It does not mean they are shy, un-friendly, or antisocial.
Interest in and friendliness towards others; socially confident.
Tendency to experience or express positive emotions.
Pace of living; level of busyness.
Forcefulness of expression; pursuit of leadership and social ascendancy; desire to direct the activities of others.
Fondness for the company of others; sociability.
A need for environmental stimulation.
This demo cannot diagnose a mental illness. Higher: More likely to have negative emotions or get upset. It could mean they are going through a tough time. Lower: More calm and less likely to get upset. It does not mean they are positive, or happy people.
Tendency to dwell on difficulty or troubles; easily experience unease or concern.
Difficulty in coping with stress or pressure in difficult situations.
Concern with rejection, embarrassment; shyness.
Tendency to act on cravings and urges rather over resisting them or delaying gratification.
Tendency to experience–but not necessarily express–anger or frustration.
Normal tendency to experience feelings of guilt, sadness, hopelessness, or loneliness. This demo cannot diagnose a mental illness.
A need to appreciate or please other people, their viewpoints, and feelings.
A need to pursue experiences that foster learning, exploration, and growth.
A need for the sensible, tried and tested, with a good track record and a known history.
A desire to discover and assert one's identity.
A need to nurture or be nurtured; a feeling of belonging.
Social contact, whether one-to-one or one-to-many.
A need to escape, a desire for new experiences, new things.
A need for organization, planning, and things that have a clear purpose.
A need to pursue experiences or lead a lifestyle that arouses enthusiasm and eagerness.
A desire to satisfy one's idea of perfection in a lifestyle or experience, oftentimes seen as pursuing a sense of community.
A desire to achieve, succeed, compete, or pursue experiences that test one's abilities.
A desire for getting the job done, skill, and efficiency.
Respect, commitment, and acceptance of the customs and ideas that one's culture and/or religion provides.
Excitement, novelty, and challenge in life.
Preserving and enhancing the welfare of those with whom one is in frequent personal contact.
Personal success through demonstrating competence according to social standards.
Pleasure or sensuous gratification for oneself.


LEADERBOARD
{{$index + 1}}
{{user.name | uppercase}}
Badges Earned: {{user.badges.length}}
BADGE QUEST 2016
Team Stats
Individual Details
Badge Details
{{"Coming Soon!" | uppercase }}
{{"SELECT A USER FROM THE PANEL ON THE LEFT" | uppercase }}
Badge
Date Earned
Notes
{{getBadgeTitleById(badge.id)}}
{{badge.date_earned | date:'MMM dd, HH:mm:ss'}}
{{badge.details}}
{{"SELECT A BADGE FROM THE PANEL ON THE RIGHT" | uppercase }}
{{selectedBadge.title | uppercase}}
{{selectedBadge.description}}
User
Date Earned
Notes
{{row.user}}
{{row.date | date:'MMM dd, HH:mm:ss'}}
{{row.details}}
THE BADGES


jhfjhfj
hjgdhgj
fhjkfjhk
jhfjh
lhjkl
82
jkg
fkhgbkjdfzhgjksfhdgukhdfkghkdfhgjkdhfkghfxdghjkxdfhgioxhmksdjx
fkhgbkjdfzhgjksfhdgukhdfkghkdfhgjkdhfkghfxdghjkxdfhgioxhmksdjx
fkhgbkjdfzhgjksfhdgukhdfkghkdfhgjkdhfkghfxdghjkxdfhgioxhmksdjx


ngImgCrop
Simple Image Crop directive for AngularJS. Enables to crop a circle or a square out of an image.
Screenshots
Live demo
Requirements
- AngularJS
- Modern Browser supporting
Add files
Add the scripts to your application. Make sure the ng-img-crop.js
file is inserted after the angular.js
library:

<link rel="stylesheet" type="text/css" href="ng-img-crop.css">
Add a dependancy
Add the image crop module as a dependancy to your application module:
var myAppModule = angular.module('MyApp', ['ngImgCrop']);
Usage
- Add the image crop directive

to the HTML file where you want to use an image crop control. Note: a container, you place the directive to, should have some pre-defined size (absolute or relative to its parent). That's required, because the image crop control fits the size of its container. - Bind the directive to a source image property (using image="" option). The directive will read the image data from that property and watch for updates. The property can be a url to an image, or a data uri.
- Bind the directive to a result image property (using result-image="" option). On each update, the directive will put the content of the crop area to that property in the data uri format.
- Set up the options that make sense to your application.
- Done!
Result image
The result image will always be a square for the both circle and square area types. It's highly recommended to store the image as a square on your back-end, because this will enable you to easily update your pics later, if you decide to implement some design changes. Showing a square image as a circle on the front-end is not a problem - it is as easy as adding a border-radius style for that image in a css.
Example code
The following code enables to select an image using a file input and crop it. The cropped image data is inserted into img each time the crop area updates.

<link rel="stylesheet" type="text/css" href="ng-img-crop.css">

Select an image file: <input type="file" id="fileInput" />

Cropped Image:

Options

image
Assignable angular expression to data-bind to. NgImgCrop gets an image for cropping from it.
result-image
Assignable angular expression to data-bind to. NgImgCrop puts a data uri of a cropped image into it.
change-on-fly
Optional. By default, to reduce CPU usage, when a user drags/resizes the crop area, the result image is only updated after the user stops dragging/resizing. Set true to always update the result image as the user drags/resizes the crop area.
area-type
Optional. Type of the crop area. Possible values: circle|square. Default: circle.
area-min-size
Optional. Min. width/height of the crop area (in pixels). Default: 80.
result-image-size
Optional. Width/height of the result image (in pixels). Default: 200.
result-image-format
Optional. Format of result image. Possible values include image/jpeg, image/png, and image/webp. Browser support varies. Default: image/png.
result-image-quality
Optional. Quality of result image. Possible values between 0.0 and 1.0 inclusive. Default: browser default.
on-change
Optional. Expression to evaluate upon changing the cropped part of the image. The cropped image data is available as $dataURI.
on-load-begin
Optional. Expression to evaluate when the source image starts loading.
on-load-done
Optional. Expression to evaluate when the source image successfully loaded.
on-load-error
Optional. Expression to evaluate when the source image didn't load.


Preparation time
less than 30 mins
Cooking time
over 2 hours
Serves
Makes 1 x 23cm/9in cake
Dietary
An incredibly pretty French cake filled with delicious strawberries and crème pâtissière. Tricky to achieve but certain to impress.
Preheat the oven to 180C/350F/Gas 4.
Grease, flour and line the base of a 23cm/9in spring-form or round loose bottom cake tin.
Place the sugar, eggs and lemon zest in a large bowl set over a pan of simmering water.
Using an electric hand whisk, whisk the mixture over a medium heat until doubled in volume and pale in colour. The mixture is at the right stage when it forms a ribbon trail when the whisk is lifted out of the mixture. Remove from the heat.
Sift in two-thirds of the flour and gently fold into the whisked mixture with a metal spoon or spatula. Add the remaining flour and fold again. Try to keep in as much of the air as possible. Make sure all the flour is incorporated into the mixture.
Gently fold in the melted butter.
Pour the mixture into the cake tin and bake for 25-30 minutes or until the sides of the cake begin to come away from the tin and it is pale golden-brown.
When cooked, allow the sponge to cool a little bit in the tin, then turn out onto a cooling rack. Be careful as this sponge is quite delicate. It should be just under 5cm/2in in height.
To make the crème pâtissière, pour the milk into a wide based pan, split the vanilla pod along its length using a sharp knife, and add it to the milk along with the vanilla seeds. Bring the milk up to the boil, then take it off the heat.
Whisk together the eggs, sugar, kirsch and cornflour in a medium sized bowl until blended.
Remove the vanilla pod from the milk and pour the hot milk through a sieve into the egg mixture. Whisk to combine.
Pour the custard back into a clean saucepan and set over a medium heat.
Stir the custard constantly until the mixture thickens. The mixture will take about four minutes to thicken, but when it does it happens very quickly, so you need to really keep stirring to prevent lumps. Whisk until smooth.
Cook the mixture until the crème is very thick, so that it can be piped and it will hold its shape. Stir in the butter until thoroughly melted and combined.
Allow to cool slightly, pour into a shallow dish and chill in the fridge for about an hour until really cold and set firm. This chills it faster as it cools over a larger surface area – alternatively you could fill the piping bags with it at this stage and leave overnight to chill.
Place the ingredients for the lemon syrup in a small saucepan with 70ml/4½ tbsp water. Heat gently until the sugar dissolves, then boil rapidly for two minutes. Remove from the heat and set aside to cool.
Meanwhile, roll out a thin disc of marzipan to fit a 23cm/9in circumference circle. It is best if you draw around the 23cm/9in base of another loose bottomed tin for the perfect circle. For best results and a perfectly flat surface, chill it in the fridge until it is needed.
Slice the sponge in half horizontally, creating two slim discs of cake. The cut must be as level as possible as it will be visible in the finished cake.
Place a strip of acetate plastic around the inside of the springform tin. Or line the base and sides with cling film or parchment lined foil.
Place one layer of sponge cake in the bottom of the cake tin. Then liberally brush the sponge with half the syrup. With the back of a spoon, gently squash the edges of the cake down so that they are pushed directly against the sides of the tin, creating the defined edges necessary for the Fraisier cake.
Rinse, hull and halve about 12 strawberries, try and make sure they are all the same height.
Place the cut sides of the strawberries against the plastic on the inside of the tin. The strawberry halves should be sitting snugly beside each other, so it looks like a little crown inside the tin.
Take the chilled crème pâtissière out of the fridge and spoon two thirds of the crème into a piping bag, fitted with a 1cm/½in nozzle.
Pipe a swirl covering the exposed sponge completely in the bottom of the tin.
Then pipe between each of the strawberries so the gaps are filled right to the top with the crème pâtissière.
Set about 3-5 strawberries to one side for decoration, then hull and quarter the rest of them and place on top of the crème, so it raises the inside of the cake by about an inch.
Pipe another swirl of crème pâtissière on top of the cut strawberries to cover the whole surface. Then smooth with a palette knife.
Place the other disc of sponge on top of this, with the cut side uppermost, so it has a completely flat top. Brush with the remaining syrup.
Gently press the top down quite firmly, so that the cake and filling push against the acetate to create the distinctive smooth and defined sides of the Fraisier cake.
Lay the chilled marzipan circle on top of the cake and put the whole thing back in the fridge to set.
Make some pretty decorations of your choice with melted dark chocolate.
When ready to serve, remove the cake from fridge.
Very carefully release the spring tin/loose bottom and remove the cake from the tin and from the acetate or cling film.
Place onto a serving plate and decorate with reserved strawberries, chocolate decoration and a dusting of icing sugar. Serve chilled.
You need JavaScript to view this clip.
How to pipe chocolate decorations


|
SensESP
0.5.1
Universal Signal K sensor framework for ESP8266 and ESP32
|
#include <signalk_value_listener.h>
Public Member Functions | |
| SKValueListener (String sk_path, int listen_delay=1000) | |
| void | parse_value (JsonObject &json) override |
| Public Member Functions inherited from SKListener | |
| SKListener (String sk_path, int listen_delay) | |
| String & | get_sk_path () |
| int | get_listen_delay () |
| Public Member Functions inherited from Observable | |
| void | notify () |
| void | attach (std::function< void()> observer) |
| Public Member Functions inherited from ValueProducer< T > | |
| ValueProducer () | |
| virtual const T & | get () |
| void | connect_to (ValueConsumer< T > *consumer, uint8_t input_channel=0) |
| void | connectTo (ValueConsumer< T > *consumer, uint8_t input_channel=0) |
| template<typename T2 > | |
| Transform< T, T2 > * | connect_to (Transform< T, T2 > *consumer_producer, uint8_t input_channel=0) |
| template<typename T2 > | |
| Transform< T, T2 > * | connectTo (Transform< T, T2 > *consumer_producer, uint8_t input_channel=0) |
Additional Inherited Members | |
| Static Public Member Functions inherited from SKListener | |
| static const std::vector< SKListener * > & | get_listeners () |
| Protected Attributes inherited from SKListener | |
| String | sk_path |
| Protected Attributes inherited from ValueProducer< T > | |
| T | output |
Definition at line 14 of file signalk_value_listener.h.
|
inline |
Definition at line 16 of file signalk_value_listener.h.
|
inlineoverridevirtual |
Reimplemented from SKListener.
Definition at line 23 of file signalk_value_listener.h.


I want to write sentence stems today.
I want to be notified minutes from now.
Toggle 2 minute warnings after full 10 minutes of work