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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a58a9769e32949a7dbe646e427ea821a8c3e9a6f | PHP | deljdlx/State | /class/Space.php | UTF-8 | 189 | 2.890625 | 3 | [] | no_license | <?php
namespace State;
class Space
{
protected $dimensions=array();
protected $elements=array();
public function __construct() {
}
public function getElement() {
}
}
| true |
91176180f0c09cf46d46c5a5f825956066400385 | PHP | UWO-SE1-TEAM2/BiggestLoserApp | /php/DB/Queries/userInGroupQueries.php | UTF-8 | 1,041 | 2.859375 | 3 | [] | no_license | <?php
function InsertUserIntoGroup($username, $groupName){
global $db;
try{
// $query = "INSERT INTO UserInGroup VALUES (?, ?)";
$query = "CALL InsertUserIntoGroup(?,?)";
$stmt = $db->prepare($query);
$stmt->execute([$username, $groupName]);
... | true |
b5c6a38e36d13768e23010147929abe959d064ca | PHP | MCMatters/laravel-roles | /src/Http/Middleware/AnyRole.php | UTF-8 | 483 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace McMatters\LaravelRoles\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use McMatters\LaravelRoles\Exceptions\RoleDeniedException;
use const null;
class AnyRole
{
public function handle(Request $request, Closure $next, $roles)
{
$user = $request->u... | true |
2d01e806acf655b1313833686bc53644dd10cfb4 | PHP | josephjlee/PointsMachine | /src/IComeFromTheNet/PointsMachine/DB/Builder/CalculationEventBuilder.php | UTF-8 | 2,998 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace IComeFromTheNet\PointsMachine\DB\Builder;
use IComeFromTheNet\PointsMachine\DB\CommonBuilder;
use IComeFromTheNet\PointsMachine\DB\Entity\CalculationEvent;
/**
* Builder for Calculation Transactions
*
* @author Lewis Dyer <getintouch@icomefromthenet.com>
* @since 0.0.1
*/
class Calculatio... | true |
d948b7a1120e95c24224c2d67d1facb70a3bab8e | PHP | ThomasWunderlich/php-helpers | /src/Csv.php | UTF-8 | 3,470 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | <?php
namespace duncan3dc\Helpers;
/**
* Allow csv files to be read/written easily and throw exceptions for any failures.
*/
class Csv extends \SplFileObject
{
/**
* @var string $lineEnding The character to use for line endings.
*/
public static $lineEnding = "\n";
/**
* @var string $de... | true |
a9fa64d23f24667ad2063a8dc2e7d368c66bba98 | PHP | HeHStudy/redcap5.2.3 | /redcap_v5.2.3/Classes/CalculateParser.php | UTF-8 | 11,148 | 2.984375 | 3 | [] | no_license | <?php
class CalculateParser
{
private $_results = array();
private $_equations = array();
public function feedEquation($name, $string)
{
global $longitudinal, $Proj;
//Add field to calculated field list
array_push($this->_results, $name);
//Replace operators in equation with java... | true |
cfa42fffd2ef867e772f8a1c199c66e7e49b4841 | PHP | carlosccdo/educa | /profesorModificarAlumno.php | UTF-8 | 3,695 | 2.609375 | 3 | [] | no_license | <?php
//finciona con las letras pero no con los numeros
/* DEFINICION DE LAS VARIABLES CON LOS DATOS DE CONEXION */
include './con1.php';
if (!isset($_SESSION)) {
session_start();
}
// Captura las variables que identific... | true |
06758d4744e64701919a20b8063d76e6c2a79c2c | PHP | onejames/Rosie | /src/Core/Request.php | UTF-8 | 832 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Rosie\Core;
use Rosie\Core\Interfaces\IsService;
use Rosie\Core\Traits\ServiceTrait;
use Rosie\Core\Traits\GetServiceTrait;
use Rosie\Router\Route;
class Request implements IsService
{
use ServiceTrait;
use GetServiceTrait;
private $method;
private $type;
CONST AJAX = 'ajax';
CONST PAG... | true |
a4dd40539718e06951757ca52d788159fe04264f | PHP | MajorMonge/congresso | /application/helpers/frontend_helper.php | UTF-8 | 586 | 2.859375 | 3 | [] | no_license | <?php defined('BASEPATH') OR exit('No direct script access allowed');
function mensagens(){
if(isset($_SESSION['danger']) && $_SESSION['danger'] != ''){
$html = '<div class="alert alert-danger">'.
$_SESSION['danger'].'</div>';
}if(isset($_SESSION['success']) && $_SESSION['succes... | true |
0a8811eb4e5adf3b88f31b3c74239d54a4d8825f | PHP | rahulyhg/yggdrasil-rest-example | /api/src/CreativeNotes/Infrastructure/Driver/RouterDriver.php | UTF-8 | 2,559 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace CreativeNotes\Infrastructure\Driver;
use Symfony\Component\Yaml\Yaml;
use Yggdrasil\Core\Configuration\ConfigurationInterface;
use Yggdrasil\Core\Driver\DriverInterface;
use Yggdrasil\Core\Exception\MissingConfigurationException;
use Yggdrasil\Core\Routing\Router;
use Yggdrasil\Core\Routing\RoutingCon... | true |
02df3d33a67066ec792bcd2d7c00b039fdb6d01c | PHP | wcalvert88/PHP_OOP | /static_modifier.php | UTF-8 | 340 | 3.25 | 3 | [] | no_license | <?php
class Cars {
static $wheel_count = 4;
static $door_count = 4;
static function car_detail() {
// Need static properties in static method
echo Cars::$wheel_count;
echo "<br>";
echo Cars::$door_count;
echo "<br>6";
}
}
echo Cars::$door_count;
echo Ca... | true |
e81da6e6f7e987fd8fe653fcb2cd6727034fc327 | PHP | takuya-motoshima/codeigniter-extension | /src/X/Rekognition/Client.php | UTF-8 | 11,651 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace X\Rekognition;
use \Aws\Rekognition\RekognitionClient;
use \Aws\Rekognition\Exception\RekognitionException;
use \X\Util\ImageHelper;
use \X\Util\Logger;
class Client {
private $client;
private $debug;
/**
* @param string $options[region] AWS Region to connect to.The default is "ap-... | true |
05f2851bea4dc1055df27776ecb659ef5c3e352b | PHP | aasim7861/AIDA | /webapp/amenduserform.php | UTF-8 | 1,905 | 2.78125 | 3 | [] | no_license | <?php require 'includes/header.php'; ?>
<?php require 'includes/leftnav.php'; ?>
<!-- Content -->
<div class="one-thirds column">
<div id="right" id="right">
<div class="two-thirds column">
<h2>Amend User Page : Main Content</h2>
<h3>Updating User Information</h3>
<p>On this page here you cou... | true |
c69955f8b1717157505ae6c72174888cbb964463 | PHP | shmaliy/shmaliy | /application/modules/menu/models/Mappers/Cmsmenu.php | UTF-8 | 2,135 | 2.546875 | 3 | [] | no_license | <?php
class Menu_Model_Mapper_Cmsmenu extends Sunny_DataMapper_MapperAbstract
{
public function makeNavContainer($array, $alias = null, $parent = 0, $level = 0)
{
$catsMapper = new Content_Model_Mapper_Cmscategories();
$contMapper = new Content_Model_Mapper_Cmscontent();
$_tree = array();
$level++;
... | true |
3dd7fb396d6a2b9b3cef6e642203219e07cc5f6d | PHP | rasamu/proyectoec | /src/EC/PrincipalBundle/Entity/Province.php | UTF-8 | 2,876 | 2.546875 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace EC\PrincipalBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* EC\PrincipalBundle\Entity\Province
*
* @ORM\Table(name="Provincias")
* @ORM\Entity(repositoryClass="EC\PrincipalBundle\Entity\ProvinceRepository")
*/
class Province
{
/**
* @var integer $id
*
* @ORM\Column(name="id", type="integer")
* ... | true |
9f3b20af317ffb72a44bd84968ec67263f048361 | PHP | ervikasmishra/kalpas_task | /app/Http/Controllers/ApiController.php | UTF-8 | 2,832 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Models\User;
use Validator;
class ApiController extends Controller
{
//PASSPOSRT LOGIN & REGISTRATION
//registration
public function register(Request $request)
{
$validator = V... | true |
bd6f87db1020fdc19d21ead59bbe826ae0a09a67 | PHP | indrig/friday | /src/Db/AbstractStatement.php | UTF-8 | 4,453 | 2.953125 | 3 | [] | no_license | <?php
namespace Friday\Db;
use Friday\Base\Awaitable;
use Friday\Base\BaseObject;
abstract class AbstractStatement extends BaseObject implements StatementInterface
{
/**
* @var AbstractConnection
*/
protected $_connection;
/**
* @var string
*/
protected $_sql = '';
/**
*... | true |
e89f1352eaffa9c8af981ba930472d46d0c876f5 | PHP | laravelliu/home | /app/Repositories/CardRepository.php | UTF-8 | 4,323 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by liuFangShuo.
* User: lfs
* Date: 2019-11-12
* Time: 15:07
*/
namespace App\Repositories;
use App\Models\CardResultModel;
use GuzzleHttp\Client;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Config;
use App\Interfaces\SdkInterface;
use Illuminate\Support\Facades\DB;
cl... | true |
1af7389d8c44e66550493187fa79852b3dbab18c | PHP | GabrielAraujo/fullpack-edition | /Internal/DataTypes/Origins/Separator/Encode.php | UTF-8 | 1,158 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php namespace ZN\DataTypes\Separator;
/**
* ZN PHP Web Framework
*
* "Simplicity is the ultimate sophistication." ~ Da Vinci
*
* @package ZN
* @license MIT [http://opensource.org/licenses/MIT]
* @author Ozan UYKUN [ozan@znframework.com]
*/
class Encode extends SeparatorExtends
{
//--------------------... | true |
88d3916b531629e99879b83e23157c4024eec551 | PHP | sky817424/rpc | /src/RpcClient.php | UTF-8 | 2,786 | 2.59375 | 3 | [] | no_license | <?php
/**
* rpc客户端
* Created by PhpStorm.
* User: chenzf
* Date: 2019/3/11
* Time: 上午10:05
*/
namespace Rpc;
class RpcClient {
private $host;
private $port;
private $interface;
private $version;
private $method;
private $params;
/**
* @return mixed
*/
public function ... | true |
019351e3b322f5c0967a854b32803fe5611e7193 | PHP | cclites/youshouldknow | /app/controllers/ViewController.php | UTF-8 | 2,579 | 2.890625 | 3 | [] | no_license | <?php
/*
* This class is responsible for building the initial view model when
* coming from a Twitter url. Once the model is ready, the main view
* is created.
*
* There class only contains one method.
*
*/
class ViewController extends BaseController{
function __construct() {}
fun... | true |
eada1f6504d264cfaa405b9df6d429f0883a7ee3 | PHP | glondon/old-projects | /southvirginiahomes/application/services/telekom/autoscout24/data/VehicleSearchParametersAddressCountries.php | UTF-8 | 2,667 | 2.65625 | 3 | [] | no_license | <?php
/*
* This file is part of the Telekom PHP SDK
* Copyright 2010 Deutsche Telekom AG
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.or... | true |
0b4d1fce24c8580d8f5a0593dc635deba241c90a | PHP | ariroane/GrantTracker | /StatusChange.php | UTF-8 | 3,006 | 2.875 | 3 | [] | no_license | <!--
Activate Project page
Allows updating the ProjectStatusCd in project records to
reflect changes in the status of the project (active, inactive, pending)
Features:
Select department wide projects
-->
<?php
session_start();
$department = $_SESSION['department'];
// echo "Your department is: " . $department;
?>
... | true |
f6a82d832ab0092c4a6b74bc3fd4eeba3f8f6f4d | PHP | maxson007/cqrs-symfony-messenge-example | /src/Domain/Service/Customer/CustomerService.php | UTF-8 | 1,652 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: danie
* Date: 12/12/2018
* Time: 21:56
*/
namespace App\Domain\Service\Customer;
use App\Domain\Command\Customer\DeleteCustomerCommand;
use App\Domain\Exception\Customer\CriteriaNotAllowedException;
use App\Domain\Query\Customer\GetCustomerListQuery;
use App\Do... | true |
71fbaaadd426fd7f2950281ef280d4dc970d39fa | PHP | BureauVeritasPeru/CertificacionVehiculos | /app/class/CmsContent.php | UTF-8 | 3,693 | 2.71875 | 3 | [] | no_license | <?php
require_once("base/Database.php");
class CmsContent extends Database
{
public static function getItem($contentID){
$query = "SELECT contentID, parentContentID, schemaID, contentName, position
FROM cms_content
WHERE contentID='$contentID' ";
... | true |
030a7dc088917eed1ec28e577b2ac41b9a119f6a | PHP | akanshakumari1x/SignUpApi | /index.php | UTF-8 | 1,803 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Index page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<?php
session_start();
include 'da... | true |
be874f67a3f70d1bee953af2e68c52873c3e6aac | PHP | marioalvazquez/marioalvazquez.github.io | /sender.php | UTF-8 | 1,010 | 2.6875 | 3 | [] | no_license | <?
// Configuration
$adminemail="hola@juliaolguin.com"; // your e-mail
$date=date("d.m.y"); // date format: day.month.year
$time=date("H:i"); // time format: hour.minute
$backurl="http://juliaolguin.com/index.php"; // Redirecting page after sending mail
// Input data from form
$name=$_POST['Nombre'];
$email=$_POS... | true |
299e397967014bed9ca934915b5e4c4b3c8b3028 | PHP | Romaixn/test-ewill | /src/EntityListener/ProductEntityListener.php | UTF-8 | 593 | 2.5625 | 3 | [] | no_license | <?php
namespace App\EntityListener;
use App\Entity\Product;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Symfony\Component\String\Slugger\SluggerInterface;
class ProductEntityListener
{
private $slugger;
public function __construct(SluggerInterface $slugger)
{
$this->slugger = $slugger;
}
... | true |
d45775900e5f0612fc6160b80d1a9bf426fe5dd8 | PHP | RenzoTejada/base-php-mvc | /index.php | UTF-8 | 1,211 | 2.515625 | 3 | [] | no_license | <?php
//Se incluye la configuración de conexión a datos en el
//SGBD: MariaDB.
require_once 'model/database.php';
const ENVIRONMENT = 'local';
$ENV = array(
'pro' => array(
'url' => ''
),
'local' => array(
'url' => ''
)
);
define("URL_PATH", $ENV[ENVIRONMENT]['url']);
//Para registr... | true |
afa5a39642f769c42467ccb17c7841557127eafa | PHP | yunjinwoo/apislim | /engine/lib/upload.c.php | UTF-8 | 4,690 | 2.671875 | 3 | [] | no_license | <?php
/**
* Description of upload
*
* @author Administrator
*/
function img_upload($files, $filename, $path = 'upload')
{
$Upload = new Upload('image');
$upload_path = '';
if(is_uploaded_file($_FILES[$files]['tmp_name']) )
{
$aFile = array(
'name' => $_FILES[$files]['name']
, 'type' => $_FILES[$files][... | true |
a6bbedcb6e7a4085a9edc5363d7638d68c6e1905 | PHP | dOmlnlK/MVCdemo | /framework/core/Model.class.php | UTF-8 | 985 | 2.734375 | 3 | [] | no_license | <?php
/*
* model类的基类
*/
namespace framework\core;
use framework\dao\DaoMySQLi;
class Model{
protected $dao;
public function __construct(){
$option = array(
'host'=>'localhost',
'user'=>'root',
'pwd'=>'q123456',
'dbname'=>'ask',
... | true |
935dfee01f7cbc53678b644f4166854379fe7b5b | PHP | dmytrunets/InstagramBot | /app/tests/InstagramBotTest.php | UTF-8 | 8,854 | 2.546875 | 3 | [] | no_license | <?php
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Symfony\Component\Yaml\Yaml;
/**
* Class InstagramBotTest
*/
class InstagramBotTest extends \PHPUnit\Framework\TestCase
{
private static $driver;
private s... | true |
7d36a83f846ebaa1b8ddb9482f1aeb4f65fed41e | PHP | filiplikavcan/isu | /isu/code/model/IsuEmail.php | UTF-8 | 1,152 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
class IsuEmail extends DataObject
{
public function sendEmail($recipients, $subject, $body, $from = null)
{
$mail = new PHPMailer;
$mail->AddEmbeddedImage(BASE_PATH . '/themes/isu/images/isu-email-logo.png', 'logo');
$mail->AddEmbeddedImage(BASE_PATH . '/themes/isu/images/isu-ema... | true |
1d72f979b5f0635879a9e5eee26d30d4d54dfea2 | PHP | tixture55/contactForm | /onet/Class/FacadeIntroTable.php | UTF-8 | 1,115 | 2.515625 | 3 | [] | no_license |
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<?php
require_once('ModelBase.php');
class FacadeIntroTable extends ModelBase{
protected $name;
protected $list;
protected $mem_id;
public function getList($id){
try{
$this->mem_id = $id;
... | true |
701aa9058bde306b8c479d3e60938b04e3bfb1b9 | PHP | jiang28/Gradebook-Project | /pages/main.php | UTF-8 | 2,854 | 2.515625 | 3 | [] | no_license | <p>You are currently logged in as <?php echo $USER['username']; ?>. Please choose an option below:</p>
<?php
if($USER['role'] == 'STUDENT') {
$grades = db_query('
SELECT
GD.Assignment_id AS id,
GD.when_graded AS date,
GD.score AS grade,
A.Max_Score AS out_of,
A.Type AS type
FROM
Grade_Details AS GD,
A... | true |
f1fab7a3cd4118ae78f672c3f47bc6eb5fe93e09 | PHP | FIRSTChesapeake/EventMgmt | /admin/autopoll_match_schedule.php | UTF-8 | 1,081 | 2.828125 | 3 | [] | no_license | <?php
include dirname(__DIR__) . "/header.php";
/*
random number = (int) random (-30 sec to 30 sec)
time interval = 5 * 60 sec + random number
if (last updated time && last updated time != 00 {
last updated time = the time right now
}
breakflag = false
if (NOT breakflag an... | true |
c6a7cf75f18ecf35b51d5857a63a17b38a621c2f | PHP | alamin209/w3shool | /html/jsone.php | UTF-8 | 492 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<h2>Store and retrieve data from local storage.</h2>
<p id="demo"></p>
<script>
var myObj, myJSON, text, obj;
//Storing data:
myObj = { "name":"John", "age":31, "city":"New York" };
myJSON = JSON.stringify(myObj);
localStorage.setItem("testJSON", myJSON);
//Ret... | true |
183fa0758ef91018de43455f7ba700aca8456b11 | PHP | mib03/goodiebag-press | /application/controllers/Auth.php | UTF-8 | 2,152 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') or exit('No direct script access allowed');
ini_set('max_execution_time', 0);
ini_set('memory_limit', '-1');
class Auth extends CI_Controller
{
public function index()
{
if ($this->session->userdata('username')) {
if ($this->session->userdata('role') == "Admin") {
redirect('admin'... | true |
fbde503f5a2293f31f9e5813162469b9162f8157 | PHP | fhferreira/machinelearning | /src/Utility/Entity/Calculate.php | UTF-8 | 2,031 | 3.53125 | 4 | [
"Apache-2.0"
] | permissive | <?php
namespace MachineLearning\Utility\Entity;
/**
* Calculate, contains several calculations with arrays.
*
* @author Willem Bressers <info@willembressers.nl>
*/
class Calculate
{
/**
* Get the default statistics of an array.
*
* @param array $array
*
* @return array of default stat... | true |
1ca85ebeb60584d5f22e174315710a4227c454cd | PHP | milkcreation/presstify-bridge | /src/Contracts/Metabox/MetaboxScreen.php | UTF-8 | 1,344 | 2.671875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace tiFy\Contracts\Metabox;
use tiFy\Contracts\Support\ParamsBag;
interface MetaboxScreen extends ParamsBag
{
/**
* Récupération de la liste des boîtes de saisie associées à l'écran.
*
* @return MetaboxDriver[]|array
*/
public function getMetaboxes(): ... | true |
fa31ecbb5bbdf06e29f725b0225d470fe966830f | PHP | alexgrofer/cms-object-plus | /models/catalog/CatalogCategory.php | UTF-8 | 930 | 2.625 | 3 | [] | no_license | <?php
class CatalogCategory extends AbsBaseModel
{
public $name; //Телевизоры
public $desc; //Телевизоры и плазменные панели
public $parent_id;
public function tableName()
{
return 'cmsplus_catalog_category';
}
public function relations()
{
return array(
'options'=>array(self::MANY_MANY, 'catalogOption... | true |
b6251c8d75c2f7ba9d6042e2ac68014a9e31cc88 | PHP | vonbraunlabs/slimx | /SlimX/Exceptions/ErrorCodeNotFoundException.php | UTF-8 | 260 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace SlimX\Exceptions;
use SlimX\Models\Error;
class ErrorCodeNotFoundException extends \Exception
{
public function __construct(int $code)
{
parent::__construct();
$this->message = "Code $code is not registered";
}
}
| true |
a2f1bbc501030c34d3afec6df45f5f06e5618b3d | PHP | TheJadeEmperor/SaintlyNewsletters | /include/ajaxSubs.php | UTF-8 | 1,580 | 2.5625 | 3 | [] | no_license | <?php
$dir = '../';
include($dir.'include/mysql.php');
include($dir.'include/config.php');
$id = $_REQUEST['id'];
foreach($_REQUEST as $request => $value) {
$_REQUEST[$request] = mysql_real_escape_string($value);
}
switch($_GET['action']) {
case 'update':
$update = "UPDATE $subscribersTable SET
e... | true |
7105619eb669289d58bc5a83fc72d2da99f26bca | PHP | RubanDeventhiran/fast-sheet | /exporttoexcel.php | UTF-8 | 1,304 | 2.71875 | 3 | [] | no_license | <?php
function runQuery($query,$filename, $dsn = "VerticaDSNunixodbc", $username = "dbadmin", $password = "r-d1b97dbc"){
$conn = odbc_connect($dsn,$username,$password) or die ("<br/>CONNECTION ERROR");
if(!$rs = odbc_exec($conn,$query)) {
echo "<br/>Failed to execute SQL: $sql<br/>" . odbc_errorms... | true |
a46ecc75b8ffdee6fee7884135091aeddf8efb2e | PHP | pauldutoit/heritageV2 | /web/app/themes/montheme/customizer/theme_customizer.php | UTF-8 | 55,999 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/*
Theme Customiser Functionality
Contains methods for customizing the theme customization screen.
*/
class HERITAGE_Customize {
//This hooks into 'customize_register'
public static function register($wp_customize)
{
require_once(get_template_directory()."/customizer/alpha-color-picker-cus... | true |
f6da7c404a4ba4dbcb0bd3074190cf588b7e0bf2 | PHP | microsimulation/ijm | /journal/src/Patterns/ViewModel/Box.php | UTF-8 | 1,057 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Microsimulation\Journal\Patterns\ViewModel;
use Assert\Assertion;
use Microsimulation\Journal\Patterns\ArrayAccessFromProperties;
use Microsimulation\Journal\Patterns\ArrayFromProperties;
use Microsimulation\Journal\Patterns\ViewModel;
final class Box implements ViewModel
{
use ArrayAccessFromPro... | true |
4b6b46225f83681c709ec6e862e4d51abcb7133f | PHP | Esperozzz/tasks_for_beginner | /lesson7/task5.php | UTF-8 | 108 | 2.59375 | 3 | [] | no_license | <?php
include_once '../header.php';
$str = 'london is the capital of great britain';
echo ucwords($str);
| true |
701176608eed15996baec7ec2ccae51481a2e09c | PHP | HPFFA/Nabu | /lib/acp/page/WarningListPage.class.php | UTF-8 | 1,677 | 2.5625 | 3 | [] | no_license | <?php
// sls imports
require_once(SLS_DIR.'lib/data/warning/Warning.class.php');
// wcf imports
require_once(WCF_DIR.'lib/page/AbstractPage.class.php');
/**
* Shows a list of all warnings.
*
* @author Jana Pape
* @copyright 2010
* @package de.hpffa.sls
* @subpackage acp.page
* @category Story Library System... | true |
b053438c9db4fb31ea4e821c0d2cddb3ac781b64 | PHP | Hacca13/gym_management | /Web/gym-management/app/Http/Models/UserModels/UserModel.php | UTF-8 | 8,381 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Models\UserModels;
use Illuminate\Support\Arr;
/**
*
*/
class UserModel
{
protected $idDatabase;
protected $name;
protected $surname;
protected $gender ;
protected $status;
protected $isAdult;
protected $dateOfBirth;
protected $birthNation;
protected $birthPlace;
protect... | true |
eaf61d25a59ec438fe35fcfd8db6f4bfe9505202 | PHP | hamburgscleanest/guzzle-advanced-throttle | /src/Helpers/UrlHelper.php | UTF-8 | 319 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace hamburgscleanest\GuzzleAdvancedThrottle\Helpers;
class UrlHelper
{
public static function removeTrailingSlash(string $path): string
{
return \rtrim($path, '/');
}
public static function prependSlash(string $path): string
{
return '/' . \ltrim($path, '/');
}
}
| true |
f76bc9c728790c911ab004dd2db62803170d7a9d | PHP | hasina1990/couponlay | /application/modules/admin/models/Admin/Status.php | UTF-8 | 628 | 2.671875 | 3 | [] | no_license | <?php
class Admin_Model_Admin_Status
{
const ENABLED_YES = 1;
const ENABLED_NO = 2;
const ENABLED_YES_TEXT = 'Yes';
const ENABLED_NO_TEXT = 'No';
/**
* Get Is Enabled Options Function. This function is used to get options for admin is Enabled or not.
... | true |
f1de3aa6a246966a04d4874ea6cb77411418b372 | PHP | AlaaHamoudah/PHP-thrift-client | /controller/client_ctrl.php | UTF-8 | 1,392 | 2.640625 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
error_reporting(E_ALL);
//load required classes
require_once __DIR__ . '/../lib/Thrift/ClassLoader/ThriftClassLoader.php';
requ... | true |
197a9f8c08a404af665b0c36d4283477dadae19f | PHP | MauquieLouis/BTS-projet | /src/Entity/Event.php | UTF-8 | 3,120 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\EventRepository")
*/
class Event
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
... | true |
62ce0096d91a7482b72fec37891a853804d7bd2f | PHP | phungmobile2/Telegram-Bot | /app/Reply.php | UTF-8 | 859 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
class Reply extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'replies';
/**
* The attributes that are mass assignable.
*
* @var array
*... | true |
ddff9522e21a9a5f805cb6af367e2ee31b65cf0c | PHP | myhre/publix | /displaybrukerside.php | ISO-8859-15 | 629 | 2.546875 | 3 | [] | no_license | <?php
session_start();
require_once 'config.inc';
if(isset($_POST['sidenavn'])){
$sidenavn = $_POST['sidenavn'];
$sql = "SELECT * FROM sider WHERE side = '$sidenavn'";
$result = mysql_query($sql);
$sql2 = "SELECT * FROM elementer WHERE side ='$sidenavn'";
$result = mysql_query($sql2);
if(mysql_num_rows... | true |
8b1706f03f4a17b1c0dfcc94824cd5300e0b7fc9 | PHP | hoodmadhur/unity-web-service | /php/demo/db.php | UTF-8 | 744 | 2.703125 | 3 | [] | no_license | <?php
// this will avoid mysql_connect() deprecation error.
error_reporting( ~E_DEPRECATED & ~E_NOTICE );
// but I strongly suggest you to use PDO or MySQLi.
define('DBHOST', 'localhost');
define('DBUSER', 'root');
define('DBPASS', '');
define('DBNAME', 'mysql');
$conn = mysqli_connect(DBHOST,DBUSER,DBPASS,... | true |
47b08aa24fa568d5c7713b410fedcf84160a0220 | PHP | chikchirikkk/laba5 | /lab-50-3.php | UTF-8 | 1,916 | 2.65625 | 3 | [] | no_license | <html>
<head
<title> Редактирование данных о вкладе</title>
</head>
<body>
<?php
$connect = mysqli_connect("localhost", "f0475678_bank", "root", "f0475678_bank")or die("Невозможно подключиться к серверу");
mysqli_query($connect, "SET NAMES utf8");
$rows=mysqli_query($connect, "SELECT data_create, Naz_prog, ... | true |
ff2978b2091786395fdb4e36643f1d381ab83ae1 | PHP | Weerly/custom-php-framework | /public_html/Core/DBWrapper.php | UTF-8 | 458 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Weerly
* Date: 04.05.2018
* Time: 0:11
*/
namespace Core;
class DBWrapper
{
protected $file_db;
public function __construct($db_name)
{
$this->file_db = new \SQLite3('databases/testAppDB.sqlite3', SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);
}
... | true |
7ec5dcd41371877dd14e7ee2cf0a843634260cce | PHP | aspu2015/UniversituTranslation | /app/Http/Controllers/DictionaryController.php | UTF-8 | 1,942 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use App\Dictionary;
use DB;
class DictionaryController extends Controller
{
public function __construct() //// Проверка авторизации ////
{
$this->middleware('auth');
}
public function ind... | true |
e0ab3c75b930ddc4b0d56880f94b72ffef647009 | PHP | ddebin/mc-google-visualization | /lib/MC/Parser/Def/Set.php | UTF-8 | 1,040 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace MC\Parser\Def;
use MC\Parser\Def;
/**
* Verify that the string matches a series of subexpressions in the specified order.
*/
class Set extends Def
{
/** @var Def[] */
public $exprs = [];
/**
* @param Def[] $exprs
*/
public function __construct(... | true |
e718924a378c4d0a8b489bb1d631e07129599b1d | PHP | ramsey/str-begins-ends | /tests/Functions/StrIbeginsTest.php | UTF-8 | 2,396 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Ramsey\String\Test\Functions;
use PHPUnit_Framework_Error;
use Ramsey\String\Test\TestCase;
class StrIbeginsTest extends TestCase
{
/**
* @expectedException PHPUnit_Framework_Error
* @expectedExceptionMessage str_ibegins() expects parameter 1 to be string, object given
*/
publi... | true |
33fd5642da87f71af61e6248b99729148c692957 | PHP | joseliosamy/studying | /modulo5/aula10/index.php | UTF-8 | 180 | 3.1875 | 3 | [] | no_license | <?php
$var1 = 10;
$var2 = '10';
if($var1 == $var2){
echo 'easy';
}
if($var1 === $var2){
echo 'hard';
}else{
echo ' vish';
}
?> | true |
fba5e948e3e1d7319d1cf3ef979183ae62ad4588 | PHP | Vinicius98/ProjetoPhp | /php/consulaltproduto.php | UTF-8 | 1,138 | 2.640625 | 3 | [] | no_license | <?php
include_once "conexao.php";
$codproduto = $_POST["codproduto"];
$query = $mysqli->query("select*from tbproduto where codproduto='$codproduto'");
if (!$tbproduto = $query->fetch_assoc()) {
echo "Nao possui esses dados";
$codproduto = "";
$nome = "";
$quant = "";
$preco = "";
}else{
$codprod... | true |
e02ce473457f4b667d848ed12f69031eac8806b4 | PHP | yanto-sugiyanto/tugas2.1_php | /tugas2_1.php | UTF-8 | 248 | 2.78125 | 3 | [] | no_license | <?php
$waktu1 = 36;
$kerja1 = 12;
$kerja2 = 24;
$waktu2 = ($kerja1/$kerja2)*$waktu1;
echo "$waktu1 waktu =$kerja1 pekerja X Hari = $kerja2 pekerja <br>";
echo "X =....?<br>";
echo "Jawaban=$kerja1/$kerja2 x $waktu1 = $waktu2 hari";
?> | true |
f2df391e480507eff88c26db23b6a814a039399b | PHP | ohjack/newErp | /msg.valsun.cn/model/ebayCsMailManage.model.php | UTF-8 | 2,670 | 2.53125 | 3 | [] | no_license | <?php
/*
* ebay 收货邮件推送处理
*/
class EbayCsMailManageModel {
public static $errCode = 0;
public static $errMsg = '';
private $dbConn = NULL;
/*
* 构造函数
*/
public function __construct(){
global $dbConn;
$this->dbConn = $dbConn;
}
/*
* 判断是否需要... | true |
ba0c9f0f2c0d5888fa8f25d802c824ca64ade41b | PHP | kuksir/work | /assets/update.php | UTF-8 | 968 | 2.78125 | 3 | [] | no_license | <?
$id = $_POST['id']; //принимаем переменные из ajax запроса
$genre = $_POST['genre'];
$autor = $_POST['autor'];
$name = $_POST['name'];
$year = $_POST['year'];
if (isset($genre) && isset($autor) && isset($name) && isset($year)) { //если переменные существуют...
if (!empty($genre) && !empty($autor) && !empty($... | true |
f0c771b697d1eb7dab0da70c5a8bd05730ac0e5a | PHP | poojakarthik/PE-Intranet | /cron/update.php | UTF-8 | 2,771 | 2.515625 | 3 | [] | no_license | <?php
$mysqli = new mysqli('localhost','pen','18450be');
exec("touch /var/www/maintenance.php");
define('SALT', 'IISp3dwbJu4UuMxWJWSfLrzR');
function encrypt($text)
{
return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256,... | true |
80502838ac4ae4667fcb82c0eac588c6ce25e088 | PHP | Pouillaude-Joan/Projets | /ProjetAdoption/models/CarnetDeSanter.php | UTF-8 | 1,256 | 3.34375 | 3 | [] | no_license | <?php
class CarnetDeSante
{
private ?int $id;
private ?Vaccin $vaccin;
private ?Animal $animal;
public function __construct(
?int $id = null,
?Vaccin $vaccin = null,
?Animal $animal = null)
{
$this->id = $id;
$this->Vaccin = $vaccin;
$this->Animal = $animal;
... | true |
32ccf715623c9dd3a0f4522a14e1fdfe5c50ff9e | PHP | cha63506/mediawiki-svn | /extensions/GlobalUserrights/GlobalUserrights_body.php | UTF-8 | 3,538 | 2.671875 | 3 | [] | no_license | <?php
/**
* Special:Userrights for global groups
*
* @file
* @ingroup Extensions
*/
if ( !defined( 'MEDIAWIKI' ) ) die();
class GlobalUserrights extends UserrightsPage {
/* Constructor */
public function __construct() {
parent::__construct( 'GlobalUserrights' );
}
/**
* Save global user groups changes... | true |
f1e64b9499061853e8f03f495a0909eef8355895 | PHP | bizzhou/fb-clone | /src/submit_profile_photo.php | UTF-8 | 1,617 | 2.515625 | 3 | [] | no_license | <?php
require_once("../include/functions.php");
session_start();
$user = $_SESSION['user'];
$info = $_SESSION['user_info'];
$pdo = connect();
// save images to local filesystem
if(isset($_FILES['profile_image'])){
$errors= array();
// $file_name = $_FILES['profile_image']['name'];
$file_size = $_FILES['pr... | true |
70e8f336ddff7d2d83ed0a39ba76e72e5042abc9 | PHP | arieh/BlogSource | /includes/lib/TFUser.class.php | UTF-8 | 2,772 | 2.9375 | 3 | [] | no_license | <?php
/**
* this class handles the basic user operations for this library.
*/
class TFUser{
/**
* @param int default user id
* @constant
*/
const DEF_ID = 1;
/**
* @param TFUser a sigelton for the user
* @access private
* @static
*/
static private $_instance = null;
/**
* @para... | true |
5fa6cc7d50f38693c78d4581797dcad80159b85f | PHP | alejoluc/Via | /src/Route.php | UTF-8 | 1,610 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace alejoluc\Via;
class Route
{
public $route_id;
public $method;
public $pattern;
public $destination;
public $is_dynamic;
public $constraints = [];
public $filters = [];
public $filters_err = [];
public function where($paramName, $regex) {
$this->constr... | true |
9f4a7ba3fe5f5012b70a02d0f5060fa50314fa63 | PHP | pusty44/SA-MP-Trucking-firm-website | /src/Entity/Page.php | UTF-8 | 1,718 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Dawid Pierzak
* Date: 07.01.2019
* Time: 17:33
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="hw_page")
* @ORM\Entity()
*/
class Page
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="inte... | true |
49d6127642ebb1d8b5e749b3b0224fba2fff96bf | PHP | xtrime-ru/TelegramRSS | /app/Server/ErrorResponse.php | UTF-8 | 1,055 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace TelegramRSS\Server;
use Amp\Http\HttpStatus;
use Amp\Http\Server\ErrorHandler;
use Amp\Http\Server\Request;
use Amp\Http\Server\Response;
class ErrorResponse implements ErrorHandler
{
public function handleError(int $status, ?string $reason = null, ?Request $request = null): Response
{
... | true |
317c2b067b2e27119326cad77f4e6a973a35e790 | PHP | avto-dev/data-migrations-laravel | /tests/Sources/FilesTest.php | UTF-8 | 7,353 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace AvtoDev\DataMigrationsLaravel\Tests\Sources;
use Carbon\Carbon;
use InvalidArgumentException;
use Illuminate\Filesystem\Filesystem;
use AvtoDev\DataMigrationsLaravel\Sources\Files;
use AvtoDev\DataMigrationsLaravel\Tests\AbstractTestCase;
use AvtoDev\DataMigrationsLaravel\Contracts\SourceContract;
/*... | true |
54983010d26a9cb8b470e5eca2eec8b72e849d40 | PHP | siddiquimeraj/php-notification | /src/NFLib/Notification/Project.php | UTF-8 | 927 | 2.734375 | 3 | [] | no_license | <?php
namespace NFLib\Notification;
use NFLib\Authentication\Authenticate;
use NFLib\Authentication\Request;
use NFLib\Notification\NotifyException;
class Project {
/**
* Get List of all projects by the client
*/
public static function projectList() {
if(!Authenticate::isAuthorized()) {
throw new No... | true |
d0c0f1a0f8e5746971590270dd9bac3f945d32c7 | PHP | rpolhemus/rpolhemus.github.io | /unit4ps1/unit4ps1_3.php | UTF-8 | 517 | 2.84375 | 3 | [] | no_license | <?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Problem 3</title>
</head>
<body>
<h1>Problem 3</h1>
<?php
$hours = array("Monday"=>"9am-4pm", "Tuesday"=>"closed", "Wednesday"=>"9am-4pm", "Thursday"=>"9am-4pm", "Friday"=>"9am-4pm", "Saturd... | true |
cad647bb1cd9a3588bb707662fb1839cb518148b | PHP | lalita009/project | /php3.php | UTF-8 | 819 | 3.828125 | 4 | [] | no_license |
<?php
abstract class Fruit{
public $name;
function __construct($name){
$this->name=$name;
}
abstract public function intro() :string;
}
class Veg extends Fruit {
public function intro() : string {
return "Choose German quality! I'm an $this->name!";
}
}
class Name extends Fruit{
public func... | true |
cab5d591bd5852917e8b5dfd3f9d837bc8add343 | PHP | jdubreville/dnsimple_api_client_php | /src/jdubreville/dnsimple/DomainEmailForwards.php | UTF-8 | 1,866 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace jdubreville\dnsimple;
class DomainEmailForwards extends SubClientAbstract
{
const OBJ_NAME = 'emailForwards';
/**
* Get the ID Field of the object.
*
* @return string
*/
protected function getIdField()
{
return self::OBJ_NAME;
}
/**
* Get the ... | true |
0c473b57cbf6a2ec9d20188e9f2570194157261a | PHP | Marielle2019/Trabalho-final-3-bimestre | /suasnotas.php | UTF-8 | 1,220 | 2.5625 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['id_usuario']))
{
header("location:index.php");
exit;
}
include("CLASSES/conexão.php");
$uso = $_SESSION['id_usuario'];
$consulta = "SELECT * FROM anota_notas WHERE usuarios_id_usuario = $uso";
$conn = $con->query($consulta) or die($con->erro... | true |
06c43fa7404b75802c8ee121b2c56ba5ab1e5a8a | PHP | rickyMelida/tareas-electrica-app | /models/tasks/PendingTask.php | UTF-8 | 1,467 | 2.828125 | 3 | [] | no_license | <?php
require_once 'Task.php';
class PendingTask extends Task{
private $turn_pending;
public function __construct($type_of_task, $description, $responsable, $status, $turn_pending) {
parent::__construct($type_of_task, $description, $responsable, $status);
$this... | true |
1f9e127e2195f165835f47cc459ce2a5c6bb3a9f | PHP | do6po/evercodelab-php-test-assignment | /app/http/controllers/api/products/ProductController.php | UTF-8 | 927 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Boiko Sergii
* Date: 27.01.2019
* Time: 19:26
*/
namespace app\http\controllers\api\products;
use app\http\controllers\Controller;
use app\repositories\products\ProductRepository;
use app\services\products\ProductService;
class ProductController extends Controller
{
... | true |
6c586f798130bd155c66b8e4de4332085e1d3d7f | PHP | sandidgec/foodinventory | /public_html/backend/test/alert-level-test.php | UTF-8 | 12,462 | 2.859375 | 3 | [] | no_license | <?php
// grab the project test parameters
require_once("inventorytext.php");
// grab the class under scrutiny
require_once(dirname(__DIR__) . "/php/classes/autoload.php");
/**
* Full PHPUnit test for the alert level class
*
* This is a complete PHPUnit test of the Alert Level class. It is complete because *ALL... | true |
eb5261fe6cb3df124412fb95d9d1802d1f5e2519 | PHP | ghostcodelover/ApiBundle | /Form/Factory/ApiFormFactoryInterface.php | UTF-8 | 599 | 2.59375 | 3 | [] | no_license | <?php
namespace ZND\SIM\ApiBundle\Form\Factory;
/**
* api form creator
*
* @author Mukendi Emmanuel <mukendiemmanuel15@gmail.com>
*/
interface ApiFormFactoryInterface
{
/**
* @param $type
* @param null $form
* @param array $options
*
* @return \Symfony\Component\Form\FormInterfa... | true |
89227f08171a1f6ba20686aa98e8ebc19007234a | PHP | AdaFromWonderland/myWeather1.1 | /index.php | UTF-8 | 4,297 | 2.59375 | 3 | [] | no_license | <?php
// include_once "config.php";
include_once "functions.php";
$new=htmlspecialchars($_GET['city']);
// $email = htmlspecialchars($_POST['exampleInputEmail1']);
//if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
// $def1="E-mail адрес '$email' указан верно.\n";
//} else {
// $def1= "E-mail адрес... | true |
3db0f010ed0f7bc6c518efe918fd87a2f69cddc6 | PHP | newscloud/ocean | /app/protected/modules/yiiauth/YiiauthModule.php | UTF-8 | 1,450 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class YiiauthModule extends CWebModule
{
private $_assetsUrl;
public $userClass;
public $config;
public function init()
{
// this method is called when the module is being created
// you may place code here to customize the module or the application
// import the module-level models and components
... | true |
ff1d9552b464d770c05d41513e124ddc59d8bdff | PHP | jbduzan/Easylia | /application/models/ReponsesMapper.php | UTF-8 | 6,370 | 2.625 | 3 | [] | no_license | <?php
class Application_Model_ReponsesMapper
{
protected $_dbTable;
public function setDbTable($dbTable){
if(is_string($dbTable)){
$dbTable = new $dbTable();
}
if(!$dbTable instanceof Zend_Db_Table_Abstract){
throw new Exception('Invalid table data gateway provided'... | true |
8a870b94ffc18b945e2e6cedf7ce32bfb9c8477f | PHP | slovn1k/qiwi_database_clone | /access_functionality/balance.php | UTF-8 | 414 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
require "../db.php";
$final_suma = 0.00;
if($_POST['user'] === "admin") {
$suma2 = "SELECT sum(client_achitat.suma) as suma_achitat FROM client_achitat";
$suma2_result = $connection->query($suma2);
$suma2_row = $suma2_result->fetch_assoc();
$final_suma += $suma2_row['... | true |
b78ac8c999fbc98f7f1dc5c666e0260ec013d2b2 | PHP | mcabreradev/laravel-vue-example | /database/migrations/2016_09_01_160000_create_new_schemas.php | UTF-8 | 704 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateNewSchemas extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::getConnection()->statement('CREATE SCHEMA IF NOT EXISTS turnos')... | true |
a31ba55013630525af99aacadd15d4c693e01e26 | PHP | AichiKouki/laravelapp_study | /laravelapp/app/Http/Controllers/Use_template_Controller.php | UTF-8 | 1,658 | 2.8125 | 3 | [] | no_license | <?php
//テンプレートを使ってみるコントローラ
namespace App\Http\Controllers;
use Illuminate\Http\Request;//デフォルトで用意されていた
class Use_template_Controller extends Controller
{
//コントローラでテンプレートを使ってみる
public function index($id='zero'){//引数を用意して初期化
//viewの第二引数でテンプレートに値を渡す
$data=[
'msg'=>'これはコントローラから渡されたメッセージです',
'msg2'... | true |
141b7f721a8c6a4c4d5d066d7effcff1b1c7dcda | PHP | JulianCalderon/applog | /api/controllers/UserController.php | UTF-8 | 2,143 | 2.796875 | 3 | [] | no_license | <?php
class UserController extends Controller{
public function collection(){
$users = User::all();
$response = [
"data" => $users
];
return $response;
}
public function store($user){
try{
validate(Use... | true |
13607edf2bb73d7a54f302e4b73b56bfc8f6a7fe | PHP | alexglovach/hillel_school | /lesson5/Team.php | UTF-8 | 1,633 | 3.328125 | 3 | [] | no_license | <?php
require_once('Soldier.php');
require_once('Commander.php');
class Team
{
protected const MAX_TEAM_MEMBERS = 100;
protected $teamMembers;
public function __construct($teamSize)
{
$this->generateTeam($teamSize);
}
protected function generateTeam($teamSize)
{
... | true |
20c105ae29c33b612c307fe1144c0fce56554f11 | PHP | juancarlosDH/php-2019-2 | /tarde/Banco/banco.php | UTF-8 | 741 | 2.546875 | 3 | [] | no_license | <?php
require_once('clases/autoload.php');
$cuenta = new Classic('1234574345654');
$person = new Persona('tato', 'alguien', 1234567890, '2000-10-11', 'tato@tato.com', '12345', $cuenta);
$cuenta = new Gold('12323423423');
$pyme = new Pyme('Mi Pyme', '20-12345678-0', 'pyme@pyme.com', '1234567890', $cuenta);
$pyme->get... | true |
8a89dd51829cd8b71a37ea11bc67baf9b0ac1e08 | PHP | onurdegerli/SimpleMVC | /app/core/Databases/RepositoryFactory.php | UTF-8 | 286 | 2.65625 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Core\Databases;
/**
* Class RepositoryFactory
* @package Core\Databases
*/
class RepositoryFactory
{
public static function get(Database $databaseConnection): Repository
{
return $databaseConnection->getRepository();
}
} | true |
13992018a8a0cbc063bebb7697e537e366b933ed | PHP | Mactronique/edf-telereleve | /src/Compteur/CompteurCBEMM.php | UTF-8 | 2,504 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Mactronique EDF TeleReleve package.
*
* @author Jean-Baptiste Nahan <jbnahan@gmail.com>
* @copyright 2016 - Jean-Baptiste Nahan
* @license MIT
*/
namespace Mactronique\TeleReleve\Compteur;
class CompteurCBEMM implements CompteurInterface
{
private $dev;
/**
* @para... | true |
443de46eeec15ef7fc1e118d3b92e152b9b25ea1 | PHP | lvinkim/elasticsearch-odm | /tests/App/Entity/User.php | UTF-8 | 2,513 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: lvinkim
* Date: 14/07/2018
* Time: 8:56 PM
*/
namespace Tests\App\Entity;
use Lvinkim\ElasticSearchODM\Annotations as ODM;
use Tests\App\Entity\Embed\Company;
use Tests\App\Entity\Embed\Member;
/**
* Class User
* @package Tests\App\Entity
* @ODM\Entity()
*/
class Use... | true |
86f904df7e31f8d91798ffd8578ffe79d7e38f91 | PHP | stg7/miwa | /glo.php | UTF-8 | 1,301 | 2.75 | 3 | [] | no_license | <?php
define("API_KEY", "KEY");
function get_user_ip() {
/* based on https://www.whatismyip.com/questions/how-do-i-find-my-real-ip-address-in-php-getting-servers-ip-rather-than-visitors-ip/ */
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REM... | true |
a6b4a75c1d8bc9ad457b61b4b8c5ca67c12f7b46 | PHP | cheik-siramakan-keita/ppe2 | /src/Entity/Document.php | UTF-8 | 1,612 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\DocumentRepository")
*/
class Document
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\... | true |
afe8ebf3c12bc387015b96930eb8443a34409a3e | PHP | bagus211/link | /src/Flagship/Util/ArrayConversions.php | UTF-8 | 2,026 | 2.828125 | 3 | [] | no_license | <?php
namespace Flagship\Util;
function from_camel_case($input) {
preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches);
$ret = $matches[0];
foreach ($ret as &$match) {
$match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match);
}
ret... | true |
ba0575ec0d9dfb58ee7c59f7784ebcbe14b675b1 | PHP | SergioHerreroSanz/dam2d17 | /Acceso_a_Datos/01_PHP/01_Introducción/Ejercicio05/Ejercicio05.php | UTF-8 | 575 | 4 | 4 | [] | no_license | <!--
Escribe un script en el que una misma variable tome dos valores distintos sin utilizar ninguna función. Luego añade al script una función que presente ese mismo nombre de variable con un valor distinto de los anteriores, comprobando que esta última opción no modificó el último valor de aquellos
-->
<html>
<head>... | true |