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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
74797af0ea64608c890b51eb71498d6fb4234743 | PHP | giorgiosironi/eris | /src/Generator/SequenceGenerator.php | UTF-8 | 2,262 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Eris\Generator;
use Eris\Generator;
use Eris\Generators;
use Eris\Random\RandomRange;
function seq(Generator $singleElementGenerator)
{
return Generators::seq($singleElementGenerator);
}
/**
* @psalm-template T
* @template-implements Generator<list<T>>
*/
class SequenceGenerator implements Gen... | true |
a3510849c79c98a114a318d93f2349cd17c471b7 | PHP | wandersonsousa/exercicios-curso-Cod3r-PHP | /classes_objetos/polimorfismo.php | UTF-8 | 672 | 3.390625 | 3 | [] | no_license | <div class="titulo">Polimorfismo</div>
<?php
class Comida {
public $peso;
function __construct($peso){
$this->peso = $peso;
}
}
class Arroz extends Comida {
}
class Feijao extends Comida {
}
class Sorvete extends Comida {
}
class Pessoa {
public $peso;
function __construct($peso){
... | true |
f18d29ceaee0f952d665f7a973871e9d7579a16f | PHP | jrmreis/htdocs | /Polimorfismo1/index.php | UTF-8 | 984 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<!--
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.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
require_... | true |
09944969edd42f33922c935775529fdcb262d3e1 | PHP | NuffZetPand0ra/cards | /src/Card/CardInterface.php | UTF-8 | 257 | 2.796875 | 3 | [] | no_license | <?php
namespace nuffy\cards\Card;
/** @package nuffy\cards\Card */
interface CardInterface
{
/** @return RankInterface */
public function getRank() : RankInterface;
/** @return SuitInterface */
public function getSuit() : SuitInterface;
} | true |
098a0733ce4e72321745e4a5e8528d5b7792f903 | PHP | zacfox/mathedia | /en/differential_equations/separation_of_variables_2.php | UTF-8 | 3,189 | 2.546875 | 3 | [] | no_license | <?php
$title = "Separation of variables 2";
$description = "sample solution of the initial value problem (x²+1) * y' = 2x * y² \"separation of variables\"";
include $_SERVER["DOCUMENT_ROOT"]."en/header.php";
?>
<div class="container">
<div class="row">
<div class="col-sm-2">
<script async src="//pagead2.googlesyndic... | true |
068fb11ad78bb57125207d1a387f70bd1986856e | PHP | MDILLENB/PHPAgile | /test/Resource/Database/StockResourceTest.php | UTF-8 | 1,229 | 2.515625 | 3 | [] | no_license | <?php
namespace Test;
use Resource\Database\StockResource;
use Support\Dependencies;
/**
* Description of ScoringResouceTest
*
* @author Marco
*/
class StockResourceTest extends \PHPUnit\Framework\TestCase{
protected $object;
protected $ci;
/**
* Sets up the fixture, for example, ... | true |
65c9e27ad9e285410d08e1c6608d6ee766a4d521 | PHP | legattes/agendapp | /php/paciente/list.php | UTF-8 | 587 | 2.671875 | 3 | [] | no_license | <?php
/**
* author legates (Lucas)
* email lucas.arantes55@gmail.com
*/
include '../conexao.php';
$query = "SELECT * FROM Paciente";
$conn = (new Conexao())->connect();
$queryResult = mysqli_query($conn, $query);
$result['pacientes'] = [];
while($row = mysqli_fetch_assoc($queryResult)){
$item = [
... | true |
304228062fca31ddf9dfbb87c16a967d3df21970 | PHP | agilesdesign/Element | /src/Element/Textarea.php | UTF-8 | 433 | 2.828125 | 3 | [] | no_license | <?php
namespace Element;
class Textarea extends AbstractElement
{
const tag = 'textarea';
protected $tag = self::tag;
public function __construct($placeholder = null, $rows = null)
{
parent::__construct();
if(isset($placeholder))
{
parent::setAttribute((new Attribute('placeholder'))->append($place... | true |
340aadfbb3f46decada86a9b86c4a884b2c03336 | PHP | ChristopherJamesStewart/MscIndividualProject | /editAcc.php | UTF-8 | 12,789 | 2.6875 | 3 | [] | no_license | <?php
session_start();
include('../conn.php');
if (!isset($_SESSION['40126571_userName'])){
//Throwing the user back to the website index page (not userindex)
header('Location: ../index.html');
}
// Grabbing the dynamic session variables established in the login.php page and saving them to more... | true |
147153823425f7951ef6babd8da34ba84f095ada | PHP | pouthergust/HelloPHP | /aulaPHP/aula06/operadoresDeAtribuicao.php | UTF-8 | 998 | 3.09375 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Curso de PHP - CursoemVideo.com</title>
<link rel="stylesheet" href="../_css/estilo.css">
</head>
<bod... | true |
80481dfd1816dd13b4112c8a647873f212559154 | PHP | Rachel-ney/oBlog | /Backend/app/Controllers/CategoryController.php | UTF-8 | 1,319 | 3.09375 | 3 | [] | no_license | <?php
namespace oBlogApi\Controllers;
use oBlogApi\Models\Post;
use oBlogApi\Models\Category;
class CategoryController extends CoreController
{
// Méthode pour récuperer TOUT les auteurs et les envoyer en json
public function all()
{
// je récupère tout les posts de ma bdd sous forme d'objet
... | true |
8c42e613ef0d8cc24e274fa80abbe62950d31fd0 | PHP | jerico1990/curso_jer_1 | /models/Test.php | UTF-8 | 1,317 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "test".
*
* @property integer $id
* @property integer $persona_id
* @property integer $p1
* @property integer $p2_1
* @property integer $p2_2
* @property integer $p2_3
* @property integer $p3_1
* @property integer $p3_2
* @proper... | true |
9d29946810080c15e8f24f6324003420d3d1563f | PHP | maxiVidarte/GuiaProgramacion3-2017 | /Clase01/Aplicacion03.php | UTF-8 | 704 | 3.671875 | 4 | [] | no_license | <?php
/*Dadas tres variables numericas de tipò entero $a, $b y $c realizar una aplicacion
que muestre contenido de aquella variable que contenga el valor que se encuentre en el medio
de las tres variable. De no existir dicho valor, mostrar un mensaje que indique lo sucedido.
ej1:
$a=6;
$b=9;
$c=8;
se muestra 8;
ej2:... | true |
ba4fa9043604ff1b0f70d9120bdc9f6908924569 | PHP | DescriCS/movies-projet | /index.php | UTF-8 | 904 | 2.734375 | 3 | [] | no_license | <?php
include('inc/pdo.php');
include('inc/functions.php');
$title = 'Page d\'acceuil';
?>
<?php include('inc/header.php'); ?>
<?php
$sql = "SELECT * FROM movies_full ORDER BY RAND() DESC LIMIT 100";
$query = $pdo->prepare($sql);
$query->execute();
$movies_full = $query->fetchAll();
foreach ($movies... | true |
85c4c6fcac9c44b172eb918b95a47d80884c13d5 | PHP | svetlana-s/http-features | /sessions/page1.php | UTF-8 | 229 | 2.8125 | 3 | [] | no_license | <pre>
<?php
session_start();
var_dump($_SESSION); // NULL
// Start the session
// Set session variables
$_SESSION["favcolor"] = "green";
$_SESSION["favanimal"] = "cat";
echo "Session variables are set.\n";
print_r($_SESSION);
| true |
dd85a3def7dc8af990b13033cd78dd50c508226d | PHP | YuraArendar/defender | /app/Http/Requests/Admin/ContentStructureRequest.php | UTF-8 | 864 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Admin;
use App\Admin\Contracts\EntityRequestOperationsContractor;
use Illuminate\Foundation\Http\FormRequest;
/**
* Class ContentStructureRequest
* @package App\Http\Requests\Admin
*/
class ContentStructureRequest extends FormRequest implements EntityRequestOperationsContractor
{... | true |
97b32c0d55a603145258b84df0164637b1dee53f | PHP | all-packages/feature-exercise-prasannaavvaru | /app/Calculations/ItemPriceCalculationInterface.php | UTF-8 | 503 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Calculations;
Interface ItemPriceCalculationInterface{
public function getItemTotalPrice( string $itemName, int $itemQty, array $request );
public function ItemTotalAmount( int $itemQty );
public function ItemTotalSpecialAmount( int $itemQty, string $itemName, array $request, string $e... | true |
97523020c0f18f0b9e2ace911f2870da5a12d86d | PHP | jskarpe/CodeExample | /tests/CodeExample/ModelGenerator/CityGeneratorTest.php | UTF-8 | 780 | 2.796875 | 3 | [] | no_license | <?php
namespace CodeExample\ModelGenerator;
class CityGeneratorTest extends \PHPUnit_Framework_TestCase
{
private $cityFixturesFile = 'fixtures/NorwegianCities.json';
public function testGenereateCityStateReturnsTwoChars()
{
$citiesArray = $this->getCitiesFromFixtures();
$cityGenerat... | true |
1eae12df460e70e144ff2f469eae02362f9c36c4 | PHP | karely-olla/cotizador | /config/conexion.php | UTF-8 | 1,225 | 2.734375 | 3 | [] | no_license | <?php
try {
$con = new PDO('mysql:host=localhost; dbname=rincon_cotizador; charset=utf8', 'rincon_admin_cot', 'Eduardo22/');
// $con = new PDO('mysql:host=localhost; dbname=db_cotizador_rm; charset=utf8', 'root', '');
} catch (PDOException $e) {
echo "ERROR ". $e->getMessage();
die();
}
if (!function_exists('ejecu... | true |
41dc56d59adcc5fefa4b7b987570a1514a0ab280 | PHP | skeeks-cms/cms-backend | /src/ViewBackendAction.php | UTF-8 | 1,965 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @author Semenov Alexander <semenov@skeeks.com>
* @link https://skeeks.com/
* @copyright (c) 2010 SkeekS
* @date 16.03.2017
*/
namespace skeeks\cms\backend;
use skeeks\cms\backend\events\ViewRenderEvent;
use skeeks\cms\modules\admin\widgets\ControllerActions;
use yii\base\Event;
use yii\web\Controller... | true |
dbd888c3a3eae4d22db10733061e31feefc2cc38 | PHP | gamernetwork/yolk-contracts | /support/Error.php | UTF-8 | 1,820 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Yolk - Gamer Network's PHP Framework.
*
* Copyright (c) 2015 Gamer Network Ltd.
*
* Distributed under the MIT License, a copy of which is available in the
* LICENSE file that was bundled with this package, or online at:
* https://github.com/gamernetwork/yolk-contracts
*/
namesp... | true |
e992e17248902d71130b843dc936489487a7dcf3 | PHP | mellmers/api.project-x | /src/gameAccount/GameAccountService.php | UTF-8 | 3,238 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace projectx\api\gameAccount;
use projectx\api\entity\GameAccount;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
/**
* Class GameAccountService
* @package projectx\api\gameAccount
*/
class GameAccountService
{
/** @var GameAccountRepository */
... | true |
5ad49f08e63ec944036efced1dac09a6284b7e34 | PHP | hashmil/birthdaycake-v1 | /index.php | UTF-8 | 2,017 | 2.9375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/boilerplate.css">
<link rel="stylesheet" href="css/style.css">
<meta charset="utf-8">
<meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0">
</head>
<body>
<?php
include 'header.php';
$quer... | true |
70bf6611b0b0f324b10ed95bce907e89960d03b7 | PHP | kumarremoa/ZS | /signin/test3/admin227/tags_super/index.php | UTF-8 | 2,810 | 2.65625 | 3 | [] | no_license | <?php require_once("../session.php"); ?>
<?php require_once("../../dbconnect.php"); ?>
<?php require_once("../../classes/tag_super.php"); ?>
<!doctype html>
<html lang="en">
<head>
<?php require_once("../head.php"); ?>
</head>
<body>
<?php require_once("../navbar.php"); ?>
<?php
$tag_super = new tag_super();
... | true |
2c8a33c1190f79584b3159e0e3f52babe7b9706c | PHP | muatik/kelimeci | /models/crawlers/dictionaryCrawler.php | UTF-8 | 901 | 3 | 3 | [] | no_license | <?php
namespace crawlers;
abstract class dictionaryCrawler{
/**
* veri çekilecek sayfanın url'si
*
* */
public $crwlUrl;
/**
* veri çekilecek sayfada eğer banlanma durumu söz konusu ise
* bekletme yapılarak data çekilebilir.
* */
public $interval=0;
/**
* çekilen html verisini tutar
* */
pu... | true |
d2bfff9a66e26efdc67f3d36c889af39bfda899e | PHP | miguelmaia33/GOMA | /www/page3.php | UTF-8 | 1,809 | 2.625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="GOMA challenge">
<title> GOMA </title>
</head>
<body>
<header>
<?php include "header.html" ?>
</header>
<main>
<br>
<h4><sup><a href="func.php"style="margin-left: 150px"><u>INSERIR NOVO</u></a></s... | true |
a41215f2e89b1c41de0b575e12170198fd174dff | PHP | cleoGson/RMS-version2 | /database/seeds/SectionTableSeeder.php | UTF-8 | 522 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Model\Section;
class SectionTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data=[
['name'=>'section 1',
'display_name'=>'section 1'],
['name... | true |
1f50c4f203e821ce01a82e5410740179ebefdd84 | PHP | josephjlee/mvc-web-components | /singleton.php | UTF-8 | 1,161 | 3.328125 | 3 | [] | no_license | <?php
/**
* Contains the abstract Singleton class.
*
* @package utilities
* @author Chris Connelly
*/
namespace MVCWebComponents;
/**
* Abstract Singleton class to provide zero-configuration singleton functionality.
*
* @version 1.0
*/
abstract class Singleton {
/**
* Contains an arr... | true |
7b625938f8db00a1884a64fe6dd9ace99faf514a | PHP | inakiabt/barakus | /src/Libs/Smarty/plugins/compiler.repeat.php | UTF-8 | 4,431 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/*
* BUG: por ejemplo con tablas, si hay que llenar columnas no se puede cerrar la fila
*/
$this->register_compiler_function('/repeat', 'smarty_compiler_endrepeat');
$this->register_compiler_function('elserepeat', 'smarty_compiler_elserepeat');
$this->register_compiler_function('repeat_inic', 'smarty_co... | true |
f864330af559534e0e681f0acc42ad7c717664d0 | PHP | PheRum/flor2u | /app/Order.php | UTF-8 | 2,792 | 2.578125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* App\Order
*
* @property-read \App\Partner $partner
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Product[] $products
* @mixin \Eloquent
* @property int $id
* @property int $status
* @property string $client_email
* @property... | true |
fd15c2ac2b8f52d6c2a6c413cf29bf2d0178782b | PHP | nourchene-benslimane/rth_backup | /rth/api/requirement_api.php | UTF-8 | 94,265 | 2.609375 | 3 | [] | no_license | <?php
# ---------------------------------------------------------------------
# rth is a requirement, test, and bugtracking system
# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----... | true |
933ec9e171f2a22da64057cb9c164cb2929ff3f2 | PHP | Nvgdsk/PHP-test-task | /cal.php | UTF-8 | 1,217 | 3.515625 | 4 | [] | no_license | <?php
class Calc
{
private $result = 0;
// private function setResult($val){
// $this->result=$val;
// }
public function getResult()
{
return $this->result;
}
public function add($var = 0)
{
$var = $this->checkVal($var);
$this->result += $var;
retu... | true |
66c433838e5d9d0e8592b88e6fb2ca20a1390ce5 | PHP | Manojamna/Vgcpl | /application/migrations/002_Add_User_Column.php | UTF-8 | 937 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_Add_User_Column extends CI_Migration {
public function up()
{
$fields = array(
'gender' => array(
'type' => 'VARCHAR',
'constraint' => 10,
'aft... | true |
46ae2050020cf5ef88e777c10d5d110ab2cce311 | PHP | isiddhartha/eps | /lib/header.php | UTF-8 | 1,938 | 2.796875 | 3 | [] | no_license | <?php
/* Header.php--called by all project pages.Links the header of the page. Structures the header based on session data and conitional data.*/
class header
{
protected $curFile;
public function __construct()
{
//check authentication
//call functions to set header
//hand over control to ca... | true |
3b7e2ee46e515dca967c53d5e8dd96304da8d4f9 | PHP | divayoungky1/tugasbesar | /application/views/login/ajax/showproduct.php | UTF-8 | 1,208 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tampil Data</title>
<link href="bootstrap.min.css" rel="stylesheet">
</head>
<body>
<?php
$con = new my... | true |
a32ba1a5e9ebb2073215bbc5d38441736643ea04 | PHP | gabrielfs7/object-calisthenics-workshop | /src/Rule7/GoodExample/Customer.php | UTF-8 | 504 | 3.109375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Gsoares\ObjectCalisthenics\Rule7\GoodExample;
class Customer
{
/** @var int */
private $internalId;
/** @var Name */
private $name;
public function __construct(int $internalId, Name $name)
{
$this->internalId = $internalId;
$this->nam... | true |
48353181fd4e117d4655859123e58ff4326021fb | PHP | afaizulh/CountTax | /App/Calculate/SecondRuleCalculator.php | UTF-8 | 362 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Calculate;
//file: SecondRuleCalculator.php
class SecondRuleCalculator extends AbstractCalculator
{
public function maxPkp(): float
{
return 250000000;
}
public function minPkp(): float
{
return 50000000;
}
public function taxPercentage(): float
{
... | true |
5e0487527c94fc2ff9a1dddf10f225f5a04a932a | PHP | T-Luca/E-Learning-Platform | /_ide_helper_models.php | UTF-8 | 10,675 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
// @formatter:off
/**
* A helper file for your Eloquent Models
* Copy the phpDocs from this file to the correct Model,
* And remove them from this file, to prevent double declarations.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
namespace App{
/**
* App\Authorization
*
* @method static where(... | true |
4a907ac0a4cfe8245b02385a000c645966ccec0a | PHP | anoblet/php-framework | /SYSTEM/Core/Data.php | UTF-8 | 1,886 | 2.765625 | 3 | [] | no_license | <?PHP
Namespace SYSTEM\Core
{
Class Data Extends \SYSTEM\Core
{
Public Function __Construct($Parameters = NULL)
{
If(IsSet($Parameters))
{
ForEach($Parameters as $Parameter => $Value)
{
$this->Set_Property($Parameter,$Value);
}
}
$this->Attributes = $this->Retrieve... | true |
ba7fdc9b0efd4b8ed1cb3b84df31a806ed281107 | PHP | j0k3r/graby | /src/SiteConfig/SiteConfig.php | UTF-8 | 8,688 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Graby\SiteConfig;
/**
* Site Config.
*
* Each instance of this class should hold extraction patterns and other directives
* for a website. See ContentExtractor class to see how it's used.
*
* @author Keyvan Minoukadeh
* @copyright 2013 Keyvan Minoukadeh
* @license htt... | true |
b85448143b4d9bb605a182bef012c219bdd7d3e5 | PHP | bfasc/buggy | /employees.php | UTF-8 | 2,952 | 2.5625 | 3 | [] | no_license | <?php
require_once 'assets/functions.php';
require_once 'php-files/employees.php';
printHead("Manage Employees | Buggy - Let's Code Together");
?>
<body>
<?php printSidebar(getAccountType($_SESSION['userID']), "employees"); ?>
<div class="main">
<?php printHeader($_SESSION['userID']);
?>
... | true |
2fd71b09f3bcfbff2a0b2f2001914d76ce8e98f0 | PHP | leshashrub/be-web | /site.local/login.php | UTF-8 | 2,941 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
session_start();
//echo ('SESSION START' . "<br/>");
?>
<?php require_once("connection.php"); ?>
<?php include("header.php"); ?>
<?php
if(isset($_SESSION["session_username"])){
// вывод "Session is set"; // в целях проверки
header("Location: intropage.php");
//echo('сработал иф на ус... | true |
94417b59d8189c4f22510cb9a517ce7bab142c0c | PHP | pratishshr/leapfrog | /Day5/hw5/models/course.class.php | UTF-8 | 959 | 3.171875 | 3 | [] | no_license | <?php
class Course{
private $id;
private $course_name;
private $course_duration;
private $teacher;
public function __contruct(){
}
public function initiate($id,$course_name,$course_duration,$teacher){
$this->id = $id;
$this->course_name = $course_name;
$this->course_duration = $course_duratio... | true |
bfc2692e6007b56bd34e0019556cfc837ee43786 | PHP | hajime-matsumoto/seaf | /lib/Base/test/Proxy/RequestTest.php | UTF-8 | 1,300 | 2.8125 | 3 | [] | no_license | <?php // vim: set ft=php ts=4 sts=4 sw=4 et:
namespace Seaf\Base\Proxy;
class TestHandler implements ProxyHandlerIF
{
public function __proxyRequestGet(ProxyRequestIF $request, $name)
{
// Getされたらモジュール名をセット
$next_request = clone $request;
$next_request->addParam('module', $name);
... | true |
7cf1b4ce2f64bc44cb70d49d6af33ce4ab1da3d1 | PHP | AllanK96/School-Assignments | /Databases/Assignment3/updateGame.php | UTF-8 | 1,053 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Assignment 3 NHL</title>
</head>
<body>
<?php
include 'connectdb.php';
?>
<?php
$updateID = $_POST["gameID"];
$query1 = 'SELECT game_ID FROM Games WHERE game_ID = \''.$updateID.'\'';
$result = pg_query($query1);
if (!$result) {
die("error on select ID query... | true |
05dd645182b1fba63de3e2ec8e8b0c1146f3bae7 | PHP | mrkeng/radium | /app/controllers/ErrorController.php | UTF-8 | 1,046 | 2.578125 | 3 | [] | no_license | <?php
/**
* radium: the most RAD PHP Framework
*
* @copyright Copyright 2012, Playwell Inc.
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/
namespace app\controllers;
use \radium\errors\NotFoundError;
use \radium\errors\UserError;
class ErrorController extends \radium\action\Contr... | true |
4a8436a39edb88e2d410be3dd4c1bf5e11e49192 | PHP | jordidewaard/Pokemon | /Weakness.php | UTF-8 | 212 | 3.03125 | 3 | [] | no_license | <?php
class Weakness
{
public $EnergyType;
public $Multiplier;
public function __construct($energyt, $multip)
{
$this->EnergyType = $energyt;
$this->Multiplier = $multip;
}
} | true |
d164b7ef53ba9b9c5009329e34c4aaaf34136659 | PHP | ipunkt/rancherize | /app/Blueprint/Infrastructure/Service/Maker/PhpFpm/MemoryLimit.php | UTF-8 | 308 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace Rancherize\Blueprint\Infrastructure\Service\Maker\PhpFpm;
/**
* Interface MemoryLimit
* @package Rancherize\Blueprint\Infrastructure\Service\Maker\PhpFpm
*/
interface MemoryLimit {
const DEFAULT_MEMORY_LIMIT = 'default';
/**
* @return $this
*/
function setMemoryLimit($limit);
} | true |
c2323cea738a737f119e719ab2530004bdd10e2c | PHP | sudeeptalati/rapportformanufacturers | /chs/protected/models/ContactDetails.php | UTF-8 | 7,311 | 2.71875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "contact_details".
*
* The followings are the available columns in table 'contact_details':
* @property integer $id
* @property string $address_line_1
* @property string $address_line_2
* @property string $address_line_3
* @property string $town
* @property string... | true |
0f0590a2c9ccf4982c48dad7701beac1e0b4d8aa | PHP | aiolos/streber | /src/Controller/AthleteController.php | UTF-8 | 1,227 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controller;
use Symfony\Component\Routing\Annotation\Route;
class AthleteController extends AbstractController
{
/**
* @Route("/athlete/{athleteId}")
*/
public function athlete($athleteId = null)
{
if ($this->getUser()->getStravaToken() === ''
|| $this->g... | true |
74332f0f1d9db89c7cb42ece94d0457b073fde18 | PHP | ilgityildirim/address-book | /src/AppBundle/Controller/City/DeleteCityController.php | UTF-8 | 1,550 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace AppBundle\Controller\City;
use AppBundle\Entity\City;
use AppBundle\Exception\RedirectException;
use Doctrine\ORM\EntityManagerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;... | true |
d86b8dc8ca73c605abab4757e38d1abbe54a98c5 | PHP | ddavidov/Framework | /zoolanders/Framework/Model/Item/Element/Date.php | UTF-8 | 7,091 | 2.8125 | 3 | [] | no_license | <?php
/**
* @package ZOOlanders Framework
* @version 4.0.0-beta11
* @author ZOOlanders - http://zoolanders.com
* @license GNU General Public License v2 or later
*/
namespace Zoolanders\Framework\Model\Item\Element;
trait Date
{
abstract public function getContainer();
abstract public fu... | true |
ddc9c0a90f9fe575a8891053ca46556b4ea019d5 | PHP | jayankaghosh/tmvc | /Core/Tmvc/Framework/App/Mode.php | UTF-8 | 941 | 2.515625 | 3 | [] | no_license | <?php
/**
*
* @package tmvc
* @author Codilar Technologies
* @license https://opensource.org/licenses/OSL-3.0 Open Software License v. 3.0 (OSL-3.0)
* @link http://www.codilar.com/
*/
namespace Tmvc\Framework\App;
use Tmvc\Framework\Tools\AppEnv;
use Tmvc\Framework\Tools\ObjectManager;
use ... | true |
7cabab0756890b2b1a85deba29103b42b53addda | PHP | litstack/litstack | /src/Crud/Repositories/BaseFieldRepository.php | UTF-8 | 4,257 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ignite\Crud\Repositories;
use Ignite\Config\ConfigHandler;
use Ignite\Contracts\Crud\Fields\ModifiesMultipleAttributes;
use Ignite\Crud\BaseForm;
use Ignite\Crud\Controllers\CrudBaseController;
use Ignite\Crud\Field;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\Be... | true |
995bd2a4f46819d70319194ed5b9d7fc08b42f2a | PHP | ricardoSosa/proyecto_CES | /Nuevos_cambios/Proceso.php | UTF-8 | 1,381 | 3.359375 | 3 | [
"MIT"
] | permissive | <?php
include_once "Equipo.php";
//Clase que representa un proceso.
class Proceso {
private $id;
private $nombre;
private $descripcion;
private $equipos;
private $duracion_estimada;
/*
*Construct
*/
function __construct( $datos_proceso, $equipos, $duracion_estimada ) {
... | true |
dcf18c9b3722a1ffedcde9b779c1da2e03520aee | PHP | edondelinger/cn_project | /CN_BASE/vues/v_modifFicheClient.php | ISO-8859-1 | 2,459 | 2.90625 | 3 | [] | no_license | <div id="blockInfo">
<h2 align="center">Modifier une fiche client</h2>
<FORM action="#" method="post">
Choisir une fiche client :
<?php
// Dfinition du tableau de couleurs
// Variable qui ajoutera l'attribut selected de la liste droulante
// Parcours du tableau
echo "<select name='clie... | true |
5e4310cbb8136507a8b83740f2d965dae9713efb | PHP | yuzic/message-send | /Configuration/AbstractConfig.php | UTF-8 | 221 | 2.796875 | 3 | [] | no_license | <?php
namespace Configuration;
abstract class AbstractConfig
{
protected $storage = [];
/**
* @param $config
*/
public function __construct($config)
{
$this->storage = $config;
}
}
| true |
2d3915affcc57001a09c8b9c01dd372dc82821a7 | PHP | phpcompose/compose | /src/Mvc/Helper/LayoutHelper.php | UTF-8 | 1,528 | 2.78125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: alaminahmed
* Date: 2018-06-24
* Time: 3:43 PM
*/
namespace Compose\Mvc\Helper;
class LayoutHelper
{
protected
$content,
$sections,
$data = [];
/**
* @param string $key
* @param $data
*/
public function share(string $ke... | true |
97a5e665542df062bff892db583703f43d0a8012 | PHP | zenkie/Code | /wss/captcha.php | UTF-8 | 1,147 | 2.671875 | 3 | [] | no_license | <?php
session_start();
//set some important CAPTCHA constants
define('CAPTCHA_NUMCHARS', 6);//字符数量
define('CAPTCHA_WIDTH', 100);//宽
define('CAPTCHA_HEIGHT', 25);//高
//getCHAR
$pass_phrase = "";
for ($i = 0; $i < CAPTCHA_NUMCHARS; $i++){
$pass_phrase .= chr(rand(97, 122));
};
//session
$_SESSION['pass_phrase'] = sh... | true |
2113abe16f1e012514c1f01d19246978e302facf | PHP | JulianBustamante/drawing-tool | /src/Components/Drawer/LineDrawer.php | UTF-8 | 2,012 | 3.375 | 3 | [] | no_license | <?php
namespace DrawingTool\Components\Drawer;
use DrawingTool\Components\Canvas;
use DrawingTool\Components\Shape\Shape;
class LineDrawer extends Drawer
{
public function draw(Canvas $canvas, Shape $line)
{
$coordinates = $line->getCoordinates();
if ($coordinates['x1'] == $coordinates['x2'])... | true |
c700e64d350528770e6556f045a0cf843308f65a | PHP | hemanthchandragiri/complaint | /showcomplaints.php | UTF-8 | 1,921 | 3.125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid white;
color: aliceblue;
}
th
{
width:10%;
}
body
{
background-image: linear-gradient(to right ,#0f0c29,#302b63,#24243e);
}
echo
{
color: aliceblue;
... | true |
a3c306636571d4bcb6a7e8828d7df6384186ce02 | PHP | AlexMasterov/msgpack.php | /tests/EncoderTest.php | UTF-8 | 2,198 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MessagePack\Tests;
use MessagePack\Tests\Data\Type;
use MessagePack\{
Encoder,
Exception\UnsupportedType
};
use PHPUnit\Framework\TestCase;
final class EncoderTest extends TestCase
{
/**
* @test
* @dataProvider supportedTypes
*/
public function ... | true |
9f3a05c9a002494f8e9b71097ab856c688d56b53 | PHP | AnsoATC/Symfony_Pinterest-clone | /src/Controller/PinsController.php | UTF-8 | 2,861 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Pin;
use Doctrine\ORM\EntityManagerInterface;
use App\Repository\PinRepository;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\An... | true |
3a00fa0b4d90b724533885dc61cb489412099294 | PHP | pk1z/skyeng_test | /src/Skyeng/DataInterface/DataProviderInterface.php | UTF-8 | 186 | 2.609375 | 3 | [] | no_license | <?php
namespace Skyeng\DataInterface;
interface DataProviderInterface
{
/**
* @param array $input
*
* @return mixed
*/
public function get(array $input);
}
| true |
07a95ca3934459af0c538cb0a0eeff4284def874 | PHP | wilsonleung-gep/annotation-files-merger | /inc/CheckItem.php | UTF-8 | 803 | 3 | 3 | [
"MIT"
] | permissive | <?php
class CheckItem {
const PASS = "Pass";
const SKIP = "Skip";
const FAIL = "Fail";
const WARN = "Warn";
public function __construct($criteria, $options=array()) {
$settings = array_merge(array(
"message" => "",
"status" => self::SKIP
), $options);
... | true |
7a86e7991241e2ee88eb47d92e689e098d4c6399 | PHP | 956077081/PHP_project | /shop/app/Category.php | UTF-8 | 2,791 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
//因为artisan make:model 建立数据迁移文件 默认建表为复数 格式 及categories表 应为 我们将数据迁移文件的 category改
//为单数 (方便共同开发) 因此在模型文件中需要我们重写掉table文件名
protected $table = "category";
//设置fill可以进行全部填充的范围 及 $category->fill()函数 fill字段 可以填写... | true |
04aa62cb3937098bbecb03b0df6872a33989de95 | PHP | ArasayRB/sum_two_max_on_int_array | /app/controllers/Calculate_Controller.php | UTF-8 | 986 | 2.5625 | 3 | [] | no_license | <?php
namespace app\controllers;
use app\models\{User,Session,SessionUser};
use app\Redirect;
use config\{ServiceSession};
use app\controllers\{Session_Controller};
use core\{BaseController};
class Calculate_Controller extends BaseController
{
public function __construct(){
parent::__construct();
}
publ... | true |
80bdd8142d66605a9b089d2c4c5fd32e78cde438 | PHP | PoorlyDefinedBehaviour/data-structures-and-algorithms | /php/data_structures/tests/LinkedListTest.php | UTF-8 | 4,285 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
declare (strict_types = 1);
use Lists\LinkedList\LinkedList;
require_once "src/lists/LinkedList.php";
use PHPUnit\Framework\TestCase;
final class LinkedListTest extends TestCase {
public function test_ength(): void {
$list = new LinkedList();
$this->assertEquals(0, $list->length());
$list->insert... | true |
7594bc608d22b545f5dc04621e692eba4cc3aa3a | PHP | csev/pythonlearn | /slides/index.php | UTF-8 | 1,775 | 2.59375 | 3 | [] | no_license | <?php
include("../config.php");
$codes = file_get_contents('../ISO-639-2_utf-8.txt');
$codes = explode('|',$codes);
?><body style="font-family: sans-serif">
<h2>Python for Informatics: Exploring Information</h2>
<p>
<ul class="menu vertical nested">
<?php
$folders = scandir('.');
foreach($folders as $folder ) {
if... | true |
b23427e3d17e1ce5d1da87c0f9866eb9d2b34c65 | PHP | verdurevigor/CS296Lab3 | /array2dfunctions.php | UTF-8 | 4,182 | 3.28125 | 3 | [
"MIT"
] | permissive | <?php
$events = array (
array( 'eventId'=>1,
'userId'=>1,
'date'=>strtotime("2012-04-01 00:00:00"),
'title'=>"April Fools Day",
'description'=>"Today is the perfect day to play practical jokes on all of your classmates."),
array( 'eventId'=>2,
'userId'=>3,
'date'=>strtotim... | true |
836cbdc6bcaf9701b5fe8dc824fe5c467af543c8 | PHP | gustavobonassa/Sites | /sysshoes-adminlte/venda/funcoes/procurar.php | UTF-8 | 1,325 | 2.546875 | 3 | [] | no_license | <?php
require_once("../../banco/config.php");
$cpfprocurar=$_POST["cpfprocurar"];
session_start();
$pdo=Database::connect();
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$totalrow = 1;
$sql="SELECT * FROM cliente WHERE cpf='$cpfprocurar'";
foreach($pdo->query($sql) as $row)
{
$totalrow++;
... | true |
396d448375985899afd1ef310aaf6116187d03e2 | PHP | Thierry-Li/CESI-PRF2019-TP2-PAV | /pav/model/testQuery.php | UTF-8 | 1,022 | 2.859375 | 3 | [] | no_license | <?php
/* Page model de test Query des tables db*/
$tableUsers = $bdd->query("SELECT * FROM users");
$sameName = $bdd->query('SELECT * FROM users WHERE nom="Marriachi" ORDER BY prenom ');
while ($donneesUsers = $tableUsers->fetch())
{
echo "<strong>prenom :</strong> " . $donneesUsers['prenom'] . "; <strong>nom : </... | true |
0f2fc9e3b08a7834e84dbb9bd29fab8b42ad1462 | PHP | cdutten/Afip | /src/Afip/ServiceCaller.php | UTF-8 | 729 | 2.9375 | 3 | [] | no_license | <?php
namespace Afip;
/**
* Class ServiceCaller
* @package Afip
*/
class ServiceCaller
{
/**
* @var \SoapClient $client Client with the service
*/
protected $client;
private $auth;
/**
* ServiceCaller constructor.
*
* @param string $service
* @param AuthenticatorInter... | true |
35f35fd5f1dfbfeddc5531d1c56f7f21b19ff84c | PHP | Zerolone/mybbs | /manage/gallery/script.php | UTF-8 | 5,192 | 2.53125 | 3 | [] | no_license | <?php
require('../include/common.php');
$result = array();
$result['time'] = date('r');
$result['addr'] = substr_replace(gethostbyaddr($_SERVER['REMOTE_ADDR']), '******', 0, 6);
$result['agent'] = $_SERVER['HTTP_USER_AGENT'];
if (count($_GET)) {
$result['get'] = $_GET;
}
if (count($_POST)) {
$result['post'] = $_PO... | true |
4f594f317fc04c07b84d2e16d9d609eaed21902e | PHP | nik-john/react-redux-enrichment | /lib/Prezly/Helper/InitialsHelper.php | UTF-8 | 1,629 | 2.859375 | 3 | [] | no_license | <?php namespace Prezly\Helper;
use Prezly\Support\Arrays;
use RuntimeException;
class InitialsHelper
{
/**
* @param string $name
* @return string
*/
public static function initials($name)
{
$parts = explode(' ', $name);
return implode('', Arrays::map($parts, function ($name)... | true |
e465ae616f07f2d20fd101dc9c3775adeaeb07ab | PHP | gigagg/guzzle-stereo | /src/Formatter/ResponseFormatter.php | UTF-8 | 1,607 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the GuzzleStereo package.
*
* (c) Christophe Willemsen <willemsen.christophe@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Ikwattro\GuzzleStereo\Formatter;
use GuzzleHttp\P... | true |
4d5ff2cbccd7a38fff370c191640d59893966b8b | PHP | arturik1988/violin | /src/Rules/ActiveUrlRule.php | UTF-8 | 367 | 2.78125 | 3 | [] | no_license | <?php
namespace Violin\Rules;
class ActiveUrlRule
{
/**
* Run the validation
*
* @param string $name
* @param mixed $value
* @return bool
*/
public function run($name, $value)
{
$url = str_replace(array('http://', 'https://', 'ftp://'), '', strtolower($value));
... | true |
db35f53cc969990f23376706a45d30765e064464 | PHP | jasony62/xinxintong | /tms/tms_model.php | UTF-8 | 15,257 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*/
class TMS_MODEL
{
/**
* 根日志,默认info级别
*/
protected $logger;
/**
* 运维日志,默认trace级别
*/
protected $devLogger;
/**
*
*/
private static $model_prefix = '_model';
/**
*
*/
// abstract public function table();
/**
*
*/
// abstract public function id();
/**
... | true |
ee4e37a37e1b0caf4aca115dd9028d7200980edb | PHP | utopia-php/abuse | /src/Abuse/Abuse.php | UTF-8 | 1,042 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Utopia\Abuse;
class Abuse
{
/**
* @var Adapter
*/
protected Adapter $adapter;
/**
* @param Adapter $adapter
*/
public function __construct(Adapter $adapter)
{
$this->adapter = $adapter;
}
/**
* Check
*
* Checks if request is co... | true |
0c98864599774c59b7240d852f2b6ecfd6a3b6e5 | PHP | thelv/vfilme | /serials/lib/dbGeneral.php | WINDOWS-1251 | 2,893 | 2.546875 | 3 | [] | no_license | <?php
function esc($str)
{
return str_replace('>', '\>', "'".mysql_real_escape_string($str)."'");
}
function array_merge_smart($arr1, $arr2)
{
return array_merge(is_array($arr1) ? $arr1 : array(), is_array($arr2) ? $arr2 : array());
}
function &toArray(&$var)
{
if(! is_array($var))
{
... | true |
7112fdd70755fbde476c5b4001ae68c56cf5c866 | PHP | Webklex/php-geoip | /src/RemoteAddress.php | UTF-8 | 6,958 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* File: RemoteAddress.php
* Category: -
* Author: M.Goldenbaum
* Created: 17.10.20 23:21
* Updated: -
*
* Description:
* -
*/
/**
* @see https://github.com/zendframework/zend-http for the canonical source repository
* @copyright Copyright (c) 2005-2017 Zend Technologies USA Inc. (http://www.zend.com)... | true |
ece53c70234c74a528b679889ae52d8f92a0cb6a | PHP | krutika-a/core-php | /if..else.php | UTF-8 | 126 | 2.546875 | 3 | [] | no_license | <html>
<head>
</head>
<body>
<?php
if(20>30)
{
echo "condition is right";
}
{
echo "condition is wrong";
}
?>
</body>
</html>
| true |
e681d817a2b5d83ed853e00ffa5ae2c9294b1124 | PHP | fabfris/horloge-et-Notification | /script jeedom notifV3/notifheure.php | UTF-8 | 1,790 | 2.65625 | 3 | [] | no_license | <?php
if (isset($argv)) {
$IP=$argv[1];
$MOO=$argv[2];
/* // debuggage
include('/var/www/html/core/class/scenario.class.php');
log::add('script','error','Argument 2 :'.$MOO);
log::add('script','error','Argument 3 :'.$argv[3] );
*/
if ($MOO=="HOR" || $MOO=="SEC" || $MOO=="LUM" || $MOO=="INT" || $MOO=="NI... | true |
270003a243f0dfe5e45c762a23e5f3f52a99cc38 | PHP | moguonyanko/moglabo | /lang/javascript/webxam/public/php/exceptions/index.php | UTF-8 | 1,028 | 2.890625 | 3 | [] | no_license | <?php
declare(strict_types=1);
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>例外</title>
<link rel="stylesheet" href="../../common.css" />
</head>
<body>
<header>
<a href="../../">home</a>
<h1>例外</h... | true |
e533fcd59034dd4aa5106690497314c6aa5b74a3 | PHP | fruithost/Panel | /libraries/Gauge/Gauge.php | UTF-8 | 3,721 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Gauge;
class Gauge {
private $image = NULL;
private $image_needle = NULL;
private $image_background = NULL;
private $image_transparent = NULL;
private $display_range = true;
public function __construct() {
$this->image_background = dirname(__FILE__) . '/images/gauge_blank.png... | true |
fe5f46019ab87eb4df74f8f34aebbe9180ed017e | PHP | zephyr-y/ydoc-api | /application/kernel/validate/library/LibraryGroupValidate.php | UTF-8 | 1,404 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* 文档库分组相关 Validate
*
* @Created: 2020-06-20 17:24:20
* @Author: yesc (yes.ccx@gmail.com)
*/
namespace app\kernel\validate\library;
use app\kernel\model\YLibraryGroupModel;
use app\kernel\validate\extend\BaseValidate;
class LibraryGroupValidate extends BaseValidate {
protected $rule = [
'i... | true |
a2b1655add508cc1a81c840e197603976de51a26 | PHP | Saladin2020/coordinatexy | /core/jsonformat.php | UTF-8 | 733 | 2.796875 | 3 | [] | no_license | <?php
/**
*
* @author Saladin
*/
class jsonformat implements store_format {
private $data;
public function __construct() {
$this->data = array();
}
public function is_match($data, $format) {
if ($data == null) {
return [0 => "data_null"];
}
$arr_error =... | true |
c4eec3812595565907ca5862664a814915f8c53f | PHP | TakNePoidet/VkApiSDK | /src/ApiTypes/Notes/Note.php | UTF-8 | 1,981 | 2.890625 | 3 | [] | no_license | <?php
namespace VkApiSDK\ApiTypes\Notes;
use VkApiSDK\BaseType;
use VkApiSDK\ApiTypes;
class Note extends BaseType {
protected static $requiredParams = ['id','owner_id','comments','date','title','view_url'];
protected static $map = [
'id' => true,
'owner_id' => true,
'comments' => true,
... | true |
58bca865094aef769990aa6142a75234434f0d5d | PHP | elvetemedve/behat-screenshot | /src/Bex/Behat/ScreenshotExtension/Output/IndentedOutput.php | UTF-8 | 5,317 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace Bex\Behat\ScreenshotExtension\Output;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Class IndentedOutput
*
* @package Bex\Behat\ScreenshotExtension\Output
*
* @author Geza Buza <bghome@gmail.com>
*/
class IndentedOutput implements OutputInterface
{
const INDENT_WIDTH = 2;
... | true |
25669d0336b5dccae7b214c6cd8c9e18153ff714 | PHP | Beto-Beto-Salamander/tokoobat_backend | /application/controllers/Auth.php | UTF-8 | 2,000 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
use Restserver\Libraries\REST_Controller;
class Auth extends REST_Controller
{
public function __construct()
{
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Methods: GET, OPTIONS, POST, DELETE");
header("Access-Control-Allow-Headers: Content-T... | true |
d4e4873fbc7f174ce32f1afc4bb8ef0c5a9b977e | PHP | dragg/FreeTravel | /app/database/seeds/UserTableSeeder.php | UTF-8 | 928 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
class UserTableSeeder extends Seeder
{
protected static $count = 10;
public function run()
{
DB::table('users')->truncate();
$faker = Faker\Factory::create('en_US');
for($i = 1; $i <= 10; $i++) {
User::create([
'email' => '... | true |
9034937c02c39cb0a9175a9d87a186c4b4c1739f | PHP | D-DVC/softskillportal | /app/Http/Controllers/CharacterController.php | UTF-8 | 2,242 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\character;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class CharacterController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
cc6c9ad0e2da0422f23759a1757efe2ada6852d4 | PHP | shimu5/juzzsports | /return/ReturnManager.php | UTF-8 | 1,602 | 2.625 | 3 | [] | no_license | <?php
/**
*
* AboutusManager Manager Class
* AboutusManager will manage all about us static page information
*
* @package Aboutus Manager
* @category Manager
* @author
* @date 28/05/2014
*/
require_once ROOT . "functions/Connection.php";
require_once ROOT . "functions/functions.php";
require_onc... | true |
4d4591c8e7b4611f19ff5ebdc0ded71e88178409 | PHP | heshamelmasry77/tic-tac-toe | /Api/app/Robot/Contracts/Player.php | UTF-8 | 414 | 3.140625 | 3 | [] | no_license | <?php
namespace App\Robot\Contracts;
use App\Models\Game;
interface Player
{
/**
* Return the cell location where the Robot must play.
*
* @param Game $game
* @param string $piece
* @param string $opponentPiece
*
* @return string
*
* @throws \RuntimeException
*... | true |
46b3edb1ace2026899c58722a85c247f51d10276 | PHP | miag-ampt/PHP-Study | /sample033.php | UTF-8 | 1,873 | 3.765625 | 4 | [] | no_license | <?php
//3.3 配列
/*
0から連続した整数キーで管理される配列→添字配列
キーを文字列で定義→連想配列
一般的に、配列とハッシュやマップと記されるが、PHPではどちらも配列で、型として厳密な区別はない。
したがって、PHPの配列はすべて連想配列といえる。(添字配列→連続した整数をキーに持つ連想配列)
なので、PHPでは、たとえキーが整数でなくても順序が保証される。
また、PHPでは変数に型を定義する必要が無いため、異なる型を値にもつ配列を定義することが出来る。
*/
//配列の初期化
//array()で初期化
$fruits = array(
'apple',
'banana',
'o... | true |
059de0ee7a21e18e63226c99edad0b01aec709b5 | PHP | Adidoy/pupps | /database/migrations/2018_08_09_065901_create_offices_table.php | UTF-8 | 960 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOfficesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('dtmt_offices', function(Blueprint $table)
{
$table->increments('id');
$t... | true |
341cd7a72f342cc6ce5bf10c46cd96990d3fff74 | PHP | I0T/EPGT | /epg_nj/trunk/lib/model/mondongo/SingleChip.php | UTF-8 | 1,764 | 2.65625 | 3 | [] | no_license | <?php
/**
* SingleChip document.
*/
class SingleChip extends \BaseSingleChip
{
protected $wiki = null;
protected $comment = null;
/**
* wiki
* @return obj
* @autho lizhi
*/
public function getWiki() {
if (!isset($this->wiki)) {
$wiki_id = $this->getWikiId();
... | true |
261ebc3e0d9f893b83bbd79de736d532e0c663d8 | PHP | gaptree/gap-php-dto | /src/TimeUniq.php | UTF-8 | 2,282 | 2.8125 | 3 | [] | no_license | <?php
namespace Gap\Dto;
/**
* {timeLow:32bits}-
* {timeMid:16bits}-
* {version:4bits}{timeHi:12bits}-
* {variant:1-3bits}{clockSeq:13-15bits}-
* {node:48bits}
*
* Version
* 1. Time-based with unique or random host identifier
* 2. DCE Security version (with POSIX UIDs)
* 3. Name-based (MD5 hash)
* 4. Ra... | true |
7cc80274f8faa856edc7196a64b49898372d4cc9 | PHP | sidanval/book_catalog | /src/AppBundle/Security/GenreVoter.php | UTF-8 | 1,413 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Security;
use AppBundle\Entity\Genre;
use AppBundle\Entity\User;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
class GenreVoter extends Voter
{
const CREATE = 'genre_create';
const EDIT ... | true |
b45dd05c0aed410d00f19317ac87e4ac607b1fdb | PHP | eduardofpu/LojaVirtualPHP | /loja/model/User.class.php | UTF-8 | 1,654 | 2.953125 | 3 | [] | no_license | <?php
/**
* Description of User
*
* @author Eduardo
*/
class User extends Conexao{
private $user,$senha,$email;
function __construct() {
parent::__construct();
}
/**
* retorna o usuario
*/
function GetUserEmail($email){
$query =" SELECT * FROM ".$this->p... | true |