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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
539d59a0c68473db60d376fa50acb49d81b747dc | PHP | Robinsoncarrasquero/vision360 | /app/Http/Controllers/EmailController.php | UTF-8 | 1,760 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Evaluador;
use Illuminate\Support\Facades\Mail;
use App\Mail\EmergencyCallReceived;
use Illuminate\Http\Request;
class EmailController extends Controller
{
//
public function contact(Request $request)
{
dd($request->all());
$subject = "Asun... | true |
afb67dcd59ca46049c6e15024cebb577e33dc9ae | PHP | phossa/phossa-query | /tests/src/Phossa/Query/InsertTest.php | UTF-8 | 4,167 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Phossa\Query;
use Phossa\Query\Builder;
/**
* Insert test case.
*/
class InsertTest extends \PHPUnit_Framework_TestCase
{
/**
* builder object
*
* @var Builder
* @access protected
*/
protected $builder;
/**
* beautiful settings
*
* @var arra... | true |
22bb6a0d9febded95400a4d66020c8fe3cebb88a | PHP | ldjbenben/document | /code/1/classes/bdocument/comment/sentence/NamespaceSentence.php | UTF-8 | 311 | 2.71875 | 3 | [] | no_license | <?php
namespace bdocument\comment\sentence;
class NamespaceSentence extends Sentence
{
public function scan($line)
{
$keywords = 'namespace ';
if(($pos = strpos($line, $keywords)) === 0)
{
$this->_owner->namespace = rtrim(trim(substr($line, strlen($keywords))), ';');
return self::DONE;
}
}
} | true |
ecee0c99ee18dbbcb0a6e5764d152c0f93602b07 | PHP | ceciGomez/grupo88 | /listaContacto.php | UTF-8 | 2,609 | 2.609375 | 3 | [] | no_license | <?php
require('fpdf.php');
require('conexionRepor.php');
$usuarioQuery = "select u.nombre, u.apellido
from usuarios u
where u.idUsuario = '".$_GET['idUsuario']."'
";
$usuario = mysqli_query($conexion,$usuarioQuery);
$nomyap = mysqli_fetch_assoc($usuario);
$nomyap = $nom... | true |
23e37d83fabb1512a69244c710fb418afff2307c | PHP | majareq/angular-laravel-vm | /server/routes/console.php | UTF-8 | 697 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based... | true |
c1b6166fa3dae4c24c00747364bb0f0745eeaf82 | PHP | bren2000/trovequery | /handlers/trovequery_handler_filter_include_string.inc | UTF-8 | 1,931 | 2.703125 | 3 | [] | no_license | <?php
/**
* @file
* Views field handler for basic Trove Query fields.
*/
class TrovequeryHandlerFilterIncludeString extends views_handler_filter_string {
/**
* Called to add the field to a query.
*/
public function query() {
$this->field_alias = $this->real_field;
if (isset($this->value, $this->d... | true |
c89ca567b329de3f3a32d7155d54721ab970c1c4 | PHP | mvaliolahi/seequest | /src/Validators/Max.php | UTF-8 | 748 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: m.valiolahi
* Date: 10/29/2017
* Time: 6:55 PM
*/
namespace Mvaliolahi\SeeQuest\Validators;
use Mvaliolahi\SeeQuest\Contracts\Validator;
/**
* Class Max
* @package Mvaliolahi\SeeQuest\Validators
*/
class Max extends Validator
{
/**
* @var string
*/
... | true |
e4c62fc58fe276309f4aa9e0928eb860460f4a12 | PHP | gammabeam82/schema-checker | /src/SchemaChecker.php | UTF-8 | 7,396 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Gammabeam82\SchemaChecker;
use Gammabeam82\SchemaChecker\Exception\InvalidSchemaException;
use InvalidArgumentException;
use LogicException;
/**
* Class SchemaChecker
* @package Gammabeam82\SchemaChecker
*/
class SchemaChecker
{
/**
* @var string[]
*/
pr... | true |
0f4da8d1e713351d7027d5fef0cefcf4aae0426c | PHP | jojeringnax/traveltip | /app/PointInRoute.php | UTF-8 | 461 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* Class PointInRoute
* @package App
*
* @property integer $route_id
* @property integer $point_id
* @property integer $point_number
*
*/
class PointInRoute extends Model
{
/**
* @var string
*/
protected $table = 'points_in_rou... | true |
93ec56364e384e964f50695fec755b4fe499cc89 | PHP | tarasMatskovich/house-application | /app/request/middlewares/auth/factory/AuthenticationMiddlewareFactoryInterface.php | UTF-8 | 560 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: t.matskovich
* Date: 07.02.2020
* Time: 14:47
*/
namespace app\request\middlewares\auth\factory;
use app\request\middlewares\auth\AuthenticationMiddlewareInterface;
/**
* Interface AuthenticationMiddlewareFactoryInterface
* @package app\request\middlewares\auth\factor... | true |
6a1468ba57f60a606da51fbc5c77ccf7cb5df147 | PHP | maxflex/egecms | /app/Traits/HasCredentials.php | UTF-8 | 345 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
use App\Models\User;
trait HasCredentials
{
public function getCredentialsAttribute()
{
return User::whereId($this->user_id)->value('login') . ' в ' . date('d.m.y в H:i', strtotime($this->created_at));
}
public function user()
{
return $this->belongsTo... | true |
13ef2701c9d3e142d1965d7cee6cbfef7db9543e | PHP | JimmySennalabs/php_mini_project | /add_employ.php | UTF-8 | 1,980 | 2.734375 | 3 | [] | no_license | <?php include 'header.php' ?>
<pre><?php print_r($_POST) ?> </pre>
<?php
$mysqli = new mysqli('127.0.0.1', 'root', '', 'testphp');
if ($mysqli->connect_error) {
printf("can not connect databse %s\n", $mysqli->connect_error);
exit();
}
if (isset($_POST['submit'])) {
$e_name = $_POST['e_name'];
$e_lastname = ... | true |
9980d0eefc397fe982d3a62ba6bd493d4958b720 | PHP | sumedh0803/icecreamania | /getDistance.php | UTF-8 | 2,511 | 3.234375 | 3 | [] | no_license | <?php
/**
* @function getDistance()
* Calculates the distance between two address
*
* @params
* $addressFrom - Starting point
* $addressTo - End point
* $unit - Unit type
*
* @author CodexWorld
* @url https://www.codexworld.com
*
*/
function getDistance($addressFrom, $addressTo, $unit = ''){
// Google... | true |
ffa225e20402c36663ba293f0f19418f0c947879 | PHP | phoenixrhein/xt-lib-utils | /tests/Utils/StringUtilsTest.php | UTF-8 | 1,055 | 2.53125 | 3 | [] | no_license | <?php
namespace Tests\Unit\De\Xovatec\Utils;
use De\Xovatec\Utils\StringUtils;
use PHPUnit\Framework\TestCase;
/**
* Class StringUtilsTest.
*
* @author Bastian Hohmann <xt>
* @copyright xovatec // www.xovatec.de
*
* @covers \De\Xovatec\Utils\StringUtils
*/
class StringUtilsTest extends TestCase
{
public ... | true |
ddf3cce217c8d948529718c78c8b44ad856702e8 | PHP | cammino/magento-banners | /Block/Adminhtml/Banners/Renderer.php | UTF-8 | 2,247 | 2.5625 | 3 | [] | no_license | <?php
/**
* Renderer.php
*
* @category Cammino
* @package Cammino_Googlemerchant
* @author Cammino Digital <suporte@cammino.com.br>
* @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* @link https://github.com/cammino/magento-banners
*/
class Cammino_Banners_Block_Adminhtml_Bann... | true |
3b29c447eaa50cf1cf83181edebff712c32dac0c | PHP | jcanell4/iocLib | /translators/DW2html/DW2HtmlIgnored.php | UTF-8 | 300 | 2.75 | 3 | [] | no_license | <?php
require_once "DW2HtmlParser.php";
class DW2HtmlIgnored extends DW2HtmlInstruction {
public function open() {
$token = $this->currentToken;
return $token['raw'];
}
// Aquest element s'autotanca
public function isClosing($token) {
return false;
}
} | true |
3af5fe2e83e186b16c06a2021f0173a6aca0ba87 | PHP | dala00/endingroad-server | /app/Model/UsersItem.php | UTF-8 | 1,918 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
class UsersItem extends AppModel {
public function findForUser($user_id, $item_id = null) {
$find = array(
'conditions' => array(
'UsersItem.user_id' => $user_id,
),
'order' => 'UsersItem.item_id',
);
if ($item_id) {
$find['conditions']['UsersItem.item_id'] = $item_id;
}
return $this-... | true |
73f0f2ab4407ffb3aca29e5789a2173bd409fd09 | PHP | TheFirm/csv-handsontable | /trunk/phpapp/Helpers/General.php | UTF-8 | 1,612 | 2.890625 | 3 | [] | no_license | <?php
namespace Helpers;
use Humanity\Api;
class General {
//relative path to json config file
const VALIDATOR_CONFIG_FILE_PATH = '/../config/validator.json';
/**
* Returns config array or display missing config error
* @return string[] config array
*/
public static function loadConf... | true |
0d48c3ebe21fd78dd7f0dd15a0e28497fa9837a1 | PHP | Sywooch/other | /taozon.ru [PHP]/lib/Validation/Rules/NotEmptyNumber.php | UTF-8 | 319 | 2.796875 | 3 | [] | no_license | <?php
/**
* Правило NotEmptyNumber для валидатора.
**/
class NotEmptyNumber extends Number
{
protected $message;
public function test($value)
{
return !empty($value) && parent::test($value);
}
public function getMessage()
{
return $this->message;
}
}
| true |
bea30f5bf1512a7492762d03f74785f90159053e | PHP | jamancebo/devaway | /tests/Unit/KartCompetition/Competition/Domain/Entity/RaceTest.php | UTF-8 | 1,802 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace DevAway\Tests\Unit\KartCompetition\Competition\Domain\Entity;
use DevAway\KartCompetition\Competition\Domain\Entity\Race;
use DevAway\Tests\Mother\KartCompetition\Competition\Domain\ValueObject\IdMother;
use DevAway\Tests\Mother\KartCompetition\Competition\Domain\ValueObject\... | true |
8275bcc1f71d7c7bc55e33e7d1b47473ae283b8e | PHP | charan156/HealthMonitoringFramework-usingAnalyticModels | /breastcancerdataentry.php | UTF-8 | 7,654 | 2.65625 | 3 | [] | no_license | <?php require_once('Connections/hmsphp.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue ... | true |
04b4aad5c7d6ff2d7e2e35c0a771ff5c181722a5 | PHP | tayduivn/csjc | /backend/widgets/LinkPager.php | UTF-8 | 4,437 | 2.578125 | 3 | [] | no_license | <?php
/**
* @author: Nguyen Anh Dung
* Extend CLinkPage of Yii
* Set some default values for CLinkPager
* Add more buttons such as: dropdownlist paper..
*
* @date: 23/1/2015
* @version: 1.0
*/
namespace backend\widgets;
use common\utilities\UtilityUrl;
use yii\helpers\Html;
use yii\helpers\Url;
class LinkP... | true |
e96a71969ae7c1c59524f5f43b962eb5b3474a0a | PHP | aaronbullard/Litmus | /app/models/Palette.php | UTF-8 | 507 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
use Litmus\Exceptions\ValidationException;
class Palette extends AbstractModel{
protected $guarded = array();
protected $fillable = ['title', 'description'];
public static $rules = array(
'title' => 'required',
'description' => 'required',
'user_id' => 'required|exists:users,id'
);
public fu... | true |
4087d4794dd41dd7ad8c87a4846c78e2acad993a | PHP | dananjayarumesh/symphony_assignment | /src/Controller/CartController.php | UTF-8 | 7,952 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Bundle\FrameworkBundl... | true |
df4860f6b345d0bb85f3f0d6cec31a9d119d6612 | PHP | 2dq2t/FSMProject | /frontend/components/CartInfo.php | UTF-8 | 1,614 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: TuanThinh
* Date: 06/06/2015
* Time: 12:35 CH
*/
namespace frontend\components;
use common\models\Product;
use Yii;
class CartInfo
{
public function getCartInfo()
{
$product_cart = Yii::$app->session->get('product_cart');
$total_price = 0;
... | true |
d441477c192fdb1c9dd4141466d0c68bdbe70a89 | PHP | ManInTheBox/mojbend | /protected/commands/EmailCommand.php | UTF-8 | 3,859 | 3.125 | 3 | [] | no_license | <?php
/**
* Email command which you can use with Yii's `yiic` command
*
* Command will query database every 10 seconds for not sent emails.
* It will also check if email has reached max sending attempts.
* This avoids possibility of trying to sent email that for some reason cannot
* be sent. Emails are ordered b... | true |
b1a6b02d441c26074f9f31631ada41cef8e6c0e6 | PHP | dizys/ThinkWorker | /thinkworker/lib/think/View.php | UTF-8 | 6,388 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* ThinkWorker - THINK AND WORK FAST
* Copyright (c) 2017 http://thinkworker.cn All Rights Reserved.
* Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
* Author: Dizy <derzart@gmail.com>
*/
namespace think;
use think\view\Driver;
class View
{
/**
* @var Driver
*/
protected... | true |
73e7a938fd7a35bfa3781c96bc7dbddf6df5727a | PHP | FedeFranco/biblioteca | /models/Libro.php | UTF-8 | 982 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "libros".
*
* @property integer $id
* @property string $titulo
*
* @property Alquilan[] $alquilans
*/
class Libro extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
... | true |
36c76a53305b9842caf8add1fefc7b84a5fb2be0 | PHP | owenvoke/libraries | /tests/Num/CustomEquationTest.php | UTF-8 | 567 | 2.8125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Yetii\Tests\Num;
use PHPUnit\Framework\TestCase;
use YeTii\General\Num;
/**
* Class CustomEquationTest
*/
class CustomEquationTest extends TestCase
{
/**
* @var array
*/
public $testData = [
'modifier' => '√',
'arg' => 4
];
/**
* Test whether it r... | true |
8879678e565b86145402dea7fe21483b6a614d90 | PHP | gpawlik/suited-php-classes | /src/upload.php | UTF-8 | 12,303 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace diversen;
use diversen\lang;
use diversen\conf;
use diversen\log;
/**
* file with class for doing uploads and a couple of helper functions
*
* @package upload
*/
/**
* class for doing uploads
* @package upload
*/
class upload {
/**
* var for holding errors
* @var array ... | true |
17f463d7bf18f72d2f34bcaf8441110d40a1cb89 | PHP | tsumazarin/book-menu8 | /app/Http/Controllers/Shop/ShopListController.php | UTF-8 | 904 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Shop;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\Product;
class ShopListController extends Controller
{
//商品リスト
public function list(Request $request)
{
//ページング
if (isset($reques... | true |
a478a63d5bcb1dc9d39a1e113ee4aca4f196c4d0 | PHP | xBl4d3x/et | /library/Et/Session.php | UTF-8 | 3,922 | 2.59375 | 3 | [] | no_license | <?php
namespace Et;
class Session {
const DEFAULT_NAMESPACE = "__default__";
const NAMESPACE_KEY_PREFIX = "___NS_";
const METADATA_NAMESPACE = "___metadata___";
/**
* @var Session_Config
*/
protected static $session_config;
/**
* @var \Et\Session_Namespace[]
*/
protected static $namespaces = array();
... | true |
d43d676a0056b3cd765cfe176d6d15b95f2ed9d5 | PHP | gipplab/citrec_lre | /src/sciplore/FlowManagementBundle/Services/FlowManagementService.php | UTF-8 | 2,036 | 2.734375 | 3 | [] | no_license | <?php
namespace sciplore\FlowManagementBundle\Services;
use Symfony\Component\HttpFoundation\Session;
define('SESSION_KEY_REF_DOCS','ref_docs');
class FlowManagementService {
protected $session;
//private static $arrayCache = null;
public function __construct(Session $s)
{
$this->session = $s;
... | true |
96518d0787e6bf02447876b5fb0d5a3b26ba055c | PHP | zxlmaster/internet | /protected/common/CarouselUrlFunction.php | UTF-8 | 498 | 2.546875 | 3 | [] | no_license | <?php
/**
* 轮播Url生成器
* User: zbl
* Date: 15-3-27
* Time: 上午11:58
*/
class CarouselUrlFunction
{
public function Url($model)
{
$type = null;
$baseUrl = Yii::app()->request->baseUrl;
if($model)
$type = CommonFunction::videoType($model->mstv_type);
... | true |
60882f2dbf39fae911e41d9549df616d3e9202e0 | PHP | outlawdesigns-io/LOEServer | /Models/Music/Played.php | UTF-8 | 2,136 | 2.828125 | 3 | [] | no_license | <?php namespace LOE\Music;
require_once __DIR__ . '/../../Base.php';
require_once __DIR__ . '/Song.php';
class Played extends \LOE\Base{
const TABLE = 'PlayedSong';
public $UID;
public $songId;
public $ipAddress;
public $playDate;
public $userId;
public function __construct($UID = null){
parent::... | true |
6fa6eb2e8bd3cfcab25af03fe0ff18c74230d6a2 | PHP | jngouambe/Cours-En-Ligne | /Mes cours en ligne/Authentification.php | UTF-8 | 2,889 | 2.734375 | 3 | [] | no_license | <?php
session_start();
if(isset($_POST['Authentification']))
{
$Connexion= new PDO('mysql:host=127.0.0.1;dbname=MonCollege','root','');
if(mysqli_errno())
{
echo"Echec de connexion à la base de données:".mysqli_error();
}
$Nom_Utilisateur_conne... | true |
c7dd24bef46e049307b43c5e73af767a500c356f | PHP | GrimDerp/ludumdare | /core/internal/urlhash.php | UTF-8 | 1,081 | 2.90625 | 3 | [] | no_license | <?php
require_once __DIR__ . "/../external/hashids/HashGenerator.php";
require_once __DIR__ . "/../external/hashids/Hashids.php";
// NOTE: Consider *NOT* using Hashids for this, because protecting our IDs is not important.
// What's actually important is consistency. These URLs should never change.
// The ... | true |
f86347a41ae2661446639d6b9e456ba6a78fd6b4 | PHP | gn525/laravel | /app/helper/mailchimp/index.php | UTF-8 | 1,571 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
This Example shows how to Subscribe a New Member to a List using the MCAPI.php
class and do some basic error checking.
**/
require_once 'MailChimp.php';
$MailChimp = new MailChimp('55baf9365d11ca3ea7f0c5534d9f2962-us10');
#Geting List
/*$results = $MailChimp->call("lists/list");
echo "<pre>"; print_r($re... | true |
ebc343104bae9d4fab22dc95d2c01d7e4dd4b9a4 | PHP | tariqmth/skylink-sdk | /src/Customers/V2CustomerDeserializer.php | UTF-8 | 3,822 | 2.71875 | 3 | [] | no_license | <?php
namespace RetailExpress\SkyLink\Sdk\Customers;
use RetailExpress\SkyLink\Sdk\Customers\PriceGroups\PriceGroupKey;
use Sabre\Xml\Deserializer as XmlDeserializer;
use Sabre\Xml\Reader as XmlReader;
trait V2CustomerDeserializer
{
public static function xmlDeserialize(XmlReader $xmlReader)
{
$paylo... | true |
369077d864bc99283039d5585a114e7543ec4a90 | PHP | trishalewis99/Movie-Information-Management-System | /moviedetails.php | UTF-8 | 10,413 | 2.53125 | 3 | [] | no_license | <?php
require "header.php";
require "includes/dbh.inc.php";
?>
<main>
<div class="page-container">
<div class="thumbnail-full">
<?php
if (!isset($_GET['movieid'])) {
header("Location: index.php");
exit();
}
else {
$movie_id = $_G... | true |
3d2e7b5c0ebb8f52d118ea48755fb6615259aeb5 | PHP | vitorcunha17/connection-old-website | /application/models/empresa/Upload.php | UTF-8 | 1,407 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Upload extends CI_Model {
private $pasta_temporaria;
private $nome_temporario;
private $tamanho;
private $formato;
private $tamanho_maximo = 2147483648; //2GB
private $novo_nome;
private $erro = 'Verifique se o arquivo esta dentro das normas do sistema e tente novamente!';
private $aceitos = [... | true |
a3f7908aeeb034927dc021c398b2737b89771332 | PHP | tonixiclana/GestionClinica | /application/views/Especialista/AsignarEspecialista.php | UTF-8 | 626 | 2.703125 | 3 | [] | no_license | <?php
if($citas != NULL){
foreach ($citas as $row) {
echo '<ul class="list-group">';
echo '<li class="list-group-item">
<a onclick="asignarEspecialista('.$row->Id.')">
'.$row->NombreEspecialidad.' '.$row->FechaIni.'
'.$row->FechaFin.' '.$row->Dni.'... | true |
0b43a10ff6fc9a0d660559d62a113d310c8ae535 | PHP | martin-ritsberg-khk/pa_vs19_2 | /10.10.2019/vanus.php | UTF-8 | 270 | 2.859375 | 3 | [] | no_license | <?php
$vanus=4;
echo "Vanus on ".$vanus.". Seega ";
if ($vanus<0){
echo "pole inimest.";
} else if ($vanus<18) {
echo "on lats.";
} else if ($vanus<65) {
echo "on täiskasvanu.";
} else if ($vanus<125) {
echo "on vanake.";
} else {
echo "on tuhk.";
} | true |
d401fa817ae6e12cc0bb32e5719b5f4522ed3819 | PHP | VigneshPT/docker-akaunting | /assets/build/Akaunting_1.3.17-Stable/app/Transformers/Auth/User.php | UTF-8 | 1,119 | 2.578125 | 3 | [
"MIT",
"GPL-3.0-only"
] | permissive | <?php
namespace App\Transformers\Auth;
use App\Transformers\Company\Company;
use App\Models\Auth\User as Model;
use League\Fractal\TransformerAbstract;
class User extends TransformerAbstract
{
/**
* @var array
*/
protected $defaultIncludes = ['companies', 'roles'];
/**
* @param Model $mod... | true |
aab488944fd3a13428522ebb434c803abffd2652 | PHP | kmeigcasan/the_wall_bug | /codes/application/controllers/Wall.php | UTF-8 | 1,761 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Wall extends CI_Controller {
/* DOCU: This function is triggered by default to render the Wall page.
This loads all messages with comments from all users.
Owner: Karen
*/
public function index()
{
$u... | true |
03e59525c73b3209f5701e3c9efe51e2cf8b644a | PHP | NtimYeboah/laravel-queues | /app/Http/Middleware/AuthorizeActiveAccount.php | UTF-8 | 603 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use App\User;
class AuthorizeActiveAccount
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
... | true |
b9a5056578be5927afcc9cd603826a7486e66bbd | PHP | nick2102/lc-polls | /include/cpt/meta-boxes/class-lcpolls-question-metaboxes.php | UTF-8 | 4,072 | 2.546875 | 3 | [] | no_license | <?php
/**
* LcPolls_Question_Metaboxes
*
* Creating custom post types Metaboxes
*
* @version 1.0
* @author Nikola Nikoloski
*/
class LcPolls_Question_Metaboxes
{
private static $instance = null;
private static $metaboxSettings = [];
/**
* Returns a single instance of this class.
*/
... | true |
774fd1cd4c2ea68ab885bc0e23f1a2a989212bff | PHP | sandhya-rayaprolu/web | /PHP/admin/check_login.php | UTF-8 | 1,440 | 2.671875 | 3 | [] | no_license | <?php include("../mysql.php");
/**************************************************************************************************************
This file checks the validity of the username/password, it checks if the username is present in the staff table
It redirects to the login form again if the username/password is ... | true |
530744b99dda674707499951fdfbad6641a20a59 | PHP | kgrohit/CareCappital | /Password/passwordReset.php | UTF-8 | 2,101 | 2.609375 | 3 | [] | no_license | <?php
$id = $_POST['AccountID'];
$password1 = $_POST['password1'];
$password2 = $_POST['password2'];
if($pw1 != $pw2 ) {
echo "Passwords do not match.";
} else {
include '../init.php';
$user = $connection->query("SELECT * FROM UserMaster WHERE AccountID = '". $id. "'")->fetch();
$salt = $user['salt'];
$pw1 = $... | true |
7c6c65f22391dab4a97ec84891826c40714b053d | PHP | Kambaa/doctrineTest | /src/main/php/Example/Example11.php | UTF-8 | 2,834 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: yg
* Date: 3/28/17
* Time: 4:51 PM
*/
namespace DoctrineTest\Example;
use DoctrineTest\entity\User;
use DoctrineTest\Util\DoctrineEntityManagerCreatorFactory;
/**
* Class ExampleTemplate
* Using QueryBuilder
* @package DoctrineTest\Example
*/
class Example11
{
p... | true |
6e49179bfb222d1952b526b9a82f9bab5de64515 | PHP | cmigayi/zapi-retail-php | /web/app/middlewares/AddBusinessCredit.php | UTF-8 | 536 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Middlewares;
/**
* @author: Cecil Migayi
* @email: migayicecil@gmail.com
* @copyright: zapi, 2018
*
* Create/add new businessCredit
*/
use App\Repositories\Contracts\BusinessCreditRepositoryInterface;
use App\Data\BusinessCredit;
class AddBusinessCredit{
private $repo;
public ... | true |
2b29d15c622b2203cf23f55246bb8513232a02cd | PHP | microsimulation/ijm | /journal/src/Patterns/ViewModel/Date.php | UTF-8 | 1,273 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Microsimulation\Journal\Patterns\ViewModel;
use DateTimeImmutable;
use Microsimulation\Journal\Patterns\ArrayAccessFromProperties;
use Microsimulation\Journal\Patterns\ArrayFromProperties;
use Microsimulation\Journal\Patterns\ViewModel;
final class Date implements ViewModel
{
use ArrayAccessFromP... | true |
84e37bbba3180d5a528b299d6327be5f01d41ee0 | PHP | elastic/swagger-codegen | /samples/server/petstore/ze-ph/src/App/DTO/MixedPropertiesAndAdditionalPropertiesClass.php | UTF-8 | 822 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\DTO;
use Articus\DataTransfer\Annotation as DTA;
/**
*/
class MixedPropertiesAndAdditionalPropertiesClass
{
/**
* @DTA\Data(field="uuid", nullable=true)
* @DTA\Validator(name="Type", options={"type":"string"})
* @var string
*/
public $uuid;
/**
* @DTA\Data(f... | true |
b6e433f77394ce99c4fddbddbcb6c0e91927c575 | PHP | jaifiresong/third-party | /tests/Feeds/Utils/Curl.php | UTF-8 | 2,054 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Test\Feeds\Utils;
class Curl
{
/**
* post请求
*/
public static function post($url, $data, $timeout = 15)
{
$curl = curl_init(); // 启动一个CURL会话
curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); // 设置超时限制防止死循环
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); //如果没有这... | true |
c184cc39ba6063bbcbda26158fdc9666f28918b9 | PHP | sschlein/slimdump | /src/Webfactory/Slimdump/Database/Dumper.php | UTF-8 | 9,273 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Webfactory\Slimdump\Database;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver\PDOConnection;
use PDO;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
use ... | true |
fa71d1421e1ca79c3e92f97d9b40713b3b5fec1b | PHP | charlottedrb/instimac | /api/commentaire/get-by-publication.php | UTF-8 | 911 | 2.53125 | 3 | [] | no_license | <?php
require_once '../../src/includes-api.php';
use Commentaire\Commentaire;
use Sanitize\Sanitize;
header('Content-Type: application/json; charset=UTF-8');
// Check if params are sended
if (Sanitize::checkEmptyFields($_GET, ['publication-id'])) {
$secured = Sanitize::arrayFields($_GET, ['publication-id']);
... | true |
62481d382eedf4fe0de99767157df09b6a31be2a | PHP | ameymhadgut/OnlineBankingSystem | /form.php | UTF-8 | 11,161 | 2.859375 | 3 | [] | no_license | <html>
<head>
<link rel="stylesheet" type="text/css" href="form.css">
</head>
<body>
<!-- Q29weXJpZ2h0IDIwMTUgYnkgQW1leSBNaGFkZ3V0 -->
<?php
// define variables and set to empty values
$fname =$mname =$lname = $age= $gender = $address = $city =$pincode =$answer =$username =$questions = $email= $password1 =$password... | true |
d3a963321b53d57744aedff3a36f947f547f84bc | PHP | Deuneuv/TP_PHP | /tpPHP/debutpage.php | WINDOWS-1250 | 750 | 2.6875 | 3 | [] | no_license | <?php
# ceci est une page standard pour obtenir une page XHTML Strict avec php
error_reporting(E_ALL | E_NOTICE | E_STRICT ) ;
$titre = "" ; # complter le titre de la page ici
echo "<?xml version='1.0' encoding='ISO-8859-1' ?>\n" ;
echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR... | true |
5ff2ab3f66677344b11b0328daa93240dc7e0113 | PHP | ludwig123/documentmaker | /application/maker/model/TempletMetaLabel.php | UTF-8 | 2,175 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\maker\model;
use think\Model;
class TempletMetaLabel extends Model
{
public static function add($dataArr)
{
$model = new TempletMetaLabel();
$model->templet_meta_catalog = empty($dataArr['templet_meta_catalog']) ? NULL : $dataArr['templet_meta_catalog'];
$model->te... | true |
947d0bb1fed7f010deb45a50fbb7352ef6f8edfa | PHP | Francky69/kilatrou | /vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/SchemaValidatorTest.php | UTF-8 | 1,431 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Doctrine\Tests\ORM\Functional;
use Doctrine\ORM\Tools\SchemaValidator;
/**
* Test the validity of all modelsets
*
* @group DDC-1601
*/
class SchemaValidatorTest extends \Doctrine\Tests\OrmFunctionalTestCase
{
static public function dataValidateModelSets()
{
$modelSe... | true |
2aa833c95207ed3896974392cf883244546b2a67 | PHP | devallama/php-store-uni | /php/search_products.php | UTF-8 | 964 | 2.5625 | 3 | [] | no_license | <?php
require('./classes/auth.php');
require('./classes/db.php');
require('./classes/form_validator.php');
$database = new database();
$validator = new formValidator();
$response = [];
$form_data = [
'search_term' => [
'name' => 'Search Term',
'data' => isset($_GET['searchterm']) ? $_GET['searcht... | true |
da4b122203f23dd15302737f3a0235c131b2d089 | PHP | monthly-basis/business | /src/Model/Service/Task/IncrementViews.php | UTF-8 | 707 | 2.671875 | 3 | [] | no_license | <?php
namespace MonthlyBasis\Business\Model\Service\Task;
use MonthlyBasis\Business\Model\Entity as BusinessEntity;
use MonthlyBasis\Business\Model\Table as BusinessTable;
class IncrementViews
{
/**
* Construct.
*
* @param BusinessTable\Task $taskTable
*/
public function __construct(
... | true |
1a404fd34b195ef19f28102e04d499dd8a2cfb03 | PHP | Ahmedtgd/trunk2 | /database/migrations/2015_10_10_091555_create_social_media_table.php | UTF-8 | 806 | 2.65625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSocialMediaTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
/* This a table to record all the social media a merchant employs
* to market his busines... | true |
839e1077f61d76a024274729a2abd6dc200347b5 | PHP | Nemzag/2018-06-04_-_1360_-_Scripts-Serveurs_-_Examen_de_evaluation_PHP_-_etudiant_Gaz-men_Arifi | /lib/db.php | UTF-8 | 355 | 2.796875 | 3 | [] | no_license | <?php
// Créez une fonction de connexion (db)
function db()
{
try
{
$dbh = new PDO('mysql:dbname=2018_06_07_evaluation;host=localhost;charset=utf8', 'root', '');
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch (Exception $e)
{
die('Error : '.$e->getMes... | true |
c7dfa885dac0667751fa40f1ff640bba2127a1a2 | PHP | Iverine/test | /test2.php | UTF-8 | 254 | 3.40625 | 3 | [] | no_license | <?php
function testfunktion()
{
echo "das ist das innere";
}
function testaddieren($i1, $i2)
{
$ergebnis = $i1 + $i2;
return $ergebnis;
}
echo "Funktionstest";
echo testfunktion();
echo "Ergebnis:";
echo testaddieren(4,4);
echo "<br><br>Fertig";
?> | true |
ceb4fd3d3367e14144a7e4767135586c4842796b | PHP | leslieT4/TeachingSys | /192001TeachingSys/admin/stu/stuExImport.php | UTF-8 | 1,845 | 2.578125 | 3 | [] | no_license | <?php
include "../../inc/log/check2.php"
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
require "../../vendor/autoload.php";
use PhpOffice\PhpSpreadsheet\IOFacto... | true |
b3ea99a5ad033582b26edb5f00d45c8a1a594ee9 | PHP | solariumphp/solarium | /examples/2.1.5.11-debug.php | UTF-8 | 2,505 | 2.5625 | 3 | [
"BSD-2-Clause-Views"
] | permissive | <?php
require_once(__DIR__.'/init.php');
htmlHeader();
// create a client instance
$client = new Solarium\Client($adapter, $eventDispatcher, $config);
// get a select query instance
$query = $client->createSelect();
$query->setQuery('ipod');
// add debug settings
$debug = $query->getDebug();
$debug->setExplainOther... | true |
6e1c0bcaf627c0bf844253c7a9dd9408b81f9306 | PHP | akincemtutal9/ffahotel | /selectroom.php | UTF-8 | 3,272 | 2.59375 | 3 | [] | no_license | <?php require 'headers/header.php'?>
<?php
include "dbconnect.php";
if($_SERVER["REQUEST_METHOD"] == "POST") {
$checkindate = $_POST["checkindate"];
$checkoutdate = $_POST["checkoutdate"];
$roomtype = $_POST["roomtype"];
$numberofpersons = $_POST["numberofpersons"];
$r... | true |
831fea7eb0e700476345225c8a13ab32c0dd5cc3 | PHP | vnSoft/vnEngine | /system/modules/sorter/interface/SorterInterfaceSorter.php | UTF-8 | 1,088 | 2.859375 | 3 | [] | no_license | <?php defined('DOCROOT') OR die('Brak bezpośredniego dostępu do pliku!');
class SorterInterfaceSorter {
function create($sSorterName) {
$sorter = null;
$sorterModel = new SorterModelSorter();
$sorter = $sorterModel->create($sSorterName);
return $sorter;
}
function exists... | true |
b198bc1d059a676573c9e65ff5385fae9c339d72 | PHP | raphael-volt/kermit | /www/src/services/AuthService.php | UTF-8 | 1,339 | 2.875 | 3 | [] | no_license | <?php
namespace src\services;
use src\vo\User;
use src\vo\ApiKey;
class AuthService
{
const KEY_LENGTH = 8;
/**
*
* @var AuthService
*/
private static $_instance;
/**
*
* @return \src\services\AuthService
*/
static function instance()
{
if (! self::$_in... | true |
13a561ab65af7337c33afab383ec2d8dfaef7cb1 | PHP | Mukemo/test | /app/Http/Controllers/ProgrammeController.php | UTF-8 | 1,416 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Programme;
use App\Activite;
use App\Intervenant;
class ProgrammeController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
$programmes = Programme::... | true |
1f574c35833bdfa6bc89e52e06f0cf9ae04e9606 | PHP | ryota2601/ToDoList | /toppage.php | UTF-8 | 7,526 | 2.59375 | 3 | [] | no_license | <?php
$pdo = new PDO("sqlite:ToDoList.sqlite");
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
$st = $pdo->query('SELECT content FROM scadule WHERE hiduke = "2021-01-01";');
$data = $st->fetchAll();
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="w... | true |
cfb48f7c8ea965407f7bba1e4b93d45211e6fa59 | PHP | magnofaustino/sisfit_facol | /class_empresa.php | UTF-8 | 2,330 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
class Empresa{
public $razao;
public $nome_fantasia;
public $tipo;
public $cpf_cnpj;
public $insc_estadual;
public $insc_municipal;
public $telefone;
public $email;
public $endereco;
public $complemento;
public $bairro;
public $municipio;
public $numero;
public $cep;
public $estado;
... | true |
581880a0e6b0921313a2b59142d590fe6a775580 | PHP | rohith-001/My_task | /pages/edit_task.php | UTF-8 | 2,911 | 2.796875 | 3 | [] | no_license | <?php
if($_POST['submit']){
$task_id = $_GET['id'];
$task_name = $_POST['task_name'];
$task_body = $_POST['task_body'];
$due_date = $_POST['due_date'];
$list_id = $_POST['list_id'];
$is_complete = $_POST['is_complete'];
//Instantiate Database object
$database = new Database;
$databa... | true |
a6cd1d143489311373d9beec3a5272d40e7f363e | PHP | linux815/bcms | /bcms/classes/Database/NewsModel.php | UTF-8 | 3,603 | 2.78125 | 3 | [] | no_license | <?php namespace bcms\classes\Database;
use \PDO;
use \PDOException;
require($_SERVER['DOCUMENT_ROOT'].'/bcms/classes/Config/Config.php');
class NewsModel
{
public function __construct()
{
}
public function selectNewsId($id)
{
try {
$dbh = new PDO("... | true |
50e0f8a19cc0eec95603fa3a8a3eb2d6066ad6ed | PHP | Eilem/1-2-3-Testando-4 | /ProjetoTeste/Core/Model/Business/ItemDeTeste.php | UTF-8 | 1,453 | 2.515625 | 3 | [] | no_license | <?php
/**
* @package ProjetoTeste\Core\Model\Business
*/
namespace ProjetoTeste\Core\Model\Business;
use ProjetoTeste\Core\Model\Business\CasoDeTeste as CasoDeTeste,
\Doctrine\Common\Collections\ArrayCollection;
/**
* @Entity
* @Table(name="item_de_teste")
*/
Class CasoDeTeste{
/**
* Identific... | true |
685951b1109442781bef3142d19a8ddcd8c62c7b | PHP | avshatalov48/bitrix24-core-corp | /modules/tasks/lib/rest/controllers/task/view.php | UTF-8 | 1,636 | 2.53125 | 3 | [] | no_license | <?php
namespace Bitrix\Tasks\Rest\Controllers\Task;
use Bitrix\Main\ArgumentException;
use Bitrix\Main\Engine\AutoWire\ExactParameter;
use Bitrix\Main\Engine\AutoWire\Parameter;
use Bitrix\Main\Engine\CurrentUser;
use Bitrix\Main\LoaderException;
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\ObjectPropertyExceptio... | true |
dd47f99e1f9f6ff34504a5aa5bef0fad688e8ec0 | PHP | kgust/php-benchmark | /benchmark.php | UTF-8 | 1,472 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
/**
* From: https://stackoverflow.com/questions/18144782/performance-of-foreach-array-map-with-lambda-and-array-map-with-static-function#26527704
* Original Author: FGM
*/
function lap($func) {
$t0 = microtime(1);
$numbers = range(0, 1000000);
$ret = $func($numbers);
$t1 = microtime(1);
re... | true |
c477f35cf3178cc93be769885efdda5174746e2a | PHP | maehata-syouki/cocospace-internship | /課題2/kadai2-15/BoardDB.php | UTF-8 | 3,041 | 3.421875 | 3 | [] | no_license | <?php
class BoardDB{
//接続パラメータとPDOインスタンス
const USER = 'co-655.it.3919.c';
const PASSWORD = 'm8HbkigHk7';
const DSN = "mysql:dbname=co_655_it_3919_com;host=localhost;charset=utf8";
private $pdo;
function __construct(){
$dsn = self::DSN;
$user = self::USER;
$password = self::PASSWORD;
try{
... | true |
5d8d4841b7be9b2e7aeaa4ba6adf52d0d1a26eb2 | PHP | hawkore/ignite-hk | /modules/platforms/php/src/Apache/Ignite/Type/CollectionObjectType.php | UTF-8 | 4,711 | 2.796875 | 3 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-gutenberg-2020",
"CC0-1.0"
] | permissive | <?php
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); yo... | true |
caaf1b1df090e05bfd671cd44b31210a5c2b86c7 | PHP | gaboarp2020/billeteraMovil | /Controllers/send.php | UTF-8 | 2,088 | 2.609375 | 3 | [] | no_license | <?php
if (isset($_POST['sendFund'])) {
$receiver = mysqli_real_escape_string($db, $_POST['fk_receiver']);
$amount = mysqli_real_escape_string($db, $_POST['amount']);
$username = $_SESSION['username'];
// Chequeo de la base de datos
$user_checkBalance_query = "SELECT * FR... | true |
e93d5fe4c4d0bb4da98a73636f998728dcd62b19 | PHP | harbuzniak/trackmage-wordpress-plugin | /src/Synchronization/ArrayAccessDecorator.php | UTF-8 | 823 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace TrackMage\WordPress\Synchronization;
class ArrayAccessDecorator implements \ArrayAccess
{
const SETTER = 'set_';
const GETTER = 'get_';
private $object;
private $position;
public function __construct($object)
{
$this->object = $object;
$this->position = 0;
... | true |
d3e8d9cb839c17e34f7a958721c5cfb1c45f2970 | PHP | arievala/Trajes-orquidea | /login.php | UTF-8 | 1,904 | 2.59375 | 3 | [] | no_license | <?php
include_once('modelo/Usuario.php');
session_start();
$sErr = "";
$usuario = new Usuario();
if (isset($_POST["contraseña"]) && !empty($_POST["contraseña"]) &&
isset($_POST["correo"]) && !empty($_POST["correo"])){
$correo = $_POST["correo"];
$contraseña = $_POST["con... | true |
aa6a558c0e2f92eb597ccd9f5df89de75a3df5ea | PHP | Myced/glotelho_wp_plugin | /classes/Reports/Managers/ChristianManager.php | UTF-8 | 6,817 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Reports\Managers;
use App\Reports\OrderStatus;
use App\Traits\WooCommerceOrderQuery;
class ChristianManager
{
use WooCommerceOrderQuery;
public $wpdb;
private $start_date;
private $end_date;
private $post_date_field;
private $order_statuses;
function __construct(... | true |
d1d0e7b8ea80fdddab4235b2fef1d5aaeac20622 | PHP | sab-alex/routeman-laravel | /app/Services/Validators/CommentValidator.php | UTF-8 | 1,233 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Services\Validators;
class CommentValidator extends Validator
{
private $availableModels = [
'article' => 'App\Article'
];
public function getRules()
{
return[
'model' => 'required|in:'.implode(',', array_keys($this->availableModels)),
'id' =>'re... | true |
661b09aeaab43f98e03a216e22e20987735d13fb | PHP | jpoffline/rota | /src/php/lib/utils/str_to_rgb.php | UTF-8 | 373 | 2.671875 | 3 | [] | no_license | <?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
FILENAME: str_to_rgb.php
CREATED: 2018/11/17
AUTHOR: JPEARSON
* * * * * * * * * * * * * * * * * * * * * * * * * * */
function str_to_rgb($id, $opacity = 0.5){
$hex = '#'.substr(md5($id), 0, 6);
list($r, $g, $b) = sscanf($hex, "#%02x%02x%02x");
ret... | true |
f68d4dbb101c69dbb55f8f5348c2d83758b3143c | PHP | cummimgs606/Recruiter-App-1 | /core/library/display/display-country-office.php | UTF-8 | 690 | 2.765625 | 3 | [] | no_license | <?php
ini_set('display_errors', 'On');
class DisplayCountryOffice{
public static function asDropDown($country, $disabled = '', $selectID = ''){
if(!empty($country)){
echo '<select name="officeCountryID'.$selectID.'" style="width:25%" '.$disabled.'>';
echo'<option value="0">None</option>';
f... | true |
4bdd46dcd76017b5e9508c839a10aa6e00f534e2 | PHP | Elmissa/sbds | /update-profile.php | UTF-8 | 2,277 | 2.734375 | 3 | [] | no_license | <?php
session_start();
?>
<html lang="es">
<head>
<title>Actualización datos</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="css/style-bootstrap.css">
<link rel="stylesheet" href... | true |
59dfe4b3d206d653dcd421842463a8b301de44ca | PHP | suthio/mining-pool | /server/utilities/HashRates.php | UTF-8 | 1,179 | 3.390625 | 3 | [] | no_license | <?php
namespace Utilities;
class HashRates {
public static function Itoa($i)
{
$s = '';
if($i >= 1024*1024*1024)
$s = round(floatval($i)/1024/1024/1024, 1) ."G";
else if($i >= 1024*1024)
$s = round(floatval($i)/1024/1024, 1) ."M";
else if($i >= 1024)
... | true |
58a689dec65d990deb44c25af23b6ad2bd1ce607 | PHP | GKosh/blogMVC | /app/View/View.php | UTF-8 | 382 | 2.65625 | 3 | [] | no_license | <?php
class view
{
public $data = array();
public $model;
public function __construct(){
}
public function setLayout($layout = null){
if ($layout==null)$layout="default";
$path=view_PATH . DIRECTORY_SEPARATOR . "layouts" . DIRECTORY_SEPARATOR . $layout .".php";
if (file_exists($path)){
r... | true |
4ab2ec9a3730bbf008cd3f533d6db23e703acbac | PHP | markkimsal/hangin-with-php | /gen_inc/ClientBuildType.php | UTF-8 | 644 | 2.671875 | 3 | [] | no_license | <?php
/**
* Auto generated from hangouts.proto at 2017-02-10 13:29:52
*/
namespace {
/**
* ClientBuildType enum
*/
final class ClientBuildType
{
const BUILD_TYPE_UNKNOWN = 0;
const BUILD_TYPE_PRODUCTION_WEB = 1;
const BUILD_TYPE_PRODUCTION_APP = 3;
/**
* Returns defined enum values
*
... | true |
df12929dc852ff1f4f9c0188ff3a4b4bb0b0baa0 | PHP | PaulineGrn/PHP1Ex2 | /index.php | UTF-8 | 610 | 3.640625 | 4 | [] | no_license | <?php
//Déclaration des variables
$lastname='Gernigon';
$firstname='Pauline';
//Déclaration de la variable age avec 22 sans côte puisque c'est pas du texte
$age=22;
?>
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8"/>
<title>PHP1Ex2</title>
</head>
<body>
<!-- Déclaration d'ech... | true |
a6fa7cc7804d9b494ee03af3fd882bb830a2fca5 | PHP | sdk-team/aliyun-openapi-php-sdk | /aliyun-php-sdk-aas/Aas/Request/V20150701/CreateIntlAliyunAccountRequest.php | UTF-8 | 880 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Aas\Request\V20150701;
/**
* @deprecated Please use https://github.com/aliyun/openapi-sdk-php
*
* Request of CreateIntlAliyunAccount
*
* @method string getNationalityCode()
*/
class CreateIntlAliyunAccountRequest extends \RpcAcsRequest
{
/**
* @var string
*/
protected $method ... | true |
988a0409ac55193e12b06f0541b7dc717e1b84ef | PHP | michaeldyrynda/laracasts-saving-json-into-database | /tests/SitesTest.php | UTF-8 | 2,261 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\DatabaseMigrationRepository;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class CreateSiteTest extends TestCase
{
use DatabaseMigrations, DatabaseTransacti... | true |
010e972b4952e9ff390b58b88c781eb76f19d3e6 | PHP | ddobrokhvalov/parser_stat | /parser.class.php | UTF-8 | 4,899 | 2.8125 | 3 | [] | no_license | <?
class api_parser{
public $api_config;
public $data;
public $unique;
/**
*Конструктор класса
*/
function __construct($api_config){
$this->api_config = $api_config;
}
/**
*Инициализация
*Создание таблицы если она отсутствует
*/
public function init(){
$sql_fields = array();
foreach($this->api_conf... | true |
cf85a8bb790ad2461fb6d2959822a213df1048dd | PHP | rezarffahlevi/api-absensi | /app/Database/Migrations/2021-01-11-084105_siswa.php | UTF-8 | 812 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class Siswa extends Migration
{
public function up()
{
$this->forge->addField([
'nis' => [
'type' => 'VARCHAR',
'constraint' => 50,
],
'nama' => [
'type' => 'VARCHAR',
'constraint' => 250,
'null' =>... | true |
2d7f809e66a992766d14eac5baac7d78c35bffb1 | PHP | TypicalFence/slim-routing | /src/Mapping/Driver/MappingTrait.php | UTF-8 | 9,149 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* slim-routing (https://github.com/juliangut/slim-routing).
* Slim framework routing.
*
* @license BSD-3-Clause
* @link https://github.com/juliangut/slim-routing
* @author Julián Gutiérrez <juliangut@gmail.com>
*/
declare(strict_types=1);
namespace Jgut\Slim\Routing\Mapping\Driver;
use Jgut\Mapping\... | true |
22b32dc097f8a8ba769eb5efd89ac0e5ec0b2c03 | PHP | grospy/ProjectDatabase | /WEBSITE/website/include/index/Grades.php | UTF-8 | 1,788 | 2.546875 | 3 | [] | no_license | <div class="CSSTableGenerator" >
<table>
<tr>
<td>
Registration ID
</td>
<td>
Course ID
</td>
<td>
Description
</td>
<td>
Status
</td>
... | true |
af5384f6b7b59749c40fdac48119197c2eafe73e | PHP | adamcmoore/insurance-hub | /src/ApiClient.php | UTF-8 | 1,956 | 2.703125 | 3 | [] | no_license | <?php
namespace InsuranceHub;
use InsuranceHub\Exception\ApiException;
use InsuranceHub\Exception\ApiAuthenticationException;
use InsuranceHub\Exception\ApiValidationException;
class ApiClient
{
public $url;
public $certificatePath;
public function __construct($serviceURL, $caCertificatePath) {
... | true |
26f6e5343a3cee1369c647fcb1400c5f3ee0127d | PHP | Trsek/modbus | /objects.php | UTF-8 | 4,187 | 2.921875 | 3 | [] | no_license | <?php
define('DATEOFFSET1970', 946684800);
/********************************************************************
* @brief Rot hex to other endian
*/
function rotOrder($cut_str, $len)
{
$answer = "";
while( $len-- )
{
$answer .= substr($cut_str, 2*$len, 2);
$cut_str = substr($cut_str, 0, 2*$len);
}
return... | true |