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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
da1ad65358688f34fa8821052d55b14e29cc8b39 | PHP | bambangm88/tes_arkademi | /4 jabatTangan.php | UTF-8 | 219 | 2.6875 | 3 | [] | no_license | <?php
$banyakOrang = 0 ;
$Orang = 6 ;
for ($i = 1; $i < $Orang ; $i++) {
$banyakOrang += $i;
}
echo "<br/> Contoh Banyak Orang : $Orang";
echo "<br/> Total Peluang Berjabat Tangan : $banyakOrang";
?> | true |
424059460dd6abcf8e35af4a1c419544114885e8 | PHP | ForTrade/xtrader-2 | /app/Core/Repos/Product/DBProductRepository.php | UTF-8 | 851 | 2.890625 | 3 | [] | no_license | <?php namespace Core\Repos\Product;
use Core\Repos\AbstractRepository;
use Illuminate\Database\Eloquent\Model;
class DbProductRepository extends AbstractRepository implements ProductRepository {
/**
* @var Product
*/
protected $model;
/**
* @param Model $model
*/
function __const... | true |
00e48e789e1e58b7c9205c4c61c61167430f0865 | PHP | tonny-walker/sitan | /Application/Admin/Controller/HeaderController.class.php | UTF-8 | 4,137 | 2.515625 | 3 | [] | no_license | <?php
namespace Admin\Controller;
class HeaderController extends AdminController
{
public function index()
{
$list = M('himages')->select();
$this->assign("list",$list);
$this->display();
}
//跳转到添加图片页面
public function upload()
{
$this->display();
}
//添加图片
public functio... | true |
3c6edf1e8f1d794d54d45e0939286306dc670d7d | PHP | dalaian/ProyectoMultimedios2015 | /Domain/Admin.php | UTF-8 | 634 | 3 | 3 | [] | no_license | <?php
class Admin{
private $id;
private $nombre;
private $apellidos;
private $nombre_usuario;
private $password;
private $correo;
private $admin_general;
public function Admin($id, $nombre_usuario, $password, $correo, $nombre, $apellidos, $admin_general){
$this->id = $id;
$this->nombre = ... | true |
19c0dedc7d0c417eae15136bf9061fda13754c4e | PHP | codingbrains8055/binplus-php-training | /php work/vld.php | UTF-8 | 491 | 2.515625 | 3 | [] | no_license | <?php
if(isset($_GET)){
extract($_GET);
echo $mail;
echo $cap;
echo "<br>";
echo $captcha;
if(!preg_match("/[6-9]{1}+[0-9]{9}/", $number)){
echo "Please enter Indian mobile number";
}
if(!preg_match("^(?=.*[A-Za-z])(?=.*\d)(?=.*[@!#*%?&])[A-Za-z\d@$!%*#?&]{8,}$", $mail)){
echo "Not an email address";
... | true |
b69be655c19d8d948b2cb089a592723e54874fb8 | PHP | Ujuikeonu/DufunaPHP | /Quiz1.php | UTF-8 | 150 | 3.1875 | 3 | [] | no_license |
<?php
print "My name is Uju "."Ikeonu.<br>"; // Outputs Uju Ikeonu
echo "I love programming. <br>";
print "Hoping to be a techie in no distant time. <br>";
?>
| true |
2845b56e1fcf9a144ddcd8bf4fa1b4d0ca5d088b | PHP | gorbo96/Bojorque-Martin-Examen | /Bojorque-Martin-Examen/crearTicket.php | UTF-8 | 1,324 | 2.625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Crear Nuevo Ticket</title>
<link href="estilo1.css" type="text/css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
</head>
<body>
<header>
<h1>Ticket</h1> ... | true |
55070ba5a0ffd71b1e289cf562cebeac3a1c0cea | PHP | gluckali/lacking | /reservation-edit.php | UTF-8 | 2,906 | 2.625 | 3 | [] | no_license | <?php
include "./database/database.php";
$db = new database();
$reservationId = $_GET['reservationId'];
$reservation = $db->select('SELECT * FROM `reservering` WHERE id=:id', [
'id'=> $reservationId
]);
if($_SERVER['REQUEST_METHOD'] == "POST"){
$reservationCreateSql = 'UPDATE `reservering` set (`tafel`, ... | true |
73baded4ef7a44ba27345d38b73dcdf600933d55 | PHP | eru123/NoEngine | /src/FrecBase.php | UTF-8 | 13,584 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace eru123\NoEngine;
class FrecBase extends NoEngine
{
public $dir = "./FrecBase/"; //end with '/'
public $con = 'root', $db, $tb;
const version = 'v3.0';
const main = 'main.php';
const users = 'users.php';
public function __construct($dir = '')
{
//set_exception_handler(... | true |
19cd50c273946d32671e9ff7163e3eff1ef29006 | PHP | daltonlotti/CadastrodeProdutosPHP | /excluir.php | UTF-8 | 800 | 2.65625 | 3 | [] | no_license | <?php
$id = isset($_GET['id']) ? $_GET['id'] : '';
if (empty($id)) {
echo "<script>alert('Produto não encontrado!')</script>";
echo "<script>window.location.href = 'listagem.php'</script>";
exit;
}
$strConn = 'mysql:host=localhost;dbname=db_teilor';
$db_usuario = 'root';
$db_senha = '';
try {
$conexa... | true |
9d1d20ae661ab591e1c3476bcdb1d8b2d3847959 | PHP | BitBagCommerce/SyliusElasticsearchPlugin | /src/Form/Type/ChoiceMapper/ProductOptionsMapper.php | UTF-8 | 1,374 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file has been created by developers from BitBag.
* Feel free to contact us once you face any issues or want to start
* another great project.
* You can find more information about us on https://bitbag.io and write us
* an email on hello@bitbag.io.
*/
declare(strict_types=1);
namespace BitBag\Sy... | true |
7cd16403944dfd94f291cc1d1400da207ef4953d | PHP | tonnishanto/Online-Forum | /blog/app/thread.php | UTF-8 | 862 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Forum;
use Cviebrock\EloquentSluggable\SluggableInterface;
use Cviebrock\EloquentSluggable\SluggableTrait;
use Illuminate\Database\Eloquent\Model;
class thread extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
... | true |
1e25fb31e2c2945699da16e180f04a124b526d93 | PHP | Cavadoff/Laravel-Code-Skills | /laravel/app/Http/Controllers/DiggingDeeperController.php | UTF-8 | 2,675 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use App\Models\BlogPost;
class DiggingDeeperController extends Controller
{
public function collections(){
$result= [];
$eloquentCollection= BlogPost::withTrashed()->get();
//dd(__METHOD__, ... | true |
2e999cd30df5540a61c9251438f5039117e2b6db | PHP | Son4ln/team-project | /controller/clientController.php | UTF-8 | 1,061 | 2.546875 | 3 | [] | no_license | <?php
$clientPath = "../";
//thêm các modul & controller
include 'include.php';
//sử dụng thư viện trait
//gọi function bằng cú pháp <Tên Trait>::<Tên function> thay thế cho phương thức extends
//upload path
$uploadPath = $clientPath.'public/upload';
//Session start
session_start();... | true |
dc312b864c7882bd0c8cc994fe27bbc4e92e49ac | PHP | furaoing/edusoho | /vendor/tiben/crontab-manager/tests/CrontabManager/Tests/CrontabJobTest.php | UTF-8 | 7,982 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2013 Benjamin Legendre
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | true |
7befb8fecd2f3236bee95152b76292018aa01bf8 | PHP | Tifferson/tiffbcc | /application/core/OC_Controller.php | UTF-8 | 2,335 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?
class OC_Controller extends CI_Controller{
var $main_nav;
var $nav_active;
var $subnav_active;
var $title;
var $path_prefix;
function __construct(){
parent::__construct();
//alternate: 'http'. ($_SERVER['HTTPS'] ? 's' : null) .'://'. $_SERVER['HTTP_HOST'] . $_SERVER['RE... | true |
cbb12d3548a9c080b5fe4c6c4d1abb75958abd17 | PHP | xxcarleonexx/api | /utils/Utils.php | UTF-8 | 1,137 | 3.0625 | 3 | [] | no_license | <?php
namespace utils;
class Utils
{
/**
* @param $page
* @param $totalRows
* @param $perPage
* @param $pageUrl
* @return array
*/
public function getPaging($page, $totalRows, $perPage, $pageUrl)
{
$paging = [];
$paging['first'] = $page > 1 ? "{$pageUrl}p... | true |
74c39dda1e194260aa58a03e24e068c6da7209d2 | PHP | tarantool-php/client | /tests/Integration/PacketSyncTest.php | UTF-8 | 1,127 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the tarantool/client package.
*
* (c) Eugene Leonovich <gen.work@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Tarantool\Client\Tests\Integration;
... | true |
8c870948c32f701532a11ed3b53521faff5f706a | PHP | PJasiczek/smart-activity-app-api | /publish_activity.php | UTF-8 | 1,007 | 2.515625 | 3 | [] | no_license | <?php
include 'dbconfig.php';
$con = mysqli_connect($HostName, $HostUser, $HostPass, $DatabaseName);
$json = file_get_contents('php://input');
$obj = json_decode($json, true);
$id = $obj['id'];
$name = $obj['name'];
$type = $obj['type'];
$time = $obj['time'];
$date = $obj['date'];
$distance = $obj['distance'];
$st... | true |
4bdfb9ef2af000eae1f97bd9709ef27fbc31f3e5 | PHP | ScanduraIvan/HW2 | /ProgettoEsame/app/Http/Controllers/IscrizioneController.php | UTF-8 | 2,553 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Routing\Controller;
use App\Models\Utente;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Session;
class IscrizioneController extends Controller {
public function index(){
if(session('username') !== null)
return redirect(... | true |
e1ce520e88d48c3e1c01e1b50856af1ae0677092 | PHP | davidmars/EE09-XML-DB | /core/ginette/db/GinetteDbPaths.php | UTF-8 | 2,240 | 2.90625 | 3 | [] | no_license | <?php
/**
* Reference all Ginette database directories.
*/
class GinetteDbPaths
{
/**
* Will automatically set all paths necessary to the database.
* @param string $rootPath database root path
* @param string $phpRoot The root directory of the Ginette framework.
* Useful for stuff not directly... | true |
3e861bed398b870bcd6d44b5a9b070fbd4af9ac5 | PHP | Stolz/php-stubs | /res/php/mnogosearch/functions/udm-alloc-agent.php | UTF-8 | 338 | 2.609375 | 3 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | <?php
/**
* Allocate mnoGoSearch session
*
* @phpstub
*
* @param string $dbaddr
* @param string $dbmode
*
* @return resource Returns a mnogosearch agent identifier on success, false on failure. This
* function creates a session with database parameters.
*/
function udm_alloc_agent($dbaddr, $... | true |
f5bd01327a4873acccb85573ac8822ab998f3df5 | PHP | ChenJiR/leetcode.php | /zigzagLevelOrder.php | UTF-8 | 1,624 | 3.25 | 3 | [] | no_license | <?php
/**
* 103. 二叉树的锯齿形层次遍历
* Class ZigzagLevelOrderSolution
* https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal/
*/
class ZigzagLevelOrderSolution
{
/**
* @param TreeNode $root
* @return Integer[][]
*/
function zigzagLevelOrder($root)
{
if (!$root) retu... | true |
850c1376a554574ec13ab9195ff6f59707d1f05e | PHP | atsuhisa-i/self_study_php | /chapter02/string_int.php | UTF-8 | 369 | 3.171875 | 3 | [] | no_license | <?php
var_dump((int)'0b11');
var_dump((int)'0777');
var_dump((int)'0xFF');
var_dump((int)'1E4');
var_dump(bindec('0b11')); //2進数を10進数に変換
var_dump(octdec('0777')); //8進数を10進数に変換
var_dump(hexdec('0xFF')); //16進数を10進数に変換
var_dump((float)'1E4'); //指数表現はfloat型へのキャストであれば正しく表現される | true |
33f51d083eb9442688f26aa0dd185523c6fcf297 | PHP | HeLLsSs/tracker | /core/Citrus/mvc/App.php | UTF-8 | 7,189 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
.---------------------------------------------------------------------------.
| Software: Citrus PHP Framework |
| Version: 1.0 |
| Contact: devs@citrus-project.net |... | true |
26f380f08d3d5241a1eeed95ce910016f34c3fb1 | PHP | greenkaktusx/design-patterns | /factory/documents/TxtDocument.php | UTF-8 | 350 | 2.8125 | 3 | [] | no_license | <?php
namespace documents;
/**
* Class TxtDocument
*/
class TxtDocument implements Document
{
/**
* @inheritDoc
*/
public function generate(): void
{
// TODO: Implement generateFile() method.
}
/**
* @inheritDoc
*/
public function getFileExtension(): string
{... | true |
e779fbf0434fee4473023c7030eb717675b6a347 | PHP | NamelessCoder/TYPO3.Fluid.Flux | /src/Form/FormInterface.php | UTF-8 | 3,398 | 2.8125 | 3 | [] | no_license | <?php
namespace NamelessCoder\Flux\Form;
/*
* This file is part of the NamelessCoder/Flux project under MIT license
*
* For the full copyright and license information, please read the
* LICENSE.md file that was distributed with this source code.
*/
/**
* @package Flux
* @subpackage Form
*/
interface FormInter... | true |
8d2f5a5f28060929dfc1053240b887175f59debd | PHP | xtrem-creative/panda-core | /lib/Panda/Core/Component/Bundle/View/Resolver/BladeView.php | UTF-8 | 3,289 | 2.59375 | 3 | [] | no_license | <?php
namespace Panda\Core\Component\Bundle\View\Resolver;
use Logger;
use Panda\Core\Component\Bundle\View\Exception\ResourceNotFoundException;
use Panda\Core\Component\Bundle\View\Exception\ResourceNotWritableException;
use Panda\Core\Component\Bundle\View\View;
use Philo\Blade\Blade;
class BladeView extends Abstr... | true |
e3d36d424b60b70080171531fff015c184ece284 | PHP | andrelrms10/cadastro_vendas | /controllers/vendaController.php | UTF-8 | 1,810 | 2.578125 | 3 | [] | no_license | <?php
class vendaController extends controller
{
private $arrayInfo;
//Função inicializa os a página carregando os dados
public function index()
{
$dados = array();
$venda = new modelVenda();
$vendedor = new modelVendedor();
if (!empty($_POST['id_vendedor']) && $_PO... | true |
76fa2b2228c103a006a7d3fdf660960c838b77fa | PHP | Oktopost/Eddy | /src/Eddy/Setup/ArraySetup.php | UTF-8 | 252 | 2.828125 | 3 | [] | no_license | <?php
namespace Eddy\Setup;
use Eddy\Base\ISetup;
class ArraySetup implements ISetup
{
private $array;
public function __construct(array $array)
{
$this->array = $array;
}
public function getSetup(): array
{
return $this->array;
}
} | true |
0adfc2ce4c36d67f18c8a445399182b51bffc52f | PHP | wpstarter/framework | /tests/Foundation/Testing/Concerns/InteractsWithViewsTest.php | UTF-8 | 1,073 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace WpStarter\Tests\Foundation\Bootstrap\Testing\Concerns;
use WpStarter\Foundation\Testing\Concerns\InteractsWithViews;
use WpStarter\View\Component;
use Orchestra\Testbench\TestCase;
class InteractsWithViewsTest extends TestCase
{
use InteractsWithViews;
public function testBladeCorrectlyRende... | true |
c9096e8354a42d961f9ba845dc93fb341f0bb3a3 | PHP | RonakRafaliya/Cybercom-Creation | /Practice/PHP/2021-01-28/fourthfile.php | UTF-8 | 3,839 | 3.015625 | 3 | [] | no_license | <?php
//word censoring //Word censoring is hiding unacceptable words from the audience.
// $find=array('Ronak','Ravi','Aryan');
// $replace=array('R***K','R**I','A***N');
// if (isset($_POST['userinput']) && !empty($_POST['userinput']) && !empty($_POST['find']) && !empty($_POST['replace'])){
//... | true |
8a9bec2033942a0e30748f8176fb524175f396b6 | PHP | avreolko/Booker | /bookmark.php | UTF-8 | 868 | 2.515625 | 3 | [] | no_license | <?
if($_GET['book'] && $_GET['chapter'] && $_GET['page']){
include("mysql_connect.php");
$query = "SELECT * FROM `bookmarks` WHERE `book` LIKE '{$_GET['book']}'";
$result = mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result)){
$query = "UPDATE `avreolko_db`.`bookmarks` SET chapter='... | true |
b3c0a9f83b52709bc553cde0a32ad09dc06f09c4 | PHP | Sajib-006/Social-Media-App-PHP-CSS-POSTGRESQL | /gotosignin.php | UTF-8 | 779 | 2.515625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title> SignUp Page </title>
<link rel = "stylesheet" type="text/css" href="Form2.css">
</head>
<body>
<?php
include("welcome.php");
include_once 'connectiondemo.php';
$uname=$_POST['email'];
$pass=$_POST['password'];
if(isset($_POST['signup_btn'])){
$sql2 = "INSERT INTO sig... | true |
609a5044d007377f599e77685eade8b75e2cdfdd | PHP | oismail95/CRUD-Math_Assignments-Web-App | /main.php | UTF-8 | 11,137 | 3 | 3 | [] | no_license | <!-- Omar Ismail -->
<!-- October 23, 2019 -->
<!-- CMP SCI 4610 -->
<!-- Instructor: Abde Mtibaa -->
<?php
session_start();
//Sets the assignment number.
if (isset($_SESSION["crtassignid"])) {
$anid = intval($_SESSION["crtassignid"]);
} else {
$anid = 0;
}
//Displays the message that the assignment a... | true |
a8f4c6cb8fe9e79de75e6adaa51e4b0ff51fd80c | PHP | andkon13/testForPaxful | /interfaces/ComponentInterface.php | UTF-8 | 327 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: andkon
* Date: 28.07.17
* Time: 23:45
*/
namespace interfaces;
/**
* Interface ComponentInterface
*/
interface ComponentInterface
{
/**
* ComponentInterface constructor.
*
* @param array $config
*/
public function __construct(array $config = ... | true |
5f89b61de79b692ea9d73053bd76bd9508b761b1 | PHP | cheaptrills/Herexamenphp | /classes/Dalcomment.php | UTF-8 | 4,514 | 2.734375 | 3 | [] | no_license | <?php
class Dalcomment {
public static function createComment($comment,$userid,$taskid){
$c = new Comment();
$c->setComment($comment);
$c->setTaskid($taskid);
$c->setUserid($userid);
self::uploadComment($c);
}
public static function uploadComment(Comment $comment... | true |
8259b1bed6109f55cc6d82d6ec678cc6a07a711a | PHP | harp-orm/money | /tests/src/ValueTratTest.php | UTF-8 | 1,225 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Harp\Money\Test;
use SebastianBergmann\Money\Currency;
use SebastianBergmann\Money\Money;
/**
* @coversDefaultClass Harp\Money\ValueTrait
*
* @author Ivan Kerin <ikerin@gmail.com>
* @copyright 2014, Clippings Ltd.
* @license http://spdx.org/licenses/BSD-3-Clause
*/
class ValueTraitTest ext... | true |
ddb4d92bcca85334c7c3f30d9302d393ef002b6d | PHP | Symfony-Plugins/wspNopastePlugin | /lib/model/plugin/PluginNopasteComment.php | UTF-8 | 986 | 2.625 | 3 | [] | no_license | <?php
/**
* @author Toni Uebernickel <toni@uebernickel.info>
* @link http://toni.uebernickel.info/
*
* @package wspNopastePlugin
* @subpackage plugin.model
* @version $Id$
* @link $HeadURL$
*/
/**
* wspNopastePlugin comment
*/
class PluginwspNopasteComment extends Base... | true |
1bd8a86fd7f5ebdb55a10c28a6d6f4ddfcd6c251 | PHP | EstherLaw404/Oauth | /app/Http/Controllers/API/OAuthController.php | UTF-8 | 5,936 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers\API;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Validator;
use DB;
use URL;
use App\Http\Controllers\Controller;
use App\User;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
class OAuthController extends Controller
{
public fu... | true |
0e2640e6db791c9fb37229d193cc77aa24004306 | PHP | jud3v2/piephp | /Core/Core.php | UTF-8 | 415 | 2.59375 | 3 | [] | no_license | <?php
namespace Core;
use Core\Router\Router;
class Core {
public function run()
{
include "src/routes.php";
$app = Router::get($_SERVER['REQUEST_URI']);
if ($app !== false) {
$controller = $app['controller'];
$method = $app['method'];
return (new ... | true |
797087ae353ddf764d2d2993b84dbc766d302d82 | PHP | codeigniter-jp/html2sphinx | /filter.php | UTF-8 | 1,887 | 2.9375 | 3 | [] | no_license | <?php
$file = $argv[1];
/* first processing
*/
if (file_exists($file)) {
$lines = file($file);
}
else {
exit("No such file: $file\n");
}
$remove_before = 'ユーザガイドを検索';
$remove_after = '前のトピック|ページの先頭';
$new_doc = '';
$state = 'head';
$in_list = FALSE;
foreach ($lines as $line) {
if ($state === 'head') {
... | true |
8da57724bbc93866698db097427432754fed27ff | PHP | BlinkAppleStar/webStone | /vendor/protoBuf/SLG/PB_GamerListRes_S2C.php | UTF-8 | 2,094 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Auto generated from Gamer.proto at 2016-12-05 10:43:26
*/
namespace {
/**
* PB_GamerListRes_S2C message
*/
class PB_GamerListRes_S2C extends \ProtobufMessage
{
/* Field index constants */
const RES = 1;
/* @var array Field descriptors */
protected static $fields = array(
self::... | true |
04dea14786dd0042d65da4cbfd39dda54641ec3e | PHP | Astyan8888/Nolob | /src/Entity/Sleeper.php | UTF-8 | 1,613 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints\Time;
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Re... | true |
2e10f6b346c00eb388c53db65624d85e2ad3ede6 | PHP | OEBOEBOEB/PHP_HW | /HW/HW_Week1/demo.php | UTF-8 | 117 | 2.65625 | 3 | [] | no_license | <html>
<head></head>
<body>
<?php
$message="變數前面要加$\n";
echo $message;
?>
</body>
</html> | true |
9ce2a5fe5fead27135e46f627a80e09a1e1f8f0b | PHP | Mecanne/PHP-HundirLaFlota | /modelos/modeloTableros.php | UTF-8 | 20,210 | 3.03125 | 3 | [] | no_license | <?php
class ModeloTableros
{
function __construct()
{
}
static function crearTablero($IDJugador, $IDPartida)
{
$conexion = ModeloBase::crearConexion('flota');
$creado = true;
mysqli_query($conexion, "INSERT INTO tableros (IDJugador,IDPartida) VALUES ($IDJugador,$IDPartida)"... | true |
7b9825e3eeda33e9cef833d298f7704b075d7e93 | PHP | NikitaStudent/dbsite | /htdocs/add.php | UTF-8 | 3,407 | 2.671875 | 3 | [] | no_license | <?php
session_start();
require_once 'connect.php'; // подключаем скрипт
//var_dump($_POST);
if(isset($_POST['pattern']) && isset($_POST['size']) && isset($_POST['em']) && isset($_POST['et']) && isset($_POST['name'])){
// подключаемся к серверу
$link = mysqli_connect($host, $user, $password, $database)
... | true |
18826d81ae663c90d3c1875ebe7887a8cf923893 | PHP | millieb/CoursePHP | /authentication.php | UTF-8 | 459 | 2.5625 | 3 | [] | no_license | <?php
$loginSuccessful=false;
if(isset($_SERVER['PHP_AUTH_USER'])
&& isset($_SERVER['PHP_AUTH_PW'])){
$userName=$_SERVER['PHP_AUTH_USER'];
$password=$_SERVER['PHP_AUTH_PW'];
if($userName=='Mildred' && $password='123'){
$loginSuccessful=true;
}
}
if(!$loginSuccessf... | true |
25e5656bcaee6fe12ae7aa486a5eecc4dca43544 | PHP | arthurbershadskiy/sportsmonkey | /admin/edit_news.php | UTF-8 | 2,496 | 2.578125 | 3 | [] | no_license | <?php include 'header.php'; ?>
<div class="top-bar">
<h1>News</h1>
<div class="breadcrumbs"><a href="index.php">Homepage</a> / <a href="news.php">News</a> / Update News
</div>
</div>
<br />
<div class="select-bar">
</div>
<?php if(($_GET['actio... | true |
d754cffed0b58704a8eab5b980bd7bf3823ea379 | PHP | Ethernot/SMS | /Home.php | UTF-8 | 1,579 | 2.875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title> Switch management Software </title>
</head>
<body>
<div align="left">
<h1> Please Choose a Switch to get configurations </h1>
<br><br><br><br><br>
<?php
$switchesNameList = array();
$switchesList = array();
if (file... | true |
adf34c703096435db3ef1dc7cb74cfc8efd49991 | PHP | nbouteme/AFK | /app/core/Router.php | UTF-8 | 2,489 | 3.03125 | 3 | [] | no_license | <?php
class Router
{
static private $routes;
static public function load()
{
require_once 'app/Routes.php';
}
// Associe une url et une methode a un controlleur et une action
static public function register($method, $target)
{
include_once 'app/controlle... | true |
b6043e4fbf215f0015978dd7fb5e0237b390e6db | PHP | ononokinoko/chomado_bot | /class/weather/yahoocom/model/Temperature.php | UTF-8 | 2,176 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author chomado <chomado@gmail.com>
* @copyright 2015 by chomado <chomado@gmail.com>
* @license https://github.com/chomado/chomado_bot/blob/master/LICENSE MIT
*/
namespace chomado\bot\weather\yahoocom\model;
use stdClass;
use Exception;
use chomado\bot\unit\TemperatureConverter;
/**
* 温度を保持するクラス
*/... | true |
b284e9436c07dedc0c504c7a79770a419c9cc2ef | PHP | MichaelJrSS/backup- | /InicioPHP/dao/ProdutoDao.php | UTF-8 | 3,126 | 3.1875 | 3 | [] | no_license | <?php
include_once './Produto.php';
include_once './Conexao.php';
class ProdutoDao {
public static function editar(Produto $produto) {
$sql = "UPDATE produto SET "
. " nome = '" . $produto->getNome() . "' , "
. " categoria = '" . $produto->getCategoria() . "' , "
... | true |
42389d281695d89f68effff3f7b1f6d714b5202c | PHP | jocubillo/angular_test | /services/api.php | UTF-8 | 3,613 | 2.84375 | 3 | [] | no_license | <?php
require_once("Rest.inc.php");
class API extends REST{
public $data = "";
const DB_SERVER = "127.0.0.1";
const DB_USER = "power_for_test";
const DB_PASSWORD = "admin1234";
const DB = "power_mris_test";
private $db = NULL;
private $mysqli = NULL;
public function __construct(){
parent::__... | true |
d95aea793558b9df4b7b1d4b250fc61e62dee657 | PHP | level23/laravel-aws-queue | /src/Queue/Connectors/BatchConnector.php | UTF-8 | 736 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Level23\AwsQueue\Queue\Connectors;
use Aws\Sqs\SqsClient;
use Illuminate\Support\Arr;
use Level23\AwsQueue\Queue\BatchQueue;
class BatchConnector extends SqsConnector
{
/**
* Establish a queue connection.
*
* @param array $config
* @return \Illuminate\Contracts\Queue\Queue
... | true |
22844f4c63d05250b1e2ea441e8a9bfe2e531118 | PHP | t-sakurai816/auto-todo-ticket | /create-csr-ticket/main.php | UTF-8 | 3,358 | 2.6875 | 3 | [] | no_license | <?php
require_once('csr_ticket_info.php');
require_once('log_save.php');
//環境変数を読み込み
function load_env_file(){
require dirname(__FILE__).'/../vendor/autoload.php'; //vendorディレクトリの階層を指定する
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__. '/..'); //.envの階層を指定する
$dotenv->load();
return $dotenv;
}
//今日の日付を取得
func... | true |
04050c79c9f8dca25a536e6f579c644a9c0831b6 | PHP | ohladik/image-gallery | /models/category.php | UTF-8 | 1,059 | 3.421875 | 3 | [] | no_license | <?php
/**
* Class Category
* Model for post category.
* Categories are stored in DB table 'categories'.
* Categories can't be edited from UI.
*/
class Category {
/**
* @var int $id ID if category in 'id' column in DB table.
*/
/**
* @var string $name Name of category in 'name' column in DB... | true |
77a84bee5372dec0e754136befe6029fb920689d | PHP | fp4php/functional | /src/Fp/Collections/SetChainableOps.php | UTF-8 | 6,623 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Fp\Collections;
use Fp\Functional\Option\Option;
use Fp\Psalm\Hook\MethodReturnTypeProvider\CollectionFilterMethodReturnTypeProvider;
use Fp\Psalm\Hook\MethodReturnTypeProvider\MapTapNMethodReturnTypeProvider;
/**
* @template-covariant TV
*
* @psalm-suppress InvalidTempla... | true |
c2c8b95aa345fb1ac6492a30150f35ed6225d17d | PHP | liumochi/PHP- | /day2/05.php | UTF-8 | 1,205 | 2.546875 | 3 | [] | no_license |
<html>
<head>
<title>猜拳游戏</title>
<script>
function myChange(obj) {
var val = obj.value;
var myimag = document.getElementById('myimg');
if(val =='2'){
myimag.src="qt.jpg";
}else if(val =='1'){
myimag.src="jz.jpg";
... | true |
1256796517d078222e3a165fa4eb52c134de0337 | PHP | bobo541574/store-management-system-laravel | /app/Models/Order.php | UTF-8 | 2,266 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Order extends Model
{
use SoftDeletes;
protected $fillable = [
'product_attr_id', 'order_code', 'quantity', 'price', 'customer_name', 'phone', 'ordered', 'discount'
];
pub... | true |
5e382bc65e3d04525251e899b9fcd808196c9fea | PHP | liveart/lajs-admin | /app/controllers/ColorsController.php | UTF-8 | 3,215 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
class ColorsController extends BaseController {
protected $color;
public function __construct(Color $color)
{
$this->color = $color;
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$colors = $this->color->whereDoesntHave('products')->orderBy('nam... | true |
c3dc9257e60420db56f27db1bc4e62f650abcfe5 | PHP | Developers-Recipes/recetario-api | /app/Services/RecipeCurrentService.php | UTF-8 | 855 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\Recipe;
use App\Models\User;
class RecipeCurrentService
{
public function execute(Recipe $recipe, User $user)
{
if ($recipe->user_id === $user->id) {
$current = $recipe->is_current;
$recipe->is_current = !$current;
if... | true |
156d8f85e26d381e8cf7eabe3e6dd5a31e95004e | PHP | Carhugar1/Warmachine | /Commands/Waccess.php | UTF-8 | 3,396 | 3.0625 | 3 | [] | no_license | <?php
/**
* @author Carhugar1
*/
include_once '/Patterns/Command.php';
class Waccess extends Command {
// <---- Constructors ---->
/**
* Sets up the phrase for calling
*/
function __construct() {
parent::__construct(array('Waccess'), 8);
} // end __construct()
// <---- private functions... | true |
f1f8baa1fb196e6c9f8db2c12afe3e6486d03e66 | PHP | melvin-akino/latest-project-handled | /app/Http/Requests/CRM/CurrencyRequest.php | UTF-8 | 1,589 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests\CRM;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
class CurrencyRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
... | true |
4f1189d26360cb048516db080114c6a995b4cd80 | PHP | holiveira92/formas_geometricas | /app/Http/Controllers/RetanguloController.php | UTF-8 | 2,710 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Retangulo;
class RetanguloController extends Controller{
/**
* Create a new controller instance.
* @return void
*/
public function __construct(){
//Instanciando classes que serão utilizadas
$thi... | true |
f771b9238b2d272b216102ed207e22193df59141 | PHP | hide-code/cloud9-git | /htdocs/php/22/cookie_sample.php | UTF-8 | 695 | 3.546875 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Cookie</title>
</head>
<body>
<?php
// cookieが設定されていなければ(初回アクセス)、cookieを設定する
if ( !isset($_COOKIE['visit_count']) ) {
// cookieを設定
setcookie('visit_count', 1, time() + 3600);
print("訪問回数は1回<br>");
}
... | true |
98599f45151eb63f80a1da56e10b4d564ffe9bc5 | PHP | gomezger/proyecto-2-iaw | /app/Repositories/RepoMateria.php | UTF-8 | 3,214 | 2.953125 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\Materia;
class RepoMateria {
/**
* Retorna todas las materias con sus respectivas correlativas
*
* @return array arreglo de materias
*/
public static function all(){
return Materia::orderBy('cuatrimestre', 'ASC')->get();
}
... | true |
e083df9f8ec4cd83ee61d0070b0c90f1b8925808 | PHP | Tacticode/tacticode-web | /app/Http/Models/Chat.php | UTF-8 | 613 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Models;
use App\Http\Models\User;
use Illuminate\Database\Eloquent\Model;
class Chat extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'chats';
/**
* The attributes that are mass assignable.
*
*... | true |
c0abfd0148cfcb4e299aa6bf8798fc397d8e0010 | PHP | hafiz-amirali/Make-Simple-Marriage-backend | /src/app/utils/Utils.php | UTF-8 | 5,073 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Utils;
use Firebase\JWT\JWT;
use Tuupola\Base62;
use Slim\Http\UploadedFile;
class Utils
{
/**
* Encrypt a message
*
* @param string $message - message to encrypt
* @param string $key - encryption key
* @return string
*/
public static function safeEncrypt($message, $key)
{
$no... | true |
6d48ba98d63221459b0918eea68c10e6072fdc87 | PHP | wildantf/PAW | /Pertemuan1.php | UTF-8 | 894 | 3.328125 | 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">
<title>Document</title>
</head>
<body>
<h1>Challange #1</h1>
<?php echo 'hello world'; ?>
<br>
<?p... | true |
71024a25347e989259cc101e1da01d602d292c66 | PHP | Alaboudi1/SWE381 | /Quiz-2/quiz-A/operations.php | UTF-8 | 483 | 2.65625 | 3 | [] | no_license | <?php
class operations{
function __construct($db,$user){
$this->db=$db;
$this->user=$user;
}
function updateScore(){
$connection = $this->db->connection();
$statment=$connection->prepare("UPDATE `swe381-1` SET `SCORE`=? WHERE ID= ?");
$Score= $this->user->getScore();
$Id = $... | true |
fe1900d2461bad748b44d655b273680c946dd801 | PHP | MysteryCode/de.mysterycode.translate | /files/lib/data/package/SearchResultPackage.class.php | UTF-8 | 1,323 | 2.578125 | 3 | [] | no_license | <?php
namespace translate\data\package;
use wcf\data\search\ISearchResultObject;
use wcf\data\user\User;
use wcf\data\user\UserProfile;
use wcf\system\request\LinkHandler;
use wcf\system\search\SearchResultTextParser;
class SearchResultPackage extends Package implements ISearchResultObject {
/**
* @inheritDoc
*/... | true |
e2bf0e0272e9b635f73d39afaefd45327e59ab9f | PHP | Novrii/bps | /app/models/KomoditasModel.php | UTF-8 | 2,015 | 2.75 | 3 | [] | no_license | <?php
class KomoditasModel {
private $table = 'komoditas';
private $db;
public function __construct()
{
$this->db = new Database;
}
public function getKomoditas()
{
$this->db->query('SELECT DISTINCT komoditas FROM komoditas');
return $this->db->resultSet();
... | true |
1b20bfaeaabbd3b50a3ce188101cdd4b953b5982 | PHP | cloakedninjas/Transmogger | /application/views/helpers/TopList.php | UTF-8 | 1,225 | 2.734375 | 3 | [] | no_license | <?php
class App_View_Helper_Toplist extends Zend_View_Helper_Abstract {
public function topList($rows, $index_start) {
$html = '';
$i = 0;
foreach ($rows as $row) {
$i++;
$rank = $i + $index_start;
$row->label = ($row->label) ? $row->label : 'Untitled';
$html .= '<tr>';
$html .= '<td>' . $rank ... | true |
96a45ba56b431224fc51a6e1f7e937c75e68ba61 | PHP | ankuradhey/laundry | /library/TBS/Auth.php | UTF-8 | 2,688 | 2.859375 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
namespace TBS;
/**
*
* This class is almost an identical copy of the Zend_Auth class.
* Their are a few things different which are commented on.
*
* @author Roel Obdam
*
*/
class Auth
{
protected static $_instance = null;
protected $_storage = null;
public static function getInstance()
{
... | true |
b3770baf9a61e638455b5317269fe27ada7fe050 | PHP | ingatlancom/api-client | /lib/ApiClient/Service/Image/ImageInterface.php | UTF-8 | 1,201 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace IngatlanCom\ApiClient\Service\Image;
/**
* Interface ImageInterface
*
* Kép absztrakció interface
*
* @package IngatlanCom\ApiClient\Service\Image
*/
interface ImageInterface
{
/**
* Kép betöltése adatokból
*
* @param string $imageBytes
* @return ImageInterface
* @th... | true |
ee47316b58588eeaf24711e411954b9e87687098 | PHP | jahirmedinacs/2019-I-UNT-TLP | /labs2/5/s_potent.php | UTF-8 | 202 | 3.21875 | 3 | [] | no_license | <?php
$base = $_POST["N"];
$power = $_POST["M"];
$carry = 0;
for ($ii=0; $ii <=$power; $ii++) {
echo "$base<sup>$ii</sup> + ";
$carry += pow($base, $ii);
}
echo " = $carry</br>";
?>
| true |
8b13beb59dade285ea876dc6ebb5b9cdbfc28a2e | PHP | rjwhobbs/camagru_research | /comment.php | UTF-8 | 1,638 | 2.8125 | 3 | [] | no_license | <?php
session_start();
require ('./valid_session_check.php'); // How about an if state to not require controller till post is made?
require ('./controller.php');
require ('./header.php');
if (!empty($_POST['image_src']) && !empty($_POST['image_id']))
{
$_SESSION['image_src'] = $_POST['image_src']; // Do I need protect... | true |
fd8753f5d8b4e6fcf4e8275aa1893a99d073da7b | PHP | ruween/double-submit-cookies-csrf-implementation | /process.php | UTF-8 | 1,088 | 2.828125 | 3 | [] | no_license | <?php
session_start();
$csrf = $sid = "";
if(isset($_POST["amount"]) && isset($_POST['csrf'])){
if(isset($_COOKIE["csrf"])){ //checking if the CSRF cookie is set and passing it into a variable
$csrf = $_COOKIE["csrf"];
}
if($csrf != $_POST["csrf"]){ ... | true |
2d02a9d1eeccadf67c7da326b252710f29302e1f | PHP | Mona-src/WordPress-Site-Web | /theweb/includes/Manage/Emails.php | UTF-8 | 748 | 2.53125 | 3 | [] | no_license | <?php
namespace TheWeb\Manage;
class Emails
{
public function send_to_registered()
{
$manageUser = new ManageUser();
$users = $manageUser->get_users();
foreach ($users as $user) {
$to = $user->email;
$subject = "Soirée Halloween";
$message = "Merci ... | true |
8b56fa673f8f779c9ca5dc716d49b2c32361b4f0 | PHP | holapjp/actividades | /class.php | UTF-8 | 1,640 | 3 | 3 | [] | no_license | <?php
class Conexion{
private $conexion = null;
private $datos = array();
public function __construct(){
$this->conexion = new PDO("mysql:host=localhost;dbname=actividad10","root","");
}
public function SearchEmail($username){
$username = ... | true |
bf8723e6b0f6c24dcdb4ec1d6af9391cab5344cd | PHP | anshika-1999/Read_Count | /connect.php | UTF-8 | 333 | 2.53125 | 3 | [] | no_license | <?php
$errors = array();
$username = "";
define('DB_SERVER','localhost');
define('DB_USERNAME','root');
define('DB_PASSWORD','');
define('DB_NAME','read_count');
$conn = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_NAME);
if($conn->connect_error){
die("Error: Cannot connect to database" . $conn->connect_er... | true |
2a25948997d896752bc859f65baf1632f0bea330 | PHP | mtaz337/Recondition-Car-Selling | /admin/includes/car.php | UTF-8 | 102 | 2.578125 | 3 | [] | no_license | <?php
class Car{
public function run(){
echo '<h2>Rolling, Rolling....</h2>';
}
} | true |
5ef40503981675418b6ac321e90e710743126fdd | PHP | olegdubas/DB | /DB.php | UTF-8 | 18,286 | 3.234375 | 3 | [] | no_license | <?php
class DB
{
static private $predicted_connections = []; // for predicted connections (will be opened on the first use)
static public $connections = []; // for active connections
static public $insert_id = null;
static public $affected_rows = null;
// open a PDO connection and a... | true |
fcc1302b05d78d1d0f6971de633544ba7389d326 | PHP | austinkregel/finance | /tests/Integration/Filters/Conditions/EndsWithTest.php | UTF-8 | 863 | 2.671875 | 3 | [] | no_license | <?php
namespace Tests\Integration\Filters\Conditions;
use App\Condition;
use App\Filters\Conditions\EndsWith;
use Tests\TestCase;
class EndsWithTest extends TestCase
{
/**
* @dataProvider dataProvider
*/
public function testInvoke($expect, $valueSearch, $actualValue): void
{
$condition ... | true |
76815c6ecaaf2835aec803e64a10ff12fbd8692d | PHP | KeesKezer/bootcamp_weekopdracht_2 | /blogtekstverwerking.php | UTF-8 | 470 | 2.75 | 3 | [] | no_license | <?php
if(isset($_POST['name']) && isset($_POST['blogpost'])) {
$data = $_POST['name'] . '' . $_POST['blogpost'] . " <br>\r\n";
$ret = file_put_contents('mijnblog.txt', $data, FILE_APPEND | LOCK_EX);
if($ret === false) {
die('Er ging iets mis met het schrijven van dit bestand');
}
else... | true |
bb78a757be9fa4134a21b22fdaf1acd1a2b1efba | PHP | galuhramaditya/omega-front-office | /app/Exceptions/ValidationException.php | UTF-8 | 339 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Exceptions;
use Exception;
use App\Libraries\Response;
class ValidationException extends Exception
{
private $data;
public function __construct($data)
{
$this->data = $data;
}
public function render()
{
return Response::error("request is not complete", $t... | true |
b3141c5479fe962852506949a45d114bbcbbf666 | PHP | pinoydestination/Philippine-Tourism | /dashboard/dashboard.class.php | UTF-8 | 6,663 | 2.671875 | 3 | [] | no_license | <?php
$table = $table_prefix."amenities";
wp_reset_query();
function getAmenities($id=0){
$table = $table_prefix."amenities";
if($id<=0){
echo $sql = "SELECT * FROM ".$table;
//$mylink = $wpdb->get_results($sql);
/*
$arrData = '';
foreach($mylink as $data){
$arrId = $data->id;
$arrName = $data-... | true |
f01319d4ed5fbf3d423e3ca9950f5935253d5fdd | PHP | grrr-amsterdam/golem | /garp/library/Garp/Image/Scaler.php | UTF-8 | 17,122 | 3.03125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Garp_Image_Scaler
* Scales images
* @author David Spreekmeester | Grrr.nl
* @package Garp
**/
class Garp_Image_Scaler {
/**
* @var Array $args Scaling behavior parameters
**/
public $args = array(
'w',
'h',
'bgcolor',
'crop',
'cropfocus',
'grow'
);
/**
* @var String $name The sc... | true |
20f3de6d4f5a60fa21eb196e62d42abfeb056423 | PHP | heqichang/PHP_Study | /11.php | UTF-8 | 528 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: heqichang
* Date: 14/12/24
* Time: 上午9:48
*/
class S {
function int($param) {
return intval($param);
}
}
$f = 10.2;
echo S::int($f);
$GLOBALS['abc'] = 1;
echo $abc;
$attr = array('HTTP_REFERER','HTTP_HOST','HTTP_X_FORWARDED_FOR','HTTP_USER_AGENT',
... | true |
c82538197a9f5d84e70063fbc189d449d3c90382 | PHP | jwhitcraft/zend_service_amazon_ec2 | /test/Zend/Service/Amazon/AbstractTest.php | UTF-8 | 2,304 | 2.59375 | 3 | [] | no_license | <?php
require_once 'Zend/Service/Amazon/Abstract.php';
require_once 'PHPUnit/Framework/TestCase.php';
/**
* Zend_Service_Amazon_Sqs_Queue test case.
*/
class AmamzonAbstract extends PHPUnit_Framework_TestCase
{
/**
* Prepares the environment before running a test.
*/
protected function setUp()
... | true |
8fda62080685add9e6177c36ff1e18e1db58dae8 | PHP | furba576/JobDoot | /application/models/admin/Mailbox_model.php | UTF-8 | 516 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
class Mailbox_model extends CI_Model{
public function get_all_mails(){
$this->db->select("*");
$this->db->from('xx_contact_us');
$this->db->order_by('created_date');
$result = $this->db->get();
return $result->result_array();
}
pub... | true |
2488c7467ff4bf61e095c9c7b060456fe340294a | PHP | cncf/cncf.io | /web/wp-content/themes/cncf-twenty-two/components/case-study-item.php | UTF-8 | 2,773 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Case Study Item
*
* Case study item.
*
* @package WordPress
* @subpackage cncf-theme
* @since 1.0.0
*/
// if cn CPT set chinese conditional true.
if ( isset( $query ) && ( 'lf_case_study_cn' === $query->query['post_type'] ) ) {
$cn = true;
} else {
$cn = false;
}
// setup projects for both lang.... | true |
0c3b379df3d077e7a8c4d8098bed48d727a0a5bb | PHP | renoki-co/dynamodb | /src/Parsers/KeyConditionExpression.php | UTF-8 | 673 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Rennokki\DynamoDb\Parsers;
use Illuminate\Support\Arr;
use Rennokki\DynamoDb\ComparisonOperator;
class KeyConditionExpression extends ConditionExpression
{
/**
* Get the list of supported operators in key conditions.
*
* @return array
*/
protected function getSupportedOper... | true |
81b43f26650c777a98bd16f2a4e058adac389933 | PHP | aplinxy9plin/hidebox | /functions.php | UTF-8 | 2,849 | 2.765625 | 3 | [] | no_license | <?php
session_start();
$servername = "localhost";
$username = "root";
$password = "top4ek2281337?";
$dbname = "secret_friend";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$file_name = 'http://ulogin.ru/token.php?... | true |
a7832e31918d0e258b3f244d3517e9744960aa4e | PHP | KeeperJerry/L-Shop-remade | /app/Handlers/Admin/Statistic/Purchases/CompleteHandler.php | UTF-8 | 1,497 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace app\Handlers\Admin\Statistic\Purchases;
use app\Entity\Purchase;
use app\Exceptions\Distributor\DistributionException;
use app\Exceptions\Purchase\AlreadyCompletedException;
use app\Exceptions\Purchase\PurchaseNotFoundException;
use app\Repository\Purchase\PurchaseRepository... | true |
549252be57108f8f007522fe1c64daf01d939d01 | PHP | HectorEdgar/practicas-unam | /app/Utilidad.php | UTF-8 | 3,666 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace sistema;
use DB;
use Illuminate\Support\Facades\Log;
class Utilidad
{
private static function getMaxId($nombreTabla,$nombreId)
{
$query = DB::table($nombreTabla)->max($nombreId);
return $query;
}
public static function getCount($nombreTabla)
{
return DB:... | true |
bd38fabd0079da360f0dd9d58930c335182988de | PHP | johnnycea/ccla | /metodos_ajax/evento/mostrar_eventos_index.php | UTF-8 | 603 | 2.53125 | 3 | [] | no_license | <?php
require_once '../../clases/Evento.php';
$Evento = new Evento();
$listadoActividades = $Evento->obtenerEvento();
$eventos = array();
while($filas= $listadoActividades->fetch_array()){
$e = array();
$e['id'] = $filas['id_evento'];
$e['start'] = $filas['fecha_inicio'];
$e['end'] = $filas['fecha_fin']... | true |
d1a594dbc1886cbc04274210d251cfe73ad107c2 | PHP | gitcortz/windglass | /app/Http/Controllers/EmployeeController.php | UTF-8 | 1,424 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Employee;
use App\Http\Traits\Paginatable;
use Validator;
class EmployeeController extends Controller
{
use Paginatable;
public function index()
{
return Employee::paginate($this->getPerPage());
}
public functio... | true |
fc0dfcab99ebea24258d57e97e3d1ad68049216c | PHP | ilya-torlin/Sites | /basic/models/Users.php | UTF-8 | 2,202 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "users".
*
* @property int $id
* @property string $login
* @property string $pass
* @property string $token
*
* @property UsersFiles[] $usersFiles
*/
class Users extends \yii\db\ActiveRecord implements \yii\web\IdentityInterface
{
... | true |