首頁 > 下載 >  類別庫下載

  • <?php namespace Intervention\Image; use GuzzleHttp\Psr7\Stream; use Psr\Http\Message\StreamInterface; abstract class AbstractDecoder {     abstract public function initFromPath($path); turn \Intervention\Image\Image     abstract public function initFromBinary($data);     abstract public function initFromGdResource($resource);     abstract public function initFromImagick(\Imagick $object);     private $data;     public function __construct($data = null)     {         $this->data = $data;     }return \Intervention\Image\Image     public function initFromUrl($url)     {                  $options = [             'http' => [                 'method'=>"GET",                 'header'=>"Accept-language: en\r\n".                 "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2\r\n"           ]         ];影像處理,以電腦對影像進行分析,以達到所需結果的技術。又稱影像處理。影像處理一般指數位影像處理。數位影像是指用工業相機、攝影機、掃描器等設備經過拍攝得到的一個大的二維數組,該數組的元素稱為像素,其值稱為灰階值。影像處理技術一般包括影像壓縮,增強和復原,匹配、描述和識別3個部分。

    圖片類別庫61962017-12-18
  • <?php use PHPImageWorkshop\ImageWorkshop as ImageWorkshop; require_once(__DIR__.'/autoload.php'); class ImageWorkshopTest extends \PHPUnit_Framework_TestCase {      const IMAGE_SAMPLE_PATH = '/Resources/images/sample1.jpg';     const FONT_SAMPLE_PATH  = '/Resources/fonts/arial.ttf';     const WEB_PATH          = 'http://localhost:8000';       public function testInitFromPath()     {           $layer = ImageWorkshop::initFromPath(__DIR__.static::IMAGE_SAMPLE_PATH);                  $this->assertTrue(is_object($layer) === true, 'Expect $layer to be an object');         $this->assertTrue(get_class($layer) === 'PHPImageWorkshop\Core\ImageWorkshopLayer', 'Expect $layer to be an ImageWorkshopLayer object');         $layer = ImageWorkshop::initFromPath('file://'.__DIR__.static::IMAGE_SAMPLE_PATH);         $this->assertTrue(is_object($layer) === true, 'Expect $layer to be an object');         $this->assertTrue(get_class($layer) === 'PHPImageWorkshop\Core\ImageWorkshopLayer', 'Expect $layer to be an ImageWorkshopLayer object');影像處理,以電腦對影像進行分析,以達到所需結果的技術。又稱影像處理。影像處理一般指數位影像處理。數位影像是指用工業相機、攝影機、掃描器等設備經過拍攝得到的一個大的二維數組,該數組的元素稱為像素,其值稱為灰階值。影像處理技術一般包括影像壓縮,增強和復原,匹配、描述和識別3個部分。

    圖片類別庫54462017-12-18
  • <?php require '../vendor/autoload.php'; $image = new \NMC\ImageWithText\Image(dirname(__FILE__) . '/source.jpg'); // Add another styled text to image $text2 = new \NMC\ImageWithText\Text('No, really, thanks!', 1, 30); $text2->align = 'left'; $text2->color = '000000'; $text2->font = dirname(__FILE__) . '/Ubuntu-Medium.ttf'; $text2->lineHeight = 20; $text2->size = 14; $text2->startX = 40; $text2->startY = 140; $image->addText($text2); $image->render(dirname(__FILE__) . '/destination.jpg');在嵌入式系統中使用的文字系統稱為嵌入式文字。由三個部分組成:與嵌入式文字管理相關的軟體、被管理的嵌入式文字以及實施嵌入式文字管理所需的資料結構。其中嵌入式文字是嵌入式文字系統的核心,它是使用者資料資訊的存放形式,藉此實現嵌入式系統的功能。

    圖片類別庫47982017-12-18
  • <?php namespace League\Flysystem; interface AdapterInterface extends ReadInterface {     const VISIBILITY_PUBLIC = 'public';     const VISIBILITY_PRIVATE = 'private';     public function write($path, $contents, Config $config);     public function writeStream($path, $resource, Config $config);     public function update($path, $contents, Config $config);     public function updateStream($path, $resource, Config $config);     /**      * Rename a file.      *      * @param string $path      * @param string $newpath      *      * @return bool      */     public function rename($path, $newpath);system.ini這個段落中定義了有關WINDOWS系統所需的模組,相關的鍵盤、滑鼠、顯示卡、多媒體的驅動程式、標準字體、和shell程序,這裡定義的程式在啟動WINDOWS時都要被加載,因此是不可缺少的,也是不能隨便更改的,否則有些設備不能使用或根本就進不了WINDOWS。以上就是flysystem檔案流的抽象PHP庫

    其它類別庫17112017-12-18
  • <?php namespace Versionable\Ferret; use Versionable\Ferret\FerretInterface; use Versionable\Ferret\Detector\DetectorInterface; class Ferret implements FerretInterface {   protected $detector = null;   public function getDetector()   {     return $this->detector;   }   public function setDetector(DetectorInterface $detector)   {     $this->detector = $detector     return true;   }FerretNOAA/PMEL/ TMAP (National Oceanic and Atmospheric Administration/ Pacific Marine Environment Laboratory/the Thermal Modeling and Analysis Project,熱模擬和分析專案組)發展的一個互動式電腦視覺化和資料分析系統。設計用來滿足海洋學家和氣象學家處理和分析數據及繪圖的需,這就是一個FerretMIME檢測PHP庫。

    其它類別庫12192017-12-18
  • <?php namespace League\ColorExtractor\Test; use League\ColorExtractor\Color; use League\ColorExtractor\ColorExtractor; use League\ColorExtractor\Palette; class PaletteTest extends \PHPUnit_Framework_TestCase {     protected $jpegPath = './tests/assets/test.jpeg';     protected $gifPath = './tests/assets/test.gif';     protected $pngPath = './tests/assets/test.png';     protected $transparentPngPath = './tests/assets/red-transparent-50.png';     public function testJpegExtractSingleColor()     {         $extractor = new ColorExtractor(Palette::fromFilename($this->jpegPath));         $colors = $extractor->extract(1);         $this->assertInternalType('array', $colors);         $this->assertCount(1, $colors);         $this->assertEquals(15985688, $colors[0]);     }     public function testGifExtractSingleColor()     {         $extractor = new ColorExtractor(Palette::fromFilename($this->gifPath));         $colors = $extractor->extract(1);         $this->assertInternalType('array', $colors);         $this->assertCount(1, $colors);         $this->assertEquals(12022491, $colors[0]);     }本庫的13個特點       1.色彩抓取讓你挑,即時用相機偵測和辨識顏色。   2.應用程式是專為圖形設計人員和顏色百葉窗。   3.顏色名稱,色調,RGB和HSV的表示法。   (沒有點選捕捉為必填項)即時色彩診斷。   4.設定拍攝的顏色堅固的桌布。   5.智能色彩穩定。   6.智慧自動對焦。   7.相機手電筒,接通/關斷。   8.支援所有手機的相機(前後)。   9.即時顏色的挑選與保存。   10.色彩,顏色名稱,RGB十六進制,RGB十進制和HSV表示。   11.截至1300年顏色及16種基本顏色分類。   12.即時分享和匯出捕獲的顏色。   13.嵌入式幫助。

    其它類別庫31952017-12-18
  • <?php error_reporting(-1); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); date_default_timezone_set('Europe/Brussels'); if (!is_file($autoloadFile = __DIR__ . '/../vendor/autoload.php')) {     echo 'Could not find "vendor/autoload.php". Did you forget to run "composer install --dev"?' . PHP_EOL;     exit(1); } $autoloader = require $autoloadFile; define('PHPEXIF_TEST_ROOT', __DIR__);Exif是一種影像檔案格式,它的資料儲存與JPEG格式是完全相同的。實際上Exif格式就是在JPEG格式頭部插入了數位照片的訊息,包括拍攝時的光圈、快門、白平衡、ISO、焦距、日期時間等各種和拍攝條件以及相機品牌、型號、色彩編碼、拍攝時錄製的聲音以及GPS全球定位系統資料、縮圖等。你可以利用任何可以查看JPEG檔案的看圖軟體瀏覽Exif格式的照片,但並不是所有的圖形程式都能處理Exif資訊。 這就是一個Exif的資訊讀取的PHP函式庫。

    其它類別庫13892017-12-18
  • require_once __DIR__.'/../vendor/autoload.php'; if (!class_exists('Twig_Environment')) {     echo 'You must set up the project dev dependencies, run the following commands:'.PHP_EOL.         'php composer.phar install --dev'.PHP_EOL;     exit(1); } $repository = new Dflydev\ApacheMimeTypes\FlatRepository; $typeToExtensions = $repository->dumpTypeToExtensions(); $extensionToType = $repository->dumpExtensionToType(); file_put_contents(__DIR__.'/../src/Dflydev/ApacheMimeTypes/Resources/mime.types.json', json_encode($typeToExtensions)); $twig = new Twig_Environment(     new Twig_Loader_Filesystem(__DIR__.'/../resources'),     array(         'autoescape'  => false,         'auto_reload' => true,     ) );Apache是​​世界使用排名第一的Web伺服器軟體。它可以運行在幾乎所有廣泛使用的電腦平台上,由於其跨平台和安全性被廣泛使用,是最受歡迎的Web伺服器端軟體之一。它快速、可靠且可透過簡單的API擴充,將Perl/Python等解譯器編譯到伺服器中。這就是dflydev解析Apache的PHP函式庫。

    資料庫操作類51672017-12-18
  • <?php require __DIR__.'/src/functions_include.php'; spl_autoload_register(function ($class) {     $prefix = 'League\Csv\';     if (0 !== strpos($class, $prefix)) {         return;     }     $file = __DIR__.'/src/'.str_replace('\', '/', substr($class, strlen($prefix))).'.php';     if (!is_readable($file)) {         return;     }     require $file; });逗號分隔值(Comma-Separated Values,CSV,有時也稱為字元分隔值,因為分隔字元也可以不是逗號),其檔案以純文字形式儲存表格資料(數字和文字)。純文字意味著該檔案是一個字元序列,不含必須像二進位數字那樣被解讀的資料。 CSV檔案由任意數目的記錄組成,記錄間以某種換行符分隔;每筆記錄由欄位組成,欄位間的分隔符號是其它字元或字串,最常見的是逗號或製表符。通常,所有記錄都有完全相同的字段序列。通常都是純文字檔。建議使用WORDPAD或是記事本(NOTE)來開啟,再則先另存新檔後用EXCEL開啟,也是方法之一。 CSV檔案格式的通用標準並不存在,但在RFC 4180中有基礎性的描述。使用的字元編碼同樣沒有被指定,但是7-bitASCII是最基本的通用編碼。

    資料庫操作類52242017-12-18
  • <?php namespace Dflydev\Canal\Analyzer; use Dflydev\Canal\Detector\DefaultDetectorFactory; use Dflydev\Canal\Detector\DetectorInterface; use Dflydev\Canal\InternetMediaType\DefaultInternetMediaTypeParserFactory; use Dflydev\Canal\InternetMediaType\InternetMediaTypeParserInterface; use Dflydev\Canal\Metadata\Metadata; class Analyzer {     private $detector;     private $internetMediaTypeParser;     public function __construct(DetectorInterface $detector = null)     {         if (null === $detector) {             $detector = DefaultDetectorFactory::create();         }         $this->detector = $detector;         $this->internetMediaTypeParser = DefaultInternetMediaTypeParserFactory::create();     }     public function setDetector(DetectorInterface $detector)     {         $this->detector = $detector;         return $this;     }“互聯網媒體”又稱“網絡媒體”,就是藉助國際互聯網這個信息傳播平台,以電腦、電視機以及移動電話等為終端,以文字、聲音、圖像等形式來傳播新聞信息的一種數位化、多媒體的傳播媒介。網路媒體相對於早已誕生的報紙、廣播、電視等媒體而言,又是「第四媒體」。從嚴格意義上來說,網路媒體是指國際網路被人們所利用的進行新聞資訊傳播的那部分傳播工具表現。網路媒體的多元性特徵,首先表現傳播主體上,在網路媒體世界,不是專門的新聞傳播機構一家獨有,從網路屬性上講,政府、企事業網站乃至個人網站都有能力可以發布新聞,成為傳播新聞的主體。其次,網路媒體的全球化特徵,決定其文化的多元性,它透過超鏈接,超文本的手段,運用數位技術,將全球文化用網路的方式聯結在一起。第三,網路媒體的傳播方式也具有多元性的特質。傳播媒體的傳播方式一般是點對面的傳播,而互聯網媒體除了點對多即網站向網民、某一網民向不特定的其他網民發布信息這一方式之外,還有點對點即網民透過網絡向其他某個網友發電子郵件的方式,眾多網友向某一個網站發送訊息、回饋意見的多對點方式,以及網路聊天室、電子公告牌等多對多的傳播方式。 基於對互聯網媒體概念的界定,鑑於“國際互聯網”、“因特網”和“網絡媒體”等不同稱謂之間實質上存在著一定的差別,我們主張分語境使用,在計算機與資訊科學領域上及社會日常生活中,可使用「因特網」;而在新聞資訊傳播領域,則以使用「網路媒體」為宜,也可稱為「網路媒體」。

    其它類別庫19892017-12-16
  • $mailServer="imap.exmail.qq.com"; //IMAP主机 $mailLink="{{$mailServer}:143}INBOX" ; //imagp连接地址:不同主机地址不同 $mailUser = '***'; //邮箱用户名 $mailPass = '***'; //邮箱密码 $mbox = imap_open($mailLink,$mailUser,$mailPass); //开启信箱imap_open $totalrows = imap_num_msg($mbox); //取得信件数 for ($i=1;$i<$totalrows;$i++){   $headers = imap_fetchheader($mbox, $i); //获取信件标头   $headArr = matchMailHead($headers); //匹配信件标头   $mailBody = imap_fetchbody($mbox, $i, 1); //获取信件正文 } function matchMailHead($str){   $headList = array();   $headArr = array(     'from',     'to',     'date',     'subject'   );   foreach ($headArr as $key){     if(preg_match('/'.$key.':(.*?)[\n\r]/is', $str,$m)){       $match = trim($m[1]);       $headList[$key] = $key=='date'?date('Y-m-d H:i:s',strtotime($match)):$match;     }   }   return $headList; }Fetch-masterIMAP的PHP函式庫是PHP基於IMAP收取郵件的方法,並且分析了PHP基於IMAP接收郵件的相關設定與使用技巧,並附帶了IMAP相關函數說明。

    其它類別庫10672017-12-16
  • <?php use Gaufrette\Filesystem; use Gaufrette\Adapter\Ftp as FtpAdapter; use Gaufrette\Adapter\Local as LocalAdapter; use Gaufrette\Adapter\Cache as CacheAdapter; // Locale Cache-Directory (e.g. '%kernel.root_dir%/cache/%kernel.environment%/filesystem') with create = true $local = new LocalAdapter($cacheDirectory, true); // FTP Adapter with a defined root-path $ftp = new FtpAdapter($path, $host, $username, $password, $port); // Cached Adapter with 3600 seconds time to live $cachedFtp = new CacheAdapter($ftp, $local, 3600); $filesystem = new Filesystem($cachedFtp);Gaufrette 提供了一個檔案系統的抽象層的PHP5函式庫。它使得以相同方式操控本地文件,FTP伺服器,亞馬遜 S3等等。它允許你開發程式時,不用了解未來你將怎麼存取你的文件。

    其它類別庫9242017-12-16