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
Change color of cup
Изменить цвет чашки
public function changeColorCup($request);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setColor( $c ) {\n $this->currentColor = $c;\n}", "public function colour();", "public function color()\n {\n }", "function setColor($color_coche, $nombre_coche){\r\n\t\t\t$this->color=$color_coche;\r\n\t\t\techo \"El color del \" . $nombre_coche . \" es: \" . $this->color . \"<br/>\";\r\n...
[ "0.6425768", "0.63381505", "0.6328507", "0.6003618", "0.5990045", "0.5895478", "0.5886681", "0.5872456", "0.58441323", "0.58441323", "0.5843706", "0.584328", "0.58323866", "0.582295", "0.57861906", "0.57713926", "0.57686096", "0.5767474", "0.5767474", "0.5767474", "0.5767474"...
0.7541808
0
Change type of drink
Изменить тип напитка
public function changeTypeDrink($request);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}", "public function edit(Drink $drink)\n {\n //\n }", "protected function set_type() {\n\t\t$this->type = 'kirki-color';\n\t}", "function changeVehicl...
[ "0.5798201", "0.5442793", "0.53460234", "0.5327305", "0.5291518", "0.52674454", "0.52131796", "0.5052647", "0.50459796", "0.50263524", "0.50195444", "0.5009349", "0.49898216", "0.49547544", "0.4950571", "0.49217868", "0.49168038", "0.49102888", "0.4881284", "0.4877261", "0.48...
0.73345536
0
unset policyID The policy Id specifying product compliance or takeback policy information.
unset policyID Идентификатор политики, указывающий информацию о соответствии продукта или политике возврата.
public function unsetPolicyID($index) { unset($this->policyID[$index]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Policy $policy)\n {\n //\n }", "public function clearPolicy() : void\n {\n $this->model->clearPolicy();\n }", "public function unsetShippingPolicyProfile($index)\n {\n unset($this->shippingPolicyProfile[$index]);\n }", "public function getPolicyI...
[ "0.6466437", "0.6295488", "0.61175215", "0.6056686", "0.5612114", "0.54733515", "0.5463517", "0.5437293", "0.53296876", "0.52081263", "0.5127956", "0.51278806", "0.5119628", "0.5055431", "0.50548583", "0.5019974", "0.501705", "0.5011947", "0.4996856", "0.49807343", "0.4946783...
0.7106741
0
Gets as policyID The policy Id specifying product compliance or takeback policy information.
Получает в качестве policyID идентификатор политики, указывающий информацию о соответствии продукту или политике возврата.
public function getPolicyID() { return $this->policyID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAuthorizationPolicyId()\n {\n return $this->authorization_policy_id;\n }", "protected function policy()\n {\n return $this->gate()->getPolicyFor($this);\n }", "public function getPolicyNumber()\n {\n return $this->policyNumber;\n }", "protected functi...
[ "0.7304209", "0.73028797", "0.7230053", "0.7189566", "0.6910701", "0.67470473", "0.6542276", "0.6526113", "0.6525754", "0.64177495", "0.6347415", "0.62657505", "0.6183852", "0.58671314", "0.585102", "0.5767159", "0.57329977", "0.5712423", "0.5695927", "0.56546795", "0.5560037...
0.8251605
0
Loop through the registered posts and register all posts stored in the array.
Проходите по зарегистрированным постам и зарегистрируйте все посты, хранящиеся в массиве.
public function register_custom_post() { foreach ( $this->posts as $key => $value ) { register_post_type( $key, $value ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registerPosts()\n\t{\n\t\t$this->init->registerPosts();\n\t}", "public function run()\n {\n Post::find(1)->tags()->attach([3,4]);\n Post::find(2)->tags()->attach([1,2]);\n Post::find(3)->tags()->attach(1);\n Post::find(4)->tags()->attach(2);\n Post::find(5)->...
[ "0.77514076", "0.6698449", "0.6679531", "0.6652553", "0.6488287", "0.64660287", "0.645208", "0.639364", "0.6351779", "0.62342125", "0.616626", "0.61573225", "0.6140609", "0.61298186", "0.6119287", "0.6089694", "0.60568905", "0.6016225", "0.6004499", "0.5970707", "0.59575677",...
0.71684283
1
Copy all necesary resources.
Скопируйте все необходимые ресурсы.
private function copyResources() { $sResourcesDirectory = $this->getViewRootDirectory(); $sResourcesDirectory = substr($sResourcesDirectory, 0, strrpos($sResourcesDirectory, 'View')); $sResourcesDirectory .= 'Resources' . DIRECTORY_SEPARATOR; // copy css foreach (glob($sReso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function copy_resources () {\n\t\t\n\t\t$directory = $this->target_loader->resources;\n\t\t$bundle = $this->target_loader->bundle;\n\t\t\n\t\t$this->print_message(\"Copying resources into $bundle...\");\n\n\t\t// Iterate the target resources directory\n\t\tif ($handle = opendir($directory)) {\n\t\t whil...
[ "0.7161305", "0.6526298", "0.64768595", "0.634112", "0.6269959", "0.6268563", "0.6230298", "0.61822647", "0.5957086", "0.595279", "0.5880297", "0.5871615", "0.5871125", "0.58541375", "0.58483243", "0.58192706", "0.581869", "0.5783398", "0.5701326", "0.5683006", "0.56470597", ...
0.8128884
0
Fetches the number of known hosts These are the members of the network that have been registered some time.
Получает количество известных хостов. Эти хосты являются участниками сети, которые были зарегистрированы некоторое время назад.
public function numberOfHostEntries() { return (int)$this->prepareRequest()->GetHostNumberOfEntries(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHostNumberOfEntries()\n {\n $result = $this->client->GetHostNumberOfEntries();\n if ($this->errorHandling($result, 'Could not get number of host entries from FRITZ!Box')) {\n return;\n }\n\n return $result;\n }", "public function countNameservers():...
[ "0.7440153", "0.6475177", "0.63815767", "0.63763666", "0.6125906", "0.6085433", "0.6033009", "0.60178506", "0.59908026", "0.5942835", "0.5901888", "0.5871008", "0.5834115", "0.5827867", "0.58265865", "0.57954115", "0.5791471", "0.5784399", "0.57667434", "0.5758847", "0.572528...
0.704855
1
Establece el valor del atributo stipo_teleco de TelecoUbi
Устанавливает значение атрибута stipo_teleco TelecoUbi
function setTipo_teleco($stipo_teleco = '') { $this->stipo_teleco = $stipo_teleco; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTelefonoUsuario(){\n return $this->telefonoUsuario;\n }", "public function getTelefono()\n {\n return $this->telefono;\n }", "public function getTelefono()\n {\n return $this->telefono;\n }", "function getTipo_teleco()\n {\n if (!isset($this->stipo...
[ "0.6621988", "0.6594689", "0.6594689", "0.6565153", "0.653509", "0.65338093", "0.6505749", "0.6467515", "0.6456314", "0.61894494", "0.61636394", "0.6069103", "0.60195786", "0.596182", "0.5956805", "0.5936241", "0.5904318", "0.58339113", "0.5800297", "0.5794501", "0.57567346",...
0.7116106
0
Recupera el atributo sdesc_teleco de TelecoUbi
Восстановите атрибут sdesc_teleco из TelecoUbi
function getDesc_teleco() { if (!isset($this->sdesc_teleco) && !$this->bLoaded) { $this->DBCarregar(); } return $this->sdesc_teleco; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDesc_teleco($sdesc_teleco = '')\n {\n $this->sdesc_teleco = $sdesc_teleco;\n }", "public function getDesconto()\n {\n return $this->desconto;\n }", "function setTipo_teleco($stipo_teleco = '')\n {\n $this->stipo_teleco = $stipo_teleco;\n }", "function getDes...
[ "0.7549816", "0.62068754", "0.6171434", "0.6132428", "0.5989922", "0.5861451", "0.5861451", "0.5861451", "0.5861451", "0.5861451", "0.58137953", "0.58008415", "0.5800394", "0.57938915", "0.57937515", "0.5726807", "0.57180095", "0.57180095", "0.57180095", "0.57180095", "0.5718...
0.77812356
0
Establece el valor del atributo sdesc_teleco de TelecoUbi
Устанавливает значение атрибута sdesc_teleco TelecoUbi
function setDesc_teleco($sdesc_teleco = '') { $this->sdesc_teleco = $sdesc_teleco; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDesc_teleco()\n {\n if (!isset($this->sdesc_teleco) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sdesc_teleco;\n }", "function setTipo_teleco($stipo_teleco = '')\n {\n $this->stipo_teleco = $stipo_teleco;\n }", "public function ...
[ "0.7368425", "0.60478044", "0.5956042", "0.5895696", "0.57563156", "0.5748429", "0.56392574", "0.56392574", "0.56392574", "0.56392574", "0.56392574", "0.55321044", "0.5501839", "0.54671615", "0.5454672", "0.5452051", "0.5452051", "0.54509735", "0.5448681", "0.54317963", "0.54...
0.74342716
0
Recupera el atributo snum_teleco de TelecoUbi
Восстановите атрибут snum_teleco из TelecoUbi
function getNum_teleco() { if (!isset($this->snum_teleco) && !$this->bLoaded) { $this->DBCarregar(); } return $this->snum_teleco; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setNum_teleco($snum_teleco = '')\n {\n $this->snum_teleco = $snum_teleco;\n }", "function setTipo_teleco($stipo_teleco = '')\n {\n $this->stipo_teleco = $stipo_teleco;\n }", "public function getTelefonoUsuario(){\n return $this->telefonoUsuario;\n }", "public function...
[ "0.77094746", "0.6737467", "0.666948", "0.665308", "0.665308", "0.6648039", "0.6586697", "0.657957", "0.62151664", "0.6214847", "0.6192174", "0.61620945", "0.61435276", "0.6111261", "0.6052978", "0.6047188", "0.60424244", "0.60375375", "0.5971727", "0.5928755", "0.59271985", ...
0.71847534
1
Establece el valor del atributo snum_teleco de TelecoUbi
Устанавливает значение атрибута snum_teleco TelecoUbi
function setNum_teleco($snum_teleco = '') { $this->snum_teleco = $snum_teleco; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNum_teleco()\n {\n if (!isset($this->snum_teleco) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->snum_teleco;\n }", "function setTipo_teleco($stipo_teleco = '')\n {\n $this->stipo_teleco = $stipo_teleco;\n }", "public function get...
[ "0.6730243", "0.64493364", "0.6175584", "0.6170379", "0.6166966", "0.6166966", "0.6122698", "0.6080666", "0.57962227", "0.5788408", "0.5747226", "0.57192945", "0.5702777", "0.56764007", "0.5658687", "0.56478125", "0.5641442", "0.5604757", "0.5594094", "0.55882084", "0.5546611...
0.74994737
0
UltimateSessionManager constructor. This method requires injection of UltimateSessionManagerConfig object. Since default configuration values should suffice for most use cases, the following would be typical usage to instantiate configuration into UltimateSessionManager: $session = new UltimateSessionManager(new Ultima...
Конструктор UltimateSessionManager. Этот метод требует внедрения объекта UltimateSessionManagerConfig. Поскольку значения по умолчанию настройки обычно достаточно для большинства сценариев использования, следующий пример представляет типичное использование для создания экземпляра конфигурации в UltimateSessionManager: ...
public function __construct( UltimateSessionManagerConfig $config, callable $sessionIdChangeCallback = null, callable $gcNotificationCallback = null, LoggerInterface $logger = null ) { $this->config = $config; if(!is_null($sessionIdChangeCallback)) { $this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(SessionManager $manager)\n\t{\n\t\t$this->manager = $manager;\n\t}", "public function __construct($config = array())\n\t{\n\t\t// Save the config in the object\n\t\t$this->_config = $config;\n\t\t\n\t\t// Localise the use_session config value.\n\t\t$this->_use_session = $this->_config...
[ "0.65168405", "0.62101597", "0.6193901", "0.6169732", "0.5935441", "0.5901376", "0.5831545", "0.5820577", "0.5807763", "0.5806293", "0.5774208", "0.57144195", "0.5700212", "0.5679808", "0.56768", "0.56629306", "0.56517243", "0.5619077", "0.5619077", "0.5615283", "0.5601092", ...
0.7283242
0
This method generates new session ID while also writing data expiry and session ID forwarding information to current session. This method calls forwardSession() method with generated ID to actually trigger session ID change. This method should be used by external callers to trigger session ID regeneration after critica...
Этот метод генерирует новый идентификатор сессии, одновременно записывая информацию о сроке действия данных и передаче идентификатора сессии для текущей сессии. Этот метод вызывает метод forwardSession() с сгенерированным идентификатором, чтобы фактически запустить изменение идентификатора сессии. Этот метод должен исп...
public function regenerateId() { $oldSessionId = $this->getSessionId(); if (version_compare(PHP_VERSION, '7.1.0', '>=')) { $newSessionId = session_create_id(); } else { session_regenerate_id(false); $newSessionId = $this->getSessionId(); $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function sessionRegenerateId()\n {\n // even if the session were hijacked, it will be expired very soon, so doing this way we reduce chance of users's (or admin's) account penetration\n // again, it's not 100% way to do secure accounts, but it makes hijacking harder\n // and yes, i ...
[ "0.77183294", "0.75787735", "0.73772424", "0.7317373", "0.7024005", "0.696717", "0.693528", "0.6913009", "0.67427814", "0.67427814", "0.654534", "0.65390104", "0.65036523", "0.64902544", "0.64558136", "0.63476616", "0.63462275", "0.624001", "0.62303907", "0.62241256", "0.6175...
0.80670774
0
Method which provides wrapper around PHP's session_name() function in a readonly context.
Метод, который предоставляет обертку вокруг функции PHP session_name() в режиме только для чтения.
public function getSessionName() { return session_name(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName(): string\n {\n return session_name();\n }", "public function name($name = '') {\n\t\tif (!empty($name)) {\n\t\t\treturn session_name($name);\n\t\t}\n\t\telse {\n\t\t\treturn session_name();\n\t\t}\n\t}", "public function getSession_name() {\r\n return $this->session...
[ "0.7622373", "0.7443673", "0.743354", "0.7425436", "0.73829865", "0.73734206", "0.722955", "0.7174523", "0.71470374", "0.70724386", "0.70222586", "0.6907603", "0.6852987", "0.68367445", "0.67001534", "0.65129274", "0.6474855", "0.6446465", "0.6443099", "0.6403742", "0.6393182...
0.75791985
1
Method used to instantiate a new set of metadata into the session as would typically happen on first session start or after session ID regeneration events.
Метод, используемый для создания нового набора метаданных в сессии, как обычно происходит при первом запуске сессии или после событий регенерации идентификатора сессии.
protected function initializeSessionMetadata() { $this->metadata = new UltimateSessionManagerMetadata(); $this->metadata->regenerateIdAt = $this->metadata->instantiatedAt + ($this->config->regenIdInterval * 60); $this->metadata->fingerprint = $this->generateFingerprint(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMetaData()\n\t{\n\t\tparent::createMetaData();\n\t\t$this->saveAuthorToMetadata();\n\t}", "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/Goog...
[ "0.6475052", "0.62386066", "0.62373185", "0.6223502", "0.6164971", "0.61590916", "0.6082645", "0.6029607", "0.599625", "0.5982692", "0.5919837", "0.5859097", "0.5844598", "0.56623495", "0.5650552", "0.56134313", "0.55865985", "0.55457246", "0.55351937", "0.5518087", "0.548721...
0.7178224
0
Method which continues a session that is considered valid, checking whether that session either needs to be forwarded to a new session ID based on recent session ID regeneration event, or whether the session has exceeded configured threshold for a forced session ID regeneration. If neithed of these cases is true, this ...
Метод, который продолжает сессию, которая считается действительной, проверяя, требуется ли передача этой сессии в новый идентификатор сессии в связи с недавним событием регенерации идентификатора сессии, или превышена ли конфигурируемая пороговая величина для принудительной регенерации идентификатора сессии. Если ни од...
protected function continueSession() { if($this->isForwardedSession()) { return $this->forwardSession($this->metadata->forwardToSessionId); } if($this->needsIdRegen()) { return $this->regenerateId(); } $this->metadata->sessionStartCount++; $thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canStartSession();", "function start_session() {\n session_start();\n\n if (!isset($_SESSION['initiated'])) {\n session_regenerate_id();\n $_SESSION['initiated'] = 1;\n }\n\n if (!isset($_SESSION['count'])) $_SESSION['count'] = 0;\n else ++...
[ "0.6193806", "0.6136812", "0.60601497", "0.59256244", "0.5915265", "0.58990633", "0.5887103", "0.58259386", "0.5794886", "0.57650274", "0.57350653", "0.57092714", "0.5704257", "0.56181824", "0.56048095", "0.56038755", "0.5597202", "0.55945665", "0.5583677", "0.5552009", "0.55...
0.77510095
0
Method which uses session metadata to determine if current request is coming from session ID that has been regenerated and is still within expiry TTL such that it can be forwarded to new session.
Метод, который использует метаданные сессии для определения, является ли текущий запрос приходящим от идентификатора сессии, который был перерегистрирован и по-прежнему находится в пределах времени жизни сессии, чтобы его можно было перенаправить на новую сессию.
protected function isForwardedSession() { return ( $this->metadata->isActive === false && time() < $this->metadata->expireDataAt && !empty($this->metadata->forwardToSessionId) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkSessionLifetime() {}", "private function expiredSession() {\r\n\r\n if (time()>$this->forcedExpire) return true;\r\n else return false;\r\n }", "private function isNewSession($timestamp = '', $last_req = 0) {\n\t\t\n\t\t$is_new_session = false;\n\t\t\n\t...
[ "0.742707", "0.68612987", "0.67878467", "0.6598065", "0.6512997", "0.6512997", "0.6442179", "0.633847", "0.62675405", "0.62675124", "0.61890024", "0.6163868", "0.61505646", "0.6149385", "0.6143879", "0.61275256", "0.6101386", "0.60983366", "0.6082765", "0.60546225", "0.604647...
0.7230994
1
Method to persist the metadata object to $_SESSION superglobal.
Метод для сохранения метаданных объекта в $_SESSION суперглобальную.
protected function writeMetadata() { $_SESSION[self::METADATA_KEY] = $this->metadata; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveToSession() {\n\t\t// Unset sessions since this info is elsewhere in the database\n\t\tunset($this->_questions);\n\t\ttx_wecassessment_sessiondata::storeSessionData($this, $this->getPID());\n\t}", "public function storeSessionData() {}", "public function storeSessionData() {}", "private function...
[ "0.75665176", "0.7541271", "0.75403976", "0.7501265", "0.7316069", "0.72247773", "0.72185653", "0.7181516", "0.717563", "0.7150319", "0.7014321", "0.7001036", "0.69835794", "0.6981531", "0.69812536", "0.6979675", "0.6917248", "0.6852251", "0.6836831", "0.66294694", "0.6623506...
0.81505
0
Compile formats from all available modules
Соберите форматы из всех доступных модулей
private function _compileFormats() { $this->formats = new Format\Registry($this); foreach ($this->app->modules() as $module) { if ($module instanceof Format\ProviderInterface) { $module->initResponseFormats($this->formats); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function compile()\n {\n $arrModules = $this->Config->getActiveModules();\n\n if ($this->Input->get('act') == 'generate') {\n $strModule = $this->Input->get('module');\n $strComp = $this->Input->get('comp');\n $strLanguage = $this->Input->get('langu...
[ "0.58160925", "0.57369274", "0.56567407", "0.5513411", "0.5460531", "0.542082", "0.541161", "0.53727305", "0.5326961", "0.53174764", "0.52633756", "0.52468115", "0.5229665", "0.52138996", "0.51887465", "0.51871884", "0.51867294", "0.5139775", "0.5123745", "0.509416", "0.50688...
0.75153613
0
Delete all stored information of the current model id. This method is called when there are important changes to a model, all previous training algorithms using that version of the model should be deleted. In case you want to perform extra security measures before deleting a directory you can check that $modelversionou...
Удалите всю сохраненную информацию для текущего идентификатора модели. Этот метод вызывается при важных изменениях в модели, все предыдущие алгоритмы обучения, использующие эту версию модели, должны быть удалены. Если вы хотите выполнить дополнительные меры безопасности перед удалением директории, вы можете проверить, ...
public function clear_model($uniqueid, $modelversionoutputdir);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteModels($model_id, $version = AnalyzeModel::VERSION) {\n\n $config = $this->initConfig();\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_DELETE);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n...
[ "0.59310776", "0.5785741", "0.5667944", "0.55507624", "0.5500483", "0.5474345", "0.5457061", "0.54311585", "0.5430219", "0.5422844", "0.5369925", "0.5339225", "0.5335566", "0.5331483", "0.5294295", "0.5293086", "0.52669966", "0.52506375", "0.5238578", "0.523027", "0.52290016"...
0.77987003
0
/ Complete the countApplesAndOranges function below.
Завершите функцию countApplesAndOranges ниже.
function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) { //Definindo variáveis = 0 $fruito = $fruito = 0; //Executando a contagem de elementos do array para posterior calculo for ($i = 0; $i < count($apples); $i++){ /* Se o calculo da distancia da árvore $a com a distância da fruta caída...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\r\n // Write your code here\r\n $result = [];\r\n $count = 0;\r\n foreach ($apples as $_apple) {\r\n # code...\r\n $position = $a + $_apple;\r\n if(($position >= $s) && ($position <= $t)){\r\n $c...
[ "0.75788075", "0.6138884", "0.572139", "0.572139", "0.572139", "0.56569976", "0.5653697", "0.5600331", "0.55862695", "0.55777115", "0.5555517", "0.5555517", "0.5555517", "0.5555517", "0.55460775", "0.55460775", "0.55460775", "0.550822", "0.550822", "0.550822", "0.550822", "...
0.7072899
1
Returns collection of overdue invoices.
Возвращает коллекцию просроченных счетов.
public function getOverdueInvoicesList(InvoiceListingFilter $filter): Collection;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readOverdueInvoices()\n {\n $user = auth()->user();\n\n // Mark invoice notifications as read\n foreach ($user->unreadNotifications as $notification) {\n // Not an invoice notification\n if ($notification->getAttribute('type') != 'App\\Notifications\\In...
[ "0.7528951", "0.68189645", "0.6810852", "0.67953616", "0.66844565", "0.6600255", "0.6540425", "0.6540425", "0.6540425", "0.6500572", "0.6490886", "0.6442687", "0.6428552", "0.6397756", "0.6296459", "0.62944394", "0.6287256", "0.62853813", "0.6272891", "0.6243876", "0.62298846...
0.8183826
0
/ Is bank deposit accessible by the customer? It depends on which "Available Countries" are setup by the administrator
Доступен ли банковский депозит для клиента? Это зависит от того, какие страны "Доступные страны" настроены администратором
function isaccessible() { // If bank deposit is available for all countries then return true $available_countries = $this->GetValue("availablecountries"); if( (!is_array($available_countries) && $available_countries == "all") || (is_array($available_countries) && in_array("all", $available_countries)) ) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isaccessible()\r\n\t\t{\r\n\t\t\t// If bank deposit is available for all countries then return true\r\n\t\t\t$available_countries = $this->GetValue(\"availablecountries\");\r\n\r\n\t\t\tif( (!is_array($available_countries) && $available_countries == \"all\") || (is_array($available_countries) && in_array(...
[ "0.8005132", "0.6578234", "0.63755", "0.63755", "0.6310848", "0.62467456", "0.616853", "0.6077358", "0.60158277", "0.598303", "0.5906438", "0.58874863", "0.5867773", "0.58673614", "0.5818893", "0.58064383", "0.5797538", "0.5794906", "0.5789858", "0.57872194", "0.5784489", "...
0.7996573
1
Updates options in db.
Обновляет параметры в базе данных.
public function updateOptions(array $options);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_options() {\n include $this->migrations_file;\n\n // default settings to use for updating options\n $settings_defaults = array(\n 'serialized' => false,\n 'mode' => 'update',\n 'options' => '',\n );\n\n // make the migrations\n foreach ($options_t...
[ "0.7184937", "0.714636", "0.70120245", "0.66533077", "0.6650159", "0.66050047", "0.6550045", "0.65443707", "0.65201604", "0.650437", "0.6471659", "0.6455314", "0.63596785", "0.63211864", "0.6284461", "0.62728804", "0.62230015", "0.6212831", "0.6206777", "0.6203859", "0.617096...
0.7226504
0
Get object from form
Получить объект из формы
public function getObject() { return $this->form->getObject(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get()\n {\n $object = $this->_object;\n $this->_object = $this->_form;\n return $object;\n }", "public function getForm();", "abstract function getForm();", "abstract protected function getForm();", "public static function getForm();", "public function getFormIn...
[ "0.74071443", "0.735666", "0.7209537", "0.71602225", "0.7113016", "0.708432", "0.68971884", "0.6769405", "0.6722165", "0.66456586", "0.6642278", "0.6613844", "0.6555702", "0.6555702", "0.65137845", "0.64850414", "0.64552903", "0.6423661", "0.64226115", "0.6414304", "0.6406106...
0.7863606
0
Get form errors in html list
Получить ошибки формы в виде html-списка
public function getErrorsHtml() { $errors = $this->getMessages(); return $this->getList($errors); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function errors() \n {\n $str = \"<ul class=\\\"form-error\\\">\\n\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n #busca metodos de validacion definido por usuario\n if ($obj != NULL) \n {\n if (!$obj->errors->not_errors())\n ...
[ "0.74350303", "0.73693913", "0.7325043", "0.7325043", "0.73035556", "0.71609193", "0.71531385", "0.71298516", "0.70761925", "0.70607954", "0.70068514", "0.6959117", "0.6953822", "0.6931535", "0.6931535", "0.6931535", "0.6931535", "0.6888408", "0.68884015", "0.68169916", "0.67...
0.76779896
0
/ Get the support level.
/ Получите уровень поддержки.
public function getSupportLevel() { return $this->supportLevel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCompatibilityLevel()\n {\n return $this->_props['CompatibilityLevel'];\n }", "public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }", "public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }", "public function getLevel()\n {\n ...
[ "0.69477654", "0.6892103", "0.6892103", "0.6892103", "0.6892103", "0.6892103", "0.6892103", "0.6764795", "0.6752722", "0.6752722", "0.6743244", "0.67078495", "0.6695221", "0.6688591", "0.6643395", "0.6642608", "0.6642608", "0.6642608", "0.6642608", "0.6642608", "0.6642608", ...
0.8956811
0
Change Task status in files_download_log for Download History
Изменить статус задачи в files_download_log для истории загрузки
public function actionDownloadTaskStatusChanged() { $taskId = Yii::app()->request->getQuery('task_id', 0); $status = Yii::app()->request->getQuery('task_status', ''); if (empty($taskId) || !in_array($status, Task::$statuses)) return; $task = Task::model()->findBy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function frl_perform_update(){\n\n\t$task_for_out = frl_get_tasks();\n\t$log_for_out = frl_get_log();\n\t$log_queue = frl_get_log_queue();\n\n\t$step = count($log_for_out);\n\tif($step > $log_queue){\n\t\tfrl_perform_reset();\n\t\treturn;\n\t}\n\n\t//add action into log\n\t$new_line = $log_queue[$step]; \n\tarray_...
[ "0.64837605", "0.6191378", "0.57766503", "0.5708702", "0.56522065", "0.5613153", "0.54780996", "0.54199433", "0.53937936", "0.53746533", "0.5364479", "0.5348308", "0.5300114", "0.5270754", "0.52610445", "0.518766", "0.51742154", "0.5173971", "0.51695454", "0.5138408", "0.5096...
0.77619135
0
Load the package migrations.
Загрузите пакет миграций.
private function loadMigrations(): void { $custom_migrations = config('invite-codes.custom_migrations', false); if ($custom_migrations) { $this->loadMigrationsFrom(database_path('migrations/vendor/junges/invite-codes')); } else { $this->loadMigrationsFrom(__DIR__.'/....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadMigrations()\n {\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n }", "private function registerMigrations()\n {\n $this->loadMigrationsFrom($this->migrations);\n }", "private function setupMigrations()\n {\n $this->loadMigrationsFrom(...
[ "0.7640505", "0.7237811", "0.7098907", "0.6954428", "0.69477797", "0.69179404", "0.6906544", "0.6873051", "0.6844205", "0.681232", "0.681232", "0.6740189", "0.66905814", "0.6666419", "0.664127", "0.6428624", "0.6419556", "0.6388729", "0.6357325", "0.63060296", "0.6301495", ...
0.758571
1
Test the Antares\Support\Str::title method.
Проверьте метод Antares\Support\Str::title.
public function testStringCanBeConvertedToTitleCase() { $this->assertEquals('Taylor', Str::title('taylor')); $this->assertEquals('Άχιστη', Str::title('άχιστη')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetTitle(){\n $this->assertSame(\"Ms./Mrs.\", Customer::getTitle(\"female\"));\n $this->assertSame(\"Mr.\", Customer::getTitle(\"male\"));\n $this->assertSame(\"\", Customer::getTitle(\"\"));\n $this->assertSame(\"\", Customer::getTitle(\"daererer\"));\n }", "pu...
[ "0.7823591", "0.76225835", "0.72567505", "0.72146356", "0.717531", "0.71728283", "0.71669334", "0.7154029", "0.7150221", "0.7125204", "0.71181434", "0.7104054", "0.7081858", "0.7050642", "0.70472795", "0.70138824", "0.7000636", "0.69779277", "0.69776994", "0.69749695", "0.697...
0.77121764
1
Get the adapter collection
Получить коллекцию адаптеров
public function adapters(): AdapterCollectionInterface;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAdapter();", "public function getAdapter();", "public function getAdapter()\r\n {\r\n }", "public function getCollection() ;", "public function getAdapters()\n {\n return $this->adapters;\n }", "public function getCollection();", "public function getCollect...
[ "0.7271073", "0.7271073", "0.71639305", "0.7137915", "0.71139127", "0.70729464", "0.70729464", "0.70729464", "0.70729464", "0.6993087", "0.6966782", "0.6931063", "0.6876285", "0.6875067", "0.68650013", "0.6852942", "0.685209", "0.6776425", "0.6724552", "0.6724552", "0.6716341...
0.79230237
0
Adds an adapter config
Добавляет конфигурацию адаптера
public function addAdapterConfig(string $name, string $class, array $options);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addConfig(\\Yaf\\Config_Abstract $config){ }", "public function addAdapterConfig(string $name, string $class, array $options)\n {\n $this->adapterConfig[$name] = [\n 'class' => $class,\n 'options' => $options\n ];\n }", "function addAdapter(\\Tecnocreac...
[ "0.66932595", "0.6538249", "0.6501297", "0.6025836", "0.5973392", "0.59363556", "0.59018934", "0.5842163", "0.5797241", "0.57195145", "0.57099205", "0.5598198", "0.55972517", "0.5587703", "0.5553713", "0.55485195", "0.5541407", "0.55169314", "0.5501276", "0.54985076", "0.5491...
0.74317056
0
renderChatView returns the view "chatView" : Page with the instant messaging with last messages
renderChatView возвращает представление "chatView" : Страница с мгновенной связью и последними сообщениями
public function renderChatView() { $messages = $this->loadMessages(); require 'public/views/front/chatView.phtml'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChat()\n {\n return view('chat');\n }", "function chat_view($guid = NULL) {\n\t$return = array();\n\n\telgg_require_js('chat/messaging');\n\n\t$chat = get_entity($guid);\n\n\t// no header or tabs for viewing an individual chat\n\t$return['filter'] = '';\n\n\tif (!elgg_instanceof($...
[ "0.72856385", "0.6874077", "0.6821516", "0.6817485", "0.67561424", "0.6752098", "0.6730246", "0.6714134", "0.66652447", "0.6554877", "0.6554877", "0.6530737", "0.64602673", "0.6396133", "0.636853", "0.62960815", "0.6278505", "0.6278429", "0.6251632", "0.62404317", "0.62357736...
0.7565045
0
addMessage Adds a message with user datas $post
addMessage Добавляет сообщение с данными пользователя $post
public function addMessage(array $post) { $chatModel = new ChatModel(); $lastMessage = $chatModel->InsertMessage($post); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_message($post)\n {\n date_default_timezone_set(\"ASIA/Manila\");\n $date = date('Y/m/d H:i:s');\n $query = 'INSERT INTO messages (user_id, message, created_at) \n VALUES (?, ?, ?)';\n $values = array($post['message_sender_id'], $post['mes...
[ "0.77582103", "0.69819564", "0.69612813", "0.6917944", "0.68921596", "0.6868699", "0.67794496", "0.6741636", "0.67342716", "0.6681218", "0.6677453", "0.6675408", "0.66364795", "0.66049206", "0.66005176", "0.65982646", "0.65354776", "0.65331566", "0.6527259", "0.642154", "0.64...
0.749035
1
loadLastMessage Loads the last message according to the id($lastId) of the last message received
loadLastMessage Загружает последнее сообщение в соответствии с идентификатором ($lastId) последнего полученного сообщения
public function loadLastMessage($lastId) :array { $chatModel = new ChatModel(); return $chatModel->getLastMessage($lastId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadMessageAjax(int $lastId) {\n\n $lastMessage = $this->loadLastMessage($lastId);\n\n $lastMessageJson = json_encode($lastMessage);\n\n if ($lastMessage[0]['id'] > $lastId) {\n echo $lastMessageJson;\n }\n }", "public function getLastMessageID()\n {\n ...
[ "0.73844945", "0.67579275", "0.6394318", "0.6390989", "0.61310285", "0.58509946", "0.5759819", "0.57424456", "0.5740207", "0.5727146", "0.5721572", "0.5712746", "0.5700553", "0.569222", "0.56921726", "0.5664769", "0.5603053", "0.55928296", "0.55741507", "0.5573417", "0.554510...
0.7897464
0
addMessageAjax Adds the message asynchronously thanks to the received datas $post from the ajax script, redirects in case of javascript desactivation by the user
addMessageAjax Добавляет сообщение асинхронно благодаря полученным данным $post из ajax-скрипта, перенаправляет в случае отключения javascript пользователем
public function addMessageAjax(array $post) { $author = trim($post['author']); $message = trim($post['message']); if (!empty($message) && !empty($author)) { $this->addMessage($post); header('location:index.php?action=chat'); } else { header('location:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ppmess_send_message_logged(){\n\t\n\t// var_dump(DOING_AJAX);\n\t// echo constant('DOING_AJAX');\n\t// exit;\n\t\n\tcheck_ajax_referer(\"ppmess_send_message_nonce\", \"send_message_nonce\", false);\n\t\n\t// if( defined( 'DOING_AJAX' ) && DOING_AJAX ){ \n\t\n\t\t// podaci za upis novog komentara u bazu\n\...
[ "0.65168923", "0.63678116", "0.6081656", "0.5929594", "0.5873533", "0.58039993", "0.5797198", "0.57366306", "0.5714312", "0.5696166", "0.569593", "0.5692565", "0.56846714", "0.5640797", "0.56369895", "0.5622982", "0.55672795", "0.55622846", "0.5539166", "0.5507881", "0.549672...
0.72071797
0
loadMessageAjax Loads messages asynchronously thanks to the received data $lastId from the ajax script and resends datas to the script
loadMessageAjax Загружает сообщения асинхронно благодаря полученным данным $lastId от скрипта ajax и пересылает данные скрипту
public function loadMessageAjax(int $lastId) { $lastMessage = $this->loadLastMessage($lastId); $lastMessageJson = json_encode($lastMessage); if ($lastMessage[0]['id'] > $lastId) { echo $lastMessageJson; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajaxLoad(Request $request){\n $id = $request->message_id;\n\n /**\n * Check if action is equal to\n * edit or not\n */\n if($request->action=='edit'){\n\n /**\n * Find Messeage id in database\n *\...
[ "0.6202258", "0.61938137", "0.6016901", "0.60043776", "0.59816414", "0.58706194", "0.5755744", "0.573438", "0.5649581", "0.5574412", "0.54993063", "0.5474713", "0.54617304", "0.5425349", "0.53275615", "0.5320094", "0.53168064", "0.5262071", "0.5241782", "0.52410245", "0.52262...
0.77624655
0
The radio method renders one or more input type:radio elements, based on the definition of the $elements array
Метод radio отображает один или несколько элементов типа input:radio, в зависимости от определения массива $elements
function radio( $element ) { $output = ""; $counter = 1; foreach($element['buttons'] as $radiobutton) { $checked = ""; if( $element['std'] == $counter ) { $checked = 'checked = "checked"'; } $output .= '<span class="ace_radio_wrap">'; $output .= '<input '.$checked.' type="radio" c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function renderRadio();", "public function radio($element) {\n $element['#type'] = 'radio';\n $element = $this->_setRender($element);\n $element['_render']['element'] = '<input type=\"radio\" id=\"'\n . $element['#id'] . '\" name=\"'\n . $element['...
[ "0.7154119", "0.70158374", "0.69664305", "0.68534714", "0.68157524", "0.6577682", "0.65303147", "0.6388895", "0.63561773", "0.6339012", "0.61906725", "0.6179577", "0.6162057", "0.6130939", "0.6089215", "0.60786355", "0.6028823", "0.6026834", "0.6023704", "0.60093373", "0.5975...
0.7205405
0
The section_start method renders the beginning of an optionsection wich basically includes some wrapping divs and the elment name
Метод section_start отображает начало раздела optionsection, который в основном включает в себя некоторые обертывающие div-элементы и имя элемента
function section_start( $element ) { $required = $extraclass = $target = ""; if(isset($element['required'])) { $required = '<input type="hidden" value="'.$element['required'][0].'::'.$element['required'][1].'" class="ace_required" />'; $extraclass = ' ace_hidden ace_required_container'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function start_section_list() {\n\n $html = html_writer::start_tag('div', array('id' => 'turforlag_wrapper'));\n $html .= html_writer::start_tag('div', array('id' => 'tabs', 'class' => 'turforlag'));\n return $html;\n }", "public function drawStartOptionsPanel()\r\n {\r\n ...
[ "0.67712504", "0.6734157", "0.6732212", "0.6482811", "0.63229364", "0.63229364", "0.6231685", "0.6152275", "0.5948473", "0.5911915", "0.5909714", "0.5895826", "0.58812153", "0.58289367", "0.58230096", "0.58037883", "0.57971084", "0.57800645", "0.57628214", "0.5758559", "0.574...
0.71688485
0
The page_header method renders the beginning of the option page, with header area, logo and various other informations
Метод page_header отображает начало страницы с параметрами, областью заголовка, логотипом и различной другой информацией
function page_header() { $output = '<form id="ace_options_page" action="#" method="post">'; $output .= ' <div class="ace_options_page_inner ace_sidebar_active">'; $output .= ' <div class="ace_options_page_sidebar"><div class="ace_header"></div><div class="ace_sidebar_content"></div></div>'; $output .= '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Header() {\n // si la pagina es diferente de la 2\n // if (count($this->pages) !== 2) \n // {\n // Logo\n $image_file = K_PATH_IMAGES.'logoesen.jpg';\n $this->Image($image_file, 90, 5, 25, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false...
[ "0.74427927", "0.741251", "0.71843547", "0.70986015", "0.70837647", "0.6969051", "0.6959764", "0.6955864", "0.6954333", "0.69451195", "0.69395536", "0.6926996", "0.6917787", "0.6911", "0.6895407", "0.68894684", "0.68592614", "0.685708", "0.6829251", "0.680936", "0.6808708", ...
0.7791617
0
The page_footer method renders the end of the option page by closing various divs and appending a save and a reset button
Метод page_footer отображает конец страницы с вариантами, закрывая различные div и добавляя кнопки сохранения и сброса
function page_footer() { $output = ' </div>'; // <!-- end .ace_options_container --> $output .= ' <div class="ace_footer">'; $output .= $this->hidden_data(); $output .= ' <span class="ace_loading"></span>'; $output .= ' <ul class="ace_footer_links">'; $output .= ' <li class="ace_fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function print_footer(){\n\t\techo '</div></div><div class=\"clear\"></div><div id=\"hana-footer\"><input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t\t <input type=\"submit\" value=\"Save Changes\" class=\"save-button\" />\n\t\t\t </div>\t\n\t\t\t</form></div>';\n\t}", "function wizardFooter() {\n ...
[ "0.712474", "0.70853513", "0.6992843", "0.68768686", "0.68315905", "0.674494", "0.67421985", "0.6724128", "0.6678588", "0.6666582", "0.66068584", "0.65860784", "0.65599394", "0.65473425", "0.65318143", "0.6527302", "0.6446555", "0.6446555", "0.6446358", "0.64358246", "0.64219...
0.74390525
0
Creates a button to reset the form
Создает кнопку для сброса формы
function reset_button() { $output = '<span class="ace_style_wrap"><a href="#" class="ace_button ace_button_grey ace_reset">Reset all options</a></span>'; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sexy_reset_tag($value = 'Reset', $options = array())\n{\n return sexy_button_to_function( $value, \"var form = this; \".\n \"while(null != (form = form.parentNode)) if( form.nodeName == 'FORM') \".\n \"if( (form.onreset && form.onreset()) || (!(form.onreset)) ) form.reset();\",\n $options...
[ "0.70480835", "0.6948615", "0.6738343", "0.66645676", "0.66457754", "0.64413315", "0.6396526", "0.6365101", "0.6343804", "0.6295141", "0.6274684", "0.62690866", "0.62681663", "0.6206802", "0.6206802", "0.6206802", "0.6206802", "0.6206802", "0.6206802", "0.6206802", "0.6206802...
0.70347375
1
The dynamical_add_elements method adds a dropdown list of elements and a submit button that allows you add the selcted element to the dom
Метод dynamical_add_elements добавляет выпадающий список элементов и кнопку отправки, которая позволяет добавить выбранный элемент в DOM
function dynamical_add_elements($element) { $output = ""; $output .= '<div class="ace_dynamical_add_elements_container">'; $output .= ' <span class="ace_style_wrap ace_dynamical_add_elements_style_wrap">'; $output .= '<span class="ace_select_unify"><select class="'.$element['class'].' ace_dynamical_add_elem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addElements(): void\n {\n // Add additional form fields\n $this->add([\n 'name' => 'masterFile',\n 'type' => Checkbox::class,\n 'attributes' => [\n 'id' => 'masterFile',\n 'class' => 'form-check-input',\n ],...
[ "0.63476604", "0.6238333", "0.61237055", "0.60776454", "0.5988147", "0.5978627", "0.59552", "0.5947711", "0.5917377", "0.5761648", "0.57112014", "0.56522876", "0.5600253", "0.5552632", "0.55402744", "0.5528064", "0.55190754", "0.55134976", "0.55119264", "0.5495758", "0.544893...
0.7419539
0
Create Email entry it will be sent later with Cron
Создать запись электронной почты, которая будет отправлена позже с помощью Cron
public function create() { $email_id = date('Y-m-d_H-i-s') . '.' . $this->template; $email_data = [ 'title' => $this->template, 'data' => serialize($this->data), 'email' => $this->to, 'id' => $email_id, 'date' => date('Y-m-d H:i:s') ]; Storage::putYAML('statamify/emai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n\t{\n\t\tModel::unguard();\n\t\t$data = [\n\t\t\t'slug' => 'slug',\n\t\t\t'title' => 'title', \n\t\t\t'subject' => 'subject',\n\t\t\t'body' => 'body',\n\t\t\t'descriptions' => 'descriptions',\n\t\t];\n\n\t\t $this->emailtemplatemanagement->create($data);\n\t}", "public static function crea...
[ "0.6643095", "0.65990615", "0.6583351", "0.6395844", "0.6236757", "0.6230786", "0.62073064", "0.615737", "0.6109613", "0.6106611", "0.6096928", "0.60922945", "0.60045534", "0.59103405", "0.5903416", "0.5887085", "0.5882828", "0.58731383", "0.5869312", "0.5859074", "0.5858949"...
0.72606695
0
This method autoloads the necessary scripts needed as directed the method recieves 5 different autoload constant directives in in its $flag parameter 1. D_AUTOLOAD_APP Passing this constant along with the hook causes a model and handler class of the hook to be created. The constant can only be used in the app's view cl...
Этот метод автоматически загружает необходимые скрипты, как указано в методе, который получает 5 различных директивы автоматической загрузки в параметре $flag. 1. D_AUTOLOAD_APP Передача этого константы вместе с хуком вызывает создание модели и класса обработчика хука. Эта константа может использоваться только в классе...
public static function autoloadScripts($flag, $hook = NULL) { if ($flag == D_AUTOLOAD_DEFAULT) { self::addCoreScripts(); self::addPluginScripts(); } elseif ($flag == D_AUTOLOAD_APP && $hook != NULL) { //can oly be used in the view class to load the handler and model ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function autoload_scripts() {\n\t\t\n\t}", "static function _shfw_autoloader()\n {\n\t\tinclude_once(BASEPATH.'config'.DIRECTORY_SEPARATOR.'autoload.php');\n\n\t\tif ( ! isset($autoload))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Autoload helpers.\n\t\tforeach ($autoload['helper'] as $type)\n\t\t{\...
[ "0.64342797", "0.6287588", "0.5819545", "0.5679115", "0.56632805", "0.56213355", "0.56201553", "0.5619656", "0.5607391", "0.5561772", "0.5534488", "0.55129623", "0.54930997", "0.5486106", "0.547542", "0.5425601", "0.5388676", "0.5378906", "0.53722656", "0.5349115", "0.5345573...
0.80665606
0
An initial thought was to have a whole class to manage paths in the framework; but i managed to collapse everyting into a function; which gives us more speed!! weee! the $path string must contain resource locations much like java and python does...kinda cool if you ask me the $path variable contains modularized path st...
Первоначальная мысль была в том, чтобы иметь целый класс для управления путями в фреймворке; но я смог свести всё к функции; что даёт нам большую скорость!! мыэээ! строка $path должна содержать расположения ресурсов, похоже на Java и Python... довольно круто, если спросить меня. Переменная $path содержит модулированные...
function DFPath($path, $script = '', $useDefaultSuffix = true) { $script = ($script != '') ? $script . ($useDefaultSuffix ? '.php' : '') : ''; return (DSettings::$paths['baseDirectory'] . ($path == '.' ? '' : str_replace('.', SLASH, $path) . SLASH)) . $script; //DFrameworkPath }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function paths();", "function path($path='') {\n return $this->base_dir . $path;\n }", "function urlForPath($script_path)\n{\n // Add the leading '/' if not present\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n return WWW_ROOT . $script_pat...
[ "0.6645572", "0.627997", "0.61885095", "0.61622936", "0.6085126", "0.5995024", "0.5982353", "0.5980601", "0.59787995", "0.59645814", "0.5959863", "0.5946204", "0.59452254", "0.5938957", "0.59154534", "0.591439", "0.5911724", "0.58830565", "0.5881925", "0.58505183", "0.5843308...
0.7313267
0
Returns the JS function to be used to render the html.
Возвращает JS-функцию, которая используется для отрисовки html.
public function getJsRenderer() { $html = $this->html; preg_match_all('/{\w*}/', $html, $res); if (!empty($res)) { $matches = $res[0]; $replaceStr = ""; foreach ($matches as $key => $value) { $replaceStr .= '.replace("'.$value.'", row.'.str_replace(array('{','}'), array('',''), $value).')'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function renderAsJavascript() {}", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "public function getJavaScript() {}", "public static function js();", "public function js();", "protected function renderJavascript(){\n \n return sprintf(\n ...
[ "0.76847166", "0.74788535", "0.7478147", "0.73709285", "0.7248975", "0.72204155", "0.7075917", "0.70287293", "0.69973594", "0.69917774", "0.6967242", "0.69337195", "0.69059855", "0.6776076", "0.67095226", "0.6696938", "0.66904294", "0.6606786", "0.65904593", "0.65640104", "0....
0.7831413
0
/ CheckPaypalIPs Cannot be checked with Sandbox From VM1.1
/ CheckPaypalIPs Не может быть проверен с использованием Sandbox начиная с VM1.1
function checkPaypalIps($test_ipn) { return; // Get the list of IP addresses for www.commbank.com and notify.commbank.com $commbank_iplist = array(); $commbank_iplist = gethostbynamel('www.commbank.com'); $commbank_iplist2 = array(); $commbank_iplist2 = gethostbynamel('no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Verify()\n{\n global $ip;\n if (IsVPN($ip)) die(\"Sorry, but VPNs and/or Proxies aren't allowed!\");\n}", "function validate_ipn() {\n $url_parsed=parse_url($this->paypal_url); \n\n // generate the post string from the _POST vars aswell as load the\n // _POST vars into an arr...
[ "0.67873794", "0.6651861", "0.65026087", "0.63729924", "0.63164485", "0.6310623", "0.6301688", "0.62595564", "0.6239035", "0.623328", "0.6217971", "0.6168152", "0.6151901", "0.61469644", "0.613906", "0.6118504", "0.6085984", "0.59954804", "0.5992188", "0.59618324", "0.5927144...
0.7552718
0
This function uses the QSI AVS Result Code retrieved from the Digital Receipt and returns an appropriate description for this code.
Эта функция использует код результата QSI AVS, полученный из цифрового чека, и возвращает соответствующее описание для этого кода.
function displayAVSResponse($avsResultCode) { if ($avsResultCode != "") { switch ($avsResultCode) { Case "Unsupported" : $result = "AVS not supported or there was no AVS data provided"; break; Case "X" : $result = "Exact match - address and 9 digit ZIP/postal code";...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getResponseDescription($responseCode) {\n\n switch ($responseCode) {\n case \"0\" : $result = \"Transaction Successful\"; break;\n case \"?\" : $result = \"Transaction status is unknown\"; break;\n case \"1\" : $result = \"Unknown Error\"; break;\n case \...
[ "0.659086", "0.61912256", "0.59580475", "0.5614572", "0.5432163", "0.5271158", "0.5251035", "0.52346677", "0.5217105", "0.51870686", "0.51818323", "0.51374155", "0.5135108", "0.5134806", "0.51317835", "0.51186657", "0.5053355", "0.5053165", "0.50423306", "0.5038073", "0.50339...
0.72507495
0
This function uses the QSI CSC Result Code retrieved from the Digital Receipt and returns an appropriate description for this code.
Эта функция использует код результата QSI CSC, полученный из цифрового чека, и возвращает соответствующее описание для этого кода.
function displayCSCResponse($cscResultCode) { if ($cscResultCode != "") { switch ($cscResultCode) { Case "Unsupported" : $result = "CSC not supported or there was no CSC data provided"; break; Case "M" : $result = "Exact code match"; break; Case "S" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getResponseDescription($responseCode) {\n\n switch ($responseCode) {\n case \"0\" : $result = \"Transaction Successful\"; break;\n case \"?\" : $result = \"Transaction status is unknown\"; break;\n case \"1\" : $result = \"Unknown Error\"; break;\n case \...
[ "0.67340076", "0.61279434", "0.59588057", "0.58575934", "0.56664765", "0.5652137", "0.55893564", "0.55640477", "0.5542617", "0.55115116", "0.5498672", "0.5498124", "0.5448954", "0.54470956", "0.5433719", "0.5408418", "0.5389506", "0.5384359", "0.53799653", "0.5365158", "0.535...
0.7168467
0
Returns the value of field establishment_id
Возвращает значение поля establishment_id
public function getEstablishmentId() { return $this->establishment_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getID() \n {\n return $this->getValueByFieldName( 'statevar_id' );\n }", "public function getID() {\n return array_key_exists($this->_key_field, $this->_data) ? $this->_data[$this->_key_field] : null;\n }", "public static function getActualId()\n {\n if (self::$context...
[ "0.5942271", "0.5894855", "0.58518064", "0.58481836", "0.5819168", "0.58033264", "0.57953167", "0.57947373", "0.5783995", "0.5783634", "0.57555485", "0.5754307", "0.573049", "0.5699038", "0.5699038", "0.56949174", "0.5693857", "0.5659372", "0.5659372", "0.5645362", "0.5640403...
0.74204934
0
Returns the value of field district
Возвращает значение поля district
public function getDistrict() { return $this->district; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDistrict() :string\n {\n return $this->district;\n }", "public function getDistrictid()\n {\n return $this->districtid;\n }", "public function getCdistrictid()\n {\n return $this->cdistrictid;\n }", "public function getDistrictData($input);", "funct...
[ "0.7855445", "0.7480433", "0.7276161", "0.6836895", "0.677639", "0.6705552", "0.6663125", "0.6566752", "0.6564752", "0.6456369", "0.6449695", "0.6448978", "0.64037377", "0.63914764", "0.6384641", "0.62829024", "0.6213194", "0.6213194", "0.6201094", "0.61717", "0.61005235", ...
0.7873176
1
Check if this custom has no orders
Проверьте, есть ли у этого кастома заказы
public function hasNoOrders() { return 0 === $this->getOrders()->count(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetOrders()\n {\n return !is_null($this->_fields['Orders']['FieldValue']);\n\n }", "public function hasOrder()\n {\n return $this->_has('_order');\n }", "public function hasOrders()\n {\n return $this->orders->count();\n }", "public function hasShopord...
[ "0.70418", "0.6983825", "0.69661236", "0.67936194", "0.6683705", "0.6652864", "0.65594286", "0.6512826", "0.6504791", "0.6383136", "0.63814896", "0.6329621", "0.6296852", "0.6277256", "0.6272985", "0.62097067", "0.62078583", "0.61920726", "0.6184354", "0.61739874", "0.6153383...
0.8133332
0
provides the name of the item form key corresponding to an item name checks plural or singular of the name also (from Name to NameIds for an many to many for example)
предоставляет имя элемента по ключу, соответствующему имени элемента, проверяет множественное или единственное число имени также (из Name в NameIds для многих ко многим, например)
static public function getFormItemName($itemName,$itemAssociationType) { return $itemName; // switch ($itemAssociationType) // { // case \Doctrine\ORM\Mapping\ClassMetadataInfo::ONE_TO_ONE : // $formKey = $itemName; // break; // case \Doctrin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function getItemNameFromFormItemKey(\n $formKey,$itemAssociationType)\n {\n switch ($itemAssociationType)\n {\n case \\Doctrine\\ORM\\Mapping\\ClassMetadataInfo::ONE_TO_ONE :\n $check = (Pepit_Inflector::singularize(...
[ "0.74407613", "0.68335885", "0.6647503", "0.6647121", "0.6646085", "0.6567992", "0.6430554", "0.6430554", "0.6430554", "0.64150923", "0.64150923", "0.6397874", "0.635719", "0.62734437", "0.62674505", "0.62519175", "0.6183151", "0.61640143", "0.6160029", "0.61485535", "0.61465...
0.80404043
0
gives the name of the form element class associated with an item
даёт имя класса элемента формы, связанного с элементом
static public function getFormElementClassName($itemName) { return 'Events_Form_Elements_'.ucfirst($itemName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function theme_item(&$item) {\n\t\t$class = array('form-text');\n\t\t_form_set_class($item, $class);\n\n\t\t$retval = $item[\"#value\"];\n\n\t\treturn($retval);\n\n\t}", "function wp_theme_get_element_class_name($element)\n {\n }", "protected function getFormClass(){\n return (\n (\n ...
[ "0.6950047", "0.6387125", "0.6292598", "0.6241546", "0.6158679", "0.61469764", "0.6078577", "0.60283905", "0.6026536", "0.60227203", "0.59864974", "0.5982872", "0.5957954", "0.5943296", "0.5941221", "0.59365165", "0.5820551", "0.57757336", "0.57415044", "0.5730518", "0.572809...
0.7839546
0
Find a parking with a given id and delete
Найдите парковку с заданным идентификатором и удалите
public function parkingDelete($id) { $parking = Parking::findOrFail($id); DB::beginTransaction(); try { $parking->delete(); DB::commit(); $response['message'] = 'Parking Successfully Deleted'; return $this->successResponse($response); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy($id)\n {\n \n /* $n_room = reserve::where('id',$id)\n ->join ('room','reserve.id_room','=','room.id')\n ->first();\n\n $person= $n_room ->person;*/\n\n room::where('id',$id )\n ->update(['available' => 0, 'vacancies' => $p...
[ "0.63537765", "0.62879306", "0.61644614", "0.6157932", "0.61570907", "0.6147898", "0.6141469", "0.6098216", "0.6092711", "0.60524684", "0.6050033", "0.60463107", "0.6037898", "0.5993984", "0.5993984", "0.5993984", "0.5992343", "0.59695506", "0.5953507", "0.595065", "0.5945844...
0.7455489
0
Lists all Consulta models.
Перечисляет все модели Consulta.
public function actionIndex() { $searchModel = new ConsultaSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return $this->model->getAll();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function models()\...
[ "0.661544", "0.6564859", "0.64603794", "0.64371616", "0.64371616", "0.64323163", "0.6419145", "0.6417452", "0.63830143", "0.63461614", "0.63353777", "0.6326205", "0.62707114", "0.62651235", "0.6230286", "0.6222018", "0.62171", "0.620286", "0.61853075", "0.61567235", "0.614563...
0.71707255
0
//////////////////////////////////////////////////// URLS ////////////////////////////////////////////////////// Get catalog item url.
//////////////////////////////////////////////////// URLS ////////////////////////////////////////////////////// Получить URL элемента каталога.
public function getCatalogItemUrl($params=[]) { $textpageUrl = $this->textPagesUrlProvider->getTextpageUrl(); $catalogItemUri = $this->getCatalogItemUri($params); $url = $textpageUrl.$catalogItemUri; return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCatalogItemUri($params=[]) {\n\t\t$uri = '/'.$params['item']['url'];\n\t\treturn $uri;\n\t}", "public function getItemLinkUrl()\n {\n return $this->escapeXssInUrl($this->getEntity()->getData('list_item_url'));\n }", "static function getURI() {\n return '/catalog';\n }"...
[ "0.7391808", "0.70374024", "0.6928269", "0.65932006", "0.65116936", "0.6435653", "0.6337327", "0.6313694", "0.6312786", "0.6298151", "0.6290452", "0.6279321", "0.6279321", "0.6251705", "0.62482196", "0.6244372", "0.6226693", "0.6179658", "0.6154895", "0.61518025", "0.6135609"...
0.7430606
0
//////////////////////////////////////////////////// URIS ////////////////////////////////////////////////////// Get catalog item uri.
//////////////////////////////////////////////////// URIS ////////////////////////////////////////////////////// Получить URI элемента каталога.
public function getCatalogItemUri($params=[]) { $uri = '/'.$params['item']['url']; return $uri; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getURI() {\n return '/catalog';\n }", "public function getURI()\n {\n switch ($this->queriedContext) {\n case $this->i8n('context-keyword'):\n return $this->getSearchURI();\n break;\n case $this->i8n('context-group'):\n ...
[ "0.72465146", "0.6515857", "0.6504522", "0.6446023", "0.641912", "0.6412582", "0.6398201", "0.6372537", "0.63333213", "0.63333213", "0.6313754", "0.6313754", "0.6313754", "0.6313754", "0.6282903", "0.62447757", "0.6240665", "0.6229995", "0.61826843", "0.61389565", "0.613235",...
0.78369784
0
Test functionality of the setFixStatus() method.
Проверьте функциональность метода setFixStatus().
public function testFixStatus() { // modify job spec to add custom statuses $spec = Definition::fetch('job'); $fields = $spec->getFields(); $fields['Status']['options'] = array('a', 'b', 'c', 'd', 'closed'); $fields['Status']['default'] = 'a'; $spec->setFields($fields...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetStatus()\n {\n $this->todo('stub');\n }", "public function testGetStatus()\n {\n $this->todo('stub');\n }", "public function testStatusConfirm()\n {\n\n }", "public function testAbleToSetStatus()\n {\n $this->response->setStatus(404);\n ...
[ "0.725309", "0.67588115", "0.6301023", "0.6234376", "0.6121735", "0.6106896", "0.5986176", "0.5946517", "0.5855076", "0.57323974", "0.5712991", "0.56583774", "0.5641682", "0.5556731", "0.553202", "0.5521729", "0.55215603", "0.5519577", "0.5477144", "0.5469289", "0.54203707", ...
0.70211
1
Test getFiles and setFiles.
Тест getFiles и setFiles.
public function testGetSetFiles() { // test initial state of files in a fresh change object. $change = new Change; $files = $change->getFiles(); $this->assertTrue(is_array($files), 'Expect an array from getFiles.'); $this->assertSame(0, count($files), 'There should be no file...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetFiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function set_files(&$files){\n $this->_files = $files;\n }", "public function _TestMultipleFiles()\n {\n\n }", "public function testGetFiles() : void {\n $expect...
[ "0.75911963", "0.72571427", "0.7067021", "0.70432174", "0.6854882", "0.6841813", "0.6818069", "0.6764485", "0.6758784", "0.67505115", "0.6742873", "0.6742873", "0.6742873", "0.67122245", "0.6689418", "0.6685739", "0.66546", "0.6599409", "0.6569876", "0.6566732", "0.6555799", ...
0.76595306
0
Test submitting of changes.
Тестирование отправки изменений.
public function testSubmit() { $file = new File; $file->setFilespec("//depot/foo")->setLocalContents("this is a test")->add(); // ensure no changes to start. $changes = Change::fetchAll(); $this->assertSame( 0, count($changes), "There shou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSave()\n {\n $change = Change::fetch('default');\n $change->setDescription('Test submit')\n ->save();\n }", "public function testUpdateSubmitted()\n {\n $file = new File;\n $file->setFilespec(\"//depot/foo\")\n ->setLocalContents(...
[ "0.72168136", "0.7128589", "0.69217575", "0.66010904", "0.66010404", "0.6527774", "0.6399594", "0.6359428", "0.6316342", "0.6300187", "0.62481475", "0.6232244", "0.62148774", "0.62070996", "0.620708", "0.62032706", "0.618802", "0.61841667", "0.6162073", "0.61608046", "0.61524...
0.7571113
0
Verify submit works if change is renumbered (was broken at one point).
Проверьте, работает ли submit, если изменение было переиндексировано (раньше это было сломано в какой-то момент).
public function testSubmitRenumber() { $file = new File; $file->setFilespec("//depot/foo")->setLocalContents("this is a test")->add(); // make the change. $change = new Change; $change->addFile($file)->save(); // make another change to induce renumbering $ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSubmit()\n {\n $file = new File;\n $file->setFilespec(\"//depot/foo\")->setLocalContents(\"this is a test\")->add();\n\n // ensure no changes to start.\n $changes = Change::fetchAll();\n $this->assertSame(\n 0,\n count($changes),\n ...
[ "0.6228118", "0.5959021", "0.5946718", "0.5672827", "0.5662566", "0.56477815", "0.5612276", "0.5580585", "0.55696845", "0.5569018", "0.55577433", "0.55520916", "0.5521743", "0.5505635", "0.5461758", "0.5456191", "0.54002935", "0.54001033", "0.53951025", "0.53885734", "0.53750...
0.7682091
0
test bad change numbers against P4\Validate\ChangeNumber
test bad change numbers against P4\Validate\ChangeNumber
public function testBadValidateChangeNumber() { $tests = array ( array( 'label' => __LINE__ .': null', 'value' => null, ), array( 'label' => __LINE__ .': empty', 'value' => '', ), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testNumber()\r\n {\r\n\r\n $testData = array(\r\n 'number' => '',\r\n 'number2' => '1337',\r\n 'number3' => 0x539,\r\n 'number4' => 02471,\r\n 'number5' => 0b10100111001,\r\n 'number6' => 1337e0,\r\n 'number7' =>...
[ "0.66397256", "0.64750105", "0.64125943", "0.62884074", "0.6097396", "0.5982411", "0.59708154", "0.5900318", "0.5894079", "0.5862649", "0.5821056", "0.58093274", "0.57856476", "0.57463044", "0.57423365", "0.5714156", "0.5712997", "0.5712443", "0.56922555", "0.5690046", "0.567...
0.8528437
0
Test a save but with no description
Тест сохранения без описания
public function testSaveNoDescription() { $change = Change::fetch('default'); $change->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSave()\n {\n $change = Change::fetch('default');\n $change->setDescription('Test submit')\n ->save();\n }", "public function testPreSave()\n {\n $this->todo('stub');\n }", "public function testSave()\n {\n $this->skip('abstract method...
[ "0.72029656", "0.6886766", "0.687483", "0.6575768", "0.65151125", "0.6379841", "0.63211864", "0.6238134", "0.6160028", "0.6155027", "0.6068642", "0.60569566", "0.6041831", "0.6024567", "0.6009353", "0.59916633", "0.59659714", "0.595001", "0.595001", "0.59155184", "0.591549", ...
0.8134361
0
Test reverting an entire change.
Тест отката всего изменения.
public function testRevert() { $file1 = new File; $file1->setFilespec('//depot/one'); $file1->add(); $file2 = new File; $file2->setFilespec('//depot/two'); $file2->add(); $file3 = new File; $file3->setFilespec('//depot/three'); $file3->add();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRevert(): void\n {\n $this->model->apply();\n $this->model->revert(new DataObject());\n $this->assertEquals('', getenv('sample_fixture_three'));\n }", "function testDeterminingChanges() {\n // Initial creation.\n $support_ticket = entity_create('support_ticket...
[ "0.68103254", "0.63162047", "0.62028277", "0.6133326", "0.61197835", "0.608473", "0.5990819", "0.5866657", "0.5852688", "0.5779879", "0.575975", "0.5750001", "0.5741573", "0.573074", "0.57096", "0.5690172", "0.5671287", "0.56116974", "0.5608379", "0.5581217", "0.5572151", "...
0.7259793
0
Test getFileObjects and getFileObject
Тест getFileObjects и getFileObject
public function testGetFileObjectsObject() { $file1 = new File; $file1->setFilespec('//depot/one') ->add() ->setLocalContents("contents-1"); $file2 = new File; $file2->setFilespec('//depot/two') ->add() ->setLocalContents("cont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFileRefs() {}", "public function testShouldGetFileInfo() {\n\t\t$this->assertEquals(\n\t\t\t$this->_testFilesId[0],\n\t\t\t$this->_Files->run(['ids' => $this->_testFilesId])[0]['id']\n\t\t);\n\t}", "public function testFileFunctions()\n {\n $file1 = 'pear-service-amazon-s3://' . $...
[ "0.7270493", "0.6700412", "0.66901606", "0.6686373", "0.64439005", "0.64158964", "0.64098537", "0.64042234", "0.6404168", "0.63950396", "0.6317423", "0.6300085", "0.62816", "0.6249464", "0.6224539", "0.621151", "0.61850417", "0.6064111", "0.60436714", "0.6038433", "0.6031634"...
0.80251795
0
Test getJobObjects and getJobObject
Тест getJobObjects и getJobObject
public function testGetJobObjectsObject() { $job1 = new Job; $job1->setId('job1') ->setDescription('job1') ->save(); $job2 = new Job; $job2->setId('job2') ->setDescription('job2') ->save(); $change = new Change; $ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testJobList()\n {\n\n }", "public function testJobGet()\n {\n\n }", "public function testJobListFromJobSchedule()\n {\n\n }", "public function testItCanGetJobs()\n {\n $options = [\n 'Keyword' => uniqid(),\n 'PayGradeHigh' => uniqid(),\n ...
[ "0.74610543", "0.7390398", "0.7218066", "0.71370995", "0.68543607", "0.6789843", "0.67637396", "0.66376346", "0.65162903", "0.63624376", "0.6323214", "0.6323214", "0.6299857", "0.62887114", "0.6264444", "0.6170935", "0.6037264", "0.60274273", "0.59602576", "0.5918565", "0.591...
0.7859489
0
Test running fetch all with an array of ids
Тестирование запуска fetch all с массивом идентификаторов
public function testFetchAllByIds() { $file = new File; $file->setFilespec("//depot/file") ->add() ->setLocalContents("one") ->submit("test"); $file->edit() ->setLocalContents("two") ->submit("test2"); $file->edit() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchByIds(array $ids);", "public function getByIds(array $ids);", "public function execute_and_get_ids()\n {\n }", "public function findByIds(array $ids);", "public static function loadMultiple(array $ids = NULL);", "public function testGetListOfSpecificIds()\n {\n ...
[ "0.75264543", "0.6889993", "0.68678516", "0.6785872", "0.6714188", "0.66878533", "0.66730434", "0.66330993", "0.6587045", "0.6545913", "0.65250456", "0.6510357", "0.64906234", "0.6433001", "0.6419951", "0.6413194", "0.64071715", "0.63939077", "0.6373158", "0.63400817", "0.633...
0.7228374
1
Test getting changes data
Тестирование получения данных о изменениях
public function testGetChangesData() { $change = new Change; try { $change->getChangesData(); $this->assertFalse(true, "Expected exception"); } catch (\P4\Spec\Exception\Exception $e) { $this->assertTrue(true); } $file = new File; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testServeChanges()\n {\n }", "public function testChangesIndex()\n {\n $response = $this->get('admin/changes');\n $response->assertStatus(200);\n }", "function testDeterminingChanges() {\n // Initial creation.\n $support_ticket = entity_create('support_ticket', a...
[ "0.71818775", "0.6921103", "0.6910881", "0.6885894", "0.6885894", "0.6767338", "0.6602076", "0.6550489", "0.654515", "0.64680463", "0.64452815", "0.64179665", "0.6416757", "0.6412727", "0.63810015", "0.634939", "0.62365204", "0.6207723", "0.6183627", "0.61815643", "0.61815643...
0.79678637
0
Test setting a new client on an existing change
Тестирование установки нового клиента на существующее изменение
public function testSetClient() { $change = new Change($this->p4); $change->setDescription('test')->save(); $oldClient = $change->getClient(); $this->p4->getService('clients')->grab(); $change->setClient($this->p4->getClient()); $change->save(); $this->p4->ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function client_setter_and_getter()\n {\n // Arrange\n $service = new Service;\n $client = new Client;\n\n // Act\n $returned = $service->setClient($client)->getClient();\n\n // Assert\n $this->assertEquals($client, $returned);\n }", "public function ...
[ "0.6754489", "0.65072626", "0.64133227", "0.6406379", "0.6378214", "0.6325704", "0.62586856", "0.6248039", "0.62430423", "0.6180436", "0.6130666", "0.6109439", "0.6029155", "0.5992742", "0.59766984", "0.5951622", "0.59351015", "0.59227824", "0.591577", "0.58900785", "0.584511...
0.82519305
0
Test a saving with a different user id set
Тест сохранения с другим идентификатором пользователя
public function testSaveOtherUser() { // verify we cannot swap to an invalid user $this->assertFalse(User::exists('swapped')); $change = Change::fetch('default'); try { $change->setDescription('Test submit') ->setUser('swapped') ->sa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSaveProfileWrongUser() {\n\t\tCakeSession::write('Auth.User.id', 2);\n\t\t$this->Model->saveProfile(array(\n\t\t\t'User' => array(\n\t\t\t\t'id' => 1\n\t\t\t)\n\t\t));\n\t}", "function test_NoIdempotencyKey_ActIndependently() {\n\t\t$user = $this->buildJohn();\n\t\t$user1 = $this->_api->Users...
[ "0.6859366", "0.66080046", "0.6550106", "0.65058684", "0.646746", "0.6454647", "0.6370045", "0.6336144", "0.6334157", "0.63329345", "0.6314418", "0.6313276", "0.62519836", "0.6250513", "0.6250286", "0.6217919", "0.6212369", "0.62057006", "0.6202976", "0.6176993", "0.61753243"...
0.7120561
0
Creates a new adm_perfil
Создает новый adm_perfil
public function createAction() { if (!$this->request->isPost()) { $this->dispatcher->forward([ 'controller' => "adm_perfil", 'action' => 'index' ]); return; } $adm_perfil = new AdmPerfil(); $adm_perfil->nombrePerfi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addPerfilAction() {\n $perfil= new Perfiles();\n $perfil->setIdperfilUsuario(\"Sec\");\n $perfil->setNombrePerfil(\"Secretaria\");\n $perfil->setDescripcionPerfil(\"Perfil Agregado desde UsuariosController\");\n \n $em=$this->getDoctrine()->getEntityManager...
[ "0.656936", "0.60965055", "0.59528756", "0.59393996", "0.58037615", "0.5705216", "0.5621732", "0.55767834", "0.55266154", "0.5513359", "0.54571176", "0.54292053", "0.5426113", "0.5385301", "0.5375384", "0.53732824", "0.5353463", "0.53390425", "0.53297025", "0.53026557", "0.52...
0.7678582
0
Saves a adm_perfil edited
Сохраняет измененный adm_perfil
public function saveAction() { if (!$this->request->isPost()) { $this->dispatcher->forward([ 'controller' => "adm_perfil", 'action' => 'index' ]); return; } $idPerfil = $this->request->getPost("idPerfil"); $adm_pe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function modPerfil()\n\t{\n\t\t$this->Admin_Usuarios->modificarEstado($this->input->get('id'));\n\t\tredirect(base_url('index.php/Administrador/Usuarios'));\n\t}", "function saveEditPerfil(){\n\t\t$cont = $this->dper->getContadorPerfilByNombre($this->nombre);\n\t\tif($cont == 0){\n\t\t\t$r = $this->dper->...
[ "0.7024814", "0.6795263", "0.67542475", "0.65778315", "0.6569177", "0.6522991", "0.6453315", "0.64524364", "0.63748497", "0.63708323", "0.6357192", "0.63335896", "0.6306456", "0.62607914", "0.6250803", "0.61110365", "0.6089123", "0.60723484", "0.60501415", "0.6028947", "0.601...
0.7728098
0
Get a column type definition for the specified column
Получить определение типа столбца для указанного столбца
private static function get_column_type($table, $column) { $EE =& get_instance(); $table = $EE->db->dbprefix($table); $column = $EE->db->escape($column); $query = $EE->db->query("SHOW COLUMNS FROM `$table` WHERE Field = $column"); $column_type = $query->row('Type') ? $query->row('Type') : 'TEXT'; if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getColumnDefinition($column){ }", "public function getColumnType($column)\n {\n return $this->columns[$column]['type'];\n }", "function get_column_type ($table_name, $column_name) { \n\n\t$column_row_arr = NULL;\n\t\n\t// Get the array of meta data for the table\n\tlist($errArr, $c...
[ "0.7308332", "0.710575", "0.7007688", "0.6998583", "0.6862986", "0.6824582", "0.67699397", "0.6666243", "0.66443235", "0.65534544", "0.6517812", "0.6510905", "0.6448518", "0.64455765", "0.6384038", "0.6303025", "0.6303025", "0.62435013", "0.6219403", "0.6217174", "0.61289334"...
0.7227103
1
Code to insert ratings......
Код для вставки рейтингов......
public function addRatings() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insert_blog_rating()\n\t{\n\t\t$insert_data = array(\n\t\t\t'website_id' => $this->input->post('website_id'),\n\t\t\t'blog_id' => $this->input->post('blog_id'),\n\t\t\t'parent_id' => $this->input->post('parent_id'),\n\t\t\t'name' => $this->input->post('name'),\n\t\t\t'email' => $this->input->post('email')...
[ "0.6958269", "0.6622836", "0.6604896", "0.6403902", "0.6400462", "0.6360647", "0.6272124", "0.6255912", "0.6145847", "0.61126566", "0.6110643", "0.60895", "0.6067532", "0.6064348", "0.60306764", "0.6019124", "0.6005893", "0.5973954", "0.5945669", "0.59455764", "0.59407747", ...
0.75258666
0
Generates a random peer ID.
Генерирует случайный peer ID.
private function random_peer_id() { $identifier = '-SP0054-'; $chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; return $identifier . substr(str_shuffle($chars), 0, 12); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function generateID()\n {\n return mt_rand();\n }", "function generateRandID(){\n \t\treturn md5(generateRandStr(16));\n \t\t}", "function generateId($seed = '')\n {\n return Util::uriB64Encode(pack('H*', sha1(uniqid(mt_rand(), true) . $seed . (isset($_SERVER['REMOTE...
[ "0.77738494", "0.748098", "0.74484426", "0.7372299", "0.7361829", "0.7238835", "0.71469057", "0.7132248", "0.7088039", "0.7078777", "0.7044184", "0.7030649", "0.7028149", "0.7016003", "0.70154756", "0.69948536", "0.69533414", "0.6945135", "0.6929886", "0.6918561", "0.69098306...
0.8703579
0
Directory, which contains the localization XML files.
Каталог, содержащий файлы локализации в формате XML.
function sti_get_localization_directory() { return "localization"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sti_get_localization_directory()\r\n\t{\r\n\t\treturn \"localization\";\r\n\t}", "private function getLocalesDirectory()\r\n {\r\n // Get path from config\r\n return config('transeditor.language_file_path');\r\n }", "public function wp_lang_dir()\n {\n }", "public f...
[ "0.7451531", "0.6755531", "0.65818006", "0.6509368", "0.6473459", "0.6447574", "0.639681", "0.61169535", "0.61068106", "0.6050116", "0.6027689", "0.5954697", "0.59212", "0.59003186", "0.5857949", "0.5825102", "0.57706475", "0.576481", "0.57179576", "0.57075846", "0.56953883",...
0.7456884
0
Compound Object Information Queries the local database for any information regarding the current manuscript's parent pointer. This function should only be called once for the starting manuscript. The collection column is appended in the event pointer numbers will overlap in different collections.
Запрос информации о составном объекте ищет в локальной базе данных любую информацию, связанную с указателем родительского элемента текущего текста. Эта функция должна вызываться только один раз для начального текста. Столбец «коллекция» добавляется в случае, если номера указателей могут пересекаться в разных коллекциях...
public function retrieveCompoundObjectInfo() { $prepare = $this->database->prepare(" SELECT pointer FROM manuscripts WHERE collection = :collection AND parent_object = :parent_object "); $prepare->execute(array( ":collection" => $this->collection, ":parent_ob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveParent() {\n $prepare = $this->database->prepare(\"\n SELECT parent_object\n FROM manuscripts\n WHERE collection = :collection\n AND pointer = :pointer\n LIMIT 1\n \");\n\n $prepare->execute(array(\n \":collection\" => $this->collection,\n ...
[ "0.67863333", "0.53663355", "0.52591705", "0.51675665", "0.5103409", "0.50649446", "0.50054926", "0.49464837", "0.49264744", "0.48806104", "0.48801458", "0.4867798", "0.48569193", "0.4851987", "0.48299974", "0.48157874", "0.4751118", "0.47412768", "0.47163624", "0.46853355", ...
0.7494178
0
Image Information Queries the local database for specific information regarding the current manuscript. These two columns will always be needed, therefore they are in their own function for optimization. It's better to return two columns rather than return four columns and only needing two. The collection column is app...
Запросы информации о изображении обращаются к локальной базе данных для получения конкретной информации относительно текущего текста. Эти две колонки всегда необходимы, поэтому они находятся в отдельной функции для оптимизации. Лучше вернуть две колонки, чем четыре, из которых нужны только две. Колонка с коллекцией доб...
private function retrieveImageInfo() { $prepare = $this->database->prepare(" SELECT image_height, image_width FROM manuscripts WHERE collection = :collection AND pointer = :pointer LIMIT 1 "); $prepare->execute(array( ":collection" => $this->collection, "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function getImageFromCollection($theCollection){\n \n $logger=Logger::getLogger(__CLASS__);\n $logger->trace(\"Enter\");\n \n $logger->trace(\"Get the images which to belong to collection [ \" . \n $theCollection .\" ]\");\n \n ...
[ "0.6384986", "0.5870541", "0.58513165", "0.5496255", "0.5456209", "0.5455126", "0.54546475", "0.5407513", "0.54015887", "0.53791827", "0.5340645", "0.5324469", "0.52720946", "0.5255231", "0.52495533", "0.52276707", "0.5203062", "0.5198851", "0.51746386", "0.5164025", "0.51465...
0.70174235
0
/ Function: __construct Displays the city.tpl template. That's all! Parameters: The parameters are passed by reference so that all modules and other code use the same objects. $db An instance of the database class. $tpl A Smarty object. $player A player result set from the database, or 0 if not logged in.
Функция: __construct Отображает шаблон city.tpl. Всё! Параметры: Параметры передаются по ссылке, чтобы все модули и другой код использовали одинаковые объекты. $db Экземпляр класса базы данных. $tpl Объект Smarty. $player Результат набора строк из базы данных, или 0, если пользователь не залогинен.
public function __construct(&$db, &$tpl, &$player=0) { //Require the user to be logged in requireLogin(); $tpl->display('city.tpl'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct()\n {\n $this->smarty = new Smarty();\n $this->smarty->assign('title', 'Rock News!');\n $this->smarty->assign('home', HOME);\n }", "public function __construct() \n\t{\n\t\t$this->tpl = r::$tpl;\n\t\t$this->db = r::$db;\n\t}", "function __construct ()\n\t\t{\n\t\t\tparent::Conec...
[ "0.6995463", "0.69530314", "0.6784401", "0.6559412", "0.65446496", "0.6337317", "0.63187087", "0.6293154", "0.6263352", "0.6134509", "0.61224324", "0.6072067", "0.60460544", "0.60250103", "0.59846205", "0.59796894", "0.59741646", "0.5964537", "0.5958359", "0.5957781", "0.5938...
0.9111649
0
Checks if request is formed by fusty flow
Проверяет, сформирован ли запрос с помощью потока fusty
public function isFustyFlowRequest() { return $this->isFusty; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isValid()\n {\n return !app('request') instanceof Request;\n }", "public function isRequest();", "public function hasRequest(): bool;", "public function hasRequest(): bool;", "public function canHandleRequest() {}", "public function canHandleRequest() {}", "public functi...
[ "0.72275335", "0.71285367", "0.6953733", "0.6953733", "0.69213855", "0.69213855", "0.69213855", "0.69213855", "0.6806957", "0.680254", "0.6723348", "0.6698465", "0.6694895", "0.6694895", "0.66541785", "0.66508776", "0.6583142", "0.655426", "0.6493658", "0.64212275", "0.635775...
0.7641087
0
Sets or gets the Adapter object currently in the AclComponent. `$this>Acl>adapter();` will get the current adapter class while `$this>Acl>adapter($obj);` will set the adapter class Will call the initialize method on the adapter if setting a new one.
Устанавливает или получает объект адаптера, который используется в AclComponent. `$this>Acl>adapter();` получает текущий класс адаптера, а `$this>Acl>adapter($obj);` устанавливает класс адаптера. При установке нового адаптера будет вызван метод initialize.
public function adapter($adapter = null) { if ($adapter) { if (is_string($adapter)) { $adapter = new $adapter(); } if (!$adapter instanceof AclInterface) { throw new Exception('AclComponent adapters must implement AclInterface'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _setAclAdapter() {\n\t\tlist($plugin, $name) = pluginSplit(Configure::read('Visualisation.Acl.classname'));\n\t\t$this->Acl->adapter($name);\n\t}", "public function setAdapterMethod($adapter);", "public function setAdapter(AdapterInterface $adapter);", "public function setAdapter(AdapterIn...
[ "0.7189764", "0.6791603", "0.66594094", "0.63265383", "0.63179404", "0.6206386", "0.6178574", "0.61752415", "0.6115535", "0.6115535", "0.6103469", "0.6103469", "0.6103469", "0.6103469", "0.6103469", "0.6103469", "0.6103469", "0.6103469", "0.6094266", "0.6094266", "0.608754", ...
0.7259979
0
Returns an array of permissions needed for the translator.
Возвращает массив разрешений, необходимых для переводчика.
protected function getTranslatorPermissions() { return array_filter([$this->getTranslatePermission(), 'create content translations', 'update content translations', 'delete content translations']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPermissions(): array {\n\t\treturn [];\n\t}", "public function getPermissions();", "public static function getPermissions(): array\n {\n return [];\n }", "public static function permissions(): array\n {\n return [];\n }", "public function getPermissions() {}", ...
[ "0.7615955", "0.76118946", "0.759764", "0.74869925", "0.74785274", "0.74785274", "0.74428743", "0.7412218", "0.7390856", "0.7378259", "0.73432857", "0.7324142", "0.7274722", "0.72577876", "0.72525054", "0.72116023", "0.71902555", "0.71902555", "0.71693426", "0.716904", "0.714...
0.853791
0
Returns the translate permissions for the current entity and bundle.
Возвращает разрешения на перевод для текущего сущности и пакета.
protected function getTranslatePermission() { $entity_type = \Drupal::entityTypeManager()->getDefinition($this->entityTypeId); if ($permission_granularity = $entity_type->getPermissionGranularity()) { return $permission_granularity == 'bundle' ? "translate {$this->bundle} {$this->entityTypeId}" : "transla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTranslatorPermissions() {\n return array_filter([$this->getTranslatePermission(), 'create content translations', 'update content translations', 'delete content translations']);\n }", "public function getPermissions();", "protected function getPermissions()\n {\n return Permi...
[ "0.76121914", "0.64758676", "0.6435686", "0.63859266", "0.63859266", "0.6345553", "0.63297653", "0.63232875", "0.6316478", "0.6292203", "0.62581724", "0.6222743", "0.620887", "0.61895126", "0.61770827", "0.6138728", "0.612705", "0.612705", "0.61258185", "0.609839", "0.6024573...
0.7688103
0
Returns an array of permissions needed for the editor.
Возвращает массив разрешений, необходимых для редактора.
protected function getEditorPermissions() { // Every entity-type-specific test needs to define these. return []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPermissions(): array {\n\t\treturn [];\n\t}", "public static function permissions(): array\n {\n return [];\n }", "public static function getPermissions(): array\n {\n return [];\n }", "public function getAdminPermissions(): array;", "public function get_permiss...
[ "0.7709876", "0.7692048", "0.75729823", "0.7531695", "0.74700534", "0.7404595", "0.7384335", "0.729545", "0.72815824", "0.7228582", "0.72230744", "0.7222873", "0.7212608", "0.72067624", "0.7200814", "0.7200814", "0.7197216", "0.71424633", "0.7138645", "0.712853", "0.7124798",...
0.8163685
0
Enables translation for the current entity type and bundle.
Включает перевод для текущего типа сущности и пакета.
protected function enableTranslation() { // Enable translation for the current entity type and ensure the change is // picked up. \Drupal::service('content_translation.manager')->setEnabled($this->entityTypeId, $this->bundle, TRUE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enableAutoTranslations()\r\n\t{\r\n\t\t$this->autoTranslations = true;\r\n\t}", "function hook_i18n_sync_options_alter(&$fields, $entity_type, $bundle_name) {\n\n}", "public function testUpdateTranslationWithLocaleInEntity(): void\n {\n $table = $this->getTableLocator()->get('Articles...
[ "0.64043105", "0.61681277", "0.6147893", "0.60704535", "0.57751983", "0.57358176", "0.5727276", "0.56937253", "0.5617794", "0.56093687", "0.56034833", "0.5406169", "0.5406154", "0.5402559", "0.53690517", "0.5361209", "0.53116006", "0.52748114", "0.52552074", "0.52428067", "0....
0.8736448
0
Returns the edit URL for the specified entity.
Возвращает URL для редактирования указанного сущности.
protected function getEditUrl(ContentEntityInterface $entity) { if ($entity->access('update', $this->loggedInUser)) { $url = $entity->toUrl('edit-form'); } else { $url = $entity->toUrl('drupal:content-translation-edit'); $url->setRouteParameter('language', $entity->language()->getId()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEditLink($entity)\n {\n return '?action=load&sampleId=' . $entity->getSampleId();\n }", "public function get_edit_url() {\n\t\treturn $this->edit_link();\n\t}", "public function getEditUrl() { }", "function getEditUrl() {\n return assemble_url('people_company_edit', array...
[ "0.83293647", "0.80099994", "0.7929869", "0.76637775", "0.7574038", "0.7509761", "0.75022554", "0.7452891", "0.7356481", "0.733223", "0.7322122", "0.7301186", "0.7301186", "0.7300992", "0.726096", "0.725808", "0.7233066", "0.7195969", "0.7096853", "0.70757055", "0.7040607", ...
0.8133053
1
Lists all the achievement definitions for your application. (achievementDefinitions.list)
Перечисляет все определения достижений для вашего приложения. (achievementDefinitions.list)
public function listAchievementDefinitions($optParams = array()) { $params = array(); $params = array_merge($params, $optParams); $data = $this->__call('list', array($params)); if ($this->useObjects()) { return new AchievementDefinitionsListResponse($data); } else { return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefinitions();", "private function getDefinitions()\n {\n return $this->definitions;\n }", "public function getDefinitions()\n {\n return $this->definitions;\n }", "public function getDefinitions() {\n return $this->definitions;\n }", "function getDefi...
[ "0.62547445", "0.5849995", "0.5797937", "0.5756367", "0.5717823", "0.57088524", "0.56835693", "0.56036127", "0.53385824", "0.528722", "0.5200488", "0.52002305", "0.5033048", "0.50180876", "0.49752116", "0.49718022", "0.49716172", "0.49699116", "0.49580124", "0.49356243", "0.4...
0.79310775
0
Increments the steps of the achievement with the given ID for the currently authenticated player. (achievements.increment)
Увеличивает количество выполненных шагов достижения с заданным идентификатором для текущего аутентифицированного игрока. (achievements.increment)
public function increment($achievementId, $stepsToIncrement, $optParams = array()) { $params = array('achievementId' => $achievementId, 'stepsToIncrement' => $stepsToIncrement); $params = array_merge($params, $optParams); $data = $this->__call('increment', array($params)); if ($this->useObjects(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function incrIdPlayer($increment) {\n $this->setIdPlayer($this->getIdPlayer() + $increment);\n }", "public static function increment()\n {\n self::$id++;\n }", "public function incrIdTypeMission($increment) {\n $this->setIdTypeMission($this->getIdTypeMission() + $increment)...
[ "0.6505956", "0.6165335", "0.6086178", "0.60438526", "0.58801866", "0.58604044", "0.5831595", "0.5738659", "0.5710943", "0.5623265", "0.556754", "0.55597836", "0.5418627", "0.53948957", "0.5324093", "0.5317066", "0.5316348", "0.5301659", "0.5301659", "0.5275326", "0.52739614"...
0.75553423
0
Retrieves the Player resource with the given ID. To retrieve the player for the currently authenticated user, set playerId to me. (players.get)
Получает ресурс Player с заданным идентификатором. Чтобы получить игрока для текущего аутентифицированного пользователя, установите playerId в me. (players.get)
public function get($playerId, $optParams = array()) { $params = array('playerId' => $playerId); $params = array_merge($params, $optParams); $data = $this->__call('get', array($params)); if ($this->useObjects()) { return new Player($data); } else { return $data; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPlayer($id)\n {\n $player = Players::find($id);\n return response()->json($player);\n }", "public function getPlayer($playerId)\n {\n return $this->players[$playerId];\n }", "static function getPlayerById($playerId) {\n CommonDao::connectToDb();\n $quer...
[ "0.8118413", "0.8073107", "0.754781", "0.7492088", "0.73502815", "0.71296245", "0.70697683", "0.69480556", "0.69406104", "0.6935675", "0.67300797", "0.67300797", "0.6727629", "0.6727629", "0.6567789", "0.64427173", "0.64427173", "0.64427173", "0.6406206", "0.6374243", "0.6323...
0.81263775
0
Create a room. For internal use by the Games SDK only. Calling this method directly is unsupported. (rooms.create)
Создать комнату. Для внутреннего использования только SDK игр. Прямое вызов этого метода не поддерживается. (rooms.create)
public function create(RoomCreateRequest $postBody, $optParams = array()) { $params = array('postBody' => $postBody); $params = array_merge($params, $optParams); $data = $this->__call('create', array($params)); if ($this->useObjects()) { return new Room($data); } else { ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create_room($roomName) {\n\t\treturn self::runCommand(\"create_room \" . escapeshellarg($roomName) . \" conference.\" . self::$ejabberdHost . \" \" . self::$ejabberdHost);\n\t}", "function addRoom(\\pl\\dagguh\\buildings\\Room $room);", "public function actionCreate()\n {\n $mo...
[ "0.7012831", "0.6832669", "0.674466", "0.6634351", "0.654828", "0.63978964", "0.6376949", "0.63557845", "0.6350545", "0.63467544", "0.6342607", "0.6291397", "0.6291397", "0.6291397", "0.623849", "0.6236035", "0.6236035", "0.6209213", "0.6115234", "0.60588", "0.60250175", "0...
0.764748
0
Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported. (rooms.join)
Присоединитесь к комнате. Для внутреннего использования только Games SDK. Прямое вызов этого метода не поддерживается. (rooms.join)
public function join($roomId, RoomJoinRequest $postBody, $optParams = array()) { $params = array('roomId' => $roomId, 'postBody' => $postBody); $params = array_merge($params, $optParams); $data = $this->__call('join', array($params)); if ($this->useObjects()) { return new Room($data); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function joinAction()\n {\n $roomId = $this->_getParam('id');\n $nickname = $this->_getParam('nick_name');\n if ( ! $roomId OR ! $nickname) {\n $this->badRequestAction();\n }\n \n // validate the room id\n if (strlen($roomId) > 100) {\n ...
[ "0.71629095", "0.7069917", "0.6456581", "0.62582165", "0.5719342", "0.56361306", "0.5611165", "0.55908144", "0.55681264", "0.53695697", "0.5342528", "0.5292344", "0.5269275", "0.5263988", "0.5246797", "0.5231844", "0.52116704", "0.5209109", "0.5168124", "0.5118318", "0.511804...
0.7493199
0
Leave a room. For internal use by the Games SDK only. Calling this method directly is unsupported. (rooms.leave)
Оставаться в комнате. Для внутреннего использования только SDK игр. Прямое вызов этого метода не поддерживается. (rooms.leave)
public function leave($roomId, RoomLeaveRequest $postBody, $optParams = array()) { $params = array('roomId' => $roomId, 'postBody' => $postBody); $params = array_merge($params, $optParams); $data = $this->__call('leave', array($params)); if ($this->useObjects()) { return new Room($data);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function leaveRoom(Room $room): Promise;", "public function leaveRoom()\n\t{\n\t\t//get current login user session\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\n\t\t//get Course and section ...
[ "0.7527625", "0.70578927", "0.6431627", "0.6320158", "0.58306897", "0.5629752", "0.55698365", "0.55318797", "0.5442574", "0.5297637", "0.5297637", "0.52392405", "0.5209278", "0.50944537", "0.5041622", "0.5022231", "0.5020861", "0.50042987", "0.49855393", "0.49488735", "0.4917...
0.8070703
0
Updates sent by a client reporting the status of peers in a room. For internal use by the Games SDK only. Calling this method directly is unsupported. (rooms.reportStatus)
Обновления, отправляемые клиентом, сообщающие статус участников в комнате. Для внутреннего использования только в SDK игр. Прямой вызов этого метода не поддерживается. (rooms.reportStatus)
public function reportStatus($roomId, RoomP2PStatuses $postBody, $optParams = array()) { $params = array('roomId' => $roomId, 'postBody' => $postBody); $params = array_merge($params, $optParams); $data = $this->__call('reportStatus', array($params)); if ($this->useObjects()) { return new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function messageByRooms($rooms, $message, $color, $notify);", "public function setStatus($var)\n {\n GPBUtil::checkEnum($var, \\Eolymp\\Judge\\Participant_Status::class);\n $this->status = $var;\n\n return $this;\n }", "public function getAllMeetingRooms() {\n $sql = 'S...
[ "0.50006753", "0.4829992", "0.47812128", "0.47245023", "0.466", "0.46439934", "0.46263406", "0.46121705", "0.4607975", "0.45979267", "0.45846722", "0.45491314", "0.44938707", "0.44331422", "0.44118673", "0.44100395", "0.43728966", "0.43612206", "0.4341061", "0.43308464", "0.4...
0.72522634
0
Lists the scores in a leaderboard around (and including) a player's score. (scores.listWindow)
Перечисляет оценки в рейтинговой таблице вокруг (и включая) оценку игрока. (scores.listWindow)
public function listWindow($leaderboardId, $collection, $timeSpan, $optParams = array()) { $params = array('leaderboardId' => $leaderboardId, 'collection' => $collection, 'timeSpan' => $timeSpan); $params = array_merge($params, $optParams); $data = $this->__call('listWindow', array($params)); if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function displayScores() {\n SJTTournamentTools::getInstance()->getServer()->broadcastMessage('Scores for recent game of Parkour are...');\n\n foreach ($this->scores as $playerName => $playerScores) {\n\t\t\t$score = 0;\n\t\t\tforeach ($playerScores as $location => $value) {\n\t\t\t\t$score +=...
[ "0.6650127", "0.64834094", "0.6401527", "0.6391762", "0.62129515", "0.59542114", "0.59038407", "0.5869103", "0.57248706", "0.56876606", "0.5619826", "0.56158125", "0.56147647", "0.55762434", "0.55752623", "0.5559802", "0.5558551", "0.55277836", "0.5403459", "0.5360235", "0.52...
0.70182735
0
Submits a score to the specified leaderboard. (scores.submit)
Отправляет оценку в указанный рейтинговый список. (scores.submit)
public function submit($leaderboardId, $score, $optParams = array()) { $params = array('leaderboardId' => $leaderboardId, 'score' => $score); $params = array_merge($params, $optParams); $data = $this->__call('submit', array($params)); if ($this->useObjects()) { return new PlayerScoreResp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function submitScores($auditID,$scoreArray)\n {\n foreach($scoreArray as $score) //for each score submitted\n {\n $this->insertScore($auditID,$score['questionID'],$score['score'],$score['comment']); //inserts score into database\n }\n\n $this->database->update(\"INS...
[ "0.64449775", "0.6278736", "0.6071902", "0.5987729", "0.5964612", "0.5710458", "0.5557247", "0.55561125", "0.5545471", "0.55381554", "0.54766977", "0.54504454", "0.54466075", "0.53975403", "0.5390848", "0.5366349", "0.5354464", "0.5326904", "0.5307642", "0.52975917", "0.52797...
0.73997515
0
Submits multiple scores to leaderboards. (scores.submitMultiple)
Отправляет несколько оценок в таблицы лидеров. (scores.submitMultiple)
public function submitMultiple(PlayerScoreSubmissionList $postBody, $optParams = array()) { $params = array('postBody' => $postBody); $params = array_merge($params, $optParams); $data = $this->__call('submitMultiple', array($params)); if ($this->useObjects()) { return new PlayerScoreList...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function submitScores($auditID,$scoreArray)\n {\n foreach($scoreArray as $score) //for each score submitted\n {\n $this->insertScore($auditID,$score['questionID'],$score['score'],$score['comment']); //inserts score into database\n }\n\n $this->database->update(\"INS...
[ "0.6437022", "0.61063695", "0.56897223", "0.56502247", "0.5418302", "0.5391658", "0.53654945", "0.53610414", "0.5317916", "0.527993", "0.52735066", "0.5213687", "0.5179083", "0.5158299", "0.51147276", "0.5089564", "0.5081315", "0.5016446", "0.49731892", "0.4967456", "0.496430...
0.7289379
0
Function to show VAT number form on My Account page. Hooked to woocommerce_after_my_account and only affect WC < 2.6.
Функция для отображения формы номера НДС на странице «Мой аккаунт». Привязана к woocommerce_after_my_account и влияет только на WC < 2.6.
public function show_my_account() { if ( version_compare( WC()->version, '2.6', '<' ) ) { $this->render_my_vat_number_content(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render_my_vat_number_content() {\n\t\t$vars = array(\n\t\t\t'vat_number' => get_user_meta( get_current_user_id(), 'vat_number', true ),\n\t\t\t'show_title' => version_compare( WC()->version, '2.6', '<' ),\n\t\t\t'messages' => $this->messages,\n\t\t);\n\n\t\twc_get_template(\n\t\t\t'my-account/my-...
[ "0.6912761", "0.65948826", "0.65939164", "0.6390182", "0.61069584", "0.57780397", "0.5544522", "0.5499755", "0.5396815", "0.5392407", "0.5374692", "0.5329663", "0.53242594", "0.5322391", "0.5319762", "0.52346355", "0.5223259", "0.5214614", "0.5184165", "0.5166318", "0.5165311...
0.79091096
0