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
Set the value of The regionid of the region to retrieve data from
Установите значение The regionid региона, из которого необходимо получить данные
public function setRegionId($value) { $this->regionId = $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRegion($value);", "public function getRegionId()\n {\n return $this->region_id;\n }", "public function getRegionId()\n {\n return $this->region_id;\n }", "public function setRegion($value)\n\t{\n\t\t$this->region = $value;\n\t}", "public function setIdRegion($_i...
[ "0.71978796", "0.7083455", "0.7083455", "0.7076719", "0.69039303", "0.68984777", "0.68383116", "0.6773917", "0.66996706", "0.66239566", "0.6559099", "0.6502883", "0.6492908", "0.64606583", "0.6448963", "0.64018834", "0.63570637", "0.6337322", "0.6298006", "0.6298006", "0.6293...
0.7237048
0
Executes a statement on this connection
Выполняет инструкцию на этом соединении
public function executeStatement(Statement $statement);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exec($statement);", "public function execute() {\n $this->stmt->execute();\n }", "public function execute()\r\n {\r\n $this->stmt->execute();\r\n }", "private function executeStmt() {\r\n\t\tO_Profiler::start();\r\n\t\t$r = $this->stmt->execute ();\r\n\t\tO_Profiler::st...
[ "0.74171793", "0.718279", "0.71393853", "0.7110713", "0.7066513", "0.7033275", "0.7033275", "0.69655704", "0.6964852", "0.6920604", "0.6920604", "0.6920604", "0.68898344", "0.6878005", "0.6845216", "0.6825392", "0.67923903", "0.67674035", "0.6758856", "0.6710945", "0.6705603"...
0.7825732
0
Quotes a database value
Цитирует значение базы данных
public function quoteValue($value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function quote($value) {\n\t\t$connection = $this -> connect();\n\t\treturn \"'\" . $connection -> real_escape_string($value) . \"'\";\n\t}", "public function quote($value) {\n $connection = $this -> connect();\n return \"'\" . $connection -> real_escape_string($value) . \"'\";\n }", "p...
[ "0.7768812", "0.77551204", "0.77551204", "0.7712851", "0.7679314", "0.7608225", "0.7581707", "0.75662124", "0.7560774", "0.75118566", "0.74722207", "0.7451077", "0.7398605", "0.73713714", "0.7369257", "0.734305", "0.7331996", "0.7320124", "0.73195404", "0.73010296", "0.728090...
0.802088
0
Gets the statement parser, a parser which parses statement objects into SQL.
Получает парсер утверждений, парсер, который парсит объекты утверждений в SQL.
public function getStatementParser();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parse_statement($statement)\n\t{\n\t\t$parameters = array();\n\n\t\t$statement = $this->_parse(\n\t\t\t(string) $statement,\n\t\t\t$statement->parameters,\n\t\t\t$parameters\n\t\t);\n\n\t\treturn new Database_Statement($statement, $parameters);\n\t}", "protected function getParser()\n {\n ...
[ "0.6932008", "0.6247711", "0.6077617", "0.6047541", "0.603267", "0.60132235", "0.60132235", "0.60063887", "0.6004904", "0.6002957", "0.5960557", "0.5955063", "0.5912318", "0.59008914", "0.58849406", "0.5865574", "0.58127505", "0.57898617", "0.5788337", "0.5788337", "0.5788337...
0.8281259
0
Starts a new transaction
Начинает новую транзакцию
public function startTransaction();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function startTransaction() {\n\t\tself::query(\"start transaction\");\n\t}", "public function startTransaction() {\n\t}", "public function startTransaction()\n {\n $this->transaction = true;\n }", "public function startTransaction() {\n $this->beginTransaction();\n }", ...
[ "0.83900434", "0.8210193", "0.8178971", "0.78509927", "0.7829787", "0.7800472", "0.7780606", "0.77329355", "0.768624", "0.768624", "0.768624", "0.768624", "0.76689494", "0.7660179", "0.76290345", "0.76056254", "0.7603859", "0.75821465", "0.756075", "0.7560529", "0.75562125", ...
0.83861446
1
Checks whether a transaction is in progress
Проверяет, находится ли транзакция в процессе выполнения
public function isTransactionStarted();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasActiveTransaction();", "public function is_in_progress();", "public function inTransaction() {\n return ($this->transactionDepth() > 0);\n }", "public function isTransRunning() {\n\t\treturn $this->connection->isTransRunning();\n\t}", "public function isInTransaction() {\n if ...
[ "0.77693135", "0.76352435", "0.7489655", "0.7380067", "0.73323554", "0.7316978", "0.72757304", "0.7249872", "0.72098553", "0.71884316", "0.71884316", "0.7144699", "0.7138477", "0.71264267", "0.70968515", "0.7064914", "0.7064625", "0.70325583", "0.70256954", "0.70198363", "0.7...
0.7838639
0
Parses the amazon address fields.
Парсит поля адреса amazon.
protected function _parseAddressFields($oAmazonData, array &$aResult) { // Cleanup address fields and store them to an array $aAmazonAddresses = array( 1 => is_string($oAmazonData->AddressLine1) ? trim($oAmazonData->AddressLine1) : '', 2 => is_string($oAmazonData->AddressLine...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addressParser(string $address_string): array {\n\n $address_array = explode(',', $address_string);\n\n $zip_city = explode(' ', trim($address_array[1]));\n\n $address['street'] = $address_array[0];\n $address['zip'] = trim($zip_city[0]);\n $address['city'] = trim($zip_city[1]);\n\n ...
[ "0.67449063", "0.6670294", "0.65515393", "0.6510005", "0.613409", "0.6069524", "0.6054641", "0.60370743", "0.60340255", "0.59645295", "0.5953204", "0.5911033", "0.5868983", "0.583237", "0.5745577", "0.5703626", "0.5656565", "0.5619051", "0.560267", "0.55330175", "0.55233836",...
0.7218697
0
Get the name of the Query, if no name is specified fall back on a name based on the class name.
Получите имя Query, если имя не указано, используйте имя, основанное на имени класса.
public function name(): string { if (isset($this->name)) { return $this->name; } return Str::camel(Str::before(class_basename($this), 'Query')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActionQueryClass($name)\n {\n return $this->getClassName($name) . 'ActionQuery';\n }", "public function getQueryName()\n {\n return $this->queryName;\n }", "public function queryClass()\n {\n return $this->_queryClass;\n }", "public function getQueryT...
[ "0.73753804", "0.7345228", "0.67868286", "0.65630656", "0.6521182", "0.6343505", "0.63366604", "0.6317564", "0.6284711", "0.6081039", "0.5954851", "0.595114", "0.5943396", "0.5927166", "0.5925423", "0.59159523", "0.5908552", "0.5903142", "0.58857137", "0.58692646", "0.5863485...
0.80316526
0
Return list of Bugzilla component names based on product. For Mozilla Localization (default) we need its component names. For we need values of cf_locale (locale selector).
Возвращать список имен компонентов Bugzilla в зависимости от продукта. Для Mozilla Localization (по умолчанию) нам нужны имена компонентов. Для нас нужны значения cf_locale (селектор языка).
public function getBugzillaComponents($product) { $result = []; if ($product == 'www') { $locale_list = 'cf_locale'; } else { $locale_list = 'mozilla_localizations'; } foreach ($this->component_list[$locale_list] as $locale => $data) { $re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function custom_filter_notifications_get_registered_components( $component_names = array() ) {\n\t// Force $component_names to be an array\n\tif ( ! is_array( $component_names ) ) {\n\t\t$component_names = array();\n\t}\n\t// Add 'myfossil_notification' component to registered components array\n\tarray_push( $comp...
[ "0.6189088", "0.584553", "0.5812665", "0.57853293", "0.5692681", "0.5660991", "0.5639452", "0.55854756", "0.5549256", "0.55333525", "0.5487855", "0.5476129", "0.54620653", "0.5450177", "0.5415043", "0.5384443", "0.5360571", "0.5360524", "0.5347692", "0.5331007", "0.5327245", ...
0.81613344
0
Store a newly created Testimonio in storage.
Храните только что созданный Testimonio в хранилище.
public function store(CreateTestimonioRequest $request) { $input = $request->all(); $testimonio = $this->testimonioRepository->create($input); Flash::success('Testimonio saved successfully.'); return redirect(route('testimonios.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\r\n\t\t{\r\n\t\t\t//\r\n\t\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n...
[ "0.6379098", "0.6321427", "0.6321427", "0.6321427", "0.6321427", "0.6321427", "0.6321427", "0.6302425", "0.62773246", "0.62773246", "0.62773246", "0.62773246", "0.62773246", "0.62773246", "0.62773246", "0.62773246", "0.62773246", "0.62773246", "0.62773246", "0.62773246", "0.6...
0.70079046
0
Control the CPU management policy on the node. See The following values are allowed. "none": the default, which represents the existing scheduling behavior. "static": allows pods with certain resource characteristics to be granted increased CPU affinity and exclusivity on the node. The default value is 'none' if unspec...
Управление политикой управления CPU на узле. См. следующие допустимые значения. "none": значение по умолчанию, представляющее существующее поведение планирования. "static": позволяет пакетам с определенными характеристиками ресурсов получать увеличенную аффинность и исключительность CPU на узле. Значение по умолчанию —...
public function getCpuManagerPolicy() { return $this->cpu_manager_policy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCpuManagerPolicy($var)\n {\n GPBUtil::checkString($var, True);\n $this->cpu_manager_policy = $var;\n\n return $this;\n }", "public function setCpuPlatform($var)\n {\n GPBUtil::checkString($var, True);\n $this->cpu_platform = $var;\n\n return $...
[ "0.8281361", "0.58060354", "0.5630978", "0.5593938", "0.52889043", "0.52051336", "0.5111941", "0.5111941", "0.47326905", "0.47155067", "0.4679455", "0.45474085", "0.4519868", "0.45180732", "0.44606236", "0.44458476", "0.4403007", "0.43427813", "0.42982003", "0.4242921", "0.41...
0.71554416
1
Control the CPU management policy on the node. See The following values are allowed. "none": the default, which represents the existing scheduling behavior. "static": allows pods with certain resource characteristics to be granted increased CPU affinity and exclusivity on the node. The default value is 'none' if unspec...
Управление политикой управления CPU на узле. См. следующие допустимые значения. "none": значение по умолчанию, представляющее существующее поведение планирования. "static": позволяет подконтейнерам с определенными характеристиками ресурсов получать увеличенную аффинность и исключительность CPU на узле. Значение по умол...
public function setCpuManagerPolicy($var) { GPBUtil::checkString($var, True); $this->cpu_manager_policy = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCpuManagerPolicy()\n {\n return $this->cpu_manager_policy;\n }", "public function setCpuPlatform($var)\n {\n GPBUtil::checkString($var, True);\n $this->cpu_platform = $var;\n\n return $this;\n }", "public function setCpu($var)\n {\n GPBUtil::...
[ "0.7154404", "0.5805485", "0.5630642", "0.55943584", "0.5288598", "0.52049756", "0.5111875", "0.5111875", "0.4732974", "0.47149393", "0.4679048", "0.4546746", "0.45197806", "0.45185995", "0.4461393", "0.44456083", "0.44037312", "0.4343382", "0.42990425", "0.42443058", "0.4193...
0.8280563
0
Enable CPU CFS quota enforcement for containers that specify CPU limits. This option is enabled by default which makes kubelet use CFS quota ( to enforce container CPU limits. Otherwise, CPU limits will not be enforced at all. Disable this option to mitigate CPU throttling problems while still having your pods to be in...
Включите принудительное соблюдение квоты CFS для контейнеров, указывающих ограничения на использование CPU. Этот параметр включен по умолчанию, что заставляет kubelet использовать квоту CFS для соблюдения ограничений на использование CPU контейнеров. В противном случае, ограничения на использование CPU вообще не будут ...
public function setCpuCfsQuota($var) { GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); $this->cpu_cfs_quota = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCpuCfsQuota()\n {\n return $this->cpu_cfs_quota;\n }", "public function setCpuCfsQuotaValue($var)\n {\n $this->writeWrapperValue(\"cpu_cfs_quota\", $var);\n return $this;}", "public function setCpuLimit($var)\n {\n GPBUtil::checkUint32($var);\n ...
[ "0.6799933", "0.6430324", "0.6339576", "0.6243002", "0.5793867", "0.5578216", "0.55253893", "0.53393203", "0.5146499", "0.5010717", "0.4983863", "0.4904615", "0.48220173", "0.47829774", "0.47757572", "0.47365564", "0.4669436", "0.46526352", "0.46388882", "0.45592174", "0.4558...
0.8252599
0
Set the Pod PID limits. See Controls the maximum number of processes allowed to run in a pod. The value must be greater than or equal to 1024 and less than 4194304. Generated from protobuf field int64 pod_pids_limit = 4;
Установите ограничения PID для Pod. См. Управляет максимальным количеством процессов, которые могут запускаться в Pod. Значение должно быть больше или равно 1024 и меньше 4194304. Сгенерировано из поля protobuf int64 pod_pids_limit = 4;
public function getPodPidsLimit() { return $this->pod_pids_limit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPodPidsLimit($var)\n {\n GPBUtil::checkInt64($var);\n $this->pod_pids_limit = $var;\n\n return $this;\n }", "public function setPids(?int $pids): self\n {\n $this->initialized['pids'] = true;\n $this->pids = $pids;\n\n return $this;\n }", ...
[ "0.8449105", "0.6147228", "0.56612927", "0.5281522", "0.5170218", "0.5156232", "0.49364835", "0.4876316", "0.4811004", "0.47723615", "0.47252113", "0.4701972", "0.46702972", "0.4587359", "0.45699337", "0.4565075", "0.45316884", "0.45275974", "0.451893", "0.45023942", "0.44952...
0.7751275
1
Set the Pod PID limits. See Controls the maximum number of processes allowed to run in a pod. The value must be greater than or equal to 1024 and less than 4194304. Generated from protobuf field int64 pod_pids_limit = 4;
Установите ограничения PID для Pod. См. Управляет максимальным количеством процессов, которые могут запускаться в Pod. Значение должно быть больше или равно 1024 и меньше 4194304. Генерируется из поля protobuf int64 pod_pids_limit = 4;
public function setPodPidsLimit($var) { GPBUtil::checkInt64($var); $this->pod_pids_limit = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPodPidsLimit()\n {\n return $this->pod_pids_limit;\n }", "public function setPids(?int $pids): self\n {\n $this->initialized['pids'] = true;\n $this->pids = $pids;\n\n return $this;\n }", "protected function setPids()\n\t{\n\t\t$pidTypeArray = ['login'...
[ "0.77516705", "0.6145324", "0.5659657", "0.5279517", "0.51695836", "0.5155198", "0.4935399", "0.48746067", "0.4810435", "0.4771824", "0.4723711", "0.47032037", "0.4669707", "0.45857194", "0.45696327", "0.45641923", "0.45296302", "0.4526169", "0.4517654", "0.45023072", "0.4493...
0.8449081
0
Enable or disable Kubelet read only port. Generated from protobuf field optional bool insecure_kubelet_readonly_port_enabled = 7;
Включить или отключить порт Kubelet только для чтения. Сгенерировано из поля protobuf optional bool insecure_kubelet_readonly_port_enabled = 7;
public function getInsecureKubeletReadonlyPortEnabled() { return isset($this->insecure_kubelet_readonly_port_enabled) ? $this->insecure_kubelet_readonly_port_enabled : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setInsecureKubeletReadonlyPortEnabled($var)\n {\n GPBUtil::checkBool($var);\n $this->insecure_kubelet_readonly_port_enabled = $var;\n\n return $this;\n }", "public function readonly() {\n\t\t$ro = $this->variables('read_only');\n\t\tif (!pudl_array($ro) || empty($ro))...
[ "0.7822987", "0.5024462", "0.4811493", "0.4772984", "0.47177345", "0.47094938", "0.46392035", "0.46354786", "0.4604697", "0.46024066", "0.45987746", "0.45597637", "0.455431", "0.45514718", "0.45492068", "0.4530639", "0.4530639", "0.45237976", "0.45229244", "0.45078152", "0.44...
0.77625865
1
Enable or disable Kubelet read only port. Generated from protobuf field optional bool insecure_kubelet_readonly_port_enabled = 7;
Включить или отключить порт Kubelet только для чтения. Сгенерировано из поля protobuf optional bool insecure_kubelet_readonly_port_enabled = 7;
public function setInsecureKubeletReadonlyPortEnabled($var) { GPBUtil::checkBool($var); $this->insecure_kubelet_readonly_port_enabled = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInsecureKubeletReadonlyPortEnabled()\n {\n return isset($this->insecure_kubelet_readonly_port_enabled) ? $this->insecure_kubelet_readonly_port_enabled : false;\n }", "public function readonly() {\n\t\t$ro = $this->variables('read_only');\n\t\tif (!pudl_array($ro) || empty($ro)) ...
[ "0.77630717", "0.502419", "0.481237", "0.4771515", "0.4716761", "0.4708159", "0.46374384", "0.46334317", "0.46052268", "0.46011558", "0.46011126", "0.45590252", "0.45536733", "0.45498917", "0.45496196", "0.45311278", "0.45311278", "0.4523417", "0.4522451", "0.45063078", "0.44...
0.7822216
0
Enable the specified country.
Включить указанный страну.
public function enable($country_iso2) { if (Country::whereIso2($country_iso2)->exists()) { $country = Country::whereIso2($country_iso2)->firstOrFail(); $country->enabled = true; $country->users()->where('status', 'country_disabled_active')->update(['status' => 'active']); $country->users()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCountry($country) { $this->country = $country ; }", "function setCountry($country)\n {\n return false;\n }", "public function setCountry(?string $country): void\n {\n $this->country = $country;\n }", "function setCountry($country) {\n\t\t$this->setData('country', ...
[ "0.6419016", "0.63378805", "0.6197856", "0.6197115", "0.6179718", "0.61476743", "0.61476743", "0.6098773", "0.60532296", "0.60055923", "0.59706134", "0.59706026", "0.59305453", "0.5911847", "0.59065795", "0.58959866", "0.5849846", "0.5798354", "0.5791253", "0.57529557", "0.57...
0.7410257
0
Disabled the specified country.
Отключен указанный страна.
public function disable($country_iso2) { if (Country::whereIso2($country_iso2)->exists()) { $country = Country::whereIso2($country_iso2)->firstOrFail(); $country->enabled = false; $country->users()->where('status', 'active')->update(['status' => 'country_disabled_active']); $country->users...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCountry($country)\n {\n return false;\n }", "function disabled_countries($countries)\n{\n global $db;\n $countries=preg_replace('/[^a-zA-Z0-9,]/', '', $countries);\n $countries=explode(',', $countries);\n foreach ($countries as $key=>$value) {\n $countries[$key]=\"'$value'\";\n...
[ "0.6861124", "0.68016356", "0.60027796", "0.5958429", "0.5895452", "0.57088774", "0.56605655", "0.56447726", "0.56215304", "0.5608556", "0.5602101", "0.5547477", "0.5547477", "0.55157506", "0.5499526", "0.5484416", "0.5459806", "0.54555315", "0.5450605", "0.5437516", "0.54239...
0.73931223
0
find the next empty cell
найдите следующую пустую ячейку
function findNextCell($tab,&$x,&$y){ for($i=0;$i<9;$i++) for($j=0;$j<9;$j++) if($tab[$i][$j] == 0 || $tab[$i][$j] == "" ){ $x=$i; $y=$j; return true; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function nextEmpty()\n {\n for ($i = 0; $i < 9; $i++) {\n for ($j = 0; $j < 9; $j++) {\n if ($this->grid[$i][$j] === \"0\") return [\"x\" => $i, \"y\" => $j];\n }\n }\n return false;\n }", "public function next(): void\n {\n do {\n...
[ "0.7106133", "0.6527039", "0.63091654", "0.6255758", "0.6130518", "0.6124734", "0.60257757", "0.5835456", "0.5802547", "0.5797252", "0.5780752", "0.5773689", "0.5771958", "0.57476366", "0.5741065", "0.57279605", "0.5705653", "0.5685724", "0.56575185", "0.5637696", "0.5604346"...
0.76755357
0
copy an uploaded file to the target directory (including virus check)
скопировать загруженный файл в целевую директорию (включая проверку на вирусы)
static function _copyUploadFile($a_file, $a_target, $a_raise_errors = true) { global $lng, $ilias; $file = self::_getUploadDirectory() . "/". $a_file; // check if file exists if (!is_file($file)) { if ($a_raise_errors) { $ilias->raiseError($lng->txt("upload_error_file_not_found"), $ilias->error_o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tep_copy_uploaded_file($filename, $target) {\n\tif (substr($target, -1) != '/') $target .= '/';\n\n\t$target .= $filename['name'];\n\n\tmove_uploaded_file($filename['tmp_name'], $target);\n}", "function upload_file($file){\n \t\t\tcopy($file['tmp_name'], $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/...
[ "0.7247092", "0.690285", "0.6885003", "0.67469484", "0.67113614", "0.65772974", "0.6456859", "0.6455513", "0.64305425", "0.64296955", "0.6382686", "0.6363143", "0.6350795", "0.6350026", "0.6336149", "0.6332774", "0.63026357", "0.62952733", "0.6283281", "0.62349015", "0.622393...
0.71456236
1
DESCRIPTION: This function accepts an array of skill ID [1,2,3,4] and turns the child skill index into associative arrays containing the details, if recursively "unpacking" the child skills of a child skill if there is one. USAGE: function skill_unpacker( $ARRAY ), if not put the single skill ID into an array, conseque...
ОПИСАНИЕ: Эта функция принимает массив идентификаторов навыков [1,2,3,4] и преобразует индекс дочернего навыка в ассоциативные массивы, содержащие детали. Если есть дочерний навык, он будет рекурсивно "распакован". ИСПОЛЬЗОВАНИЕ: функция skill_unpacker( $ARRAY ). Если не поместить отдельный идентификатор навыка в масси...
function skill_unpacker($skill, $recursive = true, &$parent_skills = null) { // get the skill data foreach($skill as $key => $id) { // Find the skill and place it in this TEMP variable $raw_skill = \App\Skill::find($id); // Fix skill image (to prepare it for json_enc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function recursive($courseId, array $array, &$flatArray, $parentId = 1, $counter=false, $order = 0)\n {\n \n foreach($array as $level)\n {\n \n $mod = new OrderedModule();\n $mod->module_id = $level->module_id;\n $mod->parent_id = $pare...
[ "0.5061942", "0.50608504", "0.49589103", "0.48776597", "0.48124567", "0.47901887", "0.47466314", "0.47028205", "0.46874338", "0.46849424", "0.4655527", "0.45998955", "0.4590328", "0.4583616", "0.45806932", "0.45786834", "0.45423055", "0.45374313", "0.45281696", "0.45033473", ...
0.75623184
0
Handle warnings Warnings indicate environmental errors; email sysadmin and continue
Обработка предупреждений Предупреждения указывают на ошибки среды; отправить электронное письмо системному администратору и продолжить
public function handleWarning() { $body =<<<EOT An environmental error occured in the application, and may indicate a potential larger issue: Message: {$this->message} File: {$this->filename} Line: {$this->line} EOT; // Use PHP's error_log() function to send an email return error_log($body...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emailAdminFatal($subject, $msg){\n emailAdmin($subject, $msg);\n die();\n}", "function handleMissingSmtpServerSettingsNotifications()\n{\n\n $oe = new OutboundEmail();\n $settings = $oe->getSystemMailerSettings();\n\n if (!empty($settings->mail_smtpserver)) {\n return;\n }\n\n ...
[ "0.7087226", "0.66650784", "0.64073783", "0.6349854", "0.63451356", "0.6285302", "0.62389904", "0.6228095", "0.61948615", "0.6194812", "0.61926913", "0.6188884", "0.6180625", "0.616795", "0.6167522", "0.61485046", "0.6147437", "0.614287", "0.61222714", "0.6106563", "0.6092266...
0.78395855
0
clear to data for request
ясно для данных запроса
public function clearRequestData() { $this->queries = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n {\n $this->data = array();\n }", "public function clear()\n\t{\n\t\t$this->data = array();\n\t}", "public function clearData () {\n $this->resultName = Null;\n $this->resultData = Null;\n $this->resultCode = Null;\n\n }", "public function clear ()\n {\n ...
[ "0.8065269", "0.8037488", "0.7985484", "0.7968925", "0.7950011", "0.7950011", "0.7915799", "0.78979546", "0.7810233", "0.77500093", "0.7749658", "0.772584", "0.7702862", "0.7692376", "0.7691806", "0.76733315", "0.76499206", "0.7618407", "0.76113737", "0.7599439", "0.75822145"...
0.83759034
0
parse tsv ( text separated value ) data to array
парсить данные TSV (text separated value) в массив
private function parse_Tsv( $tsv = null ) { if ( $tsv === NULL ) { $tsv = $this->__response; } $lines = preg_split( "/\r?\n/", $tsv ); // get fields line $fieldline = array_shift( $lines ); $fieldline = trim( $fieldline ); $fields = explode( "\t", $fieldline ); $fieldCount = count( $fields ); fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readTSVdata($file)\n {\n $tsv = new ReadTSV($file);\n $header = $tsv->getHeader();\n $hCount = count($header);\n $dataArray = array();\n $row = 1;\n $line = preg_replace(\"/—|–|-/\",\"-\",preg_replace(\"/\\\"/\",\"\",trim($tsv->getNextLine())));\n while(...
[ "0.7065607", "0.7065607", "0.6576528", "0.6510445", "0.63270336", "0.6308065", "0.5964294", "0.5881617", "0.5777138", "0.5765181", "0.57527405", "0.5737899", "0.569108", "0.568315", "0.566523", "0.5662623", "0.56344223", "0.5626099", "0.56050366", "0.5594444", "0.55727464", ...
0.7493773
0
Sets the given item and returns it.
Устанавливает заданный элемент и возвращает его.
public function setItem(Item $item) : Item { return $this->_item = $item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setItem( $item ) {\n return StackTransport::setItem( $item );\n\t}", "public function set( $key, $item ) {\n \\spf\\assert_instance($item, $this->class);\n $this->items[$key] = $item;\n return $this;\n\t}", "abstract public function setItem($itemId);", "public function se...
[ "0.7298002", "0.7184351", "0.70313793", "0.7022757", "0.6890712", "0.6790951", "0.676269", "0.67403466", "0.6737653", "0.6677148", "0.6667365", "0.6624346", "0.6596847", "0.65777385", "0.65777385", "0.6563701", "0.6414312", "0.6343675", "0.6337432", "0.63296056", "0.626326", ...
0.7547913
0
Get the CurrencyManager instance.
Получить экземпляр CurrencyManager.
function currencies(): CurrencyManager { return app(CurrencyManager::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getInstance() {\n if (self::$instance == null) {\n self::$instance = new CurrencyRateManager(CurrencyRateMapper::getInstance());\n }\n return self::$instance;\n }", "public static function getObject()\n {\n return new Currenc...
[ "0.8216983", "0.6825205", "0.6806065", "0.6657299", "0.64950377", "0.6478589", "0.64144975", "0.63255495", "0.63124657", "0.62883526", "0.6277152", "0.62284046", "0.6202288", "0.6173896", "0.61614704", "0.6161013", "0.6143614", "0.6141504", "0.6140408", "0.6137795", "0.613779...
0.7654294
1
Imprime la cabecera de la tabla.
Выведите заголовок таблицы.
protected function imprimirCabecera() { $this->tabla->setHeaderContents(0, 0, 'Fecha'); $this->tabla->setHeaderContents(0, 1, 'Descripción'); $this->tabla->setHeaderContents(0, 2, 'Acción'); $this->tabla->setRowAttributes(0, $this->clase, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function imprimir()\n {\n $this->imprimirCabecera();\n\n for($index = 0; $index < count($this->diasFeriados); $index++)\n {\n $diaFeriado = $this->diasFeriados[$index];\n // Implementada en la subclase\n $this->imprimirFila($diaFeriado, $index);\n ...
[ "0.73788655", "0.6953062", "0.66128266", "0.64271146", "0.6406816", "0.6291665", "0.6256455", "0.6249198", "0.6209543", "0.61331946", "0.6126521", "0.6029811", "0.5977993", "0.5838563", "0.5838563", "0.57330525", "0.57004464", "0.56642866", "0.56642866", "0.56568867", "0.5654...
0.71484137
1
Manytomany relationship to Audits
Многократное отношение к аудитам
public function audits() { return $this->belongsToMany(Audit::class, 'files_audits')->withPivot('created_at'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Audits()\n\t{\n\t\treturn $this->hasMany('App\\Models\\Auditor', 'user_id');\n\t}", "public function audit() {\n\t\treturn $this->hasMany('Audit');\n\t}", "public function activitySubjected(): HasMany\n {\n return $this->hasMany(Activity::class, 'subject_id', 'id');\n }", "public...
[ "0.7326156", "0.66657925", "0.6067811", "0.5965224", "0.5659203", "0.5639563", "0.5578152", "0.5505705", "0.54823226", "0.54704624", "0.5469346", "0.5462936", "0.5400814", "0.5392086", "0.53835", "0.53800845", "0.5371937", "0.53398085", "0.53327584", "0.53221464", "0.53160006...
0.7020618
1
Display Geo Mashup global map during 'sarah_between_entry_header_and_content' action if we're on the "Global Mashup Page" Geo Mashup plugin has a setting for "Global Mashup Page" which should contain a big map of all posts. On this page we want a full screen map so we need to put it above the main post content so we ca...
Показывать глобальную карту Geo Mashup во время действия 'sarah_between_entry_header_and_content', если мы находимся на странице "Global Mashup Page". Geo Mashup имеет настройку "Global Mashup Page", которая должна содержать большую карту всех записей. На этой странице мы хотим полноэкранную карту, поэтому нам нужно ра...
function sarah_between_entry_header_and_content_geomashup_main_map() { global $geo_mashup_options; /** * Exit the action if this isn't a page or if Geo Mashup isn't active */ if (!is_page() OR !class_exists('GeoMashupOptions') OR !isset($geo_mashup_options) OR !is_object($geo_mashup_options)) return; /** ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gmap_div () {\n // If node settings checked to show map then load the geo mashup map\n ?>\n <div id=\"map\">\n <div id=\"gmap\">\n <?php if(get_option('upgrades_use_gmap')) {\n echo GeoMashup::map('height=325&width=100%&add_overview_control=false&add_map_type_control=false');...
[ "0.7011329", "0.6500269", "0.6113328", "0.6099023", "0.60946906", "0.60943234", "0.6079256", "0.60230166", "0.6003949", "0.59550303", "0.59305865", "0.5881161", "0.5798531", "0.5783462", "0.57545716", "0.5747195", "0.5723915", "0.56874347", "0.56826794", "0.5670013", "0.56445...
0.8260217
0
SARAH Filter wp_get_attachment_link to use $permalink=true mode on attachment taxonomy screens By default attachments listed on archive screens are shown with wp_get_attachment_link() which links to the file rather than attachment page on the image itself. There is no direct filter to change the $permalink value to tru...
Фильтр SARAH wp_get_attachment_link для использования режима $permalink=true на экранах таксономии прикрепленных файлов По умолчанию прикрепленные файлы, отображаемые на архивных экранах, показываются с помощью wp_get_attachment_link(), который ссылается на файл, а не на страницу прикрепленного файла самого изображения...
function sarah_filter_wp_get_attachment_link($output, $id, $size, $permalink, $icon, $text) { // Only run on attachment taxonomy archives if ( is_tax('attachment_category') OR is_tax('attachment_tag') ) : // Remove this filter to avoid infinite loop remove_filter('wp_get_attachment_link', 'sarah_filter_wp_get_a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timber_lite_filter_attachment_links_on_singles( $link, $id ){\n\tif ( wp_attachment_is_image( $id ) && ( is_singular( 'post' ) || is_page()) ) {\n\t\treturn $link . '#';\n\t}\n\treturn $link;\n}", "function wc_fix_product_attachment_link($link, $post_id)\n {\n }", "function wp_get_attachment_li...
[ "0.676985", "0.6579853", "0.63246745", "0.63079935", "0.6185912", "0.6179502", "0.60755634", "0.6005625", "0.59733427", "0.5909632", "0.5907285", "0.58458936", "0.5769077", "0.5768783", "0.57670623", "0.5748395", "0.5734733", "0.5698687", "0.5587686", "0.55358094", "0.5523234...
0.8188471
0
Filter attributes of [mla_gallery] to enable Fullscreen Galleria mode by default Fullscreen Galleria plugin hooks into [gallery] and requires [gallery link='file'] to function. We use [mla_gallery] instead, which requires mla_alt_shortcode="gallery" to load as [gallery]. SO: We filter attributes of [mla_gallery] to add...
Фильтруем атрибуты [mla_gallery], чтобы включить режим Fullscreen Galleria по умолчанию. Плагин Fullscreen Galleria подключается к [gallery] и требует [gallery link='file'] для работы. Мы используем [mla_gallery] вместо этого, который требует mla_alt_shortcode="gallery", чтобы отображаться как [gallery]. Таким образом:...
function sarah_filter_mla_gallery_raw_attributes($atts) { // Only filter atts if Fullscreen Galleria is active if (!is_plugin_active('fullscreen-galleria/galleria-fs.php')) return $atts; // Don't filter atts if 'mla_output' attribute is set (causes Notices/Warnings) if (isset($atts['mla_output'])) return $a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpgreet_gallery_shortcode( $attr )\n{\n\tglobal $post;\n\t$pid = $post->ID;\n\n\t// wp-greet optionen aus datenbank lesen\n\t$wpg_options = wpgreet_get_options();\n\t\n\t// check if we shall connect wp-greet\n\t// load connected gallery pages\n\t$connectus = in_array((string) $pid,$wpg_options['wp-greet-g...
[ "0.66896695", "0.63944674", "0.6350141", "0.63074917", "0.6239836", "0.6220057", "0.61331826", "0.611148", "0.60811234", "0.6074586", "0.60315543", "0.59756255", "0.59695756", "0.59687835", "0.5919077", "0.59057224", "0.5891799", "0.5874173", "0.5869389", "0.57651335", "0.576...
0.83568245
0
Filter body_class to remove fullwidth when is_attachment 'fullwidth' is added by twentyfourteen_body_classes because it assumes you'll never want to use sidebarcontent on attachments. We do use it there so we need to remove the class as well as adding get_sidebar('content') to image.php
Фильтруйте body_class, чтобы удалить fullwidth, когда is_attachment 'fullwidth' добавляется twentyfourteen_body_classes, так как он предполагает, что вы никогда не захотите использовать sidebarcontent на вложениях. Мы используем его там, поэтому нам нужно также удалить класс и добавить get_sidebar('content') в image.ph...
function sarah_filter_body_class_for_attachments($classes) { if (is_attachment()) $classes = array_diff($classes, array('full-width')); return $classes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bakes_and_cakes_body_classes( $classes ) {\n\n // Adds a class of group-blog to blogs with more than 1 published author.\n if ( is_multi_author() ) {\n $classes[] = 'group-blog';\n }\n\n // Adds a class of hfeed to non-singular pages.\n if ( ! is_singular() ) {\n $classes[] = ...
[ "0.7292155", "0.7074259", "0.6936724", "0.6936282", "0.6841299", "0.68137133", "0.6803305", "0.6762662", "0.6664278", "0.6656466", "0.66429836", "0.6620182", "0.659279", "0.6579874", "0.65789217", "0.6565099", "0.65523416", "0.652668", "0.6501521", "0.6498552", "0.64861494", ...
0.77204466
0
Gets query for [[MonitoringMarks]].
Получает запрос для [[MonitoringMarks]].
public function getMonitoringMarks() { return $this->hasMany(MonitoringMark::className(), ['monitoringId' => 'id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMarks()\n {\n return new Marks\\AllForPageMetric(\n array(\n 'scanned_page_id' => $this->scanned_page_id,\n 'metrics_id' => $this->metrics_id\n )\n );\n }", "protected function query()\n {\n $sql = '\n S...
[ "0.6308246", "0.61776525", "0.595102", "0.57355934", "0.5694776", "0.5551902", "0.548389", "0.53134674", "0.52504206", "0.5195644", "0.50885075", "0.5026644", "0.4990017", "0.4990017", "0.4966802", "0.4947191", "0.48278147", "0.481427", "0.4806687", "0.47646436", "0.476459", ...
0.7193171
0
Tests resetInput with setDefault
Тесты resetInput с setDefault
public function testResetInputWithSetDefault() { $this->specify( "resetInput with setDefault returns invalid HTML Strict", function () { PhTTag::setDoctype(PhTTag::XHTML10_STRICT); $options = 'x_name'; $expected = '<input type="text"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function resetInput(){ }", "public function test_reset() {\n\t\t$reset1 = '<input type=\"reset\">'.PHP_EOL;\n\t\t$this->assertEquals($reset1, Form::reset(null));\n\n\t\t$reset2 = '<input type=\"reset\" value=\"\">'.PHP_EOL;\n\t\t$this->assertEquals($reset2, Form::reset(''));\n\n\t\t$reset3 = '<inpu...
[ "0.8303012", "0.6991745", "0.68784195", "0.68065864", "0.6721721", "0.67091", "0.67091", "0.66845405", "0.6641504", "0.6634556", "0.6618637", "0.66104734", "0.6530935", "0.645877", "0.64436144", "0.6435348", "0.6435348", "0.6435348", "0.6435348", "0.6435348", "0.6435348", "...
0.72706205
1
Tests resetInput with displayTo
Тесты resetInput с displayTo
public function testResetInputWithDisplayTo() { $this->specify( "resetInput with displayTo returns invalid HTML Strict", function () { PhTTag::setDoctype(PhTTag::XHTML10_STRICT); $options = 'x_name'; $expected = '<input type="text" i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function resetInput(){ }", "public function showReset();", "public function test_reset() {\n\t\t$reset1 = '<input type=\"reset\">'.PHP_EOL;\n\t\t$this->assertEquals($reset1, Form::reset(null));\n\n\t\t$reset2 = '<input type=\"reset\" value=\"\">'.PHP_EOL;\n\t\t$this->assertEquals($reset2, Form::r...
[ "0.75552386", "0.67999536", "0.65863246", "0.63080883", "0.60959995", "0.60959995", "0.60733193", "0.602824", "0.6026955", "0.5990065", "0.5915767", "0.5904808", "0.5891486", "0.58911407", "0.5888574", "0.58528894", "0.58461285", "0.58378", "0.58298993", "0.5825102", "0.58206...
0.7633044
0
Drush command to handle NESRM Cookbook Chapter One. Options: list: Lists all the currently executed advisories. revert: Lists all the advisories with a choice of reverting one. module: Asks for a module out of the enabled ones, then lists its permissions with a choise of execute chapter one on it.
Команда Drush для обработки NESRM Cookbook Глава один. Опции: list: Перечисляет все текущие выполненные рекомендации. revert: Перечисляет все рекомендации с возможностью отката одной из них. module: Запрашивает модуль из включенных, затем перечисляет его разрешения с возможностью выполнения главы один на нем.
function nesrm_cookbook_drush_command_chapter_one() { if (drush_get_option('list')) { drush_print(_nesrm_cookbook_drush_command_chapter_one_get_items()); } if (drush_get_option('revert')) { $list = _nesrm_cookbook_drush_command_chapter_one_get_items(); drush_print($list); if ($list != 'Currently n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _nesrm_cookbook_drush_command_chapter_one_get_items() {\n $items = nesrm_cookbook_chapter_one_items();\n if (!empty($items)) {\n $rows[] = array(\n t('Advisory'),\n t('Module name'),\n t('Permission'),\n t('Execution time'),\n );\n foreach ($items as $advisory => $data) {\n ...
[ "0.59931636", "0.56252027", "0.5541019", "0.55042326", "0.54194623", "0.5412368", "0.54034007", "0.53467417", "0.529786", "0.52078736", "0.51468164", "0.5120473", "0.5081768", "0.50672406", "0.50474584", "0.5038351", "0.50357896", "0.5020853", "0.5018635", "0.49819872", "0.49...
0.80828345
0
Get arguments from the super global variable $argv.
Получить аргументы из сверхглобальной переменной $argv.
private function getArguments() { array_shift($GLOBALS["argv"]); return $GLOBALS["argv"]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getArguments()\n {\n return $argv;\n }", "public function getArguments() {\n\t\t$args = isset($_SERVER['argv']) ? (array)$_SERVER['argv'] : array();\n\t\tarray_shift($args);\n\t\treturn $args;\n\t}", "public static function getArgv() {\n return static::$_argv;\n }"...
[ "0.83554417", "0.82486844", "0.78436154", "0.7782915", "0.77204466", "0.77026933", "0.7673673", "0.7646548", "0.7463908", "0.7296474", "0.7296474", "0.72960895", "0.72767437", "0.72441816", "0.708051", "0.707087", "0.69605243", "0.6951582", "0.69328016", "0.69088155", "0.6894...
0.83574146
0
Return product quantity from request string
Возвращение количества товара из строки запроса
protected function getProductQuantityFromRequest() { $quantity = 0; if ($this->arParams['USE_PRODUCT_QUANTITY']) { if (isset($_REQUEST[$this->arParams['PRODUCT_QUANTITY_VARIABLE']])) $quantity = (float)$_REQUEST[$this->arParams['PRODUCT_QUANTITY_VARIABLE']]; } return $quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQuantity()\n {\n return $this->getParameter('Qty');\n }", "public function getQuantity(): string\n {\n return $this->quantity;\n }", "public function quantity();", "public function getQuantity();", "public function getQuantity();", "public function getQuantity...
[ "0.7150589", "0.6733446", "0.65065086", "0.64626795", "0.64626795", "0.64626795", "0.64626795", "0.64626795", "0.64224154", "0.6417814", "0.63967115", "0.6378694", "0.63620746", "0.63329244", "0.63207287", "0.628343", "0.62042654", "0.6196841", "0.6119651", "0.6119651", "0.60...
0.7644321
0
Process request actions list
Список действий обработки запроса
protected function doActionsList() { $this->processBuyAction(); $this->processAddToBasketAction(); $this->processSubscribeAction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_request_actions()\n {\n $input = file_get_contents( 'php://input' );\n\n $request = json_decode( $input );\n\n if ( !is_array( $request ) )\n $request = array( $request );\n\n foreach( $request as $rpc )\n {\n foreach( array( 'type'...
[ "0.73434556", "0.6763253", "0.6477758", "0.6465555", "0.6437391", "0.64333946", "0.64176244", "0.6417248", "0.6401582", "0.6272429", "0.61990535", "0.61946326", "0.61912465", "0.6176192", "0.6164697", "0.6159903", "0.6154589", "0.61525905", "0.615216", "0.6110453", "0.6105513...
0.7514943
0
Return viewed product ids map.
Вернуть карту идентификаторов просматриваемых продуктов.
protected function getProductIdsMap() { $map = array(); if (!Main\Loader::includeModule('sale')) return array(); $basketUserId = (int)CSaleBasket::GetBasketUserID(false); if ($basketUserId <= 0) return array(); $useSectionFilter = ($this->arParams["SHOW_FROM_SECTION"] == "Y"); $sectionSearch = $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductIds()\n\t{\n\t\t$viewed = Mage::getResourceModel('reports/product_index_viewed_collection');\n\t\t$viewed->addIndexFilter();\n\t\treturn $viewed->getColumnValues('product_id');\n\t}", "public function getProductIds()\n {\n return $this->_session->getProductIds();\n }", "p...
[ "0.75243646", "0.7198283", "0.66971403", "0.6673795", "0.65397877", "0.6536299", "0.6514779", "0.65068996", "0.6389038", "0.63395077", "0.63336957", "0.6307928", "0.6252879", "0.623972", "0.62225544", "0.6198302", "0.61128783", "0.6111316", "0.60705775", "0.60684764", "0.6035...
0.733212
1
set prices for all items
установить цены для всех товаров
protected function setItemsPrices() { // Set items Prices foreach ($this->items as &$item) { $item["PRICES"] = array(); $item['MIN_PRICE'] = false; $item["CAN_BUY"] = false; $item['~BUY_URL'] = $this->urlTemplates['~BUY_URL_TEMPLATE'].$item['ID']; $item['BUY_URL'] = $this->urlTemplates['BUY_URL_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPrices($prices,$options = []){\n\t\t$options += [\n\t\t\t\"delete_missing_prices\" => true,\n\t\t];\n\n\t\t$existing = $this->dbmole->selectIntoAssociativeArray(\"SELECT product_id,price FROM pricelist_items WHERE pricelist_id=:this\",[\":this\" => $this]);\n\t\tforeach($prices as $product_id => $price...
[ "0.70560205", "0.70273703", "0.6778526", "0.6714101", "0.6675196", "0.6661525", "0.6647205", "0.65880656", "0.6579251", "0.65564084", "0.6524187", "0.6510104", "0.64760715", "0.6440179", "0.6440179", "0.6370249", "0.63247025", "0.6285469", "0.6236345", "0.62274104", "0.622073...
0.8211289
0
Sets measure for all viewed products.
Измеряет набор для всех просматриваемых продуктов.
protected function setItemsMeasure() { if (!count($this->productIdsMap)) return; $measures = $this->data['MEASURE']; foreach ($this->items as &$item) { if (array_key_exists($item['CATALOG_MEASURE'], $measures)) { $measure = $measures[$item['CATALOG_MEASURE']]; $item['~CATALOG_MEASURE_NAME'] =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setProductivity()\n {\n $this->productivity = random_int(0, 1);\n }", "public function set_rendering_properties() {\n\t\t$this->custom_dimensions = $this->custom_dimensions();\n\t\t$this->active_custom_dimensions_types = $this->active_custom_dimensions_types();\n\t\t$this->cu...
[ "0.5560314", "0.53581375", "0.5329485", "0.5319132", "0.5305274", "0.529042", "0.5159066", "0.5158723", "0.5126184", "0.51012105", "0.50916415", "0.5001767", "0.49850672", "0.49318865", "0.4929649", "0.4929618", "0.49131596", "0.4909403", "0.49064302", "0.4903855", "0.4885447...
0.7023971
0
Prepares $this>selectFields for CIBlockElement::getList() method.
Подготавливает $this>selectFields для метода CIBlockElement::getList().
protected function prepareSelectFields() { $this->selectFields = array( "ID", "IBLOCK_ID", "CODE", "NAME", "ACTIVE", "DATE_ACTIVE_FROM", "DATE_ACTIVE_TO", "DETAIL_PAGE_URL", "DETAIL_PICTURE", "PREVIEW_PICTURE" ); $prices = $this->data['CATALOG_PRICES']; foreach ($prices as $valu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListSelect()\n {\n $nameList = $this->name;\n if ($this->isMultiple()) {\n $nameList .= '[]';\n }\n $this->field = '<select name='.$nameList.' '.$this->listStrAttribut.'>';\n foreach ($this->choiceValue as $name => $value) {\n $selected...
[ "0.68908286", "0.6623564", "0.64722383", "0.642091", "0.6388489", "0.6378202", "0.6286719", "0.62057954", "0.6119169", "0.6115004", "0.6097491", "0.60738176", "0.60598755", "0.60337096", "0.60134727", "0.6004643", "0.60022634", "0.59863275", "0.5963899", "0.59510064", "0.5942...
0.7618357
0
eXpansion method invoked Manialive onInit
Метод eXpansion вызывает Manialive наInit
public function exp_onInit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final function onInit() {\n $this->exp_maxp = \\ManiaLivePlugins\\eXpansion\\Core\\eXpansion::getInstance();\n\n $this->exp_unloading = false;\n $this->relay = \\ManiaLivePlugins\\eXpansion\\Core\\RelayLink::getInstance();\n \\ManiaLivePlugins\\eXpansion\\Core\\i1...
[ "0.7955005", "0.7468093", "0.73939854", "0.7364293", "0.7332432", "0.7305048", "0.7255009", "0.72364485", "0.7219004", "0.71795183", "0.71706706", "0.7071391", "0.70359474", "0.7013323", "0.69889915", "0.6988191", "0.6961915", "0.69529057", "0.69409573", "0.69409573", "0.6940...
0.8141899
0
eXpansion method invoked at Manialive onload
Метод eXpansion, вызываемый при загрузке Manialive
public function exp_onLoad() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function eXpOnLoad()\n {\n }", "public final function onInit() {\n $this->exp_maxp = \\ManiaLivePlugins\\eXpansion\\Core\\eXpansion::getInstance();\n\n $this->exp_unloading = false;\n $this->relay = \\ManiaLivePlugins\\eXpansion\\Core\\RelayLink::getInstance(...
[ "0.77100575", "0.6872968", "0.6827539", "0.67540175", "0.6620095", "0.65412587", "0.6373631", "0.63228536", "0.63228536", "0.6175337", "0.61332303", "0.60750073", "0.60316116", "0.598752", "0.59113014", "0.59113014", "0.58841026", "0.5872171", "0.58243394", "0.57844913", "0.5...
0.75248617
1
Check for Game compability
Проверка совместимости игры
public static function exp_checkGameCompability() { $gameInfo = \ManiaLive\Data\Storage::getInstance()->gameInfos; $class = get_called_class(); if (isset(self::$plugin_gameModeSupport[$class])) { if ($gameInfo->gameMode == GameInfos::GAMEMODE_SCRIPT && isset(self::$p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isCompilable();", "protected function checkPlatform() {}", "public function isGameActive();", "function similetimeline_component_checkversion()\n{\n if (!function_exists('get_product_release'))\n return false;\n if (get_product_release() < 126)\n return false;\n return ...
[ "0.630399", "0.6263583", "0.6242923", "0.6178556", "0.61611766", "0.6133179", "0.60607594", "0.59683526", "0.5883224", "0.5798082", "0.57907295", "0.57790583", "0.5749217", "0.5743575", "0.5722458", "0.56771135", "0.56736195", "0.56705284", "0.56704503", "0.56605506", "0.5650...
0.8045762
0
Deactivate chat redirect to send it back throught the chat
Деактивировать перенаправление чата, чтобы отправить его обратно через чат
public function exp_deactivateChatRedirect() { unset(self::$exp_chatRedirected[get_class($this)]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function eXpDeactivateChatRedirect()\n {\n unset(self::$eXpChatRedirected[get_class($this)]);\n }", "public function exp_deactivateAnnounceRedirect() {\n unset(self::$exp_announceRedirected[get_class($this)]);\n }", "public function eXpDeactivateAnnounceRedirec...
[ "0.8060008", "0.62729186", "0.6142915", "0.6025816", "0.5990489", "0.59657466", "0.5903491", "0.5780476", "0.5675922", "0.565386", "0.56535304", "0.5607837", "0.5559571", "0.55594033", "0.55535305", "0.55320215", "0.5522452", "0.5515509", "0.55115044", "0.5481888", "0.5464815...
0.82205826
0
codereview.stackexchange.com/questions/45784/test2timerangestoseeiftheyoverlap / Ensures that 2 time ranges dont overlap, works for dates and times
codereview.stackexchange.com/questions/45784/test2timerangestoseeiftheyoverlap / Обеспечивает, что два временных интервала не перекрываются, работает для дат и времени
function rangeNoOverlap($start_time1,$end_time1,$start_time2,$end_time2){ $utc = new DateTimeZone('UTC'); $start1 = new DateTime($start_time1,$utc); $end1 = new DateTime($end_time1,$utc); $start2 = new DateTime($start_time2,$utc); $end2 = new DateTime($end_time2,$utc); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function time_overlaps($exp_start_time, $exp_end_time, $vs_start_time, $vs_duration) {\n //echo \"vs start time: '$vs_start_time'\\n\";\n //echo \"vs duration: '$vs_duration'\\n\";\n\n $vs_start = new DateTime($vs_start_time);\n $vs_end = clone $vs_start;\n $vs_end->add(new DateInterval('PT' . $...
[ "0.75445044", "0.6838517", "0.6772039", "0.67396915", "0.65930134", "0.64787585", "0.6428365", "0.63377213", "0.6311182", "0.62929523", "0.62569314", "0.62020665", "0.61510336", "0.6120967", "0.61167234", "0.61061186", "0.60888314", "0.6041364", "0.60360456", "0.6014002", "0....
0.7909855
0
Customizes the editor role Adds theme option and gravity form capabilities
Настраивает роль редактора Добавляет опцию темы и возможности формы гравити
function psa_customize_editor_role() { $role = get_role('editor'); $role->add_cap('edit_theme_options'); $role->add_cap('gravityforms_edit_forms'); $role->add_cap('gravityforms_delete_forms'); $role->add_cap('gravityforms_create_form'); $role->add_cap('gravityforms_view_entries'); $role->add_cap('gravityforms_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addEditorCaps()\n\t{\n\t\t$role_object = get_role( 'editor' );\n\n\t\t//Edit menus\n\t\tif (!$role_object->has_cap('edit_theme_options')) {\n\t\t\t$role_object->add_cap( 'edit_theme_options' );\n\t\t}\n\n\t\t//Hide other Theme subpages so they only have access to the menu\n\t\tif (current_user_can(...
[ "0.7463586", "0.6937221", "0.66891927", "0.6583432", "0.6579145", "0.6564017", "0.64815605", "0.6475511", "0.6454115", "0.63980085", "0.6396161", "0.63324213", "0.6307726", "0.628691", "0.6283457", "0.6259111", "0.6253052", "0.62516904", "0.6248637", "0.6246853", "0.6233941",...
0.8259386
0
NOTE the following functions are ugly as sin but were useful for rapidly changing form / make license select menu passing in a prefix, element name, javascript target, db check results, and db results of licenses
Примечание: следующие функции не очень хороши, но были полезны для быстрого изменения формы / создания меню выбора лицензии, передавая префикс, имя элемента, целевой элемент JavaScript, результаты проверки базы данных и результаты лицензий из базы данных
function make_license_select($selectname,$selectid,$jstarget,$checkmod,$licenses){ $licenseselect = "\n\n\t".'<select name="'.$selectname.'" id="'.$selectid.'"'; $licenseselect .= 'onchange="changeRadio(this.value,this.name,'.$jstarget.')"'; $licenseselect .= '>'."\n"; $licenseselect .= "\t\t".'<option value="0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function webquest_choose_from_menu ($options, $name, $selected=\"\", $nothing=\"choose\", $script=\"\",\r\n $nothingvalue=\"0\", $return=false) {\r\n/// $options[\"value\"][\"label\"]\r\n\r\n if ($nothing == \"choose\") {\r\n $nothing = get_string(\"choose\").\"...\";\r\n }\r\n\r\n if ($scri...
[ "0.6391706", "0.62566257", "0.62335455", "0.6028807", "0.59703255", "0.58873844", "0.5858937", "0.58512026", "0.5850873", "0.58472633", "0.5839587", "0.5817361", "0.5797603", "0.5784279", "0.5733953", "0.57309604", "0.5726336", "0.57239187", "0.5711294", "0.5702971", "0.57001...
0.72993314
0
/ make status radio menu passing in a prefix, element name, javascript target, db check results, and db results of statuses
/ создание меню радио-статусов, передавая префикс, имя элемента, целевой объект JavaScript, результаты проверки базы данных и результаты статусов из базы данных
function make_status_inputs ($label,$radioname,$radioid,$val,$jstarget,$checkmod){ global $CFG; $statusinput ="\t".'<div class="doordoor"><input type="radio" value="'.$val.'" id="'.$radioid.'" name="'.$radioname.'"'; $statusinput .= ' onclick="changeSelection('.$jstarget.')"'; if($checkmod->status==$val){ $s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw_set_expstatus_fn()\n\t\t{\n\t\t\t// make array of radio button items\n\t\t\t$items = array(\n\t\t\t\t\t\t\tarray('0', __(\"Hold\", 'contentscheduler'), __(\"Do nothing upon expiration.\", 'contentscheduler') ),\n\t\t\t\t\t\t\tarray('2', __(\"Delete\", 'contentscheduler'), __(\"Move to trash upon expi...
[ "0.6246543", "0.60555595", "0.5995928", "0.5925027", "0.56252134", "0.56227136", "0.54861623", "0.547995", "0.54743916", "0.54581136", "0.5455927", "0.544081", "0.5438036", "0.5435402", "0.5420771", "0.53573644", "0.53524625", "0.52955407", "0.52946657", "0.5275305", "0.52672...
0.70442796
0
Retourne l'ensemble des gares.
Возвращает все станции.
public function getGares(){ return $this->gareRepository->findAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function &getGalleys() {\n\t\t$galleys = &$this->getData('galleys');\n\t\treturn $galleys;\n\t}", "function &getGalleys() {\r\n\t\t$galleys =& $this->getData('galleys');\r\n\t\treturn $galleys;\r\n\t}", "function &getGalleys() {\n\t\t$galleys =& $this->getData('galleys');\n\t\treturn $galleys;\n\t}", "public...
[ "0.6377961", "0.6326166", "0.63085806", "0.5986005", "0.5941869", "0.5931751", "0.58769816", "0.5862227", "0.58141786", "0.57543117", "0.57382065", "0.5709373", "0.5705868", "0.5620459", "0.55931634", "0.5591805", "0.55781096", "0.5558213", "0.5529304", "0.55222744", "0.55084...
0.7005287
0
In this test we ensure that all generated sql_php files are uptodate and can be easily reconstructed.
В этом тесте мы убеждаемся, что все сгенерированные файлы sql_php актуальны и могут быть легко восстановлены.
public function test_sql_to_php_db_installer() { if ($this->_need_skip_test(__FUNCTION__)) { return; } $db_installer = _class('db_installer_mysql', 'classes/db/'); $parser = _class('db_ddl_parser_mysql', 'classes/db/'); $parser->RAW_IN_RESULTS = false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRebuildSql()\n {\n }", "public static function setUpFiles() {\n $sqlPath = self::$baseDir . DIRECTORY_SEPARATOR . 'sql';\n $initPath = self::$baseDir . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'init';\n $schemaPath = self::$baseDir . DIRECTORY_SEPARATOR ...
[ "0.71313727", "0.65587944", "0.63477117", "0.62989867", "0.6119561", "0.59776604", "0.5964783", "0.59329677", "0.5931736", "0.58983517", "0.588043", "0.5855817", "0.58308244", "0.57871", "0.5772487", "0.57712656", "0.57613456", "0.57491755", "0.5738103", "0.5714858", "0.56828...
0.7119151
1
Deserialize a message header from the input stream. A message header is structured as: NAME String MUST UNDERSTAND Boolean LENGTH Int DATA Object
Десериализовать заголовок сообщения из входного потока. Заголовок сообщения имеет следующую структуру: NAME String MUST UNDERSTAND Boolean LENGTH Int DATA Object
public function readHeader() { $name = $this->_inputStream->readUTF(); $mustRead = (bool)$this->_inputStream->readByte(); $length = $this->_inputStream->readLong(); try { $data = $this->_deserializer->readTypeMarker(); } catch (Exception $e) { r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function parseHeader($buffer)\n {\n $data = ord(substr($buffer, 0, 1));\n $msgType = $data >> 4;\n $flags = $data & 0x0f; // 0x0f bin is 0000 1111\n $dup = $flags >> 3;\n $qosFlag = $flags & 0x07; // 0x07 bin is 0000 0111\n $qos = $qosFlag >> 1;\n $...
[ "0.6184345", "0.6131967", "0.586583", "0.57801247", "0.5736118", "0.5702226", "0.5686549", "0.5593321", "0.5534264", "0.54601955", "0.54329276", "0.5420474", "0.5388766", "0.53644", "0.5350824", "0.53424037", "0.52328116", "0.52280074", "0.5219005", "0.5152327", "0.51432574",...
0.7569121
0
Make a string bold using escape characters
Сделайте строку жирной с помощью escape-символов
static function bold( $str ){ return self::ansiEscape( $str, 1 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function bold($text)\n {\n return \"\\033[1m{$text}\\033[0m\";\n }", "public function bold(string $text): static\n {\n return $this->addCell($text, [\"\\033[1m\", \"\\033[0m\"]);\n }", "function html_bold($content, $class='', $options = array()) {\n return html_tag('b', $con...
[ "0.70873225", "0.66147125", "0.64429265", "0.63932425", "0.6227657", "0.6201922", "0.6193394", "0.6193394", "0.60941744", "0.60792315", "0.59515464", "0.5870017", "0.58394307", "0.5800333", "0.57429963", "0.5730929", "0.5714397", "0.5687897", "0.5659024", "0.5659024", "0.5633...
0.828604
0
Make just the first line of a string bold
Сделайте только первую строку строки жирной
static function boldFirstLine( $str ){ $a = preg_split( "/\n/", $str ); $a[0] = self::bold( $a[0] ); return join( "\n", $a ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTextSingleBold($iFirstColumn,$iFirstRow){\n\t\t\t$sFirstColumn=$this->getColumnValueChar($iFirstColumn);\n\t\t\t$sFirstColumn=$sFirstColumn.$iFirstRow;\n\t\t\t$this->excel->getActiveSheet()->getStyle(\"$sFirstColumn\")->getFont()->setBold(true);\n\t\t}", "function fp_firstsentence ($str, $style, $br ...
[ "0.72127753", "0.7032887", "0.6935772", "0.68037796", "0.67277664", "0.65229076", "0.6468725", "0.6270983", "0.6270983", "0.62083006", "0.6154931", "0.5903021", "0.58302176", "0.5772149", "0.57289565", "0.56885105", "0.5662971", "0.5572259", "0.5568669", "0.55636084", "0.5552...
0.85418034
0
Test if the current console environment supports ANSI escape chars
Проверить, поддерживает ли текущая консольная среда ANSI-эскейп-символы
static function supportsAnsiEscapeChars(){ if( preg_match( "/WINNT/", PHP_OS ) ) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ansiColorsSupported()\n{\n return DIRECTORY_SEPARATOR === '\\\\'\n ? getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON'\n : function_exists('posix_isatty') && @posix_isatty(STDOUT);\n}", "protected function hasColorSupport()\n {\n // @codeCoverageIgnoreStart\n ...
[ "0.8302474", "0.7213846", "0.7060135", "0.69881797", "0.66984934", "0.6148487", "0.6133887", "0.6085609", "0.60453314", "0.5899404", "0.5877752", "0.5570565", "0.5503018", "0.54501843", "0.54439414", "0.543768", "0.54313076", "0.5402739", "0.53689003", "0.53515375", "0.534626...
0.7793603
1
Get the package object; if it hasn't been instantiated yet, load it.
Получите объект пакета; если он еще не был инициализирован, загрузите его.
private function packageObject(){ if( $this->_packageObj == null ){ $this->_packageObj = Package::getByHandle( self::PACKAGE_HANDLE ); } return $this->_packageObj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _get_instance() {\n\t\tif(is_null($this->_instance)) {\n\t\t\trequire_once($this->_file);\n\t\t\t$class = '\\\\e\\\\' . ucfirst($this->_name) . '\\\\Bundle';\n\t\t\t$this->_instance = new $class;\n\t\t}\n\t\treturn $this->_instance;\n\t}", "public function getPackage(){\n\t\t\n\t\tif( empty($thi...
[ "0.63905287", "0.6357807", "0.63485307", "0.6122849", "0.6097345", "0.6056715", "0.5976587", "0.5908823", "0.5896219", "0.58699524", "0.5852002", "0.5848346", "0.58390343", "0.5836117", "0.5792894", "0.5778732", "0.5747098", "0.571768", "0.57009625", "0.56960106", "0.56941307...
0.7959342
0
A user has many Login Activities
Пользователь имеет много активностей входа
public function login_activities() { return $this->hasMany(LoginActivity::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loginActivities()\n {\n return $this->hasMany(LoginActivity::class);\n }", "public function activities() {\n return $this->hasMany(LadminLogable::class, 'user_id', 'id');\n }", "public function logins()\n {\n return $this->hasMany('App\\Models\\Login');\n }", "pu...
[ "0.76392186", "0.6490154", "0.6333173", "0.62322736", "0.62317294", "0.61048234", "0.60815", "0.6051228", "0.6002564", "0.588612", "0.5828441", "0.58109677", "0.57607263", "0.572378", "0.57120836", "0.56648123", "0.565751", "0.56524664", "0.56472147", "0.56200665", "0.5572547...
0.7587128
1
A User has many EmailContents
Пользователь имеет много EmailContents
public function email_contents() { return $this->hasMany(EmailContent::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function emails()\n {\n return $this->hasMany('Email');\n }", "public function emails()\n {\n \treturn $this->hasMany(Email::class);\n }", "public function emails()\n {\n return $this->hasMany(PartenaireEmail::class);\n }", "public function emails(): HasMany\n {\n ...
[ "0.6676887", "0.6588383", "0.64683187", "0.6458393", "0.63796073", "0.6375617", "0.6132627", "0.5976569", "0.5920971", "0.57610655", "0.572805", "0.57152146", "0.5697065", "0.56795573", "0.56706893", "0.5642339", "0.56389785", "0.5618461", "0.56139565", "0.56027246", "0.56015...
0.75409895
0
Get default user role
Получить роль пользователя по умолчанию
public static function getDefaultRole() { return static::first() ? 'User' : 'Super Administrator'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultRole()\n\t{\n\t\treturn $this->defaultRole;\n\t}", "public static function getDefaultRole() {\n $res = self::getAll(self::T(DB::ROLE), new DBCond('is_default', 1));\n return (count($res) == 0) ? null : $res[0];\n }", "protected function getDefaultRole()\n {\n return i...
[ "0.84494734", "0.84367394", "0.8297625", "0.8199014", "0.7879785", "0.7630593", "0.7568711", "0.7537188", "0.7533249", "0.7445856", "0.744004", "0.7361969", "0.735932", "0.73463887", "0.73459697", "0.733223", "0.73136336", "0.7291205", "0.72629696", "0.72305626", "0.7206522",...
0.8526038
0
Get resources that are attached to emails
Получить ресурсы, привязанные к электронным письмам
public static function getEmailAttachedResources() { return static::whereHas('emails', function($q){ $q->isNotDeleted()->isNotDraft(); })->orderBy('first_name')->get(['id', 'first_name', 'last_name']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function attachments()\n {\n return $this->attachments;\n }", "function getAttachments() { \n return IncomingMailAttachments::find(array(\n \"conditions\" => array('mail_id = ?', $this->getId()),\n ));\n }", "public function attachments()\n {\n return $this->ha...
[ "0.6960028", "0.68899727", "0.68105894", "0.6691205", "0.66646194", "0.6571083", "0.6571083", "0.65652496", "0.6561791", "0.65574497", "0.65296215", "0.6489637", "0.6427132", "0.64036953", "0.6277151", "0.6216891", "0.6108208", "0.6080828", "0.6063765", "0.60588586", "0.60242...
0.8374203
0
Replace values with actions in column.
Замените значения на действия в столбце.
private function replaceWithActions(ColumnInterface $column, $value) { $actions = $column->getActions(); foreach($actions as $action) { $value = $this->actionReplace($action, $value); } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function augmentColumns($gridField, &$columns)\n {\n if (!in_array('Actions', $columns ?? [])) {\n $columns[] = 'Actions';\n }\n }", "function column_actions(&$action,&$grid,$child_id)\n\t{\n\t\t$data =& $grid['data'];\n\t\t$rows =& $grid['rows'];\n\t\t$cols =& $grid['cols']...
[ "0.5580739", "0.5579369", "0.5413685", "0.53331345", "0.5280426", "0.5197621", "0.51149005", "0.51019424", "0.5092695", "0.50792164", "0.50520813", "0.50497264", "0.504487", "0.50316423", "0.5006993", "0.5006175", "0.49739718", "0.49580705", "0.49564907", "0.49545458", "0.492...
0.73252976
0
Replace a value with an IAction.
Замените значение на IAction.
private function actionReplace(ActionInterface $action, $value) { return $action->replace($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAction($value)\n {\n return $this->set(self::action, $value);\n }", "public function setAction($value = NULL) {\n $this->action = $value;\n }", "public function set_action($value)\n\t{\n\t\t$action = $this->sql_get_action($value);\n\t\t$this->action_id = isset($action['id'])...
[ "0.7290427", "0.7040709", "0.67160916", "0.6712029", "0.6631902", "0.6517377", "0.6354457", "0.63431", "0.6283945", "0.62538415", "0.62538415", "0.62409204", "0.61967534", "0.61321187", "0.60239977", "0.6013137", "0.5965461", "0.5957583", "0.59510386", "0.5918928", "0.5906008...
0.7763586
0
Check if Fusinvinventory need to be updated
Проверить, нужно ли обновить Fusinvinventory
function plugin_fusinvinventory_needUpdate() { $version = "2.3.0"; include (GLPI_ROOT . "/plugins/fusinvinventory/install/update.php"); $version_detected = pluginFusinvinventoryGetCurrentVersion($version); if ((isset($version_detected)) AND ($version_detected != $version)) { return 1; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateUserInventoryStatus()\n {\n }", "public function isInventoryChanged()\n {\n $changeset = \\XLite\\Core\\Database::getEM()\n ->getUnitOfWork()\n ->getEntityChangeSet($this);\n\n return isset($changeset['amount']);\n }", "public function i...
[ "0.72600234", "0.696826", "0.6690439", "0.66792244", "0.64977217", "0.6450994", "0.635478", "0.6312533", "0.6193467", "0.6089452", "0.6062304", "0.60533047", "0.59937257", "0.5983625", "0.5914283", "0.5898238", "0.58923584", "0.5882281", "0.58683074", "0.5862575", "0.58138007...
0.7167618
1
Creates a prime sieve up to $limit. The prime sieve uses ($limit 1) / 2 memory. Use prime_sieve_value($i) to retrieve the index's actual value.
Создает решето простых чисел до $limit. Решето простых чисел использует ($limit 1) / 2 памяти. Используйте prime_sieve_value($i), чтобы получить фактическое значение индекса.
function prime_sieve($limit) { $sievebound = ($limit - 1) / 2; $sieve = array(); for($i = 1; $i < $sievebound; $i++) { array_push($sieve, true); } $crosslimit = sqrt($sievebound); for($i = 1; $i < $crosslimit; $i++) { if($sieve[$i] == true) { for($j = 2 * $i * ($i + 1); $j < $sievebound; $j += 2 * $i + 1) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sieve($limit) {\n $primes = array_fill(0, $limit, true);\n $primes[0] = false;\n $primes[1] = false;\n for ($i = 2; $i < $limit; $i++) {\n if ($primes[$i]) {\n for ($j = $i * $i; $j < $limit; $j += $i) {\n $primes[$j] = false;\n }\n }\n }\n return $primes;\n}", "function sie...
[ "0.8008334", "0.71323544", "0.67244005", "0.6509937", "0.62882495", "0.60115314", "0.5970751", "0.58101153", "0.5785519", "0.5727919", "0.57068354", "0.566107", "0.55732375", "0.5547677", "0.5525122", "0.5506983", "0.5481361", "0.54396325", "0.54385376", "0.5434479", "0.54344...
0.8086067
0
Calculates the prime factors for the number $n. Returns all prime factors with duplicates and unsorted.
Вычисляет простые множители числа $n. Возвращает все простые множители с учетом повторений и без сортировки.
function prime_factors($n) { $factors = array(); $d = 2; while($n > 1) { while($n % $d == 0) { array_push($factors, $d); $n /= $d; } $d += 1; if($d * $d > $n) { if($n > 1) { array_push($factors, $n); } break; } } return $factors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function primeFactors($n)\n{\n $factors = [];\n for ($candidate = 2; $n > 1; $candidate++) {\n for (; $n % $candidate == 0; $n /= $candidate) {\n $factors[$candidate] = isset($factors[$candidate]) ? ($factors[$candidate] + 1) : 1;\n }\n }\n $result = '';\n foreach ($factors ...
[ "0.7717026", "0.7172908", "0.7074416", "0.69722074", "0.67973506", "0.6641918", "0.6617705", "0.64927197", "0.6478972", "0.6257882", "0.6181471", "0.6086308", "0.60457045", "0.6026016", "0.60211587", "0.5923038", "0.59181947", "0.58565944", "0.58006424", "0.5752435", "0.57520...
0.8381615
0
Return HTML for admin navbar
Вернуть HTML для административной панели навигационной панели
private function _getAdminNavbar() { $markup = '<ul role="navigation" class="nav"> <li><a class="site-logo" href="' . $this->view->url(array(), 'home') . '" title="Home"><img src="/images/logo_dark.png" alt="' . Zend_Registry::get('siteName') . '" width="149" height="40" /></a></li> <li> <a href="#" title...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAdminNav()\n {\n return \"\n <ul>\n <li><a href='user.php'>Users</a></li>\n <li><a href='tasks.php'>Tasks</a></li>\n </ul>\n \";\n }", "public function navbar()\n {\n return $...
[ "0.7870276", "0.7612433", "0.74361485", "0.7251991", "0.720046", "0.7200018", "0.7167261", "0.71441716", "0.71433306", "0.71297514", "0.7073786", "0.7057779", "0.70518416", "0.7017565", "0.7017257", "0.70166576", "0.70164603", "0.69989073", "0.6983387", "0.69794995", "0.69737...
0.7989085
0
Init library with a key string
Инициализация библиотеки с помощью строки ключа
public function testInitLibWithKeyString() { $key = 'fake.key:veryFake'; $ably = new AblyRest( $key ); $this->assertTrue( $ably->auth->isUsingBasicAuth(), 'Expected basic auth to be used' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function init($key);", "public function init()\n {\n $this->setRequestPairKey($this->generatePairKey());\n }", "public function testInitLibWithKeyOption() {\n $key = 'fake.key:veryFake';\n $ably = new AblyRest( ['key' => $key ] );\n $this->assertTrue( $ably->au...
[ "0.7614534", "0.6770238", "0.6736518", "0.6468632", "0.6439941", "0.64306873", "0.6367848", "0.6365053", "0.63522893", "0.63502234", "0.63502234", "0.63502234", "0.63502234", "0.63438696", "0.63398826", "0.6328989", "0.6321928", "0.62950486", "0.6266704", "0.6266704", "0.6257...
0.7125909
1
Init library with a specified host
Инициализация библиотеки с указанным хостом
public function testInitLibWithSpecifiedHost() { $opts = [ 'key' => 'fake.key:veryFake', 'restHost' => 'some.other.host', 'httpClass' => 'tests\HttpMockInitTest', ]; $ably = new AblyRest( $opts ); $ably->time(); // make a request $this->assert...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init_config_data($host) { }", "protected function initHostConnection()\n\t{\n\t}", "public function testInitLibWithSpecifiedEnvHost() {\n $ably = new AblyRest( [\n 'key' => 'fake.key:veryFake',\n 'restHost' => 'some.other.host',\n 'environment' => 'sand...
[ "0.6989476", "0.6982658", "0.67164975", "0.63428", "0.6307219", "0.6302913", "0.6302913", "0.6261396", "0.62341475", "0.62290925", "0.6163456", "0.6121475", "0.60558534", "0.60558534", "0.60558534", "0.59918916", "0.59757674", "0.5959399", "0.59396636", "0.5906224", "0.589052...
0.7007051
0
Init library with specified environment AND host
Инициализировать библиотеку с указанным окружением И ВЕСТОЧНЫМ ХОСТОМ
public function testInitLibWithSpecifiedEnvHost() { $ably = new AblyRest( [ 'key' => 'fake.key:veryFake', 'restHost' => 'some.other.host', 'environment' => 'sandbox', 'httpClass' => 'tests\HttpMockInitTest', ] ); $ably->time(); // make a request ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializer() {\n\t\t\tinit_env();\n\t\t}", "function initializer() {\n init_env();\n }", "public function testInitLibWithSpecifiedEnv() {\n $ably = new AblyRest( [\n 'key' => 'fake.key:veryFake',\n 'environment' => 'sandbox',\n 'httpClass' =>...
[ "0.7045247", "0.703998", "0.69318324", "0.6633615", "0.6622834", "0.6592046", "0.63892806", "0.636341", "0.6274212", "0.61900187", "0.6153076", "0.610615", "0.6022174", "0.600602", "0.5996914", "0.59957427", "0.5990669", "0.59839267", "0.5975971", "0.5952001", "0.593166", "...
0.7046862
0
Verify that fallback hosts are working and used in correct order
Проверьте, что резервные хосты работают и используются в правильном порядке
public function testFallbackHosts() { $defaultOpts = new ClientOptions(); $hostWithFallbacks = array_merge( [ $defaultOpts->restHost ], $defaultOpts->fallbackHosts ); $hostWithFallbacksSorted = $hostWithFallbacks; // copied by value sort($hostWithFallbacksSorted); $opts = [ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkisOnCurrentHostInvalidHosts() {}", "public function testCustomHostAndFallbacks() {\n $defaultOpts = new ClientOptions([\n 'restHost' => 'rest.custom.com',\n 'fallbackHosts' => [\n 'first-fallback.custom.com',\n 'second-fallback.custo...
[ "0.74872357", "0.7402986", "0.6941566", "0.6793643", "0.6482894", "0.64501953", "0.6396603", "0.624707", "0.6195347", "0.619175", "0.6121839", "0.6092959", "0.6019076", "0.6007521", "0.5964892", "0.5941", "0.5920979", "0.59201145", "0.59184575", "0.5916079", "0.58435845", "...
0.76784015
0
Verify that custom restHost and custom fallbackHosts are working
Проверьте, что работают пользовательские restHost и пользовательские fallbackHosts
public function testCustomHostAndFallbacks() { $defaultOpts = new ClientOptions([ 'restHost' => 'rest.custom.com', 'fallbackHosts' => [ 'first-fallback.custom.com', 'second-fallback.custom.com', 'third-fallback.custom.com', ], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testNoFallbackOnCustomHost() {\n\n // reuse default options so that fallback host order is not randomized again\n $opts = [\n 'key' => 'fake.key:veryFake',\n 'httpClass' => 'tests\\HttpMockInitTestTimeout',\n 'restHost' => 'custom.host.com',\n ]...
[ "0.80381393", "0.7807072", "0.6945775", "0.6853914", "0.6787857", "0.6681895", "0.6549919", "0.641958", "0.6370256", "0.6316074", "0.62796134", "0.61679274", "0.6111809", "0.6109345", "0.60937697", "0.60898197", "0.6012586", "0.59647214", "0.59091574", "0.58990777", "0.589561...
0.79728466
1
Verify that fallback hosts are not called on a 400 error
Проверьте, что резервные хосты не вызываются при ошибке 400
public function testFallbackHosts400() { $opts = [ 'key' => 'fake.key:veryFake', 'httpClass' => 'tests\HttpMockInitTestTimeout', ]; $ably = new AblyRest( $opts ); $ably->http->httpErrorCode = 401; $ably->http->errorCode = 40101; // auth error tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFallbackHosts() {\n $defaultOpts = new ClientOptions();\n $hostWithFallbacks = array_merge( [ $defaultOpts->restHost ], $defaultOpts->fallbackHosts );\n $hostWithFallbacksSorted = $hostWithFallbacks; // copied by value\n sort($hostWithFallbacksSorted);\n\n $op...
[ "0.7348177", "0.7194029", "0.71199113", "0.7028942", "0.6751798", "0.67173463", "0.665982", "0.65161014", "0.61908156", "0.61802506", "0.617455", "0.6122934", "0.61171544", "0.6078357", "0.606024", "0.60416406", "0.60369927", "0.6023245", "0.59923816", "0.5972118", "0.5919592...
0.7809579
0
Verify that default fallback hosts are NOT used when using a custom host
Проверьте, что по умолчанию не используются запасные хосты при использовании пользовательского хоста
public function testNoFallbackOnCustomHost() { // reuse default options so that fallback host order is not randomized again $opts = [ 'key' => 'fake.key:veryFake', 'httpClass' => 'tests\HttpMockInitTestTimeout', 'restHost' => 'custom.host.com', ]; $ab...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkisOnCurrentHostInvalidHosts() {}", "public function testFallbackHosts() {\n $defaultOpts = new ClientOptions();\n $hostWithFallbacks = array_merge( [ $defaultOpts->restHost ], $defaultOpts->fallbackHosts );\n $hostWithFallbacksSorted = $hostWithFallbacks; // copied by va...
[ "0.7339431", "0.7213042", "0.7127539", "0.67552495", "0.6528344", "0.63127625", "0.6197386", "0.615446", "0.6112215", "0.61046255", "0.608804", "0.6084874", "0.60773206", "0.604623", "0.60365325", "0.5936333", "0.59354186", "0.59105796", "0.59080374", "0.5897887", "0.58954084...
0.74308324
0
Verify that fallback hosts are working first 3 fail, 4th works
Проверьте, что резервные хосты работают: первые 3 не работают, 4-й работает
public function testFallbackHostsFailFirst3() { $opts = [ 'key' => 'fake.key:veryFake', 'httpClass' => 'tests\HttpMockInitTestTimeout', 'httpMaxRetryCount' => 5, ]; $ably = new AblyRest( $opts ); $ably->http->failAttempts = 3; $data = $ably->ti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkisOnCurrentHostInvalidHosts() {}", "public function testFallbackHosts() {\n $defaultOpts = new ClientOptions();\n $hostWithFallbacks = array_merge( [ $defaultOpts->restHost ], $defaultOpts->fallbackHosts );\n $hostWithFallbacksSorted = $hostWithFallbacks; // copied by va...
[ "0.73577285", "0.73352206", "0.71087104", "0.6533355", "0.6525863", "0.63209206", "0.62689745", "0.60354275", "0.5931565", "0.58964086", "0.5869908", "0.5845236", "0.58251184", "0.5798231", "0.57707834", "0.57628816", "0.57383543", "0.57138145", "0.5698358", "0.5639144", "0.5...
0.7719423
0
Verify that the httpMaxRetryCount option is honored
Проверьте, что опция httpMaxRetryCount учитывается
public function testMaxRetryCount() { $opts = [ 'key' => 'fake.key:veryFake', 'httpClass' => 'tests\HttpMockInitTestTimeout', 'httpMaxRetryCount' => 2, ]; $ably = new AblyRest( $opts ); try { $ably->time(); // make a request $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _reset_retry_threshold() {\r\n return $this -> set_retry_threshold(0);\r\n }", "public function allowedRetries(): int\n {\n return !is_null($this->allowedRetries) ? $this->allowedRetries : config('api-health.retries.allowed_retries');\n }", "public function testWithExcee...
[ "0.642092", "0.6383713", "0.63527375", "0.63132113", "0.6278414", "0.6040811", "0.6011444", "0.5967364", "0.5964467", "0.589778", "0.5883235", "0.58825874", "0.57864916", "0.5765157", "0.5728908", "0.57242656", "0.57016075", "0.56859356", "0.56786466", "0.5669628", "0.5661225...
0.7505445
0
Verify accuracy of time (to within 2 seconds of actual time)
Проверить точность времени (в пределах 2 секунд от реального времени)
public function testTimeAndAccuracy() { $opts = [ 'key' => 'fake.key:veryFake', ]; $ably = new AblyRest( $opts ); $reportedTime = intval($ably->time()); $actualTime = intval(microtime(true)*1000); $this->assertTrue( abs($reportedTime - $actualTime) < 2000, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function time_check()\n\t{\n\t\t$time = microtime();\n\t\t$time = explode(' ',$time);\n\t\t$time = $time[1]+$time[0];\n\t\treturn $time;\n\t}", "function checkTime($now) {\n\tif (file_exists(\"../../time.txt\")) {\n\t\t$last = file_get_contents(\"../../time.txt\");\n\t\twhile (($now - $last) < 0.4) {\n\t\t\t$now...
[ "0.6777944", "0.6463643", "0.64263165", "0.6394878", "0.63642377", "0.6215868", "0.6211354", "0.61539084", "0.6110111", "0.59249514", "0.592217", "0.5868877", "0.585979", "0.5840374", "0.5754032", "0.57495284", "0.57198954", "0.5718654", "0.5713041", "0.569816", "0.56877697",...
0.7432602
0
Verify that time fails without valid host
Проверьте, что время не проходит без действительного хоста
public function testTimeFailsWithInvalidHost() { $ablyInvalidHost = new AblyRest( [ 'key' => 'fake.key:veryFake', 'restHost' => 'this.host.does.not.exist', ]); $this->expectException(AblyRequestException::class); $reportedTime = $ablyInvalidHost->time(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_valid_time($time) {\n if (preg_match(\"/(2[0-3]|[01][0-9]):[0-5][0-9]/\", $time)) {\n return true;\n } else {\n return false;\n }\n}", "public static function isValidTime($time) {\n\t\tif (preg_match('#^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$#', $time)) {\n\t\t\treturn...
[ "0.7155359", "0.70150656", "0.70126885", "0.6983333", "0.6965871", "0.69631845", "0.68590504", "0.6795901", "0.6735212", "0.671903", "0.6684286", "0.6667923", "0.656461", "0.6491617", "0.64825463", "0.6467031", "0.6432823", "0.64326304", "0.6317953", "0.6293951", "0.62690634"...
0.7572748
0
Gets a list of allocations, grouped per pool
Получает список выделений, сгруппированный по пулу
public function get_allocations(){ $allocations = []; $query = "SELECT p.id as pool_id, p.start_time as pool_start_time, p.end_time as pool_end_time, r.title, r.estimated_duration, a.* FROM allocations a join pools p on p.id = a.pool_id JOIN requests r on r.rID = a.request_id"; $result = $this->con->query...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_pools(){\n $pools = [];\n\n $query = \"SELECT * FROM pools\";\n\n $result = $this->con->query($query);\n if($result){\n if($result->num_rows > 0){\n while($row = $result->fetch_object()){\n array_push($pools, $row);\n }\n }\n }\n\n return $pool...
[ "0.63798654", "0.5645857", "0.5538192", "0.54936427", "0.5359238", "0.5359238", "0.5346564", "0.53411525", "0.5330301", "0.5296636", "0.5258789", "0.5258789", "0.52030414", "0.51839095", "0.5138132", "0.5119657", "0.5081917", "0.5006349", "0.49761775", "0.4949928", "0.4949443...
0.70214564
0
Returns the allocation associated with a request. If none returns null
Возвращает выделение, связанное с запросом. Если ни одно не найдено, возвращает null
public function get_allocation($request_id){ $allocation = null; $query = "SELECT request_id, agent_name, agent_email, agent_phone, p.start_time as pool_start_time, p.end_time as pool_end_time, r.title, r.estimated_duration FROM allocations a JOIN requests r ON r.rID = a.request_id JOIN pools p ON p.id = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_allocation(){\n\t\treturn $this->arr_allocation;\n\t}", "public function getAllocation() {\n return $this->hasOne(Allocation::className(), ['id' => 'allocationID']);\n }", "public function get_allocation_id(){\n\t\treturn (int) $this->v_allocation_id;\n\t}", "public function ge...
[ "0.6454507", "0.6441734", "0.6235769", "0.6052497", "0.60098165", "0.600937", "0.57933134", "0.5783978", "0.57283914", "0.56772876", "0.56488734", "0.5512267", "0.5486613", "0.5467196", "0.5377665", "0.5299307", "0.5287386", "0.52631015", "0.52493536", "0.52429277", "0.520864...
0.7632551
0
Returns a list of all available pools
Возвращает список всех доступных пулов
public function get_pools(){ $pools = []; $query = "SELECT * FROM pools"; $result = $this->con->query($query); if($result){ if($result->num_rows > 0){ while($row = $result->fetch_object()){ array_push($pools, $row); } } } return $pools; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listPools()\n {\n return $this->request('list-pools');\n }", "public function getPoolsList(){\n return $this->_get(2);\n }", "public function getTargetPools()\n {\n return $this->target_pools;\n }", "public function getTargetPools()\n {\n return $thi...
[ "0.82225066", "0.77734184", "0.6709256", "0.6709256", "0.6458888", "0.63763356", "0.6145628", "0.608076", "0.608076", "0.60424227", "0.60424227", "0.6029861", "0.59999925", "0.5978349", "0.592611", "0.5919819", "0.58731806", "0.5797047", "0.57917845", "0.5785481", "0.5722107"...
0.81219226
1
Get the Child ID Property Method makes sure that the relationship id property exists for this object
Метод получения свойства Child ID гарантирует, что свойство идентификатора отношения существует для этого объекта
function _getChildIdProperty( $child = null, $model = null ) { //reasons to fail if (is_null($child)) return false; //initializing variables $replace = array('#__','byrdlist_'); $child = str_replace($replace, "", $child); $child = '_'.strtolower(trim($child)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRelatedObjectId();", "public function getBelongToId()\n {\n return $this->id;\n }", "function GetID() {\n if ($this->id == '') {\n if ($this->parent) {\n return $this->parent->GetID(); // same id as parent.\n } \n\treturn ''; //!< blank\n } \n ...
[ "0.6988065", "0.6771609", "0.67305773", "0.66803575", "0.66568625", "0.6604512", "0.6560909", "0.64788103", "0.64344096", "0.6416996", "0.6416996", "0.6376091", "0.6328837", "0.6308074", "0.62936693", "0.6246721", "0.62457234", "0.6241704", "0.6237383", "0.62370783", "0.62370...
0.7703668
0
Check if an item is checked out This function can be used as a static function too, when you do so you need to also provide the a value for the $against parameter.
Проверьте, выдан ли элемент. Эта функция может использоваться и как статическая функция, при этом если вы это делаете, необходимо также предоставить значение параметра $against.
function isCheckedOut( $with = 0, $against = null) { if(isset($this) && is_a($this, 'JTable') && is_null($against)) { $against = $this->get( 'checked_out' ); } //item is not checked out, or being checked out by the same user if (!$against || $against == $with) { return false; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isCheckedOut( $user_id=0 ) {\n if ($user_id) {\n return ($this->checked_out && $this->checked_out != $user_id);\n } else {\n return $this->checked_out;\n }\n }", "function isCheckedOut( $uid=0 )\n\t{\n\t\tif ($this->_loadData())\n\t\t{\n\t\t\tif ($uid) {\n\t...
[ "0.663373", "0.6562821", "0.63190657", "0.5615723", "0.56102526", "0.5563074", "0.55168873", "0.54815143", "0.543619", "0.5389646", "0.5340722", "0.52924204", "0.5288839", "0.5280061", "0.52518713", "0.52197784", "0.51462376", "0.5135726", "0.5134994", "0.51332426", "0.513285...
0.7535061
0
Save the Custom Properties
Сохранить пользовательские свойства
function saveCustomProperties() { //initializing variables $properties = $this->getProperties(); foreach ($properties as $property => $value) { if ( substr($property,-2) !== '_c' ) { unset($properties[$property]); } } $this->_save( $pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save_settings()\n {\n }", "public function saveAllProps()\n {\n // clear all prop\n $this->clearAllProps();\n\n // save all prop in DB\n foreach ($this->_props as $name => $value) {\n Connection::Query(\"INSERT INTO `property` VALUES ('{$thi...
[ "0.69527036", "0.6910333", "0.6633881", "0.6633881", "0.65810966", "0.656014", "0.65550387", "0.6549058", "0.6527491", "0.65268433", "0.6512573", "0.6484884", "0.6473009", "0.644886", "0.64197844", "0.64108294", "0.6392718", "0.6359077", "0.63570845", "0.6351623", "0.6344341"...
0.8039054
0
Establece el valor del atributo iid_activ de ActividadAsignatura
Устанавливает значение атрибута iid_activ из ActividadAsignatura
function setId_activ($iid_activ) { $this->iid_activ = $iid_activ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setId_activ($iid_activ = '')\n {\n $this->iid_activ = $iid_activ;\n }", "function setId_tipo_activ($iid_tipo_activ = '')\n {\n $this->iid_tipo_activ = $iid_tipo_activ;\n }", "function getId_activ()\n {\n if (!isset($this->iid_activ) && !$this->bLoaded) {\n ...
[ "0.7622475", "0.74961674", "0.7137307", "0.7137307", "0.6752726", "0.65769345", "0.6428118", "0.6428118", "0.63956237", "0.6339138", "0.6339138", "0.6339138", "0.6339138", "0.6339138", "0.6339138", "0.6339138", "0.6339138", "0.6280557", "0.6277672", "0.6256872", "0.62191176",...
0.7569311
1
Recupera el atributo iid_asignatura de ActividadAsignatura
Восстановите атрибут iid_asignatura из ActividadAsignatura
function getId_asignatura() { if (!isset($this->iid_asignatura) && !$this->bLoaded) { $this->DBCarregar(); } return $this->iid_asignatura; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setId_asignatura($iid_asignatura)\n {\n $this->iid_asignatura = $iid_asignatura;\n }", "function setId_tipo_activ($iid_tipo_activ = '')\n {\n $this->iid_tipo_activ = $iid_tipo_activ;\n }", "function setId_activ($iid_activ = '')\n {\n $this->iid_activ = $iid_activ;\n...
[ "0.7480012", "0.6291043", "0.6249186", "0.6211968", "0.61749876", "0.593724", "0.5866688", "0.5866688", "0.5814852", "0.5800373", "0.5780361", "0.5725041", "0.5720546", "0.5669659", "0.56300294", "0.5612427", "0.5610276", "0.5597109", "0.55925757", "0.5582959", "0.5564744", ...
0.7025099
1
Establece el valor del atributo iid_asignatura de ActividadAsignatura
Устанавливает значение атрибута iid_asignatura класса ActividadAsignatura
function setId_asignatura($iid_asignatura) { $this->iid_asignatura = $iid_asignatura; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getId_asignatura()\n {\n if (!isset($this->iid_asignatura) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_asignatura;\n }", "function setId_tipo_activ($iid_tipo_activ = '')\n {\n $this->iid_tipo_activ = $iid_tipo_activ;\n }", "fu...
[ "0.69987077", "0.6288994", "0.62663776", "0.6193126", "0.60220873", "0.59495294", "0.5849312", "0.5810631", "0.57544404", "0.57544404", "0.57377225", "0.56930685", "0.5668665", "0.5647448", "0.5607131", "0.55762005", "0.55567104", "0.55563116", "0.55486804", "0.5534757", "0.5...
0.74026275
0
Establece el valor del atributo df_ini de ActividadAsignatura Si df_ini es string, y convert=true se convierte usando el formato webDateTimeLocal>getFormat(). Si convert es false, df_ini debe ser un string en formato ISO (Ymd). Corresponde al pgstyle de la base de datos.
Устанавливает значение атрибута df_ini объекта ActividadAsignatura. Если df_ini является строкой, и convert=true, то преобразование выполняется с использованием формата webDateTimeLocal>getFormat(). Если convert=false, то df_ini должен быть строкой в формате ISO (Ymd). Соответствует pgstyle базы данных.
function setF_ini($df_ini = '', $convert = true) { if ($convert === true && !empty($df_ini)) { $oConverter = new core\ConverterDate('date', $df_ini); $this->df_ini = $oConverter->toPg(); } else { $this->df_ini = $df_ini; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setF_ini($df_ini = '', $convert = TRUE)\n {\n if ($convert === TRUE && !empty($df_ini)) {\n $oConverter = new core\\ConverterDate('date', $df_ini);\n $this->df_ini = $oConverter->toPg();\n } else {\n $this->df_ini = $df_ini;\n }\n }", "function...
[ "0.7243703", "0.6680041", "0.6680041", "0.652013", "0.6008486", "0.56436604", "0.55494547", "0.53568316", "0.53477216", "0.53305733", "0.5296757", "0.5296757", "0.5152554", "0.51469266", "0.5139185", "0.509604", "0.50178385", "0.50096214", "0.4987378", "0.4923155", "0.4854961...
0.7226608
1
Embeds the input group addon
Встраивает входную группу дополнения
protected function embedAddon($input) { if (empty($this->addon) || $this->is_popup) { return $input; } $group = ArrayHelper::getValue($this->addon, 'groupOptions', []); $size = isset($this->size) ? ' input-group-' . $this->size : ''; Html::addCssClass($group, 'in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_ACF_input_group($data, $input_data, $editable){\n $HTML_data = \"<div class='form-group'><label for= '{$data['name']}'> {$data['label']} </label><div class='input-group'><input name={$data['name']} type= {$data['type']} class=form-control id= '{$data['name']}' value='{$input_data}' placeholder=...
[ "0.6508679", "0.61878777", "0.6115708", "0.60538965", "0.58712983", "0.5799845", "0.57867205", "0.5707816", "0.5684292", "0.5655346", "0.5652161", "0.56324625", "0.5613492", "0.5604092", "0.55684984", "0.55360055", "0.5516435", "0.5463766", "0.545555", "0.5439342", "0.5413731...
0.7301566
0
Determine if the given user possesses the audiobook
Определите, имеет ли указанный пользователь аудиокнигу
public function possessesAudioBook(User $user) { return $this->users()->where('user_id', $user->id )->count() === 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_my_book()\r\n{\r\n global $book, $userdata;\r\n\r\n\tif (is_user_logged_in())\r\n\t{\r\n get_currentuserinfo();\r\n return $book->reader == $userdata->ID;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n}", "public function isAudio(): bool\n {\n return substr($this->...
[ "0.6520376", "0.6312255", "0.61700225", "0.6082212", "0.6032468", "0.5992741", "0.58998364", "0.58880234", "0.58351576", "0.58089596", "0.5759701", "0.5754854", "0.56814975", "0.5632453", "0.55859286", "0.55795085", "0.55595064", "0.55575335", "0.5549601", "0.55205506", "0.55...
0.73871934
0
Get progression for a given User
Получить прогрессию для заданного пользователя
public function getProgress(User $user) { $item = $this->users()->where('user_id', $user->id)->first()->pivot; if ($item->status == self::STATUS_UNREAD) { $progression = 0; } elseif ($item->status == self::STATUS_FINISHED) { $progression = $this->getDuration(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNextLevelProgress(User $user)\n {\n }", "public function get_progress_percentage( WP_User $user ): int {\n\t\t// TODO: Memoize, tests, hook.\n\n\t\t// TODO: implement it.\n\t\treturn 0;\n\t}", "public function user_progress() {\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\treturn;\n\t\t}\...
[ "0.7297263", "0.70604455", "0.67737234", "0.6574102", "0.6517503", "0.6489278", "0.6334101", "0.63336647", "0.6271375", "0.6246447", "0.61576366", "0.6130911", "0.61121064", "0.6037777", "0.6029958", "0.6015218", "0.5959825", "0.59091926", "0.5880406", "0.58509696", "0.583733...
0.754454
0
Get label for total duration
Получить метку для общей продолжительности
public function getDurationLabel() { $duration = $this->getDuration(); if($duration == 0) { return null; } else { $carbon = Carbon::createFromTimestampMs($duration); if($carbon->hour >= 1){ if($carbon->minute >= 1){ retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTimerTotal($label) {\n return $this->total_time[$label];\n }", "public function get_progress_label() {\n\t\t$current_step = $this->get_current_step();\n\t\t$steps = $this->get_steps();\n\t\t$label = '';\n\t\tif ( isset($steps[$current_step]) ) {\n\t\t\t$step = $steps[$current_step];\...
[ "0.678381", "0.668955", "0.6656078", "0.6410373", "0.6371785", "0.63524574", "0.6225723", "0.61669505", "0.6155599", "0.60988593", "0.6011624", "0.59913254", "0.5989955", "0.594929", "0.5948169", "0.5946096", "0.5895286", "0.5882759", "0.58674127", "0.5866114", "0.5863584", ...
0.81079584
0
/ Deletes the given instance privilege from the DB
Удаляет указанное право на экземпляр из БД
function deleteInstancePrivilege($instancePrivilegeID, $moduleID){ if(!Security::privilege(new ModulePrivilege("TransferRole", $moduleID))) return "Insufficient privileges"; $instancePrivs = new InstancePrivileges(array()); $errorString = $instancePrivs->deletePrivilege($instancePrivilegeID, true); return $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_method($instance_id);", "public function DeleteInstance()\n {\n $sTmpInstanceID = $this->instanceID;\n $this->OnDeleteInstance();\n $this->instanceID = $sTmpInstanceID;\n $this->_ClearInstance();\n $sPageId = $this->global->GetUserData('pagedef');\n ...
[ "0.6790989", "0.6696059", "0.64972067", "0.64495665", "0.6434545", "0.6378784", "0.63127995", "0.6256382", "0.6253548", "0.6245802", "0.6236857", "0.62260723", "0.61999923", "0.6182593", "0.6171074", "0.61635035", "0.61199886", "0.61097187", "0.61097187", "0.6107382", "0.6067...
0.7353567
0
Routes::loadFile() Load a routes config file. Valid files are JSON as described below, or a similarly formatted PHP array with the array going into a variable called "$routes".
Routes::loadFile() Загрузить файл конфигурации маршрутов. Допустимые файлы — JSON, описанный ниже, или аналогично оформленный массив PHP, который помещается в переменную с именем "$routes".
public static function loadFile($file) { /* stop if empty */ if (empty($file)) { throw new RouteException('Empty routes file provided.'); } /* make sure the file exists and can be read */ if (!file_exists($file) || !is_readable($file)) { throw new RouteException('Routes file, '.$file.', eithe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load($fileRoutes)\n {\n if (file_exists($fileRoutes)) {\n $this->routes = include $fileRoutes;\n } else {\n throw new Exception('Le fichier \"/config/routes.php\" n\\'existe pas !');\n }\n }", "protected function loadRoutes(string $filename='')\n ...
[ "0.7410608", "0.73252815", "0.73131424", "0.72295624", "0.72295624", "0.718996", "0.71753514", "0.68603605", "0.68348336", "0.67151904", "0.66902083", "0.6626363", "0.6620894", "0.6582316", "0.6559407", "0.65486366", "0.6544343", "0.6535189", "0.6533649", "0.6462817", "0.6423...
0.77265227
0
Routes::_checkRoute() Validate a route against the provided URL for a match.
Routes::_checkRoute() Проверить маршрут на соответствие предоставленному URL.
protected static function _checkRoute($url, $route) { /* validate the request method */ if (App::valid('method', $route)) { /* standardize the request limits if provided */ if (is_string($route['method'])) { $route['method'] = [strtolower(trim($route['method']))]; } /* check to see if th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateRouteIsValid($key, $value, $params, $rule)\n\t{\n\t\tif (empty($value))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t$route_required = $params[0];\n\n\t\tee()->load->library('template_router');\n\n\t\ttry\n\t\t{\n\t\t\t$ee_route = new EE_Route($value, $route_required);\n\t\t}\n\t\tcatch (\\Exce...
[ "0.66395926", "0.65821874", "0.65608346", "0.6545016", "0.6493882", "0.64932406", "0.6487101", "0.6476438", "0.6401446", "0.63700885", "0.6355775", "0.628143", "0.6268926", "0.6218886", "0.62144536", "0.61988693", "0.6149944", "0.6132864", "0.6074797", "0.60703903", "0.606551...
0.7444591
0
Routes::_processHandler() Proccess the route handler. Handlers can be a callable function, reference to a plugin or other class.
Routes::_processHandler() Обработка маршрутизатора. Обработчики могут быть callable-функцией, ссылкой на плагин или другую класс.
protected static function _processHandler($route, $params) { /* process the handler based on the type */ switch (true) { /* handle anon functions */ case (is_callable($route['handler'])): return (string) call_user_func_array($route['handler'], $params); break; /* handle class references...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process_route()\n{\n Route::execute(ROUTE_DELEGATOR, ROUTE_ACTION, ROUTE_RESOURCE);\n}", "public function doHandler()\n {\n $this->path = $this->getUrlPath($this->url);\n $this->handler = $handler = $this->getHandler();\n if (!is_null($handler[1]) && method_exists($this, $hand...
[ "0.6638462", "0.6601463", "0.6567201", "0.651336", "0.63917243", "0.6235338", "0.6175835", "0.61463636", "0.613061", "0.60876155", "0.605162", "0.6043785", "0.6031363", "0.6015295", "0.60044277", "0.59863013", "0.5984983", "0.5971366", "0.5967815", "0.59612125", "0.595618", ...
0.7400576
0
Add skiplinks for screen readers and keyboard navigation
Добавить ссылки для пропуска для экранных читалок и навигации с клавиатуры
function utility_pro_skip_links() { // Call function to add IDs to the markup. utility_skiplinks_markup(); // Write HTML, skiplinks in a list with a heading. echo '<h2 class="screen-reader-text">' . esc_html__( 'Skip links', 'utility-pro' ) . '</h2>' . "\n"; echo '<ul class="wpacc-genesis-skip-link">' . "\n"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refined_magazine_do_skip_to_content_link()\r\n {\r\n ?>\r\n <a class=\"skip-link screen-reader-text\"\r\n href=\"#content\"><?php esc_html_e('Skip to content', 'refined-magazine'); ?></a>\r\n <?php\r\n }", "function utility_skiplinks_markup() {\n\n\tadd_filter( 'gene...
[ "0.6778929", "0.6677403", "0.6587228", "0.6441694", "0.63879806", "0.6222584", "0.61271375", "0.60288066", "0.6024842", "0.589639", "0.58556104", "0.5846722", "0.5842161", "0.5842161", "0.58378804", "0.5836226", "0.5830172", "0.5820189", "0.580937", "0.5758341", "0.57561314",...
0.74547815
0
delete all cached files
удалить все кэшированные файлы
public function clearCache() { $files = glob($this->getConfig('cacheDir') . '/*', GLOB_MARK); foreach ($files as $file) { unlink($file); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearAllCache() {\n\t\t$cache_dir = $this->trimPath($this->_options['cache_dir']);\n\t\t$fs = @scandir($cache_dir);\n\t\tforeach ($fs as $f) {\n\t\t\t$path = $cache_dir . DIR_SEP . $f;\n\t\t\tif (is_file($path)) {\n\t\t\t\tif (preg_match(\"/\\.php$/\", $f)) {\n\t\t\t\t\t@unlink($path);\n\t\t\t\t}\n...
[ "0.8417347", "0.8413887", "0.8338388", "0.83254427", "0.8178186", "0.8168165", "0.8122548", "0.80895275", "0.8084467", "0.8072393", "0.80579907", "0.8020154", "0.800911", "0.7901821", "0.7866043", "0.7858045", "0.7841258", "0.778886", "0.7766533", "0.7698156", "0.7697948", ...
0.84799063
0