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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
15626068abbc9c0981ffaead23028eb40d70b28f | PHP | rahulyhg/php-3 | /rew/rew-framework-dev/httpdocs/backend/classes/Controller/Leads/Lead/AbstractLeadController.php | UTF-8 | 1,386 | 2.734375 | 3 | [] | no_license | <?php
namespace REW\Backend\Controller\Leads\Lead;
use REW\Backend\Controller\AbstractController;
use REW\Backend\Exceptions\MissingId\MissingLeadException;
use \Backend_Lead;
/**
* AbstractFormController
* @package REW\Backend\Controller\Leads\Lead
*/
abstract class AbstractLeadController extends AbstractControl... | true |
4c7fdb53fea4f343087172afcba4df014c85ee47 | PHP | aslemos/pw2 | /www/application/models/entities/itypevehicule.class.php | UTF-8 | 193 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* Interface de la classe EType
* @author : Alessandro Lemos
*/
interface ITypeVehicule {
public function getId();
public function getNom();
public function setNom($nom_type);
}
| true |
fc6cd118c658f115c27ae2ee8d6b9060d2dd8460 | PHP | glibmarchenko/lootly | /app/Transformers/MerchantIntegrationTransformer.php | UTF-8 | 1,804 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Transformers;
use App\Models\Integration;
use League\Fractal\TransformerAbstract;
class MerchantIntegrationTransformer extends TransformerAbstract
{
public function transform(Integration $integration)
{
if ($integration->pivot) {
return [
'merchant_id' ... | true |
dae661ac6d124bb175ff5551456e33b80b43fd12 | PHP | jenice11/FLASH_REPAIR_DERCS | /BusinessServiceLayer/model/runnerModel.php | UTF-8 | 1,590 | 2.53125 | 3 | [] | no_license | <?php
require_once '../../../libs/database.php';
class runnerModel{
public $R_Email,$R_Password,$R_Name,$R_Phone,$R_LicienseNo,
$R_Address,$R_image;
// get email and password for runner to login
function loginRunner(){
if(isset($_POST['R_Email'])){
$sql = "select * from rider where R_... | true |
ffeea74c2e4fa7d50d98ca693751fa5392761540 | PHP | tmajne/payum-przelewy24 | /src/Exception/GatewayException.php | UTF-8 | 905 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Nova\Payum\P24\Exception;
use Payum\Core\Exception\RuntimeException;
use Psr\Http\Message\ResponseInterface;
class GatewayException extends RuntimeException
{
public static function factory(string $content)
{
if (empty($content)) {
$label = 'P24... | true |
4dc37b5bd44b7b02505a3742ff7db0bbe744c78c | PHP | MichaelCStevens/Android-web-portal-JSON-API | /classes/controllers/device.controller.php | UTF-8 | 452 | 2.546875 | 3 | [] | no_license | <?php
class deviceController {
public $page;
function __construct() {
require_once router::$fileRoot . "classes/models/device.model.php";
$this->model = new deviceModel;
$this->processInput();
}
public function processInput() {
if (isset($_GET['push'])) {
... | true |
17b1d4809064622199862afabafed0e3d10776ba | PHP | Asimjaved9823/Address-Book-php | /view.php | UTF-8 | 2,880 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css\view.css">
<title>Address Book Cs(172120)</title>
</head>
<body>
<div class=tbl>
<h2>Address Book Record<h2>... | true |
8f2af88148547db418d4801eba6de201a996cfc5 | PHP | VIncentTetteh/Game | /index.php | UTF-8 | 1,185 | 2.796875 | 3 | [] | no_license | <?php
$noun = $_POST['noun'];
$pronoun = $_POST['pronoun'];
$color = $_POST['color'];
$celebrety = $_POST['celebrety'];
if(isset($_POST['submit'])){
echo "
<p>$noun is an angel.<br> $pronoun is GOD given.<br>$color is your favorite color.
<br>$celebrety is your NO.1 star in th... | true |
4708d8a0ece98e2b78d32fe089749cdf96f622f7 | PHP | kenphp/ken | /src/View/BaseEngine.php | UTF-8 | 2,341 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ken\View;
use Psr\Http\Message\ResponseInterface;
/**
* Base class for templating engine.
*
* @author Juliardi <ardi93@gmail.com>
*/
abstract class BaseEngine
{
/**
* Base path for view files
* @var string
*/
protected $viewPath;
/**
* An array of function that w... | true |
795e1f5033e4bc0a44d84431fb4b30533956fa66 | PHP | AScottSanAntonio/Exercises-php- | /breakcontinue.php | UTF-8 | 295 | 3.03125 | 3 | [] | no_license | <?php
for ($i = 1; $i <= 100; $i++) {
echo $i . "\n";
if ($i == 10) {
break;
}
}
$say1 = "you";
`say -v "Albert" "$say1"`;
$say2 = "shall";
`say -v "Albert" "$say2"`;
$say3 = "not";
`say -v "Albert" "$say3"`;
$say4 = "pass!";
`say -v "Albert" "$say4"`; | true |
9f3bbf600daf5d711cd351f7aecc827635525fad | PHP | xiezhibang/ceshi | /profession-backend/app/Http/Requests/Api/OrderCommentRequest.php | UTF-8 | 1,163 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests\Api;
use Illuminate\Foundation\Http\FormRequest;
class OrderCommentRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
... | true |
d79cefecc163e7bc0447774fab77b2a150be11fa | PHP | saykl/PhpWorkingTime | /index.php | WINDOWS-1251 | 3,282 | 3 | 3 | [] | no_license | <?php
/*
** htmlSQL - Example 1
**
** Shows a simple query
*/
include_once("htmlSQL/snoopy.class.php");
include_once("htmlSQL/htmlsql.class.php");
$wsql = new htmlsql();
$post = new htmlsql();
// connect to a file
if (!$wsql->connect('url', 'http://192.168.1.7//worktime/inoffice/worktime.krista.ru/employee/reports/in... | true |
c8099b1910c4d179d83258a25f3e1ab0f541c0f5 | PHP | alvinhzz/meeting-scheduling | /attendence/edit.php | UTF-8 | 2,874 | 3.078125 | 3 | [] | no_license | <?php
// include database connection file
include_once("database.php");
// Check if form is submitted for user update, then redirect to homepage after update
if(isset($_POST['update']))
{
$id = $_POST['id'];
$mid = $_POST['meeting_id'];
$mcd = $_POST['member_id'];
$mxid = $_POST['gro... | true |
ede319a3bbb66c28ce0f1739fac3f3f1a9c82c01 | PHP | isabeldonlon/project2isabel | /logic.php | UTF-8 | 1,028 | 3.03125 | 3 | [] | no_license |
<?php
//declare variables
$words = file('words.txt');
$count = 0;
$word_length = 0;
$symbol = array('/', '$',);
$number = array('1', '2', '19', '900', '76', '12', '81', '7');
$count = count($symbol);
$password = '';
//foreach function to go through words array
foreach ($words as $rand_num => $rand ) {
$wordlist[$... | true |
149559dfbbbb16b25dde28bcb6b1a0c4ebc1c4af | PHP | CODERS-BAY/php-aufgabe-wolfsgirl13 | /remind.php | UTF-8 | 1,185 | 2.671875 | 3 | [] | no_license | <?php include_once('header.php')?>
<main>
<?php
var_dump(json_decode($_GET['remindlist']));
if(isset($_GET['remindlist']) && $_GET['remindlist'] != 'null'):
$remindlist = json_decode($_GET['remindlist']);
include_once('include/database_con.php');
//----NOTIZEN - auslagern und in include
for($i = 0; $i < count... | true |
389d868bd672bd60c4b678cd47bd4caa77bda12b | PHP | jimkeller/lamplighter | /support/Util/Alphabet.class.php | UTF-8 | 641 | 3.125 | 3 | [] | no_license | <?php
class Alphabet {
const KEY_LETTER_KEY_DEFAULT = 'letter';
public static function Get_letter_array( $options = null ) {
return array ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z' );
}
publ... | true |
7236fee3ba0a5c78f2c416f8cc27e6428a63155a | PHP | 2063978470/Designpattern | /Singleton/index.php | UTF-8 | 309 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: YM-T430
* Date: 2018/1/11
* Time: 9:50
*/
require "Singleton.php";
$single1=Singleton::getInstance();
$single1->age=22;
$single2=Singleton::getInstance();
$single2->age=24;
echo "变量1的age:{$single1->age}<br/>";
echo "变量2的age:{$single2->age}<br/>"; | true |
92c6d5b288763d2a7c17f44af641fc77220bc3cc | PHP | drmonkeyninja/arc_social_share | /src/zem_tpl.php | UTF-8 | 2,117 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
// Either copy classTextile.php to your plugin directory, or uncomment the following
// line and edit it to give the location where classTextile.php can be found
#ini_set('include_path', ini_get('include_path') . ':/full/path/to/textile');
if (empty($test)) {
echo compile_plugin();
exit;
}
// ----... | true |
7c0f2f1d683f0beb1ad657fd242375821ed11092 | PHP | khromov/statistical-classifier | /tests/Camspiers/StatisticalClassifier/ClassificationRule/ComplementNaiveBayesTest.php | UTF-8 | 1,747 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Camspiers\StatisticalClassifier\ClassificationRule;
use Camspiers\StatisticalClassifier\Index\Index;
class ComplementNaiveBayesTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Index
*/
protected $index;
/**
* @var ComplementNaiveBayes
*/
protected $rule;
... | true |
763f59ebf29a9656fc02dcf26406f941bac0f8f4 | PHP | Factorsmith/public | /Defiant/testFive.php | UTF-8 | 711 | 2.96875 | 3 | [] | no_license | <?php
# D. LeAnn Smith, December 2021
# The input text file location is assumed to be the Current Working Directory of this php source
# since full path syntax differs accross OSs
define('TEST_PATH_FILE',"resources.txt");
echo "---- Beginning of Defiant Test Five: ----"."\n";
if (!file_exists(TEST_PATH_FILE)... | true |
943af7a18a1a7624558f70098d245d43e38cf282 | PHP | silasvianet/consumindo-web-service-PHP | /PHP/fontes/nusoap/server.php | ISO-8859-1 | 652 | 2.703125 | 3 | [] | no_license | <?php
// WebServices - iMasters.com.br
// Autor: Mauricio Reckziegel
// http://www.mauricioreckziegel.com
// Arquivo : server.php
// Observaes:
// Comentar a extenso php_soap
// Baixar o arquivo nusoap.php
// incluso do arquivo de classes NuSOAP
require_once('nusoap.php');
// criao de uma instncia do servidor
$server ... | true |
41bc1e0aa13b9847225b4b3b043afef0f8594ae6 | PHP | mix6s/criptim | /src/Domain/Exchange/Entity/UserExchangeAccount.php | UTF-8 | 586 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Simple
* Date: 13.01.2018
* Time: 19:23
*/
namespace Domain\Exchange\Entity;
use Domain\Exchange\ValueObject\ExchangeId;
use Domain\ValueObject\UserId;
use Money\Currency;
class UserExchangeAccount extends ExchangeAccount
{
/**
* @var UserId
*/
private $userId;
... | true |
c16c0926b5bf071fc40daed89b8fd86493874476 | PHP | tdproject/TDProject_Core | /src/app/code/core/TDProject/Core/Common/ValueObjects/DashboardViewData.php | UTF-8 | 1,718 | 2.609375 | 3 | [] | no_license | <?php
/**
* TDProject_Core_Common_ValueObjects_DashboardViewData
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*/
require_once 'TechDivision/Lang/Object.php';... | true |
dd7d57f388853354c93482a152d78e1ef192c937 | PHP | xIgor/COM921-trabalho-final | /app/src/View/Layout.php | UTF-8 | 2,243 | 2.734375 | 3 | [] | no_license | <?php
namespace IntecPhp\View;
use Exception;
use IntecPhp\Service\Config;
class Layout
{
private $stylesheets;
private $scripts;
private $title;
private $metaDescription;
private $metaKeywords;
private $layout;
private $renderLayout = true;
private $appendPartial = [];
const... | true |
997f9cf13d5e33a215a6e3296c65c21ebdfe3352 | PHP | MRomario/layered-cache | /src/Traits/OutdatedCacheExceptionTrait.php | UTF-8 | 411 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace App\Traits;
use App\Exception\OutdatedCacheException;
trait OutdatedCacheExceptionTrait
{
/**
* @param $key
* @param $diffTtl
*
* @throws OutdatedCacheException
*/
public function checkOutdatedCacheKey($key, $diffTtl)
{
if ($diffT... | true |
f8198bdd22986b774e1955f514017cb8672ca84a | PHP | ccwittv/APIREST-PPLab42doCutri2017-pizza | /clases/pizza.php | UTF-8 | 5,654 | 3 | 3 | [] | no_license | <?php
class pizza
{
public $id;
public $sabor;
public $tipo;
public $cantidad;
public $foto;
public static function TraerTodasLasPizzas()
{
$objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();
$consulta =$objetoAccesoDato->RetornarConsulta("select id, sabor, tipo, cantidad, foto from pizza")... | true |
7b1f381c3e6e0f6fb6e48c2aaf56707fe5c47584 | PHP | Half-night/webapp | /framework/core/test/DataStructure.php | UTF-8 | 4,278 | 3 | 3 | [] | no_license | <?php
class DataStructure extends Data
{
public $errors = null;
private $description = null;
// Testing
private $valid = false;
private $sanitized = false;
public function __construct(DataStructureDescription $description) {
$this->description = $description;
}
public funct... | true |
6f265279cfb54a049d6e2fd37f88cc1df7c5f734 | PHP | Nenalant/Camagru | /htdocs/upload.php | UTF-8 | 1,298 | 2.71875 | 3 | [] | no_license | <?php
if (isset($_FILES['avatar'])) {
$doc = './img/tmp_pic/';
if ($_FILES['avatar']['error'] > 0)
$erreur = "Erreur lors du transfert";
else {
$tmp_name = md5(uniqid(rand(), true));
$file = good_file(basename($_FILES['avatar']['name']), $tmp_name);
if (move_uploaded_file($_FILES['avatar']['tmp_name'], $doc... | true |
03724fb227f93ec9ca2ea4bf05d3699177d28caa | PHP | mguthrie67/website | /tools/classes/insightly_suplement.php | UTF-8 | 5,738 | 2.84375 | 3 | [] | no_license | <?php
class Insightly_sup{
private $apikey;
public function __construct($apikey){
$this->apikey = $apikey;
}
/**
* Gets a list of contacts
*
* @param array $options
* @return mixed
* @link https://api.insight.ly/v2.1/Help/Api/GET-Contacts_ids_email_tag
*/
public function getContacts(... | true |
381079a2412604521429c652a687b1994acd4744 | PHP | maximiliamus/weby-sloth | /src/Operation/Base.php | UTF-8 | 12,059 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Weby\Sloth
*
* @vendor Weby
* @package Sloth
* @link https://github.com/maximiliamus/weby-sloth
*/
namespace Weby\Sloth\Operation;
use Weby\Sloth\Sloth;
use Weby\Sloth\Exception;
use Weby\Sloth\Utils;
use Weby\Sloth\Column;
/**
* Base class for all operations.
*/
abstract class Ba... | true |
3f5536b08a9785c974debb4decb86f4ba1fe51f3 | PHP | Itpuntostore/Matteo_Becucci | /controllers/auth.php | UTF-8 | 3,737 | 2.671875 | 3 | [] | no_license | <?php
/**
* Auth Controller Class
*
* Security controller that provides functionality to handle logins, logout, registration
* and forgotten password requests.
* It also can verify the logged in status of a user and his permissions.
*
* The class requires the use of the DB_Session and FreakAuth libraries.
*
... | true |
80dcbc02bd804c0edbf4b714fd3a14bcdb610ba5 | PHP | GoodmanGood/project | /admin.shop.com/Application/Admin/Controller/GoodsCategoryController.class.php | UTF-8 | 2,596 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2016/12/21
* Time: 14:01
*/
namespace Admin\Controller;
class GoodsCategoryController extends BaseController
{
private $model;
/**
* 初始化操作
* 实例化模型对象
* 给所有视图传递变量
*/
protected function _initialize(){
$titles =... | true |
e9b3d340999497128c4ab3e3efe3559939d5d878 | PHP | rwierucki/larablog6 | /app/Http/Controllers/PostController.php | UTF-8 | 1,592 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Post;
class PostController extends Controller
{
public function __construct()
{
// dla użytkowników zweryfikowanych dostępna jest tylko metoda "show"
$this->middleware('verified')->only('show');
}
public functi... | true |
3ba35cacdad2d10ee0a5d14151d0492adb3d30cf | PHP | OxoTHuKxD/polygant-test | /controllers/SiteController.php | UTF-8 | 2,165 | 2.671875 | 3 | [] | no_license | <?php
namespace app\controllers;
use yii\db\Query;
use yii\web\Controller;
class SiteController extends Controller
{
public function actions()
{
return [
'error' => [
'class' => 'yii\web\ErrorAction',
],
];
}
public function actionIndex()
{... | true |
b18a7360ff04f239e67bf82649cdaedbd29c7650 | PHP | KHIT93/cms3 | /core/classes/Page.class.php | UTF-8 | 7,929 | 2.625 | 3 | [] | no_license | <?php
class Page {
private static $_instance;
private $_db;
public $data;
private function __construct($pid) {
$this->_db = DB::getInstance();
//$id = (is_array($get_url)) ? (int)$get_url[1] : (int)$get_url;
$page = array();
$query = $this->_db->get('pages', array('pid', ... | true |
b559e7dbc1706bfadaf41da278f86588dee40079 | PHP | jossenino/tmis | /application/models/Profile_m.php | UTF-8 | 1,144 | 2.625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Profile_M extends MY_Model{
protected $_table_name = 'profiles';
protected $_primary_key = 'idProfile';
protected $_order_by = 'profile';
public $rules = array(
'profile' => array(
'field' => 'profile',
'label' => 'Perfil',
'rules' => 'trim|required'
),
'description' => array(
'fie... | true |
09d3b1ca07bf719ea4bbedb5275d31aa1e917a21 | PHP | marcoWhoami929/10331f6179e576773f61f29b071acb845b872fc7c9b3e0a04f64b13552a6c777c8b90e7ce6927c911cbe03b9ca5e83a853d7 | /vistas/modulos/prueba-subgrupos.php | UTF-8 | 177,044 | 2.875 | 3 | [] | no_license | /*=============================================
EGRESOS SUBGRUPOS FEBRERO
=============================================*/
static public function mdlAcreedoresBancariosF($tabla, $item, $valor){
if ($item != null) {
$stmt = Conexion::conectar()->prepare("SELECT * FROM $tabla WHERE $item = :$item");
... | true |
47001b53c6e0b3265243b9e2db5f374de6bfec9a | PHP | tuancode/apicore | /tests/api/User/PostUserCest.php | UTF-8 | 5,997 | 2.5625 | 3 | [] | no_license | <?php
use AppBundle\Entity\User;
use Codeception\Util\HttpCode;
use Step\Api\UserStep;
use Tests\_support\Traits\AuthAwareTrait;
/**
* Class PostUserCest.
*/
class PostUserCest
{
use AuthAwareTrait;
/**
* Base url of cest.
*
* @var string
*/
private $url = '/user.json';
/**
... | true |
3290c46788bde0556f4c404035b0296d73f5e0fa | PHP | vstarck/Asadoo | /dist/0.2/examples/blog_example/Query.php | UTF-8 | 1,994 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
class Query {
private static $data = array();
public static function load($entity, $data) {
if (!isset(self::$data[$entity])) {
self::$data[$entity] = array();
}
self::$data[$entity] += $data;
}
private $entity = null;
private $condition = array();
p... | true |
a71b2d47b933cd2d7eb360448297888a4f6e5911 | PHP | lucashccosta/codepix | /api-core/src/libs/Gateway/Response.php | UTF-8 | 406 | 3.015625 | 3 | [] | no_license | <?php
namespace Libs\Gateway;
class Response
{
private $statusCode;
private $payload;
public function __construct(int $statusCode, $payload)
{
$this->statusCode = $statusCode;
$this->payload = $payload;
}
public function getStatusCode()
{
return $this->statusCode... | true |
dea1dd3ccbca7fea1921fb2b84b5feaf62e9e5ef | PHP | davidruisinger/wp-social-login-api | /lib/endpoints/class-user-api-login.php | UTF-8 | 8,563 | 2.875 | 3 | [] | no_license | <?php
class USER_API_Login {
/**
* Register the Login route
*
* @param array $routes Existing routes
* @return array Modified routes
*/
public function register_routes( $routes ) {
$login_route = array(
// Login endpoints
constant('USER_API_INTERNAL_PREFIX') . '/social-login' => array(
array(ar... | true |
3842a41e69c9020903d94ca5eae8fa30d3c9758c | PHP | filippopov/devision_little_tasks | /task2.php | UTF-8 | 249 | 3.609375 | 4 | [] | no_license | <?php
function solution(int $x, int $y, int $d) : int {
$counter = 1;
$sum = $x + $d;
while ($sum <= $y) {
$sum += $d;
$counter++;
}
return $counter;
}
$x = 10;
$y = 85;
$d = 30;
var_dump(solution($x, $y, $d)); | true |
6d11bac94ae91087b43b1404cc67be045f0e4b73 | PHP | Vogric/tpe-web-II-learn-it-2.0 | /Model/SubjectModel.php | UTF-8 | 1,705 | 3.078125 | 3 | [] | no_license | <?php
require_once 'Model/BaseModel.php';
class SubjectModel extends BaseModel
{
public function getSubjects()
{
$sentence = $this->db->prepare(
"SELECT * FROM subject" );
$sentence->execute();
return $sentence->fetchAll( PDO::FETCH_OBJ );
}
public function getSubje... | true |
dd100b36fdfc3d33d4a781e7672c402bdfb3175d | PHP | andisusanto/wilsonskripshit | /SystemClasses/FieldsOfStudy.php | UTF-8 | 3,912 | 2.578125 | 3 | [] | no_license | <?php include_once('BaseObject.php'); ?>
<?php include_once('Exceptions.php'); ?>
<?php
class FieldsOfStudy extends BaseObject{
const TABLENAME = 'FieldsOfStudy';
public function __construct($mySQLi){
parent::__contruct($mySQLi);
}
public $Code;
public $IndonesianName;
public $Name... | true |
f7569cce9e0fe6c5d0a3003c13ae8515d1125c2f | PHP | rengokantai/psphpfunda | /L6_17.php | UTF-8 | 383 | 2.8125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Hernan Y.Ke
* Date: 2016/1/27
* Time: 17:13
*/
class L6_17
{
public static $parvar=1;
}
class Sub extends L6_17{
public static $parvar=2;
public static function getPar(){
return parent::$parvar;
}
public static function getSelf(){
retu... | true |
2aa98f82762bce16ce8e4385f10eaa44c1062a0e | PHP | phuocphbap/pwa-test | /app/Services/WithdrawService.php | UTF-8 | 3,994 | 2.625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Entities\Payment;
use App\Entities\WalletTransaction;
use App\Entities\WithdrawRequest;
use App\Repositories\UserRepository;
use App\Repositories\WithdrawRequestRepository;
class WithdrawService
{
protected $userRepository;
protected $withdrawRepository;
public func... | true |
a90b7a5df1fcc40336a8081c7534421b5dd86fad | PHP | huriellopes/DesafioFiocruz | /app/Traits/Requests.php | UTF-8 | 1,547 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use Throwable;
trait Requests
{
/**
* Função que define o formato do resultado das requests
*
* @param string $message
* @param int $status
* @param Throwable|null $exception
* @return ... | true |
909771cf74424ccf5ee2ac7ea21e80eca5ed28c7 | PHP | alphazframework/com_installer | /Models/Com.php | UTF-8 | 2,227 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Zest Framework.
*
* @author Muhammad Umer Farooq <lablnet01@gmail.com>
* @author-profile https://www.facebook.com/Muhammadumerfarooq01/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @sin... | true |
e57912d3d28edd0f776ba28d28b4266d66c659fe | PHP | hamed1369/shub | /ow_unittest/ow_plugins/iisnews/iisnewsTest.php | UTF-8 | 6,523 | 2.578125 | 3 | [] | no_license | <?php
/**
* User: Issa Moradnejad
* Date: 2016/06/01
*/
class iisnewsTest extends IISTestUtilites
{
private $TEST_USER1_NAME = "user1";
private $TEST_USER2_NAME = "user2";
private $TEST_USER3_NAME = "user3";
private $TEST_PASSWORD = '12345';
private $userService;
private $user1,$user2,$user... | true |
fb6f8509c700e1cb7bee4f320af6f76aba71ed8e | PHP | MotherHouse/Benzene | /blog/db_update.php | UTF-8 | 1,053 | 2.84375 | 3 | [] | no_license | <?php
//PHP操作Mysql数据库
//1.连接数据库 mysqli_connect(数据库地址,用户名,密码(可选)) 连接成功会返回一个数据库资源文件
$link = mysqli_connect('localhost','root','') or die('数据库连接失败');
// echo "<pre>";
// print_r($link);
// echo "</pre>";
//2.选择进入指定的数据库 mysqli_select_db(上一步得到的资源,要选择的数据库)
mysqli_select_db($link,'myblog') o... | true |
b71c732a51ba00127df410e1a0a7901b6ddc2837 | PHP | mikeServa/swap | /traitement/telephone.php | UTF-8 | 365 | 2.640625 | 3 | [] | no_license | <?php
if(empty($_POST['telephone'])){
$errors++;
set_flash('Merci d\'indiquer votre numéro de téléphone','warning');
}elseif (is_numeric($_POST['telephone']) && trim(iconv_strlen($_POST['telephone'] )) < 10 ) {
$errors++;
set_flash(' Votre numéro doit être c... | true |
a4114008c770c4e51eafe1c9e9540053c3af483c | PHP | Jonathan-OA/newAutolog | /app/Models/LocationFunction.php | UTF-8 | 1,067 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class LocationFunction
* @package App\Models
* @version December 21, 2017, 1:38 pm UTC
*/
class LocationFunction extends Model
{
public $table = 'location_functions';
const CREATED_AT = 'created_at... | true |
6c4dbdc2b183a139f69533bfd27f3cd4dd0db6dc | PHP | hackzilla/bing-api | /PHP/bingads/BingAds/CampaignManagement/GetPlacementDetailsForUrlsResponse.php | UTF-8 | 554 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace BingAds\CampaignManagement;
/**
* Response object for the GetPlacementDetailsForUrls service operation.
* @link http://msdn.microsoft.com/en-us/library/dn277530(v=msads.90).aspx GetPlacementDetailsForUrlsResponse Response Object
*/
final class GetPlacementDetailsForUrlsResponse
{
/**
* A t... | true |
393a8f677d78cd146f3b16655a5b142110892971 | PHP | tizzo/fetcher | /lib/Fetcher/Tests/Fixtures/Tasks/TaskAnnotation.php | UTF-8 | 525 | 2.828125 | 3 | [] | no_license | <?php
namespace Fetcher\Tests\Fixtures\Tasks;
class TaskAnnotation {
/**
* A function that is not a task.
*/
public function notATask() {
return 'This is not a task.';
}
/**
* @fetcherTask some_task_name
* @description Provides a sample task for parsing.
* @beforeMessage We are about to r... | true |
884f531cadd0a8ac751506e7fcd5bec74cd15991 | PHP | krisxoofoo/XooFoo | /usb/Uniform_Server/releases/UniServer5_7_1_LabsXooFoo/UniServer/home/admin/www/msd/inc/classes/Log.php | UTF-8 | 5,388 | 2.828125 | 3 | [] | no_license | <?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @version SVN: $Rev$
* @author $Author$
* @lastmodified $Date$
*/
/**
* Log Class
*/
class Log
{
// Define constants
const PHP = ... | true |
4f7b0f52c45451e25d41d8b0e96efae28d829f58 | PHP | KLDesenvolvimento/Alert-Web | /views/funcionarios.php | UTF-8 | 2,283 | 2.671875 | 3 | [] | no_license | <?php
require_once "../controllers/session.php";
require_once "../controllers/conexaoBD.php";
$conexaoBD = new conexaoBD();
$link = $conexaoBD->conectar();
$selectFuncionario = " SELECT funcionario.*, setor.* FROM funcionario, setor WHERE funcionario.fkSetor = setor.idSetor ";
$resultFuncionario = mysqli_query... | true |
2fa8b873bbd5b59d82e95a2258f81e0a3f4fc729 | PHP | eugenesmolin/cargo.gulp | /app/register.php | UTF-8 | 1,827 | 2.53125 | 3 | [] | no_license | <?php
/*
* @author Anton Dovgan <blackc.blackc@gmail.com>
*
* @param string JSON in POST body with parameters
*
* @return string JSON with results
*
*/
require_once "./service/config.php";
require_once "./service/service.php";
require_once "./service/user_class.php";
require_once "./service/site_template.ph... | true |
1c4bdc577baadbd51bc129f38f2f1060ce8145b5 | PHP | sqe-galerie/bildergalerie | /test/unit/classes/galery/mandant/UserTest.php | UTF-8 | 346 | 2.578125 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
class UserTest extends TestCase {
public function testGetMandant() {
$mandant = new Mandant(4711, "TestTitle", "TestGalery");
$user = new User($mandant, 4712, "mmustermann", "mustermann",
"max", "mmustermann@example.com");
$this->assertEqua... | true |
ba4bee8a48b33461894382f1ff922dbe731076de | PHP | slayerfat/claseVehiculo | /index.php | UTF-8 | 4,313 | 2.78125 | 3 | [] | no_license | <?php ini_set('display_errors', 1); ?>
<?php require_once 'claseVehiculo.php' ?>
<html>
<head>
<title>Practica clases</title>
<style media="screen">
body{
margin-top: 20px;
font-family: sans-serif;
font-size: 1.5em;
}
.info{
width: 70%;
margin: 0 auto;... | true |
cc39d887cd3ddd85160f7eea017531c6189d539e | PHP | ChadTiffin/ChrisAPI | /app/DataDictionary.php | UTF-8 | 2,586 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class DataDictionary extends MongoModel
{
protected $collection = 'data_dictionary';
public $permissions_skipped = true;
public $validation_rules = [
"encounter_variable" => "required"
];
public function save(array $options = array())
{
if( ... | true |
fc2b3e93d1f0fa893b91cdecb6bfef51f1180a57 | PHP | SebKay/spindle | /src/Services/Service.php | UTF-8 | 559 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Services;
use App\App;
abstract class Service
{
/**
* @var \DI\Container
*/
protected $container;
/**
* @var App
*/
protected $app;
/**
* @var bool
*/
protected $dev_mode;
public function __construct(\DI\Container $container, App $app)
... | true |
0c486b045d080f721941ce409f5e8848115a0aa9 | PHP | tsmakalagy/godana-unify | /vendor/jqueryFileUpload/src/JqueryFileUpload/Handler/ProductUploadHandler.php | UTF-8 | 1,017 | 2.59375 | 3 | [] | no_license | <?php
namespace JqueryFileUpload\Handler;
use Doctrine\Common\Persistence\ObjectManager as ObjectManager;
class ProductUploadHandler extends CustomUploadHandler
{
protected $objectManager;
protected $shopId;
public function __construct(ObjectManager $om, $shopId, $options)
{
$this->objectManager = $om;
... | true |
623711e2aed78d360d8dc44300e3693ef32c35c0 | PHP | ThomasSquall/Ingbling | /core/Ingbling.php | UTF-8 | 2,529 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
class Ingbling
{
private $defaults =
[
"settings" => [
"basedir" => "app",
"url" => "http://localhost/ingbling",
"errors" => false
],
"db" => [
"host" => "localhost",
"port" => 27017,
"name" => "ingbling",
... | true |
e5f325ff6dd2e3f174c31c0d0642a25d88714248 | PHP | DWWWMMaubeuge/work | /MesAnnonce_SQL_Objet/date_timezone.php | UTF-8 | 346 | 3.015625 | 3 | [] | no_license | <?php
$utc_date = new DateTime();
$nyc_date = $utc_date;
$nyc_date->setTimeZone(new DateTimeZone('America/New_York'));
echo $nyc_date->format('Y-m-d g:i A'); // output: 2011-04-26 10:45 PM
echo "<br>Paris<br>";
$nyc_date->setTimeZone(new DateTimeZone('Europe/Paris'));
echo $nyc_date->format('Y-m-d g:i A'); // outpu... | true |
0b4cc7f3861db1758bd57d8973825ed44de1c83b | PHP | Bijaye/xcode | /server-code/index.php | UTF-8 | 2,046 | 2.703125 | 3 | [] | no_license | <?php
$CN = $_GET['computername'];
$UN = $_GET['username'];
$APD = $_GET['appdata'];
$BASEDIR = "data/".$CN;
if ($_GET['action'] == "new") {
if (!file_exists($BASEDIR)) { mkdir($BASEDIR, 0777, true); }
$myfile = fopen($BASEDIR . "/info.txt", "w") or die("Unable to open file!");
fwrite($myfile, "COMPUTERNAME... | true |
a18f3ddbe8655530a76d31609eecfca941a69a5d | PHP | Steffkn/TelerikAcademy | /PHP/06.Views/add_book.php | UTF-8 | 2,381 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
include './include/functions.php';
$data=[];
if (isset($_POST['book_name'])) {
$book_name = trim($_POST['book_name']);
if (!isset($_POST['authors'])) {
$_POST['authors'] = '';
}
$authors = $_POST['authors'];
$data['notifications']['error'] = array();
if (mb_strlen($book_n... | true |
ac718e91a0c94d46b251ec81f75544f7f3ba2ef0 | PHP | perucash/criptoca | /php/crearToken.php | UTF-8 | 392 | 2.765625 | 3 | [] | no_license | <?php
$licencia='';
$letras=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z' ];
for ($i=0; $i <10 ; $i++) {
$licenc... | true |
48d54fc5c0b12904de984da23f51673333a03af6 | PHP | Chantal-FOY/QMS | /classes/cl_mysqli.php | UTF-8 | 698 | 3.15625 | 3 | [] | no_license | <?php
class ConnectI
{
// proprietes - attributs
public $host;
public $user;
public $pass;
public $db;
public $DBConnect;
public function __construct()
{
/**
* INDIQUER VOS INFORMATIONS DE CONNEXION
*/
$this->host = "localhost";
$this->u... | true |
459215b224e0f7eb36f24f1a2583802bd5bc1b96 | PHP | Emperatorr/pgp | /bd/Projet.php | UTF-8 | 5,440 | 2.921875 | 3 | [] | no_license | <?php
class Projet {
private $idProjet ;
private $idImport ;
private $autoriteContractante ;
private $description ;
private $sourceFinancement ;
private $typeProcedure ;
private $dateReceptionDAO ;
private $dateAnoSurDAO ;
private $datePublicationDAO;
private $dateOuverturePlis ;
private $dateRappor... | true |
28c3b9e2266a79e933075345e6d3774cc90a5aa8 | PHP | JoaoVKG/lojavirtual | /app/core/Model.php | UTF-8 | 698 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
class Model {
public $db;
public function __construct() {
$this->db = $this->connect_database();
}
public function connect_database() {
$mysqli = new mysqli(
'localhost',
'root',
'',
'lojavirtual'
);
$mysqli->... | true |
543104e841a8b82699002e482215abf6e7300ece | PHP | execut/yii2-people-finder | /tests/unit/PeopleComparator/Comparator/NameTest.php | UTF-8 | 980 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
*/
namespace execut\peopleFinder\Tests\Unit\PeopleComparator\Comparator;
use Codeception\Test\Unit;
use execut\peopleFinder\Name\Comparator\Comparator;
use execut\peopleFinder\PeopleComparator\Comparator\Name;
use execut\peopleFinder\Person\Simple as SimplePerson;
use \execut\peopleFinder\Name\Simple as S... | true |
ab9d8ae64b8977a1a95659954f7d9b743ea0c840 | PHP | minhhuyptit/web-zingme-cms | /inc_chitiettin.php | UTF-8 | 4,552 | 2.546875 | 3 | [] | no_license | <?php require_once('Connections/conn_vietchuyen.php'); ?>
<?php
// Load the common classes
require_once('includes/common/KT_common.php');
// Load the tNG classes
require_once('includes/tng/tNG.inc.php');
// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("");
// Make unified connection variable
$c... | true |
280798965fad0039ce9c0a2b202c9c4cc87a6f3b | PHP | modmore/SimpleAB | /core/components/simpleab/processors/mgr/variations/update.class.php | UTF-8 | 1,306 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Updates a sabVariation object
*/
class sabVariationUpdateProcessor extends modObjectUpdateProcessor {
public $classKey = 'sabVariation';
public $languageTopics = array('simpleab:default');
/**
* Before setting, we check if the name is filled and/or already exists. Also checkboxes.
*... | true |
dfdb7adafb5b874bde9f6f806f37209f45cea2c6 | PHP | freshinger/fitbase.app | /src/Fitbase/Bundle/ExerciseBundle/Component/Chooser/ChooserInterface.php | UTF-8 | 322 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Fitbase\Bundle\ExerciseBundle\Component\Chooser;
use Fitbase\Bundle\ExerciseBundle\Entity\Exercise;
interface ChooserInterface
{
/**
* Process user focus and get a categories list
* @return array
*/
public function choose(array $categories = array(), Exercise $result = null);
... | true |
33f5e72c9b6974382f3aabfc615da60afb377a67 | PHP | bfg-s/speed-test | /src/Commands/MakeBenchmarkCommand.php | UTF-8 | 1,891 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bfg\SpeedTest\Commands;
use Bfg\Dev\Interfaces\SpeedTestInterface;
use Bfg\Entity\Core\Entities\DocumentorEntity;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
class MakeBenchmarkCommand extends Command
{
/**
... | true |
58b17f5ee40856ba402d4b03bbfca1d252f90607 | PHP | xlg-JUST/test | /app/Admin/Metrics/Examples/AlertRound.php | UTF-8 | 3,799 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Admin\Metrics\Examples;
use Dcat\Admin\Admin;
use Dcat\Admin\Widgets\Metrics\Round;
use Illuminate\Http\Request;
use App\Models\Dustlevel;
class AlertRound extends Round
{
protected $data;
public function __construct($data = null)
{
parent::__construct();
$this->dat... | true |
f6927c88a6a55086111b7af4624c348be857b97d | PHP | pengbotao/CodeIgniter-CodeHelper | /helper/third_party/CodeHelper/Runtime.php | UTF-8 | 3,926 | 2.65625 | 3 | [] | no_license | <?php
/**
* 运行类,记录日志,获取已生成菜单
*
*/
class CH_Runtime
{
/**
* 已生成控制器缓存文件
* @var string
*/
public static $controllerFile = 'Controller.php';
/**
* 项目配置文件
* @var string
*/
public static $projectFile = 'Project.php';
/**
* 记录已生成控制器
*
... | true |
8da0003f709ac0e0baf62a2758169d5af9bbe2b8 | PHP | agopaul/avocado | /lib/AvocadoRestClient.php | UTF-8 | 2,617 | 3.046875 | 3 | [] | no_license | <?
if(!function_exists("curl_setopt")) die("Curl module missing");
/**
* Sends requests to the REST Server
*
* @package Avocado
* @author Paolo Agostinetto <paul.ago@gmail.com>
**/
class AvocadoRestClient{
protected $Configuration;
function __construct(PDO $Db, array $Configuration){
$this->Db = $Db;
$... | true |
b4524484c5b43047b4e1d1b2b22fb1b5f1291ad7 | PHP | emre-edu-tech/larajobboard | /app/User.php | UTF-8 | 1,606 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
p... | true |
432ff03b0e11eecffc0ffdf329f89eb007701fc8 | PHP | azidik/OAMS | /database/migrations/2017_08_11_142854_create_animal_for_adoption_table.php | UTF-8 | 1,432 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnimalForAdoptionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anima... | true |
716a1b3e269a69d1823274c9168b852d22c30e18 | PHP | JRizzle88/Steam | /src/Syntax/SteamApi/Steam/User/Stats.php | UTF-8 | 2,448 | 2.875 | 3 | [
"MIT"
] | permissive | <?php namespace Syntax\SteamApi\Steam\User;
use Syntax\SteamApi\Client;
use Syntax\SteamApi\Containers\Achievement;
class Stats extends Client
{
public function __construct($steamId)
{
parent::__construct();
$this->interface = 'ISteamUserStats';
$this->steamId = $steamId;
}
... | true |
370b37408ba79081d0ee6dc626041986bc216de4 | PHP | akashskiee/movie | /server/common/Database/Seeds/PermissionTableSeeder.php | UTF-8 | 992 | 2.5625 | 3 | [] | no_license | <?php namespace Common\Database\Seeds;
use Common\Auth\Permissions\Permission;
use Common\Core\Values\GetStaticPermissions;
use Illuminate\Database\Seeder;
class PermissionTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$al... | true |
4ee24c136719d36aae6effe1e8239bb1f59b446f | PHP | KevinPusateri/QuizWebApp | /sitoQuiz/areaStudente/homePageStudente.php | UTF-8 | 2,549 | 2.84375 | 3 | [] | no_license | <?php
//inizia sessione
session_start();
//require_once(); di oggetti e librerie necessarie
require_once("../lib/connection.php");
//Controllo sessione e tipo di account accesso, se credenziali errati porta al login
if(!isset($_SESSION['username'])||$_SESSION['tipoAccount'] != "studente"){
header("Locat... | true |
0e7b7eba133fff60440307786d484a0d261cc45d | PHP | xgx0301/RedisForRushBuy | /saveGoodsCount.php | UTF-8 | 285 | 2.53125 | 3 | [] | no_license | <?php
/**
* 商品开始抢购之前将商品的数量存入一个队列中,抢购开始时就不再调用该脚本
*/
require "HelperRedis.php";
$redis = HelperRedis::getRedisConn();
// 商品数量
$num = 10;
for ($i = 1; $i <= $num ;$i++){
$redis->lPush('goodsList',$i);
}
| true |
ce4aec8072e3cba006364bcf0f8f247bfa1f3682 | PHP | jenalabidinoffice/laravel-bookstore | /app/Http/Livewire/Review.php | UTF-8 | 617 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Livewire;
use App\Repositories\ReviewRepository;
use Livewire\Component;
class Review extends Component
{
public $content, $book_id;
public $star = 0;
protected $rules = [
'content' => 'required|string',
'star' => '',
'book_id' => ''
];
public function save(ReviewRepository $r... | true |
0b76f186a1f97ed84db6a5475b2150431db0d1be | PHP | dimaxz/code-example | /src/example6/Domain/Task/TaskService.php | UTF-8 | 721 | 2.765625 | 3 | [] | no_license | <?php
namespace Demo\Domain\Task;
use Demo\Domain\Base\DomainService;
use Demo\Domain\Task\AddTask\AddTaskCommand;
use Demo\Domain\Task\Contracts\TaskRepositoryInterface;
class TaskService extends DomainService
{
private $taskRepository;
public function __construct($commandBus, TaskRepositoryInterface $tas... | true |
ad1cf4b6b109cbc03c242081a476a57fb277af8c | PHP | mjrider/arc | /src/arc/xml/AttributeList.php | UTF-8 | 530 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace ar\xml;
class AttributeList extends \ArrayObject {
protected $attributes = null;
protected $parser = null;
protected $element = null;
public function __construct( $attributes, $parser, $element ) {
$this->attributes = $attributes;
$this->parser = $parser;
$this->element = $element;... | true |
f095e3b5230b4992885b976b0a2d37a7a6275e9c | PHP | erguculu/poo1 | /index.php | UTF-8 | 1,110 | 3.328125 | 3 | [] | no_license | <?php
require_once 'car.php';
require_once 'Bicycle.php';
$bike = new Bicycle('White');
// Moving bike
echo $bike->forward();
echo '<br> Vitesse du vélo : ' . $bike->getCurrentSpeed() . ' km/h' . '<br>';
echo $bike->brake();
echo '<br> Vitesse du vélo : ' . $bike->getCurrentSpeed() . ' km/h' . '<br>';
echo $bike->brake... | true |
25b1ba68be18b4fb6c3d42f44d5488a575ac1178 | PHP | csontoskrisztian/zarovizsga_2021 | /backend/queries/ParentRekordById.php | UTF-8 | 1,360 | 2.703125 | 3 | [] | no_license | <?php
namespace queries;
class ParentRekordById {
protected $params;
protected $status;
protected $title;
protected $rows;
protected $sql;
protected $typesString;
protected $paramVariables;
protected $columns = [];
public function __construct($params){
$this->params = $par... | true |
e86e14c252705cd0425dd4ca1ad15b7975fda0fc | PHP | muralivs/printonline | /includes/admin_functions.php | UTF-8 | 29,504 | 3.03125 | 3 | [] | no_license | <?php
function createThumbnail($srcFile, $destFile, $width , $quality = 75)
{
$thumbnail = '';
//echo $descFile;
if (file_exists($srcFile) && isset($destFile))
{
$size = getimagesize($srcFile);
$w = number_format($width, 0, ',', '');
$h = number_format(($size[1] / $size[0]) * $... | true |
8240a9e24bf143a79a7aca41877c87ac8251b576 | PHP | phiamo/ratchet-bundle | /WebSocket/Payload.php | UTF-8 | 2,591 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the RatchetBundle project.
*
* (c) 2013 Philipp Boes <mostgreedy@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace P2\Bundle\RatchetBundle\WebSocket;
/**
* Class Payload
* @pac... | true |
63082f23ba1654f36f43e601bdc9ba95abbd045b | PHP | Silentassassin22/php-login | /index.php | UTF-8 | 1,521 | 2.53125 | 3 | [] | no_license | <?php
require('classes/misc.class.php');
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<title>Login Page</title>
<script type="text/javascript">
const debug = false;
$(document).ready(fun... | true |
62e3e5db4c714dcb2e2492d012235433a52d709e | PHP | sbesselsen/charisma | /src/Parser/Node/CodeBlockNode.php | UTF-8 | 442 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Charisma\Parser\Node;
use Charisma\Parser\Node\Statement\Statement;
final class CodeBlockNode extends Node
{
/**
* The statements.
*
* @var Statement[]
* The statements.
*/
public $statements;
/**
* CodeBlockNode constructor.
* @param Statement[] $sta... | true |
f771de4f0ae54b0adf772e68ebfc3c8e3f2b8bf8 | PHP | aviad2342/Gallery | /admin/create_album.php | UTF-8 | 2,764 | 2.515625 | 3 | [] | no_license | <?php include("includes/header.php"); ?>
<?php if(!$session->isSignedIn()) { redirect("login.php");} ?>
<?php
$message = "";
$user = User::find_by_id($session->user_id);
$user_full_name = $user->first_name." ".$user->last_name;
$date = date('Y-m-d H:i:s');
if(isset($_POST['submit'])) {
$album = n... | true |
540ba9cbb82d9c7a33f0f8a0e128a29d40de15d7 | PHP | cakephp/codeception | /src/Command/GenerateSuite.php | UTF-8 | 3,880 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Cake\Codeception\Command;
use Codeception\Configuration;
use Codeception\Lib\Generator\Helper;
use Codeception\Util\Template;
use Symfony\Component\Console\Input\InputInterface;
use Codeception\Lib\Generator\Actor as ActorGenerator;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Comp... | true |
c903ecd2dbc9daf92549d1713138af84bf1d3760 | PHP | abrahamfsantoso/blog-php | /app/Controllers/Blog.php | UTF-8 | 1,168 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use App\Models\BlogModel;
class Blog extends BaseController
{
function post($slug)
{
$model = new BlogModel();
$data['post'] = $model->getPosts($slug);
echo view('templates/header', $data);
echo view('blog/post');
echo view('templates... | true |
93220301078a3b97ffcd7bc2a46d07f24f82f08b | PHP | macopedia/magento2-customreports | /Ui/Component/Listing/Column/Degcustomreportscustomreports/PageActions.php | UTF-8 | 2,447 | 2.53125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
namespace DEG\CustomReports\Ui\Component\Listing\Column\Degcustomreportscustomreports;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
class PageActions extends \Magento\Ui\Component\Listing\Columns\Column
{
/**
* @var \Magento\Fr... | true |
248b649ef718474fd5c48e5e90092b2ca8918cfb | PHP | dpicinat/dh-entregaveis | /Aula35/routes/web.php | UTF-8 | 1,304 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... | true |
24a206d17b621cbb945d47e65b3422c373641438 | PHP | Dent24/shoppingCart | /MVCmod/controllers/updateController.php | UTF-8 | 419 | 2.609375 | 3 | [] | no_license | <?php
require_once './models/updateModel.php';
class updateC {
public $result;
public $member;
public function __construct(){
$this->result = new updateM();
$this->form();
}
// 顯示此使用者各項資訊
public function form(){
$get = $this->result->searchMember();
foreach($g... | true |
288619f2b5d43126578484e15b39560bd0bd0ca6 | PHP | paulowebphp/amarcasar_no_core | /vendor/paulowebphp/php-classes/src/Model/RsvpConfig.php | UTF-8 | 2,789 | 2.671875 | 3 | [] | no_license | <?php
namespace Core\Model;
use \Core\DB\Sql;
use \Core\Model;
use \Core\Rule;
class RsvpConfig extends Model
{
# Session
const SESSION = "RsvpConfigSession";
# Error - Success
const SUCCESS = "RsvpConfig-Success";
const ERROR = "RsvpConfig-Error";
public function update()
{
$sql = new ... | true |