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
Declares an association between this object and a ChildTblProdPrices object.
public function setTblProdPrices(ChildTblProdPrices $v = null) { if ($v === null) { $this->setProdId(NULL); } else { $this->setProdId($v->getProdId()); } $this->aTblProdPrices = $v; // Add binding for other direction of this 1:1 relationship. if ($v !== null) { $v->setTblProdInfo($this); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTblProdPricing(ChildTblProdPricing $v = null)\n {\n if ($v === null) {\n $this->setProdPriceId(NULL);\n } else {\n $this->setProdPriceId($v->getProdPriceId());\n }\n\n $this->aTblProdPricing = $v;\n\n // Add binding for other direction ...
[ "0.63016796", "0.6223418", "0.6204816", "0.6000629", "0.59313536", "0.5778192", "0.56525975", "0.5646186", "0.5440802", "0.54381895", "0.5391214", "0.5386854", "0.536747", "0.53599423", "0.5315806", "0.5291904", "0.52196646", "0.5207516", "0.51851255", "0.5033819", "0.4998194...
0.695329
0
Get the associated ChildTblProdPrices object
public function getTblProdPrices(ConnectionInterface $con = null) { if ($this->aTblProdPrices === null && ($this->prod_id !== null)) { $this->aTblProdPrices = ChildTblProdPricesQuery::create()->findPk($this->prod_id, $con); // Because this foreign key represents a one-to-one relationship, we will create a bi-directional association. $this->aTblProdPrices->setTblProdInfo($this); } return $this->aTblProdPrices; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTblProdPricing(ConnectionInterface $con = null)\n {\n if ($this->aTblProdPricing === null && ($this->prod_price_id !== null)) {\n $this->aTblProdPricing = ChildTblProdPricingQuery::create()->findPk($this->prod_price_id, $con);\n /* The following can be used additi...
[ "0.6941069", "0.6823047", "0.6805496", "0.6513882", "0.6431518", "0.6427587", "0.63864625", "0.6214919", "0.6198193", "0.6152482", "0.60753256", "0.5975118", "0.59222186", "0.5812921", "0.57905215", "0.5766011", "0.5751223", "0.57447857", "0.5741802", "0.57308674", "0.5725751...
0.7106863
0
Declares an association between this object and a ChildTblProdPricing object.
public function setTblProdPricing(ChildTblProdPricing $v = null) { if ($v === null) { $this->setProdPriceId(NULL); } else { $this->setProdPriceId($v->getProdPriceId()); } $this->aTblProdPricing = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildTblProdPricing object, it will not be re-added. if ($v !== null) { $v->addTblProdInfo($this); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTblProdPrices(ChildTblProdPrices $v = null)\n {\n if ($v === null) {\n $this->setProdId(NULL);\n } else {\n $this->setProdId($v->getProdId());\n }\n\n $this->aTblProdPrices = $v;\n\n // Add binding for other direction of this 1:1 relati...
[ "0.5932853", "0.589223", "0.57133454", "0.56799984", "0.55095327", "0.5463812", "0.5450568", "0.5410425", "0.52214575", "0.51516396", "0.5081539", "0.5068964", "0.503356", "0.4991991", "0.49831095", "0.4912381", "0.4882917", "0.487314", "0.4843328", "0.4822642", "0.48085475",...
0.7180729
0
Get the associated ChildTblProdPricing object
public function getTblProdPricing(ConnectionInterface $con = null) { if ($this->aTblProdPricing === null && ($this->prod_price_id !== null)) { $this->aTblProdPricing = ChildTblProdPricingQuery::create()->findPk($this->prod_price_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aTblProdPricing->addTblProdInfos($this); */ } return $this->aTblProdPricing; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPricing() {\r\n\t\t\treturn $this->_pricing;\r\n\t\t}", "public function setTblProdPricing(ChildTblProdPricing $v = null)\n {\n if ($v === null) {\n $this->setProdPriceId(NULL);\n } else {\n $this->setProdPriceId($v->getProdPriceId());\n }\n\n ...
[ "0.6585547", "0.64412904", "0.6298926", "0.628615", "0.6239225", "0.62340397", "0.61298776", "0.61049235", "0.60788137", "0.59433645", "0.59053785", "0.5872398", "0.58614546", "0.5850542", "0.57735664", "0.56533194", "0.56014764", "0.5586905", "0.55719686", "0.5564868", "0.55...
0.7456949
0
Declares an association between this object and a ChildTblProdSmaller object.
public function setTblProdSmaller(ChildTblProdSmaller $v = null) { if ($v === null) { $this->setProdId(NULL); } else { $this->setProdId($v->getProdId()); } $this->aTblProdSmaller = $v; // Add binding for other direction of this 1:1 relationship. if ($v !== null) { $v->setTblProdInfo($this); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTblProdSmaller(ConnectionInterface $con = null)\n {\n if ($this->aTblProdSmaller === null && ($this->prod_id !== null)) {\n $this->aTblProdSmaller = ChildTblProdSmallerQuery::create()->findPk($this->prod_id, $con);\n // Because this foreign key represents a one-to...
[ "0.5755038", "0.54846007", "0.5314013", "0.53102195", "0.51196", "0.51009697", "0.50886047", "0.49849883", "0.4979125", "0.4959543", "0.49168986", "0.48226443", "0.48084807", "0.47947544", "0.47486645", "0.47406623", "0.47361344", "0.47281274", "0.4702288", "0.46898404", "0.4...
0.6833271
0
Get the associated ChildTblProdSmaller object
public function getTblProdSmaller(ConnectionInterface $con = null) { if ($this->aTblProdSmaller === null && ($this->prod_id !== null)) { $this->aTblProdSmaller = ChildTblProdSmallerQuery::create()->findPk($this->prod_id, $con); // Because this foreign key represents a one-to-one relationship, we will create a bi-directional association. $this->aTblProdSmaller->setTblProdInfo($this); } return $this->aTblProdSmaller; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTblProdSmaller(ChildTblProdSmaller $v = null)\n {\n if ($v === null) {\n $this->setProdId(NULL);\n } else {\n $this->setProdId($v->getProdId());\n }\n\n $this->aTblProdSmaller = $v;\n\n // Add binding for other direction of this 1:1 rel...
[ "0.63195765", "0.58784056", "0.55714196", "0.5557377", "0.55366707", "0.55361897", "0.537516", "0.5317671", "0.5232316", "0.5226625", "0.5226625", "0.5226625", "0.5226625", "0.522193", "0.5190114", "0.51654303", "0.5153909", "0.5153823", "0.5143266", "0.5140183", "0.51077807"...
0.73373497
0
Declares an association between this object and a ChildTblShippingCategories object.
public function setTblShippingCategories(ChildTblShippingCategories $v = null) { if ($v === null) { $this->setProdCategoryShipping(NULL); } else { $this->setProdCategoryShipping($v->getProdShippingPriceId()); } $this->aTblShippingCategories = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildTblShippingCategories object, it will not be re-added. if ($v !== null) { $v->addTblProdInfo($this); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShippingCategoryId();", "public function getTblShippingCategories(ConnectionInterface $con = null)\n {\n if ($this->aTblShippingCategories === null && ($this->prod_category_shipping !== null)) {\n $this->aTblShippingCategories = ChildTblShippingCategoriesQuery::create()->f...
[ "0.60233307", "0.585173", "0.5684485", "0.5615994", "0.5429658", "0.5173888", "0.5172341", "0.5149478", "0.51297504", "0.5097469", "0.5013813", "0.4951383", "0.49422163", "0.4922968", "0.4881246", "0.48500246", "0.4848185", "0.4839036", "0.48374784", "0.48279616", "0.47960475...
0.69599843
0
Get the associated ChildTblShippingCategories object
public function getTblShippingCategories(ConnectionInterface $con = null) { if ($this->aTblShippingCategories === null && ($this->prod_category_shipping !== null)) { $this->aTblShippingCategories = ChildTblShippingCategoriesQuery::create()->findPk($this->prod_category_shipping, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aTblShippingCategories->addTblProdInfos($this); */ } return $this->aTblShippingCategories; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShippingCategoryId();", "public function getProdCategoryShipping()\n {\n return $this->prod_category_shipping;\n }", "public function getCategory() {\n return $this->hasOne(Category::className(), ['id' => 'category_id']); // second - field in dependent table\n }", "p...
[ "0.73087746", "0.7071618", "0.60448307", "0.60062724", "0.58968705", "0.5847817", "0.57620245", "0.57533", "0.57533", "0.57349205", "0.57349205", "0.57349205", "0.566958", "0.56336474", "0.56125754", "0.5608226", "0.5597498", "0.5596045", "0.55864865", "0.5584981", "0.5573286...
0.7219948
1
Clears the current object, sets all attributes to their default values and removes outgoing references as well as backreferences (from other objects to this one. Results probably in a database change of those foreign objects when you call `save` there).
public function clear() { if (null !== $this->aTblEra) { $this->aTblEra->removeTblProdInfo($this); } if (null !== $this->aTblGeneral) { $this->aTblGeneral->removeTblProdInfo($this); } if (null !== $this->aTblMenus) { $this->aTblMenus->removeTblProdInfo($this); } if (null !== $this->aTblProdPhotos) { $this->aTblProdPhotos->removeTblProdInfo($this); } if (null !== $this->aTblProdPrices) { $this->aTblProdPrices->removeTblProdInfo($this); } if (null !== $this->aTblProdPricing) { $this->aTblProdPricing->removeTblProdInfo($this); } if (null !== $this->aTblProdSmaller) { $this->aTblProdSmaller->removeTblProdInfo($this); } if (null !== $this->aTblShippingCategories) { $this->aTblShippingCategories->removeTblProdInfo($this); } $this->prod_id = null; $this->prod_price_id = null; $this->prod_name = null; $this->prod_alt1 = null; $this->prod_alt2 = null; $this->prod_alt3 = null; $this->prod_alt4 = null; $this->prod_code = null; $this->prod_category = null; $this->prod_category_shipping = null; $this->prod_writeup = null; $this->prod_length = null; $this->prod_wingspan = null; $this->prod_height = null; $this->prod_scale = null; $this->prod_links = null; $this->prod_linkdescription = null; $this->prod_front = null; $this->prod_keywords = null; $this->prod_keywords_writeup = null; $this->prod_title = null; $this->prod_description = null; $this->prod_general = null; $this->prod_era = null; $this->prod_company = null; $this->prod_related = null; $this->prod_related_pa = null; $this->prod_related_m3 = null; $this->prod_related2 = null; $this->prod_saveas = null; $this->prod_aircraftreg = null; $this->mb = null; $this->pa = null; $this->m3 = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n {\n $this->id = null;\n $this->name = null;\n $this->is_active = null;\n $this->is_closed = null;\n $this->from_date = null;\n $this->to_date = null;\n $this->sortable_rank = null;\n $this->alreadyInSave = false;\n $this->a...
[ "0.71811515", "0.6931064", "0.6928436", "0.6899159", "0.6838832", "0.6823544", "0.66834676", "0.66350406", "0.6632028", "0.6626154", "0.6619534", "0.6557098", "0.6544292", "0.6474649", "0.64195037", "0.64111966", "0.63998926", "0.6363998", "0.63621736", "0.6351788", "0.631212...
0.0
-1
Resets all references and backreferences to other model objects or collections of model objects. This method is used to reset all php object references (not the actual reference in the database). Necessary for object serialisation.
public function clearAllReferences($deep = false) { if ($deep) { } // if ($deep) $this->aTblEra = null; $this->aTblGeneral = null; $this->aTblMenus = null; $this->aTblProdPhotos = null; $this->aTblProdPrices = null; $this->aTblProdPricing = null; $this->aTblProdSmaller = null; $this->aTblShippingCategories = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetRelations()\n\t{\n\t\t$this->relations = array();\n\t}", "public function resetDirty()\n {\n $this->dirty = false;\n $this->dirtyOne = false;\n $this->dirtyMany = false;\n }", "public static function reset() {\n\t\tself::$objects = array();\n\t}", "public function rese...
[ "0.73363394", "0.72726226", "0.7251032", "0.7234304", "0.7182084", "0.7099506", "0.70658344", "0.6978821", "0.69653195", "0.6930082", "0.68083715", "0.67966264", "0.6692531", "0.6681615", "0.66698927", "0.6646377", "0.6646377", "0.66060627", "0.6583203", "0.6582785", "0.65594...
0.6673458
14
Return the string representation of this object
public function __toString() { return (string) $this->exportTo(TblProdInfoTableMap::DEFAULT_STRING_FORMAT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toString()\n {\n return $this->__toString();\n }", "public function to_string() { return $this->__toString(); }", "public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}", "public function __toString() {\n \n return $this->toString();\n }", "pub...
[ "0.88303834", "0.88247913", "0.8767572", "0.8697769", "0.86650574", "0.86650574", "0.8661821", "0.86544496", "0.86514354", "0.8618576", "0.8618164", "0.86100644", "0.86100644", "0.86100644", "0.86100644", "0.86100644", "0.86100644", "0.86100644", "0.86100644", "0.86100644", "...
0.0
-1
Code to be run before persisting the object
public function preSave(ConnectionInterface $con = null) { if (is_callable('parent::preSave')) { return parent::preSave($con); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prePersist()\n {\n }", "public function preSave() {}", "public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }", "public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }", "protected function _saveBefore(...
[ "0.8185657", "0.7883653", "0.78455716", "0.78455716", "0.78106177", "0.78020126", "0.77916056", "0.7780491", "0.7693593", "0.768545", "0.76798385", "0.766472", "0.76606226", "0.76541734", "0.765131", "0.7603986", "0.7594705", "0.7581733", "0.75761276", "0.75638556", "0.755468...
0.0
-1
Code to be run after persisting the object
public function postSave(ConnectionInterface $con = null) { if (is_callable('parent::postSave')) { parent::postSave($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postPersistCallback()\n {\n $this->performPostPersistCallback();\n }", "public function postPersistCallback()\n {\n $this->performPostPersistCallback();\n }", "public function afterSave(){\n\t}", "public function afterSave()\n {\n\n }", "protected function af...
[ "0.7728293", "0.7728293", "0.74933386", "0.74655366", "0.74099666", "0.7336513", "0.73002577", "0.7251602", "0.724752", "0.72292095", "0.7225401", "0.71804357", "0.71760184", "0.71746963", "0.71676", "0.7153408", "0.713572", "0.71326864", "0.712061", "0.7117253", "0.7107344",...
0.0
-1
Code to be run before inserting to database
public function preInsert(ConnectionInterface $con = null) { if (is_callable('parent::preInsert')) { return parent::preInsert($con); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function beforeInserting()\n {\n }", "protected function _postInsert()\n\t{\n\t}", "protected function beforeInsert()\n {\n }", "protected function beforeSaveInDB(){}", "protected function _insert()\n\t{\n\t}", "protected function _insert()\n {\n \n }", "protected fun...
[ "0.8131137", "0.7644821", "0.7630039", "0.74861836", "0.73913014", "0.7284889", "0.7284889", "0.7224351", "0.7203519", "0.7179859", "0.71430326", "0.70581585", "0.7032988", "0.7032484", "0.70063996", "0.6964967", "0.6937821", "0.6930336", "0.69273394", "0.69273394", "0.691402...
0.0
-1
Code to be run after inserting to database
public function postInsert(ConnectionInterface $con = null) { if (is_callable('parent::postInsert')) { parent::postInsert($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _postInsert()\n\t{\n\t}", "protected function afterInserting()\n {\n }", "protected function afterInsert()\n {\n }", "protected function saveInsert()\n {\n }", "protected function afterInsertAccepting()\n {\n }", "protected function _insert()\n\t{\n\t}", "publ...
[ "0.8059255", "0.77305245", "0.7648421", "0.7551951", "0.74398077", "0.7387817", "0.7319924", "0.72773314", "0.72773314", "0.72214705", "0.72004366", "0.70558995", "0.6984435", "0.69345856", "0.6892451", "0.67783105", "0.6770904", "0.6766583", "0.6698568", "0.66452026", "0.663...
0.0
-1
Code to be run before updating the object in database
public function preUpdate(ConnectionInterface $con = null) { if (is_callable('parent::preUpdate')) { return parent::preUpdate($con); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function beforeUpdating()\n {\n }", "protected function beforeUpdate()\n {\n }", "protected function _preupdate() {\n }", "function before_update() {}", "protected function updateObjectBeforePersist(&$object)\n {\n\n }", "protected function beforeSaveInDB(){}", "public fu...
[ "0.80547875", "0.76947993", "0.7492826", "0.74081516", "0.7365051", "0.73446393", "0.7276268", "0.72075856", "0.7151221", "0.708244", "0.70682657", "0.70664376", "0.70634127", "0.7060201", "0.7060201", "0.6949407", "0.6934756", "0.69264513", "0.69148594", "0.690915", "0.68913...
0.0
-1
Code to be run after updating the object in database
public function postUpdate(ConnectionInterface $con = null) { if (is_callable('parent::postUpdate')) { parent::postUpdate($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function afterUpdating()\n {\n }", "protected function _postUpdate()\n\t{\n\t}", "public function db_update() {}", "protected function performUpdate() {}", "protected function _update()\n\t{\n\t}", "protected function saveUpdate()\n {\n }", "public function after_update() {}", "...
[ "0.7644309", "0.75951684", "0.7496183", "0.747031", "0.7457027", "0.7432404", "0.737062", "0.7361229", "0.7361229", "0.7336205", "0.7265802", "0.7186511", "0.70873517", "0.70563376", "0.7049173", "0.70300424", "0.70252603", "0.70252603", "0.699183", "0.69504064", "0.6929031",...
0.0
-1
Code to be run before deleting the object in database
public function preDelete(ConnectionInterface $con = null) { if (is_callable('parent::preDelete')) { return parent::preDelete($con); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _preDelete() {}", "public function preDelete() { }", "protected function _predelete() {\n }", "protected function preDeleteHook($object) { }", "protected function beforeDelete()\n {\n }", "function preDelete()\n {\n }", "protected function afterDelete()\r\n {\r\n ...
[ "0.82973915", "0.8111653", "0.8100277", "0.7661015", "0.761018", "0.7559831", "0.7439736", "0.74201024", "0.73360264", "0.73175704", "0.73083913", "0.72894126", "0.72514457", "0.72300845", "0.72280777", "0.71891046", "0.7147188", "0.71177447", "0.71077925", "0.70845723", "0.7...
0.0
-1
Code to be run after deleting the object in database
public function postDelete(ConnectionInterface $con = null) { if (is_callable('parent::postDelete')) { parent::postDelete($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function after_delete() {}", "protected function afterDelete()\r\n {\r\n }", "protected function afterDelete()\n {\n }", "function after_delete() {}", "function doRealDelete()\n {\n $this->assignSingle();\n /* Delete the record */\n DatabaseBean::dbDeleteById();\n...
[ "0.79117715", "0.7840575", "0.7711726", "0.76181936", "0.7524055", "0.750263", "0.73994184", "0.7362228", "0.7360621", "0.7354637", "0.7318952", "0.73144865", "0.7291954", "0.7286163", "0.7285155", "0.7223728", "0.7223134", "0.72110856", "0.7178242", "0.7174596", "0.7152491",...
0.0
-1
Derived method to catches calls to undefined methods. Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). Allows to define default __call() behavior if you overwrite __call()
public function __call($name, $params) { if (0 === strpos($name, 'get')) { $virtualColumn = substr($name, 3); if ($this->hasVirtualColumn($virtualColumn)) { return $this->getVirtualColumn($virtualColumn); } $virtualColumn = lcfirst($virtualColumn); if ($this->hasVirtualColumn($virtualColumn)) { return $this->getVirtualColumn($virtualColumn); } } if (0 === strpos($name, 'from')) { $format = substr($name, 4); return $this->importFrom($format, reset($params)); } if (0 === strpos($name, 'to')) { $format = substr($name, 2); $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; return $this->exportTo($format, $includeLazyLoadColumns); } throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _callToDefault()\n {\n foreach (get_class_methods($this) as $method) {\n try {\n $that = new ReflectionMethod($this, $method);\n } catch (ReflectionException $exception) {\n break;\n }\n if (\n $that...
[ "0.5683369", "0.55150574", "0.549006", "0.54879683", "0.54879683", "0.54456234", "0.54456234", "0.5443073", "0.53987366", "0.53640664", "0.5345632", "0.5284882", "0.5265972", "0.5265972", "0.5265972", "0.52593833", "0.5222946", "0.52166176", "0.5180199", "0.51756805", "0.5150...
0.0
-1
Testing numbers between 0 and 9
public function testDigits(float $number, string $word): void { self::assertEquals($word, $this->handle->toWords($number, $this->locale)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCheckDigit($barcode)\n {\n $sum=0;\n for($i=1;$i<=11;$i+=2)\n $sum+=3*$barcode[$i];\n for($i=0;$i<=10;$i+=2)\n $sum+=$barcode[$i];\n return ($sum+$barcode[12])%10==0;\n }", "function TestCheckDigit($barcode)\n ...
[ "0.66635835", "0.66576004", "0.66089284", "0.6532612", "0.65060383", "0.648335", "0.64612067", "0.642175", "0.6297157", "0.629697", "0.62947184", "0.6213491", "0.6199888", "0.61905664", "0.6164627", "0.609434", "0.60599965", "0.6057881", "0.6038606", "0.60228014", "0.6018898"...
0.0
-1
Testing numbers between 10 and 99
public function testTens(): void { $tens = [ 11 => 'once', 12 => 'doce', 16 => 'dieciseis', 19 => 'diecinueve', 20 => 'veinte', 21 => 'veintiuno', 26 => 'veintiseis', 30 => 'treinta', 31 => 'treinta y uno', 40 => 'cuarenta', 43 => 'cuarenta y tres', 50 => 'cincuenta', 55 => 'cincuenta y cinco', 60 => 'sesenta', 67 => 'sesenta y siete', 70 => 'setenta', 79 => 'setenta y nueve', ]; foreach ($tens as $number => $word) { self::assertEquals( $word, $this->handle->toWords($number, $this->locale) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function range_met($n)\n{\n if ($n >= 1 && $n <= 100) {\n return TRUE;\n }\n return FALSE;\n}", "function check_ten($ten)\n{\n\treturn TRUE;\n}", "function testInN($num,$n)\n\t{\n\t\tif(!is_numeric($num)) return false;\n\t\tif(!is_numeric($n)) return false;\n\t\tif($num<0) return false;\n\t\tif...
[ "0.70372903", "0.6980732", "0.6732189", "0.6524968", "0.62830395", "0.6241937", "0.61779535", "0.6170057", "0.612299", "0.6109589", "0.6098868", "0.60571456", "0.6056869", "0.60308397", "0.6020846", "0.59743077", "0.5950497", "0.59430397", "0.59410936", "0.5939873", "0.593556...
0.0
-1
Testing numbers between 100 and 999
public function testHundreds(): void { $hundreds = [ 100 => 'cien', 101 => 'ciento uno', 199 => 'ciento noventa y nueve', 203 => 'doscientos tres', 287 => 'doscientos ochenta y siete', 300 => 'trescientos', 356 => 'trescientos cincuenta y seis', 410 => 'cuatrocientos diez', 434 => 'cuatrocientos treinta y cuatro', 578 => 'quinientos setenta y ocho', 689 => 'seiscientos ochenta y nueve', 729 => 'setecientos veintinueve', 894 => 'ochocientos noventa y cuatro', 999 => 'novecientos noventa y nueve', ]; foreach ($hundreds as $number => $word) { self::assertEquals( $word, $this->handle->toWords($number, $this->locale) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function range_met($n)\n{\n if ($n >= 1 && $n <= 100) {\n return TRUE;\n }\n return FALSE;\n}", "function testInN($num,$n)\n\t{\n\t\tif(!is_numeric($num)) return false;\n\t\tif(!is_numeric($n)) return false;\n\t\tif($num<0) return false;\n\t\tif($n<0) return false;\n\t\t\n\t\tif($num<=$n) return ...
[ "0.7273057", "0.6446697", "0.64306027", "0.63692635", "0.6135932", "0.6066898", "0.60645384", "0.60263014", "0.59745455", "0.59479934", "0.59318686", "0.59181213", "0.5915045", "0.5908207", "0.5888831", "0.5810643", "0.57863164", "0.5785262", "0.57824", "0.5737359", "0.572281...
0.5239097
89
Testing numbers between 1000 and 9999
public function testThousands(): void { $thousands = [ 1000 => 'mil', 1001 => 'mil uno', 1097 => 'mil noventa y siete', 1104 => 'mil ciento cuatro', 1243 => 'mil doscientos cuarenta y tres', 2385 => 'dos mil trescientos ochenta y cinco', 3766 => 'tres mil setecientos sesenta y seis', 4196 => 'cuatro mil ciento noventa y seis', 5846 => 'cinco mil ochocientos cuarenta y seis', 6459 => 'seis mil cuatrocientos cincuenta y nueve', 7232 => 'siete mil doscientos treinta y dos', 8569 => 'ocho mil quinientos sesenta y nueve', 9539 => 'nueve mil quinientos treinta y nueve', ]; foreach ($thousands as $number => $word) { self::assertEquals( $word, $this->handle->toWords($number, $this->locale) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function range_met($n)\n{\n if ($n >= 1 && $n <= 100) {\n return TRUE;\n }\n return FALSE;\n}", "function testInN($num,$n)\n\t{\n\t\tif(!is_numeric($num)) return false;\n\t\tif(!is_numeric($n)) return false;\n\t\tif($num<0) return false;\n\t\tif($n<0) return false;\n\t\t\n\t\tif($num<=$n) return ...
[ "0.68017817", "0.6639569", "0.64328", "0.6423998", "0.6380836", "0.61611366", "0.60771775", "0.6048489", "0.6026035", "0.59588623", "0.59203684", "0.5886397", "0.58498615", "0.5835377", "0.58259416", "0.5819372", "0.5805958", "0.58020854", "0.57917786", "0.57901627", "0.57879...
0.0
-1
put your code here
public function insertCustomer() { $svcReturn = true; try { $data = array( 'code' => 'I', 'firstname' => Input::get('firstname'), 'lastname' => Input::get('lastname'), 'password' => Hash::make(Input::get('password')), 'email' => Input::get('email'), 'address' => Input::get('address'), 'address2' => Input::get('address2'), 'address3' => Input::get('address3'), 'postcode' => Input::get('postcode'), 'city' => Input::get('city'), 'province' => Input::get('province'), 'home_no' => Input::get('home_no'), 'mobile_no' => Input::get('mobile_no'), 'grup' => Input::get('grup'), 'ip_address' => Request::getClientIp(), 'active' => Input::get('active'), ); $customer = new Customer($data); $customer->save(); } catch (RuntimeException $exc) { $svcReturn = false; echo $exc->getTraceAsString(); } return $svcReturn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public...
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407"...
0.0
-1
Send added element to $this elements
public function element(Element $element) { $this->elements[] = $element; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function append ( $element ) {\n $this->childrenElements[] = $element;\n }", "public function push($el){\r\n\r\n array_push($this->data,$el);\r\n\r\n }", "private function addTo(){\n\t\t$element = 'to';\n\t\t$options = array('required'=>false,'readonly' => true,'filters'=>array('StringTrim'),'la...
[ "0.612994", "0.59903276", "0.59842515", "0.587562", "0.587562", "0.587562", "0.58739865", "0.5797562", "0.5788704", "0.5698597", "0.5684506", "0.5650369", "0.5644739", "0.5603695", "0.55947816", "0.55555755", "0.55233514", "0.5446971", "0.5420117", "0.5413411", "0.540724", ...
0.5315637
29
Boot real compiled field. Append children to parentroot.
public function create() { // Load only root elements. $this->loadRoots($this->elements, $this->roots); // Make sure that first element isn't child. If child then throw a exception about that. if ($this->elements[0]->isChild()) TypeRegression::cantBe('child', 'First'); // Set elements compiled field with relations $this->makeRelationsToCompiled($this->elements); // After append process by root-child then compile all stuffs into 'page' field. foreach ($this->roots as $key => $element) { $this->page .= $element->compiled; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function actionPostLoadingEvent()\n {\n if (self::$child_data === null) {\n self::$child_data = [];\n foreach ($this->getParentModel()->children->child->iterateItems() as $node_uuid => $node) {\n if (empty((string)$node->enabled)) {\n cont...
[ "0.6045651", "0.55777663", "0.5562814", "0.5558915", "0.5379437", "0.5373707", "0.5341585", "0.5324784", "0.5294674", "0.52686405", "0.52046895", "0.51608795", "0.5156325", "0.5151352", "0.5129063", "0.5098962", "0.5073758", "0.5071496", "0.50700426", "0.5050326", "0.50502783...
0.57103914
1
Get the URI to where this request should be sent
public function getEndpoint();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUri() {\n return $this->request->getUri();\n }", "public function uri()\n {\n return $this->_requestUri;\n }", "public function getRequestUri() {}", "public function getRequestUri()\n {\n return $this->getServer('REQUEST_URI');\n }", "public function g...
[ "0.8445041", "0.84268934", "0.8402421", "0.83717275", "0.83510154", "0.8347441", "0.8320148", "0.8293699", "0.8280009", "0.8267417", "0.8263601", "0.8228059", "0.8209691", "0.8165358", "0.8158809", "0.8157109", "0.8033054", "0.79888153", "0.79870105", "0.7959325", "0.7909401"...
0.0
-1
Extracts trans message from PHP tokens.
public function parseFileTokens($file) { preg_match_all('/^(\$_\w+\[\'.+\'\]) = \'(.*)\';/m', file_get_contents($file), $matches); foreach ($matches[0] as $key => $match) { yield [ 'message' => $matches[2][$key], 'key' => $matches[1][$key], ]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dc_campaign_emails_rules_action_mail_token_replace($message, $settings, RulesState $state, RulesPlugin $element) {\n $message_body = $message;\n\n $datetime = new DateTime();\n $datetime->setTimestamp($state->variables['transaction_time']);\n $new_body = token_replace($message_body, array(\n 'redhe...
[ "0.5424453", "0.54055065", "0.527045", "0.52508307", "0.524374", "0.52317774", "0.5123165", "0.50346935", "0.50251776", "0.50019157", "0.50006145", "0.50000507", "0.4958771", "0.49373278", "0.49289954", "0.49284375", "0.49275059", "0.49220297", "0.49211568", "0.4911084", "0.4...
0.0
-1
Unlink this flight from all registrations. Delete model after removing from registrations
public function cleanRegistrations($delete = false) { foreach($this->getRegistrations()->each() as $r) { $r->flight_id = null; $r->save(); } if($delete) $this->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public function purge()\n {\n $this->owner()->where('current_organization_id', $this->id)\n ->update(['current_organization_id' => null]);\n\n $this->users()->where('current_organization_id', $this->id)...
[ "0.60531455", "0.6033618", "0.6008089", "0.59493333", "0.59427375", "0.58216244", "0.582043", "0.5792366", "0.57690805", "0.57560253", "0.5724985", "0.5685354", "0.56444126", "0.5636645", "0.5625533", "0.56211835", "0.5584849", "0.55668825", "0.55576575", "0.5547372", "0.5536...
0.5491057
22
ID matching the email, if any
private function id(string $email): int { return (int) (new Storage\TypedQuery( $this->connection, 'SELECT id FROM seekers WHERE email IS NOT DISTINCT FROM ?', [$email] ))->field(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function email2id($email) {\n // converts a user email to the id of the user\n // both id and email are indivitual to every user\n \n global $con;\n\n $sql = \"SELECT `id` FROM `user` WHERE `email` LIKE '\".$email.\"';\";\n $query = mysqli_query($con, $sql);\n while ($row = mysqli_fetch...
[ "0.75039726", "0.73292905", "0.70106196", "0.69059086", "0.68847936", "0.68417287", "0.6752509", "0.67402613", "0.6732584", "0.67199624", "0.6714724", "0.6709128", "0.66985255", "0.6650587", "0.66431844", "0.6624419", "0.66122323", "0.6610495", "0.6605915", "0.65673244", "0.6...
0.6660227
13
Display a listing of the resource.
public function index() { $tip = Tip::all(); return view('tips.index', compact('tip')); }
{ "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() { // return view('tips.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) { // $tip = new Tip(); $tip->Tips = $request->Tips; $tip->Isi = $request->Isi; $tip->save(); return redirect('tips.index'); }
{ "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) { // $tip = Tip::find($id); return view('tips.show', compact('tip')); }
{ "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) { // $tip = Tip::findOrFail($id); return view('tips.edit', compact('tip')); }
{ "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) { // $tip = Tip::findOrFail($id); $tip->Tips = $request->Tips; $tip->Isi = $request->Isi; $tip->save(); return redirect()->route('tips.index'); }
{ "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) { // $tip = Tip::findOrFail($id); $tip->delete(); return redirect()->route('tips.index'); }
{ "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
Encodes input string data and returns the encoded content.
public function encode($source);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function encode($data);", "public function encode($data);", "public function encode($data);", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "abstract public f...
[ "0.7470326", "0.7470326", "0.7470326", "0.7440866", "0.74406344", "0.74406344", "0.74406344", "0.74406344", "0.7393357", "0.7368723", "0.71585894", "0.7116421", "0.6814515", "0.6787514", "0.67502224", "0.65847206", "0.65819305", "0.6371296", "0.63247114", "0.6306171", "0.6263...
0.6230817
23
primo modo (ORM Eloquent)
public function indexProducts() { // $prods = Product::all() -> where('deleted', false); //secondo modo (ORM Eloquent) //$prods = Product::where('deleted', false) -> get(); // terzo modo (Query builder) $prods = DB::table('products') -> where('deleted', false) -> get(); return view('products.index', compact('prods')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function modulo(){\n return $this->belongsTo('App\\Models\\Modulo');\n }", "public function ormObject();", "public function prestamos()\n {\n return $this->belongsToMany(Prestamo::class);\n }", "abstract function model();", "abstract function model();", "abstract function model(...
[ "0.6374884", "0.6348796", "0.6185268", "0.6149543", "0.6149543", "0.6149543", "0.6149543", "0.61379117", "0.61290896", "0.611944", "0.6103264", "0.6101455", "0.6091029", "0.60674584", "0.60611075", "0.60611075", "0.60611075", "0.60611075", "0.6056779", "0.6056779", "0.6026102...
0.0
-1
function initializes the board to start playing
public function initGame(){ $this->board = new Board(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function startPlay(){ \r\n\r\n $this->selectPlayer();\r\n $this->board->printBoard();\r\n\r\n while(!$this->gameOver){\r\n\r\n //check if board is full\r\n if($this->reachedMaxMoves() || $this->validateIsFullBoard()){\r\n noWinningMsg($this->curren...
[ "0.77953655", "0.73100907", "0.6662601", "0.6630795", "0.645974", "0.6459133", "0.6432256", "0.6353283", "0.63438475", "0.62641424", "0.6111711", "0.5969623", "0.59474504", "0.59130836", "0.58800733", "0.5851251", "0.58486897", "0.58331823", "0.58294845", "0.5801565", "0.5786...
0.7266772
2
Main Function set the hole game as long as the game status is true keep playing function validate max moves on board , user selection , full column.... in case of a winning players will recive a win message that print in the console
public function startPlay(){ $this->selectPlayer(); $this->board->printBoard(); while(!$this->gameOver){ //check if board is full if($this->reachedMaxMoves() || $this->validateIsFullBoard()){ noWinningMsg($this->currentPlayer); $this->gameOver = true; break; } // set board with table $userMove = $this->selectMove(); //in case that column is not full if(!$this->validateIsFullColumn($userMove)){ $this->insertMoveToBoard($userMove); $this->winCheck($userMove); $this->switchPlayer(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function game_check() {\r\n $this->invalid_char = array_diff($this->position, $this->valid_char);\r\n if ($this->grid_size % 2 == 0 || $this->grid_size < 3 || $this->grid_size > 15) {\r\n $this->game_message('invalid-size');\r\n } else if (count($this->invalid_char, COUNT_RECURSIVE)...
[ "0.7445252", "0.6682662", "0.66092634", "0.64298415", "0.6396222", "0.6342407", "0.63309914", "0.63021696", "0.62961656", "0.62457556", "0.6189297", "0.616316", "0.6143622", "0.6142093", "0.6102478", "0.6064995", "0.60588455", "0.6046753", "0.60364634", "0.6004795", "0.594754...
0.68577087
1
Function select random player and print message to inform
protected function selectPlayer(){ $this->currentPlayer = rand(1,2); selectRandPlayerMsg($this->currentPlayer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function onPlayerSelect();", "public function play($choice){\n $yourChoice = trim(strtoupper($choice));\n if($yourChoice == 'ROCK'){\n $playerOne = 1;\n $playerTwo = rand(1,3);\n $this->checkForWinner($playerOne,$playerTwo);\n }elseif($yourCho...
[ "0.6402196", "0.62477463", "0.61383677", "0.6131086", "0.6088489", "0.6057457", "0.60531896", "0.580598", "0.58006644", "0.57715154", "0.57694703", "0.5689289", "0.56084937", "0.55991423", "0.5590919", "0.54940724", "0.5458018", "0.5455137", "0.5443015", "0.54023033", "0.5392...
0.8639816
0
Function asked the player to enter a column that he would like to place his discs after selection set validation to the selection, in case of a bad validation user will notify and asked to selecet again
public function selectMove(){ do { $userMsg = readlineUserInputMsg($this->currentPlayer); $userMove = readline($userMsg); } while (!$this->checkValidMove($userMove)); return $userMove; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validate(){\n\t\t$row = $this->row;\n\t\t$col = $this->col;\n\t\tfor($i=0;$i<$row;$i++)\n\t\t\tfor($j=0;$j<$col;$j++)\n\t\t\t$this->sanitzeRow($i,$j);\n\n\t\tfor($i=0;$i<$row;$i++)\n\t\t\tfor($j=0;$j<$col;$j++)\n\t\t\t$this->sanitzeCol($i,$j);\n\n\t}", "function validate() {\n\t\t// execute the ...
[ "0.558866", "0.5427373", "0.53022766", "0.5189251", "0.51486194", "0.51402164", "0.5112708", "0.5078795", "0.5063454", "0.495644", "0.49560943", "0.494284", "0.49298766", "0.4879945", "0.48395976", "0.48100886", "0.48039868", "0.48031828", "0.48013327", "0.4796365", "0.479572...
0.0
-1
Function Insert the selected column into the board with the current player Id Player 1 as [1] or Player 2 as [2] cell update only if the cell is empty
protected function insertMoveToBoard($userMove){ $current_player = "[$this->currentPlayer]"; for($row = ($this->board->getRows() - 1) ; $row >-1 ; $row-- ){ //check if cell is empty if($this->board->gameBoard[$row][$userMove-1] == Board::CELL){ $this->board->gameBoard[$row][$userMove-1] = $current_player; $this->lastRowInsert =$row; $this->totalMoves++; break; } else{ continue; } } echo $this->board->printBoard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPiece($col){\n\t\t$gameId = getCurrentGameIdFromPlayerId();\n\t\tif(!$gameId['currentGameId']){\n\t\t\thttp_response_code(500);\n\t\t\tdie(\"error getting currentGameId of player\");\n\t\t}\n\t\n\t\t$gameId = $gameId['currentGameId'];\n\t\t$game = getCurrentGame($gameId);\n\t\tif(!$game){\n\t\t\thttp_r...
[ "0.59531695", "0.5458706", "0.54368246", "0.53920597", "0.53197265", "0.52322024", "0.5158589", "0.50014186", "0.49538615", "0.4883815", "0.48810536", "0.48696572", "0.4807459", "0.47927716", "0.47904843", "0.47486815", "0.47263956", "0.4722294", "0.47139347", "0.4698653", "0...
0.5218046
6
/ Validation Function validate the user selection input In case of invalid input Message print to user to make another selection
public function checkValidMove($userMove){ if(!is_numeric($userMove) ||$userMove < 1 || $userMove > Board::COLUMNS){ invalidInputMsg($this->currentPlayer); return false; } return true;; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function select_validate($select){\n // 'none' is the first option that is default \"-------Choose Country-------\"\n if($select==\"none\"){\n $this->form_validation->set_message('select_validate', 'Please Select Your Country.');\n return false;\n } else{\n // User picked something.\n ...
[ "0.6820797", "0.63468087", "0.62189853", "0.62019414", "0.6181274", "0.61739534", "0.61655366", "0.6112793", "0.601353", "0.60124606", "0.5978902", "0.5915387", "0.58788663", "0.5859464", "0.5842365", "0.5818096", "0.5795618", "0.57918936", "0.57836443", "0.5780141", "0.57263...
0.0
-1
Function verify that the choosen column is not full in case of a full column user message print to user
public function validateIsFullColumn($selectedColumn){ //in case of a full Column if($this->board->gameBoard[0][$selectedColumn-1] != Board::CELL){ columnIsFullMsg($this->currentPlayer); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function takesTwoColumns() {\n return false;\n }", "private function validate_columns(){\n\n for($i=0;$i<9;$i++){\n $col = array_column($this->sudoku_array, $i);\n\n if(count($col) !=9 || count(array_unique($col)) !=9){\n return false;\n }\n...
[ "0.63556224", "0.63001317", "0.61818135", "0.6166093", "0.61368483", "0.60902923", "0.6022151", "0.597522", "0.5947488", "0.59334356", "0.5822366", "0.5815296", "0.5812504", "0.5800726", "0.5780297", "0.5759884", "0.5736777", "0.5713075", "0.56630063", "0.56569", "0.564339", ...
0.72448236
0
Function verify that the board is not full in case of a full Board message print to user
public function validateIsFullBoard(){ //in case of a full Column for($index=0; $index < Board::COLUMNS; $index++){ //if there is an empty cell if($this->board->gameBoard[0][$index] == Board::CELL){ //board is not full return false; } }///board is full return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isBoardFull() {\n if ((count($this->_markers[self::X_MARK]) + count($this->_markers[self::O_MARK])) == 9) {\n echo $this->promptMessage('board_full') . PHP_EOL;\n return TRUE;\n }\n ret...
[ "0.7831933", "0.69444954", "0.68854916", "0.6503552", "0.63835657", "0.60957617", "0.60837924", "0.59440345", "0.5932222", "0.5927926", "0.58390486", "0.58316", "0.5805093", "0.5747443", "0.57416934", "0.5708741", "0.5684389", "0.56755435", "0.5658349", "0.56398714", "0.56395...
0.7821319
1
function check if the board is full and no moves left In this case none of the players wins
protected function reachedMaxMoves(){ if($this->totalMoves == $this->board->getMaxMoves()){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function isBoardFull(array $gameBoard){\r\n\t\tforeach($gameBoard as $pos1=>$columns){\r\n\t\t\tforeach($columns as $pos2=>$player){\r\n\t\t\t\tif (false !== $player){\r\n\t\t\t\t\tcontinue ; \t\r\n\t\t\t\t}\r\n\t\t\t\t$blankPositions[] = array($pos1,$pos2);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\treturn...
[ "0.7175621", "0.7150335", "0.7149885", "0.71423006", "0.70996666", "0.70236486", "0.6929972", "0.6881545", "0.68630135", "0.680688", "0.67174953", "0.6688703", "0.66729945", "0.66495216", "0.66465324", "0.66456854", "0.6506291", "0.647298", "0.6469579", "0.6425344", "0.640446...
0.5896913
47
/ Check Options to Win Main function that call to all function that check if a player win In case of a winnig function Print winning message and asked if you want to have another game
protected function winCheck($userMove){ // Check if we have reached the minimum steps to have a win if($this->totalMoves < Board::COLUMNS){ return false; } //check vertical Horizontal Positive Diagonal Negative Diagona win if(($this->checkVerticalWin($userMove)) || ($this->checkHorizontalWin($userMove)) || ($this->checkPositiveDiagonalWin($userMove)) || ($this->checkNegativeDiagonalWin($userMove)) ){ //winning message winningMsg($this->currentPlayer); $this->gameOver = true; return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkWinner($game) {\n\tglobal $message ;\n\t$winner = \"999\";\n\t$board = $game[\"board\"];\n\t$cellClicked = $game[\"clicked\"];\n\tif ($game[\"clicked\"] !== 9) {\n\t\tsettype($cellClicked, \"string\");\n\t\t$winCombo = array(\"012\",\"345\",\"678\",\"036\",\"147\",\"258\",\"840\",\"246\");\n\t\tfor(...
[ "0.6589166", "0.6433877", "0.64217716", "0.63819706", "0.63748604", "0.6328731", "0.6206049", "0.6187922", "0.6138559", "0.6135243", "0.6121035", "0.6108813", "0.6054958", "0.6048036", "0.6024792", "0.6010392", "0.59892184", "0.59780717", "0.59224045", "0.58602285", "0.582366...
0.5954841
18
Function check vartical winning [X] [X] [X] [X] function run from the point the user choose to type his discs check : first search below the userMove, then search above the userMove In case of sequence 4 of the current player in a column player won
public function checkVerticalWin($userMove){ $varticalCounter = self::ZERO; $gameBoards = $this->board->gameBoard; $current_player = "[$this->currentPlayer]"; for($row = ($this->board->getRows() - 1) ; $row > -1 ; $row-- ){ if($varticalCounter == self::WIN){ return true; } elseif($gameBoards[$row][$userMove-1] == $current_player){ $varticalCounter++; } elseif($row < 2 && $varticalCounter < 1 ){ return false; } elseif($gameBoards[$row][$userMove-1] == Board::CELL){ $varticalCounter = self::ZERO; continue; } else{ $varticalCounter = self::ZERO; } } return $varticalCounter >= self::WIN ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function winCheck($userMove){\r\n // Check if we have reached the minimum steps to have a win\r\n if($this->totalMoves < Board::COLUMNS){\r\n return false;\r\n }\r\n //check vertical Horizontal Positive Diagonal Negative Diagona win\r\n if(($this->checkVertic...
[ "0.68951416", "0.662804", "0.6547386", "0.64372027", "0.64133227", "0.6302336", "0.6201344", "0.6185081", "0.6123144", "0.6109314", "0.6096924", "0.60954505", "0.60832244", "0.60800713", "0.6068831", "0.5909381", "0.59088826", "0.5907605", "0.587992", "0.5871337", "0.57961196...
0.69348896
0
Function check Horizontal winning [X][X][X][X] In case of sequence 4 of the current player in a row player won
public function checkHorizontalWin($userMove){ $HorizontalCounter = self::ZERO; $gameBoards = $this->board->gameBoard; $row = $this->lastRowInsert; $current_player = "[$this->currentPlayer]"; for($col = $userMove-1; $col > -1 ; $col-- ){ if($gameBoards[$row][$col] != $current_player){ break; } $HorizontalCounter++; } for($col= $userMove; $col < Board::COLUMNS ; $col++){ if($gameBoards[$row][$col] != $current_player){ break; } $HorizontalCounter++; } return $HorizontalCounter >= self::WIN ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkWin($board) {\n $values = array();\n // horizontal\n for($r = 0; $r < 6; $r++) {\n $values[] = '';\n $i = count($values) - 1;\n for($c = 0; $c < 6; $c++) {\n $values[$i] .= $board[$r][$c];\n }\n }\n // vertical\n for($c = 0; $c < 6; $c++) {\n ...
[ "0.6832586", "0.6633101", "0.66100883", "0.6586113", "0.6439534", "0.64226496", "0.64079475", "0.639375", "0.6374308", "0.6293329", "0.62067664", "0.6015634", "0.5979617", "0.59258115", "0.59214294", "0.59026545", "0.5896327", "0.588674", "0.58455724", "0.58320796", "0.578149...
0.74083453
0
Function check Negative Diagonal winning [X] [X] [X] [X] function run from the point the user choose to type his discs check : first start to search on the upper right side of the selected userMove, then starts to search below left of the userMove selection In case of sequence at least 4 of the current player in a Diagonal player won
public function checkNegativeDiagonalWin($userMove){ $diagonalCounter = self::ZERO; $gameBoards = $this->board->gameBoard; $current_player = "[$this->currentPlayer]"; for($row = $this->lastRowInsert-1 ,$col = $userMove; $row > -1 && $col < Board::COLUMNS ; $row--, $col++ ){ if($gameBoards[$row][$col] != $current_player){ break; } $diagonalCounter++; } for($row = $this->lastRowInsert ,$col = $userMove-1; $row < Board::ROWS && $col > -1 ; $row++, $col-- ){ if($gameBoards[$row][$col] != $current_player){ break; } $diagonalCounter++; } return $diagonalCounter >= self::WIN ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function winCheck($userMove){\r\n // Check if we have reached the minimum steps to have a win\r\n if($this->totalMoves < Board::COLUMNS){\r\n return false;\r\n }\r\n //check vertical Horizontal Positive Diagonal Negative Diagona win\r\n if(($this->checkVertic...
[ "0.6600075", "0.6290938", "0.62222743", "0.61987793", "0.6095502", "0.60868734", "0.5933043", "0.584326", "0.57317954", "0.5723613", "0.56872284", "0.56503785", "0.5627409", "0.5589535", "0.55676717", "0.55502504", "0.5538387", "0.5535532", "0.5506976", "0.54482555", "0.54315...
0.7485393
0
Player Set current player
public function setCurrentPlayer($player){ $this->currentPlayer = $player; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPlayer(Player $player);", "public function setCurrentPlayer($player) {\n $this->game->set_current_turn($player);\n }", "public function switchActivePlayer()\n\t{\n\t\t$activeplayer = $this -> activePlayer;\n\t\t$playerX = $this -> playerX;\n\t\t$playerO = $this -> playerO;\n\t\tif ...
[ "0.8006255", "0.7876374", "0.68962395", "0.6857048", "0.6619847", "0.6473134", "0.63770133", "0.62825596", "0.62732565", "0.6243762", "0.61989444", "0.61837643", "0.61639684", "0.6089696", "0.6029448", "0.6025325", "0.6009613", "0.6009613", "0.6009613", "0.5985696", "0.592805...
0.87652165
0
Set Last Row inseat
public function setLastRowInsert($row){ $this->lastRowInsert = $row; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lastRow() {\n\t}", "private function setCurrRow()\r\n {\r\n // (1) if bNewRow, there is no selection\r\n if( $this->oComp->bNewRow ) {\r\n $this->oComp->kfuiCurrRow->SetKey(0); // this also clears the form's oDS->kfr\r\n }\r\n // (2) if there is no curre...
[ "0.7037437", "0.6079164", "0.58813494", "0.57635623", "0.57365763", "0.57318896", "0.57262325", "0.5721942", "0.5720174", "0.56707984", "0.56589437", "0.56538653", "0.56523293", "0.56523293", "0.56523293", "0.55810255", "0.55810255", "0.54979813", "0.54979813", "0.54957116", ...
0.69677466
1
Set Last Row inseat
public function getLastRowInsert(){ return $this->lastRowInsert; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lastRow() {\n\t}", "public function setLastRowInsert($row){\r\n $this->lastRowInsert = $row;\r\n }", "private function setCurrRow()\r\n {\r\n // (1) if bNewRow, there is no selection\r\n if( $this->oComp->bNewRow ) {\r\n $this->oComp->kfuiCurrRow->SetKey(0...
[ "0.7037437", "0.69677466", "0.6079164", "0.58813494", "0.57635623", "0.57365763", "0.57318896", "0.57262325", "0.5721942", "0.5720174", "0.56707984", "0.56538653", "0.56523293", "0.56523293", "0.56523293", "0.55810255", "0.55810255", "0.54979813", "0.54979813", "0.54957116", ...
0.56589437
11
Method returning the class name
public function __toString() { return __CLASS__; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName();", "public function getClassName();", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n ...
[ "0.87522393", "0.87522393", "0.8751158", "0.87397957", "0.87397957", "0.87397957", "0.87397957", "0.8731564", "0.8696754", "0.8673495", "0.8638432", "0.8615335", "0.8603119", "0.8566906", "0.8562364", "0.8555002", "0.85503733", "0.85503733", "0.85425884", "0.8533183", "0.8529...
0.0
-1
Display a listing of the resource.
public function all(){ $posts = $this->repository->all(); SEOMeta::setTitle("Blog"); SEOMeta::setDescription("Blog público com as opiniões de diversos alunos e professores da plataforma"); return view('posts.all', ['posts' => $posts]); }
{ "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
Update the specified resource in storage.
public function update(Request $request, $id){ $request = $this->service->update($request->all(), $id); $post = $request['success'] ? $request['data'] : null; session()->flash('success',[ 'success' => $request['success'], 'messages' => $request['messages'] ]); return redirect()->back(); }
{ "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){ $request= $this->service->delete($id); $post = $request['success'] ? $request['data'] : null; session()->flash('success',[ 'success' => $request['success'], 'messages' => $request['messages'] ]); return redirect()->back(); }
{ "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
Return an array of files with their full paths contained in a directory and its subdirectories
public function directoryFiles($path) { $contents = []; // Scan directory $directoryFiles = scandir($path); foreach ($directoryFiles as $index => $filePath) { // Ommit . and .. if ( ! in_array($filePath, ['.', '..'])) { // Check if this is a directory if (is_dir($path . DIRECTORY_SEPARATOR . $filePath)) { // Rescan and get files in this directory $contents = array_merge($contents, self::directoryFiles($path . DIRECTORY_SEPARATOR . $filePath)); } else { // Add file to contens array $contents[] = $path . DIRECTORY_SEPARATOR . $filePath; } } } return $contents; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function papi_get_all_files_in_directory( $directory = '' ) {\n\t$result = [];\n\n\tif ( empty( $directory ) || ! is_string( $directory ) ) {\n\t\treturn $result;\n\t}\n\n\tif ( file_exists( $directory ) && $handle = opendir( $directory ) ) {\n\t\twhile ( false !== ( $file = readdir( $handle ) ) ) {\n\t\t\tif ( ! ...
[ "0.7470955", "0.74113894", "0.739653", "0.7379512", "0.73318774", "0.7309054", "0.7257001", "0.71673524", "0.7162255", "0.71231693", "0.7106282", "0.7070243", "0.7036096", "0.7017344", "0.6989162", "0.69792134", "0.6940224", "0.6939942", "0.6930784", "0.69298387", "0.6923743"...
0.79096025
0
Return the form metadata.
public static function get_big_sea_survey_definition() { return array( 'title' => 'Big Sea Survey', 'category' => 'Forms for specific surveying methods', 'description' => 'A dynamic form which allows a front page to define the number of transects to record across '. 'a set of zones and multiple copies of the second page allow data to be input per transect.' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMetaData()\n {\n if (is_null($this->_metaData)) {\n list($app, $name) = explode('/', $this->_config['name']);\n $args = array($name, $this->_config['params']);\n $this->_metaData = $GLOBALS['registry']->callByPackage(\n $app, 'getTableMet...
[ "0.7069291", "0.6970771", "0.6890191", "0.6722233", "0.6678683", "0.6641073", "0.6616351", "0.66120785", "0.6585969", "0.6539794", "0.653801", "0.65291524", "0.6526674", "0.6525057", "0.6525057", "0.6525057", "0.6525057", "0.6525057", "0.6525057", "0.6525057", "0.6525057", ...
0.0
-1
Get the list of parameters for this form.
public static function get_parameters() { $r = array_merge( parent::get_parameters(), array( array( 'name' => 'transect_count_attr_ids', 'caption' => 'Transect count attribute IDs', 'description' => 'Comma separated list of sample attribute IDs. Specify each attribute that can contain a count of transects surveyed '. '(e.g. low shore, middle shore, high shore). For each attribute, n transects will be available for data input.', 'type' => 'textfield', 'required' => true, 'group' => 'Big Sea setup' ), array( 'name' => 'transect_captions', 'caption' => 'Transect captions', 'description' => 'Comma separated list of captions to use for each of the above attributes, in the same order.', 'type' => 'textfield', 'required' => true, 'group' => 'Big Sea setup' ), array( 'name' => 'child_sample_zone_attr_id', 'caption' => 'Child sample zone attribute ID', 'description' => 'A text attribute used to store the zone in the child sample.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Big Sea setup' ), array( 'name' => 'child_sample_transect_attr_id', 'caption' => 'Child sample transect attribute ID', 'description' => 'An integer attribute used to store the transect in the child sample.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Big Sea setup' ), array( 'name' => 'search_species_transect_attr_id', 'caption' => 'Parent sample search species attribute ID', 'description' => 'An integer multivalut attribute used to store the search species list in the parent attribute.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Big Sea setup' ), array( 'name' => 'front_page_path', 'caption' => 'Front page path', 'description' => 'Path to the front page input form.', 'type' => 'textfield', 'required' => true, 'group' => 'Big Sea setup' ), array( 'name' => 'parent_sample_method_id', 'caption' => 'Parent Sample Method', 'type' => 'select', 'table' => 'termlists_term', 'captionField' => 'term', 'valueField' => 'id', 'extraParams' => array('termlist_external_key' => 'indicia:sample_methods'), 'required' => false, 'helpText' => 'The sample method that will be used for created visit samples.', 'group' => 'Big Sea setup' ) ) ); return $r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormParameters()\n {\n return $this->form_parameters;\n }", "public static function get_parameters() {\n return array(\n array(\n 'name' => 'termlist_id',\n 'caption' => 'Term List',\n 'description' => 'The term list being edited.',\n 't...
[ "0.8332949", "0.78399944", "0.76719576", "0.76072896", "0.7491836", "0.7477387", "0.74732774", "0.74732774", "0.74732774", "0.74732774", "0.7458015", "0.7458015", "0.74534774", "0.7426106", "0.74234897", "0.74234897", "0.74234897", "0.74234897", "0.74234897", "0.74234897", "0...
0.0
-1
Override get_form_html. We remove the second tab when first inputting a new sample, because the second tab can't save unless there is a parent sample available to link to.
protected static function get_form_html($args, $auth, $attributes) { if (empty($_GET['id'])) return 'This form must be called with an id in the URL parameters'; data_entry_helper::$javascript .= "indiciaData.latLongNotationPrecision=5;\n"; return parent::get_form_html($args, $auth, $attributes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Div')->class('row')\n\t\t\t\t-...
[ "0.5820625", "0.5792812", "0.56628263", "0.55820626", "0.5450527", "0.54472023", "0.5398867", "0.5376441", "0.533629", "0.5321032", "0.53112996", "0.5301038", "0.5282201", "0.52742237", "0.5274073", "0.5271789", "0.5268261", "0.5254349", "0.52370733", "0.523299", "0.5202378",...
0.0
-1
reload the page after initial save show parent sample so we can enter the transect data.
protected static function getMode($args, $nid) { if (!empty($_GET['id']) && !empty($_GET['table']) && $_GET['table']==='sample') $_GET['sample_id']=$_GET['id']; return parent::getMode($args, $nid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reeditSurvey() {\n $this->layout = 'survey'; // use the more basic survey layout\n $this->Session->write('Survey.progress', GDTA_ENTRY); // change the progress back to GDTA entry\n $this->redirect(array('action' => 'enterGdta'));\n }", "function parent_add_view()\n {\n if ($this->session-...
[ "0.5612769", "0.54697454", "0.54483396", "0.5438584", "0.54202765", "0.540775", "0.5407571", "0.53850156", "0.53848875", "0.5345823", "0.5313987", "0.53090984", "0.53062284", "0.5302938", "0.5254672", "0.52392924", "0.52292204", "0.51982474", "0.5195093", "0.51925135", "0.519...
0.0
-1
Save button takes us to the next transect.
public static function get_redirect_on_success($values, $args) { if (!empty($values['next-zone']) && !empty($values['next-transect'])) return $args['redirect_on_success'] . '?' . data_entry_helper::array_to_query_string(array( 'table' => 'sample', 'id'=>$values['sample:parent_id'], 'zone'=>$values['next-zone'], 'transect'=>$values['next-transect'] )); else return $args['front_page_path']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save() {\n\t\t$this->data[] = $this->current();\n\t}", "public function saveAction()\n {\n if ($data = $this->getRequest()->getPost('traineedoc')) {\n try {\n $data = $this->_filterDates($data, array('trainee_doc_date'));\n\n $traineedoc = $this-...
[ "0.66927737", "0.64809036", "0.6385524", "0.6344733", "0.631074", "0.62367415", "0.61269546", "0.6089459", "0.6073153", "0.6062701", "0.60327435", "0.60327435", "0.60327435", "0.6014939", "0.59839624", "0.59777945", "0.5921623", "0.59169906", "0.59169906", "0.59073347", "0.59...
0.0
-1
A variant of the species grid control with just the fixed species categories available.
protected static function get_control_fixedspecies($auth, $args, $tabAlias, $options) { unset($args['extra_list_id']); $options['rowInclusionCheck']='hasData'; $options['id']='fixed-list'; return parent::get_control_species($auth, $args, $tabAlias, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shq_genestrap_categories_grid_shortcode() {\n\t$colNum = 4;\n\t$currentCol = 1;\n\t$categories = get_categories();\n\n\t// Open the row\n\t$output = genesis_markup(\n\t\t[\n\t\t\t'open' => '<div %s>',\n\t\t\t'context' => 'categories-grid',\n\t\t\t'echo' => false,\n\t\t]\n\t);\n\n\tforeach ( $cat...
[ "0.5809869", "0.5502675", "0.54181916", "0.54147524", "0.5324543", "0.5317915", "0.5244584", "0.52160305", "0.52015203", "0.51937073", "0.5155164", "0.50947785", "0.5060177", "0.50577253", "0.5049416", "0.5045114", "0.50351954", "0.5016639", "0.5014751", "0.5012064", "0.50074...
0.4935994
27
A variant of the species grid control with just the flexible search species available.
protected static function get_control_searchspecies($auth, $args, $tabAlias, $options) { // build a list of the search species IDs $ttlIds=[]; foreach (self::$parentSampleAttrs['smpAttr:'.$args['search_species_transect_attr_id']]['default'] as $value) { $ttlIds[] = $value['default']; } if (empty($ttlIds)) return '<p>'.lang::get('Please fill in the search species on the front page.').'</p>'; // safety $args['list_id']=$args['extra_list_id']; $args['taxon_filter_field']='taxa_taxon_list_id'; $args['taxon_filter']=implode("\n", $ttlIds); $options['rowInclusionCheck']='alwaysFixed'; $options['id']='search-list'; unset($args['extra_list_id']); return parent::get_control_species($auth, $args, $tabAlias, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showSearch () {\n\t\t$template['list'] = $this->cObj->getSubpart($this->templateCode,'###TEMPLATE_SEARCH###');\n\t\t$subpartArray = array();\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['search.']['LL'], 'search');\n\n\t\t// hide the radisus search by using a subpart\n\t\tif...
[ "0.5675033", "0.56723744", "0.55281776", "0.5326758", "0.5324858", "0.53080314", "0.53009504", "0.5294246", "0.5257911", "0.5253758", "0.52512854", "0.5246763", "0.51993203", "0.51870114", "0.5185717", "0.5153325", "0.5136134", "0.5107807", "0.51014835", "0.5100494", "0.50958...
0.5802574
0
A set of input controls for defining the transect.
protected static function get_control_latlongs($auth, $args, $tabAlias, $options) { $r = data_entry_helper::text_input(array( 'label' => 'Transect start', 'fieldname' => 'gpsstart', 'helpText' => lang::get('Transect start, GPS coordinate (decimal WGS84 latitude and longitude). Click once on the map to set.') )); $r .= data_entry_helper::text_input(array( 'label' => 'Transect end', 'fieldname' => 'gpsend', 'helpText' => lang::get('Transect end, GPS coordinate (decimal WGS84 latitude and longitude). Click again on the map to set.') )); return $r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_controls()\n\t{\n\t\treturn array\n\t\t(\n\t\t\tself::CONTROL_PERMISSION => Module::PERMISSION_CREATE,\n\t\t\tself::CONTROL_RECORD => true,\n\t\t\tself::CONTROL_OWNERSHIP => true,\n\t\t\tself::CONTROL_FORM => true\n\t\t)\n\n\t\t+ parent::get_controls();\n\t}", "protected function _register...
[ "0.6379662", "0.62218696", "0.62190634", "0.61529434", "0.6125563", "0.6070212", "0.6038771", "0.59947556", "0.5971441", "0.5961184", "0.5950652", "0.5944477", "0.58884037", "0.5883044", "0.5873803", "0.58702385", "0.58504665", "0.5847933", "0.5840035", "0.58113354", "0.57803...
0.0
-1
Run the database seeds.
public function run(Faker $faker) { //seleziono tutti gli autori $authors = Author::all(); //ciclo tutti gli autori, per ogni autore inserisco foreach($authors as $author) { if($author->info == null) { $newAuthorInfo = new AuthorInfo; $newAuthorInfo->author_id; $newAuthorInfo->nationality = $faker->country(); $newAuthorInfo->bio = $faker->paragraph(5, true); if(rand(0,1) == 1) { $newAuthorInfo->image = $faker->imageUrl(200, 300); $newAuthorInfo->alive = 1; } $newAuthorInfo->save(); } } }
{ "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
Name of the DHL Express product.
public function getProductName(): ?string { return $this->productName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_name() {\n $type = static::get_type();\n return util::string(\"product:{$type}\");\n }", "public function getName_product()\n {\n return $this->name_product;\n }", "public function getProductName()\n {\n return $this->product_name;\n }", "...
[ "0.72593105", "0.7219317", "0.7193031", "0.71342313", "0.7015499", "0.67939943", "0.6786698", "0.67198807", "0.6634048", "0.658662", "0.63774276", "0.6364802", "0.6331167", "0.6311149", "0.6241261", "0.6121327", "0.6117779", "0.60898906", "0.6082293", "0.6038307", "0.59841585...
0.6133614
17
Name of the DHL Express product.
public function setProductName(?string $productName): self { $this->initialized['productName'] = true; $this->productName = $productName; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_name() {\n $type = static::get_type();\n return util::string(\"product:{$type}\");\n }", "public function getName_product()\n {\n return $this->name_product;\n }", "public function getProductName()\n {\n return $this->product_name;\n }", "...
[ "0.72593105", "0.7219317", "0.7193031", "0.71342313", "0.7015499", "0.67939943", "0.6786698", "0.67198807", "0.6634048", "0.658662", "0.63774276", "0.6364802", "0.6331167", "0.6311149", "0.6241261", "0.6133614", "0.6133614", "0.6133614", "0.6121327", "0.6117779", "0.60898906"...
0.0
-1
This is the global DHL Express product code for which the delivery is feasible respecting the input data from the request.
public function getProductCode(): ?string { return $this->productCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function determainclaimType()\r\n {\r\n // 9 digits\r\n if (preg_match($this->keycodeRegex, $this->keycode) == false)\r\n {\r\n $this->claimType = \"invaild-keycode\";\r\n }\r\n \r\n // if keycode is NOT null, then sear...
[ "0.53944427", "0.53511393", "0.5349683", "0.5337892", "0.5308377", "0.516954", "0.5146196", "0.50744647", "0.50678635", "0.5064892", "0.5059646", "0.5043782", "0.5042561", "0.50407887", "0.50379145", "0.5032669", "0.5023446", "0.5014851", "0.50129956", "0.5010874", "0.5003925...
0.488531
40
This is the global DHL Express product code for which the delivery is feasible respecting the input data from the request.
public function setProductCode(?string $productCode): self { $this->initialized['productCode'] = true; $this->productCode = $productCode; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function determainclaimType()\r\n {\r\n // 9 digits\r\n if (preg_match($this->keycodeRegex, $this->keycode) == false)\r\n {\r\n $this->claimType = \"invaild-keycode\";\r\n }\r\n \r\n // if keycode is NOT null, then sear...
[ "0.5394845", "0.5349989", "0.53499657", "0.53370935", "0.5307311", "0.5170349", "0.5147347", "0.50740886", "0.5068462", "0.5063131", "0.5057364", "0.5043972", "0.5042954", "0.50401294", "0.5035706", "0.5033784", "0.50239867", "0.5014267", "0.5013367", "0.5010645", "0.5002312"...
0.0
-1
This is the local DHL Express product code for which the delivery is feasible respecting the input data from the request.
public function getLocalProductCode(): ?string { return $this->localProductCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProduct_code () {\n\t$preValue = $this->preGetValue(\"product_code\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_code;\n\treturn $data;\n}", "private function determainclaimType()\r\n {\r\n // 9 digits\r\n ...
[ "0.55132407", "0.5250005", "0.52417946", "0.519151", "0.518918", "0.51860404", "0.5183702", "0.51620764", "0.5121596", "0.5102158", "0.5071421", "0.5064782", "0.50458515", "0.5026691", "0.50166225", "0.49991503", "0.499401", "0.49783915", "0.49728212", "0.48994455", "0.488451...
0.5668688
0
This is the local DHL Express product code for which the delivery is feasible respecting the input data from the request.
public function setLocalProductCode(?string $localProductCode): self { $this->initialized['localProductCode'] = true; $this->localProductCode = $localProductCode; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLocalProductCode(): ?string\n {\n return $this->localProductCode;\n }", "public function getProduct_code () {\n\t$preValue = $this->preGetValue(\"product_code\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_code;\n\t...
[ "0.5670038", "0.55147827", "0.5249802", "0.5243149", "0.51940495", "0.5190678", "0.5186055", "0.5182411", "0.51613486", "0.5120875", "0.51044416", "0.50716776", "0.50647014", "0.50469846", "0.5027506", "0.50167537", "0.49985266", "0.49944723", "0.49802482", "0.4972659", "0.48...
0.472589
44
The country code for the local service used.
public function getLocalProductCountryCode(): ?string { return $this->localProductCountryCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countryCode();", "public function getCountryCode()\n {\n return $this->country_code;\n }", "public function getCountryCode()\n {\n return $this->country_code;\n }", "public function getCountryCode()\n {\n return $this->country_code;\n }", "public funct...
[ "0.8142543", "0.8101725", "0.8101725", "0.8101725", "0.80856514", "0.80809814", "0.8072471", "0.80634975", "0.80614734", "0.8054734", "0.8044396", "0.7995372", "0.7995372", "0.7995372", "0.79879904", "0.793553", "0.7920998", "0.7907546", "0.7907271", "0.79009086", "0.7836446"...
0.732138
62
The country code for the local service used.
public function setLocalProductCountryCode(?string $localProductCountryCode): self { $this->initialized['localProductCountryCode'] = true; $this->localProductCountryCode = $localProductCountryCode; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countryCode();", "public function getCountryCode()\n {\n return $this->country_code;\n }", "public function getCountryCode()\n {\n return $this->country_code;\n }", "public function getCountryCode()\n {\n return $this->country_code;\n }", "public funct...
[ "0.8142543", "0.8101725", "0.8101725", "0.8101725", "0.80856514", "0.80809814", "0.8072471", "0.80634975", "0.80614734", "0.8054734", "0.8044396", "0.7995372", "0.7995372", "0.7995372", "0.79879904", "0.793553", "0.7920998", "0.7907546", "0.7907271", "0.79009086", "0.7836446"...
0.0
-1
The NetworkTypeCode element indicates the product belongs to the Day Definite (DD) or Time Definite (TD) network. Possible Values; DD: Day Definite product TD: Time Definite product.
public function getNetworkTypeCode(): ?string { return $this->networkTypeCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNetworkTypeCode(?string $networkTypeCode): self\n {\n $this->initialized['networkTypeCode'] = true;\n $this->networkTypeCode = $networkTypeCode;\n\n return $this;\n }", "public function getAdNetworkType()\n {\n return $this->ad_network_type;\n }", "fun...
[ "0.5964149", "0.5531543", "0.5402334", "0.5320659", "0.50460637", "0.5028686", "0.5000282", "0.49938503", "0.49405426", "0.47683275", "0.47538877", "0.47342655", "0.46673933", "0.4646093", "0.46384332", "0.46384332", "0.45928445", "0.45781636", "0.45749137", "0.4515465", "0.4...
0.6282591
0
The NetworkTypeCode element indicates the product belongs to the Day Definite (DD) or Time Definite (TD) network. Possible Values; DD: Day Definite product TD: Time Definite product.
public function setNetworkTypeCode(?string $networkTypeCode): self { $this->initialized['networkTypeCode'] = true; $this->networkTypeCode = $networkTypeCode; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNetworkTypeCode(): ?string\n {\n return $this->networkTypeCode;\n }", "public function getAdNetworkType()\n {\n return $this->ad_network_type;\n }", "function network_code( $network ){\n $network = trim(strtolower( $network ) );\n switch ($network) {\n ...
[ "0.6283847", "0.55310315", "0.5403923", "0.53193134", "0.50447154", "0.5030371", "0.49977976", "0.49954498", "0.49425521", "0.47692546", "0.47555423", "0.47384894", "0.46731952", "0.46456292", "0.46392566", "0.46392566", "0.45956838", "0.45785922", "0.4575585", "0.45174977", ...
0.5967874
1
Indicator that the product only can be offered to customers with prior agreement.
public function getIsCustomerAgreement(): ?bool { return $this->isCustomerAgreement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form_is_available_to_create_a_customer()\n {\n\n }", "abstract function has_purchased_before();", "public function shouldAcceptLicense()\n {\n return !Config::get('licenseAccepted');\n }", "abstract function is_only_premium();", "public function isIndependentCreditSupport...
[ "0.6664504", "0.6564951", "0.6555718", "0.6475293", "0.64315957", "0.633081", "0.6239179", "0.62027127", "0.61860466", "0.60351485", "0.6010945", "0.60030466", "0.59828126", "0.59474903", "0.59460324", "0.5935436", "0.5933044", "0.5899337", "0.5897854", "0.58636314", "0.58616...
0.0
-1
Indicator that the product only can be offered to customers with prior agreement.
public function setIsCustomerAgreement(?bool $isCustomerAgreement): self { $this->initialized['isCustomerAgreement'] = true; $this->isCustomerAgreement = $isCustomerAgreement; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form_is_available_to_create_a_customer()\n {\n\n }", "abstract function has_purchased_before();", "public function shouldAcceptLicense()\n {\n return !Config::get('licenseAccepted');\n }", "abstract function is_only_premium();", "public function isIndependentCreditSupport...
[ "0.66637474", "0.65660894", "0.65564406", "0.647481", "0.643241", "0.6331137", "0.6238166", "0.62024635", "0.61867654", "0.60360765", "0.6010349", "0.60037494", "0.5983805", "0.59480965", "0.5947196", "0.5934996", "0.59339064", "0.5899457", "0.5896936", "0.58629864", "0.58620...
0.0
-1
Group of serviceCodes that are mutually exclusive. Only one serviceCode among the list must be applied for a shipment.
public function getServiceCodeMutuallyExclusiveGroups(): ?array { return $this->serviceCodeMutuallyExclusiveGroups; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setServiceCodeMutuallyExclusiveGroups(?array $serviceCodeMutuallyExclusiveGroups): self\n {\n $this->initialized['serviceCodeMutuallyExclusiveGroups'] = true;\n $this->serviceCodeMutuallyExclusiveGroups = $serviceCodeMutuallyExclusiveGroups;\n\n return $this;\n }", "pri...
[ "0.58850074", "0.49553943", "0.49392864", "0.4848271", "0.48201522", "0.4686679", "0.4649376", "0.46396685", "0.46146575", "0.45713502", "0.4563714", "0.45408788", "0.44908535", "0.44529673", "0.44430092", "0.44409707", "0.4421516", "0.4421516", "0.4415551", "0.44083655", "0....
0.62914324
0
Group of serviceCodes that are mutually exclusive. Only one serviceCode among the list must be applied for a shipment.
public function setServiceCodeMutuallyExclusiveGroups(?array $serviceCodeMutuallyExclusiveGroups): self { $this->initialized['serviceCodeMutuallyExclusiveGroups'] = true; $this->serviceCodeMutuallyExclusiveGroups = $serviceCodeMutuallyExclusiveGroups; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServiceCodeMutuallyExclusiveGroups(): ?array\n {\n return $this->serviceCodeMutuallyExclusiveGroups;\n }", "private function _serviceEliminateDuplicates()\n {\n return Mage::getModel('mmdebugging_blockinformation_service/match_text_eliminateduplicates', array(\n ...
[ "0.6291504", "0.49534437", "0.49397144", "0.48473418", "0.48183835", "0.46865356", "0.46495193", "0.4640016", "0.46138838", "0.45725414", "0.45638192", "0.45411426", "0.44887283", "0.44548804", "0.44414827", "0.443988", "0.44215247", "0.44215247", "0.44161674", "0.4409899", "...
0.58839995
1
Dependency rule groups for a particular serviceCode.
public function getServiceCodeDependencyRuleGroups(): ?array { return $this->serviceCodeDependencyRuleGroups; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setServiceCodeDependencyRuleGroups(?array $serviceCodeDependencyRuleGroups): self\n {\n $this->initialized['serviceCodeDependencyRuleGroups'] = true;\n $this->serviceCodeDependencyRuleGroups = $serviceCodeDependencyRuleGroups;\n\n return $this;\n }", "public function te...
[ "0.6945669", "0.5391789", "0.53563416", "0.51035523", "0.5008549", "0.50082374", "0.4981849", "0.4923943", "0.48742232", "0.4836029", "0.48235476", "0.48104113", "0.47624975", "0.47624975", "0.4750398", "0.47161323", "0.46397656", "0.46376863", "0.46341503", "0.4630065", "0.4...
0.70263803
0
Dependency rule groups for a particular serviceCode.
public function setServiceCodeDependencyRuleGroups(?array $serviceCodeDependencyRuleGroups): self { $this->initialized['serviceCodeDependencyRuleGroups'] = true; $this->serviceCodeDependencyRuleGroups = $serviceCodeDependencyRuleGroups; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServiceCodeDependencyRuleGroups(): ?array\n {\n return $this->serviceCodeDependencyRuleGroups;\n }", "public function testGetRuleGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "private function getServiceGroups(int $se...
[ "0.70263803", "0.5391789", "0.53563416", "0.51035523", "0.5008549", "0.50082374", "0.4981849", "0.4923943", "0.48742232", "0.4836029", "0.48235476", "0.48104113", "0.47624975", "0.47624975", "0.4750398", "0.47161323", "0.46397656", "0.46376863", "0.46341503", "0.4630065", "0....
0.6945669
1
The date when the rates for DHL products and services is provided.
public function getPricingDate(): ?string { return $this->pricingDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentDate();", "public function getDate() { return $this->date; }", "public function getDate(){\n\t\treturn $this->laDate;\n\t}", "public function getDateDebut();", "function getDateRated() {\n\t\treturn $this->getData('dateRated');\n\t}", "public function getPayDate() {\r\n\r\n\t\ts...
[ "0.6436603", "0.6209873", "0.61414266", "0.6127206", "0.6116815", "0.6050596", "0.60500246", "0.6048442", "0.6048442", "0.60428214", "0.6032265", "0.6032265", "0.6010004", "0.6000642", "0.5993065", "0.5968674", "0.5959125", "0.5957036", "0.5957036", "0.5957036", "0.5957036", ...
0.60497963
7
The date when the rates for DHL products and services is provided.
public function setPricingDate(?string $pricingDate): self { $this->initialized['pricingDate'] = true; $this->pricingDate = $pricingDate; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentDate();", "public function getDate() { return $this->date; }", "public function getDate(){\n\t\treturn $this->laDate;\n\t}", "public function getDateDebut();", "function getDateRated() {\n\t\treturn $this->getData('dateRated');\n\t}", "public function getPayDate() {\r\n\r\n\t\ts...
[ "0.6435639", "0.62082344", "0.61397845", "0.61246985", "0.6114722", "0.60497844", "0.60495675", "0.60482556", "0.6046553", "0.6046553", "0.6041033", "0.60306317", "0.60306317", "0.6007289", "0.5998567", "0.5991409", "0.5966282", "0.595753", "0.5955343", "0.5955343", "0.595534...
0.0
-1
Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($cl...
[ "0.74850124", "0.73803526", "0.7154113", "0.71401674", "0.70629025", "0.703232", "0.69285315", "0.69285315", "0.6925706", "0.6902751", "0.6894916", "0.6894916", "0.68900806", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0....
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('id',$this->id); $criteria->compare('title',$this->title,true); $criteria->compare('content',$this->content,true); $criteria->compare('parent',$this->parent); $criteria->compare('children',$this->children,true); $criteria->compare('url',$this->url,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('w...
[ "0.6745192", "0.6745192", "0.6607936", "0.6480248", "0.6380478", "0.6346251", "0.6309924", "0.6302481", "0.62549895", "0.62511677", "0.62511677", "0.6111791", "0.60769993", "0.60728127", "0.60465515", "0.60351735", "0.6033834", "0.601554", "0.5982608", "0.59806865", "0.597930...
0.0
-1
calculate and add columns to row
protected function setColumnFuncs($columnFuncsToUse){ $formattedFuncs = array(); for($columnFuncI = 0; $columnFuncI < count($columnFuncsToUse); $columnFuncI++){ $formattedFunc = $columnFuncsToUse[$columnFuncI]; $funcToUse = $columnFuncsToUse[$columnFuncI]["functionName"]; // echo '<br />setting column func :<br />'; // print_r($funcToUse); if(method_exists(__CLASS__, $funcToUse)){ $funcArgs = $columnFuncsToUse[$columnFuncI]["functionArgs"]; // echo '<br />args for func :<br />'; // print_r($funcArgs); // Turn label key into a column index number if( $columnFuncsToUse[$columnFuncI]["functionArgsAreLabels"] == true){ // echo '<br />--- ARGS ARE STRINGS ---<br />'; for($columnFuncArgI = 0; $columnFuncArgI < count($funcArgs); $columnFuncArgI++){ // echo '<br />this one is :<br />'; // print_r($formattedFunc); // print_r($formattedFunc["functionArgs"]); $formattedFunc["functionArgs"][$columnFuncArgI] = self::headerLabelStringToIndex( $this->headers, $funcArgs[$columnFuncArgI]); // echo '<br />BUT NOW IT IS :<br />'; // print_r($formattedFunc); // print_r($formattedFunc["functionArgs"]); } }else{ $formattedFunc["functionArgs"] = $funcArgs; } } // echo '<br /><br />--- setColumnFuncs == Formatted Func is : --- :<br />'; // print_r($formattedFunc); // echo '<br /><br />'; $formattedFuncs[] = $formattedFunc; } $this->columnFuncs = $formattedFuncs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function calculateRowsAndColumns() {}", "abstract protected function _buildCalcRows();", "public function getSumColumn();", "function getCalculatedRows();", "abstract protected function doCols();", "public function addColumns( $value){\n return $this->_add(3, $value);\n }", "private fu...
[ "0.6973751", "0.6672808", "0.65247077", "0.61085564", "0.6083167", "0.6054141", "0.58244914", "0.58058816", "0.5688073", "0.56362253", "0.55681545", "0.5509784", "0.54949915", "0.5486088", "0.54698646", "0.5420478", "0.5348129", "0.5343558", "0.5299458", "0.5299319", "0.52809...
0.0
-1
Not very robust honestly...
static function getIntFromString($string){ $currencyUsedIndex = self::isCurrency( $string ); if($currencyUsedIndex !== false){ $int = self::stripCurrencySymbol($string, $currencyUsedIndex); }else{$int = (float) $string;} // echo "getIntFromString returning " . var_dump($int); return $int; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fix() ;", "function broken() { }", "private function _i() {\n }", "function broken() { return TRUE; }", "function initialBasicFixes()\r\n{\r\n /**\r\n * bypass date & timezone-related warnings with php 5.1\r\n */\r\n if (function_exists('date_default_timezone_set')) {\r\n $tz= ...
[ "0.5151072", "0.51348317", "0.5059398", "0.50500053", "0.50242794", "0.49902633", "0.49855116", "0.49151337", "0.49151337", "0.4874484", "0.4848878", "0.4847778", "0.48302767", "0.48212188", "0.48041454", "0.4727504", "0.47188863", "0.46942562", "0.46921372", "0.46861136", "0...
0.0
-1
Not looking for many currencies at the moment
static function isCurrency($string){ $currencySymbols = ["$", "¥", "€"]; if(filter_var($string, FILTER_SANITIZE_NUMBER_INT) === false){echo "IS NOT CURRENCY <br />";return false;} for($i=0;$i < count($currencySymbols); $i++){ // echo "looking for currency symbol : " . $currencySymbols[$i] . " in string $string"; $symbolPos = strpos($string, $currencySymbols[$i]); // var_dump($symbolPos); if($symbolPos !== false){ // echo "currency symbol found, returning : $symbolPos"; return $symbolPos; } } // echo "currency symbol NOT found, returning : $symbolPos"; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrencies();", "abstract protected function getSupportedCurrencies();", "public function getCurrency();", "public function getCurrency();", "public function getCurrencies() {\n\t\treturn array(\"CNY\");\n\t}", "public function getCurrencies()\n {\n return array(\"PLN\");\n ...
[ "0.76610744", "0.76505214", "0.69557923", "0.69557923", "0.67915344", "0.6761663", "0.6749245", "0.6749245", "0.67313373", "0.6673975", "0.6667657", "0.66076756", "0.6601238", "0.65640396", "0.65640396", "0.65640396", "0.6554611", "0.64844424", "0.6467971", "0.6464784", "0.64...
0.0
-1
forget password email send otp get and set new password
public function forgetpassword(){ return view('forgetpassword'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function forgetpassword()\n \t{\n \t\t$this->data['title'] = 'Forgot Password';\n\t\t$this->show_viewFrontInner('forget-password', $this->data);\n \t}", "public function forgetPass($email){\n \n if($email!=''){\n $password_token = str_random(10);\n $fake_token_one = str_random(...
[ "0.76001775", "0.7477187", "0.7387282", "0.73713034", "0.73262507", "0.72785753", "0.72157115", "0.7214546", "0.7209832", "0.72051334", "0.7190353", "0.71865267", "0.7184765", "0.71676904", "0.71670246", "0.7140743", "0.7132728", "0.7126819", "0.7125799", "0.71244514", "0.711...
0.6633077
89
otp send to user
public function sendOTP(Request $request){ $user = $this->_getUserByCondtion(['email'=>$request->email]); if(!$user){ return Response('This email is not associated with us!',406); } $request->session()->put('changePasswordEmail',$user->email); $otp=rand(1000,9999); $request->session()->put('otp',$otp); $data=array( 'name'=> 'parking hub', 'message'=>$otp ); try { Mail::to($request->email)->send(new sendmail($data)); } catch (Exception $e) { return response('Oops! Something went wrong, Please try again',500); } $email=$user->email; //'OPT sent to your email address, Please check your inbox' return response('Enter your otp',200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send_otp_to_user($email=null,$phone=null,$otp)\n {\n //send if phone number not null\n if($phone != null)\n {\n $otprequest = \"http://tra.bulksmsinhyderabad.co.in/websms/sendsms.aspx?userid=BIGEQP&password=BIGEQP&sender=BIGEQP&mobileno=\".$phone.\"&msg=\".urlenc...
[ "0.70574176", "0.6981252", "0.6954572", "0.6924916", "0.69024247", "0.68983245", "0.67402047", "0.6695809", "0.6576659", "0.64790624", "0.64414567", "0.64370304", "0.6410705", "0.6351671", "0.634918", "0.6342847", "0.63409424", "0.6253137", "0.6247669", "0.6241211", "0.623929...
0.7402916
0
/ Check OTP is verified or not
public function resetPassword(Request $request){ if(!session()->has('otpVerified') || !session()->get('otpVerified')){ return response('Something went wrong, Please try again',403); } $msg = [ "required"=>":attribute is required" ]; $validation=Validator::make($request->all(),[ 'confirmpwd' => 'required', 'newpwd' => 'required', ],$msg); $errors=$validation->errors(); if($validation->fails()){ return response("All fields are required",500); } /* vendor*/ if( Vendor::where(['email'=>$request->session()->get('changePasswordEmail')])->first()){ $user = Vendor::where(['email'=>$request->session()->get('changePasswordEmail')])->first(); } elseif (User::where(['email'=>$request->session()->get('changePasswordEmail')])->first()){ $user = User::where(['email'=>$request->session()->get('changePasswordEmail')])->first(); } if(!$user){ return response('OTP expired',404); } $newPassword = Hash::make($request->newpwd); $user->password=$newPassword; $user->save(); session()->forget('changePasswordEmail'); session()->forget('otpVerified'); return response('Successfully changed',200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verifyConfigOTP() {\n\t\tif ( ! wp_verify_nonce( HTTP_Helper::retrievePost( 'nonce' ), 'defVerifyOTP' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$otp = HTTP_Helper::retrievePost( 'otp' );\n\t\t$otp = trim( $otp );\n\t\tif ( strlen( $otp ) ...
[ "0.7584218", "0.7575734", "0.7416783", "0.73633474", "0.7290051", "0.7021241", "0.69265634", "0.69039273", "0.68252224", "0.6815819", "0.6789733", "0.6777905", "0.67406356", "0.6737853", "0.6731931", "0.66634655", "0.66526586", "0.66259694", "0.6618031", "0.6581429", "0.65719...
0.0
-1
/ } forget password end only show index page
public function index_page(){ $sessionData = [ 'name' => 'admin', 'email' => 'admin@gmail.com', 'id' => '1', 'profile' => '', 'role'=>'customer' ]; // session()->put('USER',$sessionData); // $user=User::find(session()->get('USER')['id']); return view('index',array('userInfo'=>$sessionData)); // return view('index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function forgetpassword()\n \t{\n \t\t$this->data['title'] = 'Forgot Password';\n\t\t$this->show_viewFrontInner('forget-password', $this->data);\n \t}", "public function index()\n\t{\n\t\trequire 'application/views/_templates/header.php';\n\t\trequire_once \"application/views/no_password/index.php\";\n\t...
[ "0.74157465", "0.7368982", "0.719471", "0.70688343", "0.70387083", "0.70316064", "0.6973417", "0.6947279", "0.69462633", "0.6882142", "0.6864511", "0.686108", "0.6851199", "0.6847043", "0.68113405", "0.67738974", "0.6734467", "0.67245626", "0.6714781", "0.6713951", "0.6652019...
0.0
-1
url can be divided into parts at each slash and this will return the part at the given index
public function param($index = null) { $params = array_filter(explode('/', $this->path)); if (strlen($params[0]) === 0) array_shift($params); if ($index === null) return array_map('rawurldecode', $params); if ($index < 0) { $slice = array_slice($params, $index, 1); if (!isset($slice[0])) return null; return rawurldecode($slice[0]); } if (!isset($params[$index])) return null; return rawurldecode($params[$index]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function urlSegment($int=''){\n $input = get('url');\n $input = explode('/', $input);\n $int--;\n return $input[$int];\n }", "function _tryToGetUrlPart( $offset ) {\n\n $_tmp['path'] = explode( \"/\", $this->_getPathUrl());\n if (! empty( $_tmp['path'][$offset] )) {\n...
[ "0.76095587", "0.6713584", "0.657735", "0.64487374", "0.642703", "0.6413999", "0.63420784", "0.6126001", "0.6092701", "0.6089099", "0.60823923", "0.60286915", "0.59776956", "0.59767735", "0.59696573", "0.59140915", "0.582758", "0.58208436", "0.5781532", "0.5755739", "0.571774...
0.5636689
26
No reason to update a page visit at the moment, they're always a individual occurrence
public function update( $AdminPageVisit, array $values = [], array $where = [] ) { return $AdminPageVisit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function rememberPageHasBeenVisited()\n\t{\n\t\tif( SETTINGS_LOG_VISITS )\n\t\t{\n\t\t\t$page = self::getPageCode();\n\t\t\t$type = Page::getContentType();\n\t\t\tif( $type == Page::KEY_HTML || $type == Page::KEY_DATA )\n\t\t\t{\n\t\t\t\tif( $id = self::getConnectionID() )\n\t\t\t\t{\n\t\t\t\t\tDB::u...
[ "0.6002477", "0.5860751", "0.5849099", "0.56848073", "0.56691575", "0.55868715", "0.5526023", "0.5510092", "0.5504599", "0.544197", "0.5429733", "0.53513384", "0.533774", "0.53324854", "0.53324854", "0.53295267", "0.52952707", "0.5284257", "0.5282541", "0.5282296", "0.5256017...
0.0
-1
How to use? etc. php 2.1.php lkjhg_99
function validateUname($data) { $pisahUnderscore = explode('_',$data); $str5=$pisahUnderscore[0]; $int2=$pisahUnderscore[1]; if ((str_word_count($str5) == 1) and (strlen((string) trim($str5)) == 5) and ((strlen((int) trim($int2)) == 2))) { echo "Terverifikasi"; } else { echo "Coba lagi"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function installPhp()\n { \n $this->span(\"Option not supported for this Linux distribution and version.\", 'error');\n }", "function versionPhp(){\r\n\t\t$test = phpversion();\r\n\t\t// on teste le premier chiffre\r\n\t\t$version = mb_substr($test, 0, 1);\r\n\t\tif ($version == 7) {\r\n\t\t\t$...
[ "0.60529304", "0.60503143", "0.59910834", "0.59577566", "0.5944758", "0.59052", "0.59012157", "0.58909386", "0.58416253", "0.5820317", "0.5819653", "0.5809496", "0.5802113", "0.57910967", "0.5775136", "0.5768308", "0.57608306", "0.5757943", "0.5757943", "0.5757943", "0.575794...
0.0
-1