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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f03c6c28a134dff72d8d45a8e3f083e9aaa84623 | PHP | HappyZ/time-tracking | /lib/class/pluginable.php | UTF-8 | 2,222 | 2.78125 | 3 | [] | no_license | <?php
/**
* Tzn Framework
*
* @package tzn_core_classes
* @author Stan Ozier <framework@tirzen.com>
* @version 0.1
* @since 0.1
* @copyright GNU Lesser General Public License (LGPL) version 3
*/
/**
* Pluginable
*
* Abstract class implementing all plugin related methods
* All extendable / customizable cl... | true |
b52457aa6aa725dfb1c6f7848bfbb41f598a29dc | PHP | tombeale/tombeale.com | /inc/dbfunctions.php | UTF-8 | 9,990 | 2.8125 | 3 | [] | no_license | <?
# --------------------------------- Connect to MySQL
function connect() {
global $l, $hostname, $username, $password;
$l = mysql_connect($hostname, $username, $password);
}
# --------------------------------- Submit SQL Statement to MySQL and trap errors
function SQL($sql) {
connect();
global $l, $err... | true |
cbda9c132ed74d9d091fb5041fde2e69e9dad2fd | PHP | Sergeilipiev/PHP | /HomeWork/3/6.php | UTF-8 | 319 | 2.703125 | 3 | [] | no_license | <?php
//В переменной $date лежит дата в формате '30-11-2017'.
// Преобразуйте эту дату в формат '2017.11.30'.
$date = strtotime('30-11-2017');
$date = date("Y.m.d", $date);
echo $date;
/**
* Created by PhpStorm.
* User: Hall
* Date: 04.05.2018
* Time: 20:24
*/ | true |
e1fbc485c2cf63d6bae9a5ebc1e78ff17f09edf7 | PHP | zhaoyang1214/phalconcms | /common/Validate.php | UTF-8 | 17,400 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @desc 验证器
* @author ZhaoYang
* @date 2018年5月11日 下午4:16:50
*/
namespace Common;
use Phalcon\Validation;
use Phalcon\Validation\Exception;
class Validate extends Validation {
// 自定义的验证类型
protected static $types = [
// Check for alphanumeric character(s)
'aln... | true |
15ee7dc343f0c7f4f468c3eb2963c42e3843d870 | PHP | LycheeOrg/Lychee | /app/Exceptions/FlySystemLycheeException.php | UTF-8 | 460 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Exceptions;
use League\Flysystem\FilesystemException;
use Symfony\Component\HttpFoundation\Response;
/**
* FlySystemLycheeException.
*
* Returns status code 500 to an HTTP client.
*/
class FlySystemLycheeException extends BaseLycheeException implements FilesystemException
{
public function _... | true |
e87cb0257e21e65406294d532d414c3e984e681d | PHP | hbeyer/T-PRO | /class_skosCollection.php | UTF-8 | 1,460 | 3.046875 | 3 | [] | no_license | <?php
class skosCollection {
public $url;
public $ancor;
public $labelsDe = array();
public $labelsEn = array();
public $labelsFr = array();
public $definition;
function __construct($resource) {
$this->url = $resource->getUri();
$this->ancor = substr($resource->shorten(), 5);
$literalsDe = $resource... | true |
cc40a94edd19ae0e313b086c5c1cb453aad28acc | PHP | lancebrown42/webdev1 | /HTML/BrownL/contents/final/process_corporate.php | UTF-8 | 1,914 | 2.625 | 3 | [] | no_license | <html>
<head>
<title>Corporate Processing</title>
<link rel="stylesheet" type="text/css" href="../../../../css/bulma/css/bulma.css">
</head>
<body>
<?php require "adminnavbar.php"; ?>
<br>
<?php
//Connect to MySQL
require "server.php";
//Create connection
$conn = mysqli_connect($servername, $username, ... | true |
e3c3ecb710ef0189a86fa1cffb8e117f1db0dab2 | PHP | considine157/INFO638 | /Code Review for PHP Webpage/viewanime.php | UTF-8 | 1,467 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
#Includes for my page.
include_once 'header.php';
require_once 'login.php';
#Connect to database with login credentials.
$connection = new mysqli($hn, $un, $pw, $db);
if ($connection->connect_error) die($connection->connect_error);
#Search the anime table for anime titles and also using '%' to find letters/ch... | true |
b6e50441081b03cec9e54bbd1ce400d6b855b6d1 | PHP | saket404/OnlineBanking | /online Banking/source code/user-externaladd.php | UTF-8 | 3,002 | 2.53125 | 3 | [] | no_license | <?php session_start();?>
<html>
<title>Add a new Payee from External Bank</title>
<?php include 'dbconnect.php';
include "usersidebar.php";
?>
<div class="col-sm-12">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a href="#menu-tog... | true |
e33da7ab75e0441271b5c2011fd4b95e817d287d | PHP | sgupta7be16/catalog | /php/updatePrice_v1.php | UTF-8 | 2,690 | 2.65625 | 3 | [] | no_license |
<?php
define('HOST','localhost');
define('USERNAME', 'root');
define('PASSWORD','$1stylD0d');
define('DB','catalog');
$con = mysqli_connect(HOST,USERNAME,PASSWORD,DB);
//---------------- Input variables (start) --------------------//
$productId = $_POST['productId'];
$category = $_POST['cate... | true |
5cb64f937efac309c844b0cfa0b182c986a780d4 | PHP | yusufyilmazfr/mumuso.com.tr-clone | /app/controller/card.php | UTF-8 | 2,630 | 2.71875 | 3 | [] | no_license | <?php
if(!isset($_SESSION['Card'])){
$_SESSION['Card'] = [];
}
if(isset($_url[1]) && $_url[1] == "add"){
$product_id = post('productId');
$product_count = post('productCount');
$data = [];
if(!product_exists_in_card($product_id)){
$_SESSION['Card'][$product_id] = $product_count;
... | true |
50f09d4f5e4e0c5bf9ccf1b6c317f7cd6f9f1b8f | PHP | apoorv-247/product_options | /app/Core/Service/InsideSales/ApiConsumer.php | UTF-8 | 7,863 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Utility class for consuming InsideSalesAPI.
* See https://expresscopy2.insidesales.com/noauth/services/documentation
*
* User: justin
* Date: 10/11/16
* Time: 11:56 AM
*/
namespace App\Core\Service\InsideSales;
use App\Core\Models\OrderCore\Log;
class ApiConsumer
{
protected $_username;
... | true |
b17e3c8173838551c2379e62fb616a0c36a5db7a | PHP | dezer32/dto | /src/Reflections/Field/Field.php | UTF-8 | 3,992 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Dezer32\Libraries\Dto\Reflections\Field;
use Dezer32\Libraries\Dto\Attributes\Cast;
use Dezer32\Libraries\Dto\Attributes\MapFrom;
use Dezer32\Libraries\Dto\Casters\ArrayCaster;
use Dezer32\Libraries\Dto\Contracts\CasterInterface;
use Dezer32\Libraries\Dto\Contracts\DataTransf... | true |
fd7270cb6ecd3e8048716d91824afd2dae38b4c6 | PHP | pedjaos/phpdev2019 | /mdrnasin/5.5.for.php | UTF-8 | 104 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
for($i=1; $i<=10; $i++){
echo "Vrijednost varijable i=".$i;
echo "<br>";
}
echo "<hr>";
| true |
1225e5d873278d5500752cf17a23ea8a137b6f87 | PHP | giappv/PHP-Kata | /src/Patterns/Creational/Singleton.php | UTF-8 | 287 | 3.078125 | 3 | [] | no_license | <?php
namespace Patterns\Creational;
class Singleton{
protected static $_instance;
private function __construct(){
}
public static function getInstance(){
if(self::$_instance === null) self::$_instance = new self();
return self::$_instance;
}
} | true |
2f6917aa5535f2c37a29663d82250bcc97861a15 | PHP | samuelkaranja/Library-system | /signup.php | UTF-8 | 5,218 | 2.59375 | 3 | [] | no_license | <?php
include "connect.php";
include "navbar.php";
?>
<!DOCTYPE html>
<html>
<head>
<title>SIGN UP</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="sign">
<form method="post" action="" onsubmit="return onClick()">
<p class="head3">SIGN UP</p>
<input class="input" ... | true |
8d9fbd892e625c3bf4919e266e6881a22a31c206 | PHP | asilmb/bsu2 | /common/validators/helpers/IinParser.php | UTF-8 | 914 | 3.046875 | 3 | [] | no_license | <?php
namespace common\validators\helpers;
use Exception;
class IinParser {
public static function parse($value) {
$part['date'] = IinDateHelper::parseDate($value);
$part['number'] = substr($value, 7, 4);
$part['sex'] = self::getSex($value);
self::validateSum($value);
return $part;
}
private static ... | true |
3203bd8a570956f4b9c76601eb44a999e8adec2d | PHP | Kambaulaya1234/mbinga | /app/Http/Livewire/Departments/Departments.php | UTF-8 | 3,444 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Livewire\Departments;
use Livewire\Component;
use App\Models\Department;
class Departments extends Component
{
public $departments, $department_id, $name;
// public $updateMode = false;
public $isModal = 0;
/**
* The attributes that are mass assignable.
*
... | true |
17420f72ded48290da1690291f91ba0b18c49206 | PHP | VictorAlagwu/unn-api | /app/Http/Controllers/ApiController.php | UTF-8 | 1,389 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Services\Cachemaster;
use App\Services\UnnPortalScraper;
use Illuminate\Http\Request;
class ApiController extends Controller
{
/**
* Create a new controller instance.
*
*/
public function __construct()
{
//
}
public function ge... | true |
cecd08bc78b2ae410e452a378520c22e6c3de43c | PHP | ondraczsk/BedWars-1 | /src/BedWars/Task/ShowItemsOne.php | UTF-8 | 2,930 | 2.78125 | 3 | [] | no_license | <?php
namespace BedWars\Task;
use BedWars\BedWars;
use pocketmine\inventory\PlayerInventory;
use pocketmine\item\Item;
use pocketmine\Player;
use pocketmine\scheduler\AsyncTask;
use pocketmine\Server;
class ShowItemsOne extends AsyncTask{
public $items;
public $name;
public function __construct(BedWars... | true |
7ad4bc48ab89ca6e9b07c29261e797d7e52c62e2 | PHP | DaemoncheG/infuso | /eshop/theme/order/info.php | UTF-8 | 1,390 | 2.5625 | 3 | [] | no_license | <?
// Сообщение о статусе заказа
echo "<div style='background:#ffeebb;padding:10px;border:1px solid #df775d;' >";
echo $p1->message();
echo "</div>";
echo "<br/><br/>";
// Заголовок таблицы
echo "<table class='mb5nics729' >";
echo "<thead><tr>";
echo "<td></td>";
echo "<td>Название</td>";
echo "<td>Количество</t... | true |
443d6089dd289045e4664dfe922d8627da3b5f87 | PHP | ddmler/phpsa | /src/Command/DumpDocumentationCommand.php | UTF-8 | 1,249 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace PHPSA\Command;
use PHPSA\Analyzer;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Command to dump the analyzer documentation as markdown
*/
class DumpDocumentationCommand extends Abstract... | true |
138e9b2b91e80fabcc2d3734c024dca4edcb724d | PHP | azibom/DevolonShoppingCart | /src/Input/CliInput.php | UTF-8 | 742 | 3.015625 | 3 | [] | no_license | <?php
namespace Devolon\ShoppingCart\Input;
use Devolon\ShoppingCart\Contracts\InputInterface;
class CliInput implements InputInterface
{
private $productsData = [];
private $order;
/**
* getProducts function
*
* @return array
*/
public function getProducts() {
$count = (... | true |
0eb97128d32645567918ac6c7e9c51a88be97eeb | PHP | Franvillada/NovedadesTangoSueldos | /app/Http/Controllers/AppController.php | UTF-8 | 5,853 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Client;
use App\NoveltyRegister;
use App\Employee;
use Carbon\Carbon;
use Carbon\CarbonPeriod;
class AppController extends Controller
{
public function elegirClienteForm(){
$clients = Client::all()->reject(function ($value,$key){
... | true |
c0ed9b1cd2377da780ffbf80b2642cceca45739e | PHP | baptistebisson/Modern-Watch-List-API | /app/Actor.php | UTF-8 | 5,689 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Helpers\Image;
use App\Helpers\Utils;
use Illuminate\Database\Eloquent\Model;
use DB;
use App\Helpers\Curl;
use Illuminate\Support\Facades\Log;
use App\Helpers\Response;
class Actor extends Model
{
protected $fillable = ['imdb_id','api_id','name','biography','place_of_birth',
'p... | true |
81b820b3460144c989209d37a78fd9bce1e43d5e | PHP | ben221199/exceptions | /src/ExceptionParser.php | UTF-8 | 6,154 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2021 Cloud Creativity Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | true |
adfe3b96b755e5ea973bf070b772250ebc699221 | PHP | JosephAramburo/vendimia | /api/src/config/autorizacion.php | UTF-8 | 646 | 2.5625 | 3 | [] | no_license | <?php
require __DIR__ . '/../library/JWT/JWT.php';
class autorizacion{
public function token($request){
$meta = new stdClass();
$meta->status = 500;
$meta->mensaje = 'Token no encontrado';
if(isset($request->getHeader('authorization')[0])){
$token = $request->getHeader('authorization')[0];
$token = e... | true |
3538b9bb726ef5305479506a24ad840010df0eb3 | PHP | FelipeLaras/Inventario | /inc/inventario_email.php | UTF-8 | 5,601 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
//iniciando uma sessão
session_start();
//chamando o banco de dados
require_once('../conexao/conexao.php');
/*-----------------------------------------------------------------------------*/
//Variaveis com as tratativas das datas
$data_hoje = date('Y-m-d');
$data_5 = date('Y-m-d', strtotime("-5 days", strtotime... | true |
6609cdbc3700f84ea13e713bdad42e0634064175 | PHP | hyyan/jaguar | /src/Jaguar/Drawable/Line.php | UTF-8 | 3,995 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Jaguar package.
*
* (c) Hyyan Abo Fakher <tiribthea4hyyan@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Jaguar\Drawable;
use Jaguar\Coordinate;
use Jaguar\CanvasInterfac... | true |
3ae742caf903c6347d74e51fed5196ee449df0c3 | PHP | YacineMesbat/Projet-de-Cryptographie | /src/secretKey.php | UTF-8 | 2,038 | 3.109375 | 3 | [] | no_license | <?php
/**
* @Author: Yacine
* @Date: 2017-07-27 09:47:32
* @Last Modified by: Yacine
* @Last Modified time: 2017-07-27 14:46:41
*/
function getSet($err = "") {
global $g_total;
global $g_set;
global $g_e;
global $g_m;
if (!empty($err))
echo $err . "\n";
$command = readline("Saisissez une suite super... | true |
0ac9b8a62523430c499efa5694e455ca65077a2d | PHP | veno77/raisepon-2.0 | /API/delete_customer.php | UTF-8 | 2,681 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
// re... | true |
f1e3025b1031b4af41f708e1fb3b25363e87d912 | PHP | cavemanlu/yiiru | /zii/widgets/jui/CJuiSliderInput.php | UTF-8 | 5,687 | 2.734375 | 3 | [] | no_license | <?php
/**
* Файл класса CJuiSliderInput.
*
* @author Sebastian Thierer <sebathi@gmail.com>
* @link http://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
Yii::import('zii.widgets.jui.CJuiInputWidget');
/**
* Виджет CJuiSliderInput отображает сла... | true |
10efbcb1dee0c9e69e28e52c645fdb5e08d51e3e | PHP | digitaluniverse/sodoku | /web/myfile.php | UTF-8 | 1,045 | 3.40625 | 3 | [] | no_license | <html>
<head>
<title>Write to a text file</title>
</head>
<body>
<FORM METHOD="POST" ACTION="myfile.php">
<TABLE BORDER="1">
<TR>
<TD>
<INPUT TYPE="TEXT" NAME="one[]" SIZE="20">
</TD>
</TR>
<TR>
<TD><INPUT TYPE="TEXT" N... | true |
f14de50d4f36d487d1ca17ef17a8904cc3dd8a39 | PHP | houtsnip/bruno_test | /project/library/Date.php | UTF-8 | 403 | 3.09375 | 3 | [] | no_license | <?php
class Date
{
public function now() { return new self(time()); }
private $_date;
public function __construct($date)
{
$this->_date = new DateTime(is_int($date) ? "@$date" : $date);
}
public function getFormatted() { return date('M d, Y H.i', $this->_date->getTimestamp()); }
p... | true |
e0d726fd03d1a655fbfc70a0b844ac11e175e3d3 | PHP | iperatoner/peciocms-plugins | /sources/contactform/classes/contactform.class.php | UTF-8 | 4,454 | 2.8125 | 3 | [] | no_license | <?php
class Contactform {
private $database, $contactform_id, $contactform_email;
static $by_array = array(
'id' => 'contactform_id',
'email' => 'contactform_email'
);
function __construct($id=0, $email) {
global $pec_database;
$this->database = $pec_d... | true |
0c16f5d58cecfb6c392877da0ceb7582b3580cc9 | PHP | snellingio/sequence | /tests/SequenceTest.php | UTF-8 | 977 | 2.515625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
class SequenceTest extends PHPUnit\Framework\TestCase
{
public function testNullReturnPayload()
{
// Setup Payload
$payload = new Snelling\Sequence\Payload();
$payload->number = 1;
$pipeline = (new Snelling\Sequence\Sequence)
->then(function ($payload... | true |
4e308a645b5bcbb0e5ee6bd1378db368dbd1488d | PHP | zamaseko/camagru | /head.php | UTF-8 | 1,207 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$use = $_SESSION['vkey'];
include 'config/database.php';
if ($use)
{
$dsn = "mysql:host=$server;dbname=$db";
$connect = new PDO($dsn, $user, $password);
$stmt = $connect->prepare("SELECT * FROM users WHERE vkey = :vkey");
$stmt->bindParam(':vkey', $use);
$stmt->execute(['vkey' => $use]);
$... | true |
8a493a4e500b1aa1ffe5c8af645907672b1d3afd | PHP | maoyue001/ThinkPHP6-Shopping | /tp/app/api/controller/ApiBase.php | UTF-8 | 805 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\api\controller;
use app\BaseController;
use think\exception\HttpResponseException;
/**
* ApiBase相当于 API 模块下公共控制器
*
* Class ApiBase
* @package app\api\controller
*/
class ApiBase extends BaseController
{
/**
* tp6中的构造方法,类似于 __construct 构造方法,区别在于此方法可以自动调用父类 initialize 方法
*/
p... | true |
1b859a0870a49abe3d47aa13890216834c8a889f | PHP | brentwilliams2/ca-job-board-joomla | /components/com_cajobboard/admin/Helper/Enum/ImageObjectSizeEnum.php | UTF-8 | 2,026 | 2.53125 | 3 | [] | no_license | <?php
/**
* Admin Image Objects Sizes Enumeration
*
* @package Calligraphic Job Board
* @version 0.1 May 1, 2018
* @author Calligraphic, LLC http://www.calligraphic.design
* @copyright Copyright (C) 2018 Calligraphic, LLC
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*
*/
namespa... | true |
986a8d0976837e0fc991d8437d947db8636e1c64 | PHP | sbarale/nova-modules | /src/Commands/MakeModuleCommand.php | UTF-8 | 5,022 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Cmdev\NovaModules\Commands;
use Cmdev\NovaModules\Helpers\ModuleGeneratorCommand;
use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
class MakeModuleCommand extends ModuleGeneratorCommand
{
/**
* Module StudlyName... | true |
146fb7fc9bf84e6d619fe51a8da41611fed792be | PHP | Indomian/KS-CMS-Statistics | /libs/class.CStatisticsPathes.php | UTF-8 | 1,454 | 2.65625 | 3 | [] | no_license | <?php
/**
* \file class.CStatisticsPathes.php
* Контейнер для класса CStatisticsPathes
* Файл проекта kolos-cms.
*
* Создан 26.08.2009
*
* \author blade39 <blade39@kolosstudio.ru>
* \version 1.0
* \todo
*/
/*Обязательно вставляем во все файлы для защиты от взлома*/
if( !defined('KS_ENGINE') ) {die("Hacking ... | true |
44d3e25982b338e81dd49e9e263314f7ac2ec55b | PHP | tomksg/Web_2017 | /php/php_session/session2.php | UTF-8 | 764 | 2.734375 | 3 | [] | no_license | <?php
ob_start();
echo "출력문을 먼저 사용하기 때문에 위에 ob_start() 를 작성 <br />";
//session start
session_start();
$id=session_id();
//isset으로 있는지 확인할수있다.
echo " 현재 내 접속id는 = $id <br />";
echo " 현재 내 이름은 = " . $_SESSION['id']."<br />";
echo " 현재 내 비밀번호는 =". $_SESSION['pw']."<br />";
echo "세션에 등록된 내용은 " . $_SES... | true |
ad463ed7a0f0f5fca0bc678f21d09b32fab73adc | PHP | Lmsgcc/micro_framework | /controllers/Products.php | UTF-8 | 699 | 2.65625 | 3 | [] | no_license | <?php
namespace Controllers;
use Model\ProductsModel;
class Products extends Controller
{
public function __construct()
{
parent::__construct();
$this->_model = new ProductsModel();
}
public function view_all()
{
$this->_data["products"] = $this->_model->ReadAll();
... | true |
f92fe5d32619aefb668a1acb8e555ac8329314d7 | PHP | aandre100/php_oo | /pooV3/public/Funcionario.php | UTF-8 | 333 | 3.421875 | 3 | [] | no_license | <?php
/**
*
*/
class Funcionario
{
public string $nome;
public float $salario;
public function verSalario(): string{
return "O Funcionário {$this->nome} aufere o salário de {$this->converterSalario()}€";
}
public function converterSalario(): string{
return number_format($this->salario, '2', ',', '.');
}
... | true |
550c47a37fc4c3672480cc09cbd9208ab0317742 | PHP | omnius45467/Skynet_for_users | /app/Skynet/Repositories/EloquentTrackerRepository.php | UTF-8 | 832 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Skynet\Repositories;
use App\Skynet\Repositories\Contracts\TrackerRepository;
use App\User;
use App\Tracker;
//use Illuminate\Support\Facades\Hash;
//use Illuminate\Support\Facades\Config;
//use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Collection;
class EloquentTrackerRepository imp... | true |
5402e49a7ffb23be2ffc182198bf01fdc6bfa80c | PHP | wilber-mndz/framework-mvc | /app/helpers/validation_helper.php | UTF-8 | 8,858 | 3.4375 | 3 | [] | no_license | <?php
// Cargamos la librería respect/validation
use Respect\Validation\Validator as v;
use Respect\Validation\Rules;
use Respect\Validation\Exceptions\NestedValidationException;
/*
|--------------------------------------------------------------------------
| Valida un campo estándar verificando que cumpla con las r... | true |
b2431aeff62c049ade547c9576479eda10ad5486 | PHP | sebasttti/MVC-PHP | /app/libs/Controller.php | UTF-8 | 578 | 3 | 3 | [] | no_license | <?php
//se encarga de poder cargar los modelos y las vistas
class Controller{
//cargar controlador
public function model($model){
require_once '../app/models/'.$model.'.php';
//instanciar el modelo
return new $model;
}
//cargar vista
public function view($view,$data=[]){
/... | true |
38bfa5d63b75c58e681c4a50826bcd8a31b4e825 | PHP | ale88andr/hydrogen | /app/lib/core/Config.php | UTF-8 | 934 | 2.734375 | 3 | [] | no_license | <?php
namespace core;
class Config
{
protected static $config = [];
private static function init()
{
$db_cnf = ROOT . DS . 'config' . DS . 'database.yaml';
if (file_exists($db_cnf)) {
$config = yaml_parse_file($db_cnf);
if (!DEVELOPMENT_ENV) {
self... | true |
6a5e55407d129ac9b96b85c25dc1c450caa6eb2d | PHP | jenky/blog | /app/Actions/Executable.php | UTF-8 | 267 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Actions;
trait Executable
{
/**
* Run the action.
*
* @param mixed ...$arguments
* @return mixed
*/
public static function execute(...$arguments)
{
return (new static(...$arguments))->run();
}
}
| true |
f69fa3a60b1ced0dfa50ef98fa4a03c68e894eb6 | PHP | phanvietanh235/dongthap_quantrac | /services/basin.php | UTF-8 | 1,534 | 2.515625 | 3 | [] | no_license | <?php
include "config.php";
?>
<?php
header('Content-Type: application/json');
/*** Kiểm tra biến searchTerm có tồn tại hay không ***/
if (!isset($_GET['searchTerm'])) {
$querry_option_basin = 'SELECT * FROM "Basin" ORDER BY name ASC';
$result = pg_query($tiengiang_db, $querry_option_basin);
if (!$result) {... | true |
6fa99a1a76a8faab1764ebec7508b95155d94d85 | PHP | windwork/wf-image | /lib/ImageInterface.php | UTF-8 | 2,259 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Windwork
*
* 一个用于快速开发高并发Web应用的轻量级PHP框架
*
* @copyright Copyright (c) 2008-2017 Windwork Team. (http://www.windwork.org)
* @license http://opensource.org/licenses/MIT
*/
namespace wf\image;
/**
* 图像处理接口
*
* @package wf.image
* @author cm <cmpan@qq.com>
* @link http://docs.wind... | true |
3baaff87641d6bb4249ece8286e90d872acdee67 | PHP | linnaas/Semester1 | /PRG1000/eksempler/tema3/8.php | UTF-8 | 1,230 | 3.25 | 3 | [] | no_license | <html>
<head>
<title>Oppgave 8</title>
</head>
<body>
<form action="" method="post">
Tall1:<input type="text" name="tall1"><br>
Tall2:<input type="text" name="tall2"><br>
Tall3:<input type="text" name="tall3"><br>
Tall4:<input type="text" name="tall4"><br>
Tall5:<input type="text" name="tall5"><br... | true |
b14f5aace8daca80df92a03130df7dd64d89b2c5 | PHP | rainrain/adminFramework | /library/RedisLibrary.class.php | UTF-8 | 1,317 | 3 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: rain
* Date: 15/11/2
* Time: 下午5:56
*
* 参考地址:http://www.cnblogs.com/ikodota/archive/2012/03/05/php_redis_cn.html#key_keys
*
*/
class RedisLibrary{
private $_conn;
public function __construct($host,$port,$timeout=0){
$this->_conn = new Redis($host,$port);
}
publi... | true |
d782ab7ac6405b23382f49ff0ad2254ea3970613 | PHP | JatinGupta40/php-blog | /accounts/view.php | UTF-8 | 4,487 | 2.515625 | 3 | [] | no_license | <?php
if (!isset($_SESSION)) {
session_start();
}
if (empty($_GET['user'])) {
header('Location: /index.php');
}
require_once($_SERVER['DOCUMENT_ROOT'] . "/components/config.php");
$u = $_GET['user'];
$sql = "SELECT * FROM users WHERE username='$u'";
$result = $conn->query($sql);
if ($result->num_rows <= 0) {... | true |
d7d35fdadc0439e22fd4bba50cf0c97ad21269af | PHP | Gregory-Bellegarde/magento2.x-module-atos-sips | /Model/Source/Cctype.php | UTF-8 | 2,938 | 2.546875 | 3 | [] | no_license | <?php
/**
* Copyright © 2017 Kev WIS All rights reserved.
*
*/
namespace Kevwis\Atos\Model\Source;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\Option\ArrayInterface;
use Magento\Framework\View\Asset\Repository;
use Magento\Payment\Model\Co... | true |
6dddcb971c447851596fba0a56dfa3b39d9108f8 | PHP | anhth1990/yupax | /yupax_git/app/Http/Services/NotiEmailService.php | UTF-8 | 2,403 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Services;
/*
* anhth1990
*/
use App\Http\Forms\NotiEmailForm;
use App\Http\Models\NotiEmailDAO;
use Session;
class NotiEmailService extends BaseService {
private $notiEmailDao;
public function __construct() {
$this->notiEmailDao = new NotiEmailDAO();
}
/*
*... | true |
7cf61d2d80f06712879400a484ff7b19862d05bc | PHP | dataminion/epargne | /class_lib.php | UTF-8 | 8,013 | 2.5625 | 3 | [
"CC0-1.0"
] | permissive | <?php
/**************************************************************************\
* Epagne Planifier *
* Class Library of Doom *
* ver 1.0 *
* 01/29/2008 *
\**************************************************************************/
/*************... | true |
3e64a54d33aa31f444c0e89b7b90ee930fcbb306 | PHP | vaibhav-dhokchaule/phpPrograms | /seta2.php | UTF-8 | 233 | 2.765625 | 3 | [] | no_license | <?php
$str1=$_POST['str1'];
$str2=$_POST['str2'];
$focr=strpos($str1,$str2);
$locr=strpos($str1,$str2);
$cnt=substr_count($str1,$str2);
echo"first occurrence $focr<br>";
echo"last occurrence $locr<br>";
echo" occurrence $cnt<br>"
?>
| true |
1e474e489feeeeb8986f928e552f2ef782470341 | PHP | weiluo8791/wzde | /manage/php/helper.php | UTF-8 | 8,742 | 2.765625 | 3 | [] | no_license | <?php
//REQUIRE
require_once 'setting.php';
require_once 'mysql_pdo.class.php';
// Return user's ename.
function getEname() {
// Define variables.
$remoteUser = (isset($_SERVER['REMOTE_USER']) ? strtolower($_SERVER['REMOTE_USER']) : "");
$httpRemoteUser = (isset($_SERVER['HTTP_REMOTEUSER']) ? strtolower($_... | true |
a8d9c7a8ccc8e0f1d439151b1d04f416bcf7bf73 | PHP | LilaKIM/php-project | /page_accueil.php | UTF-8 | 3,603 | 2.828125 | 3 | [] | no_license | <?php
session_start();
$_SESSION['nom']=$_POST['nom'];
$_SESSION['prenom']=$_POST['prenom'];
$_SESSION['id_utilisateur']=$_POST['id'];
$_SESSION['mdp']=$_POST['mdp'];
?>
<html>
<head>
<title>ACCUEIL</title>
<link rel="shortcut icon" href="images/annotation.png"/>
<style>
... | true |
57cd1a59c582738f30c9b73dbe887ae5d5cf1789 | PHP | WesleiDev/app_exemplo_laravel | /app/Http/Controllers/InteressadoController.php | UTF-8 | 3,849 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Resources\InteressadoResource;
use App\Models\Interessado;
use Illuminate\Http\Request;
class InteressadoController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Resources\... | true |
151e1c9571792f0bb83337558c429fee1136c0bb | PHP | blokks/keycdn | /src/KeyCDN.php | UTF-8 | 1,693 | 2.625 | 3 | [] | no_license | <?php
namespace Blokks\Services;
use Blokks\Services\Traits\ZonesTrait;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
class KeyCDN
{
use ZonesTrait;
private $apiKey;
private $url;
public function __construct($apiKey, $url)
{
$this->apiKey = $apiKey;
$this->ur... | true |
f9a5a424c035fac13bf344ea242a8f2b11a7de77 | PHP | JenniferTestu/ADLM | /src/Entity/Article.php | UTF-8 | 4,659 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ArticleRepository")
*/
class Article
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column... | true |
8f8b1f325b06ea511bd02d901acf45b80cef4984 | PHP | rdmtr/symfony-telegram-console | /Services/Api/Client.php | UTF-8 | 2,322 | 2.84375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Rdmtr\TelegramConsole\Services\Api;
use Psr\Http\Client\ClientExceptionInterface;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Rdmtr\TelegramConsole\... | true |
6ad86e6cf7d00b29019775121ed2db28ec7cc206 | PHP | zjjzjw/web_fangquan | /fangquan/app-mobi/app/Service/Provider/ProviderProductFavoriteMobiService.php | UTF-8 | 2,277 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Mobi\Service\Provider;
use App\Src\Provider\Domain\Model\ProviderProductFavoriteEntity;
use App\Src\Provider\Infra\Repository\ProviderProductFavoriteRepository;
use App\Src\Provider\Infra\Repository\ProviderProductRepository;
use App\Src\Surport\Domain\Model\ResourceEntity;
use App\Src\Surport\In... | true |
b95bf98e745c33c4f76efeb247a48550abca95c6 | PHP | luwake/EmitPHP | /examples/timeout.php | UTF-8 | 438 | 3.03125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
// Timeout that works similar to setTimeout in JavaScript
require __DIR__ . '/../vendor/autoload.php';
use Emit\Timeout;
// setTimeout
Timeout::set(function(){
echo "Display this after 1 second\n";
}, 1000);
$i = 0;
// setInterval
Timeout::interval(function() use (&$i){
if($i > 10)
// Out o... | true |
f272f3b57dd5c9070213b8e177d13c7df40c8787 | PHP | SOLOPlugins-PocketMine/SColor | /src/solo/scolor/style/Reset.php | UTF-8 | 271 | 2.53125 | 3 | [] | no_license | <?php
namespace solo\scolor\style;
class Reset implements Style{
public function getCode(){
return "r";
}
public function getName(){
return "원래대로";
}
public function getPermission(){
return "scolor.color.reset";
}
}
| true |
3964ef3daa09ae7c99994213012c6ae2339acfc6 | PHP | RezzaACM/apilaravel | /app/Publisher.php | UTF-8 | 499 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Publisher extends Model
{
//
protected $table = 'publishers';
public function _getPublisher()
{
$sql = DB::select('SELECT * FROM publishers');
return $sql;
}
public function... | true |
516f257b2ee69dc0afa8d702e734fffb19859003 | PHP | Micky-N/mkycore | /core/Console/ApplicationCommands/Show/Module.php | UTF-8 | 2,075 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace MkyCore\Console\ApplicationCommands\Show;
use MkyCommand\AbstractCommand;
use MkyCommand\Exceptions\CommandException;
use MkyCommand\Input;
use MkyCommand\Output;
use MkyCore\Application;
use MkyCore\Console\Show\ConsoleTable;
use MkyCore\Exceptions\Container\FailedToResolveContainerException;
use Mky... | true |
3b1ac62d20a9bdaf6faa4d2afeabc29d5d3621a9 | PHP | n1ks2n/amulex-test | /core/DataBaseModel.php | UTF-8 | 432 | 2.6875 | 3 | [] | no_license | <?php
/**
* User: Nikita Pimoshenko <nikita.pimoshenko@yandex.ru>
* Date: 28.01.15
* Time: 18:39
*/
class DataBaseModel
{
const CONFIG_FILE_PATH = '/../config/db.php';
protected $dbLink;
public function __construct()
{
$config = require __DIR__ . self::CONFIG_FILE_PATH;
$this->db... | true |
2496e8bbdf4d273131e81c4f02288cd6b4b4e413 | PHP | CSDev0/contratos-agricolas-araya | /database/seeds/ProductSeeder.php | UTF-8 | 5,548 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Product_category;
use App\Product;
class ProductSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run() {
$this->insertProductCategories();
$this->insertProducts();
}
public fun... | true |
817989ae7ad2a3a19832aa7068a8a25626e53375 | PHP | kemalbehram/cotpay | /app/Http/Controllers/Controller.php | UTF-8 | 1,340 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseCon... | true |
8665ced102f73a2a30d509c9924d9caf7e20478f | PHP | seemuth/moodle-question_type_calculatedformat | /tests/variablesubstituter_test.php | UTF-8 | 8,847 | 2.59375 | 3 | [] | no_license | <?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle ... | true |
f618ecbb556c93eedc58a054c432efda79ea47a5 | PHP | damiTacconi/gotoevent | /Dao/ClienteBdDao.php | UTF-8 | 5,476 | 2.953125 | 3 | [] | no_license | <?php
namespace Dao;
use Modelo\Cliente;
use Modelo\Usuario;
class ClienteBdDao extends SingletonDao implements IDao
{
protected $tabla = "clientes";
protected $listado = [];
public function verificarDni($dni){
try {
$sql = "SELECT dni FROM $this->tabla WHERE dni=$dni";
$... | true |
cdb58e1675ab94411ac1ec408dd13a2aaad060cd | PHP | chenxigao/LaraBBs | /app/Observers/UserObserver.php | UTF-8 | 892 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Observers;
use App\Models\User;
use App\Notifications\UsersRegistered;
// creating, created, updating, updated, saving,
// saved, deleting, deleted, restoring, restored
class UserObserver
{
public function created(User $user)
{
$users = User::where('is_admin', 2)->get();
... | true |
3467a39103d95a33e205db5b46e2bd76b97f1fd4 | PHP | RyGoCRGT/PersonalUAB | /model/TablaMeritosDocenteProfesorConsulta.php | UTF-8 | 2,885 | 2.90625 | 3 | [] | no_license | <?php
class TablaMeritosDocenteProfesorConsulta
{
private $Conexion;
function __construct($con)
{
$this->Conexion = $con;
}
public function existeVersionMerito($versionMerito)
{
$consulta = $this->Conexion->prepare('SELECT * FROM tablaMeritosDocenteProfesor where version=:versionMerito');
$c... | true |
04c387c246015073603686e223357578eef9083c | PHP | MarsCube/secp256k1-php | /helpers.php | UTF-8 | 678 | 2.734375 | 3 | [] | no_license | <?php
use \Illuminate\Container\Container;
if (! function_exists('app')) {
/**
* Get the available container instance.
*
* @param string $make
* @param array $parameters
* @return mixed|\Illuminate\Foundation\Application
*/
function app($make = null, $parameters = [])
{
... | true |
e9bf6516634d05cd003285cf83510466557daec5 | PHP | AirSoftInc/NEW-PREDEV | /service/cases-service/get-case-by-id-service.php | UTF-8 | 736 | 2.703125 | 3 | [] | no_license | <?php
include('../../config/connection.php');
$id = $_POST['id'];
if (isset($id)) {
$query = "SELECT * FROM case_data WHERE id = $id;";
$result = mysqli_query($connection, $query);
if (!$result) {
die('Query failed' . mysqli_error($connection));
}
whil... | true |
adedb6aa779cf799dd72a09ac6969f5b139ff770 | PHP | Parama92/internshala-knock-off | /core/Student.php | UTF-8 | 3,134 | 3.40625 | 3 | [] | no_license | <?php
/**
* A Class to handle the actions that a student can perform.
*/
class Student extends User{
public function __construct ($email) {
parent::__construct($email);
$this->type = 'students';
}
/**
* A method to add the details of the... | true |
82f04a7533e8b1b5e0fea96701b5e6ce2c87a15e | PHP | tracie96/HeyDew | /app/UtilityModels/Notification/NotificationManager.php | UTF-8 | 2,442 | 2.59375 | 3 | [] | no_license | <?php
namespace App\UtilityModels\Notification;
use App\NotificationSettingsItem;
use App\NotificationSettingsType;
use Illuminate\Support\Facades\Log;
class NotificationManager
{
public function getPhotographerNotifications(string $category,int $userId){
$notifications=[];
$notifications['def... | true |
7dcc44c3ddb276619724ad90db9675e57763d23f | PHP | MichaelJ2324/oauth2-server | /src/Exception/InvalidCredentialsException.php | UTF-8 | 494 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* OAuth 2.0 Invalid Credentials Exception
*
*/
namespace OAuth2\Server\Exception;
/**
* Exception class
*/
class InvalidCredentialsException extends OAuthException
{
/**
* {@inheritdoc}
*/
public $httpStatusCode = 401;
/**
* {@inheritdoc}
*/
public $errorType = 'inv... | true |
8bdd15fa0a0485a5662770a49ccce2758590237a | PHP | danteay/swiftsender | /index.php | UTF-8 | 827 | 2.640625 | 3 | [] | no_license | <?php
require __DIR__ . '/vendor/autoload.php';
use Slim\Http\Request;
use Slim\Http\Response;
use Libraries\Email;
$app = new \Slim\App;
$app->post("/sendmail", function(Request $req, Response $res) {
$body = $req->getParsedBody();
try {
$client = new Email(
$body['user'],
... | true |
3f8a8d3e10040e1f132cffce5a728334563d0bc0 | PHP | adrian-ortega/flaco | /app/Http/Controllers/Controller.php | UTF-8 | 675 | 2.765625 | 3 | [] | no_license | <?php
namespace AOD\Http\Controllers;
use Interop\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface as Response;
abstract class Controller
{
protected $container;
public function __construct( ContainerInterface &$container )
{
$this->container = $container;
}
/**
... | true |
f3de93806a0e627347962089bff59f5cb0ee72cb | PHP | yansen626/investasi | /app/Models/Content.php | UTF-8 | 685 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by Reliese Model.
* Date: Sat, 17 Mar 2018 13:21:50 +0000.
*/
namespace App\Models;
use Reliese\Database\Eloquent\Model as Eloquent;
/**
* Class Content
*
* @property int $id
* @property string $section
* @property string $image_path
* @property string $content_1
* @property string $c... | true |
5de90cf97f3484d9719fe7d6976b534d213f68ba | PHP | leonardofjr/memory-spa | /app/Http/Controllers/Backend/BlogController.php | UTF-8 | 2,414 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Backend;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\User;
use App\Blog;
class BlogController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index() ... | true |
485686cd76f8af99aba59454102adf3fa66cf211 | PHP | Lyncros/ok_legacy | /abm/clases/class.fotoemp.php | UTF-8 | 1,318 | 3.109375 | 3 | [] | no_license | <?php
class Fotoemp {
private $id_foto;
private $id_emp_carac;
private $foto;
private $posicion;
/* id_foto int(10) unsigned NOT NULL auto_increment,
id_emp_carac int(10) unsigned NOT NULL,
foto varchar(500) NOT NULL,
posicion int(10) unsigned NOT NULL,
*/
public function __construct($id_foto=0,
... | true |
02439d3587b32912a6b16c5c9074888febe87f66 | PHP | kasen92/Framework-M | /sys/registry.php | UTF-8 | 1,269 | 2.96875 | 3 | [] | no_license | <?php
/**
*
* Registry: stores navigation information
* @author Gerard
*
*
**/
class Registry{
private $data=array();
// singleton instance
static $instance;
public static function getInstance(){
//there is no instance
if(!(self::$instance instanceof self)){
self::$instance=new self();
... | true |
f33bf4e0a3491c2f2b466fd5e51cc54139788c3f | PHP | Nathy14/Php7-Course | /Códigos/variaveis/super-globais.php | UTF-8 | 527 | 2.90625 | 3 | [] | no_license | <?php
//Variáveis super-globais
/*
URL.php?user=123&b=user2
Toda informação vinda de get e post é string, é necessário converter se precisar.
URL = Uniform Resource Locator
URI = Uniform Resource Identifier,parte de uma URL, exeplo http, https.
Protocolo+dominio+patch(caminho do site)+querry string(parâmetros)
*/
$n... | true |
15ae524fe6a3b3372003e7412b3143b2fbafd3d4 | PHP | hgflimited/php-tika | /src/Tika/TikaFactory.php | UTF-8 | 399 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: sgarwood
* Date: 20/03/19
* Time: 20:57
*/
namespace HGF\Tika\Tika;
class TikaFactory
{
/*
* Example usage $uri = new Uri('http://user:pass@localhost:3000/path?query#fragment');
// creates a new URI with a factory (is equivalent to `new Uri(...)`)
$uri = (new UriFactor... | true |
f60f8dfc287a19a063dafd7beff453569efc427b | PHP | Charlenedewaard/reserveringssysteemsite | /delete.php | UTF-8 | 483 | 2.625 | 3 | [] | no_license | <?php
require_once "includes/db.inc2.php";
if(!$_GET['id']) {
echo "id niet meegegeven";
}
else {
$reserveringId = $_GET['id'];
// Query voorbereiden
$query= "DELETE FROM reserveringen WHERE id = $reserveringId";
if(mysqli_query($conn1, $query)) {
mysqli_close($conn1);
//Redirect... | true |
cc5ecb97006fae99c1a2ddbefc8f063d4f01dc76 | PHP | sean-m-c/Agape-Project | /app/protected/controllers/ReportController.php | UTF-8 | 10,294 | 2.625 | 3 | [] | no_license | <?php
class ReportController extends Controller {
/**
* This is the default 'index' action that is invoked
* when an action is not explicitly requested by users.
*/
public function actionIndex() {
$panels = array(
'Search' => array(
'url' => array('/report/re... | true |
c563941c004b79d1e5314be3ec3ffd85e350d341 | PHP | QuachPhuc/crawler-v1 | /app/Business/ProductBusiness.php | UTF-8 | 1,597 | 2.625 | 3 | [] | no_license | <?php
namespace App\Business;
use App\Commons\Constant;
use App\Models\Product;
class ProductBusiness {
/**
* @return mixed
*/
public function getAll() {
return Product::all();
}
/**
* Public page
* @param $id
* @return mixed
*/
public function getProductListB... | true |
280203b00f3e7ec7d9c402db981b307e401f6c48 | PHP | graham-u/laravel-aws-lambda | /src/Queue/Jobs/LambdaSqsJob.php | UTF-8 | 2,246 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Intouch\LaravelAwsLambda\Queue\Jobs;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Queue\Job as JobContract;
use Illuminate\Queue\Jobs\Job;
class LambdaSqsJob extends Job implements JobContract
{
/**
* The Amazon SQS job instance.
*
* @var array
*/
... | true |
31388c2bb2497eda6095c94e11f942e7c4fc868e | PHP | daohaoyi/yx | /app/Zhuanti/Prizes/Handler/InterfacePrizesHandler.php | UTF-8 | 1,260 | 2.625 | 3 | [] | no_license | <?php
namespace App\Zhuanti\Prizes\Handler;
use Illuminate\Support\Str;
class InterfacePrizesHandler extends PrizesHandler
{
public function handle()
{
$params = '';
$peizhi = $this->prizes->peizhi;
empty($peizhi) && $peihzi = 'common';
if (empty($peizhi)) {
$pe... | true |
64793b6b98651a3bec5aaa506c6e5d5e3b3ff51b | PHP | Guikingone/MeiliSearchBundle | /src/Cache/SearchResultCacheOrchestratorInterface.php | UTF-8 | 988 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace MeiliSearchBundle\Cache;
use MeiliSearchBundle\Exception\RuntimeException;
use MeiliSearchBundle\Search\SearchResultInterface;
use Psr\Cache\InvalidArgumentException;
/**
* @author Guillaume Loulier <contact@guillaumeloulier.fr>
*/
interface SearchResultCacheOrchestratorIn... | true |
4d111f30a8b769a161f3a3f91d93c7520173dfd5 | PHP | yogeshtaywade/laravel-practical | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 3,508 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
use Image;
use Illuminate\Support\Facades\Storage;
use Illuminate\Http\Request;
use Illuminate\Auth\Events\Registered;
use App\Role;
us... | true |
ad74bf33889177585284b458f79ed14e943fc4a9 | PHP | idrunk/dce-php | /engine/db/active/ActiveRelation.php | UTF-8 | 8,098 | 2.625 | 3 | [
"LicenseRef-scancode-mulanpsl-2.0-en"
] | permissive | <?php
/**
* Author: Drunk
* Date: 2019/9/24 11:52
*/
namespace dce\db\active;
use dce\model\ModelException;
use drunk\Structure;
class ActiveRelation {
/** @var list<array{dbPrimary: string, dbForeign: string, modelPrimary: string, modelForeign: string}> */
readonly private array $relationColumns;
/*... | true |
3db765da5bf7a6a2d4c6b2783472e694b3d142e9 | PHP | machinchoseformation/meilleurcoin | /src/Entity/User.php | UTF-8 | 5,094 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints ... | true |
007e848b58bf6ff3b257cdbb7e34468c0d58ef77 | PHP | W3BGUY/CodeEval_w3bguy | /03.Hard/PHP/01.stringSearching.28_20141119.php | UTF-8 | 831 | 2.84375 | 3 | [] | no_license | <?php
/*
Charles Bastian
charles@charlesbastian.com
2014.11.19
Created for CodeEval.com Hard Challenge 28 - String Searching
https://www.codeeval.com/open_challenges/28/
2014.11.19 Received a partial solution
After re-reading, I noticed the following:
!! Do NOT use any substr type library function.
*/... | true |
c2c808237924becfa6d72f6c9e73d0b298159140 | PHP | sijibon/PHP | /array/array_splice.php | UTF-8 | 231 | 2.828125 | 3 | [] | no_license | <?php
$name = ['jibon','alamin','parbez','Faruk','anik'];
$lastName = ['shohidul','sumon'];
// array_splice($name, 2, count($name) , $lastName);
array_splice($name, 0,0, $lastName);
echo "<pre>";
print_r($name);
echo "</pre>"; | true |