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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b3c1b03a9b932850b6f3ecf4e3923e6ca851fc6b | PHP | dorireuv/constructor-overloading | /tests/ConstructorOverloading/Test/ResolverTest.php | UTF-8 | 5,579 | 2.953125 | 3 | [] | no_license | <?php
namespace ConstructorOverloading\Test;
use ConstructorOverloading\Resolver;
use PHPUnit_Framework_TestCase;
use RuntimeException;
/**
* Resolver test
*
*/
class ResolverTest extends PHPUnit_Framework_TestCase
{
/**
* @var Resolver
*/
private $resolver;
/**
* Sets up
*/
... | true |
c2bcfdc3c93d561b52072ab99b37132f30d4fa1b | PHP | Solire/lib | /Registry.php | UTF-8 | 1,152 | 3.203125 | 3 | [] | no_license | <?php
/**
* Registre.
*
* @author Adrien <aimbert@solire.fr>
* @license CC by-nc http://creativecommons.org/licenses/by-nc/3.0/fr/
*/
namespace Solire\Lib;
/**
* Registre.
*
* @author Adrien <aimbert@solire.fr>
* @license CC by-nc http://creativecommons.org/licenses/by-nc/3.0/fr/
*/
class Registry
{
/... | true |
9ce527590796976607578861c98325f12bcc7ba6 | PHP | vladimir45/BitWasp | /application/libraries/Bw_transaction.php | UTF-8 | 4,587 | 3.40625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Unlicense"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Bw Transaction
*
* This library is to create raw transactions against bitcoind.
*
* @package BitWasp
* @subpackage Libraries
* @category Bw_transaction
* @author BitWasp
*/
class Bw_Transaction {
/**
* CI
*
* This v... | true |
d42f7804f177f45a23026ee2b8df07068d97e275 | PHP | aguisset/Brocante | /Project/t_connexion.php | UTF-8 | 1,947 | 2.671875 | 3 | [] | no_license | <?php
/*
* Page de traitement de la connexion
*
* Projet de Programmation Web
* ENSEIRB MATMECA // Telecom
* @ author Benjamin BONNOTTE & Abdoul GUISSET
*
*/
// Pour chaque page du site on appel le fichier contenant les fonctions devant etre presente
require_once("src/fonctions.php");
// Définition du t... | true |
fbf2a12dbc254f7fa8582747a1acf54cb49af0a5 | PHP | markopo/mapo | /src/CContent/CContent.php | UTF-8 | 4,114 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: marko
* Date: 15/12/2014
* Time: 20:46
*/
/**
* Class CContent
*/
class CContent extends CDatabase {
public function __construct($options, $debug=false){
parent::__construct($options, $debug);
}
/**
*
*/
public function Create() {
... | true |
503396d0b07c748cf62021a0cee9e0d29e306e0c | PHP | mqcquerino/CRUD_PHP | /DAL/DBConnection.php | UTF-8 | 1,084 | 3.171875 | 3 | [] | no_license | <?php
/**
* @author Marcelo
*/
//A Classe não permite herança
final class DBConnection {
private static $pdo = null;
//Construtor privado (A classe não permite que seja instanciada)
private function __construct() {
}
/* Método retorna uma instancia pdo já existente ou cria uma nova e... | true |
12a8d87651042ea329c20c480995ca1af7e8ebc0 | PHP | intellivoid/Blackhawk | /BlackHawk/include/ZiProto/Exception/InvalidOptionException.php | UTF-8 | 1,230 | 2.671875 | 3 | [] | no_license | <?php
/**
* BlackHawk Engine
*
* BlackHawk: InvalidOptionException.php
*
*
* Created: 1/21/20, 3:42 AM
* Last modified: 1/20/20, 1:04 PM
* Modified by: intellivoid/antiengineer
*
* @copyright 2020 (C) Nighthawk Media Group
* @author Diederik Noordhuis, Zi Xing Narrakas
*
* For more information, contact die... | true |
0cca63e395425d267c7d3b61be943996c7f6548e | PHP | yarbsemaj/BuildEmpireTechTest | /app/Helpers/validator.php | UTF-8 | 623 | 2.796875 | 3 | [] | no_license | <?php
use Views\Redirect;
if (!function_exists('validate')) {
/**
* Validates the request
* @param array $validator
*/
function validate($validator)
{
$errors = [];
foreach ($validator as $field => $classes) {
foreach ($classes as $class) {
if (!... | true |
894980ba35c97f03a60552dc4191b8ca9cb33f29 | PHP | hungquocminh1989/shopdongho | /app/library/SimpleDb/Database.php | UTF-8 | 6,348 | 2.6875 | 3 | [] | no_license | <?php
class Database
{
private $dbh;
private $in_transaction;
private $_last_param;
private $_last_sql;
protected $table_name;
protected $pk_id;
public function __construct($tablename = NULL)
{
/*
$dns = 'mysql:dbname=mail;host=127.0.0.1';
$username = 'mail_admin';
$password = 'abcd12... | true |
b84cd21c23304e15c73bbaa7e623e6e9c74ad143 | PHP | michiphung/freshcook | /application/classes/Model/chef.php | UTF-8 | 4,269 | 2.640625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/*
* Model that represents a farmer in WeFarm
*
*/
class Model_chef extends ORM {
public function createAccount($access_token) {
$wepay = new WePay($access_token);
try {
$response = $wepay->request('account/create/', array(
'name' => $this->name,
... | true |
4f6e2acd85d6814c44359148064d7a71680ca2a8 | PHP | JSn1nj4/ElliotDerhay.com | /database/factories/GithubUserFactory.php | UTF-8 | 618 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\GithubUser>
*/
class GithubUserFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public... | true |
66de690911a3efdbcc76e0bec45359eb5a6f1ab9 | PHP | sva1984/rest | /console/migrations/m190202_101806_create_order.php | UTF-8 | 863 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Class m190202_101806_create_order
*/
class m190202_101806_create_order extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
$tableOptions = 'CHARACTER S... | true |
0ec4de71d760c8426ae822f153ad82e45215f993 | PHP | jortiz3109/simple-scrum-manager | /app/Helpers/Math.php | UTF-8 | 184 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
class Math
{
public static function percentage(int $portion, int $total): int
{
return $total ? (100 * $portion) / $total : 0;
}
}
| true |
aa5eba0964f80c4e1e914e7de8c4a88803af2ada | PHP | obinnajohnphill/battle-simulation | /tests/UnitTests/SwordsmanTest.php | UTF-8 | 469 | 2.75 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
class SwordsmanTest extends TestCase {
protected $attributes = array(
'health' => ['lower' => 40, 'upper' => 60],
'strength' => ['lower' => 60, 'upper' => 70],
'defence' => ['lower' => 20, 'upper' => 30],
'speed' => ['lower' => 90, '... | true |
60c8241ee43057680a74b3adfadb226f1197d279 | PHP | CristobalBravo/monitoreo_backend | /app/Http/Controllers/MemoryStatisticController.php | UTF-8 | 6,811 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\SystemLog;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
class MemoryStatisticController extends Controller{
/*
* Top 10 uri que mas memoria utiliza en promedio
* Estadisticas basada en la utiliz... | true |
c62e21af4f2c468a447eccb1cb692d37aa5e404f | PHP | fyradigital/laravel-toolkit | /src/Traits/Loaders.php | UTF-8 | 1,444 | 2.609375 | 3 | [] | no_license | <?php
namespace FyraDigital\LaravelToolkit\Traits;
trait Loaders
{
public function initJQuery() {
$strHTML = "<!--[if lt IE 9]>";
$strHTML .= $this->loadAsset('https://d4wgqzyt29bpb.cloudfront.net/js/jquery/jquery-1.12.4.min.js');
$strHTML .= "<![endif]-->";
$strHTML .= "<![if !IE|... | true |
e4df9afb04cc2bacd81d9a700dde4fd2802a76f9 | PHP | lolozere/SSNTherapassBundle | /Model/BookingPersonModel.php | UTF-8 | 1,310 | 2.65625 | 3 | [] | no_license | <?php
namespace SSN\TherapassBundle\Model;
use Doctrine\Common\Collections\ArrayCollection;
/**
* Person booking slot
*
* @author lolozere
*
*/
abstract class BookingPersonModel extends \Oxygen\PassbookBundle\Model\BookingPersonModel {
protected $reference;
private $firstname;
private $lastname;
/**
* ... | true |
3d943f153522566dc3d160c1583e546736f4b3a4 | PHP | wimski/laravel-beatport | /src/Requests/Builders/AbstractRequestBuilder.php | UTF-8 | 4,025 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Wimski\Beatport\Requests\Builders;
use Illuminate\Contracts\Container\Container;
use Illuminate\Support\Collection;
use Wimski\Beatport\Contracts\RequestBuilderInterface;
use Wimski\Beatport\Contracts\RequestFilterInterface;
use Wimski\Beatport\Contracts\RequestInterface;
use Wimski\Beatport\Contracts... | true |
6c31539852999520941ac92e993b0a6cd6807a9a | PHP | trey/wp-readernaut | /readernaut.php | UTF-8 | 3,192 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/*
Plugin Name: Readernaut
Plugin URI: http://github.com/trey/wp-readernaut/
Description: Show the world your Readernaut books.
Author: Trey Piepmeier
Version: 1.0
Author URI: http://treypiepmeier.com/
*/
add_action('widgets_init', readernaut_load_widgets);
function readernaut_load_widgets() {
register_widget(... | true |
4621ad921d752051894c2e0d0f27a40e8dddfde7 | PHP | blyscop/tweevent_front | /api/dilasys/genpack_v0.php | UTF-8 | 783 | 2.765625 | 3 | [] | no_license | <?
function ListDir($dir) {
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if (is_dir($dir."/".$file) && $file != "." && $file != "..") {
ListDir($dir."/".$file);
}
if (!is_dir($dir."/".$file) && $file != "." && $file != ".... | true |
e57e598f2a98f67107f0d01d4a836b410d75a1a8 | PHP | Aswarkasim/skripsiQ | /application/helpers/myhelper_helper.php | UTF-8 | 1,788 | 2.6875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
if (!function_exists('nominal')) {
function nominal($angka)
{
$jd = number_format($angka, 0, ',', '.');
return $jd;
}
}
function is_logged_in_user()
{
$ci = get_instance();
if (($ci->session->userdata('id_use... | true |
57bf471e0aa8bce31f18a6a7005c93135503d2e7 | PHP | efganmesediyev456/commersiya | /app/Filters/UserFilter.php | UTF-8 | 1,020 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Filters;
use Carbon\Carbon;
use Kyslik\LaravelFilterable\Filter;
class UserFilter extends Filter
{
/**
* Available Filters and their aliases.
*
* @return array ex: ['method-name', 'another-method' => 'alias', 'yet-another-method' => ['alias-one', 'alias-two]]
*/
publi... | true |
5aee8ba0e204aab4454841291b145d2ec4706161 | PHP | bmish/GuessThatFriend | /api/classes/StatisticType.php | UTF-8 | 532 | 3.453125 | 3 | [] | no_license | <?php
/**
* An enumeration for the type of statistics.
*
*/
class StatisticType {
const FRIENDS = "friends";
const CATEGORIES = "categories";
const HISTORY = "history";
const DEFAULT_TYPE = StatisticType::FRIENDS;
/**
* Checks if a type is valid.
*
* @param integer $type Type to check
* @return bool... | true |
aca7a79f7ac361dc2f175630f6543bc47080e3cd | PHP | serignefalloufall/Forage_Project | /v2/model/FactureDB.php | UTF-8 | 3,286 | 2.59375 | 3 | [] | no_license | <?php
/*==================================================
MODELE MVC DEVELOPPE PAR Ngor SECK
ngorsecka@gmail.com
(+221) 77 - 433 - 97 - 16
PERFECTIONNEZ CE MODEL ET FAITES MOI UN RETOUR
POUR TOUTE MODIFICATION VISANT A AMELIORER
CE MODELE.
VOUS ETES LIBRE DE TOUTE UTILISATION.
===========... | true |
b266d7a516c2ba19626a0a1927c7a81a37cb307b | PHP | ipavl/OnePagedWebsite-FlightPHP | /app/helpers.php | UTF-8 | 1,175 | 2.921875 | 3 | [] | no_license | <?php
/**
* Renders $page using the 'default' layout.
*/
Flight::map('render_page', function($page, $data = null, $key = null) {
Flight::render('layouts/header', $data, 'header');
Flight::render($page, $data, 'body');
Flight::render('layouts/footer', $data, 'footer');
Flight::render('layouts/default', $data... | true |
40c697cd337cc9ce027fbdc9cbeb161010977497 | PHP | bibicheese/42projects | /Projects/matcha/Back/src/Domain/User/Repository/UserLikerRepository.php | UTF-8 | 4,751 | 2.828125 | 3 | [] | no_license | <?php
namespace Src\Domain\User\Repository;
use Src\Domain\User\Data\UserData;
use PDO;
class UserLikerRepository
{
private $connection;
public function __construct(PDO $connection) {
$this->connection = $connection;
}
public function addLike(UserData $user, $id) {
$login = $user->login;
... | true |
a955e671ee9551329244774450dca6c974caa5d8 | PHP | lemusToken/xframe | /core/libraries/Cookie/CookieManager.php | UTF-8 | 668 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: xule
* Date: 2016/12/27
* Time: 16:26
*/
namespace Libs\Cookie;
class CookieManager {
public static function set($key,$val,$time=0,$options=[]) {
$path = empty($options['path'])?'/':$options['path'];
$domain = empty($options['domain'])?null:$options[... | true |
073b830e693ae7004aed1b0d946438e9adce3aed | PHP | hatemsouki/testApp | /library/Request.php | UTF-8 | 1,424 | 2.796875 | 3 | [] | no_license | <?php
class Request
{
/**
* @var string
*/
protected $_action = 'index';
/**
* @var type
*/
protected $_headers = array(
'REQUEST_METHOD' => 'GET',
);
/**
* @return void
*/
public function parseUrl()
{
$this->_action = isset($_GET['act'])
... | true |
560e69319cddfeac0de8e93295f6e680b1420bf5 | PHP | Seegurke13/Abschlussprojekt | /src/Controller/ThemeController.php | UTF-8 | 3,688 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Controller;
use App\Document\Theme;
use App\Form\ThemeType;
use App\JsonResponse;
use App\Repository\ThemeRepository;
use App\Service\JsonSerializer;
use App\Service\LastUpdateService;
use App\Service\UpdateService;
use Doctrine\ODM\MongoDB\DocumentManager;
use Symfony\Bun... | true |
24254da526209981e8c341eef3377e565d16c1b5 | PHP | bishojit/P7-Treencol | /packages/bikiran/FileUpload.php | UTF-8 | 6,688 | 2.796875 | 3 | [] | no_license | <?php
namespace Packages\bikiran;
use Packages\mysql\QueryInsert;
class FileUpload
{
private int $dirLength = 3;
private string $defaultDir = "uploads/";
private string $generatedDir = "";
private string $id = "";
private string $fileUploadedPath = "";
private string $ext = "";
private a... | true |
a41967526047109afd02f7d6728935ca15b120b7 | PHP | stephaniechow/PhotoGallery | /index.php | UTF-8 | 17,580 | 2.59375 | 3 | [] | no_license | <?php
include("includes/init.php");
const MAX_FILE_SIZE = 1000000;
function gallery($a_image){
?>
<figure>
<a href="index.php?<?php echo http_build_query(array('image_single_id' => strtolower($a_image['id']))); ?>">
<!-- Source: (original work) Stephanie Chow -->
<img class="display" src="upl... | true |
1117d9aa516329a087e1abcd8fb1aad051938e89 | PHP | Quentin2706/DWQuentin | /PHPWEB/Projet_Film/PHP/VIEW/ListeRealisateurs.php | UTF-8 | 885 | 2.75 | 3 | [] | no_license | <?php
echo '<div class = "colonne">
<h2>Liste des realisateurs</h2>
<div class = "liste colonne">';
echo '<a class="ajout btn" href ="index.php?codePage=formRealisateur&mode=ajout">Ajouter</a>';
$realisateurs = RealisateursManager::getList();
foreach ($realisateurs as $realisateur)
{
echo '<div class="text">'.$rea... | true |
83da1f2f0c2936cf78a1df5c20862afdd414b0d5 | PHP | CS-4400-2013/Phase_III | /Website/Queries/CreateAccount.php | UTF-8 | 1,294 | 2.546875 | 3 | [] | no_license | <html>
<body>
<?php
session_start();
$connection=mysqli_connect("localhost","root","","car rental");
// Check connection
if (mysqli_connect_errno($connection))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$username = $_POST["username"];
$password = $_POST["password"];
$password_confirm = $_POST... | true |
e705567653b050f5a09a892e025f99bff1b2326e | PHP | tati0508/CMS | /index.php | UTF-8 | 2,695 | 2.515625 | 3 | [] | no_license | <?php
$dbh = new PDO(
'mysql:host=db;dbname=cms',
'myuser',
'password'
);
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href... | true |
a30f5c6bc27bf7ad7cecfa072e3f02016f00ce0a | PHP | ClemensSahs/php_buildin_server_launch | /src/pdsl/Launcher.php | UTF-8 | 4,051 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace PDSL;
class Launcher {
private $option;
/**
*
* @param array $options
*/
public function __construct ($options=array())
{
$this->setOptions($options);
}
/**
*
* @param string $name
* @param mixed $value
*/
public function setOpti... | true |
acc5701aaea79297fd49f6860c340381942fcc43 | PHP | flaviogf/courses | /udemy/curso_php_h_code/funcoes/exemplo_06.php | UTF-8 | 141 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
function teste($callback) {
echo "Inicio<br>";
$callback();
echo "Fim<br>";
}
teste(function() {
echo "Processando<br>";
});
| true |
a65026004b4e58965c11d535e03c0a0c5471547b | PHP | jefferson1998/aulas_de_php | /exemplos_banco_de_dados/conexaoMySQLi-OO-4.php | UTF-8 | 513 | 3.015625 | 3 | [] | no_license | <?php
echo "Conexão MySqli oo 4<br><br>";
$conn = new mysqli("localhost","root","","novabasededados","3306");
if ($conn->connect_error){
die("A conexão falhou");
}
$sql = "insert into exemplo(linha1, linha2) values ('valor1','valor2');";
if ($conn->query($sql)){
ec... | true |
0ca8be22f85ce85861cc299fa00040b3a6cd1721 | PHP | denisdimitrovbg/softUni | /ADVANCED SYNTAX AND OPERATIONS/Reverse an Array of Integers.php | UTF-8 | 196 | 3.125 | 3 | [] | no_license | <?php
$lines = (int)readline();
$arr = [];
$number = 0;
for ($i = 0; $i < $lines; $i++) {
$number = (int)readline();
$arr[] = $number;
}
echo implode(" ", array_reverse($arr)); | true |
87d73bd213a1a0ed6ad23e2eb41b30fcb930819f | PHP | dengmj968/yiyun-yibo | /App/Common/Model/CustomerCaseModel.class.php | UTF-8 | 2,568 | 2.78125 | 3 | [] | no_license | <?php
namespace Common\Model;
/**
* 客户案例
* @author 邓明倦 <dengmingjuan@neteasy.cn>
* @version 1.0
* creat Time 2014-10-14 10:30
*/
class CustomerCaseModel extends BaseModel{
/**
* 添加或修改案例时进行数据过滤
* @param array $data 数据
* @return boolean|array 有非法数据返回false或者返回过滤好的数据
*/
public functio... | true |
44e8e56af655e83cce7ce7742858ddd7df8cf563 | PHP | ab-budaev/lesson-architecture | /src/ISP/Bad/PurchaseAbleInterface.php | UTF-8 | 218 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Budaev\ISP\Bad;
interface PurchaseAbleInterface
{
public function getPrice(): float;
public function getDiscount(): float;
public function getSize(): string;
}
| true |
40ff375fe8ff11ccb6e59a916bcef9a844dde073 | PHP | whangdr3/yii2-members-system | /backend/components/User.php | UTF-8 | 1,477 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\components;
use Yii;
use \yii\web\User as UserComponent;
use backend\models\Admin;
/**
* Extended yii\web\User
*
* This allows us to do "Yii::$app->user->something" by adding getters
* like "public function getSomething()"
*
* So we can use variables and functions directly in "->user"
*... | true |
e1fc6a79628472edf3f2005d5002f98e6680ea5d | PHP | sa-tasche/uppm | /src/Archive.php | UTF-8 | 3,292 | 2.78125 | 3 | [] | no_license | <?php
/**
* - ULOLEPHPPACKAGEMANAGER -
*
* Tools
*
* @author InteraApps
*/
class Archive {
private $ignore = [];
public function build($source, $destination) : void {
if (!file_exists(getcwd()."/uppm_target"))
mkdir(getcwd()."/uppm_target");
if (!file_exists(getcwd()."/uppm_... | true |
fb6a754dea6e764bffa7d3f2c717f85b96c1dbb4 | PHP | HamzaAzee/finalyearproject | /submitass.php | UTF-8 | 897 | 2.515625 | 3 | [] | no_license | <?php
//error_reporting(0);
include "connection.php";
session_start();
// If upload button is clicked ...
if (isset($_POST['submit'])) {
$filename = $_FILES["file"]["name"];
$tempname = $_FILES["file"]["tmp_name"];
$name = $_SESSION['username'];
$folder = "submitdocs/".$filename;
... | true |
d255856768f16385a07756f411737633fa87b27e | PHP | hashmode/cake-tools | /src/Controller/AdminsController.php | UTF-8 | 4,065 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace CakeTools\Controller;
use CakeTools\Controller\AppController;
use Cake\ORM\TableRegistry;
use Cake\Core\Exception\Exception;
use Cake\Datasource\ConnectionManager;
use Cake\Utility\Inflector;
use Cake\I18n\Time;
/**
* Users Controller
*
* @property \App\Model\Table\ArticlesTable $Articles
* @prope... | true |
6169250e82401984dc35422abbec58950ca3d19e | PHP | viniciuscrn/novomercado | /action/Produto/PesquisaProduto.php | UTF-8 | 2,018 | 2.703125 | 3 | [] | no_license | <?php
require_once ($_SERVER['DOCUMENT_ROOT'] . "/".$_SESSION["nomeprojeto"]."/bean/Produto.php");
require_once ($_SERVER['DOCUMENT_ROOT'] . "/".$_SESSION["nomeprojeto"]."/dao/ProdutoDAO.php");
$codigo = $_POST["codigo"];
if(is_numeric($codigo)){
if(!ProdutoDAO::existeCodigo($codigo)){
$_SESSION['mensagem'] = 'Cód... | true |
c6dcd98f80c7b6df5c325beff5b4458527da646a | PHP | mithunmo/phpsample | /classes/mofilm/user/profile/movie/set.class.php | UTF-8 | 5,657 | 2.859375 | 3 | [] | no_license | <?php
/**
* mofilmUserProfileMovieSet
*
* Stored in set.class.php
*
* @author Dave Redfern
* @copyright Mofilm (c) 2009-2010
* @package mofilm
* @subpackage user
* @category mofilmUserProfileMovieSet
* @version $Rev: 10 $
*/
/**
* mofilmUserProfileMovieSet
*
* Manages the users profile movies.
*
* @pa... | true |
6f2014af14fcf061c26abe2eddb2b5a5a6da3350 | PHP | chogoons/wowInvasionInfo | /invasion/battleForAzeroth/index.php | UTF-8 | 3,561 | 2.609375 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>격전의 아제로스 습격 시간표</title>
</head>
<body>
<?
/*
순서:
1. 드러스트바 -> 2. 줄다자르 -> 3.... | true |
e33892d1de3a695757d5693e6315a9b541789e12 | PHP | DinShpati/NESB_PHP_UPDATE_2020 | /functions/functions.php | UTF-8 | 7,174 | 2.9375 | 3 | [] | no_license | <?php
$dbhost = "local";
$dbuser = "";
$dbpass = 'admin';
$con = new mysqli($dbhost, $dbuser, $dbpass) or die("Connect failed: %s\n". $con -> error);
//Getting the Users Ip Address
function getUserIpAddr(){
if(!empty($_SERVER['HTTP_CLIENT_IP'])){
//ip from share internet
$ip = $_SE... | true |
3e9996196e0ad1e3ea3b553337786727335c249c | PHP | dgomendes/php | /Aula 37/exemplo01.php | UTF-8 | 532 | 3 | 3 | [] | no_license | <?php
//A função date necessita de pelo menos um parametro que indicará como ela será retornada
//Também pode ser informado como segundo parametro, um timestamp, ele equivale a data atual
//a partir da quantidade de segundos desde 1970. Quando informado, a propria função fará essa conversão.
//dia,mês, ano
ec... | true |
9633775541f11e1294f4bf04e1c5819bb5285d1e | PHP | DAW-SIS32-G2/DAW-PlataformaNotasITCA | /core/ajax/docente/zip.ajax.php | UTF-8 | 8,140 | 2.859375 | 3 | [] | no_license | <?php
define("__ROOT__", dirname(__FILE__,4));
require_once(__ROOT__.'/core/criptografia.php');
class Zip
{
public function comprimirTodosArchivos($folderGuias,$nombreArchivo,$folderPracticas)
{
session_start();
$usuario=$_SESSION['usuario'];
//Creando ruta donde se guardara el zip y el nombre que ten... | true |
7b690c2596bbb95a528adbc7931b70f3dca69858 | PHP | 1ik/career-service-office | /app/controllers/OrganisationTypesController.php | UTF-8 | 1,543 | 2.71875 | 3 | [] | no_license | <?php
class OrganisationTypesController extends \BaseController {
public function __construct(\cso\organisations\OrganisationTypeRepository $orgTypes) {
$this->orgTypes = $orgTypes;
}
/**
* Display a listing of the resource.
* GET /organisationtypes
*
* @return Response
*/
public functio... | true |
cf4dc2092bdc2e18e402743a62c4bb72df0378af | PHP | timothy-r/Schedule | /lib/Ace/Schedule/Item/Day.php | UTF-8 | 532 | 2.984375 | 3 | [] | no_license | <?php
namespace Ace\Schedule\Item;
use Ace\Schedule\ValueInterface;
use Ace\Schedule\MatcherInterface;
use Ace\Schedule\Exception;
use DateTime;
class Day implements MatcherInterface {
private $day;
public function __construct(ValueInterface $day){
if ($day->lessThan(0) || $day->greaterThan(31)){
... | true |
684b231bec2cdf8f5f63e5fcdcebd7c7bad62acc | PHP | Davidpoku/PHPWORK | /index.php | UTF-8 | 1,282 | 3.28125 | 3 | [] | no_license | <?php
// connect to the database using pg_connect(host=alexandria.sanm.hull.ac.uk user=431580 password='<david333>' dbname=<431580>
// notice that the password section is two single quotes - ' - not double quotes - ".
// this sets up a connection to the DB ready to execute a query
$DBconnection ... | true |
62a5055ec3f9495497cab35baa4dfb14df3dfef4 | PHP | jeckel/JsonApiResponse | /src/Link.php | UTF-8 | 1,539 | 2.875 | 3 | [] | no_license | <?php
/**
* User: Julien MERCIER <jeckel@jeckel.fr>
* Date: 20/01/17
* Time: 17:47
*/
namespace Jck\JsonApiResponse;
use Jck\JsonApiResponse\Exception\InvalidArgumentException;
class Link extends AbstractJsonElement
{
// const ALLOWED_KEYS = ['href', 'meta'];
protected $default = [
'meta' ... | true |
142f56de827ff9cb3dec422796d7114e6660f325 | PHP | denasgt123/crud | /connect.php | UTF-8 | 384 | 2.578125 | 3 | [] | no_license | <?php
$servername = "localhost"; //replace your servername
$username = "denas"; //replace your username
$password = "qwepoi"; //replace your password
$dbname = "crud"; //replace your database name
//Try connection
try {
// Create connection
$conn = mysqli_connect($servername, $username, $passwor... | true |
8111901aba61bc0e7dc23b094bd9c75131bdce85 | PHP | jghee717/Petstargram | /qqq.php | UTF-8 | 9,830 | 2.984375 | 3 | [] | no_license | <?php
/**
* Class Paging
*/
class Paging
{
protected $base_url = ""; // basic link url
protected $page_rows = 0; // show rows per page
protected $total_rows = 0; // total rows
protected $display_always = TRUE; // show always if has only 1 page.
protec... | true |
e135617a5933dd58ec48a20fa8f80cb3dd52b6af | PHP | StApostol/morph-analyzer | /src/FuzzyKeywordSearch/Word/Word.php | UTF-8 | 674 | 3.203125 | 3 | [] | no_license | <?php
namespace Morphy\FuzzyKeywordSearch\Word;
final class Word
{
private const POSITION_PREVIOUS_WORD = -1;
private const POSITION_NEXT_WORD = 1;
public $positionInString;
public $originalForm;
public $baseForm;
public function __construct(int $positionInString, string $originalForm, strin... | true |
225154c39c9e570b51b12bbe38c50a8e7be7a99c | PHP | dialyy/Vrata-api-GateAway-with-mongodb-and-passport | /vendor/satooshi/php-coveralls/src/Satooshi/Component/System/Git/GitCommand.php | UTF-8 | 1,248 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Satooshi\Component\System\Git;
use Satooshi\Component\System\SystemCommand;
use Satooshi\Component\System\SystemCommandExecutor;
use Satooshi\Component\System\SystemCommandExecutorInterface;
/**
* Git command.
*
* @author Kitamura Satoshi <with.no.parachute@gmail.com>
*/
class GitCommand extends ... | true |
df9374853b1d954369df97a8501d3d9881eaba62 | PHP | renanmfd/planner | /php/classes/Form.class.php | UTF-8 | 8,014 | 2.78125 | 3 | [] | no_license | <?php
class Form {
public $items;
public $attr;
public function Form() {
$this->items = array();
$this->attr = array(
'action' => '',
'method' => 'get'
);
}
public function add($formItem) {
$this->items[] = $formItem;
return $this;
... | true |
14b1d7109330bfa75085b5432c1484dcf3ad7500 | PHP | SchoebeP/3GImmobilier | /3Gimmo/php/register.php | UTF-8 | 2,743 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
//---------Connection DB -----------
include('dbconnection.php');
if (isset($_POST["submit"])){
$nom = htmlspecialchars($_POST["nom"]);
$prenom =htmlspecialchars($_POST["prenom"]);
$email =htmlspecialchars($_POST["email"]);
$telephone =htmlspecialchars($_POST["telephone"]);
$erro... | true |
b319ca7926a07be3db6cf38a138e01ae320ca1d2 | PHP | MarcosDAW/Proyecto-PHP | /ejercicio-enlaces/prueba.php | UTF-8 | 353 | 2.734375 | 3 | [] | no_license | <html>
<head>
<title>prueba</title>
</head>
<body>
<?php
$imagenes[]="imagen1.png";
$imagenes[]="imagen2.png";
$imagenes[]="imagen3.png";
foreach($imagenes as $imagen){
echo '<img src='.$imagen.' width=200px ><br>';
... | true |
54fb0b96aacef32ff2eda554002f9258ff65a00c | PHP | loanbecky/Codee | /muon/equationsApp2.php | UTF-8 | 3,218 | 3.5625 | 4 | [] | no_license | <?php
/**
Find the solution of the quadratic equation: ax^2 + bx + c = 0
*/
$error = null;
$a = $b = $c = '';
$result = '';
if (isset($_GET['a'], $_GET['b'], $_GET['c'])) {
// dynamic typing
$i = 0; // '0' true [1,2,3]
var_dump($i);
$a = $_GET['a'];
$b = $_GET['b'];
$c = $_GET['c'];
if ... | true |
6e75d0d3e53a136d65e05c50c705cd6fa506abd1 | PHP | deez79/php-and-mysql-class-final-project | /forum.php | UTF-8 | 2,427 | 2.65625 | 3 | [] | no_license | <?php // forum.php
#########################################################
#
# This page shows the threads in a forum.
#
#
# (from chapter 17 script 17.4)
# (edited heavily)
#########################################################
//include the header
include ('includes/header.php');
... | true |
b77a5e68200d5deb1c82a1df261bd970cfd81134 | PHP | AlexandreMazgaj/Database_Winegrower | /PHP/requete_cepage_caracteristique.php | UTF-8 | 2,089 | 2.625 | 3 | [] | no_license | <?php include "database.php";
$caracteristiques = pg_query("SELECT DISTINCT nom FROM Caracteristique");
?>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<h1>Influence de l'utilisation de cépages sur la qualité</h1>
<form method="post" action="requete_cepage_caracteristique.php">
<label>C... | true |
71a60ab0319b0449c084e40fa0fdb050138999cf | PHP | alekitto/FazlandElasticaBundle | /src/Provider/Indexable.php | UTF-8 | 4,236 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the FazlandElasticaBundle project.
*
* (c) Fazland <https://github.com/Fazland/FazlandElasticaBundle/graphs/contributors>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fazland\Elastica... | true |
06d39abc252816088a0ac146d1eda610374bd0ef | PHP | BergSabbath/PooPHPcursoemvideo | /Aula09/teste.php | UTF-8 | 688 | 2.6875 | 3 | [] | no_license | <pre>
<?php
require_once 'Pessoa1.php';
require_once 'Livro1.php';
require_once 'Publicacao1.php';
$l = array();
$l[0] = new Pessoa("Julianne",31,"Fem");
$l[1] = new Pessoa("Rose", 37,"Fem");
$l[2] = new Pessoa("Edna", 63,"Fem");
$p = array();
$p[0] = new Livro("Java","Ludenberg",500,$l[0]... | true |
817ece9451976f961b6ee1ea0527e7a4b65ae8b6 | PHP | igit-cn/duobaohui | /duobaohui_php/app/models/activity/ActivityPeriodModel.php | UTF-8 | 1,316 | 2.734375 | 3 | [] | no_license | <?php
namespace Laravel\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
/**
*
*
*/
class ActivityPeriodModel extends Model {
public function __construct(){
$this->init();
$this->table = 'activity_period';
}
private function init(){
$this->nowDateTime = date('Y-m-d H:i:s');
... | true |
aca477cc08afa2418ba826efc150c9650ce6683f | PHP | JimmieM/BitHatcherAPI | /projects/gain_resources_project.php | UTF-8 | 2,127 | 2.703125 | 3 | [] | no_license | <?php
/*
script to give a project some resources on call
forexample when winning a battle.
*/
function gain_resources_project($project_id) {
require_once('../config/dbconfig.php');
require_once('../config/modules.php');
require_once('../config/translators.php');
//show_errors();
// select a handful of pl... | true |
0572a88d5168dc9372ebc73849a64c96853ba9d9 | PHP | f5buddy/facebook-login-code | /index.php | UTF-8 | 1,371 | 2.734375 | 3 | [] | no_license | <?php
include_once("inc/facebook.php"); //include facebook SDK
/*------------- Facebook API Configuration ----------------*/
$appId = '433089193554285'; //Facebook App ID
$appSecret = '1d310ff21386820d2010b66345c5f637'; // Facebook App Secret
$homeurl = 'http://f5buddyprojects.com/facebooklogin/'; //return to ho... | true |
014d28c377ecedc8064052ce963352415aea3a8d | PHP | potenzatk/hirebee | /includes/loops.php | UTF-8 | 2,241 | 2.5625 | 3 | [] | no_license | <?php
/**
* Functions related with the main frontend loops for users and projects.
*/
/**
* Queries and paginates the projects and loads the related loop template.
*/
function _hrb_loop_projects() {
global $hrb_options;
if ( ! $hrb_options->projects_frontpage ) {
return;
}
$args = array(
'posts_per_page'... | true |
b0afa1bca9d1f14d5ba6d59b14e310160772ab70 | PHP | lordelph/php-sip2 | /src/Request/RenewAllRequest.php | UTF-8 | 1,432 | 2.640625 | 3 | [
"MIT",
"GPL-1.0-or-later"
] | permissive | <?php
namespace lordelph\SIP2\Request;
/**
* RenewAllRequest is used to renew all items that the patron has checked out. The ACS should respond with a Renew All
* Response message.
*
* @method setInstitutionId(string $institutionId)
* @method setPatronIdentifier(string $patron)
* @method setPatronPassword(strin... | true |
ea46a737bc449f06a9fcd935f5692505fa6b749f | PHP | christianomm/controle_investimentos2 | /dao/carteiraDAO.php | UTF-8 | 10,096 | 2.65625 | 3 | [] | no_license | <?php
require_once("conexao.php");
require_once("../model/Ordem.php");
class CarteiraDAO{
public static $instance;
public $saldoOPDT=0;// testando DT
private function __construct() {
//
}
//************************************************************************************** */
... | true |
724bda115efd97658924d8c7e3e2d0ee2f6d43d1 | PHP | BLOBbox/BLOBkit | /contrib/blobtv/admin/common.php | UTF-8 | 7,537 | 2.703125 | 3 | [] | no_license | <?php
/**
* BLOBtv Producer 1.0
* (C) TVBLOB S.r.l. 2009
* Author: Francesco Facconi <francesco.facconi@tvblob.com>
*/
$db_conn = null;
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
if (version_compare(PHP_VERSION, '5.0.0', '<')) {
die ("ERROR: PHP 5.0.0 or greater is required");
} else {
$sqlite3 = fal... | true |
ea908557dbe8ce0a226e3672847095433ee785c6 | PHP | tuananh8985/landding_mq | /app/controllers/MembersController.php | UTF-8 | 1,585 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Dak
* Date: 6/8/2014
* Time: 8:26 AM
*/
class MembersController extends BaseController {
public function facebook_login(){
// if(Session::has('member_id')){
// return Redirect::to('/');
// }
// get data from input
$code = Inpu... | true |
99040a3eba7d23f68ab8781cec967510a0dbd1f9 | PHP | aosmorac/nutrifami_admin | /module/Admin/src/Admin/Model/Loockup.php | UTF-8 | 1,139 | 2.671875 | 3 | [] | no_license | <?php
/**********************************************************
* CLIENTE: PMA Colombia
* ========================================================
*
* @copyright PMA Colombia 2014
* @updated
* @version 1
* @author {Abel Oswaldo Moreno Acevedo} <{moreno.abel@gmail.com}>
**********************************************... | true |
529e06dfd292f6befba509e4e52b8b5a572037a9 | PHP | aputhin/datfile-analyzer | /app/Core/Model/Item.php | UTF-8 | 540 | 3.375 | 3 | [] | no_license | <?php
namespace Core\Model;
/**
* Item from a sale
*
* @author arthur.puthin
* @since 04/12/2016
*/
class Item {
private $id;
private $quantity;
private $price;
public function __construct($id, $quantity, $price) {
$this->id = $id;
$this->quantity = (int) str_replace(' ', '', $quantity);
$this->pri... | true |
5e6f56db3faa50f7481c02506af6a1ac59710499 | PHP | uiowa-slc/silverstripe-activedirectory | /src/Helpers/SAMLHelper.php | UTF-8 | 770 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace SilverStripe\ActiveDirectory\Helpers;
use OneLogin_Saml2_Auth;
use SilverStripe\Core\Object;
/**
* Class SAMLHelper
*
* SAMLHelper acts as a simple wrapper for the OneLogin implementation, so that we can configure
* and inject it via the config system.
*/
class SAMLHelper extends Object
{
/*... | true |
78b61e813968c057a565b6a2083c042d9161cf8a | PHP | rodrigoqi/introarrays | /auxiliar.php | UTF-8 | 307 | 2.65625 | 3 | [] | no_license | <?php
function getFrutas(){
$frutas = array("banana",
"abacate",
"uva",
"abacaxi",
"morango",
"bergamota",
"pitanga",
"caqui",
"caju",
"cereja"
);
return $frutas;
}
?> | true |
be2692b1968dd3ccf032efa1c8c38be408257fb7 | PHP | phpravikr84/crawler | /news/datascrapping/articlescripts.php | UTF-8 | 12,666 | 2.546875 | 3 | [] | no_license | <?php
class articlescripts
{
function getArticles($request_data){
$servername = "localhost";
$username = "root";
$password = "naveen123";
$dbname = "newsdb";
$article_data = array();
date_default_timezone_set('asia/kolkata');
// Create connection
$conn = new mysqli($serverna... | true |
3f0315fe7861e178f54cd1fffd6ec27be123230d | PHP | hisaboh/w2t | /arbo/service/TwitterAPI/TwitterAPI.php | UTF-8 | 9,858 | 2.5625 | 3 | [] | no_license | <?php
import("core.Http");
import("core.Tag");
import("core.Text");
import("core.File");
module("TwitterUser");
module("TwitterMessage");
module("TwitterDirectMessage");
module("TwitterLimitStatus");
module("TwitpicResponse");
/**
* Twitter
*
* @see http://watcher.moe-nifty.com/memo/docs/twitterAPI13.txt
* @see htt... | true |
c38324e0b0b018404763d8f8671a8023b6c76626 | PHP | saber13812002/eshopgram | /Models/saber_model.php | UTF-8 | 469 | 2.578125 | 3 | [] | no_license | <?php
class saber_model extends Model {
public function __construct() {
parent::__construct();
}
public function run($referrer) {
$sth = $this->db->prepare("SELECT * FROM users"
);
$sth->execute();
$data = $sth->fetch();
}
public function getData() {
... | true |
240f5cda2a15cf82351145b2bc878b08bc47d862 | PHP | jjeising/framework | /Library/Random.php | UTF-8 | 663 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/*
* Random
*
* (c) Jannes Jeising <jannes@jeising.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Random {
public static function hex($length) {
return bin2hex(openssl_random_pseudo_bytes(ceil... | true |
14a40ef2ba8bb0818a473e27a4ecfed3cfd05075 | PHP | blayson/apv-n | /src/controllers/MeetingController.php | UTF-8 | 5,255 | 2.59375 | 3 | [] | no_license | <?php
namespace Controllers;
use Controllers\Exceptions\DuplicateException;
use DateTime;
use Exception;
use Models\MeetingModel;
use Models\PersonModel;
use Psr\Container\ContainerInterface;
use Slim\Http\Request;
use Slim\Http\Response;
class MeetingController extends BaseController
{
/* @var $meeting MeetingM... | true |
f7b5d721dab948878942e41e0cabdfe142801348 | PHP | FlyE32/diamondphp | /public/controllers/Friends_Controller.php | UTF-8 | 2,563 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Web\Controller;
use Hal\Controller\Base_Controller;
use \R as R;
class Friends_Controller extends Base_Controller
{
public function __construct($container)
{
parent::__construct($container);
if ($this->session->get('email') === FALSE)
{
$this->redirect('login');
exit;
}
$this->templa... | true |
6844b3d7537c350a1187815b9df2efc242fc49a7 | PHP | lonelymonkey/billsProject | /tourismsurfing/userBlog.php | UTF-8 | 5,109 | 2.65625 | 3 | [] | no_license | <link href="style.css" rel="stylesheet">
<!DOCTYPE html>
<?php
include "../includes/globalSurf.inc";
if (!empty($_POST['blogSubmit'])) {
/*
*/
/*
echo '<pre>';
var_dump($_FILES['image']);
echo '</pre>';
exit();
*/
//move_uploaded_file($_FILES['image']['tmp_name'],"images/".$imageName);
/*... | true |
ba7437b2ad04e51b95b9526f5146f0c22a572ba4 | PHP | michaelbonds/laravel-db2 | /src/Query/Processors/DB2Processor.php | UTF-8 | 1,867 | 2.78125 | 3 | [] | no_license | <?php
namespace MichaelB\Database\DB2\Query\Processors;
use Illuminate\Database\Query\Builder;
use Illuminate\Database\Query\Processors\Processor;
use Cooperl\Database\DB2\Query\Grammars\DB2Grammar;
class DB2Processor extends Processor {
/**
* Process the results of a "select" query.
*
* @param \... | true |
60f12fb2611da1c334d2addd2b9a91d4933f1d95 | PHP | pr0pellerhead/website-ljuben-lape | /admin/login.php | UTF-8 | 728 | 2.578125 | 3 | [] | no_license | <?php
session_start();
$err=0;
if(isset($_POST['email'])&&strlen($_POST['email'])==0){$err++;}
if(isset($_POST['password'])&&strlen($_POST['password'])==0){$err++;}
if($err==0){
include 'db.php';
$sql='select * from korisnici where email= :email and password= :password ';
$query=$db->prepare($sql);
... | true |
fc60f7f89ebad55adbda90ca2b947730ef6452d6 | PHP | gaiterjones/magento-facebookstorefront | /lib/PAJ/Application/MagentoFacebookStoreFront/Page.php | UTF-8 | 5,383 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
*
* Copyright (C) 2016
*
*
* @who PAJ
* @info paj@gaiterjones.com
* @license -
*
*
*/
namespace PAJ\Application\MagentoFacebookStoreFront;
class Page {
public $__;
public $__config;
public $__t;
public function __construct($_variables) {
// load class variables
... | true |
40dd857c4475333d9d94af5b554321e99d6da5de | PHP | BrainP4in/panel | /app/Console/Commands/OAuth2/PackagesCommand.php | UTF-8 | 4,219 | 2.515625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace Pterodactyl\Console\Commands\OAuth2;
use Illuminate\Console\Command;
use Illuminate\Contracts\Config\Repository as ConfigRepository;
use Psr\Log\LoggerInterface as Log;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\RuntimeException;
class PackagesCommand extends Comma... | true |
6a9bde412f213ab0193c33522a19510fcba08be9 | PHP | zackurben/service-webhooks | /lib/AllPlayers/Webhooks/Teamsnap/UserCreatesEvent.php | UTF-8 | 5,619 | 2.671875 | 3 | [] | no_license | <?php
/**
* @file
* Contains /AllPlayers/Webhooks/Teamsnap/UserCreatesEvent.
*/
namespace AllPlayers\Webhooks\Teamsnap;
use AllPlayers\Webhooks\ProcessInterface;
use AllPlayers\Utilities\PartnerMap;
use Guzzle\Http\Message\Response;
/**
* The unique TeamSnap implementation of the user_creates_event webhook.
*/
... | true |
29b9d653dc5e2fc36c4ef84f96a652e5ca474404 | PHP | zyd2001/SimplePHPFramework | /Framework/Database.php | UTF-8 | 1,202 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace Framework;
use Framework\Exceptions\DatabaseException;
use Medoo\Medoo;
class Database
{
private $medoo;
private static function errorHandler($db)
{
$err = $db->error() ?? ["00000"]; // prevent medoo return null error
if ($err[0] !== "00000") // for pdostatement error
... | true |
5dcf9345fd6512ad3c0b8d2c91dcdd814c58851d | PHP | disqontrol/disqontrol | /src/Dispatcher/Failure/FailureStrategyCollection.php | UTF-8 | 3,376 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Disqontrol package.
*
* (c) Mediaplus.cz s.r.o. <info@mediaplus.cz>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Disqontrol\Dispatcher\Failure;
use Disqontrol\Configuration\Configuration;... | true |
aa80d755dddaf8c0aa2367024ca293812f9ef815 | PHP | Fibanachi/PHP | /128.php | UTF-8 | 253 | 2.59375 | 3 | [] | no_license | Дана строка 'abc abc abc'.
Определите позицию первой найденной
буквы 'b', если начать поиск
не с начала строки, а с позиции 3
<?php
echo strpos('abc abc abc', 'b', 3); | true |
ddfdd4f55eeb9f9103b5175c91f3435efbe0b9fa | PHP | cyrus-mc/stuff | /code/php/memory/cache.php | UTF-8 | 4,618 | 3.34375 | 3 | [] | no_license | <?php
/**
* Implemention of memory cache
*
* vim:ts=3:sw=3:
*
* @author: Matthew Ceroni
* @version: 1.0
*
* @package memory
*/
class cache {
/**
* @access protected
* @var array - cache
*/
protected $cache_lines = null;
/**
* @access private
* @var string - holds the latest error message
... | true |
ea21de7f6951b064d939bc84e9e647af2b6f4330 | PHP | CollectorsQuest/collectorsquest.com | /lib/model/migration/PropelMigration_1355326653.php | UTF-8 | 2,016 | 2.578125 | 3 | [] | no_license | <?php
/**
* Migration to automatic set rating & machine tags for collectibles from predefined collections
*/
class PropelMigration_1355326653
{
public function preUp()
{
// add the pre-migration code here
}
public function postUp()
{
$collectorIdentifiers = CollectorIdentifierQuery::create()
... | true |
7150bb4be0dcac90bc184260e05aa2808e6cec20 | PHP | ctasca/mage-bundle | /Bundle/Skeleton/console-command/basic-command.tpl.php | UTF-8 | 684 | 2.5625 | 3 | [
"MIT"
] | permissive | {{php}}
declare(strict_types=1);
namespace {{namespace}};
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class {{class_name}} extends Command
{
/**
* @inheritdoc
*/
protected function configur... | true |
4ead5f1f99dfe3e9e013fc8ac910b28e8ecdecc7 | PHP | package-testing/laravel-53-crudapi | /app/Organisation.php | UTF-8 | 505 | 2.6875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Organisation extends Model
{
public $validation = [
'name' => 'required',
'abbreviation' => 'max:20'
];
protected $fillable = [
'name', 'abbreviation'
];
/**
* Override the output of var_dump.
*... | true |
3eb4683d2a58084f51685b5de74d1c72e1e878b6 | PHP | NemanjaSavic1993/muzickakutija | /admin/brisanjeKorisnici.php | UTF-8 | 1,377 | 2.515625 | 3 | [] | no_license | <?php
if (isset($_POST['btnIzbrisi'])) {
$id_kor = $_POST['izbrisi'];
foreach ($id_kor as $id) {
$upitBrisanje = "delete from korisnik where id_korisnik =".$id.";";
$rezBrisanje = mysql_query($upitBrisanje,$kon);
}
if ($rezBrisanje) {
echo "<div id='success'>Uspešno ste obrisali korisnike</d... | true |
bdb1ccabec0faf6b9e8a5cd64f5d110346737d28 | PHP | nomankabeer/Coding-Challenge-PHP | /Basic/FindHighestAndLowetNumberFromGivenString.php | UTF-8 | 681 | 4.59375 | 5 | [] | no_license | <?php
/*
In this little assignment you are given a string of space separated numbers, and have to return the highest and lowest number.
*/
function highAndLow($numbers)
{
$numbers = explode(' ', $numbers);
$high = $numbers[0];
$low = $numbers[0];
foreach ($numbers as $num... | true |
696797d902321add67a2f22fbe9f7f3fd6d9d9f3 | PHP | felipeunefa/clase_programaci-n1 | /maximoSalazar/mimodelo/Modelo/estudiantes.php | UTF-8 | 1,014 | 2.6875 | 3 | [] | no_license | <?php
require_once "conexion.php";
class estudiantesM extends Conexion
{
public function __construct()
{
parent::__construct();
}
public function get_estudiantes()
{
$result = $this->_db->query('select e.nombre as estudiante,e.ci,e.direccion,e.fecha_nacimiento,e.id_e... | true |