query stringlengths 11 3.13k | ru_query stringlengths 9 3.91k | document stringlengths 18 71k | metadata dict | negatives listlengths 0 100 | negative_scores listlengths 0 100 | document_score stringlengths 5 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|---|
Depricated, please use getArticleUids() | Устаревший, пожалуйста, используйте getArticleUids() | function getArticles() {
return $this->getArticleUids();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getArticleUids() \t{\n \t\treturn $this->articles_uids;\n \t}",
"function get_author_user_ids()\n {\n }",
"function get_nonauthor_user_ids()\n {\n }",
"function load_articles() \t{\n \t\tif ($this->articles_loaded==false)\n \t\t{\n\t\t\tif ($this->articles_uids=$this->conn_db->get_... | [
"0.84692585",
"0.68874484",
"0.67708915",
"0.66715676",
"0.62332135",
"0.6205977",
"0.61673236",
"0.6005042",
"0.5933276",
"0.5888452",
"0.5841136",
"0.5722362",
"0.5665847",
"0.5653537",
"0.5648729",
"0.5626733",
"0.5626733",
"0.5626733",
"0.5626733",
"0.5626733",
"0.5626733... | 0.7486598 | 1 |
Loads the data and divides comma sparated images in array inherited from parent | Загружает данные и делит запятой разделяемые изображения в массив, наследуемый от родителя | function load_data()
{
$return=parent::load_data();
$this->images_array=t3lib_div::trimExplode(',',$this->images);
$this->teaserImagesArray=t3lib_div::trimExplode(',',$this->teaserimages);
return $return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getImageArray();",
"function images_data_split($all_pic,$folder_name,$size)\r\n{\r\n\t \r\n //image_url + ? + id \r\n $image_url_id=array();\r\n\r\n for($index=0;$index<count($all_pic);$index++)\r\n {\r\n \t\r\n array_push($image_url_id,$all_pic[$index]['images'][$siz... | [
"0.61604345",
"0.61037254",
"0.6009878",
"0.58669907",
"0.58038646",
"0.577029",
"0.57650214",
"0.5764268",
"0.5763486",
"0.5743982",
"0.57312286",
"0.57226473",
"0.5701011",
"0.57004684",
"0.56829184",
"0.5589712",
"0.5576506",
"0.5552043",
"0.5512154",
"0.54844874",
"0.5481... | 0.7331002 | 0 |
returns the list or articles from this product filtered by given AttributeUID and Attribute Value | возвращает список статей этого продукта, отфильтрованный по заданному AttributeUID и значению атрибута | function get_Articles_by_Attribute($attributeUid,$attributeValue){
return $this->get_Articles_by_AttributeArray(array(array('AttributeUid'=>$attributeUid,'AttributeValue'=>$attributeValue)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_Articles_by_AttributeArray($attribute_Array,$proofUid=1){\n\t\tif($proofUid){ \t \t\n\t \t \t $whereUid = ' and tx_commerce_articles.uid_product = '.$this->uid;\n\t\t}\n \t \t$first = 1;\n\t\t// Setzen der Arrays damit array_intersect keine Fehlermeldung ausgibt\t\n\t\t$first_array = array();\n\t\t... | [
"0.6229908",
"0.5963848",
"0.59376323",
"0.58977515",
"0.56653094",
"0.5633743",
"0.5505575",
"0.55023515",
"0.54793227",
"0.5447739",
"0.5391966",
"0.53627306",
"0.5352033",
"0.53370327",
"0.5314385",
"0.53088987",
"0.5283806",
"0.52602047",
"0.52468663",
"0.52354735",
"0.52... | 0.7741283 | 0 |
Returns the Manufacturer UID of the Product if set | Возвращает УИД производителя продукта, если он задан | function getManufacturerUid() {
if(isset($this->manufacturer_uid)) {
return $this->manufacturer_uid;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getManufacturer()\n {\n if (array_key_exists(\"manufacturer\", $this->_propDict)) {\n return $this->_propDict[\"manufacturer\"];\n } else {\n return null;\n }\n }",
"public function getManufacturer()\n {\n if (array_key_exists(\"manufactu... | [
"0.7528648",
"0.7528648",
"0.725426",
"0.70974326",
"0.70958126",
"0.70703304",
"0.69598025",
"0.65373385",
"0.6519467",
"0.64012724",
"0.6361478",
"0.60444015",
"0.60313296",
"0.59812725",
"0.59191614",
"0.5774094",
"0.5754923",
"0.57229954",
"0.5695732",
"0.56614596",
"0.55... | 0.8239274 | 0 |
Returns true if one Article of Product have more than null articles on stock | Возвращает true, если один товар имеет более чем нулевое количество единиц товара на складе | function hasStock() {
$this->load_articles();
foreach ( $this->articles as $articleObj ) {
if ( $articleObj->getStock() > 0 ) {
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function inStock()\n {\n return $this->stockCount() > 0;\n }",
"public function hasProduct()\n {\n return $this->Product !== null;\n }",
"public function isNewPossible()\n {\n // Check if ProductsModels exist\n $productmodels = $this->em->getRepository('Valenti... | [
"0.6768415",
"0.6678424",
"0.6629216",
"0.63930917",
"0.63930917",
"0.63930917",
"0.63930917",
"0.63930917",
"0.61586046",
"0.61142856",
"0.599915",
"0.59983176",
"0.5958311",
"0.5943573",
"0.5891042",
"0.58859366",
"0.58571535",
"0.58548343",
"0.5835261",
"0.5815653",
"0.580... | 0.75260586 | 0 |
gets the category master parent | получает родительскую категорию мастер-родитель | function get_masterparent_categorie() {
return $this->getMasterparentCategorie();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getCatParent() {\r\n $rCat = new Read;\r\n $rCat->ExeRead(\"ml_categories\", \"WHERE category_id = :id\", \"id={$this->Data['post_category']}\");\r\n if ($rCat->getResult()):\r\n return $rCat->getResult()[0]['category_parent'];\r\n else:\r\n return... | [
"0.82139903",
"0.82107663",
"0.81068027",
"0.78660554",
"0.7817735",
"0.75415444",
"0.7527914",
"0.74861336",
"0.7484013",
"0.7484013",
"0.74028236",
"0.7191253",
"0.7187461",
"0.71427774",
"0.70984685",
"0.7075503",
"0.70521474",
"0.70477796",
"0.7032655",
"0.7028612",
"0.70... | 0.8402889 | 0 |
returns the attribut matrix | возвращает матрицу атрибутов | function get_atrribute_matrix($articleList=false, $attribute_include=false, $showHiddenValues=true,$sortingTable = 'tx_commerce_articles_article_attributes_mm'){
return $this->get_attribute_matrix($articleList, $attribute_include, $showHiddenValues,$sortingTable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_product_atrribute_matrix($attribute_include=false, $showHiddenValues=true,$sortingTable = 'tx_commerce_products_attributes_mm'){\n \t\t\n \t\treturn $this->get_product_attribute_matrix($attribute_include, $showHiddenValues,$sortingTable );\n \t}",
"public function getAdjugate(): Matrix\n {\n ... | [
"0.68148863",
"0.630815",
"0.62820375",
"0.61913097",
"0.6079845",
"0.60049546",
"0.5974234",
"0.594213",
"0.5879482",
"0.58509153",
"0.58509153",
"0.58509153",
"0.58509153",
"0.58270425",
"0.58021057",
"0.5724545",
"0.5715498",
"0.5715498",
"0.5715498",
"0.5715498",
"0.57154... | 0.700024 | 0 |
Markets Landing Settings form | Форма настроек посадки на рынки | function cmc_framework_markets_landing_settings() {
$form = array();
for ($i=1; $i<=5; $i++) {
cmc_framework_markets_landing_settings_tab_section($form, $i);
}
$form['#submit'][] = 'cmc_framework_markets_landing_process_uploaded_file';
$form['#validate'][] = 'cmc_framework_markets_landing_validat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mda_settings_form() {\n\t$form['mda_resources_access'] = array(\n\t\t\t'#type' => 'fieldset',\n\t\t\t'#title' => 'Page d\\'infos sur l\\'accès aux ressources MDA',\n\t\t\t'#description' => 'Information affichée à un utilisateur non connecté essayant de voir une ressource dont la visibilité est \"professio... | [
"0.59204054",
"0.57166463",
"0.5694942",
"0.56906587",
"0.5617515",
"0.56134737",
"0.55776197",
"0.5576366",
"0.553818",
"0.5523145",
"0.55168706",
"0.5516498",
"0.5513459",
"0.5489285",
"0.5485056",
"0.5484441",
"0.54832715",
"0.54720855",
"0.54560363",
"0.5443868",
"0.54345... | 0.7327168 | 0 |
Determine if the client should skip the authorization prompt. | Определите, должен ли клиент пропустить запрос на авторизацию. | public function skipsAuthorization(): bool
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function skipsAuthorization(): bool\n {\n return Gate::allows('skips-authorization', $this);\n }",
"function auth_required() {\n $authinconfig = $this->config->taverna->needAuth;\n if (strcasecmp($authinconfig, 'false') == 0) {\n return FALSE; //no authorization required so we are ... | [
"0.7358047",
"0.6882466",
"0.66279286",
"0.65275586",
"0.6420907",
"0.63860667",
"0.6327263",
"0.6237454",
"0.62134314",
"0.62134314",
"0.6201036",
"0.61319274",
"0.60520923",
"0.5976112",
"0.5938668",
"0.5919285",
"0.5915463",
"0.59043014",
"0.59003586",
"0.58973086",
"0.589... | 0.7664686 | 0 |
Assert that command return 0 ( no error ) | Утверждать, что команда возвращает 0 (нет ошибки) | public function testExecute():void
{
$this->assertEquals(0,$this->commandTester->execute([]));
//Assert command display
$this->assertEquals(
'Sample command without interactions' . PHP_EOL,
$this->commandTester->getDisplay()
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetResultPositive()\n {\n $command = $this->getCommandMock();\n $command->expects($this->once())->method('execute');\n\n }",
"public function testRunsOk()\n {\n $application = new Application();\n $application->add($this->command);\n\n $command = $a... | [
"0.7855765",
"0.68702686",
"0.6827576",
"0.6819911",
"0.66331655",
"0.65977454",
"0.6561913",
"0.6542994",
"0.64559335",
"0.64396536",
"0.6401967",
"0.63811994",
"0.6358414",
"0.62678",
"0.62510604",
"0.622485",
"0.6220496",
"0.6181758",
"0.61741674",
"0.6162509",
"0.61351633... | 0.7068776 | 1 |
Build a shipment from an IsotopeCollection | Создать отправку из IsotopeCollection | protected function buildShipmentFromCollection(IsotopeProductCollection $objCollection)
{
//Get the Iso Config
$Config = Isotope::getConfig();
//Create the shipment
$Shipment = new stdClass();
//Apply the service information
$Service = new stdClass();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _prepareCollection()\n {\n $collection = Mage::getModel('sales/order_shipment')->getCollection();\n $tableName = Mage::getSingleton('core/resource')->getTableName('sales_flat_order');\n\n $collection->getSelect()->joinLeft(array('o'=>$tableName), 'main_table.order_id=... | [
"0.6569434",
"0.58940053",
"0.55744416",
"0.5551138",
"0.5482385",
"0.54574823",
"0.54234946",
"0.5356255",
"0.5324826",
"0.52936304",
"0.5262763",
"0.5236538",
"0.518213",
"0.5171952",
"0.51173687",
"0.5098204",
"0.509509",
"0.5074327",
"0.50539297",
"0.5016188",
"0.4999141"... | 0.7260029 | 0 |
Build a UPS Cpmpatible Address Object from a Model | Создать объект совместимого с UPS адреса на основе модели | protected static function buildAddress(Model $objModel)
{
$Address = new stdClass();
$arrSubdivision = explode('-', $objModel->subdivision);
$Address = new stdClass();
$Address->AddressLine1 = $objModel->street_1;
$Address->AddressLine2 = $objModel->street_2... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createAddress()\n {\n $class = $this->getClass();\n\n return new $class;\n }",
"public function convertToMagentoAddress($address)\n {\n $addressModel = Mage::getModel('customer/address');\n\n $addressModel->addData(array(\n 'firstname' => $address->... | [
"0.60683334",
"0.5769628",
"0.5709196",
"0.5638802",
"0.56210905",
"0.5574394",
"0.5570305",
"0.5536746",
"0.55193716",
"0.5398853",
"0.53101486",
"0.5309378",
"0.5290538",
"0.52663016",
"0.5253676",
"0.52383894",
"0.52355504",
"0.52348",
"0.5201772",
"0.51940185",
"0.5181323... | 0.7080342 | 0 |
Create an instance of the APC cache driver | Создайте экземпляр драйвера кэша APC | public function createApcDriver()
{
$prefix = $this->getCacheParameter('prefix');
return new Repository(new ApcStore(new Apc, $prefix));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createApcuDriver(): StoreContract\n {\n return $this->createCacheBased('apcu');\n }",
"public function __construct(string $cache) {\n try {\n $this->duration = (int)($_ENV[\"CACHE_DURATION\"] ?? 86400);\n switch ($cache) {\n case \"apcu\... | [
"0.67227095",
"0.67139655",
"0.6647493",
"0.65785825",
"0.64634156",
"0.6386936",
"0.6302157",
"0.62846684",
"0.6225848",
"0.6154188",
"0.615009",
"0.60509837",
"0.6037553",
"0.5985475",
"0.59637004",
"0.59535867",
"0.5935894",
"0.5900436",
"0.58835983",
"0.58735",
"0.5823607... | 0.7775853 | 0 |
Register cap groups with the Members plugin (if used) | Зарегистрируйте группы капа с помощью плагина Members (если используется) | function rordb_register_cap_groups() {
members_register_cap_group(
'rordb',
array(
'label' => __( 'RoRdb', 'rordb-textdomain' ),
'caps' => array(
"rordb_edit_settings",
"rordb_view_items",
"rordb_edit_items",
"rordb_create_items",
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mycred_load_buddypress_groups_hook() {\n\tif ( class_exists( 'myCRED_BuddyPress_Groups' ) || ! class_exists( 'BuddyPress' ) ) return;\n\n\tclass myCRED_BuddyPress_Groups extends myCRED_Hook {\n\n\t\t/**\n\t\t * Construct\n\t\t */\n\t\tfunction __construct( $hook_prefs, $type = MYCRED_DEFAULT_TYPE_KEY ) {\... | [
"0.62245727",
"0.6145485",
"0.6112509",
"0.60747296",
"0.5959585",
"0.59029156",
"0.5869927",
"0.5846684",
"0.5831338",
"0.5802345",
"0.5800711",
"0.57932204",
"0.578242",
"0.577365",
"0.571608",
"0.5683773",
"0.56493676",
"0.56434727",
"0.56179786",
"0.5581424",
"0.5561272",... | 0.7877894 | 0 |
System::getRelease Gets release name of operating system | System::getRelease Получает имя выпуска операционной системы | public function getRelease()
{
return php_uname('r');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _releaseName()\n {\n return \"Version {$this->version}\" . ($this->name ? \": {$this->name}\" : '');\n }",
"protected function getSystem()\n {\n $uname = strtolower( php_uname() );\n\n if (str_contains( $uname, 'darwin' )) {\n return 'macosx';\n ... | [
"0.6956437",
"0.69379556",
"0.68139905",
"0.67924905",
"0.6734099",
"0.6637042",
"0.6613718",
"0.66103786",
"0.6498195",
"0.6497759",
"0.6473067",
"0.6468022",
"0.63888663",
"0.638464",
"0.63592863",
"0.63353884",
"0.6326987",
"0.6297551",
"0.6267218",
"0.6265184",
"0.6251841... | 0.81565595 | 0 |
System::getMachine Gets machine type. | System::getMachine Получает тип машины. | public function getMachine()
{
return php_uname('m');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _getMachine()\n {\n return $this->machine;\n }",
"public function getMachineInformation($machine = null);",
"function TypeMachine() { // Test si backuppc est installe en local sur un Se3 ou un Slis ou une machine dediee\n\tif(is_dir(\"/usr/share/se3\")) {\n\t\treturn Se3;\n\t}\t... | [
"0.76567346",
"0.70827305",
"0.70074177",
"0.686995",
"0.6705365",
"0.66833216",
"0.6459227",
"0.64413685",
"0.62704444",
"0.6259735",
"0.61750305",
"0.6092017",
"0.606981",
"0.6058667",
"0.60466933",
"0.6034719",
"0.6034719",
"0.6003156",
"0.5985312",
"0.59580714",
"0.594949... | 0.7976443 | 0 |
System::getPhpSapi Returns a lowercase string that describes the type of interface (the Server API, SAPI) that PHP is using. For example, in CLI PHP this string will be "cli" whereas with Apache it may have several different values depending on the exact SAPI used. Possible values are listed below. | System::getPhpSapi возвращает строку в нижнем регистре, описывающую тип интерфейса (серверный API, SAPI), который использует PHP. Например, в CLI PHP эта строка будет "cli", а с Apache она может иметь несколько различных значений в зависимости от точного SAPI, который используется. Возможные значения перечислены ниже. | public function getPhpSapi()
{
return php_sapi_name();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getApiClass(): string\n {\n return $this->apiClass;\n }",
"static function Protocol ()\n\t\t{\n\t\t\tif (php_sapi_name() === \"cli\")\n\t\t\t\treturn 'cli';\n\t\t\t$x = (isset($_SERVER['HTTPS'])) ? $_SERVER['HTTPS'] : '';\n\t\t\tif ($x == \"off\" or $x == \"\")\n\t\t\t\treturn \"http... | [
"0.5448253",
"0.5331873",
"0.52882266",
"0.52561283",
"0.52375215",
"0.51974726",
"0.5190993",
"0.5165048",
"0.5122094",
"0.5061617",
"0.5045423",
"0.5019039",
"0.5019039",
"0.5019039",
"0.50107116",
"0.50074196",
"0.50033766",
"0.49921668",
"0.4947159",
"0.49337086",
"0.4928... | 0.75939727 | 0 |
System::getPhpVersion Gets the current PHP version | System::getPhpVersion Получает текущую версию PHP | public function getPhpVersion()
{
return phpversion();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getPhpVersion() {}",
"public static function php_version()\n {\n $ve = phpversion();\n $ve = explode('-', $ve);\n return $ve[0];\n }",
"function getPhpVersion() {\n\t\n\t$version \t\t\t\t\t= explode( \".\", PHP_VERSION );\n\n\treturn( $version[0].$version[1] );\t\n... | [
"0.8807255",
"0.81383085",
"0.81150204",
"0.79493177",
"0.7828537",
"0.76385677",
"0.7600098",
"0.7422538",
"0.7248716",
"0.7247499",
"0.7034696",
"0.67681015",
"0.67405987",
"0.67179674",
"0.661382",
"0.6597687",
"0.6593041",
"0.6583454",
"0.6579763",
"0.6572927",
"0.6567988... | 0.8642211 | 1 |
System::getPhpExtensionVersion Gets php extension version. | System::getPhpExtensionVersion Получает версию PHP-расширения. | public function getPhpExtensionVersion($extension)
{
return phpversion($extension);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getExtensionVersion();",
"protected function getPhpVersion() {}",
"public function getExtensionVersion()\n {\n $moduleInfo = $this->moduleList->getOne(self::MODULE_CODE);\n\n return $moduleInfo['setup_version'];\n }",
"public function getExtensionVersion()\n {\... | [
"0.7763613",
"0.7382882",
"0.7342982",
"0.7342982",
"0.73380846",
"0.72011083",
"0.7086171",
"0.7077336",
"0.70646995",
"0.6803845",
"0.6693413",
"0.6548632",
"0.65398824",
"0.6521994",
"0.648378",
"0.6462711",
"0.64481264",
"0.64481264",
"0.63626575",
"0.62920326",
"0.629203... | 0.8267087 | 0 |
System::isPhpExtensionLoaded Get Status Is Php Extension Loaded. | System::isPhpExtensionLoaded Получить статус загрузки PHP-расширения. | public function isPhpExtensionLoaded($extension)
{
return (bool)extension_loaded($extension);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isExtensionLoaded($ext='gd') { \n return extension_loaded($ext); \n }",
"protected function checkPhpExtensionEnabled($ext)\n {\n return extension_loaded($ext);\n }",
"public function testExtensionLoaded(): void\n {\n $info = $this->createProvider(f... | [
"0.7574251",
"0.7430334",
"0.7043803",
"0.7029144",
"0.6946219",
"0.6946219",
"0.692978",
"0.681018",
"0.6620381",
"0.65959275",
"0.656604",
"0.6516076",
"0.647203",
"0.6459324",
"0.6440494",
"0.63664746",
"0.6323508",
"0.62972194",
"0.6294766",
"0.62927395",
"0.62627786",
... | 0.7516038 | 1 |
System::getZendVersion Gets the version of the current Zend engine | System::getZendVersion Получает версию текущего Zend-движка | public function getZendVersion()
{
return zend_version();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getZendOptimizerVersion()\n {\n return function_exists('zend_optimizer_version') ? zend_optimizer_version() : false;\n }",
"public function get_version();",
"protected function getPhpVersion() {}",
"static public function compareVersion($version)\n {\n return version_co... | [
"0.68574494",
"0.6145823",
"0.60486114",
"0.5933849",
"0.59260964",
"0.5884513",
"0.5884513",
"0.583563",
"0.58053654",
"0.57984966",
"0.57917696",
"0.5765356",
"0.5763264",
"0.5761135",
"0.57569456",
"0.57504994",
"0.573251",
"0.573251",
"0.573251",
"0.573251",
"0.573251",
... | 0.9006257 | 0 |
System::getZendOptimizerVersion Gets Version of Zend Optimizer | System::getZendOptimizerVersion Получает версию Zend Optimizer | public function getZendOptimizerVersion()
{
return function_exists('zend_optimizer_version') ? zend_optimizer_version() : false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOptimizerVersion()\n {\n return $this->optimizer_version;\n }",
"public function getZendVersion()\n {\n return zend_version();\n }",
"public function getCurrentOptimizer()\n {\n return Mage::registry('current_optimizer');\n }",
"public function setOpt... | [
"0.7965938",
"0.72850263",
"0.6528281",
"0.63935906",
"0.5608905",
"0.5373196",
"0.53505355",
"0.5274236",
"0.5274236",
"0.5269498",
"0.52389574",
"0.52138543",
"0.5156005",
"0.5140131",
"0.5128282",
"0.5121003",
"0.509306",
"0.50768167",
"0.5063314",
"0.50562507",
"0.5032741... | 0.8762964 | 0 |
System::getMacAddress Gets system mac address. | System::getMacAddress Получает MAC-адрес системы. | public function getMacAddress()
{
switch (PHP_OS) {
default:
case 'Darwin':
case 'FreeBSD':
$cmd = '/sbin/ifconfig';
break;
case 'Windows':
$cmd = "ipconfig /all ";
break;
}
$stri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function get_mac_classic()\n {\n ob_start();\n // Turn on output buffering\n system('ipconfig/all');\n //Execute external program to display output\n $mycom = ob_get_contents();\n // Capture the output into a variable\n ... | [
"0.7310356",
"0.72912985",
"0.7066872",
"0.6925658",
"0.66474795",
"0.652096",
"0.6450702",
"0.6295558",
"0.6195543",
"0.6107927",
"0.6072578",
"0.6053741",
"0.584899",
"0.58184505",
"0.580732",
"0.5714955",
"0.56634325",
"0.5422562",
"0.5364522",
"0.53498656",
"0.5329636",
... | 0.797336 | 0 |
System::getCpuCores Gets the numbers of system cores. | System::getCpuCores Получает количество ядер системы. | public function getCpuCores()
{
$numCpus = 1;
if (is_file('/proc/cpuinfo')) {
$cpuinfo = file_get_contents('/proc/cpuinfo');
preg_match_all('/^processor/m', $cpuinfo, $matches);
$numCpus = count($matches[ 0 ]);
} else {
if ('WIN' == strtoupper(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function systemCores()\n {\n switch ($this->os) {\n case ('Linux'):\n $cmd = \"cat /proc/cpuinfo | grep processor | wc -l\";\n break;\n case ('Freebsd'):\n $cmd = \"sysctl -a | grep 'hw.ncpu' | cut -d ':' -f2\";\n ... | [
"0.8455023",
"0.76405436",
"0.72659093",
"0.7219272",
"0.7151914",
"0.6434434",
"0.6432473",
"0.6407609",
"0.631354",
"0.5814485",
"0.5743708",
"0.5713483",
"0.56039923",
"0.55845344",
"0.55133325",
"0.54919827",
"0.5468631",
"0.5402946",
"0.5327559",
"0.53227603",
"0.5310313... | 0.8465706 | 0 |
Get the raw body string for the job. We look for both `body` and `Body` because lambda does not guarantee the case of the payload. | Получите сырую строку тела для задания. Мы ищем как `body`, так и `Body`, поскольку лямбда не гарантирует регистр загрузки. | public function getRawBody()
{
return array_key_exists('Body', $this->job) ? $this->job['Body'] : $this->job['body'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRawBody()\n {\n return (string) $this->job->getBody();\n }",
"public function getRawBody()\n\t{\n\t\treturn $this->rawJob;\n\t}",
"public function getRawBody()\n {\n return $this->job->getMessageBody();\n }",
"public function getRawBody(): string\n {\n i... | [
"0.7936903",
"0.7867628",
"0.74943995",
"0.7143669",
"0.70228654",
"0.69248176",
"0.67638844",
"0.6701088",
"0.66775465",
"0.6625119",
"0.6623398",
"0.65831614",
"0.6582498",
"0.65786874",
"0.6491956",
"0.6491956",
"0.6461787",
"0.6461363",
"0.6443057",
"0.6443057",
"0.640987... | 0.8116463 | 0 |
Get the underlying raw SQS job. | Получить базовую сырую SQS задачу. | public function getSqsJob()
{
return $this->job;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSqsJob()\n {\n return [\n 'Attributes' => $this->job->getAttributes(),\n 'Body' => $this->job->getBody(),\n 'MessageId' => $this->job->getMessageId(),\n 'ReceiptHandle' => $this->job->getReceiptHandle(),\n ];\n }",
"public functio... | [
"0.67282367",
"0.6702163",
"0.66998625",
"0.6539694",
"0.6501187",
"0.6456535",
"0.6331673",
"0.6331673",
"0.60324824",
"0.5975835",
"0.5950484",
"0.5919753",
"0.5862571",
"0.58272314",
"0.57921207",
"0.56920856",
"0.5633087",
"0.56258684",
"0.5547266",
"0.5534622",
"0.551612... | 0.7524942 | 0 |
Returns a specific instance of the Compress class. | Возвращает конкретный экземпляр класса Compress. | public static function instance($name = 'default', array $config = NULL)
{
// Check if we already made this instance.
if ( ! isset(Compress::$_instances[$name]))
{
if ($config === NULL)
{
// Load the config.
$config = Kohana::$config->load('compress')->$name;
}
// Create a new Compress insta... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getCompressor() {}",
"public function compress()\n\t{\n\t\t$this->settings['compression']['enabled'] = true;\n\n\t\treturn $this;\n\t}",
"public function compressWith($compressor)\n\t\t{\n\t\t\t$this->compressor = $compressor;\n\t\t\t$this->compress();\n\n\t\t\t/**\n\t\t\t * Anonymous class ... | [
"0.65220654",
"0.6362256",
"0.6302483",
"0.6246308",
"0.61693263",
"0.6100434",
"0.604496",
"0.6013117",
"0.5907848",
"0.5907848",
"0.58082217",
"0.57939845",
"0.5600396",
"0.55887717",
"0.55691653",
"0.5527101",
"0.54265726",
"0.523397",
"0.52314925",
"0.5226497",
"0.5206378... | 0.7370972 | 0 |
Determines a unique hash for the files. The order of the files MATTERS. Some files might be dependent on others... Also, if filemtime is set to true in the configuration file mod times will be included in the hash. | Определяет уникальный хэш для файлов. Порядок файлов имеет значение. Некоторые файлы могут зависеть от других... Также, если filemtime установлено в true в конфигурационном файле, время модификации файлов будет включено в хэш. | protected function _hash(array $files, $filemtime = TRUE)
{
$files = array_map('strtolower', $files);
$hash = '';
// File mod times enabled?
if ($filemtime AND $this->_config['filemtime'])
{
foreach ($files as $file)
{
$hash .= $file.filemtime(realpath($file));
}
}
else
{
foreach ($fi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hash_files( $files ) {\n\t\t$added = array();\n\t\tforeach ( $files as $f ) {\n\t\t\t$file = $this->check_path( $f );\n\n\t\t\tif ( $file ) {\n\t\t\t\n\t\t\t\t//check_path(); returns the path to the file, which is nice because\n\t\t\t\t//it allows different sites to share hashes. But we also want t... | [
"0.7222081",
"0.7078933",
"0.69735765",
"0.6709789",
"0.66006666",
"0.65469784",
"0.6435905",
"0.6387928",
"0.6349846",
"0.63209385",
"0.63002956",
"0.62613755",
"0.61497605",
"0.61253214",
"0.6106117",
"0.6061032",
"0.60106134",
"0.6002439",
"0.5999306",
"0.5975758",
"0.5947... | 0.7424507 | 0 |
Display the Infusion URL input field. | Показать поле ввода URL инфузии. | public function display_inf_url() {
$key = 'inf_url';
if ( isset( $this->existing_options[$key] ) && $this->existing_options[$key] )
$existing_value = $this->existing_options[$key];
else
$existing_value = '';
$id = $key;
settings_errors( $id );
echo 'http://<input type="text" name="' . sel... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function validate_field_url ( $input ) {\n\t\treturn trim( esc_url( $input ) );\n\t}",
"function dblions_fb_link() {\n\t$fblink = esc_attr( get_option( 'facebook_link' ) );\n\tcreate_input_field( array(\n\t\t\t'facebook_link', 'text', \n\t\t\t$fblink, 'Facebook Link'\n\t\t) );\n}",
"function wpcom_refer... | [
"0.6727739",
"0.6651108",
"0.65993536",
"0.6570917",
"0.64455575",
"0.643784",
"0.64063233",
"0.6400369",
"0.63005614",
"0.62640715",
"0.62575233",
"0.6214456",
"0.61953133",
"0.6176557",
"0.61503834",
"0.6121549",
"0.6120095",
"0.61073273",
"0.6091181",
"0.607514",
"0.600232... | 0.82373905 | 0 |
Display the Infusion api key input field. | Показать поле ввода ключа API Infusion. | public function display_api_key() {
$key = 'inf_key';
if ( isset( $this->existing_options[$key] ) && $this->existing_options[$key] )
$existing_value = $this->existing_options[$key];
else
$existing_value = '';
$id = $key;
settings_errors( $id );
echo '<input type="password" name="' . self::... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function showApiKeyInput()\n\t{\n\t\t$id = 'revendless-api-key';\n\t\t$option = 'api_key';\n\n\t\t$value = (isset($this->options[$option]) && $this->options[$option]) ? ' value=\"'.esc_attr($this->options[$option]).'\"' : '';\n\n\t\tsettings_errors($id);\n\n\t\tprint '<input type=\"text\" name=\"'.self::OPT... | [
"0.834101",
"0.7331748",
"0.7178171",
"0.6946439",
"0.69116455",
"0.6893463",
"0.6642264",
"0.6632798",
"0.6572274",
"0.6444198",
"0.6419516",
"0.63499594",
"0.6342872",
"0.63209367",
"0.6267529",
"0.6253189",
"0.622157",
"0.61636037",
"0.6143774",
"0.6129837",
"0.60782754",
... | 0.8547689 | 0 |
Returns the beta version | Возвращает бета-версию | public function getBetaVersion() {
return $this->betaVersion;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function version()\n {\n return '3.0.0 Beta';\n }",
"public function isBetaVersion()\n {\n $blBetaVersion = false;\n\n if (stripos($this->getConfig()->getVersion(), 'beta') !== false) {\n $blBetaVersion = true;\n }\n\n return $blBetaVersion;\n }",
... | [
"0.7742543",
"0.73853207",
"0.73174334",
"0.7309363",
"0.71123105",
"0.7059199",
"0.7026275",
"0.70176",
"0.690232",
"0.6889793",
"0.684558",
"0.68064564",
"0.676348",
"0.6759779",
"0.6759779",
"0.67482054",
"0.6743824",
"0.67275345",
"0.67136526",
"0.67136526",
"0.67136526",... | 0.86589295 | 0 |
Gets the dependancies of an addon | Получает зависимости дополнения | public function getDependencies() {
return DependencyManager::getDependenciesFromAddonID($this->id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDependencies();",
"function get_dependencies();",
"public function getDependencies() {}",
"public function getDependencies()\n {\n if (!$this->isDependenciesLoaded)\n {\n $db = Codeli::getInstance()->getDB();\n\n $this->dependencie... | [
"0.74302506",
"0.7369472",
"0.7261551",
"0.72138745",
"0.7178607",
"0.7178341",
"0.71124756",
"0.7088281",
"0.70529395",
"0.70529395",
"0.7006528",
"0.6985244",
"0.6962028",
"0.6909643",
"0.69090545",
"0.69017583",
"0.68990636",
"0.688454",
"0.68439144",
"0.68439144",
"0.6843... | 0.78329563 | 0 |
Gets the addon description formatted in TML (Torque Markup Language) | Получает описание плагина, отформатированное на языке TML (Torque Markup Language) | public function getDescriptionTML() {
return TML::format($this->description);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDescription()\n {\n $description = '\n\t\tThis is the template installation type. Change this text within the file for this installation type.';\n return $description;\n }",
"public function getDescription()\n {\n return $this->getNodeText('/p:package/p:description');\n... | [
"0.68838567",
"0.67605674",
"0.6690251",
"0.66882825",
"0.6678195",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
"0.6676346",
... | 0.7747348 | 0 |
Gets the addons reason for rejection | Получает причину отказа в добавлении дополнений | public function getRejectReason() {
if(isset($this->reviewInfo->rejectReason)) {
return $this->reviewInfo->rejectReason;
} else {
return "";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getReason();",
"public function getReason();",
"public function getReason()\n {\n return $this->reason;\n }",
"public function getReason()\n {\n return $this->reason;\n }",
"public function getReason()\n {\n return $this->reason;\n }",
"public functi... | [
"0.70913875",
"0.70913875",
"0.69504625",
"0.69504625",
"0.69504625",
"0.69504625",
"0.69504625",
"0.6929878",
"0.6927689",
"0.69071263",
"0.6889306",
"0.68357426",
"0.67512685",
"0.67512685",
"0.6712057",
"0.6704697",
"0.665209",
"0.6588867",
"0.6574662",
"0.65532136",
"0.65... | 0.73665905 | 0 |
Gets the screenshot id's associated with the addon | Получает идентификаторы скриншотов, связанных с расширением | public function getScreenshots() {
return ScreenshotManager::getScreenshotsFromAddon($this->id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getScreenshotData();",
"public function getScreenshotUrl()\n {\n return $this->screenshotUrl;\n }",
"public function getScreenshotInfo($screenshot_id)\n {\n $url = $this->target->getUrl(Target::URL_SCREENSHOT, array('id' => $screenshot_id));\n $response = $this->co... | [
"0.60230094",
"0.5836656",
"0.5826459",
"0.5701319",
"0.5633349",
"0.5594444",
"0.5578208",
"0.54243124",
"0.5400457",
"0.5371337",
"0.53528076",
"0.5285388",
"0.52161455",
"0.51917285",
"0.51356876",
"0.5135479",
"0.5118047",
"0.4997365",
"0.49910176",
"0.49910176",
"0.49879... | 0.7331117 | 0 |
Gets the total downloads of the addon (sum of all download types) | Получает общее количество загрузок дополнения (сумма всех типов загрузок) | public function getTotalDownloads() {
return StatManager::getTotalAddonDownloads($this->id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function edd_count_total_file_downloads() {\n global $edd_logs;\n return $edd_logs->get_log_count( null, 'file_download' );\n}",
"public function getDownloadCount()\n\t{\n\t\treturn $this->downloads;\n\t}",
"function get_all_download_count() {\n\t// the cached count is maintained in PluginProject::update... | [
"0.72393465",
"0.70773995",
"0.70024073",
"0.67012423",
"0.6631074",
"0.65103567",
"0.64630294",
"0.6391165",
"0.6054727",
"0.60199994",
"0.6008677",
"0.59926826",
"0.5961547",
"0.59540933",
"0.59540164",
"0.5905299",
"0.58851624",
"0.5840934",
"0.5839767",
"0.5837542",
"0.58... | 0.8306791 | 0 |
Returns a list of updates for this addon | Возвращает список обновлений для этого дополнения | public function getUpdates() {
return AddonManager::getUpdates($this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUpdates()\n {\n return $this->updates;\n }",
"public function getUpdates() {\n return $this->updates;\n }",
"public function getUpdateList()\n {\n return $this->updateList;\n }",
"protected function listUpdates() {}",
"function list_plugin_updates()\n ... | [
"0.7739378",
"0.77109253",
"0.7687507",
"0.7665708",
"0.7505424",
"0.7287254",
"0.7219403",
"0.70088124",
"0.6923479",
"0.6901489",
"0.68692154",
"0.674815",
"0.6738253",
"0.66978025",
"0.6632481",
"0.66075665",
"0.654447",
"0.6520583",
"0.6520583",
"0.648359",
"0.6451416",
... | 0.8280899 | 0 |
Returns the date uploaded | Возвращает дату загрузки | public function getUploadDate() {
return $this->uploadDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDocumentUploadDate() {\n return $this->document['uploadDate'];\n }",
"public function getDateUpload()\n {\n if (!isset($this->dateUpload)) {\n $this->dateUpload = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getDateUploadQuery())) && $n... | [
"0.8442649",
"0.77234113",
"0.7682997",
"0.713413",
"0.7060238",
"0.68477017",
"0.68401027",
"0.68391556",
"0.6628378",
"0.6555828",
"0.65443814",
"0.65443814",
"0.6537988",
"0.6477345",
"0.6407735",
"0.638052",
"0.63578296",
"0.63578296",
"0.6348202",
"0.6342542",
"0.634099"... | 0.8627165 | 0 |
Checks if the addon has a beta version | Проверяет, есть ли у дополнения бета-версия | public function hasBeta() {
return $this->betaVersion !== null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isBetaVersion()\n {\n $blBetaVersion = false;\n\n if (stripos($this->getConfig()->getVersion(), 'beta') !== false) {\n $blBetaVersion = true;\n }\n\n return $blBetaVersion;\n }",
"public static function isStable()\n {\n return (bool) preg_mat... | [
"0.7679029",
"0.71599454",
"0.71464884",
"0.7105199",
"0.7060706",
"0.67733335",
"0.6640061",
"0.6628518",
"0.6605227",
"0.6548789",
"0.65316033",
"0.6507119",
"0.6467984",
"0.63854086",
"0.6292424",
"0.6286186",
"0.6275244",
"0.62626636",
"0.61667186",
"0.61641484",
"0.61593... | 0.7698113 | 0 |
Convert domain name test.xlinesoft.com return DC=test,DC=xlinesoft,DC=com | Преобразовать имя домена test.xlinesoft.com вернуть DC=test,DC=xlinesoft,DC=com | function ldap_DomainToDN($aDomain)
{
$arrDomain = explode(".", $aDomain);
for ($i = 0; $i < sizeof($arrDomain); $i++)
{
$arrDomain[$i] = "dc=".$arrDomain[$i];
}
return implode(',', $arrDomain);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _domainName() {\n\t\t$this->CI->load->helper('url');\n\t $url = site_url();\n\t //$parse the url\n\t\t$host = parse_url( $url, PHP_URL_HOST );\n\t\t//reverse array\n\t\t$host = array_reverse( explode( '.', $host ) );\n\t\t//check in_array for .bd domain name\n\t\tif( in_array( 'bd', $host ) ... | [
"0.6714948",
"0.6647523",
"0.6559829",
"0.65499985",
"0.6472691",
"0.646512",
"0.64386475",
"0.64370614",
"0.63291085",
"0.63031405",
"0.6231646",
"0.61433876",
"0.61231554",
"0.6111101",
"0.61097115",
"0.60939294",
"0.60644037",
"0.6062945",
"0.60304046",
"0.60289186",
"0.60... | 0.7166025 | 0 |
function for Active Directory This function retrieves and returns CN from given DN $dn = CN=Users,CN=Builtin,DC=test,DC=xlinesoft,DC=com return Users | Функция для Active Directory Эта функция получает и возвращает CN из заданного DN $dn = CN=Users,CN=Builtin,DC=test,DC=xlinesoft,DC=com возвращает Users | function ldap_getCN($dn)
{
preg_match('/[^,]*/', $dn, $matchs, PREG_OFFSET_CAPTURE, 3);
return $matchs[0][0];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function get_username_from_dn($dn) {\n global $CFG;\n $dn_tmp1 = explode(\",\", $dn);\n if (count($dn_tmp1) > 1) {\n // Normally the first element is cn=..., or uid=...\n // try a shortcut if the naming attribute is the same\n // unless forced by a 'deb... | [
"0.74021345",
"0.7242301",
"0.6492867",
"0.6420944",
"0.6279398",
"0.6192482",
"0.61751467",
"0.61578405",
"0.6139376",
"0.6119302",
"0.61033726",
"0.60550916",
"0.60528356",
"0.59999204",
"0.5793205",
"0.5776558",
"0.5739483",
"0.569724",
"0.56596607",
"0.5606079",
"0.560081... | 0.7693931 | 0 |
This function searchs in LDAP tree ($ad LDAP link identifier) entry specified by samaccountname and returns its DN or epmty string on failure. $samaccountname = Users $basedn = DC=test,DC=xlinesoft,DC=com return CN=Users,CN=Builtin,DC=test,DC=xlinesoft,DC=com | Эта функция ищет в LDAP-дереве ($ad LDAP-идентификатор связи) запись, указанную samaccountname, и возвращает её DN или пустую строку в случае неудачи. $samaccountname = Users $basedn = DC=test,DC=xlinesoft,DC=com return CN=Users,CN=Builtin,DC=test,DC=xlinesoft,DC=com | function ldap_getDN($ad, $samaccountname, $basedn)
{
$attributes = array('dn');
$result = ldap_search($ad, $basedn, "(samaccountname={$samaccountname})", $attributes);
if ($result === FALSE)
return '';
$entries = ldap_get_entries($ad, $result);
if ($entries['count'] > 0)
return $e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDN($ad, $samaccountname, $basedn) {\n $attributes = array('dn');\n $result = ldap_search($ad, $basedn, \"(samaccountname={$samaccountname})\", $attributes);\n\n if ($result === FALSE) {\n return '';\n }\n $entries = ldap_get_entries($ad, $result);\n ... | [
"0.75904876",
"0.65023524",
"0.6329517",
"0.63089776",
"0.63065916",
"0.599628",
"0.5989025",
"0.59706676",
"0.5861558",
"0.5851783",
"0.57341075",
"0.5714527",
"0.5705161",
"0.561168",
"0.550764",
"0.53671795",
"0.5353338",
"0.53370076",
"0.5289423",
"0.52819675",
"0.5270163... | 0.76359344 | 0 |
Get DB Manager Handler | Получить обработчик менеджера баз данных | public function getDBManagerHandler(): DatabaseManager
{
if (empty($this->dbManager)) {
$this->dbManager = new DatabaseManager(Config::get('database'), new ConnectionFactory());
}
return $this->dbManager;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDBManagerHandler()\n {\n\t\tif (empty($this->dbManager)) {\n\t\t\t$this->dbManager = new DatabaseManager($this->config['database'], new ConnectionFactory());\n\t\t}\n\t\treturn $this->dbManager;\n\t}",
"public function getDatabaseHandler();",
"public function getHandlerManager()\n {\n ... | [
"0.8761655",
"0.78724396",
"0.7585893",
"0.73555136",
"0.72392917",
"0.7185888",
"0.71208847",
"0.70777106",
"0.6990095",
"0.6951328",
"0.6848416",
"0.6755057",
"0.67099756",
"0.6621526",
"0.64450836",
"0.6387809",
"0.6381628",
"0.6361761",
"0.6361761",
"0.63507706",
"0.63072... | 0.84424555 | 1 |
Get Redis Manager Handler | Получить обработчик Redis Manager | public function getRedisManagerHandler(): RedisManager
{
if (empty($this->redisManager)) {
$this->redisManager = new RedisManager(Config::get('redis'));
}
return $this->redisManager;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHandler();",
"public function getHandler();",
"public function getHandlerManager()\n {\n return $this->handlerManager;\n }",
"protected function get_handler() {\n\n\t\treturn $this->handler;\n\t}",
"public function getHandler() {}",
"public function getHandler(){\n ... | [
"0.7048006",
"0.7048006",
"0.6991802",
"0.69007593",
"0.689282",
"0.6679183",
"0.6634213",
"0.6634213",
"0.6631946",
"0.65716386",
"0.65610665",
"0.6507912",
"0.6374624",
"0.6369019",
"0.635976",
"0.6345224",
"0.6319165",
"0.62993807",
"0.6242241",
"0.6216167",
"0.61962146",
... | 0.81542933 | 0 |
Gets list [id => name] of companies | Получает список [id => name] компаний | public static function getList()
{
$companies = static::find()->select(['id', 'name'])->asArray()->all();
return array_column($companies, 'name', 'id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}",
"function GetCompanies()\n{\n\t$CompArr=array();\n\t$Query = \"SELECT * FROM \".PFX.\"_tracker_client ORDER BY NAME ASC\";\n\t$Sql = new Query($Query);\n\twhile ($Row=$Sql->Row()) {\n\t\t$... | [
"0.7660172",
"0.73401713",
"0.7269344",
"0.72589463",
"0.7253848",
"0.72444826",
"0.72141033",
"0.72080827",
"0.7206525",
"0.71996295",
"0.70115834",
"0.6966755",
"0.6956996",
"0.6939887",
"0.6892844",
"0.6699655",
"0.66846484",
"0.6676885",
"0.66373336",
"0.6629977",
"0.6622... | 0.7571351 | 1 |
$serviceAccount = ServiceAccount::fromJsonFile(__DIR__.'/secret/sapiadvertiser35f0fa96e6598d2d9.json'); $firebase = (new Factory) >withServiceAccount($serviceAccount) >create(); | $serviceAccount = ServiceAccount::fromJsonFile(__DIR__.'/secret/sapiadvertiser35f0fa96e6598d2d9.json'); $firebase = (new Factory) >withServiceAccount($serviceAccount) >create(); | public function __construct(){
$acc = ServiceAccount::fromJsonFile('C:/xampp/htdocs/webshop2/secret/sapiadvertiser-35f0f-a96e6598d2d9.json');
$firebase = (new Factory)->withServiceAccount($acc)->create();
$this->database = $firebase->getDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct($google_service_account_json = \"\")\n {\n if ($google_service_account_json == \"\") $google_service_account_json = __ROOT__ . '/google-service-account.json';\n $serviceAccount = ServiceAccount::fromJsonFile($google_service_account_json);\n\n $this->firebase = (n... | [
"0.71198434",
"0.6965754",
"0.68609",
"0.633406",
"0.5899414",
"0.5834478",
"0.55554855",
"0.55112994",
"0.529052",
"0.5237222",
"0.5219354",
"0.5215776",
"0.5215045",
"0.51095456",
"0.5036485",
"0.4962875",
"0.49497533",
"0.49088746",
"0.48876867",
"0.4859508",
"0.48265827",... | 0.79872364 | 0 |
func _rules validasi form | func _rules валидации формы | private function _rules()
{
$this->form_validation->set_rules('nama', 'nama', 'trim|required', [
'required' => 'Nama wisata tidak boleh kosong!'
]);
$this->form_validation->set_rules('jenis_wisata', 'jenis wisata', 'trim|required', [
'required' => 'Jenis wis... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function validateRules();",
"private function _rules()\n\t{\n\t\t$this->form_validation->set_rules('plate_number','plate_number','required',['required' => 'Plat Nomor Wajib Diisi']);\n\t\t$this->form_validation->set_rules('catId','Kategori/Kapasitas','required',['required' => '%s Wajib Diisi']);\n\t\t$thi... | [
"0.77058625",
"0.7540695",
"0.7433044",
"0.7409395",
"0.72885334",
"0.7214365",
"0.71415466",
"0.71223617",
"0.7115848",
"0.7111083",
"0.7111083",
"0.7111083",
"0.7111083",
"0.7111083",
"0.7111083",
"0.7111083",
"0.7111083",
"0.7111083",
"0.7111083",
"0.7111083",
"0.7111083",... | 0.7579986 | 1 |
Loads all settings from db and triggers the event 'Settings.afterLoad' that can be listened to by plugins to further modify the settings. Structure: Array( 'PluginName|ScopeName' => Array( 'key1' => 'value1', ... ), ... ) Access via: Configure::read('Settings.ScopeName.key1'); | Загружает все настройки из базы данных и запускает событие 'Settings.afterLoad', которое может быть выслушано плагинами для дальнейшей модификации настроек. Структура: Array( 'PluginName|ScopeName' => Array( 'key1' => 'value1', ... ), ... ) Доступ через: Configure::read('Settings.ScopeName.key1'); | protected function _loadSettings()
{
$settings = Cache::remember('settings', function () {
/** @var SettingsTable $Settings */
$Settings = $this->loadModel('Wasabi/Core.Settings');
return $Settings->getAllKeyValues();
}, 'wasabi/core/longterm');
$event = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function loadSettings() {}",
"protected function loadSettings() {}",
"protected function loadSettings() {}",
"private function load_site_settings() {\n\t\t\n\t\t$this->helper->load_editor_settings();\n\t\t$this->settings = array_merge($this->settings,$this->EE->session->cache['eeck']['eeck_settings... | [
"0.6884261",
"0.68840927",
"0.68840927",
"0.6824314",
"0.6763245",
"0.6751249",
"0.6659479",
"0.65051454",
"0.64170754",
"0.6362997",
"0.6349048",
"0.6329909",
"0.63279444",
"0.62805814",
"0.6247827",
"0.61893433",
"0.6097472",
"0.6064629",
"0.59914577",
"0.59722704",
"0.5970... | 0.78986067 | 0 |
cleans data using htmlspecialchars($value) | очищает данные с помощью htmlspecialchars($value) | private function Clean($value){
return htmlspecialchars(strip_tags($value));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function htmlspecialcarfy(&$value) {\r\n $value = htmlspecialchars($value);\r\n }",
"function filter($value){\n return htmlspecialchars($value);\n }",
"protected function filterXss($value) {\n return htmlspecialchars($value, ENT_QUOTES);\n }",
"function sanitation($value) {\n\... | [
"0.81252795",
"0.78624403",
"0.7615995",
"0.75765944",
"0.75356185",
"0.7488446",
"0.74862987",
"0.7482319",
"0.7419871",
"0.7403327",
"0.73796016",
"0.7334972",
"0.73287725",
"0.73195016",
"0.7316396",
"0.7313308",
"0.7295194",
"0.7286763",
"0.7275648",
"0.72401476",
"0.7237... | 0.80848086 | 1 |
adds a text field to the form | добавляет текстовое поле в форму | function addText($name,$display=null,$value=null, $disabled=null, $maxlength=null, $class=null, $id=null){
$this->formFields[$name] = array(
"name" => $name,
"type" => "text", //defines the type of the input
"label" => $display,
"value" => $value,
"disabled" => $disabled,
"maxlen... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addToField(\\Foundation\\Form\\Field $field);",
"public function addField();",
"public function add_text($content)\n\t{\n\t\tarray_push($this->form_elements, array($content, 0, 'text'));\n\t}",
"function text_field($object, $field, $options = array()) {\n $form = new FormHelper($object, $field);\... | [
"0.71173376",
"0.7010082",
"0.67111164",
"0.6665229",
"0.65946543",
"0.6570832",
"0.65291566",
"0.64706016",
"0.6444931",
"0.6407183",
"0.6361391",
"0.63384074",
"0.6266926",
"0.62619895",
"0.62619895",
"0.6246228",
"0.621663",
"0.6186998",
"0.6174247",
"0.6173546",
"0.617029... | 0.71394086 | 0 |
>end of add text adds a textarea field to the form | >конец добавления текста добавляет поле textarea в форму | function addTextarea($name,$display=null,$value=null, $disabled=null, $rows=3, $cols=25, $class=null, $id=null){
$this->formFields[$name] = array(
"name" => $name,
"type" => "textarea", //defines the type of the input
"label" => $display,
"value" => $value,
"disabled" => $disabled,
"ro... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function textArea ( \\r8\\Form\\TextArea $field )\n {\n $this->addField( \"textarea\", $field );\n }",
"function wc_custom_add_custom_fields() {\n woocommerce_wp_textarea_input( \n\tarray( \n\t\t'id' => '_custom_text_field', \n\t\t'label' => __( 'Ingredient and Nutrition val... | [
"0.6869719",
"0.66468203",
"0.6594211",
"0.6500564",
"0.6487473",
"0.6479856",
"0.64718026",
"0.64642334",
"0.646191",
"0.6425167",
"0.6423354",
"0.6407998",
"0.6376887",
"0.63619083",
"0.6353603",
"0.6347041",
"0.63369834",
"0.63158906",
"0.6312896",
"0.6289889",
"0.6289376"... | 0.7041949 | 0 |
Test login without user details Try to validate user without details | Тест входа без деталей пользователя Попробуйте проверить пользователя без деталей | public function testLoginWithoutUserDetails() :void
{
$res = self::$dataService->login("login", null, $this->userEmpty["user"], $this->userEmpty["pass"], [] );
$this->assertIsArray( $res, 'testLoginWithoutUserDetails' );
$this->assertArrayHasKey('status', $res, 'testLoginWithoutUserDetails'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testLoginValidation() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => '', 'password' => ''])\n ->see('Please enter a valid username.')\n ->see('Please enter a valid password.');\n }",
"public function testLogin... | [
"0.7501516",
"0.7453113",
"0.73845613",
"0.73630416",
"0.73431045",
"0.7272726",
"0.725035",
"0.7197222",
"0.7187137",
"0.7145777",
"0.7135395",
"0.7134461",
"0.71268976",
"0.71257377",
"0.71238244",
"0.7085704",
"0.70580024",
"0.7054494",
"0.70356387",
"0.702758",
"0.7024218... | 0.77804697 | 0 |
Test login without username Try to validate user without username | Тест входа без имени пользователя Попробуйте проверить пользователя без имени пользователя | public function testLoginWithoutUserName() : void
{
$res = self::$dataService->login("login", null, $this->userEmpty["user"], $this->userFake["pass"], [] );
$this->assertIsArray( $res, 'testLoginWithoutUserName' );
$this->assertArrayHasKey('status', $res, 'testLoginWithoutUserName' );
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testLoginUsername(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => '',\r\n\t\t\t\t'password' => 'thisisit'\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertFalse($validLogin);\r\n\t\t}",
"public function testLoginname(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'userna... | [
"0.80902255",
"0.7658984",
"0.74814266",
"0.73498446",
"0.714599",
"0.71350527",
"0.71150535",
"0.7099077",
"0.7067175",
"0.70501345",
"0.7042132",
"0.70333046",
"0.6980602",
"0.6958325",
"0.69443095",
"0.6930048",
"0.6907427",
"0.689874",
"0.6876509",
"0.68755686",
"0.687202... | 0.7717765 | 1 |
Test login again with same user Try to login again with same real user details and get msg "This user already logged in." | Повторить вход с тем же пользователем. Попробовать войти снова с теми же реальными данными пользователя и получить сообщение "Этот пользователь уже вошёл в систему." | public function testLoginAgainWithSameUser() : void
{
$res = self::$dataService->login( "login", null, $this->userA["user"], $this->userA["pass"], [ "user_agent" => $this->userA["getBrowserName"], "time" => $this->userA["getCurrentDateTime"], "ip" => $this->userA["getReqIp"] ] );
$this->assertIsArr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test_login2()\n {\n $this->visit('login')\n ->type('testlogin1@gmail.com', 'email')\n ->type('123456','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }",
"private function checkLogin()\n {\n ... | [
"0.69232047",
"0.682093",
"0.68052745",
"0.67917126",
"0.6763312",
"0.6758325",
"0.6706842",
"0.6663564",
"0.66578543",
"0.6635829",
"0.6615092",
"0.66056216",
"0.6552203",
"0.65060383",
"0.6481534",
"0.64775264",
"0.64558893",
"0.6455745",
"0.64354706",
"0.64270693",
"0.6407... | 0.8268698 | 0 |
Test login is online true Try to change field "is_online" to true with the details of logged in user | Тестовый логин онлайн true Попробуйте изменить поле "is_online" на true с деталями авторизованного пользователя | public function testLoginIsOnlineTrue() : void
{
$res = self::$dataService->login( "change_status", $this->userA["id"], "", "", [] );
$this->assertIsArray( $res, 'testLoginIsOnlineTrue' );
$this->assertArrayHasKey('status', $res, 'testLoginIsOnlineTrue' );
$this->assertArrayHasKey('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateUserOnline()\n {\n $this->is_online = 1;\n $this->save();\n }",
"public function logInUserChangesToLoggedInStatus() {\n\t\t$user = new Tx_Oelib_Model_FrontEndUser();\n\t\t$this->subject->logInUser($user);\n\n\t\t$this->assertTrue(\n\t\t\t$this->subject->isLoggedIn()\n\t\... | [
"0.6793848",
"0.66807455",
"0.6678889",
"0.6586851",
"0.64440435",
"0.6391763",
"0.6382423",
"0.6369644",
"0.6298275",
"0.6268402",
"0.6254587",
"0.62088144",
"0.619948",
"0.61746776",
"0.6140125",
"0.6139053",
"0.6133409",
"0.6092596",
"0.6079666",
"0.60538614",
"0.60423124"... | 0.7566575 | 0 |
Test fetch all Try to get all online users | Тест получения всех Попробуйте получить всех онлайн-пользователей | public function testFetchAll() : void
{
$res = self::$dataService->fetchAll();
$this->assertIsArray( $res, 'testFetchAll' );
$this->assertArrayHasKey('status', $res, 'testFetchAll' );
$this->assertArrayHasKey('msg', $res, 'testFetchAll' );
$this->assertCount(2, $res, 'testFe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUsersOnline()\r\n {\r\n $result = $this->getBitrixApi(array(\r\n 'FILTER' => array('IS_ONLINE' => 'Y',),\r\n ), 'user.get');\r\n\r\n if ($result) {\r\n if (isset($result['total']) && $result['total'] > 0) {\r\n return $result['result']... | [
"0.70183104",
"0.68665636",
"0.68665636",
"0.68665636",
"0.6811415",
"0.67927295",
"0.6779848",
"0.6773477",
"0.6773205",
"0.67714256",
"0.67707515",
"0.67453784",
"0.6730475",
"0.6711639",
"0.6698908",
"0.6695338",
"0.6695338",
"0.6691031",
"0.6678113",
"0.66718805",
"0.6668... | 0.7209962 | 0 |
Register a new post action that will call the function identified by the string $function_name when $bool = true All post action functions should take in three arguments: $db, $update and $filter, regardless of whether the function uses them or not since some functions need all three arguments (e.g. update) | Зарегистрируйте новый пост-действие, которое вызовет функцию, идентифицированную строкой $function_name, когда $bool = true. Все функции пост-действий должны принимать три аргумента: $db, $update и $filter, независимо от того, используются ли они функцией или нет, поскольку некоторые функции требуют всех трех аргументо... | protected function registerPostAction($function_name, $bool, $validation_required=true) {
if ($validation_required) {
$this->post_actions["valid"][$function_name] = $bool;
} else {
$this->post_actions["no_valid"][$function_name] = $bool;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPostFunction($functionName,$requestData=false){\n\t \t if(!empty($functionName)){\n $this->_CI->ApiModel->{'post'.$functionName}($requestData);\n\t \t }else{\n\t \t generateServerResponse('0', 'W');\n\t \t }\n // switch ($resCode) {\n // \tcase 'access... | [
"0.5915093",
"0.56971455",
"0.5457228",
"0.54542583",
"0.5379469",
"0.5322913",
"0.5294251",
"0.52865887",
"0.52838635",
"0.52807325",
"0.5219794",
"0.52039003",
"0.5196946",
"0.5191648",
"0.51658845",
"0.5155013",
"0.51544225",
"0.5100345",
"0.5094324",
"0.50191504",
"0.4971... | 0.7175972 | 0 |
Sets the $update array variable based on the values in the posted form | Устанавливает массив переменной $update на основе значений, указанных в отправленной форме | protected function setUpdateArray() {
$column_names = getColumnNames($this->table_name);
foreach ($column_names as $column_name) {
if (isset($_POST[$column_name])) {
$this->update[$column_name] = Mysql::SQLValue($_POST[$column_name]);
} else if (isset($_GET[$colum... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateFromPOST() {\n if ($this->isSubmit()) {\n foreach (Tools::getValue($this->namebase(), array()) as $name => $value) {\n $key = $this->nameify($name);\n $this->input_values[$key] = $value;\n }\n Configuration::updateValue($th... | [
"0.7219526",
"0.7178545",
"0.64887655",
"0.6357527",
"0.6344165",
"0.63061184",
"0.6269735",
"0.61862844",
"0.6146527",
"0.61085993",
"0.6103149",
"0.60827994",
"0.60818577",
"0.607382",
"0.60548675",
"0.5990711",
"0.59838504",
"0.5979938",
"0.5973769",
"0.59622407",
"0.59557... | 0.72601664 | 0 |
Sets the $filter array variable based on the value of the primary keys in the GET variables. | Устанавливает массив переменной $filter в зависимости от значения первичных ключей в переменных GET. | protected function setFilterArray() {
$primary_keys = getPrimaryKeys($this->table_name);
foreach ($primary_keys as $pk) {
if (isset($_GET[$pk])) {
$this->filter[$pk] = Mysql::SQLValue($_GET[$pk]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function setFilter()\n\t{\n\t\t// get filter values\n\t\t$this->filter['language'] = ($this->getParameter('language', 'array') != '') ? $this->getParameter('language', 'array') : BL::getWorkingLanguage();\n\t\t$this->filter['application'] = $this->getParameter('application');\n\t\t$this->filter['module'] =... | [
"0.7118917",
"0.68524235",
"0.65505576",
"0.6530183",
"0.6527519",
"0.64323545",
"0.6407445",
"0.630372",
"0.62913865",
"0.6277528",
"0.62209946",
"0.62091124",
"0.6134404",
"0.6119843",
"0.6101276",
"0.6096641",
"0.60774136",
"0.6029378",
"0.6024465",
"0.5955177",
"0.5915224... | 0.8286648 | 0 |
A user must have one of these access levels if they are to post this form | Пользователь должен иметь один из этих уровней доступа, если он хочет отправить эту форму | protected function setRequiredAccessLevelsForPost() {
$this->post_required_access_levels = array("owner","admin","collaborator");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function my_pmpro_has_membership_access_filter($access, $post, $user)\n{\n\tif(!empty($user->membership_level) && $user->membership_level->ID == 5)\n\t\treturn true;\t//level 5 ALWAYS has access\n\n\treturn $access;\n}",
"function pmprosl_pmpro_has_membership_access_filter( $hasaccess, $post, $user, $post_member... | [
"0.6499559",
"0.63835377",
"0.62850654",
"0.6264078",
"0.62082493",
"0.6139527",
"0.60873264",
"0.60821533",
"0.6003797",
"0.5991259",
"0.5978252",
"0.59432805",
"0.5907075",
"0.5888768",
"0.5876836",
"0.58171606",
"0.5815755",
"0.57903427",
"0.57903427",
"0.5783683",
"0.5776... | 0.76484525 | 0 |
Get use default on error | Использовать значение по умолчанию при ошибке | public function getUseDefaultOnError()
{
return $this->getOption('use_default_on_error');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function firstErrorOrWarning($default=null) {\n $r=$this->firstError();\n if ($r===null) $r=$this->firstWarning();\n return ($r===null)?$default:$r;\n }",
"public function firstError($default=null) {\n if (isset($this->errorMsg[0])) {\n return $this->errorMsg[0];\... | [
"0.70128495",
"0.68864816",
"0.67106473",
"0.6703547",
"0.6631589",
"0.6522719",
"0.6482986",
"0.64619404",
"0.6456318",
"0.6455671",
"0.6421437",
"0.63695353",
"0.63393015",
"0.6306268",
"0.62422323",
"0.62318265",
"0.621139",
"0.6200078",
"0.6194783",
"0.6173369",
"0.615958... | 0.7439112 | 0 |
/ Clean evil tags Clean possible javascipt codes | Очистить вредные теги Очистить возможные коды javascipt | function cleanEvilTags($t){
$t = preg_replace("/javascript/i" , "javascript", $t);
$t = preg_replace("/alert/i" , "alert" , $t);
$t = preg_replace("/about:/i" , "about:" , $t);
$t = preg_replace("/onmouseover/i", "onmouseover" , $t);
$t = preg_replace... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function clean_evil_tags( $t )\n {\n \t$t = preg_replace( \"/javascript/i\" , \"javascript\", $t );\n\t\t$t = preg_replace( \"/alert/i\" , \"alert\" , $t );\n\t\t$t = preg_replace( \"/about:/i\" , \"about:\" , $t );\n\t\t$t = preg_replace( \"/onmouseover/i\", \"&... | [
"0.75879073",
"0.6836279",
"0.6560045",
"0.6512015",
"0.64986885",
"0.648426",
"0.64113957",
"0.64052916",
"0.63962847",
"0.6372323",
"0.6360447",
"0.63493556",
"0.63247764",
"0.63210285",
"0.6313644",
"0.62955445",
"0.62814236",
"0.62360847",
"0.62146384",
"0.6199648",
"0.61... | 0.7344383 | 1 |
/ krand rand number param int min param int max param boolean seed 1, 0 return int | / krand число случайного числа параметр int min параметр int max параметр boolean seed 1, 0 возвращать int | function krand($min, $max, $seed = 1){
if(!defined('RAND_SEEDED')){
if($seed == 1){
$seed = (double) microtime() * 1000000;
}
mt_srand($seed);
define('RAND_SEEDED', true);
}
return mt_rand($min, $max);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rand($min,$max);",
"function SM_randomint($max) {\n static $startseed = 0; \n if (!$startseed) {\n $startseed = (double)microtime()*getrandmax(); \n srand($startseed); \n }\n return(rand()%$max); \n}",
"function random( $min = 0, $max = 0 ) {\n\tglobal $rnd_value;\n... | [
"0.76461524",
"0.744063",
"0.7001686",
"0.6798131",
"0.6765813",
"0.6744068",
"0.67419934",
"0.6723724",
"0.67105734",
"0.669349",
"0.668691",
"0.661817",
"0.6617897",
"0.66038924",
"0.65856314",
"0.6567721",
"0.6562407",
"0.65594816",
"0.6548884",
"0.6545387",
"0.65327024",
... | 0.8168883 | 0 |
/ iif param boolean e param string t param string f return string | / iif param boolean e param string t param string f return string | function iif($e, $t, $f){
if($e){
return $t;
}else{
return $f;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBooleanString($tf);",
"function t($f)\n\t{\n\tglobal $dyno;\n\tglobal $params;\n\tglobal $db;\n\t// return cleaned up POST data for $f or blank\n\tif (empty($_REQUEST[$f]))\n\t\treturn('');\n\telse\n\t\t{\n\n\t\t$dyno.=\"$f='\".$db->real_escape_string($_REQUEST[$f]).\"',\";\n\t\t$params.=$f.'=... | [
"0.6448789",
"0.61126",
"0.60300314",
"0.5999112",
"0.57668275",
"0.57495517",
"0.56358916",
"0.5511284",
"0.5496055",
"0.5475992",
"0.54441905",
"0.5404686",
"0.53882825",
"0.5369635",
"0.532928",
"0.5309852",
"0.530744",
"0.53060776",
"0.52651244",
"0.52558184",
"0.5253147"... | 0.7419 | 0 |
/ Function: write_header Purpose: Displays header information. Parameters: Input: date the date for display title the title info to be displayed this_page for write_jscript Output: none Author(s): | Функция: write_header Назначение: Отображает информацию заголовка. Параметры: Вход: date дата для отображения title информация заголовка, которая будет отображаться this_page для write_jscript Выход: ничего Автор(ы): | function write_header($date, $title, $this_page)
{
print("<head>\n");
print(" <link rel=\"icon\" href=\"./common_files/favicon.ico\" type=\"image/x-icon\">\n");
print(" <link rel=\"shortcut icon\" href=\"./common_files/favicon.ico\" type=\"image/x-icon\">\n");
print(" <meta http-equiv=\"Pragma\" content=\... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);... | [
"0.71713406",
"0.70816946",
"0.7007791",
"0.6978833",
"0.69364303",
"0.6915148",
"0.68568426",
"0.6812247",
"0.6812209",
"0.6794814",
"0.6789016",
"0.67726743",
"0.67185825",
"0.6714872",
"0.6711297",
"0.67060137",
"0.6702238",
"0.66937584",
"0.6691366",
"0.6681655",
"0.66745... | 0.8250703 | 0 |
Check if a specific date is greater than another | Проверьте, является ли конкретная дата больше другой | public static function dateGreater($date1, $date2)
{
$timestamp1 = strtotime($date1);
$timestamp2 = strtotime($date2);
if($timestamp1 > $timestamp2){
return true;
}else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function is_date_greater(DateTime $date1, DateTime $date2){\r\n \r\n return $date1->format(\"Ymd\") >= $date2->format(\"Ymd\");\r\n \r\n// var_dump($date1->format(\"Ymd\"));\r\n \r\n \r\n }",
"function greaterDate($start_date = null, $end_date = null, $equa... | [
"0.77825433",
"0.77091247",
"0.73620564",
"0.71635634",
"0.6977342",
"0.68906087",
"0.6753108",
"0.67075515",
"0.65824646",
"0.65369284",
"0.6530378",
"0.64471173",
"0.63764745",
"0.6376147",
"0.6354954",
"0.63528216",
"0.6348756",
"0.634279",
"0.63399273",
"0.63001186",
"0.6... | 0.7834326 | 0 |
Check if two dates are equal | Проверить, равны ли две даты | public static function datesEqual($date1, $date2)
{
$timestamp1 = strtotime($date1);
$timestamp2 = strtotime($date2);
if($timestamp1 == $timestamp2){
return true;
}else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function compare_with_date()\n {\n }",
"function date_compare($first_date, $second_date)\n{\n $first_date = date('Ymd', strtotime($first_date));\n $second_date = date('Ymd', strtotime($second_date));\n\n if ($first_date == $second_date) {\n return 0;\n } else {\n i... | [
"0.7355435",
"0.6695659",
"0.66203266",
"0.6567592",
"0.65156215",
"0.6439691",
"0.63848853",
"0.63383585",
"0.63123226",
"0.6251001",
"0.6215478",
"0.6208655",
"0.6199862",
"0.61702895",
"0.6169341",
"0.61678207",
"0.61504036",
"0.6122958",
"0.60929704",
"0.6046396",
"0.6043... | 0.7823088 | 0 |
Check days passed between two dates | Проверить количество дней между двумя датами | public static function daysPassed($date1, $date2)
{
$timestamp1 = strtotime($date1);
$timestamp2 = strtotime($date2);
$datediff = $timestamp1 - $timestamp2;
return floor($datediff/(60*60*24));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validateDateRange($date1, $date2){\n\treturn ( strtotime($date1) - strtotime($date2) ) <= 0;\t//should be a negative number, or 0 if posts=expiration\n}",
"static function daysBetweenDates($date1, $date2)\n\t{\n\t\t// If input dates have datetime 'Y-m-d X' format, take only the date part\n\t\tlist($d1) ... | [
"0.7072083",
"0.68539184",
"0.67325306",
"0.6631316",
"0.65535676",
"0.6448423",
"0.6415305",
"0.6362149",
"0.63263047",
"0.62962884",
"0.62887293",
"0.6268182",
"0.6198297",
"0.61981803",
"0.6181604",
"0.6178472",
"0.61684",
"0.6160423",
"0.6160423",
"0.6145939",
"0.613001",... | 0.72669864 | 0 |
Return years and months passed between two dates | Вернуть пройденные годы и месяцы между двумя датами | public static function yearsMonthsPassed ( $date1, $date2 )
{
$d1 = new DateTime( $date1 );
$d2 = new DateTime( $date2 );
$diff = $d2->diff( $d1 );
// Return array years and months
return array ( $diff->y, $diff->m );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function monthsDif($start, $end)\n{\n $splitStart = explode('-', date('Y-n',$start));\n $splitEnd = explode('-', date('Y-n',$end));\n\n if (is_array($splitStart) && is_array($splitEnd)) \n {\n $startYear = $splitStart[0];\n $startMonth = $splitStart[1];\n $endYear = $splitEnd[0];\n $endMont... | [
"0.7238637",
"0.7233387",
"0.6933669",
"0.68868375",
"0.67893064",
"0.67124414",
"0.6543582",
"0.653876",
"0.65215385",
"0.6474659",
"0.6463007",
"0.6431327",
"0.63810986",
"0.63674754",
"0.63091004",
"0.6194091",
"0.61859244",
"0.58400327",
"0.58231974",
"0.57823086",
"0.577... | 0.7735405 | 0 |
Get the transaction id | Получить идентификатор транзакции | public function getTransactionID(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTransactionID()\n\t{\n\t\treturn $this->transaction_id;\n\t}",
"public function getTxnId()\n {\n return $this->response['result']['id'];\n }",
"public function get_transaction_id() {\n\n\t\treturn $this->transaction_tag;\n\t}",
"public function getTransactionID()\r\n\t{\r\n\t\... | [
"0.8506425",
"0.84893644",
"0.84310275",
"0.84022194",
"0.83046526",
"0.82853913",
"0.82031816",
"0.81446373",
"0.8118883",
"0.81116474",
"0.8104309",
"0.8068944",
"0.80446637",
"0.80021006",
"0.79870766",
"0.79790646",
"0.7975853",
"0.79286814",
"0.79286814",
"0.79286814",
"... | 0.89775497 | 0 |
Check if a meta data with a specific key is available. | Проверьте, доступна ли метаданные с определенным ключом. | public function hasMetaData($key); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasMeta(string $key): bool\n {\n return (bool) $this->metas()->firstWhere('key', $key);\n }",
"public function metaExists($key): bool\n {\n /** @var HasMetadataInterface $this */\n return Meta::metable(static::class, $this->id)\n ->where('key', $key)->exis... | [
"0.75015664",
"0.7457449",
"0.74465597",
"0.7431359",
"0.7134132",
"0.70887035",
"0.70853835",
"0.70853835",
"0.7078979",
"0.70390075",
"0.6991665",
"0.6888787",
"0.68843883",
"0.68729156",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0... | 0.77703214 | 0 |
Add Location to list. | Добавить положение в список. | public function add(Location $location): void
{
$this->locations[] = $location;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addLocation(string $location);",
"public function addLocation($location)\n {\n $this->locations[] = $this->createLocationFromInput($location);\n }",
"public function addLocations($locations)\n {\n foreach ($locations as $location) {\n $this->addLocation($locati... | [
"0.71591526",
"0.68633837",
"0.6618987",
"0.63968384",
"0.6302326",
"0.6255869",
"0.6021738",
"0.5970363",
"0.5953169",
"0.5952708",
"0.5869182",
"0.5840583",
"0.5731005",
"0.5704934",
"0.56236136",
"0.5610279",
"0.5581678",
"0.55008304",
"0.5474437",
"0.5474364",
"0.54698366... | 0.7251164 | 0 |
Get the endpoint URI. | Получите URI конечной точки. | public function getUri()
{
return $this->normalize($this->service->uri()) . '/' . $this->normalize($this->uri ?: '');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEndpointUri()\n {\n return $this->_endpointUri;\n }",
"public function getEndpoint(): string\n {\n return $this->endpoint;\n }",
"public function getEndpointUri($method) {\n\t\treturn 'http://' . $this->_makeDomain($this->_domain)\n\t\t\t. self::API_PATH\n\t\t\t. s... | [
"0.87519574",
"0.79829484",
"0.78573096",
"0.7785546",
"0.77819735",
"0.77791816",
"0.77401984",
"0.76932853",
"0.76932853",
"0.76932853",
"0.76932853",
"0.76932853",
"0.76932853",
"0.7679873",
"0.7658427",
"0.76440513",
"0.7601722",
"0.7583886",
"0.7579459",
"0.7534397",
"0.... | 0.8250744 | 1 |
Get the endpoint method. | Получить метод конечной точки. | public function getMethod()
{
return $this->method ?: 'GET';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_method() {\n\t\treturn $this->method;\n\t}",
"public function getMethod(): string\n {\n return $this->method;\n }",
"public function getMethod(): string\n {\n return $this->method;\n }",
"public function GetMethod () {\n\t\treturn $this->method;\n\t}",
"public ... | [
"0.7885144",
"0.7882401",
"0.7882401",
"0.7879144",
"0.7843956",
"0.7825677",
"0.7823108",
"0.78097236",
"0.78097236",
"0.78097236",
"0.7802889",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
... | 0.78874403 | 0 |
Check if item name contains which type of item it is | Проверьте, содержит ли имя элемента, какого типа элемент это является | public function checkItemType(string $name, string $type): bool
{
return str_contains(ucfirst($name), $type);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasItemtype(){\n return $this->_has(40);\n }",
"function valid_item_name ($item_name) {\n if ( empty($item_name) )\n return false;\n else \n return true;\t\n}",
"public function canCreateItem(string $type, string $name): bool;",
"function isItem( $v... | [
"0.6640764",
"0.66392213",
"0.6529418",
"0.6520155",
"0.65078425",
"0.64542973",
"0.64149886",
"0.62875617",
"0.6218366",
"0.61955833",
"0.59936076",
"0.5985854",
"0.5964475",
"0.59142655",
"0.5893545",
"0.58895105",
"0.58772796",
"0.5873737",
"0.5843116",
"0.5830917",
"0.578... | 0.74295384 | 0 |
update Match team score | обновить результат команды Match | public function update_team_score(){
if($this->authenticate_api()){
$response = array( "status" => "error" );
$response['message'] = "Somthing Wrong";
$required_fields = array("match_id");
$status = $this->verifyRequiredParams($required_fields);
$match_id= $this->request->getVar("... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function promoteScoreToBGAScore() {\n \n // If team game, add the score of the teammate first\n if (self::decodeGameType(self::getGameStateValue('game_type')) == 'team') {\n self::DbQuery(\"\n UPDATE\n player AS a\n LEFT JOIN (\n ... | [
"0.7206188",
"0.70234454",
"0.69864935",
"0.6900444",
"0.68952006",
"0.6631083",
"0.65412116",
"0.6484652",
"0.6416889",
"0.64163685",
"0.6383575",
"0.6348069",
"0.63415897",
"0.630434",
"0.6281727",
"0.62610817",
"0.62358254",
"0.622747",
"0.62204003",
"0.62159",
"0.61789024... | 0.7747962 | 0 |
Get the test type clamped between 1 and 5 (included) | Получите тип теста, ограниченный между 1 и 5 (включительно) | function do_test_get_test_type($testtype)
{
if ($testtype < 1) {
$testtype = 1;
}
if ($testtype > 5) {
$testtype = 5;
}
return $testtype;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function rand($min = null, $max = null)\n{\n if ($min == null && $max == null) {\n return \\Genesis\\SQLExtension\\Tests\\Context\\SQLHandlerTest::INT_NUMBER;\n }\n\n return \\Genesis\\SQLExtension\\Tests\\Context\\SQLHandlerTest::TINY_INT_NUMBER;\n}",
"function single_trial($cutoff) {\n global ... | [
"0.55770415",
"0.5402577",
"0.5338391",
"0.5194098",
"0.5140965",
"0.5134963",
"0.51042366",
"0.508055",
"0.50591046",
"0.505275",
"0.499514",
"0.49897087",
"0.49820676",
"0.49820676",
"0.4906944",
"0.48975155",
"0.48847386",
"0.48715553",
"0.48705795",
"0.4845056",
"0.484202... | 0.74614334 | 0 |
Give the test type. | Укажите тип теста. | function get_test_type()
{
return do_test_get_test_type((int)getreq('type'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTestType()\n\t{\n\t\treturn $this->test_type;\n\t}",
"public function testType()\n {\n $user = new User(null, null, null, \"student\");\n $this->assertEquals(\"student\", $user->getType());\n\n $user->setType(\"wrong\");\n $this->assertEquals(\"student\", $user->... | [
"0.7762408",
"0.68215483",
"0.66171634",
"0.6570151",
"0.6558088",
"0.64613616",
"0.6430818",
"0.64280623",
"0.64164454",
"0.6360723",
"0.63453645",
"0.6332546",
"0.62907684",
"0.6288236",
"0.6189538",
"0.6174307",
"0.61729336",
"0.61729336",
"0.61725944",
"0.6171966",
"0.617... | 0.74952364 | 1 |
Action for modal popup values for edit lookup options | Действие для значений модального попапа для редактирования вариантов поиска | public function actionEditlookupoptions() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$model_codemaster = new TblAcaCodeMaster (); // initialising models
$model_lookupoptions_modal = new TblAcaLookupOptions ();
$post = \Yii::$app->request->post ();
if (! e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionLookupoptions() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Lookup Options';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"7\", $... | [
"0.64466333",
"0.63645077",
"0.6300556",
"0.6224807",
"0.6210382",
"0.61806625",
"0.6156717",
"0.61417705",
"0.6055721",
"0.6030681",
"0.5950852",
"0.59486187",
"0.59486187",
"0.59486187",
"0.5940889",
"0.59233683",
"0.58972955",
"0.58919644",
"0.5890764",
"0.58903867",
"0.58... | 0.7606385 | 0 |
Action for updating lookupoptions | Действие для обновления lookupoptions | public function actionUpdatelookupoptions() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$post = \Yii::$app->request->post ();
if (! empty ( $post )) { // checking the values
$value_name = $post ['TblAcaLookupOptions'] ['lookup_value']; // assigining them to vari... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionEditlookupoptions() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$model_codemaster = new TblAcaCodeMaster (); // initialising models\n\t\t\t$model_lookupoptions_modal = new TblAcaLookupOptions ();\n\t\t\t\n\t\t\t$post = \\Yii:... | [
"0.68228805",
"0.6483781",
"0.63622063",
"0.62618136",
"0.56918234",
"0.5606685",
"0.5567346",
"0.55305225",
"0.54829234",
"0.5475695",
"0.54580873",
"0.5429872",
"0.53855777",
"0.5370419",
"0.5335826",
"0.5328852",
"0.5298619",
"0.5294152",
"0.52822113",
"0.5269174",
"0.5234... | 0.7089911 | 0 |
Action for deletion of lookup option | Действие для удаления варианта поиска | public function actionDeletelookupoptions() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$post = \Yii::$app->request->post ();
if (! empty ( $post ['id'] )) {
$id = $post ['id'];
$transaction = \Yii::$app->db->beginTransaction (); // begining the tr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete( $option );",
"function delete_option($option)\n {\n }",
"public function delete()\n {\n delete_option($this->optionName);\n }",
"public function drop ()\n {\n //delete the records of the lookup value\n $records = LookupValue::where('lookup_type_id',... | [
"0.67700034",
"0.6745967",
"0.67307496",
"0.65679526",
"0.6476264",
"0.64708894",
"0.6441353",
"0.6374537",
"0.6294705",
"0.6240748",
"0.6233757",
"0.6201165",
"0.61434513",
"0.6131297",
"0.6121849",
"0.6109251",
"0.6103933",
"0.60822314",
"0.6051135",
"0.6021446",
"0.6011662... | 0.7822394 | 0 |
Action for rendering account settings in the grid | Действие для отображения настроек учетной записи в сетке | public function actionAccountsettings() {
\Yii::$app->view->title = 'ACA Reporting Service | Account Settings';
$this->layout = 'main';
$session = \Yii::$app->session;
$admin_permissions = $session ['admin_permissions'];
if (\Yii::$app->SessionCheck->isLogged () == true && in_array("8", $admin_permissions)) ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function accountSettings() {\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t$data['page'] = 'change_password';\n\t\t$data['pageName'] = 'Change Password';\n\t\tif($data['common_data']['user_data']['role'] == INACTIVE_STAT... | [
"0.7329479",
"0.69178987",
"0.68117756",
"0.67552465",
"0.6635608",
"0.65705246",
"0.65612024",
"0.6526133",
"0.64953303",
"0.6494386",
"0.64513487",
"0.6393307",
"0.63841826",
"0.6339852",
"0.63394666",
"0.63175666",
"0.6250877",
"0.62309754",
"0.62214327",
"0.6189551",
"0.6... | 0.74470586 | 0 |
Action for adding brand details | Действие для добавления деталей бренда | public function actionAddbrand() {
\Yii::$app->view->title = 'ACA Reporting Service | Add Brand';
$this->layout = 'main';
$session = \Yii::$app->session;
$admin_permissions = $session ['admin_permissions'];
if (\Yii::$app->SessionCheck->isLogged () == true && in_array("6", $admin_permissions)) // checking l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function add_brand() {\n\t\t$values=array(\"brand_name\"=>$_POST['brand_name'],\"description\"=>$_POST['description']);\n\t\tif($this->insert(\"brands\",$values)) {\n\t\t\t$result=$this->runQuery('getAll','select max(id) as id from brands');\n\t\t\techo json_encode($result);\n\t\t}\n\t\telse\n\t\t\techo 'Er... | [
"0.75530785",
"0.72494304",
"0.71864915",
"0.71663606",
"0.7099125",
"0.70506537",
"0.70309633",
"0.70078987",
"0.6997177",
"0.6965964",
"0.6939739",
"0.690739",
"0.68616706",
"0.68568295",
"0.68412524",
"0.67978287",
"0.6781842",
"0.67607415",
"0.6753518",
"0.6735256",
"0.66... | 0.7623539 | 0 |
Action for updating brand details | Действие для обновления деталей бренда | public function actionEditbrand() {
\Yii::$app->view->title = 'ACA Reporting Service | Edit Brand';
$this->layout = 'main';
$session = \Yii::$app->session;
$admin_permissions = $session ['admin_permissions'];
if (\Yii::$app->SessionCheck->isLogged () == true && in_array("6", $admin_permissions)) // checking... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function update_brand() {\n\t\t$values=array(\"brand_name\"=>$_POST['brand_name'],\"description\"=>$_POST['description']);\n\t\t$where =array(\"id\"=>$_POST['brand_id']);\n\t\tif($this->update(\"brands\",$values,$where)) {\t\t\t\n\t\t\techo true;\n\t\t}\n\t\telse\n\t\t\techo 'Error while updating';\n\t}",
... | [
"0.78443676",
"0.7588533",
"0.73884463",
"0.73884463",
"0.73884463",
"0.73884463",
"0.734464",
"0.73397815",
"0.7250031",
"0.7250031",
"0.7248286",
"0.70324576",
"0.69811016",
"0.6925662",
"0.68827695",
"0.68514496",
"0.6832055",
"0.6818557",
"0.67848754",
"0.6773939",
"0.673... | 0.77484417 | 1 |
Action for activate/deactive brand | Действие для активации/деактивации бренда | public function actionBrandactivate() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$post = \Yii::$app->request->post (); // getting values by post method
$id = $post ['id'];
$is_active = $post ['is_active'];
$transaction = \Yii::$app->db->beginTransaction (); /... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function admin_activate_vendor($is_active = null,$cat_id = null,$model_name = null){\n\t\t\n\t\t$this->layout = \"\";\n\t\t$this->autoRender = false;\n\t\t$cat_id = DECRYPT_DATA($cat_id);\n\t\tif(isset($is_active) && isset($cat_id) && isset($model_name)){\n\t\t\t\n\t\t\tif($is_active == 0){//Activate Status\n\t\t\... | [
"0.6455637",
"0.6339724",
"0.61912173",
"0.6053457",
"0.6053457",
"0.60379255",
"0.6013419",
"0.5902243",
"0.57814103",
"0.5774343",
"0.5738273",
"0.5713625",
"0.5713625",
"0.5674499",
"0.5653762",
"0.5653762",
"0.5653762",
"0.5633953",
"0.56049675",
"0.5602111",
"0.55805314"... | 0.7527038 | 0 |
TODO: Implement getIdentifier() method. | TODO: Реализовать метод getIdentifier(). | public function getIdentifier()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}"... | [
"0.88087046",
"0.88087046",
"0.88087046",
"0.88087046",
"0.88087046",
"0.8808155",
"0.8807852",
"0.8807852",
"0.8738553",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8564639",
"0.85609245",
"0.8468062... | 0.88241047 | 0 |
TODO: Implement setIsActive() method. | TODO: Реализовать метод setIsActive(). | public function setIsActive($isActive)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setActive() {}",
"public function setIsActive( bool $isActive ): void;",
"public function setIsActive($isActive);",
"public function setActive()\r\n {\r\n $this->active = true;\r\n }",
"abstract public function isActive();",
"public function getIsActive() {}",
"public funct... | [
"0.76345026",
"0.7428295",
"0.7342884",
"0.7253996",
"0.7046562",
"0.7044228",
"0.7021934",
"0.7021934",
"0.70210636",
"0.70210636",
"0.70210636",
"0.70210636",
"0.70120335",
"0.69556004",
"0.69556004",
"0.69556004",
"0.6950797",
"0.6950797",
"0.6950797",
"0.6950797",
"0.6930... | 0.76040566 | 1 |
TODO: Implement getBadge() method. | TODO: Реализовать метод getBadge(). | public function getBadge()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBadgeColor()\n {\n }",
"public function getBadgeValue()\n {\n return null;\n }",
"public function getBadges();",
"protected function get__badge()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn array(\n\t\t\t\t0\t=> 'ipsBadge ipsBadge_intermedi... | [
"0.7571664",
"0.7523396",
"0.73034054",
"0.71674955",
"0.6880115",
"0.6840274",
"0.6779408",
"0.67356974",
"0.66192234",
"0.6560849",
"0.65526426",
"0.65316695",
"0.65126675",
"0.6394138",
"0.63499147",
"0.6328559",
"0.63219804",
"0.62816846",
"0.6273145",
"0.62507",
"0.61912... | 0.90734214 | 0 |
TODO: Implement getBadgeColor() method. | TODO: Реализовать метод getBadgeColor(). | public function getBadgeColor()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBadge()\n {\n }",
"public function getStatusBadgeAttribute()\n {\n return '<span class=\"badge bg-'.self::COLOR_STATUS[$this->status].'\">'.self::LABEL_STATUS[$this->status].'</span>';\n }",
"public function get_badges() {\n\n\t\t\treturn array(\n\t\t\t\t'ecommerce' => arr... | [
"0.79129064",
"0.68859124",
"0.68401283",
"0.6825275",
"0.6744115",
"0.67004526",
"0.6519269",
"0.64169157",
"0.6401047",
"0.6200286",
"0.61288583",
"0.6125126",
"0.610738",
"0.60991293",
"0.60991293",
"0.60946834",
"0.6077865",
"0.6060547",
"0.60602546",
"0.60602546",
"0.601... | 0.9142314 | 0 |
TODO: Implement getActiveChild() method. | TODO: Реализовать метод getActiveChild(). | public function getActiveChild()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHasActiveChild(): bool\n {\n return $this->hasActiveChild;\n }",
"public function isCurrentChild(): bool;",
"public function getChild()\n {\n return $this->child;\n }",
"public function getPChild()\n {\n return $this->p_child;\n }",
"abs... | [
"0.6824239",
"0.66014844",
"0.64871466",
"0.62693363",
"0.626693",
"0.61808395",
"0.61733156",
"0.60367775",
"0.60287714",
"0.59760743",
"0.5906084",
"0.5886106",
"0.5780376",
"0.57338274",
"0.5637966",
"0.5634235",
"0.5627947",
"0.56251514",
"0.560544",
"0.56040114",
"0.5587... | 0.91418356 | 0 |
Mutator sets email to lowercase | Мутатор приводит email к нижнему регистру | public function setEmailAttribute($value) {
$this->attributes['email'] = strtolower($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setEmailAttribute($value)\n {\n $this->attributes['email'] = strtolower($value);\n }",
"public function setEmailAttribute($email)\n {\n $this->attributes['email'] = strtolower($email);\n }",
"public function setEmailAttribute($email)\n {\n $this->attributes['... | [
"0.7435799",
"0.742241",
"0.73625624",
"0.72930616",
"0.6711926",
"0.66656196",
"0.66567874",
"0.60853136",
"0.6013444",
"0.5986682",
"0.59845674",
"0.59580195",
"0.59559524",
"0.594032",
"0.59237707",
"0.59211034",
"0.5914871",
"0.5914871",
"0.5914871",
"0.5913886",
"0.59103... | 0.7638533 | 0 |
Return a list of "blacklisted" credentials for attestation. | Верните список "заблокированных" учетных данных для аттестации. | public function attestationExcludedCredentials(): array; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function blacklists()\n {\n return $this->morphMany(JwtBlacklist::class, 'authenticable');\n }",
"public function getBlacklist()\n {\n return $this->blacklist;\n }",
"public function getBlacklist()\n {\n return $this->blacklist;\n }",
"public function getBlacklist()\n ... | [
"0.6589323",
"0.6463986",
"0.6436926",
"0.6436926",
"0.60913545",
"0.60621804",
"0.6048326",
"0.6003649",
"0.59934455",
"0.5990769",
"0.59893215",
"0.59109175",
"0.5902204",
"0.5834876",
"0.5828637",
"0.5766147",
"0.57602733",
"0.572708",
"0.5723637",
"0.5716514",
"0.5692593"... | 0.7236881 | 0 |
Removes a credential previously registered. | Удаляет ранее зарегистрированные учетные данные. | public function removeCredential($id): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function eraseCredentials() {}",
"public function eraseCredentials()\n {}",
"public function eraseCredentials()\r\n {}",
"public function eraseCredentials() {\n }",
"public function eraseCredentials() {\n }",
"public function eraseCredentials() {\n }",
"public function eraseCreden... | [
"0.70132595",
"0.6885312",
"0.68665123",
"0.68057185",
"0.68057185",
"0.68057185",
"0.6775754",
"0.6723202",
"0.66925675",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
... | 0.71632284 | 0 |
Checks if a given credential exists and is enabled. | Проверяет, существует ли заданный учетные данные и включены ли они. | public function hasCredentialEnabled(string $id): bool; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasCredential($credential, $useAnd = true)\r\n {\r\n if (empty($credential))\r\n {\r\n return true;\r\n }\r\n\r\n if (!$this->getGuardUser())\r\n {\r\n return false;\r\n }\r\n\r\n if ($this->getGuardUser()->getIsSuperAdmin())\r\n {\r\n return true;\r\n }\r... | [
"0.6538329",
"0.64425474",
"0.644016",
"0.63510704",
"0.63463235",
"0.603827",
"0.59915596",
"0.5912804",
"0.5869477",
"0.5808228",
"0.5798281",
"0.5798281",
"0.57705164",
"0.5752862",
"0.5729313",
"0.5693539",
"0.5671267",
"0.5668858",
"0.5667361",
"0.5664522",
"0.56084627",... | 0.717114 | 0 |
Enable the credential for authentication. | Включите учетные данные для аутентификации. | public function enableCredential($id): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAuthentication($credential);",
"public function enableTwoFactorAuth(): void\n {\n $this->twoFactorAuth->enabled_at = now();\n\n if (config('laraguard.recovery.enabled')) {\n $this->generateRecoveryCodes();\n }\n\n $this->twoFactorAuth->save();\n\n ... | [
"0.67225397",
"0.6499089",
"0.64015675",
"0.6358603",
"0.6238371",
"0.6220098",
"0.62019885",
"0.62019885",
"0.6193641",
"0.6193102",
"0.6183729",
"0.6096849",
"0.60886204",
"0.6077901",
"0.60628366",
"0.6029517",
"0.5980067",
"0.5910295",
"0.5907464",
"0.5867643",
"0.5800461... | 0.70088816 | 0 |
Disable the credential for authentication. | Отключить учетные данные для аутентификации. | public function disableCredential($id): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function disableTwoFactorAuth(): void\n {\n $this->twoFactorAuth->flushAuth()->delete();\n\n event(new Events\\TwoFactorDisabled($this));\n }",
"public function eraseCredentials()\n {\n $this->plainPasword = null;\n }",
"public function disableAllCredentials($except = null)... | [
"0.710554",
"0.68567115",
"0.68101025",
"0.67965436",
"0.6655941",
"0.66355264",
"0.66355264",
"0.66355264",
"0.6625967",
"0.6602859",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.6564896",
"0... | 0.7377107 | 0 |
Disables all credentials for the user. | Отключает все учетные данные для пользователя. | public function disableAllCredentials($except = null): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function eraseCredentials()\n {\n // does nothing; nothing sensitive is stored, even temporary\n }",
"public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }",
"public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }",
"pub... | [
"0.70127445",
"0.6964348",
"0.6964348",
"0.6964348",
"0.69349086",
"0.6931882",
"0.688945",
"0.688945",
"0.6881182",
"0.6861995",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"... | 0.7320857 | 0 |
Returns all credentials descriptors of the user. | Возвращает все описания учетных данных пользователя. | public function allCredentialDescriptors(): array; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCredentials()\n {\n return $this->hasMany(Credential::className(), ['id' => 'credential_id'])\n ->viaTable('{{%content_providers_credentials}}', ['content_provider_id' => 'id']);\n }",
"public function getCredentials() {\r\n\t\t\r\n\t\treturn $this->_credentials;\r\n\t\... | [
"0.66652566",
"0.62546265",
"0.6241867",
"0.6180518",
"0.61682355",
"0.61492544",
"0.6113596",
"0.6103205",
"0.6066928",
"0.6047795",
"0.6044413",
"0.6034386",
"0.60199994",
"0.60139894",
"0.60139894",
"0.5990609",
"0.5980225",
"0.5883333",
"0.58337873",
"0.5817381",
"0.58013... | 0.80232084 | 0 |
Returns an WebAuthnAuthenticatable user from a given Credential ID. | Возвращает пользователя WebAuthnAuthenticatable по заданному идентификатору учетной записи. | public static function getFromCredentialId(string $id): ?WebAuthnAuthenticatable; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function retrieveWebAuthnCredential($id)\n {\n return $this->start()->uri(\"/api/webauthn\")\n ->urlSegment($id)\n ->get()\n ->go();\n }",
"public static function getFromCredentialUserHandle(string $handle): ?WebAuthnAuthenticatable;",
"public function retrieveByCredentials(arr... | [
"0.7048084",
"0.6344268",
"0.6289598",
"0.6253331",
"0.59592336",
"0.5884417",
"0.5797165",
"0.5783987",
"0.5779717",
"0.5720149",
"0.569542",
"0.56669164",
"0.5662899",
"0.5636796",
"0.55985653",
"0.5596667",
"0.55923116",
"0.5589121",
"0.5589121",
"0.55790937",
"0.5563892",... | 0.71086943 | 0 |
Returns a WebAuthAuthenticatable user from a given User Handle. | Возвращает пользователя WebAuthAuthenticatable по заданному пользовательскому обращению. | public static function getFromCredentialUserHandle(string $handle): ?WebAuthnAuthenticatable; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getUser(): LightWebsiteUser\n {\n /**\n * @var $um LightUserManagerService\n */\n $um = $this->getContainer()->get(\"user_manager\");\n return $um->getUser();\n }",
"function authenticate($user, $username, $password) {\n $user = $this->check_remote... | [
"0.6403517",
"0.63244134",
"0.62264055",
"0.62149656",
"0.61722314",
"0.6092895",
"0.608032",
"0.60663587",
"0.6037853",
"0.60039127",
"0.60034364",
"0.59950453",
"0.5990931",
"0.59784555",
"0.5975006",
"0.59730726",
"0.5954003",
"0.59531105",
"0.59379995",
"0.59311277",
"0.5... | 0.76987237 | 0 |