首页 > 下载 >  类库下载

  • <?php /*  * This file is part of DbUnit.  *  * (c) Sebastian Bergmann <sebastian@phpunit.de>  *  * For the full copyright and license information, please view the LICENSE  * file that was distributed with this source code.  */ namespace PHPUnit\DbUnit; /**  * An interface for classes that require a list of databases to operate.  */ interface DatabaseListConsumer {     /**      * Sets the database for the spec      *      * @param array $databases      */     public function setDatabases(array $databases); }uNIT (Understanding and Interaction Technology,理解与交互技术)平台,是由百度重点为中文第三方开发者打造的对话系统开发平台。UNIT搭载业界领先的需求理解与对话管理技术,蕴含百度多年积累的自然语言理解与交互技术、深度学习、大数据等核心能力,可以让智能对话交互快速赋能第三方开发者的产品,让未来更富想象空间。

    其它类库12422017-12-19
  • <?php $autoloadFile = './vendor/codeception/codeception/autoload.php'; if (file_exists('./vendor/autoload.php') && file_exists($autoloadFile) && __FILE__ != realpath($autoloadFile)) {     //for global installation or phar file     fwrite(         STDERR,         "\n==== Redirecting to Composer-installed version in vendor/codeception ====\n"     );     require $autoloadFile;     //require package/bin instead of codecept to avoid printing hashbang line     require './vendor/codeception/codeception/package/bin';     die; } elseif (file_exists(__DIR__ . '/vendor/autoload.php')) {     // for phar     require_once(__DIR__ . '/vendor/autoload.php'); } elseif (file_exists(__DIR__ . '/../../autoload.php')) {     //for composer     require_once __DIR__ . '/../../autoload.php'; }我们先设想这样一个场景:当技术人员开发完毕, 其客户, 产品经理, 或者是测试人员, 他们怎么确定产品的可用性? 一般情况下, 他们都是执行以下几个步骤进行测试:打开浏览器;输入 url;看到一些信息, 并确定了这个页面是可用的;点击某个 url;填写表单, 并提交表单, 看到了某些信息, 并确定此功能是可用的这种测试方式我们称之为 手动测试, 或 人工测试, 与其相反的是 自动化测试, Codeception 的 Acceptance Tests 会利用浏览器的编程接口, 做到以上的 人工测试 涉及到的步骤完全自动化, 大大节省了人工成本.

    其它类库13002017-12-19
  • <?php declare(strict_types=1); $rootDir = realpath(__DIR__ . '/../'); // Autoloader for standalone install (installed via `composer create-project` or cloned locally) $autoloader = realpath($rootDir . '/vendor/autoload.php'); if (! $autoloader) {     // Installed via `composer [global] require`.     $autoloader = realpath($rootDir . '/../../autoload.php'); } if (! $autoloader) {     throw new RuntimeException(         'ApiGen was unable to find its autoloader. ' .         'Did you forget to run "composer update"?'     ); } require_once $autoloader;PhalApi 1.x 是经典封存版本,已停止更新,历练考验,可放心使用。主要采用PEAR命名规范,遵循PSR-0,不支持命名空间和composer。PhalApi 1.x 支持PHP 5.3及以上版本,并支持PHP 7。

    其它类库14282017-12-19
  • <?php namespace GifCreator; /**  * Create an animated GIF from multiple images  *   * @version 1.0  * @link https://github.com/Sybio/GifCreator  * @author Sybio (Clément Guillemain  / @Sybio01)  * @license http://opensource.org/licenses/gpl-license.php GNU Public License  * @copyright Clément Guillemain  */ class GifCreator {     /**      * @var string The gif string source (old: this->GIF)      */     private $gif;          /**      * @var string Encoder version (old: this->VER)      */ private $version;          /**      * @var boolean Check the image is build or not (old: this->IMG)      */     private $imgBuilt;这个类库非常好用,你只需要首先需要确认类库库是否正常,如果是合成图片,请确保把分解的图片放在frames的文件夹里面。启动程序就可以得到你想要的GIF图了。

    图片类库75792017-12-18
  • <?php /**  * PhpThumb Library Example File  * This file contains example usage for the PHP Thumb Library  * PHP Version 5 with GD 2.0+  * PhpThumb : PHP Thumb Library <http://phpthumb.gxdlabs.com>  * Copyright (c) 2009, Ian Selby/Gen X Design  *  * Author(s): Ian Selby <ian@gen-x-design.com>  *  * Licensed under the MIT License  * Redistributions of files must retain the above copyright notice.  *  * @author Ian Selby <ian@gen-x-design.com>  * @copyright Copyright (c) 2009 Gen X Design  * @link http://phpthumb.gxdlabs.com  * @license http://www.opensource.org/licenses/mit-license.php The MIT License  * @version 3.0  * @package PhpThumb  * @subpackage Examples  * @filesource  */ require_once '../vendor/autoload.php'; $thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg'); $thumb->adaptiveResize(175, 175); $thumb->show();在用php开发网站的时候,使用面向对象的方法确实可以提高代码复用率,减少代码冗余。而对初学者更友好的是,PHP开发网站所需要的大部分类库,网上都有十分优秀的类库存在了。这次给大家带来的就是处理缩略图的PHP类库,需要的朋友可以直接拿去使用。

    图片类库59822017-12-18
  • var C = (function(){       // ------Class Creation------       var initializing = false,       fnTest = /xyz/.test(function() {           xyz;       }) ? /\b_super\b/: /.*/;       // The base Class implementation (does nothing)       this.Class = function() {};       // Create a new Class that inherits from this class       Class.extend = function(prop) {           var _super = this.prototype;           // Instantiate a base class (but only create the instance,           // don't run the init constructor)           initializing = true;           var prototype = new this();           initializing = false;该类库主要依赖Simple JavaScript Inheritance ,并对其做了修改。

    其它类库17602017-12-18
  • <?php     undation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA       echo "<h1>PHP QR Code</h1><hr/>";        //set it to writable location, a place for temp generated PNG files     $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR;     //html PNG location prefix     $PNG_WEB_DIR = 'temp/';     include "qrlib.php";           //ofcourse we need rights to create temp dir     if (!file_exists($PNG_TEMP_DIR))         mkdir($PNG_TEMP_DIR);     $filename = $PNG_TEMP_DIR.'test.png';       $errorCorrectionLevel = 'L';     if (isset($_REQUEST['level']) && in_array($_REQUEST['level'], array('L','M','Q','H')))         $errorCorrectionLevel = $_REQUEST['level'];         $matrixPointSize = 4;     if (isset($_REQUEST['size']))         $matrixPointSize = min(max((int)$_REQUEST['size'], 1), 10);我们的这个二维码生成类首先需要您的PHP环境必须开启支持GD2。 它提供了一个关键的png()方法,其中参数$text表示生成二位的的信息文本;参数$outfile表示是否输出二维码图片 文件,默认否;参数$level表示容错率,也就是有被覆盖的区域还能识别,分别是 L(QR_ECLEVEL_L,7%),M(QR_ECLEVEL_M,15%),Q(QR_ECLEVEL_Q,25%),H(QR_ECLEVEL_H,30%); 参数$size表示生成图片大小,默认是3;参数$margin表示二维码周围边框空白区域间距值;参数$saveandprint表示是否保存二维码并 显示。

    其它类库15912017-12-18
  • <?php namespace ImageOptimizer\TypeGuesser; class ExtensionTypeGuesser implements TypeGuesser     public function guess($filepath)     {         $ext = strtolower(pathinfo($filepath, PATHINFO_EXTENSION));         switch($ext) {             case 'png':                 return self::TYPE_PNG;             case 'gif':                 return self::TYPE_GIF;             case 'jpg':             case 'jpeg':                 return self::TYPE_JPEG;             default:                 return self::TYPE_UNKNOWN;         }     } }操作图像:就是去掉不必要的颜色、像素等,例图像的由大变小。网页图像的要求是在尽可能短的传输时间里,发布尽可能高质量的图像。因此在设计和处理网页图像时就要求图像有尽可能高的清晰度与尽可能小的尺寸,从而使图像的下载速度达到最快。为此,必须对图像进行优化操作。

    图片类库48412017-12-18
  • <?php include 'vendor/autoload.php'; use Sami\Sami; use Symfony\Component\Finder\Finder; $iterator = Finder::create()     ->files()     ->name('*.php')     ->in($dir = 'src') ; return new Sami($iterator, array(     'title'                => 'PHP-FFMpeg API',     'theme'                => 'enhanced',     'build_dir'            => __DIR__.'/docs/source/API/API',     'cache_dir'            => __DIR__.'/docs/source/API/API/cache',     'default_opened_level' => 2, ));包装为在流通过程中保护产品,方便储运,促进销售,按一定的技术方法所用的容器、材料和辅助物等的总体名称;也指为达到上述目的在采用容器,材料和辅助物的过程中施加一定技术方法等的操作活动。承装没有进入流通领域物品的用品不能称之为包装,只能称为“包裹”、“箱子”、“盒子”、”容器“等。因为包装除了有包裹盒承装的功能外,对物品进行修饰,获得受众的青睐才是包装的重要作用。

    其它类库15972017-12-18
  • <?php namespace Herrera\FileLocator\Tests; use Herrera\FileLocator\Collection; use Herrera\FileLocator\Locator\FileSystemLocator; use PHPUnit_Framework_TestCase as TestCase; use ReflectionProperty; class CollectionTest extends TestCase {     /**      * @var Collection      */     private $collection;     public function testAdd()     {         $locator = new FileSystemLocator(null);         $this->collection->add($locator);         $p = new ReflectionProperty($this->collection, 'locators');         $p->setAccessible(true);         $this->assertTrue(             $p->getValue($this->collection)               ->contains($locator)         );         return array($this->collection, $locator);     }已有的移动通信系统中移动定位服务主要用于紧急救援,如紧急救护,紧急呼叫场景下对用户的定位;基于位置的信息服务,如车载GPS的应用、黄页、交通信息、天气信息、导航信息和导游服务等;基于位置触发的服务,如基于位置的管理信息和计费等;跟踪及资产管理服务,如车辆调度/跟踪/监控/防盗、物资跟踪和老人儿童监护服务等。LTE系统为了提供位置业务,引入了定位特性。对定位特性的主要需求是同时支持控制面定位过程和用户面定位过程。控制面的定位主要是指通过控制信令来进行定位相关的信息的传输;用户面的定位是指对OMA SUPL(Open Mobile Alliance Secure User Plane Location)协议的支持,即定位相关信息可以通过OMA SUPL协议进行传输,在无线接口看其是用户数据,不是控制信令。定位方式分为支持基于网络(Network-based、E-SMLC-based)的定位方式和基于UE(UE-based)的定位方式。基于网络的定位方式是指UE的位置计算是在E-SMLC中进行;基于UE的定位方式是指UE的位置计算是在UE内进行。

    其它类库84922017-12-18
  • string mime_content_type ( string $filename ) Returns the MIME content type for a file as determined by using information from the magic.mime file.   <?php $mime_type = mime_content_type('1.jpg'); echo $mime_type; // image/jpeg ?>使用fileinfo需要安装php_fileinfo扩展。如已安装可以在extension_dir目录下找到php_fileinfo.dll(windows),fileinfo.so(linux)打开php.ini,把extension=php_fileinfo.dll前的";"去掉,然后重启apache。使用exif_imagetype方法需要安装php_exif扩展,并需要安装php_mbstring扩展如已安装可以在extension_dir目录下找到php_exif.dll(windows),exif.so(linux)打开php.ini,把 extension=php_mbstring.dll, extension=php_exif.dll 前的","去掉,然后重启apache以上就是masterMIME检测的PHP库,需要的朋友可以直接下载使用。   

    其它类库11612017-12-18
  • <?php namespace Lurker\Tests; use Lurker\ResourceWatcher; use Lurker\Resource\TrackedResource; use Lurker\Event\FilesystemEvent; use Lurker\Resource\FileResource; use Lurker\Resource\DirectoryResource; class ResourceWatcherTest extends \PHPUnit_Framework_TestCase {     private $tracker;     private $dispatcher;     protected function setUp()     {         $this->tracker = $this             ->getMockBuilder('Lurker\Tracker\TrackerInterface')             ->getMock();         $this->dispatcher = $this             ->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')             ->getMock();     }每个文件或文件夹都贴有一个RFID资源标签,这个标签包含独一无二的ID和可读信息。当文件被放入带有RFID功能的借出/归还托盘中时,表示文件夹的独一无二的ID就会被采集到并被发送至数据库,同时文件清单在任何时候都会被保留。RFID手持终端可帮助用户快速找到特定文件并且在需要时进行库存盘点。在查找过程中,一旦在特定位置的文件被定位,就会触发可闻可视报警。另一方面,有了具备WiFi 功能的移动装置,所有采集到的库存盘点数据都被同步发送至文件追踪系统的中央数据库用于验证目的。这就是资源跟踪库。

    其它类库17602017-12-18