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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c6a7af2c0e54258c417ef36c82911cfc80919990 | PHP | gdejong/advent-of-code-2019 | /src/Day7/Part1/Intcode.php | UTF-8 | 8,733 | 3.40625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace gdejong\AdventOfCode\Day7\Part1;
use RuntimeException;
class Intcode
{
private const MODE_POSITION = 0;
private const MODE_IMMEDIATE = 1;
public function runPhase(array $program, array $phases, $number_of_amplifiers)
{
$amplifier_input_value = 0;
... | true |
bae5869ffd1d797633f35c872af441760c9fa0bd | PHP | Swifter-n/company_profile_2 | /function/helper.php | UTF-8 | 796 | 2.703125 | 3 | [] | no_license | <?php
function text($str)
{
$str = substr($str, 0, 1000);
return $str . '........';
}
function slide($str)
{
$str = substr($str, 0, 150);
return $str . '........';
}
function news($str)
{
$str = substr($str, 0, 150);
return $str . '........';
}
function tgl_indo($date){
$Hari =... | true |
b1af51f74de9eecb9633d4b79b6d826b78b5f95d | PHP | BearerPipelineTest/icicle | /tests/Observable/FromTest.php | UTF-8 | 3,289 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Icicle, a library for writing asynchronous code in PHP using coroutines built with awaitables.
*
* @copyright 2014-2015 Aaron Piotrowski. All rights reserved.
* @license MIT See the LICENSE file that was distributed with this source code for more information.
*/
namespace Icicle\T... | true |
5fe782288fe8eb7877232ba2d0cbf96a39ff2e66 | PHP | jecalderonn/adopet-ufps-master | /dto/Fundacionvinculacion.php | UTF-8 | 1,915 | 3.015625 | 3 | [] | no_license | <?php
/*
-------Creado por-------
\(x.x )/ Anarchy \( x.x)/
------------------------
*/
// Tranquilo, yo tampoco entiendo cómo funciona mi código \\
class Fundacionvinculacion {
private $idFundacionVinculacion;
private $Fundacion_idFundacion;
private $Vinculacione... | true |
ad46bba9065f957548922597d31aaad11243457c | PHP | mowema/verano | /vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/ArraySerializable.php | UTF-8 | 2,397 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
n... | true |
1a9556603cd588eea66be47a1b22da23f1c81b5e | PHP | arkadiych/n98-magerun2 | /src/N98/Magento/Command/System/Cron/RunCommand.php | UTF-8 | 4,044 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace N98\Magento\Command\System\Cron;
use Magento\Cron\Model\Schedule;
use Symfony\Component\Console\Helper\DialogHelper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class RunCommand extends Ab... | true |
755228be4f06ce2e010ad655a9091d539becca9d | PHP | fetus-hina/stat.ink | /migrations/m190724_173449_freshness.php | UTF-8 | 1,954 | 2.53125 | 3 | [
"MIT",
"BSD-3-Clause",
"CC-BY-4.0"
] | permissive | <?php
/**
* @copyright Copyright (C) 2015-2019 AIZAWA Hina
* @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT
* @author AIZAWA Hina <hina@fetus.jp>
*/
declare(strict_types=1);
use app\components\db\Migration;
use yii\db\Expression;
class m190724_173449_freshness extends Migration
{
pu... | true |
aa62602264da3ed58edd918aca30b9e988f556e5 | PHP | KazuhiroOhue/-development | /app/Http/Controllers/Admin/VarietyController.php | UTF-8 | 3,493 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Variety;
use Storage;
class VarietyController extends Controller
{
//
public function add()
{
return view('admin.variety.create');
}
public function create(Request $r... | true |
3d388cf928d1c74f4cc565adb06781467438732e | PHP | weber-cs-org/cs4350-hw01 | /tests/00-ArrayTest.php | UTF-8 | 4,129 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
require_once(__DIR__."/../src/00-Arrays.php");
class ArraysTest extends \PHPUnit\Framework\TestCase {
public function testSubstitution00() {
// arrange
$expected = "The memory of that scene for me is like a frame of film forever frozen at that moment: the red carpet, the green lawn, the whit... | true |
ebc67c82fc8c979cc68fd21e550669dc117f1f4c | PHP | dolfinitylearning/ajax_examples | /photos2/server/fetch_photo.php | UTF-8 | 478 | 2.828125 | 3 | [] | no_license | <?php
/**
* Return the file name and description of a particular photo.
*/
//Wait for a second. Simulates processing delay.
sleep(1);
//Load the data array.
require( 'load_image_data.php' );
//Get the id of the photo to look up.
$photo_number = $_GET['id'];
//Return data about the random photo.
echo json_encode( ... | true |
902e0d6b53c8c2ec51272ce6d9f2e8c2c7dc9392 | PHP | waddou/wp-bootstrap | /scripts/bootstrap.php | UTF-8 | 16,409 | 2.6875 | 3 | [] | no_license | <?php
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
if(PHP_SAPI !== ... | true |
61670bacc6282eff207b648bc96c2a2d353e1a56 | PHP | mercadopago/cart-magento2 | /src/MercadoPago/Core/Helper/Country.php | UTF-8 | 1,308 | 2.75 | 3 | [] | no_license | <?php
namespace MercadoPago\Core\Helper;
/**
* Class Country
* @package MercadoPago\Core\Helper
*/
class Country
{
/**
*
* Get country
*
* @param String
* @return array
*/
public static function getCountryToMp($country)
{
$mpCountries = [
'MLA' => [ // ... | true |
14cd73a0a17c9194134d44fa2578cc5c2ee950b7 | PHP | hashimoto131/schedule-app-api | /src/app/Services/User/UserService.php | UTF-8 | 2,792 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\User;
use Hash;
use JwtAuth;
use App\Services\User\UserServiceInterface;
use App\Repositories\User\UserRepositoryInterface;
class UserService implements UserServiceInterface
{
protected $userRepository;
public function __construct(UserRepositoryInterface $userRepository)
{
... | true |
708554fbad8ac9494c670ef9bb8ebb45bf843d3b | PHP | ese-omene/BratPackDCS | /Classes/Menu.php | UTF-8 | 274 | 2.8125 | 3 | [] | no_license | <?php
class Menu {
public function listMenu($dbcon){
$sql = "SELECT * FROM menus order by id desc limit 5";
$pdostm = $dbcon->prepare($sql);
$pdostm->execute();
$menu = $pdostm->fetchAll(PDO::FETCH_ASSOC);
return $menu;
}
} | true |
652813009fdae7e5c3abaf7bc40c46285f083b2f | PHP | rslnk/reimagine-belonging | /web/app/themes/rebe/src/lib/WPBasic/Post/PostType.php | UTF-8 | 7,786 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace WPBasic\Post;
/**
* Post Type Class used to register post types
*
* This class was inspired by Gijs Jorissen 'Cuztoms' post types class
* @link https://github.com/gizburdt/cuztom/blob/master/classes/post_type.class.php
*
* @author Ruslan Komjakov
* @since 0.1
*
*/
class PostType
{
public... | true |
461128dcae9c8b9a441bd23165b07c8d46a3df09 | PHP | jpruliere/resaparc | /controleurs/ManegeMapper.php | UTF-8 | 1,401 | 3.359375 | 3 | [] | no_license | <?php
require('Manege.php');
class ManegeMapper {
// Récupère les résultats de la requête SQL sous forme d'objet spécifique
private function query($pdo, $statement, $class) {
$req = $pdo->query($statement);
return $req->fetchAll(PDO::FETCH_CLASS, $class);
}
// Récupère les résultats ... | true |
e0bc0486e17b5688a55f3ebdd607b71375b09cb9 | PHP | c0rnh0li0/gateway | /libs/Gateway/Handler/Shop/Rakuten/API/Writer.php | UTF-8 | 1,425 | 2.53125 | 3 | [] | no_license | <?php
namespace Gateway\Handler\Shop\Rakuten\API;
use Gateway\IConnection,
Rakuten\Rakuten,
Rakuten\Configuration;
require_once(WWW_DIR . "/../libs/Rakuten/Rakuten.php");
/**
* An adapter for writing DS to be passed to Magento.
*
* @author Darko Krstev
*/
class Writer extends \Gateway\Handle... | true |
077b04492b1e5f587c02b9c3d18ba1be23ce0442 | PHP | TPI-Samuel-Meyer/BloomComics | /Réalisation/BloomComics/view/users.php | UTF-8 | 2,995 | 2.5625 | 3 | [] | no_license | <?php
/*
* User: Samuel Meyer
* Date: 21.05.2021
*/
require_once "view/view_helper.php";
$manage = false;
// Select required data to display users
require_once "model/dbManager.php";
if ($_GET['action'] == 'users') {
$data = select(['id', 'username', 'description'], 'users');
}
elseif ($_GET['action'] == 'frie... | true |
89e533a89261c43b1594fbb96c42b277088c5bf8 | PHP | Proydesa/crm_new | /libraries/Error.php | UTF-8 | 2,965 | 2.640625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
Error functions y Log class
*/
function show_404($page = '')
{
$heading = "404 Page Not Found";
$message = "The page you requested was not found.";
show_error($heading, $message, 'error_404', 404);
exit;
}
function show_array(... | true |
562fae8c26d10ff5265df4d790151c89e789518e | PHP | matheuscamarques/framework-processamento-php | /vendor/calcinai/php-imagick/src/ImagickDraw.php | UTF-8 | 26,254 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package calcinai/php-imagick
* @author Michael Calcinai <michael@calcin.ai>
*/
class ImagickDraw {
/**
* @param array $affine
* @return bool
*/
public function affine(array $affine) {
throw new Exception(sprintf('%s::%s not implemented', __CLASS__, __FUNCTION__));
... | true |
bc87f72e6c06e712682c2ce3c381912773fcd23c | PHP | SheanWoey/SOAP-WebServices | /WSDLserver/server.php | UTF-8 | 2,848 | 2.953125 | 3 | [] | no_license | <?php
/*
* Written by: Peter Gosling, DkIT
* Copyright 2016
*
*/
function getAllPokemon() {
$dsn = "mysql:host=localhost;dbname=pokemon";
$username = "root";
$password = "";
try {
$db = new PDO($dsn, $username, $password);
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE);
... | true |
d3af10c8970d04996dd0e8986abfc78eb191ae2b | PHP | alex33fr/blog | /Framework/Manager.php | UTF-8 | 422 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Alex
* Date: 02/01/2019
* Time: 01:14
*/
namespace Blog\Framework;
abstract class Manager{
public function dbConnect()
{
$db = new \PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME.';charset=utf8', DB_USER, DB_PWD);
if(DEV_ENVIRONNEMENT){
... | true |
2e09d6ff6c99b3785a6809768aa207a6313ac538 | PHP | HydroGames-dev/StatsBar | /src/BossBar/BossBarValues.php | UTF-8 | 1,089 | 2.5625 | 3 | [] | no_license | <?php
namespace BossBar;
use BossBar\Main;
use BossBar\API;
use pocketmine\entity\Attribute;
use pocketmine\entity\AttributeMap;
use pocketmine\entity\DataPropertyManager;
use pocketmine\entity\Entity;
use pocketmine\network\mcpe\protocol\AddEntityPacket;
use pocketmine\network\mcpe\protocol\BossEventPacket;
use pock... | true |
f00f324807671d2877c8b15b6456925771c1aabe | PHP | jhackett1/smoke-media-modern | /single.php | UTF-8 | 3,821 | 2.65625 | 3 | [] | no_license | <?php
// Get the correct header based on whether we're a radio article or not
if (in_category("radio")) {
get_header("radio");
} else {
get_header();
}
// Start the loop
if ( have_posts() ) :
// Make an empty array to store post IDs, avoiding replicate post display
$do_not_replicate = array();
while ( have_post... | true |
d38bd9fac5d978185bae35ecdf01dd7b38eaf14f | PHP | cloakedcode/appgarden | /app/controllers/categories_controller.php | UTF-8 | 503 | 2.59375 | 3 | [] | no_license | <?php
class CategoriesController extends AppController
{
function view($params)
{
$cat = Category::query('SELECT name, description FROM #table WHERE slug = ?', $params['id']);
if (empty($cat[0]) === false)
{
$order = 'created_on';
if (isset($_GET['order']) && $_GET['order'] == 'vote')
{
$order =... | true |
69c2a6eae07e59981065161834b5d86e717423e9 | PHP | everlution/redlock | /src/Manager/LockManager.php | UTF-8 | 9,914 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Everlution\Redlock\Manager;
use Everlution\Redlock\Quorum\QuorumInterface;
use Everlution\Redlock\KeyGenerator\KeyGeneratorInterface;
use Everlution\Redlock\Model\LockInterface;
use Everlution\Redlock\Model\Lock;
use Everlution\Redlock\Adapter\AdapterInterface;
use Everlution\Redlock\Exception\Invalid... | true |
46b85fbb86d9af3690021f2a23517df6a343e188 | PHP | peterkocian/vymozete.sk | /app/Helpers/SimpleTable.php | UTF-8 | 3,788 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\View\Factory;
use Illuminate\View\View;
class SimpleTable
{
protected $data;
protected $columns;
protected $actions;
protected $entityRoutePrefix;
protected $actionColumnLabel;
protected $co... | true |
40a8eca34d09c8ff6d1efce350736219f0e1b348 | PHP | SigaSmart/zend-core | /Core/src/Decorator/Cell/Pad.php | UTF-8 | 1,093 | 3.015625 | 3 | [] | no_license | <?php
/**
* Core ( Module for Zend Framework 2)
*
* @copyright Copyright (c) 2013 Piotr Duda dudapiotrek@gmail.com
* @license MIT License
*/
namespace Core\Decorator\Cell;
use Core\Decorator\Exception;
class Pad extends AbstractCellDecorator
{
/**
* Array of variable attribute for link
* @var a... | true |
d609f949c33dd690e1912eaab2f5d565b62b7626 | PHP | VladimirShaganian/Little_MVC | /system/controller.php | UTF-8 | 1,109 | 2.640625 | 3 | [] | no_license | <?php
class Controller
{
public function __construct()
{
session_start();
}
/**
* @param $view
* @param array $data
*/
public function view($view, $data = [])
{
$view_file = $view . '.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/app/... | true |
2e99cfa7b2ec606df98415ba545c6451ab6ffb80 | PHP | daniilsv/Dever_server | /classes/user.php | UTF-8 | 1,084 | 3.328125 | 3 | [] | no_license | <?php
class User {
public $id;
public $login;
public $last_request;
/** @var \User */
public static $user = false;
private function __construct($data) {
foreach ($data as $key => $value) {
$this->$key = $value;
}
}
public static function setLocalUser($user) {
self::$... | true |
e2826a839944d5cd92f3038b34b4b5018ba190f6 | PHP | Gumillar88/panasonic-report | /html/database/migrations/2016_08_09_141022_create_table_report_nosales.php | UTF-8 | 828 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTableReportNosales extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('report_nosale', function (Blueprint $table) {
... | true |
29dbdafcefdfbcaac75da3f331c221022d65faae | PHP | 0xKourama/Back-End | /PHP/OOP_Examples/clone.php | UTF-8 | 1,064 | 3.859375 | 4 | [] | no_license | <?php
class Employee {
private $firstName;
private $lastName;
private $age;
private $address;
private $salary;
public function __construct($firstName,$lastName,$age,$address,$salary){
$this->firstName = $firstName;
$this->lastName = $lastName;
$this->age = $age;
$this->address = $address;
$... | true |
746544bc9270bc4a7ad7524c9d916343bbcad70c | PHP | Goose17/Multi-Blog | /incrementController.php | UTF-8 | 1,092 | 2.59375 | 3 | [] | no_license | <?php // Controller for Posts generation
session_start();
if (!isset($_SESSION['username'])){
header('Location: index.php');
exit();
}
if (isset($_POST['task'])){
// Connect to database
require_once('models/database.php');
$db = databaseConnection();
if (!isset($db)) {
header('Locat... | true |
84642a9a650c4b90d4006ab8e9b4be8459a0eb49 | PHP | ekreative/apps-server | /src/Form/Model/SearchForm.php | UTF-8 | 934 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Form\Model;
class SearchForm
{
/**
* @var string
*/
private $query;
/**
* @var int
*/
private $page;
/**
* SearchForm constructor.
*/
public function __construct()
{
$this->page = 1;
}
/**
* @return string
*/
... | true |
33c05e03de8b06c0f53dd099c72f4f9cf025b926 | PHP | combyna/combyna | /php/src/Combyna/Component/Ui/Validation/Query/CurrentWidgetDefinitionHasAttributeQuery.php | UTF-8 | 1,456 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Combyna
* Copyright (c) the Combyna project and contributors
* https://github.com/combyna/combyna
*
* Released under the MIT license
* https://github.com/combyna/combyna/raw/master/MIT-LICENSE.txt
*/
namespace Combyna\Component\Ui\Validation\Query;
use Combyna\Component\Behaviour\Query\Specifier\Q... | true |
39506f67130f75db3c0d80c19532372e3708c7e5 | PHP | FernandaOchoa/ProgramacionWebPracticas | /Practica2/3PassProtegida/pass2.php | UTF-8 | 761 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Conoces la contraseña</title>
</head>
<body>
<h2>Conoces la contraseña?(pass2.php)</h2><br>
<form action="<?php echo
$_SERVER['PHP_SELF'];?>" method="post">
<input type="text" name="pw">
<input type="submit" value="Envialo">
<... | true |
17664b5794c6f0d6541f61082dc98c8401d2103c | PHP | blackvd/newbank | /app/Models/Carte.php | UTF-8 | 574 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Carte extends Model
{
use HasFactory;
const TYPE_CARTE = [
"MASTERCARD" => 1,
"VISA" => 2,
"GIM-UEMOA" => 3,
"MASTERCARD & GIM-UEMOA" => 4,
];
... | true |
fe79ea7679cb73440d3895cfe0a8f7222091ef8a | PHP | dydrich/documents | /lib/RecordGradesAttach.php | UTF-8 | 2,273 | 2.703125 | 3 | [] | no_license | <?php
require_once 'Document.php';
class RecordGradesAttach extends Document{
private $teacher;
private $cls;
private $sub;
//id_documento: contains the ID of the document (from rb_documents) - could be null
private $documentID;
public function __construct($file, AnnoScolastico $y, $cls, SchoolUserBean $teach... | true |
4ad8d92798a325368202bd1e12a6e15508537ed6 | PHP | kvsystems/tt-consulting | /tests/AnimalsTest.php | UTF-8 | 2,003 | 2.546875 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
use TTConsulting\Example\Animal\AGenericAnimal;
use TTConsulting\Example\Animal\CatAnimal;
use TTConsulting\Example\Animal\DogAnimal;
use TTConsulting\Example\Animal\TurtleAnimal;
class AnimalsTest extends TestCase {
public function testCat() {
$this->assertInstance... | true |
a5d1c681ef05ecfeed2d8cdbf628d570adac8539 | PHP | hjdhnx/odooshouquan | /publisher-warranty/index.php | UTF-8 | 7,447 | 2.59375 | 3 | [] | no_license | <?php
error_reporting( E_ALL&~E_NOTICE );
header("content-type:text/html;charset=utf-8"); //设置编码
ini_set( 'display_errors', 'off' );//屏蔽错误和警告提示
date_default_timezone_set('PRC');//设置中国时区
include("mysql.php");
//echo "hello odoo!\n"; //打印测试页面
if(isset($_POST['arg0']) and isset($_POST['action']))
{
$arg0=$_POST['arg0'];
$... | true |
f3416129e0075d44688ac0a554981358200f8cb2 | PHP | AlexsandroAndre/desafio-backend | /store/app/Http/Controllers/Api/ProductController.php | UTF-8 | 1,117 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api;
use App\Product;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class ProductController extends Controller
{
public function __construct(Product $product)
{
$this->product = $product;
}
public function index()
{
$products = $this->pr... | true |
daef68f8dd90af5cefb8b64fbb26b84a850b0c59 | PHP | samusvfc/Samus-Framework | /library/Samus/ModelRule.php | ISO-8859-1 | 493 | 2.546875 | 3 | [] | no_license | <?php
/**
* Classe responsavel pela criao de regras para o carregamento de modelos,
* os principais metodos da classe DAO_CRUD tem seus respectivos metods que
* ipoem regras ao seu carregamento,
*
* Toda classe de Rule, deve extgender Samus_ModelRules
*
* @author samus
*/
abstract class ModelRule implements Sa... | true |
8e9d6f71962b6b6f9f4975fccc117a2a731223ad | PHP | tooadmin/tooadmin | /common/lib/tooadmin/field/sys_special/Fie_formula.php | UTF-8 | 13,535 | 2.546875 | 3 | [] | no_license | <?php
class Fie_formula extends TDField {
public static function getInputTypeId() {
return 25;
}
public static function getValue($model,$formula) {
$formula = str_replace("\'",'"', $formula);
$data = $model; @eval($formula);
if(isset($VAL)) { return $VAL; } else { return null; }
}
public st... | true |
2510b2a6fba21f12e46116545f15070177aa9d78 | PHP | KinggCode/Web-Development-Scripts | /shoppn/function/login.php | UTF-8 | 1,547 | 2.546875 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin: *');
require_once 'db_connection.php';
if($_SERVER["REQUEST_METHOD"] == "POST"){
$customerEmail = $_POST['customerEmail'];
$customerPassword = $_POST['customerPassword'];
$customerEmail = filter_var($_POST['customerEmail'],FILTER_SANITIZE_EMAIL);
if(!filter... | true |
9d8cbd13c3a24d62f2dddf2af16b309a5b519d1f | PHP | PendoNL/toggl-cli | /app/Commands/ListWorkspaces.php | UTF-8 | 1,369 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Commands;
class ListWorkspaces extends BaseCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'workspace:list';
/**
* The console command description.
*
* @var string
*/
protected $descri... | true |
6e341814abe539597d888b8e0ed222fd5fd3ca73 | PHP | anshaik/recsports | /webapp/advproj/getsport.php | UTF-8 | 1,026 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
require_once "dbconnect.php";
$leaguetype=$_GET["lt"];
$sport=$_GET["sport"];
//$leaguetype="Mens";
//$sport="Basketball";
$sql="CALL LeagueTeamsFull('".$leaguetype."','".$sport."')";
//$sql="SELECT * FROM Team NATURAL JOIN contest NATURAL JOIN League WHERE league_type='".$leaguetype."' AND sport_name='".$spor... | true |
2e2036a18cc3eb763b892a8f0b886c973ad1fd7c | PHP | webhacking/CodeIgniter4 | /system/Images/ImageHandlerInterface.php | UTF-8 | 2,365 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php namespace CodeIgniter\Images;
interface ImageHandlerInterface
{
/**
* Resize the image
*
* @param int $width
* @param int $height
* @param bool $maintainRation If true, will get the closest match possible while keeping aspect ratio true.
*/
public function resize(int $width, int $height, bool $m... | true |
a9b6ddfe9fe1425424e77b24de8dce0602666951 | PHP | ValerieJardin/exercice6PrairiePhp | /index.php | UTF-8 | 425 | 3.34375 | 3 | [] | no_license | <?php
function tableau($parameter)
{
sort ($parameter);
return ($parameter);
}
$langage = array("HTML", "CSS", "Javascript", "PHP");
$result = tableau ($langage);
foreach ($result as $key => $value)
{
echo $value . " ";# code...
}
function fusion($parameter1)
{
$imp = implode ($parameter1);
return ($imp);
}
... | true |
c1781d78658d0954323d18afec4f4e5e8d6c5f49 | PHP | tonix-tuft/linked-hash-map | /src/LinkedHashMap/LinkedHashMap.php | UTF-8 | 18,830 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright (c) 2021 Anton Bagdatyev (Tonix)
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, ... | true |
64ab8ab7ad0cdb666e2c8813daf671f90a9b3da3 | PHP | phpstan/phpstan-src | /tests/PHPStan/Rules/Functions/data/array_reduce.php | UTF-8 | 362 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
array_reduce(
[1,2,3],
function(string $foo, string $current): string {
return $foo . $current;
},
''
);
array_reduce(
[1,2,3],
function(string $foo, int $current): string {
return $foo . $current;
},
null
);
array_reduce(
[1,2,3],
function(string $foo, int $current): ... | true |
c921f3db2fe96cbd63cc4a5c0cb16a9486cc0436 | PHP | JoseLQB/Material-2-DAW | /DWS/EjerciciosBasicos/BoletinEC/pruebaDiasFF.php | UTF-8 | 1,470 | 3.40625 | 3 | [] | no_license | <?php
function fecha($semana, $dia, $mes){
$semana = date("w");
$dia = date("a");
$mes =date("m");
$d = "";
$m = "";
switch ($semana) {
case 1:
$d= "lunes";
break;
case 2:
$d= "martes";
break;
case 3:
$... | true |
90eae9d0172f1accfa0b9a0b85cfeffd31528c53 | PHP | Obsifight/MineWebPlugin-ShopPlus | /Vendors/paymill-php-master/tests/Unit/Paymill/Models/Response/TransactionTest.php | UTF-8 | 3,179 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Paymill\Tests\Unit\Models\Response;
use Paymill\Models\Response as Response;
use PHPUnit_Framework_TestCase;
/**
* Paymill\Models\Response\Transaction test case.
*/
class TransactionTest extends PHPUnit_Framework_TestCase
{
/**
* @var \Paymill\Models\Response\Transaction
*/
privat... | true |
15245b4797250e717d128f1eedea4b0a99985030 | PHP | jeysonkool/App-Control-Academico | /controlador/InicioControl.php | UTF-8 | 13,513 | 2.765625 | 3 | [] | no_license | <?php
/* POLIGRAN PROYECTO INTEGRACION CONTINUA
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of AdministradorControl
*
* @author JEYSONKOOL
*/
class InicioControl extends Controlador{
public function __construct($modelo, $accion) {
... | true |
28bde4ed77b007c00c6cf43ca8079c331cd47f3b | PHP | virendranamdev/haier | /Class_Library/class_like.php | UTF-8 | 4,196 | 2.5625 | 3 | [] | no_license | <?php
include_once('class_connect_db.php');
class Like
{
public $DB;
public function __construct()
{
$db = new Connection_Client();
$this->DB = $db->getConnection_Client();
}
public $postid;
public $likeby;
function create_Like($pid,$likby)
{
$this->postid = $pid;
$this->like... | true |
4535f3c05fa160f0bda6d4089a949715d23173e6 | PHP | ImperatorDeos/task-sourcing | /edit-users.php | UTF-8 | 5,870 | 2.828125 | 3 | [] | no_license | <?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">
<head>
<?php
//start session
session_start();
//check session vaiable username is present and user logged in
if(isset($_SESSION['admin'])){
//include relevant files
include "connection.php";
i... | true |
70634c0439921b080d184a587d7f76d3281c9dca | PHP | llao87/itmo | /php/002/006.php | UTF-8 | 1,586 | 2.78125 | 3 | [] | no_license | <?php
/*
В городе N проезд в трамвае осуществляется по бумажным отрывным билетам.
Каждую неделю трамвайное депо заказывает в местной типографии рулон билетов
с номерами от 000001 до 999999. «Счастливым» считается билетик у которого
сумма первых трёх цифр номера равна сумме последних трёх цифр, как, например,
... | true |
7682bdc44c72639c35fc75efeefbf31d60492703 | PHP | satudaku/PHP_MyShopWeb | /include/function.inc.php | UTF-8 | 27,612 | 2.921875 | 3 | [] | no_license | <!-- Php functions used in the MyShop web pages -->
<?php
######################################################
################## R E G I S T E R ###################
######################################################
# If user register with empty form in email or password or both error handling
function empty_... | true |
def3db4fe1cefb4154f2a91ffb2ddedbeb80d86e | PHP | khounish/americaniche | /php/exam_admin_login.php | UTF-8 | 1,820 | 2.703125 | 3 | [] | no_license | <?php
session_start();
//Get the data exracted from input parameters
$username=$_POST["username"];
$password=$_POST["password"];
//server side validation of those parameters
//establish a connection to database
// Create connection
require_once "data_base.php";
//Construct a sql query
//Find the userId for the given ... | true |
a5c5663419163511b0c616e32a7c263e185c9191 | PHP | jonathanjroberts/EPD_Project | /admin/tag/add.php | UTF-8 | 2,724 | 2.921875 | 3 | [] | no_license | <html>
<head>
<title>Admin > Menu > Tag > Add</title>
<style>
th {text-decoration: underline;}
td {text-align:center;}
</style>
</head>
<body>
<!-- http://localhost/PMBA/EPD/public/admin/tag/add.php -->
<br /> <h2> Admin > Menu > Tag > Add</h2> <hr />
<!-- Start: Global Include Files -->
<?php
include('.... | true |
b9939bd41ad104aa8bb4b0da18614624cb4c9eea | PHP | in2code-de/userprofile | /Classes/Domain/Model/FrontendUser.php | UTF-8 | 3,099 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace In2code\Userprofile\Domain\Model;
class FrontendUser extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
{
/**
* @var string
*/
public $privacySettings = '';
/**
* @var string
*/
public $aboutMe = '';
/**
* @var bool
*/
... | true |
210ed4195afdb975a2b50d85e35c31737254c4dc | PHP | ECE373-Fall16/goodvibes | /v1.0/code/loginpage.php | UTF-8 | 1,833 | 2.921875 | 3 | [] | no_license | <?php
$database = mysqli_connect("localhost","kzxljjxd_root","password","kzxljjxd_user_accounts"); // connect to database
session_start(); // start a session
if($_SERVER["REQUEST_METHOD"] == "POST") { // if data has been entered, get it
$username = mysqli_real_escape_string($database,$_POST['username']); // get ... | true |
44800b8122804cb62b4a44fb066e44a4943be9c1 | PHP | beetanz/CIS-PHP | /lab3_1.php | UTF-8 | 826 | 3.734375 | 4 | [] | no_license | <?php
$x = 7;
$y = 3;
echo ($x + $y) . "<br>";
echo ($x - $y) . "<br>";
echo ($x * $y) . "<br>";
echo ($x / $y) . "<br>";
echo ($x % $y) . "<br>";
echo "<hr size='1'>";
$h = 1; // finding 1+2+3+4+5 = ??
$h = $h + 2;
$h = $h + 3;
$h = $h + 4;
$h = $h + 5;
echo $h , "<br>";
echo "<hr size = '1'>";
echo (9.54 /4.31)... | true |
9de5d9a7dc812a17792b554e06f92afb6b2cd83c | PHP | wmde/catgraph-web | /CatGraphApi.php | UTF-8 | 48,348 | 2.828125 | 3 | [] | no_license | <?php
$debug = false;
$cg_path = dirname(__FILE__);
$gp_path = "$cg_path/gp";
require_once("$cg_path/CatGraphApi.config.php");
if ( !empty($config["gp-lib-path"]) ) $gp_path = $config["gp-lib-path"];
if ( !empty($config["debug"]) ) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
}
require_once("$gp_path/g... | true |
0c53ff3dab6284268038fcdb04e4a9969786a916 | PHP | aleesilva/estrutura_mvc | /Core/Controller.php | WINDOWS-1252 | 4,524 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: alees
* Date: 18/08/2018
* Time: 20:16
*/
class Controller
{
protected $_objeto;
public function view_load($_name, $_dados = array())
{
extract($_dados);
include 'Views/' . $_name . '.php';
}
protected function input($_nome, $_filter =... | true |
3dea0513735e33426e2f66fab0b312392c8703cc | PHP | tat-summonporter/porter_web_app | /symfony/porter-plat/src/AppBundle/Entity/CreditCard.php | UTF-8 | 774 | 2.9375 | 3 | [] | no_license | <?php
// src/AppBundle/Entity/CreditCard.php
namespace AppBundle\Entity;
class CreditCard {
private $firstName;
private $lastName;
private $number;
private $expiration;
private $security;
public function __construct($firstName_, $lastName_, $number_, $expiration_, $security_) {
$this->firstName = $firstName... | true |
126e6e58f0e8c9011e580ccd5dc676933f999280 | PHP | ofcold/composer-plugin | /src/Plugin.php | UTF-8 | 1,348 | 2.78125 | 3 | [] | no_license | <?php
namespace Ofcold\ComposerPlugin;
use Composer\Composer;
use Composer\Installer\InstallationManager;
use Composer\Installer\LibraryInstaller;
use Composer\IO\IOInterface;
use Composer\Plugin\PluginInterface;
/**
* Class Plugin
*
* @link https://ofcold.com
*
* @author Ofcold, Inc <support@ofcold.com>
* @... | true |
03f397443fc7858aedfc94c693e33503ccd8fdca | PHP | arzola/PHPZceTestPreparation | /semana2/static.php | UTF-8 | 540 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
/*
* Una variable estatica retiene el valor entre llamados a funciones,
* sin embargo solo tiene alcance en la funcion donde fue definida
*/
function updateCounter() {
$nostatic = 0;
static $counter = 0;
$counter++;
$nostatic++;
echo "Static counter is now {$counter} and NOstatic counter ... | true |
193358f55c6a06ae18a2f02bda52775a33906501 | PHP | nathandaly/somnambulist-collection | /tests/Collection/CollectionSortTest.php | UTF-8 | 3,899 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Somnambulist\Tests\Collection\Collection;
use PHPUnit\Framework\TestCase;
use Somnambulist\Collection\Collection;
/**
* Class CollectionSortTest
*
* @package Somnambulist\Tests\Collection\Collection
* @subpackage Somnambulist\Tests\Collection\Collection\CollectionSortTest
*/
class CollectionS... | true |
fbf5406a3642543a2d15e6064edd6aa8c25f2173 | PHP | codeaudit/core-2 | /src/ResponseEngine/tests/ResponseEngineWebchatMessageWrapperTest.php | UTF-8 | 1,788 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace OpenDialogAi\ResponseEngine\Tests;
use OpenDialogAi\Core\Tests\TestCase;
use OpenDialogAi\ResponseEngine\Message\Webchat\WebChatMessage;
use OpenDialogAi\ResponseEngine\Message\Webchat\WebChatMessages;
class ResponseEngineWebchatMessageWrapperTest extends TestCase
{
public function testMessageWra... | true |
7ecea00fcca062cd424918e0ea98823621ed063c | PHP | ybcoming/NLB | /lib/DatabaseColumn.class.php | UTF-8 | 728 | 3.28125 | 3 | [] | no_license | <?php
/**
* The DatabaseColumn describes a column used by the DatabaseTable class
*/
class DatabaseColumn {
private $name;
private $type;
private $maxlength;
private $extras;
public function __construct($name, $type = NULL, $maxlength = NULL, $extras = NULL)
{
$this->name = $name;
$this->type = $type;
... | true |
58810a0581efc616376f97fb1f2188c511048ce0 | PHP | lintangpurnama/CRUD-Stock-Barang-PHP-Native | /function.php | UTF-8 | 9,407 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
//koneksi db
$conn = mysqli_connect("localhost", "root", "", "db_stock");
//menambah barang baru
if (isset($_POST['addnewbarang'])) {
$namabarang = $_POST['namabarang'];
$deskripsi = $_POST['deskripsi'];
$stock = $_POST['stock'];
$addtotable = mysqli_query($conn, "INSERT INTO st... | true |
bf537b231952cfecc8255c7f4bb40a996245639b | PHP | germanps/GoogleMapsApi | /controller/carga_ajax.php | UTF-8 | 709 | 2.578125 | 3 | [] | no_license | <?php
require "conexion.php";
$cat = $_POST['categoria'];
$con = conexion();
//hacemos consulta para saber el id según el string categoria que viene del front
$cat_query = "select id_categoria from categoria where nombre='$cat'";
$cat_resul = mysqli_query($con, $cat_query);
while ($fila = mysqli_fetch_array(... | true |
cb68aef80eb0bccf89b771ca280abf7a9cb710ac | PHP | nhzq/socially | /classes/User.php | UTF-8 | 2,489 | 3.09375 | 3 | [] | no_license | <?php
class User
{
private $_db = null;
public $_errors;
public function __construct()
{
$db = DB::getInstance();
$this->_db = $db->getConnection();
}
//Check post or get
public static function has($item = null)
{
if(isset($_POST[$item])) {
return $_POST[$item];
} else if(isset($_GET[$item]))... | true |
762848df6acd15ae05f55135276d9ec52949076a | PHP | dimandr0811/yeticave.ua | /login.php | UTF-8 | 2,635 | 2.578125 | 3 | [] | no_license | <?php
error_reporting(0);
require_once('functions.php');
// require_once('userdata.php');
require_once('config/db.php');
require_once('data_base_func.php');
require_once('vendor/autoload.php');
require_once('database.php');
//Запускаем сессию
session_start();
//запускаем базу данных процедурный метод
// $connect = my... | true |
a0c244503523175686673d7a37f58507acf0fe4f | PHP | larsloQ/larsloQ-slim4-skeleton-monolog-sentinel-behat | /app/Middleware/PhpErrorHandlerMiddleware.php | UTF-8 | 1,886 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Log\LoggerInterface;
/**
* Middleware.
* based on https://odan.github.io/2019/11/05/slim4-tutorial.html
... | true |
64af584d1a9db92ae49f2815ecc2b5ee35489646 | PHP | Azure-Samples/cognitive-services-personalizer-samples | /quickstarts/PHP/python-quickstart.php | UTF-8 | 2,947 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
require_once(__DIR__ . '\php\SwaggerClient-php\vendor\autoload.php');
# This code is not verified as swagger-code generated client does not allow arbitary object
# as Rank feature. Every object user wants to use has to implement several interfaces like
# RankedAction. This will give terrible use... | true |
bbb1eb22716c12f619581f7b0545768bfa0a2615 | PHP | patwarydk/Raw-Php | /dalStaff.php | UTF-8 | 959 | 2.828125 | 3 | [] | no_license | <?php
class dalStaff extends DB {
public $Id;
public $Name;
public $Desingationid;
public $Joining;
public $Basic;
public function save() {
$this->Connect();
$sql = "insert into employee(name, desingationid, joining, basic) values(
'" . $this->Escape($... | true |
cd1d5bdcfaebe50e30bfeef2c0be61238c640f89 | PHP | Tri-Ka/listeNoel | /actions/connect.php | UTF-8 | 686 | 2.609375 | 3 | [] | no_license | <?php
include '../config.php';
$nom = $_POST['nom'];
$password = $_POST['password'];
$user = retrieveUser($nom, $password);
if ($user) {
$_SESSION['user'] = $user;
setcookie('listeKdoUserCode', $user['code'], time()+31556926 ,'/');
header('Location: ../index.php?user='.$u... | true |
d905b7c2a32a8868f174d7c6c4a074c80b3dbe89 | PHP | GiriSuresh/AMEBBACKUP | /app/Http/Controllers/SuperAdmin/Account/AccountController.php | UTF-8 | 2,873 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers\SuperAdmin\Account;
use App\Modules\Services\Option\CountryService;
use App\Modules\Services\State\StateService;
use App\Http\Controllers\SuperAdmin\AdminBaseController;
use App\Http\Requests\AccountHolderRequest;
use App\Modules\Services\AccountHolder\AccountHolderService;
class ... | true |
f47ff439adb9705885b098c851c2095b791d2625 | PHP | NAONAOx1126/Cherry | /batch/SetupTweets.php | UTF-8 | 4,769 | 2.515625 | 3 | [] | no_license | <?php
/**
* This file is part of Twitter auto post application.
*
* @author Naohisa Minagawa <info@clay-system.jp>
* @copyright Copyright (c) 2010, Naohisa Minagawa
* @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
* @since PHP 5.3
* @version 4.0.0
*/
/**
* ツイートの取り込み処... | true |
73958de04a258da2f4c8f9f7dd35a0f9701e8281 | PHP | seanpeng12/www | /dbresource/inc.php | UTF-8 | 808 | 2.640625 | 3 | [] | no_license | <?php
// 建立MySQL的資料庫連接
$conn = mysqli_connect(
'db.changken.org',
'sean',
'12345678'); // 預設使用的資料庫名稱
if(!$conn){
echo "資料庫連接失敗";
}
mysqli_query($conn, 'SET NAMES utf8;');
mysqli_select_db($conn, 'changken_web');
/* 新增到資料庫
if(isset($_POST['company'])){
... | true |
240792ebb5a5e1b095aa63bdb136be30281a6ca8 | PHP | rosemijares/eyelearn | /public/teacher/story/create.php | UTF-8 | 4,022 | 2.671875 | 3 | [] | no_license | <?php
// Initialize Page
require_once('../../../includes/initialize.php');
// Check if Logged in. If not the page will go to Signin page
if (!$session->is_logged_in()) { redirect_to("signin.php"); }
$obj = 'Content';
$max_file_size = 10485760000; // expressed in bytes
// 1... | true |
b8afca09a62f52ec797cef02a2f0384febaa23da | PHP | pengleihp/suanfa | /binarySearch.php | UTF-8 | 2,022 | 4.40625 | 4 | [] | no_license | <?php
/*
要求:用PHP实现二分查找,在有序数组中查找某个数组是否存在,存在则返回下标值
分析:
前提:一堆有序的数组
定义:二分查找也叫折半查找,但是,折半查找要求线性表必须采用顺序存储结构,而且表中元素按关键字有序排列
基本思路:
1、将查找的键和中间键做比较
2、小于,继续在左子数组中查找
3、大于,继续在右子数组中查找
4、直到找到,或找不到退出
*/
/**
* 本例假设有序数组为升序排列数组
*/
/**
* 方案一:用while循环
* $arr:升序数组
* $low:查找开始位置
* $high:查找结束位置
* $k :要查找的元素
*/
function binary... | true |
49d569914108f74621d22a68675f097cce347df8 | PHP | Anik2069/ajaxcrud | /crudinsert.php | UTF-8 | 2,329 | 2.78125 | 3 | [] | no_license | <?php
$conn =mysqli_connect("localhost","root","","ajaxdata");
extract($_POST);
if(isset($_POST['id']) && isset($_POST['id']) != "")
{
$user_id = $_POST['id'];
$query = "SELECT * FROM user WHERE serial = '$user_id'";
if (!$result = mysqli_query($conn,$query)) {
exit(mysqli_error());
... | true |
19608193793ba99743ffddfd5fba0764bcdc30f7 | PHP | qq272775425/demo5 | /myblog5/application/models/message_model.php | UTF-8 | 518 | 2.578125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Message_model extends CI_Model {
public function save($username, $email, $content){
$this -> db -> insert('t_message', array(
'username' => $username,
'email' => $email,
'content' => $content
... | true |
d1fce70b9bafb57ae9f54bea8c16f473df0c5d7c | PHP | godmanshot/bookkeeping | /app/SiteSetting.php | UTF-8 | 686 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
class SiteSetting {
public $xml_file;
public $file;
function __construct($file_name) {
$this->file = $file_name;
$this->xml_file = simplexml_load_file($file_name);
}
public function getInstance() {
return $this->xml_file;
}
public function __set($name, $value)
{
$... | true |
7a80d57de1e3960ab455ca83c039ccade0d60135 | PHP | desarrolloCercafe/intranet | /database/migrations/2017_10_19_162822_create_table_granjas.php | UTF-8 | 798 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTableGranjas extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('granjas', function (Blueprint $table)
{
... | true |
e348bf22f48dfd023957f22f123014891c20c4cb | PHP | marktilbrook/ncl-events | /adminFacility.php | UTF-8 | 1,431 | 2.59375 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Admin Facility</title>
</head>
<body>
<h1>Admin Facility</h1><br>
<p>Please select an event to edit</p>
<!--this script will be referencing the adminFacility.html file for task 1-->
<!--dont fuck with this its working fine-->
<?p... | true |
3c3da1c8db6df11bddca4b88be0a9269a77c30a2 | PHP | ardani/trd | /app/Services/RoleService.php | UTF-8 | 1,267 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: ardani
* Date: 1/21/17
* Time: 10:54 PM
*/
namespace App\Services;
use App\Models\Permission;
use App\Models\Role;
use Entrust;
class RoleService extends Service {
protected $model;
protected $name = 'roles';
private $permission;
public function __const... | true |
d0fd862ebb478efa1e2de30e6d38146843a1224b | PHP | Atsumoriso/Various-Tasks | /import-of-products/save_user_info.php | UTF-8 | 1,945 | 2.921875 | 3 | [] | no_license | <?php
session_start();
/**
* Functions for checking & validating form
*/
function checkingFormAndSaveNewUser(){
include_once 'validate.php';
if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password']) && isset($_POST['confirm_password']) && isset($_POST['agree'])) {
$usernam... | true |
dacd921ce15aab38bf76a4cda6d08b8d25e3d39e | PHP | thienhoang563/Laravel_shop | /database/seeds/ProductsTableSeeder.php | UTF-8 | 553 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class ProductsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$product = new \App\Product();
$product->id = 1;
$product->name = "Quan jean nam ong bo";
$product-... | true |
8350d22812cdd0b8511ffd73f88041ec4be434c3 | PHP | hilmiardani/TestFrontEnd | /testfrontendkly/test-api/application/controllers/admin/Controller_siswa.php | UTF-8 | 1,568 | 2.53125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH . '/libraries/REST_Controller.php';
class Controller_siswa extends REST_Controller {
protected $methods = [
"list_post" => ["level" => 1],
"add_post" => ["level" => 1],
"edit_post" => ["level" => 1]
];... | true |
ec4666e9c573c5facd999f8ee899483ced4694a3 | PHP | himontalukdar/laravel | /database/seeds/TeacherSeeder.php | UTF-8 | 610 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class TeacherSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$dept_array = ["CSE", "BBA", "EEE", "LAW", "PHARMACY", "ARCHITECTU... | true |
09930316b2ac2ca469683d5216e75321cb76a0bb | PHP | panarican/salesforce | /src/SalesForceInterface.php | UTF-8 | 1,540 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: panarican
* Date: 2/4/18
* Time: 7:55 PM
*/
namespace Panarican\SalesForce;
interface SalesForceInterface {
/**
* Builds payload based on available payloadFields
*
* @param array $payload
*
* @return mixed
*/
public function buildPayload( array $payload );
... | true |
3bf51b91ddcb80522d861fdac1f0e340961409d6 | PHP | VioletTrain/base | /src/Configuration.php | UTF-8 | 889 | 2.6875 | 3 | [] | no_license | <?php
namespace Anso\Framework\Base;
use Anso\Framework\Base\Contract\ExceptionHandler;
use ErrorException;
class Configuration
{
protected string $configPath;
public function __construct($relativeConfigPath = '/config')
{
$this->configPath = BASE_PATH . $relativeConfigPath;
$this->confi... | true |
9b5a4fe5a08a6932c34017d1931e9e8b79618bd9 | PHP | mikesavegnago/RedeSocialG2 | /module/Application/src/Application/Controller/UfsController.php | UTF-8 | 2,210 | 2.53125 | 3 | [] | no_license | <?php
namespace Application\Controller;
use Core\Controller\ActionController as ActionController;
use Application\Form\Uf as Form;
use Zend\View\Model\ViewModel;
/**
* Controller Ufs
*
* @category Application
* @package Controller
* @author Mike Savegnago <mikesavegnago@unochapeco.edu.br>
* @license Copyright <... | true |
fa3d58d027def513452c851900059ecd215bf98a | PHP | jagalletta/ProjTry2 | /dashboard.php | UTF-8 | 9,990 | 2.515625 | 3 | [] | no_license | <?php
session_start();
// If session variable is not set it will redirect to login page
if (!isset($_SESSION['userName']) || empty($_SESSION['userName'])) {
header("location: login.php");
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=de... | true |
7fc0c7ca5a86ddb2db237fb3ffad98e605222f3c | PHP | earcaya/proyecto-Agencia | /Token/TokenManager.php | UTF-8 | 1,372 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: MEZGO
* Date: 11/03/2018
* Time: 19:29
*/
require __DIR__ . '../../vendor/autoload.php';
use \Firebase\JWT\JWT;
class TokenManager
{
public $key = "the_supreme_key";
public $token_timeout = "300";//5*60=300segundos
function createToken($id, $rol){
$tok... | true |
0ebf13fe1283a77fea9dcb83cd00eba96fcf49a3 | PHP | iamfat/qf | /libraries/i18n.php | UTF-8 | 2,150 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
abstract class _I18N {
protected static $locale;
protected static $items;
protected static $bases;
static function setup() {
self::$locale = Config::get('system.locale', 'zh_CN');
}
static function get_items(){
return self::$items;
}
static function shutdown(){
self::$items = NULL;
... | true |
863db69507e9d22897dcfd6ea03a62e14cf54c10 | PHP | gskoropada/ScioXchange | /questions_backend.php | UTF-8 | 5,530 | 2.84375 | 3 | [] | no_license | <?php
if(!isset($con)) {
require "connect.php";
}
if(isset($_POST['slider'])) {
if($_POST['slider'] == 1) {
fetchQuestions(5,0,0,"");
}
}
if(isset($_POST['fetch'])) {
fetchQuestions($_POST['fetch'], $_POST['id'], $_POST['offset'],"");
}
if(isset($_POST['tag'])) {
fetchQuestions($_POST['limit'],0,$_POST['offs... | true |