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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
bf2c870f3ed1c7e7d76cee187dcb4fa7453311fa | PHP | immanjil/shortAlgorithm | /FirstUniqueCharInString.php | UTF-8 | 334 | 3.328125 | 3 | [] | no_license | <?php
/**
* @param String $s
* @return Integer
*/
function firstUniqChar($s)
{
if (empty($s)) {
return -1;
}
$sArr = str_split($s);
$sCount = array_count_values($sArr);
foreach ($sCount as $k => $v) {
if ($v === 1) {
return array_search($k, $sArr);
}
}
... | true |
378d61cd904e1a502e1f39a20d0f4fb020a98f04 | PHP | PatrickSH/XLSXToText | /index.php | UTF-8 | 3,141 | 3.203125 | 3 | [] | no_license | <?php
include 'simplexlsx.class.php';
class ReadFile
{
const INCLUDEHEADERROWS = false;
const INCLUDEEMPTYVALUES = false;
const WRITEMETHOD = "array"; //Can be: file(Requires destination file value),print(Will print array on screen), array(Will print as is) all is provided as string values
const DEST... | true |
1ecc584adfb2262f09c56a86929246c3231c9a73 | PHP | murribu/fancyfootball | /app/Models/League.php | UTF-8 | 4,527 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use DB;
use Illuminate\Database\Eloquent\Model;
class League extends Model {
use HasSlugTrait;
protected $table = 'leagues';
public function league_attributes_values(){
return $this->hasMany('App\Models\LeagueAttributeValue');
}
public function ... | true |
46e70eb2d114bd73b9415b42b2ffb5fba395d6f8 | PHP | renatotnk/UDESC | /Optativas/ODAW/Trabalho Final/novo_evento.php | UTF-8 | 1,373 | 2.703125 | 3 | [] | no_license | <?php
if(isset($_POST['nome']) && isset($_POST['quadra']) && isset($_POST['data1']) && isset($_POST['data2'])){
$nome = $_POST['nome'];
$quadra = $_POST['quadra'];
$data1 = date_create_from_format('d/m/Y H:i', $_POST['data1']);
$data2 = date_create_from_format('d/m/Y H:i', $_POST['data2']);
... | true |
f481b74a3788c8447858a9950c94768cdad597ca | PHP | mxloco/SpiceFramework | /tests/unit/Spice/Filter/InRangeTest.php | UTF-8 | 4,547 | 3 | 3 | [] | no_license | <?php
namespace Spice\Filter;
class InRangeTest extends \PHPUnit_Framework_TestCase {
private $filter;
public function getFilter($start, $end) {
return new \Spice\Filter\InRange($start, $end);
}
public function setUp() {
$rangeStart = 0;
$rangeEnd = 10;
$inclusive = fa... | true |
0b4ea504e428c3ee7651dfbff90eb4a1ba54a19e | PHP | zlezero/Projet_PHP_Ecommerce | /controllers/Controller_articles.php | UTF-8 | 7,118 | 2.671875 | 3 | [] | no_license | <?php
require_once("Controller.php");
require_once("models/class.ConfigArticles.php");
require_once("models/class.ArticlesManager.php");
require_once("models/class.CategorieManager.php");
require_once("models/class.PanierManager.php");
class Controller_articles extends Controller {
public function action_default() ... | true |
32faf19f5baef173c5b88a4e9516938f1f9d3fe3 | PHP | foobarz076/DiceRobot | /src/Action/Message/PutBack/Put.php | UTF-8 | 3,538 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DiceRobot\Action\Message\PutBack;
use DiceRobot\Action\Message\PutBackAction;
use DiceRobot\Data\Deck;
use DiceRobot\Data\Report\Message\{FriendMessage, GroupMessage, TempMessage};
use DiceRobot\Data\Resource\CardDeck;
use DiceRobot\Exception\CardDeckException\InvalidExceptio... | true |
000f5e7e3bdae7e351260db5e436f9910f9e15ba | PHP | YaakoubiMohamed/symfony_store | /src/Entity/Contact.php | UTF-8 | 1,538 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\ContactRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ContactRepository::class)
*/
class Contact
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column... | true |
91d0976833cff471afecb5569806199ebc175f51 | PHP | charlieoduk/API-SHEETS-TWILIO | /Order.php | UTF-8 | 2,306 | 3.0625 | 3 | [] | no_license | <?php
class Order
{
private $googleSheets;
private $orderDesk;
private $twilio;
public function __construct( GoogleSheetsClient $googleSheets, OrderDeskApiClient $orderDesk, Twilio\Rest\Client $twilio )
{
$this->googleSheets = $googleSheets;
$this->orderDesk = $orderDesk;
$this-... | true |
aa1c73286fe1bf69ab3c6cd6ee35b571da0f4e9d | PHP | barnabywalters/php-activitystreams | /tests/CollectionTest.php | UTF-8 | 3,338 | 2.796875 | 3 | [] | no_license | <?php
namespace ActivityStreams\Test\ActivityStreams;
use ActivityStreams\ActivityStreams\Collection,
ActivityStreams\ActivityStreams\Activity,
ActivityStreams\ActivityStreams\Object,
PHPUnit_Framework_TestCase,
DateTime;
class CollectionTest extends PHPUnit_Framework_TestCase {
public function ... | true |
09f3873549b53cd1f7c06d5ade553b4a448cdfeb | PHP | nrwtaylor/stack-agent-thing | /agents/Shuffle.php | UTF-8 | 9,766 | 2.625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
namespace Nrwtaylor\StackAgentThing;
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
ini_set("allow_url_fopen", 1);
class Shuffle extends Agent
{
public $var = 'hello';
function init()
{
if ($this->thing->container['stack']['state'] == 'dev') {
... | true |
fadd9b0821b0466e3fa514162f4edd1ec0c577e6 | PHP | chandramani212/dutravles | /sm-admin/ajax/Update/Update-User-Photo.php | UTF-8 | 1,272 | 2.546875 | 3 | [] | no_license | <?php include('../../core/int.php');
include('../../abeautifulsite/SimpleImage.php');
if(isset($_FILES["photo"]["type"])) {
$img = new abeautifulsite\SimpleImage();
$image = rand().$_FILES["photo"]["name"];
$image_tmp = $_FILES["photo"]["tmp_name"];
$id = $_POST['id'];
$img_id = $_POST['img_id'];
$image_path =... | true |
c005e89eff8d0cd1186fc285851b24ae4ded5a9c | PHP | SealinGp/api | /php_down/algorithm.php | UTF-8 | 3,348 | 3.328125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sea
* Date: 2018/8/10
* Time: 6:50
*/
$start = microtime(true);
header('content-type:application/json;');
#sort int[]
$arr = [];
for ($i = 0; $i < 5000; $i++) {
$arr[] = rand(1, 10000);
}
function change(&$a,&$b)
{
$c = $a;
$a = $b;
$b = $c;
}
//1.insert sor... | true |
7214ac186e4cdbee0c039151f7b51897dc639ed8 | PHP | kinoooshnik/country-house-realty | /widgets/Article.php | UTF-8 | 1,082 | 2.765625 | 3 | [] | no_license | <?php
namespace app\widgets;
use yii\base\Widget;
use yii\helpers\Url;
/**
* Article widget renders a title of article on a blur background image.
*
* How to use:
*
* ```php
* Article::begin(['image' => ['/img/background.jpg'], 'title' => 'My title']);
* //Your article text.
* Article::end();
* ```
*/
clas... | true |
2ab84e97a6f6c1f1b6782aa666974d964137dc2a | PHP | abrahamcasanova/peliculas_api | /app/Console/Commands/AddFtpFolderUsers.php | UTF-8 | 3,969 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use FTP;
use App\User;
use App\UserDevice;
use Illuminate\Console\Command;
use Lazzard\FtpClient\FtpClient;
use Lazzard\FtpClient\Connection\FtpConnection;
use Lazzard\FtpClient\Config\FtpConfig;
class AddFtpFolderUsers extends Command
{
/**
* The name and signature of ... | true |
5dad7be91f8b6b93a7543fda08541a6edd0c6f62 | PHP | ericksonreyes/domain-driven-design | /src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Address/ZipCode.php | UTF-8 | 748 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace EricksonReyes\DomainDrivenDesign\Common\ValueObject\Address;
use EricksonReyes\DomainDrivenDesign\Common\Abstracts\SizeableAndMatchableString;
use EricksonReyes\DomainDrivenDesign\Common\ValueObject\Address\Exception\EmptyZipCodeError;
/**
* Class ZipCode
* @package EricksonReyes\DomainDrivenDesig... | true |
008364076c70a66cf97c6cfc71d23ed2c3684547 | PHP | richaas/aurora | /util/base64url.php | UTF-8 | 348 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace aurora\util;
class base64url
{
public static function encode($data)
{
return rtrim(strtr(base64_encode($data), "+/", "-_"), "=");
}
public static function decode($data)
{
$pad = strlen($data) % 4;
$pad = $pad ? 4 - $pad : 0;
while ($pad--)
$data .= "=";
return base64_decode(strt... | true |
79d0e5dcf62eab8e1e2542fe3a809ffe44dd4ab3 | PHP | liuzhaozihan/107Studio | /task6/zhaomin/forth/user_manage.php | UTF-8 | 3,227 | 2.625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>管理我的信息</title>
</head>
<style type="text/css">
h3{
text-align: center;
}
table
{
font-family: "宋体";
border-collapse: collapse;
margin: 0 auto;
text-align: center;
}
... | true |
28c4916da12422e7be9c79d879f66e407654ea9a | PHP | rbertram90/quizzerino-server | /app/PlayerManager.php | UTF-8 | 4,444 | 3.203125 | 3 | [] | no_license | <?php
namespace rbwebdesigns\quizzerino;
class PlayerManager {
/** @var Player[] */
protected $players;
/** @var Game */
protected $game;
/** @var Player */
protected $hostPlayer;
public function __construct($game)
{
$this->players = [];
$this->hostPlayer = null;
... | true |
c9dce4216913318fce0b4c57439a5e64b8a56fa2 | PHP | faith1995/SE_PROJECT_Group2 | /backend/objects/appoinment.php | UTF-8 | 2,980 | 3.21875 | 3 | [] | no_license | <?php
class Appoinment{
//databse connection
private $conn;
//object properties
public $id;
public $type;
public $date_time;
public $reason;
public $status;
public function __construct($db){
$this->conn = $db;
}
function create(){
try {
//query t... | true |
49d2c489c2f2abaa99baa5ff07218314370ea78a | PHP | hi-noikiy/mini-programe-framework | /addons/longbing_card/core/thinkphp/library/think/cache/driver/Sqlite.php | UTF-8 | 3,323 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php namespace think\cache\driver;
class Sqlite extends \think\cache\Driver
{
protected $options = array( "db" => ":memory:", "table" => "sharedmemory", "prefix" => "", "expire" => 0, "persistent" => false );
public function __construct($options = array( ))
{
if( !extension_loaded("sqlite") )
{
throw new... | true |
5bc958e1290168babc806b29869370bb5522f8ac | PHP | frankwoodtiger/ee-quesapp | /model.php | UTF-8 | 1,005 | 3.390625 | 3 | [] | no_license | <?php
class QuesAnsPair {
private $ques_id;
private $question;
private $answers;
private $answer;
function __construct($ques_id, $question, $answers, $answer) {
$this->ques_id = $ques_id;
$this->question = $question;
$this->answers = $answers;
$this->answer = $answer;
}
public function ... | true |
b9524d1e40e7cea48a725bd7175eb98a33fc319b | PHP | bingcool/swoolefy | /Test/Task/TestTask.php | UTF-8 | 1,924 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Test\Task;
use Swoolefy\Core\Application;
use Swoolefy\Core\Task\TaskController;
use Test\Factory;
class TestTask extends TaskController
{
public function doRun(array $taskData)
{
$fromWorkerId = $this->getFromWorkerId();
$msg = is_array($taskData) ? json_encode($taskData) : ... | true |
e5146bf199262c1c334ce799db068adcc905754d | PHP | YoCha89/gbaf | /App/Frontend/FrontendApplication.php | UTF-8 | 1,606 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Frontend;
use \OCFram\Application;
class FrontendApplication extends Application
{
public function __construct()
{
parent::__construct();
$this->name = 'Frontend';
}
public function run()
{
//Paramétrage des actions que l'on doit pouvoir effectuer hors connexion
if... | true |
5d4c6755afccf94fc62de7437cc91287e8027ef4 | PHP | yesha074/Hema-Traders | /Hema-Traders/web/admin/insert_cat.php | UTF-8 | 2,636 | 2.609375 | 3 | [] | no_license | <?php
if(!isset($_SESSION['admin_email']))
{
echo "<script>window.open('login.php','_self')</script>";
}
else
{
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Admin Panel</title>
<style type="text/css">
form{margin:1%;font-size:20px; text-align:center;}
.btnn{background:#fe... | true |
0a6e4e7e6f26aa7750781f2f201dcc8f4397cbc8 | PHP | Jakubsoad/DesignPatternsCourse | /behavioral_patterns/Observer.php | UTF-8 | 2,437 | 3.359375 | 3 | [] | no_license | <?php
interface Observable
{
public function addObserver(Subscriber $subscriber): void;
public function notifyObserver(Message $message): void;
}
interface Observer
{
public function __construct(string $name);
}
class Message
{
private string $content;
public function __construct(string $content... | true |
44814a33c7a99d4b8f4f20e713e4ccc9e333dae3 | PHP | formigone/webdevfiddle | /index.php | UTF-8 | 1,185 | 2.765625 | 3 | [] | no_license | <?php
/**
* @author Rodrigo Silveira
* @date 11/9/2012
*/
$path = ".";
$dh = opendir($path);
function fileOrDirClass($handle) {
$classes = array("file", "dir");
return is_dir("./". $handle) ? $classes[1] : $classes[0];
}
function isFileOrDir($entry) {
return (bool)(preg_match("/\w/", $entry));
}
function proj... | true |
cb3e34cd9496af577093b83062081a2540f4e9bd | PHP | sourcegr/appx | /lib/tests/Database/QueryBuilder/ParamsTest.php | UTF-8 | 2,031 | 2.640625 | 3 | [] | no_license | <?php
namespace Sourcegr\Tests\Database\QueryBuilder;
use Sourcegr\Framework\Database\QueryBuilder\Params;
use PHPUnit\Framework\TestCase;
class ParamsTest extends TestCase
{
public function testStraightWhere(): void
{
$expected = [['id', '=', 1, 'AND']];
$params = new Params(null);
... | true |
f6b65b47f89e4984d22b1ec5a9b54aac31295616 | PHP | jubasse/projet-webapp | /app/Http/Controllers/Api/WomanModelController.php | UTF-8 | 3,642 | 2.546875 | 3 | [] | no_license | <?php
namespace Model\Http\Controllers\Api;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Model\Models\WomanModel;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Collection;
use Model\Http\Controllers\Controller;
use Model\Http\Requests\WomanModelRequest;
use Model\Http\Resou... | true |
1cddc0845392165ccc5e6f629fa1438fe13e2ba3 | PHP | maghfir/PIF456 | /opPercabangan.php | UTF-8 | 1,009 | 3.375 | 3 | [] | no_license | <html>
<title>Operasi Percabangan</title>
<head>Operasi Percabangan switch-case<head>
<body>
<?php
$angkaBln = date("n");
switch($angkaBln) {
case 1 :
$namaBln = "Januari";
break;
case 2 :
$namaBln = "Pebruari";
break;
case 3 :
$namaBln = "Maret";
... | true |
e90256de9d64ad32fb01887bdae1ae2c2c76237c | PHP | fniftaly/dev_demo | /Downloads/FN32/Development/application/controllers/MessageController.php | UTF-8 | 3,870 | 2.890625 | 3 | [] | no_license | <?php
class Api_MessageController extends ApiControllerAbstract {
/**
* Use to get last message sent?
*
* @access public
* @return void
*/
public function indexAction() {
$this->_notImplemented();
}
/**
* Special use case here. Wiggins wants to send messages via GET.
*
* @access public
* @... | true |
4035e1f947928242fea769697defe3ac1d730896 | PHP | elrenzo07/Apuntes-PHP | /miniCalculadora.php | UTF-8 | 1,749 | 3.25 | 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>
<form method = "post">
<label for="num1">1º Termino</label>
... | true |
2f435e087ae4b21734d13ca36fddded2281ac761 | PHP | lolosambo/bileMo | /src/UI/Actions/DeleteUserAction.php | UTF-8 | 1,688 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
/*
* This file is part of the bileMo project.
*
* (c) Laurent BERTON <lolosambo2@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\UI\Actions;
use App\Domain\Repository\Inte... | true |
a453587119be171f1b2b06e5897fd37d1f8b9580 | PHP | ZenSide/SonataImageBundle | /Entity/Listener/ImageListener.php | UTF-8 | 4,863 | 2.546875 | 3 | [] | no_license | <?php
namespace ZenSide\SonataImageBundle\Entity\Listener;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Symfony\Component\DependencyInjection\ContainerAware;
use ZenSide\SonataImageBundle\Entity\Image;
class ImageListener extends ContainerAware
{
const UPLOAD_FOLDER = 'uploads/images/',
... | true |
1f0afd70ebf0649316a3f0b631807c08e6bcd595 | PHP | kingchewy/eProject | /backend/app/Http/Middleware/JwtMiddleware.php | UTF-8 | 1,396 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace App\Http\Middleware;
use Closure;
use Exception;
use App\User;
use Firebase\JWT\JWT;
use Firebase\JWT\ExpiredExcepti... | true |
fe59ad27518018e12df1965ac0a85a3e0929d9a7 | PHP | nmfzone/get-pejer-web | /app/Models/DeviceToken.php | UTF-8 | 819 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class DeviceToken extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'token',
];
/**
* Get all of the groups that are assigned this device token.... | true |
c2cf6e483d62df87e622e14242e6546eb38950f7 | PHP | ILuisNovoa/Empiregaming | /models/Match.php | UTF-8 | 9,255 | 2.65625 | 3 | [] | no_license | <?php
class Match
{
private $id;
private $id_tournament;
private $id_tour_detail_1;
private $id_tour_detail_2;
private $id_user;
private $start;
private $finish;
private $id_status;
public function __construct()
{
try {
$this->pdo = new Database;
} ca... | true |
ca9fa7e1b6aa275d0a5d84a47ec22aed88de3122 | PHP | sajid9505/DARS | /chart/pie1.php | UTF-8 | 690 | 2.546875 | 3 | [] | no_license | <?php
include 'db_con.php';
if (isset($_POST['uni1']) and isset($_POST['year'])) {
$uni1=$_POST['uni1'];
$year=$_POST['year'];
$sql16 = "SELECT Female_Student,(s.Admitted_Student-s.Female_Student) AS Malestd
FROM university u,student_distribution s WHERE u.UYear='$year' AND u.Uid_PK=s.uID_PK AND u.U... | true |
db0edb336ccd500b1a35ceaad48e4d72fb769334 | PHP | Optimovl/optimosite | /classes/system/utils/translators/wrappers/OfferCharacteristicWrapper.php | UTF-8 | 1,074 | 2.9375 | 3 | [] | no_license | <?php
use UmiCms\System\Trade\Offer\iCharacteristic;
/** Класс xml транслятора (сериализатора) характеристики торгового предложения */
class OfferCharacteristicWrapper extends translatorWrapper {
/**
* @inheritdoc
* @param iCharacteristic $object характеристика торгового предложения
* @throws coreExcept... | true |
6c2ace2d43c7ac3be3fba10a14879859ab89c88e | PHP | opensymap/osy | /src/Request/Request.php | UTF-8 | 753 | 2.828125 | 3 | [] | no_license | <?php
namespace Opensymap\Request;
use Opensymap\Lib\Dictionary;
class Request
{
private $req;
public function __construct(&$get, &$post, &$request, &$cookie, &$files, &$server)
{
$this->req = new Dictionary([
'cookie' => &$cookie,
'get' => &$get,
... | true |
f42fe0f68d51fe2290b4c08c7290075e94c042c4 | PHP | Lujidev/projet-annuel-JAR | /boV2/connect.php | UTF-8 | 1,619 | 2.5625 | 3 | [] | no_license | <?php
require "conf.inc.php";
require "lib.php";
$msg_error = '';
/*Vérification si le formulaire a été remplis*/
if (isset($_POST["email"]) && isset($_POST["mdp"]))
{
//Si la personne est dans la BDD et qu'il y a le bon pwd, la personne sera considérée comme connectée
$con... | true |
677d8c42d5a1b5aa9751eccba3133f83710158a9 | PHP | mustafauysal/kraken-for-wordpress | /functions/remove-trackbacks-from-comments.php | UTF-8 | 1,288 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/* ======================================================================
Remove Trackbacks From Comments v1.0
A simple function to remove trackbacks from WordPress comments by Weblog Tools Collection.
http://weblogtoolscollection.com/archives/2008/03/08/managing-trackbacks-and-pingbacks-in-your-wor... | true |
23e665d30cdbf2e0d8fa4228ed3980f11f40e4ef | PHP | tannermccoleman/laravel-angular-cashflow-app | /app/database/migrations/2015_01_20_221041_cashflow_events.php | UTF-8 | 960 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CashflowEvents extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up(){
Schema::create('cashflow_events', function(Blueprint $table) {
... | true |
c814f8481fc9a963249099809c8f05de2a875031 | PHP | sss-sr2021/GUYS | /www/Pages/createAccount.php | UTF-8 | 4,271 | 2.859375 | 3 | [] | no_license | <?php
/*
* createAccount.php :アカウント作成画面
*
* Author:伊藤明洋
* Version :0.0.1
* create :2021.05.19
* Update :2021.05.22 花岡//同一メールアドレスで複数のアカウント作成はできないように修正
* 2021.05.23 花岡//アカウント作成時、shop_infoテーブルにもデータを追加
* 2021.05.25 秦//アカウント作成の際の、パスワード入力の制限桁数、制限文字の追加、名前入力の桁数制限追加。
* 2021.05.27 伊藤//確認用のパスワード追... | true |
47dd4e55e95c6ab5cbee4561493b960129a05a42 | PHP | acwimind/app | /Lib/SearchTransformer.php | UTF-8 | 6,964 | 3.109375 | 3 | [] | no_license | <?php
interface ISwsLexer
{
public function execute( $str );
public function getTokens();
}
interface ISwsParser
{
public function __construct( ISwsLexer $lexer );
public function parse( $input );
public function addToken( $token );
}
class SwsGoogleQueryLexer implements ISwsLexer
{
const QUOTE ... | true |
dbd4ffdc74d5394567eba1e3264e06621fc76a59 | PHP | GossipJie/River | /study/newfile.php | UTF-8 | 125 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
//$arr = array(array('a'=>1,'b'=>2,'c'=>3,'d'=>5,'e'=>4));
$arr = array("a","b","like",5,4);
echo json_encode($arr);
?> | true |
4ea5b9cce77cfbc3e57d219ff6d0a6cf374160dd | PHP | rubenphi/gestorage | /database/migrations/2021_01_03_135215_create_area_user_table.php | UTF-8 | 1,202 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Generado por Database Modeler Pro
* https://play.google.com/store/apps/details?id=adrian.adbm.pro
*
* Creado: 3/01/2021
*/
class CreateAreaUserTable extends Migration {
... | true |
979105fea53f927e6ca1417b9f0b1f66ae55031f | PHP | Joel80/mvc-adventure | /src/Adventure/DbDataHandler.php | UTF-8 | 4,030 | 3.109375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Adventure;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ObjectManager;
use App\Entity\AchievementLog;
use App\Entity\RoomVisitLog;
use App\Entity\Visit;
use App\Entity\ItemDescriptor;
use App\Entity\ExitDescriptor;
use App\Entity\EventDescriptor;
use ... | true |
942731dc6c68c7822b56e9eb0b066130907c1a30 | PHP | owner888/kaliphp | /src/lib/cls_tree.php | UTF-8 | 15,368 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
/**
* KaliPHP is a fast, lightweight, community driven PHP 5.4+ framework.
*
* @package KaliPHP
* @version 1.0.1
* @author KALI Development Team
* @license MIT License
* @copyright 2010 - 2018 Kali Development Team
* @link http://kaliphp.com
*/
namespace kaliphp\lib;
/**
* 通用的树型类,... | true |
2a19f8d1745b4a5c6cc4fdef45f9b3e9ad9c67f9 | PHP | Celarius/spin-framework | /src/Database/PdoConnectionInterface.php | UTF-8 | 3,088 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
/**
* PDO Connection Interface
*
* @package Spin
*/
namespace Spin\Database;
interface PdoConnectionInterface
{
# PDO Class Interface (must be commented out because of declaration errors)
// function __construct ( string $dsn, string $username='', string $password='', array $... | true |
975a2f6640342d3a94c7dfdb24d9636cc59d704b | PHP | Nick-Kofo/Supermarkets_Web | /templates/categoryCard.php | UTF-8 | 928 | 2.5625 | 3 | [] | no_license | <?php
$query = "SELECT * FROM categories WHERE parent = 0";
$category_query = $db->query($query);
?>
<div class="row" style="margin-top: 15px;">
<?php while ($category = mysqli_fetch_assoc($category_query)) : ?>
<?php
$categoryId = $category['id'];
$categoryName = $category... | true |
87260faf0194c836ac4f09db220869e21c6ffdb8 | PHP | wp-statistics/pchart | /src/Example13.php | UTF-8 | 1,054 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/*
Example13: A 2D exploded pie graph
*/
require_once __DIR__ . '/../vendor/autoload.php'; // Autoload files using Composer autoload
use pChart\pData;
use pChart\pChart;
use pChart\pCache;
// Dataset definition
$DataSet = new pData;
$DataSet->AddPoint(array(10, 2, 3, 5, 3), "Serie1");
$DataSet->AddPoint(ar... | true |
3ca181d8332a008a7c6390cd32689f10d6067490 | PHP | stediz/traveltainment | /src/StructType/GetCarRentalOfferListRQType.php | UTF-8 | 7,658 | 2.625 | 3 | [] | no_license | <?php
namespace StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for GetCarRentalOfferListRQType StructType
* @subpackage Structs
*/
class GetCarRentalOfferListRQType extends RequestType
{
/**
* The ProviderID
* @var string
*/
public $ProviderID;
/**
... | true |
425460c0fea2778a4707148281f1a4f87d8dcef3 | PHP | cavinhuangxshop/Orange | /Application/Home/Addons/BrandAddon.class.php | UTF-8 | 2,879 | 2.609375 | 3 | [] | no_license | <?php
namespace Home\Addons;
use Think\Controller;
/*
* 商品分类 品牌缓存处理
* */
class BrandAddon extends Controller{
/**
* 商品品牌增加 缓存
*/
public function brandAdd(){
$redis = new \Com\Redis();
$brands = M('Goods_brand')
->where(array('status'=>1))
->field('id,... | true |
0dcced598a582d90bbf2d3a617ddc10910fb6747 | PHP | jackwiy/framework-1 | /src/Domain/GuardInterceptor.php | UTF-8 | 4,631 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Spiral Framework.
*
* @license MIT
* @author Anton Titov (Wolfy-J)
*/
declare(strict_types=1);
namespace Spiral\Domain;
use Doctrine\Common\Annotations\AnnotationReader;
use Spiral\Core\CoreInterceptorInterface;
use Spiral\Core\CoreInterface;
use Spiral\Core\Exception\ControllerException;
use ... | true |
9d4e510b86243d9d894183a90399a3cf8054be68 | PHP | wendycollado/Proy_reserva | /Plantilla/MODELO/ranking.Model.php | UTF-8 | 5,479 | 2.9375 | 3 | [] | no_license | <?php
class RankingModel {
private $pdo;
function __construct() {
try {
$this->pdo = new PDO('mysql:host=localhost; dbname=estadisticas','root', '');
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (Exception $exc) {
... | true |
acc3a71c3acfc678e09fd6ff8535752d25b57e42 | PHP | wx1314star/tongyan | /htdocs/src/Topxia/Service/Pay/Dao/Impl/PayDaoImpl.php | UTF-8 | 2,988 | 2.640625 | 3 | [] | no_license | <?php
namespace Topxia\Service\Pay\Dao\Impl;
use Topxia\Service\Common\BaseDao;
use Topxia\Service\Pay\Dao\PayDao;
class PayDaoImpl extends BaseDao implements PayDao
{
protected $table = 'pay';
protected $twoTable = 'pay_log';
public function addPay($pay, $pay_log)
{
$em = $this->getConnectio... | true |
f0b5ff8826568741c50bab6574efd4a5833280c1 | PHP | MaxKuznecov89/seachInputToBD | /getHelp.php | UTF-8 | 955 | 2.71875 | 3 | [] | no_license | <?php
function getResults($inputVal){
$resArr = [];
if(!$inputVal){
return $resArr;
}
$host = '127.0.0.1';
$username = 'root';
$pass = 'root';
$dbname = 'ishop';
$port = 3306;
$requestStr =$inputVal;
$querySql = "SELECT title FROM category WHERE title LIKE '$requestStr... | true |
f4d3ae5f436be79ee83be257729d6afbb86aa041 | PHP | ObadaAbdelkareem/syliusBack | /vendor/coduo/php-matcher/tests/Matcher/Pattern/Expander/CountTest.php | UTF-8 | 1,231 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander;
use Coduo\PHPMatcher\Matcher;
use Coduo\PHPMatcher\Matcher\Pattern\Expander\Count;
class CountTest extends \PHPUnit_Framework_TestCase
{
/**
* @dataProvider examplesProvider
*/
public function test_matching_values($needle, $haystack, ... | true |
c47e923ba65f5f3d47efab7673cb7643d1fc9956 | PHP | at-phuctv/lar53 | /database/seeds/ReplyCommentTableSeeder.php | UTF-8 | 628 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
class ReplyCommentTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker::create();
$commentId = App\Models\Comment::pluck('id')->toArray();
... | true |
3087b24721840e4723cf462bd94debd0230e0381 | PHP | davewwww/Tracedump | /src/Dwo/Tracedump/Styler/Coloring/HtmlColoring.php | UTF-8 | 1,985 | 2.921875 | 3 | [] | no_license | <?php
namespace Dwo\Tracedump\Styler\Coloring;
use Symfony\Component\VarDumper\VarDumper;
/**
* @author Dave Www <davewwwo@gmail.com>
*/
class HtmlColoring extends AbstractColoring
{
/**
* {@inheritdoc}
*/
public function __toString()
{
try {
$css = $this->buildCss();
... | true |
93c75649ff707723e5ba033ba00ccf8c3be7b49d | PHP | Ellyonia/CustomCupcake | /database.php | UTF-8 | 8,903 | 3.265625 | 3 | [] | no_license | <?php
/**
This function takes a customer ID and returns a 2 dimensional array of all his favorites and all the elements belonging to those favorites.
Connects to the CustomCupcakes database and queries the favorites table. It then builds the arrays off the results found.
@param int $customerID The ID number for the ... | true |
104e693e2b088e419ec38264768276c4c96abcf7 | PHP | HeycomRoy/WineClue-web-site | /www/classes/homeViewClass.php | UTF-8 | 1,833 | 2.625 | 3 | [] | no_license | <?php
class HomeView extends View /////////////////This class is contain methods to display home page of wine club
{
protected function displayContent() ////////////display right content images galery, and latest news
{
$html = '<div id="RightSide">'."\n";
$html .= '<div ... | true |
405c0d3c2fc29f8cee70aa85f60561ec0172d86b | PHP | varavin/polls | /src/Services/CRUD.php | UTF-8 | 819 | 3.328125 | 3 | [] | no_license | <?php
namespace Polls\Services;
/**
* Class CRUD
* @package Polls\Services
* @property \PDO $pdo
* @property boolean $success
* @property string $message
*/
class CRUD
{
private $pdo = null;
private $success = true;
private $message = '';
/**
* CRUD constructor.
* @param \PDO $pdo
... | true |
f9663744cf36be3294d66162b5fcee6ac0b3b048 | PHP | kovacevicilija/food_shopping | /tog.php | UTF-8 | 3,105 | 2.78125 | 3 | [] | no_license | <?php
session_start();
/*
$_SESSION['nam'] = array();
$_SESSION['nam']['jabuke'] = 10;
$_SESSION['nam']['banane'] = 19;
$_SESSION['nam']['ananas'] = 38;
foreach($_SESSION['nam'] as $key => $value)
{
echo "<p>$key - $value</p>\n";
}*/
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<... | true |
193af9e0b2f5cab617cbfe35854b7a25895172dc | PHP | direbrain/vend_bannerslider | /Api/BannerRepositoryInterface.php | UTF-8 | 1,581 | 2.796875 | 3 | [] | no_license | <?php
namespace Vend\BanerSlider\Api;
use Vend\BanerSlider\Api\Data\BannerInterface;
use Magento\Framework\Api\SearchCriteriaInterface;
/**
* Interface BannerRepositoryInterface
*
* @api
*/
interface BannerRepositoryInterface
{
/**
* Create or update a Banner.
*
* @param BannerInterface $page
... | true |
432eb84077f921442c446e63ae4becb186740c20 | PHP | WalkerTxsRngr7/ZahnFarms | /includes/oop.php | UTF-8 | 12,131 | 2.84375 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
// $password = "";
// $dbname = "teaching";
$password = "";
$dbname = "zahnfarms";
// Create connection
class conn{
// check connection
public function check_conn($servername,$username,$password,$dbname){
$connection = new mysqli($serve... | true |
9a2a6dd5bdefb580f3363a8e3cab3771e4be763a | PHP | RyanMcCabe/CS50_2016 | /modules/module7/greetings/views/greeting_display.php | UTF-8 | 335 | 2.734375 | 3 | [] | no_license | <?php
// TODO replace with actual content (e.g. "Cheers, David!")
$message = "Hello, '{$name}'!";
// TODO replace 0 with the correct value
$report_num_times = "This is the '{$num_times}' time I have said '{$greeting_text}' to someone";
?>
<h2><?= htmlspecialchars($message) ?></h2>
<p><?= htmlspecialchars($report_nu... | true |
a6483995cbaa221556bd3b228bb640dad8819ea4 | PHP | trsben/RomanNumeral | /classes/Test/RomanNumeralGenerator/Parse.php | UTF-8 | 656 | 3.0625 | 3 | [] | no_license | <?php
class Test_RomanNumeralGenerator_Parse {
protected $testData = array(
1 => 'I',
10 => 'X',
123 => 'CXXIII',
3999 => 'MMMCMXCIX'
);
public function runTests() {
$generator = new RomanNumeral_Generator();
foreach ($this->testData as $expectedResult => $param) {
echo 'Testing ' . $param . '... | true |
2f76cd7c18a71ed1aef22e67d9764e22a722eff5 | PHP | ghost212/UAS-rekayasa-web | /application/views/employees.php | UTF-8 | 552 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
$this->load->view('header');
?>
<div id="content">
<h1>EMPLOYEES<hr /></h1>
<table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example">
<thead>
<th>No.</th><th>FirstName</th><th>LastName</th>
</thead>
<?php
$n... | true |
4469af96242f09caebac04212f84d33fca64ec2a | PHP | cloudcogsio/oauth2-keycloak | /src/Provider/Keycloak/PermissionTicketGrant.php | UTF-8 | 2,464 | 2.625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Cloudcogs\OAuth2\Client\Provider\Keycloak;
class PermissionTicketGrant
{
CONST ID = "id";
CONST OWNER = "owner";
CONST RESOURCE = "resource";
CONST SCOPE = "scope";
CONST GRANTED = "granted";
CONST REQUESTER = "requester";
private array $data;
public function _... | true |
ed8973ea420d4d9a4d73dc15be7a476a20bd991b | PHP | Bashka/bricks_business_currency-zend_module | /src/ServiceManager/Factory/RussiaCentralBankLoaderFactory.php | UTF-8 | 1,252 | 2.578125 | 3 | [] | no_license | <?php
namespace Bricks\Business\Currency\ServiceManager\Factory;
use Zend\ServiceManager\FactoryInterface;
use Interop\Container\ContainerInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Bricks\Business\Currency\Loader\RussiaCentralBankLoader;
/**
* @author Artur Sh. Mamedbekov
*/
class RussiaCentral... | true |
32f13707c185a97a79af8a7d96d94bff88478f18 | PHP | viniciuspugliesi/project-understanding-politics | /module/Home/src/Home/Model/CargoTable.php | UTF-8 | 800 | 2.59375 | 3 | [] | no_license | <?php
namespace Home\Model;
use Zend\Db\TableGateway\AbstractTableGateway;
use Zend\Db\Adapter\Adapter;
use Zend\Db\ResultSet\ResultSet;
class CargoTable extends AbstractTableGateway
{
protected $table = 'tb_cargo';
public function __construct(Adapter $adapter)
{
$this->adapter = $adapter;
... | true |
8b69dbbb9e2d96ac1acb1b8e241a8c4f7eb55fe7 | PHP | scato/serializer | /src/Navigation/ConversionNavigatorDecorator.php | UTF-8 | 1,129 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Scato\Serializer\Navigation;
use Scato\Serializer\Core\NavigatorInterface;
use Scato\Serializer\Core\VisitorInterface;
/**
* Wraps around a Navigator, converting the input before passing it on
*/
class ConversionNavigatorDecorator implements NavigatorInterface
{
/**
* @var NavigatorInterfa... | true |
10bde72111f48a16a2bad76d8acede1f02cf5b02 | PHP | FernandoRodriguesDaSilva/curso_blog | /admin/logar.php | UTF-8 | 1,466 | 2.703125 | 3 | [] | no_license | <?php SESSION_START();
require '../conexao/conexao.php';
require '../conexao/crud.php';
$txt_login = $_POST["txt_login"];
$txt_senha = $_POST["txt_senha"];
// As tabelas estão no plural
// entra no crud na função consultar e consulta no banco a tabela usuarios
// os campos login e senha
if(($txt_login!="") && ($t... | true |
08d4401940902d3ba403f01f58135fd058b339b2 | PHP | helloexp/yima | /home/Home/Lib/Model/VisitLogModel.class.php | UTF-8 | 5,413 | 2.671875 | 3 | [] | no_license | <?php
/**
* visit log model
*
* @author : Jeff Liu<liuwy@imageco.com.cn> Date: 2015/8/04
*/
class VisitLogModel extends BaseModel {
protected $tableName = 'tvisit_log'; // 默认对应数据库名称
/**
* 记录log
*
* @author Jeff Liu<liuwy@imageco.comc.cn>
* @param string $node_id
* @param string $v... | true |
3f176b266b9a000d8064d3713d97204b38693f65 | PHP | Pirate30/educationsite | /admin/manage-courses.php | UTF-8 | 5,302 | 2.828125 | 3 | [] | no_license | <?php
include('partials/header.php');
?>
<div class="dashboard">
<div class="wrapper">
<h1><strong>Manage Courses</strong></h1>
<br>
<a href="<?php echo SITEURL ?>admin/add-course.php" class="btn-primary">Add Course</a>
<br>
<br>
<br>
<h3>
<?php
... | true |
4ea7df41e8d499e14cbd4efdebbe1fa8f522acb0 | PHP | danieltejano/CSWD | /database/migrations/2021_09_20_132301_create_personal_information_table.php | UTF-8 | 1,313 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePersonalInformationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('per... | true |
1452ae340109bb6e52b260852bb8c5460fc66eaf | PHP | domain7/civil-space-prototype | /api/vote.php | UTF-8 | 851 | 2.671875 | 3 | [] | no_license | <?php
include "config.php";
function console_log( $data ){
echo '<script>';
echo 'console.log('. json_encode( $data ) .')';
echo '</script>';
}
$data = json_decode(file_get_contents("php://input"));
$request = $_POST["request"];
console_log($_POST);
// add idea
if($request == 1){
$title = $_POST["title"];
... | true |
be75c0ba8f161953e8e128bc085c624c4320a057 | PHP | devtools-marvellous/laravel-core-auth | /src/Models/Role.php | UTF-8 | 2,404 | 2.703125 | 3 | [] | no_license | <?php
namespace AttractCores\LaravelCoreAuth\Models;
use Amondar\Sextant\Models\SextantModel;
use AttractCores\LaravelCoreAuth\Database\Factories\RoleFactory;
use AttractCores\LaravelCoreAuth\Resolvers\CorePermissionContract;
use AttractCores\LaravelCoreAuth\Resolvers\CoreRoleContract;
use Carbon\Carbon;
use Illumina... | true |
941e5fb618b67a611d5bb2a4128571dbc909064e | PHP | smilecs/ctra | /class/paginator.php | UTF-8 | 1,953 | 2.75 | 3 | [] | no_license | <?php
/**
*
*/
include_once ("conf/db_connect.php");
connect();
function getData( $limit = 10, $page = 1, $qery) {
if ( $limit == 'all' ) {
$query = $qery;
} else {
$query = $qery . " LIMIT " . ( ( $page - 1 ) * $limit ) . ", $limit";
}
return $query;
}
function createLinks... | true |
3c9f4b3e10eb624c3d4f264a3b42d5f986e1bd3d | PHP | cams007/SSE | /Proyecto-Inicial/app/Http/Controllers/Auth/LoginController.php | UTF-8 | 1,305 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Auth;
class LoginController extends Controller
{
// Show only if is a guest unauthenticated
public function __construct()
{
$this->middleware( 'guest', [ 'only', 'showLoginForm' ] );
}
/**
* Mue... | true |
bb8d0f23118f54e974867904bc25002d770f2bb1 | PHP | dao94/s1.tamquocche.com | /web/api/lib/Fcm.class.php | UTF-8 | 1,732 | 2.921875 | 3 | [] | no_license | <?php
class Fcm {
protected $card = '';
protected $truename = '';
protected $account = '';
protected $age = 0;
protected $wi = array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
protected $ai = array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
function __construct() {
... | true |
ee89976cc4dab08084c9c147bccb20a921343b5f | PHP | dosarkz/epay-kazkom | /src/ResponseParser.php | UTF-8 | 1,060 | 3.015625 | 3 | [] | no_license | <?php
namespace Dosarkz\EPayKazCom;
use Illuminate\Support\Arr;
/**
* Base Epay response parser
*
* Class ResponseParser
* @package Dosarkz\EPayKazCom
*/
class ResponseParser {
/**
* @var string
*/
protected $rawResponse;
/**
* @var array
*/
protected $parsedData;
/**
* EpayResponseParser cons... | true |
59b5574a16042cc3bdee1715633a8b82d1b17981 | PHP | panlatent/element-messages | /src/services/Messages.php | UTF-8 | 11,395 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Element Messages plugin for CraftCMS 3
*
* @link https://panlatent.com/
* @copyright Copyright (c) 2019 panlatent@gmail.com
*/
namespace panlatent\elementmessages\services;
use Craft;
use craft\base\Element;
use craft\helpers\DateTimeHelper;
use craft\helpers\Db;
use craft\helpers\Json;
use panl... | true |
2e5b9f16fcf29d4070d84825f5b2fa826b498c9b | PHP | wrj913/cbs | /config/getData.php | UTF-8 | 2,330 | 2.90625 | 3 | [] | no_license | <?php
header("Content-Type: text/xml; charset=utf-8");//必须设置,否则浏览器会以html输出,这样前台无法接到xml对象数据
header ("Cache-Control: no-cache, must-revalidate");//每次都是最新
header ("Pragma: no-cache");
define('DB_HOST','localhost');
define('DB_USER','root');
define('DB_PWD','j');
define('DB_NAME','data_center_test');
//第一步,连接MYSQL服务器
$c... | true |
6d71b04a30337a3df2caf9f356865dd50a438620 | PHP | theweezar/PhpProject | /worpdress_plugin/wp-plugin-tpsvc-course-management/inc/classes/tables/class.cm-category-table.php | UTF-8 | 405 | 2.5625 | 3 | [] | no_license | <?php
/**
* Define table name and its column name
*/
class CM_Category_Table {
public static $category_id = 'category_id';
public static $parent_category_id = 'parent_category_id';
public static $category_path = 'category_path';
public static $created_at = 'created_at';
public static function ta... | true |
4f3bfd42f16959449d5cd56ecfd498c17f41db08 | PHP | JoanVicens/eventcase | /src/test/unit/client/ClientTest.php | UTF-8 | 1,551 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
final class ClientTest extends TestCase
{
public function testCreateCorrectClient()
{
$this->assertInstanceOf(
Client::class,
new Client('test', '684-304-246', '8528 Deion Curve', 'test@testhost.com', new DateTime(... | true |
7acb0b6cd7357da7c7de80f6f2ed0da2b998a49d | PHP | inseoinseo/NStatus | /NStatus_v1.0.0/src/NStatus/Stat.php | UTF-8 | 800 | 3.25 | 3 | [] | no_license | <?php
namespace NStatus;
class Stat
{
protected $data = [];
public function __construct (array $data)
{
$this->data = $data;
}
public function getDataArray (): array
{
return (array) $this->data;
}
public function getStatPoint (): int
{
if (isset ($this->data ["sta... | true |
0ceb3f609d9834aac76610b6d20a6a39905b9dd2 | PHP | angegon/IFCD0210-Desarrollo-de-aplicaciones-con-tecnologia-web | /Back_End/php041_Ajax/backend.php | UTF-8 | 221 | 2.8125 | 3 | [] | no_license | <?php
//var_dump($_GET); // Vuelca todo el contenido del GET
echo "hola ";
if (isset($_GET['nombre'])){
echo $_GET['nombre'] . " " . $_GET['apellidos'];
} else {
echo " a todos";
}
?> | true |
714a1169b9339405e357f7cfa4225209232aabaa | PHP | tecumsehmaverick/sym-extensions | /extensions/importmanager/content/content.importers.php | UTF-8 | 3,675 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
require_once(TOOLKIT . '/class.administrationpage.php');
class contentExtensionImportManagerImporters extends AdministrationPage {
protected $_driver = null;
protected $_uri = null;
public function __construct(&$parent){
parent::__construct($parent);
$this->_uri = URL . '/symphony/extensio... | true |
458fa46279be729cd621537b42da1b190cec271e | PHP | contributte/invoice | /src/Provider/InvoiceCompanyProvider.php | UTF-8 | 295 | 2.625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace Contributte\Invoice\Provider;
use Contributte\Invoice\Data\ICompany;
final class InvoiceCompanyProvider
{
public function __construct(
private ICompany $company
)
{
}
public function getCompany(): ICompany
{
return $this->company;
}
}
| true |
9a2dc92067f9ff369a9dc82675f320851ed66850 | PHP | aternosorg/sherlock | /src/MapLocator/LauncherMeta/LauncherMetaVersionList.php | UTF-8 | 1,547 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Aternos\Sherlock\MapLocator\LauncherMeta;
class LauncherMetaVersionList
{
/**
* @var LauncherMetaVersionInfo[]
*/
private array $versions;
public function __construct($data)
{
$this->versions = [];
foreach ($data->versions as $version) {
$this->ve... | true |
d79062c69e4eeb819f9d1f1f04c086e5bfe7f044 | PHP | JMalloc496/ignite | /app/Queries/ThreadQuery.php | UTF-8 | 730 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Queries;
use App\Models\Channel;
use App\Filters\ThreadFilter;
use Emberfuse\Blaze\Queries\Query;
use Illuminate\Database\Eloquent\Builder;
class ThreadQuery extends Query
{
/**
* Instance of model being queried.
*
* @var \Illuminate\Database\Eloquent\Model
*/
protecte... | true |
84774a3d6526abe9b258849f28bdf608cfff3ae4 | PHP | SKupisz/DeltaClient | /panel/index.php | UTF-8 | 4,176 | 2.578125 | 3 | [] | no_license | <?php
if(isset($_POST["access-key"]) && isset($_POST["cypher-content"])){
$content = $_POST["cypher-content"];
$content = rawurlencode($content);
//$content = htmlentities($content);
if(strlen($content) > 100){
$toComplete = "";
if(!isset($_POST["encryptOrdecr... | true |
64954f28521c904af3531e14d9cca9cd3721f44b | PHP | corbanCloud/wp-theme-boiler-plate | /lib/php/trait-asset-helpers.php | UTF-8 | 4,376 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class and Function List:
* Function list:
* - setup_assets()
* - add_style()
* - add_script()
* - add_wp_script()
* - theme_assets_handler()
* Classes list:
*/
/**
* Shortcuts the addition of theme resources
* includes some default theme assets
*/
require_once 'class-custom-post-type.php';
trait asset... | true |
d3107a640148517b3e2ff4ef567f2927ba634968 | PHP | Ishara12/ITP2021_S2_B03_G10 | /application/models/User_model.php | UTF-8 | 6,006 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
*
* Model User_model
*
* This Model for ...
*
* @package CodeIgniter
* @category Model
* @author Setiawan Jodi <jodisetiawan@fisip-untirta.ac.id>
* @link https://github.com/setdjod/myci-extension/
* @param ...
* @return ... | true |
9416cbb7ae17a76c146766615aaac3773ca1c6aa | PHP | AnthonyBouillon/session_password | /script_login.php | UTF-8 | 844 | 2.609375 | 3 | [] | no_license | <?php
session_start();
if(isset($_POST['submit_login'])){
if(!empty($_POST['login']) && !empty($_POST['password'])){
$login = $_POST['login'];
$password = $_POST['password'];
require 'database.php';
$db = connection();
$sql = 'SELECT u_name, u_firstname, u_password FROM users... | true |
c1e3e00ca69d93f8e3816d95d91a54e558218427 | PHP | ManuelLG92/symfony_dws | /src/Security/Mailer.php | UTF-8 | 1,400 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Security;
use App\Entity\Usuario;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Email;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class Mailer
{
private $emailAplicacion;
private $emailManager;
... | true |
3023eca12e6f20d6771d92c74f7599dfbc7b87a5 | PHP | Nydareld/projetSilexFete | /src/Model/Location.php | UTF-8 | 3,263 | 2.59375 | 3 | [] | no_license | <?php
namespace TheoGuerin\Model;
// use Doctrine\ORM\Mapping as ORM;
use \Datetime;
/**
* @Entity @Table(name="location")
**/
class Location extends AbstractEntity{
/**
* @Id @GeneratedValue @Column(type="integer")
* @var int
*/
private $id;
/**
* @Column(type="string")
* @var... | true |