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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ba56f9b555d074d6b9aa4287abf3f5dd963d0abc | PHP | gjportegies/magento-laravel-api | /src/Support/MagentoCategories.php | UTF-8 | 3,161 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Grayloon\Magento\Support;
use Grayloon\Magento\Magento;
use Grayloon\Magento\Models\MagentoCategory;
class MagentoCategories extends PaginatableMagentoService
{
/**
* The amount of total categories.
*
* @return int
*/
public function count()
{
$categories = (ne... | true |
c3f84474ae00e52461198f2ab7ad9ec3d263e8fb | PHP | Endl13593/laravel-chat | /app/Models/Message.php | UTF-8 | 395 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* Class Message
* @property integer id
* @property integer from
* @property integer to
* @property string content
* @property \DateTime created_at
*/
class Message extends Model
{
... | true |
e0e806731ba7b93ffc8cf925d363ff1b47c08db1 | PHP | melodiebredin/Blog-en-Php | /last-articles.php | UTF-8 | 746 | 3.09375 | 3 | [] | no_license | <h2>Articles récents</h2>
<p>Les 3 derniers</p>
<?php
// Affichage des articles
$articles = "SELECT * FROM articles ORDER BY id DESC LIMIT 0,3";
// Exécution de la requête
$resultat = $connexion->query($articles);
echo "<ul class='articles'>";
// Si il y a au moins 1 article
if($resultat->num_rows > ... | true |
5cdee2124f64230c0b6220b29508bc98a06079f8 | PHP | elernonelma/paraunit | /src/Parser/JSON/GenericParser.php | UTF-8 | 1,678 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Paraunit\Parser\JSON;
use Paraunit\Process\AbstractParaunitProcess;
use Paraunit\TestResult\Interfaces\TestResultHandlerInterface;
use Paraunit\TestResult\Interfaces\TestResultInterface;
use Paraunit\TestResult\MuteTestResult;
use Paraunit\TestResult\TestResultWithMessage;
c... | true |
ded0485c017dc75aee44baa132ffed6484c4ed37 | PHP | kumardurgesh91/Core-PHP-Rest-API-Starter | /lib/DB.php | UTF-8 | 3,676 | 3.078125 | 3 | [] | no_license | <?php
class DB {
private $_pdo, $_query, $_count = 0, $_results = array(), $_lastID = NULL, $_errors = array(), $dbuser, $dbname, $dbpass, $dbhost;
public function __construct($con_data = array()) {
$req_keys = array('dbname', 'dbuser', 'dbpass', 'dbhost');
foreach ($req_keys as $key) {
... | true |
fadf43881772f436bcd4d0337881b636d5902e3e | PHP | SaSDBG/server-utils | /src/SaS/Controller/AbstractController.php | UTF-8 | 1,241 | 2.8125 | 3 | [] | no_license | <?php
namespace SaS\Controller;
use Symfony\Component\HttpFoundation\Request;
use Silex\Application;
/**
* Description of AbstractControler
*
* @author drak3
*/
abstract class AbstractController implements ControllerInterface {
//to be implemented by controllers
protected $route;
protected $... | true |
4a4ddbb62de64f8d67d43d84ffe2c4d2fa4f2a46 | PHP | EvanDarwin/influxdb-php-sdk | /tests/ClientTest.php | UTF-8 | 12,907 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace InfluxDB;
use DateTime;
use DateTimeZone;
use InfluxDB\Adapter\GuzzleAdapter as InfluxHttpAdapter;
use InfluxDB\Options;
use InfluxDB\Adapter\UdpAdapter;
use GuzzleHttp\Client as GuzzleHttpClient;
class ClientTest extends \PHPUnit_Framework_TestCase
{
private $rawOptions;
private $object;
... | true |
c95a25418eaf4872bcfc2dae2b68bb5fe1fac1a7 | PHP | kvasenko/module-contact-us | /src/modules/contact-us/controllers/grid.php | UTF-8 | 955 | 2.5625 | 3 | [] | no_license | <?php
/**
* Grid of contact us messages
* @return closure
*/
/**
* @namespace
*/
namespace Application;
use Bluz\Proxy\Layout;
use Bluz\Proxy\Request;
use Bluz\Controller\Controller;
/**
* @param int $id
* @param string $mark
* @param int $value
*/
return function ($id, $mark, $value) {
/**
* @var ... | true |
533e6760cda820f5f1641e1e99bd7ad1a3f0c3ea | PHP | wehjey/nci-social-api | /app/Libraries/Payment.php | UTF-8 | 3,522 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Libraries;
/**
* Payment integration library for paystack
*/
class Payment
{
/**
* Initialize payment
*
* @return array
*/
public static function make($data)
{
$curl = curl_init();
$sk = config('app.ps_secret'); // Paystack secret key
$url... | true |
e88a714100ce4a38082a8ed11bd650ec44bd4bd7 | PHP | ferdinand066/Teamup | /TeamUp/database/seeders/TeamSeader.php | UTF-8 | 1,519 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use App\Models\Position;
use App\Models\Team;
use App\Models\User;
use DateTime;
use DateTimeZone;
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
use Illuminate\Support\Facades\DB;
class TeamSeader extends Seeder
{
/**
* Run the database seeds.
*
* @r... | true |
8cd3e56a27174b723c924dc0773cf6f3280ee3fe | PHP | sabahya3/rest-api | /api/userDetails/addAddress.php | UTF-8 | 1,417 | 2.640625 | 3 | [] | no_license | <?php
/// required headers
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested... | true |
e768bac298c16f489bdab9b8cee19d91a89a6b46 | PHP | FlorenceJacobs/PDO | /OpenclassRoom/Minichat/minichat_post.php | UTF-8 | 1,349 | 3.03125 | 3 | [] | no_license | <?php
// Effectuer ici la requête qui insère le message
try
{
// On se connecte à MySQL
$bdd = new PDO('mysql:host=localhost;dbname=openclassroom;charset=utf8', 'Florence', 'florence', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
}
catch(Exception $e)
{
// En cas d'erreur, on affiche un message et on arrête... | true |
21d86abe53438ada2e20dcf36dfb991b010f379c | PHP | NouiguesAmira/Projet-marriage | /src/Entity/Salle.php | UTF-8 | 2,398 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\SalleRepository")
*/
class Salle
{
/**
* @ORM\I... | true |
e723611c48d7d5dd083a630f5dc141016fe20552 | PHP | RobinBrandt87/OSS-Web | /src/html_funcs.php | UTF-8 | 38,783 | 2.90625 | 3 | [] | no_license | <?php
include_once "./src/php_funcs.php";
include_once "./src/db_funcs.php";
/*##########################################################################################
function PrintErrorDiv( $errno )
Diese Funktion erzeugt ein gültiges html Div der Klasse error mit Formatierter
Fehlerbeschreibung
Parameter: ... | true |
3c47890d4eb86ed82bb60e78df5ff47a5b8845b1 | PHP | thongnguyen1206/apithuexe | /api/model/kh.php | UTF-8 | 3,449 | 2.734375 | 3 | [] | no_license | <?php
class KhachHang{
private $conn;
public $MaKH;
public $MaTK;
public $TenKH;
public $SDT;
public $DiaChi;
public $Email;
public $SGPLX;
public function __construct($db){
$this->conn=$db;
}
public function read(){
$query="SELECT * FROM khachhang GROUP BY MaKH DESC";
$stmt= $t... | true |
e8463a5a9422c3e4eb312f3ea0e3a263d18d6342 | PHP | pilot114/recombinator | /tests/code/functions.php | UTF-8 | 59 | 2.546875 | 3 | [] | no_license | <?php
function test($x, $y)
{
return $x + $y;
}
| true |
cf3a75f831630002e90c421611a75b7bc645a3d1 | PHP | mrodriguez96/Aegis | /Code/Aegis/uploadimage.php | UTF-8 | 1,693 | 3 | 3 | [] | no_license | <!--
Webpage Name:uploadimage.php
Main Developer: CJ Conti
Primary Function:Uploads an image to a course
-->
<!DOCTYPE html>
<?php
require("adminauth.php");
require("sessionstart.php");
?>
<html>
<body>
<?php
include("header.php");
require("db.php");
if(isset($_POST["coursename"]))
{
$coursename=$_POST["c... | true |
90381b730304fbff5db68cea03ea47f3cf5c1ded | PHP | vincenzo84ve/servicecenter-invepal | /servicecenter/conexion.php | UTF-8 | 743 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class Conexion{
var $conexion_bd;
function conectar(){// Conectar a la base de datos
$this->conexion_bd = pg_connect("host=190.109.100.36 port=5432 dbname=scdat user=postgres password=invepal1nv3p4l") or die('No pudo conectarse: ' . pg_last_error());
// $this->conexion_bd = pg_connect("hos... | true |
dbfc22edd726d58c8dc468053404e5b1e17f18ac | PHP | ASAPUK/Monitoring | /AlertHandlers.php | UTF-8 | 3,330 | 2.84375 | 3 | [] | no_license | <?php
namespace Monitoring;
use Monitoring\Handler\HandlerAbstract;
use Monitoring\Handler\HandlerFactory;
use Monitoring\Handler\HandlerInterface;
use SplObjectStorage;
/**
* Collect Handlers and delegate to each Handler evens
*
* Class AlertHandlers
* @package Monitoring
*/
class AlertHandlers extends Handler... | true |
5e2c65e3c5166823de32dbd5bb95afd9979c230b | PHP | RDario/ProjectPAPW2 | /resources/views/noticia_success_page.php | UTF-8 | 1,656 | 2.546875 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
SESSION_START();
include("conexionBD.php");
$connection = conectarBD();
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Subiendo noticia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content... | true |
428623b81289d90737c5b851276c851841658826 | PHP | CivicInfoBC/MISAMembership | /incphp/key_value.php | UTF-8 | 615 | 3.5 | 4 | [] | no_license | <?php
class KeyValueStore implements IteratorAggregate {
private $vars=array();
public function __set ($name, $value) {
$this->vars[$name]=$value;
}
public function __isset ($name) {
return isset($this->vars[$name]) && !is_null($this->vars[$name]);
}
public functio... | true |
f1b33a203b012697cf2bec016f0a5b57c0b49e0d | PHP | sixdouglas/phpquiz | /src/PhpQuiz/Services/QuestionService.php | UTF-8 | 2,564 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | true |
1dbf53c7051f502dd57bf373e97eb8ad9d8791b9 | PHP | thephpleague/container | /tests/Asset/Bar.php | UTF-8 | 240 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace League\Container\Test\Asset;
class Bar implements BarInterface
{
protected $something;
public function setSomething($something): void
{
$this->something = $something;
}
}
| true |
d1af884b71af679d64a60e624e5a074abb87ffa4 | PHP | giorgiofellipe/seguradora-modro | /seguradora/src/Faderim/Ext/Field/TypeField.php | UTF-8 | 1,991 | 2.515625 | 3 | [] | no_license | <?php
namespace Faderim\Ext\Field;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of TypeField
*
* @author Rick
*/
abstract class TypeField implements \Faderim\Json\JsonSerializable
{
const TYPE_NUMBER = 'number';
const TYPE_TEXT = '... | true |
7a063491691920cc156c65297b6442c2d593cbe4 | PHP | BasvandenMaagdenberg/4S_Handleidingen | /app/Http/Controllers/LocaleController.php | UTF-8 | 686 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class LocaleController extends Controller
{
public function changeLocale($language_slug, Request $request)
{
// Allowed languages
$allowed_languages = array('nl','en');
if( in_array($language_slug, $allowed_languages)... | true |
d4595d99d3c12988d0a76e7678fbde6fc70b158d | PHP | DrPaw/phase-V | /application/models/forum_model.php | UTF-8 | 16,512 | 2.6875 | 3 | [] | no_license | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
/*
* Class will do all necessary action for forum functionalities
*/
class Forum_Model extends CI_Model {
public function getCategories($fields = '', $condition_to_pass = '', $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pa... | true |
80f056ecb3e62c3e0fbb7a7df8d94ff3d8b5c660 | PHP | isharanuwan02/iq_service | /app/Models/RepoIssue.php | UTF-8 | 594 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class RepoIssue
*
* @property int $id
* @property int $issue_id
* @property int $repo_id
* @property int|null $assignee_id
* @property Carbon $created_at
*
* @package App\Model... | true |
4cfbd3fb22966e275e28cd89711025acea340cf0 | PHP | simonkijo/mkombo_university_ | /admin/data/moduleData.php | UTF-8 | 3,955 | 2.65625 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD'] == 'POST'){
if(isset($_POST['sv_modules_b'])){
$programme = "Bachelor Degree";
}else if(isset($_POST['sv_modules_od'])){
$programme = "Ordinary Diploma";
}
$course = $_POST['course'];
$year = $_POST['year'];
$semester = $_POST['semester'];
//counting input f... | true |
708bb359cc0a7e1ba85f13217465bdde701b3ede | PHP | vosidao2408/aptech-php-18-daovs | /php/10-20190703/articles_categories/database/seeds/Article_CategoryTableSeeder.php | UTF-8 | 904 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
use App\Article;
use App\Category;
use Illuminate\Database\Seeder;
class Article_CategoryTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$categories = Category::pluck('id')->toArray();
$articles = Article::pluc... | true |
7dd06a4a8feae7e07959b90045f29a9df5ccc3f1 | PHP | Ingridprog/PHP | /AULAS/aula07/aula07.php | UTF-8 | 663 | 3.6875 | 4 | [] | no_license | <?php
$i = 0;
$tamanho = 10;
$vetor = array($tamanho);
// Precisa de um controle de incremento ou decremento
while($i <= $tamanho){
echo($i." ");
$i++;
}
echo("</br><hr></br>");
// Atribuindo valores num array
$i = 0;
while($i <= $tamanho){
$vetor[$... | true |
2f443c3f4f48ed4fcff8af9b4352901c925a864c | PHP | s0utakada/designPattern | /Composite/index.php | UTF-8 | 722 | 2.71875 | 3 | [] | no_license | <?php
namespace Composite;
require_once 'Group.php';
require_once 'Employee.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$root = new Group('001', '本社');
$root->add(new Employee('00101', 'CEO'));
$root->add(new Employee('00102', ... | true |
d9f81462b0cb739e935c9a584b8238fef05f6f10 | PHP | 995996812/AJAXlearn | /Paging/paging.php | UTF-8 | 1,361 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
//1. 引入分页类
include './page.class.php';
header("content-type:text/html;charset=utf-8");
$servername = '127.0.0.1';
$username = 'root';
$password = '123';
$link = mysqli_connect($servername,$username,$password,'db1');
mysqli_select_db($link,'utf8');//设置字符集
//实现数据分页
//2. 获取总记录条数
$sql = "select *from tab_go... | true |
5434e87d695dc42d6320aa040648f8dbea7e86b1 | PHP | YatY-dev/laravel-nextengine | /src/SystemDelivery.php | UTF-8 | 1,493 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace ShibuyaKosuke\LaravelNextEngine;
use ShibuyaKosuke\LaravelNextEngine\Entities\SystemDelivery\SystemDelivery as SystemDeliveryBase;
use ShibuyaKosuke\LaravelNextEngine\Entities\SystemDelivery\SystemDeliveryDate;
/**
* 発送方法区分情報
*
* Trait SystemDelivery
* @package ShibuyaKosuke\LaravelNextEngine
*/... | true |
d4b3b0724a9e5acf9b98028fdf227948a7d27b7a | PHP | deddleity/mercado-pago | /src/MercadoPago/Entity/Transaction/Operations/IssuerEntity.php | UTF-8 | 1,997 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: diana
* Date: 7/02/17
* Time: 12:38 PM
*/
namespace MercadoPago\Entity\Transaction\Operations;
class IssuerEntity
{
/**
* @var string
*/
protected $id;
/**
* @var boolean
*/
protected $isDefault;
/**
* @var string
*/
... | true |
8a9c4426b7bc2144f4c9b0ea7e414ba5b83eda77 | PHP | bratzelk/soundcloud | /src/Soundcloud/Request/Request.php | UTF-8 | 2,785 | 2.890625 | 3 | [] | no_license | <?php
namespace Njasm\Soundcloud\Request;
use Njasm\Soundcloud\Resource\ResourceInterface;
use Njasm\Soundcloud\UrlBuilder\UrlBuilderInterface;
use Njasm\Soundcloud\Factory\FactoryInterface;
/**
* SoundCloud API wrapper in PHP
*
* @author Nelson J Morais <njmorais@gmail.com>
* @copyright 2014 Nelson J Mor... | true |
c521fee14c791d2b404f6412e4523e6aa79b96ae | PHP | Nadeemkhattak/wordpress | /wp-content/themes/eduma/elementor-addons/elements/icon-box/icon-box.php | UTF-8 | 20,771 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-2.0-or-later"
] | permissive | <?php
namespace Elementor;
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Thim_Icon_Box_El extends Widget_Base {
public function get_name() {
return 'thim-icon-box';
}
public function get_title() {
return esc_html__( 'Thim: Icon Box', 'eduma' );
}
public function get_icon() {... | true |
f42f7bcc791fdcabaf07947452853ad38fd9e250 | PHP | iwebwork/agComercial | /php/addPetCli.php | UTF-8 | 1,564 | 2.546875 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
include_once 'classes/pet.class.php';
include_once 'classes/proprietario.class.php';
include_once 'classes/usuario.class.php';
$usuario = new Usuario();
$usuario->verificacaoLogin();
$animal = new Pet();
$proprietario = new propr... | true |
5ba0d725c046e8751e91bee188ededa93721d037 | PHP | andri000me/rekam-jasa-fotocopy | /config/function.php | UTF-8 | 4,135 | 2.734375 | 3 | [] | no_license | <?php
function session_timeout(){
//lama waktu 30 menit = 1800
if(isset($_SESSION['LAST_ACTIVITY'])&&(time()-$_SESSION['LAST_ACTIVITY']>1800)){
session_unset();
session_destroy();
header("Location:".$base_url."login.php");
}$_SESSION['LAST_ACTIVITY']=time();
}
function delMask( $str ... | true |
79b64ae79fb8c3c49fa8df70b512eb7b4c5d48dd | PHP | umpirsky/Extraload | /src/Extraload/Extractor/CsvExtractor.php | UTF-8 | 1,029 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Extraload\Extractor;
class CsvExtractor implements ExtractorInterface
{
private $file;
public function __construct(\SplFileObject $file, $delimiter = ',', $enclosure = '"')
{
$this->file = $file;
$this->file->setFlags(\SplFileObject::SKIP_EMPTY | \SplFileObject::READ_AHEAD... | true |
d608fa26111f90663c1d365c90780ac6fc085931 | PHP | ArchieSultangazy/topgeneration | /database/migrations/2019_06_20_043431_create_specializations_table.php | UTF-8 | 1,436 | 2.640625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSpecializationsTable extends Migration
{
private $specializations = 'specializations';
private $userSpecializations = 'user_specializations';
/**
* Run the ... | true |
4b8fc7dec4272076dd4447eb48cdc9a5af1febdb | PHP | yuanlingzhi/stevensdota2 | /dota2/service/findpwdserv3.php | UTF-8 | 1,208 | 3 | 3 | [] | no_license | <?php
include_once '../include/DatabaseClass.php';
include_once "RegExp_Judge.php";
function judge_fpnewpass($u, $p, $c)
{
$u=addslashes($u);
$p=addslashes($p);
$c=addslashes($c);
$db=new database();
//regularexpression: check if $p==$c
$flag=verifyfppwd($p,$c);
if($flag!=1)
{
return -1;
}
$db->conne... | true |
65ed9b653efc67dfe5d1197e7db424dbb49079eb | PHP | Eilan51/Pillar | /core/app.php | UTF-8 | 1,044 | 2.84375 | 3 | [] | no_license | <?php
namespace Core;
use Core\Service\Container;
use Core\Routing\Router;
use core\Command\Commander;
class App {
private $serverType;
private $config = [];
private $singletons = [];
public function __construct(string $serverType) {
$this->serverType = $serverType;
$this->config = require_once con... | true |
d93afb40b3ac9e503da1f05fdefbd2c7cabccd26 | PHP | nmadariaga/Proyecto-ISW | /app/controllers/FacultadesController.php | UTF-8 | 2,620 | 2.6875 | 3 | [] | no_license | <?php
class FacultadesController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
protected $layout = 'layouts.utem';
public function getIndex()
{
$facultades= Facultades::orderBy('id','DESC')->get();
return $this->layout->content = View::make('facultades.ind... | true |
7e95e2d246dbed47ebec3e736f3cbcb1f6d13464 | PHP | texcanarias/biblioteca-server | /application/models/common_1_0/persistencia/Primitiva_listado_per.php | UTF-8 | 4,552 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace serve\src\common\persistencia;
include_once (__DIR__ . '/Persistencia.php');
include_once (__DIR__ . '/../estructura/Primitiva_listado.php');
use serve\src\common\persistencia\Persistencia;
use serve\src\common\estructura\Primitiva_listado;
/**
* Clase básica de persistencia
*
* @aut... | true |
798dd2f74526987387956ca844260981c7eec8d7 | PHP | Mlapalus/mysite | /mysite-backend/domain/src/Gateway/RealisationGatewayInterface.php | UTF-8 | 380 | 2.5625 | 3 | [] | no_license | <?php
namespace MySite\Domain\Gateway;
use MySite\Domain\Model\Realisation;
use Ramsey\Uuid\UuidInterface;
interface RealisationGatewayInterface
{
public function save(Realisation $realisation): void;
public function getRealisationById(UuidInterface $id): Realisation;
public function update(Realisation $... | true |
f7fc50cc1777ceba4d9ddfa3168cff70381a2acf | PHP | kartemiev/agaga | /agi/module/PbxAgi/src/PbxAgi/TrunkAssoc/Model/TrunkAssocTable.php | UTF-8 | 812 | 2.609375 | 3 | [] | no_license | <?php
namespace PbxAgi\TrunkAssoc\Model;
use Zend\Db\TableGateway\TableGateway;
use Zend\Db\Sql\Select;
class TrunkAssocTable implements TrunkAssocTableInterface
{
protected $tableGateway;
public function __construct(TableGateway $tableGateway)
{
$this->tableGateway = $tableGateway;
}
public function fetchAll(... | true |
f4c54ae409752c64e0cc72901077e71f4c256add | PHP | Filyso/Sprint-2 | /php/scripts/script_musique.php | UTF-8 | 13,410 | 2.6875 | 3 | [] | no_license | <?php
session_start();
header('Content-type: application/json');
if (isset($_POST["function"])) {
switch ($_POST["function"]) {
case "getMusique":
if(isset($_POST['categorie']) && isset($_POST['lang']) && isset($_POST['forbiddenTimeCode'])) {
... | true |
4958bc9a364713d6b510208d2c98e93a04dc0a7c | PHP | amkamrit/newsPortal | /app/Http/Controllers/Admin/AboutController.php | UTF-8 | 2,111 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Model\Admin\About;
use Image;
class AboutController extends Controller
{
public function index(){
$abouts=About::all();
return view('Admin.About.index')
->with('about',$abouts);
... | true |
6dde66d5a3b99a6b67328d785cf961cd1ec58adf | PHP | Jandry-Jimenez/daw2.1-Jandry-Jimenez | /RECU/3-Acceso a BBDD/Agenda/CListado.php | UTF-8 | 1,308 | 3.5 | 4 | [] | no_license | <!-- PARTE PHP -->
<?php
require_once "Conexion.php";
// RECOGE PARÁMETROS
// Es un SELECT con huecos vacíos
$sql = "SELECT id,nombre FROM Categoria ORDER BY nombre";
// Preparo la conexion por seguridad (Convierte el String a objeto)
$select = $conexion->prepare($sql);
// Se ejececuta pas... | true |
daef0bd2a05b17d500a7565ee3ebe4f7c6ae922d | PHP | MobiLifeCompany/DeliveryV2WebAdmin | /backend/controllers/OpeningHoursController.php | UTF-8 | 5,364 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\controllers;
use Yii;
use backend\models\OpeningHours;
use backend\models\Shops;
use yii\data\ActiveDataProvider;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use yii\helpers\ArrayHelper;
/**
* OpeningHoursController im... | true |
dfe25ab98b98ed1a6ea239e93819a3b579c34b10 | PHP | lucasbonanni/Programacion3D.Clases | /Clase2/ClasePersonaAbstracta.php | UTF-8 | 336 | 3.609375 | 4 | [] | no_license | <?php
abstract class Persona{
private $nombreApellido;
private $edad;
private $idioma;
public function __construct($nombre,$edad){
$this->nombreApellido = $nombre;
$this->edad = $edad;
}
public abstract function Hablar($idioma);
public function ToString(){
return $this->nombreApellido." Edad: ".$this-... | true |
b7c03c6c52456cf0152f3ff8387f6efa5c8b4d33 | PHP | nguyentiengiang/s9ProjectAPI | /lib/class.database.php | UTF-8 | 11,871 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Tien Giang Developer
* Email: nguyentiengiang@outlook.com
* Phone: +84 1282 303 100
*/
namespace Database;
use R;
use File\Log;
use \PDO;
use \PDOException;
class RedBean {
const FETCH_ASSOC = 0;
const FETCH_OBJ = 1;
const FETCH_KEY_PAIR = 2;
private $dbDSN = null;
private $dbUs... | true |
384506cf5e2fa8f5b23e6f47e27181cb35f1b8bc | PHP | rdhana/Learning | /PHP_Basics/Chapter 11/php_mysql_delete_2.php | UTF-8 | 1,562 | 3.328125 | 3 | [] | no_license | <?php
// Sample DELETE of user + purchases where you know the name of the user
// constraint = ON DELETE RESTRICT
// database username
$user = 'class';
// database password
$pass = 'password';
// data source = mysql driver, localhost, database = class
$dsn = 'mysql:host=localhost;dbname=class';
// user name delete
$n... | true |
241f83b1e9eabd29728aec11dfe9b4b28f219c8c | PHP | dustinleblanc/postcss | /src/ListUtil.php | UTF-8 | 3,460 | 3.359375 | 3 | [
"MIT"
] | permissive | <?php
namespace PostCSS;
/**
* Contains helpers for safely splitting lists of CSS values, preserving parentheses and quotes.
*
* @link https://github.com/postcss/postcss/blob/master/lib/list.es6
*/
class ListUtil
{
public static function split($string, array $separators, $last = false)
{
$array = ... | true |
153805451567cfd53d0b805d392ff00f1405b85a | PHP | Zkaguluka/Western-Bulls-Rugby | /createTopicValidation.php | UTF-8 | 1,611 | 2.546875 | 3 | [] | no_license | <?php
session_start();
error_reporting(-1);
if ($_SESSION['userId'] == "") {
header("Location: forumTest.php");
exit();
}
if (isset($_POST['forumTopicCreationButton'])) {
if (($_POST['forumTopicTitle'] == "") && ($_POST['forumTopicContent']) == "") {
echo "Please fill in all fields on the previous pag... | true |
c3d9b166dd489fcebcb48ade32d5e9c8a8fb0cdf | PHP | johnnydaniels/agenda | /inserir.php | UTF-8 | 727 | 2.734375 | 3 | [] | no_license | <html>
<head>
<title>Dados do amigo inseridos!</title>
<meta charset="UTF-8" />
</head>
<body>
<?php
$nome=$_GET['nome'];
$mail=$_GET['mail'];
$fone=$_GET['fone'];
$aniver=$_GET['aniver'];
if ($nome=="" or $mail=="" or $fone=="" or $aniver=="")
print("Faltou preencher algum campo...");
else
{
require("conec... | true |
afb3a52a6de186bab511040abfd33052408edf1e | PHP | AMG9980/integration | /div/finalcheckout (2).php | UTF-8 | 1,786 | 2.53125 | 3 | [] | no_license | <?php
session_start();
include 'commande.php';
include 'livraison.php';
include 'achat.php';
function afficherliv(){
$c = new livraison(1,1,1,1);
return $result=$c->affichertout();
}
function affichercom(){
$c = new commande(1,1,1,1,1);
return $result=$c->affichertout();
}
function ajoutercommande(stri... | true |
82e6be93d398a0cd96805942b2003bb09ddfe925 | PHP | ridewing/wp-superpowers | /Core/SuperRouter.php | UTF-8 | 820 | 2.9375 | 3 | [] | no_license | <?php namespace SuperPowers\Core;
abstract class SuperRouter {
static $routes = array();
abstract function register();
/**
* @param string $type
* @param string $subview
*/
function registerSubview($type, $subview) {
$type = strtolower($type);
$subview = strtolower($subview);
// Will result in Ex. ... | true |
0bbb601e8340803aabba3460fca6682422dc0e2f | PHP | ollie/donkey | /test/lib/ControllerTest.php | UTF-8 | 2,858 | 2.578125 | 3 | [] | no_license | <?php
class PagesController extends App\Controller
{
public function index()
{
}
public function show()
{
$this->render('index');
}
public function test()
{
$this->setLayout('test');
$this->render('index');
}
public function whatever()
{
$this->view()->title = 'Awesome Title';... | true |
3fab814277a76817cea9f7de43f88db8f1edf66f | PHP | workbgm/workbgm-cms | /application/api/model/Banner.php | UTF-8 | 844 | 2.578125 | 3 | [] | no_license | <?php
/**
* WORKBGM开发框架
* User: 吴渭明
* Date: 2017/6/5
* Time: 下午2:48
* For:
*/
namespace app\api\model;
use app\common\exception\ShopCategoryMissException;
class Banner extends BaseModel
{
protected $hidden = ['delete_time','update_time'];
/**
* 通过ID获取banner
* @param $id
* @return false|... | true |
ee90e37779339af2f9c5be2c09c875ca5dafa90a | PHP | phan/phan | /tests/files/src/0502_param_default.php | UTF-8 | 215 | 3 | 3 | [
"Apache-2.0",
"ISC",
"BSD-3-Clause",
"MIT"
] | permissive | <?php
class Example502 {
const DEFAULT = 'x';
public static function test($x = self::DEFAULT) {
var_export($x);
}
}
Example502::test();
Example502::test('y');
Example502::test(new stdClass());
| true |
946db733fccf283726a5c369311bc11866e9e00a | PHP | FernandoGomezS/Control-Presupuesto | /database/seeds/HealthsSeeder.php | UTF-8 | 1,222 | 2.609375 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Health;
class HealthsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$health = new Health();
$health->name = 'Fonasa';
$health->save();
$healt... | true |
0611a64f99f4c6eb4bd5e20d2e72c48ca7c4ebad | PHP | parselynk/chatbot | /app/Ticket.php | UTF-8 | 1,584 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Client;
use App\Assignee;
use Carbon\Carbon;
class Ticket extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'id', 'body', 'department_id','client_id','t... | true |
187d3434e3393e559daee12d3c1731b7d5e444d0 | PHP | NorhanFoda/albom | /app/Repositories/Eloquent/BaseRepository.php | UTF-8 | 17,258 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Eloquent;
use App\Repositories\BaseRepositoryInterface;
use phpDocumentor\Reflection\Types\Collection;
abstract class BaseRepository implements BaseRepositoryInterface
{
protected $model;
/**
* insert new model to database
* @params $data => array of columns names... | true |
44dc72c39a3d1ea1e9292986de96df44d44cb824 | PHP | xyrit/cgyyg1.0 | /Application/Home/Controller/StatisticsController.class.php | UTF-8 | 13,883 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2016/3/9
* Time: 14:56
* 数据统计接口
*/
namespace Home\Controller;
use Think;
header("Access-Control-Allow-Origin:*");
class StatisticsController extends HomeController
{
private $redis;
public function __construct()
{
... | true |
e129b6641c1beef99aae1b15e828b8b94610d018 | PHP | nicolasbustosalarcon/soccer | /app/Http/Controllers/RegistroApiController.php | UTF-8 | 2,127 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use Illuminate\Support\Facades\Hash;
use App\Role;
use App\RoleUser;
use DB;
class RegistroApiController extends Controller
{
public function index()
{
$usuarios = User::all();
return response()->json($usuarios,200)... | true |
af9f4683733bd2f5172cf1b22264034719ff86a1 | PHP | cronomst/wtf | /play/game.php | UTF-8 | 10,061 | 2.6875 | 3 | [] | no_license | <?php
session_start();
require_once('../bootstrap.php');
$wtfConfig = Configuration::getInstance();
$wtfGameState = GameState::getInstance();
$wtfChat = Chat::getInstance();
define("MAX_PLAYERS", $wtfConfig->get('game.max_players')); // Max players per room
define("MAX_TOTAL_PLAYERS", $wtfConfig->get('game.max_total... | true |
e42385963f43335946d000ddf22b9976d2eed983 | PHP | Peter-Duxter/Hubot-Extendable-Brain | /brain/britishme/britishme.php | UTF-8 | 2,839 | 2.6875 | 3 | [] | no_license | <?php
/**
* This file wasn't included in the british.php brain script mainly
* because simple_html_dom doesn't work very nicely with already instantiated
* objects and I was too lazy to re-write it.
* Will do so in a future version.
* As of 3/13/2012 this file is guarunteed to work,
* we use it to help translate what ... | true |
961afb6e86ec8ab43581b1eec1344d204a78c8a3 | PHP | deminua/design | /app/Project.php | UTF-8 | 1,846 | 2.59375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Carbon;
class Project extends Model
{
protected $table = 'projects';
protected $fillable = [
'code',
'name',
'path',
'city',
'district',
'address',
'phone',
'description',
... | true |
c2cb2f285f09748af38db0f5185ecf53895a7970 | PHP | opsway/hr-test-2 | /phpunit/Checker/Test_Checker_D.php | UTF-8 | 1,922 | 2.6875 | 3 | [] | no_license | <?php
class Test_Checker_D extends PHPUnit_Framework_TestCase
{
protected function setUp()
{
$this->assertFileExists($file = __DIR__ . '/../../test/D/IReader.php');
include_once $file;
$this->assertTrue(interface_exists('IReader'), 'interface IReader not exists');
$this->assert... | true |
a161647c7523d982a2c98d0ddbc5c0b62909fee6 | PHP | CorWatts/yii2-markdown-files | /commands/BlogController.php | UTF-8 | 1,032 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace corwatts\MarkdownFiles\commands;
use \yii\helpers\BaseConsole as Console;
/**
* Creates a new blog post
*/
class BlogController extends \yii\console\Controller {
public $defaultAction = 'create';
public $title;
/**
* Creates a new blog post
*/
public function actionCreate($title) {
... | true |
f5861e9fe652b5819cacff33608b7640818fe545 | PHP | archistico/StudioMedico | /lib/accesso.php | UTF-8 | 4,389 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
/* --------------------------------------
* CLASS ACCESSI
* --------------------------------------
*/
class Accesso {
public $accessoid; // int
public $cookiename; // string
public $utentefk; // int
public $utentetipologia;// string
public $data; // timestamp
publi... | true |
174a0f50f4f73b047133a46e5ab4e5779e27aa30 | PHP | sm2x/magento1-extension | /app/code/community/Ess/M2ePro/Model/ControlPanel/Inspection/Result.php | UTF-8 | 1,961 | 2.71875 | 3 | [] | no_license | <?php
/*
* @author M2E Pro Developers Team
* @copyright M2E LTD
* @license Commercial use is forbidden
*/
class Ess_M2ePro_Model_ControlPanel_Inspection_Result
{
const STATE_ERROR = 40;
const STATE_WARNING = 30;
const STATE_NOTICE = 20;
const STATE_SUCCESS = 10;
/** @var Ess_M2... | true |
734a30c7177d64847e960633b9470d45cfe5ca7e | PHP | lolibrary/lolibrary | /web.sakura/app/Models/Traits/Images/ImagePaths.php | UTF-8 | 2,664 | 2.9375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace App\Models\Traits\Images;
use Storage;
trait ImagePaths
{
/**
* Override the usual route to an image.
*
* @return string
*/
public function getImageUrlAttribute()
{
return Storage::url($this->getImagePath());
}
/**
* Link to the thumbnail for this... | true |
326f1aa495905dcfe503eca50310319ccd258a36 | PHP | joshrp/bowling-game | /index.php | UTF-8 | 3,385 | 3.171875 | 3 | [] | no_license | <?php
require_once('Player.php');
class PlayerTest extends PHPUnit_Framework_TestCase
{
public $player;
public function setUp(){
$this->player = new Player;
}
/**
* Test a simple score
*/
public function testSimples()
{
$this->player
->addRoll(7)
->addRoll(2);
$this->assertEquals(9, $this->playe... | true |
b7f56e819d56633eef2907ef2d0217022bbfe551 | PHP | zjutjh/JingHongBBS-Server | /app/Ucenter/Authcode.php | UTF-8 | 2,715 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright (C) 2020 Tencent Cloud.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | true |
41920b03468318aa0ae734f906c0d34eb45fdc32 | PHP | Teooo/PHP | /PHP Flow Control/SquareRootSum.php | UTF-8 | 441 | 3.515625 | 4 | [] | no_license | <table border="1">
<tr><th>Number</th><th>Square</th>
<?php
$sum=0;
for($i=0 ; $i<= 100; $i++) :
if($i% 2==0):?>
<tr>
<td> <?= $i?> </td>
<td>
<?php
echo (float)number_format(sqrt($i),2);
$sum +=(float)number_format(sqrt($i),2);
?>
... | true |
3a2dd54e77354ee56cf768e0a4344f8eed4a21bc | PHP | kotopheiop/bitrix-core | /modules/translate/lib/controller/asset/extract.php | UTF-8 | 3,784 | 2.515625 | 3 | [] | no_license | <?php
namespace Bitrix\Translate\Controller\Asset;
use Bitrix\Main;
use Bitrix\Main\Error;
use Bitrix\Main\Localization\Loc;
use Bitrix\Translate;
/**
* Harvester of the lang folder disposition.
*/
class Extract
extends Translate\Controller\Action
implements Translate\Controller\IProcessParameters
{
u... | true |
3f6dde1e78c46dc2b129cda12778c265b5f2c7f7 | PHP | Jake0666/Millar_J_Degroote_S_3012_CMS | /admin/admin_login.php | UTF-8 | 1,050 | 2.84375 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$ip = $_SERVER["REMOTE_ADDR"];
//echo $ip;
require_once("phpscripts/init.php");
if(isset($_POST['submit'])){
$username = trim($_POST['username']);
$password = trim($_POST['password']);
if($username != "" && $password != ""){
... | true |
3f68f7c011d578cf1507cff1da7e467cd166af8f | PHP | compact/refiler | /app/classes/Auth.php | UTF-8 | 4,439 | 2.78125 | 3 | [] | no_license | <?php
namespace Refiler;
/**
* This class wraps around Sentry for use in Refiler.
*/
class Auth {
// injected dependencies
protected $config;
protected $db;
// Sentry User object
protected $user;
/**
* Load Sentry and set the current user (if logged in).
* @param array $config Must contain keys ... | true |
24a35b3c7f0ca7f7a4de60c147e34ad12e0af3b3 | PHP | RANDIRAMLAN/PHP_Dasar | /Pertemuan_18/registrasi.php | UTF-8 | 883 | 2.734375 | 3 | [] | no_license | <?php
require "functions.php";
if ( isset($_POST["register"])){
if (registrasi($_POST) > 0){
echo "Registrasi Berhasil";
header ("Location: login.php");
exit;
} else {
mysqli_error($conn);
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Registrasi</title>
</head>
<body>
<h1>Halaman Registrasi</h1>
<... | true |
f42c9fdf46a68e25e8fe9979e9e18e3419b64b01 | PHP | inser7/google-api | /src/Service/GoogleService.php | UTF-8 | 663 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Utils\Book;
use App\Utils\BookSetting;
use App\Utils\WebClientInterface;
class GoogleService implements ServiceInterface
{
public $webclient;
public function __construct(WebClientInterface $webclient)
{
$this->webclient = $webclient;
}
public functi... | true |
823ea2c575d21bc51d8a588d2a71421f962a2d9d | PHP | ulpian/react-with-mouse | /src/mouse/cheese/murl.php | UTF-8 | 647 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
// curl class
class murl
{
// the curl opt
private $curlop_init;
private $curlop_url;
private $curlop_head;
private $curlop_retran;
// get contents
function get_cont($url)
{
// init
$this->curlop_init = curl_init();
$this->curlop_head = 0;
$this->curlop_retran = 1;
// set options
curl_se... | true |
56293440feb224ec6d672a67b1ccb16ceffb4a85 | PHP | jocoonopa/WeCareKids | /app/Model/AmtCategory.php | UTF-8 | 3,475 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class AmtCategory extends Model
{
const RECURSIVE_CURRENT_KEY = 'content';
const RECURSIVE_CHILD_KEY = 'child';
const STEP_ROOT_ID = 0;
const STEP_STAT_ID = 2;
const ID_FEEL_INTEGRATE = 4;
const ID_ROUGH_ACTION = 5;
prot... | true |
848829f40c6c630e055a328d271955aeb978f87a | PHP | Boutemine-Mouna/Web-messaging-application-for-SEAAL | /web messaging application for SEAAL/notification.php | UTF-8 | 2,128 | 2.65625 | 3 | [] | no_license | <?php
//PHPMailer library
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require_once 'PHPMailer/src/Exception.php';
require_once 'PHPMailer/src/PHPMailer.php';
require_once 'PHPMailer/src/SMTP.php' ;
/**********fonction d'envoi de mails à une personne*****/
function mailSend($data,$address)
{
... | true |
42231702a88b1cda5fd5f7bdb1a7c5aa401f5e4b | PHP | automatweb/automatweb_sales | /classes/core/users/user_manager_obj.aw | UTF-8 | 3,844 | 2.71875 | 3 | [
"CC-BY-3.0"
] | permissive | <?php
class user_manager_obj extends _int_object
{
const CLID = 1003;
private $active_user = "";
public static function add_user($uid)
{
try
{
$user = obj(null, array(), $uid);
}
catch (Exception $e)
{
}
}
public static function delete_user()
{
}
/** Finds/creates special system group for n... | true |
4cee28a02bb2f7059031b9881a7b3476d0e2ece9 | PHP | ivan-stepaniuk/functions_forms_tasks | /2/form.php | UTF-8 | 497 | 3.0625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ivan
* Date: 25.11.16
* Time: 22:14
*/
if(!empty($_POST['text'])) {
longWords($_POST['text']);
}
function longWords($a) {
$arr[]='';
$text = explode(" ",$a);
$count = count($text);
for ($i=0; $i<$count; $i++) {
$arr[strlen($text[$i]... | true |
d24599c0caa7547414413344f6e8973b3a925cab | PHP | mahmoud-hassan-abdelhamid/Pathology-Lab | /app/Result.php | UTF-8 | 1,571 | 2.53125 | 3 | [] | no_license | <?php
namespace App;
use App\User;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\Result\Result
*
* @mixin \Eloquent
* @property integer $id
* @property integer $test_id
* @property string $title
* @property string $value
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_a... | true |
6ca6e1d40c7ae83bc17113c4b99ac62ca6c1c86d | PHP | tfagit/quotes | /functions.php | UTF-8 | 4,085 | 2.90625 | 3 | [] | no_license | <?php
require 'config.php';
require 'pages.php';
// Cria o menu de navegação, usado no header
function print_nav($pagelist, $siteconf){
foreach ($pagelist as $key => $page) {
if ($key != '404' && $key != 'single' && $key != 'edit') {
echo '<li><a href="/'. $siteconf['location'] .'?page=' . $key . '">' . ... | true |
02017e3297d2ee403cbc3a7c5501c94c0a8d6a12 | PHP | leifos-gmbh/4_2_lm_overlay | /Services/Calendar/classes/iCal/class.ilICalItem.php | UTF-8 | 2,839 | 2.75 | 3 | [] | no_license | <?php
/*
+-----------------------------------------------------------------------------+
| ILIAS open source |
+-----------------------------------------------------------------------------+
| Copyright (c) 1998-2006 ILIAS open source, University of Cologne ... | true |
bd8fb7d6f50814d05d68f731436e5b1d8f1cd091 | PHP | RichOmaar/Services-Modapp | /model/productsImages.model.php | UTF-8 | 2,936 | 2.859375 | 3 | [] | no_license | <?php
require_once 'connection.php';
class modelProductsImages {
public function mdlAddProducImage($imageUrl, $idProduct, $ordering) {
$db = new Connection();
$connection = $db -> get_connection();
$sql = "INSERT INTO product_images (imageUrl, id_product, ordering) VALUES (:imageUrl, :... | true |
c335a4cbeaeeac90ddf7a5c161909e4cc267adb7 | PHP | kleosolucoes/ubiquitous-memory | /module/Application/src/Application/Model/Entity/Categoria.php | UTF-8 | 2,736 | 2.578125 | 3 | [] | no_license | <?php
namespace Application\Model\Entity;
/**
* Nome: Categoria.php
* @author Leonardo Pereira Magalhães <falecomleonardopereira@gmail.com>
* Descricao: Entidade anotada base para o categoria
*/
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Application\Form\KleoForm;
use Z... | true |
96eef7ecdecb2f76b9a0d4601e00af6078187165 | PHP | iamfil/netForum-xWeb-APi | /netForum/xWeb/Xml/Generated/WEBEmailGetEmailsByCustomerResponse.php | UTF-8 | 1,096 | 2.640625 | 3 | [] | no_license | <?php
namespace netForum\xWeb\Xml\Generated;
class WEBEmailGetEmailsByCustomerResponse
{
/**
* @var WEBEmailGetEmailsByCustomerResult $WEBEmailGetEmailsByCustomerResult
*/
protected $WEBEmailGetEmailsByCustomerResult = null;
/**
* @param WEBEmailGetEmailsByCustomerResult $WEBEmailGetEmail... | true |
f2ac780d94d947590f3f69c15de6ab3e8b783fda | PHP | XavierDum/gbaf | /connexion_traitement.php | UTF-8 | 1,027 | 2.75 | 3 | [] | no_license | <?php
//connexion à la base de donnée
include 'connexion_bdd.php';
//selection des champs pour ouvrir une session
$req = $bdd->prepare('SELECT id_user, nom, prenom, username, password, question, reponse FROM utilisateur WHERE username= ?');
$req->execute(array
($_POST['username']
));
$resultat = $req->fetch();
... | true |
2f95b64faf616f5ca82523785da2aba5154443f0 | PHP | isabel7344/vallenteExpertisePhp | /modeles/CalendrierSession.php | UTF-8 | 3,310 | 3.359375 | 3 | [] | no_license | <?php
class CalendrierSession
{
/**
* Index of the current month
*/
private $currentMonthIndex;
/**
* Name of the current Month
*/
private $currentMonthName;
/**
* Array of all the month
*/
private $months;
/**
* Current year in the calendar
*/
... | true |
17f6246faebfc41aff502d8c5b04e55278c29ac9 | PHP | craigy-waigy/medicalProject | /Http/Controllers/Api/GeoIp/GeoIpController.php | UTF-8 | 5,752 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api\GeoIp;
use App\Exceptions\UnsupportLocaleException;
use App\Models\City;
use App\Models\Country;
use App\Models\Region;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Eseath\SxGeo\SxGeo;
class GeoIpController extends Controller
{
/**
* @api {ge... | true |
9a27f1638375c0bf46bea51cf6fb2e0c9c2604bc | PHP | hecktorvn/API-creator | /controller/system/database/Join.class.php | UTF-8 | 1,111 | 2.8125 | 3 | [] | no_license | <?php
require_once 'Model.class.php';
class Join extends Model {
private $left = false;
private $on = [];
function __construct(string $table, array $columns, array $on=null, $left=null) {
$this->columns = $columns;
$this->table = $table;
$this->left = $left;
$this->on = $on... | true |
12fc01bfb748383b9e3f2e058a9a36fea4beeda6 | PHP | flavorzyb/simple | /src/Http/Request.php | UTF-8 | 1,443 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: flavor
* Date: 15/8/24
* Time: 上午12:45
*/
namespace Simple\Http;
class Request
{
/**
* get method
*/
const GET = "GET";
/**
* post method
*/
const POST = "POST";
/**
* get value
* @param string $key
* @param mixed $... | true |
9912086a37120763365b48b8b908a7c6bb1ab036 | PHP | sky8652/chatbot | /src/Chatbot/Framework/Bootstrap/LoadConfiguration.php | UTF-8 | 3,057 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class LoadConfiguration
* @package Commune\Chatbot\Framework\Bootstrap
*/
namespace Commune\Chatbot\Framework\Bootstrap;
use Commune\Support\Option;
use Psr\Log\LoggerInterface;
use Commune\Container\ContainerContract;
use Commune\Chatbot\Blueprint\Application;
use Commune\Chatbot\Framework\Exception... | true |
4db0322b0ce628123bb6e50f626ebef900101514 | PHP | WildCodeSchool/orleans-0919-php-toilettage | /src/Controller/CategoryController.php | UTF-8 | 2,651 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Model\AnimalManager;
use App\Model\CategoryManager;
/**
* Class RaceController
*
*/
class CategoryController extends AbstractController
{
/**
* Display item listing
*
* @return string
* @throws \Twig\Error\LoaderError
* @throws \Twig\Error\Runti... | true |