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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d73ece39b64ef9f2d41fa8aba8da42a3083a423c | PHP | antitoine/croissants-bringer | /src/AppBundle/Enum/UserPreferenceEnum.php | UTF-8 | 3,592 | 2.765625 | 3 | [] | no_license | <?php
namespace AppBundle\Enum;
abstract class UserPreferenceEnum
{
const PREFERENCE_1_CROISSANTS = "1 croissant";
const PREFERENCE_2_CROISSANTS = "2 croissants";
const PREFERENCE_1_PAIN_AU_CHOCOLAT = "1 pains au chocolat";
const PREFERENCE_2_PAIN_AU_CHOCOLAT = "2 pains au chocolat";
const PREFER... | true |
7b2aff7e770bb7afcc10dd12f16b5364513dbe84 | PHP | giorgiosironi/eris | /examples/StringTest.php | UTF-8 | 1,909 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
use Eris\Generators;
use Eris\Listeners;
function string_concatenation($first, $second)
{
if (strlen($second) > 5) {
$second .= 'ERROR';
}
return $first . $second;
}
class StringTest extends \PHPUnit\Framework\TestCase
{
use Eris\TestTrait;
public function testRightIdentityElement(... | true |
c5dab4a8d3e9de6acbe756ac7d2ed665449606b6 | PHP | maivantuit/php-learning | /Học Web Thầy Quang/Baitapchuyendoidiem10sang4/proccess.php | UTF-8 | 1,043 | 2.71875 | 3 | [] | no_license | <?php
$hoten = $_REQUEST["hoten"];
$masinhvien = $_REQUEST["masinhvien"];
$monhoc = $_REQUEST["monhoc"];
$thangdiem = $_REQUEST["thangdiem"];
// echo $hoten;
// echo $masinhvien;
// echo $monhoc;
// echo $thangdiem;
if(isset($hoten) && isset($masinhvien)&& isset($monhoc)&& isset($thangdiem)){
echo "Họ Tên: $hoten... | true |
e4b11fceb202d0c3c93960d77230d7267b434eac | PHP | CCAtAlvis/HyperLocal | /controller/fetch.question.nearby.php | UTF-8 | 1,560 | 2.59375 | 3 | [] | no_license | <?php
require './controller/db.php';
// header('Content-Type: application/json');
$res = [];
try {
$latitude = $_POST['latitude'] ?? false;
$longitude = $_POST['longitude'] ?? false;
if(!$latitude || !$longitude) {
$res['status'] = "ERROR";
$res['message'] = "Some fields are missing";
... | true |
79edcbd66280670340a18aca01c5712291adbdd9 | PHP | aniskchaou/PFE2013-ECOMMERCE-CAKEPHP | /app/View/Produits/admin_remise.ctp | UTF-8 | 287 | 2.625 | 3 | [] | no_license |
<table width="300"><tr bgcolor="orange" ><td>nom</td><td>ancien prix</td><td>nouveau prix</td></tr>
<?php
foreach($remise as $r)
{
echo "<tr><td>".$r['Produit']['nom']."</td>";
echo "<td>".$r['Produit']['prix']."</td>";
echo "<td>".$r['Produit']['nprix']."</td></tr>";
}
?>
</table> | true |
a2cc290528b50ef4082ef4422528b813014eb5e1 | PHP | marcinkoczan/Json-from-file-parser | /src/Parser/Helper/DataParser.php | UTF-8 | 2,587 | 3.296875 | 3 | [] | no_license | <?php
namespace Parser\Helper;
class DataParser
{
/** @var \stdClass */
private $data;
/** @var \stdClass[] */
private $result;
/**
* @param \stdClass $data
*/
public function __construct(\stdClass $data)
{
$this->setData($data);
$this->parseData();
}
p... | true |
7e177ca709288a9be13ebbd1a6c679963a24fdcf | PHP | hccdj131/php | /tp5_教程/原生操作数据.php | UTF-8 | 894 | 2.96875 | 3 | [] | no_license | <?php
namespace app\index\controller;
use think\Db;
class Index
{
public function index()
{
return '<h2>欢迎来到PHP中文网学习</h2>';
}
public function demo()
{
//1.查询操作:工资大于4000元的员工信息,用命名占位符进行参数绑定
$sql = "select name,salary,dept from staff where salary > :salary";
$result = Db::query($sql,['salary'=>4... | true |
d3c7f17d59245b08af8b58621d3334e5dc5c2a82 | PHP | ruszakh/php1-2 | /equation.php | UTF-8 | 1,204 | 3.640625 | 4 | [] | no_license | <?php
include __DIR__ . '/discriminant.php';
$a = 4;
$b = 7;
$c = 3;
$d = discriminant($a,$b,$c);
?>
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>PHP1-2</title>
</head>
<body>
<nav>
<a href="/table.php">Таблица истинности</a> |
<a href="/equation.php">Решение уравнений</a> ... | true |
7a7a6213832c164b94804f5b1ed8537fbcea83ba | PHP | comhon-project/comhon | /src/Comhon/Serialization/ValidatedSerializationUnit.php | UTF-8 | 3,903 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Comhon package.
*
* (c) Jean-Philippe <jeanphilippe.perrotton@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Comhon\Serialization;
use Comhon\Object\UniqueObject;
use Com... | true |
eeaf29ac019add232a71a3857f5ca18938ad283f | PHP | yeminiCodeur/Blog | /haidara/corfblog/model/Operation.class.php | UTF-8 | 3,194 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Abouba
* Date: 27/03/2017
* Time: 19:25
*/
class Operation {
public function __construct(){
}
public function inTable($db,$table_name)
{
return $db->myQuery("SELECT COUNT(*) as id FROM $table_name ")->fetch();
}
public function addColo... | true |
bbfb6f2b223c3d4786b0a2ff84c28fd7cb4b945e | PHP | kyleesantos/Avocado | /getRequests.php | UTF-8 | 1,053 | 2.8125 | 3 | [] | no_license | <?php
include_once './db_functions.php';
//Create Object for DB_Functions clas
$db = new DB_Functions();
//Get JSON posted by Android Application
$json = $_POST["getRequests"];
//Remove Slashes
if (get_magic_quotes_gpc()){
$json = stripslashes($json);
}
//Decode JSON into an Array
$data = json_decode($json);
//Ut... | true |
20be576b99ccecde7b9ebb88b0105b9ec7c9ec07 | PHP | richtestani/GH | /RichApp/Controller/Admin/Categories.php | UTF-8 | 6,357 | 2.515625 | 3 | [] | no_license | <?php
namespace RichApp\Controller\Admin;
use RichApp\Controller;
use RichApp\Model;
use RichApp\Library;
/*
* Author: Richard Testani
* Designed For
* Contact me at: richtestani@mac.com or @sandman25
* See more about what I've done: http://www.richtestani.com
*/
/**
* Description of Pages
*
* @author Richard ... | true |
cc29a659da5da79260710af34c8a83e28cda0fc6 | PHP | 1codehappy/laravel-api | /app/Backend/Api/User/Transformers/UserTransformer.php | UTF-8 | 2,097 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Backend\Api\User\Transformers;
use App\Backend\Api\Acl\Transformers\PermissionTransformer;
use App\Backend\Api\Acl\Transformers\RoleTransformer;
use App\Domain\User\Models\User;
use App\Support\Core\Concerns\Transformers\AddsTransformerCapabilities;
use League\Fractal\Resource\Collection;
use Leag... | true |
5010fd9fbfd4301a366b15aff75a3fab764ea54a | PHP | mafeosza/awaap | /modelos/Modelo.php | UTF-8 | 623 | 3.03125 | 3 | [] | no_license | <?php
class Modelo
{
protected $conexion;
protected $host;
protected $db_name;
protected $username;
protected $password;
function __construct()
{
$host = "localHost";
$db_name = "awaap";
$username = "root";
$password = "root";
try {
$this->conexion = new PDO("mysql:host={$host};dbn... | true |
983f5856d1886a796d956953c3dd1e352171374a | PHP | navarrete1985/dwse | /tema1/dql/ejemplo1.php | UTF-8 | 1,188 | 2.75 | 3 | [] | no_license | <?php
require 'classes/vendor/autoload.php';
require 'classes/Alumno.php';
require 'classes/Bootstrap.php';
$bootstrap = new Bootstrap();
$gestor = $bootstrap->getEntityManager();
/*$alumno = new Alumno();
$alumno->setNombre('Pepita');
$gestor->persist($alumno);
$alumno2 = new Alumno();
$alumno2->setNombre('Jaimit... | true |
d0ab29f042bd7096a8ef0bd68e39fcc00c9f7df8 | PHP | ggarfra90/sst | /controlador/commons/generadorPdf/plantillas/ReporteEvento.php | UTF-8 | 2,005 | 2.5625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
require_once __DIR__.'/../../../../vistas/script/ScriptBase.php';
require_once __DIR__.'/../../../../util/Util.php';
class ReporteEvento extends ScriptBase{
const COMPONENT_CODE = 'reporte.pdf.evento... | true |
5db530464bf6ec444d0664149047e9c72b5fa392 | PHP | yallungrai277/VueNotes | /app/Filters/FilterAbstract.php | UTF-8 | 551 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Filters;
use Illuminate\Support\Arr;
use Illuminate\Database\Eloquent\Builder;
abstract class FilterAbstract
{
abstract public function filter(Builder $builder, $value);
public function mappings()
{
return [];
}
public function resolveFilterValue($key)
{
... | true |
4504f11a49dd295f5b2d628323aea22560a2599a | PHP | Eskyee/liquid-assets-for-woocommerce | /includes/WCLAElementsClient.php | UTF-8 | 3,393 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Implements a small subset of Elements RPC methods.
*
* @see https://elementsproject.org/en/doc/0.18.1.11/rpc/
*/
class WCLAElementsClient {
protected $host;
protected $payload = [];
protected $args = [];
/**
* WCLAElementsClient constructor.
*
* @param $rpcHost
* @param $rpcUser
* @pa... | true |
6eb9bfe8c83996946885c9687b9c327159439ff6 | PHP | interactive-one/shoutem-api-vip | /model/class-shoutem-events-dao.php | UTF-8 | 3,684 | 2.890625 | 3 | [] | no_license | <?php
require_once plugin_dir_path( __FILE__ ) . 'class-shoutem-events-calendar-dao.php';
require_once plugin_dir_path( __FILE__ ) . 'class-shoutem-events-manager-dao.php';
/**
* Multiplexed State pattern. See this->providers for a list of states.
*/
class ShoutemEventsDao extends ShoutemDao {
public function _... | true |
755fbb27a9e30ac3539a464fcab29b759b58c5df | PHP | cgerman89/BI | /app/Repositorio/RolPermisosRepositori.php | UTF-8 | 2,529 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Repositorio;
use Caffeinated\Shinobi\Models\Permission;
use Caffeinated\Shinobi\Models\Role;
use DB;
class RolPermisosRepositori {
public static function store($name, $slug, $description, $special, $permissions = [] ){
$role = new Role();
$role->name = $name;
... | true |
3faf75e1c711a9fcd49db92da41ae7ae22cbaafe | PHP | ruslankus/startgen | /components/widgets/MenuWidget.php | UTF-8 | 1,739 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ruslankus
* Date: 07/08/16
* Time: 15:47
*/
namespace app\components\widgets;
use app\models\Languages;
use yii\base\Widget;
use app\models\Menu;
use yii\helpers\Url;
class MenuWidget extends Widget
{
public $page_label;
public function run()
{
$m... | true |
cc338387aafee42c303e7e82785364732c6d140a | PHP | dudapetrich/estudo_dirigido2 | /2estudodirigido19.php | UTF-8 | 294 | 4.21875 | 4 | [] | no_license | <?php
//19. A série de Fibonacci é formada pela sequência 0,1,1,2,3,5,8,13,21,34,55, [...] Faça um programa que gere a série até que o valor seja maior que 500.
$n1=1;
$n2=0;
print " 0";
for($i=0; $i<=14; $i++){
$fibonacci= $n1 + $n2;
print "\n $fibonacci";
$n1=$n2;
$n2= $fibonacci;
}
| true |
c3b4a7419abcdf87762cc6b7ac928dcb3180adcb | PHP | farhanmb02/pw2021_203040128 | /pertemuan 13/ajax/ajax_cari.php | UTF-8 | 735 | 2.6875 | 3 | [] | no_license | <?php
require '../function.php';
$mahasiswa = cari($_GET["keyword"]);
?>
<table border="1" cellpadding="10" cellspacing="0">
<tr>
<th>No.</th>
<th>Gambar</th>
<th>Nama</th>
<th>Info</th>
</tr>
<?php if(empty($mahasiswa)) :?>
<tr>
<td colspan="4">
<p>Data Mahasiswa tida... | true |
fa857ee2551125baf33af2d7e173d493dca710b8 | PHP | iplayguitar81/symfony4-take2 | /src/EventListener/RedirectAfterRegistrationSubscriber.php | UTF-8 | 1,509 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: iplayguitar81
* Date: 6/30/19
* Time: 7:24 PM
*/
namespace App\EventListener;
use FOS\UserBundle\Event\FormEvent;
use FOS\UserBundle\FOSUserEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use ... | true |
6f77d1671443b49caa51ca6eef646574f4746122 | PHP | cubiche/cubiche | /src/Cubiche/Core/Storage/Exception/WriteException.php | UTF-8 | 785 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Cubiche package.
*
* Copyright (c) Cubiche
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cubiche\Core\Storage\Exception;
use RuntimeException;
use Exception;
/**
* WriteExceptio... | true |
b955eaa076a5bad77443d77f3a9c0033467331d9 | PHP | adkrainov/patterns | /Composite/CVSElement.php | MacCyrillic | 353 | 3.03125 | 3 | [] | no_license | <?php
/**
*
*/
abstract class CVSElement
{
public $id;
public function __construct($id)
{
$this->id = $id;
}
abstract public function add(CVSElement $element);
abstract public function remove(CVSElement $element);
abstract public function display();
} | true |
5377e95e20d0822920dd0516203e3f8ca96e358f | PHP | RhodriOwainDavies/total-tools-m2 | /app/code/Temando/Temando/Ui/Component/Listing/Column/ShipmentActions.php | UTF-8 | 4,266 | 2.546875 | 3 | [] | no_license | <?php
namespace Temando\Temando\Ui\Component\Listing\Column;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;
use Magento\Framework\UrlInterface;
class ShipmentActions extends Column
{
/**
... | true |
5e99a4a8f6fa1236312fe90722116364db7b925a | PHP | mikislidstrom/City-Of-Assassins | /php/login/index.php | UTF-8 | 5,650 | 3.046875 | 3 | [] | no_license | <?php
/**
* The index page that handles the POST methods regarding login and register features
* and returns JSON data depending on which tag and other parameters are entered
* @author Johan Nilsson
**/
if (isset($_POST['tag']) && !empty($_POST['tag'])) {
// get tag
$tag = $_POST['tag'];
// include db ... | true |
bed8b8d89d1e6601df1c73c1544db649795d937c | PHP | fan-tak-sato/programming-exercises | /php/php4-5/array_iterator.php | UTF-8 | 468 | 3.28125 | 3 | [] | no_license | <?php
$real = new ArrayIterator( array("S" => "Clark Kent", "S" => "Bruce Wayne", "I" => "Tony Stark") );
$superhero = new ArrayIterator( array("Superman","Batman","Iron Man") );
$team = new MultipleIterator();
$team->attachIterator($real);
$team->attachIterator($superhero);
foreach($team as $item) {
var_... | true |
fab8785fd59b68418006b875ab8d7ce77f5c67c5 | PHP | BFriend27/PHP_site | /src/arraySort.php | UTF-8 | 315 | 2.96875 | 3 | [] | no_license | <?php
// Сортировка массива, применяется для функции showMenu
function arraySort(array $array, $key, $sort): array
{
usort($array, function($a, $b) use ($sort, $key) {
return $sort == SORT_ASC ? $a[$key] <=> $b[$key] : $b[$key] <=> $a[$key];
}
);
return $array;
} | true |
4479f052c3ef77385b2434c752c2bbcdeb164711 | PHP | FiveChen00/GHCinema | /GHCinemaAdmin/protected/components/helpers/EHtml.php | UTF-8 | 11,268 | 2.734375 | 3 | [] | no_license | <?php
/**
* EHtml class file.
*
* @link http://www.mtel-solutions.com/
* @copyright Copyright © 2011 MTel solution
*/
class EHtml extends CHtml {
/**
* Generates the data suitable for list-based HTML elements (Tree style).
* parent_id is required
* The generated data can be used in {@link dropDownList... | true |
9a09b11c398b51f9e91fe5404ae69c071a8b6ad1 | PHP | wexnox/WEB1000 | /innlevering3/sok.php | UTF-8 | 4,668 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: wexnox
* Date: 21.02.2016
* Time: 20.46
*/
include ("start.html");
?>
<div class="row">
<div class="col-md-4">
<form method="post" id="sokeSkjema" name="sokeSkjema">
<div class="form-group">
<h4>Søkestreng</h4>
<input class="form-co... | true |
7831cbae7a6cae51d5eb78580675d4f692476771 | PHP | Sfullen96/TradeworthyCRM | /classes/Config.php | UTF-8 | 1,077 | 3.53125 | 4 | [] | no_license | <?php
/*
* Allows us to access config array
* Sam Fullen
* 11/12/16
*/
class Config {
// Get path to config element in config array
public static function get($path = null) {
if ($path) {
$config = $GLOBALS['config'];
// Explode the path that is passed e.g.
// if Config::get('mysql/host') is called
... | true |
839b51959f76431cb22b2392a743f458b6ea06c6 | PHP | ricardorohde/cwk_old | /dashboard/controller/salvar-disciplina.php | UTF-8 | 1,813 | 2.5625 | 3 | [
"MIT"
] | permissive | <br>
<?php
$id_disciplina = @$_REQUEST['id_disciplina'];
$nome_disciplina = @$_REQUEST['nome_disciplina'];
$sala_id_sala = @$_REQUEST['sala_id_sala'];
$professor_id_professor = @$_REQUEST['professor_id_professor'];
$nome_disciplina = @$_REQUEST['nome_disciplina'];
$turno_disciplina = @$_REQUEST[... | true |
a6413811975ff1c1bdf21476eb6e6e3534b03cdd | PHP | AL3X09/appphppuro | /modelos/modelo.php | UTF-8 | 493 | 2.640625 | 3 | [] | no_license | <?php
require_once './config/conexion.php';
/**
*
*/
class Modelo extends Conexion
{
function __construct()
{
parent:: __construct();
}
//traigo todos los usuarios
public function getDatos()
{
$result = $this->_db->query('SELECT * FROM usuarios');
$usuarios=$result->fetch_all(MYSQLI_ASSOC);
return $u... | true |
6ba151befe46a6c5577cbf89234f54feb5dcaa06 | PHP | gf41590/t03 | /src/Controller/Test2Controller.php | UTF-8 | 1,253 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use App\Repository\ArticleRepository;
use Knp\Component\Pager\PaginatorInterface;
use Symfony\Component\HttpFoundation\Response;
class Test2Con... | true |
05f8fb6f1a0f553ecce1012eb835a6499f0efce9 | PHP | vukanac/tours-xml-parser | /spec/Tour/Exporters/CsvExporterSpec.php | UTF-8 | 1,419 | 2.703125 | 3 | [] | no_license | <?php
namespace spec\Tour\Exporters;
use Tour\Exporters\CsvExporter;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Tour\Entities\Departures;
use Tour\Entities\Departure;
use Tour\Entities\Tours;
use Tour\Entities\Tour;
use Money\Money;
class CsvExporterSpec extends ObjectBehavior
{
function let(Tours $... | true |
16b1e11e4da635a96029bdd627d4ee552e27d5ed | PHP | taylor-jeremy/cs313-php | /web/view_cars.php | UTF-8 | 1,169 | 3.203125 | 3 | [] | no_license | <?php
/**********************************************************
* File: view_cars.php
* Author: Jeremy Taylor
*
* Description: This file queries a
* PostgreSQL database from PHP.
***********************************************************/
include "database.php";
$db = get_db();
?>
<!DOCTYPE html>
<html>
<head>
<... | true |
2df65c97f5b0ac003e337af84d13976589562db5 | PHP | widmogrod/kontorx-ocatalog | /lekarze.krakow.pl/app/modules/user/models/RoleHasRoleResource.php | UTF-8 | 4,123 | 2.578125 | 3 | [] | no_license | <?php
require_once 'Zend/Db/Table/Abstract.php';
class RoleHasRoleResource extends Zend_Db_Table_Abstract {
protected $_name = 'role_has_role_resource';
protected $_dependentTables = array();
protected $_referenceMap = array(
'Role' => array(
'columns' => 'role_id',
're... | true |
500040d6e51f380957c82d55cd57b6ace51d3263 | PHP | anton-kuznetsov/emporium-babysuit | /adminka/app/ArticleCategories/select_articles.php | UTF-8 | 1,422 | 2.625 | 3 | [] | no_license | <?php
// Инициализация
require_once "../classes.php";
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : 25;
$sort = isset($_REQUEST['sort']) ? $_REQUEST['sort'] : '';
$dir = isset($_REQUEST['dir']) ? $_REQUEST['... | true |
8c9d72b46cf5ecb716fe47a9b3b8eede576ae3f7 | PHP | wesleyromualdo/PIM | /par3/classes/model/ObraPlanilhaOrcamentaria.class.inc | UTF-8 | 8,979 | 2.765625 | 3 | [] | no_license | <?php
/**
* Classe de mapeamento da entidade par3.obra_planilha_orcamentaria.
*
* @version $Id$
* @since 2017.07.07
*/
/**
* Par3_Model_Obra_planilha_orcamentaria: sem descricao
*
* @package Par3\Model
* @uses Simec\Db\Modelo
* @author Renner Nascentes Tanizaki <rennertanizaki@mec.gov.br>
*
* @example
* <... | true |
9dc087c46fe4a83dc15173e1d05a774b89a8b174 | PHP | RyanIngersoll/blog.dev | /app/views/roll-dice.php | UTF-8 | 235 | 2.984375 | 3 | [
"MIT"
] | permissive | <<!DOCTYPE html>
<html>
<head>
<title>rolldice</title>
</head>
<body>
<h1>Hello, <?php echo "the dice rolled " . $num . " and your guess was " . $guess; ?></h1>
<h2>you <?= ($guess == $num) ? 'win' : 'lose'; ?>!</h2>
</body>
</html> | true |
37a2170530f419b2032bce13c0a1186599a076e4 | PHP | stiellerr/zthemename | /classes/class-zthemename-custom-colors.php | UTF-8 | 2,270 | 3.015625 | 3 | [] | no_license | <?php
/**
* Custom Colors Class
*/
/**
* This class is in charge of color customization via the Customizer.
*/
class Zthemename_Custom_Colors {
/**
* Instantiate the object.
*
* @access public
*/
public function __construct() {
// Enqueue color variables for customizer & frontend.
add_action( 'wp_e... | true |
0e7cbaaba4978e4029bfae9fe22ce653550dc41b | PHP | fabiobellegard/curso-php | /orientacao-a-objetos/Aula2Ex2.php | UTF-8 | 368 | 3.546875 | 4 | [] | no_license | <?php
class Cliente{
public $nome;
public $codigo;
}
$cliente1 = new Cliente;
$cliente1->nome = "Rafael Cosentino";
$cliente1->codigo = 1;
$cliente2 = new Cliente;
$cliente2->nome = "Jonas Hirata";
$cliente2->codigo = 2;
echo "Cliente: $cliente1->nome\n";
echo "Codigo: $cliente1->codigo\n\n";
echo "Cliente: $c... | true |
fb3460b115f44d64380ba76371989eacd7a2ce27 | PHP | kiler129/CherryHttp | /src/_legacyCode/HttpRequest.php | UTF-8 | 5,661 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace noFlash\CherryHttp;
use Psr\Log\LoggerInterface;
/**
* Object represents single HTTP request made by client.
*
* @package noFlash\CherryHttp
*/
class HttpRequest extends HttpMessage
{
/** @var integer Maximum URI length */
const MAX_URI_LENGTH = 2048;
/** @var integer Max allowed reque... | true |
441e70808b2766b8d25d66184ad508d5c345e8f7 | PHP | njushishuo/Run-Across-Main | /runacross/app/Http/Controllers/LoginController.php | UTF-8 | 790 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Log;
class LoginController extends Controller
{
protected $User;
public function __construct(User $user)
{
$this->User=$user;
}
public function postLogin(Request $request){
$user = $this->User... | true |
eef7aca2b81a9b6d293fcf5302f9cd63b64d2d08 | PHP | michaelpanganiban/basic-ordering | /app/Models/OrderLine.php | UTF-8 | 1,236 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class OrderLine
*
* @property int $line_id
* @property int $order_id
* @property int $product_id
* @property float $quantity
* @property float $amount
* @property float $product_total_amount
* @pr... | true |
42998e044c95fe590ecf72e3d0da63ad6cf3718e | PHP | radcampaign/omnipay-wepay | /src/Utilities/TestExceptionsTrait.php | UTF-8 | 759 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Tests for common Omnipay\Common exceptions
*/
namespace Omnipay\WePay\Utilities;
use Omnipay\Common\Exception\InvalidRequestException;
/**
* Helper trait to test some common Omnipay Exception
* Example:
* <code>
*
* class MyExampleTest
* {
* use Omnipay\WePay\Utilities\TestExceptionsTrait;
*... | true |
354d1a927508be6c85f1af9349a70a03fdc9aa82 | PHP | MarcoKurzweg/Mathetrainer | /kuerzen.php | UTF-8 | 3,861 | 2.71875 | 3 | [] | no_license | <?php echo "<!DOCTYPE html>\n"; ?>
<html>
<head>
<title>Kürzen und Erweitern</title>
<meta charset="UTF-8" />
</head>
<body style="background-color: #E6AF5D">
<header>
<h1>Kürzen und Erweitern</h1>
</header>
</body>
<main>
<main>
<div style="border: 1px solid black;">
<article style... | true |
992a6934b2b28d174392f311c267e6ee8c8d642f | PHP | richard4339/php-clash-of-clans | /src/Api/AbstractResource.php | UTF-8 | 3,196 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
namespace ClashOfClans\Api;
abstract class AbstractResource
{
/**
* @var array
*/
protected $data = [];
/**
* @var AbstractResource[]
*/
protected $casts = [];
protected function __construct()
{
}
/**
* @param array $properties
* @return static
... | true |
b0ade47fcb801791fa7da2a14ebabed6c1c4816e | PHP | the16thpythonist/wp-cpt-lib | /src/the16thpythonist/Wordpress/Base/PostPost.php | UTF-8 | 1,452 | 2.921875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jonas
* Date: 05.10.18
* Time: 13:22
*/
namespace the16thpythonist\Wordpress\Base;
use InvalidArgumentException;
use the16thpythonist\Wordpress\Functions\PostUtil;
use the16thpythonist\Wordpress\Scopus\AuthorPostRegistration;
/**
* Class PostPost
*
* This abstract bas... | true |
8736f2da74a8b72efa1a38c1af74749cb324bd50 | PHP | Jezvin/hykso-data | /src/Entity/Session.php | UTF-8 | 5,791 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\SessionRepository")
*/
class Session
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column... | true |
b8b1c951150da28f160ee40fff9a449858069194 | PHP | wanggn/lumen--EcologicalFarm | /lumen/app/Manages/ManageNews.php | UTF-8 | 4,218 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Manages;
use Illuminate\Support\Facades\DB;
/**
* 新闻
* User: Administrator
* Date: 2017/9/2
* Time: 19:23
*/
class ManageNews extends BaseManage
{
/**
* 表名
* @var string
*/
static $table = 'db_news';
//////////////////////////////////////////////////////////////////////////////////... | true |
bfe9276ef6fdbe7ac367776cda72341614bd838c | PHP | umbalaconmeogia/yii-batsg | /trunk/yii-batsg/protected/extensions/batsg/HArray.php | UTF-8 | 4,921 | 3.703125 | 4 | [] | no_license | <?php
/**
* Manipulate array functions.
*/
class HArray
{
private $_array;
private $_keys = NULL;
/**
* @param array $array
*/
public function __construct($array)
{
if (!is_array($array)) {
throw new Exception("$array parameter should be an array.");
}
$this->_array = $array;
}
... | true |
928a95a25b30eadb45316464959671cfbcb3e9ca | PHP | riponghosh/guardme | /Modules/Jobs/Repositories/JobRepository.php | UTF-8 | 8,370 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Dennis
* Date: 25/01/2018
* Time: 04:28 PM
*/
namespace Modules\Jobs\Repositories;
use Modules\Account\Models\Role;
use Modules\Jobs\Events\JobWasCreated;
use Modules\Jobs\Models\Job;
use Modules\Users\Models\User;
class JobRepository
{
/**
* @var Job
*/
... | true |
7a090a0ec00aa53343f61d3f6ebb585690be5fd5 | PHP | upovod/fl-ru-damp | /classes/cardpay.php | UTF-8 | 6,249 | 2.59375 | 3 | [] | no_license | <?php
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/account.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/card_account.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/payment_keys.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/log.php");
/**
*
* Класс для покупки FM с помощью бан... | true |
144d2925cb564783d774bea08ea51bce79b89b5e | PHP | jaiprakashdadoliya/SafeHealthAPI | /app/Libraries/EmailLib.php | UTF-8 | 2,018 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Libraries;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
/**
* EmailLib Class
*
* @package Safe Health
* @subpackage EmailLib
* @category Library
* @DateO... | true |
5772ca58bc2ebabeb42255c1770846ba769d37ed | PHP | fancyThuy/Restaurant | /common/functions.php | UTF-8 | 16,518 | 2.765625 | 3 | [] | no_license | <?php
#=================================================================================
# “htmlspecialchars()”でエンティティ化したHTML特殊文字を
# Flashで正常表示できるように全角に変換するファンクション
#=================================================================================
function h14s_han2zen(&$str)
{
$str = str_replace("&", "&", $str... | true |
b7ee1baec865d705d5a7fdabb910358c8f4a23f4 | PHP | lmorillas/booty | /Booty.extension.php | UTF-8 | 1,265 | 2.8125 | 3 | [] | no_license | <?php
class BootyExtension {
public static function __callStatic($name, $fargs)
{
global $wgParser;
$input = $fargs[0];
$class = FALSE;
if(is_array($fargs[1])) {
if(array_key_exists('class', $fargs[1])) {
$class = $fargs[1]['class'];
}
}
return '<div class="' . $name . ($class?' '.$class:''... | true |
e918d6c4601329259b3c74ef1c6086538321d49f | PHP | ThiagoTeodoro/Busca_CEP_php | /Busca_CEP.php | UTF-8 | 19,957 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/*
* Classe que realiza a Busca do CEP
*/
/**
* Descrição da Busca_CEP
*
* A Classe Busca_CEP foi elaborada para trabalhar com a página web de busca
* de CEP http://www.qualocep.com. Essa página web, quando acessada
* na URL http://www.qualocep.com/busca-cep/(CEP) fornece os dados
* de endereço do CEP... | true |
243602135ee84356fb715cf8bd4311ab2fcee6bf | PHP | piyushbest/SkyWars | /src/muqsit/skywars/database/Database.php | UTF-8 | 2,551 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace muqsit\skywars\database;
use muqsit\skywars\Loader;
use pocketmine\Player;
abstract class Database {
public const JSON = 0;
public const MYSQL = 1;
public const TYPE = -1;
/** @var int */
public static $scoreboard_display_limit = 10;
public static... | true |
6cac927537d4da32c56ecfe3e530cfeadf6b3e4a | PHP | amtee/platform | /src/Core/Framework/DataAbstractionLayer/Dbal/ExceptionHandlerRegistry.php | UTF-8 | 1,601 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | <?php declare(strict_types=1);
namespace Shopware\Core\Framework\DataAbstractionLayer\Dbal;
use Shopware\Core\Framework\DataAbstractionLayer\Write\Command\WriteCommand;
use Shopware\Core\Framework\Feature;
class ExceptionHandlerRegistry
{
/**
* @var array
*/
protected $exceptionHandlers = [];
... | true |
fb64d11eae29de062b90617f715f00d29ff81979 | PHP | haleydev/haley-framework | /src/Jobs/JobMemory.php | UTF-8 | 1,260 | 2.84375 | 3 | [] | no_license | <?php
namespace Haley\Jobs;
class JobMemory
{
public static array $jobs = [];
private static array $attributes = [
'name' => [],
'namespace' => [],
'description' => null
];
public static function job(mixed $action, bool $valid)
{
$name = null;
$namespace =... | true |
38445f4b3ae2c3a6ee80e096c029d601ba969bed | PHP | prathamesh456/Project2 | /addAttributes.php | UTF-8 | 1,300 | 2.578125 | 3 | [] | no_license | <html>
<body>
<h1> Add a new Category </h1> <br><br>
<form action="addAttributes.php" method="post">
<table>
<tr>
<td> Attribute Name </td>
<td> <input type="text" name="a_name" /> </td>
... | true |
b7b2fdb1ca0ac161c86927f5106fbfa668775894 | PHP | i3or1s/UBL | /UBL/Util/AttributeBuilder.php | UTF-8 | 543 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace i3or1s\UBL\Util;
final class AttributeBuilder
{
/**
* @param string[] $attributes
*/
public static function build(object $object, array $attributes): string
{
$response = [];
foreach ($attributes as $objAttrib) {
try {
if ($object->$obj... | true |
980a7c54c7c12c8d56f11dfdbbd25f40320bb25d | PHP | AppogramIO/Sample-PHP-Server | /GetWithoutAuthentication.php | UTF-8 | 589 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
include_once "./db/db.php";
header('Content-type: application/json');
//query on database but only select 1 product
$sql = "SELECT * from products LIMIT 1";
$result = mysqli_query($conn,$sql);
$row = mysqli_fetch_assoc($result);
//create a assosiated array to shape like a json in .app... | true |
e4a4ea5123e42cfc6f34529770ffa6c100394536 | PHP | tomaka/niysu | /src/Niysu/Services/ResourcesCacheService.php | UTF-8 | 3,199 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
namespace Niysu\Services;
/**
* Service that manages server-side caching of resources.
*
* @copyright 2012 Pierre Krieger <pierre.krieger1708@gmail.com>
* @license MIT http://opensource.org/licenses/MIT
* @link http://github.com/Tomaka17/niysu
*/
class ResourcesCacheService {
/**
* Sets the category... | true |
1fc94e877d4a156be0d2aec9bbfbe186e52ce561 | PHP | adayguerra/cloud-run-wordpress | /wordpress/wp-content/plugins/fusion-builder/inc/class-fusion-builder-options.php | UTF-8 | 6,297 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* The Fusion_Builder_Options class.
*
* @package fusion-builder
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
/**
* Gets the options from separate files and unites them.
*/
class Fusion_Builder_Options {
/**
* An array o... | true |
00ef1c17b737cd471b42d18b66695671d0766dd7 | PHP | rockbuzz/std-payment | /src/ValueObject/Item.php | UTF-8 | 1,471 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
namespace Rockbuzz\StdPayment\ValueObject;
class Item
{
/**
* @var string
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var int
*/
private $priceInCents;
/**
* @var int
*/
private $quantity;
/**
* @var array
*... | true |
113255911459c057734a39e2b91027456ec06394 | PHP | MageSquare/Blog | /Model/Amp/ContentModificator.php | UTF-8 | 2,676 | 2.625 | 3 | [] | no_license | <?php
/**
* @author MageSquare Team
* @copyright Copyright (c) 2021 MageSquare
* @package MageSquare_Blog
*/
namespace MageSquare\Blog\Model\Amp;
class ContentModificator
{
/**
* @var array
*/
private $prohibitedTags = [
'<noscript',
'<base',
'<img',
'<picture',... | true |
c5422fec6ec309869bd7a6cfad03ff46576cb240 | PHP | Neffyk/pokusVue | /app/Http/Controllers/UserController.php | UTF-8 | 1,475 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use App\Http\Resources\User as UserResource;
use App\Http\Requests;
class UserController extends Controller
{
public function index () {
$users = User::all();
return UserResource::collection($users);
}
pu... | true |
18fb34e8f5c8e2cd1df1a4efc142a3d1da3d334a | PHP | TakahamaLifeArt/sweatjack | /app-def/checkHoliday.php | UTF-8 | 567 | 2.546875 | 3 | [] | no_license | <?php
/*
* Takahama Life Art
* charset utf-8
*------------------------------------
*
* check holiday
* return day:holiday name
*/
require_once dirname(__FILE__).'/jd/japaneseDate.php';
require_once dirname(__FILE__).'/jd/myCalendarIndex.php';
$res = "";
if(isset($_REQUEST['datesec'])){
$jd = new myCalendarIndex... | true |
a3d35415dfa9850e92076fe0803bc4531fd279ca | PHP | test1577/ci-framework | /application/config/api_manifest.php | UTF-8 | 2,621 | 2.609375 | 3 | [] | no_license | <?php
/**
* api manifest. shows in requested format when OPTIONS is requested.
*
* @author Mike Funk
* @email mfunk@christianpublishing.com
*
* @file api_manifest.php
*/
namespace API\Manifest;
$manifest = array();
// /**
// * GET /bookmarks/(.*)
// */
// $manifest['bookmarks/(.*)/(.*)'] = new Endpoint();
... | true |
96413272ce52c3c705c52ff4ed1a5eae1d6933f1 | PHP | cvpslim/cvpslim_pos | /app/View/Productos/listar.ctp | UTF-8 | 1,931 | 3.1875 | 3 | [] | no_license | <html>
<head><title>EJemplo de paginación</title></head>
<body>
<table>
<tr>
<td>nombre</td>
<td>precio</td>
<td>Telefono</td>
</tr>
<?php
// Si no hay datos a mostrar
if(empty($productos)) { ?>
<tr>
<td colspan="3">No hay datos que mostrar</td>
</tr>
<?php
... | true |
ca86883325380f83d81e268be72037204a68b6fc | PHP | htmlburger/wp-csv-import-kit | /_examples/01.menu-page/csv-importer.php | UTF-8 | 1,492 | 2.71875 | 3 | [] | no_license | <?php
use \Carbon_CSV\Import_Page;
use \Carbon_CSV\Import_Process;
/**
* Import process for the names CSV file
*/
class Names_Import_Process extends Import_Process {
/**
* This will be called before starting an import. Use this method to take
* care of any tasks that should be done before importing a CSV -- e.... | true |
e39b31c989701171d0d7098f9d44d41b99641d04 | PHP | waterscent/TryPhp | /describeTable.php | UTF-8 | 1,339 | 2.890625 | 3 | [] | no_license | <?php
require_once 'login.php';
$db_server = mysql_connect($db_hostname, $db_username, $db_password)
or die("failed to connect to database").mysql_error()."<br />";
mysql_select_db($db_database) or die("failed to select db").mysql_error()."<br />";
$query = "DESCRIBE cats";
$result = mysql_query($query);
if (!$... | true |
7650648e963c0a210ad81ec6857ee1cf10a60fcd | PHP | TeaInside/TeaCMS | /app/Http/Controllers/Api/LoginApiController.php | UTF-8 | 1,574 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use DB;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use App\Http\Controllers\Controller;
class LoginApiController extends Controller
{
/**
* @return void
*/
private function validateLoginInput(): void
{
if (!isset($_POST["_token"], $_POST["email"]... | true |
590d660ee270a8a25e57f93414e522ac0ad8870d | PHP | hector-moya/chroma_app | /php/model/read.php | UTF-8 | 9,923 | 2.578125 | 3 | [] | no_license | <?php
//headers
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
include_once '../config/sessions.php';
include_once '../config/database.php';
include_once '../model/crud.php';
session_start();
//instantiate DB connect
$database = new Database;
$db = $database->connect... | true |
b4be30cb4a33ef69fb334edc3cff47304a2112bf | PHP | compositephp/sync | /tests/TestStand/Entities/Castable/TestCastableStringObject.php | UTF-8 | 722 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php declare(strict_types=1);
namespace Composite\Sync\Tests\TestStand\Entities\Castable;
use Composite\Entity\CastableInterface;
class TestCastableStringObject implements CastableInterface
{
public function __construct(private readonly ?string $value) {}
public static function cast(mixed $dbValue): ?stati... | true |
8abee98cf7bfb225a1f5f7bd933457ebf7d71417 | PHP | picolll/hackerrank | /PHP/Contests/Library/mergeStrings.php | UTF-8 | 1,771 | 3.671875 | 4 | [] | no_license | <?php
/**
* Complete the mergeStrings function in your editor. It has 2 parameters:
* A string, a.
* A string, b.
* Your function must merge strings a and b, and then return a single merged string. A merge operation on two strings is described as follows:
*
* Append alternating characters from a and b, respectively,... | true |
3523f54873bd3f8b0913659d7b27aac8ba7abde8 | PHP | DHager/docker-php-library-demo | /test/ExampleTest.php | UTF-8 | 441 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Technofovea\DockerPhpUnitDemo\Test;
use PHPUnit\Framework\TestCase;
use Technofovea\DockerPhpUnitDemo\Calc;
/**
* A stupid-simple class to demonstrate basic unit-testing.
* @package Technofovea\DockerPhpUnitDemo\Test
*/
class ExampleTest extends TestCase
{
public function test()
{
... | true |
13603abe98f3a9a5806ac2eabca64f74bdcfc2ca | PHP | petronetto/messagebird-task | /core/Config/Config.php | UTF-8 | 2,174 | 2.984375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Core\Config;
use Core\Config\Loaders\LoaderInterface;
class Config implements ConfigInterface
{
/** @var array */
protected $items = [];
/** @var array */
protected $cache = [];
/**
* @param array $loaders
* @return Config
*/
public f... | true |
533e1ce4807cbe169eb0b1a269411967239312d1 | PHP | Void1315/my-blog | /app/Model/Tag.php | UTF-8 | 613 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class Tag extends Model
{
//
protected $table = 'tages';
public $timestamps = false;
public function createTages($tages){
$id_list = array();
foreach($tages as $tag){
$model = new Tag;
if($this->wh... | true |
5f9e1558f757d3033c039640ef4ca11bf93e6dbd | PHP | Arronzheng/jusuo | /jusuo/app/Http/Middleware/RedirectIfAuthenticated.php | UTF-8 | 773 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use App\Http\Services\v1\admin\AuthService;
use Closure;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|n... | true |
11eb58a793c979f197437b5daecae031dd5af154 | PHP | kelver/EstudosAvancadosPhpOO | /04_dependenceInjection_Container/Conn.php | UTF-8 | 432 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: kelver
* Date: 25/02/17
* Time: 17:31
*/
class Conn implements IConn
{
private $dsn;
private $user;
private $pass;
public function __construct($dsn, $user, $pass)
{
$this->dsn = $dsn;
$this->user = $user;
$this->pass = $pass;
... | true |
193803e58c8aa419f5e20a1e8d74bf9014c40037 | PHP | gnoesiboe/microservice | /lib/Utility/Repository/DatabaseConsumerRepository.php | UTF-8 | 2,271 | 3.0625 | 3 | [] | no_license | <?php
namespace Utility\Repository;
use Domain\Entity\Consumer;
use Domain\Factory\DatabaseConsumerFactoryInterface;
use Domain\Repository\ConsumerRepositoryInterface;
use Domain\ValueObject\Username;
use Utility\Database\DatabaseConnectionInterface;
/**
* Class DatabaseConsumerRepository
*/
final class DatabaseCo... | true |
e797d99afcb1d3d0111ac3444409c24e2e6824d2 | PHP | zaporylie/drupal-pdfcrowd | /pdfcrowd.drush.inc | UTF-8 | 868 | 2.59375 | 3 | [] | no_license | <?php
/**
* @file
* Download pdfcrowd library with drush.
*/
/**
* Implements hook_drush_command().
*/
function pdfcrowd_drush_command() {
$items['dl-pdfcrowd'] = array(
'callback' => 'pdfcrowd_drush_download',
'description' => dt('Downloads required pdfcrowd library.'),
);
return $items;
}
/**
*... | true |
3e6083765b45096619017087e0c578b16078e853 | PHP | xXCaulDevsYT/PotatoeCore | /src/Potatoe/Core.php | UTF-8 | 2,102 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Potatoe;
use Potatoe\anti\AntiAdvertising;
use Potatoe\anti\AntiSwearing;
use Potatoe\command\FeedCommand;
use Potatoe\command\HealCommand;
use Potatoe\command\NickCommand;
use Potatoe\command\SpawnCommand;
use Potatoe\command\VanishCommand;
use Potatoe\command\XYZCommand;
us... | true |
4d5b20ba41bf573edcb943b10604145d93b7174f | PHP | haibkhn/Web20202 | /BT_Tuan/tuan2/lab2.2/ConditionalTest.php | UTF-8 | 1,099 | 3.0625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<style >
.body{
margin: 0px auto;
font-size: 40px;
width: 850px;
height: 200px;
color: red;
margin-top: 150px;
margin-right: 100px;
}
</style>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div class="body" >
<?php
$first= $_GET["firstName"];
$mi... | true |
b44e9e3ab6b303d566b3f1a3459c18da82db3adb | PHP | luciangreentree/requester | /src/Connection/Single.php | UTF-8 | 1,946 | 3.171875 | 3 | [] | no_license | <?php
namespace Lucinda\URL\Connection;
use Lucinda\URL\Response\Exception;
/**
* Encapsulates a simple cURL connection (enveloping curl_* functions)
*/
class Single
{
protected $connection;
/**
* Initiates a new URL connection
*/
public function __construct()
{
$this->connect... | true |
3eb3a25a252a8d622171820804c582808389bb6b | PHP | LorenzoDezi/VintageGames | /Pong.php | UTF-8 | 2,307 | 2.9375 | 3 | [] | no_license | <!-- Questa introduzione in php riguarda l'aggiornamento della sessione -->
<?php
$logInResult = "";
session_start();
require "testInputFunction.php";
require "checkForCookie.php";
require "updateSession.php";
require "checkLogin.php";
?>
<!DOCTYPE html>
<html>
<head>
<title>Pong</title>
<link rel="stylesheet" typ... | true |
c4af4057b491e75d28454166fcca1a7c9d624cf6 | PHP | dreamsxin/cphalcon7 | /devtools/ide/1.3.0/Phalcon/Mvc/Model/MetaDataInterface.php | UTF-8 | 6,082 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Phalcon\Mvc\Model {
/**
* Phalcon\Mvc\Model\MetaDataInterface initializer
*/
interface MetaDataInterface {
/**
* Set the meta-data extraction strategy
*
* @param \Phalcon\Mvc\Model\MetaData\Strategy\Introspection $strategy
*/
public function setStrategy($strategy);
/**
... | true |
cc266aa3a990200a6e7907471ec7f814640d1e9a | PHP | jamesneale1996/footballzone | /admin/app/controllers/home.php | UTF-8 | 463 | 2.875 | 3 | [] | no_license | <?php
class Home extends Controller
{
//This is the default method called
public function index( $name = '', $otherName = '' )
{
$this->view('home/index', ['name' => 'James',
'otherName' => 'Neale',]
); //Provides a directory path for the view and called the view method that was c... | true |
a5a559a15744d0f34f41ecd84bd2fc68f22aa5ff | PHP | ishunko/hubzero-cms | /core/modules/mod_articles_latest/helper.php | UTF-8 | 3,230 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package hubzero-cms
* @copyright Copyright 2005-2019 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Modules\ArticlesLatest;
use Hubzero\Module\Module;
use Hubzero\Utility\Arr;
use Components\Content\Models\Article;
use Component;
use Route;
use Date;
us... | true |
2d5c98bc7521cda9be13d39a40650cb884367bb0 | PHP | Rab795/Residencia | /assets/php/listaAsesoresInternos.php | UTF-8 | 727 | 2.65625 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin: *');
require_once("conectar.php");
//Parametros
$action = mysqli_real_escape_string($conectado,(strip_tags($_POST['action'], ENT_QUOTES)));
//main query to fetch the data
$query = mysqli_query($conectado,"SELECT asi_id,asi_nombre,asi_aPaterno,asi... | true |
0038ee7c00604854db332371fa6d76dd85e99fcf | PHP | danieltcrouch/SevenDimensions | /src/php/trade-database.php | UTF-8 | 3,980 | 2.765625 | 3 | [] | no_license | <?php
function createTrade( $gameId, $details1, $details2 )
{
$tradeId = getGUID();
$details1 = json_decode( $details1 );
$details2 = json_decode( $details2 );
$player1Id = $details1->id;
$player2Id = $details2->id;
$player1Json = json_encode( $details1 );
$player2Json = json_encode( $detai... | true |
f40aa758ab389bcab21ec64cd1a49402da463882 | PHP | Ewebstech/MobileAid | /app/Http/Controllers/Controller.php | UTF-8 | 5,205 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Helpers\Response;
use App\Helpers\JwtIssuer;
use App\Helper\Uploadimage;
use App\Helpers\UploadMultipleImages;
use App\Helpers\generateDefaultPassword;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Founda... | true |
a6d309506fb034e0d1c8271f3d3d31e773c25641 | PHP | LZinina/havas-test | /app/Repositories/Res_namesRepository.php | UTF-8 | 804 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Corp\Repositories;
use Gate;
use Corp\Res_name;
class Res_namesRepository extends Repository {
public function __construct (Res_name $res_names) {
$this->model = $res_names;
}
public function addRes($request) {
if(Gate::denies('save', new \Corp\Article)) {
abort(403);
}
$data ... | true |
1e9ae96352bacaba73c23fb55e11b19574a0c436 | PHP | gymadarasz/wapp-library | /Library/User.php | UTF-8 | 1,262 | 3.078125 | 3 | [] | no_license | <?php declare(strict_types = 1);
/**
* PHP version 7.4
*
* @category PHP
* @package Madsoft\Library
* @author Gyula Madarasz <gyula.madarasz@gmail.com>
* @copyright 2020 Gyula Madarasz
* @license Copyright (c) All rights reserved.
* @link this
*/
namespace Madsoft\Library;
/**
* User
*
* @ca... | true |
a6c88af92aea2a88037d871107bd730524603d3a | PHP | SINk9/fast-swoole | /server/Process/Process.php | UTF-8 | 3,215 | 2.609375 | 3 | [] | no_license | <?php
/**
* @Author: sink
* @Date: 2019-08-05 13:57:02
* @Last Modified by: sink <21901734@qq.com>
* @Last Modified time: 2020-07-05 17:59:03
*/
namespace Server\Process;
use Server\ProxyServer;
abstract class Process
{
public $process;
public $instance;
public $worker_id;
protected $confi... | true |