The pseudo data generator generates a large amount of data according to certain data rules and supports teradata data import and oracle data import. Software function: Import a large amount of data into the database in order to test the performance of the software under large amounts of data. <?php namespace Samsui\Generator;
use \Samsui\Provider\ProviderInterface;
class Generator implements GeneratorInterface
{
protected $providers = array();
protected static $instance;
/**
* @param string $name
*/
public function registerProvider($name, ProviderInterface $provider)
{
$this->providers[$name] = $provider;
}
public function __get($name)
{
if (isset($this->providers[$name])) {
return $this->providers[$name];
}
}
Database operation class55642017-12-19
<?php
/**
* Simple autoloader that follow the PHP Standards Recommendation #0 (PSR-0)
* @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md for more informations.
*
* Code inspired from the SplClassLoader RFC
* @see https://wiki.php.net/rfc/splclassloader#example_implementation
*/
spl_autoload_register(function ($className) {
$className = ltrim($className, '\');
$fileName = '';
if ($lastNsPos = strripos($className, '\')) {
$namespace = substr($className, 0, $lastNsPos);
$className = substr($className, $lastNsPos + 1);
$fileName = str_replace('\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
}
$fileName = __DIR__ . DIRECTORY_SEPARATOR . $fileName . $className . '.php';
if (file_exists($fileName)) {
require $fileName;
return true;
}
return false;
});Faker is a tool developed in python language. It can generate Python packages for fake data for us. Sometimes we need to generate a large amount of fake data that looks normal. At this time, we can use Faker to achieve these purposes. Faker can be used directly in the console window or by calling the API (Application Function Interface). It can generate data like: Fake NameFake Residential Address and Email AddressFake InternationalFake Credit Card NumberFake DateFake Internet Access addressFake IP addressFake verification passwordWe can use Faker to generate any information we want, it can randomly generate all data according to our requirements. Faker now supports many languages, including Indian, Italian, French, Bulgarian, Dutch, etc.
Database operation class60692017-12-19
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 is the world's number one web server software. It can run on almost all widely used computer platforms and is one of the most popular web server-side software due to its cross-platform and security features. It is fast, reliable and can be extended through a simple API to compile interpreters such as Perl/Python into the server. This is dflydev parsing Apache's PHP library.
Database operation class50152017-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, sometimes also called character-separated values, because the separator character may not be a comma), its file stores tabular data (numbers and text) in plain text. Plain text means that the file is a sequence of characters and contains no data that must be interpreted like a binary number. A CSV file consists of any number of records, separated by some kind of newline character; each record consists of fields, and the separators between fields are other characters or strings, most commonly commas or tabs. Typically, all records have exactly the same sequence of fields. Usually these are plain text files. It is recommended to use WORDPAD or Notepad (NOTE) to open it, and then save a new file first and then open it with EXCEL, which is also one of the methods. A universal standard for the CSV file format does not exist, but there is a basic description in RFC 4180. The character encoding used is also not specified, but 7-bit ASCII is the most basic universal encoding.
Database operation class50772017-12-18
A CSV data manipulation library
Database operation class54302017-12-06
PHP implements MySQL database operation class
Database operation class151882017-11-24
mysql database operation class in php
Database operation class68962017-11-14
PHP database operation encapsulation class
Database operation class73692017-11-01
A complete Mysql class, This is a relatively complete MySQL operation class, including data query, update, delete, and other operations
Database operation class95572017-10-27
Share an object-oriented PHP operation mssql class to help friends better learn Microsoftmssql database operations. Friends in need can download it for reference.
Database operation class82012017-07-21
Share a PHP-encapsulated mongodb operation class. Friends in need can download it for reference.
Database operation class58752017-07-20
PHP database operation encapsulation class free download
Database operation class66682017-07-11