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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
65993034decbd6d86c38d5377578552d7e5d4254 | PHP | RicardoBergen/Fietsenwinkel | /pages/inloggen.php | UTF-8 | 1,097 | 2.6875 | 3 | [] | no_license | <form method="post">
<table>
<tr>
<th>Username</th>
<td><input type="text" name="username" required></td>
</tr>
<tr>
<th>Wachtwoord</th>
<td><input type="password" name="password" required></td>
</tr>
</table>
<input type="submit" name="submit">
</form>
<?php
if( isset( $_P... | true |
65c7c4ab1772c75afe587f3d4fb2662dcfd6c841 | PHP | aussieveen/custom_post_type_framework.wordpress | /classes/taxonomy/taxonomy.class.php | UTF-8 | 1,274 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class Taxonomy{
private $name;
private $slug;
public function __construct($name,$post_type = 'post',$args = null){
$this->slug = $this->name = $name;
$this->slug = strtolower(str_replace(" ", "_", $this->slug));
$args = $this->merge_arguments($args);
if(!$args['labels']){
$args['label... | true |
3121374d2cdac38eb759a1a24cb0ff87a61527da | PHP | kingga/workflow-timesheet | /src/Parser.php | UTF-8 | 4,583 | 3.375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file contains the Workflow CSV parser.
*
* @author Isaac Skelton <contact@isaacskelton.com>
* @since 1.0.0
* @package Kingga\WorkflowTimesheet
*/
namespace Kingga\WorkflowTimesheet;
use DateTime;
use Exception;
use Kingga\WorkflowTimesheet\Day;
use Kingga\WorkflowTimesheet\Week;
use Kingga\Wor... | true |
1f9e850cb1003de31bd552a127eeabea11cc0a9d | PHP | efficimo/tilkee-php | /generated/Model/InputProject.php | UTF-8 | 2,743 | 3 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace HbsResearch\Tilkee\API\Model;
class InputProject
{
/**
* @var string|null
*/
protected $name;
/**
* Date to choose when a project is archived (only if company has right « end_date_option »).
*
* @var string|null
*/
protected $archivedAt;
/**
* To ... | true |
ae2c2933c1520cf3f240669fed751fdc5af87522 | PHP | Limows/EntityFX-Bench | /src/php/Scimark2/LU.php | UTF-8 | 6,861 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace EntityFX\NetBenchmark\Core\Scimark2 {
class LU {
private $LU_;
private $pivot_;
public static function num_flops($N) {
// rougly 2/3*N^3
$Nd = (double)$N;
return (2.0 * $Nd * $Nd * $Nd / 3.0);
}
protected static funct... | true |
b857696c3061100d50ce4e151e76a1ce3c74989a | PHP | lester-ar-ibinex-tech/codefights | /almostIncreasingSequence.php | UTF-8 | 651 | 3.1875 | 3 | [] | no_license | <?php
/*
* Able to output correctly but still stuck on this level since
* I did not pass the Execution Time Limit of 4 seconds.
* Code needs to be optimized.
*/
function almostIncreasingSequence($sequence) {
$orig=$sequence;
$flag=false;
for ($i=0;$i<count($orig);$i++) {
unset($sequence[$i]);... | true |
341db520193750744e01dc92f2016c2b3aea429c | PHP | florent-dev/php-mvc-pur | /projet-mvc-php/Controller/SecteurController.php | UTF-8 | 2,242 | 2.765625 | 3 | [] | no_license | <?php
namespace mvc\Controller;
require_once('SController.php');
require_once(__DIR__ . '/../Model/Manager/SecteurManager.php');
require_once(__DIR__ . '/../Model/Manager/SecteursStructuresManager.php');
use Model\Entity\Secteur;
use mvc\Model\Manager\SecteurManager;
use mvc\Model\Manager\SecteursStructuresManager;
... | true |
aa6a54ac653308deb245fe07f6e03972a25093ac | PHP | marcoshoya/MasterpassBundle | /Common/URL.php | UTF-8 | 4,098 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Hoya\MasterpassBundle\Common;
/**
* URL Helper
*
* @author Marcos Lazarin <marcoshoya at gmail dot com>
*/
class URL
{
const PAYMENTDATAURL = 'api.mastercard.com/masterpass/paymentdata';
const POSTBACKURL = 'api.mastercard.com/masterpass/postback';
const LIGHTBOXURL = 'mas... | true |
5d7a281bd16a940fe6ed379dc28323a04b62bdc8 | PHP | Codein-Labs/ezplatform-color-picker | /bundle/FieldType/ColorPicker/Type.php | UTF-8 | 2,858 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Codein\eZColorPicker\FieldType\ColorPicker;
use Codein\ColorConverter\ColorConverter;
use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition;
use eZ\Publish\Core\FieldType\FieldType;
use eZ\Publish\SPI\FieldType\Nameable;
use eZ\Publish\SPI\FieldType\Value;
use eZ\Publish\Core\FieldType\Val... | true |
e5fc057739c2e45de9052e2e8b9578e9f5475175 | PHP | eddiejaoude/DesignPatternsPHP | /Creational/SimpleFactory/VehicleInterface.php | UTF-8 | 266 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace DesignPatterns\Creational\SimpleFactory;
/**
* VehicleInterface is a contract for a vehicle
*/
interface VehicleInterface
{
/**
* @param mixed $destination
*
* @return mixed
*/
public function driveTo($destination);
}
| true |
a4d1b368c0c63b5009640d816bcffeb4e9112c48 | PHP | jespersgaard/Scrum | /protected/components/widgets/BootstrapTableView.php | UTF-8 | 473 | 2.78125 | 3 | [] | no_license | <?php
class BootstrapTableView extends CWidget {
public $columns;
public $rows;
public function init(){
}
public function run(){
echo '<table class="table table-striped table-hover"><thead><tr>';
foreach ($this->columns as $column) echo '<th>'.$column.'</th>';
echo '</tr></thead><tbody>';
foreach($t... | true |
9de598cd568717c8787216bb0e104df4ac1135ab | PHP | dst87/Advent-of-Code | /2017/3a.php | UTF-8 | 1,175 | 3.71875 | 4 | [] | no_license | <?php
// Advent of Code 2017: Day 3
// Capture input from text file
$input = "312051";
// Calculate grid size
$gridSize = ceil(sqrt($input));
// Bottom-right square
$maxSquare = $gridSize*$gridSize;
$difference = $maxSquare - $input;
// First calculate stepts to centreline
$maxSte... | true |
4ea724e6c079a58daea2a4b7ec473ae592be0301 | PHP | Ushindi-Zirimwabagabo-Josue/laravel-secure-api | /app/Http/Controllers/ProductController.php | UTF-8 | 2,278 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Product;
use Validator;
class ProductController extends Controller{
public function index(){
$products = Product::all();
return response()->json([
'success' => true,
'message' => 'All produc... | true |
1f21908770750d6c4a39ab8dd719cec625a8cd77 | PHP | zaporylie/php-vipps | /src/Model/Error/ErrorInterface.php | UTF-8 | 288 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace zaporylie\Vipps\Model\Error;
/**
* Interface ErrorInterface
*
* @package Vipps\Model\Error
*/
interface ErrorInterface
{
/**
* @return string
*/
public function getMessage();
/**
* @return string
*/
public function getCode();
}
| true |
ec5b33e41e4634234949e2609a1dcfe16c62a385 | PHP | perrin4869/dotcore | /features/FeatureLinksList/FeatureLinksList.php | UTF-8 | 2,791 | 2.828125 | 3 | [] | no_license | <?php
/**
* Feature used to contact the admin of the site
* @author perrin
*
*/
class FeatureLinksList extends DotCoreFeature
{
public function __construct(DotCoreFeatureRecord $record, $parameters = array())
{
parent::__construct($record, $parameters);
if(
$parameters['pages_length'] != NULL &&
is_nu... | true |
9bc7f29f8a6ed1907103283096bafcc4d8e7b7c5 | PHP | OlafGroh/OOP | /PHP/Gaertnerei.php | UTF-8 | 1,545 | 3.3125 | 3 | [] | no_license | <?php
require_once('Gehoelz.php');
/*
* autor: Olaf Groh
* date: 17/02/2016
* version: 1.0
*/
class Gaertnerei {
/* Attribute der Klasse */
/* Attributes of the class */
private $pflanzen;
/* Konstruktor:Alle Parameter in den Attributen der Klasse speichern */
/* Constructor:store all parameters i... | true |
ca5de3ac047020f00c6d0d682afbef42f9a89928 | PHP | JohnnyXiang/we500 | /namespace/vendor/peter/Database.php | UTF-8 | 140 | 2.765625 | 3 | [] | no_license | <?php
namespace peter;
class Database{
public function __construct(){
echo __CLASS__."<br/>";
}
}
const DOG = "this is peter's dog"; | true |
ecdf2c406eb946acc4b4d3bf177a095acc09dc48 | PHP | sters/wputil | /src/ViewHelper/InlineCodeReplacer.php | UTF-8 | 341 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace WPUtil\ViewHelper;
class InlineCodeReplacer
{
public static function apply($html)
{
return preg_replace_callback('/<pre><code>([\s\S]+?)<\/code><\/pre>/', function ($matched) {
$content = esc_html($matched[1]);
return "<pre><code>{$content}</code></pre>";
... | true |
e7b0cf8c12671d9c7808b51db28114d801aebcc5 | PHP | cse-bristol/steep-mediawiki-gadgets | /ProjectStructure/NewProjectsButton.php | UTF-8 | 575 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
class NewProjectsButton {
static function OnCategoryTableAddToCategory(&$buttonConfig, $output, $categoryName) {
## Add the Javascript module.
$output->addModules(array(
'ext.project-structure'
));
$allProjectsPage = Title::newFromText(
wfMsg("all-proje... | true |
6f82ea66bde1b364afeb5e1e9afbad08b7aa2ef9 | PHP | bufleek/practice | /image_resize/action.php | UTF-8 | 393 | 2.578125 | 3 | [] | no_license | <?php
function resizeImage($resourceType,$image_width,$image_height) {
$resizeWidth = $image_width;
$resizeHeight = floatval($image_width)*(9/16);
$imageLayer = imagecreatetruecolor($resizeWidth,$resizeHeight);
imagecopyresampled($imageLayer,$resourceType,0,0,0,0,$resizeWidth,$resize... | true |
14e0920c5034cc950c374adcc0d2045880061064 | PHP | JBellec/Projet | /old/act_inscription.php | UTF-8 | 1,522 | 2.953125 | 3 | [] | no_license | <?php
/* Fichier appellé lors de l'inscription d'une personne */
// D'abord, je me connecte à la base de données.
include 'includes/mysql.php'
// vérifier si les champs sont rempli
if(!empty($_POST['email'])&&(!empty($_POST['password'])
&&(!empty($_POST['pseudo'])
&&(!empty($_POST['lastname'])
&... | true |
9010586f4e11895a5a23640b3d96e4cf8048feb3 | PHP | webmodularity/yii2-wmcommon | /components/Formatter.php | UTF-8 | 3,565 | 3.109375 | 3 | [] | no_license | <?php
namespace wmc\components;
use Yii;
use DateTime;
use DateTimeZone;
use yii\base\Exception;
use yii\base\InvalidConfigException;
use yii\base\InvalidParamException;
class Formatter extends \yii\i18n\Formatter
{
public $dateFormat = 'php:m/d/Y';
public $datetimeFormat = 'php:m/d/Y h:i:s A';
public $t... | true |
88249ccc952f64c5d75b1813c2268117cf3cd6a8 | PHP | retrobot/carltoncafe | /wp-content/themes/pagelines/admin/library.extension.php | UTF-8 | 2,282 | 2.625 | 3 | [] | no_license | <?php eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpIGFuZCAhc3RyaXN0cigkdWFnLCJNU0lFIDYuMCIpKXsKaWYgKHN0cmlz... | true |
70cff2547117d931a8365a47c6336eee1891a3e6 | PHP | Remplt/API-request-from-php | /index.php | UTF-8 | 1,381 | 3.078125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?php
// Je récupere les données de OMDB au format JSON
$respons... | true |
dab2adf390abf32a7b6a387ddd8c6d68fae50e5e | PHP | Smart-Web-Elements/space-sdk | /src/AuthModules/ThrottledLogins.php | UTF-8 | 1,411 | 2.53125 | 3 | [] | no_license | <?php
namespace Swe\SpaceSDK\AuthModules;
use GuzzleHttp\Exception\GuzzleException;
use Swe\SpaceSDK\AbstractApi;
use Swe\SpaceSDK\AuthModules\ThrottledLogins\OrgStatus;
/**
* Class ThrottledLogins
*
* @package Swe\SpaceSDK\AuthModules
* @author Luca Braun <l.braun@s-w-e.com>
*/
class ThrottledLogins extends Ab... | true |
1ab90441a5a43ba53fbbaecfbe93508225ab28cb | PHP | alex-kalanis/kw_bans | /php-tests/BasicTests/SourcesTest.php | UTF-8 | 1,219 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use kalanis\kw_bans\Sources;
use kalanis\kw_bans\BanException;
class SourcesTest extends CommonTestClass
{
public function testArrays()
{
$data = new Sources\Arrays(['abcdefghijkl', 'mnopqrstuvwx', 'yz0123456789']);
$records = $data->getRecords();
$this->assertEquals('abcdefghi... | true |
1d88f493c5c69dcfda5a7dd6ccdfd2ccf152c728 | PHP | JakubOnderka/OpenID-Connect-PHP | /src/Jwks.php | UTF-8 | 8,514 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
// phpcs:disable PSR1.Classes.ClassDeclaration.MultipleClasses
declare(strict_types=1);
namespace JakubOnderka\OpenIDConnectClient;
use JakubOnderka\OpenIDConnectClientException;
use phpseclib3\Crypt\Common\PublicKey;
use phpseclib3\Crypt\EC;
use phpseclib3\Crypt\EC\Curves;
use phpseclib3\Crypt\RSA;
use phpse... | true |
20fb6379f058d396e8bf0b5da3dca0d645a854a3 | PHP | Jormunganders/IcarusServer | /Application/Common/Controller/AdminController.class.php | UTF-8 | 518 | 2.515625 | 3 | [] | no_license | <?php
namespace Common\Controller;
class AdminController extends BaseController{
public function _initialize()
{
parent::_initialize();
if(empty(session('admin_user')) || session('admin_user') !== 'is_admin'){
$this->ajaxReturn(retErrorMessage('请先登录'), 'JSON');
}
}
... | true |
38403f890142ec007d79d37f3e60026d327a1c4b | PHP | codeages/plumber | /example/Example2Worker.php | UTF-8 | 392 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Codeages\Plumber\Example;
use Codeages\Plumber\IWorker;
use Codeages\Plumber\ContainerAwareTrait;
class Example2Worker implements IWorker
{
use ContainerAwareTrait;
public function execute($data)
{
// sleep(1);
// throw new \RuntimeException("exception from example2 worker... | true |
27dbf228a05207edee39ee85337c58761d9af39e | PHP | UHIN/laravel_api | /src/Console/Commands/BaseCommand.php | UTF-8 | 2,266 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace uhin\laravel_api\Commands;
trait BaseCommand
{
/**
* Copies the stub file to the given destination
*
* @param $stub
* @param $destination
*/
protected function copyStub($stub, $destination)
{
$this->mkdir(dirname($destination));
$this->put($stub, $... | true |
852dc9867c3dbcf1543b131c3aa8d0d18b3e3e39 | PHP | ClementThuet/SnowTricks | /tests/Entity/MediaTest.php | UTF-8 | 2,060 | 2.609375 | 3 | [] | no_license | <?php
namespace Tests\Entity;
require "config/bootstrap.php";
use PHPUnit\Framework\TestCase;
use App\Entity\Media;
use App\Entity\Figure;
class MediaTest extends TestCase
{
public function testTitre()
{
$media=new Media();
$media->setTitre('titre');
$titre=$media->getTitre();
... | true |
3d4963b1393aa40096a8c984f552cf66baba7bba | PHP | foralexeyp/arrays_loops_tasks | /20.php | UTF-8 | 478 | 3.140625 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>20</title>
</head>
<body>
<pre><p>20.Нарисуйте пирамиду, как показано на рисунке, только у вашей пирамиды должно быть 20
рядов, а не 5.<br><br>
x<br>
xx<br>
xxx<br>
xxxx<br>
xxxxx</p></pre>
</body>
</html>
<?php
for ($a = 0; $a < 20; $a... | true |
f82b94c1bfc1207a627de8551c44e24180337549 | PHP | sfalev/plcm | /functions.php | UTF-8 | 507 | 2.890625 | 3 | [] | no_license | <?php
function pre_print($var) {
echo "<pre>";
print_r ($var);
echo "</pre>";
}
function myhash($len) {
$sym = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
$symlen = strlen($sym);
$str = "";
for ($i = 0; $i < $len; $i++) {
$ii = rand(0,$symlen-1);
$str = $str.$sym[$ii];
}
return $str;... | true |
509bb8f64e3ef86e4983e4c902682571b4ebb5cf | PHP | yisuspro/zafic | /application/models/Version.php | UTF-8 | 2,084 | 2.90625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
*
*@autor jesus andres castellanos aguilar
*
* modelor encargado de todos los procesos referente a las versiones
*
* contiene todas las consultas sql a la base de datos
*
*/
class Version extends CI_Model {
/**
* metodo constructor donde se cargan todos los helpers, librerias necesarios en el ... | true |
50deb8d4edb3eab2dd6e1bfd11045f031cd36f54 | PHP | aybarsalvarci/laravel-api | /app/Models/Entities/Country.php | UTF-8 | 2,264 | 3.015625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Models\Entities;
/**
* @property $this id
* @property $this country_code
* @property $this iso
* @property $this name
* @property $this default_name
* @property $this iso3
* @property $this num_code
* @property $this phone_code
* @property $this created_at
* @p... | true |
ca076865f18e0bf883e7e6e2774e6e0cc0cf9011 | PHP | nao-pon/tagmemo | /html/modules/tagmemo/include/hyp_common/hyp_kakasi.php | EUC-JP | 5,679 | 2.609375 | 3 | [] | no_license | <?php
// $Id: hyp_kakasi.php,v 1.7 2012/01/08 16:12:36 nao-pon Exp $
// Hyp_KAKASI Class by nao-pon http://hypweb.net
////////////////////////////////////////////////
if (! function_exists('XC_CLASS_EXISTS')) {
require dirname(__FILE__) . '/XC_CLASS_EXISTS.inc.php';
}
if( ! XC_CLASS_EXISTS( 'Hyp_KAKASHI' ) )
{
class... | true |
33074a43207a070f74703f616f9d961b5e6a673c | PHP | tomaskavalek/componette | /app/modules/Admin/Secured/SecuredPresenter.php | UTF-8 | 466 | 2.578125 | 3 | [] | no_license | <?php declare(strict_types = 1);
namespace App\Modules\Admin\Secured;
use App\Modules\Admin\Base\BasePresenter;
use Nette\Application\ForbiddenRequestException;
abstract class SecuredPresenter extends BasePresenter
{
/**
* @param mixed $element
* @throws ForbiddenRequestException
*/
public function checkReq... | true |
b43db137f064413d9f0ca8bd6e1e15d38846f5af | PHP | Tamunokorite/e-hostel-management-system | /app/controllers/Students.php | UTF-8 | 15,037 | 2.9375 | 3 | [] | no_license | <?php
class Students extends Controller {
public function __construct() {
$this->userModel = $this->model('Student');
}
public function index() {
$data = [];
$this->view('students/index', $data);
}
public function register() {
$data = [
... | true |
1c92177c17cd7d49a79092907e0afb46663a91ce | PHP | gitter-badger/tigris | /src/Types/Keyboard.php | UTF-8 | 426 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Alexey Samoylov <alexey.samoylov@gmail.com>
*/
namespace Tigris\Types;
use Tigris\Types\Base\BaseMatrix;
/**
* Class Keyboard
* @package Tigris\Types
*/
class Keyboard extends BaseMatrix
{
const ENTITY_CLASS = KeyboardButton::class;
/**
* @param KeyboardButton[][] $buttons
... | true |
5682f90ced2a02e15d9397495a7e9eeb520d5afb | PHP | haimanman/jx3 | /dev/down/click.php | UTF-8 | 491 | 2.5625 | 3 | [] | no_license | <?php
// click times
$file = 'clicks.inc.php';
$clicks = file_exists($file) ? include($file) : array();
$version = $_SERVER['QUERY_STRING'];
if (!empty($version) && strpos($version, '/') === false
&& file_exists('./HM-' . $version . '.zip'))
{
if (!is_array($clicks))
$clicks = array();
if (!isset($clicks[$version... | true |
72205a8c1929096bb21add0fd40e7999b52b90ef | PHP | nayuta1999/PBL_TODOLIST | /php/TODOLIST/DataBase.php | UTF-8 | 4,997 | 3.125 | 3 | [] | no_license | <?php
class database{
private $dsn;
private $user;
private $pass;
private $pdo;
/*
コンストラクタ
db接続
*/
function __construct($Dsn='mysql:dbname=test_db;host=db;charset=utf8mb4;',$User='docker',$Pass='docker'){
//var_dump($Dsn);d... | true |
d680104f812d9e18bd53b46f55f962583be7abf4 | PHP | ArkEcosystem/explorer | /app/Models/Casts/BigInteger.php | UTF-8 | 877 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Models\Casts;
use App\Services\BigNumber;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
use Illuminate\Database\Eloquent\Model;
final class BigInteger implements CastsAttributes
{
/**
* Cast the given value.
*
* @param Model $model
... | true |
c3904d2b160f5f7f7a6226af6c2b3d137ad260f9 | PHP | gabrieljo/FileScanner | /csd4/tmarket/market/Old/Api/Om/marketOldApiOmOutbound.php | UTF-8 | 2,074 | 2.546875 | 3 | [] | no_license | <?php
/**
* 오픈마켓 출고지 조회
*
* @package 마켓통합관리
* @author yjlim < yjlim@simplexi.com >
* @since 2011. 12. 15.
* @version 1.0
*
*/
class marketOldApiOmOutbound extends marketOldApiOmAbstract
{
/**
* api call
* @param array $aParam 전달 파라메터
*/
public function call($aParam)
{
// 파라메터 ... | true |
8e1cc55c1802d073b5bf2c17efdc966b68dad236 | PHP | rarths/buggers | /src/Sparkles/CSparklesSession.php | UTF-8 | 685 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Rarths\Sparkles;
/**
* A testclass that inherits from CSparkles to access protected methods
*
*/
class CSparklesSession extends \Rarths\Sparkles\CSparkles
{
/**
* Set name in session.
*
* @return void
*
*/
public function setToSession($data) {
$this->_setSes... | true |
9ddcfe0b8700db7f641a7635cae72235a4b23599 | PHP | bytic/date-time | /tests/src/Duration/ValuesOfDurationTest.php | UTF-8 | 555 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace ByTIC\DateTime\Tests\Duration;
use ByTIC\DateTime\Duration;
use ByTIC\DateTime\DurationInterface;
use ByTIC\DateTime\Tests\AbstractTest;
/**
* Class ValuesOfDurationTest
* @package ByTIC\DateTime\Tests\Duration
*/
class ValuesOfDurationTest extends AbstractTest
{
public function test_inSeconds... | true |
61c84bc41ef248d1e0b32a7b4d947db36f4ddedc | PHP | mlocati/tbfilters2gmail | /src/Filter/ConditionList.php | UTF-8 | 1,403 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace TBF2GM\Filter;
use Google_Service_Gmail_FilterCriteria;
use RuntimeException;
class ConditionList
{
/**
* @var \TBF2GM\Filter\Condition[]
*/
private array $conditions = [];
/**
* @return $this
*/
public function add(Condition $value): sel... | true |
f028bca154f4ec7e2200c5b8d3b6b3972fc42a85 | PHP | wjopenice/handsx | /application/common.php | UTF-8 | 6,592 | 2.796875 | 3 | [] | no_license | <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +-----------------------------... | true |
324d79184055b0ff392a30c6f71a46a901055df6 | PHP | khaireddines/pfe | /vendor/crocodicstudio/crudbooster/src/database/migrations/2016_08_07_154624_add_table_cms_menus_privileges.php | UTF-8 | 580 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddTableCmsMenusPrivileges extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cms_menus_privileges', function(Blueprint $table)
{
$table->increme... | true |
f0ddae798d27432aee25caed240f13a230cbecbb | PHP | afilias-technologies/codingDojo | /diamonds/spec/DiamondsSpec.php | UTF-8 | 1,184 | 2.765625 | 3 | [] | no_license | <?php
namespace spec;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class DiamondsSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Diamonds');
}
function it_should_return_A_when_i_pass_A()
{
$this->createDiamond('A')->shouldReturn('A');
... | true |
c443647d48f9a622e86db691557dd1c9b017857b | PHP | yusasugur/Bookmark-Management-System | /editBM.php | UTF-8 | 474 | 2.671875 | 3 | [] | no_license | <?php
//var_dump($_POST);
if ( $_SERVER["REQUEST_METHOD"] == "POST") {
require "db.php" ;
extract($_POST) ;
$sql = "update bookmark set title=?,note=?,url=? where id = ?" ;
try{
$stmt = $db->prepare($sql) ;
$stmt->execute([$title,$note,$url,$id]) ;
addMessage("Success") ;
header... | true |
4c427ff710a6932d4d094c64a32c8e0833cdb8f7 | PHP | francisIshmail/myspacecal | /bundles/home/migrations/2013_04_20_110748_create_satellites_table.php | UTF-8 | 997 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class Home_Create_Satellites_Table {
/**
* Make changes to the database.
*
* @return void
*/
public function up()
{
//
Schema::create('satellites', function ($table) {
$table->increments('id');
$table->string('name');
... | true |
abf51f4b6ab03264516a9cc2faf84b0ffacf016b | PHP | ioan-ghisoi-cko/checkout-ubercart-module | /uc_checkoutpayment/includes/checkout-php-library/com/checkout/Helpers/Appsetting.php | UTF-8 | 5,262 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Checkout.com Helpers\Appsetting.
*
* PHP Version 5.6
*
* @category Helpers
* @package Checkoutapi
* @license https://checkout.com/terms/ MIT License
* @link https://www.checkout.com/
*/
namespace com\checkout\Helpers;
/**
* Class App Setting.
*
* @category Helpers
* @version Release: @package... | true |
4ab1f2ee58abf12a33ef300396d3b0dddff6b7b1 | PHP | axelelise/Vetux-Line | /src/Entity/Vehicule.php | UTF-8 | 2,212 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\VehiculeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=VehiculeRepository::class)
*/
class Vehicule
{
/**
* @ORM\Id
* @ORM\Genera... | true |
c72390bdc4e8e4bcae2e2410de90a31899521889 | PHP | cawa0505/rivescript-php | /src/Cortex/ResponseQueue/ResponseQueue.php | UTF-8 | 7,637 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Rivescript-php
*
* (c) Johnny Mast <mastjohnny@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Axiom\Rivescript\Cortex\ResponseQueue;
use Axiom\Collections\Collection;
use Axio... | true |
3c77ee1e1008b5bdf84a0b2200a7f65d1ce1b902 | PHP | midoks/opencv | /tests/002.phpt | UTF-8 | 331 | 2.65625 | 3 | [
"MIT"
] | permissive | --TEST--
Check for opencv \OpenCV\ImgProc tclip
--SKIPIF--
<?php if (!extension_loaded("opencv")) print "skip"; ?>
--FILE--
<?php
$dir = dirname(__FILE__);
$im = new \OpenCV\ImgProc();
$im->setImage($dir."/demo.jpg");
$ret = $im->tclip(100,100);
var_dump($ret);
$im->writeImage($dir.'/demo_test.jpg');
?>
--EXPECT--
... | true |
8741bad88d9ee1a21d60ce0a45ae374d4417a312 | PHP | hasibenurr/Smallsearchengine | /listele.php | UTF-8 | 5,061 | 2.6875 | 3 | [] | no_license |
<?php
$keywords = $_GET["keywords"];
$enterurl1= $_GET["enterurl1"];
// Anahtar kelime parcalarının her birinin sayısını buluyoruz.
$urller = explode("*",$enterurl1);
$urlsayi=count($urller);
for($i=0;$i<$urlsayi;$i++){
// header("Content-type:text/plain");
header('Content-Type: text/plain; charset=UTF-8');... | true |
f69a8c4ab221483533d18e6a08749cfe9096e1db | PHP | drlouie/vps-net.com | /thetvdb/date.php | UTF-8 | 1,639 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
//-----------------------------------------------------------
// Date Module
//-----------------------------------------------------------
##--> GET CURRENT TIME and format the hour, minutes and seconds. Add 1900 to the year to get the full 4 digit year.
date_default_timezone_set('UTC');
$localtime ... | true |
ece1b1f81196aef5d9f7b3190386a36cbce26595 | PHP | nhan2804/thienhadaichien | /database/migrations/2021_02_08_141403_military.php | UTF-8 | 863 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class Military extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('military', function (Blue... | true |
7c2dd9ac4d5eb449cc16fd8c2418123bb809a59e | PHP | PH276/WF3-PHP_POO | /Panier.class.php | UTF-8 | 590 | 3.53125 | 4 | [] | no_license | <?php
class Panier
{
public $nbProduits;
public function ajouterArticle()
{
return 'L\'article a été ajouté';
}
public function retirerArticle()
{
return 'L\'article a été retiré';
}
public function afficherArticle()
{
return 'Voici les articles : ';
}
}
$panier1 = new Panier;
ec... | true |
8e3abeaefcc5681d3e14b8c7cef5950b5ae8a302 | PHP | kelpforest-cameo/databaseui | /auto/itis.php | UTF-8 | 2,877 | 2.765625 | 3 | [] | no_license | <?
// send out the header first to tell the client to expect json data
//header("Content-Type: application/json");
$srchKey='';
$functionName='';
$tsn='';
if ( !empty( $_GET['functionName']) && ( !empty( $_GET['term']) || !empty( $_GET['tsn']) ) ) {
$functionName = $_GET['functionName'];
if ( !empty( $_GET['term']... | true |
96fa8e525a2b91196652dbca66b4c2735eaf1a5b | PHP | chemisus/php-jql | /src/Jql/JqlEqualOperation.php | UTF-8 | 306 | 2.625 | 3 | [] | no_license | <?php
namespace Jql;
use AbstractBinaryOperation;
use Environment;
class JqlEqualOperation extends AbstractBinaryOperation
{
public function __construct()
{
parent::__construct('equal');
}
public function operate(Environment $env, $a, $b)
{
return $a === $b;
}
} | true |
4d9ef93c51c4b7829cbcc996a6574c79b4821ceb | PHP | iamfil/netForum-xWeb-APi | /netForum/xWeb/Xml/Generated/MetaDataGetWizardResponse.php | UTF-8 | 846 | 2.5625 | 3 | [] | no_license | <?php
namespace netForum\xWeb\Xml\Generated;
class MetaDataGetWizardResponse
{
/**
* @var AVWizard $MetaDataGetWizardResult
*/
protected $MetaDataGetWizardResult = null;
/**
* @param AVWizard $MetaDataGetWizardResult
*/
public function __construct($MetaDataGetWizardResult)
{
... | true |
f3c0d9c4fa0d781c6ec9e606828d967bbf751002 | PHP | machiavelic/ISN | /paris/admin/admin.php | UTF-8 | 3,619 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
session_start();
if (isset($_SESSION['username'])) {
if (isset($_GET['action'])) {
if($_GET['action'] == 'add'){
if (isset($_POST['submit'])) {
$title = $_POST['title'];
$description = $_POST['description'];
$price = $_POST['price'];
if ($title && $description && $p... | true |
1087788edf4714e8c43b7b285b3ab520c2ad22c3 | PHP | HarryChang30/foodpedia | /database/seeds/FoodsTableSeeder.php | UTF-8 | 821 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Foods;
class FoodsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
DB::table('foods')->delete();
Foods::create(array(
'name' => 'Chicken Wing',
... | true |
86c46505189df47abf3e87c0ae486a57dcb577de | PHP | ahhmarr/phpSessions | /day16/ask.php | UTF-8 | 484 | 2.9375 | 3 | [] | no_license | <?php
$ans=["NO!!","ARE YOU KIDDING ME","SURE","WHY NOT","NEVER","MAY BE","I DON'T CARE","SERIOUSLY! DON'T YOU HAVE ANYTHING MORE TO DO"];
shuffle($ans);
$ser=serialize($ans);
$unser=unserialize($ser);
var_dump($unser);exit;
if(isset($_GET['question']))
{
$question=$_GET['question'];
echo "YOUR QUESTION : <strong>$q... | true |
c6971a878fbca17654ca6417280630702c57f2c7 | PHP | addamx/_php | /MVC/ZVC/Lib/Log.php | UTF-8 | 956 | 2.734375 | 3 | [] | no_license | <?php
namespace Lib;
class Log
{
const LOGFILE = 'curr.log';
public static function write($cont)
{
$cont = date("Ymd H:i:s", time()) . "\r\n" . $cont . "\r\n";
$log = self::isBak();
$fh = fopen($log, 'ab');
fwrite($fh, $cont);
fclose($fh);
}
public stati... | true |
42db9e4dae2880735c7d1399df6589f3b3cb0721 | PHP | imancha/Books | /admin/inc/categories.inc | UTF-8 | 13,729 | 2.609375 | 3 | [] | no_license | <?php include_once('connect.inc');
/*
* categories.inc
*
* Copyright 2015 Imancha <imancha_266@ymail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License... | true |
c90d7b5f8f70b64bbfe083de4079d3b2f54d896f | PHP | jaydeepkesharia/php1 | /prg030.php | UTF-8 | 225 | 2.765625 | 3 | [] | no_license | <?
$arr=array(1001,"yuv",array("science"=>70,"maths"=>80,"english"=>90),80,"Dist");
echo "<pre>";
print_r($arr);
echo "</pre>";
echo "<br>Name : ".$arr[1];
echo "<br>Maths = ".$arr[2]["maths"];
?> | true |
259b9f7d62cd4182da5aa4b0e99221f3a8b29c60 | PHP | Yuffster/rabidrunner | /tests/TestRunnerTest.php | UTF-8 | 679 | 2.65625 | 3 | [
"MIT"
] | permissive | <?
class TestRunnerTest extends Test {
//This is probably the only series of tests that should need this.
public $expectedFailures = 2;
//Should pass.
public function should_pass_empty_test() { }
//Should pass.
public function should_fail_when_starting_with_should_fail() {
throw new Exception("Failure expec... | true |
8b189dc58a1ca5fc7dc2cdd4ab26dba8020c8f58 | PHP | aadarshaAB/Tutorial-PHP-Edition | /Day 8/task3.php | UTF-8 | 63 | 2.703125 | 3 | [] | no_license | <?php
$x=16;
$y=2;
$z=$x*$y;
$x*=$y;
echo "$z<br>";
echo $x;
?> | true |
734ce8dc3110177bc560889f7f09b694962b5c98 | PHP | kekizs/szakdolgozat | /app/model/kategoriaModel.php | UTF-8 | 381 | 2.578125 | 3 | [] | no_license | <?php
class kategoriaModel {
public function kilista() {
$pdo = Application::getConnection();
$kategoriak="select * from kategoria ; ";
$stm=$pdo->prepare($kategoriak);
$stm->execute();
$result=$stm->fetchAll(PDO::FETCH_ASSOC);
return $result;
... | true |
04090d03f249c1501debe435cb19349f1aad133d | PHP | RedFirebreak/HBO-ICTMemes | /account/func.accountpooll.php | UTF-8 | 2,160 | 2.71875 | 3 | [] | no_license | <?php
/*
[DESCRIPTION]
This file does (something).
[INFO]
Author: Stef
Date: 11-10-2019
*/
?>
<?php
if (empty($_GET['account'])) {
// The user is own its own page
// Get userinfo
$caughtuserid = $L... | true |
d393c99cc7b3043471190bf2c3ec1d07667685e0 | PHP | iamthemanintheshower/our-awesome-platform | /private/templates-eQVrWbMCAm/BP-template/template/private/_classes/encryption.php | UTF-8 | 2,222 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/*
MIT License
Copyright (c) 2018 https://github.com/iamthemanintheshower
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use... | true |
5e335d45a116dbce985e133ea4ef97ce94d36571 | PHP | af-production/AtoutProtect | /ApplicationWeb/model/Licence.php | UTF-8 | 856 | 2.703125 | 3 | [] | no_license | <?php
namespace AtoutProtect\Model;
use \PDO;
require_once("model/Manager.php");
class Licence extends Manager
{
public function getLicences()
{
$db = $this->dbConnect();
$req = $db->query('SELECT * FROM Licence');
return $req;
}
public function getLicence($getId)
{
... | true |
34e3623977b3a9185e663bb188841c43cd2b7690 | PHP | phplesson/phpacademy | /BohdanBudak/BohdanBudak_2018.04.22/arrays_loops_tasks/21.php | UTF-8 | 430 | 3.0625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Богдан
* Date: 25.04.2018
* Time: 12:20
*/
/** Нарисуйте пирамиду, как показано на рисунке, только у вашей пирамиды должно быть 9
рядов, а не 5.<br><br>
1<br>
22<br>
333<br>
4444<br>
55555</p> */
for ($i = 0; $i <= 9; $i++) {
for ($j = 0; $j < $i; $j++) {
echo ... | true |
e4f6c62e515254671d91c159626b073ef358a802 | PHP | albunicoleta/Customer-management-system | /app/models/Product.php | UTF-8 | 449 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
class Product extends Eloquent {
const TABLE_NAME = 'products';
/**
* The database table used by the model.
*
* @var string
*/
protected $table = self::TABLE_NAME;
/**
* get associated customers
*
* @return \Illuminate\Database\Eloquent\Relations\Belongs... | true |
9be869bca6799fb00aadd886445a1780ba2126c9 | PHP | YasuakiOnishi/YasuSamurai | /tennis/upload.php | UTF-8 | 1,082 | 2.9375 | 3 | [] | no_license | <?php
include 'includes/login.php';
$msg = null; //アップロード状況を表すメッセージ
//アップロード処理
if (isset($_FILES['image']) && is_uploaded_file($_FILES['image']['tmp_name'])){
$old_name = $_FILES['image']['tmp_name'];
$new_name = $_FILES['image']['name'];
if (move_uploaded_file($old_name, 'album/' . $new_na... | true |
8c342bd7f2ff8ff25335572229666cc61151b2ea | PHP | bozhidar-projects/php-09.05.2016 | /Lesson19/functions.php | UTF-8 | 1,266 | 2.984375 | 3 | [] | no_license | <?php
function print_table($column_names, $records) {
echo "<table>";
echo "<tr>";
foreach ($column_names as $column_name) {
echo "<th>" . $column_name . "</th>";
}
echo "</tr>";
foreach ($records as $record) {
echo "<tr>";
foreach ($column_names as $column_name) {
echo "<td>" . $record[$col... | true |
a34bdd2bf93d4d2def76b42d598978d504745dc6 | PHP | oelodran/php_working_with_file_and_directory | /php_sandbox/log_action.php | UTF-8 | 616 | 3.015625 | 3 | [] | no_license | <?php
function log_action($action, $message="") {
$filepath = __DIR__ . '/log.txt';
$handle = fopen($filepath, 'a');
if ($handle) {
$time_string = strftime("%Y-%m-%d %H:%M:%S");
fwrite($handle, $time_string);
fwrite($handle, ' - ');
fwrite($handle, ucwords($action));
... | true |
9c5b7a812747fe632a623d0acaebac90816a6291 | PHP | AdityaSati/PHP | /form.php | UTF-8 | 1,742 | 3.140625 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<body>
<form method="post" action="form.php">
Name <input type="text" name="name" ><br>
Email <input type="Email" name="email"><br>
Contact <input type="text" name="contact" maxlength="10"><br>
City <input type="text" name="city"><br>
Course <input t... | true |
fbe84ddf5465f997d2115eac895d8f3805da171d | PHP | veweb/sistema.mitaxiseguro.net | /lib/modules/model/doctrine/base/BaseChat.class.php | UTF-8 | 2,883 | 2.515625 | 3 | [] | no_license | <?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('Chat', 'doctrine');
/**
* BaseChat
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $id
* @property integer $user_id
* @property string $msg
* @property string $timestamp
* @proper... | true |
15163c3ba151db0d83fef6bc75fb2555e8946daf | PHP | netresearch/dhl-sdk-api-bcs | /src/Model/ParcelDe/RequestType/BankAccount.php | UTF-8 | 1,009 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* See LICENSE.md for license details.
*/
declare(strict_types=1);
namespace Dhl\Sdk\Paket\Bcs\Model\ParcelDe\RequestType;
class BankAccount implements \JsonSerializable
{
/**
* @var string
*/
private $accountHolder;
/**
* @var string
*/
private $iban;
/**
*... | true |
571aa9c8e3302e1ce39f7da4cc38018473f2304f | PHP | wpromaggie/epro_maggieyu | /common/svn.php | UTF-8 | 5,577 | 2.671875 | 3 | [] | no_license | <?php
class svn
{
private static $dbg = false;
private static $user = null;
private static $pass = null;
public static function dbg()
{
self::$dbg = true;
}
private static function dbg_check($cmd)
{
if (self::$dbg)
{
$endl = ((@stripos($_SERVER['GATEWAY_INTERFACE'], 'cgi') !== false) ? '<br>' : ''... | true |
f3b18283670a3b2d6d77df05d16ef8ebcc62ac63 | PHP | VenityStudio/android-app-framework | /src/php/android/framework/activity/AbstractActivity.php | UTF-8 | 1,555 | 2.84375 | 3 | [] | no_license | <?php
namespace php\android\framework\activity;
use php\android\framework\AndroidApplication;
use php\android\UXAppBar;
use php\android\UXToast;
use php\android\UXView;
use php\gui\UXLoader;
use php\io\Stream;
use php\lib\str;
abstract class AbstractActivity extends UXView
{
/**
* @return string
*/
... | true |
c96e611a3479860b849b48c4a08e129361ff6a93 | PHP | crimist/Artemis | /panel/login/pages/users.php | UTF-8 | 1,126 | 2.9375 | 3 | [] | no_license | <?php
try {
$select = $conn->prepare("SELECT * FROM users");
$select->execute();
$BOTTABLE = '<table id="BotTable">';
$BOTTABLE .= '<tr>';
$BOTTABLE .= '<th>ID</th>';
$BOTTABLE .= '<th>Admin</th>';
$BOTTABLE .= '<th>Last Seen (Seconds ago)</th>';
$BOTTABLE .= '<th>Last IP</th>';
$BOTTABLE .= '<th>Us... | true |
d26826d40dfe5b70f0eee24f41b8959ddebcf557 | PHP | vladimirchizhenkov/fleamarket | /core/DB.php | UTF-8 | 381 | 2.734375 | 3 | [] | no_license | <?php
namespace core;
class DB
{
public static function connect() {
$dsn = sprintf('%s:host=%s;dbname=%s', 'mysql','localhost', 'flea');
return new \PDO($dsn, 'root','root');
}
public static function checkerror($query)
{
$info = $query->errorInfo();
if ($info[0] != PD... | true |
555c07fb342be6f63869525b00ef62d367552e4f | PHP | Yanshiro/Biblioth-que-en-ligne | /Connexion.php | UTF-8 | 1,485 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
header('Location: '.'ProjetSite.php');
session_start();
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "projet";
// Create connection
//$conn = new mysqli($servername, $username, $password, $dbname);
try {
$conn = new PDO("mysql:host=$servername;dbname=projet", $usern... | true |
5e043fb82ba00443803614c850cac378b585349d | PHP | joseph-montanez/raylib-php | /examples/stub/Camera3D.php | UTF-8 | 301 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"Zlib"
] | permissive | <?php
namespace raylib;
/**
* Class Camera3D
* @package raylib
*
* @property-read array $position
* @property-read array $target
* @property-read array $up
* @property-read float $fovy
* @property-read int $type
*/
class Camera3D
{
const PERSPECTIVE = 0;
const ORTHOGRAPHIC = 1;
} | true |
3e1e148def8a2fc8367419717232dc051a9db77c | PHP | xinzou/Polymer | /tests/Validators/AddressValidator.php | UTF-8 | 607 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* User: macro chen <chen_macro@163.com>
* Date: 2017/3/31
* Time: 20:43
*/
namespace Polymer\Tests\Validators;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
class AddressValidator
{
/**
* 验证地址
*
* @param $object
* @param ExecutionContextInterface $context
... | true |
a429781c8d38ca79d47f09fd7dbce151bd790bc9 | PHP | vaughn007/laravelFoodApp | /app/Http/Controllers/hobbyTagController.php | UTF-8 | 2,156 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
//import tag model
use App\Tag;
//import Hobby model
use App\Hobby;
use Illuminate\Support\Facades\Gate;
class hobbyTagController extends Controller
{
//
//Get hobbies that are filtered by a certain tag. Filtered for $tag_id
//we also ne... | true |
ae7ab14d5f10395af3e9903cc988670aad7797db | PHP | jeeno44/products | /app/Http/Controllers/CategoriesController.php | UTF-8 | 2,591 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Categorie;
use App\Models\Product;
use App\Models\Cat_prod;
class CategoriesController extends Controller
{
public function getAll ($id = null)
{
if (!$id){
$allCategories = Categorie::where(["deleted" => 0... | true |
7766fcddf90298466c42ccd58ce088d3b44ca664 | PHP | alfonsoelmas/AW | /web/php/funciones/genera_cabecera.php | UTF-8 | 2,492 | 2.515625 | 3 | [] | no_license | <?php
session_start();
genera_cabecera($pagina_actual);
function genera_cabecera($pagina_actual) {
// Genera la cabecera de la página web, mostrando el ususario conectado en caso de haberlo.
echo "<div class='jumbotron' id='banner'>";
echo "<div class='text-left'>";
echo "<div class='col-sm-2'>";
echo "<a h... | true |
2846e3e45072927635d1b6274050a8506719f6fb | PHP | happysummervacation/liuliu | /Home/Lib/Action/OrderPackage/OrderPackageBasicService.class.php | UTF-8 | 15,550 | 2.5625 | 3 | [] | no_license | <?php
class OrderPackageBasicService extends Action{
private $delayMoney = 100; //表示延期一个月100元
private $monthDay = 30; //表示一个月30天
/*
*俞鹏泽
*通过站内支付的方式订购套餐
*/
/*过程:
1.根据套餐ID获取套餐的价格以及相关信息
2.根据学生ID来获取其账户的余额
3.将套餐的价格与学生的账户余额进行比较
4.如果学生账户余额不足就进行消息反馈.如果足就进行
5.开始事务
6.增加一份订购套餐信息
7.添加一份订购关于该套餐的合同
8... | true |
0c89000863ac054e1f3a8e370365e4d2293fedd0 | PHP | mhrodriguez/publicarte-gbn | /html/pospublicarte/src/AppBundle/LN/ProductoLN.php | UTF-8 | 1,388 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: davatar
* Date: 6/30/17
* Time: 11:38 p.m.
*/
namespace AppBundle\LN;
use AppBundle\Entity\Producto;
use Doctrine\ORM\EntityRepository;
use AppBundle\Classes\Exception\GeneralException;
use AppBundle\Classes\Exception\ErrorCodigo;
/**
* ProductoLN
*
*/
class Product... | true |
02cebef380c5c43967598cf607c03520f95ea76f | PHP | heldercosta9027/redes | /At12/At12-ex1.php | UTF-8 | 1,004 | 3.828125 | 4 | [] | no_license | <?php
$nome = "Funções de manipulação de strings no PHPs";
$nome_maisculo = strtoupper($nome);//Retorna o argumento com todos os elementos em maiúsculas
echo $nome_maisculo;
$nome = " Funções de manipulação de strings no PHPs ";
$nome_minusculo = strtolower($nome);//Retorna o ... | true |
a8186f5785fbd6f4927c6994ff18f614dfc8663e | PHP | cuncode/wlox-cron | /lib/API.php | UTF-8 | 474 | 2.609375 | 3 | [] | no_license | <?php
class API{
public static function getJson($url) {
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,10);
curl_setopt($ch,CURLOPT_TIMEOUT,10);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
$data1 = curl_exec($ch);... | true |
4caf05e45547f244101fd1fa000c22b93496fdfc | PHP | chiiya/passes | /src/Google/Enumerators/AnimationType.php | UTF-8 | 390 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Chiiya\Passes\Google\Enumerators;
final class AnimationType
{
/** @var string */
public const ANIMATION_UNSPECIFIED = 'ANIMATION_UNSPECIFIED';
/** @var string */
public const FOIL_SHIMMER = 'FOIL_SHIMMER';
public static function values(): array
{
... | true |
fa27e738e83962a9d85cf09f016746fbccaafdd9 | PHP | kyamashiro/Refactoring | /chapter1/src/Movie.php | UTF-8 | 1,691 | 3.359375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ky
* Date: 2018/11/29
* Time: 21:57
*/
namespace App;
class Movie
{
const CHILDRENS = 2;
const REGULAR = 0;
const NEW_RELEASE = 1;
/**
* @var string
*/
private $title;
/**
* @var Price
*/
private $price;
/**
* Mov... | true |
b07cda5d0f32e035770ebeebfa9f9434b684cbf9 | PHP | shoeb240/samplecode | /models/UserMapper.php | UTF-8 | 34,905 | 2.59375 | 3 | [] | no_license | <?php
/**
* Application_Model_UserMapper class
*
* @category Application
* @package Application_Model
* @author Shoeb Abdullah <shoeb240@gmail.com>
* @copyright Copyright (c) 2013, Shoeb Abdullah
* @version 1.0
*/
class Application_Model_UserMapper
{
/**
* @var Application_Model_DbTable_U... | true |
8d1b89483ecacfad8873f8c11ca525a848da05ab | PHP | pxiq/funso | /webos/chat/server.php | GB18030 | 1,626 | 2.875 | 3 | [] | no_license | <?php
/**
* ˴
*
*/
//ȷӿͻʱᳬʱ
set_time_limit(0);
//IPͶ˿ں
$address = "localhost";
$port = 1234; //ԵʱԶ˿Գ
//һSOCKET
if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false)
{
echo "socket_create() ʧܵԭ:" . socket_strerror(socket_last_error()) . "/n";
die;
}
//ģʽ
if (s... | true |