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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
59a0fb3b3fc7884ce9edeec56bb47d1e68ebf405 | PHP | mohamed-aldomany/php-ecommerce-app | /admin/member.php | UTF-8 | 9,641 | 2.515625 | 3 | [] | no_license | <?php
session_start();
$title = 'member';
// check the user have a session
if (isset ($_SESSION['username'])) {
include 'init.php';
$do = '';
if (isset($_GET['do'])) {
$do = $_GET['do'];
}
else {
$do='manage';
}
//manage page
if ($do=='manage') {
$query = '';
if(isset($_GET[... | true |
924db2dfcb286535fe5eb6d9cfe82bfb6ae8cc2c | PHP | bstdn/first_vue | /application/core/MY_Controller.php | UTF-8 | 1,567 | 2.53125 | 3 | [] | no_license | <?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Created by Stefan Ho.
* User: Stefan <xiugang.he@chukou1.com>
* Date: 2017-10-04 22:49
*/
/**
* Class MY_Controller
* @property CI_Router $router
* @property MY_Input $input
*
* 自定义类库:
* @property Template $template
* @property MY_... | true |
e6302cfde9fe7dc8dea859f3399dcd3edcaad75a | PHP | tdproject/TechDivision_Lang | /tests/TechDivision/Lang/BooleanTest.php | UTF-8 | 6,174 | 2.671875 | 3 | [] | no_license | <?php
/**
* License: GNU General Public License
*
* Copyright (c) 2009 TechDivision GmbH. All rights reserved.
* Note: Original work copyright to respective authors
*
* This file is part of TechDivision GmbH - Connect.
*
* faett.net is free software; you can redistribute it and/or
* modify it under the terms... | true |
896fbe2037db54f0aa9854b936c827a7e0b1fa79 | PHP | PatDubb22/Custom-Greeting | /index.php | UTF-8 | 509 | 3.078125 | 3 | [] | no_license | <?php
$name = "Patricia";
$name = $_GET ["name"];
$string="PDUBB";
$string="whatever";
if ( $name =="Patricia") {
echo "Welcome back Patricia! We're excited to get started";
}
elseif ($string == "PDUBB"... | true |
393f29dc4899088faca9fd47aeb659eac36fbbcf | PHP | zxwmyemail/ZxwFramework | /core/library/HashRedis.php | UTF-8 | 4,646 | 2.828125 | 3 | [] | no_license | <?php
namespace core\library;
/********************************************************************************************
redis的一致性hash类
@copyright Copyright(c) 2015
@author iProg
@version 1.0
使用方法:
$redis_servers = array(
array(
'host' => '10.0.0.1',
'port' =>... | true |
b2be58cd9c933b79ea74dd6e33a8d974611f03a0 | PHP | wangcd/aixinzhixiao | /aixin/Lib/Model/CashModel.class.php | UTF-8 | 2,186 | 2.65625 | 3 | [] | no_license | <?php
/*
* MUST_VALIDATE 必须验证 不管表单是否有设置该字段
* VALUE_VALIDATE 值不为空的时候才验证
* EXISTS_VALIDATE 表单存在该字段就验证 (默认)
*/
// 提现模型
class CashModel extends Model {
protected $_validate = array(
array('member_id','require','会员编号必须'),
array('real_name','require','开户姓名必须'),
array('bank_name','require','开户银行必须'),
array('b... | true |
9a2d07bd30035ea6fb19e164639c0ebc6ed27b78 | PHP | v-bc-sravankumar/Demo_repo | /Automation_framework_for_kalgudi/tests/Unit/DataModel/QueryValueTest.php | UTF-8 | 1,641 | 2.609375 | 3 | [] | no_license | <?php
namespace Unit\DataModel;
use DataModel\QueryValue;
class QueryValueTest extends \PHPUnit_Framework_TestCase
{
public function testGetValue()
{
$value = new QueryValue('foo');
$this->assertEquals('foo', $value->getValue());
}
public function nonScalarDataProvider()
{
... | true |
57aa931cf618d0a8c76726de5a680192630fb58f | PHP | MykolaMatsiuk/functions_forms_tasks | /7/functions.php | UTF-8 | 1,279 | 3.265625 | 3 | [] | no_license | <?php
define("COMMENTS_FILE_NAME", "comments.json");
function getComments() {
return readJson(COMMENTS_FILE_NAME, []);
}
function readJson($fileName, $default = null) { //if file doesn't exist return null
if(!file_exists($fileName)) {
return $default;
}
$json = file_get_contents($fileName);
return json... | true |
0e1d6229b4c7e11445cad6630b35cf80e33b8fa1 | PHP | gitter-badger/seit | /app/Services/ResearchAndManufacture.php | UTF-8 | 9,839 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php namespace SeIT\Services;
/**
* @class Contains Functions for Research and Manufacture related tasks
*/
class ResearchAndManufacture
{
const MANUFACTURE = 1;
const RESEARCH_TE = 3;
const RESEARCH_ME = 4;
const COPY = 5;
const REVERSE = 7;
const INVENTION = 8;
/**
* Resolves En... | true |
1f1bed248d61ab0d250b9d9f11b126918a7cdd2d | PHP | NeuralNoise/animurecs | /achievements/anime_elite_achievement.php | UTF-8 | 945 | 2.703125 | 3 | [] | no_license | <?php
class AnimeEliteAchievement extends BaseAchievement {
public $id=8;
public $name="Elite";
public $points=200;
public $description="Your accumulated wisdom watching anime means your friends can rely on you for good recommendations.<br />Have 500 or more anime in your list.";
public $imagePath="";
publi... | true |
a0892eddcfa50cb25146fb87844a786a8b3143c5 | PHP | jereelton/PHP-COF | /php/carregar_recursos_aplicados.php | UTF-8 | 1,631 | 2.609375 | 3 | [] | no_license | <?php
session_start();
header("Content-Type: text/xml");
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jun 2015 05:00:00 GMT");
if( isset( $_POST[ 'carregar_recursos_aplicados' ] ) && $_POST[ 'carregar_recursos_aplicados' ] == "carregarRecursosXml" ) {
$retorno_xml = carregar_recurs... | true |
7508f5b00bf51d18b147e462a3eae8cce62fd623 | PHP | plrodrig/blog | /blog.php | UTF-8 | 1,802 | 2.75 | 3 | [] | no_license | <?
function add_post($title, $contents, $category){
$title = mysql_real_escape_string($title);
$contents = mysql_real_escape_string($contents);
$category = (int) $category;
mysql_query("INSERT INTO posts SET
cat_id = '{$category}',
title = '{$title}',
contents = '{$contents}',
data... | true |
4dfcf3ddc97b7cc59f144b79737277702936e287 | PHP | Half-night/webapp | /framework/core/test/MysqlQueryBuilder.php | UTF-8 | 6,938 | 2.859375 | 3 | [] | no_license | <?php
class MysqlQueryBuilder
{
private $query = array();
private static $create_array = array(
'create' => '',
'create_definition' => '',
'table_options' => '',
);
private static $select_array = array(
'select' => '',
'from' => '',
'where' => '',
... | true |
83dfe3f0073ca963e6659ef630595743391b38d9 | PHP | libersoft/billify | /lib/model/ModoPagamentoPeer.php | UTF-8 | 954 | 2.515625 | 3 | [] | no_license | <?php
class ModoPagamentoPeer extends BaseModoPagamentoPeer
{
public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
{
$criteria->addAscendingOrderByColumn(ModoPagamentoPeer::DESCRIZIONE);
$criteria->add(self::ID_UTENTE, FatturaPeer::$user_id);
return parent::doSelectStm... | true |
494ae3c01390ef056cecda4981d2212f4fb4b833 | PHP | Jakub-Fajkus/bp-php | /src/Experiment/Ant/AntLinearExperiment.php | UTF-8 | 787 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Experiment\Ant;
use Config\Config;
use Experiment\BaseExperiment;
/**
* Class AntLinearExperiment
* @package Experiment
*/
class AntLinearExperiment extends BaseExperiment
{
public function prepare()
{
Config::setIndividualCount(10);
Config::setMuta... | true |
b977b753f555ee74704a367d339785dff78b7272 | PHP | lmagarin/PortalDAW | /ejerciciosServidor/NotasAlumnos.php | UTF-8 | 2,176 | 2.734375 | 3 | [] | no_license | <?php include("HistorialNavegacionCookie.php"); ?>
<!DOCTYPE html>
<html lang="es">
<head>
<title>Nota Alumnos 2DAW para DWESE</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width", initial-scale=1, maximum-scale=1/>
</head>
<body>
<?php
... | true |
8a3893c3ea33b62b62a31e9c2e4eb0c9d07d3646 | PHP | WeCamp/Halloween | /spec/Domain/Game/GameSpec.php | UTF-8 | 1,762 | 2.578125 | 3 | [] | no_license | <?php
namespace spec\Halloween\TrickOrTreat\Domain\Game;
use Halloween\TrickOrTreat\Domain\Game\Event\CurrentRoundHasBeenFinished;
use Halloween\TrickOrTreat\Domain\Game\Event\GameHasFinishedWithADraw;
use Halloween\TrickOrTreat\Domain\Game\Event\GameHasFinishedWithWinner;
use Halloween\TrickOrTreat\Domain\Game\Event... | true |
64ee5a0f3802c7fcab80aa0f93f44fdbcd19332e | PHP | adpauly/checkmycomposer-commands | /CmC/Helper/ComposerHelper.php | UTF-8 | 5,856 | 2.53125 | 3 | [] | no_license | <?php
namespace CmC\Helper;
use Composer\Json\JsonFile;
use Composer\Repository\CompositeRepository;
use Composer\Factory;
use Composer\IO\NullIO;
use Composer\DependencyResolver\Pool;
use Composer\Package\Version\VersionSelector;
use Composer\Config;
use Composer\Util\RemoteFilesystem;
use Composer\Package\CompleteP... | true |
0589e81b85f30f1d103d9ab310fa629ad0314d87 | PHP | sshyran/silk | /tests/unit/PostType/PostTypeAssertions.php | UTF-8 | 471 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
trait PostTypeAssertions
{
/**
* [assertPostTypeExists description]
* @param [type] $slug [description]
*/
protected function assertPostTypeExists($slug)
{
$this->assertTrue(post_type_exists($slug));
}
/**
* [assertPostTypeExists description]
* @param [type... | true |
773de0203ac191062a196de94f94b182bfa7908d | PHP | wangyakang/wyk | /zongjie/shangchuan.php | UTF-8 | 1,200 | 2.796875 | 3 | [] | no_license | <?php
include "../public/db.php";
include "../public/session.php";
$fileInfo=$_FILES["file"];
date_default_timezone_set('PRC'); //设定用于一个脚本中所有日期时间函数的默认时区
//echo date("Y-m-d his");
$dirName=date("Ymd");//创建文件夹名字
//echo $dirName;
$imgName=date("Ymdhis");//创建图片名字
//echo $imgName;
if(!file_exists("upload")){ ... | true |
78d80c2c636c9a3ef806ed9630c39f2cf10a2cc3 | PHP | mmshi/gt-is-good | /OutOfDate/GTMob/scripts/Connection.php | UTF-8 | 1,092 | 3 | 3 | [] | no_license | <?php
function connectToDb()
{
$host = "localhost"; // Host name
$username = "gtisgooduser"; // Mysql username
$password = "password"; // Mysql password
$db = "gtisgood"; // Database name
// Connect to server and select databse.
$con = mysql_connect($host, $username, $password) or die('Could not connect. G... | true |
09fb3dbd8348bf7415be2dbae25617475ac8e8af | PHP | walkingsage/irvis | /send.php | UTF-8 | 266 | 2.640625 | 3 | [] | no_license | $name = $_POST['name'];
$number = $_POST['number'];
$name = htmlspecialchars($name);
$number = htmlspecialchars($number);
$name = urldecode($name);
$number = urldecode($number);
$name = trim($name);
$number = trim($number);
echo $name;
echo "<br>";
echo $number; | true |
d2c0bf655262c63a2aefab2b24bb36e7147cb3d7 | PHP | shov/laravel-registry | /tests/Feature/LaravelRegistryAccessTest.php | UTF-8 | 1,580 | 2.59375 | 3 | [
"BSD-2-Clause"
] | permissive | <?php declare(strict_types=1);
use Illuminate\Support\Facades\App;
use Tests\TestCase;
class LaravelRegistryAccessTest extends TestCase
{
/**
* @test
* @dataProvider behaviourDataProvider
*/
public function dependencyInjection($cmd)
{
//Arrange
/** @var RegistryUser $ru */
... | true |
65491a2c7b813b38baa07a129b982446a2e3135b | PHP | nicolaetusinean/comm | /src/AppBundle/Service/UserService.php | UTF-8 | 4,383 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Service;
use AppBundle\Repository\UserRepository;
use AppBundle\Entity\User;
use Symfony\Component\Security\Core\User\UserInterface;
class UserService
{
protected $userRep;
public function __construct($userRepository, $passwordEncoder) {
$this->setUserRepository($userReposit... | true |
9415cb9d3cd0667be18bd3ef0994e80195609b57 | PHP | WeCamp/w3c-wecampbot | /src/WecampBot/SelfUpdate.php | UTF-8 | 857 | 2.640625 | 3 | [] | no_license | <?php
namespace W3C;
use \PhpSlackBot\Command\BaseCommand;
class SelfUpdate extends BaseCommand
{
private $updateCodebaseCommand = "/usr/bin/git pull 2>&1";
private $updateDependenciesCommand = "composer install --no-interaction --no-scripts 2>&1";
protected function configure()
{
$this->set... | true |
35d49d6f8ea4a828dd2956bd7bb2364a2bf9e5d7 | PHP | asadmony/oms | /app/Services/ProductServices.php | UTF-8 | 204 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Models\Product;
class ProductServices
{
public $product;
public function __construct(Prdoduct $product)
{
$this->product = $product;
}
}
| true |
ae0121e1bb3fa05cae93b7d30352e7cc04d301bf | PHP | xsat/www.elevator.com | /app/Application.php | UTF-8 | 710 | 2.96875 | 3 | [] | no_license | <?php
namespace App;
use App\Interfaces\ApplicationInterface;
use App\Libraries\View;
use App\Controllers\IndexController;
/**
* Class Application
* @package App
*/
class Application implements ApplicationInterface
{
/**
* @var View
*/
private $view = null;
/**
* @var IndexController
... | true |
01e8d53f465d096e8c946be3d3839b120b7ad192 | PHP | liesenborghspuntkristof/php_oefeningen | /ingredienten.php | UTF-8 | 874 | 3.28125 | 3 | [] | no_license | <?php
//ingredienten.php
class IngredientenArrayGenerator {
public function getIngredienten() {
$ingredienten = array();
array_push($ingredienten, "bloem");
array_push($ingredienten, "zout");
array_push($ingredienten, "suiker");
array_push($ingredienten, "gist");
$... | true |
ecf9c11ab8223e998dd27ccc31e019b973305936 | PHP | SergioPerezFigueroa/Proyecto_IS-410_1900 | /Aplicacion/validacion/app/RepositorioCertificado.php | UTF-8 | 2,866 | 2.96875 | 3 | [] | no_license | <?php
class RepositorCertificado{
public static function insertarCertificado($conexion, $Certificado){
$CertificadoInsertado = false;
if (isset($conexion)){
try{
$sql = "INSERT INTO validaciones_cursos (nombre_alumno, nombre_curso, codigo_Certificado) values (:Estudiante, :Curso, :Registro)";
$s... | true |
bc77eff406d7835b38e88ee2b4b1403dc0662c93 | PHP | philipjscott/epiphanee | /backend/inc_dislikes.php | UTF-8 | 1,190 | 2.515625 | 3 | [] | no_license | <?php
require_once("db_conn.php");
require_once("update_count.php");
$ip = $_SERVER["REMOTE_ADDR"];
$id = $conn->real_escape_string($_REQUEST["id"]); //id is retrieved via js and not mysql table; user could change id of article
$checkQr = "SELECT 1 FROM userdislikes
WHERE ip='" . $ip . "'
AND a... | true |
b89da5fc73617b53a312ec0c744ef020eefe85e8 | PHP | Abdoulaye-at/htdocs | /Webforce3/phpoo/heritage/chat.php | UTF-8 | 257 | 2.8125 | 3 | [] | no_license | <?php
require_once './animal.php';
protected $espece = 'chat';
public function identifier() {
return parent::identifier() . 'je suis un animal'
}
public fonction crier(){
echo 'miaou';
}
final public function ronronner(){
echo 'ronron';
}
| true |
320ebe4963989a34bb504fc4ae009ac8a8b43465 | PHP | DavidSmekal/book-citation-generator | /app/Http/Controllers/TemplateController.php | UTF-8 | 10,381 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Validator;
use Exception;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Session;
use App\Template;
use App\bookcollection;
class TemplateController extends Controller
{
public $te... | true |
d48269091c473eddc5613d659c0aaec48401132a | PHP | chrisdra/IntroduccionPHP | /10-isset-empty.php | UTF-8 | 712 | 2.921875 | 3 | [] | no_license | <?php include 'includes/header.php';
$clientes = [];
$clientes2 = array();
$clientes3 = array('christian T' , 'maria', 'christian A');
$cliente = [
'nombre' => 'Christian',
'saldo' => 200
];
//Empty - Revis si un arreglo esta vacio
var_dump( empty($clientes));
var_dump( empty($clientes3));
var_dump( empty($cl... | true |
bf92defcd6c20ff0ee5574197bd1d98bbb9065be | PHP | HugoDeku/ProjetMagicShop | /site_magic_shop/model/test.php | UTF-8 | 576 | 2.8125 | 3 | [] | no_license | <?php
require_once("../model/DAO.class.php");
require_once("../model/Utilisateur.class.php");
$db = new DAO();
/*$id = $db->genereID();
var_dump($id);
$test1 = $db->testCreerMdp("0000");
$test2 = $db->testCreerMDP("salut");
var_dump($test1);
var_dump($test2);
var_dump($db->getUser(1));
$userTest... | true |
95abf76e647c3c019aa13c161dc3e36279e3ad28 | PHP | vmgronaldo/sobrerieles | /app/Abstracts/CustomAttachmentAdapter.php | UTF-8 | 3,146 | 3 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
namespace App\Abstracts;
use Bkwld\Cloner\Adapters\Upchuck;
use Bkwld\Cloner\AttachmentAdapter;
use Illuminate\Support\Facades\Storage;
class CustomAttachmentAdapter implements AttachmentAdapter
{
/**
* @var \Illuminate\Contracts\Filesystem\Filesystem
*/
protected $disk;
protected $dept... | true |
713a1462933c1eb2d2f8417c8bbcd72008c63146 | PHP | vittorioromeo/UNIME | /ProgettoVillari/php/Lib/Impl/utils.php | UTF-8 | 704 | 2.96875 | 3 | [
"AFL-3.0",
"AFL-2.1",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Utils
{
public static function getCSL($mArray)
{
$res = "";
for ($x = 0; $x < count($mArray); ++$x)
{
$res .= $mArray[$x];
if($x < count($mArray) - 1) $res .= ", ";
}
return $res;
}
public static function getPwdHash($mX)
{
return md5($mX);
}
public static function checkEmptyS... | true |
ad05bdde84ed1837550ead09ba988afd08759dd2 | PHP | akop0505/fus_school_public | /behaviors/TimestampBeforeValidateBehavior.php | UTF-8 | 867 | 2.546875 | 3 | [] | no_license | <?php
namespace app\behaviors;
use \yii\behaviors\TimestampBehavior;
use yii\db\BaseActiveRecord;
use yii\db\ActiveRecord;
class TimestampBeforeValidateBehavior extends TimestampBehavior
{
/**
* @inheritdoc
*/
public function events()
{
return [
BaseActiveRecord::EVENT_BEFORE_VALIDATE => 's... | true |
06766c62a404fd13d792f57a35aea67a0ddbb0dc | PHP | TresComaCatorce/programacion_III | /2018-04-16_Clase_06/ejemploPostman/nexo.php | UTF-8 | 1,388 | 2.796875 | 3 | [] | no_license | <?php
require_once ("Entidades/alumno.php");
require_once ("Entidades/archivo.php");
//var_dump($_REQUEST);
//var_dump($_GET);
//var_dump($_POST);
//var_dump($_FILES);
//var_dump($action);
if( $_POST )
{
$action = isset($_POST['action']) ? $_POST['action'] : NULL;
switch($action)
{
case "UPLOAD":
$respue... | true |
5f24ec36a6a3624987ed83cbede41f3e4ae3d8e1 | PHP | nerones/CodeIgniter-for-PHP_CodeSniffer | /CodeIgniter/Sniffs/Strings/DoubleQuoteUsageSniff.php | UTF-8 | 7,059 | 2.984375 | 3 | [] | no_license | <?php
use PHP_CodeSniffer\Sniffs\Sniff;
use PHP_CodeSniffer\Files\File;
/**
* CodeIgniter_Sniffs_Strings_DoubleQuoteUsageSniff.
*
* PHP version 5
*
* @category PHP
* @package PHP_CodeSniffer
* @author Thomas Ernest <thomas.ernest@baobaz.com>
* @copyright 2011 Thomas Ernest
* @license http://thomas.er... | true |
12df55f4f6d3a6993a79c27bfab24ee644c81a02 | PHP | timkelleher/cronkd | /src/CronkdBundle/Model/ProbeAttempt.php | UTF-8 | 1,272 | 3.03125 | 3 | [] | no_license | <?php
namespace CronkdBundle\Model;
use CronkdBundle\Entity\Kingdom;
class ProbeAttempt
{
/** @var Kingdom */
private $kingdom;
/** @var Kingdom */
private $target;
/** @var array */
private $quantities = [];
/**
* @param $name
* @param $quantity
*/
public function _... | true |
bdc008d34432f99961e743f2d3d3476f371d2f2b | PHP | spaceboy/SpaceFormats | /src/SpaceFormats.php | UTF-8 | 3,802 | 3.296875 | 3 | [] | no_license | <?php
/**
* @file SpaceFormats.php
* @namespace Spaceboy
* @class SpaceFormats
* @author: Spaceboy
*/
namespace Spaceboy;
use Nette;
use Nette\Utils\DateTime;
class SpaceFormats extends \Nette\Object {
/**
* Formátování datetime na relativní čas (k aktuálnímu času)
* @param Nette\Utils\Datetime $... | true |
c804dd82bf49dd5b7955b2b0c45c644ca715b254 | PHP | ccankov/rainbow-connection | /app/User.php | UTF-8 | 1,516 | 2.734375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use DB;
class User extends Authenticatable
{
/**
* The other users who are connected to the user.
*/
public function connections()
{
return $this->belongsToMany('App\User', 'connections', 'user_id', 'connection... | true |
29fc1b6ae67de24c8d549e7fba251c57d7ecf4e7 | PHP | tonysanin/TimetableApplication | /app/Time.php | UTF-8 | 484 | 2.765625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Time extends Model
{
public $timestamps = false;
protected $table = 'class_time';
public function create($time_start, $time_end, $university_id)
{
// Returns new class time id
$time = new Time();
$time->time... | true |
cfd4ae6447c50a92350058e095cd8bc56ad1c120 | PHP | podliy16/phpExpressionParser | /ExpressionParser/ExpressionElements/MinusOperator.php | UTF-8 | 487 | 3.0625 | 3 | [] | no_license | <?php
namespace ExpressionParser\ExpressionElements;
class MinusOperator implements OperatorInterface, ExpressionElementInterface
{
public function calculate($argument1, $argument2)
{
return $argument2 - $argument1;
}
public function getExpressionType()
{
return ExpressionElementI... | true |
8f6e858ab66569bd20559e4afc01057a15ab2c20 | PHP | gallobone/curso-php | /dragoes/classes/Pontuacao.php | UTF-8 | 3,863 | 2.765625 | 3 | [] | no_license | <?php
/**
*
*/
class Pontuacao
{
public $id;
public $id_usuario;
public $id_jogador;
public $id_habilidade;
public $pontuacao;
/*Geters*/
public function getId(){
return $this->id;
}
public function getIdUsuario(){
return $this->id_usuario;
}
public function getIdJogador(){
return $this-... | true |
9899ff30ec8f8a8ce949c0318ab3d324c76d17e6 | PHP | Aliens-dev/PHP-Router | /src/Route.php | UTF-8 | 1,994 | 3.375 | 3 | [] | no_license | <?php
namespace AliensDev;
class Route
{
/**
* the Route method
* @var string
*/
private $method;
/**
* the Route URI
* @var $url string
*/
private $url;
/**
* the route callable
* @var $callable callable|array
*/
private $callable;
/**
... | true |
2b0004136e8eb6472bbee632df1f31b6e08a3712 | PHP | RUGyron/php-sql | /add.php | UTF-8 | 1,747 | 2.65625 | 3 | [] | no_license | <?php
include "connecting.php";
if(isset($_GET['button']))
{
$proffesion = $_GET['proffesion'];
$experience = $_GET['experience'];
$full_name = $_GET['full_name'];
$wanted_salary = $_GET['wanted_salary'];
$level = $_GET['level'];
$dates = $_GET['dates'];
$id_education = $_GET['id_education'];
$... | true |
4429e86b103d528ee6f4c08964cb01241bd1e862 | PHP | jagobrown/bcgt | /classes/core/Log.class.php | UTF-8 | 47,896 | 2.59375 | 3 | [] | no_license | <?php
/**
* Description of Log
*
* @author cwarwicker
*/
class Log {
public static function search($filter, $page=1, $order=array('log.ID' => 'DESC'))
{
global $CFG, $DB;
// Build SQL
$params = array();
$sql = "";
$sql .= "SELECT log.id, st... | true |
01bbb943a361c0d2715426d8b7ef0055413cc15d | PHP | ingenerator/phinx-lightweight | /src/Phinx/Util/SqlDumpImporter.php | UTF-8 | 3,117 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace Phinx\Util;
use Phinx\Db\Adapter\AdapterInterface;
use Symfony\Component\Console\Output\OutputInterface;
class SqlDumpImporter
{
public function __construct(
private AdapterInterface $adapter,
private OutputInterface $output
) {
}
public function import(string $file,... | true |
fbdc68c176cf58bdea0a66e5caaa3ae1ff226acf | PHP | wecodenlsystem/LanguageDetector | /tests/Ideea/LanguageDetector/Alphabet/Loader/YamlLoaderTest.php | UTF-8 | 1,663 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the LanguageDetector package
*
* (c) Vitaliy Zhuk <zhuk2205@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*/
namespace Ideea\LanguageDetector\Alphabet\Loader;
/**
* Yaml loader testing
... | true |
5abb5095231b2f2aa4f144e88c21c65fd26903fd | PHP | DavidSouthgate/omcrs-web | /web/src/classes/Question/QuestionFactory.php | UTF-8 | 913 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
class QuestionFactory
{
/**
* Returns a new instance of a question type object from a given type.
* @param $type string Type of question
* @param $array
* @return Question
* @throws Exception 'QuestionFactory_ClassNotFoundException': Given type does not translate to login object
... | true |
7eccede9298d752d4f70ffd9e7f55751a70b2bf0 | PHP | nicopenaredondo/Trackr | /app/Trackr/Repository/Projects/EloquentProjectsRepository.php | UTF-8 | 1,159 | 2.828125 | 3 | [] | no_license | <?php namespace Trackr\Repository\Projects;
use Illuminate\Database\Eloquent\Model;
use Trackr\Repository\EloquentBaseRepository;
use Trackr\Repository\Projects\InterfaceProjectsRepository;
class EloquentProjectsRepository extends EloquentBaseRepository implements InterfaceProjectsRepository
{
/**
* Eloquent mo... | true |
eba74d920fb7bb41ff9d2d0af9d5ade8d3785b46 | PHP | MohamedSgharib700/Accounting | /app/Repositories/TransactionRepository.php | UTF-8 | 1,943 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Transaction;
use Illuminate\Support\Facades\DB;
use Symfony\Component\HttpFoundation\Request;
class TransactionRepository
{
/**
* @param $request
* @return $this|mixed
*/
public function search(Request $request)
{
$transactions = Tr... | true |
506053375644a4ad23a434b60b39a2f94d457f70 | PHP | phpcoach/skeleton-ecomm360-alabaz | /src/Controller/DeleteUserController.php | UTF-8 | 984 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the DriftPHP package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Marc Morera <yuhu@mmoreram.com>
*/
declare(strict_types=1);
name... | true |
4e0616a5aaf8fd703cddd25a4503017abf217187 | PHP | supercgeek/ICS4U1 | /1_Projects/25_Activity_2-8/login.php | UTF-8 | 2,481 | 2.96875 | 3 | [] | no_license | <?
// start the session and register the session variables
session_start("ProtectVariables");
// get the command value (use request since both post and get are used
$cmd = $_REQUEST['cmd'];
$username = $_POST['user'];
$password = $_POST['pass'];
if ($cmd == "login") {
$_SESSION['valid_session'] = "false";
$me... | true |
0773ee07d304026be42225671e6308a1dc7f1b6d | PHP | ciprian9/FYP | /xampp/htdocs/Android/v1/checkPassword.php | UTF-8 | 429 | 2.515625 | 3 | [] | no_license | <?php
require_once '../includes/DbOperations.php';
if($_SERVER['REQUEST_METHOD']=='POST'){
if(isset($_POST['username'])){
$eo = new DbOperation();
$response = $eo->checkPassword($_POST['username']);
$response['message'] = 'OK';
$response['error'] = false;
}else{
$response['error'] = true;
$response['m... | true |
a26acc74a64c2f7ad9da26c65bca58dd46ec885e | PHP | acasimiro/wedding | /api-mensagem.php | UTF-8 | 1,679 | 2.90625 | 3 | [] | no_license | <?php
class Logger {
public static function json($msg) {
Logger::info('dados/mensagem.json', $msg);
}
public static function csv($msg) {
Logger::info('dados/mensagem.csv', $msg);
}
public static function info($file, $msg) {
file_put_contents($file, $msg . PHP_EOL, FILE_APPEND | LOCK_EX);
}
public stat... | true |
19952882fc010bcfa5d25dbcf2ae0b39a5b8848e | PHP | KarlMacz/RMRCustoms | /admin/requests/pdf.php | UTF-8 | 3,770 | 2.515625 | 3 | [] | no_license | <?php
class PDF extends tFPDF {
function AddCustomPage($orientation='', $size='')
{
// Start a new page
if($this->state==0)
$this->Open();
$family = $this->FontFamily;
$style = $this->FontStyle.($this->underline ? 'U' : '');
... | true |
9fc5cbbff33c2522dab003508821d196615de891 | PHP | nicovrg/piscine_php | /j01/ex03/ft_split.php | UTF-8 | 160 | 2.53125 | 3 | [] | no_license | <?php
function ft_split($str)
{
if ($str)
{
$tab = preg_split('/\s+/', $str);
$res = array_filter($tab, 'strlen');
sort ($res);
return ($res);
}
}
?> | true |
4a7e71eff5458e21885736110c8c24cccc0f109d | PHP | jyothi-bni0011/ttop2 | /application/modules/site/models/Create_model.php | UTF-8 | 1,032 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Create_model extends MY_Model {
/*public function check_duplicate($role_name)
{
$this->db->where('role_name', $role_name);
$res = $this->db->get('role');
if (count($res->result()) == 0) {
return true;
}
else {
return false;
... | true |
c33bfb5b8f998bd10422f33730f0bb5210bda5bd | PHP | kodkatibi/sustainability | /app/Http/Controllers/CompanyController.php | UTF-8 | 996 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\CompanyRequest;
use App\Models\Company;
class CompanyController extends Controller
{
public function index()
{
$companies = Company::paginate();
$data = array(
'companies' => $companies
);
return view('com... | true |
2eeda70019cbb2545d1342d4ea8f338a73feb395 | PHP | protecinnovations/fizzbuzz | /FizzBuzz/Model/CollectionInterface.php | UTF-8 | 640 | 2.8125 | 3 | [] | no_license | <?php
namespace FizzBuzz\Model;
use \FizzBuzz\Model\NumberProviderInterface;
/**
* CollectionInterface
*
* @package FizzBuzz\Model
* @author Protec Innovations <support@protecinnovations.co.uk>
* @copyright 2013 Protec Innovations
*/
interface CollectionInterface
{
/**
* setCollection
* Set the... | true |
e517d09d67e7acda82b3717cb0f32e9a4c04bd1a | PHP | Frranz/4gewinnt | /php/gameLogic.php | UTF-8 | 12,077 | 2.671875 | 3 | [] | no_license | <?php
$servername = 'localhost';
$username = 'root';
$password = '';
$db_name = '4gewinnt';
session_start();
if(isset($_GET['action'])){
//erstellt neues spiel
$result = getCurrentGameIdFromPlayerId();
if($result['currentGameId']==0){//){
http_response_code(200);
header('Content-Type: application... | true |
007bacf0759e7538c933ed75f7c9def2407c9a83 | PHP | cosnics/cosnics | /src/Chamilo/Application/Calendar/Extension/Personal/Integration/Chamilo/Application/Calendar/Interfaces/PersonalCalendarEventDataProviderRepositoryInterface.php | UTF-8 | 832 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Application\Calendar\Extension\Personal\Integration\Chamilo\Application\Calendar\Interfaces;
use Chamilo\Libraries\Storage\Parameters\RecordRetrievesParameters;
/**
* Interface for a CalendarEventDataProviderRepository which is used by the personal calendar extension
*
* @package Chamilo\A... | true |
88cbc2d8a0c81eb33b0e9bc6bf67eb9ab6866772 | PHP | antag0n1st/tsl | /application/controllers/test.php | UTF-8 | 5,392 | 2.625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of test
*
* @author Vladimir
*/
class Test extends MY_Controller {
public function index(){
echo "Hello!";
}
public function send_email()
{
$recipie... | true |
778deae2030a7ff1c99c5e443a677451c1d504aa | PHP | vigorv/tushkan | /protected/models/CUploads.php | UTF-8 | 420 | 2.609375 | 3 | [] | no_license | <?php
/**
* ActiveRecord class for User Uploads
*
* @property $id
* @property $user_id
* @property $filename
* @property $kpt
* @property $started
*/
class CUploads extends CActiveRecord {
/**
*
* @param string $className
* @return CUploads
*/
public static function model($className = __CLASS__) {
... | true |
e7d683d5be13d62aea8b88a359e1a0c6d1d67a82 | PHP | magiri/Realestate-website | /application/modules/contacts/views/admin/index.php | UTF-8 | 2,898 | 2.65625 | 3 | [] | no_license |
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<?Php
$noofcontactsprefix = 's';
if (!empty($contacts)) {
$noofcontactsprefix = ($noOfcontacts < 1 || $noOfcontacts > 1) ? 's' : '';
}
?>
<h1 clas... | true |
6b7c8277015a130fd6bc18393b12a3aad26bbc46 | PHP | marialuisamoreno/Engenharia-de-Software | /create_User.php | UTF-8 | 970 | 2.71875 | 3 | [] | no_license | <?php
// Conexão com o banco colocar na variável $DB_connect
require_once("databaseconnect.php");
// Get data
$login = $_GET['login'];
$login_criado = $_GET['login_criado'];
$senha = md5($_GET['senha']);
$perfil = $_GET['perfil'];
// Verifica se o usuário possui permissão para acesso
$access = 0;
$query_... | true |
6236322fee0530d592b74b1cc960759b5ccbc18e | PHP | mattmontgomery/sri-integrity-hashes | /src/AbstractLoader.php | UTF-8 | 524 | 2.515625 | 3 | [] | no_license | <?php
namespace DDM\SRIIntegrityHash;
abstract class AbstractLoader implements LoaderInterface
{
public $namespace;
public $files = [];
public function getFiles(): array
{
return $this->files;
}
/**
* @codeCoverageIgnoreStart
* This function is not currently testable as no L... | true |
bf4e36b5d87aa91493205c63774e507961c8e1a9 | PHP | Wsyspringsun/phpBwt | /apidoc/class/Setting.php | UTF-8 | 3,435 | 2.625 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* 安全设置
* */
class Setting {
private static $data = array();
public function __construct()
{
parent::__construct();
$this->load->model('User_model','user_model');
}
/**
*@title 获取用户手机号
... | true |
7a824051b3beb1b2c0dcc85423b97873b4dcc31f | PHP | kuteteen/moyizhuang-7.23 | /lianxi/api.php | UTF-8 | 1,939 | 2.515625 | 3 | [] | no_license | <?php
function httpPost($url, $parms) {
$url = $url . $parms;
print_r($parms);
die();
if (($ch = curl_init($url)) == false) {
throw new Exception(sprintf("curl_init error for url %s.", $url));
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0)... | true |
0423184423ae69207ff2b3ca519ea336fa48363c | PHP | andparsons/mage-app-start | /app/code/Magento/GiftWrapping/Model/Total/Invoice/Giftwrapping.php | UTF-8 | 3,290 | 2.734375 | 3 | [] | no_license | <?php
/**
* GiftWrapping total calculator for invoice
*
*/
namespace Magento\GiftWrapping\Model\Total\Invoice;
class Giftwrapping extends \Magento\Sales\Model\Order\Invoice\Total\AbstractTotal
{
/**
* Collect gift wrapping totals
*
* @param \Magento\Sales\Model\Order\Invoice $invoice
* @ret... | true |
ec2f5b0be9751ef9bbdec5bd2f3a8eb9678fdff1 | PHP | eaktadiur/colbertballtax | /backup/admin/models/funcs.php | UTF-8 | 43,133 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
/*
UserCake Version: 2.0.2
http://usercake.com
*/
//Functions that do not interact with DB
//------------------------------------------------------------------------------
//Retrieve a list of all .php files in models/languages
function getLanguageFiles() {
$directory = "models/languages/";
$langua... | true |
a6a24853f0b7ea15a897123a7c47eb116f8534c8 | PHP | asifshapnil/Treehouse-blog | /lib/database.php | UTF-8 | 664 | 2.890625 | 3 | [] | no_license | <?php
include 'config/config.php';
/**
*
*/
class Database
{
private $dbhost = DB_HOST;
private $dbuser = DB_USER;
private $dbpass = DB_PASS;
private $dbname = DB_NAME;
public $link;
function __construct()
{
$this->Connect();
}
private function Connect()
{
$this->link = new mysqli... | true |
c0c812b64ed95e38f350cd7d5366aed9ce51fc8e | PHP | urbanetter/jassy | /src/Strategy/Bock.php | UTF-8 | 897 | 2.96875 | 3 | [] | no_license | <?php
namespace Jass\Strategy;
use Jass\Entity\Card;
use Jass\Entity\Game;
use Jass\Knowledge\BockKnowledge;
use Jass\Knowledge\TrickKnowledge;
use Jass\Knowledge\TrumpKnowledge;
use Jass\Strategy;
class Bock implements Strategy
{
public function chooseCard(Game $game): ?Card
{
$trick = TrickKnowled... | true |
54314320a0833dd175709b768353aedc6873cea8 | PHP | XarigamiND/xarigami-modules-mime | /xaruserapi/get_mimetype.php | UTF-8 | 1,737 | 2.671875 | 3 | [] | no_license | <?php
/**
* Mime Module
*
* @package modules
* @copyright (C) 2002-2007 The Digital Development Foundation
* @license GPL {@link http://www.gnu.org/licenses/gpl.html}
*
* @subpackage Xarigami Mime Module
* @copyright (C) 2008-2010 2skies.com
* @link http://xarigami.com/project/mime
* @author Carl P. Corliss
... | true |
6f00e62576be194795cf95f1bfe226b3bb6950c5 | PHP | tasdevelop/kidinoci | /application/helpers/MY_form_helper.php | UTF-8 | 571 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
function form_template($input, $error_msg = '', $template = '<div class="form-group{{has-error}}">{{input}}</div>'){
$form_str = $template;
if ($error_msg != '') {
$form_str = str_replace('{{has-error}}', ' has-error', $form_str);
$form_str = str_replace('{{error-msg}}', $error_msg, $form... | true |
6a99414446fb3cc65b103c79e4192deffdadc218 | PHP | AppioDigital/RedminePassage | /src/Entity/Upload.php | UTF-8 | 1,950 | 3.046875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Appio\Redmine\Entity;
use Appio\Redmine\Util\CheckAttributeKeyUtil;
/**
*/
class Upload
{
const TOKEN_KEY = 'token';
const FILENAME_KEY = 'filename';
const CONTENT_TYPE_KEY = 'content_type';
const DESCRIPTION_KEY = 'description';
/** @var string */
... | true |
655ac3ac336f919d078ab081274db79524d18013 | PHP | piter1448/PHP-advanced | /HW_4/engine_4/models/Feedback.php | UTF-8 | 950 | 3.0625 | 3 | [] | no_license | <?php
/* Класс для работы с отзывами (Формирует структуру вокруг таблицы БД = feedback) */
/* app согласно стандарту PSR-0 (\<Vendor Name>\(<Namespace>\)*<Class Name>) */
/* Создаем пространство имен класса Feedback */
namespace app\models;
/* Формируем структуру класса Feedback
* Наследован от DbModel */
class Fe... | true |
13e90b9c71c4754d2d2e0d0d273aa8227f8e6db1 | PHP | Scrollsguide/ScrollsTournaments | /models/entities/CalendarDate.php | UTF-8 | 405 | 3.625 | 4 | [] | no_license | <?php
class CalendarDate {
private $date; // DateTime
private $events = array();
public function __construct(){
}
public function getEvents(){
return $this->events;
}
public function addEvent(CalendarEvent $event) {
$this->events[] = $event;
}
public function getDate(){
return $this-... | true |
a5df010b5b82018839a35bf025595256c66638c2 | PHP | activecollab/configfile | /src/ConfigFile.php | UTF-8 | 8,412 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
namespace ActiveCollab\ConfigFile;
use InvalidArgumentException;
/**
* @package ActiveCollab\ConfigFile
*/
class ConfigFile
{
/**
* @var string
*/
private $file_path;
/**
* @var array
*/
private $options;
/**
* @param string $file_path
*/
public function... | true |
5e61f661bcc79e1d354bf29d640d15a1b80d1c52 | PHP | jeandev84/JFramework | /src/advanced/Component/Database/ORM/ModelRepository.php | UTF-8 | 3,680 | 2.5625 | 3 | [] | no_license | <?php
namespace Jan\Component\Database\ORM;
use Exception;
use Jan\Component\Database\Connection;
use Jan\Component\Database\Connectors\PDO\Query;
use Jan\Component\Database\Exceptions\ConnectionException;
use ReflectionException;
use ReflectionObject;
/**
* Abstract Class ModelRepository
* @package Jan\Component\... | true |
d9d6b5c45c87e0a00b423b047217adebe5a9d00d | PHP | Azimul-Haque/cvcs | /vendor/shipu/php-aamarpay-payment/src/Http/Response.php | UTF-8 | 3,638 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Shipu\Aamarpay\Http;
class Response
{
/**
* store response object
*
* @var object
*/
protected $response;
/**
* Store request details
*
* @var object
*/
protected $request;
/**
* Store raw contents
*
* @var mixed|string
... | true |
c16e88eb9492db85fdf84da1992d2df7e772fbf8 | PHP | laksamanakeris/lumenate | /src/MakeCommand.php | UTF-8 | 2,800 | 2.625 | 3 | [
"MIT"
] | permissive | <?php namespace Orchestra\Lumenate;
use Illuminate\Filesystem\Filesystem;
use Orchestra\Studio\Traits\PublishFilesTrait;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterfa... | true |
06a276326fcde1996a3134d10b03b86517f840a4 | PHP | biig-io/Melodiia | /src/MelodiiaConfigurationInterface.php | UTF-8 | 778 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Biig\Melodiia;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Route;
/**
* @internal inheritance
*/
interface MelodiiaConfigurationInterface
{
/**
* Return [api_name => [base_path, path]]
* only for conf with doc enabled.
*
* @return array
*... | true |
f39dceaab390256dd0f568ee1b7ef7553b3f9a2d | PHP | kevinprabhakar/itp-tunes-class | /app/Http/Controllers/GenresController.php | UTF-8 | 1,148 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
use Validator;
class GenresController extends Controller
{
public function genres()
{
$genres = DB::table('genres')->get();
return view('genres', [
'genres' => $genres
]);
}
public funct... | true |
ba050cea62ae7df62264934dbad83c5a447ada09 | PHP | n3yang/api.paimaihui | /application/models/Link.php | UTF-8 | 1,788 | 2.609375 | 3 | [] | no_license | <?php
class Application_Model_Link extends Application_Model_Base
{
public function __construct()
{
$this->dbTable = new Application_Model_DbTable_Link();
}
public function get()
{
$table = &$this->dbTable;
$where = $table->getAdapter()->quoteInto('is_published=?', Application_Model_DbTable_Link::IS_PU... | true |
814a1d2f74893d37d8718d68ae2c975acb361ea9 | PHP | ChrisKing325/VideoGameWebsite | /accountCreated.php | UTF-8 | 6,337 | 2.578125 | 3 | [] | no_license | <?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<?php
include "dbconnect.php";
if(!isset($_SESSION['uid']) || !isset($_SESSION['loggedin'])){
$_SESSION['uid'] = -1;
$_SESSI... | true |
36ce0b2933741dcfb422c92931dba29893ff014c | PHP | hxxy2003/htdocs-2 | /center/php/modules/service/ProjectInfoService.cls.php | UTF-8 | 910 | 2.59375 | 3 | [] | no_license | <?php
if(!class_exists("DaoBase")){
include dirname(__FILE__)."/../dao/DaoBase.php";
}
class ProjectInfoService extends DaoBase{
public $table_name = "project_info";
public $handle = null;
static function instance(){
if($handle == null){
$handle = new self();
}
... | true |
13daafda5f78329a175e480f291e8a6b67c204da | PHP | LauraPereyra/workshop2017 | /webapp/app/User.php | UTF-8 | 841 | 2.75 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'names', 'lastna... | true |
ce1168989fb42fd8dc17763b625899fd702c2375 | PHP | hideyuk1-jp/AtCoder | /php/agc019_b.php | UTF-8 | 372 | 3.28125 | 3 | [] | no_license | <?php
list($s) = strs();
$n = strlen($s);
// 全ての組の個数
$c = (1 + $n - 1) * ($n - 1) / 2 + 1;
for ($i = 0; $i < $n; ++$i) {
if (isset($cnt[$s[$i]])) {
++$cnt[$s[$i]];
} else {
$cnt[$s[$i]] = 1;
}
}
foreach ($cnt as $i => $v) {
$c -= $v * ($v - 1) / 2;
}
echo $c;
function strs()
{
retur... | true |
0f705439da1a16e975b77cadf51792222715a46f | PHP | DineshSai1/B48-sachin-yadav | /new.php | UTF-8 | 2,085 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html>
<head>
<title>Electricity Bill</title>
<style>
.button {
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 28px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 3px 2px;
cursor: pointer;
}
.cent... | true |
34322eef312adff1473b18a1abacc6b513859c5b | PHP | manachyn/imshop | /modules/users/yii2-users-module-master/models/frontend/RecoveryConfirmationForm.php | UTF-8 | 2,586 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace vova07\users\models\frontend;
use vova07\users\helpers\Security;
use vova07\users\models\User;
use vova07\users\traits\ModuleTrait;
use yii\base\Model;
use Yii;
/**
* Class RecoveryConfirmationForm
* @package vova07\users\models
* RecoveryConfirmationForm is the model behind the recovery confirmat... | true |
f7bbaf64afc33c1fce441aaaa7b6bd3dc3a66864 | PHP | NatasHansen/p | /server/salva-usuario.php | UTF-8 | 1,920 | 2.796875 | 3 | [] | no_license | <?php
$usuario = trim($_POST['usuario']);
$senha = $_POST['senha'];
$email1 = trim($_POST['email1']);
$erros = array();
if(empty($usuario)) {
$erros['usuario'] = true;
}
if(empty($senha)) {
$erros['senha'] = true;
}
if(empty($email1)) {
$erros['email'] = true;
}
$senha = sha1($senha);
require 'conexao.... | true |
f8fe3ef125b39bd06b0dc5a9af044e87789c0594 | PHP | rashmi8105/Synapse | /src/Synapse/AuthenticationBundle/EntityDto/AuthConfigDto.php | UTF-8 | 9,619 | 2.515625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Synapse\AuthenticationBundle\EntityDto;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Data Transfer Object for authentication settings
* *
*
* @package Synapse\AuthenticationBundle\EntityDto
*
*/
class AuthConfigDto
{
/**
* organizat... | true |
41189f2626ff788ac567ee5773287b0c9f493ae9 | PHP | andri000me/ppdb-junior-high-school | /input-data-sekolah.php | UTF-8 | 1,438 | 2.609375 | 3 | [
"LicenseRef-scancode-other-permissive"
] | permissive | <br />
<body bgcolor="#EEF2F7">
<?php
//cek button
if ($_POST['Submit'] == "Submit") {
//Kirimkan Variabel
$nosd= $_POST['nosd'];
$sekolahasal = $_POST['sekolahasal'];
$kepala = $_POST['kepala'];
$alamat = $_POST['alamat'];
$telp = $_POST['telp'];
//validasi data jika user dan nama kosong
if (empty($_POST['nosd'])|| em... | true |
cd0826983d3482f4c7c56d6b6510dc4a891995f7 | PHP | mpf-soft/admin-widgets | /form/fields/Autocomplete.php | UTF-8 | 2,804 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: mirel
* Date: 27.07.2015
* Time: 11:31
*/
namespace mpf\widgets\form\fields;
use mpf\web\helpers\Form;
use mpf\web\helpers\Html;
use mpf\WebApp;
use mpf\widgets\form\Field;
class Autocomplete extends Field{
/**
* If set to true then it will search for options ... | true |
99b2aae9e5d8a55d41c3d9d68938b6d8d9f7ceb8 | PHP | OlenkaV/ORM | /src/DB/Iterator/PDOResult.php | UTF-8 | 782 | 2.859375 | 3 | [] | no_license | <?php
namespace Orm\DB\Iterator;
use \PDO;
class PDOResult implements Orm\Data\Iterator {
private $stmt = null;
private $result = null;
public function __construct($pdo, $q) {
$this->stmt = $pdo->prepare($q);
$this->stmt->execute();
}
public function current() {
return ... | true |
4060ded0fd97e56cd79b0ea8719ca78f1afe4c5f | PHP | ashrafuloli/mastering-php-7 | /34. data scrambler/index.php | UTF-8 | 3,045 | 2.640625 | 3 | [] | no_license | <?php
include_once "functions.php";
$task = 'encode';
if (isset($_GET['task']) && $_GET['task'] != '') {
$task = $_GET['task'];
}
$key = 'abcdefghijklmnopqrstuvwxyz1234567890';
if('key' == $task){
$key_original = str_split($key);
shuffle($key_original);
$ke... | true |
36b6f4627f5fc3a61e30d8da6ca8cd4a2b84cda9 | PHP | kofiarhin/escobook | /model/session.php | UTF-8 | 613 | 3.125 | 3 | [] | no_license | <?php
class Session extends Model {
public $session_error;
public function validate_data($data) {
$message = [];
foreach ($data as $key => $value) {
if(empty($value)) {
$message[] = $key." is required";
}
}
if(empty($message)) {
return true;
} else {
$this->... | true |