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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1f8301d7bd66e7037674e18e3b2bd45753f014e5 | PHP | vquyen96/laravel_cedu_news | /lib/database/migrations/2018_05_09_044019_story.php | UTF-8 | 909 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Story extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('story', function (Blueprint ... | true |
9c0eb65c507a4957c260c29a4c748bbf70d1979e | PHP | glavdev/TDLib | /src/Glavpunkt/GpOrderStatus.php | UTF-8 | 1,054 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Glavpunkt;
/**
* Статус заказа в системе Главпункт
*
* @author SergeChepikov
*/
interface GpOrderStatus
{
/**
* Текущий статус заказа
*
* @return string
*/
public function status(): string;
/**
* Способ оплаты
*
* Метод доступен, если статус заказа c... | true |
c1bd5f4bf9f3212daa84b35b2c137e59dee95bcf | PHP | MissAnnah95/Library-Management-System | /frontend/models/Books.php | UTF-8 | 1,643 | 2.703125 | 3 | [] | no_license | <?php
namespace frontend\models;
use Yii;
/**
* This is the model class for table "books".
*
* @property int $bookId
* @property string $bookName
* @property string $referenceNumber
* @property string $publisher
* @property int|null $status Status 0, status 1, status 2
*
* @property Bookauthor[] $bookauthor... | true |
ea50c0fb04d6d419d26bfcd1e561bea0d33458ce | PHP | outtersg/util-php | /AffT.php | UTF-8 | 4,985 | 2.78125 | 3 | [] | no_license | <?php
/*
* Copyright (c) 2022 Guillaume Outters
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, m... | true |
2f87570ee5f85051de77fe84345ddc1ca4c0c9b5 | PHP | co-david/inventory-management-system | /_api/IRoute.php | UTF-8 | 127 | 2.75 | 3 | [] | no_license | <?php
interface IRoute
{
public function __construct(string $method, array $queryArr = []);
public function run() : array;
} | true |
52b145572a5905dee417bd973ee2f68defa121f7 | PHP | AlxZeroX/POO-1900 | /App/src/usuario/Alumno.php | UTF-8 | 986 | 3.0625 | 3 | [] | no_license | <?php
namespace aprendamosPHP;
require_once ('Usuario.php');
class Alumno extends \Usuario{
private $cursosIncritos = array();
private $cursosContratados = array();
private $cursosSolicitados = array();
private $CursosAprobados = array();
public function __construct($nombre, $apellido, $edad, $emai... | true |
f5397807c69e75328f57e42fe49a0e28f2e4d1e0 | PHP | tosyngy/Boarding-Ticketing-System | /model/login.php | UTF-8 | 2,859 | 2.6875 | 3 | [] | no_license | <?php
//ob_start();
session_start();
function connection() {
$servername = "localhost";
$username = "id4144831_brttick";
$password = "brttick";
$dbname = "id4144831_brttick";
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
... | true |
ceb80b5a231f0f1d257c4c51a7feb4de8f950d79 | PHP | tech-nik89/lpm4 | /mod/default/server/gameq/GameQ/Filter/normalise_voice.php | UTF-8 | 3,818 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of GameQ.
*
* GameQ is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* GameQ is distrib... | true |
7c44b584a1c7d07cb8d40bc49cb27a843964b487 | PHP | iamsupergirl/Alona2 | /Human/Ears.php | UTF-8 | 1,492 | 3.296875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: helen
* Date: 3.7.17
* Time: 23.15
*/
class Ears
{
/**
* @var int
*/
private $numberOfEars=0;
/**
* @var int
*/
private $sizeOfEars=0;
/**
* @var bool
*/
private $presenceOfEars=0;
/**
* @return int
*/
... | true |
48f24be53257def7fbd22a7c6842c99b3e3fc921 | PHP | mishvets/Piscine_PHP | /Day07/ex04/Tyrion.class.php | UTF-8 | 313 | 3.25 | 3 | [] | no_license | <?php
class Tyrion extends Lannister {
public function sleepWith($person){
if ($person instanceof Jaime || $person instanceof Cersei) {
printf("Not even if I'm drunk !\n");
}
else if ($person instanceof Sansa) {
printf("Let's do this.\n");
}
}
}
?> | true |
1756c4904af8391507dd411d7425cb0d154eb8fd | PHP | CoaVorgic/DonCorleone_proba_stari | /rezervacijadb.php | UTF-8 | 2,176 | 2.953125 | 3 | [] | no_license | <?php
session_start();
// ucitavanje baze
require "db_config.php";
// definisanje promenljivih za poslate podatke
$firstname = $lastname = $phone = $email = $date = $time = $numberOfGuests = $comment = "";
// 'isset' proverava da li je vrednost zadata
// 'mysqli_real_escape_string' sprecava unos nepozeljnih podataka... | true |
3d868ba2372d85c4281799828067ceb9447cd800 | PHP | abhishekpandey532/Student-Tracker-Web-Application | /Home.php | UTF-8 | 1,925 | 2.703125 | 3 | [] | no_license | <?php
session_start();
include('config.php');
?>
<html>
<head>
<style>
table, td, th {
border: 1px solid green;
}
th {
background-color: green;
color: white;
}
</style>
<title>HOME</title>
</head>
<body>
<h1><a href="Home.php">HOME</a></h1>
<?php
session_start();
if... | true |
6c0d8700299ecbe402bb68dca82339cf90dd6177 | PHP | CiscoVE/DirectoryBundle | /Authentication/DirectoryUser.php | UTF-8 | 922 | 2.65625 | 3 | [] | no_license | <?php
namespace CiscoSystems\DirectoryBundle\Authentication;
use Symfony\Component\Security\Core\User\UserInterface;
class DirectoryUser implements UserInterface
{
protected $username;
protected $password;
protected $salt;
protected $roles;
public function __construct( $username, $password, $sal... | true |
b54a06cf1b87a6401df91bc8932314a3ce2772bb | PHP | sigits12/filght-api | /database/seeds/PortSeeder.php | UTF-8 | 587 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
Use App\Models\Port;
class PortSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data = array(
['port' => 'CGK', 'timezone' => 'Asia/Jakarta'],
['port' => 'UPG', 'time... | true |
4b6b034785c92a5019f33a91560e82ad790cecbd | PHP | whlives/smallshop | /app/Jobs/MemberReg.php | UTF-8 | 1,031 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Jobs;
use App\Models\Market\Promotion;
use App\Models\Member\Member;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
/**
* 用户注册后续处理
*/
class Memb... | true |
2ee5c36e05c62a95a0557638811400b05b9e498e | PHP | pcioffi/Programming-School-Work | /CST 2409 - PHP Web Programming/www/Exam/question2.php | UTF-8 | 1,915 | 2.71875 | 3 | [] | no_license | <!DOCTYPE html>
<!-- fileName: question2.php-->
<html>
<style>
caption{
font-family: Calibri;
font-size: 24pt;
text-align: center;
font-weight: bold;
}
table.report{
font-family: Calibri;
font-size: 11pt;
border: solid 1px black;
border-collapse: collapse;
}
table.report th{
font-weight: bold;
... | true |
7c8da1110f7cdcd72511c930dd11031cb56569fc | PHP | joanmon/PHPhotoSuite | /src/PhotoSuite/Infrastructure/Persistence/MysqlPDORegistry.php | UTF-8 | 609 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace PHPhotoSuit\PhotoSuite\Infrastructure\Persistence;
class MysqlPDORegistry
{
/**
* @var \PDO[]
*/
private static $instances = [];
public static function getInstance(MysqlConfig $config)
{
$key = md5(serialize($config));
if (!isset(self::$instances[$key])) {
... | true |
b4b7719b21cf85fe11dd339ee6e43145dfb18e75 | PHP | php-school/php-workshop | /test/Asset/ExerciseWithInitialCode.php | UTF-8 | 1,346 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpSchool\PhpWorkshopTest\Asset;
use PhpSchool\PhpWorkshop\Exercise\ExerciseInterface;
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
use PhpSchool\PhpWorkshop\Exercise\ProvidesInitialCode;
use PhpSchool\PhpWorkshop\ExerciseDispatcher;
use PhpSchool\PhpWorkshop\Solution\SingleFileSolution;
use PhpSc... | true |
161fa41bef3fdf7ce16f54678b4f2cc4362f3aed | PHP | pbiggar/phc | /test/subjects/bugs/bug0031.php | UTF-8 | 169 | 2.59375 | 3 | [] | no_license | <?php
//Bug report from Kevin Day
//die does not work
die;
echo "'die' ignored\n";
die();
echo "'die()' ignored\n";
die(1);
echo "'die(1)' ignored\n"
?>
| true |
977d164e2789d10bd1bfc1e8046fcd79ec09f50b | PHP | rafaelleme/bc-hiring | /src/Command/CreateCarrierCommand.php | UTF-8 | 3,150 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Command;
use App\Domain\Carrier\Carrier;
use App\Domain\Carrier\CarrierConfig;
use App\Domain\Product\Product;
use App\Infrastructure\Carrier\Repository\DoctrineCarrierRepository;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Compone... | true |
e4cb6a310b82989939d12c1c47f638690ca70d9d | PHP | 983633445/jinrong | /laravel/app/Models/Login.php | UTF-8 | 549 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Cookie;
class Login extends Model{
public function verify($data)
{
unset($data['_token']);
$res = DB::table('adminuser')
->where([
['user', '=', $data['user']],
... | true |
5cc8950d647f9628d53ffa576d99172ff24f1df1 | PHP | simonbergstrom/TNM065 | /admin.php | UTF-8 | 13,094 | 2.625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
$debug=0;
if($debug){
header("Content-type:text/xml;charset=utf-8");
}else {
include("prefix.php");
}?>
<!DOCTYPE blog SYSTEM "blog.dtd"[
<!ENTITY aring "å">
<!ENTITY Aring "Å">
<!ENTITY ouml "ö">
<!ENTITY Ouml "Ö">
<!ENTITY auml "ä">
<!ENTITY Auml "Ä">... | true |
76e0bbbbbbcaa186c45d521e99cbb72dba37b379 | PHP | AshanMSilva/Single-Vendor-E-Commerce-Platform | /app/controllers/MyCart.php | UTF-8 | 1,934 | 2.65625 | 3 | [] | no_license | <?php
class MyCart extends Controller{
public function __construct($controller, $action){
parent::__construct($controller, $action);
}
public function indexAction(){
$cart = new Cart();
$total = $cart->get_cart_total();
$products = $cart->get_products(); // retur... | true |
3ecd477d2934e87c0afcb4b4c9868b9582aa0acd | PHP | mateuszb254/sf4-dmd-project | /src/User/EventListener/UserPasswordUpdaterListener.php | UTF-8 | 1,149 | 2.640625 | 3 | [] | no_license | <?php
namespace App\User\EventListener;
use App\User\Model\UserInterface;
use App\User\Security\Updater\UserPasswordUpdaterInterface;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;
class UserPasswordUpdaterListener
{
protected $passwordUpdater;
public function __constr... | true |
c1bd969404f69a6593aa827b22f913be4c48e16f | PHP | HtetNayChi/POS | /storeorder.php | UTF-8 | 1,298 | 2.515625 | 3 | [] | no_license | <?php
session_start();
require'connection.php';
$carts= $_POST['cart'];
$note = $_POST['note'];
$total = $_POST['total'];
date_default_timezone_set("Asia/Rangoon");
$orderdate= date("Y-m-d");
$voucherno= strtotime(date("Y-m-d h:i:s"));
$userid=$_SESSION['login_user']['id'];
$status= '0';
var_dump($... | true |
ee934b8bed459d2059da7f0fe461b538e98984d2 | PHP | SwagatPanta/php | /array.php | UTF-8 | 440 | 3.640625 | 4 | [] | no_license | <?php
$numeric=array(1,2,3,4,5);
foreach ($numeric as $value) {
echo "element of arry is: ".$value.'<br>';
}
$numeric=array("sanoj"=>52,"swagat"=>52,"hari"=>"1");
echo "sanoj has ".$numeric["sanoj"]. " roll number".'<br>';
if($numeric["sanoj"]===$numeric["swagat"]){
echo "identical number";
$class =array(1=>40,... | true |
4fedf53baa2e1942ddd196fac7dfda099994dd6d | PHP | snelgoedkoop/number_manager | /scripts/database.php | UTF-8 | 2,210 | 2.703125 | 3 | [] | no_license | <?php
class scripts_database {
private $_file = null;
private $_settings = null;
function __construct($file_path) {
$this->_file = fopen($file_path, 'r');
if (!$this->_file)
die("Could not load the file\n");
// Load the settings
$objSettings = new helper_setti... | true |
fa9b21167d5f4d3c0c306e1836ab939bd8413f24 | PHP | mohamed-t-ayad/Contact-Form | /index.php | UTF-8 | 5,251 | 3.109375 | 3 | [] | no_license | <?php
// Check if the user coming from A Request
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// Define variabls
$user = filter_var($_POST['username'] , FILTER_SANITIZE_STRING);
$mail = filter_var($_POST['Email'] , FILTER_SANITIZE_EMAIL);
$cell = filter_var($_POST['cellphone'] ,... | true |
e5a4fd339220dd6a3fc2bd30b152e8af6358dc1c | PHP | TrungKien0609/Chat-App-using-JSON-AJAX-PHP | /filephp/search.php | UTF-8 | 1,628 | 2.5625 | 3 | [] | no_license | <?php
session_start();
include_once("config.php");
$output = "";
$outgoing_id = $_SESSION['unique_id'];
$searchTerm = mysqli_real_escape_string($conn, json_decode($_POST['searchTerm']));
$sql = mysqli_query($conn, "SELECT * FROM users WHERE NOT unique_id= {$outgoing_id} AND ( fname LIKE '%{$searchTerm}%' OR lname LIKE... | true |
a2f3bd248a6659f9759d36a4e467cd6ec813547b | PHP | victorholt/xboxapp | /php/xboxapp.local.com/public_html/webapp/framework/models/gamemodel.php | UTF-8 | 7,535 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This class handles storing/retrieving data from the database for games.
*
* I know this can be a bit redundant however this is mainly to make it easier
* for the programmer to add/delete. This is more for the high-level usage.
*
* NOTE: I would not expect to have a 'sync' method in a "real-worl... | true |
d702cd304858da875fc02f10e57726e563ee2b82 | PHP | FutureActivities/Craft3-Contact-API | /src/services/Recaptcha.php | UTF-8 | 786 | 2.515625 | 3 | [] | no_license | <?php
namespace futureactivities\contactapi\services;
use yii\base\Component;
use futureactivities\contactapi\Plugin;
class Recaptcha extends Component
{
public function verify($response)
{
$base = "https://www.google.com/recaptcha/api/siteverify";
$settings = Plugin::getInstance()->settings;
... | true |
137c3c72984305c2de79bd3fb066f44f1e329a2f | PHP | jonvillegb2ei/b2ei-energy-monitor | /app/Models/Product.php | UTF-8 | 1,146 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Models;
use App\Traits\TimestampedModel;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
use TimestampedModel;
/**
* The table name.
*
* @var string
*/
protected $table = 'products';
/**
* The table primary key.
*
* @var s... | true |
d5efe29a9c568a04912afc1e64edf3cdb1fdaeca | PHP | powellblyth/laravel-sqs-fifo-queue | /tests/ConnectorTest.php | UTF-8 | 882 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace ShiftOneLabs\LaravelSqsFifoQueue\Tests;
use InvalidArgumentException;
use ShiftOneLabs\LaravelSqsFifoQueue\SqsFifoQueue;
use ShiftOneLabs\LaravelSqsFifoQueue\Queue\Connectors\SqsFifoConnector;
class ConnectorTest extends TestCase
{
public function test_sqs_fifo_driver_returns_sqs_fifo_queue()
... | true |
68dd1db4a1d132d8db2a7e3d283d708203ba78bc | PHP | PonyEngine/Tracks | /app_web/trunk/application/models/SavCo/FunctionsGen.php | UTF-8 | 28,932 | 2.78125 | 3 | [] | no_license | <?
class SavCo_FunctionsGen extends SavCo
{
public function __construct($db)
{
parent::__construct();
$this->db = Zend_Registry::get('db2');
}
public static function is_decimal($val)
{
return is_numeric($val) && floor($val) != $val;
... | true |
817fb9449a59a77be0896ab77a86176cec34c964 | PHP | ltsservices/docAppointments | /data/events.php | UTF-8 | 2,589 | 2.75 | 3 | [] | no_license | <?php
// --------------------------------------------------------------------------------------------------
// Manages the events
// --------------------------------------------------------------------------------------------------
// Require our Event class and datetime utilities
require (dirname(__FILE__) . '/db_cla... | true |
957a8a8be15b12ede4187b80bf90177748e7a359 | PHP | andrewgs/practice-book.ru | /main/models/consultationmodel.php | UTF-8 | 2,317 | 2.578125 | 3 | [] | no_license | <?php
class Consultationmodel extends CI_Model {
var $cnsl_id = 0;
var $cnsl_title = "";
var $cnsl_note = "";
var $cnsl_price = "";
var $cnsl_period = 0;
var $cnsl_status = 0;
var $cnsl_uid = 0;
function __construct(){
parent::__construct();
}
function read_record($uid){
$this... | true |
ff42ae92dd083e788f5d9a4d0905b55902c28df6 | PHP | hagnat/covid | /src/Domain/ReportedCases.php | UTF-8 | 6,824 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Domain;
use Carbon\CarbonImmutable as DateTimeImmutable;
use Carbon\CarbonInterface as DateTimeInterface;
use Countable;
final class ReportedCases implements Countable
{
private const DAY_INDEX_FORMAT = 'Y-m-d';
private $cases = [];
private $indexByDate = []... | true |
a004522ad6a0ad54eef2147b9cd96f4aad50f423 | PHP | tenjavacontest/happyhooks | /app/commands/FlareBot.php | UTF-8 | 745 | 2.75 | 3 | [] | no_license | <?php
use Requests;
class FlareBot {
const BOLD = "!~";
const COLOR = ":~";
const WHITE = 0;
const BLACK = 1;
const NAVY = 2;
const GREEN = 3;
const RED = 4;
const MAROON = 5;
const PURPLE = 6;
const OLIVE = 7;
const YELLOW = 8;
const LIME = 9;
const TEAL = 10;
c... | true |
21f37b1c39432bc5f5323000f010af7a8c928900 | PHP | arnia/KarybuShop | /libs/model/Address.php | UTF-8 | 1,806 | 2.921875 | 3 | [] | no_license | <?php
/**
* Base model class for Addresses
*
* @author Dan Dragan (php@arnia.ro)
*/
class Address extends BaseItem
{
public
$address_srl,
$member_srl,
$firstname,
$lastname,
$email,
$address,
$country,
$region,
$city,
$postal_code,... | true |
17f87c42c29d72062bc1298ff9cd88f7c01e85f0 | PHP | ManaAndria/Baguage | /booking/bookingSearch/bookingSearch_admin_menu.php | UTF-8 | 2,767 | 2.59375 | 3 | [] | no_license | <?php
/**
*
*/
class BookingSearch_admin_menu
{
function __construct()
{
add_action('admin_menu', array($this, 'add_admin_menu'), 20);
add_action('admin_init', array($this, 'register_settings'));
}
//add menu to the wordpress sidebar
public function add_admin_menu()
{
add_menu_p... | true |
ba1a28d920dd5e1e32e53eabadb845090fb46f07 | PHP | RafaelPeixoto1/at6 | /quatro.php | UTF-8 | 268 | 3.109375 | 3 | [] | no_license | <?php
$txt1 = "o João foi à oficina e a
reparação do carro é de 78,00 € sem IVA.
Qual o valor de reparação com IVA?";
$preço = 78;
$iva =0.23 ;
$valor = ($preço * $iva );
$soma = ($valor + $preço);
echo $txt1. "<br> O valor com iva é " .$soma ;
?>
| true |
6875fb0dccb7a4851b1b0ca499479e795a819e3e | PHP | nuggetInc/RekenSite | /RekenWebsite/Connect/crud.php | UTF-8 | 6,374 | 2.796875 | 3 | [] | no_license | <?php
// lEERLINGEN
function CreateLeerling($pdo, $i, $value, $docent)
{
$parameters = array(':Naam'=>$i,':Wachtwoord'=>$value, ':Docent'=>$docent);
$sth = $pdo->prepare("INSERT INTO leerlingen (Naam, Wachtwoord, Docent) VALUES (:Naam, :Wachtwoord, :Docent)");
$sth->execute($parameters);
}
// DOCENTEN
funct... | true |
3cfd6030492da1c80a9b97184f9f8ba7d7fdb8dd | PHP | ohkhaila/lacrm-bootcamp | /testphp.php | UTF-8 | 2,721 | 3.484375 | 3 | [] | no_license | <?php
date_default_timezone_set('America/Chicago');
function add($num1, $num2){
return $num1 + $num2;
}
echo"
<h1>Woah! A Calculator!</h1>
<form method='post' action=''>
<input name='num1' type='text' />
<select... | true |
f4013949685e0b9798b18f8f94622dcdf56bf51c | PHP | mayronceccon/desafios-grupo-estudos-php | /desafios_02/troco/src/MTC/Moedas/Tipos/Euros/Moedas.php | UTF-8 | 398 | 2.84375 | 3 | [] | no_license | <?php
namespace MTC\Moedas\Tipos\Euros;
use MTC\Moedas\Tipos\Interfaces\IMoedas;
class Moedas implements IMoedas
{
public function get() : array
{
$valores = array(
2.00,
1.00,
0.50,
0.20,
0.10,
0.05,
0.02,
... | true |
4cf20350a95836852e452c6ee05a65ad942da3c2 | PHP | cybermatatu/shop4me | /app/gettingCarraceRateSum.php | UTF-8 | 1,213 | 2.6875 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD']=='POST'){
require_once('dbConnect.php');
$strPostId = $_POST['strPostId'];
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
die();
}
// $sql = "SELECT*, SUM(strRate) AS 'sum' FROM c_ratings WHERE strPostId = '$strPostId'";
// $... | true |
ea5a622e859b69d0f42912d4083953d10397e558 | PHP | alexander-pecherskih/bridges | /backend/src/Model/Process/UseCase/Node/Move/Handler.php | UTF-8 | 847 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Model\Process\UseCase\Node\Move;
use App\Model\Flusher;
use App\Model\Process\Entity\Node\Node;
use App\Model\Process\Entity\Node\NodeRepositoryInterface;
use App\Model\Process\Entity\Node\Position;
use Ramsey\Uuid\Uuid;
class Handler
{
private NodeRepositoryInterfac... | true |
f79a108c1395b05fdcd6495f9e75a16a28efca46 | PHP | dauminhquan/new-server-aliexpress-tool | /app/Imports/UpcsImport.php | UTF-8 | 474 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Imports;
use App\Upc;
use Maatwebsite\Excel\Concerns\ToModel;
class UpcsImport implements ToModel
{
/**
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function model(array $row)
{
$upc = Upc::where('key','=',$row[0])->first()... | true |
d033fa1806a5810db9ddb378a88a2d3935747157 | PHP | bgroveben/codecademyPHP | /builtInFunctions/mathFunctions.php | UTF-8 | 1,016 | 4.3125 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<title>Math Functions</title>
</head>
<body>
<p>
<?php
// Round a floating point number (pi in this case) to an integer and print it to the screen
$round = round(M_PI);
print $round;
... | true |
2fa84a121b6e8c989ff545b00c5cf281e5e7fcf0 | PHP | sxunt520/axes | /common/models/StoryRecommend.php | UTF-8 | 1,833 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "{{%story_recommend}}".
*
* @property string $id
* @property string $title
* @property integer $type
* @property string $cover_url
* @property string $video_url
* @property string $story_id
* @property string $cre... | true |
05ea7c9ad9de950dae03915b697c97be4630045b | PHP | rolandocruzv/coursera-javascript | /login.php | UTF-8 | 4,679 | 2.640625 | 3 | [] | no_license | <?php
require 'connectiondb.php';
session_start();
if(isset($_POST['email']) && isset($_POST['pass'])){
if( $_POST['email'] != '' && $_POST['pass'] != '' ) {
$email = htmlentities($_POST['email']);
$pass = htmlentities($_POST['pass']);
$salt = 'XyZzy12*_';
... | true |
830c827fbf8b7c77675910a3e25a45e66e777559 | PHP | salvasm/booksea | /API/src/mappers/GenreMapper.php | UTF-8 | 428 | 2.828125 | 3 | [] | no_license | <?php
namespace booksea\mappers;
//use booksea\models\Genre;
class GenreMapper extends Mapper
{
/**
* Función encargada de recuperar todos los géneros
*
* @return array
*/
public function getAllGenres()
{
$sql = "SELECT * FROM genre ORDER BY idgenre";
$stmt = $this->db... | true |
976a980c8a98e1b3cd687feb452497aea7d04d25 | PHP | bakhtaouiines/PHP_Partie9 | /Exercice9.3/exercice9.3.php | UTF-8 | 610 | 2.875 | 3 | [] | no_license | <?php
setlocale(LC_TIME, ['fr', 'fra', 'fr_FR']); // permet de modifier et de définir de nouvelles informations de localisation
$today = strftime('%A %d %B %Y'); // Formate une date/heure locale avec la configuration locale
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta http-e... | true |
f4a31bb7bcc143a7ebdb462af07e17429c677f85 | PHP | bojke1993/WebShop | /views/searchProductsList.php | UTF-8 | 923 | 2.578125 | 3 | [] | no_license | <?php
require_once APP_ROOT . '/models/ProductsModel.php';
$p = new ProductsModel();
$filter = "";
if (isset($_POST['filter'])) {
$filter = $_POST['filter'];
}
$searchList = $p->searchProducts($filter);
?>
<body>
<h2>Results</h2>
<table border="solid" width="30%">
<tr style="background-color: ligh... | true |
0ac92110c590cc1bb0dc16db6ab521bb9e6273c9 | PHP | sunny0910/PHP-Auth-System | /public/includes/Validator.php | UTF-8 | 791 | 2.90625 | 3 | [] | no_license | <?php
namespace PHP\includes;
class Validator
{
public function name($str)
{
return preg_match("/^[A-z]+\s?[A-z]+$/", $str);
}
public function phone($str)
{
return preg_match("/^(\+91|0)?[1-9]{1}\d{9}$/", $str);
}
public function email($str)
{
return preg_match(... | true |
4f3acb823a5a498fb79c268d9c94458e4bb62364 | PHP | alvarezsineiro/tp-remiseria | /apirestTPFinal/apirestV6-JWT-MW-POO/clases/Viajes.php | UTF-8 | 4,200 | 2.703125 | 3 | [] | no_license | <?php
class Viajes
{
public $id;
public $latDesde;
public $lngDesde;
public $latHasta;
public $lngHasta;
public $vehiculo;
public $remisero;
public $cliente;
public $estado;
public $comodidad;
public $medioPago;
public $duracion;
public $distancia;
public $precio;
... | true |
5a576f6feb99e06b82cdd5cab48f4a9c869f9b7a | PHP | amantz1/MantzAnthony_CIS12_48075 | /Labs/Lab4/codecademy07_04.php | UTF-8 | 522 | 3.53125 | 4 | [] | no_license | <?php
/* Anthony Mantz
September 22, 2014
Lab 4: Codecademy Functions Part 1, 4 of 8
*/
?>
<html>
<p>
<?php
// Try rounding a floating point number to an integer
// and print it to the screen
$round=round(54.7851);
print $round;
?>
</p>
<p>
<?php
// Try rounding a float... | true |
77d26011bc2111573e5694223804bb74151b89da | PHP | MarcinGladkowski/vending-machine-php | /src/Model/Dollar.php | UTF-8 | 342 | 3 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace VendingMachine\Model;
final class Dollar extends Money implements PaperMoney, MoneyCreationInterface
{
protected const SHORT_CODE = 'DOLLAR';
protected const VALUE = 100;
public static function create(): Dollar
{
return new Dollar(self::SHORT_CODE, ... | true |
b702f1e5861ac936713f675262a7e4bb74b20e66 | PHP | marscore/hhvm | /hphp/test/slow/ext_array/asort.php | UTF-8 | 707 | 3.34375 | 3 | [
"Zend-2.0",
"PHP-3.01",
"MIT"
] | permissive | <?php
<<__EntryPoint>>
function main_asort() {
$fruits = array(
"d" => "lemon",
"a" => "orange",
"b" => "banana",
"c" => "apple"
);
asort(&$fruits);
var_dump($fruits);
$arr = array("at", "\xe0s", "as");
asort(&$arr, 0);
$arr = array("num2ber", "num1ber", "num10ber");
asort(&$arr, SORT_REGULAR);
var_dump($ar... | true |
4468ac21842e552e17df3d4e9fbe7cd0ea3135cd | PHP | christianwidjayaa/livecode1 | /soallivecode2.php | UTF-8 | 995 | 2.875 | 3 | [] | no_license | /**
---------------------
First Letter Grouping
---------------------
Diberikan sebuah variabel `name`. Buatlah sebuah script untuk menampilkan nama tersebut
berada di group ke-berapa, dengan aturan sebagai berikut:
- Jika huruf pertama dari `name` adalah a, b, c, d maka tampilkan 'Masuk group pertama'
- Jika huruf pe... | true |
1a585005884f3e394e95f72cca87334a95a1d74f | PHP | godruoyi/php-snowflake | /src/RandomSequenceResolver.php | UTF-8 | 1,115 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the godruoyi/php-snowflake.
*
* (c) Godruoyi <g@godruoyi.com>
*
* This source file is subject to the MIT license that is bundled.
*/
namespace Godruoyi\Snowflake;
use Exception;
class RandomSequenceResolver implements SequenceResolver
{
/**
* ... | true |
1d7a9e9b852eb98ceb890f357138ec96ae91f887 | PHP | NiyogJob/agri-project-backend-lumen | /app/Http/Controllers/ProcessFieldController.php | UTF-8 | 5,156 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class ProcessFieldController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
//
}
public function add... | true |
df5419e267e83cee3e80e5c89e57fc8d7c216e7c | PHP | ministrest/doorlog | /protected/core/FlashMessages.php | UTF-8 | 867 | 3.40625 | 3 | [] | no_license | <?php
namespace core;
class FlashMessages{
static $typesArray = array('success', 'info', 'error');
/**
* Add message of specified type to messages array
* @param string $message
* @param string $type influence style of message
* @return bool
*/
public static function addMessage($m... | true |
ec109dcad4bf60bbbe06e15a4f8cecde666de709 | PHP | markosoft2000/test_turne_trance | /Helper.class.php | UTF-8 | 502 | 3.0625 | 3 | [] | no_license | <?php
/**
* Helper class
* Class contents common functions for whole project
* Date: 2016-10-05
* Author: Mark
*/
class Helper {
/**
* safe get array element
* @param array $array
* @param mixed $key
* @param mixed $defaultValue
* @return mixed
*/
public static function getAr... | true |
e1150175fa29406122f8d4abf59842afad607c50 | PHP | nastechnology/budrev | /application/controllers/base.php | UTF-8 | 703 | 2.765625 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class Base_Controller extends Controller {
/**
* Catch-all method for requests that can't be matched.
*
* @param string $method
* @param array $parameters
* @return Response
*/
public function __call($method, $parameters)
{
return Response::error('404');
}
/* Private Methods */
pr... | true |
76ac2cc4113f8bc2214e373cc44a48200d2e8031 | PHP | oluwasayo12/VanHack-Classes-Management | /database/migrations/2019_20_12_100000_create_class_table.php | UTF-8 | 999 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateClassTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('classes', functio... | true |
d83bbc7d54a14c28c7870e4f5761ae3252523364 | PHP | pra9shinde/ss-shop | /application/models/My_model.php | UTF-8 | 1,811 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class My_model extends CI_Model {
public function __construct() {
parent::__construct();
$this->load->database();
}
public function get($table,$conditions = array(), $order_by = array())
{
if(!empty($conditions)){
$thi... | true |
40159adb79c7c27e9c57456d6062d8bde687266d | PHP | betlife/species | /src/Http/Request.php | UTF-8 | 921 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Artisan\Http;
/**
* Description of Request
*
* @author Cloud
*/
class Request
{
//put your code here
protected $headers;
protected $environment;
public function __construct($environment = null, Headers $headers = null)
{
$this->headers = $headers;
$this->__init... | true |
b7ee9ef718e3feed496224c0dc4adb1c5b6a1291 | PHP | ThunderID/SHOP-API | /app/Models/QuotaLog.php | UTF-8 | 3,034 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Models;
use App\Models\Observers\QuotaLogObserver;
/**
* Used for QuotaLog Models
*
* @author cmooy
*/
class QuotaLog extends BaseModel
{
/**
* Relationship Traits.
*
*/
use \App\Models\Traits\belongsTo\HasVoucherTrait;
/**
* The database table used by the model.
*
* @var st... | true |
53a545ab383c4f4f0b5be2ccc3e0d070fda52d8c | PHP | MiJunior/Case3 | /err/inherit.php | UTF-8 | 726 | 3.0625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: drser
* Date: 30.07.2018
* Time: 13:00
*/
class FileSystemException extends Exception{
private $name;
public function __construct($name)
{
parent::__construct($name);
$this->name=$name;
}
public function getName(){return $this->name;}
}
c... | true |
940b9d23c72a42c1080ebce6cf5bc95d1b307d10 | PHP | waffle-iron/cocktales.io | /src/Cocktales/Service/Profile/Command/Handlers/ViewProfileCommandHandler.php | UTF-8 | 881 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Cocktales\Service\Profile\Command\Handlers;
use Cocktales\Domain\Profile\Profile;
use Cocktales\Domain\Profile\ProfileOrchestrator;
use Cocktales\Framework\Exceptions\NotFoundException;
use Cocktales\Service\Profile\Command\ViewProfileCommand;
class ViewProfileCommandHandler
{
/**
* @var Pr... | true |
038ffa0a53005c8f31571ae1e49234a862211f22 | PHP | virtualghost4/tdd-project | /database/migrations/2017_07_14_211218_create_documentos_table.php | UTF-8 | 846 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDocumentosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('documentos', function (Blueprint $table) {
... | true |
d90f7fa422e0118687ab8d556d5f7f021071c605 | PHP | dgafka/Php-BookStore | /src/Dgafka/BookStore/Business/Model/Entity/Author.php | UTF-8 | 802 | 3.078125 | 3 | [] | no_license | <?php
namespace Dgafka\BookStore\Business\Model\Entity;
class Author
{
private $id;
private $name;
private $surname;
public function __construct($id, $name, $surname) {
$this->id = $id;
$this->name = $name;
$this->surname = $surname;
}
/**
* @return mixed
*/
public function getId()
{
return... | true |
a69fda5c49dee4e2f8fb6ff1edd62fa3c942f432 | PHP | DanielJNaula/prueba-candidato-teonteach | /app/Http/Controllers/PruebaController.php | UTF-8 | 1,807 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PruebaController extends Controller
{
public function create(Request $request)
{
$random_string = $this->generateStringRandom();
$validacion = $this->validarTeonString(str_split($random_string));
return respon... | true |
c8a3dd70c7445bd14f4ddad6eb5f4fdebaf8d199 | PHP | chuganghong/sns | /app/view/pageClass.php | UTF-8 | 2,557 | 3.1875 | 3 | [] | no_license | <?php
/*
* 分页类
*/
//include("interface.php");
class pageClass implements display
{
protected $cpage; //当前页面
protected $pages; //总页数
protected $url; //“上一页”等文字的链接的组成部分
protected $url_cpage;
//protected $pre_page; //上一页
//protected $next_page; //下一页
function __construct($url,... | true |
0dfa484827cef3b074f62ec1c2b43367eda0ab0b | PHP | KamalEssam/app-project | /app/Http/Repositories/Web/ClinicRepository.php | UTF-8 | 6,487 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: rkanjel
* Date: 9/29/18
* Time: 5:48 PM
*/
namespace App\Http\Repositories\Web;
use App\Http\Controllers\WebController;
use App\Http\Interfaces\Web\ClinicInterface;
use App\Models\Clinic;
use Carbon\Carbon;
use DB;
use Illuminate\Database\Eloquent\Collection;
class Clin... | true |
5e65388565e6e5923f2654ffeb87a406be2e5b26 | PHP | psystingod/satpro | /pages/modulo_contabilidad/balanceComprobacionPDF.php | UTF-8 | 5,806 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
require '../../vendor/autoload.php';
use Spipu\Html2Pdf\Html2Pdf;
require("php/getDatos.php");
// $tipoCuenta = $_POST[""];
// $mes = $_POST[""];
// $año = $_POST[""];
$get = new getInfo();
$Datos = $get->getBalanceComprobacion();
try {
ob_start();... | true |
d38a50f1d6b59bedbbabe1c69a511831f7176d58 | PHP | DamienRiviere/SnowTricks | /src/Actions/Recovery/RecoverySendEmail.php | UTF-8 | 1,320 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Actions\Recovery;
use App\Domain\Recovery\ResolverSendEmail;
use App\Responders\RedirectResponder;
use App\Responders\ViewResponder;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
/**
* Class RecoverySendEmail
* @package App\Actions\Recovery
*
* ... | true |
84531f4f6c19377530d5d3dd6402b4b2a0d8eebc | PHP | SacchiMarco/Studium-PHP-Aufgabe3 | /classes/class_DomainObject.php | UTF-8 | 172 | 2.90625 | 3 | [] | no_license | <?php
abstract class DomainObject
{
protected $id;
public function getId()
{
return $this->id;
}
protected function __construct($id)
{
$this->id = $id;
}
}
?> | true |
41b2bdeba8c398083eca511c153a2097f07b8ca6 | PHP | vegvari/AliusDatabase | /src/MySQL/Constraint.php | UTF-8 | 528 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Alius\Database\MySQL;
use Alius\Database\Interfaces;
abstract class Constraint implements Interfaces\ConstraintInterface
{
protected $name = '';
protected $columns = [];
final public function getName(): string
{
return $this->name;
}
final public function getColumns(... | true |
a3d22babbadcac204553b844cd19acc3b9c73b2f | PHP | cleitonsilva/site | /php/envia_back.php | UTF-8 | 659 | 2.671875 | 3 | [] | no_license | <?php
session_start();
$valor1 = $_SESSION['n1'];
$valor2 = $_SESSION['n2'];
$soma = $_POST['captcha'];
$captcha = ($valor1 + $valor2);
// Recuperamos os valores dos campos através do método POST
$to = $_POST["to"];
$assunto = $_POST["assunto"];
$mensagem = $_POST["mensagem"];
$total = (int)$soma;
if (... | true |
1471ec4010486c80f40b368d0c453192652c97a3 | PHP | BlueskyFR/destinations | /destinations.php | UTF-8 | 3,198 | 3.03125 | 3 | [] | no_license | <?php
// returns: bool
function connect($db) {
$username = htmlspecialchars($_POST['username'], ENT_QUOTES);
$password = htmlspecialchars($_POST['password'], ENT_QUOTES);
$query = $db->prepare("Select * FROM user Where username = ? AND password = ?");
$query->execute(array($username, $password));
if ($data... | true |
0d9c3b8f1c49c1c5291249032152cd169a370fa9 | PHP | urmaul/formatter | /src/ValueFormatter.php | UTF-8 | 331 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace urmaul\formatter;
/**
* A class that formats single value.
*/
class ValueFormatter extends Formatter
{
public function format($value, $rules = null)
{
if ($rules === null)
$rules = $this->rules;
foreach ($rules as $rule) {
$value = $this->formatValue($value, $rule);
}
return $v... | true |
4f956539ef8da86cc2a157db64bbcdbefef2b31c | PHP | Tibooooo/Php_Projet | /php/generateChamps.php | UTF-8 | 1,050 | 2.671875 | 3 | [] | no_license | <?php
function generateChamps($type, $id){
$divG='<legend>Paramétrage du champ n\''. $id .' de type '.$type. ':</legend>
<div name="num_champ">
<!-- Récupérer le numéro de champ en php pour l\'afficher -->
</div>
<div name="nom_int" class="elem_form">
<label for="'.$type.'_nam... | true |
4ff3e5a3311af658a55ced0360364bab721f753a | PHP | Bort86/dawbio2_class | /RepeatExUF2/RepeatExUF2/mvc_file_ini/controller/MainController.class.php | UTF-8 | 877 | 2.78125 | 3 | [] | no_license | <?php
require_once "controller/UserController.class.php";
class MainController {
// carga la vista según la opción
public function processRequest() {
//$request=filter_has_var(INPUT_GET, 'menu')?filter_input(INPUT_GET, 'menu'):NULL;
$request=NULL;
// recupera la opción d... | true |
43a2889a6de6506f32a7f24a8740370963f35c1b | PHP | LanaOnline/Yii2app | /components/DaoComponent.php | UTF-8 | 2,932 | 2.65625 | 3 | [] | permissive | <?php
/**
* Created by PhpStorm.
* User: Lana
* Date: 2/28/2019
* Time: 1:20 PM
*/
namespace app\components;
use yii\base\Component;
use yii\db\Query;
use yii\log\Logger;
class DaoComponent extends Component
{
/**
* @return \yii\db\Connection
*/
public function getDb() {
return \Yii::$... | true |
ef1b31e18069580dab39efd72626b5fc5a3f079f | PHP | edsonisidoroinacio/modulogit2 | /pHpB7web/modulo1/arrays2.php | UTF-8 | 130 | 3.328125 | 3 | [] | no_license | <?php
$numeroDaMegaSena = [10,14,27,34,8];
echo "Numero 1: ".$numeroDaMegaSena[0];
echo "Numero 2: ".$numeroDaMegaSena[1];
?> | true |
91e2b18dc5995df716943b651e140ba41a1af9bc | PHP | Jayin/LightMeeting | /Application/Common/Model/VoteOptionModel.class.php | UTF-8 | 1,912 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Common\Model;
/**
* 投票选项
* @author Jayin Ton
*/
class VoteOptionModel extends BaseModel{
protected $_validate = array(
array('voteid','require','缺少关联的投票表id',self::MUST_VALIDATE,'regex',self::MODEL_INSERT),
array('meetid','require','缺少关联的会议id',self::MUST_VALIDATE,'regex',self::MODEL_INSERT),... | true |
9bd93afb7267410482c6789462e98bfce3cda781 | PHP | ybouhjira/lets-compete-api | /src/AppBundle/Action/Membre/Get.php | UTF-8 | 333 | 2.59375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace AppBundle\Action\Membre;
use AppBundle\Entity\Membre;
/**
* Opération GET simple sur un membre. Rédefinie parceque celle par défault
* ne marche pas avec les classes hérité.
* @package AppBundle\Action\Membre
*/
class Get
{
public function __invoke(Membre $membre)
{
return $membre;... | true |
5324a4332244d6283deef97fd92e6866fd427d7e | PHP | hightman/scws | /dev/dict/mk_dbm.php | UTF-8 | 2,484 | 2.828125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
// convert dict.txt => dict.<dbm>
//
// php mk_dbm.php [input file] [output file]
// output file: .gdbm, .cdb, .hdb, .xdb
//
set_time_limit(0);
ini_set('memory_limit', '128M');
if (!isset($_SERVER['argv'][2]))
{
echo "Usage: {$_SERVER['argv'][0]} <input file> <output file>\n";
echo " {$_SERVER['argv'][0]... | true |
d8d0c81051a546bef7e796c200198344a9e59c6f | PHP | bollohz/symfony_sqs_async_messenger | /api/src/Messenger/SqsTransport.php | UTF-8 | 3,245 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Messenger;
use Aws\Sqs\Exception\SqsException;
use Aws\Sqs\SqsClient;
use Psr\Log\LoggerInterface;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Exception\TransportException;
use Symfony\Component\Messenger\Transport\Serialization\PhpSerializer;
use Symfony\Component\Me... | true |
6086189b1326f971bd50c64e0666bf54d2e124f1 | PHP | astratow/easy_steps | /sticky.php | UTF-8 | 1,255 | 3.25 | 3 | [] | no_license | <!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Making sticky forms</title>
</head>
<body>
<h1>Sticky form</h1>
<form action="sticky.php" method="POST">
<p>Name:
<input type="text" name="name"
value="<?php if(isset($_POST['name']))
echo $_PO... | true |
f4ddcca34571a5aaf1d445540433678c19744d52 | PHP | wxy545812093/shunt | /src/League/Shunt/Shunt.php | UTF-8 | 6,771 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Shunt.
*
* (c) Taufan Aditya <toopay@taufanaditya.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\Shunt;
use League\Shunt\Contracts\SessionInterface;
use League\Shunt\Contrac... | true |
a7fb31bfddd04e7a4d664e12db39f7ba962c045d | PHP | macielbombonato/docker-chamilo | /1.11.2/chamilo-lms-1.11.2/app/Migrations/Schema/V110/Version20150803171220.php | UTF-8 | 1,107 | 2.515625 | 3 | [
"GPL-3.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/* For licensing terms, see /license.txt */
namespace Application\Migrations\Schema\V110;
use Application\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150803171220
*
* @package Application\Migrations\Schema\V110
*/
class Version20150803171220 extends AbstractMi... | true |
6ccbc20d8038137ed0daaf3bd670725e632cc29e | PHP | mkungla/aframe-php | /src/Interfaces/EntityInterface.php | UTF-8 | 2,682 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/** @formatter:off
* ******************************************************************
* Created by Marko Kungla on Jun 24, 2016 - 7:19:54 PM
* Contact marko@okramlabs.com
* @copyright 2016 Marko Kungla - https://github.com/mkungla
* @license The MIT License (MIT)
*
* @category AframeVR... | true |
ee71fb23e2cfcf2657e842d4b6e6c5401575f2bf | PHP | kaznoble/annflaravel | /models/Roundcustomerrelation.php | UTF-8 | 517 | 2.53125 | 3 | [] | no_license | <?php
class Roundcustomerrelation extends BaseModel {
protected $table = 'round_customer_relation';
protected $primaryKey = 'relation_id';
public function __construct() {
parent::__construct();
}
public static function querySelect( ){
return " SELECT round_customer_relation.* FROM round_custome... | true |
8214bd4e31fe9c378ea220ca2b9da0795c34fda4 | PHP | joaomagdaleno14/MVC | /app/controllers/ControllerCadastro.php | UTF-8 | 5,437 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Controllers;
//session_start();
include_once(DIRREQ."/src/class/ClassRender.php");
include_once(DIRREQ."/app/models/ClassCadastro.php");
include_once(DIRREQ."/src/Traits/TraitUrlParser.php");
include_once(DIRREQ."/src/class/ClassValidate.php");
use \Src\Classes\ClassRender;
use \App\Models\ClassCad... | true |
37633ef45b13bac46eed0a0d0a1570c77974b19e | PHP | digitickets/omnipay-gocardlessv2 | /src/Message/FindPaymentsBySubscriptionRequest.php | UTF-8 | 678 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Omnipay\GoCardlessV2\Message;
class FindPaymentsBySubscriptionRequest extends AbstractSearchRequest
{
public function getData()
{
$this->validate("subscriptionId");
$data = [];
$paramValue = $this->getSubscriptionId();
if (!empty($paramValue)) {
$dat... | true |
89b280408402d1cea2db1dcafe9088dd87a92163 | PHP | pizzalord22/planwebsite | /errorHandler_class.php | UTF-8 | 1,510 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Mark
* Date: 14-3-2017
* Time: 13:17
*/
class errorHandler{
function __construct()
{
ini_set('display_errors', 'On');
error_reporting(E_ALL);
function errorHandler($slevel, $smessage, $sfile, $srow){
$aLevels = [
... | true |
007f140dc076eaa8958048cfddb5b229177d8bc6 | PHP | Dragonrun1/peol | /lib/Converter/GlobPathIterator.php | UTF-8 | 6,302 | 2.78125 | 3 | [] | no_license | <?php
/**
* Contains GlobPathIterator class.
*
* PHP version 5.3
*
* LICENSE:
* This file is part of PhpLineEndChanger
* Copyright (C) 2014 Michael Cummings
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by th... | true |
515efb45db222cfc803961840680e6887e21543f | PHP | iamcoderisk/codefii-mvc | /models/User.php | UTF-8 | 2,161 | 2.59375 | 3 | [] | no_license | <?php
class Users
{
public function __construct()
{
if(Add::exists())//don't modify this
{
if(Token::check(Add::get('token')))//don't modify this
{
$validate = new Validate();
$validate = $validate->check($_POST, array(
'username'=>array(
'req... | true |