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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
de03c4e7737f4cb1a9cfce1e90eb7e0b2f82ccf4 | PHP | asr2704/SitePerso | /src/assets/api/directories.php | UTF-8 | 273 | 2.703125 | 3 | [] | no_license | <?php
echo $_GET . "<br />";
echo getcwd() . "<br />";
$directories = glob(dirname() . '/../*', GLOB_ONLYDIR);
$dirCount = count($directories);
echo $dirCount . "<br />";
$i = 0;
while ($i < $dirCount)
{
echo $i . " " . $directories[$i] . "<br />";
$i++;
}
?>
| true |
a8adbe10e98dd90c9b0da02046aca5ff4ade7ae5 | PHP | tholok97/imt2291-project1 | /src/privilegeRequestHandler.php | UTF-8 | 2,151 | 2.734375 | 3 | [] | no_license | <?php
session_start();
require_once dirname(__FILE__) . '/classes/UserManager.php';
require_once dirname(__FILE__) . '/classes/User.php';
require_once dirname(__FILE__) . '/classes/DB.php';
require_once dirname(__FILE__) . '/classes/SessionManager.php';
$sessionManager = new SessionManager();
// grant privilege
$us... | true |
b768e3872186ad814ed3cf43ff72d7295eb3bcb0 | PHP | 869413421/algorithmStudy | /structure/KruskalMST.php | UTF-8 | 2,066 | 3.265625 | 3 | [] | no_license | <?php
require_once __DIR__ . '/EdgeWeightedGraph.php';
require_once __DIR__ . '/Edge.php';
require_once __DIR__ . '/MinPriorityQueue.php';
require_once __DIR__ . '/UF.php';
/**
* krusal算法
* Class KrusalMST
*/
class KrusalMST
{
//最小生成树的所有边
private $mst;
private $uf;
private $pq;
public functio... | true |
40b4f3790bf77ae6df87c0fa6482529929c71f12 | PHP | yudhbir/phpstripe | /pay.php | UTF-8 | 2,057 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
require_once('vendor/autoload.php');
\Stripe\Stripe::setApiKey('xxxxxxxxxxxxxxxxxxxxxxxx');
/**
*
* Make a charge payment
*
**/
// $myCard = array('number' => '4242424242424242', 'exp_month' => 8, 'exp_year' => 2018);
// $charge = \Stripe\Charge::create(array('card' => $myCard, 'amount' => 60, 'currency' => ... | true |
54d6bdffa8de98242ced9e8d1712420b66448798 | PHP | Blankenship-Daniel/phinestversion-api | /app/Http/Controllers/SongsController.php | UTF-8 | 828 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Repositories\SongRepository;
use App\Song;
class SongsController extends Controller
{
public function getAllSongs() {
$songs = Song::orderBy('slug')->get();
return json_encode($songs);
}
public function getSongByI... | true |
fd59f80c1f606b731ac4277132dead4e946d3827 | PHP | comaw/micronic | /app/helpers/Url.php | UTF-8 | 1,198 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: comaw
* Date: 05.01.2019
* Time: 23:25
*/
namespace app\helpers;
/**
* Class Url
*
* @package app\helpers
*/
class Url
{
/**
* @param string $field
* @param string $sort
*
* @return string
*/
public static function createSort(string $... | true |
b005c9a925adce6cdb745a5562f2da0444e08582 | PHP | calu/wvtv10 | /app/models/Copy of Document.php | UTF-8 | 8,487 | 2.765625 | 3 | [] | no_license | <?php
class Document extends \Eloquent {
// Add your validation rules here
public static $rules = array(
'title' => 'required',
'description' => 'required | min:2',
);
// author niet verplicht
//
public static $messages = array(
'required' => "Het trans('document.'.:attribute) veld moet ingevuld zijn... | true |
725813cbae159f42e13742e35a314fe6294b7c9c | PHP | nearj/drip | /drip/test.php | UTF-8 | 1,716 | 3.765625 | 4 | [] | no_license | <?php
// 3 x + 16 *
// (3 + x) * 16
$input = array();
array_push($input, 'a');
array_push($input, 'b');
array_push($input, 'c');
var_dump($input);
array_pop($input);
var_dump($input);
// class v
// {
// public $type;
// public $variable = null;
// public $kk = 3;
// public function __construct(bool... | true |
8623d32807cedb100b3eacd0070386d7fc4a0d6a | PHP | paullewallencom/php-978-1-8495-1362-3 | /_src/3623OS_04_Code/distinct.php | UTF-8 | 977 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
require('dbconnection.php');
$mongo = DBConnection::instantiate();
//get an instance of MongoDB object
$db = $mongo->database;
$result = $db->command(array('distinct' => 'sample_articles', 'key' => 'category'));
// echo '<pre>';
// print_r($result);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
... | true |
d720de455684eff199014490997c8c366f7dcae6 | PHP | RoseLintel2/laravel55 | /app/Http/Controllers/Api/ChapterController.php | UTF-8 | 1,438 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Model\Chapter;
class ChapterController extends Controller
{
//章节列表
public function getChapterList($novelId)
{
$chapter = new Chapter();
$list = $chapter->getChapterList($nov... | true |
ebd7cc1306141610937791b12ce7b7d7e016275e | PHP | tonksol/forum | /Files_not_use/category/category.php | UTF-8 | 1,672 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: frede
* Date: 21-03-2018
* Time: 14:31
*/
// Create variable and select collumns from DB
$categories = "SELECT categoryName, categoryDescription, imgpath1, imgpath2, imgpath3 FROM category";
$result = $connection->query($categories);
//Check if table contain rows
if ($resu... | true |
b6c9916f76f0d42f0b038a8bbe6f85f526c3ac7e | PHP | MapleSyrupGroup/dbsampler | /src/Migrator.php | UTF-8 | 8,209 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Quidco\DbSampler;
use Doctrine\DBAL\Connection;
use Psr\Log\LoggerInterface;
use Quidco\DbSampler\DatabaseSchema\TablesList;
use Quidco\DbSampler\DatabaseSchema\ViewsList;
/**
* Migrator class to handle all migrations in a set
*/
class Migrator
{
/**
* @var LoggerInterface
*/
priv... | true |
b2c0df73188260c3db3965dbb9e8f1af23c41d62 | PHP | Ozerich/m.video-tools | /protected/modules/email/components/Import/Models/ImportBlockBanner.php | UTF-8 | 1,483 | 2.953125 | 3 | [] | no_license | <?php
class ImportBlockBanner extends ImportBlock
{
private $url;
private $image;
private $area_coords = array();
/**
* @param array $area_coords
*/
public function setAreaCoords($area_coords)
{
$this->area_coords = $area_coords;
}
/**
* @return array
*/
... | true |
623b5af5f620e248469f089a8612d6a8ba9b7634 | PHP | WritingPanda/codeup.dev | /public/classes/address_data_store.php | UTF-8 | 251 | 2.578125 | 3 | [] | no_license | <?php
require_once('classes/filestore.php');
class AddressDataStore extends Filestore {
// Sets filename to all lowercase
public function __construct($filename = '') {
$filename = strtolower($filename);
parent::__construct($filename);
}
}
?> | true |
a3b2f379a184690b9a1e70629bf86882d6d06af9 | PHP | mashud-rana-bd/MultiAuth | /database/seeds/UsersTableSeeder.php | UTF-8 | 661 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\User;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$user=new User();
$user->role_id="1";
$user->name="Md.Admin";
$user->username="admin";
... | true |
b45f1ce4e8103b6b4263d841f259bda94d18ac15 | PHP | joulert02/PROYECTO-SIR | /SIR/Controller/productController.php | UTF-8 | 4,337 | 2.671875 | 3 | [] | no_license | <?php
if (isset($_REQUEST['estado']) && isset($_REQUEST['id'])) {
$estado = (1 == $_REQUEST['estado']) ? 0 : 1;
$idProducto = $_REQUEST['id'];
var_dump($estado . $idProducto);
try {
$con = new PDO("mysql:host=localhost;dbname=s.i.r;charset=utf8", "root", "");
// set the PDO error mode to exception
$con->setAt... | true |
2dbcccd30e895741110220e4684cd6b8173170bc | PHP | McDibou/projet_catalogue | /model/admin/article/delete.article.admin.model.php | UTF-8 | 953 | 2.640625 | 3 | [] | no_license | <?php
/**
* select all images with a article
* @param number $id
* @param mysqli|false $db
* @return bool|mysqli_result
*/
function selectImg($id, $db)
{
return mysqli_query($db, "SELECT * FROM `catalog.img` WHERE `fkey_id_article` = $id");
}
/**
* delete article with these associations in other tables
* @... | true |
dbe31c5aee8d889445d2552663e5b1f37e5eb353 | PHP | Bodo8/addProduct | /app/SharedKernel/src/Pricing/PricingService.php | UTF-8 | 2,644 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace SharedKernel\Pricing;
use App\SharedKernel\src\Pricing\Calculations\TotalCalculation;
use SharedKernel\Pricing\Calculations\ProductPrice;
use SharedKernel\Pricing\Calculations\VatCalculate;
use SharedKernel\ValueObject\VatRates;
/**
* @author Bogusław Trojański
*/
class P... | true |
df1b249a87e45735649218df71f7f0e6c66a831d | PHP | NicoM88/Simplon | /php/conditions/solution4.php | UTF-8 | 752 | 3.359375 | 3 | [] | no_license | <?php
/**
* Completez ce code source pour que le script affiche
*
* $numX est le plus grand des trois nombres
*
*/
$num1 = $_GET['num1'];
$num2 = $_GET['num2'];
$num3 = $_GET['num3'];
if(!isset($num1) || !isset($num2) || !isset($num3)) {
die("Vous devez appeler le script de cette facon : <br /><br /><strong>http://... | true |
911bcd85f5fd57c1bf81630f7a774217fe03019d | PHP | kelyz/IRIS | /controllers/helloworld.php | UTF-8 | 299 | 2.78125 | 3 | [] | no_license | <?php
class Helloworld extends Controller{
function run($xml){
$contentOfFirst = $xml->resourceList->resource[0]->content;
// Do some processing on content.
return "<content>". $contentOfFirst ."</content>";
//return "<Hello>
//<num> ". (2*$xml->numWords). "</num>
//</Hello>";
}
} | true |
5a28d95194678e56e7a741aa513a256f220e8f27 | PHP | elinoretenorio/php-headless-crud-for-movies-db | /src/MovieGenres/MovieGenresModel.php | UTF-8 | 1,579 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Movies\MovieGenres;
use JsonSerializable;
class MovieGenresModel implements JsonSerializable
{
private int $movieGenresId;
private int $movieId;
private int $genreId;
public function __construct(MovieGenresDto $dto = null)
{
if ($dto === null) {
... | true |
369c19986eb43e6c3b809a4253fae6e672af3ce5 | PHP | XenosEleatikos/MusicBrainz | /src/Filter/Browse/Relation/RelatedEntity/AreaTrait.php | UTF-8 | 527 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace MusicBrainz\Filter\Browse\Relation\RelatedEntity;
use MusicBrainz\Value\EntityType;
use MusicBrainz\Value\MBID;
/**
* Provides a setter for the entity type area.
*/
trait AreaTrait
{
/**
* Defines a relation to an area.
*
* @param MBID $mbid The MusicBrainz Identifier (MBID) of t... | true |
dbdb4abd7930e737751331cea69ce6deba7c94ff | PHP | villalon/alignit | /dostuff.php | UTF-8 | 2,616 | 2.515625 | 3 | [] | no_license | <?php
session_start();
include 'class.php';
//Lo qe se recibe de la pag anterior
$user = $_POST['user'];
$mail = $_POST['mail'];
$pass = $_POST['pass'];
$pass2 = $_POST['pass2'];
$com1 = $_POST['com1']; //id de compañia qe eligio
$com2 = $_POST['com2']; //nombre de compañia qe agrego
$posi = $_POST['posi'];
$depa = $_P... | true |
4f419bbcb39e622b768f9988663dc67d7d6eadeb | PHP | gusaljr/dwesGBaquerizo | /tema1/ejercicios tema 1 Control de Flux/ejer1.1.php | UTF-8 | 103 | 2.59375 | 3 | [] | no_license | <?php
$num1 = $_GET["a"];
$num2 = $_GET["b"];
if ($num1> $num2)
echo $num1;
else
echo $num2;
?>
| true |
c5aaf6ad1a3129945679c6769a8f22617a404ac3 | PHP | ngyuki-sandbox/php-whoops | /src/WhoopsMiddleware.php | UTF-8 | 6,905 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace App\Component\Whoops;
use LogicException;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use ReflectionM... | true |
90d14d77d3b2b00d4cc8e782ad1cd218d7a5ab61 | PHP | kapilsharma/ChessMoves | /src/Phpreboot/Chess/Board/ChessBoard.php | UTF-8 | 1,933 | 3.28125 | 3 | [] | no_license | <?php
namespace Phpreboot\Chess\Board;
class ChessBoard
{
const DIRECTION_TOP = 1;
const DIRECTION_DOWN = 2;
const DIRECTION_LEFT = 3;
const DIRECTION_RIGHT = 4;
const DIRECTION_TOP_LEFT = 5;
const DIRECTION_TOP_RIGHT = 6;
const DIRECTION_BOTTOM_LEFT = 7;
const DIRECTION_BOTTOM_RI... | true |
795fb45849596339c9ec469155cba9edfe449eea | PHP | movicon/movicon-db | /src/db/DbActiveRecord.php | UTF-8 | 3,053 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace movicon\db;
use \ArrayAccess;
use movicon\db\Db;
use movicon\db\DbConnection;
use movicon\db\DbRecord;
use movicon\db\DbTable;
use movicon\db\exception\DbException;
/**
* Active record implementation.
*/
class DbActiveRecord extends DbRecord
{
private $_tableName = "";
private $_cols = [];
... | true |
f7540c486cbf3e78d043bfcbf9433ffe48bbc004 | PHP | teugeny/simple-crm | /src/Application/Mapper/Contract/DTOMapperInterface.php | UTF-8 | 281 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Application\Mapper\Contract;
use App\Domain\Shared\DTO\DomainDTOInterface;
use App\Domain\Shared\Entity\DomainEntityInterface;
interface DTOMapperInterface
{
public function mapFromEntity(DomainEntityInterface $entity, string $dto): DomainDTOInterface;
} | true |
74a35c75232da8c6c05d43aa1ae8d011aaeeac8f | PHP | nknab/Genese | /Application/Application/model/database/dbconnectionclass.php | UTF-8 | 1,405 | 3.0625 | 3 | [] | no_license | <?php
/*
*Database connection class
*/
/*
*include database credentials file
*/
require_once('dbcred.php');
class dbconnection
{
/*
*database connection properties
*/
public $dbconnect;
public $dboutcomes;
/*
*database connection method
*@return true or false
*/
public function connect()
{
... | true |
37230449845bb9277b2c83b56b4b21c7d81edfe9 | PHP | dianafigi/Laravel_models | /database/migrations/2019_11_21_155104_create_product_department.php | UTF-8 | 1,225 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProductDepartment extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('product_de... | true |
184194d773197eb27c41f7248629a12e6aaf6fe3 | PHP | RuchiraRay/cs6301-project | /php/signin.php | UTF-8 | 882 | 3.078125 | 3 | [
"MIT"
] | permissive |
<?php
/*
this page will signin user and create a session
two levels of signin: normal user and admin user
*/
//Setup connection
$conn = new mysqli('localhost','buser','buser','mydb');
//Check if connected
if($conn->connect_error){
die('Could not connect: '.$conn->connect_error);
}
//Get all the vari... | true |
bbf5a6d031822af915f523a2b3cd8f7f92b20422 | PHP | pardeep287/clapi | /app/Models/UnderOverUserStat.php | UTF-8 | 3,986 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\QueryException;
use App\Exceptions\PersonalRuntimeException;
use App\Exceptions\ResourceNotFoundException;
use App\Exceptions\InsufficientGoldException;
use Illuminate\Validation\ValidationExceptio... | true |
3292c6674899672aea6797fffc97bea539c85b18 | PHP | jitendersinghwp/test | /basic.php | UTF-8 | 880 | 3.578125 | 4 | [] | no_license | <?php
// class myClass{
// public const Laptop = "Dell";
// public static $lat = '238493849389';
// public $names = ["Jitender", "prateek", "raman"];
// protected $class = "12th";
// function tt(){
// return "ys";
// }
// }
// $nn = new myClass;
// echo "<pre>";
// print_r($nn);
// foreach($nn->names as $n){
/... | true |
af4dc205db642163ef12daa9abf76bde9551a13a | PHP | jgronowski/ibd | /lab1/zadanie 1/przyklad2.php | UTF-8 | 748 | 2.734375 | 3 | [] | no_license | <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<style>
table, tr, td {
border: 1px solid black;
}
</style>
<body>
<table>
<tbody>
<tr>
<?php
... | true |
7138221ab3244932b798cb2e1f2687e03fba6832 | PHP | 5ergiu/pure-php-mvc-framework | /src/Controller/LikesController.php | UTF-8 | 2,021 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\ArticleLike;
use App\Repository\ArticleLikesRepo;
use Exception;
use JetBrains\PhpStorm\NoReturn;
/**
* @property ArticleLikesRepo $ArticleLikesRepo
*/
class LikesController extends AbstractController
{
/**
* Adds a like.
* @return void
* @throws Exc... | true |
07ce11b885f810c1c89bb161ac001217841ffc7d | PHP | zliusha/fenxiao | /site/application/hooks/Acl.php | UTF-8 | 1,012 | 2.625 | 3 | [] | no_license | <?php
/**
* @Author: binghe
* @Date: 2018-07-30 15:36:44
* @Last Modified by: binghe
* @Last Modified time: 2018-07-30 15:36:45
*/
class Acl
{
private $exceptionHandler;
public function setExceptionHandler()
{
$this->exceptionHandler = set_exception_handler(function($e){
if ($e... | true |
6dd0b77cf39bab2a3edd60db93763cad9a91bc57 | PHP | ravapps/forex | /src/Forex/Bundle/EmailBundle/Click/ClickManager.php | UTF-8 | 956 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Forex\Bundle\EmailBundle\Click;
use Doctrine\ORM\EntityManager;
use Forex\Bundle\EmailBundle\Entity\EmailClick;
use Forex\Bundle\EmailBundle\Entity\EmailLink;
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
/**
* @DI\Service("forex.email.click_manager")
... | true |
823b78e1077458e940fb926010ebef28b24a6616 | PHP | asaokamei/WScore.DiContainer | /src/WScore/DiContainer/Container.php | UTF-8 | 8,109 | 2.953125 | 3 | [] | no_license | <?php
namespace WScore\DiContainer;
use WScore\DiContainer\Forge\Option;
use WScore\DiContainer\Storage\StorageInterface;
use WScore\DiContainer\Utils;
class Container implements ContainerInterface
{
/**
* @var \WScore\DiContainer\Forge\Forger
*/
private $forger;
/**
* @var \WScore\DiCon... | true |
d13a0f82a8fe5a83a2087e2a04d81054831e5ef8 | PHP | jesmarquez/contactosym | /src/Controller/ContactoController.php | UTF-8 | 2,492 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
// src/Controller/ContactoController.php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use App\Entity\Contacto;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use \... | true |
926120411960cf5f156b1438ae9411648ee9e428 | PHP | ouranoshong/bookmark-parser | /tests/ParserTest.php | UTF-8 | 5,939 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: hong
* Date: 2018/9/6
* Time: 10:23 AM
*/
namespace Test\Bookmark\Parser;
use Bookmark\Parser\Node\AbstractNode;
use Bookmark\Parser\Node\BookmarkNode;
use Bookmark\Parser\Node\DirectoryNode;
use Bookmark\Parser\Parser;
use PHPUnit\Framework\TestCase;
class ParserTest e... | true |
feba7a737677694878ccd5cad4618cc52883c0f1 | PHP | mikeduin/learn_php | /Arrays/MultidimensionalArrays.php | UTF-8 | 637 | 3.109375 | 3 | [] | no_license | <?php
$authorsMulti = [
"Male" => [
"Charles Dickens" => ["A Christmas Carol", "Oliver Twist"],
"William Shakespeare" => ["Romeo & Juliet", "Richard III"],
"Mark Twain" => ["Tom Sawyer", "Huck Finn"]
],
"Female" => [
"L.M. Montgomery" => ["Anne of Green Gables", "Anne of Avo... | true |
7eff18293bf73a5ba54e7cdaaee605f758036c90 | PHP | mimarcel/tic-tac-toe.php | /server/src/Server/Logger.php | UTF-8 | 132 | 2.65625 | 3 | [] | no_license | <?php
namespace Max\TicTacToe\Server;
class Logger
{
public function log($message)
{
echo $message . "\n";
}
}
| true |
c3e1814501a1bd3e7d91608983a9abdebfe5f20b | PHP | andriykonoz/cashTracer | /application/models/connector.php | UTF-8 | 650 | 3.046875 | 3 | [] | no_license | <?php
/*
* This class localize information about database.
*/
class Connector
{
static private $connection;
static function get_connection()
{
$host = "localhost";
$user = "root";
$password = "root";
$base = "cash_statistic";
// if (empty(self::$connection)) {
... | true |
16d52c191981111230de28db2628febb81875281 | PHP | apeweb/cmf | /profiles/core/modules/cmf_route/cmf_route.php | UTF-8 | 6,499 | 2.640625 | 3 | [] | no_license | <?php
if (count(debug_backtrace()) == 0) {
header('Content-Type: text/plain; charset=UTF-8', TRUE, 403);
die("The page cannot be displayed.\r\nThe request has not been fulfilled because the server does not authorise access to this request externally.");
}
class Cmf_Route {
private $_name = '';
private $_url =... | true |
e68c071be26d43e9b1f35e667413f94671f812fe | PHP | tonyhaha/fphp | /core/library/db/Db.php | UTF-8 | 6,072 | 2.796875 | 3 | [] | no_license | <?php
namespace Core\library\db;
class Db{
protected $pdo;
protected $res;
protected $config;
private static $instance;
function __construct(){
$this->connect();
}
static function getInstance(){
if(!isset(self::$instance)){
self::$instance = new Db();
... | true |
d210f4ea3f8c59933962769dc02a7be1b0dd00ee | PHP | jrdncchr/merlinleads | /application/helpers/danero_helper.php | UTF-8 | 556 | 2.578125 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
if (!function_exists('findObjInArray')) {
function _findObjInArray($array, $key)
{
foreach ($array as $obj) {
if ($key == $obj->k) {
return $obj->v;
}
}
return null;
}
}
... | true |
4711f5db5e7ccc1a32fe6524861c9a0d057867cf | PHP | wx-satellite/larabbs | /app/Models/User.php | UTF-8 | 3,873 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use App\Models\Traits\ActiveUserHelp;
use App\Models\Traits\RecordLastActivedTime;
use Illuminate\Auth\MustVerifyEmail as MustVerifyEmailTrait;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail as MustVerifyEmailContract;
use Illuminate\Foundation\Auth\... | true |
fad8b3d06c4bfcdcaae9861e07059b1e02ad04d3 | PHP | mainstreamer/base-home | /src/Services/BillCreatorService.php | UTF-8 | 2,951 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Entity\Bill;
use App\Entity\Subscription;
use App\Repository\ExchangeRateRepository;
use App\Repository\SubscriptionRepository;
use Doctrine\ORM\EntityManagerInterface;
class BillCreatorService
{
private $repository;
private $entityManager;
private $ratesFetcher;
... | true |
e97026cc2b81108730d99bd496811b1951b6258c | PHP | JBSTG/SeniorProject | /crawler/crawler.php | UTF-8 | 1,925 | 3.734375 | 4 | [] | no_license | <?php
// Example crawler code:
// 1) Pull a list of all URLs
// 2) For each URL on list:
// - Retrieve HTML code using file_get_contents()
// - Save the HTML in the 'Content' column in the database
// - Update the 'Last_Crawled column' in the database
$link = mysqli_conn... | true |
09f274c91355527544b0c648cd6adfea20ae96b2 | PHP | gahinton/phpfox | /PF.Src/Core/Controller.php | UTF-8 | 506 | 2.671875 | 3 | [] | no_license | <?php
namespace Core;
class Controller {
public $request;
public $url;
public $active;
private $_view;
public function __construct($path = null) {
$this->request = new Request();
$this->url = new Url();
$this->active = (new \Api\User())->get(\Phpfox::getUserId());
$this->_view = new View();
if ($pat... | true |
284e2702dd66af9f3d5873d7abffd92eff26adae | PHP | jasonmichels/lift-framework | /examples/index.php | UTF-8 | 1,510 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
require('../vendor/autoload.php');
use Lift\Framework\App;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use Lift\Framework\Http\Response;
class Jason {
public function handle(Request $request, array $args, string $name = null)
... | true |
859254a7f38ca7b4e8e44ce5587b03de0612ddbc | PHP | Schneidershades/stonks | /app/Http/Controllers/Api/Transaction/TransferController.php | UTF-8 | 1,612 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api\Transaction;
use App\Http\Controllers\Controller;
use App\Services\ProcessTransactionService;
use App\Http\Requests\Transaction\TransferFormRequest;
class TransferController extends Controller
{
public function __construct()
{
$this->middleware(['auth:api']);
... | true |
748d02bd6d5030164256c1995f3d315378c39db2 | PHP | suic-d/php-sort | /src/binarySearch.php | UTF-8 | 2,031 | 3.515625 | 4 | [] | no_license | <?php
/**
* 二分查找(迭代法).
*
* @param mixed $search 查找目标值
* @param array $arr 待检索的数组
* @param int $start 起始查找位置
* @param int $end 终止查找位置
*
* @return int 目标值在待检索数组中的位置
*/
function divideSearch($search, $arr, $start = null, $end = null)
{
// 起始查找位置
if (is_null($start)) {
$start = 0;
}
... | true |
272d82144064b7c92277bb6a3ca45d108a4a747b | PHP | P79N6A/fast | /webefast/models/acc/InvMonthModel.php | UTF-8 | 15,212 | 2.53125 | 3 | [] | no_license | <?php
require_model('tb/TbModel');
class InvMonthModel extends TbModel {
private $inv_yj_mx_tbls;
function __construct() {
@ini_set('memory_limit', '1024M');
parent::__construct();
$this->inv_yj_mx_tbls = $this->db->get_all_col("show TABLES like 'inv_yj_mx_%'"); //获取所有库存月结... | true |
f82113c7e1a3ab6f178d626932c85c9a39276158 | PHP | javedwasim/phpscripts | /htmltheme/Step2Wealth/test.php | IBM852 | 1,919 | 2.640625 | 3 | [] | no_license | <?php
ini_set('max_execution_time', 1800);
echo "Hello World! <br/>";
require_once("isdk.php");
$app = new iSDK;
// Test Connnection
if ($app->cfgCon("uk255"))
{
echo "Yabba Dabba Doo! You Are Connected To Infusionsoft!!!!!";
$contactData = array('FirstName' => 'John',
'LastName' => 'Doe',
... | true |
4181c41e4c8fe9cbc3312c76235a5f8a25572662 | PHP | septiyandiole/ujian-level-2 | /admin/include_barang/edit.php | UTF-8 | 2,758 | 2.890625 | 3 | [] | no_license | <?php
$barang_id = $_GET['id'];
$query_merk = "SELECT * FROM list_merk_barang";
$select_merk = mysqli_query($connection, $query_merk);
$query_jenis = "SELECT * FROM list_jenis_barang";
$select_jenis = mysqli_query($connection, $query_jenis);
// GET Category
$select_barang = mysqli_query($connection, "SELECT * FROM ... | true |
8083a4686b0c8b8a04299a3499eeaf6408978f0a | PHP | jeromeformation/PHPObjet0619 | /src/Examples/Compteur.php | UTF-8 | 295 | 3.28125 | 3 | [] | no_license | <?php
namespace src\Examples;
class Compteur
{
private static $compteur = 0;
public static function addCompteur()
{
static::$compteur += 1;
}
/**
* @return int
*/
public static function getCompteur(): int
{
return self::$compteur;
}
} | true |
c6779cd00403c37c1accba8f41b8c1ccb19ac30c | PHP | PetrosMAMALIOGKAS/PHPexercises | /ed2/utilisationMySql/index.php | UTF-8 | 1,259 | 3.078125 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<title>utilisation MySql</title>
</head>
<body>
<?php
$conn = mysqli_connect('localhost', 'root', '');
if (!$conn) {
die('connection failed: ' . mysqli_connect_error());
}
$sql = 'CREATE DATABASE identification';
if (mysqli_query($conn, $sql)) {
echo '<br/>Database created....'... | true |
b0ff4c8189052c8cb07f625cf0609be6a4d3f103 | PHP | mbruton/HTTP | /src/Message/Request.php | UTF-8 | 5,672 | 2.828125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: matt
* Date: 12/08/18
* Time: 20:12
*/
namespace mbruton\Transport\HTTP\Message;
use mbruton\Transport\HTTP\Address\URL;
use mbruton\Transport\HTTP\Client;
class Request
{
/**
* @var string $requestType;
*/
protected $requestType = Client::REQUEST_GET;... | true |
d82dbf7d194af2866d7439b9dacf911fb67540b4 | PHP | Phoenixton/Projet-v2 | /Articles/mkReviews.php | UTF-8 | 967 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Traitement de la review</title>
</head>
<body>
<p>
<?php
session_start();
require_once '../connectBase.php';
$db=$m->nsafar89;
$reviews=$db->reviews;
$news=$db->news;
function champsPleins() {
if($_POST["pseu... | true |
3b1abe6bf5d6fe053ad97d4ef6fd5157174a0789 | PHP | phbone/Hueclues | /controllers/signup_processing.php | UTF-8 | 2,787 | 2.609375 | 3 | [] | no_license | <?php
session_start();
include('../connection.php');
include('../database_functions.php');
include('../global_tools.php');
$email = mysql_real_escape_string($_POST['signupemail']);
$password = mysql_real_escape_string($_POST['signuppassword']);
$username = mysql_real_escape_string(substr($_POST['signupusername'], 0, ... | true |
8753ac63355bbe7a0c92569be583e3ed14d567bd | PHP | alsyr/IFit_Website | /removeFromTodoList.php | UTF-8 | 546 | 2.640625 | 3 | [] | no_license | <?php
$exerciseID= (int)$_GET['delete'];
try {
$con = new PDO("mysql:host=localhost;dbname=cs174", "cs174", "group76");
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "DELETE FROM todolist
WHERE exercise_id = ".$exerciseID;
// use exec() because no results are returned
$con->... | true |
4bd4d51b1b0df69436dd9ca3ffc32c1bd3222af3 | PHP | AkioUnity/sports-book | /app/Model/PaymentBonusUsage.php | UTF-8 | 3,855 | 2.53125 | 3 | [] | no_license | <?php
/**
* PaymentBonusUsage Model
*
* Handles PaymentBonusUsage Data Source Actions
*
* @package PaymentBonusUsages.Model
* @author Deividas Petraitis <deividas@laiskai.lt>
* @copyright 2013 The ChalkPro Betting Scripts
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version ... | true |
494ab077b0e375643dda1b4aa3a3232dfede7405 | PHP | k1sul1/k1kit | /src/php/lib/http.php | UTF-8 | 643 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace k1\HTTP;
function buildUrl(array $parts) {
return (isset($parts['scheme']) ? "{$parts['scheme']}:" : '') .
((isset($parts['user']) || isset($parts['host'])) ? '//' : '') .
(isset($parts['user']) ? "{$parts['user']}" : '') .
(isset($parts['pass']) ? ":{$parts['pass']}" : '') .
(isset($... | true |
2f54192266fe4ce099ceb3f49a47686f94c27827 | PHP | tgglv/cache_practices | /daemon/src/InvalidateRule.php | UTF-8 | 803 | 2.84375 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Daemon;
class InvalidateRule
{
/** @var string */
private $hashName;
/** @var bool */
private $isSingleKey;
/** @var string */
private $primaryKey;
public function __construct(string $hashName, bool $isSingleKey, ?string $primaryKey)
{
... | true |
8b135d13d1551b1391215a8d9a32cb4b683f8c51 | PHP | sloanetj/Registrar | /public_html/applications/app_prior_degrees.php | UTF-8 | 18,468 | 2.71875 | 3 | [] | no_license | <?php
session_start();
$_SESSION['completed_p3'];
// connect to mysql
$conn = mysqli_connect("localhost", "SJL", "SJLoss1!", "SJL");
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
//HANDLE FORM VALIDATION
$somethingEmpty = "";
$degree2Err = "";
$d... | true |
d1afd3ee44dac991d9a1869815d15fb71ce10674 | PHP | adzfaulkner/design-patterns | /src/Structural/Adapter/Iphone/Screen/Screen.php | UTF-8 | 957 | 3.375 | 3 | [] | no_license | <?php
namespace Arjf\DesignPatterns\Structural\Adapter\Iphone\Screen;
class Screen {
/**
*
* @var int
*/
protected $width;
/**
*
* @var int
*/
protected $height;
/**
*
* @param int $width
* @param int $height
*/
public function __con... | true |
73cba9412f46ae54c4da04139229a73fd2d15009 | PHP | 1MB/1mbcode | /src/onembsite/onembcode/functions/JSON.php | UTF-8 | 944 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace onembsite\onembcode\functions;
class JSON {
public static function parse($json = "") {
if (!HelperFunctions::is_type($json, "string")) {
HelperFunctions::invalid_argument_type("string", gettype($json));
}
$parsed = @json_decode($json, true);
if (!$parsed) {
... | true |
d07606c5d4fdf5ce9b8b5a35241ee69ec9f398f4 | PHP | retrowaver/rkwt | /src/Service/ItemService.php | UTF-8 | 421 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Entity\Search;
class ItemService implements ItemServiceInterface
{
public function setStatus($items, int $status): void
{
foreach ($items as $item) {
$item->setStatus($status);
}
}
public function setSearch($items, Search $search): voi... | true |
b7603e1322a13b72540999982d081713ef16f825 | PHP | Ultimedia/MuseumTracker | /cms/services/index.php | UTF-8 | 8,440 | 2.671875 | 3 | [] | no_license | <?php
require 'Slim/Slim.php';
$app = new Slim();
$app->contentType('text/html; charset=utf-8');
$app->get('/museums', 'getMuseums');
$app->get('/museumsAdmin/:id', 'getAdminMuseums');
$app->get('/users', 'getUsers');
$app->post('/user', 'addUser');
$app->post('/social', 'addSocial');
$app->get('/beacons', 'getBeaco... | true |
1ed2de437d2b81191f261a5a150e8f4b17d3c01a | PHP | cjnstha/prudentialinsurance | /app/Http/Controllers/Admin/FaqController.php | UTF-8 | 958 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Faq;
use Illuminate\Http\Request;
class FaqController extends Controller
{
public function index(){
$faqs = Faq::all();
return view('admin.faq.index',compact('faqs'));
}
public function create... | true |
a65a0e9969879196f0de6cd04963cb6e83149a2b | PHP | hoanguyen0210/Magenest | /app/code/Magenest/ChapterFive/Setup/UpgradeData.php | UTF-8 | 1,474 | 2.53125 | 3 | [] | no_license | <?php
namespace Magenest\ChapterFive\Setup;
use Magento\Eav\Setup\EavSetupFactory;
class UpgradeData implements \Magento\Framework\Setup\UpgradeDataInterface
{
private $eavSetupFactory;
public function __construct(EavSetupFactory $eavSetupFactory)
{
$this->eavSetupFactory = $eavSetupFactory;
... | true |
2e638761ce2b590a85db007bc1cee64927b74b27 | PHP | yusufhan58/deneme | /php/sqrtx.php | UTF-8 | 575 | 3.46875 | 3 | [] | no_license | <?php
function mySqrt($x) {
$depAlt=0;
$depUst=$x;
$counter=(int)($x/2);
$temp=$counter*$counter;
if($x==1)return 1;
while($x!=$counter*$counter) {
if($x < $temp) {
$depUst=$counter;
$counter = (int)(($depAlt+$depUst)/2);
if($depUst==$counter) return $... | true |
2d44d1c8ca49b3ace72f6d0b119d241b7277ae73 | PHP | onkarmumbrekar/OnlineLicenceApplication-OLA- | /adminP.php | UTF-8 | 1,743 | 2.609375 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['user'])){
header("location: adminlogin.php");
}
?>
<html>
<body>
<?php
$con=mysqli_connect("localhost","root","","information");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"... | true |
6840f0f2c231aafd28e87d26f7d40090b0c36707 | PHP | DevAndrei/My-CodeIgniter-Starter-Kit | /application/models/login_model.php | UTF-8 | 975 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Login_model extends CI_Model{
function __construct(){
parent::__construct();
}
public function validate()
{
$username = $this->security->xss_clean($this->input->post('username'));
$password = ... | true |
788808a4cd466705987f456fcbc460e58b3d2846 | PHP | Elorfin/MusicTools | /api/src/TheoryBundle/DataFixtures/ORM/LoadDegreeData.php | UTF-8 | 1,488 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace TheoryBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use TheoryBundle\Entity\Degree;
/**
* Initializes Degrees.
*/
class LoadDegreeData extends AbstractFixture implem... | true |
1bf568afd9fc1cdaf677fbaae4b49bac7b1f666d | PHP | jhnlsn/phpunit-test-samples | /src/Helicarrier.php | UTF-8 | 302 | 2.796875 | 3 | [] | no_license | <?php
namespace Marvel;
class Helicarrier {
public function __construct() {
$this->conn = array();
}
public function query($sql) {
return array();
}
public static function getConnection() {
echo 'getConnection';
return new Helicarrier();
}
} | true |
3a4f2cd184792ecb38dec13b76de6d147e6d53b3 | PHP | htom78/financialMall | /app/Helper/HttpUtils.php | UTF-8 | 2,492 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Adi
* Date: 2018/6/20
* Time: 15:36
*/
function post($url, $headers, $params)
{
$data = json_encode($params);
$curl = curl_init();
array_push($headers, "Content-Type: application/json");
array_push($headers, "Content-Length: " . strlen($data));
curl... | true |
16db00db64dde0b64519e71bcd89900b17ff09cd | PHP | CallanMcNulty/CLUE | /getGames.php | UTF-8 | 409 | 2.59375 | 3 | [] | no_license | <?php
include "makeConnection.php";
$games = mysqli_fetch_all(mysqli_query($mysqli, "SELECT id,turn_number,password FROM games;"), MYSQLI_ASSOC);
echo "[";
for($i=0; $i<count($games); $i++) {
echo '{"name":"'.$games[$i]["password"].'","id":'.$games[$i]["id"].',"joinable":'.($games[$i]["turn_number"]==NULL?"true":"fa... | true |
59d1df111b23f26de10fa49a05ef811594fba020 | PHP | Jimmy766/clean | /app/Core/Users/Requests/Rules/CheckDuplicateUserRule.php | UTF-8 | 988 | 2.625 | 3 | [] | no_license | <?php
namespace App\Core\Users\Requests\Rules;
use App\Core\Users\Models\User;
use Illuminate\Contracts\Validation\Rule;
class CheckDuplicateUserRule implements Rule
{
private $request;
public function __construct()
{
$this->request = request();
}
public function passes($attribute, $val... | true |
cbc955207af67511f36f6ae551b5bbdffd0268cd | PHP | DavidCao626/server | /app/EofficeApp/XiaoE/Traits/XiaoETrait.php | UTF-8 | 12,891 | 2.703125 | 3 | [] | no_license | <?php
namespace App\EofficeApp\XiaoE\Traits;
use GuzzleHttp\Client;
use Illuminate\Support\Facades\Cache;
use Request;
use Illuminate\Support\Arr;
trait XiaoETrait
{
private $config;
/**
* 模拟post请求
* @param $url
* @param array $data
* @return mixed
* @throws \GuzzleHttp\Exception\Gu... | true |
2a51df211e898b004cb52bb72b7ed2e427493f5d | PHP | JnMik/api-generics | /src/Generic/Model/ModelInterface.php | UTF-8 | 583 | 2.734375 | 3 | [] | no_license | <?php
namespace Support3w\Api\Generic\Model;
/**
* Interface ModelInterface
*/
interface ModelInterface
{
/**
* @return array
*/
public function jsonSerialize();
/**
* @return int
*/
public function getId();
/**
* @param int $id
*
* @return DefaultModel
... | true |
3c9824723783d1c70006b967ebb749137212b00b | PHP | yurui829/stefanbo | /job_scripts/salt_init/salt_sls/prod/herouser/HeroUser/components/hero_social/social/facebookSocial.php | UTF-8 | 1,350 | 2.796875 | 3 | [] | no_license | <?php
/*
* facebook 社交调用
*
*/
include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "facebook" . DIRECTORY_SEPARATOR. "facebook.php";
class facebookSocial{
private $facebook = null;
private $link = 'https://itunes.apple.com/tw/app/id645436918';
public function __construct(){
if ($_SESSION['jcid'] == 8) {
... | true |
fb25f2a9fdeba59e1ae98bcb4104f9917d4c2fe2 | PHP | luan-gomes/TechQuiz | /model/QuestaoAberta.php | UTF-8 | 226 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
class QuestaoAberta{
public $nome;
public $titulo;
public $rubrica;
function __construct($nome,$titulo,$rubrica){
$this->nome = $nome;
$this->titulo = $titulo;
$this->rubrica = $rubrica;
}
}
?> | true |
e0d683aa36d813c160bbab43aff3532ec2237ba3 | PHP | Meiyo40/strategy_concept | /House.php | UTF-8 | 147 | 2.875 | 3 | [] | no_license | <?php
class House implements BuildingStrategy
{
public function build()
{
return "Congratz, you have build a new House";
}
} | true |
e9e000a694baa7bf71cd42480dcd9ad2cc939bb3 | PHP | piyawatbeer/ThePrime | /app/Repositories/BankRepository.php | UTF-8 | 1,729 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use Illuminate\Support\Facades\Storage;
use App\Models\Bank;
class BankRepository
{
public function castData()
{
$data = [
'id' => null,
'bname' => null,
'name' => null,
'number' => null,
'pic' => null
... | true |
1da003948575b94b67d5f8b64c48834562c2e86d | PHP | vgrynishak/m2 | /src/App/Command/Item/DeviceInformationItem/Validator/CreateDeviceInformationItemValidator.php | UTF-8 | 1,429 | 2.765625 | 3 | [] | no_license | <?php
namespace App\App\Command\Item\DeviceInformationItem\Validator;
use App\App\Command\Item\BaseValidator\CreateBaseItemValidator;
use App\App\Command\Item\BaseValidator\LabelValidator;
use App\App\Command\Item\DeviceInformationItem\CreateDeviceInformationItemCommandInterface;
use App\Core\Repository\InfoSource\In... | true |
31a9022d51de2ad9ab0633cc46c73189cd0f75b0 | PHP | liepertt/arc | /src/arc/tree/Node.php | UTF-8 | 593 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* This file is part of the Ariadne Component Library.
*
* (c) Muze <info@muze.nl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace arc\tree;
/**
* abstract class to document minimum tree node requirements for a... | true |
8b00397265792fe8de8513b762053a2690d7fce9 | PHP | sah-comp/bienlein | /src/Formatter/address/Gb.php | UTF-8 | 851 | 2.953125 | 3 | [] | no_license | <?php
/**
* Cinnebar.
*
* My lightweight no-framework framework written in PHP.
*
* @package Cinnebar
* @author $Author$
* @version $Id$
*/
/**
* Formats a postal address for united kingdom (gb).
*
* See {@link http://www.upu.int/fileadmin/documentsFiles/activities/addressingUnit/gbrEn.pdf} on how
* a post... | true |
157a4563fce33790fb2281a97acf36d248890523 | PHP | Samshal/Plug-Loader | /vendor/autoloader.php | UTF-8 | 9,429 | 2.96875 | 3 | [] | no_license | <?php
/**
* Plug-Autoloader Source: A PSR4 Implementation of a PHP Autoloader.
*
* This library observes the [PSR4 specification | (http://www.php-fig.org/psr/psr-4/)] to implement an autoloader.
* + The term "class" refers to classes, interfaces, traits, and other similar structures.
* + A fully qualified class ... | true |
6738b224fce73320dfb96da09dc07c4c9d238e04 | PHP | jocoonopa/MPosWebService | /src/Console/Commands/ProductVersion.php | UTF-8 | 625 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace jocoonopa\MPosWebService\Console\Commands;
use Illuminate\Console\Command;
use MPosWS;
/**
* ProductVersion
*/
class ProductVersion extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mpos-ws:product:version';... | true |
a5f475dfb146ef5dd240a2fb62b5b2c3a1989429 | PHP | buttasam/easyblog | /app/model/entity/Comment.php | UTF-8 | 1,437 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: samik
* Date: 21.9.15
* Time: 1:16
*/
namespace App\Model\Entity;
use App\Model\Entities\BaseEntity;
use YetORM\Entity;
use YetORM\EntityCollection;
/**
* Class Comment
* @package App\Model\Entity
*/
class Comment extends BaseEntity
{
/** @return int */
public fu... | true |
d241806f85113a2f7fdb782ab196e294295789ac | PHP | prdossantos/pagaleve-php | /src/Checkout/Payment.php | UTF-8 | 1,749 | 3.03125 | 3 | [] | no_license | <?php
namespace Pagaleve\PHP\Checkout;
class Payment
{
private $checkout_id = "";
private $intent = "AUTH";
private $currency = "BRL";
private $reference = "";
private $amount = 0;
/**
* @return string
*/
public function getCheckoutId(): string
{
return $this->checko... | true |
ca8740f75bb804d83f1a4be3f091495295d261f3 | PHP | parthoghosh-cse/assignment | /assignment php day-2/heading of color/heading of color.php | UTF-8 | 448 | 2.921875 | 3 | [] | no_license | <?php
function head($txt,$color){
$rong='';
switch($color){
case'nil':
$rong='blue';
break;
case'lal':
$rong='red';
break;
case'sobuj':
$rong='green';
break;
case'holud':
$rong='yellow';
break;
default:
$ro... | true |
c78aef2c8fbe92eae0d10ba9e622323736124b61 | PHP | teresko/http | /src/Fracture/Http/UploadedFile.php | UTF-8 | 2,113 | 2.953125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace Fracture\Http;
class UploadedFile
{
private $rawParams = [];
private $type = null;
private $isValid = true;
/**
* @param array $params
*/
public function __construct($params)
{
$this->rawParams = $params;
}
public function prepare()
{
... | true |
7dfea9411c198eb3a0c2bb141243c54f5996a0ad | PHP | LePetrovski/P4 | /src/DAO/AdminDAO.php | UTF-8 | 594 | 2.875 | 3 | [] | no_license | <?php
namespace App\src\DAO;
use App\src\model\Admin;
class AdminDAO extends DAO
{
public function logIn($pseudo)
{
$sql = 'SELECT * FROM admin WHERE pseudo = ?';
$results = $this->sql($sql, [$pseudo]);
$row = $results->fetch();
if($row){
return $this->buildObject($row);
} else {
e... | true |
b08b604dffddbf5bf49d585b4625fd10f99d9e08 | PHP | ninobevin/researchproject | /albay/albay/admin/pdfPrint.php | UTF-8 | 3,377 | 2.515625 | 3 | [] | no_license | <?php
include('../classes/connection.php');
include('../fpdf/fpdf.php');
$con = new connection();
$pdf = new fpdf();
$date = date("Y-m-d");
$dateTo = date("Y-m-d");
if(isset($_REQUEST['dateFormValue'])){
$date = addslashes($_REQUEST['dateFormValue']);
$dateTo = addslashes($_REQUEST['dateTo']);... | true |
692ef095971245c8f843d244904b1282f217c5d0 | PHP | Diegoni/genco_usuarios | /nuevo2.php | UTF-8 | 2,477 | 2.734375 | 3 | [] | no_license | <?php
include_once("menu.php");
$query="SELECT * FROM `usuario` ORDER BY idusuario DESC";
$idusuario=mysql_query($query) or die(mysql_error());
$row_idusuario = mysql_fetch_assoc($idusuario);
$query="SELECT * FROM `departamento` ORDER BY nombre ASC";
$departamento=mysql_query($query) or die(mysql_error());
$row... | true |
c0b54ecb4d0679afa34b107313b051ba937b7eb5 | PHP | ElvenSpellmaker/AdventOfCode2020 | /d2p1.php | UTF-8 | 649 | 2.984375 | 3 | [] | no_license | <?php
$passwords = rtrim(file_get_contents('d2.txt'));
$passwords = explode("\n", $passwords);
foreach ($passwords as $passwordKey => $passwordLine)
{
preg_match('%(\d+)-(\d+) ([a-z]): (.*)%', $passwordLine, $matches);
$minSeen = $matches[1];
$maxSeen = $matches[2];
$seeCharacter = $matches[3];
$password = $ma... | true |
8616048582e9caf925190286200b577372949576 | PHP | Comblez/-ESME-Cours | /dev_web/DM_PHP_SQL/une_page.php | UTF-8 | 1,263 | 2.6875 | 3 | [] | no_license | <?php
//define info mysql
echo "zone de test:<br>";
session_start() ;
$server = "localhost";
$user = "root";
$password = "";
$dbname = "Gestion_Livre_Comblez";
//creation bdd et table
$bdd = new PDO('mysql:host='.$server, $user, $password);
$request = "CREATE DATABASE IF NOT EXISTS ". $dbname . " DEFAULT CHARACTER SE... | true |