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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a4224884754877dde539fb56ed675168bee31fb9 | PHP | weeloh/trampos | /classes/Ramo.php | UTF-8 | 1,867 | 2.859375 | 3 | [] | no_license | <?php
class Ramo
{
public $Identificador;
public $Descricao;
public $Ativo;
public function Inserir() {
$vSql = "INSERT INTO Ramo(Descricao, Ativo) VALUES ('". $this->Descricao ."','". $this->Ativo ."')";
$vResultado = pg_query($vSql);
$qtRegistros = pg_num_rows($vResultado);
if ($qtRegistros == 0)... | true |
5b200d3b1b944c197ebc8bf33ff58c62363efcd4 | PHP | chgk/chgkdb-api | /src/Dto/SearchQueryDtoInterface.php | UTF-8 | 284 | 2.875 | 3 | [] | no_license | <?php
namespace App\Dto;
/**
* Interface SearchQueryDtoInterface
*/
interface SearchQueryDtoInterface
{
/**
* @return string
*/
public function getQuery() : string;
/**
* @param string $query
*/
public function setQuery(string $query): void;
} | true |
ee5971c1d093138e4bdd22feef9fdf58bc5749f1 | PHP | aabsharpasha/ppass | /application/admin/models/User.php | UTF-8 | 877 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class User extends CI_Model {
function __construct() {
parent::__construct();
}
function login($user_name,$password){
$this->db->select('*');
$this->db->from('users');
$this->db->where('user_name', $user_name);... | true |
b49ab2caf4143590b814a4fa21293e919f5c1c44 | PHP | kevinliposl/ProyectoGestion | /data/UniversityData.php | UTF-8 | 3,382 | 2.9375 | 3 | [] | no_license | <?php
class UniversityData {
private $db;
function __construct() {
require_once 'SPDO.php';
$this->db = SPDO::singleton();
}
function insert(University $university) {
$queryLastId = $this->db->prepare("SELECT MAX(universityid) AS universityid FROM tbuniversity");
$qu... | true |
24b701365df000a61006725eb374f227aac59b84 | PHP | duongko/project2 | /Bài tập D (String)/d8.php | UTF-8 | 1,145 | 3.296875 | 3 | [] | no_license | <?php
$s1 = '';
$s2='';
//nhận xâu nhập vào
if (isset($_POST['a'])) {
$s1 = $_POST['a'];
}
if (isset($_POST['b'])) {
$s2 = $_POST['b'];
}
?>
<!-- // Form nhập -->
<form action="#" method="post">
<table>
<tr>
<td>Nhập xâu S1: </td>
<td><input type="text" name="a" value="<?= ... | true |
49f8dc2c2f92aab2de571449ea25c75dfe545cf3 | PHP | igmoweb/Founderscores | /foundation.php | UTF-8 | 2,057 | 2.640625 | 3 | [] | no_license | <?php
/**
* Functions to make Underscores work with Foundation
*/
function _s_foundation_scripts() {
wp_enqueue_script( '_s-foundation', get_template_directory_uri() . '/js/foundation.js', array( 'jquery' ), '20130115' );
wp_enqueue_script( '_s-app', get_template_directory_uri() . '/js/app.js', array( 'jquery' ), ... | true |
6d7c448b9d2b942b0223554d40bcf777e650de22 | PHP | miraino-katachi/php_practice_exercise | /解答/07/07-4/q-1/3/IMailer.php | UTF-8 | 301 | 2.828125 | 3 | [] | no_license | <?php
/**
* Mailerインターフェイス
*/
interface IMailer
{
/**
* メールを送信します。
*
* @return void
*/
public function sendMail();
/**
* メールを受信します。
*
* @return void
*/
public function receiveMail();
}
| true |
d9d2917cdf9b11637637e4e7b85bbc718c82104f | PHP | webgig/bigc-laravel | /app/Http/Controllers/CustomerDetailsController.php | UTF-8 | 795 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Routing\Controller as BaseController;
use \App\Services\ICustomerService as CustomerService;
class CustomerDetailsController extends BaseController
{
private $_customerService;
public function __construct(CustomerService $customerService)
{
... | true |
7c2030812f303f1a78aac6e190fe8c4e222b3056 | PHP | tegarsatya/project_website | /application/controllers/admin/Struktur.php | UTF-8 | 5,816 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Struktur extends CI_Controller {
// Load database
public function __construct() {
parent::__construct();
$this->load->model('struktur_model');
}
// menampilkan data/listing
public function index()
{
$struktur = $this->struktur_m... | true |
929ba73d4ab6427f15505bc0030acf14eabbff4a | PHP | tronsha/testphp | /tests/FunctionArrayColumnTest.php | UTF-8 | 1,376 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class FunctionArrayColumnTest
* @link http://php.net/manual/en/function.array-column.php
*/
class FunctionArrayColumnTest extends PHPUnit_Framework_TestCase
{
/**
* @requires PHP 5.5
*/
public function testFunctionArrayColumn()
{
if (version_compare(phpversion(), '5.5.0', '... | true |
d1cab74822d2aad5fb3f9c2cd9e0fe980043839e | PHP | cash2one/cj | /trunk/framework/service.php | UTF-8 | 10,481 | 2.984375 | 3 | [] | no_license | <?php
/**
* service
*
* $Author$
* $Id$
*/
class service {
/**
* 全局true
*/
const GLOBAL_TRUE = 1;
/**
* 全局false
*/
const GLOBAL_FALSE = 2;
/**
* _instances
* service对象集合
*
* @var object
*/
static private $_instances = array();
// 扩展方法类实例
static private $_sub_instances = array();... | true |
5cff43b23d0de97023c73a02da6a22477c321c31 | PHP | AhmedAlKharraz/techdegree-project-6 | /tests/ListingBasicTest.php | UTF-8 | 2,180 | 3.125 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
class ListingBasicTest extends TestCase
{
/** @test */
public function dataIsSet(){
$this->expectException(Exception::class);
$listing = new ListingBasic($data);
}
/** @test */
function idIsSet()
{
$this->expectException(Excepti... | true |
1d3c9f7772d14fe75b4df879f053aa1d66304aa7 | PHP | code-way/mxEditor | /php/examples/backend.php | UTF-8 | 1,273 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright (c) 2006, Gaudenz Alder
*/
include_once("../src/mxServer.php");
/**
* Creates a graph using the API and returns the XML.
*/
function createGraph()
{
$id = $_GET["id"];
error_log("Requested id=".$id);
// Creates the graph on the server-side
$graph = new mxGraph();
$model = $graph->getMo... | true |
034472b56d9042311fbd2898c799a89335c714b4 | PHP | ivankia/exilla-old | /app/Commands/Orderbook.php | UTF-8 | 17,625 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Commands;
use LaravelZero\Framework\Commands\Command;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Output\OutputInterface;
class Orderbook extends Command
{
/**
* The signature of the command.
* ./exilla orderbook:get --pf=8000 --pt=115... | true |
1dfb43636a358a4eccf5b60443ddcb436f463110 | PHP | natac13/PHP-Advanced | /file_pointer.php | UTF-8 | 521 | 3.203125 | 3 | [] | no_license | <?php
$file = 'filetest.txt';
if($handle = fopen($file, 'w')) {
fwrite($handle, "123\n456\n789\n");
$pos = ftell($handle);
// When I move around the pointer it will overwrite anything that was
// there already no matter what the mode. However only works with 'r', or
// 'w', either + or normal versi... | true |
5870de06647cc3b600f8a1f79450793fd5b127af | PHP | OmegaVersion/shadow | /VarExport/VarExport.class.php | UTF-8 | 2,888 | 3.484375 | 3 | [] | no_license | <?php
/**
* 代码生成器
*
* 将普通的变量,转化为可以直接引用的PHP代码
*
* @author monkee
*/
class VarExport
{
const TAB = " "; //TAB键的定义,可以定义为四个空格。如果考虑效率,可以定义为空。
/**
* 要进行转义的字符串集合
*
* @var array
*/
static private $escape = array(
"\\" => "\\\\",
"\t" => "\\t",
"\n" => "\\n",
"\r" => "\\r",
"\"" => "\\\"",
"\'... | true |
c3a1aec63874bb4d0aeef39a76960bc74bbc80c7 | PHP | MrsSimpson/gamersStore.411 | /customer_interface.php | UTF-8 | 2,386 | 2.796875 | 3 | [] | no_license | <?php
session_start();
include '/Users/LacyD/PhpstormProjects/untitled/gamersStore_dbConnection.php';
?>
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<link rel="stylesheet" href="menuStyle.css">
<meta charset="UTF-8">
<title>Gamer's Store Admin</title>
</head>
<body>
<h1>GAMER'S STORE CUSTOMER</h1>
<di... | true |
e3ee635e419f8aec92b9816a040af484a2f1be2a | PHP | soutoner/api-desconecta | /app/Models/BaseModel.php | UTF-8 | 3,443 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Models;
use Phalcon\Mvc\Model;
use Phalcon\Mvc\Model\Behavior\Timestampable;
use App\Exceptions\ResourceNotFoundException;
class BaseModel extends Model
{
public $created_at;
public $updated_at;
public function initialize()
{
$this->addBehavior(
new Timestam... | true |
77c3d3ec37175e696d79ad98ff2d87ee42bf6ecf | PHP | grilao/1_image_system | /app/Http/Controllers/TemplateController.php | UTF-8 | 2,806 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Template;
use App\Http\Requests\Template\StoreFormRequest;
class TemplateController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$th... | true |
1da2d44b7fcd967746a52b15560dca16e296bfda | PHP | rgattermann/prova-refactoring | /src/Tests/Model/CabecalhoTest.php | UTF-8 | 906 | 2.75 | 3 | [] | no_license | <?php
namespace Unipago\Tests\Model;
use Unipago\Model\Cabecalho;
use PHPUnit\Framework\TestCase;
class CabecalhoTest extends TestCase
{
private function criarObjetoPadrao()
{
$cabecalho = new Cabecalho;
$cabecalho->setEmpresa('Empresa do Juca Bala')
->setBanco('Banco do Pei... | true |
6fb328ccebb9dc7db793d6a5cb599466032e0221 | PHP | bridgeindia/zend2-test-project | /module/Admin/codeReviewDec-Sethu/src/Admin/Model/MessagesTable.php | UTF-8 | 2,748 | 2.859375 | 3 | [] | no_license | <?php
namespace Admin\Model;
use Zend\Db\TableGateway\TableGateway;
use Zend\Db\Sql\Select;
use Zend\Db\Sql\Insert;
use Zend\Db\Sql\Where;
use Zend\Db\Sql\Sql;
use Zend\Db\Adapter\Adpater;
use Admin\Model\Messages;
class MessagesTable
{
protected $tableGateway;
public function __construct(TableGateway $ta... | true |
aa2d14cf81c1e20716ea9d7813c2209087ce560d | PHP | juanmaramiro92/daw2.2-juanmaramiro | /004-AdivinaElNumero/adivinaElNumero.php | UTF-8 | 1,174 | 3.125 | 3 | [] | no_license | <?php
if (!isset($_REQUEST["intento"])) {
$_REQUEST['oculto'] = $_REQUEST["numero"];
$resultado = "¡Buena suerte!";
} else if ($_REQUEST["intento"] > $_REQUEST["oculto"]) {
$resultado = "El número del Jugador 1 es más pequeño";
} else if ($_REQUEST["intento"] < $_REQUEST["oculto"]) {
$resultado... | true |
7f70fa1510e6bb190e1b0c5266fe9576ae0ead48 | PHP | rod-p-v/LanguagesSurveyPhp | /survey.php | UTF-8 | 937 | 2.953125 | 3 | [] | no_license | <?php
include 'db.php';
class survey extends DB{
private $totalVotes;
private $optionSelected;
public function setOptionSelected($option){
$this->optionSelected = $option;
}
public function getOptionSelected(){
return $this->optionSelected;
}
public function vote(){
$query=$this->... | true |
f0e7ade98eadf3ff96252aee1bc307ed1b91f7b7 | PHP | EdmaghHasna/Site_Web_E-commerce_Projet | /code_source/login_signup.php | UTF-8 | 6,095 | 2.78125 | 3 | [] | no_license | <?php
if(!isset($_SESSION))
{
session_start();
}
require('config.php');
if (isset($_POST['reg_user'])){
if (isset($_REQUEST['Username'], $_REQUEST['Email'], $_REQUEST['Password'], $_REQUEST['Phone']))
{
if (testMail( $_REQUEST['Email'])===true )
{
$username = $_REQUEST['Username'] ;
$email = $_REQUE... | true |
887cf782d518e30a6fc6aa32604d508a6bc96ac5 | PHP | dgerena/SSL2014JUNE | /Labs/lab4/api.php | UTF-8 | 1,906 | 2.609375 | 3 | [] | no_license | <?php
if(isset($_GET['weather'])){
// first i need the info in a url then i need to use the lat long to get the correct location.
$response = file_get_contents("http://api.openweathermap.org/data/2.5/weather?q=".$_GET['weather']);
$response=json_decode($response, true);
}
$direction = $response['wind']['deg'];
swit... | true |
0761603177cdf632b636f6415f69343d85c0a5a4 | PHP | kso6dev/PHP_MySQL | /tests/generators/FileReader.php | UTF-8 | 1,065 | 3.5625 | 4 | [] | no_license | <?php
class FileReader implements Iterator
{
protected $file;
protected $currentLine;
protected $currentKey;
public function __construct($file)
{
if (!$this->file = fopen($file, 'r'))
{
throw new RuntimeException('Impossible d\'ouvrir le fichier "' . $file . '"');
... | true |
791fcdd5a337fd085db82e5db6ef1ff91835f32f | PHP | atozsites/auto-comments | /src/CommentIQ/Subscriber/AutomatedatozsitesCommentSubscriber.php | UTF-8 | 5,457 | 2.53125 | 3 | [] | no_license | <?php
class CommentIQ_Subscriber_AutomatedatozsitesCommentSubscriber implements CommentIQ_EventManagement_SubscriberInterface
{
/**
* The post meta key used to store whether the post has disabled automatic insertion
* of the atozsites comment or not.
*
* @var string
*/
private $disabl... | true |
0206d9c2761f3ed4852019a942011164afa0baa0 | PHP | davidchavalarias/community | /innovatives_graph.php | UTF-8 | 10,295 | 2.71875 | 3 | [] | no_license | <?php
echo '<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>';
/*
* Génère le gexf bipartite des noeud1 et 2 à partir de la base sqlite
*/
include("csv2generic_param.php");
include("../common/library/fonctions_php.php");
$gexf = '<?xml version="1.0" encoding="UTF-8"?>';
$base = new PDO("sqlite:... | true |
e3121de93c16eb4ec189f5de5bee5b9752dc2587 | PHP | anuradhawick/hackoverflow | /database/migrations/2016_03_29_185221_create_otherevents_table.php | UTF-8 | 863 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
class CreateOthereventsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('other_event... | true |
b8488ef36e0efe5625f33fa59ebbfe9283ce64aa | PHP | lbc2247117/test | /project/bsce/ThinkPHP/Library/Vendor/phpExcel/ExcelAssistant.php | UTF-8 | 3,116 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Excel助手
* @author B.Maru 2015-08-30
*/
class ExcelAssistant {
private $carr = array(); //结果数组,初始值为A
private $curlet = 'A'; //当前末尾字母,初始化为A
private $curletpi = 0; //当前字符串从右向左的位数,用来上位递归加1处理(从0开始)
private $tmpar = array('A'); //临时数组,存储结果字符串上每位的字符。初始值为'A'
private static $a = ... | true |
6d942910c0a009c488756e23a9718f349b187ec6 | PHP | trunghlt/Vietnamwiki | /vnwk-admin/class_user.php | UTF-8 | 1,578 | 2.734375 | 3 | [] | no_license | <?php
include("db.php");
class user{
protected $re = NULL;
//show user
function show_user($command=""){
$arr = array();
if($command == "")
{
$sql = "select id,username,password,level,ban_user,email from users";
$this->re = mysql_query($sql) or die(mysql_error());
while($row = ... | true |
de1d12cb0cf0815f2ba32f07e53e2fad054f3db5 | PHP | AlejandroNarvaez/caso-4-A171277 | /server.php | UTF-8 | 2,756 | 2.671875 | 3 | [] | no_license | <?php
class Motos
{
public function showData()
{
$dataset="";
$conn = new mysqli("localhost", "id17824793_root", "HardCore23!123", "id17824793_motos");
$sql = "SELECT * FROM motos ORDER BY id ASC";
$result = $conn->query($sql);
if($result->num_rows > 0){
... | true |
e4b6d405d8752c8407956741a421faadb23dfb62 | PHP | datingfuture/dating | /app/User.php | UTF-8 | 2,061 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
p... | true |
d666c08256ff4995ceb976a619872f63c6f0fd38 | PHP | amielarieti/virtrudev | /wp-content/plugins/ajax-load-more-pro/pro/ajax-load-more-cache/admin/includes/cta/writeable.php | UTF-8 | 1,244 | 2.515625 | 3 | [] | no_license | <div class="cta">
<h3><?php _e('Status', 'ajax-load-more-cache'); ?></h3>
<div class="item">
<?php
//Test server for write capabilities
$path = ALMCache::alm_get_cache_path();
if (is_writable( $path )){ ?>
<p class="writeable-title"><i class="fa fa-check"></i><strong><?php ... | true |
36a919eb8ef5331defd1d5aea9d138bc885232cd | PHP | slamcheg/test-genesis | /app/src/Components/Vk/Abstracts/AbstractClient.php | UTF-8 | 599 | 2.875 | 3 | [] | no_license | <?php
namespace App\Components\Vk\Abstracts;
use App\Components\Vk\Interfaces\ClientInterface;
use App\Components\Vk\Traits\ApiAwareTrait;
abstract class AbstractClient implements ClientInterface
{
use ApiAwareTrait;
/**
* @var string
*/
private $_serviceKey;
/**
* Client construct... | true |
2b01b10357b083047ff528bca2a066cf25112473 | PHP | juno130/simple-crud-php | /form_persona.php | UTF-8 | 2,002 | 3.125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>FORMULARIO DE PERSONA</title>
</head>
<body>
<h2>FORMULARIO</h2>
<?php
//para verificar si existe... | true |
02babe2daf0cfee362493e6ff8dcfb749cd860df | PHP | eddybogotacangrejo/PROFUNDIZACION_UNO | /VALIDAR_MAYOR_MENOS.PHP | UTF-8 | 3,133 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="author" content=“EDDY_BOGOTA”>
<meta name="description" content=“SEMANA_4_PRIMER_CORTE_ELECTIVA_PROFUNDIZACION_II>
<meta name="viewport" content="width=device-width,user-scalable=no">
<title>valida notas</title>
... | true |
bb7d4f4c6369c20377889c8b4f82f966c055e917 | PHP | ShijunWangMTL/php-course | /in-class practice-xampp folders/htdocs/PhpBasics/11php_abstract.php | UTF-8 | 1,453 | 3.703125 | 4 | [] | no_license | <?php
// final method: cannot be overriden. it's a final version
// final class: cannot be inherited
abstract class Person {
private $firstName, $lastName, $phone, $email;
public function _construct($first, $last) {
$this->firstName = $first;
$this->lastName = $last;
}
// ...... | true |
0523e4661f661c8a4dd465f4f2e471288017ab3c | PHP | marvinero1/shePagina | /app/Http/Controllers/ContactoController.php | UTF-8 | 2,752 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Contacto;
use Illuminate\Http\Request;
use Mail;
class ContactoController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('contacto.ind... | true |
e89543ca92b8568a87f24908aa8f7ebc1eb251a4 | PHP | LarsWiegers/interner | /app/Http/Controllers/InternshipController.php | UTF-8 | 3,139 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Comment;
use App\States\Internship\InternshipState;
use App\States\Internship\NotAppliedYetInternshipState;
use http\Client\Request;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\URL;
use Inertia\Inertia;
use App\I... | true |
e9bd2b8442e3d190b99d073792e63c1c220dca70 | PHP | ajosav/1stopshop | /app/Http/Controllers/Admin/NoteController.php | UTF-8 | 2,776 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Resources\NoteResource;
use App\Models\Note;
use Illuminate\Database\QueryException;
use Illuminate\Http\Request;
class NoteController extends Controller
{
/**
* Display a listing of the resource.
*
* @re... | true |
bdfe8c35010e58ff60ab13e11d941a92e16a8742 | PHP | lucianIonescu5p/Laravel-forum-app | /app/Post.php | UTF-8 | 855 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Post extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'title', 'description', 'thread_id', 'user_id'
... | true |
50b0c5cf80d2b2f23fe5d7eb3711375117ac65b2 | PHP | DestroNic/movimento | /app/admin/aprod.php | UTF-8 | 2,636 | 2.75 | 3 | [
"CC-BY-3.0"
] | permissive | <?php
include('../includes/header.php');
$conexion = conexion();
if(isset($_POST['agregar'])){
$sql = "INSERT INTO productos (prod, lc, lu, p, ps, eh) VALUES (?, ?, ?, ?, ?, ?)";
$sql = $conexion->prepare($sql);
$sql -> bindValue(1, $_POST['prod']);
$sql -> bindValue(2, $_POST['lc']);
$sql -> bindValue(3, $_POS... | true |
58056bcfea43640c630d25e8ccaaa118d0a769f5 | PHP | phpactor/phpactor | /lib/WorseReflection/Core/Inference/Symbol.php | UTF-8 | 3,184 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Phpactor\WorseReflection\Core\Inference;
use Phpactor\TextDocument\ByteOffsetRange;
use InvalidArgumentException;
final class Symbol
{
public const CLASS_ = 'class';
public const VARIABLE = 'variable';
public const METHOD = 'method';
public const FUNCTION = 'function';
public cons... | true |
d6772f9d212880a09190115cdf9337bc8eaa5de1 | PHP | nguyenhuan1994dn/aptech-php-14-nguyenhuan | /php/2018-09-18/2-php-mysql/2-create-db.php | UTF-8 | 770 | 2.890625 | 3 | [] | no_license | <?php
echo "<a href=\"./\">BACK</a>";
/* 2. --- CREATE DATABASE ---
*
* Using MySQLi
*
*/
echo "<h1>2. CREATE DATABASE</h1>";
/*
* EXERCISE 1 : Create database name is yourname_project.
*
*/
/*
* SUGGESTION :
require './helper.php';
$conn = connectDatabase();
$sql = "CREATE DATABASE namnh_news";
if ($conn->... | true |
b5921c765c19578b1969754b4e5207158bfbb396 | PHP | liuqiang666/ticket | /app/Models/Seat.php | UTF-8 | 1,483 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Lenovo
* Date: 2017/10/19
* Time: 10:10
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Seat extends Model
{
protected $table = 'seat';
public $timestamps = false;
private static $instance = null;
... | true |
7d812eb908f228b6260620c136b47f0f629946b1 | PHP | XLearner/notes | /notes/index.php | UTF-8 | 1,884 | 2.546875 | 3 | [] | no_license | <?php
/*$pattern = '/^1[3,5]\d{9}$/'; // 匹配电话号码
// $pattern = '/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/'; // 匹配身份证号
$str = "150992838482";
var_dump(preg_match_all($pattern, $str, $arr));
echo '<br/>';
var_dump($arr);*/
/*$parttern = '/t(.*?)st/';
$str = "asldkftestadsftsxtst";
var_dump(preg_match_all($pa... | true |
9c2b9391d4939a73e0b5fae24d60dc4b40a3b22d | PHP | mpirani/Web-App-Example | /insert.php | UTF-8 | 1,758 | 2.671875 | 3 | [] | no_license | <?php
if(isset($_POST['submitted'])) {
include('connect.php');
$user = $_POST['username'];
$pword = $_POST['pass'];
$mail = $_POST['email'];
$sqlinsert = "INSERT INTO registration (pass, username, email) VALUES('$pword','$user', '$mail')";
if(!mysqli_query($dbcon, $sqlinsert)) {
die('error did no... | true |
12c6b186ffb9ce759e85f94ed5359b7139000188 | PHP | AdibSALIM/boiler | /src/Entities/AbstractEntity.php | UTF-8 | 2,164 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Yakuzan\Boiler\Entities;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
abstract class AbstractEntity extends Model
{
/** @var array */
protected $access_rules;
/** @var array */
protected $modify_rules;
/** @var array */
protected $access_attributes;
... | true |
b6fc55a3d1f8c4e33106ae983c66ce2b7c94b8cf | PHP | Roave/BetterReflection | /test/core/bug36434.phpt | UTF-8 | 501 | 3.078125 | 3 | [
"MIT"
] | permissive | --TEST--
Reflection Bug #36434 (Properties from parent class fail to indetify their true origin)
--FILE--
<?php
class ancester
{
public $ancester = 0;
function __construct()
{
return $this->ancester;
}
}
class foo extends ancester
{
public $bar = "1";
function __construct()
{
return $this->bar;
}
}
$... | true |
3fb7031b17705f04bfc3367ece274f26301623a0 | PHP | paullewallencom/php-978-1-8495-1134-6 | /_src/Chapter15/com_text/.svn/text-base/text.php.svn-base | UTF-8 | 1,629 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
*
* This the Text Component, designed to be installed into Aliro to store straightforward articles that do not need to be in folders, or use access control or anything fancy.
*
* Copyright in this edition belongs to Martin Brampton
* Email - counterpoint@aliro.org
* Web - http://www.aliro.org
*
* Information... | true |
8825be061573050b7e8255ef561db642f7ab82c5 | PHP | luisplata/museoCarmona | /app/Http/Controllers/LoginController.php | UTF-8 | 837 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
class LoginController extends Controller {
//
public function login(Request $request) {
/* Pasos de autenticación
* se busca por el correo el usuario
* se calcula si la contra... | true |
bf0fe25e79e04db3750a93bcfa57aab4e37cea6f | PHP | dananjayavr/sfy | /src/Entity/Hobby.php | UTF-8 | 1,521 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\HobbyRepository")
*/
class Hobby
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(typ... | true |
3526972d60eec4aa66f4b479d9b1f4014b39f10c | PHP | xtrimsky/HSBC-France-Connection---PHP | /example.php | UTF-8 | 1,524 | 2.984375 | 3 | [] | no_license | <?php
require_once('HSBC_France.php');
$hsbc_france = new Bank_hsbc_fr();
$hsbc_france->setAccountNumber('11111111111111');
$hsbc_france->setPassword('111111');
$result = $hsbc_france->connect();
if($result['code'] !== 1){
/*
* code: 0 unknown, no connection
*... | true |
ef024e74d2f6db29285f6ccd336aa9b04edeec9a | PHP | kmKuzmich/main | /tecdoc/Child/Seq/TecDocPackageStructChildNodesAllLinkingTarget2RecordSeq.php | UTF-8 | 1,653 | 2.75 | 3 | [] | no_license | <?php
/**
* File for class TecDocPackageStructChildNodesAllLinkingTarget2RecordSeq
* @package TecDocPackage
* @subpackage Structs
* @date 2013-02-10
*/
/**
* This class stands for TecDocPackageStructChildNodesAllLinkingTarget2RecordSeq originally named ChildNodesAllLinkingTarget2RecordSeq
* @package TecDocPackag... | true |
39b9a5ec7289f47f871d8f5feacf648a879dae47 | PHP | patrix/oraculum-php | /plugins/mail.php | UTF-8 | 3,219 | 2.734375 | 3 | [] | no_license | <?php
/**
* Componente de Envio de E-mails
*
*
* @filesource
* @category Components
* @package oraculum
* @subpackage oraculum.components.sendmail
* @required PHPMailer 2.3 ou superior
*/
class Oraculum_Mail {
private $_host=NULL;
private $_user=NULL;
private $_pass... | true |
f1fb96a7b4b85bbcd042b04eee805649aa973b19 | PHP | panjezor/php-test | /src/Discount.php | UTF-8 | 518 | 3.34375 | 3 | [] | no_license | <?php
namespace App;
/**
* Class Discount
*
* @package App
*/
class Discount
{
/**
* @var string
*/
public string $skuName;
/**
* @var int
*/
public int $quantity;
/**
* @var int
*/
public int $price;
/**
* Discount constructor.
*
* @param string $skuName
* @param int $quantity... | true |
109c5ab3c8b05924d2ae091756fef9a466684c1e | PHP | rafaelbreno/lumen-json-processor | /database/migrations/2021_02_14_172649_create_log_files_table.php | UTF-8 | 951 | 2.671875 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLogFilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('log_files', fu... | true |
9cd189c9bc1d2cc1b88d64468a80b17eb14bbd7a | PHP | dangcongminh1099/EnglishForVietNamese | /user/testChuoi.php | UTF-8 | 504 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?php
$connect=new mysqli("localhost","root","","project");
... | true |
f9dc1bf227257c66a594e1986c85c2d7df611879 | PHP | iliaselme/IntegrationKassaA | /integration_kassa_a-master/source/Reservation.php | UTF-8 | 805 | 2.9375 | 3 | [] | no_license | <?php
Class Reservation{
public $name;
public $x_last_name;
public $create_date;
public $city;
public $email;
public $mobile;
public $ref; // dit gaan we gebruiken als universele id (string)
public $breakfast;
public $extra;
public $payedAmount;
function _... | true |
28c0eaa2b2fb24d69cab8bd6ec605e639d5dbe20 | PHP | udincabbage/gammus | /includes/pesantren.inc.php | UTF-8 | 2,610 | 2.859375 | 3 | [] | no_license | <?php
class Pesantren{
private $conn;
private $table_name = "t_pesantren";
public $id;
public $nmp;
public $almt;
public $komp;
public $sms;
public function __construct($db){
$this->conn = $db;
}
function insert(){
$query = "insert into t_broadcast (status,nama_pondok,alamat_pondok,komputer_pondok,no... | true |
886e6212a7bff206816da8c3f36cfc4fd0fa5603 | PHP | emimafia/emimafia-guide | /htdocs/scripts/templates/poi.php | UTF-8 | 3,626 | 2.765625 | 3 | [] | no_license | <?php
/**
* Author: emimafia
* Fetch Database content
*/
require_once('connect.php');
mysql_query('set names utf8');
$poi = $_GET['p'];
$query = "SELECT * FROM `POI` WHERE ID=\"$poi\"";
$result = mysql_query($query);
/**
* normalize title of the poi
*/
function normalize($str) {
$normalize_arr = arra... | true |
c528ee770400a9c5f38da5b0f6ed61eaaa0f0e4f | PHP | maximewalravens/wda | /deleteBlogs.php | UTF-8 | 2,238 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
include_once 'Database/CRUD/BlogDb.php';
include_once 'Database/CRUD/BlogDetailDb.php';
include_once 'Database/CRUD/UserDb.php';
include_once 'Database/CRUD/CategorieDb.php';
include_once 'Database/CRUD/FotoDb.php';
include_once 'Database/CRUD/CommentDb.php';
if(isset($_COOKIE["loggedIn... | true |
d6fe0b7096004d1c37df9a65781d127aab36b284 | PHP | EduardoParo/WebEduFinans | /vendor/mf/controller/controller.php | UTF-8 | 1,091 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
// Definir o caminho para instanciar a clase
namespace mf\controller;
/* Classe controler que defini as ações POST
-------------------------------------------*/
abstract class controller{
// Definição de variaveis
protected $oView;
// Metodo Construtor
public function __construct(){... | true |
0197316dc5ccc427e45f4de5dcbf9ce9f643e062 | PHP | michalsanger/php-quadtree | /tests/Geometry/Bounds.getArea.phpt | UTF-8 | 283 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__ . '/../bootstrap.php';
use Tester\Assert;
use Quadtree\Geometry\Bounds;
$b1 = new Bounds(10, 20);
Assert::equal(200.0, $b1->getArea());
$b2 = new Bounds(10, 0);
Assert::equal(0.0, $b2->getArea());
$b3 = new Bounds(0, 0);
Assert::equal(0.0, $b3->getArea()); | true |
9cefdacdbe9906581996f93dc4d59f7f2ae21b5d | PHP | duffman033/Php_Object | /src/Models/Console.php | UTF-8 | 927 | 3.296875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Models;
class Console
{
private string $label;
private string $constructor;
/**
* @return string
*/
public function getLabel(): string
{
return $this->label;
}
/**
* @param string $label
* @return Console
*/
... | true |
daee014e6e2e7fdf33d0ba2072ee48d27c763f69 | PHP | ozzner/SistemaWeb_LaRoca | /model/model_asistencia.php | UTF-8 | 526 | 2.984375 | 3 | [] | no_license | <?php
class AsistenciaModel{
private $asistenciaID;
private $fecha;
public function getAsistenciaID() {
return $this->asistenciaID;
}
public function getFecha() {
return $this->fecha;
}
public functi... | true |
578564dd936a78807ab025d58503a11c871ed97a | PHP | anarzone/restaurantReservation | /app/Http/Requests/StuffStoreRequest.php | UTF-8 | 1,476 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use http\Client\Curl\User;
use http\Env\Request;
use Illuminate\Foundation\Http\FormRequest;
class StuffStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
... | true |
f057fefe0ac34a94162ef9bae1f1c81c28bd4bbd | PHP | serbinyo/RarusLerningCourse | /serbin_php_tasks_1-60/03.php | UTF-8 | 762 | 4.125 | 4 | [] | no_license | <?php
/*
Задача 3
Реализуйте функцию reverse, которая переворачивает цифры в переданном числе:
use function Number\reverse;
reverse(13); // 31
reverse(-123); // -321
Не забудьте задать тип входного и выходного аргумента.
*/
function reverse(int $num): int
{
$negative = ($num < 0) ? true : false;
$str =... | true |
8c4595af109426bb78f0b40399303dd071aecb1d | PHP | vtsoftware/FileHandle | /FileHandle.php | UTF-8 | 1,726 | 2.96875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace VtSoftware\Utils;
class FileHandle {
private $fileInstance;
public String $path = '';
public bool $autoread = false;
public bool $autosave = false;
public int $dirPermissions = 0770;
public bool $locked = false;
public int $unlockWaitIterations = 3;
public f... | true |
2b5fb6591968345e765cdaf58fb3121191da4db4 | PHP | MyOnlineStore/omnipay-paypal | /src/Message/RestListWebhooksRequest.php | UTF-8 | 690 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Omnipay\PayPal\Message;
/**
* PayPal REST List Webhooks request
*
* @link https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_list
*/
final class RestListWebhooksRequest extends AbstractRestRequest
{
public function getData(): array
{
return [];
}
public function g... | true |
98f8caafeebdb8ef4a4787e1563f74266839adc4 | PHP | guygaver/laravel-sandbox | /app/Services/ReferralService.php | UTF-8 | 189 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Services;
class ReferralService
{
public function __construct() {
echo "Constructed...";
}
public function doSomething() {
echo "Doing Something";
}
} | true |
9ea6d1d598d7094ab35aae11b538d93397cb10fc | PHP | si3u/laravel_shopping_cart | /app/CommunicationDeliveryPayment.php | UTF-8 | 543 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class CommunicationDeliveryPayment extends Model
{
public $timestamps = false;
public static function CreateItems($delivery_id, $payment_ids) {
$data = [];
$i = 0;
$count = count($payment_ids);
while ($i<$count) {
... | true |
1b3fc98c614e344a17be118df86e7b1b3a73d3b8 | PHP | chunwusang/testoa | /public/base/include/chajian/smsxinhuChajian.php | UTF-8 | 1,977 | 2.515625 | 3 | [] | no_license | <?php
/**
* 信呼官网提供短信服务api
* 官网:http://www.rockoa.com/
* 软件:信呼OA云平台
* 作者:雨中磐石(rainrock)
* 时间:2018-06-18
*/
class smsxinhuChajian extends Chajian{
protected function initChajian()
{
if(getconfig('systype')=='dev'){
$this->updatekeys = 'aHR0cDovLzEyNy4wLjAuMS9hcHAvcm9ja2FwaS8:';
}else{
$this->updatekeys ... | true |
09e3c122d6cc1f6dab6f8f02cf9b01f8e6549843 | PHP | RomainBrosolo/Projet-Arrosage-Automatique | /action-creation-config.php | UTF-8 | 2,508 | 2.71875 | 3 | [] | no_license | <?php
if(isset($_POST['nom'], $_POST['durée'])){
if(isset($_POST['fréquence']) and isset($_POST['seuil'])){
$nom = $_POST['nom'];
$duree = $_POST['durée'];
$return = 0;
if($_POST['seuil'] == Null){
$frequence = $_POST['fréquence'];
$seuil = 0;
if($frequence < 1){
header('location: interfac... | true |
c73bccd842abdbba35af253c512633f0ec87a1bc | PHP | Kuhalskiy-Oleg/Task-8 | /database/factories/CategoryFactory.php | UTF-8 | 1,032 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Factories;
use App\Models\Category;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class CategoryFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Category::class;
... | true |
6ef9e17fdab0e6ed579111c865132f916c211c77 | PHP | owenshih/laravel-ubuntu | /app/Repositories/HotelCooperation/EloquentHotelCooperation.php | UTF-8 | 955 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Repositories\HotelCooperation;
use App\Repositories\HotelCooperation\HotelCooperationInterface as HotelCooperationInterface;
use App\HotelCooperation;
class EloquentHotelCooperation implements HotelCooperationInterface
{
/**
* @var $model
*/
private $model;
/**
* Eloquen... | true |
444c30859d177e5f673ae778c60ed57c25e9b56a | PHP | RajkiranBagal/BSF-Queries | /classes/class-bq-loader.php | UTF-8 | 1,253 | 2.578125 | 3 | [] | no_license | <?php
/**
* BSF Queries Loder File.
*
* PHP version 7
*
* @category PHP
* @package BSF Queries
* @author Display Name <username@rajkiranb.com>
* @license http://brainstormforce.com
* @link http://brainstormforce.com
*/
if ( ! class_exists( 'BQ_Loader' ) ) :
/**
* BSF Queries Loader Doc comment
*... | true |
25801ae012779dad415e2368c4ce417f4cb1bd2a | PHP | akmalkhoerudin/akmal-khoerudin | /4B/detail.php | UTF-8 | 1,374 | 2.71875 | 3 | [] | no_license | <?php
$conn = mysqli_connect('localhost', 'root', '', 'db_perpustakaan');
$getDetailBook = mysqli_query($conn, "SELECT * FROM books WHERE id=" . $_GET['id']);
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-... | true |
427bf519c4381cb4ecd7a03b79f9e8d58a5c5fb8 | PHP | jelleroorda/buildamic | /src/Traits/HasComputedAttributes.php | UTF-8 | 859 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace HandmadeWeb\Buildamic\Traits;
trait HasComputedAttributes
{
protected $computedAttributes = [];
public function setComputedAttributes(array $computedAttributes): static
{
$this->computedAttributes = $computedAttributes;
return $this;
}
public function mergeComput... | true |
26bfa40cb581b8b4fa052b0c2c3f663a80944856 | PHP | GManentis/AlterText | /ajax/ModifyText.php | UTF-8 | 457 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
if(isset($_POST["text"]))
{
$CONNPDO = new PDO("sqlite:../text.db");
$CONNPDO -> setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
if($CONNPDO != null)
{
$text = $_POST["text"];
$adddata_PRST = $CONNPDO -> prepare("UPDATE text SET text = :text WHERE id = 1");
$adddata_PRST -> bi... | true |
56787d063b1e65dd8f48ea04fb08f2b97103aa83 | PHP | Serhii32/bsa-2018-php-9 | /app/Http/Requests/CurrencyRequest.php | UTF-8 | 883 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Gate;
use Illuminate\Foundation\Http\FormRequest;
class CurrencyRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Gate::allows('admin');
... | true |
bf7c38ddce10b07618c4797c5f9acf5283fb9e86 | PHP | Maswindex/AaronAviles | /model/aaronLogin.php | UTF-8 | 2,087 | 2.90625 | 3 | [] | no_license | <?php
/**
* aaronLogin.php
* Author: Toygan Sevim
* Date: 6/14/18
*
*
* This file will instantiate the first checks for the login
*/
//bring the Password file
session_start();
require_once "/home2/remotewo/config.php";
$checkPassword = $checkUser = "";
validateAdmin();
/**
* This function will echo
* @par... | true |
ae76ee32aa640c142d4ff5af266ff6a708ebefc1 | PHP | TheLides/back7 | /classes/Message.php | UTF-8 | 1,246 | 3.03125 | 3 | [] | no_license | <?php
include_once 'services/validation.php';
class Message
{
public $Text;
public function setText($text)
{
if (!validateString($text)) {
return false;
} else {
return true;
}
}
}
class MessageViewModel
{
public $Id;
public $UserOwnerId;
pu... | true |
8f02d2a7a036784a44fefeca76f6fa26ead6de29 | PHP | johnjce/jcainstalador | /model/Usuario.php | UTF-8 | 3,459 | 2.75 | 3 | [] | no_license | <?php
class Usuario extends EntidadBase{
private $id;
private $nombre;
private $apellido;
private $email;
private $user;
private $password;
private $privilegio;
private $sesion;
public function __construct($adapter) {
$table="usuar... | true |
b19ae5a471b565266c2f1d798e7b19bffa266e8b | PHP | santosheww/grocerybuddy | /frontend/models/Vendorproducts.php | UTF-8 | 1,142 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "vendorproducts".
*
* @property integer $Pid
* @property string $ProductName
* @property string $Quatity
* @property string $Weight
* @property string $Price
* @property string $Discount
*/
class Vendorproducts extends \yii\db\Acti... | true |
e7955110f8b55ea13304a26482595d9fdacd73f9 | PHP | timur-pub/tmrgdv | /sitemap/views/sitemap/index.php | UTF-8 | 1,304 | 2.84375 | 3 | [] | no_license | <?php echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach ($items as $item): ?>
<?php foreach ($item['models'] as $model): ?>
<url>
<?php
/* У модели Post нет методов getPermaLink(), поэтому ссылку на... | true |
d2dcdeafd25c457ef5a63caf87ba7f11b31b4511 | PHP | ddppbb/test | /test/Db/Mysql/Generate.php | UTF-8 | 3,121 | 2.90625 | 3 | [] | no_license | <?php
namespace Db\Mysql;
use PDO;
class Generate extends \Db\Mysql\Db
{
protected $connection = null;
public $data = array();
public $fields = array();
public $ignore = false;
public $table;
public function __construct($host='', $database='', $user='', $pass='') {
$this->connection = parent::getConnection... | true |
a5ef618f501ebbfa95c489a36fb749fc29dccd9d | PHP | train-to-cupertino/phonebook_v2 | /vendor/Phonebook/DBHelper.php | UTF-8 | 1,075 | 2.921875 | 3 | [] | no_license | <?php
namespace Phonebook;
class DBHelper {
// PDO Instance
private $_pdo = null;
// Параметры подключения к БД
private function getOptions() {
$opts = [
'host' => '127.0.0.1', // -------------------------
'db' => 'contacts_db', // | Опции подключения к БД |
'user' => 'root', // | При необход... | true |
79d42a7c2a84caf0ba6ad1ee2eaf6c5c5b27cd35 | PHP | FMBee/inter_ciqual2 | /models/m_app_recovery.php | UTF-8 | 726 | 2.515625 | 3 | [] | no_license | <?php
class App_Recovery {
public static function getAll($pdo) {
$data = $pdo->query ( 'SELECT * FROM app_recovery_details ORDER BY rcv_mail DESC' )->fetchAll ( PDO::FETCH_ASSOC );
return ($data);
}
public static function getOne($pdo, $rcv_mail) {
$data = $pdo->query ( 'SELECT * FROM app_recovery_details ... | true |
cc0decdf7299210c93070496d2b029c6f8c73a73 | PHP | MariusLab/SemanticSudokuLibrary | /src/SudokuCheckerInterface.php | UTF-8 | 3,174 | 3.375 | 3 | [
"MIT"
] | permissive | <?php
namespace MariusLab;
use MariusLab\Struct\Int2D;
interface SudokuCheckerInterface
{
/**
* Checks if a specified row is valid based on sudoku rules
* NOTE: IT DOES NOT CHECK IF THE ROW IS SOLVED
* This is useful for checking rows that haven't been fully filled in yet
*
* @param arra... | true |
0e27d8682ff36dec44af3ae0376b029597e3ee21 | PHP | comquer/comquer | /src/ReadModel/Event/EventCollection.php | UTF-8 | 2,417 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Comquer\ReadModel\Event;
use Comquer\Collection\Collection;
use Comquer\Collection\Type;
use Comquer\Collection\UniqueIndex;
class EventCollection extends Collection
{
public function __construct(array $events = [])
{
parent::__construct(
$events,
... | true |
999ee5fa09c1e5986b41d2e05e8b08a2701c5ae5 | PHP | wingattackromeo/triangle-background-generator | /lib/svggenerator.php | UTF-8 | 3,499 | 2.9375 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__) . '/palette.php');
class SVGGenerator
{
public $palette;
protected $width;
protected $height;
protected $size;
protected $vert;
protected $filename;
public function __construct()
{
$this->palette = new Palette();
$this->setDimensions(1920, 1080);
$this->setSize... | true |
ae6121b98fa831e8f1a027624f112135c8af7398 | PHP | abdulloh031997/muzeyapp | /frontend/widgets/views/core/Misc_Trait.php | UTF-8 | 1,356 | 3.015625 | 3 | [] | no_license | <?php
/**
* Prayer Times Calculator (ver 1.2.2)
* *
* PrayTime.php: Prayer Times Calculator (ver 1.2.2)
* Copyright (C) 2007-2010 PrayTimes.org
*
* Developer: Hamid Zarrabi-Zadeh
* License: GNU LGPL v3.0
*
* TERMS OF USE:
* Permission is granted to use this code, with or
* without modification, in an... | true |
3a5f0cfe8438783c9d5c44120bf426c477d9fcae | PHP | stayds/vadsoft | /database/seeds/Userseeder.php | UTF-8 | 1,222 | 2.578125 | 3 | [] | no_license | <?php
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Faker\Factory as Faker;
class Userseeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Fake... | true |
f4003a0b7aa9dbb19d320f348f47a33294f7adc3 | PHP | lencse/queue | /src/Web/Http/JsonResponse.php | UTF-8 | 496 | 2.78125 | 3 | [] | no_license | <?php
namespace Lencse\Queue\Web\Http;
final class JsonResponse implements Response
{
/**
* @var string
*/
private $content;
public function __construct(string $content)
{
$this->content = $content;
}
public function headers(): array
{
return [
'HTTP... | true |
0c0b509dcef0c1a329547b27c280a308cb2b69ba | PHP | dalpat/krishiyogit | /database/migrations/2021_08_13_131923_create_crops_table.php | UTF-8 | 997 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCropsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('crops', function ... | true |
67c30a45e34a318be07f185e0cbf49ef809492e0 | PHP | pifaace/French-LG | /framework/Routing/RouterContainer.php | UTF-8 | 2,702 | 3.109375 | 3 | [] | no_license | <?php
namespace Framework\Routing;
use Framework\Routing\Exceptions\DuplicateRouteException;
use Psr\Http\Message\ServerRequestInterface;
class RouterContainer
{
/**
* All routes sort by method
*
* @var array
*/
private $routes = [];
/**
* An array of all routes
*
* @v... | true |
b4ca13f81080a621d9cbd899f4732e6560889f9e | PHP | sarjak/SSC | /admin/mac.php | UTF-8 | 607 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
// Turn on output buffering
ob_start();
//Get the ipconfig details using system commond
system('ipconfig /all');
// Capture the output into a variable
$mycomsys=ob_get_contents();
// Clean (erase) the output buffer
ob_clean();
$find_mac = "Physical";
//find the "Physical" & Find the position ... | true |
21bce5f6ce530dadfe8bd5d9b5075f476213d1b9 | PHP | geertvangent/ects | /Application/Discovery/Module/CourseResults/Implementation/Bamaflex/CourseResult.php | UTF-8 | 3,965 | 2.8125 | 3 | [] | no_license | <?php
namespace Ehb\Application\Discovery\Module\CourseResults\Implementation\Bamaflex;
use Chamilo\Libraries\Utilities\Utilities;
/**
* application.discovery.module.course_results.implementation.bamaflex.discovery
*
* @author Hans De Bisschop
*/
class CourseResult extends \Ehb\Application\Discovery\Module\Cours... | true |