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
/ returns true if $hostname is a valid hostname
возвращает true, если $hostname является допустимым именем хоста
function is_hostname($hostname) { if (!is_string($hostname)) return false; if (preg_match("/^[a-z0-9\-]+$/i", $hostname)) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validate_hostname($hostname)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! Network_Utils::is_valid_hostname($hostname))\n return lang('network_hostname_invalid');\n }", "public function validate_hostname($hostname)\n {\n clearos_profile(__METHOD__...
[ "0.81528115", "0.79718345", "0.78194827", "0.779338", "0.74746937", "0.7440456", "0.7331452", "0.7255167", "0.7119993", "0.7092854", "0.70719105", "0.69391084", "0.68128335", "0.66650236", "0.66574264", "0.6636548", "0.65912044", "0.65386444", "0.6537259", "0.6532498", "0.648...
0.8761024
0
/ returns true if $domain is a valid domain name
возвращает true, если $domain является допустимым именем домена
function is_domain($domain) { if (!is_string($domain)) return false; if (preg_match("/^([a-z0-9\-]+\.?)*$/i", $domain)) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validDomain( $domain ) {\n return true;\n }", "public function validDomain( $domain )\n {\n return true;\n }", "function validDomain( $domain ) {\n return true;\n }", "public static function isValidDomain($domain) {\n if(preg_match('/-./', $domain) || ...
[ "0.87526476", "0.873287", "0.85558826", "0.85188353", "0.837303", "0.83640456", "0.8165741", "0.80426216", "0.7968133", "0.78725886", "0.78071404", "0.775144", "0.7735688", "0.77342963", "0.76851034", "0.7676669", "0.7646399", "0.7634051", "0.7633459", "0.75174505", "0.743162...
0.8840354
0
/ returns true if $uname is a valid DynDNS username
Возвращает true, если $uname является допустимым именем пользователя DynDNS
function is_dyndns_username($uname) { if (!is_string($uname)) return false; if (preg_match("/[^a-z0-9\-.@_]/i", $uname)) return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function username_check($str) {\n // return FALSE;\n return TRUE;\n }", "private function userNameValidate($uName){\n //Search Pattern\n if(preg_match(\"/^[a-zA-Z0-9]*$/\",$uName)){\n $result = true;\n }else{\n $result = false;\n }\n ...
[ "0.72248864", "0.71009403", "0.70157176", "0.69413257", "0.6914743", "0.68871325", "0.6863061", "0.68270785", "0.68192786", "0.68052053", "0.67901844", "0.6769922", "0.6717837", "0.6716109", "0.6708862", "0.670763", "0.6701221", "0.66877586", "0.6686391", "0.664007", "0.66263...
0.89696723
0
/ returns true if $macaddr is a valid MAC address
возвращает true, если $macaddr является допустимым адресом MAC
function is_macaddr($macaddr) { if (!is_string($macaddr)) return false; $maca = explode(":", $macaddr); if (count($maca) != 6) return false; foreach ($maca as $macel) { if (($macel === "") || (strlen($macel) > 2)) return false; if (preg_match("/[^0-9a-f]/i", $macel)) return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function Validate(string $mac):bool\n {\n if (strlen($mac) != 17) return false;\n\n return preg_match(\"/[0-9A-F][0-9A-F][:][0-9A-F][0-9A-F][:][0-9A-F][0-9A-F][:][0-9A-F][0-9A-F][:][0-9A-F][0-9A-F][:][0-9A-F][0-9A-F]/\", $mac) == 1;\n }", "function validateMac($mac) {\n \tretur...
[ "0.73650175", "0.72307813", "0.6983553", "0.6973059", "0.6968318", "0.6700543", "0.6588588", "0.6487835", "0.61525095", "0.58822346", "0.5867608", "0.57499236", "0.5645127", "0.54583323", "0.545373", "0.5372331", "0.5195147", "0.5166992", "0.51393926", "0.50979716", "0.506239...
0.86472756
0
/ returns true if $name is a valid name for an alias
возвращает true, если $name является допустимым именем для псевдонима
function is_validaliasname($name) { if (!preg_match("/(:word:)/", $name)) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAlias( $name );", "function is_alias($name) {\n\n\tglobal $aliastable;\n\n\treturn isset($aliastable[$name]);\n}", "public function isValidAlias($alias);", "public function isAlias($name)\n {\n return isset($this->aliases[$name]);\n }", "final private static function _is_pack...
[ "0.83953047", "0.79546785", "0.7836023", "0.76992375", "0.7409638", "0.73137957", "0.73018575", "0.718954", "0.71616477", "0.7158624", "0.7149886", "0.71043545", "0.70963615", "0.7088037", "0.7069285", "0.7056672", "0.7013536", "0.6946843", "0.690518", "0.68915564", "0.686444...
0.8632223
0
/ returns true if $port is a valid TCP/UDP port
возвращает true, если $port является допустимым портом TCP/UDP
function is_port($port) { if (!is_numericint($port)) return false; if (($port < 1) || ($port > 65535)) return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isPortValid($port)\n {\n return true;\n }", "public static function validatePort($port)\n {\n if ($port === 0) {\n return false;\n }\n\n if ($port) {\n $port = (int) $port;\n if ($port < 1 || $port > 0xffff) {\n ...
[ "0.8373712", "0.8012535", "0.7406619", "0.7395061", "0.7144802", "0.7087723", "0.7007267", "0.69660336", "0.6926655", "0.67781734", "0.6720792", "0.6594902", "0.6532331", "0.64216703", "0.6283014", "0.62489253", "0.62307864", "0.6181521", "0.61124575", "0.60998714", "0.609883...
0.85440713
0
/ unlink a file, if it exists
/ открепить файл, если он существует
function unlink_if_exists($fn) { if (file_exists($fn)) unlink($fn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unlink($file);", "function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}", "public function testUnlinkNonExistingFile()\n {\n $this->assertFalse(unlink(static::$baseFile . '/fs/tmp.txt'))...
[ "0.8156448", "0.76121116", "0.74676764", "0.7440499", "0.7395941", "0.71718985", "0.71272147", "0.7122381", "0.7112466", "0.70397335", "0.7006172", "0.6964434", "0.6941794", "0.6922513", "0.68798125", "0.6873714", "0.67554843", "0.6752363", "0.6744325", "0.6716233", "0.670398...
0.8009525
1
/ make a global alias table (for faster lookups)
Создайте глобальную таблицу синонимов (для более быстрого поиска)
function alias_make_table() { global $config, $g, $aliastable; $aliastable = array(); if (is_array($config['aliases']['alias'])) { foreach ($config['aliases']['alias'] as $alias) { if ($alias['name']) $aliastable[$alias['name']] = $alias['address']; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTableAlias() ;", "public function aliases();", "function alias();", "function getAlias();", "function TableAlias($tableAlias = null);", "private function alias($tableName)\r\n\t{\r\n\t\tif (!isset($this->tableAliases[$tableName])) {\r\n\t\t\t$this->tableAliases[$tableName] = 'tbl' . co...
[ "0.6835252", "0.6818864", "0.6552978", "0.6533998", "0.6459925", "0.6201853", "0.61893344", "0.61306745", "0.61306745", "0.61306745", "0.61306745", "0.60778505", "0.60139877", "0.5949387", "0.59287554", "0.59273624", "0.5903963", "0.5876778", "0.58189607", "0.5728378", "0.572...
0.74795383
0
/ check if an alias exists
Проверить, существует ли алиас
function is_alias($name) { global $aliastable; return isset($aliastable[$name]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exists($alias);", "function alias_existente($alias) {\r\n $db = new MySQL();\r\n $existencia = $db->sql_query(\"SELECT * FROM `usuarios_usuarios` WHERE `alias`='\" . $alias . \"' ;\");\r\n $existe = $db->sql_numrows($existencia);\r\n $db->sql_close();\r\n if ($existe == 0...
[ "0.8291643", "0.7760573", "0.7591426", "0.7555481", "0.7486542", "0.74845785", "0.73760587", "0.73658085", "0.72863066", "0.722541", "0.7139527", "0.71045196", "0.7078672", "0.7064084", "0.6973674", "0.6918591", "0.6906292", "0.6882195", "0.68581414", "0.68110687", "0.6746207...
0.81090945
1
/ expand a host or network alias, if necessary
Расширьте сокращение хоста или сети, если это необходимо
function alias_expand($name) { global $aliastable; if (isset($aliastable[$name])) return $aliastable[$name]; else if (is_ipaddr($name) || is_subnet($name)) return $name; else return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alias_expand_host($name) {\n\n\tglobal $aliastable;\n\n\tif (isset($aliastable[$name]) && is_ipaddr($aliastable[$name]))\n\treturn $aliastable[$name];\n\telse if (is_ipaddr($name))\n\treturn $name;\n\telse\n\treturn null;\n}", "function alias_expand_net($name) {\n\n\tglobal $aliastable;\n\n\tif (isset($...
[ "0.8015517", "0.67470175", "0.61164325", "0.5999144", "0.59546137", "0.5951725", "0.5884297", "0.5799856", "0.5760539", "0.57430905", "0.57229054", "0.570362", "0.56928134", "0.561067", "0.5608096", "0.5600366", "0.5565724", "0.5561693", "0.55124587", "0.5506117", "0.5496042"...
0.7239077
1
/ expand a host alias, if necessary
Расширьте псевдоним хоста, если это необходимо
function alias_expand_host($name) { global $aliastable; if (isset($aliastable[$name]) && is_ipaddr($aliastable[$name])) return $aliastable[$name]; else if (is_ipaddr($name)) return $name; else return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alias_expand($name) {\n\n\tglobal $aliastable;\n\n\tif (isset($aliastable[$name]))\n\treturn $aliastable[$name];\n\telse if (is_ipaddr($name) || is_subnet($name))\n\treturn $name;\n\telse\n\treturn null;\n}", "public function doResolveHost() {\r\n if (preg_match('|[a-zA-Z]|', $this->getTarget())) {\r...
[ "0.7050495", "0.6658315", "0.6364444", "0.6303842", "0.61666584", "0.6007006", "0.5965504", "0.59231836", "0.59229285", "0.5920232", "0.5914241", "0.59090847", "0.5845351", "0.5796158", "0.57819533", "0.5763424", "0.57287854", "0.5726143", "0.5705706", "0.565828", "0.56447315...
0.82764155
0
/ find out whether two subnets overlap
/ выяснить, пересекаются ли два подсети
function check_subnets_overlap($subnet1, $bits1, $subnet2, $bits2) { if (!is_numeric($bits1)) $bits1 = 32; if (!is_numeric($bits2)) $bits2 = 32; if ($bits1 < $bits2) $relbits = $bits1; else $relbits = $bits2; $sn1 = gen_subnet_mask_long($relbits) & ip2long($subnet1); $sn2 = gen_subnet_mask_long($relbits) &...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkOverlap($aStartX,$aStartY,$aEndX,$aEndY,$bStartX,$bStartY,$bEndX,$bEndY){\n if(($aStartX<$bEndX) && ($aEndX >$bStartX) && ($aStartY<$bEndY) && ($aEndY> $bStartY))\n {\n return false;\n }else{\n return true;\n }\n}", "public function overlaps($block)\n\t{\n\t\tif ( ! $block...
[ "0.70152366", "0.6497746", "0.61418086", "0.6125076", "0.6052775", "0.6031124", "0.6029236", "0.59860915", "0.5978506", "0.59553397", "0.5954216", "0.5899551", "0.5898083", "0.58131516", "0.5649957", "0.5632886", "0.56200314", "0.5585339", "0.5480813", "0.54686564", "0.545262...
0.8027139
0
/ return true if $addr is in $subnet, false if not
вернуть true, если $addr находится в $subnet, false в противном случае
function ip_in_subnet($addr,$subnet) { list($ip, $mask) = explode('/', $subnet); $mask = 0xffffffff << (32 - $mask); return ((ip2long($addr) & $mask) == (ip2long($ip) & $mask)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ip_in_pfb_localsub($subnet) {\n\tglobal $pfb_localsub;\n\n\tif (!empty($pfb_localsub)) {\n\t\tforeach ($pfb_localsub as $line) {\n\t\t\tif (ip_in_subnet($subnet, $line)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn FALSE;\n}", "function is_subnet($subnet) {\n\tif (!is_string($subnet))\n\tretur...
[ "0.7563242", "0.73640484", "0.7113753", "0.69463557", "0.68122435", "0.66436213", "0.6512932", "0.6511823", "0.64967436", "0.6480863", "0.62784815", "0.6252533", "0.62350184", "0.6163915", "0.61630374", "0.6073438", "0.6034077", "0.6001298", "0.59926635", "0.599195", "0.59772...
0.8240325
0
/ verify (and remove) the digital signature on a file returns 0 if OK
Проверить (и удалить) цифровую подпись в файле возвращает 0, если всё в порядке
function verify_digital_signature($fname) { global $g; return mwexec("/usr/bin/gzsig verify " . escapeshellarg("{$g['etc_path']}/id_rsa.pub") . " " . escapeshellarg($fname)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verify_signature($file) {\n $dds = new WebService_DigiDocService_DigiDocService();\n $file[\"content\"] = File::readLocalFile($file[\"tmp_name\"]);\n unlink($file[\"tmp_name\"]);\n\n if ($file[\"format\"] === \"bdoc\") {\n $ret = $dds->StartSession(\"\", base64_encode($file[\"content\"]...
[ "0.7540512", "0.68744516", "0.6532468", "0.61764145", "0.61632967", "0.599646", "0.59440964", "0.59334195", "0.5927698", "0.58706653", "0.5806896", "0.57410264", "0.5693222", "0.56812114", "0.5648048", "0.5643213", "0.5640205", "0.5640029", "0.5629852", "0.56023884", "0.55903...
0.7274367
1
/ obtain MAC address given an IP address by looking at the ARP table
/ получить MAC-адрес по заданному IP-адресу, изучая таблицу ARP
function arp_get_mac_by_ip($ip) { exec("/usr/sbin/arp -n {$ip}", $arpoutput); if ($arpoutput[0]) { $arpi = explode(" ", $arpoutput[0]); $macaddr = $arpi[3]; if (is_macaddr($macaddr)) return $macaddr; else return false; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_mac(){\n\t\n\t//Nicolas Padfield nicolas@padfield.dk\n\t\n\t$debug = 0;\n\n\t$adr = $_SERVER[REMOTE_ADDR];\n\t\t\n\tusleep(10000);\n\t\n\t$arpstring = '/usr/sbin/arp -a '.$adr;\n\t\n\t$arp = exec($arpstring);\n\t\n\t//echo $arp.'<BR><BR>';\n\t\n\t$match = preg_match ('/..\\:..\\:..\\:..\\:..\\:../', $...
[ "0.7440544", "0.6977313", "0.6560238", "0.61065334", "0.60603917", "0.5740023", "0.56617594", "0.5492723", "0.53898203", "0.52860165", "0.52512264", "0.52285546", "0.5201422", "0.51674676", "0.515863", "0.51564574", "0.51293176", "0.50878763", "0.5017707", "0.5002558", "0.499...
0.79746526
0
Get the value of footerOrder
Получить значение footerOrder
public function getFooterOrder() { return $this->footer_order; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFooter()\n {\n return $this->getValue('nb_catalog_item_lang_footer');\n }", "function getOrder()\n {\n return 7;\n }", "function getOrder()\n {\n return 7;\n }", "public function get_foot()\n\t{\n\t\treturn $this->footer_item;\n\t}", "function getOr...
[ "0.6913799", "0.6680302", "0.6680302", "0.66122735", "0.6589984", "0.6589984", "0.6559167", "0.6559167", "0.6559167", "0.6559167", "0.6513233", "0.6513233", "0.64861315", "0.6471178", "0.6469066", "0.6435029", "0.64213395", "0.64213395", "0.6409876", "0.64050674", "0.6404222"...
0.8281289
1
Function that register author info widget
Функция, регистрирующая виджет с информацией об авторе
function kvell_edge_register_author_info_widget( $widgets ) { $widgets[] = 'KvellEdgeAuthorInfoWidget'; return $widgets; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpb_author_info_box( $content ) {\n \n\tglobal $post;\n\t \n\t// Detect if it is a single post with a post author\n\tif ( is_single() && isset( $post->post_author ) ) {\n\t \n\t\t// Get author's display name \n\t\t$display_name = get_the_author_meta( 'display_name', $post->post_author );\n\t \n\t// If dis...
[ "0.7156015", "0.71499044", "0.7084426", "0.70430976", "0.70321", "0.6887577", "0.68404245", "0.6784591", "0.67786646", "0.67687845", "0.6762314", "0.67525744", "0.67349064", "0.67312586", "0.67290795", "0.67080355", "0.6705859", "0.6695264", "0.66529626", "0.6634235", "0.6621...
0.7912472
0
Checks if a file is a flv file.
Проверяет, является ли файл файлом flv.
private function _isFlv($fileName, $mime) { if (strpos($this->_getFileType($fileName), 'Macromedia Flash Video') !== false) { $this->_detectedMime = "video/x-flv"; return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkFileType($fileType){\n \t\tif ($fileType == \"application/octet-stream\"){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}", "public function isFile();", "public function isFile()\n {\n return ( $this->fileStructure->type == self::IS_FILE );\n }", "publ...
[ "0.7078647", "0.6710713", "0.65079916", "0.6504107", "0.6496639", "0.6496639", "0.6495546", "0.6495546", "0.6495546", "0.6430178", "0.6393551", "0.6342653", "0.63175035", "0.6314375", "0.6312383", "0.6227384", "0.6155113", "0.6151545", "0.6126405", "0.6057475", "0.6018103", ...
0.70284545
1
Checks if a file is a Ogg/Theora file
Проверяет, является ли файл файлом Ogg/Theora
private function _isOggTheora($fileName, $mime) { if ($mime == self::MIME_CONTENT_TYPE_OGG && strpos($this->_getFileType($fileName), 'Theora video') !== false) { $this->_detectedMime = "video/ogg-theora"; return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isFile();", "function isFile() {\n\t\treturn $this->repoObj->lobSubType == 'document';\n\t}", "public function is_file($file);", "public function isFile() : bool;", "public function isFile(): bool;", "function check_upload($file) {\n if (preg_match(\":^application/vnd.bdoc-:\", $file[\...
[ "0.68947136", "0.6813303", "0.67338127", "0.6572073", "0.65385395", "0.6507109", "0.6480352", "0.6453699", "0.6453699", "0.6452405", "0.6452405", "0.6452405", "0.6435394", "0.6430347", "0.64270574", "0.64123565", "0.63797295", "0.63490844", "0.634338", "0.62971544", "0.629664...
0.70400596
0
Checks if a file is a WMV file.
Проверяет, является ли файл файлом WMV.
private function _isWmv($fileName) { if ($this->_isWmx($fileName, 'wmv')) { $this->_detectedMime = " audio/x-ms-wmv"; return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _isWmx($fileName, $type)\n {\n return strpos($this->_getFileType($fileName), 'Microsoft ASF') !== false\n && strcasecmp($this->_getFileSuffix(), $type) == 0;\n }", "private function _isWma($fileName)\n {\n if ($this->_isWmx($fileName, 'wma'))\n {\n $this->_detectedMime = \"...
[ "0.6760817", "0.641697", "0.6143109", "0.60762745", "0.59956425", "0.59712064", "0.5945115", "0.58920515", "0.5795296", "0.57814187", "0.5765982", "0.5747238", "0.57104903", "0.57011664", "0.56970143", "0.56900626", "0.56774074", "0.56698185", "0.56629246", "0.5660778", "0.56...
0.7274902
0
Checks if a file is a WMA file.
Проверяет, является ли файл файлом WMA.
private function _isWma($fileName) { if ($this->_isWmx($fileName, 'wma')) { $this->_detectedMime = "audio/x-ms-wma"; return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _isWmx($fileName, $type)\n {\n return strpos($this->_getFileType($fileName), 'Microsoft ASF') !== false\n && strcasecmp($this->_getFileSuffix(), $type) == 0;\n }", "public static function is_wma( $filename = null, $signature = null ) {\r\n\t\t\treturn self::is_wma( $filename, $signatur...
[ "0.7300719", "0.699845", "0.66643155", "0.61192554", "0.59084654", "0.58887625", "0.5855663", "0.58147043", "0.5737235", "0.57012033", "0.5700837", "0.569391", "0.5690614", "0.56878006", "0.56785303", "0.5673167", "0.5660464", "0.5638226", "0.55853546", "0.55846727", "0.55842...
0.7946108
0
Checks if a file is a WMA or WMV file. Helper for _isWmv() and _isWma().
Проверяет, является ли файл файлом WMA или WMV. Вспомогательная функция для _isWmv() и _isWma().
private function _isWmx($fileName, $type) { return strpos($this->_getFileType($fileName), 'Microsoft ASF') !== false && strcasecmp($this->_getFileSuffix(), $type) == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _isWmv($fileName)\n {\n if ($this->_isWmx($fileName, 'wmv'))\n {\n $this->_detectedMime = \"\taudio/x-ms-wmv\";\n return;\n }\n }", "private function _isWma($fileName)\n {\n if ($this->_isWmx($fileName, 'wma'))\n {\n $this->_detectedMime = \"audio/x-ms-wma\";\n ...
[ "0.7353117", "0.7099147", "0.60212135", "0.60021013", "0.5865357", "0.58383274", "0.5829093", "0.5798766", "0.57722104", "0.5764892", "0.57619107", "0.5734998", "0.5724438", "0.57128686", "0.56886256", "0.56868386", "0.5677869", "0.5636764", "0.56340766", "0.5632966", "0.5629...
0.72308195
1
Checks if a file is Ogg/Vorbis.
Проверяет, является ли файл Ogg/Vorbis.
private function _isOggVorbis($fileName, $mime) { if ($mime == self::MIME_CONTENT_TYPE_OGG && strpos($this->_getFileType($fileName), 'Vorbis audio') !== false) { $this->_detectedMime = "application/ogg"; return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_file_is_audio( $tmp ) \n{\n $allowed = array(\n 'audio/mpeg', 'audio/x-mpeg', 'audio/mpeg3', 'audio/x-mpeg-3', 'audio/aiff', \n 'audio/mid', 'audio/x-aiff', 'audio/x-mpequrl','audio/midi', 'audio/x-mid', \n 'audio/x-midi','audio/wav','audio/x-wav','audio/xm','audio/x-aac','au...
[ "0.62763304", "0.6210141", "0.60143346", "0.5886614", "0.58464634", "0.57831895", "0.57785255", "0.5777448", "0.57678777", "0.57376474", "0.5727184", "0.57150304", "0.5708083", "0.5701376", "0.5681684", "0.5680559", "0.56274265", "0.5609916", "0.56022215", "0.5595986", "0.559...
0.76214486
0
Returns the suffix part of a file name
Возвращает суффикс части имени файла
private function _getFileSuffix() { if (strrpos($this->_originalName, '.')) { return substr($this->_originalName, strrpos($this->_originalName, '.') +1); } else { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getSuffix() : string\n {\n return $this->getSubjectConfiguration()->getFileResolver()->getSuffix();\n }", "protected function getSuffix() : string\n {\n return $this->getFileResolverConfiguration()->getSuffix();\n }", "public function getSuffix() {}", "public functi...
[ "0.7976123", "0.7874822", "0.7753751", "0.7708719", "0.7516133", "0.7462964", "0.7389194", "0.7351735", "0.73277456", "0.73253876", "0.73133683", "0.7255621", "0.72187674", "0.7202748", "0.72000724", "0.71424395", "0.7138476", "0.70605874", "0.70393413", "0.703483", "0.702922...
0.8463182
0
Transcodes a audio file to mp3
Конвертирует аудиофайл в формат mp3
private function _transcodeAudio($fileName, $outputFilePath, $mime) { $outputFilePath .= '.mp3'; if ($mime == self::MIME_CONTENT_TYPE_MPEG) { // MP3 - Don't need to transcode FIX should we recode? // FIX check that it actually is a MPEG-1 Audio Layer 3 file // FIX check for errors! ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sound_mp3()\n\t{\n\t\tif (preg_match('/.+[-_\\s]{0,3}[\\(\\[]\\d+\\/\\d+[\\)\\]][-_\\s]{0,3}\"(.+)' . $this->e0 .\n\t\t\t\t\t '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"Terraplane Sun - Fu...
[ "0.6702458", "0.66679907", "0.6605065", "0.6211908", "0.6114414", "0.61138326", "0.6086373", "0.6075781", "0.6043667", "0.59063613", "0.5867819", "0.5796195", "0.5764879", "0.57427394", "0.5725373", "0.56024104", "0.5587688", "0.5540693", "0.5316218", "0.53105104", "0.5253088...
0.7738703
0
Decodes an audio file into a PCM WAV file.
Декодирует аудиофайл в файл PCM WAV.
private function _decodeAudio($fileName, $outputFileName) { if (strpos($this->_getFileType($fileName), 'Standard MIDI data') !== false) { $transcodeWavCmd = sprintf('%s -Ow -o %s %s 2>&1', self::TRANSCODE_TIMIDITY_CMD, $outputFileName, escap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _transcodeAudio($fileName, $outputFilePath, $mime)\n {\n $outputFilePath .= '.mp3';\n \n if ($mime == self::MIME_CONTENT_TYPE_MPEG)\n {\n // MP3 - Don't need to transcode FIX should we recode?\n // FIX check that it actually is a MPEG-1 Audio Layer 3 file\n // FIX check f...
[ "0.6474454", "0.5905486", "0.5412156", "0.5172678", "0.51709366", "0.5005753", "0.4834532", "0.48289227", "0.48215052", "0.48207617", "0.48172328", "0.4804717", "0.47579485", "0.46861696", "0.4664187", "0.46436274", "0.4634852", "0.45915595", "0.45911878", "0.45905378", "0.45...
0.7163842
0
Lists all grupaKursow entities.
Список всех сущностей grupaKursow.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $grupaKursows = $em->getRepository('ModelBundle:GrupaKursow')->findAll(); return $this->render('@Przedmiot/grupakursow/index.html.twig', array( 'grupaKursows' => $grupaKursows, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n //\n return Grupos::all();\n }", "public function index()\n {\n return Kolekcija::all();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SCRUMSwiftairBundle:K...
[ "0.6820715", "0.63522756", "0.6326514", "0.6241569", "0.6185324", "0.6139122", "0.61094517", "0.60370564", "0.600264", "0.59980476", "0.5978973", "0.5891443", "0.58890146", "0.5869702", "0.58172494", "0.5816918", "0.5800125", "0.57978195", "0.5797562", "0.5789919", "0.5774783...
0.730458
0
Creates a form to delete a grupaKursow entity.
Создает форму для удаления сущности grupaKursow.
private function createDeleteForm(GrupaKursow $grupaKursow) { return $this->createFormBuilder() ->setAction($this->generateUrl('grupakursow_delete', array('id' => $grupaKursow->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm ( Maileguak $maileguak )\n {\n return $this->createFormBuilder()\n ->setAction( $this->generateUrl( 'maileguak_delete', array ('id' => $maileguak->getId()) ) )\n ->setMethod( 'DELETE' )\n ->getForm();\n }", "p...
[ "0.7138623", "0.69323355", "0.69190586", "0.6903037", "0.68393606", "0.6820432", "0.6814909", "0.68024355", "0.6790657", "0.6779321", "0.67647034", "0.67234", "0.67188746", "0.6706314", "0.67008805", "0.6696658", "0.6693432", "0.66811305", "0.66768", "0.66667736", "0.6665392"...
0.80273515
0
Gets all registered indexes
Получает все зарегистрированные индексы
public function getAllIndexes() { return $this->indexes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexes()\r\n {\r\n return $this->indexes;\r\n }", "public function getIndexList() {\n return self::$indexes;\n }", "public function getIndexes()\n {\n\treturn $this->indexes;\n }", "public function getIndexes()\n {\n return $this->indexes;\n }", "p...
[ "0.8174619", "0.793244", "0.7853825", "0.78466034", "0.771348", "0.7547633", "0.749083", "0.7423228", "0.74145186", "0.7305068", "0.7266405", "0.7260031", "0.71059155", "0.7019986", "0.69190484", "0.68035835", "0.67576975", "0.6722061", "0.671148", "0.6628822", "0.66256386", ...
0.8171849
1
Gets the default index
Получает default index
public function getDefaultIndex() { return $this->defaultIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIndex()\n {\n return isset($this->index) ? $this->index : null;\n }", "public static function _index()\n\t{\n\t\treturn self::$_index;\n\t}", "public function getDefaultCardIndex()\n {\n return $this->reel->aliases['_default'];\n }", "public function index(): int\...
[ "0.73023814", "0.71758014", "0.715008", "0.7104482", "0.7078497", "0.70654535", "0.7065195", "0.70523286", "0.70523286", "0.70523286", "0.70523286", "0.7029544", "0.7029544", "0.7029544", "0.702938", "0.70286846", "0.70286846", "0.70286846", "0.70285743", "0.70285743", "0.702...
0.90596086
0
Static utility to get all materials
Статическая утилита для получения всех материалов
public static function all() { $material_helper = new Material(); return $material_helper->get_all(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaterials()\n {\n return $this->materials;\n }", "public function getMaterials()\n {\n return $this->materials;\n }", "public function materialList(){\n $materials = $this->getAll();\n $options = [];\n foreach($materials as $material){\n $...
[ "0.789449", "0.789449", "0.74833924", "0.73451406", "0.7062001", "0.70555806", "0.7049826", "0.69052845", "0.6792745", "0.6716401", "0.65188915", "0.64405614", "0.6403207", "0.6384388", "0.6354466", "0.6319616", "0.62296534", "0.6198059", "0.6196402", "0.61860687", "0.6166134...
0.81972843
0
Checks if this class can handle a specific job
Проверяет, может ли этот класс обрабатывать конкретную задачу
public function canHandleJob(JobData $jobData);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasJob(): bool;", "public function hasJob($name);", "public function isJobRequest()\n {\n return array_key_exists(\"job\", $this->request->all());\n }", "protected function isJobLimit(): bool\n {\n return $this->jobCount >= $this->options->jobLimit;\n }", "function...
[ "0.7281487", "0.650604", "0.6322152", "0.63194793", "0.62938404", "0.6192587", "0.61811846", "0.6034697", "0.6032906", "0.5910168", "0.5875923", "0.58277607", "0.5827017", "0.57971543", "0.57641983", "0.57384163", "0.572013", "0.569658", "0.569658", "0.569658", "0.569658", ...
0.7565444
0
Sets all the indicators at once for a type
Устанавливает все индикаторы сразу для типа
private function setIndicators($type) { $this->setIndicator($type, 'left'); $this->setIndicator($type, 'right'); $this->setIndicator($type, 'separator'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setIndicator($type, $indicatorType) {\n $type = strtolower($type);\n $indicatorType = strtolower($indicatorType);\n $func = 'get' . ucfirst($type) . ucfirst($indicatorType) . 'Indicator';\n $indicator = _SUGAR::getGlobalConfiguration()->$func();\n\n ...
[ "0.5926646", "0.5542421", "0.528559", "0.5247751", "0.5206525", "0.52031296", "0.5193099", "0.5159069", "0.5138638", "0.5131378", "0.51134795", "0.51134795", "0.51134795", "0.51134795", "0.51134795", "0.51134795", "0.51134795", "0.51134795", "0.509915", "0.50826526", "0.50808...
0.70243615
0
Remove a given subView, given its tag or the View object itself
Удалить заданный subView, указав его тег или сам объект View
public function removeView($view) { if (is_string($view)) { if (!isset($this->subViews[$view])) { throw new SubViewNotDefinedException(self::childClass(), $view); } unset($this->subViews[$view]); } else if (is_object($view) && ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($viewname)\n {\n if (true === $viewname) {\n $this->_children = [];\n\n return $this;\n }\n foreach ($this->_children as $i => $child) {\n if ($child['name'] == $viewname) {\n unset($this->_children[$i]);\n ...
[ "0.5928957", "0.59188503", "0.56199396", "0.5612733", "0.54387504", "0.5387637", "0.53819185", "0.53513855", "0.5334633", "0.5318107", "0.5284341", "0.5234135", "0.5228691", "0.52231836", "0.5215226", "0.5215226", "0.5215226", "0.5215226", "0.51667917", "0.5101129", "0.504871...
0.70000625
0
Returns the value of field questionlab
Возвращает значение поля questionlab
public function getQuestionlab() { return $this->questionlab; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFaqQuestion () {\n\t$preValue = $this->preGetValue(\"faqQuestion\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->faqQuestion;\n\treturn $data;\n}", "public function getFaqAnswer () {\n\t$preValue = $this->preGetValue(\"faqAnswer\"); \n\t...
[ "0.7048341", "0.70253956", "0.656746", "0.638988", "0.63607806", "0.62467635", "0.61562747", "0.6139949", "0.61342347", "0.6111277", "0.6088293", "0.6011833", "0.59915423", "0.5986641", "0.59673756", "0.59481245", "0.59481245", "0.5934327", "0.58809024", "0.5849877", "0.58486...
0.740329
0
Creates the initial Forward, based on the given request.
Создает начальный Forward на основе заданного запроса.
public function determineInitialForward(Request $request);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initForward()\n {\n if (empty($this->_beforeForwardInfo)) {\n parent::initForward();\n $this->_beforeForwardInfo['route_name'] = $this->getRouteName();\n return $this;\n }\n\n return parent::initForward();\n }", "protected function forwa...
[ "0.63299686", "0.6036237", "0.5677408", "0.56692946", "0.55701494", "0.55417913", "0.54636145", "0.5449767", "0.54329693", "0.5393548", "0.53307956", "0.53244776", "0.5174394", "0.5140815", "0.5134711", "0.5131913", "0.5124884", "0.5104006", "0.5065815", "0.5042558", "0.50398...
0.7356065
0
Sets a new documentationReferences
Устанавливает новую документациюReferences
public function setDocumentationReferences(array $documentationReferences) { $this->documentationReferences = $documentationReferences; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setReferences($val)\n {\n $this->_propDict[\"references\"] = $val;\n return $this;\n }", "public function setRef($ref)\n {\n $this->_ref = $ref;\n }", "public function setRef($ref);", "public function setRefToSomething($refToSomething)\r\n {\r\n $this->refT...
[ "0.60777646", "0.59781533", "0.59345883", "0.5765877", "0.5711518", "0.56681365", "0.5649106", "0.56406116", "0.562447", "0.55771124", "0.5539284", "0.5488165", "0.54749453", "0.54406023", "0.54236084", "0.5403669", "0.53893644", "0.5374419", "0.53537196", "0.53110594", "0.52...
0.7100294
0
function to check borrower status
функция для проверки статуса заемщика
function check_borrower_status($obj, $borrower){ $result = $obj->db->query($obj->Query_reader->get_query_by_code('check_borrower', array('borrower' => $borrower))); if($result->num_rows() > 0) return $result->num_rows(); else return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_biller_status() {\n\t\t$user_id = $_REQUEST['user_id'];\n\t\tif (!empty($user_id)) {\n\t\t\t$biller_records = $this -> conn -> get_table_row_byidvalue('user', 'user_id', $user_id);\n\t\t\tif (!empty($biller_records)) {\n\t\t\t\t$biller_status = $biller_records[0]['biller_status'];\n\t\t\t\t$user_id ...
[ "0.621047", "0.59746146", "0.57220125", "0.5715727", "0.5707241", "0.5673731", "0.56693923", "0.5648313", "0.5646482", "0.564052", "0.56299525", "0.56277144", "0.5607676", "0.5595498", "0.5595498", "0.5592767", "0.5592767", "0.5592767", "0.5592767", "0.5592767", "0.5581883", ...
0.782596
0
Makes FALSE values empty strings in the URL data obtained
Превращает ложные значения в пустые строки в данных URL
function clean_url_data($urldata) { $new_urldata = array(); foreach($urldata AS $key=>$value) { if($value === FALSE || trim($value) == '') { $new_urldata[$key] = ''; } else { $new_urldata[$key] = $value; } } return $new_urldata; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _fix_data() {\n\t\tif (isset($this->url) && $this->url) $this->_parse_url($this->url);\n\n\t\treturn true;\n\t}", "function dataConsideredEmpty($data, $repeatCounter)\r\n\t{\r\n\t\t$data = strip_tags($data);\r\n\t\tif (trim($data) == '' || $data == '<a target=\"_self\" href=\"\"></a>') {\r\n\t\t\treturn...
[ "0.68044204", "0.6325207", "0.6318152", "0.61596113", "0.5991571", "0.58718026", "0.5775476", "0.56922245", "0.56870526", "0.5641665", "0.5632168", "0.5623872", "0.562056", "0.5561195", "0.5559709", "0.54964054", "0.54666173", "0.54619265", "0.54614204", "0.5452605", "0.54431...
0.7385187
0
Returns a number with two decimal places and a comma after three places
Возвращает число с двумя десятичными знаками и запятой после трех разрядов
function add_commas($number, $number_of_decimals) { # Default to zero if the number is not set if(!isset($number) || $number == "" || $number <= 0) { $number = "0"; } return number_format($number, $number_of_decimals, '.', ','); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Cantidades_cd($valor){\t\n\n return number_format($valor,3,',','.');\n\n}", "function Cantidades_sd($valor){\t\n\n return number_format($valor,0,',','.');\n\n}", "public function FMoney($v) { return number_format($v,2,',','.'); }", "function Formato1($val){\r\n return number_format($val,0,\",...
[ "0.8092363", "0.75498044", "0.7505238", "0.72125727", "0.7188758", "0.71110827", "0.7068377", "0.70139813", "0.7008954", "0.69865936", "0.69687134", "0.6960053", "0.69575465", "0.68705034", "0.67891777", "0.67727226", "0.6743098", "0.6682155", "0.66817796", "0.6625571", "0.66...
0.75785184
1
Returns an array with all the basic colors
Возвращает массив с всеми основными цветами
function get_all_colors() { $colors = array( "000000" => "Black", "0000FF" => "Blue", "804000" => "Brown", "736F6E" => "Gray", "00FF00" => "Green", "FF8040" => "Orange", "FF00FF" => "Pink", "8E35EF" => "Purple", "FF0000" => "Red", "FFFF00" => "Yellow", "FFFFFF" => "White", ); return $colors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function colors()\n {\n $color = $this->backgroundColor();\n return array($color, Kronolith::foregroundColor($color));\n }", "public function getColors()\n\t{\n\t\treturn [\n\t\t\t'AliceBlue',\n\t\t\t'AntiqueWhite',\n\t\t\t'Aqua',\n\t\t\t'Aquamarine',\n\t\t\t'Azure',\n\t\t\t'Beige',\n\...
[ "0.80006003", "0.78241116", "0.7659754", "0.7641081", "0.7618703", "0.74857455", "0.74524075", "0.7450922", "0.74363834", "0.73707944", "0.73685485", "0.7368508", "0.7368508", "0.7368508", "0.7368508", "0.7368508", "0.7368508", "0.7343271", "0.7341565", "0.7302173", "0.725162...
0.7974992
1
Function to get the difference between two multi dimensional arrays [up to 4 levels] It is assumed all items of an array are one data type
Функция для получения разности между двумя многомерными массивами [до 4 уровней] Предполагается, что все элементы массива одного типа данных
function multi_array_diff($array1, $array2) { $diff = array(); #Do a foreach only if there are more than one levels of array below the current value (first value in array) if(contains_an_array($array1))#is_array(current($array1)) { foreach($array1 AS $key_1=>$array1_1) { if(contains_an_array($array1_1))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function multidimensional_array_diff($a, $b) { \n\t\t\treturn $a['start'] - $b['start']; }", "function multidimensional_array_diff2($a, $b) { \n\t\t\treturn $a['start'] - $b['start']; }", "function arrayRecursiveDiff($a1, $a2) {\n $result = array();\n\n foreach($a1 as $va1) {\n $found ...
[ "0.74694604", "0.7467136", "0.7258899", "0.72422934", "0.7198493", "0.71195877", "0.7095401", "0.70381874", "0.7016628", "0.69871783", "0.6617435", "0.63961744", "0.6296222", "0.6261182", "0.61597115", "0.61359274", "0.612986", "0.6112056", "0.5995006", "0.59021854", "0.58668...
0.77623874
0
function to format field based on instructions of a string
функция для форматирования поля в соответствии с инструкциями строки
function format_fields_instr($field_array, $row_data=array()) { $bool = FALSE; #assuming instructions are in the first array item switch($field_array[0]) { case 'UCFIRST': $string = ucfirst($row_data[$field_array[1]]); $bool = TRUE; break; case 'MONEY': $string = '$'.addCommas($row_data[$fiel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function formatString($str);", "abstract function format();", "function processFormatString()\n\t{\n\t\t// of date followed by event title.\n\t\tif ($this->customFormatStr == null)\n\t\t\t$this->customFormatStr = $this->defaultfFormatStr;\n\t\telse\n\t\t{\n\t\t\t$this->customFormatStr = preg...
[ "0.631433", "0.6254409", "0.6232463", "0.59802365", "0.5962252", "0.59301704", "0.5888827", "0.58880997", "0.5879372", "0.58452797", "0.58452797", "0.58452797", "0.58452797", "0.58452797", "0.58452797", "0.58452797", "0.58452797", "0.58452797", "0.58452797", "0.58452797", "0....
0.7114066
0
Function to validate borrower period
Функция для проверки периода заемщика
function validate_borrower_period($date1, $date2){ $date1 = format_date2($date1); $date2 = format_date2($date2); if(strtotime($date2) <= strtotime($date1)) return "Issuing date cannot be less or equal to return date"; elseif(get_date_difference2($date1, $date2) > 3) return "Borrowing period must not exceed 3 da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validate_booking(): bool {\n\t $this->errors = array();\n\n // Clear data using test_input function\n foreach ($this->request->post as $key => $value) {\n $this->request->post[$key] = self::test_input($this->request->post[$key]);\n }\n\n // Time\n i...
[ "0.61578304", "0.60448945", "0.5886992", "0.5837751", "0.5776798", "0.5661506", "0.56499636", "0.5648081", "0.56375325", "0.5622809", "0.56013125", "0.5577605", "0.5564372", "0.5540529", "0.5492884", "0.545635", "0.5417026", "0.5406248", "0.54058665", "0.53783494", "0.5370454...
0.7283675
0
function to format dates provided from a form field list into a format fit for entering into the database
функция для форматирования дат, предоставляемых из списка полей формы, в формат, подходящий для ввода в базу данных
function format_dates_for_db($formdata, $field_list) { $new_formdata = $formdata; foreach($field_list AS $key) { $field_key = explode('*', $key); if(array_key_exists($field_key[0], $formdata)){ if(!empty($field_key[1]) && $field_key[1] == 'EXT'){ $new_formdata[$field_key[0]] = date('Y-m-d H:i:s', strtot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _field_date($fval) \n {\n // if $fval is not already split up, we assume std. date string // YYYY-MM-DD\n if (is_array($fval)) {\n $f_date = &$fval;\n }\n elseif ($fval) {\n $f_date = split('-', $fval, 3);\n }\n else {\n $f_date...
[ "0.7065274", "0.69614863", "0.66337585", "0.6598231", "0.65405923", "0.6487388", "0.64697856", "0.6422965", "0.6389482", "0.6374382", "0.6342586", "0.63211846", "0.6306253", "0.6298334", "0.62758315", "0.6272292", "0.6223264", "0.62050235", "0.6131004", "0.60818976", "0.60793...
0.80080396
0
Function to fill in a blank array with data available from a post
Функция для заполнения пустого массива данными, доступными из поста
function fill_available_data($blank_data, $post_array) { $full_array = $blank_data; foreach($blank_data AS $key=>$value) { if(array_key_exists($key, $post_array)){ $full_array[$key] = $post_array[$key]; } } return $full_array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetPostData() {\n\t\t$this->postData = Array ();\n\t}", "function populateFromPost()\n\t{\n\t}", "public function postDataArrayProvider()\n {\n\t$data_array = array(\n\t 'photo' => 'test.jpg',\n\t 'id' => 1,\n\t 'author' => 'Anonymous',\n\t 'subject' => '',\n\t 'updated' => 0,\n\t ...
[ "0.64927554", "0.63897806", "0.6258024", "0.62236476", "0.6085838", "0.6056641", "0.59798014", "0.5969008", "0.5937234", "0.59240717", "0.58949697", "0.5846285", "0.5841622", "0.58127546", "0.5783581", "0.5757586", "0.575017", "0.5725182", "0.5720456", "0.56856984", "0.568421...
0.75827974
0
Function to insert the affiliate code in an article/email message
Функция для вставки кода партнера в статье/сообщение электронной почты
function insert_affiliate_code($code, $article_str) { return str_replace("=CODE=", "/r/".$code, $article_str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function hydrate_affiliate_code() {\n\t\tif ( Options::get_affiliate_code() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( FileSystem::file_exists( $file_name ) ) {\n\t\t\t$affiliate_code = trim( FileSystem::get_content( $file_name ) );\n\t\t\tadd_option( 'hubspot_affiliate_code', $affiliate_code );\n\t\t}\n\t}", ...
[ "0.5876296", "0.585284", "0.5842309", "0.57524246", "0.57506824", "0.57217604", "0.5704072", "0.56427515", "0.560643", "0.555115", "0.5542048", "0.54889417", "0.5465802", "0.5433647", "0.5429607", "0.5385494", "0.53777933", "0.5369763", "0.53680515", "0.53601885", "0.5348619"...
0.7811892
0
Function to paginate a list given its query and other data
Функция для постраничного отображения списка, заданного его запросом и другими данными
function paginate_list($obj, $data, $query_code, $variable_array=array(), $rows_per_page=NUM_OF_ROWS_PER_PAGE) { #determine the page to show if(!empty($data['p'])){ $data['current_list_page'] = $data['p']; } else { #If it is an array of results if(is_array($query_code)) { $obj->session->set_userdata('sear...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pagination(){}", "private function paginate()\n\t{\n\t\tif ($this->_listModel) {\n\t\t\t$this->_listModel->loadNextPage();\n\t\t}\n\t}", "abstract public function preparePagination();", "public function getPaginatedList($offset, $limit, $criteria = array());", "protected function buildPagination()...
[ "0.7222905", "0.72208065", "0.7182408", "0.71661633", "0.70872843", "0.70872843", "0.7058382", "0.69244176", "0.6875877", "0.68395174", "0.678126", "0.6746821", "0.67376673", "0.6691035", "0.6625914", "0.65949976", "0.6564546", "0.6557994", "0.65425414", "0.6515677", "0.65042...
0.761344
0
Function to get the user's custom location
Функция для получения пользовательской локации пользователя
function get_custom_location($obj, $returntype = "string", $rpart='') { if($returntype == "string") { if(!$obj->session->userdata('location_string') || ($obj->session->userdata('location_string') && $obj->session->userdata('resetlocation') && $obj->session->userdata('resetlocation') == 'Y')) { $location = $obj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserLocation();", "public function getUserLocation() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_note = 'HTTP_CLIENT_IP='.$_SERVER['HTTP_CLIENT_IP'];\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n ...
[ "0.8334229", "0.7017468", "0.70079935", "0.70079935", "0.6914941", "0.688397", "0.6866924", "0.6841566", "0.6814718", "0.67328084", "0.67310876", "0.66999924", "0.66752213", "0.667179", "0.667179", "0.667179", "0.667179", "0.6661932", "0.66591686", "0.66591686", "0.66591686",...
0.7191402
1
Checks if a disease is editable
Проверяет, можно ли редактировать заболевание
function is_disease_editable($obj, $diseasestamp) { $disease = $obj->Query_reader->get_row_as_array('get_diagnosis_by_stamp', array('stamp'=>$diseasestamp)); if((!empty($disease['isfrozen']) && $disease['isfrozen'] == 'N') || ($obj->session->userdata('isadmin') && $obj->session->userdata('isadmin') == 'Y')) { retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_editable() {\n\t\treturn false;\n\t}", "public function isEditable() {}", "public function isEditable();", "public function isEditable();", "protected function canEdit() {}", "public function isEditOnlyMode();", "public function isEditable()\n\t{\n\t\tif (($this->getName() === 'publi...
[ "0.77014124", "0.7699721", "0.75873345", "0.75873345", "0.7396197", "0.7278386", "0.7248275", "0.72371274", "0.72213626", "0.71860117", "0.71269226", "0.70827806", "0.7055472", "0.68590987", "0.6775763", "0.6768846", "0.66715825", "0.6647656", "0.6645395", "0.66424334", "0.65...
0.78939474
0
Function to pick all page sections
Функция для выбора всех разделов страницы
function get_all_page_sections($obj = '') { $section_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_all_page_sections')); return $section_result->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllSections();", "public function getSections(): iterable;", "function spr_get_sections() {\n\tglobal $spr_sql_fields;\n\n\t$sql_tables = safe_pfx('txp_section');\n\t$rs = safe_query(\"SELECT \".$spr_sql_fields.\" FROM \".$sql_tables.\" WHERE name != 'default' ORDER BY name\");\n\twhile ($a ...
[ "0.72869277", "0.69992167", "0.69505817", "0.6861968", "0.66784525", "0.6665054", "0.6543915", "0.65275866", "0.6484601", "0.6393351", "0.63710016", "0.6299365", "0.62875843", "0.624536", "0.62230444", "0.6176665", "0.6147531", "0.6075617", "0.6017149", "0.6008083", "0.596793...
0.7335488
0
Function to generate a system button
Функция для генерации системной кнопки
function generate_sys_button($btn_params=array()) { $btn_str = ""; if(!empty($btn_params['btnaction']) && empty($btn_params['noloading'])) { $btn_str .= "<div class='bluronclick'><div style='display:inline-block;'>"; } else if(empty($btn_params['btnaction'])) { $btn_params['btnaction'] = ''; } $btn_str ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateButtons() {}", "public function makeShortcutButton() {}", "function displayCreateButton() {\r\n\t \t\r\n\t \techo \"<a href='create.php' class='btn btn-success'>Create a New Question!!</a><br />\";\r\n\t \t\r\n\t }", "function makeCommandButton( $command, $text )\r\n{\r...
[ "0.7087225", "0.6949685", "0.6703582", "0.6577574", "0.65462667", "0.65223116", "0.649485", "0.6457447", "0.643599", "0.637935", "0.6369949", "0.6364825", "0.6267711", "0.6265062", "0.6243186", "0.623559", "0.62011313", "0.62004894", "0.61865336", "0.61855036", "0.6166324", ...
0.70362175
1
Get a setting of the user by its key
Получить настройку пользователя по его ключу
public function getSettingByKey($key) { // Return the user setting found by the key return UserSetting::getByUserID($this->id, $key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_user_setting( $user, $key = false )\n {\n //Unimplemented\n }", "function getSettingByKey($key = ''){\n\t\treturn $this->setting->getSetting($key);\n\t}", "public function get($key){\n return $this->getSetting($key);\n }", "public function get($key)\n {\n return $this->s...
[ "0.7978497", "0.76898843", "0.7087251", "0.69664437", "0.69134545", "0.6879417", "0.6857449", "0.6850228", "0.6849283", "0.6849283", "0.68167615", "0.68119806", "0.6810746", "0.6630727", "0.66111183", "0.66054964", "0.6599425", "0.65956295", "0.6584065", "0.654086", "0.652185...
0.78718156
1
Return the profile image of the user or placeholder if none.
Верните профильное изображение пользователя или плейсхолдер, если его нет.
public function getProfileImage() { $profileImage = SystemSetting::getByKey("ARC_USER_IMAGE", $this->id); if (!empty($profileImage->value)) { return system\Helper::arcGetPath() . "assets/profile/" . $profileImage->value; } return system\Helper::arcGetPath() . "assets/prof...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProfileImage(){\n\t\t// To hook into this function we could use a an event:\n\t\t// $event = new CEvent();\n\t\t// $this->onGetProfileImage($event)\n\t\t// // then if the event has been handled \n\t\t// if($event->handled)\n\t\t// // we know another function has handled the event and found u...
[ "0.79500955", "0.7928885", "0.7906118", "0.79026353", "0.7808406", "0.7758621", "0.772902", "0.7723259", "0.7711937", "0.7691842", "0.76716423", "0.7644954", "0.7612812", "0.76041865", "0.75716627", "0.74918824", "0.7442155", "0.743639", "0.7418253", "0.74020934", "0.7380061"...
0.86847097
0
/ For anyone else who finds this I simply had to add some global variables as well as passed a string username into wp_authenticate instead of the user id and finally included wpblogheader.php instead of wpload.php. Here is my final code:
Для кого-нибудь ещё, кто найдёт это, мне пришлось добавить некоторые глобальные переменные, а также передавать строку username вместо идентификатора пользователя в wp_authenticate, и, наконец, включить wpblogheader.php вместо wpload.php. Вот мой окончательный код:
function authentication ($user, $pass){ global $wp, $wp_rewrite, $wp_the_query, $wp_query; if(empty($user) || empty($pass)){ return false; } else { require_once('/home/USERNAME/public_html/DOMAIN/wp-blog-header.php'); $status = false; $auth = wp_authenticate($user, $pass ); if( is_wp_error($a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function owa_wpAuthUser($auth_status) {\r\n\r\n\t$current_user = wp_get_current_user();\r\n\t\r\n if ( $current_user instanceof WP_User ) { \r\n \t// logged in, authenticated\r\n \t$cu = owa_coreAPI::getCurrentUser();\r\n \t\r\n \t$cu->setAuthStatus(true);\r\n \t\r\n \tif (isset($current_user-...
[ "0.698179", "0.69288325", "0.69255155", "0.6734033", "0.6401758", "0.6399644", "0.63078004", "0.62402797", "0.62121946", "0.61853796", "0.6175945", "0.61757755", "0.6119356", "0.6088987", "0.6082927", "0.6080554", "0.6065878", "0.6028167", "0.5998834", "0.59473366", "0.593453...
0.7138022
0
Return G2A Product Keys Data table for the given builder
Вернуть таблицу данных ключей продукта G2A для заданного строителя
public static function keys($builder) { return datatables() ->of($builder) ->addColumn('checkbox', function ($data) { return view( 'admin.common.checkbox', compact('data') )->render(); }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get(TableBuilder $builder);", "protected function getKeys($table,$table2=null) {\n\t\t$pdo = $this->adapter->getDatabase()->getPDO();\n\t\t$keys = $pdo->cubrid_schema(PDO::CUBRID_SCH_EXPORTED_KEYS,$table);//print_r($keys);\n\t\tif ($table2) $keys = array_merge($keys, $pdo->cubrid_schema(PDO::CUBR...
[ "0.5691855", "0.54975003", "0.5353396", "0.5255351", "0.5190811", "0.51710135", "0.51701903", "0.5133687", "0.51264906", "0.5119157", "0.5109146", "0.50924355", "0.50920653", "0.50369066", "0.5026876", "0.5013543", "0.5006381", "0.4949247", "0.4938729", "0.49152443", "0.49039...
0.7452364
0
Construct from logger Defaults to a dummy logger, which does nothing
Создание из логгера. По умолчанию используется дублирующий логгер, который ничего не делает
public function __construct(Logger $logger = null) { $this->logger = $logger === null ? new Logger\Dummy() : $logger; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct( $logger ) {\n\t\t$this->logger = $logger;\n\t\tparent::__construct();\n\t}", "public function __construct()\n {\n $this->setDefaultLogger(new NullLogger());\n }", "final public function __construct() {\n $this->_logger = new public_logger();\n }", "public f...
[ "0.6725202", "0.6677878", "0.66238797", "0.65701526", "0.6440757", "0.63790315", "0.6377418", "0.63657624", "0.634811", "0.6318057", "0.6272318", "0.6229693", "0.62296563", "0.6209217", "0.6169278", "0.6135006", "0.6131433", "0.6110913", "0.61047286", "0.608962", "0.6023558",...
0.7105403
0
Resolves the given stack of override dependencies, by creating the required override files and automatically including them from their temporary sources. The result is the definition for the TYPO3 ClassAliasMap
Решает заданный стек зависимостей переопределений, создавая необходимые файлы переопределений и автоматически включая их из временных источников. Результат — определение для класса ClassAliasMap в TYPO3
public function resolve(array $stack): array { $this->eventBus->dispatch( ($e = new ClassOverrideStackFilterEvent($stack)) ); $stack = $e->getStack(); $cacheKey = md5(SerializerUtil::serializeJson($stack) . '-' . $this->isTestMode); if (isset($this->resol...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function resolveStackEntry(\n string $initialClassName,\n string $finalClassName,\n string $classToOverride,\n string $classToOverrideWith\n ): void\n {\n $basename = Inflector::toFile($classToOverride);\n $cloneFilename = $basename . '-clone.php';\n ...
[ "0.5692192", "0.5378244", "0.52492815", "0.51225805", "0.50569785", "0.5032591", "0.5001583", "0.48926935", "0.48528135", "0.4820539", "0.4759477", "0.4695104", "0.46880564", "0.4682227", "0.4627017", "0.46082777", "0.460466", "0.45676878", "0.45640403", "0.4560798", "0.45595...
0.7383632
0
Gets the bandwidthCapacityInMbps Determines the maximum allowed Mbps (megabits per second) bandwidth from a branch site. The possible values are:250,500,750,1000.
Определяет максимальную допустимую пропускную способность в Mbps (мегабит в секунду) от ветвевого сайта. Возможные значения: 250, 500, 750, 1000.
public function getBandwidthCapacityInMbps() { if (array_key_exists("bandwidthCapacityInMbps", $this->_propDict)) { if (is_a($this->_propDict["bandwidthCapacityInMbps"], "\Beta\Microsoft\Graph\Networkaccess\Model\BandwidthCapacityInMbps") || is_null($this->_propDict["bandwidthCapacityInMbps"])) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBandwidthCapacityInMbps($val)\n {\n $this->_propDict[\"bandwidthCapacityInMbps\"] = $val;\n return $this;\n }", "public function getMaxSizeInMegabytes()\n {\n return $this->_maxSizeInMegabytes;\n }", "public function maxCapacity() \r\n {\r\n ...
[ "0.7258156", "0.61825997", "0.61384875", "0.59959626", "0.58793956", "0.5878617", "0.5816479", "0.57755333", "0.5733823", "0.5710712", "0.56829184", "0.5681177", "0.5649207", "0.5649207", "0.5634014", "0.5588045", "0.55679244", "0.5480273", "0.5470122", "0.5464797", "0.544903...
0.82361656
0
Sets the bandwidthCapacityInMbps Determines the maximum allowed Mbps (megabits per second) bandwidth from a branch site. The possible values are:250,500,750,1000.
Устанавливает пропускную способность ширины полосы пропускания в Mbps Определяет максимальную допустимую ширину полосы пропускания в Mbps (мегабитах в секунду) от ветвевого сайта. Возможные значения: 250, 500, 750, 1000.
public function setBandwidthCapacityInMbps($val) { $this->_propDict["bandwidthCapacityInMbps"] = $val; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBandwidthCapacityInMbps()\n {\n if (array_key_exists(\"bandwidthCapacityInMbps\", $this->_propDict)) {\n if (is_a($this->_propDict[\"bandwidthCapacityInMbps\"], \"\\Beta\\Microsoft\\Graph\\Networkaccess\\Model\\BandwidthCapacityInMbps\") || is_null($this->_propDict[\"bandwid...
[ "0.6874132", "0.5738831", "0.5621231", "0.55103666", "0.5478474", "0.5440861", "0.5236345", "0.5166992", "0.51424915", "0.5083207", "0.49745494", "0.4942914", "0.4880514", "0.4846751", "0.4844355", "0.48367968", "0.48227894", "0.4788133", "0.47705045", "0.4761506", "0.4758841...
0.7783392
0
Gets the deviceVendor Specifies the manufacturer of the deviceLink. The possible values are: barracudaNetworks, checkPoint, ciscoMeraki, citrix, fortinet, hpeAruba, netFoundry, nuage, openSystems, paloAltoNetworks, riverbedTechnology, silverPeak, vmWareSdWan, versa, other, unknownFutureValue.
Получает deviceVendor, указывающий производителя устройства. Возможные значения: barracudaNetworks, checkPoint, ciscoMeraki, citrix, fortinet, hpeAruba, netFoundry, nuage, openSystems, paloAltoNetworks, riverbedTechnology, silverPeak, vmWareSdWan, versa, other, unknownFutureValue.
public function getDeviceVendor() { if (array_key_exists("deviceVendor", $this->_propDict)) { if (is_a($this->_propDict["deviceVendor"], "\Beta\Microsoft\Graph\Networkaccess\Model\DeviceVendor") || is_null($this->_propDict["deviceVendor"])) { return $this->_propDict["deviceVendor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeviceManufacturer()\n {\n return $this->deviceManufacturer;\n }", "public function getDeviceManufacturer() {}", "public function getManufacturer()\n {\n if (array_key_exists(\"manufacturer\", $this->_propDict)) {\n return $this->_propDict[\"manufacturer\"];...
[ "0.71462053", "0.7106529", "0.6597652", "0.6597652", "0.6532795", "0.638085", "0.63399684", "0.6294418", "0.6145416", "0.609923", "0.60385114", "0.5724036", "0.57028836", "0.5611038", "0.5611038", "0.5611038", "0.5611038", "0.5604045", "0.553125", "0.553125", "0.5433874", "...
0.7702862
0
Sets the deviceVendor Specifies the manufacturer of the deviceLink. The possible values are: barracudaNetworks, checkPoint, ciscoMeraki, citrix, fortinet, hpeAruba, netFoundry, nuage, openSystems, paloAltoNetworks, riverbedTechnology, silverPeak, vmWareSdWan, versa, other, unknownFutureValue.
Устанавливает deviceVendor, указывает производителя устройстваLink. Возможные значения: barracudaNetworks, checkPoint, ciscoMeraki, citrix, fortinet, hpeAruba, netFoundry, nuage, openSystems, paloAltoNetworks, riverbedTechnology, silverPeak, vmWareSdWan, versa, other, unknownFutureValue.
public function setDeviceVendor($val) { $this->_propDict["deviceVendor"] = $val; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDeviceManufacturer($deviceManufacturer)\n {\n $this->deviceManufacturer = $deviceManufacturer;\n }", "public function setDevice(Device $device);", "public function setVendor(string $vendor)\n {\n }", "public function setDevice(Device $device)\n {\n $this->devic...
[ "0.66789275", "0.6464189", "0.6416447", "0.6207248", "0.60399544", "0.60399544", "0.6018664", "0.57282996", "0.56930137", "0.561832", "0.5541386", "0.5533856", "0.54395324", "0.54395324", "0.53745323", "0.5363561", "0.5288544", "0.52795124", "0.5256711", "0.5243659", "0.52378...
0.7360845
0
Gets the tunnelConfiguration The connectivity settings, including the protocol, IPSec policy, and preshared key, are specified for establishing connectivity.
Получает настройки туннеля. Настройки соединения, включая протокол, политику IPSec и предварительно согласованный ключ, задаются для установления соединения.
public function getTunnelConfiguration() { if (array_key_exists("tunnelConfiguration", $this->_propDict)) { if (is_a($this->_propDict["tunnelConfiguration"], "\Beta\Microsoft\Graph\Networkaccess\Model\TunnelConfiguration") || is_null($this->_propDict["tunnelConfiguration"])) { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConnectionConfig() {\n return $this->connectionConfig;\n }", "public function setTunnelConfiguration($val)\n {\n $this->_propDict[\"tunnelConfiguration\"] = $val;\n return $this;\n }", "public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}", "public f...
[ "0.6334618", "0.5614873", "0.54226303", "0.53869694", "0.5336906", "0.52784747", "0.5230119", "0.5229965", "0.5227801", "0.5216142", "0.5178947", "0.51748884", "0.51627946", "0.51074094", "0.5093103", "0.50871605", "0.5063011", "0.5058604", "0.505433", "0.5017653", "0.5016832...
0.7521247
0
Gets all missing required records
Получает все недостающие обязательные записи
public function getMissingRecords() { $missing = []; foreach ($this->records as $record) { $repo = $this->storage->getRepository($record->getContentType()); $fields = $record->getRequiredFieldsArray(); if (count($fields)) { $results = $repo->find...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function provideMissingRequiredFields() {\n return [\n [array(\n 'label' => 'I am a label',\n 'coordinates' => '39.7392° N, 104.9903° W',\n 'depth' => 11,\n 'temperature' => 98.6,\n 'date' => 1325533342\n )],\n [array(\n 'label' => 'I am a label',\...
[ "0.63683313", "0.61936945", "0.57341963", "0.5711165", "0.5687327", "0.56075543", "0.5403139", "0.53851104", "0.5352536", "0.53515536", "0.5310458", "0.53072023", "0.5290792", "0.528357", "0.528168", "0.5266058", "0.5256343", "0.5253105", "0.5221322", "0.5220037", "0.519199",...
0.7718059
0
Creates all missing required records
Создает все необходимые отсутствующие записи
public function createMissingRecords() { $records = $this->getMissingRecords(); foreach ($records as $record) { $repo = $this->storage->getRepository($record->getContentType()); $fields = $record->getFieldsArray(); if (count($fields)) { $entity =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create_missing_tables() {\n\n\t\t/* Create the network snippets table if it doesn't exist */\n\t\tif ( is_multisite() && ! self::table_exists( $this->ms_table ) ) {\n\t\t\t$this->create_table( $this->ms_table );\n\t\t}\n\n\t\t/* Create the table if it doesn't exist */\n\t\tif ( ! self::table_exists...
[ "0.6029235", "0.59570605", "0.5783681", "0.5783014", "0.5660192", "0.5626202", "0.5572371", "0.5551481", "0.5524799", "0.55213505", "0.5461589", "0.5404346", "0.5402477", "0.5396595", "0.52770615", "0.5188905", "0.5181099", "0.51786834", "0.5154336", "0.51120275", "0.5098328"...
0.70878047
0
Parses the ContentTypes array and checks for required records
Парсит массив ContentTypes и проверяет наличие необходимых записей
protected function parseContentTypes(array $contenttypes) { foreach ($contenttypes as $contenttype => $values) { if (isset($values['required']) && is_array($values['required'])) { foreach ($values['required'] as $fields) { $record = new RequiredRecord($content...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadContentTypes()\n\t\t{\n\t\t\t$query = $this->contentTypeQuery;\n\t\t\t$list = $this->bridge->packData($query);\n\t\t\t$this->contentTypes = $list;\n\t\t\t\n\t\t\t/*\n\t\t\t*\tgenerate new contentTypes [Folder, File]\n\n\t\t\t*/\n\n\t\t\tif (count($this->contentTypes) == 0)\n\t\t\t{\n\t\t\t\t/*...
[ "0.7135669", "0.65114915", "0.6282301", "0.6199084", "0.61982024", "0.6011664", "0.59507567", "0.5928562", "0.58941245", "0.58432275", "0.58053225", "0.5705299", "0.5670859", "0.565942", "0.5643609", "0.5615852", "0.5591055", "0.55869794", "0.55498743", "0.55406564", "0.55399...
0.70336425
1
Stops a benchmark. Profiler::stop($token);
Останавливает тест. Profiler::stop($token);
public static function stop($token,$arr=false) { // Stop the benchmark Profiler::$_marks[$token]['stop_time'] = microtime(TRUE); Profiler::$_marks[$token]['stop_memory'] = memory_get_usage(); if (Arr::is_array($arr)){ Profiler::$_marks[$token]['file'] = $arr['file']; Profiler::$_marks[$token]['line'] =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function stop()\n {\n if (self::$_sessionBenchmarkOn) {\n self::$_sessionBenchmarkFinish = microtime(TRUE);\n }\n }", "public function stop(): void\n {\n $this->end = microtime(true);\n }", "public function stop()\n {\n $this->_timeStopInMicro...
[ "0.6943711", "0.67996705", "0.66679937", "0.65347147", "0.647582", "0.6375407", "0.6331706", "0.6331706", "0.6331706", "0.6331706", "0.6331706", "0.63100165", "0.62665623", "0.61429715", "0.6129749", "0.61127126", "0.61057365", "0.6089546", "0.6031973", "0.6031973", "0.603197...
0.7597123
0
Gets the total execution time and memory usage of a benchmark as a list. list($time, $memory) = Profiler::total($token);
Получает общее время выполнения и использование памяти бенчмарка в виде списка. list($time, $memory) = Profiler::total($token);
public static function total($token) { // Import the benchmark data $mark = Profiler::$_marks[$token]; if ($mark['stop_time'] === FALSE) { // The benchmark has not been stopped yet $mark['stop_time'] = microtime(TRUE); $mark['stop_memory'] = memory_get_usage(); } return array ( // Total t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function total($token) {\n\t\t// Import the benchmark data\n\t\t$mark = Profiler::$_marks[$token];\n\n\t\tif ($mark['stop_time'] === FALSE) {\n\t\t\t// The benchmark has not been stopped yet\n\t\t\t$mark['stop_time'] = microtime(TRUE);\n\t\t\t$mark['stop_memory'] = memory_get_usage();\n\t\t}\n\n\t\...
[ "0.8728274", "0.6520946", "0.6290621", "0.61254877", "0.6084452", "0.60608065", "0.58702934", "0.58687234", "0.5819219", "0.5779618", "0.5722715", "0.5602553", "0.5536992", "0.5517307", "0.5415603", "0.541454", "0.53861564", "0.5340199", "0.53355026", "0.5306003", "0.5299851"...
0.8600683
1
Returns an empty (but complete) order object.
Возвращает пустой (но полный) объект заказа.
function getEmptyMemberOrder() { //defaults $order = new stdClass(); $order->code = $this->getRandomCode(); $order->user_id = ""; $order->membership_id = ""; $order->subtotal = ""; $order->tax = ""; $order->couponamount = ""; $order->total = ""; $order->payment_type = ""; $order->car...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearOrders() {\r\n $this->__orders = array();\r\n return $this;\r\n }", "public function clearOrder() {\n\t\t\t$this->order->clearOrder();\n\t\t}", "public final function resetOrder()\n {\n $this->order = '';\n return $this;\n }", "public function getOrde...
[ "0.6798287", "0.6709417", "0.66826147", "0.6608428", "0.64319336", "0.6410323", "0.63843286", "0.63843286", "0.63843286", "0.63843286", "0.63843286", "0.63843286", "0.6373834", "0.6373834", "0.6373834", "0.63471794", "0.63471794", "0.6253891", "0.62455195", "0.62416375", "0.6...
0.700245
0
Retrieve a member order from the DB by ID
Получить членский заказ из БД по ID
function getMemberOrderByID($id) { global $wpdb; if(!$id) return false; $gmt_offset = get_option('gmt_offset'); $dbobj = $wpdb->get_row("SELECT *, UNIX_TIMESTAMP(timestamp) + " . ($gmt_offset * 3600) . " as timestamp FROM $wpdb->pmpro_membership_orders WHERE id = '$id' LIMIT 1"); if($dbobj) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrderById($id){\n $this->db->query(\"SELECT * FROM orders WHERE id = :id\");\n\n $this->db->bind(':id', $id);\n \n $row = $this->db->single();\n\n return $row;\n }", "public function getOrder($id) {\n return Order::fetch($id);\n }", "public function getT...
[ "0.71174353", "0.7064726", "0.68267345", "0.6799271", "0.6780015", "0.67522067", "0.6743223", "0.6739276", "0.67253935", "0.6685644", "0.6683225", "0.66560113", "0.662743", "0.662743", "0.662743", "0.662743", "0.662743", "0.662743", "0.66244215", "0.65926176", "0.653124", "...
0.7147652
0
Returns the last order using the given subscription_transaction_id.
Возвращает последний заказ с использованием заданного идентификатора подписки.
function getLastMemberOrderBySubscriptionTransactionID($subscription_transaction_id) { //did they pass a sub id? if(empty($subscription_transaction_id)) return false; global $wpdb; $id = $wpdb->get_var("SELECT id FROM $wpdb->pmpro_membership_orders WHERE subscription_transaction_id = '" . esc_sql($su...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_order_from_recurly_subscription( $subscription ){\n\n\t\tglobal $wpdb;\n\n\t\t$sql = $wpdb->prepare( \"select * from wp_mequoda_orders where recurly_uuid = %s ORDER BY order_time\", $subscription );\n\n\t\t$orders = $wpdb->get_results( $sql );\n\n\t\treturn $orders;\n\n\t}", "protected functi...
[ "0.63290966", "0.6138082", "0.6046962", "0.60058236", "0.5937532", "0.58641595", "0.5832227", "0.5594153", "0.55069643", "0.5489268", "0.54842126", "0.5466687", "0.5385636", "0.5350161", "0.5321745", "0.5299046", "0.5243624", "0.5201191", "0.51525253", "0.5132367", "0.5126241...
0.73182935
0
Update the discount code used in this order.
Обновите код скидки, используемый в этом заказе.
function updateDiscountCode( $discount_code_id ) { global $wpdb; // Assumes one discount code per order $sqlQuery = $wpdb->prepare(" SELECT id FROM $wpdb->pmpro_discount_codes_uses WHERE order_id = %d LIMIT 1", $this->id ); $discount_codes_uses_id = $wpdb->get_var( $sqlQuery ); // IN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_discount_codes()\n\t\t{\n\t\t\t// Get the discount codes from the submitted POST data.\n\t\t\t$discount_data = $this->input->post('discount');\n\t\t\t\n\t\t\t// The 'update_discount_codes()' function will validate each submitted code and apply the discounts that have activated their quantity and va...
[ "0.6967239", "0.68129", "0.64710957", "0.644579", "0.639297", "0.639297", "0.6263164", "0.62619907", "0.62221473", "0.6163156", "0.609506", "0.60663575", "0.6061318", "0.6039563", "0.5968472", "0.5957405", "0.5928257", "0.588671", "0.5847876", "0.578921", "0.5787349", "0.57...
0.74814373
0
Get a membership level object at checkout for the level associated with this order.
Получите объект уровня членства в момент оформления заказа для уровня, связанным с этим заказом.
function getMembershipLevelAtCheckout($force = false) { global $pmpro_level; if( ! empty( $this->membership_level ) && empty( $force ) ) { return $this->membership_level; } // If for some reason, we haven't setup pmpro_level yet, do that. if ( empty( $pmpro_level ) ) { $pmpro_level = pmpro_g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMembershipLevel($force = false)\n\t\t{\n\t\t\tglobal $wpdb;\n\n\t\t\tif(!empty($this->membership_level) && empty($force))\n\t\t\t\treturn $this->membership_level;\n\n\t\t\t//check if there is an entry in memberships_users first\n\t\t\tif(!empty($this->user_id))\n\t\t\t{\n\t\t\t\t$this->membership_level...
[ "0.61978084", "0.548413", "0.5463706", "0.54389524", "0.54389524", "0.53797865", "0.5354992", "0.5354992", "0.5339827", "0.5331582", "0.5283048", "0.5283048", "0.5283048", "0.5283048", "0.5283048", "0.5283048", "0.5251334", "0.5206167", "0.5191617", "0.5183814", "0.51599765",...
0.708338
0
Get a random code to use as the order code.
Получите случайный код для использования в качестве кода заказа.
function getRandomCode() { global $wpdb; while(empty($code)) { $scramble = md5(AUTH_KEY . current_time('timestamp') . SECURE_AUTH_KEY); $code = substr($scramble, 0, 10); $code = apply_filters("pmpro_random_code", $code, $this); //filter $check = $wpdb->get_var("SELECT id FROM $wpdb->pmpro_m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomCode() {\n $code = md5($this->getid_recipient() . $this->getid_offer() . $this->getexpirationdate());\n return $code;\n }", "public function get_random_coupon_code() {\n\t\t$rand_name = uniqid( rand( 10, 1000 ), false );\n\t\treturn substr( $rand_name, 0, rand( 5, 10 ) );\n\t}"...
[ "0.7452733", "0.72495455", "0.72280747", "0.7134761", "0.70665157", "0.6968279", "0.69414", "0.690896", "0.6758713", "0.67116964", "0.6700356", "0.66881895", "0.66527075", "0.6575303", "0.65681154", "0.6543719", "0.65306723", "0.6497861", "0.64967483", "0.6460922", "0.6458205...
0.78642285
0
Call the getSubscriptionStatus method of the gateway class.
Вызовите метод getSubscriptionStatus класса воркгейт.
function getGatewaySubscriptionStatus() { if (is_object($this->Gateway)) { return $this->Gateway->getSubscriptionStatus( $this ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSubscriptionStatus() {\n return $this->subscription_status;\n\n }", "public function status_subscription(){\n\t\t\treturn true;\n\t\t}", "function get_subscription_status($subc_id)\n {\n $merchant_id= $this->config->item('auth_merchant_id');\n $merc...
[ "0.7219857", "0.7037794", "0.695794", "0.66265553", "0.6506025", "0.64732325", "0.61721814", "0.6151219", "0.5984803", "0.59537596", "0.59493077", "0.5919059", "0.5899994", "0.5889747", "0.58148223", "0.5801881", "0.578239", "0.5779568", "0.5769155", "0.57326204", "0.56429696...
0.78681624
0
Call the getTransactionStatus method of the gateway class.
Вызовите метод getTransactionStatus класса шлюза.
function getGatewayTransactionStatus() { if (is_object($this->Gateway)) { return $this->Gateway->getTransactionStatus( $this ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getTransactionStatus();", "private function transactionStatus(){\n $data = [\n 'Initiator' => ' ',\n 'SecurityCredential' => ' ',\n 'CommandID' => 'TransactionStatusQuery',\n 'TransactionID' => ' ',\n ...
[ "0.78885335", "0.6946413", "0.6818651", "0.677535", "0.6699064", "0.6699064", "0.6566974", "0.6443286", "0.6385332", "0.634949", "0.62406945", "0.6239475", "0.62304807", "0.6141229", "0.61259323", "0.61259323", "0.60296845", "0.5988465", "0.5927343", "0.5901033", "0.5883599",...
0.7877095
1
Returns the HtmlElement to be rendered.
Возвращает элемент HtmlElement для отображения.
public function getHtmlElement() { return $this->htmlElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function render() {\n\t\treturn $this->_view->getBaseView()->element($this->_name, $this->_data, $this->_options);\n\t}", "public function innerHtml()\n {\n return $this->getDom()->innerHtml();\n }", "public function getElement()\n {\n return $this->element;\n }", "prot...
[ "0.7024795", "0.6776012", "0.6772301", "0.6744204", "0.67321813", "0.6725592", "0.6717045", "0.6675148", "0.658837", "0.6586442", "0.65831906", "0.65706193", "0.6555373", "0.6505501", "0.64885837", "0.64781505", "0.6395322", "0.63831997", "0.6377076", "0.6374024", "0.6360782"...
0.75845915
0
Obtiene un json con el listado de subfamilias
Получает json с списком подсемейств
public function obtenerSubfamilias($familia_id) { // Obtenemos el listado de subfamilias perteneciente a la familia $familia_id $subfamilias = Subfamilia::where('IdFamilia', $familia_id)->orderBy('Subfamilia', 'asc')->get(); // Devolvemos el listado en formato json return Response::json($subfamilias); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listSubSegmentsJSON()\n {\n //Incluye el modelo que corresponde\n require_once 'models/SegmentsModel.php';\n\n //Creamos una instancia de nuestro \"modelo\"\n $segmentModel = new SegmentsModel();\n\n if(isset($_GET['gbu']))\n $listado = $segmentModel...
[ "0.7005925", "0.69772184", "0.6653488", "0.64718735", "0.6179561", "0.61782146", "0.6119779", "0.6091362", "0.5983521", "0.59311396", "0.59236217", "0.58544314", "0.58518636", "0.58080286", "0.57703656", "0.5762025", "0.5706058", "0.56903625", "0.56679493", "0.5666484", "0.56...
0.711566
0
Extracts the token from the response
Извлекает токен из ответа
public function tokenFromResponse($response){ parse_str($response); $this->token = $access_token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extract_access_token()\r\n{\r\n $header = $_SERVER['HTTP_AUTHORIZATION'];\r\n\r\n if ($header != null && preg_match('/^Bearer[ ]+(.+)/i', $header, $captured))\r\n {\r\n return $captured;\r\n }\r\n\r\n if ($_SERVER['REQUEST_METHOD'] == 'GET')\r\n {\r\n return $_GET['access_t...
[ "0.68614656", "0.68573296", "0.68573296", "0.68573296", "0.68573296", "0.6833982", "0.6766311", "0.6750373", "0.6750373", "0.6716843", "0.6712098", "0.6682548", "0.6682548", "0.6682548", "0.6682548", "0.6682548", "0.6682548", "0.6682548", "0.6682548", "0.6682548", "0.6682548"...
0.71816236
0
fonction de calcul d'age a partir de date de naissance sous forme AAAAMMJJ
функция расчета возраста на основе даты рождения в формате AAAAMMJJ
function age($naiss){ list($y,$m,$d) = explode('-',$naiss);// list créer un tableau $diff = date('m') - $m; if( $diff < 0 ){ //le mois de naissance de la personne n'est pas encore le bon, par rapport au mois en cours, donc elle "perd" 1an (y++) $y++; }elseif($diff == 0 &&...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculAge($date){\n\n$timestamp = strtotime($date); // en seconde\nreturn ceil((time() - $timestamp) / (60 * 60 * 24 * 365)); //calcul de l'age en arrondit\n}", "function age($date)\n{\n\t// PHP décompose la date saisie dans l'ordre défini\n list($annee, $mois, $jour) = explode ('/', $date);\n $TS...
[ "0.77393025", "0.7426872", "0.7194352", "0.7135991", "0.693347", "0.6844857", "0.6766513", "0.67515135", "0.6683365", "0.665995", "0.6639407", "0.6585441", "0.6580333", "0.65747446", "0.65393806", "0.65247744", "0.65232384", "0.651775", "0.65086156", "0.6482359", "0.6437759",...
0.82830113
0
Return an icon representing the visibility of the course
Вернуть иконку, представляющую видимость курса
function get_course_visibility_icon($v) { $path = api_get_path(REL_CODE_PATH); $style = 'style="margin-bottom:-5px;margin-right:5px;"'; switch($v) { case 0: return '<img src="'.$path.'img/bullet_red.gif" title="'.get_lang('CourseVisibilityClosed').'" '.$style.' />'; break; case 1: return '<im...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function icon()\n {\n return '<i class=\"fas fa-plane-departure sidebar-icon\"></i>';\n }", "public function getIconForRecordWithMockRecordWithHiddenFlagReturnsNormalIconAndOverlay() {}", "public function icon(): string;", "public function get_icon() {\n\t\tglobal $wc_authorize_sim...
[ "0.64287", "0.6388247", "0.6366592", "0.6113638", "0.6071895", "0.60611326", "0.60611326", "0.6046433", "0.5988314", "0.59722763", "0.59179157", "0.5884875", "0.5884875", "0.58694166", "0.58541185", "0.58527994", "0.58218193", "0.5807028", "0.57842445", "0.57693446", "0.57400...
0.79532975
0
set the previous token for PHP file streaming
установить предыдущий токен для потоковой передачи файла PHP
public function setPreviousToken() { $this->_token = $this->_previousToken; $this->_session->key = $this->_previousToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getNextToken() {}", "protected function _getNextToken() {}", "public function next_token()\n {\n }", "function resetToken() {\n $this->setToken(make_string(40));\n }", "public function set() {\n\t\t$this->token = uniqid(rand(), true);\n\n\t\t$this->time = time();\n...
[ "0.61627007", "0.61627007", "0.61043566", "0.607167", "0.5759482", "0.57057667", "0.56079113", "0.55237037", "0.5508565", "0.5463904", "0.54513943", "0.5448828", "0.54418063", "0.54359305", "0.5415702", "0.5414065", "0.5382302", "0.53811765", "0.53761333", "0.53738976", "0.53...
0.720171
0
Indicate whether the renderer is capable of rendering trees of view models
Укажите, способен ли рендерер отображать деревья моделей представления
public function canRenderTrees();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canRenderTrees()\n {\n return $this->__renderTrees;\n }", "public function getRenderParents(): bool;", "public function __isMainTree()\n\t{\n\t\treturn $this->table_tree === 'tree';\n\t}", "public function supportsTermHierarchyDesign() {\n \treturn $this->manager->supportsTerm...
[ "0.81133866", "0.64701277", "0.645384", "0.6410741", "0.6356743", "0.62417096", "0.62353307", "0.6232864", "0.61393833", "0.6110469", "0.6077327", "0.60456336", "0.6043103", "0.60351473", "0.5987362", "0.5853956", "0.58505553", "0.5846714", "0.5837995", "0.5805964", "0.578351...
0.8186635
0
Gets the computed normalization contexts for given groups.
Получает вычисленные контексты нормализации для заданных групп.
public function getNormalizationContextForGroups(array $groups): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDenormalizationContextForGroups(array $groups): array;", "public function getNormalizationContexts(): array;", "public function setNormalizationContextForGroups(array $context, array $groups = []): void;", "public function setDenormalizationContextForGroups(array $context, array $groups = ...
[ "0.7304307", "0.6099826", "0.59139836", "0.5495448", "0.53455555", "0.47453034", "0.46126696", "0.45308113", "0.44227195", "0.4382518", "0.43744487", "0.42646965", "0.4196143", "0.4189175", "0.4189175", "0.4175185", "0.4109515", "0.41087556", "0.41074908", "0.410084", "0.4081...
0.80325735
0
Sets the normalization context for given groups.
Устанавливает контекст нормализации для заданных групп.
public function setNormalizationContextForGroups(array $context, array $groups = []): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDenormalizationContextForGroups(array $context, array $groups = []): void;", "public function getNormalizationContextForGroups(array $groups): array;", "public function getDenormalizationContextForGroups(array $groups): array;", "function setGroups($groups) {\n if (is_array($groups)...
[ "0.7164009", "0.64815396", "0.5706676", "0.5386428", "0.5140846", "0.51400465", "0.5067658", "0.50382346", "0.5001172", "0.4980942", "0.49799627", "0.49629313", "0.48689756", "0.48386523", "0.47723225", "0.4769469", "0.47627634", "0.4760015", "0.4753596", "0.4732903", "0.4688...
0.7828162
0
Gets all the denormalization contexts per group ("" being the base context applied to all groups).
Получает все контексты денормализации по группам ("" — это базовый контекст, применяемый ко всем группам).
public function getDenormalizationContexts(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDenormalizationContextForGroups(array $groups): array;", "public function getNormalizationContextForGroups(array $groups): array;", "public function setDenormalizationContextForGroups(array $context, array $groups = []): void;", "public function getContexts();", "public function getNorma...
[ "0.7304672", "0.6462966", "0.6000314", "0.5943111", "0.5916635", "0.553271", "0.5513563", "0.5513563", "0.5365157", "0.5331891", "0.5194104", "0.51109093", "0.50656384", "0.50149727", "0.49833047", "0.4863249", "0.4839967", "0.48140556", "0.48102522", "0.479252", "0.4788695",...
0.7307807
0
Gets the computed denormalization contexts for given groups.
Получает вычисленные контексты денормализации для заданных групп.
public function getDenormalizationContextForGroups(array $groups): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNormalizationContextForGroups(array $groups): array;", "public function getDenormalizationContexts(): array;", "public function setDenormalizationContextForGroups(array $context, array $groups = []): void;", "public function setNormalizationContextForGroups(array $context, array $groups = ...
[ "0.76032853", "0.6496426", "0.64332396", "0.5626132", "0.541504", "0.48913193", "0.44983113", "0.44532853", "0.43977025", "0.43837795", "0.43837795", "0.43634072", "0.43561164", "0.4335778", "0.43352512", "0.43081564", "0.43077093", "0.42861372", "0.42682028", "0.42512184", "...
0.82780755
0
Sets the denormalization context for given groups.
Устанавливает контекст денормализации для заданных групп.
public function setDenormalizationContextForGroups(array $context, array $groups = []): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNormalizationContextForGroups(array $context, array $groups = []): void;", "public function getDenormalizationContextForGroups(array $groups): array;", "public function getNormalizationContextForGroups(array $groups): array;", "public function set(array $groups)\n {\n $this->grou...
[ "0.73990244", "0.6775073", "0.6013397", "0.5453847", "0.5401843", "0.5398585", "0.53317237", "0.53111243", "0.4937679", "0.49361128", "0.49249876", "0.49171585", "0.49106437", "0.48777124", "0.48293018", "0.4774721", "0.47638568", "0.47319794", "0.4706306", "0.47017854", "0.4...
0.8179869
0
Delete Inquiry by ID
Удалить запрос по ID
public function deleteById($inquiryId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_enquiry($enquiry_id)\n {\n $this->db->update('tbl_enquiry',$this,array('enquiry_id'=>$enquiry_id));\n //echo $this->db->last_query();\n }", "public function deleted(CustomerInquiry $customerInquiry)\n {\n\n }", "public function destroy($id)\n {\n $inquiry = I...
[ "0.71961963", "0.71368855", "0.7006988", "0.69995344", "0.6972199", "0.6972199", "0.6972199", "0.6972199", "0.6972199", "0.6972199", "0.6970923", "0.69506216", "0.69193166", "0.69111645", "0.69111645", "0.69111645", "0.69111645", "0.69111645", "0.69111645", "0.69111645", "0.6...
0.81334144
0
Signs payload with $timestamp and $secret
Подписывает полезную нагрузку с использованием $timestamp и $secret
public function signPayload($payload, $secret, $timestamp = 'now') { if ($timestamp == 'now') { $timestamp = time(); } $payload = is_string($payload) ? $payload : json_encode($payload); $timedPayload = "$timestamp.$payload"; $value = $this->computeSignature($time...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function signMessage($secretKey);", "protected function generate_signature($payload_params, $timestamp)\n {\n $payload = \"timestamp:{$timestamp}\"; \n foreach ($payload_params as $key => $value) {\n $payload = \"{$payload},{$key}:{$value}\";\n }\n $tmp_signatur...
[ "0.71683824", "0.6858672", "0.6744343", "0.66804504", "0.64597446", "0.6390731", "0.63141274", "0.6189814", "0.6108093", "0.61041784", "0.60289395", "0.60185325", "0.59008175", "0.58496994", "0.58491135", "0.5829614", "0.5824143", "0.5823879", "0.58222914", "0.58133936", "0.5...
0.8138887
0
Extracts the timestamp in a signature.
Извлекает временной штамп из подписи.
private function getTimestamp($signature) { $items = explode(",", $signature); foreach ($items as $item) { $itemParts = explode("=", $item, 2); if ($itemParts[0] != "t") { continue; } if (is_numeric($itemParts[1])) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSignature();", "function wp_exif_date2ts($str)\n {\n }", "protected function parseTransactionEntryTimestamp()\n {\n $results = [];\n if (preg_match('/^:61:(\\d{2})((\\d{2})\\d{2})((\\d{2})\\d{2})[C|D]/', $this->getCurrentTransactionData(), $results)\n && !em...
[ "0.6456596", "0.6402775", "0.63269496", "0.63169116", "0.6248316", "0.6178181", "0.61704457", "0.6166245", "0.61111647", "0.61111647", "0.59928674", "0.5992445", "0.59275687", "0.5927226", "0.5927226", "0.5927226", "0.5920747", "0.59046364", "0.5904306", "0.59025097", "0.5848...
0.7839076
0
Computes the signature for a given payload and secret.
Вычисляет подпись для заданного содержимого и секрета.
private function computeSignature($payload, $secret) { return hash_hmac("sha256", $payload, $secret); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function signPayload($payload, $secret, $timestamp = 'now')\n {\n if ($timestamp == 'now') {\n $timestamp = time();\n }\n\n $payload = is_string($payload) ? $payload : json_encode($payload);\n $timedPayload = \"$timestamp.$payload\";\n $value = $this->compute...
[ "0.7342053", "0.67038405", "0.6635904", "0.66140556", "0.65715873", "0.65715873", "0.6407757", "0.63133484", "0.63053685", "0.6294876", "0.6267173", "0.609098", "0.6086867", "0.599443", "0.59915304", "0.5937906", "0.59037966", "0.5900572", "0.58357143", "0.5834017", "0.575542...
0.85240483
0
TODO: Implement toSlackObjectArray() method.
TODO: Реализовать метод toSlackObjectArray().
public function toSlackObjectArray(): array { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toSlackObjectArray(): array;", "public function toSlackObjectArray(): array\n {\n $message = [\n 'text' => $this->text,\n 'mrkdwn' => $this->markDown,\n 'response_type' => $this->responseType,\n ];\n\n if ($this->hasChannel()) {\n ...
[ "0.925128", "0.7939471", "0.6608399", "0.60131305", "0.59342927", "0.59342927", "0.59342927", "0.58991796", "0.58316785", "0.58112717", "0.5803808", "0.5801347", "0.57833487", "0.5755184", "0.57480764", "0.5713371", "0.5713371", "0.57118356", "0.5681555", "0.5662648", "0.5606...
0.9040295
1
news endpoints public function getNewsAction($year = null, $month = null, $day = null, $slug = null, $mode = null)
public function getNewsAction($year = null, $month = null, $day = null, $slug = null, $mode = null)
public function getNewsAction(Request $request) { $mode = $request->get('mode'); $year = $request->get('year'); $month = $request->get('month'); $day = $request->get('day'); if ($mode == 'archive') { $news = $this->get('renaissance.service.news')->getArchive(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex()\n {\n /* Здесь генерируется SQL-запрос для выборки новостей в соотвествии с условиями (все|категория|год и месяц)\n В данном случае не используется метод SQL_Request_Creator, т.к для пагинации требуется использование DAO */\n $where = '';\n switch(tru...
[ "0.6364564", "0.620637", "0.61925375", "0.61565655", "0.6021017", "0.6006371", "0.59837466", "0.5957344", "0.5957344", "0.5957344", "0.5957344", "0.5928922", "0.5881322", "0.58200425", "0.5807338", "0.57846445", "0.5777762", "0.5777379", "0.57763493", "0.5748748", "0.57310706...
0.76076597
0
get the Restriction Fields for the permission setups Should be used by all the controller before responding back to Request.
Получить поля ограничений для настроек разрешений. Должно использоваться всеми контроллерами перед ответом на запрос.
public function getRestrictionFields(Request $request) { /** Get the restriction fields from the security permission $restrictions */ $restrictions = []; $permissionFilter = ($request->input()); if (!empty($permissionFilter) && isset($permissionFilter['route_url']) && isset($permissionFilter[ $permissi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccessRestrictions()\n {\n return $this->getFieldArray('506');\n }", "public function getRestrictions() \n {\n return $this->_restrictions; \n }", "public function getRestrictions()\n {\n return $this->restrictions;\n }", "public function getRestrict...
[ "0.6868387", "0.6856651", "0.6727455", "0.6727455", "0.63605714", "0.6289791", "0.6163446", "0.6146608", "0.6102928", "0.610287", "0.60776556", "0.6071833", "0.6064252", "0.60569876", "0.6054282", "0.60385185", "0.60385185", "0.6035281", "0.6033547", "0.60278106", "0.60101014...
0.72743833
0
/ This method is used to get ONE restaurant by name now its used together with adding a restaurant noot anymore could be nice if we in the future would have a search funtion before they add a new one they could search for it if it exists
// Этот метод используется для получения одного ресторана по имени. Сейчас он используется вместе с добавлением ресторана, но уже не используется. Было бы хорошо, если бы в будущем мы имели функцию поиска, чтобы перед добавлением нового ресторана пользователи могли проверить, существует ли он.
public function getOneRestaurant($name){ $query = "SELECT r.*, c.name as city_name FROM restaurant r JOIN city c ON r.city = c.id WHERE r.name ='{$name}' "; $result = $this->mysqli->query($query); while ($row = $result->fetch_object()) { $restaurant = new Restaurant(); $restaurant->setId($row->id); $res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRestaurant()\n {\n $restaurant = Restaurant::getOneBy(array('_id' => $this->restaurant));\n return $restaurant;\n }", "public function afficherRestaurant(){\r\n\t\t$sql=\"SElECT * From restaurant\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($...
[ "0.70475656", "0.6666671", "0.64719284", "0.64195645", "0.61206436", "0.6090729", "0.603002", "0.6028396", "0.6010517", "0.5983609", "0.5931748", "0.5793", "0.57855326", "0.5759624", "0.57280165", "0.5682202", "0.56469077", "0.5633375", "0.5613588", "0.55881995", "0.5496832",...
0.79283893
0
/ This method could be used to approve a restaurant not sure yet..
// Этот метод может быть использован для одобрения ресторана, который еще не уверен.
public function approveNewRestaurant(restaurant $res){ $query = sprintf("INSERT INTO restaurant( latitude, longitude, image, link, approved )VALUES ( '%s', '%s', '%s', '%s', '%d' )", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function approve() {\n\n }", "function approve(){\n\t\t$points= $this->ref('currently_requested_to_id')->get('points_available');\n\t\tif($points < 3000)\n\t\t\t$this->api->js()->univ()->errorMessage(\"Not suficcient points available, [ $points ]\")->execute();\n\t\t// Send point to the requester ...
[ "0.76765937", "0.7002296", "0.69104725", "0.6903896", "0.68125564", "0.64785904", "0.646956", "0.64442486", "0.64261204", "0.63636184", "0.63561887", "0.63050824", "0.6296809", "0.62911004", "0.62760884", "0.6261775", "0.621974", "0.6211101", "0.6184542", "0.61597526", "0.614...
0.7240661
1
when running the import restaurants script, this checks if a restaurant has already been importted before or not
при запуске скрипта импорта ресторанов это проверяет, был ли ресторан уже импортирован ранее или нет
public function hasImported(Restaurant $res){ $query = "SELECT id FROM restaurant WHERE name = '{$res->getName()}' OR hittaId ='{$res->getHittaId()}' LIMIT 1"; if (!$result = $this->mysqli->query($query)) die($this->mysqli->error); else { if ($this->mysqli->affected_rows == 1) { return true; } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isImportDatabaseDone() {}", "protected function needImport(): bool\n {\n $out = true;\n $this->structureCont = $this->structureApi->send();\n if ($structure = OpenDataStructure::find()->one()) {\n if ($structure->num_id == $this->structureCont->data['num_id']...
[ "0.6291677", "0.624105", "0.6142928", "0.60432243", "0.60091674", "0.59837246", "0.5786427", "0.57631075", "0.56931937", "0.56823665", "0.5667403", "0.56670886", "0.5665026", "0.5643555", "0.56184864", "0.55975014", "0.5588726", "0.5435211", "0.5414605", "0.53470325", "0.5341...
0.7304569
0
Handle calculations when delete a buying transaction instance.
Обработка вычислений при удалении экземпляра покупки.
public static function handleCalculationsOfDeletedBuying(Transaction $transaction): void { $transaction->share->handleCalculationsOfDeletedBuying($transaction); $transaction->share->portfolio->handleCalculationsOfDeletedBuying($transaction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function handleCalculationsOfDeletedBonus(Transaction $transaction): void\n {\n $transaction->share->handleCalculationsOfDeletedBonus($transaction);\n $transaction->share->portfolio->handleCalculationsOfDeletedBonus($transaction);\n }", "public static function handleCalculations...
[ "0.69621783", "0.6912633", "0.6727354", "0.6727354", "0.6727354", "0.6727354", "0.66313577", "0.662857", "0.6467369", "0.6448657", "0.6408586", "0.63986605", "0.639699", "0.639288", "0.6375222", "0.6350462", "0.6301976", "0.62799805", "0.6264247", "0.6263157", "0.62389624", ...
0.73986006
0
Handle calculations when delete a public offering transaction instance.
Обработка вычислений при удалении экземпляра публичного предложения.
public static function handleCalculationsOfDeletedPublicOffering(Transaction $transaction): void { $transaction->share->handleCalculationsOfDeletedBuying($transaction); $transaction->share->portfolio->handleCalculationsOfDeletedBuying($transaction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function handleCalculationsOfDeletedBuying(Transaction $transaction): void\n {\n $transaction->share->handleCalculationsOfDeletedBuying($transaction);\n $transaction->share->portfolio->handleCalculationsOfDeletedBuying($transaction);\n }", "public function delete()\n {\n ...
[ "0.6556547", "0.6464026", "0.6306264", "0.62858546", "0.6265374", "0.62161106", "0.6214771", "0.6193351", "0.6193351", "0.6193351", "0.6193351", "0.61864406", "0.618376", "0.616365", "0.61561817", "0.6151534", "0.61478794", "0.61345446", "0.61345446", "0.61345446", "0.6134544...
0.74668634
0