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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
16dd1caf378998624d5dc1659053f563a7962628 | PHP | ArovaSyams/TK-permatabunda | /app/Controllers/Auth.php | UTF-8 | 2,377 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use App\Models\AuthModel;
class Auth extends BaseController
{
protected $authModel;
public function __construct()
{
$this->authModel = new AuthModel();
}
public function index()
{
if (session()->has('admin')) {
return redi... | true |
ce675b80dadbdc83b48b78413ad9700cb9430fb9 | PHP | Teooo/PHP | /PHP Arrays, String and Objects/5.SentenceExtractor.php | UTF-8 | 911 | 3.328125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>Sentence Extractor</title>
</head>
<body>
<main>
<form>
<textarea name="text"></textarea>
<label for="word">Word:</label>
<input type="text" name="word" id="word">
<input type="submit" value="Extract">
</form>
<?php
if (i... | true |
d13c2db95a58f1654a472c369252de21a8a77ef5 | PHP | aronquiray/base | /src/Http/Controllers/BaseController.php | UTF-8 | 3,425 | 2.546875 | 3 | [] | no_license | <?php
namespace HalcyonLaravel\Base\Http\Controllers;
use HalcyonLaravel\Base\Criterion\Eloquent\ThisEqualThatCriteria;
use HalcyonLaravel\Base\Criterion\Eloquent\ThisScopeCriteria;
use HalcyonLaravel\Base\Criterion\Eloquent\WithTrashCriteria;
use HalcyonLaravel\Base\Models\Model;
use HalcyonLaravel\Base\Repository\B... | true |
1aa61213cb9fcf54d4112c2d6092e8a9d07b7e5a | PHP | NJindia/4300FinalProject | /editPersonalPHP.php | UTF-8 | 1,168 | 2.5625 | 3 | [] | no_license | <?php
include('database.php');
if (!isset($_SESSION)) {
session_start();
}
$userID = filter_input(INPUT_POST, 'userID', FILTER_VALIDATE_INT);
$user_id = $_SESSION['user_id'];
$first = $_POST['first'];
$last = $_POST['last'];
$phone = $_POST['phone'];
if (!empty($first)) {
if (!preg_match("/^[a-zA-Z]+$/", $... | true |
715bad8c70bd1d5b0aa074c7a9aa15832f68455f | PHP | Dhruval-kamdar/assurets | /app/Model/ServicePhoto.php | UTF-8 | 3,468 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use DB;
use PHPImageWorkshop\ImageWorkshop;
class ServicePhoto extends Model {
protected $table = 'service_photo';
public function getServicePhotoData($id){
return ServicePhoto::where('service_id',$id)->get()->toArray();
}
... | true |
6576b1eceecb41cd3be5443c24b18aabc6aa78b3 | PHP | agrodriguez/wwwsakilav2 | /database/seeds/RentalPaymentTableSeeder.php | UTF-8 | 3,058 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class RentalPaymentTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
/**
* Could have used
* factory('App\Rental', 16050)->create();
*
* but deecided f... | true |
03f831fd641f54b16daf270266a0cf8d42685e66 | PHP | Thibaudkhan/algo-avance | /solveur_sudoku_starter/index.php | UTF-8 | 1,884 | 3 | 3 | [] | no_license | <?php
require "./src/SudokuGrid.php";
require_once 'src/SudokuSolver.php';
$grid1 = SudokuGrid::loadFromFile("./grids/grid1.json");
$grid2 = SudokuGrid::loadFromFile("./grids/grid2.json");
$grid3 = SudokuGrid::loadFromFile("./grids/grid3.json");
$grid4 = SudokuGrid::loadFromFile("./grids/grid4.json");
$grid5 = SudokuG... | true |
4cfca4095323831d8f1a8955d9c2936cd69270d0 | PHP | JoeyOWard/Youtube-Demo | /core/database/QueryBuilder.php | UTF-8 | 1,783 | 3.328125 | 3 | [] | no_license | <?php
/**
* Class QueryBuilder
*
* Acts as a kind of simple ORM
*
*/
class QueryBuilder
{
/**
* @var PDO
*/
private $pdo;
/**
* QueryBuilder constructor.
* @param PDO $pdo
*/
public function __construct(PDO $pdo){
$this->pdo = $pdo;
}
/**
* @param $table... | true |
b64d4aef74cef49cda9fc56507644dd11cba07d2 | PHP | ben1205/php-start | /library/index.php | UTF-8 | 1,050 | 2.578125 | 3 | [] | no_license | <<<<<<< HEAD
<?php ob_start(); ?>
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title>会员系统</title>
<link rel="stylesheet" href="./style.css" type="text/css">
</head>
<body>
<?php
function __autoload($_className) {
require $_className . '.class.php';
}... | true |
13c2c71452d3e0ef65cccbb173d77f5db66a5fdc | PHP | myroot593/multiple | /oop/index.php | UTF-8 | 2,229 | 2.875 | 3 | [] | no_license | <?php
require_once 'koneksi.php';
require_once 'fungsi.php';
$obj = new crud;
$nip_err = $up_type_err ="";
if($_SERVER['REQUEST_METHOD']=='POST'){
if(empty(trim($_POST['update_type']))){
$up_type_err = "Harap pilih jenis update yang diinginkan";
}else{
$update_type = $_POST['update_type'];
}
if(empty($_PO... | true |
686e1c013e834a672f850d59d05d821929167f5c | PHP | CarolineVeleda/session-com-bt- | /session/register.php | UTF-8 | 1,758 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
$usuario = $_POST["usuario"];
$email = $_POST["email"];
$filepath = "\Users\ivon\Desktop\session";
$filename = $filepath."/dados.txt";
$mode = "a+";
$arquivo = fopen($filename,$mode);
$quebra="\n";
if ($arquivo) {
if (fwrite($arquivo, ($usuario.';'.$email.';'.$quebra))) {
... | true |
36ac0408b962da177023981ea53dd24a771791a3 | PHP | sardaryanhrant/yii2-api | /common/components/entity/EntityInstance.php | UTF-8 | 2,898 | 2.859375 | 3 | [] | no_license | <?php
namespace app\common\components\entity;
class EntityInstance
{
protected $alias_name;
protected $table_name;
protected $type_name;
protected $attributes = [];
protected $relationships = [];
protected $pluralRelations = [];
/**
* @var EntityNestedCollection[]
*/
prot... | true |
f824a79c45b71de443c25b7bbd4b18cedb9b12b2 | PHP | underdog1987/simple-curl | /src/CURLResponse.php | UTF-8 | 5,128 | 2.8125 | 3 | [] | no_license | <?php
namespace Underdog1987\SimpleCURL;
class CURLResponse{
private function __construct(){}
/**
* Properties
*/
private $url;
private $content_type;
private $http_code;
private $header_size;
private $request_size;
private $filetime;
private $ssl_verify_result;... | true |
0801bb7145b210a1103df24a5dabaf505c1a645a | PHP | Stolz/php-stubs | /res/php/trader/functions/trader-tan.php | UTF-8 | 192 | 2.578125 | 3 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | <?php
/**
* Vector Trigonometric Tan
*
* @phpstub
*
* @param array $real
*
* @return array Returns an array with calculated data or false on failure.
*/
function trader_tan($real)
{
} | true |
15e993383bd7c9fb474c76c03607fc510b78c78d | PHP | keepgoingdev/aws-engine-master | /protected/components/SiteUrlManager.php | UTF-8 | 20,256 | 2.828125 | 3 | [] | no_license | <?php
/**
* Site URL Manager - extended URL manager which allows creating and parsing URLs
* for a set of sites using one URL pattern for all of them.
*
* URL pattern is splitted into two parts - site part and path info.
*
* Site part is used to determine current site. It includes base URL and optionally host ... | true |
a89539d1ada1d2280b978eba4a1c132c6b6a8c8b | PHP | liip/LiipDrupalConnectorModule | /src/Liip/Drupal/Modules/DrupalConnector/Menu.php | UTF-8 | 37,357 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Abstraction of the procedural Drupal world into OOP.
*
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @copyright Copyright (c) 2012 liip ag
*
* @package DrupalConnector
* @subpackage Menu
*/
namespace L... | true |
b912923ea3eed3ac918bf2a97b52a7574443f206 | PHP | B-GH/php-mini-tchat | /modeles/user.php | UTF-8 | 2,593 | 2.984375 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
class User
{
private $bdd;
private $connected;
function __construct()
{
try {
$this->bdd = new PDO('mysql:host=localhost;dbname=tchat', 'root', '', [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$this->bdd->exec('SET CHARACTER SET ut... | true |
d37471f81e71cca2d9ff6669ef793e817b85c994 | PHP | wildfireone/bucktest | /my-pbs.php | UTF-8 | 8,513 | 2.640625 | 3 | [] | no_license | <?php session_start();
require 'inc/connection.inc.php';
require 'inc/security.inc.php';
if (!isset($_SESSION['username'])) {
header( 'Location:' . $domain . 'message.php?id=badaccess' );
exit;
}
$user = false;
if (!isset($_GET["u"])) {
$user = true;
} else {
... | true |
f11ddd50788629b557b9aa860fb669c2473772e8 | PHP | farrrr/sns | /addons/model/LangModel.class.php | UTF-8 | 6,572 | 2.75 | 3 | [] | no_license | <?php
/**
* 多語言模型 - 資料物件模型
* @author zivss <guolee226@gmail.com>
* @version TS3.0
*/
class LangModel extends Model {
protected $tableName = 'lang';
protected $fields = array(0=>'lang_id',1=>'key',2=>'appname',3=>'filetype',4=>'zh-cn',5=>'en',6=>'zh-tw','_autoinc'=>true,'_pk'=>'id');
protect... | true |
3da8a0c0c4e20eb26d23818fce1aa17b1e376436 | PHP | dagio/php-scalar-type-hints-v5-playground | /playground/returns.php | UTF-8 | 80 | 3.171875 | 3 | [] | no_license | <?php
function foobar(): int {
return 1.0;
}
var_dump(foobar()); // int(1) | true |
b629a21e44467d5401f59be5f855f72c3abded93 | PHP | TJNevis1/a_tb | /index.php | UTF-8 | 3,741 | 2.609375 | 3 | [] | no_license | <?php
//echo '<' . rand(2, 9) . '>';
//echo (isset($_GET['rfid_serial'])) ? '<1>' : '<2>';
require_once 'db/mongo_functions.php';
require_once 'lib/php-sdk/src/facebook.php';
$mongoDB = new MongoFunctions('arduino', 'localhost');
if(isset($_GET['code'])):
$credentials = array(
'appId' => '32... | true |
767502f6a014605b5ad7ae49150e4ac7a54ab4b3 | PHP | anchalgupta123/sky_voice | /application/models/Model_category_qa.php | UTF-8 | 1,170 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_category_qa extends CI_Model {
public $table ='category_qa';
public function __construct()
{
parent::__construct();
$this->load->database();
}
public function insert_qa_question($data_category)
{
$this->db->insert($th... | true |
d96dde524bc96b463242be4e92fdae1672ddb8f1 | PHP | pdhondt/oop-blackjack-revisited | /index.php | UTF-8 | 3,044 | 3.09375 | 3 | [] | no_license | <?php
declare(strict_types=1);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
require 'Blackjack.php';
require 'Player.php';
require 'Suit.php';
require 'Card.php';
require 'Deck.php';
require 'Dealer.php';
session_start();
if (!isset($_SESSION['new_game'])) {
$_... | true |
2b5c57a7ae3bf5af4cd3527ac2a280378a2f9e8d | PHP | ashishkpoudel/wonderlist | /Server/app/Http/Requests/TagRequest.php | UTF-8 | 709 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Domain\Tags\DTO\TagData;
use Illuminate\Foundation\Http\FormRequest;
class TagRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;... | true |
7656b132d1d714abdbe798c964aa2b157bbd1fe1 | PHP | RECOHA/livro-programacao-para-internet | /unidade1-adapter/twitter-adapter.php | UTF-8 | 628 | 3.796875 | 4 | [] | no_license | <?php
// Implementação da classe Twitter.
class Twitter {
public function sendTweet($message)
{
echo $message;
}
}
// Interface simples para cada Adapter criado.
interface socialAdapter {
public function send($message);
}
class twitterAdapter implements socialAdapter {
private $... | true |
63f68f982d3dff08641428c9b5790de3788ea9e7 | PHP | Rustapo/flextype | /flextype/core/Snippets.php | UTF-8 | 6,204 | 3.015625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* @package Flextype
*
* @author Sergey Romanenko <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flextype;
use Flextype\Component\Filesystem\Filesys... | true |
5a0856e2b3ddb85b886a051cadd36269e0db9c82 | PHP | jatin0777/jatin-github | /woo/wp-content/plugins/facebook-for-woocommerce/includes/fbutils.php | UTF-8 | 12,774 | 2.59375 | 3 | [
"GPL-2.0-or-later",
"GPL-2.0-only",
"Apache-2.0",
"GPL-1.0-or-later"
] | permissive | <?php
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*
* @package FacebookCommerce
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'WC_Facebookc... | true |
dedaee144737efc34bf529a0c42c9bbcaf3bdf2d | PHP | tedslittlerobot/vi | /src/Display/Table/TabularPresenter.php | UTF-8 | 4,839 | 3 | 3 | [
"MIT"
] | permissive | <?php namespace Vi\Display\Table;
use Illuminate\Contracts\Support\Renderable;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\Routing\UrlGenerator;
use Stringy\StaticStringy as Stringy;
// @todo add actions for rows
// @todo add header and footer section
class TabularPresenter implements Renderable ... | true |
ec13938d93494301799b9806f955d77099f93fb1 | PHP | lt/websocket | /lib/Rfc6455EndpointProxy.php | UTF-8 | 613 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Amp\Websocket;
class Rfc6455EndpointProxy implements Endpoint {
private $endpoint;
public function __construct(Rfc6455Endpoint $endpoint) {
$this->endpoint = $endpoint;
}
public function send($data) {
return $this->endpoint->send($data);
}
public function sen... | true |
ab9a2ad098d7e681576f22f2a1c83b030146d5fd | PHP | GuillermoParedes/inventarios | /app/controllers/ArticleController.php | UTF-8 | 12,420 | 2.53125 | 3 | [] | no_license | <?php
class ArticleController extends BaseController {
protected $article;
public function __construct(Article $article)
{
$this->article = $article;
}
public function getIndex()
{
$title = "Artículos";
$articles = Article::orderBy('name', 'asc')->paginate(5);
$branches = Branche::all();... | true |
e654fd240872f980c7c41430ca112a129c8add6b | PHP | techtronics/algorithms | /larFactor.php | UTF-8 | 826 | 4.09375 | 4 | [] | no_license | <?php
function larFactor($number){
// By deffinition, "A number greater then 1 can be written as the product of any other
// prime numbers". So, 2*2*3 = 12; {2,3} are prime numbers.
// A prime number is a number that can be divided only by one or itself.
//
// We're looking for the larges prime factor of a... | true |
ba76f09849d93b5856547c5dc1fcc2fe5b0ac08b | PHP | StudiowebPro/warehex-laravel-boilerplate | /amp/helpers.php | UTF-8 | 913 | 2.625 | 3 | [] | no_license | <?php
/**
* Laravel Warehex-boilerplate
* User: Kylrad
* Company: Warehex
* http://studioweb.pro
* Date: 02.05.2017
* Time: 0:27
*/
//if (! function_exists('includeRouteFiles')) {
/**
* Loops through a folder and requires all PHP files
* Searches sub-directories as well.
*
* @param $fol... | true |
3567553bbb4ad48bd0935b1f2463a410e3ebd44f | PHP | CuteCat911/crm | /src/Service/ClientService.php | UTF-8 | 11,038 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Service;
use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Client;
use App\Entity\Email;
use App\Entity\Phone;
use App\Entity\Site;
use App\Entity\Social;
use App\Entity\ContactPerson;
class ClientService
{
private $em;
private $contact_person_service;
private $client;
pub... | true |
26ded0a5fabe30f1bcaeee412bafeaf21ef529c2 | PHP | tvogels/epm | /index.php | UTF-8 | 1,745 | 2.6875 | 3 | [] | no_license | <?php
require_once("vendor/autoload.php");
require_once("config.php");
use Symfony\Component\Yaml\Parser;
// Redirect to the page without .PHP extension and trailing /
$url = $_SERVER['REQUEST_URI'];
$url = preg_replace('/\?.*/', '', $url);
if ('.php' === substr($url,strlen($url)-4,4)) {
header("HTTP/1.1 301 Mo... | true |
263f29c15238ad8c25146d4f65be7561ef316ae1 | PHP | MatiasNAmendola/scan | /protected/modules/crmCliente/models/components/widgets/AutocompleterAjaxWidget.php | UTF-8 | 1,296 | 2.75 | 3 | [] | no_license | <?php
/*
* Widget que crea un campo auto complete basado en un recordset y el nombre del
* campo en el formulario
*
* @author Jorge Tenorio
* @version 1.0
*/
class AutocompleterAjaxWidget extends CWidget {
/**
* Arrgelo de los datos q componen el autocompletamiento
* @var \CActiveDataProvider
... | true |
875353beb96a31e14684291507e6395b326448f1 | PHP | jpettere/tip-calculator | /tip-calculator.php | UTF-8 | 4,775 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
$total = -1;
$tip = -1;
$bill_amount = "";
$bill_error = "";
$split_tip = "";
$split_total = "";
$split = 1;
$split_error = "";
if (isset($_POST["billamount"]) && isset($_POST["tippercentage"])) {
$bill_check = "/^(([1-9]\d{0,2}(,\d{3})*)|(([1-9]\d*)?\d))(\.\d\d)?$/";
$bill_amount = $_POST["billamount"... | true |
b1dd6749559993b72bdd167024cc6af52b99eb55 | PHP | grosaict/margille-1st-version | /dao/OrderDAO.php | UTF-8 | 5,137 | 2.78125 | 3 | [] | no_license | <?php
include_once 'model/Order.php';
include_once 'PDOFactory.php';
include_once 'DAO/ClientDAO.php';
include_once 'DAO/ProductOrderDAO.php';
class OrderDAO
{
public function list()
{
$query = 'SELECT id_order, id_client, order_status, order_amount
... | true |
cfff07a5e4069453772938de5c8cd3cf9d9b3ade | PHP | eddzmaciel/cmedic | /app/Http/Controllers/UploadController.php | UTF-8 | 781 | 2.640625 | 3 | [] | no_license | <?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class UploadController extends Controller {
protected $file;
protected $destPath;
/**
* Setup the layout used by the controller.
*
* @return void
*/
public function __construct... | true |
acf8101a95f5f32eee50812a18c4ccc6ea544056 | PHP | sovanda/novafamily | /library/widgets/widget-image-link.php | UTF-8 | 5,121 | 2.5625 | 3 | [] | no_license | <?php
add_action( 'widgets_init', 'sp_image_link_widget' );
function sp_image_link_widget() {
register_widget( 'sp_widget_image_link' );
}
/*
*****************************************************
* WIDGET CLASS
*****************************************************
*/
class sp_widget_image_link extends WP_Wi... | true |
c4d6d7189060cc63c56365564ccd7a92e4073dcd | PHP | jhenahan/minwox | /edit.php | UTF-8 | 6,616 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
include "common/top.php";
if ( strtoupper( $_SERVER[ 'REQUEST_METHOD' ] ) == 'GET' )
{
$id = $_GET[ 'id' ];
$getCurrentSample =
<<<SAMPLE
SELECT
fldSampleCode as "code",
fldPrivate as "privacy",
fkSampleLanguage as "lang",
fldTitle as "title... | true |
dfe790171e07b962247ad8acf4a323fc4fb3b1c9 | PHP | DPRMC/InteractiveData-RemotePlus | /src/CustomClients/FixedIncomeBestPriceClient.php | UTF-8 | 1,840 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace DPRMC\InteractiveData\CustomClients;
use DPRMC\InteractiveData\FixedIncomeResponse;
use DPRMC\InteractiveData\RemotePlusClient;
use DPRMC\InteractiveData\RemotePlusResponse;
class FixedIncomeBestPriceClient extends RemotePlusClient{
protected $date;
protected $cusips;
protected $pricesRe... | true |
35f3734bc234dedb51a18964fc9d8ee1c2500971 | PHP | ProjDeviance/invdev_prototype | /app/database/migrations/2015_01_15_041631_create_stock_records.php | UTF-8 | 903 | 2.734375 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateStockRecords extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('stock_records', function(Blueprint $table)
{
$table->increments('id');
... | true |
09e9c4899a37d88d19af5c82fadb1465d9d9891b | PHP | Miliooo/MilioooMessageBundle | /MessagingBundle/Controller/ThreadActionsController.php | UTF-8 | 8,667 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the MilioooMessageBundle package.
*
* (c) Michiel boeckaert <boeckaert@gmail.com>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Miliooo\MessagingBundle\Controller;
use Miliooo\Messaging\User\Participant... | true |
33101faf0174f6bfefa5984ec6d5c70fa3a2b690 | PHP | satchamo/PHP-Fractions | /examples.php | UTF-8 | 1,161 | 3.6875 | 4 | [
"MIT"
] | permissive | <?php
include 'fractions.php';
// Create a basic fraction
$a = new Fraction(1,2);
// Because the Fraction constructor only accepts a numerator, and denominator, you can use this method to convert a mixed number to a Fraction object
$b = Fractions::fromArray(array(1,1,2));
// The denominator is assumed to be 1 if none... | true |
46ac5837f09e30ad76f286c82dc26b6e2d715ea5 | PHP | Lazaro-Gallo/psmn | /application/models/ManagementTheme.php | UTF-8 | 609 | 2.59375 | 3 | [] | no_license | <?php
class Model_ManagementTheme {
protected $table;
public function __construct(){
$this->table = new DbTable_ManagementTheme();
}
public function getAll(){
return $this->table->getAll();
}
public function getScoreByTh7eme($questionnaireId, $userId){
r... | true |
e6da4edf613fbf4dcac553377b98f0b82b9769e0 | PHP | jspruyt/axltools | /lib/classes/AXLClient_class.php | UTF-8 | 2,688 | 2.6875 | 3 | [] | no_license | <?php
class AXLClient {
private static $instance = null;
private static $client = null;
private static $cluster = null;
public static function getInstance() {
if (self::$instance === null) {
self::$instance = new self();
}
return self::$instance;
}
public static function getClient() {
if (... | true |
0728e81416aaaded15ab1048f71a3017379f27cd | PHP | zambinij/helpdesk | /app/Models/Issue.php | UTF-8 | 2,179 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\Issue
*
* @property integer $id
* @property integer $assigned_to
* @property string $title
* @property string $question
* @property integer $user_id
* @property integer $status
* @property integer $priority
* @property int... | true |
4d71c1921c8ea5e2e3d00edd182217813deebe23 | PHP | cine-use/strack3_log | /src/app/Process/PushAmqpProcess.php | UTF-8 | 1,079 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: zhangjincheng
* Date: 17-9-15
* Time: 下午2:28
*/
namespace app\Process;
use app\AMQPTasks\PushAMQPTask;
use Server\Components\AMQPTaskSystem\AMQPTaskProcess;
class PushAmqpProcess extends AMQPTaskProcess
{
/**
* 路由消息返回class名称
* @param $body
* @return s... | true |
cab3cd4daae39446d8f3220c230491116bdcdac9 | PHP | gistol/boomstarter-php | /boomstarter.php | UTF-8 | 4,773 | 3.0625 | 3 | [] | no_license | <?php
/**
* BoomStarter
*
* Набор методов для работы с API
*
* @author Drax <dj@boomstarter.ru>
* @version 1.0
*/
class BoomStarter
{
/**
* UUID магазина
*
* @var string UUID магазина
*/
private $uuid;
/**
* Token для доступа к API
*
* @var string Token для доступа... | true |
0e08a55ce5c45abfa37009665c5ab5c17697f364 | PHP | Aquassaut/miniprojetbdd | /controllers/epreuveController.php | UTF-8 | 1,305 | 3.140625 | 3 | [] | no_license | <?php
/**
* Epreuve CRUD operations interface. Requires queryUtils to fire queries.
*/
require_once('include/queryUtil.php');
/**
* Add a new epreuve to the database
*
* @param $intitule string : name of the new epreuve
* @return boolean : false if failure, true otherwise
*/
function addToEpreuve($inti... | true |
261d443168e5f155a77990da8e62491b37a3f7e6 | PHP | LinkedDestiny/php-enum | /src/AbstractEnum.php | UTF-8 | 5,601 | 3.03125 | 3 | [] | no_license | <?php
namespace LinkCloud\Enum;
use InvalidArgumentException;
use ReflectionClass;
use ReflectionClassConstant;
use ReflectionException;
use RuntimeException;
use Stringable;
abstract class AbstractEnum implements Stringable
{
/**
* 值
* @var mixed
*/
protected mixed $value;
/**
* nam... | true |
bbbce63406945a0307bd1f75b2cc87b4e878ae43 | PHP | KECO-AG/Zanella-V1 | /inc/classes/Session/class.SessionHandler2.php | ISO-8859-1 | 5,309 | 3.015625 | 3 | [] | no_license | <?php
//TODO: Beim Schreiben von Daten berprfen, ob nicht Daten berschrieben werden.
//DEADLOCK bzw. ffnen A , ffen B schreiben B , schreiben A....und schon ist dumm geklaufen
//Passiert nur bei zwei offenen Fenstern des selben Users
//Wie?
//http://www.zend.com/zend/spotlight/code-gallery-wade8.php?article=code-gal... | true |
2f17e8f191b65f0e773911f5b7ed2ee833a5cad1 | PHP | arcadio1894/buscador | /controladores/TerminoController.php | UTF-8 | 1,784 | 2.953125 | 3 | [] | no_license | <?php
include "../modelos/Termino.php";
include "../datos/conexion.php";
class TerminoController extends conexion {
public function __construct(){
$archivo = new Termino();
}
function listaTerminos(){
$conn = $this->conectar();
$sql = $conn->prepare('SELECT * FROM termino');
$sql->exec... | true |
43b420b888da938453e6184f7c8dda45cecf9383 | PHP | rshayer95/Doaba-Restaurant-Core-PHP | /app/blogs.php | UTF-8 | 916 | 2.515625 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION["username"]))
{
include "../inc/userheader.php";
}
else
{
include "../inc/header.php";
}
?>
<h1>Blogs<h1>
<?php
$blogs = $conn -> query("SELECT * FROM blogs");
if($blogs -> num_rows > 0 ... | true |
ad39a42baacffc4e0766f0c2d0ec49838eb55178 | PHP | sbsmith86/rogue | /tests/Http/ReviewsTest.php | UTF-8 | 3,547 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Http;
use Tests\TestCase;
use Rogue\Models\Post;
use Illuminate\Support\Facades\Bus;
use Rogue\Jobs\SendReviewedPostToCustomerIo;
class ReviewsTest extends TestCase
{
/**
* Test that a POST request to /reviews updates the post's status.
*
* POST /reviews
* @return void
... | true |
68d175da47b4c204d618e46480679b19fd7140fb | PHP | zhiwuba/Scaffold | /scaffold/Database/Model/CassandraModel.php | UTF-8 | 5,354 | 2.703125 | 3 | [
"BSD-2-Clause-Views"
] | permissive | <?php
/*
* This file is part of the Scaffold package.
*
* (c) bingxia liu <xiabingliu@163.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Scaffold\Database\Model;
use Cassandra;
use Cassandra\Type;
use Scaffold\Da... | true |
10ea098f2fc41cd40b1f35eb0b1055c3ec24a50a | PHP | DarrylMcoder/my-ytapp | /src/Search.php | UTF-8 | 1,934 | 2.796875 | 3 | [
"MIT"
] | permissive | <?PHP
namespace YouTube;
class Search{
protected $indexdir = "https://my-ytapp.herokuapp.com/index.php";
protected $search_engine = "http://www.google.com/search?safe=strict&q=";
protected $default_query = " video site:youtube.com";
//set and get search engine URL to use in
//searches. Default... | true |
987eb961b94d65ea528268585cc100ed3a723080 | PHP | AndreyShamis/lmp | /src/Entity/ContactMessage.php | UTF-8 | 3,923 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ContactMessageRepository")
*/
class ContactMessage
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer", options={"unsigned"=true})
*/
private $id;
/**
... | true |
398a9c3caa05d022abadf0fee9c0787e41ea2ea8 | PHP | chriscmiller/low-6 | /tests/Unit/Utilities/WeightConverterTest.php | UTF-8 | 11,676 | 2.828125 | 3 | [] | no_license | <?php
namespace Tests\Unit\Utilities;
use App\Utilities\WeightConverter;
use Tests\TestCase;
class WeightConverterTest extends TestCase
{
/**
* @test
* @dataProvider kilogramsPoundsProvider
*/
public function convert_kilograms_to_pounds_will_correctly_provide_values(
bool $shouldRound,... | true |
f5a9479401a037af3cfaec6b1c19703d14c86b2e | PHP | travis-south/cli-app-code-test | /tests/Writer/YamlWriterTest.php | UTF-8 | 2,236 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Tests\Writer;
use App\Writer\YamlWriter;
use PHPUnit\Framework\TestCase;
class YamlWriterTest extends TestCase
{
protected $list;
protected $fileCorrect = './tests/test-write.yml';
protected $fileWrong = './tests/nothing/test-write.yml';
protected function ... | true |
db616330ea53f84e0d89d72510715d9083a96ae8 | PHP | AlfonsoIsabel/chati | /editarPerfil.php | UTF-8 | 5,063 | 2.578125 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['idUsu'])) {
header('Location: index.php');
}
require 'includes/conexion.inc.php';
if (isset($_GET['desactivar'])){
?>
<script>
var confirmar = confirm('Seguro que quieres desactivar tu cuenta?');
if (confirmar... | true |
3c96bf4db9ec829ff471678ada19d6f92c43972e | PHP | DavidsDvm/Dev_Exercises | /Web/PHP/ejercicios_php1/5.php | UTF-8 | 207 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
$amigos= array(
array('Alejandro', 20),
array('Cesar', 21),
array('Manuel', 18)
);
echo $amigos[0][0] . '<br />';
echo $amigos[1][0] . '<br />';
echo $amigos[2][0] . '<br />';
?>
| true |
9727741605baa9793ad4238dad9d8a4bfae8fed6 | PHP | bizou78/questMVC | /src/model/Quest.php | UTF-8 | 1,297 | 3.09375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: bizou
* Date: 26/10/17
* Time: 22:28
*/
namespace Model;
class Quest {
private $quest_id;
private $quest_name;
private $quest_course;
private $quest_score;
/**
* @param mixed $quest_id
*/
public function setQuestId($quest_id)
{
... | true |
dc0c3efdadb16c8d193818f36e8b6f0a4a248b02 | PHP | mayonez89/MovieSuggestions | /Server/app/Http/Requests/Profiles/UpdateRequest.php | UTF-8 | 621 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Profiles;
use App\Http\Requests\CustomRequest;
class UpdateRequest extends CustomRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get... | true |
e38a7e88335f2e0fada3bd1923e0146c500be6fa | PHP | chenkungit/quanfule | /distribution_shop/application/service/Vip/VipSettingService.php | UTF-8 | 896 | 2.65625 | 3 | [] | no_license | <?php
namespace app\service\Vip;
use app\api\exception\ValidateException;
use app\common\Entity\VipSetting;
use app\service\BaseService;
class VipSettingService extends BaseService
{
public function getPageList(array $requestData)
{
return VipSetting::getPageList($requestData);
}
public f... | true |
c541109564b594a71e2c45a43d1779afca0e84de | PHP | flashytime/design-patterns-php | /Structural/Facade/SecurityFacade.php | UTF-8 | 802 | 2.8125 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* Author: flashytime
* Date: 2018/9/14 17:07
*/
namespace DesignPatterns\Structural\Facade;
class SecurityFacade
{
private $camera;
private $light;
private $sensor;
private $alarm;
public function __construct()
{
$this->camera = new Camera();
... | true |
c9c2f511f5420152afee2c6838cac3ee68fc75fe | PHP | hamunstorys/com.php.laravel.developmentnote | /app/Http/Controllers/article/CommentsController.php | UTF-8 | 3,012 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Article;
use App\Http\Controllers\Controller;
use App\Models\Article\Article;
use App\Models\Article\Comment;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class CommentsController extends Controller
{
/**
* Store a newly created resource in storage.
... | true |
7ce05dcfbef03d3bb82e69dfac2e2528421c02df | PHP | vijaynitrr/enqueue-dev | /pkg/enqueue/Consumption/Result.php | UTF-8 | 2,636 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Enqueue\Consumption;
use Enqueue\Psr\Message;
class Result
{
/**
* Use this constant when the message is processed successfully and the message could be removed from the queue.
*/
const ACK = 'enqueue.message_queue.consumption.ack';
/**
* Use this constant when the message ... | true |
3592c406e9dba087d14df3b02489eefe6b7abac7 | PHP | cryptixcoder/Stripe-Course | /checkout_customize/process.php | UTF-8 | 762 | 2.515625 | 3 | [] | no_license | <?php
//var_dump($_POST);
require_once("../Stripe/Stripe.php");
Stripe::setApiKey("sk_test_6jbgLGl89PNJJJOjUg536nxZ");
if (isset($_POST['stripeToken']))
{
try
{
Stripe_Charge::create(array(
"amount" => 2000,
"currency" => "usd",
"card" => $_POST['stripeToken']
));
echo "<h1>Thanks... | true |
d1dfb36c8b99d8bc47b1e239a13a6b07b079f814 | PHP | legatus-php/router | /src/middleware/CallableMiddleware.php | UTF-8 | 1,077 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Legatus project organization.
* (c) Matías Navarro-Carter <contact@mnavarro.dev>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Legatus\Http;
use Psr\Http\Message\ResponseInterface as R... | true |
936c57dfd0aebc3dd68b11c6f40d6ba0fc3c36bc | PHP | pjneto/codewars | /tests/DivisibilityByThirteenTest.php | UTF-8 | 760 | 3.265625 | 3 | [] | no_license | <?php
use Exercises\Sixth\DivisibilityByThirteen;
use PHPUnit\Framework\TestCase;
class DivisibilityByThirteenTest extends TestCase
{
public function testMustReturn87(): void
{
$oCalculator = new DivisibilityByThirteen();
$this->assertEquals(
87,
$oCalculator->thirth(... | true |
14e38ae6d70132ec037cc86bbf6c94d63fee2841 | PHP | WPPlugins/pronamic-ideal | /vendor/wp-pay/core/src/DataHelper.php | UTF-8 | 645 | 2.9375 | 3 | [] | no_license | <?php
/**
* Title: Data helper class
* Description:
* Copyright: Copyright (c) 2005 - 2017
* Company: Pronamic
*
* @author Remco Tolsma
* @version 1.0.0
* @since 1.0.0
*/
class Pronamic_WP_Pay_DataHelper {
/**
* Filter the specified characters from the string
*
* @param array $characters
* @param str... | true |
05caef54f108c09da7b7ae3fd0281c4fbc308e58 | PHP | samarthm24/WebTechnology | /Tour/Museum/like.php | UTF-8 | 1,014 | 2.53125 | 3 | [] | no_license | <?php
session_start();
$user=$_SESSION["username"];
$servername = "localhost";
$username = "samarth";
$password = "123";
$dbname = "wt";
$page="Museum.php";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connec... | true |
96dcc039b4af4464107cf2b48049ab370a4b3016 | PHP | dannychavez141/asistencia | /app1/control/cUsuario.php | UTF-8 | 1,347 | 2.71875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of cUsuario
*
* @author DaHex2
*/
class cUsuario {
function login($usuario, $clave) {
$conex... | true |
5be3fa7be36e847c890503e19a7c4b1894262f8a | PHP | SonyKP/Academy-Management-System | /Academy Managent System/orisys_project_final/add_mark_byFac.php | UTF-8 | 3,151 | 2.546875 | 3 | [] | no_license | <?php
session_start();
require('db_connectivity.php');
?>
<!DOCTYPE html>
<html>
<head>
<title>Orisys Academy project</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css">
<link rel="icon" type="image/... | true |
d703ff843c141b1fbcc4a5aabf9a414589249cd2 | PHP | Jazzee/Jazzee | /src/Jazzee/AdminAuthentication/ApiFormAuthentication.php | UTF-8 | 3,496 | 2.921875 | 3 | [] | no_license | <?php
namespace Jazzee\AdminAuthentication;
/**
* Form based API authentication
*
* Will only run in an environment set to TESTING
* Used for automated testing, the system takes a user API key as
* the form input and authenticated the user. This is slightly more secure than
* NoAuthentication method
*
* @auth... | true |
46ddfc2a95c381bb9942a5c30b1a900898da4374 | PHP | ZacharyTherrien/Database-2-Assignment-3 | /controllers/cart.controller.php | UTF-8 | 735 | 2.671875 | 3 | [] | no_license | <?php
session_start();
require_once('database.controller.php');
$id = $_SESSION['id'];
$query = "SELECT `c`.`product_id`, `c`.`quantity`, `p`.`name`, `p`.`series`, `p`.`price` FROM `cart` AS `c`
JOIN `product` AS `p` ON `c`.`product_id` = `p`.`id`
WHERE `customer_id` = '$id'";
$statement = $... | true |
1b34f6d725cfa28cb138b686d1a016767bf3d091 | PHP | splitice/fraudrecord-api | /src/Splitice/FraudRecord/FraudRecordApiClient.php | UTF-8 | 1,861 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: splitice
* Date: 18-06-2015
* Time: 11:41 AM
*/
namespace Splitice\FraudRecord;
/**
* Class FraudRecordApiClient
*
* The specific API protocol implemented currently
*
* @package Splitice\FraudRecord
*/
class FraudRecordApiClient implements IFraudRec... | true |
aaeb68f38fa5c3eea04ef8510d171699a3fbab3a | PHP | DrRoach/templator | /regex/FindForeach.php | UTF-8 | 314 | 2.765625 | 3 | [] | no_license | <?php
class FindForeach
{
public static function run($line)
{
if(preg_match_all('/(?<start>.*){{\s*foreach\s*\((?<array>[\w|\.]+)\s*as\s*(?<var>\w+)(\s*=>\s*(?<subVar>\w+))?\s*\)\s*}}(?<end>.*)/', $line, $matches)) {
return Parse::run($matches);
}
return false;
}
} | true |
becc27ebbbf839246af7f933defddc372d65bb25 | PHP | Tigloo17/Tigloo-cli | /src/Tigloo/View/TwigExtension.php | UTF-8 | 670 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Tigloo\View;
use Tigloo\Container\Contracts\ContainerInterface;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
class TwigExtension extends AbstractExtension
{
private ContainerInterface $app;
public function __construct(ContainerInterface $app)
{... | true |
d3840a8ae21f6d291877b34a47d51f52440a612c | PHP | SergeBOUZID/Hiring-Test | /library/SpliterPath.php | UTF-8 | 3,290 | 3.0625 | 3 | [] | no_license | <?php
/**
* Short description :
* The class inherits of framework class and represent a toolbox to splite a route path.
*
* @copyright Copyright (c) 2015 BOUZID Serge
* @author Serge BOUZID
* @version 1.0
*/
namespace Framework\Library;
final class SpliterPath extends \Framework\Library\Framework
... | true |
166100e5b46dc38b14747ebc4f079b0d2d42e03d | PHP | bren2000/trovequery | /handlers/trovequery_handler_filter_facet.inc | UTF-8 | 1,462 | 2.640625 | 3 | [] | no_license | <?php
/**
* @file
* Definition of trovequery_handler_filter_facet.
*/
class TrovequeryHandlerFilterFacet extends views_handler_filter_in_operator {
public $opt = array();
/**
* Make an options list with depth indication.
*/
public function make_options($array, $level = 0) {
$pre = '';
for ($i ... | true |
325cd4c1ef1b8db5e93bb7abaa7bc0e7b929e49a | PHP | acquia/acquia-cms-starterkit | /src/Helpers/Task/Steps/EnableThemes.php | UTF-8 | 1,816 | 2.703125 | 3 | [] | no_license | <?php
namespace AcquiaCMS\Cli\Helpers\Task\Steps;
use AcquiaCMS\Cli\Enum\StatusCodes;
use AcquiaCMS\Cli\Helpers\Process\Commands\Drush;
/**
* Run the drush command to enable Drupal themes.
*/
class EnableThemes {
/**
* A drush command object.
*
* @var \AcquiaCMS\Cli\Helpers\Process\Commands\Drush
*/... | true |
a6af2f5730e847affb45193636b4e4ab038102a0 | PHP | ryabuhinaleks/test_task | /app/Repositories/CalendarRepository.php | UTF-8 | 1,222 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Event;
use App\Models\User;
use App\Repositories\Interfaces\CalendarRepositoryInterface;
use Illuminate\Support\Facades\Auth;
class CalendarRepository implements CalendarRepositoryInterface
{
/**
* Returns events
*
* @param array $events
* @para... | true |
e4e81122046e86f6f7283f51d99d88602ae1a57f | PHP | sheldonlendrum/Pipedrive-API-PHP | /functions.php | UTF-8 | 591 | 3.484375 | 3 | [
"MIT"
] | permissive | <?php
function build_table($data) {
$html = '<table width="100%" border="1">' ."\n";
foreach($data as $key => $value) {
$html .= '<tr>' ."\n";
$html .= "\t". '<td width="300" style="width:300px">' . $key . '</td>' ."\n";
if(is_object($value) or is_array($value)) {
... | true |
91df9eb1af324da354ebac9af4c17fde8dd7d4f5 | PHP | gleidsonrobert/SGRI | /Produto/Codigo/model/DataEvento.php | ISO-8859-1 | 1,383 | 3.296875 | 3 | [] | no_license | <?php
/*
* Finalidade: Instanciar datas de evento do sistema
* Autor: Rmulo de Oliveira Jorge
* Data: 13/05/2012
*/
class DataEvento
{
/* Propriedades */
private $idData;
private $dataEvento;
private $idReserva;
/*
* Funo: Definir ID para instncia da data do evento
* Parmetros
* $idData... | true |
8e314969953c66b120f89ec75c1fa69ba5cf8dbb | PHP | realizer12/SellingUsedItemApp-Server | /account/check_user_info/duplicate_check_nickname.php | UTF-8 | 1,069 | 2.796875 | 3 | [] | no_license | <?php
//회원가입 할때 닉네임 중복 체크를 위한 서버 코드이다
//PDO db 연결 파일
include('../../DbConnection/dbcon.php');
//요청된 닉네임
$request_nickname=$_GET['nickname'];
//mmber_info에서 client에서 받아온 nick_name을 조회 한다
$query="SELECT COUNT(*) FROM member_info WHERE nickname=:nick_name";
//중복 체크 하기 위한 select 쿼리문 prepare
$select_nickname_check... | true |
1a752fdd607e742087047045aed44c522aa5153b | PHP | james-ransom/mysql-to-google-bigquery | /vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Functional/Connection/BackwardCompatibility/Statement.php | UTF-8 | 3,642 | 2.84375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Doctrine\Tests\DBAL\Functional\Connection\BackwardCompatibility;
use Doctrine\DBAL\Driver\ResultStatement;
use Doctrine\DBAL\Driver\Statement as DriverStatement;
use Doctrine\DBAL\Driver\StatementIterator;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Statement as BaseStatement;
use PDO;
use fun... | true |
6e23c75dc08f5d0373ace6a33af77561d5f5476b | PHP | PeeHaa/migres | /src/Cli/Flag.php | UTF-8 | 879 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace PeeHaa\Migres\Cli;
use League\CLImate\CLImate;
final class Flag
{
private CLImate $climate;
private string $flag;
private string $text;
private ?string $extraText;
public function __construct(CLImate $climate, string $flag, string $text, ?string $extra... | true |
2f594f9bfd9494a54c7bcc6ca9c9d4b75831debd | PHP | jvlcode/codeigniter3-unit-testing | /application/controllers/Home.php | UTF-8 | 676 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class Home extends CI_Controller{
public function __construct()
{
parent::__construct();
}
public function index(){
$this->load->library('unit_test');
//START
$this->unit->active(TRUE);
$result = $this->login("logesh","12345");
$expected_result = true;
$test_name = "Logi... | true |
60615eadaa591d6f8012967c81c0237e958c0805 | PHP | ljacqu/webSIP | /tools/Data_view.php | UTF-8 | 6,821 | 2.640625 | 3 | [] | no_license | <style type="text/css">
body { font-family: Verdana; font-size: 10pt; }
</style>
<?php
if(isset($_GET['txt'])){
if(!isset($_GET['file'])){
#######
echo '<h1>TXT Files</h1>
» <a href="?">Main</a>';
$dir = getcwd();
$files = $size = array();
$count = 0;
// Open a known directory, and proceed to read its contents... | true |
8cec4145cb760682e916e938258fceccf72b1673 | PHP | calibr/dc | /scripts/default_csv_to_json.php | UTF-8 | 980 | 2.828125 | 3 | [] | no_license | <?php
$finput = fopen(__DIR__.'/dishes.csv', 'r');
$head = fgetcsv($finput);
function mb_ucfirst($string, $encoding) {
$strlen = mb_strlen($string, $encoding);
$firstChar = mb_substr($string, 0, 1, $encoding);
$then = mb_substr($string, 1, $strlen - 1, $encoding);
return mb_strtoupper($firstChar, $encoding) ... | true |
3dadd23d122a54a23f6f38d1e26f42253f159acf | PHP | ayumutiarasari98/sim_beasiswa | /application/views/mahasiswa/form.php | UTF-8 | 7,628 | 2.734375 | 3 | [] | no_license | <html>
<head>
<title>Form Import</title>
<!-- Load File jquery.min.js yang ada difolder js -->
<script src="<?php echo base_url(); ?>assets/bower_components/jquery/dist/jquery.min.js"></script>
<script>
$(document).ready(function(){
// Sembunyikan alert validasi kosong
$("#kosong").hide();
});... | true |
65ac0cec7c872f6ca0dee312479b92ad288b0f6c | PHP | schimpy/EnglishQuest | /functions/checkpassword.php | UTF-8 | 382 | 2.8125 | 3 | [] | no_license | <?php
// Include INIT file
require_once '../init.php';
// Create a user instance
$user = new User();
if(isset($_POST['verify_password']))
{
$pwdOld=$_POST['verify_password'];
if($user->doesPasswordMatch($pwdOld) == true) {
echo "OK";
} else {
... | true |
f3139850f10cc780ac5cd6834e1308283cb8c182 | PHP | spikkl/spikkl-php-client | /src/CompatibilityChecker.php | UTF-8 | 1,692 | 2.953125 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | <?php
namespace Spikkl\Api;
use Spikkl\Api\Exceptions\ApiException;
use Spikkl\Api\Exceptions\IncompatiblePlatformException;
class CompatibilityChecker
{
const MIN_PHP_VERSION = '7.2.0';
/**
* Check whether the platform meets the PHP requirements
* and has the JSON extension enabled.
*
*... | true |
fbdcd40dde0a09f5d153effc998084fbb289ad46 | PHP | edzima/VestraTele | /backend/modules/settlement/models/CalculationProblemStatusForm.php | UTF-8 | 1,285 | 2.578125 | 3 | [] | permissive | <?php
namespace backend\modules\settlement\models;
use common\models\issue\IssuePay;
use common\models\issue\IssuePayCalculation;
use yii\base\InvalidConfigException;
use yii\base\Model;
class CalculationProblemStatusForm extends Model {
public ?int $status = null;
private IssuePayCalculation $model;
public fu... | true |
28333c99689e8e65da0eac599d75e9bc90638d0f | PHP | zamanwebdeveloper/UFProjectHMS | /app/Console/Commands/WardBed.php | UTF-8 | 2,213 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use DateTime;
use Carbon\Carbon;
use App\Models\Patient;
use Auth;
class WardBed extends Command
{
protected $signature = 'ward:bed';
protected $description = 'Ward Bed Charge add';
public function __construct()
{
paren... | true |
9dd83a51e54c3ed140e9f0e52be13fdfbcbb14c7 | PHP | SCGDtecnologiasWeb/ritmicaLaMojonera | /html/modificar_noticia.php | UTF-8 | 11,335 | 2.671875 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION["logged_in"]) || $_SESSION["logged_in"] !== true || $_SESSION["tipo_usuario"] !== "administrador") {
header("location: /html/login.php");
exit;
}
?>
<?php
$titulo = "";
$fecha = "";
$desc = "";
$cuerpo = "";
$img_err = "";
$title_err = "";
$date_err = "";
$desc_err = "... | true |
4917c925a4276798c79510ac1fc6e749e9c9966b | PHP | Dragon-R/catcoinweb | /usuarios.php | UTF-8 | 1,115 | 2.59375 | 3 | [] | no_license | <?php
include("models/bd.php");
$sentenciaSQL= $conexion->prepare("SELECT * FROM usuarios");
$sentenciaSQL->execute();
$listaUsuario=$sentenciaSQL->fetchAll(PDO::FETCH_ASSOC);
?>
<?php include("template/cabecera.php"); ?>
<div id="usuarios" class="container">
<div class="row">
<div class="c... | true |
4aaeb0f70dc1eb0ce8a7be6be39be5d0d832d42f | PHP | corefactor/Instant-PHP-API | /includes/cache_handler.php | UTF-8 | 900 | 3.0625 | 3 | [] | no_license | <?php
Class CacheHandler {
private $__cache_folder = null;
private $__conf = array('duration' => '5 minutes');
public function constructor($cache_folder, $conf = null) {
$this->__cache_folder = $cache_folder;
$this->__conf = array_merge($this->__conf, $conf);
}
private function __getFileNam... | true |