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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a8f7ef5cd71378149a482f00e85155a115700c5a | PHP | ihormihal/simpla | /api/mail/mail.class.php | UTF-8 | 1,206 | 2.6875 | 3 | [] | no_license | <?php
class SMTPMailer {
function smtpmail($to, $subject, $body, $from = '', $reply_to = '', $from_text = '') {
require_once 'class.phpmailer.php';
$subject = "=?utf-8?B?".base64_encode($subject)."?=";
//$from_text = "=?utf-8?B?".base64_encode($from_text)."?=";
global $error;
$mail = new PHPMailer(); // c... | true |
ddd4e6fb9894377c5fa7692ffa00645349cd7903 | PHP | Inmmelman/ae-rest-api | /app/Http/Controllers/ProductsController.php | UTF-8 | 744 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Products;
use Illuminate\Http\Request;
class ProductsController extends Controller
{
/**
* Show the profile for the given user.
* @return Response
*/
public function view()
{
$products = Products::where('is_visible', 1)->with('vouchers')->get();
return view... | true |
4c918b2b4b7226adb7cb30dc33d03efecb594786 | PHP | lcfloveggg/WUIF1707-2-11-28 | /cook.class.php | UTF-8 | 2,600 | 3 | 3 | [] | no_license | <?php
//验证码类
class COOK
{
//随机因子
public $charset = 'abcdefghkmnprstuvwxyzABCDEFGHKMNPRSTUVWXYZ23456789';
public $code; //验证码
public $codelen = 4; //验证码长度
public $width = 200; //宽度
public $height = 80; //高度
public $img; //图像资源句柄
public $font; //字体
public $fontcolor; //字... | true |
33cdbccd14cd8a1a859ba3b8941138ba79a39b34 | PHP | alterlai/supportal | /src/Entity/Building.php | UTF-8 | 4,453 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass="App\Repository\BuildingRepository")
* @UniqueEntity(fields="co... | true |
fe5f84bd2d09cd146085ad1d29946502f6ba0f5c | PHP | alexandre-lusiak/Projet-Formation | /src/Controller/ArticleController.php | UTF-8 | 17,021 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Repository\ArticleLikeRepository;
use App\Entity\Article;
use App\Entity\Category;
use App\Entity\ArticleLike;
use App\Form\ArticleFormType;
use App\Form\CategoryFormType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\String\Slugger\... | true |
6f782be84469eda81ccd6758b3a0a8e75e5844b6 | PHP | tautvydascoding/2018-09 | /dirbame_cia/diena_18/Sigita/abstraction/vilkas.php | UTF-8 | 409 | 2.640625 | 3 | [] | no_license |
<?php
require_once("gyvunas.php");
class Vilkas extends Gyvunas{
function esti(){
echo "medzioja ir drasko viska";
}
function daugintis(){
echo "kazkaip";
}
function greitaiBega(){
// code....
}
}
// $Ao... | true |
7ad5593fdcf5e10306ee393ff1ebabf2ee9f2780 | PHP | vition/twoa | /Application/Common/Model/InfoModel.class.php | UTF-8 | 3,149 | 2.578125 | 3 | [] | no_license | <?php
/**
* @Author: vition
* @Email:369709991@qq.com
* @Date: 2017-07-11 16:04:09
* @Last Modified by: vition
* @Last Modified time: 2017-08-09 15:57:43
*/
namespace Common\Model;
use Think\Model;
/**
* 整合所有基本的信息管理
*/
class InfoModel extends Model{
protected $trueTableName = 'oa_config';
public $company;... | true |
97e99a91737d6f481dab5d0c3ed17ac7727f43f3 | PHP | sbr-technologies/mls_property | /console/migrations/m170330_062237_create_open_house.php | UTF-8 | 1,158 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
class m170330_062237_create_open_house extends Migration
{
public function up()
{
$this->createTable('mls_open_house', [
'id' => $this->bigPrimaryKey(),
'property_id'=> $this->bigInteger()->notNull(),
'date' => $this->date()->notNull(),
... | true |
36611f74ace4d32bde291db3734c74757c7922c9 | PHP | wishcan/show | /protected/components/Controller.php | UTF-8 | 1,364 | 2.5625 | 3 | [] | no_license | <?php
/**
* Controller is the customized base controller class.
* All controller classes for this application should extend from this base class.
*/
class Controller extends CController
{
/**
* @var string the default layout for the controller view. Defaults to '//layouts/column1',
* meaning using a single co... | true |
c683955fc626af1c6ca675ab6e614dffda682112 | PHP | joshuaheslin/online-tool-v1-php-server | /api/cloudbeds/login.php | UTF-8 | 1,150 | 2.578125 | 3 | [] | no_license | <?php
include('includes/DbOperation.php');
//$response = array();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['email']) && isset($_POST['password'])) {
//echo "hi";
$db = new DbOperation();
//echo "hi2";
if ($db->userWillLogin($_POST['email'], $_POST['password']... | true |
c0e2a0ced22bf2652f510fbf94f5043379842813 | PHP | cristyan12/nomina | /tests/Feature/DepartmentTest.php | UTF-8 | 3,526 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Feature;
use App\Models\Department;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class DepartmentTest extends TestCase
{
use RefreshDatabase;
/** @test */
function a_user_can_load_the_new_department_office()
{
$this->withoutExceptionHandling();... | true |
feb235b686a7dcd3c9af106381e08ebc7f97d924 | PHP | fernandezs/GrupoEscalante | /tests/traits/MakeArticuloTrait.php | UTF-8 | 1,836 | 2.5625 | 3 | [] | no_license | <?php
use Faker\Factory as Faker;
use App\Models\Articulo;
use App\Repositories\ArticuloRepository;
trait MakeArticuloTrait
{
/**
* Create fake instance of Articulo and save it in database
*
* @param array $articuloFields
* @return Articulo
*/
public function makeArticulo($articuloFie... | true |
4a9ef429ca338ce8ae320dc681788b06618ff466 | PHP | msm-code/coyote | /app/Services/GeoIp/Cache.php | UTF-8 | 1,006 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Coyote\Services\GeoIp;
use Illuminate\Contracts\Cache\Repository;
class Cache
{
const TTL = 60 * 60 * 24 * 30; // 30d
/**
* @var GeoIp
*/
protected $geoIp;
/**
* @var Repository
*/
protected $cache;
/**
* @param GeoIp $geoIp
* @param Repository... | true |
39e684399fb876e68af42b1f7e427387ff74bdb3 | PHP | aashley/thebhg | /tactician/cg/stats/hunters.php | UTF-8 | 1,591 | 2.65625 | 3 | [] | no_license | <?php
include_once('header.php');
if (empty($_REQUEST['order'])) {
$_REQUEST['order'] = 'points';
$_REQUEST['sort'] = 'desc';
}
page_header('Statistics Centre :: Hunters');
$table = new Table('Hunters', true);
$table->StartRow();
create_sort_headers($table, array('name'=>'Name', 'points'=>'Points', 'events'=>'Comp... | true |
6d14e5a3124823e100d4abed26570f1c15a7b61b | PHP | EDDY-EDDY/ng | /src/Model/eMailer/Email.php | UTF-8 | 456 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Model\eMailer;
class Email
{
public function send($to, $msg, $subject)
{
$headers = "From: projectmanager@pglappspot.com\r\n";
$headers .= "X-Sender: PGL Project Managet < projectmanager@pglappspot.com >\n";
$headers .= "Return-Path: projectmanager@pglappspot.co... | true |
3145cf864d3c319dec83ada20a93ceb08e1b8d32 | PHP | jjeising/framework | /Library/HTTP/Client.php | UTF-8 | 5,956 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/*
* HTTP Client
*
* (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.
*/
requires(
'HTTP/Client/Response'
);
class HTTP_Client {
protected $_curl;
protected $_c... | true |
3f3966d9d22a5b70d38324a8ad61dfef3bd80f03 | PHP | dansmaculotte/mondialrelay-php | /src/Exceptions/CoordinateFormatException.php | UTF-8 | 398 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace DansMaCulotte\MondialRelay\Exceptions;
use Exception;
class CoordinateFormatException extends Exception
{
public static function digitError(): self
{
return new self('2 digits max are expected for coordinate floor value');
}
public static function formatError():self
{
... | true |
b3257e1786e9fdde0cec6de17f5b748b97c3e52c | PHP | takuro/recd | /php/validate.php | UTF-8 | 1,840 | 3.046875 | 3 | [] | no_license | <?php
class Validate {
function __construct() {
}
public static function uri($uri) {
// empty check
if (empty($uri)) { return null; }
// cleanup
$uri = trim($uri);
// is uri?
$check = filter_var($uri, FILTER_VALIDATE_URL,
FILTER_FLAG_SCHEME_REQUIRED,
... | true |
8c992195d5998a7777aad008dde91492dd1bea34 | PHP | bmarti08/Nemaid | /addReference.php | UTF-8 | 3,390 | 2.625 | 3 | [] | no_license | <?php
/*
* Created on 12 january 2014 by Heia
*
*/
include("includes/haut.php");
include("connectionSQL.php");
include("functions.php");
?>
<center><h1>The database management</h1></center><br />
<input type="button" name="Return" value="Return" onClick="document.location='displaySpecies.php'" /><b... | true |
523c0085045ad0a840c8721998a312ca5acb4aad | PHP | chancemedia/cmlib | /lib/CMForm.php | UTF-8 | 15,468 | 2.984375 | 3 | [] | no_license | <?php
include_once("CMClass.php");
include_once("CMMySQL.php");
// some change
/**
* @brief HTML form object builder.
*
* @section cmform_desc Description
* This class is for building dynamic safe form objects. This works by constructing the object
* from the attributes provided below in the table. The built f... | true |
11b7b582385d7bdc0fa0e72300089635581abf9c | PHP | Maunavkod/resto-3WA | /application/controllers/HomeController.php | UTF-8 | 1,117 | 3.015625 | 3 | [] | no_license | <?php
class HomeController
{
// Définit la vue à charger
const VIEW = 'Home';
public function httpGetMethod(Http $http, array $queryFields)
{
/*
* Méthode appelée en cas de requête HTTP GET
*
* L'argument $http est un objet permettant de faire des redirections etc.
* L'arg... | true |
4fb8a5a9096d5433c6aa7c2157acd0071e620fe6 | PHP | mcotiong/lis161dynamic | /database.php | UTF-8 | 946 | 2.515625 | 3 | [] | no_license | <?php
session_start();
//Initialize variables
$username = "";
$email = "";
$discord = "";
$id = 0;
$edit_state = false;
//Connect to database
$con = mysqli_connect("localhost","root","","lis161_finalproject");
if (!$con) {
echo "Connection to database unsuccessful!";
} else {
// echo "Connection succes... | true |
17ca4e0f1f6b7596f9e8daee88d242bfc1b9d42f | PHP | franlima/lotosystem | /models/user.php | UTF-8 | 1,681 | 2.671875 | 3 | [] | no_license | <?php
class UserModel extends Model{
public function register(){
// Sanitize POST
$post = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
$password = md5($post['password']);
$username = $post['username'];
if($post['submit']){
if($post['username'] == '' || $post['password'] == ''){
Messages::... | true |
076c200475a478124db398650fa7e167e4716b47 | PHP | NeveDimkaUA/plugins | /woocommerce-point-of-sale-pos/includes/admin/settings/wc-pos-settings-register.php | UTF-8 | 12,069 | 2.546875 | 3 | [] | no_license | <?php
/**
* WooCommerce POS General Settings
*
* @author Actuality Extensions
* @package WoocommercePointOfSale/Classes/settings
* @category Class
* @since 0.1
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
}
if (!class_exists('WC_POS_Admin_Settings_Register')) :
/**
... | true |
621a110f330ba0b380a6f74470ae274c233681c9 | PHP | BarabaraLee/Online-Voting-Web-App | /edit_user.php | UTF-8 | 4,916 | 2.578125 | 3 | [] | no_license | <!DOCTYPE html>
<?php
session_start();
$con = mysqli_connect("localhost","root","","php");
if(isset($_GET['id'])){
$edit_id = $_GET['id'];
$sel = "select * from register_user where user_id='$edit_id'";
$run = mysqli_query($con,$sel);
$row = mysqli_fetch_array($run);
$id ... | true |
2aef0bdf893e697b35d16f7e401fbc96cb445615 | PHP | ramaniG/roar | /admin/admin_user/update_password.php | UTF-8 | 2,911 | 2.640625 | 3 | [] | no_license | <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<?php
DEFINE('ROOT', '../../');
require_once(ROOT.'_config.settings.php');
require_once(ROOT.'sso/session.php');
$errors = '';
$id = (!isset($_GET["id"]) ? '' : $_GET["id"]);
$name = '';
$db = new Database();
$db->query("SET NAMES utf8");
... | true |
4dd33a58a17904f8ccc3a138becae5c27262a342 | PHP | mkenney/Projects | /solutions/Numbers/Fibonacci_Sequence.php | UTF-8 | 474 | 3.59375 | 4 | [
"MIT"
] | permissive | #!/usr/bin/env php
<?php
/**
* https://github.com/mkenney/Projects
* Enter a number and have the program generate the Fibonacci sequence to that
* number or to the Nth number.
*/
if (count($argv) < 2) {
$iterations = (int) readline("How many Fibonacci numbers do you want? ");
} else {
$iterations = int($argv[1])... | true |
92c262ea2e48c0f70c9be80114400276123400ef | PHP | chadelofson/BookStoreExample | /ShoppingCart.php | UTF-8 | 5,267 | 3.1875 | 3 | [] | no_license | <?php
include('Connection.php');
//Shopping cart uses cookies to store cart items.
//PHP script uses an array for adding, removing and displaying the cart items.
//Cookies can contain only string data so array must be serialized.
$cookieName = "myCart2";
// retrieve cookie and unserialize into $bookArray
if (isset($_C... | true |
836ff69c2bd909150a132427b0eb32c12814a877 | PHP | paul-tastic/coding-challenges | /Number-Fun/array-squares/solution.php | UTF-8 | 673 | 4.25 | 4 | [] | no_license | <?php
// Given two arrays a and b write a function comp(a, b)
// that checks whether the two arrays have the "same" elements, with the same multiplicities.
// "Same" means, here, that the elements in b are the elements in a squared, regardless of the order.
function comp($a,$b) {
if ((count($a == count($b))) &... | true |
8bc3f76524c4934566cdc7c409ca0aa0029a1af2 | PHP | robertpatan/php-cnp-validator | /src/Cnp.php | UTF-8 | 4,676 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Src;
use stdClass;
use Src\Contract\ICnp;
class Cnp implements ICnp
{
private const MATCH_REGEX = '/^([1-9]{1})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{3})([0-9]{1})/';
private const CONTROL_CHECKSUM_NUMBERS = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9];
priva... | true |
df514ebea5d03de2f765aeb50618d25c2c69c345 | PHP | kongeee/kodlar | /PHPcodes/B8_diziFonksiyonlari/ders11diziSplice/ders11_1.php | UTF-8 | 1,626 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="tr-TR">
<head>
<meta http-equiv="Content-Type" content = "text/html; charset=utf-8">
<meta http-equiv="Content-Language" content = "tr">
<meta charset="UTF-8">
<title>b8d11_1</title>
</head>
<body>
<?php
//array_splice() -> Dizide ekleme silme yapabilir, belirtilen... | true |
3544ea65d1fa0fb7c37ee6d2f5c2beb6c84f2250 | PHP | Mikojin/ranking | /panel/playerPanel.php | UTF-8 | 12,286 | 2.71875 | 3 | [] | no_license | <?php
?>
<?php
/*****************************************************************************
* playerListPanel.php
* Page de la liste des joueurs
*****************************************************************************/
require_once "./lib/lib_tools.php";
require_once "./panel/listPanel.php";
/**
* call... | true |
8c3f5497c7f4ae169227b55c3cb6452a16bc4d71 | PHP | puttpotsawee/perdtye2 | /app/models/Product_direct.php | UTF-8 | 1,500 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
/**
* Product_direct
*
* @property integer $idproduct_direct
* @property float $price
* @property integer $quantity
* @property integer $remai... | true |
92ca8bc4c5360c436caa5805450dc8e05e1ca690 | PHP | AEJ-FORMATION-DATA-IA/ChalengePHP-Sana | /update.php | UTF-8 | 4,753 | 2.546875 | 3 | [] | no_license | <?php
require 'include/head.php';
$requete = $pdo->prepare("SELECT * FROM users WHERE id = ?");
$requete-> execute([$_GET['id']]);
$resultatInscrit = $requete->fetch(PDO::FETCH_OBJ);
$id = $resultatInscrit->id;
// verification des champs
if(!empty($_POST)){
if (isset($_POST['newnom']) && !empty($_POST['newnom']) ... | true |
35e0fd314c976c5ed1001fb6b03edb1d33e9ff8c | PHP | SiddharthVartha/BusTicketBookingSystem | /connection2.php | UTF-8 | 617 | 2.625 | 3 | [] | no_license | <?php
$conn = new mysqli("localhost", "root", "", "your database name");
if ($conn->connect_error) {
die("ERROR: Unable to connect: " . $conn->connect_error);
}
echo 'Connected to the database.<br>';
$Username = $_POST['username'];
$Password = $_POST['password'];
echo $Username;
$selectquery= (... | true |
b5b5c1fcebca297d3d29d66ca2a200ae11118812 | PHP | zacksleo/yii2-cms | /src/models/Page.php | UTF-8 | 2,166 | 2.59375 | 3 | [] | no_license | <?php
namespace zacksleo\yii2\cms\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use yii\helpers\Url;
use nemmo\attachments\models\File;
/**
* This is the model class for table "{{%page}}".
*
* @property integer $id
* @property string $title
* @property string $slug
* @property integer $status
* @prope... | true |
7abf24351ef017d5e42940713c65c7f00d8256fa | PHP | odiaseo/Rhemasys | /thirdparty/WURFL/ClassLoader.php | UTF-8 | 1,104 | 2.515625 | 3 | [] | no_license | <?php
/**
* WURFL API
*
* LICENSE
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 2008-2009, WURFL-Pro S.r.l., Rome, Italy
*
*
*
* @category WURFL
* @package WURFL
* @copyright WURFL-PRO SRL, Rome, Italy
* ... | true |
da047e229cc3b13f8df787a66a2271406b166a47 | PHP | Archip3lago/berzanApp_kalender | /testa.php | UTF-8 | 156 | 2.6875 | 3 | [] | no_license | <?php
$string_datum = date('y') . "-" . date('m') . "-01";
$date_datum = strtotime($string_datum);
echo date('t', $date_datum);
var_dump($date_datum); | true |
a562a97f249204122c219430edeab562ec524483 | PHP | graynwhite/whtw | /registrationform.php | UTF-8 | 4,682 | 2.578125 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Membership Form</title>
<link rel="stylesheet" type="text/css" href=".... | true |
8fbdb8619bb57a975e4e842dec4c3f9988860714 | PHP | sk9727192/learn_github | /email_val.php | UTF-8 | 392 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
</head>
<body>
<form name="myForm" action="" method="post">
Email: <input name="email" type="email">
<input type="submit" value="Submit">
</form>
</body>
</html>
<?php
$email = $_POST['email'];
if (!filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
echo("$email is a valid email... | true |
ce43a70be52fe5593605240f0ac2c221c92721c5 | PHP | nekken/neo-store | /src/Entity/OrderShipping.php | UTF-8 | 1,716 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace NeoStore\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use NeoStore\EntityHelper;
class OrderShipping
{
protected $amount;
protected $id;
protected $order;
protected $taxes;
protected $title;
public function __construct($data=array())
{
... | true |
0822ef382d3891d4a0c08790f29254699ed23e2d | PHP | Tracyllx/project | /第2组-组长方培杰/api/goodslist.php | UTF-8 | 717 | 2.609375 | 3 | [] | no_license | <?php
$price = array{220,180,230,200,210,240,250}
$color = array{'red','black','pink','white','blue'}
$data = array{15,16,17,18,12,23,31}
$sale = array{110,120,130,210,220,240}
$goodslist = array();
for($i=0;$i<5;$i++){
$imgNum = $i%5;
// 创建关联数组
$goods = array(
... | true |
ff69128faed19fe120ff39aa8384b59e022d98b0 | PHP | nathan-fiscaletti/ansi-util | /src/Ansi/StringBuilder.php | UTF-8 | 5,790 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ansi;
/**
* Class used to handle string formatting using Ansi.
*/
class StringBuilder
{
/**
* The current string.
*
* @var string
*/
private $string;
/**
* Set the bold flag.
*
* @param string $value
*
* @return \Ansi\StringBuilder
*/
... | true |
4cdf89291aa8d4e13a04ea648cdc46ba2348ad38 | PHP | yp18355665881/yp18355665881 | /php/conn.php | UTF-8 | 421 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
header('content-type:text/html;charset = utf-8');
//连接数据库
define('HOST','localhost');
define('UESRNAME','root');
define('PASSWORD','root');
define('DBNAME','zhe800');
$conn = @new mysqli(HOST,UESRNAME,PASSWORD,DBNAME);
if($conn->connect_error){
die('数据库连接失败'.$conn->connect_... | true |
ff82d49d4884f000b76a5875a751c7e9a371e813 | PHP | iamchudvincent/angularcli-phplaravel-project | /crm/app/Http/Requests/OtherReservationListRequest.php | UTF-8 | 1,083 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class OtherReservationListRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
... | true |
fee23fec68b2fc112fa7c46de941e9fa4bc9c8c4 | PHP | aydik99/architecture | /models/Task.php | UTF-8 | 2,040 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\db\Expression;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "task".
*
* @property int $id
* @property string $name
* @property string $date
* @property string $description
* @property int $user_id
*/
class Task extends \yii\db\Activ... | true |
6425f2c43a965d17632520b8be776e0f48f094cb | PHP | KrishnaXavier/seguranca-web | /src/seguro/main.php | UTF-8 | 415 | 2.75 | 3 | [] | no_license | <?php
require_once "config.php";
require_once "db.php";
function debug($msg){
if(AMB == "dev"){
echo "<br>(Debug) $msg <br>";
}
}
function filtro($in){
return filter_var($in, FILTER_SANITIZE_STRING);
/*
* Fontes:
* http://php.net/filter.filters
* http://www.phpit.com.br/artigos/filtrando-e-validando-... | true |
4f50949b7725d621417bc638469ff897598433b6 | PHP | zlf-self/treasureChest | /everything/page/1.php | UTF-8 | 392 | 2.5625 | 3 | [] | no_license | <?php
$item_array = scandir("./");
foreach($item_array as $item)
{
$suffix = (explode(".",$item));
if(count($suffix)>1){
if(end($suffix)=="jpg" ||end($suffix)=="jpeg"){
echo " <div class=\"col-2 col-md-1 list_item\" style='background-image: url(\"./".$item."\");'><div class=\"ve_text\">
... | true |
f76a79a7a197b86919c82d01ea5ebf71077acab8 | PHP | SlickSkyZA/CodeIgniter-3-AdminLTE | /application/core/MY_Controller.php | UTF-8 | 921 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class MY_Controller extends CI_Controller {
// declare property
public $content_view;
public $_title;
public $_subTitle;
function __construct(){
parent::__construct();
// load libraries
// $this->load->librar... | true |
1124c37e700552745b24a56ccea323e56f7fe945 | PHP | ignasave/ISBoosting | /pagina/partials/Procesar_Login.php | UTF-8 | 555 | 2.546875 | 3 | [] | no_license | <?php
include 'conexion.php';
$usuario = $_POST["usuario"];
$password = $_POST["password"];
$selectar = "SELECT usuario,password from usuarios WHERE usuario = '$usuario' AND password = '$password'";
$resultado = mysqli_query($conexion,$selectar);
if($row = mysqli_fetch_array($resultado)){
if($row['passwor... | true |
719e369e7b236ab6a5d15166740a8d6c78c653c6 | PHP | Sladjana6/HolidayTravel | /server.php | UTF-8 | 1,769 | 2.890625 | 3 | [] | no_license | <?php
//definiše se mime type
header("Content-type: application/xml");
//konekcija ka bazi
require_once "konekcija.php";
//priprema upita
$sql="SELECT * FROM polasci ORDER BY id ASC";
//kreiranje XMLDOM dokumenta
$dom = new DomDocument('1.0','utf-8');
//dodaje se koreni element
$polasci = $dom->appendChild($dom->crea... | true |
2c691bbde459379b3bffeb84631697ca9d53186d | PHP | Rubiaceae/fruit_database | /add_new_receive.php | UTF-8 | 1,528 | 2.796875 | 3 | [
"MIT"
] | permissive | <!--#新增行口編號、司機編號等功能add_new_form.php所需要的接收方
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<script>setTimeout(function(){window.location = document.referrer;},1500);</script><!--1.5秒後自動回上一頁-->
</head>
<table>
<?php
#判定新增的... | true |
a837e191425b2f781d1c67af4466741131b467ec | PHP | stof/Patchwork-Dumper | /src/Symfony/Bundle/DebugBundle/Twig/Node/DebugNode.php | UTF-8 | 2,549 | 2.5625 | 3 | [] | no_license | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\DebugBundle\Twig\Node;
/**
* @author Julien Galenski <j... | true |
652eb6583545f368a1b910cb19cc9c20fcd0e368 | PHP | AyeHninSwe/Travel-And-Tour-Ver1 | /changePass.php | UTF-8 | 1,836 | 2.515625 | 3 | [] | no_license | <?php
session_start();
$agencyId=$_SESSION['agencyId'];
$custId=$_SESSION['custId'];
//echo $custId;
//echo $agencyId;
include("ChangePassDb.php");
$query1="Select * from agency where AgencyId='".$agencyId."'" ;
$result=mysqli_query($con,$query1);
$num_rows= mysqli_fetch_assoc($result);
$emailOrPhone1=$num... | true |
a7d4ec999101dbefa48952690c45dc741cd0e2d7 | PHP | RustamDR/phpSortMethods | /lib/sort/Shaker.php | UTF-8 | 651 | 3.390625 | 3 | [] | no_license | <?php
namespace lib\sort;
class Shaker extends SortMethod
{
public function sort()
{
$top = 0;
$bottom = $this->_size;
$k = 0;
while ($top < $bottom) {
for ($i = $top; $i < $bottom; $i++) {
if ($this->_result[$i] > $this->_result[$i + 1]) {
$this->change($i, $i + 1);
... | true |
b1078c268adfbaec05489d5022a367db55f1de46 | PHP | seanloo/framework | /src/console/output/driver/Nothing.php | UTF-8 | 379 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace SeanPhp\console\output\driver;
use SeanPhp\console\Output;
class Nothing
{
public function __construct(Output $output)
{
// do nothing
}
public function write($messages, bool $newline = false, int $options = 0)
{
// do nothing
}
public function renderEx... | true |
8e09e0094c9d10eea3708146715a2f3da026240e | PHP | karawangsaz/ulet | /database/seeds/SeriesTableSeeder.php | UTF-8 | 1,000 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
class SeriesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker::create();
$material_ids = DB::table('materials')->pluck('id')->toArray()... | true |
90f43e262ee2057bafe122a4bdee3731ce48fba4 | PHP | XamarinGuru/Shoperella-admin | /src/AppBundle/Storage/S3Storage.php | UTF-8 | 949 | 2.890625 | 3 | [] | no_license | <?php
namespace AppBundle\Storage;
use Aws\Common\Credentials\Credentials;
use Aws\S3\S3Client;
use Aws\S3\Exception;
class S3Storage {
const AWS_KEY = "AKIAJSPX2IFWEQTPFFYA";
const AWS_SECRET = "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";
public function PutFile($filename, $localPath){
// gene... | true |
5e559aaf9c79588eddd5350b3c37613c1cbf13a9 | PHP | daviro05/Juegos | /trivial2/guardar.php | UTF-8 | 224 | 2.515625 | 3 | [] | no_license |
<?php
$contenido = $_POST['persona'];
$puntos = $_POST['puntos'];
$file = fopen("puntuaciones.txt", "a");
fwrite($file, $contenido. " ");
fwrite($file, $puntos. PHP_EOL);
fclose($file);
//header('Location: index.html');
?> | true |
f825897fe87b15416b6c74a1fd19ea580d296c24 | PHP | princephpdev/tamtamcrm | /app/Factory/RecurringInvoiceToInvoiceFactory.php | UTF-8 | 1,114 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Factory;
use App\Models\Customer;
use App\Models\Invoice;
use App\Models\RecurringInvoice;
/**
* Class RecurringInvoiceToInvoiceFactory
* @package App\Factory
*/
class RecurringInvoiceToInvoiceFactory
{
/**
* @param RecurringInvoice $recurring_invoice
* @param Customer $customer
... | true |
a3598dbe0dd5883908d823946fb08063d21bfea6 | PHP | NgoniX/ziviso_portal | /app/Helpers/PrintHelper.php | UTF-8 | 1,139 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Fradrick.Charakupa
* Date: 10/22/2016
* Time: 3:48 PM
*/
namespace App\Helpers;
class PrintHelper
{
public static function normal_static_info($name, $value, $col_md=3)
{
$value = is_null($value)?'N/A':$value;
echo $string =
'<tr class=... | true |
99891c4a235047370d573a1bcd90f36c03139a04 | PHP | J-aeto/symfony_project_todo | /src/Entity/Message.php | UTF-8 | 1,910 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\MessageRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=MessageRepository::class)
*/
class Message
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyTo... | true |
aaef48ca17c7d653ed28b5f33d467021fb7d7e66 | PHP | mustafayilmazist/php_proje_alt_yapisi_2 | /system/fonksiyonlar.php | UTF-8 | 1,116 | 2.671875 | 3 | [] | no_license | <?php
function post(){
if ($_POST) {
return true;
}else{
return false;
}
}
function get(){
if ($_GET) {
return true;
}else{
return false;
}
}
function p($deger){
if (isset($_POST[$deger])) {
return trim($_POST[$deger]);
}
return false;
}
function g($deger){
if (isset($_GET[$d... | true |
edfb49f37b3be6663a5542438bd546ef8f1a579b | PHP | OscarEdwin/git | /suma.php | UTF-8 | 231 | 3.546875 | 4 | [] | no_license | <?php
$numer1 = 5;
$numero2 = 5;
$suma = $numero1+$numero2;
$resta = $numero1-$numero2;
$multiplicacion = $numero1*$numero2;
echo "Suma: ".$suma."<p>";
echo "Resta: ".$resta."<p>";
echo "Multiplicacion: ".$multiplicacion."<p>";
?>
| true |
683ddd520c48341e3719ae0be3b71a3ebc95d2c3 | PHP | davidwyly/unit-tests-lunch-n-learn | /src/Davidwyly/Lunchnlearn/Http/Controller/Collect/Json.php | UTF-8 | 510 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Davidwyly\Lunchnlearn\Http\Controller\Collect;
use Davidwyly\Lunchnlearn\Exception\ControllerException;
use stdClass;
trait Json
{
/**
* @return stdClass
* @throws ControllerException
*/
protected function collectJson(): stdClass
{
if (empt... | true |
e77cfded03e132e9d00b6efc4a15a7af7345681f | PHP | zengxianbing/phpStudy | /object_oriented/trait.php | UTF-8 | 249 | 3.171875 | 3 | [] | no_license | <?php
class Base
{
public function sayHello(){
echo "Hello";
}
}
trait SayWorld
{
public function sayHello(){
parent::sayHello();
echo 'World!';
}
}
class MyHelloWorld extends Base{
use SayWorld;
}
?> | true |
09d2d1ffbd63b0d5ce9c559c6ef3e81de437ccdc | PHP | Cloudstek/doctrine-behaviour | /src/SoftDeletableTrait.php | UTF-8 | 1,642 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Cloudstek\DoctrineBehaviour;
use Carbon\CarbonImmutable;
use Doctrine\ORM\Mapping as ORM;
/**
* Soft-deletable trait.
*
* Adds deletedAt field for soft-deletion of an entity. When deletedAt is set to a date in the future, it behaves the
* same way like the ExpirableTrait... | true |
5306044d6b942b0a51ec1fbb1e796d6f024a6ac0 | PHP | SergSova/poland | /console/controllers/RbacController.php | UTF-8 | 707 | 2.703125 | 3 | [] | no_license | <?php
namespace console\controllers;
use yii\console\Controller;
class RbacController extends Controller{
public function actionInit(){
$authManager = \Yii::$app->authManager;
// Create roles
$admin = $authManager->createRole('admin');
$author = ... | true |
af319e04ca95fd0621b219b972285fdca1a74ef8 | PHP | shohanshohan/study_log | /PHP/interface_abstract_trait/Trait.php | UTF-8 | 1,187 | 3.515625 | 4 | [] | no_license | <?php
/**
*自 PHP 5.4.0 起,PHP 实现了一种代码复用的方法,称为 trait。
Trait 是为类似 PHP 的单继承语言而准备的一种代码复用机制。Trait 为了减少单继承语言的限制,使开发人员能够自由地在不同层次结构内独立的类中复用 method。
Trait 和 Class 组合的语义定义了一种减少复杂性的方式,避免传统多继承和 Mixin 类相关典型问题。
Trait 和 Class 相似,但仅仅旨在用细粒度和一致的方式来组合功能。 无法通过 trait 自身来实例化。
它为传统继承增加了水平特性的组合;也就是说,应用的几个 Class 之间不需要继承。
*从基类继承的成员会被 trait 插入的成员... | true |
190ffa057d4463285e56863d357b3e68f77457ec | PHP | DatPHP/khoaluantotnghiep | /src/Controller/OrdersController.php | UTF-8 | 1,280 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use App\Entity\Orders;
class OrdersController extends AbstractCon... | true |
d77095c771bced4b061a2d35a25998bcc485cbbb | PHP | f5sistemas/jarvis-fiscal-api | /src/JarvisFiscal/JarvisFiscalCommonAPI.php | UTF-8 | 1,432 | 2.890625 | 3 | [] | no_license | <?php
namespace F5Software\JarvisFiscal;
/**
* Class JarvisFiscalCommonAPI
* @package F5Software\JarvisFiscal
*/
class JarvisFiscalCommonAPI {
/**
* @var string
*/
protected $api_token;
/**
* @var string
*/
protected $ambiente;
/**
* RequestAPI constructor.
* @p... | true |
5f051619c2d9e5b8a37151095e596facbd692cf0 | PHP | yakineEvogue/iesa | /php__oo/4-constante-static-self/Compteur.class.php | UTF-8 | 734 | 3.359375 | 3 | [] | no_license | <?php
class Compteur
{
public static $nbInstanceClass = 0;
public $nbInstanceObjet = 0;
public function __construct(){
self::$nbInstanceClass ++;
$this -> nbInstanceObjet ++;
}
}
//-------------------
$c1 = new Compteur; //NbInstanceClass = 1 //nbInstanceObjet = 1
$c2 = new Compteur; //NbInstanceClass = 2 ... | true |
f9cb936e80e52288a021a5bf37c9caca475c6862 | PHP | murmuren/budget | /src/error_handling/ErrorReportersFinder.php | UTF-8 | 1,391 | 3.125 | 3 | [] | no_license | <?php
require_once("LogReporter.php");
require_once("application/models/LoggerFinder.php");
require_once("application/models/ErrorInspector.php");
/**
* Locates and instances error reporters based on XML content.
*/
class ErrorReportersFinder {
protected $reporters = array();
/**
* Reads XML tag errors.{enviro... | true |
75dd3432a7e7fbbea4d96947722c08f3a7248de8 | PHP | nxzwcry/laravel-angular | /app/Helpers/function.php | UTF-8 | 781 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
function numToWeek($dow){
switch ($dow)
{
case 0:
return "周日";
case 1:
return "周一";
case 2:
return "周二";
case 3:
return "周三";
case 4:
return "周四";
case 5:
return "周五";
case 6:
... | true |
e2fab94dcedd4b7ea537558c707a2aabd94fbc80 | PHP | ll931217/uhuru | /public/layout/hasher.php | UTF-8 | 314 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
//Password Encryption code
class HashPassword {
public function Hash($unhashed) {
$options = [
'cost' => 11
// 'salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM),
];
$hashed = password_hash($unhashed, PASSWORD_BCRYPT, $options);
return $hashed;
}
}
?>
| true |
d6dd1f1ec33efa3ef2325243b01e2e6ef18e7b78 | PHP | josh1919/joshcruz.net | /photography/includes/db_connection.php | UTF-8 | 883 | 2.71875 | 3 | [] | no_license | <?php //TODO: I'll need to fix the connection to make sure this will work.
//NEXT FOUR LINES ARE FOR PHOTOGRAPHY.JOSHCRUZ.NET
define("DB_HOST", "localhost");
define("DB_USER", "joshcruz_cs19923");
define("DB_PASS", "1450tobias");
define("DB_NAME", "joshcruz_photography");
// 1. Create a database connection
$conn =... | true |
bd4e42e7fb01668868868ec0cb4183dc6934eef1 | PHP | ClemThierry/GroupImac | /projets/controllerProjet.php | UTF-8 | 887 | 2.765625 | 3 | [] | no_license | <?php
require_once('modelProjet.php');
// récupérer tous les projets
function getProjetsAsTable() {
return json_encode(getAll());
}
// récupérer un seul projet avec son id
function getAProjetByID($id) {
return json_encode(getProjetByID($id));
}
// ajouter un projet
function addAProjet($form) {
$proje... | true |
728711692175680c8fb13f824922be6335fceb0b | PHP | Tracey061/WebDiploma | /9numberGuessingTracey/templates/numberGuessing.html.php | UTF-8 | 631 | 2.796875 | 3 | [] | no_license | <form action="numberGuessing.php" method="post">
<fieldset>
<h1>Guess the Number</h1>
<p><?= $message ?></p>
<p>There are <?= $guessLeft ?> guesses left.</p>
<p>
<label for="guess">Enter a number between 1 and 100:</label>
<input type="number" name="guess" id=... | true |
5a25f75459a950c76e303dbaa90e4b731e03e6e5 | PHP | Ingenico-ePayments/connect-sdk-php | /lib/Ingenico/Connect/Sdk/ResponseClassMap.php | UTF-8 | 1,165 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ingenico\Connect\Sdk;
/**
* Class ResponseClassMap
*
* @package Ingenico\Connect\Sdk
*/
class ResponseClassMap
{
/** @var string */
public $defaultSuccessResponseClassName = '';
/** @var string */
public $defaultErrorResponseClassName = '';
/** @var string[] */
protected ... | true |
f0768716a20f0a166724715e6f06178e25609fc9 | PHP | gondzio00/command_app | /src/Controller/GithubController.php | UTF-8 | 547 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Controller;
class GithubController extends ServiceController
{
public function __construct(string $account = '',string $repository = '', string $branch = 'master')
{
$this->client = new \Github\Client();
$this->setLastCommit($account,$repository,$branch);
}
public... | true |
6ddb6d044b7606b28d68b0cc806cac571c620916 | PHP | Ismael-Cobo/Online-Store | /proyecto_php_mvc_poo/models/pedido.php | UTF-8 | 4,092 | 2.53125 | 3 | [] | no_license | <?php
class Pedido {
private $id;
private $usuario_id;
private $provincia;
private $localidad;
private $direccion;
private $coste;
private $estado;
private $fecha;
private $hora;
private $db;
public function __construct() {
$this->db = Database::connect();
}
... | true |
209a87bff9e128fcd866cd7d2a78747af07c5a26 | PHP | roberthaydn/pjhsc-dirty-codes | /mvc_namespace/view/Account.php | UTF-8 | 177 | 2.53125 | 3 | [] | no_license | <?php
namespace account
{
class Account
{
public static function Create() {
return new Account;
}
public function account() {
return "Account!";
}
}
}
?> | true |
1c61849cb6ede826c2ef3c4e4e8b4193f60f47a5 | PHP | Dilan/Barberry | /library/Plugin/Ffmpeg/Command.php | UTF-8 | 2,358 | 3.046875 | 3 | [] | no_license | <?php
class Plugin_Ffmpeg_Command implements Plugin_Interface_Command {
const MAX_VIDEO_BITRATE = 4000;
const MAX_AUDIO_BITRATE = 256;
const MAX_WIDTH = 1280;
const MAX_HEIGHT = 720;
private $_videoBitrate = null;
private $_audioBitrate = null;
private $_screenshotTime = null;
private... | true |
f054ba242d9c4ada06743ee689318ead9b5e0eb0 | PHP | su-mi-lab/Persona | /tests/Persona/TestClass/Domain/RepositoryInterface.php | UTF-8 | 137 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
interface RepositoryInterface
{
/**
* @param $order_id
* @return Order
*/
public function get($order_id);
} | true |
e7a485b2a9475f2db245919e8a535c89b6a415d0 | PHP | OpenMageModuleFostering/sendmachine | /app/code/community/Sendmachine/Sendmachine/Helper/Data.php | UTF-8 | 3,600 | 2.515625 | 3 | [] | no_license | <?php
class Sendmachine_Sendmachine_Helper_Data extends Mage_Core_Helper_Abstract {
public function initEmailConfig($smtp_settings, $smtpEncryptionType) {
if ($smtp_settings) {
$config = array(
"host" => $smtp_settings['hostname'],
"username" => $smtp_settings["username"],
"password" => $smtp_sett... | true |
cd7aa3c0f834a3622366a2b1b0f7a83fb837dc6c | PHP | Marhz/cv | /Template1.php | UTF-8 | 1,035 | 2.515625 | 3 | [] | no_license | <?php
/**
*
*/
class Template1
{
public $img_x;
public $img_y;
public $header_offset;
public $sub_header_align;
public $font_header;
public $font_text;
public $background_img;
public $background_x;
public $background_y;
public $font_style_header;
public $font_style_text;
public $sub_header_color;
public ... | true |
a7fe16055e1e105db46cfa8b3efd7832745c4d9a | PHP | Dasmanog/phppaskaitos | /2021.08.09/blue.php | UTF-8 | 1,030 | 2.546875 | 3 | [] | no_license | <!-- 5. Sukurkite du atskirus puslapius blue.php ir red.php
Juose sukurkite linkus į pačius save (abu į save ne į kitą puslapį!).
Padarykite taip, kad paspaudus ant linko puslapis ne tiesiog persikrautų, o PHP kodas (ne tiesiogiai html tagas!) naršyklę peradresuotų į kitą puslapį
(iš raudono į mėlyną ir atvirkščiai... | true |
348a572afad3725e7d0da05401eff0eb2159b2cd | PHP | momogasang/Project2 | /src/favor.php | UTF-8 | 1,106 | 2.5625 | 3 | [] | no_license | <?php
include 'mysqli.php';
// 设置sql 语句,查询全部数据
$sql = "select * from traveluser where UserName = '{$_COOKIE['username']}' limit 1";
// 发送sql语句,获得查询结果
$result = $conn->query($sql);
$id = "";
if($result->num_rows > 0) {
while($row = $result->fetch_assoc()){
$id = $row['UID'];
}
}else {
... | true |
1d9420bf92f48df94daedc9e2a2de9943859c652 | PHP | jaredgray/wordpress-profiles | /Data/ProfileDataMapper.php | UTF-8 | 4,878 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
require_once(dirname(__FILE__)."/DataMapper.php");
/**
* Hi, I'm ProfileDataMapper
*
* I was born 09/11/2012. I'm told I was created to retrieve data from a database. My dad DataMapper helps me a little. I made a new
* friend ProfileDataBinder that does something with the data I get until it gets sent to w... | true |
1dcb2b94b24eb1587a66af63bd98e5342a6dce38 | PHP | perfumer/framework | /src/Framework/Gateway/HttpGateway.php | UTF-8 | 2,950 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Perfumer\Framework\Gateway;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class HttpGateway implements GatewayInterface
{
/**
* @var array
*/
protected $modules = [];
/**
* @var string
*/
protected $prefix;
/**
... | true |
f15fa88998bbd6b05aef6becc337cfb6462c3dcd | PHP | bamyers99/Bambots | /src/lib/com_brucemyers/DataflowBot/Transformers/Transformer.php | UTF-8 | 1,370 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
Copyright 2015 Myers Enterprises II
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | true |
8699494e6ba29672be559006acf144bf27c6a7d0 | PHP | Yazany6b/php-repo | /GCM_SERVER/register.php | UTF-8 | 2,457 | 2.671875 | 3 | [] | no_license | <?php
// response json
$json = array();
/**
* Registering a user device
* Store reg id in users table
*/
date_default_timezone_set('UTC');
if (isset($_REQUEST["oldregId"]) && isset($_REQUEST["regId"])) {
$gcm_regid = $_REQUEST["regId"];
$oldgcm_regid = $_REQUEST["oldregId"];
include_once './db... | true |
d7c5bd25661fb8c4cabdb090efba1fb6c58f7b70 | PHP | codedge/php | /exercises/practice/etl/.meta/example.php | UTF-8 | 217 | 3 | 3 | [
"MIT"
] | permissive | <?php
function transform($old)
{
$new = [];
foreach ($old as $points => $letters) {
foreach ($letters as $letter) {
$new[strtolower($letter)] = $points;
}
}
return $new;
}
| true |
1c58207cd3fb4d82bfdd84b2eecc63848aef569c | PHP | jpedraza/ebay_shopping | /Domain/Type/EbayShoppingStructDomainHistogramType.php | UTF-8 | 3,484 | 2.921875 | 3 | [] | no_license | <?php
/**
* File for class EbayShoppingStructDomainHistogramType
* @package EbayShopping
* @subpackage Structs
* @date 2013-09-04
* @author Mikaël DELSOL <contact@wsdltophp.com>
*/
/**
* This class stands for EbayShoppingStructDomainHistogramType originally named DomainHistogramType
* Documentation : ... | true |
f5f30229c86287e453cf8590ec383762bc22a6b3 | PHP | Fedott/backlog | /amphp/src/Backlog/Repository/ProjectRepository.php | UTF-8 | 1,667 | 2.53125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Fedot\Backlog\Repository;
use Amp\Promise;
use Amp\Success;
use Fedot\Backlog\Model\Project;
use Fedot\Backlog\Model\User;
use Fedot\DataMapper\IdentityMap;
use Fedot\DataMapper\ModelManagerInterface;
use function Amp\call;
class ProjectRepository
{
/**
* @var ModelMa... | true |
1febe769e23e62a8c4571df9fc06886234e4c7d8 | PHP | darwikey/ProjetSgbd | /src/Page.php | UTF-8 | 2,348 | 2.609375 | 3 | [] | no_license | <?php
include_once('Database.php');
include_once('Club.php');
include_once('Equipe.php');
include_once('Joueur.php');
include_once('Match.php');
include_once('Consultation.php');
include_once('Ajouter.php');
include_once('Feuille.php');
include_once('Modifier.php');
include_once('Supprimer.php');
function main()
{
... | true |
dbb9b5231e8e4284a1a7d273de6ccff645300c43 | PHP | lindelius/php-json-patch | /src/Operation/CopyOperation.php | UTF-8 | 2,611 | 3.015625 | 3 | [
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] | permissive | <?php
namespace Lindelius\JsonPatch\Operation;
use Lindelius\JsonPatch\Exception\FailedOperationException;
use Lindelius\JsonPatch\Exception\InvalidOperationException;
use Lindelius\JsonPatch\Utility\JsonPointerUtility;
use function array_key_exists;
use function array_pop;
use function is_array;
/**
* @internal
... | true |
03ad9db4f912a60a495a9ff5d8308ea71592202e | PHP | liquan1234/think.php | /redis/red/producer.php | UTF-8 | 790 | 3.046875 | 3 | [] | no_license | <?php
//连接redis数据库
$redis = new Redis();
$redis->connect('127.0.0.1',6379);
$redis_name = 'add';
//模拟100人请求秒杀(高压力)
// for ($i = 0; $i < 100; $i++) {
$uid = rand(10000000, 99999999); // 用户id吧!
//获取当前队列已经拥有的数量,如果人数少于十,则加入这个队列
$num = 10;
// print_r($redis->lLen($redis_name));die;
... | true |
821c09b3688fdf3c35daa0c5ba5c51b454f2ea81 | PHP | Skarlso/phpadvent | /src/day6/part1.php | UTF-8 | 1,947 | 3.109375 | 3 | [] | no_license | <?php
require "../helpers/timer.inc";
$time_start = microtime(true);
function shutdown()
{
// This is our shutdown function, in
// here we can do any last operations
// before the script is complete.
global $handle, $time_start;
if ($handle) {
print("Closing file handler.\n");
fclo... | true |
9712563ba312f487a0f465066c0e054fa6de2eb2 | PHP | xline82/byob | /application/libraries/Mozilla/BYOB/Editor.php | UTF-8 | 1,863 | 2.734375 | 3 | [] | no_license | <?php
/**
* BYOB editor module
*
* @package Mozilla_BYOB_Editor
* @subpackage Libraries
* @author l.m.orchard <lorchard@mozilla.com>
*/
class Mozilla_BYOB_Editor {
public $id = 'change_me';
public $title = 'Change Me';
public $view_name = null;
public $review_view_name = null;
... | true |