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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9190f9dcb4a81a01007555f32878ebe38bba3bf0 | PHP | satyasmax/EventsTracker | /WebDiP2011_090/scripts/vrijeme.php | UTF-8 | 892 | 2.546875 | 3 | [] | no_license | <?php
function setTime()
{
$pomak = 0;
$xml = "http://arka.foi.hr/PzaWeb/PzaWeb2004/config/pomak.xml";
$dat = fopen($xml,'r');
$podaci = fread($dat, 10000);
fclose($dat);
$domobj = new DOMDocument;
$domobj->loadXML($podaci);
$params = $domobj->getElementsByTagName('pomak');... | true |
6fcb5ad2171549401fa088826273d458898428cd | PHP | RowdyChildren/WR-Swim | /include/user/myjobs.php | UTF-8 | 3,770 | 2.578125 | 3 | [] | no_license | <?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
* MyJobs admin page content.
*
* $Id: myjobs.php 849 2012-05-09 16:03:20Z mpwalsh8 $
*
* (c) 2011 by Mike Walsh
*
* @author Mike Walsh <mike@walshcrew.com>
* @package swimteam
* @subpackage admin
* @version $Revision: 849 $
* @lastmodified $Date: 201... | true |
64fb1e4344e844f57d2fd7ba62c954f493dbe608 | PHP | nikhilmore54-zz/internship | /task3/try1/app/Http/routes.php | UTF-8 | 1,104 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond ... | true |
3fcf2035bb31e2c2da2feadd6a75ebea9a7269b3 | PHP | NuclearDog/PHP-ASN.1 | /parser.php | UTF-8 | 1,177 | 3.453125 | 3 | [] | no_license | <?php
/*
* PHP ASN.1 - ASN.1 BER Library for PHP
* Adam Pippin (GP, Inc.) <adam@gp-inc.ca>
*
* Please see the LICENSE file for the license terms.
*/
namespace ASN1
{
class Parser
{
protected $_reader;
/**
*
* @param \ASN1\TLVReader $reader The implementation to use to read TLV tuplets from a stream.
... | true |
465cb26b441fdc0421a40db37448c70d00c132ce | PHP | sergebezborodov/ywa | /app/components/helpers/functions.php | UTF-8 | 325 | 2.578125 | 3 | [] | no_license | <?php
function sqldate($timestamp = null) {
$format = "Y-m-d H:i:s";
return (empty($timestamp)) ? date($format) : date($format, $timestamp);
}
function ddd($var) {
Y::dump($var);
}
function dar($var) {
Y::dar($var);
}
function dd($var) {
echo "<pre>";
print_r($var);
echo "</pre>";
di... | true |
c97a7d77ed92012f4aa39fc290edb127250850bd | PHP | mayankmtg/Helping_Hands | /new.php | UTF-8 | 1,286 | 2.59375 | 3 | [] | no_license | <?php
$file=fopen('viraj.txt','rw');
$filedata=fread($file,100000);
echo "$filedata";
fclose($file);
?>
<form method="post">
<table>
<tr>
<td>coupon number:</td>
<td><input type="text" id="txtcouponid" name="txtcouponid"/> </td>
</tr>
<tr>
<td colspan="2">
<input type="submit" id="submit" name="submit" va... | true |
9f4a23952c752ef46b499857250f9ac2b3324bb7 | PHP | marielaguilarg/postmix | /Models/crud_n1.php | UTF-8 | 1,105 | 2.609375 | 3 | [] | no_license | <?php
require_once "Models/conexion.php";
class Datosnuno extends Conexion{
# CLASE NIVEL 1n1
public function vistaN1Model($tabla){
$stmt = Conexion::conectar()-> prepare("SELECT n1_id, n1_nombre FROM $tabla ");
$stmt-> execute();
return $stmt->fetchAll();
}
public function vista... | true |
5923ea7c9dbcd7d2923088225832b9d178d0cf7d | PHP | nastysapr/imagespark | /config/migrationTemplate.php | UTF-8 | 153 | 2.953125 | 3 | [] | no_license | <?php
class Name
{
public function up(): string
{
return "";
}
public function down(): string
{
return "";
}
}
| true |
545087b0c608405f725cbd9953b1c8a76bcd8c88 | PHP | chinhbk/visa | /application/models/BookVisa.php | UTF-8 | 3,715 | 2.875 | 3 | [] | no_license | <?php
//location : application/models/tour.php
class Application_Model_BookVisa
{
//declare the tour's attributes
private $id;
private $code;
private $purpose_of_visit;
private $visa_type_id;
private $processing_time_type_id;
private $visa_letter;
private $number_of_visa;
private $pr... | true |
9f15a56c8f14aa4584e5e9a6bc088bcf7279309a | PHP | renatolidiaguerra/LidiaGuerraPsico_Recibos | /i_controla_cookie.php | UTF-8 | 637 | 3 | 3 | [] | no_license | <?php
function cria_cookie($cookie_valor) {
$tempo_cookie = 86400 * 30;
$cookie_nome = "usuario";
setcookie($cookie_nome, $cookie_valor, time() + ($tempo_cookie), "/"); //(86400 * 30), "/"); // 86400 = 1 day
exibe("CC:Criando cookie");
exibe($cookie_valor);
}
function existe_cookie() {
if (isset($_COOKIE... | true |
71667324878dc4919a49937ae0bdb63133db52d3 | PHP | pasitopasi/PHP-Almacen | /Controlador/ControladorCrearEstanteria.php | UTF-8 | 853 | 2.59375 | 3 | [] | no_license | <?php
/**
* Aquí recibiremos los datos de una estanteria, montaremos un objeto estanteria
* y la mandaremos a una función, la cuál introduce esos datos del objeto en la BDD.
* Como dicha función nos devuelve un STRING informandonos de si se ha realizado
* correctamente o no, redigiriremos a dicha pagina con es... | true |
798dfc87143c94644684898c77ebe937683e4d1c | PHP | LoicLeTeno/laravel_rm_serie_4 | /app/Http/Controllers/FruitsController.php | UTF-8 | 2,394 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Fruits;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class FruitsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
e9a91612dff27f38d357ea5fcbe18d65abefd7a9 | PHP | bmggoswami/CabReview | /api.php | UTF-8 | 1,195 | 2.671875 | 3 | [] | no_license | <?php
include_once 'Database.php';
$db = Database::getInstance();
$mysqli = $db->getConnection();
if( $_GET['number'] ){
$sql = 'select * from user_rating where number = '.$_GET['number'];
$result = $mysqli->query($sql);
$rows = array();
$count = 0;
while($row = $result->fetch_array(MYSQLI_ASSOC) ){
$count++;
... | true |
3eb11aabd449e15c1e410c0b7c89552dfc2b933e | PHP | blackchacal/onlybits | /tests/OnlyBits/LogicGates/XORGateTest.php | UTF-8 | 702 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
use OnlyBits\LogicGates\XORGate;
class XORGateTest extends PHPUnit_Framework_TestCase
{
/**
* @dataProvider logicGateTwoInputProvider
*/
public function testOutputRespectsXORGateTruthTable($inputs, $out)
{
$xor = new XORGate;
$xor->in($inputs);
$output = $xor->out()... | true |
0991f6affa68f4b8f6b1355a620a5754fa8cf9a8 | PHP | h3rb/papi | /core/unique.php | UTF-8 | 488 | 2.71875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
// Keeps track of a unique identifier when using the ui.php functionality.
// Turns deployed UI javascript stuff into singletons.
global $unique;
$unique=array();
class Unique {
var $id;
public function Uniqueness() {
global $unique;
$classname=get_class($this);
if ( !isset($unique[$classnam... | true |
f656cccc20ba935d96f91fd77307ec60ce44c695 | PHP | sebbdk/booking | /Plugin/Assets/Model/AssetFile.php | UTF-8 | 8,935 | 2.5625 | 3 | [] | no_license | <?php
/**
* Description
*
* Copyright 2012, Nodes.dk. All Rights Reserved.
*
* @author Kasper Jensen <kj@nodes.dk>
* @created 02-12-2012 03:49 PM
*/
App::uses('AppModel', 'Model');
use \Nodes\Command;
class AssetFile extends AppModel {
public $imageTypes = array('png', 'gif', 'tiff', 'jpg', 'jpeg');
publi... | true |
86599769a384db93d7ffe6608c457e32b6c13d48 | PHP | yuitsubasapapa/yaf | /tests/framework_tests/domain_tests.php | UTF-8 | 496 | 2.75 | 3 | [] | no_license | <?php
require_once('../testHeader.php');
/*
* Objects that don't except throw a yafException
*/
class TestDomainObjectCreation extends UnitTestCase {
function testNewBadObject(){
try {
$address = new NonExistentClass;
$this->assertIsA($address,'NonExistentClass');
} catch (Exception $e){
$this->assert... | true |
42733715fc14ed79a581e69e92c7f4bfdbaf767b | PHP | rzepedam/controlqtime | /app/Http/Controllers/TypeSpecialityController.php | UTF-8 | 3,898 | 2.578125 | 3 | [] | no_license | <?php
namespace Controlqtime\Http\Controllers;
use Controlqtime\Core\Entities\TypeSpeciality;
use Controlqtime\Http\Requests\TypeSpecialityRequest;
use Exception;
use Illuminate\Log\Writer as Log;
class TypeSpecialityController extends Controller
{
/**
* @var Log
*/
protected $log;
/**
* ... | true |
28ae1241e66a036b427ffb23dc74a5fa3c7d0d6c | PHP | lorne21/codeup.dev | /public/movies/index.php | UTF-8 | 588 | 2.71875 | 3 | [] | no_license | <?php
session_start();
require '../functions.php';
$movies = [];
if (!empty($_SESSION['movies'])){
$movies = $_SESSION['movies'];
}
if (!empty($_POST)){
$movies[] = $_POST;
}
$_SESSION['movies'] = $movies;
var_dump($_SESSION['movies']);
// echo inputGet('title');
?>
<html>
<head>
<title>Movies</title>
<... | true |
8e5165ce51e72cb441f8cd57955bd099860bf135 | PHP | hbarcelos/spice-acl | /src/Spice/Acl/Role/Role.php | UTF-8 | 974 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Default implementation for an ACL Role.
* @author Henrique Barcelos <rick.hjpbarcelos@gmail.com>
*/
namespace Spice\Acl\Role;
/**
* Default implementation for an ACL Role.
*/
class Role implements RoleInterface {
/**
* @var string The role name
*/
private $name;
... | true |
54e376fef6573f3224fe39abed0479be0cbe85f6 | PHP | sinabio/Talon | /app/models/Users/Users.php | UTF-8 | 3,772 | 2.90625 | 3 | [] | no_license | <?php
namespace Talon\Models\Users;
use \Phalcon\Mvc\Model\Validator\Email,
\Phalcon\Mvc\Model\Validator\Uniqueness,
\Phalcon\Db\RawValue,
\Talon\Models\ModelBase;
/**
* Class Users
*/
class Users extends ModelBase
{
const USER_DOES_NOT_EXIST = 'User does not exist';
/**
*
* @var integer
*/
... | true |
4bd30f33de674be5e4fec3a8a98af8e083121e1f | PHP | codegym-vn/php-command-pattern | /calculator-command/Calculator.php | UTF-8 | 463 | 3.25 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: nhatnk
* Date: 6/6/17
* Time: 3:41 PM
*/
class Calculator
{
private $operator;
function __construct(IOperator $operator){
$this->operator = $operator;
}
function execute($firstOperator, $secondOperator){
if(isset($this->operator)){
... | true |
c7a546b91caf5cf61e5176cd7c8508db9abd9bd5 | PHP | asanovr/graphql | /src/Actions/Mutation.php | UTF-8 | 595 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: claudiopinto
* Date: 04/10/2017
* Time: 14:48
*/
namespace GraphQL\Actions;
use GraphQL\Contracts\Entities\RootNodeInterface;
use GraphQL\Entities\Node;
use GraphQL\Parsers\MutationParser;
use GraphQL\Traits\HasVariablesTrait;
/**
* Class Mutation
*
* @package GraphQL... | true |
7b8ff2358ac2acdf015eb397e66cfa12612b9f0f | PHP | VedranBrendy/weatherapp | /inc/getFavorites.php | UTF-8 | 1,579 | 2.8125 | 3 | [] | no_license |
<?php
//Init session
session_start();
//Save session in variable
$user_id = $_SESSION['id'];
// Include DB
include_once('../db.php');
// Prepare query
$sql = 'SELECT * FROM favorites WHERE user_id = :user_id';
// Prepare statement
if($stmt = $pdo->prepare($sql)){
// Bind params
$stmt-... | true |
b237eb293fee154e5db58aeafee0bd11ba9fb19a | PHP | caesargustav/scheduler | /tests/EventTest.php | UTF-8 | 658 | 3.03125 | 3 | [] | no_license | <?php
use CaesarGustav\Scheduler\Event;
use CaesarGustav\Scheduler\EventInterface;
it('implements the event interface', function () {
$event = new Event(1000, today(), today());
expect($event)->toBeInstanceOf(EventInterface::class);
});
it('creates a unique hash for objects', function () {
$originalEvent... | true |
005c6c6a4a365f33f670eea63540bdf2d4b856fa | PHP | eawogni/enchere | /model/Mise.php | UTF-8 | 2,333 | 3.125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: awogn
* Date: 09/02/2019
* Time: 11:29
*/
class Mise
{
private $statut; //le statut de la mise
private $idMise; //l'id de la mise
private $montantMise;
private $login; //id de l'utilisateur ayant fait la mise
private $dateMise; ... | true |
34746dabecf546b56318fb7037fdb9a2cce0f5a3 | PHP | ac41004-team3/yoyo-analytics | /app/Listeners/ProcessUploadedFile.php | UTF-8 | 2,255 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Listeners;
use App\Customer;
use App\Events\FileUploaded;
use App\Import;
use App\Outlet;
use App\Transaction;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
class ProcessUploadedFile
{
private $status;
/**
* Create the event listener.
*
* @return void
*/
... | true |
866455e6706847903bfecce8b9483839691540c1 | PHP | gmferreir1/sigem-2.0-back-end | /app/Helpers/DateTime.php | UTF-8 | 2,807 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
use Carbon\Carbon;
function daysDurationProcess($init_date, $end_date) {
$date1 = Carbon::createFromFormat('Y-m-d', $init_date);
$date2 = Carbon::createFromFormat('Y-m-d', $end_date);
return $date1->diffInDays($date2);
}
function dateExtensive($date = null) {
if(!$date) {
$date = date('... | true |
bfdbd867d27758c46300b7f7eda7c3fd94d1f1df | PHP | rashmi8105/Synapse | /src/Synapse/RestBundle/Converter/PersonDtoConverter.php | UTF-8 | 3,576 | 2.625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Synapse\RestBundle\Converter;
use Guzzle\Plugin\Md5\Md5ValidatorPlugin;
use JMS\DiExtraBundle\Annotation as DI;
use Synapse\RestBundle\Entity\PersonDTO;
use Synapse\CoreBundle\Entity\Person;
use Synapse\CoreBundle\Entity\ContactInfo;
use Synapse\CoreBundle\Entity\Organization;
/**
* Class PersonDtoCo... | true |
d04e601d4ba27190d3237bc44c3dbed6b590b34b | PHP | diegorivas89/mileenproject-backend | /app/mileen/Support/ParameterValidator.php | UTF-8 | 2,174 | 3.59375 | 4 | [] | no_license | <?php
namespace Mileen\Support;
use Mileen\Support\Exceptions\IllegalArgumentException;
/**
* Funciones varias para trabajar con arrays
*/
class ParameterValidator
{
/**
* Valida que si existe un valor bajo la clave $name en $parameters sea de tipo numerico. En caso
* de no existir retorna false, si existe y no... | true |
262a907fa06bb0ec28e39642441f9d86ab8635a6 | PHP | Danielle7317/LabSi | /projetolabsi/gerentes/bdconexao.php | UTF-8 | 642 | 2.546875 | 3 | [] | no_license | <?php
$dbname="comite_de_credito"; // Indique o nome do banco de dados que será aberto
$usuario="root"; // Indique o nome do usuário que tem acesso
$password="bela21"; // Indique a senha do usuário
//1º passo - Conecta ao servidor MySQL
if(!($id = mysql_connect("localhost",$usuario,$password))) {
echo "Não foi poss... | true |
0fe97aa158c70ba7638de28b8b9489d436d4e4ed | PHP | yaperson/POO-login | /assets/php/Classes/UserManager.php | UTF-8 | 1,552 | 3.125 | 3 | [] | no_license | <?php
include("User.php");
include "../conf.php";
class UserManager
{
private $_db;
public function __construct(PDO $db)
{
$this->setDb($db);
}
public function setDb($db):UserManager
{
$this->_db = $db;
return $this;
}
public function addUser($email, $passwor... | true |
4b0a83a6dca9cc566baf967c6665627e7929eb7d | PHP | Nags-081197/url_shortener | /url_shortener_source_code/index.php | UTF-8 | 5,036 | 2.59375 | 3 | [] | no_license | <?php
$status = "";
$RES = "";
$viz = "hidden";
if(isset($_POST['shorten'])){
$URL = $_POST['url'];
if(empty($URL)) {
$status = "URL is Compulsory";
}
else if(!preg_match("%^(?:(?:https?|http)://)(?:\S+(?::\S*)?@|\d{1,3}(?:\.\d{1,3}){3}|(?:(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-... | true |
63e6c158cf8479c229b47b6766eaab27ed38ad66 | PHP | UNADRubenLara/vinculacion | /controllers/IZip.php | UTF-8 | 614 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
class IZip
{
private $model;
public function __construct()
{
$this->model = new ZipModel();
}
public function findByCode($idZip = '')
{
return $this->model->findByCode($idZip);
}
public function findByZip($zipcode... | true |
e2c44402dc1edb75309e82e56bb15363d101f7d3 | PHP | wikimedia/mediawiki-extensions-BlueSpiceExtendedSearch | /src/ExternalIndexFactory.php | UTF-8 | 1,061 | 2.640625 | 3 | [] | no_license | <?php
namespace BS\ExtendedSearch;
use BlueSpice\ExtensionAttributeBasedRegistry;
use Config;
use MediaWiki\MediaWikiServices;
class ExternalIndexFactory {
/**
*
* @var Config
*/
protected $config = null;
/**
*
* @var ExtensionAttributeBasedRegistry
*/
protected $registry = null;
/**
*
* @para... | true |
d00cd4ec1cff0361f6e23b85ed9866f4aa31e654 | PHP | JLTUTORIALES/plantilla_de_blog | /minificado/settings.php | UTF-8 | 1,985 | 2.8125 | 3 | [] | no_license | <?php session_start(); //Iniciar sessión para validación de administrador
/*
Variables que la plantilla de blog necesita para funcionar
*/
//Información general del Blog
$info = [
"title" => "Plantilla de Blog",
"year" => 2021,
"language" => "Es",
"icon... | true |
4472682ed656fb0d8a39eba35b9057de230b4e14 | PHP | fayfoxteam/faycms | /vendor/faysoft/cms/modules/api/controllers/PostFavoriteController.php | UTF-8 | 3,030 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace cms\modules\api\controllers;
use cms\library\UserController;
use fay\services\post\PostFavoriteService;
use fay\core\Response;
use fay\services\post\PostService;
use fay\helpers\FieldHelper;
/**
* 文章收藏
*/
class PostFavoriteController extends UserController{
/**
* 收藏
* @parameter ... | true |
c349701c7fe99af7641765f90af2a51fcb43add7 | PHP | revinate/rabbitmq-bundle | /LegacySupport/ServiceContainer.php | UTF-8 | 7,727 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Revinate\RabbitMqBundle\LegacySupport;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use Revinate\RabbitMqBundle\Consumer\Consumer;
use Revinate\RabbitMqBundle\Exceptions\InvalidConfigurationException;
use Revinate\RabbitMqBundle\Exchange\Exchange;
use Revinate\RabbitMqBundle\Producer\Producer;
use ... | true |
3a09103bfe6cd44bc458a90a56f7d3feeb5efcb0 | PHP | Svartholm/sharea | /lib/HTTPRequest.class.php | UTF-8 | 1,950 | 2.859375 | 3 | [] | no_license | <?php
namespace lib;
class HTTPRequest extends ApplicationComponent
{
public function addGetVar($key, $value)
{
$_GET[$key] = $value;
}
public function cookieData($key)
{
return isset($_COOKIE[$key]) ? $_COOKIE[$key] : null;
}
... | true |
2bca944dc719c5fce4a8bbed0ff551ea027e6573 | PHP | oberoisehej/Artifex | /src/getDrawer.php | UTF-8 | 493 | 2.515625 | 3 | [] | no_license | <?php
$con = mysqli_connect("localhost", "id3764634_sehejoberoi10", "abcd1234", "id3764634_csia");
// Check connection
if (mysqli_connect_errno()){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$pin = $_POST["pin"];
$turn = $_POST["turn"];
$sql="SELECT `d... | true |
8af8b68271b89ecfcb9ccb92d9d9bbfa9e707758 | PHP | dstokovsky/algos | /lib/sort/SelectionSort.class.php | UTF-8 | 1,023 | 3.09375 | 3 | [] | no_license | <?php
class SelectionSort extends AbstractSort{
private function _selectMax( $left, $right ){
$max_pos = $index = $left;
$unsorted_list = $this->getList();
while ( $this->isLeftLessOrEqualsToRight( ++$index, $right ) ){
if( $this->isLeftMoreThenRight( $unsorted_list[ $index... | true |
4b2227f88bf0d89ebce5ce4bee200053308bca35 | PHP | wozhaocai/data_center | /framework/glider_sky/library/Util/Html.php | UTF-8 | 9,160 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?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.
*/
class Util_Html{
function formatHtmlByObj($oHtml) {
$type = (string) $oHtml['type'];
$sStr = ""... | true |
0b1b22c2f6a23a53f3ce5fec59d4619b7c300f97 | PHP | Quicksilvers/errand-project | /module/Service/src/Service/Service/ServiceService.php | UTF-8 | 435 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: artem
* Date: 17.10.15
* Time: 22:00
*/
namespace Service\Service;
use Service\Entity\Service;
class ServiceService
{
/** @var Service $serviceEntity */
protected $serviceEntity;
public function __construct($serviceEntity)
{
$this->serviceEntity =... | true |
4d22d1a6832a1ab11f7b9eca81c0bfb5b9f8296b | PHP | vesicash-tech/vesicash-php-sdk | /src/Vesicash/Services/Notifications.php | UTF-8 | 553 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Vesicash\Vesicash\Services;
use Exception;
use Vesicash\Request;
class Notifications extends Request
{
/**
* Send Custom Notification
* @param $data
* @return mixed
* @throws Exception
*/
public function sendCustomNotification($data) {
$this->required(['transact... | true |
5de4b58ae954e6d9e7189ab02bce59676f18539a | PHP | Daniil321123/OOP_and_other | /test.php | UTF-8 | 3,930 | 3.15625 | 3 | [] | no_license | <?php
//$connect_db = mysqli_connect('localhost', 'root', 'root', 'weather_diary');
//if (!$connect_db) {
// echo 'Bad connection Data Base!' . mysqli_connect_error();
// die;
//} else {
// echo 'Connection!';
// mysqli_set_charset($connect_db, 'utf8');
// $sql = 'INSERT INTO cities SET name = "Санкт-Пет... | true |
8701573277a4cbb9b49a75c1edb24560e39d3d47 | PHP | Cli-published/graphpinator | /src/Resolver/VariableValueSet.php | UTF-8 | 1,248 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Graphpinator\Resolver;
final class VariableValueSet implements \ArrayAccess
{
use \Nette\SmartObject;
private array $array = [];
public function __construct(
\Graphpinator\Normalizer\Variable\VariableSet $definedVariables,
\stdClass $providedVa... | true |
519b9990057aa7b2f2aa4fc6e47ec65903ddbab1 | PHP | thewakingsands/cafemaker-web | /src/Service/Companion/Models/MarketHistory.php | UTF-8 | 1,189 | 2.84375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
namespace App\Service\Companion\Models;
/**
* This is a JSON Model
*/
class MarketHistory
{
public $ID;
public $Added = 0;
public $PurchaseDate;
public $PurchaseDateMS;
public $CharacterID;
public $CharacterName;
public $IsHQ = false;
public $PricePerUnit;
public $PriceTota... | true |
9840b96ddc756d6468dc42e54288135029bcdec7 | PHP | ddbtav/ApiGateway | /app/Services/WebserverService.php | UTF-8 | 1,686 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Traits\ConsumesExternalService;
class WebserverService
{
use ConsumesExternalService;
/**
* The base uri to consume the webservers service
* @var string
*/
public $baseUri;
/**
* The secret to consume the webservers service
* @var strin... | true |
f57e3fae96664d9a5296d9b8ecb2fdbd03f65373 | PHP | bitcoin333/kanboard | /app/Controller/WebNotification.php | UTF-8 | 1,267 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kanboard\Controller;
/**
* Web notification controller
*
* @package controller
* @author Frederic Guillot
*/
class WebNotification extends BaseController
{
/**
* Mark all notifications as read
*
* @access public
*/
public function flush()
{
$user_id = $t... | true |
5cafebb973c80e9bd0e9dd89f8a11a406c379a3b | PHP | Mr-Pike/LolTfT | /database/migrations/2019_08_30_151054_create_champions_origins_table.php | UTF-8 | 1,103 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateChampionsOriginsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('champi... | true |
b1472a1755b0bfe52b617ac30ca69b1cc85be952 | PHP | caoym/ez-bpm | /src/Builder/InclusiveForkGatewayConnector.php | UTF-8 | 945 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: caoyangmin
* Date: 2017/3/5
* Time: 上午11:26
*/
namespace EzBpm\Builder;
use EzBpm\Process\Nodes\ExclusiveForkGateway;
use EzBpm\Process\Nodes\InclusiveForkGateway;
use EzBpm\Process\Process;
/**
* Class InclusiveJoinGatewayConnector
* @package EzBpm\Builder
*/
class ... | true |
4b90d6cba29473b7b36702f6d66fccbfac68ea91 | PHP | agentcherif/projetTec | /model/addSujet.class.php | UTF-8 | 1,552 | 3.1875 | 3 | [] | no_license | <?php include_once '../controller/fonction.php';
class addSujet
{
private $name;
private $sujet;
private $categorie;
private $bdd;
public function __construct($name,$sujet,$categorie)
{
$this->name= htmlspecialchars($name);
$this->sujet= htmlspecialchars($sujet);
$this->categorie= htmlsp... | true |
d51a750c17fb108fb0761aee28023f06e0902258 | PHP | gilangmlr/surya-monitoring | /classes/stp.class.php | UTF-8 | 1,134 | 2.671875 | 3 | [] | no_license | <?php
/**
* Inventory Class
* All inventory system needs
*
*/
require_once(__DIR__ . '/Db.class.php');
class STPClass
{
public static $stp_arr = ['compA', 'compB', 'compC', 'compD', 'bak1', 'bak2', 'bak3', 'bak4', 'bak5', 'bak6', 'bakKontrol7', 'submerPump1', 'submerPump2', 'chlorine', 'boxPanel', 'panel', 'exhaust... | true |
da01223b007cd8a312cf724513b42ae19401901a | PHP | Rafin31/PHP-Project- | /Modal/productModel.php | UTF-8 | 742 | 2.515625 | 3 | [] | no_license | <?php
require_once('../Modal/db.php');
function getProductByID($id){
$conn = getConnection();
$sql = "select * from product_list where id='{$id}";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);
return $row;
}
function getProductByname($name){
$conn = getConnection();
$sq... | true |
c6613991f0a231442e9400666cb2fd9eea6e4bd4 | PHP | web-token/jwt-framework | /src/Component/Core/JWT.php | UTF-8 | 239 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Jose\Component\Core;
interface JWT
{
/**
* Returns the payload of the JWT. null is a valid payload (e.g. JWS with detached payload).
*/
public function getPayload(): ?string;
}
| true |
97bb28f0f28c3ed5ab254d4aa6eac898ce8b98b8 | PHP | coderoll/xtb-api-client | /src/Response/TradeTransactionStatusResponse.php | UTF-8 | 1,334 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Coderoll\XtbApiClient\Response;
/**
* Class that contains response of TradeTransactionStatus payload
*/
class TradeTransactionStatusResponse
{
public const REQUEST_STATUS_ERROR = 0;
public const REQUEST_STATUS_PENDING = 1;
public const REQUEST_STATUS_ACCEPTED = 3;
public const REQUES... | true |
ac3316d25749e746c1d30f9f139f20332c494582 | PHP | azamat9904/php-mvc | /ishop/core/Cache.php | UTF-8 | 933 | 2.8125 | 3 | [] | no_license | <?php
namespace ishop\core;
class Cache{
use TSingleton;
public function set($key, $value, $seconds = 3600){
$cachePath = CACHE . '/' . md5($key) . '.txt';
$content['data'] = $value;
$content['end_time'] = time() + $seconds;
if(\file_put_contents($cachePath, serialize($content... | true |
fa2a4c48b4919a8c01dcdc780a5f0484abcbe3ed | PHP | zmitic/bigdata | /src/Entity/Category.php | UTF-8 | 2,349 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Entity;
use App\Annotation\Counted;
use App\Model\IdentifiableEntityTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use function in_array;
/**
* @ORM\Entity(repositoryClass="App\Repository\CategoryRepository")
* @ORM\Table(name=... | true |
0a39694e5aef2af00eb3c274f227c829e710f540 | PHP | johnsquibb/adventure-game-framework | /src/Entity/DeactivatableEntityInterface.php | UTF-8 | 454 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace AdventureGame\Entity;
/**
* Interface DeactivatableEntityInterface defines methods for items that can be Deactivated.
* @package AdventureGame\Entity
*/
interface DeactivatableEntityInterface
{
public function getDeactivatable(): bool;
public function getDeactivated(): bool;
... | true |
c5d44847b2771eb1dc9c8a87cde4f139fc174a2c | PHP | MajorRedbeard/GJSingers | /Builder-Acute-Blue/lib/builder-core/lib/gallery-shortcode/functions.php | UTF-8 | 5,807 | 2.515625 | 3 | [] | no_license | <?php
/*
Gallery customization functions
Written by Chris Jean for iThemes.com
Version 1.0.0
Version History
1.0.0 - 2013-02-14 - Chris Jean
Built from code taken from lib/main/functions.php
*/
// Customize post gallery output
// Built from version 3.3.0
function builder_custom_post_gallery( $output, $attr ) {
... | true |
e714ff6a38bc73ce2aae9365b86de7e06bde787e | PHP | TomsDr/NTPie | /laravel/app/database/seeds/DatabaseSeeder.php | UTF-8 | 762 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
//Faker datubbāzes datu ģenerators
class DatabaseSeeder
extends Seeder
{
protected $faker;
//Izsauc jaunu Faker instanci
public function getFaker()
{
if (empty($this->faker))
{
$faker = Faker\Factory::create();
$faker->addProvider (new Faker\Provider\B... | true |
bcf4b7e404bda16dfa4ace0c58f869faf7525d28 | PHP | nerdyash/php | /form.php | UTF-8 | 2,861 | 3.375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>PHP Form</title>
<style>
.err{
color: darkred;
}
</style>
</head>
<body>
<h1>Php Form</h1>
<?php
$name = $email = $gender = $website = $comment = "";
$name_err = $email_err = $gender_err = "";
i... | true |
1b95d3f7b80e024bd9c058f67b8a9f1427165fd1 | PHP | linmory/phalcon | /apps/WscnGold/src/WscnGold/Controllers/TechanalysisController.php | UTF-8 | 6,064 | 2.578125 | 3 | [
"BSD-3-Clause",
"Zend-2.0",
"PHP-3.01"
] | permissive | <?php
namespace WscnGold\Controllers;
use WscnGold\Entities\Techanalysis\Quotes;
class TechanalysisController extends ControllerBase
{
protected function getSuggestion($input)
{
$input = trim(strtolower($input));
$mapping = array(
'buy' => '买入',
'sell' => '卖出',
... | true |
b5a829d46cbcace2171c693337c6d30799d31d6d | PHP | bagart/FinXLog | /src/Classes/Module/Logger.php | UTF-8 | 1,516 | 2.8125 | 3 | [] | no_license | <?php
namespace FinXLog\Module;
use \Monolog;
class Logger
{
private static $inctance;
/**
* @var null|\Psr\Log\LoggerInterface
*/
private $logger;
/**
* for typical use - single for app
* configurable Logger::me()->setLogger(\Psr\Log\LoggerInterface)
* not singleton: multi-in... | true |
f5db4a22b1b366451ff88bc1add83e55cc8e068c | PHP | Azizoff/kazoo-pivot-api | /src/AIR/Modules/Response.php | UTF-8 | 507 | 2.578125 | 3 | [] | no_license | <?php
namespace AIR\Modules;
/**
* Class Response
*
* @package AIR\Modules
*/
class Response extends AbstractModule implements LeafInterface
{
/**
* @return bool
*/
public function hasData()
{
return true;
}
/**
* @return \ArrayObject|array
*/
public function g... | true |
72e4a5ef3b81058fe5b0074b0e0978b6a18de4b2 | PHP | fluxoft/rebar | /tests/Http/CookiesTest.php | UTF-8 | 2,041 | 2.671875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
namespace Fluxoft\Rebar\Http;
use PHPUnit\Framework\TestCase;
class CookiesTest extends TestCase {
/**
* @param array $settings
* @param array $cookieSet
* @param $cookieReturn
* @dataProvider cookiesProvider
*/
public function test(bool $cookieReturn, array $settings = [], array $cookieSet = []) {... | true |
78a63ef5174a996a46756bfe63806e2884e0d4df | PHP | omarpr/sici4997 | /lecture7/test.php | UTF-8 | 495 | 3.09375 | 3 | [] | no_license | <?php
// Connection
$db = new PDO('mysql:host=localhost;dbname=omar;charset=utf8', 'omar', 'sici4997');
// Regular Query
$sql = 'SELECT * FROM test';
foreach ($db->query($sql) as $row) {
echo '<pre>' . print_r($row, true) . '</pre>';
}
// Prepared Query
$sql = 'SELECT * FROM test WHERE id = ?';
$stmt = $db->pr... | true |
c73d9f7aa18a13a9ff4bfcb0a487d2a0fadb10e7 | PHP | Eternity-Yarr/market-cpa-api | /classes/ems.class.php | UTF-8 | 2,452 | 2.796875 | 3 | [
"CC0-1.0"
] | permissive | <?php
/*
* EMS-api dealer-with
* v. 0.2 | https://github.com/Eternity-Yarr/market-cpa-api/
*
* CC0 1.0 license.
*/
class EMS {
static protected $baseurl = 'http://emspost.ru/api/rest/?';
const emsCities = 'cities';
const emsRegions = 'regions';
const emsRussia = 'russia';
const emsCountries... | true |
b74303d45f2591e03b614a6bdc3b4ac5fb78cb57 | PHP | coolioxlr/PebbleBucks | /php/starbucksLogin.php | UTF-8 | 2,739 | 2.53125 | 3 | [] | no_license | <?php
$cookie = "cookie.txt";
//$cookie = tempnam ("/tmp", "cookieMyWeb");
if (is_writable($cookie)) {
// echo 'The cookie is writable';
} else {
// echo 'The cookie is not writable';
error_log("The cookie is not writable!", 3, "errors.log");
## start by making it writable :
if (! chmod ( $cookie, ... | true |
67ff6efcdc9feca89783141253280cd51ff2052c | PHP | Vuminhduc19971/PHPminhduc | /break continue/break.php | UTF-8 | 151 | 3.171875 | 3 | [] | no_license | <?php
for($i = 1; $i < 20; $i++) {
if ($i == 10) {
// break dừng vòng lặp ngay lập tức
break;
}
echo "<br> $i";
} | true |
51ed11453acc900dbabd16b7921c8c0ce1af4e5f | PHP | hushulin/kaide-backend | /modules/kaide/vendor/aysheka/socket/src/Aysheka/Socket/Address/IP4.php | UTF-8 | 134 | 2.5625 | 3 | [] | no_license | <?php
namespace Aysheka\Socket\Address;
class IP4 implements Address
{
function getType()
{
return AF_INET;
}
}
| true |
cd63290349cce0bce8357105fae454d0cfe5b3b2 | PHP | zeronoctis/TW | /src/TW/neloBundle/Controller/ServicesController.php | UTF-8 | 1,073 | 2.53125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace TW\neloBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use TW\neloBundle\Entity\Task;
use Symfony\Component\HttpFoundation\Request;
use TW\neloBundle\Form\Type\TaskType;
class ServicesController extends Controller{
public function servicesAction(){
return $this->rend... | true |
5de822db3e5c9e2a76a880a8e8aaa144456335b2 | PHP | dvens/flex-seats | /src/app/templates/account/account.controller.php | UTF-8 | 2,175 | 2.625 | 3 | [] | no_license | <?php
require_once('./app/core/connection.php');
if(!(isset($_SESSION['user']))) {
header('Location: ?page=home');
}
$userData = getUser($conn);
if( isset($_POST['save']) ) {
$emailaddress = (isset($_POST['emailaddress']) ? $_POST['emailaddress'] : null);
$surname = (isset($_POST['surname']) ? $_PO... | true |
835d70977a75f8b57510086680ce4ef2fb841791 | PHP | awmrozek/Feniks | /app/controllers/subscriptions_controller.php | UTF-8 | 3,354 | 2.515625 | 3 | [] | no_license | <?php
class SubscriptionsController extends AppController {
var $helpers = array ('Html','Form');
var $components = array("Auth", "Session");
var $name = 'Subscriptions';
var $layout = "feniks";
function beforeFilter () {
$this->Auth->loginAction = array('admin' => false, 'controller' => 'users', 'action' => '... | true |
f66da4f43bb9adfc75cc49481585cffe87a08513 | PHP | Ascinocco/Lumen-Auth-Scaffold | /app/User.php | UTF-8 | 1,899 | 2.796875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Support\Facades\Hash;
use Illuminate\Auth\Authenticatable;
use Laravel\Lumen\Auth\Authorizable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContrac... | true |
8de8570eecc3c33ee887a4cce736f0dc063e42f5 | PHP | nicnocquee/frontend | /src/libraries/controllers/AssetsController.php | UTF-8 | 3,006 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Tag controller for API endpoints
*
* This controller does much of the dispatching to the Tag controller for all tag requests.
* @author Jaisen Mathai <jaisen@jmathai.com>
*/
class AssetsController extends BaseController
{
private $types, $pipeline;
/**
* Call the parent constructor
*
... | true |
c79034b5e1e349b3fda16052674927e3ffdc0db9 | PHP | pierregaimard/projet05 | /src/Service/Form/DataFilter/NumberDataFilter.php | UTF-8 | 302 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Service\Form\DataFilter;
use App\Service\Form\DataChecker\DataCheckerInterface;
class NumberDataFilter implements DataFilterInterface
{
/**
* @param $data
*
* @return int|mixed
*/
public function filter($data)
{
return (int)$data;
}
}
| true |
ec385a3a5f1db910b4972f4ccd9ec426d1d3140c | PHP | jimjdeal/sqm | /src/Sqm.php | UTF-8 | 470 | 2.703125 | 3 | [] | no_license | <?php
class Sqm
{
public function getAuthor()
{
return $this->ScenarioData->author;
}
public function getSquads(string $side = null)
{
$squads = [];
foreach($this->Mission->Entities as $entitiy) {
if(is_object($entitiy) && $entitiy->dataType == "Group") {
... | true |
433ee0cfc191de5a6ec2ac483eb2a5ec43e8f450 | PHP | cao2008ming/Lyproject | /application/admin/controller/Bus.php | UTF-8 | 2,618 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* $desc
* Created by PhpStorm.
* User: torans <321870617@qq.com>
* Date: 17/6/14
* Time: 17:14
*/
namespace app\admin\controller;
use app\common\controller\AdminBase;
use think\Session;
class Bus extends AdminBase
{
protected $model;
//初始化
public function _initialize()
{
pa... | true |
b8ff2efe407a4c7ee8fb47a628be7c5890df629a | PHP | Stuffa1991/Tinderboxsem1 | /application/models/Information_model.php | UTF-8 | 2,601 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Information_model extends CI_Model {
private $id; // int
private $memberid; // string
private $imageid; // int
private $mobile; // int
private $type; // string
private $title; // string
private $text; // string
private... | true |
17517240af0e103f7327145a709262488274db88 | PHP | kingb29/All-Saints-Church | /team9_proj/php/admin.php | UTF-8 | 1,513 | 2.515625 | 3 | [] | no_license | <?php
session_start();
require_once("initialize.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>All Saints Lutheran Church</title>
<meta charset="UTF-8">
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../css/bo... | true |
f68d9315eef176144586ef732e2c0abf4c6593ef | PHP | weierophinney/zf-web | /module/Changelog/src/Changelog/Controller/FetchController.php | UTF-8 | 10,115 | 2.578125 | 3 | [] | no_license | <?php
namespace Changelog\Controller;
use DateTime;
use Zend\Console\Adapter\AdapterInterface as Console;
use Zend\Console\ColorInterface as Color;
use Zend\Console\Request as ConsoleRequest;
use Zend\Http\Client as HttpClient;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\XmlRpc\Client\ServerProxy as Xm... | true |
78a857242beccbc5f3a91cd6f1369faf091d42a7 | PHP | simfatic/boar | /src/library/validations/Required.php | UTF-8 | 463 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Simfatic\Boar\Library\Validations;
use Simfatic\Boar\Library\Validator;
class Required extends Validator
{
public $message = "{{field}} is required";
public function validate($field, $post)
{
if(empty($post[$field]))
{
return false;
}
... | true |
daa4d1c5a07f290043613a64f9c550f609f7999e | PHP | ahmed-metoui/exemple-api-rest | /src/Model/Product/Product.php | UTF-8 | 367 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Model\Product;
/**
* Description of Product.
*/
class Product
{
/**
* @var int
*/
public $id;
/**
* @var string
*/
public $name;
/**
* @var float
*/
public $price;
/**
* @var int
*/
public $stock;
/**
* @var Arr... | true |
8b737fa27df69f8079c6e45a4209359892b31ab9 | PHP | it-blaster/translation-bundle | /Translation/Dumper/PhpDumper.php | UTF-8 | 3,948 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright 2011 Johannes M. Schmitt <schmittjoh@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | true |
cf825de68ee3b9207723c384daf2179da14ea77e | PHP | Ayati017/file-kuliah | /contoharraylagi.php | UTF-8 | 1,138 | 3.171875 | 3 | [] | no_license | <?php
$larik = array(1,2,3,4,5);
array_shift($larik); //menghioangkan barispertama array
array_push($larik, 7,8); //menambah array
print_r ($larik);
echo "<br>";
$data = array(
array("Nim" => "123456",
"nama" => "Ayati",
"prodi" => "MI",
"ipk" => "3.00" )... | true |
e8a91be089bff84df9bfd48b88b3436108017ca5 | PHP | Lemurro/api-core | /src/Helpers/LoggerFactory.php | UTF-8 | 1,305 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Lemurro\Api\Core\Helpers;
use Lemurro\Api\App\Configs\SettingsPath;
use Lemurro\Api\Core\Helpers\File\FileNameCleaner;
use Monolog\Handler\RotatingFileHandler;
use Monolog\Logger;
/**
* Фабрика создания логгеров Monolog
*/
class LoggerFactory
{
/**
* Создание логгера
*
* @param s... | true |
14dbeba2d32ad795982391ac144fc9cc629ca154 | PHP | eluneysalvaro1/IPOO | /test_Cuadrado.php | UTF-8 | 262 | 3.078125 | 3 | [] | no_license | <?php
include_once "cuadrado.php";
$cuadrado = new Cuadrado(1,1,1,4,4,1,4,4);
echo $cuadrado->area();
echo "\n";
$cuadrado->desplazar(5);
echo $cuadrado->__toString();
echo "\n";
$cuadrado->aumentarTamaño(3);
echo $cuadrado->__toString();
?> | true |
d551a7e2367df1d56acc4f33697704836f537bad | PHP | deebarizo/mtg-insight-1.0 | /database/migrations/2015_08_14_132108_create_sets_cards_table.php | UTF-8 | 931 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSetsCardsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sets_cards', function($table)
{
... | true |
bdc198b0c53e5b8820a0428c4e5c3cf078119e48 | PHP | Lirdoner/animezone | /apps/Anime/Model/Report/Report.php | UTF-8 | 2,839 | 2.609375 | 3 | [] | no_license | <?php
namespace Anime\Model\Report;
use Sequence\Database\Entity\BaseEntity;
class Report extends BaseEntity
{
const TYPE_LINK = 1;
const TYPE_COMMENT = 2;
const TYPE_CONTACT = 3;
/** @var int */
protected $id;
/** @var string */
protected $type;
... | true |
4bdf856f119d7576ff23bbd28e30262885c1518d | PHP | Socle/IntlDateTimeFormatBundle | /Formatter/IntlDateTimeFormatterInterface.php | UTF-8 | 7,853 | 2.953125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Socle\Bundle\IntlDateTimeFormatBundle\Formatter;
/**
* Formatter class definition
*
* @author Soliman Cheyssial <scheyssial@sqli.com>
* @license http://opensource.org/licenses/BSD-3-Clause new BSD
* @copyright 2014 Soliman CHEYSSIAL
*/
interface IntlDateTimeFormatterInterface
{
const DEFAUL... | true |
41063e67fcc8c894904ca71720c67fd271016438 | PHP | SergeyPlotnikov/homework-4 | /src/Game/Resources/Water.php | UTF-8 | 369 | 2.765625 | 3 | [] | no_license | <?php
namespace BinaryStudioAcademy\Game\Resources;
class Water extends Material
{
public function __construct()
{
$this->title = 'water';
$this->description = "Water (H2O) is a polar inorganic compound that is at room temperature a tasteless and
odorless liquid, which is nearly colorl... | true |
7d050c799f27d9e923396cc0d98439c22ab0f5d2 | PHP | anandhu-co-in/Netflix_clone_php_mySQL | /include/classes/CategoryContainers.php | UTF-8 | 4,076 | 3.21875 | 3 | [] | no_license | <?php
class CategoryContainers{
private $con,$username;
public function __construct($con,$username)
{
$this->con=$con;
$this->username=$username;
}
public function showAllCategories(){
//Get All category rows
$querry=$this->con->prepare("SELECT * from c... | true |
f338ae003b64f43bacccc41f6c5a084b1dacb59b | PHP | ievaza/nd | /miskas/inc/Vovere.php | UTF-8 | 605 | 2.921875 | 3 | [] | no_license | <?php
class Vovere extends Miskas{
protected $name = 'Voveryte';
private $type = 'Grauzikas';
protected $voice = 'Skviki-skviki';
public static $title = 'Voveres giria';
public function __construct(){
parent::__construct(); //tevo konstruktorius
echo '<h3>VOVERES KONSTRUKTORIUS ... | true |
18e483a0c6e6a7750f6c2969c1a524a4ce0bd802 | PHP | milkcreation/pollen-log | /src/Logger.php | UTF-8 | 2,791 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Pollen\Log;
use Monolog\Handler\HandlerInterface;
use Monolog\Logger as BaseLogger;
use Pollen\Support\Concerns\ParamsBagAwareTrait;
use Pollen\Support\Proxy\ContainerProxy;
use Psr\Log\InvalidArgumentException;
class Logger extends BaseLogger implements LoggerInterface
{
... | true |
604144a350cbac42ba3429f545f27c8e5fd5cce6 | PHP | allavore2022/final-project-copy | /model/validate.php | UTF-8 | 3,175 | 2.984375 | 3 | [] | no_license | <?php
class Validate
{
private $_dataLayer;
/**
* Validate constructor.
* @param $_dataLayer
*/
public function __construct()
{
$this->_dataLayer = new DataLayer($dbh);
}
/**
* @param $baseFunds
* @return bool
*/
public function bas... | true |
a71967be827a90742d2f09744c2185fbe59acca8 | PHP | AnikaRaha/AnikaRaha.github.io | /updateOnCalendarChange.php | UTF-8 | 552 | 2.6875 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "todolist";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
//update data
$updateDate = $_POST['d... | true |
87b668349a8688780fe58befdef18e084a8a532f | PHP | estellefay/designpatterns | /j2/adaptateur/exercice/pattern_adaptateur_exercice_canard.php | UTF-8 | 940 | 3.625 | 4 | [] | no_license | <?php
interface CancaneurInterface
{
public function cancaner(): string;
}
class Canard implements CancaneurInterface
{
public function cancaner(): string
{
return 'Coincoin';
}
}
interface AnimalPlastiqueInterface
{
public function emettreUnSon(): string;
}
class CanardEnPlastique imple... | true |
331a4bf03a5596d33257ed1bc9d58c5d94edd405 | PHP | dseegers/Rss-to-Pocket | /valueObjects/Feed.php | UTF-8 | 480 | 2.984375 | 3 | [] | no_license | <?php
namespace Dseegers\ValueObjects;
class Feed
{
private $url;
private $type = 'rss';
public function setUrl($url)
{
$this->url = $url;
}
public function isAtom(): bool
{
return $this->type === 'atom';
}
public function getUrl()
{
return $this->url... | true |
0e361ec0b1e7048d6714e2b448911a5e6a2f1170 | PHP | cleverjack/test_be | /application/src/ApplicationBase/s3_functions.php | UTF-8 | 6,395 | 3.09375 | 3 | [] | no_license | <?php
/**
* Upload image to s3
* @param $imageObject
* @param $newImageName
* @param bool $uploadToTemp
* @param null $imgRealPath
* @param null $targetBucket
*/
function s3upload($imageObject, $newImageName, $uploadToTemp = false, $imgRealPath = null, $targetBucket = null)
{
try {
global $globalCon... | true |