blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
5763e7c634b149c7e658e35e3bc618ef920c0c7a | PHP | rigocaniz/prisys | /class/catalogo.php | UTF-8 | 1,480 | 2.953125 | 3 | [] | no_license | <?php
/**
* Catalogo
*/
class Catalogo
{
public function catArea()
{
global $conexion;
$respuesta = array();
$sql = "SELECT idArea, area FROM area WHERE idArea <= 3 ";
$result = $conexion->query( $sql );
while ( $row = $result->fetch_object() ) {
$respuesta[] = $row;
}
return $respuesta;
}
pub... | true |
f75687fe49054786a6e3d448037bec2c3757ae68 | PHP | Sila-Money/sila-sdk-php | /lib/Domain/VirtualAccountMessage.php | UTF-8 | 1,884 | 2.828125 | 3 | [] | no_license | <?php
/**
* Link Account Message
* PHP version 7.2
*/
namespace Silamoney\Client\Domain;
use JMS\Serializer\Annotation\Type;
use Respect\Validation\Validator as v;
/**
* Link Account Message
* Object sent in the link account method.
* @category Class
* @package Silamoney\Client
* @author José Morales <jm... | true |
e4236f70e258dc2278c895b8fad943ae7940f3e5 | PHP | samuelt37/python-projects | /search_engine/getData.php | UTF-8 | 564 | 2.59375 | 3 | [] | no_license |
<?php
if(isset($_POST['term'])){
$term = $_POST['term'];
}
$string = file_get_contents("WEBPAGES_CLEAN/bookkeeping.json");
$jobj = json_decode($string, true);
$links = "";
$conn = new mysqli("127.0.0.1", "root", "", "termindex");
$sql = "select docid from termindex where term = '".$term."' order by weight d... | true |
ce58b5ffadd7742974d37a0f3d1b8623e1ace8fa | PHP | zhouweiaccp/php5start | /07/code7_13.php | GB18030 | 672 | 2.921875 | 3 | [] | no_license | <?php
set_time_limit(0); //Ϊ˱ӳʱ趨
//Գʱδ
$remote_url = "http://www.taodoor.com";
//Զļ
$handdle = fopen($remote_url . "/news.html", "r");
if($handdle)
{
$data = '';
//ȡļ
while(!feof($handdle))
{
$data .= fgets($handdle, 1024);
}
//ʹʽҳӵַ
preg_match_all('/<a\s+href="?([^>"]+)"?\s*[^>]*>([^>... | true |
eb1fb58bd20c33ca6ad56b22d462f3de6e147cc6 | PHP | owenliang/kiss | /be/common/service/AdminService.php | UTF-8 | 554 | 2.515625 | 3 | [] | no_license | <?php
namespace common\service;
use common\models\Admin;
class AdminService
{
public static function validateLogin($username, $password) {
$admin = Admin::findAdmin($username);
if (empty($admin)) {
return false;
}
$sha1Password = sha1($password, false);
if ($sha... | true |
586f52a725332111d92038f4346ab7e9d814cf6d | PHP | swornim00/irestful | /src/iRESTful/Rodson/ClassesControllers/Infrastructure/Adapters/ConcreteControllerAdapterAdapter.php | UTF-8 | 1,641 | 2.640625 | 3 | [] | no_license | <?php
namespace iRESTful\Rodson\ClassesControllers\Infrastructure\Adapters;
use iRESTful\Rodson\ClassesControllers\Domain\Adapters\Adapters\ControllerAdapterAdapter;
use iRESTful\Rodson\Instructions\Domain\Adapters\Adapters\InstructionAdapterAdapter;
use iRESTful\Rodson\Classes\Domain\CustomMethods\Adapters\CustomMetho... | true |
136445d52de6aa72a905c939c05bca0631cf3644 | PHP | bretrzaun/settings | /src/Value/SimpleValue.php | UTF-8 | 958 | 3.078125 | 3 | [] | no_license | <?php
namespace BretRZaun\Settings\Value;
class SimpleValue implements ValueInterface
{
protected $key;
protected $value;
private $renderer;
public function __construct($key, $value)
{
$this->key = $key;
$this->value = $value;
}
public function getKey()
{
retur... | true |
55c318f533c4c22478477dd4bd76cfc43a521f3a | PHP | Vinaysiwach/ivhseniorcare | /forgot.php | UTF-8 | 2,388 | 2.59375 | 3 | [] | no_license |
<?php include "connection.php";
require_once('header.php');
session_start();
if(isset($_POST['Submit']))
{
$newpassword=$_POST['npwd'];
$email=$_POST['email'];
$sql=mysqli_query($conn,"SELECT * FROM user where email='$email'");
$num=mysqli_fetch_array($sql);
//echo"<pre>"; var_dump($num); die;
if($num>0... | true |
d1b6085f0037ba9e6b144eee1b5a0cb98dab979f | PHP | santii31/Moviepass1 | /Controllers/CinemaRoomController.php | UTF-8 | 6,524 | 2.59375 | 3 | [] | no_license | <?php
namespace Controllers;
use Models\Show as Show;
use Models\Cinema as Cinema;
use Models\CinemaRoom as CinemaRoom;
use DAO\CinemaRoomDAO as CinemaRoomDAO;
use Controllers\UserController as UserController;
class CinemaRoomController {
private $cinemaRoomDAO;
public function _... | true |
b774a735e84a561df3b50337ee47cd35c91aba60 | PHP | brendan-markham/PHP-FormGenerator | /elements/FormButton.php | UTF-8 | 251 | 2.609375 | 3 | [] | no_license | <?php
class FormButton extends FormInput
{
public function __construct(array $attributes = array())
{
$attributes = array_merge(array(
"type" => "button",
"class" => "button",
), $attributes);
parent::__construct($attributes);
}
}
?> | true |
e862ad368defaff78e8ce2e52b16a2f31e260e9e | PHP | cubiche/cubiche | /src/Cubiche/Domain/Model/Tests/Units/EntityTests.php | UTF-8 | 2,359 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Cubiche package.
*
* Copyright (c) Cubiche
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cubiche\Domain\Model\Tests\Units;
use Cubiche\Domain\Model\Tests\Fixtures\Category;
use Cu... | true |
e892d54454d93f846f901f3ee5f91f411db36b32 | PHP | Chocobann986/umitest | /sys-temp/updates/emarket/classes/components/emarket/classes/Serializer/Receipt/Parameter/Factory.php | UTF-8 | 981 | 2.921875 | 3 | [] | no_license | <?php
namespace UmiCms\Classes\Components\Emarket\Serializer\Receipt\Parameter;
/**
* Абстрактная фабрика параметра чека платежной системы
* @package UmiCms\Classes\Components\Emarket\Serializer\Receipt\Parameter
*/
abstract class Factory implements iFactory {
/**
* @inheritDoc
* @throws \wrongParam... | true |
01a8998a275b0938720e35d8857e64df4a4b17b4 | PHP | ahmedzaher/ECommerce | /UpdateProduct.php | UTF-8 | 2,161 | 2.703125 | 3 | [] | no_license | <?php
require_once './MasterHeader.php';
$controller = new Controller();
//$categories = $controller->getCategories();
$product = unserialize($_SESSION['product']);
if(isset($_POST['update'])){
$updatedProduct = new Product($product->id,$_POST['name'],$_POST['description'],$_POST['quantity'],$_POST['price'],
... | true |
d21fcc65f35e78e3787b53b401c5fdb3a517e072 | PHP | hjb1694/ktownV2 | /classes/db.php | UTF-8 | 298 | 2.796875 | 3 | [] | no_license | <?php
class Database {
static function connection($db){
try{
return new PDO('mysql:host='.$db['hname'].';dbname='.$db['dbname'],$db['uname'],$db['pword'],$db['options']);
}catch(PDOException $e){
die($e);
}
}
} | true |
5acace702902de3c9041eed79609d3627a1b1480 | PHP | jtl-scx/channel-core | /src/Report/SellerInventory/Model/ItemAttribute.php | UTF-8 | 662 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* This File is part of JTL-Software
*
* User: avermeulen
* Date: 2020-05-27
*/
namespace JTL\SCX\Lib\Channel\Report\SellerInventory\Model;
use JTL\SCX\Lib\Channel\Core\ToArrayTrait;
class ItemAttribute
{
use ToArrayTrait;
private string $attributeId;
private stri... | true |
6c98e3fd31995a8c5a0563b37b6f57d89f074ed9 | PHP | asawc/Praca | /Release.php | UTF-8 | 2,893 | 3.140625 | 3 | [] | no_license | <?php
class Release {
private $id;
private $employeeId;
private $status;
private $cDate;
private $rDate;
private $products;
private $Surname;
private $symbol;
public function __construct(object $release) {
$this->id = null;
$this->employeeId = $release->employeeId;
$this->setStatus($... | true |
1461ec7510fcaef940c2b26b63b9e557ba30d4c0 | PHP | guidovdijk/Haarlem-Festival | /src/components/eventCards.php | UTF-8 | 886 | 2.984375 | 3 | [] | no_license | <?php
class eventCards
{
private string $eventType;
private string $intro;
private string $title;
private string $url;
public function __construct(string $eventType, string $intro, string $title, string $url) {
$this->eventType = $eventType;
$this->intro = $intro;
$this->tit... | true |
c34195f36a9ffe3223d4d2fd23bcbe1d0be0ca9b | PHP | janus-ssp/janus | /src/Janus/ServiceRegistry/Connection/Metadata/MetadataTreeBuilder.php | UTF-8 | 791 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Janus\ServiceRegistry\Connection\Metadata;
use Janus\ServiceRegistry\ArrayPathHelper;
class MetadataTreeBuilder
{
/**
* Turns a flat collection into a nested one.
*
* @param array $flatCollection
* @param MetadataDefinitionHelper $metadataDefinitionHelper
* @return array
... | true |
6899386b9cb4f2548acce8c596b5e592c169a6f7 | PHP | kkshsh/crm | /database/migrations/2017_01_09_160630_create_message_parts_table.php | UTF-8 | 989 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMessagePartsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('message_parts', function(Blueprin... | true |
58ca81bb1d0e6f2fccc08021b2f6bf5c91660110 | PHP | yang123vc/DBShop | /module/Goods/src/Goods/Model/GoodsAttributeGroupExtend.php | UTF-8 | 1,723 | 2.671875 | 3 | [] | no_license | <?php
/**
* DBShop 电子商务系统
*
* ==========================================================================
* @link http://www.dbshop.net/
* @copyright Copyright (c) 2012-2015 DBShop.net Inc. (http://www.dbshop.net)
* @license http://www.dbshop.net/license.html License
* =====================================... | true |
8efaaeac19b51b3adb9df964f050d1191d4e38ab | PHP | jenasnic/sitarium | /src/DataFixtures/UserFixtures.php | UTF-8 | 2,223 | 2.71875 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use App\Entity\User;
use App\Tool\PasswordUtil;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
class UserFixtures extends Fixture
{
public const USER_ADMIN = 'user-admin';
public const USER_RAY = 'user-ray';
public const USER_TED = 'u... | true |
be40702895e24126f7024fb8024e76b437e39af6 | PHP | gifiweb/knklaw | /application/components/modules/Users/Users.php | UTF-8 | 4,427 | 2.65625 | 3 | [] | no_license | <?php
/**
* @package Users CRUD.
*
* @copyright Copyright (c) 2015, AlexGefter <galaxy.gef@gmail.com>
* @license MIT
*/
namespace application\components\modules\Users;
/**
* The UserManager class.
*/
class Users {
/**
* Constructor.
*
* @param string $path Path to templates direct... | true |
8e01f03d3094f3f8210c583c518f2c7cc3d78d1a | PHP | ratihdewi/API-PHP | /ujian-online/template/mata_kuliah.tambah.php | UTF-8 | 4,185 | 2.53125 | 3 | [] | no_license | <?php
if(!empty($_GET['m']) and $_GET['m']=='mata_kuliah' and !empty($_GET['op']) and $_GET['op']=='add'){
?>
<div id="smallRight">
<h2 align='center'>Tambah Mata Kuliah </h2>
<?php
$tbl = "mata_kuliah";
$col = "*";
$pk = "id_mata_kuliah";
$sql = "select $col from $tbl";
$query = mysql_query($sql);
//... | true |
9a866a0ffc8ecbbcf959da7e11347d7ae12a5652 | PHP | maherhossain/cms | /admin/inc/edit_post.php | UTF-8 | 4,941 | 2.6875 | 3 | [] | no_license | <?php
if(isset($_GET['post_id'])){
$post_id = $_GET['post_id'];
}
$sql = "SELECT * FROM posts WHERE post_id='$post_id'";
$fetchData = mysqli_query($conn, $sql);
while($result = mysqli_fetch_assoc($fetchData)){
$post_id = $result['post_id'];
$post_author = $result['po... | true |
4c43a9e405c43f730ed942bdcde8fdfe2a579aad | PHP | BGCX067/ezcommunity2-svn-to-git | /contribution/versions/ezpublish2/trunk/projects/php/ezaddress/classes/ezaddress.php | UTF-8 | 11,550 | 2.625 | 3 | [] | no_license | <?php
//
// $Id: ezaddress.php 8516 2001-10-18 12:15:37Z ce $
//
// Definition of eZAddress class
//
// Created on: <07-Oct-2000 12:34:13 bf>
//
// This source file is part of eZ publish, publishing software.
//
// Copyright (C) 1999-2001 eZ Systems. All rights reserved.
//
// This program is free software; you can re... | true |
cb3c45d291d6a32cbe1598e8de8038dec91dc2d5 | PHP | dhvarela/delimarket | /market/src/Market/Shared/Domain/Exception/DomainError.php | UTF-8 | 488 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Market\Shared\Domain\Exception;
use DomainException;
abstract class DomainError extends DomainException
{
private $internalErrorCode;
public function __construct(string $message, string $internalErrorCode = InternalErrorCodes::INVALID_ARGUMENT)
{
$this->internalErrorCode = $i... | true |
aff36d33a8abc40d21132e2fa1c241276229f1dd | PHP | kbarber-ups/team1 | /showCharacters.php | UTF-8 | 855 | 3.109375 | 3 | [] | no_license | <?php
try
{
//open the sqlite database file
$db = new PDO('sqlite:database/forum.db');
// Set errormode to exceptions
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//Select all passengers
$result = $db->query('SELECT * FROM Characters... | true |
cd88528dfe2f2fd00bc82863ca71b8e80c968109 | PHP | kodiary/gorun | /protected/models/CompanyAssociations.php | UTF-8 | 3,357 | 2.578125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "tbl_com_associations".
*
* The followings are the available columns in table 'tbl_com_associations':
* @property integer $id
* @property integer $company_id
* @property integer $association_id
*/
class CompanyAssociations extends CActiveRecord
{
/**
* Returns t... | true |
a4fc973caa5145dc04fe63a56fd94652a55c54ce | PHP | e-nerkom/trijasa | /app/Http/Controllers/ContactController.php | UTF-8 | 1,183 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Contact;
use Mail;
class ContactController extends Controller
{
public function index()
{
return view('hubungi_kami');
}
public function send(Request $request)
{
$contact = Contact::create($request-... | true |
5f690818b116d14af13e92107f3807ff3a5b7386 | PHP | SamDeacon/venuee-code | /1-beres/contact.php | UTF-8 | 750 | 2.546875 | 3 | [] | no_license | <?php
$emailTo = "venueeapp@gmail.com";
$subject = "Contact Form: ";
if(isset($_POST['email']) && isset($_POST['name']) && isset($_POST['message']))
{
$email = $_POST['email'];
$name = $_POST['name'];
$message = $_POST['message'];
//$name = htmlspecialchars($name, ENT_QUOTES);
//$message = htmlspecia... | true |
36fc71e9ade1b205dca0cb9aaaf1feb32a48a27a | PHP | Nal222/Weight-Loss-Planner | /storeWeightToLoseTimeToLoseWeight.php | UTF-8 | 1,515 | 2.5625 | 3 | [] | no_license | <?php
$targetweightinkg= $_GET['targetweightinkg'];
$months= $_GET['months'];
$weeks= $_GET['weeks'];
$days= $_GET['days'];
$username= $_GET['username'];
$password= $_GET['password'];
$preferredtimeunits = $_GET['preferredtimeunits'];
if($months!=null){
$weeksFromMonths=($months*4.34812141);
//echo($weeksFromMonths)... | true |
54c4161d0b60d97dcd6d34f8141839922ff40fa3 | PHP | Abir-K/Sample-Project-WebTech | /Travel & Toursim Web Application/controllers/createplancontroller.php | UTF-8 | 935 | 2.609375 | 3 | [] | no_license | <?php require_once 'models/db_config.php';?>
<?php
$name="";
$err_name="";
$category="";
$err_category="";
$price="";
$err_price="";
$discription="";
$err_discription="";
$image="";
$err_image="";
$hasError=false;
if($_SERVER["REQUEST_METHOD"]=="POST"){
if (!isset($_POST["Confirm"])){
if(empty($_POST["name"])){
... | true |
d607c6f02dad76ccee59c70268c1cd041b722f77 | PHP | Nielk1/phpSiteCore | /public_html/classes/Widget/AdminUsersPanel.php | UTF-8 | 1,742 | 2.78125 | 3 | [] | no_license | <?php
class Widget_AdminUsersPanel {
private $_database;
private $mysqli;
private $_session;
private $isLoggedIn;
public function __construct($session, $database) {
$this->_session = $session;
$this->_database = $database;
$this->mysqli = $this->_database->getMySQL();
}
public function render() {
//... | true |
33a66e07a9ee7e8b9c647eb7f0c0c81f1d3c90af | PHP | len4iik/tourismmap_final | /app/models/ForumPost.php | UTF-8 | 1,235 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
class ForumPost extends Eloquent
{
protected $table = 'forum_posts';
public function group()
{
return $this->belongsTo('ForumGroup');
}
public function category()
{
return $this->belongsTo('ForumCategory');
}
public function comments()
{
return $this... | true |
641b7ad667c83280e44711ce855a65c876db82b8 | PHP | Inohacker/pl2webasyst | /lib/actions/pocket/pocketlistsPocketSave.controller.php | UTF-8 | 1,460 | 2.5625 | 3 | [] | no_license | <?php
/**
* Class pocketlistsPocketSaveController
*/
class pocketlistsPocketSaveController extends waJsonController
{
/**
* @throws waDbException
*/
public function execute()
{
$pocketData = waRequest::post('pocket', [], waRequest::TYPE_ARRAY);
if (!$pocketData['id']) {
... | true |
0c1c0a36a3684e169303ca20d58f1411c6792f28 | PHP | a12791602/jianghu_entertain | /app/ModelFilters/Systems/SystemPlatformFilter.php | UTF-8 | 2,413 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\ModelFilters\Systems;
use Carbon\Carbon;
use EloquentFilter\ModelFilter;
/**
* 运营商平台
*/
class SystemPlatformFilter extends ModelFilter
{
/**
* Related Models that have ModelFilters as well as the method on the ModelFilter
* As [relationMethod => [input_key1, input_key2]].
*... | true |
04f5d446a4c195c4b6b83051b5c933f39d32998b | PHP | mstahnke1/csp | /sales/graphtest/datafunction.php | UTF-8 | 1,840 | 3.03125 | 3 | [] | no_license | <?php
function datascript() {
$dataLines = array();
// ensure $_REQUEST["year"] is set and has a value
// between 2006 and 2008.
if (!isset($_REQUEST["year"])) {
$_REQUEST["year"] = 2008;
}
if ($_REQUEST["year"]>2008 || $_REQUEST["year"]<200... | true |
7651ebb6f5818677c9ea96d29169dc53c65e2f8c | PHP | chenYvv/docker-lnmp | /app/mysql.php | UTF-8 | 530 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: chen_
* Date: 2018/4/13
* Time: 13:33
*/
$host = '192.168.200.128';
$user = 'root';
$pwd = '123456';
$db = 'test';
//$pdo = new PDO('mysql:host='.$host.';dbname='.$db.';port=3306,\''.$user.',\''.$pwd.'\'');
$mysqli = new mysqli($host, $user, $pwd, $db);
if ($mysqli->conn... | true |
9fe2db5dbaa57d333f439c7d01b0812c5b1e6d16 | PHP | jhawley/bloomfilter | /Hawley/BloomFilter/RemovalBloomFilter.php | UTF-8 | 2,809 | 2.921875 | 3 | [
"LicenseRef-scancode-public-domain"
] | permissive | <?php
namespace Hawley\BloomFilter;
class RemovalBloomFilter implements IRemovalBloomFilter {
protected $_hashes = array();
protected $_filter = array();
protected $removalFilter, $setSize;
protected $itemsHeld = 0;
public function __construct(IHashFactory $hf, IPRNG $prng, $setSize,
$... | true |
7e57e3ff80f2eb5536861aeff0a2140b755053b1 | PHP | Fraz0r/Potter-Kuuleilani | /app/models/page.php | UTF-8 | 618 | 2.59375 | 3 | [] | no_license | <?php
/**
* Description of page
*
* @author Tim Frazier <tim.frazier at gmail.com>
*/
class Page extends P3\ActiveRecord\Base
{
public static $_table = 'pages';
public static $_controller = 'pages';
public static $_hasMany = array(
'menu_items' => array(
'class' => 'MenuItem',
'as' => 'linkable'
)
)... | true |
c8d53b8f9f66cf288c96d85ee74b5d6dff38db61 | PHP | marcelaraujo/xpto-old-api | /src/Xpto/Factory/Medias/Media/Youtube.php | UTF-8 | 1,776 | 2.578125 | 3 | [] | no_license | <?php
/**
* This file is part of Xpto system
*
* @copyright Xpto
* @license proprietary
*/
namespace Xpto\Factory\Medias\Media;
use Domain\Value\MediaType;
use Xpto\Entity\Medias\Media as MediaModel;
use Xpto\Entity\Users\User as UserModel;
use Xpto\Factory\Medias\Media\Detail as DetailFactory;
use Xpto\Factory... | true |
0d1aa1eab81598096af47892a904e90e42228f5a | PHP | Myloth/dominus | /src/Service/AbstractService.php | UTF-8 | 1,427 | 2.78125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace App\Service;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\ORMException;
/**
* Class AbstractService
*/
abstract class AbstractService
{
/** @var EntityManager */
protected $em;
/**
* @param EntityManager $em
*/
public function __cons... | true |
89bd1a3e5940f5bb9f90812054cdde1b62835c29 | PHP | small-summer/chapter01 | /start/code.php | UTF-8 | 1,984 | 3.15625 | 3 | [] | no_license | <?php
// 1.初始化变量
$img_w=70;//初始化验证码的宽
$img_h=30;//初始化验证码的高
$char_len=5;//初始化验证码的长度
$font=20;//初始化验证码的字体大小
// 2.生成验证码的码值
$char=array_merge(range('A', 'Z'),range('a', 'z'),range(1, 9));
$rand_keys=array_rand($char,$char_len);//随机获取char_len个码值的键
if ($char_len==1){
$rand_keys=array($rand_keys);
}
shuffle($rand_keys);/... | true |
d6ec76c96613efcc4e8d2f0d39bb1bdee917450f | PHP | aotian16/php_study | /php_base/ch3_echo_print/0301_compare.php | UTF-8 | 208 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: tongjin
* Date: 2017/7/26
* Time: 下午3:31
*/
echo 1, 2, 3; // 可以多个
print 4; // 只能一个
$result = print 5; // 有返回值,为1
echo $result;
| true |
651b9e4383ae18ae3f9722e096e126f8d8af3842 | PHP | jlbaldwin/recognition | /app/Models/AwardForm.php | UTF-8 | 719 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Models;
use System\BaseModel;
error_reporting(E_ALL);
ini_set('display_errors', 1);
class AwardForm extends BaseModel
{
public function get_award_form($awardId)
{
$award = $this->db->select('* FROM award WHERE awardId = :awardId', [':awardId' => $awardId]);
$award_types = ... | true |
3ff61a61bd63363e4d236d261edad28eeed8bd7b | PHP | VCHSRobots/AttendanceMachine | /Server/libs/databaselib.php | UTF-8 | 8,723 | 3.09375 | 3 | [] | no_license | <?php
// --------------------------------------------------------------------
// databaselib.php: library fucntions for database access
//
// Created: 12/03/14 DLB
// --------------------------------------------------------------------
require_once "config.php";
// ---------------------------------------------------... | true |
c2b31d3002dd06942dabcd8a3e84c48e2262b62b | PHP | olegboychuk/musicstore_app | /application/RestControllers/UserRestController.php | UTF-8 | 1,465 | 2.65625 | 3 | [] | no_license | <?php
require_once dirname(__FILE__).'/../Controllers/UserController.php';
class UserRestController extends UserController{
public $model;
/**
/*protected function createAnswer
/* CREATE ANSWER FOR RESPONCE
*/
protected function createAnswer( $error,$answer,$code=200 ){
$responce = array(
"code" => $code... | true |
ce863defb4707af965a12395683dd5ff6ea4e803 | PHP | txstate-etc/marionette | /src/includes/datetime.php | UTF-8 | 567 | 3.140625 | 3 | [] | no_license | <?php
/**
* Compatibility DateTime class
*
* @package phpmanage
*/
if (!class_exists('DateTime')) {
/**
* DateTime class for compatibility
*
* the DateTime class only appears in PHP 5.2.0
*
* I'm providing a simple compatibility version here in
* case we're running on 5.1.x
*
* @package php... | true |
a58c635e118b3d629fa1e9910d33b3ebd7b6795d | PHP | vegas-cmf/social | /src/LinkedIn/Publish.php | UTF-8 | 4,357 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Vegas package
*
* @author Tomasz Borodziuk <tomasz.borodziuk@amsterdam-standard.pl>
* @copyright Amsterdam Standard Sp. Z o.o.
* @homepage http://vegas-cmf.github.io
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this... | true |
6975454a67e9aa68441f04f87ddf68e5e76f456c | PHP | phpbrew/phpbrew | /src/PhpBrew/Downloader/PhpStreamDownloader.php | UTF-8 | 1,749 | 2.71875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace PhpBrew\Downloader;
use RuntimeException;
class PhpStreamDownloader extends BaseDownloader
{
protected function process($url, $targetFilePath)
{
$this->logger->info("Downloading $url via php stream");
$opts = array();
if ($proxy = $this->options->{'http-proxy'}) {
... | true |
53e11ab93fb76b76f8c5fff9cc27351106084ffc | PHP | octalmage/wib | /php-7.3.0/Zend/tests/traits/property004.phpt | UTF-8 | 586 | 3.140625 | 3 | [
"MIT",
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing",
"Zend-2.0"
] | permissive | --TEST--
Conflicting properties with different initial values are considered incompatible.
--FILE--
<?php
trait THello1 {
public $hello = "foo";
}
trait THello2 {
private $hello = "bar";
}
echo "PRE-CLASS-GUARD\n";
class TraitsTest {
use THello1;
use THello2;
public function getHello() {
return $this->h... | true |
1c47a52b7bef6b59e78d4a1793fe4921810575a8 | PHP | mstnorris/fiveone-vuejs-socketio | /app/Repositories/UserRepository.php | UTF-8 | 148 | 2.515625 | 3 | [] | no_license | <?php namespace SomethingGoodHappenedToday\Repositories;
interface UserRepository
{
public function getAll();
public function show($id);
} | true |
04096e750ec50a1a3ecbbf8b1b0ee64d26b8b89b | PHP | yuri-calabrez/code-netflix | /backend/app/Traits/SerializeDateToIso8601Trait.php | UTF-8 | 228 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
use DateTime;
use DateTimeInterface;
trait SerializeDateToIso8601Trait
{
protected function serializeDate(DateTimeInterface $date)
{
return $date->format(DateTime::ISO8601);
}
} | true |
37f74b078ecf64483eb733277b2672ea9c379542 | PHP | zjutjh/JingHongBBS-Server | /app/Models/UserWechat.php | UTF-8 | 1,629 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright (C) 2020 Tencent Cloud.
*
* 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 ... | true |
1ab8d1613f29c15492d721cc121f9457a97a443d | PHP | betacompany/pipeinpipe | /main/classes/social/SocialPhoto.php | UTF-8 | 1,463 | 2.734375 | 3 | [] | no_license | <?php
require_once dirname(__FILE__) . '/../db/AggregatorDBClient.php';
require_once dirname(__FILE__) . '/../social/CrossPost.php';
/**
* User: ortemij
* Date: 07.05.12
* Time: 15:13
*/
class SocialPhoto {
private $id;
private $socialPostId;
private $socialWebAuthorId;
private $urls = array();
private fun... | true |
8a1478da19f98b6fca5a41d4ed3e712a0cb74c71 | PHP | camt-mmit/2020-01-954246-lab08-function-2-aaron123-ioss | /ass-01.php | UTF-8 | 618 | 2.828125 | 3 | [] | no_license | <?php
/*ID: 602110193
Name: yucaiwen
Wechat: yucaiwen*/
$f=fopen($_SERVER['argv'][1], 'r');
fscanf($f,"%d",$n);
$students=[];
for($i=0;$i<$n;$i++){
$student=[];
fscanf($f,"%s%s%f",$student['name'],$student['section'],$student['score']);
$students[]=$student;
}fclose($f);
function build_sorter($key){
... | true |
81876414562566b58314f450ccdab17b307e3cd2 | PHP | JhonCodei/MKS | /helpers/complements/Encrypt.php | UTF-8 | 782 | 2.875 | 3 | [] | no_license | <?php
function descrypt($var)
{
$key = "[!$$###]]";
$cadena = explode('-', base64_decode($var));
$indice = 0;
$tope = count($cadena);
$n = strlen($key);
$decode = "";
do
{
$decode .= chr(ord($key[$indice % $n]) ^ $cadena[$indice]);
}
while (++$indice < $tope);
$decod... | true |
004c7e15f73a5199929ff28f968937f4f7812077 | PHP | pgotsis/generators-website | /app/OrganizationGenerator.php | UTF-8 | 5,248 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Exception;
class OrganizationGenerator
{
public function generate(NameGenerator $nameGenerator, string $type = 'random')
{
$organization = new Organization();
if ($type == 'random') {
$organization->type = $this->randomType();
} elseif ($type ==... | true |
f32340a93043ebbac622fb62c9a82bd7ad72ac70 | PHP | watchmakert/InterClubes | /app/Http/Requests/CouponUpdateRequest.php | UTF-8 | 881 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CouponUpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* G... | true |
8ea60093a3f6d664e0b37930e0c8f2153f01a4c4 | PHP | gtuk/ImageOptimizer | /src/ImageOptimizer/Provider/Optimization/Mozjpeg.php | UTF-8 | 796 | 2.96875 | 3 | [] | no_license | <?php
namespace ImageOptimizer\Provider\Optimization;
use Exception;
/**
* Class Mozjpeg
*
* @package ImageOptimizer\Provider\Optimization
*/
class Mozjpeg extends AbstractOptimizationProvider
{
/**
* Mozjpeg constructor.
*
* @param string $binaryPath
*/
public function __construct($b... | true |
02d713efc180f4e3309e576e288ff0f37c728954 | PHP | ntipitagoras/provas | /application/views/xxxprova_view.php | UTF-8 | 13,995 | 2.609375 | 3 | [] | no_license |
<div id="page-wrapper">
<div class="row">
<div class="col-md-12">
<br>
<?php
$dateActual = date('Y-m-d');
$dataParameter = $this->session->userdata('data_limite_envio_prova_professor');
$d = explode("-",$dataParameter);
$formateDateBr = $d[2]."/".$d[1]."/".$d[0];
if( $dateActual > $dataParamet... | true |
6c1d70f9b973df9b315a3811f13b5db902597cde | PHP | ciaranmcnulty/BackwardCompatibilityCheck | /src/DetectChanges/BCBreak/ClassBased/ConstantChanged.php | UTF-8 | 1,376 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Roave\BackwardCompatibility\DetectChanges\BCBreak\ClassBased;
use Roave\BackwardCompatibility\Changes;
use Roave\BackwardCompatibility\DetectChanges\BCBreak\ClassConstantBased\ClassConstantBased;
use Roave\BetterReflection\Reflection\ReflectionClass;
use function array_inters... | true |
8eecba4d381051ccfcf3ddaf03a88d9c337cd571 | PHP | grantelgin/nhp | /fuel/app/classes/model/eventproducer.php | UTF-8 | 1,188 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Orm\Model;
class Model_EventProducer extends Model
{
protected static $_properties = array(
'id',
'event_id',
'producer_id',
'showonevent',
'eventposition',
'updateviaemail',
'soundcloud_link',
'created_at',
'updated_at',
);
protected static $_observers = array(
'Orm\Observer_CreatedA... | true |
22b81492d5a4c5d7880cc2eb271b9d580e40c1dd | PHP | GaussWebDev/TaskOrganiser_DB | /application/controllers/task.php | UTF-8 | 6,482 | 2.625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Task management
*/
class Task extends CI_Controller
{
/**
* Class Constructor
*/
function __construct()
{
parent::__construct();
$this->lang->load('account', $this->User_model->getLanguage());
// require user ... | true |
a90e21537e6cb954c19c6ea7df4abf795741f974 | PHP | Mysize/wordpress-heroku | /web/app/plugins/facebook-for-woocommerce/includes/API/Traits/Rate_Limited_API.php | UTF-8 | 1,985 | 2.703125 | 3 | [
"MIT",
"GPL-2.0-or-later",
"GPL-2.0-only"
] | permissive | <?php
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*
* @package FacebookCommerce
*/
namespace SkyVerge\WooCommerce\Facebook\API\Traits;
use SkyVerge\WooCommerc... | true |
c9d96d900200067e28cb5b137af9631646be2f0e | PHP | marcelbonnet/darth-project | /src/dbal/AcaoFiscalizacaoFactory.php | UTF-8 | 1,049 | 2.78125 | 3 | [] | no_license | <?php
namespace Darth\Core\dbal;
abstract class AcaoFiscalizacaoFactory
{
const SSF_FACTORY = 2;
const FOCUS_FACTORY = 4;
/**
* Description
*
* @param Type name description
* @throws Type
* @return AcaoFiscalizacaoFactory instância ou null se não houver factory
*/
public stat... | true |
188b5c6e825b701d1a9a92d478f49275e2134864 | PHP | MattWohler/wallet-api | /tests/Fakes/Jobs/FakeFailingJob.php | UTF-8 | 405 | 2.640625 | 3 | [] | no_license | <?php
namespace Tests\Fakes\Jobs;
use App\Jobs\Job;
use Exception;
use Illuminate\Contracts\Queue\ShouldQueue;
class FakeFailingJob extends Job implements ShouldQueue
{
/** @var string */
protected $message;
public function __construct(string $message)
{
$this->message = $message;
}
... | true |
a15b4464e4614536c57206037ac24e522c21915e | PHP | VictorCM1995/TareasDWES2 | /Hoja06_Clases_01/012/index.php | UTF-8 | 477 | 3.53125 | 4 | [] | no_license | <?php
require_once("Coche.php");
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>PHP</title>
</head>
<body>
<?php
$a = new Coche("SEAT",40);
$b = new Coche("OPEL",50);
echo $a->toString()."<br>";
echo $b->toString()."<br>";
$a->acelerar(10);
echo $a->toString()."<br>";
$a->ace... | true |
ddfa7cbd3f8b5a678e1665584469b9aa844d1ab7 | PHP | tanishq005/My-Project | /process_login.php | UTF-8 | 1,734 | 2.515625 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<head>
<title>Catalog of E-Resources</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
</head>
<?php
session_start();
require "connect_catalog.php";
if(!isset(... | true |
6e44a14833f6500139e4a23e920111313d762e52 | PHP | ashlionTimeless/noxuniverse | /core/helpers/GameConditionHelper.php | UTF-8 | 1,127 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace core\helpers;
use yii\helpers\ArrayHelper;
use core\entities\infrastructure\GameCondition;
class GameConditionHelper
{
public static function typeList()
{
return [
GameCondition::TYPE_STRING => 'String',
GameCondition::TYPE_INTEGER => 'Integer number',
... | true |
46e897416e3982d237ab0ea10985fd20edc0be3a | PHP | FedeGuayas/guayaco | /app/Http/Controllers/PersonaController.php | UTF-8 | 7,830 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use Illuminate\Support\Facades\Session;
use App\Persona;
use Illuminate\Support\Facades\Redirect;
use App\Http\Requests\PersonaFormRequest;
use App\Http\Requests\PersonaUpdateRequest;
use DB;
use Illuminate\Support\Facades... | true |
ce319b7d274e19a70ec0dc5d5a3314571285fb7f | PHP | NetworkNigel/networknigel.github.io | /phpmyfaq/inc/PMF/Rating.php | UTF-8 | 6,390 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* The main Rating class.
*
* PHP Version 5.5
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/.
*
* @category phpMyFAQ
*
* @author Thorsten Rinn... | true |
b3fcd94505f1473107e97bf4714ea1633666abb4 | PHP | GuikProd/MarketReminder | /src/Domain/Models/Products.php | UTF-8 | 3,938 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types=1);
/*
* This file is part of the MarketReminder project.
*
* (c) Guillaume Loulier <guillaume.loulier@guikprod.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Domain\Models;
/**
*... | true |
22d9cf41ccb8642df079bbdbe35eee1b07173f56 | PHP | P79N6A/kanhuiqiu_mis | /coreseek/wordsbuild.php | UTF-8 | 1,888 | 2.703125 | 3 | [] | no_license | <?php
ini_set('memory_limit', '2G');
mysql_connect('localhost','video','video');
mysql_select_db('kanhuiqiu');
mysql_query('set names utf8');
$count = mysql_fetch_assoc(mysql_query('SELECT count(*) as count FROM tbl_words'));
$words_count = file_get_contents('words_count.txt');
if ($words_count == $count['count']){
... | true |
d87b65aa61589ea705978b112e3471ddec292022 | PHP | Hoangnq-2712/vn_bakery | /app/Http/Controllers/Backend/UserController.php | UTF-8 | 4,198 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Backend;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Model\User;
use Hash;
use DB;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function... | true |
cd7f51f562e13e648cecb3908dec7baf71d3ab4e | PHP | jquery/testswarm | /inc/Client.php | UTF-8 | 4,562 | 2.953125 | 3 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Create or get info about a client.
*
* Should NOT be stored in-session because one browser can have
* multiple tabs open (where each is its own client).
*
* @author Timo Tijhof
* @since 1.0.0
* @package TestSwarm
*/
class Client {
/**
* @var $context TestSwarmContext
*/
protected $context;
... | true |
a0ff1b7601fe52ceac395d84c4081df0bbed030e | PHP | sitengine/sitengine | /_Contrib/FlexUpload/upload_example.php | UTF-8 | 3,873 | 2.71875 | 3 | [] | no_license | <?php
/**
* upload_example.php
*
* Simple upload-script to demonstrate and test FlexUpload.
* Feel free to use this to start developing your own scripts.
*
* Copyright (C) 2007 SPLINELAB, Mirko Schaal
* http://www.splinelab.de/flexupload/
*
* All rights reserved
*
* This program is free software; you can red... | true |
1f30f17b5eb64d3fa58063295a85b984e76df8ed | PHP | krinski-rs/autenticacao.local | /src/Entity/Comercial/ChanceIndication.php | UTF-8 | 2,922 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Entity\Comercial;
/**
* ChanceIndication
*/
class ChanceIndication
{
/**
* @var int
*/
private $id;
/**
* @var string|null
*/
private $type;
/**
* @var string|null
*/
private $who;
/**
* @var string|null
*/
private $email... | true |
632ac97d68f708eb00412e5a11a6f8c8a7c60193 | PHP | manuelgithub14/pruebasPHP | /clases/Correo.php | UTF-8 | 3,044 | 2.859375 | 3 | [] | no_license | <?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
class Correo {
private $mensajero;
private $nombreMensajero;
private $destinatario;
private $asunto;
private $mensaje;
private $archivoAdjunto;
public function __construct($datos = []) {
if (is_array($datos)) {... | true |
40146ae367c4494befff109c325001c891cc43a9 | PHP | luiz8910/robots | /public/includes/geodata.php | UTF-8 | 7,315 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
if(!isset($_SESSION)) session_start();
error_reporting(0);
include "../../config/config.php";
include "../../includes/functions.php";
$type = trim($_POST['type']);
$rowsperpage = 10;
if($type == 'today')
$result = mysql_query(" SELECT countryCode,country,COUNT(*) AS total FROM tz_who_is_online WHERE DATE(... | true |
77e06058768c612a1a5d61c54a90321688ae23f4 | PHP | ehvoluti/fluxo | /class/temporary.class.php | UTF-8 | 4,274 | 2.734375 | 3 | [] | no_license | <?php
require_once("websac/require_file.php");
require_file("def/function.php");
final class Temporary{
private $address;
private $columns;
private $name;
private $lines;
private $char_separator = "-";
private $column_separator = ";";
private $line_separator = " ";
function __construct($name, $... | true |
fcfe2bc4635fc208782b2676f4369422f0790acc | PHP | manolf/advent | /insertWod.php | UTF-8 | 1,469 | 2.65625 | 3 | [] | no_license | <?php
ob_start();
session_start();
require_once 'actions/db_connect.php';
// if session is not set this will redirect to login page
if (isset($_SESSION["admin"])) {
header("Location: admin.php");
exit;
}
if (!isset($_SESSION['user'])) {
header("Location: index.php");
exit;
}
// select logged-in users... | true |
3b776d372915e2b67ae461d860cb9d39ef9a1ed4 | PHP | saphrus/klunker-engine | /include/classes/BOKUMobilePOST.inc | UTF-8 | 12,675 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
require_once(dirname(__FILE__).'/IPOSTPayment.inc');
require_once(dirname(__FILE__).'/../shared/classes/ISO3166.inc');
class BOKU_Response_Parser {
public static function get_instance() {
if (!isset(self::$INSTANCE))
self::$INSTANCE = new self();
return self::$INSTANCE;
}
private static $INSTANCE;
... | true |
d2a5b08391fc7f4f4ef93f044f109010ec147f00 | PHP | kasei3/LearnJa | /webroot/subApp/gameServer/obj/Result.php | UTF-8 | 1,388 | 3.21875 | 3 | [] | no_license | <?php
/**
* 返回结果的基类
* Class Result
*/
class Result{
// 处理结果
var $result;
// 消息
var $message;
// 数据
var $data;
function __construct($result = true, $message = "success", $data = []) {
$this->result = $result;
$this->message = $message;
$this->data = $data;
}
// 获取字典型的返回值
function getDicResult(){
$... | true |
fa800b88e3d9796be3df9a87b5756113c65a0105 | PHP | fykosak/fksdb | /app/Models/ORM/Models/TaskContributionModel.php | UTF-8 | 779 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace FKSDB\Models\ORM\Models;
use Fykosak\NetteORM\Model;
/**
* @property-read int $contribution_id
* @property-read int $task_id
* @property-read TaskModel $task
* @property-read int $person_id
* @property-read PersonModel $person
* @property-read TaskContributionType $typ... | true |
c4b54547a1a1cdf4dfcc0ba96b4d03bb88af2c41 | PHP | kunsmile/publicService | /site/model/validateInput.php | UTF-8 | 1,835 | 2.953125 | 3 | [] | no_license | <?php
/*
* Author: Tuan ThaiManh
*/
//Kiem tra truong firstname
function check_firstname_input($param){
$mess = '';
if(empty($param)){
$mess = "Không được bỏ trống";
}
else if (!preg_match("/^[a-zA-Z ]*$/",$param)){
$mess = "Chỉ bao gồm kí tự và dấu cách";
}
else{
$... | true |
d27648c772b2b754e4dd843a83d18fb1b2f64767 | PHP | nuskai/laravel-sample-code | /app/Repositories/ProductRepository.php | UTF-8 | 849 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\Product;
use InfyOm\Generator\Common\BaseRepository;
class ProductRepository extends BaseRepository
{
/**
* @var array
*/
protected $fieldSearchable = [
'productName', 'summary'
];
/**
* Configure the Model
**/
public fun... | true |
3f761bc4926d909a8d020f89124dcbfd323eabff | PHP | Hoheckell/minicursolaravel | /app/Http/Controllers/ContatosController.php | UTF-8 | 3,261 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Contatos;
use App\Enderecos;
use App\Telefones;
class ContatosController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
1f42d0dfa400322c24331b643b4435aedfeed5e7 | PHP | myheritage/gedcomx-php | /src/Gedcomx/Rs/Api/PersonsState.php | UTF-8 | 1,742 | 2.625 | 3 | [] | no_license | <?php
namespace Gedcomx\Rs\Api;
use Gedcomx\Gedcomx;
use Gedcomx\Conclusion\Person;
use RuntimeException;
class PersonsState extends GedcomxApplicationState
{
function __construct($client, $request, $response, $accessToken, $stateFactory)
{
parent::__construct($client, $request, $response, $accessT... | true |
9dfef487c0e99d8988b428d702d56c228d3a281f | PHP | grishindev/SymfonyPetProject | /src/DataFixtures/UserFixtures.php | UTF-8 | 2,159 | 2.53125 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
use Cocur\Slugify\Slugify;
use Faker\Factory;
use App\Entity\User;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
class UserFixtures extends Fixture
{
public co... | true |
52458e394817a3455c401a37f4cb4e6b6049ba28 | PHP | KeroZhai/lune | /src/lune/framework/pagination/PageInfoBuilder.php | UTF-8 | 1,228 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace lune\framework\pagination;
class PageInfoBuilder {
private $pageInfo;
public function __construct() {
$this->pageInfo = new PageInfo();
}
public function content($content) {
$this->pageInfo->content = $content;
return $this;
}
public function empty(... | true |
07ee76c8aa1b5b52b805642c51a5833ec54eb0e2 | PHP | nahid204/ChatService | /Web/ChatService/util.php | UTF-8 | 2,005 | 2.953125 | 3 | [] | no_license | <?php
class JSONUtil
{
public static function getArray($jsonString)
{
$json = json_decode( preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $jsonString), true );
return $json;
}
public static function printLastJSONStatus()
{
$status = json_last_error();
$msg = json_last_er... | true |
977b2a91b72fd26be37ab90b7e056020e4a5fbce | PHP | YaShangDong/AnkiConnect | /src/Model.php | UTF-8 | 1,293 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace YaSD\AnkiConnect;
class Model
{
protected string $name;
protected array $fields;
protected array $templates;
protected ?string $css = null;
/**
* @param string $name
* @param string[] $fields
* @param Template[] $templates
*
* @th... | true |
a2577e60ea0cf7222d28a5c532f771cadf66c628 | PHP | Nics016/LandingsAdmin | /LandingTest/Place.php | UTF-8 | 1,388 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace landing;
class Place
{
///////////////
// Константы //
///////////////
const STATE = 1;
const STATE_READY = 10;
const STATE_OTDELKA = 20;
const STATE_CLEAR_OTDELKA = 30;
const STATE_SELLING = 40;
const PLANNING = 2;
const PLANNING_OPEN = 10;
const PLANNING_... | true |
f6f0cbc5d5aeae07d2de2c418e05c702aafa6a5b | PHP | no-Seaweed/CIS454_project2 | /CSE389_Final/php/connect.php | UTF-8 | 1,539 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.php" />
</head>
<body>
<?php
$username = filter_input(INPUT_POST,'username');
$password = filter_input(INPUT_POST,'password');
if(!empty($username)){
if(!emp... | true |
0b81a07693f105517996ef65771587bbefedbb5a | PHP | griddb/php_client | /sample/TQLTimeseries.php | UTF-8 | 4,503 | 2.84375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | <?php
if (file_exists('griddb_php_client.php')) {
// File php wrapper is generated with SWIG 4.0.2 and below
include_once('griddb_php_client.php');
}
$factory = StoreFactory::getInstance();
$containerName = "SamplePHP_TQLTimeseries";
$rowCount = 4;
$dateTimeStrList = ["2018-12-... | true |
002fb2b8e39259703143bfea6464ac68f8b3e179 | PHP | mohamedelmnegged/OnlineShop | /app/Models/Product.php | UTF-8 | 1,528 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
use HasFactory;
protected $fillable = ['name', 'description', 'price', 'image', 'quantity', 'status'];
/**
* @function
* ... | true |
007cdedc840af04e3f0ab83175bdaf8cbd84c315 | PHP | Adityariman1/php-native | /oop/inheritance/lat1.php | UTF-8 | 1,967 | 3.1875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<fieldset>
<legend>Makhluk Alloh</legend>
<form action=""... | true |
9fe29344933d662576c30710be9db540cd6d0ab0 | PHP | Nick-Kibou/App-Rendiamo | /src/classes/Lezione.php | UTF-8 | 1,841 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
class Lezione {
public $id;
public $idUtente;
public $titolo;
public $data;
public $note;
public $row;
public $materie;
public function __construct($row){
$this->id = $row['id'];
$this->idUtente = $row['idUtente'];
$this->titolo = $row['titolo'];
$this-... | true |
69080737b7cc482cf874f135de583f993f8b87f1 | PHP | EgorBanin/frent | /src/php/lib/Storage.php | UTF-8 | 1,113 | 2.84375 | 3 | [] | no_license | <?php
class Storage {
private $db;
private $tableName;
private $primaryKey;
public function __construct(\Mysql\Client $db, $tableName, $primaryKey = 'id') {
$this->db = $db;
$this->tableName = $tableName;
$this->primaryKey = $primaryKey;
}
protected function getDb() {
return $this->db;
}
protec... | true |