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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c0b19953f93f514ba1a1e91e905daff9bf72c690 | PHP | thanhdat130298/19php03_php | /Session13-BT MVC + SESSION/view/list_category.php | UTF-8 | 806 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/style.css">
<title>List product</title>
</head>
<body>
<table>
<?php
echo "<tr>";
echo "<th>No.</th>";
echo "<th>Category</th>";
if(isset($_SESSION['login']))
echo "<th>Action</th>";
echo "</tr>";
while($row = $li... | true |
5692b8d4dc66ee5ecef36cb2dc3f97de2d709a7e | PHP | that-coder/codeIgniter | /controller/contactuscontroller.php | UTF-8 | 1,925 | 2.75 | 3 | [] | no_license | <?php
/*form validation for contact us page*/
class Contactuscontroller extends CI_Controller
{
/**
*function to load contact us view
*@param void
*@return void
*/
public function contactUsView()
{
$this->load->view('contactusview'
}
/**
*function to load contact us ... | true |
75a0a5fc8f1def34b472deead684ab0a440bb6cf | PHP | MicaelBarreto/The-30-Web | /app/Models/Weapon.php | UTF-8 | 521 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Weapon extends Model
{
protected $connection = 'mysql';
protected $casts = [
'damage' => 'float',
'fire_rate' => 'float',
'critical_chance' => 'float',
'type_id' => 'int'
];
protected $fillable = [
'name',
'description',
... | true |
0b0ba8cb9dee833067c004341c446f2998d4520f | PHP | TheTypoMaster/tb4 | /app/Libraries/exotic/ExoticBetExacta.php | UTF-8 | 650 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace TopBetta\Libraries\exotic;
/**
* Description of ExoticBetExacta
*
* @author mic
*/
class ExoticBetExacta extends ExoticBet implements ExoticBetInterface
{
protected $positionSelectionCount = 2;
public function getCombinationCount()
{
$combinationCount = 0;
if ($this->isBoxed()) {
$com... | true |
ddd23eb5f82a5a41df56b37c0d9f8bf0261992b0 | PHP | mavisfrancia/maxinami_games | /check_if_username_available.php | UTF-8 | 454 | 2.609375 | 3 | [] | no_license | <?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if(isset($_POST['username'])) {
require_once 'userDAO.php';
require_once 'databaseConnector.php';
$userDAO = new userDAO();
$db = new databaseConnector();
$con = $db->getConnection();
$result = $userDAO->selectByUsername($_POST['username'],$con);
if (m... | true |
da58112afa5cc48dfc37dd68b9e22d59633f3454 | PHP | CVReferral/phalconslayer | /src/Clarity/Contracts/Mail/MailInterface.php | UTF-8 | 2,322 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* PhalconSlayer\Framework.
*
* @copyright 2015-2016 Daison Carino <daison12006013@gmail.com>
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://docs.phalconslayer.com
*/
namespace Clarity\Contracts\Mail;
/**
* A mail interface for adapter handling.
*/
interface ... | true |
3898564f0e6fceb4cb4bd88de51b0c4416e2207b | PHP | FunnyBuddys/NoMessage | /src/FunnyBuddys/NoMessage/Listener/QuitListener.php | UTF-8 | 395 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace FunnyBuddys\NoMessage\Listener;
use FunnyBuddys\NoMessage\Main;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerQuitEvent;
class QuitListener implements Listener {
public function __construct(Main $main) {
$this->main = $main;
}
public function onQui... | true |
8e90cdcd22eda957a0436dd75acac01a05ffa0c9 | PHP | ericposas/lister-api | /src/Entity/Contact.php | UTF-8 | 2,199 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
// src/Entity/Contact.php
namespace PHPapp\Entity;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Table;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\OneToOne;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doc... | true |
16c7a1c2e44a0cf7baa2acee1aa6a0b69dd40aa2 | PHP | kfahmi/dolpini | /app/Models/Badwords.php | UTF-8 | 1,059 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Badwords extends Model
{
use SoftDeletes;
protected $table = "badwords";
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [... | true |
5bc4e9145d7d99a40968fd85ed9faed1fcbdbbe6 | PHP | hebinet/laravel-svg-icons | /src/IconController.php | UTF-8 | 1,127 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php namespace Hebinet\SvgIcons;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class IconController
{
/**
* @param Request $request
* @param $style
* @param $icon
*
* @return Response
*/
public functi... | true |
60861fa97c573c9d162ad313f3ddd04251f05783 | PHP | johnnywoo/cliff | /lib/Cliff/Token.php | UTF-8 | 1,187 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
namespace Cliff;
class Token
{
/**
* The arg in raw form, as it was written in the command
* @var string
*/
public $arg = '';
/**
* The word that is parsed out of the arg
* @var string
*/
public $word = '';
public function __construct($arg, $word)
{
... | true |
2b322e0379f482e5e5c29be01f40db0230560d94 | PHP | cash2one/cj | /trunk/apps/voa/src/include/s/oa/weixin/location.php | UTF-8 | 3,456 | 2.828125 | 3 | [] | no_license | <?php
/**
* voa_s_oa_weixin_location
* 用户表
*
* $Author$
* $Id$
*/
class voa_s_oa_weixin_location extends service {
/** 分库/分表的信息 */
private $__shard_key = array();
/**
* __construct
*
* @param array $shard_key
* @return void
*/
public function __construct($shard_key = array()) {
$this->__shard_... | true |
eaa594ba46b67218b5c2f59a83acc52113a7caf0 | PHP | gimhanr9/laravel_car_rental | /app/Http/Controllers/DriversController.php | UTF-8 | 2,645 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Drivers;
use Illuminate\Http\Request;
class DriversController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('officer.listDrivers... | true |
0665c3997f83143ae22982815a1eed6ed02173ae | PHP | GautchAA/beejee.local | /controllers/TaskController.php | UTF-8 | 3,496 | 2.78125 | 3 | [] | no_license | <?php
class TaskController
{
public static function add(){
$data = [];
$data['error'] = [];
$data['method'] = "get";
$name = '';
$email = '';
$body = '';
if($_SERVER['REQUEST_METHOD'] === 'POST')
{
$data['method'] = "post";
$task = new Task();
if (isset($_PO... | true |
f40547ab4dcd41eaeed2ce01d849df309946e4f7 | PHP | youdoml/myBBS | /application/index/model/Words.php | UTF-8 | 655 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 留言模型
*/
namespace app\index\model;
class Words extends BaseModel
{
protected $pk = 'wid';
protected $autoWriteTimestamp = true;
protected $updateTime = false;
// public function getCreateTimeAttr($value)
// {
// // return date('Y-m-d', $value);
// }
public functio... | true |
4327aaf44aa762bdc897a8f83ad82bdfad5583d5 | PHP | JiankangMai/SwooleImpale | /src/Util/Script.php | UTF-8 | 1,618 | 2.765625 | 3 | [] | no_license | <?php
namespace BromineMai\SwooleImpale\Util;
class Script{
/**
* @param array $allowParam 参数列表 支持传递方式: 全部不提供默认值 ['uid'] 部分提供默认值 ['uid'=>1,'age'=>null]
* @return array
* @throws \Exception
* @author Jiankang maijiankang@foxmail.com
*/
public static function parseCliParam($allow... | true |
3c49ed73789012bd3bc020176bbbada47fd73ec7 | PHP | dala00/cheetan-web | /user/edit.php | UTF-8 | 2,021 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
require_once( '../config.php' );
require_once( '../cheetan/cheetan.php' );
function action( &$c )
{
$errmsg = '';
$user = $c->auth->islogin();
if( !empty( $_POST ) )
{
$errmsg = $c->ch_user->validatemsg( $c->data['User'] );
if( $errmsg == '' )
{
$c->data['User']['id'] = $user['id'];
$c->ch_use... | true |
d2021f395bff58b26b14e685a94a218bff8d829c | PHP | Antonin-dev/EntrainementSymfony | /src/Service/CovidService.php | UTF-8 | 2,219 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Service;
use Symfony\Contracts\HttpClient\HttpClientInterface;
class CovidService
{
private $httpClient;
public function __construct(HttpClientInterface $httpClient)
{
$this->httpClient = $httpClient;
}
public function getApi()
{
$response = $... | true |
c2215a706fdb03b5aa985bfc2db3dfd490d72bb0 | PHP | noneproject/mvc | /app/functions/common.php | UTF-8 | 1,263 | 2.53125 | 3 | [] | no_license | <?php
use Owl\Database;
use Owl\View;
use Owl\Controller;
function fn_init() {
session_start();
require_once(__ROOT__.'/config.php');
fn_load_all();
Database::setConfig($db_conf);
$controller = new Controller();
View::showPage($controller->run_controller, $controller->run_mode);
/*$result = ob_get_clean();
fi... | true |
e263e599753b4bcdd5faf73f8f098b64a8d9c45f | PHP | RealGatt/BuySwapSellWebsite | /components/itemlist.php | UTF-8 | 2,995 | 2.609375 | 3 | [] | no_license | <?php
include_once("./api/itemapi.php");
include_once("./api/userapi.php");
if (!isset($initialItems) || is_null($initialItems)) {
$initialItems = getItemsWithState("ACCEPTING_OFFERS"); // everything from db that is active.
$initialItems = array_merge(getItemsWithState("SOLD"), $initialItems);
}
... | true |
a526c7d04f02bf889f6d31e7bb411d196dcfa726 | PHP | cetver/midnight-works-test-task | /api/v1/Services/SwapCategoryService.php | UTF-8 | 997 | 2.796875 | 3 | [] | no_license | <?php
namespace Api\V1\Services;
use Api\V1\Entities\CategoryEntity;
use Illuminate\Database\Connection;
class SwapCategoryService
{
/**
* @var Connection
*/
private $connection;
public function __construct(Connection $connection)
{
$this->connection = $connection;
}
/**
... | true |
6ebb3f45b0d0bf3d7c8af9b8ff574c55d18923c3 | PHP | booklet/utils | /tests/UnitConverterUntilsTest.php | UTF-8 | 1,877 | 2.515625 | 3 | [] | no_license | <?php
class UnitConverterUntilsTest extends \CustomPHPUnitTestCase
{
public function testPtToMm()
{
$this->assertEquals(round(UnitConverterUntils::ptToMm(100), 8), round(35.277786107255, 8));
$this->assertEquals(UnitConverterUntils::ptToMm(100, ['precision' => 2]), 35.28);
$this->assertE... | true |
7eaaf4554b4f17900e485383930a54496fb31b72 | PHP | ivanmelchor/desarrollo-web | /php-learning/03-variables/index.php | UTF-8 | 169 | 2.953125 | 3 | [] | no_license | <?php
$mi_variable = 'Hola mundo desde una variable';
$numero = 44;
$estado = true;
echo '<h1>'.$mi_variable.'</h1>';
echo $numero."<br>";
$numero=144;
echo $numero;
?> | true |
eb310a5403d40e22e8cdbdc7ddacea47e546e634 | PHP | karayabin/universe-snapshot | /universe/Ling/FormTools/Validation/OnTheFlyFormValidator.php | UTF-8 | 16,385 | 2.734375 | 3 | [] | no_license | <?php
namespace Ling\FormTools\Validation;
use Ling\FormTools\Validation\Exception\OnTheFlyFormValidatorException;
use Ling\FormTools\Validation\Message\OnTheFlyFormValidatorMessageInterface;
use Kamille\Services\XLog;
/**
* 2017-05-28
*
* When I have time, I like to use a form model to handle my forms.
* (htt... | true |
fd606f7e734da581129ad970c6159d31878443ae | PHP | NareshRadharapu/laundry | /application/models/Entity/Complaint.php | UTF-8 | 5,775 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Entity;
use Doctrine\ORM\Mapping as ORM,
Doctrine\Common\Collections\ArrayCollection as ArrayCollection;
/**
*@ORM\Table
* @Entity
* @Table(name="complaints")
*/
class Complaint
{
/**
* @var integer $id
*@Column(name="v_id", type="integer", nullable=false) @Id @GeneratedValue
*/
pr... | true |
5ff679598b883fd1fa3195ac5b7e95af66b7150b | PHP | sokonishi/BookON | /BookON/Theme/register/signup.php | UTF-8 | 9,833 | 2.515625 | 3 | [] | no_license | <?php
session_start();
$errors = array();
if (!empty($_POST)) {
$name = $_POST['input_name'];
$email = $_POST['input_email'];
$password = $_POST['input_password'];
$count = strlen($password);
$namecount = strlen($name);
// ユーザー名の空チェック
if ($name == '... | true |
ffa2274e2c8cc4c7e823edb120c9dabc622331c0 | PHP | Firuz96-04/recipe2 | /app/Http/Controllers/Api/RecipeController.php | UTF-8 | 2,237 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Kreait\Firebase\Database;
class RecipeController extends Controller
{
public function __construct(Database $database)
{
$this->database = $database;
$this->table_name = "recipe";
... | true |
396b756c8f37dc3846b19618212480c0e6f1af4b | PHP | drwrf/mismatch-orm | /lib/ORM/Mapper.php | UTF-8 | 5,804 | 2.8125 | 3 | [] | no_license | <?php
/**
* This file is part of Mismatch.
*
* @author ♥ <hi@drwrf.com>
* @license MIT
*/
namespace Mismatch\ORM;
use Mismatch\Model\Attrs;
use Mismatch\Model\Metadata;
use Mismatch\Model\Dataset;
use Mismatch\Model\Attr\AttrInterface;
use Mismatch\ORM\Exception\UndestroyableModelException;
class Mapper
{
... | true |
9c93891bf7b29642cc7cd1e23f08e6c497b09cdc | PHP | musti2304/music-collection-api | /src/Controller/ArtistController.php | UTF-8 | 1,909 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Artist;
use App\Repository\ArtistRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use function P... | true |
8dc4277079af86b3642b0aede64654343ce3a82f | PHP | ipokos/phpquery | /phpQuery/phpQuery/Callback/CallbackReturnValue.php | UTF-8 | 888 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: gendos
* Date: 05.04.17
* Time: 12:03
*/
//namespace lib\phpQuery\phpQuery\Callback;
/**
* Callback type which on execution returns value passed during creation.
*
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
*/
class CallbackReturnValue extends Callback
impl... | true |
6642ae0e154b7ccbaaf4673a316b62b90386ee45 | PHP | ilyabrower/Kingdom | /src/Rottenwood/KingdomBundle/Command/Game/LookUser.php | UTF-8 | 1,343 | 2.75 | 3 | [] | no_license | <?php
namespace Rottenwood\KingdomBundle\Command\Game;
use Rottenwood\KingdomBundle\Command\Infrastructure\AbstractGameCommand;
use Rottenwood\KingdomBundle\Command\Infrastructure\CommandResponse;
use Rottenwood\KingdomBundle\Exception\UserNotFound;
/**
* Просмотр информации и одетых вещей другого игрока
*/
class ... | true |
02e0efc6711ca2d94907b52daa37a0fabbc9e980 | PHP | KrasimiraGeorgieva/Programming-Basics-Exam-PHP | /21. Programming Basics Online Exam - 10 and 11 March 2018/03. Slot Machine.php | UTF-8 | 518 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
$n = ord(readline());
$n1 = intval(readline());
$m = ord(readline());
$m1 = intval(readline());
$k = ord(readline());
$k1 = intval(readline());
$totalN = chr($n + $n1);
$totalM = chr($m + $m1);
$totalK = chr($k + $k1);
if("$totalN$totalM$totalK" == "777"){
printf("%d%d%d\n*** JACKPOT ***",$total... | true |
84fb359b25bc81b5988bf198392245861ac84f2b | PHP | DoddsAntS/zebra | /module/cms/src/cms/Entity/Job/Trees.php | UTF-8 | 789 | 2.640625 | 3 | [] | no_license | <?php
namespace cms\Entity\Job;
use cms\Entity\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Description of Trees
*
* @author adodds
*/
class Trees extends Entity {
private $id;
private $name;
private $description;
private $job;
private $owner;
private $tpo;
... | true |
110fe037049e52bcb3979503ec750f18c4abaa05 | PHP | kaupec/RetourVersLeFutur | /index.php | UTF-8 | 463 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: julien
* Date: 2019-04-29
* Time: 10:35
*/
require_once 'TimeTravel.php';
$timeTravel = new TimeTravel(new DateTime('1985-12-31'), new DateTime());
echo $timeTravel->getTravelInfo();
$date = $timeTravel->findDate(1000000000);
echo "<br/>" . $date->format('Y-m-d... | true |
04789b78b6b36535f325eafcfcafabb0482532c2 | PHP | andrewdallow/Magento2Practise | /app/code/Mastering/SampleModule/Cron/AddItem.php | UTF-8 | 1,156 | 2.609375 | 3 | [] | no_license | <?php
namespace Mastering\SampleModule\Cron;
use Mastering\SampleModule\Model\Config;
use Mastering\SampleModule\Model\ItemFactory;
/**
* Class AddItem
*
* Long description for Class (if any)...
*
* @category Mastering
* @package Mastering_SampleModule
* @copyright Copyright (c) 2018 ecommistry (http:/... | true |
411e7af04a7eb459573680ac5ce7f367566c3848 | PHP | c3rb3rusOne/videoQuizz | /src/BaseBundle/Event/UserCreatedListener.php | UTF-8 | 438 | 2.5625 | 3 | [] | no_license | <?php
// src/BaseBundle/Event/UserCreatedListener.php
namespace BaseBundle\Event;
class UserCreatedListener
{
protected $mailerMaison;
public function __construct($mailerMaison)
{
$this->mailerMaison = $mailerMaison;
}
public function process($event)
{
print($event->getUserEm... | true |
a45945bac64a757b111bf7b14291b5c59e156d68 | PHP | 100drine/PARAMURL | /index5.php | UTF-8 | 617 | 2.859375 | 3 | [] | no_license | ##Exercice 5 Faire une page index.php. Tester sur cette page que tous les paramètres de cette URL
existent et les afficher: index.php?sema
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=ed... | true |
062a52ea73df1147ea552c056fec01b72b519e4c | PHP | geodesicsolutions-community/geocore-community | /src/classes/api/_samples/user.listings.active_client.php | UTF-8 | 5,236 | 2.65625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
//_samples/user.listings.active_client.php
//Sample API client, that uses the core.user.listings.active api call to get a
//list of active listings for a specific user
/*
Note: This is intended for people that are familiar with editing PHP
files.
Instructions for using this as a stand-alone API client:
... | true |
507390e09a082615fd3adb2c762d3a7820ff663a | PHP | siganevich/siganevich.github.io | /projects/anketaSession/sessionform2.php | UTF-8 | 1,934 | 2.875 | 3 | [] | no_license | <?php
session_start(); // создаем сессию
$lastname = (isset($_POST["lastname"]))?$_POST["lastname"]:"";
$firstname = (isset($_POST["firstname"]))?$_POST["firstname"]:"";
if ($firstname == "" || $lastname == "")
{
$firstname = (isset($_SESSION["fnm"]))?$_SESSION["fnm"... | true |
201292f1f5e42fbcc81b5e26a7e2e8721444fef0 | PHP | philandteds/multisafepay | /classes/multi_safepay.php | UTF-8 | 1,404 | 2.53125 | 3 | [] | no_license | <?php
/**
* @package MultiSafepay
* @class MultiSafepayAPI
* @author Serhey Dolgushev <dolgushev.serhey@gmail.com>
* @date 03 Jun 2014
* */
class MultiSafepayAPI extends MultiSafepay {
public $plugin_name = 'eZPublish connect';
public $version = '06-2014';
public function xmlPost( $url, $r... | true |
fa2516c3093e64c33d0fd6885d397b995632522b | PHP | DevishBaidawarChhetri/CP-Nepali-Handicraft | /Coding/actions/contact-action.php | UTF-8 | 702 | 2.71875 | 3 | [] | no_license | <?php
require "../classes/contact.class.php";
$contact = new Contact();
if(isset($_POST['contact-submit'])){
// Datas from form
$name = $_POST['contact-name'];
$email = $_POST['contact-email'];
$subject = $_POST['contact-subject'];
$message = $_POST['contact-message'... | true |
76c731f369ded35179d64df3336393d48a6a8732 | PHP | msi89/OyeFramework | /app/Api/Controllers/SiteController.php | UTF-8 | 607 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Api\Controllers;
use App\Modules\Mail;
use App\Base\ApiController;
class SiteController extends ApiController{
public function sendMail(){
$this->verifyRequiredParams(['name','email','subject', 'message']);
$name = $this->app->request->post('name');
$e... | true |
a53efdb0977bbcb8fbce3534e2a4363a1c581710 | PHP | Thom2503/vogelspotters | /PHP/post_verwerk.php | UTF-8 | 2,252 | 2.765625 | 3 | [] | no_license | <?php
require "config.inc.php";
session_start();
if (isset($_SESSION['ID']) == false)
{
header("location: index.php");
}
$_SESSION['ID'];
function uuidv4()
{
$data = openssl_random_pseudo_bytes(16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40);
$data[8] = chr(ord($data[8]) & 0x3f | 0x80);
return vsprintf(... | true |
3399fc72419f681c04c24e03c023a92f859a45ec | PHP | verdephp/verde | /src/Func.php | UTF-8 | 2,481 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Verde;
class Func extends Implementation
{
/**
* @var array<Func|callable> $mocks array of all the mocks created
*/
protected static $mocks = [];
/**
* @var string|null the internal $mock key
*/
protected $indexKey = null;
/**
*... | true |
8804830957f74c3f0e49327376c1499cb40b0130 | PHP | digideskio/backckendlara | /src/Darryldecode/Backend/Components/Navigation/Commands/ListNavigationCommand.php | UTF-8 | 1,462 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php namespace Darryldecode\Backend\Components\Navigation\Commands;
/**
* this Command is use to list the backend dashboard navigation
*
* Created by PhpStorm.
* User: darryl
* Date: 2/5/2015
* Time: 9:43 PM
*/
use Darryldecode\Backend\Base\Commands\Command;
use Darryldecode\Backend\Base\Commands\CommandResul... | true |
02bf8f9a4c9f50c06f264fa60fd2439e936d31ff | PHP | Niktux/firenote | /src/Firenote/NavBarContainers/Messages.php | UTF-8 | 557 | 2.84375 | 3 | [] | no_license | <?php
namespace Firenote\NavBarContainers;
class Messages implements \Firenote\NavBarContainer
{
private
$messages;
public function __construct(array $messages = array())
{
$this->messages = $messages;
}
public function AddMessage(Messages\Message $message)
{
... | true |
8a5c033d9105744a900120805176aa0941709f83 | PHP | lincolnbrito/address-finder | /api/app/Services/CepService.php | UTF-8 | 1,375 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\Address;
class CepService extends ApiService
{
public function __construct()
{
parent::__construct(config('services.cep.endpoint'));
}
/**
* @param string $zipcode
* @return \Illuminate\Http\Client\Response
*/
public function ge... | true |
df85f8a800ce8d2681e562fc8ff5bfa276edef59 | PHP | jackpit93/laravel-entity-scaffold | /src/Console/EntityScaffold.php | UTF-8 | 1,841 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace MohammadNaj\laravelEntityScaffold\Console;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
use MohammadNaj\laravelEntityScaffold\EntityMaker;
class EntityScaffold extends Command
{
use EntityMaker;
/**
* The name and signature of the console command.
*
* @var string
... | true |
783c0b73f4329dae75905419f43578cba70d322d | PHP | lyawile/smisres | /application/libraries/Pdf.php | UTF-8 | 314 | 2.65625 | 3 | [] | no_license | <?php
require_once 'fpdf181/fpdf.php';
class Pdf extends FPDF {
public function __construct($orientation = 'P', $unit = 'mm', $size = 'A4') {
parent::__construct($orientation, $unit, $size);
}
function Header() {
}
function Footer() {
}
}
| true |
735d041d20ab8b643bf4ef69095138ebb3f7d567 | PHP | artyomderyavka/phpTestProject | /src/index.php | UTF-8 | 718 | 2.796875 | 3 | [] | no_license | <?php
echo "<pre>";
var_dump($_SERVER);
die;
echo "Hello, world!";
$pdo = new PDO('mysql:host=mysql-inst-1;port=3306;dbname=admin', "admin", "admin");
/*$stmt = $pdo->prepare('INSERT INTO users set name = :name');
$stmt->execute([':name' => "artyom"]);*/
$mc = new Memcached();
$mc->addServer('memcache-inst-1', 11211... | true |
d1e64ceab58a224d1e6dd933cf313ccd5e66ce7e | PHP | GaiaGuzzoBonifacio/php | /case_study/tasklistArray/lib/searchFunctions.php | UTF-8 | 673 | 3.09375 | 3 | [] | no_license | <?php
/**
* Funzione di ordine superiore funzione che restituisce una funzione
* Programmazione Funzionale - dichiarativo
*/
function searchText($searchText) {
// $searchText : locale
// per fare il modo che $searchText sia visibile (ambito) all'interno della funzione anonima
// devo usare "use"
r... | true |
b3e49bec46fcf283b2a143d0c1d1fbe4180a0295 | PHP | alexhuang0904/notify | /index.php | UTF-8 | 2,600 | 2.875 | 3 | [] | no_license | <?php
require "vendor/autoload.php";
use app\ReadFileService;
use app\Notify;
use app\Sms;
date_default_timezone_set('Asia/Taipei'); // 設定時區
//TODO 讀取 csv 檔案
$readFileService = new ReadFileService();
$contracts = $readFileService->getList("order.csv");
//TODO 找出快到期的客戶
$notify = new Notify();
$dates = $notify->getNo... | true |
866327ab4d9766d984d775f766b9da9ab1d0eafe | PHP | Haryto/NewsTwitter | /Connector.php | UTF-8 | 359 | 2.71875 | 3 | [] | no_license | <?php
abstract class Connector {
private $connection;
abstract protected function connect( $keys );
abstract protected function verify();
abstract protected function sendRequest( $url, $options );
abstract protected function getHtml( $response, $update );
abstract public function get... | true |
2c23ca30e9668f568ff6b5f2fc008867553cc580 | PHP | AnthonyNystrom/Twixxee | /oauth/callback.php | UTF-8 | 1,161 | 2.515625 | 3 | [] | no_license | <?php
/**
* Take the user when they return from Twitter. Get access tokens.
* Verify credentials and redirect to based on response from Twitter.
*/
session_start();
require_once("OAuth.php");
require_once("config.php");
$access_token = "https://api.twitter.com/oauth/access_token";
$sig_method = new OAuthSignatureMe... | true |
04c4700a16116f9c4483345ad333de7a363cc6d6 | PHP | tranchuyen282/FacebookFeedIndex | /app/Model/Traits/StatusTrait.php | UTF-8 | 1,855 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Model\Traits;
use App\Exceptions\InvalidStatusException;
use App\User;
use Illuminate\Support\Collection;
trait StatusTrait{
protected static $_statuses=[];
protected static $__skipStatusCheck=false;
static function registerStatus($status,$args=[]){
if(is_array($status)){
... | true |
9b748debeef6cec16055b486ff7b16f76ace84c5 | PHP | gallu/MagicWeaponTest | /lib/common/base_model_front_base.inc | UTF-8 | 753 | 2.546875 | 3 | [] | no_license | <?php
/**
* 業務 フロント用 基底クラス
*
*
* @package magicweapon
* @link http://www.grid-works-guild.net/MagicWeapon/ MagicWeapon
* @access public
* @author Michiaki Wuzawa <wuzawa@m-fr.net>
**/
require_once('common/base_model_base.inc');
abstract class base_model_front_base extends base_model_base {
// 空メソッド。「認証が必要... | true |
204bb1340095a8c1e30eb39990ff3b9de8bc6fdb | PHP | Hound1997c/Aplikacje-Internetowe | /lekcja5Alternative/app/View/Products/index.ctp | UTF-8 | 1,261 | 2.640625 | 3 | [] | no_license | <?php
//session_start();
$this->Html->css('app/webroot/css/styles.css');
?>
<body>
<div>
<h1>Products</h1>
<table>
<tr>
<th>name</th>
<th></th>
<th></th>
</tr>
<?php foreach ($Products as $product): ?>
<tr>
<td>
<?php echo $this->Html->link($product['Product']['name'],
array('ac... | true |
c9fffe030e7144bec386649fe14f40f4a3cc1ccf | PHP | sonixtwo/dgbin | /search-history/search-history.php | UTF-8 | 16,749 | 2.609375 | 3 | [] | no_license | <?php
include "../shared/settings.php";
include "../shared/functions.php";
session_start()
or die("Could not start session.");
$link = mysql_connect(DATABASE_SERVER_NAME, DATABASE_USERNAME, DATABASE_PASSWORD)
or die("Could not connect: " . mysql_error());
mysql_select_db(DATABASE_NAME, $link)
or die("... | true |
d3d6e70b6821fd46964f50f7fae4a8f2365760ab | PHP | comely-io/utils | /src/UTF8/UTF8Charset.php | UTF-8 | 1,801 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of "comely-io/utils" package.
* https://github.com/comely-io/utils
*
* Copyright (c) Furqan A. Siddiqui <hello@furqansiddiqui.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code or visit following link:
... | true |
16520edbbf62bed4b70b9dcfd7ee11521df53b74 | PHP | watoki/deli | /spec/fixtures/TestDelivererStub.php | UTF-8 | 860 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace spec\watoki\deli\fixtures;
use watoki\deli\Request;
use watoki\deli\RequestBuilder;
use watoki\deli\ResponseDeliverer;
class TestDelivererStub implements ResponseDeliverer, RequestBuilder {
public $request;
public $response;
private $onDeliver;
function __construct(Request $request... | true |
a66c0c7584bda88f898ef9563ee8ab3ebf375724 | PHP | White-Hare/liman-sambahvl | /app/Utils/Command/LimanRunnerEngine.php | UTF-8 | 285 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Utils\Command;
use Liman\Toolkit\Shell\ICommandEngine;
class LimanRunnerEngine implements ICommandEngine
{
public static function run($command)
{
return shell_exec($command);
}
public static function sudo()
{
return "";
}
} | true |
5e41b7cd67be69f3139609a726ac899a287086b5 | PHP | jorobash/laravel-cron | /routes/web.php | UTF-8 | 1,315 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Carbon\Carbon;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider wit... | true |
53ea005e0dcdcbd13ceaff2fb15bdde7f73ef081 | PHP | tomasdelvechio/Paw_TpFinal | /SegundaEntrega/InkMaster/core/helpers.php | UTF-8 | 459 | 2.75 | 3 | [] | no_license | <?php
use App\Core\App;
/**
* Require a views.
*
* @param string $name
* @param array $data
*/
function view($name, $data = [])
{
$logger = App::get('logger');
$logger->debug('Vista: ', compact('name'));
$logger->debug('Datos en la vista', $data);
return App::get('twig')->render("{$name}.html... | true |
ee50d3d31a4c9012a0b68a92eef1667b0d14b9fe | PHP | JhonatanEstabile/ProjetoHerois | /app/Http/Controllers/HeroiControlador.php | UTF-8 | 7,297 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use App\Classe;
use App\Heroi;
use App\Especialidade;
use App\HeroiEspecialidade;
class HeroiControlador extends Controller
{
/**
* Retorna a view com os dados dos heróis.
*
* @return view vi... | true |
aa3026430bf8ac1816ad1caadebbdc6951133ccd | PHP | jasny/persist-core | /src/Schema/Join.php | UTF-8 | 980 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Jasny\Persist\Schema;
use Jasny\Immutable;
use function Jasny\str_before;
/**
* Field pairs as ON in JOIN statement.
*
* new Join(['a' => 'b', 'q' => 'r']) means JOIN ON a = b AND q = r
*/
final class Join implements JoinInterface
{
/** @var array<string,string> */
... | true |
f81e49f430c511170c027d6daa77dc3e8c8dd859 | PHP | bluebell185/webcrawler | /index.php | UTF-8 | 19,261 | 3.203125 | 3 | [] | no_license | <?php
class Crawler {
#Seiteninhalt
protected $markup = '';
#URL in base
public $base = '';
#Konstruktor
public function __construct($uri) {
$this->base = $uri;
$this->markup = $this->getMarkup($uri);
}
public function getMark... | true |
d5593669040edeb966aed1e9a8bbdb620b7c2e84 | PHP | hanfei4550/huiqian | /php/huiqian/UserDao.php | UTF-8 | 612 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: hanfei
* Date: 16/4/26
* Time: 下午2:49
*/
require_once(dirname(__FILE__) . "/" . "ConnectionService.php");
class UserDao
{
function saveUser($name, $phone, $introduction, $mainBody)
{
$connManager = new ConnectionService();
$conn = $connManager->get... | true |
82608b1304a9c7f783c6365b189d8bd4d83317db | PHP | webmappsrl/wm-server | /tests/WebmappPostGisTest.php | UTF-8 | 6,685 | 2.59375 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
class WebmappPostGisTest extends TestCase {
// Elevation tolerance
private $delta_ele = 20;
public function testSingleton() {
$pg1 = WebmappPostGis::Instance();
$res1 = $pg1->getResource();
$pg2 = WebmappPostGis::Instance();
$res2 = $pg2->getResource();
$this->asser... | true |
b326ac16fa9a987bb75d5f9fc3ad30861820e256 | PHP | charlesaloaye/Mena-Robots-Text-Tracker-or-Checker | /includes/getRobot.php | UTF-8 | 546 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
$url = $_POST['url'];
if(isset($_POST['track']))
if (substr($url, 0, 7) =='http://' || substr($url, 0, 8) =='https://') {
$robotsUrl = $url.'/robots.txt';
$finalTrack = file_get_contents($robotsUrl);
if(($finalTrack))
$status = "<div class=' alert alert-success'>
<textarea rows='15' cols='45' style='resi... | true |
cc7032147dc4a67a2697baa7acc4dcbbaaeb3f8d | PHP | agense/laravelvillarentalapi | /app/Http/Requests/ValidSearchDatesRequest.php | UTF-8 | 655 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ValidSearchDatesRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
... | true |
f1a66f0130f342c28c319909df8cf0aa92ea496e | PHP | vtl3000/ccapi | /src/Cryptocurrency/Repository/CryptoCurrencyRepositoryInterface.php | UTF-8 | 636 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Cryptocurrency\Repository;
use App\Cryptocurrency\DTO\FindCryptoCurrencyPairsDTO;
use App\CryptoCurrency\Entity\CryptocurrencyPairsInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
interface CryptoCurrencyRepositoryInterface
{
/**
* @param CryptocurrencyPairsIn... | true |
7402503a91ac2debd7e54fffaa921861de7c2f6e | PHP | Casrime/blog | /Framework/Routing/Route.php | UTF-8 | 3,672 | 3.046875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Framework\Routing;
class Route
{
public function __construct(
private string $path,
private string $name,
/**
* @var array<string, string>
*/
private array $controller,
/**
* @var array<string>
*/... | true |
776512fac51b59c2f6bdd08d90c01d91f5edc789 | PHP | ondronix/d7_mod_tarrifs | /mod_tarrifs.controller.inc | UTF-8 | 1,219 | 2.578125 | 3 | [] | no_license | <?php
class TarrifsController extends EntityAPIController
{
public function create(array $values = array())
{
$values += array(
'created' => REQUEST_TIME,
'changed' => REQUEST_TIME,
);
return parent::create($values);
}
public function buildContent($ent... | true |
f114893f0a64435a9f448c2692bc836e177545a5 | PHP | Firepeix/go-stop | /app/Repositories/Vision/CameraRepository.php | UTF-8 | 951 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Vision;
use App\Models\AbstractModel;
use App\Models\Vision\Camera;
use App\Repositories\AbstractRepository;
use App\Repositories\Interfaces\Vision\CameraRepositoryInterface;
use Illuminate\Support\Collection;
use JetBrains\PhpStorm\Pure;
class CameraRepository extends AbstractRepos... | true |
1d6b5f98a10315b4fad35e31b74610677a99a52d | PHP | RitamDey/Minor-Project-Undergrad | /authentication/update.php | UTF-8 | 4,056 | 2.625 | 3 | [
"Unlicense"
] | permissive | <?php
$TITLE = "About Us -- Bookstore Inc";
require_once "templates/header.html.php";
require_once "lib/sanitizers_validators.php";
$sess = $_COOKIE["PHPSESSID"];
/**
* Prevent browser from caching this page.
* no-store: Says the browser not to cache the response at all
**/
header... | true |
42cfa953df52d3ce43d5d8eaabd9112f4fad5389 | PHP | 4iz278/cviceni | /12-mvc-seo-url/12-blog-mvc/application/model/ArticlesModel.php | UTF-8 | 3,098 | 3.140625 | 3 | [] | no_license | <?php
namespace Blog\Model;
use Blog\Library\Singleton;
use \PDO;
use Blog\Model\Entities\Article;
/**
* Class ArticlesModel - třída modelu pro práci s články v DB
* @package Blog\Model
*/
class ArticlesModel extends BaseModel{
use Singleton;//importujeme trait, který obsahuje metody pro implementaci singletonu... | true |
b916a426c03ebc26bd3b9f239565f27877a0c5b5 | PHP | acerus/WordPressify | /www/wp-content/plugins/wp-rss-aggregator/includes/Aventura/Wprss/Core/Plugin/FactoryInterface.php | UTF-8 | 290 | 2.59375 | 3 | [
"MIT",
"GPL-3.0-only",
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only"
] | permissive | <?php
namespace Aventura\Wprss\Core\Plugin;
/**
* An interface for something that creates plugins.
*
* @since 4.8.1
*/
interface FactoryInterface
{
/**
* Create a plugin.
*
* @since 4.8.1
* @return PluginInterface
*/
static public function create();
} | true |
7fa1303a566c9e217b8f995f9115a7dd2d030949 | PHP | vaimo/composer-patches | /src/Shell.php | UTF-8 | 1,888 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright © Vaimo Group. All rights reserved.
* See LICENSE_VAIMO.txt for license details.
*/
namespace Vaimo\ComposerPatches;
class Shell
{
/**
* @var \Vaimo\ComposerPatches\Logger
*/
private $logger;
/**
* @var \Composer\Util\ProcessExecutor[]
*/
private $processEx... | true |
f068f17688eb0b735a88c654e59e095ce450ce38 | PHP | marciodojr/tibia-creatures-ks | /tests/World/WorldArrayTest.php | UTF-8 | 3,104 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Mdojr\Scraper\World;
use PHPUnit\Framework\TestCase;
use Mdojr\Scraper\World\World;
use Mdojr\Scraper\World\WorldArray;
use Mdojr\Scraper\Exception\InvalidWorldException;
class WorldArrayTest extends TestCase
{
public function testCanCreateInstance()
{
$this->assertInstanceOf(WorldArr... | true |
be754981073e76711798073132b2fccfb2fa64b7 | PHP | zribimohamedfiras/gestion-de-stock-et-des-intervenions-avec-syst-me-de-reporting-et-d-historique | /src/AppBundle/Entity/GlpiConfigs.php | UTF-8 | 2,002 | 2.515625 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* GlpiConfigs
*
* @ORM\Table(name="glpi_configs", uniqueConstraints={@ORM\UniqueConstraint(name="unicity", columns={"context", "name"})})
* @ORM\Entity
*/
class GlpiConfigs
{
/**
* @var string
*
* @ORM\Column(name="context... | true |
45c5b29dd5ba50a7d8e5285aeaf4e3e34693c119 | PHP | favourch/BMS | /application/models/Lib/Catelog/Service/ParentSetting.php | UTF-8 | 3,798 | 2.6875 | 3 | [] | no_license | <?php
/**
* @namespace : Base
* @package : Model
* @subpackage : Lib.Catelog.Service
* @name : ParentSetting
* @author : Iyngaran Iyathurai
* Software eng - Bcas R&D
* E-Mail - Iyngaran55@yahoo.com, Iyngaran@bcas.lk
*
* @copyright Copyright (c) 2009 - 2010 BCAS R&D .... | true |
798b1629cf92159c83867f451c56da3237c53199 | PHP | camillesk/hyperion | /cadastroSimu.php | UTF-8 | 4,085 | 2.5625 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "usbw";
$database = "hyperion";
$conn = new mysqli($servername, $username, $password, $database);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
//select's para mostrar nos selects os dados que exist... | true |
ffc4a5d009c8c3788f2b5a8d6cdfeb458c5cd822 | PHP | keeko/framework | /src/service/PuliService.php | UTF-8 | 1,623 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace keeko\framework\service;
use Puli\Repository\Api\ResourceRepository;
use Puli\Discovery\Api\Discovery;
use Puli\UrlGenerator\Api\UrlGenerator;
class PuliService {
/** @var Puli\GeneratedPuliFactory */
private $puliFactory;
/** @var ResourceRepository */
private $resourceRepository;
/** @var Di... | true |
cba2a211aed8ac441a866806ec11d98336075c12 | PHP | scoutman57/jegarn-php | /src/Manager/ChatRoomManager.php | UTF-8 | 1,381 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Jegarn\Manager;
use Jegarn\Cache\Cache;
class ChatRoomManager extends BaseManager{
public static function getInstance($class = __CLASS__){
return parent::getInstance($class);
}
public function addChatRoom($rid){
return true;
}
public function removeChatRoom($rid){
... | true |
d6ca81cdc2ac561341a57e856c5bccb891861e25 | PHP | befacoco/yucca | /lib/Yucca/Component/Source/DataParser/DataParser.php | UTF-8 | 6,037 | 2.6875 | 3 | [] | no_license | <?php
namespace Yucca\Component\Source\DataParser;
use Yucca\Component\EntityManager;
class DataParser
{
/**
* @var Yucca\Component\EntityManager
*/
protected $entityManager;
/**
* @param \Yucca\Component\EntityManager $entityManager
*/
public function setEntityManager(EntityManage... | true |
44bba0a24347c91e606cceb3d5d396b69afdbd6d | PHP | nggiahao/fb-graph-sdk-php | /tests/Http/HttpTest.php | UTF-8 | 1,371 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Nggiahao\Facebook\Tests\Http;
use GuzzleHttp\Exception\GuzzleException;
use Nggiahao\Facebook\Exception\InvalidAccessTokenFacebook;
use Nggiahao\Facebook\Http\FacebookRequest;
use Nggiahao\Facebook\Http\FacebookResponse;
use PHPUnit\Framework\TestCase;
class HttpTest extends TestCase
{
public $use... | true |
fff604785a9ddc12081fbe97be4b6b71b6e41270 | PHP | luisxue/3Sspring | /Application/models/SysRight.php | UTF-8 | 1,491 | 3.046875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class SysRight extends ModelBase
{
/**
*
* @var integer
*/
protected $ID;
/**
*
* @var string
*/
protected $rightinfo;
protected $description;
/**
* Method to set the value of field ID
*
* @param integer $ID
* @ret... | true |
c09c414f8eaeccba338612d6d3320d72326692f0 | PHP | and67o/game | /src/classes/model/GameNumbers.php | UTF-8 | 1,822 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace Router\Models;
use PDOException;
use Router\Db;
/**
* Class GameNumbers
* @package Router\Models
*/
class GameNumbers extends Model
{
/**
* Записывает загаданное число
* @param int $gameId - уникальный идентификатор игры
* @param int $userId - уникальный идентификатор пользователя
* @re... | true |
d2e9d09609757a69d7ff0a4989c3a0fa0dcc4d71 | PHP | olaviolacerda/uniritter | /programacao-para-internet/php_files/public_html/codigos/examples/chapter31/cachefunctions.php | UTF-8 | 2,865 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
// Get an AmazonResultSet either from cache or a live query
// If a live query add it to the cache
function getARS($type, $parameters)
{
$cache = cached($type, $parameters);
if($cache) // if found in cache
{
return $cache;
}
else
{
$ars = new AmazonResultSet;
if($type == 'asin')
$... | true |
68b0fcda489347fbec77fb65d699e828cd45ecba | PHP | schempil/studienarbeit | /database/seeds/PeopleTableSeeder.php | UTF-8 | 489 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class PeopleTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
for($i = 0; $i < 49; $i++) {
DB::table('people')->insert([
'name' => str_random(10),
... | true |
bbc8758541ea984dc22eb8bc475aaa720b35bbe8 | PHP | dottori-it/tropo-webapi-php-oop | /src/Action/Transcription.php | UTF-8 | 2,166 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file contains PHP classes that can be used to interact with the Tropo WebAPI/
*
* @see https://www.tropo.com/docs/webapi/
*
* @copyright 2010 Mark J. Headd (http://www.voiceingov.org)
* @package TropoPHP
* @author Mark Headd
* @author Adam Kalsey
*/
namespace Tropo\Action;
/**
... | true |
a91de0dd31a7ac3a944465b4ddc58b867f7650b8 | PHP | Septikwar/RentBook | /src/Repository/BookRepository.php | UTF-8 | 1,218 | 2.625 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Entity\Book;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
/**
* @method Book|null find($id, $lockMode = null, $lockVersion = null)
* @method Book|null findOneBy(array $criteria, array $orderBy = null)
* @method Book[] findAll()
* @method B... | true |
07495d1f8da32367b2ea1c44599c55c889fddb29 | PHP | olgamelnikoff/web_career_portal | /list_of_applications_employee.php | UTF-8 | 2,353 | 2.53125 | 3 | [] | no_license | <?php
ob_start();
session_start();
require_once 'config.php';
require_once 'util.php';
$connection = connect_to_db($db_hostname, $db_username, $db_password, $db_database);
$user_id = $_SESSION['user_id'];
//echo $_SESSION['user_id'];
$query1 =
"SELECT job_id, employee_id, application_status, appl... | true |
e0c7b8ea308fc613c85494b6084edcbd8c52fbbd | PHP | EngbergJonas/PHP-P1 | /visitorcounter.php | UTF-8 | 264 | 2.640625 | 3 | [] | no_license | <?php
$ip = $_SERVER["REMOTE_ADDR"];
$user = $_SERVER["REMOTE_USER"];
$time = date("H:i - j.n.Y");
$txt = "user: {$user} | ip: {$ip} | date: {$time} \n";
$myfile = fopen("visitor.log", "a+") or die("Could not open file");
fwrite($myfile, $txt);
fclose($myfile);
| true |
39108b6e270383b3934d5d619603546687796066 | PHP | mediabridgeru/kidrulit | /catalog/model/payment/yoomoney/CBRAgent.php | UTF-8 | 1,532 | 2.953125 | 3 | [] | no_license | <?php
/**
* @author ElisDN <mail@elisdn.ru>
* @link https://elisdn.ru
* @author YooMoney <cms@yoomoney.ru>
* @link https://yoomoney.ru
*/
class CBRAgent
{
protected $list = array();
/**
* CBRAgent constructor.
* @param string|null $date
*/
public function __construct($date=null)
{
... | true |
56eea9a6aec70312b1bf77a04db3b3ed4e22dcc3 | PHP | MarijnKoesen/php-code-generator | /src/codegenerator/model/ClassMember.php | UTF-8 | 2,160 | 3.625 | 4 | [
"MIT"
] | permissive | <?php
namespace codegenerator\model;
/**
* A class representing a class member, like 'private User $user'
*/
class ClassMember
{
const MEMBER_TYPE_PROPERTY = 'property';
const MEMBER_TYPE_FUNCTION = 'function';
const MEMBER_TYPE_GETTER = 'setter';
const MEMBER_TYPE_SETTER = 'getter';
/**
* ... | true |
6e7785e64207a4f55665d2f11395d75291cb63e8 | PHP | FaiyazShahrear/learning-web-technologies-spring-2020-2021-sec-h | /MID_LAB_TASK_PHP_05/TASK_4/TASK_B/gender.php | UTF-8 | 780 | 3.109375 | 3 | [] | no_license | <?php
if(isset($_REQUEST['submit'])){
if (isset($_POST['gender'])){echo "Gender: ".$_POST['gender'];}
else{echo "nothing was selected.";}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML Form - Gender</title>
</head>
<body>
<form method="post" action="gender.php">
... | true |
dc0375d73d85e0338e1578d4a1e94786a2023769 | PHP | saurendra/theSeller | /sms_fly_status.php | UTF-8 | 1,642 | 2.578125 | 3 | [] | no_license | <?php
require 'config.php';
libxml_use_internal_errors(true);
$body = '';
$fh = @fopen('php://input', 'r');
if ($fh)
{
while (!feof($fh))
{
$s = fread($fh, 1024);
if (is_string($s))
{
$body .= $s;
}
}
fclose($fh);
}
try {
$query = "INSERT INTO debug (msg) VALUES (:msg)";
... | true |
7487255d4dc1968c61ff3d221f29cf672b55f4b6 | PHP | danubise/reportsalt | /core/test.php | UTF-8 | 1,285 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: slava
* Date: 25.06.15
* Time: 16:30
*/
//echo microtime(true) - 2592000;
$a=microtime(true);
echo $a."\n";
$b= $a-2592000;
echo $b."\n";
//$cd=date('Y-m-d H:i:s');
//$future = strtotime('+1 month', $cd);
die;
$link = mysql_connect('loca... | true |
924e0cbf9297448be8a1868d274f7fdc1ee9f4de | PHP | finixbase123/BedrockMoney | /BedrockMoney/src/System/command/SetMoneyCommand.php | UTF-8 | 1,701 | 2.859375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace System\command;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\command\ConsoleCommandSender;
use System\SystemMain;
use System\money\SystemMoney;
class SetMoneyCommand extends Command
{
private const TEXT = "[ BedrockMoney ] : ";
public fun... | true |