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
Computer belongs to many (manytomany) License.
Компьютер принадлежит многим (многие ко многим) Лицензиям.
public function licenses() { // belongsToMany(RelatedModel, pivotTable, thisKeyOnPivot = computer_id, otherKeyOnPivot = license_id) return $this->belongsToMany(License::class, 'assign_licenses'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function senarai_licenses()\n {\n return $this->hasMany(License::class);\n }", "public function licencias()\n \t\t{\n \t\t\treturn $this->hasMany(Licencia::class);\n \t\t}", "public function license()\n {\n return $this->belongsTo('CityBoard\\Entities\\License');\n }",...
[ "0.6568531", "0.64019376", "0.6319992", "0.6158621", "0.5986587", "0.53441775", "0.5278908", "0.5257805", "0.508816", "0.50568515", "0.5050976", "0.504276", "0.5040435", "0.5014788", "0.5014788", "0.5014788", "0.5014788", "0.5014788", "0.5014788", "0.5005856", "0.49734253", ...
0.7035283
0
Return whether PayPal is active
Вернуть, активно ли PayPal
protected function isPayPalActive() { if (is_null($this->payPalActive)) { $this->payPalActive = Mage::getModel('gene_braintree/paymentmethod_paypal')->isAvailable(); } return $this->payPalActive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPayPal() {\n return $this->payment_method == self::PAYMENT_METHOD_PAY_PAL;\n }", "static function activePayment()\n\t{\n global $configClass;\n if($configClass['active_payment'] == 1 || $configClass['integrate_membership'] == 1)\n\t\t{\n return true;\n ...
[ "0.7805777", "0.7613831", "0.7339002", "0.7036956", "0.70231205", "0.693064", "0.6903085", "0.68773985", "0.6816784", "0.67917424", "0.6737774", "0.67171633", "0.666696", "0.66500837", "0.6638917", "0.6609189", "0.65934783", "0.65934783", "0.6576212", "0.65712625", "0.6563811...
0.85022604
0
Return the countries that 3D secure should be present for
Верните страны, для которых должен быть предусмотрен 3D secure
protected function getThreeDSpecificCountries() { if ($this->isThreeDSpecificCountries()) { return Mage::getStoreConfig('payment/gene_braintree_creditcard/threedsecure_specificcountry'); } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCountries()\n\t{\n\t\t$country[\"AFG\"] = Array(\"iso2\" => \"AF\", \"name\" => \"Afghanistan, Islamic Republic \");\n\t\t$country[\"ALA\"] = Array(\"iso2\" => \"AX\", \"name\" => \"Åland Islands\");\n\t\t$country[\"ALB\"] = Array(\"iso2\" => \"AL\", \"name\" => \"Albania, Republic of\");...
[ "0.6800763", "0.667885", "0.6651119", "0.66122645", "0.6575285", "0.6573148", "0.65707195", "0.6567189", "0.6535754", "0.6503848", "0.64522153", "0.64176404", "0.64143836", "0.64041084", "0.6388758", "0.6358172", "0.6346038", "0.6346038", "0.6337612", "0.6318757", "0.6305449"...
0.7269421
0
Return supported credit cards
Возврат поддерживаемых кредитных карт
protected function getSupportedCardTypes() { if ($this->isCreditCardActive()) { return Mage::getStoreConfig('payment/gene_braintree_creditcard/cctypes'); } return []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function creditCardProvider()\n\t{\n\t\treturn [\n\t\t\t'null_test' => [\n\t\t\t\t'amex',\n\t\t\t\tnull,\n\t\t\t\tfalse,\n\t\t\t],\n\t\t\t'random_test' => [\n\t\t\t\t'amex',\n\t\t\t\t$this->generateCardNum('37', 16),\n\t\t\t\tfalse,\n\t\t\t],\n\t\t\t'invalid_type' => [\n\t\t\t\t'shorty',\n\t\t\t\t...
[ "0.7700701", "0.71809685", "0.6844757", "0.65579015", "0.64313895", "0.64292735", "0.6421887", "0.6360375", "0.6304886", "0.6283235", "0.6255947", "0.62117535", "0.6140459", "0.6136205", "0.60771286", "0.6044322", "0.6036578", "0.5985166", "0.59806424", "0.59535146", "0.59297...
0.7374451
1
Return the Kount environment
Верните среду Kount
protected function getKountEnvironment() { $env = Mage::getStoreConfig('payment/gene_braintree_creditcard/kount_environment'); if ($env) { return $env; } return 'production'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public static function environment() {\n return self::$environment;\n ...
[ "0.64660543", "0.64660543", "0.64660543", "0.64660543", "0.64660543", "0.64660543", "0.6186181", "0.6118327", "0.6113337", "0.6054074", "0.60363805", "0.60320103", "0.60197973", "0.5960265", "0.5954795", "0.59538615", "0.5920069", "0.59062856", "0.59022623", "0.5898648", "0.5...
0.75356686
0
Return the Kount ID
Верните Kount ID
protected function getKountId() { $kountId = Mage::getStoreConfig('payment/gene_braintree_creditcard/kount_merchant_id'); if ($kountId) { return $kountId; } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getID(): int {\n\t\t\treturn intval( $this->getStrippedKey() );\n\t\t}", "public function getIDKey(){\n\t\treturn $this->ID_key;\n\t}", "public function key(): int\n {\n return $this->key;\n }", "public function key()\n {\n $currentRecord = $this->storage->current();\n ...
[ "0.6371757", "0.6368952", "0.6338018", "0.6310352", "0.62511665", "0.6196694", "0.6177455", "0.6111237", "0.606594", "0.60594773", "0.6053535", "0.6035038", "0.60334194", "0.6033073", "0.6025374", "0.6024949", "0.60210204", "0.59980196", "0.59734464", "0.5941696", "0.5941696"...
0.7971644
0
Return the locale for PayPal
Верните локаль для PayPal
protected function getLocale() { return Mage::getStoreConfig('payment/gene_braintree_paypal/locale'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLocale() {}", "public function getLocale(): string;", "public function getLocale(): string;", "public function getLocale(): string;", "public function getLocale();", "public function getLocale();", "public static function locale(): string\n {\n // in the end to handle that ...
[ "0.7559114", "0.7532183", "0.7532183", "0.7532183", "0.7434086", "0.7434086", "0.74290687", "0.73958266", "0.73075885", "0.72427666", "0.7184892", "0.7155877", "0.70780325", "0.70780325", "0.70402694", "0.7029818", "0.7018309", "0.7014556", "0.69294035", "0.6927187", "0.69169...
0.8160201
0
Key of the process definition this log entry belongs to; null means any.
Ключ определения процесса, к которому относится эта запись лога; null означает любой.
public function getProcessDefinitionKey(): ?string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProcessDefinitionKey()\n {\n return $this->processDefinitionKey;\n }", "public function getProcessDefinitionId(): ?string;", "public function setProcessDefinitionKey($var)\n {\n GPBUtil::checkInt64($var);\n $this->processDefinitionKey = $var;\n\n return $...
[ "0.79350114", "0.6483151", "0.6348663", "0.6243876", "0.61664844", "0.61350477", "0.61130214", "0.605714", "0.60074157", "0.5891208", "0.58434695", "0.58206177", "0.57838064", "0.57545346", "0.5744523", "0.5695073", "0.5686384", "0.5685197", "0.5651267", "0.5639972", "0.56200...
0.74984604
1
/ This function returns true if the user is logged in and the level is between 1 and 5 Can be called with or without parameters If the first (and unique) parameter is set adxitionally the level is checked Returns true if all is valid, or false in other case
// Эта функция возвращает true, если пользователь авторизован и уровень находится между 1 и 5. Может вызываться с параметрами или без них. Если первый (и единственный) параметр задан дополнительно проверяется уровень. Возвращает true, если всё корректно, или false в другом случае
function user_level($level = null) { static $check = false; $check = isset($_SESSION['user'], $_SESSION['level']); if (!$check) return false; //The level must be in the range "1, 5" if (isset($level)) return (ereg('[1-5]', $level) && $_SESSION['level'] >= $level); if ($_SESSION...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkuserlevel($params)\r\n{ // verifies user is logged in and returns security level\r\n \r\n return 7;\r\n}", "function page_require_level($required_level) {\n global $session;\n $current_user = current_user();\n\n /* caution */\n /* === === */\n if ( !$current_user ) {\n redirect('home.php'...
[ "0.7510495", "0.71792436", "0.7162982", "0.7014871", "0.69505185", "0.6851501", "0.68051654", "0.6781335", "0.6721992", "0.6580645", "0.6549649", "0.6489122", "0.64689696", "0.6369636", "0.6362496", "0.6333358", "0.63308346", "0.63244677", "0.63183403", "0.62880164", "0.62868...
0.7945838
0
/ string $scrapped_page int filetime bool return [true] if the file does exist or [false] if it does not
/ строка $scrapped_page int filetime bool возвращает [true], если файл существует, или [false], если его нет
public function check_n_save_page($scrapped_page, $filetime) { if (!$scrapped_page) return false; // file time returns unix time, knowing that you can just compare with the [CURLINFO_FILETIME] runnning out from the function date() if (!file_exists($this->file_scrapped_filename) || $filetime > filemtime($this->f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_file($file) {\n global $DOCUMENT_ROOT;\n global $config;\n \n $file=\"$DOCUMENT_ROOT/../sessions/$config->salt/$file\";\n if (file_exists($file)) {\n $lastvisit=fileatime($file);\n $currenttime = getdate(time());\n $currentdate = $c...
[ "0.6525203", "0.6464274", "0.63750607", "0.63200223", "0.62171817", "0.607879", "0.6077047", "0.6064402", "0.6055038", "0.60382366", "0.6014803", "0.60085315", "0.59986395", "0.59916675", "0.59650815", "0.5951816", "0.59405667", "0.58979243", "0.5878598", "0.58702797", "0.581...
0.7625592
0
Returns a formatted string using the first argument as a printflike format. The first argument is a string that contains zero or more placeholders. Each placeholder is replaced with the converted value from its corresponding argument. Supported placeholders are: %s String. %d Number (both integer and float). %j JSON. %...
Возвращает отформатированную строку, используя первый аргумент как printf-подобный формат. Первый аргумент — это строка, содержащая ноль или более плейсхолдеров. Каждый плейсхолдер заменяется на преобразованное значение соответствующего аргумента. Поддерживаются плейсхолдеры: %s — строка, %d — число (целое или с плаваю...
public static function format($f) { $arguments = func_get_args(); $formatRegExp = '/%[sdj%]/'; if (!is_string($f)) { $objects = array(); for ($i = 0; $i < count($arguments); $i++) { $objects[] = self::inspect($arguments[$i]); } return implode(' ', $arguments); } $i = 1; $args = $argumen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function format(string $format, string ...$arguments) : string\n {\n foreach ($arguments as $key => $value) {\n $format = str_replace(\"{{$key}}\", (string)$value, $format);\n }\n\n return $format;\n }", "function _params($format, array $arguments) {\n\treturn ...
[ "0.66370654", "0.6489578", "0.6404039", "0.63494533", "0.6346657", "0.6267784", "0.62385327", "0.6229555", "0.6191076", "0.6144836", "0.6100809", "0.6041466", "0.60273737", "0.6021646", "0.6004905", "0.59815836", "0.5980098", "0.5894739", "0.58653796", "0.58388567", "0.583173...
0.7131323
0
Mark the model with the "shipped" value.
Отметьте модель значением "shipped".
public function asShipped() { return $this->markAs($this->getShippedValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setShipped()\n {\n return $this->setMarkedAs($this->getShippedValue());\n }", "public function setShipped($id){\n $this->upd(\"orders\", array(\"shipped\" => \"yes\"), array(\"order_id\" => $id));\n }", "public function isShipped()\n {\n return $this->markedAs($t...
[ "0.7840315", "0.6907665", "0.6818506", "0.6771709", "0.66996807", "0.66872215", "0.6646689", "0.63589066", "0.62784636", "0.61762947", "0.58819187", "0.58664745", "0.5760213", "0.56310743", "0.5602686", "0.55806905", "0.5580145", "0.55796117", "0.5565963", "0.5540858", "0.552...
0.7409889
1
Determine if the value of the model's "marked as" attribute is equal to the "shipped" value.
Определите, равно ли значение атрибута "отмечено как" модели значению "отправлено".
public function isShipped() { return $this->markedAs($this->getShippedValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setShipped()\n {\n return $this->setMarkedAs($this->getShippedValue());\n }", "public function asShipped()\n {\n return $this->markAs($this->getShippedValue());\n }", "public function getIsConfirmedByFieldAttribute()\n {\n return $this->confirmed_by == $this-...
[ "0.6471374", "0.6335392", "0.6091764", "0.60399467", "0.60149777", "0.5969608", "0.59481263", "0.5828352", "0.57744926", "0.5750381", "0.57153267", "0.5582864", "0.55547893", "0.5500476", "0.5448891", "0.54133296", "0.5406064", "0.539859", "0.5351539", "0.5350781", "0.5338208...
0.75546396
0
Set the value of the "marked as" attribute as "shipped" value.
Задайте значение атрибута "отметить как" значением "отправлено".
public function setShipped() { return $this->setMarkedAs($this->getShippedValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function asShipped()\n {\n return $this->markAs($this->getShippedValue());\n }", "public function setShipped($id){\n $this->upd(\"orders\", array(\"shipped\" => \"yes\"), array(\"order_id\" => $id));\n }", "public function setPendingShipped($value)\n {\n return $this->set...
[ "0.69864196", "0.67865604", "0.6541234", "0.6240428", "0.6176512", "0.61411715", "0.61111397", "0.5994037", "0.5961839", "0.5863792", "0.57956415", "0.5763698", "0.5642321", "0.5634669", "0.560573", "0.5593523", "0.5547936", "0.5527922", "0.5439115", "0.5416367", "0.5389885",...
0.7808173
0
Get the value of the "shipped" mark.
Получите значение метки "shipped".
public function getShippedValue() { return defined('static::SHIPPED_VALUE') ? static::SHIPPED_VALUE : 'shipped'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPendingShipped()\n {\n $value = $this->get(self::pending_shipped);\n return $value === null ? (integer)$value : $value;\n }", "public function asShipped()\n {\n return $this->markAs($this->getShippedValue());\n }", "public function setShipped()\n {\n ...
[ "0.70706326", "0.70533043", "0.67725", "0.655741", "0.6555291", "0.64700323", "0.64045966", "0.63732946", "0.62339646", "0.6174103", "0.6135703", "0.6096978", "0.60946006", "0.60199517", "0.6008439", "0.5890552", "0.5890119", "0.5864838", "0.58574486", "0.58479077", "0.584576...
0.7509603
0
Generating store groups ('stores' on frontend)
Генерация групп магазинов ('stores' на фронтенде)
private function generateStoreGroups() { $existedStoreGroupCount = count($this->storeGroupsIds); $existedWebsitesCount = count($this->websiteIds); while ($existedStoreGroupCount < $this->storeGroupsCount) { $websiteId = $this->websiteIds[$existedStoreGroupCount % $existedWebsites...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createStoreCollection($stores)\n {\n // Build a new basic collection\n $collection = new Varien_Data_Collection();\n\n // Loop through each store\n foreach($stores as $store) {\n\n // Create a new instance of the store model and append the data\n ...
[ "0.61383075", "0.6126497", "0.61013544", "0.6043266", "0.59528714", "0.59417367", "0.5914124", "0.5899062", "0.5877884", "0.5848617", "0.55318284", "0.55315703", "0.5519663", "0.5494898", "0.5494898", "0.54696053", "0.54276276", "0.5406558", "0.5394462", "0.5394127", "0.53871...
0.8605663
0
Gets the website codes that were created by this object
Получает коды веб-сайтов, созданные этим объектом
public function getWebsiteCodes() { return $this->websiteCodes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCodes()\n\t{\n\t\treturn [\n\t\t\tBase::Mail,\n\t\t\tBase::Call,\n\t\t\tBase::Imol,\n\t\t\tBase::Site,\n\t\t\tBase::Site24,\n\t\t\tBase::Shop24,\n\t\t\tBase::SiteDomain,\n\t\t\tBase::Button,\n\t\t\tBase::Form,\n\t\t\tBase::Callback,\n\t\t\tBase::FbLeadAds,\n\t\t\tBase::VkLeadAds,\n\t\t\tB...
[ "0.65343344", "0.62454325", "0.6145902", "0.6143063", "0.6008224", "0.5963869", "0.5920006", "0.5920006", "0.5920006", "0.5920006", "0.5920006", "0.5920006", "0.5919298", "0.58604306", "0.5854182", "0.58339584", "0.5798556", "0.5772247", "0.5758541", "0.5750871", "0.5749314",...
0.821215
0
Check if this voter support given attribute and subject. This function will be invoked when you call $this>>denyAccessUnlessGranted("attribute", $user) in controller.
Проверьте, поддерживает ли этот избиратель заданный атрибут и субъект. Эта функция будет вызываться, когда вы вызовете $this>>denyAccessUnlessGranted("attribute", $user) в контроллере.
public function supports($attribute, $subject) { // if the attribute isn't one we support, return false if (!in_array($attribute, [self::ROLE_USER, self::ROLE_ADMIN, self::ROLE_SUPER_ADMIN])) { return false; } // only vote on Post objects inside this voter if (!$...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function supports(string $attribute, $subject): bool\n {\n // replace with your own logic\n // https://symfony.com/doc/current/security/voters.html\n return in_array($attribute, ['USER_READ','USER_EDIT','USER_DELETE'])\n && $subject instanceof User;\n }", "protecte...
[ "0.80204535", "0.79404384", "0.7861512", "0.76565903", "0.76220757", "0.7581368", "0.7518907", "0.74348336", "0.74066937", "0.7366821", "0.7360237", "0.7302758", "0.72596556", "0.7214316", "0.72114307", "0.7147355", "0.71326214", "0.7098609", "0.70703137", "0.7003217", "0.692...
0.79552495
1
[runPayrollStatus get status want to run payroll or not]
[runPayrollStatus получает статус, хочет ли запускать зарплату или нет]
public static function runPayrollStatus(){ if(TaxPerson::first()){ return true; } else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public fu...
[ "0.63805795", "0.63805795", "0.63805795", "0.63805795", "0.63805795", "0.63805795", "0.63805795", "0.63805795", "0.63805795", "0.63805795", "0.6323056", "0.63225365", "0.63225365", "0.6292593", "0.6222834", "0.6192771", "0.6184017", "0.6184017", "0.6153444", "0.6085621", "0.6...
0.7046919
0
Gets the value of regex
Получает значение регулярного выражения
public function getRegex() { return $this->regex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function regex(): string{\n return $this->_regex;\n }", "public static function getRegularExpression();", "public function getRegex()\n\t{\n\t\treturn $this->regex;\n\t}", "public function getRegex(): string\n {\n return $this->regex;\n }", "public function getRegex(): string\...
[ "0.7869755", "0.7725662", "0.77184963", "0.7717696", "0.7717696", "0.7686503", "0.75484383", "0.73852706", "0.70314085", "0.6871608", "0.68433106", "0.6832578", "0.68249077", "0.67074937", "0.670703", "0.66894925", "0.6544934", "0.65268886", "0.64279747", "0.64056164", "0.636...
0.77575004
1
sherpa_backend_scripts() Scripts that should run in the front and backend
sherpa_backend_scripts() Скрипты, которые следует запускать в переднем и заднем фоне
function sherpa_backend_scripts() { sherpa_front_and_backend_scripts(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue_backend_scripts_and_styles() {\n\t\twp_enqueue_style( 'uclacomponentswp-backend-styles', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/css/backend-styles.css', array(), UCLACOMPONENTSWP_VERSION, 'all' );\n\t\twp_enqueue_script( 'uclacomponentswp-backend-scripts', UCLACOMPONENTSWP_PLUG...
[ "0.6430172", "0.62118477", "0.615901", "0.6151872", "0.6151872", "0.6038972", "0.6036001", "0.6015924", "0.5977779", "0.59556776", "0.5894504", "0.587687", "0.58138144", "0.580284", "0.5767446", "0.57500154", "0.57480717", "0.57337624", "0.5681027", "0.566479", "0.56634593", ...
0.8965813
0
Constructs a new FrontAttribute for a given attribute
Создает новый FrontAttribute для заданного атрибута
function newInstance($language, $variant) { // Get its datatype $datatype = $variant->getDatatype(); $frontAttributeClassName = $datatype->getDatatype() . "FrontAttribute"; $dinamicCode = "\$frontAttribute = new " . $frontAttributeClassName . "(\$language, \$variant);"; // Dynamically invoke the con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createAttribute()\n\t{\n\n\t\t$this->createCustomAttribute($this->attributeName, $this->arguments);\n\n\t}", "public function field(string $attribute)\n {\n if (! isset($this->attributeTypes()[$attribute])) {\n throw new AttributeTypeNotDefined($attribute, $this);\n }\...
[ "0.64085436", "0.5988842", "0.59236187", "0.56267744", "0.5603969", "0.5483811", "0.53697026", "0.5353029", "0.53421426", "0.53360885", "0.53219837", "0.53127", "0.52619386", "0.5251006", "0.5236853", "0.5234492", "0.5217395", "0.5206564", "0.5188828", "0.5184875", "0.5179899...
0.7154941
0
Save the subtitle with the same movie file name.
Сохраните субтитры с тем же именем фильма.
public function save(string $subtitleUrl, string $movieName, array $files) { $movieFileFullPath = "{$this->torrentBaseFolder}/{$this->getMovieFilePath($movieName, $files)}"; $subtitleFullPath = preg_replace('/\\.[^.\\s]{3,4}$/', '', $movieFileFullPath) . '.srt'; // TODO: try/catch the file_g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doMovieDownloadSubtitle()\n {\n $moviesPath = ezcConfigurationManager::getInstance()->getSetting( 'movies', 'GeneralSettings', 'SourcePath' );\n $subtitleId = str_replace( array( '|', '~' ), array( '/', '.' ), $this->SubtitleId );\n $releaseFolder = $this->Folder;\n\n ...
[ "0.6330745", "0.6074996", "0.6024923", "0.59556085", "0.583991", "0.5800357", "0.5782787", "0.5772395", "0.57687217", "0.56833124", "0.56004834", "0.5538504", "0.55209947", "0.5509497", "0.5499056", "0.54841495", "0.54674286", "0.54560256", "0.5425283", "0.5423881", "0.541980...
0.7366732
0
Create request for operation 'createFile'
Создать запрос для операции 'createFile'
protected function createFileRequest($api_key, $file, $data) { // verify the required parameter 'api_key' is set if ($api_key === null || (is_array($api_key) && count($api_key) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $api_key when ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createFile() {}", "public function createFile(Request $request)\n {\n if( !$this->checkPermissions(['view-my-files']) ){ return $this->genResponse(401); };\n\n return $this->doCreateFile($request);\n }", "public function createFile(File $file): void;", "abstract public...
[ "0.75011015", "0.70568216", "0.67203844", "0.671537", "0.6673059", "0.6607805", "0.6578514", "0.63467765", "0.6344368", "0.63260776", "0.63260776", "0.6317245", "0.618112", "0.616824", "0.61351997", "0.6134689", "0.60317504", "0.6004477", "0.5992608", "0.59532815", "0.5949529...
0.71442026
1
Create request for operation 'deleteFiles'
Создать запрос для операции 'deleteFiles'
protected function deleteFilesRequest($api_key, $ids, $action) { // verify the required parameter 'api_key' is set if ($api_key === null || (is_array($api_key) && count($api_key) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $api_key when ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($files);", "public function deleteFile(Request $request){\n $this->validate($request,[\n 'id' => 'required'\n ]);\n $id = $request->id;\n if (is_array($id)){\n return $this->respondWithSuccess('Files Deleted',CloudFile::destroy($id));\n ...
[ "0.7262981", "0.6840771", "0.6778269", "0.66655666", "0.6662515", "0.6654112", "0.6530932", "0.6463647", "0.6456", "0.63790816", "0.62744844", "0.61923695", "0.60711116", "0.60490483", "0.6038714", "0.6025765", "0.6021584", "0.5977438", "0.59578955", "0.5940948", "0.5935032",...
0.7063905
1
Create request for operation 'registerPhone'
Создать запрос для операции 'registerPhone'
protected function registerPhoneRequest($token, $phone) { // verify the required parameter 'token' is set if ($token === null || (is_array($token) && count($token) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $token when calling ' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionRegister()\n {\n if (isset($this->request['mobile'])) {\n $mobile = $this->request['mobile'];\n $user = Users::model()->find('username = :mobile', [':mobile' => $mobile]);\n\n $code = Controller::generateRandomInt();\n if (!$user) {\n ...
[ "0.6485624", "0.6239649", "0.62041795", "0.6122553", "0.6007569", "0.5982746", "0.5893909", "0.58441365", "0.58252627", "0.57838595", "0.57723", "0.5766271", "0.57526124", "0.5745396", "0.574211", "0.5739112", "0.5710388", "0.56825083", "0.56730056", "0.5666547", "0.5650866",...
0.75233155
0
Create request for operation 'updateDeviceToken'
Создать запрос для операции 'updateDeviceToken'
protected function updateDeviceTokenRequest($api_key, $device_token, $device_type) { // verify the required parameter 'api_key' is set if ($api_key === null || (is_array($api_key) && count($api_key) === 0)) { throw new \InvalidArgumentException( 'Missing the required para...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdateDeviceToken() {\n //validate webservice\n $requiredParams = ['user_id', 'device_type', 'device_token'];\n try {\n CommonApiHelper::validateRequestParameters($requiredParams);\n\n $response = [];\n $post = Yii::$app->request->bodyPara...
[ "0.715672", "0.66972023", "0.58691937", "0.5859526", "0.5717458", "0.5712943", "0.5691809", "0.5617092", "0.56052715", "0.55971783", "0.556346", "0.5536656", "0.54882485", "0.54261327", "0.5354632", "0.5319839", "0.53150463", "0.53145176", "0.5314043", "0.53027785", "0.528915...
0.707547
1
Create request for operation 'updateStar'
Создать запрос для операции 'updateStar'
protected function updateStarRequest($api_key, $id, $star, $type) { // verify the required parameter 'api_key' is set if ($api_key === null || (is_array($api_key) && count($api_key) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $api_key wh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Gitstar $gitstar)\n {\n $reference = array('id'=>'id', 'name'=>'name', 'url'=>'url', 'created_at'=>'created_at', 'updated_at'=>'updated_at', 'pushed_at'=>'pushed_at', 'description'=>'description', 'stargazers_count'=>'stargazers_count');\n $api_url = env('API_...
[ "0.66637206", "0.62061745", "0.58617467", "0.5743522", "0.55437636", "0.5527927", "0.5470452", "0.54613185", "0.54511964", "0.54427123", "0.5316292", "0.53150076", "0.5284334", "0.52757746", "0.5232626", "0.5203693", "0.5199188", "0.51703733", "0.5168038", "0.5165995", "0.516...
0.73611146
0
Create request for operation 'uploadMetaFile'
Создать запрос для операции 'uploadMetaFile'
protected function uploadMetaFileRequest($api_key, $file, $name, $parent_id, $id) { // verify the required parameter 'api_key' is set if ($api_key === null || (is_array($api_key) && count($api_key) === 0)) { throw new \InvalidArgumentException( 'Missing the required param...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function restStorageFrontendFileMetadataPostRequest($key, $metadata)\n {\n // verify the required parameter 'key' is set\n if ($key === null || (is_array($key) && count($key) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $ke...
[ "0.6387478", "0.6260104", "0.5946443", "0.58848757", "0.5879818", "0.5824457", "0.57945484", "0.5732394", "0.5717869", "0.5711992", "0.5701931", "0.5649872", "0.56262946", "0.5613774", "0.55865145", "0.5568608", "0.5566244", "0.5513134", "0.550771", "0.548855", "0.5458693", ...
0.71550727
0
Compute costing of RAM usage for each Study in 1 day
Вычислить стоимость использования RAM для каждого Study в течение 1 дня
private function computeRamPerStudyCostIn1Day() { $ramNeededPerStudyInMB = $this->ramToStudiesRatioMB / $this->studiesToRamRatio; $ram1MbPerHourCost = $this->ram1GbPerHourCost / 1000; $ramPerStudyCost = $ramNeededPerStudyInMB * $ram1MbPerHourCost * 24; return $ramPerStudyCost;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_storage_cost(){\n $number_of_days = $this->get_days_spent();\n $total_debit = 0;\n\n //cost for first week\n if ($number_of_days <= 7) {\n $total_debit += $number_of_days * 10.0;\n } else {\n $number_of_days = $number_of_days - 7;\n $total_debit += 7 * 10.0;\n\n ...
[ "0.6275699", "0.5981136", "0.58150554", "0.5688177", "0.5641703", "0.5484741", "0.542001", "0.53972757", "0.5292075", "0.52643514", "0.51050216", "0.50665647", "0.5044197", "0.504386", "0.5042897", "0.5014746", "0.49875653", "0.49824783", "0.49761787", "0.49753913", "0.496408...
0.7287864
0
dispatchLoop shutdown plugin get action view and wrap it with site template view
dispatchLoop shutdown plugin get action view и wrap it с site template view
public function dispatchLoopShutdown() { //logfire('postdispatch','happened'); //chech whether using site template if($this->_renderLayout > 0){ //logfire('isbackend', $this->_renderLayout); //get frontcontroller, request and response objects $frontController = Zend_Contr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function myaction()\n {\n $this->viewBuilder()->disableAutoLayout();\n $this->viewBuilder()->setTemplate('take_action');\n }", "public function postDispatch()\n\t{\n\t\t// Non-OPT views are ignored.\n\t\tif(! $this->_actionController->view instanceof Opt_View)\n\t\t{\n\t\t\treturn;\n\t...
[ "0.67139965", "0.6437624", "0.6354152", "0.63118804", "0.63118804", "0.6253149", "0.6217814", "0.6211856", "0.6178408", "0.6164469", "0.61545736", "0.6151556", "0.6134559", "0.6132222", "0.61158043", "0.61054015", "0.6094454", "0.6064931", "0.60567456", "0.60531634", "0.60395...
0.75066763
0
stats_title($message): Displays the header of the table with the title given by $message
stats_title($message): Отображает заголовок таблицы с заголовком, указанным в $message
function stats_title($message) { global $t; echo "<center>\n"; echo "<table width=600 border=0 cellspacing=0 cellpadding=0 bgcolor=\"".$GLOBALS["th_box_frame_color"]."\" align=center>\n"; echo "<tr><td>\n"; echo "<table width=100% border=0 cellspacing=1 cellpadding=3>\n"; echo "<tr bgcolor=\"".$...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stats_subtitle($message) {\n\n echo \"<tr><td bgcolor=\\\"\".$GLOBALS[\"th_box_title_bgcolor\"].\"\\\"><B>\".$message.\"</B></td>\\n\";\n echo \"<td bgcolor=\\\"\".$GLOBALS[\"th_box_title_bgcolor\"].\"\\\">&nbsp;</td>\";\n echo \"<td bgcolor=\\\"\".$GLOBALS[\"th_box_title_bgcolor\"].\"\\\">&nbsp;...
[ "0.68965286", "0.6571762", "0.64134747", "0.63609195", "0.6330686", "0.63235146", "0.62779784", "0.62779784", "0.6272583", "0.6272583", "0.6222309", "0.6222309", "0.6222309", "0.6222309", "0.6222309", "0.6222309", "0.6222309", "0.6222309", "0.6222309", "0.6222309", "0.6222309...
0.830197
0
stats_subtitle($message): Displays a subtitle
stats_subtitle($message): Отображает подзаголовок
function stats_subtitle($message) { echo "<tr><td bgcolor=\"".$GLOBALS["th_box_title_bgcolor"]."\"><B>".$message."</B></td>\n"; echo "<td bgcolor=\"".$GLOBALS["th_box_title_bgcolor"]."\">&nbsp;</td>"; echo "<td bgcolor=\"".$GLOBALS["th_box_title_bgcolor"]."\">&nbsp;</td>"; echo "<td bgcolor=\"".$GLOBAL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_subtitle() {\n\t\treturn $this->format_string( $this->subtitle );\n\t}", "function get_subtitle() \t{\n \t\treturn $this->subtitle;\t\n \t}", "private function renderSubtitle()\n\t{\n\t\tif ($this->subtitle) {\n\t\t\treturn '<h2 class=\"block-new-subtitle\">' . $this->subtitle . '</h2>';\...
[ "0.72993433", "0.7062685", "0.7021699", "0.6961924", "0.69376004", "0.68726826", "0.6704802", "0.6681809", "0.65780884", "0.6569573", "0.6456006", "0.63817877", "0.6347591", "0.63377756", "0.63073975", "0.62854373", "0.6251113", "0.62120974", "0.6190419", "0.6152046", "0.6140...
0.72793204
1
stats_display($what,$count,$url): Displays the statistic graphically in one column $what is the string which gives the name $count gives the number of times it appears $url gives the corresponding url if $url = 0 then no url is displayed
stats_display($what,$count,$url): Отображает статистику графически в одном столбце. $what — это строка, которая задаёт имя. $count задаёт количество появлений. $url задаёт соответствующий URL. Если $url = 0, то URL не отображается.
function stats_display($what,$count,$url) { $max= 400; // max is a number to ensure the maximum lenght of the graph $length = 575; // length is the maximal lenght of the image echo "<tr><td width=47%>&nbsp;<a href=\"".$url."\">".$what."</A>:</td>\n"; echo "<td width=1%>&nbsp;</td>\n"; echo "<td w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stats_display_alt($what,$count,$url,$total) {\n\n $epsilon = 0.0001; // To avoid having division by zero\n if (empty($total) || !isset($total) || $total == 0) {$total=1; $count=0;}\n if (empty($count) || !isset($count)) {$count=0;}\n\n\t\t\t// To avoid that by 100% the graph is too big\n if (($coun...
[ "0.7405699", "0.6408754", "0.6100484", "0.60141516", "0.59529966", "0.59512", "0.5942152", "0.5882036", "0.586058", "0.58205193", "0.5800221", "0.57995623", "0.57954544", "0.5786281", "0.577637", "0.5750611", "0.57387185", "0.5722149", "0.57197523", "0.5708696", "0.5706691", ...
0.7830014
0
stats_display_alt($what,$count,$url,$total): Displays the statistic graphically in one column $what is the string which gives the name $count gives the number of times it appears $url gives the corresponding url $total gives the total sum of all the studied items
stats_display_alt($what,$count,$url,$total): Отображает статистику графически в одном столбце. $what — это строка, которая дает название. $count указывает количество появлений. $url предоставляет соответствующий URL. $total указывает общую сумму всех изученных элементов.
function stats_display_alt($what,$count,$url,$total) { $epsilon = 0.0001; // To avoid having division by zero if (empty($total) || !isset($total) || $total == 0) {$total=1; $count=0;} if (empty($count) || !isset($count)) {$count=0;} // To avoid that by 100% the graph is too big if (($count/($total + $ep...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stats_display($what,$count,$url) {\n $max= 400;\t\t// max is a number to ensure the maximum lenght of the graph\n $length = 575; \t// length is the maximal lenght of the image\n\n echo \"<tr><td width=47%>&nbsp;<a href=\\\"\".$url.\"\\\">\".$what.\"</A>:</td>\\n\";\n echo \"<td width=1%>&nbsp;...
[ "0.7692948", "0.6523727", "0.6181679", "0.6074401", "0.6056053", "0.60160065", "0.6014564", "0.6009766", "0.59728914", "0.5939174", "0.59314096", "0.5928774", "0.58220595", "0.5821045", "0.5803433", "0.57449275", "0.5604799", "0.556947", "0.5555766", "0.55455714", "0.5544032"...
0.8475261
0
$this>db = new PDO('mysql:host='. getenv('IP') . ';dbname=mysqlweb3', getenv('C9_USER'), '');
$this>db = new PDO('mysql:host='. getenv('IP') . ';dbname=mysqlweb3', getenv('C9_USER'), '');
function __construct() { $this->db = new PDO('mysql:host='. getenv('IP') . ';dbname=blog', getenv('C9_USER'), ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct()\n { \n $host = getenv('DB_HOST');\n $port = getenv('DB_PORT');\n $db = getenv('DB_DATABASE');\n $user = getenv('DB_USERNAME');\n $pass = getenv('DB_PASSWORD');\n\n try {\n $this->_pdo = new \\PDO(\n \"mysql:ho...
[ "0.7582883", "0.7569287", "0.75511193", "0.75511193", "0.7335447", "0.72889304", "0.72792846", "0.7238123", "0.7223819", "0.71849084", "0.7147939", "0.7093341", "0.70903116", "0.7070941", "0.7065265", "0.70631886", "0.70596683", "0.7059239", "0.70569813", "0.7055484", "0.7028...
0.81459796
0
Print a CLI Banner
Печать баннера CLI
public static function print_banner() { print $GLOBALS['i18n']['framework']['cli_banner'] . "\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function print_banner() {\n if ($this->debug_state('banner')) {\n echo PHP_EOL, 'PHP Daemon - Worker Debug Console';\n echo PHP_EOL, 'Use `help` for list of commands', PHP_EOL, PHP_EOL;\n $this->debug_state('banner', false);\n }\n }", "public function cli...
[ "0.7806342", "0.65283054", "0.6402048", "0.6320391", "0.6266828", "0.6266828", "0.62393826", "0.6201711", "0.6201188", "0.61925787", "0.6163991", "0.6139099", "0.61024034", "0.60996497", "0.60810214", "0.6044979", "0.6044005", "0.60279816", "0.60237247", "0.60108674", "0.6003...
0.8124554
0
Returns url_preview user type description
Возвращает описание типа пользователя url_preview
public static function getUserTypeDescription() { return array( "USER_TYPE_ID" => "url_preview", "CLASS_NAME" => __CLASS__, "DESCRIPTION" => Loc::getMessage('MAIN_URL_PREVIEW_USER_TYPE_NAME'), "BASE_TYPE" => "int" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_preview_url()\n {\n }", "public static function getUserTypeDescription()\n {\n $className = get_called_class();\n return array(\n 'PROPERTY_TYPE' => 'S',\n 'USER_TYPE' => self::USER_TYPE,\n 'DESCRIPTION' => 'Покупаемость',\n ...
[ "0.6406306", "0.6210161", "0.61033595", "0.6082027", "0.6040655", "0.5990123", "0.5988875", "0.59029156", "0.5822434", "0.58114964", "0.5771869", "0.57650524", "0.57282263", "0.5727985", "0.56901777", "0.56894636", "0.56873095", "0.5676407", "0.5633129", "0.56280905", "0.5576...
0.7501013
0
/ Dumping and printing for debug purporses Dumpe pie self. Firstly nodes, then slices
// Для отладки: вывод и печать данных. Сначала узлы, затем срезы
function dump() { $str = ''; $str .= sprintf("Pie geometry [id = %d]\n", $this->id ); $str .= " Nodes\n"; foreach ($this->nodes as $node) { $str .= sprintf(" Node [%4d], lat = %-19s lon = %-19s %s\n", $node['id'], $node['lat'], $node['lon'], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dprint()\n\t{\n\t\tprint_r( $this->debug );\n\t}", "public function dump()\n {\n foreach ($this->sudoku as $y => $row) {\n foreach ($row as $x => $value) {\n echo \"{$value} \";\n }\n\n echo \"\\n\";\n }\n\n echo \"\\n\";\n ...
[ "0.57447225", "0.5514701", "0.55030715", "0.5444503", "0.5433725", "0.53968287", "0.5357881", "0.535622", "0.53194153", "0.53121555", "0.52866864", "0.52866864", "0.5220344", "0.5208627", "0.5206484", "0.52060467", "0.51516855", "0.5127545", "0.51233625", "0.51138514", "0.510...
0.71045315
0
/ Private functions Compare geometry between current slice and new one, and return true if there are new, removed or moved nodes
Приватные функции сравнения геометрии между текущим срезом и новым, и возвращение значения true, если есть новые, удаленные или перемещенные узлы
function _is_geometry_modified($old_slice, $new_slice) { $old_nodes_ids = array_keys($old_slice['nodes']); $new_nodes_ids = array_keys($new_slice['nodes']); if ($old_nodes_ids != $new_nodes_ids) return true; foreach ($new_slice['nodes'] as $node) { if (isset($nod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_modified_within_boundary_coordinates(&$arr_old_gff_structure, &$arr_new_gff_structure, &$arr_new_overlapping, &$arr_new_statistics_results)\n{\n\tglobal $output_dir;\n\t\n\t$fp = fopen($output_dir.'modified_within_boundary_coordinates.txt', 'w');\n\tfputs($fp, \"Old Gene ID\\tOld mRNA ID\\tNew Gene ...
[ "0.56092876", "0.5604486", "0.5013991", "0.49281737", "0.4835876", "0.47674555", "0.47667822", "0.47385094", "0.47384098", "0.47344375", "0.4703204", "0.46691337", "0.46588728", "0.46458504", "0.4638207", "0.46221644", "0.4617388", "0.46152735", "0.45911002", "0.45781046", "0...
0.8110764
0
Compare attributes between current slice and new one and return true if they are changed
Сравнить атрибуты между текущим срезом и новым и вернуть true, если они изменены
function _are_attrs_modified($old_slice, $new_slice) { return $old_slice['index'] != $new_slice['index']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _is_geometry_modified($old_slice, $new_slice) {\n $old_nodes_ids = array_keys($old_slice['nodes']);\n $new_nodes_ids = array_keys($new_slice['nodes']);\n if ($old_nodes_ids != $new_nodes_ids)\n return true;\n\n foreach ($new_slice['nodes'] as $node) {\n if...
[ "0.7185917", "0.6251031", "0.6160695", "0.61353433", "0.6009403", "0.59498113", "0.5917736", "0.5796175", "0.5636704", "0.5621134", "0.5607396", "0.5585012", "0.5546346", "0.5479483", "0.54790103", "0.54760325", "0.53969514", "0.53805023", "0.5357492", "0.5357492", "0.535254"...
0.85372967
0
Show page to add plan
Показать страницу для добавления плана
function show_plan_add() { //must check that the user has the required capability if (!current_user_can('manage_options')) { csm_error('You do not have sufficient permissions to access this page', true); } $CsmWorkplace = new CsmWorkplace(); $workplaces = $CsmWorkplace->all(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Plan $plan)\n {\n //\n }", "public function create()\n {\n $this->authorize('create', Plan::class);\n\n return view('admin.plans.create');\n \n }", "function Add()\n\t{\n\t\t// Check user authorization and permissions\n\t\tAuthenticatedUser()->CheckA...
[ "0.70857006", "0.6947924", "0.6889382", "0.6888037", "0.6879833", "0.68606323", "0.6805345", "0.6801484", "0.6725243", "0.6701759", "0.66889447", "0.668482", "0.66089064", "0.6578697", "0.6560481", "0.6541153", "0.6518057", "0.651301", "0.64600694", "0.6444025", "0.6432404", ...
0.8116119
0
Displays a form to edit an existing Areas entity.
Показывает форму для редактирования существующего сущности Areas.
public function editAction(Request $request, Areas $area) { $deleteForm = $this->createDeleteForm($area); $editForm = $this->createForm(new AreasType(), $area); $editForm->handleRequest($request); if ($editForm->isSubmitted() && $editForm->isValid()) { $em = $this->getDo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SystemAdministracionBundle:Area')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Area entity.');\n }\n\n $editFo...
[ "0.712376", "0.69552", "0.6949878", "0.68527055", "0.68223554", "0.6780346", "0.67749166", "0.67612976", "0.6724525", "0.6691644", "0.6690123", "0.66662645", "0.66211045", "0.65894043", "0.65347636", "0.65121734", "0.64862573", "0.6476402", "0.644429", "0.6425986", "0.640602"...
0.7168441
0
Deletes a Areas entity.
Удаляет сущность Areas.
public function deleteAction(Request $request, Areas $area) { $form = $this->createDeleteForm($area); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->remove($area); $em->flush(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Ola_Service_Area::get($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '信息不存在无法删除');\n\t\t$ret = Ola_Service_Area::delete($id);\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public funct...
[ "0.63814676", "0.63563365", "0.61273146", "0.60764915", "0.5915231", "0.58545667", "0.57385015", "0.5690103", "0.5665348", "0.564692", "0.56063527", "0.5582438", "0.55703354", "0.55703354", "0.55533195", "0.5550225", "0.5532317", "0.55297863", "0.54417086", "0.5441612", "0.54...
0.70883316
0
Creates a form to delete a Areas entity.
Создает форму для удаления сущности Areas.
private function createDeleteForm(Areas $area) { return $this->createFormBuilder() ->setAction($this->generateUrl('areas_delete', array('id' => $area->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(AreaIn $areaIn)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('areain_delete', array('id' => $areaIn->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteAction(Request ...
[ "0.6668875", "0.66219974", "0.63232565", "0.6262841", "0.60605025", "0.60346985", "0.5823476", "0.57863617", "0.5777309", "0.5716748", "0.5716748", "0.57143867", "0.5712773", "0.56865996", "0.5683738", "0.56632346", "0.56431085", "0.5642945", "0.5627943", "0.5603972", "0.5592...
0.7431963
1
Returns the view script file according to the specified view name. This method must be implemented by child classes.
Возвращает файл скрипта представления в соответствии с указанным именем представления. Этот метод должен быть реализован производными классами.
abstract public function getViewFile($viewName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getViewFile($viewName)\n { // Try the template specific path first\n $path = APPLICATION_PATH.$this->_paths['pkg_template'].'/html/'.$viewName.'.php';\n if( file_exists($path) ) return $path;\n // Next try the domain common path\n $path = APPLICATION_PATH.$this->_pa...
[ "0.75349396", "0.74879557", "0.73721737", "0.73449284", "0.70940197", "0.7065232", "0.7030948", "0.70091444", "0.681861", "0.67615795", "0.6681979", "0.6592434", "0.6586072", "0.6557763", "0.6549251", "0.65326893", "0.6501429", "0.6495065", "0.64691305", "0.64680374", "0.6456...
0.79881114
0
Function to show recommended products.
Функция для отображения рекомендуемых продуктов.
public function show_recommended_products() { $submission_id = isset( $_GET['fitts_submission'] ) ? $_GET['fitts_submission'] : ''; if ( $submission_id ) { $product_ids = get_post_meta( $submission_id, 'linked_products', true ); include FQ_PLUGIN_DIR . '/template/fitts-recommended-products.php'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRecommendedProduct()\n {\n $this->db->connect();\n $sql = \"SELECT * FROM $this->table WHERE recommended = 'yes' LIMIT 4;\";\n $product = $this->db->executeFetchAll($sql);\n return $product;\n }", "public static function run()\n\t{\n\t\tCModule::IncludeModule(...
[ "0.73814857", "0.6851395", "0.6610771", "0.6533254", "0.6483197", "0.6369647", "0.6263584", "0.62245834", "0.61768585", "0.61299616", "0.6122898", "0.60707146", "0.6067836", "0.60244024", "0.59752125", "0.5973554", "0.5966214", "0.59563124", "0.59499234", "0.5946713", "0.5943...
0.80839884
0
TODO: Implement volume() method.
TODO: Реализовать метод volume().
public function volume() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getVolume(){\n\t\t\treturn $this->volume;\n\t\t}", "public function getVolume()\n {\n return $this->volume;\n }", "public function getVolume()\n {\n return $this->volume;\n }", "public function getVolume()\n {\n return $this->volume;\n }", "public f...
[ "0.80870134", "0.79549146", "0.79549146", "0.79549146", "0.7856379", "0.78178436", "0.7248692", "0.70278335", "0.6985063", "0.69067246", "0.68585974", "0.68585974", "0.681665", "0.6772636", "0.67536324", "0.66501737", "0.6613967", "0.6592869", "0.6573536", "0.65592927", "0.65...
0.87127113
0
TODO: Implement channel() method.
TODO: Реализовать метод channel().
public function channel() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChannel();", "public function getChannel()\n {\n \treturn $this->_channel;\n }", "function channel(): Channel\n {\n return new Channel();\n }", "public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}", "public function getChannel()\n {\n return...
[ "0.7598522", "0.7089683", "0.6903604", "0.666988", "0.6665844", "0.6665844", "0.6620681", "0.65891635", "0.6586895", "0.6555076", "0.6555076", "0.65200317", "0.6499023", "0.6438085", "0.6438085", "0.6435979", "0.6435979", "0.6435979", "0.64291376", "0.64069474", "0.64069474",...
0.8622827
0
This function is designed to delete an event in the DB Also, there is 3 way of delete an event, just one event, event and all recurrence or event and the following recurrence
Эта функция предназначена для удаления события в БД. Также существует 3 способа удаления события: просто одно событие, событие и все его повторения или событие и последующие повторения
function deleteEvent($eventToDelete, $userID){ $date = $eventToDelete["date"]; require_once 'model/dbConnector.php'; //supprimer uniquement l'event choisi if($eventToDelete["sup"] != ""){ if($eventToDelete["recurrence"] != 0){ $suppQuery2='DELETE from `event-recurrence` where ID = :id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(Event $event){\r\n $stmt = $this->db->prepare(\"DELETE FROM event WHERE id_event = ?\");\r\n $stmt->execute(array($event->getIdEvent()));\r\n }", "function delete(){\n\t\t$eventDet = $this->get_full_details();\n\t\t//print_r($eventDet);\n\t\t#unlink all images for the even...
[ "0.7520369", "0.7474163", "0.7442826", "0.7293244", "0.72257155", "0.71161056", "0.7093666", "0.7026196", "0.6948667", "0.69341284", "0.69156194", "0.6903716", "0.6868699", "0.6798866", "0.6797631", "0.679548", "0.6793936", "0.67721915", "0.67447764", "0.67331535", "0.6726091...
0.8098476
0
Get the value of Genre
Получить значение Жанр
public function getGenre() { return $this->genre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGenre() {\n\t\treturn $this->genre;\n\t}", "public function getGenre()\n {\n return $this->genre;\n }", "public function getGenre(){\n return $this->film['genre'];\n }", "public function get_genre_data() {\r\n\t\t// $this->bindData(':id', $this->id);\...
[ "0.76453835", "0.7643427", "0.76367605", "0.75697863", "0.7547735", "0.74208164", "0.7349273", "0.7322902", "0.72011715", "0.71776855", "0.67635566", "0.6571192", "0.65336186", "0.643217", "0.6392674", "0.61857903", "0.61857903", "0.6094439", "0.60613906", "0.6047972", "0.599...
0.76567787
1
Delete all users created by this admin.
Удалить всех пользователей, созданных этим администратором.
public function deleting(Admin $admin){ $admin->users()->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n foreach ($this->users as $user) {\n $uid = $user->id;\n // delete whole website info for this user\n if ((bool)$this->delete) {\n $model = new FormUserClear($user);\n $model->comments = true;\n $m...
[ "0.6981973", "0.6894945", "0.68892103", "0.67619836", "0.66491115", "0.66394347", "0.64766854", "0.6468062", "0.6355584", "0.6330726", "0.6281295", "0.62556976", "0.6219441", "0.62110484", "0.62044436", "0.62044436", "0.6178828", "0.6131547", "0.6067356", "0.604553", "0.60350...
0.70894337
0
Returns a plain text comma separated version of the User object fields.
Возвращает plain text, разделенный запятыми, версию полей объекта User.
public function __toString() { $result = $this->firstName.','.$this->lastName.','.$this->email; if( ! is_null($this->dob ) ) $result .= ','.$this->dob; if( ! is_null($this->address ) ) $result .= ','.$this->address; return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getListOfUserFields()\n {\n // so, list needs to be manually updated\n return array(\n \"morgid\",\n \"garageid\",\n \"talkid\",\n \"username\",\n \"password\",\n \"joindate\",\n \"title\",\n ...
[ "0.70401895", "0.66467416", "0.64090735", "0.63803375", "0.6353267", "0.6291328", "0.62888396", "0.6266977", "0.62425905", "0.6208805", "0.6199258", "0.61859035", "0.6180284", "0.6107673", "0.609278", "0.6091067", "0.60678226", "0.60310704", "0.6021653", "0.6018813", "0.59993...
0.71219
0
Check if the model user has an active subscription in any possible state.
Проверьте, имеет ли пользователь модели активную подписку в любом возможном состоянии.
public function hasActiveSubscription() { return $this->user->hasActiveSubscription(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSubscribed()\n {\n // TODO there seems to be an inconsistency when getting database records via Repository or via ObjectStorage\n // TODO when getting via Repository, a Typo3bb-FrontendUser is returned\n // TODO when getting via ObjectStorage, IglarpTemplate-FrontendUser i...
[ "0.73468703", "0.7319958", "0.722272", "0.7167508", "0.71594024", "0.71397966", "0.70403314", "0.68402034", "0.6808184", "0.6744532", "0.65573853", "0.6548056", "0.6541174", "0.6499476", "0.6490898", "0.64684933", "0.6451243", "0.6421547", "0.6411095", "0.6407608", "0.6399286...
0.842291
0
select() Selects given values from the given table with given conditions. Return false if table name or values to be selected are not supplied
select() Выбирает указанные значения из указанной таблицы с указанными условиями. Возвращает false, если не указано имя таблицы или значения для выбора
public function select($table = NULL, $values = NULL, $condition = 1, $db = 'DB', $fetch = 'fetch') { if($table == NULL || $values == NULL) return false; $this->$db(); $values = implode(',', $values); $sql = "SELECT $values FROM $table WHERE $condition"; $query = $this->$db->prepare($sql); $query->execu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function select($table,$conditions = array()){\r\n\r\n $sql = 'SELECT *'; \r\n $sql .= ' FROM '.$table;\r\n\r\n if(is_array($conditions) && count($conditions)>0){\r\n $sql .= ' WHERE ';\r\n $i = 0;\r\n foreach($conditions as $key => $value){\r\n ...
[ "0.7180524", "0.70709026", "0.7036844", "0.68697083", "0.6825295", "0.6822715", "0.68168175", "0.6807925", "0.6760085", "0.6662381", "0.66144186", "0.6584236", "0.6582119", "0.65642697", "0.6564258", "0.65421486", "0.65089124", "0.64817584", "0.64738494", "0.64563936", "0.640...
0.72456175
0
add modified date meta box
добавить мета-ящик с датой последнего изменения
function myplugin_add_meta_box() { add_meta_box( 'mod_date', 'Last modified on: ', 'modified_callback', 'location', 'side','high'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_date_meta_box() {\n\n\t\t add_meta_box(\n\t\t \t'the_date',\n\t\t \t__( 'Fixture End Date', 'wp-jquery-date-picker' ),\n\t\t \tarray( $this, 'the_date_display' ),\n\t\t \t'post',\n\t\t \t'side',\n\t\t \t'high'\n\t\t );\n\n\t }", "function lwr_project_dates_meta_box(){\n\t\tglobal $post;\n\t\t...
[ "0.7475714", "0.7399335", "0.6991318", "0.6864978", "0.6692458", "0.6646037", "0.6583803", "0.6581766", "0.6579723", "0.6534159", "0.6510936", "0.65076965", "0.64887273", "0.64728385", "0.6460214", "0.64505184", "0.6441436", "0.6434263", "0.6426823", "0.6410927", "0.6381042",...
0.85222274
0
Function to update a user's company profile information May 03,2016
Функция для обновления информации о профиле компании пользователя 03 мая 2016 года
function updateMyCompanyDetails() { $data= array(); $company_categories=array(); $session_values=get_user_session(); $my_session_id = $session_values['id']; $role = getUserDesignationFromCompUserRelation($my_session_id); $companyName =validate_input($_POST['companyName']); $companyDesc =validate_input($_P...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateProfile($data) {\n $this->db->query(\"UPDATE \" . DB_PREFIX . \"wkpos_user SET firstname = '\" . $data['firstname'] . \"', lastname = '\" . $data['lastname'] . \"', email = '\" . $data['account_email'] . \"', username = '\" . $data['username'] . \"', salt = '\" . $this->db->escape($salt = ...
[ "0.6787035", "0.6774105", "0.6774105", "0.6742759", "0.66606784", "0.6576354", "0.6559902", "0.6553805", "0.6551465", "0.65273994", "0.6515952", "0.65147895", "0.64755446", "0.646429", "0.6464038", "0.6453148", "0.6448789", "0.643997", "0.6425489", "0.6412558", "0.63814706", ...
0.7145978
0
Function to get the owners of an object Returns FALSE if an error occurred, TRUE otherwise Input: $object: a WOVOML object $developer: a boolean to tell whether the loader is a developer (TRUE = developer) $user_upload: an array of name and id of users for whom the loader can upload data Output: $owners: an array of ow...
Функция для получения владельцев объекта Возвращает FALSE, если произошла ошибка, TRUE в противном случае Вход: $object: объект WOVOML $developer: булево значение, указывающее, является ли загрузчик разработчиком (TRUE = разработчик) $user_upload: массив имен и идентификаторов пользователей, которым загрузчик может заг...
function v1_get_owners($object, &$error) { // XML functions require_once "php/funcs/xml_funcs.php"; // DB functions require_once "php/funcs/db_funcs.php"; // Static list of owners.. to reset owners-array when first called static $owners_list=array(); // Global list of general owners global $gen_owners, $deve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_set_owners(&$object) {\n\t\n\t// Global list of general owners\n\tglobal $gen_owners;\n\t\n\t// Loop on owners\n\tforeach ($gen_owners as $owners) {\n\t\tif (!empty($owners)) {\n\t\t\t$object['results']['owners']=$owners;\n\t\t\treturn TRUE;\n\t\t}\n\t}\n\t\n\treturn FALSE;\n}", "public function isOw...
[ "0.7093751", "0.56178045", "0.56120723", "0.55291754", "0.5353885", "0.53381824", "0.53164", "0.5286507", "0.5261158", "0.5134931", "0.5124267", "0.5113553", "0.50935185", "0.50424427", "0.49909574", "0.49797228", "0.4975653", "0.49670893", "0.49663982", "0.4953095", "0.49415...
0.8208629
0
Function to store the final owners of an object Returns FALSE if no owner found, TRUE otherwise InOutput: $object: a WOVOML object
Функция для хранения окончательных владельцев объекта Возвращает FALSE, если владелец не найден, и TRUE в противном случае Вход: $object: объект WOVOML
function v1_set_owners(&$object) { // Global list of general owners global $gen_owners; // Loop on owners foreach ($gen_owners as $owners) { if (!empty($owners)) { $object['results']['owners']=$owners; return TRUE; } } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_get_owners($object, &$error) {\n\n\t// XML functions\n\trequire_once \"php/funcs/xml_funcs.php\";\n\t// DB functions\n\trequire_once \"php/funcs/db_funcs.php\";\n\t// Static list of owners.. to reset owners-array when first called\n\tstatic $owners_list=array();\n\t\n\t// Global list of general owners\...
[ "0.6498519", "0.59576565", "0.57457465", "0.5706316", "0.56654704", "0.5541058", "0.5507647", "0.54143333", "0.541146", "0.537897", "0.5371938", "0.5356022", "0.534551", "0.53322923", "0.52948", "0.5294446", "0.528427", "0.5276004", "0.52521765", "0.52179354", "0.5208248", ...
0.74817604
0
Function to get the vd_id of an object Returns FALSE if an error occurred, TRUE otherwise Input: $object: a WOVOML object Output: $error: an error message and its code
Функция для получения vd_id объекта Возвращает FALSE, если произошла ошибка, и TRUE в противном случае Вход: $object: объект WOVOML Выход: $error: сообщение об ошибке и её код
function v1_get_vd_id($object, &$error) { // XML functions require_once "php/funcs/xml_funcs.php"; // DB functions require_once "php/funcs/db_funcs.php"; // Static list of volcanoes static $volcanoes_list=array(); // Global list of general vd_ids global $gen_vd_ids; // Prepare result $vd_id=NULL; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_set_vd_id(&$object) {\n\t\n\t// Global list of general vd_ids\n\tglobal $gen_vd_ids;\n\t\n\t// Prepare result\n\t$object['results']['vd_id']=NULL;\n\t\n\t// Loop on vd_ids\n\tforeach ($gen_vd_ids as $vd_id) {\n\t\tif (!empty($vd_id)) {\n\t\t\t$object['results']['vd_id']=$vd_id;\n\t\t\treturn TRUE;\n\t\...
[ "0.6818025", "0.6529132", "0.63091576", "0.60386145", "0.5991576", "0.5983483", "0.59154266", "0.59154266", "0.59106874", "0.5900101", "0.5734088", "0.57325476", "0.57311136", "0.5673262", "0.56723124", "0.56695193", "0.5662194", "0.56593275", "0.56023926", "0.55262387", "0.5...
0.74973977
0
Function to store the final vd_id of an object Returns FALSE if no vd_id found, TRUE otherwise InOutput: $object: a WOVOML object
Функция для хранения окончательного vd_id объекта Возвращает FALSE, если не найден vd_id, и TRUE в противном случае Вход: $object: объект WOVOML
function v1_set_vd_id(&$object) { // Global list of general vd_ids global $gen_vd_ids; // Prepare result $object['results']['vd_id']=NULL; // Loop on vd_ids foreach ($gen_vd_ids as $vd_id) { if (!empty($vd_id)) { $object['results']['vd_id']=$vd_id; return TRUE; } } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_get_vd_id($object, &$error) {\n\t\n\t// XML functions\n\trequire_once \"php/funcs/xml_funcs.php\";\n\t\n\t// DB functions\n\trequire_once \"php/funcs/db_funcs.php\";\n\t\n\t// Static list of volcanoes\n\tstatic $volcanoes_list=array();\n\t\n\t// Global list of general vd_ids\n\tglobal $gen_vd_ids;\n\t\...
[ "0.6711781", "0.5849021", "0.58338046", "0.56262535", "0.560335", "0.5576615", "0.55532277", "0.545771", "0.54269844", "0.54058546", "0.54058546", "0.53071845", "0.5300018", "0.52934384", "0.52918875", "0.52682924", "0.52560574", "0.5253801", "0.52422804", "0.52383953", "0.52...
0.72036344
0
Function to get the eruption code of an object Returns nothing Input: $object: a WOVOML object
Функция для получения кода извержения объекта Возвращает ничего Вход: $object: объект WOVOML
function v1_get_eruption($object) { // XML functions require_once "php/funcs/xml_funcs.php"; // Global list of eruptions global $gen_eruptions; // Get code $ed_code=xml_get_att($object, "ERUPTION"); // Store eruption in list array_unshift($gen_eruptions, $ed_code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventId($obj)\n {\n if ($obj->numero && $obj->evento) {\n $code = $obj->numero;\n $date = $obj->evento->data;\n $hour = $obj->evento->hora;\n $type = $obj->evento->tipo;\n return \"{$code}::{$date}{$hour}::{$type}\";\n }\n ...
[ "0.56352955", "0.54847944", "0.5426303", "0.5380075", "0.5329214", "0.53188056", "0.52913934", "0.5240285", "0.52116656", "0.52116656", "0.5203496", "0.5156634", "0.51111555", "0.5089876", "0.5060554", "0.504849", "0.5034207", "0.50257534", "0.50236017", "0.50223345", "0.5010...
0.7041621
0
Function to get the phase code of an object Returns nothing Input: $object: a WOVOML object
Функция для получения кода фазы объекта Возвращает ничего Вход: $object: объект WOVOML
function v1_get_phase($object) { // XML functions require_once "php/funcs/xml_funcs.php"; // Global list of eruptions global $gen_phases; // Get code $ed_phs_code=xml_get_att($object, "PHASE"); // Store eruption in list array_unshift($gen_phases, $ed_phs_code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getPhase(): string;", "public function getPhase() {\n return $this->phase;\n }", "public function getCodePhase(): ?string {\n return $this->codePhase;\n }", "function runkit_object_id($obj) : int {\n}", "function v1_set_phase(&$object, $ed_xxx_name, $ed_xxx_c...
[ "0.6338494", "0.59096456", "0.5586356", "0.5322113", "0.5319018", "0.51767814", "0.5160931", "0.5124398", "0.49708945", "0.485398", "0.48370382", "0.48098803", "0.48032272", "0.4764337", "0.47466952", "0.47320855", "0.47199702", "0.47147247", "0.4642573", "0.46375036", "0.461...
0.7925313
0
Function to get the publish date of an object Returns nothing Input: $object: a WOVOML object
Функция для получения даты публикации объекта Возвращает ничего Вход: $object: объект WOVOML
function v1_get_pubdate($object) { // XML functions require_once "php/funcs/xml_funcs.php"; // Global list of general publish dates global $gen_pubdates; $pubdate=xml_get_att($object, "PUBDATE"); // Store pubdate in list array_unshift($gen_pubdates, $pubdate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublishDateFrom();", "function get_published_date($meta_object,$time){\n $date2 = \"\";\n \n for($i=0;$i<$meta_object->length;$i++){\n $meta = $meta_object->item($i);\n if($meta->getAttribute('property')==\"article:published_time\"){\n $date = $meta->getAttribute('content...
[ "0.70573896", "0.6828094", "0.6731784", "0.6709065", "0.6608466", "0.65008974", "0.6423165", "0.63973296", "0.6394426", "0.632713", "0.63214505", "0.62598765", "0.61719453", "0.6134984", "0.6121584", "0.61199135", "0.60776615", "0.60532695", "0.60431474", "0.6007708", "0.5998...
0.7656864
0
Function to store the final publish date of an object Returns nothing Input: $data_time: the data time(s) $current_time: the current time InOutput: $object: a WOVOML object
Функция для хранения окончательной даты публикации объекта Возвращает ничего Вход: $data_time: время данных $current_time: текущее время Вывод: $object: объект WOVOML
function v1_set_pubdate($data_time, $current_time, &$object) { // Global list of general publish dates global $gen_pubdates; // Prepare result $selected_pubdate=NULL; // Loop on local pubdates foreach ($gen_pubdates as $local_pubdate) { if (!empty($local_pubdate)) { $selected_pubdate=$local_pubdate; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_calculate_pubdate($local_pubdate, $data_time, $current_time) {\n\t\n\t// Loop on data time\n\t$selected_time=NULL;\n\tforeach ($data_time as $time) {\n\t\tif (empty($time)) {\n\t\t\tcontinue;\n\t\t}\n\t\t$selected_time=$time;\n\t\tbreak;\n\t}\n\t\n\t// If no data time\n\tif (empty($selected_time)) {\n\...
[ "0.61073095", "0.5870074", "0.57460076", "0.5735867", "0.56562877", "0.56299406", "0.56156504", "0.55512166", "0.5528594", "0.5448093", "0.53579205", "0.5299476", "0.5298023", "0.5288434", "0.5269305", "0.52581894", "0.5245575", "0.52392477", "0.521655", "0.5208655", "0.52040...
0.7854908
0
Function to calculate the final publish date of an object Returns the calculated publish date Input: $local_pubdate: the publish date stated by the user $data_time: the data time(s) $current_time: the current time
Функция для вычисления окончательной даты публикации объекта Возвращает вычисленную дату публикации Вход: $local_pubdate: дата публикации, указанная пользователем $data_time: временные метки данных $current_time: текущее время
function v1_calculate_pubdate($local_pubdate, $data_time, $current_time) { // Loop on data time $selected_time=NULL; foreach ($data_time as $time) { if (empty($time)) { continue; } $selected_time=$time; break; } // If no data time if (empty($selected_time)) { // Select current time $selected_ti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_set_pubdate($data_time, $current_time, &$object) {\n\t\n\t// Global list of general publish dates\n\tglobal $gen_pubdates;\n\t\n\t// Prepare result\n\t$selected_pubdate=NULL;\n\t\n\t// Loop on local pubdates\n\tforeach ($gen_pubdates as $local_pubdate) {\n\t\tif (!empty($local_pubdate)) {\n\t\t\t$selec...
[ "0.78136885", "0.57842124", "0.57024944", "0.56870365", "0.5641619", "0.5581986", "0.55749047", "0.55620146", "0.5548665", "0.5425631", "0.54059404", "0.54057026", "0.5400608", "0.5387473", "0.53697443", "0.5365572", "0.53256327", "0.5309987", "0.5223133", "0.52108055", "0.52...
0.77089536
1
Function to get the ID for a certain code in a certain table Returns the ID Input: $table: the table name in the database $code: the code to search $owners: an array of owners
Функция для получения ID для определенного кода в определенной таблице Возвращает ID Вход: $table: имя таблицы в базе данных $code: код для поиска $owners: массив владельцев
function v1_get_id($table, $code, $owners) { // Connect to DB include "php/include/db_connect.php"; // If parameters are empty if (empty($table) || empty($code) || empty($owners)) { return NULL; } $table_name=mysql_real_escape_string($table); // Create SQL query $sql="SELECT ".$table_name."_id FROM ".$t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_get_id_ms($table, $code, $stime, $owners) {\n\n\t// Connect to DB\n\tinclude \"php/include/db_connect.php\";\n\t\n\t// If parameters are empty\n\tif (empty($table) || empty($code) || empty($owners)) {\n\t\treturn NULL;\n\t}\n\tif (empty($stime)) {\n\t\t$stime=\"0000-00-00 00:00:00\";\n\t}\n\t$table_nam...
[ "0.746118", "0.7312831", "0.7241959", "0.7005083", "0.69160384", "0.6250668", "0.5890267", "0.5842141", "0.58035755", "0.57381034", "0.57293826", "0.5608992", "0.5594518", "0.55692714", "0.5568596", "0.5549703", "0.5545429", "0.5527008", "0.5500834", "0.5444526", "0.5412791",...
0.8778835
0
Function to get the ID for a certain code in a certain table Returns the ID Input: $table: the table name in the database $code: the code to search $owners: an array of owners
Функция для получения ID для определенного кода в определенной таблице Возвращает ID Вход: $table: имя таблицы в базе данных $code: код для поиска $owners: массив владельцев
function v1_get_id_ms($table, $code, $stime, $owners) { // Connect to DB include "php/include/db_connect.php"; // If parameters are empty if (empty($table) || empty($code) || empty($owners)) { return NULL; } if (empty($stime)) { $stime="0000-00-00 00:00:00"; } $table_name=mysql_real_escape_string($table)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_get_id($table, $code, $owners) {\n\t// Connect to DB\n\tinclude \"php/include/db_connect.php\";\n\t\n\t// If parameters are empty\n\tif (empty($table) || empty($code) || empty($owners)) {\n\t\treturn NULL;\n\t}\n\t\n\t$table_name=mysql_real_escape_string($table);\n\t\n\t// Create SQL query\n\t$sql=\"SE...
[ "0.8778835", "0.7312831", "0.7241959", "0.7005083", "0.69160384", "0.6250668", "0.5890267", "0.5842141", "0.58035755", "0.57381034", "0.57293826", "0.5608992", "0.5594518", "0.55692714", "0.5568596", "0.5549703", "0.5545429", "0.5527008", "0.5500834", "0.5444526", "0.5412791"...
0.746118
1
Function to insert data in the database and record undo file Returns FALSE if an error occurred, TRUE otherwise Input: $undo_file_pointer: a pointer to the undo file $insert_table: the name of the table in database $field_name: an array of field names $field_value: an array of field values $upload_to_db: a boolean whet...
Функция для вставки данных в базу данных и записи файла отката. Возвращает FALSE, если произошла ошибка, и TRUE в противном случае. Вход: $undo_file_pointer: указатель на файл отката $insert_table: имя таблицы в базе данных $field_name: массив имен полей $field_value: массив значений полей $upload_to_db: булевое значен...
function v1_insert($undo_file_pointer, $insert_table, $field_name, $field_value, $upload_to_db, &$last_insert_id, &$error) { // DB functions require_once "php/funcs/db_funcs.php"; // Send query to database $last_insert_id=0; $local_error=""; if (!db_insert($insert_table, $field_name, $field_value, !$upload_to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_delete($undo_file_pointer, $delete_table, $select_field_name, $where_field_name, $where_field_value, $logical, $upload_to_db, &$error) {\n\t\n\t// DB functions\n\trequire_once \"php/funcs/db_funcs.php\";\n\t\n\t// Store old values in \"undowovoml\" before deleting them (if not a simulation)\n\tif ($upl...
[ "0.69679624", "0.6527116", "0.63073516", "0.6000727", "0.5936643", "0.5917423", "0.58019614", "0.5788831", "0.57854056", "0.57428414", "0.5742752", "0.5687111", "0.56786877", "0.5648071", "0.5635632", "0.56176126", "0.5589289", "0.55766296", "0.5569813", "0.5538996", "0.55333...
0.88239896
0
Function to update data in the database and record undo file Returns FALSE if an error occurred, TRUE otherwise Input: $undo_file_pointer: a pointer to the undo file $update_table: the name of the table in database $field_name: an array of field names $field_value: an array of field values $where_field_name: an array o...
Функция для обновления данных в базе данных и записи файла отката Возвращает FALSE, если произошла ошибка, TRUE в противном случае Вход: $undo_file_pointer: указатель на файл отката $update_table: имя таблицы в базе данных $field_name: массив имен полей $field_value: массив значений полей $where_field_name: массив имен...
function v1_update($undo_file_pointer, $update_table, $field_name, $field_value, $where_field_name, $where_field_value, $upload_to_db, &$error) { // DB functions require_once "php/funcs/db_funcs.php"; // Store old values in "undowovoml" before updating them (if not a simulation) if ($upload_to_db) { // Send "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_delete($undo_file_pointer, $delete_table, $select_field_name, $where_field_name, $where_field_value, $logical, $upload_to_db, &$error) {\n\t\n\t// DB functions\n\trequire_once \"php/funcs/db_funcs.php\";\n\t\n\t// Store old values in \"undowovoml\" before deleting them (if not a simulation)\n\tif ($upl...
[ "0.72376275", "0.7206381", "0.6100824", "0.60797995", "0.60570157", "0.60130286", "0.5855024", "0.5845015", "0.5824921", "0.581041", "0.5799823", "0.5757575", "0.56667286", "0.5652485", "0.56390774", "0.56314474", "0.56288344", "0.5625816", "0.5617796", "0.56038755", "0.55991...
0.8297899
0
Function to update data in the database and record undo file Returns FALSE if an error occurred, TRUE otherwise Input: $undo_file_pointer: a pointer to the undo file $delete_table: the name of the table in database $select_field_name: an array of field names $where_field_name: an array of field names $where_field_value...
Функция для обновления данных в базе данных и записи файла отката. Возвращает FALSE, если произошла ошибка, и TRUE в противном случае. Вход: $undo_file_pointer: указатель на файл отката $delete_table: имя таблицы в базе данных $select_field_name: массив имен полей $where_field_name: массив имен полей $where_field_value...
function v1_delete($undo_file_pointer, $delete_table, $select_field_name, $where_field_name, $where_field_value, $logical, $upload_to_db, &$error) { // DB functions require_once "php/funcs/db_funcs.php"; // Store old values in "undowovoml" before deleting them (if not a simulation) if ($upload_to_db) { // Sen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v1_update($undo_file_pointer, $update_table, $field_name, $field_value, $where_field_name, $where_field_value, $upload_to_db, &$error) {\n\t\n\t// DB functions\n\trequire_once \"php/funcs/db_funcs.php\";\n\t\n\t// Store old values in \"undowovoml\" before updating them (if not a simulation)\n\tif ($upload...
[ "0.7767104", "0.7401132", "0.6440619", "0.5898695", "0.58561295", "0.5832964", "0.5738624", "0.5714302", "0.5693727", "0.5678163", "0.5666174", "0.55656993", "0.5564028", "0.55148256", "0.55119824", "0.5461017", "0.54521024", "0.5440748", "0.54228246", "0.54165894", "0.541145...
0.8062945
0
Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT. (cryptoKeyVersions.asymmetricDecrypt)
Расшифровывает данные, которые были зашифрованы с помощью открытого ключа, полученного из GetPublicKey, соответствующего CryptoKeyVersion с CryptoKey.purpose ASYMMETRIC_DECRYPT. (cryptoKeyVersions.asymmetricDecrypt)
public function asymmetricDecrypt($name, AsymmetricDecryptRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('asymmetricDecrypt', [$params], AsymmetricDecryptResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _decryptAsymmetric($encData, $alias, $password, $options)\n {\n $data = '';\n \n // use the private getKey method to retrieve decrypted private key\n $key = $this->_getKey($alias, $password);\n if ($key != null) {\n if (!openssl_private_decrypt($encData...
[ "0.67451626", "0.6635355", "0.6606601", "0.6537171", "0.65231764", "0.63651896", "0.62655824", "0.626095", "0.62505037", "0.6229983", "0.6199727", "0.6176002", "0.61392605", "0.6113998", "0.6062783", "0.60514605", "0.6035984", "0.60115755", "0.60034364", "0.5974895", "0.59722...
0.70942974
0
Create a new CryptoKeyVersion in a CryptoKey. The server will assign the next sequential id. If unset, state will be set to ENABLED. (cryptoKeyVersions.create)
Создайте новый CryptoKeyVersion в CryptoKey. Сервер назначит следующий последовательный идентификатор. Если не указано, состояние будет установлено в ENABLED. (cryptoKeyVersions.create)
public function create($parent, CryptoKeyVersion $postBody, $optParams = []) { $params = ['parent' => $parent, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('create', [$params], CryptoKeyVersion::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enable_key_version(\n string $projectId = 'my-project',\n string $locationId = 'us-east1',\n string $keyRingId = 'my-key-ring',\n string $keyId = 'my-key',\n string $versionId = '123'\n) {\n $client = new KeyManagementServiceClient();\n\n // Build the key version name.\n $keyVersio...
[ "0.64437425", "0.5628423", "0.54430383", "0.5325857", "0.53258467", "0.5242594", "0.51609343", "0.5079803", "0.50160944", "0.501339", "0.49556783", "0.4941133", "0.49215716", "0.4906837", "0.48916286", "0.48680398", "0.48399907", "0.48303866", "0.4772426", "0.4769952", "0.476...
0.761522
0
Import wrapped key material into a CryptoKeyVersion. All requests must specify a CryptoKey. If a CryptoKeyVersion is additionally specified in the request, key material will be reimported into that version. Otherwise, a new version will be created, and will be assigned the next sequential id within the CryptoKey. (cryp...
Импорт зашифрованного ключа в CryptoKeyVersion. Все запросы должны указывать CryptoKey. Если в запросе дополнительно указан CryptoKeyVersion, ключ будет переимпортирован в эту версию. В противном случае будет создана новая версия, и ей будет присвоен следующий по порядку идентификатор в рамках CryptoKey. (cryptoKeyVers...
public function import($parent, ImportCryptoKeyVersionRequest $postBody, $optParams = []) { $params = ['parent' => $parent, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('import', [$params], CryptoKeyVersion::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function importKey($keyId, $request)\n {\n return $this->start()->uri(\"/api/key/import\")\n ->urlSegment($keyId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "function enable_key_version(\n string $projectId = 'my-project',\n string $loc...
[ "0.6115118", "0.57069117", "0.5370071", "0.5105726", "0.50283813", "0.45066917", "0.43890554", "0.43507928", "0.43014774", "0.42615476", "0.42362934", "0.42361125", "0.42309824", "0.41981733", "0.41423762", "0.41065806", "0.4091408", "0.40573445", "0.40469536", "0.4042217", "...
0.7599746
0
Decrypts data that was originally encrypted using a raw cryptographic mechanism. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT. (cryptoKeyVersions.rawDecrypt)
Расшифровывает данные, которые были зашифрованы с использованием сырых криптографических механизмов. CryptoKey.purpose должен быть RAW_ENCRYPT_DECRYPT. (cryptoKeyVersions.rawDecrypt)
public function rawDecrypt($name, RawDecryptRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('rawDecrypt', [$params], RawDecryptResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function decrypt($data);", "function new_decrypt($data, $key) {\n if(empty($key)){\n $key = $encryption_key;\n }\n // Remove the base64 encoding from our key\n $encryption_key = base64_decode($key);\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::...
[ "0.68356717", "0.674933", "0.6630981", "0.66118175", "0.66118175", "0.6602111", "0.6525664", "0.6463852", "0.64471227", "0.6382238", "0.6338664", "0.6326447", "0.63058674", "0.62812304", "0.62378603", "0.6229578", "0.6220399", "0.62077916", "0.6193636", "0.61696386", "0.61456...
0.73923945
0
Get count of the permissions list
Получить количество элементов списка разрешений
public function getPermissionsListCount($filter = array()) { $whereClause = $this->getElmFilter($filter, 'entities\AclPermission', 'ap'); if (!empty($whereClause)) { $whereClause = " WHERE " . $whereClause; } $query = $this->em->createQuery("SELECT COUNT(ap) FROM entities...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return count($this->permissions);\n }", "public function getPermissions(): int\n {\n return $this->permissions;\n }", "public function searchCount() {\n try {\n if (!($this->permission instanceof Base_Model_ObtorLib_App_Core_Doc_Entity_P...
[ "0.8578168", "0.76715225", "0.7523933", "0.7395283", "0.69308007", "0.69308007", "0.6760391", "0.67204696", "0.6693601", "0.66925293", "0.66818756", "0.6665503", "0.66185826", "0.66121143", "0.6588663", "0.6571974", "0.6562451", "0.655708", "0.65453625", "0.65360206", "0.6500...
0.776858
1
create new token, prefix (to distinguish with another session date) with random value (to prevent guess)
создать новый токен, префикс (для отличия от другого сеанса даты) с случайным значением (для предотвращения угадывания)
function createtoken() { $token = "token-" . mt_rand(); // put in the token, created time $_SESSION[$token] = time(); return $token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateToken(){\n //if(empty($_SESSION['token']) && (empty($_SESSION['tokenAge']) || (time() - (int)$_SESSION['tokenAge']) > (int)$this->maxAge)){\n if(function_exists('random_bytes')){\n $_SESSION['token'] = bin2hex(random_bytes(32));\n }elseif(function...
[ "0.7606301", "0.75641686", "0.7498539", "0.74704844", "0.74189645", "0.74140304", "0.73480767", "0.7325995", "0.7318001", "0.72824204", "0.72713697", "0.7255527", "0.7248402", "0.7199542", "0.7199178", "0.71390176", "0.7091225", "0.70406467", "0.7030066", "0.7019373", "0.6999...
0.7935201
0
returns current indentation string to be used
возвращает текущую строку отступа для использования
public function getIndentationString($indentation = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIndent()\n {\n }", "function get_indentation($indent) {\n if ($indent > 0) {\n $fileIndentedBy = 2;\n if (array_key_exists('filesIndentedBy', $this->options)) {\n $fileIndentedBy = $this->options['filesIndentedBy'];\n }\n ...
[ "0.7541752", "0.7334734", "0.7248664", "0.7213954", "0.69218904", "0.687838", "0.68736935", "0.671583", "0.64795595", "0.6358121", "0.6345722", "0.629198", "0.62811077", "0.6262134", "0.623828", "0.61796296", "0.6172943", "0.6150827", "0.61172944", "0.6094051", "0.60643077", ...
0.8209322
0
Removes username from the body class list. Why does wordpress include the user name in the body class? So you can add peruser custom classes, but that seems like a very fringe case vs giving hackers all of your user names.
Удаляет имя пользователя из списка классов тела. Почему WordPress включает имя пользователя в класс тела? Чтобы можно было добавлять пользовательские классы на основе пользователя, но это кажется очень специфическим случаем по сравнению с тем, что предоставляет хакерам все ваши имена пользователей.
function mizzouRemoveUserNameFromBodyClass($aryClasses){ if(is_author() && in_array('author',$aryClasses)){ /** * match all classes of 'author-<username>' but not 'author-id' * * match: author-admin * match: author-gilzowp * NO match: author-5 * ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wolf_share_add_body_class( $classes ) {\n\n\t// theme slug body class for default WP themes styling\n\t$classes[] = sanitize_title_with_dashes( get_template() );\n\n\treturn $classes;\n}", "function bootstrapwp_body_classes($classes)\n{\n if (!is_multi_author()) {\n $classes[] = 'single-author...
[ "0.6466891", "0.64255154", "0.6318199", "0.6308037", "0.6275666", "0.6263875", "0.6263875", "0.620163", "0.6187597", "0.6185642", "0.6180398", "0.6164251", "0.6152271", "0.6116253", "0.6106319", "0.6106319", "0.6106319", "0.6106319", "0.6093494", "0.60919183", "0.6083822", ...
0.73594666
0
Force wordpress to use /?author=id for author permalink
Принудить WordPress использовать /?author=id для пермалинка автора
function mizzouChangeAuthorPermalinks() { global $wp_rewrite; $wp_rewrite->author_structure= ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_author_posts_url($author_id, $author_nicename = '')\n {\n }", "function the_author_url()\n {\n }", "function get_the_author_url()\n {\n }", "function get_the_author_posts_link()\n {\n }", "function voyage_mikado_get_author_posts_url() {\n return get_author_posts_...
[ "0.78660846", "0.7602583", "0.75763685", "0.74480045", "0.7371418", "0.73374903", "0.7282492", "0.72753257", "0.7269706", "0.7232981", "0.71984184", "0.7182865", "0.7180881", "0.7156741", "0.71140033", "0.6985318", "0.6981303", "0.6952759", "0.68582594", "0.6811129", "0.67421...
0.76781785
1
Removes the XPingback header
Удаляет заголовок XPingback
function mizzouRemoveXPingbackHeader($aryHeaders){ if(isset($aryHeaders['X-Pingback'])){ unset($aryHeaders['X-Pingback']); } return $aryHeaders; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cheffism_remove_x_pingback($headers) {\n unset($headers['X-Pingback']);\n return $headers;\n}", "function unregister_default_headers($header)\n {\n }", "public function clearHeaders()\n {\n }", "function removeHeader() {\n $id = request('id');\n Header::find($id)->del...
[ "0.84007883", "0.5898147", "0.5788629", "0.5772409", "0.57717437", "0.5743606", "0.5743097", "0.57162523", "0.56773293", "0.56718457", "0.56718457", "0.56681967", "0.565837", "0.56444705", "0.5626388", "0.56246984", "0.5622283", "0.56048834", "0.55845976", "0.55264336", "0.55...
0.79182285
1
parseUri tries to match the request uri to a route
parseUri пытается сопоставить запрос uri с маршрутом
protected function parseUri() { $path = rtrim(parse_url($this->request->uri, PHP_URL_PATH), '/'); if (!is_null($this->basePath)) { if (strpos($path, $this->basePath) === 0) { $path = substr($path, strlen($this->basePath)); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseRoutes()\n {\n // Turn the segment array into a URI string\n $uri = implode('/', $this->uri->getSegments());\n // Is there a literal match? If so we're done\n if (isset($this->routes[$uri])) {\n return $this->setRequest(explode('/', $this->routes[$ur...
[ "0.69582164", "0.68772316", "0.6845779", "0.6828252", "0.6828196", "0.67420924", "0.67144114", "0.66818106", "0.6668411", "0.6633622", "0.66193926", "0.6589662", "0.65591896", "0.6556779", "0.6553628", "0.6537208", "0.651083", "0.65106183", "0.64836013", "0.6452497", "0.64419...
0.77359945
0
Get image sizes names
Получить названия размеров изображений
public function getImageSizesNames(): array { return get_intermediate_image_sizes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ccac_2020_new_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}", "function dark_urban_custom_image_sizes_nam...
[ "0.78221506", "0.7810782", "0.7490202", "0.7490177", "0.7481667", "0.7467515", "0.74558645", "0.725128", "0.7219122", "0.72123444", "0.72100544", "0.7194758", "0.7170297", "0.70640904", "0.70601636", "0.70358926", "0.6994664", "0.6972337", "0.69407344", "0.69268054", "0.69041...
0.82055336
0
Test the 'getWaiverTemplates' function.
Проверьте функцию 'getWaiverTemplates'.
public function testGetWaiverTemplates() { $numTemplates = 3; $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::templates($numTemplates)); $templates = $sw->getWaiverTemplates(); $this->assertCount($numTemplates, $templates); for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWaiverTemplatesRaw()\n {\n $numTemplates = 3;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::templates($numTemplates));\n\n $response = $sw->getWaiverTemplatesRaw();\n\n $this->assertInstanceOf(SmartwaiverRawRe...
[ "0.80336183", "0.80336183", "0.79051566", "0.79051566", "0.73431134", "0.73431134", "0.72690946", "0.6808793", "0.67961705", "0.6656319", "0.6435963", "0.6435963", "0.6350004", "0.6290794", "0.6263512", "0.62101674", "0.62101674", "0.61834276", "0.609767", "0.6017484", "0.601...
0.8685434
1
Test the 'getWaiverTemplate' function.
Проверьте функцию 'getWaiverTemplate'.
public function testGetWaiverTemplate() { $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template()); $template = $sw->getWaiverTemplate('TestingTemplateId'); $this->assertInstanceOf(SmartwaiverTemplate::class, $template); $this->chec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWaiverTemplateRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template());\n\n $response = $sw->getWaiverTemplateRaw('TestingTemplateId');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\...
[ "0.8023082", "0.8023082", "0.785055", "0.785055", "0.77572054", "0.77572054", "0.66530883", "0.66530883", "0.6625415", "0.6625415", "0.6357125", "0.6338703", "0.62302244", "0.61980665", "0.61525106", "0.6147847", "0.61336297", "0.6132815", "0.6132815", "0.6132058", "0.6092680...
0.8568884
1
Test the getWaiver function
Проверьте функцию getWaiver
public function testGetWaiver() { $paths = [ '/v4/waivers/6jebdfxzvrdkd?pdf=false', '/v4/waivers/6jebdfxzvrdkd?pdf=false', '/v4/waivers/6jebdfxzvrdkd?pdf=true', ]; $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessRespons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWaiverRaw()\n {\n $paths = [\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=true',\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, ...
[ "0.65705115", "0.65705115", "0.6478634", "0.64622897", "0.64185214", "0.64185214", "0.64185214", "0.64185214", "0.64168084", "0.64168084", "0.6402012", "0.6381787", "0.63658506", "0.63658506", "0.63658506", "0.63658506", "0.63658506", "0.63658506", "0.63658506", "0.63658506", ...
0.7389747
1
Test the setWebhookConfig function
Проверьте функцию setWebhookConfig
public function testSetWebhookConfig() { $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks()); $webhook = $sw->setWebhookConfig( 'https://endpoint.example.org', SmartwaiverWebhook::WEBHOOK_BEFORE_AND_AFTER_EMAIL )...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetWebhookConfig()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $webhook = $sw->setWebhookConfig(\n 'https://endpoint.example.org',\n SmartwaiverWebhook::WEBHOOK_BEFORE_AND_AFTER_EMA...
[ "0.83081436", "0.7714717", "0.7079202", "0.70405567", "0.70036197", "0.69894326", "0.6982302", "0.68942463", "0.6732519", "0.6577879", "0.65759", "0.6533083", "0.6503177", "0.6491135", "0.64861447", "0.6194625", "0.60804415", "0.6028664", "0.60217535", "0.60217535", "0.600281...
0.82642215
1
Test the 'getWaiverTemplatesRaw' function.
Проверьте функцию 'getWaiverTemplatesRaw'.
public function testGetWaiverTemplatesRaw() { $numTemplates = 3; $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::templates($numTemplates)); $response = $sw->getWaiverTemplatesRaw(); $this->assertInstanceOf(SmartwaiverRawResponse::class...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWaiverTemplateRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template());\n\n $response = $sw->getWaiverTemplateRaw('TestingTemplateId');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\...
[ "0.8254799", "0.8254799", "0.8074445", "0.8074445", "0.7721631", "0.75093067", "0.75093067", "0.72193617", "0.71418166", "0.71418166", "0.6877612", "0.6787693", "0.6745594", "0.6621657", "0.6621657", "0.62653154", "0.6257288", "0.6182167", "0.6124505", "0.6124505", "0.6076432...
0.8832031
1
Test the 'getWaiverTemplateRaw' function.
Проверьте функцию 'getWaiverTemplateRaw'.
public function testGetWaiverTemplateRaw() { $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template()); $response = $sw->getWaiverTemplateRaw('TestingTemplateId'); $this->assertInstanceOf(SmartwaiverRawResponse::class, $response); $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWaiverTemplatesRaw()\n {\n $numTemplates = 3;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::templates($numTemplates));\n\n $response = $sw->getWaiverTemplatesRaw();\n\n $this->assertInstanceOf(SmartwaiverRawRe...
[ "0.8435704", "0.8435704", "0.7759851", "0.7759851", "0.7420828", "0.7420828", "0.7233571", "0.7014916", "0.7014916", "0.6938882", "0.6728457", "0.6651278", "0.6651278", "0.6606512", "0.65209734", "0.6464483", "0.6455018", "0.6455018", "0.6370937", "0.6212763", "0.6080536", ...
0.8734776
1
Test the 'getWaiversRaw' function with default parameters
Проверьте функцию 'getWaiversRaw' с параметрами по умолчанию
public function testGetWaiversDefaultRaw() { $numWaivers = 5; $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waivers($numWaivers)); $response = $sw->getWaiverSummariesRaw(); $this->assertInstanceOf(SmartwaiverRawResponse::class, $respo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWaiversRawParams()\n {\n $paths = [\n '/v4/waivers?limit=5',\n '/v4/waivers?limit=20&verified=true',\n '/v4/waivers?limit=20&templateId=alkagaldeab',\n '/v4/waivers?limit=20&fromDts='.urlencode('2016-11-01 00:00:00'),\n '/v4/wa...
[ "0.82015836", "0.819507", "0.76036614", "0.75439", "0.73772573", "0.73772573", "0.71498007", "0.71498007", "0.67066455", "0.67066455", "0.6483955", "0.6483955", "0.6371202", "0.6207221", "0.6207221", "0.59960306", "0.5836644", "0.5650872", "0.5650872", "0.556324", "0.556324",...
0.8275746
1
Test the 'getWaiverRaw' function
Проверьте функцию 'getWaiverRaw'
public function testGetWaiverRaw() { $paths = [ '/v4/waivers/6jebdfxzvrdkd?pdf=false', '/v4/waivers/6jebdfxzvrdkd?pdf=false', '/v4/waivers/6jebdfxzvrdkd?pdf=true', ]; $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessResp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWaiverTemplateRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template());\n\n $response = $sw->getWaiverTemplateRaw('TestingTemplateId');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\...
[ "0.7536755", "0.7536755", "0.7478441", "0.73762983", "0.7343319", "0.7343319", "0.7320519", "0.7320519", "0.7317847", "0.69457895", "0.69457895", "0.6442965", "0.6442965", "0.64247096", "0.64247096", "0.6324534", "0.6306208", "0.62687194", "0.6239578", "0.59416705", "0.592643...
0.8173929
1
Test the 'getWebhookRaw' function
Проверьте функцию 'getWebhookRaw'
public function testGetWebhookRaw() { $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks()); $response = $sw->getWebhookConfigRaw(); $this->assertInstanceOf(SmartwaiverRawResponse::class, $response); $this->checkGetRequests($cont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWebhook()\n {\n }", "public function testGetWebhook()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $webhook = $sw->getWebhookConfig();\n $this->assertInstanceOf(SmartwaiverWebhook::class...
[ "0.6878453", "0.66135234", "0.65957123", "0.6583911", "0.65775216", "0.6568906", "0.65025014", "0.6441911", "0.64404935", "0.6434267", "0.6427766", "0.64249927", "0.63279843", "0.62603635", "0.61795866", "0.6176272", "0.6173266", "0.61731887", "0.613231", "0.6101084", "0.6058...
0.806157
1
Test the 'setWebhookConfigRaw' function
Проверьте функцию 'setWebhookConfigRaw'
public function testSetWebhookConfigRaw() { $container = []; $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks()); $response = $sw->setWebhookConfigRaw( 'https://endpoint.example.org', SmartwaiverWebhook::WEBHOOK_BEFORE_AND_AFTER_EMAIL ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetWebhookConfigRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $response = $sw->setWebhookConfigRaw(\n 'https://endpoint.example.org',\n SmartwaiverWebhook::WEBHOOK_BEFORE_AND_AF...
[ "0.82430506", "0.7329609", "0.7309451", "0.7266028", "0.7266028", "0.67925763", "0.63783836", "0.625984", "0.6202215", "0.6173515", "0.60762185", "0.5902677", "0.57728124", "0.5680123", "0.56633353", "0.5658461", "0.55924296", "0.55555755", "0.55442536", "0.54938936", "0.5487...
0.8207236
1
Create a Smartwaiver Object with Mocked HTTP responses
Создайте объект Smartwaiver с отмаскированными HTTP-ответами
private function createMockedSmartwaiver(&$container, $response, $numResponses = 1) { // Convert responses to Guzzle Responses $mockResponse = []; for($i=0; $i<$numResponses; $i++) array_push($mockResponse, new Response(200, [], $response)); // Set up the Mock Handler ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getResponseFactory()\n {\n }", "public function __construct(Response $guzzleResponse)\n {\n // Save the guzzle response in case an advanced user wants to access it\n $this->guzzleResponse = $guzzleResponse;\n\n // Save the response contents (because it's a stream ...
[ "0.62563115", "0.616842", "0.6114912", "0.60861444", "0.606246", "0.6055244", "0.60019463", "0.6000886", "0.5996962", "0.5986874", "0.59562975", "0.59327185", "0.5905953", "0.5891531", "0.58664346", "0.5861977", "0.58538735", "0.5829316", "0.5806994", "0.5802736", "0.5796184"...
0.7112567
1
Check that the given container contains the appropriate GET requests specified in the path array
Проверьте, что данный контейнер содержит соответствующие GET-запросы, указанные в массиве пути
private function checkGetRequests($container, $paths) { // Check that the right requests were sent $this->assertCount(count($paths), $container); for($i=0; $i<count($paths); $i++) { $this->assertEquals('GET', $container[$i]['request']->getMethod()); $this->assertEqual...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkGetRequests($container, $paths)\n {\n $this->checkRequests('GET', $container, $paths);\n }", "private function checkRequests($method, $container, $paths, $data = [])\n {\n // Check that the right requests were sent\n $this->assertCount(count($paths), $container...
[ "0.7712657", "0.6548019", "0.58754706", "0.5866287", "0.57882774", "0.563929", "0.5456206", "0.5393613", "0.5340547", "0.5332732", "0.5266268", "0.52652574", "0.52627194", "0.5244952", "0.5192489", "0.5161511", "0.5138071", "0.5134466", "0.5115312", "0.50965875", "0.5073982",...
0.74078226
1
Check if this Identity has traits
Проверьте, имеет ли эта Идентичность черты
public function hasTraits(): bool { return !is_null($this->traits); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function usesTraits()\n\t{\n\t\tif ( count($this->getTraits()) > 0 )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isTrait(): bool\n {\n return $this->endsWith($this->getShortName(), 'Trait');\n }", "public function hasTraitByName(string $traitName): bool;",...
[ "0.71620363", "0.65746605", "0.65702504", "0.6429602", "0.63125646", "0.62425977", "0.6188023", "0.61040646", "0.60141706", "0.5952825", "0.5875734", "0.5875734", "0.5870454", "0.58497787", "0.58265775", "0.57970154", "0.5795409", "0.5786963", "0.5750944", "0.5745886", "0.574...
0.7767409
0
Deduce page title from route.
Определите заголовок страницы из маршрута.
public function getTitleFromRoute($route = NULL) { // For example, route view.publications_search.publication_search_page // gives the title 'Publications'. $title = ''; $route_parts = explode('.', $route); if ((count($route_parts) > 2) && !empty($route_parts[2])) { $title = $route_parts[2]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function get_page_titleHelper() {\n\t\tglobal $wpseo_front;\n\t\tif (\n\t\t\tisset( $wpseo_front ) &&\n\t\t\tmethod_exists( $wpseo_front, 'title' )\n\t\t) {\n\t\t\treturn $wpseo_front->title( '', false );\n\t\t}\n\n\t\t// If the SEO Ultimate plugin is active and compatible.\n\t\tglobal $seo_ultimate...
[ "0.7037284", "0.6951218", "0.6925751", "0.6851794", "0.68478173", "0.68353134", "0.6827594", "0.6804548", "0.6774982", "0.6766465", "0.6764353", "0.6725852", "0.6723845", "0.67208004", "0.67123944", "0.670898", "0.6651947", "0.6603931", "0.65700895", "0.65560377", "0.65437734...
0.7427035
0
Adds a leaf to the branch tree.
Добавляет лист в дерево ветвей.
public function addLeaf(Branch $branch): void { $branchNode = $this->branchMap[$branch->getUniqueId()] ?? new BranchGraphNode($branch); $branchNode->increase(); $tempBranch = $branch->getParentBranch(); while ($tempBranch) { if (isset($this->branchMap[$tempBranch->getUni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLeaf($var)\n {\n GPBUtil::checkString($var, False);\n $this->leaf = $var;\n\n return $this;\n }", "public function isLeafNode() {}", "abstract public function isLeaf ( );", "public function isLeaf();", "public function isLeaf();", "public function isLeaf();",...
[ "0.6959024", "0.6096742", "0.6022228", "0.59607387", "0.59607387", "0.59607387", "0.58662546", "0.58591455", "0.58230174", "0.5771362", "0.5612295", "0.5579156", "0.55767596", "0.5526033", "0.5497288", "0.5419645", "0.54159296", "0.5394056", "0.53908145", "0.53570795", "0.532...
0.7707499
0
Add logic to mergeIntoConfig() to do quick validation of deletion_strategy setting.
Добавьте логику в mergeIntoConfig(), чтобы выполнять быструю проверку настройки deletion_strategy.
protected function mergeIntoConfig($config) { parent::mergeIntoConfig($config); if ($this->config['deletion_strategy'] == '') { throw new Exception('Can not generate: must specify the deletion_strategy config setting (Delete|Retire|Custom).'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteObsoleteConfigs();", "public function preDeleteKeyValueGroupConfig(Object_KeyValue_GroupConfig $config)\n {\n\n }", "private function _deleteConfigs()\r\n {\r\n $response = Configuration::deleteByName('FIELD_FEATUREDPSL_TITLE');\r\n $response &= Configur...
[ "0.5713089", "0.56991756", "0.56331736", "0.5588857", "0.5465525", "0.53928536", "0.53642595", "0.5308966", "0.5274535", "0.52662796", "0.5172796", "0.51438123", "0.50792253", "0.50259006", "0.49934572", "0.49725726", "0.49482584", "0.49446806", "0.4931633", "0.49269956", "0....
0.7289588
0
Given a table object, it gets the "entity name", currently just strips any prefixes specified in the config from the table name, otherwise just returns the table name. e.g. "cust_address" will get entity name "address" if strip_table_name_prefixes has 'cust_' in it.
Данному объекту таблицы предоставляется "имя сущности", в настоящее время просто удаляются любые префиксы, указанные в конфигурации, из имени таблицы, иначе возвращается имя таблицы. Например, "cust_address" получит имя сущности "address", если в strip_table_name_prefixes указано 'cust_'.
public function getEntityName(SchemaTable $table) { $dbName = $table->getDatabase()->getDatabaseName(); $tableName = $table->getTableName(); // Check if a custom entity name is set via the configuration, if not, then use strip_table_name_prefixes option. $entityName = $this->getConfigValue('entity_name', $db...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getClassNameFromTable(string $table): string\n {\n // if not overridden by conf...\n $name = LightBreezeGeneratorTool::getClassNameByTable($table);\n return $name;\n }", "public static function prefixModelTable( $table )\n {\n $table = trim( $table );\n\...
[ "0.65900564", "0.65687513", "0.6546103", "0.63344353", "0.6307211", "0.6259071", "0.6239458", "0.6187266", "0.6161943", "0.6150541", "0.60640347", "0.6049352", "0.60299706", "0.59864914", "0.59861773", "0.596453", "0.5958195", "0.5931831", "0.5901626", "0.5891446", "0.5889035...
0.7582688
0