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
Build control characters array
Создать массив управляющих символов
private static function buildControlCharacters() { for ($i = 0; $i <= 19; ++$i) { if ($i != 9 && $i != 10 && $i != 13) { $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_'; $replace = chr($i); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function buildControlCharacters()\n {\n for ($i = 0; $i <= 31; ++$i) {\n if ($i != 9 && $i != 10 && $i != 13) {\n $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_';\n $replace = chr($i);\n self::$controlCharacters[$find] = ...
[ "0.7846227", "0.5800362", "0.5673072", "0.55621445", "0.5498176", "0.5498176", "0.5483436", "0.5453977", "0.5423068", "0.5364919", "0.5325127", "0.5298634", "0.5277191", "0.52769643", "0.5276229", "0.52758384", "0.52731127", "0.52226985", "0.5216911", "0.52038276", "0.5180852...
0.78220785
1
Determine whether the current response being served as AMP.
Определите, является ли текущий ответ, который предоставляется как AMP.
public function is_amp() { if ( is_singular( Story_Post_Type::POST_TYPE_SLUG ) ) { return true; } // Check for `amp_is_request()` first since `is_amp_endpoint()` is deprecated. if ( function_exists( '\amp_is_request' ) ) { return amp_is_request(); } if ( function_exists( '\is_amp_endpoint' ) ) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function is_amp() {\n\n\t\tstatic $cache;\n\n\t\tif ( isset( $cache ) )\n\t\t\treturn $cache;\n\n\t\treturn $cache = defined( 'AMP_QUERY_VAR' ) && \\get_query_var( AMP_QUERY_VAR, false ) !== false;\n\t}", "public function supportsAmp()\r\n\t{\r\n\t\treturn 1 === (int) Mage::getStoreConfig('ec/amp/enable'...
[ "0.74825", "0.6478409", "0.61457837", "0.59924597", "0.5814044", "0.5617582", "0.5569277", "0.5517232", "0.5486055", "0.54583967", "0.5448466", "0.5428127", "0.541923", "0.5405955", "0.54006267", "0.5377888", "0.5338172", "0.5326295", "0.5324532", "0.52851826", "0.52842313", ...
0.73642004
1
curl calls the pageview pixel
curl вызывает пиксель просмотра страницы
protected function pixelPageView() { $url = $GLOBALS['ccttsUrl'] .'cctts_inc/ajax/ccReg.php'; $paramsArr = array('method=pixelPageView'); foreach ($this->ccttsParams as $key => $val) $paramsArr[] = "$key=$val"; $paramsStr = implode('&', $paramsArr); $result = $this->curlIt($url, $paramsStr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getPageCurl()\n\t{\n\t\t// initiate curl with our url\n\t\t$this->curl = curl_init($this->url);\n\n\t\t// set curl options\n\t\tcurl_setopt($this->curl, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($this->curl, CURLOPT_USERAGENT, $this->user_agent);\n\t\tcurl_setopt($this->curl, CURLOPT_RETURNTRANSFER, ...
[ "0.7006525", "0.6655005", "0.62618554", "0.618339", "0.6107177", "0.6098522", "0.6085033", "0.60667557", "0.6047157", "0.60410106", "0.60356313", "0.6004025", "0.5994087", "0.5959059", "0.5930127", "0.59033585", "0.5869796", "0.5861847", "0.58521724", "0.5848825", "0.58118093...
0.74830407
0
Assert the view name.
Проверить имя представления.
public function assertViewIs($name) { $this->assertEquals($name, $this->response->original->getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInvalidView() {\n $renderer = $this->container->get('renderer');\n $render_element = [\n '#type' => 'view',\n '#name' => 'invalid_view_name',\n '#embed' => FALSE,\n ];\n $this->expectException(ViewRenderElementException::class);\n $this->expectExceptionMessage(\"In...
[ "0.67567545", "0.65808785", "0.6307293", "0.62265104", "0.62031525", "0.6196195", "0.6195967", "0.6167261", "0.61331224", "0.6097434", "0.6087623", "0.6087623", "0.6065636", "0.5949181", "0.5918191", "0.5901509", "0.5896921", "0.5895136", "0.5869114", "0.5869114", "0.5834284"...
0.80080056
0
Render the opening tags for the pagination
Отобразить открывающие теги для пагинации
protected function _renderPaginationStart() { return '<div id="ZVHPContainer"><ul id="ZVHPList">'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaginationHtml();", "public function render()\n\t{\n\t\tif ($this->total_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$pagination = $this->template['wrapper_start'];\n\t\t$pagination .= $this->prev_link(Lang::get('pagination.previous'));\n\t\t$pagination .= $this->page_links();\n\t\t$pa...
[ "0.67429775", "0.6573233", "0.64367545", "0.6428668", "0.64208305", "0.64119077", "0.6326776", "0.6320106", "0.6320106", "0.62880284", "0.62034434", "0.6200449", "0.6181416", "0.61058944", "0.60937977", "0.60785395", "0.6064453", "0.6060139", "0.60195214", "0.59847456", "0.59...
0.7407296
0
Render the closing tags for the pagination
Отрендерить закрывающие теги для пагинации
protected function _renderPaginationEnd() { return '</ul></div>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function end()\n\t{\n\t\treturn '\n\t\t</div>\n\t</div>\n</div>\n<!-- CE: End Pagination -->\n';\n\t}", "private function ending()\n {\n if ($this->current_page + 1 <= $this->total_pages) {\n return '<li><a href=\"' . ($this->current_page + 1) . '\">»</a></li>';\n } else...
[ "0.7763915", "0.67816484", "0.6739548", "0.65645903", "0.6520972", "0.6472476", "0.645223", "0.64378923", "0.64345294", "0.64336985", "0.6331773", "0.6328169", "0.62717104", "0.621351", "0.6195916", "0.61754215", "0.6162652", "0.6162652", "0.61520517", "0.61456704", "0.608942...
0.8377676
0
return callback url value
вернуть значение URL обратного вызова
public function get_callback_url(){ return $this->callback_url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCallBackUrl()\r\n {\r\n \r\n }", "public function getCallbackUrl()\r\n {\r\n return $this->callback_url;\r\n }", "public function getApiCallback()\n {\n return $this->_callbackurl;\n }", "public function getCallbackUrl()\n {\n ...
[ "0.8278884", "0.7945665", "0.79227114", "0.7872659", "0.78251344", "0.7812323", "0.7709388", "0.76708376", "0.7441923", "0.73939335", "0.73905784", "0.7359126", "0.73215866", "0.7251271", "0.72348106", "0.7228135", "0.7199162", "0.71159065", "0.70583963", "0.6904662", "0.6899...
0.83768684
0
set token storage type
установить тип хранения токена
public function set_token_storage_type( $type = 'file' ){ $this->token_storage = $type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTokenMode($value)\n {\n $this->_props['TokenMode'] = $value;\n }", "public function setToken($token);", "public function set($token);", "public function setToken(string $token): void;", "public function setToken($token, $token_secret, $type = 'access', $session_store = false)\n {\n ...
[ "0.6489146", "0.64774925", "0.64372987", "0.63860774", "0.6230153", "0.6160425", "0.61600304", "0.61478716", "0.61260897", "0.61219597", "0.61053824", "0.6061577", "0.604415", "0.60233194", "0.6013377", "0.60046047", "0.60017633", "0.5990302", "0.5976001", "0.5935093", "0.593...
0.8336535
0
get link to bitbucket auth form. for this we need generate unauth access token and generate link using oauth class
получить ссылку на форму аутентификации bitbucket. для этого нам нужно сгенерировать неавторизованный токен доступа и сгенерировать ссылку с использованием класса oauth
public function get_bitbucket_auth_url(){ if( empty($this->unauth_token) ){ $this->request_unauth_token(); } $auth_req = OAuthRequest::from_consumer_and_token($this->consumer, $this->unauth_token, "GET", $this->oauth_urls['login']); $auth_req->sign_request($this->signature_method, $this->consumer, $this->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTokenUrl()\n {\n return 'https://bitbucket.org/site/oauth2/access_token';\n }", "function accessTokenURL() { return 'https://www.dropbox.com/1/oauth/access_token'; }", "public function bitbucket() {\n\n\t\t$user = '';\n\t\tif(isset($this->request->get['user'])){\n\t\t\t$user...
[ "0.7426424", "0.64768296", "0.64619845", "0.6458924", "0.6198116", "0.6127109", "0.61120576", "0.6102334", "0.6066051", "0.60398996", "0.6015153", "0.60032076", "0.59596413", "0.5955512", "0.59364957", "0.59046227", "0.59030384", "0.58796096", "0.58597445", "0.58478796", "0.5...
0.79798084
0
get full list of repositories
получить полный список репозиториев
public function get_repositories(){ $repos = array(); $res = $this->request_api('GET', 'user/repositories', $params = array()); if( !empty($res['response']) ){ $repos = json_decode($res['response']); } //pa($repos,1); return $repos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all_repos(){\n\n\t\t\treturn $this->get_github_data( 'all_repos' );\n\n\t\t}", "public function getRepositories()\n {\n return $this->repositories;\n }", "function pkg_build_repo_list() {\n\t$repos = pkg_list_repos();\n\t$list = array();\n\n\tforeach ($repos as $repo) {\n\t\t$l...
[ "0.7705626", "0.76418203", "0.7492119", "0.7314654", "0.7314654", "0.7239375", "0.7146293", "0.7019406", "0.69079113", "0.6827054", "0.6802105", "0.67963254", "0.6763853", "0.6613986", "0.64723444", "0.6465746", "0.64224356", "0.6420928", "0.6393164", "0.6307987", "0.6298603"...
0.80639696
0
return latest request data object
вернуть последний объект данных запроса
public function get_last_request(){ return $this->request_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRequestInfo() {\n\t\treturn $this->_lastInfo;\n\t}", "public function getRequestData();", "function getData()\r\n {\r\n //if POST or PUT get the data wiht file_get_contents\r\n if ($this->request === \"POST\" || $this->request === \"PUT\") {\r\n $this->preCleanDat...
[ "0.69530255", "0.67911565", "0.66613835", "0.6658175", "0.65849525", "0.64678776", "0.64452755", "0.6433375", "0.6411604", "0.6396211", "0.6328266", "0.6296001", "0.62485504", "0.62413526", "0.62413526", "0.62413526", "0.62413526", "0.62413526", "0.62210417", "0.62132514", "0...
0.7578701
0
return latest response data object
вернуть последний объект данных ответа
public function get_last_response(){ return $this->response_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getReponseData() {}", "protected function getReponseData() {}", "protected function getReponseData() {}", "protected function getReponseData() {}", "protected function getReponseData() {}", "abstract protected function getReponseData() ;", "function last_response() {\n\t\treturn $thi...
[ "0.72404695", "0.72404695", "0.72404695", "0.72404695", "0.72404695", "0.69836754", "0.6947016", "0.6891599", "0.6862214", "0.6814671", "0.68006873", "0.6797456", "0.6758123", "0.67487186", "0.672967", "0.672017", "0.6708467", "0.66864026", "0.66295123", "0.6601303", "0.65758...
0.7674824
0
Get data mapper lazy load Model_TagMapper instance if no mapper registered
Получить экземпляр Model_TagMapper для ленивой загрузки, если не зарегистрировано отображение
public function getMapper() { if (null === $this->_mapper) { $this->setMapper(new Model_TagMapper()); } return $this->_mapper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getMapper()\n {\n if (is_null($this->_mapper)) {\n $this->_mapper = new TagsMapper($this->db());\n }\n\n return $this->_mapper;\n }", "public function getMapper()\n {\n if ($this->_mapper === null) {\n\n \\Zend_Loader_Autoloader::getIns...
[ "0.80331016", "0.6673173", "0.660674", "0.656376", "0.6533292", "0.6515496", "0.64915866", "0.64575076", "0.6437719", "0.6420881", "0.6413027", "0.6396896", "0.6395061", "0.6377777", "0.6352423", "0.6328168", "0.6325328", "0.6277779", "0.6263647", "0.6223011", "0.6216759", ...
0.7833199
1
Check to see if a cookie with the specified name is set to be sent with the resource.
Проверьте, отправляется ли кука с указанным именем вместе с ресурсом.
public function has_cookie($name) { if (isset($this->_cookies[$name])) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasCookie($name)\n {\n // check if request has specific cookie\n return (isset($this->cookies[$name]) && $this->cookies[$name]->getName() === $name);\n }", "public static function has(string $name): bool\n {\n return isset($_COOKIE[$name]);\n }", "public functi...
[ "0.76351297", "0.7617596", "0.74578816", "0.73894846", "0.7386277", "0.73257315", "0.73257315", "0.7323662", "0.7298472", "0.7285768", "0.72560036", "0.712839", "0.7117388", "0.70660734", "0.7065507", "0.6981492", "0.696424", "0.6844268", "0.67810225", "0.6754813", "0.6723642...
0.77164847
0
Initialize properties `match`, `reverse` and other internal properties about those values, when there is necessary to prepare `pattern` value for: a) PHP `preg_match_all()` route match processing, b) for `reverse` value for later self URL building. This method is usually called in core request routing process from `\Mv...
Инициализируйте свойства `match`, `reverse` и другие внутренние свойства, связанные с этими значениями, когда необходимо подготовить значение `pattern` для: a) обработки маршрутизации с помощью PHP `preg_match_all()` , b) для значения `reverse` с последующим построением самой URL-адрес. Этот метод обычно вызывается в п...
protected function initMatchAndReverse () { if ($this->reverseSections !== NULL) return; if ($this->pattern === NULL) $this->throwExceptionIfKeyPropertyIsMissing('pattern'); $this->lastPatternParam = NULL; $match = addcslashes($this->pattern, "#(){}-?!=^$.+|:*\\"); $reverse = $this->reverse !== NULL ? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initReverse () {\n\t\tif ($this->reverseSections !== NULL) return;\n\t\t$reverse = NULL;\n\t\tif ($this->reverse !== NULL) {\n\t\t\t$reverse = $this->reverse;\n\t\t} else if ($this->pattern !== NULL) {\n\t\t\t$reverse = $this->pattern;\n\t\t} else/* if ($this->pattern === NULL)*/ {\n\t\t\tif ($t...
[ "0.7232774", "0.627612", "0.6070191", "0.59720004", "0.590337", "0.58424723", "0.58327836", "0.5783307", "0.57814074", "0.56690764", "0.5668129", "0.56623894", "0.5609662", "0.56021273", "0.5580354", "0.5578048", "0.5573244", "0.55607367", "0.55449283", "0.5542274", "0.553056...
0.8144741
0
Process together given `match` and `reverse` value and complete two arrays with sections info about those two given values. Also change the given `match` and `reverse` string references and remove all brackets `[]` defining variable section(s). Every result array with this sections info, with those statistics contains ...
Обработайте вместе заданные значения `match` и `reverse` и заполните два массива информацией о разделах для этих двух заданных значений. Также измените заданные ссылки на строки `match` и `reverse` и удалите все скобки `[]`, определяющие переменные разделы. Каждый результатный массив с информацией о разделах содержит д...
protected function initSectionsInfoForMatchAndReverse (& $match, & $reverse) { $matchInfo = []; $reverseInfo = []; $reverseIndex = 0; $matchIndex = 0; $reverseLength = mb_strlen($reverse); $matchLength = mb_strlen($match); $matchOpenPos = FALSE; $matchClosePos = FALSE; while ($reverseIndex < $reverseL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initReverseParams (& $reverse, & $reverseSectionsInfo, & $constraints, & $match = NULL) {\n\t\t$result = [];\n\t\t$completeMatch = $match !== NULL;\n\t\t$reverseIndex = 0;\n\t\t$matchIndex = 0;\n\t\t$sectionIndex = 0;\n\t\t$section = $reverseSectionsInfo[$sectionIndex];\n\t\t$reverseLength = mb_...
[ "0.6430995", "0.59423393", "0.5700339", "0.50796366", "0.4866939", "0.46350634", "0.4620728", "0.45479622", "0.44832027", "0.4475329", "0.44235063", "0.42854148", "0.42705113", "0.42505646", "0.42298868", "0.4225993", "0.41991168", "0.41844952", "0.4177714", "0.41715974", "0....
0.78953844
0
Initialize property `reverse` and other internal properties about this value, when there is necessary to prepare it for: a) URL building, b) for request routing, when there is configured `match` property directly an when is necessary to initialize route flags from `reverse` to complete correctly subject to match.
Инициализируйте свойство `reverse` и другие внутренние свойства этого значения, когда необходимо подготовить его: а) для построения URL, б) для маршрутизации запросов, когда свойство `match` настроено напрямую, и когда необходимо инициализировать флаги маршрута из `reverse`, чтобы корректно учитывать совпадение.
protected function initReverse () { if ($this->reverseSections !== NULL) return; $reverse = NULL; if ($this->reverse !== NULL) { $reverse = $this->reverse; } else if ($this->pattern !== NULL) { $reverse = $this->pattern; } else/* if ($this->pattern === NULL)*/ { if ($this->redirect !== NULL) retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initMatchAndReverse () {\n\t\tif ($this->reverseSections !== NULL) return;\n\t\tif ($this->pattern === NULL)\n\t\t\t$this->throwExceptionIfKeyPropertyIsMissing('pattern');\n\n\t\t$this->lastPatternParam = NULL;\n\t\t$match = addcslashes($this->pattern, \"#(){}-?!=^$.+|:*\\\\\");\n\t\t$reverse = ...
[ "0.7090364", "0.5377095", "0.5249093", "0.51990026", "0.51922643", "0.51684374", "0.50040567", "0.49622965", "0.4953201", "0.4950228", "0.4934564", "0.49036148", "0.48440936", "0.47946227", "0.4788221", "0.4755765", "0.4746261", "0.47370204", "0.47172785", "0.47064713", "0.46...
0.7523172
0
Initialize reverse params info array. Each item in completed array is `\stdClass` object with records about founded parameter place: `name`, `greedy`, `sectionIndex`, `reverseStart`, `reverseEnd`. Records `matchStart` and `matchEnd` could be values `1` when function argument `$match` is `NULL`, because this function is...
Инициализируйте массив информации о параметрах в обратном порядке. Каждый элемент массива completed является объектом stdClass с записями о найденных местах параметра: name, greedy, sectionIndex, reverseStart, reverseEnd. Записи matchStart и matchEnd могут принимать значение 1, когда аргумент $match функции равен NULL,...
protected function initReverseParams (& $reverse, & $reverseSectionsInfo, & $constraints, & $match = NULL) { $result = []; $completeMatch = $match !== NULL; $reverseIndex = 0; $matchIndex = 0; $sectionIndex = 0; $section = $reverseSectionsInfo[$sectionIndex]; $reverseLength = mb_strlen($reverse); $greed...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initMatchAndReverse () {\n\t\tif ($this->reverseSections !== NULL) return;\n\t\tif ($this->pattern === NULL)\n\t\t\t$this->throwExceptionIfKeyPropertyIsMissing('pattern');\n\n\t\t$this->lastPatternParam = NULL;\n\t\t$match = addcslashes($this->pattern, \"#(){}-?!=^$.+|:*\\\\\");\n\t\t$reverse = ...
[ "0.7186241", "0.6990568", "0.6638446", "0.62585926", "0.61048883", "0.5878621", "0.58362126", "0.55297494", "0.5388323", "0.5291538", "0.49931586", "0.49773648", "0.49524122", "0.4700859", "0.46830896", "0.4671694", "0.46402776", "0.4594156", "0.45544153", "0.45505437", "0.45...
0.76538914
0
Initialize three route integer flags. About if and what scheme definition is contained in given pattern, if and what domain parts are contained in given pattern and if given pattern contains any part of query string. Given pattern is `reverse` and if reverse is empty, it's `pattern` prop.
Инициализируйте три флаг целых маршрутов. Определите, если и какой схемы определение содержится в данном шаблоне, если и какие части домена содержатся в данном шаблоне и если данный шаблон содержит любую часть строки запроса. Данный шаблон — `reverse`, и если reverse пуст, то это свойство `pattern`.
protected function initFlagsByPatternOrReverse ($pattern) { $scheme = static::FLAG_SCHEME_NO; if (mb_strpos($pattern, '//') === 0) { $scheme = static::FLAG_SCHEME_ANY; } else if (mb_strpos($pattern, 'http://') === 0) { $scheme = static::FLAG_SCHEME_HTTP; } else if (mb_strpos($pattern, 'https://') === 0) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initMatchAndReverse () {\n\t\tif ($this->reverseSections !== NULL) return;\n\t\tif ($this->pattern === NULL)\n\t\t\t$this->throwExceptionIfKeyPropertyIsMissing('pattern');\n\n\t\t$this->lastPatternParam = NULL;\n\t\t$match = addcslashes($this->pattern, \"#(){}-?!=^$.+|:*\\\\\");\n\t\t$reverse = ...
[ "0.6568618", "0.64865005", "0.58676046", "0.52820337", "0.5120785", "0.5055493", "0.5027716", "0.49952638", "0.4994026", "0.49280918", "0.4917553", "0.4891009", "0.48871627", "0.48588836", "0.48561904", "0.4830877", "0.48231167", "0.48156837", "0.47943282", "0.47535205", "0.4...
0.7618548
0
if (isset($_POST['user_id']) && is_numeric($_POST['s']))
if (isset($_POST['user_id']) && is_numeric($_POST['s']))
private function get_user_id() { // return intval($_POST['s']); if (isset($_GET['user_id']) && is_numeric($_GET['user_id'])) { //$_POST['s'] = $_GET['user_id']; return intval($_GET['user_id']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasValidPostUid()\n{\n $validState =\n isset($_POST[\"state\"]) && isUid($_POST[\"state\"]);\n \n $validSession =\n isset($_SESSION[\"state\"]) && isUid($_SESSION[\"state\"]);\n \n if($validState && $validSession)\n {\n return $_SESSION[\"state\"] == $_POST[\"state\"];\n }\n else\n {...
[ "0.6181011", "0.60639924", "0.5983581", "0.5805633", "0.5746848", "0.57267255", "0.5661057", "0.5633353", "0.55801797", "0.5577172", "0.5572611", "0.5543544", "0.5527128", "0.55113524", "0.54851943", "0.54836595", "0.548193", "0.54773355", "0.5476028", "0.5463998", "0.546117"...
0.70548385
0
upload only works for User entities
upload только работает для сущностей User
private function uploadFile($entity) { if (!$entity instanceof DUser) { return; } $file = $entity->getPicture(); // only upload new files if (!$file instanceof UploadedFile) { return; } $fileName = $this->uploader->upload($file); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload();", "private function postUploadFile($entity)\n {\n if (!$entity instanceof User) {\n return;\n }\n\n $file = $entity->getTempFile();\n\n // only upload new files\n if (!$file instanceof UploadedFile) {\n return;\n }\n\n ...
[ "0.70467997", "0.6946498", "0.68858933", "0.6811658", "0.669485", "0.6628978", "0.6609578", "0.65895957", "0.65867287", "0.65759933", "0.63668", "0.6300808", "0.62582487", "0.62370276", "0.6190593", "0.61893994", "0.6094032", "0.607278", "0.60646695", "0.6045309", "0.60380477...
0.70752674
0
This method returns the json from array list
Этот метод возвращает json из списка массивов
public function json_encode() { try{ return json_encode((array)array_values(self::get_items())); }catch(Exception $e){ throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getListJsonString() {\r\n \r\n $arr=array();\r\n \r\n foreach ($this->list as $object)\r\n {\r\n $vars = $object->getObjectVars();\r\n \r\n if ( $object->getObjCentro() !=null )\r\n {\r\n $vars['objCentro']=$obje...
[ "0.72982126", "0.705181", "0.6993491", "0.68498564", "0.6830353", "0.6816437", "0.6717638", "0.66275674", "0.6589807", "0.6583303", "0.6582989", "0.6581208", "0.65729165", "0.65625787", "0.6537383", "0.65070826", "0.64930725", "0.64794785", "0.6463965", "0.64507", "0.6443318"...
0.7084782
1
When user logged in store user login data
При входе пользователя сохраняйте данные пользователя
public function saveLoginData() { //Get user data (ip, time, browser) $request = \Yii::$app->getRequest(); $userData = [ 'ip' => $request->getUserIP(), 'login_time' => time(), 'browser' => UserAgent::model()->browser, 'user_id' => \Yii::$app->u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }", "private functio...
[ "0.73674154", "0.7208126", "0.71686655", "0.684174", "0.6811378", "0.6801145", "0.6751898", "0.6749616", "0.66948164", "0.6678967", "0.66297394", "0.6623948", "0.66115767", "0.6606006", "0.6583988", "0.6559912", "0.6538077", "0.65242577", "0.64872897", "0.6446742", "0.6444684...
0.75702024
0
Method 1 Gets all of the products
Метод 1 получает все продукты
public function getAll() { return $this->products; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all(){\n \t\t$response = $this->curl->get( $this->api_url, [ \n\t\t\t'access_token' => $this->token\n\t\t]);\n\n \t\tif( $response->success ){\n \t\t\t$products = [];\n\t\t\tforeach ($response->products as $product) {\n\t \t\t\t$tmp = new Product( $this );\n\t \t\t\t$tmp->fetch($product);...
[ "0.81696516", "0.81120527", "0.8005276", "0.8001242", "0.7997505", "0.79428405", "0.7914478", "0.7901616", "0.7893354", "0.7839842", "0.78044814", "0.7795148", "0.77912706", "0.77805644", "0.7755827", "0.77486175", "0.7741932", "0.76980555", "0.76965535", "0.76795655", "0.766...
0.81549287
1
Get the callback URL.
Получите URL-адрес обратного вызова.
public function getCallbackUrl() { return $this->callback_url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCallbackUrl()\r\n {\r\n return $this->callback_url;\r\n }", "public function get_callback_url(){\n\t\treturn $this->callback_url;\n\t}", "public function getCallbackUrl()\n {\n return $this->getParameter('callbackUrl');\n }", "public function getCallbackUrl()\n ...
[ "0.88661367", "0.88076216", "0.8790226", "0.87749624", "0.8446361", "0.83191365", "0.8318206", "0.8218329", "0.81984675", "0.78449905", "0.783785", "0.7441816", "0.71991843", "0.71917504", "0.71099615", "0.70998627", "0.7082508", "0.7081698", "0.7004788", "0.69278646", "0.686...
0.8867966
0
/ oracle_login: void > void purpose: expects nothing and returns nothing but has the side effect of building an html login form by Marcellus Parley last modified 20180426
oracle_login: void > void purpose: ожидает ничего и возвращает ничего, но имеет побочный эффект построения формы входа в html Marcellus Parley последнее изменение 20180426
function oracle_login() { ?> <form action="<?= htmlentities($_SERVER['PHP_SELF'], ENT_QUOTES) ?>" method="post"> <fieldset> <legend> Oracle Login </legend> <div class="username_pass"> <label for="username_fld"> Username: </label> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('trans...
[ "0.73841363", "0.7350473", "0.7309806", "0.72233075", "0.7093745", "0.7051119", "0.6950626", "0.6943272", "0.6899638", "0.68954986", "0.688297", "0.68628776", "0.68560296", "0.68451846", "0.68451846", "0.6824452", "0.682357", "0.6814895", "0.6814672", "0.679042", "0.67541015"...
0.7931832
0
Gets the available composite object (self in this case).
Получает доступный композитный объект (в данном случае self).
function getComposite() { return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getObject()\n {\n return $this->forgeObject();\n }", "public function get_object()\n {\n return $this->object;\n }", "public function getObject()\n {\n return $this;\n }", "public function get_object()\n {\n return $this->_object;\n }", "p...
[ "0.6451645", "0.64489895", "0.63706934", "0.63526684", "0.63379925", "0.6290879", "0.6281595", "0.62731445", "0.6224414", "0.61935616", "0.61935616", "0.61903757", "0.61903757", "0.61015695", "0.60925937", "0.609002", "0.60763615", "0.60763615", "0.6071203", "0.6053245", "0.6...
0.72762847
0
Gets an array of data with fields and relations needed in revision history.
Получает массив данных с полями и связями, необходимыми для истории редактирования.
public function getRevisionData() { return $this->getData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRevisions(): array;", "public function history()\n\t{\n\t\t$res = $this->hasManyThrough(Revision::class, RevisionSet::class, 'id', 'revision_set_id', 'revision_set_id')\n\t\t\t->where(\n\t\t\t\tfunction ($query) {\n\t\t\t\t\treturn $query->where('revisions.created_at', '<', $this->created_at);...
[ "0.77306175", "0.7204306", "0.7199492", "0.6902535", "0.66657144", "0.66657144", "0.6532738", "0.65165746", "0.6450499", "0.6443531", "0.6428055", "0.6423209", "0.6378845", "0.63544446", "0.6343552", "0.63382524", "0.6278483", "0.624976", "0.62462634", "0.61946195", "0.619062...
0.74471605
1
Imports USA administration level 0 (country)
Импорт уровня управления США 0 (страна)
public function importUsaLevelCountry() { return $this->importData('USA_adm/USA_adm0.shp', 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function importUsaLevelStates()\n {\n return $this->importData('USA_adm/USA_adm1.shp', 0);\n }", "private function _loadLocalizedCountryFields()\n {\n $this->_addAccountfields['United Kingdom'] = ['account_name', 'bank_name', 'sort_code', 'account_number'];\n $this->_addAccou...
[ "0.67534035", "0.6553982", "0.64996743", "0.63109", "0.6169242", "0.6169242", "0.60970604", "0.60949993", "0.6085152", "0.6076152", "0.60613835", "0.60443604", "0.60443604", "0.6023646", "0.60191226", "0.6015569", "0.60119885", "0.59470105", "0.5907035", "0.58959365", "0.5815...
0.8007422
0
Imports USA administration level 1 (states)
Импорт уровня 1 администрации США (штаты)
public function importUsaLevelStates() { return $this->importData('USA_adm/USA_adm1.shp', 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function importUsaLevelCountry()\n {\n return $this->importData('USA_adm/USA_adm0.shp', 0);\n }", "private static function import_countries_states( $opts ) {\n\t\techo absint( self::import_global_states_csv( $opts ) );\n\t}", "public function importUsaLevelCounties()\n {\n return ...
[ "0.6908315", "0.66189903", "0.626148", "0.6017034", "0.5963487", "0.595073", "0.59050304", "0.59033144", "0.5886462", "0.58399963", "0.57921493", "0.5709187", "0.5699826", "0.5652771", "0.5642856", "0.5618905", "0.55506253", "0.55354947", "0.54750013", "0.542755", "0.53769183...
0.7954591
0
Imports USA administration level 2 (counties)
Импорт уровня управления США уровень 2 (округа)
public function importUsaLevelCounties() { return $this->importData('USA_adm/USA_adm2.shp', 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function importUsaLevelCountry()\n {\n return $this->importData('USA_adm/USA_adm0.shp', 0);\n }", "public function importUsaLevelStates()\n {\n return $this->importData('USA_adm/USA_adm1.shp', 0);\n }", "function wc_ie_counties_add_counties( $states ) {\r\n\t$states['IE'] = ar...
[ "0.6868408", "0.6443929", "0.5839611", "0.5775317", "0.56625223", "0.56458956", "0.564032", "0.5565163", "0.5555205", "0.5387053", "0.53322256", "0.53273094", "0.52688944", "0.52559817", "0.5237133", "0.5235443", "0.5147905", "0.51304775", "0.5129921", "0.5102804", "0.5081740...
0.7752886
0
Format the instance as site date
Форматировать экземпляр как дату сайта
public function toSite() { return $this->format(Config::get('settings.site_datetime_format')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formatDate() {\n\t\t\tif(!empty($this->review_date)) {\n\t\t\t\t$date = new dateTime($this->review_date);\n\t\t\t\treturn $date->format('M jS, Y - H:i');\n\t\t\t}\n\t\t}", "public function getDateAdmin()\n {\n return '<strong>' . $this->created_at->format(Config::get('settings.date_form...
[ "0.65940225", "0.6552656", "0.65477496", "0.6414425", "0.64141667", "0.63928205", "0.63681585", "0.6367057", "0.6319835", "0.63180554", "0.63180554", "0.63056815", "0.62869465", "0.6269225", "0.6229646", "0.6227921", "0.6227767", "0.62164235", "0.62072396", "0.6194875", "0.61...
0.7498081
0
Format the instance as database date
Форматировать экземпляр как дату базы данных
public function toDatabase() { return $this->format(Config::get('settings.database_datetime_format')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "protected function ...
[ "0.71171355", "0.69076467", "0.68139815", "0.67236954", "0.6700562", "0.66888225", "0.6687653", "0.6664628", "0.6662499", "0.66290677", "0.66046023", "0.6554928", "0.65429", "0.65032023", "0.6490364", "0.64842856", "0.64805037", "0.6469689", "0.6462172", "0.64541084", "0.6423...
0.7022848
1
Retrieve iterator Retrieve an array copy of the object, reverse its order, and return an ArrayIterator with that reversed array.
Получить итератор Получить копию массива объекта, изменить порядок элементов на обратный и вернуть ArrayIterator с этим обратным массивом.
public function getIterator() { $array = $this->getArrayCopy(); return new ArrayIterator( array_reverse($array) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reverse()\n {\n $this->dataToArray();\n $preserveKeys = (\\Sledgehammer\\is_indexed($this->data) === false);\n\n return new self(array_reverse($this->data, $preserveKeys));\n }", "public function reverse()\n {\n return new static(array_reverse($this->objects, ...
[ "0.7021056", "0.68084174", "0.6766576", "0.6441267", "0.63582426", "0.63489974", "0.6341495", "0.6314599", "0.63092047", "0.6288207", "0.62357295", "0.62347096", "0.6222566", "0.62205863", "0.6219842", "0.62188774", "0.62047327", "0.6183985", "0.61474586", "0.6114677", "0.610...
0.8103426
0
Resets the response in the container.
Сбрасывает ответ в контейнере.
private function resetReponse() { $this->app->singleton("response", function () { return new Response(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetResponse()\n\t{\n\t\t$this->_response = NULL;\n\t\t$this->_redirect = NULL;\n\t}", "public function clearResponse()\n {\n $this->responseContent = '';\n $this->responseHeader = array();\n $this->responseCode = '200 Ok';\n }", "public function clear()\n\t{\n\t\t$t...
[ "0.7655662", "0.74203575", "0.7101546", "0.7092691", "0.6951228", "0.68167794", "0.67838687", "0.6650524", "0.6638022", "0.6560254", "0.6556008", "0.6511103", "0.6511103", "0.6511103", "0.6511103", "0.6511103", "0.6511103", "0.6511103", "0.6511048", "0.6511048", "0.6511048", ...
0.7732364
0
List all the snippets
Перечислите все сниппеты
public function index() { $snippets = $this->snippetService->getAll(); return response()->json($snippets); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n\t{\n\t\t$snippets = Snippet::paginate(10);\n\t\t// return $snippets;\n\t\treturn View::make('admin.snippets')\n\t\t\t->with('snippets', $snippets);\n\t}", "public function getIndex()\n {\n $page = Input::get('page', 1);\n\n // Candidate for config item\n $perPage...
[ "0.72572434", "0.68453556", "0.68147707", "0.649023", "0.635779", "0.62695175", "0.62685084", "0.6193557", "0.6187358", "0.6124792", "0.6038486", "0.599076", "0.59615505", "0.58438814", "0.58438814", "0.58438814", "0.5839735", "0.5753365", "0.57229304", "0.5722901", "0.569188...
0.70880896
1
/ function LogIn check if this email exist in database or not and if exist return his info and if not exist return false $UserData is an array with his email
Функция LogIn проверяет, существует ли этот email в базе данных или нет, и если существует, возвращает его информацию, а если нет — возвращает false. $UserData — это массив с его email
public function LogIn($UserData) { $db = new DB(); if(!empty($UserData)) { //Check whether user data already exists in database $querySelect = "SELECT * FROM ".$this->userTbl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_email_exist(){\n //TODO syntize the query\n $this->SQL = \"SELECT id,private_name,family_name ,email,password FROM users\"\n . \" WHERE email = '\" . $this->params['email'] . \"';\" ;\n \n \n $this->selecet_query();\n \n \n ...
[ "0.72642404", "0.720837", "0.71959907", "0.7144561", "0.7100663", "0.7099993", "0.7095075", "0.7091552", "0.70264786", "0.70249707", "0.7015133", "0.6998184", "0.697854", "0.6940292", "0.6939051", "0.69311696", "0.69308746", "0.6913153", "0.68944097", "0.688037", "0.6878319",...
0.75629336
0
/ update one column in one time $id id of user $col column i want to update $data data i want to set if updated reurn true else return false
Обновить одну колонку за один раз $id идентификатор пользователя $col колонка, которую хочу обновить $data данные, которые хочу установить, если обновлено — вернуть true, иначе — false
public function updateuser($id,$col,$data) { $db = new DB(); $query = "UPDATE `".$this->userTbl."` SET `".$col."` = '".$data."' WHERE `id` = ".$id ; $stm = $db->prepare($query); if($stm->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update2($id, $data){\n // if(isset($data[$this->id]))unset($data[$this->id]);\n $query = $this->db->where('user_id', $id)->update(\n $this->table, $data\n );\n return ($this->db->affected_rows() != 1) ? false : true;\n\n }", "function update_users($data,$id){\n ...
[ "0.76036704", "0.7368375", "0.71382445", "0.7040295", "0.7012188", "0.6936716", "0.6921201", "0.69071096", "0.68866855", "0.68412846", "0.68332964", "0.6826474", "0.6786775", "0.6770361", "0.67296875", "0.6728437", "0.6727717", "0.6727002", "0.6710375", "0.66954046", "0.66774...
0.79858106
0
/ function selectuser used to select specific column in users table $id id of user $col column you want to select
Функция selectuser используется для выбора конкретного столбца в таблице users $id идентификатор пользователя $col столбец, который вы хотите выбрать
public function selectuser($id,$col) { $db = new DB(); $query = "SELECT ".$col." FROM `users` WHERE `id` =".$id; $result = $db->prepare($query); $result->execute(); $ProductData = $result->fetchAll(); $db = NULL; return $ProductData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SelectUserId($con,$id){\n $command = \"SELECT * from user_ WHERE id = '$id' \";\n $result = mysqli_query($con,$command);\n $row = mysqli_fetch_row($result);\n return $row;\n }", "function selectfuntion($id_user)\n {\n ...
[ "0.71715015", "0.71331936", "0.71267277", "0.6933618", "0.69049597", "0.68222815", "0.67801845", "0.67542744", "0.67275053", "0.6714938", "0.67014617", "0.66716355", "0.66312784", "0.6592336", "0.656688", "0.65628886", "0.6525276", "0.65194124", "0.64842224", "0.6479683", "0....
0.83362377
0
/ function GetUsersByLIMIT get 10 rows from users in specific category if $pageid = 5 the limet get from 40 to 50
Функция GetUsersByLIMIT получает 10 строк из пользователей в определенной категории, если $pageid = 5, то диапазон получения строк составляет от 40 до 50
public function GetUsersByLIMIT($pageid) { $db = new DB(); $start = 10*($pageid-1); $row = 10; $query = "SELECT * FROM `users` LIMIT $start,$row"; $stm = $db->prepare($query); $stm->execute(); $result = $stm->fetchAll(); $db = NULL; return $res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getLoggedUsers($limit = null, $offset = 0);", "public function getUsersList($page) {\n $NumberUserOf1Page = 10;\n $pos = ($page - 1) * $NumberUserOf1Page;\n\n //connect to db \n $db = CTSQLite::connect();\n\n // Count total number Products\n ...
[ "0.70817137", "0.6756101", "0.6747797", "0.6672366", "0.6536657", "0.6524269", "0.64828974", "0.64484155", "0.6348663", "0.62867594", "0.628042", "0.6267979", "0.62514126", "0.6235322", "0.62102246", "0.620263", "0.6182315", "0.61806136", "0.6150867", "0.6150841", "0.61402404...
0.82997054
0
Add css file add single css file as asset
Добавить файл css добавить один файл css как активный элемент
public function add_css($file) { $this->add("css", $file); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addCSS() {\n foreach ($this->css_files as $css_file) {\n $this->header.=\"<link rel='stylesheet' href='\" . __ASSETS_PATH . \"/\" . $css_file . \"'/> \\n\";\n }\n }", "public function addCssFile($name)\n {\n $this->fileStyles[] = $name;\n }", "functio...
[ "0.72234184", "0.69790673", "0.68115455", "0.6791187", "0.6777973", "0.6775224", "0.67675984", "0.6761759", "0.67209613", "0.6696885", "0.66819483", "0.6645986", "0.66286993", "0.6590916", "0.6580988", "0.65565956", "0.6554432", "0.65357906", "0.6527348", "0.6518446", "0.6512...
0.70641446
1
Returns type names with new properties which has been updated.
Возвращает имена типов с новыми свойствами, которые были обновлены.
public function getUpdatedTypes() { return $this->updatedTypes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUpdatedProperties() {}", "public function getupdatedproperties($type) {\n\n // Dont filter for now\n $type = '';\n\n // Filter by type\n if ( $type != '' ) {\n foreach ( $this->data as $k => $property ) {\n if ( $pro...
[ "0.7023245", "0.66637874", "0.6199403", "0.61565226", "0.6130374", "0.6117848", "0.5777192", "0.5756414", "0.5643433", "0.55620307", "0.5548266", "0.5548266", "0.5548266", "0.5548266", "0.5548266", "0.5548266", "0.5548266", "0.5548266", "0.5548266", "0.5548266", "0.5516398", ...
0.7151951
0
Counts scalar values recursively in array.
Рекурсивно подсчитывает скалярные значения в массиве.
private function countRecursiveScalars($array) { $count = 0; if (!is_array($array)) { return 1; } foreach ($array as $element) { if (is_array($element)) { $count += $this->countRecursiveScalars($element); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_count_recursive($arr)\n{\n $count = 0;\n foreach (array_values($arr) as $val) {\n $count++;\n if (is_array($val)) {\n $count += array_count_recursive($val);\n }\n }\n\n return $count;\n}", "public function recursiveCount($array): int\n {\n retu...
[ "0.72786635", "0.6785292", "0.6730845", "0.6688027", "0.6179349", "0.6175523", "0.6076271", "0.6056161", "0.60080636", "0.59598696", "0.59471285", "0.5831497", "0.57201034", "0.5719407", "0.5616957", "0.55908394", "0.5589544", "0.55303365", "0.54823357", "0.5424541", "0.54211...
0.78210175
0
Returns true if this class supports the given resource.
Возвращает true, если этот класс поддерживает заданный ресурс.
public function supports($resource) { return is_string($resource) && 'xml' === pathinfo($resource, PATHINFO_EXTENSION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function supports($resource, $type = null)\n {\n return true;\n }", "public function supports($resource, $type = null)\n {\n return is_string($resource) &&\n 'xml' === pathinfo($resource, PATHINFO_EXTENSION) &&\n 'rest' === $type;\n }", "public function is...
[ "0.80015546", "0.74155545", "0.72928834", "0.72284806", "0.7120093", "0.71096295", "0.7100976", "0.7093729", "0.7075715", "0.70406914", "0.6972983", "0.69695854", "0.6965278", "0.69574946", "0.69564766", "0.6895414", "0.68718696", "0.6845603", "0.6826013", "0.676752", "0.6754...
0.773804
1
Checks if a given str is a controller
Проверяет, является ли заданный str контроллером
private static function isController($str) { $str = self::formatAsController($str); if (file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php')) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function formatAsController($str) {\n\t\tif (strpos($str, 'Controller') === false) {\n\t\t\t$str = ucfirst(strtolower($str)).'Controller';\n\t\t}\n\t\t\n\t\treturn $str;\n\t}", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_e...
[ "0.66163033", "0.6606014", "0.65214247", "0.6458779", "0.62580234", "0.62219995", "0.62219995", "0.6218298", "0.6018374", "0.59708786", "0.5970059", "0.5929887", "0.591216", "0.58663994", "0.58535594", "0.58518803", "0.58222216", "0.5806617", "0.5799853", "0.56931084", "0.563...
0.83331805
0
Checks if a given str is a view in the pages folder.
Проверяет, является ли заданный str представлением в папке pages.
private static function isPageView($view) { if (file_exists(APP_DIR.'/Mvc/View/'.$view.'.php')) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isPage($view) \n {\n $view = strtolower($view);\n\n $redirect = ltrim($_SERVER['REDIRECT_URL'], '/');\n \n return $redirect === $view;\n }", "private function hasView($page) {\r\n return file_exists($this->getView($page));\r\n }", "public function ...
[ "0.6764893", "0.66470164", "0.6254008", "0.6242993", "0.61892945", "0.61081576", "0.60895896", "0.6070232", "0.6036533", "0.600138", "0.597976", "0.5944098", "0.59296477", "0.5889524", "0.5856082", "0.57967836", "0.5772895", "0.5757424", "0.5753627", "0.5735197", "0.5725386",...
0.7225363
0
Formats a given str as a controller
Форматирует заданный str как контроллер
private static function formatAsController($str) { if (strpos($str, 'Controller') === false) { $str = ucfirst(strtolower($str)).'Controller'; } return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function parseController($str_controller)\n {\n return $this->str_controller_namespace . str_replace([' ', \"\\t\"], ['', '\\\\'], ucwords(str_replace('-', ' ', strtolower($str_controller))));\n }", "public function formatController()\n {\n if ($this->controllerFormatter) {\n ...
[ "0.6970797", "0.6738775", "0.65079224", "0.6025618", "0.6025618", "0.60249835", "0.57851666", "0.57725537", "0.5745035", "0.5727837", "0.5700719", "0.5695559", "0.56453604", "0.5628388", "0.55458844", "0.5442368", "0.5432827", "0.5406672", "0.53965557", "0.5357598", "0.534356...
0.8081607
0
Formats a given string as an action (Capitalcase)
Форматирует заданный строковый литерал как действие (Capitalcase)
private static function formatAsAction($str) { if (strpos($str, '_') !== false) { do { $uPos = strpos($str, '_'); $str = substr_replace($str, '', $uPos, 1); $str = substr_replace($str, strtoupper(substr($str, $uPos, 1)), $uPos, 1); } while(strpos($str, '_') !== false); return $str; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function toCamelCase($action) {\n\t\tif (strpos($action, '-') !== false) {\n\t\t\t$camelCaseName = str_replace(' ', '', ucwords(str_replace('-', ' ', $action)));\n\t\t\t$camelCaseName[0] = strtolower($camelCaseName[0]);\n\t\t\t$action = $camelCaseName;\n\t\t}\n\t\treturn $action;\n\t}", "public function ...
[ "0.7624825", "0.7171836", "0.712573", "0.7119662", "0.68596286", "0.67322934", "0.67312527", "0.64850795", "0.6424997", "0.6414933", "0.64109814", "0.6386412", "0.6340044", "0.62734395", "0.6226518", "0.6158293", "0.6085061", "0.6052864", "0.6027305", "0.60209054", "0.5996528...
0.7201377
1
Retorna todos os municipios
Возвращает все муниципалитеты
function getAll() { $municipios = array(); $conexao = Conexao::con(); $sql[] = "SELECT * FROM municipio m ORDER by m.nome"; $query = mysqli_query( $conexao, join( '', $sql ) ); while ( $row = mysqli_fetch_array( $query ) ) { $municipio = new stdClass(); $municipio->idMunicipio = $row['id_muni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getListaMunicipios() {\n $droptions = Municipio::find()->orderBy('nombre_municipio')->asArray()->all();\n return ArrayHelper::map($droptions, 'id', 'nombre_municipio');\n }", "public function actualizarMunicipiosTodos()\n\t\t{\n\t\t\t$this->load->model(\"modpersona\");\n\t...
[ "0.7378004", "0.7024294", "0.6721125", "0.6482744", "0.6448985", "0.64091337", "0.6386243", "0.63768035", "0.6228357", "0.61784434", "0.6177079", "0.61615837", "0.60742235", "0.5915569", "0.5898404", "0.5894277", "0.58845884", "0.5868372", "0.58510417", "0.583896", "0.5828839...
0.7075843
1
Get response update User success.
Получить ответ об успешном обновлении пользователя.
protected function responseUpdateSuccess($user) { $this->response = MessageUtility::getResponse( trans('api.CODE_INPUT_SUCCESS'), trans('api.DESCRIPTION_UPDATE_SUCCESS'), trans('api.MSG_UPDATE_SUCCESS',['attribute' => 'User', 'id' => $user->id]), $user->toArra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateUser()\n {\t\t\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\t\n\t\t\t$userModel = UserModel::find($user->id);\n\t\t\t$data = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\t\t\t$userModel->fill($data);\n\t\t\t$userModel->save();\n\t\t\treturn $this->sendResponse('Your det...
[ "0.78672194", "0.7509651", "0.75094706", "0.7479402", "0.74409956", "0.7154879", "0.71055937", "0.70627874", "0.7044481", "0.70439357", "0.6894009", "0.68866616", "0.6779675", "0.67748547", "0.6765457", "0.675899", "0.6721133", "0.66978645", "0.6687805", "0.66629726", "0.6646...
0.77241457
1
Returns all available operating systems
Возвращает все доступные операционные системы
public static function getAvailableOperatingSystems(): array { return self::$operatingSystems; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getOperatingSystems()\n\t\t{\n\t\t\treturn self::$operatingSystems;\n\t\t}", "public function listOs()\n {\n return $this->api->apiRequest('/os/list');\n }", "static public function grabOsInfos() {\n $distro = false;\n if (file_exists('/etc/redhat-release')) {\n ...
[ "0.8015602", "0.7616731", "0.74327266", "0.7398827", "0.7251474", "0.71278465", "0.7024587", "0.6999605", "0.69612885", "0.6932211", "0.6916772", "0.68616235", "0.67843914", "0.66213155", "0.6589583", "0.65619653", "0.65121305", "0.6511049", "0.6481422", "0.6473114", "0.64636...
0.8501449
0
Returns all available operating system families
Возвращает все доступные семейства операционных систем
public static function getAvailableOperatingSystemFamilies(): array { return self::$osFamilies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAvailableOperatingSystems(): array\n {\n return self::$operatingSystems;\n }", "public function listOperatingSystemFamilies()\n {\n $response = $this->_performRequest(self::OP_OPERATINGSYSTEMFAMILIES);\n\n \tif ($response->isSuccessful()) {\n\t\t\t$result = $th...
[ "0.69905764", "0.6849564", "0.6609255", "0.65403044", "0.64711607", "0.6245432", "0.6210936", "0.61985224", "0.6037535", "0.6001642", "0.5962709", "0.595865", "0.5948134", "0.59306985", "0.5930036", "0.5875574", "0.58694535", "0.58492076", "0.58415836", "0.5793703", "0.574665...
0.7995154
0
Create request for operation 'createShippingQuote'.
Создать запрос для операции 'createShippingQuote'.
public function createShippingQuoteRequest($x_ebay_c_marketplace_id, $shipping_quote_request) { // Verify the required parameter 'x_ebay_c_marketplace_id' is set. if ($x_ebay_c_marketplace_id === null || (\is_array($x_ebay_c_marketplace_id) && count($x_ebay_c_marketplace_id) === 0)) { th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createFromShippingQuoteRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createFromShippingQuote'\n );\n ...
[ "0.7238129", "0.6566285", "0.60706496", "0.6030362", "0.5712165", "0.5692138", "0.56609404", "0.5478283", "0.5444429", "0.5417243", "0.5377607", "0.53761643", "0.5329675", "0.5310164", "0.53094894", "0.5297839", "0.529622", "0.5292557", "0.52867323", "0.52506346", "0.5237196"...
0.7237792
1
Create request for operation 'getShippingQuote'.
Создать запрос для операции 'getShippingQuote'.
public function getShippingQuoteRequest($shipping_quote_id) { // Verify the required parameter 'shipping_quote_id' is set. if ($shipping_quote_id === null || (\is_array($shipping_quote_id) && count($shipping_quote_id) === 0)) { throw new \InvalidArgumentException('Missing the required pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createShippingQuoteRequest($x_ebay_c_marketplace_id, $shipping_quote_request)\n {\n // Verify the required parameter 'x_ebay_c_marketplace_id' is set.\n if ($x_ebay_c_marketplace_id === null || (\\is_array($x_ebay_c_marketplace_id) && count($x_ebay_c_marketplace_id) === 0)) {\n ...
[ "0.6969493", "0.6634543", "0.6323052", "0.59027535", "0.5900383", "0.5751124", "0.57479954", "0.57234234", "0.5673346", "0.55803466", "0.55318564", "0.54888606", "0.54851717", "0.5465457", "0.54310185", "0.5415367", "0.54075694", "0.5387344", "0.53695905", "0.53483164", "0.53...
0.7415156
0
function one_out_of_two($str) retuns the string given one out of two letter in uppercase input : $str String
Функция one_out_of_two($str) возвращает строку, в которой один из двух букв в верхнем регистре, входная строка: $str String
function one_out_of_two($str) { $concat = ""; for ($i = 0; $i < strlen($str); $i++) { if ($i % 2 == 0) { $concat = $concat . strtoupper($str[$i]); } else { $concat = $concat . $str[$i]; } } return $concat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upper( $str ) {\r\nreturn preg_match( \"/[A-Z]/\", $str );\r\n}", "function block_multi_capital($str)\n\t{\n\t\t$pattern = \"/[A-Z]{2,}/\";\n\t\t$matched = array();\n\t\tpreg_match_all( $pattern, $str, $matched );\n\t\t$count = count( $matched,1 );\n\t\t$count = ( $count - 1 );\n\t\treturn ( $count > 1 ...
[ "0.61913323", "0.6167676", "0.6089395", "0.59637666", "0.59364605", "0.5900712", "0.5844875", "0.5827377", "0.57681215", "0.57481426", "0.5745288", "0.5715605", "0.57083565", "0.56774837", "0.56773305", "0.56624764", "0.56207806", "0.561763", "0.558802", "0.5582162", "0.55732...
0.82260644
0
/ Gives search suggestions based on what is being searched for
Предоставляет рекомендации поиска в зависимости от того, что ищется
public function suggest() { $suggestions = $this->Role->get_search_suggestions($this->input->post('q'),$this->input->post('limit')); echo implode("\n",$suggestions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function suggest()\n\t{\n\t\t$suggestions = $this->Giftcard->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));\n\t\techo implode(\"\\n\",$suggestions);\n\t}", "function suggest()\n\t{\n\t\t$suggestions = $this->Supplier->get_search_suggestions($this->input->post('q'),$this->input->post...
[ "0.7573277", "0.7514065", "0.74069816", "0.73813087", "0.72494006", "0.7203232", "0.7102418", "0.7070972", "0.7050754", "0.6954871", "0.69452465", "0.69212514", "0.6898926", "0.6870231", "0.6820383", "0.6818585", "0.6801141", "0.6792956", "0.6764503", "0.67517304", "0.6751730...
0.75762
0
Get unique image index
Получить уникальный индекс изображения
private function getUniqueImageIndex(array $imageData) : string { ksort($imageData); unset($imageData['type']); return md5(json_encode($imageData)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImageId();", "public function getHashIndex();", "public function getImageId()\n {\n return $this->_imageId;\n }", "public function getImageId()\n {\n return $this->imageid;\n }", "function generate_id() {\n $this->last_image_id ++;\n return $this->last_image_id;\...
[ "0.6532543", "0.6468178", "0.63341403", "0.62252027", "0.61052215", "0.6097336", "0.60240626", "0.5986888", "0.5984016", "0.59376705", "0.5922786", "0.5906034", "0.588998", "0.5858627", "0.5855631", "0.58263767", "0.58073246", "0.5767967", "0.57591665", "0.57591665", "0.57333...
0.73284274
0
Test get all items endpoints
Тестирование конечных точек получения всех элементов
public function testIndex() { Item::factory()->count(20)->create(); $this->call('GET', '/items') ->assertStatus(200) ->assertJsonStructure([ 'data' => [ '*' => [ 'id', 'guid', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRequestItemsAvailable()\n {\n $response = $this->get('/api/items/available');\n\n $response->assertStatus(200);\n }", "public function testProductGetAll()\r\n\t{\r\n\t\t$this->json('get', '/api/products')->assertStatus(200);\r\n\t}", "public function testGetAll()\n {\...
[ "0.7319049", "0.7200814", "0.7160691", "0.7050792", "0.7020079", "0.6903622", "0.6823919", "0.68115354", "0.68077993", "0.67696106", "0.6756455", "0.6747637", "0.6747249", "0.6746995", "0.6738464", "0.6727913", "0.6721891", "0.67094153", "0.6646932", "0.6631128", "0.6629592",...
0.73360026
0
(1.0) Get onetoone belongsTo relationship floor This device belongs to floor
(1.0) Get onetoone belongsTo отношение floor Этот устройство принадлежит этажу
public function floor() { return $this->belongsTo('App\Floor', 'FLOOR_ID' ,'FLOOR_ID'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function floor()\n {\n return $this->belongsTo('App\\Floor', 'FLOOR_ID', 'FLOOR_ID');\n }", "public function building()\n\t{ \n\t\treturn $this->belongsTo(HafizBuilding::class);\n\t}", "public function complex()\n\t{ \n\t\treturn $this->belongsToThrough(HafizComplex::class, HafizBuilding::c...
[ "0.72988117", "0.6349312", "0.62869954", "0.6111064", "0.6026124", "0.5968063", "0.59403825", "0.5891349", "0.5880016", "0.5876246", "0.5876246", "0.5828975", "0.5828412", "0.5735656", "0.56953764", "0.5688719", "0.5678958", "0.56118685", "0.5597043", "0.5578245", "0.55615103...
0.72201324
1
(3.0) Get onetoone belongsTo relationship gateway This device belongs to gateway
(3.0) Получить отношение one-to-one belongsTo gateway Это устройство принадлежит шлюзу
public function gateway() { return $this->belongsTo('App\Gateway', 'GATEWAY_ID' ,'GATEWAY_ID'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function gateways()\n {\n return $this->hasMany('App\\Gateway', 'ROOM_ID');\n }", "public function conductor_bus(){\n return $this->hasOne('App\\Models\\Bus','assistant_2');\n }", "public function neighborhood() {\n # Define an inverse one-to-many relationship.\n return $t...
[ "0.6170367", "0.6048963", "0.60302097", "0.59895283", "0.5961767", "0.59490955", "0.5873303", "0.5844141", "0.5835872", "0.58265394", "0.58098334", "0.5796327", "0.5762428", "0.5737722", "0.5708012", "0.56945145", "0.568223", "0.56757736", "0.56556404", "0.56526464", "0.56181...
0.745396
0
(4.0) Get onetomany hasMany relationship processedData This device has many processed data
(4.0) Get onetomany hasMany relationship processedData Этот устройство имеет много обработанных данных
public function processedData() { return $this->hasMany('App\ProcessedData', 'DEVICE_ID'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProcessedData(Request $request){\n $deviceID = $request->DEVICE_ID;\n $floor = $request->FLOOR_ID;\n $room = $request->ROOM_ID;\n $deviceType = str_replace(' ', '_', strtolower($request->DEVICE_TYPE));\n $arrID = [];\n //change query to look for device i...
[ "0.6818332", "0.5685901", "0.56345814", "0.56248415", "0.5610246", "0.5605989", "0.5496923", "0.5320384", "0.5289723", "0.5275004", "0.52640355", "0.52273566", "0.51387936", "0.5103989", "0.5096579", "0.50833035", "0.5071364", "0.50579613", "0.5056978", "0.5055313", "0.504522...
0.8088869
0
(5.0) Get onetomany hasMany relationship bindings This device has many bindings
(5.0) Получить onetomany hasMany связь привязок Этот устройство имеет много привязок
public function bindings() { return $this->hasMany('App\Binding', 'SOURCE_DEVICE_ID'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deviceBindings()\n {\n return $this->hasMany('App\\Binding', 'TARGET_DEVICE_ID');\n }", "public function getBindings(): array;", "public function getBindings();", "public function getBindings()\n {\n return $this->bindings;\n }", "public function getBindings()\n ...
[ "0.78350544", "0.6617647", "0.6470789", "0.6238005", "0.6238005", "0.62075716", "0.6124712", "0.5982944", "0.5962533", "0.5947122", "0.5929114", "0.580984", "0.5657321", "0.565432", "0.565432", "0.563421", "0.5592335", "0.5545673", "0.5531339", "0.55156463", "0.548749", "0....
0.76583666
1
(6.0) Get onetomany hasMany relationship deviceBindings This device has many bindings
(6.0) Get onetomany hasMany отношение deviceBindings Этот устройство имеет много связей
public function deviceBindings() { return $this->hasMany('App\Binding', 'TARGET_DEVICE_ID'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bindings()\n {\n return $this->hasMany('App\\Binding', 'SOURCE_DEVICE_ID');\n }", "public function getBindings(): array;", "public function getBindings();", "public function getBindings()\n {\n return $this->bindings;\n }", "public function getBindings()\n {\n ...
[ "0.80228305", "0.6950643", "0.6945803", "0.673735", "0.673735", "0.66765887", "0.6172369", "0.6127341", "0.60674053", "0.6041594", "0.60259145", "0.6004144", "0.59774095", "0.5907468", "0.58646435", "0.58139193", "0.57626384", "0.5698024", "0.568741", "0.5603176", "0.5560675"...
0.8713218
0
(7.0) Get columns that will be used for searching getSearchableColumns Note: Some columns may not be used for search queries, such as primary keys
(7.0) Получить столбцы, которые будут использоваться для поиска getSearchableColumns Примечание: Некоторые столбцы могут не использоваться для запросов поиска, например, первичные ключи
public function getSearchableColumns() { return $this->searchableColumns; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getSearchableColumns()\n {\n $columns = $this->getColumns();\n $searchable = [];\n\n foreach ($columns as $column) {\n if (!$column->searchable) {\n continue;\n }\n\n $searchable[] = $column;\n }\n\n return $se...
[ "0.8265418", "0.80336046", "0.80336046", "0.79569227", "0.7913055", "0.79040074", "0.7783417", "0.7748874", "0.7734299", "0.7717326", "0.7707102", "0.76645553", "0.7622874", "0.7516609", "0.7506824", "0.7500467", "0.7496727", "0.742829", "0.7407835", "0.73755383", "0.73755383...
0.82982427
1
/ Smarty plugin File: function.calendar.php Type: function Name: calendar Purpose: outputs a calendar
Smarty плагин Файл: function.calendar.php Тип: функция Имя: calendar Назначение: выводит календарь
function smarty_function_calendar($params, &$smarty) { // Start input validation if (empty($params['url_format'])) { trigger_error('mandatory param is empty: url_format', E_USER_ERROR); } if (empty($params['year'])) { trigger_error('mandatory param is empty: year', E_USER_ERROR); } if (empty($para...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}", "public function render()\r\n\t{\r\n\t\t$days = 1;\r\n\t\t$this->redirect = isset($this->redirect) ? $this->redirect: $this->getURL() ;\r\n\t\t$this->set_date();\r\n\t\t$total_days = cal_days...
[ "0.73782176", "0.7375063", "0.72124064", "0.7075841", "0.70722395", "0.70400065", "0.7018329", "0.6954972", "0.69401884", "0.6914334", "0.6908487", "0.68542796", "0.6840325", "0.68358904", "0.68004346", "0.6748415", "0.6717309", "0.6696532", "0.6662829", "0.66619265", "0.6649...
0.7707064
0
Store a newly created League in storage.
Храните ново созданную Лигу в хранилище.
public function store(CreateLeagueRequest $request) { $input = $request->all(); $league = $this->leagueRepository->create($input); Flash::success('League saved successfully.'); return redirect(route('league.leagues.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(LeagueRequest $request)\n {\n $model = League::create(['league_title' => $request->input('league')]);\n CountryLeague::create([\n 'league_id' => $model->id,\n 'country_id' => $request->input('country_id'),\n ]);\n\n return redirect(route('l...
[ "0.6897398", "0.6766979", "0.6744701", "0.642094", "0.64095056", "0.6380998", "0.6234239", "0.62009", "0.61499953", "0.6138093", "0.6130111", "0.6117915", "0.6104289", "0.60909134", "0.60882485", "0.6048713", "0.6025507", "0.6017237", "0.60113573", "0.60088575", "0.60045815",...
0.72778493
0
Create TreePath Model Object.
Создать объект модели TreePath.
protected function addTreePathModelObject(): AbstractTreePath { return Yii::createObject($this->treePathModelClass); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createModel()\n {\n return new LeafModel();\n }", "public function createModel()\n\t{\n\t\t$class = '\\\\'.ltrim($this->model, '\\\\');\n\t\treturn new $class;\n\t}", "public function actionCreate()\n {\n $model = new Trees();\n\n if ($model->load(Yii::$app->req...
[ "0.68628293", "0.5895826", "0.5708257", "0.5627915", "0.5627915", "0.5551363", "0.55489135", "0.55102575", "0.5440616", "0.53605235", "0.53533155", "0.53301716", "0.5294319", "0.5282327", "0.5269212", "0.5255705", "0.5241937", "0.52346504", "0.52308697", "0.52099997", "0.5188...
0.74110097
0
Returns the parent level.
Возвращает уровень родителя.
protected function getParentLevel(): ?int { if (empty($this->owner->getAttribute($this->ownerParentIdAttribute))) { return 0; } return $this->treePathModelClass::find() ->select('parent_level') ->byParentId($this->owner->getAttribute($this->ownerParentIdA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_parent()\r\n {\r\n return $this->parent;\r\n }", "public function get_parent() {\n\t\treturn $this->parent();\n\t}", "public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }", "public function getLevel()\n {\n return $this->get(self::_L...
[ "0.7632918", "0.76291865", "0.75017107", "0.75017107", "0.75017107", "0.75017107", "0.75017107", "0.75017107", "0.74771345", "0.74711186", "0.74213105", "0.74213105", "0.73526573", "0.7329338", "0.731363", "0.73110026", "0.72656363", "0.72578573", "0.7230072", "0.7227511", "0...
0.7822647
0
Updates the tree path after updating the parent.
Обновляет путь дерева после обновления родителя.
public function afterUpdate(): void { if ($this->oldParentId != $this->owner->getAttribute($this->ownerParentIdAttribute)) { $this->rebuildTreePath(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drev_sync_path_menu_update_menu($tree, $parent_alias = NULL) {\n \n foreach($tree as $item) {\n \n // Update the item\n $new_parent_alias = drev_sync_path_menu_update_menu_item($item, $parent_alias);\n \n // And go deeper if we can...\n if(!empty($item['below'])) {\n drev_sync_pat...
[ "0.69311494", "0.65326005", "0.6530891", "0.64316267", "0.64054203", "0.61273193", "0.6070147", "0.6016994", "0.5983431", "0.5934392", "0.5833913", "0.5828533", "0.5716173", "0.56879807", "0.56839544", "0.56395537", "0.5636769", "0.56339014", "0.5613148", "0.5597349", "0.5597...
0.74768287
0
Remove tree path by ids.
Удалить путь дерева по идентификаторам.
protected function removeTreePathByIds($ids): void { $this->treePathModelClass::deleteAll( [ 'child_id' => $ids, ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($ids);", "function tree_delete_rec($id) {\n global $CFG, $DB;\n\n $deleted = array();\n if (empty($id)) return $deleted; \n\n // echo \"deleting $id<br/>\";\n // getting all subnodes to delete if is tree.\n if ($istree) {\n $sql = \"\n SELECT \n ...
[ "0.6270165", "0.6194292", "0.6066862", "0.60548174", "0.58779025", "0.58317536", "0.5788572", "0.5753026", "0.573368", "0.5706002", "0.56883955", "0.5655395", "0.5626482", "0.56145024", "0.56077933", "0.5597805", "0.5570342", "0.5558665", "0.54790115", "0.54609257", "0.545164...
0.7833796
0
Send message to given phone number
Отправить сообщение на указанный номер телефона
public function send($message, $to_phone);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send(string $phone)\n {\n }", "function send($mobile, $message);", "function sendSMS($client, $number, $message) {\r\n $client->messages->create(\r\n $number,\r\n array(\r\n \"from\" => \"+16474901643\",\r\n \"body\" => \"Reminder: \".$message\r\n ...
[ "0.77217644", "0.7593866", "0.7270233", "0.7197894", "0.7135952", "0.7100668", "0.7094956", "0.70720005", "0.7049782", "0.70005345", "0.69964683", "0.69235563", "0.6886794", "0.6862211", "0.68184596", "0.68160784", "0.67933863", "0.6779262", "0.6762309", "0.67582864", "0.6747...
0.8439632
0
Clean URI to keep only true URI, delete script folders and put array keys to 0
Очистить URI, чтобы оставить только истинный URI, удалить папки сценариев и поместить ключи массива в 0
private function cleanRequestURI() { for ($i = 0; $i < sizeof($this->scriptPath); $i++) { if ($this->explodedURI[$i] == $this->scriptPath[$i]) { unset($this->explodedURI[$i]); } } $this->explodedURI = array_values($this->explodedURI); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanUri(){\n return preg_replace('/[^\\da-z\\-\\/\\_]/i', '', filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL));\n }", "private function fixUri(){\n\t\t$this->uri = rtrim($this->uri,'/');\n\t}", "function cleanPath($path) {\n // files////janko/mika\n\n while (strpos($pa...
[ "0.6321798", "0.611352", "0.5855571", "0.5832056", "0.5793398", "0.56289124", "0.56020874", "0.5601848", "0.5589342", "0.55844176", "0.55585897", "0.5533815", "0.5488179", "0.54852206", "0.5479955", "0.5467555", "0.5425764", "0.54145586", "0.5407215", "0.54049534", "0.5401746...
0.700693
0
End: function modify_team DELETE TEAM
End: функция modify_team УДАЛИТЬ КОМАНДУ
function delete_team($teamname) { $qDelete = "DELETE FROM authteam WHERE teamname='$teamname'"; $qUpdateUser = "UPDATE authuser SET team='Ungrouped' WHERE team='$teamname'"; if ($teamname == "Admin") { return "Admin team cannot be deleted."; } elseif ($teamname == "Ungrou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function teamdelete(){\n $this->auth(COMP_ADM_LEVEL);\n $team_id = $this->uri->segment(3);\n $contest_id = urldecode($this->uri->segment(4));\n $this->m_key->removeTeam($team_id);\n $this->m_team->delete($team_id, $contest_id);\n $this->teams($contest_id);\n }", "public function destroy(Team $...
[ "0.77240026", "0.705849", "0.705849", "0.705849", "0.705849", "0.705849", "0.6967703", "0.67964894", "0.67925805", "0.65950173", "0.64855355", "0.64510614", "0.6445702", "0.6335856", "0.63203", "0.63088226", "0.62976277", "0.62823194", "0.6242925", "0.6218734", "0.62095684", ...
0.707249
1
Get the ParsedClass instance.
Получите экземпляр ParsedClass.
public function getParsedClass() { return $this->_parsedClass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClass()\n {\n return $this->refl->isAbstract()\n ? null\n : new ParsedClass(\n (string) $this->refl->getDocComment(),\n $this->getCleanReflectionName(),\n $this->refl->getNamespaceName(),\n $this->getMeth...
[ "0.7315457", "0.62955207", "0.6124868", "0.60459495", "0.603492", "0.5954517", "0.595106", "0.59403175", "0.58707005", "0.5867851", "0.5804126", "0.57563365", "0.5732969", "0.57226336", "0.5721525", "0.57129323", "0.57027054", "0.56720805", "0.5656656", "0.5650149", "0.565014...
0.8105553
0
Lists all companyStatus entities.
Список всех сущностей companyStatus.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $companyStatuses = $em->getRepository('AppBundle:CompanyStatus')->findBy(array('isDeleted' => false), array('position' => 'ASC')); return [ 'companyStatuses' => $companyStatuses, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allCompanies()\n {\n return Company::all();\n }", "public function getAllStatus()\n {\n return OrderStatus::all();\n }", "public function index()\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", ...
[ "0.6046334", "0.602086", "0.59819096", "0.59819096", "0.5886414", "0.5830753", "0.5820058", "0.5808514", "0.57897437", "0.57866114", "0.5768027", "0.5757444", "0.5732084", "0.5723859", "0.5718735", "0.5717709", "0.5703822", "0.5703575", "0.5662385", "0.5660657", "0.56270605",...
0.7256766
0
Get progress of import task
Получить прогресс задачи импорта
public function progressTask() { // get request vars $id = Request::getInt('id', 0); // create import model object $import = Import::oneOrFail($id); // get the lastest run $run = $import->runs() ->whereEquals('import_id', $import->get('id')) ->ordered() ->row(); // build array of data to retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProgress();", "function getProgress() ;", "public function getProgress()\n {\n return $this->get(self::_PROGRESS);\n }", "public function getProgress()\n {\n return $this->get(self::_PROGRESS);\n }", "public function getProgress()\n {\n return $this->p...
[ "0.7428593", "0.7320271", "0.6813871", "0.6813871", "0.68020236", "0.67280924", "0.6553368", "0.64204407", "0.6233722", "0.62271875", "0.6144829", "0.61418486", "0.6121049", "0.61103344", "0.60945976", "0.60802996", "0.60671324", "0.60437804", "0.6029934", "0.60026014", "0.58...
0.7790269
0
Quote a value for a CSV file
Цитировать значение для файла CSV
public static function quoteCsv($val) { if (!isset($val)) { return ''; } if (strpos($val, "\n") !== false || strpos($val, ',') !== false) { return '"' . str_replace(array('\\', '"'), array('\\\\', '""'), $val) . '"'; } return $val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function quote($value) {\n\t\treturn $this -> getAdapter() -> quote($value);\n\t}", "function add_quote($value) {\n\t\treturn '\"' . addslashes($value) . '\"';\n\t}", "function _replaceQuoteCSV($string){\r\n //also remove newlines\r\n $string = preg_replace('/\\s+/', ' ', trim($str...
[ "0.65913194", "0.65911204", "0.65660006", "0.65521395", "0.64287883", "0.64205986", "0.634259", "0.6319609", "0.63183737", "0.6271651", "0.6268322", "0.6262306", "0.6219461", "0.6163626", "0.6152123", "0.6122823", "0.6098834", "0.60671437", "0.6004545", "0.6002873", "0.599880...
0.75419897
0
Quote a CSV row
Цитировать строку CSV
public function quoteCsvRow($vals) { return implode(',', array_map(array($this, 'quoteCsv'), $vals)) . "\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function quoteCsv($val)\n\t{\n\t\tif (!isset($val))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tif (strpos($val, \"\\n\") !== false || strpos($val, ',') !== false)\n\t\t{\n\t\t\treturn '\"' . str_replace(array('\\\\', '\"'), array('\\\\\\\\', '\"\"'), $val) . '\"';\n\t\t}\n\n\t\treturn $val;\n\t}", "fun...
[ "0.72952616", "0.6728817", "0.67087096", "0.6299758", "0.6248503", "0.62174106", "0.5962991", "0.59593666", "0.5951948", "0.59132904", "0.5892304", "0.58802456", "0.58540297", "0.58460367", "0.58077335", "0.5755857", "0.57305235", "0.56916857", "0.5667598", "0.56252736", "0.5...
0.7296372
0
Plugin Name: Easy table content helper Description: Helper plugin to extend easy table content plugin functionality. It shows table content in horizontal manner as a secondary menu. Author: 1naveengiri Author URI: Version: 0.1 Function to add content before the page content
Название плагина: Easy table content helper Описание: Вспомогательный плагин для расширения функциональности плагина easy table content. Показывает содержимое таблицы в горизонтальном формате как второстепенное меню. Автор: 1naveengiri URL автора: Версия: 0.1 Функция для добавления содержимого перед содержимым страницы
function buddy_add_horizonal_table_content(){ echo do_shortcode('[ez-toc]'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tt_add_menu_items(){\n\tadd_menu_page('Example Plugin List Table', 'List Table Example', 'activate_plugins', 'tt_list_test', 'tt_render_list_page');\n}", "public function add_menu() {\n\t\tadd_menu_page( 'Custom Table', 'Custom Table', 'manage_options', 'custom-table', [ $this, 'display_page_contents' ]...
[ "0.6591094", "0.61715096", "0.6156237", "0.6092518", "0.60669553", "0.59770477", "0.59765005", "0.59390235", "0.59026706", "0.58977324", "0.5891201", "0.5879989", "0.58726436", "0.58600616", "0.58331716", "0.5828439", "0.57974696", "0.5772282", "0.5764522", "0.5709216", "0.57...
0.76299745
0
Return the default table name for this meta.
Верните имя таблицы по умолчанию для этого мета.
public function getDefaultTableName(): string { return \implode('_', \array_map(function ($element) { return Str::plural($element); }, \array_merge( \is_null($this->getModelGroup()) ? [] : \explode('_', $this->getModelGroup()), ['pivot'], \explode('_',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, ...
[ "0.77122426", "0.762114", "0.7595007", "0.7572677", "0.7562311", "0.75504106", "0.75473154", "0.7510391", "0.75024724", "0.74940234", "0.74703217", "0.7448616", "0.74453014", "0.74388343", "0.7428446", "0.74064666", "0.7391836", "0.73849016", "0.7373338", "0.735044", "0.73253...
0.8468371
0
Indicate the this meta is a pivot one.
Укажите, что этот мета является пивотом.
public function isPivot(): bool { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasPivotData(): bool;", "protected function isColumnPivot($column)\n {\n if (!isset($column->relation) || $column->relation != 'pivot') {\n return false;\n }\n\n return true;\n }", "protected function isColumnPivot($column)\n {\n if (!isset($colum...
[ "0.71136916", "0.6319915", "0.6319915", "0.5912071", "0.58999884", "0.55519456", "0.5544307", "0.54494864", "0.5409153", "0.5334487", "0.53322536", "0.5302813", "0.52581084", "0.5199349", "0.5179676", "0.5178338", "0.5145623", "0.5145623", "0.5145623", "0.5145623", "0.5132047...
0.77967584
0
Returns any errors there may be. This method considers the enabled status of the CompositeValidator as a whole (exiting early if the Composite is disabled), as well as the enabled status of each individual Validator.
Возвращает любые ошибки, которые могут быть. Этот метод учитывает статус включения CompositeValidator в целом (выход на ранней стадии, если Composite отключен), а также статус включения каждого отдельного Validator.
public function validate() { $this->resetResult(); // This CompositeValidator has been disabled in full if (!$this->getEnabled()) { return $this->result; } foreach ($this->getValidators() as $validator) { // validate() will return a ValidationResult,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFailedValidators() {\n return $this->failedValidators;\n }", "public function validation_errors()\n\t{\n\t\t$errors = array();\n\n\t\tforeach ($this->validators as $fld=>$arr)\n\t\t{\n\t\t\tforeach ($arr as $vl)\n\t\t\t{\n\t\t\t\t$vl->page = $this;\n\n\t\t\t\tif (!$vl->validate($fld,...
[ "0.65420556", "0.64502895", "0.6370279", "0.6309253", "0.62860966", "0.61955875", "0.6189128", "0.61803603", "0.6154338", "0.6125149", "0.6114807", "0.61102337", "0.6103417", "0.6094561", "0.60743123", "0.6065356", "0.60555375", "0.60512453", "0.60512453", "0.60459876", "0.60...
0.7060257
0
Check if emails address are set
Проверьте, установлены ли адреса электронной почты
private function checkEmailSettings(): bool { return (is_array($this->properties['mail_recipients']) || is_array($this->properties['mail_bcc'])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasEmailAddress()\n {\n return $this->_hasVar('user_email') && $this->_getVar('user_email');\n }", "public function hasEmail() {\n return $this->_has(4);\n }", "public function isAtLeastOneKnownEmailAddress($_);", "public function emailEntryIsValid() {\r\n \r\n ...
[ "0.7523305", "0.7142451", "0.70602167", "0.7007984", "0.6857006", "0.6837056", "0.6783906", "0.6782888", "0.67423046", "0.6739507", "0.65890807", "0.65847975", "0.65816605", "0.6527485", "0.6523064", "0.6481505", "0.6472178", "0.64708495", "0.64679456", "0.64152646", "0.64010...
0.7175426
1
checks for substring in an array
проверка наличия подстроки в массиве
function substr_in_array($needle, array $haystack){ foreach($haystack as $item){ if(false !== strpos($item, $needle)){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_contains_part_of_string ($string, $array) {\n\tforeach ($array as $value) {\n\t\t//if (strstr($string, $url)) { // mine version\n\t\tif (strpos($string, $value) !== FALSE) { // Yoshi version\n\t\t\treturn true;\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}\n return false;\n\t\n}", "function isstr($array, $te...
[ "0.73388267", "0.7300843", "0.7022611", "0.69680536", "0.69110286", "0.6648916", "0.6603862", "0.6534125", "0.6533907", "0.65057665", "0.637638", "0.6328634", "0.63107437", "0.6281194", "0.6264901", "0.62555754", "0.6229908", "0.621313", "0.6182785", "0.61764646", "0.6171749"...
0.763976
0
/ Return MySQL default port
Возвращает порт по умолчанию MySQL
public function getDefaultPort() { return 3306; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function defaultPort()\n {\n return getservbyname($this->scheme ? $this->scheme : 'http', 'tcp');\n }", "public function getDefaultPort()\n {\n return 5432;\n }", "public function port() {\n return $this->db['port'];\n }", "public function getDbPort(): string\n {...
[ "0.7701109", "0.7600956", "0.7590235", "0.71788853", "0.71232885", "0.7015878", "0.6832941", "0.6802237", "0.67633355", "0.6734618", "0.6675148", "0.660831", "0.6605418", "0.6597131", "0.6583062", "0.65577066", "0.6532217", "0.6494418", "0.6494418", "0.6476943", "0.6438103", ...
0.8627155
0
/ Return MySQL server version
Возвращает версию сервера MySQL
public function getVersion() { return mysql_get_server_info(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMysqlServerVersion()\r\n {\r\n $connect = $this->container->get('doctrine.dbal.default_connection');\r\n $query = $connect->query(\"SHOW GLOBAL VARIABLES LIKE '%version%'\");\r\n while ($row = $query->fetch()) {\r\n $result[$row[\"Variable_name\"]] = $row['Valu...
[ "0.8302827", "0.795214", "0.78837305", "0.7699997", "0.76121205", "0.75869817", "0.75501424", "0.7531185", "0.7527514", "0.74900866", "0.748727", "0.74074954", "0.734661", "0.7299141", "0.7227404", "0.71165437", "0.70938796", "0.7014156", "0.7009294", "0.6989695", "0.6963222"...
0.87235683
0
Return $filename path located in themes folder
Верните путь $filename, находящийся в папке themes
public function themes_path($filename = null) { return $filename ? $this->themesPath . '/' . $filename : $this->themesPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_theme_file_path($file = '')\n {\n }", "protected function _getThemesPath()\n {\n $pathElements = array(\n dirname(__FILE__),\n '..',\n '..',\n 'public',\n 'themes'\n );\n return realpath(implode(DIRECTORY_SEPARATOR,...
[ "0.81548786", "0.74204224", "0.73157454", "0.7264323", "0.7224078", "0.71927786", "0.71913815", "0.7174116", "0.7136946", "0.70815957", "0.7081453", "0.7079372", "0.69984967", "0.69752544", "0.6891521", "0.6780477", "0.6780272", "0.6775147", "0.6764414", "0.67447597", "0.6727...
0.8271353
0
Find a theme by it's name
Найдите тему по её имени
public function find($themeName) { // Search for registered themes foreach ($this->themes as $theme) { if ($theme->name == $themeName) { return $theme; } } throw new Exceptions\themeNotFound($themeName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findTheme($themeName);", "public function getActiveThemeByName($theme_name);", "public function getTheme();", "protected function getTheme()\n\t{\n\t\treturn strtolower($this->argument('name'));\n\t}", "public static function getTheme()\n {\n $className = static::getCalledClass();...
[ "0.8845574", "0.74221617", "0.7222886", "0.71446586", "0.70790446", "0.688974", "0.6830771", "0.6588475", "0.65452904", "0.65156054", "0.64936346", "0.6475086", "0.6402635", "0.63922256", "0.6390752", "0.6379974", "0.63730603", "0.63553417", "0.6344057", "0.6342492", "0.62952...
0.7481864
1
Rebuilds the cache file
Пересоздает файл кэша
public function rebuildCache() { $themes = $this->scanJsonFiles(); // file_put_contents($this->cachePath, json_encode($themes, JSON_PRETTY_PRINT)); $stub = file_get_contents(__DIR__ . '/stubs/cache.stub'); $contents = str_replace('[CACHE]', var_export($themes, true), $stub); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateInternalCache()\n\t{\n\t\t// Purge\n\t\t$this->purgeInternalCache();\n\n\t\t// Rebuild\n\t\t$this->generateConfigCache();\n\t\t$this->generateDcaCache();\n\t\t$this->generateLanguageCache();\n\t\t$this->generateDcaExtracts();\n\t}", "public function updateCache();", "private static func...
[ "0.6491983", "0.6459955", "0.64271337", "0.64202154", "0.6412139", "0.6399634", "0.6374599", "0.63711244", "0.6352128", "0.63386106", "0.62591946", "0.6247567", "0.6246438", "0.6244623", "0.62311906", "0.62251383", "0.6215492", "0.6207733", "0.6200961", "0.61920446", "0.61908...
0.7934182
0
Scans theme folders for theme.json files and returns an array of themes
Сканирует папки тем в поисках файлов theme.json и возвращает массив тем
public function scanJsonFiles() { $themes = []; foreach (glob($this->themes_path('*'), GLOB_ONLYDIR) as $themeFolder) { $themeFolder = realpath($themeFolder); if (file_exists($jsonFilename = $themeFolder . '/' . 'theme.json')) { $folders = explode(DIRE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getThemes() {\n\n\t$themesPath = '../../content/themes';\n\n\t$list = scandir($themesPath);\n\t$baseUrl = \\Raindrop\\Core\\Config\\Config::item('baseUrl');\n\t$themes = [];\n\n\tif(!empty($list)) {\n\t\tunset($list[0]);\n\t\tunset($list[1]);\n\n\t\tforeach($list as $dir) {\n\t\t\t$pathThemeDir = $themesP...
[ "0.8207102", "0.79541254", "0.79295987", "0.79103947", "0.7853992", "0.77057606", "0.7662372", "0.76221615", "0.7570447", "0.74533856", "0.73229605", "0.7315255", "0.72631496", "0.7233973", "0.7074584", "0.7070626", "0.7048884", "0.7035264", "0.69457227", "0.68655175", "0.679...
0.8540374
0
Scan all folders inside the themes path & config/themes.php If a "theme.json" file is found then load it and setup theme
Просканируйте все папки внутри пути themes и config/themes.php. Если найден файл "theme.json", загрузите его и настройте тему
public function scanThemes() { $parentThemes = []; $themesConfig = config('themes.themes', []); foreach ($this->loadThemesJson() as $data) { // Are theme settings overriden in config/themes.php? if (array_key_exists($data['name'], $themesConfig)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function scanJsonFiles()\r\n {\r\n $themes = [];\r\n foreach (glob($this->themes_path('*'), GLOB_ONLYDIR) as $themeFolder) {\r\n $themeFolder = realpath($themeFolder);\r\n if (file_exists($jsonFilename = $themeFolder . '/' . 'theme.json')) {\r\n\r\n $fol...
[ "0.79209036", "0.74556345", "0.7422077", "0.7328163", "0.72249675", "0.71615463", "0.70531726", "0.70512605", "0.7002758", "0.69143975", "0.6758028", "0.6712508", "0.66665715", "0.66625714", "0.6656916", "0.6556796", "0.65363455", "0.6425786", "0.6399321", "0.63572425", "0.62...
0.8104486
0
/ | Blade Helper Functions | Return css link for $href
| Помощь функций лезвия | Возвращать ссылку на css для $href
public function css($href) { return sprintf('<link media="all" type="text/css" rel="stylesheet" href="%s">', $this->url($href)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function css($href) {\n\t\tif (is_array($href)) {\n\t\t\t$return = '';\n\t\t\tforeach ($href as $h) $return .= self::css($h);\n\t\t\treturn $return;\n\t\t} else {\n\t\t\t//see if shortcut exists\n\t\t\t$shortcuts = config::get('css.shortcuts');\n\t\t\tif (array_key_exists($href, $shortcuts)) $href = $shortc...
[ "0.7514859", "0.6424251", "0.63273245", "0.6172119", "0.6168248", "0.61563194", "0.6124968", "0.60358727", "0.60316676", "0.5997698", "0.5993789", "0.5988227", "0.598597", "0.59447956", "0.5913604", "0.58987695", "0.5898299", "0.5888315", "0.5870644", "0.5855962", "0.5835656"...
0.7022688
1
Return the dates of the first and last blog entries 7 feb 09: created 5 jan 11: combined two functions into one
Верните даты первой и последней записей блога 7 февраля 09: создано 5 января 11: объединены две функции в одну
function blog_first_and_last_dates() { $dates = array(); $query = "SELECT `time` FROM `blog` ORDER BY `time` ASC LIMIT 1"; $result = mysql_query($query); $row = mysql_fetch_array($result); array_push($dates, $row[0]); $query = "SELECT `time` FROM `blog` ORDER BY `time` DESC LIMIT 1"; $result = mysql_query($que...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getPostDateRange() {\n \n switch($this->validFilter['postDate']) {\n case 'today' :\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\...
[ "0.62380487", "0.615299", "0.5836974", "0.57908237", "0.5778499", "0.57604593", "0.56796557", "0.5659334", "0.5647543", "0.5626705", "0.5622599", "0.5605269", "0.55863565", "0.55851537", "0.55801463", "0.557753", "0.5552718", "0.554953", "0.549085", "0.54873246", "0.5476557",...
0.73462486
0
Modify my blog_id Old format: tag:iam.solostyle.net,20080813:/2008/08/whataday New format: 20080813:whataday This is the natural key
Измените мой blog_id Старый формат: tag:iam.solostyle.net,20080813:/2008/08/whataday Новый формат: 20080813:whataday Это естественный ключ
function update_blog_id() { $table = 'blog_tags'; $query = "SELECT `blog_id` FROM `" . $table . "` WHERE `blog_id` not in ('2006-03-02:next-door')"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $loc = strrchr($row[0],"/"); $loc = substr($loc,1); $date = strrchr($row[0],","); $d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_blog_id_again() {\n\t$table = 'blog_category'; // need to do all that start with \"blog\"\n\t$query = \"SELECT `blog_id` FROM `\" . $table . \"`\";\n\t$result = mysql_query($query);\n\twhile ($row = mysql_fetch_array($result)) {\n\t\t$id = str_replace(':', '/', $row[0]);\n\t\t$query = \"update `\" ...
[ "0.6653416", "0.6233495", "0.59801984", "0.5892923", "0.5649367", "0.5602658", "0.55021363", "0.5441881", "0.5435031", "0.54318017", "0.5427033", "0.53992844", "0.5381435", "0.5336111", "0.53160214", "0.5314547", "0.5314158", "0.5309192", "0.5289796", "0.5274326", "0.5271794"...
0.7183961
0
Update the database time for all entries! 7 mar 09: created
Обновите время базы данных для всех записей! 7 мар 09: создано
function update_entry_time() { $query = "SELECT `id` FROM `blog` WHERE `time` = '0000-00-00 00:00:00'"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $datepos = strpos($row[0],","); $date = substr($row[0],$datepos+1,10); $hr = rand(0,24); if ($hr<10) $hr = "0" . $hr; $mn = r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateQueryTime()\n\t{\n\t\t$this->setLastQueryTime(time());\n\t\t$this->save();\n\t}", "protected static function setSyncLastTime()\n {\n DB::update(\"UPDATE `sync_last_time` SET timestamp = ? WHERE id=?\", [time(), 1]);\n }", "function updateTime($abrv){\n\t$time = time();\n\t$sq...
[ "0.7076871", "0.6751708", "0.6588383", "0.63749963", "0.6333144", "0.6325113", "0.6319088", "0.6262284", "0.6222596", "0.6213909", "0.61929005", "0.61885357", "0.61854726", "0.61625654", "0.61109227", "0.60999805", "0.6087697", "0.6059711", "0.60559213", "0.60448503", "0.6026...
0.70210266
1
Get the field name/id for the nonce field.
Получите имя/идентификатор поля для поля одноразового числа.
public function get_nonce_field(): string { return $this->nonce_field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdentifier()\n {\n return static::FIELD_ID;\n }", "public function getIdentifierField();", "public function get_field_id() {\n\t\treturn $this->get_field_attr( 'id' );\n\t}", "public function get_field_name();", "public function get_field_key() {\n\t\treturn $this->get_field...
[ "0.67392796", "0.6639026", "0.6472387", "0.6371506", "0.6357886", "0.6286608", "0.62062925", "0.6182856", "0.6051115", "0.60381925", "0.6036821", "0.6025078", "0.5974363", "0.5971786", "0.5970253", "0.5967253", "0.59589905", "0.59459317", "0.5940267", "0.5935247", "0.5927553"...
0.7637368
0
Checks if the action is defined.
Проверяет, определено ли действие.
public function has_valid_action(): bool { return is_string( $this->get_action() ) && \mb_strlen( $this->get_action() ) > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasAction()\n {\n return !is_null($this->_action);\n }", "public function hasAction(string $name): bool;", "public function hasActions();", "public function isAction()\n {\n $args = func_get_args();\n foreach ($args as $arg)\n {\n // Check if action is...
[ "0.825277", "0.7432535", "0.7400957", "0.73274547", "0.71783584", "0.71131593", "0.70850176", "0.7057132", "0.6879339", "0.6814579", "0.6767158", "0.6731491", "0.6719131", "0.6719131", "0.6719131", "0.667448", "0.66369224", "0.6604468", "0.65983236", "0.6587849", "0.65806156"...
0.76880044
1
Builds a new post.
Создает новый пост.
public function buildPost($content);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createPostFromInput() {\n\n $record = [\n 'id_config' => post_config()->getCurrent()->get('id'),\n 'id_user' => user()->getCurrent()->get('id'),\n 'id_parent' => in('id_parent', 0),\n 'subject' => in('subject', ''),\n 'content' => in('co...
[ "0.69335407", "0.6909561", "0.6692913", "0.6350082", "0.6234773", "0.61780405", "0.61398906", "0.61397696", "0.61397696", "0.61280835", "0.6098997", "0.6078261", "0.6077518", "0.60540384", "0.6041102", "0.60239565", "0.60239565", "0.60239565", "0.60239565", "0.60239565", "0.6...
0.7356493
0
Returns the description of this migration.
Возвращает описание этой миграции.
public function getDescription() { $description = 'A migration which creates the `role` and `permission` tables.'; return $description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDescription()\n {\n $description = 'This is the migration which provides user impersonation.';\n\n return $description;\n }", "public function getDescription()\n {\n $description = 'This migration adds the post_user_id_fk foreign key to the post table.';\n ...
[ "0.8169561", "0.7710895", "0.6984241", "0.6942694", "0.6939115", "0.68596554", "0.68461084", "0.6836231", "0.6780154", "0.6777296", "0.674363", "0.674363", "0.674363", "0.674363", "0.674363", "0.674363", "0.674363", "0.674363", "0.67272395", "0.67104405", "0.6706191", "0.67...
0.8113845
1
Get the first attachment filename for this inventory. If does not exist, returnd default image.
Получите имя первого прикрепленного файла для этого инвентаря. Если его нет, верните изображение по умолчанию.
public function getFirstAttachmentFilename() { if($this->attachment && count($this->attachment)) { return '/' . $this->attachment[0]->filename; } return Inventory::getDefaultImage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttachmentFilename()\n {\n return $this->attachment_filename;\n }", "static public function GetGETAttachmentName() {\n if (isset(self::$attachmentName))\n return self::$attachmentName;\n else\n return false;\n }", "public function getFirstI...
[ "0.70553327", "0.6478755", "0.64387125", "0.6429814", "0.63696307", "0.6313674", "0.6255138", "0.6228718", "0.62069607", "0.6150368", "0.6145175", "0.6142789", "0.6135602", "0.61222076", "0.6048752", "0.60086066", "0.59968156", "0.5987389", "0.5977679", "0.59770834", "0.59571...
0.88690954
0