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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
cf93e207dc3cc1bdd4061225cfc851e6900835cf | PHP | gesab001/symfony | /src/Controller/RecentHymns2Controller.php | UTF-8 | 4,173 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Flowers;
use App\Entity\RecentHymns2;
use App\Form\RecentHymns2Type;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Ro... | true |
8f0ab312184e5bc6f56f7832fe832d55163823a7 | PHP | Ntekim-Jotham/glook-api | /modules/Account/Api/v1/Repositories/ScheduleRepository.php | UTF-8 | 2,218 | 2.6875 | 3 | [] | no_license | <?php
namespace Glook\Modules\Account\Api\v1\Repositories;
use Glook\Modules\Account\Api\v1\Transformers\ScheduleTransformer;
use Glook\Modules\Account\Models\Schedule;
use Glook\Modules\Account\Models\User;
use Glook\Modules\BaseRepository;
class ScheduleRepository extends BaseRepository{
/**
* @var S... | true |
c248e8c760aa2165f894752b887b0afbe0d048e6 | PHP | Nonslas/php2-assignment | /app/Models/Car.php | UTF-8 | 294 | 2.625 | 3 | [] | no_license | <?php namespace App\Models;
/**
*
*/
class Car extends Model
{
protected $table = 'cars';
protected $fillable = ['brand_id', 'model_name', 'image', 'price', 'sale_price', 'detail', 'quantity'];
public function brand()
{
return $this->hasOne('App\Models\Brand', 'id', 'brand_id');
}
} | true |
df7bd71b2cec45345d308deb38d3d8ae58e15e12 | PHP | sercannozenn/en_uygun_symfony | /src/Adapter/CurrencyInterface.php | UTF-8 | 102 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Adapter;
interface CurrencyInterface
{
public function readData($data);
}
| true |
43afc089ce9b362d02b8e04a64ec4cb628b56dd8 | PHP | ChathuraSam/moviedb | /func/get-comments.php | UTF-8 | 464 | 2.84375 | 3 | [] | no_license | <?php
function getSpecificComments($conn, $movieId) {
$query = "select * from comments where movieId='$movieId'";
$result = mysqli_query($conn, $query);
$comments = array();
$i = 0;
if ($result) {
$noOfRows = mysqli_num_rows($result);
if ($noOfRows > 0) {
while ($row = mysqli_fetch_assoc($result)) ... | true |
ba1ac0c031d96c6e44e32876f3b9a3c149a5a8be | PHP | mdhafaerlangga/prakerin2 | /app/models/Siswa_model.php | UTF-8 | 1,575 | 2.828125 | 3 | [] | no_license | <?php
class Siswa_model{
private $table = 'siswa';
private $db;
public function __construct(){
$this->db = new Database;
}
public function getAllSiswa(){
$this->db->query('SELECT * FROM '.$this->table);
return $this->db->resultSet();
}
public function getSiswaByNis($nis){
$this->db... | true |
13a7bea07e9518cc6af5235095a3285f7f262571 | PHP | aterg/fbadobedach | /application/helpers/tools.php | UTF-8 | 291 | 2.734375 | 3 | [] | no_license | <?php
function get_minvalue($value, $default = 0) {
if( $default >= $value )
return $value;
if( $value >= $default)
return $default;
}
function get_maxvalue($value, $default = 0) {
if( $default <= $value )
return $value;
if( $value <= $default)
return $default;
} | true |
8260e0ab4aac56019274d40e400f7115104d3bbd | PHP | pr-olga/stabil_be | /src/Security/ApiKeyUserProvider.php | UTF-8 | 1,486 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Security;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\User\User;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use App\Repository\AdminRepository;
class ApiKey... | true |
2ab2fef3d26ad294913dbabd8e61486558c29a56 | PHP | Medianova/php_design_patterns | /lib/abstract_factory/src/nissan/NissanEngine.php | UTF-8 | 566 | 3.109375 | 3 | [] | no_license | <?php
namespace AbstractFactory\Nissan;
use AbstractFactory\AbstractEngine;
/**
* Class NissanEngine
*
* - defines a product object to be created by the corresponding concrete factory
* - implements the AbstractEngine interface
*
* @package AbstractFactory\Nissan
*/
class NissanEngine extends AbstractEngine
{... | true |
03e6a994e4b07cb22c303af94bdd151f1523944e | PHP | fgsantosunaerp/progweb2 | /Publicacao.php | UTF-8 | 588 | 3.71875 | 4 | [] | no_license | <?php
class Publicacao {
//variáveis de instância
private $preco;
protected $titulo;
//métodos
function __construct($p, $t) {
$this->preco = $p;
$this->titulo = $t;
}
public function setPreco($valor) {
$this->preco = $valo... | true |
83a5cf4ef40d3e09bd59d9f1bbff118ba8513a10 | PHP | Profs-CS-2018/seniorproject101 | /FinalMidassesment/php/changeGender.php | UTF-8 | 2,297 | 2.828125 | 3 | [] | no_license | <?php
session_start();
$id = ($_SESSION['id']);
$servername = "localhost";
$user = "root";
$passwd = "";
$dbname ="accounts";
$mysqli =mysqli_connect($servername,$user,$passwd,$dbname);//login to database
// Check connection
if (isset($_POST['submit']))
{
if ($mysqli->connect_error)
{
die("Connection ... | true |
6c3aeae9805b7228e353107951eb4c11b7e91a08 | PHP | AdamOndrejkovic/Travel_Agency_WebSite | /ad_min/edit-client.php | UTF-8 | 4,050 | 3.046875 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['adminid']))
{
//not logged in as admin
$content = 'No access</br>';
}
else
{ //take parameter from url
$id = (int)$_GET['id'];
//connect to the database
$conn = false;
$file = '../connection.php';
if (file_exists($file))
{
include ($f... | true |
22a8273bf95c59c30d22fff305f8e7e2b352807d | PHP | Chino-ai/princess_connect | /config/buffer_user.php | UTF-8 | 344 | 2.78125 | 3 | [] | no_license | <?php
class person {
public $email;
public $password;
function set_email($new_email) {
$this->email = $new_email;
}
function get_email() {
return $this->email;
}
function set_password($new_password) {
$this->password = $new_password;
}
function get_password() {
return ... | true |
d93348c0bcd1a988855651fbe5e4369cd254e29d | PHP | Greugreu/LesAnimals | /classes/Form.php | UTF-8 | 2,524 | 2.96875 | 3 | [] | no_license | <?php
class Form
{
private $method = "post";
private $url = "";
private $uploadFile = false;
private $iniFile;
public function __construct($action, string $file)
{
$this->url = $action;
$this->iniFile = parse_ini_file("./conf/$file.ini", true, INI_SCANNER_NORMAL);
}
pu... | true |
9eac4016c8d650a9a54a01d319f1d7a919280144 | PHP | TheSheeponator/HIT238_A2 | /Redirect.php | UTF-8 | 658 | 2.546875 | 3 | [] | no_license | <?php
function redirect($url) {
header('Location: ./'.$url);
try
{
mysqli_close($conn);
}
finally
{
exit();
}
}
function redirectUp($url) {
header('Location: ../'.$url);
try
{
... | true |
1bcfc12c3f60e4a10550d172e1f958f0c9237fd0 | PHP | LikeFireStrike/PHP-MVC-implementation | /classes/Models/CodeModel.php | UTF-8 | 2,362 | 2.875 | 3 | [] | no_license | <?php
use Models\Model;
class CodeModel extends Model
{
public function compareDate($validForHours, $startDate)
{
$format = 'Y/m/d H';
$start = \DateTime::createFromFormat($format, $startDate);
$now = \DateTime::createFromFormat($format, date($format));
$end = clone $star... | true |
e7d418b36d0e3004a220b4c9a8b2b0ae4eb80892 | PHP | samuelmolinski/php-exam | /App/controller/user.controller.php | UTF-8 | 2,559 | 2.578125 | 3 | [] | no_license | <?php
require_once (ABSPATH . '/model/user.model.php');
require_once (ABSPATH . '/config.php');
require_once (ABSPATH . '/DAO.php');
require_once (ABSPATH . '/Utility.php');
class User_Controller extends DAO {
public $user;
function __construct($param = NULL) {
parent::__construct("mysql:dbname=" . DB_NAME .... | true |
6c78758c2b81b053008def965eeaa2e2608511bd | PHP | waqaskamran/ecash_cfe | /ecash_cfe/cronjobs/.svn/text-base/ach_report_export.php.svn-base | UTF-8 | 625 | 3.015625 | 3 | [] | no_license | <?php
/**
* Utility to dump a return file in the database to a file on disk
*/
function main($argv)
{
if((empty($argv[4])) || empty($argv[5]))
{
die("Must pass report_id and filename parameters!\n");
}
$report_id = $argv[4];
$filename = $argv[5];
$db = ECash::getSlaveDb();
$query = "
SELECT remote_r... | true |
f334d2f422f4b1e59934f6788f9cb3224e778b43 | PHP | Big-Shark/forked-php-orm-benchmark | /maghead/vendor/corneltek/codegen/src/CodeGen/Generator/AccessorClassGenerator.php | UTF-8 | 5,816 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace CodeGen\Generator;
use Doctrine\Common\Inflector\Inflector;
use CodeGen\UserClass;
use CodeGen\Variable;
use ReflectionObject;
use ReflectionProperty;
/**
* Generate UserClass for applciation based on the runtime object.
*/
class AccessorClassGenerator
{
protected $properties;
public functio... | true |
a3ce2ea22fd77658b8a681fdf4f0a7e44ce6b1ba | PHP | marmotmcmahon/rb4 | /themes/me-rb4/template-parts/content.php | UTF-8 | 1,330 | 2.53125 | 3 | [] | no_license | <?php
/**
* Template part for displaying posts.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Read by 4th
*/
?>
<article <?php post_class( 'blog-post-article' ); ?>>
<header class="entry-header">
<?php
$category = get_the_category($post->ID);
$counter = 0;
if ( is_single() ) :
... | true |
c8f4be33711dd5b0ea19b64c02125aa6bd703c7c | PHP | chsunil/corp | /1.5/template-contact.php | UTF-8 | 4,222 | 2.515625 | 3 | [] | no_license | <?php
/* Template Name: Contact Page */ ?>
<?php
//response generation function
$response = "";
//function to generate response
function my_contact_form_generate_response($type, $message){
global $response;
if($type == "success") $response = "<div class='success'>{$message}</div>";
... | true |
47f08697a2a95db9e1a800ca5a49789d5227f374 | PHP | vdoan002/CS180 | /loginstuff/userexists.php | UTF-8 | 908 | 2.5625 | 3 | [] | no_license | <?php
session_start();
if($user = $_SESSION['user']){
}
else{
header("location:index.php");
Print "Please log in";
exit();
}
if($_SERVER['REQUEST_METHOD'] = "POST") //Added an if to keep the page secured
{
include 'serverconnect.php';
$receiver = mysqli_real_escape_string($conn,$_POST['receiver']);
$... | true |
b5595452816058c2f8569be263834d807a692e52 | PHP | stefanius/brigittavalentijn | /sites/brigittavalentijn/public_html/src/Stef/BVBundle/Entity/News.php | UTF-8 | 2,511 | 2.59375 | 3 | [] | no_license | <?php
namespace Stef\BVBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="news")
*/
class News
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string")
*/
... | true |
70daae6507dd42377e2c7239007f485b91139bd2 | PHP | adhj1400/SimplePost-CMS | /sp_core/media.php | UTF-8 | 1,632 | 2.515625 | 3 | [] | no_license |
<?php
include('includes/sp-header.php');
include('includes/sp-topbar.php');
include('includes/sp-sidebar.php');
// If we are uploading an image, show upload box
if(isset($_POST['upload-img']))
{
include("includes/sp-upload-box.php");
}
// If we are to delete a specific image
if(isset($_POST["delete"]))
{
$sql = ... | true |
38991064556173bcd60616990c24478c016211c8 | PHP | dakarn/es-framework-kernel | /src/Http/Session/Strategy/SimpleSessionStrategy.php | UTF-8 | 1,610 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: user
* Date: 30.09.2018
* Time: 18:31
*/
namespace ES\Kernel\Http\Session\Strategy;
/**
* Class SimpleSessionStrategy
* @package Http\Session
*/
class SimpleSessionStrategy implements SessionStrategy
{
/**
* @param string $key
* @return array
*/
public function... | true |
30b9ad34f4450ab68354c7c12b3bbdcb202dcbbf | PHP | creolab/assets | /src/Creolab/Assets/Compiler.php | UTF-8 | 2,930 | 2.5625 | 3 | [] | no_license | <?php namespace Creolab\Assets;
use Assetic\Asset\AssetCache;
use Assetic\Asset\AssetCollection as AsseticCollection;
use Assetic\Asset\FileAsset;
use Assetic\Asset\StringAsset;
use Assetic\Cache\FilesystemCache;
use Assetic\Filter\LessphpFilter;
use Assetic\Filter\ScssphpFilter;
use Assetic\Filter\CssMinFilter;
use A... | true |
55f5f72fd7a722d84f4c7ac757efb91a5a0e12a5 | PHP | wallish/whatsup-project | /src/Knnf/WhatsupBundle/Entity/User.php | UTF-8 | 12,397 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Knnf\WhatsupBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use FOS\UserBundle\Entity\User as BaseUser;
use Symfony\Component\Validator\Constraints as Assert;
/**
* User
*
* @ORM\Table(name="user")
* @ORM\Entity(repositoryClass="Knnf\WhatsupBundle... | true |
258a01e4130d485175dbec418c360570a7813092 | PHP | TomislavKulusic/DatabaseFinal | /Project/application/library/InterfaceClass.php | UTF-8 | 589 | 3 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: Frano
* Date: 14. 4. 2017.
* Time: 10:14 PM
*/
interface InterfaceClass
{
/**
* This method should get information from database and update all the variables
* @param $id int ID of a row
* @return
*/
public function fetch($id);
/**
... | true |
d38c30f21e9fda5a6bd79af22b4403c4c8e4e76d | PHP | slickframework/slick | /src/Slick/Database/Sql/Ddl/Column/DateTime.php | UTF-8 | 916 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* DateTime column
*
* @package Slick\Database\Sql\Ddl\Column
* @author Filipe Silva <silvam.filipe@gmail.com>
* @copyright 2014 Filipe Silva
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @since Version 1.1.0
*/
namespace Slick\Database\Sql\Ddl\Column;
/**
*... | true |
2c7927bdc2356bd31f03bea7d5c47bf819133b84 | PHP | katerine3110/Tarea_PHP | /Ejercicio7.php | UTF-8 | 848 | 3.375 | 3 | [] | no_license | <!doctype html>
<html>
<body>
<h1>Ejercicio 7</h1>
<?php
header("Content-type: text/html; charset=\"utf-8\"");
$cuenta=0;
if(is_numeric($_GET['numero'])&& $_GET['numero']>=1)
{
$numero=$_GET['numero'];
for($i=1; $i<=$numero;$i++)
{
if($numero % ... | true |
cdef8e9d75fbb5e8315a0bcf8d6674e1efd39b5a | PHP | transip/tipctl | /src/Command/Domain/AuthCode/Request.php | UTF-8 | 940 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Transip\Api\CLI\Command\Domain\AuthCode;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Transip\Api\CLI\Command\AbstractCommand;
use Transip\Api\CLI\Command\Field;
class Request extends A... | true |
613f5432f4ab00d6f358687cfb762c63073cc9b2 | PHP | fean/EFPHP | /EFPHP/Entities/Includes/schemahandler.inc.php | UTF-8 | 9,951 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
abstract class __ServerType {
const MYSQL = 'mysql';
const MSSQL = 'sqlsrv';
}
abstract class SHARED_QRY {
//Query parts
const PRT_PREPVAL = '%s = :%s AND ';
//Check constant
const CHK_TABLE = 'SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_S... | true |
c18e0d5eb607295ee465f07d0f2b5b69b9d7f4cb | PHP | kallard1/symreact | /src/Doctrine/CurrentUserExtension.php | UTF-8 | 3,613 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Doctrine;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryCollectionExtensionInterface;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryItemExtensionInterface;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use App\Entity\Custom... | true |
fc21ce8d69c3bfee69eec642cb00cc40f94c1547 | PHP | danpayne6/MobileWeb3D | /3dapp/assignment/application/view/view3DAppTest.php | UTF-8 | 393 | 2.515625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test View</title>
</head>
<body>
<h1> Initial 3D App Test View </h1>
<?php
echo $model_1."<br>";
echo $model_2."<br>";
echo $model_3."<br>";
echo $model_4."<br>";
echo $model_5."<br>";
... | true |
3688d2bed476ae77ab682fa8cfd98e7db870847a | PHP | koitt-embedded/RCBattleShip | /AM5728/ti-processor-sdk-linux-am57xx-evm-03.02.00.05/example-applications/matrix-gui-2.0/helper_functions.php | UTF-8 | 1,984 | 2.921875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
$cachefile = "cache".$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
function start_caching()
{
//Use the global $cachefile variable
global $cachefile;
//There is a random string to the end of the $_GET Query String to
//prevent IE from caching the Ajax request. The below line removes the random portion... | true |
d6112d7e251e33acb40972740ab67431422af020 | PHP | Rodr1go/teste-zapito | /app/Services/MessageService.php | UTF-8 | 994 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Services;
use Vedmant\FeedReader\Facades\FeedReader;
use Illuminate\Support\Facades\Http;
use App\Models\Subscriber;
class MessageService
{
public static function sendMessage()
{
$subscribers = Subscriber::where('status', 1)->get();
if(!empty($subscribers))
... | true |
d21330078877f707bf754dfae0b1d01104888ce9 | PHP | telmott/projectX | /ProjectX/Wp/Rest/DaysRoute.php | UTF-8 | 1,963 | 2.703125 | 3 | [] | no_license | <?php
namespace ProjectX\Wp\Rest;
final class DaysRoute extends BaseRoute
{
private $base = 'days';
public function start()
{
add_action('rest_api_init', [$this, 'registerRoutes']);
}
public function registerRoutes()
{
register_rest_route($this->namespace, '/'.$this->base.'/(... | true |
f19fe17483b787d574271653d2819de5548de593 | PHP | LonelyOwl0/MediaWatch-v1 | /includes/signup.inc.php | UTF-8 | 1,940 | 2.703125 | 3 | [] | no_license | <!--This is where the users info that he entered when signing up are handled and the user creation is done-->
<?php
if (isset($_POST['signup-submit'])) {
require 'dbh.inc.php';
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$email = $_POST['email'];
$password = $_POST['password'];
$passwor... | true |
24dba551d977f4cc5c0ea80fdedc5bdda1df7338 | PHP | elchris/easysql | /com/github/elchris/easysql/MockEasySQLDBStatement.php | UTF-8 | 1,009 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created with PhpStorm.
* User: chris
* Date: 11/21/13
* Time: 1:00 PM
*/
namespace com\github\elchris\easysql;
class MockEasySQLDBStatement
extends EasySQLDBStatement
implements IEasySQLDBStatement
{
public function __construct()
{
parent::__construct(new \PDOStatement(), tru... | true |
ac00d5b990776dac47a0f80183b4af0d02eec816 | PHP | halgurdh/site | /wp-content/plugins/jetpack/3rd-party/domain-mapping.php | UTF-8 | 3,273 | 2.875 | 3 | [
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"MIT"
] | permissive | <?php
use Automattic\Jetpack\Constants;
/**
* Class Jetpack_3rd_Party_Domain_Mapping
*
* This class contains methods that are used to provide compatibility between Jetpack sync and domain mapping plugins.
*/
class Jetpack_3rd_Party_Domain_Mapping {
/**
* @var Jetpack_3rd_Party_Domain_Mapping
**/
private st... | true |
cb528ef7f859d4b03937cb94cecad3fb500c417e | PHP | OliverCaiJia/jtadmin | /app/Events/UserActionEvent.php | UTF-8 | 1,002 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
class UserActionEvent extends Event
{
use SerializesModels;
public $uid;
public $adminName;
public $model;
public $aid;
public $type;
public $content;
/**
* UserActionEvent constructor.
*
* @param strin... | true |
a082436d188536b451b1124d972779eb4edb5c83 | PHP | Blackhawkso/pos | /POS/src/Model/Entity/Table.php | UTF-8 | 1,427 | 2.765625 | 3 | [] | no_license | <?php
namespace POS\Model\Entity;
use Doctrine\Common\Collections\Collection;
use POS\Model\Entity;
use POS\Model\Type as EntityType;
/**
* Table
*
* @package POS\Model\Entity
* @copyright 2015 Phil Thompson
*/
class Table extends Entity implements TableInterface
{
/**
* @var string $name
*/
p... | true |
fb9594a768f66b6b6c865a68bdcb7440c68cf694 | PHP | edertone/TurboDepot | /TurboDepot-Php/src/main/php/managers/MarkDownDocsManager.php | UTF-8 | 1,264 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* TurboDepot is a general purpose multi storage library (ORM, Logs, Users, Files, Objects)
*
* Website : -> https://turboframework.org/en/libs/turbodepot
* License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
* License Url : -> htt... | true |
a2fe974ce39b5178a5d2cb4da2effb8135d406cf | PHP | dmitriy-webcreator/psyco | /models/UploadForm.php | UTF-8 | 1,208 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Дмитрий
* Date: 29.06.2017
* Time: 17:55
*/
namespace app\models;
use yii\base\Model;
use yii\web\UploadedFile;
class UploadForm extends Model
{
/**
* @var UploadedFile[]
*/
public $certificates;
public $avatar;
public function rules(){
... | true |
65761edbda9b1f3f499d8105d8405ad9381dab66 | PHP | boarderdav/cornholeace | /website/1353/dbconfig.php | UTF-8 | 890 | 2.625 | 3 | [] | no_license | <?php
//define('DB_SERVER', 'localhost');
//define('DB_USERNAME', 'root'); // DB username
//define('DB_PASSWORD', ''); // DB password
//define('DB_DATABASE', 'facebook'); // DB name
//$connection = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die( "Unable to connect");
//$database = mysqli_select_d... | true |
dc5410166fae97d02c4ace9ea6d0b8ecdbca935d | PHP | ssoares/refuge2buzz | /application/modules/newsletter/models/NewsletterObject.php | UTF-8 | 2,055 | 2.578125 | 3 | [] | no_license | <?php
/**
* LICENSE
*
* @category
* @package
* @copyright Copyright (c)2012 Cibles solutions d'affaires - http://www.ciblesolutions.com
* @license Empty
*/
/**
* Manage newsletters data.
*
* @category
* @package
* @copyright Copyright (c)2012 Cibles solutions d'affaires - http://www.ciblesolutions.com
... | true |
f7acfa8abb1e5cf7a0b74b5484e72c379192fd4e | PHP | galegin/igreja | /models/copia/persistencia.php | UTF-8 | 3,290 | 3.03125 | 3 | [] | no_license | <?php
require_once("modulo.php");
require_once("consulta.php");
abstract class Persistencia extends Consulta
{
public function Pesistencia()
{
}
//--
public function GetConsulta($sql)
{
return $this->GetConexao()->GetConsulta($sql);
}
public function ExecComando($cmd)
{... | true |
5819de75fcc04af67d8f3aaa896e9df08dcbf7ff | PHP | prabhjotSL/php-bittorrent | /PHP/BitTorrent/DecoderInterface.php | UTF-8 | 3,646 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP BitTorrent
*
* Copyright (c) 2011-2012, Christer Edvartsen <cogo@starzinger.net>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including withou... | true |
1647b0948ad196b7ae1c38f6a1a2470010a08d87 | PHP | rn2github/simple-comment-system | /src/Model/Comments.php | UTF-8 | 2,295 | 2.9375 | 3 | [] | no_license | <?php
namespace TMBCCodingChallenge\Model;
use Exception;
use TMBCCodingChallenge\Model\Comment;
class Comments{
public $rootComment;
function __construct($rootComment){
$this->rootComment = $rootComment;
}
/**
* Returns root Comment
*/
public function get(){
return $... | true |
5808f35abf47eb3da87177a6cd94ea36497e8b1a | PHP | crudadmin/crudadmin | /src/Eloquent/Concerns/ModelRules.php | UTF-8 | 7,450 | 2.796875 | 3 | [] | no_license | <?php
namespace Admin\Eloquent\Concerns;
use Admin;
trait ModelRules
{
/*
* Model backup
*/
private $backup_exists = null;
/*
* Backup of original fields
*/
private $backup_original = null;
/*
* Disable all admin rules
*/
private $disableAllAdminRules = false;
... | true |
c8a34abe9b97b3b7d1218d378855d946335dfb95 | PHP | iverson3/API-Design-with-PHP | /controller.php | UTF-8 | 872 | 2.875 | 3 | [] | no_license | <?php
header("Content-Type:text/html; charset=utf-8");
// ------------------------------------
// API接口的入口 控制器
// ------------------------------------
// action参数值 就是对应的model类文件的文件名
$action = isset($_GET['action'])? $_GET['action'] : "null";
if ($action == "null") {
$action = isset($_POST['action'])? $_POST['ac... | true |
2689e1891e49333fee8bda1f46a62656d27c6a16 | PHP | lifeinabash/PackageGenerator | /Model/Struct.php | UTF-8 | 25,724 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace WsdlToPhp\PackageGenerator\Model;
use WsdlToPhp\PackageGenerator\Container\Model\StructValue as StructValueContainer;
use WsdlToPhp\PackageGenerator\Container\Model\StructAttribute as StructAttributeContainer;
use WsdlToPhp\PackageGenerator\Generator\Generator;
/**
* Class Struct stands for an avail... | true |
5b76d6643d2008e0af126387a9c4e3494e437ab9 | PHP | moriorgames/motba-battle | /tests/Unit/App/Entities/HeroTest.php | UTF-8 | 716 | 2.515625 | 3 | [] | no_license | <?php
use App\Entities\Hero;
use App\Entities\HeroBase;
use App\Enum\Archetype;
use PHPUnit\Framework\TestCase;
class HeroTest extends TestCase
{
/** @var Hero */
private $sut;
public function setUp()
{
parent::setUp();
$this->sut = new Hero('a', 1, 2, 3, Archetype::CARRY_MELEE(), 0, ... | true |
3761ecb8a82abe387de0558190bb90739d2c27e8 | PHP | fotos13amateur/fotos13amateur.github.io | /old_test/fbtest30API/Image.php | UTF-8 | 921 | 3.09375 | 3 | [] | no_license | <?php
class Image{
private $id;
private $name;
private $urlLittleImg;
private $urlBigImg;
private $albumId;
public function getId() {
return $this->id;
}
public function getName() {
return $this->name;
}
public function getUrlLittleImg() {
return $this->urlLittleImg;
}
publi... | true |
782baad20f77379915bf1f6edf13ce34de036b7c | PHP | xzhch1622/recsys-nju | /Yaojiajun/bagsok/words_association_log_likelihood_ratio.php | UTF-8 | 5,367 | 2.609375 | 3 | [] | no_license | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Log Likelihood & Chi-Square</title>
</head>
<body>
<form action="words_association_log_likelihood_ratio.php" method="get">
<div>
<label> Stimulus Word: </label>
<input name="stimulus_word" size="100">
</... | true |
c28db339e76e36af533772d24ccae323428a453a | PHP | briancol07/share | /CLASE15/clase5/1 material de clase/1_ejemplos/00 proyectos anexos/shuffle2.php | WINDOWS-1250 | 288 | 3.25 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Documento sin título</title>
</head>
<body>
<?php
$premio = array(21,2,3,4,5,6,7,8,9,10);
shuffle($premio);
echo ($premio[0]); //imprimir cada vez un valor diferente
?>
</body>
</html>
| true |
4441a30a1b075cfbda10a25366c0e7791b615a1a | PHP | aboks/power-iteration | /src/Eigenpair.php | UTF-8 | 542 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
namespace Aboks\PowerIteration;
use MathPHP\LinearAlgebra\Vector;
class Eigenpair
{
/** @var float */
private $eigenvalue;
/** @var Vector */
private $eigenvector;
public function __construct(float $eigenvalue, Vector $eigenvector)
{
$this->eigenvalue = $eigenvalue;
$thi... | true |
afdc7ddd055bf2245855d3d153ca29e8764318a9 | PHP | diego316/Diemond | /SISHOUSE/exibe2cons.php | UTF-8 | 2,883 | 2.953125 | 3 | [] | no_license | <html>
<body bgcolor="#dddddd">
<?php
//Inicia uma sessao para posterior armazenamento das variaveis de acesso(login)
session_start();
include("funcoes.php");
validaAcesso();
// Inclui a conexão com BD
include ("conexao.php");
// Query que busca todos os dados da tabela
$query="SELECT * FROM CONSUMIDOR";
/... | true |
88ccba5f9b569b24ca7c9ac04a0bc9f2551f895e | PHP | muhammadabad/RepairShop | /update/functions.php | UTF-8 | 1,061 | 2.8125 | 3 | [] | no_license | <?php
// Get Enum Fields
function enumDropdown($table_name, $column_name, $name)
{
include 'dbconnect.php';
//$dbcnx = mysqli_connect("localhost", "root", "", "compsys");
$selectDropdown = "<select name=\"$name\">";
$query = "SHOW FIELDS FROM $table_name WHERE Field = '$column_name'";
$result = my... | true |
54bb30029c41c4c319f186fd5971743e72678edc | PHP | rafaeldimas/Aguillar-Arts | /Core/Email/Email.php | UTF-8 | 949 | 2.8125 | 3 | [] | no_license | <?php
namespace Core\Email;
use \SendGrid;
class Email {
private $sendgrid;
private $mail;
private $statuscode;
public function __construct(){
$apiKey = getenv('SENDGRID_API_KEY');
$this->sendgrid = new SendGrid($apiKey);
}
final public function enviar(Array $from, $subject, Array $to, Array $content){
... | true |
ebeca71d792f84fbadf36666dca5ff5a1ac6be42 | PHP | tegarsatya/inventory_lanjut | /app/Http/Controllers/CategoriController.php | UTF-8 | 951 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Categori;
use Redirect;
class CategoriController extends Controller
{
public function index()
{ $data= Categori::all();
return view('categori.categori-index',['data'=>$data]);
}
public function create()
{
return view ('catego... | true |
61292a074907afcd391c465f4ba31bffae36f84d | PHP | SimpleMessageNotification/smn-sdk-php | /smn-sdk-php/Request/Sms/ListSmsTemplatesRequest.php | UTF-8 | 4,061 | 2.625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Copyright (C) 2018. Huawei Technologies Co., LTD. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of Apache License, Version 2.0.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without ... | true |
2571de46152797403bc7518ad39cc775b5974baa | PHP | Timmy2015/Algorithms | /bubble.php | UTF-8 | 328 | 3.109375 | 3 | [] | no_license | <?php
//Bubble
function bubble($arr){
for($i=0;$i<count($arr)-1;$i++){
for($j=$i+1;$j<count($arr);$j++){
if($arr[$j]<$arr[$i]){
$temp=$arr[$i];
$arr[$i]=$arr[$j];
$arr[$j]=$temp;
}
}
}
return $arr;
}
$arrs=array(8502,85,850004,851,8500005,85003,100000008,85000006);
print_r(bubble(... | true |
a4613e67d27358836c97e65a9e7bb453e6ce0c6f | PHP | PHPOffice/PhpSpreadsheet | /src/PhpSpreadsheet/Cell/Hyperlink.php | UTF-8 | 1,866 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpOffice\PhpSpreadsheet\Cell;
class Hyperlink
{
/**
* URL to link the cell to.
*
* @var string
*/
private $url;
/**
* Tooltip to display on the hyperlink.
*
* @var string
*/
private $tooltip;
/**
* Create a new Hyperlink.
*
... | true |
948f60a820227ceb7a34cfdb422cd5088843dc53 | PHP | kristenmills/api | /app/Http/Controllers/LinkController.php | UTF-8 | 3,350 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Http\Controllers\Controller;
use App\Link;
use App\Http\Requests;
/**
* Link resource representation.
*
* @Resource("... | true |
084823346c1828e7e54b7c653f5c151723e9f555 | PHP | raylison100/apiRequest | /SRC/Controller/SearchController.php | UTF-8 | 993 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: raylison100
* Date: 22/10/18
* Time: 12:03
*/
namespace SRC\Controller;
use GuzzleHttp\Client;
class SearchController
{
private $client;
private $method;
private $headers;
private $endPoint;
public static $instance;
private function __construct()... | true |
50676f1b25a24100a3aa91e308adb68fc74e6950 | PHP | joncarlmatthews/MvcFramework | /MvcFramework/Validator/NotEmpty.php | UTF-8 | 3,531 | 3.03125 | 3 | [] | no_license | <?php
/**
* MvcFramework
*
* @link https://github.com/joncarlmatthews/MvcFramework for the canonical source repository
* @copyright
* @link Coded to the Zend Framework Coding Standard for PHP
* http://framework.zend.com/manual/1.12/en/coding-standard.html
*
* File format: UNIX
... | true |
8a1fa26aaf431a85c8256e0ec83423c0e4fdfef2 | PHP | ferrellz/code_breaker | /keyCalc.php | UTF-8 | 4,147 | 2.734375 | 3 | [] | no_license | <?php
function hex2str($hex) {
$str = "";
for($i=0;$i<strlen($hex);$i+=2)
$str .= chr(hexdec(substr($hex,$i,2)));
return $str;
}
function bin2text($bin_str) {
$text_str = '';
$chars = explode("\n", chunk_split(str_replace("\n", '', $bin_str), 8));
for($i = 0; $i < count($chars)-1; $i++)... | true |
646e7d2df03629d229f40b61532d5c07351cc679 | PHP | mehansen/hike-logger | /index.php | UTF-8 | 1,677 | 3.234375 | 3 | [] | no_license | <?php
if($_POST['submitbutton'] == 'Submit')
{
$errormsg = "";
$varName = $_POST['name'];
$varDate = $_POST['date'];
$varDistance = $_POST['distance'];
if(empty($varName) || empty($varDate) || empty($varDistance)) {
$errormsg = "Please provide values for all fields";
} else {
//... | true |
d4669733c94b5e85191d5fd4d25f00e5791bd20b | PHP | adrianosilvavianna/Carpooling | /app/Domains/AgendaUser.php | UTF-8 | 798 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Domains;
use Illuminate\Database\Eloquent\Model;
class AgendaUser extends Model
{
protected $fillable = ['user_id','agenda_id'];
public function Users()
{
return $this->hasMany(User::class);
}
public function Agendas()
{
return $this->hasMany(Agenda::class);... | true |
67d4279fc4ccc8621b6ae0e4d2703c9f3cef9cff | PHP | madiedinro/fake-shop | /vendor/pug-php/pug/src/Pug/Pug.php | UTF-8 | 6,311 | 2.671875 | 3 | [] | no_license | <?php
namespace Pug;
use InvalidArgumentException;
use Phug\Phug;
use Phug\Renderer\Adapter\StreamAdapter;
use Pug\Engine\Options;
/**
* Class Pug\Pug.
*/
class Pug extends Options
{
/**
* Pug constructor.
*
* @param array|\ArrayAccess $options
*/
public function __construct($options = ... | true |
58de8f67628836948a5a8633182d5325226b7242 | PHP | Hanover-CS/HC21-GeorgeDant-SeniorProject | /php/config.php | UTF-8 | 266 | 2.59375 | 3 | [] | no_license | <?php
// Making a connection to the database
$conn = mysqli_connect('localhost', 'root', '', 'thepracticeplan');
// Checking if connection was successful and if not, end the page
if (! $conn) {
die('Error Connecting to Database');
}
?> | true |
21be8f65b63591adb65c6b1fc2377f650900574d | PHP | HaKIMus/Hank | /src/Application/Command/CreateNewClientCommand.php | UTF-8 | 603 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Hank\Application\Command;
class CreateNewClientCommand
{
private $name;
private $password;
private $email;
public function __construct(
string $name,
string $password,
string $email
) {
$this->name = $name;
$this->password = $password;
... | true |
5694c585eb9a597ddafa3dbc10e7a990b312826b | PHP | Cli-published/graphpinator | /src/Directive/ExecutableDirective.php | UTF-8 | 1,824 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Graphpinator\Directive;
abstract class ExecutableDirective extends \Graphpinator\Directive\Directive
{
private ?\Closure $resolveFnBefore;
private ?\Closure $resolveFnAfter;
public function __construct(
array $locations,
bool $repeatable,
... | true |
435a6e412ca303faf5b45a2ee565bf828faf6445 | PHP | puthirith/Forum | /forum/app/Model/User.php | UTF-8 | 834 | 2.625 | 3 | [] | no_license | <?php
App::uses('Security','Utility');
class User extends AppModel{
public $displayField = 'email';
public $hasMany=array(
'Post','Comment'
);
public $validate = array(
'firstname'=> array(
'rule'=>'notEmpty',
'message'=>'Please input First name.'
),
'la... | true |
7cb8836cb55964f0626cb69c3f1c9a4a490ae2f8 | PHP | inphinit/framework | /src/Experimental/Form.php | UTF-8 | 4,550 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
/*
* Inphinit
*
* Copyright (c) 2023 Guilherme Nascimento (brcontainer@yahoo.com.br)
*
* Released under the MIT license
*/
namespace Inphinit\Experimental;
class Form
{
private static $useXhtml = '';
private static $preAttrs = array();
private static $alloweds = 'button|checkbox|color|date|da... | true |
f4829b248b20834ce163cd6d6e5b04bf49125583 | PHP | Victorsouza2382/AtividadeWeb1 | /Atividade5 html.php.boostrap.js/Questão6/Calculo.php | UTF-8 | 1,245 | 3.03125 | 3 | [] | no_license | <html>
<?php
$n1 = $_POST['n1'];
$n2 = $_POST['n2'];
$n3 = $_POST['n3'];
$me = $_POST['me'];
$nualuno = $_POST['nualuno'];
$media = ($n1 + ($n2 *2) + ($n3 *3)+ $me)/7;
echo'media em pontos é: '. number_format($media, 2, ',', '.') . '<br>' ;
if ($media >=9) {
... | true |
ff4fccbd12f7fda1820ec0b4755b436eec269dbb | PHP | vladkudinov89/proweb | /app/UseCases/Auth/RegisterService.php | UTF-8 | 1,168 | 2.71875 | 3 | [] | no_license | <?php
namespace App\UseCases\Auth;
use App\Entities\User;
use App\Http\Requests\Auth\RegisterRequest;
use App\Mail\Auth\Admin\SendAdminMail;
use App\Mail\Auth\User\SendUserMail;
use App\Notifications\SendAdminNotification;
use Illuminate\Auth\Events\Registered;
use Illuminate\Contracts\Events\Dispatcher;
use Illumina... | true |
b1243516964c13cfd4ca339881fcf45447f51527 | PHP | SmilyMonster/php | /arrays_loops_tasks/14.php | UTF-8 | 179 | 3.140625 | 3 | [] | no_license | <?php
$arr = array(4, 2, 5, 19, 13, 0, 10);
$e = rand(2, 4);
$found = false;
foreach($arr as $value)
{
if($value == $e)
$found = true;
}
echo $found ? 'Есть!':'Нет!';
?> | true |
9ec0bfbccd43ab3f0ac8f122910cc6debc1080e8 | PHP | eguvenc/Obullo_ | /src/Obullo/Connectors/RedisConnector.php | UTF-8 | 3,781 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Obullo\Connectors;
use ReflectionClass;
use RuntimeException;
/**
* Redis Connector
*
* @copyright 2009-2015 Obullo
* @license http://opensource.org/licenses/MIT MIT license
*/
class RedisConnector implements ConnectorInterface
{
/**
* Redis connection
*
* @var object
*... | true |
03100756823415ddf4e63c2174f6622bbcbffab5 | PHP | roae/hello-world | /src/app/models/setting.php | UTF-8 | 347 | 2.65625 | 3 | [] | no_license | <?php
class Setting extends AppModel{
var $name = "Setting";
var $use = "settings";
function getConfig(){
$settings = $this->find("all");
$config = array();
foreach($settings as $record){
if(!empty($record['Setting']['name'])){
$config[$record['Setting']['name']] = $record['Setting']['value'];
}
}... | true |
4789ab9599d4214c2407694dad29136a4dab9dc5 | PHP | TaffoVelikoff/hotCoffee | /database/migrations/2019_09_26_154725_create_menu_items_table.php | UTF-8 | 983 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMenuItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('menu_items', ... | true |
16ffe9476fbec4b7b2963eeb51d7732efe8d187c | PHP | SmithChart/plot-backend | /getdata.php | UTF-8 | 3,841 | 3.015625 | 3 | [] | no_license | <?php
require_once("config.inc.php");
//$DEBUG = 1;
//Verbindung auf die Datenbank aufbauen
mysql_connect($CONF_DB_host, $CONF_DB_user, $CONF_DB_pass)
OR DIE();
//Datenbank auswäen
mysql_select_db($CONF_DB_db)
OR DIE();
if(!isset($_GET['id'])) DIE();
if(!is_array($_GET['id'])) {
//Der Aufruf erfolgt üie alte Not... | true |
b611fdc8ee7660968ca7d303cef33f7700b8f383 | PHP | emuroku/lamp_practice | /www/view/index_view.php | UTF-8 | 3,579 | 2.515625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="ja">
<head>
<?php include VIEW_PATH . 'templates/head.php'; ?>
<title>商品一覧</title>
<link rel="stylesheet" href="<?php print(STYLESHEET_PATH . 'index.css'); ?>">
</head>
<body>
<?php include VIEW_PATH . 'templates/header_logined.php'; ?>
<div class="container">
<h1>商品一覧</h1>
... | true |
e6403597bdeac94c203681580eb8099187d001c5 | PHP | EdwinPalacio5/produccion-sig-laravel | /app/Http/Controllers/HomeController.php | UTF-8 | 5,017 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use App\Rol;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* S... | true |
2965542c3b0dbc6e12d5230b57d521b87c21261c | PHP | borkabu/thesportcity | /class/files.class.php | UTF-8 | 5,941 | 3.0625 | 3 | [] | no_license | <?php
//
// ============================================================================
// files.class.php revision: 20010611-01
// ----------------------------------------------------------------------------
// Class can return files/dirs in specified folder, rename files, dele... | true |
2d9aa24bb87f6f5a7464aa5f05a0f0325e86efab | PHP | Mann-Michael/CS313 | /web/cart/index.php | UTF-8 | 3,385 | 2.953125 | 3 | [] | no_license | <?php
//This is the CART controller
// Create or access a Session
session_start();
//Get the functions library
require_once '../library/functions.php';
//Get the products model
require_once '../model/products-model.php';
//Create general information - UNUSED
//Get $action, if $action is null... | true |
764d874a8373f7d14eac01b7ce848afdf417d858 | PHP | ExpandOnline/bing-ads-sdk-php | /src/v10/AdInsight/SearchCountsByAttributes.php | UTF-8 | 798 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <?php
namespace BingAds\v10\AdInsight;
/**
* Defines an object that contains a list of keyword historical search counts for the corresponding device attribute.
* @link http://msdn.microsoft.com/en-us/library/mt179362(v=msads.100).aspx SearchCountsByAttributes Data Object
*
* @uses Historica... | true |
6ad3fac14be35e8f952763619b6b03f90c74cb25 | PHP | mathematicator-core/calculator | /src/Step/Controller/StepSqrtHelper.php | UTF-8 | 1,878 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Mathematicator\Calculator\Step\Controller;
use Mathematicator\Engine\Step\Step;
use Nette\Utils\ArrayHash;
use Nette\Utils\Html;
final class StepSqrtHelper implements IStepController
{
/** @var Step[] */
private $steps = [];
/**
* @return Step[]
*/
public functio... | true |
e3903d89598f081bcf19aa57eadad38ed18b6f47 | PHP | 2bad2furious/nette-pcv | /app/model/header/Header.php | UTF-8 | 2,175 | 3.671875 | 4 | [
"MIT"
] | permissive | <?php
class Header {
const TYPE_PAGE = 1,
TYPE_CUSTOM = 0;
private $id;
private $title;
private $url;
private $position;
private $pageId;
private $languageId;
private $parentId;
private $childrenIds = [];
/**
* Header constructor.
* @param int $id
* @p... | true |
cafddb3506aa80d9d414ec9f6325f57309f34b59 | PHP | eHIF/eHIFDemo | /app/controllers/PatientsController.php | UTF-8 | 4,381 | 2.609375 | 3 | [] | no_license | <?php
class PatientsController extends BaseController {
/**
* Patient Repository
*
* @var Patient
*/
protected $patient;
public function __construct(Patient $patient)
{
$this->patient = $patient;
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
... | true |
bd0adc5be88b415a9fb362cf51158f28ef4dc533 | PHP | madewithlove/laravel-oauth2 | /src/OAuth2/Provider/Mailchimp.php | UTF-8 | 1,652 | 2.59375 | 3 | [] | no_license | <?php
namespace OAuth2\Provider;
use OAuth2\Provider;
use OAuth2\Token_Access;
/*
* Docs: http://apidocs.mailchimp.com/oauth2/
*/
/**
* Mailchimp OAuth Provider
*
* @package laravel-oauth2
* @category Provider
* @author Dave Kelly - hello@davidkelly.ie
*/
class Mailchimp extends Provider {
public... | true |
1532e5bcaec55fcaed5355fe4ad0122c64c72fb9 | PHP | Rocher55/DViewer | /app/Sample.php | UTF-8 | 750 | 2.6875 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $SampleType_ID
* @property string $SampleType_Name
* @property EaAnalyse[] $eaAnalyses
*/
class Sample extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sa... | true |
2adc9fef0b6ed80c64110ed492279844ed2997da | PHP | quentar/Cassandra-Cluster-Admin | /helper/MX4J.php | UTF-8 | 15,976 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
class MX4J {
private $host = '';
private $port = 0;
public function __construct($host, $port = MX4J_HTTP_ADAPTOR_PORT) {
$this->host = $host;
$this->port = $port;
}
private function getUrl() {
return 'http://'.$this->host.':'.$this->port;
}
private function doCall($url,$return_as_a... | true |
75ae551059c54af38894e1ff4d11acdeb95bd654 | PHP | econjobmarket/download_script | /packages/Econjobmarket/DownloadUtility.php | UTF-8 | 2,615 | 2.609375 | 3 | [] | no_license | <?php
namespace Econjobmarket;
use \Illuminate\Database\Capsule\Manager;
class db extends \Illuminate\Database\Capsule\Manager{};
class DownloadUtility {
public function __contruct($cfg) {
$this ->link = new db;
$this -> link -> addConnection($cfg -> database);
$this -> link -> setAsGlobal();
}
pu... | true |
7a9f73443eeff7e3754fab3a9085ac783134e393 | PHP | itsGno/staffmarathon | /marathon/app/controllers/StaffController.php | UTF-8 | 7,085 | 2.5625 | 3 | [] | no_license | <?php
use Phalcon\Mvc\Model\Criteria;
use Phalcon\Paginator\Adapter\Model as Paginator;
class StaffController extends ControllerBase
{
/**
* Index action
*/
public function indexAction()
{
$this->persistent->parameters = null;
$numberPage = 1;
if ($this->request... | true |
087b7bebfa7e602b29882bc85a1c09916e88bb8c | PHP | keajse/EM3_ProgramacionWebII | /apisabado/app/Controllers/APIController.php | UTF-8 | 3,707 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use CodeIgniter\RESTful\ResourceController;
class APIController extends ResourceController
{
protected $modelName = 'App\Models\ModeloAnimales';
protected $format = 'json';
public function index()
{
return $this->respond($this->model->findAll());
}
... | true |
230b6b59d1741b8b746bf525291d3a446e50942c | PHP | ngmautri/nhungttk | /module/Inventory/src/Inventory/Domain/Validator/Item/AbstractItemValidator.php | UTF-8 | 1,110 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Inventory\Domain\Validator\Item;
use Application\Domain\Shared\Specification\AbstractSpecificationFactory as SharedSpecsFactory;
use Inventory\Domain\Exception\InvalidArgumentException;
/**
*
* @author Nguyen Mau Tri - ngmautri@gmail.com
*
*/
abstract class AbstractItemValidator... | true |
4bb671932b9820f33c89ffefa8c3adad554f5b63 | PHP | opdoc-ru/opdoc | /src/App.php | UTF-8 | 2,396 | 3.0625 | 3 | [] | no_license | <?php
namespace src;
use src\dto\ArticleDto;
use Symfony\Component\Yaml\Yaml;
class App
{
const ARTICLES_DIR = __DIR__ . '/../docs/articles';
const REFERENCES_DIR = __DIR__ . '/../docs/references';
/**
* Читает манифест документации и парсит ее в DTO объект
* @param string $path
* @param ... | true |
5f10f11ad0043676015d5fece21a5f150d8097f2 | PHP | webDevT/hw3 | /hw3.php | UTF-8 | 5,604 | 2.890625 | 3 | [] | no_license | <?php
session_start();
echo 'Homework 3</br>';
$form = $_SESSION;
if(!empty($form['auth'])){ ?>
<?php if(!empty($form['valid_login'])){ ?>
<p style="">
Ваше имя: <?php echo $form['valid_login']; ?>
</p>
<?php } ?>
<?php if(!empty($form['valid_email'])){ ?>
<p style="">
Ваш email: <?php echo $form['... | true |