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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
71d9fefcc28ba7aa7f61f33f35eef08d9a5c2535 | PHP | chwnam/lifemotif-wordpress | /src/lmwp/models/DiemProfileManager.php | UTF-8 | 1,643 | 2.984375 | 3 | [] | no_license | <?php
namespace lmwp\models;
use lmwp\exceptions\FileNotFoundException;
/**
* Class DiemProfileManager
*
* DAO
*
* @package lmwp\models
*/
class DiemProfileManager
{
public function updateProfile(DiemProfile $profile)
{
$profileArray = array(
'credential' => $profile->getCredentia... | true |
0996b231fd28fd51d80d560f412d01bb45aa3c7e | PHP | petski/rector-src | /rules-tests/Php56/Rector/FunctionLike/AddDefaultValueForUndefinedVariableRector/Fixture/skip_with_embedded_html.php.inc | UTF-8 | 389 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Rector\Tests\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector\Fixture;
final class SkipWithEmbeddedHTML
{
public function run(): void
{
?>
<p>Let's insert stuff here.</p>
<?php
if (random_int(1, 10) === 5) {
$a = true;
}
... | true |
de7bf8952048e57b0f4e56500136b33396f13b6d | PHP | Juwendixcode/backup | /htdocs/pagar/data/admin-pegawai.php | UTF-8 | 838 | 2.59375 | 3 | [] | no_license | <table class="u-full-width">
<?php
echo "<form action='editPegawai.php?e=0' method='POST'>"
?> <input class="button button-primary" type='submit' value='Tambah Pegawai' /><?php
echo"</form><br/>";
?>
<thead>
<tr>
<th>ID</th>
<th>Nama</th>
<th>... | true |
1c5de2b99a2aa048c7f4de7dfbea185bb613ca12 | PHP | DLSNNG/dls_resource | /includes/library/dls_resource.mock_resource.inc | UTF-8 | 1,432 | 2.53125 | 3 | [] | no_license | <?php
module_load_include('inc', 'dls_resource', '/includes/library/dls_resource.resource_interface');
class MockResource implements ResourceInterface {
var $model;
public function looksLike($jsonString) {
$this->model = $jsonString;
}
public function get($id) {
$item = json_... | true |
d13198ed055ae9669c137e88c4e9933a8010e582 | PHP | rendiliauw/laravel-atoz.com | /database/migrations/2019_02_17_081123_create_orders.php | UTF-8 | 1,353 | 2.609375 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOrders extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('orders', function (Bl... | true |
9934e83eb4ee8ed1a020dde94f9dc8664caa1f75 | PHP | enricobono/localizator | /src/Contracts/Writable.php | UTF-8 | 217 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Amirami\Localizator\Contracts;
interface Writable
{
/**
* @param string $locale
* @param Translatable $keys
*/
public function put(string $locale, Translatable $keys): void;
}
| true |
e63b1ef2e1842593f7d15f84e73bced30c7c00ac | PHP | EugenioSa/DAW | /Labs/Lab14/createtab.php | UTF-8 | 622 | 2.984375 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "DB";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
//Create table
$sql = "CREATE TABLE Usuarios (
i... | true |
70ca18877b87eabe3e00a6a4556244450054c007 | PHP | Syednazirhussain/Simple-Codeigniter-Project | /application/models/Model_hobbies.php | UTF-8 | 1,393 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Model_hobbies extends CI_Model{
public function getAllHobbies($id){
$result = $this->db->get_where('hobbies',array('personid' => $id));
$data = $result->result_array($result);
return $data;
}
public function addHobbies($id,$circket,$hockey,$tennis,$football){
$... | true |
2e5a3f0e14633adf717e3cf1f6b740e14c8aaaa7 | PHP | quidphp/base | /src/Assert.php | UTF-8 | 1,107 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the QuidPHP package <https://quidphp.com>
* Author: Pierre-Philippe Emond <emondpph@gmail.com>
* License: https://github.com/quidphp/base/blob/master/LICENSE
*/
namespace Quid\Base;
// assert
// class with methods a layer over the native PHP assert functio... | true |
58c4dbbe1c04a01299c5e892c506bf4b2eb06d82 | PHP | zackurben/CarafeDB | /lib/zackurben/Carafe/Exception/InvalidColumnException.php | UTF-8 | 1,692 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This project is licensed under the terms of the MIT license,
* you can read more in the LICENSE file.
*
* @file lib/zackurben/Carafe/Exception/InvalidColumnException.php.
* @version 0.0.0
* @github https://github.com/zackurben/CarafeDB
* @author Zack Urben
* @contact zackurben@gmail.com
*/
na... | true |
68413cc2a4a8784823660b01c534f904be4ef1a0 | PHP | IkeLutra/redbadger-technical-test | /src/InstructionRunner.php | UTF-8 | 1,832 | 3.328125 | 3 | [] | no_license | <?php
namespace IkeLutra\RedBadger;
class InstructionRunner
{
/**
* Map of letters to instruction callables
*
* @var callable[]
*/
private $instructionMap;
/**
* @var Map
*/
private $map;
/**
* Pass in an associative array mapping the instruction letter
* t... | true |
52e37e7cd879582df08924fc4a121e19be18002b | PHP | Carrooi/Nette-ImagesManager | /src/Naming/DefaultNameResolver.php | UTF-8 | 404 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Carrooi\ImagesManager\Naming;
/**
*
* @author David Kudera <kudera.d@gmail.com>
*/
class DefaultNameResolver implements INameResolver
{
/**
* @param mixed $imageName
* @return string
*/
public function getName($imageName)
{
return (string) $imageName;
}
/**
* @param mixed $imageN... | true |
ccf00a2a91f71d96617bc5a29b2bb9a36de97d97 | PHP | yuchao86/phphtdocs | /process/proc.php | UTF-8 | 2,110 | 3.078125 | 3 | [] | no_license | <?php
$data = "|||";
$descs = array(
0 => array( 'pipe' , 'r' ),
//1 => array( 'pipe' , 'w' ),
//2 => array( 'pipe' , 'w' ),
1 => array( 'file' , 'output' , 'w' ),
2 => array( 'file' , 'errors' , 'w' ),
);
$res = proc_open( 'D:\xamp... | true |
5f6d7d06e2aefeb7ddaf6b685d80a07f0f581e6b | PHP | GNELEZIE/token | /controller/contact.php | UTF-8 | 1,681 | 2.640625 | 3 | [] | no_license | <?php
if(!empty($_POST['nom']) and !empty($_POST['email']) and !empty($_POST['message']) and isset($_SESSION['myformkey']) and isset($_POST['formkey']) and $_SESSION['myformkey'] == $_POST['formkey']) {
extract($_POST);
$nom = htmlentities(trim(addslashes(strip_tags($nom))));
$email = htmlentities(trim(add... | true |
0b9d71aa77272ca2401d5ba8dde5bfd70b2e9da5 | PHP | adriangotca98/PSGBD_Project | /views/player.php | UTF-8 | 2,820 | 3.0625 | 3 | [] | no_license | <?php
// Turn dbms_output ON or OFF
function SetServerOutput($c, $p)
{
if ($p)
$s = "BEGIN DBMS_OUTPUT.ENABLE(NULL); END;";
else
$s = "BEGIN DBMS_OUTPUT.DISABLE(); END;";
$s = oci_parse($c, $s);
$r = oci_execute($s);
oci_free_statement($s);
... | true |
44f4b07b071f76e091cd74b1dbfacaabc120d509 | PHP | griffbrad/zap | /lib/Concentrate/MinifierAbstract.php | UTF-8 | 1,121 | 2.96875 | 3 | [] | no_license | <?php
require_once 'Concentrate/Exception.php';
/**
* @category Tools
* @package Concentrate
* @author Michael Gauthier <mike@silverorange.com>
* @copyright 2010 silverorange
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
*/
abstract class Concentrate_MinifierAbstract
{
abstract pu... | true |
a7af49bbc02af36e3cd7d337afee7266a0476995 | PHP | pkrotkikh/mebel_constract | /database/seeds/TypeModuleSeeder.php | UTF-8 | 448 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class TypeModuleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$titles = ['Нижние модули', 'Верхние модули'];
foreach ($titles as $title) {
$title = [
't... | true |
f44b70106a359ecc16c35289e74b1eb249691776 | PHP | kevinshirley/neguziaauto | /modeles/functions.php | UTF-8 | 2,674 | 2.6875 | 3 | [] | no_license | <?php
$connexion = connectDB();
##################################################
// Conection a la base de donnee
##################################################
function connectDB()
{
$c = mysqli_connect("localhost", "root", "");
mysqli_query($c, "SET character_set_results=utf8");
mb_language('un... | true |
d52787f0a3d8577ead203c6ab77198584238fb6e | PHP | kreat1v/Home_Work | /home_work_25092017/index.php | UTF-8 | 1,382 | 2.78125 | 3 | [] | no_license | <?php
// манипуляция с куками
$visits_count = isset($_COOKIE['visits_count']) ? (int)$_COOKIE['visits_count'] : 0;
$visits_count++;
if ($visits_count >= 5) {
setcookie('visits_count', $visits_count, time()+1, '/');
} else {
setcookie('visits_count', $visits_count, time()+60*60*24, '/');
}
// загрузка файла
$ne... | true |
087165f87f8041278cf1fd2c6a65fbf786440453 | PHP | JordyKingz/bots | /parse/index.php | UTF-8 | 2,908 | 3.0625 | 3 | [] | no_license | <?php
//file_get_contents('eula/one.txt'); // Bol.com
function makesentences($parts) {
foreach($parts as $k=>$v){
$parts[$k] = explode(".", $v); // hopen dat er geen afkortingen zijn
foreach($parts[$k] as $x=>$y){
if(strlen($y) < 2)
unset($parts[$k][$x]);
}
}
return $parts;
}
function fi... | true |
915b576db71e6bdb27bca0c64727eaa5da8aa2da | PHP | jujudellago/cabinetsens | /web/app/themes/bridge/framework/modules/widgets/icon-list-item/icon-list-item.php | UTF-8 | 3,847 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
if(class_exists('BridgeQodeWidget')) {
class BridgeQodeIconListItem extends BridgeQodeWidget {
protected $params;
public function __construct() {
parent::__construct(
'qode_icon_list_item',
esc_html__('Qode Icon List Item', 'bridge'),
... | true |
d4d07b5e4acc0e5bc5566601141ca287119f22b1 | PHP | debalina1999/rtcamp-demo | /function.php | UTF-8 | 1,687 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
$email= $_POST["user_email"];
if(!$_POST["user_email"]){
$email="ba@ff.com";
}
function storeData($email)
{
require('./connection.php');
date_default_timezone_set('Asia/kolkata');
$curdate = date('m/d/Y h:i:s a', time());
$sql2= " Select email
from user_email
where email in ('$email')... | true |
5ff2ab6e9e1a8b2b628debdd3b9241c11de76707 | PHP | sergiu05/symfony-learning-project | /src/AppBundle/Security/FormLoginAuthenticator.php | UTF-8 | 3,235 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Security;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
use Symfony\Component\Security\Core\Exceptio... | true |
3f31dd5da6bb8cbf37b03d63f9ce472529e7b9ed | PHP | stof/aws | /src/Service/DynamoDb/src/Enum/ProjectionType.php | UTF-8 | 775 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace AsyncAws\DynamoDb\Enum;
/**
* The set of attributes that are projected into the index:.
*
* - `KEYS_ONLY` - Only the index and primary keys are projected into the index.
* - `INCLUDE` - In addition to the attributes described in `KEYS_ONLY`, the secondary index will include other non-key
* attr... | true |
b7061e1ba88f6fa7588c105b7dbe056782d8bdf9 | PHP | Chao-Xi/php_daily_pra | /Rating/article.php | UTF-8 | 990 | 2.84375 | 3 | [] | no_license | <?php
require_once 'app/init.php';
$article=null;
if(isset($_GET['id']))
{
$id=(int)$_GET['id'];
$article=$db->query("
select article.id, article.title, avg(articles_ratings.rating) as rating
from article left join articles_ratings on article.id=articles_r... | true |
3d23e212cc70b705e9d0183cf9b08ab77ccce49a | PHP | coleHafner/photographybyrebekah.com | /classes/pbr_base/Article.php | UTF-8 | 23,921 | 2.90625 | 3 | [] | no_license | <?
/**
* A class to handle a File record.
* @since 20100618, hafner
*/
require_once( "pbr_base/Common.php" );
require_once( "pbr_base/FormHandler.php" );
class Article
{
/**
* Instance of the Common class.
* @var Common
*/
protected $m_common;
/**
* Instance of the FormHandler class.
* @var Form
*... | true |
a0ca58346079c9145baa151dd7842b8da954b19d | PHP | goindow/punit | /example/TestDemo2.php | UTF-8 | 455 | 2.734375 | 3 | [] | no_license | <?php
require_once("../PunitAssert.php");
class TestDemo2 {
public function before() {} // do something before case invoked
public function after() {} // do something after caste invoked
public function notATestCase() {} // not a test case
public function testCasePassed() { PunitAssert::... | true |
02ca125ccf89c110d17f18420a0b1b5eff754f29 | PHP | zerofairnight/telegram-php | /src/Types/InputLocationMessageContent.php | UTF-8 | 530 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Telegram\Types;
/**
* Represents the content of a location message to be sent as the result of an inline query.
*
* @link https://core.telegram.org/bots/api#inputlocationmessagecontent
*
* @property float $latitude Latitude of the location in degrees
* @property float $longitude Longitude of the... | true |
8dd624830466a755f28d96f0e0dc2befa9282675 | PHP | fabiomigliorini/MGLara | /app/Models/UnidadeMedida.php | UTF-8 | 3,664 | 2.6875 | 3 | [] | no_license | <?php
namespace MGLara\Models;
/**
* Campos
* @property bigint $codunidademedida NOT NULL DEFAULT nextval('tblunidademedida_codunidademedida_seq'::regclass)
* @property varchar(15) $unidademedida
* @property varchar(3) ... | true |
89fa654de73c3dbff600ae4bf80f892a1283de6c | PHP | robery567/hacktm2017 | /crons/Models/Scrapers.php | UTF-8 | 2,940 | 2.71875 | 3 | [] | no_license | <?php
namespace Models;
use Doctrine\ORM\Mapping as ORM;
/**
* Scrapers
* @ORM\Table(name="scrapers")
* @ORM\Entity
*/
class Scrapers {
/**
* @return int
*/
public function getId() {
return $this->id;
}
/**
* @return string
*/
public function getName() {
r... | true |
8493dc13ce92282224b22e38e86e3126e9bec002 | PHP | Jonathan-Law/fhd | /api/classes/database.php | UTF-8 | 3,656 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
/////////////////////////////////////////////////////////////////////////
//Database Class
/////////////////////////////////////////////////////////////////////////
// Require the Config File
require_once(LIBRARY."config.php");
class MySQLDatabase
{
// my mysqli connecti... | true |
a1966d2a4d404ef8abfc74c6d776c0aaf3729e04 | PHP | eudoal/programacion | /Actividad 08 - Figuras geométricas/Figuras geométricas/circulo.php | UTF-8 | 426 | 3.21875 | 3 | [] | no_license | <?php
class Circulo
{
private $radio;
function __construct()
{
}
public function getRadio()
{
return $this->radio;
}
public function setRadio($radio)
{
$this->radio = $radio;
}
public function area(){
return round((($this->radio * $this->radio)*pi()),2);
... | true |
b3e784b16bb4e9aaf93e43de28d56e4b8dfffe8e | PHP | stweil/slx-admin | /modules-available/eventlog/page.inc.php | UTF-8 | 1,171 | 2.578125 | 3 | [] | no_license | <?php
class Page_EventLog extends Page
{
protected function doPreprocess()
{
User::load();
User::assertPermission('view');
User::setLastSeenEvent(Property::getLastWarningId());
}
protected function doRender()
{
Render::addTemplate("heading");
$lines = array();
$paginate = new Paginate("SELECT logid,... | true |
f2e8ad406f249c3ade44c5821a68a3b2433e38ec | PHP | AntonOleynikov321/oct-mvc | /app/controllers/ControllerTasks.php | UTF-8 | 1,058 | 2.640625 | 3 | [] | no_license | <?php
namespace controllers;
use core\Controller;
use models\ModelTasks;
class ControllerTasks extends Controller {
public function __construct() {
parent::__construct();
$this->model = new ModelTasks();
}
public function action_index() {
$this->view->tasks = $thi... | true |
bf016933edeff0b22a3082f7018393a9591edf7b | PHP | sunlight3d/Aptech | /C2009L/PHP/26-02-2021/models/Book.php | UTF-8 | 1,173 | 3.453125 | 3 | [] | no_license | <?php
// lop cha Book:
// bookCode,
// inputDate
// unitPrice
// amount
// producer
class Book {
private $bookCode;
private $unitPrice;
private $amount;
private $producer;
//constructor
public function __construct($bookCode, $unitPrice, $amount, $producer) {
$th... | true |
a884b2fea88705cf4c183794f7cad19dc24fea96 | PHP | LuffyQAQ/ESreptile | /vendor/easyswoole/http-annotation/src/Annotation/ObjectAnnotation.php | UTF-8 | 2,275 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace EasySwoole\HttpAnnotation\Annotation;
use EasySwoole\HttpAnnotation\AnnotationTag\ApiGroup;
use EasySwoole\HttpAnnotation\AnnotationTag\ApiGroupDescription;
class ObjectAnnotation extends AnnotationBean
{
/** @var ApiGroup|null */
protected $apiGroup;
/** @var ApiGroupDescription|null */... | true |
e2060fcde023f924e20964a0cf44e639ecddcd65 | PHP | syaiful6/pawon | /src/Queue/Processor/Listener.php | UTF-8 | 5,028 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Pawon\Queue\Processor;
use Generator;
use Illuminate\Contracts\Queue\Job;
use Pawon\Queue\Failed\FailedJobProviderInterface as FailedJob;
use Illuminate\Contracts\Queue\Factory as FactoryContract;
class Listener
{
/**
* The amount of seconds to wait before polling the queue.
*
* @v... | true |
eb38d4c27d4a2fc15a0ab8dfac7c45c1cd953cc7 | PHP | MarkusRodler/PW-Blog | /src/ArticleRenderer.php | UTF-8 | 280 | 2.71875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Dark\PW\Blog;
class ArticleRenderer
{
/**
* @param Article $article
*/
public function render(Article $article)
{
echo PHP_EOL . 'Article: ' . $article->getHeadline() . ' - ' . $article->getBody();
}
} | true |
0dbfee8861509110cfeb64efdbb632859dd33d41 | PHP | xyodax/angularjs-php-mysql-sample | /delete_tool.php | UTF-8 | 555 | 2.90625 | 3 | [] | no_license | <?php
// include database and object file
include_once 'config/database.php';
include_once 'objects/tool.php';
// get database connection
$database = new Database();
$db = $database->getConnection();
// prepare product object
$tool = new Tool($db);
// get product id
$data = json_decode(file_get_contents("ph... | true |
457ac721e8c510431ca460ace299293ea9f418c1 | PHP | rid47/ATMS | /models/CustomMethodModel.php | UTF-8 | 3,931 | 2.546875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of CustomMethodModel
*
* @author acl
*/
class CustomMethodModel extends CI_Model {
//pu... | true |
2c303b60caa69b9b218b52bf9537002a9d6656be | PHP | pablogarin/ecommerce | /modelos/Cupon.class.php | UTF-8 | 2,149 | 2.78125 | 3 | [] | no_license | <?php namespace Modelos;
class Cupon extends Model{
public $insert = "INSERT INTO cupon VALUES(?,?,?,?,?,?,?);";
public $update = "UPDATE cupon SET titulo=?,codigo=?,fechaInicio=?,fechaFin=?,activo=?,giftcard=? WHERE id=?;";
public $delete = "DELETE FROM cupon WHERE id=?;";
public $create = "
CREATE TABLE cupon(
... | true |
481e72f3cab60bfb4a39d9b553e757c9821e7508 | PHP | ATCARES/MeetingMinutes | /includes/SynopsizeHookHandler.php | UTF-8 | 2,108 | 2.890625 | 3 | [] | no_license | <?php
/**
* <INSERT DESCRIPTION>.
*
* Documentation: http://???
* Support: http://???
* Source code: http://???
*
* @addtogroup Extensions
* @author James Montalvo
* @copyright © 2014 by James Montalvo
* @licence GNU GPL v3+
*/
namespace MeetingMinutes;
use ParamProcessor\ProcessingResult;
use Par... | true |
3b4536c2bd69b39f63668861e82a57c6c56ddc7f | PHP | Blackssugar/WebProject_IoT | /php/saveProfile.php | UTF-8 | 1,400 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
require 'loginDB.php';
session_start();
$user_id = $_SESSION["user_id"];
//$user_id = 32;
if(isset($_FILES['icon'])){
$errors= array();
$pic_name = $_FILES['icon']['name'];
$pic_size = $_FILES['icon']['size'];
$pic_tmp = $_FILES['icon']['tmp_name'];
$pic_type = $_FILES['icon']['type'];
$ext_tmp = explode('... | true |
5735518e542826e21c127309b7570c1545112be4 | PHP | dkmn/course | /modules/course_quiz/course_object.quiz.inc | UTF-8 | 643 | 2.546875 | 3 | [] | no_license | <?php
class CourseObjectQuiz extends CourseObjectNode {
function getTakeUrl() {
return url("node/{$this->node->nid}/take");
}
/**
* Marks a user's fulfillment record for this object complete if the user
* passed the quiz.
*/
function grade($user) {
$nid = (int) $this->getInstanceId();
$r... | true |
748cec54f4c41cafeecc5356628fec695c0cddcf | PHP | korabspahija/Project_Gr9_ProgramimiNeInternet | /4.PHP/Detyra te zgjedhura/DetyraProvimiKlasa.php | UTF-8 | 802 | 3.0625 | 3 | [] | no_license | <?php
//Definoni një klasë të thjeshtë në PHP, e cila shfaq një mesazh mirëseardhje sikur në
//vijim: "Përshëndetje, jemi në provimin nga lënda Programimi në Internet", ku
//"Programimi në Internet" është një vlerë e argumentit të një metode (funksioni) brenda vetë klasës.
class provimi{
private $teksti;
public ... | true |
36ef882d37396fb9c5b4033274cff9ed0837cc5e | PHP | anthony-guyomard/projet | /PhpstormProjects/projet/CONTROLLER/Compte.php | UTF-8 | 793 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sylvi
* Date: 13/10/2018
* Time: 11:54
*/
class Compte implements InterfaceController {
public function display($data = []) {
include_once 'VIEW/ViewCompte.php';
$compte = new ViewCompte();
$compte->comptePage('Votre compte');
$action ... | true |
7427bf82b7fddc6043281796632c48561086789a | PHP | RobertKwan-Sellzone/bootstrap | /src/Lib/Url/AliasManager.php | UTF-8 | 1,033 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Sy\Bootstrap\Lib\Url;
class AliasManager {
/**
* @var array Lang => [Alias => Path]
*/
private static $alias = array();
public static function setAliasFile($file) {
if (!file_exists($file)) return;
$data = include($file);
if (!is_array($data)) return;
self::$alias = $data;
}
public ... | true |
cc868b047f616de1b01ed24b15f478a86b14f8d2 | PHP | web-complete/project | /modules/admin/classes/filter/FilterFactory.php | UTF-8 | 2,991 | 2.875 | 3 | [] | no_license | <?php
namespace modules\admin\classes\filter;
use modules\admin\classes\fields\FieldFactory;
use WebComplete\core\condition\Condition;
use WebComplete\core\utils\container\ContainerInterface;
class FilterFactory
{
const MODE_EQUAL = 1;
const MODE_LIKE = 2;
/**
* @var ContainerInterface
*/
... | true |
33c8ac5b81d22580b5f14d771719803bdde5fa67 | PHP | Burzhun/CodeFragments | /classes/post.php | UTF-8 | 2,715 | 2.828125 | 3 | [] | no_license | <?php
require_once('db.php');
class Post{
public $id;
public $title;
public $description;
public $type;
public $text;
public $image;
public $url;
function Post($id){
if(!isset($id['id']))
{
$array=self::GetPostById($id)->fetch_assoc();
$this->id=$... | true |
5c84f59d393f383c0a61e7f93fc38c763a263afa | PHP | yuanlianxiang/rwby | /PersonnelMS/Application/Admin/Model/SalaryModel.class.php | UTF-8 | 508 | 2.65625 | 3 | [] | no_license | <?php
namespace Admin\Model;
use Think\Model;
class SalaryModel extends Model{
protected $_validate = array(
array('username','require','请填写用户名!'), //默认情况下用正则进行验证
array('salary','require','请填写工资!'), //默认情况下用正则进行验证
array('department','require','请填写部门!'), //默认情况下用正则进行验证
array('date','r... | true |
f3429c41559f129b057f9015a77f5d96904069b8 | PHP | karayabin/universe-snapshot | /universe/Ling/Privilege/PrivilegeUser.php | UTF-8 | 2,567 | 2.953125 | 3 | [] | no_license | <?php
namespace Ling\Privilege;
Class PrivilegeUser
{
/**
* time out in seconds.
* If the user doesn't refresh the page before the timeout expires, she will be automatically disconnected.
*
* Or set to null to allow infinite timeout
*/
public static $sessionTimeout = 300; // 5 minut... | true |
9568bcf99c37476dbb374fc9abcd67fd61908acb | PHP | MiguelMurilloLan/Admin_p | /manejador-login.php | UTF-8 | 768 | 2.609375 | 3 | [] | no_license | <?php
session_start();
include_once('../php/connection.php');
include_once('../php/datos.php');
//print_r($_POST);
$datos = new Datos;
if(isset($_POST['submit'])){
$usuario=trim($_POST['Usuario']);
$pass=trim($_POST['Contrasena']);
$resultado = $datos->obtenerUsuario($usuario);
if(!is_null($resulta... | true |
50f8f9ebaec18e532fc6467b62bf4a4553a32219 | PHP | ProVince27/vince.delafuente | /utils/src/User/Traits/SetModifier.php | UTF-8 | 3,047 | 2.640625 | 3 | [] | no_license | <?php
namespace Icg\User\Traits;
use Icg\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;
/**
* Set the modifier for model
*/
trait SetModifier {
public static function setModifierFields(int $id, $fields = ['created_by', 'updated_by']) {
static::saving(function... | true |
a0ad817e2bf9ad1f388e76982b65f27121686d0e | PHP | netbrain/simphple-orm | /tests/Test/ReferenceTest.php | UTF-8 | 1,096 | 2.734375 | 3 | [] | no_license | <?php
namespace SimphpleOrm\Test;
/**
* Class ReferenceTest
* @package SimphpleOrm\Test
* @table reference
*/
class ReferenceTest {
/**
* @var integer
* @id
*/
private $id;
/**
* @var ReferenceTest
*/
private $reference;
/**
* @var ReferenceTest[]
*/
pr... | true |
65ecd4dcd21b879c433a5bdd014db58b81924d33 | PHP | theloomstudios/slackpoints | /classes/neon/class.neon.debug.php | UTF-8 | 629 | 2.734375 | 3 | [] | no_license | <?php
namespace Neon {
class Debug {
public static function get_data() {
// DB object
$db = new \Neon\Database();
// Get data
$results = $db->get_data("CALL Debug_GetData()",
array(
),
false
);
return $results;
}
// ====================================================... | true |
df78b7c11ff9403f9b21ced88c3fc5e5799f79bc | PHP | markwalet/dotenv-manager | /src/DotenvManager.php | UTF-8 | 2,311 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace MarkWalet\DotenvManager;
use Closure;
use MarkWalet\DotenvManager\Adapters\DotenvAdapter;
use MarkWalet\DotenvManager\Exceptions\InvalidArgumentException;
/**
* Class DotenvManager.
*
* @method bool add(string $key, $value = null)
* @method bool create(string $key, $value = null)
* @method bool ... | true |
d32fc6145c71b2bb05d4180ce220f4ded91eaa53 | PHP | pildit/GabonWeb | /app/Services/PageResults.php | UTF-8 | 4,379 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
class PageResults
{
protected $per_page = 50;
protected $page = 1;
protected $filters = [];
protected $sortCriteria = [];
protected $sortFields = ['id'];
protected $sort = ['desc']... | true |
f8c0ed7c9d72a0c036862cdf9849c32fb4b9289c | PHP | phatshambler/nikoprojectalpha3 | /ExpoSciences/PHP/ch_motdepasseAct.php | ISO-8859-1 | 1,120 | 2.546875 | 3 | [] | no_license | <?php
require_once("PHP/defaultAct.php");
class ChmotdepasseAction extends DefaultAct {
public $errorCode;
public $password;
public function __construct() {
parent::__construct(DefaultAct::$VISIBILITY_PUBLIC);
}
protected function executeAction() {
if (isset($_SESSION["username"])) {
... | true |
586022f342ffa32a38fdaabcc553982b1d8dabc8 | PHP | aajinu/lingga | /application/controllers/Welcome.php | UTF-8 | 41,650 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
$date = date("Y-m-d H:i:s");
class Welcome extends CI_Controller {
// aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
function __construct()
{
parent::__construct();
$this->load->model('m_data');
}
public function index()
... | true |
b7d3a5d00b699d7841140003b1930ee9b0254b2e | PHP | liquorvicar/AdventOfCode2020 | /src/Answer19.php | UTF-8 | 5,121 | 2.96875 | 3 | [] | no_license | <?php
namespace AdventOfCode;
class Answer19 extends Base
{
public function one(array $input)
{
$rules = [];
while (true) {
$line = array_shift($input);
if (!trim($line)) {
break;
}
$rules[] = trim($line);
}
$mess... | true |
70f0677b353adc01b5a085095edaaa37d39bb4f2 | PHP | rjhdby/MobileServer | /class/onway.class.php | UTF-8 | 3,250 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
require_once 'db.class.php';
require_once 'auth.class.php';
class onway {
private $params;
function __construct($params) {
$this->params = $params;
$apk = new db ();
if ($this->check_prereq ()) {
$this->params ['owner_id'] = implode ( $apk->query ( 'SELECT id FROM users... | true |
1bf81d3d1c6e75fd8f0b004948085a5d0ef21a34 | PHP | mauroale/learning-laravel-5 | /app/Articles.php | UTF-8 | 1,161 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class Articles extends Model
{
protected $fillable = [
'title',
'body',
'published_at',
'user_id'
];
// Tornando o campo published_at um objeto do Carbon
prote... | true |
c06e123ab4e842b4da489143bd270c007b499ea3 | PHP | omikrom/StarTrader-PHP | /showpoi.php | UTF-8 | 1,611 | 2.640625 | 3 | [] | no_license | <? include("conninfo.php");
include("nav.php")?>
<?
$query="SELECT * FROM pointofinterest,locationtbl,planet,systemtbl WHERE pointofinterest.location_id=locationtbl.locationid AND locationtbl.planet_id=planet.planetid AND planet.system_id=systemtbl.systemid";
$result=mysqli_query($link,$query)or die(mys... | true |
2e9c133d55477b310cff9f0bf5c58cc749bc54d2 | PHP | kosmosqc/TP2 | /TP2/traitement.php | UTF-8 | 365 | 2.5625 | 3 | [] | no_license | <?php
session_start();
session_regenerate_id();
if (isset($_GET['text']) && $_SESSION['type']==='utilisateur') {
require "db.php";
$pdo = creerPDO();
$text = $_GET['text'];
$pdo_statement =$pdo->prepare("UPDATE Article SET Contenu= :le_texte WHERE Id=1");
$pdo_statement->execute(['le_texte' ... | true |
848f7ad56a1fd95d74c08c4301d43b2b3dddc16b | PHP | tuqing/finecms | /shop/libraries/Dfilter.php | UTF-8 | 1,515 | 2.578125 | 3 | [] | no_license | <?php
/**
* Dayrui Website Management System
*
* @since version 2.0.0
* @author Dayrui <dayrui@gmail.com>
* @license http://www.dayrui.com/license
* @copyright Copyright (c) 2011 - 9999, Dayrui.Com, Inc.
* @filesource svn://www.dayrui.net/v2/dayrui/libraries/Dfilter.php
*/
/**
* 表单数据过滤
*/
class Dfi... | true |
bd6ed4061bd198ecf305102ce827ade36b53453b | PHP | IronLadyVic/Assignment-paperbag | /edit-my-account.php | UTF-8 | 2,748 | 2.640625 | 3 | [] | no_license | <?php
session_start();
require_once("includes/view-form.php");
require_once("includes/view.php");
require_once("includes/collection.php");
require_once("includes/member.php");
//redirect to login page if member has not logged in.
if(!isset($_SESSION['MemberID'])){
header("Location:login.php");
}
$oMember = new Memb... | true |
e3170540936d7d5921fe0065d81729b70a5e4015 | PHP | montogeek/capaon | /application/models/participante.php | UTF-8 | 352 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
// Modelo de la tabla conferencistas.
class Participante extends Eloquent{
// Relacion existente con los clientes de 1 a *
public function cliente()
{
return $this->has_one('Cliente');
}
//Relacion existente con los cursos de 1 a *
public function curso()
{
return $thi... | true |
37779013bd10698cff83ff245fe2d7a477d7be45 | PHP | hao289/composer | /web/controller/Index.php | UTF-8 | 802 | 2.640625 | 3 | [] | no_license | <?php
namespace web\controller;
use core\View;
use Gregwar\Captcha\CaptchaBuilder;
class Index
{
// 保存实例化的 view 对象
protected $view;
// 构造函数中,实例化一个 View 模型
public function __construct()
{
$this->view = new View();
}
public function show()
{
return $this->view->make('index')->with('version', '版本:1.0 copy... | true |
291d7208e7a9cb0c925adbe68b45bbd9c6e41f39 | PHP | rocksbrasil/website-kickstart | /functions.php | UTF-8 | 18,372 | 2.71875 | 3 | [] | no_license | <?php
function getExistentUrlPath() {
if (!isset($_SERVER['HTTP_HOST'])) {
return '';
}
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$folderDivisor = '\\';
} else {
$folderDivisor = '/';
}
$urlPath = $_SERVER['REQUEST_URI'];
if ($urlPath[0] == '/') {
$url... | true |
9badf2f1bf42b69a28d17abef12d01757e796fa5 | PHP | jjhna/wordpressexample | /themes/fictional-university-theme/page-my-notes.php | UTF-8 | 3,509 | 2.84375 | 3 | [] | no_license | <?php
//This is the php file that is used for the my notes so that users can create, edit and delete
//their own posts/notes by using the rest of the CRUD operations
//if the user is logged out then they are redirected to the front page
if (!is_user_logged_in()) {
wp_redirect(esc_url(site_url('/')));
... | true |
66ca8fce88a393fc50a68ae5de64cd4194bcbc40 | PHP | abarbod/laratabs | /tests/functional/TranslatorTest.php | UTF-8 | 851 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Fish\Laratabs\HTML\Presenter\Translator;
class TranslatorTest extends \Codeception\TestCase\Test
{
/**
* @var \FunctionalTester
*/
protected $tester;
protected function _before()
{
}
protected function _after()
{
}
/** @test */
public function translate_tabs... | true |
5b6af9ad210afdb5947cd2dcccfb1b36bdac99d9 | PHP | saysa/blog-perso | /Framework/App.php | UTF-8 | 2,018 | 2.703125 | 3 | [] | no_license | <?php
namespace Framework;
class App
{
/**
* @var $container Container
*/
private $container;
public function __construct()
{
$this->init();
$this->run();
}
private function init()
{
$this->container = new Container();
$this->define();
}
... | true |
7293b99875b8d2ddd3435eb86a74aa1fdc5b7710 | PHP | robrig92/gestionservicios-api | /app/Http/Controllers/NotificacionesController.php | UTF-8 | 3,436 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Notificacion;
use Illuminate\Http\Request;
class NotificacionesController extends Controller
{
/**
* Obtiene todos los registros del almacenamiento.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$notificaciones... | true |
4b2301ee3b9d13b2d2f80d4862d43cfd0f26deac | PHP | ypn/vjs | /Modules/QuanLyXeRaVao/Entities/CheckPoints.php | UTF-8 | 2,098 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\QuanLyXeRaVao\Entities;
use Illuminate\Database\QueryException;
use Illuminate\Database\Eloquent\Model;
use Config;
class CheckPoints extends Model
{
protected $fillable = [''];
protected $table ='checkpoints';
/**
* created by: ypn - ypn@vijagroup.com.vn
* desc: Thêm c... | true |
063337ccceb04a947f308ca8b7b1f92ebcc07f07 | PHP | SunojJose/Web_App_Develop_Project | /signup.php | UTF-8 | 5,247 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
require_once "main.php";
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['signup'])) {
$password = '';
$user_name = $db->connect->real_escape_string($_POST['user_name']);
$email = $db->connect->real_escape_string($_POST['email']);
$password1 = $db->connect->real_... | true |
9d558e2f9ab7d0e5199336790a35d0695e6059c3 | PHP | owen-kellie-smith/financial-maths-mediawiki | /FinancialMathematics/PEAR/HTML/QuickForm2/Rule/Each.php | UTF-8 | 6,298 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Validates all elements in a Container using a template Rule
*
* PHP version 5
*
* LICENSE:
*
* Copyright (c) 2006-2014, Alexey Borzov <avb@php.net>,
* Bertrand Mansion <golgote@mamasam.com>
* All rights reserved.
*
* Redistribution and use in source and binary... | true |
5f5ba36db8d22fac9eacf87957f82d19f0612ae5 | PHP | Corpofin/prj_laravelapi | /app/Http/Resources/BaseResource.php | UTF-8 | 1,409 | 2.65625 | 3 | [] | no_license | <?php
//<project>/app/Http/Resources/BaseResource.php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\Resource;
abstract class BaseResource extends Resource
{
public static $map = [];
public static function mapAttribute($attribute,$invert=FALSE)
{
if($invert)
retu... | true |
1410d0ff17804b15d19fcfaee50bb3c2b5beab75 | PHP | miscampbell/Module.Stem | /tests/Schema/Columns/DecimalTest.php | UTF-8 | 945 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Rhubarb\Stem\Tests\Schema\Columns;
use Rhubarb\Crown\Tests\RhubarbTestCase;
use Rhubarb\Stem\Tests\Fixtures\Example;
class DecimalTest extends RhubarbTestCase
{
public function testDataTransforms()
{
$example = new Example();
// Test the min and max limits of the range
... | true |
7a2c7ed3e855ce233dcab40d6a9441c7bb03b90b | PHP | COP4331C/ContactManager | /LAMPAPI/fetchContacts.php | UTF-8 | 1,326 | 2.765625 | 3 | [] | no_license | <?php
$conn = new mysqli("localhost", "root", "cop4331", "database");
$inData = getRequestInfo();
if ($conn->connect_error)
{
returnWithError( $conn->connect_error );
}
else
{
$id = $inData["id"];
$sql = "SELECT * FROM contact_list where id='" . $id . "'";
//$result = $conn->query($sql);
$result = mysqli_qu... | true |
82dee44b90b9bc3120ed21f05b0476d05a67bac0 | PHP | brandonforster/PopDoxa | /python_scripts/get_feedback.php | UTF-8 | 503 | 2.765625 | 3 | [] | no_license | <?php
include 'get_connection.php';
get_feedback($conn);
catch (PDOException $e)
{
echo "Connection failed: " . $e->getMessage();
return;
}
$conn = null;
function get_feedback($conn)
{
$query = "SELECT user_id, content, ts FROM feedback";
$query = $conn->prepare($query);
$query->execute();
... | true |
1d9be58ff8777f38f32bb9ca9aeadec89312b1c4 | PHP | coreight/ecommerce | /src/App/Administrator.php | UTF-8 | 1,201 | 2.828125 | 3 | [] | no_license | <?php
namespace App;
use App\Interfaces\CRUDInterface;
use App\Commercials\Promotion;
class Administrator extends User implements CRUDInterface
{
/**
* Surcharge de la méthode GET de la classe User
* @return string
*/
public function getFirstname()
{
return "ADMIN : ".$this->firstn... | true |
a2f436184df2b5faf89d01603e878485dd2032e4 | PHP | jhartman86/schedulizer-package-57 | /src/EventTime.php | UTF-8 | 10,352 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace Concrete\Package\Schedulizer\Src {
use \DateTime;
use \DateTimeZone;
use \Concrete\Package\Schedulizer\Src\Event;
use \Concrete\Package\Schedulizer\Src\EventTimeNullify;
use \Concrete\Package\Schedulizer\Src\Persistable\Contracts\Persistant;
use \Concrete\Package\Schedulizer\Src... | true |
ba12574788623f2d50f2f7bca6a5efd54e6ecb0f | PHP | gallu/CareerCollege | /htdocs/bak_2020/string.php | UTF-8 | 249 | 3.0625 | 3 | [] | no_license | <?php // string.php
// http://dev2.m-fr.net/アカウント名/string.php
$v = 'ABC';
$s_1 = 'string is {$v}<br>';
var_dump($s_1);
$s_2 = "string is {$v}<br>";
var_dump($s_2);
$s_3 = "string is " . $v . "<br>";
var_dump($s_3);
| true |
3225cb4b7d4f60d89203c3800d87353aa9cf4254 | PHP | KaHongTam/portfolio | /index1.php | UTF-8 | 610 | 2.8125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="main.j... | true |
9e80886a7abb0970d485bf32f197c340a9b5b330 | PHP | giovannabonicelli/projet | /giovanna_bonicelli-projet/Bonicelli-depot-projet/projet/afficherev.php | UTF-8 | 742 | 2.609375 | 3 | [] | no_license |
<?php
function afficher($table)
{
include("BD.php");
$reponse = $bdd->query("SELECT nom, prenom, option, annee from coopere, etudiant, evenement WHERE etudiant.ine=coopere.ine AND nom_ev='".$table."' AND evenement.numero_ev=coopere.numero_ev;");
$tab = $reponse->fetchAll();
?>
<table border="3">
<caption><h2 ... | true |
1b49504b210ca2dd23132c0ef89a3fd78aa8c3c2 | PHP | proton-labs/proton | /src/Application/Command/ExtensionRegistry.php | UTF-8 | 2,845 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Proton package.
*
* (c) Andrzej Kostrzewa <protonlabs@int.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Proton\Application\Command;
use Proton\Applicat... | true |
142cdb522f94816ef1bb4f00dfa4311cdb5a5ab2 | PHP | n00k13/SIS-Gamification | /api/models/checkins/checkinfactory.php | UTF-8 | 1,836 | 2.921875 | 3 | [] | no_license | <?php
require_once ("database/dbconf.php");
require_once ("checkinmodel.php");
class CheckinFactory {
public static function read() {
$query = "SELECT * FROM checkins";
$res = GlobalDatabase::$database -> query($query);
$modelResult = array();
while ($row = $res -> fetch()) {
$m = new CheckinModel($row -... | true |
74aba8f0da991f217b0f3d0a7c9ba62449f8f990 | PHP | abdulrehman97/ynz | /wp-content/plugins/amazon-auto-links/include/core/main/event/query/feed/AmazonAutoLinks_Event___Feed_JSON.php | UTF-8 | 1,793 | 2.546875 | 3 | [
"GPL-2.0-only",
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Amazon Auto Links
*
* Generates links of Amazon products just coming out today. You just pick categories and they appear even in JavaScript disabled browsers.
*
* http://en.michaeluno.jp/amazon-auto-links/
* Copyright (c) 2013-2020 Michael Uno
*/
/**
* Handles JSON feed output.
*
* @package A... | true |
0477a6f54bd956d899bf297198c9d7f183cf8189 | PHP | microsoftgraph/msgraph-beta-sdk-php | /src/Generated/Models/DelegatedPermissionClassification.php | UTF-8 | 5,006 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Microsoft\Graph\Beta\Generated\Models;
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
class DelegatedPermissionClassification extends Entity implements Parsable
{
... | true |
d6b3c1726fbeea78c999a7e63b2fd7fea7788c28 | PHP | bezhermoso/WallbaseMiner | /module/WbMiner/src/WbMiner/Event/RemoveJobListener.php | UTF-8 | 1,758 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright 2014 Bezalel Hermoso <bezalelhermoso@gmail.com>
*
* This project is free software released under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*/
namespace WbMiner\Event;
use WbMiner\Job\Process\MainProcessor;
use WbMiner\Job\Process\ProcessEvent;
use WbMiner\Job\... | true |
5b73c3e3986a6a49391bce848af7c28c8c66928f | PHP | Darshana97/my_php | /foreach.php | UTF-8 | 527 | 3.296875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Fore-Each</title>
</head>
<body>
<?php
$job_categories = array("Accounting","Finance","It","Maketing","Sales");
foreach ($job_categories as $job_category) {
echo $job_category;
echo "<br>";
}
?>
<br>
<?php
$student = array("first_... | true |
d8144d39f64096379be3f13a3616b08810687b0a | PHP | GeNyaa/shopware-api-sdk | /src/Dto/Resources/Manufacturer.php | UTF-8 | 1,009 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace GeNyaa\ShopwareApiSdk\Dto\Resources;
use GeNyaa\ShopwareApiSdk\Dto\DtoAbstract;
final class Manufacturer extends DtoAbstract
{
public function __construct(
public string $id,
public ?string $name,
public ?string $description = null,
publ... | true |
ca74366f901c62e5df0c09b8335b0dcdf57a2ea5 | PHP | jacekkulis/shooting-range | /server/src/signin.php | UTF-8 | 844 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
use src\models\DbConnect;
require "../vendor/autoload.php";
// array for JSON response
$response = array();
if(!isset($_POST['username']))
{
$response['error'] = true;
$response["message"] = "Server: Username field is not set.";
echo json_encode($response);
}
else ... | true |
1238d9768797d4fbb7d4913de3da89e2dc3ab87c | PHP | LucasNoga/Sample-files | /PHP files/somme_tableau.php | UTF-8 | 267 | 3.8125 | 4 | [] | no_license |
<?php
echo "<pre>";
//indice 0 à 6
$a = array(0 =>"a","b","c","d","e","f","g");
echo "<br>";
var_dump($a);
//commence a l'indice 15 jusqu'a 22
$b = array(15 => "h","i","j","k","l","m","n");
echo "<br>";
var_dump($b);
$c = $a + $b;
echo "<br>";
var_dump($c); | true |
e3df334d803fbbf92bce2027afc4d751c35d30a2 | PHP | ezra-obiwale/productsup | /tests/Feature/DataControllerTest.php | UTF-8 | 4,189 | 2.5625 | 3 | [] | no_license | <?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
use App\Entities\Data;
use Illuminate\Foundation\Testing\TestResponse;
use Storage;
class DataControllerTest extends TestCase
{
use WithFaker;
public static func... | true |
6e5cace6d0d44302103bc2254d41d92e0164ab78 | PHP | hindaljabr/elearning | /app/Model/Room.php | UTF-8 | 368 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class Room extends Model
{
// constants for identifying room statu
const AVAILABLE = "AVAILABLE";
const BOOKED = "BOOKED";
/**
* The attributes that are not mass assignable.
*
* @var array
*/
protected $guarded = [
... | true |
f5ec37e73d119b99cda97763dff8a77054c56ea6 | PHP | sacechacon/entregatest | /producto.entidad.php | UTF-8 | 209 | 2.640625 | 3 | [] | no_license | <?php
class producto
{
private $id;
private $bodega;
private $nombreproducto;
private $cantidad;
public function __GET($k){ return $this->$k; }
public function __SET($k, $v){ return $this->$k = $v; }
} | true |
b4fc6a6697ba4a41f0345890c784f5069557fe7e | PHP | DiegoClrX/DesarrolloPracticas | /Tema3/Practica 1/Ejercicio 6/carrito.php | UTF-8 | 2,183 | 2.921875 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['user-agent']))
$_SESSION['user-agent'] = $_SERVER['HTTP_USER_AGENT'];
else {
if ($_SESSION['user-agent'] != $_SERVER['HTTP_USER_AGENT'])
session_destroy();
}
if (!isset($_SESSION['carrito'])) {
$_SESSION['carrito'] = array();
}
?>
<!DOCTYPE html>
<html ... | true |
d9613fd233b1fb1d83a2ae933d246b8d2ddfcfe4 | PHP | mnapoli/MniPagesBundle | /src/Mni/PagesBundle/Page/Page.php | UTF-8 | 487 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Mni\PagesBundle\Page;
use Mni\PagesBundle\Component\Component;
/**
* Abstract class representing a page.
*
* A page can be viewed as a special kind of component, that's why it inherits from Component.
*
* @author Matthieu Napoli <matthieu@mnapoli.fr>
*/
abstract class Page extends Component
{
... | true |
ebb219ce19abcadd2d17375fde49271cedb28ce4 | PHP | Md-khaled/online-ecommerce-shop | /classes/User.php | UTF-8 | 4,117 | 2.640625 | 3 | [] | no_license | <?php
$filepath=realpath(dirname(__FILE__));
include_once ($filepath.'/../lib/Database.php');
include_once($filepath.'/../helpers/Format.php');
?>
<?php
class User{
private $db;
private $fm;
public function __construct(){
$this->db=new Database();
$this->fm=new Format();
}
public function userRegtration($... | true |