query stringlengths 9 43.3k | document stringlengths 17 1.17M | metadata dict | negatives listlengths 0 30 | negative_scores listlengths 0 30 | document_score stringlengths 5 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Filter the query on the extendesc column Example usage: $query>filterByExtendesc('fooValue'); // WHERE extendesc = 'fooValue' $query>filterByExtendesc('%fooValue%', Criteria::LIKE); // WHERE extendesc LIKE '%fooValue%' | public function filterByExtendesc($extendesc = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($extendesc)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PricingTableMap::COL_EXTENDESC, $extendesc, $comparison);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByDescription($description = null)\n\t{\n\t\tif(preg_match('/[\\%\\*]/', $description)) {\n\t\t\treturn $this->addUsingAlias(cre8ContentTypePeer::DESCRIPTION, str_replace('*', '%', $description), Criteria::LIKE);\n\t\t} else {\n\t\t\treturn $this->addUsingAlias(cre8ContentTypePeer::DESCRIPTIO... | [
"0.52757347",
"0.5252631",
"0.52311575",
"0.51344764",
"0.5005266",
"0.49893588",
"0.49025863",
"0.48644024",
"0.48415038",
"0.4794027",
"0.47672227",
"0.47225648",
"0.47096163",
"0.47072816",
"0.470098",
"0.4699877",
"0.46994367",
"0.46415266",
"0.4585849",
"0.45650503",
"0.... | 0.65059096 | 0 |
Filter the query on the minprice column Example usage: $query>filterByMinprice(1234); // WHERE minprice = 1234 $query>filterByMinprice(array(12, 34)); // WHERE minprice IN (12, 34) $query>filterByMinprice(array('min' => 12)); // WHERE minprice > 12 | public function filterByMinprice($minprice = null, $comparison = null)
{
if (is_array($minprice)) {
$useMinMax = false;
if (isset($minprice['min'])) {
$this->addUsingAlias(PricingTableMap::COL_MINPRICE, $minprice['min'], Criteria::GREATER_EQUAL);
$useM... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByPrice($min_max){\n $min_max_array = explode(', ', $min_max);\n $min_price = $min_max_array[0];\n $max_price = $min_max_array[1];\n\n $products = DB::table('products')\n ->join('subcategories', 'products.subcategory_id', '=', 'subcategories.id')\n ->... | [
"0.61551964",
"0.5982418",
"0.59678733",
"0.58378834",
"0.57249796",
"0.56865096",
"0.55973595",
"0.5591657",
"0.55772614",
"0.5476192",
"0.53929573",
"0.5378266",
"0.5332881",
"0.5328747",
"0.5322231",
"0.5310985",
"0.5284125",
"0.528286",
"0.5270253",
"0.52429354",
"0.52300... | 0.68627423 | 0 |
Filter the query on the spcord column Example usage: $query>filterBySpcord('fooValue'); // WHERE spcord = 'fooValue' $query>filterBySpcord('%fooValue%', Criteria::LIKE); // WHERE spcord LIKE '%fooValue%' | public function filterBySpcord($spcord = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($spcord)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PricingTableMap::COL_SPCORD, $spcord, $comparison);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function filterColumn(Builder $builder, string $column, string $value)\n {\n Delegator::make([\n new ListFilter($builder),\n new WildcardFilter($builder),\n new ComparisonFilter($builder),\n new NullFilter($builder),\n new EqualsFilter($build... | [
"0.5329504",
"0.51917535",
"0.5133844",
"0.49163163",
"0.48566377",
"0.48286313",
"0.47843027",
"0.47459438",
"0.47403342",
"0.46921262",
"0.46452573",
"0.46137473",
"0.46038434",
"0.4571684",
"0.44988894",
"0.4488533",
"0.44563654",
"0.44538563",
"0.44307044",
"0.44228113",
... | 0.634841 | 0 |
Filter the query on the vendorid column Example usage: $query>filterByVendorid('fooValue'); // WHERE vendorid = 'fooValue' $query>filterByVendorid('%fooValue%', Criteria::LIKE); // WHERE vendorid LIKE '%fooValue%' | public function filterByVendorid($vendorid = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($vendorid)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PricingTableMap::COL_VENDORID, $vendorid, $comparison);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByProductId($value) {\n $this->_filter->equalTo($this->_nameMapping['product'], $value);\n }",
"public function showProductByBrand(int $vendorId) {\n \n }",
"public function filterByUser(int $id);",
"public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->ad... | [
"0.5973345",
"0.5758303",
"0.55169487",
"0.54266274",
"0.54101497",
"0.53754133",
"0.53646624",
"0.53636086",
"0.52970576",
"0.5234452",
"0.51833355",
"0.51808393",
"0.51745963",
"0.51646876",
"0.5074881",
"0.5067078",
"0.5060439",
"0.5059637",
"0.5051762",
"0.50451255",
"0.5... | 0.59596497 | 1 |
Filter the query on the vendoritemid column Example usage: $query>filterByVendoritemid('fooValue'); // WHERE vendoritemid = 'fooValue' $query>filterByVendoritemid('%fooValue%', Criteria::LIKE); // WHERE vendoritemid LIKE '%fooValue%' | public function filterByVendoritemid($vendoritemid = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($vendoritemid)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PricingTableMap::COL_VENDORITEMID, $vendoritemid, $... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ItemPropertyPeer::ID, $key, Criteria::EQUAL);\n\t}",
"public function findItemsByVendorId($vendor_id, $status = 'active') {\n\t\t//set search conditions based upon desired item state\n\t\tif($status == 'active'){\n\t\t\t$conditions = ... | [
"0.5615121",
"0.54726315",
"0.5448796",
"0.5397945",
"0.5292468",
"0.52286553",
"0.50583845",
"0.5027007",
"0.5019439",
"0.49768174",
"0.49560475",
"0.49435124",
"0.49346164",
"0.49315313",
"0.492257",
"0.4836711",
"0.4812266",
"0.47694054",
"0.47423074",
"0.47362363",
"0.471... | 0.63599116 | 0 |
Filter the query on the shipfromid column Example usage: $query>filterByShipfromid('fooValue'); // WHERE shipfromid = 'fooValue' $query>filterByShipfromid('%fooValue%', Criteria::LIKE); // WHERE shipfromid LIKE '%fooValue%' | public function filterByShipfromid($shipfromid = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($shipfromid)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PricingTableMap::COL_SHIPFROMID, $shipfromid, $comparison... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function queryVendoridShipfromid($vendorID, $shipfromID) {\n\t\t$q = $this->query();\n\t\t$q->filterByVendorid($vendorID);\n\t\t$q->filterByShipfromid($shipfromID);\n\t\treturn $q;\n\t}",
"public static function validateVendorShipfromid($vendorID, $shipfromID) {\n\t\t$validate = self::getValidator();\n\t\... | [
"0.67753357",
"0.5779572",
"0.5667653",
"0.54893154",
"0.53205717",
"0.51962787",
"0.5101293",
"0.5099663",
"0.50484467",
"0.49425983",
"0.49149567",
"0.48871619",
"0.48282966",
"0.4773577",
"0.47557667",
"0.47355264",
"0.47147644",
"0.46879587",
"0.46816164",
"0.46815112",
"... | 0.65967935 | 1 |
Filter the query on the nsitemgroup column Example usage: $query>filterByNsitemgroup('fooValue'); // WHERE nsitemgroup = 'fooValue' $query>filterByNsitemgroup('%fooValue%', Criteria::LIKE); // WHERE nsitemgroup LIKE '%fooValue%' | public function filterByNsitemgroup($nsitemgroup = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($nsitemgroup)) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PricingTableMap::COL_NSITEMGROUP, $nsitemgroup, $compa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addGroupFilter($groupName)\n\t{\n\t\t$gid = GRP_getIdByName($groupName);\n\n\t\tif (is_numeric($gid))\n\t\t{\n\t\t\t$this->groupWHERE = \"clients.id=clientgroups.clientid AND clientgroups.groupid=$gid\";\n\t\t\t$this->groupFROM = ', clientgroups';\n\t\t}\n\t}",
"public function filterByGroup($gro... | [
"0.552336",
"0.5436663",
"0.54020983",
"0.5335206",
"0.52751255",
"0.5267214",
"0.52096915",
"0.5185109",
"0.5171222",
"0.51559055",
"0.511631",
"0.51079124",
"0.5076993",
"0.50066125",
"0.5001172",
"0.49943462",
"0.49874765",
"0.4983453",
"0.49808517",
"0.4978032",
"0.495472... | 0.6967799 | 0 |
End of function / ================================================================================== PRODUCT REPORT DETAILS ================================================================================== / get data | public function product_report_details(){
$id = $_REQUEST[ 'id' ];
$this -> db -> select('sum(si.currentstock) as currentstock,
ip.id as pid, ip.itemcode, ip.itemimage, ip.itemname, ip.sellprice, ii.createdby, ii.created_at, sti.storename, sta.statustitle ');
$this -> db -> from('item_parent as ip');
$this ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function index_product_details($data) {\n $register = $this->xml_select->IndexPage->selectproducthome;\n $result = $this->mysqli->query($register);\n if ($result->num_rows) {\n while ($row = $result->fetch_assoc()) {\n $products[] = $row;\n }\n }\n ... | [
"0.6846281",
"0.684537",
"0.6800068",
"0.6611972",
"0.65849525",
"0.65731686",
"0.655564",
"0.6517419",
"0.6505052",
"0.6471041",
"0.6466786",
"0.64302933",
"0.6380623",
"0.62695414",
"0.62634075",
"0.6262086",
"0.6210108",
"0.6209513",
"0.6195376",
"0.618898",
"0.61653256",
... | 0.70491445 | 0 |
End of function / ================================================================================== PRODUCT SETUP:COLOR ================================================================================== / insert data and return last insert id | public function color_insert($data) {
//Transfering data to Model
$this->db->trans_start();
$this->db->insert('item_color', $data);
$insert_id = $this->db->insert_id();
$this->db->trans_complete();
return $insert_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function InsertProduct($title, $published, $cat1, $cat2, $image, $specs, $sku, $price, $colors)\n //inserts this campaign object into the DB as a new row\n{\n $created = date('Y-m-d h:i:s');\n\n try{\n\n require 'connect.php';\n\n $data = array('id' => NULL, 'title' => $title, 'published' =>... | [
"0.69774806",
"0.6545187",
"0.6521278",
"0.6426004",
"0.63860345",
"0.6347908",
"0.63256466",
"0.62708604",
"0.62673205",
"0.6238964",
"0.6238668",
"0.62369055",
"0.6225077",
"0.620856",
"0.6204456",
"0.6191065",
"0.61804396",
"0.6171831",
"0.6169025",
"0.615859",
"0.61352247... | 0.7688641 | 0 |
End of function / ================================================================================== PRODUCT SETUP:CATEGORY ================================================================================== / insert data and return last insert id | public function category_insert($data) {
//Transfering data to Model
$this->db->trans_start();
$this->db->insert('item_category', $data);
$insert_id = $this->db->insert_id();
$this->db->trans_complete();
return $insert_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function InsertNewRecord($post) {\n $this->db->insert('item_category',$post);\n $last_id = $this->db->insert_id();\n return $last_id;\n }",
"abstract public function insert_id();",
"function store_categoria_producto($data)\n {\n\t\t$insert = $this->db->insert('categoria_producto', $d... | [
"0.70707226",
"0.6896239",
"0.68608636",
"0.685172",
"0.6825215",
"0.6817674",
"0.6803923",
"0.6765793",
"0.6758371",
"0.675563",
"0.6738452",
"0.6725255",
"0.6686069",
"0.6680734",
"0.6651637",
"0.66339874",
"0.66331106",
"0.6629725",
"0.6580626",
"0.6579337",
"0.657204",
... | 0.74344975 | 0 |
End of function / ================================================================================== PRODUCT SETUP:SIZE DIMENSION ================================================================================== / check existing data | public function dimension_check($src) {
$this -> db -> select('*');
$this -> db -> from('item_dimension');
$this -> db -> where('id = ' . "'" . $src . "'");
$query = $this->db->get();
if ($query->num_rows() > 0) {
foreach ($query->result() as $row) {
$data[] = $row;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function checkData()\n {\n $this->checkTable();\n }",
"private function validateInitData() {\n if(!AppValidation::isMatrixDimensionsValidated($this->_dimensions)) {\n $this->setErrorMessage(\"Matrix Dimension <span>{$this->_dimensions}</span> Is Invalid!\");\n re... | [
"0.60379654",
"0.59819865",
"0.5607801",
"0.5572776",
"0.5484581",
"0.5439459",
"0.5430245",
"0.54287624",
"0.5393698",
"0.5381933",
"0.5365994",
"0.5344969",
"0.5342156",
"0.5337153",
"0.53210163",
"0.5309433",
"0.5290176",
"0.52834773",
"0.5278189",
"0.527481",
"0.5270433",... | 0.60150105 | 1 |
Conditional tag usage example VAT usage. | public function testConditionalTagsVAT()
{
$s = '{vat_applied?}VAT is {$vat}%{/?}' .
'{vat_zero?}VAT is zero{/?}' .
'{vat_not_applied?}VAT is not applied{/?}';
$f = function ($vat) use ($s) {
return (new \atk4\ui\Template($s))->set([
'vat_applie... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function we_tag_ifShopVat(array $attribs){\n\tif(!we_shop_category::isCategoryMode()){\n\t\tif(($foo = attributFehltError($attribs, 'id', __FUNCTION__))){\n\t\t\techo $foo;\n\t\t\treturn false;\n\t\t}\n\t\t$id = weTag_getAttribute('id', $attribs, -1, we_base_request::INT);\n\n\t\t$vatId = (isset($GLOBALS['lv']) &&... | [
"0.6162099",
"0.5672273",
"0.54230005",
"0.51605225",
"0.51223284",
"0.5097157",
"0.5077511",
"0.50350434",
"0.49886847",
"0.498291",
"0.49525508",
"0.4952372",
"0.49390694",
"0.49142894",
"0.48940402",
"0.48883563",
"0.48747557",
"0.48570815",
"0.48407614",
"0.48210075",
"0.... | 0.75729424 | 0 |
Non existant template throw exception. | public function testBadTemplate1()
{
$t = new \atk4\ui\Template();
$t->load('bad_template_file');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testInvalidTemplate() {\n $t = new Template('foo-fail');\n }",
"function template_exists($template_name) {\n global $C;\n return php_file_exists($C->TEMPLATES, $class_name);\n }",
"private static function checkTemplate()\n\t{\n\t\tif (!file_exists(self::$tmpl_file)) {\n\t\t\tthrow ne... | [
"0.7001275",
"0.69447845",
"0.69182646",
"0.68949956",
"0.68949956",
"0.68841094",
"0.68675226",
"0.67603797",
"0.6674406",
"0.6587349",
"0.6587295",
"0.6537828",
"0.65090954",
"0.65086627",
"0.646466",
"0.6439487",
"0.6436466",
"0.64329153",
"0.642844",
"0.6413241",
"0.64078... | 0.6966253 | 1 |
Test set, append, tryAppend, tryAppendHTML, del, tryDel. | public function testSetAppendDel()
{
$t = new \atk4\ui\Template('{foo}hello{/} guys');
// del tests
$t->set('foo', 'Hello');
$t->del('foo');
$this->assertEquals(' guys', $t->render());
$t->set('foo', 'Hello');
$t->tryDel('qwe'); // non existent tag, ignores
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testSetAppendDel()\n {\n $t = new \\atk4\\ui\\Template('{foo}hello{/} guys');\n\n // del tests\n $t->set('foo', 'Hello');\n $t->del('foo');\n $this->assertSame(' guys', $t->render());\n $t->set('foo', 'Hello');\n $t->tryDel('qwe'); // non existent... | [
"0.72865206",
"0.54942864",
"0.5230329",
"0.51729816",
"0.51278144",
"0.4983135",
"0.4981058",
"0.4789173",
"0.4756084",
"0.47433314",
"0.47430626",
"0.47378325",
"0.46858868",
"0.46738875",
"0.46365538",
"0.46352467",
"0.4627153",
"0.45855093",
"0.45534354",
"0.45419142",
"0... | 0.73350376 | 0 |
Try to load template from non existent file exception. | public function testLoadException()
{
$t = new \atk4\ui\Template();
$t->load('such-file-does-not-exist.txt');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testBadTemplate2()\n {\n $t = new \\atk4\\ui\\Template();\n $this->assertFalse($t->tryLoad('bad_template_file'));\n }",
"public function testBadTemplate2()\n {\n $t = new \\atk4\\ui\\Template();\n $this->assertFalse($t->tryLoad('bad_template_file'));\n }",
... | [
"0.77406883",
"0.77406883",
"0.76668715",
"0.76181257",
"0.7561117",
"0.75516975",
"0.7440078",
"0.7352636",
"0.7250574",
"0.69075304",
"0.69033176",
"0.6848208",
"0.6741994",
"0.67331254",
"0.67241174",
"0.66591626",
"0.66018337",
"0.6562437",
"0.6559361",
"0.6549759",
"0.65... | 0.79510397 | 0 |
Test to command admin:create | public function testAdminCreateCommand()
{
$this->artisan('admin:create')
->expectsQuestion(trans('users.create_admin.name'), 'Admin')
->expectsQuestion(trans('users.create_admin.email'), 'admin@gmail.com')
->expectsQuestion(trans('users.create_admin.password'), '1234')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test_can_create_admin()\n {\n $data =$this->userDataHelper('admin'); \n $response = $this->postJson('v1/users', $data);\n $response\n ->assertStatus(201)\n ->assertJson([\n 'success' => true,\n ]);\n }",
"public function a... | [
"0.77392894",
"0.75452316",
"0.72315097",
"0.71015954",
"0.7049733",
"0.7048969",
"0.69972265",
"0.6906054",
"0.6888753",
"0.68628097",
"0.6859967",
"0.68303525",
"0.6829213",
"0.679376",
"0.6778011",
"0.6776497",
"0.67637837",
"0.67500377",
"0.6741794",
"0.673353",
"0.673106... | 0.7994157 | 0 |
Test to command admin:create fail email | public function testEmailInvalidOnAdminCreateCommand()
{
$this->artisan('admin:create')
->expectsQuestion(trans('users.create_admin.name'), 'Admin')
->expectsQuestion(trans('users.create_admin.email'), 'adminGmail.com')
->expectsOutput(trans('users.create_admin.email_inva... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAdminCreateAdminInvalidEmail()\n {\n $crawler = $this->client->request('GET', '/users');\n\n $link = $crawler->selectLink('Créer un utilisateur')->link();\n $crawler = $this->client->click($link);\n\n $form = $crawler->selectButton('Ajouter')->form();\n $fo... | [
"0.75651926",
"0.7304414",
"0.7273782",
"0.7131969",
"0.6928381",
"0.69236207",
"0.67702055",
"0.6742816",
"0.6685103",
"0.6638602",
"0.6581843",
"0.647818",
"0.64310694",
"0.64065254",
"0.6384614",
"0.63481206",
"0.6342165",
"0.6340086",
"0.63341165",
"0.6264053",
"0.6219290... | 0.794237 | 0 |
Test to command admin:create fail passwords validation | public function testPassConfirmInvalidOnAdminCreateCommand()
{
$this->artisan('admin:create')
->expectsQuestion(trans('users.create_admin.name'), 'Admin')
->expectsQuestion(trans('users.create_admin.email'), 'admin@gmail.com')
->expectsQuestion(trans('users.create_admin.p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAdminCreateAdminPasswordError()\n {\n $crawler = $this->client->request('GET', '/users');\n\n $link = $crawler->selectLink('Créer un utilisateur')->link();\n $crawler = $this->client->click($link);\n\n $form = $crawler->selectButton('Ajouter')->form();\n $f... | [
"0.76586527",
"0.7537573",
"0.72439253",
"0.6869619",
"0.68575764",
"0.6854575",
"0.6748916",
"0.67068505",
"0.6695587",
"0.66838413",
"0.66267157",
"0.66113",
"0.6597697",
"0.6582756",
"0.6562585",
"0.65288556",
"0.65102965",
"0.6480338",
"0.6453354",
"0.6445376",
"0.6442476... | 0.76623464 | 0 |
Returns concurrency. If not found, simply returns a default value like 10 (default). | protected function getConcurrency($concurrency): int
{
if ((int)$concurrency >= 0) {
return (int)$concurrency;
}
if (isset($this->settings['concurrency']) && (int)$this->settings['concurrency'] >= 0) {
return (int)$this->settings['concurrency'];
}
re... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMaxConcurrency(): int\n {\n return $this->maxConcurrency;\n }",
"private function getNewestCacheNumber()\n {\n $newestCache = $this->getCacheService()->getNewestComic();\n if ($newestCache instanceof Comic) {\n $newestCachedComic = $newestCache->num;\n ... | [
"0.6871439",
"0.59191185",
"0.5819431",
"0.5745005",
"0.548295",
"0.54711276",
"0.546353",
"0.5398548",
"0.5395069",
"0.5382925",
"0.5369033",
"0.53656876",
"0.53458005",
"0.52863294",
"0.5270298",
"0.5259375",
"0.52575743",
"0.5244916",
"0.5224724",
"0.5205929",
"0.5189834",... | 0.7738637 | 0 |
Returns true by default and can be changed by the setting Unikka.LinkChecker.ignoreRobots | protected function shouldIgnoreRobots(): bool
{
return isset($this->settings['ignoreRobots']) ? (bool)$this->settings['ignoreRobots'] : true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isRobot()\n\t{\n\t\treturn null !== $this->server('HTTP_USER_AGENT') && preg_match('/bot|crawl|slurp|spider/i', $this->server('HTTP_USER_AGENT'));\n\t}",
"public function good_bot() {\n \n if( preg_match( '#\\.googlebot\\.com$#', $this->rDNS ) ||\n preg_match( '#\\.search\\.msn\\.com$#... | [
"0.6430531",
"0.598656",
"0.5942052",
"0.5941227",
"0.5934122",
"0.5929019",
"0.59199893",
"0.5882478",
"0.58728874",
"0.5859147",
"0.58502805",
"0.58116454",
"0.5803075",
"0.5796222",
"0.5768651",
"0.5767931",
"0.5760295",
"0.5758897",
"0.5758464",
"0.5735903",
"0.5724151",
... | 0.8397297 | 0 |
Get client options for the guzzle client from the settings. If no settings are configured we just set timeout and allow_redirect. | protected function getClientOptions(): array
{
$clientOptions = [
RequestOptions::TIMEOUT => 100,
RequestOptions::ALLOW_REDIRECTS => false,
];
$optionsSettings = $this->settings['clientOptions'] ?? [];
if (isset($optionsSettings['cookies']) && \is_bool($optio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHttpClientOptions();",
"public function testConfigureGuzzleOptions()\n {\n \n $options = array(\n 'curl' => array(\n CURLOPT_SSL_VERIFYHOST => false,\n CURLOPT_SSL_VERIFYPEER => false,\n ),\n 'timeout' => 30,\n 'connect_timeout' =>... | [
"0.69639784",
"0.67316234",
"0.6711718",
"0.66995394",
"0.65866184",
"0.64623755",
"0.61154354",
"0.6071841",
"0.60319227",
"0.6011582",
"0.60105324",
"0.5995368",
"0.5941364",
"0.58729464",
"0.5864701",
"0.5857959",
"0.5838163",
"0.5831602",
"0.5798203",
"0.5776275",
"0.5762... | 0.6795612 | 1 |
Constructor Creates the wrapper object. Note that the contents of the wrapped i18n container is not copied, the object is just referenced. | public function __construct(sly_I18N_Base $i18nContainer, $prefix) {
$this->container = $i18nContainer;
$this->prefix = $prefix;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n parent::__construct();\n\n //T2008-02-22\n //lets try to differentiate cache keys for oxI18n and oxBase\n //in order not to load cached structure for the instances of oxbase classe called on same table\n if ($this->_sCacheKey) {\n ... | [
"0.5919505",
"0.58678967",
"0.58678967",
"0.58380884",
"0.58339214",
"0.5763721",
"0.56787014",
"0.56530344",
"0.56164443",
"0.56164443",
"0.5559618",
"0.5558216",
"0.55307806",
"0.54805374",
"0.54505503",
"0.54381156",
"0.5431358",
"0.53995574",
"0.53831893",
"0.53593135",
"... | 0.60982037 | 0 |
this function to get pay trip | public function get_pay_trip(Request $request)
{
$data_json = $this->call_api_by_parameter("webGetPayTripViaID", ['ReasonID' => $request->reason_id, "DestinationID" => $request->destination_id]);
if (($data_json == false)) {
return response()->json([
'error' => tru... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEstimatePay() {\n\t\t$pirepid = DB::escape($this->get->pirepid);\n\t\t$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pireps` WHERE `pirepid` = '.$pirepid;\n\t\t$pirep = DB::get_row($sql);\n\t\t\n\t\t$pilot = PilotData::getPilotData($pirep->pilotid);\n\t\t\n\t\t// Explode the flighttimes\n\t\t$flighttime... | [
"0.614659",
"0.6033119",
"0.59627056",
"0.5906555",
"0.58863413",
"0.5884244",
"0.5824298",
"0.57961756",
"0.57785857",
"0.57261723",
"0.56160414",
"0.56028545",
"0.55841047",
"0.5571341",
"0.5533707",
"0.55330336",
"0.5523365",
"0.55094314",
"0.5458239",
"0.54467535",
"0.543... | 0.66278857 | 0 |
this function is for getting data Feet by container number | public function GetFeet(Request $request)
{
$k = 0;
$date = date("Y-m-d H:i:s A");
$destination_id = "";
$call_api_con = $this->call_api_by_parameter("webGetFeetByContainer", ["ContainerID" => $request->container_id]);
if (count($request->destination_id) > 0) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_feet_by_number(Request $request)\r\n {\r\n $date = date(\"Y-m-d H:i:s A\");\r\n $call_api_con = $this->call_api_by_parameter(\"webGetFeetByContainerNumber\", [\"ContainerNumber\" => $request->container_number]);\r\n\r\n if ($call_api_con) {\r\n\r\n $deconde_js... | [
"0.6172426",
"0.5967732",
"0.52689195",
"0.51345474",
"0.51189333",
"0.50517166",
"0.50220084",
"0.50064176",
"0.4990072",
"0.4920872",
"0.49064317",
"0.48988464",
"0.48615813",
"0.48387605",
"0.48199883",
"0.48079216",
"0.4805638",
"0.47491267",
"0.47446448",
"0.47396636",
"... | 0.6509671 | 0 |
this function is for getting data Feet by container number | public function get_feet_by_number(Request $request)
{
$date = date("Y-m-d H:i:s A");
$call_api_con = $this->call_api_by_parameter("webGetFeetByContainerNumber", ["ContainerNumber" => $request->container_number]);
if ($call_api_con) {
$deconde_json = json_decode($call_ap... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetFeet(Request $request)\r\n {\r\n\r\n $k = 0;\r\n\r\n $date = date(\"Y-m-d H:i:s A\");\r\n $destination_id = \"\";\r\n $call_api_con = $this->call_api_by_parameter(\"webGetFeetByContainer\", [\"ContainerID\" => $request->container_id]);\r\n if (count($request... | [
"0.6509671",
"0.5967732",
"0.52689195",
"0.51345474",
"0.51189333",
"0.50517166",
"0.50220084",
"0.50064176",
"0.4990072",
"0.4920872",
"0.49064317",
"0.48988464",
"0.48615813",
"0.48387605",
"0.48199883",
"0.48079216",
"0.4805638",
"0.47491267",
"0.47446448",
"0.47396636",
"... | 0.6172426 | 1 |
this function to get trailer exist | public function exist_trailer($driver_id)
{
$date = date("Y-m-d H:i:s A");
$trailer_exist = $this->call_api_by_parameter("webGetTrailerExist", ["TrailerID" => $driver_id, "DateTime" => $date]);
if ($trailer_exist) {
$trailer_list = json_decode($trailer_exist);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function haveTrailer(){\n \t$streams = $this->vodStreams;\n \tforeach ($streams as $stream){\n \t\tif($stream->stream_type == 2){\n \t\t\treturn true;\n \t\t}\n \t}\n \treturn false;\n }",
"public function getTrailerAsUrl() {\n if ($this->isReady) {\n if ($strRetur... | [
"0.71735054",
"0.6090382",
"0.6018693",
"0.57041204",
"0.56545365",
"0.54985327",
"0.52981263",
"0.51718915",
"0.49750787",
"0.49364614",
"0.4913685",
"0.48507535",
"0.48332885",
"0.48295823",
"0.4787334",
"0.47326544",
"0.47175622",
"0.46815643",
"0.4675602",
"0.46583897",
"... | 0.63316983 | 1 |
this function to get trailer data by filter | public function get_trailer(Request $request)
{
$term = trim($request->q);
$user_id = session("ID");
$data_json = $this->call_api_by_parameter("webGetTrailerByFilter", ['TrailerNumber' => $term, "UserID" => $user_id]);
$json = [];
if ($data_json) {
$decod... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getTweetsByFilter() {\n\n // for each filter, get tweets, write them to a JSON file\n \n // hardcode for all filter\n\n // hardcode for main filter\n getTweetsByUsername(\"jay_raiii\");\n\n // hardcode for employee filter\n\n // hardcode for customer filter\... | [
"0.5857689",
"0.56560796",
"0.5492198",
"0.54868627",
"0.5431479",
"0.54039323",
"0.5398325",
"0.5335638",
"0.5332673",
"0.5293957",
"0.5290967",
"0.52741873",
"0.5212503",
"0.5191473",
"0.5183173",
"0.51714796",
"0.5162156",
"0.5135631",
"0.51247185",
"0.51063716",
"0.509024... | 0.57367283 | 1 |
this function to get get_team_leader data by filter | public function get_team_leader(Request $request)
{
$term = trim($request->q);
$user_id = session("ID");
$data_json = $this->call_api_by_parameter("webGetTeamLeaderFilterGroup", ['Name' => $term, "UserID" => $user_id]);
$json = [];
if ($data_json) {
$deco... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_team_leaders() {\n return get_users(\"super\");\n}",
"function get_all_team_names(){\r\n\t$cond[] = array(\"col\" => \"active\", \"value\" => 0);\r\n\r\n\t$fields = array('ID', 'teamname');\r\n\t$result = uli_get_results('teams', $cond, $fields);\r\n\tif ($result){\r\n\t\tforeach ($result as $nam... | [
"0.647103",
"0.6297219",
"0.6283338",
"0.6227549",
"0.6199867",
"0.61940026",
"0.6159225",
"0.6148033",
"0.61411583",
"0.60691",
"0.6055415",
"0.60400945",
"0.5965485",
"0.5931968",
"0.5812077",
"0.5791492",
"0.5759352",
"0.56856376",
"0.5665358",
"0.566347",
"0.5655842",
"... | 0.65732986 | 0 |
/ Get option_answer by id | function get_option_answer($id)
{
return $this->db->get_where('option_answer',array('id'=>$id))->row_array();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAnswer($id){\n $answer = Answer::findOrFail($id);\n return $answer;\n }",
"static function getAnswer($id)\r\n\t{\r\n\t\tglobal $wpdb;\r\n\t\t$id = (digirisk_tools::IsValid_Variable($id));\r\n\t\t$id = (int) $id;\r\n\t\t\r\n\t\t$resultat = $wpdb->get_row( \"SELECT * FROM \" . T... | [
"0.75969887",
"0.7460969",
"0.69076884",
"0.67188996",
"0.6635194",
"0.6583617",
"0.65506834",
"0.6523967",
"0.65157217",
"0.64979315",
"0.64553726",
"0.6362822",
"0.63478076",
"0.62990826",
"0.6292827",
"0.6283242",
"0.62550807",
"0.6184338",
"0.61828095",
"0.61488754",
"0.6... | 0.8263589 | 0 |
/ Get all option_answer count | function get_all_option_answer_count()
{
$this->db->from('option_answer');
return $this->db->count_all_results();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAnswerCounts(){\n $answers = Question::find($this->id)->answers;\n $answer_counts = [];\n foreach ($answers as $answer) {\n $answer_string = $answer->answer;\n if (array_key_exists($answer_string, $answer_counts)) {\n $answer_counts[$answ... | [
"0.76340306",
"0.6954478",
"0.69418037",
"0.66432995",
"0.66103673",
"0.655758",
"0.64706486",
"0.640689",
"0.62757313",
"0.6275132",
"0.6213221",
"0.6184753",
"0.6159442",
"0.61253685",
"0.6089674",
"0.6089299",
"0.6085399",
"0.6071529",
"0.6068333",
"0.6035201",
"0.6023591"... | 0.8760346 | 0 |
/ Get all option_answer | function get_all_option_answer($params = array())
{
if(isset($params) && !empty($params))
{
$this->db->limit($params['limit'], $params['offset']);
}
$this->db->select('*, option_answer.id as oaId, dialog.title as dTitle, dialog.id as dId, option.id as oId, opt... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_option_answer($id)\n {\n return $this->db->get_where('option_answer',array('id'=>$id))->row_array();\n }",
"public static function getAll() {\n return get_option(self::$config['optionName']);\n }",
"public function option_choices() {\n\t\treturn array();\n\t}",
"public sta... | [
"0.70395654",
"0.6670907",
"0.6660799",
"0.66411537",
"0.6552559",
"0.64261043",
"0.6354722",
"0.6282989",
"0.62492454",
"0.6241519",
"0.62125134",
"0.62125134",
"0.62125134",
"0.62125134",
"0.62125134",
"0.62125134",
"0.62125134",
"0.62125134",
"0.6204663",
"0.6194098",
"0.6... | 0.7313124 | 0 |
/ function to add new option_answer | function add_option_answer($params)
{
$this->db->insert('option_answer',$params);
return $this->db->insert_id();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addQuestionOption($question, $prompt)\n {\n $newPrompt = new DropdownAnswer();\n $newPrompt->question_id = $question['id'];\n $newPrompt->answer_text = $prompt['answer_text'];\n $newPrompt->prompt_or_answer = 'prompt';\n $newPrompt->dropdown_answer_text = $prom... | [
"0.6920276",
"0.6742674",
"0.67144763",
"0.66818917",
"0.6674042",
"0.666871",
"0.6605675",
"0.65534246",
"0.6376135",
"0.6209154",
"0.61631113",
"0.6119245",
"0.6075735",
"0.6023201",
"0.5991693",
"0.59648883",
"0.5861237",
"0.58557236",
"0.58254725",
"0.58021855",
"0.577925... | 0.67817605 | 1 |
/ function to delete option_answer | function delete_option_answer($id)
{
return $this->db->delete('option_answer',array('id'=>$id));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hrecipe_delete_options() {\r\n \r\n //delete_option('hrecipe_options');\r\n //hrecipe_delete_old_options();\r\n}",
"function bbp_delete_options()\n{\n}",
"public function destroy(answer_selected $answer_selected)\n {\n //\n }",
"public function removeAnswer()\n {\n if($this... | [
"0.76423573",
"0.73378754",
"0.719417",
"0.7048854",
"0.70383674",
"0.6974999",
"0.697286",
"0.69489795",
"0.6914834",
"0.68201214",
"0.6799652",
"0.6596399",
"0.65516007",
"0.64579624",
"0.645631",
"0.6386043",
"0.63711303",
"0.6366986",
"0.6366986",
"0.6360328",
"0.63556975... | 0.76638234 | 0 |
This method converts the specified value to a char. | public static function toChar($value) : string {
$type = gettype($value);
switch ($type) {
case 'boolean':
throw new Throwable\Parse\Exception('Invalid cast. Could not convert value of type ":type" to a char.', array(':type' => $type));
case 'double':
throw new Throwable\Parse\Exception('Invalid... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _getChar() {\n return chr($this->_getByte());\n }",
"public static function toChars($value)\r\n\t\t{\r\n\t\t\tif (is_string($value))\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t$chars = array();\r\n\t\t\t\t\tfor ($x = 0, $y = strlen($value); $x < $y; $x++)\r\n\t\t\t\t\t\t$cha... | [
"0.6642396",
"0.6516059",
"0.6396948",
"0.6305468",
"0.61943495",
"0.60506743",
"0.60034454",
"0.59974647",
"0.5909873",
"0.5902906",
"0.58923006",
"0.5863901",
"0.5797249",
"0.57056916",
"0.56878495",
"0.56666833",
"0.56657344",
"0.56577414",
"0.56159234",
"0.5607818",
"0.55... | 0.8402723 | 0 |
This method converts the specified value to a dictionary. | public static function toDictionary($value) : array {
$type = gettype($value);
switch ($type) {
case 'array':
return $value;
case 'object':
if (method_exists($value, 'toDictionary')) {
return $value->toDictionary();
}
if (method_exists($value, 'toMap')) {
return Core\Conver... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function toMap($value) : Common\\IMap {\n\t\t\t$type = gettype($value);\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'array':\n\t\t\t\t\treturn new Common\\Mutable\\HashMap($value);\n\t\t\t\tcase 'object':\n\t\t\t\t\tif (method_exists($value, 'toMap')) {\n\t\t\t\t\t\treturn $value->toMap();\n\t\t\t\t\t}\n\t... | [
"0.6536725",
"0.5760304",
"0.5733857",
"0.5562619",
"0.5403295",
"0.5365203",
"0.53403413",
"0.53330046",
"0.52982724",
"0.5280235",
"0.52781105",
"0.5274048",
"0.51841986",
"0.51758426",
"0.5167033",
"0.51645654",
"0.5142453",
"0.5110092",
"0.5066342",
"0.50363207",
"0.50363... | 0.7722055 | 0 |
This method converts the specified value to a double. | public static function toDouble($value) : float {
$type = gettype($value);
switch ($type) {
case 'boolean':
return doubleval($value);
case 'double':
return $value;
case 'integer':
return doubleval($value);
case 'NULL':
return 0.0;
case 'object':
if (method_exists($valu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function doubleValue() { return (double)$this->num; }",
"public function double($valueToDouble) {\n return $valueToDouble * 2;\n }",
"public function getDoubleValue() {}",
"public function getDoubleValue() {}",
"public static function doubleValue()\n {\n return Hamcrest_Type_IsDouble::... | [
"0.73619944",
"0.7287257",
"0.72581005",
"0.72581005",
"0.7145819",
"0.6951316",
"0.6867054",
"0.68595856",
"0.6744991",
"0.67019415",
"0.66880125",
"0.6668657",
"0.6573213",
"0.64425635",
"0.6328694",
"0.60985017",
"0.6075752",
"0.6060548",
"0.60180753",
"0.6002092",
"0.5970... | 0.73403597 | 1 |
This method converts the specified value to a list. | public static function toList($value) : Common\IList {
$type = gettype($value);
switch ($type) {
case 'array':
return new Common\Mutable\ArrayList($value);
case 'object':
if (method_exists($value, 'toList')) {
return $value->toList();
}
if (method_exists($value, 'toArray')) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function reverseTransform($value): array\n {\n $tagNames = explode(',', $value);\n\n $listTags = [];\n\n foreach ($tagNames as $tagName) {\n if ('' !== trim($tagName)) {\n $listTag = $this->repository->findOneByName(strtolower($tagName));\n if... | [
"0.7003417",
"0.65181863",
"0.64585996",
"0.6454278",
"0.64037395",
"0.6373444",
"0.6346298",
"0.6308718",
"0.6300318",
"0.61953115",
"0.615159",
"0.61157435",
"0.610742",
"0.60979944",
"0.6085784",
"0.60826933",
"0.6069062",
"0.6064299",
"0.5994058",
"0.5950668",
"0.5950668"... | 0.7553344 | 0 |
This method converts the specified value to a map. | public static function toMap($value) : Common\IMap {
$type = gettype($value);
switch ($type) {
case 'array':
return new Common\Mutable\HashMap($value);
case 'object':
if (method_exists($value, 'toMap')) {
return $value->toMap();
}
if (method_exists($value, 'toDictionary')) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function map($value = null): Map\n {\n return new Map($value);\n }",
"public function toMap();",
"public static function toDictionary($value) : array {\n\t\t\t$type = gettype($value);\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'array':\n\t\t\t\t\treturn $value;\n\t\t\t\tcase 'object':\n\t\t\t\t\tif (me... | [
"0.6832471",
"0.6639881",
"0.66154677",
"0.65886754",
"0.61818856",
"0.6169644",
"0.5993226",
"0.5876581",
"0.571797",
"0.5661937",
"0.56601804",
"0.55801255",
"0.5563962",
"0.5520425",
"0.540351",
"0.53459764",
"0.5329856",
"0.5318661",
"0.5314322",
"0.5265487",
"0.52077943"... | 0.81594193 | 0 |
This method converts the specified value to an object. | public static function toObject($value) {
$type = gettype($value);
switch ($type) {
case 'array':
$keys = array_keys($value);
if (array_keys($keys) !== $keys) { // is_dictionary
return (object) $value;
}
throw new Throwable\Parse\Exception('Invalid cast. Could not convert value of ty... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function to_object( $value ) {\n\t\treturn ( object ) $value;\n\t}",
"public function toObject($value)\n {\n $this->instantiateProperty($this, $value);\n }",
"public static function ensureObject($value)\n\t{\n\t\treturn (object)$value;\n\t}",
"public static function of( $value )\n ... | [
"0.83656114",
"0.7736967",
"0.73438627",
"0.69290733",
"0.6651384",
"0.6640474",
"0.65986377",
"0.6453522",
"0.64351374",
"0.6351796",
"0.6351747",
"0.6342252",
"0.6253921",
"0.62518317",
"0.6224611",
"0.6199845",
"0.6194297",
"0.61819756",
"0.61751807",
"0.6156396",
"0.61104... | 0.81103086 | 1 |
This method converts the specified value to an ordinal. | public static function toOrdinal($value) : int {
$type = gettype($value);
switch ($type) {
case 'boolean':
throw new Throwable\Parse\Exception('Invalid cast. Could not convert value of type ":type" to an ordinal.', array(':type' => $type));
case 'double':
throw new Throwable\Parse\Exception('Inv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function asOrdinal($value)\n {\n return $value;\n }",
"public static function getOrdinalString($value)\n\t{\n\t\tstatic $ords = array('th', 'st', 'nd', 'rd');\n\t\tif ((($value %= 100) > 9 && $value < 20) || ($value %= 10) > 3) \t\t\n\t\t\t$value = 0;\t\t\n\t\treturn $ords[$value];\n\t}",
"... | [
"0.83248574",
"0.74574995",
"0.72854763",
"0.6951372",
"0.6872123",
"0.67345816",
"0.6667689",
"0.66408974",
"0.6464404",
"0.6390042",
"0.6364605",
"0.6290418",
"0.62113106",
"0.6113895",
"0.6105615",
"0.60788476",
"0.6047289",
"0.60427874",
"0.60228336",
"0.5980318",
"0.5869... | 0.7953881 | 1 |
This method converts the specified value to a set. | public static function toSet($value) : Common\ISet {
$type = gettype($value);
switch ($type) {
case 'array':
return new Common\Mutable\HashSet($value);
case 'object':
if (method_exists($value, 'toArray')) {
return new Common\Mutable\HashSet($value->toArray());
}
if (method_exists... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function makeSet($value)\n {\n $this->set[$value[\"ID\"]] = $value;\n $this->rank[$value[\"ID\"]] = 0;\n }",
"function set($value = null): Set\n {\n return new Set($value);\n }",
"function toSet($equalityComparer = null);",
"public function getSet($key, $value) {\n ... | [
"0.67850506",
"0.66015714",
"0.65705276",
"0.6262015",
"0.6043022",
"0.6012843",
"0.59708446",
"0.5965455",
"0.5924712",
"0.58708346",
"0.57593805",
"0.5747114",
"0.56010437",
"0.55202025",
"0.5466042",
"0.5435493",
"0.54023856",
"0.5398511",
"0.53969723",
"0.5356182",
"0.533... | 0.82662034 | 0 |
Get SellerProductId value An additional test has been added (isset) before returning the property value as this property may have been unset before, due to the fact that this property is removable from the request (nillable=true+minOccurs=0) | public function getSellerProductId(): ?string
{
return isset($this->SellerProductId) ? $this->SellerProductId : null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProductId()\n {\n if (array_key_exists(\"productId\", $this->_propDict)) {\n return $this->_propDict[\"productId\"];\n } else {\n return null;\n }\n }",
"public function getProductId()\r\n {\r\n return $this->productId;\r\n }",
"p... | [
"0.6672744",
"0.64936155",
"0.64100647",
"0.64100647",
"0.64100647",
"0.64100647",
"0.64100647",
"0.64100647",
"0.64100647",
"0.6278726",
"0.61478835",
"0.61280733",
"0.6091715",
"0.60910773",
"0.6071599",
"0.6057834",
"0.6048264",
"0.595743",
"0.595743",
"0.59383106",
"0.592... | 0.7346949 | 0 |
Set SellerProductId value This property is removable from request (nillable=true+minOccurs=0), therefore if the value assigned to this property is null, it is removed from this object | public function setSellerProductId(?string $sellerProductId = null): self
{
// validation for constraint: string
if (!is_null($sellerProductId) && !is_string($sellerProductId)) {
throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setProductId($value){\n\t\t$this->productId = $value;\n\t}",
"public function setProductId($val)\n {\n $this->_propDict[\"productId\"] = $val;\n return $this;\n }",
"public function getSellerProductId(): ?string\n {\n return isset($this->SellerProductId) ? $this->S... | [
"0.6840266",
"0.6405748",
"0.62545836",
"0.60640275",
"0.60376877",
"0.5953623",
"0.5917567",
"0.58303016",
"0.5737742",
"0.56576097",
"0.5652007",
"0.56269515",
"0.56269515",
"0.56269515",
"0.56269515",
"0.56269515",
"0.56269515",
"0.56269515",
"0.5526452",
"0.5394674",
"0.5... | 0.7309475 | 0 |
Get TypeOfReturn value An additional test has been added (isset) before returning the property value as this property may have been unset before, due to the fact that this property is removable from the request (nillable=true+minOccurs=0) | public function getTypeOfReturn(): ?string
{
return isset($this->TypeOfReturn) ? $this->TypeOfReturn : null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getReturnType(): Type\n {\n switch ($this->getMethodNamePrefix()) {\n case 'set':\n case 'uns':\n $returnType = new ObjectType($this->classReflection->getName());\n break;\n case 'has':\n $returnType = new Bool... | [
"0.6513616",
"0.6245974",
"0.6104362",
"0.60838133",
"0.60272765",
"0.60272765",
"0.59920716",
"0.5913481",
"0.5913481",
"0.58246094",
"0.5736923",
"0.56538844",
"0.5651531",
"0.5643476",
"0.5643476",
"0.56382036",
"0.5606574",
"0.5579289",
"0.5555808",
"0.5531581",
"0.552522... | 0.628875 | 1 |
Set TypeOfReturn value This property is removable from request (nillable=true+minOccurs=0), therefore if the value assigned to this property is null, it is removed from this object | public function setTypeOfReturn(?string $typeOfReturn = null): self
{
// validation for constraint: enumeration
if (!\SengentoBV\CdiscountMarketplaceSdk\Enums\CdiscountAskingForReturnType::valueIsValid($typeOfReturn)) {
throw new InvalidArgumentException(sprintf('Invalid value(s) %s, ple... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setReturnType($type);",
"private function getReturnType(): Type\n {\n switch ($this->getMethodNamePrefix()) {\n case 'set':\n case 'uns':\n $returnType = new ObjectType($this->classReflection->getName());\n break;\n case 'ha... | [
"0.63572305",
"0.59290856",
"0.5858962",
"0.58329016",
"0.57513297",
"0.5565218",
"0.55420935",
"0.54854673",
"0.5426381",
"0.54211503",
"0.5344738",
"0.5295564",
"0.5286477",
"0.5247069",
"0.5187846",
"0.51535696",
"0.51435256",
"0.51124054",
"0.5099067",
"0.5063462",
"0.505... | 0.7016126 | 0 |
Returns the socialite provider, in this case it's 'google' | protected function loginType(): string
{
return User::SOCIAL_GOOGLE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function redirectToProvidergoogle()\n {\n return Socialite::driver('google')->redirect();\n }",
"public function google_redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }",
"public function redirectToProvider()\n {\n return Socialite::dr... | [
"0.72451097",
"0.71491593",
"0.7136631",
"0.7117906",
"0.7117906",
"0.7117906",
"0.7117906",
"0.7117906",
"0.7117906",
"0.7117906",
"0.7117906",
"0.70640415",
"0.70253634",
"0.6968884",
"0.6920642",
"0.69127655",
"0.6902794",
"0.6896311",
"0.6834228",
"0.6787046",
"0.66796464... | 0.72678137 | 0 |
/ Getting HTML form | public function getHTML() {
return $this->form['form'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getForm();",
"public function getForm();",
"public function getForm();",
"public function getForm();",
"public function getForm();",
"function get_html(){\n\t\t// Adding id to the form\n\t\t$id = ' id=\"' . $this->id . '\"';\n\t\t\n\t\t// Adding method to the form\n\t\t$method = ' method=... | [
"0.7547471",
"0.7547471",
"0.7547471",
"0.7547471",
"0.7547471",
"0.73759305",
"0.73082066",
"0.70435363",
"0.7029069",
"0.7026437",
"0.6976665",
"0.6952702",
"0.68953097",
"0.6819733",
"0.68140984",
"0.67979056",
"0.6755843",
"0.6747011",
"0.67423975",
"0.6709802",
"0.668327... | 0.775685 | 0 |
/ Getting form rules | public function getRules() {
return $this->form['rules'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValidationRules();",
"public function rules()\n {\n $form = $this->get('form');\n\n\n if ($form == 'page') {\n $rules['page.email'] = \"required|email\";\n $rules['page.password'] = 'required';\n\n } elseif ($form == 'sidbar') {\n $ru... | [
"0.7989122",
"0.78235626",
"0.7791647",
"0.7470457",
"0.7422505",
"0.73882455",
"0.7347386",
"0.7341255",
"0.7336505",
"0.73244274",
"0.7301457",
"0.72926277",
"0.72874445",
"0.72651875",
"0.725508",
"0.72547656",
"0.724734",
"0.7242026",
"0.7237099",
"0.72246885",
"0.720778"... | 0.8134515 | 0 |
/ Getting form files | public function getFiles() {
return $this->form['files'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function submitted_form_files() {\n\t\t$files = array();\n\n\t\t// Checks the form method\n\t\tif ( 0 < count( $_FILES ) ) {\n\t\t\t$files = $_FILES;\n\t\t}\n\n\t\treturn $files;\n\t}",
"public function files(){\n return $_FILES;\n }",
"public function getForm();",
"public function getForm();",... | [
"0.7420731",
"0.6791803",
"0.6736898",
"0.6736898",
"0.6736898",
"0.6736898",
"0.6736898",
"0.67176783",
"0.66659755",
"0.6612971",
"0.65365946",
"0.6452585",
"0.644278",
"0.64137554",
"0.6391656",
"0.63458973",
"0.634482",
"0.6337766",
"0.6334413",
"0.62932914",
"0.6236448",... | 0.7787574 | 0 |
modified settings output to wrap sections in divs on settings page callback | function eazy_site_settings_sections( $page ) {
global $wp_settings_sections, $wp_settings_fields;
if ( ! isset( $wp_settings_sections[$page] ) )
return;
foreach ( (array) $wp_settings_sections[$page] as $section ) {
$current_title = strtolower($section['title']);
$cleaned_title = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _output_settings_wrap() {\n\n\t\t\\add_action(\n\t\t\t$this->seo_settings_page_hook . '_settings_page_boxes',\n\t\t\tBridges\\SeoSettings::class . '::_output_columns'\n\t\t);\n\n\t\tBridges\\SeoSettings::_output_wrap();\n\t}",
"public function render_settings() {\n\t\tif ( ! current_user_can( 'ma... | [
"0.77378947",
"0.75629",
"0.7366821",
"0.72818404",
"0.7218284",
"0.7068303",
"0.70455885",
"0.7024661",
"0.6997925",
"0.6994079",
"0.6973933",
"0.6951897",
"0.68428606",
"0.682272",
"0.6805402",
"0.680078",
"0.67934096",
"0.67693263",
"0.6768334",
"0.67423344",
"0.6738269",
... | 0.76425534 | 1 |
Adds as discount This container indicates the discount type and amount applied to an account entry. Note: The discount type will be shown for any account entry where a discount applies, but the discount amount will only be shown if the corresponding fee was deducted from a seller payout. | public function addToDiscount(\Nogrod\eBaySDK\Trading\DiscountType $discount)
{
$this->discount[] = $discount;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDiscount($discount)\n {\n $this->discount = $discount;\n return $this;\n }",
"public function setDiscount($discount)\n {\n $this->discount = $discount;\n\n return $this;\n }",
"public function setDiscountType($discountType)\n {\n $this->disco... | [
"0.601655",
"0.5915387",
"0.5904031",
"0.58839273",
"0.5882417",
"0.58709615",
"0.5847485",
"0.5847485",
"0.5836985",
"0.582355",
"0.582355",
"0.57814085",
"0.5713521",
"0.5658597",
"0.5658597",
"0.5642182",
"0.5642182",
"0.5642182",
"0.5597695",
"0.55577606",
"0.55270964",
... | 0.64355457 | 0 |
/ Gets the Facebook SDK for PHP whuch is a library that easily integrates Facebook login and makes requests to Facebook's Graph API. | function getFacebook(){
require_once __DIR__ . '/src/Facebook/autoload.php';
$facebook = new Facebook\Facebook(array(
'app_id' => 'APP_ID',
'app_secret' => 'APP_SECRET',
'default_graph_version' => 'v2.5'
)
);
return $facebook;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function connect() {\n\t\treturn $this->FacebookApi->connect();\n\t}",
"public function getFacebook()\n {\n if (! $this->_facebook) {\n\n $options = $this->getOptions();\n\n // if a custom facebook base SDK was specified, include this first\n if (isset($options['... | [
"0.660897",
"0.65814966",
"0.6500188",
"0.6488511",
"0.64817065",
"0.64335096",
"0.63490075",
"0.624863",
"0.6231932",
"0.5980684",
"0.5954723",
"0.5954609",
"0.59538287",
"0.5928662",
"0.5852683",
"0.5845283",
"0.5838004",
"0.5816454",
"0.58066165",
"0.57933176",
"0.57805336... | 0.71580285 | 0 |
/ Creates the Facebook notification array and the content in the notification Input: String for the facebook notification message, String for link to the notification app link Output: Notification array that will be put in the facebook POST api call | function createNotification($notificationMessage, $notificationAppLink){
$notificationArray = array(
'href' => $notificationAppLink,
'template' => $notificationMessage
);
return $notificationArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sendNotification($recipientFbid, $text, $url, $app_id, $app_secret) {\n $href = urlencode($url);\n $post_data = \"access_token=\". $app_id . \"|\" . $app_secret .\"&template={$text}&href={$href}\";\necho $post_data;\n $curl = curl_init(); \necho \"https://graph.facebook.com/v2.5/\". $recipientFbid .\"/... | [
"0.6949075",
"0.6529119",
"0.6432717",
"0.609975",
"0.60653514",
"0.6063698",
"0.5983977",
"0.5961632",
"0.59420836",
"0.59202945",
"0.58500344",
"0.5837815",
"0.5835064",
"0.5787012",
"0.57837856",
"0.578356",
"0.5767752",
"0.57647955",
"0.57570434",
"0.5753581",
"0.57314366... | 0.6940662 | 1 |
/ Sends the notification through Facebook Graph api through its post method. Catches an error and prints it out if there is a facebook authentication exception. 'ex: needing a valid accesstoken, user not signed up to your app etc...' Input: UserId (id you are sending to. The id must have your app installed to send to h... | function sendPushNotification($userId, $accessToken, $notificationArray){
$facebook = $this->getFacebook();
$sent = false;
try {
$sendNotification = $facebook->post('/' . $userId . '/notifications', $notificationArray, $accessToken);
$sent = true;
}catch(Facebook\Exceptions\FacebookAuthenticationException... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sendNotification($recipientFbid, $text, $url, $app_id, $app_secret) {\n $href = urlencode($url);\n $post_data = \"access_token=\". $app_id . \"|\" . $app_secret .\"&template={$text}&href={$href}\";\necho $post_data;\n $curl = curl_init(); \necho \"https://graph.facebook.com/v2.5/\". $recipientFbid .\"/... | [
"0.62260795",
"0.5874336",
"0.5837464",
"0.5736898",
"0.57336634",
"0.5710673",
"0.5616766",
"0.5607938",
"0.5573254",
"0.5520856",
"0.54999804",
"0.5481144",
"0.545447",
"0.54484874",
"0.5429953",
"0.54282135",
"0.5409841",
"0.53807515",
"0.5347185",
"0.53313774",
"0.5328078... | 0.7711353 | 0 |
To print the JSON output, we use WordPress templates, which are used only in the frontend. When in the admin, we must manually load the template, and then exit | public function includeJSONOutputTemplateAndExit(): void
{
// Make sure the user has access to the editor
if ($this->getUserAuthorization()->canAccessSchemaEditor()) {
include $this->getTemplateHelpers()->getGenerateDataAndPrepareAndSendResponseTemplateFile();
die;
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function actGettemplate() {\n $lName = $this -> getVal('name');\n \n $lPhraseTypes = CCor_Res::extract('code', 'eve_phrase', 'crpmaster');\n $lJobTyp = $lPhraseTypes[$this -> mSrc];\n \n echo Zend_Json::encode( CCms_Mod::getTemplate($lName, $this -> mJobId, $lJobTyp) );\n }",
"public... | [
"0.62540805",
"0.62229115",
"0.61544913",
"0.6104428",
"0.60757667",
"0.5971808",
"0.5949781",
"0.59437627",
"0.59243923",
"0.59035665",
"0.58681506",
"0.58479446",
"0.58469665",
"0.58322996",
"0.58268243",
"0.58231086",
"0.5820813",
"0.5802925",
"0.5758462",
"0.5741861",
"0.... | 0.71764445 | 0 |
Email formating, to display only one product, set up $pnOppDetailPk | private function _displayEmailOpportunity($paOpp, $pnOppDetailPk = 0)
{
if(!assert('is_numeric($pnOppDetailPk)'))
return '';
if(!assert('is_array($paOpp) && !empty($paOpp)'))
return '';
$oHTML = CDependency::getCpHtml();
$oLogin = CDependency::getCpLogin();
$oPage = CDependency::getC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function viewMyPendingDelivery($orderproductID,$p){\n $product = new productModel();\n $product->orderproductID = $orderproductID;\n $product->p = $p;\n return $product->viewMyPendingDelivery();\n }",
"function viewMyCompleteDelivery($orderproductID,$p){\n $product = new productMode... | [
"0.60387766",
"0.5921106",
"0.5725642",
"0.57108146",
"0.5632909",
"0.56040114",
"0.557058",
"0.55596054",
"0.5557991",
"0.55507183",
"0.553539",
"0.5523871",
"0.5485867",
"0.54540575",
"0.544968",
"0.5435152",
"0.5430853",
"0.541082",
"0.5409104",
"0.5402937",
"0.54016054",
... | 0.7023059 | 0 |
Czech helper translate to morse code. | public static function morse($text, $number = TRUE)
{
//prepare text for translation
$morseText = \Nette\Utils\Strings::normalize($text);
$morseText = \Nette\Utils\Strings::toAscii($morseText);
$morseText = \Nette\Utils\Strings::lower($morseText);
if($number){
foreach(self::$NUMBERS as $original => $tran... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function morse_encode($string)\r\n{\r\n $strlength = strlen($string);\r\n $string = strtoupper($string);\r\n $i = 0;\r\n $search = array(\r\n ' ','A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',\r\n 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',\r\n 'U', 'V', 'W', '... | [
"0.71561533",
"0.58767956",
"0.5638672",
"0.5597476",
"0.5565432",
"0.5474066",
"0.5440311",
"0.53745645",
"0.5359091",
"0.5304762",
"0.5298343",
"0.52952015",
"0.52883977",
"0.5285353",
"0.52732736",
"0.5271292",
"0.5251487",
"0.5239941",
"0.5230086",
"0.522902",
"0.5222886"... | 0.61194235 | 1 |
Gets a mock socket | protected function getMockSocket()
{
return $this->getMock('Wrench\Socket\ClientSocket', array(), array('wss://localhost:8000'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSocket();",
"public function getSocket()\n {\n }",
"private function getSocket(): SocketInterface\n {\n if (!isset($this->socket)) {\n $this->socket = $this->factory->create();\n }\n\n return $this->socket;\n }",
"protected function _getSocket() ... | [
"0.76288897",
"0.7469513",
"0.7329179",
"0.727519",
"0.7272819",
"0.7239691",
"0.7239691",
"0.71529984",
"0.62284666",
"0.6186465",
"0.6180742",
"0.6172345",
"0.61072457",
"0.60075694",
"0.59511614",
"0.59472466",
"0.5912211",
"0.58672285",
"0.5863525",
"0.583284",
"0.5795873... | 0.82154185 | 0 |
calculate scl basedon this. | public function scl(): int
{
return 5;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSC(){\n\t\treturn $this->sc;\n\t}",
"public function getCofinsCst()\n {\n return $this->cofins_cst;\n }",
"function cs() : CS {\n\treturn CS::get();\n}",
"abstract public function calculateCost();",
"public function getCst()\n {\n return $this->cst;\n }",
"pub... | [
"0.53735703",
"0.5239012",
"0.5117799",
"0.50315714",
"0.49595115",
"0.4898863",
"0.4862141",
"0.48170143",
"0.4802701",
"0.47910735",
"0.47897077",
"0.478513",
"0.47632796",
"0.47294033",
"0.47195634",
"0.46899298",
"0.46828035",
"0.46787614",
"0.46699107",
"0.4668044",
"0.4... | 0.58284724 | 0 |
Returns ID (teamId) of side | public function getId()
{
return self::TEAM_SIDE_BLUE_ID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getId()\n {\n return self::TEAM_SIDE_PURPLE_ID;\n }",
"public function get_team_id()\n {\n return $this->team_id;\n }",
"public function getTeamId()\n {\n return $this->team_id;\n }",
"public function getTeamId()\n {\n return $this->teamId;\n ... | [
"0.7355382",
"0.73120064",
"0.7228656",
"0.7150023",
"0.7139801",
"0.6935692",
"0.6693822",
"0.653501",
"0.6428786",
"0.63494384",
"0.63083565",
"0.619754",
"0.612544",
"0.60868603",
"0.6064399",
"0.6033342",
"0.59988236",
"0.5942623",
"0.58825785",
"0.587592",
"0.5866111",
... | 0.75520074 | 0 |
Override constructor to make rule skippable | public function __construct()
{
parent::__construct();
$this->setSkippable(TRUE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct(){\r\n\t\t\t\r\n\t\t\tforeach (func_get_args() as $oRule){\r\n\t\t\t\t\r\n\t\t\t\t$this->addRule($oRule);\r\n\t\t\t\t\r\n\t\t\t} // foreach\r\n\t\t\t\r\n\t\t}",
"public function __construct()\n\t{\n\t\tparent::__construct('must_not_be_null');\n\t}",
"public function __construct($ign... | [
"0.6545969",
"0.64013636",
"0.62239915",
"0.6180613",
"0.6167869",
"0.61553776",
"0.61167705",
"0.60766786",
"0.60682166",
"0.6035449",
"0.60316813",
"0.6019212",
"0.6019212",
"0.6019212",
"0.6002997",
"0.6002997",
"0.59785575",
"0.59713924",
"0.5942314",
"0.59281015",
"0.590... | 0.74549335 | 0 |
Determine if the current data comprises a duplicate lead based on the provided data. | protected function isDuplicateLead(Blackbox_Data $data, $property_short)
{
$duplicate = FALSE;
// The items to check are saved in the rule value
foreach ($this->getDataKeys() as $check)
{
$value = $data->{$check};
// If the check element exists in blackbox data, check memcache
if (!empty($value))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkDupliatedCondition($data) {\r\n\t\treturn true;\r\n\t}",
"public function isDuplicate() {\r\n\t\treturn (1046 === $this->errorNumber);\r\n\t}",
"public function prevent_duplicate( $data ) {\r\n\t\tif ( ! empty( $data['post_meta']['va_id'] ) ) {\r\n\t\t\tif ( va_get_listing_by_ref( $data['p... | [
"0.685576",
"0.66526353",
"0.62706447",
"0.6184966",
"0.617442",
"0.61290103",
"0.60222596",
"0.59370655",
"0.5921628",
"0.59134847",
"0.59066826",
"0.5897485",
"0.58564633",
"0.57899225",
"0.57287645",
"0.57236296",
"0.5610543",
"0.55933374",
"0.55090153",
"0.549818",
"0.548... | 0.6738742 | 1 |
Get the data keys to process from the rule data | protected function getDataKeys()
{
$rule_value = $this->getRuleValue();
if (isset($rule_value['data_keys']) && is_array($rule_value['data_keys']))
{
$keys = $rule_value['data_keys'];
}
else
{
$keys = array();
}
return $keys;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getKeys(){\n\t return array_keys($this->data);\n }",
"protected function fetchKeys()\n {\n return array_keys($this->_data_keys);\n }",
"function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\... | [
"0.62630826",
"0.6137296",
"0.60352",
"0.6026693",
"0.60206187",
"0.5981676",
"0.5952155",
"0.59436625",
"0.5932553",
"0.59228015",
"0.5909234",
"0.58620703",
"0.5849701",
"0.5834791",
"0.5741598",
"0.57243794",
"0.572271",
"0.57201314",
"0.57201314",
"0.57201314",
"0.5702201... | 0.7605093 | 0 |
Get the property short from the state data. We want the property short of the level the rule is being run at so we need to check for the objects that can run rules in order of precedence to not return incorrect values | protected function getPropertyShort(Blackbox_IStateData $state_data)
{
if (isset($state_data->campaign_name))
{
$property_short = $state_data->campaign_name;
}
elseif (isset($state_data->target_name))
{
$property_short = $state_data->target_name;
}
elseif (isset($state_data->target_collection_name)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getShortString()\n {\n $values = $this->getParsedValues();\n\n if (empty($values[0])) {\n return null;\n }\n\n $attribute = app($this->attribute);\n\n return $attribute->formatRuleString(app($this->operator), $values);\n }",
"function _getshort(... | [
"0.5812025",
"0.5645081",
"0.5609071",
"0.5456364",
"0.5312905",
"0.52439064",
"0.5224939",
"0.5224939",
"0.5221752",
"0.5221752",
"0.517119",
"0.5164693",
"0.5145149",
"0.5063687",
"0.5017898",
"0.49995834",
"0.4989793",
"0.49550843",
"0.49427488",
"0.49345174",
"0.49154815"... | 0.78481233 | 0 |
Get a Cache_Memcache object | protected function getMemcache()
{
return Cache_Memcache::getInstance();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function urs_data_memcache_object () {\n global $urs_content_memcache;\n\n if ( !$urs_content_memcache ) {\n $urs_content_memcache = new Memcache;\n $urs_content_memcache->connect( 'localhost', 11211 );\n }\n\n return $urs_content_memcache;\n}",
"private static function getMemcachedInstance()\n {\n ... | [
"0.8133108",
"0.7748119",
"0.7610835",
"0.7445539",
"0.73918587",
"0.71910876",
"0.70298135",
"0.70256627",
"0.70184535",
"0.7003462",
"0.6994516",
"0.6957668",
"0.6945004",
"0.6940571",
"0.6940571",
"0.6940571",
"0.6928167",
"0.6893995",
"0.68923753",
"0.6871743",
"0.6838417... | 0.8622814 | 0 |
Get the memcache expire value | protected function getMemcacheExpire()
{
return self::MEMCACHE_KEY_EXPIRE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getExpire()\n {\n return $this->expire;\n }",
"public function getExpire()\n {\n return $this->expire;\n }",
"public function getExpiresTime()\n {\n return $this->expire;\n }",
"public function getExpiresTime()\n {\n return $this->expire;\n }",
"p... | [
"0.7844511",
"0.77981085",
"0.7511806",
"0.7511806",
"0.7327153",
"0.7327153",
"0.7327153",
"0.7327153",
"0.7256435",
"0.7254684",
"0.725061",
"0.7216559",
"0.72076684",
"0.72076684",
"0.7201334",
"0.71996814",
"0.71632344",
"0.7138705",
"0.7126099",
"0.7040839",
"0.70404637"... | 0.848541 | 0 |
to generate a unique id, call genId from the controller eg. $this>IdCreator>genId() be sure to add 'IdCreator' to the $uses array at the top of your controller | function genId(){
$id_arr['IdCreator']=array('id'=>NULL);
$this->create();
$this->save($id_arr);
return $this->id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function generateId();",
"public function generateId();",
"function _generateId(){\n static $idx = 1;\n\n if (!$this->getAttribute('id')) {\n $this->updateAttributes(array('id' => 'id_'. substr(md5(microtime() . $idx++), 0, 6)));\n }\n }",
"protected func... | [
"0.741048",
"0.737507",
"0.7256017",
"0.7059774",
"0.7027861",
"0.7027861",
"0.7027861",
"0.7027861",
"0.7027861",
"0.7027861",
"0.7027861",
"0.7027861",
"0.7027861",
"0.7027861",
"0.7027861",
"0.6961811",
"0.6918379",
"0.68088",
"0.67990506",
"0.67781717",
"0.67759925",
"0... | 0.7873226 | 0 |
Show the form for creating a new PrinterType. | public function create()
{
//Valida se usuário possui permissão para acessar esta opção
if(App\Models\User::getPermission('printer_types_add',Auth::user()->user_type_code)){
return view('print.printer_types.create');
}else{
//Sem permissão
Flash::error(L... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return view('AdminPanel.ProductType.form');\n }",
"public function create()\n\t{\n\t\treturn View::make('typeForm');\n\t}",
"public function create()\n {\n return view('admin.product_section.type.create');\n }",
"public function create()\n {\n ... | [
"0.6972107",
"0.68364555",
"0.66081893",
"0.6599757",
"0.65689164",
"0.65629286",
"0.65134394",
"0.64939576",
"0.6488634",
"0.6488634",
"0.6475075",
"0.6469709",
"0.6449099",
"0.6448909",
"0.64449245",
"0.64396155",
"0.6433046",
"0.6414786",
"0.6393934",
"0.63905203",
"0.6386... | 0.7084051 | 0 |
Store a newly created PrinterType in storage. | public function store(CreatePrinterTypeRequest $request)
{
$input = $request->all();
$printerType = $this->printerTypeRepository->create($input);
Flash::success(Lang::get('validation.save_success'));
return redirect(route('printerTypes.index'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n PrinterType::create(['name' => 'Red']);\n PrinterType::create(['name' => 'Usb']);\n }",
"public function store(StoreTypeRequest $request)\n {\n $exceptList = ['_token'];\n if ( $request->leader_id =='null' ) array_push($exceptList, 'leader_id');\n... | [
"0.58342874",
"0.5812769",
"0.57790846",
"0.5773269",
"0.5758971",
"0.5680608",
"0.56595314",
"0.56188774",
"0.5584448",
"0.557704",
"0.55736244",
"0.5528059",
"0.5504953",
"0.54346424",
"0.540359",
"0.5402144",
"0.5402144",
"0.5402144",
"0.5402144",
"0.5402144",
"0.5402144",... | 0.7028504 | 0 |
Show the form for editing the specified PrinterType. | public function edit($id)
{
//Valida se usuário possui permissão para acessar esta opção
if(App\Models\User::getPermission('printer_types_edit',Auth::user()->user_type_code)){
$printerType = $this->printerTypeRepository->findWithoutFail($id);
if (empty($printerType)) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Type $type)\n {\n return view('types.edit', compact('type'));\n }",
"public function editShipping($type)\n {\n\n if ($type === 'free') {\n $shippingMethod = Setting::where('key', 'free_shipping_label')->first();\n\n } elseif ($type === 'inner') {\n ... | [
"0.6135594",
"0.60697675",
"0.59481514",
"0.5930139",
"0.5923449",
"0.58348703",
"0.5822918",
"0.5812977",
"0.58082074",
"0.58028203",
"0.57880694",
"0.57762396",
"0.5751981",
"0.56763685",
"0.56647766",
"0.5663697",
"0.5642055",
"0.5636493",
"0.56268895",
"0.5617999",
"0.558... | 0.6092468 | 1 |
Update the specified PrinterType in storage. | public function update($id, UpdatePrinterTypeRequest $request)
{
$printerType = $this->printerTypeRepository->findWithoutFail($id);
if (empty($printerType)) {
Flash::error(Lang::get('validation.not_found'));
return redirect(route('printerTypes.index'));
}
/... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateStorageType($type)\n {\n $this->processStorageOptionsOrType($type);\n }",
"public function updateTypeData() {\n\t\t// Compare type data with what was previously stored\n\t\t$repo = new TypesRepo();\n\t\t$old_type_data = $repo->getObjectData( $this->zid );\n\t\tif ( $this->type_... | [
"0.6142472",
"0.5698208",
"0.5665125",
"0.5504614",
"0.5416542",
"0.5336222",
"0.53038913",
"0.529944",
"0.5283969",
"0.52811706",
"0.52402496",
"0.5217322",
"0.5214932",
"0.51842797",
"0.5166075",
"0.5145923",
"0.51193684",
"0.5112939",
"0.51108646",
"0.50981313",
"0.5043767... | 0.60596776 | 1 |
Try to delete a product, make sure it is unpublished but that versions remain the same | function testDeleteProduct() {
$this->loginAs('admin');
$productA = $this->objFromFixture('Product', 'productA');
$productID = $productA->ID;
//Publish
$productA->doPublish();
$this->assertTrue($productA->isPublished());
$versions = DB::query('SELECT * FROM "Product_versions" WHERE "Recor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testProductCanBeDeleted()\n {\n \t$product = Product::where('slug', 'product')->first();\n\n \t$product->delete();\n\n \t$this->assertDatabaseMissing('products',[\n \t\t'title' => 'An updated product',\n \t\t'slug' => 'product'\n \t]);\n }",
"public function forceDeleted(P... | [
"0.7366924",
"0.6961675",
"0.68605065",
"0.68467367",
"0.68348026",
"0.6661998",
"0.6641942",
"0.6640614",
"0.66376114",
"0.6636198",
"0.65814483",
"0.6519374",
"0.65181047",
"0.64931315",
"0.6493009",
"0.64364064",
"0.63518643",
"0.63513374",
"0.634778",
"0.63277453",
"0.630... | 0.77673733 | 0 |
Try to publish a product with amount changed | function testChangeProductAmount() {
$this->loginAs('admin');
$productA = $this->objFromFixture('Product', 'productA');
$productID = $productA->ID;
//Publish
$productA->doPublish();
$this->assertTrue($productA->isPublished());
$versions = DB::query('SELECT * FROM "Product_versions" WHERE ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function publish()\n {\n $product = dispatch_now(new GetProductTask($this->data['slug']));\n if(!$product) return false;\n\n if($product->status != Product::STATUS['approve']){\n $product->status = Product::STATUS['publish'];\n $product->save();\n }\n ... | [
"0.61765885",
"0.6134069",
"0.61333364",
"0.6093462",
"0.59413713",
"0.592558",
"0.5822742",
"0.5790031",
"0.5778419",
"0.57766587",
"0.57511204",
"0.5740384",
"0.5732991",
"0.57262635",
"0.568578",
"0.566866",
"0.5646289",
"0.564577",
"0.56334037",
"0.5630919",
"0.5611126",
... | 0.74323744 | 0 |
Try adding a new attribute to a product, existing variations that do not have an option set for the new attribute should be disabled | function testVariationsDisabledAfterAttributeAdded() {
$this->loginAs('admin');
$teeshirtA = $this->objFromFixture('Product', 'teeshirtA');
$variations = $teeshirtA->Variations();
$this->assertTrue($variations->exists());
foreach ($variations as $variation) {
$this->assertTrue($variation... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testCreateProductAttribute()\n {\n $this->executeScenario();\n }",
"private function ProcessAttributes() {\n\t\t$csvilog = JRequest::getVar('csvilog');\n\t\t/* Check if the attributes is to be added */\n\t\tif ($this->attributes) {\n\t\t\t$csvfields = JRequest::getVar('csv_fields');\... | [
"0.66375357",
"0.63443387",
"0.619761",
"0.6166236",
"0.61566615",
"0.6108635",
"0.6094798",
"0.6007558",
"0.59698045",
"0.5941952",
"0.59296936",
"0.5923077",
"0.5901163",
"0.5895589",
"0.58765864",
"0.5873382",
"0.58575785",
"0.5855617",
"0.5833853",
"0.5811258",
"0.5790837... | 0.8427441 | 0 |
Load the project page and test the first select for correct product options Teeshirt Variations Small, Red, Cotton Small, Red, Polyester Small, Purple, Cotton Small, Purple, Polyester Medium, Purple, Cotton Medium, Purple, Silk Extra Large, Red, Cotton Extra Large, Red, Polyester Extra Large, Purple, Cotton | function testProductOptionsFirstSet() {
$teeshirtA = $this->objFromFixture('Product', 'teeshirtA');
$attributes = $teeshirtA->Attributes();
$options = $teeshirtA->Options();
$variations = $teeshirtA->Variations();
$this->loginAs('admin');
$teeshirtA->doPublish();
$this->logOut();
$this... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function testProductOptionsThirdSet() {\n \n $teeshirtA = $this->objFromFixture('Product', 'teeshirtA');\n\t $attributes = $teeshirtA->Attributes();\n\t $options = $teeshirtA->Options();\n\t $variations = $teeshirtA->Variations();\n\t \n\t $this->loginAs('admin');\n $teeshirtA->doPublish();\t \n\t ... | [
"0.6277473",
"0.6229693",
"0.59814805",
"0.58137125",
"0.56802297",
"0.5622738",
"0.5543028",
"0.55337167",
"0.55321425",
"0.5520376",
"0.551956",
"0.5516747",
"0.5469622",
"0.54635376",
"0.54361576",
"0.54319715",
"0.5423544",
"0.5423059",
"0.5407074",
"0.53882396",
"0.53581... | 0.6297707 | 0 |
Try to save a Variation with a negative price difference | function testNegativeVariationPrice() {
$this->loginAs('admin');
$smallRedShortsVariation = $this->objFromFixture('Variation', 'shortsSmallRedCotton');
$originalAmount = $smallRedShortsVariation->Amount;
$this->assertTrue($originalAmount->getAmount() >= 0);
$newAmount = new Money();
$n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testUpdateVolumesWaiverProductDecreasingVolumeNotST()\n {\n $hedge = $this->hedgeRepository->find(2);\n $this->hedgeVolumeManager->updateVolumesByHedge($hedge);\n\n $rmpSubSegmentRiskLevel = $this->doctrine->getRepository(RmpSubSegmentRiskLevel::class)->findOneBy([\n ... | [
"0.600373",
"0.5779003",
"0.57241565",
"0.5655029",
"0.56032526",
"0.55580556",
"0.5546349",
"0.55253327",
"0.54652077",
"0.5458507",
"0.53769565",
"0.53106827",
"0.5271078",
"0.5263365",
"0.52428204",
"0.5196479",
"0.5187409",
"0.5172843",
"0.51714724",
"0.5133971",
"0.51106... | 0.8221343 | 0 |
Load the required dependencies for this plugin. Include the following files that make up the plugin: Orchestrates the hooks of the plugin. Bitwise_Sidebar_Content_i18n. Defines internationalization functionality. Bitwise_Sidebar_Content_Admin. Defines all hooks for the admin area. Bitwise_Sidebar_Content_Public. Define... | private function load_dependencies() {
/**
* The class responsible for defining internationalization functionality
* of the plugin.
*/
require_once __DIR__ . '/class-bitwise-sidebar-content-i18n.php';
/**
* The class responsible for handling DB operations
*/
require_once __DIR__ . '/class-bitsc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function load_dependencies() {\n\n /**\n * The class responsible for orchestrating the actions and filters of the core plugin.\n */\n require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-junglehunter-loader.php';\n\n /**\n * The class responsible fo... | [
"0.7474064",
"0.7451972",
"0.73659074",
"0.73358226",
"0.7300118",
"0.72747207",
"0.71815056",
"0.712079",
"0.7017519",
"0.7013282",
"0.6998914",
"0.6906815",
"0.68324083",
"0.6814386",
"0.6796892",
"0.67566335",
"0.6704421",
"0.6616456",
"0.660708",
"0.6597814",
"0.6591994",... | 0.78439367 | 0 |
Define the locale for this plugin for internationalization. Uses the Bitwise_Sidebar_Content_i18n class in order to set the domain and to register the hook with WordPress. | private function set_locale() {
$plugin_i18n = new Bitwise_Sidebar_Content_i18n();
add_action( 'plugins_loaded', array( $plugin_i18n, 'load_plugin_textdomain' ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function set_locale() {\r\n\r\n\t\t$plugin_i18n = new ShipArea_i18n();\r\n\t\t$plugin_i18n->set_domain( 'shiparea' );\r\n\r\n\t\tadd_action( 'plugins_loaded', [ $plugin_i18n, 'load_plugin_textdomain' ] );\r\n\t}",
"private function set_locale() {\n\t\t$etc_i18n = new i18n;\n\t\t$etc_i18n->set_domain( sel... | [
"0.75849015",
"0.7494329",
"0.7456553",
"0.73431945",
"0.72670114",
"0.72350305",
"0.7174119",
"0.71540743",
"0.7116089",
"0.7115153",
"0.70934576",
"0.70363265",
"0.7021727",
"0.70196664",
"0.6943411",
"0.6901608",
"0.68872786",
"0.676701",
"0.66999954",
"0.6593145",
"0.6575... | 0.7956903 | 0 |
Register all of the hooks related to the admin area functionality of the plugin. | private function define_admin_hooks() {
$plugin_admin = $this->admin;
add_action( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_styles' ) );
add_action( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_scripts' ) );
add_action( 'admin_menu', array( $plugin_admin, 'admin_sidebar_menu' ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function define_admin_hooks() {\n\n\t\t$plugin_admin = new Pressapps_Fullscreen_Login_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin... | [
"0.8313708",
"0.82929444",
"0.82753336",
"0.8192659",
"0.81788284",
"0.8176138",
"0.8119812",
"0.81047237",
"0.80645883",
"0.7992007",
"0.79716235",
"0.78755736",
"0.7823784",
"0.7772622",
"0.7691783",
"0.766254",
"0.76356757",
"0.7455628",
"0.7423053",
"0.73234946",
"0.72872... | 0.84381217 | 0 |
Update shipping Info It has 2 logic in it. Update your own shipping info, and update already created trade records which has no shipping info. | public function updateShippingInfo($userID, $data){
if(!is_numeric($userID) || // $data['shippingFullName'] == '' ||
$data['shippingAddress'] == '' || $data['shippingCity'] == '' || $data['shippingState'] == '' || $data['shippingZip'] == '' || $data['shippingCountryID'] == '' || !is_nume... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateFromShipping($data)\n {\n $table = $this->getMainTable();\n $this->_getWriteAdapter()->update(\n $table, array(\n 'quote_id' => $data['quote_id'],\n 'w3w' => $data['w3w'],\n 'address_id' => $data['address_id']\n ... | [
"0.731799",
"0.70409733",
"0.6954522",
"0.6915075",
"0.6861783",
"0.6800433",
"0.6798355",
"0.67208105",
"0.6682073",
"0.6607309",
"0.6399671",
"0.63357776",
"0.6325058",
"0.63031936",
"0.62433845",
"0.62066126",
"0.6191371",
"0.6174485",
"0.6170027",
"0.6149239",
"0.61365175... | 0.7244805 | 1 |
Get users who are at top, by having items | public function getUsersTopByItems($limit = 10){
if(!is_numeric($limit))
return;
global $db;
$avaiableTime = date('Y-m-d H:i:s');
$query = sprintf("
SELECT tUser.*, user.firstName, user.lastName, (SELECT COUNT(*) FROM %s AS tItem WHERE tUser.userID... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userItemsTop($userId, array $params = array())\n {\n $path = \"/users/$userId/items/top\";\n return $this->_getFeed($path, $params);\n }",
"public function getTopGrabbers()\n\t{\n\t\treturn $this->pdo->query(\"\n\t\t\tSELECT id, username, SUM(grabs) AS grabs\n\t\t\tFROM users\... | [
"0.6557293",
"0.6434428",
"0.5989113",
"0.5962029",
"0.5959882",
"0.590758",
"0.58514917",
"0.5748956",
"0.57301056",
"0.5729502",
"0.55634993",
"0.55399495",
"0.5535605",
"0.5532563",
"0.5503855",
"0.54932606",
"0.54634356",
"0.5460995",
"0.54486984",
"0.54044485",
"0.537674... | 0.6644231 | 0 |
Get the backlogs for the given account | public function getBacklogs($accountId, $includeArchived = false)
{
$path = 'api/accounts/' . $accountId . '/backlogs.json';
if ($includeArchived) {
$path .= '?include_archived=true';
}
return $this->getDataApiData($path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBacklogs()\n {\n $repo = $this->getRepository('ScrunoBoardBundle:Backlog');\n\n return $repo->findAll();\n }",
"public function getHistory($username=\"this\") {\r\n\t\tif ($username==\"this\") return $this->UserDBHelper->getHistory(\"*\");\r\n\t\telse return $this->UserDBHe... | [
"0.75527936",
"0.6304079",
"0.6303098",
"0.59877515",
"0.5960305",
"0.595604",
"0.58837324",
"0.5820649",
"0.5799671",
"0.5799009",
"0.5757584",
"0.57465357",
"0.5731548",
"0.57126355",
"0.5708327",
"0.56932676",
"0.5671439",
"0.5627151",
"0.5618512",
"0.56177115",
"0.5587802... | 0.7808792 | 0 |
Fetch the sprints for a given backlog | public function getSprints($backlogId, $includeStories = false)
{
$path = 'api/backlogs/' . $backlogId . '/sprints.json';
if ($includeStories) {
$path .= '?include_associated_data=true';
}
return $this->getDataApiData($path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getTasksFromSprint($project_id,$sprint_id)\n {\n\t$sql = \"SELECT * FROM Task WHERE sprint_id=\".$sprint_id;\n\t$res = $this->conn->query($sql);\n\treturn $res;\n }",
"abstract public function getSprints($project);",
"public function getSprint($backlogId, $sprintId, $includeStories = false)\n ... | [
"0.6484543",
"0.60912675",
"0.607182",
"0.55817056",
"0.53890556",
"0.53649247",
"0.52681416",
"0.5261578",
"0.5235714",
"0.5137166",
"0.51056236",
"0.50641257",
"0.506081",
"0.50545675",
"0.5001446",
"0.49823067",
"0.4942836",
"0.4936113",
"0.4925102",
"0.48673433",
"0.48366... | 0.6475765 | 1 |
Fetch Sprint Stories (meta data about the story in a sprint) for a given sprint | public function getSprintStories($sprintId)
{
$path = 'api/sprints/' . $sprintId . '/sprint-stories.json';
return $this->getDataApiData($path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSprintStory($sprintId, $storyId)\n {\n $path = 'api/sprints/' . $sprintId . '/sprint-stories/' . $storyId .'.json';\n\n return $this->getDataApiData($path);\n }",
"public function getSprints($backlogId, $includeStories = false)\n {\n $path = 'api/backlogs/' . $bac... | [
"0.6160219",
"0.5945436",
"0.5715027",
"0.57087755",
"0.5691529",
"0.5684382",
"0.5667479",
"0.54186755",
"0.5379228",
"0.53268033",
"0.52904207",
"0.5212046",
"0.51998365",
"0.50431126",
"0.5032817",
"0.5020535",
"0.49892813",
"0.4959408",
"0.4957655",
"0.49418056",
"0.49268... | 0.6758283 | 0 |
Fetch Sprint Story (meta data about the story in a sprint) for a given sprint and story | public function getSprintStory($sprintId, $storyId)
{
$path = 'api/sprints/' . $sprintId . '/sprint-stories/' . $storyId .'.json';
return $this->getDataApiData($path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function retrieveByStory( $story ) {\n $query = Doctrine_Query::create()\n ->select('sr.*')\n ->from('StoryRating sr')\n ->where('sr.story_id = ? AND user_id <> 1', $story['id']);\n return $query->execute();\n }",
"public function getstoryfromslug($slug){\n $result_stor... | [
"0.61022973",
"0.6083936",
"0.58745164",
"0.57493013",
"0.56808144",
"0.5659381",
"0.5639749",
"0.5632634",
"0.56096345",
"0.5598613",
"0.5563886",
"0.54707134",
"0.5431571",
"0.5357277",
"0.53488296",
"0.5313666",
"0.5309183",
"0.53080785",
"0.52878326",
"0.52872777",
"0.523... | 0.6329682 | 0 |
Extract just the velocity stuff from the backlog stats | public function getVelocityStats($accountId, $backlogId) {
$stats = $this->getBacklogStats($accountId, $backlogId);
return array(
'velocity_stats' => $stats['velocity_stats'],
'velocity_complete' => $stats['velocity_completed']
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getVelocity(){\n\t\t\treturn $this->velocity;\n\t\t}",
"public function getCurrentVelocity()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_CURRENT_VELOCITY, $payload);\n\n $payload = unpack('v1velocity', $data);\n\n return $payload['velocity... | [
"0.52169657",
"0.50620997",
"0.4764487",
"0.47207725",
"0.4702528",
"0.46474642",
"0.46023643",
"0.45855057",
"0.45395374",
"0.45362255",
"0.44946995",
"0.44935173",
"0.4449705",
"0.4436767",
"0.44340006",
"0.4428632",
"0.44152606",
"0.4374905",
"0.43519565",
"0.43467268",
"0... | 0.6508056 | 0 |
Pull all the stories from a theme (or all themes) | public function getStoriesFromTheme() {
$stories = array();
foreach ($this->getThemes(true) AS $theme) {
if (is_array($theme['stories'])) {
foreach ($theme['stories'] as &$story) {
$story['score_50'] = empty($story['score... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_stories(): array {\n\t\t$stories_query = new WP_Query();\n\n\t\t/**\n\t\t * List of story posts.\n\t\t *\n\t\t * @var WP_Post[] $result\n\t\t */\n\t\t$result = $stories_query->query( $this->query_args );\n\n\t\tupdate_post_thumbnail_cache( $stories_query );\n\n\t\treturn $result;\n\t}",
"func... | [
"0.6529666",
"0.6246832",
"0.5991553",
"0.596242",
"0.5902879",
"0.5902879",
"0.5834432",
"0.5815732",
"0.5572879",
"0.5551509",
"0.5464429",
"0.5455386",
"0.5422353",
"0.5415906",
"0.53975046",
"0.5394214",
"0.53876436",
"0.53821266",
"0.5378943",
"0.5360829",
"0.5327634",
... | 0.7207561 | 0 |
Removes an item from the database (Sets 'isActive'= False for the specified ingredient) Note: type is the type of ingredient (base, bread, cheese, fry (or fries), and toppings) | function removeIngredient($type, $id) {
$mysqli = getConnection();
if (strtolower($type) == "base") {
$type = "Bases";
} else if (strtolower($type) == "bread") {
$type = "Breads";
} else if (strtolower($type) == "cheese") {
$type = "Cheeses";
} else if (strtolower($type) == "fry" || strtolower($t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeitem($item);",
"public function action_delete_item()\n {\n try {\n $type_stub = $this->request->param('id');\n $type = $this->_crud_items[$type_stub];\n $id = $this->request->param('toggle');\n\n if (empty($type)) {\n Ib... | [
"0.645224",
"0.63982385",
"0.63101",
"0.63080823",
"0.6141252",
"0.60783166",
"0.5987915",
"0.5970493",
"0.5954562",
"0.58872545",
"0.58454746",
"0.57850486",
"0.57708275",
"0.5719405",
"0.5697386",
"0.5658442",
"0.5658114",
"0.56445205",
"0.5618893",
"0.56143016",
"0.5613183... | 0.7037199 | 0 |
Get rate of change within the last two days | public function getRecentRateChange()
{
$qb = $this->em->createQueryBuilder();
$qb
->select('ex.rawData')
->from('AppBundle\Entity\ExchangeRate', 'ex')
->addOrderBy('ex.dateUpdated', 'DESC')
->setMaxResults(2);
$result = $qb->getQuery()->getRe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function GetCurrencyRateByLastDateWRate($fecha, $moneda, $db) {\n\n $sql = \"SELECT 1/rate AS rate,\n fecha\n FROM tipocambio\n WHERE DATE_FORMAT(fecha,'%Y-%m-%d') = '\" . $fecha . \"'\n AND currency = '\" . $moneda . \"'\n AND rate <> 0 LIMIT 1\... | [
"0.5696219",
"0.55894697",
"0.5502829",
"0.5452995",
"0.5387172",
"0.53643733",
"0.53143287",
"0.5308405",
"0.5284989",
"0.527999",
"0.5278731",
"0.5277968",
"0.5274387",
"0.5272911",
"0.5262674",
"0.5248291",
"0.5237188",
"0.5228836",
"0.52034867",
"0.5167621",
"0.5167621",
... | 0.67982453 | 0 |
Build all stages of aggregate query function Generates a query stage array based on which functions were used. Should not be called directly. | private function _build_stages()
{
$select = array();
if($this->qb_distinct === true) {
foreach($this->qb_select as $select_key=> $select_val) {
if($select_val) {
$this->group_by($select_key);
}
}
}
// Fil... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function buildStructuredQuery()\n {\n $structuredQuery = [];\n\n // cursor\n if ($this->cursor) {\n $structuredQuery['cursor'] = $this->cursor;\n }\n\n // expressions\n if ($this->expressions) {\n $structuredQuery['expr'] = json_encode($this... | [
"0.5967459",
"0.58329016",
"0.5784251",
"0.57041204",
"0.56263554",
"0.55240333",
"0.54737324",
"0.5456892",
"0.54188627",
"0.5403925",
"0.5328204",
"0.5319553",
"0.5299444",
"0.5232148",
"0.52267504",
"0.52250284",
"0.5217537",
"0.5211312",
"0.5140554",
"0.5123169",
"0.51166... | 0.77353245 | 0 |
OR LIKE Generates a %LIKE% portion of the query. Separates multiple calls with 'OR'. | public function or_like($field, $match = '', $side = 'both', $escape = NULL, $mongoSyntax = FALSE)
{
return $this->_like($field, $match, 'OR ', $side, '', $escape, $mongoSyntax);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function orLike($field, $match = '', $side = 'both')\n {\n return $this->_like($field, $match, 'OR ', $side);\n }",
"public function or_like($field, $match = '', $side = 'both')\n\t{\n\t\treturn $this->_like($field, $match, 'OR ', $side);\n\t}",
"function or_like($col, $match = '', $si... | [
"0.7012939",
"0.66999894",
"0.6418904",
"0.62499434",
"0.6134148",
"0.61152655",
"0.6022138",
"0.5893417",
"0.58860177",
"0.5849165",
"0.5834963",
"0.5816638",
"0.58120644",
"0.5799184",
"0.57692987",
"0.57641834",
"0.5732398",
"0.5715312",
"0.56625605",
"0.5659723",
"0.56464... | 0.67501307 | 1 |
OR NOT LIKE Generates a NOT LIKE portion of the query. Separates multiple calls with 'OR'. | public function or_not_like($field, $match = '', $side = 'both', $escape = NULL, $mongoSyntax = FALSE)
{
return $this->_like($field, $match, 'OR ', $side, 'NOT', $escape, $mongoSyntax);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function orNotLike($field, $match = '', $side = 'both')\n {\n return $this->_like($field, $match, 'OR ', $side, 'NOT');\n }",
"public function or_not_like($field, $match = '', $side = 'both')\n\t{\n\t\treturn $this->_like($field, $match, 'OR ', $side, 'NOT ');\n\t}",
"function or_not_l... | [
"0.7025169",
"0.6746773",
"0.67140555",
"0.6343601",
"0.6278392",
"0.62032014",
"0.6184922",
"0.6175474",
"0.6171449",
"0.60913926",
"0.60894275",
"0.60414666",
"0.6035504",
"0.59954065",
"0.59671724",
"0.58944356",
"0.5829547",
"0.57837343",
"0.5761966",
"0.56646556",
"0.566... | 0.68167406 | 1 |
Wildcard in Mongo convert SQL wildcard to Regular Expression of MongoDB | protected function _wildcard_mongo($match)
{
$match = str_replace($this->sql_wildcard, $this->mongo_regex, $match);
return $match;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function queryFormats ($pattern = \"*\") {}",
"private function searchWildcards() {\n \t// Figure out all the variables used in the condition\n \t// Check if any of them contains WILDCARDx in their names where x is an integer\n \t// Add such variable names with wildcard names to $this->wildcards... | [
"0.5511497",
"0.5435907",
"0.5375247",
"0.5294028",
"0.5266543",
"0.50113606",
"0.50036585",
"0.49055701",
"0.4879176",
"0.48654237",
"0.48326954",
"0.48142058",
"0.47971505",
"0.47929",
"0.4788808",
"0.47876453",
"0.47867203",
"0.4773662",
"0.47678006",
"0.47607982",
"0.4737... | 0.7038006 | 0 |
Starts a query group, but NOTs the group | public function not_group_start()
{
$this->group_start('NOT');
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function or_not_group_start()\n {\n $this->group_start('NOT', 'OR');\n\n return $this;\n }",
"public function addGroupQuery($value) {}",
"public function group_start($not = '', $type = 'AND ')\n {\n\n $this->qb_where_group_count += 1;\n $this->mongo_group_status[$thi... | [
"0.6280561",
"0.6056717",
"0.59822935",
"0.58319837",
"0.5587646",
"0.5426971",
"0.5408017",
"0.53725314",
"0.531505",
"0.52902216",
"0.52133524",
"0.51501566",
"0.5131191",
"0.51200426",
"0.50627655",
"0.50627655",
"0.50627655",
"0.5059035",
"0.50137085",
"0.50116044",
"0.50... | 0.66281164 | 0 |
Starts a query group, but ORs the group | public function or_group_start()
{
$this->group_start('', 'OR');
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addGroupQuery($value) {}",
"public function or_not_group_start()\n {\n $this->group_start('NOT', 'OR');\n\n return $this;\n }",
"public function group($group = []) {\n\t\t$this->_queryOptions['group'] = array_merge($this->_queryOptions['group'], $group);\n\t}",
"public fun... | [
"0.6531855",
"0.6162257",
"0.6125954",
"0.60432166",
"0.5696498",
"0.55580086",
"0.54932255",
"0.54848206",
"0.5477028",
"0.5447474",
"0.5446658",
"0.53668606",
"0.53584623",
"0.53572434",
"0.5298289",
"0.52773434",
"0.524697",
"0.5240974",
"0.52132875",
"0.51971245",
"0.5196... | 0.6901443 | 0 |
Starts a query group, but OR NOTs the group | public function or_not_group_start()
{
$this->group_start('NOT', 'OR');
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function or_group_start()\n {\n $this->group_start('', 'OR');\n\n return $this;\n }",
"public function addGroupQuery($value) {}",
"public function group_start($not = '', $type = 'AND ')\n {\n\n $this->qb_where_group_count += 1;\n $this->mongo_group_status[$this->qb_w... | [
"0.6566082",
"0.624975",
"0.59300166",
"0.5832302",
"0.5812583",
"0.5592924",
"0.5578818",
"0.55428797",
"0.5495143",
"0.54783416",
"0.52757645",
"0.5255907",
"0.5181923",
"0.51343316",
"0.51010436",
"0.5053335",
"0.5046965",
"0.502001",
"0.49838457",
"0.49500844",
"0.4949513... | 0.6864432 | 0 |
Ends a query group | public function group_end()
{
if($this->qb_where_group_count > 0) {
// get data was cached
$where_group = $this->qb_where_group_started[$this->qb_where_group_count];
$type = $this->mongo_group_status[$this->qb_where_group_count][1];
// restore counting of gro... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function end()\n {\n return $this->endGroup();\n }",
"public function closeGroup()\n {\n $this->groupSeq = -1;\n }",
"public function end();",
"public function end();",
"public function closeGroup();",
"public function endGroup()\n {\n return $this->getParentCon... | [
"0.7050051",
"0.67536896",
"0.6425701",
"0.6425701",
"0.64155537",
"0.6391028",
"0.6382531",
"0.6382531",
"0.6151538",
"0.6149396",
"0.6141606",
"0.61039495",
"0.6103316",
"0.610053",
"0.6059227",
"0.60572267",
"0.6005817",
"0.59762496",
"0.59204537",
"0.5920222",
"0.5817693"... | 0.70585835 | 0 |
Admin mail template for jobseeker | function eyerecruit_jobseeker_mail_templates_callback() {
?>
<div class="wrap">
<p><h3>Mail template Jobseeker Admin</h3></p>
<?php
if(isset($_GET['settings-updated'])){
?>
<div class="updated settings-error notice is-dismissible" id="setting-error-settings_updated">
<p>
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function emails($args, &$request) {\n\t\t$this->validate();\n\t\t$this->setupTemplate($request, true);\n\n\t\t$templateMgr =& TemplateManager::getManager($request);\n\t\t$templateMgr->assign('pageHierarchy', array(array($request->url(null, 'manager'), 'manager.journalManagement')));\n\t\t$templateMgr->assign('help... | [
"0.7043339",
"0.6723687",
"0.65962476",
"0.6582092",
"0.6530167",
"0.6525491",
"0.6475669",
"0.64214176",
"0.6414994",
"0.64007473",
"0.6371676",
"0.6325561",
"0.6309629",
"0.62932646",
"0.6273112",
"0.62021375",
"0.6184952",
"0.6180497",
"0.61493766",
"0.6142938",
"0.6092093... | 0.70480824 | 0 |
Admin approve mail template for jobseeker | function admin_approval_mail_templates_callback() {
?>
<div class="wrap">
<p><h3>Mail template Admin Approve</h3></p>
<?php
if(isset($_GET['settings-updated'])){
?>
<div class="updated settings-error notice is-dismissible" id="setting-error-settings_updated">
<p>
<strong... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function approveAction()\r\n {\r\n /**\r\n * Confirming the posted id is greater than zero\r\n * if so get the id from the posted value\r\n */\r\n if ($this->getRequest()->getParam('id') > 0) {\r\n $id = $this->getRequest()->getParam('id');\r\n ... | [
"0.6726356",
"0.67165583",
"0.6669145",
"0.6446035",
"0.63755095",
"0.63455546",
"0.63172513",
"0.6309945",
"0.63076174",
"0.6301679",
"0.6285442",
"0.62850296",
"0.6255928",
"0.62440854",
"0.6194032",
"0.61729735",
"0.6155953",
"0.6155755",
"0.6142619",
"0.6130804",
"0.61121... | 0.7056944 | 0 |
Forward doc mail template | function forward_doc_templates_callback() {
?>
<div class="wrap">
<p><h3>Forward doc Template</h3></p>
<?php
if(isset($_GET['settings-updated'])){
?>
<div class="updated settings-error notice is-dismissible" id="setting-error-settings_updated">
<p>
<strong>Settings saved... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function template_redirect() {\r\n// global $wp_query;\r\n if ( $this->is_enewsletter_page( 'unsubscribe_page' ) ) {\r\n// $this->load_template( 'page-unsubscribe.php' );\r\n require_once( $this->plugin_dir . \"email-newsletter-files/page-unsubscribe.php\" );\r\n exit... | [
"0.6243398",
"0.60992146",
"0.60750157",
"0.6017103",
"0.5977295",
"0.5918413",
"0.5875425",
"0.5872749",
"0.5731921",
"0.5711577",
"0.5705109",
"0.56866986",
"0.56639457",
"0.5646311",
"0.5633369",
"0.5609408",
"0.55957687",
"0.55530065",
"0.5545997",
"0.55032897",
"0.549859... | 0.62407964 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.