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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4addd39c4b80adc638a3cf51bedca7a112df3726 | PHP | Franklinrgarciat/clasesonline | /php/ejercicio5_2.php | UTF-8 | 1,291 | 2.578125 | 3 | [] | no_license | <?php
extract($_REQUEST);
//echo $_POST['nombre'];
//echo $nombre." ".$apellido." ".$cedula;
if($nombre!="" && $apellido!="" && $edad!="" && $cedula!="" && $monto_casa!="" && $presupuesto!=""){
if ($edad>=18) {
# verificacion cuando es mayor o igual a 50%
$porcentaje_50=(50*$monto_casa)/100;
$porcent... | true |
55a8bf0f3a9c94defda2203581ce7a2b48c8b1e4 | PHP | Habanos/php-api | /src/Utils.php | UTF-8 | 792 | 3.125 | 3 | [] | no_license | <?php
namespace Higreen\Api;
/**
* 实用工具
*/
class Utils
{
/**
* 计算两个坐标的距离
*
* @param float $lon1 [坐标1-经度]
* @param float $lat1 [坐标1-纬度]
* @param float $lon2 [坐标2-经度]
* @param float $lat2 [坐标2-纬度]
* @return integer
*/
public static function getInst... | true |
d0675677bf1fb88a9c0cbcbd818c393b7c902a3f | PHP | SL2048/Mazadna | /API/v1/models/auction.php | UTF-8 | 18,188 | 2.921875 | 3 | [] | no_license | <?php
class Auction
{
private $user_id;
private $description;
private $start_time;
private $end_time;
private $privacy;
private $title;
private $category_id;
private $highest_bid_id;
private $highest_bider_id;
private $starting_price;
private $conn;
function __construct($id=0,$user_id=0,$des... | true |
ea7cca1ca40a193e66ba426c11b35300c7977e92 | PHP | OleVik/grav-theme-scholar | /vendor/phpextra/sorter/tests/fixtures/PHPExtra/Sorter/SorterTest.php | UTF-8 | 1,979 | 2.8125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace fixtures\PHPExtra\Sorter;
use PHPExtra\Sorter\Sorter;
use PHPExtra\Sorter\Strategy\ComplexSortStrategy;
use PHPExtra\Sorter\Strategy\SimpleSortStrategy;
use PHPUnit_Framework_TestCase;
/**
* The SorterTest class
*
* @author Jacek Kobus <kobus.jacek@gmail.com>
*/
class SorterTest extends PHPUnit_F... | true |
652c26836f8cbcf101a2e7d4240a0a7e03619d96 | PHP | weblackmy/phpbase | /lib/util/Date.php | UTF-8 | 2,196 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
namespace phpbase\lib\util;
/**
* Class Date
* @package phpbase\lib\util
* @author qian lei
*/
class Date
{
public static $day = [
'Monday' => 1,
'Tuesday' => 2,
'Wednesday' => 3,
'Thursday' => 4,
'Friday' => 5,
'Saturday' => 6,
'Sunday' => 7,
... | true |
17a0239124fa95341e89f2da62599e8fb0ecb262 | PHP | leafypineglass/rebalance-bot | /rebalance_live.php | UTF-8 | 25,784 | 2.515625 | 3 | [
"CC-BY-4.0"
] | permissive | <?php
/*#Rebalance folio live sim version
By: u/callunquirka aka leafypineglass on github
License: CC BY
Version Created: 2020-11-29
Updated: 2021-09-04
*/
// ##Load
include 'rebalanceConfig.php';
include 'movingAverages.php';
if ($exchange=='binance') {
require 'vendor/autoload.php';
include 'binance-data-... | true |
87b820c86bdcc065b9e100cd24be886f24c63f9d | PHP | snretuerma/DocTrack | /database/seeders/UsersTableSeeder.php | UTF-8 | 2,704 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Faker\Generator as Faker;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run(Faker $fake... | true |
1e823bd2b729acb924d7f72cbbcab19261563b98 | PHP | magung/klinik_app | /index.php | UTF-8 | 1,301 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Klinik LP3I</title>
</head>
<body>
<?php
session_start();
if(isset($_SESSION["nip"])) {
header("location: home.php");
die();
}
include("database.php");
$action = (!isset($_REQUEST["action"]))? null : $_REQUEST["action"];
if($action == null){
?>
<h1>Welc... | true |
ca777e379143d0b9a391e68f8f68ee891986db5d | PHP | BesjaSoft/ytracks | /protected/models/Club.php | UTF-8 | 5,108 | 2.578125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "{{tracks_clubs}}".
*
* The followings are the available columns in table '{{tracks_clubs}}':
* @property integer $id
* @property string $full_name
* @property string $alias
* @property string $picture
* @property string $picture_small
* @property string $address
... | true |
9a59fc928b701b2a0fbb884dede686fe1b6a9461 | PHP | xqsxiaoqingsong/php_admin | /application/admin/model/Face.php | UTF-8 | 592 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\admin\model;
use think\Model;
class Face extends Model
{
protected $table = "t_facetrain";
protected $pk = 'ID';
//自动写入标准时间,数据库增加 create_time和update_time字段,类型为datetime
protected $autoWriteTimestamp = 'datetime';
protected $dateFormat = 'Y-m-d H:i:s';
// 定义时间戳字段名
pr... | true |
8019223545d3d7d789b2ae8619fae64d00f1a438 | PHP | MarcosEsmeraldino/email-bounce | /controller/LeituraController.php | UTF-8 | 4,491 | 2.5625 | 3 | [] | no_license | <?php
include_once './service/ImapEmailService.php';
include_once './service/LeituraService.php';
include_once './service/TratamentoErrosService.php';
include_once './service/TratamentoTiposService.php';
include_once './service/TratamentoEmailsIdentificadosService.php';
include_once './model/ImapEmail.php';
... | true |
1874d7aeea645fe4d34a4587c11a9940368932be | PHP | farfan730/esp-mcds-sena | /backupMio/MVC/views/home.php | UTF-8 | 909 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ejemplo de MVC</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet">
<script src="h... | true |
d498e81dd58174e805853f6aa43518920887a2de | PHP | nguyenvanduocit/GetMusic | /lib/Zingmp3.class.php | UTF-8 | 2,425 | 2.828125 | 3 | [] | no_license | <?php
require_once 'Track.class.php';
require_once 'Curl.class.php';
require_once 'GetTrackAbstract.php';
class ZingMp3 extends GetTrackAbstract
{
private $link;
private $type;
public function __construct($link = "")
{
$this->link = $link;
$this->type = $this->checkType();
}
... | true |
3f3a691a98f8167a1a1cc8a49af282131be9da74 | PHP | christophegourmand/MusicTagMaterialV6 | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 5,230 | 2.75 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
// METHOD 3 : i try to add the namespaces to instance Country, City, and Address:
use App\Country... | true |
50ef6c4de828855829f0fc0bc0d223a76466c346 | PHP | EZWebvietnam/Kohana | /application/classes/crypto/hash/password.php | UTF-8 | 4,687 | 2.859375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
class Crypto_Hash_Password{
private static $_itoa_64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
private static $_atoi_64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
private static $_iteration_count_log ... | true |
bdd9051b11184b23592a7ba93004ca6fcaf25991 | PHP | kennyams/aws_signaturev4 | /sigv4.php | UTF-8 | 3,550 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
function cmp($a, $b) {
return strcasecmp($a, $b);
}
function sign($key,$msg){
return hash_hmac('sha256',$msg,hex2bin($key));
}
function Send($path,$payload){
$root=$_SERVER['DOCUMENT_ROOT'];
if(! defined('IOT_ENDPOINT')
|| ! defined('IOT_PORT')
|| ! defined('IOT_CRED_FILE')){
print_r("IOT en... | true |
40048797189c36580eaa6f9f0379f9e081db1dd5 | PHP | ofmartinezm/xiontech | /consumoWS.php | UTF-8 | 8,320 | 2.90625 | 3 | [] | no_license | <?php
// class CurlRequest
// {
// public function sendPost()
// {
// //datos a enviar
// $data = array("a" => "a");
// //url contra la que atacamos
// $ch = curl_init("http://localhost/API/post");
// //a true, obtendremos una respuesta... | true |
4f1b9566e2cd2e7e30adc7a84d3172224d14cec3 | PHP | Firlychisa06/project_hmvc | /application/modules/contoh/views/listdata.php | UTF-8 | 519 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<table border="1px">
<tr>
<th>Username</th>
<th>Email</th>
<th>Aksi</th>
</tr>
<?php
foreach ($list as $key ) {
?>
<tr>
<td><?php echo $key->username ?> </td>
<td><?php echo $key->email ?> </td>
<td><a type="submit" href= "<?php ec... | true |
348dd1b590ad869812aa55349db07658e9578ce9 | PHP | DZDeemix/testRadyushin2 | /code/Models/LibraryModel.php | UTF-8 | 4,514 | 2.890625 | 3 | [] | no_license | <?php
/**
* LibraryModel Doc Comment
*
* LibraryModel queries the database
*
* @category ConsoleUtils
* @package TestTask
* @author Zyablikov Dmitry <zyablikovdmitry@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @link https://github.com/DZDeemix/testRadyushin2
... | true |
40b799f470151a16d993b044c5dad1f036cafa96 | PHP | v3kwip/serializer | /tests/fixtures/Person.php | UTF-8 | 601 | 3.078125 | 3 | [] | no_license | <?php
namespace AndyTruong\Serializer\Fixtures;
class Person
{
/**
* Name of Person.
*
* @var string
*/
protected $name;
/**
* Reference to Father.
* @var Person
*/
protected $father;
public function getName()
{
return $this->name;
}
publi... | true |
f4158335b8972af99172b02e2f0a1bd25264d804 | PHP | comely-io/yaml | /src/Compiler.php | UTF-8 | 6,201 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of "comely-io/yaml" package.
* https://github.com/comely-io/yaml
*
* Copyright (c) Furqan A. Siddiqui <hello@furqansiddiqui.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code or visit following link:
*... | true |
90c7cf36fd61a4804e860818a0205661b0475527 | PHP | ruslan-immunity/gmhost-test | /app/Console/Commands/AddProducts.php | UTF-8 | 2,868 | 2.953125 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class AddProducts extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'products:add {array_feature*} {--cat=car}'; //cat - ... | true |
c9b4d918844ddad4ba12645802f19c1dabba38ea | PHP | amangupta1992/MapMyStudy | /insert_book_details.php | UTF-8 | 1,367 | 2.515625 | 3 | [] | no_license | <?php
$con = mysql_connect("localhost","root","chetna");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("user", $con);
$name=$_POST['name'];
$author=$_POST['author'];
$publication=$_POST['publication'];
$pub_year=$_POST['pub_year'];
$edition=$_POST['edition'];
$group=$_POST['group'];
... | true |
254cb0cffedd5cd2e1505185fbfeab9e88bf714e | PHP | znlib/telegram | /src/Domain/Repositories/Http/UpdatesRepository.php | UTF-8 | 848 | 2.734375 | 3 | [] | no_license | <?php
namespace ZnLib\Telegram\Domain\Repositories\Http;
use GuzzleHttp\Client;
class UpdatesRepository
{
public function all(string $token, int $lastId, int $timeout) {
$queryParams = [];
if ($lastId) {
$queryParams['offset'] = $lastId;
}
$queryParams['timeout'] = $... | true |
7a4ad578f207943f0e41ed9c83b0770770a1cdcb | PHP | DeBoerTool/model-factory | /src/Create.php | UTF-8 | 2,004 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Dbt\ModelFactory;
use Dbt\ModelFactory\Params\Count;
use Dbt\ModelFactory\Params\Overrides;
use Dbt\ModelFactory\Params\Param;
use Dbt\ModelFactory\Params\States;
use Illuminate\Database\Eloquent\Factory as EloquentFactory;
use Illuminate\Database\Eloquent\Model;
/**
* Create a model or a collection... | true |
410e7649fcd8e01ef777aa870074829135e34053 | PHP | microformats/php-mf2 | /tests/Mf2/ParseValueClassTitleTest.php | UTF-8 | 4,078 | 2.6875 | 3 | [
"MIT",
"CC0-1.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Tests of the parsing methods within mf2\Parser
*/
namespace Mf2\Parser\Test;
use Mf2;
use Mf2\Parser;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
class ParseValueClassTitleTest extends TestCase {
protected function set_up() {
date_default_timezone_set('Europe/London');
}
public function testV... | true |
51894692da079edbcc3f0e7a5b6844bb19d4b21d | PHP | Nycto/phpVocab | /src/classes/App/Paths.php | UTF-8 | 2,884 | 2.78125 | 3 | [] | no_license | <?php
/**
* @license Artistic License 2.0
*
* This file is part of phpVocab.
*
* phpVocab is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License as published by
* the Open Source Initiative, either version 2.0 of the License, or
* (at your option) any later version.... | true |
d8d92ae544390105da7fca538dde6028fe60427b | PHP | kudziajaroslaw98/M-M-s | /src/repositories/GearRepository.php | UTF-8 | 6,041 | 2.984375 | 3 | [] | no_license | <?php
class GearRepository
{
private $connect = null;
public function __construct()
{
try {
global $config;
$this->connect = new PDO($config['dsn'], $config['username'], $config['password']);
$this->connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION... | true |
91c69459986f4d54964547d7f4883a092d2d1d74 | PHP | sxair/soj | /app/Http/Tools/zip.php | UTF-8 | 962 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Http\Tools;
use ZipArchive;
class zip extends ZipArchive
{
/**
* create a zip file
* @param $filename
* @return mixed
*/
public function create($filename)
{
return $this->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE);
}
/**
* add... | true |
352fda6fb00a7b895834925b1a1f0c055e2b7c14 | PHP | HostLink/epost-client | /tests/ContactTest.php | UTF-8 | 2,176 | 2.578125 | 3 | [] | no_license | <?php
use Epost\API;
use Epost\Contact;
use Epost\ContactGroup;
use PHPUnit\Framework\Constraint\IsType;
use PHPUnit\Framework\TestCase;
final class ContactTest extends TestCase
{
public function getAPI()
{
$ini = parse_ini_file(__DIR__ . "/config.ini");
return new API($ini["token"]);
}
... | true |
68fb1b3d9d4739f33199ba64a2cf39870951dd7e | PHP | john007buc/savantcafe | /src/John/ArticleBundle/Event/EventListener/UniqueTag.php | UTF-8 | 4,996 | 2.828125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace John\ArticleBundle\Event\EventListener;
use Doctrine\ORM\Event\LifecycleEventArgs;
use John\ArticleBundle\Entity\Article;
use John\ArticleBundle\Entity\Tag;
use Doctrine\Common\Persistence\Event\PreUpdateEventArgs;
class UniqueTag
{
public function prePersist(LifecycleEventArgs $args)
{
... | true |
87820430ce3e328527dc26e1b4499ef39ea25f11 | PHP | pssubashps/football | /src/Subash/Classes/Database.php | UTF-8 | 552 | 2.96875 | 3 | [] | no_license | <?php
namespace Subash\Classes;
class Database
{
protected $dbLink;
private function create()
{
$this->dbLink = new \mysqli('localhost', 'root', 'root', 'football', '3306');
if ($this->dbLink->connect_errno) {
printf("Connect failed: %s\n", $this->dbLink->connect_error);
... | true |
8d99de802ec5dc5e50154d39d2c26072baf08e02 | PHP | cxty/pay.dbowner.com | /include/lib/Addslashes.class.php | UTF-8 | 1,354 | 3.28125 | 3 | [] | no_license | <?php
/**
* 用addslashes方法过滤数据
*
* @author wbqing405@sina.com
*
*/
class Addslashes{
function __construct(){
}
/**
* 过滤数据
*
* @param $request 需要过滤的数据
*/
public function get_addslashes($request){
/* 过滤所有GET过来变量------------------------------------------------------------- */
if(is_array($request)... | true |
d4ce765c20d5fdbb8ff6b36b0a05794594f3d7cf | PHP | GUINCODE/GreatAlumni | /Models/Model_admin/_add_new_member.php | UTF-8 | 1,120 | 2.515625 | 3 | [] | no_license | <?php
include_once('../../partials/connectBDD.php');
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$mail = $_POST['mail'];
$annee = $_POST['annee'];
$loginn = $_POST['login'];
$passwordRec = $_POST['mdp'];
$typee = $_POST['type'];
$mdp= password_hash( $passwordRec, PASSWORD_DEFAULT);
$stmt = $db->prepare("SELEC... | true |
342301748678c68881433704311f6e17142213ba | PHP | jecqiang/PHPer | /Architecture/设计模式/Creational/FactoryMethod/Mouse.php | UTF-8 | 90 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Creational\FactoryMethod;
interface Mouse
{
public function say();
} | true |
563158c6ab0735472661ac94fd3dcb1728647fdc | PHP | ArturasGerasimov/bookshop | /database/seeders/BooksSeeder.php | UTF-8 | 643 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class BooksSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
for ($i = 1; $i <= 200; $i++) {
DB::... | true |
e3bc7ca1b4f04f294822b660e62d1b35f645abd4 | PHP | chefboyronron/wordpress-theming-basic | /inc/func-pagination.php | UTF-8 | 991 | 2.625 | 3 | [] | no_license | <?php
if( !function_exists('my_pagination') ){
function create_pagination(){
global $wp_query;
$big = 999999999; // need an unlikely integer
$pages = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '/page/%#%',
'current' => max( 1, get_query_... | true |
0e10fec4d99182e56e19b2a293bb6c10beec959c | PHP | mjaschen/collmex | /src/Type/Batch.php | UTF-8 | 778 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MarcusJaschen\Collmex\Type;
/**
* @author Marcus Jaschen <mail@marcusjaschen.de>
*
* @property string $type_identifier
* @property string $client_id
* @property string $batch_number
* @property string $product_id
* @property string $description
*/
class Batch extend... | true |
b63a8bff289a08d2cdbba81449b55c5a0d8bc1b4 | PHP | samuelola/myecommerce | /addcart1.php | UTF-8 | 3,443 | 2.640625 | 3 | [] | no_license | <?php require_once "resources/config.php" ?>
<?php
if(isset($_GET['add'])){
$result = myQuery("SELECT * FROM products WHERE product_id = ".escape_string($_GET['add'])."");
while($row = mysqli_fetch_assoc($result)){
if($row['product_quantity'] != $_SESSION['product_'. $_GET['add']]){
$... | true |
3d647118ce46bac5b1a48ea171997b3707d36d71 | PHP | nylbrian/field-calculator-optimized | /api/classes/seasons/Seasons.php | UTF-8 | 747 | 2.703125 | 3 | [] | no_license | <?php
class Seasons {
public function __construct() {
$this->handler = new SeasonsHandler();
}
public function add() {
$data = FormInput::post();
$result = $this->handler->add($data);
return ResponseHandler::formatJSONResponse($result);
}
public function edit($id = null) {
$data = FormI... | true |
9f22b3cf5d6285e28a739a2251f2380b5095bd37 | PHP | juliobarbagallo/cotizador | /export/listado.php | UTF-8 | 1,149 | 2.90625 | 3 | [] | no_license | <script language="JavaScript">
function confirmar ( mensaje ) {
return confirm( mensaje );
}
</script>
<?php
$mysqli = new mysqli("localhost", "id3786819_root", "new14you", "id3786819_cruz");
/* comprobar la conexión */
if (mysqli_connect_errno()) {
printf("Falló la conexión: %s\n", mysqli_connect_error());
e... | true |
db1160313a1cda79a3c1d82852c0d97f66616b83 | PHP | albanducos87/ProjetTuteure | /ProjetTuteure/classes/CV.class.php | UTF-8 | 1,227 | 3.234375 | 3 | [] | no_license | <?php
class CV{
private $idCV;
private $langue;
private $idDiplome;
private $description;
public function __construct($valeurs = array()) {
if (!empty($valeurs))
$this->affecte($valeurs);
}
public function affecte($donnees){
foreach ($donnees as $attribut => $valeur){
... | true |
2f50dcc196c9a55eedd5dc66dd10d3ac55452a1a | PHP | xpertbot/ContactForm | /contactform/controllers/ContactForm_MessageController.php | UTF-8 | 4,169 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Craft;
/**
* Contact Form controller
*/
class ContactForm_MessageController extends BaseController {
protected $allowAnonymous = true;
public function actionAdd() {
$this->requirePostRequest();
$settings = craft()->plugins->getPlugin('contactform')->getSettings();
$message = new ContactFo... | true |
b7e7e55e6e88051389a8003e61e9a6cfd2e79a0e | PHP | vikassy/crowd_sourcing | /database/seeds/TaskTableSeeder.php | UTF-8 | 2,367 | 2.53125 | 3 | [] | no_license | <?php
use Flynsarmy\CsvSeeder\CsvSeeder;
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
use App\Client;
class TaskTableSeeder extends Seeder {
public function run()
{
// Uncomment the below to wipe the table clean before populating
DB::table('tasks')->delete();
... | true |
9cc552a2c8c1e16d0e827ed611ee748e27f01083 | PHP | urodoz/PureMachineSDK | /src/PureMachine/Bundle/SDKBundle/Manager/StaticManager.php | UTF-8 | 1,141 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace PureMachine\Bundle\SDKBundle\Manager;
class StaticManager
{
/**
* Stores the data statically on the .static
* directory. It uses the key variable to create
* the filename
*
* @param $key
* @param $data
* @return int
*/
public static function storeData($... | true |
a2e49d94d0d8bc18d065fad3d22367b8b63e8bb3 | PHP | gamemoney-ps/gamemoney-php-sdk | /src/Config.php | UTF-8 | 1,785 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Gamemoney;
/**
* Class Config
* Contains configuration options for the Gateway
* @package Gamemoney
*/
class Config
{
const API_URL = 'https://paygate.gamemoney.com';
const SECURE_URL = 'https://secure.gamemoney.com/api/';
/** @var int */
private $project;
/** @var string */... | true |
6aa849385e42036ea541490706fbc2d99d9bae67 | PHP | unff/WHMCS-to-WordPress | /contactdeleted.php | UTF-8 | 1,915 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* WHMCS Hook to delete a WP account when a contact account gets deleted.
* --JC Ryan 26 Nov 2018
*/
add_hook('ContactDelete', 1, function($vars){
/*
$vars contains:
userid int
contactid int
*/
$wp_base_path = "c:/inetpub/wwwroot/sbsite/wp";
include... | true |
012cdc8d8df35f78d387edf07aae822762d57bdb | PHP | vasylNaumenko/scales9 | /php/Engine.php | UTF-8 | 5,718 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: n1
* Date: 20.10.2016
* Time: 18:54
*/
namespace Game;
class Engine
{
public $scales;
protected $db_credentials;
public $db;
public function __construct()
{
$this->db_credentials = [
'host' => 'localhost',
'db... | true |
86d3e4055d339ff1d8434edb96fc8a2af1a8fb9f | PHP | jcodewriter/pipapo | /api/app/Http/Controllers/API/CategoryController.php | UTF-8 | 3,546 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\API;
use Illuminate\Http\Request;
use App\Http\Controllers\API\BaseController as BaseController;
use App\Category;
use Validator;
use DB;
class CategoryController extends BaseController {
public function index() {
$categories = Category::all();
return $this->sendSuccess... | true |
1654c3d64643a1e8b73da9c44bd5b34f77c7515f | PHP | IndahSkr/Belajar-Web-Programing | /praktikum/tugas _array.php | UTF-8 | 1,196 | 3 | 3 | [] | no_license | <?php
// array
$customer = array(
"A001" => "Andi",
"A002" => "Budi",
"A003" => "Catur",
);
$barang = array(
"B001" => array(
"desc" => "Flashdisk Kingston 64GB",
"harga" => 75000,
),
"B002" => array(
"desc" => "Connector HDMI",
"harga" => 150000,
),
"B0... | true |
66e29d59deae0145e0be9526090f2876d58bf391 | PHP | hichamIT/CMS | /admin/profile.php | UTF-8 | 4,765 | 2.59375 | 3 | [] | no_license | <?php include("includes/admin_header.php");?>
<?php include("includes/admin_navigation.php");?>
<?php
if (isset($_SESSION['username'])) {
$query = "SELECT * FROM users where username='{$_SESSION['username']}'";
... | true |
4e24b12349e67c955d040ccad5e5ac02b610e557 | PHP | simplayy/quiz-patente | /server.php | UTF-8 | 3,657 | 2.96875 | 3 | [] | no_license |
<?php
error_reporting(E_ALL);
/* Allow the script to hang around waiting for connections. */
set_time_limit(0);
/* Turn on implicit output flushing so we see what we're getting as it comes in. */
ob_implicit_flush();
$address = '127.0.0.1';
$port = "5000";
// create a streaming socket, of type TCP/IP
$sock = soc... | true |
facac725f65e18c7878adc696d64ffabe4da2afd | PHP | nauAlex/test_220921 | /app/Entity/Employee/EmployeeInterface.php | UTF-8 | 171 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity\Employee;
interface EmployeeInterface
{
public static function getSkills(): array;
public static function can(string $skill): bool;
}
| true |
59a7ba3be2d644920bf5253e49a20ffc073c0313 | PHP | FaizilM/laravel-test | /app/Repositories/UserAdmins.php | UTF-8 | 415 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\UserAdmin;
class UserAdmins
{
public function findAll() {
return UserAdmin::all();
}
public function save(UserAdmin $UserAdmin) {
return $UserAdmin->save();
}
public function findByUsername($username,$password){
r... | true |
e24a4a0e19c7b5c2784b8d395e84517110a83821 | PHP | rolexmessi/101 | /wp-content/themes/festing/includes/widget/trending_tags_border_widget.php | UTF-8 | 3,387 | 2.625 | 3 | [] | no_license | <?php
/* Kentooz Framework widget for tags posts. */
class ktz_tags_border_posts extends WP_Widget {
function ktz_tags_border_posts() {
$widget_ops = array( 'classname' => 'widget_tag_cloud clearfix', 'description' => __( 'Trending tags.',ktz_theme_textdomain ) );
$this->WP_Widget('ktz-tags-border-posts', __( 'KT... | true |
0665902a142ce1d5f2fe4eece04e568c76afb2b5 | PHP | matgar1997/showtech | /testemail/email-inc.php | UTF-8 | 1,039 | 2.578125 | 3 | [] | no_license | <?php
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
@session_start();
//Load Composer's autoloader
require 'vendor/autoload.php';
function send_mail($recipient,$subject,$mess... | true |
018d72adcd313d97307df5caf95b4e77933c1e19 | PHP | MHDHASBYNAZARUDIN/webapps | /app/Commands/ModuleCreate.php | UTF-8 | 11,074 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Commands;
use CodeIgniter\CLI\BaseCommand;
use CodeIgniter\CLI\CLI;
/**
* Create a Module in Modular structure
*
* @package App\Commands
* @author XPerez <>
*/
class ModuleCreate extends BaseCommand
{
/**
* Group
*
* @var string
*/
protected $group = 'Develo... | true |
0771744171b15b6c5ba985909ec785f7725b5f5e | PHP | LonDev/test-backend | /test-backend/app/Http/Controllers/ContatoController.php | UTF-8 | 1,020 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Http\Request\ContatoRequest;
use App\Http\Models\Contato;
Class ContatoController extends Controller{
//chama a classe de autenticação na contrução da classe
public function __construct(){
$this->middleware('auth');
}
//chama a v... | true |
f51d09321249c6cb6e9a08649a56d95aa775091c | PHP | joker-eph/phabricator | /src/infrastructure/util/PhabricatorGlobalLock.php | UTF-8 | 4,851 | 2.8125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Global, MySQL-backed lock. This is a high-reliability, low-performance
* global lock.
*
* The lock is maintained by using GET_LOCK() in MySQL, and automatically
* released when the connection terminates. Thus, this lock can safely be used
* to control access to shared resources without implementing a... | true |
060e10baba329fff7ff92c4a2b2372dd2b48ba4d | PHP | Daniele-Tentoni/FowDeckHub_old | /ajax/event_ajax.php | UTF-8 | 3,513 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
// Variabili globali, funzioni di db/login e controllers.
require_once '../definings.php';
require_once ROOT_PATH . '/config/functions.php';
sec_session_start();
require_once ROOT_PATH . '/controllers/event_controller.php';
$result = array();
$result["result"] = false;
$result["error"] = "nothing";
$content = "";... | true |
7fd6f422013804492add57ef7dff2a83cf8ae133 | PHP | africanacademyofsciences/aasaesaweb | /treeline/includes/page.class.php | UTF-8 | 95,767 | 2.734375 | 3 | [] | no_license | <?php
class Page {
// A couple of conventions:
// load() loads an object
// save() saves an object
// get() gets a value
// put() updates a value ?
// draw() outputs data as HTML, or a string usable in an HTML page
public $guid;
private $sort_order;
// should ALL these be private, beca... | true |
f70767e33381bc75d78db6bdcfffd5bd06a6696e | PHP | aleksot/videostat | /app/Services/Adapters/Service/Twitch.php | UTF-8 | 1,981 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Videostat\Services\Adapters\Service;
use TwitchApi\TwitchApi;
use Videostat\Contracts\Database\Models\GameService;
class Twitch
{
const API_STREAM_TYPE_LIVE = 'live';
const TWITCH_API_MAX_COUNT_PER_CHUNK = 100;
protected $api;
public function __construct(TwitchApi $api)
{
... | true |
5957980f6d1289e0e5e2947fe2e8889d14209ae1 | PHP | phanthienhoang/Bootcamp-PHP | /Luyện tập PHP/Ss11 MVC/MVC Product/Model/ProductDB.php | UTF-8 | 3,139 | 3.125 | 3 | [] | no_license | <?php
namespace Model;
class ProductDB
{
public $connection;
public function __construct($connection)
{
$this->connection = $connection;
}
// lấy dữ liệu database
public function getAll()
{
$sql = "SELECT * FROM products... | true |
e6be8196f0398921d4dc1c005d228b7337cbfba5 | PHP | gfertel/mulberry-m1-extension | /app/code/local/Mulberry/Warranty/Helper/Uuid/Generator.php | UTF-8 | 4,205 | 2.828125 | 3 | [] | no_license | <?php
/**
* @category Mulberry
* @package Mulberry_Warranty
* @author Mulberry <support@getmulberry.com>
* @version 1.0.0
* @copyright Copyright (c) 2021 Mulberry Technology Inc., Ltd (http://www.getmulberry.com)
* @license http://opensource.org/licenses/OSL-3.0 The Open Software License 3.0 (OSL-3.0)
*/
class ... | true |
71d2431ffbbf0869efd8a6156ac60286c0f66fa8 | PHP | sheerockoff/bitrix-ci | /files/bitrix/modules/sale/lib/tradingplatform/vk/vkexporteddata.php | UTF-8 | 3,273 | 2.875 | 3 | [
"Unlicense"
] | permissive | <?php
namespace Bitrix\Sale\TradingPlatform\Vk;
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\ArgumentNullException;
use Bitrix\Main\Application;
Loc::loadMessages(__FILE__);
/**
* Class VkExportedData
* Short-time cqche of exported vk-albums or products.
* Need for accelerate, because this data requested al... | true |
8a8e820c2e5bb6589620d7bd5f8b80c523be5d02 | PHP | mjidhkhan/learning | /search_result.php | UTF-8 | 2,020 | 2.625 | 3 | [] | no_license | <?php require_once("includes/session.php"); ?>
<?php require_once("includes/connection.php"); ?>
<?php include("includes/header.php"); ?>
<?php
$var= htmlentities($_GET['search']);
$trimmed = trim($var);
if (!isset($var))
{
echo "<p>We dont seem to have a search parameter!</p>";
exit;
}
?>
<!------ ... | true |
212b3867f52a7fc80841ea4db8682a28f59988b8 | PHP | stefna/person-contracts | /src/Values/RealEmailAddress.php | UTF-8 | 566 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Stefna\PersonContract\Values;
use Stefna\PersonContract\Exceptions\InvalidEmail;
final class RealEmailAddress implements EmailAddress
{
public static function fromString(string $email): self
{
if (\filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
throw new Invali... | true |
db43960a8eb4b3a03600aa8fa732865084e0f047 | PHP | nguyenducxinh201/hotell | /app/Repositories/Eloquent/ListRoomRepository.php | UTF-8 | 548 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Repositories\Eloquent;
use App\Models\Room;
use DB;
class ListRoomRepository{
private $room;
public function __construct(Room $room){
$this->room=$room;
}
public function getAllHotel($id){
return $this->room::where('hotel_id',$id)->get();
}
... | true |
d6f38fd80e45a4c55d25ec9915acbc427e94b1f2 | PHP | ElhoubeBrahim/laquatat | /classes/User.class.php | UTF-8 | 14,684 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This Class Allows Us To Manage Users & Their Actions -- Register, Login, Logout --
*/
class User extends DB {
use Upload;
// Stores All Unexpected Validation Errors
public $errors = array();
/**
* This Function Runs When The User Tries To Create New Account :
* => Validate Se... | true |
63b8062ab9b5e321563ce7af6dd5bb8721d34dca | PHP | speakerbug/PiggyPennies | /vendor/sparkpost/php-sparkpost/test/unit/SendGridCompatibiility/EmailTest.php | UTF-8 | 4,804 | 2.59375 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
use SparkPost\SendGridCompatibility\Email;
class SendGridCompatibilityEmailTest extends \PHPUnit_Framework_TestCase {
private $email;
public function setup() {
$this->email = new Email();
}
public function testConstruct() {
$email = new Email();
$this->assertInstanceOf('SparkPost\SendGrid... | true |
e5577024d7247bf744e124a8f3438ab10c76af79 | PHP | odenktools/stoplite | /src/Stoplite/Models/Role.php | UTF-8 | 1,113 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Odenktools\Stoplite\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
use Odenktools\Stoplite\Traits\RoleTrait;
use Illuminate\Database\Eloquent\Model;
use Odenktools\Stoplite\Contracts\RoleRepository as OdkRoleRepository;
/**
* @todo
* @license MIT
*/
class Role extends Model
{
//use SoftDel... | true |
ef25e24e662905b03bbae0070bc91508afceb232 | PHP | RicardoBravoA/APiSlim | /include/db_handler.php | UTF-8 | 2,437 | 2.96875 | 3 | [] | no_license | <?php
class DbHandler {
private $conn;
function __construct() {
require_once dirname(__FILE__) . '/db_connect.php';
$db = new DbConnect();
$this->conn = $db->connect();
}
// Places By Description
public function getPlaceByDescription($description) {
if($descript... | true |
ba41b01f8f8682b96ab1c00b063ee706c7ddc49d | PHP | samarth4487/Shirts4you | /contact.php | UTF-8 | 2,080 | 2.546875 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD'] == "POST"){
$name = trim($_POST['name']);
$email = trim($_POST['email']);
$message = trim($_POST['message']);
if($name == "" OR $email == "" OR $message == ""){
header("Location: contact.php?status=invalid");
exit;
}
$email_body = "";
$email_body = $email_body . "Name: ... | true |
35386996b92dfc88ed2457e3a1ed6850a89bab72 | PHP | smskin/qugo-rabbitmq-transfer | /src/Ecosystem/FNS/Events/EReceiptCreated.php | UTF-8 | 971 | 2.71875 | 3 | [] | no_license | <?php
namespace Qugo\RabbitMQTransfer\Ecosystem\FNS\Events;
use Qugo\RabbitMQTransfer\BaseEvent;
use Qugo\RabbitMQTransfer\Ecosystem\FNS\DTO\DTOEReceiptCreated;
/**
* Class EReceiptCreated
* @package Qugo\RabbitMQTransfer\Ecosystem\FNS\Events
*/
class EReceiptCreated extends BaseEvent
{
/**
* @var string... | true |
bc7ab299e4463ff2318f05cb3cc1981451d6d51b | PHP | 123jason/Imora | /webservice/src/Oradt/StoreBundle/Entity/I18nStateProvince.php | UTF-8 | 2,512 | 2.515625 | 3 | [] | no_license | <?php
namespace Oradt\StoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* I18nStateProvince
*/
class I18nStateProvince
{
/**
* @var string
*/
private $countryId;
/**
* @var string
*/
private $enName;
/**
* @var string
*/
private $nativeName;
/**
... | true |
2347fb0c98f4dfae7f7bc97d69d263b6065454a2 | PHP | UF-Asq-Fab-Lab/Scheduler | /LabTool.php | UTF-8 | 1,797 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Infinity Fab Lab Charge Class
*
* Developed for the Infinity Fab Lab at the University of Florida.
* Defines a Lab Charge page type which holds data and behaviors relevant to an
* individual charge.
*
* Thomas R Storey, 2016
* Licensed under MIT License, see LICENSE.TXT
*
* http://fablab.arts.ufl.... | true |
10bb77046e0380b8b9ad1b8cd967699c3f1d1752 | PHP | jcamiloduque/AppFramework | /library/configuration.php | UTF-8 | 672 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Framework;
class Configuration {
private static $data = array();
public static function add(&$value){
self::$data=&$value;
}
/**
* @param $key
* @param null $base
* @return mixed|null
* @throws \Exception
*/
public static function... | true |
dd3e0da0283f373ce3989a4cf4798fa898541996 | PHP | VitaliyKostak/test | /controllers/sidebarLinksGenerateController.php | UTF-8 | 1,824 | 2.515625 | 3 | [] | no_license | <?php
class sidebarLinksGenerateController
{
public static function Generate($pageName)
{
$sidebarLinks = require ('config/sidebarLinks.php'); // Підключення sidebarLinks
$siteName = require('config/siteName.php');
if ( isset($_SESSION['logged_user']['id']) ) {
$user = R::findOn... | true |
2057f751db0e83e13ebe3de3b1846b50811ed8da | PHP | achyut/Medico-backend | /app/models/Medicalrecord.php | UTF-8 | 186 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
class Medicalrecord extends Eloquent {
protected $guarded = array();
public static $rules = array(
'patient_id' => 'required',
'patient_information_id' => 'required'
);
}
| true |
c8a55bc074b5a83386596d630c354b4b625fb9e3 | PHP | ministryofjustice/opg-use-an-lpa | /service-api/app/src/App/src/Handler/CompletePasswordResetHandler.php | UTF-8 | 1,356 | 2.5625 | 3 | [
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Handler;
use App\Exception\BadRequestException;
use App\Service\User\UserService;
use Exception;
use Laminas\Diactoros\Response\JsonResponse;
use ParagonIE\HiddenString\HiddenString;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use ... | true |
e4e10fc835de214254a9f118d5da290d1b38fd1e | PHP | kaykay95/SklepInternetowy | /src/Entity/NegotiationExpression.php | UTF-8 | 1,184 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\NegotiationExpressionRepository")
*/
class NegotiationExpression
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Ma... | true |
14c086a8d3982d80d8ec111e4136500143e4a015 | PHP | erwanf/TV-4IM | /Model/ChaineDTO.php | UTF-8 | 3,203 | 3.140625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Erwan
* Date: 31/03/2015
* Time: 11:09
*/
namespace Model;
class ChaineDTO {
/* ******************** Atributes ******************************/
private $chaine_id;
private $nom_chaine;
private $adresse;
private $code_postal;
private $ville;
pri... | true |
61268b077bd14e7122fa38c738d06e54e8341f48 | PHP | everdaniel/game_simulation | /tests/GameHelperTest.php | UTF-8 | 1,888 | 2.875 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
final class GameHelperTest extends TestCase
{
public function testHandlesInvalidParameter()
{
$this->expectException(TypeError::class);
GameHelper::decide_who_goes_first('invalid');
}
public function testHandlesNoPlayersInArray()
{
$t... | true |
76db8b8e73840385c7e141ce9b2233b43749eecc | PHP | mengtest/mshdgameServer | /model/petModel.php | UTF-8 | 3,468 | 2.515625 | 3 | [] | no_license | <?php
include_once '../model/entityModel.php';
class petmodel extends entitymodel
{
public function getmodeldata()
{
$level = $_POST['level'];
$level = intval($level);
$results = $this->db->select2('petModel','*',"level = $level",false,1);
$head = 'Level,IDPrefab,属性,远程进程,魔法值,血量,攻击力,攻击距离,防御力,巡视... | true |
35ee81eb4b4a4957f670d6549a4539603a9240ef | PHP | diegoclair/WebDeveloperCourse | /008-PHP/001_inicial_php/if_else_operadores.php | UTF-8 | 2,651 | 4.25 | 4 | [] | no_license | <?php
//OPERADORES DE COMPARACAO
// == é igual?
// === é igual e do mesmo tipo (identico)?
// != ou <> é diferente?
// !== é diferente e/ou do tipo diferente?
//< é menor que
//> é maior que
//<= é menor ou igual ... | true |
9b4e06e7b70690d9a633c7497efc32228ca7942c | PHP | aries-malaca/laravel-appointment-online | /app/Jobs/SendEmailJob.php | UTF-8 | 1,758 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Mail;
class SendEmailJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueu... | true |
9a6d650cb8f3ba614706dab4b7ff6f3e834832c9 | PHP | gauravkoradiya/car_selling | /php/logout.php | UTF-8 | 263 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
session_start();
?>
<?php
// remove all session variables
session_unset();
// destroy the session
session_destroy();
echo "";
echo "All session variables are now removed, and the session is destroyed.";
header("Location: https://localhost/home.html");
?>
| true |
19a5d4575b8f0f52bc462735bb2504044df24bdd | PHP | hamaspyur/flower-symfony | /lib/model/doctrine/base/BaseUser.class.php | UTF-8 | 2,265 | 2.640625 | 3 | [] | no_license | <?php
/**
* BaseUser
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property string $name
* @property string $email
* @property string $facebook_id
* @property string $facebook_token
* @property Doctrine_Collection $Users
*
* @method string getName() Retu... | true |
631f3651a05391f688300cb6062a3f9e014f049f | PHP | juan-morales/footprint-php | /src/Modules/CSV.php | UTF-8 | 1,077 | 2.859375 | 3 | [] | no_license | <?php
namespace Footprint\Modules;
use Footprint\Interfaces\IModule;
use Footprint\Tracker;
class CSV implements IModule
{
const MODULE_ID = "CSV";
protected $fileHandler;
public function __construct(string $filename) {
if (!$this->fileHandler = fopen($filename, "w+")) {
return;
... | true |
590ddab6067451bdac4b9c442fb94698edd71425 | PHP | FashtimeDotCom/pimcore | /pimcore/models/Object/Class/Data/Trait/Text.php | UTF-8 | 1,737 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Pimcore
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.pimcore.org/license
*
* @category Pimcore
* @package Object_Class
... | true |
5b94ff561bd1e68216f3d3382f8da1be1e5d2591 | PHP | ArielSolano/Trabajos-de-Practica | /PHP ejercicios/ejercicio3/salario.php | UTF-8 | 303 | 2.71875 | 3 | [] | no_license | <?php
$pago=$_POST ['pago'];
$hora=$_POST ['hora'];
$inss= 0.15;
$IR= 0.06;
$salario=$pago*$hora;
echo "SALARIO", "<Hr>";
echo "El salario es:", $salario;
echo "<hr>";
echo "<br>";
echo "<br>";
echo "DEDUCCIONES:";
echo "<hr>";
echo "INSS:", $salario*$inss;
echo "<br>";
echo "IR:", $salario*$IR;
?> | true |
1a23aefd94bfdaf5e6656aebf90ebbcd352d56ae | PHP | yvoloshin/PHP-scripts | /factorial.php | UTF-8 | 339 | 3.203125 | 3 | [] | no_license | <?php
function longest_substr($str1, $str2) {
$common = Array();
$str1_arr = str_split($str1);
$str2_arr = str_split($str2);
foreach($str1_arr as $value) {
if(in_array($value, $str2_arr) && !in_array($value, $common)) {
array_push($common, $value);
}
}
return $common;
}
print_r(longest_substr("ABCD... | true |
0d2fc76023636168b9e086235da93f4628b2c63d | PHP | daimin/alump | /libs/model/Relation.php | UTF-8 | 2,027 | 2.578125 | 3 | [] | no_license | <?php
class ALump_Relation extends ALump_Model{
public $post_id = 0;
public $meta_id = 0;
function __construct($row){
parent::__construct($row);
$this->post_id = $this->get('post_id');
$this->meta_id = $this->get('meta_id');
}
public static function save($rel){
$db = ALump_Db::getInstance();
$db... | true |
1e5f147d75920f96214b5d4208e97fb06db6d9c2 | PHP | gmegidish/master-of-dimension-rewrite | /decode-video.php | UTF-8 | 6,858 | 2.6875 | 3 | [] | no_license | <?php
class SentenceReader
{
private $_strings = [];
public function __construct(string $filename)
{
$this->read($filename);
}
public function get(string $id): string
{
return $this->_strings[$id] ?? "";
}
private function mb_strrev(string $str): string
{
$r = '';
for ($i = mb_strlen... | true |
3f6d61deda3d7ecd3dd173bf7446228955aec360 | PHP | evillemez/Transcoding | /Event/MessageEvent.php | UTF-8 | 1,483 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace AC\Transcoding\Event;
use AC\Transcoding\Adapter;
use Symfony\Component\EventDispatcher\Event;
/**
* This event allows adapters to dispatch messages via the Transcoder.
*
* @package Transcoding
* @author Evan Villemez
*/
class MessageEvent extends Event
{
/**
* A debug level message
... | true |
fdd297d87dd2fee85b3004a5a36ec510acf1ee9e | PHP | mardawaip/ci4crud | /app/ThirdParty/My-class/src/Validator.php | UTF-8 | 293 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Myclass;
class Validator
{
public function strong_password(string $str): bool
{
if(strlen($str)<6 || preg_match('/[A-Z]/g',$str)){
$error = 'password must have at least 6 character and 1 capital letter';
return false;
}
return true;
}
}
| true |
f9fad2aad6016c056d247ab7a0048ac6b831b60c | PHP | cahyosukses/koperasi | /modul/user/data_poll.php | UTF-8 | 5,614 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
include'../include/db.php';
$id_poll=$_GET['id_poll'];
$del=mysql_query("delete from arr_poll");
$sql2 = mysql_query("SELECT distinct id_poll FROM poll");
while($row2=mysql_fetch_array($sql2))
{
$x=0;
$arr_poll=mysql_query("SELECT * FROM poll where id_poll='$row2[id_poll]'");
while($tarr=mysql_fetch_array($a... | true |
2d9d6448b45082945d3a21963b66a7c82e9cc020 | PHP | JamesBondsky/4lapy | /src/Catalog/Model/Filter/InternalFilter.php | UTF-8 | 4,008 | 2.65625 | 3 | [] | no_license | <?php
namespace FourPaws\Catalog\Model\Filter;
use Elastica\Query\AbstractQuery;
use FourPaws\Catalog\Collection\AggCollection;
use FourPaws\Catalog\Collection\VariantCollection;
use FourPaws\Catalog\Model\Filter\Abstraction\FilterBase;
use Symfony\Component\HttpFoundation\Request;
/**
* Class InternalFilter
*
* ... | true |
0fc5d200ddad7fa01b652ab3bb5b39ac893b6a90 | PHP | wushiyun/xinxintong | /models/matter/addressbook/tag.php | UTF-8 | 1,143 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace matter\addressbook;
/**
*
*/
class tag_model extends \TMS_MODEL {
/**
*
*/
public function &byId($id, $fields='*')
{
$q = array(
$fields,
'xxt_ab_tag',
"id='$id'"
);
$t = $this->query_obj_ss($q);
return $t;
... | true |
36d1cb8d88b126b8ada5a9c41aaad2a55c6cc9c3 | PHP | sullivanv/Microshell | /include/commandes2.php | UTF-8 | 3,079 | 2.828125 | 3 | [] | no_license | <?php
// commandes2.php for microshell in /home/vitiel_s/PiscinePHP/Microshell/include
//
// Made by VITIELLO Sullivan
// Login <vitiel_s@etna-alternance.net>
//
// Started on Fri Oct 23 15:46:15 2015 VITIELLO Sullivan
// Last update Sat Oct 24 11:51:42 2015 VITIELLO Sullivan
//
function ft_ls($str)
{
if (isset... | true |