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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f7929611fdef16be75ded315d3324d0a047fcad8 | PHP | noud/images | /app/DataTypes/ImageDataType.php | UTF-8 | 224 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\DataTypes;
class ImageDataType
{
public $shortcut;
public $src;
public function __construct($shortcut, $src)
{
$this->shortcut = $shortcut;
$this->src = $src;
}
}
| true |
6dcc5c4f24e5a2fb499bfe28d6a715f12145475b | PHP | vixivixi/homesmile | /src/index.php | UTF-8 | 1,357 | 2.515625 | 3 | [] | no_license | <?php
/**
* This file index image dir and produce js file
*
* @category Array_Processing
* @package Pagepackage
* @author Display Name <vx@ice07.ru>
* @license NoLicense
* @version GIT: $Id$ In development. Very unstable.
* @link NoLink
*
*/
require 'commands/main_class.php';
$IMGDIR = 'img/';
$J... | true |
30abc1fbfc559557155b348487e9b6ec7219871a | PHP | LorisVenturelli/Lyber | /common/components/Encryption.php | UTF-8 | 808 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Lyber\Common\Components;
use PHPEncryptData\Simple;
class Encryption {
protected static $instance;
private static function init(){
if(is_null(self::$instance)){
$encryptionKey = Config::get('encryption','key');
$macKey = Config::get('encryption','mac');
... | true |
c70775ad72a262401c99ee1b7ad0f64165419bf6 | PHP | apitude/apitude | /src/API/Helper/APIEntityHelperTrait.php | UTF-8 | 522 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Apitude\Core\API\Helper;
use Apitude\Core\Entities\AbstractEntity;
trait APIEntityHelperTrait
{
protected function getEntityClassFromType($entityType)
{
return str_replace('.', '\\', $entityType);
}
protected function getEntityTypeFromClass($entityClass)
{
return s... | true |
b2d53a79a6ce1c42c2998c3f06f07e6c7c8e808d | PHP | ricardorohde/PDOEasy | /examples/update.php | UTF-8 | 609 | 2.609375 | 3 | [] | no_license | <?php
define('DS', DIRECTORY_SEPARATOR);
define('DATA_BASE', [
'host' => 'localhost',
'db' => 'tutoriais',
'user' => 'root',
'psw' => '',
]);
require_once dirname(__DIR__) . DS . 'source' . DS . 'Models' . DS . 'Database' . DS . 'PDOEasy.class.php';
use Models\Database\PDOEasy;
$conn = new PDOEasy(... | true |
4b9306782c4dc822a98687a9f54df993ee69ca63 | PHP | genkgo/mail | /src/Protocol/ConnectionInterface.php | UTF-8 | 1,034 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Genkgo\Mail\Protocol;
use Genkgo\Mail\Exception\SecureConnectionUpgradeException;
interface ConnectionInterface
{
/**
* @param string $name
* @param \Closure $callback
*/
public function addListener(string $name, \Closure $callback): void;
/**
... | true |
b4c69c7fba36158a256d2006a8f1608e391d88ef | PHP | dianamazid/E-Commerce | /milestone-4/site-files/signupemail.php | UTF-8 | 986 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
// Start the session
require ('PHPMailer/PHPMailerAutoload.php');
function sendConfirmTo($email, $name, $pw) {
$mail = new PHPMailer();
// TODO add the confirmation body of email here
$mail->isSMTP();
$mail->SMTPDebug = 0; // TODO set to zero once debugging is done
$mail->Debugoutput = 'html';
$mail->... | true |
0de235801fb728f18b927c0debf1389e84bb2ae7 | PHP | mmeteore/project-1 | /img/algo.php | UTF-8 | 1,327 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
session_start();
header('Content-Type: image/png'); // type de fichier attendu pour le navigatuer est une image au format png
// Create the image
$imgage = imagecreatetruecolor(85, 20); // la largeur * la longueur
// Create some colors
$white = imagecolorallocate($imgage, 255, 255, 255);
$grey = imagecolo... | true |
666129f1f965b7a756406497c456983bdfac8b9e | PHP | rumansaleem/hele-server | /app/Http/Controllers/PhotoController.php | UTF-8 | 3,756 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Photo;
use App\Place;
use Image;
use Session;
use Redirect;
use Storage;
class PhotoController extends Controller
{
public function __construct(){
$this->middleware('auth');
}
public function index(){
$photos = Photo:... | true |
87ac620e5ffa59275be2b2d2876d7c36fcf13a49 | PHP | blowski/symfony-guestbook | /src/Controller/ConferenceController.php | UTF-8 | 832 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Twig\Environment;
class ConferenceController
{
private Environment $twig;
public function __construct(Environment $twig)
{
$this->twig = $t... | true |
da62b2c009ee6fca9103f93fd3d6951d3d370f7a | PHP | alexandreo/tibia-erig | /src/TibiaErig/spTibBoss.php | UTF-8 | 5,467 | 2.71875 | 3 | [] | no_license | <?php
namespace TibiaErig;
//usage: $table = spTibExperience::getExperienceTable(array('Antica', 'Pacera'));
//if any element in $table has less than 300 entries then there was a pretty serious failure (since it automatically retries)
class spTibBosses {
const PAGES = 0;
const PERPAGE = 0;
const MAXT... | true |
7f83e7dda930b87b9708464f9b0ca2aee6e9ac04 | PHP | NotRyanGithub/courseturtle7 | /Signin.php | UTF-8 | 1,113 | 2.546875 | 3 | [] | no_license | <html>
<body>
<div class="form-container sign-in-container">
<form method="post">
<h1>Sign in</h1>
<input name = "email" type="email" placeholder="Email" />
<input name = "pass" type="password" placeholder="Password" />
<input name="logger" id="submit2" type="submit" value="Sign in">
</form>
</div>... | true |
0c82958433c1d230e81dbd16a858e8caa62c2ce8 | PHP | katzsimon/movies | /_packages/katzsimon/base/src/Models/Model.php | UTF-8 | 3,061 | 2.6875 | 3 | [] | no_license | <?php namespace Katzsimon\Base\Models;
use Illuminate\Support\Str;
class Model extends \Illuminate\Database\Eloquent\Model
{
protected $ui = [];
/**
* Setup and return the UI elements needed
* item = lowercase model name used in bindings
* items = plural item
* name = display name for m... | true |
7cdc90c81ac61a90375a782beec9f702f25316ec | PHP | elemento15/abacont | /php_ci/application/libraries/RptIncomesExpensesPdf.php | UTF-8 | 6,046 | 2.828125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once 'BasePdf.php';
class RptIncomesExpensesPdf extends BasePdf {
private $months, $current_month, $download;
public function __construct() {
parent::__construct();
$this->title = 'Reporte de Gastos vs. Ingresos';
... | true |
683d461dae051b625b210c3dd0d94cc5f19b7341 | PHP | ronakaryana/screen | /application/libraries/form.php | UTF-8 | 15,840 | 2.625 | 3 | [] | no_license | <?php
# AUTHOR : ELIZAR M. FLORES
# CLASS NAME : FORM
# DESCRIPTION : AUTO FORM VALIDATION CLASS AND ERROR REPORT GENERATOR
# INITIALIZE : INCLUDE THE CLASS IN YOUR FILES AND MAKE AN INSTANCE OF THE CLASS
# PARAMETERS : THE CLASS REQUIRES AN ARRAY OF YOUR FORM OBJECTS, SPECIFYING THE TYPES OF VALIDATION TO... | true |
267e7f23fade5ae938ddbf015305d7c2ee2d0198 | PHP | arjzxc000/home-database-app | /index.php | UTF-8 | 4,575 | 2.578125 | 3 | [] | no_license | <?php
require('connection.php');
session_start(); //เปิด session เพื่อดูว่ามี user login เข้ามาไหม
if(!isset($_SESSION['username'])){
header('Location: login.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" con... | true |
6bd1ec39774c7df2d1a2b06fd252f4b63aebd816 | PHP | ahmed2929/HNG-Script | /scripts/Ridwan_Gbadamosi.php | UTF-8 | 279 | 2.578125 | 3 | [] | no_license | <?php
$first_name = "Ridwan";
$last_name = "Gbadamosi";
$hng_id = "HNG-04960";
$email = "ridwangbadamosi@gmail.com";
$language = "PHP";
echo "Hello World, this is " .$first_name." " .$last_name. " with HNGi7 ID " .$hng_id. " and email " .$email. " using " .$language. " for stage 2 task.";
?>
| true |
9b084bb9d38c641b6e37c90b3d24f995d5367547 | PHP | UnitedWeeGo/WeegoAPI | /apiRequestHandlers/participant.class.php | UTF-8 | 4,189 | 2.671875 | 3 | [] | no_license | <?php
header ("Content-Type:text/xml");
require_once "../configuration.php";
foreach(glob("../objects/*.php") as $class_filename) {
require_once($class_filename);
}
require_once '../util/XMLUtil.php';
require_once '../util/request.base.php';
require_once '../util/class.error.php';
require_once '../util/class.uuid.... | true |
f40f3549307dbd0038444adeda88190c6c086004 | PHP | roarkmccolgan/sanika | /app/Console/Commands/UpdateAuth0Token.php | UTF-8 | 1,309 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use App\Auth0Token;
use Illuminate\Console\Command;
use Auth0\SDK\API\Authentication;
class UpdateAuth0Token extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'auth0:token';
/**
... | true |
f40c7e15aee66c64af26ebbbf99fd9f6940a67af | PHP | hexlet-basics/exercises-php | /modules/50-loops/28-build-strings/Test.php | UTF-8 | 321 | 2.796875 | 3 | [] | no_license | <?php
namespace HexletBasics\Loops\ReverseString;
use PHPUnit\Framework\TestCase;
class Test extends TestCase
{
public function test()
{
require 'index.php';
assert(mysubstr('got', 3) === 'got');
assert(mysubstr('got', 2) === 'go');
assert(mysubstr('got', 1) === 'g');
}
}... | true |
c497c805fd941c472c802e66d3b695d12e7243ce | PHP | j-brisbin/brisbin-inf256-final-project | /forumpostmasterpage.php | UTF-8 | 3,175 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
require_once("ForumPost.php");
require_once("ForumReplies.php");
require_once("ForumTopic.php");
require_once("ForumUser.php");
session_start();
$errorMessage = "";
if(isset($_POST["error"])){
echo $errorMessage = $_POST["error"];
}
$postQuery = "?postid=" . $_GET["postid"] . "&topicid=" . $_GET["topicid"];
?... | true |
08d8eeb59d5433f3bf5c64739a804d81f4f1d345 | PHP | scorp7mix/t4.sprint.final | /protected/Modules/Admin/Controllers/Products.php | UTF-8 | 2,248 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Modules\Admin\Controllers;
use App\Models\Category;
use App\Models\Product;
use T4\Core\Exception;
use T4\Core\MultiException;
use App\Modules\Admin\Components\Controller;
class Products
extends Controller
{
public function actionDefault()
{
$this->data->items = Product::findAl... | true |
6db6640acca8a5d161bdb955efda027ba1313fbb | PHP | jcove/zmshop | /app/Services/ConfigService.php | UTF-8 | 482 | 2.53125 | 3 | [] | no_license | <?php
/**
* Author: XiaoFei Zhai
* Date: 2018/10/9
* Time: 14:28
*/
namespace App\Services;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class ConfigService
{
public static function load(){
if (Schema::hasTable('configs'))
{
$configs ... | true |
306a64cdc8387b051214eadb2d73ad17fac9b33c | PHP | webtoolkit/invitious | /src/Invitious/Invitious.php | UTF-8 | 2,100 | 3.203125 | 3 | [] | no_license | <?php
namespace Invitious;
use Invitious\Keygens\BoyNameKeygen;
use Invitious\Keygens\EnglishWordKeygen;
use Invitious\Keygens\GirlNameKeygen;
/**
* Keygen Factory
*
* @author Jeroen Visser <jeroenvisser101@gmail.com>
*/
class Invitious
{
/**
* Types
*/
const ENGLISH_WORD_GENERATOR = 'english_w... | true |
a360e9d1c9c12baa4995c444f10ab0d46187c72b | PHP | VictorAlagwu/lumenauth | /app/Domain/Dto/Request/User/LoginDto.php | UTF-8 | 271 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Domain\Dto\Request\User;
class LoginDto
{
public $email;
public $password;
public function __construct(
string $email,
string $password
) {
$this->email = $email;
$this->password = $password;
}
}
| true |
df745466b450daf67289efe56869c97b5a9aea01 | PHP | ilivanoff/www | /postupayu.ru/www/kit/folded/timeline/TimeLineFoldingBuilder.php | UTF-8 | 897 | 2.59375 | 3 | [] | no_license | <?php
/**
* Расширение {@see TimeLineBuilderBase} для хронологических шкал,
* которые строятся на основе других фолдингов.
*/
abstract class TimeLineFoldingBuilder extends TimeLineBuilderBase {
/** @return TimeLineFolding */
public abstract function getTimeLineFolding();
/** @return TimeLineBuilderPar... | true |
35b60f39e14987b1abd8cac463af933b83c78b85 | PHP | agathaludwig/ifsc-web2-php | /banco de dados/exerc7/listaL4-exerc7.php | UTF-8 | 2,739 | 2.71875 | 3 | [] | no_license | <?php
$nomeDaInclude1 = "dados.conectar.inc.php";
$nomeDaInclude2 = "conectar.inc.php";
$nomeDaInclude3 = "criar-banco.conectar.inc.php";
$nomeDaInclude4 = "useBanco.inc.php";
$nomeDaInclude5 = "definirCharset.inc.php";
$nomeDaInclude6 = "criarTabela.inc.php";
$nomeDaInclude7 = "desconectar.inc.php";
$nomeDaInc... | true |
bd6907f422f38873d97bd673f0d07dd46853029c | PHP | Skylarity/trufork | /public_html/test/user-test.php | UTF-8 | 7,498 | 2.96875 | 3 | [] | no_license | <?php
require_once("trufork.php");
require_once(dirname(__DIR__) . "/php/classes/user.php");
/**
* Full PHPUnit test for the User class
*
* This is a complete PHPUnit test of the user class class. It is complete because *ALL* mySQL/PDO enabled methods
* are tested for both invalid and valid inputs.
*
*
*/
cl... | true |
fb1ac4bf571230fc61a83e70635deda732826a61 | PHP | thoun/lasvegas | /modules/dice.php | UTF-8 | 679 | 3.328125 | 3 | [] | no_license | <?php
class Dice {
public $id;
public $value;
public $placed;
public $player_id;
public $neutral;
public function __construct($dbDice) {
$this->id = intval($dbDice['dice_id']);
$this->value = intval($dbDice['value']);
$this->placed = boolval($dbDice['placed']);
$... | true |
217ac525cab93669be71adac2bfa5c6534bcb31e | PHP | seiferson/user211 | /controller/alumnCtrl.php | ISO-8859-10 | 4,304 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*Universidad de Guadalajara
*Centro Universitario de Ciencias Exactas e Ingenierias
*Programacion Web
*Sistema Universitario de Control Escolar SUCE
*Cuauhtemoc Herrera Muoz
*/
class alumnCtrl{
public function run( $singleton ){
switch( $_GET[ "action" ] ){
case "register":
... | true |
a1e13700ef321906a5a8633faed9aa9e8fa5dfbf | PHP | VicManuel/ProyectoPSW | /horario/formularioHorarioEditar.php | UTF-8 | 913 | 2.515625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>formulario Horario</title>
</head>
<body>
<?php
//obtener el valor de ID que viene del metodo GET a traves de HTTP
$id=$_GET["id"];
include_once("HorarioCollector.php");
include_once("Horario.php");
$HorarioCollectorObj = new HorarioCollector();
$ObjHorario... | true |
33ff1222af7eb3b68874e98a7f8bbefa64452866 | PHP | Novemb3r/nginx-uid-decoder | /lib/Validator.php | UTF-8 | 650 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace NginxUidDecoder;
class Validator
{
/**
* @var string
*/
private const BASE_64_REGEXP = '/^[a-zA-Z0-9\/\r\n+]*={0,2}$/';
/**
* @var string
*/
private const NGINX_UID_REGEXP = '/^[A-Z0-9]{32}/';
/**
* @param string $s
* @retur... | true |
a914a747ac48079dd7fee79533e50c011e26becc | PHP | oldD0g/budget-analysis | /editcats.php | UTF-8 | 2,880 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Edit categories</title>
</head>
<body>
<?php
include 'db.php';
include 'functionsv2.php';
global $dbuser, $... | true |
6ab410779676ebd7280a31c9c867af6534763418 | PHP | Tieson/eco | /api/routes/teacher.php | UTF-8 | 11,028 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Tom on 23.02.2017.
*/
/**
* Created by PhpStorm.
* User: Tom
* Date: 23.02.2017
* Time: 15:23
*/
function teachers()
{
$app = \Slim\Slim::getInstance();
try {
$teacher = requestLoggedTeacher();
} catch (Exception $e) {
$app->response()->setStatus(401);
echo '{"error":{"text":' ... | true |
8664a40b4b95c7c1a29640111c3cc9cf043233a8 | PHP | modstart/ModStartCMS_Laravel9 | /vendor/arvenil/ninja-mutex/src/NinjaMutex/Lock/DirectoryLock.php | UTF-8 | 1,742 | 3.0625 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
/**
* This file is part of ninja-mutex.
*
* (C) Kamil Dziedzic <arvenil@klecza.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace NinjaMutex\Lock;
/**
* Lock implementor using mkdir
*
* @author Jan Voracek <jan... | true |
21110bf001a5545cb425918b4f918e3f7a2035d4 | PHP | tamaskenez/minuniq | /www/common/database.php | UTF-8 | 5,087 | 2.65625 | 3 | [] | no_license | <?php
require_once 'util.php';
class DbConfig
{
const LOCAL_HOST = "localhost";
const LOCAL_USERNAME = "root";
const LOCAL_PASSWORD = "root";
const LOCAL_DB_NAME = "minuniq";
const TEST_DB_NAME = "minuniq_test";
const USE_TEST_DB_FIELD = "use-test-db";
}
class MySql
{
const ER_DUP_ENTRY =... | true |
ca62b0a4dd7d8473eaa4ce6ed22fc2a53b32f3d6 | PHP | cbulock/Cameron-s-Thoughts | /tools/placement_orphans.php | UTF-8 | 866 | 2.515625 | 3 | [] | no_license | <?php
////////////////////////////////////////////////////////////////////
// This finds any entries in the mt_placement table that don't have
// corresponding entries in mt_entries and prints the entry id's
////////////////////////////////////////////////////////////////////
echo "The following entry ID's are found ... | true |
e08df195a4c4fd456248412b6b18136879b0aca6 | PHP | rkievsky/user-form | /app/exceptions/BasicError.php | UTF-8 | 664 | 3.1875 | 3 | [] | no_license | <?php
namespace exceptions;
abstract class BasicError extends \Exception
{
const UNKNOWN_ERROR_MSG = 'Неизвестная ошибка';
const UNKNOWN_ERROR_CODE = 0;
abstract public static function getErrorMessage(int $code, string $additionalMessage) : string;
/**
* @param int $code
* @par... | true |
2f541c2abe48d5110480394d4dd38222786383ec | PHP | mrfengz/php_practice | /php_library/Exporter.php | UTF-8 | 7,642 | 2.703125 | 3 | [] | no_license | <?php
namespace youmobi;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use Yii;
class Exporter
{
/**
* 导出文件类型
*/
const TYPE_XLSX = 1;
const TYPE_XLS = 2;
const TYPE_CSV = 3;
/**
* 类型map
* @var array
*/
private $typeMaps = [
... | true |
2068b1a3ff32ab6428854b832a4395c28a6f4fd6 | PHP | crodas/php-odm-benchmark | /vendor/mondongo/Mondongo/Mondongo.php | UTF-8 | 8,067 | 2.78125 | 3 | [] | no_license | <?php
/*
* Copyright 2010 Pablo Díez Pascual <pablodip@gmail.com>
*
* This file is part of Mondongo.
*
* Mondongo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License,... | true |
2edbb444076c9005e2b7278a9ba9344ebd6b9996 | PHP | cheongyi/chun_jiang | /test.php | UTF-8 | 2,065 | 2.6875 | 3 | [] | no_license | <?php
// 载入配置文件
include_once './database/config.php';
// 数据库配置
$db_config = $db_argv['localhost'];
$db_host = $db_config['host'];
$db_user = $db_config['user'];
$db_pass = $db_config['pass'];
$db_name = $db_config['name'];
$db_port = $db_config['port'];
// 生成新的数... | true |
8d28f8e9c656c11c710057efba0e90d68dc751bb | PHP | i-ushakov/brainas-web | /tests/codeception/common/unit/models/ConditionTest.php | UTF-8 | 2,199 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: kit
* Date: 11/21/2016
* Time: 7:15 PM
*/
use common\models\Condition as Condition;
use common\models\EventType as EventType;
class ConditionTest extends \Codeception\TestCase\Test {
/**
* @var UnitTester
*/
protected $tester;
public function testS... | true |
c48f19410c32f6855a6830f6c2a47d8dadaf9d65 | PHP | digitalfu/HarvestDemo | /src/Harvest/HarvestService.php | UTF-8 | 370 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Harvest;
use DateTime;
class HarvestService
{
/**
* Get Days Till Harvest
* @param Harvest $harvest
*
* @return int
*/
function getDaysTillHarvest(Harvest $harvest)
{
$today = new DateTime();
$daysTillHarvest = $today->diff($harvest->getDate()... | true |
559568ff77901e2e47b6a01514345a499df4e0d5 | PHP | flaurora-sonora/infini | /wadlof.php | UTF-8 | 19,688 | 2.6875 | 3 | [] | no_license | <?php
// could add in the concept of equipped items to avoid the problem of figuring out which item to attack with if there are multiple enemies. for now, just have single enemies
// damage ranges? (stat ranges in general) to make gameplay more unpredictable (cheap thrills)
// multiple player characters capture enemie... | true |
f4b020bc93917fa227dcc4e5cc2824fcfe2def81 | PHP | zenglingjiao/cinch | /application/helpers/common_helper.php | UTF-8 | 13,092 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
function get_csrf_nonce()
{
$ci = &get_instance();
$ci->load->helper('string');
$key = random_string('alnum', 8);
$value = random_string('alnum', 20);
$ci->session->set_flashdata('csrfkey', $key);
$ci->session->set_flashdata('csrfvalue', $value);
return array($key => $value);
}
funct... | true |
91ce4fde761fd692bb5d6416405e377bd6b5968c | PHP | khangaikh/tester | /user.php | UTF-8 | 746 | 2.59375 | 3 | [] | no_license | <?php
require_once "config.php";
//$date = null;
try {
$stmt = $db->prepare("INSERT INTO users (username, email, password) VALUES (:username, :email, :password");
$stmt->bindParam(':username', $_POST['username']);
$stmt->bindParam(':email', $_POST['email']);
$stmt-... | true |
e49f51a95304344005e2fed36614a64843912ca4 | PHP | kherda/gcloud-docker-v1 | /code/index.php | UTF-8 | 169 | 2.515625 | 3 | [] | no_license | <?php
$redis = new Redis();
//Connecting to Redis server on localhost
$redis->connect('redis', 6379);
$value = $redis->get("ctr");
$redis->incr("ctr");
echo $value;
| true |
61b6c8f9255ae7a813642b0d822197e1e6bbda48 | PHP | DrLokki/mediatheque | /src/controller/BookController.php | UTF-8 | 2,628 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Media\controller;
use Media\model\Repository\RepositoryBook;
function checkAndDontBorrow($buffer)
{
if(!isset($_SESSION['id'])){
$buffer = str_replace('onclick="revelLogin()" type="button"', 'type="submit" value="deconect"', $buffer);
$buffer = str_replace('class="b{{isbn}} p-2 leading-none r... | true |
8a55db5501ae2b281bcb1ce304ad14aa1087ad4a | PHP | TecWebProject/TecWebProject | /profiloGruppo/profiloGruppo.php | UTF-8 | 7,907 | 2.65625 | 3 | [] | no_license | <?php
/* PAGINA PROFILO DI UN GRUPPO */
session_start();
include_once "../lib/php/query_server.php";
include_once "../lib/php/start.php"; //LIBRERIA PER CREARE HEAD
include_once "../lib/php/header.php"; //LIBRERIA PER CREARE HEADER
include_once "../lib/php/menu.php"; //LIBRERIA PER CREARE MENU
include_once "../lib/ph... | true |
0f78b45d6e702a14b0a2ae018140544ed0689d15 | PHP | markmosobo/rental | /app/Repositories/LandlordRepository.php | UTF-8 | 771 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\Landlord;
use InfyOm\Generator\Common\BaseRepository;
/**
* Class LandlordRepository
* @package App\Repositories
* @version June 13, 2018, 3:51 pm EAT
*
* @method Landlord findWithoutFail($id, $columns = ['*'])
* @method Landlord find($id, $columns = ['*'])
* @... | true |
0ced3a03646ead49d0f16ff6da9a49bbfa5f4b6e | PHP | ferneyalejandro1/CreditoMBO | /webServices/Credito.php | UTF-8 | 3,588 | 3.328125 | 3 | [] | no_license | <?php
/**
* Representa el la estructura de los creditos
* almacenados en la base de datos
*/
require 'Database.php';
class Credito
{
function __construct()
{
}
/**
* Retorna en la fila especificada de la tabla 'prestamos'
*
* @param $idCredito Identificador del registro
* @return array Dat... | true |
a860d93d6864b3f62ec29222af3949dba3b01d24 | PHP | jeejeemo/graphykart | /PHP/Apprendre_PHP/jeu.php | UTF-8 | 4,387 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jeanmo
* Date: 24/10/2019
* Time: 14:01
*/
$aDeviner =150;
$error= null;
$success = null;
$value = null;
if(isset($_POST['chiffre'])){
$value = (int)$_POST['chiffre'];
if($value>$aDeviner){
$error = "Votre chiffe est trop grand...";
}elsei... | true |
3bd18cbaabb520ebc49f602b29de386cd202e47b | PHP | akshaypjoshi/swoft-component | /src/task/src/TaskEvent.php | UTF-8 | 578 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php declare(strict_types=1);
namespace Swoft\Task;
/**
* Class TaskEvent
*
* @since 2.0
*/
class TaskEvent
{
/**
* Before task
*/
public const BEFORE_TASK = 'swoft.task.task.before';
/**
* After task
*/
public const AFTER_TASK = 'swoft.task.task.after';
/**
* Befo... | true |
880872e11e019f8cb9fa8652823f4e88d7592e73 | PHP | pedro162/loja_virtual | /app/Controllers/BaseController.php | UTF-8 | 1,674 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Controllers;
use Exception;
use \Core\Database\Transaction;
use Core\Utilitarios\Sessoes;
class BaseController
{
protected $view;
protected $menu;
protected $footer;
public function __construct()
{
$this->view = new \stdClass();
}
public fu... | true |
eb78287f306e329386c8d9a3aaf965683d405cfc | PHP | asimlqt/php-cassandra-client | /src/Cassandra/Cql/Spec/TypeSpec.php | UTF-8 | 3,899 | 3.125 | 3 | [] | no_license | <?php
namespace Cassandra\Cql\Spec;
use Cassandra\Cql\DataStream;
/**
* Type specification.
*
*/
class TypeSpec
{
const CUSTOM = 0x0000;
const ASCII = 0x0001;
const BIGINT = 0x0002;
const BLOB = 0x0003;
const BOOLEAN = 0x0004;
const COUNTER = 0x0005;
const DECIMAL = 0x0006;
const D... | true |
235d8b1cf5c17efe062e197d1aee1e5f012e3251 | PHP | CodePowered/tic-tac-toe | /src/Model/AbstractGame.php | UTF-8 | 1,062 | 2.828125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Model;
use App\Validator as AppAssert;
use Symfony\Component\Validator\Constraints as Assert;
abstract class AbstractGame
{
public const MARK_EMPTY = '-';
public const MARK_CROSS = 'X';
public const MARK_NOUGHT = 'O';
public const VALIDATOR_GROUP_NEW_GAME... | true |
fa84aa029de7aa233d8e1e71c65e9043373124ac | PHP | DenisTsenov/mcf | /login.php | UTF-8 | 1,797 | 2.703125 | 3 | [] | no_license | <?php session_start();
require ('functions.php'); // sql_corect() is used instead mysqli_query() because of utf8 encoding
if($_POST['form_submit'] == 1){
$dbc = db_connect();
$login = data_validated($dbc, $_POST['username']);
$password = mysqli_real_escape_string($dbc, trim($_POST['pass']));
if(strlen($login) >... | true |
5110ac954c39f387b75ef201d0091bbc51024e75 | PHP | kingkool115/LARS2 | /app/Http/Controllers/SurveyController.php | UTF-8 | 7,462 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: User
* Date: 23.05.2017
* Time: 16:15
*/
namespace App\Http\Controllers;
use App\ChapterModel;
use App\QuestionModel;
use App\SurveyModel;
use App\AnswerModel;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Request;
class SurveyController extends Contr... | true |
ef29a6254b39fe02dc91286aa5d78ce0510c75d3 | PHP | JosefSulc/MVCb | /controllers/userController.php | UTF-8 | 917 | 2.65625 | 3 | [] | no_license | <?php
class userController extends baseController {
public function index() {
$this->view->render('loginView', $this->message);
}
public function execute() {
if (Session::getValue('logged')) {
header('Location: http://josefsulc.eu/admin');
exit;
}
if (isset($_POST... | true |
d477b7eaa8d1e0db501b0caf0635bb7ca5ec6401 | PHP | rezamoussavi/MouRe | /trunk/views/biz/publink/publink.php | UTF-8 | 2,377 | 2.640625 | 3 | [] | no_license | <?PHP
/*
Compiled by bizLang compiler version 4.0 [JQuery] (May 5 2011) By Reza Moussavi
Author: Reza Moussavi
Date: 5/12/2011
Ver: 0.1
*/
class publink {
//Mandatory Variables for a biz
var $_fullname;
var $_curFrame;
var $_tmpNode;
//Variables
//Nodes (bizvars)
function __construct($fullname) {
$... | true |
de3efd0652803d77d6a631814fb69f3ea21e37d8 | PHP | Submitty/Submitty | /site/app/entities/VcsAuthToken.php | UTF-8 | 1,851 | 2.8125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace app\entities;
use app\libraries\DateUtils;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* Class GitAuthToken
* @package app\entities
* @ORM\Entity(repositoryClass="\app\repositories\VcsAuthTokenRepository")
* @ORM\Table(name="vcs_auth_tokens")
*/
class VcsAuthToken {
/**
* @ORM\Id... | true |
33888cde5089b2aada5816ca2e4c58e126ff3660 | PHP | anole1982/chatbot | /src/Blueprint/Platform/Packer.php | UTF-8 | 1,442 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of CommuneChatbot.
*
* @link https://github.com/thirdgerb/chatbot
* @document https://github.com/thirdgerb/chatbot/blob/master/README.md
* @contact <thirdgerb@gmail.com>
* @license https://github.com/thirdgerb/chatbot/blob/master/LICENSE
*/
namespace Commune\Blueprint\Platfo... | true |
2d13b4f5bb256d36294a67c93482b454af3f5fa6 | PHP | parkeroth/kansasdelts | /www/classes/DB.php | UTF-8 | 716 | 2.984375 | 3 | [] | no_license | <?php
/**
* DEPRECATED! DON'T USE
* Correct version in /core/classes
*
* Description of DB
*
* @author Parker Roth
*/
class DB {
// TODO: Add functionality for specified environments [local, prod, test, etc]
private $host = 'localhost';
private $database = 'delt';
private $username = 'root';
private $pas... | true |
2922ed90f5d81f66f3419441987e8e5db4fd5bbd | PHP | Ghivan/wordsgames | /_app_files/_includes/classes/database/DBGamesGlobalInfo.php | UTF-8 | 800 | 2.90625 | 3 | [] | no_license | <?php
class DBGamesGlobalInfo extends DB
{
private static $queries = array(
'globalInfo' => 'SELECT id, name, rules, status, author, path FROM games'
);
static function getGlobalInfo(){
try {
$stmt = parent::getConnection()->prepare(self::$queries['globalInfo']);
... | true |
8ef0b6700c2e8067b8b9746da589fece28259cd4 | PHP | sublimino/phpsw | /lib/Fwk/Form.php | UTF-8 | 1,782 | 2.984375 | 3 | [] | no_license | <?php
class Fwk_Form implements ArrayAccess
{
protected $fields = array();
protected $values = array();
public function __construct()
{
$this->init();
}
public function init()
{
}
public function addElement($name, $type, $options = array())
{
$class = sprintf('Fwk_Element_%s', ucwords($type));
$eleme... | true |
2b571d28cb7639dbb0cd00e746ef4de35cfcb150 | PHP | juniorubuntu/Tourisme | /src/voyage/TourismeBundle/Entity/Affiche.php | UTF-8 | 3,157 | 2.5625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace voyage\TourismeBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Description of Affiche
*
* @author atbr
*/
/**
* @ORM\Entity;
*/
class Affiche {
public function __toString() {
return $this->getTitre();
}
/**
... | true |
45d59c5a91bf21694abf3d61e884e71be004a59c | PHP | jarriaga/abba | /app/Http/Models/MongoDb.php | UTF-8 | 1,856 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: jarriaga
* Date: 9/16/15
* Time: 3:59 PM
* Description: This class is the conecction with the Mongo Db database and use
* magic methods to fill the array data with collection in the derivated classes
* Jesus Arriaga - jarriagabarron@gmail.com
*/
namespace App\Http\M... | true |
e63b1fb54cd9d56a93cfb7c5ee994ff24fa26c8f | PHP | eLachmad/GaleriModel | /application/core/arfaModel.php | UTF-8 | 15,539 | 2.984375 | 3 | [
"LicenseRef-scancode-other-permissive",
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class arfaModel extends CI_Model {
/**
* The database table to use.
* @var string
*/
public $table_name = '';
/**
* Primary key field
* @var string
*/
public $primary_key = '';
/... | true |
152ff78375226eda017a2ac9bdd9d13c5cc65b96 | PHP | GiulioUmbrella/FRENT | /frent/CheckMethods.php | UTF-8 | 3,612 | 3.6875 | 4 | [] | no_license | <?php
/**
* Controlla se l'indirizzo e-mail passato come parametro è valido, ovvero è nella forma A@B.C, con A, B, C stringhe e
* che sia di lunghezza inferiore a $lunghezza
* @param string $mail mail da controllare
* @param int $lunghezza lunghezza massima che la mail può assumere
* @return bool sse $mail è un ... | true |
6b5909946a1dbd8a367cd16e1a88b13f827492dd | PHP | wjiec/here | /app/module/admin/controller/SetupController.php | UTF-8 | 2,752 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of here
*
* @noinspection PhpUnused
*
* @copyright Copyright (C) 2020 Jayson Wang
* @license MIT License
* @link https://github.com/wjiec/here
*/
namespace Here\Admin\Controller;
use Here\Admin\Library\Mvc\Controller;
use Here\Library\Blogger\Writer;
use Here\Library\Field\... | true |
c92cb3b35af0af4d527790767de97d1eb9b009eb | PHP | keombre/slim-bootstrap | /app/controller/api.php | UTF-8 | 1,416 | 2.75 | 3 | [] | no_license | <?php
namespace controller;
final class api {
protected $container;
protected $token;
function __construct(\Slim\Container $container) {
$this->container = $container;
}
function __invoke($request, $response) {
$station = $request->getAttribute("station");
$uname... | true |
791e13a072af799f128f5aa611643e0e4dfc91d0 | PHP | nhevan/nhrover | /nhrover/Contracts/RoverHead.php | UTF-8 | 264 | 2.703125 | 3 | [] | no_license | <?php
namespace NHRover\Contracts;
interface RoverHead
{
public function lookStraight();
public function lookUp();
public function lookDown();
public function lookLeft();
public function lookRight();
public function toggleHeadlight();
} | true |
0ee1995122a3343f2253012f2bf783ea8a4b4931 | PHP | felipemarques/firefly-iii | /app/Helpers/Help/Help.php | UTF-8 | 2,465 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Help.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Help;
use Cache;
use League\CommonMark\CommonMarkConverter;
... | true |
5996cbd89f8d48edd053d7fb77f7e3fbe714efce | PHP | bnchdrff/drupalci_testbot | /src/DrupalCI/Plugin/BuildSteps/generic/Drush.php | UTF-8 | 799 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @file
* Contains \DrupalCI\Plugin\BuildSteps\generic\Drush
*/
namespace DrupalCI\Plugin\BuildSteps\generic;
use DrupalCI\Plugin\JobTypes\JobInterface;
/**
* @PluginID("drush")
*
* Processes "[build_step]: drush:" instructions from within a job definition.
*/
class Drush extends ContainerCommand {
... | true |
fe19fb23740bcc8e1ae3ca4dc9bc2c2550d33db1 | PHP | HUNTERS1984/PON | /application/src/CoreBundle/SNS/AbstractPost.php | UTF-8 | 873 | 2.828125 | 3 | [] | no_license | <?php
namespace CoreBundle\SNS;
abstract class AbstractPost
{
/**
* @var string
*/
private $prefix;
/**
* list Post
*
* @param \DateTime $from
* @param \Datetime $to
*
* @return mixed
*/
abstract public function listPost(\DateTime $from, \DateTime $to);
... | true |
95799d45796e2f909aced9f85867b150386f2670 | PHP | met-mw/SLog | /src/SLog/Classes/FileLogger.php | UTF-8 | 755 | 3.0625 | 3 | [] | no_license | <?php
use Psr\Log\AbstractLogger;
use Psr\Log\LoggerInterface;
use SFileSystem\Classes\File;
class FileLogger extends AbstractLogger implements LoggerInterface
{
/** @var File */
protected $FileLog = null;
public function __construct($logFilePath)
{
$this->FileLog = new File($logFilePath);
... | true |
e2a9871266067e91ac0b02dffecfe39ccf826933 | PHP | tchoulom/breengrow-backend | /src/Infrastructure/Symfony/Fixtures/FakerFixtures.php | UTF-8 | 2,023 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Infrastructure\Symfony\Fixtures;
use App\Infrastructure\Symfony\Doctrine\Entity\Company;
use App\Infrastructure\Symfony\Doctrine\Entity\GeoPoint;
use App\Infrastructure\Symfony\Doctrine\Entity\Grower;
use App\Infrastructure\Symfony\Doctrine\Entity\Product;
use App\Infrast... | true |
81eb68ff60266462315d462187ac9cd507e0d15c | PHP | olivier-chatelin/poc_drag_and_drop_db | /src/Entity/Dish.php | UTF-8 | 2,511 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\DishRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DishRepository::class)
*/
class Dish
{
/**
* @ORM\Id
* @ORM\GeneratedValue
... | true |
2227f8717a92e77842ae9fbc58ffd1670c1f34b5 | PHP | SIU-Toba/rest | /src/SIUToba/rest/http/respuesta_rest.php | ISO-8859-1 | 2,793 | 3.015625 | 3 | [] | no_license | <?php
namespace SIUToba\rest\http;
use SIUToba\rest\lib\rest_error;
/**
* Configuraciones comunes de respuestas para REST.
*/
class respuesta_rest extends respuesta
{
protected static $not_found_message = 'No se pudo encontrar el recurso en el servidor';
/**
* GET de un recurso - Devuelve 200 si es e... | true |
9487a69aa5d600a7156036767cc8d8c1b6c9d8fd | PHP | baptistechev/licence-info-montpellier | /HLIN510_Web/TP2/fact.php | UTF-8 | 463 | 3.203125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Fact php</title>
</head>
<body>
<form method="POST" id="form" >
<label for="nb">Entrez un nombre</label>
<input type="number" name="nb" />
<input type="submit" value="envoyer !">
</form>
<p>
<?php
function fact($n){
if($n <= 1)
return 1;
else
re... | true |
2e83df0a82cc11fa9ac0e1fc4e5b933a922f063e | PHP | nishalgurung4/php-2019-gces | /hello.php | UTF-8 | 331 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
<style>
h2{
color:green;
}
h1{
color:red;
}
</style>
</head>
<body>
<?php
$name = "ncit";
if ($name == "gces") {
?>
<h2>Pokhara</h2>
<?php } else {?>
<h1>Kathmandu</h1>
<?php } ?>
<script type="text/javascript">
//alert("hi");
</script>
</bo... | true |
cf8a8f717f08ba810b6f5311700c1655833dfff6 | PHP | samratBizmo007/repoDoc | /src/Controller/.svn/text-base/TitlesController.php.svn-base | UTF-8 | 6,786 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Controller\AppController;
use Cake\Network\Exception\NotFoundException;
/**
* Titles Controller
*
* @property \App\Model\Table\TitlesTable $Titles
*/
class TitlesController extends AppController
{
public function initialize()
{
parent::initialize();
... | true |
f39076e1389e1524245e170b4ffe232d1e2c6112 | PHP | emmanuel-hernandez/PHP_Version | /MVC-Architecture/com/efe13/mvc/commons/api/util/Utils.php | UTF-8 | 1,889 | 2.875 | 3 | [] | no_license | <?php
namespace com\efe13\mvc\commons\api\util;
final class Utils {
const ID_COLUMN_NAME = "id";
private function __construct() {
}
public static function isNegative($number) {
if( !is_numeric( $number ) ) {
return true;
}
return $number < 0;
}
public static function isNull($object) {
retur... | true |
697e217083bff2e8feab19b1a01eb193e92d8380 | PHP | jhustlin/TrackDrive-Call-Metrics | /application/libraries/Iclass.php | UTF-8 | 5,026 | 2.875 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed' );
/*
$this->load->library('image_lib');
$this->load->library('iclass');
$source_image = '';
$new_image = '';
// save resized
$image_size = '300x';
if ($this->iclass->saveResized($source_image, $new_image, $image_size))
{
echo 'ok';
}
// sa... | true |
e2ae0e8240bb4ba83228c7ec9ccc71af5e0c6df9 | PHP | WxBarbosa/conceito | /models/shop_model.php | UTF-8 | 869 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
class Shop_Model extends Model{
function __construct(){
parent::__construct();
}
public function GetProductsBySubCategoryId($id){
$sth = $this->db->prepare("SELECT prod.id AS id, prod.nome AS nome, prod.preco AS preco, prod.imagem AS imagem FROM produto AS prod WHERE prod.id_sub_cat... | true |
29804f7619972c668514d1d938c79467f110e4bf | PHP | chrodriguez/kimkelen | /apps/backend/lib/myUser.class.php | UTF-8 | 15,703 | 2.515625 | 3 | [] | no_license | <?php
/*
* Kimkëlen - School Management Software
* Copyright (C) 2013 CeSPI - UNLP <desarrollo@cespi.unlp.edu.ar>
*
* This file is part of Kimkëlen.
*
* Kimkëlen is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License v2.0 as published by
* the Free Softwar... | true |
f7da0cb8f0b1b79db626389558db61e5f521c9f4 | PHP | forceedge01/genesis | /Application/Components/Analytics/Analytics.Class.php | UTF-8 | 15,247 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Application\Components\Analytics;
/**
* Author: Wahab Qureshi.
*/
use Application\Core\ObjectManager;
class Analytics extends ObjectManager {
private
$connection,
$request;
public function __construct() {
$this->request = new \Application\Core\Request();
... | true |
f19c5dfbbbf16ecb5a1654127b2edfb784b2355c | PHP | kmgerich/Timber-for-Wordpress-Starter-Kit | /wip-parent-theme/mdf/setup/taxonomies.php | UTF-8 | 2,220 | 2.515625 | 3 | [] | no_license | <?php
if( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
/**
* Register Multiple Taxonomies
*
* @author Bill Erickson
* @link http://www.billerickson.net/code/register-multiple-taxonomies/
*/
function mw_register_taxonomies() {
$taxonomies = array(
array(
'slug' => 'f... | true |
a47b35cefc77193cd620ea2160798c1dbc362c92 | PHP | zedone/studymvc | /app/view/View.php | UTF-8 | 69 | 2.734375 | 3 | [] | no_license | <?php
class View{
public function display($text){
echo $text;
}
} | true |
ee30c3ff704dd28329ff9662b57bbb14ff4f513d | PHP | shilpabharamanaik/shilpazend3Fisdap | /library/Util/Convert/AirwayConverter.php | UTF-8 | 3,141 | 2.703125 | 3 | [] | no_license | <?php
/**
* Conversion tool for converting skills tracker data to Fisdap 2.0
*/
class Util_Convert_AirwayConverter extends Util_Convert_SkillConverter
{
/**
* This function converts all airway skills over for a given patient.
*
* @param Patient
*/
public function convert($patient, $shift ... | true |
7c41bfab04769901cb2b5e2b4d46e9e9c5443584 | PHP | AlphaWong/COMP3421GroupProject | /cyl/class/controlFactory.php | UTF-8 | 898 | 2.625 | 3 | [] | no_license | <?php
class controlfactory{
public static $db;
public static $domain;
public static function init(){
if(!is_object(self::$db)){
include_once "../config/dbConf.php";
include_once "../class/DBManager.php";
self::$db = new DBManager($DBHOST,$DBUSER,$DBPWD,$DBNAME);
self::$domain... | true |
167cd7a4371b0fe6832bb2181d7ac938128a9d10 | PHP | midnite81/laravel-base | /src/Repositories/BaseRepository.php | UTF-8 | 8,923 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Midnite81\LaravelBase\Repositories;
use Illuminate\Database\Query\Builder;
use Midnite81\LaravelBase\Contracts\Repositories\BaseRepository as BaseRepositoryContract;
abstract class BaseRepository implements BaseRepositoryContract
{
/**
* An array of relationships to eager load.
... | true |
5d5d7a1c2a1476e18480668e4cab02d2ef31a76a | PHP | netinhoteixeira/pudim | /source/nucleo/lib/Pudim/Service/ConfiguracaoService.php | UTF-8 | 1,592 | 2.71875 | 3 | [] | no_license | <?php
/**
* Pudim - Framework para desenvolvimento rápido em PHP.
* Copyright (C) 2014 Francisco Ernesto Teixeira <fco.ernesto@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatio... | true |
0398300e6637a196968b7ea5e017d2fbd5a0f254 | PHP | Ivan-up/simpleshop | /presentation/link.php | UTF-8 | 10,889 | 2.84375 | 3 | [] | no_license | <?php
class Link
{
public static function Build($link, $type = 'http')
{
$base = (($type == 'http' || USE_SSL == 'no') ? 'http://' : 'https://') .
getenv('SERVER_NAME');
// Если константа HTTP_SERVER_PORT определена и значение отличается
// от используемого по умолчанию...
if (defined('HTTP_SERVER_POR... | true |
59e8409385562865d174b2d1671b301a4dbe4a0c | PHP | sopheakpsp/backend | /php/basic/while_and_do_while.php | UTF-8 | 305 | 3.53125 | 4 | [] | no_license | <?php
## while loop is check condition first
$count =1;
while($count <= 10){ //while(0) always False, while(1) always True
echo "I am the best $count <br>";
$count++;
}
## do while is do once and then check condition
$do = 1;
do{
echo "I am the best $do <br>";
$do++;
}
while($do<=0);
?> | true |
47f3db03ab120e8bd6f6a880a8b6a8e5891c7566 | PHP | ddalairac/utn-prog-3 | /Parciales/practica_parcial2/src/Controllers/UsuariosController.php | UTF-8 | 3,280 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Controllers;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use App\Models\P2Usuarios;
use App\Utils\Autenticate;
use App\Utils\RespErrorException;
class UsuariosController/* implements iCRUD */ {
/** Crea un nuevo usuario. Retorna ... | true |
bedd3a4307a06c654155e6774366ddde95b86333 | PHP | super032208/Class | /phpsandbox/website8/inc/view.php | UTF-8 | 832 | 2.921875 | 3 | [] | no_license | <?php
$servername = "mysql:host=ict.neit.edu;port=5500;dbname=se266_hector;";
$username = "se266_hector";
$password = "8001596";
$dbname = "actores";
// creating a connection
$conn = ($servername, $username, $password, $db);
// check connection
if($conn-> connect_error){
die("connection Failde:".$conn->connect_erro... | true |
18ee61f4f58e26934a0216d99db857daf89e1e2d | PHP | Zhanat87/alina.test | /console/my/yii2/Migration.php | UTF-8 | 2,456 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace console\my\yii2;
use yii\db\Migration as Yii2Migration;
use yii\db\Schema;
use yii\helpers\ArrayHelper;
use yii\base\InvalidConfigException;
use yii\rbac\DbManager;
use Yii;
/**
* Class Migration
* @package console\my\yii2
*/
class Migration extends Yii2Migration
{
/**
* @var string
... | true |
4c8815a61ce24245d5825941bdea7be2e2ffd6e4 | PHP | folleselavida/btag | /lib/model/doctrine/base/Basecategoria.class.php | UTF-8 | 3,381 | 2.53125 | 3 | [] | no_license | <?php
/**
* Basecategoria
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $id
* @property string $nombre
* @property string $logo
* @property string $thumbnail
* @property integer $ciudad_id
* @property ciudad $ciudad
* @property Doctrine_Collection $sitioes
*
... | true |
07f367fe080be2fdd609126bc1dae7b208ee1130 | PHP | ipme/CDN | /themes/begin/inc/custom-register.php | UTF-8 | 4,653 | 2.671875 | 3 | [] | no_license | <?php
/*
Author: Ludou
*/
if (!isset($_SESSION)) {
session_start();
session_regenerate_id(TRUE);
}
/**
* 后台注册模块,添加注册表单,修改新用户通知。
*/
if ( !function_exists('wp_new_user_notification') ) :
/**
* Notify the blog admin of a new user, normally via email.
*
* @since 2.0
*
* @param int $user_id Us... | true |