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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f961d9262ce0bd9b881efd900d6f6978762284fb | PHP | mbardelmeijer/permalink | /src/PermalinkObserver.php | UTF-8 | 1,960 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Devio\Permalink;
use Devio\Permalink\Services\NestingService;
use Cviebrock\EloquentSluggable\Services\SlugService;
class PermalinkObserver
{
/**
* @var SlugService
*/
private $slugService;
/**
* PermalinkObserver constructor.
*/
public function __construct(SlugSe... | true |
037601df2829288b276ccb86a8f684c400b54f3c | PHP | annie19940824/gatchkun | /YUSUKE1/ID/idcreate.php | UTF-8 | 3,094 | 2.578125 | 3 | [] | no_license | <?php
require('../dbconnect.php');
$loginuser = rand(101,200);
// $loginuser = 30;
$str = array_merge(range('a', 'z'), range('0', '9'), range('A', 'Z'));
$r_str = null;
for ($i = 0; $i < 20; $i++) {
$r_str .= $str[rand(0, count($str) - 1)];
}
// ここで$_strがDBにないか確認
if (!empty($_POST)) { // $_strをコピーしたら
... | true |
f2f931bc1baa387a8bf37f047ac5febe1788b6ad | PHP | fco-felix/backend-carrinho | /app/models/dao/ConfigConexaoBD.php | UTF-8 | 898 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Models\BD;
use PDO;
use Exception;
class ConfigConexaoBD {
private static $configConexaoBD;
private $conexao;
private function __construct($host, $nome, $usuario, $senha) {
try {
$this->conexao = new PDO(
"mysql:host=$host;dbname=$nome;charset=utf... | true |
882ab7c3802490412cae04b2557ead025217ed42 | PHP | Shogo14/instagram_scraper_php | /mysqltest.php | UTF-8 | 6,755 | 2.640625 | 3 | [] | no_license | <?php
require __DIR__ . '/config.php'; //ライブラリロード
class DB_Adapter{
protected $_connection = null;
public function __construct()
{
$this->db_connect();
}
public function __destruct()
{
$this->close();
}
public function db_connect(){
// 既に接続している場合はリターン
... | true |
8809411fbf550ee3a19bf80f9c5dd3ed8424ebb6 | PHP | ericmaster/DrupalConsole | /src/Style/DrupalStyle.php | UTF-8 | 1,294 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Drupal\Console\Style;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ChoiceQuestion;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Console\Style\SymfonyStyle;
use Drupal\Console\H... | true |
c2238c3527144f1f3c49e097fc5d174687c0a78f | PHP | fatmazaman/crowdfund-scholarships | /model/test.php | UTF-8 | 621 | 2.53125 | 3 | [
"MIT"
] | permissive |
<html>
<head><title>Preferences Set</title></head>
<body>
<?php
session_start();
$colors = array(
'black'=> "#000000",
'white'=> "#ffffff",
'red'=> "#ff0000",
'blue'=> "#0000ff"
);
$backgroundName = $_POST['background'];
$foregroundName = $_POST['foreground'];
$_SESSION['backgroundName'] = $backgroundN... | true |
8333b441a6a08a9c8dafb3971352a5f1722e9c01 | PHP | jhaoda/socialite-mailru | /src/Provider.php | UTF-8 | 2,221 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace JhaoDa\SocialiteProviders\MailRu;
use Illuminate\Support\Arr;
use Laravel\Socialite\Two\ProviderInterface;
use SocialiteProviders\Manager\OAuth2\User;
use SocialiteProviders\Manager\OAuth2\AbstractProvider;
class Provider extends AbstractProvider implements ProviderInterface
{
/**
* Unique P... | true |
a99e4779345d23041bea1542148276a38ef0ae1f | PHP | Crax88/final-project | /app/libraries/User.php | UTF-8 | 2,025 | 2.828125 | 3 | [] | no_license | <?php
class User
{
public function __construct() {
session_start();
}
public function __set($name, $value) {
$_SESSION[$name] = $value;
}
public function __get($name) {
return $_SESSION[$name] ?? false;
}
public function __unset($name) {
unset($_S... | true |
85d206494815f43f9860d9e2b5654abd8f6a7d1c | PHP | stctheproducer/cellulant_php | /app/Helpers/Validation.php | UTF-8 | 4,866 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
class Validation
{
public static $emailRegex = '/([\w\d\.\_\-]+)@([\w\d\.\-\_]+)\.([\w\d]{2,64})/';
public static $nameRegex = '/(\w{2,50})/';
public static $otherNameRegex = '/(\w{2,100})/';
public static $nrcRegex = '/(\d{6}\/\d... | true |
40142a2770990bf53f59478edc03006414cd32f0 | PHP | phacility/phabricator | /src/applications/phrequent/query/PhrequentUserTimeQuery.php | UTF-8 | 8,941 | 2.5625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
final class PhrequentUserTimeQuery
extends PhabricatorCursorPagedPolicyAwareQuery {
const ORDER_ID_ASC = 0;
const ORDER_ID_DESC = 1;
const ORDER_STARTED_ASC = 2;
const ORDER_STARTED_DESC = 3;
const ORDER_ENDED_ASC = 4;
const ORDER_ENDED_DESC = 5;
const ENDED_YES = 0;
co... | true |
cd68b10ee68f0b947da8b64eea8501a53ff85dad | PHP | chapmang/PHPConverter | /converter/converter.php | UTF-8 | 3,463 | 3.375 | 3 | [] | no_license | <?php
namespace PHPConverter\Converter {
use PHPConverter\Core\StringMethods as StringMethods;
/**
* Converter
* Parent class for all measurement specific converters
* allowing standard methods for all conversion type
* @author Geoff Chapman <geoff.chapman@mac.com>
* @version 1.0
* @package PHPConverter\Conve... | true |
bfe319f3709592c832890373cd80ba5658425961 | PHP | wotek/response-builder | /src/Wtk/Response/Serializer/Serializer.php | UTF-8 | 1,596 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package Response
* @subpackage Serializer
*
* @author Wojtek Zalewski <wojtek@neverbland.com>
*
* @copyright Copyright (c) 2013, Wojtek Zalewski
* @license MIT
*/
namespace Wtk\Response\Serializer;
use Wtk\Response\Normalizer\NormalizerInterface;
use Wtk\Response\Normalizer\HasNormalizerTrait;
u... | true |
14f6a52f6ab0e25c7adc4c7dfe85365aa48436d2 | PHP | Katherina2203/war | /backend/components/TotalColumn.php | UTF-8 | 345 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\components;
class TotalColumn {
public static function pageTotal($provider, $fieldName)
{
$total=0;
foreach($provider as $item){
$total += $item[$fieldName];
}
return $total . ' грн';
}
public static function pdvTotal($provider, $fieldName)
{
$pdv = 0;
retu... | true |
e1676c74c7c718975cd26c4c3b7cfa43a63c7303 | PHP | myYearbook/VorpalBunny | /test.php | UTF-8 | 526 | 3.109375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Timed Test
*
* Usage:
* php test.php [host]
*
* @package VorpalBunny
* @author Gavin M. Roy <gmr@myyearbook.com>
*/
require_once( "vorpalbunny.php" );
// Allow a command line override of localhost
if ( count( $argv ) > 1 )
{
$broker = $argv[1];
}
else
{
$broker = 'localhost';
}
// Create ou... | true |
0f677fa385055fb9caf6c86da4c22559f9b307e5 | PHP | nucleos/nucleos-doctrine-extensions | /src/Manager/ORM/BaseQueryTrait.php | UTF-8 | 1,812 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* (c) Christian Gripp <mail@core23.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Nucleos\Doctrine\Manager\ORM;
use Doctrine\ORM\QueryBuilder;
use InvalidArgumentException;
/**
*... | true |
34aa2d4ba8945dbc195d81fdab0a99aa11d10abc | PHP | tsnorri/grav-twig-image-utils-plugin | /classes/Accessor.php | UTF-8 | 813 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright (c) 2018 Tuukka Norri
* This code is licensed under MIT license (see LICENSE for details).
*/
namespace Grav\Plugin\TwigImageUtilsPlugin;
class Accessor
{
public function getProperty($obj, $name)
{
// Check that the given property exists.
if (!property_exists($obj, $name))
throw new ... | true |
08e08e4c4d3fc1a862edc56e33d39cce3ccf97c6 | PHP | mpunkt01/Baustreit-Maengel | /inc/login-inc.php | UTF-8 | 1,995 | 2.796875 | 3 | [] | no_license | <?php
// Sitzung starten, damit der Benutzer eingeloggt bleibt
session_start();
if (isset($_POST['submit'])) {
include 'db.php';
$email = mysqli_real_escape_string($connection, $_POST['email']);
$password = mysqli_real_escape_string($connection, $_POST['password']);
// Error handlers
// Existier... | true |
fa768beb202634994bb377179d60e897d423c8dc | PHP | manjingzi/swoole-server-example | /Pineapplev1/Lib/Cards/GameCard.php | UTF-8 | 2,265 | 3.40625 | 3 | [] | no_license | <?php
include_once __DIR__.'/WayCard.php';
class GameCard{
public $id; //关联id
public $fanRound; //范特西回合数
public $isCardsBust; //是否爆牌
//WayCard列表
public $wayCardList = array(
WayCard::WAY_ID_HEAD=>null,
WayCard::WAY_ID_MEDIUM=>null,
WayCard::WAY_ID_TAIL=>null,
);
//胜负分数列表,格式:arra... | true |
9acf350a56000fa8407bd3b30f6645ec5efe0066 | PHP | naoyukik/php-documents | /ja/ide-phpstub/imagecolorresolvealpha.php | UTF-8 | 535 | 2.59375 | 3 | [] | no_license | /**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* @link http://php.net/manual/en/function.imagecolorresolvealpha.php
* @param resource $image [optional] <p> TODO DESCRIPTION </p>
* @param int $red [optional] <p> TODO DESCRIPTION </p>
* @param int $green [optional] <p> TODO DESCRIPTION </p>
* @param int $blue [optional]... | true |
cb0ac2e7718247020c7a26eb740dd69715da28b7 | PHP | isabella232/perspective-simulator | /src/CLI/Command/APP/RenameCommand.php | UTF-8 | 4,495 | 2.734375 | 3 | [] | no_license | <?php
/**
* RenameCommand class for Perspective Simulator CLI.
*
* @package Perspective
* @subpackage Simulator
* @author Squiz Pty Ltd <products@squiz.net>
* @copyright 2018 Squiz Pty Ltd (ABN 77 084 670 600)
*/
namespace PerspectiveSimulator\CLI\Command\APP;
use Symfony\Component\Console\Input\InputI... | true |
5c3cc03a4f213df7e1c74982eb029bc2f5977bec | PHP | farhadcu/PHP-Ecommerce-web-apps | /classes/Cart.php | UTF-8 | 2,789 | 2.9375 | 3 | [] | no_license | <?php
class Cart {
private $db_conn;
public function __construct() {
$host_name='localhost';
$user_name='root';
$password='';
$db_name='db_eshop';
$this->db_conn= mysqli_connect($host_name, $user_name, $password, $db_name);
if(!$this->db_conn){
... | true |
c0d7dd3311305b935cb1e6ee26b67ed6e182709c | PHP | dcramer/arcanist | /src/workflow/ArcanistBrowseWorkflow.php | UTF-8 | 4,002 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2012 Facebook, Inc.
*
* 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 ag... | true |
c01c20705b272831f9909d430af7c000697eb550 | PHP | Ichinator/NestiClientLeger | /Model/Cours.php | UTF-8 | 2,794 | 2.625 | 3 | [] | no_license | <?php
require_once __DIR__."/Connect.php";
if(isset($_POST["functionToCall"])){
echo $_POST["functionToCall"]($_POST["idCours"]);
}
function selectAllCours(){
$result = null;
try{
$bdd = getPDO();
$querySelect = 'SELECT *, Recette.nom AS nomRecette, Cours.id AS idCours FROM Cour... | true |
5f8a186a7c921a265fae3254966020e878b1ec93 | PHP | fabiopaiva/PDOSimpleMigration | /src/Library/AbstractMigration.php | UTF-8 | 349 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace PDOSimpleMigration\Library;
abstract class AbstractMigration implements MigrationInterface
{
private $sql = [];
/**
* Add query
*
* @param string $sql
*/
protected function addSql($sql)
{
$this->sql[] = $sql;
}
public function getSql()
{
... | true |
6412a5ea132d096cfd6117bc507efb32ac74806a | PHP | amonger/currency | /examples/FixerIO.php | UTF-8 | 255 | 2.609375 | 3 | [] | no_license | <?php
require_once __DIR__ . "/../vendor/autoload.php";
use Currency\CurrencyConverter;
use Currency\Handler\FixerIO;
$currencyConverter = new CurrencyConverter(new FixerIO);
echo $currencyConverter
->convert(20)
->from('USD')
->to('EUR');
| true |
d347e7231686b5d643100ed73e29a1bccc21f58e | PHP | pengbo37877/fsb-open | /app/Http/Controllers/IndexController.php | UTF-8 | 2,080 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class IndexController extends Controller
{
public function index()
{
// Set variables for our request
$api_key = config('shopify-app.api_key');
$shared_secret = config('shopify-app.api_secret');
$params = $_GET... | true |
d7ac4364155a508ac0c504a0b497c1b9ca256165 | PHP | hansraj615/blog | /database/seeds/CategoriesTableSeeder.php | UTF-8 | 731 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;
use Faker\Factory as Faker;
use Illuminate\Support\Carbon;
class CategoriesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$title = str_random(10);
... | true |
b6756b814e24a17440833062ddc89073ce06613f | PHP | nannan101/wechat | /server/client.php | UTF-8 | 835 | 2.75 | 3 | [] | no_license | <?php
/**
* client-tcp 客户端
*
* 第一步 运行 开启 server/tcp.php开启server服务端
* 第二步 如何查看工作进程 ps aft | grep tcp.php
* 第三步 杀死进程 kill 2455 强制杀死进程 kill -KILL 2455
* 第四步 执行 php tcp_client.php
* 普通的同步阻塞+select的使用方法外,Client还支持异步非阻塞回调
*/
//创建swoole tcp-client 客户端 //同步阻塞客户端
$client = new swoole_client(SWOOLE_SOCK_TCP);
if (!... | true |
334984f883cdb3b0f5ddc9f1b84270dd4f8bc3d1 | PHP | choi2812/PHP | /SAMPLE01/sample01_05.php | UTF-8 | 364 | 3.65625 | 4 | [] | no_license | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>switchの書き方</title>
</head>
<body>
<?php
//switch文の書き方
$var1= 20;
switch($var1){
case 10:
echo "10です";
break;
case 20:
echo "20です";
break;
case 30:
echo "30です";
break;
default:
echo "その他";
}
?>
</body>... | true |
bf4cf6c3153ff4e7aefcac9267c686367857b79a | PHP | mpoiriert/nucleus-bundle | /Annotation/IAnnotationParser.php | UTF-8 | 389 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Nucleus\Bundle\CoreBundle\Annotation;
/**
*
* @author Martin
*/
interface IAnnotationParser
{
/**
* The service name use as a reference
*/
const NUCLEUS_SERVICE_NAME = "annotationParser";
/**
*
* @param type $className
*
* @return \Nucleus\IService\Annot... | true |
eed80c7a49e78dabeae68c199fdd6172bced762a | PHP | mithunmo/phpsample | /websites/baseAdminSite/controllers/admin/useradmin/affiliateBanners/affiliateBannersController.class.php | UTF-8 | 1,630 | 2.671875 | 3 | [] | no_license | <?php
/**
* affiliateBannersController
*
* Stored in affiliateBannersController.class.php
*
* @author Dave Redfern
* @copyright Mofilm (c) 2009-2010
* @package websites_baseAdminSite
* @subpackage controllers
* @category affiliateBannersController
* @version $Rev: 91 $
*/
/**
* affiliateBannersController... | true |
5474031d468f11e3c7dc7028b88f8d69fce8e3b4 | PHP | mhamzase/laravel8-chatbot-botman | /app/Components/helpers.php | UTF-8 | 1,620 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Str;
use BotMan\BotMan\Messages\Outgoing\Question;
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
function getAnswers($questions, $message)
{
$words = implode('|', explode(' ', Str::lower($message)));
$answers = [];
foreach ($questions as $question) {
$... | true |
d8a97fbe4ae8db2390914400d509a9e28c288176 | PHP | ccforevercn/blog | /app/Http/Requests/Menus/MenusUpdateRequest.php | UTF-8 | 2,127 | 2.65625 | 3 | [] | no_license | <?php
/**
* @author: ccforevercn<1253705861@qq.com>
* @link http://ccforever.cn
* @license https://github.com/ccforevercn
* @day: 2020/7/21
*/
namespace App\Http\Requests\Menus;
use App\Http\Requests\Request;
/**
* 修改验证
*
* Class MenusUpdateRequest
* @package App\Http\Requests\Menus
*/
class Menu... | true |
f75a432db32704de5996f2fe2ebf8b2a0bd1a68f | PHP | Xel4ek/todo | /TodoList.class.php | UTF-8 | 5,406 | 2.765625 | 3 | [] | no_license | <?php
class TodoList {
private $con;
private $user = 'RootBeeJee';
private $pass = '~0jrpusWTWdP*8q}';
private $db_name = 'xel4ek';
private $list = [];
private $order = 'user';
private $direct = true;
private $page = 0;
private $message = null;
private $todo_count = 0;
private $login = 0;
privat... | true |
13c324ce31437bb9e48a3b12e9cde0f959e260ac | PHP | mychalvlcek/cvut-bp | /src/controllers/ComparisonController.php | UTF-8 | 441 | 2.71875 | 3 | [] | no_license | <?php
class ComparisonController extends Controller {
public function __construct(ViewModel $model) {
parent::__construct($model);
if(count($_POST))
$this->model->save($_POST);
}
public function lst() {
if(isset($_GET['page'])) {
$this->model->setPage($_GET['page']);
}
}
public function show($id... | true |
6215a9ff6a765175dd16f281996c32cf22bf8f35 | PHP | zachjonesnoel/ELearningPortal | /database/flogin.php | UTF-8 | 1,466 | 2.796875 | 3 | [] | no_license | <?php
session_start();
/* Attempt MySQL server connection. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
$link = mysqli_connect("localhost", "root", "", "elearning");
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error()... | true |
70acee37c0fe00928bba5c233c03c4ab45b1d3ee | PHP | MooAndXun/NextStep | /app/Http/Controllers/CircleController.php | UTF-8 | 4,457 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: chenm
* Date: 2016/11/30
* Time: 20:09
*/
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Circle;
use App\Logic\CircleLogic;
class CircleController extends Controller
{
protected $circleLogic;
public function __construct(CircleLogic $... | true |
6ddf9b0dc7529cb94f09f5ba0f1ac23662b1bb73 | PHP | itlogunov/loftshool-265-homework-4 | /index.php | UTF-8 | 4,871 | 3.015625 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
require_once 'src/autoloader.php';
use src\classes\Tariffs\BaseTariff;
use src\classes\Tariffs\HourlyTariff;
use \src\classes\Tariffs\DailyTariff;
use src\classes\Tariffs\StudentTariff;
/**
* Тариф «Базовый»
*/
echo '<b>Тариф «Базовый»</b><br><br>';
$baseTariff = new BaseTariff... | true |
4720320ff01867cc0e98c8e1eae4496a099c9292 | PHP | Sobhan-Eskandari/amar7 | /app/User.php | UTF-8 | 1,696 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
use SoftDeletes;
/**
* The attributes that are mass assignable.
*
* @var... | true |
1339213e67aec6e27fc15da115e48bbae045e0a8 | PHP | ozkanozcan/eburhan_dbo_class | /backend/Cache/Adapter/Memcache.php | UTF-8 | 3,257 | 2.828125 | 3 | [] | no_license | <?php
class Cache_Adapter_Memcache extends Cache_Adapter
{
// memcache objesini tutan değişken
private $memcache = null;
function __construct(Array $opt)
{
// memcache eklentisi yüklü mü acaba?
if (! extension_loaded('memcache'))
throw new Cache_Exception('memcac... | true |
b92d7bf082ab6b62a6b2ff182cb32d8211b3c8bb | PHP | LucasBarbosaFonseca/sistemaAvaliacaoOnline | /InsertUserForm.php | UTF-8 | 2,392 | 3.03125 | 3 | [] | no_license | <?php
error_reporting(0);
ini_set("display_errors",0);
require_once 'class/classUsers.php';
if (isset($_POST['registerUser'])) {
if (!isset($_SESSION))
session_start();
foreach ($_POST as $key => $value)
$_SESSION[$key] = $value;
$user = new Users();
... | true |
b5ed41d55d6f6d76fca3cfdfd093f8dd59bdd361 | PHP | carolinasauceda/Punto-de-venta-6 | /frontend/Controllers/Ventas/VentasController.php | UTF-8 | 4,379 | 2.640625 | 3 | [] | no_license | <?php
//Por cuestiones del desarrollo se debe importar el archivo DBManager antes de importar esta clase
class VentasManager extends DBManager
{
public function __construct()
{
parent::__construct();
}
/*protected function _registerExist($id)
{
try {
$this->sql = "SELE... | true |
056dc34f8abb1715439f515eade0b2f92a5d467e | PHP | Mohamed-mekawy/tesitoo-opencart | /api/v1/catalog/controller/checkout/base/shipping_method_base.php | UTF-8 | 2,798 | 2.75 | 3 | [] | no_license | <?php
class ControllerCheckoutShippingMethodBaseAPI extends ApiController {
private $defaultParameters = array(
'comment' => ''
);
public function index($args = array()) {
if($this->request->isGetRequest()) {
$this->get();
}
elseif($this->request->isPostRequest()) {
$this->post();
}
else {
th... | true |
8d658e1bd915d604acb8694c55d74b0d904f64d2 | PHP | Marlene0405/prodpoo | /class-typprod.php | UTF-8 | 1,052 | 3.03125 | 3 | [] | no_license | <?php
declare(strict_types=1);
require_once("class-typprodcarac.php");
// Classe type produit
class Typprod extends TypprodCarac
{
private $typprod_desc;
public function __construct()
{
$this->typprod_desc = "";
parent::__construct();
}
public function getTypprodDesc():string
... | true |
a57b5a412f4adc626da958403aa99748df18252f | PHP | waliens/CalendarTool | /web/ct/controllers/browser/PrivateEventsController.class.php | UTF-8 | 1,184 | 2.609375 | 3 | [] | no_license | <?php
/**
* @file
* @brief Contains the PrivateEventsController class
*/
namespace ct\controllers\browser;
use util\mvc\BrowserController;
/**
* @class PrivateEventsController
* @brief A class for generating the private events page
*/
class PrivateEventsController extends BrowserControll... | true |
a0eb0e433e39f7721e02e074d32b462e188518a6 | PHP | KevinCamos/filmaWeb-FW_PHP_OO_MVC_AngularJS1.4 | /backend/module/cart/model/DAO/cart_dao.class.singleton.php | UTF-8 | 4,333 | 2.546875 | 3 | [] | no_license | <?php
class cart_dao
{
static $_instance;
private function __construct()
{
}
public static function getInstance()
{
if (!(self::$_instance instanceof self)) {
self::$_instance = new self();
}
return self::$_instance;
}
public function select_data_cou... | true |
4e5850d5056bbe780addd8c78a90f021405fb84d | PHP | ArtLoban/LightIT_Laravel_ResearcherRate | /app/Services/Publications/Patents/Patent/StorageService/Contracts/StorageServiceInterface.php | UTF-8 | 739 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Publications\Patents\Patent\StorageService\Contracts;
use App\Utilities\Repository\Interfaces\MainRepository;
interface StorageServiceInterface
{
/**
* @param array $data
* @param int $userId
* @param MainRepository $publication
* @param MainRepository $edition
... | true |
a3525784fa46c1d8623ec64db417b97f0061f0ab | PHP | sandsmark/owncloud | /inc/lib_connect.php | UTF-8 | 7,793 | 2.703125 | 3 | [] | no_license | <?php
/**
* ownCloud
*
* @author Frank Karlitschek
* @copyright 2010 Frank Karlitschek karlitschek@kde.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version ... | true |
f47767ed83cc8e60f67fcbbcba2fabcb9531838e | PHP | aikakira/Dispatchio | /src/Classes/Consignment.php | UTF-8 | 406 | 2.984375 | 3 | [] | no_license | <?php
namespace g4m\Classes;
use g4m\Libs\Courier;
/**
* Our consignment should be the order object,
* It should contain all the details of the package i.e. address, contact etc
*/
Class Consignment
{
protected $orderInfo;
public $courier;
public function __construct($orderInfo, Courier $courier)
... | true |
64bdae063cf6ad5179bf59cc26062a84a7ea6b01 | PHP | Toliam/vcompacte | /controllers/C_Login.php | UTF-8 | 1,693 | 2.671875 | 3 | [] | no_license | <?
require_once("models/M_Users.php");
class C_Login extends C_Base {
function __construct(){
parent::__construct();
}
public function action_index() {
$this->title = "Welcome";
// Запуск сессии.
session_start();
// Менеджеры.
$mUsers = M_Users::GetInstance();
// Очистка старых сессий.
$mUsers->... | true |
6c6af802602f15307197f593905dc2bb2ffeab84 | PHP | vgrynishak/m2 | /src/App/Mapper/Division/DoctrineEntityDivisionMapper.php | UTF-8 | 862 | 2.625 | 3 | [] | no_license | <?php
namespace App\App\Mapper\Division;
use App\App\Doctrine\Entity\Division as DivisionORM;
use App\Core\Model\Division\Division;
use App\Core\Model\Division\DivisionId;
use App\Core\Model\Exception\InvalidDivisionIdException;
class DoctrineEntityDivisionMapper
{
/**
* @param DivisionORM $divisionORM
... | true |
3f47a64dae46d6b7a748295135ea8ace09e78818 | PHP | afrodesia/blogger | /app/database/seeds/PostCommentSeeder.php | UTF-8 | 925 | 2.828125 | 3 | [] | no_license | <?php
class PostCommentSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$content = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown print... | true |
ce47e8b71490649b63768a9f9fbf192d02f6e2f3 | PHP | Adrieldf/greenbook | /src/controller/AtualizaTarefaController.php | UTF-8 | 1,343 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use greenbook\helper\EntityManagerFactory;
use greenbook\model\TipoDeTarefa;
use greenbook\model\Tarefa;
use greenbook\repository\TipoDeTarefaRepository;
use greenbook\repository\TarefaRepository;
require_once __DIR__ . '/../../vendor/autoload.php';
$id = @$_POST["txtIdEdit"];
$descricao = @$_POST["txtTarefaUp... | true |
7dea2351743ce940a307213e9e6c12fdc91edb6b | PHP | cobbdb/apprount | /private/Catalog.php | UTF-8 | 1,104 | 3.390625 | 3 | [] | no_license | <?php
/**
* Catalog.php
*
* @author Dan Cobb
* @since 1.4.1
*/
class Catalog {
/**
* Collection of page titles mapped against their views.
*/
private static $catalog = Array();
/**
* Adds a page to the catalog.
* @param {String} title
* @param {Number} views
*/
... | true |
1566af7bb3735e4f8e5bb706606c3e3081c6e640 | PHP | tinybolt/XCms | /core/components/asyncEvent/logging/LoggerAccess.php | UTF-8 | 1,842 | 2.703125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "{{logger_access}}".
*
* The followings are the available columns in table '{{logger_access}}':
* @property string $id
* @property string $user_id
* @property string $username
* @property string $remote_ip
* @property string $message
* @property string $catgory
*... | true |
e89564b1cbea470d9c63bddf6838e2f42cb1464b | PHP | BenMaruchu/LimeSurvey | /application/helpers/admin/export/ExcelWriter.php | UTF-8 | 2,547 | 2.96875 | 3 | [] | no_license | <?php
/**
* Exports results in Microsoft Excel format. By default the Writer sends
* HTTP headers and the file contents via HTTP. For testing purposes a
* file name can be to the constructor which will cause the ExcelWriter to
* output to a file.
*/
class ExcelWriter extends Writer
{
private $workbook;
priva... | true |
0f5d387dc38e633412f5a84293ad51fbc0979282 | PHP | borchard-dev/phpsqlN-N | /exercises01/diceroll-english-array.php | UTF-8 | 654 | 4.25 | 4 | [] | no_license | <!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>Diceroll-English-Array</title>
</head>
<body>
<?php
//initialize array with stored values
$english = [
1 => 'one',
2 => 'two',
3 => 'three',
4 => 'four',
5 => 'five',
6 => 'six'
];
//initi... | true |
fbdebe472f452b2e402d45e58f97230597a78325 | PHP | Chao-Xi/php_daily_pra | /arrays_mani/6.key.php | UTF-8 | 770 | 3.796875 | 4 | [] | no_license | <?php
//1.Key()
$fruits1=array('red'=>'Apple','yellow'=>'Banana','orange'=>'Orange');
while($key=key($fruits1))
{
print_r($key);
echo "<br/>";
next($fruits1);
//next() move to next index
}
//2.array_key_exitsts()
$fruit['apple']='red';
$fruit['Ba... | true |
e3e24f65f88046ce8445a602e8ba456b319a132d | PHP | magickatt/OffensivePhraseScorer | /src/WattpadCodingChallenge/Word/Filter/CaseFilter.php | UTF-8 | 287 | 2.90625 | 3 | [] | no_license | <?php
namespace WattpadCodingChallenge\Word\Filter;
/**
* Ensures case consistency prior to word comparison
*/
class CaseFilter implements FilterInterface
{
/**
* @inheritdoc
*/
public function sanitizeWord($string)
{
return strtolower($string);
}
} | true |
ebd8a1e2f0bc7b50a3211cad7f240cce70fe9415 | PHP | SkullaCode/base | /app/interfaces/ISetting.php | UTF-8 | 258 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Interfaces;
use Software\Settings\Model;
interface ISetting
{
/**
* @return Model
*/
public function Load();
/**
* @param Model $model
* @return mixed
*/
public function Save(Model $model);
} | true |
a5b9a7c779c2eb3fa3afda439af2880f0d5f6ee4 | PHP | 0xAiKang/laravel-api-init | /app/Rules/MobileValidator.php | UTF-8 | 749 | 3.09375 | 3 | [] | no_license | <?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
/**
* 手机号验证
*
* Class MobileValidator
*
* @package App\Rules
*/
class MobileValidator implements Rule
{
/**
* Determine if the validation rule passes.
*
* @param string $attribute
* @param mixed $value
* @retu... | true |
8598c6c28d2a51d301a3080ea433c140eb58dfc7 | PHP | cundd/stairtower | /Classes/Aggregation/MapReduce.php | UTF-8 | 2,997 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Cundd\Stairtower\Aggregation;
use Closure;
use Cundd\Stairtower\Aggregation\Exception\InvalidEmitKeyException;
use Cundd\Stairtower\Domain\Model\DatabaseInterface;
use Cundd\Stairtower\Utility\GeneralUtility;
use Iterator;
/**
* Class MapReduce
*/
class MapReduce extends Ab... | true |
4cd1c0f5f99b34c5a7bbd5b4a5e2be9661d8962b | PHP | saeidee/circle | /app/ValueObjects/CircuitBreaker/CircuitStatus.php | UTF-8 | 844 | 3.265625 | 3 | [] | no_license | <?php
namespace App\ValueObjects\CircuitBreaker;
use App\Enums\CircuitEnums;
/**
* Class CircuitStatus
* @package App\ValueObjects\CircuitBreaker
*/
final class CircuitStatus
{
/** @var int */
private $status;
/**
* CircuitStatus constructor.
* @param int $status
*/
public function... | true |
49d2c49fba9786efa5d1da38d7054442f41b73b0 | PHP | sfzx584/PHPMetarTafParser | /tests/Utils/TemperatureConverterTest.php | UTF-8 | 581 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Jean-Kevin KPADEY
*/
namespace PHPMetarTafParser\Tests\Utils;
use PHPMetarTafParser\Utils\TemperatureConverter;
use PHPUnit\Framework\TestCase;
/**
* Class TemperatureConverterTest
* @package PHPMetarTafParser\Tests\Utils
*/
class TemperatureConverterTest extends TestCase
{
public funct... | true |
0cd4b26e55d1bb5e6a4e23b01480e2d50b54829c | PHP | MarciellyGazola/PPI | /cadastrarPub.php | UTF-8 | 1,869 | 2.59375 | 3 | [] | no_license | <?php
include "conexao.php";
$id = $_POST['id'];
$titulo = $_POST['titulo'];
$pub = $_POST['pub'];
$data = date('Y-m-d h:i:s');
if (isset($_FILES['arquivo'])){
$extensao = strtolower(substr($_FILES['arquivo']['name'], -4));
$novo_nome = md5(time()). "." . $extensao;
$diretorio = "arquivos/";
$foto ... | true |
a6ef854a0e92d42b45066fead5c9024f482f1066 | PHP | enzoj/PHP | /for.php | UTF-8 | 447 | 3.140625 | 3 | [] | no_license | <form>
<input type="text" name="nome">
<input type="date" name="dataNascimento">
<input type="submit" value="Inserir">
</form>
<?php
if(isset($_GET)){
foreach ($_GET as $key => $value) {
echo "Nome do campo: " . $key . "<br>";
echo "Valor do campo: " . $value . "<hr>";
}
}
?>
<?php
/*
echo "<select>"... | true |
dd1adf75784c74e7b2ab6660c0910731ca91987f | PHP | goto-bus-stop/Eat-IT | /traits/AuthTrait.inc | UTF-8 | 1,385 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Marijn Pool <info@marijnpool.nl>
* @author René Kooi <rene@kooi.me>
*/
/**
* Adds login related functionality.
*
* @author Marijn Pool <info@marijnpool.nl>
* @author René Kooi <rene@kooi.me>
*/
trait AuthTrait {
/**
* Gets the currently logged in user.
*
* @return User|void ... | true |
44f5eaf6af671369231f9a5124eddcf45ec14a43 | PHP | chaptalsio-chesnel/TPBlogMVC | /Modele/Modele.php | UTF-8 | 2,351 | 2.890625 | 3 | [] | no_license | <?php
<<<<<<< HEAD
// Renvoie la liste de tous les billets, triés par identifiant décroissant
function getBillets(){
$bdd = getBdd();
$billets = $bdd->query('select BIL_ID as id, BIL_DATE as date,'
. ' BIL_TITRE as titre, BIL_CONTENU as contenu from T_BILLET'
. ' order by BIL_ID desc');
return $billets;... | true |
26f56eb03da5757d97cc1af528cd503590f7949c | PHP | rikh42/laravel-test | /app/forms/FormValidator.php | UTF-8 | 1,640 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Rik
* Date: 30/04/2014
* Time: 12:02
*/
namespace app\forms;
use Illuminate\Validation\Factory as Validator;
/**
* Class Form
* @package app\forms
*/
abstract class FormValidator {
/**
* @var Validator
*/
protected $validator;
/**
* @... | true |
ef8a4d81fec30e798cbdaa8ffb8b5519739cd21a | PHP | permaxis/laravel-core | /src/app/Services/Api/Token.php | UTF-8 | 2,193 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Permaxis.
* User: Permaxis
* Date: 13/03/2020
* Time: 15:05
*/
namespace Permaxis\LaravelCore\app\Services\Api;
use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Parser;
class Token
{
/**
* @var string
*/
private $tokenType;
/**
* @var integer
... | true |
96da4d9f84b590af9a4c7027c6ee73c0b852f8a5 | PHP | foreweather/publisher | /src/application/Providers/QueueProvider.php | UTF-8 | 673 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Providers;
use Phalcon\Di\DiInterface;
use Phalcon\Di\ServiceProviderInterface;
use Pheanstalk\Pheanstalk;
class QueueProvider implements ServiceProviderInterface
{
/**
* Registers a service provider.
*
* @param DiInterface $di
*
* @return void
*/
public funct... | true |
9cbb40e3c531593ead992a628a74c7f07d0dfe93 | PHP | YetiForceCompany/YetiForceCRM | /app/Conditions/RecordFields/MultipicklistField.php | UTF-8 | 1,163 | 2.71875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
/**
* Multi picklist condition record field file.
*
* @package UIType
*
* @copyright YetiForce S.A.
* @license YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com)
* @author Mariusz Krzaczkowski <m.krzaczkowski@yetiforce.com>
* @author Radosław Skrzypczak <r.skrzypczak@yetiforce.... | true |
65d50245ccb2bd891d80ef222606aebdee9c2ee5 | PHP | xlyao/myframework | /core/lib/log.php | UTF-8 | 576 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: xlyao
* Date: 2017/2/23 0023
* Time: 14:55
*/
namespace core\lib;
class log
{
static $class;
/**
* 初始化日志类
*/
static public function init() {
//确定存储方式
$drive = conf::get('drive', 'log');
$class = '\core\lib\drive\log\\' . $dr... | true |
5e7389f079b0ceae212ec4abded520d89734d714 | PHP | RohanSigmenDev/gittest1 | /application/modules/blog/controllers/Posts.php | UTF-8 | 10,799 | 2.5625 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Posts extends MY_Controller
{
public function __construct()
{
parent::__construct();
//Do your magic here
$this->load->module('template');
$this->load->model('common_model');
$this->load->library('form_validation');
... | true |
564e45f44b4f45fb8e908b60120ac51f32420ea3 | PHP | josemi777/ddd-laravel | /src/Commands/InjectionsUpdateCommand.php | UTF-8 | 6,386 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace DddLaravel\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Yaml\Yaml;
use DddLaravel\Traits\DirectoryHandler;
class InjectionsUpdateCommand extends Command
{
use DirectoryHandler;
const YAML_FILE = 'App/src/config/injection.yml';
/**
* The name and signature of the ... | true |
06c2d06467bc0484f6394dba16cf7759dae832ea | PHP | rstangl/remote-deploy | /classes/deploy/DeployMachine.php | UTF-8 | 8,927 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
import('remote.RemoteClient');
import('remote.RemoteClientException');
import('deploy.IOException');
import('deploy.ConsoleUtil');
/**
* Remote deploy machine.
* @author richard
* @package deploy
*/
class DeployMachine
{
public function __construct(RemoteClient $remoteClient, $checkSumFile, $localPath, $re... | true |
12deb7b4b19ae29cb5b7bc6565ac4dbc689a4a4c | PHP | ThibL/librairie | /src/Entity/Ouvrage.php | UTF-8 | 4,221 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\OuvrageRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=OuvrageRepository::class)
*/
class Ouvrage
{
/**
* @ORM\Id
* @ORM\Generated... | true |
a9c352f69fb196bee3ee892ae534ddff4c498e01 | PHP | seunzone/simple-exam-app | /Logics/functions.php | UTF-8 | 1,070 | 3.015625 | 3 | [] | no_license | <?php
function questions($type){
$sql= "SELECT * FROM questions WHERE exam_type = '{$type}'";
Echo "<h3>Chemistry 101</h3>";
require"connect.php";
$number= 0;
$results = mysqli_query($con, $sql);
while ($row=mysqli_fetch_assoc($results)){
echo "<br>";
echo "<br>" ;
echo ++$number. ". " . $ro... | true |
b950e8c387e87cda99d00c2a32b053a3e5a2ab4a | PHP | conorsmith/tbtag | /app/Events/PlayerLooksAround.php | UTF-8 | 442 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ConorSmith\Tbtag\Events;
use ConorSmith\Tbtag\Location;
use ConorSmith\Tbtag\Ui\Payload;
class PlayerLooksAround extends GameEvent implements Printable
{
private $location;
public function __construct(Location $location)
{
$this->location = $location;
... | true |
42211429650e5254935ae1bf53f24e142d53709f | PHP | sublime303/PLC-scripts | /beckhoff.php | WINDOWS-1252 | 1,135 | 2.671875 | 3 | [] | no_license | <pre>
<?
# Exempel rad
# <------>:<--->; (*-------------------------------------*)
#A1215_LB21_TF01_L AT %MX1150.0: BOOL; (* A1215_LB21_TF01_L Driftfel flkt *)
#A1215_LB21_U101_COML AT %MX1150.1: BOOL; (* A1215_LB21_U101_COML Komm.fel modbus frekv.omr. *)
if ($fd = fopen (... | true |
b45aa06fa1ae52bbc8211ff3a22db8ea0364f88a | PHP | AnnaJomon-97/lovecare | /config/Session.php | UTF-8 | 943 | 3.171875 | 3 | [] | no_license | <?php
/**
* Class for session functions
*/
class Session
{
function __construct()
{
# code...
}
/**
* Function to store messages
*/
function set_flashdata( $index,$message ){
$_SESSION[$index] = $message ;
}
/**
* Function to get stored messages
*/
function get_flashdata( $index ){
$output = null... | true |
395cf7b370746a9241a121aa0200572cf6a20ab7 | PHP | meetkhan21/firstRestapi | /config/Database.php | UTF-8 | 644 | 3.21875 | 3 | [] | no_license | <?php
class Database
{
// Set the parameters to private
private $host = "localhost";
private $user = "root";
private $pass = "Ilovepakistan2";
private $db = "rest";
private $conn;
public function connection()
{
$this->conn = null;
try {
// Setup conn
... | true |
f877005429694fe31f4789c32e85601a32214f8d | PHP | maoknox/pruebaW | /src/BoundedContext/Weather/Domain/DW.php | UTF-8 | 1,028 | 3.21875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Src\BoundedContext\Weather\Domain;
use Src\BoundedContext\Weather\Domain\ValueObjects\DWName;
use Src\BoundedContext\Weather\Domain\ValueObjects\DWTime;
use Src\BoundedContext\Weather\Domain\ValueObjects\DWWeather;
final class DW
{
private $name;
private $time;
p... | true |
6855da1a8ac84dcb31bab376838b558901198e30 | PHP | danghvu/ngay-dai-nhu-dem | /parser.php | UTF-8 | 536 | 2.9375 | 3 | [] | no_license | <?php
/**
* extract the main verb of a phrase
*/
$keyverbs = array("sent","gui","done");
function get_verb($term)
{
global $keyverbs;
$term = strtolower($term);
for($i = 0 ; $i < sizeof($keyverbs); $i++){
if(strpos($term, $keyverbs[$i]) !== false ){
return $keyverbs[$i];
}
... | true |
5fa4309168cbe0355b372b9623fcb8c5dc7f7df1 | PHP | gambrogi-snappler/Utils | /Bundle/ABMBundle/Controller/ABMController.php | UTF-8 | 16,400 | 2.5625 | 3 | [] | no_license | <?php
namespace Snappminds\Utils\Bundle\ABMBundle\Controller;
use Snappminds\Utils\Bundle\WidgetsBundle\Widget\Grid\Grid;
use Snappminds\Utils\Bundle\BluesBundle\Model\ViewState;
use Snappminds\Utils\Bundle\BluesBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
abstract class ABMController ... | true |
cfb72c66668fceb9836d5ac3ff38596d27271e8c | PHP | bostil-support/owl-vision | /app/Traits/MultiRenderable.php | UTF-8 | 722 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Traits;
use Illuminate\Support\Str;
trait MultiRenderable
{
public function initializeMultiRenderable()
{
$this->append('view');
}
public function getViewAttribute(): string
{
$view = Str::kebab(class_basename(__CLASS__));
if (isset($this->template) ... | true |
ad51c1ab7e715fa0c2d86a28148457e0e0b22c2d | PHP | brnthr/etherpad | /zapi.php | UTF-8 | 8,932 | 2.640625 | 3 | [] | no_license | <?php
error_reporting(E_ALL ^ E_DEPRECATED);
ini_set('display_errors', true);
if (session_id() === '') session_start();
require 'vendor/autoload.php';
include_once __DIR__."/config.php";
function test(){
$result = array();
$result["allow_url_fopen"] = ini_get('allow_url_fopen');
$result["message"] = "Cet... | true |
bd5aa76af096637dfc2e00aad9fd6a54d570effc | PHP | the-eater/assert-sequence | /test/SequenceModelTest.php | UTF-8 | 312 | 2.5625 | 3 | [] | no_license | <?php
use function Eater\AssertSequence\createSequenceModel;
use PHPUnit\Framework\TestCase;
class SequenceModelTest extends TestCase
{
public function testFunc() {
$assert = createSequenceModel($this, [1, 2, 3]);
foreach ([1,2,3] as $item) {
$assert($item);
}
}
}
| true |
3fb0801c7ecf3f5d6497c993c2b63bf47898a4b7 | PHP | Hanif437/pw2020_193040001 | /praktikum/P6_SENIN13_193040001/latihan6b/php/tambah.php | UTF-8 | 2,018 | 2.765625 | 3 | [] | no_license | <?php
require 'functions.php';
if (isset($_POST['tambah'])) {
if (tambah($_POST) > 0) {
echo "<script>
alert('Data Berhasil Ditambahkan!');
document.location.href = admin.php;
</script>";
} else {
echo "<script>
alert('Data Gagal Ditambahkan!');
document.lo... | true |
10184fcfecab5a307210fdd9bc9f29f181c4b78f | PHP | SlobodanLazic/PHP-ITA | /Core PHP Programming/Predavanje 3/operatori(aritmeticki).php | UTF-8 | 385 | 3.640625 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Operatori(aritmeticki)</title>
</head>
<body>
<?php
$a = 2;
$b = 5;
//sabiranje
echo $a + $b . "<br>";
//oduzimanje
echo $a - $b . "<br>";
//mnozenje
echo $a * $b . "<br>";
//deljenje
echo $a / $b . "<br>";
//moduo(ostatak p... | true |
a0325174a199d7bb913f411ee0d872fc2219ad81 | PHP | JohnH31/MyAppProductoSW | /producto_sw/buscar_id.php | UTF-8 | 1,111 | 2.515625 | 3 | [] | no_license | <?php
include_once("connection.php");
$jsonArray = array();
if (isset($_GET["id_producto"])) {
$id_producto = $_GET["id_producto"];
$buscarId = "SELECT nombre_producto, descripcion_producto, categoria_producto, presio_producto
FROM tbl_producto WHERE id_producto =$id_producto";
$resultado = mysqli_quer... | true |
58f64777d025b77c62d64b311b6885703fee0f05 | PHP | jannikisakoolprogrammer/Dill2 | /dill2/code/classes/UploadWebsiteSFTP_Operation_UploadWebsite_AuthSSH.php | UTF-8 | 7,540 | 2.53125 | 3 | [] | no_license | <?php
require_once("UploadWebsiteOperationBase.php");
set_include_path(
".." . DIRECTORY_SEPARATOR .
"dill2" . DIRECTORY_SEPARATOR .
"code" . DIRECTORY_SEPARATOR .
"phpseclib1.0.18");
require_once(
".." . DIRECTORY_SEPARATOR .
"dill2" . DIRECTORY_SEPARATOR .
"code" . DIRECTORY_SEPARATOR .
"phpseclib1.0.18" . ... | true |
4edd0c25a069fbf0f5aff90a38dd3880cae7386c | PHP | nicevoice/WP_wechat_text_generator | /includes/wechat_item_template.php | UTF-8 | 3,634 | 2.53125 | 3 | [] | no_license | <?php
/**
* @param $wechat_item_id
* @param int $order
* @return string
*/
function generate_item_list( $wechat_item_id, $order=1 ) {
$wechat_item_title = get_post( $wechat_item_id )->post_title;
$list_item = <<<EOD
$order. $wechat_item_title<br />
EOD;
return $list_item;
}
/**
* @param $wechat_item_id... | true |
15dbd238d0d239c259c5072be3b3c59ed2a91de9 | PHP | Monthach/CurrencyConverter | /process.php | UTF-8 | 1,156 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="conteiner">
<div class="box">
<h2>Currency converter</h2>
<br>
<div class = "box-01">
<?php
$money=$_POST['money'];
$coin=... | true |
b6d869778859db2652cd38b1cbc6a0dfe4c3e778 | PHP | wxinheb/uenty | /vendor/codeception/base/tests/data/claypit/tests/powers/MageGuildCest.php | UTF-8 | 570 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
class MageGuildCest {
public function darkPower(PowerGuy $I)
{
$I->castFireball();
}
public function whitePower(PowerGuy $I)
{
$I->castFireball();
}
public function greenPower(PowerGuy $I)
{
$I->castFireball();
}
public functi... | true |
d0bcc9c6d4d6cc5d2be7b16cfbc25129be4884c1 | PHP | alexanderyee/RancidTomatoes | /model.php | UTF-8 | 6,520 | 3.34375 | 3 | [] | no_license | <?php
/*Name: Alex Yee, Bijan Anjavi
Course: CSC 337
TA(s): Hasanain Jamal
Description: model for Rancid Tomatoes Enhanced database
*/
class Model {
private $conn;
/*Description: constructor for the Model class, used to assign instance variable to the database. */
public function __construct(){
$db= 'm... | true |
98ff1e318dc763e98deb3d1fc00a47a79cdfe3d2 | PHP | jiacheng-0/IS113-Dump | /CodeStepByStep/BinarySearch.php | UTF-8 | 1,106 | 3.375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: micha
* Date: 1/2/2019
* Time: 12:33 AM
*/
if (isset($_GET["submit"]) && $_GET["submit"]=="BinarySearch!") {
// predefine the search range [1, 100]
$hi = 100;
$lo = 1;
/* add your code that performs binary search to find the length of
pa... | true |
2992a15d50b7e24198e00be9bfa07d91bfd0c494 | PHP | Denitsa2731/InventorySystem | /src/Repository/ProductRepository.php | UTF-8 | 8,236 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Database\Database;
use App\Entity\Product;
class ProductRepository
{
private $conn;
function __construct()
{
$db = new Database();
$this->conn = $db->connect();
}
public function addProduct($productName, $productQty, $pr... | true |
db2f9fb2bcfd337814f5b62d34dc60a127324b29 | PHP | StrahinjaMihajlovic/facebook | /app/Http/Requests/StoryRequest.php | UTF-8 | 952 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoryRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the ... | true |
0037c32626de1ae243d2a27a6f60a95ec5b3687e | PHP | qiudiking/coroutine | /src/Result.php | UTF-8 | 1,190 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: user
* Date: 2019/7/20
* Time: 16:03
*/
namespace Scar;
class Result {
protected static $instance = null;
protected $result
= [
'code' => 0,
'data' => null,
'message' => '',
];
protected function __construct() {
}
public function setData( $value )... | true |