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
Handle the article "deleted" event.
Обработка события "удалено" статьи.
public function deleted(Article $article) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleDeleted(Deleted $event): void\n {\n $entity = $event->entity();\n\n $this->scheduleRemovingOldDocuments($entity);\n\n $this->elasticsearchManager->commit();\n }", "public function deleteArticle(): void\n {\n $this->articleId = $_GET['deleteId'];\n\n ...
[ "0.7087722", "0.7019726", "0.68952686", "0.6866915", "0.67814153", "0.67567617", "0.67555803", "0.6750633", "0.6691592", "0.66795015", "0.66701895", "0.66592854", "0.6648249", "0.6615855", "0.6586728", "0.6582891", "0.6579901", "0.65776056", "0.6562586", "0.6556635", "0.65526...
0.771325
0
Handle the article "restored" event.
Обработайте событие "статья восстановлена".
public function restored(Article $article) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restored(Document $document)\n {\n //\n }", "function restoreArticle($accountId, $articleId)\n {\n // update the database\n mysql_query(\"UPDATE argus_saved_articles SET status='SAVED' WHERE account_id = '\".$accountId.\"' AND saved_article_id = '\".$arti...
[ "0.6418015", "0.64027333", "0.63659656", "0.6340953", "0.63122785", "0.6301364", "0.6143056", "0.6039298", "0.60353076", "0.6023699", "0.6021877", "0.6021877", "0.60056734", "0.59826285", "0.59790856", "0.5978622", "0.596696", "0.59533626", "0.5953029", "0.5953029", "0.595302...
0.7296646
0
Handle the article "force deleted" event.
Обработка события "статья удалена принудительно".
public function forceDeleted(Article $article) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleted(Article $article)\n {\n //\n }", "public function onBeforeDelete();", "protected function _postDelete() {}", "protected function _postDelete() {}", "protected function afterDelete()\r\n {\r\n }", "public function onAfterDelete() {\n\t\tparent::onAfterDelete();\n...
[ "0.735307", "0.71821976", "0.71476066", "0.7147364", "0.7061638", "0.7032354", "0.69855005", "0.69759375", "0.69478565", "0.6932825", "0.6873485", "0.68435514", "0.6828872", "0.6807576", "0.67816925", "0.6770911", "0.67274284", "0.6707876", "0.6684959", "0.66434", "0.66096026...
0.7735243
0
Updates an existing FacturaGastos model. If update is successful, the browser will be redirected to the 'view' page.
Обновляет существующую модель FacturaGastos. Если обновление успешно, браузер будет перенаправлен на страницу 'view'.
public function actionUpdate($id) { $this->layout ="main-admin"; $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id_factura_gastos]); } else { return $this->rend...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate($id) {\n $model = $this->loadModel($id);\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['NubeFactura'])) {\n $model->attributes = $_POST['NubeFactura'];\n ...
[ "0.68579215", "0.6842699", "0.67270225", "0.66001326", "0.6575052", "0.6437881", "0.6400569", "0.63786995", "0.6373376", "0.637138", "0.6363588", "0.63323665", "0.6303967", "0.62889224", "0.6274382", "0.6267757", "0.6264036", "0.6260078", "0.62341714", "0.6218727", "0.6201803...
0.7221478
0
Gets movie information by a string
Получает информацию о фильме по строке
public function getByString($movie){ $url = "http://www.omdbapi.com/?t=".urlencode($movie)."&y=&plot=short&r=json"; if($json = file_get_contents($url)){ $info = json_decode($json); if(isset($info->Title) && $info->Title !=''){ return $info->Title."(".$info->Year....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMovieInformation($movie)\n{\n if($movie != \"\") {\n $OMDB_API_KEY = '99842c57';\n $omdbUrl = \"http://www.omdbapi.com?s=$movie&apikey=$OMDB_API_KEY&type=movie\";\n $movie = file_get_contents($omdbUrl);\n\n $movieDetails =json_decode($movie, true);\n\n \n if(count($movie...
[ "0.6463239", "0.59844595", "0.5968494", "0.5854798", "0.5734729", "0.5726442", "0.5692581", "0.5684597", "0.5640007", "0.5587775", "0.55755264", "0.55613106", "0.5544933", "0.55266213", "0.55266213", "0.55053025", "0.5492138", "0.5454658", "0.54163796", "0.5406832", "0.540473...
0.7809437
0
08.21.2015 ghh this function deals with looking up an item in order to calculate its cost for the current dealership
08.21.2015 ghh эта функция занимается поиском элемента с целью расчета его стоимости для текущего дилерского центра
function getItemCost( $itemid, $dealerid, $pricecode, $cost, $list ) { global $db; //08.21.2015 ghh - first we're going to see if there is a dealer specific price for //this item and if so we'll just pass it back $query = "select DealerCost from ItemCost where ItemID=$itemid and DealerID=$dealerid"; if (!$resul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUnitCost( $modelid, $dealerid, $cost )\n{\nglobal $db;\n\n//08.21.2015 ghh - first we're going to see if there is a dealer specific price for \n//this item and if so we'll just pass it back\n$query = \"select Cost from UnitModelCost where ModelID=$modelid and \n\t\t\t\tDealerID=$dealerid\";\nif (!$res...
[ "0.73825455", "0.67635363", "0.6667434", "0.6462335", "0.6318997", "0.62537485", "0.61736953", "0.6113484", "0.60957515", "0.6002453", "0.5979313", "0.59733385", "0.59671116", "0.59244585", "0.5916088", "0.5878113", "0.5864756", "0.58486265", "0.583431", "0.58190787", "0.5813...
0.7816782
0
08.25.2015 ghh this function deals with looking up a model in order to calculate its cost for the current dealership
08.25.2015 ghh эта функция предназначена для поиска модели с целью расчета её стоимости для текущего дилерского центра
function getUnitCost( $modelid, $dealerid, $cost ) { global $db; //08.21.2015 ghh - first we're going to see if there is a dealer specific price for //this item and if so we'll just pass it back $query = "select Cost from UnitModelCost where ModelID=$modelid and DealerID=$dealerid"; if (!$result = $db->sql_quer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCost();", "public function model()\n {\n return Cost::class;\n }", "public function show(VehicleRequest $request)\n {\n \n $input = $request->input();\n $cost = $request->input('purchase_cost');\n\n\n \n // depreciation\n $depreciation = n...
[ "0.6441135", "0.6173662", "0.60810155", "0.6068854", "0.5973467", "0.594401", "0.59191006", "0.57530713", "0.57348126", "0.5643641", "0.5623484", "0.56046253", "0.55899996", "0.5576606", "0.55431503", "0.5489911", "0.54556817", "0.5444968", "0.5442407", "0.5439247", "0.543860...
0.71803933
0
08.26.2015 ghh this function retrieves shipvendor name and returns it
08.26.2015 ghh эта функция получает имя поставщика судна и возвращает его
function getShipVendorName( $shipvendorid ) { global $db; $query = "select ShipVendorName from ShippingVendors where ShipVendorID=$shipvendorid"; if (!$tmpresult = $db->sql_query($query)) { RestLog("Error 16601 in query: $query\n".$db->sql_error()); RestUtils::sendResponse(500, "16601 - There was a problem get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVendorName(): string;", "function getVendorname(){\r\n return $this->vendorname;\r\n }", "public function getShipname()\n {\n return $this->shipname;\n }", "public function getVendorName(): string\n {\n return 'local';\n }", "public function getShipNam...
[ "0.7136825", "0.7092398", "0.6576986", "0.6573904", "0.64686435", "0.64611036", "0.6413736", "0.63894826", "0.6336757", "0.61387306", "0.6106339", "0.6106332", "0.60968894", "0.6019106", "0.5995813", "0.5941029", "0.5828133", "0.58256876", "0.5783472", "0.5782342", "0.5780610...
0.8080949
0
returns array with all values from a given section
возвращает массив со всеми значениями из заданного раздела
public function getSection($section) { $data=[]; foreach($this->settings AS $name=>$settingData) { if($section===$settingData['section']) { $data[$name]=$this->get($name); } } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getData($section = null)\n {\n $config = Config::getInstance();\n\n if(!$section)\n return $config->data;\n else\n {\n $values = array();\n\n foreach($config->data as $key => $value)\n ...
[ "0.69068193", "0.68180704", "0.6641202", "0.658758", "0.6574381", "0.6548997", "0.64513963", "0.6376657", "0.6373854", "0.63614976", "0.63369614", "0.6296561", "0.62773", "0.62386906", "0.6222597", "0.6219265", "0.62117183", "0.62105864", "0.618181", "0.61688817", "0.61688584...
0.7026429
0
fetches all options to cache
загружает все опции для кэширования
public function fetchAll() { $settings=$this->em->getRepository('CreavoOptionBundle:Setting')->findAll(); /** @var Setting $setting */ foreach($settings AS $setting) { $this->addToCache($setting); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCacheOptions();", "public function cacheOptions ()\n {\n\n foreach ( $this->optionsToPersist as $option ) {\n\n $this->optionsCache[ $option ] = $this->getOption ( $option );\n\n }\n\n }", "public \tfunction\tretrieveOptions() {\n\t\t\t//For each option categor...
[ "0.7268947", "0.7268178", "0.68475544", "0.6625522", "0.6381333", "0.6301372", "0.6260428", "0.6176879", "0.60747427", "0.6051961", "0.60417885", "0.5985683", "0.59673333", "0.59346783", "0.59316635", "0.59224695", "0.59152085", "0.59088993", "0.58953696", "0.58949435", "0.58...
0.7315877
0
adds a setting to the cache
добавляет настройку в кэш
protected function addToCache(Setting $setting) { $this->settings[$setting->getName()]=$setting->toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function storeCacheSetting()\n {\n Cache::forever('setting', $this->setting->getKeyValueToStoreCache());\n }", "function wp_cache_add($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->add($key, $value, $group, $expiration);\n}", "f...
[ "0.7081158", "0.6737219", "0.65740365", "0.65041476", "0.6355629", "0.6296402", "0.6277461", "0.62366873", "0.62213206", "0.6219048", "0.6195598", "0.61488736", "0.6121935", "0.6042896", "0.6040885", "0.60152656", "0.6006894", "0.600595", "0.59982073", "0.5989549", "0.5983327...
0.7340887
0
Instance of the Role class.
Экземпляр класса Role.
public static function role(): Role { return new Role; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->Role = new Role();\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Role');\n }", "public function role()\n {\n return $this->hasOne('App\\Models\\Role');\n }", "public function model()\n {\n...
[ "0.77834207", "0.71343595", "0.70198596", "0.7002539", "0.7002539", "0.7002539", "0.7002539", "0.7002539", "0.6984974", "0.69798034", "0.69798034", "0.69757116", "0.6935079", "0.6877051", "0.68580973", "0.6836532", "0.6748584", "0.67075443", "0.6705221", "0.6689035", "0.66845...
0.8271709
0
/ Get last added site
/ Получить последний добавленный сайт
private function getLastSite() { $repository = $this->getDoctrine() ->getRepository('AppBundle:Site'); return $repository-> findOneBy(['isModerated' => '1'],['id' => 'DESC']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function last()\n {\n return $this->execGetRequest(['allow_state' => true], UrlBuilder::RESOURCE_GET_LATEST_NEWS);\n }", "public function get_last_url_request() {\n\t\treturn $this->_last_url_request;\n\t}", "public function getUrl()\n {\n return $this->lastUrl;\n }", "public...
[ "0.68619466", "0.68574226", "0.6604839", "0.6493649", "0.64382714", "0.6411656", "0.63763833", "0.63734347", "0.6371999", "0.636809", "0.63617903", "0.63151956", "0.6259804", "0.62585896", "0.6230022", "0.6228856", "0.62230706", "0.62095916", "0.62095916", "0.6195821", "0.619...
0.79681635
0
Saves a state related to an interactionID. Example: Clicking an option will bring you to a new question state. We want to know what the resulting state (or destination) of this interaction on the option brought someone to. This insertion will allow us to track that.
Сохраняет состояние, связанное с идентификатором взаимодействия. Пример: нажатие на опцию приведет вас к новому состоянию вопроса. Мы хотим знать, какое состояние (или назначение) этого взаимодействия на опции приведет кого-либо к следующему шагу. Эта вставка позволит отследить это.
private function insertState($interactionID, $stateID) { /************************************** ** WARNING!!!!!! ** ** ** ** NO VALIDATION OCCURS HERE. ** ** ONLY CALL FROM $this->insert() ** ***************...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save($state);", "function insertJointSourceState($jointSourceId, $state = STATE_PUBLISHED) {\n\n global $DATABASE;\n $accountId = \\Session\\getAccountId();\n\n $stateEncoded = encodeState($state);\n\n $result = query(\"INSERT INTO jointsources_states\n (`jointsource_id`, `author...
[ "0.5938603", "0.56179863", "0.5570784", "0.5551435", "0.5532026", "0.54963744", "0.54621977", "0.51635957", "0.5058857", "0.49947414", "0.4986856", "0.49748155", "0.4966034", "0.4945887", "0.4932158", "0.48915535", "0.48882657", "0.486293", "0.48371324", "0.48259965", "0.4815...
0.7648632
0
Main processor for this github webhook: check that each commit has a "Signedoffby" line.
Основной процессор для этого github webhook: проверить, что каждый коммит содержит строку "Signedoffby".
function signed_off_by_checker($commit, $config, &$msg_out) { # Skip this commit if it's a merge commit and we've been told to # skip merge commits. if (isset($config["ignore merge commits"]) && $config["ignore merge commits"] && count($commit->{"parents"}) > 1) { return true; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verify_request ($body) {\n\tglobal $config;\n\treturn strpos($_SERVER['HTTP_USER_AGENT'], 'GitHub-Hookshot') !== false &&\n\t\thash_equals($_SERVER['HTTP_X_HUB_SIGNATURE'], 'sha1=' . hash_hmac('sha1', $body, $config->token));\n}", "public function checkForFollowUpNotClicked()\n {\n $now = Carb...
[ "0.52288663", "0.48526266", "0.4793062", "0.47879916", "0.4779021", "0.47446674", "0.47388566", "0.4736664", "0.4712275", "0.46846378", "0.46775663", "0.46686238", "0.46414825", "0.46202186", "0.46199876", "0.46018803", "0.46017623", "0.45613343", "0.45521912", "0.45517388", ...
0.7321973
0
Gets a list of countries that Paystack currently supports
Получает список стран, которые Paystack в настоящее время поддерживает
public function countries(): array { return $this->client->get("country"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountryList()\n {\n return $this->call('country.list');\n }", "public function getCountrylist()\n {\n $cachePool = new FilesystemAdapter('', 0, \"cache\");\n \n if ($cachePool->hasItem('countries')) {\n $countries = $cachePool->getItem('countries...
[ "0.82328606", "0.79425204", "0.7853372", "0.7819766", "0.7788552", "0.7752574", "0.7745809", "0.77285737", "0.7712425", "0.76149666", "0.75923795", "0.755674", "0.7508336", "0.7477317", "0.74669105", "0.742322", "0.7414343", "0.7392078", "0.73531646", "0.7339168", "0.73372555...
0.8069366
1
Get a list of states for a country for address verification.
Получить список стран для страны для проверки адреса.
public function states(string $country): array { $params['country'] = $country; return $this->client->get("address_verification/states", $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllStates(Country $country) {\n $out = [];\n $r = $this->db->query(\"SELECT divcode, divname FROM country_state WHERE country = '{$country->code}'\");\n while($row = $r->fetchArray(SQLITE3_ASSOC)) {\n $out[$row['divcode']] = $row['divname'];\n }\n return $out;\n }", "public funct...
[ "0.7579769", "0.74495417", "0.72990924", "0.72704816", "0.72699696", "0.7187907", "0.7137268", "0.70176685", "0.6987478", "0.6966189", "0.67869556", "0.6778944", "0.6775856", "0.6770199", "0.6745136", "0.67390084", "0.67341036", "0.6726711", "0.66620976", "0.663287", "0.66157...
0.83598095
0
Helper method to create a resource response from arbitrary JSON.
Помощь метод для создания ответа ресурса из произвольного JSON.
protected function createResponse($json = NULL) { $response = new ResourceResponse(); if ($json) { $response->setContent($json); } return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function instantiateJsonResource($payload)\n {\n return new JsonResource($payload);\n }", "private function _createJson()\n {\n return new SlimBootstrap\\ResponseOutputWriter\\Json(\n $this->_request,\n $this->_response,\n $this->_headers,\n ...
[ "0.63463795", "0.6201093", "0.61457247", "0.60321003", "0.5983709", "0.59776056", "0.59756637", "0.59735614", "0.5971271", "0.59570324", "0.59452164", "0.59303325", "0.5910199", "0.588668", "0.5855579", "0.58547795", "0.5849975", "0.5846977", "0.5828988", "0.58284366", "0.578...
0.753264
0
Creates the archive navigation menu
Создает меню навигации по архиву
function create_archive_nav_menu($arr) { // start the html $html = '<nav id="archmenuWP">'; $html .= '<ul class="archlev1 archmenu_list_years" id="archmenu">'; $years = array_keys($arr); foreach($years as $y) { $html .= '<li id="archmenu_li_y_' . $y . '">'; $html .= make_link($...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createMenu()\n {\n $parent = $this->Menu()->findOneBy(['label' => 'Artikel']);\n\n $this->createMenuItem(\n [\n 'label' => 'Custom sort',\n 'controller' => 'CustomSort',\n 'action' => 'Index',\n 'active' => 0,\n...
[ "0.7171481", "0.6945307", "0.6945307", "0.6945307", "0.6945307", "0.6945307", "0.6945307", "0.6941667", "0.68168396", "0.6654495", "0.6566183", "0.64741063", "0.6412446", "0.63486564", "0.6347025", "0.6336897", "0.6327642", "0.6316865", "0.63029736", "0.6295385", "0.6288747",...
0.74843824
0
returns a multidimensional array of year>count, year>months, month>count, month>titles, titles>id>title
возвращает многомерный массив year>count, year>months, month>count, month>titles, titles>id>title
function create_archive_nav_array() { $start_and_end_dates = blog_first_and_last_dates(); $start_date = $start_and_end_dates[0]; $end_date = $start_and_end_dates[1]; $start_year = strftime("%Y", strtotime($start_date)); $end_year = strftime("%Y", strtotime($end_date)); $titles_counts_array = array(); // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArchiveList()\n {\n $sql = \"SELECT LEFT(`published`, 7) AS `year_month`, COUNT(*) AS `count` FROM `blog_articles` WHERE `published` < NOW() GROUP BY `year_month` ASC\";\n $rows = $this->db->fetchAll($sql);\n\n $years = [];\n foreach ($rows as $row) {\n list($y...
[ "0.6927135", "0.64077973", "0.6244798", "0.61899984", "0.61556554", "0.6109561", "0.6095441", "0.60229987", "0.6020714", "0.5993763", "0.58583415", "0.5840325", "0.5838804", "0.5833816", "0.5798698", "0.57857996", "0.57696384", "0.57665646", "0.5762026", "0.571803", "0.571131...
0.7354749
0
Test that the request object extends the abstract
Тестирование того, что объект запроса расширяет абстрактный
public function testConstruct() { $request = $this->createRequest(); $this->assertInstanceOf('Nimbles\Core\Request\RequestAbstract', $request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function is_base_request()\n {\n }", "abstract public function request();", "public function isRequest();", "public function testToRequest(): void\n {\n $request = new Request([\n 'banana' => 'strawberry',\n ]);\n $this->assertInstanceOf(IllRequest::...
[ "0.68234825", "0.65541375", "0.6515897", "0.642222", "0.63653684", "0.6318197", "0.6315014", "0.6287202", "0.6258766", "0.6159344", "0.6150151", "0.6033908", "0.6005173", "0.60037893", "0.5980461", "0.5972225", "0.5972225", "0.5960055", "0.5947187", "0.5937627", "0.5937627", ...
0.71765363
0
Tests using the session, when accessing via request, the session should be read only
Тесты, использующие сессию, при доступе через запрос, должны читать сессию только для чтения
public function testSession() { static::$_session = array( 'test1' => 'abc', 'test2' => 123 ); $request = $this->createRequest(); $this->assertInstanceOf('Nimbles\Http\Session', $request->getSession()); $this->assertInstanceOf('Nimbles\Http\Session', $r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetSession()\n {\n $this->assertEquals('session value', $this->_req->getSession('my_test_session'));\n }", "function testGetUserBySession() {\n $this->assertFalse(Sessions::getUserBySession());\n }", "public function hasSession() {}", "function sys_session_test(){\n se...
[ "0.75726557", "0.7043142", "0.6947678", "0.6880947", "0.68456274", "0.6824789", "0.65769595", "0.6544459", "0.6535287", "0.6527015", "0.6481161", "0.6432103", "0.63958305", "0.63890475", "0.6377414", "0.6365313", "0.63555497", "0.6343835", "0.6342051", "0.63329786", "0.629024...
0.7436899
1
Tests getting the port
Тестирование получения порта
public function testGetPort() { static::$_server = array( 'SERVER_PORT' => '80' ); $request = $this->createRequest(); $this->assertEquals(80, $request->getPort()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_getport_is_returning_the_correct_value(): void\n {\n $expected = 896;\n $actual = $this->secureRequest->getPort();\n $this->assertEquals($expected, $actual);\n }", "public function getPort() {}", "final public function getPort(): int {}", "protected function ge...
[ "0.7995592", "0.7878456", "0.76549435", "0.75793535", "0.7575332", "0.7500126", "0.7500126", "0.7500126", "0.7500126", "0.74999326", "0.74018097", "0.73659337", "0.7318871", "0.72774947", "0.72529423", "0.7196392", "0.7187571", "0.710005", "0.7051977", "0.7046147", "0.6994843...
0.8006574
0
Tests that the body of the request is retrieved correctly
Тестирование того, что тело запроса получается корректно
public function testGetBody() { $request = $this->createRequest(); static::setInput('hello world'); $this->assertEquals('hello world', $request->getBody()); $this->assertEquals('hello world', $request->body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetRequest()\n {\n $response= $this->apiObject->getRequest();\n $request=$response->getBody()->getContents();\n $this->assertMatchesJsonSnapshot($request);\n echo('\n El request recibido:\n '.$request);\n }", "abstract public function getRequest...
[ "0.72822946", "0.71747833", "0.7147613", "0.7130142", "0.6728743", "0.6632701", "0.66032916", "0.65649486", "0.65515965", "0.649139", "0.6465092", "0.6458552", "0.6427771", "0.6362577", "0.6361816", "0.63154215", "0.6249263", "0.62427676", "0.62036306", "0.6162646", "0.614714...
0.84744406
0
Data provider for headers
Поставщик данных для заголовков
public function headerProvider() { return array( array('User-Agent', 'test'), array('X-Custom', 'value'), array('Accept', 'text/plain'), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHeaderData() {}", "public function getHeaders()\n {\n }", "public function getHeaders()\n {\n }", "public abstract function getHeaders();", "public function getHeaders() {}", "public function get_headers()\n {\n }", "public function get_headers()\n {\...
[ "0.68964887", "0.6823706", "0.6823706", "0.6798505", "0.6778691", "0.676379", "0.67631537", "0.67631537", "0.6751685", "0.67475873", "0.66890407", "0.66890407", "0.66890407", "0.66890407", "0.66890407", "0.66890407", "0.66890407", "0.66890407", "0.66890407", "0.66890407", "0....
0.74517184
0
Index page for Admin Teams
Страница индекса для Административных команд
public function index() { return view('admin::management.admin_teams_manager.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function index()\n\t{\n\t\t$teams = $this->teams->retrieve_with_field();\n\n\t\t$data = array(\n\t\t\t'title' => 'Teams',\n\t\t\t'teams' => $teams,\n\t\t\t'js' => array(''),\n\t\t\t'css' => array('/styles/admin.css'),\n\t\t\t'sidenav' => self::$user_links\n\t\t);\n\n\t\t$this->load->view('admin/show_all_teams.php'...
[ "0.7514271", "0.74876475", "0.7446683", "0.7314998", "0.72911364", "0.7218733", "0.7192002", "0.71891284", "0.71735555", "0.71319366", "0.7106088", "0.7044672", "0.7031703", "0.7031703", "0.7021351", "0.6980214", "0.69531024", "0.6950973", "0.69330543", "0.69053555", "0.68823...
0.7571364
0
INPUT : $students Array OUTPUT : Return an Array of student names (String)
Вход: массив $students Выход: вернуть массив имен студентов (String)
function getStudentNames($students) { $arr = []; // Part A // YOUR CODE GOES HERE foreach ($students as $student_arr) { if (isset($student_arr["name"])) array_push($arr, $student_arr["name"]); } return $arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_group_student_names( $group_id ) {\n\t$uc_students = get_post_meta( $group_id, 'students', true );\n\n\t$i = 0;\n\t$student_names = '';\n\twhile ( $i < count($uc_students) ) {\n\t\t$student_names .= get_student_name( $uc_students[$i] );\n\t\t$i++;\n\t\tif ( $i < count($uc_students) )\n\t\t\t$student_n...
[ "0.70306975", "0.6579975", "0.63303775", "0.63256615", "0.63032025", "0.6245081", "0.6180414", "0.61148536", "0.59291774", "0.59237725", "0.58872175", "0.5886358", "0.5884633", "0.5880944", "0.58615124", "0.5853843", "0.5846839", "0.5746795", "0.57008266", "0.5672646", "0.564...
0.7735139
0
Get the dynamic contact_person_title attribute
Получить динамический атрибут contact_person_title
public function getContactPersonTitleAttribute() { return $this->contactPerson ? $this->contactPerson->role : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_title() {\n\t\treturn $this->get_mapped_property('title');\n }", "function title( $contentObjectAttribute, $name = null )\n {\n $content = $contentObjectAttribute->content();\n return $content['value'];\n }", "public function title() { \n $title = $this->content()->get...
[ "0.6601463", "0.6491276", "0.64342755", "0.63133115", "0.6276941", "0.627448", "0.6271542", "0.62488955", "0.6227408", "0.619967", "0.61827224", "0.61270964", "0.6102998", "0.6096244", "0.60848504", "0.60625774", "0.6048876", "0.6048876", "0.6031329", "0.6016919", "0.6007098"...
0.703518
0
Accessor for open_date attribute
Аксессор для атрибута open_date
public function getOpenDateAttribute($date) { return $date ? Carbon::parse($date) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOpenDate() {\n\t\treturn $this->data_array['open_date'];\n\t}", "public function setOpenDateAttribute($date)\n {\n $this->attributes['open_date'] = $date ? Carbon::parse($date) : null;\n }", "public function getOpendate()\n {\n return $this->_opendate;\n }", "public func...
[ "0.80150354", "0.73169804", "0.696345", "0.68872076", "0.6631332", "0.6610958", "0.64985543", "0.63983303", "0.6390778", "0.63734436", "0.63685805", "0.6362527", "0.63585854", "0.634004", "0.6310073", "0.6310073", "0.6310073", "0.6310073", "0.6310073", "0.6310073", "0.6310073...
0.7663086
1
Mutator for open_date attribute
Мутатор для атрибута open_date
public function setOpenDateAttribute($date) { $this->attributes['open_date'] = $date ? Carbon::parse($date) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOpenDate() {\n\t\treturn $this->data_array['open_date'];\n\t}", "public function getOpenDateAttribute($date)\n {\n return $date ? Carbon::parse($date) : null;\n }", "public function setModDate($date) {}", "public function setDate($date);", "public function setOpen($open) {}", "pu...
[ "0.681569", "0.6785898", "0.6510898", "0.646738", "0.64538765", "0.64537984", "0.6318102", "0.6214314", "0.6205586", "0.618598", "0.61786693", "0.6113981", "0.6052205", "0.6009255", "0.6003837", "0.59999603", "0.59823465", "0.59552974", "0.5945108", "0.5889146", "0.5889146", ...
0.77807766
0
Helper to generate a random WKT string Try to keeps values sane, no shape is more than 100km across
Помощник для генерации случайной строки WKT Попытайтесь сохранять значения разумными, никакая форма не должна превышать 100 км в диаметре
function wkt_generate() { $types = array( 'point', 'linestring', 'polygon', 'multipoint', 'multilinestring', 'multipolygon', ); // don't always generate the same type shuffle($types); $type = $types[0]; $func = 'wkt_generate_' . $type; if (method_exists($t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wkt() {\n $wkt_string = '';\n $wkt = 'LINESTRING(';\n for ($i = 0; $i < count($this->geometries); $i++) {\n if (count($this->geometries[i]['coords']) === 0) {\n return 'LINESTRING(empty)';\n } else {\n $coords = $this->geometries[i][...
[ "0.6305082", "0.6034616", "0.59992707", "0.5904042", "0.57367915", "0.5662001", "0.56549805", "0.5563936", "0.550679", "0.55066264", "0.55014354", "0.54956836", "0.5422564", "0.5392293", "0.53797483", "0.5377782", "0.5359167", "0.5356885", "0.5356478", "0.53319204", "0.532491...
0.7097173
0
Set the value of idreevext.
Установите значение idreevext.
public function setIdreevext($idreevext) { $this->idreevext = $idreevext; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setid_exp($val)\n { $this->id_exp=$val;}", "function setid_exp($val)\n { $this->id_exp=$val;}", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function setidExamen($Valor){\r\n $this->idExamen = trim($Valor);\r\n }",...
[ "0.6885448", "0.68168837", "0.68168837", "0.6225238", "0.6004441", "0.5813483", "0.58005536", "0.5741478", "0.57302153", "0.5723305", "0.5696193", "0.5683559", "0.5655526", "0.5621757", "0.55848926", "0.55758977", "0.5569538", "0.5569384", "0.55664283", "0.5560925", "0.554576...
0.7278928
0
Get the value of idreevext.
Получите значение idreevext.
public function getIdreevext() { return $this->idreevext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Public function get_ididtypeexp()\n\t\t{\n\t\t\tReturn $this ->idtypeexp;\n\t\t}", "function getid_exp()\n { return $this->id_exp;}", "function getid_exp()\n { return $this->id_exp;}", "function getid_exp()\n { return $this->id_exp;}", "public functi...
[ "0.6589508", "0.6485974", "0.64740366", "0.64740366", "0.63102365", "0.62715966", "0.6199353", "0.6197915", "0.6048775", "0.60483843", "0.59944594", "0.5978289", "0.5975757", "0.59104896", "0.5901982", "0.5901641", "0.5873187", "0.58712727", "0.58508873", "0.5835513", "0.5835...
0.8024223
0
Get the value of ubicacion.
Получите значение ubicacion.
public function getUbicacion() { return $this->ubicacion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_ubicacion()\n {\n $usuario = consultas::get_pf();\n $dep = consultas::get_dep_habilitada();\n if($usuario == 'acor_mesa')\n {\n if($dep['id_dep'] == 3)\n { //-- 3:Mesa de EyS --//\n $datos['motivo'] = 'and m1.id_motivo = 10'; //-- 10:...
[ "0.6577382", "0.6303181", "0.6133031", "0.6133031", "0.6125839", "0.6061697", "0.59556115", "0.59310496", "0.59006804", "0.589204", "0.58556926", "0.5822034", "0.57913905", "0.57847756", "0.5716602", "0.5688839", "0.5681292", "0.56684625", "0.56446207", "0.5643767", "0.561048...
0.72926635
1
Set the value of ubicacion_lugar.
Задайте значение ubicacion_lugar.
public function setUbicacionLugar($ubicacion_lugar) { $this->ubicacion_lugar = $ubicacion_lugar; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUbicacionLugar()\n {\n return $this->ubicacion_lugar;\n }", "public function setSlugAttribute($value) {\n $this->attributes['slug'] = Str::slug($this->titre);\n }", "public function set_atletas_talla_ropa_buzo($atletas_talla_ropa_buzo) {\n $atletas_talla_ropa_u ...
[ "0.6037762", "0.5145679", "0.49458802", "0.4919725", "0.48326263", "0.47729024", "0.4758893", "0.47262627", "0.4710221", "0.47008646", "0.468209", "0.4676038", "0.46743947", "0.46565852", "0.4655925", "0.4638332", "0.46326086", "0.46310472", "0.46256366", "0.46256366", "0.462...
0.71171075
0
Get the value of ubicacion_lugar.
Получить значение ubicacion_lugar.
public function getUbicacionLugar() { return $this->ubicacion_lugar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUbicacionLugar($ubicacion_lugar)\n {\n $this->ubicacion_lugar = $ubicacion_lugar;\n\n return $this;\n }", "function Get_NombreCancha($identificador)\n{\n global $conexion;\n $valor = mysqli_fetch_array(consultar(\"SELECT nombre\n FROM tb_lugares WHERE id_lugar=$i...
[ "0.623128", "0.55721927", "0.5562899", "0.5562899", "0.55535555", "0.5519875", "0.5313222", "0.5300338", "0.5299393", "0.52624273", "0.5251565", "0.5206117", "0.5206117", "0.5206117", "0.5192006", "0.5165309", "0.5114181", "0.5100139", "0.509185", "0.50883687", "0.5062936", ...
0.74349856
0
Get the value of sello.
Получите значение sello.
public function getSello() { return $this->sello; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSelected() {}", "public function getSelected() {}", "protected function getSelectedValue() {}", "public function get_value() {\n return $this->get_selected_options();\n }", "function get_selected()\n {\n }", "function get_row_sub_value($selector)\n{\n}", "public funct...
[ "0.6334542", "0.6334542", "0.63337886", "0.631297", "0.61618686", "0.6120975", "0.59983075", "0.59983075", "0.59582776", "0.57944804", "0.5782223", "0.5778463", "0.57723373", "0.57586753", "0.57356316", "0.5723842", "0.5657574", "0.5653187", "0.5647564", "0.5634387", "0.56166...
0.79327035
0
Set the value of ultima_carga.
Задайте значение ultima_carga.
public function setUltimaCarga($ultima_carga) { $this->ultima_carga = $ultima_carga; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUltimaCarga()\n {\n return $this->ultima_carga;\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function setEscalaValor( $escalaValor ){\n\t\t\t$this->escalaValor = $escalaValor ;\n\t\t}", "public function calidadImagen($valor){\...
[ "0.63314986", "0.5678584", "0.560267", "0.5431688", "0.5347435", "0.5326011", "0.52876127", "0.52784324", "0.5265703", "0.52637476", "0.52577883", "0.5199346", "0.5178404", "0.5173059", "0.5168489", "0.5159841", "0.51488596", "0.5134402", "0.507958", "0.50773853", "0.5051547"...
0.7261275
0
Get the value of ultima_carga.
Получите значение ultima_carga.
public function getUltimaCarga() { return $this->ultima_carga; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCargaMaxima()\n {\n return $this->cargaMaxima;\n }", "public function setUltimaCarga($ultima_carga)\n {\n $this->ultima_carga = $ultima_carga;\n\n return $this;\n }", "public function getValorUltimaReavaliacao() {\n\n if ($this->getTotalDeR...
[ "0.6484742", "0.63590187", "0.6262433", "0.6255732", "0.62440497", "0.6213362", "0.61570513", "0.6125437", "0.59932", "0.5942775", "0.59411466", "0.59411466", "0.5938758", "0.59313446", "0.59239733", "0.58884555", "0.587881", "0.586586", "0.5861279", "0.5818288", "0.5779129",...
0.81332225
0
Get the value of obstaculos.
Получить значение obstaculos.
public function getObstaculos() { return $this->obstaculos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCot_observaciones(){\n return $this->cot_observaciones;\n }", "public function getObservacao(){\n return $this->sObservacao;\n }", "protected function getOpcoes() \r\n\t{\r\n\t\treturn $this->aOpcoes;\r\n\t}", "public function getObservacao()\n {\n return $this->observa...
[ "0.6479409", "0.6451691", "0.62739384", "0.617748", "0.61759734", "0.599547", "0.5985156", "0.5985156", "0.5985156", "0.59491277", "0.59355354", "0.59142995", "0.59053075", "0.5896911", "0.5872419", "0.58461213", "0.57853746", "0.57657754", "0.57656413", "0.57489264", "0.5746...
0.79224384
0
Get the value of senalamientos.
Получить значение senalamientos.
public function getSenalamientos() { return $this->senalamientos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSenha(){\n return $this->senha;\n }", "public function getSenha()\n {\n return $this->senha;\n }", "public function getSenha()\n {\n return $this->senha;\n }", "public function getSenha()\n {\n return $this->senha;\n }", "public fu...
[ "0.7195093", "0.7119711", "0.7119711", "0.7119711", "0.7119711", "0.7076725", "0.6382938", "0.6368121", "0.6317262", "0.6264009", "0.61144257", "0.59345067", "0.5910968", "0.59104353", "0.58592665", "0.58592665", "0.5832153", "0.5811388", "0.5780429", "0.57673883", "0.5733344...
0.78849196
0
Get the value of danos.
Получите значение danos.
public function getDanos() { return $this->danos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_valor() {\n\t\t\n\t\t$ar_list_of_values\t= $this->get_ar_list_of_values();\n\t\t$dato \t\t\t\t= $this->get_dato();\n\t\t\n\t\tif (is_array ($ar_list_of_values)) foreach ($ar_list_of_values as $value => $rotulo) {\n\t\t\t\t\t\t\t\t\t\n\t\t\tif( $dato == $value ) {\n\t\t\t\t\n\t\t\t\t$this->valor...
[ "0.63192356", "0.5875379", "0.5875379", "0.5875379", "0.5875379", "0.5875379", "0.58709145", "0.58709145", "0.58709145", "0.58709145", "0.58709145", "0.58708566", "0.58708566", "0.58708566", "0.58708566", "0.58708566", "0.58708566", "0.58708566", "0.58708566", "0.58708566", "...
0.70327616
0
/ numOfRows() Returns the number of rows in the result set
numOfRows() Возвращает количество строк в наборе результатов
public function numOfRows();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumberOfRows();", "public function getNumRows();", "abstract public function getNumRows();", "abstract public function getNumRows();", "public abstract function row_count();", "function RowCount() {}", "public function numberOfRows();", "public function numRows() : int\n\t{\n\t\tre...
[ "0.8467592", "0.8438362", "0.82933563", "0.82933563", "0.8287429", "0.82380205", "0.81657565", "0.81405544", "0.80881983", "0.8080471", "0.80640894", "0.8006932", "0.8000376", "0.7993607", "0.79909974", "0.7953984", "0.7951945", "0.79403627", "0.7937833", "0.79354763", "0.793...
0.86040455
0
/ numOfFields() Returns the number of fields in the result set
numOfFields() Возвращает количество полей в наборе результатов
public function numOfFields();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function numFields();", "public function numberOfFields();", "function numFields( $res );", "public function getFieldCount(): int\n {\n return oci_num_fields($this->resultID);\n }", "function numFields() {\n return mysqli_num_fields($this->result);\n }", "abstract public fun...
[ "0.8743242", "0.85329366", "0.8400545", "0.82697624", "0.826751", "0.8245084", "0.8190738", "0.8164909", "0.8163658", "0.81093764", "0.8102634", "0.80893534", "0.80643666", "0.8063612", "0.8055661", "0.79489857", "0.7933238", "0.7895036", "0.7879514", "0.78679794", "0.7863266...
0.8552307
1
/ fetchField() Returns the next field from the result set as an object, or NULL if empty.
fetchField() Возвращает следующее поле из набора результатов в виде объекта, или NULL, если набор пуст.
public function fetchField();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FetchField($fieldOffset = -1) \n\t{\n\t\tif ($fieldOffset != -1) {\n\t\t\t$this->fieldmeta_offset = $fieldOffset;\n\t\t}\n\t\t$fieldObject = false;\n\t\t$i=0;\n\t\tforeach($this->fieldmeta as $o) {\n\t\t\tif($i==$this->fieldmeta_offset) {\n\t\t\t\t$fieldObject = $o;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$i++;\n...
[ "0.7496154", "0.675565", "0.6707491", "0.6675682", "0.65372694", "0.64107037", "0.63174355", "0.621415", "0.61930716", "0.6185163", "0.6147772", "0.6116754", "0.6105757", "0.6096552", "0.60923636", "0.60837185", "0.6058451", "0.59946454", "0.59524673", "0.5939563", "0.592966"...
0.7033241
1
/ fetchFields() Returns an array with all the fields in the result set as objects. Returns an empty array if no more fields.
fetchFields() Возвращает массив с всеми полями в наборе результатов в виде объектов. Возвращает пустой массив, если больше нет полей.
public function fetchFields();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function fetchFields(){\n $fields = X3::db()->fetchFields($this->modelName);\n $_res = array();\n foreach($fields as $name=>$field){\n $dataType = X3_MySQL_Command::parseMySQLField($field);\n $_res[$name] = $dataType;\n }\n return $_res;\n }", ...
[ "0.79335904", "0.7516208", "0.73847646", "0.73021424", "0.6980072", "0.69657856", "0.69657856", "0.69657856", "0.69657856", "0.69657856", "0.69657856", "0.6932441", "0.6876998", "0.6846093", "0.6842053", "0.6799855", "0.6795274", "0.67724293", "0.6765644", "0.6765644", "0.676...
0.8231835
0
/ bindResults() Binds the input variables to the result set row values
/ bindResults() Привязывает входные переменные к значениям строк результирующего набора
public function bindResults(array $bind_results);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resultset($bind_array=array());", "private static function bindResultRow(&$stmt, &$out)\n {\n $result = $stmt->result_metadata();\n $fields = array();\n $out = array();\n \n while($field = $result->fetch_field())\n {\n ...
[ "0.68196523", "0.66728026", "0.64769924", "0.6208242", "0.61962444", "0.5888165", "0.5857166", "0.58563656", "0.58476716", "0.5818572", "0.57589954", "0.5693269", "0.5661475", "0.56513906", "0.563987", "0.56388116", "0.5633599", "0.5631542", "0.56267804", "0.56225955", "0.560...
0.8244629
0
Returns the path from the url.
Возвращает путь из URL.
public function getPath(string $url): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function path() {\n\t\t/* Note that it is necessary to pass the full URL to\n\t\t * `parse_url`, because `parse_url` can be tricked into\n\t\t * thinking that part of the path is a domain name. */\n\t\treturn parse_url($this->fullUrl(), PHP_URL_PATH);\n\t}", "static function getPath(string $url): ?string;...
[ "0.78550035", "0.7276822", "0.721952", "0.7083807", "0.7077316", "0.7054212", "0.6987927", "0.69697154", "0.6919363", "0.6915285", "0.68937767", "0.6884224", "0.6835985", "0.681761", "0.6810118", "0.6784716", "0.6775908", "0.6730109", "0.6724978", "0.67213696", "0.6694089", ...
0.80770767
0
Show a graphical display of the campaign's finished state.
Показать графическое отображение завершенного состояния кампании.
public function displayFinished() { if ($this->has_finished) { return '<i style="font-size:25px;color:#449D44;" class="fa fa-check" aria-hidden="true"></i>'; } else { return '<i style="font-size:25px;color:#C9302C;" class="fa fa-times" aria-hidden="true"></i>'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_completed_page(&$infos)\n\t\t{\n\t\t\t$this->t->set_file('activity_completed', 'activity_completed.tpl');\n\t\t\t$this->t->set_block('activity_completed', 'report_row', 'rowreport');\n\t\t\t//build an icon array for show_engine_infos\n\t\t\t$icon_array = Array();\n\t\t\t\n\t\t\t$icon_array['ok'] \t\t...
[ "0.59758365", "0.58604485", "0.58453715", "0.56397945", "0.56151646", "0.560581", "0.5501625", "0.5483747", "0.5460936", "0.5434394", "0.53893274", "0.53715736", "0.5363716", "0.5359528", "0.53544766", "0.53520316", "0.53520316", "0.53229994", "0.53203005", "0.52722734", "0.5...
0.70984656
0
Construct object string $pattern regular expression pattern string $extension file extension which is ignored in pattern matching.
Построить строку объекта $pattern строка регулярного выражения $extension расширение файла, которое игнорируется при сопоставлении с шаблоном.
public function __construct( $pattern, $extension = NULL ) { // Charcoal_ParamTrait::validateString( 1, $pattern ); // Charcoal_ParamTrait::validateString( 2, $extension, TRUE ); $this->pattern = $pattern; $this->extension = $extension; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create($extensions, $ignorePatterns);", "public function __construct($pattern) {\n $pattern = preg_quote($pattern, self::DELIMITER);\n $pattern = preg_replace_callback('/([\\\\\\\\]{1,3})\\*/', function($matches) {\n $length = strlen($matches[1]);\n if (...
[ "0.6189709", "0.5734386", "0.5664583", "0.56326574", "0.5438512", "0.5437198", "0.5390302", "0.5390302", "0.5383325", "0.53488743", "0.533652", "0.533384", "0.53014445", "0.52999455", "0.5280566", "0.52773136", "0.5259952", "0.52401507", "0.52389777", "0.52198774", "0.5200867...
0.7006704
0
Set the verified status to true and make the email token null
Установите статус проверки в true и сделайте токен электронной почты null
public function verified() { $this->verified = 1; $this->email_token = null; $this->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verified()\n {\n $this->verified = 1;\n $this->email_token = null;\n $this->save();\n }", "public function markEmailAsVerified();", "public function verifyEmail()\n {\n $this->verified = true;\n\n $this->save();\n\n $this->activationToken->delete(...
[ "0.82587624", "0.7797233", "0.7618745", "0.7276864", "0.7146607", "0.7030893", "0.6986666", "0.68292075", "0.6755521", "0.66663086", "0.66021043", "0.65970546", "0.65871775", "0.6568887", "0.65620226", "0.6514049", "0.6483068", "0.64203966", "0.6403273", "0.6382361", "0.63807...
0.8178247
1
function to add photo to database
функция для добавления фото в базу данных
private function _add_photo(){ global $db; $photo_name = $db->quote($this->_photo_name); $photo_caption = $db->quote($this->_photo_caption); $file_name = $db->quote($this->_file_name); $file_type = $db->quote($this->_file_type); $sql = "SELECT * FROM photos WHERE file_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertImageToDb() \n {\n }", "function addPhotoToDatabase($photo) {\n global $db_dsn, $db_username, $db_password;\n\n $date = date('d-m-Y');\n $albumName = getCategoryAlbumNames()[1];\n\n $dbh = new PDO($db_dsn, $db_username, $db_password);\n $sql = \"INSERT INTO photos (phot...
[ "0.7996081", "0.7761006", "0.7526716", "0.73594534", "0.72750264", "0.71354795", "0.7033112", "0.70157284", "0.6984771", "0.69627714", "0.69296217", "0.69194067", "0.6852318", "0.67968094", "0.67841864", "0.6773107", "0.6766703", "0.6765651", "0.6751953", "0.6750948", "0.6750...
0.8070406
0
function to find a photo using photo_id
функция для поиска фотографии по photo_id
public static function find_photo($id){ global $db; $message = null; $sql = "SELECT * FROM photos WHERE photo_id = '".$id."' LIMIT 1"; try { $result = $db->query($sql); $row = $result->fetch(); return $row; } catch (Exception $e) { throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPhoto($photo_id){\n\t\n}", "public function getPhoto($id);", "function getPhotoInfo($photoId);", "public function getPhoto($id)\n {\n $res = $this->db->select(\"SELECT * FROM `{$this->domainPhoto}` WHERE itemName()='{$id}'\", array('ConsistentRead' => 'true'));\n $this->logErrors($res);\n...
[ "0.89250004", "0.7991754", "0.7524653", "0.7254483", "0.71113735", "0.7109219", "0.7047402", "0.7047313", "0.68006164", "0.67108774", "0.66861975", "0.6605537", "0.6592162", "0.6549191", "0.6525812", "0.65181214", "0.65173334", "0.6517307", "0.64751077", "0.64245605", "0.6388...
0.8308859
1
finds all the photos in database and returns it
находит все фотографии в базе данных и возвращает их
public static function find_all_photos(){ global $db; $sql = "SELECT * FROM photos"; try { $result = $db->query($sql); $rows=$result->fetchall(); return $rows; } catch (Exception $e) { throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllPhotos();", "public function getPhotos();", "function get_image() {\n $sql = \"SELECT * FROM photos\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n re...
[ "0.79025847", "0.75143087", "0.7238818", "0.72185194", "0.7203595", "0.7196661", "0.701319", "0.6884714", "0.68724364", "0.6834645", "0.6795367", "0.6794424", "0.6778277", "0.66719806", "0.6655406", "0.6598305", "0.6561741", "0.65614367", "0.65466255", "0.65432966", "0.652769...
0.8649576
0
Return the number of active and inactive users in the site. If a group is specified the query is restricted to that group only
Верните количество активных и неактивных пользователей на сайте. Если указано группу, запрос ограничивается только этой группой
function statistics_extended_active_count($group=null){ global $CONFIG; $query_tpl ="SELECT COUNT(*) as members FROM {$CONFIG->dbprefix}users_entity ue "; $query_tpl.="JOIN {$CONFIG->dbprefix}entities e ON e.guid=ue.guid WHERE e.enabled='yes' AND "; if(!empty($group)){ $query_tpl.=" e.guid IN (SELECT guid_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcNumActiveUsers(){\r\n\t /* Calculate number of USERS at site */\r\n\t $sql = $this->connection->query(\"SELECT * FROM \".TBL_ACTIVE_USERS);\r\n\t $this->num_active_users = $sql->rowCount();\r\n }", "function calcNumActiveUsers(){\r\n /* Calculate number of users at site */\r\n $q =...
[ "0.6832371", "0.66593885", "0.66593885", "0.6559747", "0.643291", "0.63595915", "0.6332281", "0.63153845", "0.62868035", "0.6267492", "0.6158852", "0.61100954", "0.6106551", "0.6067654", "0.6055256", "0.60469246", "0.6041743", "0.60340977", "0.59993833", "0.5975531", "0.59635...
0.78798926
0
Return the users count for each value associated with the metadata provided
Верните количество пользователей для каждого значения, связанного с предоставленными метаданными
function statistics_extended_users_metadata_count($metadata,$group=null){ $sector_metadata = get_metastring_id($metadata); $dbprefix = elgg_get_config('dbprefix'); $query = "SELECT mv.string AS data, count(*) as total "; $query .= "FROM {$dbprefix}users_entity ue "; $query .= "JOIN " . $dbprefix . "ent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function statistics_extended_users_metadata_value_count($metadata,$value,$group=null){\r\n $sector_metadata = get_metastring_id($metadata);\r\n $dbprefix = elgg_get_config('dbprefix');\r\n\r\n $query = \"SELECT mv.string AS data, count(*) as total \";\r\n $query .= \"FROM {$dbprefix}users_entity ue \";\r\n $q...
[ "0.75726104", "0.65521216", "0.65357804", "0.6373776", "0.63681424", "0.6217052", "0.6191308", "0.615676", "0.61566746", "0.6114683", "0.610684", "0.61005414", "0.60547996", "0.6028052", "0.602263", "0.5984046", "0.59714913", "0.5970036", "0.59618163", "0.59512293", "0.594643...
0.72757226
1
Return the users count for each value associated with the metadata provided
Верните количество пользователей для каждого значения, связанного с предоставленными метаданными
function statistics_extended_users_metadata_value_count($metadata,$value,$group=null){ $sector_metadata = get_metastring_id($metadata); $dbprefix = elgg_get_config('dbprefix'); $query = "SELECT mv.string AS data, count(*) as total "; $query .= "FROM {$dbprefix}users_entity ue "; $query .= "JOIN {$dbpre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function statistics_extended_users_metadata_count($metadata,$group=null){\r\n $sector_metadata = get_metastring_id($metadata);\r\n $dbprefix = elgg_get_config('dbprefix');\r\n\r\n $query = \"SELECT mv.string AS data, count(*) as total \";\r\n $query .= \"FROM {$dbprefix}users_entity ue \";\r\n $query .= \"JOI...
[ "0.72757226", "0.65521216", "0.65357804", "0.6373776", "0.63681424", "0.6217052", "0.6191308", "0.615676", "0.61566746", "0.6114683", "0.610684", "0.61005414", "0.60547996", "0.6028052", "0.602263", "0.5984046", "0.59714913", "0.5970036", "0.59618163", "0.59512293", "0.594643...
0.75726104
0
Return the groups count that have the specified property
Верните количество групп, обладающих указанным свойством
function statistics_extended_groups_property_count($property){ global $CONFIG; $properties = $CONFIG->group; $labels = array(); $totals = array(); if(array_key_exists($property,$properties)){ list($type,$values) = $properties[$property]; switch($type){ case "checkboxes": case "radio": forea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return count($this->group);\n }", "public function count()\n {\n return count($this->groups);\n }", "public function getGroupProtectedProperty()\n {\n return $this->attributeGroupToDelete ?\n $this->attributeGroupToDelete->attributes-...
[ "0.5938531", "0.5887506", "0.5828145", "0.58240306", "0.5754538", "0.5701774", "0.57008326", "0.5686289", "0.5649677", "0.5640473", "0.5637661", "0.55748826", "0.55392474", "0.5536237", "0.549436", "0.54894674", "0.5483929", "0.5452033", "0.5442724", "0.54257077", "0.54253155...
0.7341043
0
Return an array with total number of objects from the specified subtypes
Вернуть массив с общим количеством объектов из указанных подтипов
function statistics_extended_objects_count($object_subtypes,$container_guid=null,$owner_guid=null,$object_type='object'){ if(!is_array($object_types)){ $object_types = array($object_subtypes); } $resp = array(); foreach($object_subtypes as $object_subtype){ $resp[$object_subtype] = statistics_extended_obj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countObjects($subtype = \"\");", "public function count_sub_classes()\n {\n $table = $this->return_table();\n return $this->db->count_all($table);\n }", "function statistics_extended_objects_view_count($object_types,$container_guid=null,$owner_guid=null){\r\n\tif(!is_array($objec...
[ "0.8244827", "0.7217893", "0.70527494", "0.67892", "0.67099094", "0.6621057", "0.6307274", "0.6304777", "0.630018", "0.6284013", "0.6238418", "0.62208116", "0.6150595", "0.6129614", "0.61275005", "0.61275005", "0.61275005", "0.6050394", "0.6039399", "0.6014633", "0.60136837",...
0.79900557
1
Return the number of views from the specified object subtypes
Вернуть количество просмотров из указанных подтипов объекта
function statistics_extended_objects_view_count($object_types,$container_guid=null,$owner_guid=null){ if(!is_array($object_types)){ $object_types = array($object_types); } $resp = array(); foreach($object_types as $object_type){ $resp[$object_type] = statistics_extended_object_view_count($object_type,$own...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countObjects($subtype = \"\");", "function statistics_extended_objects_count($object_subtypes,$container_guid=null,$owner_guid=null,$object_type='object'){\r\n\tif(!is_array($object_types)){\r\n\t\t$object_types = array($object_subtypes);\r\n\t}\r\n\t$resp = array();\r\n\tforeach($object_subtypes...
[ "0.7797036", "0.72498786", "0.70282423", "0.6789719", "0.64555335", "0.6436275", "0.62862176", "0.61903423", "0.6098783", "0.5949957", "0.590217", "0.590217", "0.590217", "0.5865727", "0.5860707", "0.5815439", "0.58119893", "0.58068335", "0.5776041", "0.5772713", "0.57689816"...
0.7609666
1
Returns an array with the last 3 recent audios of the logged user
Возвращает массив с последними 3 аудио, загруженными пользователем, который вошёл в систему
public static function getRecentAudios() { $current_user = Users::getCurrentUser(); $columns = implode(',', self::$columns); $query = db()->prepare( "SELECT {$columns} FROM audios ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getPopularAudios()\n {\n $columns = self::$columns;\n /**\n * Here we do a JOIN, so before putting the columns,\n * place the 'A.' (for the Audios table) before every\n * column.\n * @var array\n */\n $columns = array_map(\n ...
[ "0.6503989", "0.6369029", "0.595663", "0.5936372", "0.57091296", "0.5678862", "0.56748086", "0.56406987", "0.55890363", "0.5557316", "0.5510495", "0.55059195", "0.5490795", "0.5482875", "0.5475868", "0.54381776", "0.540108", "0.53873235", "0.53830063", "0.5364136", "0.5322636...
0.772988
0
Get the count of audios of the user $id
Получить количество аудио пользователя $id
public static function getAudiosCount($user_id) { $query = db()->prepare( "SELECT COUNT(*) FROM audios WHERE reply_to IS NULL AND status = '1' AND user_id = :user_id" ); $query->bindV...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function count_media($user_id, $table)\n {\n $database = Database::instance();\n $sql = \"SELECT COUNT(*) as num FROM \" . $table . \" WHERE active = 1 AND user_id = \" . $user_id;\n $query = $database->prepare($sql);\n $query->execute();\n $result = $query->fetc...
[ "0.6653265", "0.6578777", "0.62211895", "0.6184071", "0.6182242", "0.6160486", "0.61503094", "0.61069095", "0.6077008", "0.603108", "0.6020434", "0.5923961", "0.59173167", "0.59107983", "0.59019077", "0.58992803", "0.58667624", "0.5860631", "0.5845526", "0.58436733", "0.58252...
0.7377949
0
Get the count of replies of the audio $id
Получить количество ответов на аудио $id
public static function getRepliesCount($audio_id) { $query = db()->prepare( "SELECT COUNT(*) FROM audios WHERE status = '1' AND reply_to = :reply_to" ); $query->bindValue('r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReplyCount() : int\n {\n return $this->replyCount;\n }", "public static function replies ( $since_id, $count_replies = false ) {\n\n\t\t$params = array (\n\t\t\t'include_entities' => true,\n\t\t\t'since_id' => $since_id,\n\t\t\t'count' => 100\n\t\t);\n\n\t\t// we need to minimise ...
[ "0.6734552", "0.6478069", "0.62196565", "0.6182938", "0.61343837", "0.61330754", "0.6074031", "0.6028171", "0.59325206", "0.591335", "0.5906567", "0.5856853", "0.58226687", "0.58001465", "0.5738689", "0.57301414", "0.57224286", "0.5710537", "0.56864846", "0.5652078", "0.56471...
0.8117453
0
Returns an array with the last 10 replies of $audio_id
Возвращает массив с последними 10 ответами по $audio_id
public static function getReplies($audio_id, $page = 1) { $count = self::getRepliesCount($audio_id); // default result $result = array( 'audios' => array(), 'load_more' => false, 'page' => $page, 'tot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRecentReplies($id, $number=10 ){\n return Reply::where('user_id',$id)->orderBy('created_at','desc')\n ->whereHas('topic.category',function($q){\n $q->where('is_blocked','no');\n })->take($number)->get();\n }", "public function getAllReplies($id...
[ "0.6306994", "0.60159594", "0.5876157", "0.5849225", "0.57261604", "0.56673294", "0.5547444", "0.55383193", "0.5500149", "0.54420614", "0.5438333", "0.5381488", "0.53342456", "0.52923995", "0.5285662", "0.5273473", "0.52718896", "0.5267431", "0.52459586", "0.5238401", "0.5224...
0.7228862
0
Get the count of favorites of the $audio_id
Получить количество избранных для $audio_id
public static function getFavoritesCount($user_id) { $query = db()->prepare( "SELECT COUNT(*) FROM audios AS A INNER JOIN favorites AS F ON A.id = F.audio_id AND F.user_id = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function total_favorites()\r\n\t{\r\n\t\tglobal $db;\r\n\t\treturn $db->count(tbl($this->fav_tbl),\"favorite_id\",\" type='\".$this->type.\"'\");\r\n\t}", "public function getFavoritesCountAttribute()\n {\n return $this->favorites->count();\n }", "public function getFavoritesCountAttribute()\n ...
[ "0.7185652", "0.671975", "0.671975", "0.6601404", "0.63860273", "0.6323772", "0.6288845", "0.62252754", "0.612096", "0.6113667", "0.601822", "0.6016271", "0.5994217", "0.59604967", "0.59495807", "0.5947114", "0.59391356", "0.59052634", "0.5904304", "0.590403", "0.58794427", ...
0.7429231
0
Returns an array with the last 10 favorites of $user_id
Возвращает массив с последними 10 избранными $user_id
public static function getFavorites($user_id, $page = 1) { $count = self::getFavoritesCount($user_id); $result = array( 'audios' => array(), 'load_more' => false, 'page' => $page, 'total' => $count ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllFavorites($user_id);", "function get_favorites($user_id){\n $ch = curl_init();\n $url = $GLOBALS['App-Logic'].\"?\" .http_build_query([\n 'get_favorites' => true, //a flag to execute the right code in App-Logic! \n 'user_id' => $user_id,\n ]);\n\n ...
[ "0.7652619", "0.68314135", "0.6743355", "0.662164", "0.65979654", "0.6571624", "0.6554089", "0.645185", "0.6444338", "0.63392836", "0.63107365", "0.6307082", "0.6277917", "0.6248008", "0.62316215", "0.6198474", "0.6125882", "0.6121173", "0.6106445", "0.6096151", "0.60165745",...
0.7302038
1
Will delete an audio or a reply This function is BLIND It will delete the audio without any comprobation.
Удалит аудио или ответ. Эта функция слепая. Она удалит аудио без какой-либо проверки.
public static function delete($id) { $audio = self::get($id, array('audio_url')); if (! $audio) { // does not exist. return; } $query = db()->prepare( "DELETE FROM audios WHERE id = :id" ); $query->bin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function deleteAudio(){\n if($this->checkStatus()){\n chdir('..');\n $return = 'false';\n $fileName = $this->sanitizeString($this->json->fileName);\n if(unlink('aud/'.$fileName)) $return='true';\n header('content-type: ...
[ "0.75131696", "0.67571235", "0.66466856", "0.64739585", "0.6116661", "0.60945874", "0.6075951", "0.6049778", "0.60482335", "0.600084", "0.600084", "0.5929248", "0.59248084", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.5...
0.7268157
1
Registers a play for $audio_id
Зарегистрировать игру для $audio_id
public static function registerPlay($audio_id) { $user_ip = get_ip(); // ← /application/functions.php $query = db()->prepare( 'SELECT COUNT(*) FROM plays WHERE user_ip = :user_ip ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addAudio(AudioMedia $audio);", "function media_upload_audio()\n {\n }", "public function hasAudio() {}", "function play( $id, $id_param, $back_url ) {\n\t\t\n\t}", "abstract public function playCard(int $card_id);", "function play_number($num){\r\n\t\t$out = '';\r\n\r\n\t\t$out .= ...
[ "0.65401083", "0.5676714", "0.56575793", "0.5565213", "0.55511856", "0.550142", "0.54916763", "0.5488554", "0.54193914", "0.5415905", "0.54157925", "0.5397654", "0.5315797", "0.5236449", "0.5207749", "0.51866233", "0.5186494", "0.5178837", "0.51688945", "0.51611245", "0.51505...
0.750331
0
get class all const
получить класс все const
static function getConstants() { $oClass = new ReflectionClass(__CLASS__); return $oClass->getConstants(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConstList(){\n\t\treturn $this->getConstantsList();\n\t}", "public function getConsts() {\n $const = $this->get('const');\n return null !== $const ? $const : array();\n }", "public function getConstants()\n {\n return array();\n }", "private static function ge...
[ "0.7634188", "0.7620217", "0.76185644", "0.7600437", "0.75861204", "0.7456084", "0.74307096", "0.73866737", "0.73817515", "0.7297303", "0.7297303", "0.7243859", "0.72354656", "0.71708405", "0.71030277", "0.70428365", "0.702577", "0.6968413", "0.69491553", "0.6906526", "0.6906...
0.777794
0
Tests that an image with the sizes attribute is output correctly.
Тестирование корректности вывода изображения с атрибутом sizes.
public function testThemeImageWithSizes() { // Test with multipliers. $sizes = '(max-width: ' . rand(10, 30) . 'em) 100vw, (max-width: ' . rand(30, 50) . 'em) 50vw, 30vw'; $image = [ '#theme' => 'image', '#sizes' => $sizes, '#uri' => reset($this->testImages), '#width' => rand(0, 1000...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetImageSize()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 516, 'height' => 710),\n 'E...
[ "0.75862247", "0.72801906", "0.70403594", "0.6863978", "0.68473136", "0.6840969", "0.6813828", "0.6798351", "0.67464435", "0.6742632", "0.6654979", "0.66335624", "0.66272706", "0.6580212", "0.6572993", "0.65184814", "0.6504699", "0.65030384", "0.64962995", "0.64300084", "0.64...
0.73105574
1
Tests that an image with the src attribute is output correctly.
Тестирование корректности вывода изображения с атрибутом src.
public function testThemeImageWithSrc() { $image = [ '#theme' => 'image', '#uri' => reset($this->testImages), '#width' => rand(0, 1000) . 'px', '#height' => rand(0, 500) . 'px', '#alt' => $this->randomMachineName(), '#title' => $this->randomMachineName(), ]; $this->rende...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_it_loads_an_image_string_into_a_resource()\n {\n imagepng(imagecreatefromstring($this->imagePath), $this->compareTestSaveLocation);\n imagepng($this->image->getImageResource(), $this->testImageSaveLocation);\n\n $correctImage = file_get_contents($this->compareTestSaveLo...
[ "0.6883127", "0.66157275", "0.6597458", "0.6551573", "0.651266", "0.64515555", "0.6446536", "0.6428485", "0.63694066", "0.636573", "0.6355856", "0.6288904", "0.6258007", "0.62237185", "0.6217384", "0.62136537", "0.6148944", "0.6133649", "0.61302394", "0.6126889", "0.6106779",...
0.74064183
0
Tests that an image with the srcset and multipliers is output correctly.
Тестирование корректности вывода изображения с srcset и множителями.
public function testThemeImageWithSrcsetMultiplier() { // Test with multipliers. $image = [ '#theme' => 'image', '#srcset' => [ [ 'uri' => $this->testImages[0], 'multiplier' => '1x', ], [ 'uri' => $this->testImages[1], 'multiplier' => '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testThemeImageWithSrcsetWidth() {\n // Test with multipliers.\n $widths = [\n rand(0, 500) . 'w',\n rand(500, 1000) . 'w',\n ];\n $image = [\n '#theme' => 'image',\n '#srcset' => [\n [\n 'uri' => $this->testImages[0],\n 'width' => $widths[0],...
[ "0.7132142", "0.687554", "0.6539896", "0.605218", "0.6018526", "0.59659445", "0.5842389", "0.57908744", "0.5777161", "0.5756085", "0.5722298", "0.56956017", "0.5671588", "0.5667395", "0.56593025", "0.5657271", "0.5650563", "0.5632054", "0.5623913", "0.5613944", "0.5611818", ...
0.79850364
0
Tests that an image with the srcset and widths is output correctly.
Тестирование корректности вывода изображения с атрибутами srcset и widths.
public function testThemeImageWithSrcsetWidth() { // Test with multipliers. $widths = [ rand(0, 500) . 'w', rand(500, 1000) . 'w', ]; $image = [ '#theme' => 'image', '#srcset' => [ [ 'uri' => $this->testImages[0], 'width' => $widths[0], ], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_cl_image_tag_srcset()\n {\n $expected_tag = self::get_expected_cl_image_tag(\n self::$public_id,\n self::$common_transformation_str,\n '',\n self::$breakpoints_arr\n );\n\n $tag_with_breakpoints = cl_image_tag(\n se...
[ "0.7010816", "0.68044627", "0.67026645", "0.6579118", "0.6535089", "0.64611906", "0.6453078", "0.64360106", "0.63177097", "0.62910914", "0.620381", "0.6102126", "0.60774326", "0.6060576", "0.6011463", "0.59291303", "0.58970004", "0.5860443", "0.58568287", "0.5836072", "0.5835...
0.7944958
0
Returns configured theme mode.
Возвращает настроенный режим темы.
public function get_theme_mode() { clearos_profile(__METHOD__, __LINE__); if (! $this->is_loaded) $this->_load_config(); return $this->config['theme_mode']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTheme();", "public function getCurrentTheme()\n {\n return $theme = $this->config->theming->theme;\n }", "public function getDesignTheme();", "public static function getTheme ()\n {\n $config = Zend_Registry::get('config');\n\n return $config->app->theme;\n ...
[ "0.73051256", "0.73007196", "0.7202147", "0.7199959", "0.7191706", "0.7167727", "0.71357787", "0.7118886", "0.7098299", "0.7077854", "0.7068453", "0.7060847", "0.7060847", "0.7060847", "0.70416796", "0.6979258", "0.69183207", "0.6883121", "0.68673724", "0.68665665", "0.686435...
0.8885009
0
Sets a parameter in the config file.
Устанавливает параметр в файле конфигурации.
protected function _set_parameter($key, $value) { clearos_profile(__METHOD__, __LINE__); $file = new File(self::FILE_CONFIG); if (! $file->exists()) $file->create('root', 'root', '0644'); $match = $file->replace_lines("/^$key\s*=\s*/", "$key = $value\n"); if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _set_parameter($key, $value)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->is_loaded = FALSE;\n\n $file = new File(self::APP_CONFIG);\n\n if (! $file->exists())\n $file->create(\"root\", \"root\", \"0644\");\n\n $match = $file->replace_l...
[ "0.7294095", "0.7273377", "0.70640916", "0.702777", "0.6996736", "0.6936444", "0.67541283", "0.67435306", "0.66797054", "0.6662459", "0.66475296", "0.66330963", "0.6558258", "0.65532917", "0.64926153", "0.64902455", "0.6477107", "0.64545625", "0.64384955", "0.6432275", "0.642...
0.74010634
0
Current master table name
Текущее имя мастер-таблицы
function getCurrentMasterTable() { return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_MASTER_TABLE]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_table_name(){\n return $this->table_name();\n }", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "public static function getTableName(){\n\t\treturn self::$table_name;\n\t}", "public function getTableName()\n\t{\n\t\treturn $this-...
[ "0.7543311", "0.74951786", "0.74380964", "0.74258244", "0.7424816", "0.742205", "0.74192744", "0.73911023", "0.7382169", "0.7380209", "0.73141974", "0.73082256", "0.7290244", "0.7290244", "0.7290244", "0.72881836", "0.7283893", "0.7270027", "0.72634614", "0.7249696", "0.72449...
0.81002384
0
Get record keys from $_POST/$_GET/$_SESSION
Получить ключи записей из $_POST/$_GET/$_SESSION
function GetRecordKeys() { global $EW_COMPOSITE_KEY_SEPARATOR; $arKeys = array(); $arKey = array(); if (isset($_POST["key_m"])) { $arKeys = ew_StripSlashes($_POST["key_m"]); $cnt = count($arKeys); } elseif (isset($_GET["key_m"])) { $arKeys = ew_StripSlashes($_GET["key_m"]); $cnt = count($arKeys); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t$arKeys = $_POST[\"key_m\"];\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t$arKeys = $_GET[\"key_m\"];\n\t\t\t$cnt = count(...
[ "0.7281956", "0.71059054", "0.6658204", "0.6537084", "0.6235343", "0.61468405", "0.5976852", "0.5753291", "0.56874216", "0.5685296", "0.5681412", "0.5636743", "0.5633421", "0.5627088", "0.5610596", "0.56035805", "0.5590647", "0.5562724", "0.5560645", "0.5536597", "0.55362827"...
0.7149095
1
Render edit row values
Отображать значения редактируемой строки
function RenderEditRow() { global $Security, $gsLanguage, $Language; // Call Row Rendering event $this->Row_Rendering(); // gjd_id $this->gjd_id->EditAttrs["class"] = "form-control"; $this->gjd_id->EditCustomAttributes = ""; $this->gjd_id->EditValue = $this->gjd_id->CurrentValue; $this->gjd_id->ViewCu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderEditRow()\n\t{\n\t\tglobal $Security, $CurrentLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// id\n\t\t$this->id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->id->EditCustomAttributes = \"\";\n\t\t$this->id->EditValue = $this->id->CurrentV...
[ "0.7744282", "0.76404923", "0.7535198", "0.740563", "0.72201085", "0.69143075", "0.69141454", "0.6909055", "0.6802455", "0.6787738", "0.6735765", "0.6705344", "0.6703954", "0.6693788", "0.66781545", "0.6651749", "0.6622414", "0.6595472", "0.65935457", "0.658131", "0.65428925"...
0.7675142
1
Called when worker is going to update configuration.
Вызывается, когда рабочий собирается обновить конфигурацию.
public function onConfigUpdated() { if ($this->client) { $this->client->config = $this->config; $this->client->onConfigUpdated(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _updateConfiguration();", "public function configChanged(Varien_Event_Observer $observer)\n {\n $userId = Mage::getStoreConfig('wallee_payment/general/api_user_id');\n $applicationKey = Mage::getStoreConfig('wallee_payment/general/api_user_secret');\n if ($user...
[ "0.70563656", "0.6443865", "0.62816197", "0.60414636", "0.6032272", "0.59078276", "0.59054154", "0.58986545", "0.5884469", "0.5831596", "0.57830846", "0.5749157", "0.5746288", "0.57460046", "0.57368976", "0.5702942", "0.5701427", "0.57012683", "0.569929", "0.5674837", "0.5668...
0.7420578
0
Return clone of default db select
Вернуть копию выборки по умолчанию базы данных
public function getDefaultDbSelect() { $options = $this->getOptions(); if(null == $this->defaultDbSelect) { $this->defaultDbSelect = new Db\Sql\Select($options->getTableName()); } $dbSelect = clone $this->defaultDbSelect; return $dbSelect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createSelect()\n {\n return $this->getConnection()->select();\n }", "public function select()\n {\n return $this->_db->factory('select', $this);\n }", "function remake()\n {\n $result = parent::select($this->table, '*', null);\n parent::closeConection(...
[ "0.68683076", "0.68513006", "0.6631717", "0.6427664", "0.6427664", "0.6427664", "0.6408085", "0.6397182", "0.63716316", "0.63566846", "0.63566846", "0.63529974", "0.6339171", "0.62972003", "0.6227628", "0.61845183", "0.6184429", "0.618231", "0.61734104", "0.61734104", "0.6173...
0.789186
0
This method will set the all important information keys array, where the serialize functionality works with, as well as the ArrayAccess functionality.
Этот метод установит массив важных ключей информации, с которыми работает функциональность сериализации, а также функциональность ArrayAccess.
private function setInfoKeys() { if (!empty(self::$s_aInfoKeys)) { return; } self::$s_aInfoKeys = array( 'ID', 'ProfileID', 'Nickname', 'Level', 'TempLevel', 'IP', 'JoinTime', 'LogInTime', ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setSerializableOptionsArray()\n {\n $this->serializableOptions = [\n 'root' => $this->base()->lowercase()->singular(),\n 'collection_root' => $this->base()->lowercase()->plural(),\n 'include_root' => TRUE,\n 'additiona...
[ "0.6061503", "0.5942292", "0.5877831", "0.58777785", "0.5778004", "0.5725188", "0.5706095", "0.56988376", "0.56988376", "0.56564474", "0.55834246", "0.5578728", "0.55576175", "0.5550427", "0.5546914", "0.55340296", "0.5532984", "0.5532149", "0.5520324", "0.55184746", "0.55166...
0.7523614
0
This method will serialize all the information in this object into a single array. Updating this method is not necessary when new properties are added to this object in the future. Only the InfoKeys array should be updated with all the properties.
Этот метод сериализует всю информацию в этом объекте в один массив. Обновление этого метода не требуется, когда в будущем к этому объекту будут добавляться новые свойства. Только массив InfoKeys должен быть обновлен со всеми свойствами.
public function serialize() { $aInformation = array(); foreach (self::$s_aInfoKeys as $sKey) { $aInformation[$sKey] = $this[$sKey]; } return serialize($aInformation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray()\n {\n return $this->info;\n }", "public function jsonSerialize()\n {\n return array_merge([\n 'settings' => $this->settings(),\n 'actions' => $this->actions(),\n 'columns' => $this->columns(),\n 'filters' => $this->filte...
[ "0.64947146", "0.62652767", "0.6263716", "0.6253974", "0.6228656", "0.62259215", "0.6186687", "0.61436033", "0.61436033", "0.61436033", "0.61313325", "0.61070704", "0.6099184", "0.6097074", "0.6097074", "0.60861224", "0.60861224", "0.60814995", "0.60717505", "0.60717505", "0....
0.71195203
0
Initializes the "Units" custom post type in WP. We also add the two additional image sizes for our templates.
Инициализирует пользовательский тип записи "Units" в WP. Мы также добавляем два дополнительных размера изображений для наших шаблонов.
function init_post_type() { $labels = array( 'name' => _x( 'Unit', 'Post Type General Name', 'wppm' ), 'singular_name' => _x( 'Unit', 'Post Type Singular Name', 'wppm' ), 'menu_name' => __( 'Units', 'wppm' ), 'parent_item_colon' => __( 'Parent Item:', 'wppm' ), 'all_it...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\n\t\tadd_action( 'init', array( $this, 'init_post_type' ) );\n\n\t\t// Setup the custom columns for the CPT\n\t\tadd_filter( 'manage_edit-units_columns', array( $this, 'edit_units_columns' ) );\n\t\tadd_action( 'manage_units_posts_custom_column', array( $this, 'manage_units_columns' ) );\n...
[ "0.67513204", "0.6545008", "0.6347232", "0.63238263", "0.6217401", "0.61152697", "0.59754544", "0.59493995", "0.5939075", "0.59047425", "0.5881784", "0.5867256", "0.58649045", "0.5841264", "0.5829468", "0.5827468", "0.581845", "0.58076155", "0.58067876", "0.58053976", "0.5794...
0.722265
0
Add meta boxes for the add/edit unit form.
Добавить мета-ящики для формы добавления/редактирования единицы.
function add_meta_boxes() { if( function_exists( 'add_meta_box' ) ) { add_meta_box( 'unit-info', __('Unit Information'), array( $this, '_display_unitinfo_meta'), 'units', 'normal', 'high'); add_meta_box( 'maps', __('Maps'), array( $this, '_display_maps_meta'), 'units', 'normal', 'high'); add_meta_box( 'galle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_meta_boxes() {\n global $current_screen;\n\n $page_main = $this->_admin_pages['swpm'];\n\n if ($current_screen->id == $page_main && isset($_REQUEST['form'])) {\n add_meta_box('swpm_form_items_meta_box', __('Form Items', 'swpm-form-builder'), array(&$this, 'meta_b...
[ "0.74768287", "0.72349536", "0.7183291", "0.71335405", "0.7076592", "0.7055092", "0.7054515", "0.7038045", "0.69603777", "0.6957431", "0.6908298", "0.6891041", "0.6876519", "0.685717", "0.68559784", "0.68356293", "0.68312013", "0.68237126", "0.6786773", "0.6740539", "0.672415...
0.7976936
0
Includes the unit info metabox code.
Включает код метабокса с информацией о единицах.
function _display_unitinfo_meta( $post ) { include( 'includes/metaboxes/unit-info.php' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function render_info_box() {\n\t\tinclude_once 'views/estimate/info.php';\n\t}", "function add_meta_boxes() {\n\t\tif( function_exists( 'add_meta_box' ) ) {\n\t\t\tadd_meta_box( 'unit-info', __('Unit Information'), array( $this, '_display_unitinfo_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta...
[ "0.5899533", "0.58829147", "0.580986", "0.5758899", "0.57541895", "0.57413524", "0.5710687", "0.5671115", "0.5655343", "0.5647553", "0.56285274", "0.5598593", "0.5598593", "0.5598593", "0.5598593", "0.55816936", "0.5529929", "0.5512613", "0.5510243", "0.5502074", "0.5479294",...
0.76001644
0
Check if the user has overwritten the default templates and loads them is they have. If not, we default to the templates included in the plugin.
Проверьте, переопределил ли пользователь шаблоны по умолчанию, и загрузите их, если это так. Если нет, используйте шаблоны, включенные в плагин.
function load_templates( $template ) { if ( is_singular( 'units' ) ) { if ( $overridden_template = locate_template( 'single-units.php' ) ) { $template = $overridden_template; } else { $template = plugin_dir_path( __file__ ) . 'templates/single-units.php'; } } elseif ( is_ar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defaultTemplate(){\n $this->addLocations(); // add addon files to pathfinder\n return array($this->template_file);\n }", "function load_plugin_templates() : void {\n\trequire_once plugin_dir_path( __FILE__ ) . '../templates/messages/subscriber-only-message.php';\n\trequire_once plugin_d...
[ "0.68796265", "0.6864075", "0.6720494", "0.6702375", "0.66320956", "0.6627882", "0.66188306", "0.6613141", "0.6591195", "0.65862477", "0.6579832", "0.6513114", "0.64753884", "0.6458532", "0.6446248", "0.6442429", "0.64404786", "0.6395148", "0.6390259", "0.63387877", "0.632598...
0.7047659
0
Properly enqueues Javascript files into WP. 1) jquery 2) Bootstrap 3) Google Maps API 4) Bootstrap Validator
Корректно добавляет файлы JavaScript в WP. 1) jquery 2) Bootstrap 3) Google Maps API 4) Bootstrap Validator
function load_scripts() { global $redux_options; wp_enqueue_script("jquery"); $bs = $redux_options['opt-bootstrap']; if ( $bs == 1 ) { //Load from CDN// wp_enqueue_script( 'bootstrap-script', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true ); } elseif ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function wp_enqueue_scripts() {\n global $slplus_plugin;\n \n if (isset($slplus_plugin) && $slplus_plugin->ok_to_show()) { \n $api_key=$slplus_plugin->driver_args['api_key'];\n $google_map_domain=(get_option('sl_google_map_domain')!=\...
[ "0.7688724", "0.7506284", "0.7400612", "0.7400038", "0.73943806", "0.7343996", "0.7318699", "0.7288863", "0.72575504", "0.72565913", "0.71974033", "0.71854246", "0.7171689", "0.71642244", "0.71556664", "0.7153486", "0.71473545", "0.7145843", "0.7135006", "0.7132085", "0.71201...
0.7588458
1
/ used on servicegroups page creates arrays of service details organized by groupnames
Используется на странице групп служб, создает массивы деталей служб, организованных по названиям групп
function build_servicegroups_array() { global $NagiosData; global $NagiosUser; $servicegroups = $NagiosData->getProperty('servicegroups'); $services = $NagiosData->getProperty('services'); $services = user_filtering($services,'services'); $servicegroups_details = array(); //multi-dim array to hold serv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build_host_servicegroup_details($group_members) \n{\n\tglobal $NagiosData;\n\tglobal $NagiosUser; \n\t$hosts = $NagiosData->getProperty('hosts');\n\t\n\n\t$servicegroup_details = array();\n\tforeach($group_members as $member)\n\t{\n\t\tif($NagiosUser->is_authorized_for_host($member)) //user-level filteri...
[ "0.7273374", "0.6778936", "0.6749087", "0.6406331", "0.62079006", "0.6124561", "0.59665525", "0.59389305", "0.59389305", "0.5936661", "0.5882174", "0.5875401", "0.58657116", "0.5856064", "0.58487016", "0.58009297", "0.5778471", "0.5732113", "0.5716035", "0.5713535", "0.569483...
0.802006
0
Determine whether the user can update the hour.
Определите, может ли пользователь обновить час.
public function update($user, Hour $hour) { //Admin update: handled by middleware //Clock in & Mark here return isAdmin() || $hour->user_id === $user->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($range...
[ "0.6577235", "0.6414075", "0.63316137", "0.6286341", "0.6232825", "0.61627585", "0.6065074", "0.60233814", "0.5983474", "0.59746933", "0.5972358", "0.5967766", "0.5873201", "0.58672684", "0.58431685", "0.5793943", "0.5787063", "0.5767391", "0.576029", "0.5743483", "0.57411474...
0.7107028
0
Determine whether the user can delete the hour.
Определите, может ли пользователь удалить час.
public function delete($user, Hour $hour) { if (!ClubHelper::settings($hour->club->id)->allow_delete && !isAdmin()) { return false; } return (!$hour->end_time) ? $hour->user_id === $user->id : isAdmin() === true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canDelete() {\n return true;\n }", "public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }", "public function canDelete()\n {\n return 1;\n }", "function canDelete($user) {\n if($this->getId() == $user->get...
[ "0.6598268", "0.6463188", "0.6421403", "0.6394378", "0.63207173", "0.6305876", "0.62952673", "0.62885714", "0.6287926", "0.6255046", "0.6253038", "0.61979914", "0.6140726", "0.61237246", "0.61187047", "0.6035367", "0.6009626", "0.5997746", "0.5984482", "0.59824955", "0.596984...
0.7176525
0
See if the tags get the correct URLSegment. Tests are not deep, because the function used is the same as the News function. In the newstests, this URLSegmentgeneration is tested more thoroughly, if that one returns green, it's pretty sure to say Tags will work fine too.
Проверьте, получают ли теги правильный URLSegment. Тесты не глубокие, поскольку используется та же функция, что и в News. В новых тестах проверяется более тщательно генерация URLSegment, если в них возвращается зеленый, можно быть уверенным, что и Tags также будут работать корректно.
public function testTagURLSegment() { $tag1 = $this->objFromFixture('Tag', 'tag1'); $tag2 = $this->objFromFixture('Tag', 'tag2'); $this->assertEquals('testtag-' . $tag1->ID, $tag1->URLSegment); $this->assertEquals('testtag-' . $tag2->ID, $tag2->URLSegment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validURLSegment()\n {\n if (self::config()->get('nested_urls') && $this->ParentID) {\n // Guard against url segments for sub-pages\n $parent = $this->Parent();\n if ($controller = ModelAsController::controller_for($parent)) {\n if ($controll...
[ "0.5788491", "0.56912255", "0.56274784", "0.54460824", "0.53734446", "0.53261805", "0.53124434", "0.5291427", "0.5272944", "0.51850253", "0.5183006", "0.51631624", "0.51494676", "0.5146657", "0.5128138", "0.5122809", "0.50755847", "0.5062033", "0.50506943", "0.5045603", "0.50...
0.7833238
0
Test getting all albums logic
Тестирование логики получения всех альбомов
public function testGetAllAlbums() { for($i = 1; self::ALBUMS_TO_MOCK >= $i; $i++) { // First, mock the object to be used in the test $album = $this->createMock(Album::class); $albums[] = $album; } // Now, mock the repository so it returns the mock of the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFetchAllSongs() {\n $songs = factory(Song::class)->create();\n\n $this->get('/graphql?query={songs{id,name,views,lyrics}}')\n ->assertStatus(200)\n ->assertExactJson([\n 'data' => [\n 'songs' => array([\n ...
[ "0.71964335", "0.71896136", "0.718029", "0.7131615", "0.6999202", "0.69774485", "0.6926548", "0.6881394", "0.68349713", "0.6700103", "0.6645254", "0.66048896", "0.6491147", "0.64903736", "0.64357173", "0.64257026", "0.6390221", "0.6379052", "0.63738424", "0.63686156", "0.6339...
0.8215138
0
Construct the content of the MyJobs Tab Container
Создайте содержимое контейнера вкладки MyJobs
function MyJobsTabContainer() { global $current_user ; // The container content is either a GUIDataList of // the jobs which have been defined OR form processor // content to add, delete, or update jobs. Wbich type // of content the container holds is dependent on how ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SwimTeamJobsTabContainer()\n {\n // The container content is either a GUIDataList of \n // the jobs which have been defined OR form processor\n // content to add, delete, or update jobs. Wbich type\n // of content the container holds is dependent on how\n // the...
[ "0.72334003", "0.6449623", "0.64269555", "0.60135627", "0.60053825", "0.5973659", "0.5968985", "0.584306", "0.5832033", "0.5829373", "0.57858276", "0.5716708", "0.570044", "0.56979674", "0.56921065", "0.5657792", "0.5644977", "0.5628975", "0.5624484", "0.5566153", "0.55645657...
0.7911955
0
Create an empty collection
Создайте пустую коллекцию
protected function createEmptyCollection(): Collection { /** @var Collection<TEntity> $emptyCollection */ $emptyCollection = new Collection($this->db); return $emptyCollection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createCollection()\n {\n return $this->_setUpNewNode(\n new Collection()\n );\n }", "public static function empty(): CollectionInterface\n {\n /** @var array<NewTKey, NewT> $emptyArray */\n $emptyArray = [];\n\n return self::fromIterable($...
[ "0.72536355", "0.71918607", "0.7083345", "0.69771785", "0.6951325", "0.6920966", "0.68662", "0.6842843", "0.6841601", "0.6698901", "0.6698901", "0.6564318", "0.65251786", "0.64816815", "0.64647067", "0.64235854", "0.6378004", "0.63545185", "0.6349212", "0.6335846", "0.6334250...
0.83229446
0
Display List of sales
Список продаж
public function sales() { $orders = Order::seller(auth()->id())->paginate(20); $transactioncount = Order::transactioncount(auth()->id()); return view('frontend.order.sales', compact('orders', 'transactioncount')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function salesAction()\n {\n $vars['products'] = $this->model->getDiscounts();\n $this->view->render('sales', $vars);\n }", "public function index()\n {\n $sales = $this->sale_object->get_sales();\n\n return view('admin.sale.list', compact('sales'));\n }", "public...
[ "0.8036167", "0.7577183", "0.7555189", "0.7413726", "0.7344004", "0.73341286", "0.7237053", "0.71266216", "0.71044636", "0.71041876", "0.70760506", "0.70718765", "0.70669776", "0.703529", "0.70250165", "0.7002437", "0.69593096", "0.6932469", "0.692528", "0.69215214", "0.69104...
0.7695878
1
/ example : AddressHelper::getWashingtonTax("6500 Linderson way", "aa", 985011001); return : array "status"=>false/true : ok or not ok "rate"=>1, //rate "code"=>500,//api code "message"=>"Internal error"// message
/ пример : AddressHelper::getWashingtonTax("6500 Linderson way", "aa", 985011001); возвращение : массив "status"=>false/true : ок или не ок "rate"=>1, //rate "code"=>500,//код API "message"=>"Internal error"//сообщение
public static function getWashingtonTax($addressStr, $city, $postalCode) { $result = array ( "status" => false, "rate" => - 1, "code" => 500, "message" => "Internal error" ); $url = "http://dor.wa.gov/AddressRates.aspx?output=text&addr=" . urlencode ( $addressStr ) . "&city=" . urlencode ( $city ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_tax($merchant_id,$access_token)\r\n{\r\n$curl=curl_init('https://apisandbox.dev.clover.com/v3/merchants/'.$merchant_id.'/tax_rates');\r\n\r\ncurl_setopt($curl, CURLOPT_HTTPHEADER, array(\r\n \r\n \"Authorization:Bearer \".$access_token,\r\n 'Content-Type: application/json',\r\n)\r\n); \r\n\r\ncur...
[ "0.61249185", "0.60907245", "0.5980484", "0.5900506", "0.5888059", "0.588523", "0.5869682", "0.5862956", "0.5715603", "0.5682048", "0.567274", "0.5651795", "0.5647519", "0.5641193", "0.5606656", "0.5597996", "0.5594184", "0.55810213", "0.55737746", "0.5535752", "0.55251193", ...
0.7064492
0
Take a legacy uri, and map it to an alias.
Принять устаревший uri и сопоставить его с псевдонимом.
public static function convertLegacyUriToAlias($namespaced_legacy_uri, $language = LANGUAGE_NONE) { // @todo D8 Refactor // Drupal paths never begin with a / so remove it. $namespaced_legacy_uri = ltrim($namespaced_legacy_uri, '/'); // Break out any query. $query = parse_url($namespaced_legacy_uri, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resolveUri($uri) {}", "function resolveURL($uri);", "private function uriWithLocale($uri)\n\t{\n\t\t$locale = $this->getLocale();\n\t\t// Delete the forward slash if any at the beginning of the uri:\n\t\t$uri = substr($uri, 0, 1) == '/' ? substr($uri, 1) : $uri;\n\t\t$segments = explode('/', $u...
[ "0.70390946", "0.67674583", "0.62418276", "0.6141574", "0.59974", "0.5987747", "0.59666544", "0.59188443", "0.58159333", "0.5805105", "0.5803796", "0.57948047", "0.57697624", "0.571149", "0.56688374", "0.565438", "0.56410795", "0.5625099", "0.5625082", "0.56216055", "0.559857...
0.7146449
0
Examines an uri and evaluates if it is an image.
Проверяет URI и определяет, является ли он изображением.
public static function isImageUri($uri) { if (preg_match('/.*\.(jpg|gif|png|jpeg)$/i', $uri) !== 0) { // Is an image uri. return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isImage()\n {\n return str_contains($this->mimetype, 'image/');\n }", "public function isImage()\n {\n return strtolower(substr($this->getMimeType(), 0, 5)) == 'image';\n }", "public function isImage()\n {\n $mime_type = $this->getMimeType() ?: $this->detectM...
[ "0.74511915", "0.7309734", "0.7050975", "0.6777362", "0.6767111", "0.66214335", "0.6615464", "0.6600288", "0.65976304", "0.6522383", "0.6504372", "0.6461269", "0.6459122", "0.64379376", "0.64251727", "0.64223903", "0.6406168", "0.6339286", "0.63244647", "0.6312225", "0.629855...
0.79680353
0
Determines if a url is relative or absolute.
Определяет, является ли URL относительным или абсолютным.
public static function isRelativeUrl(string $url) { $url_parts = parse_url($url); if ((!empty($url_parts['scheme'])) && (!empty($url_parts['host']))) { // It is an absolute url. return FALSE; } return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRelative()\n {\n if (preg_match('~^https?:\\/\\/~i', $this->url) OR preg_match('~^\\/\\/~i', $this->url)) {\n return false;\n } else {\n return true;\n }\n }", "public function isRelativeUri() {\n return !$this->isAbsoluteUri();\n }", "func...
[ "0.8480284", "0.80919725", "0.78597975", "0.7859429", "0.7648934", "0.76178074", "0.76096505", "0.75056833", "0.7465445", "0.72904354", "0.7152008", "0.71416277", "0.71221083", "0.7121522", "0.69630545", "0.6960558", "0.69075054", "0.6816049", "0.6783833", "0.67447466", "0.67...
0.8161998
1
Fixes anchor links to PDFs so that they work in IE. Specifically replaces anchors like _PAGE2 and p2 with page=2.
Исправляет ссылки на закладки в PDF-документах, чтобы они работали в Internet Explorer. Конкретно заменяет закладки вроде _PAGE2 и p2 на page=2.
public static function fixPdfLinkAnchors($query_path) { $anchors = $query_path->find('a'); foreach ($anchors as $anchor) { $url = $anchor->attr('href'); $contains_pdf_anchor = preg_match('/\.pdf#(p|_PAGE)([0-9]+)/i', $url, $matches); if ($contains_pdf_anchor) { $old_anchor = $matches[1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doLocalAnchorFix() {}", "protected function fix_supporting_file_references() {\r\n\t\tpreg_match_all('/<link([^<>]*?) href=\"([^\"]*?)\"([^<>]*?)\\/>/is', $this->code, $link_matches);\r\n\t\t/*$counter = sizeof($link_matches[0]) - 1;\r\n\t\twhile($counter > -1) {\r\n\t\t\t\r\n\t\t\t$counter--;\r\...
[ "0.6430346", "0.61010975", "0.59554356", "0.5812311", "0.57702124", "0.5656716", "0.563696", "0.55527383", "0.5547772", "0.54914844", "0.5488081", "0.54794395", "0.543219", "0.54210925", "0.5417346", "0.5408897", "0.53733844", "0.53733844", "0.53650135", "0.5365002", "0.53446...
0.74641377
0