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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ef081d5b984a779ebab2264703671361cb8da797 | PHP | gpetzall/atiwd | /crimes/error.php | UTF-8 | 3,326 | 2.515625 | 3 | [] | no_license | <?php
/*
* File: "~g2-petzall/atwd/crimes/error.php"
*
* Author: Gunnar Petzall (UWE no: 10005826) (gpetzall@gmail.com)
* Created: 2014-01-17
* Modified: 2014-02-27
*
* Script made for the Advanced Topics in Web Development (UFCEWT-20-3) at the
* University of the West of England in the years 2013-2014. This... | true |
a3d1e7fa4bbcdf6de4f8d8e943b1f977555fa997 | PHP | Letractively/kumbia-enterprise | /Library/Kumbia/Generator/GeneratorReport/Format/Pdf.php | UTF-8 | 5,775 | 2.625 | 3 | [] | no_license | <?php
/**
* Kumbia Enterprise Framework
*
* LICENSE
*
* This source file is subject to the New BSD License that is bundled
* with this package in the file docs/LICENSE.txt.
*
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to lic... | true |
e3231648a78804a361013e703a23d65e7ea12200 | PHP | md-aamroni/PHP-8 | /Basic/hello.php | UTF-8 | 1,411 | 4 | 4 | [] | no_license | <?php
/**
* Definition and Usage:
* There are two basic ways to get output: echo and print.
*
*
* Statements:
* 1. The echo statement can be used with or without parentheses: echo or echo()
* 2. The print statement can be used with or without parentheses: print or print()
* 3. The printf() function... | true |
8340914bf38a174cc1db386376c68767f30fbd88 | PHP | Mahmoud-kamal12/Heroku-Ecommerce | /controllers/PayPal/success.php | UTF-8 | 3,419 | 2.515625 | 3 | [] | no_license | <?php
require_once 'config.php';
// Once the transaction has been approved, we need to complete it.
if (array_key_exists('paymentId', $_GET) && array_key_exists('PayerID', $_GET)) {
$transaction = $gateway->completePurchase(array(
'payer_id' => $_GET['PayerID'],
'transactionReference' =... | true |
3bcfa5a9d3bb1fefc8dd4fa79bd6369a5f6294cf | PHP | insinfo/ciente | /BackEnd/Model/DAL/EquipamentoModeloDAL.php | UTF-8 | 1,727 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: neto
* Date: 12/03/2018
* Time: 13:36
*/
namespace Ciente\Model\DAL;
use Ciente\Util\DBLayer;
use Exception;
use Ciente\Model\VO\EquipamentoModelo;
class EquipamentoModeloDAL
{
function __construct()
{
}
public function selectAll($limit=10,$offset=0,$to... | true |
fc6f25c11decb4ae79d2ef511fb975a00a51f584 | PHP | tonitone/devel-api | /DevelApi/DevelApiRegister.php | UTF-8 | 1,171 | 2.53125 | 3 | [] | no_license | <?php
/**
* Register Api
*
* @category Yii
* @package DevelApi
*
* @author Toni Ivanisevic <030toni@googlemail.com>
* @copyright Copyright (c) 2012 Toni Ivanisevic <030toni@googlemail.com>
*/
class DevelApiRegister extends DevelApi
{
public function init($setRequestOptions = array())
... | true |
1d05c2412e28f26608bf5c03049bc0a242127116 | PHP | akipta/raspberry-webradio | /mobile_page/artist_image.php | UTF-8 | 1,018 | 2.640625 | 3 | [] | no_license | <?php
include("settings.inc.php");
$song = file_get_contents($songfile_path);
$parts = explode(" - ", $song);
$name = trim($parts[0]);
$current_name = trim(file_get_contents("current_artist.txt"));
// we already have the image
if($current_name == $name) {
$img = file_get_contents("current_artist_img.txt");
} else {... | true |
256efba7ed8621c9885480ee6ac733ab2a751cc6 | PHP | sirus21/frontEnd5.0 | /app/Controller/CampsController.php | UTF-8 | 2,114 | 2.78125 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
/**
* Camps Controller
*
* @property Camp $Camp
*/
class CampsController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->Camp->recursive = 0;
$this->set('camps', $this->paginate());
}
/**
* view method
*
... | true |
cd49060b28f54ac315b75f38d5395404b4119148 | PHP | gallu/CareerCollege | /GameServer/2022/EarlyPeriod(34)/op2.php | UTF-8 | 489 | 2.875 | 3 | [] | no_license | <?php // op2.php
// 論理演算子
echo " true || true : "; // or
var_dump( true || true );
echo "<br>";
echo " true || false : ";
var_dump( true || false );
echo "<br>";
echo " false || false : ";
var_dump( false || false );
echo "<br>";
//
echo " true && true : "; // and
var_dump( true && true );
e... | true |
57fc6727d7b9552daba81bba3c7e108236f887c8 | PHP | mcrumm/arrgh | /spec/ArrySpec.php | UTF-8 | 1,736 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Arrgh;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
describe(Arry::class, function () {
it('is a Doctrine\Collection', function () {
expect(new Arry())->toBeAnInstanceOf(Collection::class);
});
context('->filter()', function () {
... | true |
d43ff4b4c1d911a3c27085cc8abc73570970993e | PHP | Demento174/eco-chel | /wp-content/plugins/usedCars/Controller/TypeManipulations/TypeManipulations.php | UTF-8 | 830 | 3.0625 | 3 | [] | no_license | <?php
namespace TypeManipulations;
class TypeManipulations
{
public $class;
public $bool='\TypeManipulations\Boolean';
public $integer='\TypeManipulations\Integer';
public $string='\TypeManipulations\Str';
public $arr='\TypeManipulations\Arr';
public $result;
public function __const... | true |
80a9bbb8e6410b86b139ef470be8b1456f9868fc | PHP | trevorassaf/warehouse | /src/php/util/Enum.php | UTF-8 | 715 | 3.328125 | 3 | [] | no_license | <?php
class InvalidEnumType extends Exception {
private
$enumType,
$enumValue;
public function __construct($enum_type, $enum_value) {
$this->enumType = $enum_type;
$this->enumValue = $enum_value;
}
public function __toString() {
return "ERROR: enum value '{$this->enum_value}' is invalid... | true |
249f6e68d253eb833b4c5e9ccf34eff92d5b68c8 | PHP | JEduardoLM/DemoGymBack | /da/Serie.php | UTF-8 | 5,368 | 2.765625 | 3 | [] | no_license | <?php
// JELM
// 15/03/2016
// Se define la clase serie
//
require_once('conexion.php'); //Se requiere el archivo conexión.php, para conectarse a la base de datos
class Serie{
function obtenerSerieByID($idSerie)
{
//Creamos la conexión con la función anterior
$conexion = obtenerConex... | true |
f436926ad9eaedacdac72c5895074a8e5c6bfcd8 | PHP | oliwierptak/Everon1 | /src/Everon/Helper/String/EndsWith.php | UTF-8 | 565 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Everon framework.
*
* (c) Oliwier Ptak <oliwierptak@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Everon\Helper\String;
trait EndsWith
{
/**
* @param $string
... | true |
81a6ceabe2cb5810b098b4dc31ae460c23ca4dee | PHP | plezzz/SoftUni-Technology-Fundamentals-with-PHP | /Technology Fundamentals Final Exam - 14 April 2019 Group II/TheIsleOfManTTRace.php | UTF-8 | 778 | 2.953125 | 3 | [] | no_license | <?php
$pattern = '/([#$%*&])(?<name>[a-zA-Z]+)(\1)[=]{1}(?<length>[\d]+)!!(?<geocode>.+)/m';
while (true) {
$input = readline();
if (preg_match($pattern, $input)) {
preg_match_all($pattern, $input, $matches, PREG_SET_ORDER, 0);
$name = $matches[0]["name"];
$length = $matches[0]["lengt... | true |
c1b70997a7057cbdc2331498546add315a2ee8d0 | PHP | lazuardifirdaus/teknik-optimasi | /uts/soal1/algen_knapsack.php | UTF-8 | 11,698 | 3.234375 | 3 | [] | no_license | <?php
class Parameters
{
const FILE_NAME = 'products.txt';
const COLUMNS = ['item', 'price'];
const POPULATION_SIZE = 5;
const BUDGET = 5000;
const STOPPING_VALUE = 10000;
const CROSSOVER_RATE = 0.8;
}
class Catalogue
{
function createProductColumn($listOfRawProduct)
{
foreach... | true |
b03af4ca616f444f1b7c1dbd260eaa30850de97b | PHP | rzlwbo1/CRUD-Wisata | /update-wisata.php | UTF-8 | 1,922 | 2.734375 | 3 | [] | no_license |
<?php
include ("config.php");
// kalo tidak ada id di query string
if(!isset($_GET['id'])) {
header('Location:index.php');
}
// ambil id dari query string
$id = $_GET['id'];
// buat query untuk ambil data dari DB
$sql = "SELECT * FROM wisata WHERE id=$id";
$query = mysq... | true |
de70e247612e8854ae0c006eadcb058950495d0b | PHP | Viper-7/Snippets | /Diff/diff.php | UTF-8 | 1,220 | 2.5625 | 3 | [] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>DaisyDiff-php</title>
<link rel="stylesheet" href="diff.css" type="text/css" media="screen"/>
</head>
<body>
<?php
include 'diffclass.php';
if(!empty($_REQUEST['from']) && !empty($_R... | true |
68c6b760769af9c8c93f2d1fff924e8ae25f9d83 | PHP | Loleilo/Leilo-API | /backend/leilodb.php | UTF-8 | 11,448 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Sunny
* Date: 2017-04-26
* Time: 6:48 PM
* Provides bottom level operations to database. All database calls should go through this class. Provides null checks, error checks, type checks, and SQL sanitization.
* NOTES: CODE DOES NOT SANITIZE ANYTHING AS OF NOW
*/
namespac... | true |
3a0d5e5c830ade325d58ec115de6c91db952c2a7 | PHP | rohillion/melivery | /app/App/Service/Form/Subcategory/SubcategoryForm.php | UTF-8 | 1,854 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Service\Form\Subcategory;
use App\Service\Validation\ValidableInterface;
use App\Repository\Subcategory\SubcategoryInterface;
use App\Service\Form\AbstractForm;
class SubcategoryForm extends AbstractForm{
/**
* Subcategory repository
*
* @var \App\Repository\Subcategory\Subcat... | true |
a06cad04910964f573d3902fb3c2d202efd72ccc | PHP | TinTanNTXinh/HoangNguyen_Ng2 | /database/seeds/GroupRolesTableSeeder.php | UTF-8 | 774 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class GroupRolesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$array_code = [
'MD',
'DLBD',
'GD',
'BC'
];
$arr... | true |
d72dddf257893f514da2b1826e4d597c7d8a84f7 | PHP | kislota/sks | /controllers/UserController.php | UTF-8 | 4,710 | 2.640625 | 3 | [] | no_license | <?php
class UserController extends Controller{
public $header = 'Пользователь';
public $top_menu = 'user';
public function actionIndex() {
$user = User::getUserCheckAccess();
require_once(ROOT . '/views/user/edit.php');
return true;
}
public function actionEdit() {
... | true |
dcf5da37b464b5d6311b516bbab948ea3ca1fb8d | PHP | floinay/laravel-jwt | /src/Contracts/JwtSubject.php | UTF-8 | 327 | 2.765625 | 3 | [] | no_license | <?php
namespace LaravelJwt\Http\Contracts;
interface JwtSubject
{
/**
* What data to save in the token data.
* @return array
*/
public function getJwtPayload(): array;
/**
* By default do return $this->getKey();
* @return string
*/
public function getJwtIdentifier(): str... | true |
68a4e89283fc5acd8a5d188bce256dd02a3bebf6 | PHP | Shardj/zf1-future | /library/Zend/Captcha/Word.php | UTF-8 | 9,780 | 2.78125 | 3 | [
"JSON",
"LicenseRef-scancode-generic-cla"
] | permissive | <?php
/**
* Zend Framework
*
* 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 this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license an... | true |
cc0db7788dcd1599509ae2aa13c886759d688fdd | PHP | Oberberg-Medien/Gaumenschmaus | /captcha.php | UTF-8 | 742 | 2.59375 | 3 | [] | no_license | <?php
session_start();
$num1=rand(1,9); //Generate First number between 1 and 9
$num2=rand(1,9); //Generate Second number between 1 and 9
$captcha_total=$num1+$num2;
$math = "$num1"." + "."$num2"."=";
$_SESSION['rand_code'] = $captcha_total;
$dir = 'fonts/';
$image = imagecreatetruecolor(75, 22); //Ch... | true |
c0a8cb50d42ebdd7da2606a8d3c2a941d57922eb | PHP | navelpluisje/npCMS | /configs/clMySmarty.php | UTF-8 | 961 | 2.6875 | 3 | [] | no_license | <?php
global $_DIR;
include_once( $_DIR['smarty'] . '/Smarty.class.php');
class SmartyTemplate
{
var $smarty;
var $tpl_name = '';
function __construct()
{
global $_DIR;
$this->smarty = new Smarty;
$this->smarty->template_dir = $_DIR['templates'];
$this->smarty->compile_dir = $_DIR['templates_c'];
$this... | true |
dd8512d1503180f286f534221ffd4383f71d98ab | PHP | PabloCasvar/phpRestAPI | /objects/User.php | UTF-8 | 728 | 3.125 | 3 | [] | no_license | <?php
class User{
private $conn;
private $table_name = "users";
//properties
public $username;
private $password;
public fuNction __construct($db){
$this->conn = $db;
}
function readAll(){
$query = "SELECT username FROM "
.$this->table_name;
... | true |
265b072c1d0276e52c969284dc5fc3aceeef974e | PHP | hainuo/phptaobaokev3 | /app/Services/WX/WebJumpService.php | UTF-8 | 867 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Services\WX;
use App\Repositories\Contracts\AlimamaRepositoryInterface;
use App\Services\Share\CheckSourceClient;
use App\Services\Share\TpwdService;
class WebJumpService
{
const TQG_URL_PREFIX = 'https://s.click.taobao.com/t'; // 淘抢购网址的前缀
public $client;
public $tpwd;
public function __... | true |
d3efd71e59bae10cf707e960901dd081b58557ce | PHP | cesarebernardis/samarete | /docker/samarete/app/Models/Evento.php | UTF-8 | 1,823 | 2.515625 | 3 | [] | no_license | <?php
namespace Samarete\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Spatie\Activitylog\Traits\LogsActivity;
/**
* @property int $id
* @property string $nome
* @property string $oggetto
* @property string $descrizione
* @property string $data_inizio
* @property stri... | true |
bf6472a2e75eac367e28bc407b6e02c5de783454 | PHP | vincentpeligro/web-midterm | /app/Models/Album.php | UTF-8 | 1,181 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
/**
* Class Album
* @package App\Models
* @version October 25, 2021, 5:45 am UTC
*
* @property string $song
* @property string $singer
* @property string $dat... | true |
255a785206f433a7b08283307b1d267ce8034df1 | PHP | pflorek/php-elevator | /src/functions.php | UTF-8 | 814 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
namespace PFlorek\Elevator;
/**
* Elevates an one-dimensional or any \Traversable to a multi-dimensional array.
*
* @param array|\Traversable $flattened
* @param string $delimiter
* @return array
*/
function array_elevate($flattened, $delimiter = '.')
{
$factory = ElevatorFactory::getInst... | true |
fd78b4dfba3a506cbda99cd481c33bddd496eda7 | PHP | LeVanTan-58131382/design_pattern_LP | /php_designpattern/20-observer/example.php | UTF-8 | 2,243 | 3.625 | 4 | [] | no_license | <?php
//use ObserverPartern\BinaryObserver;
//use ObserverPartern\HexObserver;
//use ObserverPartern\OctalObserver;
//use ObserverPartern\Subject;
//
//require_once("class/Subject.php");
//require_once("class/HexObserver.php");
//require_once("class/OctalObserver.php");
//require_once("class/BinaryObserver.php");
... | true |
ee79e3a81f7a7ac162e4acd34175bda913b12280 | PHP | leankoala-gmbh/LeanApiBundle | /src/Command/CreateClientCommand.php | UTF-8 | 2,516 | 2.640625 | 3 | [] | no_license | <?php
namespace Leankoala\LeanApiBundle\Command;
use Leankoala\LeanApiBundle\Client\Creator;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Sym... | true |
a4603d198be534f02f5e06467c77b4405b717cd4 | PHP | seka19/laravel-shopify | /src/ShopifyApp/Services/JwtService.php | UTF-8 | 4,507 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace OhMyBrew\ShopifyApp\Services;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
use OhMyBrew\ShopifyApp\Exceptions;
use OhMyBrew\ShopifyApp\Facades\ShopifyApp;
/**
* Class JwtService
* @package OhMyBrew\ShopifyApp\Services
* @author Alexey Sinkevich
*/
class JwtService
{
/**... | true |
1da30575f58f0452f79fab2ace4dece8cbee4098 | PHP | J4H1D/J4H1D.github.io | /userprofile.php | UTF-8 | 1,518 | 2.609375 | 3 | [] | no_license | <?php
$link=mysqli_connect ("localhost","root","");
mysqli_select_db($link,"artgallery");
session_start();
if(!isset($_SESSION['Username'])){
header("Location: index.html");
exit();
}
else{
$searchq = $_SESSION['Username'];
$query = mysqli_query($link,"SELECT * FROM customer WHERE Cus_Username LIKE '%$searchq%'... | true |
dcc7c40592418c8babb5429f21f9b39316d9757e | PHP | SamsonPHP/deploy | /src/Remote.php | UTF-8 | 5,679 | 3.1875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: egorov
* Date: 23.01.2015
* Time: 13:13
*/
namespace samsonphp\deploy;
/**
* Implementation of remote connection logic
* @package samsonphp\deploy
*/
class Remote
{
/** @var resource */
protected $handle;
/** @var string Current remote folder path */
p... | true |
107a839233e3326df6a45854d62eb827f2c5fbad | PHP | jjcollection/certification | /protected/models/ProfilDosen.php | UTF-8 | 4,079 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* This is the model class for table "tbl_profil_dosen".
*
* The followings are the available columns in table 'tbl_profil_dosen':
* @property string $kodeDosen
* @property string $namaDosen
* @property string $telp
* @property string $email
* @property string $alamat
* @property integer $idUser
*
... | true |
bcab52295ca78eada689dd06fb33b42c080b9466 | PHP | LenticularCloud/Cloud-Ldap-Admin | /src/Cloud/LdapBundle/Services/LdapClient.php | UTF-8 | 8,743 | 2.875 | 3 | [] | no_license | <?php
namespace Cloud\LdapBundle\Services;
use Symfony\Component\Ldap\LdapInterface;
use Symfony\Component\Ldap\Exception\ConnectionException;
use Symfony\Component\Ldap\Exception\LdapException;
class LdapClient implements LdapInterface
{
private $host;
private $port;
private $version;
private $u... | true |
137e68955fd039b458d57c88615eed2f0df89f7b | PHP | WilliamCMajor/ci-2020 | /application/controllers/Crud.php | UTF-8 | 4,198 | 2.875 | 3 | [] | no_license | <!-- controllers/Crud.php -->
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Crud extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->helper('form'); // loading this for the entire class/controller
$this->load->library('form_... | true |
f0b43cf7cd97546dc90495a3641d083bb13c7109 | PHP | WesleyMeneghini/pagarComissoes | /select_operadoras.php | UTF-8 | 723 | 2.59375 | 3 | [] | no_license | <?php
ini_set('error_reporting', E_ALL); // mesmo resultado de: error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once "../includes/functions.php";
require_once "../includes/connection.php";
$conect = conexaoMysqlTest();
if (isset($_GET['id'])) {
$operadoras = array();
$sql = "SELECT * from tb... | true |
67ce903521e2a3476b7ab2794a5085624d2a37af | PHP | sai-1-2-3/MonarchFan | /creatcat.php | UTF-8 | 1,152 | 2.6875 | 3 | [] | no_license | <?php
session_start();
$name = '';
if(isset($_COOKIE['signed_in']) && $_COOKIE['signed_in'] == true)
{
$name = $_COOKIE['username'];
$id = $_COOKIE['id'];
$acess = $_COOKIE['level'];
if($acess < 2)
{
echo"Your not suppose to be here";
exit();
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3... | true |
e10a42df89001b1f1c10387e46e0dfcd2c3a3d63 | PHP | precla/pollSite | /ads/ad_pic.php | UTF-8 | 2,968 | 2.71875 | 3 | [] | no_license | <?php
if(isset($_FILES['image'])){
$errors = array();
$file_name = $_FILES['image']['name'];
$file_size = $_FILES['image']['size'];
$file_tmp = $_FILES['image']['tmp_name'];
$file_type = $_FILES['image']['type'];
$file_ext = strtolower(end(explode('.',$_FILES['image']... | true |
5b39da96c61301895a01d91d7fdc448a106c03fb | PHP | Guetso/OC---PhpSymfony---Projet-5 | /Model/Comment.php | UTF-8 | 1,469 | 2.953125 | 3 | [] | no_license | <?php
namespace Blog\Model;
class Comment extends Model
{
private int $id;
private int $postId;
private string $author;
private string $content;
private string $createdAt;
private string $validated;
public function getId(): int
{
return $this->id;
}
public function se... | true |
45d996d8437d9b8f5846027e898fac4dc1693d89 | PHP | CamilleZHENG/E-commerce-Robot | /models/ProductsManager.php | UTF-8 | 6,925 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: wap21
* Date: 21/07/16
* Time: 15:18
*/
class ProductsManager extends Manager
{
public function getAll($page =1)//1 est argument par défaut
{
$connexionBDD = $this->getDBConnection();
$requete = '
SELECT
id,
name,
description,
p... | true |
f49bb242546376e48b44b4fd12f374a8a7234ac9 | PHP | jeyroik/df-triggers | /src/interfaces/triggers/values/IValue.php | UTF-8 | 334 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace deflou\interfaces\triggers\values;
use extas\interfaces\IItem;
use Generator;
interface IValue extends IItem
{
public const SUBJECT = 'deflou.trigger.value';
/**
* Get each value sense
*
* @return Generator|IValueSense[]
*/
public function eachSense(): G... | true |
6f9029f166e1279d42ab766cb4d4e66bb7eab65c | PHP | mts7/Benchmarks | /src/Helper/Formatter.php | UTF-8 | 252 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MtsBenchmarks\Helper;
class Formatter
{
public static function toDecimal(string|float|int $value, int $places = 16): string
{
return rtrim(sprintf('%.' . $places . 'f', $value), '0');
}
}
| true |
7c9aee7970c10be30f768edb3cc219f82edb1237 | PHP | ahmedkhaeld/budgeting-and-expense-tracking | /app/helpers.php | UTF-8 | 279 | 3.03125 | 3 | [] | no_license | <?php
declare(strict_types=1);
function formatDollarAmount(float $amount):string {
$isNegative =$amount<0;
return ($isNegative? '-': ''). '$'. number_format(abs($amount),2);
}
function formatDate(string $date):string {
return date('M j, Y', strtotime($date));
}
?> | true |
1b5ee0da5a3519ab02c26d294b8abccb0b4d82e8 | PHP | mecca2/bsrg | /includes/autoload/Rets_Legend.php | UTF-8 | 3,406 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Crb;
use Crb\Rets_Options;
use dekor\ArrayToTextTable;
class Rets_Legend {
use Title;
use Rets_Api_Connect;
# public static $rets;
public function __construct() {
$this->cache = new Rets_Cache( 'Rets_Legend' );
$this->load_from_cache();
}
// GetMetadata?Type=METADATA-... | true |
9c8b548f39d744559940a83f03b614f121b431d0 | PHP | connor11528/InfraRead | /app/Plugins/PluginSample.php | UTF-8 | 1,151 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Plugins;
use App\Models\Post;
/**********************************************************************************
* All plugins take a App/Post object, transform it and return true if succesful
**********************************************************************************
*
* About This P... | true |
3c71737d829061de7b7c1d736078e44476a1da4b | PHP | gihovani/encomenergia | /application/controllers/Users.php | UTF-8 | 1,852 | 2.5625 | 3 | [] | no_license | <?php
defined('BASEPATH') || exit('No direct script access allowed');
/**
* @property User_model $user_model
*/
class Users extends MY_Controller
{
public function __construct($isAdmin = true)
{
parent::__construct($isAdmin);
$this->load->model('user_model');
}
public function index($offset = 0)
{
$filte... | true |
9609629c863e6f513afd4ea872610082b5c2d8a6 | PHP | cgatherer/brtsy | /vendor/drush/drush/isolation/src/FSUtils.php | UTF-8 | 469 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Drush;
// We want to avoid using symfony/filesystem in the isolation tests.
trait FSUtils
{
function removeDir($dir)
{
$files = array_diff(scandir($dir), ['.','..']);
foreach ($files as $file) {
if (is_dir("$dir/$file") && !is_link("$dir/$file")) {
$t... | true |
af9ce3f21045d4a9567762fd094a81cde1792cd4 | PHP | constantlikepie/vcg-exam | /problems/third_problem.php | UTF-8 | 1,342 | 2.953125 | 3 | [] | no_license | <div class="mt-4">
Arrange the numbers from the given array <input type="text" name="to-array" class="col-lg-3" id="to-array" class="form-control" value="8,2,3,6,1,5,11,7,4,9"/> from lowest to highest
</div>
<div class="mt-4">
<button id="sort-btn" class="btn btn-primary">Show answer</button>
</div>
<... | true |
bb6472dcddf2e5ca11d6509fb5a19a8dad21c9c7 | PHP | room-22-co/woocommerce-central | /app/Http/Controllers/ProductController.php | UTF-8 | 1,220 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Product;
use App\Models\Store;
use App\Services\CsvParseServiceInterface;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Inertia\Inertia;
class ProductController extends Controller
{
private CsvParseServiceInterface $csvParseService;
... | true |
b0280409f19843e2847fc42d700ca08fda9a142a | PHP | tusharmhngr/treeview | /response.php | UTF-8 | 2,708 | 3.015625 | 3 | [] | no_license | <?php
//create database : thoughti
//import items.sql file i it
error_reporting('E_ALL');
$mysqli = mysqli_connect('localhost', 'root', 'root', 'thoughti');
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error()); exit();
}
if(isset($_POST['nodeid']))
{
//echo $_POST['nodei... | true |
9bb75d3992ed44cbe8c2b0a36aa1289b44990fc2 | PHP | adoy/php-src | /ext/pcntl/tests/pcntl_signal_002.phpt | UTF-8 | 338 | 2.796875 | 3 | [
"PHP-3.01",
"IJG",
"Zlib",
"OLDAP-2.8",
"BSD-4-Clause-UC",
"ISC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-public-domain",
"TCL",
"BSD-2-Clause",
"GD"
] | permissive | --TEST--
pcntl_signal() - If handler is an int value different than SIG_DFL or SIG_IGN
--EXTENSIONS--
pcntl
--FILE--
<?php
try {
pcntl_signal(SIGTERM, -1);
} catch (Error $error) {
echo $error->getMessage();
}
?>
--EXPECT--
pcntl_signal(): Argument #2 ($handler) must be either SIG_DFL or SIG_IGN when an integ... | true |
5bcbbd7bfcc46da385fe1e5464b2fe9761ed5daf | PHP | pmbijker/PortfolioProject | /logn.php | UTF-8 | 1,237 | 2.65625 | 3 | [] | no_license | <?php
session_start();
$_SESSION['loggedin'] = null;
require_once('cnnct.php');
?>
<!doctype html>
<html>
<body>
<?php
if (!isset($_POST['submit'])) { ?>
<!-- Formulier -->
<form method="post">
<h2>Beste gebruiker, vul hier je e-mail en wachtwoord in </h2>
<table>
<tr><td>E-mail</td><td><input name="email" type="... | true |
adf95fb48293642370faf1d73fe652612cda1622 | PHP | gregyhub/AJAX | /03-tchat/inc/init.php | UTF-8 | 755 | 3.03125 | 3 | [] | no_license | <?php
$pdo = new PDO('mysql:host=localhost; dbname=tchat','root', '',
array(
PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING,
PDO::MYSQL_ATTR_INIT_COMMAND=>'SET NAMES utf8'
));
session_start();
//session_destroy();
$msg = '';
//fonction de calcul d'age a partir de date de naissance ... | true |
6a21e2e4cacc28eae0a70694f305df37cd15ef47 | PHP | abbert/datagrid | /src/Column/ActionColumn.php | UTF-8 | 3,614 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* This file is part of the abbert/datagrid package.
*
* (c) Albert Bakker <hello@abbert.nl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Abbert\Datagrid\Column;
/**
* Class ActionColumn
* @package Abbert\D... | true |
6bad9d3bf3d087ebeff6c6f33984edcc341414b7 | PHP | Compulive/wheezy-back | /app/Http/Controllers/categoria2Controller.php | UTF-8 | 2,171 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Categoria2;
use App\Http\Data\Util\Util;
class categoria2Controller extends Controller
{
public function listar_categorias2(Request $request)
{
$autorizacion = Util::autenticado($request->header('Authorization'));
if... | true |
5541e9abe3be3e8e1cb7a67c2974ebc45b69cecc | PHP | CristianaCampos/Gestor-Estagios | /Aluno/BD/Aluno/verificarAluno.php | UTF-8 | 847 | 2.765625 | 3 | [] | no_license | <?php
session_start();
$aluno = $_SESSION["nome"];
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "capaEstagiodb";
$port = "3306";
// Efetua a ligação
$conn = mysqli_connect($servername, $username, $password, $dbname, $port);
// Verifica a ligação
if (!$conn) {
die("Ligação falhou: " .... | true |
3b85e4c4075e65be41bad50ab0a10babb4e252c7 | PHP | NathanMana/ComptoirDesVoisins | /src/ViewModel/CalendarViewModel.php | UTF-8 | 979 | 3.140625 | 3 | [] | no_license | <?php
namespace App\ViewModel;
use DateTimeInterface;
class CalendarViewModel
{
private $start;
private $end;
private $title;
private $url;
public function getStart(): DateTimeInterface
{
return $this->start;
}
public function setStart(DateTimeInterface $start): self
{
... | true |
7656365c155f0fc6ea5fdabef760fc95078fadc5 | PHP | PNMJ/nudge | /app/Controller/NudgesController.php | UTF-8 | 2,904 | 2.53125 | 3 | [] | no_license | <?php
App::uses('RestController', 'Controller');
/**
* Users Controller
*
* @property User $User
* @property PaginatorComponent $Paginator
*/
class NudgesController extends RestController
{
public $components = array(
'ProductManager'
);
// send a nudge to a
function give($request_id = 0, $product_uuid = ... | true |
e2d4832c869948e13b3b29f1721d745ab4f2d4b4 | PHP | kmwinter/phorge | /Web/not_used/DefaultViewer.class.php | UTF-8 | 1,274 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class DefaultViewer implements Viewer {
public function showView($viewPath, Model $model, Request $request){
if(file_exists($viewPath)){
require $viewPath;
}else {
throw new ViewNotFoundException($viewPath, $model->get(MODULE_KEY));
}
}
public function showBlock($viewPath, Model $mode... | true |
f4760ae531331ba148f548f643b6fecac88eece2 | PHP | bondhupabel120/Magazine-Site | /app/Http/Controllers/SignUpController.php | UTF-8 | 2,345 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Category;
use App\Visitor;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
class SignUpController extends Controller
{
public function signUp(){
return view('front.user.sign-up',[
'categories' => Category::where('publica... | true |
3cb2dacf1cb2c1fd95990ebe74d50052a2fecbb9 | PHP | gcw07/whm-server-tracker | /app/Console/Commands/CheckLighthouseCommand.php | UTF-8 | 1,316 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Jobs\CheckLighthouseJob;
use App\Models\Monitor;
use Illuminate\Console\Command;
class CheckLighthouseCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'server-tracker:chec... | true |
11fcc693858d695a59751516fe2345c09c505c11 | PHP | knoteva/Softuni | /Projects/PHP_Basics_Blog_Project_GreatWall/app/incl/comments.php | UTF-8 | 1,414 | 2.5625 | 3 | [] | no_license | <section class="container comments-section">
<h3>Comments: </h3>
<?php if($data['comments'] == null) : ?>
<h5>No comments at the moment, which is sad, by the way...</h5>
<?php endif; ?>
<?php foreach ($data['comments'] as $comment): ?>
<div class="comment">
... | true |
5fb2153c2fb4746d07f540f27fdbf0857b28bcde | PHP | renatosoares/playground | /src/experiment/feedstock/raw/modules/asyncrhronous-order/asynchronous-order.php | UTF-8 | 218 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
$name = $_REQUEST['name'];
$size = $_REQUEST['size'];
$beverage = $_REQUEST['beverage'];
$coffeemaker = $_REQUEST['coffeemaker'];
for ($i = 0; $i < 50000000; $i++) {
// brewing
}
echo $coffeemaker . $name; | true |
11a71b1a3f0f496cace77994f3e98606079f533a | PHP | nicklayb/htmlbuilder | /src/HtmlBuilder/Tags/Option.php | UTF-8 | 325 | 2.75 | 3 | [] | no_license | <?php
namespace Nicklayb\HtmlBuilder\Tags;
class Option extends Input
{
protected $tag = 'option';
protected $selfClosingTag = false;
public function __construct($value, $text = null)
{
$text = ($text != null) ? $text : $value;
$this->value($value);
$this->content($text);
... | true |
209e43017a79b13865e39c9d51fe7d89df92c87f | PHP | freelance-comunity/avanza | /app/Http/Controllers/RetreatController.php | UTF-8 | 4,488 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Requests\CreateRetreatRequest;
use App\Models\Retreat;
use Illuminate\Http\Request;
use Mitul\Controller\AppBaseController;
use Response;
use Flash;
use Schema;
use Toastr;
use Validator;
use App\User;
use App\Models\Vault;
class RetreatControl... | true |
d2aabbcd7a50a19bc694bf9fe5890466ce53d97e | PHP | ntzm/php-ucf | /src/Classifier/NoteClassifier.php | UTF-8 | 661 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ntzm\PhpUcf\Classifier;
use Ntzm\PhpUcf\Comment\Comment;
final class NoteClassifier implements ClassifierInterface
{
private const NOTE_PREFIXES = [
'NOTE',
'OPTIMIZE',
'OPTIMISE',
'TODO',
'HACK',
'FIXME',
'BUG',
'XXX',
];
p... | true |
a979c6239eaaba8af04ce3a6d73b5ec7ea634e68 | PHP | webBing1993/swim | /application/home/common.php | UTF-8 | 5,369 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 截取字符串长度
* @author:linben
*/
function subtext($text, $length) {
if(mb_strlen($text, 'utf8') > $length)
return mb_substr($text, 0, $length, 'utf8').'...';
return $text;
}
/**
* json对象转数组,支持多维
*/
function ob2ar($obj) {
if(is_object($obj)) {
$obj = (array)$obj;
$obj = o... | true |
a6d44a3a045d20c6d4a72f0bdb0bfb290dc46352 | PHP | PHP-CS-Fixer/PHP-CS-Fixer | /src/Tokenizer/Analyzer/GotoLabelAnalyzer.php | UTF-8 | 927 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Toke... | true |
21c99fdf97687a8a45a9dfafc38cb9394db2ef50 | PHP | softsun-tomorrow/mdh | /app/Models/CardScoreLog.php | UTF-8 | 998 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class CardScoreLog extends Model
{
//会员卡积分记录
protected $table = 'card_score_log';
protected $appends = [
'type_text',
'source_text'
];
//类型:0=收入,1=支出
public static function getTypeArr()
{
return... | true |
a53cb8bc0c21d4a20664cde3a37ebd2dc3113215 | PHP | kala725/event-tracker | /app/Http/Controllers/CampaignController.php | UTF-8 | 745 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Campaign;
use Illuminate\Http\Request;
class CampaignController extends Controller
{
public function create(Request $request)
{
if ( 'GET' === $request->method() ) {
return view('campaign/form');
}
$status =['status' => 40... | true |
99a4b96c9a6a462b7d361ff442bfd8d34c7316f6 | PHP | 5ctechforgood/projectcaring | /piwik/plugins/CustomPiwikJs/File.php | UTF-8 | 1,766 | 2.984375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"GPL-3.0-or-later",
"LGPL-2.0-or-later",
"LGPL-2.1-or-later",
"GPL-3.0-only",
"GPL-1.0-or-later",
"MIT"
] | permissive | <?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\CustomPiwikJs;
use Piwik\Plugins\CustomPiwikJs\Exception\AccessDeniedException;
class File
{
/**
* @var string
*/
priva... | true |
426820dbc4d33a52830371d5dd2a25070fd88fcf | PHP | lovehamburger/MyMall | /model/MemberressModel.class.php | UTF-8 | 4,236 | 2.609375 | 3 | [] | no_license | <?php
/**
* 会员地址模型类
*/
class MemberressModel extends Model
{
public function __construct(){
parent::__construct();//验证对象及本模型对象
$this->_fields = array('id','name','email','address','code','tel','buildings','user','selected','flag');
$this->_tables = array(DB_FREFIX.'address');
$this->_checkObj = new... | true |
02dba4ee32361957e25a95f89a11cbc6a0d64383 | PHP | flesheater/design_patterns | /src/StrategyExample/AlgorithmStrategyInterface.php | UTF-8 | 421 | 2.9375 | 3 | [] | no_license | <?php
namespace Webham\DesignPatterns\StrategyExample;
/**
* The AlgorighmStrategyInterface interface declares operations common to all supported versions
* of some algorithm.
*/
interface AlgorithmStrategyInterface
{
/**
* Getting the algorithm name.
*/
public function getName();
/**
*... | true |
eaf6f5723d2d4af2a7543a37edcbd54bc33a1f40 | PHP | felixp4/20181105_php7 | /classes_php/dateinterval_diff.php | UTF-8 | 472 | 3.4375 | 3 | [] | no_license | <?php ## Использование метода diff()
$date = new DateTime('2015-01-01 0:0:0');
$nowdate = new DateTime();
$interval = $nowdate->diff($date);
// Выводим результаты
echo $date->format("d-m-Y H:i:s")."<br />";
echo $nowdate->format("d-m-Y H:i:s")."<br />";
// Выводим разницу
echo $interval->format("%Y-%m-%d %H:%I")."<b... | true |
65444f9728b9b9484fa9ecba0f68a6106009b7d7 | PHP | timoffmax/costs | /app/Interfaces/Api/CurrConv/RequestInterface.php | UTF-8 | 921 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Interfaces\Api\CurrConv;
/**
* Describes API request object prepared to be sent
*/
interface RequestInterface
{
/**
* Request method GET/POST/PUT etc.
*
* @return string
*/
public function getMethod(): string;
/**
* API endpoint with... | true |
e746aeaa5442ff604bed5c3142825ffdc4989374 | PHP | LouisGi33/PHP | /Pokemon/Balls/pokeball.php | UTF-8 | 305 | 3.09375 | 3 | [] | no_license | <?php
class Pokeball extends Ball {
public function _construct($inventory) {
$this->name = "Pokeball";
$this->level = 10;
$this->master = false;
$this->inventory = 3;
parent::__construct($name, $level);
}
}
?> | true |
ce14cc213b398b1c3dd864d75dbd1be4e9cc3983 | PHP | bamvoo/proyecto_m3 | /controllers/GameController.php | UTF-8 | 4,097 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
session_start();
include_once '../controllers/UserDataAccesObject.php';
include_once '../models/User.php';
include_once '../adapters/DataBaseConect.php';
function generateMob()
{
$db = DataBaseConect::getConnection();
//obtener mobs
$query = "SELECT name, level, hp, we... | true |
52e80bea427e39b4fa6a8eeeb07ffd43660482a0 | PHP | semg101/Php-ecommerce-website | /includes/config.inc.php | UTF-8 | 2,148 | 2.515625 | 3 | [] | no_license | <?php
// Are we live?
if (!defined('LIVE')) DEFINE('LIVE', false);
// Errors are emailed here:
DEFINE('CONTACT_EMAIL', 'you@example.com');
//Initialization for Authorize.net
define('API_LOGIN_ID', '29hxJ9Ge');
define('TRANSACTION_KEY', '8EKf5a673hC3jqD2');
// Determine location of fil... | true |
d3ac2d6a8b0b10a4e77330c5ddfad4a8586fa23e | PHP | ozu94/e-learning.com | /_base/_basemodel.php | UTF-8 | 370 | 2.53125 | 3 | [] | no_license | <?php
/**
*
*/
class _baseModel
{
public $connect;
function __construct()
{
try {
//Tạo kết nối tới database
$this->connect = new PDO('mysql:host='.DB_HOST.';dbname='.DB_DBNAME.';charset=utf8',
DB_USERNAME,
DB_PASSWORD);
} catch (Exception $e) {
file_put_contents('log.txt', $e->get... | true |
6245bc69a7b105a90bb177d2fdfcfebd78e10edc | PHP | coenmooij/brand-api | /src/Application/Twitter/AccountStatisticsController.php | UTF-8 | 922 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace CoenMooij\BrandApi\Application\Twitter;
use CoenMooij\BrandApi\Application\AbstractController;
use CoenMooij\BrandApi\Domain\Twitter\TwitterAccountStatisticsServiceInterface;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Response;
final class AccountStatisticsContro... | true |
137160c6a324b9cc357175eecc9f363d6fda0cb4 | PHP | pallavshah/CloudMajorProject | /main/user.php | UTF-8 | 1,114 | 2.546875 | 3 | [] | no_license | <?php
$con=mysqli_connect("localhost","root","","workflows");
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if(isset($_GET['message']))
{
echo $_GET['message'];
}
session_start();
$sql="select id from login where email='".$_SESSION['email']."'";
$result= my... | true |
90c3d19ab84b86e060b90ebc8735cd715a9141ff | PHP | jlr2k8/gaseous | /app/libraries/User/Login.php | UTF-8 | 10,299 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Josh L. Rogers.
* Copyright (c) 2017 All Rights Reserved.
* 10/6/2017
*
* login.php
*
* Deals with login validation, password management, etc.
*
*/
namespace User;
use Content\Utilities;
use Db\Query;
use Email;
use ReCaptcha;
use Settings;
use Utilities\Token;
class Login
{
publi... | true |
d66564143ebd480fd61a74ac35412c3a00415e84 | PHP | nizsheanez/alp.ru | /public_html/protected/modules/articles/models/ArticleSection.php | UTF-8 | 1,696 | 2.625 | 3 | [] | no_license | <?php
class ArticleSection extends ActiveRecordModel
{
const PAGE_SIZE = 10;
public function name()
{
return 'Разделы статей';
}
public static function model($className=__CLASS__)
{
return parent::model($className);
}
public function tableName()
{
return 'articles_sections';
}
... | true |
0ced5db3223653a049a07f859eae6f5a32f6508b | PHP | buruhsd/laravel-modules | /src/LaramoudServiceProvider.php | UTF-8 | 2,337 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of laramoud package.
*
* @author Rifqi Khoeruman Azam <pravodev@gmail.com>
*
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* Copyright © 2019 PondokIT. All rights reserved.
*/
namespace Pravodev\Lara... | true |
8ad5b1c0fe1bc84446514eaa77fca933db0f2630 | PHP | EasonDing/shuyouhui | /app/Transformers/Admin/BookTransformer.php | UTF-8 | 965 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Transformers\Admin;
use League\Fractal\TransformerAbstract;
use App\Entities\Admin\Book;
/**
* Class BookTransformer
* @package namespace App\Transformers;
*/
class BookTransformer extends TransformerAbstract
{
/**
* Transform the \Book entity
* @param \Book $model
*
*... | true |
082c8b97e68376746a6c4d6e701ee8986cf510c8 | PHP | woswos/e3-obfuscation-wars | /benchmark-server/old-versions/benchmark-server-0.1/perform-benchmark.php | UTF-8 | 11,442 | 2.640625 | 3 | [] | no_license | <?php
//var_dump($argv);
if(in_array("--help", $argv, TRUE) || !isset($argv[1])){
echo "
____ __
/ __ \ / /
/ /_/ /__ ____ _____/ /_ __ __
/ __ / _ \/ __ \/ ___/ __ \/ / / /
/ /_/ / __/ / / / /__/ / / / /_/ /
\____/\___/_/ /_/\___/_/ /_/\__, ... | true |
4e12f38a27b55e7e96141a345e4127faccceee53 | PHP | Zycon42/Security | /lib/Zycon42/Security/Application/ExpressionEvaluator.php | UTF-8 | 1,851 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Zycon42\Security\Application;
use Nette;
use Nette\Application\Request;
use Nette\Security\IRole;
use Symfony\Component\ExpressionLanguage\Expression;
use Zycon42\Security\Authorization\ExpressionLanguage;
use Zycon42\Security\ISecurityContext;
use Zycon42\Security\Role\RoleHierarchy;
class Expressio... | true |
4d45dc20c959332214f9b0834b95e933a511cdd4 | PHP | Prionyx/project-lvl1-s156 | /src/GameCore.php | UTF-8 | 865 | 3.25 | 3 | [] | no_license | <?php
namespace BrainGames\GameCore;
use function \cli\line;
function run($scenario = null)
{
$gamesCount = 3;
$logics = [];
for ($i = 0; $i < $gamesCount; $i++) {
$logics[] = $scenario();
}
line('Welcome to the Brain Game!');
$hello = $logics[0]['hello'];
line($hello);
line()... | true |
e7acc93b0aa375317c1fc10c2fac10d295105e2f | PHP | jukarsoft/tienda_v3 | /altaProducto.php | UTF-8 | 2,008 | 2.875 | 3 | [] | no_license | <?php
//conexión bbdd
require 'conexion_tienda_examen_PDO.php';
try {
//carga atributos recibidos
$nombre=$_POST['nombre'];
$descripcion=$_POST['descripcion'];
$marca=$_POST['marca'];
$stock=$_POST['stock'];
//validación de atributos obligatorios
if (trim($nombre)=="") {
throw new Exception("... | true |
15abe9a4becd4b02cbfd5f0ec2ee926dc197b65d | PHP | mri-dev/359-2016 | /wp-content/themes/Avada-Child-Theme/includes/shortcodes/LoadPage.php | UTF-8 | 4,432 | 2.5625 | 3 | [] | no_license | <?php
class LoadPage
{
const SCTAG = 'load-page';
private $template = '2x2';
private $attr = array();
public function __construct()
{
add_action( 'init', array( &$this, 'register_shortcode' ) );
}
public function register_shortcode() {
add_shortcode( self::SCTAG, array( &$t... | true |
1535e67e9cb6d7b799bd7fbf8dca2c3c86ca6a7d | PHP | HebaKassem/MyKitchen | /functions.php | UTF-8 | 1,095 | 2.640625 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['username'])) {
echo "<script type='text/javascript'>alert('You must login first');</script>";
header('location: login.php');
}
?>
<?php
//include_once 'connection.php';
//echo"heeree";
$con=mysql_connect("localhost","root","12345678");
mysql_select_db("myki... | true |
c7df15f02a903d21ea10c4cf4907c04c476403de | PHP | DorSharir/Cipher | /UserClass.php | UTF-8 | 2,472 | 3.53125 | 4 | [] | no_license | <?php
require_once("ClassDB.php");
/*
Class of user
*/
class UserClass {
private $user_email; # user's email
private $user_password; # user's password
private $user_first_name; # user's first name
private $user_last_name; # user... | true |
9ee1de9cfc56f35e878d873d0c2fd3b9a08baf7c | PHP | Churakovmike/laravel-db-doc-generator | /src/Interfaces/ColumnInterface.php | UTF-8 | 856 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace ChurakovMike\DbDocumentor\Interfaces;
/**
* Interface ColumnInterface.
* @package ChurakovMike\DbDocumentor\Interfaces
*/
interface ColumnInterface
{
/**
* Column name from database.
*
* @return mixed
*/
public function getName();
/**
* Column type from databas... | true |
0be4d3f44de574936183235ed5041cec3e624642 | PHP | techtronics/WIN-V2 | /30_implementation/data/MySQLConnection.php | UTF-8 | 3,291 | 3 | 3 | [] | no_license | <?php
require_once 'conf/MySQLConfig.php';
class MySQLConnection {
private $Connection = false;
private $DBSelectResult = false;
public function openConnection() {
$this->Connection = new mysqli(MySQLConfig::$DBHost,
MySQLConfig::$DBUser,
... | true |
a9bf0e8a4b2b003ba16f4b887488b6f9ce0e6008 | PHP | EDataScriptware/SeniorProjectDevelopment | /application/models/Team_model.php | UTF-8 | 1,439 | 2.921875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Team_Model extends CI_Model {
public function __construct()
{
parent::__construct();
}
# GET ALL
public function get_all_team_data() {
$this->db->select("*");
$this->db->from('team');
$query = $this->db->get()->result();
// echo json_encode... | true |
29c3e4f4f94d0d6e5103ec07bf693f1801e4b8b6 | PHP | JooLuiz/CodeIgniterBasicApp | /application/models/User_model.php | UTF-8 | 3,102 | 2.984375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class User_model extends CI_Model {
public function __constructor(){
parent::__constructor();
$this->load->database();
}
//login method checks the params data with the database data calling the check_login method
public... | true |