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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1b643b04cf34d2b297be729adac128687bb8580c | PHP | ExeQue/remix | /src/Concerns/Definitions/UsesEncoding.php | UTF-8 | 615 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ExeQue\Remix\Concerns\Definitions;
use ExeQue\Remix\Concerns\Validation\ValidatesEncoding;
/**
* @internal
*/
trait UsesEncoding
{
use ValidatesEncoding;
protected ?string $encoding;
protected function setEncoding(?string $encoding): void
{
$this-... | true |
e9a597829d299defec821b0b0a4d528c5ab88944 | PHP | JLBR/School-Projects | /WebSites-HTML-JavaScript-XML-Jquery-GoogleAppEngine-GO-PHP-SQL-AJAX/WebSite-ItemLoans-HTML-PHP-Jquery-SQL/scripts/classes/items.class.php | UTF-8 | 2,626 | 3.1875 | 3 | [] | no_license | <?php
class Items
{
private $itemCollection;
private $originalCollection;
private $localIndex;
private $count;
private function __construct($newItems, $newCount)
{
$this->itemCollection = $newItems;
$this->originalCollection = $newItems;
$this->localIndex = 0;
$this->count = ... | true |
f04a8eee0066ad5821246e520b7e2b5983314e16 | PHP | zouyi/PA_localhost | /admincreate.php | UTF-8 | 804 | 2.578125 | 3 | [] | no_license | <?php
try {
$conn = new PDO("mysql:host=localhost;dbname=petteradoption", "root", "root");
echo "Conneted!"
} catch (PDOException $e) {
echo "Error".$e->getMessage();
}
//variables
$adminFirstName = $_POST['adminFirstName'];
$adminLastName = $_POST['adminLastName'];
$adminEmail = $_POST['adminEmail'];
$adminUsern... | true |
789136d9f79cd9fd3d1c735544c5aa86bde94b85 | PHP | Chrisprod06/Real-Estate-CMS | /includes/propertiesPDF.inc.php | UTF-8 | 3,583 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
require("../fpdf/fpdf.php");
require("../tfpdf/tfpdf.php");
class PDF extends tFPDF
{
// Page header
function Header()
{
// Logo
$this->SetFont('Times', '', 10);
$this->Image('../logo.png', 10, 6, 30);
$this->Text(10, 27, 'apm.smarthouses@gmail.com');... | true |
25536976bfe43b1571ce38e072214bdf2841aede | PHP | tim31al/elastic-redis-c | /tests/Model/Builders/AirplaneBuilderTest.php | UTF-8 | 1,984 | 2.609375 | 3 | [] | no_license | <?php
namespace Model\Builders;
use App\Model\Airline;
use App\Model\Airplane;
use App\Model\Builders\AirplaneBuilder;
use App\Services\Orm\ModelManager;
use App\Utils\Config;
use PHPUnit\Framework\TestCase;
class AirplaneBuilderTest extends TestCase
{
public function testBuildWithoutAirline()
{
$n... | true |
50edefec97fb437826f684589585dddc2241428b | PHP | ashrumit/E-learning | /first.php | UTF-8 | 1,432 | 2.78125 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<style>
h3
{
color:
}
</style>
</head>
<body>
<?php
session_start();
$id=$_SESSION['id'];
?>
<?php
$server="localhost";
$username="root";
$password="";
$dbname="project";
$conn=mysqli_connect($server,$username,$password,$dbname);
if(!$conn)
{
die('could not connect'.... | true |
5a14554dcdad3b45ef3c74452e9be73c05e6d166 | PHP | php4dev/LeetCode-in-Php | /src/Algorithms/0049.group-anagrams/group-anagrams.php | UTF-8 | 510 | 3.34375 | 3 | [] | no_license | class Solution {
/**
* @param String[] $strs
* @return String[][]
*/
function groupAnagrams($strs) {
$map = [];
for($i = 0; $i < count($strs); $i++) {
$s = $strs[$i];
$temp = str_split($s);
sort($temp);
$sorted = implode($temp);
... | true |
54bb2ab98860d504aad81234f41c36ec28aa37b7 | PHP | GoogleCloudPlatform/php-docs-samples | /storage/src/object_metadata.php | UTF-8 | 3,436 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | true |
f2ab75a91dc75404dea36287775f164547632d76 | PHP | jokerai-draft/lpthw-php7 | /ex58/env3/case2/Blueberry.php | UTF-8 | 500 | 3.28125 | 3 | [] | no_license | <?php declare(strict_types=1);
class Blueberry
{
public $taste;
public static int $counter = 0; // should be private
public function __construct($taste = "(default taste)") {
$this->taste = $taste;
++static::$counter;
}
public function __toString() {
return "Blueberry ($th... | true |
e94faa0a70fd696fb9859a95965b9b9c5b9a316c | PHP | Ravivishwa/restapi | /app/Http/Controllers/PdfToTextController.php | UTF-8 | 1,141 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Storage;
use Spatie\PdfToText\Pdf;
class PdfToTextController extends Controller
{
public function create(Request $request)
{
$pdfName = $request->file('pdf')->getCli... | true |
216aa4374fc4a20e4a34ef3e99ed6bdc66b0f1c1 | PHP | Kingtreemonkey/FileManager | /Action/Chmod.php | UTF-8 | 1,315 | 2.671875 | 3 | [] | no_license | <?php
namespace Rabies\FileManager\Action;
class Chmod {
public $r;
public function action(){
$mode = $_POST['new_mode'];
$rec_option = $_POST['is_recursive'];
$valid_options = array('none', 'files', 'folders', 'both');
$chmod_perm = (is_dir($path) ? $chmod_dirs :... | true |
1b367efe56c09c47219ea913c85709df2fb4cc16 | PHP | Prashu2017/videos-to-vimeo | /ajax-endpoint/video-upload.php | UTF-8 | 533 | 2.53125 | 3 | [] | no_license | <?php
namespace WebTyron;
require_once __DIR__ . '/../lib/VideoService.php';
if (! empty($_FILES["video_file"]["tmp_name"])) {
$videoService = new VideoService($_FILES["video_file"]["tmp_name"]);
$isValid = $videoService->validateVideo();
if ($isValid) {
$response = $videoService->uploadVideo();
... | true |
9d735caaffdad987badf7ef913c806deb05fa903 | PHP | lcpunch/challenge-rs | /app/Order.php | UTF-8 | 1,156 | 2.890625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Order extends Model
{
protected $fillable = ['restaurant_id', 'user_id'];
/**
* @brief Inserts an order
* @param integer $restaurantId
* @param integer $userId
* @return Order|string
*/
public function create(int... | true |
838036d07f2354a0b6ac169f8cd25e9990134466 | PHP | shubham-dayma/slot-booking | /app/Rules/ValidUserForEvent.php | UTF-8 | 1,389 | 2.875 | 3 | [] | no_license | <?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
use \App\Models\Participants;
class ValidUserForEvent implements Rule
{
protected $request_inputs = array();
/**
* Create a new rule instance.
*
* @return void
*/
public function __construct($request_inputs = array... | true |
93c90f4baffb683befd1edf3c3b5a7afcd7b501d | PHP | tarantitits/Credit-Card-Management-System | /CancelCustomerService.php | UTF-8 | 1,530 | 2.53125 | 3 | [] | no_license | <HTML>
<HEAD>
<TITLE>Customer Service Request Page</TITLE>
</HEAD>
<BODY>
<?php
session_start();
if($_SESSION['verified']) {
echo "<p>User: " . $_SESSION["staffname"] . "</p>\n";
echo "<hr />";
echo "<p></p>";
echo "<p><h1>Cancel Customer Service Request</h1></p>\n";
require "config.php";
//Retrieve th... | true |
16b09d22e92651bdc59c115b81fc932a9b6f24e6 | PHP | CungNguyen/ZF2 | /app/module/Product/src/Product/Entity/ProductEntity.php | UTF-8 | 3,155 | 2.53125 | 3 | [] | no_license | <?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 Product\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="product")
* */
class Prod... | true |
ece0cdedf4198df396e8c95dd79e16726723b6bb | PHP | wangchengww/killigenomics | /annotation/UPhO/mclclusters/getexactorthologs.php | UTF-8 | 1,432 | 2.640625 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__) . "/lib.php");
//get the clusters with exactly 16 species
$sIn = "out.seq.mci.I20";#$argv[1];
$sOutDir = "FullTaxaOrthologs";
$nTaxonCount = 16;
$hIn = fopen($sIn ,"r");
exec("mkdir -p $sOutDir");
$nAllTaxaIncluded = 0;
$nExactOrthologs = 0;
$nSingletons = 0;
$nClusters = 0;
$ar... | true |
889486e98006815734d70283971ca1a16b9e202f | PHP | kreepasharma/vaccine | /welcome.php | UTF-8 | 480 | 2.734375 | 3 | [] | no_license | <?php
/*foreach($_POST as $key=>$value){
//echo"$key : $value <br>\n";
//echo"\$$key = \$_POST[\"$key\"];<br>\n";
//echo "echo \" $key : \$key\";<br>\n";
echo "echo \"$key : \$$key\";<br>";
}*/
$name = $_POST["name"];
$description = $_POST["description"];
$created_at = $_POST["created_at"];
$updated_at = $_P... | true |
c62590f763da44043de9008f684a5ab06a483ec8 | PHP | reekoheek/docker-bind9 | /api/vendor/reekoheek/util/src/ROH/Util/Thing.php | UTF-8 | 1,698 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace ROH\Util;
use Closure;
use InvalidArgumentException;
class Thing extends Collection
{
protected $handler;
public function __construct($attributes)
{
if (is_callable($attributes) || is_object($attributes)) {
$this->handler = $attributes;
} elseif (is_array($att... | true |
d237eed2736d74f98f73d32657f024a4bd00f609 | PHP | todary/beinmedia | /app/Http/Controllers/traits/middlewareTrait.php | UTF-8 | 1,778 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: eng.ahmedbakr
* Date: 07/08/2018
* Time: 04:01 م
*/
namespace App\Http\Controllers\traits;
use App\models\attachments_m;
use App\models\settings_m;
trait middlewareTrait
{
public function setupConfig()
{
#region get settings data
$settings ... | true |
71312fb3eb001e992b2f134c6b5acd8641ff9cbd | PHP | kmjamsheed0/Wordpress-plugin | /ShortcodePlugin.php | UTF-8 | 964 | 2.6875 | 3 | [] | no_license | <?php
/**
* Plugin Name: Shortcode Plugin
* Plugin URI: https://www.example.com
* Description: Display content using a shortcode to insert in a page or post
* Version: 0.1
* Text Domain: my-plugin-demo
* Author: jamsheed
* Author URI: https://www.example.com
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // E... | true |
70b81d91103cb8cfe0f88b90d9d55366b85e7743 | PHP | suuu9/bool | /include/lib_base.php | UTF-8 | 503 | 2.6875 | 3 | [] | no_license | <?php
/**
* file lib_base.php
* 系统常用方法
* Created by PhpStorm.
* User: Administrator
* Date: 16-4-12
* Time: 下午2:34
*/
defined('ACC') || exit('ACC Denied');
/**
* 递归转义数组
*/
function _addslashes($arr) {
foreach($arr as $key=>$v) {
if(is_string($v)) {
$arr[$ke... | true |
a6465609d0f9876fe74cf10b65932eeca39ce938 | PHP | maykondeykon/zendFramework2-Estudos | /module/Application/src/Application/Model/Gerencia.php | UTF-8 | 1,250 | 2.75 | 3 | [] | no_license | <?php
namespace Application\Model;
use Doctrine\ORM\Mapping as ORM;
/**
* Gerencia
*
* @ORM\Table(name="GerenciaArea")
* @ORM\Entity
*/
class Gerencia
{
/**
*
* @var integer $_id
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\Gen... | true |
49e444f247fa91622c517a3c2a1893f4b8c6063a | PHP | CodeGymC1019i1/M2_SS3_PHP_404 | /HaiTran_ss3/Baitap/ClassStopWatch/index.php | UTF-8 | 435 | 3.296875 | 3 | [] | no_license | <?php
include "classStopWatch.php";
$time = new StopWatch();
$arr = [];
for($i = 0; $i < 100000; $i++)
$arr[$i] = mt_rand(-100,100);
$time->start();
for($i = 0; $i < 100000; $i++) {
for($j = $i; $j < 1000; $j++) {
if ($arr[$j] < $arr[$i]) {
$temp = $arr[$i];
$arr[$i] = $arr[$j]... | true |
8bee79c41f10c5a591ba523d9e11a59aa2180a7b | PHP | Hasanadnan/PHP-Practice-Code | /Work_Files/reading_file.php | UTF-8 | 571 | 2.953125 | 3 | [] | no_license | <?php
$file = 'example.txt';
if($handle = fopen($file, 'r')) {
echo $content = fread($handle, filesize($file)); //file er sob dekhabe
// echo $content = fread($handle, 15); //koto gula work dekhate chi
fclose($handle);
} else {
echo 'the app was not ablr to write on the file';
}
?>
<!DOCTYPE html>
<html l... | true |
def59b8073ad4a9327baa4bdb8c0336ae989b7be | PHP | alex-net/test-3 | /query.php | UTF-8 | 1,151 | 2.546875 | 3 | [] | no_license | <?php
if (empty($_POST['query']))
exit;
$ret=['s'=>'ok'];
include ('db.php');
if ($ret['s']=='ok')
switch($_POST['query']){
// запрос списка задач ..
case 'get-task-list':
$q=$pdo->query('select * from tasks');
$q=$q->fetchAll(PDO::FETCH_ASSOC);
$ret['data']=$q;
break;
// добавление новой задачи... | true |
24bb1909bd56c8ef19ca7ec3c09c8df691539220 | PHP | julienpetit/iutbm-projet-PSA | /PHPProjetDBB/commande/traitement/choix_page.php | UTF-8 | 6,727 | 2.890625 | 3 | [] | no_license | <?php
include('../../connexion/_connexion.php'); // fichier permettant de rediriger vers la bonne page depuis l'acceuil
mysql_query("SET NAMES UTF8");
//recuperation du numero de l'abonne dans l'url
$num_commande=$_GET["num_commande"];
$choix=$_GET["choix"];
//création de la requête SQL:
$sql="SELECT code_typ... | true |
736a4684c779a5cc0478db2826d266c3cdf74bb3 | PHP | diegorodriguezmolina/AdminVD | /packages/Twodevs/Adminvd/Core/Infrastructure/Persistence/EloquentUserRepository.php | UTF-8 | 756 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace TwoDevs\Adminvd\Core\Infrastructure\Persistence;
use TwoDevs\Adminvd\App\Models\User;
use TwoDevs\Adminvd\core\Domain\User\UserRepository;
use TwoDevs\Adminvd\src\App\Repositories\UserRepository as BaseEloquentUserRepository;
class EloquentUserRepository implements UserRepos... | true |
ed94a795c6b4af2d8d20dfe65736c13955af1b10 | PHP | mgirdley/codeup_exercises | /php/flip.php | UTF-8 | 303 | 3.21875 | 3 | [] | no_license | <?php
$a = 1;
$heads = 0;
$tails = 0;
$flip=null;
do {
$flip = mt_rand(1,2);
if ($flip==1) { $heads++; } else { $tails++; }
$a++;
if ($a % 100000==0) {
echo "$a: heads: $heads tails: $tails " . (double)($heads-$tails)/($a)*100 . "%\n";
}
} while ($a<10000000000);
?> | true |
c108836cc1ec77daf2980e0771bcff1da91b7270 | PHP | adcar/webdev-project1 | /index.php | UTF-8 | 5,581 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Deal or No Deal</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="./main.css">
</head>
<body>
<h1>Deal or No Deal<... | true |
2de11a3d46f25a85ec10240d208974ebeece1c79 | PHP | sebcode/gsandbox | /src/Model/Vault.php | UTF-8 | 7,219 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Gsandbox\Model;
class LimitExceededException extends \Exception
{
};
class Vault
{
const DATEFORMAT = 'Y-m-d\TH:i:s\Z';
protected $name;
public function __construct($name)
{
$this->name = $name;
}
public function getName()
{
return $this->name;
}
... | true |
63e5b7663867302bf9e808c16e0fc32a8925d1c8 | PHP | tarlepp/symfony-flex-backend | /src/Validator/Constraints/Locale.php | UTF-8 | 934 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
/**
* /src/Validator/Constraints/Locale.php
*
* @author TLe, Tarmo Leppänen <tarmo.leppanen@pinja.com>
*/
namespace App\Validator\Constraints;
use Attribute;
use Symfony\Component\Validator\Constraint;
/**
* Class Locale
*
* Usage example;
* App\Validator\Constraints\Locale(... | true |
ba36056e8eb34eb6b7d8cf34865435a9e3b0e2d6 | PHP | clan82/whist | /lib/db/round_mutation.php | UTF-8 | 7,326 | 2.578125 | 3 | [] | no_license | <?php
function db_create_round($game_id, $is_bye_players, $dealer_position, $bid_type) {
assert(count($is_bye_players) >= DEFAULT_PLAYERS);
assert($dealer_position >= MIN_PLAYER_POSITION && $dealer_position < count($is_bye_players));
global $_db;
$sql = <<<EOS
INSERT INTO game_rounds
(game_id, round, dealer_posit... | true |
25fa17e09a3783a168a40bd7a33b9827ae00a9ea | PHP | jakubthedeveloper/SimpleMarkdownBlog | /tests/Config/BlogConfigTest.php | UTF-8 | 1,422 | 2.765625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace MarkdownBlog\Config;
use MarkdownBlog\DTO\BlogConfigDto;
use MarkdownBlog\Parser\BlogConfigParserInterface;
use PHPUnit\Framework\TestCase;
/**
* @property BlogConfigParserInterface|\PHPUnit\Framework\MockObject\MockObject $blogConfigParser
* @property BlogConfig $blogConf... | true |
af04cb0ac3cb25013089ca20820fb0ebaae1e944 | PHP | philippe-blanquier/php_ex7_variable | /index.php | UTF-8 | 459 | 2.921875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang='fr'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>PHP ex 1.7</title>
</head>
<body >
<p>
<?php
$lastname='Last';
$firstname='First';
$age=18... | true |
64a79186228bb88536a1f72ade5e8ab5c94d32c4 | PHP | muhammadaidilrifaldi123/pbo2021 | /application/StringMutator.php | UTF-8 | 556 | 3.453125 | 3 | [] | no_license | <?php
namespace App;
class StringMutator
{
protected $word;
public function __construct($word)
{
$this->word= $word;
}
public function bold()
{
$this->word = '<b>'. $this->word.'</b>';
return $this;
}
public function italic(){
$this->word = '<i>'. $th... | true |
ac93e5adbe8dfa86697d2bc674a643d4985ee291 | PHP | gregk21/simpleCMS | /cms2019/modules/theme_manager/theme_manager.php | UTF-8 | 2,229 | 2.625 | 3 | [] | no_license | <?php
function theme_manager()
{
Append_Content("<h2>Here you can change your theme !</h2>");
$url= new URL();
$url_array= $url->GetURLArray();
$url=null;
if (array_key_exists('id',$url_array) && $url_array['id'])
{
Append_Content("<h3>Theme has changed to ID: <h3>".$u... | true |
9b974e6c8370c275dfe320fce4455aacf4cbc8cb | PHP | alvaroqv/widgets | /database/migrations/2018_08_07_020518_create_json_files_table.php | UTF-8 | 811 | 2.640625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateJsonFilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('json_files', ... | true |
19e2542a39602812942d7127ec532ee64147e2c6 | PHP | hmaletzki/book-store | /src/Entity/Traits/SlugableTrait.php | UTF-8 | 436 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Entity\Traits;
trait SlugableTrait
{
/**
* @var string
* @ORM\Column(length=255, nullable=true)
*/
private string $slug;
/**
* @return string
*/
public function getSlug(): string
{
return $this->slug;
}
/**
* @param string $slug... | true |
b7bf1dfb1ec6f5fe329c8b36bab6420d32feacd9 | PHP | Arllamas/LearningPhpMysql | /vd240202_REUTILIZAR_CODIGO.php | UTF-8 | 2,466 | 3.78125 | 4 | [] | no_license | <?php
/*
Siguendo con el ejemplo anterior, vamos a copiar solo la clase coche en un archivo exclusivo php sin código html
y vamos a definor una nueva clase en el mismo archivo que vamos a llamar Camion, la primera con mayúscula y sin acento
ni caracteres raros; su constructor tambien se va a llamar obligatoriamente ... | true |
ffb590491f52adedb9fdbd6b673d106f531d4d15 | PHP | DesarrolloSoftwareProfesional/SistemaMonitoreoEstudiantil | /sme/src/dao/ApoderadoDao.php | UTF-8 | 3,006 | 2.84375 | 3 | [] | no_license |
<?php
require_once("../src/lib/autoload.php");
class ApoderadoDao
{
protected $mysqli;
public function __construct()
{
$this->mysqli = new Connection();
}
//FUNCION PARA OBTENER TODOS LOS REGISTROS
public function getAll()
{
$sql="CALL SP_APODERADOS_SELECT_ALL()";
... | true |
1382cedfff6881029981b013fa732c61fd7a7f0e | PHP | yangcey/laravel-api | /app/Console/Commands/updateVulPicture.php | UTF-8 | 2,530 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Vul;
use Log;
class updateVulPicture extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'update:vulpic';
/**
* The console command d... | true |
2ef942d876319e04ff92b6e406f9615601ab1a81 | PHP | brd6/notion-sdk-php | /src/Resource/Property/SyncedBlockProperty.php | UTF-8 | 1,711 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Brd6\NotionSdkPhp\Resource\Property;
use Brd6\NotionSdkPhp\Exception\InvalidResourceException;
use Brd6\NotionSdkPhp\Exception\InvalidResourceTypeException;
use Brd6\NotionSdkPhp\Exception\UnsupportedUserTypeException;
use Brd6\NotionSdkPhp\Resource\Block\AbstractBlock;
use ... | true |
a4207776bc27390f989d9d9e22bf8e70659fe10f | PHP | PBA-CPNV/151_bank | /model/agenciesManager.php | UTF-8 | 3,343 | 2.8125 | 3 | [] | no_license | <?php
/**
* @file agenciesManager.php
* @brief This model is designed to implement the articles business logic
* @author Created by Pascal.BENZONANA
* @author Updated by Nicolas.GLASSEY
* @version 12-MAY-2020
*/
//<editor-fold desc="region test">
/**
* @brief This function is designed to get al... | true |
18cf557ffe305c08ed9734f056ffd8812e214c27 | PHP | Adonis-Stavridis/Todo-list | /Web/src/Repositories/PDO/PDOTaskRepository.php | UTF-8 | 3,586 | 3.0625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace TodoWeb\Repositories\PDO;
use PDO;
use TodoWeb\Features\Comment\CommentRequest;
use TodoWeb\Features\CreateTask\CreateTaskRequest;
use TodoWeb\Models\Comment;
use TodoWeb\Models\Task;
use TodoWeb\Repositories\TaskRepository;
class PDOTaskRepository implements TaskRepository
... | true |
994cf11b5dd7cbbe6521e96138a6e93d7173b1db | PHP | steverhoades/async-talk-examples | /react-examples/async_tasks.php | UTF-8 | 2,848 | 3.21875 | 3 | [] | no_license | <?php
/**
* This example uses a library heavily inspired by nikic's article on
* coopertive multi-tasking with Generators and Coroutines.
*
* http://bitbucket.org/mkjpryor/async
*
* to end ctrl+c.
*
* Requires PHP 5.5+
*/
require __DIR__ .'/../vendor/autoload.php';
use Async\Util;
/*
* Class for a buffer of... | true |
c7f9a070e8c5fe4ac6cd06062ac839d19d879cf8 | PHP | ravitejav/crime_file_mangement | /admin_access/working.php | UTF-8 | 3,760 | 2.625 | 3 | [] | no_license | <?php
include '../includes/adminlogin.class.php';
/**
* to get and check the user LogicException
*/
class checker
{
public $loggedin;
public function checking()
{
$adminlogin=new adminlog;
$adminlogin->checkforlogin();
if($adminlogin->querycheck())
{
$this->loggedin=true;
... | true |
3724651d4ecd2ee168411b7dbd11750b72230caf | PHP | arresteddevops/ado-website | /web/app/plugins/pretty-link/pro/classes/models/PrliProUtils.php | UTF-8 | 10,952 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
if(!defined('ABSPATH'))
die('You are not allowed to call this page directly.');
class PrliProUtils
{
/** Fetches the Tweet Count from Twitter using the search API. This function
* basically does a count of hits from your url (which is unique).
*/
function get_tweets($query,$twid = 0)
{
global... | true |
aa7eb3b7c5185bc79ec9e070c3fe31f87c0e2aca | PHP | Trinh67/BTL-DBMS-2020 | /models/Login.php | UTF-8 | 1,405 | 2.8125 | 3 | [] | no_license | <?php
require_once('Connection.php');
class login{
var $connection;
function __construct(){
$conn_obj = new Connection();
$this->connection = $conn_obj->conn;
}
function find($email, $password){
// Cau lenh truy van co so du lieu
$query = "SELECT
*
FROM
cu... | true |
f330326014d75bdbfccd9c21411ca76e5e309aa4 | PHP | sify21/guahao | /app/controllers/LoginController.php | UTF-8 | 4,508 | 2.640625 | 3 | [] | no_license | <?php
class LoginController extends ControllerBase{
public function initialize(){
$this->view->setTemplateAfter('index');
$this->tag->appendTitle('用户注册');
parent::initialize();
}
//传递name,password,code;
//session:存储userid,username
public function loginAction(){
$name=$this->request->get('name','strin... | true |
74c0e7de905650dca9f01085f7f75226fad0f3fd | PHP | m2i-formation-cdi/video-rental-app | /src/ModelBundle/Entity/MovieCategory.php | UTF-8 | 2,049 | 2.578125 | 3 | [] | no_license | <?php
namespace ModelBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use ModelBundle\Entity\Movie;
use Doctrine\ORM\Mapping as ORM;
/**
* MovieCategory
*
* @ORM\Table(name="movie_categories")
* @ORM\Entity(repositoryClass="ModelBundle\Repository\MovieCategoryRepository")
*/
class MovieCategory
{... | true |
15f8c736ab8d9ba17e4865608969e430d8702ed7 | PHP | pantheon-systems/php-bench | /tests/cpu/test_ordered_functions.php | UTF-8 | 737 | 2.71875 | 3 | [
"ISC"
] | permissive | <?php
function tof_5($a, $b) {
return $a + $b;
}
function tof_4($a, $b) {
return tof_5($a, $b);
}
function tof_3($a, $b) {
return tof_4($a, $b);
}
function tof_2($a, $b) {
return tof_3($a, $b);
}
function tof_1($a, $b) {
return tof_2($a, $b);
}
function test_ordered_functions($base) {
$t =... | true |
6b0536d478f7ad071b03fabce2f7072828c7d350 | PHP | DayaneCordeiro/PHP_OO | /Lesson 17 - Relationship between objects (aggregation)/index.php | UTF-8 | 636 | 4 | 4 | [] | no_license | <?php
class Product {
public $name;
public $value;
function __construct($name, $value) {
$this->name = $name;
$this->value = $value;
}
}
class ShoppingCart {
public $products;
// Will receive a instace of class Product as parameter
public function add(Product $product) {
$this->products[] = $product;
... | true |
c0ce493d84907cf9b2746f7ae11cc7147e05e661 | PHP | faheemuddin35/Assignment1 | /project/resources/views/pro/userprofile.php | UTF-8 | 657 | 2.75 | 3 | [
"MIT"
] | permissive | html>
<title>userProfile.php</title>
<body>
<?php
session_start();
$username = $_SESSION['username']; //retrieve the session variable
?>
<div style="text-align:center"><h1>User Profile</h1></div>
<br/>
<div style="font-weight:bold"> Welcome <?php echo $username ?> </div>
<div style="text-align: right"><a... | true |
bad80e2acd67a144cbdf3e0af02b5559f489a113 | PHP | Weasle/Formagic | /src/Formagic/Rule/Equal.php | UTF-8 | 2,180 | 2.96875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Formagic
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at
* http://www.formagic-php.net/license-agreement/
* If you did not receive a copy of the license and are unabl... | true |
02f7a27e3fdbb7f8b818eab654b4a9c9dad6ce7d | PHP | karlmartinsson/oophpBTH | /test/Dice1/DiceControllerTest.php | UTF-8 | 2,698 | 2.734375 | 3 | [] | no_license | <?php
namespace Karl\Dice1;
use Anax\Response\ResponseUtility;
use Anax\DI\DIMagic;
use PHPUnit\Framework\TestCase;
/**
* Test the controller like it would be used from the router,
* simulating the actual router paths and calling it directly.
*/
class DiceControllerTest extends TestCase
{
private $controller... | true |
5e6760c43f61e53e76b9852609f2a2ddde7aabcb | PHP | baraja-core/shop-warehouse | /src/CmsWarehouseEndpoint.php | UTF-8 | 2,143 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Baraja\Shop\Warehouse;
use Baraja\Doctrine\EntityManager;
use Baraja\StructuredApi\BaseEndpoint;
final class CmsWarehouseEndpoint extends BaseEndpoint
{
public function __construct(
private WarehouseManager $warehouseManager,
private EntityManager $entityManager,
) {
... | true |
a8672264d06e5ee928acc1489d91d815d907c72a | PHP | qiilee/js | /Ajax/zhuwu/day02/02XMLHttpRequest/04userReg.php | UTF-8 | 438 | 2.609375 | 3 | [] | no_license | <?php
$data=$_POST["username"];
//如果是实际的开发,我肯能会这条记录拿到数据库里面去查询一下。
//如果查询到了,说明该用户名已经被注册了
if($data=='zhangshanshan'){
echo "改用户名已经被注册了哦,亲";
}else{ //否则,该用户名可以使用.
echo "恭喜你,可以注册";
}
?> | true |
9461e6becdd921b3a73af209d6f71a547f6f422e | PHP | tycho-v/lidworden | /ideal.inc | UTF-8 | 3,535 | 2.953125 | 3 | [] | no_license | <?php
/**
* Ideal Utility class
*
* **NOTE**: Class output has no security in XSS whatsoever. It merely escapes
* HTML to avoid broken HTML. But security is left to user of the class.
*/
class Ideal {
// Default settings
public $currency = 'EUR'; // Ideal only support payments in EURO.
public $language_cod... | true |
230d5c12c5ef6ef69122261df0186b406dbf8495 | PHP | IdRatherBeaSnail/Aston-Events | /AstonEvents/Aston Events/includes/signup.inc.php | UTF-8 | 3,332 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
if (isset($_POST['submit'])) {
include_once 'dbh.php';
// stops sql injection
$first = mysqli_real_escape_string($conn, $_POST['first']); /*input into text, incase code is written into input box */
$last = mysqli_real_escape_string($conn, $_POST['last']); /*input into text, incase code is written... | true |
f7a27e6e40c30a38a74c1d04283196170a046468 | PHP | dimitri-moeson/poo | /App/Controller/Game/DefaultController.php | UTF-8 | 2,374 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Controller\Game;
use App;
use App\Model\Entity\Game\Item\ItemEntity;
use App\Model\Service\EquipementService;
use App\Model\Service\MapService;
use App\Model\Service\MovementService;
use App\Model\Table\Game\Inventaire\InventaireTable;
use Core\Debugger\Debugger;
use Core\HTML\Env\Get;
use Core\HT... | true |
d0e37b1e1a1bd5048184b73e38d6b4dbaa5f3c51 | PHP | ecokprn/tes | /login.php | UTF-8 | 3,256 | 2.515625 | 3 | [] | no_license | <?php
include "./class/koneksi.php";
if(isset($_COOKIE['ID_my_site']))
{ $username = $_COOKIE['ID_my_site'];
$pass = $_COOKIE['Key_my_site'];
$check = mysql_query("SELECT * FROM mst_person WHERE login = '$username'")or die(mysql_error());
while($info = mysql_fetch_array( $check ))
{
if ($pass != tr... | true |
d4899bf121f06073346a664ac735635a12538ec0 | PHP | DatabaseAsAService/df-system | /tests/PackageTest.php | UTF-8 | 17,434 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
use DreamFactory\Core\Components\Package\Package;
class PackageTest extends \DreamFactory\Core\Testing\TestCase
{
const TEST_PACKAGE = __DIR__ . '/unit-test-pkg.zip';
const TEST_PACKAGE_SECURED = __DIR__ . '/unit-test-pkg-secured.zip';
const SECURED_PASSWORD = 'dream123!';
protected function ... | true |
272ef5509d7b6231db7cd5d196ea0830c805997c | PHP | networkhermit/algorithm | /archive/php/muse/util/SequenceBuilder.php | UTF-8 | 652 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace muse\util\SequenceBuilder;
require_once "muse/util/RandomFactory.php";
require_once "muse/util/Sequences.php";
use muse\util\RandomFactory;
use muse\util\Sequences;
function packIncreasing(array &$arr): void
{
$arr[0] = RandomFactory\genIntN(1, 3);
for ($i = 1, $len... | true |
c27297f28ec142f2f1a35d5cca137c35baa88865 | PHP | CroudTech/package-laravel-recurring-task-scheduler | /src/Contracts/ScheduleableContract.php | UTF-8 | 322 | 2.65625 | 3 | [] | no_license | <?php
namespace CroudTech\RecurringTaskScheduler\Contracts;
use CroudTech\RecurringTaskScheduler\Events\ScheduleEventTriggerEvent;
interface ScheduleableContract
{
/**
* Schedule callback
*
* @return boolean
*/
public function scheduleEventTrigger(ScheduleEventTriggerEvent $event) : bool;
... | true |
de1fe5a709bdaadb22d63897776d41b2ace19689 | PHP | fitdev-pro/router | /src/Request/IRequest.php | UTF-8 | 439 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace FitdevPro\FitRouter\Request;
interface IRequest
{
public function getRequestMethod(): string;
public function getRequsetUrl(): string;
public function getRequestParams(): array;
public function getRequestParam(string $key, $default = null);
public function addRequestParam(string $k... | true |
af53d544e28e68d7349feaa9f1b422a37cd8ca2a | PHP | numerogeek/Streams | /app/addons/modules/addons/src/Traits/SyncTrait.php | UTF-8 | 716 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php namespace Addon\Module\Addons\Traits;
trait SyncTrait
{
/**
* Syn addons from file system to database and back.
*/
public function sync()
{
$class = explode('\\', get_called_class());
$manager = \Str::studly(str_replace('EntryModel', null, end($class)));
$existing... | true |
a7e4d8cbf2dfda9f866322b066f64ffab97e327f | PHP | inseluine/base | /study/php/paiza/ipregex.php | UTF-8 | 406 | 2.890625 | 3 | [] | no_license | <?php
//変数の前後に()をつけておく
$ipRegex1 = "[1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]";
$ipRegex2 = "$ipRegex1|\*|\[$ipRegex1\-$ipRegex1\]";
$ipRegex3 = "($ipRegex1)\.{2}($ipRegex2)\.($ipRegex2)";
preg_match_all("/$ipRegex3/", getStdin(), $matches, PREG_PATTERN_ORDER);
print_r($matches);
var_dump($matc... | true |
7462dc0db3d6158432d67767ed5aee0c9bc66063 | PHP | rahuljitendradesai/collections-php5.2 | /library/Collections/Comparator.php | UTF-8 | 1,276 | 3.15625 | 3 | [] | no_license | <?php
/**
* Collections
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
*
* @category Collections
* @package Collections_Comparator
* @author Fabio B. Silva
* @copyright Copyright (c) 2009-2011 FlexRia Inc. (http://www.... | true |
46e93efad63f510c9f2147b373379bf3cb33a65e | PHP | Hadra92i/Gestion_stagiaires | /pages/login.php | UTF-8 | 3,313 | 2.5625 | 3 | [] | no_license | <?php
session_start();
require_once '../database/db.php';
$message = "";
if(!empty($_POST)){
if(!empty($_POST['pseudo']) && !empty($_POST['pwd'])){
$pseudo = $_POST['pseudo'];
$pwd = sha1($_POST['pwd']);
$requette = "SELECT * FROM users WHERE pseudo = ? AND pwd = ?"... | true |
2c6cd44a9a19b6c024f770145b00eb8ad1a81761 | PHP | DenisGorbachev/OldRoboticks | /client/lib/command/RepairCommand.class.php | UTF-8 | 1,045 | 2.6875 | 3 | [] | no_license | <?php
require_once dirname(__FILE__).'/base/RobotCommand.class.php';
class RepairCommand extends RobotCommand {
public function getParserConfig() {
return array_merge(parent::getParserConfig(), array(
'description' => 'Repair one letter in target robot'
));
}
public function g... | true |
c437b5c6fd4fbe3c2e2760cbe3d61baf39247cbf | PHP | conferencetools/attendance-module | /tests/1.unit/Domain/Ticketing/ReadModel/EventTest.php | UTF-8 | 1,157 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace ConferenceTools\AttendanceTest\Domain\Ticketing\ReadModel;
use ConferenceTools\Attendance\Domain\Ticketing\Descriptor;
use ConferenceTools\Attendance\Domain\Ticketing\ReadModel\Event;
class EventTest extends \Codeception\Test\Unit
{
/** @var \UnitTester */
protected $tester;
public funct... | true |
fd13b888f853a0bdb76c8fc53ddbf4ca6cb14429 | PHP | thanhtuyen/test | /protected/globals.php | UTF-8 | 3,056 | 2.78125 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: Thanh Tuyen
* Date: 2/28/14
* Time: 10:51 PM
* To change this template use File | Settings | File Templates.
*/
/*
* author: TamEmNTN
* getMessage
*
*/
function getMessage ($messageKey, $title = "", $arrParam=array()) {
if (!empty($messageKey)) {
$messag... | true |
f3dfc6eed4395afd7fddd01d452533a9d4af1f56 | PHP | rodravid/new_mistral | /app/Vinci/App/Integration/ERP/Logger/IntegrationLogger.php | UTF-8 | 2,593 | 2.578125 | 3 | [] | no_license | <?php
namespace Vinci\App\Integration\ERP\Logger;
use Exception;
use Illuminate\Database\Eloquent\Model;
use Vinci\App\Core\Services\Presenter\Presentable;
use Vinci\App\Core\Services\Presenter\PresentableTrait;
use Vinci\App\Integration\ERP\Customer\CustomerIntegrationLogger;
use Vinci\App\Integration\ERP\Order\Addr... | true |
28495715d9a45701f0ba5545ae14a21ce4cfb831 | PHP | VisionYi/PHP_web_api | /autoload.php | UTF-8 | 1,034 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* description: http://justericgg.logdown.com/posts/196891-php-series-autoload
* PSR-0 Standard: https://www.sitepoint.com/autoloading-and-the-psr-0-standard/
* 適用於 PHP 5.3.0 以後的版本
*
* @author https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
* @author VisionYi (加入 $fileExtension 做附檔... | true |
7dab569c84a2abdf7978c353bf31373340bff5ca | PHP | eyeem/amateur | /core/replaceable.functions.php | UTF-8 | 1,135 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
function instance($classname)
{
return function() use($classname) {
static $instance;
return $instance ? $instance : $instance = new $classname;
};
}
function replaceable($name, $replaceable)
{
global $replaceables;
if (!function_exists($name)) {
eval('function ' . $name . '() { return repla... | true |
16e6968bbdaf8126f309cc0873d0745e4378f973 | PHP | Schtolc/furry-barnacle | /output/select_to_pdf.php | UTF-8 | 1,039 | 2.71875 | 3 | [] | no_license | <?php
include '../library.php';
$con = connect_to_oracle();
if (!$con)
die();
require '../vendor/autoload.php';
function generate_table($pdf, $header, $data)
{
// Header
foreach($header as $col)
$pdf->Cell(40,7,$col,1);
$pdf->Ln();
// Data
foreach($data as $row)
{
foreach(... | true |
5ff5d3cc74fb0c857af0969fe05629a8db5aa175 | PHP | AngelloTorresGitHub/laravel | /prueba/database/seeds/ProfessionalSeeder.php | UTF-8 | 1,282 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use App\Models\Profession;
class ProfessionalSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
////////////////////////////////////////////
/* Insert... | true |
4818796f9b9417901ecc10ab3d2eb1d30d042acf | PHP | GaelleH/own-erp | /app/Http/Controllers/ProductController.php | UTF-8 | 5,364 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\ProductRequest;
use Illuminate\Http\Request;
use App\Product;
use DB;
class ProductController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
0ea0f8099a140879ae870269ae0d26cf13773dfc | PHP | Mdhesari/design-patterns | /app/Factory/ATransport/Logistics/SeaLogistic.php | UTF-8 | 417 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Factory\ATransport\Logistics;
use App\Factory\ATransport\Illuminate\Logistic;
use App\Factory\ATransport\Illuminate\Transports\SeaInterface;
use App\Factory\ATransport\Transports\Ship;
class SeaLogistic extends Logistic
{
public function newTransport(SeaInterface $transport = null)
{
... | true |
e70ed1b7b7a56348059a48735fa416fd89fda837 | PHP | wfei86/IMI | /src/Pool/Interfaces/IPoolConfig.php | UTF-8 | 2,860 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Imi\Pool\Interfaces;
/**
* 池子配置接口
*/
interface IPoolConfig
{
/**
* 池子中最多资源数
* @return int
*/
public function getMaxResources();
/**
* 池子中最少资源数
* @return int
*/
public function getMinResources();
/**
* 获取资源回收时间间隔,单位:秒
* @return int|null
... | true |
c465a03354cb70773d90cda64324f3330d5bc8e4 | PHP | leovieira/IF | /Desenvolvimento para Web II/PHP - Lista de exercícios de funções/Ex3.php | UTF-8 | 125 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
function Casado ($n1, $n2){
return "O " .$n1 ." é casado com a ".$n2 ."!";
}
echo Casado("Sérgio", "Telma");
?> | true |
c3249ef0d4c8cee438cee3d5902fe76a475ea8da | PHP | trietphampscd/sign-docment-laravel-vue | /backend/app/Language.php | UTF-8 | 544 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\Model;
class Language extends Model
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $table = 'languages';
protected $fillable = [
... | true |
ab44b0fa36c057526cac99d42e7f131535554b55 | PHP | iammac360/upittc | /day1/array_to_string.php | UTF-8 | 408 | 4.125 | 4 | [] | no_license | <!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Array to String</title>
</head>
<body>
<?php
$arr = array("Honda", "Toyota", "Nissan", "Mazda");
$newList = implode(" ", $arr);
echo 'Your Array';
?>
<pre><?php var_dump($arr); ?></pre>
is now a single long string with each word separa... | true |
22836adb67a4e653ff401b82cc115a2d6e2aadeb | PHP | OrfaG4/OffersArroundMe | /mvc/app/tests/authTest.php | UTF-8 | 1,388 | 2.703125 | 3 | [] | no_license | <?php
require_once "../init.php";
require_once "../models/UserDAO.php";
class authTest extends PHPUnit_Framework_TestCase{
public function setUp(){
$db = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS);
$net = new Network();
$this->testObj = new UserDAO($db, ... | true |
47dce2d62faee4fc9ed6197bec1a849affcbe179 | PHP | Ibaia/2DAW_Ander | /DesarrolloWebEnEntornoServidor/U.D.-1/Ejercicio204/vending/cambio.php | UTF-8 | 1,569 | 3.1875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Cambio</title>
</head>
<body>
<?php
$billete=$_POST["billete"];
$price=$_POST["price"];
$cam... | true |
d6936f38515cdbe037b05f405ff7657cad280f53 | PHP | kavinsky/schema | /src/Interfaces/WarrantyPromise.php | UTF-8 | 496 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Brick\Schema\Interfaces;
use Brick\Schema\SchemaTypeList;
/**
* http://schema.org/WarrantyPromise
*
* @property-read SchemaTypeList<QuantitativeValue> $durationOfWarranty The duration of the warranty promise. Common unitCode values are ANN for year, MON for months, or DAY... | true |
0826a325245b2a8bb1140019c63db2e1758a2786 | PHP | bshaffer/oauth2-server-php | /src/OAuth2/OpenID/ResponseType/IdTokenToken.php | UTF-8 | 1,131 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace OAuth2\OpenID\ResponseType;
use OAuth2\ResponseType\AccessTokenInterface;
class IdTokenToken implements IdTokenTokenInterface
{
/**
* @var AccessTokenInterface
*/
protected $accessToken;
/**
* @var IdTokenInterface
*/
protected $idToken;
/**
* Constructo... | true |
bf14cd4f1efd55b655df666a04ee5eebd3dc6320 | PHP | leonardo77mc/suplosBackEnd-prueba | /src/daos/inmuebles.dao.php | UTF-8 | 1,662 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
include("../data/db/Connect.php");
class InmuebleDaos
{
// metodo dao que guarda el inmueble.
public static function save($direccion, $ciudad, $telefono, $codigoPostal, $tipo, $precio, $idInmobiliaria)
{
$connect = Connect::getINSTANCE();
$insertar = "INSERT INTO `list_inmuebles` (`i... | true |
3f9685102e5b432aa89d4faad7e8230512abbe0a | PHP | renan-taranto/mabike | /tests/JsonHeadersFactory.php | UTF-8 | 991 | 2.578125 | 3 | [] | no_license | <?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 Tests;
/**
* Description of HeadersFactory
*
* @author renantaranto
*/
class JsonHeadersFactory
{
static pri... | true |
94ec168542c851180ac89b0b22ca5ad75651f9cb | PHP | uetiko/SDInvoicesFileCheck | /app/dto/Invoice.php | UTF-8 | 4,308 | 2.984375 | 3 | [] | no_license | <?php
namespace dto;
/**
* Class Invoice
* @package dto
*/
class Invoice implements \Serializable{
/** @var string $month */
private $month = null;
/** @var string $uuid */
private $uuid = null;
/** @var string $clientName */
private $clientName = null;
/** @var string $rfc */
private... | true |
8a40fac865c08990d66c01c92f58615b7c39ff22 | PHP | aybarsalvarci/laravel-api | /app/Factory/Localization/Resource/CheckBind/CheckBind.php | UTF-8 | 404 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Factory\Localization\Resource\CheckBind;
/**
* Class CheckBind
* @package App\Factory\Localization\Resource\CheckBind
*/
class CheckBind
{
/**
* @var array
*/
protected array $binds = [];
/**
* CheckBind constructor.
*
* @param arr... | true |
ecc2c6711ae93d7a18e6c60f9bac44bf0e1794c5 | PHP | mvonahn/wlhssb | /ci/application/models/game_model.php | UTF-8 | 2,014 | 2.65625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Class Contact_model
*/
class Game_model extends CI_Model
{
/**
* Constructor
*
* @access public
*/
public function __construct()
{
parent::__construct();
log_message('debug', 'WLHSSB: Game... | true |
c35a71089e88ef54eafc563e14e1caf741094d9b | PHP | yygy125/framework | /src/FastD/Framework/Bundle/Bundle.php | UTF-8 | 1,976 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: janhuang
* Date: 15/1/26
* Time: 下午11:16
* Github: https://www.github.com/janhuang
* Coding: https://www.coding.net/janhuang
* sf: http://segmentfault.com/u/janhuang
* Blog: http://segmentfault.com/blog/janhuang
*/
namespace FastD\Framework\Bundle;
use FastD\Config\C... | true |
53638bca612c808437c47d6e8f23a5cf7aecfe3d | PHP | silverfoxy/PHPDebloating | /web/phpMyAdmin-4.8.0.1-all-languages/libraries/classes/Plugins/Schema/ExportRelationSchema.php | UTF-8 | 6,913 | 2.8125 | 3 | [
"GPL-2.0-only",
"GPL-2.0-or-later",
"Apache-2.0"
] | permissive | <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Contains PhpMyAdmin\Plugins\Schema\ExportRelationSchema class which is
* inherited by all schema classes.
*
* @package PhpMyAdmin
*/
namespace PhpMyAdmin\Plugins\Schema;
use PhpMyAdmin\Relation;
use PhpMyAdmin\Url;
use PhpMyAdmin\Util;
/**
* This class is in... | true |
3a1e8112da15f6e9e191587d1cfc115e784ca63f | PHP | atk14/Atk14Catalog | /app/fields/login_field.php | UTF-8 | 1,199 | 2.875 | 3 | [] | no_license | <?php
class LoginField extends RegexField{
function __construct($options = array()){
$options += array(
"max_length" => 50,
);
$options += array(
"help_text" => sprintf(_("Only letters, numbers, dots and dashes are allowed. Up to %s characters."),$options["max_length"]),
"hints" => array("john.doe","sa... | true |
962e5b60e9737ee52e847757b78725ba7692c2e5 | PHP | JeanPerrault/site-a | /public/tableaux.php | UTF-8 | 871 | 3.609375 | 4 | [] | no_license | <?php
// tableau Numerique
$numericalArray = array(
"pomme", // index : 0
"poire", // index : 1
"banane" // index : 2
);
// affiche banane
echo $numericalArray[2];
echo "<br>";
// ---
// tableau associatif
$assoArray = array(
"firstname" => "Bruce",
"lastname" => "WAYNE"
);
echo $asso... | true |
15e5031a080d8898578d23d8b5e9d0eb6ab20913 | PHP | andreasmast/AndyRemote | /Steuerung/Steuerung_right.php | UTF-8 | 1,126 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
echo "Funktioniert!";
define ('Pin_Motor1_forw',10);
define ('Pin_Motor1_backw',9);
define ('Pin_Motor2_forw',24);
define ('Pin_Motor2_backw',23);
define ('Pin_Motor1_enable',11);
define ('Pin_Motor2_enable',25);
function set_gpio_export_out(){ //direction "out"
shell_exec("gpio exp... | true |
cbaa1e6639872aafd1ca844814809ecd48de4d40 | PHP | SergioRibera/simple-mvc-php | /Http/DataBase/DB.php | UTF-8 | 630 | 2.578125 | 3 | [] | no_license | <?php
class DB{
private static $db = null;
public static function getDB() : PDO{
if(is_null(self::$db)){
$engine = Config::get('DATABASE_ENGINE', "mysql");
$host = Config::get('DATABASE_HOST', "localhost");
$database = Config::get('DATABA... | true |
b013b179384e2297a2e24d40791ee2c287e7d2fc | PHP | digital-canvas/eztext | /src/DigitalCanvas/EzText/Adapter/PEAR.php | UTF-8 | 2,569 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace DigitalCanvas\EzText\Adapter;
use DigitalCanvas\EzText\Request;
use DigitalCanvas\EzText\Response;
use DigitalCanvas\EzText\Exception\RuntimeException;
use DigitalCanvas\EzText\Exception\UnexpectedValueException;
use HTTP_Request2;
use HTTP_Request2_Response;
/**
* Sends Requests using the HTTP_Reque... | true |