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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2c9725338cfe71f9db07dde44d98738770876e58 | PHP | RandyOfosu/PHP-BASIC | /4-Arithmetics/taak03/index.php | UTF-8 | 155 | 2.890625 | 3 | [] | no_license | <?php
$getal1 = 100;
echo "de score van ++ is ".++$getal1."<br>"."de score van -- is ".--$getal1."<br>"."dit is om te checken of -- werkt ".--$getal1;
?> | true |
ea18fa07264b5d13ca0c2229c187fa223147b115 | PHP | codedoct/blog-engine | /upload-download-file/model.php | UTF-8 | 324 | 2.609375 | 3 | [] | no_license | <?php
class FileController
{
public function saveFile($name)
{
include 'connection.php';
$sql="INSERT INTO upload_and_download_file (name,created_at) VALUES ";
$sql.="('$name',NOW())";
$save = mysql_query($sql,$db);
if ($save) {
return true;
} else {
echo "Error";
}
}
... | true |
5ed674ab11debee511d38f9660fcc65cfa395358 | PHP | harrieanto/repository | /framework/Environment/ValidatorEnvironment.php | UTF-8 | 2,138 | 2.90625 | 3 | [] | no_license | <?php
namespace Repository\Component\Environment;
use Repository\Component\Environment\Exception\EnvironmentException;
/**
* Environemt Identity Validator.
*
* @package \Repository\Component\Environment
* @author Hariyanto - harrieanto31@yahoo.com
* @version 1.0
* @link https://www.bandd.web.id
* @... | true |
f32087cf7ea8e4837ed84414d4958ac44cdfceb3 | PHP | FriendsOfShopware/packages | /src/Controller/Notify.php | UTF-8 | 2,448 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Controller;
use App\Entity\Package;
use App\Repository\PackageRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
class Notif... | true |
5443e9a0cfa5ef1aebc0cda37025b65c38f64d16 | PHP | tflori/orm | /tests/Entity/Examples/StudlyCaps.php | UTF-8 | 451 | 2.890625 | 3 | [] | no_license | <?php
namespace ORM\Test\Entity\Examples;
use ORM\Test\TestEntity;
/**
* @property string someVar
* @property string newVar
*/
class StudlyCaps extends TestEntity
{
protected $anotherVar = 'foobaz';
public function onChange($var, $oldValue, $value)
{
}
public function setAnotherVar($value)
... | true |
837051bff4d9f55ae7a57d3f771bb9582663a60e | PHP | cammino/magento-widgets | /Helper/Data.php | UTF-8 | 1,852 | 2.703125 | 3 | [] | no_license | <?php
class Cammino_Widgets_Helper_Data extends Mage_Core_Helper_Abstract
{
/* Calcula porcentagem de desconto do produto */
public function getPercentageDiscount($product){
$originalPrice = $product->getPrice();
$finalPrice = $product->getFinalPrice();
if ($originalPrice > $finalPrice) {
$per... | true |
4190a28beae089f666c03155d27d842e5d4a08f1 | PHP | antoniocastilla/dweseOrdenado | /ejercicioUsuarios/classes/UploadMultiple.php | UTF-8 | 6,284 | 2.96875 | 3 | [] | no_license | <?php
/*
Cuántos archivos venían y cuántos ha podido subir
Si le pido el nombre me tiene que da los nombres con los que guarda los archivos
El keep se queda con el prime archivo
el overwrite con el ultimo
Y con el rename con todos, por lo que al cambiar el nombre se lo cambio a todos
El maxSize es solo para uno
*/
cl... | true |
9b7b79b2a16e5ce2f2fd53987d8d1930e494248e | PHP | romlinas/www | /javascript/dz/dz_2.php | UTF-8 | 717 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script type="">
var contry = ["Italy", "France", "Brazil", "USA", "Mongolia"];
var people = [10000, 20000, 30000, 40000, 50000];
document.write(contry[1] + ' - ' + people[1] + '<br>');
document.write(contry[0] + ' - '+ people[0] + ';' + '<br>' + co... | true |
51a007382f9561f4167c49d2418838d1619f610a | PHP | yorker/Hello-World | /core/Extensions/admin.php | UTF-8 | 1,565 | 2.578125 | 3 | [] | no_license | <?php
/**
* Admin Component Class
* Create On Feburary 20, 2011
* Author By Yorker
*/
class AdminExtension extends Extension {
public function __construct() {
parent::__construct();
}
public function adminLogin($admin_name, $password) {
$admin = $this->db->getRow("SELECT * FROM " . $this->db->table('sys_admi... | true |
7d40ebd0f2d1203941b661b58c18ca929e7a3944 | PHP | sean3z/uievolution-feed | /api/article.php | UTF-8 | 1,823 | 3 | 3 | [] | no_license | <?php
header('Content-type: application/json');
header('Access-Control-Allow-Origin: *');
class Article {
private $url, $article, $type;
public function __construct($url, $type) {
$this->url = $url;
$this->type = $type;
$this->article = $this->parse($this->scrape());
}
private function scrape() {
$ch = ... | true |
c89f19090f2fdaa29d3368e8db4ff9502e2ccbd2 | PHP | 4spacesdk/CI4OrmExtension | /Examples/Controllers/Crud.php | UTF-8 | 5,136 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php namespace OrmExtension\Examples\Controllers;
use CodeIgniter\Controller;
use DebugTool\Data;
use OrmExtension\DataMapper\ModelDefinitionCache;
use OrmExtension\Examples\Entities\User;
use OrmExtension\Examples\Models\ColorModel;
use OrmExtension\Examples\Models\RoleModel;
use OrmExtension\Examples\Models\UserMod... | true |
a98a3a9ed6063ec16de926f6c62191392375fff2 | PHP | PhpPlaisio/table-overview | /src/TableColumn/UniTableColumn.php | UTF-8 | 8,369 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Plaisio\Table\TableColumn;
use Plaisio\Helper\Html;
use Plaisio\Helper\RenderWalker;
use Plaisio\Kernel\Nub;
use Plaisio\Table\OverviewTable;
/**
* Abstract parent class for generating HTML code for table cells in an overview table.
*/
abstract class UniTableColumn implemen... | true |
ebbc27b8915922684405ac6e1ecc6985141f231f | PHP | oLucasPopov/livraria_online_php | /Classes/Livro.php | UTF-8 | 4,533 | 3.15625 | 3 | [] | no_license | <?php
include_once '../bd/db.php';
class Livro
{
private int $idLivro;
private string $nome;
private string $autor;
private string $isbn;
private int $paginas;
private float $preco;
private function validate($nome, $autor, $isbn, $paginas, $preco)
{
$ok = true;
$this->m... | true |
0435c88b336ee6090634eaf70b9f649832602e68 | PHP | deepaknekkadapu/hbdi | /project/z_project/problem.php | UTF-8 | 1,764 | 2.53125 | 3 | [] | no_license | <?php
echo "<form id='fileChkBox'>";
if (!isset($title_project_short)) {
error_log("\$title_project_short is empty.", 0);
} else {
$file_path = $_SERVER['DOCUMENT_ROOT'] . "/hbdi/projects/$username_hbdi/$title_project_short" . "_files/";
}
$files = scandir($file_path);
foreach ($files as $filename) {
if (($... | true |
739636edc3adf567ac11923603814dbdd51c24e6 | PHP | jamesqin-cn/online_chart | /models/chdl.php | GB18030 | 801 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
*
ͼͼ
ͼ
chdl=<һͼ>|< n ͼ>
ͼchdlɫchcoʹá
*/
class chdl
{
private $_strChdl = null;
private $_arrChdl = null;
function __construct($strChdl = null)
{
$this->_strChdl = $strChdl;
$this->_strChdl = urldecode($this->_strChdl);
$this->_strChdl = mb_convert_encoding($this->_strChdl, 'gbk', 'utf8');
... | true |
a0bbcddf84807d1d7fc8d9c16ce9ce0a3a8dad51 | PHP | jokerai-draft/lpthw-php7 | /ex58/env2/case34andmore/case35/Rectangle.php | UTF-8 | 519 | 3.53125 | 4 | [] | no_license | <?php
class Rectangle extends Shape
{
public $length;
public $width;
public $diagonal;
public function __construct($length, $width) {
$this->length = $length;
$this->width = $width;
$this->area = $this->length * $this->width;
$this->perimeter = $this->length * 2 + $thi... | true |
3e7519392776f275fc2f918d7fa701bf606cec2b | PHP | Bling-SH/php-pp-elektroniczny-nadawca | /src/StructType/KategoriePowodowReklamacjiType.php | UTF-8 | 5,465 | 2.5625 | 3 | [] | no_license | <?php
namespace Bling\PocztaPolska\ElektronicznyNadawca\StructType;
use WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for kategoriePowodowReklamacjiType StructType.
*/
class KategoriePowodowReklamacjiType extends AbstractStructBase
{
/**
* The nazwa
* Meta information extracted fr... | true |
665ad51843b1fca5bc9a8dd51fadc987936cd790 | PHP | idreamsoft/iTask | /iPHP/core/iMysql.class.php | UTF-8 | 16,554 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* iPHP - i PHP Framework
* Copyright (c) 2012 iiiphp.com. All rights reserved.
*
* @author coolmoo <iiiphp@qq.com>
* @site http://www.iiiphp.com
* @licence http://www.iiiphp.com/license
* @version 1.0.1
* @package iDB
* @$Id: iMysql.class.php 2412 2014-05-04 09:52:07Z coolmoo $
*/
define('OBJECT', 'OBJECT');... | true |
7e5ed64d2d26061aad0b0ac6f6b24b1790f01970 | PHP | rahmat1996/mcsy | /application/models/Model_recorder.php | UTF-8 | 1,873 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') or exit('No direct script allowed!');
/**
* Create by MiniProgrammer
*/
class Model_recorder extends CI_Model {
private $table = 'recorder';
function __construct() {
parent::__construct();
$this->load->database();
}
public function get_all($limit, $start ... | true |
9ffad6c613bff35f578d64ba37991438fef4fa9f | PHP | ViachViach/MetzlerVater | /app/DTO/Controller/Request/PostCreateRequest.php | UTF-8 | 521 | 2.921875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\DTO\Controller\Request;
use DateTimeInterface;
class PostCreateRequest
{
private string $title;
private string $text;
public function getTitle(): string
{
return $this->title;
}
public function setTitle(string $title): void
{
... | true |
60220966d1fe01baf1bd59a0790be7c9ce4b11e9 | PHP | DjamilaC/formation | /Back/PHP_PROCEDURAL_WEBFORCE3/05-cookie/pays.php | UTF-8 | 2,877 | 2.859375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- link bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/boo... | true |
249ae889e3616e204408843132322d65967762a4 | PHP | ManikandanGanesan/SyscloudLogger | /src/SCLogConfig.php | UTF-8 | 3,280 | 2.609375 | 3 | [] | no_license | <?php
namespace SyscloudLogger\SCLogger;
class SCLogConfig
{
/**
* initialize Configurations
* @param type $channel - Channel Name.
* @param type $appName - Application Name.
*/
public function __construct($channel, $configs)
{
$this->_stream = "";
$this->_chan... | true |
ebb275b05e56c111773e5d6ea02dca913c3f0e36 | PHP | EduIsfun/Tribal-dashboard | /new/principal/action_04062019.php | UTF-8 | 27,514 | 2.578125 | 3 | [] | no_license |
<?php
session_start();
include('db_config.php');
include('model/Teacher.class.php');
include('model/Dashboard.class.php');
include('model/Download.class.php');
error_reporting(0);
$teacher = new Teacher();
$dashboard = new Dashboard();
$sql = "SELECT * FROM teacher_login WHERE userID = '".$_SESSION['ui... | true |
15e7908099423882ec055cf974d5764b76f7e24d | PHP | crazy-genius/libs-io | /src/CrazyGenius/Libs/Io/AsyncReader.php | UTF-8 | 1,033 | 3.125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace CrazyGenius\Libs\Io;
final class AsyncReader
{
/**
* AsyncReader constructor.
*
* @param resource $resource
*/
private function __construct(private $resource)
{
}
/**
* @param resource $resource
*
* @return static
*... | true |
38ce5689e5fe987bd40fa66138b829eae3d6644f | PHP | dsite/cscce-wireframes | /public/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-user-profile/src/UserFields.php | UTF-8 | 1,997 | 2.59375 | 3 | [] | no_license | <?php
namespace MBUP;
class UserFields {
private $fields = [
'user_login',
'user_email',
'user_pass',
'user_pass2',
'user_nicename',
'user_url',
'display_name',
'role',
'user_registered',
];
public function __construct() {
// Hide user fields in the admin.
add_filter( 'rwmb_outer_html', [$thi... | true |
c0bafb58f2b2bef4c9809c5810c10a1cc3792af8 | PHP | BGCX262/zym-svn-to-git | /tags/release-0.5.0PR/demo/library/Zym/Timer.php | UTF-8 | 4,090 | 3.03125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | <?php
/**
* Zym Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
*
* @category Zym
* @package Zym_Timer
* @copyright Copyright (c) 2008 Zym. (http://www.zym-project.com/)
* @license http://www.zym-project.com/license Ne... | true |
db786115576ad6d8801480cee905145adaec1ca8 | PHP | guptaniki/crestinfotech | /php/datatype.php | UTF-8 | 487 | 3.71875 | 4 | [] | no_license | <?php
// is_integer
$a=10;
echo "interger=",$a."<br>";
var_dump($a);
// string
$b="abd";
echo "string=",$b."<br>";
var_dump($b);
// float
$c=10.3;
echo "float=",$c."<br>";
var_dump($c);
// array
$d = array("abs","mng","asp");
var_dump($d);
// object
class company
{
public $name="creat infotech";
function info()
... | true |
29e1bf035e5dee6521de13491bf310d4377094a3 | PHP | dkduyanh/cms | /application/common/models/main/CronJob.php | UTF-8 | 752 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\main;
use common\models\main\dao\TblCronjobs;
class CronJob extends TblCronjobs
{
const STATUS_RUNNING = 3,
STATUS_QUEUED = 2,
STATUS_ACTIVE = 1,
STATUS_INACTIVE = 0;
const TYPE_TERMINAL = 'TERMINAL',
TYPE_FUNCTION = 'FUNCTION... | true |
63b716e99167ea72ba3670ca3b8a586c600e502c | PHP | enricofoschi/hausmietenfinder | /HausMietenFinder/app/vendors/devdes/helpers/core/ConfigHelper.php | UTF-8 | 1,100 | 2.5625 | 3 | [] | no_license | <?php
namespace DevDes\Helpers\Core;
class ConfigHelper {
/**
* @return mixed main project configuration
*/
public static function GetMainConfig() {
return CacheHelper::GetStatic("main_config", function() {
$config = include CoreHelper::GetAppRoot() . "config/config.php";
... | true |
7051bb9b06f15ed813ac87e3e5f92947f9f48cb6 | PHP | BlackScorp/funci | /source/Core/Router.php | UTF-8 | 1,350 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
function router($path = null, $action = null, $methods = 'POST|GET',bool $directRequestDisabled = false) {
static $routes = [];
if(!$path){
return $routes;
}
if(strpos($path, '..') !== false){
return;
}
if ($action) {
return $rout... | true |
6b3e0d6e3b185ac0831c00ddf8e4fefbc4983ffb | PHP | joeydan1/epay | /app/Providers/myEbankPayBase.php | UTF-8 | 2,931 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/*网银支付*/
namespace App\Providers;
class myEbankPayBase
{
public $priKey;
public $pubKey;
public $params;
public $mode;
public $post;
function getSignVeryfy($para_temp, $sign, $key) {
return 'debug';
//file_put_contents("./sd_notifyUrl_log_Dan.txt", date("Y-m-d H:i:s") . "... | true |
1cde6003c198a68cc307bd8f45861a3460a6c9c9 | PHP | pjukarainen/Tsoha-Bootstrap | /app/controllers/player_controller.php | UTF-8 | 2,497 | 2.71875 | 3 | [] | no_license | <?php
Class PlayerController extends BaseController {
public static function index() {
$players = Player::all();
View::make('players/index.html', array('players' => $players));
}
public static function show($id) {
$player = Player::find($id);
View::make('players/player_inf... | true |
89b8af0c6184c8ede9fca5acedb641f4904ffc0a | PHP | natashaval/PWeb--MoeLearn- | /php/mangafunctions.php | UTF-8 | 5,595 | 2.640625 | 3 | [] | no_license | <?php
include ('dbconfig.php');
$db = mysqli_connect($host, $user, $pass, $database, $port);
if (!$db){
die("Error: Connection Failed! in Manga");
}
if (isset($_POST['submit_manga'])&&isset($_SESSION['user'])) {
if(submitimg()){
submitideas();
header("location: moemanga.php");
}
// header("locati... | true |
8140f86f25281e688143311eeafb64aac0b1c45a | PHP | yongtiger/yii2-attachment | /src/models/Attachment.php | UTF-8 | 3,117 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php ///[Yii2 attachment]
/**
* Yii2 attachment
*
* @link http://www.brainbook.cc
* @see https://github.com/yongtiger/yii2-attachment
* @author Tiger Yong <tigeryang.brainbook@outlook.com>
* @copyright Copyright (c) 2017 BrainBook.CC
* @license http://opensource.org/licenses/MIT
*/
... | true |
de31eb3b04e1a754a23225b0cd44a5f0ff5f89c9 | PHP | mrs-joker/trade | /src/Rbac/AbstractCommands.php | UTF-8 | 1,271 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace MrsJoker\Trade\Rbac;
use Illuminate\Database\Eloquent\Model;
use MrsJoker\Trade\Exception\NotSupportedException;
abstract class AbstractCommands
{
protected $config = [];
protected $arguments = [];
public function __construct($config = [], $arguments = [])
{
... | true |
f5eaca569443d686b040a7371b5ef18a964b8a1d | PHP | Silvana-dev/atividadePweb2 | /login.php | UTF-8 | 1,113 | 2.875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title> Login </title>
<meta charset="utf-8">
</head>
<body>
<?php
include('banco.php');
$verificar = 0;
if(isset($_POST['entrar'])){
$email = $_POST['email'];
$senha = $_POST['senha'];
$seleciona = $bd->query("SELECT email, senha FROM usuarios;");
... | true |
64a88fc8d57885ea78e9b7a675457780ab4dec22 | PHP | fengzyz/design-patterns | /Decorator/Egg.php | UTF-8 | 457 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: shuyu
* Date: 2019/8/23
* Time: 9:05
*/
namespace Fengzyz\DesignPatterns\Decorator;
class Egg extends Decorator
{
/**
* 名称
*
* @return mixed|string
*/
public function name()
{
return $this->food->name() . '+蛋';
}
/**
... | true |
b636434f5bfdaa275a49ae64532699a50afd0eae | PHP | samsonframework/w3c | /tests/ValidatorTest.php | UTF-8 | 959 | 2.671875 | 3 | [] | no_license | <?php
namespace tests;
use samsonframework\w3c\Validator;
/**
* Created by Vitaly Iegorov <egorov@samsonos.com>
* on 04.08.14 at 16:42
*/
class ValidatorTest extends \PHPUnit_Framework_TestCase
{
/** @var Validator */
protected $validator;
/** @var string Invalid URL for testing */
protected $inva... | true |
4633069b2f533926e6256202835c502e69b31c04 | PHP | chree188/XDL-PHP | /xdl_practice/PHP/p_09/3-1.php | UTF-8 | 680 | 3.375 | 3 | [] | no_license | <?php
/*
* 正则表达式:次数
* {n} 修饰前面的原子,连续出现的次数
* {1,n} 最少1次,最多n次 最大优先
* {0,1} 0次 或 1次 ?
* {1,} 1次 或 多次 +
* {0,} 0次 或 多次 *
* */
// 1.要匹配的内容
$str="axaaxaaaxaaaax";
// 2.正则表达式
$ptn="/a{2}/"; //a连续出现2次
$ptn="/a{1,3}/"; //a连续出现1-3次
$ptn="/a{0,1}/"; //0次或1次
$ptn="/a?/"; //0次或1次
$ptn="/a{1,}/"; //1次到无限... | true |
77159669aed53a5f0c5bb4ae3535aabc3c46af02 | PHP | ShakilAhmmed/onlineschool | /Class/Content.php | UTF-8 | 5,164 | 2.640625 | 3 | [] | no_license | <?php
class Content{
private $db;
private $fm;
private $id;
private $email;
private $content_title;
private $content_author;
private $content_catagory;
private $video_name;
private $video_tmp;
private $delete_id;
private $deleted;
private $content_status;
private $post;
private $div;
private $ext;
pr... | true |
1b576727dfe4986867299080e7c683287de61777 | PHP | myguardian/Server | /Server/Demo/acknowledgeAlert.php | UTF-8 | 834 | 2.828125 | 3 | [] | no_license | <?php
// Get Alert ID from url parameters
$alertID = $_GET["alertID"];
// Imports script to establish conenction to database. Creates $conn variable
require 'conn.php';
// Creates Select Command to get all rules
$sql = "SELECT * FROM `AlertDemo` WHERE `Alert ID` = '$alertID'";
... | true |
6bbd5e74954a2345e4c93ce2060cf1f1ce1b6cfd | PHP | oscardaniel88/Mastering-PHP-7 | /Chapter10/B05210_10_1.php | UTF-8 | 1,178 | 3.375 | 3 | [
"MIT"
] | permissive | <?php
class Registry
{
private
$registry = [];
public
function get($key)
{
if (isset($this->registry[$key])) {
return $this->registry[$key];
}
return null;
}
public
function set($key, $value, $graceful = false)
{
i... | true |
c4b02e67ae29331abf2204362841a9e6237780a3 | PHP | damienflament/dev-kit-try | /tests/Unit/Templating/Context/TravisContextTest.php | UTF-8 | 3,381 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2017 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Cmf\DevKit\Tests\Unit\Templating\Context;
use PHPUnit\Framework\TestCase;
u... | true |
6047c8b08d9ccea1c91c267e7e5811f66b104f77 | PHP | assegaiphp/orm | /src/Management/Options/FindOptions.php | UTF-8 | 2,454 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Assegai\Orm\Management\Options;
use JetBrains\PhpStorm\ArrayShape;
/**
* Defines the search criteria for finding entities.
*/
class FindOptions
{
/**
* @param object|array|null $select
* @param object|array|null $relations
* @param FindWhereOptions|array|null $where
* @param object|ar... | true |
876d34eff7b7462171cd4f09a3ce21e555e28365 | PHP | SteelzZ/OxyBase | /project/apps/Account/library/Query/AccountInformation.php | UTF-8 | 702 | 2.5625 | 3 | [] | no_license | <?php
class Account_Lib_Query_AccountInformation
extends Oxy_Cqrs_Query_AbstractMongo
{
const ACCOUNT_COLLECTION = 'accounts';
/**
* Return account information
*
* @see Msc_Query_Dto_Builder_AbstractBuilder::getDto()
*/
public function getDto(array $args = array())
{
$thi... | true |
b19c2c2b6efa9bd3eccd386b4f15ade381e49cee | PHP | phucthanh6554/CodeigniterPeopleManage | /application/views/Member/data_list.php | UTF-8 | 1,127 | 2.625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
if(isset($mess) && $mess !== '')
{
echo "<script>alert('".$mess."')</script>";
}
?>
<div class="wrapper">
<header>
<h3>Trang danh sach thanh vien</h3>
<a href="<?php echo base_url('Data/add_member') ?>">Them thanh vien</a>
</header>
<table class="table table-striped">
<tr>
... | true |
5bf56a15fc295ed666670955512291bb34b9ccd4 | PHP | RizalFIrdaus/PHP-Login-Management | /test/SessionServiceTest.php | UTF-8 | 2,545 | 2.5625 | 3 | [] | no_license | <?php
namespace ProgrammerZamanNow\Belajar\PHP\MVC;
use PHPUnit\Framework\TestCase;
use ProgrammerZamanNow\Belajar\PHP\MVC\Config\Database;
use ProgrammerZamanNow\Belajar\PHP\MVC\Domain\Session;
use ProgrammerZamanNow\Belajar\PHP\MVC\Domain\User;
use ProgrammerZamanNow\Belajar\PHP\MVC\Repository\SessionRepository;
us... | true |
c5b0b7bbef0ddaad38673a660e568253dcdfe697 | PHP | daniels600/GPMS | /deletePrisoner.php | UTF-8 | 368 | 2.546875 | 3 | [] | no_license | <?php
require_once('config/db_conn.php');
//checking for the id in the URL
if(isset($_GET['id'])){
$prisonerID = $_GET['id'];
}
// a query to delete the prisoner record
$sql = "DELETE FROM Prisoner WHERE Prisoner_id='$prisonerID'";
//checking if the query is successful
if(mysqli_query($conn,$sql)){
header... | true |
53acae2c6740052d77d9a9fcc710077d5bcd52d8 | PHP | samdlcong/Pro_PHP_Programming_Exercises | /Chapter7/7-3.php | UTF-8 | 616 | 2.65625 | 3 | [] | no_license | <?php
$host = 'localhost:27017';
$dbname = 'scott';
$colname = "emp";
try{
$conn = new Mongo($host);
$db = $conn->selectDB($dbname);
$coll = $conn->selectCollection($dbname,$colname);
$cursor = $coll->find(array('hiredate'=>new MongoRegex("/\d{2}-dec-\d{2}/i")));
$cursor->sort(array("deptno"=>1,"sal"=>1));
$curs... | true |
13dfd692d4ed5543f48789d67f4ad3fe13b5978b | PHP | kilo2387/phptest | /nginx/miaosha.php | UTF-8 | 1,181 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by kilo with IntelliJ IDEA on 2017/7/19 21:31.
*
*/
error_reporting(E_ALL);
ini_set('display_errors', '1');
$fp = fopen('./lock.txt', 'a+');
//$id = 1;
//$conn = mysqli_connect('localhost', 'root', 'hjkhjk', 'test');
$try = 10;
//
//$id = md5(mt_rand());
// 排它性的锁定
do{
$lock = flock($fp,LOC... | true |
07f13dc838b8bbd438adc815aba2d08d49477554 | PHP | Joangaes/hospital_final | /database/migrations/2017_02_22_140543_create_doctor_pacients_table.php | UTF-8 | 1,028 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDoctorPacientsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('doctor_p... | true |
f0b8b37c523e62c14ec19993e20ecbc1fb0c2eed | PHP | HartoSha/Zuwer | /models/catalog/catalogModel.php | UTF-8 | 8,787 | 2.96875 | 3 | [] | no_license | <?php
require_once(ROOT. "models". DIRECTORY_SEPARATOR . "baseModel.php");
class catalogModel extends baseModel
{
private const DEFAULT_QUANTITY = 6; # Изначально продукты отображаются по 6 на странице
Private static function getSortOrder()
{
if(isset($_COOKIE["sortOrd... | true |
eedb083ffc0baeb595fa2b673217693d2b682534 | PHP | Timmy2015/Algorithms | /fbI (2).php | UTF-8 | 207 | 3.921875 | 4 | [] | no_license | <?php
//Fibonacci & Iteration
function fibonacci($n,$first=0,$second=1){
$fib=[$first,$second];
for($i=1;$i<$n;$i++){
$fib[]=$fib[$i]+$fib[$i-1];
}
return $fib;
}
$v=2;
print_r(fibonacci($v)); | true |
4c4a0b04759ac2cb91acdb3dbf6d0e2fb587af3b | PHP | iswasqueep/githubtesting | /connect.php | UTF-8 | 330 | 2.703125 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password ="";
$db_name ="mydb";
//con is a variable name it can be anything
$con = new mysqli($servername, $username, $password, $db_name);
if($con->connect_error){
die("Cannot Connect".$con->connect_error);
}
else{
//echo "connected";
... | true |
585950a6583dbfe1e62d47a7363b40d188db1b1d | PHP | Karan-jawalkar/bucky_practice | /seestudents.php | UTF-8 | 422 | 2.734375 | 3 | [] | no_license | <?php
include 'connection.php';
$json_response = array();
$query = "select Name,Class,Address from student";
$result = mysql_query($query);
while($row1=mysql_fetch_array($result)){
$record=array();
$record['name']=$row1['Name'];
$record['class']=$row1['Class'];
$record['address']=$row1['Address'];
array_push(... | true |
ae0fc8281231727fcb24741d6ec38e10adb6038f | PHP | abuhurairah-aar/expose | /app/Commands/ShareFilesCommand.php | UTF-8 | 1,121 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Commands;
use App\Client\Factory;
use React\EventLoop\LoopInterface;
class ShareFilesCommand extends ServerAwareCommand
{
protected $signature = 'share-files {folder=.} {--name=} {--subdomain=} {--auth=} {--domain=}';
protected $description = 'Share a local folder with a remote expose se... | true |
7620e38ccda9530ed8da2c953ad630dc6923ce79 | PHP | lahdeero/Vedonlyontisivusto | /app/controllers/user_controller.php | UTF-8 | 1,771 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
class UserController extends BaseController{
public static function login() {
View::make('bettor/login.html');
}
public static function logout() {
session_destroy();
Redirect::to('/', array('message' => 'Olet kirjautunut ulos.'));
}
public static function handle_login(){
$param... | true |
9e81a5598d85a13246eb083a23e92e5adea62503 | PHP | rootree/vk-footboller-content-system | /supporter-engine/application/views/coaches/index.php | UTF-8 | 1,301 | 2.625 | 3 | [] | no_license | <?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<center><?php echo $pagination ?></center>
<?php
if($items->count()) { ?>
<table id="bin" cellspacing="0" cellpadding="5" >
<tr>
<th>№</th>
<!-- <th>Дата создания</th>-->
<th>Тренер</th>
<th>Команда</th>
<... | true |
dc1d4f5ba04328aea44da450e4fbd4143da16ac2 | PHP | certificationy/certificationy | /tests/Certificationy/QuestionTest.php | UTF-8 | 3,457 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Certificationy library.
*
* (c) Vincent Composieux <vincent.composieux@gmail.com>
* (c) Mickaël Andrieu <andrieu.travail@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Te... | true |
a70b6f45020ae6d37cc9a80c7ee415ac53ad5e77 | PHP | GemsTracker/MUtil | /src/MUtil/Validate/Date/DateBefore.php | UTF-8 | 3,824 | 2.6875 | 3 | [] | no_license | <?php
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of... | true |
0d16109e9bc2b61457392fb7bd8db53580db1ca5 | PHP | butkom/cebep | /src/Entity/PlayerName.php | UTF-8 | 2,375 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* PlayerName
*
* @ORM\Table(name="player_name")
* @ORM\Entity(repositoryClass="App\Repository\PlayerNameRepository")
*/
class PlayerName extends Editable
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id... | true |
a0fcbe45fc27dfebcc60feae06b661f110ce60c7 | PHP | alexmk92/CheckMatesAPI-V2.0 | /app/core/models/ManageToken.php | UTF-8 | 11,227 | 2.9375 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of generateToken
*
* @author admin@3embed
*
* Used to generate different user tokens accross different devices
*
*/
require_once './app/core/models/Database.php';
class ManageToken {
... | true |
f866c3e0f9d0995451c8865291c12ecb84182b91 | PHP | geras-papax/HAR-File-Processor | /admin/modes/response_time_src/getDay.php | UTF-8 | 2,084 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
define('DB_SERVER', 'localhost:3306');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'pao134ever');
define('DB_DATABASE', 'har-processor');
$db = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);
$wdays = array("Sunday"=>0,"Monday"=>1,"Tuesday"=>2,"Wednesday"=>3,"Thursd... | true |
53a6021eb4f7e3c786eb37771d1084cb420f517d | PHP | SayaniySasha/CMS_Online-Store | /controllers/Admin/posts/PostController.php | UTF-8 | 1,115 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Контроллер для управления категориями
*/
class PostController extends Controller{
/**
* Главная страница управления post
*
* @return bool
*/
public function index()
{
$posts = Post::index();
$data['title'] = 'Admin Posts Page ';
$data['post... | true |
e0420010df3e8eb19a33ed2981880c51ebc422ee | PHP | BambusBaer/neingag | /loadComments.php | UTF-8 | 576 | 2.796875 | 3 | [] | no_license | <?php
$pdo = new PDO('mysql:host=localhost;dbname=neinGag', 'root', '');
$tmp = null;
$tmpNicks = null;
// load comments from database
$sql = "SELECT * FROM comments WHERE imageID=".$image['imageId']."";
foreach( $pdo->query($sql) as $row){
$tmp[] = $row['comment'];
$tmpNicks[] = $row['nickname'];
}
... | true |
3520acd2f7602c53c01d531537c708f6d3273ad7 | PHP | stubbles/stubbles-1.x | /src/test/php/net/stubbles/streams/memory/stubMemoryOutputStreamTestCase.php | UTF-8 | 1,719 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Test for net::stubbles::streams::memory::stubMemoryOutputStream.
*
* @package stubbles
* @subpackage streams_memory_test
* @version $Id: stubMemoryOutputStreamTestCase.php 2857 2011-01-10 13:43:39Z mikey $
*/
stubClassLoader::load('net::stubbles::streams::memory::stubMemoryOutputStream');
/**... | true |
9a7070ae6815010e6b69d27a38d14c4fdb8fb8b8 | PHP | fredy8/ProyectoIntegrador | /www/validation.php | UTF-8 | 411 | 2.796875 | 3 | [] | no_license | <?php
function valid_email($email) {
return !filter_var($email, FILTER_VALIDATE_EMAIL) === false;
}
function valid_password($password) {
return strlen($password) >= 5;
}
function valid_time($hour, $minute, $ampm) {
return is_numeric($hour) && is_numeric($minute)
&& 0 < $hour && $hour <= 1... | true |
ea59477e87abaa71e23bef90bf8c0bb150aef82d | PHP | trthanhbk/no_codition | /vendor/bldr-io/bldr/src/Event/CallEvent.php | UTF-8 | 1,188 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Bldr.io
*
* (c) Aaron Scherer <aequasi@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE
*/
namespace Bldr\Event;
use Bldr\Command\BuildCommand;
use Bldr\Model\Call;
use Bldr\Model\Task;
/**
* @author Aa... | true |
2edd8d6a38897ff6bc1f1d279d577958ac287e9c | PHP | axquired24/Data-Warehouse-Sekolah | /modul/diagram/diagram.php | UTF-8 | 10,593 | 2.515625 | 3 | [] | no_license | <?php
$uk = $_GET[uk];
$url_post = "./default.php?uri=modul/diagram/diagram&uk=".$uk;
?>
<div class="container">
<br><br><br>
<form method="post" class="form-horizontal" action="<?php echo $url_post; ?>">
<div class="col-md-offset-2 col-md-6">
<select name="pilih" class="form-control input-lg">
<?php
$pilih... | true |
211e55ee2b7293018bde14de116032cf4d4719ab | PHP | AvaiBookSports/redsys-messages | /src/Loader/ChainLoader.php | UTF-8 | 1,230 | 2.828125 | 3 | [] | no_license | <?php
namespace AvaiBookSports\Component\RedsysMessages\Loader;
class ChainLoader implements CatalogLoaderInterface
{
/**
* @var CatalogLoaderInterface[]
*/
private $loader = [];
/**
* This loader allows you to join multiple loaders together. For example, a CatalogLoader merged with an
... | true |
3b55c79f19d7b06b990b71f90d582f60839042dd | PHP | abmmhasan/PHP-Toolbox | /src/functions/standalone.php | UTF-8 | 5,499 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
if (!function_exists('env')) {
/**
* Gets the value of an environment variable.
*
* @param string $key
* @param mixed $default
* @return mixed
*/
function env(string $key, $default = null)
{
switch (true) {
case isset($_SERVER[$key]):
... | true |
b39c291702934ddbdfb13f2934924320d160e1d3 | PHP | DreadLabs/media-type-decoding | /src/Domain/RegistrationTree.php | UTF-8 | 2,006 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the `dreadlabs/media-type-decoding` package.
*
* (c) 2017,2018 Thomas Juhnke <dev@van-tomas.de>
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace DreadLabs\Media... | true |
e2c415e8038eef8e78f6b127bf5c447a9226f349 | PHP | KashyapTamakuwala/php-clubmanagement | /Login/verify.php | UTF-8 | 1,717 | 2.53125 | 3 | [] | no_license | <?php
$flag=0;
if(isset($_POST["username"])&&isset($_POST["pass"]))
{
try
{
$dbhandler = new PDO('mysql:host=127.0.0.1;dbname=CLUB','root','');
$dbhandler->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$stmt= $dbhandler->prepare("SELECT password ... | true |
8dd759efb02d8b140b364a3d2dfa8e9cda113dad | PHP | cam5/domoarigato | /src/Enums/StaticEnum.php | UTF-8 | 1,079 | 3.3125 | 3 | [] | no_license | <?php
namespace Cam5\Domoarigato\Enums;
/**
* Generic static Enum class.
*/
class StaticEnum
{
/**
* The list of keys to reference.
*
* @var array
*/
protected static $keys = [];
/**
* Retrieves a given key from the enum, when present.
*
* @param string $string The k... | true |
2434d44f2dc9d2741b279d23fa4cb693e4287b63 | PHP | AfiqRosli/Movie-Lending-Library | /app/Http/Controllers/MemberController.php | UTF-8 | 2,597 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Member;
use App\Enums\MemberState;
use App\Helpers\Helper;
use Illuminate\Http\Request;
class MemberController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{... | true |
34d3d1284caa6e334993501f4a20a04cdc13d182 | PHP | chadyred/etatCivil | /apps/gestionActesEtatCivil/modules/mariage/templates/indexSuccess.php | UTF-8 | 1,527 | 2.53125 | 3 | [] | no_license | <?php use_helper('Date'); ?>
<?php $sf_user->setCulture('fr_FR');?>
<h1>Liste des actes de Mariage</h1>
<table class="tableau">
<div class="bouton">
<a href="<?php echo url_for('mariage/new') ?>">Nouvel Acte</a>
<a href="<?php echo url_for('mariage/search') ?>">Recherche</a>
<br />
<a href="<?p... | true |
71c3381faee3e23963df239581659f5656e4a361 | PHP | theperfectcoder/carcas-backend-laravel | /app/Api/Http/Controllers/Auth/Traits/OAuthProxy.php | UTF-8 | 1,250 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Api\Auth\Traits;
use GuzzleHttp\Exception\RequestException;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
/**
* Trait OAuthProxy
* @package Api\Auth\Traits
*/
trait OAuthProxy
{
/**
* @param $grant... | true |
3b76dcc1a280645cba3f0f04c94368e5e686fd5e | PHP | prisky/materialmap | /common/models/Contact.php | UTF-8 | 1,257 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
/**
* This is the model class for table "tbl_contact".
*
* @property integer $id
* @property string $first_name
* @property string $last_name
* @property string $email
* @property string $phone_mobile
* @property integer $town_city_id
* @property string $post_code
* @property ... | true |
108b583af3051d592424992586dbb3708afcfa00 | PHP | aerovir/BeeJeeJobs | /models/Job.php | UTF-8 | 660 | 2.921875 | 3 | [] | no_license | <?php
class Job
{
public static function getJobsList()
{
$db = Db::getConnection();
$jobList = array();
$result = $db->query('SELECT id, username, email, job_text, status FROM jobs_table ORDER BY id ASC');
$i = 0;
//var_dump($result); die;
while ($row = $res... | true |
403a487987a3c598cc5584021a82fb5f41799c37 | PHP | sergeyugai/backpack-fields-as-classes | /src/Fields/IconPickerField.php | UTF-8 | 1,269 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace SergeYugai\Laravel\Backpack\FieldsAsClasses\Fields;
use SergeYugai\Laravel\Backpack\FieldsAsClasses\Common\Arrayable;
/**
* Class IconPickerField
* @package SergeYugai\Laravel\Backpack\FieldsAsClasses\Fields
* @link https://backpackforlaravel.com/docs/4.1/crud-fields#icon_picker Documentation
* ... | true |
876c45b37c3b2cb6c33f9dd0c15696528e95450a | PHP | pawit1357/mu_faa | /protected/utilities/ConfigUtil.php | UTF-8 | 1,625 | 2.53125 | 3 | [] | no_license | <?php
class ConfigUtil {
private static $siteName = 'http://www.prdapp.net/itechservice/';
private static $ApplicationTitle = 'FAA | Fire and Applied Arts Division';
private static $ApplicationCopyRight = 'Copyright © 2010 Mahidol University. All rights reserved.';
private static $ApplicationAddress = '';
private ... | true |
c803fb8475d88135e3601ea28563118c205d2107 | PHP | LivanAlex/web | /lab4/08/08.php | UTF-8 | 1,524 | 2.796875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<title>08</title>
<style>
div {
text-align: center;
}
p {
display: block;
text-align: center;
... | true |
b0ca8daebcea92929b548768670daa3ec906ad94 | PHP | rolandschaub/luya-module-forms | /src/SubmissionEmail.php | UTF-8 | 1,648 | 2.828125 | 3 | [] | no_license | <?php
namespace luya\forms;
use luya\forms\models\Submission;
use luya\helpers\StringHelper;
class SubmissionEmail
{
/**
* @var Submission
*/
public $submission;
public function __construct(Submission $submission)
{
$this->submission = $submission;
}
public function getSub... | true |
2793afd7a691ebca27e644b38d2e4aca401e3a30 | PHP | shocking2k/godaddy-php | /src/Actions/Records.php | UTF-8 | 1,327 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tafhyseni\PhpGodaddy\Actions;
use Tafhyseni\PhpGodaddy\Exceptions\DomainException;
use Tafhyseni\PhpGodaddy\Request\Requests;
class Records extends Requests
{
const API_URL = 'v1/domains/{domain}/records/{type}';
public $domain;
public $type;
public $data;
/**
* @param mixe... | true |
42ad181082eaa3f14b72b8101c5fa1d40fefbfc8 | PHP | muhammadridwan47/WebcrudArkademy | /app/Controllers/Product.php | UTF-8 | 3,718 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use App\Models\ProductModel;
class Product extends BaseController
{
protected $ProductModel;
public function __construct()
{
$this->ProductModel = new ProductModel();
}
public function index()
{
if ($cari = $this->request->getvar('cari')) {
... | true |
34acdb89183d2f1b786bc32f5b5dcc53bacdc0d9 | PHP | mnrn/xxx-coder | /abc088_a.php | UTF-8 | 90 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
$n = (int)fgets(STDIN);
$a = (int)fgets(STDIN);
echo $n % 500 <= $a ? 'Yes' : 'No';
| true |
2afc67be28a1077d21b980a617973383e032beaf | PHP | Peebese/NewsScrape | /NewScrapeBaseController.php | UTF-8 | 2,432 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: PhilipB
* Date: 12/13/17
* Time: 11:44 PM
*/
class NewScrapeBaseController
{
const HTTP_CODE = 'http_code';
const HTTP_SUCCESS_CODE = 200;
const HTTP_DATA = 'data';
const HTTP_DL_SIZE = 'downloadSize';
/**
* @var
*/
public $resourcePath... | true |
c1b823aa5011edba96beaa963092d946d28149ea | PHP | reksarw/ArrtChat | /core/Autoload.php | UTF-8 | 1,481 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = "https://";
} else {
$uri = "http://";
}
$uri .= $http;
DEFINE('server', $uri);
DEFINE('base_url', server."/".$base_url);
date_default_timezone_set($timezone);
// Hari
switch($hari){
case "Monday":
... | true |
6193071decd815ad2f669d3b905ee0ca21acdb3a | PHP | bergie/MidgardMvcCompatBundle | /Compat/midgardmvc_core.php | UTF-8 | 790 | 2.75 | 3 | [] | no_license | <?php
class midgardmvc_core
{
private static $instance = null;
private function load_service($service)
{
$serviceFile = __DIR__ . "/midgardmvc_core_services_{$service}.php";
if (!file_exists($serviceFile)) {
throw new InvalidArgumentException("Service {$service} not installed");... | true |
34509139e95bf70b11bcfd4d1b26b692b3bfc0be | PHP | nsornapu/Library-Management | /nls170130_CS6360/connectionCheck.php | UTF-8 | 801 | 2.703125 | 3 | [] | no_license | <?php // mysqlitest.php
require_once 'login.php';
$connection = new mysqli($db_hostname, $db_username, $db_password, $db_database);
if ($connection->connect_error) die($connection->connect_error);
$query = "select * from book";
$result = $connection->query($query);
if (!$result) die ("Databas... | true |
8a46f1172f15ecb5ceb2ecc8416566739af4f667 | PHP | pmill/rabbit-rabbit | /src/Conditions/GreaterThan.php | UTF-8 | 855 | 3.34375 | 3 | [] | no_license | <?php
namespace pmill\RabbitRabbit\Conditions;
class GreaterThan implements ConditionInterface
{
/**
* @var int
*/
protected $greaterThan;
/**
* @var bool
*/
protected $inclusive = false;
/**
* GreaterThan constructor.
*
* @param int $greaterThan
* @param b... | true |
14ba595c3d828fad9dda045dd4f6401a4520dacd | PHP | startxfr/api | /api-lib/lib/resources/Google/userinfoGoogleResource.php | UTF-8 | 5,825 | 2.515625 | 3 | [] | no_license | <?php
/**
* This resource is used to get user information stored in google.
*
* @package SXAPI.Resource.Google
* @author Dev Team <dev@startx.fr>
* @see defaultGoogleResource
* @link https://github.com/startxfr/sxapi/wiki/Resource
*/
class userinfoGoogleResource extends defaultGoogleResour... | true |
0d90e25bb3343cc21384f3819eedfce373b9b609 | PHP | jin123456bat/api | /application/helper/api.php | UTF-8 | 850 | 2.8125 | 3 | [] | no_license | <?php
namespace application\helper;
use system\core\parameter;
/**
* 创建api的请求参数
* @author fx
*
*/
class api extends parameter
{
private $_partner = 'ios';
private $_key = 'ios';
function getPostParam()
{
$sign = $this->sign($this->_url, $this->_post, $this->_partner, $this->_key);
$data = array(
'p... | true |
c28ca6636d12947ce4ffbf227bd751395a5fabc7 | PHP | Kubinyete/template-sdk-php | /src/Util/ArrayUtil.php | UTF-8 | 1,174 | 2.84375 | 3 | [] | no_license | <?php
namespace Kubinyete\TemplateSdkPhp\Util;
abstract class ArrayUtil
{
public const ACCESS_SEPARATOR = '.';
public static function get(string $path, array $array, $default = null)
{
$splitPath = explode(self::ACCESS_SEPARATOR, $path);
while (is_array($array) && ($key = array_shift($sp... | true |
5ca55d3e0d912169ee54745a4f782a39632b3f82 | PHP | univeros/framework | /tests/Structure/Set/xor_.php | UTF-8 | 2,479 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Altair\Tests\Structure\Set;
trait xor_
{
public function xorDataProvider()
{
// Values in either A or B, but not both.
// A, B, expected result
return [
[[], [], []],
[['a'], ['b'], ['a', 'b']],
[['a', '... | true |
71396866cf4afda31cf7ea507e820455b1dc0286 | PHP | PS-Ddevil/Exodia2K19 | /old-data_2018_no_main_page/old_stuff/registeration_old/register_auth.php | UTF-8 | 1,823 | 2.59375 | 3 | [] | no_license | <?php
include 'resources/conn.php';
include 'resources/saviour.php';
if (isset($_POST['email']) && !empty($_POST['email']) && isset($_POST['password']) && !empty($_POST['password']) && isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['college']) && !empty($_POST['college']) && isset($_POST['number']... | true |
1fd82894d43f9d123f933a18df93111c10051f63 | PHP | timegridio/concierge | /src/Calendar/Calendar.php | UTF-8 | 1,682 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Timegridio\Concierge\Calendar;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Timegridio\Concierge\Exceptions\StrategyMethodNotRecognizedException;
use Timegridio\Concierge\Exceptions\StrategyNotRecognizedException;
class Calendar
{
/**
* Strategy Calendar.
*
* @var Timesl... | true |
c4db92a5a01e8cfb4e0d2c5326352e98da65cb6c | PHP | trabisdementia/xuups | /modules/xhelp/include/jpspan/JPSpan/Generator.php | UTF-8 | 6,480 | 2.5625 | 3 | [
"PHP-3.0"
] | permissive | <?php
/**
* @package JPSpan
* @subpackage Generator
* @version $Id: Generator.php,v 1.1 2005/06/21 15:31:20 eric_juden Exp $
*/
//--------------------------------------------------------------------------------
/**
* Define
*/
if ( !defined('JPSPAN') ) {
define ('JPSPAN',dirname(__FILE__).'/');
}
... | true |
9f93bdf8143279b66d12a41ebb97f704e2ccc710 | PHP | madmaker/madwww | /src/obooking/save_order_bg.php | UTF-8 | 18,457 | 2.75 | 3 | [] | no_license | <?php
namespace obooking;
use PDO;
use PDOException;
use processors\uFunc;
use uSes;
use uString;
require_once "processors/uSes.php";
require_once "processors/classes/uFunc.php";
require_once "obooking/classes/common.php";
/**
* Saves information about order
* ## Request (POST):
* - data
* - order_id
*
* ### To... | true |
1659ee7a90a8b77ddc9031140e5f5c25210a4b09 | PHP | jellycheng/cjsRabbitmq | /demo/send1.php | UTF-8 | 928 | 2.671875 | 3 | [] | no_license | <?php
//发送队列 -- 使用默认vhost和默认交换机exchange
require __DIR__ . '/common.php';
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
$rabbitmqConfig = include __DIR__ . '/config.php';
$user_queue = $rabbitmqConfig['user_queue'];
//1.连接 默认vhost='/'
$connection = new AMQPStreamConnection($user_... | true |