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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
07f61041c717c521afeab2604c3b2535b033a1a8 | PHP | cocoonprojects/welo-backend | /module/TaskManagement/src/TaskManagement/TaskInterface.php | UTF-8 | 1,315 | 2.515625 | 3 | [] | permissive | <?php
namespace TaskManagement;
use Application\Entity\BasicUser;
use Zend\Permissions\Acl\Resource\ResourceInterface;
interface TaskInterface extends ResourceInterface
{
const STATUS_IDEA = 0;
const STATUS_OPEN = 10;
const STATUS_ONGOING = 20;
const STATUS_COMPLETED = 30;
const STATUS_ACCEPTED = ... | true |
ee922506c04aacedaf73f29db2281d8fd86c5766 | PHP | chopins/tklib | /type/src/StringFixedArray.php | UTF-8 | 773 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Toknot (http://toknot.com)
*
* @copyright Copyright (c) 2011 - 2021 Toknot.com
* @license http://toknot.com/GPL-2,0.txt GPL-2.0
* @link https://github.com/chopins/toknot
*/
namespace Toknot\Type;
use Toknot\Type\Text;
/**
* StringArray
*
* @author chopin
*/
class StringFixedArray ext... | true |
bc21c96cc7ef7ad89d508193f4ed02c7142bcb25 | PHP | Igor-kor/php_patterns | /Prototype/index.php | UTF-8 | 957 | 3.015625 | 3 | [] | no_license | <?php
/**
* Прототип (Prototype)
*
* Порождающий шаблон
*
* Когда необходим объект, похожий на существующий объект,
* либо когда создание будет дороже клонирования.
*/
use Prototype\Sheep;
include "../spl_autoloader.php";
echo "Прототип (Prototype)<br>";
$original = new Sheep('Джолли');
echo $original->getNa... | true |
8654ec6a8de38d4c4d52675d2024d95f5480d593 | PHP | Shofiul-Alam/magento-app | /src/vendor/magento/framework/Intl/DateTimeFactory.php | UTF-8 | 512 | 2.6875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"AFL-2.1",
"AFL-3.0",
"OSL-3.0",
"MIT"
] | permissive | <?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Intl;
/**
* Class DateTimeFactory
* @package Magento\Framework
*/
class DateTimeFactory
{
/**
* Factory method for \DateTime
*
* @param string $time
* @param \D... | true |
8d7b737a455427fcb62dea8cf21bb53fde80d695 | PHP | a707937337/np_cal | /php/post.php | UTF-8 | 858 | 2.65625 | 3 | [] | no_license | <?php
require_once 'lib.php';
$conn = null;
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
echo "ERROR";
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$name = empty($_POST['name']) ? null : $_POST['name'];
$date = empty($_POST['date']) ? null : $_POST['date'];
$event = empty($_POST['value']) ? null ... | true |
c598c9822c2548731857b1acb3bf4669995dd47d | PHP | rumur/pimpled | /app/Api/Http/Controllers/Auth/RegisterController.php | UTF-8 | 1,330 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Pmld\App\Api\Http\Controllers\Auth;
use Pmld\App\Api\Transform\User;
use Pmld\Http\Controller\BaseController;
use Pmld\Http\Exceptions\UnauthorizedException;
class RegisterController extends BaseController
{
/**
* Registered user into the system.
*
* @return mixed|\WP_REST_Response... | true |
79d1c58d581fa7cddc271a37623d64b9b4e65a63 | PHP | OpenMageModuleFostering/mage_laposta_connect | /app/code/community/Laposta/Connect/controllers/WebhookController.php | UTF-8 | 6,463 | 2.640625 | 3 | [] | no_license | <?php
/**
* Laposta webhooks controller
*
* @category Laposta
* @package Laposta_Connect
*/
class Laposta_Connect_WebhookController extends Mage_Core_Controller_Front_Action
{
/**
* Entry point for all webhook operations
*/
public function indexAction()
{
$listToken = Mage::app... | true |
daa103818ea8ded7f44b2ebb3aed40297790f817 | PHP | crude-forum/crude-forum | /spec/Iterator/Wrapper.spec.php | UTF-8 | 3,055 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
use CrudeForum\CrudeForum\Iterator\Wrapper;
use CrudeForum\CrudeForum\Iterator\WrapperTrait;
use CrudeForum\CrudeForum\Iterator\ProxyTrait;
use CrudeForum\CrudeForum\Iterator\Utils;
use \Iterator as Iterator;
class TestWrapper implements Wrapper, Iterator
{
use ProxyTrait;
use WrapperTrait;
private... | true |
df1b9790abada29c3e125db8e70659a6911c8a03 | PHP | maiglonl/Finapp | /app/Events/IuguSubscriptionCreatedEvent.php | UTF-8 | 627 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Finapp\Events;
class IuguSubscriptionCreatedEvent{
private $iuguSubscription;
private $userId;
private $planId;
/**
* Create a new event instance.
*
* @param $iuguSubscription
* @param $iuguSubscriptionOld
* @return void
*/
public function __construct($iuguSubscription, $userId, $pl... | true |
0bcc4e525c9d3b323ee4ccd8e2c3faee51f80140 | PHP | omisai-tech/laravel-szamlazzhu | /src/Language.php | UTF-8 | 1,557 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Omisai\Szamlazzhu;
enum Language: string
{
case HU = 'hu';
case EN = 'en';
case DE = 'de';
case IT = 'it';
case RO = 'ro';
case SK = 'sk';
case HR = 'hr';
case FR = 'fr';
case ES = 'es';
case CZ = 'cz';
case PL = 'pl';
public static function g... | true |
e5f8db260cd14b8537013cd43bac5c756dff7268 | PHP | vallauri-ict/ajax-playground-palumbovalerio | /RegistroElettronico/libraries/library.php | UTF-8 | 2,135 | 2.828125 | 3 | [] | no_license | <?php
define ("SCADENZA", 3600);
function connection($dbName){
define('DBHOST', 'localhost');
define('DBUSER', 'root');
define('DBPASS', '');
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
try
{
$con = new mysqli(DBHOST, DBUSER, DBPASS, $dbName);
$con->set_charset("utf8");
return $con;
}
... | true |
24ca621de9e43fdc54de44696ec188e6e6b16b8c | PHP | malierjia/Ejercicio-1-MariaAlejandraMoreno | /estudiantes.php | UTF-8 | 1,438 | 3.109375 | 3 | [] | no_license | <html>
<head>
<title> ESTUDIANTES </title>
<meta charset = "utf-8">
</head>
<body>
<?php
//se conecta
include_once("includes/database.php");
//query descrito en word
$query= "SELECT * FROM claseweb.estudiantes ORDER BY apellido";
//se coloca en una variable (arreglo)
$result= mysqli_query($con,$query);
//creo ta... | true |
d8c23bf87fdd5aa58da24eaf6aa87f3abb27064c | PHP | ssnepenthe/clockwork-for-wp | /tests/trait-creates-config.php | UTF-8 | 400 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Clockwork_For_Wp\Tests;
use League\Config\Configuration;
use League\Config\ConfigurationInterface;
trait Creates_Config {
public function create_config( array $user_config = [] ): ConfigurationInterface {
$schema = include dirname( __DIR__ ) . '/config/schema.php';
$config = new Configuration( ... | true |
ad3a6a645771d4274c6e26c094620d8c80165d1e | PHP | ziprandom/nntpboard | /classes/board/memcachednntp.class.php | UTF-8 | 659 | 2.515625 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__) . "/cachednntp.class.php");
require_once(dirname(__FILE__) . "/../connection/itemcache/mem.class.php");
class MemCachedNNTPBoard extends CachedNNTPBoard {
private $memcache;
public function __construct($boardid, $parentid, $name, $desc, $anonMayPost, $authMayPost, $isModerated,... | true |
b08c3c822f8fb8ea0da17c686a95f3cdfa310eb6 | PHP | jasarsoft/ad-turist | /sys/Controller.php | UTF-8 | 541 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
abstract class Controller {
private $podaci = [];
protected function set($name, $value) {
if (preg_match('|^[A-z0-9_]+$|', $name)) {
$this->podaci[$name] = $value;
}
}
protected function del() {
$this->podaci = [];
... | true |
4223bb24369ea032ec08274d854cb60d8d0c0488 | PHP | algo26-matthias/phlymail | /phlymail/handlers/files/configapi.php | UTF-8 | 8,848 | 2.578125 | 3 | [] | no_license | <?php
/**
* Offering API calls for the Config interface
* @package phlyMail Nahariya 4.0+ Default branch
* @subpackage Handler: Files
* @copyright 2004-2013 phlyLabs, Berlin (http://phlylabs.de)
* @version 4.0.8 2013-07-07
*/
// Only valid within phlyMail
defined('_IN_PHM_') || die();
class handler_files_config... | true |
a722d1a2478b5853e2fc96b163fafdecb6e658a0 | PHP | RodolfoTerra/guzzleExemple | /app/control/index.php | UTF-8 | 1,413 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Control;
/**
* Class: Salario
*/
use GuzzleHttp\Client as Client;
class Salario
{
private $url;
private $myObj;
function __construct()
{
$this->url = 'http://www.guiatrabalhista.com.br/guia/salario_minimo.htm';
$this->myObj = new Client([
'headers' => ['User-Ag... | true |
426f078f1d0f54660f7f3d004e816db908767107 | PHP | JorgeSidgo/crudsini | /app/dao/DaoBase.php | UTF-8 | 180 | 2.625 | 3 | [] | no_license | <?php
class DaoBase {
protected $con;
public $objeto;
public function __construct() {
$obj = new Conexion();
$this->con = $obj->conectar();
}
} | true |
b104c7a585d29a43d30e94cd145f333860e31a23 | PHP | Ponera-Lab/wcore-repo | /src/Manager/Site/SectionManager.php | UTF-8 | 6,751 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: DanielSimangunsong
* Date: 2/23/2017
* Time: 1:24 PM
*/
namespace Webarq\Manager\Site;
use DB;
use Illuminate\Contracts\Support\Htmlable;
use Wa;
use Webarq\Manager\SetPropertyManagerTrait;
use Webarq\Model\NoModel;
class SectionManager implements Htmlable
{
use Set... | true |
675842947645f92874ec829b961866120e8ec2de | PHP | VivienG-Dev/Fetch-API-Training | /fetch/articles.php | UTF-8 | 279 | 2.515625 | 3 | [] | no_license | <?php
// Create Connection
$conn = mysqli_connect('localhost', 'root', 'root', 'ajaxtest');
$query = 'SELECT * FROM articles';
// Get Result
$result = mysqli_query($conn, $query);
// Fetch Data
$articles = mysqli_fetch_all($result, MYSQLI_ASSOC);
echo json_encode($articles); | true |
d54991d5886d15d3e4ab352b9b3c98edd54c01a2 | PHP | axelPZ/carrito-compras | /models/sale.php | UTF-8 | 4,194 | 2.859375 | 3 | [] | no_license | <?php
require_once 'core/crud.php';
class Sale extends Crud{
private $id;
private $date;
private $userId;
private $ahorra;
private $neto;
private $iva;
private $total;
protected const TABLE='sales';
protected const ID='sal_id';
p... | true |
022e5aacce4a0d8e77e8ac7dff8187a1dfc930e3 | PHP | xinonghost/patterns | /Creational/AbstractFactory/PHP/products/WinCheckbox.php | UTF-8 | 522 | 3.21875 | 3 | [] | no_license | <?php
require_once(__DIR__.'/../interfaces/ICheckbox.php');
/**
* Concrette object of family.
*/
class WinCheckbox implements ICheckbox
{
/**
* @override
*/
public function paint()
{
print("Painting checkbox in Windows style.\n");
}
/**
* @override
*/
public function setPosition($x, $y)
{
print... | true |
f0637ebb4de86d9d65d518ef8777223919351b5c | PHP | nuostudio/nuostudio.com | /proxySRC.php | UTF-8 | 3,715 | 2.640625 | 3 | [] | no_license | <?php
session_start();
/*
* Proxy de Chevismo.com
* Desarrollado integramente por Chevi para Chevismo
* No usar con fines malos.. ;)
*/
// Inicio del Proxy:
if($_SESSION['proxy']['URL']) $_POST['url'] = $_SESSION['proxy']['URL'];
// Check URL and add www where necesary:
$weburl = $_POST['url'];
if(substr($webur... | true |
c36b51a30537dbf06373df7c7bf06abab64646e2 | PHP | solo-framework/miga | /src/Miga/Command/Commit.php | UTF-8 | 3,500 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*
* PHP version 5
*
* @package
* @author Andrey Filippov <afi@i-loto.ru>
*/
namespace Miga\Command;
use Miga\Application;
use Miga\Migration;
use Miga\MigrationManager;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Cons... | true |
a2f7747ca8d446f6db84f3e523018195fcf6b63d | PHP | sufiyanpk7/iptables | /analyze-ip-relationships.php | UTF-8 | 972 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <!-- Take a list of IPs from file blacklist and analyze for relationships -->
<?php
$file='blacklist';
$closeness=32768; // 65536 131072;
$minrelated=6;
$sorted=array();
$ips=file($file);
echo '<pre style="white-space:pre-wrap;">',count($ips)," IPs <br>\r\n"; flush();
foreach ($ips as $ip) {
$ip=ip2long(tr... | true |
2d503484149ebfb9c203b6622275a69c1f1d5bc1 | PHP | brufreitas/colec | /classes/thing.class.php | UTF-8 | 682 | 3.015625 | 3 | [] | no_license | <?php
require_once("classes/item.class.php");
require_once("classes/user.class.php");
require_once("func/ConexaoLocal.php");
class thing extends item
{
public $thingUUID;
public $owner;
public function __construct($uuid) {
$q = "SELECT HEX(ownerUUID) AS ownerUUID, itemID FROM tb_thing WHERE thingUUID = 0x{... | true |
f0808c8edad5a1ad80df10d32a8b1b466ca9188b | PHP | hymns/telegram-php | /src/Traits/Configurable.php | UTF-8 | 621 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php namespace Evdb\TelegramPhp\Traits;
trait Configurable {
protected $defaults = [];
protected $config = [];
public function getDefaults()
{
return $this->defaults;
}
public function getConfig()
{
return $this->config;
}
public function getO... | true |
5f81a6b32d7d39c212369bae844a60d6a1d52dec | PHP | evolvewebtech/comm-alpha | /commander_alpha/manager/HTTPSession.php | UTF-8 | 14,245 | 3.03125 | 3 | [] | no_license | <?php
require_once dirname(__FILE__).'/AppConfig.php';
/**
*
* Description of HTTPSession
* It will be an entirely self-contained class
* that hides all of PHP’s session_ functions from your application’s main body.
*
* It also provides session variable handling, which bypasses PHP’s own.
* Rather than store mul... | true |
23b1ceda5c3c09073f45f2d38ecd885e2c9382e0 | PHP | tolik505/at | /frontend/widgets/openGraphMetaTags/Widget.php | UTF-8 | 1,524 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Author: Pavel Naumenko
*/
namespace frontend\widgets\openGraphMetaTags;
/**
* Class Widget
*
* @package frontend\widgets\openGraphMetaTags
*/
class Widget extends \yii\base\Widget
{
/**
* @var string
*/
public $title;
/**
* @var string
*/
public $description;
... | true |
a386621fe6e72c9823872f7f37640cd0d980c653 | PHP | indodelta/versi2018 | /database/seeds/BotSeeder.php | UTF-8 | 484 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class BotSeeder extends Seeder
{
const BOT_COUNT = 30;
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$current_count = count(\App\User::bots());
for ($i = $current_count; $i < self::BOT_COUNT; $i++) {
$user = new \App\User([
'nam... | true |
429a80dff9d0ca0de1ea54a7a0cc57319aa6ef24 | PHP | chuganghong/PHP | /2014/10/10/Sort.class.php | UTF-8 | 2,995 | 3.5 | 4 | [] | no_license | <?php
/**
*排序算法
*/
class Sort
{
private $num = 5;
private $min = 0;
private $max = 20000;
/**
*生成数组
*/
public function generateArr()
{
$arr = array();
for($i=0;$i<$this->num;$i++)
{
$arr[] = mt_rand($this->min,$this->max);
}
return $arr;
}
/**
*insert sort asc
*/
public function inse... | true |
589d8dfff275f9a7e8f38f0a7a1da1244603517c | PHP | ankitamit/php_own_code | /book/typeerror.php | UTF-8 | 147 | 2.75 | 3 | [] | no_license | <?php
function xc(array $a){
}
try{
xc(4);
}catch (TypeError $e){
echo 'it is '.$e->getMessage();
}
?>
| true |
d15a74401be900220af6a8bbba5a56edb7cdcdc0 | PHP | yeehaoo/vetapp | /php-scripts/getPetDetailsJson.php | UTF-8 | 1,655 | 2.578125 | 3 | [] | no_license | <?php
if (isset($_POST["pet_id"])) {
$pet_id = $_POST["pet_id"];
require_once __DIR__ . '/db_connect.php';
$db = new DB_CONNECT();
$db->connect();
$sqlCommand = "SELECT * FROM pets WHERE pet_id = '$pet_id'";
$result = mysqli_query($db->myconn,"$sqlCommand");
if (mysqli_num_rows($resul... | true |
739a58b2ca768c3373ec44489a505fe61cdfaf1f | PHP | Viitainen/Obesethings | /app/Http/Controllers/PlayerController.php | UTF-8 | 2,383 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Player;
use App\Thing;
use Illuminate\Http\Request;
use App\Http\Requests\StorePlayer;
class PlayerController extends Controller
{
public function __construct() {
$this->middleware('auth', ['except' => ['index', 'show']]);
}
/**
* Display a list... | true |
1a962bf173cd8262835e704845e3f052c1c8e75d | PHP | vjroby/MarketTradeProcessor | /app/Repositories/EloquentMessageRepository.php | UTF-8 | 2,951 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created for MarketTradeProcessor.
* User: Robert Gabriel Dinu
* Date: 8/13/15
* Time: 13:52
*/
namespace App\Repositories;
use App\Exceptions\ValidationException;
use App\Models\Message;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use LRedis;
use Symfony\Component\HttpFoundation\... | true |
675e7630009c56e081af855870ebbd42f21275e0 | PHP | AC32006-Team11/delivrhyno | /DBMSAdvancedQuery1.php | UTF-8 | 1,551 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php include 'header.php'; ?>
<?php
/**
* Displays the results of the first DBMS Advanced MySQL query.
*/
function advancedQuery1()
{
include 'dbConnect.php';
$city = $_GET["city"];
?>
<div class="container">
<div class="row">
<div class="col-md-12">
<h2 style="text-align:c... | true |
d46070eeaa1768fdd3eef9d2ca7eee838e221504 | PHP | bulb03/ssat | /TRAINER_SALARY_REAL.php | UTF-8 | 21,147 | 2.8125 | 3 | [] | no_license | <?php
//這行要放外面
include_once dirname(__FILE__).'/Utils.php';
class TRAINER_SALARY_REAL
{
private $modelName = "TRAINER_SALARY_REAL";
function connect_db()
{
$servername = "localhost";
$dbname = "guardian";
$account = "root";
$pass... | true |
fa013b6a1cb0cc1173ed8c406d01c927f18e0c6e | PHP | octalmage/wib | /php-7.3.0/Zend/tests/const_dereference_003.phpt | UTF-8 | 342 | 2.703125 | 3 | [
"Zend-2.0",
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing",
"MIT"
] | permissive | --TEST--
Const array deference
--FILE--
<?php
error_reporting(E_ALL);
var_dump([1, 2, 3, 4,][3]);
var_dump([1, 2, 3, 4]['foo']);
var_dump([array(1,2,3), [4, 5, 6]][1][2]);
foreach (array([1, 2, 3])[0] as $var) {
echo $var;
}
?>
--EXPECTF--
int(4)
Notice: Undefined index: foo in %sconst_dereference_003.php on li... | true |
7d239102d95b40e4f9dec46ba5ce9fbe135456b4 | PHP | mondalamit/newsfeed | /login.php | UTF-8 | 845 | 3.140625 | 3 | [] | no_license | <?php
// get username and password
$username = $_POST["usernameLogin"];
$password = $_POST["passwordLogin"];
// create our data object
$data = array();
// decode the accounts file to associative array
$accounts = json_decode(file_get_contents("accounts.json"), True);
// if the username doesn't exist, throw an error
... | true |
582078895eb26757ff6d47c8fc31704346d7901e | PHP | xlogix/CP2-android | /clientproj/include/db_connect.php | UTF-8 | 619 | 2.9375 | 3 | [] | no_license | <?php
/**
* A class file to connect to database
*/
class db_connect {
private $conn;
/**
* Function to connect with database
*/
function connect() {
// import database connection variables
require_once __DIR__ . '/db_config.php';
// Connecting to mysql database
... | true |
b51c902f4be27a72e0181d60c6d2a4bfcbec12ca | PHP | ucassh/joeapi | /src/User/About.php | UTF-8 | 1,977 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Joe\User;
use Joe\User;
class About
{
/** @var User */
private $user;
private $properties;
private $helloMessage;
private $basicInfo;
private $localization;
private $id;
/**
* @return array
*/
public function getProperties()
{
return $this->... | true |
d72ebfd47c9e72b4ef3afe390707fec1158b374e | PHP | Laghoub/TDW | /Projet_TDW/model/ArticleM.php | UTF-8 | 2,434 | 2.78125 | 3 | [] | no_license | <?php
function delete($id){
try
{
$dbd = new PDO('mysql:host=localhost;dbname=tdw;charset=utf8', 'root', '');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
$articles = $dbd->prepare('DELETE FROM articles WHERE id=?');
$affectedLines = $articles->execute(ar... | true |
78cb45e827debec8c4fd0be68ca9700fb53a1602 | PHP | karanbhogle/php | /22.01.2020/q0factorial/index.php | UTF-8 | 263 | 4.1875 | 4 | [] | no_license | <?php
function factorial($number){
$originalNumber = $number;
$factorial = 1;
while($number > 0){
$factorial = $factorial * $number;
$number--;
}
echo 'The Factorial of '.$originalNumber.' is '.$factorial;
}
factorial(5);
?> | true |
f47dbaaa3b0a58a69c49b72905488c242a1c5ee1 | PHP | DeBoerTool/timeline-path-graph | /Tests/UnitTestCase.php | UTF-8 | 853 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Dbt\Timeline\Tests;
use Carbon\Carbon;
use PHPUnit\Framework\TestCase;
class UnitTestCase extends TestCase
{
public function ts (int $minutes = 0): Carbon
{
static $now = null;
if (!$now) {
$now = Carbon::now();
}
return $now->copy()->addMinutes($... | true |
04ea7eb16da0f5a1e0153ed28d594ab6494e2805 | PHP | Johanquintero/rredsi | /app/Models/Event.php | UTF-8 | 1,449 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class Event extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'n... | true |
b992887b5740357776271c9503250b9965c4833b | PHP | DarlingXwl/TP-Basic-message-board | /application/index/controller/Index.php | UTF-8 | 2,509 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\index\controller;
use think\Controller;
use think\View;
class Index extends Controller
{
public function index(){
//调用函数
$arr = show("./mysql.txt");
if($arr){
$newarr=array_reverse($arr);
}else{
$newarr= array(array("没有数据","",""));
}
//设置时区
ini_set('date.timezone'... | true |
cfe00e718ad2b93e0f2bcd1fdb805192588cc0e5 | PHP | huize/nicePHP | /src/Request.php | UTF-8 | 5,887 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*LICENSE
+-----------------------------------------------------------------------+
| SilangPHP Framework |
+-----------------------------------------------------------------------+
| This program is free software; you can redistribute it and/or modify |
| ... | true |
de512b354a934a3ce584043f6659afce75f6baa9 | PHP | MateHelpers/LemonBundle | /Generator/ViewGenerator.php | UTF-8 | 2,206 | 2.640625 | 3 | [] | no_license | <?php
/**
* This file is part of the MateLemonBundle package.
*
* (c) Mohamed Radhi Guennichi <https://www.mate.tn> <https://github.com/MateHelpers/LemonBundle>
*
* Email: rg@mate.tn - contact@mate.tn
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with th... | true |
db779c735cf7a60638a23a047e48413654bb87e3 | PHP | leogoes/GoogleAPI | /app/Http/Controllers/GoogleController.php | UTF-8 | 1,011 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use function GuzzleHttp\json_decode;
use function GuzzleHttp\json_encode;
use phpDocumentor\Reflection\DocBlock\Tags\Return_;
class GoogleController extends Controller
{
public function jsonToPhp($json)
{
$results = json_encode($json, 15, 512);
$results =... | true |
985154de7f3bbf2c3bd34841d3467b9e190c7514 | PHP | c3rberuss/Web-Service-PHP | /application/controllers/Access.php | UTF-8 | 946 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class Access extends CI_Controller{
function index(){
$usuario = $this->input->post('usuario');
$pass = $this->input->post('password');
$result = $this->User->login($usuario, $pass);
if($result > 0){
$sesion = array(
... | true |
824ee1df17d5e77f9cd4e943595c656767907137 | PHP | EasyLinux/LesGumes | /www/_Old/liste_attente_legumes.php | UTF-8 | 5,735 | 2.703125 | 3 | [] | no_license | <?php
include_once("webmaster/define.php");
$ok=-1;/* pas identifier */
if (isset($_COOKIE['identification_amap'])) // Si la variable existe
{
$ok=0; //identifié mais déjà inscrit aux légumes
mysqli_connect(hote, login, mot_passe_sql); // Connexion à MySQL
mysqli_select_db(base_de_donnees); // Sélection de la base
... | true |
fbbdbd6fb2f72292f72e871ded4cb8b868f99fa2 | PHP | fil-blue/avcms | /src/AVCMS/Bundles/Games/Model/FeedGamesFinder.php | UTF-8 | 1,023 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* User: Andy
* Date: 09/02/15
* Time: 17:03
*/
namespace AVCMS\Bundles\Games\Model;
use AV\Model\Finder;
class FeedGamesFinder extends Finder
{
public function status($status = null)
{
if ($status !== 'pending' && $status !== 'rejected' && $status !== 'imported' && $status !== 'all') {
... | true |
3e6edbe410291c66f89e3adc963f002cb1639261 | PHP | excelwebzone/EWZFormBuilderBundle | /Model/Field.php | UTF-8 | 4,334 | 2.859375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
namespace EWZ\Bundle\FormBuilderBundle\Model;
use DateTime;
/**
* Storage agnostic field object.
*/
abstract class Field implements FieldInterface
{
// form tools
const TYPE_HEAD = 'head';
const TYPE_TEXT = 'text';
const TYPE_TEXTBOX = 'textbox';
const TYPE_TEXTARE... | true |
7bc57c6927f00dddbdd94a50974c7e313c5d0f72 | PHP | kmarshall95/main-site-mock-up | /v6.0/php/c.php | UTF-8 | 2,534 | 2.5625 | 3 | [] | no_license | <?php
if(isset($_POST['email']))
{
$email_to = "kyle28marshall@gmail.com";
$email_subject = 'BBD New Client Email';
function died($error){
echo "We are very sorry, but there were error(s) found with the form<br />";
echo "There errors appeared below.<br /><br />";
echo $error."<... | true |
ad3a092c3460ccca1437a5e6fa802ff121f630eb | PHP | bigr/newmap1 | /data/stylesheets/general/inc/utils.php | UTF-8 | 6,520 | 2.609375 | 3 | [] | no_license | <?php
require_once dirname(__FILE__)."/colors.php";
function getPixelSize($zoom) {
return 40079171.1277036*cos(0.0174532925*50)/pow(2,($zoom+8));
}
function interpolate($def,$zoom, $transport, $transportI) {
if ( !is_array($def) )
throw new Exception("Need definition");
$convert = function ($z,$a) use($tra... | true |
9e8fdd86c1d4ba5fb3d68f8fca481b193a5e2c7f | PHP | norse-blue/php-prim | /src/Extensions/Scalars/String/StringIsUrlExtension.php | UTF-8 | 1,332 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace NorseBlue\Prim\Extensions\Scalars\String;
use NorseBlue\ExtensibleObjects\Contracts\ExtensionMethod;
use NorseBlue\Prim\Types\Scalars\BoolObject;
use NorseBlue\Prim\Types\Scalars\IntObject;
use NorseBlue\Prim\Types\Scalars\StringObject;
use function NorseBlue\Prim\Functions\b... | true |
21a434b59300748ea0970d1c651e9969b46724bd | PHP | diego-mi/skeleton-front | /site/Config/Connection.php | UTF-8 | 246 | 3.015625 | 3 | [] | no_license | <?php
//File for connection, is recommended using PDO library.
function connection()
{
try
{
$pdo = new PDO('mysql:host=localhost;dbname=skeleton', 'root', '');
return $pdo;
}
catch (PDOException $e)
{
return $e->getMessage();
}
} | true |
4e25295e448cf04e29ca571b2b81ab81f568592a | PHP | Zeeshan-H/LaravelChatApp | /app/Http/Middleware/Login.php | UTF-8 | 550 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Auth;
use DB;
class Login
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, C... | true |
5758367cc3fc396726a272f6143dd65d5e4cf9bd | PHP | rdijana/kvizgradovi | /modules/kontaktPoruka.php | UTF-8 | 1,526 | 2.53125 | 3 | [] | no_license | <?php
include "../konekcija/konekcija.php";
header("Content-Type:application/json");
$podaci=null;
if(isset($_POST["send"])){
$ime=$_POST['ime'];
$prezime=$_POST['prezime'];
$email=$_POST['email'];
$poruka=$_POST["poruka"];
$greske=[];
$reImePrezime="/^[A-ZĆČŽŠĐ]{1}[a-zćčžšđ]{2... | true |
85de6048a90bc79a7a1da64cfcc142bebb031892 | PHP | callcocam/core-flexe-framework | /v1/src/Validate/Rules/MaxLength.php | UTF-8 | 546 | 2.8125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: caltj
* Date: 01/09/2018
* Time: 21:13
*/
namespace Flexe\Validate\Rules;
class MaxLength extends AbstractRules
{
protected $message = 'must be shorter than %s characters';
public function validate($key, $value, $ruleValue)
{
$this->prepare($ruleVal... | true |
5f5182da8301f25908cfc6b85cbe2764f3746993 | PHP | jcgut/AN-GCS | /script_objetos_digitales/createDigitalObjects.php | UTF-8 | 2,990 | 2.5625 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "greencore";
$password = "greencore";
$conn = new mysqli($servername, $username, $password);
$result = mysqli_query($conn, "SELECT * from isad_g_clean.unidades_descriptivas_h2 where Codigo='CR-AN-AH-PREP-DPRES-EXPFTG'");
sqlToCSV($result);
function sqlToCSV($queryResult){
... | true |
a45117eab7ec80b5d9959a9832245f250e2f80a3 | PHP | znarf/blogmarks3 | /classes/registry.php | UTF-8 | 1,326 | 2.75 | 3 | [] | no_license | <?php namespace blogmarks;
class registry
{
static $services = [];
static function service($name)
{
if (isset(self::$services[$name])) {
return self::$services[$name];
}
else {
return self::$services[$name] = blogmarks::instance("\\blogmarks\\service\\{$name}");
}
}
static $mod... | true |
e25bcfec8c04408bf6e5ca667e58a115dcefbe0c | PHP | yuandehong/laravel-smart | /database/migrations/2017_10_20_100900_create_sys_func_privilege_table.php | UTF-8 | 707 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSysFuncPrivilegeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sys_fu... | true |
b93b2b98605ad833f76c26913fc1837a83e8f634 | PHP | webdev498/laravel-marionette-tutora | /app/Observers/ImageObserver.php | UTF-8 | 510 | 2.65625 | 3 | [] | no_license | <?php namespace App\Observers;
use App\Image;
use App\FileHandlers\Image\ImageUploader;
class ImageObserver
{
/**
* @var ImageUploader
*/
protected $uploader;
/**
* Create an instance of the observer.
*
* @param ImageUploader $uploader
*/
public function __construct(
... | true |
158fc4eb616029cf323f83a56d0fb6dcac4bc4df | PHP | kabachello/phpOLAPi | /src/phpOLAPi/Xmla/Metadata/CellData.php | UTF-8 | 1,440 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of phpOlap.
*
* (c) Julien Jacottet <jjacottet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace phpOLAPi\Xmla\Metadata;
use phpOLAPi\Metadata\CellDataInterface;
use phpOLAPi\Xmla\Metada... | true |
738ab93dd3021c45e05cb658d953189fd663bec8 | PHP | Ognestraz/lumen-admin | /model/Traits/Path.php | UTF-8 | 350 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php namespace Model\Traits;
trait Path {
static public function findPath($path, $act = true, $fail = false)
{
$model = self::where('path', '=', $path == '/' ? '' : $path);
if (isset($act)) {
$model->where('act', $act);
}
return $fail ? $model->firstOrFail() : ... | true |
edf3cd7ffa032637fa3400425e94afba04e5446f | PHP | operaantap/ajax | /oop.php | UTF-8 | 1,218 | 4.125 | 4 | [] | no_license | <?php
//creating a Class
class cars{
//creating it's properties(variables)
public $colour="blue";
public $speed=100;
//creating it's method(functions)
function get_colour() {
return $this->colour;
}
function set_colour($colour) {
$this->colour = $colour;
}
... | true |
0e0eb057c2d8c40e4e2f9199d4b9fba900c59bb0 | PHP | icultivator/notebook | /protected/models/User.php | UTF-8 | 4,039 | 2.625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "{{user}}".
*
* The followings are the available columns in table '{{user}}':
* @property string $id
* @property string $username
* @property string $password
* @property string $email
* @property string $avatar
* @property string $contact
* @property string $reg... | true |
f65ab0067e8ff9d9dd1a18e294d1214411cc79b5 | PHP | nTrouvain/Quest | /PageAcceuilCampagne.php | UTF-8 | 1,949 | 2.515625 | 3 | [] | no_license | <?php
require('connect_to_quest.php');
?>
<!doctype html>
<html>
<?php require_once "head.php";
$idCampagne = $_GET['id'];
$requete = $BDD->prepare('select * from campagne where camp_id=?');
$requete->execute(array($idCampagne));
$campagne = $requete->fetch();
$stmt = $BDD->prepare('select * from questaire where... | true |
34d173b1afafbe23616975324e74d9d5fb024003 | PHP | rogerapras/laravel-repository | /src/Torann/LaravelRepository/AbstractValidator.php | UTF-8 | 2,136 | 2.875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php namespace Torann\LaravelRepository;
use Illuminate\Validation\Factory;
abstract class AbstractValidator
{
/**
* The Validator instance
*
* @var \Illuminate\Validation\Factory
*/
protected $validator;
/**
* Inject the Validator instance
*
* @param \... | true |
2ee96b28c8b7514b792f83d6494d0c5642eed7e6 | PHP | nattsdaff/DH-FS-Clases | /PHP/Clase14/ejercitacion/Banco/Entidades/Clientes/Pyme.php | UTF-8 | 833 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
class Pyme extends Cliente implements Liquidable
{
private $CUIT;
private $razonSocial;
public function __construct(Cuenta $cuenta, $email, $pass, $CUIT, $razonSocial)
{
parent::__construct($cuenta, $email, $pass);
$this->CUIT = $CUIT;
$this->razonSocial = $razonSocial;
}
p... | true |
9ad43e2c904449ff081b55b4b267215bea7a85ba | PHP | rougin/windstorm | /tests/Eloquent/UpdateTest.php | UTF-8 | 546 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Rougin\Windstorm\Eloquent;
/**
* Update Test
*
* @package Windstorm
* @author Rougin Gutib <rougingutib@gmail.com>
*/
class UpdateTest extends TestCase
{
/**
* Tests UpdateInterface::set.
*
* @return void
*/
public function testSetMethod()
{
$expected = 'u... | true |
f1fc993ed62f2711c9aef3b0079dba0118ce159d | PHP | arbory/arbory | /src/Admin/Widgets/Breadcrumbs.php | UTF-8 | 1,613 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Arbory\Base\Admin\Widgets;
use Arbory\Base\Html\Html;
use Illuminate\Support\Collection;
use Illuminate\Contracts\Support\Renderable;
/**
* Class Breadcrumbs.
*/
class Breadcrumbs implements Renderable
{
/**
* @var Collection
*/
protected $items;
/**
* Breadcrumbs constr... | true |
f7d904b36b3630a94cff2ce69c9b5f0c8ff6679f | PHP | RobertGard/OOP-MVC-SHOP | /components/Router.php | UTF-8 | 2,423 | 3.171875 | 3 | [] | no_license | <?php
/*
* Получение адреса из url и подключение нужных файлов
*/
/**
* Description of Router
*
* @author wakka
*/
class Router {
public $routes;
public function __construct() {
$this->routes = include (PathPrefix.'/config/routes.php');
}
//Получение данных из URI
... | true |
a7fb79fe29b18344bb81aabcf6446b025e801c93 | PHP | guidepilot/php-lottie | /examples/dotLottie_readMeta.php | UTF-8 | 454 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
use GuidePilot\PhpLottie\DotLottieFile;
require_once '../vendor/autoload.php';
$file = new DotLottieFile('animation.lottie');
foreach ($file->getAnimations() as $aAnimation) {
echo "Animation Id: {$aAnimation->getId()}".PHP_EOL;
echo "Size: {$aAnimation->getWidth()}x{$aAnimation->getHeight()}".PHP_EOL... | true |
7ce69e55c10b5d6043b13c132859106fda41b260 | PHP | gumonet/hytorc-encuestas | /process-request.php | UTF-8 | 1,038 | 2.609375 | 3 | [] | no_license | <?php
require_once './includes/class-gm-Database.php';
require_once './includes/class-gm-mailer.php';
$post = $_POST;
if( isset( $post['action'] ) ) {
$controller = new GMDatabase();
switch ( $post['action'] ) {
case 'save_register':
//Validar que la factura, no esté registrada
$tipo_encuesta = $_POST['tip... | true |
277539bfa8e7e7ab847e66329ef51619ac8ea618 | PHP | alexzer0/inkatours | /mkt/admin/addons/surveys/api/surveys.php | UTF-8 | 19,191 | 3.171875 | 3 | [] | no_license | <?php
/**
* Addons_surveys_api
* API functions for surveys
*/
class Addons_survey_api extends API
{
/**
* Holds the different question types. Values are loaded in __construct
* @var Array
*/
public $question_types;
/**
* Holds values set using __set
* @var Array
*/
private $data = array();
/**
... | true |
6c90811c988670a8e784391bcf1fcce35765f71b | PHP | fbsoftware/alberi-1.4.2 | /z-garbage/mail2.php | UTF-8 | 2,078 | 2.671875 | 3 | [] | no_license | <?php
// definisco mittente e destinatario della mail
$nome_mittente = "Mio Nome";
$mail_mittente = "mittente@sito.com";
$mail_destinatario = "fbsoftware@libero.it";
// definisco il subject
$mail_oggetto = "Messaggio di prova";
// definisco il messaggio formattato in HTML
$mail_corpo = <<<HTML
<html>
<head>
<title>... | true |
4b726cb68a6c350b41ac392bfc031e63f56d9661 | PHP | kvinagui7/PHP-Calculator | /index.php | UTF-8 | 1,591 | 3.4375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Calculator</title>
</head>
<body>
<form method="post">
<input type="text" name="$x" placeholder="Number 1">
<input type="text" name="$y" placeholder="Number 2">
<select name="operator">
<option>None</opt... | true |
67b76c07454305e310c5ae5b15099559da8afc20 | PHP | delinktech/ssm | /routes/api.php | UTF-8 | 5,122 | 2.515625 | 3 | [
"ISC"
] | permissive | <?php
use Illuminate\Http\Request;
use Carbon\Carbon;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by... | true |
329fad13b5f5d08e955fdaac50347ae2953b151b | PHP | ram-izaap/GPS | /application/helpers/common_helper.php | UTF-8 | 1,823 | 2.78125 | 3 | [] | no_license | <?php
function is_logged_in()
{
$CI = get_instance();
$user_data = get_user_data();
if( is_array($user_data) && $user_data )
return TRUE;
return FALSE;
}
function get_user_data()
{
$CI = get_instance();
if($CI->session->userdata('user_data'))
{
retur... | true |
bea193ea59ff6a2ceceebfae10ddc68f1b6d6327 | PHP | xavierauana/cms | /src/Plugin/Plugin.php | UTF-8 | 2,764 | 2.671875 | 3 | [] | no_license | <?php
/**
* Author: Xavier Au
* Date: 2019-07-12
* Time: 20:19
*/
namespace Anacreation\Cms\Plugin;
use Illuminate\Console\Application as Artisan;
class Plugin
{
/**
* @var string
*/
private $pluginName;
/**
* @var string
*/
private $entryPath;
/**
* @var string
... | true |
3cc3ac3dd5e224f1408eaf67bff3481f41366e09 | PHP | DustinHartzler/PharmToTable | /wp-content/plugins/thrive-leads/thrive-dashboard/inc/automator/actions/class-facebook-event-custom-action.php | UTF-8 | 2,085 | 2.515625 | 3 | [] | no_license | <?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-dashboard
*/
namespace TVE\Dashboard\Automator;
use Thrive\Automator\Items\Action;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class Facebook_Event_Custom extends Action {
protected $event_name;
protected $custom_fiel... | true |
29384afeca80cffd76be703f10f1e1c603de221f | PHP | masterx2/Commander | /src/Commander/Base.php | UTF-8 | 1,360 | 3.046875 | 3 | [] | no_license | <?php
namespace Commander;
use Exception;
use Requests;
class Base {
public $options;
public function __construct($options=[]) {
$this->options = $options;
}
public function getParam($name) {
return isset($this->options[$name]) ? $this->options[$name] : null;
}
/**
* ... | true |
2317de6c74df0bab16e06109dc19fb3c3668cd25 | PHP | mestryaditya13/roadside_vehicle_assistance | /includes/registration.php | UTF-8 | 3,271 | 2.53125 | 3 | [] | no_license | <html>
<head>
<title>Registration page</title>
<link type="text/css" rel="stylesheet" href="reg.css" />
<style>
/* Full-width inputs */
input[type=email],input[type=text],input[type=tel], input[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px soli... | true |
5e6827e0895d7bb8be82dd68d451a74b52033bbb | PHP | szeber/yapep_base | /src/Exception/RedirectException.php | UTF-8 | 719 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace YapepBase\Exception;
/**
* RedirectException class.
*
* Not descendant of YapepBase\Exception\Exception, and it should only be catched by the Application
* or a controller if necessary.
*/
class RedirectException extends \Exception
{
const TYPE_INTERNAL = 1;
const... | true |
01cd9eb9e4d610335473c1ddd850130435dbcc68 | PHP | freadblangks/Website | /src/10/WarCry CMS by jump-cms/engine/core_modules/forums.parser.php | UTF-8 | 49,243 | 2.65625 | 3 | [] | no_license | <?php
if (!defined('init_engine'))
{
header('HTTP/1.0 404 not found');
exit;
}
/**
* SSBBCodeParser
*
* BBCode parser classes.
*
* @copyright (C) 2011 Sam Clarke (samclarke.com)
* @license http://www.gnu.org/licenses/lgpl.html LGPL version 3 or higher
*
* @TODO: Have options for limiting nes... | true |
2969f1df78f688419f2b3bd2f65d0fca99a95d96 | PHP | onshop/beegame | /src/Game/Bee/Queen.php | UTF-8 | 160 | 2.546875 | 3 | [] | no_license | <?php
namespace Game\Bee;
class Queen extends AbstractBee
{
protected $lifeSpan = 100;
protected $hitDeduction = 8;
protected $type = 'Queen';
} | true |
a64cc30fe9b36b8986d90dc2a1aaf2c8b60884c9 | PHP | 1992abdo/Porte-Folio | /confing/update.php | UTF-8 | 3,833 | 2.515625 | 3 | [] | no_license | <?php
session_start();
?>
<!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>Update product</title>
<link rel="stylesheet" href="https://use.fontawesome.... | true |
70395949b9490771159b448def6dabbdcbef1fe2 | PHP | P79N6A/hd | /.svn/pristine/70/70395949b9490771159b448def6dabbdcbef1fe2.svn-base | UTF-8 | 1,445 | 2.640625 | 3 | [] | no_license | <?php
class DeptController extends InteractionBaseController {
public function initialize()
{
parent::initialize(); // TODO: Change the autogenerated stub
}
/**
* 获取所有部门并建树
*/
public function getDeptAction(){
$channel_id = intval(Request::getQuery('channel_id','int',1));
... | true |
7b54b393ba8a6809f52d8cdefefef2f413dca963 | PHP | taichunmin/UnitTest-20180731-OTP | /src/RsaTokenDao.php | UTF-8 | 263 | 2.734375 | 3 | [] | no_license | <?php
namespace OTP;
interface IToken
{
public function getRandom(string $account) : string;
}
class RsaTokenDao implements IToken
{
public function getRandom(string $account) : string
{
return sprintf('%06d', mt_rand(0, 999999));
}
}
| true |
e32efb28a92f0421dd313ca7d2257bccea76c5bd | PHP | elu-dev/weeber | /controllers/utils.php | UTF-8 | 225 | 2.625 | 3 | [] | no_license | <?php
function sanity_check($data, $flag=TRUE) {
$data = trim($data);
if ($flag) $data = stripslashes($data);
else $data = str_replace("\\", "\\\\", $data);
$data = htmlspecialchars($data);
return $data;
} | true |
a8bcea2f5a0fb839bfa368259303bbaf4d1f2c6a | PHP | chequeado/vos-y-cuantos-mas | /app/Http/Controllers/Backend/StatsController.php | UTF-8 | 900 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Repositories\Backend\Category\CategoryRepositoryContract;
/**
* Class StatsController
* @package App\Http\Controllers\Backend
*/
class StatsController extends Controller
{
protected $categorie... | true |
736997bd2e5f32144df102ad3167766b52c0cd6b | PHP | Eneylton/php-carrinho-2 | /index.php | UTF-8 | 1,002 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Carrinho</title>
</head>
<body>
<?php
require("conexao.php");
$resultado = '';
$sql = my... | true |
077ba8594b9c9b99d46b327c3d067392adbf99cf | PHP | octalmage/wib | /php-7.3.0/ext/standard/tests/array/array_map_basic.phpt | UTF-8 | 1,275 | 3.703125 | 4 | [
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing",
"MIT"
] | permissive | --TEST--
Test array_map() function : basic functionality
--FILE--
<?php
/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
* Description: Applies the callback to the elements of the given arrays
* Source code: ext/standard/array.c
*/
echo "*** Testing array_map() : basic functi... | true |
6423135a6ef1d1ae2de3d03aa131e1b2a954ba3c | PHP | SagLara/ArdAccess | /login/controller_ConsultUsr.php | UTF-8 | 675 | 2.640625 | 3 | [] | no_license | <?php
require 'conexion.php';
$idUser="";
$idUser = $mysqli->real_escape_string($_POST['idUser']);
$sql = "SELECT IDUSER,NOMBRE,FECHA_Registros FROM users WHERE IDUSER='$idUser'";
$resultado=$mysqli->query($sql);
if ($resultado->num_rows > 0) {
echo "<table class='table table-bordered table-... | true |
78979c28b68bdaf16e75dfd11effce05a36d6f6b | PHP | qingzhong110/Lge | /src/system/default/_ctl/Gitdeploy.class.php | UTF-8 | 5,596 | 2.671875 | 3 | [] | no_license | <?php
/**
* Git方式自动部署程序到服务器。
* 使用说明:
* 1、项目客户端应当已经保存密码;
* 2、如果是ssh push那么应当保证客户端与服务端已经通过ssh的authorized_keys授权,或者,安装sshpass工具,并在配置文件中对服务器指定密码;
* 3、在项目根目录下执行;
* 配置文件格式如下:
*
* array(
* '配置项名称' => array(
* array('服务器地址', '默认push分支名称', 'ssh push用户对应的服务器密码(非必须)')
* ),
* );
*
* @author john
*/
... | true |
7cac91301b4bf56ffc0faa389a9acf18216801c8 | PHP | lohuvie/zhaibuqi | /vo/Fan.php | UTF-8 | 1,463 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: Lohuvie
* Date: 13-5-19
* Time: 上午12:12
* To change this template use File | Settings | File Templates.
*/
class Fan {
public $portrait;
public $id;
public $af_id;
public $href;
public $name;
public $academy;
public $status;
func... | true |
fa983433d00c53e83840e4805c88551056c276c5 | PHP | andreaskasper/alexa-php-endpoint | /examples/01_hello-world.php | UTF-8 | 195 | 2.6875 | 3 | [] | no_license | <?php
/*
* This is a easy example for Alexa to say "Hello World!"
*/
require_once(__DIR__."/../src/Response.php");
$r = new \Alexa\Endpoint\Response();
$r->say("Hello World!");
$r->send();
| true |
09ad87e2ac22c2b000de0fe0709ad87bfeb586c4 | PHP | MercerMorning/carsharing | /src/Rate.php | UTF-8 | 1,915 | 3.578125 | 4 | [] | no_license | <?php
namespace App;
/**
* Класс с основными свойствами и методами, которые имеются во всех тарифах
*/
abstract class Rate implements RateInt
{
/**
* Стоимость услуги "Дополнительный водитель"
*/
const COST_OF_DRIVER = 100;
/**
* Стоимость услуги gps за час
*/
const GPS_PRICE_FO... | true |