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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
51fbe77cf7578bea94138f41e8e5744d8ca0ad7d | PHP | HarunUmar/myidea | /app/User.php | UTF-8 | 1,320 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable implements MustVerifyEmail
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
... | true |
8ec76c0129867d17450c9ee03735e6694b0be1c7 | PHP | vladkudinov89/bsa-2018-php-6 | /app/Services/Currency.php | UTF-8 | 1,741 | 3.203125 | 3 | [] | no_license | <?php
namespace App\Services;
use phpDocumentor\Reflection\Types\Boolean;
class Currency
{
// todo implement
private $id;
private $name;
private $shortName;
private $actualCourse;
private $actualCourseDate;
private $isActive;
public function __construct(
int $id,
stri... | true |
7a80c204ca0bb9ae1a4394d15b7a97cca1a5f499 | PHP | BiffBangPow/job-adder-job-board | /src/API/JobAdderAPIClient.php | UTF-8 | 6,707 | 2.546875 | 3 | [] | no_license | <?php
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\GuzzleException;
use Psr\Http\Message\ResponseInterface;
use SilverStripe\Core\Config\Config;
use SilverStripe\ORM\ValidationException;
use SilverStripe\SiteConfig\SiteConfig;
class JobAdderAPIClient
{
private $apiBase... | true |
3e08b7897e6c58952bc2a78de53c0a83f4dedd30 | PHP | santhoshkumarjs/phpexcel_library | /oops/overloading.php | UTF-8 | 1,301 | 4.34375 | 4 | [] | no_license | <?php
# Overloading properties via the __get(), __set(), __isset() and __unset() methods
# Overloading methods via the __call() and __callStatic() methods
class OverloadingClass{
private $data = array();
public $inital = "kumar";
public function __set($name, $value){
$this->data[$name] = $value;
}
public ... | true |
82c25199dd3d9d0cd65ed5b91bc914b128e2200a | PHP | Sohuth/A3_Grp1_Validator | /index.php | UTF-8 | 2,571 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Benjamin
* Date: 22/11/2014
* Time: 16:02
*/
require __DIR__.'/vendor/autoload.php';
$equal = \Sohuth\Validator\IntValidator::equal(10, 10);
$superior = \Sohuth\Validator\IntValidator::superior(10, 5);
$inferior = \Sohuth\Validator\IntValidator::inferior(5, 10);
$between ... | true |
4b1921e3da65098ac11ebe867ccc84c54d0e82c9 | PHP | dantleech/gherkin-lint-php | /src/Model/RuleConfigFactory.php | UTF-8 | 940 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace DTL\GherkinLint\Model;
final class RuleConfigFactory
{
public function __construct(
private ConfigMapper $mapper,
/**
* @var array<string,ConfigRule>
*/
private array $ruleConfig
) {
}
public function isEnabled(string $name): bool
{
... | true |
17557d375b199dd1caf74460edf8e73916805f3d | PHP | chiragbhatia94/learn-php | /universal/Garima/fibb.php | UTF-8 | 150 | 3.53125 | 4 | [] | no_license | <?php
$i;
$n=7;
$a=0;
$b=0;
$fib=0;
echo"Fibonacci Series Is : ";
for($i=0;$i<=$n;$i++)
{
$fib=$a+$b;
$a=$b;
$b=$fib;
echo $fib.",";
}
?>
| true |
bf4e7594f5f82e47f3a3215f8c5e5b30b6e76f92 | PHP | dodev34/twig-extensions-bundle | /src/M12U/Bundle/TwigExtensionsBundle/Twig/UcWordsExtension.php | UTF-8 | 610 | 2.671875 | 3 | [] | no_license | <?php
namespace M12U\Bundle\TwigExtensionsBundle\Twig;
/**
* Class UcWordsExtension
* @package M12U\Bundle\TwigExtensionsBundle\Twig
*/
class UcWordsExtension extends \Twig_Extension
{
/**
* @inheritdoc
*/
public function getFilters()
{
return [
new \Twig_SimpleFilter('uc... | true |
080b7c8b59daa40de53ca085c9de95c5b24b4689 | PHP | chronick/swagger-mock | /src/Mock/Generation/Value/Length/LengthGenerator.php | UTF-8 | 734 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Swagger Mock.
*
* (c) Igor Lazarev <strider2038@yandex.ru>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Mock\Generation\Value\Length;
/**
* @author Igor Lazarev <strider2038@yande... | true |
64f12f2eaddca222a96251a2f7e43e14e095e328 | PHP | Cwissiee/3TID1-PHP_Examen | /include/inscription.runtime.php | UTF-8 | 19,352 | 3 | 3 | [] | no_license | <?php
// Si en allant sur la page inscription, aucune étape n'est en cours de réalisation, alors on arrive à l'étape 1 par défaut
if (empty($_SESSION['inscription']['etape'])) {$_SESSION['inscription']['etape'] = 1;}
// Si la variable session inscription statut existe, alors on récupère les données en r... | true |
3af9865985466336111efca22b5ad9a2aa58db79 | PHP | Simomsprite/lingbeisystem | /plugins/wechat/wechat.php | UTF-8 | 27,062 | 2.703125 | 3 | [] | no_license | <?php
/**
* @copyright (c) 2015 aircheng.com
* @file wechat.php
* @brief 微信API接口
* @date 2016/2/19 10:42:25
* @version 4.4
*/
class wechat extends pluginBase
{
//微信API地址
const SERVER_URL = "https://api.weixin.qq.com/cgi-bin";
private $sslConfig = array(
"ssl"=>array(
"verify_peer"=>false,
... | true |
0f48fce4c412e020c9e55b838c608556dbdf338c | PHP | gabe61/Laravel-bemusic- | /app/Services/Albums/AlbumsRepository.php | UTF-8 | 4,791 | 2.640625 | 3 | [] | no_license | <?php namespace App\Services\Albums;
use App\Album;
use App\Artist;
use App\Services\Artists\ArtistSaver;
use App\Services\Paginator;
use App\Services\Providers\ProviderResolver;
use Common\Settings\Settings;
use App\Track;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Support\Arr;
class Al... | true |
e3f9eceaed023d69e63f797ab5556f13c17d2b5d | PHP | ddmler/phpsa | /src/Analyzer/Pass/Scalar/CheckLNumberKind.php | UTF-8 | 990 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace PHPSA\Analyzer\Pass\Scalar;
use PhpParser\Node\Scalar;
use PHPSA\Analyzer\Helper\DefaultMetadataPassTrait;
use PHPSA\Analyzer\Pass\AnalyzerPassInterface;
use PHPSA\Context;
class CheckLNumberKind implements AnalyzerPassInterface
{
use DefaultMetadataPassTrait;
const DESCRIPTION = 'Using octa... | true |
868175d034f1df7c234bcfd65be44ff6a3cdfba0 | PHP | isaactorresmichel/wp-lets-start | /src/WPstart/Commands/DefaultCommand.php | UTF-8 | 2,133 | 2.625 | 3 | [] | no_license | <?php
namespace isaactorresmichel\WordPress\WPstart\Commands;
use Joli\JoliNotif\Notification;
use Joli\JoliNotif\NotifierFactory;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Console\Input\InputInter... | true |
7b4ed97f4f12aa49f5fa038986566ba9bd4dc7df | PHP | tedohac/maganghub | /database/migrations/2019_08_19_000007_create_dospems_table.php | UTF-8 | 982 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDospemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('dospems', funct... | true |
abc0523497444d725e2acaca3d6a171e6d88b908 | PHP | AnonymPHP/Anonym-Library | /src/Anonym/Route/Matchers/MatcherInterface.php | UTF-8 | 428 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file belongs to the AnoynmFramework
*
* @author vahitserifsaglam <vahit.serif119@gmail.com>
* @see http://gemframework.com
*
* Thanks for using
*/
namespace Anonym\Route\Matchers;
/**
* Interface MatcherInterface
* @package Anonym\Route\Matchers
*/
interface MatcherInterface
{
/**
... | true |
30c61a6f637501908d550502abb3b2a6ddfc3c28 | PHP | Jampire/symfony-learning | /src/Events/VideoCreatedEvent.php | UTF-8 | 420 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Events;
use Symfony\Contracts\EventDispatcher\Event;
class VideoCreatedEvent extends Event implements VideoCreatedEventInterface
{
public const NAME = 'video.created.event';
protected $video;
public function __construct($video)
{
$this->video = $video;
}
/**
... | true |
1820210ae1e8dafc6642ee143142043f885c3cee | PHP | craigify/mrlib | /modules/auth/MrAuthGroup.php | UTF-8 | 6,303 | 3 | 3 | [] | no_license | <?php
// Mister Lib Foundation Library
// Copyright(C) 2015 McDaniel Consulting, LLC
//
// Authentication Layer
//
// This class represents an authentication group, which has auth levels
// assigned to it. Any user added to a group will inherit the auth levels
// of the group automatically.
mrlib::load("sql/MrORM");
... | true |
3e567ffbdf61b5778b5a7c835ba4d5ab5b157b42 | PHP | phpManufakturHeirs/kfFlexContent | /Control/Filter/Glossary.php | UTF-8 | 7,520 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* flexContent
*
* @author Team phpManufaktur <team@phpmanufaktur.de>
* @link https://kit2.phpmanufaktur.de/flexContent
* @copyright 2014 Ralf Hertsch <ralf.hertsch@phpmanufaktur.de>
* @license MIT License (MIT) http://www.opensource.org/licenses/MIT
*/
namespace phpManufaktur\flexContent\Control\Filt... | true |
d1454f611d6163aaed727e60bd30ee49ec2a6031 | PHP | GUI-CUI/miriad | /manuals/uguide/cmdline.inc | UTF-8 | 3,076 | 2.515625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | %% This file is to be included by latex in ug.tex
%
% The Command Line Interface
%
\mylabel{s:cmdline}
\myfile{cmdline.inc}
MIRIAD tasks can always be run by specifying its
parameters on the command line.
A parameter is specified by equating the parameter to its
value. For example, {\tt out=gauss} sets the parameter {... | true |
0691c1baba02a5aea7320fbd82714578952c2b84 | PHP | Patrick-Elvis/airtable-php | /src/Airtable/Filter/ConditionsSet.php | UTF-8 | 3,058 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
namespace Zadorin\Airtable\Filter;
use Zadorin\Airtable\ArgParser;
use Zadorin\Airtable\Errors;
class ConditionsSet
{
/** @var Condition[] */
protected array $conditions = [];
public function push(Condition $condition): self
{
$this->conditions[] = $condition;
return $this;
... | true |
381a497b396eb7bbb464ce2630d38844f9362164 | PHP | alex1998dmit/CorporateLearning | /database/migrations/2019_10_30_144314_create_curators_table.php | UTF-8 | 943 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCuratorsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('curators', fun... | true |
c1b58ab20f13e86da7f47836f9681a7bb6d560c6 | PHP | akhileshmalu/ShapeTerra | /Resources/Includes/FPDFExtended.php | UTF-8 | 118,777 | 3.015625 | 3 | [] | no_license | <?php
error_reporting(1);
@ini_set('display_errors', 1);
require "../Library/FPDF/fpdf.php";
require "../Library/FPDI/fpdi.php";
class Table extends FPDI
{
var $widths;
var $aligns;
public function SetWidths($w)
{
//Set the array of column widths
$this->widths=$w;
}... | true |
3a43ff12ac4851e40ec0fcb1c4c7425a6a0c8d12 | PHP | bardascat/NeoMvc | /NeoMvc/Controllers/NeoCart.php | UTF-8 | 8,029 | 2.65625 | 3 | [] | no_license | <?php
namespace NeoMvc\Controllers;
/**
* Description of index
* @author Bardas Catalin
* date: Jun 28, 2013
*/
use NeoMvc\Models\ProductsModel;
use NeoMvc\Models as Models;
use NeoMvc\Libs\Cookie;
use NeoMvc\Libs\NeoMail;
use NeoMvc\Models\Entity as Entity;
class NeoCart extends controller {
/** @var produ... | true |
4cbbf675cdf1a302644cad3ab8c25ef11a31b057 | PHP | pdscopes/database | /tests/Integration/Compiler/MySqlTruncateTableTest.php | UTF-8 | 522 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace MadeSimple\Database\Tests\Integration\Compiler;
use MadeSimple\Database\Statement\TruncateTable;
use MadeSimple\Database\Tests\CompilableMySqlTestCase;
class MySqlTruncateTableTest extends CompilableMySqlTestCase
{
/**
* Test truncating a table.
*/
public function testTruncateTableT... | true |
7557f80b8468543d265259d5ef5c76ab2b20fc08 | PHP | MarcinOrlowski/laravel-api-response-builder | /src/Validator.php | UTF-8 | 9,500 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MarcinOrlowski\ResponseBuilder;
/**
* Laravel API Response Builder
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2016-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/... | true |
4997d5b29cbe697881ebdffb4ac6eea538f61896 | PHP | Alexpon/HK_SummerCamp_Android_Lab | /FinalProj/php/RefreshUserData.php | UTF-8 | 499 | 2.609375 | 3 | [] | no_license | <?php
$con = mysqli_connect("host", "username", "password", "database");
$username = $_POST["username"];
$name = $_POST["name"];
$age = $_POST["age"];
$distance = $_POST["distance"];
$statement = mysqli_prepare($con, 'UPDATE User SET name = ? , age = ? , distance = ? WHERE username = ? AND password = ?');
mysql... | true |
07e2a9c8a9374a96193d3ee49f4a732e98d2ef2d | PHP | ihsanaryandi/ainno | /application/helpers/user_helper.php | UTF-8 | 1,106 | 2.765625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
$currentUser = [];
function user($index = null) {
global $currentUser;
$ci = get_instance();
if(isset($currentUser[$ci->session->userdata('user_id')]))
{
if($index)
{
return $currentUser[$ci->session->userdata('user_id')][$index];
}
return $currentUser[$ci->session->userdata('user_id'... | true |
6a29b809183eb9a28ac50d8da02488c1637d8256 | PHP | myahk/autohotkey-server-login-register | /Server/AABackup/resetpasswordrequest.php | UTF-8 | 3,267 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
require_once("includes/config.php");
if($user->is_logged_in())
{
header("Location: memberpage.php");
exit;
}
//if form has been submitted process it
if(isset($_POST['submit']))
{
//email validation
if(!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL))
{
$error[] = '유효한 이메일 주소를 입력해주세요.';
}
else
{
$... | true |
6e4842264193d5dc40045df981e99e678bf87338 | PHP | amine2z/behat-launcher | /src/Alex/BehatLauncher/Behat/FeatureDirectory.php | UTF-8 | 1,693 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Alex\BehatLauncher\Behat;
class FeatureDirectory implements \IteratorAggregate, \Countable
{
private $parent;
private $name;
private $entries = array();
public function __construct($name, FeatureDirectory $parent = null)
{
$this->name = $name;
$this->parent = $... | true |
14f3dcb63fa7c5fc63cdacf68bb0cd83b713908f | PHP | vigneshmersal/Task | /app/Support/TextAlignment.php | UTF-8 | 467 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Support;
class TextAlignment
{
public string $align;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(string $align = "left")
{
$this->align = $align;
}
public function className(): string
{
return... | true |
02a0c68bf0923f931920e04aaed2828d3fc4b348 | PHP | cesarviana/prefeitura | /api/dao/StrUtil.php | UTF-8 | 407 | 3.265625 | 3 | [] | no_license | <?php
/**
* Funções úteis para manipulação de strings.
*/
class StrUtil
{
function __construct() {}
// Quebra a string em um array de várias palavras, considerando uma lista de delimitadores
public static function multiexplode ($delimiters,$string) {
$ready = str_replace($delimiters, $delimiters[0], $string... | true |
f614b47ad4fa2e1dcf8c93a038c5af881052d92a | PHP | j-renan/Curso-PHP-Cod3r | /classes_objetos/static.php | UTF-8 | 1,664 | 3.5625 | 4 | [] | no_license | <div class="titulo">Membros Estáticos</div>
<?php
/* Atributos estáticos pertencem apenas a classe, eles não podem ser
instanciados da mesma forma que os atributos comuns. Eles são usados como
constantes de valor único que precisam ser declarados a cada nova instancia
criada */
Class A {
public $naoStatic = 'V... | true |
c68c49871c9e9c4045bdbcf2411818e47cbd1fad | PHP | imran-khan1/WC-Custom-Email | /wcik-email-functions.php | UTF-8 | 3,021 | 2.59375 | 3 | [] | no_license | <?php
/**
* Plugin Name: WooCommerce Custom Order Email
* Plugin URI: http://www.imran1.com/
* Description: Demo plugin for adding a custom WooCommerce email that sends admins an email when an order is received with Custom shipping
* Author: Imran Khan
* Author URI: http://www.imran1.com
* Version: 0.1
*/
... | true |
06402bc59b4d011c90afd3d65dcf0e17834a9d93 | PHP | Sebastien03/StartingPhp | /boucle.php | UTF-8 | 1,206 | 3.75 | 4 | [] | no_license | <?php
// Exercice 1 //
$boucle = 0;
echo "Exercice 1 : ";
while ($boucle < 10){
echo $boucle." ";
$boucle++;
}
// Exercice 2 //
$boucle2 = 0;
$boucle3 = 50;
echo "<br/>";
echo "Exercice 2 : ";
while ( $boucle2 != 20) {
$boucle4=$boucle2 * $boucle3;
echo $boucle4." ";
$boucle2++;
}
// Exercice 3 //
$bou... | true |
bd4f142f12581ecfac6c3fd9651faf28d2cc3cf9 | PHP | meghanakiran/Web-Based-Database | /Project/PHP/showtrig.php | UTF-8 | 692 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
$servername = "****";
$username = "****";
$password = "****";
$dbname = "****";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$select1 = $_POST['table'];
// sql... | true |
78b8bce67072949f217abfcb0945f06ce128bab4 | PHP | Adoniswalker/ShareRide | /register.php | UTF-8 | 6,853 | 2.859375 | 3 | [] | no_license | <?php
include "dependant/layout.php";
//require_once 'sesion_file.php';
//require_once 'db.connect.php';
include_once 'dependant/pro.functions.php';
// define variables and set to empty values
$first_name_err = $last_name_err = $email_err = $password1_err = $password2_err = NULL;
$first_name = $last_name = $email = $Pa... | true |
e608385f9bf78c86964b2a8e8d0ccb3db1c9144a | PHP | yanawalka/Adoptacan-Laravel | /app/Http/Controllers/borrar.php | UTF-8 | 854 | 2.6875 | 3 | [
"MIT"
] | permissive |
<?php
$imagefile = 'baterias.jpg';
/**
* Opens new image
*
* @param $filename
*/
/**
* Resize image maintaining aspect ratio, occuping
* as much as possible with width and height inside
* params.
*
* @param $image
* @param $width
* @param $height
*/
function resizeMax($image, $wi... | true |
c50d83a4e3bc3bf7dca2943d0fd7ee463eadc540 | PHP | NachoPLSauces/FinalNacho2021 | /model/usuario.php | UTF-8 | 2,560 | 3.734375 | 4 | [
"MIT"
] | permissive | <?php
/**
* Clase usuario
*
* Clase usuario que contiene los campos del usuario y métodos para acceder a ellos
*
* @since 27/01/2021
* @version 27/01/2021
*/
class usuario{
private $codUsuario;
private $password;
private $descUsuario;
private ... | true |
b241111b2bc861fd4950f1bc5072b1e93498a2c1 | PHP | corner82/codebase_v2_services | /slim_codebase_v2/vendor/bll/bll/InfoSales.php | UTF-8 | 2,248 | 2.53125 | 3 | [] | no_license | <?php
/**
* Framework
*
* @link
* @copyright Copyright (c) 2017
* @license
*/
namespace BLL\BLL;
/**
* Business Layer class for after sales dashboard data
*/
class InfoSales extends \BLL\BLLSlim{
/**
* constructor
*/
public function __construct() {
//parent::__constr... | true |
e07ae8f82a0ea27132a14733e28f0450788a5880 | PHP | placetopay/prestashop-placetopay | /src/Models/PaymentRedirection.php | UTF-8 | 1,866 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace PlacetoPay\Models;
use Dnetix\Redirection\Exceptions\PlacetoPayException;
use PlacetoPay\Helpers\Settings;
use Dnetix\Redirection\Message\CollectRequest;
use Dnetix\Redirection\Message\Notification;
use Dnetix\Redirection\Message\RedirectInformation;
use Dnetix\Redirection\Message\RedirectRequest;
use... | true |
c74bb069137b2e79f6a3a709ef534a44b079d3ff | PHP | 365556520/diziwserver | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 3,440 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Models\UsersModel\User_Data;
use App\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Auth;
class RegisterControlle... | true |
bf2d90f4eec91627178b020068dc88942b5c5247 | PHP | vadimua757/homework | /php_basics_tasks/15.php | UTF-8 | 939 | 3.71875 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<?php
$a = 3;
$b = 8;
$operator = '*';
switch ($operator) {
case "+";
echo $a + $b;
break;
case "-";
echo... | true |
a30866c60197d210a4b12ac6823a356b13dde5d6 | PHP | alex-patterson-webdev/orm | /Repository.php | UTF-8 | 4,063 | 2.875 | 3 | [] | no_license | <?php
namespace Orm;
use Orm\Entity;
use Orm\Metadata;
/**
* Orm\Repository
*
* @author Alex Patterson <alex.patterson.webdev@gmail.com>
*/
class Repository
{
/**
* $_entityName
*
* @var string The mapped entity name
*/
protected $_entityName = '';
/**
* $_className
*
* @var string... | true |
ee62159a6bb9b33bc2432a61caf24eb4c1922064 | PHP | GodLis/Mev_testing_php | /task2/index.php | UTF-8 | 837 | 2.96875 | 3 | [] | no_license | <?php
/**
* Index File Doc Comment
*
* This file is a part of a task2
*
* PHP version 7
*
* @category Testing
* @package GodLis\Task2
* @author Olechka Brajko <olechkabrajko@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @link https://github.com/GodLis/Mev_tes... | true |
3b51a26960718b66c44aec3a03f0fe58c39d8b01 | PHP | usemarkup/NeedleBundle | /src/Lucene/SearchTermProcessor.php | UTF-8 | 1,242 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Markup\NeedleBundle\Lucene;
/**
* An object that can normalize/ transform a literal search term into a form to be passed to a backend engine using Lucene syntax.
*/
class SearchTermProcessor
{
/**
* This filter cannot be combined with others using bitwise logic - t... | true |
8ebe0b59a68bf2c3580e4f3abfa8e156111e749b | PHP | leeagles/WBSSimpleSensorAPIv1 | /controller/read_sensors.php | UTF-8 | 670 | 2.640625 | 3 | [] | no_license | <?php
/* connect to web api to collect data */
$url = "http://localhost:8090/webapi/webapi.php?qry=a";
$wclient = curl_init($url);
curl_setopt($wclient, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($wclient);
$result = json_decode($response);
$sensor_data = $result->data;
//print_r($sensor_data);... | true |
69e5be5771d2f2ed5768b806ed5371e464a92f4d | PHP | webforsite/appleads | /tabela.php | UTF-8 | 790 | 2.890625 | 3 | [
"MIT"
] | permissive | $html ="<table class='table'>";
$html .= "<thead>
<tr>
<th>data</th>
<th>id</th>
<th>nome</th>
<th>whats</th>
<th>cep</th>
<th>cidade</th>
<th>interesse</th>
<th>vendedor</th>
</tr>
</thead>";
$html .="<tbody>";
for($i = 0; $i < count($result); $i++){
$html .= "... | true |
cafaf58e924d996c452d9c14dc5e3d7968653d15 | PHP | vuong93st/w-game | /libraries/device.class.php | UTF-8 | 1,595 | 2.5625 | 3 | [] | no_license | <?php
/**
* PHPB2B : Opensource B2B Script (http://www.phpb2b.com/)
* Copyright (C) 2007-2010, Ualink. All Rights Reserved.
*
* Licensed under The Languages Packages Licenses.
* Support : phpb2b@hotmail.com
*
* @version $Revision: 1393 $
*/
class Devices extends PbObject {
var $id ='';
var $fal... | true |
9c950bb679213e6bc3922b4e941ef34dcc4e0405 | PHP | xdccmanage/xdccmanage | /xdccmanage-latest/function.php | UTF-8 | 2,686 | 2.828125 | 3 | [] | no_license | <?php
require_once('config.php');
/* restituisce true se si è loggati come amministratori */
function loggato()
{
if( isset($_SESSION['user']) && ($_SESSION['user'] == USER) && isset($_SESSION['userip']) && ($_SESSION['userip'] == $_SERVER['REMOTE_ADDR']) ) return true;
else return false;
}
function esci... | true |
69bd6ef244b99f848e0ae138144d4855f1df4384 | PHP | chukrav/myHeap | /hello.php | UTF-8 | 229 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My First PHP Web Page</title>
</head>
<body>
<?php
// First PHP script to say hello
echo '<h1>Hello, world!</h1>';
?>
</body>
</html>
| true |
4722a07569acc2ff675b1c6df6fbdb3b64892e2a | PHP | tistre/camunda-symfony-example | /app/src/MessageHandler/FizzBuzz/InitHandler.php | UTF-8 | 448 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\MessageHandler\FizzBuzz;
use App\Message\FizzBuzz\InitMessage;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
#[AsMessageHandler]
class InitHandler
{
/**
* @param InitMessage $message
*/
public function __invoke(InitMessage $message): void
{
$message->s... | true |
b7f483e1de0c36a80641a46a134fa113c76ca193 | PHP | igormenin/phpsgf | /cliente/seguranca.php | UTF-8 | 27,922 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
if (session_status() == PHP_SESSION_NONE){
session_start();
}
require_once('conexao.php');
function validaHOSTNAME($pHostNameCliente)
{
try {
$conexao = Conexao::getInstance();
$sql = 'SELECT *,(select des_tipoLocal from configuracao ORDER BY id_configuracao DESC LIMIT 1) as des_tipoLocal... | true |
b4ce2c10b817895d864b179c903f404c47e3af40 | PHP | phirasit/StudentLocation | /app/Helpers/ColorGenerator.php | UTF-8 | 814 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
class ColorGenerator {
/**
* Generate n distinct color
*
* @param n (number of required color)
* @return array of color in hex code
*/
public static function generateContrastColor($n) {
if ($n == 0) {
return [];
}
$offset = 50;
$lim = 256 - $offset;
$r = $g =... | true |
e3a9026cf00643e9af2ca6e62368ffea6fcc2ab7 | PHP | tchuna/LTW_FEUP | /PROJECTO/DATABASE/item.php | UTF-8 | 1,751 | 3 | 3 | [] | no_license | <?php
include_once('connection.php');
//gets the item of id $itemID
function getItemById($itemID) {
global $dbh;
$stmt = $dbh->prepare("SELECT * FROM ITEM WHERE itemID = ?");
$stmt->execute(array($itemID));
return $stmt->fetch();
}
//gets all the items of the list with id li... | true |
6008f62212a34dd24c392a444eaf23a434a425de | PHP | marscore/hhvm | /hphp/test/slow/argument_handling/builtin_defaults.php | UTF-8 | 139 | 2.703125 | 3 | [
"Zend-2.0",
"PHP-3.01",
"MIT"
] | permissive | <?php
function main($s) {
var_dump(wordwrap($s, 10));
}
<<__EntryPoint>>
function main_builtin_defaults() {
main("hello goodbye");
}
| true |
36bdbce667a4855092e39960869fc323b49ab4fe | PHP | jtlai0921/PU1903_PHP7_- | /繁/ch06/6.17.php | UTF-8 | 675 | 2.96875 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><h2>用array_unique函數清楚陣列內重復元素值。</h2></HEAD>
<BODY>
<?php
$prices_per_day = ar... | true |
55a70088ded54af25a1b86dd58216841543cb2f3 | PHP | dullme/sms | /database/migrations/2019_01_02_211716_create_cards_table.php | UTF-8 | 1,584 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCardsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cards', function ... | true |
0c005633b29f56697a3e127a224f8f8d6b7d415a | PHP | uoitwebteam/uoit-signature-generator | /src/php/send.php | UTF-8 | 2,300 | 2.53125 | 3 | [] | no_license | <?php
error_reporting(0);
date_default_timezone_set('EST/UTC');
header('Access-Control-Allow-Origin: http://localhost:4200', false);
header('Access-Control-Allow-Headers: origin, x-requested-with, content-type, x-xsrf-token');
header('Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS');
header('Content-type... | true |
698a6638fbfe5eb3f3208388e0296a5ca59fa89d | PHP | mosiac05/VivoWatch | /classes/hall.php | UTF-8 | 2,018 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | <?php
// require_once('../config/dbconfig.php');
class Hall extends DBConfig {
public function getAll() {
$hall_query = $this->makeQuery("SELECT * FROM halls");
return $hall_query;
}
public function getOne($id) {
$hall_query = $this->makeQuery("SELECT * FROM halls WHERE id='$id'");
return $hall... | true |
08c4e4cc02f2e84abc0879dcccd9ab40cebbbfdd | PHP | keokod/applykod | /app/oldverif_saisie_connexion.php | UTF-8 | 2,246 | 2.671875 | 3 | [] | no_license | <?php
require_once'../lib/Ini.php';
$visiteur = $_SESSION['visiteur'];
if (!empty($_POST['email']) && !empty($_POST['mdp']) && !empty($_POST['crypt'])) {//les champs doivent être remplis
$inconnu = new Membre();
//si correspondance entre email et mdp, on remplira les attributs du membres
$inconnu->isMembre... | true |
efddadf859183c54548d09e65d00dec6efb03567 | PHP | openda/prism | /prism/Logger.php | UTF-8 | 6,865 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: wangxk1991@gmail.com
* Date: 17/3/29
* Time: 下午2:50
* Desc:
*/
namespace prism;
class Logger {
const DEBUG = 0;
const NOTICE = 1;
const WARN = 2;
const ERROR = 3;
static $LogLevel = array(
Logger::DEBUG => "DEBUG",
Logger::NOTI... | true |
0f67ead54b6ecfebb6a9f60c2d3d719fd4896dbc | PHP | jbinkleyj/InvoiceNinja | /app/Http/ValidationRules/Payment/ValidInvoicesRules.php | UTF-8 | 2,631 | 2.75 | 3 | [
"AAL"
] | permissive | <?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Http\ValidationRules\Payment;
use App... | true |
6bf4f4679737309fc922787a08db417ad9fb5194 | PHP | brunosilvabrn/SchoolBlog | /public/class/Administrador.php | UTF-8 | 16,085 | 2.734375 | 3 | [] | no_license | <?php
Class Administrador {
public function UploadPostagem($titulo, $subtitulo, $autor, $image, $conteudo, $categoria) {
global $pdo;
require_once 'app/connection.php';
$url = $this->RemoverAcentos($titulo);
$img = $this->uploadImagem($image);
$titulo = filter_var($titulo, FILTER_SANITIZE_SPECIAL_CHAR... | true |
d9b6be6d34b2d866fa434ccd25513fc25a430527 | PHP | mohamed572013/agaza | /application/models/Ajax_model.php | UTF-8 | 886 | 2.609375 | 3 | [] | no_license | <?php
class Ajax_model extends CI_Model{
private $_table = 'places';
public function __construct(){
parent::__construct();
}
public function GetWhere($table, $order, $order_type, $cond = array()){
if (count($cond) > 0) {
foreach ($cond as $key => $value) {
$this->db->where($key, $va... | true |
e5294829d7822fba9b1280eb4268d8561fea3d71 | PHP | dadotson32/Fall2018CIT | /ex1/index.php | UTF-8 | 673 | 3.046875 | 3 | [] | no_license | <!DOCTYPE>
<html>
<head>
<title>My Assignment</title>
</head>
<body>
<?php
include "includes/header.inc.php" ;
?>
<?php
$favorite[] = "Dewayne Dotson";
$favorite[] = "Orange";
$favorite[] = "The Matrix";
$favorite[] = "A Song of Ice and Fire";
$favorite[] = "www.kiplinger.com";
... | true |
8aedbd17d7b7e2d942f37bb619388585d2b2af1f | PHP | bedrift/travelholic | /src/app/Placeholders/ImagePath.php | UTF-8 | 253 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Placeholders;
class ImagePath {
private $folder;
function __construct($folder) {
$this->folder = $folder;
}
function __invoke($file) {
return "/" . $this->folder . ltrim($file,"/");
}
} | true |
a5b5d2c7d088ccb5f1f27db25f653a41149f01c8 | PHP | Dylan-Duault/Projet_blog | /rediger_topic.php | UTF-8 | 2,592 | 2.6875 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Redaction topic</title>
<link rel="stylesheet" href="style_section.css">
</head>
<body>
<div class="conteneur">
<?php
try{
$bdd = new PDO('mysql:hos... | true |
a10000b254a6636a83f2c79082763b0ea76d5cae | PHP | jakekara/dlx | /app/Http/Controllers/AuthController.php | UTF-8 | 5,506 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\AuthenticateUser;
use App\UserRepository;
use Illuminate\Http\Request;
use Auth;
use Input;
use App\User;
use Response;
// using javascript now to authenticate
use App\LaravelFacebookRedirectLoginHelper;
use App... | true |
c68bd48706c89af15b8a7d652134c1ca8d55f2d9 | PHP | Cretty/pretty-php | /src/Exception.class.php | UTF-8 | 2,963 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace net\shawn_huang\pretty;
class Exception extends \Exception {
const CODE_HTTP_INTERNAL_ERROR = 500;
const CODE_HTTP_OK = 200;
const CODE_HTTP_MODE_PERMANENTLY = 301;
const CODE_HTTP_NOT_MODIFIED = 304;
const CODE_... | true |
7ddd5524cf8e136655b729366216d5e2a87ab576 | PHP | PolBarcia/DAW-M07 | /UF3/APIBooks/Books.php | UTF-8 | 577 | 3.046875 | 3 | [] | no_license | <?php
class Books
{
private $libros = array(
1 => 'El juego del alma',
2 => 'Independencia',
3 => 'El infinito en un junco',
4 => 'Breve tratado sobre la estupidez humana',
5 => 'Una herencia peligrosa (Amanda Black 1)',
6 => 'Reina roja');
/*
you shoul... | true |
2c5408b480e075163dd1866d442aeccc50ef5918 | PHP | ppabcd/azure-image-analysis | /test.php | UTF-8 | 629 | 2.859375 | 3 | [] | no_license | <?php
// File name
$filename = $_FILES['file']['name'];
// Valid file extensions
$valid_extensions = array("jpg","jpeg","png","pdf");
// File extension
$extension = pathinfo($filename, PATHINFO_EXTENSION);
$name = rand(1000,9999).".".$extension;
// Check extension
if(in_array(strtolower($extension),$valid_extensions... | true |
9eacedb6145d965c4c3deece5ef35ba09e5c7c90 | PHP | succeed98/OrphanageManagement | /OrphanageManagement/database/database.php | UTF-8 | 425 | 2.96875 | 3 | [] | no_license | <?php
include('../connect.php');
try {
$conn = new PDO("mysql:host=$server",$username,$password);
$conn->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
echo "<h3>Connected Successfully</h3>";
$sql = "CREATE DATABASE $dbname";
$conn->exec($sql);
echo "<h2>Database $dbname created Succ... | true |
caf20289af5be80bd37df6a8f5a45e8a38be5543 | PHP | AtanasovAleksandar/soccer-pure-php | /form.php | UTF-8 | 1,092 | 2.78125 | 3 | [] | no_license | <?php
$server = "localhost";
$username = "root";
$password = "usbw";
$dbname = "soccer";
// $_REQUEST = 'POST';
// Create connection
$link = new mysqli($server, $username, $password, $dbname);
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$name = mysqli... | true |
242592a8743d23831086c4971f03958fe49aac8b | PHP | davidandrewcope/towercoverage | /src/src/MVQN/XML/XmlElementClass.php | UTF-8 | 3,919 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MVQN\XML;
use MVQN\Annotations\AnnotationReader;
use MVQN\Dynamics\AutoObject;
/**
* Class XmlElementClass
*
* @package MVQN\XML
* @author Ryan Spaeth <rspaeth@mvqn.net>
*/
abstract class XmlElementClass extends AutoObject
{
protected function cdata2mime(string $cda... | true |
ce1368e8fa72d7ac3896eed105c080aa55e250bc | PHP | nblaskar/Laravel-Complete-Course-With-Codes-By-NBL-Series-Two | /3.Views in Laravel/3.Different Way of Route Returning Views/routes/web.php | UTF-8 | 2,098 | 2.625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the Route... | true |
ed1fd071420ed06de959b67798ef30b737f8cbbf | PHP | Bethor0109/LadoServidorYServWeb | /api.model3d.com/api.repositorio.com/v1/consumeWSGet.php | UTF-8 | 814 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: agesquivel
* Date: 2019-05-03
* Time: 18:22
*/
$url = "http://localhost/api.peopleapp.com/v1/contactos";
$opciones = array('http' =>
array(
'method' => 'GET',
'max_redirects' => '0',
'ignore_errors' => '1',
'... | true |
903582d140ca60b99f45605e2d9e8541fa90681f | PHP | Glitches/github-pr-review | /src/Service/Github/NotificationService.php | UTF-8 | 5,289 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author BaBeuloula <info@babeuloula.fr>
*/
declare(strict_types=1);
namespace App\Service\Github;
use App\Entity\Configuration;
use App\Entity\User;
use App\Enum\NotificationReason;
use App\Enum\NotificationType;
use App\Service\User\UserService;
use App\TypedArray\NotificationArray;
use App\TypedArra... | true |
9bd13b68f6038716fe3b7005cf9d539d0192154c | PHP | raphaelsrodrigues/raph-web.com | /socialnetwork/private/listing.php | UTF-8 | 2,109 | 2.765625 | 3 | [] | no_license | <?php
require_once("../includes/initialize.php");
if(isset($database)) {echo "true"; } else { echo "false"; }
echo "<br />";
$sql = "SELECT * FROM clients WHERE user_id = 8";
$result_set = $database->query($sql);
$found_user = $database->fetch_array($result_set);
echo $found_user['username'];
echo "<hr... | true |
7f64b44fb2a156d59afc44ca7012fe1e4cbf0086 | PHP | NathalieAmmoun/Nathalie_Ammoun_FB | /php/friendsList.php | UTF-8 | 717 | 2.53125 | 3 | [] | no_license | <?php
session_start();
include "connection.php";
if(isset($_SESSION['id']) && $_SESSION['id']!=""){
$id = $_SESSION["id"];
$status =1;
$query = "SELECT DISTINCT u.id, u.first_name, u.last_name, u.dob, u.gender
FROM users u, friends f
WHERE (u.id = f.user_id1 OR u.id = f.user_id2)
... | true |
20eaa32ef261b8e9177eee852311ae9845e6b06a | PHP | hoscarcito/Invite-Referral-System | /save.php | UTF-8 | 782 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
include('config.php'); //Includes configuration files
$email = $_POST['email']; //Gets email from form
$refer = $_POST['refer']; //Gets reference number if applicable
//Database Connection
$conn = mysql_connect(DB_HOST, DB_USER, DB_PASS);
$db = mysql_select_db(DATABASE);
$query = mysql_query("INSERT INTO u... | true |
4d338c03c2a4e85952d16d92e414a647308a0351 | PHP | thanathip41/RepairServiceSystemProject | /app/Http/Middleware/IsDel.php | UTF-8 | 719 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use App\User;
class IsDel
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$user = User:... | true |
f877ce11f49fdb39281ed813b4292d54b07122f1 | PHP | tmleeek/hoe | /code/community/Oro/Api/Helper/Data.php | UTF-8 | 4,911 | 2.578125 | 3 | [] | no_license | <?php
/**
* Oro Inc.
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is published at http://opensource.org/licenses/osl-3.0.php.
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to... | true |
0ff808c2e11e4cc427e8ecc4f6c5455af66a7642 | PHP | Coding-Space/Abschlussarbeit | /server/app/Console/Commands/ThrowExceptionTest.php | UTF-8 | 780 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Exceptions\ExtendedException;
use Exception;
use Illuminate\Console\Command;
class ThrowExceptionTest extends Command
{
/**
* The name and signature of the console command
* @var string
*/
protected $signature = 'exception:throw';
/**
* T... | true |
0b383017184516b24b5e5a386b167e9185cad983 | PHP | JakubPrzekopINTART/mbe | /class/Api.php | UTF-8 | 1,455 | 3.046875 | 3 | [] | no_license | <?php
class Api
{
private $cmd;
private $id;
public function setCmd($cmd, $id)
{
$this -> cmd = $cmd;
$this -> id = $id;
}
public function get()
{
switch ($this -> cmd){
case "list" : return $this -> itemsList();
case "item" : return $this -... | true |
9388e2544cac842a9329ddf7b649350c9fdf3786 | PHP | rachdi/Rover_PhpUnits | /RoverTest.php | UTF-8 | 2,260 | 3 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
class TestRover extends TestCase{
//Default
public function testDefaultPosition(){
$rover = new Rover();
$this->assertEquals(
$rover->getCoordinate(),
[
"x"=>0,
"y"=>0,
"direction"=>"north"]);
}
// Multiple Command
public function testExecuteCommand(){
... | true |
48b48a24e211132595f09f4ece21329f989e983b | PHP | rohkea/mybb-glosses | /inc/plugins/gloss.php | UTF-8 | 4,860 | 2.65625 | 3 | [
"CC0-1.0"
] | permissive | <?php
/**
* Gloss code for linguistic discussions
*/
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
$plugins->add_hook('pre_output_page','gloss_add_css');
$plugins->a... | true |
f7c3c99388f5baeeb6d798ebcca31f91ecdb0143 | PHP | HimaBen/Employee-Management-Web-App | /EmployeeAttendanceController.php | UTF-8 | 1,067 | 2.59375 | 3 | [] | no_license | <?php
include_once './Model/AttendanceEntity.php';
class EmployeeAttendanceController{
function Run()
{
if(isset($_REQUEST['op']) )
{
if($_REQUEST['op'] == "add")
{
$model = new AttendanceEntity();
$model->SetValues();
... | true |
0373238177ec4b70c7a1f5cb91225293996e8228 | PHP | AhmedHelalAhmed/mailcoach-writing-clear-code | /app/services/events/ClickEvent.php | UTF-8 | 343 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\services\events;
/**
* Class ClickEvent
* @package App\services\events
*/
class ClickEvent extends Event
{
/**
* @return bool
*/
public function canHandlePayload():bool
{
return $this->event === 'clicked';
}
public function handle()
{
dd('hit cl... | true |
9c63c5070b5bc3d8e934bd5a97e34ce1b3911603 | PHP | space-apes/laravelTest | /authenticationExample/app/Dinner.php | UTF-8 | 158 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
class Dinner{
protected Turkey $turkey;
public function __construct(Turkey $turkey){
$this->turkey = $turkey;
}
}
| true |
f0f7814d869cc1330fdce3ae1417028f22d2e90f | PHP | AjayUpadhyay01/15-Days-Internship | /Day-5/Day-5 task/Shuffle.php | UTF-8 | 199 | 2.859375 | 3 | [] | no_license | <?php
$a[0] = "a";
$a[1] = "b";
$a[2] = 1;
$a[3] = 2;
$a[4] = 3;
shuffle($a);
echo "<pre> Shuffled Array is :-";
print_r($a);
?>
<button onClick="window.location.reload();">shuffle</button> | true |
5264ee1190e9fa50eba6e616e44aed171b09a44b | PHP | JeanIsahakyan/donner | /src/AbstractRouter.php | UTF-8 | 3,711 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Donner;
use Donner\Utils\HTTPCode;
use Donner\Controller\AbstractController;
use Donner\Controller\ControllerInterface;
use Donner\Controller\NotFoundController;
use Donner\Result\ControllerException;
use Donner\Result\ControllerResponse;
/**
* Class AbstractRouter
* @package Donner
*
* @author Zh... | true |
6ca7ae85eb80dc2164dd2f48deeaef4117e6e6c6 | PHP | dinhhop172/phpcoban | /DB/MySQLi_OO/index.php | UTF-8 | 1,725 | 2.90625 | 3 | [] | no_license | <?php
include 'connect.php';
?>
<html>
<body>
<h2>Chèn dữ liệu cho bảng Product</h2>
<form method="get">
Category: <input type="text" name="cate_name" id=""><br><br>
<input type="submit" name="sm" value="Add">
<input type="submit" name="delete" value="Show to... | true |
1d181bac3235720b315df7821e64641fd6301413 | PHP | arryuu/phpapp-framework | /app.php | UTF-8 | 6,697 | 2.546875 | 3 | [] | no_license | <?php
class G
{
public static function get()
{
return App_Context::get('get');
}
public static function post()
{
return App_Context::get('post');
}
public static function pathInfo()
{
return App_Context::get('pathInfo');
}
public static function config... | true |
9e25b2b5557d7043235c3a02131d885d6d65dfcd | PHP | FireText/FireText-PHP-SDK | /src/FireText/Api/Resource/Keyword.php | UTF-8 | 999 | 2.78125 | 3 | [] | no_license | <?php
namespace FireText\Api\Resource;
class Keyword extends AbstractResource
{
protected $keywordId;
protected $number;
protected $keyword;
protected $reference;
public function getKeywordId()
{
return $this->keywordId;
}
public function setKeywordId($k... | true |
d256e40008fbb99615954a570f1caf339781306c | PHP | louisstow/neuralmesh | /nm-admin/lib/proxy/train.class.php | UTF-8 | 3,130 | 2.65625 | 3 | [] | no_license | <?php
class train {
function get($id) {
$q = mysql::query("pattern.getSet",array("id"=>$id));
if(!$q->num_rows) throw new Exception("Training set not found.");
$training_data = mysql::fetch_all($q);
return $training_data;
}
function saveEpoch($nid,$epoch,$start_mse,$end_mse,$time,$sid=NULL) {
mysql::quer... | true |
383a2163486ee1bd22402c138537c17ee1667fa2 | PHP | silverworm/custom_month | /init.php | UTF-8 | 286 | 2.84375 | 3 | [] | no_license | <?php
require 'class.Calendar.php';
$day = 17;
$month = 11;
$year = 2013;
// $day = 1;
// $month = 1;
// $year = 1991;
$CALENDAR = new CALENDAR();
$week_day_num = $CALENDAR->year_days_from_start($day,$month,$year);
print_r($CALENDAR->week_day_name($week_day_num));
?> | true |
b87144e5ffba691a59958547ae1cc40d5669792c | PHP | TheShermanTanker/TekTopia-Bedrock | /src/me/theshermantanker/tekbedrock/TekMain.php | UTF-8 | 837 | 2.578125 | 3 | [] | no_license | <?php
namespace me\theshermantanker\tekbedrock;
use pocketmine\plugin\PluginBase;
use me\theshermantanker\tekbedrock\events\TekListener;
final class TekMain extends PluginBase {
public static $instance = null;
public function onLoad(){
$this->start();
}
public function onEnable(... | true |
000f3223917328a82cb0df3725790c7413479858 | PHP | mismusic/sfframe | /app/facade/Log.php | UTF-8 | 787 | 2.546875 | 3 | [] | no_license | <?php
namespace app\facade;
/**
* Class Log
* @see \frame\core\log\Log
* @mixin \frame\core\log\Log
* @method static mixed record(string $type, $log, array $data = [], bool $now = false)
* @method static mixed write(string $type, $log, array $data = [])
* @method static mixed sql($log, array $data = [])
* @met... | true |
199487ce4c02cc5be308656e4418b623dee823c2 | PHP | noviembre/mvcpoowayra | /app/models/Reserva.php | UTF-8 | 1,035 | 2.625 | 3 | [] | no_license | <?php
class Reserva {
private $db;
public function __construct(){
$this->db = new Database;
}
public function add($data){
$this->db->query("INSERT INTO misreservas
(tid,r_c,nombres,cantidad,correo,mensaje,cuando,created_at)
... | true |