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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
825f8b8a3cb1d7ac4478ab41fc035a582e148469 | PHP | GwenRiou/Projet-Roche-Riou | /Projet_Roche_Riou/app/model/ModelStock.php | UTF-8 | 8,493 | 2.953125 | 3 | [] | no_license |
<!-- ----- debut ModelStock -->
<?php
require_once 'Model.php';
class ModelStock {
private $centre_id, $vaccin_id, $quantite;
// pas possible d'avoir 2 constructeurs
public function __construct($centre_id = NULL, $vaccin_id = NULL, $quantite = NULL) {
// valeurs nulles si pas de passage de parametres
if (!is... | true |
d590c2be96e0738ecd195d7f0b44f61cee616c13 | PHP | r-cyr/PHPunctional | /P/Boolean.php | UTF-8 | 1,078 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
namespace P;
class Boolean {
public static $implementations = [];
private function __construct() {}
private function __clone() {}
public static function __callStatic($name, array $arguments)
{
if (!isset(self::$implementations[$name])) {
throw new \Exception("Function $name not found");
... | true |
530606cc25ec0259036b818d2733fba667d4bd71 | PHP | MESH-Research/hc-protect-uploads | /hc-protect-uploads.php | UTF-8 | 3,359 | 2.546875 | 3 | [] | no_license | <?php
/**
* Plugin Name: HC Protect Uploads
* Plugin URI: https://github.com/mlaa/hc-protect-uploads
* Description: Require authentication to access some uploaded files.
* Author: MLA
* Author URI: https://github.com/mlaa
* Text Domain: hc-protect-uploads
* Domain Path: /langua... | true |
6841fe301b15b47ce9660afb290e3dd6fd67d918 | PHP | vino0s/directolog-plus | /directologplus/getadstext.php | UTF-8 | 3,113 | 2.625 | 3 | [] | no_license | <?php
include("conf/start.php");
include("conf/session.php");
include("conf/phpQuery-onefile.php");
$sitemain = $_SERVER['HTTP_HOST'];
$url = $_SERVER['REQUEST_URI'];
$market = substr($url,1,strpos($url, '/', 1)-1); //это не нужно - все проекты в одном файле
$phrase = 'настроить директ';
$id_phrase = 1; //Временно ... | true |
93b50577d66388be78b4428a85aa036d1a26449b | PHP | renanliberato/checkers | /module/Application/src/Model/GameMatch.php | UTF-8 | 5,200 | 2.796875 | 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.
*/
namespace Application\Model;
/**
* Description of Match
*
* @author renan
*/
class GameMatch implements \JsonSerializable ... | true |
2ce30c1cd4fb63cbac20b70b642fb62387b0d4e9 | PHP | makmen/PHP | /patterns.local/behavior/strategy.php | UTF-8 | 1,022 | 3.390625 | 3 | [] | no_license | <?php
interface IStrategy {
public function algorithm();
}
class XSMLStrategy implements IStrategy {
public function algorithm() {
echo ('XSML Strategy<br />');
}
}
class HTMLStrategy implements IStrategy {
public function algorithm() {
echo... | true |
0e90fde12b43bc8d601e4189bfc02487cd46f966 | PHP | mrbanzai/jc-test-be | /application/models/Ats/Job.php | UTF-8 | 21,206 | 2.765625 | 3 | [] | no_license | <?php
class Ats_Job extends Skookum_Model
{
// if a job isnt pulled after two attempts, it bombed
const MAX_FAIL_ATTEMPTS = 2;
/**
* Retrieve all jobs that aren't closed or deleted.
*
* @access public
* @return array
*/
public function getAll()
{
$sql = sprintf('SELECT ats_jobs.*, theme.company... | true |
728bdd543d14ca91679f6310229eafe8c0224839 | PHP | hwalde/hx3-forum | /gensrc/PtIssueChange.php | UTF-8 | 3,510 | 2.671875 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* This file is part of HX3 Forum.
*
* (c) Herbert "Atomic" Walde <herbert.walde@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace generated;
use POOQ\ColumnField;
use POOQ\ColumnFieldList;
use POOQ\Tab... | true |
e7892c34e1c69d42f99d38d2d3d0a7f097320133 | PHP | techdivision/TechDivision_ApplicationServer | /src/TechDivision/ApplicationServer/Api/Node/EnvironmentVariablesNodeTrait.php | UTF-8 | 3,372 | 2.875 | 3 | [] | no_license | <?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @category Appserver
* @package TechDivision_ApplicationServer
* @subpackage ... | true |
cb2510309cb3cb602993e82bab41d8540d78c651 | PHP | eacevedof/prj_phptests | /vendor/theframework/components/google/component_sheets.php | UTF-8 | 2,214 | 2.953125 | 3 | [] | no_license | <?php
namespace TheFramework\Components\Google;
final class ComponentSheets
{
public function get_data(): array
{
// Configura los detalles de la solicitud de autenticación
$client_id = "your-client-id.apps.googleusercontent.com";
$client_secret = "your-client-secret";
$redirec... | true |
fbaf9bc970ccad43ee81d36fcce0cf3ec90f1cdf | PHP | FathimaAshika/assignment | /app/Http/Controllers/HomeController.php | UTF-8 | 3,734 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Role;
use App\RoleUser;
use App\Student;
use Carbon\Carbon;
use App\Parent1;
use App\ParentStudent;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public fun... | true |
46d9140f2f076c0d250100866f6bbe2d2315dc0b | PHP | technodelight/php-time-ago | /src/Technodelight/TimeAgo/Translation/DefaultRuleSet.php | UTF-8 | 1,238 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Technodelight\TimeAgo\Translation;
use Technodelight\TimeAgo\Translation\Formatter;
use Technodelight\TimeAgo\Translation\Rule;
use Technodelight\TimeAgo\Translation\RuleSet;
class DefaultRuleSet extends RuleSet
{
public function __construct()
{
$this->add(new Rule('lessThanAMinute', ... | true |
dd21dc71c6cee32bab6370874aa9c4cbf8eb984b | PHP | shreejan-regmi01/PHP-Project2 | /templates/user_home_update_template.php | UTF-8 | 766 | 2.765625 | 3 | [] | no_license | <?php
foreach ($updates as $update) {//for all the updates
echo '<li>';//list's designated element or data is created
if($update['update_image']!="")//if the image is set
echo '<a href="../images/updates/'. $update['update_image'].'"><img src="../images/updates/'.$update['update_image'].'"/></a>';//the image of the ... | true |
20bcc496cd7083dfef750ebf3cf69bc53dcd1c06 | PHP | bregzor/CMS | /assets/php/imageupload.php | UTF-8 | 814 | 2.625 | 3 | [] | no_license | <?php
function uploadImage(){
require 'db.php';
// if(isset($_POST['savePost'])){
if (!empty($_FILES['image']['name'])) {
// No file was selected for upload, your (re)action goes here
// Get images
$images = $_FILES['image']['name'];
// Temporary directory in php.ini
$tmp_dir = $_FIL... | true |
b348b66e4cd62011c75c982d2a64043843be36b5 | PHP | ecnerret-adajet/project-payroll | /database/migrations/2016_08_24_170055_create_perdays_table.php | UTF-8 | 1,363 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePerdaysTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('perdays', function (Blueprint $table) {
$t... | true |
16e383f84c6c508c4053bdb3c51b1928fb2ca900 | PHP | nozreh/wms | /plugins/herzgarlan/users/models/Drivers.php | UTF-8 | 631 | 2.6875 | 3 | [] | no_license | <?php namespace HerzGarlan\Users\Models;
use Model;
/**
* Model
*/
class Drivers extends Model
{
use \October\Rain\Database\Traits\Validation;
/*
* Validation
*/
public $rules = [
'name' => 'required',
'email' => 'required|email|unique:herzgarlan_users_drivers',
'conta... | true |
c3cfcc64fd047ed17de3e9c6f67965524756143e | PHP | YasuY1/ptypetodo | /app/Http/Controllers/HelloController.php | UTF-8 | 852 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
// use illuminate\Support\Facades\DB;
class HelloController extends Controller
{
public function index()
{
$data = [
'title'=>null,
'endline'=>'もう一つはここに出ます',
];
return view('hello.input', $data)... | true |
5f07951da3052cace488b700de3169282d8ffe4b | PHP | fashional/Design-Patterns | /Pattern.3.Singleon/Application.php | UTF-8 | 546 | 2.90625 | 3 | [] | no_license | <?php
use Demo\SingleObj;
class Application
{
public static function main()
{
self::registe();
$obj = SingleObj::getInstance();
$obj->hello();
}
// 注册自动加载类的方法
public static function registe()
{
spl_autoload_register("Application::loadClass");
}
// 自动... | true |
908b649852d03c929cf5c4f7c8da65160da5c5cb | PHP | igf-project/khoahuyhoang.net | /admincp/templates/default/js/check_form.php | UTF-8 | 3,156 | 2.8125 | 3 | [] | no_license | <?php header("Content-type: text/javascript"); ?>
// JavaScript Document
function checkEmail(str) {
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
alert("Email không đúng định dạng. Email đ... | true |
475d5ff528a43298b39ee2204d56bd0754265548 | PHP | phpcfdi/sat-ws-descarga-masiva | /src/PackageReader/Internal/FilteredPackageReader.php | UTF-8 | 4,673 | 2.78125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace PhpCfdi\SatWsDescargaMasiva\PackageReader\Internal;
use PhpCfdi\SatWsDescargaMasiva\PackageReader\Exceptions\CreateTemporaryZipFileException;
use PhpCfdi\SatWsDescargaMasiva\PackageReader\Exceptions\OpenZipFileException;
use PhpCfdi\SatWsDescargaMasiva\PackageReader\Internal\... | true |
c8202b98678c3dfa703e883c6c4e600bc67b19e9 | PHP | xiaoxiaoproject/project | /web/server/service/Focus.php | UTF-8 | 1,691 | 2.734375 | 3 | [] | no_license | <?php
namespace service;
class Focus extends Base {
private $common;
private $dao;
public function __construct() {
$this->common = requireModule("Common");
$this->dao = requireDao("Focus");
}
//插入关注信息
public function insertFocus($param) {
$resp = requireModule("Resp");
if (!is_array($param)) {
$resp-... | true |
da858a07c547815a1f4fb56ed615bea6a53ebf97 | PHP | maht0rz/jade.php | /src/Everzet/Jade/Dumper/DumperInterface.php | UTF-8 | 877 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Everzet\Jade\Dumper;
use Everzet\Jade\Visitor\VisitorInterface;
use Everzet\Jade\Node\BlockNode;
/*
* This file is part of the Jade.php.
* (c) 2010 Konstantin Kudryashov <ever.zet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed w... | true |
eb77d4aafd7d6d657af1fe867701eac6c572f43d | PHP | MateuxLucax/programacao-ifc | /3-ano/1Trimestre/13-02-Classe-Basico/14/bicicleta.class.php | UTF-8 | 1,054 | 3.109375 | 3 | [] | no_license | <?php
class bicicleta {
private $codigo;
private $fabricante;
private $numeroMarchas;
private $formacaoQuadro;
public function setCodigo($codigo) {
if ($codigo > 0) {
$this->codigo = $codigo;
}
}
public function getCodigo() {
return $this->codigo;
}... | true |
1ab74b60e44a7271a0f4e0225d0378cbe2bd9099 | PHP | turner-dalton-wm/PHPAssignment | /Animal.php | UTF-8 | 1,247 | 4.34375 | 4 | [] | no_license | <?php
//final class Animal {
//Child classes Bull and Cow methods will not work because the final keyboard stops overriding
abstract class Animal {
protected $name;
protected $age;
protected $health;
public static $maxAge = 100;
public function __construct($name, $age, $health) {
$this->... | true |
5215ffe9396099760e422db712388de3a04cd921 | PHP | eduarguz/wsdltophp-example-reservation | /src/StructType/FeesType.php | UTF-8 | 5,722 | 2.84375 | 3 | [] | no_license | <?php
namespace Sabre\UpdateReservation\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for FeesType StructType
* Meta informations extracted from the WSDL
* - documentation: List of Hotel Fees
* @subpackage Structs
*/
class FeesType extends AbstractStructBase
{
/**
*... | true |
4284c3eb45194474b61132d345455938f477c166 | PHP | Cn-Ci/formationDWWM2 | /PHP/ExoC9.php | UTF-8 | 958 | 3.40625 | 3 | [] | no_license | Exo 9
<?php
function nbrChaineCaractere($phrase,$mot){
$cpt=0;
$trouve=false;
for ($i=0; $i<strlen($phrase);$i++){
if ($phrase[$i]==$mot[0]) {
if ($i<strlen($phrase)-1){
$k=$i+1;
$trouve=true;
for($j=1; $j<strlen($mot);$j++) {
if... | true |
eeb01a9ab118dcb0db8745fc47ecabb4a7d40279 | PHP | wjf5866/laravel | /app/helpers.php | UTF-8 | 235 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* 弹出信息提示框
* @param [type] $msg 要在网页上显示的提示信息
* @param string $type success / danger
* @return void
*/
function alert($msg, $type='success'){
session()->flash($type, $msg);
}
| true |
dbbce5d4dfe660f7791363215f2129cd92b8715f | PHP | puzatkin-ivan/ood | /lw8/src/app/App.php | UTF-8 | 2,665 | 3.234375 | 3 | [] | no_license | <?php
namespace App;
use Command\EjectQuarterCommand;
use Command\Exception\CommandException;
use Command\ExitCommand;
use Command\GetBallCountCommand;
use Command\GetQuarterCountCommand;
use Command\InsertQuarterCommand;
use Command\RefillBallCommand;
use Command\TurnCrankCommand;
use GumballMachine\GumballMachine;
... | true |
e2db630aabe4c62dbf9b2a72cad8e9d1ab5b60be | PHP | ivashnev-alexandr/taskGreensight | /inc/functions.php | UTF-8 | 516 | 2.859375 | 3 | [] | no_license | <?php
function writeRecordInLog($pathLogFile, $message)
{
$record = date("Y-m-d H:i:s") . PHP_EOL;
$record .= "Имя: {$_POST['name']}, фамилия: {$_POST['surname']}, email: {$_POST['email']},"
. " пароль: {$_POST['password']}, повтор пароля: {$_POST['retryPassword']}" . PHP_EOL;
$record .= $message .... | true |
3378f757ed7e70e6382ba4727e8cb2ac60923477 | PHP | forked-project/analytics66_3.0.1 | /package/product/app/controllers/ReplaysAjax.php | UTF-8 | 3,629 | 2.546875 | 3 | [] | no_license | <?php
namespace Altum\Controllers;
use Altum\AnalyticsFilters;
use Altum\Database\Database;
use Altum\Middlewares\Authentication;
use Altum\Middlewares\Csrf;
use Altum\Response;
class ReplaysAjax extends Controller {
public function index() {
die();
}
public function delete() {
if(empt... | true |
8fe9a5ebcf0ecba0e817c64b664e36bf36141abc | PHP | CristianHG2/sonicwulf-php5 | /inc/SonicModel.php | UTF-8 | 12,890 | 2.609375 | 3 | [] | no_license | <?php
class SonicModel
{
public $bridge;
public $columns;
public $statement = '';
public $lastFunction = null;
public $masterFunction = null;
public $parameters = array();
public $oldParams = array();
public $statementOrder = array();
public $statementWhere = array();
public $statement... | true |
fe550d25caafd423d6095004c96383b6a8777269 | PHP | triard/project-web | /admin/create/proses_registrasi.php | UTF-8 | 2,459 | 2.546875 | 3 | [] | no_license | <?php
include("../../config/koneksi.php");
// cek apakah tombol daftar sudah diklik atau blum?
if(isset($_POST['add'])){
// ambil data dari formulir
$username = $_POST['username'];
$full_name = $_POST['full_name'];
$gender = $_POST['gender'];
$kontak = $_POST['kontak'];
$email = $_POST['email'];
$pas... | true |
37454856a74240f6ffaba052e734e895e575e4e8 | PHP | alemarzano/new_flexilog | /application/controllers/Admin.php | UTF-8 | 13,623 | 2.546875 | 3 | [] | no_license | <?php
class Admin extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->database();
$this->load->library(array("ion_auth", "template_render"));
$this->load->helper(array("form", "session_redirect"));
if (!$this->ion_auth->logged_in()) {... | true |
e41ff05ac23fb9a19aa2438334315a2cd0b7d11c | PHP | jonanderochoa/ejerciciosPHP | /libros/Cuaderno-de-Ejercicios-y-Practicas-PHP/8. introduccionArrays.php | UTF-8 | 648 | 3.5625 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Ejercicio8</title>
</head>
<body>
<h1>Introducción a los arrays</h1>
<?php
$dia[1] = "Lunes";
$dia[2] = "Martes";
$dia[3] = "Miercoles";
$dia[4] = "Jueves";
$dia[5] = "Viernes";
$dia[6] = ... | true |
8004a167ee2a158a1dacb1c7e0785a12dd69f0fe | PHP | domozhirov/taskmanager | /src/Core/User.php | UTF-8 | 2,955 | 3.046875 | 3 | [] | no_license | <?php
namespace App\Core;
use App\Exceptions\User\LoginIncorrectException;
use App\Exceptions\User\PasswordIncorrectException;
use App\Exceptions\User\UserException;
class User
{
/**
* @var string
*/
protected static $login;
/**
* @var string
*/
protected static $access;
publ... | true |
c79c86f4646a09bbb3395daf0942994936832c7b | PHP | StarCitizenWiki/API | /app/Models/Rsi/CommLink/Channel/Channel.php | UTF-8 | 710 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Models\Rsi\CommLink\Channel;
use App\Models\Rsi\CommLink\CommLink;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* Comm-Link Channel
*/
class Channel extends Model
... | true |
f4d49e168b987e44dfb98ee6812bed7d01138956 | PHP | nhoxzunbmt/crm | /app/Message.php | UTF-8 | 972 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Message extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'message';
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public ... | true |
3e572010f17abfd08dda30bb29e7e574f32b09e1 | PHP | zachmay/pharse | /src/ParseExecutor.php | UTF-8 | 357 | 2.671875 | 3 | [] | no_license | <?
namespace Sector42\Pharse;
class ParseExecutor extends ParseConduit
{
protected $parser;
public function __construct(Parser $parser)
{
$this->parser = $parser;
$this->parser->setSource($this);
}
public function parse($string)
{
$this->setBuffer($string);
re... | true |
c7675b869b9f4cf09545c879405b8b29b9c39997 | PHP | andrewfandrew/mondaymash | /web/includes/login_functions.inc.php | UTF-8 | 1,067 | 2.71875 | 3 | [] | no_license | <?php
function redirect_user ($page = 'index.php') {
$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
$url = rtrim($url, '/\\');
$url .= '/' . $page;
header("Location: $url");
exit(); // Exit the script now
}
function check_login($dbc, $email = '', $pass = '') {
$errors = array();... | true |
b9aeb398145f31ae13d9de108ff5add9b2647291 | PHP | KeLau83/Tp_news | /Modele/NewsManager.php | UTF-8 | 2,127 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Modele;
use \PDO;
use App\Modele\News;
use App\Modele\DbFactory;
class NewsManager {
public static function getListNews($db, $number = null) {
$limit = '';
if($number){
$limit = 'LIMIT ' .$number;
}
$query = 'SELECT id ,title, content, author, DATE_F... | true |
e4c32bdc8f5b52e64bc3da455ab46bc055bc80ac | PHP | ihor/RxPHP | /lib/Rx/Subject/AsyncSubject.php | UTF-8 | 1,772 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Rx\Subject;
use Rx\Disposable\EmptyDisposable;
use Rx\ObserverInterface;
/**
* Class AsyncSubject
* @package Rx\Subject
*/
class AsyncSubject extends Subject
{
/**
* @var
*/
private $value;
/**
* @var bool
*/
private $valueSet = false;
/**
* @return ... | true |
03dbb9f58719261155090263046bcf9459e613f3 | PHP | gutah/projeto-glaw | /class/TarefaDAO.php | UTF-8 | 3,976 | 3.015625 | 3 | [] | no_license | <?php
//Chamada de funções
require_once("conecta.php");
class TarefaDAO
{
private $conexao;
function __construct($conexao)
{
$this->conexao = $conexao;
}
//Lista as tarefas por Usuário
public function listaTarefa($user_id, $ordem)
{
if ($ordem == null) {
$ordem ... | true |
23c619a5a6dffc16e6557734728296064ad3f6af | PHP | kennie33/php-basics | /conditions.php | UTF-8 | 555 | 3.4375 | 3 | [] | no_license | <?php
$score=20;
if ($score >=50){
echo "pass";
}
else {
echo "fail";
}
echo "<hr>";
$day_of_the_week=2;
switch ($day_of_the_week)
{
case 1:
echo "monday";
break;
case 2:
echo "tuesday";
break;
case 3:
echo "wednesday";
break;
case 4:
echo... | true |
7a8b1553ca739dbe003e97308252637eaa5f0237 | PHP | jv1356/dipart | /public_html/app/controllers/Buynow.php | UTF-8 | 1,696 | 2.578125 | 3 | [] | no_license | <?php
require_once 'Controller.php';
require_once 'core/Functions.php';
require_once 'app/models/submission.php';
require_once 'app/models/user.php';
require_once 'app/models/auction.php';
require_once 'app/models/updates.php';
class Buynow extends Controller{
public function __construct(){
}
public functio... | true |
9249c67cce6d0fddd37ea365048fc753bdddc8c2 | PHP | Vyacheslavrom/Vyacheslav | /lesson/part4.php | UTF-8 | 351 | 3.359375 | 3 | [] | no_license | <?php
$helo = function ($string)
{
echo "$string<br />";
};
$helo ('че надо');
echo gettype($helo)."<br />";
function test($a, $func){
$arr = [];
for ($i = 0; $i < $a; $i++){
$arr[] = $func($i);
}
return $arr;
}
$arr = test(10, function($i){
return $i * $i;
});
foreach ($arr as $key => $value) ... | true |
ca1fedd981e249f61922bf93d6d7a445b3b438cc | PHP | msoftware/sonos | /src/Hubware/Gateway/Sonos/Model/SonosBase.php | UTF-8 | 970 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the hubware/sonos library
*
* (C) hubware AG
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace Hubware\Gateway\Sonos\Model;
use Hubware\Gateway\Sonos\ApiRestCommunicationHandler;
/**
... | true |
d07ebb0ac50a5b4cd8e3a8142ae8ac4f85f02043 | PHP | tanyibate/helpdesk-system | /testerfetch.php | UTF-8 | 1,659 | 2.71875 | 3 | [] | no_license | <?php
//fetch.php
$servername = "localhost";
$username = "root";
$password = "Team23";
$dbname = "Team23";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
echo $conn->connect_error;
}
$output = '';
if(isset($_POST["query"]))
{
$search = $conn->real... | true |
801b78d886bfa9decfc409893a996a33581d1e66 | PHP | KurangKering/k0p3r451 | /app/Http/Controllers/ProfileController.php | UTF-8 | 1,986 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use DB;
use Illuminate\Support\Facades\Storage;
use Hash;
use Image;
use File;
class ProfileController extends Controller
{
public function __construct()
{
}
public function index() {
$user = \Auth::check() ? \Auth::user() : '';... | true |
f72c1ca541ad12a89f05dba9efa1fc00e489e04d | PHP | tashik/phengine | /library/Engine/DAO/Backend/BackendAbstract.php | UTF-8 | 9,112 | 2.5625 | 3 | [] | no_license | <?php
namespace Engine\DAO\Backend;
use Phalcon\Events\EventsAwareInterface, Phalcon\DI\InjectionAwareInterface,
Library\Tools\String;
abstract class BackendAbstract implements EventsAwareInterface, InjectionAwareInterface {
use \Library\Tools\Traits\DIaware,
\Library\Tools\Traits\EventsAware;
protected sta... | true |
fd0a49750aebe46bd100208a68b4e683afcf831d | PHP | alineluiza/estudo_dirigido2 | /exercicio6.php | UTF-8 | 403 | 4.09375 | 4 | [] | no_license | <?php
echo "Digite o primeiro número: ";
$num1 = (int) fgets(STDIN);
echo "Digite o segundo número: ";
$num2 = (int) fgets(STDIN);
echo "Digite o terceiro número: ";
$num3 = (int) fgets(STDIN);
if ($num1 >= $num2) {
$maior = $num1;
}
else {
$maior = $num2;
}
if ($maior <= $num3) {... | true |
b6e876834ab8c4db3d7c8c8217f18b2688b741a3 | PHP | Lovette-Duke/dufuna-php | /arrays.php | UTF-8 | 253 | 3.171875 | 3 | [] | no_license | <?php
$firstname = array('Deborah', 'Anita', 'Stephanie');
$hobbys = array('writing', 'spoken words', 'styling naural hair');
foreach (array_combine($firstname, $hobbys) as $name => $hobby) {
echo "My name is $name. I love $hobby.<br>";
}
?> | true |
ba8951b208074a8a607d2c524c800ec8a07102ea | PHP | nhovratov/loveletter_server | /src/Player.php | UTF-8 | 2,367 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: NIKITA
* Date: 10.05.2018
* Time: 19:57
*/
namespace NH;
use NH\LoveLetter\PlayerState;
use Ratchet\ConnectionInterface;
class Player
{
/**
* @var ConnectionInterface
*/
private $client;
/**
* @var int
*/
private $id = 0;
/**
... | true |
770d620ca886d743faf5ce815002b3b97b918375 | PHP | freephile/scf | /modules/contrib/rdf/vendor/arc2/serializers/ARC2_RDFSerializer.php | UTF-8 | 1,943 | 2.609375 | 3 | [] | no_license | <?php
/*
homepage: http://arc.semsol.org/
license: http://arc.semsol.org/license
class: ARC2 RDF Serializer
author: Benjamin Nowack
version: 2008-02-08 (Fix: getPName method created invalid leading digits in local name parts)
*/
ARC2::inc('Class');
class ARC2_RDFSerializer extends ARC2_Class {
... | true |
c47e050255c76f6e7f90440033e4e0097a1f7c7f | PHP | sanathks/EventSauce | /src/CodeGeneration/Fixtures/groupWithEventWithNoFieldsFixture.php | UTF-8 | 440 | 2.515625 | 3 | [] | no_license | <?php
namespace Without\Fields;
use EventSauce\EventSourcing\Event;
final class WithoutFields implements Event
{
public static function fromPayload(array $payload): Event
{
return new WithoutFields();
}
public function toPayload(): array
{
return [];
}
/**
* @codeCo... | true |
320b5a061433076f6cc3b1d94cb36d01443fb7e0 | PHP | adeyura/rekrutmen-labpro | /programSederhana/migrations/m160528_010855_create_backend_user_table.php | UTF-8 | 951 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation for table `backend_user_table`.
*/
class m160528_010855_create_backend_user_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('backend_user', [
'id' => $this->primaryKey(),
'fir... | true |
9489e8fbc58ef02f615138158c81f9637371e232 | PHP | robert611/store | /src/Model/SaveProductDeliveryTypes.php | UTF-8 | 905 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
class SaveProductDeliveryTypes
{
private $deliveryTypeRepository;
private $entityManager;
private $product;
public function __construct($deliveryTypeRepository, $entityManager, $product)
{
$this->deliveryTypeRepository = $deliveryTypeRepository;
$this... | true |
8724cb818e477b5d3ad35e0d276b85b613349755 | PHP | YanKyawMinGTC/Laravel-Bulletinboard | /app/Import/Importcsv.php | UTF-8 | 929 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Import;
use App\Models\Post;
use Maatwebsite\Excel\Concerns\Importable;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Maatwebsite\Excel\Concerns\WithValidation;
class Importcsv implements ToModel, WithHeadingRow, WithValidation
{
use Importable;
... | true |
2eaf32c4764d9ae00710dd5d204fbfe32b112e5e | PHP | robertogiffone/almoxarifado | /login.php | UTF-8 | 2,841 | 2.53125 | 3 | [] | no_license | <?php
require_once 'include/conexao.php';
session_start();
if( isset($_POST['usuario']) && !empty($_POST['usuario']) )
{
$usuario = addslashes($_POST['usuario']);
$senha = md5($_POST['senha']);
if(fazerLogin($db, $usuario, $senha))
{
header('LOCATION: index.php');
}
else
{
$_SESSION['msg'] = array('msg... | true |
1326c1706d6e381dbcc74626a850b51fa3cbe0d4 | PHP | SannaFielding/oophp | /kmom01/guess/src/process.php | UTF-8 | 493 | 2.6875 | 3 | [] | no_license | <?php
include(__DIR__ . "/autoload.php");
include(__DIR__ . "/config.php");
/**
* A processing page that does a redirect.
*/
$_SESSION["guess"] = $_POST["guess"];
if ($_POST["doInit"] === "Start over") {
$_SESSION["event"] = "doInit";
} elseif ($_POST["doGuess"] === "Make a guess") {
$_SESSION["event"] =... | true |
c39df43a3f5b55b86e27efac27837a1d9c93f7bd | PHP | soarescbm/e-cidade | /e-cidade/func_calendario.php | ISO-8859-1 | 8,179 | 2.53125 | 3 | [] | no_license | <?php
/*
* E-cidade Software Publico para Gestao Municipal
* Copyright (C) 2014 DBSeller Servicos de Informatica
* www.dbseller.com.br
* e-cidade@dbseller.com.br
*
* Este programa e software livre; voce pode redistribui-lo e/ou
* modifica-lo sob os termo... | true |
aae89191f628e4e1789cca45ea32c41ddc65bb79 | PHP | balbuf/wasp | /src/Compilable/HookExpression.php | UTF-8 | 616 | 2.515625 | 3 | [] | no_license | <?php
namespace OomphInc\WASP\Compilable;
class HookExpression extends BaseCompilable {
public $name;
public $expressions = [];
public $priority = 10;
public $args = [];
public $function = 'add_action';
public $use = [];
public function compile() {
return $this->transformer->create('FunctionExpression', [
... | true |
5dd0baa4a12efa473566c251e779b2574535386b | PHP | refirio/laravel-blog | /app/DataAccess/Cache/DataCacheInterface.php | UTF-8 | 645 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\DataAccess\Cache;
/**
* Interface DataCacheInterface
*/
interface DataCacheInterface
{
/**
* @param $key
*
* @return mixed
*/
public function get($key);
/**
* @param $key
* @param $value
* @param null $minutes
*
* @return mixed
... | true |
8d3c49b935b0e36041f603ea284369a9b812f847 | PHP | BrookeOlivia/shopping-cart | /checkout/add-shipping.php | UTF-8 | 2,669 | 2.609375 | 3 | [] | no_license | <?php session_start();
if (isset($_POST['submit'])) {
if (isset($_SESSION['user'])) {
//set up your information here
$hostname = "localhost";
$database = "shoppingcart";
$username = "root";
$password = "root";
//Make a new connection object
tr... | true |
c69b25451c61ea7523475866c66558218c472a68 | PHP | linxiaozhi/ocsp-responder | /src/PKIX/OCSP/BasicResponse.php | UTF-8 | 5,128 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/*
* PHP OCSPRequest - OCSP Request access library for PHP
*/
namespace PKIX\OCSP;
use \lyquidity\Asn1\Element\Sequence;
use \lyquidity\Asn1\UniversalTagID;
use PKIX\Exception\ResponseException;
use function \lyquidity\Asn1\asSequence;
/**
* BasicResponse message (see RFC2560)
*/
class Basic... | true |
a8c32a31a2e478d6d67ea1067ceb2b011a7c953d | PHP | dbierer/unit-testing-dec-2016 | /Code-Kata-4-Andrew/tests/WidgetApiTest.php | UTF-8 | 900 | 3.03125 | 3 | [] | no_license | <?php
/**
* Makes actual call to API
* NOTE: such a test is expensive in terms of time and resources!!!
*
* For this test to work, the API simulator must be running
* To Run API Simulator:
*
* #1: cd /path/to/source/api
* #2: php -S localhost:8080 index.php
* #3: usage:
* var_dump((new WidgetApi())->findB... | true |
959e5ad1d7f75c4a6c31af791d086bd0ebbf9686 | PHP | khacnam97/web_bh | /database/migrations/2021_05_04_024052_create_analyzed_table.php | UTF-8 | 872 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Class CreateAnalyzedTable
*/
class CreateAnalyzedTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
... | true |
25abb15a98c45ad4d7bb13d41ee4e129adc60187 | PHP | YHArthur/wx | /db/wx_vote_main.php | UTF-8 | 2,233 | 2.765625 | 3 | [] | no_license | <?php
//======================================
// 函数: 取得微信投票信息
// 参数: $vote_id 投票ID
// 返回: 微信投票信息数组
// 说明:
//======================================
function get_wx_vote_main($vote_id)
{
$db = new DB_WX();
$sql = "SELECT * FROM wx_vote_main WHERE vote_id = {$vote_id}";
$db->query($sql);
$row = $db->fetchRo... | true |
13d21e77c1b9e9911b270b52c57c90d14deebc90 | PHP | luigif/WsdlToPhp | /samples/xignite-indices/List/Sector/XiIndicesTypeListIndicesBySector.php | UTF-8 | 932 | 2.703125 | 3 | [] | no_license | <?php
/**
* Class file for XiIndicesTypeListIndicesBySector
* @date 08/07/2012
*/
/**
* Class XiIndicesTypeListIndicesBySector
* @date 08/07/2012
*/
class XiIndicesTypeListIndicesBySector extends XiIndicesWsdlClass
{
/**
* The Sector
* Meta informations :
* - minOccurs : 0
* - maxOccurs : 1
* @var st... | true |
38b1b7848c084c5916bc1e1529920394e5e0badc | PHP | CentralCollege/CCMP | /student/questionnaire.php | UTF-8 | 23,165 | 3.140625 | 3 | [] | no_license | <?php
require_once 'config.php';
/**
* Check whether a value matches an array of acceptable values.
* @param string $value The value to be checked.
* @param array $acceptableValues Optional. The acceptable values for $value. If unset, any value is accepted.
* @param boolean $multiple Optional. Whether mutiple valu... | true |
83c60a84d57bd68d5606fcb0e2e4ed3b0307a549 | PHP | PaulPio/Proyectos | /Web/BDD/api/backend/datos.php | UTF-8 | 680 | 2.640625 | 3 | [] | no_license | <?php
//Para que cualquiera pueda acceder
header("Access-Control-Allow-Origin: *");
// Cabecera para que su contenido sea considerado como un objeto JSON
header('Content-Type: application/json');
// $_GET permite obtener el string de la url
if($_GET['moneda']=='euro' || $_GET['moneda']=='dolar' || $_GET['moneda']=='... | true |
9befb3fedd6fe67c931d6639bde8bf83045306ba | PHP | Faridbabayev001/CRUD | /delete.php | UTF-8 | 1,478 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
include "check.php";
?>
<?php if (isset($_GET["id"])) { ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="bootstrap.css" type="text/css">
</head>
<style>
.second{
... | true |
40fd3bc9e685d30f172d0582d536e0867f3ab266 | PHP | gaboDev/zipdev_API | /src/Classes/Http/Payload.php | UTF-8 | 547 | 3.046875 | 3 | [] | no_license | <?php
namespace App\Classes\Http;
class Payload
{
private $message;
private $data;
public function __construct($message = "", $data = [])
{
$this->message = $message;
$this->data = $data;
}
public function setMessage($message = ""){
$this->message = $message;
}
public function setData(array $data... | true |
0a54b586cdc84ef9e4ef1320cb7f6ab6e0ebe0d3 | PHP | sega2892/pgs | /src/Calc/Operations/Sub.php | UTF-8 | 166 | 2.765625 | 3 | [] | no_license | <?php
namespace Laravel\Calc\Calc\Operations;
class Sub extends Operation
{
public function calc(float $v1, float $v2)
{
return $v1 - $v2;
}
} | true |
17eb3794c87b98c43a1cb896f13085ef0a8ae37b | PHP | Dragomeat/lynx-media-entrance-test | /app/ProxyParser/FPL/FPLProxyTransformer.php | UTF-8 | 2,380 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the lynx-media-entrance-test package.
*
* (c) Artem Prosvetov <dragomeat@dragomeat.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace App\ProxyParser\FPL;
... | true |
589f33bbad1ba43a28bdb2355bdfa9357bf3e394 | PHP | RubixML/ML | /src/Transformers/IntervalDiscretizer.php | UTF-8 | 4,321 | 3.046875 | 3 | [
"MIT",
"CC-BY-NC-4.0",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php
namespace Rubix\ML\Transformers;
use Rubix\ML\DataType;
use Rubix\ML\Persistable;
use Rubix\ML\Helpers\Stats;
use Rubix\ML\Datasets\Dataset;
use Rubix\ML\Traits\AutotrackRevisions;
use Rubix\ML\Specifications\SamplesAreCompatibleWithTransformer;
use Rubix\ML\Exceptions\InvalidArgumentException;
use Rubix\ML\Exc... | true |
8926ba284f2a1c57fb98e7144c10bea0a6878261 | PHP | Przemar5/Meetee | /meetee/libs/security/validators/factories/ValidatorFactory.php | UTF-8 | 6,081 | 2.546875 | 3 | [] | no_license | <?php
namespace Meetee\Libs\Security\Validators\Factories;
use Meetee\Libs\Security\Validators\IsSetValidator;
use Meetee\Libs\Security\Validators\NotEmptyValidator;
use Meetee\Libs\Security\Validators\TypeValidator;
use Meetee\Libs\Security\Validators\NotTypeValidator;
use Meetee\Libs\Security\Validators\MinValidato... | true |
ee52a7483df068a9c86ee064f8eccbf94f678d59 | PHP | alexanderjr/tdd | /tests/CalculadoraDeSalarioTest.php | UTF-8 | 1,104 | 2.625 | 3 | [] | no_license | <?php
use \Alexander\Funcionario,
\Alexander\Desenvolvedor,
\Alexander\Dba,
\Alexander\CalculadoraDeSalarios;
class CalculadoraDeSalarioTest extends PHPUnit_Framework_TestCase {
public function testDesenvolvedor(){
$dev = new Desenvolvedor("Alexander", "aafonso.93@gmail.com", 5000);
$calculadora ... | true |
2ca389aab0642440268861d68ec22050c0ce45d0 | PHP | tmick0/rackpower | /content/view.inc.php | UTF-8 | 10,026 | 2.625 | 3 | [] | no_license | <?php
if(!is_user_authed()) exit("not logged in");
// get the value of a text input field
function get_val($id, $field){
if($id){
$q = sql_query("SELECT `$field` FROM `entities` WHERE `ID` = '$id'");
$r = mysqli_fetch_row($q);
mysqli_free_result($q);
return $r[0];
}
else{
... | true |
69928e5f172b84e9b43fc479c5368ecf4bd2a393 | PHP | WahyuSetiawan/website-example-datamining | /admin/modul/data_penentu_keputusan_all.php | UTF-8 | 1,997 | 2.609375 | 3 | [] | no_license | <html>
<head>
<title>.:Data Keputusan:.</title>
<style type="text/css">
th.data
{
width : 130px;
}
</style>
<link href="adminstyle.css" rel="stylesheet" type="text/css">
</head>
<body>
<h2 align="center">Data Keputusan</h2>
<table bgcolor="#00CCFF" border="1" cellspac... | true |
fe8d2ea527196b3bdf539030ccacb3372157a276 | PHP | baquyptit2001/looki | /app/Http/Livewire/CartInfo.php | UTF-8 | 652 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Livewire;
use Livewire\Component;
class CartInfo extends Component
{
public $cart = [];
public $total = 0;
protected $listeners = ['init'];
public function mount()
{
$this->init();
}
public function remove($id)
{
if(isset($this->cart[$id]))... | true |
b6a611e81a70535ac52f29fdb2c6bd2361e776ae | PHP | stefanodgr/buscatupaz | /app/Console/Commands/AddHoursToClasses.php | UTF-8 | 3,275 | 2.96875 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use App\Models\Classes;
use App\User;
use Illuminate\Console\Command;
class AddHoursToClasses extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'command:add_hours';
/**
* The con... | true |
dc30788c8b2a2487dc6484dbab0bfdfccdbeb3ac | PHP | AkimBolushbek/wordpress-soc-2007 | /duomax/WordpressPerformance Release 1/results.php | UTF-8 | 2,344 | 3 | 3 | [] | no_license | <?php
/**
* Contains testbanks, runs them and saves the results to XML
*/
class Results
{
private $suite;
public function Results()
{
}
public function runTests($runs)
{
//include framework
include "PerformanceTest.php";
//suite to hold all tests
$suite = new te... | true |
a7a90eff18886cadcfa03ac41043d9d91f1e14df | PHP | lifelink1987/features.life-link.org | /index.php | UTF-8 | 2,002 | 2.78125 | 3 | [] | no_license | <?php
require 'connect.php';
require 'suggestion.class.php';
// Converting the IP to a number. This is a more effective way
// to store it in the database:
$ip = sprintf('%u', ip2long($_SERVER['REMOTE_ADDR']));
// The following query uses a left join to select
// all the suggestions and in the same time de... | true |
f78c3f17327c7b2131476e01fc2fb4c0241640c8 | PHP | andri000me/pengaduan-masyarakat-1 | /petugas/show_masyarakat.php | UTF-8 | 1,637 | 2.65625 | 3 | [] | no_license | <?php
require '../koneksi.php';
if (!isset($_SESSION['id_petugas'])) {
header("Location: login_petugas.php");
exit();
}
$masyarakat = mysqli_query($koneksi, "SELECT * FROM masyarakat");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, ini... | true |
06f664965170a18c3c2955dd9e705b3a53715e62 | PHP | sanyaade/Panada | /panada/library/akismet.php | UTF-8 | 8,187 | 2.578125 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | <?php
/*
* Akismet library as comment checker for SPAM
* Made for Panada framework. Tested on Panada v0.2.1 and v0.3.1
* Author: Aryo Pinandito (aryoxp@gmail.com)
* Requirements:
* - Akismet API key, sign up for your key here: https://akismet.com/signup/
- A working installation of Panada framework
... | true |
e910c1d111d4c8a9bd000f693b69a3ce6e4b4405 | PHP | ParityBitSystems/deployment-notifier | /tests/Clients/SlackClientTest.php | UTF-8 | 2,616 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace ParityBit\DeploymentNotifier\Clients;
use Curl\Curl;
class SlackClientTest extends \PHPUnit_Framework_TestCase
{
protected $client;
protected $faker;
public function setUp()
{
$this->faker = \Faker\Factory::create();
$this->curl = $this->getMockBuilder(Curl::class)
... | true |
d67eedaa8fc6255ec278fdd3561748facae22f66 | PHP | echo4me/pdo | /controller/ban.php | UTF-8 | 2,805 | 2.515625 | 3 | [] | no_license | <?php
session_start();
require_once('../inc/connection.php');
if(isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true)
{
if(isset($_GET['action']) && isset($_GET['id']) && !empty($_GET['action']) && !empty($_GET['id']))
{
if(is_numeric($_GET['id']))
{
$stmt = $pdo->prepare... | true |
16f09c13c4336cf53562d4acb7621cd26dec03e6 | PHP | zwiebelLiu/LeetCode | /rechnen/freqAlphabets.php | UTF-8 | 1,683 | 3.46875 | 3 | [] | no_license | <?php
/*
* 给你一个字符串 s,它由数字('0' - '9')和 '#' 组成。我们希望按下述规则将 s 映射为一些小写英文字符:
字符('a' - 'i')分别用('1' - '9')表示。
字符('j' - 'z')分别用('10#' - '26#')表示。
返回映射之后形成的新字符串。
题目数据保证映射始终唯一。
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/decrypt-string-from-alphabet-to-integer-mapping
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
*/
function f... | true |
fa6e3b48eb57e84194b838c47a5ec9859c444afd | PHP | cedric444/dwwm2020-Cedric | /php-web/newLocalHost/Ex8 MCV DAO -v2/PHP/MODEL/UtilisateursManager.Class.php | UTF-8 | 2,855 | 3.0625 | 3 | [] | no_license | <?php
class UtilisateursManager
{
public static function add(Utilisateurs $obj)
{
$db = DbConnect::getDb();
$q = $db->prepare("INSERT INTO Utilisateurs (nomUtilisateur, prenomUtilisateur, mdp, mail, roleUtilisateur, pseudo) VALUES (:nomUtilisateur, :prenomUtilisateur, :mdp, :mail, :roleUtilisate... | true |
dcca0ffc1705b157bd1365c2263aecab1db087a5 | PHP | heroespatchnotes/sdk-php | /src/Entities/Hero.php | UTF-8 | 1,686 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Heroes\Entities;
use Heroes\Entities\Hero;
use Heroes\Gamestring;
use Heroes\Providers\DataProvider;
use Heroes\Providers\GamestringProvider;
use RuntimeException;
/**
* Hero Entity
*/
class Hero extends BaseEntity
{
/**
* @var Ability[]
*/
private $abilities;
/**
... | true |
931f3e43580f87a16cb09fb39d566bd494a127b4 | PHP | dlh1106/php_test_api | /class/member.php | UTF-8 | 6,530 | 3.125 | 3 | [] | no_license | <?php
class Member {
private $db;
function __construct(){
$this->db = new PDO_Lib("test");
// print_r($this->db);
}
function chk_string(int $type, string $str){
$format = "";
$err = 0;
$err_msg = "";
switch($type){
case 1: //한글, 영대소문자만 포... | true |
985051c0c89c883d7b2351f0678cf19c8d89ff82 | PHP | RNwebdk/MultiAuth | /app/Enums/UserType.php | UTF-8 | 327 | 2.75 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Enums;
use BenSampo\Enum\Enum;
/**
* @method static static ADMINISTRATOR()
* @method static static MANAGER()
* @method static static USER()
*/
final class UserType extends Enum
{
public const ADMINISTRATOR = 1;
public const MANAGER = 2;
public const USER ... | true |
bb7827561d1dda6cfcd5347d48ec4e9877d0aa27 | PHP | MrEliasen/Zolid-Firebase-Chat | /core/classes/security.class.php | UTF-8 | 3,445 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Zolid Chat - 0.1.0
* This class is from the Zolid Framework.
*
* A realtime chat based on the awesome technology from Firebase <3
*
* @author Mark Eliasen
* @copyright (c) 2013 - Mark Eliasen
* @version 0.1.0
*/
if( !defined('CORE_PATH') )
{
die('Direct file access not allowed.')... | true |
bf5f30121b8ffe7e35580ac33a56c3a016471116 | PHP | 10aditya/quiz-app | /api/question.php | UTF-8 | 1,218 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
session_start();
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token');
include "crud.php";
$questionData = json_decode(file_get_contents("php://input"),tru... | true |
c5a2b93592b753563d59062bfc6c4467eba110e6 | PHP | irmao/project-summer | /server/connection_sqlsrv.php | UTF-8 | 1,095 | 2.703125 | 3 | [] | no_license | <?php
error_reporting( E_ALL );
function _start_connection() {
$servername = getServername();
$username = getUsername();
$password = getPassword();
$database = getDatabase();
$port = getPort();
$connectionInfo = array( "Database"=>"$database", "UID"=>"$username", "PWD"=>"$password");... | true |
0ded18dbf4e78e012cc1a80d8f1376e0199a6764 | PHP | Mehrdad-Dadkhah/open-street-map-api | /src/Types/Duration.php | UTF-8 | 1,223 | 3.453125 | 3 | [] | no_license | <?php
namespace MehrdadDadkhah\OSM\Types;
class Duration implements TypeInterface
{
/** @var $value main value of type */
private $value;
const SECOND_UNIT = 'second';
const MINUTE_UNIT = 'minute';
const HOUR_UNIT = 'hour';
/**
* set value of type function
*
* @param mixed $... | true |
b78eb37dd75df0113f42f106dc77c8d42314d77c | PHP | axxapy/php_db | /src/Drivers/DBDriver.php | UTF-8 | 1,995 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php namespace axxapy\DB\Drivers;
use axxapy\DB\DBException;
use axxapy\DB\SQLBuilders\SQLBuilder;
use axxapy\DB\Results\RawDBResult;
use axxapy\DB\DBResultInterface;
/**
* Abstract MySQL DB driver class/interface
*
* Class DB_Driver
*
* @package AF
*/
abstract class DBDriver {
/**
* Driver configuration
... | true |
ba443e9f2a48d584204d0e382f0bdf3d7f356166 | PHP | Sugarhead71099/knowledge-base | /kbFunctions.php | UTF-8 | 4,831 | 3 | 3 | [] | no_license | <?php
$badChars = array("!", "@", "#", "\$", "%", "^", "&", "*", "(", ")", "+", "=", "`", "~", ".", ",", ";", ":", "/", "\"", "'", "\\", "<", ">", "?", "|", "[", "]", "{", "}");
function addSpacingByCamelCase($string) {
$spacedString = "";
$charArray = str_split($string);
foreach($charArray as $key =... | true |
c3822b4729622b2a9182c989d4d66a32abb65e89 | PHP | CdrLettuce/Latus-Alex | /PhpProject1/models/playerinfomodel.php | UTF-8 | 3,794 | 2.625 | 3 | [] | no_license | <?php
class PlayerInfoModel extends Model
{
public function getPlayerInfo(){
$sql = "SELECT u.user_id, u.city, s.state_name, u.first_name, u.last_name, u.email, u.phone
FROM `users` as u, `states` as s
WHERE u.state_id = s.state_id
... | true |
96482643c5432d7fa106e50a77cb30d8efe7f88f | PHP | alioualarbi/anime-api | /models/Episode.php | UTF-8 | 10,167 | 2.78125 | 3 | [] | no_license | <?php
class Episode extends BaseModel
{
/**
*
* @var integer
* @Primary
* @Column(type="integer", length=7, nullable=false)
*/
public $id;
/**
*
* @var integer
* @Column(type="integer", length=5, nullable=false)
*/
public $anime_id;
/**
*
* ... | true |