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
reads the soap serv config file not the listeners config file. Gets the location of the listeners and the list of soap services
читает конфиг-файл soap serv, а не конфиг-файл слушателей. Получает расположение слушателей и список soap-сервисов
function get_listener_config_data() { $config_file = file_get_contents('config.xml'); $config_xml = new SimpleXMLElement($config_file); $location = $config_xml->path; if (empty($location)) { //try using a default $location = '/opt/php_listeners'; } $services = $config_xml->services->service; retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IslandoraService() { \n $this->config_data = get_listener_config_data();\n $this->location = $this->config_data['location']; \n $config_file = file_get_contents($this->location . '/config.xml'); \n try{\n $this->config = simplexml_load_string($config_file);\n } catch (Excep...
[ "0.5992297", "0.5894316", "0.55849224", "0.5482306", "0.54278105", "0.5367679", "0.53556347", "0.53456813", "0.5342722", "0.52539426", "0.52282053", "0.51649445", "0.5138613", "0.5136318", "0.5130687", "0.50979155", "0.5081746", "0.5053858", "0.5051795", "0.5029088", "0.50228...
0.726986
0
Sets up the connection to the fedora repository
Устанавливает соединение с репозиторием fedora
function connect() { $fedora_user = new stdClass(); $fedora_user->name = $this->config->fedora->username; $fedora_user->pass = $this->config->fedora->password; $this->fedora_connect = new FedoraConnection($fedora_user, $this->config->fedora->protocol . '://' . $this->config->fedora->host . ':' . $this->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp() {\n\n $connection = new \\Redis();\n $connection->connect('127.0.0.1', 6379);\n $connection->select(11);\n $adapter = new Rstore\\ConnectionAdapter\\Phpredis($connection);\n\n $this->connection = $connection;\n $this->repo = new Repository(\n ...
[ "0.5621009", "0.5601396", "0.55837023", "0.5571824", "0.5536329", "0.55357194", "0.54642504", "0.5448436", "0.5414575", "0.5400865", "0.53958315", "0.5370374", "0.53680515", "0.53651685", "0.5350628", "0.53321904", "0.53308535", "0.53219604", "0.5299964", "0.52930635", "0.528...
0.7714072
0
This function finds the snow id with the snow code
Эта функция находит идентификатор снега с кодом снега
function getSnowId($code){ $getUserTypeQuery = "SELECT id From snows WHERE code='".$code."'"; require_once 'model/dbConnector.php'; $queryResult = executeQuerySelect($getUserTypeQuery); return $queryResult[0]['id']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findID($d) {\n\t\t$url = \"https://inpho.cogs.indiana.edu/thinker.json\";\n\t\t$data = @file_get_contents($url,o,null,null);\n\t\t$json = json_decode($data);\n\t\t$results = $json->responseData->results;\n\t\tforeach($results as $value) {\n\t\t\tif (strcasecmp($value->label,$d)==0) { \n\t\t\t\t$id = $valu...
[ "0.63657147", "0.6177107", "0.58232033", "0.58007807", "0.57927895", "0.573154", "0.5675064", "0.56492907", "0.5636287", "0.55926216", "0.55818355", "0.5530167", "0.5524259", "0.5499388", "0.54962623", "0.5493069", "0.54800016", "0.5473611", "0.5455086", "0.5440342", "0.54403...
0.7268875
0
test preparation of data for empty values
подготовка данных для пустых значений
public function testCopyPrepareDataEmpties() { $this->assertEquals( $this->Article->copyPrepareData(array()), array() ); $this->assertEquals( $this->Article->copyPrepareData(null), array() ); $this->assertEquals( $this->Article->copyPrepareData(false), array() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stdWrap_ifEmptyDeterminesEmptyValuesDataProvider() {}", "public function testSetEmptyData()\n {\n $this->document->setEmptyData();\n\n $expected = <<<EOL\n {\n \"data\" : []\n }\nEOL;\n $this->check($expected);\n }", "abstract public function ...
[ "0.6727834", "0.65995055", "0.64601374", "0.64103556", "0.6337367", "0.62609416", "0.62501436", "0.6224237", "0.6215562", "0.6084425", "0.60659546", "0.60533744", "0.60232353", "0.5995957", "0.5876387", "0.5861217", "0.5843597", "0.58341616", "0.578759", "0.57815003", "0.5774...
0.7135188
0
test copy on fixture Article1
test copy на fixture Article1
public function testCopy1() { $initialCounts = array( 'Article' => $this->Article->find('count'), 'User' => $this->Article->User->find('count'), 'Featured' => $this->Article->Featured->find('count'), 'Comment' => $this->Article->Comment->find('count'), 'Tag' => $this->Article->Tag->find('count'), ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCopy2() {\n\t\t$initialCounts = array(\n\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t'User' => $this->Article->User->find('count'),\n\t\t\t'Featured' => $this->Article->Featured->find('count'),\n\t\t\t'Comment' => $this->Article->Comment->find('count'),\n\t\t\t'Tag' => $this->Articl...
[ "0.7488092", "0.74649763", "0.7424462", "0.7237116", "0.7174169", "0.68186146", "0.6648159", "0.5915793", "0.5911748", "0.588351", "0.5869303", "0.5725212", "0.5721222", "0.5717875", "0.5715972", "0.56216025", "0.5583707", "0.5543757", "0.5533995", "0.55053824", "0.55052525",...
0.7604872
0
test copy on fixture Article2
тест копирования на фикстуру Article2
public function testCopy2() { $initialCounts = array( 'Article' => $this->Article->find('count'), 'User' => $this->Article->User->find('count'), 'Featured' => $this->Article->Featured->find('count'), 'Comment' => $this->Article->Comment->find('count'), 'Tag' => $this->Article->Tag->find('count'), ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCopyFindData() {\n\t\t$this->assertEquals(\n\t\t\t$this->Article->copyFindData(1),\n\t\t\t$this->expectedFromFixtures[0]\n\t\t);\n\t}", "public function testCopy1() {\n\t\t$initialCounts = array(\n\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t'User' => $this->Article->User->find('c...
[ "0.7389393", "0.73755574", "0.72835815", "0.71231437", "0.70570964", "0.6766371", "0.6547261", "0.58367443", "0.5819692", "0.5781461", "0.5774522", "0.5640452", "0.5633137", "0.5627331", "0.56246525", "0.55584735", "0.55425805", "0.5486102", "0.54831076", "0.5456526", "0.5455...
0.7594901
0
test copy on fixture Article3
тест копирования на фикстуру Article3
public function testCopy3() { $initialCounts = array( 'Article' => $this->Article->find('count'), 'User' => $this->Article->User->find('count'), 'Featured' => $this->Article->Featured->find('count'), 'Comment' => $this->Article->Comment->find('count'), 'Tag' => $this->Article->Tag->find('count'), ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCopyFindData() {\n\t\t$this->assertEquals(\n\t\t\t$this->Article->copyFindData(1),\n\t\t\t$this->expectedFromFixtures[0]\n\t\t);\n\t}", "public function testCopy1() {\n\t\t$initialCounts = array(\n\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t'User' => $this->Article->User->find('c...
[ "0.73687994", "0.72565126", "0.72072726", "0.7184059", "0.71356136", "0.6550596", "0.649621", "0.5953306", "0.5945408", "0.5931184", "0.5865924", "0.58236563", "0.5816622", "0.5815398", "0.57637817", "0.5664685", "0.5642018", "0.55607677", "0.55345607", "0.55343264", "0.54977...
0.7643349
0
test copy on fixture Article1 with inject data to overwrite after prep.
тест копирования на фикстуру Article1 с вставкой данных для перезаписи после подготовки.
public function testCopyWithInjectionData() { $initialCounts = array( 'Article' => $this->Article->find('count'), 'User' => $this->Article->User->find('count'), 'Featured' => $this->Article->Featured->find('count'), 'Comment' => $this->Article->Comment->find('count'), 'Tag' => $this->Article->Tag->find...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCopy1() {\n\t\t$initialCounts = array(\n\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t'User' => $this->Article->User->find('count'),\n\t\t\t'Featured' => $this->Article->Featured->find('count'),\n\t\t\t'Comment' => $this->Article->Comment->find('count'),\n\t\t\t'Tag' => $this->Articl...
[ "0.731894", "0.7237588", "0.72327346", "0.71472204", "0.7109629", "0.6540737", "0.62214464", "0.60960394", "0.5796203", "0.57861286", "0.5766648", "0.5766092", "0.5717578", "0.5695552", "0.56586224", "0.5654588", "0.5651942", "0.549845", "0.54883534", "0.5466568", "0.545417",...
0.7775594
0
Do actions in admin (general)
Выполняйте действия в админ-панели (общие)
public function admin_action() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function admin_page_action() {\n\n\t\tif ( $this->is_admin_request_for_users_forget() ) {\n\t\t\t$this->users_forget();\n\t\t}\n\n\t\tif ( $this->is_admin_request_for_users_send_email() ) {\n\t\t\t$this->users_send_email();\n\t\t}\n\n\t\tif ( $this->is_admin_request_for_users_remove() ) {\n\t\t\t$this->u...
[ "0.7486889", "0.74639404", "0.74639404", "0.74639404", "0.7403594", "0.7384273", "0.7312174", "0.72075444", "0.7111299", "0.70919883", "0.7080682", "0.7080682", "0.70685196", "0.7060694", "0.7055712", "0.7054082", "0.7036679", "0.7033978", "0.6991749", "0.6977186", "0.6931085...
0.8185939
1
Do actions on current admin page
Выполнять действия на текущей странице администратора
protected function admin_page_action() { if ( $this->is_admin_request_for_users_forget() ) { $this->users_forget(); } if ( $this->is_admin_request_for_users_send_email() ) { $this->users_send_email(); } if ( $this->is_admin_request_for_users_remove() ) { $this->users_remove_from_list(); } /* ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_action() {\n\t}", "public function admin_action() {\n\t}", "public function admin_page()\n {\n }", "public function admin_page()\n {\n }", "public function admin_page()\n {\n echo $this->return_admin_page();\n }", "function admin()\n{\n gl...
[ "0.7926917", "0.7926917", "0.7726415", "0.7726415", "0.75909704", "0.7350135", "0.73453164", "0.7267171", "0.7241369", "0.7193779", "0.71916485", "0.71876395", "0.7171077", "0.7147655", "0.7136436", "0.7100959", "0.7098184", "0.70682746", "0.7062668", "0.7031725", "0.7013843"...
0.8042913
0
Update options for legacy structure
Обновление параметров для устаревшей структуры
public function legacy_update() { /* Request data was moved from controller option to requests option in v1.1 */ // get legacy requests data $legacy_requests = $this->get_option( 'requests', array() ); // something to update if ( $legacy_requests && is_array( $legacy_requests ) ) { // new requests stru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateOptions()\r\n {\r\n if ($_SERVER['REQUEST_METHOD'] !== 'POST')\r\n return;\r\n\r\n update_option('ohs_newsletter_sendgrid_api', $_POST['ohs_newsletter_sendgrid_api']);\r\n update_option('ohs_newsletter_sendgrid_list', $_POST['ohs_newsletter_sendgrid_list']);...
[ "0.68978524", "0.68635905", "0.6691343", "0.6675348", "0.6663317", "0.6609386", "0.6582127", "0.65119", "0.65049523", "0.6502211", "0.643481", "0.6413635", "0.64121443", "0.6408836", "0.6392399", "0.6253419", "0.62283903", "0.6214556", "0.6213354", "0.6210913", "0.62062806", ...
0.7214786
0
Indique si ce nom de fichier est un fichier de description
Укажите, является ли этот файл именем файла описания
public static function est_fichier_description($nom) { return substr($nom, -strlen('.bigup.json')) == '.bigup.json'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasFileDescription()\n {\n return $this->file_description !== null;\n }", "public function hasFileName(){\n return $this->_has(3);\n }", "public function hasFileName() {\n return $this->_has(2);\n }", "public static function ecrire_description_fichier($chemin, $de...
[ "0.7414546", "0.659131", "0.6568115", "0.6428953", "0.64202887", "0.63629323", "0.6277681", "0.62150294", "0.6159206", "0.6155827", "0.6110255", "0.6109654", "0.6107383", "0.60845995", "0.60788864", "0.60788864", "0.60056955", "0.599629", "0.59542656", "0.5934283", "0.5871045...
0.77840835
0
Transform a value into a new value.
Преобразуйте значение в новое значение.
public function transform($value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transform($value)\n {\n return $value;\n }", "public abstract function makeValue($value);", "public function reverseTransform($value)\n {\n return $value;\n }", "public function applyValue($value);", "public function resolveTransformedValue($value)\n {\n ...
[ "0.76919055", "0.71436626", "0.7032699", "0.68936855", "0.68236136", "0.66617703", "0.65414864", "0.6372796", "0.62883735", "0.6284587", "0.62570184", "0.6251964", "0.6237856", "0.6204011", "0.6111922", "0.6107107", "0.60954946", "0.6095296", "0.605177", "0.6002355", "0.59425...
0.8038884
0
Sorts the instance with the given comparator or the PHP ksort() funktion.
Сортирует экземпляр с использованием заданного компаратора или функции PHP ksort().
protected function sort() { // if no comparator is passed sort the internal array // by its keys, else use the comparator if ($this->comparator == null) { return ksort($this->items); } else { return CollectionUtils::sort($this, $this->comparator); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sort(callable $comparator = null);", "public function usort($comparator) {\n uasort($this->_hash, array($comparator, 'compare'));\n }", "public function comparator();", "public function sortStrategy();", "abstract protected function setUpComparator();", "public function sort($call...
[ "0.74544084", "0.677944", "0.64906245", "0.6238799", "0.61312497", "0.60998285", "0.60936975", "0.6085205", "0.60024697", "0.5918563", "0.5868349", "0.58029675", "0.5782805", "0.5737489", "0.57366985", "0.5723376", "0.57149905", "0.5698046", "0.56963724", "0.56430876", "0.562...
0.70246184
1
This method Returns a new TreeMap initialized with the passed array.
Этот метод возвращает новый TreeMap, инициализированный переданным массивом.
public static function fromArray($array) { // check if the passed object is an array and set it if (is_array($array)) { return new TreeMap($this->comparator, $array); } // throw an exception if the passed object is not an array throw ClassCastException('Passed obj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ConversToObject($array){\r\n\t\t\t$td = new TuyenDi();\r\n\t\t\t$td->MaChuyen = $array[\"MaChuyen\"];\r\n\t\t\t$td->TenTuyen = $array[\"TenTuyen\"];\t\t\t\r\n\t\t\t$td->GioDi = $array[\"GioDi\"];\r\n\t\t\t$td->LoaiXe = $array[\"LoaiXe\"];\r\n\t\t\t$td->SoGhe = $array[\"SoGhe\"];\r\n\t\t\t$td->GiaVe = $arr...
[ "0.57344115", "0.5599776", "0.5565655", "0.53689283", "0.5339808", "0.5173007", "0.5151045", "0.51465106", "0.5140942", "0.5130003", "0.5128311", "0.51256335", "0.51170504", "0.50997406", "0.50540257", "0.5026104", "0.50108314", "0.50108314", "0.50008065", "0.49914068", "0.49...
0.74881804
0
This method returns the comparator passed with the constructor.
Этот метод возвращает компаратор, переданный в конструктор.
public function comparator() { return $this->comparator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getComparator()\n {\n return $this->comparator;\n }", "public function comparator();", "public function getCmp()\n {\n return $this->cmp;\n }", "public function getComparatorFor($expected, $actual);", "public static function callback()\n\t{\n\t return new Invoka...
[ "0.73907256", "0.72358835", "0.6369107", "0.60180527", "0.60024786", "0.5669116", "0.5622229", "0.5519566", "0.55067605", "0.54807746", "0.5367999", "0.5366918", "0.5302451", "0.5294692", "0.5263487", "0.5236973", "0.516078", "0.50414115", "0.50383973", "0.50260854", "0.50240...
0.77266926
0
function for getting breed
функция для получения породы
function getBreed($id){ $crud = new CRUD(); $crud->connect(); $crud->sql("select * from pigs_tbl where pig_id='{$id}'"); $r = $crud->getResult(); foreach($r as $rs){ return $rs['breed']; } $crud->disconnect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBreed($br_id)\r\n\t\t{\r\n\t\t\t\t$link = $this->connect();\r\n\t\t\t\t$query = \"SELECT breed_id,breed_name\r\n\t\t\t\t\t\tFROM pig_breeds \r\n\t\t\t\t\t\twhere breed_id = '\".$br_id.\"'\";\r\n\t\t\t\t$result = mysqli_query($link, $query) or die(mysqli_error($link));\r\n\t\t\t\t$breed = array()...
[ "0.73124474", "0.7265752", "0.6927521", "0.682067", "0.66108483", "0.6586534", "0.6554759", "0.58211887", "0.581475", "0.5766591", "0.57521087", "0.573814", "0.5723436", "0.5714515", "0.5712818", "0.5646485", "0.56441396", "0.5618611", "0.5615069", "0.5611813", "0.5597474", ...
0.78360516
0
function TO GET THE ID OF PIG
функция для получения ID свиньи
function getPigID($id){ $crud = new CRUD(); $crud->connect(); $crud->sql("select * from pigs_tbl where pig_id='{$id}'"); $r = $crud->getResult(); foreach($r as $rs){ return $rs['pig_id']; } $crud->disconnect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPId();", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n ...
[ "0.7117901", "0.6996781", "0.6957659", "0.6863566", "0.68566597", "0.6730368", "0.6710833", "0.667156", "0.6670742", "0.6645418", "0.66373956", "0.66373956", "0.66277885", "0.66277885", "0.66277885", "0.6518915", "0.65174544", "0.65096563", "0.6506898", "0.6498894", "0.649102...
0.74589133
0
this is to find the maximum number among the batch number
это для нахождения максимального числа среди номеров партии
function getMaxBatch(){ $crud = new CRUD(); $crud->connect(); $crud->sql("SELECT MAX(batch_no) from breeding_tbl"); $r = $crud->getResult(); foreach($r as $rs){ return $rs['MAX(batch_no)']; } $crud->disconnect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastBatchNumber()\n {\n global $wpdb;\n\n $max = $wpdb->get_results(\n \"SELECT MAX(`batch`) as max FROM {$wpdb->prefix}exolnet_migration as em\",\n 'ARRAY_A'\n );\n\n return absint($max[0]['max']) ?? 0;\n }", "public function getMaxNumbe...
[ "0.73679274", "0.71389556", "0.70501614", "0.6962275", "0.6829131", "0.6803963", "0.6694386", "0.6682911", "0.6640332", "0.6611159", "0.65868235", "0.65868235", "0.6570471", "0.6507647", "0.6471011", "0.6470322", "0.6440547", "0.6422641", "0.63864946", "0.6385789", "0.6382931...
0.76522136
0
Get a list of readonly properties, so that __set magic accessor could throw an exception if a property is readonly
Получить список свойств только для чтения, чтобы магический метод __set мог выбросить исключение, если свойство является только для чтения
protected function _getReadonlyProperties() { return array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReadOnlyFields();", "public function getProperties() {\n $modifiable_properties = [];\n $fields = $this->getFields();\n foreach (Framework::instance()->entityProperties($this->getEntity()) as $property => $info) {\n if (!in_array($property, array_keys($fields)) && $this->filter($...
[ "0.72041833", "0.7175304", "0.6345248", "0.62817764", "0.62761015", "0.6251292", "0.6242607", "0.6162329", "0.614344", "0.61332357", "0.61320484", "0.6095716", "0.6085419", "0.6044297", "0.60346293", "0.60303825", "0.6025138", "0.6021359", "0.6013129", "0.60040426", "0.597516...
0.8139082
0
Path where a word list for a given locale lives.
Путь, по которому находится список слов для заданного языка.
protected function getWordListPath(): string { return __DIR__ . "/../data/{$this->locale}.txt"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBooksPath($locale);", "function getWhatsNewArticlesPath($locale);", "function getReleasesPath($locale);", "function sti_get_localization_directory()\r\n\t{\r\n\t\treturn \"localization\";\r\n\t}", "function sti_get_localization_directory()\n\t{\n\t\treturn \"localization\";\n\t}", "protected ...
[ "0.6922755", "0.6762844", "0.67006016", "0.6591839", "0.6556236", "0.65126604", "0.64544886", "0.62423617", "0.61989456", "0.61464024", "0.60720664", "0.60499775", "0.6026974", "0.5955511", "0.59446484", "0.5919494", "0.59168524", "0.5909257", "0.5904541", "0.5897232", "0.582...
0.8324939
0
Retrieve the word list from disk.
Получить список слов с диска.
protected function getWordListFromDisk(): string { return file_get_contents($this->getWordListPath()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getWordList(): array\n {\n return explode(\"\\n\", trim($this->getWordListFromDisk()));\n }", "public function WordCollection()\n {\n $myWords = parent::WordCollection();\n\n if(!$myWords->loadedFromFile())\n {\n // English Words\n $myWords->addText(\"en-us\", ...
[ "0.69176173", "0.66145486", "0.65375847", "0.63882345", "0.63167757", "0.6135977", "0.5889868", "0.5860068", "0.5858281", "0.5843811", "0.58419174", "0.5788018", "0.571278", "0.5690639", "0.56740594", "0.56730014", "0.5651706", "0.55365473", "0.5531475", "0.55249983", "0.5488...
0.83318174
0
Show the form for creating a new Uom.
Показать форму для создания нового Uom.
public function create() { return view('uoms.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n //\n return View::make('admin.form_int_mun');\n }", "public function create()\n {\n //\n return view('admin.lunbotu.create');\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function creat...
[ "0.7486583", "0.7328785", "0.7307161", "0.7306137", "0.7305139", "0.7277005", "0.72725666", "0.7254481", "0.7237555", "0.72364783", "0.7232689", "0.72312933", "0.7226471", "0.7219735", "0.7215726", "0.7215726", "0.7200558", "0.7192736", "0.7186334", "0.7184103", "0.71835434",...
0.78876215
0
User list page function, displays a list of all registered users on the website
Функция страницы списка пользователей, отображает список всех зарегистрированных пользователей на сайте
public function userList() { /** @var User[] $users */ $users = $this->entityManager->getRepository("Entity\\User")->findAll(); // Retrieve all User objects registered in database echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}", "public function userlist()\n\t{\n\t\t$data['page']='Userl...
[ "0.82374775", "0.81811094", "0.8169369", "0.8139594", "0.8113109", "0.8097507", "0.8094495", "0.8008773", "0.7997303", "0.79674405", "0.79447997", "0.7912159", "0.78353816", "0.7813688", "0.7807168", "0.7768849", "0.77245307", "0.7711625", "0.7659861", "0.7649208", "0.7648848...
0.8338395
0
Applies one or more text styles to the output. Valid styles are 'bold', 'italic', 'underline', 'strike', and null (to reset the styles).
Применяет один или несколько стилей текста к выводу. Допустимые стили: 'bold', 'italic', 'underline', 'strike' и null (для сброса стилей).
public function stylize (string ...$styles) : Output { $Output = &$this->Output; $codes = []; if ( empty($styles) ) { $styles = [null]; } foreach ($styles as $style) { $codes[] = match ($style) { 'bold' => self::_BOLD_STYLE, 'italic' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function do_text_text_style($showLearning, $mode_trans, $textsize, $ann_exists): void\n{\n $displaystattrans = (int)getSettingWithDefault('set-display-text-frame-term-translation');\n $pseudo_element = ($mode_trans<3) ? 'after' : 'before';\n $data_trans = $ann_exists ? 'data_ann' : 'data_trans';\n $sta...
[ "0.61601704", "0.61560905", "0.6113723", "0.6086507", "0.5918613", "0.58628136", "0.5840936", "0.5811188", "0.5749304", "0.57180846", "0.56483656", "0.55993533", "0.55909353", "0.55675346", "0.5551399", "0.55283445", "0.5432544", "0.53658706", "0.5360427", "0.5344593", "0.532...
0.7178893
0
SELECT FROM CCA WHERE featured ='1'
SELECT FROM CCA WHERE featured ='1'
public function get_featured_cca_list() { $this->db->from('cca'); $this->db->where('featured','1'); $query = $this->db->get(); return $query->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_featured_products()\n\t{\n\t\t$this->db->select('product.*, category.category_name, brand.brand_name')->from('product, category, brand')->where(\"product.product_status = 1 AND product.category_id = category.category_id AND product.brand_id = brand.brand_id AND product.featured = 1 AND product....
[ "0.6166313", "0.60886997", "0.6069739", "0.59516597", "0.593999", "0.59057987", "0.57637095", "0.57562125", "0.5681371", "0.5654479", "0.5650602", "0.56500375", "0.5624769", "0.561986", "0.557438", "0.5572703", "0.5545052", "0.5535902", "0.55215394", "0.55013186", "0.5474342"...
0.71273214
0
Enhance this object by wrapping it in an extender object.
Улучшите этот объект, обернув его в объект-расширитель.
public function extend($extender_name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function extend()\n\t{\n\t\t$extensions = func_get_args();\n\n\t\tforeach ( $extensions as $extension )\n\t\t{\n\t\t\tif ( $extension instanceof self )\n\t\t\t\t$this->data = array_merge_recursive( $this->data, $extension->data );\n\t\t\telse\n\t\t\t\t$this->data = array_merge_recursive( $this->data, _A($ex...
[ "0.6708897", "0.633996", "0.6223745", "0.597959", "0.5937366", "0.57418674", "0.56937104", "0.5652944", "0.56441414", "0.5619508", "0.561725", "0.55715454", "0.5482291", "0.54800904", "0.54714656", "0.5434461", "0.5406895", "0.5332271", "0.53035057", "0.5200498", "0.5186161",...
0.7288679
0
Checks if a key is exists in the store. Magic method: called when asking isset() on a key.
Проверяет, существует ли ключ в хранилище. Магический метод: вызывается при запросе isset() для ключа.
public function __isset($key) { return (array_key_exists($key, $this->_store)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exist($key);", "public static function exist($key) ;", "public function has($key) : bool;", "public function hasValueForKey($key) {\n\t\treturn array_key_exists($key, $this->store);\n\t}", "public function isset($key): bool;", "public function exists($key);", "public function exists($ke...
[ "0.80526525", "0.794354", "0.791346", "0.7909075", "0.7886536", "0.78786284", "0.7871578", "0.7800489", "0.7787481", "0.7784834", "0.7769935", "0.7759327", "0.7759327", "0.7759327", "0.7759327", "0.7759327", "0.7759327", "0.7759327", "0.7759327", "0.7759327", "0.7759327", "...
0.805725
0
Creates a new BugReport model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый объект модели BugReport. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new BugReport(); $uploadForm = new UploadForm(); $model->reporter_id = Yii::$app->user->id; $model->status = '1'; if ($model->load(Yii::$app->request->post()) && $model->save()) { Yii::$app->session->setFlash('success', '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new QuestionReported();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ...
[ "0.73946154", "0.7058551", "0.6842847", "0.66859794", "0.66469496", "0.65679896", "0.6557802", "0.65491813", "0.654231", "0.6530833", "0.65050274", "0.64974046", "0.64725286", "0.6394386", "0.63594764", "0.63456786", "0.6344738", "0.631504", "0.63115364", "0.63036555", "0.629...
0.83399117
0
Updates an existing BugReport model. If update is successful, the browser will be redirected to the 'view' page.
Обновляет существующую модель BugReport. Если обновление успешно, браузер будет перенаправлен на страницу 'view'.
public function actionUpdate($id) { $model = $this->findModel($id); $bug_report = $this->findModel($id); $uploadForm = new UploadForm(); if (Yii::$app->request->isPost && $uploadForm->validate()) { $uploadForm->files = UploadedFile::getInstances($uploadForm, 'fil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate($id)\n\t{\n\t $model=$this->loadModel('ReportFinancial',$id);\n\t\n\t // Uncomment the following line if AJAX validation is needed\n\t // $this->performAjaxValidation($model);\n\t\n\t if(isset($_POST['ReportFinancial']))\n\t {\n\t $model->attributes=$_POST['Report...
[ "0.6617921", "0.6515263", "0.64337975", "0.6311418", "0.6290112", "0.6205369", "0.6197445", "0.61800593", "0.615928", "0.6155176", "0.613179", "0.61228496", "0.61156154", "0.61069065", "0.6106174", "0.6081668", "0.606253", "0.60460377", "0.60413337", "0.60381097", "0.60375994...
0.7187363
0
Finds the BugReport model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
Находит модель BugReport по значению первичного ключа. Если модель не найдена, будет выброшено исключение HTTP 404.
protected function findModel($id) { if (($model = BugReport::findOne($id)) !== null) { return $model; } throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findModel($id)\n {\n$model = Reports::findOne($id);\n\t\tif ((isset(Yii::$app->params['ADMIN_CLIENT_ID']) and Yii::$app->user->identity->clientID == Yii::$app->params['ADMIN_CLIENT_ID']))\n\t\t{\n return $model;\n }\n\t\telse\n\t\t\tthrow new NotFoundHttpException('The requ...
[ "0.67475986", "0.668901", "0.66734743", "0.6667737", "0.66208297", "0.6587959", "0.65289116", "0.648645", "0.6485622", "0.6446085", "0.64413816", "0.6437186", "0.64110476", "0.63890487", "0.6385785", "0.6358107", "0.6308788", "0.6292978", "0.6273828", "0.6273196", "0.6251056"...
0.72126985
0
Transform data given by github api into User model
Преобразуйте данные, предоставленные github api, в модель User
public function transform($data): User { if (empty($data)) { throw new EmptyDataException(); } $user = new User(); $user->setLogin($this->getArrayValue('login', $data)); $user->setName($this->getArrayValue('name', $data)); $user->setUrl($this->getArrayVal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function map($data)\n {\n return new User($data['id'], $data['name']);\n }", "public function transformUsers() {\n $saUsers = $this->kalturaUser->getAll();\n foreach ($saUsers as $key => $saUser){\n /**\n * @var $saUser KalturaUser\n */\n ...
[ "0.63042516", "0.630159", "0.6164133", "0.6163404", "0.6128718", "0.5994691", "0.5985183", "0.5972674", "0.5839575", "0.5836916", "0.5829285", "0.5823249", "0.57975006", "0.5796828", "0.57466435", "0.5726406", "0.5675782", "0.5675687", "0.566079", "0.5651487", "0.56509715", ...
0.7067845
0
Get accounts A generator function yielding one AccountModel per ID in $accountIds
Получить аккаунты Генераторная функция, возвращающая один объект AccountModel на каждый ID в $accountIds
public function getAccounts() { foreach ($this->accountIds as $id) { // Use a generator to save on memory/resources // load accounts from DB one at a time only when required yield (new AccountModel())->load($id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAllAccounts(){\n\t\t$stmt = Dbh::connect()->query(\"SELECT * FROM accounts\");\n\t\t$accounts = array();\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $accounts[] = new Account($row['account_id'], $row['email'], $row['first_name'], $row['last_name'], $row['account_t...
[ "0.63143754", "0.61916775", "0.61846083", "0.6021778", "0.59819824", "0.58274096", "0.5820963", "0.57787776", "0.5728413", "0.5727941", "0.56759113", "0.5653643", "0.5649148", "0.56410867", "0.558694", "0.558694", "0.55752176", "0.55677533", "0.5511817", "0.54952097", "0.5480...
0.83268064
0
Saves the Work Experience instance information to the database
Сохраняет информацию о экземпляре Work Experience в базу данных
public function save() { $owner_id = $this->owner_id ?? "NULL"; $role = $this->role ?? "NULL"; $role = $this->db->real_escape_string($role); $employer = $this->employer ?? "NULL"; $employer = $this->db->real_escape_string($employer); $duration = $this->duration ?? "N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveToDb() {\n parent::saveToDb();\n\n require_once 'models/Location.php';\n Location::saveToDb($this->preferredLocation);\n Location::saveToDb($this->currentLocation);\n\n require_once 'libs/DB.php';\n $conn = DB::connect();\n\n $seekerId = $this->i...
[ "0.6872893", "0.6741848", "0.6596988", "0.6438809", "0.6285333", "0.628445", "0.6226343", "0.6226343", "0.6225878", "0.6196731", "0.61889", "0.6156235", "0.6103569", "0.60649776", "0.6042066", "0.6039423", "0.6039423", "0.6039423", "0.6039423", "0.6039423", "0.6039423", "0....
0.71726793
0
Returns an array of src's for a media background 's s by breakpoint. $img_size_prefix is expected to be a prefix for a set of registered image sizes, which has dimensions defined for each of Athena's responsive breakpoints. For example, if given a prefix 'bgimg', it is expected that bgimg, bgimgsm, bgimgmd, bgimglg, an...
Возвращает массив src для фона медиа по точкам разрыва. $img_size_prefix ожидается как префикс для набора зарегистрированных размеров изображений, которые имеют определенные размеры для каждой из точек разрыва Athena. Например, если задано префикс 'bgimg', ожидается, что bgimg, bgimgsm, bgimgmd, bgimglg и bgimgxl являю...
function get_media_background_picture_srcs( $attachment_xs_id, $attachment_sm_id, $img_size_prefix ) { $bg_images = array(); if ( $attachment_sm_id ) { $bg_images = array_merge( $bg_images, array( 'xl' => get_attachment_src_by_size( $attachment_sm_id, $img_size_prefix . '-xl' ), 'lg' => get_attachmen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_media_background_picture( $srcs ) {\n\tob_start();\n\n\tif ( isset( $srcs['fallback'] ) ) :\n?>\n\t<?php\n\t// Define classes for the <picture> element\n\t$picture_classes = 'media-background-picture ';\n\tif ( !isset( $srcs['xs'] ) ) {\n\t\t// Hide the <picture> element at -xs breakpoint when no mobi...
[ "0.57852054", "0.5536155", "0.5137959", "0.5085397", "0.5027953", "0.49293694", "0.4849443", "0.4841104", "0.48388913", "0.47839338", "0.47412345", "0.47120392", "0.4706144", "0.4695875", "0.46948662", "0.46663937", "0.46431273", "0.46386942", "0.4619642", "0.46121848", "0.46...
0.72476286
0
Returns markup for a media background , given an array of media background picture src's from get_media_background_picture_srcs().
Возвращает разметку для фона медиа, заданный массивом исходных файлов изображений фона медиа из get_media_background_picture_srcs().
function get_media_background_picture( $srcs ) { ob_start(); if ( isset( $srcs['fallback'] ) ) : ?> <?php // Define classes for the <picture> element $picture_classes = 'media-background-picture '; if ( !isset( $srcs['xs'] ) ) { // Hide the <picture> element at -xs breakpoint when no mobile image // is avail...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_media_background_picture_srcs( $attachment_xs_id, $attachment_sm_id, $img_size_prefix ) {\n\t$bg_images = array();\n\n\tif ( $attachment_sm_id ) {\n\t\t$bg_images = array_merge(\n\t\t\t$bg_images,\n\t\t\tarray(\n\t\t\t\t'xl' => get_attachment_src_by_size( $attachment_sm_id, $img_size_prefix . '-xl' ),...
[ "0.6536556", "0.5887311", "0.5790553", "0.5657168", "0.55560076", "0.5473525", "0.54461557", "0.5433338", "0.541618", "0.5413314", "0.5358382", "0.53219867", "0.5315457", "0.5312631", "0.52845126", "0.52441555", "0.51738805", "0.5092402", "0.50889355", "0.5043791", "0.5006097...
0.7484566
0
body field Test with body fields empty.
Поле тела Test с пустыми полями тела.
public function test_create_task_body_empty() { $credential = [ 'body' => '' ]; $token = User::factory()->create()->createToken('my-app-token')->plainTextToken; $response = $this->json('POST', '/api/tasks', $credential, ['Accept' => 'application/json', 'Authorization' =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetBody() {\n $request = $this->createRequest();\n\n static::setInput('hello world');\n $this->assertEquals('hello world', $request->getBody());\n $this->assertEquals('hello world', $request->body);\n }", "public function testEmptyField()\n {\n $config...
[ "0.6944558", "0.6340694", "0.6314011", "0.6298491", "0.6273958", "0.62459564", "0.6179643", "0.60944164", "0.6081358", "0.60631424", "0.60598934", "0.60598934", "0.60475147", "0.60281163", "0.60190886", "0.60148436", "0.59887713", "0.59886557", "0.5984511", "0.5972786", "0.59...
0.7024294
0
get mail charset by email
получить кодировку почты по электронной почте
protected function _getCharset($email) { $pieces = explode('@', $email); $domain = array_pop($pieces); //if is aol if (strcmp(strtolower($domain), 'aol.com') == 0) { return 'utf-8'; } return 'iso-2022-jp'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHeaderCharset($connection, $msgnum) {\n $headerString = imap_fetchheader($connection, $msgnum);\n $headers = explode(\"\\n\", $headerString);\n for($i = 0; $i < count($headers); $i++)\n if(preg_match(\"/charset=(.*)\\r/\", $headers[$i], $matches))\n\treturn $matches[1];\n\n return \"\";\n}",...
[ "0.7265433", "0.70772034", "0.6591157", "0.6591157", "0.6405593", "0.62891537", "0.62836266", "0.62392575", "0.621362", "0.62089634", "0.61643994", "0.61203885", "0.6094275", "0.6094275", "0.6078577", "0.6057762", "0.60425913", "0.60331434", "0.60320765", "0.6028808", "0.5982...
0.7579713
0
get mail encoding by email
получить кодировку почты по электронной почте
protected function _getEncoding($email) { $pieces = explode('@', $email); $domain = array_pop($pieces); require_once 'Zend/Mime.php'; //waseda.jp //This might be better to use in regular expression. if (stristr($domain, 'waseda.jp') != false) { return Zen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getCharset($email)\n {\n $pieces = explode('@', $email);\n $domain = array_pop($pieces);\n\n //if is aol\n if (strcmp(strtolower($domain), 'aol.com') == 0) {\n return 'utf-8';\n }\n\n return 'iso-2022-jp';\n }", "function plainMailEnc...
[ "0.67797655", "0.65473366", "0.6417348", "0.6417291", "0.6387145", "0.63708484", "0.6348614", "0.6275838", "0.6273872", "0.62461543", "0.62379825", "0.6217796", "0.61888146", "0.6142511", "0.6016232", "0.6015304", "0.6011391", "0.6001446", "0.5944534", "0.59176284", "0.590380...
0.76205844
0
$Id: restorelib.php,v 1.1 2008/04/30 10:20:06 skodak Exp $ This php script contains all the stuff to backup/restore exercise mods This is the "graphical" structure of the exercise mod: exercise (CL,pk>id) | | | ||| | | | | | exercise_submissions | (UL,pk>id,fk>exerciseid,files) | | | | | | | || || | | | | | | | exercis...
$Id: restorelib.php,v 1.1 2008/04/30 10:20:06 skodak Exp $ Этот php-скрипт содержит всё необходимое для резервного копирования и восстановления модулей упражнений. Это «графическая» структура модуля упражнений: exercise (CL,pk>id) | | | ||| | | | | | exercise_submissions | (UL,pk>id,fk>exerciseid,files) | | | | | | | |...
function exercise_restore_mods($mod,$restore) { global $CFG; $status = true; //Get record from backup_ids $data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id); if ($data) { //Now get completed xmlized object $info = $data->info; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exercise_submissions_restore($old_exercise_id, $new_exercise_id,$info,$restore) {\n\n global $CFG;\n\n $status = true;\n\n //Get the submissions array (teacher submissions)\n $submissions = $info['MOD']['#']['SUBMISSIONS']['0']['#']['SUBMISSION'];\n //Iterate over submis...
[ "0.69757617", "0.6735819", "0.667734", "0.6620086", "0.6588452", "0.6448809", "0.6275817", "0.62128186", "0.61416084", "0.6122781", "0.6080984", "0.6043849", "0.5980194", "0.59601855", "0.5838933", "0.5748088", "0.56690407", "0.5654498", "0.5654498", "0.56330836", "0.5594757"...
0.7045794
0
This function restores the exercise_assessments
Эта функция восстанавливает exercise_assessments
function exercise_assessments_restore($new_exercise_id, $new_submission_id,$info,$restore) { global $CFG; $status = true; //Get the assessments array (optional) if (isset($info['#']['ASSESSMENTS']['0']['#']['ASSESSMENT'])) { $assessments = $info['#']['ASSESSMENTS']['0']['#...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restored(InterviewQuestion $interviewQuestion): void\n {\n //\n }", "public function restored(Testimonials $testimonials)\n {\n //\n }", "public function restored(assignment $assignment)\n {\n //code...\n }", "public function restoring(assignment $assign...
[ "0.6294185", "0.62858266", "0.6281231", "0.62416166", "0.6029512", "0.60294724", "0.6026094", "0.59961265", "0.5994378", "0.59780556", "0.5975691", "0.5969955", "0.5967983", "0.59153354", "0.5891621", "0.5887972", "0.5880483", "0.5875639", "0.58158344", "0.5768288", "0.576315...
0.71317357
0
Set the default format that should be returned by this RespondScope
Установите формат по умолчанию, который должен быть возвращен этим RespondScope
public function default(string $format): RespondScope { $this->defaultFormat = $format; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function defaultFormat()\n\t{\n\t\treturn $this->format();\n\t}", "public function getRequestFormat($default = 'html')\n {\n if (null === $this->format) {\n $this->format = $this->get('_format', $default);\n }\n\n return $this->format;\n }", "public static function ...
[ "0.69388825", "0.6875316", "0.64943033", "0.64198655", "0.63429993", "0.6292432", "0.6276714", "0.62698555", "0.6217694", "0.6181287", "0.6171663", "0.61587006", "0.6130278", "0.60930896", "0.6040013", "0.6040013", "0.6040013", "0.60008717", "0.5993148", "0.5974236", "0.59742...
0.7875316
0
Ensure the current format has a response.
Убедитесь, что текущий формат имеет ответ.
protected function ensureCurrenntFormatHasResponse(): void { if (!$this->currentFormat) { return; } if ($this->formats[$this->currentFormat] === static::NOT_SET) { throw new MissingWithException( "Missing `with` for response format {$this->currentForm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkResponseFormat(){\n\n }", "abstract protected function checkExistingResponse();", "public function isValidResponse(){\n\t\treturn $this->isLoaded(); \n\t}", "public function testSuccessfulResponseDataFormatForConfirmProcessWithValidSuccessfulStatus(): void\n {\n $this->tryTes...
[ "0.7448187", "0.68363947", "0.6492226", "0.638529", "0.63733166", "0.63580716", "0.62774634", "0.6240022", "0.62112623", "0.620083", "0.61964935", "0.6149381", "0.604394", "0.60399824", "0.6038295", "0.6031772", "0.60216033", "0.59795487", "0.59560084", "0.59162855", "0.59095...
0.7007805
1
Check if file directory is writable, if not set error
Проверить, можно ли записывать в директорию файла, если нет — установить ошибку
private function __isWritableDir() { if(!$this->__getDir()->exists()) { $this->error = 'Directory \'' . $this->__getDir()->getPath() . '\' does not exist'; return false; } if(!$this->__getDir()->writable()) { $this->error = 'Directory \'' . $this->__getDir()->getPath() . '\' is not writable'; re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isWritable()\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\treturn is_writable($this->directory);\n\t}", "public function writable()\n\t{\n\t\tif($this->exists()) // file exists check if writable\n\t\t{\n\t\t\treturn parent::writable();\n\t\t}\n\n\t\t// new file, check if directory writable\n\t\t...
[ "0.75184405", "0.7488649", "0.7471751", "0.7410834", "0.73520565", "0.7338351", "0.7326392", "0.72937536", "0.72867465", "0.72292745", "0.71605533", "0.7101645", "0.7097808", "0.7066095", "0.70596075", "0.70518583", "0.70457953", "0.69591564", "0.69518423", "0.69508433", "0.6...
0.7620781
0
That action will load widget with direction register with just appended LIS medcard id
Это действие загрузит виджет с регистром направления с просто добавленным идентификатором LIS медицинской карты
public function actionLoadWidget() { try { if (($id = Yii::app()->getRequest()->getQuery("medcard")) == null) { throw new CException("Can't resolve \"medcard\" identification number as query parameter"); } if (Laboratory_Medcard::model()->findByPk($id) == null) { throw new CException("Unresolved labo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpb_load_widget() {\n register_widget( 'lrq_widget' );\n }", "function duende_load_widget() {\n\tregister_widget( 'duende_widget' );\n}", "function widget_load() {\n\t\tregister_widget('ilgelo_wSocial');\n\t\tregister_widget('ilgelo_wTwitter');\n\t\tregister_widget('ilgelo_banner');\n\t}", ...
[ "0.6496114", "0.6418215", "0.63296527", "0.63195854", "0.62820244", "0.62673897", "0.6234906", "0.62105554", "0.6161001", "0.614109", "0.60771", "0.6039221", "0.5980526", "0.5964328", "0.58754987", "0.5870166", "0.58274585", "0.5814425", "0.5804099", "0.5769951", "0.57607055"...
0.743349
0
Generate a nested treelist Takes the data passed in as $data, in the form as generated by the Tree behaviour "generatetreelist" and outputs an HTML structure of nested unordered lists. The following $settings are required: model which model in the $data to use The following $settings are optional: title name of the fie...
Создать вложенный список. Принимает данные, переданные в виде $data, в виде, сгенерированном поведением Tree "generatetreelist", и выводит структуру HTML вложенных списков. Следующие $settings обязательны: model — какой модель из $data использовать. Следующие $settings необязательны: title — имя поля для отображения, l...
function generate($data, $settings = null) { if (is_null($settings)) { $settings = array(); } $this->__settings = array_merge(array( 'model' => null, 'title' => 'name', 'depth' => 0, 'link' => true, 'div' => 'tree', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __generate($data) {\n extract($this->__settings);\n $html = '';\n\n $id = '';\n if ($depth == 0) {\n $id = ' id=\"' . $div . '\"';\n }\n\n $whitespace = str_repeat(\"\\t\", $depth);\n\n $html .= \"<ul\" . $id . \">\\n\";\n foreach ...
[ "0.7546041", "0.68082625", "0.6783864", "0.67141086", "0.6528834", "0.64719945", "0.64542335", "0.62023467", "0.6125524", "0.60964555", "0.6077728", "0.60607713", "0.6040383", "0.5967046", "0.59510374", "0.5919558", "0.5905031", "0.59027284", "0.5899051", "0.5891888", "0.5884...
0.77040505
0
Get all records given an organization npi number
Получить все записи по номеру организации npi
public function byOrganizationNpi($npi) { return $this->getArray('ByOrganizationNPI/' . $npi); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllOwners($currpg,$url)\n\t{\n\t\t$sql = \"Select * from tblowner order by organization_name\";\t// sql statement \n\t\t$result = paging($sql,$currpg, $this->pagesize,$url); // execute sql statement \n\t\treturn $result;\t\t\t\t\t\t// return result from sql \n\t}", "public function public_ids_get()\...
[ "0.5901007", "0.5520959", "0.54629564", "0.54338115", "0.542864", "0.5411147", "0.5296516", "0.5291697", "0.52428615", "0.519653", "0.51785046", "0.5176827", "0.51631397", "0.5112919", "0.510209", "0.50565207", "0.50380456", "0.5037972", "0.50161606", "0.49936584", "0.4987956...
0.70589024
0
Checks if FFprobe available.
Проверяет, доступно ли FFprobe.
function isFFprobeAvailable($app) { if (!array_key_exists('ffprobe_alt', $app->config)) { return false; } return (bool) (file_exists($app->config['ffprobe_alt']) & is_executable($app->config['ffprobe_alt'])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function probe() {\n $this->probe_errors = array();\n if (!function_exists('mysql_connect')){\n $this->probe_errors[] = sprintf(DB_ERR_EXTENSION_UNAVAILABLE,'MySQL');\n return false;\n }\n if (!($conn = @mysql_connect($this->server.(($this->port==\"\")?\"\":\":\".$this->port),\n ...
[ "0.6245987", "0.62175316", "0.60258996", "0.56282955", "0.56245035", "0.5606402", "0.5601424", "0.55907977", "0.55907977", "0.5578447", "0.5564225", "0.55252886", "0.5485559", "0.54779154", "0.54546636", "0.54245746", "0.5403667", "0.5365387", "0.5341879", "0.53140813", "0.52...
0.78013134
0
Sets a new transforms
Устанавливает новые преобразования
public function setTransforms(array $transforms) { $this->transforms = $transforms; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTransform(array $transform)\n {\n $this->transform = $transform;\n return $this;\n }", "public function setPreTransforms(iterable $transforms): self\n\t{\n\t\tif (!\\is_array($transforms)) {\n\t\t\t$transforms = iterator_to_array($transforms, false);\n\t\t}\n\n\t\tforeach (...
[ "0.67482024", "0.6428424", "0.6295611", "0.6131577", "0.5741104", "0.56767595", "0.5367187", "0.53330857", "0.52893543", "0.51413953", "0.5122323", "0.5120078", "0.5066926", "0.49677467", "0.49369854", "0.49369854", "0.4936074", "0.49254164", "0.49250823", "0.49235037", "0.49...
0.7306797
0
Sets a new digestMethod
Устанавливает новый digestMethod
public function setDigestMethod(\BankId\Merchant\Library\Schemas\ds\DigestMethod $digestMethod) { $this->digestMethod = $digestMethod; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDigest(string $digest) : self\n {\n $this->initialized['digest'] = true;\n $this->digest = $digest;\n return $this;\n }", "public function setDigest($digest)\n {\n $this->_getPadesModule()->setDigest($digest);\n }", "public function setMethod($method);...
[ "0.6204438", "0.6184714", "0.60311073", "0.60311073", "0.5880494", "0.5876479", "0.5865864", "0.5852258", "0.5850791", "0.5792011", "0.57880557", "0.57880557", "0.57880557", "0.57880557", "0.5759439", "0.5729375", "0.56839466", "0.56752086", "0.5661068", "0.55990076", "0.5560...
0.7290157
0
Sets a new digestValue
Устанавливает новый digestValue
public function setDigestValue($digestValue) { $this->digestValue = $digestValue; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDigest(string $digest) : self\n {\n $this->initialized['digest'] = true;\n $this->digest = $digest;\n return $this;\n }", "public function setDigest($digest)\n {\n $this->_getPadesModule()->setDigest($digest);\n }", "public function setCertDigest(\\Dig...
[ "0.67569166", "0.6705292", "0.60863984", "0.5808145", "0.5689865", "0.5689865", "0.56781065", "0.5674755", "0.5515177", "0.55138534", "0.5503347", "0.54998976", "0.54998976", "0.54998976", "0.54998976", "0.54998976", "0.54998976", "0.54998976", "0.54998976", "0.54998976", "0....
0.7257669
0
Show the form for creating a new Usuarios.
Показать форму для создания нового Usuarios.
public function create() { return view('usuarios.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create() {\n return view('fuse.cadastros.usuarios.create');\n }", "public function create()\n {\n return view(\"usuarios.create\");\n }", "public function create()\n {\n return view(\"usuarios.create\");\n }", "public function create()\n {\n retur...
[ "0.8380529", "0.8194342", "0.8194342", "0.81804204", "0.8172279", "0.81284326", "0.8093861", "0.8093206", "0.8086385", "0.80469316", "0.80469316", "0.80469316", "0.8033251", "0.80324244", "0.80306935", "0.8016607", "0.7960712", "0.7951692", "0.7897805", "0.7861079", "0.786107...
0.81954455
1
Order form: fields in the order form repeated .marketplaceapps.v1.OrderFormField order_form = 1;
Форма заказа: поля формы заказа, повторяемые в порядке .marketplaceapps.v1.OrderFormField order_form = 1;
public function getOrderForm() { return $this->order_form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOrderForm(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Marketplaceapps\\V1\\OrderFormField::class);\n $this->order_form = $arr;\n }", "public function OrderForm()\n {\n $config = new Config();\n\n $...
[ "0.7563066", "0.7238099", "0.69634765", "0.69239974", "0.6818531", "0.6769661", "0.663851", "0.66112447", "0.6513412", "0.65053225", "0.6468488", "0.64599824", "0.6437168", "0.6405464", "0.6285269", "0.62471306", "0.6184422", "0.61812323", "0.61026824", "0.61021656", "0.61021...
0.7358358
1
Order form: fields in the order form repeated .marketplaceapps.v1.OrderFormField order_form = 1;
Форма заказа: поля формы заказа, повторяющиеся в порядке .marketplaceapps.v1.OrderFormField order_form = 1;
public function setOrderForm(&$var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Marketplaceapps\V1\OrderFormField::class); $this->order_form = $arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrderForm()\n {\n return $this->order_form;\n }", "public function OrderForm()\n {\n $config = new Config();\n\n $app = new ALLApp();\n $app->configs = $config;\n\n //address\n $column = new Form();\n $column->dbType = dbTypeInteger;\n ...
[ "0.7359091", "0.72387", "0.69628686", "0.6923959", "0.68185186", "0.6769846", "0.6638858", "0.66114026", "0.6513442", "0.6504811", "0.6469479", "0.6459403", "0.6438287", "0.640587", "0.62849355", "0.6248706", "0.6186252", "0.618254", "0.6103748", "0.61027", "0.6102484", "0....
0.75621516
0
Order form: common form fields .marketplaceapps.v1.IncludedCommonFormFields common_form = 2;
Форма заказа: общие поля формы .marketplaceapps.v1.IncludedCommonFormFields common_form = 2;
public function setCommonForm(&$var) { GPBUtil::checkMessage($var, \Marketplaceapps\V1\IncludedCommonFormFields::class); $this->common_form = $var; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCommonFormRequiredFields(&$var)\n {\n GPBUtil::checkMessage($var, \\Marketplaceapps\\V1\\IncludedCommonFormFields::class);\n $this->common_form_required_fields = $var;\n }", "public function getCommonFormRequiredFields()\n {\n return $this->common_form_required_fi...
[ "0.6819203", "0.6489444", "0.64718676", "0.60903", "0.5970113", "0.59332573", "0.5795539", "0.56389683", "0.56306463", "0.5602111", "0.55994266", "0.55826324", "0.5541529", "0.5524208", "0.54108953", "0.53888583", "0.5377876", "0.53662336", "0.5357527", "0.53391755", "0.53175...
0.71022403
0
Order form: required common form fields .marketplaceapps.v1.IncludedCommonFormFields common_form_required_fields = 5;
Форма заказа: обязательные общие поля формы .marketplaceapps.v1.IncludedCommonFormFields common_form_required_fields = 5;
public function getCommonFormRequiredFields() { return $this->common_form_required_fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCommonFormRequiredFields(&$var)\n {\n GPBUtil::checkMessage($var, \\Marketplaceapps\\V1\\IncludedCommonFormFields::class);\n $this->common_form_required_fields = $var;\n }", "public function setCommonForm(&$var)\n {\n GPBUtil::checkMessage($var, \\Marketplaceapps\...
[ "0.7522929", "0.6429002", "0.6403835", "0.6036171", "0.5994697", "0.5939956", "0.59308875", "0.5896248", "0.58345157", "0.582579", "0.58136475", "0.5786623", "0.57420844", "0.5703814", "0.5640297", "0.5622622", "0.562043", "0.55969733", "0.5595727", "0.5560667", "0.55164367",...
0.7337752
1
Order form: required common form fields .marketplaceapps.v1.IncludedCommonFormFields common_form_required_fields = 5;
Форма заказа: обязательные общие поля формы .marketplaceapps.v1.IncludedCommonFormFields common_form_required_fields = 5;
public function setCommonFormRequiredFields(&$var) { GPBUtil::checkMessage($var, \Marketplaceapps\V1\IncludedCommonFormFields::class); $this->common_form_required_fields = $var; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCommonFormRequiredFields()\n {\n return $this->common_form_required_fields;\n }", "public function setCommonForm(&$var)\n {\n GPBUtil::checkMessage($var, \\Marketplaceapps\\V1\\IncludedCommonFormFields::class);\n $this->common_form = $var;\n }", "public funct...
[ "0.73391706", "0.64274025", "0.6404952", "0.6034123", "0.5996517", "0.59390277", "0.5932513", "0.58979553", "0.58324975", "0.5827117", "0.58121955", "0.5788349", "0.5741503", "0.5704144", "0.563808", "0.5624313", "0.5618433", "0.5598123", "0.5597772", "0.55590117", "0.5519051...
0.75235206
0
Store a newly created Earning in storage.
Храните только что созданную Прибыль в хранилище.
public function store(CreateEarningRequest $request) { $input = $request->all(); $customFields = $this->customFieldRepository->findByField('custom_field_model', $this->earningRepository->model()); try { $earning = $this->earningRepository->create($input); $earning->cu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n $request->validate([\n 'employee_id' => 'required',\n 'salary' => 'required'\n ]);\n $salary = Salary::create([\n 'employee_id' => $request->employee_id,\n 'balance' => $request->salary,\n '...
[ "0.6399853", "0.6262061", "0.6253411", "0.6226843", "0.61633605", "0.6159933", "0.611923", "0.61079866", "0.60934085", "0.60906106", "0.609017", "0.60856235", "0.6065393", "0.6031904", "0.6009967", "0.60065895", "0.59836286", "0.59788895", "0.5972301", "0.59716976", "0.596759...
0.74198216
0
Show the form for editing the specified Earning.
Показать форму для редактирования указанного Earning.
public function edit($id) { $earning = $this->earningRepository->findWithoutFail($id); $market = $this->marketRepository->pluck('name','id'); if (empty($earning)) { Flash::error(__('lang.not_found',['operator' => __('lang.earning')])); return redirect(route...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit()\n {\n return view('panel.order-management.payment.form-edit');\n }", "public function edit( Expenses $expenses ) {\n //\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id){\n\t\t$transaction = Expense::fi...
[ "0.6925835", "0.67987514", "0.6758797", "0.672671", "0.6680212", "0.6680212", "0.66122127", "0.66099596", "0.658431", "0.6579701", "0.657552", "0.65754014", "0.6566142", "0.6566142", "0.6548121", "0.6548121", "0.64979124", "0.64956236", "0.64895827", "0.64859474", "0.6477402"...
0.7238321
0
Remove Media of Earning
Удалить средства заработка
public function removeMedia(Request $request) { $input = $request->all(); $earning = $this->earningRepository->findWithoutFail($input['id']); try { if($earning->hasMedia($input['collection'])){ $earning->getFirstMedia($input['collection'])->delete(); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $marketsPayout = $this->marketsPayoutRepository->findWithoutFail($input['id']);\n try {\n if ($marketsPayout->hasMedia($input['collection'])) {\n $marketsPayout->getFirstMedia($input['c...
[ "0.6412844", "0.6399163", "0.6293903", "0.62825286", "0.6129582", "0.6126538", "0.60621625", "0.5987648", "0.59782904", "0.591198", "0.5902574", "0.58670604", "0.58528346", "0.5833893", "0.575967", "0.57546985", "0.57435215", "0.57315356", "0.5672449", "0.5672401", "0.5641842...
0.7015693
0
Get from database all active storages
Получить из базы данных все активные хранилища
protected function getAllActiveStorages(){ $storages = array(); $data = $this->db->from('storages')->where(array('status' => 1, 'for_simple_storage' => 1))->get()->all(); foreach ($data as $idx => $storage){ $storages[$storage['storage_name']] = $storage; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAllActiveStorages()\n {\n\n $storages = array();\n\n $data = ORM::for_table('storages')->where_any_is([\n ['status' => 1, 'for_records' => 1]\n /* ['stream_server_type' => NULL,'status' => 1, 'for_records' => 1],\n ['stream_server_type' => ''...
[ "0.8027531", "0.7727403", "0.7441633", "0.7193258", "0.7138391", "0.69295883", "0.6898831", "0.6898831", "0.68332255", "0.66737086", "0.6664884", "0.6661472", "0.66614026", "0.6661345", "0.6588809", "0.65485406", "0.64941925", "0.6446964", "0.6399013", "0.6375021", "0.6367444...
0.8359823
0
Start md5sum for media in all storages
Начать md5sum для медиа в всех хранилищах
public function startMD5SumInAllStorages($media_name){ foreach ($this->storages as $name => $storage){ try { $this->startMD5Sum($name, $media_name); }catch (Exception $exception){ } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkMD5Sum($storages_from_net){\n $storages_from_cache = $this->getAllGoodStoragesForMediaFromCache();\n foreach ($storages_from_net as $name => $storage){\n if (array_key_exists($name, $storages_from_cache)){\n foreach ($storages_from_net[$name]['files'] a...
[ "0.70602465", "0.7027451", "0.59443223", "0.5830169", "0.57904106", "0.5705218", "0.56679475", "0.56391025", "0.56391025", "0.5630535", "0.56230825", "0.56227905", "0.5614253", "0.56000555", "0.55348986", "0.5520208", "0.55091137", "0.55091137", "0.5469415", "0.5469415", "0.5...
0.80169255
0
Compare md5sum from net and from cache. If they don't equal add record to master log
Сравните md5sum с net и с cache. Если они не равны, добавьте запись в основной журнал
private function checkMD5Sum($storages_from_net){ $storages_from_cache = $this->getAllGoodStoragesForMediaFromCache(); foreach ($storages_from_net as $name => $storage){ if (array_key_exists($name, $storages_from_cache)){ foreach ($storages_from_net[$name]['files'] as $net_fi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasMd5checksums(){\n return $this->_has(1);\n }", "public function hasMd5checksums(){\n return $this->_has(1);\n }", "public function hasMd5checksum(){\n return $this->_has(3);\n }", "public function hasMd5checksum(){\n return $this->_has(3);\n }", "public fu...
[ "0.6024794", "0.6024794", "0.5949335", "0.5949335", "0.56270295", "0.56270295", "0.5558346", "0.5549799", "0.54782295", "0.5470366", "0.5437054", "0.54202145", "0.5387213", "0.5381693", "0.535362", "0.5303952", "0.5274792", "0.5274285", "0.5251015", "0.5146725", "0.51430297",...
0.71580076
0
Get good storages from cache
Получить хорошие хранилища из кэша
private function getAllGoodStoragesForMediaFromCache(){ $cache = array(); foreach ($this->getAllCacheKeys() as $key){ $storage_cache = $this->db->from('storage_cache') ->where(array( 'c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCache();", "public static function getCache() {}", "public function get_all(){\n $cache_data_list=[];\n if($this->driver=='file'){\n foreach ($cache_list=$this->file->file_walk($this->path) as $value){\n $cache_data_list[]=$this->file->read_file($value...
[ "0.71438897", "0.67686236", "0.6657502", "0.66507566", "0.65918094", "0.65321195", "0.651402", "0.6432794", "0.6429284", "0.6429284", "0.6399728", "0.63599944", "0.6357598", "0.6322012", "0.63176256", "0.6309113", "0.6301071", "0.6271082", "0.6256069", "0.6239949", "0.6229115...
0.80611145
0
Return unique key for cache record by storage name, media type and media id
Вернуть уникальный ключ для записи кэша по имени хранилища, типу медиа и идентификатору медиа
private function getCacheKey($storage_name){ return $storage_name.'_'.$this->media_type.'_'.$this->media_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _get_media_key($id = '') {\n \n \tif ($id != '') {\n \t\treturn $this->_media_key.'-'.$id;\n \t} else {\n \t\treturn '';\n \t}\n\t}", "private function getCacheId()\n\t{\n\t\treturn self::CACHE_ID_PREFIX . '_' . $this->exportId . '_' . $this->type;\n\t}", "public function cac...
[ "0.69583285", "0.65799886", "0.650733", "0.63962746", "0.6250394", "0.6239835", "0.61638105", "0.6152581", "0.6120995", "0.6115217", "0.6091918", "0.60773313", "0.6067026", "0.60350823", "0.5983573", "0.5941147", "0.59332466", "0.5907089", "0.59000796", "0.58794206", "0.58773...
0.7973746
0
Return all keys for cache records for media
Вернуть все ключи для записей кэша медиа
private function getAllCacheKeys(){ $keys = array(); foreach ($this->storages as $name => $storage){ $keys[] = $this->getCacheKey($name); } return $keys; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllKeys() {\n return $this->memcached->getAllKeys();\n }", "private function getAllGoodStoragesForMediaFromCache(){\n \n $cache = array();\n \n foreach ($this->getAllCacheKeys() as $key){\n \n $storage_cache = $this->db->from('storage_cache')\n ...
[ "0.70068485", "0.68827116", "0.66198653", "0.64602005", "0.6445283", "0.63892466", "0.6387084", "0.6235416", "0.6221007", "0.6219997", "0.6175087", "0.61611813", "0.61464274", "0.6142853", "0.61228675", "0.61150765", "0.61022097", "0.6094038", "0.604731", "0.60423213", "0.600...
0.7280174
0
wrapper for srorage method, that check media directory
обертка для метода хранения, проверяющая медиадиректорию
protected function checkMediaDir($storage_name, $media_name){ try { //return $this->clients[$storage_name]->checkDir($media_name, $this->media_type); return $this->clients[$storage_name]->resource($this->media_type)->ids($media_name)->get(); }catch (Exception $exception){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getMediaDirectory()\n {\n return $this->filesystem->getDirectoryRead(DirectoryList::MEDIA);\n }", "public static function getMediaPath()\n {\n $mediaDir = Config::get('media.media_dir');\n $mediaFullPath = ROOT . self::getFilesPath() . $mediaDir;\n\n if(!file...
[ "0.6680452", "0.65520984", "0.65335155", "0.6170419", "0.61345065", "0.6114859", "0.60657525", "0.60637456", "0.60212123", "0.6006439", "0.5967119", "0.58150625", "0.57586765", "0.5675052", "0.56699616", "0.55670196", "0.55596286", "0.5530553", "0.5530553", "0.55140275", "0.5...
0.7446418
0
Increment counter of storage deny
Увеличить счетчик отказа хранения
protected function incrementStorageDeny($storage_name){ $storage = $this->db->from('storage_deny')->where(array('name' => $storage_name))->get()->first(); if (empty($storage)){ $this->db->insert('storage_deny', array( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function incrementStorageDeny($storage_name)\n {\n\n $storage = ORM::for_table('storage_deny')->where(['name' => $storage_name])->find_one();\n\n if (empty($storage)) {\n $storage_deny = ORM::for_table('storage_deny')->create();\n $storage_deny->name = $storage_name...
[ "0.7432636", "0.5868138", "0.57601625", "0.57260424", "0.5683227", "0.56827813", "0.5674294", "0.5646331", "0.562723", "0.5605486", "0.55840087", "0.5573552", "0.55135924", "0.551107", "0.5491218", "0.5487842", "0.5482708", "0.54704833", "0.54582673", "0.5449167", "0.54365295...
0.7834631
0
Sort array of good storages by load
Сортировать массив хороших складов по загрузке
protected function sortByLoad($storages){ if (!empty($storages)){ foreach ($storages as $name => $storage) { $load[$name] = $storage['load']; } array_multisort($load, SORT_ASC, SORT_NUMERIC, $storages); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function sortByLoad($storages)\n {\n\n if (!empty($storages)) {\n\n foreach ($storages as $name => $storage) {\n $load[$name] = $storage['load'];\n }\n\n array_multisort($load, SORT_ASC, SORT_NUMERIC, $storages);\n }\n\n return $stor...
[ "0.7604362", "0.60574186", "0.5993651", "0.59600836", "0.58668846", "0.57907444", "0.57805246", "0.5753326", "0.57505834", "0.5709011", "0.56298965", "0.56184846", "0.55958384", "0.54436785", "0.54256976", "0.5418195", "0.54061866", "0.5324763", "0.5308795", "0.5301813", "0.5...
0.80397505
0
Parse exception, add exception message to output and to master log
Исключение парсинга, добавить сообщение исключения в выход и в мастер-лог
protected function parseException($exception){ //trigger_error($exception->getMessage()."\n".$exception->getTraceAsString(), E_USER_ERROR); echo $exception->getMessage()."\n".$exception->getTraceAsString(); $this->addToLog($exception->getMessage()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function logException(\\Exception $ex);", "private function logException()\n {\n switch ($this->classShortName) {\n case 'IndexException':\n case 'CreateException':\n case 'ReadException':\n case 'UpdateException':\n case 'Delete...
[ "0.6466827", "0.6245785", "0.6231223", "0.6214613", "0.61629874", "0.6152996", "0.6149726", "0.6124174", "0.6019595", "0.6014329", "0.59938264", "0.5901484", "0.58407384", "0.58404523", "0.5839166", "0.58276725", "0.58028907", "0.5793144", "0.5783793", "0.5768403", "0.5760358...
0.75561965
0
Adds the member object to the user
Добавляет объект члена пользователю
public static function addMemberObject($member_id, $user_id): void { if(empty($member_id) || empty($user_id)) return; update_field('member_object', $member_id, 'user_'.$user_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guildMemberAdd(GuildMember $member);", "public function addUser(){}", "private function addUser()\n {\n $this->online->addUser($this->user, $this->place, $this->loginTime);\n }", "public function addMember(){\n\t\t\t\n\t\t\t$this->load->view('addMember') ;\n\t\t}", "public function ad...
[ "0.7065694", "0.68117255", "0.6786187", "0.6769946", "0.6669624", "0.666707", "0.6662622", "0.6587026", "0.65755725", "0.6517608", "0.65094155", "0.6491399", "0.6406797", "0.6405117", "0.6372694", "0.6362884", "0.6356296", "0.63368255", "0.6311734", "0.6302656", "0.62713367",...
0.7438395
0
Is the user an owner or admin
Является ли пользователь владельцем или администратором
public static function isOwner(): bool { if(in_array( 'owner', self::getUserRole()) || in_array('administrator', self::getUserRole())) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAdminOrOwner($user_id)\n\t{\n\t\t$user = User::model()->findByPk($user_id);\n\t\tif ($user !== null)\n\t\t{\n\t\t\treturn $user->isAdmin() ||\n\t\t\t($user->canCreateAdventure() && $user_id == $this->createdBy)\n\t\t\t;\n\t\t}\n\t\treturn false;\n\t}", "protected function isAdminUser() {}", "...
[ "0.78823483", "0.7808002", "0.76614654", "0.7637357", "0.76033586", "0.7592924", "0.7540745", "0.75382096", "0.7530428", "0.7528442", "0.7476891", "0.7476891", "0.74755514", "0.747021", "0.74566305", "0.74562246", "0.7425576", "0.74055356", "0.73839027", "0.7383729", "0.73658...
0.8035895
0
Removes the provided user_id from it's member's employee list
Удаляет предоставленный user_id из списка сотрудников этого члена
public static function removeUserFromMember($user_id) { if(empty($user_id)) return false; $member_id = get_field('member_object', 'user_'.$user_id); if(empty($member_id)) return false; $member_employees_list = get_field('users', $member_id); foreach($member_employees_list as $key => $employee_id) { if((i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeUser()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_user]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_user]);\n\t\t}\n\t}", "public function RemoveUser($id)\r\n {\r\n $this->customPDO->Remove('users', 'WHERE User_Id = ' . $id);\r\n }", "pub...
[ "0.6595452", "0.6529643", "0.6477977", "0.6458815", "0.64081913", "0.6395868", "0.6394279", "0.6388648", "0.63867426", "0.63861203", "0.6354094", "0.63097787", "0.6295682", "0.6292853", "0.62740356", "0.62539893", "0.6253857", "0.62427735", "0.6209622", "0.61980885", "0.61929...
0.7273711
0
Returns the optimal number of child processes.
Возвращает оптимальное количество дочерних процессов.
protected function getOptimalNumberOfChildProcesses(): int { $coreNumber = 1; $detectCommand = [ 'linux' => 'cat /proc/cpuinfo | grep processor | wc -l', ]; $os = strtolower(trim(PHP_OS)); if (isset($detectCommand[$os])) { $coreNumber = intval($this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxProcesses(): int\n {\n return $this->maxProcesses;\n }", "public function getMaxJobsPerProcess(): int\n {\n return $this->maxJobsPerProcess;\n }", "public function getMaxNbChilds()\n {\n return $this->getOption('max', 0);\n }", "public function getMaxProce...
[ "0.7293823", "0.69329536", "0.6896544", "0.6786933", "0.6650818", "0.6600502", "0.6574527", "0.6500967", "0.6379451", "0.60853136", "0.60155857", "0.590684", "0.5865589", "0.57816553", "0.57060087", "0.56690073", "0.56658745", "0.5656545", "0.5640194", "0.5619115", "0.5602191...
0.84256446
0
Updates the cached json file with the filter keys.
Обновляет кэшированный файл json с ключами фильтра.
public static function update() { $json = json_encode(self::get()); $json = Utils::json_pretty_print($json); file_put_contents(CACHEDIR . "filter-keys/filter_keys.json", $json); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateCache();", "public function rebuildCache()\r\n {\r\n $themes = $this->scanJsonFiles();\r\n // file_put_contents($this->cachePath, json_encode($themes, JSON_PRETTY_PRINT));\r\n\r\n $stub = file_get_contents(__DIR__ . '/stubs/cache.stub');\r\n $contents = str_re...
[ "0.62747115", "0.60221344", "0.5651018", "0.56190133", "0.5565604", "0.55066466", "0.5442118", "0.54121685", "0.5400739", "0.53041005", "0.5294664", "0.5185658", "0.5176127", "0.51697767", "0.5165227", "0.5159248", "0.51579416", "0.5132494", "0.51185185", "0.51001906", "0.507...
0.87589294
0
Pass in event time data, and if it has weeklyDays set as an array, this'll create it.
Передайте данные о времени события, и если он имеет weeklyDays, заданный как массив, это создаст его.
public static function createWithWeeklyRepeatSettings( $data ){ // Does the EventTime have weekly day settings? Handle them if( is_array($data->weeklyDays) && !empty($data->weeklyDays) ){ $eventTimeObj = self::create($data); foreach($data->weeklyDays AS $weekdayVa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWeeklyEventData($date) {\n //Check date format\n $format = \"m/d/Y\";\n $eventDate = date_create_from_format($format, $date);\n if(!$eventDate) {\n // createFromFormat returns false if the format is invalid or date is invalid\n echo \"Please enter a valid date in mm/dd/yyyy format...
[ "0.63646454", "0.61078703", "0.60518736", "0.59931827", "0.5979353", "0.5807703", "0.57028735", "0.56562424", "0.5647197", "0.5615875", "0.5581959", "0.55524", "0.5538791", "0.55185485", "0.5464966", "0.54249775", "0.54189676", "0.54146564", "0.54095715", "0.5395399", "0.5380...
0.7551199
0
/ The index displays various showroom views based on the url and routes as necessary This is for nonajax requests. _ajax handles ajax routing. expects parent showroom table object define the params position format: 0: category navigation main view 0 = off full flat url formats: categories: mysite.com/page_name/cat_id/c...
Индекс отображает различные виды выставочных залов в зависимости от URL и маршрутизирует их при необходимости. Это предназначено для не-ajax-запросов. _ajax обрабатывает маршрутизацию ajax. Ожидает родительский объект таблицы выставочного зала. Определяет параметры положения. Формат: 0: навигация по категориям, основно...
public function _index($showroom, $sub_tool=FALSE) { $url_array = uri::url_array(); list($page_name, $first_node, $item) = $url_array; $page_name = $this->get_page_name($page_name, 'showroom', $showroom->id); # parse the params. $params = explode('|',$showroom->params); $primary = new V...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexShowSet()\n {\n $navid = I('get.nav') ? I('get.nav') : 0;\n $pid = M('admin_nav')->where('id=' . $navid)->find()['pid'];\n $navpname = M('admin_nav')->where('id=' . $pid)->find()['name'];\n $navname = M('admin_nav')->where('id=' . $navid)->find()['name']...
[ "0.5846144", "0.5768744", "0.57163024", "0.5677874", "0.5632444", "0.563179", "0.5627742", "0.56003547", "0.55779153", "0.5572481", "0.5572465", "0.5538353", "0.5519627", "0.5491929", "0.5490459", "0.5484553", "0.54782385", "0.5467655", "0.5464991", "0.54649395", "0.5463428",...
0.7159128
0
/ $post_json = DB::table('posts as p')>leftjoin('users as u','u.id','p.user_id') >leftjoin('profiles as pr','pr.user_id','p.user_id') >select('p.id as post_id','u.image','u.name','u.gender','u.created_at','p.created_at','p.user_id','p.content','pr.city','pr.country','pr.about') >orderBy('p.created_at','DESC')>take(4) >...
$post_json = DB::table('posts as p')>leftjoin('users as u','u.id','p.user_id') >leftjoin('profiles as pr','pr.user_id','p.user_id') >select('p.id as post_id','u.image','u.name','u.gender','u.created_at','p.created_at','p.user_id','p.content','pr.city','pr.country','pr.about') >orderBy('p.created_at','DESC')>take(4) >ge...
public function posts() {; return post::with('user','like','comment')->orderBy('created_at','DESC')->take(4)->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllPostWithUserId(){\n $query = Post::orderBy('id','desc')->with('user')->paginate(5);\n return $query;\n }", "public function getAllpost(){\n return $slug=post::with('likes')->where('status',1)->orderBy('created_at','DESC')->paginate(4);\n\n }", "public function get...
[ "0.6928336", "0.66911304", "0.6641407", "0.66079164", "0.6559444", "0.64841306", "0.64818805", "0.64552283", "0.64498407", "0.6407084", "0.63904256", "0.6336262", "0.6325509", "0.63253176", "0.62544334", "0.62468064", "0.62280965", "0.6221604", "0.6193254", "0.618953", "0.617...
0.7565152
0
Check if entity class exist in Domain\Factory
Проверьте, существует ли класс сущности в Domain\Factory
public function testEntityClassExist() { $this->assertInstanceOf(TreeFactory::class, new TreeFactory()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasEntityClass(): bool\n {\n return $this->hasDataItem('entity');\n }", "protected function isEntity($class)\n {\n return Nishchay::getEntityCollection()->isExist($class);\n }", "public function hasEntity($name);", "public function createEntity() {\r\n\t\t$entity = $...
[ "0.6855368", "0.6752972", "0.6505902", "0.6486293", "0.6439892", "0.6329484", "0.6170979", "0.61544245", "0.6154387", "0.610311", "0.6046536", "0.5993165", "0.59035146", "0.59028155", "0.58715194", "0.5840061", "0.5828841", "0.58055365", "0.57630295", "0.5747926", "0.5738553"...
0.78773755
0
Check the return of entity get methods
Проверьте возврат методов получения сущности
public function testReturnOfEntityGetMethods() { $entity = TreeFactory::createFromArray($this->request); $this->assertEquals($this->request['id'], $entity->getId()); $this->assertEquals($this->request['age'], $entity->getAge()); $this->assertEquals($this->request['type'], $entity->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function actionsForGetMethod()\n {\n if (isset($this->id)) { /* If the variable id exists, it request to the model for the specific element */\n $data = $this->api->get($this->id);\n } else { /* If it does not exist, request all the elements */\n $data = $this->api->get();\n ...
[ "0.6865153", "0.6835807", "0.6709554", "0.6688856", "0.6628475", "0.6619118", "0.6436584", "0.64169824", "0.6315417", "0.62930727", "0.6282245", "0.627606", "0.6259087", "0.62590396", "0.62285894", "0.6220688", "0.6216046", "0.6192731", "0.6192731", "0.61875826", "0.61875826"...
0.7188854
0
Menampilkan seluruh halaman website beserta head dan layoutnya Merupakan method utama yang berhubungan langsung dengan view jika $file diisi dengan nama folder dan nama file akan otomatis ditacari lokasi folder dan viewnya berdasarkan root = system/view $var harus berbentuk array, key dari var nanti akan menjadi variab...
Показать всю страницу сайта вместе с head и layout. Это основной метод, связанный напрямую с view, если $file заполнен именем папки, то имя файла будет автоматически определено, а расположение папки и view будет определяться по root = system/view. $var должна быть массивом, ключи массива станут переменными, которые буд...
protected function view($var_and_file = array("content"=>"index.php"),$var = array()){ foreach($var_and_file as $variabel => $file){ if(is_object($file)||is_array($file)||strpos($file,".php")==0) $$variabel = $file; else $$variabel = $this->viewPartial($f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index(){\n\n\t\t//memanggil file view\n\t\t$this->load->view('variabelview', $data);//file view\n\t\t//deklarasi data\n\t\t$data = ['variabel1' => 'Data variabel ke-1', 'variabel2' => 'Data variabel ke-2'];\n\t}", "public function View($file,$data)\n {\n $path = '../view/'. $file . '....
[ "0.65311396", "0.6444334", "0.64245856", "0.6382996", "0.62439847", "0.6234691", "0.6196402", "0.6172213", "0.61573786", "0.6133989", "0.6130989", "0.6085823", "0.6025679", "0.6016848", "0.6016804", "0.5999175", "0.5988121", "0.5977091", "0.5955593", "0.5945905", "0.5938514",...
0.71688986
0
This is a small library for maintaining flash messages in PHP. It provides an easy way, for sending data back to the views, from the controller, by adding a "flash(type,message)" function. The flash message will only remain there for one request! Internally, the flash message is removed, once you open a new URI. In ord...
Это небольшая библиотека для управления сообщениями в PHP. Она предоставляет удобный способ отправки данных обратно в представления из контроллера с помощью функции "flash(type,message)". Сообщение всплеска останется только на один запрос! Внутренне сообщение всплеска удаляется, как только вы открываете новый URI. Чтоб...
function flash($type, $message) { // creates the flash holder, if not defined yet if(!isset($_SESSION['flash'])) { $_SESSION['flash'] = array(); $_SESSION['flash']['uri'] = $_SERVER['REQUEST_URI']; } // sets the message $_SESSION['flash'][$type] .= $message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFlash($type, $message)\n{\n $_SESSION['message'] = [$type, $message];\n}", "function setFlash($message, $type = 'success') {\n $this->session->set_flashdata($type, $message);\n }", "function flash_message($type, $message) {\n $_SESSION['message'] = array('type' => $type, 'message' =...
[ "0.78854036", "0.7882677", "0.7731601", "0.766042", "0.74942124", "0.74906397", "0.74906397", "0.74906397", "0.74906397", "0.74906397", "0.74600935", "0.74553406", "0.74356425", "0.74069107", "0.73409", "0.7314372", "0.72829664", "0.7235838", "0.7215568", "0.7212875", "0.7185...
0.8470573
0
Set the adapter instance that this ResultSet uses to access data Overrides method declared in \MphpFlickrBase\Result\ResultInterface and defined in \MphpFlickrBase\Result\AbstractResult
Установите экземпляр адаптера, который этот ResultSet использует для доступа к данным. Переопределяет метод, объявленный в \MphpFlickrBase\Result\ResultInterface и определенный в \MphpFlickrBase\Result\AbstractResult
public function setAdapter(ResultSetAdapterInterface $adapter) { $this->adapter = $adapter; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAdapter(\\MphpFlickrBase\\Adapter\\Interfaces\\Result\\ResultAdapterInterface $adapter)\n {\n $this->adapter = $adapter;\n return $this;\n }", "public function setAdapter(AdapterInterface $adapter);", "public function setAdapter(\\MphpFlickrBase\\Adapter\\Interfaces\\Resu...
[ "0.74992037", "0.6896711", "0.6705414", "0.66106063", "0.6476103", "0.6335383", "0.62929004", "0.62388504", "0.6216327", "0.6216327", "0.6167215", "0.6154692", "0.6154692", "0.6147213", "0.6092458", "0.60634893", "0.59717923", "0.5956674", "0.5951984", "0.5929317", "0.5911233...
0.7515713
0
Stop listening for signals
Остановить прослушивание сигналов
protected function stopSignalHandlers(): void { if (!$this->hasPcntl) { return; } foreach (array_keys($this->signalMap ?? []) as $number) { pcntl_signal((int)$number, \SIG_IGN); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stopListeningForEvents()\n\t\t{\n\n\t\t\t// Initialize the crontab manager if this has not been done before\n\t\t\tif(is_null($this->CronManager)) $this->CronManager = new ssh2_crontab_manager();\n\n\t\t\t// Stop cronjob to call $this-->captureSongHistory()\n\t\t\t$this->CronManager->remove_cronjob...
[ "0.6820771", "0.6741401", "0.66165894", "0.65198225", "0.64366806", "0.63450277", "0.625342", "0.6190189", "0.6142415", "0.61235464", "0.61235464", "0.61235464", "0.61235464", "0.61235464", "0.61235464", "0.61235464", "0.61235464", "0.6068847", "0.60241693", "0.59591633", "0....
0.70644444
0
Text rotated around its origin
Текст, повернутый вокруг его центра
function RotatedText($x,$y,$txt,$angle) { $this->Rotate($angle,$x,$y); $this->Text($x,$y,$txt); $this->Rotate(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RotatedText($x, $y, $txt, $angle)\n{\n $this->Rotate($angle,$x,$y);\n $this->Text($x,$y,$txt);\n $this->Rotate(0);\n}", "function RotatedText($x, $y, $txt, $angle){\r $this->Rotate($angle,$x,$y);\r $this->Text($x,$y,$txt);\r $this->Rotate(0);\r }", "fun...
[ "0.8031866", "0.7969082", "0.7833703", "0.76676804", "0.7578914", "0.75633496", "0.75633496", "0.7559466", "0.74850345", "0.74850345", "0.74850345", "0.74850345", "0.74850345", "0.74850345", "0.7457438", "0.73299927", "0.73299927", "0.7271759", "0.66924244", "0.5987366", "0.5...
0.80718625
1
Test the webhook payload getter for post resources.
Проверьте получатель webhook-загрузки для ресурсов post.
public function test_get_payload_for_posts() { $posts = array( 'course' => 'course', 'section' => 'section', 'lesson' => 'lesson', // 'membership' => 'llms_membership', // 'order' => 'llms_order', // 'access_plan' => 'llms_access_plan', // 'transaction' => 'llms_transaction', ); foreach ( $p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_is_valid_post_action() {\n\n\t\t$post_types = array(\n\t\t\t'course' => false,\n\t\t\t'section' => false,\n\t\t\t'lesson' => false,\n\t\t\t'llms_membership' => false,\n\t\t\t'llms_access_plan' => false,\n\t\t\t'llms_order' => false,\n\t\t\t'llms_transaction' => false,\n\t\t\t'post' => false,\n...
[ "0.6775112", "0.6717223", "0.64597887", "0.6414354", "0.5948832", "0.57707626", "0.5765653", "0.5738807", "0.57341164", "0.5733815", "0.5726662", "0.57045835", "0.5690671", "0.5605016", "0.5582922", "0.5582311", "0.55726343", "0.556818", "0.556052", "0.5555739", "0.5541805", ...
0.73993117
0
test get_payload() for enrollment resources.
тест get_payload() для ресурсов регистрации.
public function test_get_payload_for_enrollments() { $user = $this->factory->student->create(); $course = $this->factory->course->create(); llms_enroll_student( $user, $course ); // Created. $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld/200', 'topic' => 'e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_payload();", "public function testListEnrollmentRequests()\n {\n }", "public function testGetEnrollmentRequest()\n {\n }", "public function test_get_payload_for_users() {\n\n\t\t$roles = array( 'student', 'instructor' );\n\n\t\tforeach ( $roles as $role ) {\n\n\t\t\t$user_id =...
[ "0.61848366", "0.61655015", "0.59712195", "0.5848086", "0.58197737", "0.5783996", "0.5695787", "0.56252515", "0.5579024", "0.5502772", "0.54568917", "0.5454252", "0.54428804", "0.54428804", "0.54428804", "0.54428804", "0.54428804", "0.54428804", "0.54428804", "0.54428804", "0...
0.764388
0
Test enqueue for an action with a single hook.
Тестирование включения в очередь действия с одним хуком.
public function test_enqueue_single_hook() { $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld', 'topic' => 'course.created', ) ); $this->assertFalse( has_action( 'save_post_course', array( $webhook, 'process_hook' ) ) ); $webhook->enqueue(); $this->assertEqual...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_enqueue_custom_action() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'action.mock_hook',\n\t\t) );\n\n\t\t$this->assertFalse( has_action( 'mock_hook', array( $webhook, 'process_hook' ) ) );\n\t\t$webhook->enqueue...
[ "0.7913185", "0.69036895", "0.58308876", "0.5804853", "0.5781383", "0.5699493", "0.5627467", "0.5621423", "0.55851346", "0.55618197", "0.5535435", "0.5531496", "0.5525354", "0.55148923", "0.5461684", "0.5444214", "0.5423945", "0.53890985", "0.53890985", "0.53890985", "0.53890...
0.7682996
1
Test enqueue for an action with a multiple hooks.
Тестирование включения в очередь действия с несколькими хуками.
public function test_enqueue_multi_hooks() { $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld', 'topic' => 'enrollment.created', ) ); $this->assertFalse( has_action( 'llms_user_course_enrollment_created', array( $webhook, 'process_hook' ) ) ); $this->assertFalse...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_enqueue_custom_action() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'action.mock_hook',\n\t\t) );\n\n\t\t$this->assertFalse( has_action( 'mock_hook', array( $webhook, 'process_hook' ) ) );\n\t\t$webhook->enqueue...
[ "0.7505051", "0.71797514", "0.61014974", "0.6066115", "0.6040701", "0.60273206", "0.58165514", "0.58097744", "0.57961696", "0.5761374", "0.57340115", "0.56489944", "0.55245835", "0.5478411", "0.5464653", "0.5464211", "0.5458214", "0.5437563", "0.5381659", "0.53643095", "0.535...
0.7768156
0
Test enqueue for a custom action
Тестирование включения в очередь для пользовательского действия
public function test_enqueue_custom_action() { $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld', 'topic' => 'action.mock_hook', ) ); $this->assertFalse( has_action( 'mock_hook', array( $webhook, 'process_hook' ) ) ); $webhook->enqueue(); $this->assertEquals( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_enqueue_single_hook() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'course.created',\n\t\t) );\n\n\t\t$this->assertFalse( has_action( 'save_post_course', array( $webhook, 'process_hook' ) ) );\n\t\t$webhook->enqu...
[ "0.66528314", "0.6331517", "0.6298585", "0.62358356", "0.61810213", "0.61810213", "0.61810213", "0.61810213", "0.61810213", "0.61810213", "0.6005237", "0.599989", "0.591363", "0.5874427", "0.5870555", "0.58654994", "0.58612555", "0.585683", "0.5845598", "0.5786123", "0.578458...
0.8123564
0
Test the get_edit_link() method.
Проверьте метод get_edit_link().
public function test_get_edit_link() { $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld', 'topic' => 'course.created', ) ); $this->assertEquals( admin_url( 'admin.php?page=llms-settings&tab=rest-api&section=webhooks&edit-webhook=' . $webhook->get( 'id' ) ), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_link_to_edit($link)\n {\n }", "public function testEditGet() {\n\t\tRolesControllerTest::login($this);\n\n\t\t$this->testAction(\n\t\t\t'/rss_readers/rss_readers/edit/181',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'return' => 'contents'\n\t\t\t)\n\t\t);\n\t\t$this->assertTextEquals('...
[ "0.81177634", "0.71823436", "0.71409065", "0.70466703", "0.68440634", "0.6823274", "0.6823274", "0.6822226", "0.6757767", "0.6703", "0.6695805", "0.6651942", "0.6637052", "0.6568327", "0.6547046", "0.6539987", "0.6516833", "0.6510105", "0.6481844", "0.648163", "0.6447669", ...
0.77075785
1
Test the get_delete_link() method.
Проверьте метод get_delete_link().
public function test_get_delete_link() { $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld', 'topic' => 'course.created', ) ); $link = $webhook->get_delete_link(); $this->assertEquals( 0, strpos( admin_url( 'admin.php?page=llms-settings&tab=rest-api&section=webh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDeleteSharedLink()\n {\n }", "public function testDeleteUrlUsingDELETE()\n {\n }", "public function deleteTest()\n {\n $this->assertEquals(true, $this->object->delete(1));\n }", "function wp_delete_link($link_id)\n {\n }", "public function testDelete()\n\t...
[ "0.76816106", "0.7617397", "0.7116122", "0.69334507", "0.6909612", "0.6861607", "0.6855701", "0.68469334", "0.68462247", "0.68030876", "0.67462856", "0.67462856", "0.6721592", "0.67164534", "0.66753227", "0.6645198", "0.6633994", "0.6598091", "0.659382", "0.6565229", "0.65498...
0.8050503
0
Test validity of post actions.
Проверка корректности действий после выполнения.
public function test_is_valid_post_action() { $post_types = array( 'course' => false, 'section' => false, 'lesson' => false, 'llms_membership' => false, 'llms_access_plan' => false, 'llms_order' => false, 'llms_transaction' => false, 'post' => false, 'page' => false, ); $tests = array...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PostActions()\n {\n }", "private function checkFieldAction($postParams): bool\n {\n if (in_array($postParams['action'], ['allow', 'deny'])) {\n return true;\n }\n return false;\n }", "public function isPost();", "public function postAction() {}", "protec...
[ "0.7193369", "0.6864593", "0.6773083", "0.67485297", "0.67264366", "0.67017955", "0.6691384", "0.6637242", "0.6620985", "0.66118336", "0.6546393", "0.65440536", "0.6527647", "0.645493", "0.6445409", "0.6433633", "0.6432179", "0.6406805", "0.6402916", "0.6402916", "0.6402916",...
0.8205673
0
Test ping() on non 200 responses.
Тестирование ping() на ответах, отличных от 200.
public function test_ping_non_200_status() { $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld/400', 'topic' => 'course.created', ) ); add_filter( 'pre_http_request', array( $this, 'mock_request' ), 10, 3 ); remove_filter( 'llms_rest_webhook_pre_ping', '__return_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ping()\r\n {\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, \"http://\".WEMO_IP.\":\".WEMO_PORT);\r\n curl_setopt($ch, CURLOPT_NOBODY, true);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n ...
[ "0.74605244", "0.72552174", "0.72188735", "0.6934992", "0.6770625", "0.66013384", "0.65839064", "0.6576252", "0.65338784", "0.6524114", "0.65189195", "0.6494526", "0.6441195", "0.64316696", "0.64275175", "0.6398713", "0.63833714", "0.63263375", "0.63076246", "0.62390965", "0....
0.77054477
0
Test the delivery failure setter.
Проверьте установщик неудачи доставки.
public function test_set_delivery_failure() { $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld', 'topic' => 'student.created', 'status' => 'active', ) ); $i = 1; while ( $i <= 6 ) { $webhook = LLMS_Unit_Test_Util::call_method( $webhook, 'set_delivery_fail...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFailure()\n\t{\n\t\t$this->assert_succeed=false;\n\t\treturn $this;\n\t}", "public function testFaultyProperties()\n {\n $international = new International();\n\n try {\n $international->setProduct(str_repeat('a', 10));\n $this->fail('BpostInvalidValueExc...
[ "0.66873527", "0.6552462", "0.6300537", "0.6157473", "0.6115165", "0.6106833", "0.6106833", "0.61029744", "0.60515296", "0.6012674", "0.5961611", "0.59534323", "0.5908091", "0.5804586", "0.5784538", "0.57357496", "0.5735722", "0.57313514", "0.57271254", "0.5703072", "0.569082...
0.7385457
0
Test the status condition of the should_deliver() method.
Проверьте состояние условия метода should_deliver().
public function test_should_deliver_status() { $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld', 'topic' => 'student.created', ) ); // Inactive. $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->stud...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRedelivered();", "public function testGetEmailSendStatusForRecipient()\n {\n $eventCategories = [\n \"TransactionalSendEvents.EmailSent\",\n \"TransactionalSendEvents.EmailQueued\",\n \"TransactionalSendEvents.EmailNotSent\"\n ];\n\n $cli...
[ "0.65737", "0.64255226", "0.6284848", "0.6266403", "0.6175211", "0.6107369", "0.6006396", "0.59937835", "0.5992358", "0.59757423", "0.59074706", "0.58830893", "0.58819234", "0.5877905", "0.58589333", "0.58466536", "0.5838033", "0.58056027", "0.5802977", "0.5794272", "0.574703...
0.74917156
0
Test should_deliver() method with already processed hooks().
Тестировать метод should_deliver() с уже обработанными хуками().
public function test_should_deliver_already_processed() { $webhook = LLMS_REST_API()->webhooks()->create( array( 'delivery_url' => 'https://mock.tld', 'topic' => 'student.created', 'status' => 'active', ) ); $student_id = $this->factory->student->create(); // Not processed. $this->assertTrue( LLMS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_should_deliver_status() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'student.created',\n\t\t) );\n\n\t\t// Inactive.\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( ...
[ "0.6287777", "0.6016036", "0.6001454", "0.59350926", "0.5934533", "0.592048", "0.58115554", "0.57402754", "0.57313395", "0.5717726", "0.57007784", "0.5683815", "0.5617648", "0.5603163", "0.5546209", "0.5519887", "0.55197656", "0.5497974", "0.54967594", "0.54606134", "0.544544...
0.7709307
0
Getter for private price
Getter для приватного price
function getPrice() { return $this->price; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrice() {\n }", "public function get_price(){\n\t\treturn $this->price;\n\t}", "public function getPrice(){\n return $this->price;\n }", "public function getPrice();", "public function getPrice();", "public function getPrice();", "public function getPrice();", "public functi...
[ "0.8351246", "0.83403164", "0.83267134", "0.8311731", "0.8311731", "0.8311731", "0.8311731", "0.82948905", "0.82948905", "0.8276768", "0.8276768", "0.8265917", "0.82334334", "0.82334334", "0.80865043", "0.80865043", "0.80865043", "0.80865043", "0.80865043", "0.80865043", "0.8...
0.8390842
0
Setter for private price
Сеттер для приватного price
function setPrice($new_price) { $this->price = $new_price; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPrice($price)\n {\n $this->price = $price;\n }", "public function setPrice($price)\n {\n $this->price = $price;\n }", "function setItem_price($price){\n $this->item_price = $price;\n }", "public function setPrice($price)\n {\n return $this->set('price', $pr...
[ "0.8387861", "0.803968", "0.80267525", "0.7894892", "0.7838796", "0.7759153", "0.77490103", "0.7634211", "0.7561446", "0.75385493", "0.74996215", "0.74546003", "0.7429336", "0.74203455", "0.7391433", "0.7391433", "0.7309564", "0.72874904", "0.72758925", "0.72284347", "0.72284...
0.8331726
1
Getter for private miles
Getter для приватных миль
function getMiles() { return $this->miles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSmiles() {\n\t\treturn $this->smiles;\n\t}", "public function getMileage() {\n return $this->get(self::MILEAGE);\n }", "function getTotalMiles(){\n $steps_per_mile = $GLOBALS['STEPS_PER_MILE'];\n return round(getTotalSetps() / $steps_per_mile, 2);\n}", "public static function g...
[ "0.6799576", "0.6795047", "0.6690637", "0.6031188", "0.60289484", "0.59786355", "0.5879974", "0.5796738", "0.55998087", "0.5596299", "0.5548546", "0.55426836", "0.5447765", "0.54397196", "0.5395008", "0.53061396", "0.52956563", "0.52625287", "0.52316535", "0.5205676", "0.5196...
0.80574423
0