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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
44acb8dbdcfdcb8bf7f09251d3ae622d355050c8 | PHP | dheeraj85/bajrang_trader | /protected/models/Employeebenifits.php | UTF-8 | 3,712 | 2.609375 | 3 | [] | no_license | <?php
/**
* This is the model class for table "employee_benifits".
*
* The followings are the available columns in table 'employee_benifits':
* @property integer $id
* @property integer $employee_id
* @property string $txn_type
* @property integer $month
* @property integer $year
* @property string $amount
*... | true |
dbfdf42e17e85e3bbd242518a4374d89383213ec | PHP | LeshaTuruto/testproject | /src/FileChecker/CsvFileChecker.php | UTF-8 | 595 | 3.3125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\FileChecker;
/**
* This class checks the csv file for existence and readability
*/
class CsvFileChecker implements FileChecker
{
private string $errorMessage = "";
public function checkFile(string $filename): bool
{
if(!file_exists($filename) || !i... | true |
336794247fc720a9de89a78d5f8cb524b23eaed6 | PHP | etxahun/GestionMedicaPacientes | /login/admin/admin_home.php | UTF-8 | 1,454 | 2.53125 | 3 | [] | no_license | <?php
$url = "http://www.angry-frog.com/downloads/loginscript_version.csv";
if ( $fp = @fopen($url, 'r') ) {
$read = fgetcsv($fp);
fclose($fp); //always a good idea to close the file connection
} else {
echo 'UPDATE SERVER OFFLINE';
$read[0] = $version;
}
$updateneeded = ($read[0] > $config['Version']... | true |
8e86fa68fca61321049762b3ac3ff500e072c27f | PHP | harikaatta/project2 | /dashboard.php | UTF-8 | 1,488 | 2.9375 | 3 | [] | no_license | <?php
$value = $_GET["data"];
$coursearr = $_GET["coursearr"];
$schoolarr = $_GET["schoolarr"];
$yeararr = $_GET["yeararr"];
$percentagearr = $_GET["percentagearr"];
//echo $value;
$value = explode("||^||",$value);
$coursearr = explode(",",$coursearr);
$schoolarr = explode(",",$schoolarr);
$yeararr... | true |
863542f10de548a2dee2c9e3aa0d66ffdd2db79a | PHP | sofielindstrand/Swapi-task | /character.php | UTF-8 | 1,251 | 3.453125 | 3 | [] | no_license | <html>
<head>
<title></title>
</head>
<meta charset="UTF8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<body>
<?php
class Character
{
//tilldelar objekt private-attribut
private $name;
... | true |
0da0f10e92973e0ec638be14a8f1fe8d6e6b78f5 | PHP | RTONational/omnipay-paymentvision | /src/CreditCardHelper.php | UTF-8 | 1,763 | 3.015625 | 3 | [] | no_license | <?php
namespace Omnipay\PaymentVision;
/**
* CreditCardHelper class
*
* This class defines various static utility functions that are in use
* throughout the Omnipay system.
*/
class CreditCardHelper
{
const BRAND_VISA = 'Visa';
const BRAND_MASTERCARD = 'MasterCard';
const BRAND_DISCOVER = 'Discover';... | true |
69e21ec33081dfa405294773a69f8f5f08b249cc | PHP | mogensengmark/zCore | /application/models/Menu.php | UTF-8 | 797 | 2.765625 | 3 | [] | no_license | <?php
/**
*
* Datamodel for handling menu elements
* @author Mogens Engmark
*
*/
class Application_Model_Menu
{
// Variables
private $_menuItems;
function __construct()
{
$this->_menuItems = new Zend_Navigation();
}
// Functions
function setMenuItems($menuI... | true |
bfdbeff297c4bd4d23fd5cea35a8dd34ab0c21ec | PHP | IFPB-PRPIPG/periodicos-ifpb | /lib/pkp/plugins/metadata/nlm30/filter/Nlm30PersonStringFilter.inc.php | UTF-8 | 2,294 | 2.859375 | 3 | [] | no_license | <?php
/**
* @file plugins/metadata/nlm30/filter/Nlm30PersonStringFilter.inc.php
*
* Copyright (c) 2013-2015 Simon Fraser University Library
* Copyright (c) 2000-2015 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class Nlm30PersonStringFilter
* @ingroup plugin... | true |
16edfaaecac59c545cfca704a0a8a785811b1993 | PHP | LuciaHurtadoCardoso/PHP | /ejercicios_tanda3/exercise4_t3.php | UTF-8 | 404 | 3.296875 | 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>Exercise4/tanda3</title>
</head>
<body>
<h2>Contando números de 20 en 20</h2>
<?php
for($i = 320;... | true |
273bf22afece8cd59c1ce708ef8ae92b23865cd2 | PHP | TimelikeClosure/php_user_auth | /signup.php | UTF-8 | 2,411 | 3.078125 | 3 | [] | no_license |
<?php
require_once('resource/utilities.php');
if (isset($_POST['signup'])){
$formErrors = [];
$requiredFields = ['email', 'username', 'password'];
$formErrors = emptyFieldErrors($formErrors, $requiredFields);
$minFieldLengths = ['email' => 6, 'username' => 4, 'password' => 8]... | true |
853da64f484e39a4d23bef7331b0ebe34dac8962 | PHP | grape-fluid/magic-control | /src/TemplateCacheService.php | UTF-8 | 1,770 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Grapesc\GrapeFluid\MagicControl;
use Nette\Caching\Cache;
use Nette\Caching\IStorage;
/**
* @author Jiri Novy <novy@grapesc.cz>
* @author Mira Jakes <jakes@grapesc.cz>
*/
class TemplateCacheService
{
/** @var Cache */
private $cache;
/** @var IStorage */
private $cacheStorage;
/**
* Te... | true |
15005ee16aa80a1918a575628f6b60466dabfc91 | PHP | ffvsnn520/lument-jwt | /app/Http/Controllers/PostController.php | UTF-8 | 1,961 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: User
* Date: 2017/6/30
* Time: 15:18
*/
namespace App\Http\Controllers;
use App\Post;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Request;
class PostController extends Controller
{
/**
* Return whole ... | true |
d748e46ce3b3280458da9ee8ef9b71acbef2d5e5 | PHP | bruxr/Silver-API | /tests/Core/Datastore/SluggableTest.php | UTF-8 | 930 | 2.515625 | 3 | [] | no_license | <?php
use App\Core\Datastore\Model;
use App\Core\Datastore\Sluggable;
class SluggableTest extends TestCase {
public function setUp()
{
$this->ds = $this->getMockBuilder('App\Core\Datastore\Datastore')
->disableOriginalConstructor()
->getMock();
$this->ds->... | true |
9a4971334393f9363357b02a9ec2f42dabcfe5db | PHP | nitinaddweb/addweb-excesies | /namespacekw.php | UTF-8 | 325 | 3.375 | 3 | [] | no_license | <?php
namespace Html;
class naming {
public $name;
public $surname;
public function msg() {
echo "name is person is :=> <b><u> $this->name </b></u> and last name is :=> <b><u>$this->surname"."<br>";
}
}
$table = new naming();
$table->name = "Nitin";
$table->surname = "chauhan";
?>
<?php
$table->msg()... | true |
fe700dca2395b0e5d7fbf19b7888571b0f37cfc8 | PHP | paullewallencom/concrete5-978-1-7821-6454-8 | /_src/Chapter 9/06 sending an email when a user creates a new account/libraries/user_emailer.php | UTF-8 | 325 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
class UserEmailer {
public function newAccountCreated($user) {
$mail = Loader::helper('mail');
$mail->setSubject('New account created!');
$mail->setBody('Someone with the email address of '.$user->uEmail.' has created an account.');
$mail->to('somebody@example.com');
$mail->from('noreply@example.com... | true |
9dfbfefc175fa865e04643975c4fd211b7b505df | PHP | MrBleuGlacial/CDP---Scrumosaurus | /app/controllers/UserController.php | UTF-8 | 4,412 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
class UserController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
if(Session::has('message'))
return View::make('users/index');
else
return Redirect::to('users/create');
}
/**
* Show the fo... | true |
511dea1abb31b18ed5af816ce28caded2823a8cb | PHP | shurooqsalahat/ITG_Training | /Ajax_Json/action.php | UTF-8 | 171 | 2.828125 | 3 | [] | no_license |
<?php
$myArr = array("00970"=>"Palestine", "00971"=>"Jordan", "00972"=>"Turkey", "00973"=>"Egypt", "00974"=>"Lebanon");
$myJSON = json_encode($myArr);
echo $myJSON;
?>
| true |
4b2f1f1a66b6eca7482277a563d2c5c3d453c65d | PHP | Runa918/HighAndLow | /highAndLowS03.php | UTF-8 | 1,048 | 2.6875 | 3 | [] | no_license | <html>
<head>
<meta http-equiv="Content-Type"content="text/html;charset=UTF-8">
<title>High&Lowゲーム</title>
</head>
<body>
<div align="center">
<font size="8">High&Lowゲーム</font>
<hr>
<form action="highAndLowS07.php" method="post">
<?php
$cards = array("Jk.png","01.png","02.png","03.png... | true |
ef42dbb0180e13556b344783591154df2b32f06a | PHP | scottdavis/php_github | /lib/loader.php | UTF-8 | 1,603 | 2.953125 | 3 | [] | no_license | <?php
namespace GitHub;
class Loader {
const PREFIX = 'http://github.com/api/v2/json';
static $user_agent = '';
static $http_headers = array();
static $token = '';
static $login = '';
public static function send($url, $type='GET', $auth = false, $post_options = array()) {
//init curl
$curl = curl_init(... | true |
d57c17e566a64609191331cb593d0db35f12ce04 | PHP | RCHARLES0287/OCProject4.0 | /App/Frontend/Modules/Chapters/Controller/ChaptersController.php | UTF-8 | 1,420 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Frontend\Modules\Chapters\Controller;
use Entity\ChapterEntity;
use Model\ChaptersManager;
use Model\CommentsManager;
use Exception;
use OCFram\BackController;
use OCFram\HTTPRequest;
use OCFram\Utilitaires;
class ChaptersController extends BackController
{
public function executeShowallchap... | true |
59907c482c69b51f229041c497e625a1a3ee7362 | PHP | euclid1990/timesheet | /src/Chatwork.php | UTF-8 | 2,344 | 3.109375 | 3 | [] | no_license | <?php
namespace Src;
define('CREDENTIALS_CW', __DIR__ . '/../credentials/chatwork.json');
class Chatwork
{
// URI to chatwork API
const URI = 'https://api.chatwork.com/v1/rooms/%s/messages';
// Token of chatwork API
protected $token = null;
// Message to be sent
const MESSAGE = "[To:%s] %s\n%... | true |
9fb3d6ca3d28356937f4df3f3e652e3e3e7fe889 | PHP | jro-nyc/meekmeek | /library/data/db/DbConInfo.php | UTF-8 | 852 | 3.140625 | 3 | [] | no_license | <?php
class DbConInfo
{
var $theDbServer;
var $theUsername;
var $thePassword;
var $theDbNames = array();
var $theTableNames = array();
function DbConInfo()
{
$this->theDbServer = "localhost";
$this->theUsername = "meekmeek_test";
$this->t... | true |
742179329708a3a19b1dddfc9eaef078f523f4f6 | PHP | xadim/TLC-Pol | /plugins/litebox__old/class/litebox.core.php | UTF-8 | 16,823 | 2.765625 | 3 | [
"X11",
"MIT"
] | permissive | <?php
require_once("helper.php");
/**
* @desc The core integration with WordPress.
*
*/
class liteBoxCore{
public static $litebox_options;
public static $class_media;
public static $class_image;
/**
* __construct function.
*
* @access public
* @return void
*/
public function __construc... | true |
018a58b9cc6320db4dfb807af132178005f8f848 | PHP | jarryfull/PHP | /Tienda Online/vista/pedido.php | UTF-8 | 4,938 | 2.609375 | 3 | [] | no_license | <?php
include "../modelo/conexion.php";
include "../controlador/producto.php";
session_start();
$pedido = new conexion();
$total = $_SESSION['total'];
$id_pedido = $_SESSION['id'];
$pedido->insertar("INSERT INTO pedidos (total, usuarios_id_usuario)VALUES('$total','$id_pedido')");
$id = $pedido->conexion->insert_id;
$ca... | true |
5aecd484e99ca05a8ebe89845f3994737dd6fe2d | PHP | lewisshaw/php-iterate | /test/Iterators/AllTest.php | UTF-8 | 640 | 2.84375 | 3 | [] | no_license | <?php
namespace IterateTest\Iterators;
use Iterate\Iterators\All;
class AllTest extends \PHPUnit_Framework_TestCase
{
public function testAllReturnsTrueWhenAllTrue()
{
$selector = new All;
$numbers = [2,4,6,8];
$result = $selector->iterate($numbers, function ($number) { return $number ... | true |
49ba2dd943eb20dbdffac2a89a2a32866f6a22c5 | PHP | summerblue/administrator | /src/Frozennode/Administrator/Fields/File.php | UTF-8 | 1,640 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Frozennode\Administrator\Fields;
use Frozennode\Administrator\Includes\Multup;
class File extends Field {
/**
* The specific defaults for subclasses to override
*
* @var array
*/
protected $defaults = array(
'naming' => 'random',
'length' => 32,
'mimes' => false,
'size_limit' => 2,
... | true |
a87f1ab32df2151e4964656fe1fccbbd760a0c39 | PHP | wisnubaldas/blog_hitler | /database/migrations/2020_10_30_150018_create_type_artikels_table.php | UTF-8 | 1,578 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
use League\Csv\Reader;
use League\Csv\Writer;
class CreateTypeArtikelsTable extends Migration
{
/**
* Run the migrations.
*
* @retur... | true |
174ad046235d24f4d1a58a77cbc38a2bad8a8249 | PHP | helpfulrobot/i-lateral-silverstripe-commerce-customisableproduct | /code/model/CustomisableProduct.php | UTF-8 | 1,401 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class CustomisableProduct extends Product {
/**
* @config
*/
private static $description = "A product that can be modified by the customer";
private static $has_many = array(
"Customisations"=> "ProductCustomisation"
);
public function getCMSFields() {
$fields = p... | true |
c18ee80fd921b0af994e21c1b69d428a9a1d5708 | PHP | magefad/Yii2-basic-ticket | /models/User.php | UTF-8 | 3,128 | 2.734375 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
use yii\web\IdentityInterface;
/**
* This is the model class for table "user".
*
* @property integer $id
* @property string $email
* @property string $auth_key
*/
class User extends \yii\db\ActiveRecord implements IdentityInterface
{
#public $rememberMe;
/**
*... | true |
1488b6b5b56e1130946241d416450f0f9e9fa0a2 | PHP | Jorgeluispinho/APPRU | /load-users.php | UTF-8 | 981 | 2.59375 | 3 | [
"MIT"
] | permissive | <TABLE id='table'>
<TR>
<TH>Nome</TH>
<TH>ID do cartão</TH>
<TH>Matrícula</TH>
<TH>Data</TH>
<TH>Entrada</TH>
<TH>Saída</TH>
</TR>
<?php
session_start();
//$test = $_SESSION['id'];
//Connect to database
require'connectDB.php';
$seldate = $_SESSION["exportdata"];
$sql = ... | true |
3b7a4cc1d8c994a1cc2090fa5e6dfc9537f18efc | PHP | kendolabdev/kendoplatform | /app/bundle/platform/src/Platform/Core/Model/CoreProfileValueTable.php | UTF-8 | 1,313 | 2.515625 | 3 | [] | no_license | <?php
/**
* Generate by CodeGenerator\DbTable for table `kendo_core_profile_value`
*/
namespace Platform\Core\Model;
/**
*/
use Kendo\Db\DbTable;
/**
* Class CoreProfileValueTable
*
* @package Core\Model
*/
class CoreProfileValueTable extends DbTable
{
// PUT YOUR CODE HERE
//START_TABLE_GENERATOR
... | true |
5bb0e546504ff90e6f89afb358e1e25b41919954 | PHP | hmazter/advent-of-code-solutions | /2022/day3/functions.php | UTF-8 | 1,273 | 3.21875 | 3 | [] | no_license | <?php
declare(strict_types=1);
use Illuminate\Support\Collection;
function part1(array $input): int
{
return collect($input)
->map(get_priority_for_rucksack(...))
->sum();
}
function part2(array $input): int
{
return collect($input)
->chunk(3)
->map(fn (Collection $group) => g... | true |
5059a7f07fc14323530ac3c2efe84ef841bccbe6 | PHP | hanifdeveloper/twitter | /getfollowers.php | UTF-8 | 869 | 2.796875 | 3 | [] | no_license | <?php
/*
It displays a list of all the friends/followers of this user. List of id.
*/
require "autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
$consumer_key=""; /* your CONSUMER-KEY */
$consumer_sec=""; /* your CONSUMER-SECRET */
$oauth_tok=""; /* your OAUTH-TOKEN */
$oauth_sec=""; /* your OAUTH-SECRET */
$use... | true |
d61e8ecc64813486c3b1d779297ba1fa13a6dd1c | PHP | paulfcdd/mbp | /mnt/app/src/Entity/DomainParking.php | UTF-8 | 3,888 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\DomainParkingRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints\IsFalse;
use... | true |
6ac335e6dd8ec51b7e9afb453256569f755413c3 | PHP | thezawad/amaderschool | /create_course.php | UTF-8 | 2,428 | 2.578125 | 3 | [] | no_license | <?php
include 'includes/functions.php';
?>
<?php
include 'includes/session.php';
?>
<?php confirm_logged_in(); ?>
<?php
include 'includes/connection.php';
?>
<?php
if (isset($_POST['submit'])) {
if ($_POST['submit']) {
$name = mysql_prep($_POST['name']);
$code = mysql_prep($_POST['code']);
$startdate = mysql_pre... | true |
33f2509a9b7455cd2cebc45edfad57941a847ea7 | PHP | oworyoakim/eshop | /app/Http/Controllers/Tenant/RolesController.php | UTF-8 | 6,250 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Tenant;
use App\Http\Controllers\TenantBaseController;
use Illuminate\Http\Request;
use App\Models\Permission;
use App\Models\Role;
use Laracasts\Flash\Flash;
use Sentinel;
use Exception;
class RolesController extends TenantBaseController {
/**
* RolesController construc... | true |
b8f2040eaf784c0c935e8970aae3d0e2a15d2cb4 | PHP | mostafa20160424/Laravel | /php anonymous/app/News.php | UTF-8 | 1,814 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class News extends Model
{
use SoftDeletes;
protected $fillable=['user_id','title','description','statues'];
//variable name must be protected $fillabe must but the column that you insert always not ... | true |
8ae67b11d7a3ba88d001b02e0901b5d41a151280 | PHP | nurnaff/keluhan_hamil | /prosessedang.php | UTF-8 | 1,298 | 2.71875 | 3 | [] | no_license | <html>
<head><title>Hasil Diagnosa</title>
</head>
<body>
<p>Hasil Diagnosa Keluhan Kategori Sedang adalah</p>
<br>
<?php
include("koneksi.php");
$g1=$_POST['pilih1'];
$g2=$_POST['pilih2'];
$g3=$_POST['pilih3'];
$g4=$_POST['pilih4'];
$g5=$_POST['pilih5'];
$g6=$_POST['pilih6'];
$g7=$_POST['pilih7'];
$g8=$_POST['p... | true |
8f270201308cc949094b79c83f2238f299ecfc26 | PHP | Lenori/InSitu | /html/admin/edit_clinica.php | UTF-8 | 2,418 | 2.6875 | 3 | [] | no_license | <?php
include('../includes/login_handler.php');
include('../includes/header.php');
$id = $_GET['id'];
$sql = "SELECT * FROM clinicas WHERE id = $id";
$rst = mysqli_query($conn, $sql);
$clinicas = array();
while ($rstDB = mysqli_fetch_assoc($rst))
$clinicas[] = $rstDB;
if (isset($_POST['cmd']) && $_POST['cmd']... | true |
61d9625c979cfd45d67fd503cb4b949877c183f6 | PHP | ahmed081/translated | /php/test.php | UTF-8 | 1,530 | 2.875 | 3 | [] | no_license | <?php
require_once 'Classes/PHPExcel.php';
//require_once 'Classes/PHPExcel/IOFactory.php';
if(isset($_POST['excel'])) {
// création des objets de base et initialisation des informations d'entête
$classeur = new PHPExcel;
$classeur->getProperties()->setCreator("Annie Gagnon");
$classeur->setAc... | true |
b37e88f017564f7a465e8559dd0f81b01a27bcae | PHP | YasminePlasmans/web-backend-oplossingen | /Functions/opdracht-functions-gevorderd/opdracht-functions-gevorderd-2/opdracht-functions-gevorderd-2-static.php | UTF-8 | 1,186 | 3.21875 | 3 | [] | no_license | <?php
$pigHealth = 5;
$maxThrows = 8;
function calculatehit($health){
$hit = FALSE;
$percent = rand(0,100);
if($percent >= 60){
$hit = TRUE;
}
if($hit == TRUE){
$hitmiss['isHit'] = true;
$hitmiss['message'] = "Raak! Er zijn nog maar " . $health . " varkens over";
}else{
$hit... | true |
6ddec9cb3b436ec8798ebe196eaee925ec5c68eb | PHP | BackupTheBerlios/hycms-svn | /trunk/src/services/session.php | UTF-8 | 924 | 2.578125 | 3 | [] | no_license | <?php
/*
* hyCMS
* Copyright(C)2009 by Peter Neubauer
* Published under the terms of the Lesser GNU General Public License v2
*
*/
?>
<?php
session_start();
/*
* is_authorized()
*
* Checks if the password stored in /storage/private/passwd is valid for the user name
*
*/
function is_... | true |
b480c54dd292b44fc6c763b8369f1ceffbf5bf7c | PHP | txawjteeb/PHP-Fundamentals | /Day 13 - CS201 PHP Fundamentals Advanced/Advanced III/main.js.php | UTF-8 | 138 | 2.71875 | 3 | [] | no_license | <?php
$a=rand(0,100);
$b=rand(0,100);
echo "$(document).ready(function()
{
alert('" . $a ." X " . $b ." = ". $a*$b ."');
});";
?>
| true |
b9faf1faca8ccdb14fbb366f95471024849b49b3 | PHP | Vexatos/OpenData | /server/src/OpenData/Irc/RunConsoleCommand.php | UTF-8 | 11,295 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace OpenData\Irc;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\I... | true |
6315e75fa403adc21b064b85fae2532441a7ea44 | PHP | Tdude/astrid-2014 | /includes/flipimg-tyger.php | UTF-8 | 3,119 | 2.65625 | 3 | [] | no_license | <?php
// SMALLER ONHOVER (FLIP)IMAGE LISTING FROM LATEST UPDATED TYGER CATEGORIES
if ( is_paged() ){
$this_is_paged = 12;
} else {
$this_is_paged = 7;
}
$args = array(
'post_type' => 'wpboot_tyger',
//'cat' => array( 9, 13, 22 ),
//'category_name' => 'nyheter', // only for tyger in only one cat
'posts_per_page' =... | true |
1144ec889f9ac7f358b57a25115289a1b9fd2939 | PHP | dosdedaw/Prueba01 | /htdocs/asignaturas/Sistemas____/MegaCalcu/DecBi.php | UTF-8 | 447 | 2.6875 | 3 | [] | no_license | <?php
$deci=$_POST['numdec'];
$array[]="";
$cont=0;
while ($deci >= 2){
$divi=$deci/2;
$bit=$deci%2;
if ($bit == 1){
$array[$cont]="1";
$deci=$divi-0.5;
}else{
$array[$cont]="0";
$deci=$divi;
}
$cont++;
}
$array[$cont]="1";
echo $_POST['numdec'].'<sub>10</sub> <----> ';
if ($deci... | true |
0bb7d26a90ae6cd65e44818d0ee525fe738ceb2c | PHP | thenostromo/SimpleVirtualCart | /core/FormHandler/FormHandlerInterface.php | UTF-8 | 507 | 2.59375 | 3 | [] | no_license | <?php
namespace FormHandler;
interface FormHandlerInterface
{
/**
* @param array $params
*/
public function handleForm(array $params);
/**
* @param array $params
* @return object
*/
public function getFormData(array $params);
/**
* @param object $model
* @return... | true |
737d4b0d1afe285e1c853f79e5121914bff6beab | PHP | chadicus/memoize-php | /tests/MemoryTest.php | UTF-8 | 712 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace TraderInteractive\Memoize;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \TraderInteractive\Memoize\Memory
*/
class MemoryTest extends TestCase
{
/**
* @test
* @covers ::memoizeCallable
*/
public function memoizeCallableTwice()
{
$count = 0;
$k... | true |
2120963619a1e56e009fc1f743d52a3cc4d070a7 | PHP | yosietserga/necoyoad-wp-carousel-slider | /classes/Admin/Setting.php | UTF-8 | 1,778 | 2.546875 | 3 | [] | no_license | <?php
namespace CarouselSlider\Admin;
use CarouselSlider\Supports\SettingAPI;
use Exception;
defined( 'ABSPATH' ) || exit;
class Setting {
/**
* Instance of current class
*
* @var self
*/
private static $instance;
/**
* @return self
*/
public static function init() {
if ( is_null( self::$instance... | true |
f2cf8b8396d7f190ead3ea9b00ef01559c418baa | PHP | abordage/html-min | /src/HtmlMin.php | UTF-8 | 3,772 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Abordage\HtmlMin;
class HtmlMin
{
protected bool $findDoctypeInDocument = true;
protected bool $removeHtmlComments = true;
protected bool $removeBlankLinesInScriptElements = false;
protected bool $removeWhitespaceBetweenTags = true;
protected array $ignore... | true |
ade052f1ad949b899bd5bca1ab5d522d82479a48 | PHP | ibrows/IbrowsSimpleSeoBundle | /Routing/RouteLoader.php | UTF-8 | 5,217 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ibrows\SimpleSeoBundle\Routing;
use Ibrows\SimpleSeoBundle\Model\ContentManagerInterface;
use Symfony\Component\Routing\RouteCollection as SymfonyRouteCollection;
use Symfony\Component\Routing\Route;
use Symfony\Component\Config\Loader\FileLoader;
class RouteLoader extends FileLoader
{
/**
*... | true |
f1d3003c842695e80358bde55acae2dcbf069d91 | PHP | 1701604/php-web-application | /StarWriter.php | UTF-8 | 417 | 3.375 | 3 | [] | no_license | <?php
namespace StarPlayers;
required_once "Star.php";
class StarWriter //Single Responsibility Principle (SRP)
{
//Attributes
private $_star;
//Constructor
public function __construct(Star $star)
{
this->_star = $star;
}
//Methods for Properties
//Methods
public f... | true |
31832b42edc8fa67d00391077e7416063a6683d2 | PHP | Geekimo/php-rql | /rdb/Queries/Control/Js.php | UTF-8 | 744 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace r\Queries\Control;
use r\ValuedQuery\ValuedQuery;
use r\ProtocolBuffer\TermTermType;
use r\Datum\NumberDatum;
use r\Datum\StringDatum;
use r\FunctionQuery\FunctionQuery;
class Js extends FunctionQuery
{
public function __construct($code, $timeout = null)
{
if (isset($timeout)) {
... | true |
05b158d58c703b062dc3489cf415de9d585efc3d | PHP | Mlk95/laminasDemoManuelLink | /module/Userdata/src/Controller/UserdataController.php | UTF-8 | 2,426 | 2.796875 | 3 | [] | no_license | <?php
namespace Userdata\Controller;
use Laminas\Mvc\Controller\AbstractActionController;
use Laminas\View\Model\ViewModel;
use Userdata\Model\UserTable;
use Userdata\Service\DownloadUserDataService;
class UserdataController extends AbstractActionController
{
/** @var UserTable */
private $table;
/... | true |
dd9ec8ac172359c1a72e5bc8ec816d0b7e36326e | PHP | iteaoffice/general | /src/ValueObject/Recipient.php | UTF-8 | 1,244 | 2.765625 | 3 | [] | no_license | <?php
/**
* ITEA Office all rights reserved
*
* @author Johan van der Heide <johan.van.der.heide@itea3.org>
* @copyright Copyright (c) 2021 ITEA Office (https://itea3.org)
* @license https://itea3.org/license.txt proprietary
*/
/**
*
*/
declare(strict_types=1);
namespace General\ValueObject;
use... | true |
7612b96435af07b3104afb3f4c2b7f9c0a683873 | PHP | kjabko/Introduction_To_Web_Programming | /Gareth/task/view-task.php | UTF-8 | 2,958 | 2.875 | 3 | [] | no_license | <?php
/**
* Author: Gareth Moran
* Assignment: WE3.1 PHP Web App Assignment, Digital Skills Academy
* Date: 2014/02/12
*/
// Require the helpers library
require_once __DIR__ . '/../php/helpers.php';
// Get the task id from the task-id query string
if ( get('task-id') ) {
// task-id query string
... | true |
a944dece8aaa9ba14eab255b9814a5354346ddf5 | PHP | cesg/JsonException | /src/Transformer/AuthenticationExceptionTransformer.php | UTF-8 | 552 | 2.53125 | 3 | [] | no_license | <?php
namespace Cesg\JsonException\Transformer;
use Cesg\JsonException\JsonExceptionAbstract;
use Illuminate\Auth\AuthenticationException;
class AuthenticationExceptionTransformer extends JsonExceptionAbstract
{
/**
* AuthenticationExceptionTransformer constructor.
* @param AuthenticationException $e... | true |
001103abe3c12db57f40d8a5e86f2dd894bbaf45 | PHP | TalehFarzaliyev/php-course | /day8/functions.php | UTF-8 | 1,041 | 3.234375 | 3 | [] | no_license | <?php
function login($username,$password,$user_datas)
{
if(empty($username) && empty($password)){
$msg = "Melumat daxil edin";
}
if(empty($username)){
$msg = "Username daxil edin";
}
if(empty($password)){
$msg = "Shifre daxil edin";
}
if(empty($msg))
{
foreach ($user_datas as $key => $value)... | true |
940830c2eea43cd56f93f8e9bf7ad2a6cc63d8ee | PHP | rgodawa/apjubiler | /content/flickr.php | UTF-8 | 2,464 | 2.59375 | 3 | [] | no_license | <?php
class flickr {
private function column_Sort($unsorted, $column) {
$sorted = $unsorted;
for ($i=0; $i < sizeof($sorted)-1; $i++) {
for ($j=0; $j<sizeof($sorted)-1-$i; $j++)
if ($sorted[$j][$column] > $sorted[$j+1][$column]) {
$tmp = $sorted[$j];
$sorte... | true |
7544321e0234df02765e4b00b50bb7e9760ed13e | PHP | hylinux/ltebbs | /function/utf8_substr.fun.php | UTF-8 | 787 | 2.71875 | 3 | [] | no_license | <?php
// vim: set expandtab tabstop=3 softtabstop=3 shiftwidth=3 foldcolumn=1 foldmethod=marker:
/**
* 截断UTF8编码字符串
*
* PHP Version 4, 5
*
* @package: functions
* @author: Mike.G <¿¿> <hylinux@gmail.com>
* @license: http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @copyright:
* @ve... | true |
c8079d6549435c8d744df5144601d66929962893 | PHP | Mireiawen/sloppey-calendar | /includes/TeamupReader.php | UTF-8 | 948 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Mireiawen\Sloppey\Calendar;
/**
* Class to read the Teamup events from the API into events
*
* @package Mireiawen\Sloppey\Calendar
*/
class TeamupReader extends AbstractReader
{
/**
* The Teamup client
*
* @var Teamup
*/
protected $client;
... | true |
4b7a1ef55e5f82eb8baa2595f379fbc7a6b5640c | PHP | bobagold/translator-utils | /class/Translator/Application.php | UTF-8 | 944 | 2.703125 | 3 | [] | no_license | <?php
namespace Translator;
class Application {
const TRANSLATE_ON = 'on';
const TRANSLATE_OFF = 'off';
private $hostname;
private $translationMode;
/**
* @var CouchDbStorage
*/
private $driver;
public function __construct($hostname, $driver, $translationMode = self::TRANSLATE_... | true |
8c7f26949614dabdf3766592a1817e2d4a071b5d | PHP | marcel-maqsood/bewerbung | /src/api/src/Model/AbstractService.php | UTF-8 | 688 | 3 | 3 | [] | no_license | <?php
namespace api\Model;
use Depa\Core\Singleton;
abstract class AbstractService extends Singleton
{
private static $instance;
protected static $databaseConnection;
protected function __construct($databaseConnection)
{
self::setDatabaseConnection($databaseConnection);
}
/**
... | true |
6f1a9e396bd48596a6001baa21fdb280d61739a3 | PHP | djwood95/Blog | /api/routes/web.php | UTF-8 | 3,930 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond t... | true |
afd22ffa3c3b8047252084841ad2c01f67e87aec | PHP | thomas3687/contao-article_bg | /modules/ModuleArticle.php | UTF-8 | 3,845 | 2.640625 | 3 | [] | no_license | <?php
/**
* Contao Open Source CMS
*
* Copyright (C) 2005-2012 Leo Feyer
*
* @package Core
* @link http://contao.org
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
*/
/**
* Run in a custom namespace, so the class can be replaced
*/
namespace AurealisBG;
/**
* Class ModuleArticle
*
* Pr... | true |
9513e878ce5530a426753d1dcd41048c1783163f | PHP | nestergit/Php | /vjezba4.php | UTF-8 | 580 | 2.875 | 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.
*/
if(isset($_POST['submit']))
{
echo "Postoji skripta";
}
$broj_jezika= array("Petar"=>1,"Ivona"=>6,"Maja"=>7);... | true |
dc06161b280fa3485b987963879508947f693240 | PHP | HH8023/PHP | /myphpstroage/721/demo6.php | UTF-8 | 1,199 | 3.453125 | 3 | [] | no_license | <?php
/*
命名空间的访问
1、非限定名称
2、限定名称
3、完全限定名称
*/
namespace A\B;
/*
引入demo5文件
*/
require 'demo5.php';
const PI = 3.1415926;
function say()
{
echo '这是A\B下的say方法<br>';
}
class Test
{
public static function t()
{
echo '这是A\B下的test类中的t方法';
}
}
//非限定名称,没有路径
echo PI;//3.1415926,A\B下面的
echo '<br>';
say();
echo '<br>';
... | true |
048f525c774a775117e7a4ef4ef181c10091f211 | PHP | Kovo/PzPHP | /PzPHP/Helper/Misc.php | UTF-8 | 336 | 2.546875 | 3 | [] | no_license | <?php
class PzPHP_Helper_Misc
{
public static function regenerateMtRandSeed()
{
list($usec, $sec) = explode(' ', microtime());
$seed = (float) $sec + ((float) $usec * mt_rand(mt_rand(1,1000000000),mt_rand(1000000001,2000000000)));
mt_srand(
(int)$seed+mt_rand(mt_rand(1,1000000000),mt_rand(1000000001,2000000... | true |
3c0f4400dd431234291939084da781416bfee824 | PHP | goueguy/drink-app | /app/Http/Controllers/Admin/CategoryDrinkController.php | UTF-8 | 3,406 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\CategoryDrink;
use Illuminate\Http\Request;
class CategoryDrinkController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function ... | true |
46c103b4a414b73a7f99987324edad8c0008db6d | PHP | oliviawelsch/Project1 | /Part4/model/questions.php | UTF-8 | 1,053 | 3.109375 | 3 | [] | no_license | <?php
class Questions {
private $ownerid;
private $id;
private $title;
private $body;
private $skills;
public function _construct($title, $body, $skills, $ownerid){
$this->title = $title;
$this->body = $body;
$this->skills = $skills;
$this->ownerid = $ownerid;
... | true |
d84a70af192c3b35fd8d2f93512e48747053e80c | PHP | wislanlamounier/prophet_sistema | /controlador/ControleMain.class.php | UTF-8 | 17,682 | 2.765625 | 3 | [] | no_license | <?php
/**
* Classe que realiza o intermédio entre
* banco de dados (Modelo.class.php) e
* visualizações (Visualizador.class.php)
* do main
*
* @author Rafael de Paula - <rafael@bentonet.com.br>
* @version 1.0.0 - 2015-08-07
*
* */
class ControleMain extends Controla... | true |
a409ea77a650a21830dbcebebd8aee31e806ad63 | PHP | bt-gallery/server | /app.php | UTF-8 | 28,796 | 2.53125 | 3 | [] | no_license | <?php
/**
* Registration REST microservice
*
* @category REST-microservice
* @package ContestServer
* @author barantaran <yourchev@gmail.com>
* @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
* @link https://github.com/barantaran/contest-server
*/
use Phalcon\Filter;
use Phalco... | true |
09ed5a23bd813ece4347eb1ebd887525e4b4401f | PHP | kevinlueke/retirement_home | /project/includes/register-inc.php | UTF-8 | 3,710 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
if (isset($_POST['submit'])) {
//Add database connection
require '../database/db.php';
$email = $_POST['email'];
$password = $_POST['password'];
$confirmPass = $_POST['confirmPassword'];
$role_id = $_POST['role'];
$first_name = $_POST['fName'];
$last_name = $_PO... | true |
4144a6d9c0680f2439dcbd8c50014be3cbd8ac98 | PHP | PapooSoftware/PapooCMS | /lib/classes/class_informations.php | UTF-8 | 2,816 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
// ***************************************************************************
// *
// * INFORMATIONS
// * ===============
// * Bindet die folgenden Klassen zur Ausgabe von Server-Informationen ein
// *
// * class array2xml_class:
// * wandelt ein Mehrdimensionales Array in einen XML-Baum um.
// *
// *... | true |
c4816f1a32995658f8ca1908c4855a24bccb7b0d | PHP | ananna-jhorotek/ekattor_tvc | /app/Program.php | UTF-8 | 1,223 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Program extends Model
{
protected $fillable = [
'name',
'type',
'start_time',
'end_time',
'time_id',
'start_date',
'end_date',
'days',
'br_dur_before',
'br_dur_mid1',
'br_dur_mid2',
'br_dur... | true |
38f66c225d813e5a9812f509c958aa9e262a941e | PHP | kapxapot/plasticode-warcry | /src/Services/ForumService.php | UTF-8 | 798 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Collections\ForumCollection;
use App\Models\Forum;
use App\Models\Game;
use App\Repositories\Interfaces\GameRepositoryInterface;
class ForumService
{
private GameRepositoryInterface $gameRepository;
public function __construct(
GameRepositoryInterface $gameRepos... | true |
cb6ad00c7522496c1c2ab066094c44c7a12a54ec | PHP | wangguangzhao/php | /picture/demo.php | UTF-8 | 589 | 2.65625 | 3 | [] | no_license | <?php
function waterMarkText($data) {
$Public = "./";
$srcPath = './mark.jpg';
$name = '1.jpg';
include "./Picture.class.php" ;
$pic = new Picture ( $srcPath, $name ,$Public);
$pic->FONT_WORD = $data['text'];
$pic->FONT_SIZE = $data['fontsize'] ;
$pic->ANGLE = $data['angle'] ;
$pic->ALPHA = ... | true |
a533f9591ae5478359a715778091413907d59fd4 | PHP | Ali478/PHP_INVOICE_GENERATOR | /config/config.php | UTF-8 | 637 | 2.890625 | 3 | [] | no_license | <?php
class conn
{
public function connection($some)
{
$servername = "localhost";
$username = "root1";
$password = "rootroot_1";
$dbname = "Invoice_app";
try {
$conn = new PDO("mysql:host=$servername; dbname=$dbname", $username, $password);
$conn-... | true |
1d2f133f48754cd5621ace804cfdaf97b53894d5 | PHP | Vendic/magento2-mysql-queue-sample-module | /Model/Queue/Consumer.php | UTF-8 | 475 | 2.546875 | 3 | [] | no_license | <?php declare(strict_types=1);
/**
* @author tjitse (Vendic)
* Created on 2019-10-21 11:05
*/
namespace Vendic\MysqlMqExample\Model\Queue;
use Psr\Log\LoggerInterface;
class Consumer
{
/**
* @var LoggerInterface
*/
protected $logger;
public function __construct(LoggerInterface $logger)
... | true |
15666aa1557df00aa0649ce80876df0f6ff8359a | PHP | lonixoon/asrtro7 | /models/Entity/Profile.php | UTF-8 | 630 | 2.578125 | 3 | [] | permissive | <?php
namespace app\models\Entity;
use phpDocumentor\Reflection\Types\Self_;
use Yii;
use yii\db\ActiveRecord;
/**
* Class Profile
* @package app\models\Entity
* @property int $id
* @property int $user_id
* @property string $first_name
* @property string $last_name
* @property boolean $sex
* @property string... | true |
6ce65d516784b5798c441a0cb99d02231a612703 | PHP | cliffparnitzky/BackendMemberGroupsDisplayer | /system/modules/zBackendMemberGroupsDisplayer/BackendMemberGroupsDisplayer.php | UTF-8 | 2,102 | 2.515625 | 3 | [] | no_license | <?php if (!defined('TL_ROOT')) die('You cannot access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2014 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*... | true |
13534afba8351995fb847c9bd3a347f966c09e7e | PHP | kwakmozi/termproject | /order.php | UTF-8 | 1,668 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="ko-KR">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<title>주문</title>
</head>
<body>
<?php
include 'header.php';
session_start();
$product_id = $_GET['product_id'];
$query1 = "select * from product where product_id = $product_i... | true |
2fe2ef62ec2d07085477a68770d4678193ea1422 | PHP | Sakrefyohan/mc2ventaire | /section/form-model.php | UTF-8 | 471 | 2.75 | 3 | [] | no_license | <label for="modele">Modele : </label>
<select name="modele" id="modele">
<?php
include('traitement/connexion_bdd.php');
$req = $bdd->prepare('SELECT * FROM modele ORDER BY id ASC');
$req->execute();
while($resultat = $req->fetch())
{ ?>
<option va... | true |
6d549c5dc34360fa5babfdefaa95a0beec8f25a3 | PHP | kreciszd/club | /src/Club/GameBundle/EventListener/SeasonEvent.php | UTF-8 | 1,319 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: dawid
* Date: 09.05.16
* Time: 13:38
*/
namespace Club\GameBundle\EventListener;
use Club\GameBundle\Entity\Player;
use Club\GameBundle\Entity\PlayerStats;
use Club\GameBundle\Entity\Season;
use Club\GameBundle\Entity\TeamStats;
use Doctrine\ORM\Event\LifecycleEventArgs;... | true |
fe91ee8f558b4ee5728da6903d06b0be5a004160 | PHP | funroot-khan-wang/ViVIDC | /application/admin/validate/System.php | UTF-8 | 1,319 | 2.53125 | 3 | [
"Apache-2.0",
"PHP-3.0"
] | permissive | <?php
/**
* 系统管理验证器
* by:小航 QQ:11467102
*/
namespace app\admin\validate;
use think\Validate;
class System extends Validate
{
//规则
protected $rule = [
'email' => 'email',
'qq' => 'min:5|max:11|number',
'usergroup' => 'min:6|max:9|number',
'max_loger... | true |
f152e1f146dcd0171ab2afd7c4d72267aad77e54 | PHP | cesine/OpenBankWebApp | /html/includes/model/ClientAccount.Class.php | UTF-8 | 8,123 | 2.671875 | 3 | [] | no_license | <?php
class ClientAccount
{
private $clientAccountId;
private $branchId;
private $clientId;
public $currentBalance;
public $availableBalance;
private $status;
private $openingDate;
private $closingDate;
private $autoIncAccID;
private $accountTypeId;
public $accountTypeName;
private $ac... | true |
2ad0c081f7db9cfe5a83ee45c68572464225953f | PHP | vigetlabs/craft-videoembed | /src/helpers/ParsingHelper.php | UTF-8 | 2,320 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace viget\videoembed\helpers;
use viget\videoembed\enums\VideoType;
use viget\videoembed\models\VideoData;
class ParsingHelper
{
const YOUTUBE_URLS = ['youtube.com', 'youtu.be'];
const VIMEO_URLS = ['vimeo.com'];
public static function getVideoDataFromUrl(string $url): ?VideoData
{
... | true |
3a719efc65cabbae237cc521659477bcf5e6e70e | PHP | techdivision/import-product-msi | /src/Subjects/AbstractMsiSubject.php | UTF-8 | 7,155 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* TechDivision\Import\Product\Msi\Subjects\AbstractMsiSubject
*
* PHP version 7
*
* @author Tim Wagner <t.wagner@techdivision.com>
* @copyright 2018 TechDivision GmbH <info@techdivision.com>
* @license https://opensource.org/licenses/MIT
* @link https://github.com/techdivision/import-produc... | true |
91cb76288619b6182f27b167d1faa1afe360a1b0 | PHP | Nasteee/Tuto-Grafikart | /src/Business/Property/PropertyCreationHandler.php | UTF-8 | 1,339 | 2.75 | 3 | [] | no_license | <?php
namespace App\Business\Property;
use App\Business\Exceptions\BusinessException;
use App\Entity\Property;
use App\Repository\PropertyRepository;
use Symfony\Component\Validator\Validator\ValidatorInterface;
class PropertyCreationHandler
{
/**
* @var PropertyRepository
*/
private $repository;
... | true |
645c14f596d8bb7f6845eba59aa6b91dae3a3131 | PHP | onyia314/school | /database/seeds/SchoolClassesTableSeeder.php | UTF-8 | 641 | 2.6875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class SchoolClassesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$class_names = ['ss1' , 'ss2' , 'ss3'];
$class_groups = ['science' , 'art'];
foreach($class_names as ... | true |
70b78f3e483607354d710ecadae4c7bfbd89e080 | PHP | weblee/using-doctrine | /src/ArtisanCommands/AddMemberPostCommand.php | UTF-8 | 1,087 | 2.6875 | 3 | [] | no_license | <?php namespace Example\ArtisanCommands;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
final class AddMemberPostCommand extends ArtisanCommand
{
protected $name = 'app:add-member-post';
protected $description = 'Add a member post';
public function fir... | true |
25d3994e493427a54284ef36773ef207c8fc3e3d | PHP | taj9ahmed/simple_messenger | /src/testuser.php | UTF-8 | 2,685 | 2.96875 | 3 | [] | no_license | <?php
// This page checks if the password matches the login and sends the user either to the member area
// or back to the login page.
session_start();
// Calls connection params
require_once 'db_param.php';
require_once './class php/user_class.php';
// Retrieves CONST
$email = $_POST['email'];
$_SES... | true |
d9123b6edf2a2f0de1ec01fd29be116c16a80ddb | PHP | SergM2014/shopmvc9 | /app/Http/Controllers/CatalogController.php | UTF-8 | 2,013 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Http\Controllers;
use App\Product;
use Illuminate\View\View;
use App\Repositories\ProductRepo;
class CatalogController extends Controller
{
private function findOutOrder(?string $order): array
{
switch ($order){
case 'AZ':
$fie... | true |
4273160315f31503f0a5916703214be3d2ac5dec | PHP | mikegsmith76/equation-parser | /src/Printer/Prefix.php | UTF-8 | 511 | 3.203125 | 3 | [] | no_license | <?php
namespace Equation\Printer;
use Equation\Tree\Node;
class Prefix extends Printer
{
public function print(Node $equation) : string
{
if (!$this->isOperatorNode($equation)) {
return (string) $equation->value();
}
$leftOperand = $this->print($equation->getLeftOperand()... | true |
da0ba50a4461ce338537e1c8fd7817260fde02cf | PHP | glodov/easy-ai | /src/EasyAI/StackItem.php | UTF-8 | 1,101 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace EasyAI;
use Gilbitron\Util\SimpleCache;
class StackItem
{
const WAIT = 0;
const DONE = 1;
public $url;
public $hash;
public $title;
public $state;
public function __construct($url = null)
{
if (null !== $url) {
$this->url = rtrim($url, '/');
$this->hash = substr(md5($url), 0, 10)... | true |
77f1a504575c0fa81dd201b8616da5b5de997a16 | PHP | tfermm/FAD | /includes/calendar.php | UTF-8 | 3,414 | 2.703125 | 3 | [] | no_license | <?php
class calendar extends tdc_object{
public $Id;
public $User_Id;
public function get($id1){
$cal_object = new calendar;
if (TDC::db('t2')->GetOne("SELECT Id FROM Calendar where Id=?", array ($id1))){
$cal = TDC::db('t2')->GetOne("SELECT User_Id FROM Calendar where Id=?", array ($id1));
$cal_object->I... | true |
c86ae52a770cefd71464411c571c0768e2d0d069 | PHP | projectfifa3/fifa | /app/login/register.php | UTF-8 | 1,344 | 2.625 | 3 | [] | no_license | <?php
require ('../dbconn.php');
$uid = $_POST['username'];
$pwd = $_POST['password'];
$signup = $_POST['signup'];
$uid = htmlspecialchars($uid, ENT_QUOTES);
$pwd = htmlspecialchars($pwd, ENT_QUOTES);
$signup = htmlspecialchars($signup, ENT_QUOTES);
if (empty($uid) || empty($pwd)){
header("location: ... | true |
abfa1af2911ecb73c01f074c306f73a26280834d | PHP | seObando19/ProyectoWebS.3 | /application/controllers/clientes.php | UTF-8 | 3,415 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Clientes extends CI_Controller {
/*
controlador roles
aplicar el crud grocery
para hacerlo es necesario modificar una variabls de los confug.php del CI
esa variables csrf regenerate
*/
function __construct()
{
parent::__construct... | true |
51ef73b98df2da4ceb556f74e0b6efbbb648c621 | PHP | shruti081020/internshipmay2020hybridmobile | /assignment week 1/searchemployee.php | UTF-8 | 472 | 2.671875 | 3 | [] | no_license | <!--start of the program by "Shruti Gupta" -->
<?php
$empid=$_POST['empid'];
$sql="SELECT * FROM employee WHERE empid='$empid'";
$cn=mysqli_connect("localhost","root","","demodb");
$result = mysqli_query($cn,$sql);
$count = mysqli_num_rows($result);
if($count==0){
echo "Sorry! Invalid employee ID, could not find th... | true |
dc853872576b73c1f0f708195a24fa43374e003d | PHP | paveltizek/balikobot-php | /src/Model/Values/Package/PackageData.php | UTF-8 | 1,865 | 2.734375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Inspirum\Balikobot\Model\Values\Package;
use Inspirum\Balikobot\Definitions\Option;
trait PackageData
{
/**
* Set the item at a given offset
*
* @param string $key
* @param mixed $value
*
* @return void
*/
abstract public function offsetSet($key, $value);
... | true |