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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0ce4ff97d94f00255ce41dda74fe531e55ad39cb | PHP | AndreevEvg/code | /php_code/foo.php | UTF-8 | 302 | 3.640625 | 4 | [] | no_license | <?php
class Foo{
static $x = "Hello John!\n";
public $text = "";
public static function getText(){
echo "Использование метода класса:\n";
for($i = 0; $i < 5; $i++){
echo "Hello World!\n";
}
}
public static function lookup($text){
return $text;
}
}
| true |
99913e622df51e5ed1683d956f4ff809a5d5f361 | PHP | danjavra/Projectes | /msg/bbdd_enviados.php | UTF-8 | 1,274 | 2.671875 | 3 | [] | no_license | <?php
require_once 'bbdd_msg.php';
//Método que devuelve el tipo de Usuario
function getTipoUsuario($username){
$con = conectar ("msg");
$query = "select type from user where username='$username'";
$resultado = mysqli_query($con,$query);
//extraemos el tipo para devolver ya el string con el tipo de user... | true |
9d92eb8a6ec58a29c7e8d1edae6ac85bf9d63344 | PHP | Andrewsas/opinar | /actions/carregaLocal.php | UTF-8 | 472 | 2.53125 | 3 | [] | no_license | <?php
require_once("../classes/Local.php");
require_once("../dao/LocalDao.php");
$Local = new Local();
$Local->locCodigo=$_GET["txtCodigo"];
$dao = new LocalDao();
$inseriu = $dao->carregaLocal($Local);
if($inseriu){
$num = 0;
foreach ($inseriu as $usr) {
$Local->locCodigo = $i... | true |
cdbfb2a4da5f7d453bec67ff397261b140ef2453 | PHP | DiluniMalsha/POS-System-Layered | /api/dto/ItemDTO.php | UTF-8 | 2,446 | 3.078125 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: HP
* Date: 7/17/2019
* Time: 4:06 PM
*/
class ItemDTO
{
private $Code;
private $Name;
Private $Price;
private $AddedDate;
private $Total;
private $Sold;
private $Returned;
/**
* ItemDTO constructor.
* @param $Code
* @par... | true |
a279e4b7a54e835881787f91bbb0a40ef9a64356 | PHP | quachvanhao2020/TetraFileManager | /src/CommandSshServer.php | UTF-8 | 993 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace TetraFileManager;
use Magento;
class CommandSshServer extends SftpServer
{
private static $instance = null;
public $host = "http://localhost:8080/ssh";
public $auth = array(
"host"=>"35.224.14.243",
"username"=>"jerry",
"password"=>"linuxpassword"
);
p... | true |
7fae86085065514a24d97f69e89ca43ea61d99b7 | PHP | BaptisteAngot/movie4 | /new_password.php | UTF-8 | 2,310 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
include 'inc/pdo.php';
include 'inc/function.php';
$error = array();
if (!empty($_GET['email']) && !empty($_GET['token'])) {
$mail = urldecode($_GET['email']);
$token = urldecode($_GET['token']);
$sql = "SELECT * FROM user WHERE email = '$mail' AND token = '$token'";
$query = $pdo -> prepare($sql);
$q... | true |
a03d9aef353d2e194fb818cca97edd7c5dd4427c | PHP | neprotod/seor | /modules/xml/classes/model/module.php | UTF-8 | 3,215 | 2.890625 | 3 | [] | no_license | <?php
/**
* Подключения XML/XSL с темы
*
* @package module/xml
* @category module
*/
class Model_Module_XML{
/**
* @var string техническое имя директории xml
*/
public $default_xml_dir = 'xml';
/**
* @var string техническое имя директории xsl
*/
public $default_xsl_dir = '... | true |
d9fa4af87fc8448ce928b5de56fdec4becee9260 | PHP | csleaf/student-list | /src/Nwoc/StudentsTableGateway.php | UTF-8 | 7,763 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Nwoc;
/**
* Provides easy to use database queries against 'students' table.
*/
class StudentsTableGateway {
const ORDER_ASC = 0;
const ORDER_DESC = 1;
private $db;
public function __construct(\PDO $pdo) {
$this->db = $pdo;
}
/**
* Registers student in database and... | true |
86ea5ad272930cfe435282d0e0917d0c6888dd57 | PHP | Rafaj-Design/WebGuru | /admin/wgframework/model/class.CampaignsLanguagesModel.php | UTF-8 | 1,007 | 2.546875 | 3 | [] | no_license | <?php
/**
* Database class for table campaigns_languages
*
* @package WebGuru3
* @subpackage wgframework/model/campaigns_languages
* @author Ondrej Rafaj ()
* @author WebGuruCMS3 Framework CMS dbModel generator (http://www.webgurucms.com)
* @version 1.0.0.0
* @wgversion 3.0.0.0
* @s... | true |
22375c3b75a22ab45f505eebce55f18ae5caf3b0 | PHP | reinaldomendes/avaliacao-maxmilhas | /lib/rbm-framework/src/Rbm/Http/Router.php | UTF-8 | 5,412 | 2.90625 | 3 | [] | no_license | <?php
namespace Rbm\Http;
use Rbm\Http\Router\Exception as RouterException;
class Router
{
/**
* @var array - List of routes
*/
protected $routes = [
'GET' => [],
'POST' => [],
'PUT' => [],
'DELETE' => [],
];
/**
* @var Rbm\Http\Request
*/
pro... | true |
3e7e3285df08a16afd3dd7bfa35423bd2599189f | PHP | Ba-Ku/BAUMGARTNER_BE_Webshop | /Controller/WebshopController.php | UTF-8 | 7,432 | 2.765625 | 3 | [] | no_license | <?php
class WebshopController extends InputValidation
{
public function __construct()
{
}
public function route()
{
if (isset($_GET['action'])) {
$selectedAction = $_GET['action'];
$validatedAction = $this->validateString($selectedAction);
$this->selec... | true |
1f2e627fa23840045a0d31de991bf4c99132c4fe | PHP | meekframework/http | /tests/ClientError/NotAcceptableTest.php | UTF-8 | 905 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php declare(strict_types=1);
namespace Meek\Http\ClientError;
use PHPUnit\Framework\TestCase;
use Meek\Http\ClientError;
class NotAcceptableTest extends TestCase
{
/**
* @coversNothing
*/
public function testIsAClientError()
{
$notAcceptable = new NotAcceptable();
$this->asse... | true |
22c6ebf68fc52a901e1f01e4d16bbeacfa848f64 | PHP | magrit-alessa/WEB-development-course | /PHP Course/Homework/Lesson_8/OlesyaBlumenko/captcha.php | UTF-8 | 559 | 2.546875 | 3 | [] | no_license | <?php
session_start();
create_img();
function create_img(){
$md5_hash = md5(rand(0,999));
$captcha = substr($md5_hash, 15,5);
$_SESSION['captcha'] = $captcha;
$width = 200;
$height = 50;
$image = ImageCreate($width, $height);
$white = ImageColorAllocate($image, 255, 255, 255);
$black = ImageColorAlloca... | true |
6799e405c08152599905641297da52f5b69da707 | PHP | santanu1122/EasyMeal | /PHP/menu_item_html_table.php | UTF-8 | 1,059 | 2.96875 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
require_once 'db/db_connect.php';
// Get all the data from the "example" table
$result = mysql_query("SELECT * FROM menu_info")
or die(mysql_error());
echo "<table border='1'>";
echo "<tr> <t... | true |
d59ecc9a4386b7003a6ec82d7bc96bcb1bb34c37 | PHP | taranehsaei/calculator | /test3.php | UTF-8 | 1,047 | 3.375 | 3 | [] | no_license | <?php
function ageCalculator($age)
{
//date in mm/dd/yyyy format
echo "please enter your birthday";
// $birthDate = $_POST;
$age = $_POST['number0'];
// $user = $_POST[$birthDate];
if (is_numeric(str_replace('.', '/', $user))) {
$birthDate = is_numeric('mm/dd/yyyy');
$user = sprintf('... | true |
ae5c92ae39272edc41a9b5a052b26b2f8d08d2ac | PHP | vinhtq115/examreg.com | /sinhvien/dangkythi/print.php | UTF-8 | 1,703 | 2.5625 | 3 | [] | no_license | <?php
session_start();
// Kiểm tra session
if(!isset($_SESSION["isAdmin"]) || $_SESSION["isAdmin"] != 0 || !isset($_SESSION["id"])) { // Nếu là admin hoặc chưa login thì cho về trang chủ
header("Location:http://examreg.com/");
}
// Kiểm tra xem có đủ điều kiện thi không. Nếu không thì cũng c... | true |
809b8730fe51fc3992665f5094131f148b95c968 | PHP | 20cen/shop | /Entity/CommandeEntity.php | UTF-8 | 8,459 | 2.578125 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of CommandeEntity
*
* @author EXACTITUMNG
*/
require_once ('../core/Bean/CommandeBean.php');... | true |
00066c33770a2d4b9e104bf4b7bbad432e102bc2 | PHP | ma74ni/php | /ajax/controllers/UserController.php | UTF-8 | 577 | 2.671875 | 3 | [] | no_license | <?php
//require_once('../models/UserModel.php');
class UserController{
private $model;
public function __construct(){
$this->model = new UserModel();
}
public function read($user_id = ''){
return $this->model->read($user_id);
}
public function create(){
$user_data = arra... | true |
82965f13c1e02de5d29699a1e8910262ce67173b | PHP | jjcare/paniers | /CRUD/edit.inc.php | UTF-8 | 2,070 | 2.640625 | 3 | [] | no_license | <?
include('db.inc.php');
if (isset($_GET['nip']) ) {
$nip = (int) $_GET['nip'];
if (isset($_POST['submitted'])) {
foreach($_POST AS $key => $value) { $_POST[$key] = mysql_real_escape_string($value); }
$sql = "UPDATE `families` SET `fnum` = '{$_POST['fnum']}' , `number` = '{$_POST['number']}' , `street... | true |
24e251535f437dfbaf5206be2558947dd2380d09 | PHP | joelarisma/aykew-prototype | /app/models/ExerciseSeries.php | UTF-8 | 859 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Eloquent\Model as Eloquent;
class ExerciseSeries extends Eloquent {
protected $table = 'exercise_series';
public $timestamps = false;
public function e1(){
return $this->hasOne('Exercise','id','ex1');
}
public function e2(){
return $this->hasOne('Exercis... | true |
0248328e7b0d9ced3ae4a0668b07b6b650c4d326 | PHP | jkeston/php_problem_sets | /php_problem_set_2/problem_set_2.2.php | UTF-8 | 710 | 3.15625 | 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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Reading a File into an Array: PHP Problem Set 2.2</title>
<link rel="s... | true |
e1c2971139d8bad2032678935e97610a20021fa7 | PHP | saulhoward/haddock-cms | /core/tags/2009-01-17/caching/classes/Caching_GlobalVarManager.inc.php | UTF-8 | 1,335 | 3.3125 | 3 | [] | no_license | <?php
/**
* Caching_GlobalVarManager
*
* @copyright Clear Line Web Design, 2007-07-25
*/
/**
* A way to look after variables that are used globally.
*
* This is safer than using the "global" keyword or putting things into
* the $_SESSION array as if an element is requested that has not been
* set,... | true |
ebe41b194e0027189b6a51c41c081700362c102b | PHP | Compolomus/ApiPrototype | /src/Utils/Template.php | UTF-8 | 1,342 | 2.875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Compolomus\Prototype\Utils;
class Template
{
private $dir;
private $ext;
public function __construct(string $dir, string $ext)
{
$this->dir = $dir;
$this->ext = $ext;
}
public function __call(string $name, array $arguments)
{
... | true |
b17d423e391a7fb6fa9f9aab0c5eb39285c2c8ab | PHP | electric-eloquence/fepper-drupal | /backend/drupal/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php | UTF-8 | 7,473 | 2.859375 | 3 | [
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-other-copyleft",
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
namespace Drupal\Core\StreamWrapper;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
/**
* Provides a StreamWrapper manager.
*
* @see \Drupal\Core\StreamWrapper\StreamWrapperInterface
*/
class StreamWrapperManager implements ... | true |
d3fd62a911024f69d45b95effa37d682cec20020 | PHP | infoshareacademy/iSA-WPL-PHPdlaJuniorow-maj-2021 | /apps/appTwo/src/Domain/HotelDescription/HotelDescriptionRepository.php | UTF-8 | 503 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Domain\HotelDescription;
interface HotelDescriptionRepository
{
/**
* @return HotelDescription[]
*/
public function findAll(): array;
public function find(string $identifier): ?HotelDescription;
public function delete(string $identifier): void;... | true |
ab9143e6d2fc7b5140303d02ff871c2618fd01dd | PHP | mislms2015/ml7uni1ve3rsi1t7y | /mluniversity/backend/models/MluUserEnrollee.php | UTF-8 | 1,715 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "mlu_user_enrollee".
*
* @property integer $id
* @property integer $user_id
* @property integer $id_number
* @property string $username
* @property integer $enrollment_id
* @property integer $course_id
* @property string $fname... | true |
218f8cc42a2e9ad7ba715346e8e9ddbc68b0c72f | PHP | inesucrvenom/practice-archive | /job-interview-php/GeoLokacije/import.php | UTF-8 | 1,882 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/*
* Import csv into database, into empty table (overwrite, not append).
* Usage: php -f import.php filename database username:password@host
* */
$usage = "# Usage: php -f import.php filename database username:password@host \n";
if (count($argv) <> 4){
echo $usage;
exit;
}
// init database connect... | true |
7c26cd88b69f05f731951acc1a3f698b43332c5a | PHP | alchiebinan21/documenttracking | /history.php | UTF-8 | 1,037 | 2.671875 | 3 | [] | no_license | <?php
class history
{
private $historyid;
private $sender;
private $pd_id;
private $comment;
private $date;
private $sendto;
private $type;
private $flow;
public function __construct($dbRow)
{
$this->historyid = $dbRow['historyid'];
$this->pd_id = $dbRow['pd_id'];
$this->comment = $db... | true |
30f9f9cfe2fd4609e4a97c7955ac7542fadbd3ce | PHP | samokiss/music-application | /src/AudioPlayer/Infrastructure/Persistence/InMemoryTrackRepositoryAdapter.php | UTF-8 | 795 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\AudioPlayer\Infrastructure\Persistence;
use App\AudioPlayer\Domain\Track\Track;
use App\AudioPlayer\Domain\Track\TrackAlreadyAddedToPlaylist;
use App\AudioPlayer\Domain\Track\TrackRepository;
class InMemoryTrackRepositoryAdapter implements TrackRepository
{
public st... | true |
c8c40050685a10e423791b84bd3add2a3d07450a | PHP | NJUCSE17/JB-Online | /app/Http/Requests/Assignment/ViewAssignmentRequest.php | UTF-8 | 1,171 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests\Assignment;
use App\Models\Assignment;
use Illuminate\Foundation\Http\FormRequest;
class ViewAssignmentRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
... | true |
d19c03d54cf20dee58f3a0516f2427a1d04f807b | PHP | sudogem/cebufreelancer | /system/application/models/users_model.php | UTF-8 | 4,502 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Users_model extends Model {
function Users_model() {
parent::Model() ;
$this->_tuser = 'users' ;
}
function get_user_by_id( $user_id, $fields = null, $result_type = 'result_array' ) {
// ($fields != NULL ) ? $this->db->select( $fields ) : '' ;
// $this->db->wher... | true |
1af02d79044f167a7e7c491b8d9b1bcc681a5ea3 | PHP | kovilas/CodeAcademy-Fullstack | /HomeWork/HomeWork 04-02/submit.php | UTF-8 | 2,243 | 2.859375 | 3 | [] | no_license | <?php
$commentsTXT = 'comments.txt';
// tikrinam, ar visi laukai užpildyti, antraip klaida
if(isset($_POST['Name']) && isset($_POST['Email']) && isset($_POST['Comment'])) {
// tikrinam, ar yra tuščių laukų, antraip klaida
if(empty($_POST['Name']) || empty($_POST['Email']) || empty($_POST['Comment'])) {
... | true |
f020a3dcb11abd9dc973721c6cd918a107e28799 | PHP | dumebi/fooCart | /app/Http/Controllers/TaxController.php | UTF-8 | 1,514 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php namespace fooCart\Http\Controllers;
use fooCart\Http\Requests;
use fooCart\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Exception;
use fooCart\src\Tax;
class TaxController extends Controller {
protected $_tax;
protected $_request;
public f... | true |
3ba07e20cde269d0b37d5d4b5ae38ee6215d40fa | PHP | moay/distributed-systems-rd | /order-microservice/src/Domain/MessageBus/Message/OrderEventBusMessage.php | UTF-8 | 543 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Domain\MessageBus\Message;
use App\Domain\MessageBus\Payload\OrderInformationMessageBusMessagePayload;
class OrderEventBusMessage
{
/** @var OrderInformationMessageBusMessagePayload */
private $payload;
/**
* OrderEventBusMessage constructor.
*/
public function __constr... | true |
1fff5e6de3ce6c6b5989e12fd052168aacb49dcd | PHP | inri13666/google-api-php-client-v2 | /libs/Google/Service/Urlshortener/Url.php | UTF-8 | 1,162 | 2.5625 | 3 | [
"Unlicense"
] | permissive | <?php
namespace Google\Service\Urlshortener;
class Url extends \Google\Model
{
protected $analyticsType = 'Google\Service\Urlshortener\AnalyticsSummary';
protected $analyticsDataType = '';
public $created;
public $id;
public $kind;
public $longUrl;
public $status;
public function setAnalytics(\Google\... | true |
be8655694250970f047e9ece0343a78a6d0b2177 | PHP | td6904/PHP-OOP-Projects | /Library & Books/Book.php | UTF-8 | 261 | 2.921875 | 3 | [] | no_license | <?php
class Book
{
public string $title;
public float $price;
public Author $author;
// TODO Generate getters and setters of properties
// TODO Generate constructor for all attributes. $author argument of the constructor can be optional
} | true |
ca50120e5bae7d894c0780405063aee608f88942 | PHP | TheCinema/ProgettoTheCinema | /esPHP/TheCinema/Prenotazione/posto.php | UTF-8 | 703 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
class PostiGest{
// constructor
public $id=0;
public $numero=0;
public $fila="";
public $disabile=""; //si o no
public $occupato=""; //si o no
public function __construct($id,$numero,$fila,$disabile,$occupato) {
$this->id = $id;
$this->numero = $numero;
$this->fila = $fila;
... | true |
aa9a4104f618fac700ee91216680d8a061275fe2 | PHP | Rundiz-WP/rundiz-downloads | /App/Controllers/Admin/Plugins/Activation.php | UTF-8 | 9,244 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Activate the plugin action.
*
* @package rd-downloads
*/
namespace RdDownloads\App\Controllers\Admin\Plugins;
if (!class_exists('\\RdDownloads\\App\\Controllers\\Admin\\Plugins\\Activation')) {
class Activation implements \RdDownloads\App\Controllers\ControllerInterface
{
use \RdDo... | true |
18d11014d576585ed80d0417b3f726f82f8221d7 | PHP | napalm255/skytrack.org | /service/weather.class.php | UTF-8 | 7,547 | 2.65625 | 3 | [] | no_license | <?php
require(dirname(__FILE__) . '/aws.phar');
date_default_timezone_set('America/New_York');
use Aws\DynamoDb\DynamoDbClient;
use Aws\Common\Enum\Region;
use Aws\DynamoDb\Enum\KeyType;
use Aws\DynamoDb\Enum\Type;
use Aws\DynamoDb\Enum\ProjectionType;
use Aws\DynamoDb\Enum\AttributeAction;
cla... | true |
9ceb489dffe4067a7fe9574463b02b692de75dcf | PHP | krnlde/dresscode | /applications/common/modules/Code/controller.php | UTF-8 | 1,585 | 2.515625 | 3 | [] | no_license | <?php
namespace Dresscode\Controller;
use \Assetic\Asset\FileAsset;
use \Assetic\Asset\StringAsset;
class Code extends \Dresscode\Controller
{
/**
* @property
* @var string
*/
protected $language;
protected static $initialize;
/**
* @var \Dresscode\Pool
*/
protected static $Pool;
public function se... | true |
793033d97fa7a2e3e74b1ef37c11e6e8ab468170 | PHP | bingo-soft/jabe | /src/Impl/Persistence/Entity/IncidentStatisticsEntity.php | UTF-8 | 879 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Jabe\Impl\Persistence\Entity;
use Jabe\Management\IncidentStatisticsInterface;
use Jabe\Impl\Util\ClassNameUtil;
class IncidentStatisticsEntity implements IncidentStatisticsInterface
{
protected $incidentType;
protected int $incidentCount = 0;
public function getIncidentType(): ?string
... | true |
4129b073b3e016022ffd6062f9fe1b90be7164b2 | PHP | primebeef/techLand | /ALL/Unit1/math.php | UTF-8 | 369 | 3.15625 | 3 | [] | no_license | <?php include "../Library/doctype.html";?><html>
<?php
$x = intval($_GET['x']);
$y = intval($_GET['y']);
?>
<head>
<!--
Assignment:
Name:
-->
<title></title>
<style>
</style>
</head>
<body>
<?php
$sum = $x + $y;
$product = $x*$y;
$average = ($x + $y)/2;
echo " x = $x <br> y = $y <br> x + y = $sum <br> x * y = $pr... | true |
243b030ddb933d6e2f63df96254be067389390bf | PHP | zeal-ming/API_Development | /application/common/model/News.php | UTF-8 | 2,942 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* AdminUser: intern
* Date: 2017/10/31
* Time: 下午3:31
*/
namespace app\common\model;
use think\Model;
class News extends Model {
//根据查询条件获取数据
public function getNewsByConditions($condition = []){
$order = [
'listorder' => 'desc',
'id' =>... | true |
3a581bb24042c535fbcb5f265b203f2962a53290 | PHP | chaudhary4k4/mycollab3 | /activecollab/4.2.3/angie/frameworks/notifications/tests/TestNotificationChannelSettings.class.php | UTF-8 | 5,293 | 2.546875 | 3 | [] | no_license | <?php
// Include test objects classes
require_once __DIR__ . "/test_objects/BaseTestObject.class.php";
require_once __DIR__ . "/test_objects/BaseTestObjects.class.php";
require_once __DIR__ . "/test_objects/TestObject.class.php";
require_once __DIR__ . "/test_objects/TestObjects.class.php";
/**
* Test ... | true |
ff144c4e34389e4bcca0188c644236a0ea82a1bc | PHP | hectoritoh/artsenal | /src/Selnet/TiendaOnlineBundle/Servicio/NotificacionService.php | UTF-8 | 1,521 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Selnet\TiendaOnlineBundle\Servicio;
use Selnet\TiendaOnlineBundle\Entity\Mensaje;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class NotificacionService extends Controller
{
private $em;
function __construct( $entityManager )
{
$this->em = $entityManager;
}... | true |
81e80e841e10cadf5491105abba368a4f9366b71 | PHP | idcu/collector | /src/Common/AdminBundle/Model/ModelManager.php | UTF-8 | 2,164 | 2.546875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Common\AdminBundle\Model;
use Sonata\DoctrineORMAdminBundle\Model\ModelManager as BaseModelManager;
use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
use Sonata\AdminBundle\Exception\ModelManagerException;
class ModelManager extends BaseModelManager{
public function delete($object)
{
... | true |
3f8ba69283a2260e19d4bcf07cc28f9c6aacb429 | PHP | bbegaidar/hse | /models/Password.php | UTF-8 | 1,042 | 2.609375 | 3 | [] | permissive | <?php
namespace app\models;
use Yii;
use yii\base\Model;
class Password extends Model{
public $password;
public $confirmpassword;
public function rules() {
return [
[ ['password','confirmpassword'],'string'],
['confirmpassword', function($attribute, $params, $val... | true |
d29981ff29b0abf00066d556e33bc0873841b05b | PHP | SemicolonStruggles/ProjectYadu | /database/migrations/2019_02_25_000017_create_account_has_followers_table.php | UTF-8 | 1,753 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAccountHasFollowersTable extends Migration
{
/**
* Schema table name to migrate
* @var string
*/
public $tableName = 'account_has_followers';
/**... | true |
092faf56c7ecc3925f7c458a439e90c9ff6f1d69 | PHP | j11e/markdown | /src/blocks/BlockQuote.php | UTF-8 | 3,199 | 3.09375 | 3 | [] | no_license | <?php
namespace j11e\markdown\blocks;
trait BlockQuote
{
public function identifyBlockQuote($lines, $currentIndex)
{
return preg_match('/^ {0,3}> ?/', $lines[$currentIndex]);
}
public function parseBlockQuote($lines, $currentIndex)
{
$done = false;
$newIndex = $currentInde... | true |
5f455d82acb658e5956571022ee98a0b5749f11d | PHP | t3v/t3v_base | /Classes/Domain/Repository/Traits/FormatTrait.php | UTF-8 | 636 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace T3v\T3vBase\Domain\Repository\Traits;
use T3v\T3vBase\Domain\Repository\FormatRepository;
/**
* The format trait.
*
* @package T3v\T3vBase\Domain\Repository\Traits
*/
trait FormatTrait
{
/**
* The format repository.
*
* @var FormatRepository
*/
... | true |
7481d0601e59f06c9efa6b4df044cfc74e7b1fd4 | PHP | ScriptSB/SQL-PHP__Multi-Category | /completed/mod/edit.php | UTF-8 | 1,424 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
if (!empty($_GET['id'])) {
$id = $_GET['id'];
$objDb = new PDO('mysql:host=localhost;dbname=products', 'root', 'password', array(
PDO::ATTR_PERSISTENT => true
));
$sql = "SELECT `c`.*,
IF (
`c`.`id` IN (
SELECT `category`
FROM `products_categories`
WHERE `product` = ?
),
1... | true |
9be446def611012a74177b88a7498bb5ec3838b3 | PHP | bcowgill/bsac-linux-cfg | /bin/template/php/functions.test.php | UTF-8 | 1,499 | 2.5625 | 3 | [] | no_license | <?php
# ./vendor/bin/phpunit --bootstrap functions.php functions.test.php
# https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html
# https://phpunit.de/manual/current/en/appendixes.assertions.html
# list all assert methods installed:
# perl -ne 's{\b((assert|expect)[A-Z]\w*)\(}{print "$1\n"}xmsge' `find ... | true |
0c555340cb27e2cbd9bc3ba57f5c9b285bba6996 | PHP | Banseok6711/php | /test/joinProcess.php | UTF-8 | 1,245 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
session_start();
$userid = $_POST["userid"];
$password = $_POST["password"];
$passwordCheck = $_POST["passwordCheck"];
$fullName = $_POST["fullName"];
$email = $_POST["email"];
$birth = $_POST["birth"];
$phone = $_POST["phone"];
// Database connect
$servername = "localhos... | true |
47a1168a38837af43778481b78aeeba81ee8d09d | PHP | rasmus0201/website-eux-teknik-smartgreenhouse | /database/seeds/SensorSeeder.php | UTF-8 | 353 | 2.5625 | 3 | [] | no_license | <?php
use App\Sensor;
use Illuminate\Database\Seeder;
class SensorSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Sensor::create(['name' => 'temperature']);
Sensor::create(['name' => 'humidity']);
Sensor::create(... | true |
aec05d4d45a1330095312496ffa82440305631a5 | PHP | mck89/peast | /lib/Peast/Selector/Node/Group.php | UTF-8 | 995 | 2.953125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* This file is part of the Peast package
*
* (c) Marco Marchiò <marco.mm89@gmail.com>
*
* For the full copyright and license information refer to the LICENSE file
* distributed with this source code
*/
namespace Peast\Selector\Node;
use Peast\Selector\Matches;
/**
* Selector group class
*
* @auth... | true |
4421c1cae45750881df80e8ce85a40057971e81d | PHP | rizal282/pdistana_block | /proses_ambil_produksi.php | UTF-8 | 1,315 | 2.515625 | 3 | [] | no_license | <?php
error_reporting(0);
include_once "koneksi.php";
$id_kry = $_POST["id_kry"];
$group = $_POST["group_kry"];
$tgl_gaji = date("Y-m-d", strtotime($_POST["tgl_gaji"]));
$tgl_awal = date("Y-m-d", strtotime($_POST["tgl_awalperiodegaji"]));
$tgl_akhir = date("Y-m-d", strtotime($_POST["tgl_akhirperiodegaji"]))... | true |
806942a848bad332d4a38a5b79808039b245fd91 | PHP | skiptirengu/stringy | /tests/StringyTest.php | UTF-8 | 6,648 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace String\Test;
use PHPUnit_Framework_TestCase;
use String\Stringy;
class StringyTest extends PHPUnit_Framework_TestCase
{
public function testBase64()
{
$this->assertEquals('Rm9vQmFyUXV4QmF6', $this->assertStr(str('FooBarQuxBaz'))->toBase64());
$this->assertEquals(str('Rm9vQmFyU... | true |
a3f0f62d7916c14f7d63a5e2625f77e8c226a3f2 | PHP | gialvarezlopez/personal_loans | /src/Services/paypal-express/class.connection.php | UTF-8 | 812 | 2.703125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
abstract class connectionDB{
private static $sServer = DATABASE_HOSTDB;
private static $sDbname = DATABASE_NAME;
private static $sUser = DATABASE_USER;
private static $sPass = DATABASE_PASSWORD;
private static $sPort = DATABASE_PORT;
private static $conn = "";
//public static $prefijo = "lp_";
public s... | true |
25c90655f93b19c03a98e520f6eef6d8d9fb5d3b | PHP | Arciles/Comp1006-CMS | /admin-list.php | UTF-8 | 3,796 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: esattahaibis
* Date: 2016-03-22
* Time: 1:52 PM
*/
require "user-header.php";
try {
// preapre sql and execute the command
// This sql is for gettin all the users from database
$sql = 'SELECT * FROM dbt_users';
$cmd = $conn -> prepare($sql);
$cmd -> execute();
$users... | true |
751f2f0989c2f18422feebb6dbb540f13626ac42 | PHP | leedahw/subbd | /delete-subb.php | UTF-8 | 3,460 | 2.71875 | 3 | [] | no_license | <?php session_start();
include("includes/standardheader.html");
//delete article
if(isset($_SESSION["userId"])){
//show page
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="visual subsc... | true |
038b521632a967298cb4afc4829b06664b414690 | PHP | REABMAX/neo4j-php-ogm | /src/Metadata/Factory/ChainGraphEntityMetadataFactory.php | UTF-8 | 2,123 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace GraphAware\Neo4j\OGM\Metadata\Factory;
use GraphAware\Neo4j\OGM\Exception\MappingException;
use GraphAware\Neo4j\OGM\Exception\MetadataFactoryException;
class ChainGraphEntityMetadataFactory implements GraphEntityMetadataFactoryInterface
{
/**
* @var GraphEntityMetadataFactoryInterface[]
... | true |
52d5ab0288eefa511753ee1c99bb653ca9282b22 | PHP | faridiqmal44/sisfo_karyawan | /detail.php | UTF-8 | 2,839 | 2.609375 | 3 | [] | no_license | <div class="container">
<?php
//cek nik
if (isset($_GET['nik'])) {
$nik = $_GET['nik'];
} else {
die ("Error. Tidak ada Nik yang dipilih Silakan cek kembali! ");
}
//koneksi ke engine mysql
$Open = include "koneksi.php";
//Tampilkan datanya dari tabel karyawan
$tampil_karyawan = "SELECT * FROM data_karyawan WHERE n... | true |
5e20ad029fbcf760e0426b4ffe0d692dab3e7a0b | PHP | Walkman100/42_camagru | /site/posts.php | UTF-8 | 3,899 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
require_once("../config/output.php");
require_once("../config/globals.php");
require_once("../config/func_posts.php");
require_once("../config/func_comments.php");
session_start();
output_head("Posts");
output_header();
print("<h1>Posts</h1><div class='posts'>");
if (isset($_GET['page']))
$index = intva... | true |
9956d264f1aada440338af65ce16e48f3e6edef5 | PHP | karunasri-acs/dailyroll | /dailyroll/class.logger.php | UTF-8 | 1,119 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
require_once 'constants/constants.php';
class LOGGER
{
private $cfile;
private $dirfile;
public function __construct($file,$dir){
$this->cfile = $file;
$this->dirfile =$this->slashdir($dir);
}
public function event_log($text, $level) {
if(!($level=='d' && !DEBUGFLAG)){
switch (strtolo... | true |
ac9179aba87fc0297e9aae3233507e97b26eff0e | PHP | Pipemahu/labsshen | /php/PesosAPalabra.class.php | ISO-8859-10 | 5,334 | 3.03125 | 3 | [] | no_license | <?PHP
/*
Analizador de montos numericos a montos en letra en espaol
Copyright (C) Juan Carlos Gonzalez BenzaHosting.cl
Version 1.0
------------------------------------------------------------
Modo Uso:
require('PesosAPalabra.class.php');
$NumeroAPalabra = new PesosAPalabra(15288.33);
echo $NumeroAPalabra->getMonto... | true |
ecd5c9672d1238be4739cfe0063d7bd62793098b | PHP | technoexponent02/angular1 | /app/Http/Middleware/AfterMiddleware.php | UTF-8 | 1,314 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
use Session;
class AfterMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($reque... | true |
4e4e57b6378e5195c6c0fb5f987b3104aa507045 | PHP | NeTRuS-dev/infocom_dean | /models/Student.php | UTF-8 | 4,249 | 2.703125 | 3 | [] | no_license | <?php
namespace app\models;
use yii\db\ActiveRecord;
/**
* This is the model class for table "{{%student}}".
*
* @property int $id
* @property string $name
* @property string $surname
* @property string $patronymic
* @property string $date_of_birth
* @property string $year_of_receipt
* @property int $academ... | true |
79e966a6216b41a87330a3218598718b1208eac4 | PHP | ISRAEL-DUFF/inventory-manager-api | /application/models/Auth_model.php | UTF-8 | 1,307 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Auth_model extends CI_Model{
private $name;
private $email;
private $password;
public function __construct(){
$this->load->database();
}
public function create($tablename,$data)
{
$query = $this->db->insert($tablename, $da... | true |
0e4f1471855df2eab0a1d570508efc6dc510a7f5 | PHP | BhagyaRana/SVNIT_Study_Material_First_Year | /Semester_2_First_Year/6-Web_Programming[Branch Specific Course-II]/4.) PHP/PHP/WP-php/require/noFileExists_require.php | UTF-8 | 874 | 3.125 | 3 | [] | no_license | <!-- (here there is no file called 'hello.php' exists)
when a file is included with the require statement and PHP cannot find it,
the require() function generates a fatal error and halts the execution of the script.
so here the echo statement will not be executed because the script execution dies after the require ... | true |
aed3eda8ab04707d66327fa49e97565b23632a70 | PHP | CD93/seinesaintdenis | /spip/plugins/alaune/base/alaune.php | UTF-8 | 2,283 | 2.578125 | 3 | [] | no_license | <?php
/**
* Déclarations relatives à la base de données
*
* @plugin gestion une
* @copyright 2013
* @author samuel et damien
* @licence GNU/GPL
* @package SPIP\Alaune\Pipelines
*/
if (!defined('_ECRIRE_INC_VERSION')) return;
/**
* Déclaration des alias de tables et filtres automatiques de cha... | true |
85d0a4dd3c51412da9984a6c96ba73d90327b154 | PHP | michaelrnz/nuclear-api | /wrap.xml.php | UTF-8 | 606 | 2.96875 | 3 | [] | no_license | <?php
/*
nuclear.framework
altman,ryan,2008
NuclearXMLWrapper
==========================================
data building in xml format
Wrap DOMDoc to enable stringing
TODO
copy Exception handling DOM Document
implement toString()
expire this wrapper
*/
class NuclearXMLWrapper
{
//
// xml ... | true |
8a8a99d7efa21223e1e77970cb2df0333c54f2ac | PHP | lifya/ecome | /application/models/model_register.php | UTF-8 | 1,888 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_register extends CI_Model { //model "Model_products"
public function all() //function dengan nama all
{
//query semua record di table products
$hasil = $this->db->get('users2'); //memasukkan nilai variab... | true |
95b5db552d949f25beddb10d104a9dbde9aadcb4 | PHP | floatphp/Classes | /src/Security/Password.php | UTF-8 | 2,117 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author : JIHAD SINNAOUR
* @package : FloatPHP
* @subpackage : Classes Security Component
* @version : 1.0.2
* @category : PHP framework
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
* @link : https://www.floatphp.com
* @license : MIT
*
* This file if... | true |
a97af694f33bfc6ef5f860cb8a28d4274a64b474 | PHP | Mary78234/laravel-boolpress | /app/Http/Requests/PostRequest.php | UTF-8 | 1,426 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class PostRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the v... | true |
2e65884dca1fb32fb957aab73c88a750f77476d3 | PHP | cjobcn/DOMPartitionParser | /application/index/Parser/Template12.php | UTF-8 | 6,965 | 2.546875 | 3 | [] | no_license | <?php
namespace app\index\Parser;
class Template12 extends AbstractParser {
//区块标题
protected $titles = array(
array('career', '工作经历:'),
array('projects', '项目经验:'),
array('education', '教育经历:'),
array('skills', '技能:'),
array('languages', '语言水平:'),
);
//关键字解析规则
... | true |
9188e22cf9401d5c6ade189cbb6cc718dc264eb3 | PHP | phamarcy/project | /application/document/search_document.php | UTF-8 | 1,633 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
session_start();
require_once(__DIR__.'/../class/course.php');
require_once(__DIR__.'/../class/person.php');
$course = new Course();
$person = new Person();
if(isset($_POST['type']))
{
if(isset($_POST['instructor_id']))
{
$instructor_id = $_POST['instructor_id'];
}
else
{
$instructor_id = null;
... | true |
8092c0ed93085d22a710550e809f975c9ae9577a | PHP | DanilB97/yii2test | /models/Cart.php | UTF-8 | 726 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
class Cart
{
public static function addToCart(Product $product, $qty = 1)
{
$qty = intval($qty);
if (!isset($_SESSION['cart'][$product->id])) {
$_SESSION['cart'][$product->id] = [
'qty' => $qty,
'img' => $product->img,
... | true |
d2811cddcde70818a1833c13a4df5c1657beb85f | PHP | samadhiMaheshika/LMS---Group | /login.php | UTF-8 | 2,910 | 2.6875 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION['role'])){
header('location: welcome.php');
}
if (isset($_POST['submit'])) {
include_once("functions/connection.php");
$email = strip_tags($_POST['email']);
$password = strip_tags($_POST['password']);
$sql = "SELECT `stdno`,`fname`,`email`,`password` from ... | true |
73946dbb7b01fb5cfefc64bac3dea81afe35dc59 | PHP | google-code/alkemann | /models/behaviors/drafted.php | UTF-8 | 11,672 | 2.828125 | 3 | [] | no_license | <?php
/**
* Drafted behavior.
*
* @license MIT
* @url http://code.google.com/p/alkemann
* @author Alexander Morland aka alkemann
* @author Ronny Vindenes
* @modified 27. january 2009
* @version 1
*/
class DraftedBehavior extends ModelBehavior {
/**
* Behavior settings
*
* @access publ... | true |
443b5eae0ca9ffdce962838a856144af5727c071 | PHP | haskellcamargo/rawr | /old/Data.Either.Right.php | UTF-8 | 2,198 | 2.65625 | 3 | [] | no_license | <?php
# @author => Marcelo Camargo
# @contributors => []
# @creation_date => Unkown
# @last_changed => 2015-02-24
# @package => Data.Either.Right
# Copyright (c) 2014 Marcelo Camargo <marcelocamargo@linuxmail.org>
#
# Permission is hereby granted, free of charge, to any person
# obtain... | true |
dffbb799ffd88ca2598b4af4a400bf66df2b5fd8 | PHP | Nicolassmaniotto/rest_api_php_marvel | /marvel_app_db/enviadados.php | UTF-8 | 1,289 | 2.71875 | 3 | [] | no_license | <?php
//funcao que envia json
function enviadadosDB_personagems(){
//conecta com o obj
include_once 'mariadb/conectar_obj.php';
//
//url se a imagem nao existe
$image_not_found = "http://i.annihil.us/u/prod/marvel/i/mg/b/40/image_not_available.jpg";
//
//query sql
$query = "SELECT * FROM... | true |
9107daaa5da6f7c97f800ec8455410d49d3d9ec2 | PHP | TimotMar/devnetwork-online | /controller/backend.php | UTF-8 | 7,447 | 2.8125 | 3 | [] | no_license | <?php
/*
*This file regroups all the functions used on the website
*
*
**/
require_once('model/PostManager.php');
require_once('model/CommentManager.php');
require_once('model/UserManager.php');
//protection of written datas
function e($string)
{
if ($string) {
return htmlspecialchars($string... | true |
fc9aca19ab699328c15dbe7bbbb6fcdb6021ae31 | PHP | kxiaozhuk/parkphp | /models/User.php | UTF-8 | 2,555 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use app\dao\UserInfo;
use yii\db\ActiveRecord;
use yii\web\IdentityInterface;
class User extends ActiveRecord implements IdentityInterface
{
public static function tableName(){
return 'oauth_users';
}
/**
* @inheritdoc
*/
public static function findIden... | true |
499599208f0dd40b6fc46ff57b143ebff800000e | PHP | azizismailov872/jorgo | /common/modules/content/models/forms/EditMenuCategoryForm.php | UTF-8 | 1,038 | 2.546875 | 3 | [] | permissive | <?php
namespace common\modules\content\models\forms;
use Yii;
use yii\base\Model;
use common\modules\content\models\MenuCategories;
/**
* Edit in menu category in MenuCategories model form
*/
class EditMenuCategoryForm extends Model
{
const SCENARIO_DEFAULT = 'default';
const SCENARIO_UPDATE = 'update';
public... | true |
d62147f6a127a2206f34ea6123c816eb4670ff5f | PHP | IntellexApps/color | /tests/plugin-ArrayCMYK.test.php | UTF-8 | 1,125 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use Intellex\Color\Parser\CMYKArrayParser;
// Valid
$valid = [
[ [ 0.34, 0.92, 0.22, 0.78 ], [ 0.34, 0.92, 0.22, 0.78 ] ]
];
foreach ($valid as $rule) {
$color = (new CMYKArrayParser())->parse($rule[0]);
if ($color === null || $color->getCMYK()->getCyan() === $expected[0] && $color->getCMYK()->getMagenta() =... | true |
d89f44ff3ac499ea118bc416376aaaa9e9b4c7eb | PHP | sergey-program/Yii-2.x-Blog | /modules/backendNewsCategories/controllers/CategoryController.php | UTF-8 | 2,316 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\backendNewsCategories\controllers;
use app\models\Category;
use app\modules\backendNewsCategories\controllers\_extend\AbstractController;
use app\modules\backendNewsCategories\models\_searchCategory;
/**
* Class IndexController
*
* @package app\modules\backendNewsCategories\controllers... | true |
d9ae4fcd5114b68de049b3157c0f206a24bd4610 | PHP | andrejbranch/coldlog | /src/ColdLog/Bundle/MainBundle/Serializer/Serializer.php | UTF-8 | 746 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace ColdLog\Bundle\MainBundle\Serializer;
interface Serializer
{
/**
* Converts a given object instance to an array.
*
* @param object $object
* @return array
*/
function toArray($object);
/**
* Converts a given object instance to json.
*
* @param object $objec... | true |
49b5e6a3916bb00ef81545e43671f5a824fc9e5b | PHP | iqnection-programming/silverstripe-formbuilder | /src/Forms/GridField/SubmissionsExportButton.php | UTF-8 | 2,658 | 2.53125 | 3 | [] | no_license | <?php
namespace IQnection\FormBuilder\Forms\GridField;
use SilverStripe\Forms\GridField;
use League\Csv\Writer;
use SilverStripe\Core\Config\Config;
use SilverStripe\ORM\DataObject;
use IQnection\FormBuilder\Model\Submission;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
class Submiss... | true |
1174ec70e6c1b26f142ee8d68e3515a741daeadf | PHP | Wingly-Company/apidoc | /src/Writers/MarkdownWriter.php | UTF-8 | 1,481 | 2.59375 | 3 | [] | no_license | <?php
namespace Wingly\ApiDoc\Writers;
use Illuminate\Support\Facades\View;
class MarkdownWriter extends Writer
{
public function generate()
{
$this->generateIndex();
$this->generateIntroduction();
$this->generateEndpoints();
}
public function generateIndex()
{
... | true |
0b249b56d4d2f48ce7056b7e2b048429c4116235 | PHP | 8moustapha8/website | /backend/Db/Json/JPersona.php | UTF-8 | 4,358 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Work
* Date: 2015/07/26
* Time: 13:15
*/
namespace Db\Json;
use Db\Utility\ArrayUtils;
use Db\Utility\FieldUtils;
class JPersona extends JObjectRoot implements JSONInterface
{
public $PersonaId;
public $Identity;
public $Name;
public $DescriptionLong;
... | true |
3f53710b666378bcf2d4bd63595c4166b932b035 | PHP | TomoakiNagahara/op-unit-http | /Http.class.php | UTF-8 | 1,153 | 2.65625 | 3 | [] | no_license | <?php
/**
* unit-http:/Http.class.php
*
* @creation 2019-03-24
* @version 1.0
* @package unit-http
* @author Tomoaki Nagahara <tomoaki.nagahara@gmail.com>
* @copyright Tomoaki Nagahara All right reserved.
*/
/** namespace
*
* @creation 2019-03-24
*/
namespace OP\UNIT;
/** Used class
*
* @creatio... | true |
af7e9abe14ea8442377d3e44ea5adb04dc298ac3 | PHP | wp-plugins/cocon-semantique | /Navigation.php | UTF-8 | 2,353 | 2.703125 | 3 | [] | no_license | <?php
/**
* Navigation: prev and next post.
*/
if(!class_exists('CoconSemantiqueNavigation'))
{
class CoconSemantiqueNavigation
{
public function __construct() {
add_filter('next_post_link', array($this, 'next'), 10, 2);
add_filter('previous_post_link', array($this, 'previous'), 10, 2);
a... | true |
11b8fe165dc8064c6a795a105f7dcf35cb51bf5d | PHP | kourawy/Ibrahima-BALDE | /Projet1/tris/lib/fonctionsComparaison.php | UTF-8 | 3,850 | 3.390625 | 3 | [] | no_license | <?php
require_once("lib/fonctionsLivre.php");
/* compare de entiers en fonction de leur valeurs absolue
Param $i: un entier
param $j: un entiers
return: un entier positif si $i > $j, entier negatif si $i < $j ou 0 si $i == $j
*/
function compareAbs($i, $j){
return abs($i) - abs($j);
}
/* compare deux chaines de car... | true |
fb04cfd6a7727b581e4dfecec1de7021100482d3 | PHP | htl3r-Freepoint/backend | /src/Entity/Kasse.php | UTF-8 | 990 | 2.625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\KasseRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=KasseRepository::class)
*/
class Kasse
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type=... | true |
0e89bb734a9a46511131ed8f23b65e5f3121ab4a | PHP | borislavtotev/Team-SEAWORLD | /system/models/user.php | UTF-8 | 5,189 | 3.078125 | 3 | [] | no_license | <?php
class User
{
private $userId;
private $userName;
private $email;
public function __construct( $id )
{
$getUserIdQuery = "SELECT username, email FROM users WHERE userid='$id'";
$result = $GLOBALS[ 'mysqli' ]->query( $getUserIdQuery ) or die( mysqli_error( $GLOBALS[ 'mysqli' ] ) );... | true |
efa0ccfa4bc26b4142a17fd95b9e12ac6be78d49 | PHP | ronb-il/laravel-admin | /app/Http/Middleware/AuthenticatePrivate.php | UTF-8 | 1,139 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Config;
use Closure;
use Illuminate\Support\Facades\Auth;
class AuthenticatePrivate
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
... | true |
0c9b6ad75b1604f9ca30f292fcb875526cdf4d69 | PHP | patrickgao0922/cgi-bin | /gateway_json.php | UTF-8 | 2,342 | 2.578125 | 3 | [] | no_license | <?php
include_once("./DbConfig.php");
include_once("./config.php");
// igloohomecontrol.com/iGloo/cgi-bin/c.php?c=HG10301114N&d=y
// Require https
/*if ($_SERVER['HTTPS'] != "on")
{
$url = "https://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
header("Location: $url");
exit;
}*/
if ($_GET... | true |
df59fa60ed01efb6788e30c7cca65feef4f80cac | PHP | 3150592OCAD/SCTM2005 | /assignment1/validate.php | UTF-8 | 1,050 | 2.609375 | 3 | [] | no_license | <?php
function validate($username,$password){
$database = ".htdata";
$database = file($database, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$identity = 0;
$hash = 'none';
$found = false;
foreach($database as $line){
$data = explode(':',$line);
... | true |
e1f2ba5f316a19a4cb9b4d0865c5df6e2c63b151 | PHP | tony-tran/en-marche.fr | /src/Statistics/Acquisition/Calculator/CommitteeMemberCalculator.php | UTF-8 | 2,630 | 2.59375 | 3 | [
"GPL-3.0-only",
"Apache-2.0"
] | permissive | <?php
namespace App\Statistics\Acquisition\Calculator;
use App\Entity\Reporting\CommitteeMembershipAction;
use App\Repository\CommitteeMembershipHistoryRepository;
use App\Statistics\Acquisition\Calculator\Category\AdhesionCategoryTrait;
use App\Statistics\Acquisition\StatisticsRequest;
class CommitteeMemberCalculat... | true |
60346a07270a65d0bd5271b8d97bdab5a4332085 | PHP | JVMartin/angel-core | /src/commands/AngelAssets.php | UTF-8 | 1,467 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php namespace Angel\Core;
use Illuminate\Console\Command;
class AngelAssets extends Command {
/**
* The console command name.
*
* @var string
*/
protected $name = 'angel:assets';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Publish all Angel package asset... | true |