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
Check if is prepared
Проверить, готов ли он
public function isPrepared();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPrepared(): bool\n {\n return $this->ipHash() === null;\n }", "public function getIsPreparedValue () {\n return 'OK';\n }", "public function prepare();", "public function prepare();", "final public function setToPrepared()\n {\n $this->prepared = true;\n ...
[ "0.7493911", "0.67408705", "0.6693291", "0.6693291", "0.66896904", "0.6590361", "0.65333104", "0.65330523", "0.63297486", "0.6268832", "0.6222001", "0.6195624", "0.6124257", "0.61142945", "0.60992545", "0.6058419", "0.60575074", "0.60508287", "0.6048239", "0.603491", "0.60021...
0.875874
0
Returns a representation of the property's FQSEN for issue messages.
Возвращает представление FQSEN свойства для сообщений об ошибках.
public function asPropertyFQSENString(): string { return $this->getClassFQSEN()->__toString() . ($this->isStatic() ? '::$' : '->') . $this->name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function asVisibilityAndFQSENString(): string\n {\n return $this->getVisibilityName() . ' ' . $this->asPropertyFQSENString();\n }", "public function getFqsen()\n {\n return $this->fqsen;\n }", "public function getRealDefiningFQSEN()\n {\n return $this->getDefiningFQSE...
[ "0.6965034", "0.62019646", "0.6195282", "0.5911065", "0.58603424", "0.5657255", "0.5573077", "0.5546268", "0.5541893", "0.552325", "0.54778284", "0.54750055", "0.5441328", "0.54335827", "0.54265004", "0.5390506", "0.5378926", "0.53672475", "0.5366469", "0.5358769", "0.5344465...
0.7229794
0
Returns true if at least one of the references to this property was writing the property Precondition: Config::get_track_references() === true
Возвращает true, если хотя бы один из ссылок на это свойство был записью свойства Предусловие: Config::get_track_references() === true
public function hasWriteReference(): bool { return $this->getPhanFlagsHasState(Flags::WAS_PROPERTY_WRITTEN); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasReferences(){\n return $this->_has(1);\n }", "public function hasReferences() {}", "public function hasReferenceIds(){\n return $this->_has(2);\n }", "public function hasNoticeRef(): bool\n {\n return isset($this->ref);\n }", "public function hasProperties():...
[ "0.72389877", "0.7035391", "0.6595775", "0.65720344", "0.6567975", "0.655882", "0.64605486", "0.64605486", "0.63814145", "0.62212193", "0.62124", "0.6188021", "0.6181543", "0.61681104", "0.5991971", "0.5986841", "0.59394485", "0.5937572", "0.59328806", "0.5889532", "0.5839600...
0.7694972
0
Does this property contain `static` anywhere in the original union type?
Содержит ли эта собственность `static` где-либо в исходном объединении типов?
public function hasStaticInUnionType(): bool { return $this->getPhanFlagsHasState(Flags::HAS_STATIC_UNION_TYPE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUnionTypeWithUnmodifiedStatic(): UnionType;", "public function visitStaticProp(Node $node): UnionType\n {\n return $this->analyzeProp($node, true);\n }", "public function isStatic() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_STATIC);\n }", "function ge...
[ "0.70509696", "0.6526903", "0.6268993", "0.60488343", "0.6024054", "0.6024054", "0.5853734", "0.58288294", "0.5782621", "0.5745012", "0.5526426", "0.5435311", "0.54340017", "0.5421508", "0.5198644", "0.5197873", "0.5164809", "0.5156017", "0.5089221", "0.50673854", "0.50465953...
0.7746035
0
Return the recorded union type of the default value (for declared properties). This is null if there is no declared type. (TODO: Consider ways to represent an "undefined" state for php 7.4 typed properties)
Верните записанный тип объединения значения по умолчанию (для объявленных свойств). Это null, если не задан объявленный тип. (TODO: Рассмотрите способы представления состояния "не определено" для php 7.4 типизированных свойств)
public function getDefaultType(): ?UnionType { return $this->default_type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultType();", "public function getDefaultValue()\n {\n // if we do not have a default value, we rely on\n // the underlying datatype to have one\n if ($this->defaultValue === null)\n return $this->oType->getDefaultVal...
[ "0.704874", "0.6946508", "0.68281907", "0.6780811", "0.6453947", "0.6421786", "0.6299223", "0.6230262", "0.62091", "0.6042023", "0.6022114", "0.6006258", "0.60049784", "0.5993151", "0.5979292", "0.5979292", "0.5972143", "0.59713066", "0.5959191", "0.59487087", "0.59487087", ...
0.7725819
0
Check if a given offset at a position is due with respect to given time.
Проверьте, является ли заданный сдвиг в заданной позиции корректным относительно заданного времени.
protected function isOffsetDue($offset, $pos, $time) { if (\strpos($offset, '/') !== false) { return $this->validator->inStep($time[$pos], $offset); } if (\strpos($offset, '-') !== false) { return $this->validator->inRange($time[$pos], $offset); } if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkDue($segment, $pos, $time)\n {\n $isDue = true;\n $offsets = \\explode(',', \\trim($segment));\n\n foreach ($offsets as $offset) {\n if (null === $isDue = $this->isOffsetDue($offset, $pos, $time)) {\n throw new \\UnexpectedValueException(\n ...
[ "0.62005496", "0.5696089", "0.5650866", "0.5640482", "0.5624941", "0.5503511", "0.5470955", "0.5465848", "0.53543454", "0.52934146", "0.52623516", "0.52519107", "0.52228856", "0.5137237", "0.51359224", "0.5132618", "0.5123706", "0.50981253", "0.5087304", "0.50753933", "0.5074...
0.77104884
0
/ simple_encode and simple_decode use openssl_encrypt and openssl_descrypt methods internally. $data data to be encoded, required param $passwd a key, use the same key while encoding and decoding, required param $method aes128cbc default $options 0 default $iv a nonNULL Initialization Vector, must be 16 chars Use these...
/ simple_encode и simple_decode используют методы openssl_encrypt и openssl_decrypt внутренне. $data данные для кодирования, обязательный параметр $passwd ключ, используйте один и тот же ключ при кодировании и декодировании, обязательный параметр $method aes128cbc по умолчанию $options 0 по умолчанию $iv инициализацион...
function simple_encode($data, $passwd, $method='aes-128-cbc', $options=0, $iv='SomeA1AweS0meK5y') { return openssl_encrypt ($data, $method, $passwd, $options, $iv); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function encrypt($data){\n # Setup the initialization vector\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n # Encrypt the data\n $encryptedMessage = openssl_e...
[ "0.71844083", "0.6991994", "0.69252867", "0.6853363", "0.683426", "0.67805094", "0.6746997", "0.67049795", "0.66982424", "0.66787994", "0.66650593", "0.6625197", "0.6623166", "0.6620618", "0.65829", "0.64980793", "0.64966786", "0.6489113", "0.64636475", "0.644645", "0.6423172...
0.8236928
0
Construtor para conectar automaticamente no banco de dados
Конструктор для автоматического подключения к базе данных
public function __construct(){ //Conexão ao banco //Também poderia passar os dados como parâmetros no método construtor (bom para mais servidores, bancos ou usuários) $this -> connect = new PDO ("mysql:host=localhost;dbname=dnphp7", "root", ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\r\n\t\t$this->connBanco = new Db();\r\n\t}", "function __construct() {\n\t\t\t$conexion = new Conexion(APPBD, APP);\n\t\t\t$this->entidad = $conexion->doctrineORM();\n\t\t}", "public function __construct(){\n $this->conectado = $this->conectar();\n }", "public function _...
[ "0.72136337", "0.7135309", "0.7131604", "0.70237285", "0.70237285", "0.6989342", "0.6955713", "0.6932839", "0.6932655", "0.68672913", "0.68507123", "0.684261", "0.68240565", "0.6823672", "0.681969", "0.680168", "0.6800316", "0.67988634", "0.67745066", "0.67739904", "0.6765243...
0.7244235
0
Creates a form to delete a partenaire entity.
Создает форму для удаления сущности partenaire.
private function createDeleteForm(Partenaire $partenaire) { return $this->createFormBuilder() ->setAction($this->generateUrl('partenaire_delete', array('id' => $partenaire->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(Partido $partido) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('partido_delete', ['id' => $partido->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private...
[ "0.7646272", "0.74664223", "0.7416933", "0.72956866", "0.7259123", "0.72436655", "0.7203998", "0.7184246", "0.71671927", "0.7157929", "0.7148026", "0.71453846", "0.7099508", "0.70762527", "0.7073294", "0.704357", "0.70282966", "0.700806", "0.69935757", "0.69818586", "0.697683...
0.7722206
0
Convert timestamp to UTC format.
Преобразовать временной штамп в формат UTC.
private function convertToUtc(string $timestamp): string { $datetime = new \DateTime($timestamp, new \DateTimeZone('Asia/Kuala_Lumpur')); $datetime->setTimeZone(new \DateTimeZone('UTC')); return $datetime->format('Y-m-d H:i:s'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTimestampUTC()\n {\n return $this->timestamp;\n }", "public static function createFromTimestampUTC($timestamp)\n {\n [$integer, $decimal] = self::getIntegerAndDecimalParts($timestamp);\n $delta = floor($decimal / static::MICROSECONDS_PER_SECOND);\n $integer...
[ "0.6639144", "0.6609206", "0.6556499", "0.63803583", "0.5997768", "0.58676916", "0.5837238", "0.5753707", "0.57067215", "0.57016164", "0.5621795", "0.5616392", "0.5566689", "0.5500536", "0.54644126", "0.54374737", "0.5413043", "0.53898025", "0.5388669", "0.5375473", "0.528623...
0.7580194
0
Return maximum right key from whole table
Вернуть максимальный правый ключ из всей таблицы
private function getMaxRightKey(){ $conn = Db::getInstance(); $st = $conn->prepare("SELECT MAX(`right_key`) FROM `" . static::db_table . "`"); $st->execute(); return intval($st->fetchColumn()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function selectMaxKey(): ?int;", "function max_key($array) {\n foreach ($array as $key => $val) {\n if ($val == max($array)) return $key; \n }\n}", "protected function getMaxId($table,$primary_key){\n $con = $this->connect();\n $sql = \"SELECT MAX($primary_key) AS max_id FROM ...
[ "0.7192003", "0.6678236", "0.6530352", "0.6353688", "0.6302609", "0.6174242", "0.61473805", "0.6136906", "0.61352575", "0.60841566", "0.6038164", "0.59963346", "0.5992776", "0.59765863", "0.5887707", "0.58754396", "0.5827488", "0.5822509", "0.582099", "0.5804563", "0.580021",...
0.8521061
0
Create options for select form with all locations
Создать опции для выбора формы со всеми местоположениями
function getLocationsOption() { $locations = getLocations(); $options = ""; foreach ($locations as $location) { $name = $location['building'] . " - " . $location['room']; $value = $location['idLocation']; $options .= "<option value='$value'>$name</option>"; } return $option...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_location_select_options() {\n\t\t\t$this->locations_select_options[] = '<option value=\"\">' . esc_html__( 'Select a location', 'yoast-local-seo' ) . '--</option>';\n\t\t\tif ( ! empty( $this->locations ) ) {\n\t\t\t\t$this->locations_select_options['all'] = '<option value=\"all\">' . esc_html_...
[ "0.7943518", "0.67996496", "0.6466628", "0.64246494", "0.64108634", "0.6323322", "0.62381876", "0.6230213", "0.616347", "0.61398244", "0.60969853", "0.6011284", "0.6001158", "0.59983337", "0.5998287", "0.59233445", "0.59201276", "0.5911493", "0.5888455", "0.58816326", "0.5862...
0.7065925
1
/ Returns true if there is a file for the given language.
Возвращает true, если существует файл для заданного языка.
static function have($lang) { if (!self::valid($lang)) { error("Invalid language id: '$lang'"); return false; } $path = self::path($lang); return file_exists($path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _checkLanguageExistence($language) {\n global $basePath;\n\n if (file_exists($basePath.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.$language.'.lang.php')) {\n return true;\n } else {\n return false;\n }\n }", "function checkLanguage($lang) {\n g...
[ "0.78061396", "0.7474576", "0.7435743", "0.7368177", "0.7183416", "0.7150277", "0.70727336", "0.6766392", "0.6543134", "0.6541546", "0.6538898", "0.6517881", "0.6448532", "0.6410452", "0.6303403", "0.6289185", "0.6286574", "0.626382", "0.6197378", "0.6193835", "0.6176364", ...
0.77842355
1
Check if current order has paypal gatway
Проверьте, есть ли в текущем заказе платежный шлюз PayPal
public function has_paypal_gateway() { $order_id = isset( $_GET['wcf-order'] ) ? absint( $_GET['wcf-order'] ) : ''; if ( empty( $order_id ) ) { return false; } $order = wc_get_order( $order_id ); $gateway = $order->get_payment_method(); if ( 'ppec_paypal' === $gateway ) { return true; } ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function is_paying();", "public function fcIsPayPalOrder() \n {\n $blReturn = false;\n if ($this->oxorder__oxpaymenttype->value == 'fcpopaypal' || $this->oxorder__oxpaymenttype->value == 'fcpopaypal_express') {\n $blReturn = true;\n }\n return $blReturn;\n }"...
[ "0.69195306", "0.67947674", "0.671642", "0.6701337", "0.6639141", "0.66290057", "0.6580544", "0.65798426", "0.6537869", "0.6491809", "0.64683867", "0.639896", "0.6373716", "0.63632035", "0.6328881", "0.63133574", "0.629213", "0.62722194", "0.6253533", "0.6189668", "0.6156822"...
0.7287107
0
Generates express checkout token
Генерирует токен быстрого оформления заказа
public function generate_express_checkout_token() { $step_id = intval( $_POST['step_id'] ); $order_id = intval( $_POST['order_id'] ); $order_key = sanitize_text_field( $_POST['order_key'] ); $session_key = $_POST['session_key']; $is_valid_order = true; if ( $is_valid_order ) { $order = wc_ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateToken();", "function create_client_token(){\n \t$clientToken = Braintree_ClientToken::generate();\n \treturn $clientToken;\n }", "function gen_token()\n\t{\n\t\t$ci = get_instance()->load->helper('myencrypt');\n\t\treturn create_token();\n\t}", "public static function generat...
[ "0.66642874", "0.6428404", "0.6371033", "0.6311767", "0.6279851", "0.62380886", "0.61745536", "0.61217064", "0.61173826", "0.61070496", "0.60545725", "0.6041361", "0.6020938", "0.60173774", "0.5993749", "0.5982208", "0.59759647", "0.59756154", "0.59751266", "0.5969458", "0.59...
0.75035393
0
Create billing agreement for future reference transaction.
Создать соглашение на оплату для будущей транзакции.
public function create_billing_agreement() { if ( ! isset( $_GET['action'] ) ) { return; } switch ( $_GET['action'] ) { // create billing agreement for reference transaction. case 'cartflows_ppec_paypal_create_billing_agreement': // bail if no token. if ( ! isset( $_GET['token'] ) ) { ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create_billing_agreement_with_creditcard($requestData){\n \n $agreement = new Agreement();\n if($this->checkEmptyObject($requestData['agreement'])){\n $this->setArrayToMethods(array_filter($requestData['agreement']), $agreement);\n }\n \n ...
[ "0.7076588", "0.6933497", "0.624758", "0.61586523", "0.60688937", "0.59558505", "0.5906293", "0.5832905", "0.5784286", "0.57025164", "0.56542164", "0.5650448", "0.56380814", "0.54993886", "0.5497138", "0.54897124", "0.5427543", "0.54181623", "0.53703153", "0.5345808", "0.5339...
0.8029562
0
Limits description to 120 characters.
Ограничить описание до 120 символов.
private function limit_description( $description ) { $description = substr( $description, 0, 120 ); return $description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDescription15Words()\n {\n $text = DBText::create('Description');\n $text->setValue($this->Description);\n\n return $text->LimitWordCount(15);\n }", "public function createShortDesc() {\n if (strlen($this->getDescription()) > 500) {\n $shortDesc = ...
[ "0.7319246", "0.731339", "0.720235", "0.7153281", "0.7148345", "0.7148345", "0.69348663", "0.69223", "0.68734777", "0.68036443", "0.6672145", "0.6529629", "0.65131414", "0.650868", "0.6496518", "0.6459125", "0.64539677", "0.64363277", "0.64071006", "0.64053667", "0.6394681", ...
0.7997755
0
Function to return GCD
Функция для возвращения НОД
function gcd( $a, $b) { if ($a==0 ) return $b; return gcd($b % $a, $a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GCD($a, $b)\n{\n while ($b != 0)\n {\n $remainder = $a % $b;\n $a = $b;\n $b = $remainder;\n }\n return abs($a);\n}", "function gcd($a,$b) {\n #\n # Convert 2/4 to 1/2 or 6/16 to 3/8, etc.\n #\n $a = abs($a); $b = abs($b);\n if( $a < $b) list($b,$a) = Arra...
[ "0.7667871", "0.70408", "0.69572675", "0.6799127", "0.6562905", "0.6540852", "0.65240556", "0.64948845", "0.6324101", "0.6281369", "0.6194592", "0.59801555", "0.58330554", "0.5782285", "0.5748907", "0.5472361", "0.5406464", "0.53827274", "0.537024", "0.5316251", "0.5284433", ...
0.7157359
1
Sets namespace used by the DAO factory method
Пространство имен, используемое методом фабрики DAO
public function setFactoryNamespace($namespace);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setNamespace($namespace);", "public function setDefaultNamespace($namespace);", "public function setNamespaceName($namespace);", "public function getNamespace();", "public function getNamespace();", "public function getNamespace();", "function setNamespace ($name);", "public function namespa...
[ "0.68567526", "0.6638154", "0.6563588", "0.6490965", "0.6490965", "0.6490965", "0.64085364", "0.63833886", "0.63322705", "0.6274279", "0.6272469", "0.62230325", "0.62230325", "0.6210057", "0.6155058", "0.61501294", "0.61294127", "0.61124367", "0.61078423", "0.6063449", "0.595...
0.7170944
0
Returns absolute namespace used by the factory method
Возвращает абсолютное пространство имен, используемое фабричным методом
public function getFactoryNamespace();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function namespace(): string;", "public function getNamespace();", "public function getNamespace();", "public function getNamespace();", "public function getNamespaceName();", "public function getNamespace(): string;", "function getNamespace ();", "public abstract function getAppli...
[ "0.8033194", "0.77360326", "0.77360326", "0.77360326", "0.77266115", "0.76314443", "0.7554516", "0.75508744", "0.75381565", "0.75381565", "0.75011605", "0.7473811", "0.7212165", "0.71667993", "0.71346545", "0.7118951", "0.7106937", "0.7099597", "0.70910376", "0.70874757", "0....
0.81845176
0
This function will check the product & supplier relationship.
Эта функция проверит связь между продуктом и поставщиком.
public function product_supplier_check($product_id, $supplier_id) { $this->db->select('*'); $this->db->from('supplier_product'); $this->db->where('product_id', $product_id); $this->db->where('supplier_id', $supplier_id); $query = $this->db->get(); if ($query->num_rows() >...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function product_supplier_check($product_id, $supplier_id) {\n $this->db->select('*');\n $this->db->from('product_information');\n $this->db->where('product_id', $product_id);\n $this->db->where('supplier_id', $supplier_id);\n $query = $this->db->get();\n if ($query...
[ "0.70426023", "0.6523528", "0.61692965", "0.61269635", "0.61157876", "0.6081431", "0.6002646", "0.6002646", "0.6002646", "0.6002646", "0.6002646", "0.59890705", "0.5925486", "0.5885648", "0.58023727", "0.5781776", "0.57683426", "0.5764446", "0.57238525", "0.569098", "0.568485...
0.70050347
1
purchase list for pdf
список покупок для pdf
public function pdf_purchase_list() { $this->db->select('a.*,b.supplier_name'); $this->db->from('product_purchase a'); $this->db->join('supplier_information b', 'b.supplier_id = a.supplier_id'); $this->db->order_by('a.purchase_date', 'desc'); $query = $this->db->get(); $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getExport($purchases) {\n $lines = array();\n\n // create each line\n foreach ($purchases as $p) {\n\n // Purchase status must be 'OK'\n if ($p->status != 'OK') {\n continue;\n }\n\n $l = array();\n\n ...
[ "0.63086885", "0.62512374", "0.61972916", "0.6123543", "0.6062392", "0.6057006", "0.6050687", "0.597716", "0.5974099", "0.59488523", "0.5940946", "0.5844506", "0.5821871", "0.57878876", "0.5772526", "0.5739199", "0.5737539", "0.5730222", "0.5726825", "0.5719107", "0.57124925"...
0.7227762
0
Get the value of membre
Получить значение membre
public function getMembre() { return $this->membre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNomMembre()\n {\n return $this->nom_membre;\n }", "function &_getMember($mid){\n\t\tif (!isset($this->memberdata[$mid])) {\n\t\t\t$this->memberdata[$mid]=mysql_fetch_assoc($res=sql_query('SELECT * FROM '.sql_table('member').' WHERE mnumber='.(int)$mid.' LIMIT 1'));\n\t\t\tmysql_fr...
[ "0.6983288", "0.6372685", "0.6350613", "0.61281896", "0.60987675", "0.60568655", "0.60568655", "0.60443074", "0.59959453", "0.5992032", "0.59796023", "0.59634006", "0.59634006", "0.59634006", "0.59634006", "0.59634006", "0.59634006", "0.59634006", "0.59634006", "0.59634006", ...
0.7650649
0
Extract a key's value from given payload or default to given value if it does not exist
Извлечь значение ключа из заданного payload или использовать заданное значение по умолчанию, если ключ отсутствует
public function extractOrDefault(string $key, array $payload, mixed $default = null): mixed { if (!isset($payload[$key])) { return $default; } return $payload[$key]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIfExists($key, $default_value=null);", "public function get(string $key, mixed $default = null): mixed;", "public function get(string $key, mixed $default = null): mixed;", "public function pull($key, $default = null);", "public function pull($key, $default = null);", "public function ...
[ "0.61481243", "0.60004944", "0.60004944", "0.59865063", "0.59865063", "0.59769005", "0.58985746", "0.58985746", "0.58985746", "0.58985746", "0.58985746", "0.58985746", "0.58985746", "0.58985746", "0.58975226", "0.5889228", "0.58777565", "0.579246", "0.5739237", "0.5722707", "...
0.75714123
0
Finds the tracking number of a Magento shipment
Находит трекинг-номер доставки Magento
public function getTrackingNumber(Mage_Sales_Model_Order_Shipment $shipment) { $trackingNumber = ''; $tracks = $shipment->getAllTracks(); if (array_key_exists(0, $tracks)) { $trackingNumber = $tracks[0]->getTrackNumber(); } return $trackingNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTrackingNumber()\n {\n return $this->tracking_number;\n }", "public function getTrackingNumber()\n {\n return $this->trackingNumber;\n }", "public function getTrackingNumber() : string\n\t{\n\t\treturn $this->trackingNumber;\n\t}", "public function getShipmentId()...
[ "0.67767704", "0.67507154", "0.6596373", "0.6464153", "0.64636457", "0.61859727", "0.61846143", "0.61694396", "0.6157202", "0.613971", "0.61126596", "0.60927117", "0.6070412", "0.6004256", "0.5915496", "0.5903241", "0.5853316", "0.58235604", "0.5702748", "0.5688848", "0.56564...
0.7269067
0
Determines if the current shipping rate request is International. "International" is determined by the store's Shipping Settings "Origin" country. This can be overridden in the iparcel Shipping Method settings.
Определяет, является ли текущий запрос на доставку международным. "Международный" определяется страной "Исходного места" в настройках доставки магазина. Это можно переопределить в настройках метода доставки iparcel.
public function getIsInternational(Mage_Shipping_Model_Rate_Request $request) { $isInternational = false; $originCountryId = $this->_getOriginCountry(); $destinationCountryId = $request->getDestCountryId(); if ($originCountryId !== $destinationCountryId) { $isInternationa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInternationalShippingInsurance()\n {\n return $this->internationalShippingInsurance;\n }", "public function isRegional()\n {\n return $this->isRegional;\n }", "public function isInternationalShipping($countryCode)\n {\n $countrycode = strtoupper($countryCo...
[ "0.70855176", "0.6715982", "0.6659882", "0.5759621", "0.57155365", "0.5666296", "0.56092346", "0.5494813", "0.54453564", "0.54330283", "0.5404899", "0.5388911", "0.5387781", "0.53742707", "0.5367239", "0.5350783", "0.5302395", "0.528932", "0.5280658", "0.52764946", "0.5259161...
0.8469566
0
Determines if an order is an iparcel order
Определяет, является ли заказ заказом iparcel
public function isIparcelOrder(Mage_Sales_Model_Order $order) { $iparcelCarrier = Mage::getModel('iparcel/carrier_iparcel'); $carrier = $order->getShippingCarrier(); if (is_null($carrier) || $carrier == false) { $method = $order->getShippingMethod(); if (preg_match(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOrder();", "public function isOrderable()\n {\n return $this->getHeader()->isOrderable();\n }", "public function isOrder($object)\n {\n return $object instanceof Mage_Sales_Model_Order;\n }", "public function isOrder($object)\n {\n return $object instance...
[ "0.6897664", "0.63085496", "0.6302265", "0.6302265", "0.60263324", "0.59037936", "0.5784104", "0.5759264", "0.5659819", "0.563875", "0.5636302", "0.55643713", "0.5558525", "0.555407", "0.54901576", "0.5490119", "0.54787517", "0.5477088", "0.5477088", "0.5472499", "0.54545903"...
0.7971438
0
Returns the admin URL to cancel a shipment
Возвращает URL-адрес администратора для отмены отгрузки
public function getShipmentCancelUrl($shipment) { return Mage::helper('adminhtml')->getUrl( 'adminhtml/iparcel_shipment/cancel', array('shipment' => $shipment) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCancelUrl()\n {\n return Mage::getUrl('payulite/processing/cancel', array('_secure' => true, 'order' => '{{ORDER_ID}}'));\n }", "public function cancelUrl(): string\n {\n return Request::url() . '?' . http_build_query([\n 'return' => 'cancel',\...
[ "0.7501075", "0.742158", "0.7283678", "0.6874306", "0.6838182", "0.68331736", "0.67441845", "0.6661319", "0.6542867", "0.6538004", "0.6522987", "0.64880353", "0.64792246", "0.63779646", "0.63499993", "0.6275595", "0.6257932", "0.62330985", "0.61389893", "0.6138643", "0.612325...
0.74896574
1
Returns the admin URL to split a shipment
Возвращает URL-адрес администратора для разделения доставки
public function getShipmentSplitUrl($shipment) { return Mage::helper('adminhtml')->getUrl( 'adminhtml/iparcel_shipment/split', array('shipment' => $shipment) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_admin_url()\n {\n }", "public function get_admin_edit_url() {\n $url = add_query_arg( array(\n 'ruleset_id' => $this->post_id,\n ), admin_url( 'admin.php?page=wc-settings&tab=shipping&section=woo_conditional_shipping' ) );\n\n return $url;\n }", "protected fu...
[ "0.6994975", "0.6476108", "0.63676393", "0.6324407", "0.6298619", "0.6190353", "0.61578643", "0.61527467", "0.61006683", "0.60851085", "0.60851085", "0.6075922", "0.6074619", "0.6044928", "0.60311645", "0.6021851", "0.6012049", "0.5939824", "0.5887387", "0.58841157", "0.58624...
0.73305345
0
Returns the total count of all items on a shipment
Возвращает общее количество всех товаров на отправке
public function getShipmentItemCount($shipment) { if (!is_object($shipment)) { $shipment = Mage::getModel('sales/order_shipment')->load($shipment); } $qty = 0; $items = $shipment->getAllItems(); foreach ($items as $item) { $qty += $item->getQty(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotalItemCount();", "public function TotalItemShipping() {\n\treturn $this->nTotShItm;\n }", "public function totalAmountOfShops()\n {\n return Shop::getTotalAmountOfShops();\n\n }", "public function getTotalItems()\n {\n $total = 0;\n \n foreach ($t...
[ "0.7276749", "0.72690743", "0.70644224", "0.70597863", "0.7040304", "0.702849", "0.6972739", "0.69639957", "0.6957828", "0.6955678", "0.69330746", "0.6924531", "0.69202405", "0.69024885", "0.69024885", "0.68998367", "0.6897508", "0.68919665", "0.6883163", "0.68820226", "0.687...
0.7413929
0
Finds the Origin country as configured in the Magento admin.
Находит страну-Origin, как задана в админ-панели Magento.
private function _getOriginCountry() { // If the admin has chose to select a different "origin" country if (Mage::getStoreConfig('carriers/iparcel/choose_domestic')) { return Mage::getStoreConfig('carriers/iparcel/origin_country_id'); } return Mage::getStoreConfig('shippi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountryOfOrigin() {\n\t\treturn $this->countryOfOrigin;\n\t}", "public function getCountry() {}", "public function getCountry() {}", "public function getCountry();", "public function getCountry();", "public function getCountry()\n {\n return parent::getValue('country');\n ...
[ "0.72136563", "0.7028576", "0.7028576", "0.6900466", "0.6900466", "0.68718284", "0.6858642", "0.6832747", "0.6722537", "0.6713794", "0.67125016", "0.6649025", "0.66443247", "0.6609441", "0.65932524", "0.65794635", "0.65672535", "0.6556329", "0.6513831", "0.6512267", "0.644894...
0.8124084
0
Return the Admin user created "Tax" Label
Верните пользователя Admin, созданный "Налог" меткой
public function getTaxLabel() { $taxLabel = Mage::getStoreConfig('iparcel/tax/tax_label'); if ($taxLabel == '') { return Mage::helper('iparcel')->__('Tax'); } else { return $taxLabel; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTaxAndDutyLabel()\n {\n $taxAndDutyLabel = Mage::getStoreConfig('iparcel/tax/tax_duty_label');\n if ($taxAndDutyLabel == '') {\n return Mage::helper('iparcel')->__('Tax & Duty');\n } else {\n return $taxAndDutyLabel;\n }\n }", "public fu...
[ "0.7093155", "0.6692694", "0.6532329", "0.64687407", "0.64068997", "0.6396227", "0.63707346", "0.6336601", "0.63062614", "0.6285537", "0.6273427", "0.6243432", "0.61351126", "0.6133355", "0.6119532", "0.6110638", "0.6100795", "0.6083368", "0.6024968", "0.6006895", "0.6003718"...
0.7272097
0
Return the Admin user created "Duty" Label
Вернуть пользователя Admin, созданного меткой "Duty"
public function getDutyLabel() { $dutyLabel = Mage::getStoreConfig('iparcel/tax/duty_label'); if ($dutyLabel == '') { return Mage::helper('iparcel')->__('Duty'); } else { return $dutyLabel; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLabel() {\n\t\treturn $this->getUsername();\n\t}", "public function getTaxAndDutyLabel()\n {\n $taxAndDutyLabel = Mage::getStoreConfig('iparcel/tax/tax_duty_label');\n if ($taxAndDutyLabel == '') {\n return Mage::helper('iparcel')->__('Tax & Duty');\n } else {\n ...
[ "0.6710196", "0.64184684", "0.6395212", "0.6341109", "0.612301", "0.6040941", "0.60353154", "0.60125", "0.59566516", "0.59566516", "0.5936642", "0.5930724", "0.5921295", "0.58127695", "0.58001846", "0.5788151", "0.5782761", "0.57618624", "0.5755067", "0.5739391", "0.5723841",...
0.7029128
0
Return the Admin user created "Tax And Duty" Label
Верните пользователя Admin, создавшего метку "Tax And Duty"
public function getTaxAndDutyLabel() { $taxAndDutyLabel = Mage::getStoreConfig('iparcel/tax/tax_duty_label'); if ($taxAndDutyLabel == '') { return Mage::helper('iparcel')->__('Tax & Duty'); } else { return $taxAndDutyLabel; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLabel() {\n\t\treturn $this->getUsername();\n\t}", "public function getDutyLabel()\n {\n $dutyLabel = Mage::getStoreConfig('iparcel/tax/duty_label');\n if ($dutyLabel == '') {\n return Mage::helper('iparcel')->__('Duty');\n } else {\n return $dutyLabel;\n...
[ "0.67989695", "0.658691", "0.6404184", "0.6201323", "0.6055803", "0.59685814", "0.5952535", "0.5950288", "0.5935314", "0.5929083", "0.59188503", "0.58840847", "0.5837713", "0.58226085", "0.5797884", "0.5797132", "0.57715034", "0.5761031", "0.57513404", "0.5747124", "0.573271"...
0.70636624
0
Returns the installed status of Iparcel_CartHandoff
Возвращает статус установки Iparcel_CartHandoff
public function isCartHandoffInstalled() { return $this->_isExtensionInstalled('Iparcel_CartHandoff'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isInstalled()\n {\n return $this->resource->getProperty('installed');\n }", "public function isInstalled(){\n return true;\n }", "function getInstalled();", "public function getInstalled()\n {\n return array_filter($this->storage, function($val)\n {\n ...
[ "0.69161487", "0.69127643", "0.6905249", "0.685256", "0.67897564", "0.6729687", "0.6657683", "0.65434635", "0.6487231", "0.644267", "0.6401838", "0.63932514", "0.6370155", "0.6312098", "0.6281919", "0.6205111", "0.6132886", "0.60991627", "0.6094652", "0.60707647", "0.6066927"...
0.72720593
0
Returns the installed status of Iparcel_GlobaleCommerce
Возвращает статус установки Iparcel_GlobaleCommerce
public function isGlobaleCommerceInstalled() { return $this->_isExtensionInstalled('Iparcel_GlobaleCommerce'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInstalled();", "public function getInstalled()\n {\n return array_filter($this->storage, function($val)\n {\n return $val['status'] == ProviderInterface::STATUS_INSTALLED or $val['status'] == ProviderInterface::STATUS_UPGRADABLE;\n });\n }", "public function in...
[ "0.7057933", "0.6923297", "0.67540735", "0.67087436", "0.66463584", "0.64786714", "0.6320184", "0.6280019", "0.6242222", "0.6229404", "0.62212133", "0.61482847", "0.60791075", "0.6077826", "0.6026984", "0.60203", "0.601695", "0.6011788", "0.5989211", "0.5988018", "0.5959405",...
0.71081704
0
Returns the installed status of Iparcel_Logistics
Возвращает статус установки Iparcel_Logistics
public function isLogisticsInstalled() { return $this->_isExtensionInstalled('Iparcel_Logistics'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function status()\n {\n return plexcel_status(self::getConnection());\n }", "public function getDetailedSystemStatus() {}", "function getInstalled();", "public function get_logistics() {\n return $this->get_items_by_type(static::$LOGISTICS);\n }", "public function isInstalled(...
[ "0.6213039", "0.6208395", "0.59822387", "0.5965661", "0.58951604", "0.5848638", "0.5845098", "0.58300924", "0.58219755", "0.58102816", "0.576934", "0.5759417", "0.57535934", "0.57237065", "0.5711742", "0.5701709", "0.5697202", "0.5658686", "0.5596792", "0.55741143", "0.556443...
0.7459613
0
Finds if an extension is installed
Проверяет, установлен ли расширение
private function _isExtensionInstalled($name) { if ($name == '') { return false; } $allExtensions = Mage::app()->getConfig()->getNode('modules')->asArray(); return array_key_exists($name, $allExtensions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkIfNoConflictingExtensionIsInstalled() {}", "protected function checkIfDbalExtensionIsInstalled() {}", "function isInstalled() {\r\n return extension_loaded('memcache');\r\n }", "public function isExtensionLoaded($ext='gd') { \n return extension_loaded($ext); ...
[ "0.7587764", "0.72216773", "0.7185757", "0.7158098", "0.7134087", "0.707685", "0.6895651", "0.68811584", "0.6862578", "0.68402886", "0.68093735", "0.67569995", "0.6715833", "0.6690229", "0.6673774", "0.662639", "0.66206264", "0.6600994", "0.6585482", "0.6498943", "0.6491134",...
0.7537701
1
Gathers extension versions for any installed iparcel extensions
Собирает версии расширений для любых установленных расширений iparcel
public function gatherExtensionVersions() { $extensions = array( 'Iparcel_All' => 0, 'Iparcel_CartHandoff' => 0, 'Iparcel_GlobaleCommerce' => 0, 'Iparcel_Logistics' => 0 ); $allExtensions = Mage::app()->getConfig()->getNode('modules')->asArray...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getExtensionVersion();", "public function getAvailableAndInstalledExtensionsWithAdditionalInformation() {}", "private function getExtensions(): void\n {\n\n $localExtensionFiles = glob(base_path('extensions/*/*/composer.json'));\n $localExtensions = collect();\n\n ...
[ "0.6917635", "0.67743236", "0.66725916", "0.66171265", "0.6526099", "0.6526099", "0.6456537", "0.6417506", "0.64062905", "0.64057916", "0.6315427", "0.6238427", "0.6230788", "0.61386305", "0.6126143", "0.61164886", "0.61042005", "0.6103902", "0.60939354", "0.6070668", "0.6058...
0.77924746
0
Parse update from string.
Парсинг обновления из строки.
public function fromString($update) { if (is_string($update)) { $this->fromObject(json_decode($update)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parse($string);", "abstract public function parse($string);", "public function parse(string $input);", "public static function parse_str($str)\n {\n }", "public function parse(string $value);", "protected function parse($str)\n {\n }", "public static function...
[ "0.6487783", "0.6239854", "0.6133638", "0.58825403", "0.5757898", "0.5723131", "0.55939466", "0.54513294", "0.54513294", "0.54513294", "0.54513294", "0.5403173", "0.53247875", "0.53229463", "0.53068906", "0.53068906", "0.53068906", "0.52845216", "0.52845216", "0.5239155", "0....
0.70294076
0
Get command value from the update.
Получить значение команды из обновления.
public function commandValue() { return $this->parseCommand()[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCommand() {\n return $this->getValue(self::FIELD_COMMAND);\n }", "public function get()\n\t\t{\n\t\t\treturn $this->command;\n\t\t}", "function getUpdateCommand()\r\n\t{\r\n\t\t\t//\t\t\t\t->update( )\r\n\t}", "public function command()\n {\n return $this->parseCommand(...
[ "0.673425", "0.66704905", "0.6575172", "0.6397873", "0.63512456", "0.6321733", "0.62784994", "0.6213476", "0.6112043", "0.608086", "0.60791993", "0.6072917", "0.607281", "0.60478854", "0.60015875", "0.60015875", "0.60015875", "0.60015875", "0.5991138", "0.5984746", "0.5965083...
0.78542256
0
CREATE TABLES This function creates two tables: the postMasterPrefs table (which handles the admin preferences) the subscribers table (which holds all of your subscriber information)
СОЗДАНИЕ ТАБЛИЦ Эта функция создает две таблицы: таблицу postMasterPrefs (которая обрабатывает административные настройки) и таблицу subscribers (которая содержит всю информацию о ваших подписчиках)
function bab_pm_createTables() { global $txpcfg, $bab_pm_PrefsTable , $bab_pm_SubscribersTable, $bab_pm_mapTable, $DB; //function to create database $version = mysqli_get_server_info($DB->link); $dbcharset = "'".$txpcfg['dbcharset']."'"; //Use "ENGINE" if version of MySQL > (4.0.18 or 4.1.2) $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function create_tables(){\n\t\t$tables = self::get_tables_name();\n\t\textract($tables);\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $cookie(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint...
[ "0.7269399", "0.7139743", "0.68480015", "0.68367493", "0.6783663", "0.67834556", "0.6743085", "0.6736056", "0.6668806", "0.66624224", "0.66489214", "0.6619815", "0.65830404", "0.65797716", "0.6548301", "0.65222853", "0.6497827", "0.64766324", "0.6376811", "0.6343163", "0.6307...
0.7454394
0
copy of PrevNextLink function to allow for different $step value
копия функции PrevNextLink для возможности использования разных значений $step
function bab_pm_PrevNextLink($event, $topage, $label, $type, $sort = '', $dir = '', $crit = '', $method = '') { return join('', array( '<a href="?event='.$event.a.'step=subscribers'.a.'page='.$topage, ($sort) ? a.'sort='.$sort : '', ($dir) ? a.'dir='.$dir : '', ($crit) ? a.'crit='.$c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function genPrevLink()\n\t{\n\t\t$this->pagination['prevLink'] = \"\";\t\n\t\tif($this->page > 1)\n\t\t{\n\t\t\t$page = $this->page-1;\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_prev',$this->prepend.$page.$this...
[ "0.7395083", "0.6967014", "0.68943393", "0.6835763", "0.68315804", "0.67372763", "0.66603976", "0.66264683", "0.6606905", "0.6589303", "0.65771455", "0.6563726", "0.64764166", "0.64622116", "0.6459259", "0.64578366", "0.6448467", "0.6448467", "0.64270335", "0.6426772", "0.642...
0.72180307
1
Returns a list of JointSource instances created according to the result from a database query from `jointsources`.
Возвращает список экземпляров JointSource, созданных в соответствии с результатом запроса к базе данных из `jointsources`.
function createJointSourcesFromQueryResult($result) { if ($result->num_rows == 0) return []; $data = []; // Iterate through joint sources while ($row = $result->fetch_assoc()) { $jointSourceId = $row["jointsource_id"]; if (empty($data[$jointSourceId])) { $jointSource = new JointSou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getJointSources($limit = 200) {\n\n $stateEncoded = STATE_PUBLISHED_ENCODED;\n $result = query(\"SELECT *\n FROM jointsources_summary\n WHERE state = {$stateEncoded}\n LIMIT {$limit};\");\n\n return createJointSourcesFromQueryResult($result);\n\n }", "private function getAllSour...
[ "0.65399843", "0.643249", "0.59938663", "0.5910327", "0.56662995", "0.56443906", "0.55585027", "0.5554048", "0.55518234", "0.5483692", "0.54620546", "0.5461207", "0.5453604", "0.5347628", "0.5347412", "0.53471655", "0.5340761", "0.53210706", "0.52661484", "0.52655643", "0.526...
0.7189775
0
Inserts a new state for the specified joint source.
Добавляет новый состояние для указанного источника соединения.
function insertJointSourceState($jointSourceId, $state = STATE_PUBLISHED) { global $DATABASE; $accountId = \Session\getAccountId(); $stateEncoded = encodeState($state); $result = query("INSERT INTO jointsources_states (`jointsource_id`, `author_id`, `state`) VALUES ($jointSourceId, $accou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertJointSource($jointSource, $state = STATE_PUBLISHED) {\n\n global $DATABASE;\n $accountId = \\Session\\getAccountId();\n\n retainDatabaseTransaction();\n\n // Request content versioning unit id\n $titleId = \\ICA\\Contents\\requestContentId();\n $introId = \\ICA\\Contents\\requestCo...
[ "0.6889002", "0.57253534", "0.55533314", "0.5490144", "0.5283923", "0.51646626", "0.51589054", "0.51356024", "0.5088354", "0.50733376", "0.48947212", "0.48449948", "0.48078018", "0.47996005", "0.47632426", "0.47005314", "0.46943054", "0.46914694", "0.4654761", "0.46313268", "...
0.7584893
0
Partially puts the meta for the specified joint source.
Частично помещает метаданные для указанного источника соединения.
function partialPutJointSourceMeta($jointSourceId, $meta) { $result = query("SELECT * FROM jointsources WHERE id = {$jointSourceId};"); if ($result->num_rows == 0) { return false; // Joint source not found } $row = $result->fetch_assoc(); retainDatabaseTransaction(); if (!e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function putJointSourceMeta($jointSourceId, $meta) {\n\n $result = query(\"SELECT *\n FROM jointsources\n WHERE id = {$jointSourceId};\");\n if ($result->num_rows == 0) {\n return false; // Joint source not found\n }\n\n $row = $result->fetch_assoc();\n\n retainDatabaseTransaction();\...
[ "0.7472382", "0.616895", "0.6107877", "0.6003137", "0.59642434", "0.5819827", "0.57802963", "0.57704496", "0.57623255", "0.57199764", "0.5405134", "0.52919483", "0.5244872", "0.51227146", "0.5105124", "0.50819933", "0.4978603", "0.49345562", "0.49292213", "0.49133712", "0.485...
0.7422752
1
Puts the meta for the specified joint source.
Устанавливает метаданные для указанного источника соединения.
function putJointSourceMeta($jointSourceId, $meta) { $result = query("SELECT * FROM jointsources WHERE id = {$jointSourceId};"); if ($result->num_rows == 0) { return false; // Joint source not found } $row = $result->fetch_assoc(); retainDatabaseTransaction(); if (!empty($m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function partialPutJointSourceMeta($jointSourceId, $meta) {\n\n $result = query(\"SELECT *\n FROM jointsources\n WHERE id = {$jointSourceId};\");\n if ($result->num_rows == 0) {\n return false; // Joint source not found\n }\n\n $row = $result->fetch_assoc();\n\n retainDatabaseTransact...
[ "0.7105017", "0.6404", "0.6308726", "0.6207633", "0.598396", "0.59589964", "0.59263706", "0.5893172", "0.5753107", "0.5604301", "0.5571005", "0.5470917", "0.5319065", "0.5278776", "0.5254101", "0.5164954", "0.51277035", "0.51211655", "0.5114724", "0.5069484", "0.5022205", "...
0.7859055
0
Joint source meta title Returns the latest revision of the title.
Совместный источник мета заголовка Возвращает последнюю ревизию заголовка.
function getJointSourceMetaTitleOfLatestRevision($titleId) { return \ICA\Contents\getContentLanguagesOfLatestRevision($titleId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMetaTitle();", "public function getMetaTitle() {\n\t\t$title = $this->data()->getTitle();\n\t\t$filter = $this->FilterDescription();\n\t\tif($filter) {\n\t\t\t$title = \"{$title} - {$filter}\";\n\t\t}\n\n\t\t$this->extend('updateMetaTitle', $title);\n\t\treturn $title;\n\t}", "protected func...
[ "0.66853875", "0.6648527", "0.6517744", "0.6490493", "0.64491177", "0.6437862", "0.64343506", "0.63719374", "0.6350378", "0.6341596", "0.6338628", "0.6332107", "0.6296743", "0.627535", "0.62721604", "0.62716866", "0.62610424", "0.623659", "0.6235412", "0.62338597", "0.6231757...
0.7123536
0
Joint source meta introduction Returns the latest revision of the introduction.
Объединённое введение источника мета возвращает последнюю ревизию введения.
function getJointSourceMetaIntroOfLatestRevision($introId) { return \ICA\Contents\getContentLanguagesOfLatestRevision($introId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIntro()\n {\n return $this->getData('intro') ?? '';\n }", "public function getIntro();", "function getIntroduction() \n\t{\n\t\treturn (strlen($this->introduction)) ? $this->introduction : NULL;\n\t}", "function partialPutJointSourceMetaIntro($introId, $metaIntro) {\n \\ICA...
[ "0.6739167", "0.66321325", "0.64307237", "0.63690203", "0.6142472", "0.58490217", "0.56568134", "0.5517464", "0.5500655", "0.5416766", "0.5412177", "0.53853726", "0.52861327", "0.5253566", "0.5231922", "0.519541", "0.5169469", "0.51047844", "0.5091745", "0.5090716", "0.507669...
0.715441
0
Joint source meta region Returns the latest revision of the languagespecific regions.
Объединенная мета-область источника Возвращает последнюю ревизию языковых регионов.
function getJointSourceMetaRegionOfLatestRevision($jointSourceId) { $stateEncoded = STATE_PUBLISHED_ENCODED; $result = query("SELECT * FROM jointsources_regions_langs_summary WHERE jointsource_id = {$jointSourceId} AND state = {$stateEncoded};"); $region = []; while ($row = $result...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function partialPutJointSourceMetaRegion($jointSourceId, $metaRegion, $state = STATE_PUBLISHED) {\n\n global $DATABASE;\n $accountId = \\Session\\getAccountId();\n\n retainDatabaseTransaction();\n\n $stateEncoded = encodeState($state);\n foreach ($metaRegion as $lang => $region) {\n $langEncode...
[ "0.6448901", "0.5798933", "0.56132114", "0.50431055", "0.50127244", "0.5000344", "0.49989292", "0.49475202", "0.48974347", "0.48974347", "0.48950633", "0.4880474", "0.4876821", "0.4857132", "0.4857132", "0.4857132", "0.4857132", "0.4857132", "0.4857132", "0.47694626", "0.4757...
0.7480416
0
Destroy object and delete it from the filesystem
Уничтожить объект и удалить его из файловой системы
public function __destruct() { @unlink($this->path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy();", "public function destroy();", "public function destroy();", "public function d...
[ "0.73743224", "0.7295024", "0.7261606", "0.7261606", "0.7261606", "0.7261606", "0.7261606", "0.7261606", "0.7261606", "0.7251265", "0.7213544", "0.7184061", "0.7184061", "0.7184061", "0.7184061", "0.7184061", "0.7183151", "0.71488714", "0.7135689", "0.7135302", "0.71290004", ...
0.7420443
0
verify user by hash and see if hes active
проверить пользователя по хэшу и убедиться, что он активен
public function verifyUserbyHash($hash){ $this->db->query('SELECT * FROM users WHERE reset=:hash'); $this->db->bind(':hash', $hash); if($row = $this->db->fetcher()){ if($row['active'] == 1){ return true; }else{ return false; } } else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verifyUser ($username, $hash) {\r\n //TO-DO\r\n\r\n //if credentials match return true\r\n\r\n //else return false\r\n\r\n //dummy CODE\r\n return true;\r\n}", "function check_hash_key($hash_key)\n\t\t{\n\t\t\t$statement = $this->conn_id->prepare(\"select user_id,is_active from users where hash_key...
[ "0.7374941", "0.7366543", "0.7314171", "0.722698", "0.71718097", "0.7169702", "0.6886382", "0.67430055", "0.6686102", "0.66603714", "0.665221", "0.6635386", "0.662774", "0.662774", "0.6610401", "0.6597915", "0.6577457", "0.6566307", "0.6506828", "0.6502982", "0.6482771", "0...
0.7813419
0
Add query string to path
Добавить строку запроса в путь
public function addQueryToPath() { $this->path = '/' . preg_replace('/^\/+|\/+$/', '', $this->path); if ($this->query) { $this->path .= '?' . http_build_query($this->query); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getQueryStringPath()\n\t{\n\t\t$pathParam = craft()->urlManager->pathParam;\n\t\treturn trim($this->getQuery($pathParam, ''), '/');\n\t}", "function router_add_query($url, array $qp = array())\n{\n if (empty($qp)) {\n return $url;\n }\n if (strpos($url, '?') !== false) {\n ...
[ "0.6853588", "0.6836062", "0.6779231", "0.66798776", "0.65046537", "0.64772624", "0.6357382", "0.63186395", "0.6307967", "0.62756705", "0.61988", "0.61481136", "0.61143386", "0.60976726", "0.60698664", "0.6045355", "0.60411125", "0.6032067", "0.6016125", "0.6010373", "0.59730...
0.87038153
0
Clean up host string
Очистить строку хоста
public function cleanHost() { $this->host = preg_replace('/^\/+|\/+$/', '', $this->host); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function normaliseHost() {\n if (isset($this->parts['host'])) {\n $asciiHost = trim(strtolower(\\Etechnika\\IdnaConvert\\IdnaConvert::encodeString($this->parts['host']->get()))); \n $this->parts['host']->set($asciiHost);\n }\n }", "public function getBare...
[ "0.77013963", "0.6640727", "0.63795364", "0.6367515", "0.63487965", "0.6324834", "0.6302124", "0.62740165", "0.62596256", "0.6193802", "0.61882687", "0.61882687", "0.6184997", "0.6171849", "0.61182106", "0.6069783", "0.6067794", "0.60670066", "0.6057404", "0.6049992", "0.5993...
0.82477784
0
Makes a HTTP request
Создает HTTP-запрос
public function request() { $this->verbose('protocol', $this->protocol); $this->verbose('method', $this->method); $this->verbose('host', $this->host); $this->verbose('path', $this->path); $this->verbose('query', $this->query); $this->verbose('headers', $this->headers); $this->verbose('body', $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function makeRequest( $url, $method = 'GET', $headers = null );", "public function request();", "public function request() {\n // The basic flow: build the url, make the request, parse and return the\n // output.\n $url = $this->query_builder->getUrl();\n\n // @todo: does this make sense to ...
[ "0.73331404", "0.73023", "0.7178662", "0.7170017", "0.7051445", "0.68945324", "0.6891543", "0.68708956", "0.6859509", "0.68593395", "0.6824379", "0.68143374", "0.6722114", "0.6707084", "0.66934156", "0.6668256", "0.66613257", "0.66600716", "0.6645418", "0.66049063", "0.658626...
0.73270065
1
Returns a signature of the given request, timestamp and auth_header
Возвращает подпись запроса, временная метка и auth_header
private function signRequest($auth_header) { $signature = $this->makeBase64HmacSha256( $this->makeDataToSign($auth_header), $this->makeSigningKey($this->timestamp) ); $this->verbose('signature', $signature); return $signature; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function build_signature($request, $consumer, $token);", "abstract public function build_signature($request, $consumer, $token);", "private function getSignature()\n\t{\n\t\t$string_to_sign = mb_convert_encoding(\n\t\t\t$this->http_verb . $this->uri . $this->timestamp . $this->nonce,\n\t\t\t'UT...
[ "0.7038416", "0.7038416", "0.68539083", "0.66427815", "0.6598003", "0.6570151", "0.6557399", "0.6490245", "0.6435888", "0.64115953", "0.6349546", "0.63271314", "0.63253903", "0.6307628", "0.6283621", "0.6278706", "0.62676495", "0.6251527", "0.6250955", "0.6228758", "0.6208617...
0.7553427
0
Creates a signing key based on the secret and timestamp
Создает ключ подписи на основе секрета и временной метки
private function makeSigningKey() { $signing_key = $this->makeBase64HmacSha256($this->timestamp, $this->client_secret); $this->verbose('signing_key', $signing_key); return $signing_key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createSecret($tid, $amount, $currency, $timeStamp){}", "public function generateKeyAndSecret() {\n $user = user_load($this->uid);\n\n $this->app_key = str_replace(array(' ', '', '-'), '_', strtolower($this->title));\n $this->app_secret = md5($user->name . $this->time);\n }", "private ...
[ "0.68946797", "0.6702221", "0.6695327", "0.65833324", "0.65412176", "0.6499124", "0.6496211", "0.6478642", "0.64143693", "0.6389997", "0.6294417", "0.62517065", "0.62333804", "0.62220407", "0.6208027", "0.6202537", "0.618211", "0.6093152", "0.6015622", "0.60044974", "0.598772...
0.77321714
0
Returns a new nonce (unique identifier)
Возвращает новый nonce (уникальный идентификатор)
public static function makeNonce() { return bin2hex(openssl_random_pseudo_bytes(16)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _generateNonce()\n {\n return md5(uniqid(microtime()));\n }", "function getNonce() {\n\t\t\t$time = ceil(time() / $this->nonceLife) * $this->nonceLife;\n\t\t\treturn md5(date('Y-m-d H:i', $time).':'.$_SERVER['REMOTE_ADDR'].':'.$this->privateKey);\n\t\t}", "public function getNonce...
[ "0.8041633", "0.76728374", "0.765014", "0.76408774", "0.7636615", "0.76341075", "0.76220876", "0.7617031", "0.76167184", "0.75707656", "0.75560325", "0.7509285", "0.74582326", "0.7417288", "0.7412031", "0.73164165", "0.7299961", "0.72931844", "0.72821516", "0.7233302", "0.722...
0.7894137
1
Returns Base64 encoded HMACSHA256 Hash
Возвращает Base64 закодированный HMACSHA256 хеш
public static function makeBase64HmacSha256($data, $key) { return base64_encode(hash_hmac('sha256', $data, $key, true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHash() : string {\n\t\t// sha256 = 64 characters\n\t\treturn hash_hmac('sha256', $this->token, getenv('ENCRYPTION_KEY'));\n\t}", "public function getHash(): string\n {\n return hash_hmac('sha256', $this->token, Config::SECRET_KEY);\n }", "private static function makeBase64Sha256...
[ "0.75440264", "0.71334195", "0.7051711", "0.6290613", "0.6284106", "0.6264823", "0.623047", "0.61845356", "0.6157866", "0.6139399", "0.6068032", "0.6044524", "0.60103035", "0.60003465", "0.59875", "0.5960141", "0.59362155", "0.59362155", "0.59362155", "0.59362155", "0.5925910...
0.7337935
1
Returns Base64 encoded SHA256 Hash
Возвращает Base64 закодированный хеш SHA256
private static function makeBase64Sha256($data) { return base64_encode(hash('sha256', $data, true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHash() : string {\n\t\t// sha256 = 64 characters\n\t\treturn hash_hmac('sha256', $this->token, getenv('ENCRYPTION_KEY'));\n\t}", "public static function makeBase64HmacSha256($data, $key) {\r\n\t\treturn base64_encode(hash_hmac('sha256', $data, $key, true));\r\n\t}", "public function getHash(...
[ "0.7375722", "0.70937705", "0.6661909", "0.6615844", "0.6541969", "0.6532193", "0.6530907", "0.6499747", "0.63564676", "0.6331804", "0.6323774", "0.6323774", "0.6323774", "0.6323774", "0.62830865", "0.6247029", "0.622548", "0.6185811", "0.6182755", "0.6160669", "0.61343443", ...
0.7769883
0
Gets query for [[DriverBuses]].
Получает запрос для [[DriverBuses]].
public function getDriverBuses() { return $this->hasMany(DriverBus::className(), ['driver_id' => 'id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuses()\n {\n return $this->hasMany(Bus::className(), ['id' => 'bus_id'])->viaTable('driver_bus', ['driver_id' => 'id']);\n }", "public function getInactiveBuses()\n {\n $this->db->where('ESTADO_BUS', 0);\n $query = $this->db->get('view_bus');\n return $que...
[ "0.7061634", "0.5567739", "0.53757364", "0.5296343", "0.52423435", "0.517343", "0.5125084", "0.5090335", "0.5066862", "0.5064328", "0.50456643", "0.4987554", "0.4987517", "0.49782982", "0.49437386", "0.49239743", "0.49145603", "0.4908883", "0.48969725", "0.48969108", "0.48913...
0.7222917
0
test inserting a valid Event and verify that the actual mySQL data matches
тест вставки действительного события и проверка того, чтобы фактические данные mySQL совпадали
public function testInsertValidEvent() : void { // count the number of rows and save it for later $numRows = $this->getConnection()->getRowCount("event"); // create a new Event and insert to into mySQL $eventId = generateUuidV4(); $event = new Event ($eventId, $this->profile->ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateValidEvent (): void {\n\t\t//count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"event\");\n\n\t\t// create a new Event and insert into mySQL\n\t\t$eventId = generateUuidV4();\n\t\t$event = new Event ($eventId, $this->profile->getProfileId(...
[ "0.7731262", "0.758846", "0.74380404", "0.7407603", "0.7259846", "0.6951585", "0.67026263", "0.66907567", "0.6579914", "0.64154184", "0.6378714", "0.6359001", "0.6358072", "0.6341493", "0.6309486", "0.6303447", "0.6297858", "0.6275436", "0.6272193", "0.62660635", "0.62440073"...
0.84685063
0
test inserting a event, , editing it, and then updating it
тест вставки события, редактирования его и затем обновления его
public function testUpdateValidEvent (): void { //count the number of rows and save it for later $numRows = $this->getConnection()->getRowCount("event"); // create a new Event and insert into mySQL $eventId = generateUuidV4(); $event = new Event ($eventId, $this->profile->getProfileId(), $this->VALID_EVENTAT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateEvents()\n {\n $event= Event::factory(1)->create();\n // dd($event);\n $event->title = 'Maria';\n $this->put(\"/events\". $event[0]->id, $event->toArray());\n\n $this->assertDatabaseHas('events', [\n 'id' => 1,\n 'title' => 'Mari...
[ "0.7378545", "0.6957304", "0.67198896", "0.65459883", "0.65201646", "0.64438295", "0.64143497", "0.6401304", "0.6388013", "0.637638", "0.637079", "0.62603426", "0.62228453", "0.6184673", "0.6184673", "0.6130762", "0.6124727", "0.61092275", "0.6102272", "0.60901827", "0.609017...
0.730594
1
test creating a Event and then deleting it
тестирование создания события и последующего его удаления
public function testDeleteValidEvent() : void { // count the number of rows and save it for later $numRows = $this->getConnection()->getRowCount("event"); // create a new Event and insert into mySQL $eventId = generateUuidV4(); $event = new Event ($eventId, $this->profile->getProfile...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDeleteEvent()\n {\n }", "public function testDeleteChallengeEvent()\n {\n }", "public function testEventCallBackDelete()\n {\n }", "public function test_delete() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // S...
[ "0.8404941", "0.7346096", "0.72163755", "0.71658933", "0.70018786", "0.6774673", "0.65672433", "0.6531441", "0.6464762", "0.6453361", "0.64053947", "0.63906115", "0.6383038", "0.6365022", "0.63497055", "0.6346199", "0.6328063", "0.63244116", "0.63228446", "0.63135403", "0.630...
0.7884631
1
test grabbing a Event by a name that does not exist
тест захвата события по имени, которое не существует
public function testGetInvalidEventName (): void { // grab an name that does not exist $event = Event::getEventByEventName($this->getPDO(), "omgmynameisLuther"); $this->assertEmpty($event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEventNameException()\n {\n $this->setExpectedException('Txiki\\Events\\EventException', 'Event name is necesary', 0);\n\n $this->event->on();\n }", "abstract protected function get_event_name();", "abstract public function getEventName();", "public function testDuplica...
[ "0.6877557", "0.66338605", "0.64691263", "0.64430827", "0.6374208", "0.63224113", "0.6277908", "0.6244627", "0.61742085", "0.6158321", "0.61546385", "0.6115821", "0.60261106", "0.5990662", "0.5953422", "0.59455425", "0.58913267", "0.5861375", "0.58236617", "0.5791891", "0.574...
0.7973279
0
The method for adding all actions regarding the admin settings functionality.
Метод для добавления всех действий, связанных с функциональностью настройки администратора.
public function addActions() { add_action( 'load-toplevel_page_' . Muut::SLUG, array( $this, 'saveSettings' ) ); add_action( 'admin_notices', array( $this, 'prepareAdminNotices' ), 9 ); add_action( 'admin_notices', array( $this, 'maybeShowReviewRequestNotice' ), 8 ); add_action( 'admin_print_scripts', array...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function initSettings()\n {\n add_action('admin_menu', [__CLASS__, 'menus']);\n add_action('admin_init', [__CLASS__, 'sections']);\n add_action('admin_init', [__CLASS__, 'fields']);\n }", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_...
[ "0.7495836", "0.73197985", "0.7170805", "0.7113472", "0.71048826", "0.71048826", "0.70206416", "0.70134336", "0.6992794", "0.69824094", "0.6935411", "0.69153637", "0.6856674", "0.68481296", "0.6837792", "0.6831964", "0.6817312", "0.6817189", "0.67973214", "0.6776995", "0.6760...
0.7419989
1
The method for adding all filters regarding the admin settings.
Метод для добавления всех фильтров, связанных с настройками администратора.
public function addFilters() { add_filter( 'muut_validate_setting', array( $this, 'validateSettings' ), 10, 2 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alm_filters_settings(){\n \tregister_setting(\n \t\t'alm_filters_license',\n \t\t'alm_filters_license_key',\n \t\t'alm_filters_sanitize_license'\n \t);\n \tadd_settings_section(\n\t \t\t'alm_filters_settings',\n\t \t\t'Filter Settings',\n\t \t\t'alm_filters_settings_callba...
[ "0.73673356", "0.73386985", "0.70699775", "0.70512545", "0.6989756", "0.6834333", "0.6825944", "0.6729536", "0.666436", "0.6627359", "0.66120684", "0.6558634", "0.6520248", "0.6499989", "0.6499053", "0.6485307", "0.6447953", "0.6391586", "0.6374852", "0.63409185", "0.6338426"...
0.7880418
0
Saves the settings specified on the Muut settings page.
Сохраняет настройки, указанные на странице настроек Muut.
public function saveSettings() { if ( isset( $_POST['muut_settings_save'] ) && $_POST['muut_settings_save'] == 'true' && check_admin_referer( 'muut_settings_save', 'muut_settings_nonce' ) ) { $this->submittedSettings = $_POST['setting']; $settings = $this->settingsValidate( $this->getSubmittedSet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save_settings() {\n\n if (!isset($_REQUEST['action']) || !isset($_GET['page']))\n return;\n\n if ('swpm-settings' !== $_GET['page'])\n return;\n\n if ('swpm_settings' !== $_REQUEST['action'])\n return;\n\n check_admin_referer('swpm-update...
[ "0.80440927", "0.7955706", "0.7950228", "0.7805366", "0.7781625", "0.774334", "0.77048063", "0.76478714", "0.75165856", "0.75123507", "0.7448527", "0.74255204", "0.74084955", "0.7371037", "0.725891", "0.7222263", "0.7183165", "0.7168638", "0.71240807", "0.706741", "0.6988821"...
0.84162474
0
Gets the submitted settings.
Получает отправленные настройки.
public function getSubmittedSettings() { return $this->submittedSettings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSettings()\n {\n return $this->settings;\n }", "public function getSettings()\n {\n return $this->settings;\n }", "public function getSettings()\n {\n return $this->settings;\n }", "public function getSettings()\n {\n return $this->settings;...
[ "0.7681729", "0.7681729", "0.7681729", "0.7681729", "0.7657775", "0.76281834", "0.76146036", "0.7566829", "0.7560345", "0.74663484", "0.74535954", "0.7373239", "0.73364407", "0.72717625", "0.72062886", "0.7205121", "0.7183274", "0.7180024", "0.7179132", "0.7168884", "0.716492...
0.8529465
0
Gets the error queue.
Получает очередь ошибок.
public function getErrorQueue() { return apply_filters( 'muut_get_error_queue', $this->errorQueue ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getErrors(): array\n {\n return $this->errorBucket;\n }", "public function getQueue()\n {\n return $this->queue;\n }", "public function getQueue();", "public function getQueue();", "public function getErrorLog()\n {\n return $this->_errorList;\n }", ...
[ "0.633344", "0.61565524", "0.61545575", "0.61545575", "0.6139676", "0.6111046", "0.6090787", "0.6090787", "0.6086912", "0.608376", "0.60534894", "0.6041076", "0.6023126", "0.5998994", "0.59961635", "0.5991418", "0.5988555", "0.5947688", "0.5928177", "0.59220105", "0.59062487"...
0.89414424
0
Displays the dismissible admin notice requesting a review.
Показывает удаляемое уведомление администратора, запрашивающее отзыв.
public function maybeShowReviewRequestNotice() { $dismissed_notices = muut()->getOption( 'dismissed_notices', array() ); if ( !isset( $dismissed_notices['review_request'] ) || !$dismissed_notices['review_request'] ) { $update_timestamps = muut()->getOption( 'update_timestamps', array() ); $update_time = !...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionAdmin()\n\t{ \n\t\t$this->render('review_admin');\n\t}", "public function view_dispute()\n\t{\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->data['heading'] = 'View Rental Dispute';\n\t\t\t$booking_no = $this->uri->segm...
[ "0.67987543", "0.63189924", "0.6269882", "0.62370074", "0.6200544", "0.6196636", "0.6161835", "0.6157072", "0.6090546", "0.60774744", "0.605097", "0.6029998", "0.5874426", "0.5872145", "0.5860559", "0.5844915", "0.5834113", "0.58216614", "0.581724", "0.579967", "0.5776156", ...
0.7383436
0
Conditionally declares a `readonly()` function, which was renamed to `wp_readonly()` in WordPress 5.9.0. In order to avoid PHP parser errors, this function was extracted to this separate file and is only included conditionally on PHP 8.1. Including this file on PHP >= 8.1 results in a fatal error.
Условно объявляет функцию `readonly()`, которая была переименована в `wp_readonly()` в WordPress 5.9.0. Чтобы избежать ошибок парсера PHP, эта функция была вынесена в отдельный файл и включается только условно при PHP 8.1. Включение этого файла при PHP >= 8.1 приводит к фатальной ошибке.
function readonly( $readonly_value, $current = true, $display = true ) { _deprecated_function( __FUNCTION__, '5.9.0', 'wp_readonly()' ); return wp_readonly( $readonly_value, $current, $display ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_readonly($readonly_value, $current = \\true, $display = \\true)\n {\n }", "public function test_readonly_with_equal_values() {\n\t\tif ( ! function_exists( 'readonly' ) ) {\n\t\t\t$this->markTestSkipped( 'readonly() function is not available on PHP 8.1' );\n\t\t}\n\n\t\t$this->setExpectedDeprec...
[ "0.71871376", "0.6354879", "0.6317591", "0.61399114", "0.61399114", "0.61398035", "0.6075591", "0.6043304", "0.59170383", "0.59041935", "0.59041935", "0.59041935", "0.5834941", "0.56669366", "0.5666118", "0.56628716", "0.5658149", "0.5611689", "0.5567222", "0.54671156", "0.54...
0.73657644
0
Check if a passed operator exists in operators array
Проверьте, существует ли переданный оператор в массиве операторов
private function hasOperator($passedOperator){ foreach($this->operators as $operator){ if ($operator->customIdentifier == $passedOperator){ return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasOperator(string $token): bool;", "public function containsOperators() {\n\t\t$pattern = [];\n\t\tforeach ( $this->wildcardingOperators as $op ) {\n\t\t\t$pattern[] = \"\\\\$op\";\n\t\t}\n\t\t$pattern = \"/\" . implode( '|', $pattern ) . \"/\";\n\n\t\tif ( preg_match( $pattern, $this->original...
[ "0.72984016", "0.7208383", "0.7127995", "0.7122488", "0.7054457", "0.6843041", "0.67791736", "0.6770774", "0.6588907", "0.6553735", "0.65490794", "0.6517682", "0.65166897", "0.6481073", "0.63351035", "0.63351035", "0.63275605", "0.6322143", "0.6302122", "0.6241584", "0.622657...
0.76823026
0
Create two products and add categories. Function is called by constructor by default.
Создайте два продукта и добавьте категории. Функция вызывается по умолчанию при вызове конструктора.
private function createInitialProducts() { $this->product = $this->createProduct(); $this->product2 = $this->createProduct(); $this->category = $this->createCategory(); $this->product->addCategory($this->category); $this->product2->addCategory($this->category); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createProducts()\n {\n $chicken = $this->newProduct(self::PRODUCT_CHICKEN_EAN, self::PRODUCT_CHICKEN_NAME);\n $turkey = $this->newProduct(self::PRODUCT_TURKEY_EAN, self::PRODUCT_TURKEY_NAME);\n \n try\n {\n $isChickenCreated = $this->productDao->cr...
[ "0.6908337", "0.6777938", "0.64080685", "0.6403077", "0.63767225", "0.6285812", "0.62760943", "0.62625074", "0.62591", "0.62520915", "0.6251681", "0.62052256", "0.617267", "0.61465406", "0.61450493", "0.6139702", "0.61351573", "0.6134497", "0.6118182", "0.61118793", "0.611028...
0.77283883
0
Create fixtures for product test data.
Создайте фикстуры для тестовых данных продукта.
protected function createFixtures() { // Due to a dubious bug(?) in doctrine - product types need to be loaded first. $typeFixtures = new LoadProductTypes(); $typeFixtures->load($this->entityManager); $this->productType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ID)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setupTestEntities() {\n // Create 4 entities with name1 and 3 entities with name2.\n $entity_1 = [\n 'name' => 'name1',\n ];\n\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n $this-...
[ "0.6996939", "0.69728124", "0.678251", "0.6770383", "0.66363764", "0.66316247", "0.660591", "0.6584067", "0.6577336", "0.65619504", "0.65202034", "0.6515315", "0.6499056", "0.64935565", "0.64790505", "0.64782643", "0.6473156", "0.6427314", "0.6424767", "0.64165056", "0.641428...
0.76663435
0
Creates a product with type addon.
Создает продукт с типом addon.
public function createAddonProduct() { ++$this->productCount; // Create basic product. $product = $this->productFactory->createEntity(); $this->entityManager->persist($product); $product->setNumber('AddonProductNumber-' . $this->productCount); $product->setManufactur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create() {\n\t\tupdate_option( 'woocommerce_calc_taxes', 'yes' );\n\t\tupdate_option( 'woocommerce_prices_include_tax', 'yes' );\n\n\t\t// Create tax rates.\n\t\t$this->tax_rate_ids[] = $this->create_tax_rate( '25' );\n\t\t$this->tax_rate_ids[] = $this->create_tax_rate( '12' );\n\t\t$this->tax_rate...
[ "0.65238065", "0.63758755", "0.63057864", "0.6291931", "0.6277181", "0.6238256", "0.62190914", "0.61754674", "0.6113501", "0.6067593", "0.5982357", "0.5965286", "0.5960259", "0.59420735", "0.5911808", "0.5896644", "0.58801985", "0.5878024", "0.5877861", "0.5853381", "0.585265...
0.77192754
0
Register the tab Manager Instance.
Зарегистрировать экземпляр менеджера вкладок.
protected function registerManager() { $this->app->singleton( 'tab', function () { new Manager(); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerManager();\n $this->app->singleton('tab', 'AvoRed\\Framework\\Tab\\Manager');\n }", "protected function registerTab()\n {\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.review')\n ...
[ "0.68733144", "0.6783366", "0.6491803", "0.64455855", "0.62837785", "0.6015851", "0.6012331", "0.5618199", "0.5610784", "0.55848706", "0.5561134", "0.5553364", "0.5525436", "0.551622", "0.5503889", "0.5499744", "0.54842037", "0.5478949", "0.54756653", "0.54502714", "0.5406373...
0.77723634
0
Register Tabs for the Different CRUD operations.
Регистрация вкладок для различных CRUD-операций.
public function registerTabs() { Tab::put('promotion.promotion-code', function (TabItem $tab) { $tab->key('promotion.promotion-code.info') ->label('avored::system.tab.basic_info') ->view('avored::promotion.promotion-code._fields'); }); Tab::put('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' ...
[ "0.7493138", "0.7143338", "0.6632756", "0.6513557", "0.64712167", "0.63974446", "0.63963425", "0.63718724", "0.6335391", "0.63344675", "0.63187397", "0.6300449", "0.6252324", "0.6227191", "0.6220576", "0.6217609", "0.6197994", "0.6183311", "0.61678964", "0.60155857", "0.59986...
0.7884113
0
Returns the Tripal Job Report
Возвращает отчет о задании Tripal
function tripal_jobs_report () { //$jobs = db_query("SELECT * FROM {tripal_jobs} ORDER BY job_id DESC"); $jobs = pager_query( "SELECT TJ.job_id,TJ.uid,TJ.job_name,TJ.modulename,TJ.progress, TJ.status as job_status, TJ,submit_date,TJ.start_time, TJ.end_time,TJ.priority,U.name as u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReport() {}", "public function getReport() {}", "function getReport() ;", "public function getquickCreateReport()\n\t{\n\t\tdate_default_timezone_set(config::$timezone);\n\t\t$today = date(\"Y-m-d\");\n\t\t$parameterr = array();\n\t\t$parameter['title'] = 'Today\\'s Created Orders';\n ...
[ "0.6780987", "0.6780987", "0.667767", "0.62381923", "0.61912584", "0.60387796", "0.6016715", "0.6009864", "0.5996296", "0.5968668", "0.59550303", "0.595316", "0.5945366", "0.5926536", "0.5926536", "0.59217554", "0.5870606", "0.58497316", "0.58348435", "0.5827185", "0.58136517...
0.7226321
0
Returns the start time for a given job
Возвращает время начала для заданной задачи
function tripal_jobs_get_start_time($job){ if($job->start_time > 0){ $start = format_date($job->start_time); } else { if(strcmp($job->job_status,'Cancelled')==0){ $start = 'Cancelled'; } else { $start = 'Not Yet Started'; } } return $start; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function startTime($id) {\n $start = $this->field('start_time', array('CoJob.id' => $id));\n \n if(!$start) {\n throw new InvalidArgumentException(_txt('er.notfound', array(_txt('ct.co_jobs.1'), $id)));\n }\n \n return strtotime($start);\n }", "public function getStartTime() {\n ...
[ "0.734057", "0.72508126", "0.72423553", "0.7233272", "0.722676", "0.722676", "0.7218142", "0.71488744", "0.7106745", "0.70761186", "0.70761186", "0.70761186", "0.70761186", "0.70761186", "0.70761186", "0.70761186", "0.70761186", "0.70761186", "0.70567477", "0.6986683", "0.698...
0.7579456
0
Returns the end time for a given job
Возвращает конечное время для заданной задачи
function tripal_jobs_get_end_time($job){ if($job->end_time > 0){ $end = format_date($job->end_time); } else { $end = ''; } return $end; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEndTime()\n {\n return $this->get(self::_END_TIME);\n }", "public function get_endtime()\n {\n }", "public function getEnd()\n {\n return $this->end_time;\n }", "public function getEndTime() {\n return $this->get(self::ENDTIME);\n }", "pu...
[ "0.7378564", "0.7369462", "0.73485416", "0.73451775", "0.7320211", "0.73024726", "0.7249983", "0.7229755", "0.7229755", "0.7229755", "0.7214442", "0.7214442", "0.7214442", "0.7214442", "0.7214442", "0.7214442", "0.7214442", "0.7214442", "0.7176313", "0.7141478", "0.71014184",...
0.7770604
0
A function used to manually launch all queued tripal jobs
Функция, используемая для ручного запуска всех отложенных заданий tripal
function tripal_jobs_launch ($do_parallel = 0){ // first check if any jobs are currently running // if they are, don't continue, we don't want to have // more than one job script running at a time if(!$do_parallel and tripal_jobs_check_running()){ return; } // get all jobs that have not ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n Job::create(['url'=> 'https://proxify.io']);\n\n Job::create(['url'=> 'https://reddit.com']);\n\n Job::factory(1000)->create();\n }", "public abstract function sendJobs();", "public function GetQueuedJobs()\n {\n $JOBS = $this->DB->GET('MUP.injecto...
[ "0.64697635", "0.6462541", "0.64090973", "0.6405658", "0.6355033", "0.63013923", "0.6284084", "0.62691814", "0.62584555", "0.6248748", "0.6233149", "0.6228374", "0.61532295", "0.6100931", "0.6082637", "0.6073058", "0.6020516", "0.6013439", "0.59634143", "0.5952395", "0.595105...
0.7490207
0
Return carbon date using the localised format
Вернуть дату в формате с локализацией
function carbonLocale(\Carbon\Carbon $object, $format = '%A %d %B %Y') { return $object->formatLocalized($format); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function carbon($date){\r\n\r\n setlocale(LC_TIME, 'fr_FR.utf8');\r\n return Carbon::parse($date, 'Europe/Paris')->formatLocalized('%A %d %B %Y');\r\n\r\n }", "function customDateFormat($date)\n{\n $MyDate = Carbon::parse($date)->format('j/M');\n\n return $MyDate;\n}", "public ...
[ "0.79006255", "0.64018595", "0.6392714", "0.6337135", "0.61643964", "0.61643964", "0.61462575", "0.61387825", "0.61107326", "0.6012104", "0.6010181", "0.59816474", "0.59691405", "0.5916218", "0.5916218", "0.5881463", "0.58703846", "0.586223", "0.5822919", "0.58109266", "0.579...
0.7163265
1
Test procedure is loaded from cache if cache is enabled.
Тестовая процедура загружается из кэша, если кэш включен.
public function testProcedureIsLoadedFromCacheIfCacheIsEnabled() { $procedure1 = $this->getProcedure('http_default'); $procedure2 = $this->getProcedure('http_default'); $request = $this->getRequest(); $request->setUrl('http://test.com'); $renderer = $this->getMockBuilder('\...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProcedureIsNotLoadedFromCacheIfCacheIsDisabled()\n {\n $procedure1 = $this->getProcedure('http_default');\n $procedure2 = $this->getProcedure('http_default');\n\n $request = $this->getRequest();\n $request->setUrl('http://test.com');\n\n $renderer = $this->...
[ "0.73082566", "0.70706975", "0.7006384", "0.6986353", "0.6912529", "0.6650094", "0.66381556", "0.6586222", "0.6585568", "0.6574192", "0.6525631", "0.64172125", "0.63711387", "0.6364101", "0.6352449", "0.6339289", "0.63340634", "0.6316721", "0.62794256", "0.62690556", "0.62683...
0.7911491
0
Test procedure is not loaded from cache if cache is disabled.
Тестовая процедура не загружается из кэша, если кэш отключен.
public function testProcedureIsNotLoadedFromCacheIfCacheIsDisabled() { $procedure1 = $this->getProcedure('http_default'); $procedure2 = $this->getProcedure('http_default'); $request = $this->getRequest(); $request->setUrl('http://test.com'); $renderer = $this->getMockBuilde...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProcedureIsLoadedFromCacheIfCacheIsEnabled()\n {\n $procedure1 = $this->getProcedure('http_default');\n $procedure2 = $this->getProcedure('http_default');\n\n $request = $this->getRequest();\n $request->setUrl('http://test.com');\n\n $renderer = $this->getM...
[ "0.7623278", "0.71057874", "0.7041279", "0.6989676", "0.68283445", "0.6807507", "0.67114466", "0.66136855", "0.6597117", "0.6577242", "0.6564216", "0.6563774", "0.63903505", "0.63846916", "0.63840497", "0.63426214", "0.6282495", "0.62785965", "0.6269627", "0.6265571", "0.6244...
0.7705376
0
Test procedure cache can be cleared.
Тестовый кэш процедур можно очистить.
public function testProcedureCacheCanBeCleared() { $procedure1 = $this->getProcedure('http_default'); $procedure2 = $this->getProcedure('http_default'); $request = $this->getRequest(); $request->setUrl('http://test.com'); $renderer = $this->getMockBuilder('\JonnyW\PhantomJs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function clearCache() {\n static::$cachedChecks = [];\n }", "public function clear_cache(): void;", "public function testCacheCleanup(){\n\n $this->initCache();\n\n // Cleanup all previously set values\n $this->cache->clear();\n $this->cache->save();\n $this...
[ "0.68743885", "0.68306875", "0.682427", "0.6816568", "0.66356367", "0.66352797", "0.66151667", "0.66151667", "0.66037697", "0.65509427", "0.6542146", "0.6539125", "0.6534003", "0.64833003", "0.644303", "0.6440681", "0.6422488", "0.6410198", "0.6393726", "0.6383559", "0.636764...
0.7320258
0
Test syntax exception is thrown if compiled template is not valid.
Исключение синтаксического теста возникает, если компилированная шаблон не является допустимой.
public function testSyntaxExceptionIsThrownIfCompiledTemplateIsNotValid() { $this->expectException('\JonnyW\PhantomJs\Exception\SyntaxException'); $template = <<<EOF console.log(; EOF; $procedure = $this->getProcedure('http_default'); $procedure->setTemplate($template); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testThrowsExceptionOnInvalidFormat()\n {\n $parser = new Parser($this->createTwig());\n $parser->parse('invalid-format');\n }", "public function testMustCompileExisting()\n {\n $tpl = $this->smarty->createTemplate('helloworld.tpl');\n $this->assertFalse($tpl->...
[ "0.71902436", "0.70385116", "0.6562863", "0.643716", "0.640166", "0.6359351", "0.6345154", "0.6268534", "0.6263377", "0.62340206", "0.6228822", "0.62027436", "0.6200329", "0.61467165", "0.61389786", "0.61258817", "0.6092118", "0.60784096", "0.6077966", "0.6057166", "0.6025761...
0.8268455
0
Perform card payment call PayLane multiSale or redirect to 3D Secure Auth Page
Выполните платежную операцию с картой через PayLane multiSale или перенаправьте на страницу 3D Secure Auth
public function payAction() { $paylanecreditcard = Mage::getSingleton("paylanecreditcard/standard"); $data = $paylanecreditcard->getPaymentData(); if (is_null($data)) { Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl("/")); } // connect to PayLane Direct System $paylane_cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function payAction()\n\t{\n\t\t$paylanedirectdebit = Mage::getSingleton(\"paylanedirectdebit/standard\");\n\t\t$data = $paylanedirectdebit->getPaymentData();\n\t\t\n\t\tif (is_null($data))\n\t\t{\n\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t}\n\t\t\n\t\tech...
[ "0.73262817", "0.67825", "0.663912", "0.6622188", "0.6570033", "0.63739145", "0.633631", "0.63194305", "0.62468356", "0.61211795", "0.60867524", "0.6045052", "0.6041837", "0.60361564", "0.59942794", "0.59728783", "0.59704477", "0.59504724", "0.59135324", "0.5897952", "0.58817...
0.734294
0
A standard 404 File Not Found error message is delivered when this action is encountered.
Стандартное сообщение об ошибке 404 «Файл не найден» отправляется, когда происходит эта операция.
public function FileNotFound() { $this->Render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionNotfound()\n {\n $this->actionSlug = 'notfound';\n $this->actionParams = [];\n $this->breadcrumbs=[];\n $this->beforeAction();\n $this->breadcrumbs[] = ['title' => 404];\n header(\"HTTP/1.x 404 Not Found\");\n header(\"Status: 404 Not Found\...
[ "0.7803775", "0.7603082", "0.75345117", "0.7473012", "0.747177", "0.73943573", "0.73767805", "0.73522455", "0.7287652", "0.7263549", "0.72594374", "0.72447956", "0.72285795", "0.7228387", "0.72282493", "0.72059596", "0.7196274", "0.7164584", "0.71642125", "0.7147159", "0.7143...
0.7640687
1
Getting the array of the allowed operations.
Получение массива разрешенных операций.
public function getAllowedOperations() { return [ self::OPERATION_REQUEST, self::OPERATION_CANCEL, self::OPERATION_APPROVE, self::OPERATION_REJECT, self::OPERATION_QUERY, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOps(): array\n {\n return $this->ops;\n }", "public function getOperators()\n {\n return array();\n }", "public function getOperators()\n {\n return array();\n }", "public function getOperationAllowableValues()\n {\n return [\n se...
[ "0.7841913", "0.7536235", "0.7536235", "0.7401346", "0.73173374", "0.70796007", "0.70615923", "0.7039096", "0.7001047", "0.6995724", "0.69882137", "0.69651693", "0.68176025", "0.67655635", "0.6752635", "0.6745391", "0.6724253", "0.672411", "0.6701343", "0.66702104", "0.662952...
0.82293415
0
Log out current user
Выйти из системы текущего пользователя
public static function logOut() { (new Session())->remove(static::$userIdField); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logOut()\n {\n $auth = new AuthenticationService();\n\n if ($auth->hasIdentity()) {\n Session::getDefaultManager()->forgetMe();\n $auth->clearIdentity();\n }\n }", "public function LogOut() {\n\t\t$this->session->UnsetAuthenticatedUser();\n\t\t$thi...
[ "0.8190783", "0.8105757", "0.8080836", "0.80382186", "0.8034612", "0.7968366", "0.79573065", "0.79150116", "0.79120713", "0.79058284", "0.7900326", "0.7894195", "0.7878588", "0.7878179", "0.78659946", "0.78581774", "0.78465366", "0.7839202", "0.7824548", "0.7822867", "0.78194...
0.81302166
1
Sets a new pager
Устанавливает новый пейджер
public function setPager($pager) { $this->pager = $pager; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setPager( $pager ){\n \n $this->pager = $pager;\n \n }", "public function attach_pager(&$pager)\r\n\t{\r\n\t\t$this->pager = &$pager;\r\n\t\t$this->pager->reset_buffer($this->buffer, $this->pagenum);\r\n\t}", "public function set_page($page);", "function setAllowedPager...
[ "0.78964484", "0.71026504", "0.6340061", "0.6267509", "0.6225529", "0.61915725", "0.6187212", "0.6122953", "0.60983175", "0.60884464", "0.6047487", "0.6017994", "0.59564906", "0.59194183", "0.5913018", "0.5898529", "0.58908", "0.58823484", "0.5869589", "0.583329", "0.58204347...
0.7437724
1
Get user approved enrollment info
Получить информацию о подтверждении зачисления пользователя
public function get_user_approved_enrollment() { $obj = new View(); $queryobj = new Jamf_model(); $sql = "SELECT COUNT(CASE WHEN `user_approved_enrollment` = '1' THEN 1 END) AS Yes, COUNT(CASE WHEN `user_approved_enrollment` = '0' THEN 1 END) AS No ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApproved()\n {\n return $this->approved;\n }", "function getApprover() {\n return user_load($this->approver_uid);\n }", "public function getForApproval() {\n\n /* Set orWhereIn variables */\n array_push($this->orWhereIn, [\n 'column' => 'id',\n ...
[ "0.592195", "0.5911125", "0.58932334", "0.58652806", "0.58464867", "0.58373773", "0.58290595", "0.5752386", "0.5700905", "0.559106", "0.5568029", "0.55559415", "0.5552544", "0.55377245", "0.54764223", "0.5469682", "0.5448517", "0.54447633", "0.54401195", "0.5370685", "0.53438...
0.7497952
0
Get user approved mdm info
Получить информацию о одобренном пользователем MDM
public function get_user_approved_mdm() { $obj = new View(); $queryobj = new Jamf_model(); $sql = "SELECT COUNT(CASE WHEN `user_approved_mdm` = '1' THEN 1 END) AS Yes, COUNT(CASE WHEN `user_approved_mdm` = '0' THEN 1 END) AS No FROM `jamf` ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_approved_enrollment()\n {\n $obj = new View();\n $queryobj = new Jamf_model();\n $sql = \"SELECT COUNT(CASE WHEN `user_approved_enrollment` = '1' THEN 1 END) AS Yes,\n COUNT(CASE WHEN `user_approved_enrollment` = '0' THEN 1 END) AS No\n ...
[ "0.56994987", "0.55811465", "0.5560212", "0.5547102", "0.54225934", "0.54115707", "0.540618", "0.5362114", "0.5314731", "0.51763004", "0.5158069", "0.5080142", "0.5072045", "0.5071464", "0.5057376", "0.50359595", "0.500821", "0.4972003", "0.4944054", "0.49251547", "0.49094433...
0.750665
0
Get pending failed info
Получить информацию о необработанных сбоях
public function get_pending_failed() { $obj = new View(); $queryobj = new Jamf_model(); $sql = "SELECT COUNT(CASE WHEN `comands_completed` = '1' THEN 1 END) AS Completed, COUNT(CASE WHEN `comands_pending` = '1' THEN 1 END) AS Pending, COUNT(CA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLPFailed();", "private function getFailedList()\n\t{\n\t\treturn $this->failed_list;\n\t}", "public function getFailureReason();", "private function get_failed_rows() {\n\t\treturn $this->failed_rows;\n\t}", "public function failed()\n {\n return $this->model->failed()->get();\...
[ "0.6696683", "0.6545082", "0.63386285", "0.6259116", "0.62394977", "0.61840224", "0.60434085", "0.60006976", "0.5991402", "0.59585154", "0.5957355", "0.59252733", "0.5880477", "0.5831493", "0.5827517", "0.5794808", "0.57710385", "0.57669663", "0.5761366", "0.5760081", "0.5749...
0.73078907
0
Get Jamf version for widget
Получить версию Jamf для виджета
public function get_jamf_version() { $obj = new View(); $jamf = new Jamf_model; $obj->view('json', array('msg' => $jamf->get_jamf_version())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_version();", "public function version() {\n\t\t$app = $this->app;\n\t\treturn intval($app::VERSION);\n\t}", "function get_version() {\n\n\t\treturn $this->version;\n\n\t}", "function get_version() {\n return self::VERSION;\n }", "function get_version() {\n return self::VERSION;\n...
[ "0.67651445", "0.65304", "0.6468132", "0.642748", "0.642748", "0.64173687", "0.64150673", "0.6405984", "0.6402726", "0.63736635", "0.6372986", "0.6369637", "0.6360184", "0.6323494", "0.63228106", "0.63228106", "0.63228106", "0.63228106", "0.63228106", "0.63228106", "0.6322810...
0.7387403
0
Filter admin footer text "Thank you for creating..."
Текст подвалов администратора фильтра "Спасибо за создание..."
function filter_admin_footer_text() { $new_text = sprintf( __( 'Thank you for creating with <a href="https://wordpress.org">WordPress</a> and <a href="http://10up.com">10up</a>.', 'tenup' ) ); return $new_text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modify_admin_footer_text() {\n return '<span id=\"footer-thankyou\">' . __( 'Thanks for creating with <a href=\"https://wordpress.org/\">WordPress</a> and hosting with <a href=\"https://kinsta.com\">Kinsta</a>', 'admin-text-modifications' ) . '</span>';\n }", "static function change_admin_foot...
[ "0.80000395", "0.7799204", "0.74456346", "0.74316996", "0.724739", "0.71912134", "0.7184769", "0.7158495", "0.7091978", "0.70859325", "0.7004923", "0.69063205", "0.6861944", "0.682899", "0.6796628", "0.6705375", "0.66755956", "0.66686076", "0.66346645", "0.6632306", "0.661181...
0.8324421
0
Disables logging and returns the logger that was previously set.
Отключает логирование и возвращает логгер, который был ранее установлен.
protected function disableLogging() { $configuration = $this->managerRegistry ->getManagerForClass($this->objectClass) ->getConnection() ->getConfiguration(); $logger = $configuration->getLoggerCallable(); $configuration->setLoggerCallable(null); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getLogger()\n {\n return $this->_logger;\n }", "protected function getLogger()\n {\n return $this->_logger;\n }", "protected function getLogger()\n {\n return $this->_logger;\n }", "protected function getLogger()\n {\n if (null === $this->lo...
[ "0.6910392", "0.6910392", "0.6910392", "0.67541146", "0.6746264", "0.6725146", "0.6725146", "0.6725146", "0.66904056", "0.66904056", "0.6685483", "0.66271573", "0.66128564", "0.65982115", "0.6596331", "0.6596331", "0.6589753", "0.6564295", "0.65558195", "0.6513458", "0.650260...
0.8188289
0
/ sanitizeString is a function that is intended to sanitize input gathered from forms in order to prevent injection and cross site scripting $str_input is the string retrieved
sanitizeString — это функция, предназначенная для очистки входных данных, собранных из форм, с целью предотвращения инъекций и скриптов кросс-сайтного выполнения. $str_input — это строка, полученная
function sanitizeString($str_input) { $str_input = strip_tags($str_input); $str_input = htmlentities($str_input); $str_input = stripslashes($str_input); return $str_input; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function sanitize($string);", "public function sanitize(string $input)\n {\n }", "function sanitizeString($str){\n\t\tif(get_magic_quotes_gpc()) $str = stripslashes($str);\t\n\t\t$str= htmlentities($str);\n\t\t$str=strip_tags($str);\n\t\treturn $str;\n\t}", "function sanitize_in...
[ "0.7810626", "0.76071453", "0.74512416", "0.7425186", "0.7381243", "0.73656386", "0.7321819", "0.73066175", "0.7225697", "0.7177158", "0.715598", "0.7145306", "0.7127399", "0.7119967", "0.7100881", "0.70680845", "0.7054103", "0.70174074", "0.7005454", "0.6997446", "0.6990176"...
0.7850762
0
Handle the LoanRepayment "created" event.
Обработайте событие "created" LoanRepayment.
public function created(LoanRepayment $model) { // Increment the Count of the Payment Count $loanModel = $model->loanApplication; $loanModel->payment_count = $loanModel->payment_count + 1; $loanModel->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function creating(LoanRepayment $model)\n {\n $model->uuid = (string)Str::uuid();\n $model->user_id = auth()->user()->id;\n // Generate Transaction ID\n $model->transaction_id = uniqid();\n }", "public function handle(InvoiceCreated $event)\r\n {\r\n $this->invo...
[ "0.6430279", "0.60284585", "0.5993654", "0.59641516", "0.58187354", "0.58059865", "0.5768316", "0.5752895", "0.5742987", "0.56723523", "0.56390357", "0.55670124", "0.5547815", "0.55373824", "0.5485997", "0.54705864", "0.54651564", "0.5448599", "0.53581667", "0.5351043", "0.53...
0.71557903
0