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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3d49e22b122c52e511ce7aa70dadd42e7a853d88 | PHP | Bakusedu/idsims | /app/Http/Controllers/CustomerController.php | UTF-8 | 4,530 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use App\Drug;
use App\Purchase;
use Validator;
class CustomerController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
// customer priviledges in users ... | true |
faae2970bdc9f8a2600a5ed891edf4c8ad69f748 | PHP | Alexbeis/TFM_RedSocialMusical | /src/myDomain/UseCases/Spotify/SpotifyCacheUseCase.php | UTF-8 | 832 | 2.90625 | 3 | [] | no_license | <?php
namespace myDomain\UseCases\Spotify;
use Predis\Client;
class SpotifyCacheUseCase
{
/**
* @var SpotifyUseCase $spotifyUseCase
*/
private $spotifyUseCase;
/**
* @var Client
*/
private $client;
public function __construct(SpotifyUseCase $spotifyUseCase, Client $client)
... | true |
d0cddca97ed07bbbefaec2197e2519016ecf3015 | PHP | DGTVE-VE/Reportes-M-xico-X | /model/dao/DjangoOpenidAuthAssociationDAO.class.php | UTF-8 | 1,544 | 2.703125 | 3 | [] | no_license | <?php
/**
* Intreface DAO
*
* @author: http://phpdao.com
* @date: 2015-09-03 19:45
*/
interface DjangoOpenidAuthAssociationDAO{
/**
* Get Domain object by primry key
*
* @param String $id primary key
* @Return DjangoOpenidAuthAssociation
*/
public function load($id);
/**
* Get all records from ta... | true |
9f441fe20e4313c5155415edc6a9e24d65da45fc | PHP | NastyaKos/pract | /pract1.php | UTF-8 | 547 | 3.65625 | 4 | [] | no_license | <?php
header('Content-type: text/plain');
function binarySearch(Array $arr, $x)
{
if (count($arr) === 0) return false;
$low = 0;
$high = count($arr) - 1;
while ($low <= $high) {
$mid = floor(($low + $high) / 2);
if($arr[$mid] == $x) {
return $mid;
}
if ($x <... | true |
4a3d3537bec1e07913c5d780ca7386e85245dc36 | PHP | MonkeyStitch/ASM | /process/ProcessPositionSelect.class.php | UTF-8 | 3,653 | 2.859375 | 3 | [] | no_license | <?php
class ProcessPositionSelect
{
private $r;
private $c;
private $dm;
private $block;
public function __construct($positionMinZero = null, DemandAndSupply $demandAndSupply = null, BlockRCClass $blockRCClass = null)
{
if ($positionMinZero !== null) {
$this->setPositionMi... | true |
948c42e9bb9b80524683628e1cc628c89b7a4e4e | PHP | liorchamla/formations | /php/04-poo/08-operations.php | UTF-8 | 2,134 | 3.96875 | 4 | [] | no_license | <?php
/**
* Etudions plus en détail les méthodes (comportements ou opérations des objets)
*/
class Personne {
/**
* Tous les attributs de l'objet sont privés, intouchables de l'exterieur
*/
private $prenom;
private $nom;
private $age;
/**
* On créé un accesseur pour modifier le nom
*/
public ... | true |
238a42f7161eea1dba061cdf39f92432d95983cf | PHP | alexz202/screenwordsapi | /lib/base/StringTools.class.php | UTF-8 | 1,560 | 3.140625 | 3 | [] | no_license | <?php
//**********************************************************
// File name: StringTools.class.php
// Class name: StringTools
// Create date: 2011/12/15
// Update date: 2011/12/15
// Author: parkerzhu
// Description: 字符串工具
//**********************************************************
class StringTools
{
... | true |
e3473d4098dd4e2b2c3ebba2d8cc53ebb1641b52 | PHP | etozqf/silkroad | /apps/pay/lib/chinapay/adapter.php | UTF-8 | 2,137 | 2.53125 | 3 | [] | no_license | <?php
loader::import('lib.chinapay.class.chinapay_service', app_dir('pay'));
loader::import('lib.chinapay.class.chinapay_notify', app_dir('pay'));
class adapter extends pay_base
{
function __construct($platform, $forminfo)
{
// 初始化数据库配置信息
parent::init_config($platform);
$this->set_config($forminfo);
}
// 设置... | true |
a8f732af7a78db7022a2b30cbd7b5dfc7653f3f4 | PHP | brandon-kp/d0p_blog | /admin/application/models/stats_model.php | UTF-8 | 835 | 2.65625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Stats_model extends CI_Model
{
public function count_posts()
{
return $posts = count($this->db->get('blogs')->result_array());
}
public function count_pages()
{
return $pages = count($this->db->get('pages')->result_array());
}... | true |
e80d11bdf036da29def14955a17602f6d81035e1 | PHP | mivixof/web-backend-solutions | /solutions/opdracht-if-else-if/opdracht-if-else-if.php | UTF-8 | 2,462 | 3.015625 | 3 | [] | no_license |
<?php
$number = 21 ;
$lower = floor($number / 10 ) ;
$lower = $lower * 10 ;
$upper = $lower + 10 ;
/*
if ($number <= 10 && $number >= 20 ) {
$lower = 10 ;
$upper = 10 + $lower ;
}
elseif ($number <= 20 && $number >= 30 ) {
$lower = 20 ;
$upper = ... | true |
d143ffad26b91af7b087e99c857b3f47fe1b89ae | PHP | ravage84/SwissPaymentSlipTcpdf | /examples/SwissPaymentSlipTcpdf_Thousand_Slips.php | UTF-8 | 3,358 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Swiss Payment Slip TCPDF
*
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @copyright 2012-2015 Some nice Swiss guys
* @author Marc Würth <ravage@bluewin.ch>
* @author Manuel Reinhard <manu@sprain.ch>
* @author Peter Siska <pesche@gridonic.ch>
* @link https://github.com/r... | true |
9215cc1fb3aafc67fd7dca0d1e52aa3bc107fd84 | PHP | in7l/air-measurement | /src/DataConsolidation/CustomNodesBundle/Controller/JsonToDiagramMappingController.php | UTF-8 | 6,370 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ordwvr
* Date: 11/20/16
* Time: 9:05 PM
*/
namespace DataConsolidation\CustomNodesBundle\Controller;
use DataConsolidation\CustomNodesBundle\Entity\DefaultEntityManager\Base\JsonToDiagramMapping;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class JsonToDiag... | true |
554b25e8fa79916e2a8a12f4ed3f56dbe692c454 | PHP | vncloudsco/shopvc | /wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-settings.php | UTF-8 | 9,485 | 2.59375 | 3 | [
"Apache-2.0",
"GPL-3.0-only"
] | permissive | <?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Handles settings retrieval from the settings API.
*/
class WC_Gateway_PPEC_Settings {
/**
* Setting values from get_option.
*
* @var array
*/
protected $_settings = array();
/**
* List of locales supported by PayPal.
*
* @var array
*/
protec... | true |
770465abb8dbb6726f31a428040c3fe004ee2fcd | PHP | NicoNjora/Fitty_94056Api | /app/Http/Controllers/SessionController.php | UTF-8 | 1,307 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Session;
use App\Http\Resources\SessionResource;
use App\Http\Resources\SessionResourceCollection;
class SessionController extends Controller
{
//
public function userSessions(){
SessionResource::withoutWrapping();
... | true |
16f3007227ad4c90dc72166d5ba994748ef16fa4 | PHP | tectronics/senior-project-ksu-2012 | /src/edu/kennesaw/cs4850/website/index.php | UTF-8 | 2,532 | 2.515625 | 3 | [] | no_license | <?php
include_once("webpage.php");
if(isset($_GET['task']))
{
if($_GET['task'] == "logout")
WebPage::logout();
}
// authenticate login information
if(isset($_POST['task']))
{
if($_POST['task'] == "authenticate")
{
if($_POST['username'] == "admin" && $_POST['password'] == "admin" )
... | true |
09f779f453651c253f2488981c187acfb8ab29fe | PHP | AntonZUZZ/inetLabs | /lab4/functionalPage/content/content.php | UTF-8 | 2,197 | 2.78125 | 3 | [] | no_license | <?php
session_start();
if(!$_SESSION['user']){
header('Location: /');
}
require_once '../vendor/connect.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Gallery</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="..... | true |
0815a1cefeb2bfbecbfb3f728155d94c7f4df277 | PHP | suzanmanchandia/Loaner | /laravel/app/models/Classes.php | UTF-8 | 657 | 2.671875 | 3 | [] | no_license | <?php
/**
* Classes
*
* @property integer $id
* @property string $classname
* @property boolean $deptID
* @property-read \Department $department
* @method static \Illuminate\Database\Query\Builder|\Classes whereId($value)
* @method static \Illuminate\Database\Query\Builder|\Classes whereClassname($value)
* ... | true |
7205ece805bd267961fd98d4ca1089c8ffb4ef83 | PHP | hkulekci/cohere-php | /src/Endpoints/Embed.php | UTF-8 | 418 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @since Mar 2023
* @author Haydar KULEKCI <haydarkulekci@gmail.com>
*/
namespace Cohere\Endpoints;
use Cohere\Response;
class Embed extends AbstractEndpoint
{
public function __invoke(array $texts, string $model = null): Response
{
$body = ['texts' => $texts];
if ($model)... | true |
437ce61b06fe799c5f2072342b62f8549fbe4a73 | PHP | luanshijianghu/wechat | /Application/Common/Common/helper.php | UTF-8 | 1,061 | 2.796875 | 3 | [] | no_license | <?php
function getBytes($string) {
$bytes = array();
for($i = 0; $i < strlen($string); $i ){
$bytes[] = ord($string[$i]);
}
return $bytes;
}
if ( ! function_exists( 'v' ) ) {
function v( $name = null, $value = '[null]' ) {
static $vars = array();
if ( is_null( $name ) ) {
return $vars;
... | true |
35c3e8c2751126c23fdaa26fe57c63a198f194bc | PHP | jagga0ruba/ApiExample | /src/Entity/TransactionDB.php | UTF-8 | 1,494 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: joaod
* Date: 21/01/2018
* Time: 16:12
*/
namespace App\Entity;
use App\Util\Database;
use Symfony\Component\HttpFoundation\Request;
class TransactionDB extends Database
{
public function deposit( array $DepositArray ) : array
{
$Sql = 'Call sp_Deposit(... | true |
7a51d7fe8a8bdcc7e9553c309fbdd6cd4e2ca891 | PHP | williamchu123/account-manager | /libs/Nette/Diagnostics/Helpers.php | UTF-8 | 7,247 | 2.859375 | 3 | [
"WTFPL",
"Apache-2.0",
"MIT",
"BSD-3-Clause"
] | permissive | <?php
/**
* This file is part of the Nette Framework (http://nette.org)
*
* Copyright (c) 2004 David Grudl (http://davidgrudl.com)
*
* For the full copyright and license information, please view
* the file license.txt that was distributed with this source code.
* @package Nette\Diagnostics
*/
/**
* Renderi... | true |
4a2625c53f7d426fe5ed7417e7e3206cb691d492 | PHP | NotBrianZach/Poink | /includes/paypalFunctions.php | UTF-8 | 1,759 | 2.890625 | 3 | [] | no_license | <?php
include_once "db_connect.php";
function check_txnid($txnid){
//get result set
$checkUniqueTransaction = $database->prepare('
SELECT * FROM PAYMENTS WHERE txnid = :txnId
');
$checkUniqueTransaction->bindValue(':txnId',$txnid,PDO::PARAM_INT);
$checkUniqueTransaction->execute();
... | true |
583a5ea4a33b6c1743ee5376861f4bf3029b4cad | PHP | kreait/firebase-php | /src/Firebase/Firestore.php | UTF-8 | 504 | 2.5625 | 3 | [
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-free-unknown",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Kreait\Firebase;
use Google\Cloud\Firestore\FirestoreClient;
/**
* @internal
*/
final class Firestore implements Contract\Firestore
{
private function __construct(private readonly FirestoreClient $client)
{
}
public static function withFirestoreClient(Fire... | true |
42234df8bd319b1ce49429f7be259db7929b8621 | PHP | rendix2/PQL | /QueryBuilder/Select/ArrayValue.php | UTF-8 | 650 | 3 | 3 | [] | no_license | <?php
namespace pql\QueryBuilder\Select;
/**
* Class ArrayValue
*
* @author rendix2 <rendix2@seznam.cz>
* @package pql\QueryBuilder\Select
*/
class ArrayValue implements ISelectExpression
{
/**
* @var array $values
*/
private $values;
/**
* ArrayValue constructor.
*
* @par... | true |
e496c5979f7932a9e1de2cd44f849a32deefa45a | PHP | rebeccac/france | /flat-child/electricity-page.php | UTF-8 | 3,510 | 2.640625 | 3 | [] | no_license | <?php
/* Template Name: Electricity */
require_once('common.php');
get_header();
global $wpdb;
?>
<?php
if (isset($_POST['submit'])) {
$last_name = $_POST['last_name'];
$incoming_date = $_POST['incoming_date'];
$incoming = $_POST['incoming'];
$outgoing_date = $_POST['outgoing_date'];
$outgoing = $_POST[... | true |
56a0ec0cdd349f959c2de9475f29dcbd4fd60e49 | PHP | RafaelNogueiraXD/ModernEconomy | /app/classes/Usuario.php | UTF-8 | 1,433 | 2.90625 | 3 | [] | no_license | <?php
include "conection.php";
class usuario extends conection
{
protected $id,$nome,$desc,$email,$cep,$cidade;
function __construct($id,$nome,$desc,$email,$cep,$cidade){
$this->email = $email;
$this->cep = $cep;
$this->desc = $desc;
$this->id = $id;
$this->email = $ema... | true |
e4c787524d9a6df1dc2c26724849a33a9c2606a0 | PHP | sohan010/Raw-Php-Tutorial | /recursive_function.php | UTF-8 | 122 | 3.84375 | 4 | [] | no_license | <?php
function factorial($n){
if($n == 0){
return 1;
}else{
return ($n * factorial($n-1));
}
}
echo factorial(3); | true |
72eb4b227d6e65a9913c785a046062face25f5d3 | PHP | tramtran/TramWebsite | /public_html/ChineseZodiac/ZodiacGallery.php | UTF-8 | 1,372 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Zodiac Gallery</title>
<style type='text/css'>
div { margin-top: 2em; text-align: center; }
table { border-collapse: collapse; width: 100%; }
table img { width: 75px; }
table td { border: 1px solid gray; text-align: center; padding: 1em; }
td a { text-decora... | true |
d0f04b65ba44f5111b24586d17e6dc7d11a76a91 | PHP | polock10/SimonPospisil | /PHP/ustrednyPospisil.php | UTF-8 | 573 | 3.125 | 3 | [] | no_license |
<?php
// abstraktni trida ktera se neda instancovat a implementuje interface
abstract class ustrednyPospisil implements iustrednyPospisil{
protected $napetiPospisil; // atribut ktery je pristupny jen ve tride a tridach dedicich
//funkce pro ziskani hodnoty atributu implementovana z interfacu
func... | true |
1020acdd56ca7f294c2cd573cc0c9e7fbb3d6ac8 | PHP | vn00186388/fujita-group | /inc/fjtg-rest.php | UTF-8 | 4,417 | 2.671875 | 3 | [] | no_license | <?php
// return hotel list with rates
if ( ! function_exists( 'fjtg_hotel_list_api' ) ) {
function fjtg_hotel_list_api( $data ) {
if( empty( $data['post_name'] ) ) {
$hotels = fjtg_json_get_posts_hotel();
if ( ! rojak_empty_array( $hotels ) ) {
return $hotels;
}
} else {
$hotel = fjtg_json_get_post... | true |
f4ab4242f3b1895675559362635bb7f1248575df | PHP | latengoyo/rdy4racing-api | /services/Manager.php | UTF-8 | 1,769 | 3 | 3 | [] | no_license | <?php
/**
* Service class
*
* @author alex
*/
namespace Rdy4Racing\Services;
use Rdy4Racing\Modules\Configuration;
use Rdy4Racing\Services\Server\SoapServer;
class Manager {
protected $config;
protected $module;
protected $server;
protected $object;
/**
* Construct all params needed for run the web... | true |
fb53c9aff88ad0f3cf95fa1117ae8cdb2eb6a11c | PHP | VerenaSousaADS/Curso_Projeto_Web_do_IFPA | /02.Introducao_web_e_algoritmos_php/atividades_avaliativas/atividade_avaliativa_1_4.php | UTF-8 | 474 | 3.828125 | 4 | [
"MIT"
] | permissive | <?php
/*
Atividade Avaliativa - Unidade I
4) Sabendo que dois números inteiros (int1 e int2) possuem valores 14 e 5, respectivamente. Exiba o quociente e o resto da divisão de int1 por int2;
*/
//Declaração das variáveis
$int1 = 14;
$int2 = 5;
$quociente = 0;
$resto = 0;
// Processamento
$quociente = $int1 / $int... | true |
73a85e84630c6dadab7eaa50dbcc434b81d93bce | PHP | ddrv/php-cpa-metrics | /src/DTO/Price.php | UTF-8 | 400 | 3.09375 | 3 | [] | no_license | <?php
namespace Cpa\Metrics\DTO;
class Price
{
/**
* @var double
*/
public $amount;
/**
* @var string
*/
public $currency;
/**
* @param double $amount
* @param string $currency
*/
public function __construct($amount = 0, $currency = '')
{
$this... | true |
e34d68ed98e4863161983d67d154d7e7b024764f | PHP | nicolastorre/musicsession_app | /Component/LogWriter/LogWriter.php | UTF-8 | 956 | 2.953125 | 3 | [] | no_license | <?php
class LogWriter {
# @string, Log directory name
private $path = 'Config/';
# @string, Log dfile name
private $file = 'error.xml';
# @void, Default Constructor, Sets the timezone and path of the log files.
public function __construct() {
date_default_timezone_set('Europe/Amsterdam');
}
public function... | true |
6a31b03e4eb6312dcf869399ecc312e3032b6f0b | PHP | hendra47/deny | /app/Models/siswa.php | UTF-8 | 1,114 | 2.875 | 3 | [] | no_license | <?php
namespace App\Models;
use Eloquent as Model;
/**
* Class siswa
* @package App\Models
* @version November 18, 2017, 10:33 am UTC
*
* @method static siswa find($id=null, $columns = array())
* @method static siswa|\Illuminate\Database\Eloquent\Collection findOrFail($id, $columns = ['*'])
* @property string... | true |
fb964c62bf42db46262f1656c5deef2c9bf735a7 | PHP | skorasaurus/chathamdm | /sports.php | UTF-8 | 2,782 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
ini_set('display_errors', 'On');
error_reporting(E_ALL | E_STRICT);
// from http://www.finditillinois.org/wordpress/?page_id=23
// and https://github.com/ahbullen/CONTENTdmAPIs/blob/master/dmBrowse.php$collection = "p16014coll11";
// $xmlData = file_get_contents('https://server16014.contentdm.oclc.org/dmwebse... | true |
07158bdb628056382406e9e14b7f57c663b8e731 | PHP | bd878/practice | /web/func.php | UTF-8 | 201 | 3.125 | 3 | [] | no_license | <?php
header('Content-Type: text/html');
function PrintGreeting($name)
{
echo 'Hello, ' . $name;
}
echo $_GET['search'];
echo '<br>';
PrintGreeting('Sarah'); | true |
830b92f0bbc685a81647edd8852d587de6f84194 | PHP | Aketos/bot-maker | /src/StrategyBundle/Model/Order.php | UTF-8 | 1,842 | 2.71875 | 3 | [] | no_license | <?php
namespace BotMaker\StrategyBundle\Model;
class Order implements TradableInterface
{
public const STATUS_INI = 'Created';
public const STATUS_SENT = 'Sent';
public const STATUS_ACCEPTED = 'Accepted';
public const STATUS_PENDING = 'Pending';
public const STATUS_REJECTED = 'Rejected';
publ... | true |
0b10d723251437458269fe8a7e3d4e4030123eaf | PHP | adrianschubek/filedb | /src/FileDb/FileDb.php | UTF-8 | 734 | 3.09375 | 3 | [] | no_license | <?php
namespace adrianschubek\FileDb;
use adrianschubek\FileDb\Exceptions\TableNotFound;
class FileDb
{
private string $dirpath;
public function __construct(string $dirpath)
{
if (!is_dir($dirpath)) mkdir($dirpath);
$this->dirpath = $dirpath;
}
public function rawDecode(string... | true |
f193031cc043f378e57e394b8028433e4b79d43a | PHP | PradoSebastian/ProWeb | /Modulo 3/Clase 2/insertarPersonas.php | UTF-8 | 1,098 | 3.265625 | 3 | [] | no_license | <?php
//incluir archivo de configuración con usuario y contraseña
//dirname: misma carpeta donde estoy
include_once dirname(__FILE__) . '/config.php';
//crear Conexión
//Variables en archivo config
$con = mysqli_connect(HOST_DB,USUARIO_DB,USUARIO_PASS,NOMBRE_DB);
if(mysqli_connect_errno()... | true |
f04bbcb1011dcaabf8e63fd9022c188156a92d9f | PHP | Sclenfa/WF3mars2017 | /AJAJ/04-ajax_post_fopen/ajax.php | UTF-8 | 877 | 3.390625 | 3 | [] | no_license | <?php
$email = "";
if(isset($_POST['email'])){
$email = $_POST['email'];
}
// Création ou ouverture d'un fichier via la fonction fopen.
// En mode "a" php crée le fichier s'il n'existe pas sinon il ne fait que l'ouvrir.
// http://php.net/manual/fr/function.fopen.php
$f = fopen("email.txt", "a");
fwrite($f, $ema... | true |
a5c789aa8f75ce72a07e45cc83e093e73f1fa87b | PHP | ridhikc/e-Canteen-System | /qrfunc.php | UTF-8 | 1,247 | 2.84375 | 3 | [] | no_license | <?php
include 'phpqrcode/qrlib.php';
function randomgen()
{
$characters = '!~`#$@%^&*()-_++{}[];,<.>/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
return $characters[rand(0, strlen($characters) - 1)];
}
function getName() {
$id=$_COOKIE['login_id'];
$randomString... | true |
2ba1e758e6df989eb4a7fb00736efd59def13f26 | PHP | FauzanEdris/dosauas | /edit_acc.php | UTF-8 | 1,516 | 2.71875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
include "config.php";
$id = $_GET['id'];
//create connection
$conn = new mysqli(MYSQL_HOST,MYSQL_USER,MYSQL_PWD,MYSQL_DB);
//cek koneksi
if(!$conn){
die("Connection failed: ".$conn->connect_error);
}
else{
if(isset($id)){
$query = "select * from aksesoris where id=$id";
$exec = $conn->query($query);
$pr... | true |
d1a38ca1f87ec9bcad70c171289ab295e93f834b | PHP | Rasmusa91/php-bmo | /pages/admin/removeObject.php | UTF-8 | 1,368 | 2.828125 | 3 | [] | no_license | <?php
$objectID = ((isset($_POST["removeObjectID"]) && $_POST["removeObjectID"] != -1) ? $_POST["removeObjectID"] : "");
if(isset($_POST["removeObjectSubmit"]))
{
$errorMessage = "";
if(!empty($objectID))
{
RemoveObject(intval($objectID));
$successMessage = "Du har tagit bort ett objekt!";
}
el... | true |
856c067fe0a5d6c2fbda2918faa96fc8d6ca0833 | PHP | mallardduck/ssl-certificate | /src/SslCertificate.php | UTF-8 | 8,040 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace LiquidWeb\SslCertificate;
use Carbon\Carbon;
use phpseclib\Math\BigInteger;
use LiquidWeb\SslCertificate\SslChain;
use LiquidWeb\SslCertificate\SslRevocationList;
class SslCertificate
{
/** @var bool */
protected $trusted;
/** @var bool */
protected $revoked;
/** @var string */... | true |
bf4c3729878038bf355415a6e51723ccf1c4d43c | PHP | alduleacristi/stock-manager | /src/Main/StockManagerBundle/Forms/InsertProductIngredientForm.php | UTF-8 | 996 | 2.6875 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Main\StockManagerBundle\Forms;
use Symfony\Component\Form\FormBuilderInterface;
use Main\StockManagerBundle\StockManagerDTO\ProductIngredintDTO;
use Symfony\Component\Form\AbstractType;
class InsertProductIngredientForm extends AbstractType{
private $ingredientService;
public function __... | true |
d864b044aeff65ceb066b224bd99ddddba9acb83 | PHP | captain-shino/mon_hotel_paradise_resort | /admin/editerPlanning.php | UTF-8 | 4,370 | 2.75 | 3 | [] | no_license | <?php require_once('../partials/header.php'); ?>
<?php
require_once('../connexion.php');
if(isset($_POST['soumettre']) && !empty($_POST['numClient']) && !empty($_POST['numChambre']) && !empty($_POST['dateArrivee']) &&!empty($_POST['dateDepart'])){
// var_dump($_POST);
if($connect){
$numClient = (int)tr... | true |
bad2500fa8273f4a99651e12278522a8d0c807ef | PHP | Nikkoz/news | /news/services/manage/posts/rubrics/RubricsManageService.php | UTF-8 | 1,983 | 2.796875 | 3 | [] | no_license | <?php
namespace news\services\manage\posts\rubrics;
use news\entities\Meta;
use news\forms\manage\posts\RubricForm;
use news\entities\posts\rubric\Rubrics;
use news\repositories\posts\rubrics\RubricsRepository;
/**
* Class RubricsManageService
* @package news\services\manage\posts
*
* @property Rubr... | true |
c5e2a8ee13a06b06d6b7744ec370b72ee0202c63 | PHP | friendlyCoder007/zend-2 | /module/FileMenager/src/FileMenager/FileScanner/FileScanner.php | UTF-8 | 1,994 | 2.796875 | 3 | [] | no_license | <?php
namespace FileMenager\FileScanner;
use Zend\Code\Scanner\DirectoryScanner;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use Zend\Code\Scanner\FileScanner as ZendScanner;
class FileScanner extends DirectoryScanner{
public function __construct($config) {
... | true |
2cae8c2779e19eb205ce25d218c9831dda1917c5 | PHP | hwillson/zf2-common | /modules/zf2_common/src/Zf2Common/Mvc/Controller/Plugin/LanguageSelectorPlugin.php | UTF-8 | 2,929 | 2.625 | 3 | [] | no_license | <?php
/**
* zf2-common
* https://github.com/hwillson/zf2-common
*
* @author Hugh Willson, Octonary Inc.
* @copyright Copyright (c)2015 Hugh Willson, Octonary Inc.
* @license http://opensource.org/licenses/MIT
*/
namespace Zf2Common\Mvc\Controller\Plugin;
use Zend\Mvc\Controller\Plugin\AbstractPlugin;
... | true |
8fcbd96f1e881d5a1ec3726aeb1cc84c103e58e2 | PHP | bxav/skillnet | /src/BxMarket/User/Model/Employee.php | UTF-8 | 3,354 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the BxMarket package.
*
* (c) Xavier Buillit
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace BxMarket\User\Model;
class Employee implements EmployeeInterface
{
/**
* @var int
... | true |
39287bc36e28b585de62460d1606b09e7d9fc74c | PHP | XanderBass/quadbraces | /lib/lib.php | UTF-8 | 10,991 | 3.015625 | 3 | [] | no_license | <?php
class QuadBracesLib {
const extRex = '\:([\w\-\.]+)((\=`([^`]*)`)?)';
const extArgs = '#(:?\s*)\&([\w\-\.]+)\=`([^`]*)`#si';
/******** ТЕГИ ********/
/* LIBRARY:FUNCTION
@description : Аргументы
@param : v | string | value | | Исходная строка
@return : array
*/
publ... | true |
6d1455abc22c78bbd425d57ac1015b3a393aebba | PHP | mariusbalcytis/oauth-commerce-app-accounts | /src/Maba/Bundle/OAuthCommerceAccountsBundle/Entity/UserClient.php | UTF-8 | 1,251 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Maba\Bundle\OAuthCommerceAccountsBundle\Entity;
use Maba\Bundle\OAuthCommerceCommonBundle\Entity\Client;
class UserClient
{
/**
* @var int
*/
protected $id;
/**
* @var Client
*/
protected $client;
/**
* @var User
*/
protected $user;
publi... | true |
5c5638a9378f2afccb7517cc3052c540a8d2a37c | PHP | PatrickNoonan/Dusk-api | /dusk-master/app/Data/Command/User/Delete.php | UTF-8 | 287 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Data\Command\User;
use App\Data\User;
class Delete
{
/**
* @var User
*/
public $model;
/**
* Delete constructor.
* @param User $model
*/
public function __construct(User $model)
{
$this->model = $model;
}
} | true |
8e393cd01f0873e7cb0be6b088b834724e874dc4 | PHP | aofrozen/angular-php-sample | /app/models/feedtags.php | UTF-8 | 1,390 | 2.59375 | 3 | [] | no_license | <?php
namespace app\models;
use MongoDate,
MongoId,
\Phalcon\Mvc\Collection;
class feedtags extends collection
{
public $ts;
public $uid;
public $feedId;
public $tagName;
public function getSource()
{
return 'feedtags';
}
public function _create($uid, $feedId, $tagName... | true |
f93f20831a7dc96d89596812e92392e64ab0da66 | PHP | moufmouf/aent-docker-compose | /src/Command/RemoveEventCommand.php | UTF-8 | 1,645 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace TheAentMachine\AentDockerCompose\Command;
use Symfony\Component\Console\Question\ChoiceQuestion;
use Symfony\Component\Console\Question\ConfirmationQuestion;
use TheAentMachine\AentDockerCompose\Aenthill\Enum\EventEnum;
use TheAentMachine\AentDockerCompose\DockerCompose\DockerComposeService;
use TheAe... | true |
42ce447b095824d1e7297f6a49865a80f7541f69 | PHP | schlich/publius-data | /backend/poplicola.php | UTF-8 | 2,678 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
class Contribution {
public static function ValidateContributionRow($ContributionRow) {
if (!isset($ContributionRow['ContributionDate']) || !isset($ContributionRow['MecId']) || !isset($ContributionRow['ReportId']) || !isset($ContributionRow['Amount'])) {
throw new Exception("Missing info for contribution")... | true |
6f60fcfafed0ca781b5ecdda606569b21befb0f2 | PHP | bobwol/ParseEmailtoPush | /MG2Parse.php | UTF-8 | 6,091 | 2.859375 | 3 | [
"CC-BY-3.0"
] | permissive | <?PHP
/*
File Name: MG2Parse.php
Description: This PHP application is responsible for storing a new Push notification and issuing a push notification validation request. The script receives POST data from a Mailgun "Route" webhook. The required expression is "match_recipient("push+.*@<yourdomain.com>")". The i... | true |
15f904b54d1a6cdfbfc3c6ba5acb8b4c70f4550f | PHP | iherwig/wcmf | /src/wcmf/lib/presentation/impl/RemoteDocument.php | UTF-8 | 1,871 | 2.84375 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php
/**
* wCMF - wemove Content Management Framework
* Copyright (C) 2005-2020 wemove digital solutions GmbH
*
* Licensed under the terms of the MIT License.
*
* See the LICENSE file distributed with this work for
* additional information.
*/
namespace wcmf\lib\presentation\impl;
use wcmf\lib\io\FileUtil;
us... | true |
cb5cd4730118c7b3fb19bbacdd51f2f5562745c2 | PHP | chrc/Zend2MVC | /module/Application/src/Application/Entity/Formation.php | UTF-8 | 1,432 | 3.109375 | 3 | [] | no_license | <?php
namespace Application\Entity;
class Formation {
protected $id;
protected $nom;
protected $prix;
/**
* Association avec le formateur
* @var Formateur
*/
private $formateur;
/**
* Association avec les stagiaires
* @var array
*/
private $... | true |
5212e138f401e6d7ba081fcb24151a8856449235 | PHP | pxniu/study | /hyweb/service/Home/RoleService.php | UTF-8 | 737 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: haoyu
* Date: 2019/4/23
* Time: 上午10:45
*/
namespace hyweb\service\Home;
interface RoleService {
/**
* 添加角色
* @param array $arr
* @return mixed
*/
function add(Array $arr);
/**
* 获取所有角色
* @return mixed
*/
function getAll(... | true |
ea5d7e990a8a7a5cd82e63ad07bbf35786689847 | PHP | Dijky/cereal-php | /lib/Cereal/Types/Vector.php | UTF-8 | 1,871 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Dijky\Cereal\Types;
use \Exception;
use \Traversable;
use \InvalidArgumentException;
use \Dijky\Cereal\Serializable;
use \Dijky\Cereal\DefaultConstructible;
use \Dijky\Cereal\SizeTag;
use \Dijky\Cereal\Archives\BaseInputArchive;
use \Dijky\Cereal\Archives\BaseOutputArchive;
... | true |
e1af7e82b93ba257bd1e3b4da0e2af8df928df23 | PHP | Andrewma05/GoiVapi | /Model/EducationCreateModel.php | UTF-8 | 2,594 | 3.09375 | 3 | [] | no_license | <?php
namespace Model;
use Library\Request;
use Library\DbConnection;
class EducationCreateModel
{
public $id_jobseekers;
public $school;
public $specialty;
public $level_school;
public $freedate;
/**
* UserCreate constructor.
* @param Request $request
*/
public func... | true |
2e048a086473449813c3aa13cbb6976828ddc63d | PHP | linuxserver/Heimdall | /vendor/laravel/framework/src/Illuminate/Support/ConfigurationUrlParser.php | UTF-8 | 4,390 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Illuminate\Support;
use InvalidArgumentException;
class ConfigurationUrlParser
{
/**
* The drivers aliases map.
*
* @var array
*/
protected static $driverAliases = [
'mssql' => 'sqlsrv',
'mysql2' => 'mysql', // RDS
'postgres' => 'pgsql',
'po... | true |
740dd54d244cfa84b79d233322c2b759c21032d9 | PHP | kasunvimarshana/BookStore | /src/Entity/Cart/Cart.php | UTF-8 | 5,413 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity\Cart;
use App\Entity\Cart\CartInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpFoundation\Session\Session;
use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Book;
/**
* Cart
* @package App\Entity\Cart
*/
class Cart implements Cart... | true |
075590ba73e01b4587b6878d65a6ad83c3a6929b | PHP | kipras/code-builder | /src/Entity/BuildableEntity/Value/CBObject.php | UTF-8 | 2,370 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
class CBObject extends CBValue implements ICBHasFunctions
{
/**
* @var CBClass|CBClassRef|string The class of this object
*/
public $class;
/**
* @var CBVariable[] Dynamically assigned object properties
*/
private $dynamicProps = Array();
/**
* @param CBSettings $cb... | true |
8a3271fa075739bd75311e70474a7f321ca9c92c | PHP | saif43/phpoop | /4.php | UTF-8 | 162 | 2.640625 | 3 | [] | no_license | <?php
class Log
{
public function Write($filename)
{
fopen($filename, 'a+');
}
public function Read($filename)
{
}
}
?> | true |
8abe6d252053ac543c0d0f6eb63183b2deec04b1 | PHP | p-feucht/WI2020 | /Teams/Foodsaver/database/editProfileInformations.php | UTF-8 | 9,234 | 2.625 | 3 | [] | no_license | <?php
session_start();
// bearbeiten vom Profil
error_reporting(E_ALL);
ini_set('display_errors', 1);
require('connectDB.php');
if (isset($_POST['submit'])) {
$emailaktuell = $_SESSION['session_user'];
$useraktuell = $_SESSION['session_username'];
// speichern neuer Benutzerdaten
$username = $_P... | true |
de13433048bddb80579ccbfc90f6674e3f2f16cb | PHP | mjohnston548/ArtShopWebsite-basic- | /dbconnection.php | UTF-8 | 261 | 2.625 | 3 | [] | no_license | <?php
try {
$host='localhost';
$dbname='artshop';
$username="root";
$password="";
$con=new PDO('mysql:host='.$host.';dbname='.$dbname,$username,$password);
} catch (Exception $e) {
echo "Error!: " . $e->getMessage() . "</br>";
die();
}
?> | true |
4c121e8a118179748ef1d3c86fb98369cd1d9434 | PHP | alexberce/hacktm-planescape | /application/models/Account_model.php | UTF-8 | 1,586 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Account_model extends CI_Model
{
private $table_name = 'users';
public function __construct()
{
parent::__construct();
$this->user_id = $this->session->userdata('id');
}
public function getAccountData()
{
$query = $this->db->where('users.id', $this->user_id)
->join('files', 'users.profile_... | true |
e48152db051183e86f3a298e05693dca7acb8082 | PHP | dussartcorp/M2L | /src/Entity/Restauration.php | UTF-8 | 2,316 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\RestaurationRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=RestaurationRepository::class)
* @ORM\Table(name="Restauration")
*/
class Restaurat... | true |
c7c12278706f63209bbdc3ab9154e6c0574ecea1 | PHP | majakamal/bookstore-app | /www/test.php | UTF-8 | 1,323 | 2.828125 | 3 | [] | no_license | <?php # test.php sandbox
/*define('DBUSER', 'root');
define('DBPASS', 'majakamal');
try {
# prepare a pdo instnce
$conn = new PDO('mysql:host=localhost;dbname='.DBNAME, DBUSER, DBPASS);
# set verbose error modes
$conn->setAttributes(PDO: :ATTR_ERRMODE, PDO: :ERRMODE_SILENT);
} catch(PDOException $e) {
echo $e->... | true |
bc3fd993a0c40643a9ee4b2dddaa72a66937c161 | PHP | EchoWine/Component | /src/Debug.php | UTF-8 | 427 | 3.296875 | 3 | [] | no_license | <?php
namespace CoreWine\Component;
/**
* A helper class for debugging.
*/
class Debug{
public static $data = [];
/**
* Add to stack.
*
* @param DataType $data
*/
public static function add($data){
self::$data[] = $data;
}
/**
* Print the stack.
*/
public static function print(){
print_r(se... | true |
b95e593a7d3bf34ecd068b0ce6d6179024dd0560 | PHP | syehbiherbian/patungan-property | /app/Helpers/MyHelper.php | UTF-8 | 2,860 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Helpers;
use App\Http\Controllers\Controller;
use DateTime;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cookie;
class MyHelper
{
public static function time_past($time = null)
{
$datetime1 = date_create(date("Y-m-d H:i:s"));
$datetime2 = date_create(d... | true |
305d2847d091dd6ec22c61d1be4aee0e09a8200b | PHP | guediagael/virtual-vm | /app/models/WalletTrait.php | UTF-8 | 765 | 3.1875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: guedi
* Date: 8/3/2017
* Time: 4:41 PM
*/
namespace Models;
trait WalletTrait
{
private $coins= [];
function getAvailableCoins(): array
{
return $this->coins;
}
function getData()
{
$ones = new Coin(1);
$ones->quantity... | true |
858c628f236f9212651c695fdb31f8aaafebbf50 | PHP | Optimovl/optimosite | /classes/system/subsystems/Deprecated/iUmiXmlImporter.php | UTF-8 | 424 | 2.625 | 3 | [] | no_license | <?php
/** @deprecated */
interface iUmiXmlImporter {
public function __construct();
public function ignoreNewFields($ignoreNewFields = false);
public function ignoreNewItems($ignoreNewItems = false);
public function loadXmlString($xmlString);
public function loadXmlFile($xmlFilePath);
public functi... | true |
1a636a851e191662b38e95f0f582861566345440 | PHP | alexbursak/basic_calculator | /tests/Unit/Calculator/CalculatorFieldsValidatorText.php | UTF-8 | 2,024 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Tests\Unit\Calculator;
use App\Calculator\CalculatorFieldsValidator;
use App\Calculator\Exception\CalculatorException;
use PHPUnit\Framework\TestCase;
class CalculatorFieldsValidatorText extends TestCase
{
/** @var CalculatorFieldsValidator */
private $validator;
public function setU... | true |
4bb98d2f8b40974190f0a6d1857dcc88562c4d0b | PHP | Bloodlezz/pcPartsShop | /src/ShopBundle/Service/Cart/CartServiceInterface.php | UTF-8 | 1,093 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Bloodless
* Date: 29.12.2018 г.
* Time: 22:10
*/
namespace ShopBundle\Service\Cart;
use ShopBundle\Entity\CartItem;
use ShopBundle\Entity\User;
interface CartServiceInterface
{
/**
* @return User|object|null
*/
public function getCurrentUser();
/*... | true |
88fee516657118bc5916aaf31623363bb066b5ac | PHP | Setono/doctrine-orm-batcher | /src/Factory/BatcherFactory.php | UTF-8 | 2,190 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Setono\DoctrineORMBatcher\Factory;
use Doctrine\ORM\QueryBuilder;
use Setono\DoctrineORMBatcher\Batcher\Collection\CollectionBatcherInterface;
use Setono\DoctrineORMBatcher\Batcher\Range\NaiveIdRangeBatcherInterface;
use Setono\DoctrineORMBatcher\Batcher\Range\RangeBatcherInt... | true |
8c3fc9b1189ca905092e7a41769da36544f3481a | PHP | maikymk/sistema | /app/Interface/controller.php | UTF-8 | 401 | 2.625 | 3 | [] | no_license | <?php
/**
* Forca os controllers que implementarem a terem todos o mesmo padrao
*
* @author maikysilva
*
*/
interface InterfaceController {
/**
* Permite o proprio controller fazer suas requisicoes e funcionar da forma dele
*/
function handle();
/**
* Retorna a tela que foi acessada
... | true |
7443a38c00cbac75a84dea09bbbfbb1529b17ec5 | PHP | marshung24/structure | /src/abstracts/TableConfig.php | UTF-8 | 3,415 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace marsapp\structure\abstracts;
use marsapp\structure\abstracts\Config;
use marsapp\helper\ArrayHelper;
/**
* Table Config Profile
*
* @author Mars.Hung
*
*/
abstract class TableConfig extends Config
{
/**
* Config for table element
*
* Format :
* - $_defaultConfig[$e... | true |
e1ba484132cc15de7eb3dcaae7ea64a8362dfe3c | PHP | MorleyWebDev/gradedunit2 | /php/reviewsLogic.php | UTF-8 | 7,141 | 2.84375 | 3 | [] | no_license | <?php
session_start();
// only execute code on post req
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$exid = $_GET["exid"];
// get user id if they have one
if(isset($_SESSION['id'])){
$uid = $_SESSION['id'];
}
// if no review link back - no longer needed with required field
if(empty($_POST['reviewPost'... | true |
9dc33e2b4f2748b0cce58ca6104e9e4275b64d83 | PHP | webthinkgr/codesniffer | /src/Webthink/Sniffs/NamingConventions/ValidTraitNameSniff.php | UTF-8 | 825 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace WebthinkSniffer\Webthink\Sniffs\NamingConventions;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
/**
* Ensures trait names are correct.
*
* @author George Mponos <gmponos@gmail.com>
* @license MIT
*/
final class ValidTraitNameSniff implements Sniff
{
/**
* @inheritdo... | true |
0f61b1372752fff92c4623cf24708baaad1a359c | PHP | suin/jubatus-examples | /recommender-related-blog-posts/generate-train-data-from-qiita.php | UTF-8 | 971 | 2.703125 | 3 | [] | no_license | <?php
function get_user_posts(array $data, $page)
{
$url = 'https://qiita.com/api/v2/users/suin/items?page='.$page.'&per_page=20';
$result = file_get_contents($url);
$posts = json_decode($result, true);
foreach ($posts as $post) {
$url = $post['url'];
$title = $post['title'];
$body = $post['rendere... | true |
d75fcf2422d6ef24d8bbf554fafba465db8c58c5 | PHP | brunorthomaz/laravel-xss-evasion | /src/EvasionMiddleware.php | UTF-8 | 901 | 2.78125 | 3 | [] | no_license | <?php
namespace XSSEvasion;
use Closure;
use XSSEvasion\EvasionFilter;
class EvasionMiddleware
{
/**
* @var \XSSEvasion\EvasionFilter
*/
protected $evasionFilter;
/**
* EvasionMiddleware constructor.
* @param \XSSEvasion\EvasionFilter $evasionFilter
*/
public function __con... | true |
1b6913cc400206ff627fde8bda29859cdb7407cb | PHP | ext-news/IsCategoryActiveWithinParent | /IsCategoryActiveWithinParentViewHelper.php | UTF-8 | 2,874 | 2.859375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace GeorgRinger\News\ViewHelpers\MultiCategoryLink;
/**
* This file is part of the "news" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*/
use TYPO3\CMS\Core\Database... | true |
19acefc1998be37744141f3ec7650801242f137a | PHP | jsninja45/Paleidimas | /database/seeds/CouponSeeder.php | UTF-8 | 769 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
use App\Coupon;
class CouponSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// amount
Coupon::create([
'code' => '10dollars',
'type' => 'amount',
'value' => 10,
... | true |
41226fc51e61d5cbe78a74a7397a1fbaaddfb31e | PHP | anood11/horde-hatchery | /ingo/lib/Script/Sieve.php | UTF-8 | 87,835 | 2.609375 | 3 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* The Ingo_Script_Sieve class represents a Sieve Script.
*
* See the enclosed file LICENSE for license information (ASL). If you
* did not receive this file, see http://www.horde.org/licenses/asl.php.
*
* @author Mike Cochrane <mike@graftonhall.co.nz>
* @package Ingo
*/
class Ingo_Script_Sieve exten... | true |
e4026006155de1f3c0135f1b00807624727da964 | PHP | robson1988/Admin-panel | /Models/functions.php | UTF-8 | 14,686 | 2.828125 | 3 | [] | no_license | <?php
class Dbh { //DATABASE CONNECTION
private $servername;
private $username;
private $password;
private $dbname;
private $charset;
public function connect() {
$this->servername = "localhost";
$this->username = "root";
$this->password = "";
$this->dbname ... | true |
25f0b0d324626ba963d294b08b14627ef71ebe62 | PHP | phpffcms/ffcms | /Apps/Controller/Admin/Main/ActionYandexCounter.php | UTF-8 | 1,521 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Apps\Controller\Admin\Main;
use Apps\Model\Admin\Main\FormYandexCounter;
use Ffcms\Core\App;
use Ffcms\Core\Arch\View;
use Ffcms\Core\Exception\ForbiddenException;
use Ffcms\Core\Helper\Type\Any;
use Ffcms\Core\Network\Request;
use Ffcms\Core\Network\Response;
use Ffcms\Yandex\Metrika\Client;
/**
*... | true |
1e5f40265fbadbb0636ceb8c1b1cc6a070c30507 | PHP | fracz/refactor-extractor | /results/piwik/e0507d715f281f56e10d0b87dc4e013f3aba96c1/after/API.php | UTF-8 | 2,611 | 2.53125 | 3 | [] | no_license | <?php
/**
* Piwik - Open source web analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
* @version $Id$
*
* @package Piwik_VisitorInterest
*/
/**
*
* @package Piwik_VisitorInterest
*/
class Piwik_VisitorInterest_API
{
static private $instance = null;
s... | true |
34c4fd4d442ce2288ad579761a6db0b91c486982 | PHP | cyber-perikarp/auskunftsbegehren_at | /models/Reminders.php | UTF-8 | 735 | 2.546875 | 3 | [
"MIT",
"CC-BY-SA-4.0"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "reminders".
*
* @property integer $id
* @property string $email
* @property string $quelldatei
* @property string $created_at
* @property string $due_at
* @property string $targets
*/
class Reminders extends BaseModel
{
/**
... | true |
082cbff3dd669ad91fdc6d676afdcd25559f4a0a | PHP | andersonsouzars/simple-report | /elements/Rectangle.php | UTF-8 | 2,581 | 2.703125 | 3 | [] | no_license | <?php
/*
Copyright 2013 SimpleReport
Este arquivo é parte do SimpleReport
SimpleReport é uma biblioteca livre; você pode redistribui-lo e/ou
modifica-lo dentro dos termos da Licença Pública Geral GNU como
publicada pela Fundação do Software Livre (FSF); na versão 3 da
Licença, ou qualquer outra versão.
Este program... | true |
b7fa5c90ce91d34869a4fff012ea065e5939df17 | PHP | chiranjeevjain/securePHP | /New folder/php/array_funcs.php | UTF-8 | 539 | 3.4375 | 3 | [
"MIT"
] | permissive | <?php
$array1= array(1,2,3,4);
$array2= array("1"=>"one","2"=>"two");
echo sizeof($array1);
echo '<br>';
echo sizeof($array2);
echo '<br>';
print_r(array_values($array2));
echo '<br>';
print_r(array_keys($array2));
echo '<br>';
echo array_pop($array1); #removes last element
echo '<br>';
print_r($array1);
echo '<br>';... | true |
1f83b95540d40c7c69a15e0df60b720f4f7d68d7 | PHP | DrNixx/yii2-onix | /src/i18n/ILocalizable.php | UTF-8 | 264 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace onix\i18n;
/**
* Interface ILocalizable
* Defines the signature for a component that has a localized name.
*
*/
interface ILocalizable
{
/**
* Get localized name
* @return string
*/
public function getLocalizedName();
}
| true |
de31e33632c7fbddf517c1e192bf73c69f9ff75b | PHP | edin/Atom | /src/Container/Resolver/FactoryResolver.php | UTF-8 | 1,611 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Atom\Container\Resolver;
use Atom\Container\ComponentRegistration;
use Atom\Container\ResolutionContext;
final class FactoryResolver implements IDependencyResolver
{
private $registration;
private $factory;
private $reflectionFunction;
private $dependencies;
... | true |
269be4c325ab2de1302633377117a6028f9b678c | PHP | facundoi22/PF_Project | /TESIS/app/ProximaFecha/View/View.php | UTF-8 | 441 | 2.5625 | 3 | [] | no_license | <?php
namespace ProximaFecha\View;
use ProximaFecha\Core\App;
class View
{
public static function render($view, $data = [])
{
$__data__ = $data;
foreach ($__data__ as $varName => $varValue) {
${$varName} = $varValue;
}
require App::$viewsFolder . '/' . ... | true |
0d971511ae6ea669392d016d1a9b392d60c0285f | PHP | yourant/custom-service | /modules/blacklist/models/BlackList.php | UTF-8 | 2,627 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\blacklist\models;
use Yii;
/**
* This is the model class for table "{{%blacklist}}".
*
* @property integer $id
* @property integer $platfrom_id
* @property string $platfrom_code
* @property string $username
* @property string $create_time
* @property string $modify_time
*/
class ... | true |
124b56a3bdf0cf73202f83e392aaa7686cd5629c | PHP | 97114007/utslostandfound | /service-producer/modules/EditItemModule.php | UTF-8 | 708 | 2.65625 | 3 | [] | no_license | <?php
require_once("././IModule.php");
require_once("././db.php");
class EditItemModule implements IModule {
private $data;
private $db;
public function executeWithArguments($args) {
$this->db = new db();
$result = $this->db->execQuery("UPDATE lostitems SET category = '".$args['category']. "', subcategory... | true |
8239f6bd77ddddfffaf9f67a434fad4bd9fb0a06 | PHP | kortigor/framework | /customer/entities/AggregateTraitStatusCanBeSent.php | UTF-8 | 1,021 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace customer\entities;
trait AggregateTraitStatusCanBeSent
{
use AggregateTraitStatus;
/**
* Indicates entity is active (not blocked).
*
* @return bool
*/
public function isActive(): bool
{
$this->assertStatus();
return $this-... | true |