lang stringclasses 10
values | seed stringlengths 5 2.12k |
|---|---|
php | {
// Simply delete the token from the database
$request->user()->currentAccessToken()->delete();
return response()->json([
'message' => 'You have successfully logged out!',
]);
}
} |
php | {
$parts = array();
foreach ($shp_data['parts'] as $part) {
$points = array(); |
php | return redirect ( 'home')->with ('sucesso', 'Transferência realizada com sucesso.');
}
function confirmarTransferencia($fields) : Response { |
php | <gh_stars>0
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Su... |
php | <th class="col-md-1">Danh mục cha</th>
<th class="col-md-1">Sorder</th>
<th class="col-md-1">Ảnh</th>
<th class="col-md-1">
<button ng-click="showCreateForm()" type="button" name="button" class="btn btn-flat btn-bloc... |
php |
class Station extends Base
{
const EXCAVATE = 'excavation';
const BUILD = 'building';
protected $casts = [
'spaces' => 'array', |
php | <gh_stars>1-10
<?php
namespace Realm\Model;
use LinkORB\Presenter\PresenterTrait;
class SectionFieldType extends AbstractModel
{ |
php | $settings = [
4 => (is_null($setting[4])) ? 0 : $setting[4],
5 => (is_null($setting[5])) ? 0 : $setting[5]
];
if (!is_null($setting[4]) || !is_null($setting[5])) {
$db->table('siswa')->where('nis_siswa', $_SESSION['role_siswa'])->update(['pengaturan_siswa' => $waktu[0].':'.$waktu[1].':'.$w... |
php | use Illuminate\Http\Request;
use Illuminate\Validation\Rule;
class PhotosController extends Controller
{
public function index()
{
$photos = Photo::all();
return view('admin.photos.index', compact('photos'));
}
public function create()
{ |
php | <option disabled selected value="option-0">Select an operation:</option>
<option value="1">Direct (+,-)</option>
<option value="2">Siblings (+), Direct (+,-)</option>
<option v... |
php | <?php
declare(strict_types=1);
namespace LizardsAndPumpkins\Import\Product\Image\Exception;
class InvalidProductImageAttributeListException extends \RuntimeException
{
}
|
php | */
public function setDestinationKey(?int $destinationKey = null): self
{
// validation for constraint: int
if (!is_null($destinationKey) && !(is_int($destinationKey) || ctype_digit($destinationKey))) {
throw new InvalidArgumentException(sprintf('Invalid value %s, please provide... |
php | /**
* Setup before running any test cases
*/
public static function setUpBeforeClass(): void
{ |
php | <h2 class="blog-post-title">{{ __('Lier les projets aux étudiants') }}</h2>
</div>
<div class="card-body">
<form action="{{ route('/implementations/link', $event) }}" method="post">
{{ csrf_field() }}
... |
php |
<div class="card-body">
<div class="table-responsive">
<table class=" table table-bordered table-striped table-hover datatable datatable-Address">
<thead>
<tr>
|
php |
$credential->setViewPolicy($v_view_policy);
$credential->setEditPolicy($v_edit_policy);
}
}
}
$policies = id(new PhabricatorPolicyQuery())
->setViewer($viewer)
->setObject($credential) |
php | <input type="text" name="city" class="form-control" data-validation="required" placeholder="City">
</div>
<div class="col mb-2">
<input type="text" name="region" class="form-contr... |
php | $image->url = Url::base() . 'images/facebook/holiday/' . $file;
array_push($images, $image);
}
}
} |
php | </ul>
</td>
<td class="td-actions">
<a class="btn btn-small btn-success" href="{{ URL::to('users/' . $u->id. '/edit') }}"><i class="btn-icon-only icon-edit"> </i></a>
{... |
php |
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="/" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>ROS</b></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>Ro's</b> Torv</span> |
php | <div class="col-md-3 left_col">
<div class="left_col scroll-view">
<div class="navbar" style="border: 0;">
</div>
<div class="clearfix"></div>
<!-- menu profile quick info -->
<div class="pr... |
php | <?php
include "../auditD/connect.php";
$mode = mysqli_query($connect, "select * from mode order by id desc");
while ($row = mysqli_fetch_array($mode)) {
$behavior = $row['action'];
}
if ($behavior == 1) {
echo "Behavior";
} else {
echo "Manual";
}
|
php |
/**
* This is the factory for BlogController. Its purpose is to instantiate the
* controller.
*/
class BlogControllerFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$entityManager = $container->get('doctrine.entit... |
php | $this->roleRepo->uuid = $id;
$role = $this->roleRepo->getRoleByAttribute();
$this->roleRepo->roleId = $role->id;
$permissions = $this->roleRepo->getPermissions();
$role = $role = Role::find($role->id); |
php | {
if(!array_key_exists($name, $this->data))throw new \Exception("타입정보가 있습니다.");
return $this->data[$name];
}
function __isset($name)
{ |
php | <label class="col-sm-2 form-control-label d-flex align-items-center">Bank Logo</label>
<div class="col-sm-5">
<input type="file" class="form-control-file" required data-msg="Please choose bank logo"
... |
php | use Symfony\Component\HttpFoundation\Request;
class DefaultController extends Controller
{
/**
* @Route("/", name="homepage") |
php | private function creerControleur(Requete $requete) {
$controleur = "Connexion"; // Contrôleur par défaut
if ($requete->existeParametre('controleur')) {
$controleur = $requete->getParametre('controleur');
// Première lettre en majuscule
$controleur = ucfirst(strtolower($c... |
php | }
// DIVERSE HILFS-FUNKTIONEN
/**
* @return array|bool
*/
function make_tablelist()
{
$table_list = array();
global $db_name;
//$query = "SHOW TABLES";
$query = 'SELECT table_name "Table Name", table_rows "Rows Count",
round(((data_length + index_length)/1024/1024),2)
"Tab... |
php |
$this->assertEquals(0, count($this->entryLink->extensionElements));
$newEntryLink = new Extension\EntryLink();
$newEntryLink->transferFromXML($this->entryLink->saveXML());
$this->assertEquals(0, count($newEntryLink->extensionElements));
$newEntryLink->extensionElements = array(
... |
php | * @author : <NAME>
* @web : http://rizkyadi487.com
* @keterangan : Model untuk melakukan konfigurasi sistem
**/
public function __construct()
{
$dt = $this->db->get("dhammadb_setting");
foreach($dt->result() as $d)
{
$GLOBALS[$d->tipe] = $d->content_setting; |
php |
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\LapanganController;
use App\Http\Controllers\PemilikController; |
php | <div class="card">
<div class="card-header">
Featured
</div>
<div class="card-body"> |
php | $this->load->model('User_model', 'user');
$user = $this->user->get_conditional_entry(array(
'email' => $this->input->post('email')
));
if($user == null) {
$this->session->userdata('noti_msg', "User not found !");
return redirect('/');
} else {
if($user->password == md5($this... |
php | <select name="room_type" class="form-control" required="">
<option value="1">Room</option>
<option value="2">Male Toilet</option>
<option value="3">Female Toilet</option>
</select>
</div>
<div class="form-group">
... |
php | </div>
<input type="hidden" value="{{$typeArea}}" id="typeArea" name="typeArea">
<input type="hidden" id="weekFlag" name="weekFlag" value=0>
<input type="hidden" id="departFlag" name="departFlag" value=0>
<input type="h... |
php | // Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.
// Depending on whether your page supports SSI (.shtml) or... |
php | </div>
</div>
<div class="grid-90 medium-grid-85 tablet-grid-80 mobile-grid-100 grid-parent">
|
php | <?php if (! defined ( 'BASEPATH' )) exit ( 'No direct script access allowed' ); ?>
<?php if (isset($text)){ echo $text; } ?> |
php |
/*
* This should not have a flash message. The fact that this
* is true means code is working as intended. Previously this fails
* because the CFP incorrectly ended at 12:00am the day of, not 11:59pm.
*/
$response = $this
->asLoggedInSpeaker($speaker->id)... |
php | <?
$MESS["SPSG_ACT_PROP"] = "Handler properties";
$MESS["SPSG_TYPE"] = "Type";
$MESS["SPSG_OTHER"] = "Other";
$MESS["SPSG_FROM_USER"] = "User parameter";
$MESS["SPSG_FROM_ORDER"] = "Order specific parameter";
$MESS["SPSG_FROM_PROPS"] = "Order property";
$MESS["SPSG_VALUE"] = "Value";
$MESS["SPSG_DEL"] = "Delete file"; |
php | </tr>
@endif
@foreach($files as $file)
<tr>
<td>{{$loop->iteration }}</td> |
php | return [$message, $count];
}
}
CODE_SAMPLE
,
<<<'CODE_SAMPLE'
use Nette\Localization\ITranslator;
final class SomeClass implements ITranslator
{
public function translate($message, ... $parameters)
{ |
php | * <http://www.gnu.org/licenses/>.
*/
namespace OneOffTech\GeoServer;
use Http\Client\HttpClient;
use JMS\Serializer\Serializer;
use Http\Message\MessageFactory;
use Http\Client\Common\PluginClient;
use JMS\Serializer\SerializerBuilder;
use Http\Discovery\HttpClientDiscovery;
use Http\Discovery\MessageFactoryDisc... |
php | * @param array $classes Classes for the body element.
* @return array
*/
function businessbuilder_body_classes( $classes ) {
// Adds a class of group-blog to blogs with more than 1 published author.
if ( is_multi_author() ) {
$classes[] = 'group-blog';
}
// Adds a class of hfeed to non-singular pages.
if ( !... |
php |
require __DIR__ . '/fixtures/final.class.php';
$rc = new ReflectionClass('FinalClass');
Assert::false($rc->isFinal());
Assert::false($rc->getMethod('finalMethod')->isFinal());
Assert::same(123, FinalClass::FINAL);
Assert::same(456, (new FinalClass)->final());
|
php | $customer = new Customer();
$customer->full_name = $params['fullName'];
$customer->phone = $params['phone'];
$customer->email = $params['email'];
$customer->address = $params['address'];
$customer->province_id = $params['provinceId'];
$customer->district_id = $par... |
php | return;
}
$entityType = $this->getEntityType($entityClass);
// test "get list" request
$response = $this->request(
'GET',
$this->getUrl('oro_rest_api_list', ['entity' => $entityType, 'limit' => 1])
);
self::assertApiResponseStatusCode... |
php | @section('sidebar')
@parent
<p>Estoy en hijo del sidebar master</p>
@endsection
@section('content')
@include('partials.message')
@endsection
|
php | * Aphiria
*
* @link https://www.aphiria.com
* @copyright Copyright (C) 2020 <NAME>
* @license https://github.com/aphiria/aphiria/blob/0.x/LICENSE.md
*/
declare(strict_types=1);
|
php | namespace Boing\RestApi;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Route;
class RestApiServiceProvider extends ServiceProvider
{
public function boot()
{
$this->publishes([
__DIR__.'/../config/boing-rest-api.php' => config_path(
'boin... |
php |
public function user()
{
return $this->hasOne('App\User', 'id', 'user_id');
}
public function status()
{
return $this->hasOne('App\EModels\OrderStatus', 'id', 'status_id');
} |
php | use Debril\RssAtomBundle\Exception\FeedServerErrorException;
use Debril\RssAtomBundle\Exception\FeedForbiddenException;
/**
* Class to read any kind of supported feeds (RSS, ATOM, and more if you need)
*
* FeedReader uses an HttpDriver to pull feeds and one more Parser instances to
* parse them. For each feed, Fee... |
php | <?php
include 'InfiniShip.php';
$ship = new InfiniShip();
echo $ship->makeMultiple(); |
php | Route::get('/instituicoes', '\Congresso\ModuloAdministrativo\Instituicao\Controllers\InstituicaoController@getInstituicoes');
Route::controller('/inscricao', '\Congresso\ModuloInscricao\Participante\Controllers\ParticipanteController');
Route::controller('/caravana','\Congresso\ModuloInscricao\Caravana\Controllers\Car... |
php | * @var array
*/
protected $rules = [
'br_id' => 'required|exists:branches,id',
'name' => 'required|min:3|unique:clients',
'address' => 'required|min:4', |
php |
}
} else if ($this->type==3){
if ($this->menu_label=="") {
return $this->menu_label."-(menu:".$this->menu1."\\".$this->menu2.")"." (".$this->name.")";
} else {
return $this->menu_label."-(menu:".$this->menu1."\\".$this->menu2."... |
php |
$script = '<script>!function(e,n){"use strict";if(!(!1 in n)){var o=n.querySelector("#paypal_donations_form_other"),t=n.querySelector("#paypal_donations_form_amount_other"),c=n.querySelector("#paypal_donations_form_in_honor"),r=n.querySelector("#paypal_donations_form_donate_in_honor");o&&t&&(o.addEventListener("focu... |
php | public function up()
{
// Start order picking permission
$picking = new sfGuardPermission();
$picking->setName('admin_shop_order_picking');
$picking->setDescription('Administrator orders in shop');
$picking->save();
$o_group = Doctrine::getTable('sfGuardGroup')->findOneByName('admin');
... |
php |
use App\Models\Category;
use Livewire\Component;
class ListCategory extends Component
{
public $categories;
public $categorySlug;
public function mount() |
php | /**
* @var string $pollingId
*/
private $pollingId;
/**
* MemLock constructor.
*
* @param $userId
* @param ICache $cache
*/
public function __construct($userId, ICache $cache) |
php | $Numero = $row['Numero'];
$Id_N = $row['Id_N'];
$succliente = $row['succliente'];
$Subtotal = $row['Subtotal'];
$Iva = $row['Iva'];
$Descuento = $row['Descuento'];
$Comentario = $row['Comentario'];
$USERNAME = $row['USERNAME'];
$IDVEND = $row['IDVEND']; |
php | @if(isset($errors) && count($errors) > 0)
<div class="alert alert-danger">
@foreach($errors->all() as $error)
<p>{{$error}}</p>
@endforeach
</div>
@endif
<div>
<form class="container" method="post" action="{{ route('tiposAlerta.store') }}">
... |
php | /** @var Menu $menuModel */
$menuModel = $this->menuModel;
if (!empty($array['delete'])) {
Yii::$app->getDb()->createCommand()->delete($menuModel::tableName(), ['id' => $array['delete']])
->execute();
}
if (!empty($array['create'])) {
Yii::... |
php | //just to make sure
if ($aPolicy['startdate'] == '') {
$nDeleteCount++;
$nPolicyId = $aPolicy['policyid'];
$del = $oResourcePolicy->deleteResourcePolicyDb($nPolicyId);
if ($del == 'n') {
$sMessage = 'could not delete resource po... |
php |
public function update(Request $request, Settings $setting)
{
$setting->update($request->all());
return response()->json($setting, 200);
}
public function delete(Settings $setting)
{
$setting->delete(); |
php | {
public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
{
$payload = new PagesBuild();
$payload->commit = $hydratorRegistry->extractValue($data, 'commit');
$payload->createdAt = $hydratorRegistry->extractValue($data, 'created_at');
$payload->duration = $hydrato... |
php | // เปลี่ยนชื่อภาษา
rename(ROOT_PATH.'language/'.$post['language'].'.php', ROOT_PATH.'language/'.$post['language_name'].'.php');
rename(ROOT_PATH.'language/'.$post['language'].'.js', ROOT_PATH.'language/'.$post['language_name'].'.js');
... |
php | * @param \Illuminate\Http\Request $request
* @param \App\Location $location
* @return \Illuminate\Http\Response
*/
public function edit(Request $request, Location $location)
{
return view('locations.edit', compact('location'));
}
/**
* @param \App\Http\Requests\Location... |
php | /**
*
*===================================================================
*
* StopForumSpam integration library
*-------------------------------------------------------------------
* @package sfslib
* @author emberlabs.org
* @copyright (c) 2010 - 2011 emberlabs.org
* @license MIT License |
php |
$("#left-content").fadeOut(500, function() {
$("#left-content").empty();
$("#left-content").html(d.restaurant_data);
});
//console.log(text);
if(area_replace == "") {
area_repla... |
php | * @var MkPessoaValidator
*/
protected $validator;
protected $inicio;
protected $fim;
protected $url;
/** |
php | namespace OpenAPIServer\Model;
/**
* QueueItemImpl
*
* @package OpenAPIServer\Model
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator |
php | <div class="form-group row">
<div class="col-md-12">
<label for="bukti_transfer" class="text-black">Upload Bukti Transfer (File Gambar) </label>
<input type="file" class="form-control" id="bukti_transfer" name="bukti_transfer" required=""... |
php | public function saveObject($key, $object, $life = 0);
/**
* @param string $key
* @return mixed|bool
*/
public function getObject($key);
/**
* @param string $key |
php | {
throw new ReflectionException('Method not implemented');
}
/**
* {@inheritDoc}
*/
public function isInternal()
{
throw new ReflectionException('Method not implemented');
} |
php | <li class="nav-item mr-3"><a class="nav-link" href="#">Team</a></li>
<li class="nav-item mr-3"><a class="nav-link" href="#">Blog</a></li>
<li class="nav-item"><a class="nav-link" href="#">Contact</a></li>
</ul> --}}
... |
php |
use Zyan\LicensePlateNumber\Style;
class Black extends Style
{
protected string $fontColor = 'white';
protected string $backgroundPath = 'image/background/background_black.png'; |
php | @csrf
Nama Pembeli : <input type="text" name="nama"> <br>
Jenis Kopi : <select name="jenis">
<option value="Nescafe">Nescafe</option>
<option value="latte">Latte</option>
</select><br> |
php | $string['practiceintro_help'] = 'Prácticas (separadas por punto y coma) configuradas en Sarlab para este sistema experimental.';
$string['practiceintro_required'] = 'ATENCIÓN: Debe especificar al menos una práctica.';
$string['rem_lab_conf'] = 'Configuración del laboratorio remoto';
$string[... |
php | <div class="ui centered grid container books-page stackable rm-link-color">
<div class="fourteen wide column">
<div class="ui segment">
<div class="content extra-padding">
<br><div class="book header">
<div class="ui items">
... |
php | <th>@sortablelink('title', trans('sliders::admin.fields.title'))</th>
<th>@sortablelink('image', trans('sliders::admin.fields.image'))</th>
<th width="130">@sortablelink('priority', trans('sliders::admin.fields.priority'))</th>
<th>{{ trans('sliders::admin.fields.control') }}</th>
@endsection
@section(... |
php | namespace Bartlett\CompatInfo\Console;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
/**
* Console Application contract.
*
* @since Class available since Release 5.4.0 |
php | use HasAttachment;
public function moveAttachments($attachments)
{
if ($attachments) {
foreach ($attachments as $attachment) {
if (Storage::disk('local')->exists($attachment['path'])) {
$this->attach(
Storage::disk('local')->pa... |
php | * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Whise\Api\Enums\Details;
use Whise\Api\Enums\Enum;
/** |
php |
public function __construct(string $schemaClass, array $bannedTypes = [])
{
$this->schemaClass = $schemaClass;
$this->bannedTypes = $bannedTypes;
} |
php | use Illuminate\Notifications\Messages\MailMessage;
class Reset extends ResetPassword
{
public function toMail($notifiable)
{
return (new MailMessage)->markdown('twill::emails.html.email', [ |
php | {
private $ec2Client;
private $elbClient;
private $rdsClient;
private $elasticacheClient;
public function __construct(Sdk $awsSdk)
{
$this->ec2Client = $awsSdk->createEc2();
$this->elbClient = $awsSdk->createElasticLoadBalancing();
$this->rdsClient = $awsSdk->createRds()... |
php | * Issue #36 test.
*
* @group issue
*/
class Test_Issues_036Test extends Test_TestCase
{
public function testIssue() |
php | {
$curentUser = $this->get('security.context')->getToken()->getUser();
$ArticleBlog->setAuthorUser($curentUser);
} |
php | namespace App\Http\Controllers;
use App\Events;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class EventsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index() |
php | $this->display();
}
public function add(){
$userid = $_SESSION['user']['id'];
$goal = I('goal');
$oid=$_GET['oid']; // 获取url里的参数值 ord=1
$content=$_POST['rateContents']; //评论内容
$assess=M('assess');
$data['addtime']=time();
$data['odid... |
php | use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserSecondaryUnitsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/ |
php | @section('seo.description', $page->description ?? null)
@section('seo.title', $page->name)
@section('header')
<!-- Poster -->
<div class="poster poster-jobs-listing">
<div class="container">
<div class="row page-title">
<h1> |
php |
/**
* @inheritDoc
*/
public function getVersion(): string
{
return $this->version; |
php | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<div class="product-detail">
<div class="product-detail-container">
|
php | <?php $this->title() ?>
</a>
<span class="post-meta">
<?php _e('/'); ?>
<time datetime="<?php $this->date('c'); ?>">
<?php $this->date(); ?>
</time>
</span>
</section>
<?php endwhile; ?>
</ul>
</article>
<?php $this->pageNav('« ', ' »'); ... |
php | <div class="segmen_keluhan_utama">
<div class="d-flex align-items-center">
<a href="#" class="text-body"><strong cla... |
php |
public function __construct($name, $cpf, $rg, $address, $phone)
{
$this->name = $name;
$this->cpf = $cpf;
$this->rg = $rg;
$this->address = $address;
$this->phone = $phone;
} |
php | echo "A soma vale ". ($n1+$n2);
echo "<br>A subtração vale ". ($n1-$n2);
echo "<br>A Multiplicação vale " . ($n1*$n2);
echo "<br>A Divisão vale ". ($n1/$n2);
echo "<br>O modulo vale ". ($n1%$n2);
/*
Ordem de Precedencia
1º Parenteses ()
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.