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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f5cd88df4c080752dc9c30f502dcc36f4819a780 | PHP | juliangut/spiral | /src/Exception/TransportException.php | UTF-8 | 836 | 2.796875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* A PSR7 aware cURL client (https://github.com/juliangut/spiral).
*
* @license BSD-3-Clause
* @link https://github.com/juliangut/spiral
* @author Julián Gutiérrez <juliangut@gmail.com>
*/
namespace Jgut\Spiral\Exception;
/**
* Transport exception.
*/
class TransportException extends \RuntimeExceptio... | true |
1b616d6496eb54eaf1c2d32ac7f736a0c1226550 | PHP | alertux/covid | /app/Http/Controllers/Controller.php | UTF-8 | 5,288 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Auth;
class Controller extends BaseController
{
use Auth... | true |
b486cfc22f685391f4b569fd7a72de16469a8517 | PHP | chuppistyle/ratchet | /src/Chat.php | UTF-8 | 1,108 | 3 | 3 | [] | no_license | <?php
namespace MyApp;
use Ratchet\MessageComponentInterface;
use Ratchet\ConnectionInterface;
class Chat implements MessageComponentInterface {
public $connect;
protected $clients;
public function __construct()
{
$this->clients = new \SplObjectStorage;
}
public function onOpen(Conn... | true |
f2c222088b6fab74e40f7266463c7bcc14f57686 | PHP | Gaetan-R/Paint-Shop | /src/DataFixtures/AppFixtures.php | UTF-8 | 3,050 | 2.671875 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use App\Entity\Blogpost;
use App\Entity\Categorie;
use App\Entity\Peinture;
use App\Entity\User;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
use Faker\Factory;
use Faker;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;... | true |
cc6a49af4f4e7ebdee7075ee38c82a1bea3b2664 | PHP | PraktikumWebDasar41-02/modul5-ta-frznst | /s1.php | UTF-8 | 4,675 | 2.765625 | 3 | [] | no_license | <?php
include 'conn.php';
session_start();
if(isset($_POST['logout'])){
session_destroy();
}
if(isset($_SESSION['nim'])){
header("location:s2.php");
}
if (isset($_POST['submit'])) {
$nama=$_POST['nama'];
$nim=$_POST['nim'];
$email=$_POST['email'];
$tanggal=$_POST['tanggal'];
... | true |
d478b5beccd58369ecfd476093ef9c05474392b1 | PHP | yell0ws/ddd-sales | /src/Infrastructure/Persistance/InMemory/Payment/InMemoryPaymentRepository.php | UTF-8 | 1,071 | 2.921875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Infrastructure\Persistance\InMemory\Payment;
use App\Domain\Payment\Model\Payment;
use App\Domain\Payment\Repository\PaymentRepository;
use App\Domain\Payment\ValueObject\PaymentId;
use Exception;
class InMemoryPaymentRepository implements PaymentRepository
{
/**
... | true |
52f06b86354905ad06796030dbd9e3ac0a5437ef | PHP | wombatastronaut/php-tdd | /tests/ReceipTest.php | UTF-8 | 1,375 | 2.84375 | 3 | [] | no_license | <?php
namespace Tests;
require dirname(dirname(__FILE__)) . '/vendor' . '/autoload.php';
use PHPUnit\Framework\TestCase;
use App\Receipt;
class ReceiptTest extends TestCase
{
public function setUp()
{
$this->receipt = new Receipt();
}
/**
* @test
*
* @dataProvider getTheTot... | true |
054073646da5cf1d1e006b991ddb3a822a3d0330 | PHP | Big-Shark/Farpost-app | /src/Service/ImageService.php | UTF-8 | 2,306 | 2.625 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Component\Db;
class ImageService {
protected $db;
function __construct(Db $db)
{
$this->db = $db;
}
public function getImage($uid) {
$sql = "SELECT id, img, uid, date FROM image WHERE uid = :uid";
$result = $this->db->prepare($sql);
... | true |
726da18a8eba6490126e7cb2f95aa8ae72d330dd | PHP | milanvrba/freeman | /application/backend/modules/board/models/User.php | UTF-8 | 2,043 | 2.640625 | 3 | [] | no_license | <?php
class User extends SuperModel
{
protected $_data = array(
'id' => null,
'login' => null,
'password' => null,
'username' => null,
'date_login' => null,
'admin' => null,
);
protected $_formName = 'LoginForm';
public function authenticate()
{
$use... | true |
9d25c14a7ea9ba6ed9963fcac839758263215c85 | PHP | gobb/Breadcrumbs | /tests/Breadcrumbs/Tests/TrailTest.php | UTF-8 | 2,182 | 2.578125 | 3 | [] | no_license | <?php
namespace Breadcrumb\Tests;
use Breadcrumbs\Trail;
use Breadcrumbs\Crumb;
class TrailTest extends \PHPUnit_Framework_TestCase
{
/**
* @covers Breadcrumb\Trail::count
*/
public function testCrumbs()
{
$trail = new Trail();
$crumb1 = new Crumb('homepage', '/');
$crum... | true |
e545a6b1ba874569e0879872a3478d7259dbea0f | PHP | buchunzai7/ETShop-for-PHP-Yii2 | /common/models/CartItemAttr.php | UTF-8 | 2,689 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* ETShop-for-PHP-Yii2
*
* @author Tony Wong
* @date 2015-05-18
* @email 908601756@qq.com
* @copyright Copyright © 2015年 EleTeam
* @license The MIT License (MIT)
*/
namespace common\models;
use Yii;
use common\components\ETActiveRecord;
/**
* This is the model class for table "cart_item_attr".
*
... | true |
713463fc0c4b27a7c59c070212a538c62381be41 | PHP | duarteduu/PAP | /createProvider.php | UTF-8 | 1,630 | 2.84375 | 3 | [] | no_license | <?php
session_start();
require_once 'backend/conn.php';
require_once 'backend/requireLogin.php';
require_once 'backend/requireAdmin.php';
// error variables initialization
$error = '';
// form submit
if (isset($_POST['nome'])){
$name = trim($_POST['nome']);
if (strlen($name) < 4 || strlen($name) > 20) {
... | true |
3afca7e514c2bfee5f70af9e92330eb5166aed2a | PHP | Jorge-CR/Eintrag | /model/extended/class.usuarioDAOExt.php | UTF-8 | 452 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
class usuarioDAOExt extends usuarioDAO {
public function search($user, $password) {
$sql = 'SELECT usu_id, usu_cedula, usu_nombre, usu_direccion, usu_telfijo, usu_celular, usu_correo, rol_id FROM r_usuario WHERE usu_nombre = :user AND usu_contraseña = :pass';
$params = array(
':... | true |
4150168430fb3298a5fbf1a80591ba4f4c0bc87b | PHP | Trianlos/dropbox-acuenta | /val.php | UTF-8 | 1,086 | 2.6875 | 3 | [] | no_license | <?php
error_reporting(0);
session_start();
$con = new mysqli("localhost", "root", "", "testeando");
if ($con->connect_errno)
{
echo "Fallo al conectar a MySQL: (" . $con->connect_errno . ") " . $con->connect_error;
exit();
}
//Valida que los campos de usuario y contraseña... | true |
cb19ad212d70a1066ef11fcfc0c3326351c8d163 | PHP | BennyJake/movie | /php/class/theater.php | UTF-8 | 1,416 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Ben
* Date: 1/13/14
* Time: 9:30 PM
*/
namespace movietheater;
class theater {
private $tid;
private $movie_array;
private $var_array;
public function __init($tid=NULL){
if($tid){
$this->setTid($tid);
}
... | true |
1288d3bd033d5adbdb8027fe8932fce4d5db9d45 | PHP | piotrooo/php-hosts | /src/PhpHosts/Hosts.php | UTF-8 | 5,056 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (C) 2020
* Piotr Olaszewski <piotroo89@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | true |
743fbbfdc400f0cc4612100f7c03fe406cf51e8a | PHP | bkatk/wordpresstinysnippets | /categories/class-names-for-category-links.php | UTF-8 | 783 | 2.53125 | 3 | [] | no_license | <?php
/*
Plugin Name: [ + ] Class Names for Category Links
Plugin URI: https://github.com/ex-mi/wordpresstinysnippets
Description: Functional plugin that adds unique class names for category links.
Author: Ex.Mi
Version: 1.0
Author URI: https://ex-mi.ru/
License: GPL3
*/
if ( ! defined( 'ABSPATH' ) ) exit( ... | true |
fdaee4d6dc30d43b7b12e378fbb782bbc6dad31b | PHP | infostars/headless-chromium-php | /src/Clip.php | UTF-8 | 1,670 | 3.125 | 3 | [
"Fair"
] | permissive | <?php
/**
* @license see LICENSE
*/
namespace HeadlessChromium;
class Clip
{
protected $x;
protected $y;
protected $height;
protected $width;
protected $scale;
/**
* Clip constructor.
* @param $x
* @param $y
* @param $height
* @param $width
* @param $scale
... | true |
0165f1bd7296674cb3aacbfab65d2c4a5c7535c8 | PHP | dimitrije-krstic/yoga | /src/Model/CommentDataWrapper.php | UTF-8 | 1,416 | 2.953125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Model;
use App\Services\UploadHelper;
class CommentDataWrapper
{
/**
* @var string
*/
private $content;
/**
* @var \DateTime
*/
private $createdAt;
/**
* @var string
*/
private $authorName;
/**
* @var strin... | true |
d053a4ca69fae4be8514d8c816abe1c9c09c60ad | PHP | PenMessier/online_shop | /models/cart.class.php | UTF-8 | 1,652 | 2.734375 | 3 | [] | no_license | <?
class Cart {
public static function getCart($user_id) {
$goods = db::getInstance()->Select(
"SELECT*FROM temp_orders
LEFT JOIN goods
ON temp_orders.good_id = goods.id
WHERE temp_orders.user_id = '$user_id'"
);
return $goods;
}
public static function getCartitem($id, $user_id) {
$result =... | true |
e76e3d690b7af0971e8fce82bc3fcbcd974b7bc0 | PHP | CreepingPanda/FennecPlusUltra | /models/CategoryManager.class.php | UTF-8 | 2,596 | 3.21875 | 3 | [] | no_license | <?php
class CategoryManager
{
// ________ PROPRIETES ________
private $database;
// ________________
// ________ CONSTRUCT ________
public function __construct($database)
{
$this->database = $database;
}
// ________________
// ________ METHODES ________
public function findById($id)
{
$id = intval($id)... | true |
a62eeb9c4d2980426cf2a6b33b2742a1737276bb | PHP | danibram/danux | /application/migrations/2013_03_20_114806_create_wardrobe_table.php | UTF-8 | 765 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class Create_Wardrobe_Table {
/**
* Make changes to the database.
*
* @return void
*/
public function up()
{
Schema::create('l_wardrobe_table', function($table){
$table->increments('id');
$table->integer('budget_id');
$table->string('name');
$table->string('width');
$table->string('h... | true |
78b0663b50ecf5c7c0babf1085c0837e2201b456 | PHP | maks-nurgazy/CV-maker | /src/Service/UploaderHelper.php | UTF-8 | 719 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Service;
use Gedmo\Sluggable\Util\Urlizer;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class UploaderHelper
{
private $uploadPath;
public function __construct(string $uploadPath)
{
$this->uploadPath = $uploadPath;
}
public function uploadAvatarImage(Up... | true |
32e67a7c945c83e796bf64cd01ae723375fc95a9 | PHP | yerzhant/clinics | /app/app/WorkTime.php | UTF-8 | 894 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
class WorkTime extends Model
{
public function getDayStringAttribute()
{
switch ($this->day) {
case 1:
$day = "Пн";
break;
case 2:
$day = "Вт";
break;
case 3:
$day... | true |
9ea28fd37c8a820a9c7fd4e828bbda8a8c1d9430 | PHP | winni4eva/ratings-pro | /app/User.php | UTF-8 | 2,198 | 2.578125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Branch;
use App\Category;
use App\BranchUser;
use Tymon\JWTAuth\Contracts\JWTSubject as AuthenticatableUserContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;... | true |
7f9ceca2d132a1d38ce2aa6bea7a9c2ef1ad2313 | PHP | jakub-klapka/secret-file-manager | /secret-file-manager.php | UTF-8 | 3,217 | 2.53125 | 3 | [] | no_license | <?php
/**
* Plugin Name: Lumiart's Secret Files Manager
* Description: Upload big files via FTP and create secret link to send them to clients.
* Version: 1.1
* Author: Jakub Klapka
* Author URI: http://www.lumiart.cz
*/
namespace Lumiart\SecretFileManager;
define( 'LUMI_SFM_CORE_PATH', plugin_dir_path( __FILE_... | true |
e698fcc234dac053b4d01df5cfa64007d53c339d | PHP | xd5508/ganbaobei | /include/php/login.php | UTF-8 | 921 | 2.515625 | 3 | [] | no_license | <?php
header("Content-type: text/html; charset=utf-8");
date_default_timezone_set("PRC");
session_start();
$get_start_time = time();
include_once("../../lib/mysql.class.php");
include_once("../../lib/user.class.php");
$own = new mysql();
if($_POST['username'] == '') die('请填写您的账号!');
if($_POST['password'] == '') die('... | true |
44a8754501ac24d997906708881b68eaca52a596 | PHP | qschen2/Hello | /qschen2/src/Hello.php | UTF-8 | 104 | 2.53125 | 3 | [] | no_license | <?php
namespace Qschen2;
class Hello {
public static function say()
{
return "hello qschn2!";
}
} | true |
5e2a614da961f421b89d7bf3cd6e45c16095bba6 | PHP | AbdellahAilali/SymfonyMessenger | /appli/src/EventDispatcher/Event.php | UTF-8 | 362 | 3.0625 | 3 | [] | no_license | <?php
namespace App\EventDispatcher;
class Event
{
protected $nom;
//Action qui déclenche l'instruction
public function setNom($nom)
{
echo ' EventEntry ';
$this->nom = $nom;
echo ' EventExit ';
}
//getNom pour obtenir le nom depuis le
public function getNom()
... | true |
f5edb832abe2a6784439066a5dc50d4c31f38457 | PHP | nyeholt/relapse | /november/services/UserService.php | UTF-8 | 14,641 | 2.765625 | 3 | [] | no_license | <?php
include_once dirname(__FILE__).'/exceptions/ExistingUserException.php';
include_once dirname(__FILE__).'/exceptions/RecursiveGroupException.php';
include_once dirname(__FILE__).'/exceptions/NonEmptyGroupException.php';
include_once 'november/model/GroupMember.php';
include_once 'model/LeaveApplication.php';
/*... | true |
3577e44825e1f3fac328a28923e9198b2740086e | PHP | ludo6577/web | /Acceuil/forum/php/MySql/MySqlCommand.php | UTF-8 | 1,593 | 3.3125 | 3 | [] | no_license | <?php
class ParamType
{
const Integer = "i";
const Double = "d";
const String = "s";
const Bytes = "b";
}
class MySqlCommand
{
private $parametersValues;
private $parametersTypes;
private $nbParameters;
public function __construct(MySqlConnection $connection, $queryText)
{
$this->stmt = $con... | true |
024f7513e94785537b3b71526e0444de8a0d9cc4 | PHP | madman/tree | /src/App/Controller/ApiVersionController.php | UTF-8 | 307 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
class ApiVersionController {
protected $version;
public function __construct($version)
{
$this->version = $version;
}
public function __invoke()
{
return new JsonResponse(['version' => $this->version]);
}
}
| true |
534e130ac124b72deb093abb622e43a3a4515b7b | PHP | beardedandnotmuch/yii2-jwt-user | /src/models/DestroyedToken.php | UTF-8 | 2,253 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace beardedandnotmuch\user\models;
use Yii;
use Lcobucci\JWT\Parser as JWTParser;
/**
* This is the model class for table "{{%user_destroyed_tokens}}".
*
* @property integer $id
* @property integer $user_id
* @property string $token_hash
* @property string $expired_at
* @property string $created_a... | true |
336ee8ab89bedb26498aae5304dc916da5d37dc4 | PHP | cwmiller/broadworks-connector | /src/Ocip/Models/CallToNumber.php | UTF-8 | 2,752 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace CWM\BroadWorksConnector\Ocip\Models;
/**
* CallToNumber
*
* Call to Number.
*
* @Groups [{"id":"c0d21ef9ba207c335d8347e5172fce1d:1091","type":"sequence"}]
*/
class CallToNumber
{
/**
* @ElementName type
* @Type \CWM\BroadWorksConnector\Ocip\Models\CallToNumberType
* @Group c0... | true |
39673aa189c88909f1d8f85565a4101dfb120c19 | PHP | PetrosMAMALIOGKAS/PHPexercises | /formulaire/traitement.php | UTF-8 | 1,043 | 2.75 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Home Page</title>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="style1.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<?php
$surname... | true |
8883006089d54c2c0c9a7abb991cd14d2c575cea | PHP | mykrov/geocompra | /app/GEOEMPRESA.php | UTF-8 | 3,148 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $IDEMPRESA
* @property string $RAZONSOCIAL
* @property string $RUC
* @property string $CORREO
* @property string $RUTACERTIFICADO
* @property string $LOGOEMPRESA
* @property int $IDPROVINCIA
* @property int $IDCANTON
* @propert... | true |
e348b1c9ac9041c63cc689e637a0a927595fc1fc | PHP | evaldobarbosa/sanitizer | /example/example1.php | UTF-8 | 415 | 2.921875 | 3 | [] | no_license | <?php
require "autoloader.php";
use Sanitize\Sanitizer;
$intFilter = Sanitize\Sanitizer::add('int','n1');
$numFilter = Sanitize\Sanitizer::add('float','f1');
$thousand = $numFilter->thousand();
echo $intFilter->sanitize("12X0") . "\n";
echo $numFilter->sanitize("12.0") . "\n";
echo $numFilter->sanitize("12,0") . "\... | true |
7c8d64e299c46bbad7a526a550938081b382ac2f | PHP | It-Soul/test | /www/protected/components/MainHelper.php | UTF-8 | 5,148 | 2.65625 | 3 | [] | no_license | <?php
class MainHelper
{
public static function initCalendar($canAssign = false)
{
$calendarItems = [];
$calendarStart = strtotime('01/01/' . (date('Y') - 5));
$calendarFinish = strtotime('12/31/' . (date('Y') + 5));
for ($i = $calendarStart; $i < $calendarFinish;... | true |
5770d44e2bfe5370a066477eec8a596b953b29ee | PHP | mattrubin/Glitch | /common/init.php | UTF-8 | 765 | 2.75 | 3 | [] | no_license | <?php
define('CAT_SORT', 'categories');
define('ALPHA_SORT', 'alphabetical');
define('SORT_DEFAULT', CAT_SORT);
session_start();
// If no sort mode exists, set the default
if(!isset($_SESSION['sort_mode'])) $_SESSION['sort_mode'] = SORT_DEFAULT;
// If a new sort mode is specified, set it now
if(isset($... | true |
344dd2bacf9e31e32d7882d0994340fbc19e1f95 | PHP | piernik/imap | /src/MailboxesParser/MailboxesParserInterface.php | UTF-8 | 994 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* Created by PhpStorm.
* User: Lukasz
* Date: 2017-12-01
* Time: 10:22.
*/
namespace Ddeboer\Imap\MailboxesParser;
/**
* Class MailboxesParser.
*/
interface MailboxesParserInterface
{
/**
* Set language for parser.
*
* @param string $lang
*/
publi... | true |
63b93d1e5abcf46ac7f0e3adc02386d03d2825c6 | PHP | AsisBhatt/EMO | /apps/console/components/console/ConsoleCommand.php | UTF-8 | 1,172 | 2.84375 | 3 | [] | no_license | <?php defined('MW_PATH') || exit('No direct script access allowed');
/**
* ConsoleCommand
*
* @package Unika DMS
* @author Serban George Cristian <business@unikainfocom.in>
* @link http://www.unikainfocom.in/
* @copyright 2013-2017 Unika DMS (http://www.unikainfocom.in/)
* @license http://www.unikainfocom.in/su... | true |
13d31d69091744a653f1fb37b7c1469c8abe271a | PHP | muhammadtalha007/ssgs | /app/Http/Controllers/StaffController.php | UTF-8 | 2,161 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Staff;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
class StaffController extends Controller
{
public function login(Request $request)
{
if (Staff::where(['email' => $request->email, 'password' => $request->password])->exists()) {... | true |
2c95fc6500ee2437656b35fe614d22e59bba35bb | PHP | HNavanjani/ProjectsDoneAtSLIIT | /Projects_Completed_For_Bsc/1stYear/eHut/ITA FINAL-20191105T024409Z-001/ITA FINAL/AssignmentPhp/Checkout.php | UTF-8 | 4,361 | 2.515625 | 3 | [] | no_license | <?php
session_start();
include_once 'dbconnect.php';
$error = false;
if(!$_SESSION['login']){
header("location:Sign_In.php");
die;
}
if (isset($_POST['signup'])) {
$name = mysqli_real_escape_string($con, $_POST['name']);
$address = mysqli_real_escape_string($con, $_POST['address']);
$zip = mysqli_real_... | true |
5ddcb42364101d328ed940bde85f1e9eb5b43897 | PHP | thalassa-web/BarcodeHelper | /src/code128/Calculator.php | UTF-8 | 1,062 | 2.953125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: bruno
* Date: 12/02/2019
* Time: 14:34
*/
namespace ThalassaWeb\BarcodeHelper\code128;
use ThalassaWeb\BarcodeHelper\ancetre\ICalculateur;
/**
* Class Calculator
* Calcule clé de contrôle Code 128
* @package ThalassaWeb\BarcodeHelper\calculateur
*/
class Calculator i... | true |
c34e6bde3380371ee91e09765048f0a5b138e8ec | PHP | argordmel/Daily-Content-Manager | /default/app/controllers/dc-admin/usuario_controller.php | UTF-8 | 3,388 | 2.578125 | 3 | [] | no_license | <?php
/**
* Dailyscript - app | web | media
*
*
*
* @category Administracion
* @package Controllers
* @author Iván D. Meléndez
* @copyright Copyright (c) 2010 Dailyscript Team (http://www.dailyscript.com.co)
* @version 1.0
*/
Load::models('usuario');
Load::models('post');
c... | true |
9928d05c8b750ccbb18bf47123b57ceedd7eac87 | PHP | kr056/SoftUni | /Software Technologies July 2017/02_PHP Basic Syntax Lab/07_Celsius-Farenhait.php | UTF-8 | 893 | 3.53125 | 4 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<?php
$msgAfterCel="";
if(isset($_GET['cel'])) {
$cel = floatval($_GET['cel']);
$fah = celsiusToFahrenheit($cel);
$msgAfterCel = "$cel °C = $fah °F";
}
$msgAfterFah="";
if(isset($_GET['fah'])) {
$fah = floatval($_G... | true |
5f9ec0b80af3a098d528ca01a4102e3522439ffb | PHP | AhmedSalahBasha/ahmedsalah-blog | /admin/includes/view_all_posts.php | UTF-8 | 5,360 | 2.65625 | 3 | [] | no_license | <?php
if(isset($_POST['checkBoxArray'])){
foreach($_POST['checkBoxArray'] as $postValueId){
$bulk_options = $_POST['bulkOptions'];
switch($bulk_options){
case 'published':
$query = "UPDATE posts SET post_status = '{$bulk_options}' ";
$query .= "WHERE post_... | true |
5efe32eb572d8249c295f928fac8c7d93f98c4dc | PHP | Salamek/nette-files | /src/Salamek/Files/TImagePipe.php | UTF-8 | 935 | 2.546875 | 3 | [] | no_license | <?php declare(strict_types = 1);
/**
* Copyright (C) 2016 Adam Schubert <adam.schubert@sg1-game.net>.
*/
namespace Salamek\Files;
use Nette;
/**
* Class TImagePipe
* @package Salamek\Files
* @deprecated
*/
trait TImagePipe
{
/** @var ImagePipe */
public $imgPipe;
/**
* @param ImagePipe $img... | true |
95139b5a7779ed529c0bfa4a172eb952cce821c6 | PHP | b-dvulhatka/hackerrank-php | /Interview Preparation Kit/Sorting/Mark and Toys.php | UTF-8 | 710 | 3.359375 | 3 | [
"MIT"
] | permissive | <?php
// Complete the maximumToys function below.
function maximumToys($prices, $k)
{
sort($prices);
$quantity = 0;
foreach ($prices as $price) {
$k -= $price;
if ($k <= 0) {
break;
}
$quantity++;
}
return $quantity;
}
$fptr = fopen(getenv("OUTPUT_PATH... | true |
67c4a45672f2b64c7f29706836718e37b67d7dc6 | PHP | darkrazor99/simpleLoginSystem | /home.php | UTF-8 | 598 | 2.828125 | 3 | [] | no_license | <?php
include 'classes/usersview.class.php';
session_start();
$userviewr = new UsersView();
if (isset($_SESSION["name"])){
$message= $userviewr->welcomeUserByName($_SESSION["name"]);
echo $message;
}
else {
header("location: login.php");
}
if(isset($_POST["logout"])) {
session_destroy... | true |
6d21cf2e49d08a3adab63de50c878e959f0dd72a | PHP | zeeshanbashir/codeception | /tests/unit/UserTest.php | UTF-8 | 807 | 2.65625 | 3 | [] | no_license | <?php
namespace Tajawal\Test;
use Tajawal\Codecept\User;
class UserTest extends \Codeception\Test\Unit
{
/**
* @var User
*/
protected $user;
protected function _before()
{
$this->user = new User();
}
/**
* This test to check invalid password
*
* @return void... | true |
4e193bc583708f9d946451c94a96392cef1358fd | PHP | omarfurrer/footbit | /app/Http/Controllers/PagesController.php | UTF-8 | 2,522 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Repositories\Eloquent\MatchesRepositoryEloquent;
use App\Repositories\Eloquent\PlayersRepositoryEloquent;
use App\Repositories\Eloquent\RefereesRepositoryEloquent;
use App\Repositories\Eloquent\TeamsRepositoryEloquent;
use App\Repositories\Eloquent\TournamentsRepositoryEl... | true |
4a59360e81166d56ea7ecdea37ec5684fed297ac | PHP | wastedgod/sampleMessageBoard | /application/repository/BaseRepository.abstract.php | UTF-8 | 576 | 2.65625 | 3 | [] | no_license | <?php
namespace sampleMessageBoard\application\repository;
use Doctrine\ORM\EntityRepository;
abstract class BaseRepository extends EntityRepository implements iRepository{
public function create(iModel $model){
$this->getEntityManager()->persist($model);
$this->getEntityManager()->flush();
}
public funct... | true |
b8b79c88fb36e5accf7d201b696f881e14b89995 | PHP | Zamachi/WebIS | /WBISFramework/models/tagsModel.php | UTF-8 | 393 | 2.59375 | 3 | [] | no_license | <?php
namespace app\models;
use app\core\DBModel;
class TagsModel extends DBModel{
public $tag_id;
public $tag_name;
public function tableName()
{
return "tags";
}
public function attributes(): array
{
return [
"tag_id",
"tag_name"
];
... | true |
dcf194dba0cc82a8d3a3f2f41e35ac4d0c0c8283 | PHP | gabemarquesi/Repub | /Repub/php/repub.controlador/notificacaoControlador.php | UTF-8 | 2,281 | 2.8125 | 3 | [] | no_license | <?php
include_once '../repub.persistencia/bd_repub.php';
include_once '../repub.modelos/notificacao.php';
class NotificacaoControlador {
public $bd;
function __construct() {
$this->bd = new BDRepub();
}
public function get($id) {
$sql = "SELECT * FROM a14017.notificacao WHERE id=:pa... | true |
206b4c64313dcf5d540256aaa51b551016f967af | PHP | exelentshakil/easycoupons | /includes/Admin/Coupon.php | UTF-8 | 13,235 | 2.5625 | 3 | [] | no_license | <?php
namespace Easy\Coupons\Admin;
class Coupon {
private $database_table;
/**
* @var array
*/
private $screens = ['easy-video'];
/**
* @var array
*/
private $fields = [
[
'label' => 'Video Url',
'id' => 'video',
'type' =... | true |
72dd30fb9a0d3c29e7f61bea340c6c81527f6f00 | PHP | sebastian-misiewicz/widget-o-php | /Widgeto/Rest/LogoutRest.php | UTF-8 | 483 | 2.59375 | 3 | [] | no_license | <?php
namespace Widgeto\Rest;
use Widgeto\Repository\AuthRepository;
class LogoutRest {
/* @var $app \Slim\Slim */
public function __construct($app) {
$app->post('/rest/logout/', function () use ($app) {
$token = $app->request->headers("auth-token");
if (!iss... | true |
726fa0366a3ef8e1dde0335b35d5e6eb163f1708 | PHP | Aarthi-Saba/PHP-CMS-Blog-Application | /admin/includes/ViewAllUsers.php | UTF-8 | 3,044 | 2.5625 | 3 | [] | no_license | <table class="table table-bordered table-hover">
<thead>
<tr>
<th>User Id</th>
<th>Username</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Profile Image</th>
<th>Role</th>
<th style="tex... | true |
6047d431a45d8be6fd8be7c9818f87883527ced7 | PHP | instantjay/emailphp | /src/Providers/Mandrill.php | UTF-8 | 2,381 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace instantjay\emailphp\Providers;
class Mandrill extends Provider {
private $apiKey;
public function __construct($apiKey, $defaultSenderEmailAddress, $defaultSenderName)
{
parent::__construct($defaultSenderEmailAddress, $defaultSenderName);
$this->apiKey = $apiKey;
}
... | true |
2636782e8153c0e636f41ae08fca2e6fd3d5f092 | PHP | tschalch/labdb | /html/getGene.php | UTF-8 | 637 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
include("connect.php");
#print $_GET['geneIDs'];
$geneIDs = explode(":",$_GET['geneIDs']);
$type = $_GET['type'];
$sequence = '';
#print_r($geneIDs);
foreach ($geneIDs as $geneID){
if ($geneID){
$query = "SELECT * FROM genes WHERE id=$geneID";
#print $query;
$result=mysql_query($query);
#prin... | true |
208824371c8e7065ab79c4bfa77b8beba49e54e1 | PHP | KeylaRocha/Trabalho_BD1_UFV_2019-2 | /application/models/pessoafisica_model.php | UTF-8 | 9,113 | 2.796875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
*---------------------------------------------------------------
* MODEL PESSOAFISICA
*---------------------------------------------------------------
*
* Model que trata as funções relacionadas ao objeto PessoaFisica.
* Todas... | true |
2e831ae6c9904787b7fe791c13184ca915c71774 | PHP | lifenglsf/JunaShare-Service | /profiles/juna_v1/modules/junaapp/users/includes/sms.inc | UTF-8 | 1,495 | 2.515625 | 3 | [] | no_license | <?php
require_once 'alisms/TopSdk.php';
function sendsms($data) {
//print_r($data);exit;
$smssettings = unserialize(variable_get('smssettings'));
$c = new TopClient;
$c->format = 'json';
$c->appkey = $smssettings['appkey'];//$appkey;
$c->secretKey = $smssettings['secret'];//$secret;
$req = new AlibabaAliq... | true |
3e240c30e3cfbe8867fb322d6238a9c6575bc9fd | PHP | Vashthestupid/WEST_BURGER | /WEST_BURGER/src/views/admin/plats/index_plat.php | UTF-8 | 2,087 | 2.59375 | 3 | [] | no_license | <?php
// On récupère l'id et le nom du plat
$select = "SELECT plat.id, nomPlat FROM plat ORDER BY plat.id DESC";
$req = $db->prepare($select);
$req->execute();
$plats = array();
while($data = $req->fetchObject()){
array_push($plats,$data);
}
?>
<div class="container">
<div class="row">
<div class=... | true |
4ae3cc560f507bd9bcea6eefe7f3da4f274d1436 | PHP | fsilberg/bnote | /BNote-Releases/BNote/Patches/patch210/update_db.php | UTF-8 | 2,177 | 2.65625 | 3 | [] | no_license | <?php
/*************************
* UPGRADES THE DATABASE *
* @author Matti Maier *
* Patch 2.1 *
*************************/
// path to src/ folder
$PATH_TO_SRC = "src/";
?>
<html>
<head>
<title>Database Update</title>
</head>
<body>
<?php
// include necessary libs
require_once $PATH_TO_SRC . "data/data... | true |
1204ac3ca3a459ce1cc2d421d93f249a65ca2719 | PHP | fecaps/working_out | /src/Generator/Exercises.php | UTF-8 | 1,774 | 3 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Generator;
use App\Enum\Participant as ParticipantEnum;
use App\Generator\Context\ExercisingLevelContext;
use App\Generator\Level\BeginnerExercising;
use App\Generator\Level\ProfessionalExercising;
final class Exercises
{
private $participants;
private $exercising... | true |
786905fc99edc010d23f33e7c2f6b2fe87607174 | PHP | mukesh2122/samlink | /protected/viewc/forum/common/onlineUsers.php | UTF-8 | 705 | 2.5625 | 3 | [] | no_license | <div class="forumUserOnline">
<p><?php echo $OnlineUsers, $this->__(" users are online"); ?></p>
<p> <?php echo $onlineMembers,$this->__(" members"), ", ", $onlineGuests,$this->__(" guests"); ?> </p>
<?php
$members = 0;
foreach ($allOnlineUsers as $user) {
if($model->isMember($user->ID_P... | true |
b6a87acecc338c5bd7c8bfe127bdfcd2e19cfae9 | PHP | asaokamei/tuum-skeleton | /app/Config/Factory/LoggerFactory.php | UTF-8 | 1,146 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Config\Factory;
use Interop\Container\ContainerInterface;
use Monolog\Handler\FingersCrossedHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Monolog\Processor\UidProcessor;
use Tuum\Builder\AppBuilder;
class LoggerFactory
{
/**
* @var bool
*/
private $isDebug;
... | true |
e3ec99fe6238885ffc380670cd67c87b1ce9e2f4 | PHP | tongzebin/php | /wenjianfuzhi/bb/php18/3/3-1.php | UTF-8 | 355 | 2.546875 | 3 | [] | no_license | <?php
$a="./1.txt";
var_dump(is_dir($a));
var_dump(is_readable($a));
var_dump(is_writable($a));
var_dump(is_executable($a));
var_dump($qe=touch('3.txt'));
var_dump($ee=file_exists($a));
if(file_exists('3.txt')){
unlink("./3.txt");
}else{
echo '文件不存在';
}
var... | true |
6635d91e5401094bc71639a226d6f716d8a8b3a4 | PHP | ducbl98/PHP_L5_Inheritance | /Errands/MyClass.php | UTF-8 | 314 | 3.28125 | 3 | [] | no_license | <?php
class MyClass
{
/**
* MyClass constructor.
*/
public function __construct()
{
echo 'Calling constructor<br/>';
}
function some_method()
{
echo 'Calling a method<br/>';
}
function __destruct()
{
echo 'Calling destructor<br/>';
}
} | true |
fc3f5ef44c73367b308cf077834dfb3def059f25 | PHP | Dampkring1/OperationScreens | /func/fetchuser.php | UTF-8 | 2,750 | 2.625 | 3 | [] | no_license | <?php
$connect = mysqli_connect("localhost", "passbook", "Jhjkbr3kv7e7(aD04BsKh8DsqFgfja", "passbook");
$output = '';
$sql = "SELECT * FROM historical WHERE user LIKE '%".$_POST["search"]."%'";
$result = mysqli_query($connect, $sql);
if(mysqli_num_rows($result) > 0)
{
$output .= '<div class="table-responsiv... | true |
1e8d0b45c29a21fe520fe10b0d9fdd020546a03d | PHP | knxroot/FONDEF-D08I1205 | /lib/DatabaseUtils.class.php | UTF-8 | 751 | 3.109375 | 3 | [] | no_license | <?php
class DatabaseUtils
{
public static function getQueryKeys($array)
{
$keys = array_keys($array);
array_walk($keys, create_function('&$key', '$key = $key;'));
return implode(', ', $keys);
}
public static function getQueryPlaceholders($array)
{
$keys... | true |
56f390ac61587a36af964f4ae1f8f360fd09187e | PHP | grimskin/cardmaster | /src/Helper/ManaVariator.php | UTF-8 | 1,723 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Helper;
use App\Model\CardDefinition;
/**
* @deprecated
*/
class ManaVariator
{
public static function getManaOptions(CardDefinition ...$cardDefinitions): array
{
$lands = array_filter($cardDefinitions, function (CardDefinition $item) {
return $item->isLand();
... | true |
44968e9add0784fce23e821c5818138789a6dd4c | PHP | parix1999/php-snacks-b1 | /Snack-1/index.php | UTF-8 | 1,709 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Snack-1</title>
</head>
<body>
<!-- Traccia:
Creiamo una struttura dati che rappresenta le partite di... | true |
f10a44e60bfa5ca56a6f0cd0fc3253f07299ffc6 | PHP | scozdev/web-servis-basit | /register.php | UTF-8 | 1,703 | 2.625 | 3 | [] | no_license | <?php
require 'db.php';
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$user_name = $_POST['user_name'] ? $_POST['user_name'] : '';
$user_mail = $_POST['user_mail'] ? $_POST['user_mail'] : '';
$user_pass = $_POST['user_pass'] ? $_POST['user_pass'] : '';
$user_confirmation = rand(0, 1000) . rand(0, 1000... | true |
3b9feded08b4a8537575795f62bc69a6c9d0d13a | PHP | thinwalk/techneter | /app/Modules/Forum/Repositories/Eloquents/ForumCategoryRepository.php | UTF-8 | 1,378 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Modules\Forum\Repositories\Eloquents;
use App\Modules\Forum\Repositories\Contracts\ForumCategoryRepositoryInterface;
use App\Repositories\EloquentRepository;
use App\Repositories\OperateIdTrait;
use App\Modules\Forum\Models\ForumCategory;
use App\Exceptions\RepositoryException;
class ForumCategoryR... | true |
23df6d56cf805aa5ff22b68f598eb813cbbac2fe | PHP | MthulisiNdzombane/camagru | /components/Router.php | UTF-8 | 482 | 3 | 3 | [] | no_license | <?php
class Router
{
private $routes;
public function _construct()
{
$routesPath = ROOT.'config/routes.php';
$this->routes = include($routesPath);
}
public function run()
{
print_r(($this->routes));
//Get required string
//Check his required in ro... | true |
1ddd0f2572c1c73537acaa6bfbb6d3c346cc5397 | PHP | 1999davidramos/Gues-My-Nomber | /turnoMaquina.php | UTF-8 | 1,754 | 3.03125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Adivina maquina</title>
</head>
<body>
<a href="index.php">Volver a la pagina principal</a>
<br>
<form method... | true |
ddbe9c1dd4100c9775a95ec5724916ca7b80cfa4 | PHP | filipekp/queue | /src/db/adaptors/Mysqli.php | UTF-8 | 8,619 | 2.859375 | 3 | [] | no_license | <?php
namespace filipekp\queue\db\adaptors;
use filipekp\queue\db\DatabaseException;
use PF\helpers\MyArray;
/**
* Třída MySQLi.
*
* @author Pavel Filípek <pavel@filipek-czech.cz>
* @copyright © 2019, Proclient s.r.o.
* @created 03.04.2019
*/
final class Mysqli implements IAdaptor
... | true |
5dd11ac38d7a775766f53f91b5188c96f0d2d7a6 | PHP | hilalahmad32/iNotebook-website-php-ajax | /php/login.php | UTF-8 | 799 | 2.59375 | 3 | [] | no_license | <?php
include "config.php";
session_start();
if (isset($_POST["email"]) || isset($_POST["password"])) {
$email = mysqli_real_escape_string($conn, $_POST["email"]);
$password = mysqli_real_escape_string($conn, md5($_POST["password"]));
$sql = "SELECT * FROM users WHERE email='{$email}' AND passwrd='{$passwo... | true |
3824baf9505eb4f370aeabe67f7246f738811655 | PHP | duyanh1992/PHP_ZendVN | /PHP_ARRAY/second/array_chang_key_case.php | UTF-8 | 395 | 3.140625 | 3 | [] | no_license | <?php
echo "Old array: ";
$arr = array('one'=>'HTML','tWo'=>'CSS','THree'=>'PHP');
print_r($arr); //('one'=>'HTML','tWo'=>'CSS','THree'=>'PHP')
echo "<br />";
echo "New array: ";
$newArr = array_change_key_case($arr, CASE_UPPER);
print_r($arr); //('ONE'=>'HTML','TWO'=>'CSS','THREE'=>'PHP')
// Nếu muốn chuyển cá... | true |
e0f170f902cf6252be4439d612bc746b6880650a | PHP | judgedim/mutagenesis | /library/Mutagenesis/Adapter/AdapterAbstract.php | UTF-8 | 2,267 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Mutagenesis
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://github.com/padraic/mutateme/blob/rewrite/LICENSE
* If you did not receive a copy of the... | true |
cea167c7fda81746258e57a607ef933eac7dfeb8 | PHP | vansang1201200/advanced-Object-oriented-design.php | /thuc-hanh/class-chicken.php | UTF-8 | 259 | 2.859375 | 3 | [] | no_license | <?php
include_once './classAnimal.php';
include_once './class-edible.php';
class chicken extends Aminal {
public function makeSound()
{
return "chicken : dau xa";
}
public function howtoEat(){
return "aaaaa";
}
} | true |
5ac06e9329f72fff02b394e1b9a0657426957bc8 | PHP | eklundchristopher/viewpress | /src/Filters/TemplateHandler.php | UTF-8 | 3,059 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace EklundChristopher\ViewPress\Filters;
use EklundChristopher\ViewPress\Application;
abstract class TemplateHandler
{
/**
* Holds the Application implementation.
*
* @var \EklundChristopher\ViewPress\Application
*/
protected $app;
/**
* Instantiate a new filter obje... | true |
35fbd32aaf22b688d60730debd4e28bab787567b | PHP | CouponIsTalking/PriceWatch | /trackit/app/Model/OcResponse.php | UTF-8 | 7,311 | 2.578125 | 3 | [] | no_license | <?php
App::uses('AppModel', 'Model');
/**
* OcResponse Model
*
*/
class OcResponse extends AppModel {
public function getType($ocr)
{
return $ocr['OcResponse']['response_type'];
}
public function mark_accepted($ocr_id)
{
$ocr = $this->getRawResponseByOcrId($ocr_id);
if (empty($ocr))
{
return fals... | true |
d4b53aea69e9648ce214c6bba4c9744c34aeccd1 | PHP | Neppord/phocate | /src/File/PhpFile.php | UTF-8 | 513 | 2.953125 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Phocate\File;
use Phocate\Parsing\Token\Tokens;
class PhpFile
{
/** @var string */
private $path;
public function __construct(string $path)
{
$this->path = $path;
}
public function getTokens(): Tokens
{
$content = file_get_cont... | true |
07e308ad04ad203acc086cb64d0e0a13d15c4eca | PHP | 9TF/contact | /user/signup.php | UTF-8 | 7,830 | 2.59375 | 3 | [] | no_license | <?php
$status = 0;
$template = 1;
$user_name = '';
$password = '';
$confirm_password = '';
$name = '';
$email = '';
$number = '';
$question = '';
$image = '';
$answer = '';
$verified = '';
$verification_code='';
$error = array();
if (isset($_POST['signup'])) {
$user_name = $_REQUEST['user_name'];
$password ... | true |
98ce4daf58e2aa8271e9919e88fc674af510ffeb | PHP | cchura94/curso_php | /Proyecto/models/Producto.php | UTF-8 | 1,569 | 2.6875 | 3 | [] | no_license | <?php
$dir_root = $_SERVER['DOCUMENT_ROOT'];
require_once($dir_root."/php/Proyecto/models/Conexion.php");
class Producto extends Conexion
{
public function lista()
{
$sql = "SELECT * from productos";
return Conexion::consultaRetorno($sql);
}
public function guardar($nom, $cant, $pre... | true |
078666f5558c4d189f8a120f966d896cec973108 | PHP | espci-alumni/annuaire | /interface/class/agent/atlas/marks.php | UTF-8 | 2,128 | 2.53125 | 3 | [] | no_license | <?php
class agent_atlas_marks extends agent
{
public $get = array(
'zoom:i:1:5' => 1,
'mnLt:f:-90:90' => -90,
'mxLt:f:-90:90' => 90,
'mnLg:f:-180:180' => -180,
'mxLg:f:-180:180' => 180,
);
function compose($o)
{
$sql = 'IF((VARIANCE(longitude)!=0 OR VARI... | true |
1c819a0da3a992a1e013fc2661a919a128f499f6 | PHP | Gabr13dev/pagina-pessoal | /dash/lib/Chart.class.php | UTF-8 | 2,288 | 2.78125 | 3 | [] | no_license | <?php
/*
*
*
*/
class Chart {
public $chartType,$data;
function __construct($type,$values = [],$names = [],$nameId)
{
$this->chartType = $type;
$this->data = $values;
$this->names = $names;
$this->nameId = $nameId;
}
private function initChartDependences(){
... | true |
847e3c19c4c6adad87496252e4d87b666130f46e | PHP | ifeanyi-ajimah/student-management | /app/Http/Controllers/MyClassController.php | UTF-8 | 1,984 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\MyClass;
class MyClassController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* Show the form f... | true |
0928c3e2af2bed3888c61971979cd687dfdf9dab | PHP | xapu3ma/ulitayka | /app/Repositories/PolicyRepository.php | UTF-8 | 548 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\User;
class PolicyRepository
{
/**
* Получить все задачи заданного пользователя.
*
* @param User $user
* @return Collection
*/
public function forUser(User $user)
{
$policies = $user->policies()->orderBy('created_at', 'asc')->ge... | true |
036972cb8b068b4cd33927567090489318ccf33c | PHP | uzproger/yii2-migrator | /src/MigrateController.php | UTF-8 | 4,029 | 2.609375 | 3 | [] | no_license | <?php
namespace uzproger\migrator;
use Yii;
use yii\console\controllers\MigrateController as BaseMigrateController;
use yii\db\Query;
use yii\helpers\ArrayHelper;
/**
* Yii2 migrator class
*/
class MigrateController extends BaseMigrateController
{
/**
* @var string Main migration name
... | true |
bfe74f0e0b02c689554f429127e03ce76f2884a2 | PHP | tonyyuanzaizai/tower-open-api-php | /common.php | UTF-8 | 3,566 | 2.65625 | 3 | [] | no_license | <?php
function getIp(){
return $_SERVER['REMOTE_ADDR'];
}
function getIp2(){
$ip = "Unknow";
if (getenv("HTTP_CLIENT_IP")){
$ip = getenv("HTTP_CLIENT_IP");
}
else if(getenv("HTTP_X_FORWARDED_FOR")){
$ip = getenv("HTTP_X_FORWARDED_FOR");
}
else if(getenv("REMOTE_ADDR")){
... | true |
0f83c6b32858b87785d91937ccdf56f5a6c09253 | PHP | Devil29/Thesis_Uploader | /Notice Board/core/classes/core.php | UTF-8 | 1,212 | 2.703125 | 3 | [] | no_license | <?php
//echo "core";
// include_once '../../../config/config.php';
define("HOST11", "http://localhost/ProjectUploader");
define("HOSTNAME", "localhost");
define("USERNAME", "root");
define("PASS", "kunal");
define("DBNAME", "project");
?>
<?php
class core {
public $count;
protected $db, $result;
private $rows;
pu... | true |
d7792377b7c73fc62214aaaf3727ee86556c7511 | PHP | Innmind/RabbitMQManagement | /src/Control.php | UTF-8 | 867 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Innmind\RabbitMQ\Management;
use Innmind\RabbitMQ\Management\Control\{
Users,
VHosts,
Permissions,
};
use Innmind\Server\Control\Server;
final class Control
{
private Users $users;
private VHosts $vhosts;
private Permissions $permissions;
privat... | true |
cce53e6706d9ab6c8f4ba179f6e17410cc604161 | PHP | kuso-megane/blog | /www/Models/infra/database/tests/CategoryTableTest.php | UTF-8 | 1,151 | 2.53125 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
use infra\database\src\CategoryTable;
use myapp\myFrameWork\DB\Connection;
use myapp\myFrameWork\DB\MyDbh;
class CategoryTableTest extends TestCase
{
const TABLENAME = 'Category';
private $dbh;
private $table;
protected function setUp():void
{
$this-... | true |
0fb9a839af7df1e201d7d5ed3020516044323515 | PHP | slavkoss/fwphp | /fwphp/glomodul/z_examples/php_patterns/singleton_B12phpfw.php | UTF-8 | 4,320 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
// J:\awww\www\fwphp\glomodul\z_examples\php_patterns\singleton_B12phpfw.php
//SINGLETON PATTERN with a class that establishes a database connection,
//and restricts the number of instances to only one.
//https://phpenthusiast.com/blog/the-singleton-design-pattern-in-php
namespace B12phpfw\module\php_patterns ;
... | true |
7d6e3c174353e06f5f0164bd6265489a80b141ef | PHP | sjelfull/api-traffic-inspector | /proxy.php | UTF-8 | 2,717 | 2.78125 | 3 | [] | no_license | <?php
/*
* Warning! Read and use at your own risk!
*
* This tiny proxy script is completely transparent and it passes
* all requests and headers without any checking of any kind.
* The same happens with JSON data. They are simply forwarded.
*
* This is just an easy and convenient solution for the AJAX
* cross-domain re... | true |
e4e4751b4f1048764a8f5c1e4286d9b43b3ac6dc | PHP | fullstack82/Master-php-7 | /php7/ejercicios-bloques1/ejercicio5.php | UTF-8 | 530 | 3.765625 | 4 | [] | no_license | <?php
/*
- Ejercicio nº 5:
Hacer un programa que muestre todos los números entre dos numeros que nos llegan por la url($_GET)
*/
if (isset($_GET['numero1']) && isset($_GET['numero2'])) {
$numero1 = $_GET['numero1'];
$numero2 = $_GET['numero2'];
if ($numero < $numero2) {
for ($i = $numero1; $i... | true |
ca36e5966b841d5872a42616d147de6afb42d48d | PHP | shafqatali/code-signal | /isMAC48Address/is_mac_48_address.php | UTF-8 | 309 | 2.875 | 3 | [] | no_license | <?php
function isMAC48Address($inputString) {
$ia = explode('-', $inputString);
if(sizeof($ia) != 6){ return false;}
foreach($ia as $v){
if(strlen($v) != 2 || !preg_match("/^[a-f0-9]{2,}$/i", $v)){
return false;
}
}
return true;
}
| true |