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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
61a3dec33002d20764e438199d28f090a7951e56 | PHP | phpscr/phpsrc | /php-func/PHP-Cookbook-2nd-Edition-Source-Code/第13章 Web自动化/example-13-09.php | UTF-8 | 409 | 2.875 | 3 | [] | no_license | <?php
$url = 'http://www.example.com/redirector.php';
// Define the options
$options = array('max_redirects' => 1 );
// Create a context with options for the http stream
$context = stream_context_create(array('http' => $options));
// Pass the options to file_get_contents. The second
// argument is whether to use the in... | true |
cf46f89330688cad7acde0fa720db986d425ea10 | PHP | Ashkas/bm | /app/walker.php | UTF-8 | 4,258 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
/**
* Class NavWalker
*
* Bootstrap 4 walker with cleaner markup for wp_nav_menu()
* For use with Sage >= 8.5
*
* Based on Soil NavWalker
* @url https://github.com/roots/soil
*
*
* Walker_Nav_Menu (WordPress default) example output:
* <li id="menu-item-8" class="menu-item menu-item-t... | true |
32f270eee2b9d5aba64cbea1329f8d58a6bb66a6 | PHP | AkberHossain/Lab_Performance | /task4.php | UTF-8 | 3,969 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Task4</title>
<style>
span{
color: red;
}
</style>
</head>
<body>
<?php
error_reporting(0);
$name = $errname = $email = $erremail = $uname = $pass = $erruname = $errpass = $cpass = $errcpass = "";
if($_SERVER["REQUEST_METHOD... | true |
678a28ae179e7d7da0e4e5fedf7b4d137010f9fc | PHP | anamargaridarl/MIEIC_LTW_PROJ | /api/getcities.php | UTF-8 | 418 | 2.78125 | 3 | [] | no_license | <?php
include_once('../includes/database.php');
$name = $_GET['name'];
// Database connection
$db = Database::instance()->db();
// Get the cities that start with $name
$stmt = $db->prepare("SELECT DISTINCT location FROM habitation WHERE upper(location) LIKE upper(?) LIMIT 10");
$stmt->execute(array("... | true |
7b94a638eacf3f8a0be33a889b5425fe179aaaf3 | PHP | sadaqatali41/LED-PANEL-display-with-word | /Vertical-LED-star-pattern.php | UTF-8 | 5,528 | 2.875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Vertical LED Panel</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jq... | true |
cb407b0d00a5fce2d4a0ac41afc6a83f82d63ca6 | PHP | alexeykirlitsya/WeatherTelegramBot | /app/OpenWeatherMap.php | UTF-8 | 2,491 | 2.96875 | 3 | [] | no_license | <?php
namespace App;
class OpenWeatherMap
{
/**
* @var string
*/
public static $url = WEATHER_API_URL;
/**
* @var string
*/
public static $token = WEATHER_API_TOKEN;
/**
* @param $result
* @return string
*/
public static function responseWeather($result)
... | true |
ea0d7aa6aaf0d7339a7df32a20b80102fc020734 | PHP | aljuni/php-prak-8 | /lat_6.php | UTF-8 | 355 | 3.25 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Penyisipan Variabel pada HTML</title>
</head>
<body>
Silahkan sebutkan makanan kesukaan anda..? <br>
<?php
$makan1 = "mie rebus";
$makan2 = "mie goreng";
$makan3 = "nasi goreng"
?>
<b>Dibawah ini adalah makanan kesukaanku : </b> <br>
<?php
echo "$makan1, $makan2, dan ... | true |
182bc523c991b4e9217643bcd99ae4d2232c0480 | PHP | dx285/usyilu | /plugins/car/classes/model/car.php | UTF-8 | 27,553 | 2.5625 | 3 | [] | no_license | <?php defined('SYSPATH') or die('No direct access allowed.');
class Model_Car extends ORM
{
private static $_typeid=3;
public function delete_clear()
{
$suits = ORM::factory('car_suit')->where("carid={$this->id}")->find_all()->as_array();
foreach ($suits as $suit)
{
$suit->delete_clea... | true |
ab21842b7e272114c7dc6028ae12a5ed6c1125ac | PHP | pranxol/Cuet_alumni_web_portal | /after_logged_in_all.php | UTF-8 | 3,418 | 2.5625 | 3 | [] | no_license | <?php
session_start();
// initializing variables
$username = "";
$email = "";
$errors = array();
// connect to the database
$db = mysqli_connect('localhost', 'root', '', 'registration');
if (!isset($_SESSION['username'])) {
$_SESSION['msg'] = "You must log in first";
header('location: login.php')... | true |
5c347201b110164e3c5e8d6dc72a8e5767fae439 | PHP | cheanj/rscareers | /app/database/migrations/2014_06_20_054313_create_table_applicant_family_background.php | UTF-8 | 931 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTableApplicantFamilyBackground extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('applicant_family_background', function(Blueprint $table)
{
... | true |
640c232ef6cbda4f8f71b1a83c0ee943947ba39d | PHP | phpcq/phpcq | /src/Config/Builder/ConfigOptionBuilderInterface.php | UTF-8 | 1,243 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Phpcq\Runner\Config\Builder;
use Phpcq\Runner\Exception\RuntimeException;
use Phpcq\PluginApi\Version10\Configuration\Builder\OptionBuilderInterface;
use Phpcq\PluginApi\Version10\Exception\InvalidConfigurationException;
/**
* Interface is a more specific OptionBuilderInter... | true |
f603167c8033c85ec0a80024e25aaa2a91c5b939 | PHP | RicePavel/motus_back | /models/ApiLoginForm.php | UTF-8 | 1,594 | 2.53125 | 3 | [] | permissive | <?php
namespace app\models;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
use Yii;
use yii\base\Model;
use app\models\ar\User;
class ApiLoginForm extends Model ... | true |
cb8018b7264c120c355288f6ec192e26cf6ffcd6 | PHP | aboudouRachidi/site_recup_art | /admin/includes/coBDD.php | WINDOWS-1252 | 594 | 2.890625 | 3 | [] | no_license | <?php
$user="root";
$pass="";
try{
@$db=new PDO('mysql:host=127.0.0.1;dbname=recup_art',$user,$pass);
@$db->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8'"); //les contenues des champs prendra en compte lensemble des caractres(utf8)
@$db->exec("SET NAMES 'utf8';");
@$db->setAttribu... | true |
304b45a542ed0db6c87c5efc1240e45b9a85775a | PHP | AndreyPetkoTF/learning.com | /src/AppBundle/Services/TranslatorService.php | UTF-8 | 1,066 | 2.59375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace AppBundle\Services;
class TranslatorService
{
private const TRANSLATE_URL = 'http://translate.google.ru/translate_a/t';
/**
* @param string $string
* @param string $langFrom
* @param string $langTo
* @return mixed
*/
public function tran... | true |
08020d08f71bf96ebd5a981732556af9a2a42949 | PHP | nazranhairi/test-attend | /server/student/changepasswordS.php | UTF-8 | 1,487 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
require('connectS.php');
// eve handles alert conditions
$eve = 0;
if(isset($_POST['oldpass']) and isset($_POST['newpass']))
{
//Assigning GET values to variables.
$oldpass = $_POST['oldpass'];
$newpass = $_POST['newpass'];
$cpass = $_POST['cpass'];
//check password criterias
$uppercase = preg_match('... | true |
88113769a9178b6a27e726faeb5a6e3c8136508d | PHP | HGNScript/practice | /app/teacher/controller/Classlist.php | UTF-8 | 9,420 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\teacher\controller;
class Classlist extends Common {
protected $cla;
protected function _initialize() {
parent::_initialize();
$this->cla = new \app\teacher\model\Cla();
}
/**
* 班级列表
*/
public function index() {
$grade = db('class')->order('class_grade desc')->column('class_grade');
... | true |
4338afca8d4f9af43b214f19dc5ecca3e1df8200 | PHP | ryanj/silex-base | /app.php | UTF-8 | 1,222 | 2.78125 | 3 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | <?php
//Allow PHP's built-in server to serve our static content in local dev:
if (php_sapi_name() === 'cli-server' && is_file(__DIR__.'/static'.preg_replace('#(\?.*)$#','', $_SERVER['REQUEST_URI']))
) {
return false;
}
require 'vendor/autoload.php';
use Symfony\Component\HttpFoundation\Response;
$app = new \Silex... | true |
6d91518782bc66c16db2183731fbc3e988b0c43c | PHP | patjanawat/mymoney | /app/Http/Controllers/IncomeController.php | UTF-8 | 3,229 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Income;
use App\User;
use Illuminate\Support\Facades\Auth;
class IncomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->m... | true |
16bb3af902564bac2e8005de398a52b011839179 | PHP | Katzuki029/PHPcrud | /details.php | UTF-8 | 1,078 | 2.921875 | 3 | [] | no_license | <?php
if(!isset($_SESSION))
{
session_start();
}
if(isset($_SESSION['UserLogin']))
{
echo "Welcome ".$_SESSION['UserLogin'];
}
else
{
header("location: login.php");
}
include_once("connection.php");
$con = connection();
$ID = $_GET['ID'];
$sql = "select * from tbl_information where id = '$... | true |
04020725e50aee24840b97eda16a4e09f9c56bc0 | PHP | MasterZero/yii2-bread-cms | /console/views/migration.php | UTF-8 | 668 | 2.765625 | 3 | [] | no_license | <?php
/**
* This view is used by console/controllers/MigrateController.php
* The following variables are available in this view:
*/
/* @var $className string the new migration class name */
echo "<?php\n";
$matches = [];
preg_match('/m\d+_\d+_(\S+)/', $className, $matches );
$module_name = $ma... | true |
a09b0e9a17ab7da6430d764e7ba73e607d773485 | PHP | rafeeqmd35/autoprocess | /application/controllers/StructureController.php | UTF-8 | 26,299 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
//Steps to do
// check the namespace is proper or not
// And add the parameter for validation and passing inputs
// for show and edit plz check the PRIMARY_KEY columns
// apart from this whatever u want u can do
//$_CR_DT_COLUMN_NAME - need to define created date column name
//$_PRIMARY_COLUMN_NAME - need to ad... | true |
4ced5ead45e2d19ebf62c565913f6fee5a457311 | PHP | markvdv/hifluenceremote2 | /mvdv/core/view/imageview.php | UTF-8 | 711 | 2.59375 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace MVDV\Core\View;
/**
* Description of imageview
*
* @author mark
*/
class ImageView extends View {
public $i... | true |
e5ee0be0003e8afefc5644015bdde5c8a694637c | PHP | nimblegirl/quotation | /simple/Model/Source.php | UTF-8 | 615 | 3.140625 | 3 | [] | no_license | <?php
class Source{
protected $id;
protected $name;
protected $type_id;
function __construct($id='', $name='', $type_id=''){
$this->id = $id;
$this->name = $name;
$this->type_id = $type_id;
}
function setId($sid){
$this->id = $sid;
}
function getId(){
return $this->id;
}
function setName... | true |
dd1687d663b3314aab74e688d2e71ca38f7cc3af | PHP | summitbt/summitbt | /system/application/libraries/Assets.php | UTF-8 | 29,468 | 2.875 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter Assets Class
*
* This class allows you to load external assets (CSS, Javascript, meta, favicon, etc) to the page.
*
* @package CodeIgniter
* @subpackage Libraries
* @category Library
* @author David Freerk... | true |
4127417cdcdffeaa8165fe10c7f4e311e78b1a29 | PHP | sugar3103/speedlink-zend-3 | /module/Pricing/PricingSpecial/src/Form/AreaForm.php | UTF-8 | 2,304 | 2.703125 | 3 | [] | permissive | <?php
namespace PricingSpecial\Form;
use PricingSpecial\Entity\SpecialArea;
use PricingSpecial\Validator\SpecialAreaExistsValidator;
use Doctrine\ORM\EntityManager;
use Zend\Filter\ToInt;
use Zend\Filter\StringTrim;
use Zend\Validator\StringLength;
use Zend\Form\Form;
class AreaForm extends Form {
/**
* Scenari... | true |
54d8bcf8fb9d6a7e01205fbd2e794b2e255f77f2 | PHP | bmelim/logstats | /app/Domain/Filters/ComparisonTypes.php | UTF-8 | 598 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php namespace Logstats\Domain\Filters;
class ComparisonTypes {
const EQUAL_TO = "equal";
const NOT_EQUAL_TO = "not_equal";
const GREATER_THAN = "greater";
const LESS_THAN = "less";
const GREATER_OR_EQUAL_TO = "greater_or_equal";
const LESS_THAN_OR_EQUAL_TO = "less_or_equal";
const CONTAINS = "contains";
con... | true |
000a3ceb68e6c8829aea1e2c44b61b521df1514a | PHP | Aboubacar-Zankoye/Php | /carré.php | UTF-8 | 2,097 | 3.09375 | 3 | [] | no_license | <? php
classe Carre {
privé $ longueur ;
privé statique $ unir ;
fonction publique __construct ( $ longueur = null ) {
if ( $ longueur ! = null ) {
$ this -> longueur = $ longueur ;
... | true |
a824b558dd7a2fa26863bb39c3a63431b426d4c8 | PHP | SoftechMansoor/User-Registration-System-Using-PHP | /show.php | UTF-8 | 958 | 2.578125 | 3 | [] | no_license | <?php
include'db_conn.php';
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
p {
font-size: 20px;
color: #fff;
background-color: #4caf50;
padding: 14px 16px;
}
</style>
</head>
<body>
<form method="POST">
<input type="text" name="id" placeholder="e... | true |
8bb0f508f5e0bcc0d7ef5f28ea98ea14e93a9dd9 | PHP | bartko-s/stefano-image | /tests/StefanoImageTest/Adapter/GdTest.php | UTF-8 | 5,148 | 2.640625 | 3 | [] | no_license | <?php
namespace StefanoImageTest\Adapter;
use StefanoImage\Adapter\Gd as GdAdapter;
use StefanoImageTest\TestCase;
class GdTest
extends TestCase
{
protected function setUp(): void {
if(!file_exists($this->getBasePath())) {
mkdir($this->getBasePath(), 0777, true);
}
}
p... | true |
2cd8687c95d54de484eb7f69acccf16f87ec674c | PHP | sheldon9527/laravel-adminlte | /public/closure.php | UTF-8 | 562 | 3.296875 | 3 | [] | no_license | <?php
function printStr() {
$func = function( $str ) {
echo $str;
};
$func( 'some string' );
}
printStr();
function getMoney() {
$rmb = 1;
$ii= function() use ( $rmb ) {
echo $rmb;
};
$ii();
}
getMoney();
function getPrintStrFunc() {
$func = function( $str ) {
... | true |
299727d1cc3811017fcc0fe78010854524be4c65 | PHP | davidgamingzz/MiningRewards | /src/david/miningrewards/task/TickTask.php | UTF-8 | 2,145 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace david\miningrewards\task;
use david\miningrewards\Loader;
use pocketmine\entity\object\ItemEntity;
use pocketmine\level\particle\FlameParticle;
use pocketmine\level\particle\SmokeParticle;
use pocketmine\level\sound\ClickSound;
use pocketmine\Player;
use pocketmine\scheduler\Task;
use pocketmine\utils... | true |
47818ec8b091d1b5426b1511c8207da802a53df3 | PHP | Revolution4001/Stage-3 | /del_user.php | UTF-8 | 914 | 2.78125 | 3 | [] | no_license | <?php
require_once('session.php');
$id = isset($_GET['id']) ? intval($_GET['id']) :0;
if ($id>0)
{
$sth = $pdo->prepare('DELETE FROM `users` WHERE id = :id');
$sth->bindParam(':id',$id);
$sth->execute();
}
$table = $pdo->query('SELECT * FROM users');
echo '<tab... | true |
6817a47bf65d245ed38f07c9675625d5b8d8c801 | PHP | waldenermonteiro/codeigniter-rest-server | /application/models/Planos_model.php | UTF-8 | 1,850 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
class Planos_model extends CI_Model{
private $tabela = 'planos';
public function inserir($plano) {
$sucesso = $this->db->insert($this->tabela, $plano);
return $sucesso;
}
public function buscarUltimo(){
$this->db->select("planos.id as id");
$this->db->from("planos");
$this->db->order_by("planos.id... | true |
801c399a6d0c8f775c5c61bbb4c07e20c614c66a | PHP | vishaal010/Laurensverzorgingshuis | /faker.php | UTF-8 | 487 | 2.5625 | 3 | [] | no_license | <?php
require_once 'include/db.inc.php';
require_once "vendor/autoload.php";
$faker = \Faker\Factory::create();
for($i = 0; $i < 100; $i++){
$query = "INSERT INTO users(appointment_id,username,password,name,email,tel)
VALUES('".$faker->numberBetween($min = 1, $max = 25) ."', '".$faker->userName."', '".$fake... | true |
a2f8533c98fbb0bdadbc6bd3a1b04cf773305eec | PHP | Ik0n/telega | /schedule/edit.php | UTF-8 | 2,411 | 2.625 | 3 | [] | no_license | <?php
$db = pg_connect("dbname=d4re8r18uqsqa
host=ec2-46-51-187-253.eu-west-1.compute.amazonaws.com
port=5432
user=nhtxzmrecgoswb
password=078e8a10351abf96961014d551717ef2b4fb31ce260b31ea5ebd24d3aff823b0
sslmode=require");
$results =... | true |
a2c4cef7a182f5cc00a18379ec98502792e19377 | PHP | ObsidianHub/php_auth-cookies-session | /index.php | UTF-8 | 2,299 | 3.125 | 3 | [] | no_license | <?php
session_start();
$isAuth = 0;
$login = "user";
$pass = "qwerty";
function UserExit() {
unset($_SESSION['login']);
unset($_SESSION['pass']);
setcookie('login', '', time() - 3600 * 7 * 24);
setcookie('pass', '', time() - 3600 * 7 * 24);
return $isAuth = 0;
}
function authWithCredential($user... | true |
debf1f3fcbfe4ee8bd5a2aa00830ee15e4756780 | PHP | d1gi/Smart-Core-CMF | /system/Framework/DB/Simple.php | UTF-8 | 766 | 2.96875 | 3 | [] | no_license | <?php
/**
* Простой интерфейс БД.
*
* @uses DB_Simple_*
*
* @version 2011-11-22.0
*/
class DB_Simple
{
private static $instance;
/**
* Конструктор. Синглтон паттерн.
*/
private function __construct(){}
/**
* Синглтон паттерн.
*/
public static function getInstance(array $cfg = null, array $option... | true |
4c3c4534bbd2502f6f2ce7d06e6cb94a49a8d8ce | PHP | SrideviKrishnakumar/Main-Project | /letzpark/database/seeders/usersSeeder.php | UTF-8 | 1,398 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class usersSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// I will put only two examples of each table but i will populate t... | true |
a6499aa2ba43666be001efc8e8cce24f22c3a107 | PHP | dilbadil/jne | /tests/units/Mappers/ArrayMappers/LocationMapperTest.php | UTF-8 | 1,003 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Jne\Mappers\ArrayMappers\LocationMapper;
use Jne\Contracts\Foundation\LocationInterface;
class LocationMapperTest extends PHPUnit_Framework_TestCase {
protected $arrayLocations;
function setUp()
{
$this->arrayLocations = [
[
'label' => 'BANDUNG',
... | true |
d59a9447c13c5cdfebc77fc1f9e4dae5bbbb2894 | PHP | wilianselzlein/Reinandus | /app/Controller/Component/Importador/ImportarProgramasComponent.php | UTF-8 | 880 | 2.546875 | 3 | [] | no_license | <?php
App::uses('Component', 'Controller/Component');
App::import('Controller/Component/Importador', 'ImportadorBaseComponent');
class ImportarProgramasComponent extends ImportadorBaseComponent {
public function PassaValores($parametro) {
$dados = [];
$dados['id'] = $parametro['PROCOD'];
$dados['nome'] = $thi... | true |
ccb351dfdf49e92a3b9dc330ff98d32ab65b3158 | PHP | tkah/CountriesAndIntlAffairs | /Project/part2/insertRegionData.php | UTF-8 | 756 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: T-Drive
* Date: 3/4/16
* Time: 3:00 PM
*/
if (!isset($conn)) require_once("db_connection.php");
include('simple_html_dom.php');
$file_json = file_get_contents("../db_resources/countries-unescaped.json");
$file = json_decode($file_json, true);
foreach ($file as $coun... | true |
501cabb62e666f4a89b464469fe6f44810078445 | PHP | kittorjk/services | /app/Calibration.php | UTF-8 | 624 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Calibration extends Model
{
protected $fillable = ['id', 'user_id', 'device_id', 'date_in', 'date_out', 'detail', 'completed', 'created_at'];
public function files(){
//A record can have a certification document
return $this-... | true |
3f963d29263fe5885cf4770cf5daf65b73270cd7 | PHP | MhmdSaad72/Nab3 | /app/Company.php | UTF-8 | 1,784 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Company extends Model
{
use SoftDeletes;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'companies';
/**
* The database primary ... | true |
510c95234c2de694255da74754c83331b7bd0fde | PHP | ornicar/dmBitLyPlugin | /lib/dmBitLyApi.php | UTF-8 | 1,358 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
class dmBitLyApi
{
protected
$login,
$apiKey,
$browser,
$table;
public function __construct($login, $apiKey, dmWebBrowser $browser)
{
if(!$login || !$apiKey)
{
throw new dmException('You must provide a login and an api key in services.yml');
}
$this->login = $login;
$t... | true |
4f224165a93b0e086494c5330cba631e2900ded8 | PHP | MariXavier/Barzinho-Maneiro | /barzinho-maneiro/buscar-historico-pedido.php | UTF-8 | 1,236 | 2.78125 | 3 | [] | no_license | <?php
require_once 'classes/Pedido.php';
$data = $_POST["data"];
$pkFuncionario = $_POST["pk"];
$dataInicial = $data ." 00:00:01";
$dataFinal = $data ." 23:59:59";
$pedidoObj = new Pedido();
$listaPedidos = $pedidoObj -> listarHistoricoPedido($pkFuncionario, $dataInicial, $dataFinal);
$row = "";
if(sizeof($listaPed... | true |
240920af99851cae2ee2d94bce813b6d5a73ad19 | PHP | Ivanziken/Garsoft | /Modelo/Reportes/modelosV.php | UTF-8 | 677 | 2.546875 | 3 | [] | no_license | <?php
//require("Categoria.php");
class ModelosV{
public $idModelo;
public $Modelo_Auto;
public $Marca_Auto;
public $Total_Compras;
public function __construct(){
$idModelo=0;
$Modelo_Auto="";
$Marca_Auto="";
$Total_Compras="";
}
public function setidModelo... | true |
0c04619b8b2c8770201dd3fd0f83df2c160146a9 | PHP | nanjozy/myframe | /core/lib/Upload.php | UTF-8 | 2,169 | 2.703125 | 3 | [] | no_license | <?php
namespace core\lib;
class Upload
{
public function uploads($name)
{
$uni = uniqid();
$count = count($_FILES[$name]['name']);
$return = [];
$files = [];
for ($i = 0; $i < $count; $i++) {
$temp = $this->checkUp($name, $i);
if ($temp['code'] =... | true |
8393d79d3165262d902770b8b3173e07486c521b | PHP | nikmeyn/Web2-Project | /browse-posts.php | UTF-8 | 2,198 | 2.53125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Assign 1 (Winter 2018)</title>
<?php //taken from labs
include "includes/css.inc.php";
include "includes/db_config.inc.php";
$db = new PostsGateway($connection); ?>
</head>
<body>
<?php //taken from labs
include "includes/header.i... | true |
6ba077f851b6ce6added4be2bfb55741e6fb7369 | PHP | upadrian/uruguay-ci-checker | /check-uruguay-ci.php | UTF-8 | 931 | 3.140625 | 3 | [] | no_license | <?php
/**
* Checker for uruguayan ci
*
* @author upadrian@gmail.com
*
*/
class ci {
public static function getdc($ci) {
if (!is_numeric($ci))
return false;
$ci = str_pad($ci, 7, "0", STR_PAD_LEFT);
$ci = str_split($ci);
$control = array(
2,
... | true |
ddda5d7626daf706fd886274049c18a3073fed2e | PHP | wulanyyc/ggj | /components/MsaView.php | UTF-8 | 619 | 2.65625 | 3 | [] | no_license | <?php
namespace app\components;
use Yii;
use yii\base\Component;
class MsaView extends Component
{
/**
*
* @param object $obj 当前view对象
* @param string $url
* @param array $options
* @param string $key
*/
public static function registerJsFile($obj, $url, $options = [], $key = n... | true |
ffce59ed77beaf1b51dc4103224343f2961422ae | PHP | jakubbartel/keboola-xls2csv-processor | /src/Keboola/Xls2CsvProcessor/Xls.php | UTF-8 | 2,503 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Keboola\Xls2CsvProcessor;
use PhpOffice\PhpSpreadsheet;
use Keboola\Xls2CsvProcessor\Exception;
class Xls
{
/**
* @var string
*/
private $spreadsheetPath;
/**
* @var PhpSpreadsheet\Reader\Xls
*/
private $spreadsheetReader;
/**
* @var string
*/
... | true |
548f474201125010663b2673e8d444e53bc69cdb | PHP | amninderchahal/BookMySched | /appointment_system_api/app/Http/Controllers/AuthController.php | UTF-8 | 3,038 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Validator;
use App\Person;
use Illuminate\Http\Request;
class AuthController extends Controller
{
public function login(Request $request)
{
$user = Person::where('email', $request->input('email'))
->first()... | true |
5f6811cb9b508b725d1b63f5a365f9fd4c7b0cab | PHP | septIO/Euler | /151-200/[180] - Rational zeros of a function of three variables/index.php | UTF-8 | 746 | 3.265625 | 3 | [] | no_license | <?php
/**
For any integer n, consider the three functions
f1,n(x,y,z) = xn+1 + yn+1 − zn+1f2,n(x,y,z) = (xy + yz + zx)*(xn-1 + yn-1 − zn-1)f3,n(x,y,z) = xyz*(xn-2 + yn-2 − zn-2)
and their combination
fn(x,y,z) = f1,n(x,y,z) + f2,n(x,y,z) − f3,n(x,y,z)
We call (x,y,z) a golden triple of order k if x, y, and z are all ... | true |
ef36e4c8eb6780b39ea0dc43b35a56e4ab2fe732 | PHP | Sousx-Lab/blog | /views/admin/post/new.php | UTF-8 | 1,055 | 2.53125 | 3 | [] | no_license | <?php
use App\Db;
use App\Model\Post;
use App\HTML\Form;
use App\Table\PostTable;
use App\Validators\PostValidator;
use App\ObjectHelper;
use App\Table\CategoryTable;
use App\Auth;
Auth::check();
$title = "Créer un nouvel article";
$errors = [];
$post = new Post();
$pdo = Db::getPDO();
$categoryTable = new CategoryT... | true |
646d07d77e6e18e41805359a3f8517733264918a | PHP | arielledav3/Contact-Book-in-PhP | /controllers/names.php | UTF-8 | 913 | 2.546875 | 3 | [] | no_license | <?php
class Names extends CI_Controller{
function __construct(){
parent::__construct();
$this->load->library(array('ion_auth','form_validation'));
$this->load->helper(array('url','language'));
$this->lang->load('auth');
$this->load->model('delete_names');
}
// Function to Fetch selected record from database.
func... | true |
67e88c77e4ede6fe0964f8c21b40ca5f587d8f13 | PHP | slepic/PhpX | /src/Math/Integer/PrimeFactorization/PrimeFactors.php | UTF-8 | 631 | 3.109375 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace PhpX\Math\Integer\PrimeFactorization;
use ArrayIterator;
class PrimeFactors implements
PrimeFactorsBuilderInterface,
PrimeFactorsBuilderFactoryInterface
{
private $factors = [];
public function add(int $prime): void
{
if (isset($this->factors[$prime])) {
++$th... | true |
4cc1f91ce864addf40e1d709a03f9c504c486aa3 | PHP | geoff-winner/325_library | /src/Patron.php | UTF-8 | 3,914 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
$DB = new PDO('pgsql:host=localhost;dbname=library');
/**
* @backupGlobals disabled
* $backupStaticAttribute disabled
*/
require_once __DIR__."/../src/Copy.php";
require_once __DIR__."/../src/Patron.php";
class Patron
{
private $first_last;
private $phone;
... | true |
c6c2a5264b9255a95506cc4e0fc6f4b4af858d65 | PHP | NguyenTheSon/dtdd | /app/Http/Requests/LapHDRequest.php | UTF-8 | 804 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class LapHDRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize() {
return TRUE;
}
/**
* Get the validation rules tha... | true |
1ca3aa3862ad1918cc25557e7d051849c8a197fc | PHP | reandimo/WooCommerce-Mail-Reminder | /includes/meta-box/inc/field-registry.php | UTF-8 | 1,671 | 2.984375 | 3 | [
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
/**
* A registry for storing all fields.
*
* @link https://designpatternsphp.readthedocs.io/en/latest/Structural/Registry/README.html
*/
class RWMB_Field_Registry {
private $data = [];
/**
* Add a single field to the registry.
*
* @param array $field Field configuration.
* @param string $typ... | true |
c0dfda0e39896698c714597374f237c8adba2524 | PHP | Hammana-Charif/DeckBuilder | /src/Entity/Card/CardInterface.php | UTF-8 | 576 | 3.046875 | 3 | [] | no_license | <?php
namespace DeckBuilder\Entity\Card;
interface CardInterface
{
/**
* @return int
*/
public function getId(): int;
/**
* @return string
*/
public function getName(): string;
/**
* @return string
*/
public function getPicture(): string;
/**
* @para... | true |
e285e3a280649d92da601e465b8c40ceef439a50 | PHP | curtisai/CS546WebProgramming | /AssignmentFive/login.php | UTF-8 | 977 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Assignment 5: Better Blog</title>
<script>
function validateForm() {
var x = document.forms["loginPage"]["username"].value;
var y = document.forms["loginPage"]["password"].value;
if (x == null || x == "" || y == null || y == "") {
alert("Login info must be filled out bot... | true |
787e98dfa01ff7e8ba04ca2edfac73f53033a6b3 | PHP | Bruno-Sil/htdocs | /funcoes/exemplo-03.php | UTF-8 | 198 | 3.21875 | 3 | [] | no_license | <?php
function ola($texto = "Mundo", $periodo = "Bom dia"){
return "Ola $texto $periodo<br>";
}
echo ola("Bruno", "Bom dia");
echo ola("Tiago", "Boa tarde");
echo ola("Lucas", "Boa noite");
?> | true |
512899ddb092b0d27f5aa74f84e49033de03cd95 | PHP | bensteffen/flexapi | /accesscontrol/Guard.php | UTF-8 | 1,556 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__ . '/../../../autoload.php';
abstract class Guard {
protected $protectDataModel;
protected $verificationService = null;
protected $username = null;
protected $userAccessLevel = null;
public function getUsername() {
return $this->username;
}
public function ad... | true |
d14845f8fe562739c1def88e479ac83bfe341765 | PHP | kplian/sis_mantenimientoV2 | /control/ACTFalla.php | UTF-8 | 1,301 | 2.5625 | 3 | [] | no_license | <?php
/**
*@package pXP
*@file gen-ACTFalla.php
*@author (rac)
*@date 21-08-2012 20:44:06
*@description Clase que recibe los parametros enviados por la vista para mandar a la capa de Modelo
*/
class ACTFalla extends ACTbase{
function listarFalla(){
$this->objParam->defecto('ordenacion','id_falla');
$thi... | true |
f53a9ffd1cc47121f925d6a112c42e2ffee455f6 | PHP | charleeo/ispaceshopingcart | /view_payment.php | UTF-8 | 1,356 | 2.578125 | 3 | [] | no_license | <?php
require_once('./config/Database.php');
require_once('query/GetData.php');
require_once('./config/confi.php');
$model = new Models();
$paymentHostory = $model->getPaymentHistory();
include('includes/head.php');
include('includes/navbar.php');
?>
<section class="mt-5 px-5">
<table class="table table-stripped tabl... | true |
d7e1bc9b5a7c4c8dd5642fd32f97b0ead80f4dc4 | PHP | PavelMatulik/Maugliovina | /src/sites/calculator.php | UTF-8 | 1,172 | 2.671875 | 3 | [] | no_license | <?php
use Nette\Utils\Json;
include_once './vendor/autoload.php';
\Tracy\Debugger::enable(\Tracy\Debugger::DEVELOPMENT);
\Tracy\Debugger::detectDebugMode(true);
$content = file_get_contents('https://jsonplaceholder.typicode.com/photos');
$decoded = Json::decode($content, Json::FORCE_ARRAY);
... | true |
29437aeff1af6f8984470d358d074337beddc949 | PHP | jazdian/iisi | /adm_build/sis_config/DataAccess.php | UTF-8 | 3,746 | 2.796875 | 3 | [] | no_license | <?php
/**
* Description of classExecMysql
*
* @author gesfor.rgonzalez
*/
class DataAccess
{
private $respConn = null;
private $jsonparameters = null;
/**
*
* @param type object PDO connection. The control Conecction.php return a object with the object connection.
* $obj_cn = new Connection('... | true |
024896cb433d37638e7d5a4bf7c9bf1971a24a2d | PHP | zysunGithub/pmsadmin | /application/controllers/PurchaseForecastList.php | UTF-8 | 4,407 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/*
* It is used for the Web Controller, extending CIController.
* The name of the class must have first Character as Capital.
*
**/
class PurchaseForecastList extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('session');
$this->load->library('Pager');
... | true |
8d7580fa599a3ca50f16b13ca7199f5bfd3b3432 | PHP | anhphambkit/cms | /plugins/review/src/Repositories/Caches/CacheReviewCommentRepositories.php | UTF-8 | 739 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Plugins\Review\Repositories\Caches;
use Core\Master\Repositories\Cache\CacheAbstractDecorator;
use Plugins\Review\Repositories\Interfaces\ReviewCommentRepositories;
class CacheReviewCommentRepositories extends CacheAbstractDecorator implements ReviewCommentRepositories
{
/**
* @var Application... | true |
c06dffd3b34640cf8aaa8b60a1d15d44250d3403 | PHP | man780/wtch | /models/Users.php | UTF-8 | 2,063 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "sd_users".
*
* @property integer $id
* @property string $login
* @property string $pass
* @property integer $is_active
* @property integer $role
* @property integer $id_unit
* @property string $name
* @property string $fname
* @... | true |
59ed287b8553fd691d69ee7e0db31f61f7c91113 | PHP | plepe/modulekit-form | /inc/form_element_date.php | UTF-8 | 2,375 | 2.578125 | 3 | [] | no_license | <?php
$form_element_type_alias['date']='date';
$form_element_type_alias['datetime']='date';
$form_element_type_alias['datetime-local']='date';
$form_element_date_display_format=array(
'date'=>"j.n.Y",
'datetime'=>"j.n.Y G:i:s P",
'datetime-local'=>"j.n.Y G:i:s",
);
$form_element_date_value_format=array(
'date'... | true |
d98353072169547bfbf5be5b5a32d027dfe2f8fb | PHP | renrew/tutorials | /Php/Variable/Zusammengesetzte Variable ausgeben.php | UTF-8 | 73 | 2.71875 | 3 | [] | no_license | <?php
$name = "Mareine";
echo "Mein Name ist <br>".$name." Petermann";
?> | true |
3bb3c461fcea61b771d8e0017bac91a2651a21f2 | PHP | mapco/MAPCO | /APIs/shop/OrderNetPriceCorrection.php | UTF-8 | 3,059 | 2.515625 | 3 | [] | no_license | <?php
$required=array("orderid" => "numericNN");
check_man_params($required);
$orders = array();
//GET Order
$res_order = q("SELECT * FROM shop_orders WHERE id_order = ".$_POST["orderid"], $dbshop, __FILE__, __LINE__);
if (mysqli_num_rows($res_order)==0)
{
show_error(9762, 7, __FILE__, __LINE__, "OrderI... | true |
e5083e630cba4a6773bb751cb3ed2325816d22c7 | PHP | atompulse/atompulse | /src/Atompulse/Component/Data/Sort.php | UTF-8 | 3,788 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Atompulse\Component\Data;
/**
* Class Sort
* Sort complex array structures by inner data
* @package Atompulse\Component\Data
*
* @author Petru Cojocar <petru.cojocar@gmail.com>
*/
class Sort
{
/**
* Optimized callback ready bubble sort
* @param array $list
* @param callable|bo... | true |
256d83855efb31c0bbfd684c65947a10ade8f672 | PHP | Mahi0027/foodies | /application/controllers/admin/Dashboard.php | UTF-8 | 2,448 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dashboard extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->database();
$this->load->model("Common_model");
$this->load->library('form_validation');
$this->load->library("session"); ... | true |
a36d55fe159b04ec1f599c4d269d184b768836d7 | PHP | caiogottmann/tcc | /application/libraries/my_phpmailer.php | UTF-8 | 2,304 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class My_PHPMailer {
//MY_ para informar ao framework de que se trata de uma classe customizada, ou seja, não faz parte do framework. Pode ser alterada no arquivo config.php em application/config/
public function My_PHPMailer() {
... | true |
e323dd5bde268721d62a0fa2497d33ffcbd18df6 | PHP | amostergaard/reddit-clone | /assignment/database/seeds/ProfilesTableSeeder.php | UTF-8 | 891 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Alex Madsen
*
* @date November 6, 2018
*/
use Illuminate\Database\Seeder;
class ProfilesTableSeeder extends Seeder
{
/**
* NOTE: Known this is a bad code smell... Maybe this is the least evil to seed
* unique user handles?
*/
public static $names = [
'JaneDoe',... | true |
8538857131936f2bb87829975ab69e1e1a7e3644 | PHP | ramadhanii/flip-test | /disburse.php | UTF-8 | 1,488 | 2.546875 | 3 | [] | no_license | <?php
// set response content as json
header("content-type:application/json");
require_once "./CONFIG.php";
require_once "./database.php";
require_once "./curl-helper.php";
// collect request data
$bank_code = strtolower($_POST['bank_code'] ?? "");
$account_number = strtolower($_POST['account_number'] ?? "");
$a... | true |
8759b00cc362919679a76b691995d5476351502f | PHP | TefaGR2810/php_basico_2242753 | /routes/web.php | UTF-8 | 1,947 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the Route... | true |
e1ebfa50f159f07440a2088d623622d0d977c6ce | PHP | phoenixsearch/phoenixsearch | /src/helpers/Highlighter.php | UTF-8 | 946 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace pheonixsearch\helpers;
use pheonixsearch\core\Core;
use pheonixsearch\types\IndexInterface;
class Highlighter
{
public static function highlight(Core $core, array $resultArray, string $phrase): array
{
if (true === $core->highlight) {
$replacement = $core->preTags . $phra... | true |
e0d1f806d300d2139dbc84b988fda6deae6616f5 | PHP | galloaleonardo/news-blog | /app/Services/SeoMagazineService.php | UTF-8 | 1,118 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Exceptions\ImageUploadFailedException;
use App\Helpers\Helper;
use App\Repositories\SeoMagazineRepository;
class SeoMagazineService
{
public function __construct(
private SeoMagazineRepository $repository,
private ImageService $image
) {}
public func... | true |
080169f8df210bdb340e173fcace2189f12799ab | PHP | thienle75/VSASoccer | /database/migrations/2015_07_11_152059_assists_table.php | UTF-8 | 719 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AssistsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('assists', function (Blueprint $table) {
$table->... | true |
91c6f8ac115cfb5c628267ec921eb17cc0093948 | PHP | Develearning/toplearning | /app/KPI.php | UTF-8 | 2,180 | 2.671875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* App\KPI
*
* @property int $id
* @property string $user_code
* @property int $year
* @property string|null $quarter_1
* @property string|null $quarter_2
* @property string|null $quarter_3
* @property string|null $quarter_4
* @property string... | true |
4972d271b917a25b05ebf33daf2542d8e8751702 | PHP | caloloc2/dispensador_pwm | /php/funciones.php | UTF-8 | 303 | 2.609375 | 3 | [] | no_license | <?php
function Escribe($dato){
$dato = $dato['horario1']."/".$dato['horario2']."/".$dato['horario3'];
$fp = fopen("../horarios.rasp", "w");
fputs($fp, $dato);
fclose($fp);
return true;
}
function Lee(){
$fp = fopen("../horarios.rasp", "r");
$dato = fgets($fp);
fclose($fp);
return $dato;
} | true |
fa41855f50922bb2289f6d1573200ecbdb2fb752 | PHP | alexandrecorroy/Todolist | /src/AppBundle/Service/Mailer.php | UTF-8 | 1,643 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* TodoList Project
*
* (c) CORROY Alexandre <alexandre.corroy@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AppBundle\Service;
use AppBundle\Entity\Interfaces\UserInterf... | true |
e9cec22388c24e3817e7d0f5fb7a1122187df91d | PHP | the-old-goose/FinalYearProject | /RHFiles/application/controllers/api/User.php | UTF-8 | 2,932 | 2.890625 | 3 | [] | no_license | <?php
use Restserver\Libraries\REST_Controller;
defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH . 'libraries/REST_Controller.php';
require APPPATH . 'libraries/Format.php';
/**
* This Controller carries out the logic for the User API. It extends the Rest Controller handling HTTP GET... | true |
a1baceb6662409456f1d5a3f183b528977b3cabc | PHP | LisaCap/boutique | /index.php | UTF-8 | 4,332 | 2.53125 | 3 | [] | no_license | <?php
//ici on appelle notre connexion à la BDD//////////////
include("inc/init.inc.php");
///////////////////////////////////////////////////////
//ON APPELLE ICI LE HEADER ET LE MENU//////////////////
include("inc/header.inc.php");
include("inc/nav.inc.php");
?>
<div class="container">
<div class="col-sm-12... | true |
a5c73e3e1baacf91c86b52f74ff80b16ab27362f | PHP | sounboul/sim-promotion-2021 | /src/Form/Manager/Module/TableManager.php | UTF-8 | 5,976 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Form\Manager\Module;
use App\Entity\Module\Table\Cell;
use App\Entity\Module\Table\Col;
use App\Entity\Module\Table\Table;
use App\Entity\Core\Website;
use Doctrine\ORM\EntityManagerInterface;
/**
* TableManager
*
* Manage admin Table form
*
* @property EntityManagerInterface $entityManager
... | true |
ea431d988af9f9c76f22a0fca30c48daf02d8720 | PHP | Andrey2K17/todo-list | /app/Http/Controllers/TaskController.php | UTF-8 | 3,761 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Performer;
use App\PerformerAction;
use App\Task;
use Illuminate\Http\Request;
class TaskController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$t... | true |
b99e3eb3c372b650950dfc88f9ae413dcedceeb6 | PHP | LingdianIT-Com/swoole-crontab | /src/center/Lib/Flog.php | UTF-8 | 1,112 | 2.6875 | 3 | [] | no_license | <?php
/**
* 记录运行日志
* Created by PhpStorm.
* User: liuzhiming
* Date: 16-8-19
* Time: 上午10:33
*/
namespace Lib;
class Flog
{
private static $request_name = -1;
private static $request_id = -1;
private static $key = "master";
public static function startLog($request_name, $key = "master")
{... | true |
445e499f8990512e2c12d755e920805967878038 | PHP | arabyalhomsi/arabyalhomsi-blog | /database/seeds/DatabaseSeeder.php | UTF-8 | 1,537 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// create a user
DB::table('users')->insert([
'name' => 'arabyalhoms... | true |
39bf18520ad06d36865fa8684d0604ccf99f3e97 | PHP | robo47/BlazeFramework | /src/blaze/persistence/meta/CollectionFieldDescriptor.php | UTF-8 | 4,428 | 2.59375 | 3 | [] | no_license | <?php
namespace blaze\persistence\meta;
/**
* Description of PropertyDescriptor
*
* @author Christian Beikov
* @license http://www.opensource.org/licenses/gpl-3.0.html GPL
* @since 1.0
*/
class CollectionFieldDescriptor extends \blaze\lang\Object {
/**
*
* @var blaze\persistence\meta\Singl... | true |
d80aca90425b2e189337759de4110bf96641fedf | PHP | haraujo83/meucrm | /database/migrations/2021_08_18_204242_alter_fields.php | UTF-8 | 1,056 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
*
*/
class AlterFields extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
Schema::table('fields... | true |
6bdfb247aeee93cdd15f8c44e0fd8f10ece7d640 | PHP | psoders/KunstmaanSentryBundle | /Raven/Raven.php | UTF-8 | 987 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Kunstmaan\SentryBundle\Raven;
use Raven_Client;
use Symfony\Component\HttpKernel\Kernel;
/**
* Raven
*/
class Raven extends Raven_Client
{
/**
* @var string
*/
private $environment;
/**
* @param string $dsn The dsn
* @param string $environment The environmen... | true |
09dcaefe9711a7f2a31a33cb4d3ea13b2d1219ca | PHP | sirpaul/itc240-fl15-retro | /movie_view.php | UTF-8 | 2,305 | 2.75 | 3 | [] | no_license | <?php include 'includes/config.php';
//customer_view.php
//shows details of a single customer
?>
<?php
//process query string here
if(isset($_GET['id']))
{//if there is data, process data
//cast the data to an integer for security purposes
$id = (int)$_GET['id'];
}else {//redirect to safe page
//this is ... | true |
be1a2d98d4783e81636789eaf876e27b7a6d68f7 | PHP | alex-dna/silverstripe-framework | /src/Dev/State/SapphireTestState.php | UTF-8 | 1,440 | 2.8125 | 3 | [
"BSD-3-Clause",
"CC-BY-3.0"
] | permissive | <?php
namespace SilverStripe\Dev\State;
use SilverStripe\Core\Injector\Injectable;
use SilverStripe\Dev\SapphireTest;
class SapphireTestState implements TestState
{
use Injectable;
/**
* @var TestState[]
*/
protected $states = [];
/**
* @return TestState[]
*/
public function... | true |
8fb48836ebbcc635d338a0f7e24005bf319d241a | PHP | sunkinglsx/CAI_V2 | /homework_copy_operate.php | GB18030 | 1,837 | 2.546875 | 3 | [] | no_license | <?php
require("session.php");
require("db_connect.php");
mysql_query("SET NAMES 'gb2312'"); //ĵһ
require("term.php");
//$couid=$_GET['couid']; //γ̺
if(isset($_POST['button'])) //Ƶƽа༶ͬſγ
{
$work_id=array();
if(isset($_POST['se']))
{
foreach($_POST['se'] as $k)
{
if($k!="")
{
array_push(... | true |
b89b1bfeabe6e65a983378d6fdc2c5cc6d8a483f | PHP | maisner/media-center | /app/Service/Storage/ThumbImageStorage/ThumbImageCacheStorage.php | UTF-8 | 1,310 | 2.953125 | 3 | [] | no_license | <?php
namespace MediaCenter\Storage\ThumbImageStorage;
use MediaCenter\Image\ThumbImage;
use Nette\Caching\Cache;
use Nette\Caching\IStorage;
use Nette\Utils\ArrayList;
class ThumbImageCacheStorage implements IThumbImageStorage {
const CACHE_NAMESPACE = 'image-thumb';
/** @var Cache */
protected $cache;
/**
... | true |
5f660576aa49a552bb15177c5551332b4a27e008 | PHP | tamasimrei/add-rest | /src/AddRest/Services/AddressService.php | UTF-8 | 1,216 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Tamas Imrei <tamas.imrei@gmail.com>
*/
namespace Imrei\AddRest\Services;
use Imrei\AddRest\Model\Entity\Address;
use Imrei\AddRest\Model\Repository\AddressRepository;
/**
* Serving different Address handling purposes
*/
class AddressService
{
/**
* @var AddressRepository
*/
... | true |
b99c1a9334417be78ac63988f31acc75668eec11 | PHP | kloudltd/WHMCS-7.8.0-decoded | /modules/gateways/bp/lib/BitPay.php | UTF-8 | 3,084 | 2.578125 | 3 | [] | no_license | <?php
/*
* @ PHP 5.6
* @ Decoder version : 1.0.0.1
* @ Release on : 24.03.2018
* @ Website : http://EasyToYou.eu
*/
namespace WHMCS\Module\Gateway\BP;
class BitPay
{
protected $params = array();
public function __construct(array $params)
{
$this->params = $params;
if (empty($params... | true |