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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
58ca8b20785b33c1fe258c30e263f1c9a4d9735e | PHP | usupsuparma/api-smartdoc | /app/Modules/Menu/Controllers/SideMenuController.php | UTF-8 | 510 | 2.546875 | 3 | [] | no_license | <?php namespace App\Modules\Menu\Controllers;
/**
* @author Adam Lesmana Ganda Saputra <aelgees.dev@gmail.com>
*/
use App\Library\Bases\BaseController;
use App\Modules\Menu\Repositories\MenuRepositories;
class SideMenuController extends BaseController
{
private $menuRepository;
public function __construct(M... | true |
50cdcea059e2fc2629d194079a580781d4f7e6b2 | PHP | bkstar123/log-enhancer | /src/DebugLogPushHandlers.php | UTF-8 | 705 | 2.515625 | 3 | [] | no_license | <?php
/**
* DebugLogPushHandlers - push additional handlers
*
* @author: tuanha
* @lst-mod: 02-06-2019
*/
namespace Bkstar123\LogEnhancer;
use Psr\Log\LoggerInterface;
use Monolog\Handler\BrowserConsoleHandler;
use Bkstar123\LogEnhancer\Contracts\LogInstanceModifying;
class DebugLogPushHandlers implements LogIns... | true |
c6c02635f83f61bdd410742ad7342d40e50248a2 | PHP | resonantdoghouse/wpcomp | /app/themes/minim/login.php | UTF-8 | 1,959 | 2.78125 | 3 | [] | no_license | <?php
// wp-content/themes/twentysixteen-child/login.php
/*
Template Name: Login Page
*/
$client_id = '6S0oj4JIGO2msNfofOOip1ig79hD5b';
$client_secret = '6zFrNMo5Mn7bgrJkOf9G507Q3TtPbt';
$code = false;
if (isset($_GET['code'])) {
$code = $_GET['code'];
}
// If there is no code present, first get the code by r... | true |
9bbb679f0e9a3de8ac81b2ff703ddbcb798ea76d | PHP | nivek05/projet-fin-de-formation | /src/Form/ContactType.php | UTF-8 | 3,550 | 2.625 | 3 | [] | no_license | <?php
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Exten... | true |
bc4ba6bf32a1fffa28057e7cbc528c053ade5ebc | PHP | forkarea/ddd-playground | /src/Application/UseCase/User/UserQuery.php | UTF-8 | 946 | 2.96875 | 3 | [] | no_license | <?php
namespace Leos\Application\UseCase\User;
use Leos\Domain\User\Model\User;
use Leos\Domain\User\ValueObject\UserId;
use Leos\Domain\User\Exception\UserNotFoundException;
use Leos\Domain\User\Repository\UserRepositoryInterface;
/**
* Class UserQuery
*
* @package Leos\Application\UseCase\User
*/
class UserQue... | true |
5e4006f8c9ef963c346a7a46ed2a397f24673ea5 | PHP | davidfernandoza/min_pos | /app/Models/User.php | UTF-8 | 1,051 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Spatie\Permission\Traits\HasRoles;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable, SoftD... | true |
403ebb556ab2adeefc83ea9674a9fbbc207b478c | PHP | 19936/gd | /include/uploadImage.php | UTF-8 | 612 | 2.671875 | 3 | [] | no_license | <?php
if(isset($_FILES['image'])){
$errors= array();
$file_name = $_FILES['image']['name'];
$file_size = $_FILES['image']['size'];
$file_tmp = $_FILES['image']['tmp_name'];
$file_type = $_FILES['image']['type'];
$expensions= array("jpeg","jpg","png");
session_start();
if (!isset($_SESSION['file'])) {
... | true |
2c03f426ef3b7bca54f01dbafeed2ee3850f7d44 | PHP | steele-ariel-wm/OOP | /Effect.php | UTF-8 | 353 | 3.03125 | 3 | [] | no_license | <?php
abstract class Effect{
public $name;
public $color;
public function describe(){
return $this->name. ' is ' .$this->color;
}
abstract public function takePicture();
}
class Panning extends Effect{
public function describe(){
return parent::describe();
}
public function takePicture(){
... | true |
6da05cf1872a3099eb80ca30abb21ca0ebf17205 | PHP | tanigami/value-objects-php | /src/Web/Email.php | UTF-8 | 2,065 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tanigami\ValueObjects\Web;
class Email
{
/**
* @var string
*/
protected $subject;
/**
* @var string
*/
protected $body;
/**
* @var EmailAddress
*/
protected $from;
/**
* @var EmailAddress[]
*/
protected $tos;
/**
* @v... | true |
c6883406c051fab23156d390b479ffebc4fca55d | PHP | imclab/pnut | /models/Question.php | UTF-8 | 897 | 2.6875 | 3 | [] | no_license | <?php
/**
* @package Models
* @subpackage Poll
* Question of a poll
*/
class Model_Question extends Model_Db
{
protected $_attributes = array(
'poll' => 'poll_id',
'title' => 'title',
'description' => 'description',
'minvariants' => 'min_variants',
'maxvarian... | true |
7035296ef2ce3153b35fade27355b92ff758796e | PHP | MacoRudy/CoursPHP | /5-clientserveur/cookies/filterInput.php | UTF-8 | 383 | 2.78125 | 3 | [] | no_license | <?php
$prenom = filter_input(INPUT_COOKIE, 'prenom', FILTER_SANITIZE_STRING);
if($prenom) {
echo '<p><code>$prenom = </code>' . $prenom . '</p>';
} else {
echo '<p>Pas de cookie "prenom"</p>';
}
$nom = filter_input(INPUT_COOKIE, 'nom', FILTER_SANITIZE_STRING);
if($nom) {
echo '<p><code>$nom = </code>' . $n... | true |
9d99b609da4beca161f70ae72a20bae25bb828fb | PHP | vamshi798/basic-chat-app | /new_friend.php | UTF-8 | 1,071 | 2.71875 | 3 | [] | no_license | <?php
require 'connect.php';
require 'core.php';
$another_user_id=0;
if(isset($_POST['user_name']) && isset($_SESSION['id'])){ //check for username and id of current user before adding friends
$current_user_id = $_SESSION['id']; // get users current id
$user_name = $_POST['user_name']; // get users username
... | true |
524f5caad818bb37560b41e1358e3dd85fb489e7 | PHP | Chum3/cloth_shop | /app/common/business/BusBase.php | UTF-8 | 2,889 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by Edmund.
* Motto: 加油,凤凰苑 (๑❛ᴗ❛๑)
* Date: 2020/4/19
* Time: 11:55
*/
namespace app\common\business;
class BusBase
{
/**
* 新增逻辑
* @param $data
* @return int|mixed
*/
public function add($data) {
$data['status'] = config("status.mysql.table_normal");
... | true |
ae7e7f234db62ac3aa77a0ca1c03781944ca6965 | PHP | appcompass/appcompass-php | /src/Listeners/UserEventSubscriber.php | UTF-8 | 1,871 | 2.59375 | 3 | [] | no_license | <?php
namespace AppCompass\Listeners;
use Carbon\Carbon;
use Illuminate\Support\Facades\Cache;
use AppCompass\Events\Login;
use AppCompass\Events\Logout;
use AppCompass\Events\UserCheck;
use AppCompass\Events\UserUpdated;
class UserEventSubscriber
{
/**
* Handle user login events.
*/
public functi... | true |
239a2a113290d27ed8fbebaf71c6e047885a3d71 | PHP | tobias290/PHP-Web-Framework | /Security/Hash.php | UTF-8 | 1,333 | 3.421875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: tobys
* Date: 09/01/2018
* Time: 21:12
*/
namespace Framework\Security;
use Framework\Exceptions\HashNotCreatedError;
/**
* Class Hash
* Wrapper and helper class for creating password hashes
* @package Framework\Security
*/
final class Hash {
... | true |
b3275c8b10220e9bc122821393a7ba09d9c17e66 | PHP | kynull/mihua_loan | /extend/risk/DefaultCafintechClient.php | UTF-8 | 5,107 | 2.703125 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
namespace risk;
class DefaultCafintechClient implements CafintechHttpClient
{
const DEFULT_CHARSET = "UTF-8";
//系统原来默认的链接超时间
private $DEFAULT_CONNECT_TIME_OUT = 30000;
//系统原来默认的读取超时间
private $DEFAULT_READ_TIMEOUT = 45000;
private $serverCertPath = "";
private $serverUrl;
private ... | true |
582136accbacaad381a7c2efc2f6bb4e109b33c8 | PHP | fnzv/411 | /phplib/Enricher/IP.php | UTF-8 | 483 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace FOO;
/**
* IP Enricher
* Return GeoIP information on an IP address.
* @package FOO
*/
class IP_Enricher extends Enricher {
public static $TYPE = 'ip';
public static function process($data) {
$curl = new Curl;
$raw_data = $curl->get(sprintf('https://freegeoip.net/json/%s', ... | true |
a98fd42ada7614394b64939a46b643eef5b1e41e | PHP | mszula/XCaliber-assessment-task | /backend/src/Domain/Model/Bonus/ValueObject/RewardValue.php | UTF-8 | 439 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Domain\Model\Bonus\ValueObject;
use App\Domain\Model\Bonus\ValueObject\Exception\InvalidRewardValue;
use App\Domain\Shared\ValueObject\IntegerValueObject;
class RewardValue extends IntegerValueObject
{
public function __construct(int $value)
{
if ($value ... | true |
0d9dc95b8482a5613ddc79938a919e9db5be39fd | PHP | Rovota/Core | /src/Http/Client/Client.php | UTF-8 | 3,028 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Software Department <developers@rovota.com>
* @copyright Copyright (c), Rovota
* @license MIT
*/
namespace Rovota\Core\Http\Client;
use GuzzleHttp\Client as Guzzle;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\RedirectMiddleware;
use Psr\Http\Message\RequestInterface;
u... | true |
23efc04f61268dc0d8ab6c010331f3abfcf4d692 | PHP | sbesselsen/beanstalk-satis-gen | /src/BeanstalkSatisGen/File/Config.php | UTF-8 | 2,095 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace BeanstalkSatisGen\File;
use BeanstalkSatisGen\FileNotReadableException;
class Config extends Json
{
/**
* Beanstalk subdomain, i.e. the "foo" in https://foo.beanstalkapp.com/
* @var string
*/
public $subdomain;
/**
* Beanstalk username
* @var string
*/
pu... | true |
ce1aa245f1952c107c9aa9681bf9f1ad58f17b9b | PHP | januarfonti/asiko | /application/views/pdf.php | UTF-8 | 3,726 | 2.515625 | 3 | [] | no_license | <?php ob_start(); ?>
<h4>LAPORAN SURAT MASUK</h4>
<h5>BAGIAN ANGGARAN BPKAD KABUPATEN BLITAR</h5>
<table border="1px">
<thead>
<tr>
<th rowspan="2">No</th>
<th rowspan="2">No Agenda</th>
... | true |
f721e24f2e1333fc026dcb0f833759eb74db42c3 | PHP | cbolk/aikikaimilano-website | /admin/class.login.php | UTF-8 | 4,028 | 2.84375 | 3 | [] | no_license | <?php
//start session
if(!isset($_SESSION['loggedin']))
session_start();
//$_SESSION['loggedin'] = '';
class logmein {
//table fields
var $user_table = 'user_t'; //Users table name
var $user_column = 'login'; //USERNAME column (value MUST be valid email)
var $pass_column = 'passwd... | true |
1037069c739d67d1d494bc6f7cdb5421dc278d49 | PHP | gabrielbramello/ifb | /semestre3/desenvolvimento-sistemas-web/listas/lista8/questao2-processa.php | UTF-8 | 2,073 | 3.078125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?php
$preco=0;
echo "<p>Olá $_GET[nome] $_GET[sobreno... | true |
29bd421e82a8d2648441fe1f4305c6a4c94ac9e6 | PHP | 1653071/Group3_UDPT_FE | /FE_Admin/model/Login.php | UTF-8 | 1,545 | 2.65625 | 3 | [] | no_license | <?php
class LoginModel
{
public static function login()
{
session_start();
if (isset($_POST["action"])) {
$username = $_POST["username"];
$password = $_POST["password"];
$payload = json_encode(array(
"username" => $username,
"pa... | true |
f0de7993d3d847586ba19ac3cd0c5aff3ca9b322 | PHP | zviryatko/nomail | /src/Sendmail.php | UTF-8 | 7,256 | 2.65625 | 3 | [] | no_license | <?php
namespace zviryatko\nomail;
/**
* Simple sendmail command implementation, no authorization, just mail.
*/
class Sendmail implements MailInterface {
/**
* @var false|resource
*/
private $sock;
/**
* Server name.
*
* @var string
*/
private string $serverName;
/**
* Server addre... | true |
abc50776cb05b9053325eb663ae9b93f6f4c064f | PHP | dharmaelms/elmstest | /app/Enums/QuizAttempt/QuizAttemptStatus.php | UTF-8 | 353 | 2.625 | 3 | [] | no_license | <?php
namespace App\Enums\QuizAttempt;
use App\Enums\BaseEnum;
/**
* Class QuizAttemptStatus
*
* @package App\Enums\QuizAttempt
*/
final class QuizAttemptStatus extends BaseEnum
{
/**
* Attempt status will be opened
*/
const OPENED = 'OPENED';
/**
* Attempt status will be closed
*... | true |
cc1ddbc9b0b987a03ebc45d24a089db5676b0ce9 | PHP | xfshahrukh44/vita | /app/Repositories/AreaRepository.php | UTF-8 | 3,091 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Exceptions\Area\AllAreaException;
use App\Exceptions\Area\CreateAreaException;
use App\Exceptions\Area\UpdateAreaException;
use App\Exceptions\Area\DeleteAreaException;
use App\Models\Area;
abstract class AreaRepository implements RepositoryInterface
{
private $model;
... | true |
84f8a2273501a78d6e984cf1275b865e527b9167 | PHP | F71Tecnologia/f71sanperes | /classes/suporte.class.php | UTF-8 | 1,327 | 2.5625 | 3 | [] | no_license | <?php
include('conn.php');
class Suporte{
private $id_regiao;
private $id_projeto;
private $exibicao = 1;
private $tipo = 5;
private $prioridade = 4;
private $assunto;
private $menssagem;
private $data_cad;
private $id_user_cad;
private $pagina;
private $status;
private $status_r... | true |
233418c85033dfec3398ee0b2630500ce9698326 | PHP | xgq07/mcshop | /app/Services/Goods/GoodsServices.php | UTF-8 | 7,157 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Goods;
use App\Input\GoodsListInput;
use App\Models\FootPrint;
use App\Models\Goods\Goods;
use App\Models\Goods\GoodsAttribute;
use App\Models\Goods\GoodsProduct;
use App\Models\Goods\GoodsSpecification;
use App\Models\Goods\Issue;
use App\Services\BaseServices;
use Carbon\Carbon;
use I... | true |
9f87619fa7506b02a7ccc7780587d1e5e2d9c1a7 | PHP | cyd01/KiTTY | /docs/check_update.php | UTF-8 | 2,119 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
if( !isset($_REQUEST["version"]) ) header("Location: http://www.9bis.net/kitty/" ) ;
else {
$bin_version = $_REQUEST["version"] ;
if( !preg_match( "/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/", $bin_version ) ) { $bin_version = "0.0.0.0" ; }
if( $fd = fopen( "version.txt", "r") ) {
$l... | true |
03c8088c82fa4fd41a9ac6de94c7dae1a5dbcec6 | PHP | jakubkulhan/chrome-devtools-protocol | /gen-src/ChromeDevtoolsProtocol/Model/CacheStorage/RequestCacheNamesRequestBuilder.php | UTF-8 | 1,253 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace ChromeDevtoolsProtocol\Model\CacheStorage;
use ChromeDevtoolsProtocol\Model\Storage\StorageBucket;
/**
* @generated This file has been auto-generated, do not edit.
*
* @author Jakub Kulhan <jakub.kulhan@gmail.com>
*/
final class RequestCacheNamesRequestBuilder
{
private $securityOrigin;
private... | true |
14ba35f5939f56eadb874ba69cf6d3556385e8f8 | PHP | DavidIvanov02/Atlas-Service-Managment | /backend/_ide_helper_models.php | UTF-8 | 14,007 | 2.5625 | 3 | [] | no_license | <?php
// @formatter:off
/**
* A helper file for your Eloquent Models
* Copy the phpDocs from this file to the correct Model,
* And remove them from this file, to prevent double declarations.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
namespace App\Http\Api\Chart\Models{
/**
* |----------------------... | true |
6bffcd299fbc34a65a2a3d1bca8cf20c4204b9e6 | PHP | quirozeduardo/Seasson | /app/Http/Controllers/Admin/GenderController.php | UTF-8 | 3,534 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\DataTables\Admin\GenderDataTable;
use App\Http\Requests\Admin;
use App\Http\Requests\Admin\CreateGenderRequest;
use App\Http\Requests\Admin\UpdateGenderRequest;
use App\Repositories\Admin\GenderRepository;
use Flash;
use App\Http\Controllers\AppBaseController;
use R... | true |
5a69327f5b02974deb6f77e64e330e97f1d4acb3 | PHP | desam/organizer | /src/Application/NewsLetterBundle/Entity/NewsRequest.php | UTF-8 | 1,698 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Application\NewsLetterBundle\Entity;
class NewsRequest{
/**
* @validation:Email
* @validation:NotBlank
*/
protected $mail;
public function getMail(){
return $this->mail;
}
public function setMail( $mail){
$this->mail = $mail;
}
... | true |
9bd495939d207a9408f91ab576caa004f6bb6bfe | PHP | ESNFranceG33kTeam/sf_logoinserter | /src/MainBundle/Command/ImportSectionCommand.php | UTF-8 | 4,037 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the ESN package.
*
* (c) ESNFranceG33kTeam <https://github.com/ESNFranceG33kTeam/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MainBundle\Command;
use Doctrine\ORM\EntityManager;
use... | true |
6de08421827d01ef3333a519008034eb95ec7202 | PHP | nutsakkol/RGR | /controllers/UsersController.php | UTF-8 | 2,294 | 2.671875 | 3 | [] | no_license | <?php
class UsersController extends Controller
{
public function actionIndex()
{
$model = new UsersModel();
if (isset($_POST['Auth'])) {
if ($model->authUser($_POST['Auth'])) {
header('Location: /');
} else {
$response = 'Не правильный ло... | true |
490a3f360b95f8f6c9e8c3168839adebd5114fd9 | PHP | bold-commerce/adobe-commerce-bold-checkout | /Api/CustomerEmailValidatorInterface.php | UTF-8 | 477 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Bold\Checkout\Api;
use Bold\Checkout\Api\Data\CustomerEmailValidator\ResultInterface;
/**
* Validate customer email.
*/
interface CustomerEmailValidatorInterface
{
/**
* Validate given email.
*
* @param string $shopId
* @param string $email
* @r... | true |
f64d261e5a8b507f16f8f38be86adbe5231f4b20 | PHP | yektacc/epet24 | /app/Http/Controllers/ApiSendappuserprdlikeController.php | UTF-8 | 2,033 | 2.578125 | 3 | [] | no_license | <?php namespace App\Http\Controllers;
use Session;
use Request;
use DB;
use CRUDBooster;
use Carbon\Carbon;
class ApiSendappuserprdlikeController extends \crocodicstudio\crudbooster\controllers\ApiController {
function __construct() {
$this->table = "app_user_prd_like";
$t... | true |
4d6abc1bb319163c33eefc308f59842c1faa4ccc | PHP | Sunstradamus/Go-Plus | /database/importer.php | UTF-8 | 12,794 | 2.6875 | 3 | [] | no_license | <?PHP
include 'cfg.php';
require 'course.php';
$fh = fopen($GLOBALS['DUMPFILE'], 'r');
$cont = fread($fh, filesize($GLOBALS['DUMPFILE']));
fclose($fh);
$arr = unserialize($cont);
$start = microtime(true);
$mysqli = new mysqli($GLOBALS["SQLHOST"], $GLOBALS["SQLUSR"], $GLOBALS["SQLPWD"], $GLOBALS["SQLDB"]);
if($mysqli... | true |
c352904c7554a5941eb0895b5807f1f56d0246a1 | PHP | philippe-perrot/Projet_Sondix | /src/Entity/Question.php | UTF-8 | 1,177 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\QuestionRepository")
*/
class Question
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
... | true |
634421184c60d2e95e6c908d8c93b9f2acb5ddcd | PHP | ismaelfortuna/service_order | /app/Entity/Ordem.php | UTF-8 | 3,628 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Entity;
use \App\Db\Database;
use \PDO;
class Ordem{
/**
* Identificador único da ordem de serviço
* @var integer
*/
public $id;
/**
* Título da ordem de serviço
* @var string
*/
public $titulo;
/**
* Descrição da... | true |
4fd3889f3680d03a8c9ffd381dba0e3023684a4d | PHP | jan-wilhelm/exclamo-website | /app/Services/UserService.php | UTF-8 | 1,276 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\User;
use App\School;
use App\Repositories\UserRepository;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;
class UserService
{
protected $userRepo;
public function __construct(UserRepository $userRepo)
{
$this->userRepo = $userRepo;
}
public function getUsersForT... | true |
8b288124ba4e7ecca578ce18f62572cd48c85a54 | PHP | retailcrm/api-client-php | /src/Model/Request/Store/PricesUploadRequest.php | UTF-8 | 973 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP version 7.3
*
* @category PricesUploadRequest
* @package RetailCrm\Api\Model\Request\Store
*/
namespace RetailCrm\Api\Model\Request\Store;
use RetailCrm\Api\Component\FormData\Mapping as Form;
use RetailCrm\Api\Interfaces\RequestInterface;
/**
* Class PricesUploadRequest
*
* @category Price... | true |
717381f1541c766cf8d716d79d7f70c9d47adc3f | PHP | Dimonka2/flatform | /src/Form/Components/Table/Formatter/ElementMapping.php | UTF-8 | 1,008 | 2.59375 | 3 | [] | no_license | <?php
namespace dimonka2\flatform\Form\Components\Table\Formatter;
class ElementMapping
{
public const bindings = [
// inputs
'check' => Check::class,
'checkbox' => Checkbox::class,
'date' => Date::class,
'number' => Number::class,
'sta... | true |
f346491f71c08eb258307db1aa5b99206d84c9e1 | PHP | anhnn78/learn-php | /tri/Lab02_Project_PHP - Tripvph04440/edit.php | UTF-8 | 854 | 2.75 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
</head>
<body>
<?php
$dsn = 'mysql:host=localhost;dbname=sinhvien';
$username='root';
$password='';
$db = new PDO($dsn,$username,$password);
$masv=$_POST['MaSV'];
$hoten=$_POST['HoTen'];
$diachi=$_POST['DiaChi'];
$gioitinh... | true |
82c2ac5cd98d61ff59de2abeb0d38c9401294182 | PHP | tomafoks/first-work-on-the-backend | /php/class.basket.php | UTF-8 | 2,445 | 3.046875 | 3 | [] | no_license | <?php
require_once "php/class.addToBasket.php";
class Basket extends AddToBasket
{
const DB_NAME = "db/database.db";
const DB_ORDERS = "db/orders.db";
private $_db = null;
private $_dbOrders = null;
function __construct()
{
$this->_db = new SQLite3(self::DB_NAME);
... | true |
be19e97d335e41a65d263d12a297f3015f2d6185 | PHP | limboniatech/limbonia-app-admin | /lib/App/Admin.php | UTF-8 | 3,409 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Limbonia\App;
/**
* Limbonia Admin App Class
*
* This extends the basic app with the ability to display and react to
* site administration pages
*
* @author Lonnie Blansett <lonnie@limbonia.tech>
* @package Limbonia
*/
class Admin extends \Limbonia\App\Web
{
/**
* Render this app instance ... | true |
bcf08773cb5ca1661bc46e811078f251b1cbef7b | PHP | tddwizard/magento2-exercise-contact | /Api/Data/InquiryInterface.php | UTF-8 | 1,032 | 2.875 | 3 | [] | no_license | <?php
namespace TddWizard\ExerciseContact\Api\Data;
interface InquiryInterface
{
const MESSAGE = 'message';
const INQUIRY_ID = 'inquiry_id';
const EMAIL = 'email';
/**
* Get inquiry_id
* @return string|null
*/
public function getInquiryId();
/**
* Set inquiry_id
... | true |
34c02112457d4e404dfeedbf3b4d209416d36a40 | PHP | maxalmonte14/nfl-scores | /app/Commands/AbstractCommand.php | UTF-8 | 487 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace NFLScores\Commands;
use LaravelZero\Framework\Commands\Command;
use NFLScores\Models\NFL;
abstract class AbstractCommand extends Command
{
/**
* The NFL game handler.
*
* @var \NFLScores\Models\NFL
*/
protected $NFL;
/**
* Injects the necessary dependencies.
... | true |
f24f71c80903df0c456983a3c6ed8eb63b2d9ac7 | PHP | gperler/siesta | /src/Siesta/XML/XMLStoredProcedureParameter.php | UTF-8 | 1,978 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Siesta\XML;
/**
* @author Gregor Müller
*/
class XMLStoredProcedureParameter
{
const ELEMENT_PARAMETER_NAME = "parameter";
const NAME = "name";
const SP_NAME = "spName";
const PHP_TYPE = "type";
const DB_TYPE = "dbType";
/**
* @var string... | true |
8d8b5f1079d3fcd9a2effb58ebde58db4c8131fe | PHP | Mdmseleku1/Mdmseleku1.github.io | /classes/Task.php | UTF-8 | 24,853 | 2.5625 | 3 | [] | no_license | <?php
class Task{
public static function getYearlyTasks(){
Task::getJanTasks();
Task::getFebTasks();
Task::getMarTasks();
Task::getAprTasks();
Task::getMayTasks();
Task::getJunTasks();
Task::getJulTasks();
Task::getAugTasks();
Task::getSeptTasks... | true |
02cbdf79bc629791b36d99ff949d8c5e2682c295 | PHP | fogang-creator/SITE-WEB | /sessions/contact1.php | UTF-8 | 2,558 | 3.09375 | 3 | [] | no_license |
<?php
require_once 'db.php';
//Pouvoir garder les valeurs précédentes dans l'input e cas d'erreur
$errors = []; //lister les erreurs
function randomString($n)
{
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$str = '';
for ($i = 0; $i < $n; $i++) {
$index = rand... | true |
152a49c8148fa8677d18349d37ac458842a19ff1 | PHP | elcodi/elcodi | /src/Elcodi/Component/Core/Entity/Interfaces/ValidIntervalInterface.php | UTF-8 | 1,123 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Elcodi package.
*
* Copyright (c) 2014-2016 Elcodi Networks S.L.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Marc Morera <yuhu@... | true |
3957f4a503548ec7b9b5dea56b73d02ad61e9c71 | PHP | konsultaner/DDnsLight | /DDnsLight.php | UTF-8 | 6,353 | 2.609375 | 3 | [] | no_license | <?php
/**
* Class DDnsLight
*
* Version 0.0.1
*
* Use in your Fritz!Box like
* Update-Url = https://example.de/proxy/?pass=<pass>&ip=<ipaddr>
*
* Code of this class is based on
* http://www.axelteichmann.de/DynamicDNS/index-DynDNS-mit-Fritzbox.php
*/
class DDnsLight{
const STORAGE_FILE="storage/dns.ini.p... | true |
6738f8117bf3f821a802e770cc6bca1749d365c8 | PHP | j4s/diagram | /tests/DiagramTest.php | UTF-8 | 7,582 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/** j4s\diagram */
namespace j4s\diagram;
/**
* Class DiagramTest - Тесты для класса Diagram
*
* @package j4s\diagram\DiagramTest
* @author Eugeniy Makarkin <soloscriptura@mail.ru>
* @version v1.1.0 2019-05-17 19:17:09
*/
class DiagramTest
{
/**
* Запускает тесты данного класса
... | true |
b1bb2c23bf537bbe220046206d63cc8096f48b3b | PHP | clarkeash/stage1 | /src/App/CoreBundle/Command/UserListCommand.php | UTF-8 | 773 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\CoreBundle\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
class UserListCommand extends ContainerAwareCommand
{
public function configure()
{
$this... | true |
ba9f18c3dc5a671457fac71c0744aa10da518c13 | PHP | mszewcz/php-light-framework | /src/Variables/Specific/Session.php | UTF-8 | 3,583 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Project: PHP Light Framework
*
* @author Michal Szewczyk <ms@msworks.pl>
* @copyright Michal Szewczyk
* @license MIT
*/
declare(strict_types=1);
namespace MS\LightFramework\Variables\Specific;
use MS\LightFramework\Exceptions\BadMethodCallException;
use MS\LightFramework\Exceptions\Invali... | true |
534462616bfc60e035da4d62c34fae008f181782 | PHP | OpenACalendar/OpenACalendar-Web-Core-Single-Site-For-Heroku | /oacapp/core/php/repositories/builders/AreaRepositoryBuilder.php | UTF-8 | 2,725 | 2.71875 | 3 | [] | no_license | <?php
namespace repositories\builders;
use models\SiteModel;
use models\VenueModel;
use models\CountryModel;
use models\AreaModel;
/**
*
* @package Core
* @link http://ican.openacalendar.org/ OpenACalendar Open Source Software
* @license http://ican.openacalendar.org/license.html 3-clause BSD
* @copyright (c) 2... | true |
8afb1b7b83bb23acbdb4dd44bc81d76fa790c646 | PHP | bambangadrian/exporter | /src/FieldTypes/AbstractFieldType.php | UTF-8 | 4,490 | 2.9375 | 3 | [] | no_license | <?php
/**
* Code written is strictly used within this program.
* Any other use of this code is in violation of copy rights.
*
* @package Components
* @author Bambang Adrian Sitompul <bambang.adrian@gmail.com>
* @copyright 2016 Developer
* @license - No License
* @version GIT: $Id$
* @link -
*/
n... | true |
a106f11050c0c1c4cb87da717e013951ff5d6a24 | PHP | Brajk19/The-QRef | /view/MainPageBar.php | UTF-8 | 1,546 | 2.5625 | 3 | [] | no_license | <?php
namespace view;
use router\Router;
class MainPageBar {
public static function printHTML(): void {
$createImg = create_element("img", true, ["src" => "../../resources/create.png", "class" => "bar"]);
$createIcon = create_element("a", true, ["href" => Router::getInsta... | true |
655cd73f2e0e91e6adb71e296da227729e40db63 | PHP | PopyPepo/upload-to-minio | /generater.php | UTF-8 | 1,163 | 2.578125 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ob_start();
ini_set('display_errors', 1);
date_default_timezone_set("Asia/Bangkok");
$servername = "localhost";
$database = "thefullm_booths";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password, $database);
$conn->set_charset("ut... | true |
9b298f571dff344f528bcdb722171c32f79b4ed3 | PHP | soon14/Leadsurf-activities | /pt/html/js/json/kl8.php | UTF-8 | 6,337 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive |
<?php
$result = array(
'isSuccess' => 1,
'data' => array()
);
//遗漏数临时变量
$temp = array();
//号码分布遗漏临时变量
$tempTimes = array();
//标记是否已经找到遗漏临界号码
$tempFlag = array();
//开奖球个数
$typeNum = 80;
//初始化模拟第一期的遗漏值
for($i = 0; $i < $typeNum * 10; $i++){
$temp[] = 0;
$tempFlag[] = false;
}
//初始化模拟第一期的号码分布遗漏值
for($i = 0; $i < ... | true |
212dca248c8cda02b192a002732cba83dd38028d | PHP | vladikr/affinity-calc | /affinity-calc.php | UTF-8 | 1,112 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
function cpu_affinity_calculator($atts) {
$atts = array_change_key_case((array)$atts, CASE_LOWER);
$rows = shortcode_atts(array('rows' => '8',), $atts)["rows"];
$dir=str_replace($_SERVER['DOCUMENT_ROOT'], "", __DIR__);
$ret="<script src=\"$dir/affinity-calc.js\" type=\"text/javascript\"></script>";
$r... | true |
599dd7984e12674aa486faa5aac303a1587431e5 | PHP | rouffj/phpc2 | /src/Model/User.php | UTF-8 | 919 | 3.34375 | 3 | [] | no_license | <?php
class User
{
private $id;
private $firstName;
private $lastName;
private $email;
/**
* @return int
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return string
*/
public function getFirstName(): ?string
{
return $th... | true |
9baf57b3e808622bcbf0f054b6c42e5c162e7fe5 | PHP | Test-Tools/crashreportsviewer | /www/mysql.php | UTF-8 | 4,308 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2013 Benoit Duffez
*
* 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 or ... | true |
dd03b97c84c3f730802047b1f034aef6d147ce4f | PHP | luna-vasconcelos/Curso_php_UDT | /Manipulação de arquivos/Questão 7/cadastro_de_produto.php | UTF-8 | 430 | 2.796875 | 3 | [] | no_license | <?php
# Recebe os dados do formulário
$dados = $_POST;
# Transforma o array em string
$dados = implode(" - ", $dados);
# Cria um arquivo txt
$arquivo = fopen("produtos.txt", "a+");
# Escreve os dados do produto em um arquivo
fwrite($arquivo, $dados."\n");
# Fecha o arquivo
fc... | true |
4b3a8fe8090a1e613c5cb5266164bee037338deb | PHP | xiaodan11/githup_web | /A_admin/G_admin/Lottery/GetOdds.php | UTF-8 | 828 | 2.625 | 3 | [] | no_license | <?php
class CaiPaioType {
var $Id;
var $CpName;
var $Cp=array(
7=>'六合彩',
5=>'福彩3D',
6=>'排列三',
2=>'重庆时时彩',
10=>'天津时时彩',
11=>'江西时时彩',
12=>'新疆时时彩',
8=>'北京快乐8',
3=>'北京赛车PK拾',
1=>'广东快乐十分',
4=>'重庆快乐十分',
/* 9=>'',*/
... | true |
784327fea0afd98ceb327c00a02649a9b690c990 | PHP | xdlgechao/Laravel | /database/migrations/2016_07_13_003957_create_article_table.php | UTF-8 | 1,073 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateArticleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('articles', function (Blueprint $table) {
... | true |
ee389af441e6a37066f97d063eb9e25b3ee32960 | PHP | danrichards/shopify-api | /src/Api/Variants.php | UTF-8 | 5,260 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace ShopifyApi\Api;
use BadMethodCallException;
use ShopifyApi\Client;
use ShopifyApi\Api\Traits\OwnsMetafields;
/**
* Class Variants
*
* API calls that can be carried out on a Product
*/
class Variants extends AbstractApi
{
use OwnsMetafields;
/** @var string $parameters_wrap */
protec... | true |
65bcb3b413ee119758afa1a655530b8bf78b402e | PHP | digitalkaoz/PHP-SDK | /src/Collins/ShopApi/Model/BasketItem.php | UTF-8 | 5,112 | 3.171875 | 3 | [] | no_license | <?php
namespace Collins\ShopApi\Model;
/**
* BasketItem is a class used for adding a variant item into the basket
*
* If you want to add a variant into a basket, you need to create an instance
* of a BasketItem. The BasketItem represents a variant by it's variantId.
* It can contain $additionalData that will be t... | true |
e4e244b189a99aa0e6c6aee3ff72a23d4aa3b9db | PHP | MarcoSampaio/PHP-Fatec | /aula12/produtoModel.php | UTF-8 | 563 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
class Produto{
private $id, $nome, $valor;
public function __construct($id=0, $nome, $valor){
$this->id = $id;
$this->nome = $nome;
$this->valor = $valor;
}
public function getId(){
return $this->id;
}
public function getNome(){
retur... | true |
c3e7cf00e526c129c853cbdd019d3b40e1025f1e | PHP | Willremi/Groupe6 | /projet_v2/src/views/addComment.php | UTF-8 | 1,339 | 2.59375 | 3 | [] | no_license | <?php
use App\Models\Comments;
use App\Models\Series;
// use App\Models\User;
$comment = new Comments($db);
$serie = new Series($db);
// $user = new User($db);
// var_dump($_POST['comments']);
$login = $_SESSION['login'];
$idSerie = $_GET['id'];
$urlSerie = file_get_contents("https://api.themoviedb.org/3/tv/".$idSer... | true |
9e513b2b4a75a863c9973f79971b301254ba0e49 | PHP | eexit/php-mq-sdk | /examples/amqp/worker.php | UTF-8 | 2,963 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Eexit\Mq\MessageQueue;
use Eexit\Mq\Adapter\Amqp\Amqp;
use Eexit\Mq\Adapter\Amqp\Connection;
use Eexit\Mq\EnvelopeInterface;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
require_once __DIR__ . '/../../vendor/autoload.php';
/**
* Example of a worker class
*/
class MySignalAwareWorker
{
/** @... | true |
3b355648eded9eeba2e2161726d71dd6254a1841 | PHP | ariannasg/backend-engineering-test | /src/Model/MetricsSummaryFromFileRequest.php | UTF-8 | 2,081 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace App\Model;
class MetricsSummaryFromFileRequest
{
/**
* @var string
*/
private $pathToFile;
/**
* @var DataRateUnit
*/
private $inputUnit;
/**
* @var DataRateUnit
*/
private $outputUnit;
/**
* @var array
*/
... | true |
4edca1f0efe4421b575ee26e5b3133b9ffc37cbe | PHP | ahmed1322/laravel-architecture-Interior-design-app | /app/Http/View/Composers/RecentPortfolioComposer.php | UTF-8 | 393 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\View\Composers;
use App\Models\Portfolio;
use Illuminate\View\View;
class RecentPortfolioComposer
{
/**
* Bind data to the view.
*
* @param \Illuminate\View\View $view
* @return void
*/
public function compose(View $view)
{
$view->with('recent_p... | true |
4d51f61054420f15d3b288a8a236116661d960b1 | PHP | qinggp/hiphop-php | /hphp/test/slow/array_iterator/444.php | UTF-8 | 251 | 3.15625 | 3 | [
"PHP-3.01",
"Zend-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
$a = array(1, 2, 3);
foreach ($a as $k1 => &$v1) { $v1 += $k1; }
var_dump($a);
$a = array(1, 2, 3);
for ($o = new MutableArrayIterator($a); $o->valid(); $o->next()) {
$k2 = $o->key();
$v2 = &$o->currentRef();
$v2 += $k2;
}
var_dump($a);
| true |
cfae528b51da722f5e61b79e594e45e03b537b14 | PHP | mauriciorosito/quartoinfo | /models/test.model.php | UTF-8 | 636 | 2.921875 | 3 | [] | no_license | <?php
class Test {
private $id_user;
private $name;
private $age;
private $_email;
public function setId_user($id_user){
$this->id_user = $id_user;
}
public function getId_user(){
return $this->id_user;
}
public function setName($name){
$this->name = $name;
}
publi... | true |
7ad2e39d0c937a2571d7bc1ac84a89269c024413 | PHP | sp-knoll-86/KUBootcampRepository | /01-Class-Content/21-regionalized-content/Laravel/01-Activities/02-Conditionals/Solved/solution.php | UTF-8 | 525 | 3.3125 | 3 | [] | no_license | <?php
// Name information
$first = 'Peleke';
$last = 'Sengstacke';
$full = "$first $last";
// Age information
$birth_year = 1993;
$current_year = 2016;
$age = $current_year - $birth_year;
echo "My name is $full.\n";
if (strlen($full) > 12)
echo "It's a long name.\n";
else
echo "It's a short name.\n";
echo str... | true |
02366d2253ffbcf528312e08bba0ec186f4060e0 | PHP | robertbrodrecht/adgenerate | /adgenerate | UTF-8 | 7,563 | 2.578125 | 3 | [] | no_license | #!/usr/bin/php
<?php
$ad_server = false;
$ad_size = false;
$output_folder = getcwd() . '/';
$supported_ad_servers = [
'DoubleClick',
'Sizmek',
'Generic',
'Centro',
];
$vendor_server_relation = [
'Centro' => 'Sizmek'
];
$easy_ad_sizes = [
'160x600',
'300x50',
'300x250',
'300x600',
'320x50',
'728x90'
];
$... | true |
b784eee6a1d348b6d0a819bc9c37a5c845ea4aa1 | PHP | edasan0308/laravel_todo | /app/Http/Controllers/FolderController.php | UTF-8 | 1,157 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
use App\Http\Requests\CreateFolder;
use Illuminate\Http\Request;
use App\Folder;
class FolderController extends Controller
{
public function showCreateForm()
{
return view('folders/create');
}
public function create(C... | true |
88c88a660305dddf713fc7dfe44efc150fb3b8ea | PHP | Selharem/Get-In-Touch | /profil.php | UTF-8 | 1,450 | 2.59375 | 3 | [] | no_license | <?php
session_start();
//$bdd = new PDO('mysql:host=127.0.0.1;dbname=youtube', 'root', '');
include('bd/connexionDB.php'); // Fichier PHP contenant la connexion à votre BDD
if(isset($_GET['id']) AND $_GET['id'] > 0) {
$getid = intval($_GET['id']);
$requser = $bdd->prepare('SELECT * FROM utilisateur WH... | true |
874bc245a3ea6c58f6642e41fc73cc656fbe161a | PHP | shahzodbek/Tree | /app/Logic/Service/TreeService.php | UTF-8 | 1,288 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Logic\Service;
use Faker\Provider\Lorem;
use Illuminate\Http\Request;
class TreeService
{
/**
* @param $node
*
* @return mixed
*/
public function treeToArray($node)
{
$result = $node->toArray();
$result['data'] = [
'id' => $node->id
... | true |
342de859664cf4f40fe790ec903ffa121541a6df | PHP | jeyroik/extas-workflow-dashboard | /src/interfaces/jsonrpc/IJsonRpcIndex.php | UTF-8 | 2,035 | 2.625 | 3 | [] | no_license | <?php
namespace extas\interfaces\jsonrpc;
use extas\interfaces\IItem;
use extas\interfaces\servers\requests\IServerRequest;
use extas\interfaces\servers\responses\IServerResponse;
use Psr\Http\Message\ResponseInterface;
/**
* Interface IJsonRpcIndex
*
* @package extas\interfaces\jsonrpc
* @author jeyroik@gmail.co... | true |
ccade54b2d72c450600f4ab3b82034105fe79028 | PHP | Rakeshduttpant/laraveltask | /database/seeds/ResourcesTableSeeder.php | UTF-8 | 510 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use App\Groups;
use Illuminate\Database\Seeder;
class ResourcesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$userIds = Groups::pluck('id')->toArray();
$faker = Faker\Factory::create();
for ($i = 0; ... | true |
d5a477cf494739532ca6cd3afd7559b4f865cb46 | PHP | trang-trang/Php | /BAITAP/dbcon.php | UTF-8 | 303 | 2.53125 | 3 | [] | no_license | <?php
$dbname = 'login';
$servername ='';
$password='';
$us='root';
$conn = new mysqli($servername, $us, $password, $dbname);
if ($conn->connect_error) {
//Xuất thông báo lỗi và dừng chương trình
die("Connection failed: " . $conn->connect_error);
}
?> | true |
872150474860a264db15498f7f4c3671ce6b7119 | PHP | Tom-vdm-Hz/laravel-fde2-testing | /app/Http/Controllers/UserController.php | UTF-8 | 2,735 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Log;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
publ... | true |
aa065e8145327413b7a95022819afd5315f0a4fd | PHP | AmaraLiving/php-onehydra | /src/Amara/OneHydra/ResultBuilder/PageResultBuilder.php | UTF-8 | 1,973 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the php-onehydra package.
*
* (c) Amara Living Ltd
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Amara\OneHydra\ResultBuilder;
use Amara\OneHydra\Api;
use Amara\OneHydra\Exception\Resu... | true |
4510eb90f692cf264c0b6415b7118eed631c1b7b | PHP | dgood-gdba/smart-sheets | /src/Endpoints/UserEndpoints.php | UTF-8 | 889 | 2.765625 | 3 | [] | no_license | <?php
namespace DgoodGdba\SmartSheets\Endpoints;
trait UserEndpoints
{
/**
* Gets the sheet version without loading the entire sheet.
*
* @param $sheet_id
* @return array
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function getUsers($page = 1, $pageSize = 100, $incl... | true |
724610f542890ae1a9159c6c85f4eaaf1ef76e92 | PHP | flashport/json-marshaller | /src/Attributes/Validation/JsonValidateEquals.php | UTF-8 | 477 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php namespace JsonMarshaller\Attributes\Validation;
use Attribute;
#[Attribute]
class JsonValidateEquals implements ValidationAttribute
{
protected array $compareTo;
/**
* @param mixed $compareTo
*/
public function __construct(mixed $compareTo)
{
$this->compareTo = is_array($com... | true |
3dee3520b21aa6066e8318f2dacdc52f7ea0b96a | PHP | rimadiahw/fibonacci | /app/Http/Controllers/FibonacciController.php | UTF-8 | 1,667 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class FibonacciController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
/*public function __construct()
{
$this->middleware('auth');
}*/
/**
* Show the applicati... | true |
1cda6c772feaa82ca4084b59bab63323982aa2af | PHP | niranjanbhoi/biometric-attendance-system | /api/device_add.php | UTF-8 | 1,318 | 2.625 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "creative_tm";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$device_name = $_POST['device_name'... | true |
dc8f811082c24e13f12ac8a49bf0549b9500d4e8 | PHP | kingfree/naomoe | /app/Option.php | UTF-8 | 1,495 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Option extends Model
{
// protected $casts = [
// 'info' => 'json',
// ];
protected $fillable = ['character_id', 'group_id', 'title', 'winner', 'valid', 'voted', 'created_at', 'updated_at'];
public function character()
{
... | true |
ecd1e257303e40c2251b77afe2b635a03fdf9cdf | PHP | LuccaMariani/Mariani.JuanLuca.PPLABIII | /EliminarProductoEnvasado.php | UTF-8 | 922 | 2.609375 | 3 | [] | no_license | <?php
require "./clases/ProductoEnvasado.php";
try
{
if(isset($_POST['producto_json']) )
{
$producto_json = $_POST['producto_json'];
$obj = json_decode($producto_json);
$retornoJSN = new stdClass();
$retornoJSN->exito = false;
... | true |
f11d43d75952c98d933a69ce187c8f84bacb458f | PHP | andreaheltai/php-loops | /Ex1.1-stelute.php | UTF-8 | 253 | 3.46875 | 3 | [] | no_license | /*
Create a script to construct the following pattern, using nested for loop.
*
* *
* * *
* * * *
* * * * *
*/
<?php
$stars = 5;
for ($i=1; $i<=$stars; $i++) {
for ($j=1; $j<=$i; $j++) {
echo "*";
}
echo "<br>";
}
?>
| true |
c6222f52d9f157c70f10f20566e887729d06a11a | PHP | emirha/workshop | /class/lib/EditButton.php | UTF-8 | 431 | 2.796875 | 3 | [] | no_license | <?php
class EditButton extends Column {
public $action;
public $onclick;
function __construct($action = 'editform') {
$this->action = $action;
}
function toString($baseURL) {
$onclick = empty($this->onclick) ? 'onclick="'.$this->onclick.'"' : '';
return '<a href="'.$baseUR... | true |
4f893a53edeb49acc69fc0340364858b74cd2424 | PHP | Akii/Le-Coop-2.0 | /lecoop/Classes/Domain/Model/Exception.php | UTF-8 | 2,703 | 2.53125 | 3 | [] | no_license | <?php
/***************************************************************
* Copyright notice
*
* (c) 2012 Maier Philipp <Zedd@akii.de>
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of ... | true |
dc04590f9a69faac48f5ba55e3c2c56e98be3cfe | PHP | abrenicamarkjoshua/gomecoInventory | /app/products.php | UTF-8 | 607 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\inventorycount;
use Illuminate\Database\Eloquent\Model;
class products extends Model{
protected $table = 'products';
protected $fillable = [
'productName',
'productDesc',
'sellingprice',
'category_id',
'picture'
];
public function gettotalQuantity(){
$inventorycountReple... | true |
0b496c8b6b586c0234a386f93e309c5e44892de1 | PHP | sumardi/php-course-18072020 | /functions.php | UTF-8 | 1,388 | 3.921875 | 4 | [] | no_license | <?php
// User-Defined Functions
// declaring function
function greet(string $name, int $age, string $language = 'malay') // default value
{
if ($language == 'english') {
echo 'Hello, Welcome ' . $name . '!<br />';
echo 'Your age is ' . $age . '<br />';
} elseif ($language == 'malay') {
... | true |
1d8e535e1b11b9baf010316f218d672969ffb0c9 | PHP | shawnbutts/SotaSTATS | /website/craftGraphDaily.php | UTF-8 | 2,186 | 2.53125 | 3 | [] | no_license | <?php
$cachepath = getcwd();
require_once('../ucfg/dbInclude.php');
$args = '' . dbsanitize($dbLink, $_GET["Archetype"]) . ',2';
$cacheName = preg_replace("/[^a-z0-9\_\.]/", "", strtolower($_GET["Archetype"]));
$cachepath = "" . $cachepath . "/cache/" . $cacheName . "-daily.png";
$CacheOff = $_GET['cacheoff'];
if (... | true |
63f344af4fa49a0bdcf8e932de3a7a9da5898560 | PHP | yakovenko33/Test-Lararavel-task-prototype- | /MyProject/UserModule/UI/Console/DeleteMessagesMoreOneHour.php | UTF-8 | 1,256 | 2.828125 | 3 | [] | no_license | <?php
namespace MyProject\UserModule\UI\Console;
use Carbon\Carbon;
use Illuminate\Console\Command;
use MyProject\UserModule\Infrastructure\Interfaces\MessagesRepositoryInterface;
class DeleteMessagesMoreOneHour extends Command
{
/**
* The name and signature of the console command.
*
* @var strin... | true |