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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c55d356017d02978226845edd2d0ee6abf4e7cb8 | PHP | data-quest/histat-web | /application/views/en/admin/stats/option_5.php | UTF-8 | 720 | 2.53125 | 3 | [] | no_license | <?php if (count($result) > 0): ?>
<h3><b><?= count($result) ?></b> Ergebnisse wurden gefunden</h3>
<table>
<thead>
<tr>
<th>ZA Nr.</th>
<th>Studientitel</th>
</tr>
</thead>
<tbody>
... | true |
339b8db8f024e9d2cd41b002e8643bdd305dbe44 | PHP | Thoronir42/paf | /extensions/SeStep/NetteAuditTrail/src/Components/FeedControl/AuditTrailFeedControlFactory.php | UTF-8 | 2,100 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace SeStep\NetteAuditTrail\Components\FeedControl;
use SeStep\NetteAuditTrail\Entity\Entry;
use PAF\Modules\CommonModule\Latte\UserFilter;
use SeStep\NetteFeed\Components\FeedControl\FeedEntryControl;
use SeStep\NetteFeed\Components\FeedControl\FeedEntryControlFactory;
use SeStep\... | true |
de000d6d412e8bb3a90148fe31a768b2abe9255c | PHP | casthetrack/proyecto | /enviarEmail.php | UTF-8 | 1,499 | 2.625 | 3 | [] | no_license | <?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exeption;
require 'vendor/autoload.php';
// Instantiation and passing `true` enables exceptions
$mail = new PHPMailer(true);
try {
//Server settings
$mail->SMTPDebug = 0; // Enable verbose debug output
$mail->isSMTP();... | true |
fe4ab464f8c1d07f82d8a9ec6408b9d7fdee3e20 | PHP | necatikartal/ojs | /src/Ojs/AnalyticsBundle/Document/ObjectDownload.php | UTF-8 | 2,116 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ojs\AnalyticsBundle\Document;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
/**
* This collection keeps page information and download action details *without total count*
* There will be one record for each paths
* @MongoDb\Document(collection="analytics_download_object_sum")
*/
class ... | true |
554a1890600344fb0856becf6bde8b2566e53c80 | PHP | klapuch/Access | /Core/ThrowawayRemindedPassword.php | UTF-8 | 1,101 | 3.03125 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Klapuch\Access;
use Klapuch\Output;
use Klapuch\Storage;
/**
* Reminded password just for one use
*/
final class ThrowawayRemindedPassword implements Password {
private $reminder;
private $database;
private $origin;
public function __construct(
string $reminder,
\... | true |
48e8f5d5ae4f0d09e68d2ab5f6da944da84c3282 | PHP | nikic/Ardent | /src/SortedMap.php | UTF-8 | 4,237 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
namespace Collections;
class SortedMap implements Map {
use IteratorCollection;
/**
* @var BinarySearchTree
*/
private $avl;
/**
* @var callable
*/
private $comparator;
function __construct($comparator = null) {
$this->comparator = $comparator ?: '\Collec... | true |
f08d084e79acb467888e1effbb4ced51d1963d69 | PHP | smk87/videoLibraryAPI | /app/Http/Controllers/VideosController.php | UTF-8 | 5,304 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Video;
use Illuminate\Support\Facades\Validator;
use App\Http\Resources\Video as VideoResource;
use Vimeo\Laravel\Facades\Vimeo;
class VideosController extends Controller
{
/**
* Display a listing of the resource.
*
* @retu... | true |
669ad7ad02159bbbf8975db848d69b334cface25 | PHP | KimBonggyu/welfare | /fnc/common.php | UTF-8 | 13,593 | 2.71875 | 3 | [] | no_license | <?php
include 'function.php';
/*그누보드 참조*/
// mysqli_query 와 mysqli_error 를 한꺼번에 처리
// mysql connect resource 지정 - 명랑폐인님 제안
function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
{
global $Conn;
if(!$link)
$link = $Conn;
// Blind SQL Injection 취약점 해결
$sql = trim($sql);
// union의... | true |
a61ef467f461522bbb59e359e0d1a91161a2dbbf | PHP | kataynoi/e_office | /application/views/calendar/index2.php | UTF-8 | 2,094 | 2.609375 | 3 | [] | no_license | <div class="row">
<div class="col-lg-12">
<div class="row">
<?php
$month_start = strtotime('first day of this month', time());
$month_end = strtotime('last day of this month', time());
$year_start = strtotime('first day of January', time());
$yea... | true |
4f0619bc983b13fafbb3a41b9f4faa5b04ccde2b | PHP | pixelcollective/action-network-wordpress-powertools | /vendor/roots/acorn/src/Acorn/Bootloader.php | UTF-8 | 3,725 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Roots\Acorn;
use function Roots\add_filters;
use function Roots\env;
use Illuminate\Contracts\Foundation\Application as ApplicationContract;
use Roots\Acorn\Application;
class Bootloader
{
/** @var string Application to be instantiated at boot time */
protected $application_class;
/** @v... | true |
6d0b95939377dfd728cefb894e230c2b7eaa42c7 | PHP | icanhazstring/github-issue-aggregator | /src/App/Service/PackagistService.php | UTF-8 | 1,513 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Service;
use App\Entity\Repository;
use App\Provider\PackagistProvider;
use Zend\Hydrator\HydratorInterface;
/**
* Class PackagistService
*
* @package App\Service
* @author icanhazstring <blubb0r05+github@gmail.com>
*/
class PackagistService
{
private $provider;... | true |
11d8718c9aa48550176b59bc00d33a721b691e1c | PHP | zeeshankhan8467/fansonly | /vendor/transbank/transbank-sdk/src/Webpay/Oneclick/MallInscription.php | UTF-8 | 5,320 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Transbank\Webpay\Oneclick;
use Transbank\Webpay\Oneclick;
use Transbank\Webpay\Oneclick\Exceptions\InscriptionDeleteException;
use Transbank\Webpay\Oneclick\Exceptions\InscriptionFinishException;
use Transbank\Webpay\Oneclick\Exceptions\InscriptionStartException;
class MallInscription
{
const IN... | true |
385265823fcaf0b510061590bd967a9ce177b9fd | PHP | Antaxio14/Clothes | /src/TungstenVn/Clothes/Clothes.php | UTF-8 | 5,669 | 2.65625 | 3 | [
"Unlicense"
] | permissive | <?php
namespace TungstenVn\Clothes;
use jojoe77777\FormAPI\SimpleForm;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\Player;
use pocketmine\plugin\PluginBase;
use TungstenVn\Clothes\copyResource\copyReso... | true |
1ed2aa4bc211e171b173da2c37aa1a0ed59d4cf1 | PHP | nickurt/laravel-postcodeapi | /tests/Providers/nl_NL/ApiPostcodeTest.php | UTF-8 | 5,092 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace nickurt\PostcodeApi\tests\Providers\nl_NL;
use GuzzleHttp\Client;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\Psr7\Response;
use nickurt\PostcodeApi\Entity\Address;
use nickurt\PostcodeApi\Providers\nl_NL\ApiPostcode;
use nickurt\PostcodeApi\tests\Providers\BaseProviderTest;
class ApiPostcodeT... | true |
dc477a6875d6649a9d97130b26aa4c45c60fe05d | PHP | wquadrillion/coupon-system | /app/Coupon.php | UTF-8 | 568 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Coupon extends Model
{
public function coupon(){
return $this->morphTo();
}
/**
* @param $code
*
* @return mixed
*
* Find Coupon By Code
*/
public static function findByCode($code){
retur... | true |
4b01a40e7184029d383f124c9eacbe55d70b7e11 | PHP | pbws/php-prototype001 | /php/createXML.php | UTF-8 | 3,289 | 2.6875 | 3 | [] | no_license | <?php
$formData = $_GET;
$partsNodes = array();
$rootNode = new SimpleXMLElement( "<?xml version='1.0' encoding='UTF-8' standalone='yes'?><root></root>" );
foreach ($formData as $key => $data) {
$row = intval(substr($key,5));
if ($row != 0 && !isset($partsNodes[$row])) {
$partsNodes[$row] = $rootNode->... | true |
63d2371b08fa8da641eeee2125a437b08e573e54 | PHP | whitedream31/dana3 | /scripts/old.class.formbuilder.filewebsite.php | UTF-8 | 452 | 2.546875 | 3 | [] | no_license | <?php
require_once 'class.formbuilder.file.php';
// file upload for general (safe) files field - FLDTYPE_FILEWEBSITE
class filewebsitefield extends filefield {
function __construct($name, $value, $label, $targetname) {
parent::__construct($name, $value, $label, $targetname);
}
protected function Init() {
... | true |
16b452dd911f257c7526c6edf9249f88686a3a17 | PHP | kevinliposl/ProyectoGestion | /business/TagBusiness.php | UTF-8 | 628 | 2.671875 | 3 | [] | no_license | <?php
require_once '../domain/Tag.php';
class TagBusiness {
//Attributes
private $data;
function __construct() {
include_once '../data/TagData.php';
$this->data = new TagData();
//End construct
}
function insert($words) {
return $this->data->insert($words);
... | true |
cb1dfeaeb80d24fe10dc34a56edb30de9730fc7f | PHP | kaiser-coder/language | /Language.php | UTF-8 | 2,401 | 3.375 | 3 | [] | no_license | <?php
namespace Kaiser;
class Language
{
// Si le mot sasie existe dans le dictionnaire fr. > cette phrase est en fr.
// Sinon le mot ou la phrase saisie a une origine inconnue
// Ouvrir la liste des mots fr
// Comparer la phrase sasie pour trouver une correspondance dans le dictionnaire
// Compter le... | true |
f5bf13292118766ee14751e1b5e9cc18e4a35908 | PHP | typoworx-de/php-snipplets | /xml/XmlParser.php | UTF-8 | 3,470 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Database;
use \stdClass;
use \DOMXPath;
use \XMLReader;
use \DOMDocument;
/**
* Class XmlParser
* @package App\Console\Tasks\Feed\Reader
*/
class XmlParser
{
/**
* @var \XMLReader
*/
protected $xmlReader;
/**
* @var \stdClass
*/
protected $rootNode;
/**... | true |
61e9af6371ec1fc6bd01a63fbfbd3b5e36928cf5 | PHP | undercloud/xpc | /consoler/function/out.xpc.php | UTF-8 | 1,845 | 2.859375 | 3 | [] | no_license | <?php
if (false === function_exists('xpc_outln')) {
/**
* @param string $msg
* @param null $style
* @return void
*/
function xpc_outln ($msg = '', $style = null)
{
xpc_out($msg . XPC_PHP_EOL, $style);
}
}
if (false === function_exists('xpc_out')) {
/**
* @param $ms... | true |
a61e5408d0468e573320e4097eb2c14d544e5d38 | PHP | wangjh1/newblog | /backend/models/WebContentPage.php | UTF-8 | 1,191 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use Yii;
use backend\models\WebContent;
/**
* This is the model class for table "web_content_page".
*
* @property integer $id
* @property integer $content_id
* @property string $body
*/
class WebContentPage extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
pub... | true |
b275f4d4648402938215c6f043d8b65efac9e929 | PHP | dominio3/berexpress | /app/Repositories/ConsignementRepository.php | UTF-8 | 805 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Consignement;
use InfyOm\Generator\Common\BaseRepository;
/**
* Class ConsignementRepository
* @package App\Repositories
* @version June 6, 2019, 6:52 pm -03
*
* @method Consignement findWithoutFail($id, $columns = ['*'])
* @method Consignement find($id, $column... | true |
c3355bbf9a91c959776b1d7b76f4c0b8db138c23 | PHP | mfinkels/miPrimerProyecto | /ALANAPI/vendor/knplabs/knp-menu/src/Knp/Menu/MenuFactory.php | UTF-8 | 3,778 | 2.9375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Knp\Menu;
use Knp\Menu\Factory\CoreExtension;
use Knp\Menu\Factory\ExtensionInterface;
use Knp\Menu\Loader\ArrayLoader;
use Knp\Menu\Loader\NodeLoader;
/**
* Factory to create a menu from a tree
*/
class MenuFactory implements FactoryInterface
{
/**
* @var array[]
*/
private $exte... | true |
92e34ee99a8c9ddc7451e3afdf49c0d8437d6381 | PHP | v-radev/basic-router | /classes/BooksController.php | UTF-8 | 1,075 | 3.21875 | 3 | [] | no_license | <?php
require_once "BaseController.php";
class BooksController extends BaseController {
/*
GET /book - show all view - index()
GET /book/create - show create view - create()
POST /book - create new book - store()
GET /book/{id} - show book id view - show($id)
GET /book/... | true |
20d7a69f7c8df312271372b41ef5d44e46191aa8 | PHP | aaronmp13/MarketSimulator | /alpha.php | UTF-8 | 760 | 2.546875 | 3 | [] | no_license | <?php
$API_KEY = "2T11QGW4OZZG5891";
$FUNC = "TIME_SERIES_DAILY";
$SYMB = $_GET['stock'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,("https://www.alphavantage.co/query?function=" . $FUNC . "&symbol=" . $SYMB . "&apikey=" . $API_KEY));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($... | true |
03aa326a018d59d031510281cf6dc85dc00abaae | PHP | edwintenbrinke/mafia-api | /src/Service/CrimeService.php | UTF-8 | 3,790 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Entity\User;
use App\Helper\Message;
use App\Helper\Random;
use App\Helper\Time;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Class Crime
* @author Edwin ten Brinke <edwin.ten.brinke@extendas.com>
*/
class CrimeService
{
public const CRIME_JACKPOT_CHANCE = ... | true |
2061b1627e23d8ceb2f14763900c472d32a5844f | PHP | WaukeeApexWebDev2016/apex_webdev_1_001_programming-ChrisHougaard | /function.php | UTF-8 | 125 | 3.390625 | 3 | [] | no_license | <?php
function sub($first, $second) {
return $first - $second;
}
echo sub(5, 1);
$result = sub(10, 9);
echo $result;
?>
| true |
3a9a4c250f83a158376db709c7e4f23f556ab487 | PHP | viktorsh/ddos-guard | /DdosGuard/dist/lib/Row.php | UTF-8 | 1,117 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace sb\DdosGuard;
/**
* Created by PhpStorm.
* User: viktor
* Date: 10.01.2017
* Time: 15:10
*/
class Row
{
public $row;
public $ip;
public $unixtime;
public $timezone;
public $request;
public $status;
public $body_bytes_sent;
public $http_referer;
public $http_u... | true |
710f699156f76ea475b885485a6c8327fae84257 | PHP | claerosystems/cl4auth | /classes/model/cl4/session.php | UTF-8 | 1,865 | 2.6875 | 3 | [] | no_license | <?php defined('SYSPATH') or die ('No direct script access.');
/**
* This model was created using cl4_ORM and should provide
* standard Kohana ORM features in additon to cl4-specific features.
*/
class Model_cl4_Session extends ORM {
protected $_table_names_plural = FALSE;
protected $_table_name = 'session';
prot... | true |
574e86b9bc595279a0eef979095cffe218c3bd53 | PHP | hovenko/Madcow | /DF/Web/HTTP/Request/MagicQuotes.php | UTF-8 | 499 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
class DF_Web_HTTP_Request_MagicQuotes {
static public function stripslash_request() {
$gpc = array(&$_POST, &$_REQUEST, &$_GET, &$_COOKIE);
foreach ($gpc as &$var) {
$var = self::stripslashes_deep($var);
}
}
static public function stripslashes_deep($value) {
... | true |
ae48eadbcd355e53d4b2eaf6e6c987e721af9591 | PHP | kaushikpatel11/laravel-demo | /app/Services/RealEstateService.php | UTF-8 | 16,992 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Http\Requests\RealEstateRequest;
use App\Repositories\RealEstateRepository;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
/**
* Class RealEstateService
*
* @package App\Services
* @author David Cigala
* @version 0.0.1
* @since ... | true |
9b1d90867d400614d766e9eeda6ec05eea57a999 | PHP | nenad591/Novine | /classes/Users.php | UTF-8 | 784 | 2.90625 | 3 | [] | no_license | <?php
class Users{
public function selectAll(){
global $conn;
$q = $conn->prepare('SELECT user_id,name, lastName, email, date, status, level FROM users');
$q->execute();
$res = $q->fetchAll(PDO::FETCH_ASSOC);
return $res;
}
public function updateUser($level, $id){
global $conn;
$q = $... | true |
235705faa6681e5520ea799a00ae8e4cd4dc060c | PHP | chapmanu/chap-press | /content/plugins/next-active-directory-integration/classes/Adi/Authentication/Persistence/FailedLoginRepository.php | UTF-8 | 5,636 | 2.8125 | 3 | [
"GPL-3.0-only",
"MIT"
] | permissive | <?php
if (!defined('ABSPATH')) {
die('Access denied.');
}
if (class_exists('NextADInt_Adi_Authentication_Persistence_FailedLoginRepository')) {
return;
}
/**
* NextADInt_Adi_Authentication_Persistence_FailedLoginRepository stores the failed login attempts and the block time of an user.
*
* @author Tobias Hellma... | true |
84274d558188af1c7f568c62ff448db94a647fe7 | PHP | PauloVitorDB/pagpayment | /src/Model/BoletoModel.php | UTF-8 | 1,932 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace PagseguroApi\Model;
use JsonSerializable;
class BoletoModel implements JsonSerializable {
private $due_date;
private $line_1 = "";
private $line_2 = "";
private \PagseguroApi\Model\BoletoHolder $holder;
/**
* Get the value of holder
*/
... | true |
c589430a2606dfcf333328c175b550fc8fa7b3e0 | PHP | NibelungQin/Yaf | /library/Log.php | UTF-8 | 447 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: marico
* Date: 2017/4/20
* Time: 下午4:10
*/
class Log
{
/**
* 添加日志
* @param int $type
* @param array $data
*/
public static function debug($type=1, $data=[])
{
is_array($data) && $data = json_encode($data);
// 存入数据库
DB:... | true |
7935b77a817a8eb1d3073c1ed0496eef07221164 | PHP | autepos/tax | /src/Exceptions/TaxRateNotFoundException.php | UTF-8 | 824 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Autepos\Tax\Exceptions;
use Autepos\Tax\Contracts\TaxableDeviceLine;
/**
* Tax rate not found exception.
*/
class TaxRateNotFoundException extends \Exception implements ExceptionInterface
{
/**
* Taxable device line.
*/
protected TaxableDeviceLine $taxableDeviceLine;
/**
... | true |
48befa7586f3de59257118e4b8a22c475efaba8d | PHP | kmchugh/YiiPlinth | /protected/cli/views/webapp/protected/controllers/SiteController.php | UTF-8 | 697 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class SiteController Default controller for the site
*/
class SiteController extends Controller
{
/**
* Declares class-based actions.
*/
public function actions()
{
return array(
// page action renders "static" pages stored under 'protected/views/site/pages'
... | true |
63295282e65824fa6ff5423559c3e50cc405ec60 | PHP | plfort/CogimixJamendoBundle | /ViewHooks/Playlist/PlaylistRenderer.php | UTF-8 | 1,864 | 2.515625 | 3 | [] | no_license | <?php
namespace Cogipix\CogimixJamendoBundle\ViewHooks\Playlist;
use Symfony\Component\Security\Core\SecurityContextInterface;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
use Cogipix\CogimixCommonBundle\Utils\SecurityContextAwareInterface;
use Cogipix\CogimixCommonBundle\ViewHooks\Playlist\Playli... | true |
0298c38b53319b6122831f4276857f42aabdf56e | PHP | jamet-julien/framework | /DEV/__APP__/lib/Core/Request/Method/Put.php | UTF-8 | 815 | 2.75 | 3 | [] | no_license | <?php
namespace Core\Request\Method;
use Core\Request\Method\Method as Method,
Core\Dispenser\Dispenser as Dispenser;
class Put extends Method
{
/**
* [$_sType description]
* @var string
*/
protected $_sType = 'put';
/**
* [$_sFile description]
* @var [type]
*/
... | true |
e814066d5da82b97f9e88d24805722c6aa504a04 | PHP | napra17/Falak | /reportes/gethoras.php | UTF-8 | 1,573 | 2.53125 | 3 | [] | no_license | <?php
$fdesde =$_POST["fdesde"];
$fhasta = $_POST["fhasta"];
require ("../conexion.php");
$sql= "SELECT Apellido, Nombre, fecha, f_pago, horas, estado
from profesores
inner join horas on horas.id_profesor = profesores.id_profesor
where fecha between '".$fdesde."' and '".$fhasta."' ";
$result = mysqli_query ($con,... | true |
841d41a37e47fc6a9a7fa8eb993a8f59de1856a4 | PHP | xtrem-creative/panda-core | /lib/Panda/Core/Tool/Function/Dir.php | UTF-8 | 316 | 2.65625 | 3 | [] | no_license | <?php
if (!function_exists('rm_dir')) {
function rm_dir($dir)
{
$files = array_diff(scandir($dir), array('.', '..'));
foreach ($files as $file) {
(is_dir($dir . '/' . $file)) ? rm_dir($dir . '/' . $file) : unlink($dir . '/' . $file);
}
return rmdir($dir);
}
} | true |
5c5ff36de410c44370cbfbdcab6feabeef143b72 | PHP | omarfawzi/MENA-TASK | /app/Http/Controllers/NewsController.php | UTF-8 | 1,471 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Repositories\NewsRepository;
use Illuminate\Http\Request;
class NewsController extends Controller
{
public $news_repo;
public function __construct(NewsRepository $news_repository) {
$this->news_repo = $news_repository ;
}
/**
* Display a listing of news.
... | true |
e798b027c490ec14ab6f120ea3e9e3a7f18c3dff | PHP | superelebe/reposi_cne | /database/migrations/2017_03_28_194629_create_capacitacions_table.php | UTF-8 | 844 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCapacitacionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('capacitac... | true |
4c71c7111ddbd7741c7bba876a3fcdb520af0105 | PHP | phpenthusiast/object-oriented-php-tutorials | /chapters/chapter_0020/snippet_0005.php | UTF-8 | 355 | 2.9375 | 3 | [] | no_license | <?php
class View
{
private $controller;
// Set the controller so we can use it
public function __construct(Controller $controller)
{
$this->controller = $controller;
}
// Output the data after processing it by the controller
public function output()
{
return $this->con... | true |
7e2b6f1beb464b8cf8b6d540592056705687e2f5 | PHP | DamianSowinski/tauron-api | /src/Model/AllUsage.php | UTF-8 | 717 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
class AllUsage {
private ZoneUsage $consume;
private ZoneUsage $generate;
/**
* @var YearUsage[]
*/
private array $years;
/**
* @param YearUsage[] $years
*/
public function __construct(ZoneUsage $consume, ZoneUsage $generate, array $years) {
... | true |
aea3690341ea0f46f0ddddf7ad7e1be12f95212b | PHP | saiury92/osc | /2306/system/MY_Model.php | UTF-8 | 2,810 | 2.84375 | 3 | [] | no_license | <?php
/**
* Class name
* Author:
* Date:
*/
class MY_Model extends Database
{
protected $_select = "*";
protected $_where;
protected $_order;
protected $_limit;
public function __construct()
{
parent::__construct();
}
/*
public function setSelect($column = "*")
{... | true |
4a585fed814a2f101fd3974a56a50e32ddac4d61 | PHP | aaronnoblej/its-website | /admin/db/requestorinfo.php | UTF-8 | 3,991 | 3.203125 | 3 | [] | no_license | <?php
class requestorInfo {
//------------------------------------------------------
// INSTANCE VARIABLES
//------------------------------------------------------
private $workOrder = 0;
private $email = NULL;
private $requestor_type = NULL;
private $phone_number = NULL;
private $off... | true |
13708e6b7350be10cc243d80ca231c6d85fb1c01 | PHP | pazoler/PHP-rep | /lesson2 - циклы/cycle.php | UTF-8 | 2,385 | 3.390625 | 3 | [] | no_license | <?php
echo ' логические операторы',
" && - and, || or, ! - not, xor - искл или";
$bool = false || true;
var_dump($bool);
$bool = false or true;
var_dump($bool);
//оператор xor
$a = 45;
$b = 45;
var_dump($a==45 xor $b==45);
var_dump($a==45 xor $b==79);
//Тернарный оператор
$a = 23;
$b = 45;
$c = 12;
//проверить на... | true |
c56baf54df55e943a3427f6005d964023c18761b | PHP | ehiaig/vesi-landing | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 6,580 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\Models\User;
use App\Models\Personal;
use App\Models\Business;
use Illuminate\Http\Request;
use App\Models\VerifyUser;
use App\Mail\verifyEmail;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Il... | true |
7c9b164d7e0206d0120af1b7a5d0af7099c4cf06 | PHP | ampleeve/yii2.com | /basic/models/Test.php | UTF-8 | 944 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use yii\base\Model;
class Test extends Model{
public $title;
public $content;
public $date;
const EVENT_TEST = 'test';
public function attributeLabels(){
return [
'title' => 'заголовок',
'content' => 'контент',
'descr... | true |
b30e7a21fce807df774e8457bb12c4550fdeb254 | PHP | mikailmiko/ares-habbo-backend | /src/Rcon/Helper/RconHelper.php | UTF-8 | 3,096 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @copyright Copyright (c) Ares (https://www.ares.to)
*
* @see LICENSE (MIT)
*/
namespace Ares\Rcon\Helper;
use Ares\Rcon\Exception\RconException;
use Ares\Rcon\Interfaces\Response\RconResponseCodeInterface;
use PHLAK\Config\Config;
/**
* Class RconHelper
*
* @package Ares\Rcon\Helpe... | true |
d9f471929ac0dab72de4b38d77b2e6cc347df5d4 | PHP | youweiqi/ymjs | /common/models/SpecificationDetail.php | UTF-8 | 1,154 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "specification_detail".
*
* @property integer $id
* @property integer $specification_id
* @property string $detail_name
* @property integer $order_no
*/
class SpecificationDetail extends \yii\db\ActiveRecord
{
/**
* @inhe... | true |
79d268d0ae1e57fff00902d4edca11b49472a9cf | PHP | zefredz/claroline-packages | /modules/COMPILAT/lib/compilatio.class.php | ISO-8859-1 | 12,768 | 2.921875 | 3 | [] | no_license | <?php
/**
* Description :
* tablit la communication avec le serveur SOAP de Compilatio.net
* appelle diverses mthodes concernant la gestion d'un document dans Compilatio.net
*
* Date: 31/03/09
* @version:0.9
*
*/
class compilatio
{
/* Clef d'identification pour le compte Compilatio*/
var $key = null;
... | true |
a1a9c7b44180450cdcf683425f9f3e0a0bdd7ebe | PHP | dpopovska/api-currency-converter | /app/Repositories/User/UserRepository.php | UTF-8 | 1,462 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Repositories\User;
use App\Models\User;
use Carbon\Carbon;
class UserRepository implements UserRepositoryContract
{
/**
* @var User
*/
private $user;
/**
* UserRepository constructor.
* @param User $user
*/
public function __construct(User $user)
{
... | true |
c27a67d4c7c118159f09da4655660c7f7e36ef7f | PHP | NeidraServices/GAO-Laravel-Vuejs | /database/seeders/AttributionSeeder.php | UTF-8 | 946 | 2.828125 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class AttributionSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$array = [];
$today = mktime(0, 0, 0, date("m"), date... | true |
30cc06b3def371a4584b21192c489e877fd7e19a | PHP | DiegooNogueira/prjBiblioteca | /Livro.php | UTF-8 | 3,817 | 3.28125 | 3 | [] | no_license | <?php
class Livro{
private $titulo;
private $categoria;
private $quantidade;
private $con;
public function __construct(){
}
public function conectar(){
$this->con=mysqli_connect("localhost","root","","biblioteca");
if(!$this->con){
//caso ocorra um erro, exiba uma mensagem com o erro
d... | true |
d231883e6b0a0f9946a646456fc036100dae100e | PHP | OzorMox/Predikta | /addhofentry.php | UTF-8 | 1,201 | 2.765625 | 3 | [] | no_license | <?php
//create session
session_start();
//connect to the database
include("connect.php");
if (isset($_SESSION['username']))
{
$entry = mysqli_real_escape_string($connection, $_POST["entry"]);
$awardedto = $_POST['awardedto']; //TODO: this should come from a drop down list of players
$awardedby = $_SESSION['use... | true |
34face88262085a0e7d3a21278a1b184f554e386 | PHP | rafaelMcosta/rafaelMcosta-curso_php7_avancado-2 | /arrays/exemplo-01.php | UTF-8 | 122 | 3.203125 | 3 | [] | no_license | <?php
$frutas = array("laranja", "abacaxi", "melancia"); //array com uma só dimensão é um vetor
print_r($frutas);
?> | true |
5a38ad7bf5b199df6504a1e1353e68f65a8ce4b8 | PHP | wangyv/web_git | /CI/application/controllers/Welcome.php | UTF-8 | 2,985 | 2.5625 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this contro... | true |
43de5a25beee0f027cbebd462e68f3fbe5b2bb1a | PHP | JuanJoya/note-component | /app/Domain/Author.php | UTF-8 | 1,513 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Note\Domain;
use Note\Domain\Traits\Timestamps;
class Author
{
use Timestamps;
/**
* @var User usuario creador del autor.
*/
private $user;
/**
* @var string seudónimo de un autor.
*/
private $username;
/**
* @var string sl... | true |
269c27b461bc1a28f9b70557afa258e9a786d7eb | PHP | OpenMageModuleFostering/nektria_recs | /app/code/community/Nektria/ReCS/Helper/Data.php | UTF-8 | 7,966 | 2.546875 | 3 | [] | no_license | <?php
class Nektria_ReCS_Helper_Data extends Mage_Core_Helper_Abstract
{
const CONFIG_KEY = 'carriers/nektria_recs';
const CARRIER = 'nektria_recs';
const ASSETS_VERSION = 1;
const CONNECT_TIMEOUT = 1.5;
const TIMEOUT = 2;
const SHIPPINGLOGFILE = 'shipping_nektria.log';
/**
* Return checkout config value by... | true |
111b805874ce022c4c9583406e75ebc112eb8c2d | PHP | bomkeen/abconnect | /models/Product.php | UTF-8 | 1,055 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use app\models\ProductType;
/**
* This is the model class for table "product".
*
* @property int $product_id
* @property string $product_name
* @property int $product_type_id
*/
class Product extends \yii\db\ActiveRecord {
/**
* {@inheritdoc}
*/
public st... | true |
9953fdff65afdf7cda2dc71e1512ca11215b97dc | PHP | quang0212083/php-mvc-example | /controllers/posts_controller.php | UTF-8 | 2,342 | 2.796875 | 3 | [] | no_license | <?php
/**
* Class PostsController
*/
class PostsController {
/**
* Show all post
*/
public function index() {
// we store all the posts in a variable
$posts = Post::all();
require_once('views/posts/index.php');
}
/**
* Show by id post
*/
public function show... | true |
993c005112ee3699014d55dac85ce45599537c73 | PHP | anedovba/MVC | /src/Controller/CartController.php | UTF-8 | 1,538 | 2.75 | 3 | [] | no_license | <?php
namespace Controller;
use Library\Controller;
use Library\Request;
use Model\Cart;
use Model\Repository\BookRepository;
class CartController extends Controller
{
public function addAction(Request $request)
{
// TODO: repo - check if exists & active
$id = $request->get('id');
... | true |
643aaa12bdc0db9afba875ec254d521d08f99a6c | PHP | alexisbellido/simple-wordpress-theme | /inc/class-snake.php | UTF-8 | 432 | 3.3125 | 3 | [] | no_license | <?php
namespace Zoo\Reptiles;
/**
* Snake
*
*/
class Snake extends \Zoo\Animal {
public function hiss() {
echo "<h2>Sssss, help yourself an apple, I'm {$this->name}</h2>";
}
}
// // the standard way again, using current namespace
// $lil_snake = new Snake('little snaky');
// $lil_snake->hiss();
//
// // usin... | true |
e8c4930ab9809446de3ad0d31ef202a024deffaa | PHP | jeffjr2060/contact-form-validation-in-php | /index.php | UTF-8 | 2,051 | 2.671875 | 3 | [] | no_license | <?php
if(filter_has_var(INPUT_POST, 'submit')){
$name = htmlentities($_POST['name']);
$email = htmlentities($_POST['email']);
$message = htmlentities($_POST['message']);
if(!empty($name) && !empty($email) && !empty($message)){
}else{
echo'please fill the from ';
}
if(filter_input(I... | true |
e72b91fb7215fd64073c55f160a5ab7a86a9ec6a | PHP | qingsongsun/habagou | /web/bjphp/vendor/workflow/appmgr.php | UTF-8 | 1,647 | 2.578125 | 3 | [] | no_license | <?php
/**
* http://www.baijienet.com
* User: sint
* Date: 2016/11/27
* Time: 8:06
*/
class vendor_workflow_appmgr
{
//根据流程名称获得流程定义的源码
public function load_app($appname)
{
$app = meta('app.app')->Load(['name'=>$appname]);
if( $app == null ) bjerror("流程{$appname}不存在");
$ver = bjcreate(
'vendor.db.dao'... | true |
8049a61a79777d939e5dc25d0aad8e9dfb4dd08a | PHP | phly/PhlyBlog | /src/Compiler/Listener/Tags.php | UTF-8 | 3,887 | 2.6875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace PhlyBlog\Compiler\Listener;
use DomainException;
use InvalidArgumentException;
use Laminas\Tag\Cloud as TagCloud;
use PhlyBlog\Compiler\Event;
use PhlyBlog\Compiler\SortedEntries;
use function count;
use function in_array;
use function iterator_to_array;
use function sprintf;
use function str_replace... | true |
524d2bb25b21b656f14be05818de3914cbba4316 | PHP | adriangalan/Tarea-Ejercicio-de-Mini-Foro | /app/funciones.php | UTF-8 | 1,482 | 3.25 | 3 | [] | no_license | <?php
function usuarioOk($usuario, $contraseña) :bool {
$respuesta=false;
if (strlen($contraseña)>=8 && $contraseña==strrev($usuario)) {
$respuesta=true;
}
return $respuesta;
}
function contarPalabras($texto) {
return str_word_count($texto,0);
}
function contarLetras($texto) {
$respu... | true |
21cfd10d88b89cc6c7cc39db50bc3599b5f915e2 | PHP | Danack/TierJigDocs | /vendor/fluentdom/fluentdom/src/FluentDOM/Appendable.php | UTF-8 | 508 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Allow an object to be appendable to a FluentDOM\Element
*
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @copyright Copyright (c) 2009-2014 Bastian Feder, Thomas Weinert
*/
namespace FluentDOM {
/**
* Allow an object to be appendable to a FluentDOM\Element
*/
... | true |
37ef7b803b8f834981453f055aed1fdda8361bf7 | PHP | WPPlugins/dynamic-content-widget | /dcw-dynamic-content-widget.php | UTF-8 | 5,429 | 2.75 | 3 | [] | no_license | <?php
/**
* Dynamic Content Widget class.
*
* @since 0.1
*
* Copyright (C) 2011 Dikhoff Software
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of t... | true |
40eaa5bf8a6867e48590204ebe582fa76fb78a72 | PHP | websolutionsz/laravel-disk-monitor | /src/Commands/DiskMonitorCommand.php | UTF-8 | 903 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Websolutionsz\DiskMonitor\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
use Websolutionsz\DiskMonitor\Models\DiskMonitorEntry;
class DiskMonitorCommand extends Command
{
public $signature = 'disk-monitor:record-metrics';
public $description = 'Record Metri... | true |
cbbf4f5748477d6acb7d9644192dd51b03d50f5c | PHP | Korbeil/quasarr | /project/src/Message/DownloadTvEpisodeMessage.php | UTF-8 | 652 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Quasarr\Message;
final class DownloadTvEpisodeMessage
{
private $tvShowId;
private $tvSeasonId;
private $tvEpisodeNumber;
public function __construct(int $tvShowId, int $tvSeasonId, int $tvEpisodeNumber)
{
$this->tvShowId = $tvShowId;
$this->tvSeasonId = $tvSeasonI... | true |
bed6bce43fda5643800ff78c5272cc6a21800bf1 | PHP | 4slv/yaml-config | /CodeGenerator/structure/StructureInfoListInterface.php | UTF-8 | 1,048 | 2.796875 | 3 | [] | no_license | <?php
namespace YamlConfig\StructureCodeGenerator;
use YamlConfig\YamlFileToTree;
/** Список информации о структурах */
interface StructureInfoListInterface
{
/**
* @return ConfigStructureInfoInterface[] список информации о структуре конфига
*/
public function getStructureInfoList();
/**
... | true |
0ceed303e63a27893225faacf795a22dd85607e5 | PHP | tush59/interview-questions | /palindrom.php | UTF-8 | 395 | 3.015625 | 3 | [] | no_license | <?php
error_reporting(E_ALL^E_NOTICE);
ini_set('display_errors','On');
$num=121;
$copynum=$num;
$digit;
$reverse;
while ($copynum>0){
$digit=$copynum%10;
$reverse=($reverse*10+$digit);
//echo $reverse;
$copynum=$copynum/10;
}
echo "<br/>";
echo $reverse;
echo "<br/>";
if($num==$revers... | true |
dc2867ee41e7a12a9466c48a913323cc221c7734 | PHP | awesome-academy/ecommerce_03 | /app/Repositories/ProductRepository.php | UTF-8 | 3,343 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Product;
use App\Repositories\EloquentRepository;
use App\Repositories\CategoryRepository;
class ProductRepository extends EloquentRepository
{
private $categoryRepository;
public function __construct(CategoryRepository $categoryRepository)
{
paren... | true |
b794a9e01510868c2806e18f96f5b00375c8824e | PHP | gogromat/yodatalk | /translators/bing/class/MicrosoftTranslator.class.php | UTF-8 | 7,957 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* MicrosoftTranslator - A PHP Wrapper for Microsoft JSON Translator API
*
* @category Translation
* @author Renjith Pillai
* @link http://www.renjith.co.in
* @copyright 2012 Renjith Pillai
* @version 1.0.0
*/
class MicrosoftTranslator
{
/**
* Some Constants
... | true |
e8cc714f290600d855219b67fc32a1df93288d72 | PHP | Arhangel31337/wings | /Wings/File.php | UTF-8 | 4,936 | 2.71875 | 3 | [] | no_license | <?php
namespace Wings;
final class File
{
public static $uploadDir;
public function __construct() {}
public static function confirmTempFile($filePath)
{
$fileMime = \preg_replace('/[\s\.]/', '_', \mime_content_type($filePath));
$type = \explode('/', $fileMime);
$filePathNew = \explode('/', $filePath)... | true |
e5fa9d34000b26ab3999e7cc7373c651aee57192 | PHP | phalcon/ide-stubs | /src/Messages/Message.php | UTF-8 | 2,750 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <team@phalcon.io>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Messages;
use JsonSerializable;
/**
* Phalcon\Messages\Message
*
... | true |
3a687d243d0da888128bf5122abf433f0f4bfab5 | PHP | JanStanleyWatt/commonmark-furigana-extension | /tests/FuriganaTest.php | UTF-8 | 8,098 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2023 Jan Stanley Watt
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed... | true |
2c926532db37ee8574b80342e3a1eb4da49906d7 | PHP | paultxr/upload_quest | /upload.php | UTF-8 | 2,531 | 3.0625 | 3 | [] | no_license | <?php
if(!empty($_FILES['photos']['name'][0])) {
$photos = $_FILES['photos'];
$uploaded = array();
$failed =array();
$allowed = array('jpg', 'png', 'gif');
foreach($photos['name'] as $position => $photo_name) {
$photo_tmp = $photos['tmp_name'][$position];
$photo_size = $photos['si... | true |
e9e9a03aa2b56289f756cd9285f8e7a784369f2e | PHP | luigif/WsdlToPhp | /samples/directsmile/Authenticate/DirectSmileServiceAuthenticate.php | UTF-8 | 2,626 | 2.796875 | 3 | [] | no_license | <?php
/**
* Class file for DirectSmileServiceAuthenticate
* @date 02/08/2012
*/
/**
* Class DirectSmileServiceAuthenticate
* @date 02/08/2012
*/
class DirectSmileServiceAuthenticate extends DirectSmileWsdlClass
{
/**
* Method to call Authenticate
* Meta informations :
* - documentation : Standard Authenti... | true |
0dee15f60e91b3ba52870d981d987b9308e753d2 | PHP | vnatco/posts | /php/mysql.class.php | UTF-8 | 23,645 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
class MySQL{
private $db;
private $user;
public function __construct(&$db,&$user){
$this->db=$db;
$this->user=$user;
}
/////////////////////////////////////////////////////////////////////
// Get
public function GetSharedId(){
$id=Functions::GenerateRandomString(8);
while($this-... | true |
37d1ba2ff6b225e9390a7ca60af84f2bca944473 | PHP | codingXllama/iParkIt | /admin/includes/edit_parking.php | UTF-8 | 2,674 | 2.671875 | 3 | [] | no_license | <?php
if (isset($_GET['p_id'])) {
}
// finding all the posts -> Parkings
$query = "SELECT * FROM posts";
$select_posts_by_id = mysqli_query($connection, $query);
// Displaying the content in the db
while ($row = mysqli_fetch_assoc($select_posts_by_id)) {
$parking_id = $row['post_id'];
$parking_title = $row[... | true |
54afc6f961cf74f725b0f4ca9ae86fc3800e9ba5 | PHP | charlinedns/videotheque | /templates/filmsDetails.html.php | UTF-8 | 496 | 2.53125 | 3 | [] | no_license | <?php
$filmDetails = Film::displayFilm($id);
foreach ($filmDetails as $value) {
?>
<div class='card border-primary mb-3' style='max-width: 20rem;'>
<div class='card-header'><?= $value['genres'] ?> </div>
<div class='card-body'>
<h4 class='card-title'><?= $value["title"] ?><br ... | true |
68a3275cd6d5b4dc9533d1cdbeb09af2efa9df1f | PHP | AaronSchulz/WikiDataQueryOrient | /lib/WdqQueryEngine.php | UTF-8 | 2,767 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
class WdqQueryEngine {
/** @var MultiHttpClient */
protected $http;
/** @var string */
protected $url;
/** @var string */
protected $user;
/** @var string */
protected $password;
/** @var string */
protected $sessionId;
/**
* @param MultiHttpClient $http
* @param string $url
* @param string $... | true |
3bf2551eb65c2438a2875f6cf62b0d3d05ab498c | PHP | Jorge-William/PHP-Orientado-a-Objetos | /class_constants.php | UTF-8 | 257 | 3.59375 | 4 | [] | no_license | <?php
class Clock
{
public const DAY_IN_SECOUNDS = 60 * 60 * 24;
public function tomorrow(){
return time() + self::DAY_IN_SECOUNDS;
}
}
echo Clock::DAY_IN_SECOUNDS . "<br />";
echo Clock::tomorrow(); | true |
5f8ac40286cdc9e6c7f21db4e7851a4ebefa253d | PHP | kaleseverin/UW-courses | /comment/comment.php | UTF-8 | 1,740 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Comment function</title>
<!--
<script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js" type="text/javascript"></script>
-->
<script src="comment.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="comment.css" />
... | true |
049ca12b664d0fbb142139b98576e3fef3f7daef | PHP | insomynwa/scoreboard | /controller/live-game-controller-class.php | UTF-8 | 12,974 | 2.71875 | 3 | [] | no_license | <?php
namespace scoreboard\controller;
use scoreboard\config\Database;
use scoreboard\includes\Tools;
use scoreboard\model\Gameset_Model_Class;
use scoreboard\model\Live_Game_Model_Class;
use scoreboard\model\Player_Model_Class;
use scoreboard\model\Score_Model_Class;
use scoreboard\model\Team_Model_Class;
class Live... | true |
500dbeea4f0b672dd918a21ca5e0096b430869cf | PHP | tomaj/prepositioner | /src/Prepositioner/Language/SlovakLanguage.php | UTF-8 | 792 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Tomaj\Prepositioner\Language;
class SlovakLanguage implements LanguageInterface
{
public function prepositions(): array
{
return [
/* 1 letter */
'a',
'i',
'k',
'o',
'v',
'u',
... | true |
e8cf0f5611194d77ff0642660f73ddd727f64c30 | PHP | gaetano1984/laravel-quake | /app/Console/Commands/updateEarthQuake.php | UTF-8 | 2,941 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Services\quakeService;
use Illuminate\Console\Command;
use App\Services\locationService;
use Symfony\Component\Console\Helper\ProgressBar;
class updateEarthQuake extends Command
{
/**
* The name and signature of the console command.
*
* @var string
... | true |
e222662ad2e799edcd05ebc4b0d01cf4f8fbc72a | PHP | c4software/bts-sio | /.vuepress/public/demo/php/greta-tv/refactor-structure-mvc/utils/Gravatar.php | UTF-8 | 281 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace utils;
class Gravatar
{
static function get_gravatar($email, $s = 80, $d = 'mp', $r = 'g')
{
$url = 'https://www.gravatar.com/avatar/';
$url .= md5(strtolower(trim($email)));
$url .= "?s=$s&d=$d&r=$r";
return $url;
}
} | true |
93d3ff08627b1886199c6300b74e3fc1507d8ca7 | PHP | anam5233/backend-projects | /work_shop/class_constant.php | UTF-8 | 262 | 3.078125 | 3 | [] | no_license | <?php
class WebcoachbdProduct {
public $title = "default value";
const PI = "3.1416";
public function getTutorial($name) {
echo "Webcoachbd provide massive tutorial on" . $name;
}
}
$productObject = new WebcoachbdProduct();
echo $productObject::PI;
?> | true |
fa3a6afd41bb682da38645a0bcf70df1834b216b | PHP | jbernie2/csc210final | /php/index.php | UTF-8 | 1,228 | 2.625 | 3 | [] | no_license | <?php
//display php errors on page
ini_set('display_errors', 1);
error_reporting(E_ALL);
//allow for session variables to be used
if(!isset($_SESSION)) {
session_start();
}
//functions that will allow the progams that the user has applied to to be displayed
include_once "userProgramTable.php";
//c... | true |
efee101be0e10383b1aa58e330c69b0fce93640d | PHP | h-siegfried/efi-kzo-phpkurs | /17_db-insert/pages/insert.php | UTF-8 | 1,729 | 3.078125 | 3 | [] | no_license | <?php
$feedback = "Sie haben noch keine Daten gesendet.";
// Das db_handler-Objekt erzeugen (ist bereits erledigt)
try {
$db_handler = new PDO('mysql:host=localhost;dbname=uebungsdb;charset=utf8',
'schuelerWeb', 'E2F0I1_k4zo');
} catch (PDOException $ex) {
error_log($ex->getMessage());
print("<h3>F... | true |
6139f40098019891ce8844138d9bfa4403aace3e | PHP | samanthayee18/349Midterm | /exam2.php | UTF-8 | 679 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<h1>MidTerm php connect&display</h1>
<?php
$conid = mysqli_connect("localhost", "root", "", "books")
or die ("Cannot connect. " . mysqli_connect_errno() . " ".
mysqli_connect_error());
echo "Connected. ". mysqli_get_host_i... | true |
65f0392297a865643148480873e749750eebd475 | PHP | bigjay517/Robot-Competition-Score-Keeper-Server | /update_team.php | UTF-8 | 1,616 | 2.859375 | 3 | [] | no_license | <?php
/*
* Following code will update a team information
* A product is identified by team id (id)
*/
// array for JSON response
$response = array();
// check for required fields
if (isset($_POST['id']) && isset($_POST['score']) && isset($_POST['touches'])) {
$id = $_POST['id'];
$score = $_POST['scor... | true |
a8fec73260e74aa21805f9f78cd84f33dc12e339 | PHP | kowal2499/sobczak-orders | /tests/Utilities/Factory/Definition/ProductFactory.php | UTF-8 | 626 | 2.5625 | 3 | [] | no_license | <?php
/** @author: Roman Kowalski */
namespace App\Tests\Utilities\Factory\Definition;
use App\Entity\Product;
use App\Tests\Utilities\Factory\FactoryDefinitionInterface;
use Faker\Generator;
class ProductFactory implements FactoryDefinitionInterface
{
public static function supports(): string
{
retu... | true |
6736700d4ef6d419ffd316c5b8c04709f81e768e | PHP | oxygen-cms/mod-pages | /src/Repository/PageRepositoryInterface.php | UTF-8 | 442 | 2.640625 | 3 | [] | no_license | <?php
namespace OxygenModule\Pages\Repository;
use Oxygen\Core\Templating\TemplatableRepositoryInterface;
use Oxygen\Data\Repository\RepositoryInterface;
use OxygenModule\Pages\Entity\Page;
interface PageRepositoryInterface extends RepositoryInterface, TemplatableRepositoryInterface {
/**
* Finds a Page ba... | true |