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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7068450871e74544e72696c337ea1ea8a7c1d66f | PHP | wp-plugins/facebook-all-in-one-plugin | /lib/class_WDFBAIO_widget_likebox.php | UTF-8 | 5,197 | 2.6875 | 3 | [] | no_license | <?php
/**
* Shows Facebook Recommendations box.
* See http://developers.facebook.com/docs/reference/plugins/recommendations/
*/
class wdfbaio_WidgetLikebox extends WP_Widget {
function wdfbaio_WidgetLikebox () {
$widget_ops = array('classname' => __CLASS__, 'description' => __('Shows Facebook Like box.',... | true |
27e86172e6eea1c5d379b3d04f969913b16bdabf | PHP | saeedzr/stravachallenge | /index.php | UTF-8 | 5,986 | 2.578125 | 3 | [] | no_license | <link type="text/css" rel="stylesheet" href="style.css">
<html>
<head>
<title>Strava 5K/year</title>
</head>
</html>
<?php
include 'vendor/autoload.php';
//use Pest;
use Strava\API\Client;
use Strava\API\Exception;
use Strava\API\Service\REST;
//$token[0] = ""; // Saeed
$athlete_row = array();
if (in_ar... | true |
6f960053d0ce5b9c5170b22a51ddefed0eb5cb49 | PHP | KautsarH/ecommerce | /app/Http/Controllers/PaymentController.php | UTF-8 | 1,278 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Payment;
class PaymentController extends Controller
{
//
public function index(){
return Payment::all();
}
public function create(request $request){
$payment = new Payment;
$payment->customer_id = $req... | true |
de0b1b9ac485f2a1d4c2648f1b67f6aa62bed222 | PHP | sibanyebukani/kasi | /cab/functions/classes/account.class.php | UTF-8 | 2,610 | 2.921875 | 3 | [] | no_license | <?php
if (isset($_POST['update'])) {
//initialize an array to store any error message from the form
$form_errors = array();
//Form validation to be passed to function of check_empty_fields();
$required_fields = array('Username', 'Gender','Cell', 'Country', 'Province', 'City','Address',... | true |
6057c2a8b4d34061ad385ebcb5143b5581c594aa | PHP | Stolz/php-stubs | /res/php/cairo/functions/cairo-format-stride-for-width.php | UTF-8 | 208 | 2.65625 | 3 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | <?php
/**
* Description
*
* @phpstub
*
* @param int $format
* @param int $width
*
* @return int What is returned on success and failure
*/
function cairo_format_stride_for_width($format, $width)
{
} | true |
e12d2358d9363045bae28e389087b1ba612cf404 | PHP | andri000me/POS | /Core/Database/DBResults.php | UTF-8 | 5,050 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Core\Database;
use Core\Database\Database;
use Core\Database\Connection;
class DBResults {
protected $sql = "";
public $db = false;
protected $connection = false;
protected $result = array();
protected $table = "";
public $fields = array();
protected $columnOpenMark = "`";... | true |
d5c61cff7bb61336f744f50e77be7c459fe47a17 | PHP | georjaos/guardado | /application/controllers/Sai.php | UTF-8 | 2,768 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Sai extends CI_Controller {
function __construct() {
parent:: __construct();
}
public function index() {
}
public function enviarEmail_operacion() {
$params = json_decode(file_g... | true |
ca8545212e6afa15b6b61918fabd3c1d0087eead | PHP | SUTFutureCoder/sutoj | /inc/index_nav.php | UTF-8 | 1,152 | 2.796875 | 3 | [] | no_license | <?
///////////////////////////////////////////////////////////////////////
/////
///// 此处写的是主页nav部分
///// 函数能读取指定目录下的指定php文件并读取文件中$title="";的部分
/////
///////////////////////////////////////////////////////////////////////
?>
<?php
function getnav($dir)
{
$d = dir($dir);echo '<li>';
while($entry = $d->read())
{//读... | true |
c8428d30c570e01a5ceddbd874fb441a2b70f0ac | PHP | eduardonogueraga/laravelExamen | /database/seeders/MatriculaSeeder.php | UTF-8 | 690 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use App\Alumno;
use App\Curso;
use App\Matricula;
use Illuminate\Database\Seeder;
class MatriculaSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
protected $cursos;
protected $alumnos;
public function run()
{
... | true |
ffe01a7089f31eea4691271bd334ec24a8cb3b58 | PHP | habibmhamadi/laravel-inventory | /database/seeders/DatabaseSeeder.php | UTF-8 | 1,704 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
private $measurements = [
['name' => 'KG'],
['name' => 'Metre'],
['name' => 'Litre'],
['name' => 'Count']
];
private $products = [
[
'name' => 'Meal... | true |
4e4c3c13cf1cad9257f0ff05d466463075cdd778 | PHP | secrule-io/labs | /lab-1/resources/environment/lab-3/view.php | UTF-8 | 1,628 | 2.6875 | 3 | [] | no_license | <?php
if(isset($_GET['id'])){
$id = $_GET['id'];
}else{
die("No product id provided");
}
include('../db/config.php');
$db = new mysqli($host,$username,$password,$database);
if($db->connect_errno){
die($db->connect_errno);
}
$sql = "Select * from products where id = '{$id}'";
?>
<!DOCTYPE html>
<html l... | true |
5ff21b9ed524559005a2b0b32e2ece6950d7082c | PHP | gabrielgagno/silex-v | /src/App/Libraries/Lang.php | UTF-8 | 3,912 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Libraries;
use Silex\Application;
use Exception;
class Lang
{
protected $_path = __DIR__."/../../config/lang/";
protected $_app;
protected $_lang;
public function __construct(){
$this->_app = Util::getApp();
$this->loadTranslations();
}
/**
* Returns ... | true |
a4d4cfa9de6374fc7bbc63df5184b2d1ee343f1c | PHP | Ferreiramg/Repo-teste | /ServiceLayer/Client/ControllerEntrada.php | UTF-8 | 1,103 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Client;
use Exceptions\ClientExceptionResponse;
/**
* Cliente Entrada CRUD events
*
* @author Administrador
*/
class ControllerEntrada extends AbstracClient {
public function execute() {
$model = new \Model\Entrada();
$model->csvfile = ROOT . \Configs::getInsta... | true |
d28a23d98c354093a1b80846cae820c1bb840d45 | PHP | matriphe/laravel-md5-hash | /src/Md5HasherManager.php | UTF-8 | 720 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Matriphe\Md5Hash;
use Illuminate\Hashing\HashManager;
class Md5HasherManager extends HashManager
{
/**
* Create an instance of the MD5 hash Driver.
*
* @return Md5Hasher
*/
public function createMd5Driver()
{
return new Md5Hasher();
}
/**
* Get th... | true |
261dd49496b40348e77924eeb21e53be0a11d685 | PHP | test-ms-01/MQFramework | /Helper/Config.php | UTF-8 | 1,797 | 2.640625 | 3 | [] | no_license | <?php
namespace MQFramework\Helper;
use MQFramework\Application;
class Config
{
protected static $defaultPath = 'config';
protected $item;
private static $basePath = null;
// public function __construct($item)
// {
// $this->item = $item;
// }
public static function get($key)
... | true |
b44987ca02137178f4276e66a4b9c30cd834f327 | PHP | sfneal/address | /tests/Feature/MigrationsTest.php | UTF-8 | 982 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Sfneal\Address\Tests\Feature;
use Sfneal\Address\Models\Address;
use Sfneal\Address\Tests\TestCase;
class MigrationsTest extends TestCase
{
/** @test */
public function address_table_is_accessible()
{
// Save a new Address
$address = new Address();
$address->type =... | true |
3d1c5d3b1dc3a4ed235f6632f23270e886267933 | PHP | yue-l/shoppingcart-pets | /handlers/add_item_request.php | UTF-8 | 980 | 2.6875 | 3 | [] | no_license | <?php
namespace handlers;
session_start();
$sessionFile = file_get_contents(__DIR__ . '/../sessions/'. session_id());
unserialize($sessionFile);
// maipulate session cart
if (array_key_exists($_POST['name'], $_SESSION['shopping_cart']['selected'])) {
$quatity = ++$_SESSION['shopping_cart']['selected'][$_POST['na... | true |
9317cef71fc895ac1486753384a99a9ea38ee457 | PHP | CoolRunner-dk/coolrunner-php-sdk | /src/Models/CoolObject.php | UTF-8 | 700 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package api-v3-sdk
* @author Morten Harders
* @copyright 2018
*/
namespace CoolRunnerSDK\Models;
class CoolObject implements \JsonSerializable {
/**
* Convert to JSON
*
* @param bool $pretty Returned data should be formatted
*
* @return string Resulting JSON
*... | true |
138c22a0aeded8c80406445bdf61f22196e989d1 | PHP | kulikov/php-stat-score | /lib/util/threads/adapter/UnixProcess.php | WINDOWS-1251 | 906 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
require_once 'Abstract.php';
class UnixProcess extends ThreadAdapterAbstract
{
public function startThread($command, array $options = null)
{
$process = popen($command, 'r');
stream_set_blocking($process, false);
return $process;
}
public function closeThread($thread)
... | true |
de347030395a71f32f2218527c696ab570a0bda1 | PHP | mack-wang/yurencloud | /study/php/php7/metaphone.php | UTF-8 | 573 | 2.859375 | 3 | [] | no_license | <?php
require "./dbhelp.php";
$db = new dbhelp();
$input = 'helle';
$a = $db->sql("select * from words where Word = '$input';");
if($a){
echo "存在";
}else{
$input = metaphone($input);
$a = $db->sql("select * from words where meta = '$input';");
var_dump($a);
}
//$len = ($db->sql("select count(ID) fr... | true |
a0a5ea725b6bf663d497e2ec4ba64f6042a32495 | PHP | josephtseng-echo/Create-a-framework-to-use-sf2 | /src/Simple/ResponseEvent.php | UTF-8 | 615 | 2.625 | 3 | [] | no_license | <?php
// /src/Simple/ResponseEvent.php
namespace Simple;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\EventDispatcher\Event;
class ResponseEvent extends Event
{
private $response;
private $request;
public function... | true |
63d9be4440c8d2b1d8bfb8594d01011d8abac63f | PHP | artashesamatuni/Module_WEB | /localstorage/modules/soc.php | UTF-8 | 512 | 2.75 | 3 | [] | no_license | <?php
function send($msg)
{
$fp = fsockopen("127.0.0.1", 4927, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br/>\n";
} else {
fwrite($fp, $msg);
fclose($fp);
}
}
function get($msg)
{
$fp = fsockopen("127.0.0.1", 4927, $errno, $errstr, 30);
if (!$fp) {
... | true |
db3f3f07c0d6a6d307b4ed90b0499fcadc22e67d | PHP | CDV-Yami/sheet-fight | /src/Yami/SheetFight/Model/MoveInterface.php | UTF-8 | 2,176 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Yami\SheetFight\Model;
/**
* Represents an action done by the character in the game.
*
* @author Kevin GITTENS <kgittens973@gmail.com>
* @author Ludovic FLEURY <ludo.fleury@gmail.com>
*/
interface MoveInterface
{
const TYPE_NORMAL = 'normal';
const TYPE_SPECIAL = 'special';
const TY... | true |
cde4eaa62996eafc4f420d0f29860c18e35c0c32 | PHP | CTYPM/kinomonster | /index_table.php | UTF-8 | 1,293 | 2.984375 | 3 | [] | no_license | <?php
$mysqli = new mysqli('localhost', 'root', '', 'kinomonster');
if (mysqli_connect_errno()){
printf('Соединение не установлено, ошибка: ' . mysqli_connect_error());
exit();
}
$mysqli -> set_charset('utf8');
// if (isset($_POST['name'])){
// $query = "INSERT INTO movie VALUES(null, '" . $_POST['name'] . "',... | true |
3e0d84b140bd37d338cedea6ebfa1445e6daed64 | PHP | IgorGaev/hw_3.1 | /classNews.php | UTF-8 | 1,049 | 3.046875 | 3 | [] | no_license | <?php
class News
{
public $newsBase;
public $newsData;
public $newsTitle;
public $newsText;
public $newsAuthor;
public $newsItem;
public function __construct($Base)
{
$this->newsBase = $Base;
}
public function displayNews()
{
foreach ($this->newsBase as $th... | true |
d26b27f8d90d6dba17dd2299715e86b5851234f3 | PHP | jcorderx/WebApp-From-Class | /html/alerts.php | UTF-8 | 1,914 | 2.546875 | 3 | [] | no_license | <?php
require_once 'php/Database.php';
require_once 'php/LoginHandler.php';
require_once 'php/Navbar.php';
if (!LoginHandler::IsLoggedIn()) {
header("Location: /index.php");
exit;
}
$db = new Database();
$user = $db->LoadUserFromUsername(LoginHandler::GetCurrentAccountType(), LoginHandler::GetCurrentUsername... | true |
f9d5e4874b73992dd0a0089d569537e48f9e15c9 | PHP | Philwlv/asset-tracker-web | /api/assets/register/index.php | UTF-8 | 1,409 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/// Endpoint for registering a new asset into the system
include_once("../../api_config.php");
// Include cross origin headers
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Headers: Content-Type');
// Make page display JSON_PRETTY_PRINT
header('Content-Type: application/json');
/// Crea... | true |
5c762edbe8e76897ba2ca3b75fe5218c6bcc514b | PHP | communigate/communigate-plesk-extention | /plib/library/Validators/AccountBelongToDomain.php | UTF-8 | 1,080 | 2.640625 | 3 | [] | no_license | <?php
/*
***************
* Validator class for validating if value passed -> a account@domain is in the current domain
* Used in forwarder creation if the user specifyes account not in the domain
***************
*/
class Modules_Communigate_Validators_AccountBelongToDomain extends Zend_Validate_Abstract
{
const... | true |
e97670b695970b670a60e6f8dd381e087c0f1eef | PHP | mortan/PHP-App-Framework | /libraries/app/Dispatcher.php | UTF-8 | 2,705 | 3.015625 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__) . '/../../includes/config.php');
class Dispatcher
{
public static function handleRequest()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
$invokeData = self::getServiceAndMethod($_POST);
}
else if ($_SERVER['REQUEST_METHOD'] == 'GET')
{
$invokeData = self::getServi... | true |
e906212ab9256614df1373244c9adaa83d0aff0b | PHP | podlove/podlove-publisher | /lib/modules/related_episodes/template_extensions.php | UTF-8 | 845 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Podlove\Modules\RelatedEpisodes;
use Podlove\Model;
use Podlove\Modules\RelatedEpisodes\Model\EpisodeRelation;
use Podlove\Template;
class TemplateExtensions
{
/**
* List of Related Episodes.
*
* @accessor
* @dynamicAccessor episode.relatedEpisodes
*
* @param mixed $... | true |
bfcbc75a2ac7ef41893ee4937229459c897db435 | PHP | epicformbuilder/wixhive-php-api | /src/epicformbuilder/WixHiveApi/Commands/Contact/CreateContactActivity.php | UTF-8 | 864 | 2.625 | 3 | [] | no_license | <?php
/**
* User: EpicFormBuilder
* Email: support@epicformbuilder.com
* Date: 11/18/15
* Time: 8:35 PM
*/
namespace epicformbuilder\WixHiveApi\Commands\Contact;
use epicformbuilder\WixHiveApi\ResponseProcessors\ActivityResult;
use epicformbuilder\Wix\Models\CreateActivity;
use epicformbuilder\WixHiveApi\Commands... | true |
d2689383402a615ebefd03e2dd62b1f4e1708d7c | PHP | Spox5/Finance_web_app_v2 | /App/Piechart.php | UTF-8 | 857 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Models\Balance;
//messages display from storage in session
class Piechart
{
public static function getPieChartCurrentMonth()
{
if (isset($_SESSION['user_id'])) {
return Balance::showPieChartCurrentMonth($_SESSION['user_id']);
}
}
public static function getPieChartPreviou... | true |
bab0cc961c9f4f47ead8525e0dca57e7830e440e | PHP | mstrunz/Communify | /core/Request.php | UTF-8 | 956 | 2.9375 | 3 | [] | no_license | <?php
class Request{
private $get_parameter;
private $post_parameter;
public function setGetParameters($get_parameter)
{
$this->get_parameter = $get_parameter;
}
public function getGetParameters()
{
return $this->get_parameter;
}
public function setPostParam... | true |
e05b93e574ef4b36d1b3d358c3e2f0780b1757e7 | PHP | RaduNicolaeEduard/Ecommerce-site | /admin/login.php | UTF-8 | 2,636 | 2.765625 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT']. '/tutorial/core/init.php';
include 'includes/head.php';
// $password = 'password';
// $hashed = password_hash($password,PASSWORD_DEFAULT);
// echo $hashed
$email =((isset($_POST['email']))?sanitize($_POST['email']):'');
$email = trim($email);
$password =((isset($_POST['pas... | true |
c6a566f7ce505de04ad8cba5efe1125c47811f5d | PHP | kjmjr/PHP | /c11/rainfall.php | UTF-8 | 3,539 | 3.3125 | 3 | [] | no_license | <!DOCTYPE html>
<!-- Author: Kevin McAdoo
Date: November 20, 2017
File: rainfall.php
Purpose: Gathered rain fall amounts in a displayed table
Chapter: 11
-->
<html>
<head>
<title> Rain Form Results </title>
<link rel ="stylesheet" type="text/css" href="sample.css">
</head>
<body>
<?php
... | true |
4c07911af2f7381f609447bdf27b945c38beb7f3 | PHP | deljdlx/oneshot-oc-memory | /application/source/class/Controller.php | UTF-8 | 517 | 2.84375 | 3 | [] | no_license | <?php
namespace OC\Memory;
abstract class Controller
{
/**
* @var Application
*/
protected $application;
public function __construct(Application $application = null)
{
if($application === null) {
$this->application = Application::getInstance();
}
else {
... | true |
350f4a33252081deb6139ed209503d721a49357d | PHP | fluxapps/AssistedExercise | /classes/Assessment/class.xaseAssessments.php | UTF-8 | 4,791 | 2.65625 | 3 | [] | no_license | <?php
/**
* Class xaseQuestions
*
* @author Martin Studer <ms@studer-raimann.ch>
*/
class xaseAssessments {
//TODO combine this query with the query xaseQuestions. we could work with serveral temporary tables and join them.
/**
* @param array $options
* @param int $obj_id
*
* @return array|bool|int
*... | true |
ddeb37d3bb787e9ae8be07db9ce8488389da4b85 | PHP | PrinMeshia/persona-zero | /Persona/Helpers/Traits/RouterTrait.php | UTF-8 | 406 | 2.65625 | 3 | [] | no_license | <?php
namespace Helpers\Traits;
use Core\Interfaces\ResponseInterface;
use Core\Http\Response;
trait RouterTrait {
public function redirect(string $name, array $params = []):ResponseInterface
{
$redirectUrl = $this->router->generateUri($name,$params);
return (new Response())
->set... | true |
ae1a0e66a896afc82b80c02776ef39d2e96c1a24 | PHP | idct-tech/pure-sockets-php-ftp-client | /src/Client.php | UTF-8 | 15,009 | 3.03125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace IDCT\PureFTP;
use InvalidArgumentException;
class Client
{
protected $socket;
protected $timeout;
protected $data;
protected $usePassive = false;
public function connect($host, $port = 21, $timeout = 90)
{
$false = false; // We are going to return refrence (E_STRICT)... | true |
a13da04505f2228a01024e95f3e1b484fd3859e7 | PHP | ysanatomic/php-cookie-messages | /new_message.php | UTF-8 | 553 | 2.796875 | 3 | [
"MIT"
] | permissive | <!doctype html>
<html>
<body>
<form action="#" method="POST">
<input type="text" id="msg" name="msg">
<input type="text" id="type" name="type">
<input type="submit">
</form>
<?php
require 'messages.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$mes... | true |
40d3d0a4bc61fed4e64af2540d1a53575399e02a | PHP | arc-d/CRUD | /list.php | UTF-8 | 659 | 2.640625 | 3 | [] | no_license | <?php
require('database_handler.php');
$posts = table('posts')->selectAll();
?>
<!DOCTYPE html>
<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=edge">
<title>Document</title>
</head>... | true |
2e32abada4116d8a358efe33641a4cab2ada8135 | PHP | acyuta/yii2-queue | /src/Command.php | UTF-8 | 2,694 | 2.84375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @link https://github.com/zhuravljov/yii2-queue
* @copyright Copyright (c) 2017 Roman Zhuravlev
* @license http://opensource.org/licenses/BSD-3-Clause
*/
namespace zhuravljov\yii\queue;
use yii\base\Exception;
use yii\console\Controller;
use yii\helpers\Console;
/**
* Class Command
*
* @author Roma... | true |
55a0d329dcd1e023486f1b3af3d622e5589aaa7b | PHP | Kinrosslong/myproject | /app/Http/Controllers/Admin/ArticleController.php | UTF-8 | 3,014 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use App\Http\Requests\RequsetsArticlesEdit;
use App\Http\Requests\RequsetsArticlesAdd;
use App\Models\Article;
class ArticleController extends BaseController
{
protect... | true |
577eb2a2f19276f6b602fa0b43a4879a84f77eb0 | PHP | ganselmo/TPEweb2 | /Models/ImagenCancionModel.php | UTF-8 | 758 | 2.78125 | 3 | [] | no_license | <?php
require_once("Models/Modelo.php");
class ImagenCancionModel extends Modelo
{
public function __construct()
{
$this->db = Database::getInstance()->getConnection();
$this->query = new QuerySQL();
$this->tabla = "cancionImagenes";
}
public function create($id_cancion, $file... | true |
0b95a3463b89a788166040cfcd3a38b22979bf3f | PHP | jg77merten/doit | /library/FinalView/Access/Rules.php | UTF-8 | 11,155 | 2.828125 | 3 | [] | no_license | <?php
class FinalView_Access_Rules
{
const RULES_CLASSES_PREFIX = 'Application_Rules';
private static $_schema;
private static $_rules;
public static $options = array(
'default_behavior' => false
);
private static $_rulesClasses = array();
private static $_params = array();
... | true |
d883b16bb7f9f62b15d090bb6b2e1cf010d83ecd | PHP | niladi/WP-OO-Plugin-Framework | /src/php/Service/Wordpress/Entity.php | UTF-8 | 8,864 | 2.65625 | 3 | [] | no_license | <?php
namespace WPPluginCore\Service\Wordpress;
use WP_Post;
use Psr\Log\LoggerInterface;
use WPPluginCore\Domain\Helper\Notification;
use WPPluginCore\Service\Abstraction\Service;
use WPPluginCore\View\Implementation\Metabox;
use WPPluginCore\Exception\IllegalValueException;
use WPPluginCore\Domain\Entity\Abstracti... | true |
b987d30771c3e50c7518d3572d6fe51d5bf6ecf4 | PHP | yurineydachin/test_tasks | /imagick/application/common/FilterTask.php | UTF-8 | 467 | 2.703125 | 3 | [] | no_license | <?php
require_once APPLICATION_PATH . '/common/Task.php';
class FilterTask extends Task
{
public function checkParams()
{
parent::checkParams();
$this->radius = (int) $this->radius;
if (! $this->radius || $this->radius < 0) {
throw new Exception('Uncorrect filter params');... | true |
d432ad526fce08d73729355aa5ced61608276c23 | PHP | juanseulloa/PhpAjax | /proyecto020/module/cine/entity/estudiante.php | UTF-8 | 467 | 2.765625 | 3 | [] | no_license | <?php
namespace Module\Cine\Entity;
class Genero {
private $_codgenero;
private $_nombre;
public function __construct() {
}
function get_codgenero() {
return $this->_codgenero;
}
function get_nombre() {
return $this->_nombre;
}
function set_codgene... | true |
771d3165b04b06e62d8e763fd5291e665bcd71d6 | PHP | latik/snmptrap | /app/Http/Controllers/Rest/PointController.php | UTF-8 | 1,478 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Rest;
use App\Http\Controllers\Controller;
use App\Point;
use Illuminate\Http\Request;
use Response;
/**
* Class PointController.
*/
class PointController extends Controller
{
/**
* @param Request $request
*
* @return Response
*/
public function inde... | true |
dfa46021906966bbf0215af8a6f8d82c79479dbf | PHP | maksim-mshp/laravel-todo | /routes/web.php | UTF-8 | 1,049 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Route;
use App\Models\Task;
Route::get('/api/tasks/new/{name?}', function ($name) {
$task = new Task;
$task->name = $name;
$task->status = 0;
$task->save();
return json_encode(array("state" => "ok"));
});
Route::get('/api/tasks/all', function () {
$res =... | true |
a9f9934b306258a27c9fce2ec83340aabb563d07 | PHP | XxMaxIsWellXx/fiu-projects | /php/bar.php | UTF-8 | 185 | 2.953125 | 3 | [] | no_license | <?php
echo "Hello bar \n";
$x = 10;
$y = 20;
var_dump( $x + $y);
var_dump( $_GET);
var_dump( $_POST);
$name = "jdoe";
$name = $_POST['lname'];
echo "Hello ".$name." \n";
?>
| true |
d036a3c5ced6e7bf92428773b92692b1b707575d | PHP | kcmooki/Othorpedic-Info-System | /bookings.php | UTF-8 | 1,272 | 2.734375 | 3 | [] | no_license | <?php
include "connect.php";
/* Attempt MySQL server connection. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
$link = mysqli_connect("localhost", "root", "", "dhealth");
// Check connection
if($link === false){
//die("ERROR: Could not connect. " . mysqli_con... | true |
1479467f24f7a98810d27133d2337b82e179769e | PHP | senaranya/HL7 | /tests/ConnectionTest.php | UTF-8 | 2,775 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Aranyasen\HL7\Tests;
use Aranyasen\Exceptions\HL7ConnectionException;
use Aranyasen\Exceptions\HL7Exception;
use Aranyasen\HL7\Message;
use Aranyasen\HL7\Connection;
use RuntimeException;
class ConnectionTest extends TestCase
{
use Hl7ListenerTrait;
protected int $p... | true |
d86bcd7794e7f6446077eb6c7d158f102f3ccfa4 | PHP | nfrm/PHP-Neoform | /library/neoform/acl/resource/model.php | UTF-8 | 4,032 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace neoform\acl\resource;
use neoform\entity;
/**
* Acl Resource Model
*
* @var int $id
* @var int|null $parent_id
* @var string $name
*/
class model extends entity\record\model implements definition {
public function __get($k) {
if (iss... | true |
b7e2d6609687753aaf9f3abe735fd0c7efd22cf2 | PHP | TeamBixby/libCommandOverload | /src/alvin0319/libCommandOverload/BaseCommand.php | UTF-8 | 1,941 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace alvin0319\libCommandOverload;
use alvin0319\libCommandOverload\parameter\Parameter;
use pocketmine\command\CommandSender;
use pocketmine\command\PluginCommand;
class BaseCommand extends PluginCommand{
/** @var Overload[] */
protected $overloads = [];
public function exec... | true |
efdaaf9a7c955eb5f48ffe5079490a95e045da89 | PHP | Mikael-LB/sortir-eleves | /src/Entity/Participant.php | UTF-8 | 8,211 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\ParticipantRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @OR... | true |
cf8343880769fe27536e51a8c31ba66cc13dd5a4 | PHP | MySiteDigital/appthemes-username-changer | /includes/class-md-user-profile-extensions.php | UTF-8 | 4,723 | 2.703125 | 3 | [] | no_license | <?php
namespace MySiteDigital\User;
use AXI_User_Validation;
if (!defined('ABSPATH')) {
exit;
}
class ProfileExtensions
{
/**
* Constructor.
*/
public function __construct()
{
add_action('init', [$this, 'init'], 10, 3);
add_action('user_profile_update_errors', [$this, 'va... | true |
97f12e1402bca0dc17d9122a01214dca7238bcce | PHP | huylv-hust/asbo | /fuel/app/classes/model/stopdate.php | UTF-8 | 1,863 | 2.5625 | 3 | [] | no_license | <?php
class Model_Stopdate extends \Orm\Model
{
protected static $_primary_key = array(
'sscode',
'menu_code',
'stop_date',
);
protected static $_properties = array(
'sscode',
'menu_code',
'stop_date',
'created_at',
'updated_at',
);
protected static $_observers = array(
'Orm\Observer_Created... | true |
5843d1c068e34ea65325f3090ece52db3b4ea72f | PHP | helenasw/helenameetslaravel | /app/Answer.php | UTF-8 | 3,233 | 3.09375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* User answers to our predefined questions.
*/
class Answer extends Model {
// Allow these fields to be filled en masse
protected $fillable = ['answer','question_type', 'user_id'];
/**
* In a real application, this relationship (an... | true |
24bbc72cdb5052fe7be8b9c387a233964a298833 | PHP | alzhan-ismagulov/ismagulov.loc | /app/models/admin/User.php | UTF-8 | 2,800 | 2.59375 | 3 | [] | no_license | <?php
namespace app\models\admin;
class User extends AppModel
{
public $attributes = [
'name' => '',
'email' => '',
'password' => '',
'phone' => '',
'token' => ''
];
public $rules = [
'required' => [
['name'],
['email'],
... | true |
c9dde1eaec9f972c551caa362da92f06d039ec20 | PHP | DalitSchmidt/school | /app/model/UserModel.php | UTF-8 | 2,393 | 3.078125 | 3 | [] | no_license | <?php
namespace School\Model;
require_once 'Model.php';
class UserModel extends Model {
/**
* UserModel constructor.
* @param \mysqli $db
*/
public function __construct( $db ) {
parent::__construct( $db );
}
/**
* @return mixed
*/
public function getUsers() {
... | true |
e256ac132377653975340ea221ecf2841ae7a6ec | PHP | mrmupton/development | /library/includeFiles/includeFiles.class.php | UTF-8 | 2,212 | 2.6875 | 3 | [] | no_license | <?php
class includeFiles
{
public function __construct($req,$types=NULL,$filter=''){
$jsStop = false; $cssStop = false; $phpStop = false;
if($types != NULL){
if(strstr($types,'j')){ $jsStop = true; }; if(strstr($types,'c')){ $cssStop = true; };
if(strstr($types,'p')){ $phpStop = true; };
}
$rf = array();... | true |
092d56137eebe1c1064f972087433e83dc63bc70 | PHP | baimuzev/think-system | /src/utility/Security.php | UTF-8 | 2,222 | 2.84375 | 3 | [] | no_license | <?php
namespace BaiMuZe\Admin\utility;
use BaiMuZe\Admin\library\Exception;
/**
* 加密处理
*/
class Security
{
/**
* 加密密钥
*
* var string
*/
protected $key;
/**
* 加密的初始话矢量
*
* var string
*/
protected $iv;
/**
* 加密算法
*
* var string
*/
... | true |
a477442a30bd8ee375b4f2ef25ea2396680e27a9 | PHP | RonnyWathne/web-programming | /examples-php/sessions/session.php | UTF-8 | 518 | 3.5 | 4 | [] | no_license | <?php
/**
* Session example
*/
function addToSession($name, $value) {
$_SESSION[$name] = $value;
}
function getFromSession($name) {
echo $_SESSION[$name];
}
// you need to start with session_start before sending anything to the browser
session_start();
// 1) first, uncomment this to store in the session
a... | true |
70a9b424f06ad40332483facfe03b65568d668e9 | PHP | emartin-cfe/colonoscopy_planner | /GUIDE/dependencies/rendering_engine.php | UTF-8 | 256 | 2.578125 | 3 | [] | no_license | <?php
class Page {
# Lookups can be static, from DB, memcached, etc...
public function render ($view,$lookups=null) {
if ($lookups !== null) { extract($lookups); } # Import lookups into symbol table
require ($view); # Render the view
}
}
?>
| true |
9d997541d568b574f32f4a3bae56880f1268e361 | PHP | andrewatef/SE2018G07 | /assignment-1/inccc/Gradesclass.php | UTF-8 | 1,614 | 3.0625 | 3 | [] | no_license | <?php
include 'database.php';
class Grades{
private $db;
public function __construct(){
$this->db = new Database();
}
public function all(){
$query="Select * from grades ";
$result = $this->db->select($query);
... | true |
9f5fc7e5b7bb847897da55b0f7c5343ed57fc2b4 | PHP | mahadi0007/Ocean-blue-restaurant | /Ocean Blue resturant_final/profile.php | UTF-8 | 7,918 | 2.625 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<head>
<title>profile</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/j... | true |
b4c4bb608b6b0d1a26ab702ca83a8c81990aad5e | PHP | s84662355/new-rabbitmq | /src/Daemon.php | UTF-8 | 1,998 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: chenjiahao
* Date: 2019-06-10
* Time: 11:43
*/
namespace CJHRabbitmq;
Class Daemon{
private $process_name = '';
public function __construct($process_name)
{
$this->process_name = $process_name;
}
/**
* 初始化一个守护进程
* @throws Exceptio... | true |
ea60e6f1ba9d758fd1bb74ef57f54261c0dc7f78 | PHP | Dkplus/indicator | /src/Application/RecoverIssueHandler.php | UTF-8 | 1,270 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Dkplus\Indicator\Application;
use Dkplus\Indicator\DomainModel\CustomerId;
use Dkplus\Indicator\DomainModel\FeedbackForum;
use Dkplus\Indicator\DomainModel\Issue;
use Dkplus\Indicator\DomainModel\IssueId;
use Dkplus\Indicator\DomainModel\IssueState;
use Dkplus\Indicator\DomainM... | true |
82dd06a4839403184fda7dbf3feb62f82258df48 | PHP | smalbadger/Pauseitive-Website | /database.php | UTF-8 | 8,633 | 3.15625 | 3 | [] | no_license | <?php
//
//Author: Sam Badger 4/7/2017
//Adapted from code by Rick Mercer and the other guy.
//
class DatabaseAdapter{
private $DB;
//constructs a database adapter
public function __construct(){
$user = 'root';
$password = '';
... | true |
ae91ce915a84bc4a7334d5720b9cfdbf26a6e8f3 | PHP | Mikaeldus/ExoCDA | /developperDesComposantsdInterface/developperLaPartieBack_end/php/exercicePHP/src/php/exercice3.php | UTF-8 | 2,174 | 2.71875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
/* un peu de style */
caption{
border-style:solid;
}
table{
text-align:center;
border-style:solid... | true |
cebe77feda79fa96281117b34cd77c1ce2318d81 | PHP | taurinese/choshi-shop | /admin/controllers/userController.php | UTF-8 | 5,042 | 2.515625 | 3 | [] | no_license | <?php
if(!isset($_GET['action'])){
header('Location : index.php');
exit;
}
require 'models/User.php';
switch ($_GET['action']) {
case 'list':
$users = getUsers();
$view['content'] = 'views/userList.php';
$view['title'] = 'Liste utilisateurs';
break;
case 'new':
... | true |
02ea6ceec96ce79cc1fd4bde501c05f71e325ae3 | PHP | BCLibraries/softwaretracker | /scripts/makeupcomingreport.php | UTF-8 | 1,383 | 2.75 | 3 | [] | no_license | <?php
require_once 'authorize.php';
require_once 'config.php';
require_once 'makedbconnection.php';
/*Check the directory*/
$directory = DOC_DIR."/$_SESSION[username]";
if (!is_dir($directory)){
mkdir($directory);
}
$days = filter_input(INPUT_GET, "days", FILTER_SANITIZE_NUMBER_INT);
$reportlocation =... | true |
a53bb3b44f598703c3eb9f9230dffb260c8ac0b4 | PHP | imre-tomori/Learned_optimism_with_PHP | /miscellaneous/index2.php | UTF-8 | 4,777 | 2.640625 | 3 | [] | no_license | <?php
require 'form.php';
function common_check($rword, $common_words) {
$common = array(0,0);
foreach ($common_words as $cword) {
$cword_trimmed = trim($cword);
if($rword == $cword_trimmed) {
$common[1] = $common[1]+1;
$common[0] = 1;
break;
}
}
return $common;
}
// --------------------... | true |
33aef1e21ea36461400e7fbe94f9816a17cf52c8 | PHP | tanmaybinaykiya/codebin | /webDev/Quark2012/app/models/category.php | UTF-8 | 1,110 | 2.625 | 3 | [] | no_license | <?php
class Category extends AppModel {
var $name = 'Category';
//The Associations below have been created with all possible keys, those that are not needed can be removed
var $hasMany = array(
'Event' => array(
'className' => 'Event',
'foreignKey' => 'category_id',
'dependent' => false,
'conditions'... | true |
643de091572861ddaf6dd21f4265bfc32e727333 | PHP | KnsRoo/duplet | /public/vendor/websm/framework/src/MessageQueue/Tests/BeanstalkQueueTest.php | UTF-8 | 2,667 | 2.59375 | 3 | [] | no_license | <?php
include_once __DIR__.'/../../init.php';
use PHPUnit\Framework\TestCase;
use Pheanstalk\Pheanstalk;
use Websm\Framework\MessageQueue\BeanstalkQueue;
use Websm\Framework\MessageQueue\TypeEnum;
use Websm\Framework\MessageQueue\Task;
use Websm\Framework\MessageQueue\Exceptions\NotFoundException;
use Websm\Framewo... | true |
74a2778381b27733f56efbaba095c4c8a2b40f02 | PHP | MaciejDubowik/WPRG | /3/3.1/3.1.php | UTF-8 | 1,800 | 3.421875 | 3 | [] | no_license | <?php
function wybranieWhile(){
echo $tab[] = rand(1,100);
echo " ";
echo $tab[] = rand(1,100);
echo " ";
echo $tab[] = rand(1,100);
echo " ";
echo $tab[] = rand(1,100);
echo " ";
echo $tab[] = rand(1,100);
$x = 0;
$najwieksza = 0;
while($x < count($tab)){
if($tab[$x]> $najwieksza){
... | true |
b49b2201c779ca56251e15553e267cdea35d43b7 | PHP | tabr/PHP_UUIDv4 | /uuid_v4.php | UTF-8 | 2,812 | 3.171875 | 3 | [] | no_license | //https://habr.com/ru/company/mailru/blog/522094/
/*
* 2021 tabr - feel free to use, distribute and contribute =)
*/
class UUIDv4
{
public const KEY_LENGTH_BYTES = 16;
public const UUID_VERSION_BYTE = 7;
public const UUID_VERSION_CLEANUP_MASK = 0x0F;
public const UUID_VERSION_SET_MASK = 0x40;
p... | true |
8ab016f97ee2d77139e900ba7f34a2fcf0640ab4 | PHP | avshatalov48/bitrix-core-business | /modules/rest/lib/handlerhelper.php | UTF-8 | 1,568 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sigurd
* Date: 17.01.17
* Time: 10:43
*/
namespace Bitrix\Rest;
class HandlerHelper
{
const ERROR_UNSUPPORTED_PROTOCOL = 'ERROR_UNSUPPORTED_PROTOCOL';
const ERROR_WRONG_HANDLER_URL = 'ERROR_WRONG_HANDLER_URL';
const ERROR_HANDLER_URL_MATCH = 'ERROR_HANDLER_URL_MATCH';... | true |
d1f5e8e113718da82c10864da994b720f13a9a82 | PHP | fetmo/MojDashButton | /Services/DashButton/BasketHandler.php | UTF-8 | 2,797 | 2.71875 | 3 | [] | no_license | <?php
namespace MojDashButton\Services\DashButton;
use MojDashButton\Models\DashButton;
use MojDashButton\Models\DashButtonProduct;
class BasketHandler
{
/**
* @var \Enlight_Components_Db_Adapter_Pdo_Mysql
*/
private $db;
/**
* @var \Enlight_Event_EventManager
*/
private $event... | true |
8b5c5e7fd8274f3e288298ab5cd029c94ae2c70a | PHP | auvy09/Scholarship-management-system | /model/update.php | UTF-8 | 1,401 | 2.734375 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<head>
<title> Update DATA </title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<form action="php_insert_data_in_mysql_database.php" method="post">
... | true |
479ad25185a776385817cd00a54c999da5b02b00 | PHP | Spavacz/NPG | /cms/db/Mapper/Lucene/Item/Product.php | UTF-8 | 1,534 | 2.734375 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Product
*
* @author Spav
*/
class Cms_Db_Mapper_Lucene_Item_Product
{
protected $_index;
public function __construct()
{
$this->_index = Zend_Search_Lucene::open( APPLICATION_PATH ... | true |
a46a016ed2d3f347e17022fd2be5812c2fa60cdb | PHP | miqdadyyy/Laravel-Shop | /app/View/Components/TransactionTable.php | UTF-8 | 853 | 2.53125 | 3 | [] | no_license | <?php
namespace App\View\Components;
use Illuminate\Support\Facades\Auth;
use Illuminate\View\Component;
class TransactionTable extends Component
{
public $datatableApiUrl;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct($user = null)
{
... | true |
1cc4f80307608b1186b9631b3381267ee47a6703 | PHP | midorisan388/serverside | /php/Skills/SetStetas.php | UTF-8 | 2,418 | 2.921875 | 3 | [] | no_license | <?php
ini_set('display_errors',"On");
error_reporting(E_ALL);
require_once(ROOT_DIR."\php\StetasClass\StClass.php");
require_once(ROOT_DIR."\php\Skills\SkillClass.php");
/**
* @class 状態を自身に付与するスキル
*/
class SetStetas extends SkillBase{
/**
* @param name : スキル名
* @param ct : チャージターン数
* @para... | true |
ee8f28201f71a8831e0e505ea879abf4e398497d | PHP | finntenzor/sdn-sign-be | /app/controller/Index.php | UTF-8 | 4,217 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\controller;
use app\ApiException;
use app\BaseController;
use app\model\Lesson;
use app\model\Sign;
class Index extends BaseController
{
public function testAdmin()
{
try {
$this->mustAdmin();
return $this->data([
'pass' => true,
... | true |
ff5b427001757d86d1388d0cc59058ca6aaca360 | PHP | PHPSocialNetwork/phpfastcache | /tests/AtomicOperations.test.php | UTF-8 | 3,775 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
*
* This file is part of Phpfastcache.
*
* @license MIT License (MIT)
*
* For full copyright and license information, please see the docs/CREDITS.txt and LICENCE files.
*
* @author Georges.L (Geolim4) <contact@geolim4.com>
* @author Contributors https://github.com/PHPSocialNetwork/phpfastcache/gra... | true |
3000d716a8f17f51abdd5b345a29dde64e7af2b8 | PHP | Dka233/gdlwebcamp | /admin/login-admin.php | UTF-8 | 1,536 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
// LOGIN
if(isset($_POST['login-admin'])) {
$usuario = $_POST['usuario'];
$password = $_POST['password'];
try {
//En funciones se incluye la conexión a la BD
include_once 'funciones/funciones.php';
// Selecciona de Admins por Usuario
$stmt = $conn->prepare("SELECT * FROM admins WH... | true |
e2671d3b8995aeb4552b54bad2d7fbe9a303b9f6 | PHP | slavau/securepayxml-php | /lib/Requests/Periodic/PeriodicItem/AddOngoingPaymentPeriodic.php | UTF-8 | 9,713 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace SecurePay\XMLAPI\Requests\Periodic\PeriodicItem;
use SecurePay\XMLAPI\Exceptions\CurrencyUnsupportedException;
use SecurePay\XMLAPI\Exceptions\InvalidStartDateException;
use SecurePay\XMLAPI\Requests\RequestTraits\CreditCardTraits;
use SecurePay\XMLAPI\Requests\RequestTraits\DirectEntryTraits;
use Sec... | true |
1354d88ea7ba415673dce34c0198e42da155ad1f | PHP | deividstaehr/crud | /app/Product.php | UTF-8 | 718 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace app;
use core\Model;
final class Product extends Model
{
protected $tableName = 'produtos';
protected $pkey = 'id';
protected $columns = [
"id" => null,
"nome" => null,
"preco" => null,
"descricao" => null,
"categoria_id" => null
];
public ... | true |
e7f76580568b3a898a67aa302d46acf0b91c61b3 | PHP | daiduong47/lumen-elasticsearch | /src/Search/Query/TermLevel/TermsQuery.php | UTF-8 | 1,200 | 2.6875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php namespace Nord\Lumen\Elasticsearch\Search\Query\TermLevel;
/**
* Filters documents that have fields that match any of the provided terms (not analyzed).
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html
*/
class TermsQuery extends AbstractQuery
{
/**
... | true |
827658d1266d21609815da11ebe522cf23112438 | PHP | B-B-S/symfony2019-forms | /src/Entity/Category.php | UTF-8 | 2,454 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Entity;
use App\Entity\Exception\CategoryException;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity
* @UniqueEntity("name")
*/
class Category
{
/**
... | true |
dcbb7bf6736512739b5c2a97ca509a440bd5404b | PHP | haslek/pets | /classes/Database.php | UTF-8 | 796 | 3 | 3 | [] | no_license | <?php
/**
* Created by HASSAN.
* User: HASSAN
* Date: 9/28/2019
* Time: 3:49 AM
* Project: leatrix
*/
class Database
{
public $conn;
public function __construct()
{
$this->conn = new mysqli('localhost','root','','pets') or die('Error connecting to database');
}
/**
* @return my... | true |
39e3b6ba7e43104d9b133434c88442bf3f3c8d20 | PHP | siso77/www.stream.oddone.lo | /libs/ext/pear/XML/XPath/.svn/text-base/error.php.svn-base | UTF-8 | 2,693 | 2.578125 | 3 | [] | no_license | <?php
// {{{ license
// +----------------------------------------------------------------------+
// | PHP version 4.0 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2001 The PHP Group ... | true |
78dabc683f3978af6f6bcbff7f4ca497045117b4 | PHP | FilipMatuszczak/FindBand | /src/Services/Handler/SavePhotoOnSeverHandler.php | UTF-8 | 852 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Services\Handler;
use Symfony\Component\HttpFoundation\File\File;
class SavePhotoOnSeverHandler
{
const USER_PROFILE_DIR = '/user_profile_photo/';
const BAND_PROFILE_DIR = '/band_profile_photo/';
const POST_DIR = '/post_photo/';
const UPLOAD_DIRECTORY = 'uploads';
public stat... | true |
21a321d7c7b21b7b3ffaeef01f3b368e1b3d425f | PHP | MakarandGithub/Mess_Management_System | /public_html/login.php | UTF-8 | 4,166 | 2.59375 | 3 | [] | no_license | <?php
$msg=" ";
if(!empty($_POST["name"]) && !empty($_POST["password"]))
{
/*echo "data entered";
$myusername=$_POST['name'];
$mypassword=$_POST['password'];
echo $myusername;
header('Location: index.html');*/
session_start(); // Starting Session
$host="172.16.100.4"; // Host name
$user... | true |
8380680d6ab41395f30ccc543519325d76de81cd | PHP | interexperts/balance-calculator | /tests/CalculatorTest.php | UTF-8 | 3,034 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use \InterExperts\BalanceCalculator\Year;
use \InterExperts\BalanceCalculator\Calculator;
use \InterExperts\BalanceCalculator\UsedBalance;
class CalculatorTest extends PHPUnit_Framework_TestCase{
public function testGetQuotum(){
$this->doQuotumTest(dirname(__FILE__) . '/balance-testdata/testGetQuotum/');
}... | true |
da609b6be67ed288551529cbf26c31456173db66 | PHP | koson/HydroServer | /HydroServer/WaterOneFlow/WaterOneFlow_PHP/wof_read_db.php | UTF-8 | 19,554 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
require_once 'database_connection.php';
require_once 'table_names.php';
function db_GetSeriesCatalog($shortSiteCode)
{
//run SQL query
$query_text = "SELECT s.VariableID, s.VariableCode, s.VariableName, s.ValueType, s.DataType, s.GeneralCategory, s.SampleMedium,
s.VariableUnitsName, u.Unit... | true |
6b0be2a04fb508d330201447bbf651e1931084a4 | PHP | Cristopher-91/Calculator_PHP | /wyniki.php | UTF-8 | 599 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<?php
$liczba1 = $_POST['liczba1'];
$liczba2 = $_POST['liczba2'];
$doing = $_POST['doing'];
$wynik1 = $liczba1 + $liczba2;
$wynik2 = $liczba1 - $liczba2;
$wynik3 = $liczba1 * $liczba2;
$wynik4 = $liczba1 / $liczba2;
switch($doing)
{
case 'dodawanie': echo("Suma wynosi: $wynik1<br/>");... | true |
a144158a88227649c214d2faef933925f54bd33f | PHP | RenderbitTechnologies/normalize-phone | /src/helpers.php | UTF-8 | 393 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
if (!function_exists('normalize_phone')) {
/**
*
* Normalize a phone number (with or without country code)
*
* @param $phone
* @return string
*/
function normalize_phone($phone)
{
$phone = preg_replace('/\D/', '', $phone);
return (strlen($phone) > 10) ? $... | true |
5c538439367b77e0cedcb36830e53b45404e758e | PHP | raspiweather/raspiweather | /public_html/pages/admin/template/default.php | UTF-8 | 3,132 | 2.59375 | 3 | [] | no_license | <?php
if(isset($_SESSION['user_id'])) {
?>
<div class="row">
<!-- left column -->
<div class="col-md-6">
<!-- general form elements -->
<div class="box box-solid box-primary">
<div class="box-header">
<h3 class="box-title">Template</h3>
</div><!-- /.box-header -->
<div class="box-body... | true |