Home > Download >  Library download

  • <?php /**  * Upload  *  * @author      Josh Lockhart <info@joshlockhart.com>  * @copyright   2012 Josh Lockhart  * @link        http://www.joshlockhart.com  * @version     2.0.0  *  * MIT LICENSE  *  * Permission is hereby granted, free of charge, to any person obtaining  * a copy of this software and associated documentation files (the  * "Software"), to deal in the Software without restriction, including  * without limitation the rights to use, copy, modify, merge, publish,  * distribute, sublicense, and/or sell copies of the Software, and to  * permit persons to whom the Software is furnished to do so, subject to  * the following conditions:  *  * The above copyright notice and this permission notice shall be  * included in all copies or substantial portions of the Software.  *  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */ namespace Upload; /**  * FileInfo Interface  *  * @author  Josh Lockhart <info@joshlockhart.com>  * @since   2.0.0  * @package Upload  */ interface FileInfoInterface {     public function getPathname();     public function getName();     public function setName($name);     public function getExtension();     public function setExtension($extension);     public function getNameWithExtension();     public function getMimetype();     public function getSize();     public function getMd5();     public function getDimensions();     public function isUploadedFile(); } File Upload is a very powerful file upload processing plug-in that supports multiple file uploads, drag-and-drop uploads, progress bars, file verification, image audio and video preview, cross-domain uploads, etc. It can be said that it has all the functions you can think of. It also has functions you didn’t expect. . However, because the function is so powerful, you still need some basic skills to use it, otherwise you will encounter difficulties in debugging and development.

    Other libraries62172017-12-21
  • <?php if(php_sapi_name() !== "cli") { echo "<p>Run this php script from the command line to see CLI syntax highlighting and formatting.  It support Unix pipes or command line argument style.</p>"; echo "<pre><code>php examples/cli.php \"SELECT * FROM MyTable WHERE (id>5 AND \`name\` LIKE \&quot;testing\&quot;);\"</code></pre>"; echo "<pre><code>echo \"SELECT * FROM MyTable WHERE (id>5 AND \`name\` LIKE \&quot;testing\&quot;);\" | php examples/cli.php</code></pre>"; } if(isset($argv[1])) { $sql = $argv[1]; } else { $sql = stream_get_contents(fopen("php://stdin", "r")); } require_once(__DIR__.'/../lib/SqlFormatter.php'); echo SqlFormatter::format($sql);SQL is Structured Query Language (Structured Query Language), which is a special-purpose programming language. It is a database query and programming language used to access data and query, update and manage relational database systems; It is also the extension of the database script file. There are many types and quantities of SQL statements, and many statements are often used. SQL query statements are a typical example. Whether it is an advanced query or a low-level query, the demand for SQL query statements is the most frequent.

    Other libraries23242017-12-21
  • <?php namespace PhpUnitsOfMeasure; /**  * Physical quantities with this trait  * have units which are metric and therefore have  * a standard set of prefixes.  */ trait HasSIUnitsTrait {     protected static function addMissingSIPrefixedUnits(         UnitOfMeasure $siUnit,         $toBaseSiUnitFactor,         $namePattern,         array $aliasPatterns = []     ) {         /**          * The standard set of SI prefixes          */         $siPrefixes = [             [                 'abbr_prefix' => 'Y',                 'long_prefix' => 'yotta',                 'factor'      => 1e24             ],             [Measurement is to use data to describe observed phenomena according to certain rules, that is, to make a quantitative description of things. Measurement is the quantification process of non-quantified physical objects. In mechanical engineering, measurement refers to the experimental understanding process of numerically comparing a measured quantity with a standard quantity with a unit of measurement to determine the ratio between the two.

    Other libraries16462017-12-21
  • <?php ini_set('display_errors', 1); error_reporting(E_ALL ^ E_NOTICE); use Crisu83\Conversion\Quantity\DigitalInformation\DigitalInformation; use Crisu83\Conversion\Quantity\Length\Length; use Crisu83\Conversion\NumberBase\NumberBase; use Crisu83\Conversion\Size\HatSize\HatSize; use Crisu83\Conversion\Size\ShoeSize\ChildShoeSize; use Crisu83\Conversion\Quantity\Length\Unit as LengthUnit; use Crisu83\Conversion\Quantity\DigitalInformation\Unit as DIUnit; use Crisu83\Conversion\Size\HatSize\System as HatSizeSystem; use Crisu83\Conversion\Size\ShoeSize\System as ShoeSizeSystem; require(dirname(__DIR__) . '/vendor/autoload.php'); $length = new Length(1, LengthUnit::METRE); echo $length . '<br>'; echo $length->add(1, LengthUnit::FOOT) . '<br>'; echo $length->add(5)->sub(2, LengthUnit::FOOT) . '<br>'; echo $length->to(LengthUnit::YARD) . '<br>'; echo '<br>';Measurement is to use data to describe observed phenomena according to certain rules, that is, to make a quantitative description of things. Measurement is the quantification process of non-quantified physical objects. In mechanical engineering, measurement refers to the experimental understanding process of numerically comparing a measured quantity with a standard quantity with a unit of measurement to determine the ratio between the two.

    Other libraries15982017-12-21
  • <?php require_once(__DIR__ . '/../vendor/autoload.php'); // Let's consider some really basic examples. echo '<pre>'; // Adding up elements in an array. But wait! First we need an array... // Let's get a random sample of 50 values, in the range 0, 100. $random = NumbersPHP\Statistic::randomSample(0, 100, 50); echo 'Random = {' . implode(', ', $random) . "}\n"; // Add them up... $sum = NumbersPHP\Basic::sum($random); echo 'Sum of Random = ' . $sum . "\n"; // We can do some other cool stuff as well. Like find the GCD between // two integers. $gcd = NumbersPHP\Basic::gcd(100, 10); echo 'GCD amongst 100 and 10 = ' . $gcd; echo '</pre>';If you need to process a lot of digital data, then you can definitely use this library.

    Other libraries16142017-12-21
  • <?php if( file_exists(dirname(__FILE__).'/nicejson/nicejson.php') ) { include_once dirname(__FILE__).'/nicejson/nicejson.php'; } require_once dirname(__FILE__).'/../Mobile_Detect.php'; $detect = new Mobile_Detect; $json = array( // The current version of Mobile Detect class that // is being exported. 'version' => $detect->getScriptVersion(), // All headers that trigger 'isMobile' to be 'true', // before reaching the User-Agent match detection. 'headerMatch' => $detect->getMobileHeaders(), // All possible User-Agent headers. 'uaHttpHeaders' => $detect->getUaHttpHeaders(), // All the regexes that trigger 'isMobile' or 'isTablet' // to be true. 'uaMatch' => array( // If match is found, triggers 'isMobile' to be true. 'phones'   => $detect->getPhoneDevices(), // Triggers 'isTablet' to be true. 'tablets'  => $detect->getTabletDevices(), // If match is found, triggers 'isMobile' to be true. 'browsers' => $detect->getBrowsers(), // If match is found, triggers 'isMobile' to be true. 'os'       => $detect->getOperatingSystems(), // Various utilities. To be further discussed. 'utilities' => $detect->getUtilities() ) );Strings are mainly used for programming. See the text for concept explanations, function explanations, and usage details. Here is an additional point: strings are similar to character arrays in storage, so each of its individual elements can be extracted. For example, s="abcdefghij", then s[1]="a", s[10]="j", and the zero position of the string is its length, such as s[0]=10 (※ The above function Ansistring No.), which can provide us with a lot of convenience. For example, each bit can be converted into a number and stored in an array during high-precision operations.

    Other libraries15902017-12-21
  • <?php use \mageekguy\atoum; define('COVERAGE_TITLE', 'MetaYaml'); define('COVERAGE_DIRECTORY', './web/coverage'); define('COVERAGE_WEB_PATH', 'http://localhost/meta-yaml/coverage'); if(false === is_dir(COVERAGE_DIRECTORY)) {     mkdir(COVERAGE_DIRECTORY, 0777, true); } $script->addTestAllDirectory(__DIR__ . '/test'); $stdOutWriter = new atoum\writers\std\out(); $coverageField = new atoum\report\fields\runner\coverage\html(COVERAGE_TITLE, COVERAGE_DIRECTORY); $coverageField->setRootUrl(COVERAGE_WEB_PATH); $cliReport = new atoum\reports\realtime\cli(); $cliReport     ->addWriter($stdOutWriter)     ->addField($coverageField, array(atoum\runner::runStop)) ; $runner->setBootstrapFile('test/bootstrap.php'); $runner->addReport($cliReport);AML is the foreign language abbreviation of "Another Markup Language"; but in order to emphasize that this language is data-centered rather than focusing on markup language, it was renamed with a back-to-basics word. It is an intuitive data serialization format that can be recognized by computers. It is a programming language that is highly readable and easy to be read by humans. It is easy to interact with script languages ​​and is used to express data sequences. It is a data description language similar to XML, a subset of Standard Universal Markup Language, and its syntax is much simpler than XML.

    Other libraries15582017-12-21
  • <?php error_reporting(E_ALL | E_STRICT); // Ensure that composer has installed all dependencies if (!file_exists(dirname(__DIR__) . DIRECTORY_SEPARATOR . '/vendor/autoload.php')) {     die("Dependencies must be installed using composer:\n\nphp composer.phar install --dev\n\n"         . "See http://getcomposer.org for help with installing composer\n"); } // Include the Composer autoloader $loader = include realpath(dirname(__FILE__) . '/../vendor/autoload.php');I saw someone mention such a requirement online, convert the hexadecimal number '00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fcc f695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e82047b97ddef52741d546b8e289dc6935b3ece0462 db0a22b8e7' is converted into decimal. If you use the normal hexdec() method to solve such a large number, the result will be 1.5779475026713E 308. The data suffers from severe loss of accuracy. Therefore, our math-master PHP library for processing large numbers will be used. Friends in need can download and use it.

    Other libraries20292017-12-21
  • <?php namespace libphonenumber; /**  * Class AsYouTypeFormatter  * A formatter which formats phone numbers as they are entered.  *  * An AsYouTypeFormatter instance can be created by invoking PhoneNumberUtil::getAsYouTypeFormatter().  * After that, digits can be added by invoking inputDigit() on the formatter instance, and the partially  * formatted phone number will be returned each time a digit is added. clear() can be invokved before  * formatting a new number.  */ class AsYouTypeFormatter {     /**      * @var string      */     private $currentOutput;     /**      * @var string      */     private $formattingTemplate;     /**      * The pattern from numberFormat that is currently used to create formattingTemplate.      * @var string      */     private $currentFormattingPattern;     /**      * @var string      */     private $accruedInput;This library can process the database of phone numbers.

    Other libraries21882017-12-21
  • <?php namespace Hashids; class Hashids implements HashidsInterface {     const SEP_DIV = 3.5;     const GUARD_DIV = 12;     /**      * The alphabet string.      *      * @var string      */     protected $alphabet;     /**      * The seps string.      *      * @var string      */     protected $seps = 'cfhistuCFHISTU';     /**      * The guards string.      *      * @var string      */     protected $guards;This library is an encryption library that allows integers to generate unique strings. It can hide user IDs and other purposes.

    Other libraries21492017-12-21
  • <?php namespace Nocarrier; class Hal {     protected $uri;     protected $data;      protected $resources = array();     protected $links = null;     protected $arrayLinkRels = array();     protected $arrayResourceRels = array();     protected $shouldStripAttributes = true;The structure of the HAL library abstracts each peripheral into a structure called ppp_HandleTypeDef, where ppp is the name of each peripheral. All functions work under the ppp_HandleTypeDef pointer. ## # 1. Multi-instance support: Each peripheral/module instance has its own handle. Therefore, instance resources are independent 2. Peripheral processes communicate with each other: This handle is used to manage shared data resources between process routines.

    Other libraries11002017-12-21
  • <?php require 'vendor/autoload.php'; use Filterus\Filter; $filter = Filter::map(array('foo' => 'string,min:4,default:test')); $tmp = array('foo' => 'bar'); var_dump(Filter::factory($filter)->filter($tmp)); //var_dump(Filter::factory($argv[1])->validate($argv[2]));PHP filters are used to validate and filter data from non-secure sources, such as user input. What are PHP filters? PHP filters are used to validate and filter data from non-secure sources. Validating and filtering user input or custom data is an important part of any web application. The PHP filter extension is designed to make data filtering easier and faster. Why use filters? Nearly all web applications rely on external input. This data usually comes from users or other applications (such as web services). By using filters, you can ensure that your application gets the correct input type. You should always filter external data!

    Other libraries14362017-12-21