query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Array of attributes to setter functions (for deserialization of responses).
public static function setters() : array { return self::$setters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAttributes();", "public static function setters();", "public function setAttributes(array $attributes);", "public function setAttributes(array $attributes);", "public function setAttributes(array $attributes);", "public static function setters()\n {\n return [\n 'a...
[ "0.67861605", "0.6602939", "0.6596105", "0.6596105", "0.6596105", "0.6549202", "0.6546527", "0.6433981", "0.6337804", "0.63287914", "0.63287914", "0.63287914", "0.63287914", "0.63287914", "0.63287914", "0.63287914", "0.63287914", "0.63287914", "0.63287914", "0.63287914", "0.6...
0.6052429
32
Array of attributes to getter functions (for serialization of requests).
public static function getters() : array { return self::$getters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttributes(): array\n {\n // Get all attributes using all the getters.\n $attributes = [];\n foreach(\\array_keys(\\get_object_vars($this)) as $attribute) {\n\n // Construct the getter name.\n $getter = \\lcfirst(\\str_replace('_', '', \\ucwords($att...
[ "0.7377387", "0.6819236", "0.6653509", "0.6653509", "0.6653509", "0.6653509", "0.6606956", "0.6575728", "0.65064317", "0.64890575", "0.6463668", "0.642166", "0.64178026", "0.63993233", "0.63993233", "0.63993233", "0.63993233", "0.63993233", "0.63993233", "0.63993233", "0.6399...
0.62760985
34
Gets the string presentation of the object.
public function __toString() : string { return \json_encode( ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString()\n {\n $result = $this->show();\n return $result ? $result : '';\n }", "public function __toString() {\n\t\tretur...
[ "0.76999485", "0.76999485", "0.7677313", "0.7667521", "0.76529694", "0.7647193", "0.76099914", "0.76000375", "0.75458145", "0.7534987", "0.7503392", "0.7503392", "0.7503392", "0.7501123", "0.74604076", "0.7459576", "0.7456136", "0.7455916", "0.74448484", "0.74132824", "0.7356...
0.0
-1
The original name of the model.
public function getModelName() : string { return self::$openAPIModelName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOriginalName(): string\n {\n return $this->originalName;\n }", "public function getOriginalName(): string\n {\n\t\treturn $this->originalName;\n\t}", "public function getOriginalName();", "protected function getModelName()\n {\n $fullyQualifiedClassName = substr(s...
[ "0.8051171", "0.80107665", "0.7829159", "0.763725", "0.7625556", "0.7594126", "0.75220734", "0.75203615", "0.7520026", "0.74983907", "0.74457127", "0.7406896", "0.7395408", "0.7392189", "0.7380455", "0.73451596", "0.7309523", "0.7268473", "0.72646457", "0.7194995", "0.7167137...
0.68043435
57
Returns true if offset exists. False otherwise.
public function offsetExists($offset) : bool { return isset($this->container[$offset]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function offsetExists($offset): bool\n {\n return false;\n }", "public function hasOffset(){\n return $this->_has(1);\n }", "public function offsetExists($offset): bool;", "public function offsetExists($offset) {\n\t\t$result = false;\n\t\t\n\t\tif($this->_data[$offset]) {\n\t\t\t...
[ "0.8555834", "0.8536144", "0.84876734", "0.8325894", "0.8322583", "0.8300258", "0.821515", "0.81559885", "0.8143132", "0.8143132", "0.81348807", "0.81315136", "0.8130816", "0.8128181", "0.8118165", "0.81153667", "0.81060076", "0.8103301", "0.80874085", "0.80874085", "0.808201...
0.0
-1
Sets value based on offset.
public function offsetSet($offset, $value) : void { if (null === $offset) { $this->container[] = $value; } else { $this->container[$offset] = $value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($offset, $value);", "public function set($offset, $value = null);", "function setOffset($value) {\n $this->offset = $value;\n }", "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "public function offsetSet($offset, $value)\n {\n $th...
[ "0.8670502", "0.84270954", "0.821386", "0.8191476", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "...
0.0
-1
Serializes the object to a value that can be serialized natively by json_encode().
#[\ReturnTypeWillChange] public function jsonSerialize() : string { return \json_encode(ObjectSerializer::sanitizeForSerialization($this), JSON_THROW_ON_ERROR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function jsonSerialize() {\n return json_encode($this->value);\n }", "public function jsonSerialize()\n {\n return $this->getValue();\n }", "public function jsonSerialize() : mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public functio...
[ "0.79128116", "0.75058365", "0.72963285", "0.72963285", "0.72670996", "0.72670996", "0.7259109", "0.72524434", "0.7242914", "0.72170264", "0.7206062", "0.71979064", "0.7185794", "0.71520025", "0.71309674", "0.71147335", "0.71147335", "0.71147335", "0.71147335", "0.71147335", ...
0.71841425
18
Gets a headersafe presentation of the object.
public function toHeaderValue() : string { return \json_encode(ObjectSerializer::sanitizeForSerialization($this), JSON_THROW_ON_ERROR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPresentation();", "public function presentHeader() {\r\n $html = parent::presentHeader();\r\n\r\n return $html;\r\n }", "\n using \\IngwiePhoenix\\UniterMPC\\Models\\Displayable;\n\n public function __toDOM() {\n return (<div>\n <p>We present to you:<...
[ "0.6413742", "0.60431796", "0.5863456", "0.5586695", "0.55306524", "0.54814816", "0.5407699", "0.53856856", "0.5352012", "0.5326618", "0.5316098", "0.52931714", "0.52702653", "0.52506196", "0.52308345", "0.5219529", "0.5191985", "0.51775163", "0.51657736", "0.5151271", "0.512...
0.0
-1
Display a listing of the resource.
public function index(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request){ $validator = Validator::make($request->all(), [ 'feeling' => 'required', 'knowledge' => 'required', 'activity' => 'required', 'nextdayplan' => 'required', 'goal' => 'required', 'nextdream' => 'requi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE famille ADD head_family_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE famille AD...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNE...
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.73290...
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE famille DROP FOREIGN KEY FK_2473F2134351DB49'); $this->addSql('DROP INDEX IDX_2473...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo'...
[ "0.79510754", "0.7864519", "0.7606075", "0.7493172", "0.7320076", "0.7245705", "0.71873933", "0.71527994", "0.7152543", "0.71410805", "0.7135595", "0.7121767", "0.7115081", "0.71048", "0.7097477", "0.70792973", "0.7077585", "0.707227", "0.70676", "0.7065651", "0.7052665", "...
0.0
-1
Given some HTML send a response.
public function renderHtml($html) { $response = new Response(); $response->setContent($html); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function htmlResponse($html) {\n $response = $this->getResponse()\n ->setStatusCode(200)\n ->setContent($html);\n return $response;\n }", "public function htmlResponse($html)\n {\n $response = $this->getResponse()\n ->setStatusCode(200)\n ...
[ "0.647779", "0.6309607", "0.625803", "0.6116929", "0.59562933", "0.589758", "0.5889959", "0.5859024", "0.5805638", "0.579599", "0.579599", "0.5791436", "0.57271075", "0.5688994", "0.5586494", "0.5519346", "0.54943293", "0.5446674", "0.54292196", "0.53717494", "0.5366363", "...
0.58274114
8
Generate a title and translate etc etc
public function generateTitle($key, $params = array()) { return $this->get('teapotio.site')->generateTitle($key, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generate_title()\r\n\t\t{\r\n\t\t\treturn $this->c_title;\r\n\t\t}", "private function _generateTitle()\n {\n $title = '';\n foreach ($this->_contents as $content)\n {\n $title = ('' == $title) ? $content->myGetSeoTitleTag() : $content->myGetSeoTitleTag().' | '.$title;\n }\n ...
[ "0.7659903", "0.7379929", "0.73370945", "0.73232096", "0.73232096", "0.7311335", "0.7217608", "0.7195024", "0.7179398", "0.7141081", "0.713076", "0.7098242", "0.70898527", "0.7082544", "0.7073739", "0.70474666", "0.70385724", "0.70381373", "0.7031128", "0.702728", "0.7019446"...
0.0
-1
Needs to be implemented in child classes
public function toString() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __construct()\t{}", "protected function __construct(){}", "protected function __construct(){}", "protected function __construct(){}", "protected final function __construct() {}", "final private function __construct(){\r\r\n\t}", "private function ...
[ "0.6865116", "0.6658436", "0.6446062", "0.6446062", "0.6446062", "0.6443951", "0.64330924", "0.6420441", "0.64075184", "0.6396306", "0.6396306", "0.63903123", "0.6379125", "0.6379125", "0.6379125", "0.6379125", "0.6379125", "0.6379125", "0.6379125", "0.6379125", "0.6379125", ...
0.0
-1
grid create the configuration of the grid
public static function grid($rowNum = 10) { $translator = Shineisp_Registry::getInstance ()->Zend_Translate; $config ['datagrid'] ['columns'] [] = array ('label' => null, 'field' => 't.tax_id', 'alias' => 'tax_id', 'type' => 'selectall' ); $config ['datagrid'] ['columns'] [] = array ('label' => $transl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function grid()\n {\n $grid = new Grid(new Gys);\n\n $grid->id('Id');\n $grid->name('公司名称');\n $grid->tel('联系人电话');\n $grid->file('营业执照')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a targ...
[ "0.70311505", "0.7027837", "0.69180524", "0.67733157", "0.6716295", "0.67123", "0.6705938", "0.6692516", "0.6688438", "0.6660906", "0.66606337", "0.66552854", "0.6632728", "0.66144735", "0.65967035", "0.6596612", "0.658352", "0.6570093", "0.6561956", "0.6546451", "0.65350825"...
0.0
-1
find Get a record by ID
public static function find($id, $fields = "*", $retarray = false) { $dq = Doctrine_Query::create ()->select ( $fields ) ->from ( 'Taxes t' ) ->where ( "t.tax_id = ?", $id ) ->limit ( 1 ); $retarray = $retarray ? Doctrine_Core::HYDRATE_ARRAY...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRecord($id = null);", "public function returnDetailFindByPK($id);", "public static function find($id);", "public function findByID($id){\n return $this->Find(self::TABLE,$id);\n }", "function find($id);", "function findById($id);", "public static function findById($id);...
[ "0.82516944", "0.80291945", "0.79958236", "0.798964", "0.7948467", "0.79248726", "0.7869422", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", "0.7859334", ...
0.0
-1
Get the tax percentage by tax_id
public static function get_percentage($tax_id) { $record = Doctrine_Query::create ()->select ( 'percentage' ) ->from ( 'Taxes t' ) ->where ( "t.tax_id = ?", $tax_id ) ->limit ( 1 ) ->execute ( array (), Doctrine_Core::HYDRATE_ARRAY ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getTaxPercent();", "function getTaxPercenTax($id)\n\t{\n\n\n\t\t$query3=\"SELECT (ps.cgst+ps.sgst) as gst FROM `product` as p INNER JOIN product_variant as pv on pv.`ptdvar_id` = p.ptdvar_id INNER JOIN product_sub_category as ps on ps.pr_sub_id = pv.ptd_sub_catgry_id where p.product_id =...
[ "0.7925332", "0.72557235", "0.7062715", "0.70527965", "0.70068884", "0.6884636", "0.677201", "0.67652583", "0.6748068", "0.6725033", "0.6686283", "0.66816086", "0.66232175", "0.6623099", "0.6570438", "0.65652305", "0.65184355", "0.65057766", "0.648299", "0.6440172", "0.642303...
0.783533
1
delete Delete a record by ID
public static function deleteItem($id) { Doctrine::getTable ( 'Taxes' )->findOneBy ( 'tax_id', $id )->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteRecord ($id);", "public function deleteRecord($id){\n\t}", "function delete($id);", "public function delete( $id );", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);",...
[ "0.8939375", "0.8731024", "0.8403047", "0.8394595", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", "0.83515036", ...
0.0
-1
getList Get a list ready for the html select object
public static function getList($empty=false) { $items = array (); $arrTypes = Doctrine::getTable ( 'Taxes' )->findAll (); if($empty){ $items[] = ""; } foreach ( $arrTypes->getData () as $c ) { $items [$c ['tax_id']] = $c ['name']; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSelectList() {\n\treturn $this->selectList;\n }", "private function getListOptions(){\n return $this->listOptions;\n }", "function get_name_select_list()\n\t{\n\t\treturn $this->get_name_select_edit();\n\t}", "public function select_list()\n\t{\n\t\t$list = array();\t\t\n\t\t$or...
[ "0.73743844", "0.72171926", "0.6913897", "0.690176", "0.6842628", "0.6842628", "0.6734653", "0.6731998", "0.66567904", "0.66555417", "0.6620718", "0.6606574", "0.65382046", "0.65158623", "0.65158623", "0.65158623", "0.65109503", "0.65108943", "0.6497248", "0.6494001", "0.6485...
0.0
-1
getTaxbyTldID Get the tax
public static function getTaxbyTldID($tldid) { $dq = Doctrine_Query::create ()->select('s.tax_id as tax_id, s.name as name, s.percentage as percentage') ->from ( 'DomainsTlds dt' ) ->leftJoin('dt.Taxes s') ->where('tld_id = ?', $tldid); $tax = $dq->execute ( array ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTaxById($id)\n {\n return null;\n }", "public function getIdTax()\n {\n return $this->id_tax;\n }", "function getTaxPercenTax($id)\n\t{\n\n\n\t\t$query3=\"SELECT (ps.cgst+ps.sgst) as gst FROM `product` as p INNER JOIN product_variant as pv on pv.`ptdvar_id` = p.ptdv...
[ "0.7560346", "0.74386305", "0.71540904", "0.70603794", "0.67489105", "0.67078936", "0.66312677", "0.6592905", "0.6550125", "0.65364444", "0.6512356", "0.651193", "0.6479604", "0.6476322", "0.6386625", "0.6380723", "0.63444805", "0.63444805", "0.63444805", "0.63032526", "0.630...
0.81924975
0
getTaxbyProductID Get the tax
public static function getTaxbyProductID($productid) { $dq = Doctrine_Query::create ()->select('s.tax_id as tax_id, s.name as name, s.percentage as percentage')->from ( 'Products p' ) ->leftJoin('p.Taxes s') ->where('product_id = ?', $productid); $tax = $dq->execute ( array...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTaxPercenTax($id)\n\t{\n\n\n\t\t$query3=\"SELECT (ps.cgst+ps.sgst) as gst FROM `product` as p INNER JOIN product_variant as pv on pv.`ptdvar_id` = p.ptdvar_id INNER JOIN product_sub_category as ps on ps.pr_sub_id = pv.ptd_sub_catgry_id where p.product_id ='$id'\";\n\t $data3=$this->get_results( $que...
[ "0.7812583", "0.7226798", "0.71757126", "0.71305156", "0.6873247", "0.68441623", "0.68376845", "0.6762982", "0.6726121", "0.667287", "0.6649688", "0.66305715", "0.6607295", "0.6576784", "0.6576784", "0.6576784", "0.6533679", "0.65196854", "0.65163", "0.6481267", "0.6479098", ...
0.82807773
0
Run the database seeds.
public function run() { $roleAdmin = new Role(); $roleAdmin->name = 'Administrator'; $roleAdmin->slug = 'administrator'; $roleAdmin->description = 'manage administration privileges'; $roleAdmin->save(); $roleUser = new Role(); $roleUser->name = 'User'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
vim: ts=4 sw=4 ai:
function apigen($data, array $gens, $options) { // working directory $repo=\Nette\Utils\Strings::webalize($url=$data['repository']['url']); $pwd=realpath(ROOT_DIR.'/repository'); if (!file_exists($pwd.='/'.$repo)) { mkdir($pwd); } // console $cmd=function ($command, $arg=NULL) use ($pwd) { $args=func_get_a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yy_r83(){return; }", "function yy_r153(){ return; }", "function yy_r113()\n {\n return;\n }", "private function _i() {\n }", "function varDeclarationConvert()\n {\n // $strposdolar = strpos();\n }", "function yy_r111(){ return; }", "function runkit_lint($co...
[ "0.5572729", "0.5467487", "0.5327022", "0.5320263", "0.5268901", "0.5237494", "0.51611423", "0.5091914", "0.49905646", "0.49889332", "0.49783155", "0.4951427", "0.4939384", "0.4933886", "0.48903957", "0.48809966", "0.48501047", "0.48459342", "0.48407114", "0.48249584", "0.478...
0.0
-1
/$this>Get=new Get(); $this>url=$this>Get>GetURL(); $this>url=$this>Get>GetRewriteMatch();
public function GetHTML(){ /*unset($this->url[0]); $cnt=1; foreach($this->url as $v){ if(count($this->url)==$cnt && $v>0 && is_numeric($v)){ //$this->out_url.=$v.'/'; } else $this->out_url.=$v.'/'; $cnt++; }*/ $next=$this->list['current']+1; $prev=$this->list['current']-1; $li...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(){\n\t\t$this->request = $_REQUEST;\n\t\t$this->get = $_GET;\n\t\t$this->post = $_POST;\n\t\t$this->checkHtaccess();\n\t}", "public function __construct()\n\t{\n\t\t$this->uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';\n\t\t$this->method = isset($_SERVER['REQUEST...
[ "0.62460595", "0.62101996", "0.6179156", "0.6078745", "0.60286623", "0.6012724", "0.59758365", "0.59691864", "0.595355", "0.59461904", "0.5921252", "0.5878194", "0.5868297", "0.58500016", "0.5828836", "0.5795395", "0.5781789", "0.5760737", "0.5760601", "0.5749422", "0.5731805...
0.0
-1
/$this>Get=new Get(); $this>url=$this>Get>GetURL(); $this>url=$this>Get>GetRewriteMatch();
public function GetAdminHTML(){ /*unset($this->url[0]); $cnt=1; foreach($this->url as $v){ if(count($this->url)==$cnt && $v>0 && is_numeric($v)){ //$this->out_url.=$v.'/'; } else $this->out_url.=$v.'/'; $cnt++; }*/ $next=$this->list['current']+1; $prev=$this->list['current']-1;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(){\n\t\t$this->request = $_REQUEST;\n\t\t$this->get = $_GET;\n\t\t$this->post = $_POST;\n\t\t$this->checkHtaccess();\n\t}", "public function __construct()\n\t{\n\t\t$this->uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';\n\t\t$this->method = isset($_SERVER['REQUEST...
[ "0.6246088", "0.62104636", "0.6180162", "0.6079397", "0.60276186", "0.60145605", "0.5975488", "0.59697837", "0.59542394", "0.59474164", "0.592135", "0.58795863", "0.58692807", "0.58498526", "0.5829711", "0.57947385", "0.5782005", "0.57624394", "0.57587624", "0.574976", "0.573...
0.0
-1
Run the database seeds.
public function run() { Shifts::create( [ "shift"=>0, "time"=>"00:00:00" ] ); Shifts::create( [ "shift"=>1, "time"=>"00:30:00" ] ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Display a listing of the resource.
public function index() { $contatos = FaleConosco::orderByDesc('created_at')->paginate(); return view('admin.fale-conosco.index', compact('contatos')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $data = $request->request->all(); $validator = $this->validator($data); if($validator->fails()) { return back()->withErrors($validator)->withInput(); } FaleConosco::create($data); flash('Mensagem envida com suc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.683...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Adds a header parameter
public function addHeader(string $name, string $value = null) { if (!is_null($value)) { return $this->set('headers', $name, $value); } return $this->set('headers', $name, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHeader($header);", "public function addHeader($name, $value);", "public function addHeader($name, $value);", "public function addHeader()\n {\n }", "public function setHeader($header = null, $value=null)\n{\n if($header && !is_null($value))\n {\n $header .= ': '. $val...
[ "0.8166975", "0.77107227", "0.77107227", "0.7663986", "0.7597182", "0.7557023", "0.75161093", "0.7508732", "0.7501712", "0.7491212", "0.7343465", "0.73419607", "0.73210216", "0.7253538", "0.7240446", "0.7239857", "0.72092545", "0.7133277", "0.71212727", "0.7105096", "0.704522...
0.6134667
98
Returns either the header value given the name or the all headers
public function getHeaders(string $name = null) { if (is_null($name)) { return $this->get('headers'); } return $this->get('headers', $name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHeader($name) {\r\n\t\t$name = $this->_normalizeHeader ( $name );\r\n\t\tforeach ( $this->headers as $header ) {\r\n\t\t\tif ($header ['name'] == $name) {\r\n\t\t\t\treturn $header ['value'];\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function header($name) {\n return isset($this->headers[$name])...
[ "0.80958045", "0.7657978", "0.7603035", "0.73604316", "0.73467886", "0.72380173", "0.71976876", "0.7190976", "0.7190976", "0.7162746", "0.7128431", "0.71279097", "0.71083957", "0.7102678", "0.7088638", "0.7071271", "0.70474917", "0.70329815", "0.6910702", "0.689678", "0.68516...
0.0
-1
Removes a header parameter
public function removeHeader(string $name) { return $this->remove('headers', $name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteHeader ($param)\n {\n unset($this->header[$param]);\n }", "public function removeHeader($header)\n {\n if ($this->isHeaderSet($header))\n {\n unset($this->headers[$header]);\n }\n }", "public function remove($header) {\n\n\t\tunset($this->_headers[$header]);\n...
[ "0.8084849", "0.7644898", "0.7629266", "0.758609", "0.7399265", "0.7376662", "0.72613996", "0.70685136", "0.70685136", "0.7049663", "0.6974639", "0.6931676", "0.68577874", "0.68537635", "0.6809737", "0.66980386", "0.6687525", "0.66279", "0.6594936", "0.65804076", "0.65804076"...
0.6171523
34
Apply plugin modifications to Composer
public function activate(Composer $composer, IOInterface $io) { $this->composer = $composer; $this->io = $io; if ($this->isWorkspace()) { $workspaceRoot = $this->getWorkspaceRoot(); $workspacePath = getcwd(); $workspace = $workspaceRoot->resolveWorkspac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUpTheme() {\n parent::setUpPlugin();\n\n $this->composer->addAction( 'edit_post', 'saveMetaBoxes' );\n $this->composer->addAction( 'wp_ajax_wpb_get_element_backend_html', 'elementBackendHtmlJavascript_callback' );\n $this->composer->addAction( 'wp_ajax_wpb_shortcodes_...
[ "0.6106509", "0.6075103", "0.59702986", "0.59070516", "0.5816272", "0.5803809", "0.57815146", "0.57666075", "0.57633096", "0.5751792", "0.5734745", "0.5730334", "0.57284015", "0.5682182", "0.5681651", "0.56356996", "0.56282705", "0.5626145", "0.5617321", "0.5602698", "0.56014...
0.0
-1
Method by which a Plugin announces its API implementations, through an array with a special structure. The key must be a string, representing a fully qualified class/interface name which Composer Plugin API exposes. The value must be a string as well, representing the fully qualified class name of the implementing clas...
public function getCapabilities() { return [ \Composer\Plugin\Capability\CommandProvider::class => CommandProvider::class, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registerClass( $fileName )\n\t{\n\t\tif(isset($this->alreadyRegistered[$fileName]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$potentialPaths = array(\n\t\t\t PIWIK_INCLUDE_PATH . \"/plugins/\". $fileName .\"/API.php\",\n\t \t);\n\n\t\t$found = false;\n\t\tforeach($potentialPaths as $path)\n\t\t{\n\t\t\...
[ "0.57349664", "0.5593698", "0.55421966", "0.55268186", "0.5526284", "0.5449645", "0.5446731", "0.5437083", "0.5413688", "0.5369309", "0.5247495", "0.5224264", "0.5201242", "0.51922446", "0.5162399", "0.50709885", "0.50577986", "0.50557554", "0.50482696", "0.5038578", "0.50385...
0.0
-1
$action, $function, $priority = 5
static function register_ajax($action, $function, $priority = 5){ add_action( 'learn_press_ajax_handler_' . $action, $function, $priority ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_action($actionname, $function, $params = array(), $priority = 10){\r\tglobal $actions;\r\t$actions[$actionname][$function] = array(\r\t\"name\" => $function,\r\t\"parameter\" => $params,\r\t\"priority\" => $priority\r\t);\r\t$actions[$actionname] = array_reverse($actions[$actionname]);\r\tuasort($acti...
[ "0.7255801", "0.7124861", "0.70071894", "0.6794869", "0.64771", "0.6457989", "0.6412131", "0.6290229", "0.62668747", "0.6189853", "0.61698043", "0.6164691", "0.6143514", "0.60948104", "0.6088836", "0.6088788", "0.60834366", "0.60780096", "0.60488075", "0.6015536", "0.60049826...
0.588377
34
valdiate user against details provided
function CheckUser($arrUser) { // get user id of verified user $verifiedUser = $this->VerifyUser($arrUser); if(!empty($verifiedUser) && $verifiedUser!=false) { // Set the values in session for a valid user // session_register("user"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }", "public function proce...
[ "0.63059473", "0.59854007", "0.5863776", "0.5852792", "0.5789712", "0.5787631", "0.57225025", "0.571633", "0.5681588", "0.5636676", "0.56219286", "0.5585584", "0.5560497", "0.554215", "0.5539382", "0.5517713", "0.55004513", "0.54800683", "0.5479567", "0.5476031", "0.543548", ...
0.0
-1
check given user enail if it is unique email id
function checkUniqueUser($reg_user_email='') { $check_unique = " SELECT * FROM cart_user WHERE user_email='".$reg_user_email."' "; $res_unique = mysql_query($check_unique); //echo '--<br>--'.mysql_num_rows($res_unique); die; if($res_unique && mysql_num_rows($res_u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function email_unique_check($email)\r\n\t{\r\n\t\t$isUnique = true;\r\n\r\n\t\t//Skapar anslutning till databasen.\r\n\t\t$db=new Database();\r\n\r\n\t\t//Hämtar de rader som har samma email.\r\n\t\t$result = $db->getUser($email);\r\n\r\n\t\t//Om det blev resultat.\r\n\t\tif($result)\r\n\t\t{\r\n\t\t\t//Finns det ...
[ "0.7696519", "0.75566983", "0.7325167", "0.7320113", "0.7315783", "0.72816914", "0.7247426", "0.7199922", "0.71831363", "0.7178915", "0.7175778", "0.7172039", "0.71505684", "0.7107536", "0.7047996", "0.70317966", "0.70260555", "0.7010627", "0.6981926", "0.69769526", "0.697561...
0.71944064
8
register user if unique email id
function registerUser($arrRegUser='') { //echo "<pre>1111"; print_r($arrRegUser); // die; $msg=''; $reg_password = $arrRegUser['reg_password']; $conf_reg_password = isset($arrRegUser['conf_reg_password'])?$arrRegUser['conf_reg_password']:''; $reg_user_em...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uniqueEmail() {\n if (CmsUser::model()->exists(\"id != \" . userId() . \" AND email='{$this->register_email}'\")) {\n $this->addError('register_email', 'Email already exist');\n }\n }", "public function register($data){\r\n\r\n if(($this->check_email($data['emai...
[ "0.7772809", "0.7133145", "0.70648634", "0.70648634", "0.70525664", "0.70399976", "0.69572014", "0.69243085", "0.69195986", "0.6864484", "0.68352437", "0.6828175", "0.6812498", "0.6794888", "0.679254", "0.6780071", "0.6756032", "0.674723", "0.673371", "0.6731181", "0.6715941"...
0.0
-1
check user login status
function checkUserStatus($msg='') { if(!isset($_SESSION['user']['valid']) || $_SESSION['user']['valid']!="loggedin") { $message = ($msg!='')? "?msg=".$msg : ''; header("location:/dummy/login/index.php".$message); exit; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function login_status()\n {\n if (isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] == 1) {\n return true;\n }\n // default return\n return false;\n }", "public function checkUserLogin()\n {\n if (isset($_SESSION[\"user_id\"])) ...
[ "0.79356825", "0.79288584", "0.78792083", "0.78505605", "0.77569336", "0.77103734", "0.7686583", "0.76713", "0.76537573", "0.76333827", "0.7577771", "0.7573455", "0.75633484", "0.7557706", "0.755698", "0.75535494", "0.7550131", "0.7549721", "0.75170904", "0.75170904", "0.7499...
0.0
-1
Given a raw regex in a string (and, optionally, a patternmodifiers string), return a string suitable for use as a preg pattern. The regex is wrapped in delimiters, with the modifiers (if any) appended.
public static function regexToPattern(string $regex, string $modifiers = '') : string { /* To convert a regex to a pattern, we must wrap the pattern in delimiters (we'll use a pair of forward slashes) and append the modifiers. We must also be sure to escape any unescaped occurrences of the delimiter within the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ereg_to_pcre($pattern, $modifiers = '')\n {\n static $digit = '\\d';\n static $upper = 'A-Z';\n static $lower = 'a-z';\n static $punct = '!\"#$%&\\'()*+,\\-.\\\\/:;<=>?@[\\\\\\\\\\\\]^_`{|}~';\n static $space = '\\s';\n static $blank = '\\t ';\n static $...
[ "0.6602519", "0.6337103", "0.5803064", "0.57774013", "0.5723809", "0.5645251", "0.56426895", "0.5634352", "0.56203336", "0.5583451", "0.55652314", "0.5496517", "0.5408959", "0.5368722", "0.53201616", "0.527659", "0.52755326", "0.5224181", "0.52211595", "0.51976997", "0.518277...
0.7747807
0
SyntaxChecking an Unknown Pattern Argument Return an error message if the given pattern argument or its underlying regular expression are not syntactically valid. Otherwise (if they are valid), FALSE is returned.
public static function patternError(string $pattern) : bool { /* To tell if the pattern has errors, we simply try to use it. To detect and capture the error is not so simple, especially if we want to be sociable and not tramp on global state (e.g., the value of $php_errormsg). So, if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function matchesRegularExpression($pattern)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::matchesRegularExpression', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "protected func...
[ "0.6521136", "0.6349733", "0.6339542", "0.6232159", "0.62218815", "0.6116058", "0.6031", "0.60169005", "0.58797723", "0.5850209", "0.5833874", "0.5807036", "0.5794807", "0.56443924", "0.5621445", "0.56179154", "0.56061167", "0.558527", "0.55737936", "0.55503786", "0.55464923"...
0.70914775
0
SyntaxChecking an Unknown Regex Return a descriptive error message if the given regular expression is invalid. If it's valid, false is returned.
public static function regexError(string $regex) : bool { return self::patternError(self::regexToPattern($regex)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validateRegularExpression($regex)\r\n {\r\n $error_string = null;\r\n\r\n // Set an error handler temporarily\r\n set_error_handler(\r\n function ($errno, $errstr) use (&$error_string) {\r\n $error_string = $errstr;\r\n },\r\n ...
[ "0.68059486", "0.66097593", "0.64409137", "0.6416913", "0.6205612", "0.6175282", "0.61411595", "0.6057761", "0.6028516", "0.5878618", "0.5828867", "0.5813979", "0.5792848", "0.5771505", "0.5767668", "0.56467766", "0.5574851", "0.5572244", "0.5555849", "0.553989", "0.54485947"...
0.71237725
0
get the logged in user (create one if no one is logged in)
public function testRefreshUserById_() { $user = $this->registerAndLoginTestingUser(); $data = [ 'user_id' => $user->id, ]; // send the HTTP request $response = $this->apiCall($this->endpoint, 'post', $data); // assert response status is correct ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLoggedInUser()\n{\n\tif(isLoggedIn()) {\n\t\treturn auth()->user();\n\t}\n\treturn null;\n}", "public static function getCurrentUser(){\r\n\t\treturn self::isLoggedIn() == true ? User::getUserById($_SESSION[\"id\"]) : null;\r\n\t}", "static function getCurrentUser()\r\n {\r\n retu...
[ "0.79075736", "0.7689682", "0.75464326", "0.75414014", "0.7541055", "0.7514673", "0.7490592", "0.7472287", "0.742072", "0.7416222", "0.74094206", "0.740845", "0.7397724", "0.7311969", "0.7294091", "0.72793037", "0.7278823", "0.7270481", "0.726679", "0.7266378", "0.7263766", ...
0.0
-1
send the HTTP request
public function testRefreshUserByToken_() { $response = $this->apiCall($this->endpoint, 'post', [], true); // assert response status is correct $this->assertEquals($response->getStatusCode(), '200'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}", "public function sendRequest()\n {\n }", "public function sendRequest( ) {\n\n }", "function send_request() { \n if(!$this->connect()) {...
[ "0.77487665", "0.75558245", "0.72942996", "0.72860277", "0.71147484", "0.70521975", "0.7030478", "0.70172954", "0.6968301", "0.6951445", "0.69361067", "0.67912334", "0.67827886", "0.6716604", "0.6668216", "0.66457397", "0.6617158", "0.6615988", "0.66106224", "0.6597891", "0.6...
0.0
-1
Display a listing of the resource.
public function index() { // $query = $request->input('searchStudent'); // $students = DB::table('students')->get(); $students = $this->apiBiz->findAll(); return view('student.index', compact('students')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // $statusid = DB::table('status')->orderBy("StatusId", 'asc'); $statusid = DB::table('status')->where('StatusName', 'like', '%student%')->select('StatusName')->get(); $students = collect($this->apiBiz->findAll()); // dd($students->where('statusId', 'like'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $time = $request->input('birthDate'); $year = ''; $month = ''; if($time != null){ $year .= substr(explode('-', $time)[0], 2, 2); $month .= substr(explode('-', $time)[1], 0, 2); } $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $biz = new StudentBusiness(); $student = $biz->findById($id); // return $student->birthDate; // return $student->statusId . ' ' . $student->firstName. ' '.$student->lastName . ' ' . $student->contact.' ' . $student->birthDate; $stausCurrent = DB::...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $statusName = $request->get('statusid'); $statusid = DB::table('status')->where("StatusName",$statusName)->first(); $this->validate( $request, [ 'firstName' => 'required|max...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $biz = new StudentBusiness(); $biz->destroy($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Created by PhpStorm. User: LC Date: 2016/3/14 Time: 16:17
function randnum($i) { $arr = array(); while (count($arr) < $i) { $arr[] = rand(1, 9); $arr = array_unique($arr); } $_SESSION['vcode'] = implode($arr); return implode($arr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __() {\n }", "private function _i() {\n }", "public function helper()\n\t{\n\t\n\t}", "final private function __construct(){\r\r\n\t}", "private function __construct () {}", "private function __construct() {\n \n }", "private function __construct() {\n \n ...
[ "0.6216281", "0.60491556", "0.6044055", "0.6025095", "0.5941889", "0.5932091", "0.5932091", "0.5932091", "0.59231323", "0.59231323", "0.59231323", "0.5906944", "0.5892695", "0.5892695", "0.5892695", "0.5892695", "0.5892695", "0.5892695", "0.5892695", "0.5892695", "0.5892695",...
0.0
-1
data per database mysql
function data_sql($data){ // Creo una array dividendo la data sulla base dello slash $array = explode("/", $data); // Riorganizzo gli elementi nello stile YYYY/MM/DD $data_sql = $array[2]."/".$array[1]."/".$array[0]; // Restituisco il valore della data in formato sql return $data_sql; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MetaDatabases() {}", "public function readDatabase() {\n\t\t$q = $this->pdo->query(\"SELECT count(*) FROM `Articles`\");\n\t\t$count = $q->fetch(PDO::FETCH_ASSOC)[\"count(*)\"];\n\t\t$numFetched = 0;\n\t\t$start = 0;\n\t\t// Fetch only 50 articles at a time to limit the memory impact\n\t\twhile($numFetc...
[ "0.64986527", "0.649548", "0.6354638", "0.6343658", "0.6329468", "0.6316853", "0.6311282", "0.6299181", "0.61382073", "0.61338985", "0.6121442", "0.6031705", "0.60232997", "0.60213965", "0.59955525", "0.5985018", "0.5983465", "0.59621286", "0.5947805", "0.59232426", "0.592214...
0.0
-1
Mi permette di prelevare singoli dati dalle tabelle aventi come chiave primaria ID
function getDati($tabella,$oggetto,$chiave){ global $db_host, $db_user, $db_pass, $db_name; $conn = mysql_connect($db_host, $db_user, $db_pass) or die("Errore nella connessione a MySql da getDati: " . mysql_error()); mysql_select_db($db_name,$conn) or die("Errore nella selezione del db: " . mysql_error()); $query ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tampil_data_id($tabel,$where,$id)\n {\n $row = $this->db->prepare(\"SELECT * FROM $tabel WHERE $where = :id,:teks,:label,:predict\");\n $row->execute(array($id));\n return $hasil = $row->fetch();\n }", "function idData($table){\n $array=get($table,'id');\n $id=ma...
[ "0.7066148", "0.66215706", "0.6411942", "0.6377127", "0.63644886", "0.6275847", "0.6221375", "0.6192752", "0.6167565", "0.61421883", "0.61270535", "0.610049", "0.610049", "0.60845965", "0.60799706", "0.6070238", "0.60698706", "0.6057903", "0.6057033", "0.6040181", "0.6028572"...
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $proposal = Proposal::create($request->all()); return view('proposals.thanks-for-your-proposal'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show(Proposal $proposal) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Proposal $proposal) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.683...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Proposal $proposal) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy(Proposal $proposal) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
/ Author: Tuan ThaiManh Kiem tra truong firstname
function check_firstname_input($param){ $mess = ''; if(empty($param)){ $mess = "Không được bỏ trống"; } else if (!preg_match("/^[a-zA-Z ]*$/",$param)){ $mess = "Chỉ bao gồm kí tự và dấu cách"; } else{ $mess = "Hợp lệ"; } return $mess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFirstname() {}", "public function getFirstname(): string;", "public function requestFirstname();", "public function getHonoreeFirstName();", "public function getFirstName();", "public function getCustomerFirstname();", "public function getFirstName() {}", "public function getFirstN...
[ "0.7921772", "0.7620307", "0.7487284", "0.7456547", "0.721829", "0.71984464", "0.7185958", "0.7185958", "0.71715534", "0.71599466", "0.7147867", "0.7145913", "0.7145328", "0.7100555", "0.70992273", "0.7090112", "0.70661634", "0.7065294", "0.7053454", "0.70271575", "0.7014833"...
0.0
-1
Kiem tra truong lastname
function check_lastname_input($param) { $mess = ''; if(empty($param)){ $mess = "Không được bỏ trống"; } else if (!preg_match("/^[a-zA-Z ]*$/",$param)){ $mess = "Chỉ bao gồm kí tự và dấu cách"; } else{ $mess = "Hợp lệ"; } return $mess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastname() {}", "public function getHonoreeLastName();", "public function getLastName() {}", "public function getLastName() {}", "public function getLastname(): string;", "public function getLastName();", "public function getLastname() {\n return $this->getValue('lastname');\n ...
[ "0.82833356", "0.8215965", "0.8039226", "0.8039226", "0.80126125", "0.79626787", "0.7865804", "0.77207506", "0.77158135", "0.7673189", "0.7628109", "0.7604642", "0.7572319", "0.7571184", "0.7567334", "0.7542529", "0.75313675", "0.7519658", "0.75162846", "0.75162846", "0.75162...
0.0
-1
Kiem tra truong password
function check_password_input($param){ $mess = ''; if(empty($param)){ $mess = "Không được bỏ trống"; } else{ $mess = "Hợp lệ"; } return $mess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function olvidoPassword(){\n\t}", "public function necesitaCambiarPassword();", "public function getPassword() {}", "public function getPW() {}", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public fu...
[ "0.78155696", "0.7442771", "0.7349329", "0.73190415", "0.73074764", "0.73074764", "0.73074764", "0.73074764", "0.73074764", "0.73074764", "0.73074764", "0.72993547", "0.7289614", "0.716535", "0.71208894", "0.71074516", "0.70528793", "0.70528793", "0.70528793", "0.70528793", "...
0.0
-1
Kiem tra truong username
function check_username_input($param){ $mess = ''; if(empty($param)){ $mess = "Không được bỏ trống"; } else if (!preg_match("/[a-zA-Z0-9]/",$param)){ $mess = "Chỉ bao gồm kí tự và chữ số"; } else{ $mess = "Hợp lệ"; } return $mess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function username(): string\n\t{\n\t\treturn \"username\";\n\t}", "public function getUsername() {}", "public function username()\n {\n }", "public function getUsername();", "public function getUsername();", "public function getUsername();", "public function getUsername();", "pub...
[ "0.75679445", "0.7555776", "0.7520692", "0.7496876", "0.7496876", "0.7496876", "0.7496876", "0.7496876", "0.7447035", "0.7418377", "0.7418377", "0.7346736", "0.7344816", "0.73431975", "0.7331131", "0.7322883", "0.7252877", "0.72491103", "0.72491103", "0.72491103", "0.7240289"...
0.0
-1
Kiem tra truong email
function check_email_input($param){ $mess = ''; if (empty($param)) { $mess = "Không được bỏ trống"; } else if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$param)) { $mess = "Sai định dạng email"; } else{ $mess = "Hợp lệ"; } return $mess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function TesEmail()\n\t{\n\t\t// $template = $query_template->row();\n\n\t\t$data = array(\n\t\t\t'judul' => \"EMAIL TELAH TERDAFTAR\",\n\t\t\t'tanggal' => date(\"d-M-Y\"),\n\t\t\t'description' => \"Selamat Email anda telah Terdaftar di Mitrarenov.com\",\n\t\t\t'nama' => \"Fajar Nugraha\",\n\t\t\t'project_i...
[ "0.71431905", "0.6978897", "0.694673", "0.6867452", "0.6809975", "0.67147124", "0.66876864", "0.6650872", "0.6632203", "0.65963584", "0.6584266", "0.6570002", "0.6533805", "0.6527322", "0.6522361", "0.65030825", "0.6473492", "0.64679843", "0.6462684", "0.6435584", "0.6431067"...
0.0
-1
Ham test du lieu dau vao
function test_input($param) { $param = trim($param); $param = stripcslashes($param); $param = htmlspecialchars($param); return $param; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testMajuscule($valeurTeste){\r\n $retour = \"faux\";\r\n if($valeurTeste>=\"A\" && $valeurTeste<=\"Z\"){\r\n $retour = \"vrai\";\r\n }\r\n return $retour;\r\n }", "function testMinuscle($valeurTeste){\r\n $i=1;\r\n f...
[ "0.6667582", "0.6667217", "0.6631266", "0.6597926", "0.63365287", "0.6194477", "0.6149859", "0.6137035", "0.61144394", "0.60152215", "0.60126394", "0.6005855", "0.6005141", "0.5994297", "0.5968745", "0.5967156", "0.59372616", "0.59021294", "0.589845", "0.5895275", "0.5888672"...
0.0
-1
=========================================================== logs error ===========================================================
function log($format=false, $address=false, $title='') { $out = ''; if ($format === false) $format = self::$log_format; switch ($format) { case 'text': $out .= $this->get_message()."\n\n"; break; case 'email': case 'mail': ob_start(); echo $this->get_message(); echo "\nFor URL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logError() {}", "public function printErrorLog() {}", "public function logError(){\n AbstractLoggedException::$dbMessage .= \"Invalid URI requestd; \";\n parent::log();\n }", "public function error()\n {\n $this->appendLog(\n 'error',\n ...
[ "0.85224754", "0.7958447", "0.7931614", "0.7779453", "0.77666825", "0.76505923", "0.7593262", "0.7555741", "0.7373107", "0.73088884", "0.7303006", "0.7270531", "0.72672063", "0.72642535", "0.7258945", "0.720155", "0.71697223", "0.71467865", "0.71467865", "0.7090592", "0.70904...
0.0
-1
=========================================================== ERROR FORMATTING ===========================================================
function to_html() { $type = get_class($this); $file = $this->get_file(); $line = $this->get_line(); $msg = nl2br($this->get_message()); $trace = "<li>".str_replace("\n", "</li>\n<li>", $this->get_trace_as_string())."</li>\n</ul>"; ob_start(); include SAINT_ROOT.'/templates/exception.phtml'; return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _getErrorString();", "public function get_error();", "public function get_error();", "public function errors();", "public function errors();", "function errorFull() {\r\n $erro = $this->error();\r\n\t\t if ($erro == 1) $erroFull = \"erro 001\";\r\n\t\t return $erroFull;\r\n...
[ "0.7287542", "0.70601386", "0.70601386", "0.70434785", "0.70434785", "0.69134915", "0.68881905", "0.6852148", "0.68269145", "0.6814477", "0.6803933", "0.680084", "0.6760573", "0.67282194", "0.67161006", "0.67161006", "0.6704437", "0.6702048", "0.67007", "0.6692818", "0.668814...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $validation= $request->validate([ 'name' => 'required', 'father_name' => 'required', 'mother_name' => 'required', // 'department' => 'required', 'registration_no' => 'required', 'sessio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
funcion para listas cotizaciones en estado tramite
public function getCotizaciones($tipoUsuario, $id_session) { if ($tipoUsuario == 1) { $table = "(SELECT f.id_cotizacion,case cl.tipo when 1 then p.nombre ||' '|| p.apellido1 ||' '|| COALESCE (p.apellido2,'') else cl.nombre_empresa end as cliente, t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('tipo_interfaz','...
[ "0.7589448", "0.71729285", "0.7140789", "0.6982828", "0.68293583", "0.6797797", "0.67859155", "0.6774024", "0.67709565", "0.6734052", "0.66968995", "0.6692716", "0.667764", "0.6638074", "0.6630869", "0.6609392", "0.657137", "0.6559297", "0.6558902", "0.6556457", "0.65415454",...
0.6326585
45
Funcion para obtener el detalle de seguimiento
public function getDetalleSeguimiento($id_cotizacion) { $query = new static; $query = DB::select("SELECT ds.id_detalle_seguimiento, ds.fecha :: Date AS fecha_evento, ds.evento, ds.detalle as descripcion FROM ldci.tb_cotizacion AS c JOIN ldci.tb_flete A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDetalle();", "public function findDetalleRecolectado()\r\n\t\t{\r\n\t\t\t$findModel = self::findDetalleRecaudacionModel();\r\n\t\t\treturn $findModel->orderBy([\r\n\t\t\t\t\t\t\t\t\t'lapso' => SORT_ASC,\r\n\t\t\t\t\t\t\t\t\t'fecha_pago' => SORT_ASC,\r\n\t\t\t\t\t\t\t\t\t'codigo' => SORT_ASC,\r...
[ "0.75706446", "0.6766317", "0.676306", "0.6670843", "0.6616994", "0.6480164", "0.64022785", "0.6396824", "0.63166064", "0.6307184", "0.62255883", "0.6199601", "0.6192451", "0.6179826", "0.61608446", "0.61008936", "0.60871816", "0.60735637", "0.6069813", "0.60557556", "0.60472...
0.58818287
36
Funcion para guardar el detalle de rastreo de la cotizacion
public function guardarRastreo($id_flete, $fecha, $evento, $descripcion, $id_detalle_seguimiento, $id_session) { DB::beginTransaction(); for ($i = 0; $i < count($fecha); $i++) { if ($id_detalle_seguimiento[$i] == null) { $query_detalle_seguimiento = new static; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guardarReclamo()\n\t\t{\n\t\t}", "function guardarDetalle($detalle){\n\n\t\t$post['_put_movimientointerno_detalle'] = $detalle;\n\t\tlog_message('DEBUG','#TRAZA|TRAZ-COMP-ALMACEN|MOVIMIENTODEPOSITOSRECEP|guardarDetalle($detalle) $post: >> '.json_encode($post));\n\t\t$url = AJST.'/services/asp/ALMDataSe...
[ "0.612793", "0.56373763", "0.5555306", "0.5527211", "0.54493666", "0.5442599", "0.5345528", "0.53347933", "0.53206545", "0.5298811", "0.52986217", "0.5283776", "0.5273659", "0.52626824", "0.526124", "0.5245727", "0.5221243", "0.5218153", "0.51922435", "0.51862806", "0.5143285...
0.55029577
4
Funcion para guardar el detalle de rastreo del flete sin imagenes
public function guardarRastreoSImagen($id_flete, $tblRastreo, $id_session) { DB::beginTransaction(); foreach ($tblRastreo as $evento) { if ($evento->Id_detalle_seguimiento == null) { $query_detalle_seguimiento = new static; $query_detalle_seguimiento = DB:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subirFotoElemento($campo, $tipo, $id, $refresh, $backdir) {\n\t\tif($_FILES[$campo]['type'] != 'image/jpeg' AND $_FILES[$campo]['type'] != 'image/gif' AND $_FILES[$campo]['type'] != 'image/png') {\n\t\t\t$error_img = TRUE;\n\t\t\t$msg = 'El formato de imagen no es válido, sólo se aceptan JPG, GIF o PNG';\...
[ "0.5904372", "0.5841111", "0.5722619", "0.56508213", "0.5606408", "0.55895036", "0.5568186", "0.553821", "0.5516452", "0.5494314", "0.54836273", "0.53789437", "0.53633827", "0.5363098", "0.531766", "0.52821064", "0.52670884", "0.5260609", "0.5238725", "0.5225596", "0.5211145"...
0.0
-1
Funcion para guardar la imagen del rastreo de la cotizacion
public function guardarImagenRastreo($id_flete, $url, $imageName, $id_session) { DB::beginTransaction(); $query_imagen = new static; $query_imagen = DB::select('INSERT INTO ldci.tb_imagen( url, nombre, usuario_grabacion, fecha_grabacion) VALUES (?, ?,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guardar_imagenes($idc=null,$seccion){ \r\r\n if (!is_null($idc))\r\r\n $ims = zen_deserializar($this->padre->bd->seleccion_unica(\"imagenes from contenidos where idc=\".$idc)); \r\r\n else \r\r\n $ims = array();\r\r\n //Guardar imagenes:\r\r\n $errores = \"\";\r\r\n zen___carga_funciones(\"zen_f...
[ "0.6707583", "0.65699774", "0.65260786", "0.64860356", "0.6461426", "0.6355852", "0.6242718", "0.6101264", "0.6030998", "0.5993907", "0.59734964", "0.5955067", "0.5953109", "0.5947988", "0.59456724", "0.593619", "0.59319764", "0.59277403", "0.59179574", "0.59158933", "0.59057...
0.5449092
76
Funcion para extraer imagenes de rastreo
public function getImagen($id_cotizacion) { $id_flete = new static; $id_flete = DB::select('SELECT f.id_flete FROM ldci.tb_flete AS f WHERE f.id_cotizacion = ?', [$id_cotizacion]); $query = new static; $query = DB::select('select i.nombre,i.url from ldci.tb_detalle_imagen det ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redimensionne_image_petit($photo)\n{\n\tglobal $photo_redim_taille_max_largeur, $photo_redim_taille_max_hauteur;\n\n\tif((!preg_match(\"/^[0-9]{1,}$/\", $photo_redim_taille_max_largeur))||($photo_redim_taille_max_largeur<=0)) {\n\t\t$photo_redim_taille_max_largeur=35;\n\t}\n\n\tif((!preg_match(\"/^[0-9]{1...
[ "0.6357741", "0.6304501", "0.6279307", "0.6161989", "0.6120589", "0.6120589", "0.61119133", "0.60061806", "0.5966802", "0.5960528", "0.591074", "0.591074", "0.591074", "0.591074", "0.58811456", "0.58558255", "0.58129925", "0.5787303", "0.57127684", "0.5696688", "0.5665156", ...
0.0
-1
Metodo para validar si existe una imagen
public function existeImagen($imagen) { $query = new static; $query = DB::select('select * from ldci.tb_imagen where nombre=?', [$imagen]); if (empty($query)) return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function file_is_valid_image($path)\n {\n }", "private function isValidImage() {\r\n\t\t\treturn in_array($this->extension, $this->extAllowed) ? true : false;\r\n\t\t}", "private function validatePhoto()\n {\n if (empty($this->photo['name'])) {\n $this->updateEditProfile();\n ...
[ "0.73605204", "0.6905445", "0.6844959", "0.6806867", "0.66387385", "0.6616085", "0.6581344", "0.6579421", "0.647616", "0.646593", "0.6463263", "0.6459568", "0.64401466", "0.64385164", "0.64296144", "0.6421179", "0.6419258", "0.6418464", "0.63864833", "0.637504", "0.63741165",...
0.6046322
47
Funcion para eliminar una imagen
public function eliminarImagen($imagen) { DB::beginTransaction(); $query_imagen = new static; $query_imagen = DB::select('DELETE FROM ldci.tb_imagen WHERE nombre=? RETURNING id_imagen', [$imagen]); if (empty($query_imagen)) { DB::rollBack(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarImagenArreglo($campo, $tabla, $llavePrimaria, $campoLlave)\n {\n $data=$this->analisisRiesgo->getNombreImagenTabla($campo, $tabla, $llavePrimaria, $campoLlave);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRi...
[ "0.6601605", "0.65859026", "0.6583458", "0.6568819", "0.65631473", "0.64764065", "0.6476341", "0.6449532", "0.63415146", "0.6300948", "0.62666917", "0.62272453", "0.621898", "0.621622", "0.6192425", "0.61273396", "0.61229897", "0.6095876", "0.6090222", "0.6076658", "0.6061736...
0.59912336
22
funcion oara eliminar un evento de una rastreo
public function eliminar($id_detalle, $id_session) { $query = new static; $query = DB::UPDATE('UPDATE ldci.tb_detalle_seguimiento SET estado=-1, usuario_modificacion=?, fecha_modificacion=now() WHERE id_detalle_seguimiento=?', [$id_sess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeEvent($event);", "public function onRemove();", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function postEventDel();", "function redart_undo_recurrence_oembed_logic() {\r\n\r\n\tif ( ! class_exists( ...
[ "0.64792556", "0.64071405", "0.6045015", "0.6045015", "0.6045015", "0.6045015", "0.59901845", "0.5973385", "0.59398854", "0.5917276", "0.5905676", "0.59022427", "0.58840626", "0.5881692", "0.586071", "0.5855769", "0.58152634", "0.57878613", "0.5772295", "0.5753442", "0.575202...
0.0
-1
This function takes a customer ID and returns a 2 dimensional array of all his favorites and all the elements belonging to those favorites. Connects to the CustomCupcakes database and queries the favorites table. It then builds the arrays off the results found.
function getFavoritesFromDB($customerID) { $con = mysql_connect("localhost", "DBandGUI", "narwhal"); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("CustomCupcakes",$con) or die("Unable to select database: " . mysql_error()); $query = "SELECT favorite_ID,cupcakeFlavor_ID,cupcakeIcing_I...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFavoritesWithIDs(){\n\n\t$id = getUserID();\n\t$query = \"SELECT unique_networks.unique_network_id, networks.area, networks.state, activities.activity_name FROM favorites, networks, activities, unique_networks WHERE user_id = \".$id.\"\"\n\t.\" AND favorites.unique_network_id = unique_networks.unique_n...
[ "0.69129306", "0.6623661", "0.6391229", "0.6348808", "0.6324056", "0.6254882", "0.62117887", "0.61436236", "0.60608274", "0.6024527", "0.59506977", "0.59270066", "0.59224254", "0.5846817", "0.5703129", "0.5675031", "0.5634525", "0.55993056", "0.55988324", "0.55960214", "0.557...
0.79836535
0
Takes in a favorite for the user and stores it in the table. This function receives both the customer's ID and his favorite to be added. This favorite is then inserted into the Favorites table
function addFavoriteToDB($arrToAdd, $customerID) { $con = mysql_connect("localhost", "DBandGUI", "narwhal"); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("CustomCupcakes", $con) or die('Could not select db: ' . mysql_error()); // This query retrieves the current highest favorite_ID i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_favorite() {\n\t\t\tif ($this->userInfo['users']['id']) {\n\t\t\t\t$uid = $this->userInfo['users']['id'];\n\t\t\t}\n\t\t\tif ($this->request->is('get')) {\n\t \t\t\t$user_id = $_GET['user_id'];\n\t\t\t\t$favorite = $_GET['favorite'];\n\t \t\t$content_id = $_GET['content_id'];\n\t\t\t\t$cre...
[ "0.68174607", "0.6816221", "0.680767", "0.66911525", "0.66699564", "0.65925646", "0.65797734", "0.65682685", "0.6556725", "0.655053", "0.65243995", "0.64799565", "0.6475596", "0.64518684", "0.63547343", "0.6354329", "0.63461024", "0.6319612", "0.6306823", "0.6298512", "0.6274...
0.65145314
11
This function gets the sales info of flavors from the database. This information is stored in an array that links the flavor's name and the amount purchased.
function getFlavorsSalesFromDB() { $con = mysql_connect("localhost", "DBandGUI", "narwhal"); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("CustomCupcakes", $con) or die('Could not select db: ' . mysql_error()); $query = "SELECT flavor_Name,purchase_Amount FROM CupcakeFlavor;"; $res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFlavors()\r\n{\r\n return array(\"grasshopper\",\"maple\",\"carrot\", \"caramel\",\"velvet\",\"lemon\",\"tiramisu\");\r\n}", "public function print_flavors()\n {\n $flavors = $this->service->FlavorList();\n while($flavor = $flavors->Next()) {\n printf(\"%2d) Flavor %s h...
[ "0.61481136", "0.5762628", "0.5510485", "0.54369557", "0.5428568", "0.5316071", "0.5233684", "0.52135277", "0.5164671", "0.5098005", "0.50960904", "0.50871706", "0.50125307", "0.4981203", "0.4852653", "0.4850647", "0.4839956", "0.48161188", "0.48127523", "0.47822845", "0.4746...
0.76264864
0
This function gets the sales info of icing from the database. This information is stored in an array that links the icing's name and the amount purchased.
function getIcingsSalesFromDB() { $con = mysql_connect("localhost", "DBandGUI", "narwhal"); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("CustomCupcakes", $con) or die('Could not select db: ' . mysql_error()); $query = "SELECT icing_Name,purchase_Amount FROM CupcakeIcing;"; $result...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInventoryAndSales() {\n\t\t$isql=\"SELECT i.id as value,i.item_name as label,i.sell_price,i.quantity FROM inventory i where rstatus='A' and quantity > 0\";\t\t\n\t\t$iresult=$this->runQuery('getAll',$isql);\n\t\t\n\t\t$sosql=\"SELECT so.id as so_id,so.product_id as inv_id,p.item_name as inv_name...
[ "0.6427945", "0.6399786", "0.6224914", "0.6143071", "0.6053818", "0.6030299", "0.5982133", "0.5966389", "0.5936062", "0.58992946", "0.5891936", "0.58908105", "0.5872475", "0.58677435", "0.5841094", "0.58192396", "0.57911843", "0.57908154", "0.5780632", "0.57553726", "0.574795...
0.7831773
0
This function gets the sales info of toppings from the database. This information is stored in an array that links the toppings's name and the amount purchased.
function getToppingsSalesFromDB() { $con = mysql_connect("localhost", "DBandGUI", "narwhal"); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("CustomCupcakes", $con) or die('Could not select db: ' . mysql_error()); $query = "SELECT topping_Name,purchase_Amount FROM CupcakeTopping;"; $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getTicketsReferentSales()\n {\n $this->loadModel('Users');\n $users = $this->Users->find('all')->toArray();\n $data = [];\n\n foreach ($users as $user) {\n $count = $this->Tickets->find('all')->where(['paid' => 1, 'user_code' => $user->code])->count();\n\...
[ "0.6344129", "0.60984975", "0.60557747", "0.60453016", "0.5764402", "0.5628634", "0.56096804", "0.5603209", "0.55735004", "0.55586267", "0.55520475", "0.55459386", "0.5516119", "0.5506285", "0.5486676", "0.5458531", "0.5452397", "0.5412941", "0.54117864", "0.54073715", "0.540...
0.73986506
0
This function gets the sales info of fillings from the database. This information is stored in an array that links the filling's name and the amount purchased.
function getFillingsSalesFromDB() { $con = mysql_connect("localhost", "DBandGUI", "narwhal"); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("CustomCupcakes", $con) or die('Could not select db: ' . mysql_error()); $query = "SELECT filling_Name,purchase_Amount FROM CupcakeFilling;"; $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIcingsSalesFromDB()\n{\n\t$con = mysql_connect(\"localhost\", \"DBandGUI\", \"narwhal\");\n\n\tif(!$con) { die('Could not connect: ' . mysql_error()); }\n\n\tmysql_select_db(\"CustomCupcakes\", $con) or die('Could not select db: ' . mysql_error());\n\n\t$query = \"SELECT icing_Name,purchase_Amount FROM...
[ "0.6411483", "0.6274318", "0.60811806", "0.5664742", "0.5556389", "0.5523418", "0.5518602", "0.5490816", "0.54526174", "0.54459536", "0.54419196", "0.54417664", "0.5440585", "0.5422967", "0.54215235", "0.54070294", "0.5393089", "0.53468114", "0.53206", "0.5303705", "0.5268643...
0.780674
0
This function takes in an array of values that is not only updated into the Orders, but also the four attribute tables as well
function updateSaleToDB($arrOfInfo) { $customerID = $arrOfInfo['customerID']; $flavor = $arrOfInfo['cupcakeFlavor_ID']; $icing = $arrOfInfo['cupcakeIcing_ID']; $topping = $arrOfInfo['cupcakeTopping_ID']; $filling = $arrOfInfo['cupcakeFilling_ID']; $quantity = $arrOfInfo['cupcakeQuantity']; $con = mysql_connect(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_tables_with_attributes($array, $tables, $old = \"\")\n{\n\tforeach($array as $key => $value)\n\t{\n\t\tif(is_string($key)) // if key is string, so leads to object (single table)\n\t\t{\n\t\t\t$key = mb_strtolower($key, 'UTF-8');\n\t\t\tif(is_array($value)) // array of values means there is more sub...
[ "0.5882825", "0.5827351", "0.57179797", "0.56807566", "0.5626977", "0.5576254", "0.5534835", "0.55264163", "0.552104", "0.5495844", "0.54754657", "0.5475086", "0.5429869", "0.5410633", "0.5405353", "0.5371057", "0.5357028", "0.5328367", "0.5328343", "0.5324135", "0.5322015", ...
0.49362737
86
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }"...
[ "0.8399559", "0.8375976", "0.8375976", "0.8342963", "0.825244", "0.824597", "0.82116634", "0.81456405", "0.81095356", "0.80819404", "0.79899764", "0.7988185", "0.79821676", "0.7959435", "0.79494536", "0.79476935", "0.7925", "0.7913219", "0.78985447", "0.7892049", "0.7888783",...
0.0
-1
Get the validator for the request.
public function validator() { $validator = validator($this->all(), [ 'name' => 'required|max:255', 'server_provider_id' => ['required', Rule::exists('server_providers', 'id')->where(function ($query) { $query->where('user_id', $this->user()->id); })], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidator()\n {\n return $this->validator;\n }", "public function getValidator()\n {\n return $this->validator;\n }", "public function getValidator()\n {\n return $this->validator;\n }", "public function getValidator() {\n return $this->__valid...
[ "0.826964", "0.826964", "0.826964", "0.80724704", "0.7961794", "0.7877677", "0.78191733", "0.77342093", "0.77342093", "0.769483", "0.75947446", "0.75829065", "0.7540853", "0.7513404", "0.7444067", "0.7301614", "0.7284197", "0.72810364", "0.7264537", "0.72551924", "0.7168994",...
0.5898993
95
Validate the region and size for the provider.
protected function validateRegionAndSize($validator) { return $validator->after(function ($validator) { $provider = $this->user()->serverProviders()->find($this->server_provider_id); if (! $provider->validRegion($this->region)) { $validator->errors()->add('region', '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_address_region_validation()\n {\n /*\n * Valid\n */\n $validRegionLocation = Location::factory()->make([\n 'addressRegion' => 'Greater Manchester',\n ]);\n $validRegionData = $validRegionLocation->toArray();\n $this->post($this->...
[ "0.6237249", "0.6020606", "0.5937368", "0.58531606", "0.5779245", "0.56240654", "0.5615938", "0.5496873", "0.54818183", "0.5407805", "0.53663135", "0.53590274", "0.53555", "0.53158534", "0.53125143", "0.53083193", "0.52982783", "0.52719414", "0.52719414", "0.52690953", "0.520...
0.6622462
0
set the response resource
public function setResource($notification) { return new NotificationResource($notification); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setResponse() {\n }", "public function setResponse(Response $response) {}", "public function setResponse( $response ){\n \n $this->response = $response;\n \n }", "public function setResource($resource);", "public function setResponse($response)\n\t{\n\t\t$this->respon...
[ "0.7366341", "0.7241258", "0.6936779", "0.68586135", "0.6783314", "0.67789346", "0.67054677", "0.66625524", "0.66080683", "0.6583307", "0.6517648", "0.6466848", "0.64376146", "0.64329284", "0.6432387", "0.6419342", "0.64143044", "0.64143044", "0.64143044", "0.63834614", "0.63...
0.0
-1
route us to the appropriate class method for this action
public function route($action) { switch($action) { case 'view': $id = $_GET['id']; $this->view($id); break; case 'index': $this->index(); break; case 'add': $this->add(); break; case 'addProcess': $this->addProcess(); break; case 'addLifeEventProcess': $id =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function route() {\n\t\t$action = $this->validateAction();\n\t\tif (method_exists($this, str_replace('-', '', $action))) {\n\t\t\t$this->$action();\n\t\t} else {\n\t\t\t$this->error($action);\n\t\t}\n\t}", "function callControllerAction() {\n $santitizedUrl = ''; \n if (!empty($_GET['...
[ "0.7153952", "0.704043", "0.7003092", "0.69577265", "0.69089025", "0.6725158", "0.67071885", "0.6582769", "0.65166855", "0.64730865", "0.64631844", "0.64298207", "0.64212924", "0.6411989", "0.64050937", "0.63902515", "0.63571143", "0.63514686", "0.635037", "0.6328827", "0.632...
0.6290338
23
A lightweight method of the symlink method in Symfony\Filesystem Creates a symbolic link or copy a directory.
private function symlink($originDir, $targetDir) { @mkdir(dirname($targetDir), 0777, true); $ok = false; if (is_link($targetDir)) { if (readlink($targetDir) != $originDir) { $this->filesystem->remove($targetDir); } else { $ok = true; } } if (!$ok) { if (true !== @symlink($originDir, $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createSymlink()\n {\n if (!File::exists(public_path('theme'))) {\n $folder = $this->active()->get('namespace');\n\n if (File::exists(theme_path(\"{$folder}/public\"))) {\n // Delete existing symlink if present\n File::delete(public_pa...
[ "0.68053097", "0.6767772", "0.6657984", "0.6308622", "0.6242999", "0.61739856", "0.61524177", "0.60927993", "0.57706857", "0.56998384", "0.5665688", "0.5636316", "0.56214124", "0.5576142", "0.5559281", "0.5550684", "0.55261123", "0.5525235", "0.53828186", "0.53544694", "0.534...
0.5600209
13