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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8a80fe5472885a7264af83b08de361c8008cc086 | PHP | vrige/PPM2019 | /db/query_opereDB.php | UTF-8 | 5,955 | 2.5625 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin: *');
require_once('config.php');
?>
<?php
if(isset($_POST)){
error_reporting(0);//serve per evitare il notice array to string che finisce nell'echo
$sender = $_POST['sender'];
$mynickname = mysqli_real_escape_string($conn,$_POST['nickname']);
$opera = $_POST['o... | true |
0009469873c6da47ded1dadda760bea43821c93d | PHP | Vector15/Recommender-System | /vendor/predictionio/predictionio/src/PredictionIO/PredictionIOClient.php | UTF-8 | 5,255 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace PredictionIO;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Http\EntityBodyInterface;
use Guzzle\Common\Collection;
use Guzzle\Service\Client;
use Guzzle\Service\Command\AbstractCommand;
/**
* PredictionIO API Client
*
* This package is a web service client based on Guzzle.
* A few quick e... | true |
6df2ad56ec8ff9bcb92f620d558e769bc6e57ee3 | PHP | murayama333/php_ex_answer | /01_basic/10_array/arr3.php | UTF-8 | 91 | 2.890625 | 3 | [] | no_license | <?php
$array = ['three' => 3, 'four' => 4, 'five' => 5];
ksort($array);
print_r($array);
| true |
aa19331bfeb3ccb39997cc96aa2932d025617dac | PHP | yiqing-95/sociochat | /src/SocioChat/Message/Filters/CommandFilter.php | UTF-8 | 2,813 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace SocioChat\Message\Filters;
use SocioChat\Message\Commands\GetIp;
use SocioChat\Message\Commands\Karma;
use SocioChat\Message\Commands\Kick;
use SocioChat\Message\Commands\Mail;
use SocioChat\Message\Commands\Me;
use SocioChat\Message\Commands\Names;
use SocioChat\Message\Commands\Sudo;
use SocioChat\M... | true |
4f5217819b14681a048f9ed28df9be79dd2eb2bc | PHP | pankaj-php/Hypleystaging | /wp-content/plugins/fluentform/app/Services/Parser/Extractor.php | UTF-8 | 10,465 | 2.9375 | 3 | [
"GPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only"
] | permissive | <?php
namespace FluentForm\App\Services\Parser;
use FluentForm\Framework\Helpers\ArrayHelper as Arr;
class Extractor
{
/**
* The form field settings.
*
* @var array
*/
protected $fields;
/**
* The properties that need to be extracted.
*
* @var array
*/
protect... | true |
f846ec14293f789fc76f7708da0a0c4cac0c04b1 | PHP | johnathanmdell/alliance-tools | /app/Console/Commands/SolarSystemCommand.php | UTF-8 | 1,030 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Managers\CrestApi;
use AllianceTools\SolarSystem\SolarSystemInterface;
use Illuminate\Console\Command;
class SolarSystemCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'cr... | true |
1f9c497634b3004c8bc3ebc19384d1e4ac14d2d6 | PHP | amir-noori/grape | /grape/src/common/xml.php | UTF-8 | 261 | 2.625 | 3 | [] | no_license | <?php
function setValue($domObject , $tagName , $value)
{
$tags = $domObject->getElementsByTagNameNS('http://www.grapeCMS.com/template' , $tagName);
foreach($tags as $tag)
{
$tag->nodeValue = $value;
}
} | true |
84d0bc125cfdf604889ef67d613686f6a2bdf868 | PHP | alec-gullon/ChordSearcher | /services/Chords/Categorizer.php | UTF-8 | 1,074 | 3.0625 | 3 | [] | no_license | <?php
namespace App\Services\Chords;
/**
* Provides ways of categorizing an array of instances of App\Model\Chord
*
* @property array $chords
*/
class Categorizer {
/**
* Array of chords provided to the Categorizer
*
* @var
*/
private $chords;
public function setChords($chords)... | true |
73c9214c485b89b686eda1a72fb3e1feddf1f7a8 | PHP | zjjzjw/crm | /core/app/Src/Sale/Domain/Model/SaleStatus.php | UTF-8 | 1,083 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php namespace Huifang\Src\Sale\Domain\Model;
use Huifang\Src\Foundation\Domain\Enum;
/**
* 销售线索分配状态
* Class SaleStatus
* @package Huifang\Src\Sale\Domain\Model
*/
class SaleStatus extends Enum
{
const UN_KNOW = 0;//未知状态
const TO_ASSIGN = 1; //待认领
const ASSIGNING = 2; //分配中
const ASSIGNED = 3; ... | true |
a6e14d1835cc131792f90489ee73820e756e99d2 | PHP | chung-leong/acrostix | /ax_writer.php | UTF-8 | 17,277 | 2.765625 | 3 | [
"CC0-1.0"
] | permissive | <?php
function ax_save_pdf_file($file_path, &$doc_obj) {
ax_start_logging();
$contents = ax_generate_pdf_contents($doc_obj);
if(!$contents) {
ax_end_logging("cannot generate PDF contents");
return false;
}
if(!($f = fopen($file_path, 'wb'))) {
ax_end_logging("cannot open $file_path");
return false;
}
fw... | true |
6bbcc785b9d76c2e3f92b0af16409f55ddd21cdd | PHP | successmarket/OroCalendarBundle | /Model/Recurrence/DailyStrategy.php | UTF-8 | 2,784 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Oro\Bundle\CalendarBundle\Model\Recurrence;
use Oro\Bundle\CalendarBundle\Entity;
use Oro\Bundle\CalendarBundle\Model\Recurrence;
class DailyStrategy extends AbstractStrategy
{
/**
* Maximum value of interval field for daily strategy is different.
*/
const MAX_INTERVAL = 99;
/*... | true |
31e0d1821ee7d52003448689354453458fdb2f69 | PHP | m50/phpunit-expect | /src/Traits/Internal/NumericExpectations.php | UTF-8 | 1,619 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Expect\Traits\Internal;
use Expect\Expectation;
/**
* @internal
*/
trait NumericExpectations
{
abstract public function unNot(): static;
abstract protected function handleExpectationStr(mixed $expected, string $assertName, ?string $notAssertName = null): void;
/** @psalm-assert int $th... | true |
45ebc54fa3d009ddad6748fb99c3b980b3eec989 | PHP | jcollings/wp-checksum | /wp-checksum.php | UTF-8 | 18,440 | 2.546875 | 3 | [] | no_license | <?php
/*
Plugin Name: WP Checksum Generator
Plugin URI: http://www.jclabs.co.uk
Description: Security Process to show latest modified/created files, run as frequently as deemed fit, an email is sent automatically with the results.
Author: James Collings
Version: 0.0.1
Author URI: http://www.jclabs.co.uk
*/
define('M... | true |
f9cca61283175c07ed5449fc2aa856d10d4ebc3f | PHP | pmolchanov2002/portallite | /src/AppBundle/Command/EventNotificationCommand.php | UTF-8 | 3,765 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace AppBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use AppBundle\Entity\Event;
use AppBundle\Entity\User;
use Doctrine\ORM\EntityManager;
class EventNotificatio... | true |
94a16f5bb6fb4785fc4405be124bd4ad1b6d105b | PHP | codacy-badger/stockmanager | /src/Services/DocumentGetter.php | UTF-8 | 818 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Services;
use Aws\S3\Exception\S3Exception;
use Aws\S3\S3Client;
class DocumentGetter
{
private $s3Client;
private $privateBucketName;
public function __construct(string $privateBucketName, S3Client $s3Client)
{
$this->privateBucketName = $privateBucketName;
... | true |
848a6760b848be9ce1b2e1fe3b4290f996bdd5a7 | PHP | KevinCamos/filmaWeb-FW_PHP_OO_MVC_AngularJS1.4 | /backend/module/search/model/model/search_model.class.singleton.php | UTF-8 | 569 | 2.53125 | 3 | [] | no_license | <?php
class search_model
{
private $bll;
static $_instance;
private function __construct()
{
$this->bll = search_bll::getInstance();
}
public static function getInstance()
{
if (!(self::$_instance instanceof self)) {
self::$_instance = new self();
}
... | true |
0ac676fecca0e4fd1a87873e904569e7b3f05c02 | PHP | xiaohaoyong/data.wedoctors.com.cn | /models/dynamic/DyPraise.php | UTF-8 | 1,347 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models\dynamic;
use Yii;
/**
* This is the model class for table "dc_praise".
*
* @property string $id
* @property string $dynamicid
* @property string $userid
* @property integer $type
* @property string $createtime
* @property string $commentid
* @property string $touserid
* @property... | true |
53693f5f84f8a8ddb6c2a6f40dd43a77c5edfe55 | PHP | KOBADK/proxy | /src/Itk/ExchangeBundle/Model/ExchangeCalendar.php | UTF-8 | 2,339 | 2.921875 | 3 | [] | no_license | <?php
namespace Itk\ExchangeBundle\Model;
use Itk\ExchangeBundle\Entity\Resource;
/**
* Class ExchangeCalendar
*
* @package Itk\ExchangeBundle\Model
*/
class ExchangeCalendar
{
private $start;
private $end;
private $resource;
private $bookings;
/**
* @param Resource $resource
* @pa... | true |
39e8500a52f5523d403e78ae05a79b960f7e369e | PHP | ankaankina/php-mvc | /views/pages/home.php | UTF-8 | 623 | 3.09375 | 3 | [] | no_license | <p>Here is a list of all posts:</p>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "php_mvc";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sq... | true |
112c7fdcdce4ffb794f4b730f8ad4b64b2265fd0 | PHP | bhushanrade/PHPMySql | /loader.php | UTF-8 | 989 | 2.765625 | 3 | [] | no_license | <?php
$dbhost = getenv("MYSQL_SERVICE_HOST");
$dbport = getenv("MYSQL_SERVICE_PORT");
$dbuser = getenv("MYSQL_USER");
$dbpwd = getenv("MYSQL_PASSWORD");
$dbname = getenv("MYSQL_DATABASE");
echo $dbname;
$connection=mysqli_connect($dbhost,$dbuser,$dbpwd,$dbname);
/*if ($connection->connect_errno) {
printf("Connect... | true |
03abc449eca60863b6605bf028304e1f2892227a | PHP | ad2joe/RosettaBundle | /Translation/Scanner/Php/Statement/ArrayStatement.php | UTF-8 | 3,065 | 3.25 | 3 | [] | no_license | <?php
namespace BeSimple\RosettaBundle\Translation\Scanner\Php\Statement;
use BeSimple\RosettaBundle\Translation\Scanner\Php\Parser\Token;
use BeSimple\RosettaBundle\Translation\Scanner\Php\Parser\TokenStack;
use BeSimple\RosettaBundle\Translation\Scanner\Php\Parser\ParserException;
/**
* @author: Jean-François Sim... | true |
8488315cc63ba9a2d5d8fd05c4255f8ea02b985e | PHP | mdiyakov/DoctrineSolrBundle | /Manager/SuggesterManager.php | UTF-8 | 2,524 | 2.671875 | 3 | [] | no_license | <?php
namespace Mdiyakov\DoctrineSolrBundle\Manager;
use Mdiyakov\DoctrineSolrBundle\Config\Config;
use Mdiyakov\DoctrineSolrBundle\Query\SuggestQueryBuilder;
use Mdiyakov\DoctrineSolrBundle\Suggester\ClassSuggester;
use Mdiyakov\DoctrineSolrBundle\Suggester\SchemaSuggester;
class SuggesterManager
{
/**
* @... | true |
b05d6184dd67dcdf212acdc7608d4897296abb51 | PHP | Mr-Kumar-Abhishek/seo-tools | /src/DomainFinder/UseCase/ListQueriesRequest.php | UTF-8 | 482 | 2.640625 | 3 | [] | no_license | <?php
namespace DomainFinder\UseCase;
class ListQueriesRequest extends BaseRequest
{
private $request;
public function __construct( BaseRequest $request, $application_repository )
{
$request['application'] = $application_repository->find( $request['application_id'] );
if ( $request['application']->getUser() !... | true |
473f9691462fac341d99a2cdfbde1d07d0d150c1 | PHP | appandgo/charcoal-cms | /src/Charcoal/Cms/AbstractFaq.php | UTF-8 | 1,672 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Charcoal\Cms;
// From 'charcoal-object'
use Charcoal\Object\Content;
use Charcoal\Object\CategorizableInterface;
use Charcoal\Object\CategorizableTrait;
use Charcoal\Object\PublishableInterface;
use Charcoal\Object\PublishableTrait;
// From 'charcoal-translator'
use Charcoal\Translator\Translation;
... | true |
917dc0dacb7219497f9591960ef79724ae38435b | PHP | AurelienRichez/casseCroute | /admin/view/edition-produit.php | UTF-8 | 809 | 2.515625 | 3 | [] | no_license | <?php
function writeForm(Produit $product) {
?>
<form method="post" action="admin-edition-produit.html">
<p>
<label for="name" >Nom du produit à afficher pour le client : </label><br />
<input type="text" id="name" name="name" value="<?php echo $product->getName();?>"><br />
<label for="description">desc... | true |
67bc8f5d219bfb7749af7287d72b99864597328f | PHP | tekkla/core-framework | /Core/Framework/Notification/MessageFacade.php | UTF-8 | 2,752 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Core\Framework\Notification;
use Core\Message\MessageHandlerInterface;
use Core\Message\MessageInterface;
/**
* MessageFacade.php
*
* @author Michael "Tekkla" Zorn <tekkla@tekkla.de>
* @copyright 2016
* @license MIT
*/
class MessageFacade
{
/**
*
* @var MessageHandlerInterface
... | true |
14bd1dd14481b8261192f839308a4c2eeceaec89 | PHP | deniskovalchuck/backend | /Core/Route/IMiddleware.php | UTF-8 | 120 | 2.59375 | 3 | [] | no_license | <?php
namespace Core\Route;
interface IMiddleware
{
public static function handle($httpMethod,$uri):bool;
}
| true |
c77ead5b33195618834d2ea6629d8abcbe0c4c9a | PHP | relaxnow/qa-tools | /src/Ibuildings/QA/Tools/Common/Application.php | UTF-8 | 620 | 2.609375 | 3 | [] | no_license | <?php
namespace Ibuildings\QA\Tools\Common;
use Symfony\Component\Console\Application as BaseApplication;
class Application extends BaseApplication
{
/**
* @var Settings
*/
protected $settings;
/**
* @return \Ibuildings\QA\Tools\Common\Settings
*/
public function getSettings()
... | true |
0cf276c59cb9e22e4123e6c3bda1f50cdd60f430 | PHP | bprusaczyk/Serwis-aukcyjny | /klasy/walidacja.php | UTF-8 | 1,430 | 2.984375 | 3 | [] | no_license | <?php
class Walidacja
{
public static function dodajKlaseIsInvalid($zmienna)
{
if (isset($_SESSION[$zmienna]))
{
return " is-invalid";
}
else
{
return "";
}
}
public static function wypiszStaraWartosc($zmienna)
{
if (isset($_SESSION[$zmienna]))
{... | true |
0c3a88a89d9934810003e19d7d391a418802d38f | PHP | francescotarantino/DownImgBot | /core.php | UTF-8 | 1,261 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
require("class-http-request.php");
require("config.php");
require("functions.php");
$content = file_get_contents('php://input');
$update = json_decode($content, true);
$msg = $update["message"]["caption"];
$chatID = $update["chat"]["id"];
if($msg == "#hashtag" && $chatID < 0/*If the ChatID is lower than 0 it's... | true |
9ebe5ee8a83cf17cdbf9f681909657b7db2edb7f | PHP | fernandodinardo/FinanceiroFernandoDNL | /DAO/MovimentoDAO.php | UTF-8 | 5,690 | 2.75 | 3 | [] | no_license | <?php
require_once 'Conexao.php';
require_once '../DAO/UtilDAO.php';
class MovimentoDAO extends Conexao {
public function InserirMovimento($tipomovimento, $dtamovimento, $vlrmovimento, $selempresa, $selcategoria, $selconta, $obs) {
if (trim($tipomovimento) == '' || trim($dtamovimento) == '' || t... | true |
aa01ad0e6614b7ed147850405f567e94968bf8f7 | PHP | s-ichikawa/laravel58 | /app/Console/Commands/Mail/Simple.php | UTF-8 | 930 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands\Mail;
use Illuminate\Console\Command;
use Illuminate\Mail\Message;
class Simple extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'sendgrid:mail-simple';
/**
* The console command... | true |
a3620823282a7517693f2183cf37f3bcf0ce0e3f | PHP | TheoRicherol/exophp | /variables/exo1/index.php | UTF-8 | 353 | 3.09375 | 3 | [] | no_license |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<p>Créer une variable **name** et l'initialiser avec la valeur de votre choix.
Afficher son contenu.</p>
<?php $name = 'Théo';
... | true |
d9f3fe16e92246cbe35c9d07fcb50897d6fb261e | PHP | conheocon25/thanhbaothvl | /Hostgator Old/SPN_BanhReHoangThuy_host spn-soft/mvc/command/UpdateEmployee.php | UTF-8 | 1,151 | 2.765625 | 3 | [] | no_license | <?php
namespace MVC\Command;
class UpdateEmployee extends Command {
function doExecute( \MVC\Controller\Request $request ) {
require_once("mvc/base/domain/HelperFactory.php");
//------------------------------------------------------------
$mFactory = new \MVC\Mapper\Factory();
$Factory = $mFactor... | true |
182145eb7459fef8bd34e5bd56703f347c6ce1ce | PHP | KenAhon/ScrapCT | /class/Proxy.php | UTF-8 | 3,130 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: rk521
* Date: 19/10/17
* Time: 12:28 AM
*/
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../app/DB.php';
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
class Proxy
{
private $db;
/**
* Proxy constructor.
*... | true |
ef8413cf27c8fd94a1694a273062cee546fda9eb | PHP | ElleHaime/silex | /source/App/Controller/News.php | UTF-8 | 1,693 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use Silex\Application,
Silex\ControllerProviderInterface,
Symfony\Component\HttpFoundation\Request,
Symfony\Component\HttpFoundation\Response,
App\Model\Event,
App\Model\News as NewsModel,
Library\BaseController,
Library\Utils\Misc as _U;
class News extends BaseController imp... | true |
8e2a9fadaf5f38a89a1550289f5a7d954bb0c606 | PHP | friendm/cse330washu | /Lab2/authenticate.php | UTF-8 | 783 | 2.5625 | 3 | [] | no_license |
<?php
/*
* Created on Sep 18, 2011
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
session_start();
$myfile="users.txt";
$fopen=fopen($myfile,'r');
$filedata=fread($fopen,filesize($myfile));
$information=explode(".",$filedata);// cr... | true |
42682beafd87de39d10757100a78ec619a63def6 | PHP | sunnysideup/sunnysideup-huringa | /bin/huringa | UTF-8 | 2,611 | 2.59375 | 3 | [] | no_license | #!/usr/bin/php
<?php
namespace Sunnysideup\Huringa;
$dir = dirname(__DIR__);
require_once $dir .'/../../autoload.php';
require_once $dir.'/src/ClassVisitor.php';
require_once $dir.'/src/FolderVisitor.php';
require_once $dir.'/src/ParseClass.php';
set_error_handler(function ($severity, $message, $file, $line) {
... | true |
f45c689a3afabc883779a825f1052442d0e1d45f | PHP | NjekeMbai/IAP | /connect.php | UTF-8 | 827 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$server="localhost";
$username="root";
$password="";
$database="profiles";
$con=mysqli_connect($server,$username,$password,$database);
if (isset($_POST["register"]))
{
$First_name=$_POST["fname"];
$Second_name=$_POST["sname"];
$Email=$_POST["email"];
$City=$_POST["cress"];
$Password=$_PO... | true |
b39b06692d859b587e5bc1d8633d9e4228a7bc7f | PHP | EliseoLuquez/comanda | /tp/src/middlewares/SocioMiddleware.php | UTF-8 | 1,538 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Middlewares;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Server\RequestHandlerInterface as RequestHandler;
use Slim\Psr7\Response;
use App\Utils\ValidadorJWT;
use App\Models\Usuario;
use App\Models\Tipo_Empleado;
class SocioMiddleware
{
/**
* Example middleware i... | true |
84b46905afb6e13014322c59c17160dfda7eb8b1 | PHP | phpinnacle/mure | /examples/date.php | UTF-8 | 376 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
use PHPinnacle\Mure\ExtensionManager;
require __DIR__ . '/../vendor/autoload.php';
class MyDate
{
public static function addDays(\DateTime $date, int $num)
{
$date->modify(sprintf('+%d days', $num));
return $date;
}
}
ExtensionManager::init(MyDate::class)... | true |
bda21b97f40c1eac3de86cdc63e0a09e618fd6b4 | PHP | pedramphp/alhussain | /includes/objects/siteObjects/Title.class.php | UTF-8 | 597 | 2.765625 | 3 | [] | no_license | <?php
class Title extends SiteObject {
public function __construct(){
parent::__construct();
}
public function process(){
$title = "AlHussain TV";
switch(SiteHelper::GetAction()){
case "homepage":
$title = "Anwar Al-Hussain TV - Satellite Network - The First English... | true |
56b767b27ceb3534c24fc7f4fb6d4e9effb20824 | PHP | leuelliott/rocket_event_server_php | /functions.php | UTF-8 | 2,992 | 3.15625 | 3 | [] | no_license | <?php
function time_elapsed_string($datetime, $full = false) {
$now = new DateTime;
$ago = new DateTime($datetime);
$diff = $now->diff($ago);
$diff->w = floor($diff->d / 7);
$diff->d -= $diff->w * 7;
$string = array(
'y' => 'year',
'm' => 'm... | true |
f3a21b61722e6a0ee875f61da4fab42ad5de273c | PHP | mtedeschini/php | /print_f.php | UTF-8 | 1,319 | 3.296875 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//Desarrollar una funcion que reciba un array o un string, en un mismo parametro, e imprima el contenido de la varible en un archivo
function print_f($variable){
if(is_array($variable)){
//Si es un array, lo... | true |
ba3118d1d7da63e52adb8995397a2874c666b9c9 | PHP | thienth/pt12311-php2 | /l12/sendmail.php | UTF-8 | 1,490 | 2.765625 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
$mail = new PHPMailer(true); // Passing `true` enables exceptions
try {
//Server settings
// $mail->SMTPDebug = 2; // Enable verbose debug ou... | true |
e2e31238c03221e6e02e6c88a677fcbeaf2aaeb8 | PHP | ppodevlabs/hexagonal-architecture-example-symfony-implementation | /src/AppBundle/Repository/UserRepository.php | UTF-8 | 1,350 | 2.703125 | 3 | [] | no_license | <?php
namespace AppBundle\Repository;
use Doctrine\ORM\EntityManager;
use Voiceworks\HexagonalApp\Domain\UserManagement\User\User;
use AppBundle\Entity\User as DoctrineUser;
use Voiceworks\HexagonalApp\Domain\UserManagement\User\UserRepository as BaseUserRepository;
/**
* UserRepository
*
* This class was generated... | true |
e54084dac104880fa28da23fb5e8aa037faade65 | PHP | DarkCobra7423/NetworkFriends | /models/model-tipousuario.php | UTF-8 | 826 | 2.59375 | 3 | [] | no_license | <?php
require_once("model-base.php");
class TipoUsuario extends Model {
public function __construct($db) {
parent::__construct($db);
}
public function select($value) {
$this->getAll("IdTipoUsuario");
echo "<select name='idtipo' id='' class='form-control'>";
while... | true |
56a984a0944169e1c34c1b2ba712d3b9a77250a3 | PHP | aslemos/pw2 | /www/application/models/entities/eusager.class.php | UTF-8 | 4,595 | 2.828125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class EUsager extends stdClass implements IUsager {
const ETAT_EN_ATTENTE = -1;
const ETAT_REFUSE = -2;
const ETAT_INACTIF = 0;
const ETAT_ACTIF = 1;
private $_user_id; // ID
private $_role_id; // FK roles
private $_prenom;
private $_nom;
private $_permis_conduire;
p... | true |
9eefb3269dd185132faf882563195d8f6276efe6 | PHP | FHCN/ifoundmydoctor | /wp-content/themes/ifoundmydoctor-com/loop-articles.php | UTF-8 | 6,964 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
global $year;
global $min_date;
global $max_date;
global $keywords;
global $months;
function ifd_filter_where_keywords($where = '') {
global $keywords;
$where .= " AND (";
$where .= "post_content LIKE '%" . $keywords[0] . "%' OR post_title LIKE '%" . $keywords[0] . "%'";
foreach ($keywords as $keyword) {
... | true |
24a8c1c3734440280b801dda872f00ef38c725a1 | PHP | javierlov/Dakar | /Ships/FuncionesJuego.php | UTF-8 | 3,052 | 2.71875 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT']."/ships/Controladores/SetPartida.php";
require_once $_SERVER['DOCUMENT_ROOT']."/ships/Funciones.php";
function getTurnoJuego(){
$NewGame = getGameSerialize();
$turno = $NewGame->getGame()->getTurnoActual();
echo "<p> Turno Actual: ".$turno;
$turno++;
echo ". Proxim... | true |
af56c5a587135a4109d36922d4c7092977947950 | PHP | SisodiyaAakash/HMS-Project | /doctor/timing.php | UTF-8 | 4,676 | 2.65625 | 3 | [] | no_license | <?php
$title= "My Timing | GUNI HMS";
$page_name= "timing";
include_once '../config/db.php';
include_once '../models/DayMaster.php';
include_once '../models/DoctorTiming.php';
session_start();
$doctor_timing_instance = new DoctorTiming();
$user_name= $_SESSION["DOCTOR_USE... | true |
9857d4258e3a5dbf5dfbf025164cd51ee8532750 | PHP | chundonglinlin/studyNotes | /开发语言/php/php笔记/src/demo/simplexml-iterator.php | UTF-8 | 2,732 | 3.0625 | 3 | [] | no_license | <?php
/**
* This example demonstrates recursively iterating over an XML file
* to any particular path.
*/
$xmlstring = <<<XML
<?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
<document>
<animal>
<category id="26">
<species>Phascolarctidae</species>
<type>koala</type>
... | true |
bacf2dd6d293a9a2eb5e0cdacf525698aeac48e7 | PHP | ninggf/wulaphp | /wulaphp/feature/CmsFeatureManager.php | UTF-8 | 792 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of wulacms.
*
* (c) Leo Ning <windywany@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace wulaphp\feature;
/**
* 特性管理器.
*
* @package wulaphp\feature
*/
class CmsFeatureManager {
... | true |
2edbdeeb28b3c948e4c1932eb70ca1dc663ba5e1 | PHP | Daivir/Framework | /src/Virton/Database/Table.php | UTF-8 | 4,246 | 2.921875 | 3 | [] | no_license | <?php
namespace Virton\Database;
use App\Blog\Entity\Post;
use Virton\Database\Query;
use Virton\Database\PaginatedQuery;
use Pagerfanta\Pagerfanta;
/**
* Class Table
* @package Virton\Database
*/
class Table
{
/**
* @var null|\PDO
*/
protected $pdo;
/**
* @var string
*/
protec... | true |
e184dda44a575c8968d7f3fd0291769f666a7b6c | PHP | harshind/Ecommerce | /cart.php | UTF-8 | 2,356 | 2.59375 | 3 | [] | no_license | <?php
session_start();
require 'includes/common.php';
if (!isset($_SESSION['email'])) {
header('location: index.php');
}
$_SESSION['id']=$user_id;
$select_query = "Select items.pid, items.name, items.price from items INNER JOIN users_items on users_items.item_id= items.pid where users_items.user_... | true |
0f82d02c8f4ac9d6aed0a63fdd86841b88684fde | PHP | renangtm/rtc | /php/entidades/GrupoCidades.php | UTF-8 | 2,793 | 2.671875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of GrupoCidades
*
* @author Renan
*/
class GrupoCidades {
public $id;
public $nome;
public $... | true |
469bee6e5935b2f95f5a1bafade7cfd520c2a862 | PHP | stonegithubs/Thinkphp5-wxpay | /WxAppPay.php | UTF-8 | 8,981 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 小程序支付
*
* 使用:
* 将本文件放到extend目录下即可
*
* 使用步骤(详细参考开发文档):
* -----第一阶段 获取并存储openid----------
* 1. 小程序: 调用wx.login(), 获取code登录标识
* 2. 小程序: 调用wx.request(), 向服务器发送请求
* 3. 服务端: 调用 \WxAppPay::getOpenid($cide) 获取openid
* 4. 服务端: 存储openid, 并设置过期时间(为了安全起见, 不可永久有效)
* -----第二阶段 进行支付获取预订单信息-----
* 5. 小程序: 调用wx.request(), 向... | true |
d4da4234ad5b0a04c945121df65ec643ad648765 | PHP | Brainsware/grease | /lib/Grease/Tap.php | UTF-8 | 1,784 | 2.890625 | 3 | [] | no_license | <?php
/**
Copyright 2012-2013 Brainsware
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 agre... | true |
babdaf9cbc9031b142e9ecb58f231271b2002a01 | PHP | zoltax/super-shop | /app/tests/entity/orderEntityTest.php | UTF-8 | 2,616 | 2.53125 | 3 | [] | no_license | <?php
class OrderEntityTest extends PHPUnit_Framework_TestCase
{
public function testClass()
{
$class = new \EMBL\Entity\Order();
$this->assertNull($class->getId());
$id = 7;
$class->setId($id);
$this->assertEquals($class->getId(),$id);
}
public function test... | true |
d8cf15980530b849ecc37f0864b1140f5302e90a | PHP | chikenlover89/codelex-backup | /arithmetic-operations/09.php | UTF-8 | 631 | 3.46875 | 3 | [] | no_license | <?php
$inWeight = readline("Your weight in kilograms:\n");
$inHeight = readline("Your height in centimeters:\n");
function BMI(float $kg, float $cm){
$weight = $kg * 2.20462;
$height = $cm * 0.393701;
$BMI = $weight * 703 / pow($height,2);
switch($BMI){
case $BMI >= 18.5 && $BMI <= 25;
... | true |
f2aef02648be3a951a2fcc30a832e6c05a63a672 | PHP | bryanrite/horde | /framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Base.php | UTF-8 | 3,646 | 2.65625 | 3 | [] | no_license | <?php
/**
* The Horde_Kolab_Session_Decorator_Base provides a base for session
* decorators.
*
* PHP version 5
*
* @category Kolab
* @package Kolab_Session
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @link http://pear.horde.org/index.php?packag... | true |
e8f9dc853642c3f034395029fbc11a99f9217e36 | PHP | Alejandro-C/aprendiendo.php | /11-ejercicios/ejercicio1.php | UTF-8 | 257 | 3.59375 | 4 | [] | no_license | <!-- crear dos variables Pais y Continente e inicialisarla con un valor e imprimirlo por pantalla -->
<?php
$pais = 'Colombia'; //tipo de dato string
$continente = 'America'; // tipo de dato string
echo "Pais: $pais <br>Continente: $continente";
?> | true |
352501604207f79aca9cc000965d86bbe2eac050 | PHP | alnass/pruebaGestion | /gestion/modelos/RestablecerPass.php | UTF-8 | 562 | 2.640625 | 3 | [] | no_license | <?php
require '../config/conexion.php';
Class RestablecerPass{
public function __construct(){
}
public function validarusu($usu_login, $usu_pass){
$sql = "SELECT * FROM usuario_log
WHERE usu_login = '$usu_login'
AND usu_pass = '$usu_pass'
";
return ejecutarConsultaSimpleFila($sql) ;
}
... | true |
4c64ea785dbf288564a4ecc352f972c24790772c | PHP | ivinteractive/generator-ivi-kirby | /generators/app/templates/site/plugins/ivform/uniform/snippets/uniform-email-default.php | UTF-8 | 259 | 2.59375 | 3 | [
"MIT",
"GPL-2.0-only"
] | permissive | <?php
foreach ($form as $field => $value) {
if (str::startsWith($field, '_')) {
continue;
}
if (is_array($value)) {
$value = implode(', ', array_filter($value, function ($i) {
return $i !== '';
}));
}
echo ucfirst($field).': '.$value."\n";
}
| true |
888bd62f2b0e93b9339d326c5919a0a802d74e1f | PHP | anthonyumpad/billing | /database/seeds/GatewaySeeder.php | UTF-8 | 1,227 | 2.515625 | 3 | [] | no_license | <?php
/**
* Class GatewaySeeder
*
* @author anthony
*/
use Illuminate\Database\Seeder;
use Anthonyumpad\Billing\Models\Gateway;
/**
* Class GatewaySeeder
*/
class GatewaySeeder extends Seeder
{
public function run()
{
$env = env('APP_ENV');
$api_key = Config::get('billing.site_... | true |
7e9ac09bd2208b51a592dccf36abb80e03177313 | PHP | mickknutson/javaeecookbook | /xampp/php/PEAR/PHPDoc/renderer/html/PhpdocHTMLDocumentRenderer.php | UTF-8 | 25,304 | 2.796875 | 3 | [
"PHP-3.01",
"BSD-3-Clause",
"BSD-4-Clause-UC",
"Zlib",
"ISC",
"LicenseRef-scancode-other-permissive",
"TCL",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"JSON",
"LicenseRef-scancode-pcre",
"blessing",
"Apache-2.0"
] | permissive | <?php
/**
* Provides functioninality to render modules and classes.
*
* @version $Id: PhpdocHTMLDocumentRenderer.php,v 1.3 2001/12/13 10:34:13 hayk Exp $
*/
class PhpdocHTMLDocumentRenderer extends PhpdocHTMLRenderer {
/**
* Message displayed if an object lacks documentation.
*
* @var string $und... | true |
56434ce999366704820e1335d9520ec7321f729e | PHP | JaredJHZ/NotificacionesPHP | /Notificacion.php | UTF-8 | 506 | 2.65625 | 3 | [] | no_license | <?php
include('Conexion.php');
function getCorreos() {
$con = new Conexion();
$con->getConexion();
$correos = $con -> executeQuery("SELECT * FROM correos;");
if($correos->num_rows >= 1) {
while($row = $correos->fetch_assoc()) {
echo "<tr>";
echo "<th>" . "<input id=". $... | true |
ca91901b182adf9aabeef45183f028cc73952f25 | PHP | essaghirm/hiit-consulting-tchat | /app/Controllers/RegisterController.php | UTF-8 | 1,415 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use App\Core\Auth;
use App\Core\Hash;
use App\Core\Redirect;
use App\Core\Request;
use App\Core\Session;
use App\Models\User;
class RegisterController extends Controller
{
public function index()
{
$this->render('register');
}
public function register(Req... | true |
3b59432e94b3af134a2ae5a8b4851eb88394cdfb | PHP | MuhammadOrabi/laravel-task | /app/Models/Permission.php | UTF-8 | 653 | 2.84375 | 3 | [] | no_license | <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Permission extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['title', 'slug', 'model'];
/**
* The attributes that has rules for submssion
*
... | true |
a5e53a569f966d9d5c3d64fe26366e61927b3862 | PHP | zohaibalvi/cli-cigarette-machine-app | /src/Command/PurchaseCigarettesCommand.php | UTF-8 | 2,540 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use App\Machine\CigaretteMachine;
use App... | true |
31c38305e88417dbc62d971d2bde415e0e031a55 | PHP | RogerNoel/PHP-Becode-Exercices | /boucles_08.php | UTF-8 | 646 | 3.109375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Boucles 08</title>
</head>
<body>
<!-- En allant de 200 à 0 avec un pas de 12, afficher le message Enfi... | true |
b577c37e3dea2d45f5a0e9685e190c2484966f7f | PHP | paulrentschler/pwrentch.core | /validate.class.php | UTF-8 | 36,593 | 3.09375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Define the validation error types.
*
* @author Paul Rentschler <par117@psu.edu>
*/
define('VALIDATION_ERROR_NOERROR', 0);
define('VALIDATION_ERROR_LENGTH', 10);
define('VALIDATION_ERROR_TOOLONG', 12);
define('VALIDATION_ERROR_TOOSHORT', 14);
define('VALIDATION_E... | true |
a4cc87c61a68ce4f0e83b9b3b41ad1f96518b52b | PHP | spipu/symfony-bundle-process | /Step/File/GetLocalFile.php | UTF-8 | 1,956 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of a Spipu Bundle
*
* (c) Laurent Minguet
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Spipu\ProcessBundle\Step\File;
use Spipu\ProcessBundle\Entity\Process\Pa... | true |
303d508dd4466863137b7488783fb614c2b98573 | PHP | antrichard/GestagePHPpourAndroid2015 | /test/testDao.php | UTF-8 | 3,909 | 2.703125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>test Dao</title>
</head>
<body>
<?php
require_once("../includes/fonctions.inc.php");
// require_once("../modele/dao/DaoInterface.class.php");
// require_once("../modele/dao/DaoConnexion.class.php");
// ... | true |
eb2231de5618afa3731248076ffdb65de7a38342 | PHP | WendyGraphex/jobs-application | /modules/employers/admin/locales/Pagers/EmployerContractTypePager.class.php | UTF-8 | 786 | 2.578125 | 3 | [] | no_license | <?php
class EmployerContractTypePager extends Pager {
function __construct()
{
parent::__construct(array(
'EmployerContractType',
'EmployerContractTypeI18n',
));
}
protected function fetchObjects($db)
{ ... | true |
dbeae5d7b50e37284bb341396bf9f7a481f7f213 | PHP | sujeetkryadav/jasper-client | /src/Jaspersoft/Service/OrganizationService.php | UTF-8 | 7,430 | 2.828125 | 3 | [] | no_license | <?php
namespace Jaspersoft\Service;
use Jaspersoft\Dto\Organization\Organization;
use Jaspersoft\Dto\Attribute\Attribute;
use Jaspersoft\Tool\Util;
/**
* Class OrganizationService
* @package Jaspersoft\Service
*/
class OrganizationService extends JRSService
{
private function makeUrl($organization = null, $para... | true |
5b3cf2d332fb70fc2b98a5edb1759de09de95047 | PHP | quickcommercegit/plugins | /jet-woo-product-gallery/includes/updater/class-jet-woo-product-gallery-base-update.php | UTF-8 | 1,529 | 2.75 | 3 | [] | no_license | <?php
/**
* Class for the base update.
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Base updater class.
*
* @since 1.0.0
*/
class Jet_Woo_Product_Gallery_Base_Update {
/**
* Api parameters.
*
* @since 1.0.0
* @access protected
* @var array
*/
protecte... | true |
d073d03c0d33fc2482849ee2e5f894cd4b7e72c4 | PHP | xaalvilo/forum | /Framework/Formulaire/FieldSet.class.php | UTF-8 | 2,287 | 3.59375 | 4 | [] | no_license | <?php
/**
*
* @author Frédéric Tarreau
*
* 27 févr. 2015 - FieldSet.class.php
*
* classe abstraite dont le rôle est de représenter un Fieldset regroupant des champs de formulaire
*/
namespace Framework\Formulaire;
class FieldSet
{
/* @var string legende du fieldset HTML5 */
protected $_legend;
/* @var... | true |
192d4f2c0fa57effc40120bc5e6196e59b4b9bbc | PHP | id0612/openapi-sdk-php | /src/ImageSearch/V20180120/AddItem.php | UTF-8 | 1,223 | 2.546875 | 3 | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace AlibabaCloud\ImageSearch\V20180120;
use AlibabaCloud\Client\Request\RoaRequest;
use AlibabaCloud\ImageSearch\V20180120\Traits\AddItemTrait;
/**
* Request of AddItem
*
* @method string getInstanceName()
*/
class AddItem extends RoaRequest
{
use AddItemTrait;
/**
* @var string
*/... | true |
daee71324ac80164a360ae5ce546c020621ee018 | PHP | Xromern/diplom-ktkt-release | /app/src/Service/ArticleManager.php | UTF-8 | 2,144 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Entity\Advertisement;
use App\Entity\Article;
use App\Entity\Comment;
use Doctrine\Common\Persistence\ObjectManager;
use Knp\Component\Pager\Pagination\PaginationInterface;
use Knp\Component\Pager\PaginatorInterface;
class ArticleManager
{
/**
* Получить кометанрии с п... | true |
41b4261c2027b8189c67401b86dc1c2cce149c11 | PHP | CoreSite/test-sf5-bin | /src/Command/GenProductsCommand.php | UTF-8 | 1,664 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Command;
use App\Service\ProductService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Conso... | true |
f1f399da9b76f733472f3a483822eac4dc83b4cb | PHP | BillyHuang1234/comp333assign1 | /comp333assn1/php/changeuser.php | UTF-8 | 1,108 | 2.609375 | 3 | [] | no_license | <?php
//connect to the mySQL server
$conn = mysqli_connect("mysql.cms.waikato.ac.nz", "qh41", "my10650320sql", "qh41");
//if not connet,display disconnect information
if($conn == FALSE)
{
die("Error connecting to mysql server :". mysqli_connect_error());
}
if($_GET)
{
$data= $_GET["data"];
$collecti... | true |
57c2c3299929ebe824d3fbe22b5f02f15e82a4df | PHP | xgq07/lonicera | /lonicera/core/BaseException.php | UTF-8 | 570 | 2.796875 | 3 | [] | no_license | <?php
namespace lonicera\core;
class BaseException extends \Exception
{
public function __toString()
{
return self::getMessage();
}
protected function _Log()
{
$err = date('Y-m-d H:i:s') . '|';
$err .= '异常信息:' . self::getMessage() . '|';
$err .= '异常码:' . self::ge... | true |
9cfd4e1d511eaa7e308168d6e0e47d6281e8437a | PHP | entonyogithub/website | /console/migrations/m150901_130138_create_contact_request_table.php | UTF-8 | 1,228 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Schema;
use yii\db\Migration;
class m150901_130138_create_contact_request_table extends Migration {
public function up() {
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-ge... | true |
b4eb3d0adf9ac310455e2f09f4f5a653dd9773f6 | PHP | durrellLyons/durrelllyonsperforms | /controller/filmController.php | UTF-8 | 588 | 3 | 3 | [] | no_license | <?php
require('../class/dbConnect.php');
require('../model/filmModel.php');
require('../view/filmView.php');
class filmController {
private $filmModel;
private $filmView;
public function __construct() {
$dbConnector = new dbConnector();
$this->filmModel = new filmModel($dbConnect... | true |
073990766596a5593b3c743a1901dfc9d2072a38 | PHP | moreno93/BTCWeb | /src/btc.php | UTF-8 | 1,626 | 2.96875 | 3 | [] | no_license | <?php
class BTC
{
private $conn;
function __construct() {
require_once dirname(__FILE__) . '/db_connect.php';
$db = new DbConnect();
$this->conn = $db->connect();
}
public function getBTCValue(){
$decode = file_get_contents("https://btc-e.com/api/3/ticker/btc_usd");
... | true |
eec078b59197241e7a29d90ee63adbdefb9be58b | PHP | leandroleonelrocha/geco | /app/Http/Requests/CrearNuevaMatriculaRequest.php | UTF-8 | 2,182 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class CrearNuevaMatriculaRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the vali... | true |
5a8e227c59c7e9a4c2c4742314cc6329eeeaabef | PHP | mm999/statistic | /app/Console/Commands/UserResumeYear.php | UTF-8 | 3,466 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class UserResumeYear extends CommonMonth
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'UserResumeYear {year?}';
/**
* The ... | true |
e374ad58da0a0da5d51926400d789487f2e0894e | PHP | Werdffelynir/slim.w-code | /application/models/Subcategory.php | UTF-8 | 1,374 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ProStation
* Date: 06.04.2015
* Time: 2:16
*/
namespace models;
use app\Model;
class Subcategory extends Model
{
/** table name */
public $table = 'subcategory';
/** table primary field name */
public $primaryKey = 'id';
/** table fields names */
... | true |
9628471dbf7991b7c72cb27689199177887e5a08 | PHP | gegaofeng/laravel_shop | /app/Repositories/CartRepository.php | UTF-8 | 11,533 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: feng
* Date: 2018/11/18
* Time: 23:08
*/
namespace App\Repositories;
use App\Exceptions\CartException;
use App\Model\Cart;
use http\Env\Request;
use Illuminate\Support\Facades\DB;
class CartRepository extends BaseRepository
{
private $cart;
private $goods;
p... | true |
405c1d5431497366c123acb2597f5d623f8a8339 | PHP | arangodb/arangodb-php | /lib/ArangoDBClient/HttpResponse.php | UTF-8 | 5,875 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* ArangoDB PHP client: HTTP response
*
* @package ArangoDBClient
* @author Jan Steemann
* @copyright Copyright 2012, triagens GmbH, Cologne, Germany
*/
namespace ArangoDBClient;
/**
* Container class for HTTP responses
*
* <br>
*
* @package ArangoDBClient
* @since 0.2
*/
class HttpRespo... | true |
d45967e4e3f5fcb8e8c74a82d7214d40bde98bbe | PHP | zerepbrys11/car-parking | /web/App/Helper/MyHelper.php | UTF-8 | 632 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Helper;
use \PDO;
class MyHelper{
public static function createConnection(){
$ini = parse_ini_file("config.ini", true);
$host = $ini['db']['host'];
$user = $ini['db']['user'];
$pwd = $ini['db']['pwd'];
$dbname = $ini['db']['dbname'];
$connecti... | true |
503dcdec7b15c949c6ad64475871c5a118b96afb | PHP | ZhiyangLeeCN/harfbuzz-php | /tests/hb_blob_write_data.phpt | UTF-8 | 696 | 2.546875 | 3 | [] | no_license | --TEST--
Test hb_blob_write_data()
--FILE--
<?php
$filename = './tests/fonts/test_001.otf';
$blob = hb_blob_create_from_file($filename);
$len = hb_blob_get_length($blob);
if ($len <= 0) {
die("{$filename} open failed.");
}
$tmp_out_path = './tests/tmp_out/';
@mkdir($tmp_out_path);
$tmp_out_filename = $tmp_out_pat... | true |
f4708ccdf09b37fa692ef02044e3a48e1679f998 | PHP | sanshyn1864/php-fiesta-cookie | /01sa.php | UTF-8 | 1,647 | 3.203125 | 3 | [] | no_license | <?php
$gameArray=[
["id"=>1, "species"=>"Bulbasaur", "type1"=>"Grass", "type2"=>"Poison", "ability"=>"Overgrow", "hp"=>45, "attack"=>49, "defense"=>49],
["id"=>2, "species"=>"Ivysaur", "type1"=>"Grass", "type2"=>"Poison", "ability"=>"Overgrow", "hp"=>60, "attack"=>62, "defense"=>63],
["id"=... | true |
a0eb52f1091562f2c6c1ceca4edf12e11d930198 | PHP | DianaParra/EjerciciosPHP | /dianaphp/CAPITULO2/date.php | UTF-8 | 1,593 | 2.890625 | 3 | [] | no_license | <?php
echo date("D");
echo "<br></br>";
echo date("d");
echo "<br>";
echo date("j");
echo "<br>";
echo date ("l");
echo "<br>";
echo date("n") ;
echo "<br>";
echo date("v");
echo "<br>";
echo date("z");
echo "<br>";
echo date("V");
echo "<br>";
echo date("F");
echo "<br>";
echo date("m") ;
echo "<br>";
echo ... | true |
4b69126a418ca8fd71c38ba5c92050b3d425b895 | PHP | professionalgitaccount/vaishali | /vaishali/product.php | UTF-8 | 344 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
include("ex24.php");
echo "<pre>";
print_r($product_arr);
echo "</pre>";
?>
<table border="1" width="800" align="center">
<tr>
<?php
foreach($product_arr as $key=>$val){
echo"<td>";
echo"<img src='$val[2]'/>";
echo "<h2>$val[1]</h2>";
echo "<p>$val[0]</p>";
echo "</td>";
}
?>
</tr... | true |
a92088ee17f08df62cb6a9d16021a2b100300bfb | PHP | lucasdealmeida/kf | /app/Refund/Method/RefundMethod.php | UTF-8 | 1,156 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Refund\Method;
use App\Models\Transaction;
abstract class RefundMethod
{
protected $purchaseTransaction;
protected $source;
public function __construct(Transaction $purchaseTransaction, String $source)
{
$this->purchaseTransaction = $purchaseTransaction;
$this->... | true |
921a79398c729a036ce5b3efffe9870bf13b8017 | PHP | EvilGamerX/Gabarro_Final | /old/db_class.php | UTF-8 | 4,065 | 3.296875 | 3 | [] | no_license | <?php
/* Database class that holds details for login
and functions.
Jacked' from Gabarro's book.
Transcriped by TJ
*/
class database
{ private $link;
private $res;
private $host = "localhost";
private $user = "evilgamerx";
private $pass = "sg06017";
private $db;
// sets user, pass, and host and... | true |
a649b703713aa4b433588c28a7327c218b0071e8 | PHP | sirio3mil/cinema-expressive | /src/App/Entity/PeopleAlias.php | UTF-8 | 1,728 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Class PeopleAlias
* @package App\Entity
* @ORM\Entity
* @ORM\Table(name="PeopleAlias")
*/
class PeopleAlias implements CinemaEntity
{
/**
* @var int
*
* @ORM\Id
* @ORM\Column(
* type="bigint",
* name="pe... | true |
8a9ae167010ad600dd2211dfefb6dba7b3342f76 | PHP | brietsparks/x-cvb__lara__api-1 | /app/GraphQL/Query/ExpsQuery.php | UTF-8 | 1,043 | 2.5625 | 3 | [] | no_license | <?php
namespace App\GraphQL\Query;
use App\Models\Exp;
use GraphQL;
use GraphQL\Type\Definition\Type;
use Folklore\GraphQL\Support\Query;
class ExpsQuery extends Query
{
protected $attributes = [
'name' => 'exps'
];
public function type()
{
return Type::listOf(GraphQL::type('Exp'));
... | true |