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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e996aad9ed39d3582155d3f8dcc8a0f0c1817cc2 | PHP | SFPmedia/gruppe14 | /sender.php | UTF-8 | 2,064 | 2.59375 | 3 | [] | no_license | <?
if (!empty($_POST['subject'])) {
header ("Location: blokeret.php");
exit;
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<?php
if (isset($_POST['submit']))
{
if (!empty($_POST['name']) && // tjek, at der er skrevet et navn
!empty($_POST['email']) && // tjek, at der er skrevet en ... | true |
5674b1c125c999d9ed9c0a7643d3e2c359b628eb | PHP | Payal1215/my-repo | /protected/models/Users.php | UTF-8 | 3,707 | 2.703125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "users".
*
* The followings are the available columns in table 'users':
* @property integer $user_id
* @property string $lmw_id
* @property string $user_name
* @property string $email
* @property string $password
* @property string $create_at
* @property string $... | true |
d719836407eb5ed5cd59752271ad8e5b766e20dc | PHP | marv-th/GOSBot_Host_LNX | /instance/instance_update_se.php | UTF-8 | 5,686 | 2.5625 | 3 | [] | no_license | <?php
ini_set("display_errors",0);
function wait_points($times) {
$a = 0;
while ($a <= $times) {
$a++;
usleep(500000);
echo ".";
}
}
function console_print($text, $type = null) {
if ($type=="error") {
echo "\033[01;31m $text \033[0m \n";
exit();
} elseif ($t... | true |
12e606518756ba357167a260215e52b2db1bad67 | PHP | cahweb/common-courses | /includes/courses.php | UTF-8 | 11,141 | 2.765625 | 3 | [] | no_license | <?
include "db.php";
function render_courses($dept, $start, $end) {
$db = db_connect();
$terms = courses_get_terms($db, $dept);
$current_term = courses_get_current_term();
$ranged_terms = courses_filter_terms_default($terms, $current_term);
$subjects = courses_get_subjects($db, $dept);
$c... | true |
6bc92ce57cf8522e4446cf41f66e2ab289d930f8 | PHP | uwaeae/workbook | /lib/validator/TaskItemValidatorSchema.class.php | UTF-8 | 970 | 2.609375 | 3 | [] | no_license | <?php
class TaskItemValidatorSchema extends sfValidatorSchema
{
protected function configure($options = array(), $messages = array())
{
$this->addMessage('matchcode', 'Eine Dateibezeichung wird benötigt');
$this->addMessage('description', 'Eine Datei wird benötigt');
}
protected function doClean($val... | true |
feee06883901eb2ca8a6adf7382db7b56e06450f | PHP | sayyidyofa/bukuasa | /app/Models/Overtime.php | UTF-8 | 2,859 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use \DateTimeInterface;
/**
* App\Models\Overtime
*
* @property int $id
* @property string $dept
* @property \Illuminate\Sup... | true |
c423cc71bfddebadf5f095916e0a84dc8a97dac6 | PHP | triple-w/fcare | /app/Entities/app/Models/UsersInfoFactura.php | UTF-8 | 2,154 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace app\Models;
/**
* UsersInfoFactura
*/
class UsersInfoFactura
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $password;
/**
* @var \App\Models\Users
*/
private $user;
/**
* @var \Doctrine\Common\Collections\Collectio... | true |
362c2ecb50169a0d04acea13c65bccc42eb6265b | PHP | dragent/Odi_project | /projet_odi/src/AppBundle/Controller/ListePaniersController.php | UTF-8 | 1,772 | 2.640625 | 3 | [] | no_license | <?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\SecurityContext;
use AppBundle\Entity\Panier;
use AppBundle\Entity\Contenir;
us... | true |
850f9562f40d070a7f78dc6ec01118d231abac42 | PHP | ChloeArd/live-namespaces-traits-diagramme | /Entity/School.php | UTF-8 | 1,163 | 3.15625 | 3 | [] | no_license | <?php
namespace Live\Entity;
use Live\Traits\EntityTrait;
class School {
use EntityTrait;
private Implantation $implantation;
private string $director;
/**
* School constructor.
* @param Implantation $implantation
* @param string $director
*/
public function __construct(Imp... | true |
55130d5e932e6c251329832cc6fe5d10181b6b4b | PHP | mmoigaar/progOblig2 | /class_course.php | UTF-8 | 2,621 | 3.34375 | 3 | [] | no_license | <?php
class Course{
//Direct input
protected $id;
protected $name;
protected $year;
protected $semester;
protected $instructor;
protected $credits;
//Calculated
protected $numOfStudents;
protected $passed;
protected $failed;
protected $avgGrade;
function __construct... | true |
c8602b26d82a1d723339a571187812a47c641fd2 | PHP | TrancalyT/Formation | /PHP/PHP_POO/Exo_User/Personne_User.php | UTF-8 | 850 | 3.390625 | 3 | [] | no_license | <?php
abstract class Personne_User{
protected int $id;
protected string $nom;
protected string $prenom;
protected string $mail;
protected string $tel;
protected float $salaire;
abstract public function calculerSalaire() : float;
abstract public function afficher() : void;
public ... | true |
82387f91cbf9042a06ce15b04132cc31a65e379b | PHP | TijmenWierenga/Bogus | /examples/abstract-factory.php | UTF-8 | 1,121 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace TijmenWierenga\Bogus\Example;
use TijmenWierenga\Bogus\Factory\AbstractFactory;
require_once __DIR__ . '/../vendor/autoload.php';
final class UserFactory extends AbstractFactory
{
public function creates(string $entityClassName): bool
{
return $entityClassName === User::class;
}
... | true |
15344cb8c0d6b2ab2f3ebe82d7623f3de49efe30 | PHP | Lorenzohidalgo/UAB---ASSIGNMENTS | /Third Year/Internet and Web Technologies/Online Shop/CODE/model/db_functions.php | UTF-8 | 8,956 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
// CREATES A CONNECTION WITH THE DB
function connectDB(){
$servername = "localhost";
$username = "tdiw-r4";
$password = "CENSORED";
$dbname = "tdiw-r4";
try {
// Create connection
$conn = new PDO('mysql:host='.$servername.';dbname='.$dbname.';charset=utf8mb4', $u... | true |
98e8ca40c44c2548ea6f0f18ca1cb8d286e02d74 | PHP | Sherlock-Homles/Image-Processing | /image-processing/function/watermark.php | UTF-8 | 3,418 | 2.9375 | 3 | [] | no_license | <?php
/*
* 图片添加水印
* @param string $img 背景图片(待加水印的图片)
* @param string $watermark 水印图片地址
* @param string $district 水印位置
* @param integer $watermarkquality 图片水印质量
* @param string $path 水印图片储存路径
* @return mixed
*/
function watermark($img, $watermark, $path, $district = 0, $watermarkquality = 95)
{
$imginfo ... | true |
6f7ac95771748ab78f5ac6759bb745b1b879d563 | PHP | Snoradbe/mine | /app/Listeners/Admin/BugReport/ChangeStatusListener.php | UTF-8 | 1,380 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners\Admin\BugReport;
use App\Entity\Site\BugReport;
use App\Entity\Site\Log;
use App\Entity\Site\UserNotification;
use App\Events\Admin\BugReport\ChangeStatusEvent;
use App\Listeners\Listener;
use App\Listeners\NotificationListener;
use App\Listeners\SiteLogListener;
class ChangeStatusLis... | true |
7c93d178accc7652f08c7edd21011e3cc875274d | PHP | Falkvinge/BlogTheme2016 | /inc/carbon-fields/core/Container/User_Meta_Container.php | UTF-8 | 4,616 | 2.640625 | 3 | [] | no_license | <?php
namespace Carbon_Fields\Container;
use Carbon_Fields\Datastore\Meta_Datastore;
use Carbon_Fields\Datastore\User_Meta_Datastore;
class User_Meta_Container extends Container {
protected $user_id;
public $settings = array(
'show_on' => array(
'role' => array(),
),
);
/**
* Create a... | true |
b33aefb5c7ab677463c0a6a6c12435660129356f | PHP | kincade71/toohotforig | /application/controllers/IndexController.php | UTF-8 | 1,181 | 2.578125 | 3 | [] | no_license | <?php
require_once dirname(dirname(__FILE__)).'/includes/Cookie.class.php';
require_once dirname(dirname(__FILE__)).'/models/objects/UserObject.php';
class IndexController extends Zend_Controller_Action
{
private $user;
private $media;
public function init()
{
Cookie::startSession();
$this->me... | true |
eaaaebe6d1236332c6fc94671f9e9ca010abc490 | PHP | mreka91/hacker-news | /app/functions.php | UTF-8 | 1,803 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
function redirect(string $path)
{
header("Location: ${path}");
exit;
}
//adds an error message to session error variable
if (!function_exists('errorMessage')) {
function errorMessage(string $message): void
{
$_SESSION['errors'][] = "${message}";
}
}
//adds ... | true |
3a5bf1343d787544dc572fa9bcda3748a1fce4a4 | PHP | zaidkamal/mediahub | /protected/models/FtpProfile.php | UTF-8 | 1,052 | 2.59375 | 3 | [] | no_license | <?php
class FtpProfile extends CActiveRecord {
public static function model($className=__CLASS__) {
return parent::model($className);
}
public function tableName() {
return 'ftp_profiles';
}
public function rules() {
return array(
array('user_id, name, server, port, username, password, typ... | true |
6a581b416cf01c58afac3b077ef4753429ca6be1 | PHP | karelkraus/CF-KarelKraus-CodeReview-11 | /actions/a_create.php | UTF-8 | 2,926 | 2.75 | 3 | [] | no_license | <?php
ob_start();
session_start();
require_once 'db_connect.php';
// if session is not set this will redirect to login page
if( !isset($_SESSION['superadmin']) && !isset($_SESSION['admin']) && !isset($_SESSION['user']) ) {
header("Location: index.html");
exit;
}
if(isset($_SESSION["user"])){
header("Location: home.... | true |
56ec7fbdd36408379c910fc9156d087d007b6983 | PHP | emilevictor/QR-ScanTrak | /admin/db_helper/notifyChecker.php | UTF-8 | 2,084 | 2.71875 | 3 | [] | no_license | <?php
/* notifyChecker:
Run by either cron or an ajax script in an open browser window,
this script checks for new scans on QR codes that are being watched
by zombies.
If it finds a QR code that has been scanned since it was last run,
it emails the zombie's email address.*/
include("db_connect.php");
... | true |
72785bd5cc98ec667c4c82d75a931f69eb600b3a | PHP | liuxingchi/eie | /.svn/pristine/8a/8a423cfc5760d095cca66cf5402be75e882c2aca.svn-base | UTF-8 | 2,033 | 2.515625 | 3 | [] | no_license | <?php
namespace Mirror\CardBundle\Service;
use Mirror\CardBundle\Entity\SystemSettings;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class ConfigManager
{
public function get(Controller $controller, $name, $default){
$em = $controller->getDoctrine()
->getEntityManager();
$systemSettings = $... | true |
e4684367320189f13c1235ac72dbfe447aa288dd | PHP | diogocanas/EvaluationFilms | /src/www/profileAdmin.php | UTF-8 | 3,194 | 2.625 | 3 | [] | no_license | <?php
/**
* Nom du projet : Evaluation Films
* Nom du fichier : profileAdmin.php
* Auteur : Diogo Canas Almeida
* Date : 03 juin 2020
* Description : Page de profil (pour l'administrateur)
* Version : 1.0
*/
/**
* @brief Cette page est utilisée par l'administrateur pour bloquer ... | true |
8635af6e5b192fc3b47b0f5ec0d6a91e012b8a9b | PHP | aiat-smd/php-basic-backend | /backend/index.php | UTF-8 | 860 | 2.609375 | 3 | [] | no_license | <?php
include_once "./database.php";
session_start();
$db = null;
function db(){
if ($db == null){
$db = new FakeDatabase();
}
return $db;
}
function redirect($uri){
header("Location: " . $uri);
}
$uri = $_SERVER["REQUEST_URI"];
$method = $_SERVER["REQUEST_METHOD"];
$authorizedUser = null... | true |
a5215a9b12fc9ca17fbee7617d5f370bd3bacd70 | PHP | YeeJiaWei/laravel-table-generator | /src/Column/DateTimeColumn.php | UTF-8 | 412 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace YeeJiaWei\TableGenerator\Column;
use YeeJiaWei\TableGenerator\Traits\SortableColumn;
class DateTimeColumn extends Column
{
use SortableColumn;
public $format = 'd M Y h:m A';
public function __construct(string $name)
{
parent::__construct($name);
}
public function ... | true |
93b88a14a1d53b951ae26153894a57e5f141b960 | PHP | Group12BCIT/IkeaStarterKit | /tests/application/models/CategoryTest.php | UTF-8 | 2,530 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
use PHPUnit\Framework\TestCase;
// Extend from the entity
class CategoryTest extends TestCase
{
private $CI;
public function setUp()
{
// Load CI instance normally
$this->CI = &get_instance();
$this->CI->load->model('categoriesentity');
$this->item = new CategoriesEntity();
$this->item->cat... | true |
b4c849ff65482b4e011a1b823e07a19a9cead34e | PHP | Thom9521/php-projects | /week36/hello.php | UTF-8 | 343 | 3.484375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body bgcolor="#7fffd4">
<?php
$fuel = 10;
while($fuel >= 1){
echo "The fuel is at $fuel" . "<br>";
--$fuel;
}
echo "<br>";
$count = 0;
while(++$count <= 12){
echo "$count times 12 is " . $count * 12 . "<br>"... | true |
72b24b83ece391ec04a968eca49c1e95462f038b | PHP | FelipeLimaBrazil/brasil-helper | /BrasilHelper.php | UTF-8 | 17,565 | 2.953125 | 3 | [] | no_license | <?php
namespace sururulab\BrasilHelper;
use sururulab\BrasilHelper\lib\pierophp\InscricaoEstadual;
/**
* Brasil Helper é um projeto open source que empacota via pacote composer um poderoso helper de utilidades para quem desenvolve software para regionalização do Brasil.
*
*/
class BrasilHelper
{
public static f... | true |
ca0e8d4bd15df891cb939fd4ca3355648939f1e7 | PHP | AxaliaN/Writer | /src/TS/Writer/AbstractWriter.php | UTF-8 | 1,336 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace TS\Writer;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use TS\Writer\Event\WriterEvent;
/**
* @package Writer
* @author Timo Schäfer
* @copyright 2014
* @version 1.2
*/
abstract class AbstractWriter implements WriterInterface
{
/**
* @var array
*/
pro... | true |
5be72d029c9c6c03fd20642efeb1d06788b6985f | PHP | 91ahmed/SecureSessionHandler | /SessionConfig.php | UTF-8 | 3,685 | 2.765625 | 3 | [] | no_license | <?php
namespace Sessions;
/**
* Session configuration
*
* @author Ahmed Hassan <91ahmed.github.io>
* @link https://github.com/91ahmed
*/
class SessionConfig
{
/**
* @var SessionName
*
* Set the current session name.
*/
protected $SessionName = 'sess';
/**
* @var SessionDomai... | true |
ad668a8c89618b30883d7236f884d479a81fbb92 | PHP | farhanmb02/pw2021_203040128 | /pertemuan 8/function.php | UTF-8 | 679 | 3.046875 | 3 | [] | no_license | <?php
// mengkoneksikan ke data base
$koneksidb = mysqli_connect("localhost","root","","phpdasar");
// meembuat function untuk di panggil
function query($query){
// membuat variabel $koneksidb menjadi global scope agarbisa di ambil didalam funtion
global $koneksidb;
// mengambil query/table/perintak ... | true |
4107830133b0506fddeb814f57f8ca3444708b8e | PHP | mito121/tinasklip | /handlers/add_image.php | UTF-8 | 1,853 | 2.703125 | 3 | [] | no_license | <?php
require_once '../includes/dbconnect.php';
require_once 'image_resizer.php';
if (!empty($_FILES)) {
// IMAGE UPLOAD
$valid_formats = array("jpg", "JPG", "JPEG", "PNG", "png", "gif", "bmp");
$target_dir = "../uploads/";
$target_dir_small = "../uploads/small/";
$filename = basename($_FILES["i... | true |
60d37e354c60b7cfd2596172b56236ab95ab2410 | PHP | amachado22/consulta-rebusta | /includes/admin/emails/class-wc-crm-email-agent-order.php | UTF-8 | 4,542 | 2.609375 | 3 | [] | no_license | <?php
/**
* Class WC_CRM_Email_Agent_Order file
*
* @package Woocommerce-customer-relationship\Emails
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'WC_CRM_Email_Agent_Order' ) ) :
/**
* New Order Email.
*
* An email sent to the agent when a new order is received/paid for.
*
* @clas... | true |
047f33303672ca1fbc7c733b3efaff49931efe03 | PHP | dannydeveloper21/GitProjects | /PHP_MVC/Views/User/index.php | UTF-8 | 137 | 2.625 | 3 | [] | no_license | <?php
foreach ($data['users'] as $row) {
echo '<b>Name:</b> '.$row->getName().
'<br/><b>e_Mail:</b> '.$row->geteMail()."<hr>";
} | true |
36c568518d9315dd3148bb65211e60f94bfc4b45 | PHP | mrinal975/MVC_OWN_Structure | /app/validation/DForm.php | UTF-8 | 868 | 3 | 3 | [] | no_license | <?php
/**
* Validating Input field
*/
class DForm
{
public $currentValue;
public $value=array();
public $error=array();
function __construct(){}
public function post($key){
//echo $this->currentValue=$key;
$this->value[$key]=trim($_POST[$key]);
$this->currentValue=$key;
return $this;
}
public func... | true |
dca816a7b802787a4fa4e2687449286d8a7c0754 | PHP | stringariSM/CalculosEstatistica | /calculos.php | UTF-8 | 3,712 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: gabri
* Date: 10/08/2017
* Time: 20:27
*/
if($_POST != NULL){
$lArrayResult = array();
$lNumero = $_POST['numeros'];
$lArrayNumeros = explode("-", $lNumero);
//Quantidade de Números
array_push($lArrayResult, array('title' => "Quantidade de Números", '... | true |
bf8ed446b168aa0db7f74b5a8ad3dafa8818051e | PHP | PayUMEA/payu-mea-sdk-php | /lib/PayU/Api/ItemList.php | UTF-8 | 3,512 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* PayU MEA PHP SDK
*
* @copyright Copyright (c) 2016 PayU
* @license http://opensource.org/licenses/LGPL-3.0 Open Software License (LGPL 3.0)
* @link http://www.payu.co.za
* @link http://help.payu.co.za/developers
* @author Kenneth Onah <kenneth@netcraft-devops.com>
*/
namespace ... | true |
3cef1b9e64e2dea7a0e0d3726630e8415e7be620 | PHP | LTD-Beget/rush | /src/HelpResolver.php | UTF-8 | 1,274 | 2.96875 | 3 | [] | no_license | <?php
namespace LTDBeget\Rush;
class HelpResolver
{
const DISABLE = false;
/**
* @var API
*/
protected $api;
/**
* @var string
*/
protected $show;
/**
* @var bool
*/
protected $shown = false;
/**
* @var bool
*/
protected $sub;
/**
... | true |
278940327a9e2ded221ca19daa43226f65548a39 | PHP | MrBad/QuadTree | /app/MRB/QuadTree/AABB.php | UTF-8 | 2,046 | 3.640625 | 4 | [] | no_license | <?php
namespace MRB\QuadTree;
class AABB
{
/**
* @var float x1
*/
private $minX;
/**
* @var float y1
*/
private $minY;
/**
* @var float x2
*/
private $maxX;
/**
* @var float y2
*/
private $maxY;
/**
* Creates a new AABB
* @param fl... | true |
53b298969e60774851726920d017a07866f808b6 | PHP | flevour/fb-hacker-cup-2012-round-0 | /FbHack/AbstractSolverCommand.php | UTF-8 | 1,233 | 2.953125 | 3 | [] | no_license | <?php
namespace FbHack;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
abstract class AbstractSolverCommand ext... | true |
929f18ff730af135ce1e3d79fbcbc679081f1898 | PHP | SAMCIDI/carwash | /app/Http/Controllers/estado_personaController.php | UTF-8 | 3,904 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\Createestado_personaRequest;
use App\Http\Requests\Updateestado_personaRequest;
use App\Repositories\estado_personaRepository;
use App\Http\Controllers\AppBaseController;
use Illuminate\Http\Request;
use Flash;
use Response;
class estado_personaController e... | true |
c24d4b2d48153ec78cb94ffe180453dd0436fe9f | PHP | NxSys/library.clients-brex | /src-gen/Payments/Model/Transfer.php | UTF-8 | 8,773 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
/*
* This file has been auto generated by Jane,
*
* Do no edit it directly.
*/
namespace NxSys\Library\Clients\Brex\API\Payments\Model;
class Transfer extends \ArrayObject
{
/**
* @var array
*/
protected $initialized = [];
public function isInitialized($prop... | true |
02a45a9dd85aea153f1973562b5086d5cc70d1d7 | PHP | kimsanghyeon-code/Study_PHP_2 | /6.15/private1.php | UTF-8 | 1,203 | 3.0625 | 3 | [] | no_license | <?php
// 실행하면 오류가 표시됩니다.
class Test{
public $str1 = '공개';
//퍼블릭은 공개할수있는 접근제한자
//외부에서 읽을수있는 속성
private $str2 = '비밀';
//프라이베이트는 비밀, 개인적인데이터
//해당이 됨
//외부에서 끌어다 쓸수없고
//오직 내부에서 클래스내부의 다른 메서드가
//프라이베이트 멤버속성을 부를 수는 있다
//public function print_hello(){
//p... | true |
ced3f5ca418a6ad404c35132427199bdd06270c4 | PHP | huyongde/php-coroutine | /iterator_coroutine.php | UTF-8 | 3,678 | 3.203125 | 3 | [] | no_license | <?php
$arr = array(
'name' => "huyongde",
'age' => 23,
"birthday" => "19890110",
);
var_dump(current($arr));
var_dump(key($arr));
var_dump(next($arr));
var_dump(current($arr));
var_dump(key($arr));
function xrange($start, $limit, $step = 1) {
for($i=$start;$i<=$limit;$i++){
yield $i;
}
}
v... | true |
2e32c2856543eafa189825863eb7cb65d999047e | PHP | eneteache/serie | /funciones/comprobarUsuario.php | UTF-8 | 475 | 2.546875 | 3 | [] | no_license | <?php
function comprobarUsuario () {
if (isset($_SESSION['estado'])) {
if (($_SESSION['tipoUsuario']) != 'Administrador') {
header("Location: ../index.php");
}
}
else {
$_SESSION['invitado'] = true;
}
}
function denegarInvitados () {
if ($_SESSION['invitado']){
header("Location: ../index.ph... | true |
9c3fb28f3795feaa0529e66a83b0cc1ba5134e13 | PHP | skullab/thunderhawk | /core/API/Tag/Table.php | UTF-8 | 641 | 2.859375 | 3 | [] | no_license | <?php
namespace Thunderhawk\API\Tag;
use Thunderhawk\API\Tag;
use Thunderhawk\API\Mvc\Model\Resultset;
class Table extends Tag{
/**
* Generate HTML Table by Model ResultSet
* @param Model $model
*/
static public function generate(Resultset $resultset){
$code = '<table>' ;
$code .= '<thea... | true |
dffa713055709b7fae1ef216628c1cc8c871eccb | PHP | cristiantorr/php7-mysql-udemy | /seccion03-operadores-php/10operador-nave-espacial.php | UTF-8 | 1,190 | 3.5 | 4 | [] | 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>operador nave espacial</title>
</head>
<body>
<div style="width:850px; margin: 0 auto;">
<h1>Oper... | true |
56a0342f38f16bed2d3bf735bd9a1e557a64591a | PHP | RamonFerreira/lojaVirualPHP | /app/business/UsuarioBusiness.php | UTF-8 | 406 | 2.71875 | 3 | [] | no_license |
<?php
class UsuarioBusiness{
public function isUsuarioByCPF($cpf){
$UsuarioDAO = new UsuarioDAO();
return $UsuarioDAO($cpf);
}
public function save($Usuario){
$UsuarioDAO = new UsuarioDAO();
/*foreach ( $UsuarioDAO->findById($UsuarioDAO->save($Usuario)) as $property => $value){
$usu->__set($property... | true |
663c8b573de6d6c91fafcb304c32171302b59f14 | PHP | hertar/weike | /advanced/frontend/models/WkWitkeyIndustry.php | UTF-8 | 1,608 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "wk_witkey_industry".
*
* @property integer $indus_id
* @property integer $indus_pid
* @property string $indus_name
* @property integer $is_recommend
* @property integer $indus_type
* @property integer $listorder
* @property intege... | true |
c321248e789eb31fe8636397134300d14dde29b9 | PHP | Omar104/SWProject | /kvector-website/includes/pagination.php | UTF-8 | 2,751 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | <?php
require_once ("db.php");
class pagination //class for controlling the viewing of the albums
{
public $no_pages;
public $current_page;
function __construct($albums = 0) // set current active page of album and set number of overall pages
{
$this->current_page = 1;
$this->no_pages... | true |
a065a72c6e54015953a861c37aadece02c71ea37 | PHP | pymba86/fiases | /library/Search/ConnectionInterface.php | UTF-8 | 1,750 | 3.0625 | 3 | [] | no_license | <?php
namespace Library\Search;
use Library\Mapper\SqlMapperInterface;
/**
* Интерфейс для обьекта, который реализует взаимодействие с поисковым движком
* @package Library\Search
*/
interface ConnectionInterface
{
/**
* Сохраняет новую строку в движке
* В случае если она там уже есть, перезаписывае... | true |
f7f9f3dee2eca4aac38008ae7691fae456273dc6 | PHP | freddjah/InternetApplications | /Seminar3/recipedotdev/app/Http/Controllers/RegistrationsController.php | UTF-8 | 851 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\User;
class RegistrationsController extends Controller
{
public function show()
{
return view('auth.register');
}
/**
* This method validates the given input, creates a new user and logs the user in, then it redirects the user to the home pa... | true |
7e49391bb8416be56ba13ce1d088188373075e26 | PHP | oliverwreath/Responsive-Web | /fourgrad/myTutorLib.php | UTF-8 | 1,145 | 3.390625 | 3 | [] | no_license | <?php
include('distancelib.php');
// constants
define('MAX_DISTANCE','10');
// Function to compare two arrays with respect to their scores
function cmpScore($a, $b)
{
if ($a['score'] == $b['score']) {
return 0;
}
return ($a['score'] < $b['score']) ? 1 : -1;
}
// Function to get a linearly distrib... | true |
c6b61cfe1d1cde67ec85d81dff6af91163148464 | PHP | alex-graf/churchtools-pdf | /pdfgen.php | UTF-8 | 1,737 | 2.71875 | 3 | [] | no_license | <?php
/*
Copyright (C) 2018 by Joachim Meyer
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, merge, publish... | true |
3def1c3643e5ed6ded6e92a33daa7cc68859b4a2 | PHP | LowkeyCoyote/codingame | /puzzles/php/number_of_letters_in_a_number_binary.php | UTF-8 | 766 | 3.4375 | 3 | [] | no_license | <?php
function func($r)
{
$array = array_map('intval', $split = str_split(base_convert($r, 10, 2), 1));
// $r -> tableau binaire //
$result = 0;
for($i = 0; $i < count($array); $i++)
{
if($array[$i] == 0)
{
$result += 4;
}
elseif($array[$i] == 1)
... | true |
64c6e37d581b0b15f3e2e368c80cfdee741cefec | PHP | marketingincolor/clientportal-dev | /wp-content/plugins/members/addons/members-block-permissions/src/Plugin.php | UTF-8 | 3,600 | 2.8125 | 3 | [
"GPL-2.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"GPL-2.0-or-later"
] | permissive | <?php
/**
* Primary plugin class.
*
* Launches the plugin components and acts as a simple container.
*
* @package MembersBlockPermissions
* @author Justin Tadlock <justintadlock@gmail.com>
* @copyright 2019, Justin Tadlock
* @link https://themehybrid.com/plugins/members-block-permissions
* @license ... | true |
76056c38fa6c0bafd5e5da9f97578787e6eebaad | PHP | overconda/montblanc | /step2.php | UTF-8 | 8,125 | 2.515625 | 3 | [] | no_license | <?php
if (!session_id()) {
session_start();
}
if(!isset($_SESSION['fbId'])){
header("Location: /montblanc/");
}
$fbId = $_SESSION['fbId'];
include("dbconnect.php");
include("phpqrcode/qrlib.php");
require_once('_image_engine.php');
$arrImageTemplates = array(
'img-templates/1.png',
'img-templates/2... | true |
2c431bf3717516e87d065e1503a100a27a8f8c81 | PHP | sedaym/agency | /app/Contracts/Cache/CacheManagerInterface.php | UTF-8 | 1,092 | 3.109375 | 3 | [] | no_license | <?php namespace Agency\Contracts\Cache;
/**
* @author Abed Halawi <abed.halawi@vinelab.com>
*/
use Closure;
interface CacheManagerInterface {
/**
* put something in the cache
*
* @param string $key
* @param Closure $closure
* @param int [$duration]
*
* @return mixed The resu... | true |
39cb25e82436e862af5c2589362b9c398e41ac60 | PHP | rabbit-php/rabbit-db | /src/BatchInsert.php | UTF-8 | 3,704 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Rabbit\DB;
use Rabbit\Base\Helper\StringHelper;
/**
* Class BatchInsert
* @package Rabbit\DB
*/
class BatchInsert implements BatchInterface
{
protected array $columnSchemas = [];
protected ?string $sql = '';
protected int $hasRows = 0;
protected Schema $s... | true |
6ae093619452f719cda8b2e4a39b8f8c4f910ceb | PHP | DavidCao626/server | /app/EofficeApp/Base/BaseRepository.php | UTF-8 | 9,918 | 2.671875 | 3 | [] | no_license | <?php
namespace App\EofficeApp\Base;
use Schema;
use Illuminate\Database\Eloquent\Model as Entity;
use \Illuminate\Http\Request;
use Cache;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
class BaseRepository
{
/**
* 数据表实体对象
*
* @var object
*/
public $entity;
protected $loginU... | true |
023a12971d9608e2ef920c638bb67fec9dcf827b | PHP | devprom-dev/sdk | /app/core/classes/model/mappers/ModelDataTypeMapping.php | UTF-8 | 301 | 2.71875 | 3 | [] | no_license | <?php
abstract class ModelDataTypeMapping
{
abstract public function applicable( $type_name );
abstract public function map( $value, array $groups = array() );
public function mapInstance( $attribute, $values, array $groups ) {
return $this->map($values[$attribute], $groups);
}
}
| true |
d55e615669f995267b5cf6126c159aebcd1f153c | PHP | ez19aaf/coreeraj | /src/Framework/Validator/Respondent/PostRespondentValidator.php | UTF-8 | 2,408 | 2.5625 | 3 | [] | no_license | <?php
namespace Survey54\Reap\Framework\Validator\Respondent;
use Psr\Http\Message\ServerRequestInterface;
use Respect\Validation\Validator as v;
use Survey54\Library\Domain\Values\Country;
use Survey54\Library\Domain\Values\Employment;
use Survey54\Library\Domain\Values\Gender;
use Survey54\Library\Domain\Values\Rac... | true |
e711273c2d38dbf8303c8792393403053a770751 | PHP | StagnantIce/piha-framework | /piha/modules/storage/classes/AStorage.php | UTF-8 | 328 | 2.65625 | 3 | [] | no_license | <?php
namespace piha\modules\storage\classes;
use piha\AClass;
abstract class AStorage extends AClass {
abstract public function set($name, $value);
abstract public function get($name);
abstract public function del($name);
abstract public function isExist($name);
abstract public function pop($name, $default = n... | true |
46a4d8196f2cbc97890307cd06176bcac97296de | PHP | dan-poveda/prueba | /Ejercicio7.php | UTF-8 | 507 | 3.328125 | 3 | [] | no_license | <!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<title>EJERCICIO 7</title>
</head>
<body>
<form action="#" method="post">
<h1>EJERCICIO 7</h1>
<br>
<input type="text" name="number">
<button type="submit">ENVIAR</button>
</form>
<section>
<?php
if (isset($_POST['number'])!=""){
$number = $_POST[... | true |
34e03282918fea2ee6473cc7d22c57ca535b3b9f | PHP | Netpeople2005/CommtoolBundle | /Builder/Builder.php | UTF-8 | 2,586 | 2.796875 | 3 | [] | no_license | <?php
namespace Optime\Bundle\CommtoolBundle\Builder;
use Optime\Bundle\CommtoolBundle\ControlFactory;
use Optime\Bundle\CommtoolBundle\Builder\BuilderInterface;
use Optime\Bundle\CommtoolBundle\Control\ControlInterface;
use Optime\Commtool\TemplateBundle\Model\SectionConfigInterface;
class Builder implements Builde... | true |
80dec4025ca1d0cc8f81e93e1851ae27b7584883 | PHP | hodayanir/sadna | /Schedule/create-user.php | UTF-8 | 1,226 | 3 | 3 | [] | no_license | <?php
//Check if admin:
session_start();
if(!(isset($_SESSION['admin']))){
header('Location: index.php');
}
//Connect to the database:
$conn_server = $_SESSION['CONNECTION_SERVER'];
$conn_user = $_SESSION['CONNECTION_USER'];
$conn_password = $_SESSION['CONNECTION_PASSWORD'];
... | true |
5ac09ac1692440f32ea8321eb0df8692743e6d28 | PHP | shadyhill/phapip | /src/db/pdo.php | UTF-8 | 5,330 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
//the goal is to cache everything, especially the describe and information_schema
//and then queries should utilize as much joining as possible
//by possibly saving query until as much possible is known
class DB{
protected $_pdo;
public function __construct($connection = array()){
$this->_server = $conne... | true |
0c85b71a85cd4f95c5ac48994e8fea0490bc48c4 | PHP | kaytonfroeschl/lab10 | /ViewUserPosts.php | UTF-8 | 468 | 2.734375 | 3 | [] | no_license | <?php
$mysqli = new mysqli("mysql.eecs.ku.edu", "kaytonfroeschl", "aiX3uish", "kaytonfroeschl");
/* check connection */
if ($mysqli->connect_errno)
{
printf("Connect failed: %s\n", $mysqli->connect_error);
exit();
}
$user = $_POST["user"];
$query = "SELECT * FROM Posts";
if($result = mysqli_query($m... | true |
cd9e6ea426310370a66cd459321ad20d88e0f6f5 | PHP | carlos-paezf/Snippets_MassCode | /php/isLowerCase.php | UTF-8 | 229 | 3.734375 | 4 | [] | no_license | Returns true if the given string is lower case, false otherwise.
<?php
function isLowerCase($string)
{
return $string === strtolower($string);
}
isLowerCase('Morning shows the day!'); // false
isLowerCase('hello'); // true
?> | true |
99c7e49f2471d3da9c9a7672349fe9a6c028968a | PHP | HansPeterOrding/sleeper-api-client | /src/Dto/SleeperDraftPickMetadata.php | UTF-8 | 3,408 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace HansPeterOrding\SleeperApiClient\Dto;
use DateTime;
class SleeperDraftPickMetadata
{
private ?string $yearsExp = null;
private ?string $team = null;
private ?string $status = null;
private ?string $sport = null;
private ?string $position = null;
... | true |
babf89705e7cde8ba836d4254965c81652a54ef0 | PHP | corgisout/oophp | /src/route/login.php | UTF-8 | 1,050 | 2.609375 | 3 | [] | no_license | <?php
namespace sihd\login;
/**
* Show all movies.
*/
$app->router->get("login/login", function () use ($app) {
session_start();
$data = [
"title" => " login | oophp",
];
$app->view->add("login/index", $data);
$app->page->render($data);
});
$app->router->post("login/login", function (... | true |
2a82d39fdd8d3c22464e58fa501c4e0a24c67ecb | PHP | linocrie/modified_registration_form | /forecast.php | UTF-8 | 2,149 | 2.890625 | 3 | [] | no_license | <?php
require_once 'config.php';
date_default_timezone_set("Asia/Yerevan");
function get_weather_fromapi()
{
$time_init = curl_init();
curl_setopt($time_init, CURLOPT_URL, "http://api.openweathermap.org/data/2.5/weather?q=yerevan&APPID=5099c5feb579c7a17b030de0d009282f&units=metric");
curl_setopt($time_ini... | true |
14b3d62fa7cc49c7303583daf80ecebf34bc9e00 | PHP | dd121011/farm | /travel_server/src/dao/LineDao.class.php | UTF-8 | 627 | 2.78125 | 3 | [] | no_license | <?php
class LineDao{
var $itineraryId;//线路id
var $stepNum;//步骤编号
var $destinationId;//本步骤终端id
var $destinationName;
var $characteristic;
var $content;//推荐理由,特色,内容等信息
var $pics ;
function __construct($itineraryId, $stepNum,$destinationId, $destinationName,$characteristic,$content,$pics) {
$t... | true |
8001c2919813fded7aca95e168324221873b7ed5 | PHP | Githubxinwei/saas | /common/models/relations/AdminRelations.php | UTF-8 | 1,082 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\relations;
use common\models\Employee;
use common\models\base\Role;
use backend\rbac\models\AuthRoleChildModel;
trait AdminRelations
{
/**
* 后台角色管理 - 管理员表查询 - 关联角色表
* @author Huang hua <huanghua@itsports.club>
* @create 2017/7/6
* @return \yii\db\Acti... | true |
2debf9a79e86def5f2371d23c12b5a97b574632b | PHP | izniburak/nur-core | /src/Database/Seeder.php | UTF-8 | 1,845 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Nur\Database;
use Illuminate\Database\Seeder as DatabaseSeeder;
use Illuminate\Support\Arr;
use Nur\Console\Command;
use Nur\Kernel\Application;
use Symfony\Component\Console\Output\ConsoleOutput;
abstract class Seeder extends DatabaseSeeder
{
/**
* @var \Nur\Kernel\Application
*/
p... | true |
b13d824cf2a7494f778da44c566586b44b11570a | PHP | ValRCS/PHP_Playground_11 | /public/deleteSong.php | UTF-8 | 847 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
//TODO check if user is allowed to delete!!
require_once '../src/db.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// echo "We got a POST request!<br>";
// foreach ($_POST as $key => $value) {
// echo "<div class='info-text'>We received name $key with value $value </div>";
... | true |
75fe2de70dc983e324a2262b2b76e83ac114896f | PHP | RoderickRuotolo/CotacaoBTC | /examples/install.php | UTF-8 | 1,536 | 2.8125 | 3 | [] | no_license | <?php
require_once ('../vendor/autoload.php');
use Cotacao\SQLite\SQLiteConnection as SQLiteConnection;
use Cotacao\SQLite\SQLiteCreateTable as SQLiteCreateTable;
use Cotacao\SQLite\SQLiteInsert as SQLiteInsert;
use Cotacao\SQLite\SQLiteQuery as SQLiteQuery;
use Cotacao\CLI\CLIRender as CLIRender;
use Cotacao\Curre... | true |
d6e3eca6ad8c84d0efdd59fb4b1c3f057c24f1b9 | PHP | lucashernan10/ProgramacionSab18 | /practicaphp/lista-usuarios.php | UTF-8 | 1,340 | 2.875 | 3 | [] | no_license | <?php
session_start();
//variable de session creada en el archivo sesiones.php
echo $_SESSION['nombre'];
echo "<br> <a href='salir.php'>salir</a>";
//require 'funciones.php';
//saludar("Juan");
require '../conexion/conexion.php';
$sql = "SELECT * from usuarios";
$query = $connection->prepare($sql);
... | true |
30ab987f03a8db302403fc2326fd564f18fb8503 | PHP | nunomaduro/phpcollections | /tests/Unit/DataHolderTest.php | UTF-8 | 714 | 2.78125 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use PHPCollections\DataHolder;
use PHPUnit\Framework\TestCase;
class DataHolderTest extends TestCase
{
private $dataHolder;
public function setUp()
{
$this->dataHolder = new DataHolder([
'name' => 'Max',
'age' => '24',
]);
}
/... | true |
9897c835d4058c686a298e3aa9a2cf04f1b2c498 | PHP | mvccore/mvccore | /src/MvcCore/Route/InternalInits.php | UTF-8 | 24,671 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* MvcCore
*
* This source file is subject to the BSD 3 License
* For the full copyright and license information, please view
* the LICENSE.md file that are distributed with this source code.
*
* @copyright Copyright (c) 2016 Tom Flidr (https://github.com/mvccore)
* @license https://mvccore.github.io... | true |
c887249eb9bb72a9fcc7e21a89619d1bb37e3cbb | PHP | telmoricardo/cial_ecommerce | /app/autoload.php | UTF-8 | 1,524 | 2.6875 | 3 | [] | no_license | <?php
// CONFIGRAÇÕES DO BANCO ####################
define('HOST', 'localhost');
define('USER', 'root');
define('PASS', '');
define('DBSA', 'loja');
//------------------------AUTOLOAD PARA NÃO INSTANCIAR O REQUIRE EM ALGUMAS PAGINAS------------------------ //
function __autoload($Class) {
$cDir = ['DAL', 'Model',... | true |
fe431532bb476e2341f954df8946b5d30bccab90 | PHP | irhamdz/Sistem-Aspirasi-UIN-SUKA | /application/modules/praregistrasi/views/v_ajax_pendidikan.php | UTF-8 | 481 | 2.65625 | 3 | [] | no_license | <?php
if(count($hasil)>0){
echo "<select name='KD_SEKOLAH_ASAl' style='width:300px'>";
}
$selected='';
foreach($hasil as $key => $val){
$KD_SEKOLAH=$val['KD_SEKOLAH'];
$NM_SEKOLAH=$val['NM_SEKOLAH'];
if($KD_SEKOLAH_ASAL){
if($KD_SEKOLAH_ASAL==$KD_SEKOLAH){
$selected="selected";
}else{
$selected='';
}
}... | true |
2fdb82d496506b6f85583847eeaa3e41c8041902 | PHP | yonkon/diplom | /Components/Entity/Napravl.php | UTF-8 | 861 | 2.6875 | 3 | [] | no_license | <?php
namespace Components\Entity;
use Components\Classes\EntityRepository;
use Components\Classes\Napravls;
class Napravl extends EntityRepository {
const TABLE = TABLE_NAPRAVL;
public static function update($napravl_id, array $data) {
if (empty($napravl_id) || empty($data) || !is_array($data) || empty($da... | true |
d9d0a26b23159daa10368f420cf9c3dc26aa94f1 | PHP | cdt12988/cms | /private/functions.php | UTF-8 | 756 | 2.8125 | 3 | [] | no_license | <?php
// Adds the path/URL to the 'public' directory to whatever directory path is passed into the argument
// This allows us to use absolute paths, which is essential for all of our includes/requires to function properly no matter where they are included.
function url_for($script_path) {
// adds the leading '/... | true |
2e05435ba7e96a9e6f6d7fa9854d6553cedca519 | PHP | jborges1289/Videnn | /Servicios/ServicioProductoAdmin.php | UTF-8 | 3,114 | 2.578125 | 3 | [] | no_license | <?php
include_once '../BD/ProductoDAOAdmin.php';
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of ServicioProducto
*
* @author juAN
*/
class ServicioProductoAdmin {
//put your code here
public function actualizarProducto... | true |
27fb759dda79fb7583597ad9a2b11ad0329a4a71 | PHP | nickJones67/goofyFoot | /db_classes/log.php | UTF-8 | 299 | 2.78125 | 3 | [] | no_license | <?php
/*
This class corresponds to the table 'log' in the database
*/
class Log extends Database_Object
{
public static $table_name = "log";
protected static $db_fields = array("log_wk", "user_wk", "url", "ip");
public $log_wk;
public $user_wk;
public $url;
public $ip;
}
?> | true |
9d95572b2f7da80a6ac54563fcabb912c38b5f57 | PHP | b4oshany/scpls | /main.ini.php | UTF-8 | 13,288 | 2.640625 | 3 | [] | no_license | <?php
# define package usage
use libs\vecni\Response;
use libs\vecni\Request;
use libs\vecni\Vecni;
use libs\user\User;
use libs\mysql\PDOConnector;
$vecni = new Vecni();
User::start_session();
$twig = Vecni::twig_loader();
Response::init();
# added global variables to twig
$twig->addGlobal("config", $vecni->get_con... | true |
25d15e709d87dab4738bb0c67c76777eaa8290a4 | PHP | bravo3/bakery | /src/Bravo3/Bakery/Operation/CodeCheckoutOperation.php | UTF-8 | 3,559 | 2.75 | 3 | [] | no_license | <?php
namespace Bravo3\Bakery\Operation;
use Bravo3\Bakery\Entity\Repository;
use Bravo3\Bakery\Enum\Phase;
use Bravo3\Bakery\Enum\RepositoryType;
use Bravo3\Bakery\Exception\UnexpectedValueException;
use Bravo3\Bakery\Operation\Traits\RootableTrait;
use Bravo3\Bakery\Service\Cloner\GitCloner;
use Bravo3\Bakery\Servic... | true |
934da1c4158437c6b872f9aca68b6b61b45b5bf1 | PHP | uniwue-rz/LoginShibboleth | /tests/Unit/LdapAdapterTest.php | UTF-8 | 3,025 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Part of Piwik Shibboleth Login Plug-in. (Test).
*/
namespace Piwik\Plugins\LoginShibboleth\tests;
use Piwik\Plugins\LoginShibboleth\LdapAdapter;
/**
* Test cases for LdapAdapter class.
*
* Here the test cases for LdapAdpater class can be written. Make sure that the the plug-in is
* configured app... | true |
cef95f616e9833d2ee3e2287c65395c87c3ad101 | PHP | MirzaOglecevac/brales | /src/Brales/Models/Mappers/Video/VideoCommentsMapper.php | UTF-8 | 2,879 | 2.578125 | 3 | [] | no_license | <?php
namespace Brales\Models\Mappers\Video;
use Brales\Core\Component\DataMapper;
use Brales\Models\Entities\Comments;
use Brales\Models\Entities\Shared;
use Brales\Models\Entities\Video\Video;
class VideoCommentsMapper extends DataMapper
{
public function getVideoComments(Shared $shared, Comments $videoComme... | true |
8ad54ce3ca369df968b8b9c4e735ddcefc8f25b6 | PHP | mdzahidulislam314/Laravel-inventory-system | /app/Http/Controllers/CartController.php | UTF-8 | 2,910 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Customer;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Gloudemans\Shoppingcart\Facades\Cart;
class CartController extends Controller
{
public function index(Request $request)
{
$data = array();
$data['id'] = $request->id;
... | true |
18366cc42e1aee49cb40c164cd8179c985c874c8 | PHP | hebi26/php-sql-crud2 | /php/conection.php | UTF-8 | 488 | 2.765625 | 3 | [] | no_license | <?php
//-------------------- Connexion a la base de donnée-----------------//
try{
$pdo = new PDO('mysql:host=localhost;dbname=colyseum','root','coda', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
$pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_WARNING);
$pdo->setAttri... | true |
e3a3cb6ba192999f42051b70e209134b8acb8bbb | PHP | cleaniquecoders/laravel-helper | /src/Support/helpers.php | UTF-8 | 2,971 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Str;
/*
* generate sequence
* @return sequence based on length supplied
*/
if (! function_exists('generate_sequence')) {
function generate_sequence($input = 1)
{
return str_pad($input, config('helper.sequence_length'), '0', STR_PAD_LEFT);
}
}
/*
* Get Abbreviation... | true |
2af2f72c06cd42bd4a1031e1bde9437703924975 | PHP | cryptobuks/LaravelEchargeService | /src/Models/Request/EchargeBaseRequest.php | UTF-8 | 1,444 | 2.75 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: alive
* Date: 10/4/18
* Time: 1:35 PM
*/
namespace Alive2212\LaravelEchargeService\Models\Request;
use Alive2212\LaravelEchargeService\EchargeObject;
use Alive2212\LaravelEchargeService\Models\SoapObjectModel;
abstract class EchargeBaseRequest extends SoapObjectModel
{
... | true |
37fd29019f7d71020f1af09c7b9c7529022de864 | PHP | AMoraHE/WebSistemas | /app/Http/Controllers/CuerposAcademicosController.php | UTF-8 | 5,908 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\CuerposAcademico;
use Validator;
class CuerposAcademicosController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
/**
* Display a listing of the resource.
*
* @return... | true |
1c23cca804752bbcdfd471f0e06ccc32183b81b2 | PHP | hermamat/fitak | /vendor/nextras/orm/src/Repository/PersistanceHelper.php | UTF-8 | 1,785 | 2.671875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
/**
* This file is part of the Nextras\Orm library.
* This file was inspired by PetrP's ORM library https://github.com/PetrP/Orm/.
* @license MIT
* @link https://github.com/nextras/orm
*/
namespace Nextras\Orm\Repository;
use Nextras\Orm\Entity\IEntity;
use Nextras\Orm\Entity\Reflection\PropertyR... | true |
2c4e6894ed15b767920253f41065a458132336d2 | PHP | uk-gov-mirror/dvsa.olcs-route-utils | /src/ChildRouteGenerator.php | UTF-8 | 1,793 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Dvsa\Olcs\RouteUtils;
/**
* Class ChildRouteGenerator
*
* @package Dvsa\Olcs\RouteUtils
*/
class ChildRouteGenerator
{
private $routes;
private $directory;
/**
* ChildRoutesGenerator constructor.
*/
public function __construct(array $routes, string $directory)
{
... | true |
2f905b2aab01518b9d88052229b8ba51eab47462 | PHP | Esperozzz/tasks_for_beginner | /lesson2/task4.php | UTF-8 | 83 | 2.734375 | 3 | [] | no_license | <?php
include_once '../header.php';
$a = 10;
$b = 2;
$c = 5;
echo $a + $b + $c;
| true |
92cb8c37d84b96a7894bf9044f1dbc61da9464f0 | PHP | NicoM88/Simplon | /php/boucles/exercice9.php | UTF-8 | 2,135 | 3.296875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>dessiner</title>
<link rel="stylesheet" href="exercice9.css">
</head>
<body>
<?php
/*
* Creer un script permettant de creer plusieurs rectangles de tailles differentes
* et placer y des ronds a l'interieur de couleur di... | true |
4640b368bbf14d2fb46c165021559f32260bcec8 | PHP | ffaktorr/First-PHP-project | /PROJECT/class/usernamePassword.php | UTF-8 | 740 | 3.09375 | 3 | [] | no_license | <?php
class usernamePassword
{
private $username;
private $password;
public function __construct($username,$password)
{
$this->username=$username;
$this->password=$password;
}
public function __get($name)
{
return isset($this->$name) ? $this->$name : "";
... | true |