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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
845c053f20cdaa9e1c70f50b901b6cb00a4122cd | PHP | juuhe/localhost | /lu/library/phpexcel/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php | UTF-8 | 2,087 | 2.796875 | 3 | [] | no_license | <?php
class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
{
private $_fileHandle;
private function _storeData()
{
$this->_currentObject->detach();
fseek($this->_fileHandle, 0, SEEK_END);
$offset = ftell($this->_fileHandle);
... | true |
7ff769754be6b4d3d3f6cea41c9060b03d343c5d | PHP | DowebDomobile/cakephp-users-plugin | /src/View/Cell/AuthCell.php | UTF-8 | 1,629 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the CakePHP(tm) Users plugin package.
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) DowebDomobile (http://dowebdomobil... | true |
147d1e273531de884375e8aa24beb50c243ad827 | PHP | derekdreery/group-office-templates | /netbeans/modelTemplate.php | UTF-8 | 2,725 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
<#assign licenseFirst = "/* ">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "${project.licensePath}">
/**
* The ${name} model
*
* @author ${user}
*/
class GO_${module?capitalize}_Model_${name} extends GO_Base_Db_ActiveRecord {
/**
* Returns a static model of itself
*
* @param... | true |
e76f46eca6ea96caeb8b6f8d021f1f44cf565daf | PHP | ibouleroi/CakePHP | /app/Model/Client.php | UTF-8 | 1,247 | 2.53125 | 3 | [] | no_license | <?php
App::uses('AppModel', 'Model');
/**
* Client Model
*
* @property Employee $Employee
* @property Dette $Dette
* @property Requette $Requette
*/
class Client extends AppModel {
/**
* Display field
*
* @var string
*/
public $displayField = 'nom';
//The Associations below have been created with all pos... | true |
0d179669fa87681e374ca3988d0f6c92f5fc5aac | PHP | reddevman/php | /resumen/resumenAvanzado.php | UTF-8 | 3,297 | 3.578125 | 4 | [] | no_license | <?php
//
// POO básico
//
class nombreClase
{
private $propiedad1;
private $propiedad2;
public function __construct($parámetro1, $parámetro2)
{
$this->propiedad1 = $parámetro1;
$this->propiedad2 = $parámetro2;
}
// SET
public function setPropiedad1($parámetro1)
{
... | true |
10e0b2f114d00eeb5cb51e192b635fd663d65db2 | PHP | miniframework/mini | /cli/command/curd.class.php | UTF-8 | 5,280 | 2.625 | 3 | [] | no_license | <?php
class mini_cli_command_curd extends mini_cli_command
{
public $viewName = array("List","addview","modifyview");
public function run($args)
{
if(isset($args[0]) && $args[0]=='create' )
{
if(isset($args[1]) && !empty($args[1]))
{
$modelPath = mini:... | true |
83415c484bcb15d31896065e699276e4474ad4f3 | PHP | FirePanther/MyAlfredWorkflows | /zzz-includes-zzz/workflow.php | UTF-8 | 3,576 | 2.625 | 3 | [] | no_license | <?php
/**
* @author FirePanther
* @copyright FirePanther (http://firepanther.pro/)
* @description workflow managing
* @date 2014
* @version 1.0
*/
$fp_items = array();
$fp_cache_data = array();
function add($return = '', $title = '', $text = '', $img = null, $cache = 1) {
global $fp_items, $fp_cache_da... | true |
e87926c7ea69610a65f68365301931c5ff5e057e | PHP | xerk/gp | /database/seeds/CitiesAndRegionsSeeder.php | UTF-8 | 1,216 | 2.59375 | 3 | [] | no_license | <?php
use App\Region;
use Illuminate\Database\Seeder;
use App\City;
class CitiesAndRegionsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$collection = collect([
'Haram',
'Fisal',
'Omranya',
... | true |
2ef86bad5ad449a66a07a7c528417482cc84a9de | PHP | SM-Net-Application/sm-net-project-4 | /php/query/sp_q34.php | UTF-8 | 2,888 | 2.640625 | 3 | [] | no_license | <?php
// Get last circuit overseer weeks
require_once dirname(__DIR__, 1) . '/config.php';
$database = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD, DB_DATABASE);
mysqli_set_charset($database, 'utf8');
if (! $database) {
$response["status"] = 4;
$response["error... | true |
f197c9d984b231fcf5045feb3d48c4988841026a | PHP | Rondesignlab/Rondesignlab.github.io | /html-video/send-form-email.php | UTF-8 | 1,506 | 2.734375 | 3 | [] | no_license | <?php
require_once('config.php');
if(isset($_POST['email'])) {
$error_text = 'Oops! Sorry! But something happened with our server.';
$success_text = 'Thank you! Your message has been sent successfully';
function send_request($data, $error = false){
$return = array(
'error' =... | true |
82ef7dc64d3fe9fae55a3c1acc084fbae25d1fb8 | PHP | Truke/studymi | /database/migrations/2017_06_19_090049_create_comment_table.php | UTF-8 | 1,240 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCommentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('comment', function(Blueprint $table){
$tab... | true |
618a6f3cc72b6666260833737ca078c78eebb7b5 | PHP | htmlacademy-php/426679-doingsdone-12 | /auth.php | UTF-8 | 1,300 | 2.640625 | 3 | [] | no_license | <?php
/**
*Страница проверки авторизации
*
*/
require_once('templates/functions.php');
$link = conect();
$errors = [];
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$form = $_POST;
$required = ['email', 'password'];
foreach ($required as $field) {
if (empty($form[$field])) {
$errors[... | true |
574b584ad24d2b50a30714e70256662d1cd1bd8f | PHP | Rayyyyyyyyyyyyyyyyyyyy/php | /20201105/string2.php | UTF-8 | 583 | 3.921875 | 4 | [] | no_license | <?php
$var1="John";
$var2="John";
echo strcmp($var1, $var2)."<br>";
echo "比較字串 兩個一樣會0 不一樣就1"."<br>";
if($var1 ==$var2){
echo "yes";
}else{
echo "no";
}
echo "<br>";
$string="Samantha";
echo substr($string,5)."<br>";
echo "拆解字串,數字代表第幾個開始往後"."<br>";
echo substr($string,-4)."<br>";
echo "拆解字串,數字代表往前到第幾個"."<br>"... | true |
e37037d1de26c336c4e6c7a275cb92db36fc12d5 | PHP | JorgitoPaiva/terracap | /fontes/protected/components/Controller.php | UTF-8 | 3,012 | 2.671875 | 3 | [] | no_license | <?php
/**
* Controller is the customized base controller class.
* All controller classes for this application should extend from this base class.
*/
class Controller extends CController {
/**
* @var string the default layout for the controller view. Defaults to '//layouts/column1',
* meaning using a ... | true |
92151452c3c9ab63577e3aff1d435b1dae2df948 | PHP | AURELIO2154715/req_app_design | /request_app JL/dashboard/request_form.php | UTF-8 | 3,374 | 2.640625 | 3 | [] | no_license | <?php
include '../shared/session.php';
include '../shared/connection.php';
if(isset($_POST['addrequest'])){
$user_id = $_SESSION['user_id'];
$request_status = 'pending';
$user_of_item = $_POST['reason'];
$date_needed = $_POST['date_needed'];
$quantity = $_POST['quantity'];
$items = $_POST['item'];
$request = ... | true |
8919c5d615ce5afee948f795aff5778d3834a10a | PHP | mindthanizz/freshonefood | /fresh_database/create/ordersdetail_table.php | UTF-8 | 666 | 2.703125 | 3 | [] | no_license | <?php
require "fresh_database.php";
$conn = mysqli_connect($servername, $username, $password, $dbname);
if (!$conn) {
die("Connection failed: ".mysqli_connect_error());
}
$sql = "CREATE TABLE OrdersDetail (
orderId INT(6),
productId INT(6),
quantity INT(4) NOT NULL,
totalPrice INT(10) NOT NULL,
CONSTR... | true |
c4dca0013fd3886375c0bae319e8cd49f7b56dec | PHP | pssubashps/image-organizer | /imagemove.php | UTF-8 | 2,800 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
$dir = "myim";
$movDir = "myphoto";
echo "\n Read all the Image from DIR\n";
echo "*********************************\n\n";
$dir = readline("Input Folder Name : ");
$movDir = readline("Output Folder Name : ");
$files1 = scandir($dir);
array_shift($files1);
array_shift($files1);
$totalImages = count($files1);
$c... | true |
b5a6c67be2056666194134068a2b52e76755fe9f | PHP | fauzanhamzah/invoice-manager | /app/Http/Controllers/CustomerController.php | UTF-8 | 5,026 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Customer;
class CustomerController extends Controller
{
function __construct()
{
$this->middleware('auth');
$this->middleware('permission:customer-list|customer-create|customer-edit|customer-delete', ['only' => ['inde... | true |
2d3ddfacfa36b7bf8e9898d11fbe6a0d225cdf97 | PHP | robyfirnandoyusuf/DataStructures | /DataStructures/Trees/Traits/CountTrait.php | UTF-8 | 285 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace DataStructures\Trees\Traits;
trait CountTrait {
/**
* Binds to count() method. This is equal to make $this->tree->size().
*
* @return integer the tree size. 0 if it is empty.
*/
public function count() {
return $this->size;
}
} | true |
4db84f616f733fc25584dfb88c5a4a0160aa5b4e | PHP | KEVINYZY1/Algorithm-11 | /src/Algorithm.php | UTF-8 | 6,992 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: frowhy
* Date: 2017/4/4
* Time: 04:14
*
*_______________%%%%%%%%%_______________________
*______________%%%%%%%%%%%%_____________________
*______________%%%%%%%%%%%%%____________________
*_____________%%__%%%%%%%%%%%___________________
*____________%%%__%%%%%%_%%%%%___... | true |
ce5d5e7f8ed9279b45ee1979af2cf6e6328a0411 | PHP | OckiFals/Ngaji2.0 | /Ngaji/Database/QueryBuilder.php | UTF-8 | 4,985 | 3.125 | 3 | [] | no_license | <?php namespace Ngaji\Database;
/**
* Class QueryBuilder
*
* Build your own SQL queries without model class!
*
* @package Ngaji\Database
* @author Ocki Bagus Pratama
* @since 2.0.1
*/
use Ngaji\Base\Component;
use PDO;
class QueryBuilder extends Component {
private $sql = '';
private $param = [];
... | true |
38d23955ab78541bb12f9097bb397feb8ea26620 | PHP | italolelis/EasyFramework | /src/Easy/Mvc/DependencyInjection/Compiler/SerializerPass.php | UTF-8 | 2,099 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
// Copyright (c) Lellys Informática. All rights reserved. See License.txt in the project root for license information.
namespace Easy\Mvc\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfo... | true |
f1ed4b8428447f4966bb722c829290380bd264b2 | PHP | kabsnation/creotec | /UI/getStrand.php | UTF-8 | 511 | 2.640625 | 3 | [] | no_license | <?php
require_once('../UI/StrandHandler.php');
require_once('../config/config.php');
$handler = new StrandHandler();
if(isset($_POST["batchcode"])){
$results = $handler -> getStrandByBatchCode($_POST["batchcode"]);
?>
<option></option>
<?php
if(mysqli_num_rows($results)>0){
foreach ($results as $row) {
$slo... | true |
d9e3a899958308f22776b3ddbb92165743cd5cce | PHP | wturnerharris/phpcheckout | /cal/includes/ldap/session_php.inc | UTF-8 | 5,235 | 2.703125 | 3 | [] | no_license | <?php
global $PHP_SELF;
// Get form variables
$Action = get_form_var('Action', 'string');
$NewUserName = get_form_var('NewUserName', 'string');
$NewUserPassword = get_form_var('NewUserPassword', 'string');
$TargetURL = get_form_var('TargetURL', 'string');
$returl = get_form_var('returl', 'string');
if (isset($cookie... | true |
5dfbf691c26061541ce1f59c1495e01ff9cf1926 | PHP | amacrobert/last | /Router/FileSuffixUrlGenerator.php | UTF-8 | 1,228 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: franzwilding
* Date: 14.08.18
* Time: 17:51
*/
namespace Fw\LastBundle\Router;
use Symfony\Component\Routing\Generator\UrlGenerator;
class FileSuffixUrlGenerator extends UrlGenerator
{
const DEFAULT_SUFFIX = 'html';
/**
* Returns path with default suffix if... | true |
9ea7213fc783f3720d11fe2ce41adfa0ba0ce1c6 | PHP | MarcosT96/Acort.ar | /ejemplo.php | UTF-8 | 1,071 | 2.765625 | 3 | [] | no_license | <?php
/**
* Incluir la clase principal
*/
include("Acortador.php");
/**
* Instanciarlo
* @var acortar
*/
$Acortador = new acortar\Acortador();
/**
* Establece la URL y la API Key
*/
$Acortador->setURL("https://acort.ar/api");
$Acortador->setKey("Fgvsld81Hvex");
/**
* Llamada simple
*/
echo $Acortador->acortar(... | true |
be79fdb2330419300cb6f4393ae8906d0406ea78 | PHP | mosiurp/web-devlopment- | /US_03/admin/page_new.php | UTF-8 | 2,184 | 2.765625 | 3 | [] | no_license |
<script type="text/javascript" src="js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({ selector:'.editor' });
</script>
<?php
$title = "";
$tag = "";
$category = "";
$content = "";
$etitle = "";
$etag = "";
$ecategory = "";
$econtent = "";
if(isset($_POST['submit']))
{
$title ... | true |
b0202ec2541ffee4c5450d08219110e8ca44ee66 | PHP | wasimulislam/Tuition-Management-System | /lab_Task_9/model_a/model.php | UTF-8 | 2,744 | 2.703125 | 3 | [] | no_license | <?php
require_once 'db_connect.php';
function showAllTeacher()
{
$conn = db_conn();
$selectQuery = 'SELECT * FROM `teacher` ';
try{
$stmt = $conn->query($selectQuery);
}catch(PDOException $e){
echo $e->getMessage();
}
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
... | true |
180d7b54a77a6825d5ef9b0e788194b53eb55597 | PHP | bfinlay/laravel-excel-seeder | /src/Readers/HeaderImporter.php | UTF-8 | 2,556 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace bfinlay\SpreadsheetSeeder\Readers;
use bfinlay\SpreadsheetSeeder\SpreadsheetSeederSettings;
class HeaderImporter
{
/**
* @var array
*/
private $headerRow;
/**
* @var SpreadsheetSeederSettings
*/
private $settings;
/**
* Array of raw column names unalias... | true |
60a48f87589f832e0b669786ac026a887052f890 | PHP | Naru-hub/PHP | /loop.php | UTF-8 | 611 | 3.890625 | 4 | [] | no_license | <?php
// $numbers = [1,2,3,4,5];
// foreach ($numbers as $number) {
// echo $number * 2 .PHP_EOL;
// }
$currencies = [
'japan' => 'yen',
'us' => 'dollar',
'england' => 'pound',
];
foreach($currencies as $country => $currency) {
echo $country . ': '. $currency .PHP_EOL;
}
//無限ループwhile
// $i = 0;... | true |
4a49db271c1826b4b59fbc8a62d85f464d6e8e2e | PHP | cawatou/smarty_tour | /app/core/DxException/DBO.php | UTF-8 | 463 | 2.78125 | 3 | [] | no_license | <?php
DxFactory::import('DxException');
class DxException_DBO extends DxException
{
/**
* @param string $message
* @param int $code
* @param PDOStatement|PDOException $e
*/
public function __construct($message, $code, $e)
{
if ($e instanceof PDOStatement) {
$error =... | true |
841a4bb19f37ab9c86e8d3017dbfc4817e877aee | PHP | smietao/vtmerexam | /microblogService.php | UTF-8 | 7,311 | 2.703125 | 3 | [] | no_license | <?php
include "microblog.php";
class MicroblogService{
///////////////////////////////////查询所有微博////////////////////////////////////////
function microblogList(){
$listObj =array();
$conn = mysqli_connect("localhost","root","","mydb");
if(mysqli_connect_errno($conn)){
echo "连接数据库失败!!";
exit;
}
... | true |
1183b8202a0e0d1a2bfea580415990419102fb33 | PHP | SSPKHas/LabWorks | /LabWorks/denemeler/a/sumofdigits.php | UTF-8 | 121 | 2.796875 | 3 | [] | no_license | <?php
$a= $_REQUEST["number1"];
$sum=0;
while($a>0){
$b = $a%10;
$sum +=$b;
$a/=10;
}
echo "<br>$sum" ;
?> | true |
b9fba0717b9b06633dfb687c2d2321b56eb21890 | PHP | sujeetkryadav/jasper-client | /src/Jaspersoft/Dto/ReportExecution/Status.php | UTF-8 | 775 | 2.890625 | 3 | [] | no_license | <?php
/**
* @author Grant Bacon (gbacon@jaspersoft.com)
*/
namespace Jaspersoft\Dto\ReportExecution;
use Jaspersoft\Dto\DTOObject;
class Status extends DTOObject {
/**
* The status of the report
* "queued" "ready" "failed", etc.
*
* @var string
*/
public $value;
/**
* A ... | true |
565f056c177dbe2e1ba79d0216c9934c3544ef88 | PHP | waowl/minishop | /models/News.php | UTF-8 | 671 | 2.90625 | 3 | [] | no_license | <?php
class News
{
public static function getAll()
{
$db = Db::getConnection();
$res = $db->query('SELECT * FROM product ');
$res->setFetchMode(\PDO::FETCH_ASSOC);
$items = $res->fetchAll();
return $items;
}
public static function getById($id)
{
$id... | true |
2a49af8f4112aec4bdf91a009fb7e29c94f293e6 | PHP | miladrahimi/netnevis | /core/reporter.php | UTF-8 | 1,111 | 3.140625 | 3 | [] | no_license | <?php
class Reporter {
//******************************************************************************
static public function report($e, $force_store = false) {
// Force store (even messages!)
if ($force_store) {
self::save($e);
return ("error");
}
// De... | true |
68c684ff04dc23c533c7926c8532101357840bb0 | PHP | plambert/enolib | /php/spec/generated/errors/parsing/two_or_more_templates_found.spec.php | UTF-8 | 2,322 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
describe('Copying a field that exists twice', function() {
it('throws the expected ParseError', function() {
$error = null;
$input = "field: value\n" .
"field: value\n" .
"\n" .
"copy < field";
try {
Enolib\Parser::parse($input... | true |
5b02f2716f3e75728cbef279f224f3245726fb54 | PHP | ivanhoe011/srp | /application/models/factories/AddressFactory.php | UTF-8 | 2,291 | 2.921875 | 3 | [] | no_license | <?php
/**
* ##$BRAND_NAME$##
*
* ##$DESCRIPTION$##
*
* @category Project
* @package Project_Models
* @copyright ##$COPYRIGHT$##
* @author ##$AUTHOR$##, $LastChangedBy$
* @version ##$VERSION$##, SVN: $Id$
*/
/**
* Address
*/
require_once 'application/models/beans/Address.php';
/**
* Clase A... | true |
516f4db41d1e2c0b1a448301ec0145eba5edd4f8 | PHP | gitomato/redis | /src/RedisHyperLogLog.php | UTF-8 | 1,343 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php /** @noinspection DuplicatedCode */
namespace Amp\Redis;
use Amp\Promise;
final class RedisHyperLogLog
{
/** @var QueryExecutor */
private $queryExecutor;
/** @var string */
private $key;
public function __construct(QueryExecutor $queryExecutor, string $key)
{
$this->queryExecu... | true |
229b71065d2a20ca2125b69c726f955da0bdb837 | PHP | blackout314/d13 | /classes/d13_blacklist.class.php | UTF-8 | 2,333 | 2.8125 | 3 | [
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
// ========================================================================================
//
// BLACKLIST.CLASS
//
// !!! THIS FREE PROJECT IS DEVELOPED AND MAINTAINED BY A SINGLE HOBBYIST !!!
// # Author......................: Tobias Strunz (Fhizban)
// # Sourceforge Download........: https://sourceforge.net/... | true |
91bf401b2b768180e0b222f49d25bae94e6fbda1 | PHP | openwse/ipfs-api | /src/Namespaces/Dag.php | UTF-8 | 2,381 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ipfs\Namespaces;
use GuzzleHttp\RequestOptions;
use Ipfs\IpfsNamespace;
use Psr\Http\Message\StreamInterface;
class Dag extends IpfsNamespace
{
/**
* Streams the selected DAG as a .car stream on stdout.
*
* @return array|resource|StreamInterface
*/
public function export(s... | true |
c42dc5eac5f059cd462c141cff29f9a7284dfd86 | PHP | Sopoala/prac4 | /loginControl.php | UTF-8 | 766 | 2.640625 | 3 | [] | no_license | <?php
session_start();
$username = $_POST['username'];
$password = $_POST['password'];
$duration = $_POST['duration'];
if(($username == "infs" && $password == "3202") || ($username =="INFS" && $password == "3202"))
{
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
$_SESSION['duration'] = $dur... | true |
7250450d77b74a5ecf9518e73cf7001ece595b5a | PHP | dementedshaman/vosuco | /agi/Handler.php | UTF-8 | 1,851 | 3 | 3 | [] | no_license | <?php
class Handler
{
private $s_in;
private $s_out;
public function __construct($in, $out)
{
$this->s_in = $in;
$this->s_out = $out;
$agivars = array();
while (!feof($this->s_in)) {
$agivar = trim(fgets($this->s_in));
if ($agivar === '') {
... | true |
bd728e9bef5dbef1cd786900abe4677348cc5bbb | PHP | leovidalgithub/php | /DataTypes/Numbers.php | UTF-8 | 857 | 3.5625 | 4 | [] | no_license | <html>
<head>
<title>Variables</title>
<link rel="stylesheet" type="text/css" href="../style.css?v=1.21">
</head>
<body>
<div class="thisMain">
<?php
$var1 = 3;
$var2 = 4;
$myFloat = 3.14;
?>
Basic Math uses on PHP:
<?php
echo ((1+2+$var1) * $var2) / 2 - 5;
?><hr>
Math Operations: <b... | true |
a8e3f20c1133388b9768aaa5e8eb26b1a914aab0 | PHP | jcordero/mgp | /mgp/www/includes/presentation/ticket/gisgrilla.php | UTF-8 | 1,932 | 2.65625 | 3 | [] | no_license | <?php
include_once "presentation/selectarray.php";
class CDH_GISGRILLA extends CDH_SELECTARRAY
{
function __construct($parent)
{
parent::__construct($parent);
//$fld = $this->m_parent;
//$grillas = $this->pedirGrillasUsig();
//if(is_array($grillas)) {
// foreach($grillas as $grilla)
... | true |
3a6705ae421c02c8c1633589a6332844931292aa | PHP | victoruizr/PHP | /Ejercicios/PDO/SentenciaPreparada.PHP | UTF-8 | 693 | 3.15625 | 3 | [] | no_license | <?php
function datos($curso, $nTable){
// creamos la conexion
$mbd = new PDO('mysql:host=localhost;dbname=instituto', 'root', '123456');
//creamos la tabla con el nombre pasado como prametro
$crear = $mbd->prepare("create table $nTable (alumno varchar(99))");
$crear->execute();
//Ins... | true |
78bc7fed63cfbcd2fd0774ae9254d580bb31a825 | PHP | andrewFisherUa/widget-market | /app/WidgetEditor.php | UTF-8 | 6,657 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class WidgetEditor extends Model
{
protected $table='widget_products';
protected $fillable = [
'wid_id'
];
public function hasAttribute($attr)
{
return isset($this->$attr);
}
public function widgetSave($parameters){
}
... | true |
21acedae2062aa283de8f8723fb40c86b5e60fd2 | PHP | itsurya/itsurya.github.edu.np | /Check_score.php | UTF-8 | 2,252 | 2.546875 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head><title> Surya Online Exam </title>
<style>
a.ex1:hover, a.ex1:active {color: red;}
</style>
</head>
<body background="image/back2.png">
<center>
<font color='red' size='20'>Surya Online Exam </font>
Information and Communication Technology (ICT), E - Education, Ne... | true |
4a77f19860b15dc4b330452b2da28cff1e96d060 | PHP | kebrahim/kara-designs | /util/mail_helper.php | UTF-8 | 1,432 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Handles automatic e-mailing functionality
*/
class MailHelper {
const KARA_EMAIL = "kara@karaebrahim.com";
/**
* Sends the specified message w/ the specified subject to the specified set of users.
*/
public static function sendContactMail($fromName, $fromEmail, $message) {
... | true |
fc9c948556d5a0b70740df3937a98f5979643b5f | PHP | aplinxy9plin/vk-bot | /core/apiVK.php | UTF-8 | 1,086 | 2.8125 | 3 | [] | no_license | <?php
/***************************************
* Class vk
* author: https://github.com/retro3f
***************************************/
class vk {
const API_VERSION = '5.24';
const METHOD_URL = 'https://api.vk.com/method/';
public function get(){
return json_decode(file_get_contents('php://input'));
}
publ... | true |
05b21ffc3ac04917432be349706d3df8f5450316 | PHP | Schema31/php-gcloud-storage-sdk | /examples/exampleBuildPdV.php | UTF-8 | 2,062 | 2.671875 | 3 | [] | no_license | <?php
require __DIR__."/../vendor/autoload.php";
use Schema31\GCloudStorageSDK\gCloud_Storage;
if ($argc < 6) {
die("\n\nAttenzione!\n\nNon hai specificato abbastanza parametri: \n" . $argv[0] . " <repositoryName> <Authentication> <filePath> <documentId> <subject>\n\n");
}
$repositoryName = $argv[1];
$Authentic... | true |
c67949a0553db5dcf9b619d0b3afad5a91d62389 | PHP | Smartling/api-sdk-php | /src/Jobs/Params/CancelJobParameters.php | UTF-8 | 495 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Smartling\Jobs\Params;
use Smartling\Parameters\BaseParameters;
/**
* Class CancelJobParameters
* @package Jobs\Params
*/
class CancelJobParameters extends BaseParameters
{
/**
* @param string $reason
*/
public function setReason($reason) {
if (\mb_strlen($reason, 'UTF-8... | true |
d6c2988542da48ba296d9b507ff3a4ae17c4eef7 | PHP | Arriadnie/fit.nubip | /app/Integration/Esq/Entity.php | UTF-8 | 2,527 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Integration\Esq;
class Entity {
public $values; // custom object
public $schemaName; // string
public $IsNew; // bool
function __construct($schemaName, $collection = null) {
$this->schemaName = $schemaName;
$this->values = array();
if (is_null($collection)... | true |
f67168ad26a12de62a613513d84c3ca243160801 | PHP | SamerSenbol/RestAPI-Fetch-Ajax | /viewHoroscope.php | UTF-8 | 446 | 2.890625 | 3 | [] | no_license |
<?php
// page should only be able to request via GET, it should check if a horoscope is saved in $ _SESSION and in that case print it in the output. Otherwise, the page will not print anything.
session_start();
if ($_SERVER['REQUEST_METHOD'] == 'GET'){
header('Content-Type: application/json');
if (isset($_SE... | true |
341fcac512aa7c26e011461cabf00639726ea520 | PHP | ezzatmohamed/String-tool | /FileHandler/FileHandler.php | UTF-8 | 233 | 3.140625 | 3 | [] | no_license | <?php
abstract class FileHandler {
public function openFile($file_name, $mode = 'w') : FileHandler
{
$this->file = fopen($file_name, $mode);
return $this;
}
abstract public function write($data);
} | true |
8fe5f20f7bd3fb206b7e91cfb52a0f1373ea6e13 | PHP | misaki0710/minnano | /product.php | UTF-8 | 876 | 2.59375 | 3 | [] | no_license | <?php require 'header.php'; ?>
<!-- コンテンツ開始 -->
<table>
<tr>
<th>商品番号</th>
<th>商品名</th>
<th>価格</th>
</tr>
<?php
$pdo = new PDO('mysql:host=localhost;dbname=shop;charset=utf8','staff','password');
if(isset($_REQUEST['keyword'])){
$sql = $pdo -> prepare('select * from product where name li... | true |
eb27ec69a44376c97207f702139852e8861555f3 | PHP | songluco/fortune | /fortune/app/Services/SongluReflectionTest/Person.php | UTF-8 | 902 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\SongluReflectionTest;
/**
* Created by PhpStorm.
* User: songlu
* Date: 2017/9/18
* Time: 上午10:36
*/
class Person
{
/**
* For the sake of demonstration, we"re setting this private
*/
private $_allowDynamicAttributes = false;
/**
* type=primary_autoincrement
... | true |
3a43986fdb8e6ba03106c3ed274c5f91a17501ed | PHP | IT-341/jipa-web | /src/Controller/Component/JIPAApiComponent.php | UTF-8 | 3,366 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Controller\Component;
use Cake\Controller\Component;
use Cake\Network\Http\Client;
use Cake\Network\Exception\BadRequestException;
class JIPAApiComponent extends Component
{
/**
* The API url.
*/
private $apiUrl = 'http://jipa-server.herokuapp.com/api/';
/**
* The HTTP ... | true |
3820239e28b496959ae61b648c5793408343da18 | PHP | d-l-cloud/dlc | /app/Models/Shop/ProductCategory.php | UTF-8 | 2,961 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Shop;
use App\Models\User\Profile;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Shop\ProductList;
use Illuminate\Http\Request;
class ProductCategory extends Model
{
use HasFactory;
protected $fillable = ['description'... | true |
746dbbaa9f553d5e2c6e404ccc4cf58f9816f1db | PHP | Maxoslav/utils | /tests/Utils/JsonTest.php | UTF-8 | 4,081 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Infinityloop\Tests\Utils;
final class JsonTest extends \PHPUnit\Framework\TestCase
{
public function testFromString() : void
{
$instance = \Infinityloop\Utils\Json::fromString('{"name":"Rosta"}');
self::assertSame('{"name":"Rosta"}', $instance->toSt... | true |
a891df8ee241a52b22e120d801b9a94b900ef5fe | PHP | louLabo/applicationAPI | /src/Main.php | UTF-8 | 2,050 | 3.234375 | 3 | [] | no_license |
<?php
include "Experience.php";
// Déclaration des Types d'articles à requeter
if(isset($_GET["recherche"])){
main_with_data($_GET["recherche"]);
}
else {
main_without_data();
}
//************ Fonctions Main ***************
function main_with_data($data_Sent)
{
//
//Requete sur les types de co... | true |
129a58e8c8505a3747665c9dc58a61aae0094a66 | PHP | xNicoPaz/emailfy | /app/Mail/PlainTextEmail.php | UTF-8 | 805 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class PlainTextEmail extends Mailable
{
use Queueable, SerializesModels;
public $customFrom, $customSubject, $customBody;
/**
* C... | true |
4b72b56c64b059c4dd177eee7a29f103d320a699 | PHP | torrentpier/torrentpier | /src/Legacy/WordsRate.php | UTF-8 | 3,015 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* TorrentPier – Bull-powered BitTorrent tracker engine
*
* @copyright Copyright (c) 2005-2023 TorrentPier (https://torrentpier.com)
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT L... | true |
5ccddd230c88a665fc0fcc4e8598f3b7f3c4af32 | PHP | DEVSENSE/Phalanger | /Testing/Tests/@PHP/lang/bug7515.php | UTF-8 | 402 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | [expect php]
[file]
<?php
include('Phalanger.inc');
error_reporting(E_ALL);
class obj {
function method() {}
}
$o->root=new obj();
ob_start();
__var_dump($o);
$x=ob_get_contents();
ob_end_clean();
$o->root->method();
ob_start();
__var_dump($o);
$y=ob_get_contents();
ob_end_clean();
if ($x == ... | true |
42876300f248e9209b56e3d893884e7d3be504e4 | PHP | jojoe77777/BlockSniper | /src/BlockHorizons/BlockSniper/brush/types/FreezeType.php | UTF-8 | 1,433 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace BlockHorizons\BlockSniper\brush\types;
use BlockHorizons\BlockSniper\brush\BaseType;
use pocketmine\block\Block;
/*
* Freezes the terrain, causing water to become ice, lava to become obsidian and extinguishes fire.
*/
class FreezeType extends BaseType{
const ID = self::... | true |
85b04d63ff5d3086a2a7d79ccae78019e4b07fe8 | PHP | lwapet/IMAD_project | /mobifake/check_image_service/controllers/Check_near_salient_shape_applications.php | UTF-8 | 4,769 | 2.578125 | 3 | [] | no_license | <?php
include_once "../utils/ShapePointDatabaseManager.class.php";
include_once "../utils/Constants.class.php";
include_once "../utils/ShapePoint_Comparer.class.php";
include_once "../utils/ShapePoint_ComparerNeutralPoint.class.php";
include_once "../utils/NivGris_transformer.class.php";
include_once "../utils/Database... | true |
56563d9b7a72bb239339d3d5bd71e15cc1115a42 | PHP | slasher1959/comp1920 | /htdocs/comp1920/lesson02/wk2stst1.php | UTF-8 | 752 | 3 | 3 | [] | no_license | <?php
/**
File: wk2sandbox.php
This file is used for creating some PHP Script that I play with for week 02 lesson in COMP1920
Author: John Elash
Last Modified: May 05, 2015
*/
/*
$thedate = date("l"); echo $thedate . "<br />"; //prints the full textual day of week
$thedate = date("F"); echo $thedate . "<br />... | true |
0a6d830b65e953f4a26b8ed7083a2cd9f4c86d7e | PHP | jpirnat/dex | /src/Infrastructure/DatabaseItemNameRepository.php | UTF-8 | 1,329 | 3.015625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Jp\Dex\Infrastructure;
use Jp\Dex\Domain\Items\ItemId;
use Jp\Dex\Domain\Items\ItemName;
use Jp\Dex\Domain\Items\ItemNameNotFoundException;
use Jp\Dex\Domain\Items\ItemNameRepositoryInterface;
use Jp\Dex\Domain\Languages\LanguageId;
use PDO;
final class DatabaseItemNameReposi... | true |
794d444be6e902cc1a92363db8896c5760cb4d2b | PHP | zodream/image | /src/ThumbImage.php | UTF-8 | 1,075 | 3 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Zodream\Image;
use Zodream\Image\Base\Box;
/**
* 缩略图
* @author zx648
*
*/
class ThumbImage extends Image {
/**
* 缩率图
* @param string $output 缩率之后存储的图片
* @param int $thumbWidth 缩率图宽度
* @param int $thumbHeight 缩率图高度
* @param bool|int $auto 那种方式进行缩略处理
* @return s... | true |
0a3869e35171559df0b127f7396317aad38e2ac2 | PHP | RabinPhaiju/Laravel-8 | /blog/app/Http/Controllers/Users.php | UTF-8 | 2,414 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\HTTP;
use App\Models\User;
class Users extends Controller
{
//
function fetchUserData(){
echo 'from db user control';
// direct DB connection.
return D... | true |
e01eb5fd21202703985212c3b0cbb3f525dafa50 | PHP | mjcaabay06/devam | /include/general_functions.php | UTF-8 | 1,610 | 2.59375 | 3 | [] | no_license | <?php
function checkLogin($username, $password){
global $dbh;
$isAuthenticated = false;
$chkLogin = $dbh->prepare("SELECT * FROM users WHERE username = :uname AND password = :pass AND user_type_id = 1");
$chkLogin->execute(array(":uname" => $username, ":pass" => encryptPass($password)));
$results = $chkLogin->f... | true |
6a71ef3934fc557d942c0375af26a6b96f5b2454 | PHP | NolwennWM/-2019-WF3-Becycle | /src/Entity/Address.php | UTF-8 | 3,471 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\AddressRepository")
*/
class Address
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column... | true |
a382695db1dac41b79a71f5fe6bb21410284cfc8 | PHP | TYPO3-svn-archive/cz_simple_cal | /Classes/Hook/Datamap.php | UTF-8 | 1,838 | 2.734375 | 3 | [] | no_license | <?php
class Tx_CzSimpleCal_Hook_Datamap {
/**
* implements the hook processDatamap_afterDatabaseOperations that gets invoked
* when a form in the backend was saved and written to the database.
*
* Here we will do the caching of recurring events
*
* @param string $status
* @param string $table
* @p... | true |
2b606a2892246f38b916256ac1e173dea7fceae7 | PHP | Ntlzyjstdntcare/Colms_Portfolio | /ThoughtCatcher/enter_username.php | UTF-8 | 2,727 | 2.8125 | 3 | [] | no_license | <?php
//Start a session in order to use session variables
session_start();
//Connect to the database
include "Scripts/connect_to_mysql.php";
if(isset($_POST['name']))
{
$name=$_POST['name'];
$_SESSION['name'] = $name;
//See if the customer is already in the system.
$sql =mysql_query("SELECT id FROM users W... | true |
e2890e5ac1d047d056cdcac578569b206cff19fd | PHP | bbattulga/dental-erp | /app/ToothType.php | UTF-8 | 808 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class ToothType extends Model
{
//
protected $table='tooth_types';
private static $MILK;
private static $PERMA;
public function getShortNameAttribute(){
$name = $this->name;
$words = explode(' ', $name);
return mb_strt... | true |
fd5b0b25f10566d3c9ab1872eac946b2b629c3fd | PHP | loevgaard/dandomain-api | /src/Endpoint/Customer.php | UTF-8 | 4,746 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Loevgaard\Dandomain\Api\Endpoint;
use Assert\Assert;
class Customer extends Endpoint
{
/**
* @see https://shoppartner.dandomain.dk/dokumentation/api-documentation/customer/#GetCustomer_GET
*
* @param int $customerId
* @return array
*/
public function getCustomer(int $... | true |
e03baa375474538d51723a9bb973844509bb0474 | PHP | sumiredc/php-pokemon.com | /webapp/html/app/Classes/AutoLoader.php | UTF-8 | 824 | 2.78125 | 3 | [] | no_license | <?php
/**
* オートローダー
*/
abstract class AutoLoader
{
/**
* 検索するクラスが格納されているフォルダ
* @var array
*/
private const FOLDERS = [
'Move', 'Pokemon', 'Type', 'StatusAilment', 'StateChange', 'Field', 'Item', 'Gym'
];
/**
* 起動
* @return void
*/
public static function init()
{... | true |
ac398daf96b4d938412753a8968a3e0953f2ba91 | PHP | ChrisrPerry/ProspectCollect | /Phase 6/addData.php | UTF-8 | 947 | 2.640625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set("display_errors", "on");
$server = "spring-2021.cs.utexas.edu";
$user = "cs329e_bulko_mike247";
$pwd = "union_Hearth4glance";
$dbName = "cs329e_bulko_mike247";
$mysqli = new mysqli($server, $user, $pwd, $dbName);
if($mysqli->connect_errno){
die('Connect Error: ' . $mysqli->conn... | true |
2243f17e4ed2a5aa4e96648a238b9b1cbc0780e7 | PHP | lanizz/weixin | /src/Menu/Menu.php | UTF-8 | 520 | 2.6875 | 3 | [] | no_license | <?php
/**
*
* User: Jinming
* Date: 2017/8/4
* Time: 18:42
*/
namespace Lanizz\Weixin\Menu;
use Lanizz\PHPHelper\Arr;
class Menu
{
private $button = [];
public function addButton(Button $button)
{
return $this->button[] = $button;
}
public function output()
{
return Arr... | true |
e900a7a0cb4f097f235c50ecf8d4c628606d3415 | PHP | matlae-ugly/magebit-test | /libs/bootstrap.php | UTF-8 | 676 | 2.859375 | 3 | [] | no_license | <?php
class Bootstrap {
public function __construct()
{
//Getting the URL params as array where $url[0] is a controller name
// and $url[1] is a controller method
if ($_GET['url'] == NULL) {
$url = explode('/', env('defaultRoute'));
} else {
$url = explod... | true |
c722ae7afa74e37f06801fe2ee07b89cd7e05dfd | PHP | ironhacker-sadigova/Inventory | /src/Orga/Domain/Service/WorkspaceConsistencyService.php | UTF-8 | 4,966 | 2.515625 | 3 | [] | no_license | <?php
/**
* @author valentin.claras
* @author diana.dragusin
* @package Orga
*/
namespace Orga\Domain\Service;
use Core\Translation\TranslatedString;
use Core_Exception_NotFound;
use Mnapoli\Translated\Translator;
use Orga\Domain\Axis;
use Orga\Domain\Granularity;
use Orga\Domain\Workspace;
/**
* Controller du ... | true |
9b481317990d444f22b77b13b70dda9dac5d8a6a | PHP | comboyin/dbpwater | /class/acl.php | UTF-8 | 3,125 | 2.8125 | 3 | [] | no_license | <?php
class acl {
private $_config;
/**
* @var router
* */
public $_router;
public function __construct( $config, $router ){
$this->_config = $config;
$this->_router = $router;
$this->init();
}
private function init(){
// start session
$session = session_id();
if(empty($se... | true |
7b5ad1a8ce2836a488c9f536df6f6d70c673b167 | PHP | MorganPfister/Comptes | /src/CDC/CoreBundle/Entity/BudgetInstance.php | UTF-8 | 2,935 | 2.515625 | 3 | [] | no_license | <?php
namespace CDC\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="BudgetInstance")
* @ORM\Entity(repositoryClass="CDC\CoreBundle\Repository\BudgetInstanceRepository")
*/
class BudgetInstance {
protected $currentvalue;
/**
* @ORM\Id
* @ORM\Column(type=... | true |
2ac3d248bc02341a180f8bd8d706e44e7f608ce2 | PHP | hmimeee/article-management | /functions/DB.func.php | UTF-8 | 10,541 | 2.71875 | 3 | [] | no_license | <?php
//Insert data into any table
function add_data($query,$connect,$message){
$result = $connect->query($query);
if ($result === true) {
$messagetype = "1";
} else {
$messagetype = "0";
}
$message1 = $connect->error;
message($message,$messagetype);
}
//Check if data and return result
function select_data(... | true |
3e10617178a1e7e5e15a72a8963b0666b2e9d3fc | PHP | cosnicsTHLU/cosnics | /src/Chamilo/Application/Weblcms/Tool/Implementation/Assignment/Table/Publication/PublicationTableCellRenderer.php | UTF-8 | 6,751 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Application\Weblcms\Tool\Implementation\Assignment\Table\Publication;
use Chamilo\Application\Weblcms\Rights\WeblcmsRights;
use Chamilo\Application\Weblcms\Storage\DataClass\ContentObjectPublication;
use Chamilo\Application\Weblcms\Table\Publication\Table\ObjectPublicationTableCellRenderer;
use... | true |
fc297c012bca9bb27d713f81ee958645f2fdc80b | PHP | bluegate010/ysaward | /newpwd.php | UTF-8 | 2,868 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
require_once "lib/init.php";
if ($MEMBER || $LEADER) // If logged in... just go to directory.
header("Location: /directory.php");
if (!isset($_GET['key']))
die("Oops! Couldn't find any password reset token. Make sure you clicked on the link in the email or copied the entire link... ");
// Valid key?
$key = '... | true |
cddea5e2fabd97c3c049ae6f778159835a83a8ba | PHP | bitJun/vue-tb | /h5/app/Model/Member.php | UTF-8 | 318 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class Member extends Model
{
protected $table = '';
protected $guarded = [];
public function __construct($member_id = '') {
parent::__construct();
$this->table = $member_id ? 'member_'.($member_id % 100) : '';
}
}
| true |
f8c639eac54489cefcc6faf4d183ad40d8b478ca | PHP | jiangyu7408/notification | /tests/unit/Storage/RedisStorageFactoryTest.php | UTF-8 | 797 | 2.515625 | 3 | [
"Unlicense"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Jiang Yu
* Date: 2015/07/03
* Time: 1:24 PM
*/
namespace Persistency\Storage;
class RedisStorageFactoryTest extends \PHPUnit_Framework_TestCase
{
/**
* @var array
*/
protected $options;
public function testFactory()
{
$prefix = 'tes... | true |
914e2d555422855fd273f97ceff646e9e1a0e7ee | PHP | steel1989/teste2 | /reporte_ok.php | UTF-8 | 7,083 | 2.59375 | 3 | [] | no_license | <?php
//Incluimos librería y archivo de conexión
require 'Classes/PHPExcel.php';
require 'conexion.php';
//Consulta
$sql = "SELECT trani.quantidade, tran.data, tran.tipo_transacao, cli.nome, ven.nome, ite.quantidade, ite.valor FROM transacao_item trani INNER JOIN transacao tran ON trani.id_transacao = tran... | true |
4a7ec5e4fff0aeceaaad342953e915c81a6a496c | PHP | akilawww/blend_myself | /database/seeds/RecipesTableSeeder.php | UTF-8 | 2,733 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Carbon\Carbon;
class RecipesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// recipe 1
App\Recipe::create([
'title' => 'ジンバック',
'body' => 'さっぱりしていて美味しい',
'image' => '/storage/testd... | true |
c074ed1342f438297022888ef9988b3a600f069f | PHP | WangSHo/honghong | /0115.php | GB18030 | 1,465 | 3.5625 | 4 | [] | no_license | <title></title>
<?php
//ת
/* $a="132bdhssb";
$b="122";
echo $a+$b; */
//
//ǿת
$a="123.22352sbdvlf";
$b=(bool)$a;
$c=(float)$a;
$d=(array)$a;
$str=floatval($a);
settype($a, "bool"); //settype()ñͣ
var_dump($b);
echo "<br />";
var_dump($c);
echo "<br />";
var_dump($d);
echo "<br />";
var_dump($str);
echo "<br />";
v... | true |
92f01cdab5210707d90adb1fe38d9cd3fa8ee93b | PHP | creeartelo-desarrollo/SoundTube | /application/models/Showroom_model.php | UTF-8 | 1,619 | 2.578125 | 3 | [] | no_license | <?php
class Showroom_model extends CI_Model
{
public function __construct() {
$this->load->database();
}
# Consulta videos del ShowRoom
function CNS_Showroom(){
$this->db->select("*");
$this->db->from("Showroom");
$query = $this->db->get();
return $query->res... | true |
dd2262a22daf1b12e95862ee6bb824bdaef35a57 | PHP | dscheinah/pwsafe | /src/lib/sx/Container/Container.php | UTF-8 | 1,325 | 3.1875 | 3 | [] | no_license | <?php
namespace Sx\Container;
use Psr\Container\ContainerInterface;
/**
* A very simple implementation of the corresponding PSR interface.
* This can be used as standalone or base for other containers like done with the Injector in this package.
*
* @package Sx\Container
*/
class Container implements ContainerIn... | true |
ef3dc32c1c5e03cf437acef5cb64cc0efd613fb1 | PHP | efique/testunitaire | /src/Product.php | UTF-8 | 737 | 3.359375 | 3 | [] | no_license | <?php
namespace App;
use LogicException;
class Product
{
/** @var string */
const FOOD_PRODUCT = 'food';
/** @var string */
private $name;
/** @var string */
private $type;
/** @var float */
private $price;
public function __construct(string $name, string $type, float $price)... | true |
4f77c4316d7cff9d2a5bbfaaaa4f4616f7a803c1 | PHP | turag/GOLAM-SHAFI-AFROZE-PORTFOLIO- | /admin/changepassword.php | UTF-8 | 2,443 | 2.640625 | 3 | [] | no_license | <?php
include 'include/head.php';
?>
<div id="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-4">
<h5>Change Password</h5>
<?php
if (isset($_POST['change'])){
$oldp = $_POST['oldp'];
... | true |
9e9054ad9737df5209dc43b8dc865742daf98ab2 | PHP | qrichert/goji | /src/Admin/Controller/XhrInPageContentEditController.class.php | UTF-8 | 1,091 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Admin\Controller;
use Goji\Blueprints\XhrControllerAbstract;
use Goji\Core\HttpResponse;
use Goji\Rendering\InPageEditableContent;
class XhrInPageContentEditController extends XhrControllerAbstract {
public function render(): void {
$action = $_POST['action'] ?? null;
$contentId = $_POST['cont... | true |
f6be0888e2470876bdccab5168659a8db8fe5d6d | PHP | diasonti/online-auction | /core/mandatoryAuth.php | UTF-8 | 1,139 | 2.703125 | 3 | [] | no_license | <?php
$token = null;
foreach (getallheaders() as $name => $value) {
if($name == "Authorization") {
global $token;
$token = mb_substr($value, 6);
break;
}
}
require_once(__DIR__.'/db.php');
require_once(__DIR__.'/../data/repository/UserAccountRepository.php');
function getUserByToken($... | true |
0acc9f7bd95a06764b754453490e4fc733a48df8 | PHP | PacktPublishing/Modular-Programming-with-PHP7 | /Chapter06/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php | UTF-8 | 1,036 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Doctrine\ExpressionLanguage;
use Doctrine\Common\Cache\C... | true |
7579939a5bcf87bb05801507992a14f60c71a883 | PHP | irpul/vip2 | /lib/database/database.php | UTF-8 | 1,783 | 3.109375 | 3 | [] | no_license | <?php
class Database extends PDO {
private $db_host = "localhost"; // server name
private $db_user = "root"; // user name
private $db_pass = ""; // password
private $db_dbname = "mikrotik"; // database name
private $db_charset = "utf8"; // optional character ... | true |
bbd649ec23beec74b8dc51d039d07d9ca8104e41 | PHP | ebaldizon/Puri1.0 | /Entities/Buy.php | UTF-8 | 1,719 | 3.203125 | 3 | [] | no_license | <?php
class Buy
{
private $id;
private $date;
private $name;
private $cart;
private $subTotal;
private $tax;
private $total;
function __construct($id, $date, $name, $cart, $subTotal, $tax, $total)
{
$this->id = $id;
... | true |