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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2104b8357338b79ca9e2adae59bfb40503248cc7 | PHP | rezartmuco/GeocoderXYZ | /Geocoder.php | UTF-8 | 1,743 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
class Geocoder
{
private $geocodingservice;
private $key;
public $query;
function __construct($authkey,$host="https://geocode.xyz"){
$this->geocodingservice=$host;
$this->key=$authkey;
if(!$this->_is_curl_installed()){echo "curl not installed"; die;}
}
private function _is_curl_installed() {
if (in_... | true |
bfbe770936c9b9d19838bfbdc8a319e72dcd2f47 | PHP | halkyon/incapsula-php | /src/Api/AbstractApi.php | UTF-8 | 265 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Incapsula\Api;
use Incapsula\Client;
abstract class AbstractApi
{
/**
* @var Client
*/
protected $client;
public function __construct(Client $client)
{
$this->client = $client;
}
}
| true |
8c52a46778a89e1659f234df284490eda2b97cf0 | PHP | rede-sustentabilidade/site-wordpress | /web/app/plugins/wpro/tests/test-backend-s3.php | UTF-8 | 2,661 | 2.625 | 3 | [
"MIT",
"GPL-2.0-only"
] | permissive | <?php
class BackendS3Test extends WP_UnitTestCase {
function testFiltersAreRegistered() {
/*
$s3_backend = wpro()->backends->backend_by_name('Amazon S3');
// 10 is the filter priority:
$this->assertEquals(has_filter('wpro_backend_retrieval_baseurl', array($s3_backend, 'url')), 10);
*/
}
function testFi... | true |
db9bcad63a22a41aad709216a78557c556a28006 | PHP | akienm/tridi_nov2016 | /Server Side Applications/_recap/AdskOAuthWebNoExtRefresh.php | UTF-8 | 3,217 | 2.5625 | 3 | [] | no_license | <?php
/*
This program is used daily to create a new stored "Autodesk Oxygen Token"
which allows us to access ReCap programatically. It is run by a cron job
every day at midnight.
It does so by retrieving the existing stored token in the "access_token.txt" file in the
current directory where it is run (current... | true |
248b2025835777f44d956308f5b5ffede24f973b | PHP | selimppc/unisol | /app/modules/examination/models/ExmExamList.php | UTF-8 | 1,826 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
class ExmExamList extends \Eloquent
{
protected $table = 'exm_exam_list';
private $errors;
public function relCourseManagement()
{
return $this->belongsTo('CourseManagement', 'course_management_id', 'id');
}
public function ExmExaminer(){
return $this->belongsTo('ExmE... | true |
ad06a9dc2605b69d498ad5ac11623e83ccbc6ebd | PHP | shaileshmhatre/TEST23 | /admin/reset.php | UTF-8 | 3,302 | 2.5625 | 3 | [] | no_license | <?php
ob_start();
session_start();
error_reporting(0);
include("config.php");
function accesstoken($length=8,$use_upper=1,$use_lower=1,$use_number=1,$use_custom=""){
$upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$lower = "abcdefghijklmnopqrstuvwxyz";
$number = "0123456789";
if($use_upper){
$seed_length += 26;
$seed .... | true |
15a1a89165fb61fe2f0f9c584698a3995358d9ea | PHP | Asana/php-asana | /src/Asana/Resources/Gen/EventsBase.php | UTF-8 | 523 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Asana\Resources\Gen;
class EventsBase {
/**
* @param Asana/Client client The client instance
*/
public function __construct($client)
{
$this->client = $client;
}
/** Get events on a resource
*
* @param array $params
* @param array $options
*... | true |
03bce10955e558db5bb05e1b6eec592a9d3e52d1 | PHP | zikezhang/yona-cms | /app/modules/Admin/Form/LoginForm.php | UTF-8 | 828 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* LoginForm
* @copyright Copyright (c) 2011 - 2014 Aleksandr Torosh (http://wezoom.com.ua)
* @author Aleksandr Torosh <webtorua@gmail.com>
*/
namespace Admin\Form;
use Phalcon\Forms\Element\Text;
use Phalcon\Forms\Element\Password;
use Phalcon\Validation\Validator\PresenceOf;
class LoginForm extends \... | true |
e94486c0b2644f3c38e0d3c7c6c78415d97afabe | PHP | guillaumemonet/rad-framework-reco-easyrec | /src/Rad/Reco/Easyrec/Api/Import.php | UTF-8 | 1,846 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Rad\Reco\Easyrec\Api;
/**
* Description of Import
*
* @author guillaume
*/
class Import extends AModule {
/**
*
* @param type $itemId
* @param type $active
* @return type
*/
public function activateItem($itemId, $active = true) {
if (!empty($itemId)) {
... | true |
8b772f0254a4ad60ebe16ae12571da9f9caa6be9 | PHP | thanhvinh199700/laravel_vietlinkads | /app/Events/MessageSent.php | UTF-8 | 1,245 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
//use Illuminate\Broadcasting\PrivateChannel;
//use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts... | true |
92333f3b7ca50319ae8b37ef9dbd36208ad451ea | PHP | AmaraAnas/Projects | /Gestion de vente des produit para-medical avec PHP/Models/Li_pla.Model.php | UTF-8 | 3,433 | 2.515625 | 3 | [] | no_license | <?php
require_once('Model.Model.php');
class Li_plaModel extends Model{
private $li_id;
private $planing_id;
private $med_id;
private $pro_id;
private $observation;
private $etat;
private $date;
private $heure;
public function getli_id(){
return $this->li_id;
}
public function setli_id($valu... | true |
b86745a491d12f67765bfaeb803c52f68e551f42 | PHP | benchling/phabricator | /src/applications/repository/query/PhabricatorRepositoryIdentityQuery.php | UTF-8 | 3,122 | 2.578125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
final class PhabricatorRepositoryIdentityQuery
extends PhabricatorCursorPagedPolicyAwareQuery {
private $ids;
private $phids;
private $identityNames;
private $emailAddress;
private $assigneePHIDs;
private $identityNameLike;
private $hasEffectivePHID;
public function withIDs(array $ids) {
... | true |
03172a5b7d6a0a006834fc598f2306fbf5764970 | PHP | danmux/Raptor | /classes/SortedFileSet.php | UTF-8 | 822 | 2.921875 | 3 | [] | no_license | <?php
class SortedFileSet extends Task {
private $filesets = array();
private $name = null;
public function main() {
foreach($this->filesets as $fs) {
try {
$files = $fs->getDirectoryScanner($this->project)->getIncludedFiles();
sort($files);
... | true |
06abf607a0f05b393157611ce5160ebaf81cde94 | PHP | rawork/randstad_ua | /src/Fuga/Component/Excel/ExcelParser.php | UTF-8 | 2,240 | 3 | 3 | [] | no_license | <?php
namespace Fuga\Component\Excel;
class ExcelParser extends ExcelFileParser {
/*** преобразует из xls-юникода в win1251 */
function uc2html($str) {
$ret = '';
for ($i = 0; $i < strlen($str) / 2; $i++) {
$charcode = ord($str[$i * 2]) + 256 * ord($str[$i * 2 + 1]);
if ($charcode == 1105) {
$ret.= 'ё... | true |
012ae09d6428174022cdf1c90734dfb0a5c55fb3 | PHP | SBU-BMI/PathDB | /quip/web/modules/contrib/jwt/src/JsonWebToken/JsonWebToken.php | UTF-8 | 3,301 | 2.984375 | 3 | [
"GPL-2.0-only",
"BSD-3-Clause"
] | permissive | <?php
namespace Drupal\jwt\JsonWebToken;
/**
* Class JsonWebToken.
*/
class JsonWebToken implements JsonWebTokenInterface {
/**
* Internal representation of the token.
*
* @var string
*/
protected $payload;
/**
* JsonWebToken constructor.
*
* @param object $jwt
* The Object to turn... | true |
438db2bbb06d9611e9b4fffa75995e9f58af174a | PHP | nicksheffield/OpenLater | /app/controllers/actions.php | UTF-8 | 1,231 | 3.125 | 3 | [] | no_license | <?php
class Actions extends Controller{
/**
* Create a link record by its title and url
*
* Example url: /create?t=html5%20shelf&u=http%3A%2F%2Fhtml5shelf.tumblr.com%2Fpage%2F5
*
* @var $title string The title of the page
* @var $url string The url of the page
*
* @return void
* @author Nick Sh... | true |
34d35e6e7836877d786ffc117b12763ccaae5407 | PHP | chinhhiep/htdocs | /WEBSITE/_CORE/_file/rar_file.class.php | UTF-8 | 350 | 2.703125 | 3 | [] | no_license | <?php
class rar_file
{
var $src;
public function __construct($file_name, $file_password = "")
{
// Kiểm tra - và - load - thành phần - php_RAR.dll
ext_load('rar');
$this->src = rar_open($file_name, $file_password);
}
public function __destruct()
{
rar_... | true |
11964b22c64584ccfa0f28a1fd7e261615621151 | PHP | lehoangtran289/web-prog | /Lab04/UserSorting.php | UTF-8 | 3,559 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
function user_sort($a, $b) {
// smarts is all-important, so sort it first
if ($b == 'smarts')
return 1;
else if ($a == 'smarts')
return -1;
return ($a == $b) ? 0 : (($a < $b) ? -1 : 1);
}
$values = array('name' => 'Buzz Lightyear',
... | true |
bb12b53ac5388de00e5fa90aad67f9123e129d80 | PHP | JosueAnguiano96/laravel5.4.36 | /database/migrations/2014_10_12_200000_create_trabajador_table.php | UTF-8 | 923 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTrabajadorTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('trabajador',... | true |
2cf98ecfaf0de9a99cbd28259a8ba50c2943da0f | PHP | gjg021/SWEP-ROPP | /app/Swep/Services/Admin/AdminFunctionsService.php | UTF-8 | 1,976 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Swep\Services\Admin;
use App\Swep\BaseClasses\Admin\BaseService;
use App\Swep\Repositories\Admin\AdminFunctionsRepository;
use Illuminate\Http\Request;
use Validator;
class AdminFunctionsService extends BaseService{
protected $admin_functions_repo;
public function __construct(Admi... | true |
e1558eb12ce3489775b286f8c12112ec74c56180 | PHP | fabriciopolito/Codemini | /src/Libraries/Redirect.php | UTF-8 | 574 | 2.578125 | 3 | [
"MIT",
"JSON"
] | permissive | <?php
/**
* Codemini Framework
*
* An open source application development small framework
*
* @package Codemini Framework
* @author Fabricio Polito <fabriciopolito@gmail.com>
* @copyright Copyright (c) 2020 - 2020.
* @license https://github.com/fabriciopolito/Codemini/blob/master/LICENSE
* @link https://... | true |
c73d3de21af4b4696ecd0793fe6973fb0b6e7d72 | PHP | atk14/Atk14Catalog | /app/fields/boolean_with_select_field.php | UTF-8 | 660 | 2.890625 | 3 | [] | no_license | <?php
class BooleanWithSelectField extends ChoiceField {
function __construct($options = []){
$options["choices"] = [
"" => "",
"on" => _("Ano"),
"off" => _("Ne"),
];
parent::__construct($options);
}
function format_initial_data($data){
if(is_bool($data)){
return $data ? "on" : "off";
}
re... | true |
3fc15633d4f1aff2ef318c80eb3450f8dd9a59b4 | PHP | csemahmud/raw_php2 | /basic_syntax/my_isset_ui.php | UTF-8 | 873 | 3.125 | 3 | [] | no_license | <!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<?php
// put your code here
// M... | true |
4cab76daccb850e3b677883186a3aa94e1cd5273 | PHP | ardi-n/anWebAnalyticsPlugin | /lib/generator/dmAdminEventsGenerator.class.php | UTF-8 | 1,405 | 2.59375 | 3 | [] | no_license | <?php
/**
*
*
* @author Adrian Nowicki <me@adrian-nowicki.com>
*
*/
class dmAdminEventsGenerator extends dmAdminDoctrineGenerator {
/**
* Generates PHP files for a given module name.
*
* @param string $generatedModuleName The name of module name to generate
* @param array $files ... | true |
5513e21964fd0d66e30a6a647086d1c39e19621c | PHP | Ancient-Dragon/pip | /application/controllers/recipes.php | UTF-8 | 3,605 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
class Recipes extends Controller
{
/**
* @param $id
*
* This method displays the recipes, by requiring a parameter to get the recipes by id. Once it has the recipe,
* it then loads all the ingredients associated with that recipe, before passing the data onto the view.
*/
functio... | true |
f4b18a67093a9700aa8cf0e0ea44dbdca2040325 | PHP | hanber1/posEventPub | /application/models/Model_cashregister.php | UTF-8 | 1,431 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
class Model_cashregister extends CI_Model
{
public function __construct()
{
parent::__construct();
}
public function getData($id = null)
{
if ($id) {
$sql = "SELECT * FROM kassa WHERE id = ?";
$query = $this->db->query($sql, array($id));
return $query->row_array();
}
$sql = "SELECT * FRO... | true |
609c46907356b215278ceae4e0adfe9d1cceeb77 | PHP | MFJLBeuzel/WEBDEV_COURSE | /LESSON_06_07.php | UTF-8 | 1,457 | 3.546875 | 4 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Tax rate</title>
</head>
<body>
<?php
/* This script displays and handles an
HTML form. It uses a function to calculate a total from a quantity, price, and tax rate. */
//define a tax rate
$tax = 8.75;
//this function performs the calcula... | true |
3bf84cafa4b9e29e99b33b3aa6d57dac2de7c280 | PHP | markwalet/laravel-changelog | /src/Commands/ChangelogAddCommand.php | UTF-8 | 2,817 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace MarkWalet\Changelog\Commands;
use Illuminate\Console\Command;
use MarkWalet\Changelog\Adapters\FeatureAdapter;
use MarkWalet\Changelog\Change;
use MarkWalet\Changelog\Feature;
use MarkWalet\GitState\Drivers\GitDriver;
class ChangelogAddCommand extends Command
{
/**
* The name and signature o... | true |
fbdb9b8785925350da230c47ba13b763e580cad8 | PHP | ismaelsky1/angular-dashboard-garimpos | /api/app/Services/Contracts/IUserService.php | UTF-8 | 433 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Contracts;
interface IUserService
{
public function findAll($modelFilters);
public function findById($id);
public function findByEmail($email);
public function findByToken($token);
public function findByRecoveryCode($recoveryCode);
public function add($data);
p... | true |
32114fd1189e3dcacb2d95bf4697fdf53f88f2c1 | PHP | ValkyrieHD42/IUT-ProjetTut2 | /app/ActivityState.php | UTF-8 | 241 | 2.59375 | 3 | [] | no_license | <?php
/**
* Classe Enumération des états possible d'une activitée.
*/
class ActivityState extends Enum
{
const PREVUE = 'PREVUE';
const ENCOURS = 'ENCOURS';
const TERMINEE = 'TERMINEE';
const ANNULE = 'ANNULE';
// ...
} | true |
190bbcddbb0018417298c2787f62031efadf9a40 | PHP | Dieye-code/webServiceDoctrine | /src/entite/Compte.php | UTF-8 | 2,542 | 2.578125 | 3 | [] | no_license | <?php
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as orm;
/**
* @orm\Entity @orm\Table(name="compte")
*/
class Compte
{
/**
* @orm\id @orm\column(type="integer") @orm\GeneratedValue
*/
private $id;
/**
* @orm\column(type="string", unique=true, length=30)
... | true |
6b864af9f4638ded72c9c74c6f9c62a18fec1ce5 | PHP | Chabarys/exercicios | /exercicios_php/exercicio15.php | UTF-8 | 639 | 2.84375 | 3 | [] | no_license | <?php
/*
Na usina de Angra dos Reis, os técnicos
analisam a perda de massa de um material
radioativo. Sabendo-se que este perde 25%
de sua massa a cada 30 segundos, criar um
algoritmos que imprima o tempo necessário
para que a massa desse material seja menor
q... | true |
43add8f95da21dfb153ec855a7729166e726bca8 | PHP | lordwarnut/chat | /old/session.php | UTF-8 | 551 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
require 'dbconnect.php';
// Selecting Database
$db = $conn->select_db("users");
session_start();// Starting Session
// Storing Session
$user_check=$_SESSION['login_user'];
// SQL Query To Fetch Complete Information Of User
$ses_sql = $conn->query("select username from login where username='$user_c... | true |
4073cf01713dfa91c64911ae090dfc594a245eb7 | PHP | Mati02K/developement_team | /viewstudent.php | UTF-8 | 1,375 | 2.578125 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION['username']))
{
include('templates/header.php');
?>
<table class="table">
<thead>
<tr>
<th scope="col">Roll No</th>
<th scope="col">Student Name</th>
<th scope="col">Student Email</th>
<th scope="col">Student Contact No</th>
<th scope="col">... | true |
f60606285f80fe59811a228e66ae17d30aa5b35f | PHP | ben9lta/news-cat | /common/models/Rubric.php | UTF-8 | 1,975 | 2.578125 | 3 | [] | permissive | <?php
namespace common\models;
use Yii;
use yii\helpers\ArrayHelper;
/**
* This is the model class for table "rubric".
*
* @property int $id
* @property string|null $title
* @property int $rubric_id
*
* @property mixed $rubrics
* @property RubricNews[] $rubricNews
*/
class Rubric extends \yii\db\ActiveRecor... | true |
3f149e5924f7edf07f547cc5f33a885f12578c2b | PHP | AkashMaurya09/travel.github.io | /login.php | UTF-8 | 973 | 2.5625 | 3 | [] | no_license | <?php
$name = filter_input(INPUT_POST, 'name');
$email = filter_input(INPUT_POST, 'email');
if(!empty($name))
{
if (!empty($email))
{
$host = "localhost";
$dbusername = "root";
$dbpassword = "";
$dbname = "test";
//Create Connection
$conn = new mysqli($host,$dbusername,... | true |
d928c48632e92ea5de6c59ff82f4946b8d4f8bb7 | PHP | repli2dev/nature-quizzer | /library/processors/QuestionsProcessor.php | UTF-8 | 2,248 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace NatureQuizzer\Processors;
use NatureQuizzer\Database\Model\Concept;
use NatureQuizzer\Database\Model\Organism;
use NatureQuizzer\Database\Model\QuestionType;
use NatureQuizzer\Model\EloRandomDistractors;
use NatureQuizzer\Model\IModelFacade;
use NatureQuizzer\Model\ModelFacadeFactory;
use NatureQuizzer... | true |
4e2dfbc62ffd98154e093ab509d0d92fe35a1bda | PHP | samolabams/starwars | /app/Domain/Services/EntitySorter.php | UTF-8 | 1,441 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Domain\Services;
class EntitySorter
{
/**
* Sort array of entities in ascending or descending order based on the given property
* @param array $entities
* @param string $property
* @return array
*/
public function sort(array $entities, stri... | true |
f1f52a09387d94c014afc07ab0eec3aea9b7a698 | PHP | web2date/sf_register | /Classes/Validation/Validator/ConjunctionValidator.php | UTF-8 | 2,478 | 2.703125 | 3 | [] | no_license | <?php
namespace Evoweb\SfRegister\Validation\Validator;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and ... | true |
a4ed7acd2545436877b63b7699d1a024d23c73a0 | PHP | lequesne/refracter | /src/api/services/getAlbum.php | UTF-8 | 791 | 2.921875 | 3 | [] | no_license | <?php
include("headers.php");
$album = mysql_real_escape_string($_GET["album"]);
$artist = mysql_real_escape_string($_GET["artist"]);
//query tracks table for tracks with matchign album and artist
$trackQuery = "SELECT * FROM `tracks` WHERE `album`='$album' AND `artist`='$artist'";
$trackQueryRes... | true |
c13dbd557a24405f086cd581b93a40a6af83ed70 | PHP | Sddoo/camagru | /code/php/settings.php | UTF-8 | 4,342 | 2.546875 | 3 | [] | no_license | <?php
require_once("/code/includes/include.php");
session_start();
if ($_SESSION['logged_on_user'] == "") {
header("../index.php");
}
if ($_POST['submit'] == "OK")
{
$pdo = db_auth();
$stmt = $pdo->prepare("SELECT login, passwd, email FROM users WHERE login = ?");
$stmt->execute([$_SESSION['logged_on_use... | true |
35ed2bc6500fc5312f43e987f7d7c7abf8784195 | PHP | liuyong888/cinema | /app/Models/User.php | UTF-8 | 695 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
//定州与模型关联的数据表
protected $table = "admin_users";
//主键
protected $primaryKey="id";
public $timestamps=false;
protected $fillable = ['name','password'];
//修改器方法
//对完成的数据('状态 status')做自动处理
/... | true |
493c64c2e83f8e447dab08cfcd1a2649c3ec5656 | PHP | Ander04263/prueba | /src/Entity/Product.php | UTF-8 | 3,467 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
use App\Repository\ProductRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProductRepository::class)
* @UniqueEntity("code")
* @UniqueEnt... | true |
0ffbee46d8a5b082c1ff1838026efedd5a610ba2 | PHP | Fl0-dev/Wish-Symfony | /src/Entity/Wish.php | UTF-8 | 3,123 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Symfony\Component\Validator\Constraints as Assert;
use App\Repository\WishRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=WishRepository::class)
*/
class Wish
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*... | true |
b6852bbbde16e55e70fa8e566417d0e6b82e6c49 | PHP | JParedes98/MovieTime | /app/Http/Controllers/Admin/UserAdminController.php | UTF-8 | 1,147 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Models\User;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class UserAdminController extends Controller
{
/**
* Create a new UserAdminController instance.
*
* @return void
*/
public function __construct() {
$... | true |
96da831646d2de763a480896efbc0920e048ae09 | PHP | felmerald/PCDOM-Mission-Recorder-Web-App | /application/views/includes/footer.php | UTF-8 | 14,250 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <!-- Bootstrap core JavaScript-->
<?php
// lets get number of companionship and put into variable
$this->db->select('companionship_id')
->from('pcdom_companionship');
$count = $this->db->count_all_results();
// variable of total number of compani... | true |
ffc454dc5490d789039aa6567f7ba03070682cf0 | PHP | jrsalunga/gi-tk | /database/migrations/2015_09_29_124907_create_position_table.php | UTF-8 | 954 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePositionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('position', function (Blueprint $table) {
... | true |
cc94565837e399e646343a7a3123372ca5080322 | PHP | rrusso/EARS | /courseprefs/classes/CoursePrefsSplit.php | UTF-8 | 4,591 | 3.171875 | 3 | [] | no_license | <?php
/*
* @author: Adam C. Zapletal
*/
require_once('CoursePrefsBase.php');
/**
* Class representation of a split entry from the splits db table
**/
class CoursePrefsSplit implements CoursePrefsBase {
/**
* Private properties
*/
private $id;
private $usersid;
private $status;
pri... | true |
5a252c35afbef0dc1d449fa68e67c88e790aaa30 | PHP | yangrui1227/poster_production | /backend/modules/ciniran/yii2-dic/components/DicTools.php | UTF-8 | 5,158 | 2.65625 | 3 | [] | no_license | <?php
/**
* 数据字典获取组件
* Created by PhpStorm.
* User: 谢波
* Date: 2017/9/6
* Time: 14:02
*/
namespace ciniran\dic\components;
use ciniran\dic\models\SystemDic;
use Exception;
use Yii;
use ciniran\dic\models\BaseObject;
class DicTools extends BaseObject
{
/**
* @var array $dicKeys ;
*/
private s... | true |
2e18e7c9fb6b9e4896bf910d752333d577401622 | PHP | prodigeris/PHP-GildedRose-Refactoring-Kata | /tests/ProductFactoryRegistryTest.php | UTF-8 | 1,880 | 2.578125 | 3 | [] | no_license | <?php
namespace Tests;
use GildedRose\Products\AgedBrie;
use GildedRose\Products\BackstagePass;
use GildedRose\Products\Conjured;
use GildedRose\Products\RegularProduct;
use GildedRose\Products\Sulfuras;
use PHPUnit\Framework\TestCase;
use GildedRose\ProductFactoryRegistry;
/**
* Class ProductFactoryRegistryTest
... | true |
7833220df81c93d317cad9081dd013762edff256 | PHP | Xolas/auria | /src/database/connection/BaseConnection.php | UTF-8 | 1,534 | 3.15625 | 3 | [] | no_license | <?php
namespace Auria\Database\Connection;
/**
* Auria connection to the main database
*
* @author nicholassouza
*/
class BaseConnection extends MysqlConnection {
private static $self;
public static function getInstance() {
if (self::$self == null) {
self::$self = new BaseConnection();
}
ret... | true |
ea33a9db010efb254807006b0dfa8d4030220db6 | PHP | aPurpleDev/Symfony_Dabble | /website-skeleton/src/Entity/Evenement.php | UTF-8 | 3,506 | 2.546875 | 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\EvenementRepository")
*/
class Evenement
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Co... | true |
ff0aad1e14a25645886908c830ed2f0df6e44c5d | PHP | Just-Man/PHP | /Lection4/Homework_3/Task_10.php | UTF-8 | 1,219 | 3.78125 | 4 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: just
* Date: 08.11.15
* Time: 19:09
*/
/*
* Задача 10:
* Да се състави програма, чрез която се въвеждат 7 цели числа в
* едномерен масив.
* Програмата да изведе числото, което е най-близко до средната
* стойност на въведените числа.
* Пример: 1,2,3,... | true |
639e3d4feaed5b209671c4894c0de1a989b9e948 | PHP | conradh1/Pan-STARRS-Science-Interface | /PSIGraphClass.php | UTF-8 | 25,163 | 2.796875 | 3 | [] | no_license | <?php
/**
* @class PSIGraphClass
* This PSI class is meant for handling jquery and html plotting and graphing for myDB tables
*
* @version Beta
* license GPL version 3 or any later version.
* copyleft 2010 University of Hawaii Institute for Astronomy
* project Pan-STARRS
* @author Conrad Holmberg
* @since Beta... | true |
25c6d6d91d8ba7a1875c7ecf4f8eae3c36b7090c | PHP | locojuhi/merqueo-api | /database/seeds/OrderProductSeeder.php | UTF-8 | 1,018 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class OrderProductSeeder extends Seeder
{
/**
* @var \App\Repositories\ProductRepository
*/
private $productRepository;
/**
* @var \App\Repositories\ProductRepository
*/
private $orderRepository;
public ... | true |
d2fb25ac6f681e48e88d300447680cd9b36e7c2c | PHP | HamzaElghanoui/unitcalculator | /src/Calculator/OperationsAbstract.php | UTF-8 | 207 | 2.65625 | 3 | [] | no_license | <?php
namespace drmonkeyninja\Calculator;
abstract class OperationsAbstract{
protected $operands = [];
public function setOperands($operands) {
$this->operands = $operands;
}
}
?> | true |
7b30735fd51c631be0a44b1ee236dac9319a52d1 | PHP | myalban/MSHF-Rally | /cms_admin/expressionengine/third_party/publisher/libraries/Publisher/fieldtypes/Publisher_matrix.php | UTF-8 | 12,083 | 2.625 | 3 | [] | no_license | <?php
class Publisher_matrix extends Publisher_fieldtype
{
/**
* Matrix hooks are not quite enough, need to do more processing
*
* @param array $data
* @return array
*/
public function post_save($data)
{
if (ee()->publisher_entry->is_ignored($this->entry_id, $this->field_i... | true |
e7402970e6b1905d683b9de99eb0197d310f6366 | PHP | NUKIM-Spring-2020-Thurs/week4-cart-yentinng | /cart.php | UTF-8 | 1,492 | 2.765625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>購物車</title>
<style type="text/css">
#a{
font-family: DFKai-sb;
}
#b{
font-family: Microsoft JhengHei;
font-size:20px;
}
</style>
</head>
<body bgcolor="#FFFFB5" >
<h1 id="a">購物車</h1>
<table border="0">
<tr bgco... | true |
cd445f7a1c6833833facfe9a520c8c18e94b0187 | PHP | hiandy168/ERP-1 | /Erp/.svn/pristine/cd/cd445f7a1c6833833facfe9a520c8c18e94b0187.svn-base | UTF-8 | 1,560 | 2.578125 | 3 | [] | no_license | <?php
define("ROOT_PATH", dirname(__FILE__) . '/../../');
require_once ROOT_PATH . 'data/master_config.php';
require_once ROOT_PATH . 'admin/includes/cls_message_base.php';
/**
* 短信发送类
* @author yfhu
*
*/
class YiduMessageClient extends MessageClientBase{
/**
* 生成短信客户端
* @param unknown $url
... | true |
0cb019a9528655ba1113161921344743b48aee18 | PHP | sekka1/SynthTesting | /library/AlgorithmsIO/classes/ArbitraryMaping.php | UTF-8 | 11,058 | 2.640625 | 3 | [] | no_license | <?php
// Creates the arbitrary mapping that Mahout needs based on a CSV datasource
class ArbitraryMaping
{
private $auth;
private $generic;
private $s3;
private $debug;
private $datasources;
private $mapping;
private $csvFiles;
private $arbitrary_id_item;
private $arbitrary_id_user;... | true |
0de62952ef4ed10beb0ab8d8cf9c44e9189413b6 | PHP | alamwahyu/BIG-BUY-Online-Shop-Website | /manajer/graph.php | UTF-8 | 2,150 | 2.578125 | 3 | [] | no_license | <?php
include"koneksi.php";
$dataPoints = array(
array("x"=> 10, "y"=> 41),
array("x"=> 20, "y"=> 35, "indexLabel"=> "Lowest"),
array("x"=> 30, "y"=> 50),
array("x"=> 40, "y"=> 45),
array("x"=> 50, "y"=> 52),
array("x"=> 60, "y"=> 68),
array("x"=> 70, "y"=> 38),
array("x"=> 80, "y"=> 71, "indexLabel"=> "Highes... | true |
ecbf3337b0ff6f0952b57e685e61d8cbb7135170 | PHP | shafqatali/code-signal | /addBorder/add_border.php | UTF-8 | 277 | 2.875 | 3 | [] | no_license | <?php
function addBorder($picture)
{
foreach ($picture as $k => $v) {
$picture[$k] = '*' . $v . "*";
}
$asterisks = str_pad("", strlen($picture[0]), "*");
array_push($picture, $asterisks);
array_unshift($picture, $asterisks);
return $picture;
}
| true |
774eaaf2314919eb4c23443436fd31e1be5f8e81 | PHP | shashankqv/curl-php | /curl-php/function_title_desc_keyword.php | UTF-8 | 1,910 | 3.390625 | 3 | [] | no_license | <?php
function file_get_contents_curl($url)
{
$ch = curl_init(); //Initializing Curl
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch); //Executing CURL Fun... | true |
da92e26ac7117d3a087b224247480ecad557943e | PHP | IFPB-PRPIPG/periodicos-ifpb | /plugins/generic/openAds/OpenAdsConnection.inc.php | UTF-8 | 3,376 | 2.703125 | 3 | [] | no_license | <?php
/**
* @file plugins/generic/openAds/OpenAdsConnection.inc.php
*
* Copyright (c) 2013-2015 Simon Fraser University Library
* Copyright (c) 2003-2009 Siavash Miri and Alec Smecher
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class OpenAdsConnection
* @ingroup plugins_g... | true |
888410ade3ca164c2b309265af43558cb931373d | PHP | mkelcik/trf-consumer | /src/Interfaces/TRFConsumer.php | UTF-8 | 319 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: michal
* Date: 06/01/2019
* Time: 23:37
*/
namespace TRFConsumer\Interfaces;
interface TRFConsumer
{
/**
* @param string $queue Queue to consume
* @param callable $msgProcess
*/
public function consume(string $queue, callable $msgProcess): void;
} | true |
7078756bec47e73124680963fc6b8e90499985eb | PHP | salvatorelomonaco/php-oop-magazzino | /index.php | UTF-8 | 506 | 2.734375 | 3 | [] | no_license | <?php
include_once 'prodotto.php';
include_once 'maglietta.php';
$prodotto1 = new Prodotto('Maglietta', 'magl123', 10);
echo '<pre>';
var_dump($prodotto1);
echo '</pre>';
$prodotto2 = new Prodotto('Pantaloni', 'pant123', 20);
echo '<pre>';
var_dump($prodotto2);
echo '</pre>';
$prodotto3 = new Prodotto('Scarpe', ... | true |
eac50141230f701df62dd93339e989f3d7e232fd | PHP | lodimauro1/novosga | /src/Novosga/Auth/AuthFactory.php | UTF-8 | 1,175 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Novosga\Auth;
use Novosga\Util\Arrays;
use Novosga\Context;
/**
* Authentication
*
* @author Rogerio Lino <rogeriolino@gmail.com>
*/
class AuthFactory {
public static function createList(Context $context, array $config = array()) {
$methods = array();
$type ... | true |
1da11b5cb8d802b6b443512818cd79255dafd8bf | PHP | pitmax/GMToolbox | /interface/app/share/cssjs/model/cssjsCssjsModel.php | UTF-8 | 8,437 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* cssjsCssjsModel :
*
* @package
* @version $id$
* @copyright
* @author Pierre-Alexis <pa@quai13.com>
* @license
*/
class cssjsCssjsModel extends cssjsCssjsModel_Parent
{
/**
* __construct : initialisation du tableau qui stocke les css, js et scripts head et footer
*
* @access pu... | true |
986acce9dfcfa5789609a83786c3a8b7d7951825 | PHP | peterxiemin/ipl_lib | /model/script/mutilprocess/lib/abstract/workerclass.php | UTF-8 | 1,020 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: xiemin
* Date: 2015/4/15
* Time: 11:55
*/
abstract class WorkerProcess
{
protected $isrun = false;
protected $task_data;
public function __construct()
{
}
public function __destruct()
{
}
public function beginRun... | true |
61ed418758e6865a31de81a49b08d35a35d0979f | PHP | thegreatrez/StructureTree | /tree.php | UTF-8 | 979 | 3.40625 | 3 | [] | no_license | <?php
function Tree($array,$depth = 0){
$FINAL = " └ ";
$ENTRY = " ├ " ;
$SKIP = " ┊ ";
$KEY = ": ";
$output = "";
if (is_array($array)){
$final = count($array) -1;
$current = 0;
foreach($array as $k=>$v){
foreach(range(0,$depth) as $i){
... | true |
eaa2ccde1530c6d76db367139c01e80e93227e7f | PHP | cacocacaio/WEB | /3bim/Atividade1/aval_02bim/addFornecedor.php | UTF-8 | 944 | 3 | 3 | [] | no_license | <?php
require_once 'init.php';
include_once 'fornecedor.class.php';
$nome = isset($_POST['txtNome']) ? $_POST['txtNome'] : null;
$dataFun = isset($_POST['txtData']) ? $_POST['txtData'] : null;
$email = isset($_POST['txtEmail']) ? $_POST['txtEmail'] : null;
if(empty($nome) || empty($dataFun) || empty($email)){... | true |
9211bd2ac67c10212fd5217834f0b5de65c684ae | PHP | nextdevise/Atlas | /upload.php | UTF-8 | 2,762 | 2.875 | 3 | [] | no_license | <?php
session_start();
if(isset($_FILES)&&(!empty($_FILES))){
foreach($_FILES as $el)//获取文件,这里默认都是每次都单文件上传
{
$file=$el;
}
if(is_uploaded_file($file["tmp_name"])){//确认是POST方式上传的文件
$cache_path="./upload/";//暂存文件的目录
$fname=$file["name"];//获取文件名
$ftype=$file["type"];//获取文件类型
... | true |
867b5f5264bcc9db2955e942423b10fe2b2f57e0 | PHP | NMathias59/POC-3 | /src/Controller/ConnectionController.php | UTF-8 | 630 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Model\Manager\LoginManager;
class ConnectionController
{
public function connectionPageAction()
{var_dump($_SERVER['REQUEST_METHOD']);
if ($_SERVER['REQUEST_METHOD'] ==='POST') {
$loginManager = new LoginManager();
$user = $loginManager-... | true |
e4e902b7c65c395bce9ddbb0f8485d3f13ebddb8 | PHP | live-admin/business | /czy_www/colourlife/common/models/Reward_elicai.php | UTF-8 | 5,892 | 2.546875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "elicai_redpacket_ticheng".
*
* The followings are the available columns in table 'elicai_redpacket_ticheng':
* @property integer $id
* @property string $sn
* @property string $e_sn
* @property integer $customer_id
* @property string $name
* @property string $mobi... | true |
3f4128e90fc1f4503fadb4b7f6b8da07874e4183 | PHP | LeoHugues/tennis | /src/UserBundle/Entity/User.php | UTF-8 | 1,783 | 2.546875 | 3 | [] | no_license | <?php
namespace UserBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use OrganisationBundle\Entity\Joueur;
use OrganisationBundle\Entity\Matchs;
/**
* @ORM\Entity(repositoryClass="UserBundle\Repository\UserRepository")
* @OR... | true |
bb76bb2f94e788046bd6291fdc68f4e7a30a12df | PHP | blrnw3/nw3weather | /SiteV3/monthrepgen.php | UTF-8 | 5,006 | 2.625 | 3 | [] | no_license | <?php
function comparator($anom, $isShort, $extremeLow, $extremeHigh, $thresh1, $thresh2, $thresh3) {
$absAnom = abs($anom);
if($absAnom < $thresh1)
return $isShort ? 'normal' : 'close to';
if($absAnom <= $thresh2) {
$comp = $isShort ? 'slightly' : 'a little';
} elseif($absAnom <= $thresh3) {
$comp = $isShor... | true |
0159794df5e9e49f5d37f0b4635c482e1dac8536 | PHP | Viacheslav99/homework | /hw_2.php | UTF-8 | 1,180 | 2.890625 | 3 | [] | no_license | <?php
$word1 = array('Чудесных', 'Суровых', 'Занятных', 'Внезапных');
$word2 = array('слов', 'зим', 'глаз', 'дней', 'лет', 'мир', 'взор');
$word3 = array('прикосновений', 'поползновений', 'судьбы явлений', 'сухие листья', 'морщины смерти', 'долины края', 'замены нету', 'сухая юность', 'навек исчезнув');
$word4 = array(... | true |
8a2da35dfb7ae1450f4ff50d8a9d81565b97b68c | PHP | cyruscollier/wp-spark | /src/Module/Module.php | UTF-8 | 1,718 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Spark\Module;
use Psr\Container\ContainerInterface;
use Spark\Support\Extension\Extension;
use Spark\Support\Extension\ExtensionRegistry;
use DI\Container;
use Spark\Model\Entity;
use Spark\Support\Entity\EntityRegistry;
abstract class Module
{
/**
* @var Container
*/
protected $Con... | true |
119b0acef31b48f69b9b95e6667c93eb86425549 | PHP | appserver-io-backports/http | /src/TechDivision/Http/HttpRequestParser.php | UTF-8 | 9,854 | 2.703125 | 3 | [] | no_license | <?php
/**
* \TechDivision\Http\HttpRequestParser
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @category Library
* @package TechDiv... | true |
4e8f0486aa9c9863a1da00a76d5b71934e7871bf | PHP | netdev29/project1 | /app/models/district_model.php | UTF-8 | 754 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class District_model extends CI_Model {
public function get_districts()
{
$this->db->order_by('code');
$query = $this->db->get('districts');
return $query->result();
}
public function add_district($data)
{
$query = $this->db->insert('districts', $data);
return $query;
}
public fun... | true |
7d5cf0cab812399f968cd9705512815d08b2935a | PHP | ricardoper/slim4-twig-skeleton | /app/Emitters/PlainResponseEmitter.php | UTF-8 | 568 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Emitters;
use App\Kernel\Interfaces\ResponseEmitterInterface;
use Psr\Http\Message\ResponseInterface;
class PlainResponseEmitter implements ResponseEmitterInterface
{
/**
* Send the response to the client
*
* @param ResponseInterface $response
* @... | true |
0cbd9184d451f9c275bcdbc1698f288e25ac5c85 | PHP | jean-pasqualini/poc-connector | /src/connectors/pim-russe/Manager/ProductManager.php | UTF-8 | 867 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jpasqualini
* Date: 25/10/18
* Time: 16:18
*/
namespace Connector\Pim\Russe\Manager;
use Connector\Pim\Russe\Model\ProductWrapper;
use Marketplace\Manager\ProductManagerInterface;
use Marketplace\Model\ProductCollection;
use Pim\Russe\Manager\ProductManager as ProductMana... | true |
8abd2d5668f6833af3b8fd5f12e6c6214a0bec2c | PHP | p4ddy1/WoLManager | /src/Traits/MultiGetSet.php | UTF-8 | 1,252 | 3.359375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
/**
* Providing a getter and setter for multidimensional arrays.
* Usage: key1.key2.key3
* Trait MultiGetSet
* @package App\Traits
*/
trait MultiGetSet{
/**
* @param $array
* @param $path
* @return mixed
*/
private function multiGet($array, $path){
$... | true |
0f378f447aa1d6989d2951ee8ee554a4cb2edffd | PHP | senttor/llara | /app/Http/Controllers/Blog/Admin/PostController.php | UTF-8 | 5,245 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Blog\Admin;
use App\Http\Requests\BlogPostCreateRequest;
use App\Http\Requests\BlogPostUpdateRequest;
use App\Models\BlogPost;
use App\Repositories\BlogCategoryRepository;
use App\Repositories\BlogPostRepository;
//use Illuminate\Http\Request;
//use Illuminate\Support\Carbon;
//u... | true |
5543bbeec5030542130ce21478b9368b1b043c38 | PHP | Daniel-Todorov/SoftUni | /PHPBasics/02. WorkingWithForms/04. HTMLTagsCounter/HTMLTagsCounter.php | UTF-8 | 2,756 | 3.03125 | 3 | [] | no_license | <!--Write a PHP script HTMLTagsCounter.php which generates an HTML form like in the example below.-->
<!--It should contain a label, an input text field and a submit button.-->
<!--The user enters HTML tag in the input field.-->
<!--If the tag is valid, the script should print “Valid HTML tag!”, and if it is invalid – ... | true |
d189bec4b50479f7c5d4594602f5387cd4805239 | PHP | xjhnear/mcp.me.com | /services/Youxiduo/Android/Model/CreditLevel.php | UTF-8 | 832 | 2.625 | 3 | [] | no_license | <?php
/**
* @package Youxiduo
* @category Android
* @link http://dev.youxiduo.com
* @copyright Copyright (c) 2008 Youxiduo.com
* @license http://www.youxiduo.com/license
* @since 4.0.0
*
*/
namespace Youxiduo\Android\Model;
use Youxiduo\Base\Model;
use Youxiduo\Base\IModel;
use Youxiduo\Helper\Utility;
/**
... | true |
4d655b153d7195bcf13acc071b4b408b8ad9fe74 | PHP | TypicalFence/slim-routing | /src/Response/AbstractResponse.php | UTF-8 | 1,251 | 2.9375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* slim-routing (https://github.com/juliangut/slim-routing).
* Slim framework routing.
*
* @license BSD-3-Clause
* @link https://github.com/juliangut/slim-routing
* @author Julián Gutiérrez <juliangut@gmail.com>
*/
declare(strict_types=1);
namespace Jgut\Slim\Routing\Response;
use Psr\Http\Message\Re... | true |
8217cd171ff197744cce0b2101d6b19824fc6421 | PHP | SylvainTorrenti/old-web_server | /mysql/jeux_video/jeux_video.php | UTF-8 | 491 | 2.765625 | 3 | [] | no_license | <?php
if (isset($_GET['console']))
{
$bdd= new PDO('mysql:host=localhost;dbname=test', 'root', 'root', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
$requete = $bdd->prepare('SELECT LENGTH(nom) AS longueur, console, prix FROM jeux_video WHERE console=?');
$requete->execute(array($_GET['console']));
... | true |
c2664af73205484753166bff82fc5c2b8736854d | PHP | gaagai/php-ptoj1 | /index_5.php | UTF-8 | 208 | 3.265625 | 3 | [] | no_license | <?php
$arr1 = array("one", "two", "three","four", "pap");
$char = 'a';
foreach ($arr1 as $value) {
if(strpos($value, $char)){
echo '=> '.$value;
}
}
?> | true |
5b1a26f9cf319c9b21ce5b90aeb7127ea9d1f96f | PHP | VChernomorets/backend | /library/app/models/model_admin.php | UTF-8 | 989 | 2.609375 | 3 | [] | no_license | <?php
class Model_Admin extends Model
{
function get_data($param = null)
{
$offset = (($_GET['page'] ?? 1) - 1) * 20;
include_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'DB' . DIRECTORY_SEPARATOR . 'DB.php';
$db = DB::getInstance();
$stmt = $db->prepare('
SELEC... | true |
0f1d92a5f7fa80a3a1e30c315b0fd2f6ad5a9459 | PHP | RodrigoBattagliero/prueba | /app/src/Repository/FloorRepository.php | UTF-8 | 2,088 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Entity\Floor;
use App\Entity\Building;
use Doctrine\Persistence\ManagerRegistry;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
/**
* @method Floor|null find($id, $lockMode = null, $lockVersion = null)
* @method Floor|null findOneBy(array $criteria, a... | true |
d31f722700ac7d2f3e2bc5d757a5636299575bf3 | PHP | lyrajane09/laravel-exam | /app/Http/Controllers/PlayerController.php | UTF-8 | 1,341 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Player;
use App\Http\Resources\PlayersList as PlayersListResource;
use App\Http\Resources\Player as PlayerResource;
use Illuminate\Http\Response;
class PlayerController extends Controller
{
/**
* @return [array, ID, full name]
* @description list of all pla... | true |
fcdd66a533add9b370019f16c2fcd680621f2705 | PHP | Tahongpao/Server-local | /domains/localhost/public_html/shapes/Circle.php | UTF-8 | 577 | 3.234375 | 3 | [] | no_license | <?php
require_once "Shape.php";
class Circle extends Share {
private $radius;
public function __construct($radius=100){
$this->radius = $radius;
parent::__construct();
}
public function show(){
list ($x, $y) = $this->getCoord();
$radius =$this->radius*$this->getScale();
ec... | true |
8aec1ccaa865af4aebb6f34a0c6ccd8c832a3fce | PHP | juan1630/masterPHP | /aprendiendoPHP-mysql/index.php | UTF-8 | 1,512 | 3.203125 | 3 | [] | no_license | <?php
// En este archivo nos vamos a conectar a MYSQL
// Usa la BD de aprendiendoPHP
// En este master se usa mysqli, pero lo haré por pdo tambien
$conexion = mysqli_connect('localhost', 'jose', 'eltodasmias16', 'aprendiendoPHP');
// Host la url, la ip o el localhost del servidor
// User el usuario de l... | true |
86ae41ae5c40227d83fd205edf1ce66704717575 | PHP | aztec212/desing-patterns | /facade/System/Projector.php | UTF-8 | 397 | 2.640625 | 3 | [] | no_license | <?php
namespace Facade\System;
class Projector
{
public function on()
{
echo "Projector on" . PHP_EOL;
}
public function off()
{
echo "Projector off" . PHP_EOL;
}
public function tvMode()
{
echo "Projector TV mode" . PHP_EOL;
}
public function wideScr... | true |
03d8f057f6ba266c2dec73b1baf4bece3c56c784 | PHP | luisvareli/phpStyde | /lesson30/tests/ArrayAccessTest.php | UTF-8 | 1,446 | 2.765625 | 3 | [] | no_license | <?php
use Styde\Model;
class ModelArrayAccessTest extends PHPUnit\Framework\TestCase {
protected function newModel(array $attributes = [])
{
return new class($attributes) extends Model { };
}
public function test_offset_get()
{
$user = $this->newModel($attributes = [
... | true |
31c8605afc6b4d007492ea7b3d82643919dab86b | PHP | indygriffiths/locksmith | /mysite/code/Report/LetsEncryptReport.php | UTF-8 | 966 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Report for listing domains who are using Let's Encrypt.
*/
class LetsEncryptReport extends SS_Report
{
public function title()
{
return 'Domains using Let\'s Encrypt';
}
public function description()
{
return 'Lists domains that are using Let\'s Encrypt for their cert... | true |
b371484cbe8e5aee3e85911621cd736b37d2bb0f | PHP | vs47096/Management-Application-of-Doctor-s-Clinic | /Web Application/billmednameajax.php | UTF-8 | 699 | 2.71875 | 3 | [] | no_license | <?php
header('Content-type: text/xml');
$servername="localhost";
$username="root";
$password="root";
$dbname="martand";
$conn= new mysqli($servername,$username,$password,$dbname);
if($conn->connect_error)
{
die("Connection failed : ".$conn->connect_error);
}
else
{
$sql = "SELECT distinct med_name FR... | true |
97256e57c188862a81e335c4998b8d4cfd4a2083 | PHP | cheynerpb/laravel-recently-viewed | /src/Models/Contracts/Viewable.php | UTF-8 | 519 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace RecentlyViewed\Models\Contracts;
use Illuminate\Database\Eloquent\Builder;
interface Viewable
{
/**
* @param array $values
*
* @return null|Builder
*/
public function whereRecentlyViewedIn(array $values): ?Builder;
/**
* Get the primary key for the model.
*
... | true |
46a397100f655fe1bd788339ce9759b20d8cb368 | PHP | Srdjan294/hellopp21 | /predavac01.edunova.hr_03/predavac01.edunova.hr/varijable.php | UTF-8 | 729 | 3.6875 | 4 | [] | no_license | <?php
// definicija:Varijabla je prostor u memoriji u koji možemo
// pohraniti vrijednost
// PHP je interpreter
//na prvu se ne zna koji je tip jer piše $v
//tip podatka određuje desna strana
$v=7; //int
// https://www.php.net/manual/en/function.gettype.php
echo $v . ': ' . gettype($v);
echo '<hr />';
// varijabla... | true |