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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ebcc2a70cd3b5ec6769eed89f0ebf49b0e83a609 | PHP | AFONSECAM/phone_sh0p | /includes/class_brand.php | UTF-8 | 2,565 | 2.75 | 3 | [] | no_license | <?php
include_once ("class_conection.php");
class Brand extends Conection
{
private $nombre;
private $tipo;
private $conexion_bd;
function __construct()
{
$this->conexion_bd = new Conection();
$this->conexion_bd = $this->conexion_bd->connect();
}
function createBrand($... | true |
fe71a8db72f26f22e9035e874cf50e14729a0f16 | PHP | bigdropinc/yii2-docker-template | /app/backend/models/User.php | UTF-8 | 513 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: bigdrop
* Date: 11.09.17
* Time: 11:02
*/
namespace backend\models;
/**
* Class User
*
* @package backend\models
*/
class User extends \common\models\User
{
/**
* Finds user by username
*
* @param string $username
* @return static|null
*/
... | true |
caf69def16e79d14800766f2d757583a78761a94 | PHP | ArtemBrovko/tw-sa-sync | /src/App/Utils/PrintTableTrait.php | UTF-8 | 718 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Utils;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\PropertyAccess\PropertyAccessor;
trait PrintTableTrait
{
private function printTable(Table $table, $json)
{
$propertyAccessor = new PropertyAccessor();
if (count($json)) {
$table->setHea... | true |
2e7b8788a8144a504a039d11069acd97ed87e6e2 | PHP | Alfatyhin/test-07 | /app/Servises/ParserCsvService.php | UTF-8 | 1,730 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Servises;
class ParserCsvService
{
private $headers;
private $collectionLines = [];
public function __construct()
{
}
public function addCollectionLies(array $data) : self // типизация - то чо должна возвращать функция??
{
if (!$this->headers) {
... | true |
dac7845f866dbfef9c2cd2826a85738b4de3e737 | PHP | Gilles-boyer/epitech | /Transfert/pool_php_02/ex_02/ex_02.php | UTF-8 | 316 | 2.96875 | 3 | [] | no_license | <?php
function my_create_map(...$array)
{
$newarray = array();
foreach ($array as $key => $value)
{
if(count($value) > 2)
{
echo "The given arguments aren't valid.";
return NULL;
}
$newarray[$value[0]] = $value[1];
}
return $newarray;
}
| true |
22852ec323887fc5706ed65543c1bd4afa463000 | PHP | pieshop/portfolio | /api/system/app/Models/api_v2/Nextstep.php | UTF-8 | 1,227 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\api_v2;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Log;
use Illuminate\Database\Eloquent\Model;
class Nextstep extends Model
{
public static function get_data($id)
{
Log::info('Nextstep.get_data: ' . $id);
try {
$file = Storage::disk('public')->get($id... | true |
b3c50e5ed8b0374491bfb4ded5b15c19726c8c11 | PHP | Rizki-Syafa-Nirmala/01PHP_XIRPL2_6 | /tangkap.php | UTF-8 | 567 | 2.671875 | 3 | [] | no_license | <?php
echo $_GET['v1'];
echo "";
echo $_GET['v2'];
?>
<!DOCTYPE html>
<html>
<head>
<title>Belajar PHP</title>
</head>
<body>
<fieldset id="ini">
<label for="ini">DATA</label>
<form method="POST" action="proses1.php">
<p>Nama : <input t... | true |
d942c84df24414d633418abc70dd3df937224379 | PHP | Shardj/zf1-future | /library/Zend/Memory/Container/Movable.php | UTF-8 | 6,923 | 2.59375 | 3 | [
"JSON",
"LicenseRef-scancode-generic-cla"
] | permissive | <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license an... | true |
4680944b3f467046b9cfefc6e8f53d24a1951cc4 | PHP | gdm-1718-annadela/RisicovolSpelen | /web/app/themes/zakra/inc/class-zakra-dynamic-filter.php | UTF-8 | 2,975 | 2.609375 | 3 | [
"GPL-3.0-or-later",
"OFL-1.1",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain",
"GPL-1.0-or-later",
"CC0-1.0",
"GPL-3.0-only",
"MIT"
] | permissive | <?php
/**
* Filter array values.
*
* @package ThemeGrill
* @subpackage Zakra
* @since Zakra 1.1.7
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
/*========================================== HEADER > HEADER TOP BAR ==========================================*/
if ( ! class_exi... | true |
e1d711aa5b26eacf87dff876c37c67f34b3cda85 | PHP | joyhooei/pincong-wecenter | /system/Services/WhereBuilder.php | UTF-8 | 6,924 | 3.109375 | 3 | [] | no_license | <?php
class Services_WhereBuilder
{
private static $condition_operators = array(
'isNull',
'isNotNull',
'between',
'notBetween',
'like',
'notLike',
'in',
'notIn',
'eq',
'notEq',
'lt',
'gt',
'lte',
'gte',
);
private static $concatenation_operators = array(
'and',
'or',
);
private ... | true |
84781623b904de9bee6c64d33f9df7699d33bdd4 | PHP | MrNiceRicee/Database_Applications1_BlogPost | /getAllUsers.php | UTF-8 | 1,018 | 3.3125 | 3 | [] | no_license | <?php
//Credentials for accessing the database
$dbservername="localhost";
$dbusername="root";
$dbpassword = "root";
$dbname = "fridaynotes_1.10.2020";
//create connection
$conn = new mysqli($dbservername, $dbusername, $dbpassword, $dbname,3306);
if ($conn ->connect_error)
{
... | true |
ed3fbb7adac8fc2ad33528d763adf118a6210290 | PHP | stonegithubs/Thinkphp5-wxpay | /wxpay/WxOrderQuery.php | UTF-8 | 3,144 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace wxpay;
/**
* 微信支付订单的查询
*
* 使用:
* 将本文件放到extend目录下即可
*
* 用法:
* 调用 \wxpay\WxOrderQuery::query($order_no) 即可完成订单查询
*
* 注意:
* 1.错误采用抛出异常的方式, 可根据自己的业务在统一接口进行修改
* 2.默认通过商户订单号(out_trade_no)查询, 可以通过修改常量ORDER_TYPE更改为 微信订单号(transaction_id)
*
* ----------------- 求职 ------------------
* 姓名: zhangchaojie 邮箱: z... | true |
5e1ca678f223d1fbdcc7e79fb2888b7cbdde235c | PHP | aternosorg/php-model | /src/Driver/Cassandra/Cassandra.php | UTF-8 | 6,847 | 2.75 | 3 | [
"MIT"
] | permissive | <?php /** @noinspection PhpComposerExtensionStubsInspection */
namespace Aternos\Model\Driver\Cassandra;
use Aternos\Model\Driver\Driver;
use Aternos\Model\Driver\Features\CRUDAbleInterface;
use Aternos\Model\Driver\Features\QueryableInterface;
use Aternos\Model\ModelInterface;
use Aternos\Model\Query\Generator\SQL;
... | true |
a3a1807bd09cef38a715f31094c05bf04d8832c5 | PHP | ljuraszek/symfony-graphql | /src/Repository/Query/PostQuery.php | UTF-8 | 308 | 2.59375 | 3 | [] | no_license | <?php declare(strict_types = 1);
namespace App\Repository\Query;
use App\Repository\PostRepository;
abstract class PostQuery
{
/** @var PostRepository */
protected $repository;
public function __construct(PostRepository $repository)
{
$this->repository = $repository;
}
}
| true |
aa45e1eddd5c28a31d7f58c2223c3609da18a4b8 | PHP | wilterson/softcars | /admin/cad_carros.php | UTF-8 | 1,071 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Wilterson Garcia
* Date: 20/06/2016
* Time: 00:49
*/
include('config/initialize.php');
include('config/Conn/Conn.class.php');
session_start();
// Recebe e valida as variaveis
$marca = filter_var(mb_strtolower( $_POST['marcaCar'] ), FILTER_SANITIZE_STRING);
$modelo = filte... | true |
380df2a1c3fe18373d078527cbc0bd6ca9aca0dd | PHP | jh3/drushexts | /lightcron.drush.inc | UTF-8 | 2,103 | 2.6875 | 3 | [] | no_license | <?php
/**
* Implementation of hook_drush_command().
*/
function lightcron_drush_command() {
$items = array();
$items['run-cron-hooks'] = array(
'description' => "Run a cron hook for a specific module or set of modules",
'arguments' => array(
'modules' => 'The modules that have the cron hooks you wan... | true |
849e5602f3faf005586c6d272acad4d202cfea7d | PHP | simonbacquie/shift-api | /src/Model/Shift.php | UTF-8 | 2,688 | 2.703125 | 3 | [] | no_license | <?php
//User Model
namespace ShiftApi\Model;
use Illuminate\Database\Eloquent\Model as Eloquent;
use Illuminate\Validation\Factory as ValidatorFactory;
use Symfony\Component\Translation\Translator;
class Shift extends Eloquent {
protected $table = 'shifts';
protected $guarded = ['id']; // don't a... | true |
f952b6915427673a78e2a6cdad4550143de5d326 | PHP | bmvc-php/bmvc-app | /vendor/mirarus/bmvc-exception/src/ClassException.php | UTF-8 | 676 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* ClassException
*
* Mirarus BMVC
* @package BMVC\Exception
* @author Ali Güçlü (Mirarus) <aliguclutr@gmail.com>
* @link https://github.com/mirarus/bmvc-exception
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version 0.3
*/
namespace BMVC\Exception;
use Exception;
class Class... | true |
6f967eef9aaf3ea05e5a7ae684b8ec1b18adeb89 | PHP | mireq/Shakal | /system/ShakalExceptions.php | UTF-8 | 3,272 | 2.75 | 3 | [] | no_license | <?php
/**
* \file
* \author Miroslav Bendík
* \brief Výnimky používane v Shakal CMS.
*/
namespace Shakal;
/**
* \brief Základná výnimka v Shakal CMS.
* \ingroup Shakal_Exceptions
* \licenses \gpl
*
* Na rozdiel od štandardných výnimiek v PHP má táto výnimka
* navyše ple \e data používané pre rozšírené inform... | true |
2b0ab0644dc940a4a4d7d220c74e264aaf7a5521 | PHP | flyplay91/acellemail | /app/Model/IpLocation.php | UTF-8 | 3,904 | 2.703125 | 3 | [] | no_license | <?php
/**
* IpLocation class.
*
* Model class for IP Locations
*
* LICENSE: This product includes software developed at
* the Acelle Co., Ltd. (http://acellemail.com/).
*
* @category MVC Model
*
* @author N. Pham <n.pham@acellemail.com>
* @author L. Pham <l.pham@acellemail.com>
* @copyright Acel... | true |
20c08622e90c7dbf8f575813c0a9006ba67055a4 | PHP | naknak987/ForkingDaemon | /Daemon/doJob.php | UTF-8 | 2,694 | 2.984375 | 3 | [] | no_license | <?php
/**
* Do Job
*
* This is the code that will pull jobs from beanstalkd and
* execute the job. The code here depends a lot on the job
* what you're trying to accoplish with the daemon.
*
* PHP Version 7.1.19
*
* @category Job
* @package ForkingDaemon
* @author Matthew Goheen <matthew.goheen@guardiane... | true |
f12f360c703b60cb9ac532f0dd114e7fe5c2cd5d | PHP | c3limited/magento-remember-settings | /src/web-root/app/code/local/C3/RememberSettings/Model/Admin/Observer.php | UTF-8 | 4,117 | 2.640625 | 3 | [] | no_license | <?php
/**
* Class C3_RememberSettings_Model_Admin_Observer
*/
class C3_RememberSettings_Model_Admin_Observer
{
const GRID_PREFIX = 'grid';
/**
* Load admin user preferences to session
*
* @param $observer
*/
public function loadGridPreferences($observer)
{
// Get extra (p... | true |
eb4d4b4f0ef7490afbaace97feb9f1fe8836e0db | PHP | mohitoshpm/Hr | /framework/Enum.php | UTF-8 | 448 | 2.953125 | 3 | [] | no_license | <?php
//Gender Enum
class Gender
{
var $Male = 1;
var $Female = 2;
var $Other = 3;
}
function GenderEnumList(){
$gender = new Gender();
$class_vars = get_class_vars(get_class($gender));
return $class_vars;
}
//User Type Enum
class UserTypeEnum
{
var $Hr = 1;
var $Employee = 2;
}
functi... | true |
4a1d17d0c7f77ef96243b0fa872aa4827101700e | PHP | eliud03/blog | /application/views/show_entries.php | UTF-8 | 618 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive |
<div class="container">
<?php if (!empty($entries)) : ?>
<?php foreach($entries as $entry) : ?>
<h2><a href="<?=base_url().'blog/view/'.$entry->id?>"><?=$entry->title?></a></h2>
<p><span class="textAzul">Author:</s... | true |
4cd48bfec02037fd1b494e351f34f89a0a1c6ff8 | PHP | NotYannis/portfolio | /lib/auth.php | UTF-8 | 968 | 2.859375 | 3 | [] | no_license | <?php
session_start();
// Redirige vers la page login si pas identifié
if(!isset($auth)){
if(!isset($_SESSION['Auth']['id'])){
header('Location:' . WEBROOT . 'login.php');
die();
}
}
/**
* Créé un jeton csrf pour éviter d'avoir les informations sur les actions
* en clair dans l'url lorsqu'on est logg... | true |
297747b784c441e903d095a6b5025e268416a518 | PHP | dc769319/tiny | /app/core/App.php | UTF-8 | 5,974 | 2.875 | 3 | [] | no_license | <?php
namespace app\core;
class App
{
/**
* 存储配置项的数组
* @var array
*/
public static $conf;
/**
* @var string 默认访问的控制器名称
*/
private $defaultController;
/**
* @var string 默认访问的方法名称
*/
private $defaultAction;
/**
* @var \app\core\Route 的引用
*/
... | true |
c64b79eb0dc0b029cada2a308bd0a076df65fe1c | PHP | mpscholten/github-api | /src/Api/AbstractApi.php | UTF-8 | 2,576 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace MPScholten\GitHubApi\Api;
use Guzzle\Http\ClientInterface;
use Guzzle\Http\Message\RequestInterface;
use MPScholten\GitHubApi\Exception\GithubException;
use MPScholten\GitHubApi\ResponseDecoder;
class AbstractApi
{
protected $client;
public function __construct(ClientInterface $client = null... | true |
6bad174ecac827405c3a1edd71f704dcdaa7e9ce | PHP | astandre/ingenieria_web | /practicaPHP/internas/procesar.php | UTF-8 | 734 | 3.28125 | 3 | [] | no_license | <?php
extract($_POST);
//$var1 = 2;
//$var2 = "3";
//echo $res = $var1 + $var2;
$fecha_actual = "2018-05-10";
$tiempo = strtotime($fecha_nacimiento);
$ahora = time();
$edad = ($ahora - $tiempo) / (60*60*24*365.25);
$edad = floor($edad);
echo "Hola PHP <br> Bienvenidos ".$nombres." ".$apellidos;
print "<br> Ud tiene: ".... | true |
f634caa5ab217d8f3b2cf18b82695ae90dc06334 | PHP | nimanym/fliquer | /veralbum.php | UTF-8 | 1,691 | 2.8125 | 3 | [] | no_license | <?php
// Título de la página, se muestra en <title> y en el cuerpo de la página con <h2>
$title = "Ver Álbum - Fliquer";
$nombre = "Ver Álbum";
require_once("cabecera.inc");
if(!isset($_SESSION['nombreUsu'])){
header('Location: nuevoUsuario.php');
}
?>
<script src="cambioEstilos.js"></script>
<script src="validac... | true |
76e36fb40df7d0e942f74b664426fd7e1ebe0032 | PHP | Skaras85/legitymacje | /framework/engine/lang.class.php | UTF-8 | 9,995 | 2.640625 | 3 | [] | no_license | <?php
class lang{
public static $msg = ''; //komunikat ustawiany przy wielu metodach
public static function set_lang($lang=false)
{
$default_lang = self::get_default_lang();
if($lang)
{
//sprawdzamy czy taki język istnieje
$is_exists = db::get_one("SELECT 1 FROM langs WHERE short='$la... | true |
88ad1fe13e66a70a7422cfd7be7518d8bc0734a8 | PHP | pitchpro/pitchpro_plugin | /lib/helpers.php | UTF-8 | 2,671 | 3.09375 | 3 | [] | no_license | <?php
/**
* These functions should exist in WordPress or PHP already
* but they don't :(
*/
if( !function_exists( 'is_post_type' ) ){
function is_post_type( $type ){
global $wp_query;
if( ( is_array($type) && in_array( get_post_type( $wp_query->post->ID ), $type ) ) || $type == get_post_type( $... | true |
63aa867cf09108fed5d5540df173a83b64da21e5 | PHP | klonekreyesm/Codeup_Exercises | /FizzBuzz.php | UTF-8 | 779 | 4.125 | 4 | [] | no_license | <?php
//set a start variable $number; while this condition is met; incrementor - increment number each loop
for ($number=0; $number <= 100; $number++){
if($number % 3 == 0 && $a % 5 == 0){
echo "$number FizzBuzz".PHP_EOL;
}
// if the divisble of 3 is remainder 0 print... | true |
ead160bb44d8cf195ffc3f27a864a7a87b191a3f | PHP | nurasma1604/reruncloud | /movie_search.php | UTF-8 | 1,375 | 2.859375 | 3 | [] | no_license | <?php include("dataconnection.php"); ?>
<html>
<head><title>Search Movie</title>
<link href="design.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="wrapper">
<div id="left">
<?php include("menu.php"); ?>
</div>
<div id="right">
<h1>Search for a Movie</h1>
<form name="addfrm" method="pos... | true |
3c40b8a53a50fc35cda4e349b95795cc7efa2adb | PHP | wahyu-pro/phptask5 | /004.php | UTF-8 | 1,899 | 3 | 3 | [] | no_license | <?php
require_once 'dompdf/autoload.inc.php';
require_once 'simple_html_dom.php';
use Dompdf\Dompdf;
class ComingSoon
{
function __construct()
{
$this->getInfo();
}
function getInfo()
{
$html = file_get_html("http://www.cgv.id/en/loader/home_movie_list");
$mainUrl = "https://www.cgv.id";
$html = $html... | true |
4d8b9fcb277ee89d43bbeea323e11a1b30a01bb8 | PHP | AmenokoEnginner/Like_btn | /like_btn_sample/Like.php | UTF-8 | 6,333 | 3.03125 | 3 | [] | no_license | <?php
namespace MyApp;
class Like {
private $db;
public function __construct() {
$this->connectDB();
$this->createToken();
}
private function connectDB() {
try {
$this->db = new \PDO(PDO_DSN, DB_USERNAME, DB_PASSWORD);
$this->db->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTIO... | true |
4fa8dcd4ed549c43d928ae387aeeb9115d14ee93 | PHP | RamilYumaev/aa_dev | /modules/dictionary/models/RegisterCompetitionList.php | UTF-8 | 4,289 | 2.546875 | 3 | [] | permissive | <?php
namespace modules\dictionary\models;
use dictionary\models\DictCompetitiveGroup;
use dictionary\models\DictSpeciality;
use dictionary\models\Faculty;
use yii\db\ActiveRecord;
/**
* This is the model class for table "{{%register_competition_list}}".
*
* @property integer $id
* @property integer $ais_cg_id
... | true |
e32df488ab6ad0a84c78dd6b1ad503415c0986f1 | PHP | phoice/phlexa | /test/Response/OutputSpeech/PlainTextTest.php | UTF-8 | 1,260 | 2.640625 | 3 | [] | no_license | <?php
/**
* Build voice applications for Amazon Alexa with phlexa and PHP
*
* @author Ralf Eggert <ralf@travello.audio>
* @license http://opensource.org/licenses/MIT The MIT License (MIT)
* @link https://github.com/phoice/phlexa
* @link https://www.phoice.tech/
* @link https://www.travel... | true |
899c99fc38a9efe499be834f1d46815eae96b96c | PHP | AASavelyev/test | /application/controllers/controller_admin.php | UTF-8 | 2,031 | 2.65625 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT'].'/application/models/comment.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/application/repositories/commentRepository.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/application/repositories/adminRepository.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/application/core/cont... | true |
7045a53a62c38ba605c28e058821f2b89c930c88 | PHP | Dre90/Web2 | /Labs/lab4/solutions/task4/person_class.php | UTF-8 | 488 | 3.65625 | 4 | [] | no_license | <?php
class Person {
//define protected properties
protected $name;
protected $owned_car;
//this construct method only accepts name
public function __construct($n){
$this -> name = $n;
}
//setter methods
public function set_name($n) {
$this -> name = $n;
}
public function set_owned_car($c) {
$this -> ... | true |
d153b03235e18b5347228068bc09dadf1c06ff93 | PHP | homoludens/ffs | /tests/Simplex/Tests/FrameworkTest.php | UTF-8 | 2,960 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
// example.com/tests/Simplex/Tests/FrameworkTest.php
namespace Simplex\Tests;
use PHPUnit\Framework\TestCase;
use Simplex\Framework;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
use Symfony\Component\HttpKernel\Controller\ControllerResolver... | true |
7dcac345a2e9476193eb8f337ad2d9266b05e925 | PHP | saviosvm/app_super_gestao | /database/migrations/2021_09_06_180100_create_clientes_pedidos_produtos.php | UTF-8 | 1,657 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateClientesPedidosProdutos extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('clie... | true |
54adb7cc393aabbb5bfdc5aa26eaa4a93d9526b6 | PHP | viender/viender | /apps/topic/src/Repositories/TopicsRepository.php | UTF-8 | 645 | 2.53125 | 3 | [] | no_license | <?php
namespace Viender\Topic\Repositories;
use App\User;
use Viender\Topic\Models\Topic;
use Viender\Follow\Models\Follow;
class TopicsRepository extends Repository
{
public function model()
{
return 'Viender\Topic\Models\Topic';
}
public function userFollowTopic(User $user, Topic $topic)
... | true |
f998606bd1a17e00431ad180f81177fbee1d9024 | PHP | ArtemNehoda/pa-parser | /tests/Feature/SpiralShapeFormatterTest.php | UTF-8 | 907 | 2.78125 | 3 | [] | no_license | <?php
namespace Tests\Feature;
use App\Helpers\Formatters\SpiralShapeFormatter;
use Tests\TestCase;
class SpiralShapeFormatterTest extends TestCase
{
public function getFormatter()
{
$formatter = new SpiralShapeFormatter;
return $formatter;
}
public function test_formatting_a_spiral1... | true |
4604d8db5a79eaa526e7355174a71706beba935e | PHP | 3plo/ServicePlatform | /models/active_record/user_active_record/UserActiveRecord.php | UTF-8 | 2,393 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: user
* Date: 25.01.2018
* Time: 23:04
*/
namespace models\active_record\user_active_record;
use application\Application;
use models\active_record\ActiveRecord;
use models\models_exceptions\db_exceptions\DBException;
final class UserActiveRecord extends ActiveRecord
{
... | true |
3d31b4847e697c1d811931f212864b30588b1b42 | PHP | AlexisAnd/Pizza_Patron_Symfony_3 | /src/AppBundle/Controller/Admin/AdminDessertsController.php | UTF-8 | 3,036 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Alexis
* Date: 24/11/2017
* Time: 14:41
*/
namespace AppBundle\Controller\Admin;
use AppBundle\Entity\Desserts;
use AppBundle\Form\DessertsType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symf... | true |
5d095bc1608994dc02b60dd437780472f4139d29 | PHP | ahmad-sa3d/json-response-builder | /tests/unit/TestJsonResponseBuilder.php | UTF-8 | 5,836 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Test Cases for JsonResponseBuilder
*
* @author Ahmed Saad <a7mad.sa3d.2014@gmail.com>
* @package Api Json Response Builder
* @license MIT
* @version 1.0.0 First Version
*/
use Orchestra\Testbench\TestCase;
use Saad\JsonResponseBuilder\JsonResponseBuilder;
use Test\Unit\BuilderTestSetup;
/**
* @c... | true |
0d20f7f22f426acbf3140f471a3d86aef9729b75 | PHP | smaignan/Prono | /View/Page.php | UTF-8 | 369 | 2.9375 | 3 | [] | no_license | <?php
/*
* fichier : Page.php
* version : 1.0
* auteur : Sylvain
* date : 11 janv. 08
*
* description :
* modification : auteur date modification
*/
abstract class Page
{
var $s_Contenu = "";
function __construct()
{
$s_Contenu = "sss";
}
public function Affiche... | true |
8b5022be4e76fb81df41e045e87ecfcedbe03383 | PHP | alexbelij/yandex-ad-generator | /models/AdTemplateCategory.php | UTF-8 | 1,244 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "ad_template_category".
*
* @property integer $ad_template_id
* @property integer $category_id
*
* @property AdTemplate $adTemplate
* @property ExternalCategory $category
*/
class AdTemplateCategory extends \yii\db\ActiveRecord
{
... | true |
b2488430a5a5532cccc94eaa0ae8641307003e93 | PHP | filbertkm/WikiClient | /src/WikiClient/MediaWiki/WikiFactory.php | UTF-8 | 437 | 2.859375 | 3 | [] | no_license | <?php
namespace WikiClient\MediaWiki;
use Exception;
class WikiFactory {
private $wikis;
public function __construct( array $wikis ) {
$this->wikis = $wikis;
}
public function newWiki( $siteId ) {
if ( !array_key_exists( $siteId, $this->wikis ) ) {
throw new Exception( "Site $siteId not found in config... | true |
180456abf0075790bd297fff58afdd34bbe80aa2 | PHP | gabrielvsf/cursolaravel | /controle-series/app/Services/RemovedorDeAnime.php | UTF-8 | 551 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Anime;
use App\Temporada;
use App\Episodio;
class RemovedorDeAnime
{
public function removerAnime(int $animeId):string
{
$anime=Anime::find($animeId);
$nomeAnime = $anime->nome;
$anime->temporadas->each(function (Temporada $temporada){
... | true |
7b1e398432c54e6cebbf853cd866d19d2a57bb71 | PHP | starme/elasticsearch | /src/Query/Grammars/Warp.php | UTF-8 | 2,305 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Starme\Elasticsearch\Query\Grammars;
trait Warp
{
protected $tablePrefix;
/**
* Convert an array of column names into a delimited string.
*
* @param array $columns
* @param bool $build_script
* @return array
*/
public function columnize(array $columns, $buil... | true |
5ed7637a0242b50aab2f49912f2feca4bcf125a0 | PHP | flexiodata/flexio-web-app | /application/services/Vfs.php | UTF-8 | 14,156 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
*
* Copyright (c) 2013, Flex Research LLC. All rights reserved.
*
* Project: Flex.io App
* Author: Benjamin I. Williams
* Created: 2017-10-04
*
* @package flexio
* @subpackage Services
*/
declare(strict_types=1);
namespace Flexio\Services;
class Vfs implements \Flexio\IFace\IFileSystem
{
... | true |
e9588ba8b4fb6fbaa3594f482dbecee41d8ccc2e | PHP | adgolubchikov/wap-php-math | /nodnok/nodnok.php | UTF-8 | 665 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/xhtml+xml; charset=utf-8" />
<title>НОД и НОК</title>
</head>
<body>
<p align="center">
<a href="/">На главную</a><br/>
<?php
$a=(integer)... | true |
19dab97f58022ed3bbe51fc8356e96053a8b6022 | PHP | chrisribal/onix-parser | /src/CodeList/CodeList.php | UTF-8 | 1,628 | 3.28125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ribal\Onix\CodeList;
use Ribal\Onix\Exception\InvalidCodeListCodeException;
use Ribal\Onix\Exception\InvalidCodeListLanguageException;
class CodeList
{
/**
* The code to be resolved
*
* @var string
*/
protected $code = "";
/**
* The resolved value
*
* ... | true |
f0c320d175abbde8629a981d58b90dc6f7e56a5e | PHP | oladygin/hellish | /code/hellish/engine/auth.php | UTF-8 | 4,495 | 3.046875 | 3 | [] | no_license | <?php
class HAuth
{
var $s_Hash;
var $isCookieLogin;
var $isAuthUser;
var $m_Me;
function __construct ()
{
session_name (HApplication::$p_Instance->m_Params['auth']['sessionname']);
session_start ();
... | true |
af8603acff019a7ed6aed5a01b1b14ea3075d061 | PHP | kvesskrishna/lightkids | /sendcontact.php | UTF-8 | 1,235 | 2.609375 | 3 | [] | no_license | <?php
session_start();
if (isset($_POST['send'])) {
# code...
$to="ambofchrist@gmail.com";
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$usermessage=$_POST['message'];
$subject="Contact from Lightkids.org Website ContactForm";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Conten... | true |
f414c515f80cbad8114d64d536078dc92bfefd21 | PHP | luismiguens/skaphandrus_v4 | /src/Skaphandrus/AppBundle/Entity/Repository/SkIdentificationCriteriaRepository.php | UTF-8 | 3,647 | 2.515625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Skaphandrus\AppBundle\Entity\Repository;
use Doctrine\ORM\EntityRepository;
/**
* SkIdentificationCriteriaRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class SkIdentificationCriteriaRepository extends EntityRepository {
/**
... | true |
a3a72a52a2b5be8217c30d6180599ce7d51b6545 | PHP | ProgrissiveProgramCompany/bookStore | /model/getComments.php | UTF-8 | 1,766 | 2.578125 | 3 | [] | no_license | <?php
require "connection.php";
$isbn = $_GET['isbn'];
$query = "select * from comments where isbn='$isbn'";
$result = $conn->query($query);
if($result->num_rows>0){
while($row = $result->fetch_assoc()) {
$userCommentId = $row['userid'];
$comment = $row['comment'];
$sql = "select * from ... | true |
f9898d08459a12335696a6a4427050b281b3a72b | PHP | ci5aIo/Qboqx-2.3.8 | /mod/tasks/actions/que/pick.php | UTF-8 | 3,940 | 2.53125 | 3 | [] | no_license | <?php
/**
* QuebX pick elements action
*
* Used by:
* :
*/
/* Pseudocode
* Receive element_type.
* Receive item_guid
* if item_guid is empty
* set item_guid to 0
* Receive container_guid
* If container_guid is empty
* set container_guid to item_guid
* Receive selected groups
* Determine type ... | true |
884d6c9a9ed1a8b4292ee3c77c9f418ef8b0863a | PHP | saad197/PHP-Art-Store | /includes/process-registration.php | UTF-8 | 2,251 | 2.625 | 3 | [] | no_license | <?php
include "config.inc.php";
$email = $_GET['email'];
$password = $_GET['password'];
$cpasswoord = $_GET['cpassword'];
$country = $_GET['country'];
$firstName = $_GET['firstname'];
$lastName = $_GET['lastname'];
$city = $_GET['city'];
$address = $_GET['address'];
$postal = $_GET['postal'];
$state = $_GET['regio... | true |
84a77ab2e78c4145a0da3196b8290a6804fb8219 | PHP | captainhookphp/captainhook | /tests/unit/Hook/Message/Rule/UseImperativeMoodTest.php | UTF-8 | 1,294 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of CaptainHook
*
* (c) Sebastian Feldmann <sf@sebastian-feldmann.info>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CaptainHook\App\Hook\Message\Rule;
use SebastianFeldmann\Git\CommitMe... | true |
7513b5e2aefaaa686bf54cfd8edbf7f39b651ed2 | PHP | CrazyCrud/shithouse-poetry-website | /www/php/backend/getTypes.php | UTF-8 | 1,238 | 2.640625 | 3 | [] | no_license | <?php
// How to use this page:
// open it without any info:
//
// getTypes.php
//
// required parameters are:
// none
//
// The answer looks as follows:
// a json with a successcode and the data about all types:
/*
{
"success":1,
"data":
[
{
"id":"1",
"name":"Text",
"description":"Ein an eine Wand, T\u0... | true |
174c2b6b9e035de9cb1b32381c7b795ad0e8c963 | PHP | yzysun/studay | /rik/day7.php | UTF-8 | 339 | 3.375 | 3 | [] | no_license | <?php
echo GetUglyNumber_Solution(25);
function GetUglyNumber_Solution($index)
{
$a=$index/2;
if($a==intval($a))
{
echo $index;die;
}else{
$b=$index/3;
if($b==intval($b))
{
echo $index;die;
}else{
$c=$index/5;
if($c==intval($c))
{
echo $index;die;
}else{
echo $index.'不是丑数';
}
... | true |
ca58c3a38993daed2a933c7f7d51d90d1eeb5ca9 | PHP | mem-memov/telepanorama | /decorator/src/ArtStudio/MeasuredOriginal.php | UTF-8 | 803 | 2.890625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Telepanorama\ArtStudio;
class MeasuredOriginal
{
private Original $original;
private Rectangle $rectangle;
public function __construct(
Original $original,
Rectangle $rectangle
) {
$this->original = $original;
$this->rectangle ... | true |
9e556d928a3329f56e7701476c63f0bcac8201c8 | PHP | thangpd/strava | /wordpress-helper-plugins/admin/modules/pages/stravaApiSettingPages/stravaChat/StravaChat.php | UTF-8 | 2,425 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: tom
* Date: 3/1/21
* Time: 10:34 AM
*/
namespace Elhelper\admin\modules\pages\stravaApiSettingPages\stravaChat;
use Elhelper\common\Controller;
use Elhelper\common\View;
use Elhelper\Elhelper_Plugin;
class StravaChat extends Controller {
private $strava;
public funct... | true |
1febe1f6baa2f25ea4cd4283f74ddb3d8e60150a | PHP | trueman52/ivs | /app/EditBookingCalculator.php | UTF-8 | 18,420 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Enums\DiscountType;
use App\Models\ApplicableCoupon;
use App\Models\Booking;
use App\Models\BookingDiscount;
use App\Models\Coupon;
use App\Models\GroupedAddOn;
use App\Models\Period;
use App\Models\Unit;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
class EditBookingCal... | true |
256625e2a9cbfb859f456e9381ebfdf74604622f | PHP | soon14/Hitrip | /core/function/identitycard.func.php | UTF-8 | 2,290 | 2.578125 | 3 | [] | no_license | <?php
/**
* @author Fm453(方少)
* @DACMS https://api.hiluker.com
* @site https://www.hiluker.com
* @url http://s.we7.cc/index.php?c=home&a=author&do=index&uid=662
* @email fm453@lukegzs.com
* @QQ 393213759
* @wechat 393213759
*/
/*
* @remark:身份证合法性校验
*/
defined('IN_IA') or exit('Access Denied');
//返回身份证校验结果
fu... | true |
68b65fc1ce83af84705ce9f5b021f7817e9f3eb0 | PHP | Joshuavtk/gastenboek | /index.php | UTF-8 | 3,157 | 2.859375 | 3 | [] | no_license | <?php
$dbc = new PDO('mysql:host=localhost;dbname=22288_gastenboek', 'root', '');
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-... | true |
53748b8b8f822d35510013ee6fdec202e16bdf52 | PHP | saintmylife/coldiac-admin | /app/Modules/Hero/Domain/HeroFilter.php | UTF-8 | 816 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Modules\Hero\Domain;
use App\Modules\Base\BaseDto;
use App\Modules\Base\Domain\BaseFilter;
use Illuminate\Validation\Rule;
/**
* Hero filter
*/
class HeroFilter extends BaseFilter
{
public function forUpdate(BaseDto $data): bool
{
$this->messages = [];
$this->setBasicRul... | true |
43ae8d12860d3c9a82ea64dc0902433b91ebcde2 | PHP | luispabon/favicon-finder | /src/Exception/NoHostUrlException.php | UTF-8 | 338 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace FaviconFinder\Exception;
use Throwable;
/**
* @codeCoverageIgnore
*/
class NoHostUrlException extends UrlException
{
public function __construct(string $url, Throwable $previous = null)
{
parent::__construct(sprintf('No host found at url `%s`', $url), 0, $pr... | true |
9aa037197b2cca70c7e44ecc0e0e126adec7f771 | PHP | Ahmetburhan/nurhanhome | /wp-content/themes/dt-the7/inc/extensions/core-functions.php | UTF-8 | 30,352 | 2.78125 | 3 | [
"LicenseRef-scancode-generic-exception",
"LGPL-2.1-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-2.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-proprietary-license",
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
/**
* Core functions.
*
* @since presscore 0.1
*/
// File Security Check
if ( ! defined( 'ABSPATH' ) ) { exit; }
if ( ! function_exists( 'the7_aq_resize' ) ) {
/**
* This is just a tiny wrapper function for the class above so that there is no
* need to change any code in your own WP themes. Usage is s... | true |
9166adf67bf6e7e36b7d36f189ed30406c3bae73 | PHP | slualexvas/beejee-test-task | /app/core/Route.php | UTF-8 | 766 | 2.734375 | 3 | [] | no_license | <?php
class Route
{
static function start()
{
$controller_name = 'task';
$action_name = 'index';
if (!empty($_GET['c']))
$controller_name = $_GET['c'];
if (!empty($_GET['a']))
$action_name = $_GET['a'];
$controller_name = 'Controller_'.$controller_name;
$controller_file = 'app/co... | true |
3dc098b216669128b167e1d590f8852237792e87 | PHP | DerManoMann/acache | /tests/Radebatz/ACache/Tests/NamespaceCacheTest.php | UTF-8 | 3,671 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the ACache library.
*
* (c) Martin Rademacher <mano@radebatz.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Radebatz\ACache\Tests;
use Radebatz\ACache\CacheInterface;
use Radebatz\ACache\... | true |
dd2f8ad22157d7a60eeb46a2962cf39298daed5c | PHP | schummel/yii2-core | /helpers/ArrayHelper.php | UTF-8 | 4,333 | 2.921875 | 3 | [] | no_license | <?php
namespace yii\helpers;
use Yii;
use yii\base\Arrayable;
use yii\helpers\BaseArrayHelper;
class ArrayHelper extends BaseArrayHelper
{
/**
* конвертим массив в postgres jsonb строку
*
* @param array $value
* @return string
*/
public static function postgresStyleJsonEncode($value)
... | true |
70a3db40965a94d75d2b721ba3d59574f941183e | PHP | carlosblinf/gestioner-api | /app/Persona.php | UTF-8 | 1,071 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Activity;
use App\Structure;
use App\Department;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Persona extends Model
{
use SoftDeletes;
protected $dates = ['delete_at'];
const PERSONA_MEMBER = 'true';
const PERSONA_NO_MEMBER = ... | true |
6c8b1621329bc51f602615e1e62c353d0c2066c2 | PHP | dbetm/cursoPHP | /Examples/ficha.php | UTF-8 | 391 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ficha</title>
</head>
<body>
<h1>Ficha con datos</h1>
<?php
echo "Su nombre es: ".$_POST['txtname'];
echo "<br />";
echo "Su apellido es: ".$_POST['txtlastname'].".";
echo "<br />";
echo "Su contraseña tiene:... | true |
966b9aa69fcb3067649df499699089d515e68c58 | PHP | brngylni/phplearn | /file_operations/ftruncate.php | UTF-8 | 732 | 3.390625 | 3 | [] | no_license | <!doctype html>
<html lang="tr-TR">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<meta http-equiv="Content-Language" content="tr">
<meta charset="utf-8">
<title></title>
</head>
<body>
<?php
/*
fwrite() : It is using to delete the content that coming after the specified character in ... | true |
cc89fe21f84ecabf21298f032bf7ad913662c7d3 | PHP | russpos/google-drive-utils | /phplib/Auth/Loader.php | UTF-8 | 5,417 | 2.921875 | 3 | [] | no_license | <?php namespace Russpos\GoogleDriveUtils\Auth;
use Russpos\GoogleDriveUtils\Util;
class Loader {
private $client_data;
private $scope;
private $with_redirect = false;
private $redirect_params;
private $token_store = null;
private $loader;
const RESPONSE_TYPE_TOKEN = "token";
const ... | true |
bcbbcd78eeaf60aacee4de2ec2230ce9b13244d0 | PHP | abivia/hydration | /test/objects/Synthetic.php | UTF-8 | 1,583 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/** @noinspection ALL */
namespace Abivia\Hydration\Test\Objects;
use Abivia\Hydration\Hydratable;
use Abivia\Hydration\HydrationException;
use Abivia\Hydration\Hydrator;
use Abivia\Hydration\Property;
use JsonSerializable;
use ReflectionException;
class Synthetic implements Hydratable, JsonSerializable
{
... | true |
7cf2f40a7430944d6698e2846efad49fb0e36974 | PHP | christian-kramer/OverTheWire-Wargames | /Natas/natas17.php | UTF-8 | 1,461 | 3.03125 | 3 | [] | no_license | <?php
function get($url)
{
$username = "natas17";
$password = "8Ps3H0GWbn5rd9S7GmAdgQNdkhPkq9cw";
$string = base64_encode("$username:$password");
$options = [
'http' => [
'header' => "Content-Type: application/x-www-form-urlencoded\r\n" . "authorization: Basic $string",
... | true |
efdf1ee141858bc66b2d6999cc7542a7cf3197a3 | PHP | josendulip/outroQuarto | /app/Models/Role.php | UTF-8 | 966 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use App\Traits\HasPermissions;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Role extends Model
{
use HasFactory, HasPermissions;
public function permissions()
{
return $this->belongsToMany(Permission::class, 'rol... | true |
e7fecae68ce36cd12c1ad8515bf439432ea3037b | PHP | steverobinett/php-data-stack | /application/util/formattingUtils.php | UTF-8 | 400 | 3.359375 | 3 | [] | no_license | <?php
// expect 2 dim array and retunr as a formatted table
function buildHTMLTable($dataSet){
$tblHTML = "<table class='cleanTbl'>";
foreach ($dataSet as $row) {
$tblHTML = $tblHTML."<tr class='cleanTbl'>";
foreach($row as $col){
$tblHTML = $tblHTML."<td class='cleanTbl'>$col</td>";
}
$tblHTM... | true |
cfaaee2146c2cbb08927f9f9173ea38e1e455c3f | PHP | ex3mlyfab/applicant | /app/Models/WardModel.php | UTF-8 | 784 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class WardModel extends Model
{
protected $guarded = [];
public function beds(): HasMany
{
return $this->hasMany(Bed::clas... | true |
cb0e67e4e9fc327c5e37e7c2288a6b4b62fb2c41 | PHP | corporate-ngp/beeryde | /modules/Api/Models/Rating.php | UTF-8 | 997 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* To present Rating Model with associated authentication
*
* @author Nilesh G. Pangul <nileshgpangul@gmail.com>
* @package Api
*/
namespace Modules\Api\Models;
use Modules\Api\Models\BaseModel;
class Rating extends BaseModel {
public $timestamps = false;
/**
* The database collection u... | true |
b5e5a8e26c3106c3d6c222fa94a929f59588cd2f | PHP | mxs-dev/JournalBackend | /public/migrations/m180405_101046_add_academic_year_table.php | UTF-8 | 1,048 | 2.515625 | 3 | [] | no_license | <?php
use yii\db\Expression;
use yii\db\Schema;
use yii\db\Migration;
class m180405_101046_add_academic_year_table extends Migration
{
public static $tableName = 'academic_year';
public function safeUp()
{
$this->createTable(static::$tableName, [
'id' => $this->primaryKey()->unsigned... | true |
e669d8197400d4b81ce366057dc306d99af7e091 | PHP | Gimalca/zebra_ml | /module/Application/src/Application/Model/Dao/UserDao.php | UTF-8 | 3,935 | 2.546875 | 3 | [] | no_license | <?php
namespace Application\Model\Dao;
use Zend\Db\Sql\Sql;
use Zend\Db\TableGateway\TableGateway;
use Application\Model\Entity\User;
use Application\Model\Entity\BankTransmitter;
use Application\Model\Entity\State;
use Application\Model\Entity\PaymentMethod;
use Application\Model\Entity\ShippingMethod;
use Applicat... | true |
875a2ae8821fdaa06c04266e9efa8ea987bf33dc | PHP | dede-amdp/polibook | /php/search.php | UTF-8 | 6,274 | 2.75 | 3 | [] | no_license | <?php
//<!-- FUNZIONE CHE GENERA UN ARRAY CONTENETE TUTTE LE INFO RICERCATE-->
echo json_encode(getRisultati());
function getRisultati() {
require_once '../php/dbh.inc.php';
$conn= open_conn();
if($conn){
//prende i dati inseriti in input alla richiesta
$inputs = json_decode(file_get_conten... | true |
00e710a8fe06ff2211125877950133496e0477f3 | PHP | krystiangonczi/whereiscash | /src/Controller/Controller.php | UTF-8 | 2,409 | 2.78125 | 3 | [] | no_license | <?php
namespace d0niek\Whereiscash\Controller;
use d0niek\Whereiscash\Core\DependenceInjectionInterface;
use d0niek\Whereiscash\Http\Response\HtmlResponse;
use d0niek\Whereiscash\Http\Response\RedirectResponse;
use d0niek\Whereiscash\Http\ResponseInterface;
use d0niek\Whereiscash\Model\Route;
use Ds\Map;
/**
* @aut... | true |
73012f438578b6b125d8787367a4cea3796cae7f | PHP | kx13vip/Yshop | /code/140-142/14001.php | UTF-8 | 1,264 | 2.9375 | 3 | [] | no_license | <?php
header("content-type:text/html;charset=utf-8");
/**
* 最后一个月,2016.9.9号前弄完商城项目;PHP入门就算结束!Come On Go!
* @authors Your Name (you@example.org)
* @date 2016-08-11 08:45:54
* @version $Id$
*/
//=========================140-文件操作案例之导入csv文件=======================
/***
批量处理文件内容
把小于10字节的文件,和含有fuck的文件删除掉
思路:
循环文件名
判断... | true |
48760568d1b8a7f2ea133def5a27dd0155f8e1ce | PHP | SequentSoft/ThreadFlow | /src/Contracts/Session/SessionStoreInterface.php | UTF-8 | 336 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace SequentSoft\ThreadFlow\Contracts\Session;
use SequentSoft\ThreadFlow\Contracts\Chat\MessageContextInterface;
interface SessionStoreInterface
{
public function load(MessageContextInterface $context): SessionInterface;
public function save(MessageContextInterface $context, SessionInterface $se... | true |
7352b3a930d1355da4008cb5fb19406874271952 | PHP | Alexxosipov/courseplatform | /app/Models/Course.php | UTF-8 | 2,017 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\Course
*
* @property int $id
* @property int|null $team_id
* @property int $type_id
* @property string|null $name
* @property string|null $description
* @property string... | true |
b723e049ecb093ae04237d0e817103e5702bf483 | PHP | bigroski/bigroski | /classes/site_config.php | UTF-8 | 4,470 | 2.78125 | 3 | [] | no_license | <?php
class Site_Config{
public static function fileCreate(){
$fp = fopen('../globalinc/g_db_config.php','w');
$string = '<?php
$config[host]="'.$_POST[host].'";
$config[username]="'.$_POST[username].'";
$c... | true |
8d5715056db788c3e9b84e3cab79509b9caf69f4 | PHP | concretecms-community-store/community_store | /src/CommunityStore/Group/Group.php | UTF-8 | 2,134 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Concrete\Package\CommunityStore\Src\CommunityStore\Group;
use Doctrine\ORM\Mapping as ORM;
use Concrete\Core\Support\Facade\DatabaseORM as dbORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity
* @ORM\Table(name="CommunityStoreGroups")
*/
class Group
{
/**
* @ORM\Id @ORM... | true |
870d7602164d1840cd842314b2e11d267e0766bc | PHP | joshthackeray/getaddress-api | /src/Data/Suggestion.php | UTF-8 | 1,057 | 3.171875 | 3 | [] | no_license | <?php
namespace JoshThackeray\GetAddress\Data;
use JoshThackeray\GetAddress\Data\Contracts\SuggestionInterface;
class Suggestion implements SuggestionInterface
{
protected string $address;
protected string $url;
protected string $id;
/**
* Constructs the Suggestion object from an AutoComplete r... | true |
cedec923f93f11ac3849e2689743eed20bca00d3 | PHP | miroslavvlajnic/currency-trader-api | /app/routes.php | UTF-8 | 1,298 | 2.75 | 3 | [] | no_license | <?php
$router = new Core\Router;
/**
* Route pattern (first argument) must begin with a forward slash (/) and
* must not have one at the end...
* dynamic arguments are denoted with a colon sign (:)
* e.g. '/user/:id'
*
* examples of valid routes: '/user', '/user/:id', '/user/:id/posts'
* examples of invalid ... | true |
d4ed3504d591784bd7720946e316a113b39beb67 | PHP | FiPie/photoUploadGallery | /controllers/loginHandler.php | UTF-8 | 1,939 | 2.890625 | 3 | [] | no_license | <?php
session_start();
// Here we check if the user is logged in and if so she/he will be redirected back to index
if ((isset($_SESSION['logged']) == TRUE) && ($_SESSION['logged'] == TRUE)) {
$message = "You are already logged as : <b>$userName</b>! Logout before account switch.";
$_SESSION["promptMessage"] =... | true |
60f307728af825261b61cd247f30c09d2edb5003 | PHP | thaislsilveira/php_fatec_inicio | /Lista-3/exercicio04.php | UTF-8 | 309 | 3.390625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>Aplicaçoes em php</title>
</head>
<body>
<?php
$ano = 2000; //Formato AAAA;
if((($ano%4==0)||($ano%400==0))&&($ano%100!=0)){
echo "Bissexto!";
}else{
echo "Ano não Bissexto!!";
}
?>
</body>
</html> | true |
4487950d024eaa21a8187e37ddcaffc4437d1fca | PHP | HaoPai/L_NET | /patent/patent.php | UTF-8 | 2,197 | 2.65625 | 3 | [] | no_license |
<?php
$dbc = mysql_connect("localhost:3310","root","hunan2010");
mysql_select_db("patent",$dbc);
mysql_query('SET NAMES UTF8');
date_default_timezone_set("Asia/Shanghai");
$stock_code = "";
$ap_company = "";
$patent_title = "";
$patent_abstract = "";
$query = "select stock_code ,ap_comp... | true |
c865c49fdb9758631d117d9600e6dda3b5a1d16f | PHP | rajabbilly/DHAMIS-API | /src/app/models/staffQualification.php | UTF-8 | 862 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by Rajab E. Billy
* Date: 8/15/2019
* Time: 10:39 AM
*/
class staffQualification {
//Class properties
protected $conn = NULL;
private $table_name = "[dbo].[concept]";
public function __construct($db)
{
$this->conn = $db;
}
//Get all staff ... | true |
f933b142ebc2f5ff0c70370041797a1d5b0c09b2 | PHP | AndreeaStefanovici/PiX | /php/upload.php | UTF-8 | 3,909 | 2.703125 | 3 | [] | no_license | <?php
include('server.php');
if(isset($_SESSION['username']))
{
// Initialize message variable
$msg = "";
//apasare buton click
if (isset($_POST['upload'])) {
$allowed = array('jpeg','png' ,'jpg');
$filename = $_FILES['image']['name'][0];
$ext = pathinfo($filename, PATHINFO_EXTENSION);
... | true |