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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6167e0d43d197638018b79f54d4fdb48f7a4bcf5 | PHP | trix-cms/core | /modules/trix/libraries/alert.php | UTF-8 | 1,537 | 2.953125 | 3 | [] | no_license | <?php
namespace Trix;
use CI;
class Alert {
const INFO = 1;
const SUCCESS = 2;
const ERROR = 3;
const ATTENTION = 4;
private $type;
private $message;
private $has_message = FALSE;
function __construct()
{
$alert = CI::$APP->session->flashdata('alert');
... | true |
77c092e01d5d5cd5c91124ba59ed55f13dfb9830 | PHP | dlcecile/PHP-Partie3 | /exo1/index.php | UTF-8 | 358 | 3.65625 | 4 | [] | no_license | <?php
$page = "exercice1";
include '../header.php';
?>
<p>Créer une variable et l'initialiser à 0.Tant que cette variable n'atteint pas 10, il faut : </p>
<ul>
<li>l'afficher</li>
<li>l'incrementer</li>
</ul>
<section>
<?php
for ($age = 1; $age <= 10; $age++)
{
echo 'Vous avez '. $age .' ans';
}
?>
</section>... | true |
75a7fc334247ad87203cb3edc84f2c3171e0dda4 | PHP | guoyu07/4tweb | /web/src/extensions/4tmobile/service/mobile/dao/App_Weixin_Dao.php | UTF-8 | 13,126 | 2.578125 | 3 | [] | no_license | <?php
define("TOKEN", "very9strongpwd");
define("Environment", "dev");
//$wechatObj = new DianCanYoWechatCallbackAPI();
//if (isset($_GET['echostr'])) {
// $wechatObj->valid();
//} else {
// $wechatObj->responseMsg();
//}
class Weixin_Controller_Dao {
private $currentSchool = NULL, $currentUserID = NULL;
//有效性验证... | true |
13971e62584b9f5eba6727f2d52395763ed0951a | PHP | linntunberg/Cyberlink-Yrgo | /profile.php | UTF-8 | 624 | 2.625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
require __DIR__.'/views/header.php';
$statement = $pdo->prepare('SELECT * FROM users WHERE userID = :id');
$statement->bindParam(':id', $_SESSION['user']); //user id is same as id, connects them.
$statement->execute();
$user = $statement->fetch(PDO::FETCH_ASSOC);
?>
<h1>W... | true |
0e517fce90464d8227bfd389ab9722f0c697e6e6 | PHP | asmaaabozied/cazo | /app/Models/Charges.php | UTF-8 | 536 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Charges extends Model
{
public $table = 'charges';
public $fillable = [
'wallet_id',
'charged'
];
/**
* the attributes that should be casted to native types
*
* @var array
*/
protected... | true |
c300a2ea72445b01906b22a3090bab56d6ace841 | PHP | huolong1992/live-test | /application/models/User_Model.php | UTF-8 | 4,710 | 2.921875 | 3 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* 用户模型
* @author 王永强
* @date 2016/05/14 09:23
*/
class User_Model extends MY_Model {
//加密算法
private $algo = 'md5';
//加密盐
private $salt = 'sjfiwjeiewj34532878dnsi3987582nfj49832';
/**
* 添加用户
* @param $data... | true |
8edabad38a07b69bd2ba27a237ae603b348d4b0e | PHP | dinofei/hyperf-core | /src/Constants/StatusCode.php | UTF-8 | 853 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Bjyyb\Core\Constants;
use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;
/**
* Note: Http状态码枚举类
*
* @method static string getMessage(int $code) 获取提示信息
*
* @Constants()
*
*
* Author: nf
* Time: 2020/10/26 15:23
*
*
*/
class StatusCo... | true |
927eaf9fd482d797a41d32914bdaa753ddfbe567 | PHP | akki3009/CrestTraining | /PHP/Loop/foreach2.php | UTF-8 | 359 | 4.125 | 4 | [] | no_license | <?php
//declare multi-dimensional array
$a = array();
$a[0][0] = "Alex";
$a[0][1] = "Bob";
$a[1][0] = "Camila";
$a[1][1] = "Denial";
//display multi-dimensional array elements through foreach loop
foreach ($a as $e1) {
foreach ($e1 as $e2) {
... | true |
3c304c0c5013571c7af4148f19a2baac59f9f5c1 | PHP | LiSplib/framework | /controllers/Connect.php | UTF-8 | 1,298 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Model\ModelAdmin;
class Connect{
public function __construct()
{
$session = new Session;
$session->sessionStart();
}
public function httpGetRequest(){
$dataAdmin = new ModelAdmin();
$admins = $dataAdmin->getAdmins();
ret... | true |
fd5a142ffa37aa708ba7e2d00928887e76255721 | PHP | yuen1318/hasel | /model/tbl_order/select/select_all_order.php | UTF-8 | 1,031 | 2.671875 | 3 | [] | no_license | <?php
session_start();
require "../../class/Sanitize.php";
require "../../class/QueryBuilder.php";
if(isset($_SESSION["admin_id"])){
$query = new QueryBuilder();
$sql = "SELECT o.id, o.item, o.total, o.address, o.date, u.fn, u.mn, u.ln
FROM tbl_order AS o
JOIN tbl_user AS u
... | true |
6a1462e57bf68a7ac1b7938c09a12fff5aeb1de4 | PHP | Warlie/qPortal-Project | /PlugIn/plugin_linear_cipher_block.php | UTF-8 | 4,643 | 2.8125 | 3 | [] | no_license | <?PHP
/**
*
*
* creates a menu
* @-------------------------------------------
* @title:DBO
* @autor:Stefan Wegerhoff
* @description: Databaseobject, needs only a columndefinition to receive data from other object
*
*/
require_once("plugin_interface.php");
class Linear_Cipher_Block extends plugin
{
private $tag_name ... | true |
02c246855821bb1855d51796e81af8745fb92d87 | PHP | JJarrie/magicschoolmanager | /src/Domain/MagicSchool/Configuration/MagicSchoolConfigurationFactory.php | UTF-8 | 745 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Domain\MagicSchool\Configuration;
use App\Domain\MagicSchool\MagicSchoolConfiguration;
/**
* @author Jérémy JARRIÉ <jeremy.jarrie@sensiolabs.com>
*/
class MagicSchoolConfigurationFactory
{
const DEFAULT_FIRST_YEAR_AGE = 11;
const DEFAULT_NB_STUDYING_YEAR = 7;
const DEFAULT_BACK_TO_S... | true |
ee984727899d9f1e26e3a077b16e9c4cc191e6f3 | PHP | dlawrence/Laravel-OracleDB | /src/Jfelder/OracleDB/Query/Grammars/OracleGrammar.php | UTF-8 | 3,941 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php namespace Jfelder\OracleDB\Query\Grammars;
use \Illuminate\Database\Query\Builder;
use Config;
class OracleGrammar extends \Illuminate\Database\Query\Grammars\Grammar {
/**
* Compile a select query into SQL.
*
* @param \Illuminate\Database\Query\Builder
* @return string
*/
public function compileS... | true |
7ac77748e8e724fb869922844fbfebfaa1408dc3 | PHP | mrsuh/mafia-backend-php | /src/Event/CitizensGreetingEvent.php | UTF-8 | 3,378 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Event;
use App\History\History;
use App\Player\Player;
use App\Player\Players;
class CitizensGreetingEvent extends Event
{
const EVENT = 'citizens-greeting';
const ACTION_ROLE = 'role';
const ACTION_ACCEPT = 'accept';
private $acceptedPlayers;
public function __construct(... | true |
e904ef7ee9298012f830dc02dd5576b34d17b295 | PHP | formya/ms-tenant | /database/migrations/2021_05_11_124848_create_questions_table.php | UTF-8 | 770 | 2.640625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateQuestionsTable extends Migration
{
public function up()
{
Schema::create('questions', function (Blueprint $table) {
$table->id()->startingValue(10000000... | true |
49418ccbc0494ceb3af57d8d45c9689d87fa5b9a | PHP | aligatorr89/examplePhpBank | /Transaction.php | UTF-8 | 827 | 3.203125 | 3 | [] | no_license | <?php
require_once("./Randomize.php");
/**
* @property int $user_id
* @property string $date
* @property float $deposit
* @property float $withdraw
*/
interface ITransaction {
}
class Transaction implements ITransaction {
public function __construct($id = "", $user_id = "", $date = "", $deposit = "", $with... | true |
bb9ee8328419acac90c64fff94460c2d409833c5 | PHP | wbarnard81/sphapp | /app/NetworkMonitor.php | UTF-8 | 695 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class NetworkMonitor extends Model
{
use HasFactory;
public static function pinger($address){
if(strtolower(PHP_OS)=='winnt'){
$command = "ping -n 1 $address";
... | true |
545c1933a8eeab40709c4cd87f733e01d361f07d | PHP | mashcom/aculyse | /app/logic/loggers/AccessLogger.php | UTF-8 | 1,910 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Aculyse\Loggers;
class AccessLogger
{
public function __construct()
{
if (file_exists("logic/database.php")) {
$path_prefix = "";
} elseif (file_exists("../logic/database.php")) {
$path_prefix = "../";
} else {
die("The app could not... | true |
7f1cc19fb4442a6a04b57fea6316080c25c5ccde | PHP | rgigger/zoopframework | /framework/ZoopLibrary.php | UTF-8 | 960 | 3.03125 | 3 | [] | no_license | <?php
abstract class ZoopLibrary
{
private $mods, $path;
/**
* Stuff about the constructor
*
* @return ZoopLibrary
*/
final function __construct($path)
{
$this->path = $path;
$this->mods = array();
$this->init();
}
protected function registerMod($name)
{
if(!isset($this->mods[$name]))
$thi... | true |
b404eef305df648c787d5d42de9d628661ad7d95 | PHP | VTrim/OptimizeRoute | /script.php | UTF-8 | 2,524 | 2.8125 | 3 | [] | no_license | <?php
const SERVER = 'localhost';
const USER = 'root';
const PASSWORD = '';
const DATABASE = 'distance';
$db = new mysqli(SERVER, USER, PASSWORD, DATABASE);
if ($db->connect_errno)
die('Не вдалося підключитися до MySQL: ' . $db->connect_error);
if(isset($_POST['param'], $_POST['source'], $_... | true |
481db26bbdb7457f75fd90df98eb24b9ff9d4d90 | PHP | greabock/maker | /tests/GreabockMakerTest.php | UTF-8 | 3,721 | 2.640625 | 3 | [] | no_license | <?php
use Greabock\Maker\Maker;
use Illuminate\Container\Container;
class MakerConcreteStub
{
}
interface IMakerContractStub
{
}
class MakerImplementationStub implements IMakerContractStub
{
}
class MakerImplementationStubTwo implements IMakerContractStub
{
}
class MakerNestedDependentStub
{
public $inner;
p... | true |
3b187179f0173a5d13378b4ae8f13d0ed8063bb8 | PHP | 151610175-smkassalaambandung/project | /database/seeds/SiswasSeeder.php | UTF-8 | 633 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Kelas;
use App\Jurusan;
use App\Siswa;
class SiswasSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
$kelas1 = Kelas::create(['name'=>'X']);
$kelas2 = Kelas::create(... | true |
fdb417a7fc8646cd8772be8d1160ced74ef71903 | PHP | Yoruchiaki/php-webase-front | /src/HttpClient/AppConfig.php | UTF-8 | 474 | 2.5625 | 3 | [] | no_license | <?php
namespace Yoruchiaki\WebaseFront\HttpClient;
class AppConfig
{
public string $frontUrl;
public int $timeout;
public function __construct(
string $frontUrl,
int $timeout = 5
) {
$this->frontUrl = $frontUrl;
$this->timeout = $timeout;
}
public function ... | true |
2d4bd805f6467c17115361ee303d23e4a32196f0 | PHP | Giildo/p6bis | /src/Domain/DTO/Trick/PictureDTO.php | UTF-8 | 575 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Domain\DTO\Trick;
use App\Domain\DTO\Interfaces\Trick\PictureDTOInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class PictureDTO implements PictureDTOInterface
{
/**
* @var null|string
*/
public $description;
/**
* @var null|UploadedFile
*/
... | true |
c4364950cef55b0c0ce96be1d3a06ea1da884642 | PHP | justinmoh/backpack-helper | /src/Traits/CrudList.php | UTF-8 | 3,300 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace JustinMoh\BackpackHelper\Traits;
use Backpack\CRUD\app\Http\Controllers\Operations\ListOperation;
/**
* Trait CrudList
* @package JustinMoh\BackpackHelper\Traits
* @property-read \JustinMoh\BackpackHelper\CrudPanel $crud
*/
trait CrudList
{
use ListOperation;
/**
* The search funct... | true |
bb28f4eb0f063e31e75298181618bfc212d8998e | PHP | mickaelvieira/CollectionJson | /spec/CollectionJson/Exception/InvalidParameterSpec.php | UTF-8 | 918 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace spec\CollectionJson\Exception;
use CollectionJson\Exception\CollectionJsonException;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use CollectionJson\Exception\InvalidParameter;
class InvalidParameterSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHave... | true |
4ee248ccc713d43747248c14e133526b07319fae | PHP | patrickthibaudeau/moodle-mod_languagelab | /language lab/mod/languagelab/RAP/adapter.php | UTF-8 | 2,089 | 2.6875 | 3 | [] | no_license | <?php
//DO NOT MODIFY THIS FILE
include('config.php');
//Load file that contains the server information for Moodle
$xml = simplexml_load_file($CFG->xml_path);
$serverInfo = $_REQUEST['q'];
$serverAction = $_REQUEST['o'];
$submissions = $_REQUEST['s'];
$mastertrack = $_REQUEST['m'];
// set count value for array
$x =0... | true |
4e78c4cffb708c5e3805511af3f1f5b7b438e8e5 | PHP | danielandreson/AutomationPage | /UserInterface/src/DomCrawling.php | UTF-8 | 2,073 | 3.390625 | 3 | [] | no_license | <?php
$page_title = "MiniCrawler";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><?php ... | true |
9afc1e0197ea414acbd226f2fe73e72658c32c40 | PHP | tomboerop/PhP | /Week 4/Person.php | UTF-8 | 231 | 3.0625 | 3 | [] | no_license | <?php
class Person{
public $firstname;
public $age;
public $isAlive = true;
public $lastname;
}
$Jan = new person();
$Jan-> age ="21";
$Jan-> firstname="Jan";
$Jan-> lastname="Alibaba";
print_r($Jan);
?> | true |
b45f9023689620d7174ef8c921d15bf4383d6d25 | PHP | boiledcabbage13/codev-contactapp | /backend/app/Services/Contact/DestroyContact.php | UTF-8 | 305 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Contact;
use App\Models\Contact;
class DestroyContact {
/**
* @param $data
*/
public function execute($contact) : bool
{
try {
return $contact->delete();
} catch (\Throwable $th) {
throw $th;
}
}
}
| true |
321ccc2bcfc732e72a60a9addd48b00a1a5d0610 | PHP | izisoft/yii2 | /satellite/SatelliteWebModel.php | UTF-8 | 1,774 | 2.625 | 3 | [] | no_license | <?php
namespace izi\satellite;
use Yii;
use izi\models\Shops;
use izi\models\StoreWebsite;
/**
* This is the model class for table "satellite_web".
*
* @property int $id
* @property int $website_id
* @property string $domain
* @property int $sid
* @property string $access_token
*
* @property Shops $s
* @pr... | true |
72b956ddd5b7189a2040e9c35a3848feecfc956e | PHP | Artfulbd/my_vlog | /platform/plugins/analytics/src/Period.php | UTF-8 | 1,252 | 3.125 | 3 | [] | no_license | <?php
namespace Botble\Analytics;
use Botble\Analytics\Exceptions\InvalidPeriod;
use Carbon\Carbon;
use Carbon\CarbonInterface;
class Period
{
public function __construct(public CarbonInterface $startDate, public CarbonInterface $endDate)
{
if ($startDate > $endDate) {
throw InvalidPeriod... | true |
5a4e899e686b5863bc31ce6eed544345e6a5b2c2 | PHP | jausions/php-typed-doctrine-collections | /src/Doctrine/Collections/Strings.php | UTF-8 | 435 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Abacus11\Doctrine\Collections;
class Strings extends CollectionOf
{
/**
* Collection of strings
*
* Each element of the collection is a string
*
* @param string[] $elements
*
* @throws \AssertionError
* @throws \Exception
* @throws \TypeError
*/
... | true |
fdf1e52d48bb73bbd0466d635c2c14cb934423bc | PHP | farik88/mail_sender_yii_project | /backend/models/base/MailMaster.php | UTF-8 | 1,893 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models\base;
use Yii;
use mootensai\behaviors\UUIDBehavior;
/**
* This is the base model class for table "mail_masters".
*
* @property integer $id
* @property string $name
* @property string $smtp_host
* @property integer $smtp_port
* @property string $username
* @property string $pas... | true |
fa875d1c8bf1d65f4df4853122452b859faccce7 | PHP | madcatgith/ec | /helpers/html_echo.php | UTF-8 | 10,290 | 2.984375 | 3 | [] | no_license | <?php
function partOfString($string, $limit = 85, $end = ' ...')
{
if (strlen($string) <= $limit)
return $string;
$string = substr(strip_tags($string), 0, $limit);
$string = explode(' ', $string);
array_pop($string);
return implode(' ', $string) . $end;
}
function string_upper($text)
{... | true |
699d8ae853c9dd190df5e9fc6072fd4f0400e073 | PHP | jakekali/peopleOrganizerNew | /users.php | UTF-8 | 9,806 | 3 | 3 | [] | no_license | <?php
include_once 'vendor/autoload.php';
/**
* Created by PhpStorm.
* User: jacob
* Date: 4/13/2017
* Time: 8:47 PM
*/
class users
{
private $firstName;
private $lastName;
private $email;
private $HSGraduationYear;
public function __construct()
{
return $this;
}
/**
... | true |
856584cce84d815d9057facf32fd46db5c813861 | PHP | paulohenriquers/cupommed | /Php/categoria.php | UTF-8 | 2,316 | 2.921875 | 3 | [] | no_license | <?php
// Na linha abaixo está pegando as informações presentes no arquivo conexão.php
require_once 'conexao.php';
// Verifica se há alguma coisa dentro de $_GET['servicos']
if( !empty( $_GET['servicos'] ) ) {
header('Content-type: application/json'); //informa ao client o tipo de conteudo... | true |
06db882db933d668e5e986ebba490ff290c2811f | PHP | umarmansuri/quotes-everyday-api | /include/DbHandler.php | UTF-8 | 8,406 | 3.046875 | 3 | [] | no_license | <?php
class DbHandler {
private $conn;
function __construct() {
require_once dirname(__FILE__) . '/DbConnect.php';
// opening db connection
$db = new DbConnect();
$this->conn = $db->connect();
}
public function registerAppUser($params) {
require_once 'PassHash.p... | true |
959d924d72f785c7545bf343fe7d8e301939497f | PHP | sbppgc/worktime | /src/classes/Router.php | UTF-8 | 1,732 | 2.921875 | 3 | [] | no_license | <?php
namespace Sbppgc\Worktime;
use Sbppgc\Worktime\Config;
use Sbppgc\Worktime\Endpoints\EndpointController;
/**
* Detect and init endpoint controllers by request string
*
* @author Sergey Prisyazhnyuk <sbpmail@ya.ru>
* @package sbppgc/worktime
*/
class Router
{
/**
* Prepared config object
*
... | true |
e98020187cfbd2d7985e0290cc393ccbb71714e2 | PHP | bbidesenvolvimento/almap | /inserirclientesbase.php | UTF-8 | 3,257 | 2.703125 | 3 | [] | no_license | <?php require_once('Connections/conexao.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValu... | true |
2b477ddbf4c3a1cd21c16a79d1dc67f4d5ca6b80 | PHP | BasdatA09/Tugas-Kelompok | /lihat-jadwal-sidang-mahasiswa.php | UTF-8 | 4,092 | 2.53125 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['role'])){
header('location: login.php');
}
if($_SESSION['role'][0] != 'mahasiswa'){
echo '400 Bad Request';
die();
}
$npm = $_SESSION['role'][1];
require_once 'database.php';
function get_content($npm)
{
$display = '';
$connection = new database();
$... | true |
e26c7813626291754673fe50e8b7a6a7d0ab033a | PHP | Reico5/5to-Proyecto_Final | /CRUDS/ordenes_handler.php | UTF-8 | 13,602 | 2.9375 | 3 | [] | no_license | <?php
// Incluimos una vez la conexión a la base de datos.
include_once 'conexion.php';
// Creamos la conexión.
$ObjetoTemp = new Conexion();
$conexion = $ObjetoTemp->Conectar();
// Creamos la variable que guardara el resultado que arrojara el php que indicara si termino bien.
$data = NULL... | true |
bfdbf04ae3d41712f2f6f722ddbd82a31c4cd099 | PHP | ilovemycutebear/nsrc | /Bohol/export_bohol_excel_data_uv.php | UTF-8 | 833 | 2.578125 | 3 | [] | no_license | <?php
include('databaseconn.php');
//query get data
echo "RECORD NO, DATE, TIME, MINIMUM, MAXIMUM, AVERAGE \n";
$sql1 = "SELECT * FROM tblftpfiledata where tblAreaID = 0001 and slrDate = SUBDATE(CURDATE(),1);";
$no = 1;
$result1 = mysqli_query($conn, $sql1);
if (mysqli_num_rows($result1) > ... | true |
18d8d314d939b841ae1dd2b68ab0f5dc8cef79dd | PHP | laiyongqin/Collection-MPOS | /www.huibao.com/application/controllers/Financedate.php | UTF-8 | 1,828 | 2.71875 | 3 | [] | no_license | <?php
/**
* 财经日历
*
* @author: lindexin
* @since : 2016/07/12
*/
class FinancedateController extends BaseController {
private $_weekList = array(
'周一','周二','周三','周四','周五','周六','周天',
);
public function init() {
parent::init();
}
public function indexAction() {
$this->i... | true |
4608d6bf90848b7cc66b4ac4484182bac0c26038 | PHP | subrata5/MultipleAndroidOne | /getos.php | UTF-8 | 856 | 2.5625 | 3 | [] | no_license | <?php
require 'init.php';
$type = false;
if(isset($_GET['item_type'])){
$type = $_GET['item_type'];
}
//$type = $_GET['item_type'];
//$type = "ios";
if($type=='android')
{
$sql = "select * from androidos";
$response = array();
$result = mysqli_query($con, $sql);
while($row = mysqli_fetch_array(... | true |
122ff0f851111a1e9ed786e9d2dc1cec89995881 | PHP | vitalii-retel/php_rvk_core | /core/common/Map.php | UTF-8 | 1,269 | 2.859375 | 3 | [] | no_license | <?php
namespace core\common;
class Map {
private $data;
function __construct(array $data = array()) {
$this->data = array();
$this->setValues($data);
}
private function _normalizeKeyName($key) {
return strtolower($key);
}
public function isExists($k... | true |
c1009253d8dfff9b4b796468232afc3cf15d47d0 | PHP | ylmenezes/PHPJuno-v2 | /classes/Juno.php | UTF-8 | 15,135 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Integração com o getway de pagamento da juno
* API Versão 2 da Juno <https://dev.juno.com.br/api/v2>
*
* =========================================================================
*
* Para iniciar a classe você deve informar o ClienteID e ClienteSecret
*
* $juno = new Juno(token, clientID, cli... | true |
5a2fcafa4e98112324f1b5f1b30969ea1798672a | PHP | OleksiiXle/four_in_one | /common/models/behaviors/CheckIsLocked.php | UTF-8 | 676 | 2.59375 | 3 | [] | no_license | <?php
namespace common\models\behaviors;
trait CheckIsLocked
{
public function isFreeLock($id)
{
$isFreeLock = \Yii::$app->db->createCommand('SELECT IS_FREE_LOCK("'. $id .'")')->queryScalar();
return ($isFreeLock == 1);
}
public function getLock($id, $seconds = 7200)
{
$g... | true |
0abde3af77b14f705f9645695ed15342cd0a4d33 | PHP | basic-app/memory-logger | /MemoryLogger.php | UTF-8 | 2,275 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Basic App Dev Team <dev@basic-app.com>
* @license MIT
* @link https://basic-app.com
*/
namespace BasicApp\MemoryLogger;
use Psr\Log\LogLevel;
class MemoryLogger extends \Psr\Log\AbstractLogger
{
protected $_messages = [];
public $levels = [
LogLevel::EMERGENCY,
LogLev... | true |
1ffc8a667d85e570caf344310f4aabb050fa7922 | PHP | jbloetz/Laravel-Bootstrap | /application/models/page.php | UTF-8 | 446 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class Page extends Eloquent {
public static $timestamps = true;
public function section()
{
return $this->has_many('Cmssection','page_id');
}
public function get_created_at(){
return date('j-M-y H:i',strtotime($this->get_attribute('created_at')));
}
public function get_updated_at(){
return date('j-M... | true |
9a3b38b25bb0dafa77c853046211873c9af5c29c | PHP | douglas-debug/student_management | /database/migrations/2020_09_21_141010_create_students_table.php | UTF-8 | 1,264 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStudentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('students', fun... | true |
20f7e9e65f86881de01b4f19b698627a8715bfe6 | PHP | kitpages/KitpagesWorkflowBundle | /WorkflowConfiguration/WorkflowConfiguration.php | UTF-8 | 2,681 | 2.8125 | 3 | [] | no_license | <?php
namespace Kitpages\WorkflowBundle\WorkflowConfiguration;
class WorkflowConfiguration implements WorkflowConfigurationInterface
{
protected $name;
protected $initialState;
protected $stateList = array();
protected $parameterList = array();
/**
* @param StateConfigurationInterface $initi... | true |
014b483c6a4d3eb7467923cedb80ed2a585a2233 | PHP | roeltz/london-php | /src/London/Config/Source/PHPSource.php | UTF-8 | 270 | 2.515625 | 3 | [] | no_license | <?php
namespace London\Config\Source;
use London\Config\Source;
class PHPSource implements Source {
function getConfigFromPath(string $path): array {
if (file_exists($file = "$path.php")) {
return require $file;
} else {
return [];
}
}
} | true |
c500db5f5bc80c087554161177b622f608ed9d4d | PHP | pfory/meteo-arduino-mega | / meteo-arduino-mega/Pandatel.wz.cz/wind.php | UTF-8 | 4,392 | 2.546875 | 3 | [] | no_license | <?php
include('PachubeAPI.php');
$pachube = new PachubeAPI("q1PY6QqB9jvSHGKhmCQNBRdCofeSAKxpKzliaHJGWUc5UT0g");
$feed = 63310;
$user = "datel";
// mysql
$c = mysql_connect("mysql.webzdarma.cz", "pandatel23", "c5e56n");
mysql_select_db("pandatel23");
mysql_select_db("pandatel23");
$datumCas = new DateTime('NOW');
$t... | true |
8ad62d8a0e399750eff2c18a96f47f29a6d7f498 | PHP | Ahadmart/ap3 | /protected/controllers/MenuController.php | UTF-8 | 6,161 | 2.765625 | 3 | [] | no_license | <?php
class MenuController extends Controller
{
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id)
{
$this->render('view', [
'model' => $this->loadModel($id),
]);
}
/**
* Cr... | true |
c38bbef9ba07124e4921bd362934a3c867f1ee87 | PHP | douglas-otix/php-sigep | /src/PhpSigep/Model/LogisticaReversaDestinatario.php | UTF-8 | 5,102 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpSigep\Model;
use PhpSigep\InvalidArgument;
/**
* @author: Rodrigo Job (rodrigo at econector.com.br)
*/
/*
* baseado no documento:
* LOGÍSTICA REVERSA
* Manual de Implementação de Web Service de Logística Reversa
* Revisão: Maio/2016
* Método: solicitarPostagemReversa()
*
* destinatario:... | true |
ec0fa7430df71f9637bab06858e7b9a40e37be3b | PHP | ColinZeidler/videoplayer | /includes/movies.php | UTF-8 | 280 | 3.0625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Colin
* Date: 2016-02-11
* Time: 7:53 PM
*
* Builds the list of Movies
*/
require_once("functions.php");
$movies = get_movies();
echo sizeof($movies) . " movies" . "<br/>";
foreach ($movies as $movie) {
print_movie($movie);
}
| true |
969fac1fc24bf30ab7b875028b4abd3dcd08202c | PHP | babyanzichen/laravel_djcb | /app/Http/Controllers/Dashboard/ArticleController.php | UTF-8 | 3,907 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Support\Facades\voteRequest;
use Storage;
use Validator;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Redirect, Input, Response;
use App\chebao_article;
class ArticleController extends Controller
{
public function index()
{
... | true |
03dfb31162818b81e7190be099596365ad4657f1 | PHP | sergei404/50837-task-force-1 | /frontend/models/Profile.php | UTF-8 | 2,358 | 2.609375 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "profiles".
*
* @property int $id
* @property string $address
* @property string|null $bd
* @property string|null $about
* @property string|null $phone
* @property string|null $skype
* @property int $user_id
* @property string|nul... | true |
2def78dd2ac184120c62555b3e07520756f039d8 | PHP | 107coder/LeetCode | /牛客网/63数据流的中位数.php | UTF-8 | 2,583 | 3.640625 | 4 | [] | no_license | <?php
/*
* 题目描述
如何得到一个数据流中的中位数?如果从数据流中读出奇数个数值,那么中位数就是所有数值排序之后位于中间的数值。
如果从数据流中读出偶数个数值,那么中位数就是所有数值排序之后中间两个数的平均值。我们使用Insert()方法读取数据流,
使用GetMedian()方法获取当前读取数据的中位数。
* */
global $stream_max;
global $stream_min;
$stream_max = [];
$stream_min = [];
function bulidMaxHeap(&$arr){ // 建立大顶堆
$len = count($arr);
... | true |
534ced5ee31afcc9ea831fac67ab29b86c299137 | PHP | achelaru19/HogwartsWebsite | /php/teacher/layout/addStudentForm.php | UTF-8 | 2,212 | 2.890625 | 3 | [] | no_license | <h2>Add a new student</h2>
<p>Insert the new student's information: </p>
<form name="addStudent" action="./form_actions/addStudent.php" method="post">
<div id="student_info_input">
<label>First Name:</label><input type="text" name="name" required><br>
<label>Last Name:</label><input type="text" name="lastname" ... | true |
ab8cc60d87c7304d636ad51dc959be97ed6727b6 | PHP | caphrim007/scanmenow | /api/v1/rest/lib/Modules/default/controllers/ErrorController.php | UTF-8 | 1,556 | 2.515625 | 3 | [] | no_license | <?php
/**
* @author Tim Rupp
* @see http://www.enrise.com/2011/01/rest-style-context-switching-part-2/
*/
class ErrorController extends Zend_Controller_Action {
const IDENT = __CLASS__;
public function init() {
$this->_helper->viewRenderer->setNoRender();
}
public function errorAction() {
try {
$log = App... | true |
7ca8a43e54073805091936558fc6bb722b554edb | PHP | renzocarara/php-oop-dipendenti | /class_quadro.php | UTF-8 | 778 | 2.984375 | 3 | [] | no_license | <?php
// descrizione:
// definizione della classe figlia Quadro
include_once 'class_dipendente.php';
class Quadro extends Dipendente
{
public $area;
public $rif_dirigente;
public $num_impiegati;
public function __construct($_cognome, $_nome, $_matricola)
{
// cognome e nome sono attributi... | true |
d60cd2ada5c2d0ae1f8a9c1d63c36f814ea3282b | PHP | wislanlamounier/prophet_sistema | /modelo/ModeloSecao.class.php | UTF-8 | 4,939 | 3.046875 | 3 | [] | no_license | <?php
/**
* Classe que realiza operações no banco
* de dados envolvendo a secao.
*
* @author Rafael de Paula - <rafael@bentonet.com.br>
* @version 1.0.0 - 2015-08-17
*
**/
class ModeloSecao extends Modelo{
/**
* Método utilizado para retornar o objeto DTO
... | true |
4ca87b75109ac150c35d74a54d3ae5baad3ff258 | PHP | jessicavicentini/php-mod3 | /mod1/exercicio9.php | UTF-8 | 206 | 2.890625 | 3 | [] | no_license | <?php
if (!isset($argv[1])) {
echo "Dígite um número corretamente" . PHP_EOL;
exit;
}
$num = $argv[1];
for ($i=0; $i < $num ; $i++) {
echo 'SOL'. PHP_EOL;
}
?> | true |
1926ad7d588e03acdfa16a85b02f3920c479c5ca | PHP | zhangaz1/BraiNet | /src/media/php/getStructImgMap.php | UTF-8 | 896 | 2.640625 | 3 | [] | no_license | <?
/* this function retrieves the mapping between structures and section images (for allen brain institute)*/
$con = mysql_connect("localhost", "tacitia_brainIDC", "Ophelia621");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
else {
//echo 'Connection successful' . "\... | true |
7a03323dc7ebfa45537e8e84229da2b5bf1d8b8e | PHP | DXMOE/tutorias | /models/Usuarios.php | UTF-8 | 2,293 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "usuarios".
*
* @property integer $id
* @property string $nombre
* @property string $paterno
* @property string $materno
* @property string $genero
* @property string $direccion
* @property string $telefono
* @property string $est... | true |
cc8bf0b2f258e162b924122bd17c911decc4751d | PHP | desnudopenguino/photomeister | /Class.User.Personal.Resume.php | UTF-8 | 2,464 | 3.140625 | 3 | [] | no_license | <?php
include_once("Class.User.Personal.php");
include_once("Class.Experience.php");
include_once("Class.Skill.php");
include_once("Class.Equipment.php");
class ResumeUser extends PersonalUser {
/* Properties */
//Experiences
private $_experiences;
//skills
private $_skills;
//equipment
... | true |
836a3c35207699fa2a164c8a8b94d60797e2c553 | PHP | lucasmandelli/laravelvue | /app/Http/Controllers/Api/BanksController.php | UTF-8 | 669 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace FinancialSystem\Http\Controllers\Api;
use FinancialSystem\Http\Controllers\Controller;
use FinancialSystem\Repositories\BankRepository;
class BanksController extends Controller
{
/**
* @var BankRepository
*/
protected $repository;
/**
* BanksController constructor.
... | true |
7e43ff9914d7b7485c0afdce0a02c4e963435268 | PHP | yadose/learn2slim | /src/public/index.php | UTF-8 | 4,482 | 2.640625 | 3 | [] | no_license | <?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
require '../vendor/autoload.php';
$config['displayErrorDetails'] = true;
$config['addContentLengthHeader'] = false;
//db configs
$config['db']['type'] = "mysql";
$config['db']['host'] = "localhost";
$co... | true |
7a090c697acf033d32226c30c2e566b7019b4a1d | PHP | shemodede/MyShift-Final | /main/dashboard_scripts/shift_swap_load_user_name.php | UTF-8 | 717 | 2.703125 | 3 | [] | no_license | <?php
session_start();
include 'config.php';
$company_id = $_SESSION['user_info'][6];
$result;
if(isset($_POST['id'])){
$id = filter_input(INPUT_POST, 'id');
$get_names = "SELECT first_name, last_name FROM personnel WHERE company_id = '$company_id' AND personnel_id = '$id'";
$get_names_result = mysqli... | true |
8fefc4bc6540f4188871ea8c9eb71bc4fd8407eb | PHP | jrgtrujillo/ejercicio | /app/Http/Controllers/UsuarioController.php | UTF-8 | 3,911 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Requests\CrearUsuarioRequest;
use App\Http\Requests\ActualizarUsuarioRequest;
use App\Http\Controllers\Controller;
class UsuarioController extends Controller
{
/**
* Display a listing of the resource.
... | true |
97954d676690560c0da3cdf980fe1b350b4d8592 | PHP | horsensbib/Flexible-Widgets-for-WordPress | /flexible-widgets/flexible-widgets.php | UTF-8 | 87,753 | 2.671875 | 3 | [] | no_license | <?php
/*
Plugin Name: Flexible Widgets
Plugin URI: https://github.com/horsensbib/Flexible-Widgets-for-WordPress
Description: This plugin lets you display a widget on any category or page you wish. When setting up the widget, you are able to select the categories and/or pages where you want to display the widget. If non... | true |
1689e8029e1e95297c634d7f8891f2ce1accef32 | PHP | dvsa/olcs-common | /Common/src/Common/Service/Table/Formatter/ConvictionDescription.php | UTF-8 | 1,409 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* ConvictionDescription formatter
* If category is set against a conviction, use the category description text as the description.
* If the category is NOT SET OR is set to User defined (new entries only) then this implies a user defined
* category and the category.category_text field should be used as t... | true |
d86f5a728dc8d365ba9e6caf86b0c7580ec83b44 | PHP | thistehneisen/rbforums | /libs/DB.php | UTF-8 | 26,129 | 3.1875 | 3 | [] | no_license | <?php
/**
@version 3.5.4
* works with php mysqli_* functions
* created by Janis Rublevskis <janis@xit.lv>
* pardon my English. I code better than write :D
@since 2010
@last updated 2014.06.19
*/
Class DB {
/**
* mysqli link
*/
private $link = null;
/**
* datab... | true |
13aac6438165275b0cf068085d4645133535775e | PHP | sethwhitaker/konnekt4 | /www/app/core/MY_REST_Controller.php | UTF-8 | 4,276 | 2.90625 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
require APPPATH . '/libraries/REST_Controller.php';
/**
* This is an example of a few basic user interaction methods you could use
* all done with a hardcoded... | true |
741c44da8e2753098c715fa113dfb5a559fa9258 | PHP | orlandocoelho/MVC | /App/Controllers/Image.php | UTF-8 | 2,377 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controllers;
use \OC\Controller\Action;
use \OC\Di\Container;
use \OC\Error\Messages;
class Image extends Action
{
public function read()
{
$classImage = Container::getClass('image');
$url = Container::getClass('url');
$this->view->url = $url-... | true |
e51e010e7aecd361c981122d781a958d0b3d301e | PHP | Supakoa/GEcorrect | /subpage/test.php | UTF-8 | 1,571 | 2.515625 | 3 | [] | no_license | <?php
if(isset($_POST['gogo'])){
print_r($_POST['text']);
}
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta ht... | true |
cb33d42fa148c09c6d6efd9ddb74ac2cdb948748 | PHP | Tingkc56/test-huitre | /app/Controllers/Back/BackController.php | UTF-8 | 11,993 | 2.53125 | 3 | [] | no_license | <?php
namespace Project\Controllers\Back;
use Project\Models\UserManager;
use Project\Models\ArticleManager;
use Project\Models\HuitreManager;
use Project\Models\MessageManager;
use Project\Models\CommentManager;
use Project\Models\ProducerManager;
class BackController
{
// connection admin
function connexionAdm... | true |
b6dca0e086501ca2efba2c13bc1a42e585fc5627 | PHP | tonytaylor/d7-refresher | /features/bootstrap/FeatureContext.php | UTF-8 | 1,515 | 2.625 | 3 | [] | no_license | <?php
use Behat\Behat\Context\Context;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\Behat\Tester\Exception\PendingException;
use Behat\Mink\Driver\GoutteDriver;
use Behat\Mink\Session;
use PHPUnit\Framework\Assert;
/**
* Defines application features from the specific context.
*... | true |
6298d23d833a0ed7609c2f1d50cdad6203af3ecf | PHP | lpav71/accounting | /app/Http/Requests/ReportRequest.php | UTF-8 | 1,700 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Carbon;
class ReportRequest extends FormRequest
{
/**
* Имеет ли пользователь право сделать такой запрос
*
* @return bool
*/
public function authorize()
{
return true;
}
... | true |
bb3ff15a9f68d7a27f3fd3415ce20a3d30014300 | PHP | Timoniann/kit | /models/Tests.php | UTF-8 | 295 | 2.765625 | 3 | [] | no_license | <?php
class Tests extends Model
{
public function add($title, $training_id)
{
$title = $this->db->escape($title);
$training_id = (int) $training_id;
$sql = "INSERT INTO $this->table_name (title, training_id) VALUES('$title', '$training_id')";
return $this->db->query($sql);
}
}
?> | true |
02fc3dbb3b36e654ec6886a9f03966a5ac01a277 | PHP | metaufiq/MyCo | /app/modules/myco/application/CreateTugas/CreateTugasRequest.php | UTF-8 | 878 | 2.578125 | 3 | [] | no_license | <?php
namespace Index\Modules\MyCo\Application\CreateTugas;
class CreateTugasRequest
{
private $tugas;
private $pegawai;
private $tenggatWaktu;
public function __construct($tugas, $pegawai, $tenggatWaktu)
{
$this->tugas = $tugas;
$this->pegawai = $pegawai;
$this->teng... | true |
5729f73c10f9b341d8f56e3567e67e62b5f5d930 | PHP | junior-neves/hackerrank-solutions | /problem-solving/algorithms-warmup/diagonal-difference.php | UTF-8 | 251 | 3.21875 | 3 | [] | no_license | <?php
function diagonalDifference($arr) {
$n = count($arr);
$totalLR = $totalRL = 0;
for ($i = 0; $i < $n; $i++) {
$totalLR += $arr[$i][$i];
$totalRL += $arr[$i][($n-1) - $i];
}
return abs($totalLR - $totalRL);
} | true |
641eb1ffabd9aeae3d4789f858ec8b8894fc8188 | PHP | Mr-Ajinkya/php | /phpProject/multiDimenArray/index.php | UTF-8 | 1,815 | 3.15625 | 3 | [] | no_license | <?php
define("TITLE","Multidimensional Array");
$moustache = array(
array(
'name' => 'Handlebar',
'creep_factor' => 'High',
'avg_growth_days' => 14
),
array(
... | true |
2e842f3650128d77fd3e096b43573356105b08f6 | PHP | Blaklis/my-challenges | /shophp/webroot/mycart.php | UTF-8 | 1,249 | 2.765625 | 3 | [] | no_license | <?php
$a = new Item;
$b = new Cart;
$cart = isset($_COOKIE['cart']) ? @unserialize($_COOKIE['cart'],['allowed_classes'=>['Cart']]):(new Cart);
if(isset($_GET['confirm'])) {
if($cart->getId()) {
$cart->save();
} else {
$cart->create();
}
setcookie('cart',serialize($cart));
$pageContent .= <<<CONTENT
<p>Items h... | true |
e8c673526db7d1a1d826a70252d331a0fa2cbf93 | PHP | IngeniozIT/psr-http-message | /src/StreamFactory.php | UTF-8 | 1,779 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace IngeniozIT\Http\Message;
use Psr\Http\Message\{StreamFactoryInterface, StreamInterface};
use InvalidArgumentException;
use RuntimeException;
readonly final class StreamFactory implements StreamFactoryInterface
{
private const VALID_MODES = [
'r', 'r+', 'w', 'w+',... | true |
9bba92638a6f2300fbf06441f70ac1bd7d7fda52 | PHP | xxsser/hitNian | /database/migrations/2016_01_01_014617_create_prizes_table.php | UTF-8 | 1,853 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePrizesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
/*Schema::create('prizes', function (Blueprint $table) {
$t... | true |
bfba5e4e338f07ee967068e42bc9245dce73ce95 | PHP | AbrahamMudonge/schoolmngtsys | /app/Http/Controllers/ClassesController.php | UTF-8 | 2,869 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Classes;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class ClassesController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
7b2c575a1ffc6926f0916f0a50b36eb3b28ef640 | PHP | mmennie/Fanshawe-College--INFO-3106--Fall-2012 | /problem-sets/word-char-counting/index - Copy.php | UTF-8 | 2,385 | 3.375 | 3 | [] | no_license | <?php
ini_set('display_errors', 'on');
error_reporting(E_ALL | E_STRICT);
function _string_count_words_parse_pieces($piece, $offset, $ignore_left = false) {
$return = array();
if( !$ignore_left ) {
$return[] = substr($piece, 0, $offset);
}
if( ($offset + 1) < strlen($piece) ) {
$rhs = substr(... | true |
fa856db36b79d0294ad9021839ac2c43f7f68a74 | PHP | vanias9696/Piscine_PHP | /d1/ex08/ft_is_sort.php | UTF-8 | 197 | 2.78125 | 3 | [] | no_license | <?php
function ft_is_sort($arr)
{
$i = 0;
$s = $arr;
sort($s);
$n = count($arr);
while ($i < $n)
{
if ($s[$i] != $arr[$i])
return (FALSE) ;
$i++;
}
return (TRUE) ;
}
?> | true |
a2aa6b0b727369060360c13089761e6edfa97761 | PHP | SithornKong/sithornlara | /app/Http/Controllers/DoctorController.php | UTF-8 | 1,306 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\doctor;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class DoctorController extends Controller
{
public function index(){
$doctors = doctor::all();
$output['doctors']=$doctors;
return view('doctor.index')->with... | true |
73d6d343131ac0ee050d440945ffdd861eee3266 | PHP | algm/dogebank | /src/Transfers/Domain/Transfer.php | UTF-8 | 2,290 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Dogebank\Transfers\Domain;
use Dogebank\Shared\Domain\AggregateRoot;
final class Transfer extends AggregateRoot
{
public function __construct(
private TransferId $id,
private TransferFrom $from,
private TransferTo $to,
private TransferAmou... | true |
d4118c6ddaa8db4f70bd2049c92927c20ef751b7 | PHP | Temunper/shang | /application/customer/common/Upload.php | UTF-8 | 3,299 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* Clientw: vpanda
* Date: 2019/7/11
* Time: 17:50
*/
namespace app\customer\common;
use think\Request;
class Upload
{
/*
* $name为表单上传的name值
* $filePath为为保存在入口文件夹public下面uploads/下面的文件夹名称,没有的话会自动创建
* $width指定缩略宽度
* $height指定缩略高度
* 自... | true |
a9004816cc27b4317f2f6c38a88c9777ee5cd8a9 | PHP | automateddecision/mabi | /extensions/FacebookIdentity/models/Session.php | UTF-8 | 744 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace MABI\FacebookIdentity;
include_once __DIR__ . '/../../Identity/models/Session.php';
class Session extends \MABI\Identity\Session {
/**
* Plaintext Facebook accessToken that is used to authenticate the user. This should only be filled for incoming
* POSTs to create new sessions. Otherwise it w... | true |
8d0c7e5a4af26ce8fd734e6c70af71133c162c29 | PHP | besstiolle/orm-ms | /src/OrmUT/tests/002_006_InsertEntityWithFK.php | UTF-8 | 1,025 | 2.609375 | 3 | [] | no_license |
<p class='title'>002/006 : can I create an Entity with OrmEntity->save() with FK?</p>
<?php
//First, drop the table, recreate it
reinitAllTables($mod);
$china = new CountryOrmUT();
$china->set('label', 'China');
$china->set('iso_code', 'cn');
$china = $china->save();
UtilsTest::assertIsEquals($china->get('... | true |
a4eeceef313b41c422ed6c16172b20a1d1e77c37 | PHP | ilfate/laravel.5.1.ilfate.net | /app/Ilfate/Cosmos/Ship/System.php | UTF-8 | 4,736 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* TODO: Package description.
*
* PHP version 5
*
* @category
* @package
* @author Ilya Rubinchik <ilfate@gmail.com>
* @license Proprietary license.
* @version "SVN: $Id$"
* @link http://ilfate.net
*/
namespace Ilfate\Cosmos\Ship;
/**
*
* PHP version 5
*
* @category
* @package
* ... | true |
8bc58f17595fc47165eb062f885012b3136ba298 | PHP | dickens7/PhpClickHouseClient | /src/Snippet/CurrentDatabase.php | UTF-8 | 651 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace SimPod\ClickHouseClient\Snippet;
use SimPod\ClickHouseClient\Client\ClickHouseClient;
use SimPod\ClickHouseClient\Format\JsonEachRow;
use function assert;
use function is_string;
final class CurrentDatabase
{
public static function run(ClickHouseClient $clickHouseClient)... | true |
401d1e7085d83d3943c2656efb1e56a47df692a6 | PHP | domainlee/fal | /module/Store/src/Store/Model/StoreEmail.php | UTF-8 | 1,079 | 2.65625 | 3 | [] | no_license | <?php
/**
* @category Shop99 library
* @copyright http://shop99.vn
* @license http://shop99.vn/license
*/
namespace Store\Model;
use Base\Model\Base;
class StoreEmail extends Base {
/**
* @var int
*/
protected $id;
/**
* @var int
*/
protected $storeId;
/**
* @var string
*/
... | true |
ca715f4032e393204523b4c663f3f48a9932007a | PHP | lourdrivera123/universalagency | /app/UniversalAgency/Repositories/ContractsRepository.php | UTF-8 | 3,173 | 2.625 | 3 | [
"MIT"
] | permissive | <?php namespace UniversalAgency\Repositories;
use Contract;
use Recruitcontract;
use Carbon\Carbon;
class ContractsRepository {
function adminsaveemployercontract($input)
{
$contract = new Contract;
$contract->salary = $input['salary'];
$contract->job = $input['job'];
$contract->num_of_employees = $input['... | true |