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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1d1712aab067a06b12ec0ef5603ae8f5934e9a61 | PHP | fiboknacky/googleads-php-lib | /examples/AdWords/v201809/CampaignManagement/AddDraft.php | UTF-8 | 4,408 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2017 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ... | true |
1bcd06e2f71380ce9d4e6dcf0c0e601bf883c28f | PHP | tn-puzanova/aa_dev | /common/auth/services/SignupService.php | UTF-8 | 3,598 | 2.578125 | 3 | [] | no_license | <?php
namespace common\auth\services;
use common\auth\forms\UserEmailForm;
use common\sending\helpers\DictSendingTemplateHelper;
use common\sending\helpers\SendingDeliveryStatusHelper;
use common\sending\models\SendingDeliveryStatus;
use common\sending\repositories\SendingDeliveryStatusRepository;
use common\sending... | true |
9b68d0784a1dad8ada2ee09f64eb366e1099d753 | PHP | drootz/projecklist | /public/registered.php | UTF-8 | 2,791 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
// configuration
require("../includes/config.php");
// if user already logged in redirect to home page
if (!empty($_SESSION["id"]))
{
// redirect user
redirect("/");
}
// if user reached page via GET (as by clicking a link or via redirect)
if ($_SERVER["REQUEST_... | true |
e980fb624edb31613bfdf5282754738fb9c4fb11 | PHP | soukicz/hyperslevy | /src/Api.php | UTF-8 | 2,268 | 3.046875 | 3 | [] | no_license | <?php
namespace Hyperslevy;
use GuzzleHttp\Client;
use Hyperslevy\Response\AbstractResponse;
use Hyperslevy\Response\SuccessResponse;
class Api {
/**
* @var Client
*/
protected $httpClient;
/**
* @var string
*/
const CZ = 'hyperslevy.cz';
/**
* @var string
*/
p... | true |
6819fca262173890d229cdef1b5ee01991aaef43 | PHP | vickyfebiola/18104022_VickyFebiola | /Pertemuan 6/tugas/syntax.php | UTF-8 | 502 | 3.875 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>PHP Syntax</title>
</head>
<body>
<?php
// syntax pada PHP yaitu sensitif jadi untuk penulisan variabel harus sesuai sedangkan untuk penulisan keyword tidak termasuk case sensitif
// mendeklarasikan variabel
$color = "red";
$COLOR = "blue";
$coLOR = "yellow";
// menampilkan... | true |
6b47e28cf1cacdc4a2fb9a774627c739cc1243b8 | PHP | davidangel/retext | /app/controllers/KeywordsController.php | UTF-8 | 2,057 | 2.75 | 3 | [] | no_license | <?php
class KeywordsController extends BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$keywords = Keyword::all();
return View::make('keywords.index')->with('keywords', $keywords);
}
/**
* Show the form for creating a new resource.
... | true |
80915686b6cfc9c4a9485650cc53ffa6550aaf76 | PHP | SirNarsh/rabbitrq | /app/Console/Commands/LogListener.php | UTF-8 | 1,041 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Services\ExchangeService;
use App\Services\MessageService;
use App\Services\MessagingAmqpService;
use Illuminate\Console\Command;
class LogListener extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
prote... | true |
f359d413f3ced81fd9a8e76e85a6b33e79458205 | PHP | FilipBenco/php-workshop-db | /commands/HelloController.php | UTF-8 | 1,559 | 2.90625 | 3 | [] | no_license | <?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace app\commands;
use app\models\User;
use yii\console\Controller;
use yii\console\ExitCode;
use yii\db\Query;
/**
* This command echoes the first argument tha... | true |
747997f5b9c216950b6f901662a26661bb9f9dc5 | PHP | mustardandrew/muan-laravel-admin | /app/Services/TagService.php | UTF-8 | 540 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Muan\Admin\Services;
use Illuminate\Database\Eloquent\Collection;
use Muan\Tags\Models\Tag;
/**
* Class TagService
*
* @package Muan\Admin\Services
*/
class TagService
{
/**
* Find tags
*
* @param string $query
* @param int $limit
* @return Collection
*/
pub... | true |
58de4a793a8799934f4aaf4cdc4773278bd3f9af | PHP | pablius/gitcordinator | /desarrollo/modulos/project/oo/project_sprint.php | UTF-8 | 2,265 | 2.71875 | 3 | [] | no_license | <?php
// sprint (id, fecha_inicio, fecha_cierre, project_id, goal => text, eval_meeting_result => TEXT)
class project_sprint extends OOB_model_type
{
static protected $public_properties = array(
'start' => 'object-Date',
'finish' => 'object-Date',
'id_project' => 'object-project_project',
'goa... | true |
901190811226962c20287791b9ada5e2a9192704 | PHP | google-code-backups/add-mvc-framework | /project/tags/0.10.7/functions/url.functions.php | UTF-8 | 1,274 | 2.8125 | 3 | [] | no_license | <?php
/**
* Returns the complete url according to $base
*
* @param string $base
* @param string $url
*
* @since ADD MVC 0.5
*
* @version 0.1
*/
function build_url($base,$url) {
$base_parts=url_parts($base);
# https://code.google.com/p/add-mvc-framework/issues/detail?id=81
if (preg_match('/^javascrip... | true |
463462b15a69d40a6f218c0e609549e5e8e23826 | PHP | bethySoto/outfit | /app/model/chats.php | UTF-8 | 2,267 | 2.828125 | 3 | [] | no_license | <?php
class chats
{
private $db;
public function __construct()
{
$this->db = new Base;
}
public function fetch_user_chat_history($from_user_id, $to_user_id)
{
$this->db->query("SELECT * FROM chats WHERE (idFromUser = :fromUser AND idToUser = :toUser)
OR (... | true |
0ec110af4f1d2ab3f6b71d682f647a8307abfce7 | PHP | cineasthales/CliniControl | /application/models/Especialidade_Model.php | UTF-8 | 856 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
class Especialidade_Model extends CI_Model {
public function select() {
$sql = "SELECT * FROM especialidade ORDER BY id";
$query = $this->db->query($sql);
// result retorna um array de dados
return $query->result();
}
public function find($id) {
$sql = "SELEC... | true |
9b066ac9aad87003c568839c7c8916055e6588f9 | PHP | josephmtaylor/hpi-data | /ajaxsearch/ajaxaddresslist.php | UTF-8 | 2,897 | 2.765625 | 3 | [] | no_license | <?
include_once "../classes/address.class.php";
require_once "../classes/city.class.php";
require_once "../classes/state.class.php";
require_once "../classes/zipcode.class.php";
$A = new AddressClass;
$C = new CityClass;
$S = new StateClass;
$Z = new ZipcodeClass;
if ( isset($_GET['q']) && $_GET['q'] !=... | true |
6e389cc6f7029d81e592c3dc6c8dd95a3eec4f70 | PHP | ABPxDFW/phplessons | /Chapter3/sendemail.php | UTF-8 | 726 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: abpxninja
* Date: 12/11/2016
* Time: 11:20 PM
*/
$from = 'InfiniteSoaring24@gmail.com';
$subject = $_POST['subject'];
$text = $_POST['elvismail'];
$dbc = mysqli_connect('localhost', 'ABPxNiNjA','test','elvis_store')
or die('Error connecting to MySQL Server.');
$quer... | true |
2b3043ef32db0aded31bde12227bd91303cd9630 | PHP | gabrielaugustocampos/projeto1 | /app/Arquivo.php | UTF-8 | 3,107 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Arquivo extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'tb_arquivos';
/**
* The primary key for the model.
*
* @var string
*/
protected $primary... | true |
e835f2a7bcc915352e2c57e2fc997c3d77ad4896 | PHP | yuly94/elaundry | /php-backend/libs/LibsLoader.php | UTF-8 | 800 | 2.765625 | 3 | [] | no_license | <?php
namespace Libs;
class Libs{
public static function autoload($className){
$baseDir = __DIR__.DIRECTORY_SEPARATOR;
$className = ltrim($className, '\\');
$fileName = $baseDir;
if ($lastNsPos = strripos($className, '\\')) {
$namespace = substr($className, 0, $las... | true |
eece023db5df73d07ee67d813d13d9ed3d693ab9 | PHP | dziewxc/plants | /src/Dogs/DogBundle/Entity/Dog.php | UTF-8 | 4,865 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
//src Dogs/DogBundle/Entity/Dog.php
namespace Dogs\DogBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
*@ORM\Entity(repositoryClass="Dogs\DogBundle\Entity\Repository\DogRepository")
*@ORM\Table(name="dogs")
*@ORM\HasLifeCycleCallbacks
*/
class Dog
{
/**
... | true |
9099bc6a0e48a7777ee88033c18fc8f3bdd748f7 | PHP | webhdx/ezplatform-graphql | /src/Schema/Worker.php | UTF-8 | 569 | 2.640625 | 3 | [] | no_license | <?php
namespace EzSystems\EzPlatformGraphQL\Schema;
interface Worker
{
/**
* Does the work on $schema.
*
* @param Builder $schema
* @param array $args
* @return void
*/
public function work(Builder $schema, array $args);
/**
* Tests the arguments and schema, and says if ... | true |
33987cd3888a67d028550a42c5081a58bf6f8775 | PHP | rajnishmsrit/testing | /tests/mockery/mockeryTest.php | UTF-8 | 1,258 | 2.796875 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
require_once '../../vendor/autoload.php';
class mockeryTest extends TestCase {
/**
* [testCreateAMockedObject description]
* @return [type] [description]
*/
function testCreateAMockedObject() {
// With PHPUnit
// $phpunitMock = $this->getMoc... | true |
0733c2ab568e5f8bda8b6bb447ccac4580ca7d71 | PHP | ryguy2407/ryanmurray | /app/Helpers/functions.php | UTF-8 | 158 | 2.6875 | 3 | [] | no_license | <?php
function get_age() {
$date = \Carbon\Carbon::createFromDate(1985,07,24);
return $date->diffForHumans(null, \Carbon\CarbonInterface::DIFF_ABSOLUTE);
} | true |
d3319c2ba8e5015a5813b38deded567e8a145d8d | PHP | pavlenko/php-component-grid | /src/ResolvedGridType.php | UTF-8 | 4,435 | 2.515625 | 3 | [] | no_license | <?php
namespace PE\Component\Grid;
use PE\Component\Grid\Exception\InvalidArgumentException;
use PE\Component\Grid\GridType\GridTypeInterface;
use PE\Component\Grid\GridTypeExtension\GridTypeExtensionInterface;
use PE\Component\Grid\View\GridView;
use PE\Component\Grid\View\RowView;
use Symfony\Component\OptionsResol... | true |
705c8cda944c46bfd5e937570c1517af24d61051 | PHP | Skonchy/SecurityProject | /scripts/createDB.php | UTF-8 | 1,399 | 2.890625 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Create database
$sql = "CREATE DATABASE 410Project";
if ($conn->q... | true |
0b31dcbc56659f1f4dcb308267d0d167c5465832 | PHP | Wojtos/SimpleWebApp | /src/DTO/ProfileRequest.php | UTF-8 | 1,816 | 2.9375 | 3 | [] | no_license | <?php
namespace App\DTO;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Validator\Constraints as Assert;
class ProfileRequest
{
/**
* @Assert\NotBlank()
*/
private string $firstName;
private string $lastName;
/**... | true |
e9884482334a582fd60c6ede3959046e54a79235 | PHP | HeiHeiHeiHeiHeiHH/note | /Models/Strategy/IdComparator.php | UTF-8 | 160 | 2.734375 | 3 | [] | no_license | <?php
namespace Models\Strategy;
class IdComparator implements ComparaInterface {
public function compare($a, $b): int {
return $a['id'] <=> $b['id'];
}
} | true |
f12822ce570711dbfdde84ad04abf07503670f20 | PHP | alimansoori/base-api | /app/Lib/DTE/Table/TColumns.php | UTF-8 | 1,930 | 2.921875 | 3 | [] | no_license | <?php
namespace Lib\DTE\Table;
use Lib\DTE\Table\Columns\Column;
use Lib\DTE\Table\Columns\IColumn;
use Lib\Exception;
trait TColumns
{
/** @var Column[] $columns */
private $columns = [];
private $targetColumn = 0;
abstract public function initColumns();
/**
* @return Column[]
*/
... | true |
b27900061dea9341609e4900dc96dbedaafc3b23 | PHP | Pronto-am/MobileBundle | /src/Utils/Firebase/CloudMessaging/Message.php | UTF-8 | 4,037 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Pronto\MobileBundle\Utils\Firebase\CloudMessaging;
class Message
{
public const PRIORITY_NORMAL = 'normal';
public const PRIORITY_HIGH = 'high';
private array $fields;
public function __construct()
{
// Set the default fields
$this->fields = [
'notific... | true |
aa15a0d6d84f9c6bb21252da05711d1d3a82df53 | PHP | slegoza/POC | /framework/src/cache/cacheimplementation/Cache.php | UTF-8 | 3,593 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*Copyright 2011 Imre Toth <tothimre at gmail>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | true |
a4e1449b5730914788be3731a71eadfef2a50bdb | PHP | quy-world/sudoku | /sudokuapi.php | UTF-8 | 8,063 | 2.75 | 3 | [] | no_license | <?php
$json = trim(file_get_contents('php://input'));
$data = json_decode($json, true);
ini_set("memory_limit", "-1");
set_time_limit(0); // to perform recursion
function genpuzzle($str){
// str -> [[ints|false]]
$as = explode(',', $str);
$as = array_map(function($a){ return str_split($a, 1); }, $as);
return ar... | true |
1fcd7c17d6acd0f4a91736825bcfa635476f3b84 | PHP | jcapoduri/courses-examples | /project/api/controllers/user.controller.php | UTF-8 | 1,377 | 2.625 | 3 | [] | no_license | <?php
require_once __DIR__.'/../managers/contracts/user.manager.contract.php';
require_once __DIR__.'/../helpers/basic.controller.php';
class userController extends basicController {
protected $manager;
public function __construct(IuserManager $mgr) {
$this->manager = $mgr;
parent::__const... | true |
4c34168311834c393bf73babf1cef98d5c4c8a32 | PHP | xiaopz2019/erp_opensource | /vendor/yiisoft/yii2/behaviors/SerializeBehavior.php | UTF-8 | 3,244 | 2.921875 | 3 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | <?php
/**
* SerializeBehavior class file.
*
* @author fanjs
*
*/
namespace yii\behaviors;
use yii\db\ActiveRecord;
use yii\base\Behavior;
/**
* SerializeBehavior allows a model to specify some attributes to be
* arrays and serialized upon save and unserialized after a Find() function
* is called... | true |
81c5cfc2f0d5c9efc8e692dff92d1825da0d872d | PHP | knowledge2520/test-20170309 | /trunk/application/core/Base_Controller.php | UTF-8 | 2,326 | 2.796875 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
// ------------------------------------------------------------------------
/**
* Base Controller
*
*/
class Base_Controller extends MX_Controller
{
/**
* Stores the previously viewed page's complete URL.
*
* @var string
*/
protec... | true |
a7a7c0bc99f70b781d950fcfc32e38882db86308 | PHP | ThinhPhan96/Base-laravel | /Api/Helper/route.php | UTF-8 | 1,410 | 2.875 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\File;
/**
*
*/
if (!function_exists('trimPath')) {
/**
* @param $path
* @param string $explodeBy
* @param string $implodeSeparator
* @param string $protocol
* @return string
*/
function trimPath($path, $explodeBy = '/', $implodeSeparator = '/... | true |
16b533d2664f9c33b04f9c0db33cebc18102b08c | PHP | 50sq/commerce-channels | /src/Drivers/Webhooks/OrderUpdated.php | UTF-8 | 1,415 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace FiftySq\Commerce\Channels\Drivers\Webhooks;
use FiftySq\Commerce\Channels\Drivers\Data\Models\Order;
use FiftySq\Commerce\Channels\Drivers\Events\OrderFulfilled;
use Illuminate\Database\Eloquent\Model;
class OrderUpdated
{
protected string $type;
protected string $channel;
protected strin... | true |
c0f7fc05d3f4045b78ba68fbf18e19edd809027c | PHP | teacurran/nicky_photobooth | /server/src/NickyDigital/PhotoboothBundle/Entity/EmailShare.php | UTF-8 | 2,284 | 2.5625 | 3 | [] | no_license | <?php
namespace NickyDigital\PhotoboothBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* EmailShares
*
* @ORM\Table()
* @ORM\Entity
*/
class EmailShare
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="... | true |
b82ffbf7074e1c219f5bce7db75dfa7e25a80446 | PHP | mga226/plate | /library/Plate/Dataset.php | UTF-8 | 5,991 | 3.34375 | 3 | [] | no_license | <?php
namespace Plate;
/**
* Datasets are Plate's repositories of data. They:
*
* - contain an array of \Plate\Datapoint objects
* - can have "pseudodata" methods, which act exactly like real data but
* generate their value on-demand, typically by processing the
* existing data somehow.
* - ps... | true |
19573bc2629178181de751603110f1b803af5cf1 | PHP | BrunaViscardi/TecnoIF_IFMS | /app/Models/Edital.php | UTF-8 | 1,436 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Edital extends Model
{
use HasFactory;
protected $table = 'editais';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillabl... | true |
f9b733fe020582e91bb50b0706e203fe27ba96dc | PHP | bickfordc/boosters | /changePassword.php | UTF-8 | 3,465 | 2.78125 | 3 | [] | no_license | <?php
require_once 'header.php';
if (!$loggedin)
{
header("Location: login.php");
}
$error = "";
$resetCode = "";
$user = "";
$allegedPw = "";
$resetAllowed = false;
$message = "";
if (isset($_GET['code']) && isset($_GET['user']))
{
//... | true |
71e8eaf57f836ce0827a5df1c8a0b9a56776f720 | PHP | Monstar-twada/j-laravel-vue-boilerplate | /app/Http/Controllers/Auth/ForgotPasswordController.php | UTF-8 | 1,667 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
//use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use App\Http\Controllers\Controller;
use Password;
use Illuminate\Http\Request;
use App\Mail\UserForgotPassword;
class ForgotPasswordController extends Controller
{
/*
|-------------------------------------... | true |
81f76a13c21fe638830abbc353ab853ff6678758 | PHP | terryx/lifeshackle | /protected/model/base/ProfileBase.php | UTF-8 | 696 | 2.546875 | 3 | [] | no_license | <?php
Doo::loadCore('db/DooModel');
class ProfileBase extends DooModel{
/**
* @var int Max length is 11.
*/
public $profile_id;
/**
* @var text
*/
public $info;
public $_table = 'profile';
public $_primarykey = 'profile_id';
public $_fields = array('profile_id','info'... | true |
93a5a64512f662a2b0da5d2423679df72dd0b364 | PHP | FarisLucky/calculator-app-with-command | /src/Command/HistoryClearCommand.php | UTF-8 | 645 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Calculator\Command;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
class HistoryClearCommand extends Command
{
public function configure()
{
... | true |
7748c2134cd9682035d975e98b2e49c3bd3aab47 | PHP | carlosck/taller | /libs/Model/DAO/ProductoDAO.php | UTF-8 | 1,443 | 2.625 | 3 | [] | no_license | <?php
/** @package Taller::Model::DAO */
/** import supporting libraries */
require_once("verysimple/Phreeze/Phreezable.php");
require_once("ProductoMap.php");
/**
* ProductoDAO provides object-oriented access to the producto table. This
* class is automatically generated by ClassBuilder.
*
* WARNING: THIS IS AN... | true |
316f4ae59ec00cf14dc4118124bff95edba750bd | PHP | randolphkhgy/gy-treasure | /src/Issue/IssueGenerator/LegacyIssueRules/IssueRulesFormatter.php | UTF-8 | 911 | 2.9375 | 3 | [] | no_license | <?php
namespace GyTreasure\Issue\IssueGenerator\LegacyIssueRules;
use Carbon\Carbon;
/**
* 格式化输出的期号字串.
*/
class IssueRulesFormatter
{
/**
* 取代 [Ymd] 字串.
* 大小写不敏感
*
* @param string $format
* @param \Carbon\Carbon $date
* @return string
*/
public static function replaceY... | true |
fa3095347e2cd3a0a49e51b18f6fc7fb9a6a5dcd | PHP | turkprogrammer/php-objects-patterns-practice-5-rus | /src/ch05/batch07/OtherShop.php | UTF-8 | 265 | 2.875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace vitaliyviznyuk\popp5rus\ch05\batch07;
class OtherShop
{
public function thing()
{
print "thing\n";
}
public function andAnotherthing($a, $b)
{
print "another thing ($a, $b)\n";
}
}
| true |
0d92d1bc14ce81f8fdbde3168fee8d5d2638f022 | PHP | FMiranda97/NerdScape | /page_complements/levels_table.php | UTF-8 | 3,609 | 2.734375 | 3 | [] | no_license | <?php
function create_table_levels($result){
$cnt = 0;
while ($row = $result->fetch_assoc()) {
$cnt++;
echo "<tr>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['user_name'] . "</td>";
echo "<td><a href='?up=" . $row['id'] . "'>" . $row['upvotes'] . "</a></td>... | true |
23ae95bd7ca920828ef37b07a1acab71700d77c3 | PHP | chrischi1989/cAdmin | /Modules/User/UI/Web/Handlers/LostPasswordHandler.php | UTF-8 | 525 | 2.5625 | 3 | [] | no_license | <?php
namespace Modules\User\UI\Web\Handlers;
use Modules\User\Actions\LostPasswordAction;
use Modules\User\UI\Web\Requests\LostPasswordRequest;
class LostPasswordHandler
{
private $lostPasswordAction;
public function __construct(LostPasswordAction $lostPasswordAction)
{
$this->lostPasswordActio... | true |
3ce975a2808d4f7f2886ec6905b78281d4177802 | PHP | MarcHarnist/zoo | /class/Explorer.php | UTF-8 | 8,237 | 3.125 | 3 | [] | no_license | <?php
/*******************************************************************************************************/
/** OBJECT ORIENTED PROGRAMMING LANGAGE **/
/************************************************************************************************... | true |
161b6d11d234f243e308c33cd9684a7745acf2e7 | PHP | sgursanjam/thegurujifoundation | /contact.php | UTF-8 | 1,847 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
$errors = '';
$limit_size=10000000;
$myemail = 'gursanjambhasin@gmail.com'; /*Replace with your email*/
if(empty($_POST['name']) ||
empty($_POST['email']) ||
empty($_POST['message']))
{
$errors .= "\n Error: Required Field";
}
/*data*/
$name = $_POST['name'];
$email = $_POST['email'];
$m... | true |
63101bb4610ae51ed6d735a1c52f2155f843ad6a | PHP | maxpaynestory/ahmed-usama-techtask-201803 | /public/index.php | UTF-8 | 1,769 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use RecipeApp\Usecases\GetRecipes;
use RecipeApp\ValueObjects\Recipe;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
// web/index.php
require_once __DIR__ . '/../vendor/autoload.php';
$app = new Application();
$app->before(function (Request ... | true |
b574c1e3036c3cbcf074448260b327c66e8bc9ee | PHP | svetoslav0/SoftUni | /PHP Web/PHP Web Development Basics/17. Interfaces and Asbstraction - Exercise/I. 10. MooD 3/Archangel.php | UTF-8 | 1,242 | 3.40625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Svetoslav
* Date: 07-Jan-19
* Time: 10:31 PM
*/
class Archangel extends Characters implements IArchangel
{
/**
* @var float
*/
private $energy;
/**
* Archangel constructor.
* @param string $username
* @param int $level
* @param fl... | true |
70605270565d826843ad1e0d0a3ca5aedb8520d4 | PHP | neat-php/object | /tests/QueryTest.php | UTF-8 | 2,351 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Neat\Object\Test;
use Generator;
use Neat\Object\Collection;
use Neat\Object\Query;
use Neat\Object\Repository;
use Neat\Object\Test\Helper\Factory;
use Neat\Object\Test\Helper\User;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
class QueryTest extends TestCase
{
us... | true |
0284dbe1b93f1e23a0f774c71fe8a895e25977f4 | PHP | KamahGit/assignmentphp | /php/initial assignments/assign1.php | UTF-8 | 799 | 3.25 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Bruce
* Date: 9/21/2018
* Time: 7:52 PM
*/
$name="Bruce";
$course="Software Development Training";
$school="Cytonn College of Innovation And Entrepreneurship";
/**
* @param $name
*/
function announce($name,$course,$school){
var_dump($name);
echo "Studies $course... | true |
df118ec66b9f2bad7979ec38c6049efeea821d96 | PHP | victorwardi/OldProjects | /costaverdefm/destaque/xml.php | ISO-8859-1 | 1,771 | 2.765625 | 3 | [] | no_license | <?php
//conectando ao mysql
$conn = @mysql_connect("localhost", "root","582041");
$db = @mysql_select_db("saquabb", $conn);
//Selecionando todos os registros da tabela tickers
$sql = "SELECT * FROM `noticias` ORDER BY `id` DESC Limit 7";
//Executando a instruo sql
$sql = @mysql_query($sql);
//Pe... | true |
0361feb68394a6ba50c9bd6f096c88cb238ab6ad | PHP | isaacayz/cgpa-calculator | /index.php | UTF-8 | 973 | 2.609375 | 3 | [] | no_license | <?php include ("header.html"); ?>
<div>
<img src="images/welcome.jpg" title="Welcome to CGPA Calculator website">
</div>
<div class="well">
<input type="button" onclick="alertMe();" title="Click me to enter your name" value="Click me!" class="form-actions alert-success"> <br>
Are you ready to dive <br>into ... | true |
2c4d8c48c3b21f7ba0019ee11a9f43e5ede61513 | PHP | NicholasMamali/Bid4Cows | /bid4cows/bid4cows/explore_elements.php | UTF-8 | 19,092 | 2.546875 | 3 | [] | no_license | <?php
include 'conn.php';
// Create connection
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
function filter_data($location='all', $price='lowtohigh' , $type='any' ,$foodType='any')
{
$conn = $GLOBALS['conn']; //accsess global connection to dat... | true |
88ca6e3570a59b5c14edf1cd0d4b41e527eff906 | PHP | AndrewTachilin/Paysera-test | /app/Requests/CurrencyExchange/CurrencyExchangeApiRequest.php | UTF-8 | 932 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Requests\CurrencyExchange;
use App\Contracts\Services\CurrencyExchange\ExchangeApiInterface;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\Request;
class CurrencyExchangeApiRequest implemen... | true |
479198a1075e9f46a9d837a4f92450c44cb9968c | PHP | dihlophos/import-permissions | /app/Models/ExportedProduct.php | UTF-8 | 867 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/*
Тип:
Вывозимая продукция
Поля:
Вывоз - export_id
Груз - product_type_id
Ед изм - measure
Количество - count
Производитель - manufacturer
*/
class ExportedProduct extends Model
{
/**
* The attri... | true |
f087bd846cf382fa533ebe069a8bbfdb75b1f2af | PHP | GuillaumeDrigout/Projet-Pro-3WA | /controllers/user/userdetail/changeuserpassword/ChangeuserpasswordController.class.php | UTF-8 | 4,727 | 2.90625 | 3 | [] | no_license | <?php
class ChangeUserpasswordController {
public function httpGetMethod(Http $http, array $queryFields)
{
//On vérifie qu'un utilisateur est bien connecté à sa session
$userSession = new UserSession();
if($userSession->isAuthenticated() == false)
{
// On ne peu... | true |
3de6f82405605899de6d7cf1fa64bfbfc24fec20 | PHP | sunny-io/quiz | /quiz_v1/models/quiz.model.php | UTF-8 | 205 | 2.828125 | 3 | [] | no_license | <?php
class Quiz {
/* name of quiz = name of web page */
var $quizname;
/*constructor for data from outside */
function __construct($name) {
$this->quizname = $name;
}
}
?> | true |
99b5d550a44004043bfe3f24b385c277ec2f9ccd | PHP | rampkt/shop | /world_database/admin/functions/dashboard.php | UTF-8 | 438 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
class dashboard
{
private $db;
public function __construct() {
global $db;
$this->db = $db;
}
public function totalCount() {
$result = array();
$result['country'] = $this->db->fetch_field("countries", "1", "COUNT(id) AS cnt");
$result['state'] = $this->db->fetch_field("states", "1", "COUNT(id) A... | true |
ce0b33ed306488d374ebfe10771ad97bcd93ae70 | PHP | rsaylor73/sundance | /class/employees.class.php | UTF-8 | 19,349 | 2.640625 | 3 | [] | no_license | <?php
include PATH."/class/api.class.php";
class employees extends api {
public function profile() {
$this->is_access('Employer');
foreach ($_SESSION as $key=>$value) {
$data[$key] = $value;
}
$template = "profile.tpl";
... | true |
0f88da52d8e983f42c249cefaa2d6c99f97fcb91 | PHP | audef1/ch.bfh.bti7054.myshop | /admin/src/AppBundle/Entity/Salts.php~ | UTF-8 | 1,447 | 2.53125 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Salts
*
* @ORM\Table(name="salts")
* @ORM\Entity
*/
class Salts
{
/**
* @var integer
*
* @ORM\Column(name="customer_id", type="integer", nullable=true)
*/
private $customerId;
/**
* @var string
*
... | true |
627796443d9f6bddd5a7cda5173a4c2b5ebd8ec3 | PHP | GetResponse/share-code-plugin | /src/Cart/CartService.php | UTF-8 | 5,948 | 2.640625 | 3 | [] | no_license | <?php
namespace GrShareCode\Cart;
use GrShareCode\Cache\CacheInterface;
use GrShareCode\Cart\Command\AddCartCommand;
use GrShareCode\DbRepositoryInterface;
use GrShareCode\Api\GetresponseApiClient;
use GrShareCode\Api\Exception\GetresponseApiException;
use GrShareCode\Product\ProductService;
/**
* Class CartService
... | true |
a0c5a470d75d164ab01a5c40586eaa4069e13be7 | PHP | silasstoffel/curso-laravel | /tests/Feature/RemovedorDeSerieTest.php | UTF-8 | 1,074 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Feature;
use App\Models\Serie;
use App\Services\CriadorDeSerie;
use App\Services\RemovedorDeSerie;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class RemovedorDeSerieTest extends TestCase
{
use RefreshDatabase;
/**
* serie
*
* @var Serie
*... | true |
319205b276c7b69355ec691baff44aeae755c610 | PHP | Sanatdey/auth | /classes/users.class.php | UTF-8 | 717 | 2.609375 | 3 | [] | no_license | <?php
include 'db.class.php';
session_start();
class Users extends Db {
public function getUsers() {
$sql = 'SELECT * FROM users';
$stmt = $this->con()->prepare($sql);
$stmt->execute();
$data = $stmt->fetchAll();
return $data;
}
public function addUser(... | true |
0eef5bfabbb242ad86521de3b433de0213fe3fd0 | PHP | vetrok/infinitesoft | /models/LoginStoriesManager.php | UTF-8 | 799 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use xj\ua\UserAgent;
use app\models\interfaces\AbstractLoginStoriesManager;
/**
* Class LoginStoriesManager
* @package app\models
*/
class LoginStoriesManager implements AbstractLoginStoriesManager
{
/**
* When user logged in - store user login data
*/
public function... | true |
6683da4ba87cf9e892564c14297badd991d3c09d | PHP | williamwarnockBSU/cs401 | /tripsBoard.php | UTF-8 | 2,694 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
$thisPage="tripsBoard";
session_start();
//echo "<pre>" . print_r($_SESSION,1) . "</pre>";
if (!isset($_SESSION['logged_in']) || !$_SESSION['logged_in']) {
header('Location: index.php');
exit;
}
require_once 'plannedTripsDAO.php';
$dao = new plannedTripsDAO();
$logi... | true |
7bac6df257f4fa37e52248295aafd16e6ba7bf86 | PHP | glyphco/MBT_APILARAVEL | /app/Models/EventShow.php | UTF-8 | 838 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Wildside\Userstamps\Userstamps;
class EventShow extends Model
{
use Userstamps;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'event_id',
'show_id',
... | true |
523acc70f7a263bab57a7391eb8aefa8195aceec | PHP | CKTR/BotTrader | /application/core/MY_Controller.php | UTF-8 | 3,522 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* core/MY_Controller.php
*
* Default application controller
*
* @author Kelly Liu
* @copyright 2015-2016
* ------------------------------------------------------------------------
*/
class Application extends CI_Controller {
protected $data = array(); // parameters for view compo... | true |
c225d9f135cc80a2132e03c5093a3d49a45bdd22 | PHP | CodeDone4U/niche-one | /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/Products.php | UTF-8 | 13,160 | 2.59375 | 3 | [
"GPL-3.0-only",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-2.0-or-later",
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-or-later",
"GPL-3.0-or-later",
"LicenseRef-scancode-other-copyleft"
] | permissive | <?php
namespace Automattic\WooCommerce\Blocks\StoreApi\Routes;
use Automattic\WooCommerce\Blocks\StoreApi\Utilities\Pagination;
use Automattic\WooCommerce\Blocks\StoreApi\Utilities\ProductQuery;
/**
* Products class.
*
* @internal This API is used internally by Blocks--it is still in flux and may be subject to rev... | true |
19e010dbab1a822dd796dbc719ead4ad407429bb | PHP | WildCodeSchool/reims-php-2009-hackathon-agricultor | /src/Entity/User.php | UTF-8 | 3,777 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Form\UserType;
use App\Repository\UserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\U... | true |
645e5315641b644c8f254f7e4ef88734b95c01cd | PHP | shahilpatwary/learning-web-technologies-spring-2020-2021-sec-g | /MID_LAB_EXAM/controller/logcheck.php | UTF-8 | 811 | 2.546875 | 3 | [] | no_license | <?php
session_start();
if(isset($_POST['submit']))
{
$id = $_POST['id'];
$password = $_POST['password'];
if($id == "" || $password == "")
{
echo "null input...";
}
else
{
$file_location='../model/user.json';
$myfile = fopen($file_location, 'r');
... | true |
97dae373e131c1894400541aa5d243265cc6c04a | PHP | sumonst21/tiwiii | /model/fb_model.php | UTF-8 | 6,055 | 2.515625 | 3 | [] | no_license | <?php
/**
* FB_Model
*
* Model for Class Shows
*
* @author Maail
*/
error_reporting(E_ALL ^ E_NOTICE);
class FB_Model extends Model
{
public function __construct()
{
}
public function callback()
{
#localhost(testing: echotech)
/*$facebook = new Facebook(array(
'appId' => '164586206902... | true |
82e77843dc28f645dcc8d322a4ed38601c1878cf | PHP | Freeongoo/lumen-api-jwt-auth | /app/Http/Middleware/JwtMiddleware.php | UTF-8 | 1,052 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use App\Exceptions\ApiExceptionHandlerTrait;
use App\Services\AuthToken\AuthToken;
use Closure;
use App\User;
use Illuminate\Auth\Access\AuthorizationException;
class JwtMiddleware
{
use ApiExceptionHandlerTrait;
/**
* @var AuthToken
*/
private $authToken;
... | true |
24fda0d43bcd2b8d4494e7d523749a71f4226b7e | PHP | kbrintle/sme-wotcart | /frontend/models/AccountInformationForm.php | UTF-8 | 7,722 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\models;
use common\models\core\Subregions;
use common\models\customer\CustomerAddress;
use Yii;
use yii\base\Model;
use frontend\components\CurrentCustomer;
/**
* AccountInformationForm is the model behind the contact form.
*/
class AccountInformationForm extends Model
{
public $first_... | true |
a60fd446e8fa6b326c91589182922bf8ffba2ea2 | PHP | yiimaker/yii2-email-templates | /src/repositories/EmailTemplatesRepository.php | UTF-8 | 4,828 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @link https://github.com/yiimaker/yii2-email-templates
* @copyright Copyright (c) 2017-2018 Yii Maker
* @license BSD 3-Clause License
*/
namespace ymaker\email\templates\repositories;
use Yii;
use yii\base\BaseObject;
use yii\data\ActiveDataProvider;
use yii\db\Connection;
use yii\di\Instance;
use yma... | true |
19f57834d5acc876b9d5bb732620f96d09eb1180 | PHP | feekk/elastic-php-simple | /src/ElasticPhpSimple/Base/Sort.php | UTF-8 | 454 | 2.671875 | 3 | [] | no_license | <?php
namespace ElasticPhpSimple\Base;
use ElasticPhpSimple\Type;
class Sort{
protected $orderBy;
protected $order;
public function order($orderBy ,$order){
$this->orderBy = $orderBy;
$this->order = $order;
return $this->_build();
}
protected function _build()... | true |
0cdcb70dca759d3a021059d9ebf1c6ba3ee80b6a | PHP | kakashen/xitou | /app/Http/Controllers/AreaController.php | UTF-8 | 598 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Area;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class AreaController extends Controller
{
private $area;
public function __construct(Area $area)
{
$this->area = $area;
}
public function store(Request $request)
{
... | true |
454bd7aa27995f575e64b86b80fbf9951558420d | PHP | wilcarjose/werp | /app/Modules/Core/Products/Services/WarehouseService.php | UTF-8 | 2,591 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Werp\Modules\Core\Products\Services;
use Werp\Modules\Core\Products\Models\Warehouse;
use Werp\Modules\Core\Base\Services\BaseService;
use Werp\Modules\Core\Products\Models\StockLimit;
use Werp\Modules\Core\Maintenance\Services\ConfigService;
class WarehouseService extends BaseService
{
protected... | true |
814eac950b934c0fc84deeb8b6d70443ebf2a10c | PHP | EmilLimeOmnicron/CECS478_SSTS | /register.php | UTF-8 | 1,508 | 2.78125 | 3 | [] | no_license |
<?php
session_start();
require 'dbconnect.php';
///$conn = mysqli_connect("localhost", "root", "Kappa123", "webdata");
$username =strip_tags($_POST['username']);
$email =strip_tags($_POST['email']);
$pass = strip_tags($_POST['password']);
$hashAndSalt = password_hash($pass, PASSWORD_BCRYPT);
$stmt1 = mysqli_p... | true |
92dfdae6920644ba610fd017a7ecde1327cfed55 | PHP | Cicades/PHP | /day2/code/time.php | UTF-8 | 563 | 3.46875 | 3 | [] | no_license | <?php
//time 获得是秒数为单位的时间戳
echo time();
//date 格式化一个时间戳
//第一参数是时间格式
//第二个参数是时间戳,默认是当前的时间戳
echo "<br>";
//默认时间是格林威治时间
//设置时区
date_default_timezone_set('PRC');
//可通过php.ini 配置时区
echo date('Y-m-d H:i:s',time());
//对已有时间做格式化
//strtotime可以将一个有格式的时间转换为一个时间戳
$date='1998-02-09 17:39:50';
echo "<br>";
$date1=date('Y年m月d日<b\... | true |
a53318b88ab2d674391a2176d056c1735b4fd04d | PHP | LuaxY/AzoteWeb | /app/ForumAccount.php | UTF-8 | 699 | 2.578125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class ForumAccount extends Model
{
protected $table = 'core_members';
protected $connection = 'forum';
protected $primaryKey = 'member_id';
public $timestamps = false;
public function generateSalt()
{
$salt = '';
... | true |
a7cc5a9673d7dcd4615158cfa8758ef931f46d7e | PHP | saurindashadia/snippet-library | /gravity-forms/gw-merge-tag-modifier-sentence.php | UTF-8 | 1,371 | 2.90625 | 3 | [] | no_license | <?php
/**
* Gravity Wiz // Gravity Forms // Sentence Merge Tag Modifier for Checkboxes
* https://gravitywiz.com
*
* Use the :sentence modifier on Checkbox field merge tags to convert...
*
* this: First Choice, Second Choice
* to: First Choice and Second Choice
*
* this: First Choice, Second Choice, Third Cho... | true |
5c5360b43646a6dc1e40b00c304a9320aaa505fa | PHP | signifly/travy-schema | /tests/Unit/Fields/TableTest.php | UTF-8 | 1,116 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Signifly\Travy\Schema\Tests\Unit\Fields;
use PHPUnit\Framework\TestCase;
use Signifly\Travy\Schema\Fields\Table;
use Signifly\Travy\Schema\Fields\Text;
class TableTest extends TestCase
{
/** @test */
public function it_serializes_to_json()
{
$date = Table::make('Products')
... | true |
840dfab376fc19d914204755058e7b93b316b2e6 | PHP | alexyapp/natures-spring-api | /app/Http/Controllers/Api/LocationController.php | UTF-8 | 1,405 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\IslandGroup;
use App\Http\Resources\IslandGroup as IslandGroupResource;
use App\Models\Province;
use App\Http\Resources\Province as ProvinceResource;
use App\Models\City;
use App\Http\Resources\C... | true |
a7d21195925179b5eb6bbae61208ff9059fca81d | PHP | LizbethAlfaro/SBE | /login.php | UTF-8 | 16,471 | 2.640625 | 3 | [] | no_license | <?php
header('Location: ./admin/loginAdmin.php');
/*
// Verifica version minima de PHP
if (version_compare(PHP_VERSION, '5.3.7', '<')) {
exit("No puede correr en versiones inferiores a 5.3.7 !");
} else if (version_compare(PHP_VERSION, '5.5.0', '<')) {
// la libreria de contraseña no funciona en versiones inf... | true |
80ba85ed1b7463403fe8c9dd5103e1b613691271 | PHP | BGCX261/zibo-svn-to-git | /tags/0_9_4/zibo_modules/zibo.orm/src/zibo/library/orm/model/data/format/modifier/Nl2brDataFormatModifier.php | UTF-8 | 518 | 2.9375 | 3 | [] | no_license | <?php
namespace zibo\library\orm\model\data\format\modifier;
/**
* Modifier to convert new lines into br HTML tags
*/
class Nl2brDataFormatModifier implements DataFormatModifier {
/**
* Converts all new lines into br HTML tags
* @param string $value Value to convert all the new lines from
* @par... | true |
5c5fdbe85a751ea7d2119c70a57cd781afc7c696 | PHP | bhakhri/Syenergy | /Model/BusStopManagerNew.inc.php | UTF-8 | 7,688 | 2.765625 | 3 | [] | no_license | <?php
//-------------------------------------------------------
// THIS FILE IS USED FOR DB OPERATION FOR "busstop" TABLE
// Author :Nishu Bindal
// Created on : (22.Feb.2012 )
// Copyright 2012-2013: syenergy Technologies Pvt. Ltd.
//
//--------------------------------------------------------
?>
<?php
require_once(D... | true |
9a4f96a2eac943da92739527b54fa6c0ccce5d83 | PHP | open-source-contributions/web-debug-php-core | /src/Builders/Events/EventLog.php | UTF-8 | 1,477 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace WebDebug\Builders\Events;
/**
* @see https://web-debug.dev/docs/scheme/events.html#log
*/
class EventLog extends AbstractEvent
{
/**
* full log text.
*
* @var string
*/
private $message;
/**
* additional log context.
*
* @var ... | true |
865857fa329bc0a4ba2a791074df19eef1e122aa | PHP | spaiter/varimJarim | /app/controllers/BaseController.php | UTF-8 | 569 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
class BaseController extends Controller {
public function __construct() {
$this->beforeFilter(function() {
View::share('categories', Category::all()->sortBy('order'));
View::share('CartItemsCount', Cart::count(false));
View::share('CartItems', Cart::content());
View::s... | true |
5c98236a90bab4427019885fcb19a57d769868eb | PHP | wilensky/WilenskyAdyenBundle | /DependencyInjection/ApiUrlCompilerPass.php | UTF-8 | 1,436 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Wilensky\AdyenBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\{
ContainerBuilder, Compiler\CompilerPassInterface
};
/**
* This is the class that loads and manages your bundle configuration
* @author Gregg Wilensky <https://github.com/wilensky/>
* @link http://symfony.com/... | true |
0b2dde336e1a3fd803cf5f10b9ae4c5895184406 | PHP | diegohernangarcia/CoorInfo | /BD/BDMonitor.php | UTF-8 | 6,719 | 2.640625 | 3 | [] | no_license | <?php
Function DevuelvoArrayMarcasMonitor(&$arreglo) {
require ("UsarGestion.php");
// Creo la consulta
$consulta="SELECT * FROM marcamonitor";
// Se Ejecuta La Consulta
$hacerconsulta=mysql_query($consulta,$manejador);
$$numeroerror=mysql_errno();
$descripcionerror=mysql_error();
if ($numeroerror!=0) {... | true |
52ba3d19bd30bd99404da201d2e860b852bf50c4 | PHP | leonardo80/Service_GetFit | /Users/USER/Downloads/FatBurnerV1-master/FatBurnerV1-master/src/routes.php | UTF-8 | 9,075 | 2.6875 | 3 | [] | no_license | <?php
use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Http\UploadFile;
// Routes
$app->get('/users', function (Request $request, Response $response, array $args) {
$sql = $this->db->prepare("select * from user");
$sql->execute();
$users = $sql->fetchAll();
return $this->response->withJson($users);
});... | true |
9957ea597157e9b7733364fc515feaed13b78742 | PHP | remorhaz/php-json-pointer | /src/Query/Query.php | UTF-8 | 3,348 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Remorhaz\JSON\Pointer\Query;
use Remorhaz\JSON\Data\Value\ArrayValueInterface;
use Remorhaz\JSON\Data\Value\NodeValueInterface;
use Remorhaz\JSON\Data\Value\ObjectValueInterface;
use Remorhaz\JSON\Data\Value\ScalarValueInterface;
use Remorhaz\JSON\Pointer\Locator\IndexReferen... | true |
577557a81171b71738d9ca7939cb8cef221effb1 | PHP | Eduardobhubner/estudo-php | /ContaCorrente.php | UTF-8 | 346 | 3.109375 | 3 | [] | no_license | <?php
$conta1 = [
'titular' => 'Marquinhos',
'saldo' => 1200
];
$conta2 = [
'titular' => 'Joana',
'saldo' => 3400
];
$conta3 = [
'titular' => 'Kadu',
'saldo' => 2000
];
$contaCorrente = [$conta1, $conta2, $conta3];
for($i = 0; $i < count($contaCorrente); $i++){
echo $contaCorrente[$i]['... | true |
4f29ced855cc23ed24002c2819608377452be1ff | PHP | cloudmine/cloudmine-php | /examples/update-text.php | UTF-8 | 629 | 3.09375 | 3 | [] | no_license | <?php
/**
* Update the text value of an existing key.
*/
// Require CloudMine class.
require '../class.cloudmine.php';
// Define AppID and API key.
define("APPID", "your-cloudmine-app-id");
define("APIKEY", "your-cloudmine-api-key");
// Create a new instance of the CloudMine object.
$cloudmine = new Cloudmine(APP... | true |
cc39753fc2c4e60d3c7eb279074000c9fb582c8a | PHP | akrabat/bibliotheque | /src/Uuid.php | UTF-8 | 862 | 3.25 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Bibliotheque;
class Uuid
{
/**
* A very simple way to generate a UUID.
* Credit: http://stackoverflow.com/questions/2040240/php-function-to-generate-v4-uuid/15875555#15875555
*
* @return string
*/
public static function v4()
{
if (function_exists('random_byt... | true |
6d40294a7020c9f1d9ad9d500790ac681635eb2a | PHP | CcaleroAdrian/intranet | /submenu_UsuariosAlta.php | ISO-8859-2 | 12,741 | 2.53125 | 3 | [] | no_license | <?php
include("intraHeader.php");
if ( $USUARIO == "" OR $USUARIO == null ) {
//exit();
header('Location: index.php');
}
$idMenu =isset($_GET['idMenu']) ? trim($_GET['idMenu']) : "" ;
$idSubMenu =isset($_GET['idSubMenu']) ? trim($_GET['idSubMenu']) : "" ;
$strBtnAceptar = isset($_POST['btnAlta']) ... | true |
7941ee5308840831dbf2d56292331fd8e7d8ddce | PHP | dndeus/php-test2 | /app/Product.php | UTF-8 | 858 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: sakis
* Date: 16/01/2019
* Time: 15:38
*/
namespace App;
class Product
{
protected $name;
protected $cost;
/**
* Product constructor.
* @param $name
* @param $cost
*/
public function __construct(string $name = '', float $cost = 0)
... | true |
1af307f67e1096790b93062b5ce3ca0418f19309 | PHP | shank-codes/bookinbarber | /bookpage.php | UTF-8 | 3,815 | 2.609375 | 3 | [] | no_license | <?php
session_start();
$user ='root';
$pass='';
$shopid=$_REQUEST['id'];
$db ='barberproject1';
$conn=new mysqli('localhost',$user,$pass,$db) or die("unable to connect");
$shopdetails=$conn->query("SELECT shopname,address FROM shop_list WHERE shopid=$shopid");
... | true |