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 the list of file extensions to be interpreted by the PHP FastCGI processes.
Возвращает список расширений файлов, которые будут интерпретироваться процессами PHP FastCGI.
public static function getFCGIExtensions() { if (empty(MHTTPD::$config['FCGI']['extensions'])) { return array(); } return MHTTPD::$config['FCGI']['extensions']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSupportedFileExtensions() {}", "public function getSupportedFileExtensions()\n {\n return array_keys($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['onlineMediaHelpers']);\n }", "public function getAllowFileExtensions()\n\t{\n\t\treturn implode(',', array_merge($this->videoExtensions...
[ "0.75095266", "0.7450413", "0.7387379", "0.73495805", "0.72481513", "0.7211943", "0.7183596", "0.7134137", "0.7134137", "0.7122811", "0.70979065", "0.7062294", "0.7054121", "0.7054121", "0.70047903", "0.69241256", "0.69082946", "0.6902633", "0.68864197", "0.6818086", "0.68168...
0.80703557
0
Returns the configured server signature for displaying on pages.
Возвращает настроенный серверный штамп для отображения на страницах.
public static function getSignature() { return MHTTPD::$info['signature']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSignature() {\n $headers = $this->getHeaders();\n foreach ($headers as $key => $value) {\n if (strtolower($key) === 'x-hub-signature') {\n return $value;\n }\n }\n return '';\n }", "public function getSignature(): string\n {\n return $this->signature;\n ...
[ "0.64923227", "0.6383859", "0.6383859", "0.6373031", "0.6329084", "0.62366974", "0.6089666", "0.60710776", "0.60570353", "0.6019753", "0.60176116", "0.59977907", "0.59977907", "0.59977907", "0.59977907", "0.59977907", "0.5948271", "0.59415567", "0.5914705", "0.58922476", "0.5...
0.7002486
0
Returns information about the current server software.
Возвращает информацию о текущем серверном программном обеспечении.
public static function getSoftwareInfo() { return MHTTPD::$info['software']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function software() \n\t{\n\t\treturn $this->server( 'SERVER_SOFTWARE' );\n\t}", "public function getServerInfo()\n {\n return $this->sendServerCommand(\"serverinfo\");\n }", "public static function detectServerSoftware()\n\t{\n\n\t\tif(preg_match('/^lighttpd/', $_SERVER['SERVER_SOFTWARE'])...
[ "0.82948077", "0.71080875", "0.70880634", "0.6942562", "0.69406426", "0.693396", "0.68584883", "0.6842566", "0.6775766", "0.67655456", "0.6717535", "0.6596546", "0.65899944", "0.6583866", "0.6542156", "0.6489403", "0.64702284", "0.6460313", "0.64597917", "0.64231384", "0.6380...
0.8412379
0
Returns information for listing on the Server Status page.
Возвращает информацию для отображения в разделе Статус сервера.
public static function getServerStatusInfo() { return array( MHTTPD::getSoftwareInfo(), date('r', MHTTPD::$info['launched']), MHTTPD::getStatCount('up', true), MHTTPD::getStatCount('down', true), MHTTPD::getClientsSummary(), MFCGI::getScoreboard(true), MHTTPD::getAbortedSummary(), MHTTPD::get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function info() {\n return self::instance()->getClient()->get('api/status/info');\n }", "public function index()\n {\n try {\n $processStatuses = ProcessStatus::get();\n return $this->showAll($processStatuses);\n } catch (Exception $ex) {\n ...
[ "0.69967014", "0.6762573", "0.67358404", "0.67139465", "0.6638641", "0.6636018", "0.6619285", "0.65864766", "0.6580739", "0.6566443", "0.6557896", "0.651211", "0.65062374", "0.64727914", "0.64126945", "0.63449055", "0.6335868", "0.6325586", "0.63220274", "0.631772", "0.631498...
0.74566585
0
Returns the path to the configured access and error logs directory.
Возвращает путь к каталогу настроенных журналов доступа и ошибок.
public static function getLogPath() { return MHTTPD::$config['Paths']['logs']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function getLogPathFolder(){\n return dirname(__FILE__).self::ERROR_LOGS_DIRECTORY;\n }", "public static function errorlogDirectory()\n\t{\n\t\treturn false;\n\t\treturn '../errorlogs';\n\t}", "public function getLogDir();", "public function getLogPath() {\r\n\t\treturn $this->getF...
[ "0.8142427", "0.7879407", "0.76910794", "0.7677407", "0.7656658", "0.7656572", "0.7411818", "0.740294", "0.7401859", "0.7195321", "0.7129751", "0.7070933", "0.70112145", "0.698613", "0.6974255", "0.69395703", "0.6938829", "0.6855665", "0.6851775", "0.6812543", "0.67810524", ...
0.8133025
1
Determines whether the Server Status page should be displayed or not.
Определяет, должна ли отображаться страница статуса сервера.
public static function allowServerStatus() { return MHTTPD::$config['Admin']['allow_server_status']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function BeforePageDisplay( &$out ){\n\t\tglobal $wgRequest, $wgUser;\n\t\tglobal $wgUseAjax;\n\n\t\tif( $wgUser->isLoggedIn() && $wgUseAjax ){\n\t\t\t$out->addModules( 'ext.onlineStatus' );\n\t\t}\n\n\t\tif( !in_array( $wgRequest->getVal( 'action', 'view' ), array( 'view', 'purge' ) ) )\n\t\t\treturn true;...
[ "0.636028", "0.6359578", "0.63501185", "0.62520367", "0.62330663", "0.62324655", "0.6188043", "0.6183963", "0.61637515", "0.605326", "0.6037759", "0.5988386", "0.5972265", "0.59405714", "0.5925474", "0.5896578", "0.58809817", "0.5876161", "0.58642876", "0.58542144", "0.582569...
0.7045054
0
Determines whether the Server Info page should be displayed or not.
Определяет, должна ли отображаться страница Информация о сервере или нет.
public static function allowServerInfo() { return MHTTPD::$config['Admin']['allow_server_info']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isInformationVisible()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_INFORMATION);\n }", "public function canShowInfo() {}", "public function isForServer()\n {\n return $this->server !== null;\n }", "public function isCatalogInformationVisible(...
[ "0.71416783", "0.6807295", "0.66978884", "0.6455347", "0.6452842", "0.64419526", "0.63281745", "0.62444586", "0.6220971", "0.6198597", "0.6167629", "0.61568666", "0.60403675", "0.5992973", "0.59840673", "0.5955948", "0.59019166", "0.5888251", "0.58680236", "0.58520234", "0.58...
0.73005015
0
Determines whether the API Documentation page should be displayed or not.
Определяет, должна ли отображаться страница документации API или нет.
public static function allowAPIDocs() { return MHTTPD::$config['Admin']['allow_api_docs']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isApi()\n {\n return (self::getRequestType() == 'api')?true:false;\n }", "public function documentation() {\n\t\t$this->display(API_VIEWS_BASE.'/backend/documentation/index'); \n }", "protected function is_list_page() {\n\t\treturn false;\n\t}", "public function ...
[ "0.6362983", "0.6280511", "0.6213664", "0.6171089", "0.6167899", "0.6056447", "0.6049501", "0.60412884", "0.59809875", "0.5977476", "0.59451985", "0.5838461", "0.5780866", "0.5777056", "0.57674026", "0.5739612", "0.5728993", "0.57217425", "0.5712196", "0.57112235", "0.5707998...
0.70562786
0
Returns the configured user information for the server administrator.
Возвращает настроенные сведения о пользователе для администратора сервера.
public static function getAdminAuth() { if (empty(MHTTPD::$config['Admin']['admin_user'])) { return false; } return array( 'realm' => 'server admin', 'user' => MHTTPD::$config['Admin']['admin_user'], 'pass' => MHTTPD::$config['Admin']['admin_pass'], ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getUser() {\n return self::$ADMIN_USER;\n }", "public function getAdminUser()\n {\n return $this->registry->registry('current_admin_user');\n }", "public function getAdminUser()\n {\n $user = array(\n 'username' => $this->getConfiguration()->getValue...
[ "0.71476805", "0.71118903", "0.71110106", "0.71110106", "0.6934066", "0.692421", "0.69149846", "0.69060063", "0.68164015", "0.6707965", "0.65576684", "0.6525031", "0.64981616", "0.6476507", "0.6445292", "0.6391442", "0.6391442", "0.638917", "0.6382252", "0.6382135", "0.638103...
0.7352966
0
Returns a list of loaded request handlers as an array of objects or a formatted string, or a single handler object by configured type.
Возвращает список загруженных обработчиков запросов в виде массива объектов или отформатированной строки, или отдельный объект обработчика в зависимости от настроенного типа.
public static function getHandlers($asString=false, $type=null) { if (!$asString && !$type) { // Return the list of loaded objects return MHTTPD::$handlers; } elseif ($type && !$asString) { // Return a single loaded object if (!isset(MHTTPD::$handlers[$type])) {return false;} return MHTTPD:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function defaultHandlerTypes()\n {\n return [\n 'maintenance',\n 'notFound',\n 'notAllowed',\n 'error',\n 'phpError',\n ];\n }", "public function getTypeHandler()\n {\n return $this->handlers[$this->getType()];\n ...
[ "0.6279439", "0.61567026", "0.6139796", "0.59524524", "0.5945656", "0.5936977", "0.59269285", "0.58899313", "0.5876111", "0.5817937", "0.5660135", "0.5629119", "0.54595536", "0.5453537", "0.5377144", "0.527308", "0.52565545", "0.52547616", "0.5229512", "0.5192247", "0.5189388...
0.76155186
0
Returns the currently loaded handlers queue.
Возвращает текущую очередь загруженных обработчиков.
public static function getHandlersQueue($init=true) { if ($init) {MHTTPD::$handlersQueue->init();} return MHTTPD::$handlersQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHandlers()\n {\n return $this->handlers;\n }", "public function fetchQueue() {\n\t\tif (TRUE === self::$instance instanceof QueueInterface) {\n\t\t\treturn self::$instance;\n\t\t}\n\t\treturn $this->initializeQueue();\n\t}", "public function getQueue();", "public function getQ...
[ "0.69382656", "0.6792673", "0.67824286", "0.67824286", "0.67304206", "0.66839796", "0.6668459", "0.6668459", "0.66399014", "0.66365814", "0.66221076", "0.66018504", "0.6586128", "0.6577119", "0.6531101", "0.6521215", "0.6496578", "0.6447995", "0.6435249", "0.6395472", "0.6350...
0.74156415
0
Returns the list of configured access authentication details.
Возвращает список настроенных деталей аутентификации доступа.
public static function getAuthList() { return !empty(MHTTPD::$config['Auth']) ? MHTTPD::$config['Auth'] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getAuthenticationConfig() {\n\t\t$config = $this->getServiceLocator()->get('config');\n\t\tif (isset($config['authentication'])) return $config['authentication'];\n\t\telse return [];\n\t}", "public function getAccessList() {\n return $this->_get(16);\n }", "public function getAuthInfo...
[ "0.6853585", "0.672578", "0.66362697", "0.66301346", "0.64560455", "0.64475787", "0.6401969", "0.6383257", "0.63169754", "0.63145745", "0.6226347", "0.62010014", "0.61057127", "0.6086777", "0.6073327", "0.60561275", "0.6019459", "0.6019459", "0.60118395", "0.60103583", "0.596...
0.72461665
0
Returns the server stat count of the given name.
Возвращает счетчик статов сервера с заданным именем.
public static function getStatCount($name, $formatted=false) { if (isset(MHTTPD::$stats[$name])) { return $formatted ? MHTTPD::formatSize(MHTTPD::$stats[$name]) : MHTTPD::$stats[$name]; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countNameservers(): int {}", "public function getServerInfoCount()\n {\n return $this->count(self::_SERVER_INFO);\n }", "public function findServersCount()\r\n {\r\n \t$query = \"select count(*) as count from `servers`\";\r\n \r\n \t$result = $this->DB->fetchColumn($que...
[ "0.71840847", "0.69439983", "0.6360713", "0.6333928", "0.6242203", "0.62119746", "0.5971724", "0.59704536", "0.58511055", "0.57915604", "0.5768736", "0.57394224", "0.5716797", "0.5703957", "0.56953984", "0.5689674", "0.5650134", "0.55853677", "0.55847144", "0.556826", "0.5515...
0.72159755
0
Creates a brief summary list of the connected clients.
Создает краткий список подключенных клиентов.
public static function getClientsSummary() { $summary = ''; foreach (MHTTPD::$clients as $client) { $summary .= $client->getSummary()."\n"; } return $summary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clientList() {\n return $this->returnCommand(['CLIENT', 'LIST'], null, null, ResponseParser::PARSE_CLIENT_LIST);\n }", "public function client_list()\n {\n return ClientList::latest()->paginate(10);\n }", "public function listClients(){\n $mysql= $this->database->d...
[ "0.6483087", "0.63488656", "0.62941134", "0.62731576", "0.6247569", "0.6229187", "0.62164766", "0.61918414", "0.6045793", "0.5990428", "0.5954051", "0.5940975", "0.59273565", "0.59249496", "0.5913745", "0.5910921", "0.5909654", "0.5908593", "0.5892994", "0.587324", "0.5868813...
0.7423469
0
Returns the list of configured mime types.
Возвращает список настроенных типов mime.
public static function getMimeTypes() { return MHTTPD::$config['Mimes']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMimetypes()\n\t{\n\t\treturn $this->mimeTypes;\n\t}", "public function getMimeTypes() {\n return $this->mimeTypes;\n }", "public static function getAllMimeTypes():array;", "public function getAvailableMimeTypes()\n {\n return $this->availableMimeTypes;\n }", "stati...
[ "0.8294866", "0.82882845", "0.8181627", "0.807407", "0.7963864", "0.79494417", "0.7847374", "0.78200144", "0.77975315", "0.7652592", "0.7638057", "0.76056087", "0.7526512", "0.75212085", "0.7460236", "0.743895", "0.7347182", "0.7296489", "0.7280664", "0.7184006", "0.7124255",...
0.84952116
0
Creates the main server listening socket on the configured address/port. stream_socket_server() is used here rather than the sockets extension mainly due to its inbuilt support for SSL connections.
Создает основной серверный сокет для прослушивания на настроенном адресе/порте. Здесь используется stream_socket_server(), а не расширение sockets, в основном из-за встроенной поддержки SSL-соединений.
protected static function createListener($context) { $type = MHTTPD::$config['SSL']['enabled'] ? 'ssl' : 'tcp'; $addr = MHTTPD::$config['Server']['address']; $port = MHTTPD::$config['Server']['port']; if (!(MHTTPD::$listener = stream_socket_server("{$type}://{$addr}:{$port}", $errno, $errstr, STREAM_SERVE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createSocket()\n {\n //Create TCP/IP sream socket\n $this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n //reuseable port\n socket_set_option($this->socket, SOL_SOCKET, SO_REUSEADDR, 1);\n\n //bind socket to specified host\n socket_bind($this-...
[ "0.66744286", "0.66344595", "0.6532833", "0.6388822", "0.62629676", "0.6219293", "0.62053305", "0.60998553", "0.6059594", "0.6051707", "0.6030889", "0.5921175", "0.5849558", "0.5837673", "0.58367616", "0.5802052", "0.5749525", "0.57254183", "0.5706855", "0.5681658", "0.567672...
0.7015434
0
This method should be called to gracefully shut down the server.
Этот метод должен вызываться для мягкого выключения сервера.
protected static function shutdown() { if (MHTTPD::$debug) {cecho("Shutting down the server ...\n");} MHTTPD::$running = false; // Close listener MHTTPD::closeSocket(MHTTPD::$listener); // Kill all running FCGI processes exec('taskkill /F /IM php-cgi.exe'); // Remove any active clients forea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {\n\t\t$this->stop();\n\t}", "public function shutdown();", "public function shutdown();", "public function...
[ "0.78425866", "0.78425866", "0.78425866", "0.78425866", "0.78425866", "0.7825372", "0.7802271", "0.7802271", "0.76985943", "0.75290066", "0.7504021", "0.74799824", "0.7451315", "0.744412", "0.741093", "0.73860574", "0.7334429", "0.7305934", "0.7255227", "0.71839285", "0.71667...
0.8219987
0
Launches the default browser in the background and navigates to the default index page (after a brief delay). rundll32.exe/url.dll is called here using WScript over the other options due to its generally more reliable performance ('start $url' produces an annoying error popup if the browser isn't already open).
Запускает дефолтный браузер в фоновом режиме и переходит на дефолтную индексную страницу (после краткого задержки). Здесь вызывается rundll32.exe/url.dll через WScript вместо других вариантов из-за более надежной производительности ('start $url' вызывает неприятное окно ошибки, если браузер не был уже открыт).
protected static function launchBrowser() { if (MHTTPD::$config['Other']['browser_autolaunch']) { $url = MHTTPD::$config['SSL']['enabled'] ? 'https://' : 'http://'; $url .= MHTTPD::$config['Server']['address'].':'.MHTTPD::$config['Server']['port'].'/'; $cmd = 'cmd.exe /C start /B /WAIT PING 127.0.0.1 -n 3 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function openBrowser($url, SymfonyStyle $io) {\n $is_windows = defined('PHP_WINDOWS_VERSION_BUILD');\n if ($is_windows) {\n // Handle escaping ourselves.\n $cmd = 'start \"web\" \"' . $url . '\"\"';\n }\n else {\n $url = escapeshellarg($url);\n }\n\n $is_linux = Process::...
[ "0.6087888", "0.56739134", "0.5212936", "0.5155909", "0.5042084", "0.49425703", "0.4905557", "0.48766857", "0.48760805", "0.48596776", "0.48519766", "0.48236823", "0.48012367", "0.47742614", "0.47495607", "0.47486478", "0.47334105", "0.4711", "0.4704783", "0.47029334", "0.469...
0.7576014
0
Runs the main server loop. This is where the server does most if its work. Once the listening socket is established, iterations of the the main loop are controlled entirely by stream_select() for both client connections and FCGI requests as well as any open file streams. Each loop should ideally finish as quickly as po...
Запускает основной цикл сервера. Здесь сервер выполняет большую часть своей работы. После установки сокета прослушивания, итерации основного цикла полностью контролируются функцией stream_select() для как клиентских соединений, так и запросов FCGI, а также для любых открытых потоков файлов. Каждый цикл, по идее, должен...
protected static function main() { // Create a TCP/SSL server socket context $context = MHTTPD::getContext(); // Start the listener MHTTPD::createListener($context); // Initialize some handy vars $timeout = ini_get('default_socket_timeout'); $maxClients = MHTTPD::$config['Server']['max_clients']; $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run() {\n while ($this->running) {\n $read = $this->readStreams;\n $write = $this->writeStreams;\n $except = null;\n\n if ($read || $write) {\n @stream_select($read, $write, $except, 0, 100);\n\n foreach ($read as $stream) {\...
[ "0.7016053", "0.69488436", "0.69133306", "0.67089456", "0.6646561", "0.63550645", "0.61900896", "0.6105044", "0.6089636", "0.6083241", "0.594207", "0.5900055", "0.57835525", "0.5762794", "0.5738868", "0.56662667", "0.5645363", "0.5559845", "0.550113", "0.5467251", "0.5466518"...
0.7146619
0
create a collapsible menue by iterating throug items
создайте сжимаемое меню, итерируя через элементы
function createCollapsibleMenue($items,$current,$key){ unset($items[$key ]); ?> <!-- Schreibe aktuellen Eintrag in collapsible Header --> <?php if ($current['collapsible']) { $collapsible = '<i class="material-icons right">keyboard_arrow_down</i>'; $link = ''; } else { $collapsible = ""; if($cur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build () {\n foreach ( $this->items as $item ) {\n if ( $item->id() == $this->current->id() ) {\n $this->menu[]=$item;\n $this->appendChildren();\n } else if ( $item->parent_id() == $this->current->parent_id() ) {\n $this->menu[]=$i...
[ "0.6325584", "0.5737215", "0.566524", "0.566524", "0.566524", "0.566524", "0.566524", "0.566524", "0.5544741", "0.5541232", "0.55274785", "0.5511908", "0.5474864", "0.5455559", "0.54525465", "0.54476434", "0.5440442", "0.5411988", "0.54038256", "0.5398209", "0.5396687", "0....
0.7483723
0
Retrieves a list of billing assignments. (billingAssignments.listBillingAssignments)
Получает список назначений оплаты. (billingAssignments.listBillingAssignments)
public function listBillingAssignments($profileId, $billingProfileId, $optParams = []) { $params = ['profileId' => $profileId, 'billingProfileId' => $billingProfileId]; $params = array_merge($params, $optParams); return $this->call('list', [$params], BillingAssignmentsListResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAssignments()\n {\n return $this->queryBuilder('tx_deepl_settings')->select('*')\n ->from('tx_deepl_settings')\n ->execute()\n ->fetchAll();\n }", "public function listBillingAccounts($optParams = array())\n {\n $params = array();\n $params ...
[ "0.5390474", "0.53052366", "0.5003872", "0.49572343", "0.4950013", "0.4923144", "0.4899255", "0.4845753", "0.48416504", "0.48410812", "0.4840595", "0.4840595", "0.47305214", "0.47015536", "0.4641276", "0.4637623", "0.45906094", "0.45587975", "0.45277014", "0.45177555", "0.451...
0.74661344
0
/ Function: buildzip builds a hypha.php containing all system files as zipped strings and sends it to client for download
Функция: buildzip создает hypha.php, содержащий все системные файлы в виде сжатых строк и отправляет их клиенту для загрузки
function buildzip() { // make list of files to include $files = array_keys(index()); foreach($_POST as $p => $v) if (substr($p, 0, 6) == 'build_') $files[] = substr($p, 6).'.php'; // get the base script to modify $hypha = file_get_contents('hypha.php'); // insert superuser name and password $hypha = pre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function build_zip() {\n\n\t\t$file_uploads = isset($_POST['file_uploads']) ? $_POST['file_uploads'] : '';\n\n\t\t$all_file_paths = array();\n\t\tif($file_uploads){\n\t\t\tforeach ($file_uploads as $key => $id) {\n\t\t\t\t$post_thumbnail_id = get_post_thumbnail_id( $id );\n\t\t\t\t$file_path = get_at...
[ "0.7098431", "0.67109716", "0.6523865", "0.64830923", "0.64051837", "0.6371909", "0.63708913", "0.63435286", "0.6339241", "0.6333282", "0.6309595", "0.6145113", "0.61130774", "0.61100155", "0.61039877", "0.6102134", "0.60285014", "0.5964613", "0.5953326", "0.5940628", "0.5930...
0.8474213
0
/ Function: tools generates a html table with all the system files and actions on them depending on possible changes between the local file and the version on a remote hypha Parameters: $hyphaServer url of remove hypha
Функция: tools генерирует html-таблицу со всеми системными файлами и действиями по ним в зависимости от возможных изменений между локальным файлом и версией на удалённой hypha Параметры: $hyphaServer URL удалённой hypha
function tools($hyphaServer) { global $errorMessage; switch($_POST['command']) { case 'add': $data = gzdecode(base64_decode(file_get_contents($hyphaServer.'?file='.$_POST['argument']))); if ($data) { file_put_contents($_POST['argument'], $data); chmod($_POST['argument'], 0664); } else $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show_changed_files() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n error_reporting(E_ALL);\r\n ini_set(\"dis...
[ "0.5896481", "0.574359", "0.57088673", "0.5664245", "0.5571651", "0.5555847", "0.55236053", "0.55213886", "0.54514915", "0.5437935", "0.5396095", "0.53941524", "0.5381396", "0.5348468", "0.5346898", "0.5336269", "0.5310747", "0.5294862", "0.52886534", "0.527385", "0.522084", ...
0.74232733
0
/ Function: build produces html page for selecting hypha modules and languages to package in a new hypha.php install script
Функция: build создает html-страницу для выбора модулей hypha и языков для упаковки в новый скрипт установки hypha.php
function build() { $localIndex = index(); arsort($localIndex); ob_start(); ?> <div style="width:600px;"> <h1>hypha builder</h1> Here you can compose your own hypha system. <ol> <li>First you have to enter a name and password for the so called 'superuser' account.</li> <li>Then you can sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install() {\n\t\tglobal $errorMessage;\n\n\t\tif ($_POST['command'] == 'install' && is_writable('.')) {\n\t\t\t// upzip and install files\n\t\t\t$files = explode(',', data('index'));\n\t\t\tforeach ($files as $file) {\n\t\t\t\tif (!$file)\n\t\t\t\t\tcontinue;\n\t\t\t\t$path = pathinfo($file);\n\t\t\t\t$di...
[ "0.68117386", "0.6257656", "0.6169114", "0.61197644", "0.60670847", "0.6035333", "0.5963818", "0.59474105", "0.59227645", "0.5908078", "0.58754194", "0.58266115", "0.5825155", "0.58153105", "0.5814015", "0.58116204", "0.5811198", "0.5806034", "0.57935363", "0.5782737", "0.577...
0.7260305
0
Alterar dados de SicasConsultaMedica
Изменить данные SicasConsultaMedica
public function alterar($oSicasConsultaMedica = NULL){ if($oSicasConsultaMedica == NULL){ // recebe dados do formulario $post = DadosFormulario::formSicasConsultaMedica(NULL, 2); // valida dados do formulario $oValidador = new ValidadorFormulario(); if(!$oValidador->validaFormSicasConsultaMedic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Alterar() {\n $SQL = \"UPDATE dd_dados_domicilio SET \n IDTIPOLOGRADOURO ='\" . $this->IDTIPOLOGRADOURO . \"',\n NOMELOGRADOURO ='\" . $this->NOMELOGRADOURO . \"',\n NUMDOMICILIO ='\" . $this->NUMDOMICILIO . \"',\n COMPLEMENTO ='\" . $this->COMPLEMENTO . \"',\n BA...
[ "0.6761109", "0.6747411", "0.66255254", "0.6487145", "0.64740616", "0.6313572", "0.6304311", "0.62440556", "0.6227445", "0.6141292", "0.6141292", "0.61313254", "0.61217004", "0.60833186", "0.6046655", "0.5988509", "0.5977099", "0.59689313", "0.5963143", "0.5945785", "0.594379...
0.70868915
0
Total de registros de SicasConsultaMedica
Всего записей из SicasConsultaMedica
public function totalColecao(){ $oSicasConsultaMedicaBD = new SicasConsultaMedicaBD(); return $oSicasConsultaMedicaBD->totalColecao(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function totalRegistros();", "public function totalColecao(){\r\n $oSicasEspecialidadeMedicaBD = new SicasEspecialidadeMedicaBD();\r\n return $oSicasEspecialidadeMedicaBD->totalColecao();\r\n }", "public function total(){\n $total = $this->qualification + $this->referee_report + $...
[ "0.7712316", "0.72848725", "0.71452045", "0.71007335", "0.7094024", "0.7076156", "0.69729894", "0.69729894", "0.69711214", "0.6940392", "0.6938759", "0.6914168", "0.69066447", "0.6897834", "0.6897834", "0.6897834", "0.68754953", "0.687157", "0.68109006", "0.67490286", "0.6713...
0.7308667
1
Altera o email do cliente
Измените email клиента
public function changeEmail($cliente_id) { try { $email = \Request::get('email'); $data = (self::MODEL)::find($cliente_id); $data->email = $email; $data->save(); return $this->showResponse($data); } catch (\Exception $exception) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function changeEmail()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($request['new_email']) || $request['new_email']==\"\")...
[ "0.70404285", "0.69316673", "0.6927139", "0.69175583", "0.6824979", "0.6813773", "0.6729215", "0.66532266", "0.66166764", "0.6589006", "0.6583843", "0.6566653", "0.6562603", "0.65510255", "0.65164363", "0.6454262", "0.64516854", "0.64249766", "0.6392025", "0.63789344", "0.636...
0.71975356
0
Reading data from inaccessible properties is not allowed.
Чтение данных из недоступных свойств запрещено.
public function __get($name) { throw new \Foundation\Exception\BadMethodCallException('Reading data from inaccessible properties is not allowed.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allowProperties() {}", "public function shouldSkipUnknownProperties() {}", "abstract protected function getProperties();", "function shouldSkipUnknownProperties() ;", "abstract protected function get_properties();", "protected function _getReadonlyProperties()\n {\n return array(...
[ "0.70132905", "0.6672684", "0.6667319", "0.66350776", "0.6629763", "0.65768623", "0.65514445", "0.64856416", "0.63355434", "0.6268636", "0.6250038", "0.6249849", "0.61742264", "0.61074954", "0.5956313", "0.5937971", "0.5937971", "0.5937971", "0.59364015", "0.59116644", "0.588...
0.7304745
1
Sync the changes that were pending for the recurring downtime configuration after apply config is complete Runs after apply/reconfigure subsys command has been completed
Синхронизируйте изменения, которые были задержаны для конфигурации повторяющейся недоступности, после завершения команды apply config. Выполняется после завершения команды apply/reconfigure subsys
function recurringdowntime_apply_pending_changes($cbtype, &$cbargs) { // Verify this is an apply config and it finished successfully if ($cbargs['command'] != COMMAND_NAGIOSCORE_APPLYCONFIG || $cbargs['return_code'] != 0) { return; } // Verify there are pending changes $pending = recurringd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reload_all_sync() {\n\tglobal $config;\n\n\t/* parse config.xml again */\n\t$config = parse_config(true);\n\n\t/* set up our timezone */\n\tsystem_timezone_configure();\n\n\t/* set up our hostname */\n\tsystem_hostname_configure();\n\n\t/* make hosts file */\n\tsystem_hosts_generate();\n\n\t/* generate re...
[ "0.69894373", "0.6581784", "0.62709355", "0.6176952", "0.6142984", "0.6103777", "0.6029013", "0.59590673", "0.5909277", "0.57832086", "0.57815963", "0.5752379", "0.572294", "0.571582", "0.56891197", "0.56780326", "0.5594504", "0.55939543", "0.546231", "0.5432511", "0.542029",...
0.73544157
0
Convert a PHP array containing recurring downtime config to a string appropriate for downtime's schedule.cfg
Преобразуйте PHP-массив, содержащий конфигурацию повторяющихся простоев, в строку, подходящую для schedule.cfg простоев
function recurringdowntime_array_to_cfg($arr) { if (count($arr) == 0) { return ""; } $cfg_str = ""; foreach ($arr as $sid => $schedule) { if (count($schedule) == 0) { continue; } $cfg_str .= "define schedule {\n"; $cfg_str .= "\tsid\t\t\t$sid\n"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recurringdowntime_get_cfg()\n{\n recurringdowntime_check_cfg();\n $cfg = file_get_contents(RECURRINGDOWNTIME_CFG);\n return recurringdowntime_cfg_to_array($cfg);\n}", "function recurringdowntime_write_cfg($cfg)\n{\n if (is_array($cfg)) {\n $cfg_str = recurringdowntime_array_to_cfg($cf...
[ "0.6528919", "0.6488773", "0.57189596", "0.56734097", "0.56181705", "0.547865", "0.53784984", "0.53151447", "0.53020585", "0.5278031", "0.5262727", "0.5217304", "0.52019185", "0.5122828", "0.51058817", "0.5093991", "0.50462073", "0.5026799", "0.5025568", "0.50076693", "0.5005...
0.8173625
0
Test isEnum, enum data type & values, and default.
Тест isEnum, тип данных enum и значения, а также значение по умолчанию.
public function testEnumDataType() { $tableName = 'ramp_enumTesting'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'gender'; $field = new Application_Model_Field($whichField, array(), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEnumField()\n {\n $field = $this->table->getField('yeahnay'); // An enum column\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Enumerated',\n $field);\n $enumValues = $field->getValues();\n $this->assertCount(2, $enum...
[ "0.66813856", "0.6616936", "0.658729", "0.6516475", "0.6394785", "0.6283025", "0.62467676", "0.6185788", "0.61654186", "0.615975", "0.6111784", "0.6082374", "0.602988", "0.6029672", "0.5976864", "0.5963048", "0.5950302", "0.5904844", "0.58995205", "0.5874721", "0.5867007", ...
0.7388066
0
Get the Grouping page special header class name
Получить специальное имя класса заголовка страницы Grouping
public function getSpecialHeaderClassName() { return $this->specialHeaderClassName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function voyage_mikado_header_class($classes) {\n\t\t$header_type = voyage_mikado_get_meta_field_intersect('header_type', voyage_mikado_get_page_id());\n\n\t\t$classes[] = 'mkdf-'.$header_type;\n\n\t\treturn $classes;\n\t}", "public function getGroupHeader()\n {\n if (is_null($this->groupHeader)) {\n ...
[ "0.683053", "0.6637812", "0.65224344", "0.64930576", "0.6322837", "0.6313183", "0.6256681", "0.61974657", "0.6134622", "0.61165714", "0.6082234", "0.6048214", "0.602517", "0.598934", "0.59839225", "0.5978656", "0.5940422", "0.5926847", "0.591176", "0.589264", "0.5875535", "...
0.70012313
0
Used to get listings based off of a location on the page. Example: 'grid' will return all listings on the grouping page grid (aka subcategories)
Используется для получения списков на основе расположения на странице. Пример: 'grid' вернёт все списки на странице сетки (т.е. подкатегории)
public function getListings($location) { $stmt = NULL; $results = NULL; switch ($location) { case 'grid': $sql = "SELECT t.pagetype AS type, c.id AS id, n.nickname AS nickname, IF(COUNT(c.id) > 0, TRUE, FALSE) AS validity, c....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListByLocation()\r\n {\r\n\t\tif (defined(\"WITH_SPHINX_TAGS\") && WITH_SPHINX_TAGS)\r\n\t\t{\r\n\t\t\t//$this->addFilter(\"entity_type\", 6, true); // exclude events from tag cloud\r\n $this->addFilter(\"entity_type\", 2); // get tags for groups Only\r\n\t\t\treturn parent::getL...
[ "0.62172973", "0.607114", "0.5840782", "0.5789351", "0.57889295", "0.57296777", "0.566635", "0.56627524", "0.564338", "0.56263614", "0.555925", "0.55474997", "0.5512467", "0.55071145", "0.5496947", "0.5473101", "0.5467323", "0.54619676", "0.54393935", "0.54306227", "0.5425963...
0.78246146
0
/ Plugin Name: Facebook Share Feed Dialog Plugin URI: Description: This plugin creates a javascript function fb_share_feed_dialog(). You can use this function to let people post directly to their Timeline Version: 1.01 Author: The Anh Author URI:
Название плагина: Facebook Share Feed Dialog URL плагина: Описание: Этот плагин создает функцию JavaScript fb_share_feed_dialog(). Вы можете использовать эту функцию, чтобы позволить людям публиковать напрямую в их Таймлайн Версия: 1.01 Автор: The Anh URL автора:
function ta_share_fb_script() { wp_enqueue_script( 'social-share-fb', plugins_url('js/share-fb.js', __FILE__), array( 'jquery' ), '1.0.0', true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function culturefeed_search_ui_add_facebook_share() {\n\n $fb_app_id = variable_get('culturefeed_search_ui_fb_app_id', '');\n if (!empty($fb_app_id)) {\n drupal_add_js(drupal_get_path('module', 'culturefeed') . '/js/facebook_share.js');\n drupal_add_js(array('culturefeed' => array('fbAppId' => $fb_app_id))...
[ "0.7134015", "0.69734704", "0.6950652", "0.68945396", "0.6762442", "0.6704617", "0.66035175", "0.6524725", "0.64954287", "0.64785564", "0.6419238", "0.6357457", "0.6352444", "0.6305331", "0.6249466", "0.6247981", "0.6233407", "0.62130547", "0.62030596", "0.61674535", "0.61103...
0.72939587
0
method check checking or token exists and in session have the same token if token exists delete them and return true.
метод проверяет, существует ли токен, и если токен существует, проверяет, совпадает ли он с токеном в сессии. Если токен существует, удаляет их и возвращает true.
public static function check($token){ $tokenName = Config::get('session/token_name'); if (Session::exists($tokenName) && $token === Session::get($tokenName)) { Session::delete($tokenName); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function check($token) {\r\n\t\t$tokenName = Config::get('session/token_name');\r\n\r\n\t\tif (Session::exists($tokenName) && $token === Session::get($tokenName)) {\r\n\t\t\tSession::delete($tokenName);//dont need it any more\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public ...
[ "0.8104914", "0.8099782", "0.8097319", "0.800509", "0.7889978", "0.7459198", "0.74321926", "0.72856367", "0.7197678", "0.71761227", "0.7157418", "0.70978606", "0.7001567", "0.6988043", "0.6958434", "0.6947647", "0.69197774", "0.6891097", "0.6850057", "0.6777711", "0.67703754"...
0.8151756
0
Default "to string" handler Allows pages to _p()/echo()/print() this object, and to define the default way this object would be outputted. Can also be called directly via $objGroupParticipation>__toString().
Обработчик "to string" по умолчанию позволяет страницам вызывать _p()/echo()/print() этот объект и определять стандартный способ вывода этого объекта. Также может быть вызван напрямую через $objGroupParticipation>__toString().
public function __toString() { return sprintf('GroupParticipation Object %s', $this->intId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString()\n {\n return Text::format(self::DEFAULT_TO_STRING, get_class($this));\n }", "public function __toString()\n\t{\n\t\tswitch ($this->last_called) {\n\t\t\tcase \"Get_Documents_By_Name\":\n\t\t\tcase \"Get_Documents\":\n\t\t\tcase \"Get_Document_List\":\n\t\t\t\treturn $thi...
[ "0.6584186", "0.64531374", "0.6373067", "0.63469106", "0.6318043", "0.63144076", "0.6307043", "0.62735796", "0.6257036", "0.6257036", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0...
0.7102918
0
Returns true if the user requested to serialize the output data (&serialize=1 in the request)
Возвращает true, если пользователь запросил сериализацию выходных данных (&serialize=1 в запросе)
private function shouldSerialize() { $serialize = Common::getRequestVar('serialize', 0, 'int', $this->request); return !empty($serialize); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOutputting() {}", "public static function serialized(string $name): bool\n {\n return static::$serialize;\n }", "public function isSerialized()\n {\n if (!isset($this->str[0])) {\n return false;\n }\n\n /** @noinspection PhpUsageOfSilenceOperatorInspection */\n ...
[ "0.6654072", "0.6415039", "0.63699776", "0.6330348", "0.63162905", "0.6225804", "0.6064652", "0.6011371", "0.59884924", "0.594241", "0.5907368", "0.59025705", "0.587237", "0.5847748", "0.5745106", "0.5695224", "0.5662562", "0.56160754", "0.5597635", "0.5592475", "0.5576934", ...
0.76032305
0
Validate a date against the library date range
Проверить дату в пределах диапазона дат библиотеки
private function validateDate($date) { $dateHead = new \DateTime(); $dateTail = (new \DateTime('+2 weeks, +1 day'))->modify('midnight'); if ($date < $dateHead || $date >= $dateTail) { throw new Exceptions\InvalidDateException('Date outside acceptable range'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }", "function ...
[ "0.7795238", "0.73932344", "0.7290823", "0.7254914", "0.720043", "0.7170928", "0.71708786", "0.7164757", "0.7164757", "0.7162809", "0.71460426", "0.7125207", "0.71076894", "0.71010727", "0.7009659", "0.6985997", "0.6983555", "0.69765687", "0.6964718", "0.69596475", "0.6943207...
0.74756885
1
Test case to assert the event middleware definition is created correctly.
Тест-кейс для проверки корректности создания определения событийного промежуточного слоя.
public function testGetEventMiddlewareDefinition() { $clientName = 'clientName'; $eventMiddleware = $this->subject->getEventMiddlewareDefinition($clientName); $this->assertCount(2, $eventMiddleware->getArguments()); $this->assertSame('%mapudo.guzzle.middleware.event_dispatch_middlew...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetHandlerDefinition()\n {\n $clientName = 'clientName';\n\n /** @var ContainerBuilder|ObjectProphecy $container */\n $container = $this->prophesize(ContainerBuilder::class);\n\n $middleware = ['test_middleware' => [\n ['method' => 'attach']\n ]];...
[ "0.6642569", "0.6582048", "0.64233357", "0.62353176", "0.6153294", "0.6129908", "0.5991054", "0.5949481", "0.5934481", "0.5876484", "0.5872267", "0.58649874", "0.58563125", "0.58379316", "0.58311373", "0.5824571", "0.5823644", "0.58207476", "0.5815057", "0.5806604", "0.580454...
0.8089062
0
Test case to assert the log middleware definition is created correctly.
Тест-кейс для проверки корректности создания определения лог-миддлваре.
public function testGetLogMiddlewareDefinition() { $client = 'client'; $logMiddleware = $this->subject->getLogMiddlewareDefinition($client); $this->assertCount(3, $logMiddleware->getArguments()); $this->assertSame('%mapudo.guzzle.middleware.log_middleware.class%', $logMiddleware->ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetUpLoggerName()\n\t{\t\n\t\t$this->__Log->setupLogger('log_name',new \\Monolog\\Handler\\TestHandler());\n\t\t$logger = $this->__Log->getLogger('log_name');\n\n\t\t$this->assertInternalType('object',$logger);\n\t}", "public function testGetLogger()\n\t{\t\t\n\t\t$this->__Log->setupLogger('t...
[ "0.64303166", "0.62236476", "0.6179338", "0.6123543", "0.6102211", "0.6064592", "0.60590047", "0.5807065", "0.5782111", "0.57602566", "0.57544774", "0.57536954", "0.5702917", "0.5694712", "0.5658459", "0.56430435", "0.56424373", "0.56367004", "0.5616396", "0.5614831", "0.5600...
0.78026134
0
Do select list for: Suppliers Additional Emails
Выберите список для: Дополнительные адреса электронной почты поставщиков
function do_select_list_suppliers_additional_emails($avalue, $aname) { # Dim some Vars: global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; $_out = ''; # Set Query for select. $query = 'SELECT contacts_id, contacts_s_id, contacts_name_first, contacts_name_last, contacts_email FROM '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function do_select_list_suppliers($aname, $avalue) {\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Set Query for select.\n\t\t$query\t = 'SELECT s_id, s_company, s_name_first, s_name_last FROM '.$_DBCFG['suppliers'];\n\t\t$query\t.= \" WHERE s_email...
[ "0.72284275", "0.6165431", "0.6056979", "0.59823215", "0.5956728", "0.59533775", "0.58541936", "0.57612777", "0.5747015", "0.5694604", "0.56943625", "0.56774485", "0.56399715", "0.5569345", "0.5537811", "0.552397", "0.5484817", "0.54840535", "0.5479395", "0.5476864", "0.54493...
0.77125174
0
function createOtherDirs Create other dirs
функция createOtherDirs Создать другие директории
protected function createOtherDirs() { $this->createDir('Database', true); $this->createDir('Database/Migrations', true); $this->createDir('Database/Seeds', true); $this->createDir('Filters', true); $this->createDir('Language', true); $this->createDir('Validation', tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _createDirs()\n {\n $dir = $this->_class_dir;\n \n if (! file_exists($dir)) {\n $this->_outln('Creating app directory.');\n mkdir($dir, 0755, true);\n } else {\n $this->_outln('App directory exists.');\n }\n \n ...
[ "0.7325807", "0.7241165", "0.7164302", "0.7084659", "0.70713305", "0.69681144", "0.693752", "0.680825", "0.67742723", "0.66478854", "0.65808636", "0.65667534", "0.65366745", "0.63754594", "0.63202095", "0.63202095", "0.6280978", "0.62744695", "0.62731284", "0.61980015", "0.61...
0.8486001
0
function createDir Create directory and set, if required, gitkeep to keep this in git.
Функция createDir Создать директорию и установить, если требуется, gitkeep для сохранения этого в git.
protected function createDir($folder, $gitkeep = false) { $dir = $this->module_folder . DIRECTORY_SEPARATOR . ucfirst($this->module_name) . DIRECTORY_SEPARATOR . $folder; if (!is_dir($dir)) { mkdir($dir, 0777, true); if ($gitkeep) { file_put_contents($dir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDirectory() {}", "protected function createCacheDir()\n {\n if ( ! file_exists($this->cacheDir)) {\n mkdir($this->cacheDir);\n }\n }", "protected function createDir()\n\t\t{\n\t\t\t//si no existe la carpeta la creamos\n\t\t\tif (!file_exists($this->ruta))...
[ "0.7047838", "0.6582252", "0.6573644", "0.6570274", "0.6452161", "0.64423656", "0.64297956", "0.6390685", "0.6366765", "0.6334541", "0.6316199", "0.62994957", "0.629752", "0.62854064", "0.62601566", "0.6251981", "0.6251825", "0.6251328", "0.6238196", "0.62336993", "0.6232054"...
0.7137122
0
function updateAutoload Add a psr4 configuration to Config/Autoload.php file
функция updateAutoload Добавить конфигурацию psr4 в файл Config/Autoload.php
protected function updateAutoload() { $Autoload = new \Config\Autoload; $psr4 = $Autoload->psr4; if (isset($psr4[ucfirst($this->module_name)])){ return false; } $file = fopen(APPPATH . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'Autoload.php','r'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setupAutoload()\n {\n static::$autoload or spl_autoload_register(\n $this->psr4LoaderFor(__NAMESPACE__, __DIR__),\n true,\n true\n );\n\n static::$autoload = true;\n }", "public function RegisterAutoload()\n {\n spl_autoload_re...
[ "0.73756313", "0.6944415", "0.67408305", "0.6566249", "0.6505442", "0.6478664", "0.64503133", "0.6431538", "0.63965005", "0.6395615", "0.636389", "0.62910134", "0.6227085", "0.62179303", "0.61940163", "0.6184938", "0.6176568", "0.6148622", "0.6107102", "0.6048718", "0.6045221...
0.7559754
0
Test if has datas with $uid key
Проверить, содержит ли он данные с ключом $uid
public function has($uid) { $options = $this->getOptions(); $stmt = $this->adapter->query( sprintf('SELECT %s FROM %s WHERE %s = "%s"', $options['column_value'], $options['table'], $options['column_key'], $uid ),...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasUid(){\n return $this->_has(2);\n }", "private function _exists($uid){\n $select = $this->select()\n ->from($this->_name,array('uid'))\n ->where('uid = ?', $uid);\n $row = $this->fetchRow($select);\n\t\t\n // Zend_Debug::dump($select->__toStrin...
[ "0.7343773", "0.71314883", "0.70246536", "0.68971515", "0.68569654", "0.6812673", "0.67980164", "0.65110916", "0.64926165", "0.6451642", "0.6442927", "0.64296246", "0.64296246", "0.64296246", "0.64296246", "0.64195865", "0.640065", "0.6399793", "0.63959926", "0.63454956", "0....
0.72107875
1
Read datas with $uid key
Чтение данных с ключом $uid
public function read($uid) { $options = $this->getOptions(); $stmt = $this->adapter->query( sprintf('SELECT %s FROM %s WHERE %s = "%s"', $options['column_value'], $options['table'], $options['column_key'], $uid )...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get($uid) {\n\t}", "function interface_ar_usr_data_get($uid,$pid,$mid)\n\t\t\t{\n\t\t\t\t$sql = 'SELECT ar.*, usr.usr as name FROM '. $this->tbl_usr_ar.' AS ar, '.$this->tbl_usr.' AS usr WHERE ar.mid='.$mid.' AND ar.pid = '.$pid.' AND ar.uid=usr.id AND usr.id = '.$uid;\n\t\t\t\t$usr_ar = $this->DB->que...
[ "0.7250458", "0.70012474", "0.6920825", "0.656371", "0.65244985", "0.64885044", "0.64695424", "0.6227775", "0.62047243", "0.61790687", "0.6177889", "0.61372477", "0.6105012", "0.6088389", "0.60429174", "0.6037344", "0.60302305", "0.60037416", "0.5989605", "0.59487116", "0.594...
0.7194681
1
Can we convert settings?
Можно ли конвертировать настройки?
public static function canConvertSettings() { return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _convertSettings(&$settings)\n {\n foreach ($settings as $item => $val) {\n\n if (substr($item, 0, 6) == 'allow_') {\n $settings[$item] = ($val == 0) ? false : true;\n }\n }\n\n $settings['exclude'] = explode(',', $settings['exclude']);\...
[ "0.7237023", "0.62781686", "0.6194147", "0.6181555", "0.5971173", "0.59524965", "0.59232116", "0.5901699", "0.58868", "0.5862349", "0.5831167", "0.5825477", "0.5814863", "0.57985187", "0.5780242", "0.57667965", "0.5748498", "0.57260287", "0.5725605", "0.57029235", "0.5691813"...
0.79969263
1
Helper method to retrieve forums from nodes
Помощь метод для получения форумов из узлов
protected function fetchForums() { $forums = array(); foreach( $this->db->select( '*', 'node', array( "node.nodeid<>2 AND closure.parent=? AND node.contenttypeid=?", $this->fetchType( 'Thread' ), $this->fetchType( 'Channel' ) ) )->join( 'closure', "closure.child = node.nodeid" ) AS $node ) { $forums[$node['n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_forum_list() {\n return $this->call('get_forum_list');\n }", "public function forumNode()\n {\n if (!$this->forumNode)\n {\n $this->forumNode = eZContentObjectTreeNode::fetch(\n $this->attribute('node_id'),\n $this->languageCode()\n ...
[ "0.6809902", "0.64836293", "0.62971747", "0.62333465", "0.6196451", "0.6077108", "0.6073764", "0.6012346", "0.5999543", "0.59736747", "0.59313697", "0.5922558", "0.59117043", "0.5878383", "0.5867455", "0.5851826", "0.5819603", "0.57968575", "0.5795073", "0.57663786", "0.57451...
0.7513412
0
Gets a string representation of this server
Получает строковое представление этого сервера
public function __toString() { return $this->host . ':' . $this->port; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function GetServerString() : STRING\r\n {\r\n switch(DRIVER)\r\n {\r\n case 'MySQL':\r\n return('mysql:host=' . HOST . ';dbname=' . DATABASE_NAME);\r\n default:\r\n return('mysql:host=' . HOST . ';dbname=' . DATABASE_NAME);\r\n }\r...
[ "0.7205736", "0.71613693", "0.7022998", "0.69365484", "0.6842634", "0.665858", "0.6634126", "0.66328466", "0.6573421", "0.6537226", "0.6498204", "0.6468685", "0.6450126", "0.6450028", "0.6421601", "0.6346564", "0.634359", "0.63338494", "0.63338494", "0.63306314", "0.6305399",...
0.7609525
0
Sets the log instance
Устанавливает экземпляр логирования
public function setLog(Log $log) { $this->log = $log; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLogInstance(): void\n {\n $this->log_instance = QueryLogger::initializeQueryChainLog($this);\n }", "private function _setLog($log)\n {\n $this->log = $log;\n return $this;\n }", "protected static function configureInstance()\n\t{\n\t\t$logger = new Logger('De...
[ "0.8322471", "0.7328089", "0.72294253", "0.7228605", "0.7155914", "0.7099329", "0.6887902", "0.68365806", "0.67171067", "0.6703447", "0.653512", "0.64418817", "0.64296293", "0.6427446", "0.64124346", "0.6409742", "0.63905984", "0.6385901", "0.63822573", "0.63462514", "0.62814...
0.74368733
1
Clears the last panic
Очищает последнее прерывание
public function clearPanic() { $this->execute('panic.clear'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_EXIT] = Down_ErrorInfo_Exit::noneed;\n }", "public function clear()\n {\n $this->log = [];\n }", "public function reset()\n {\n $this->values[self::_EXCAVATE] = null;\n }", "p...
[ "0.629562", "0.62381667", "0.6087309", "0.6073643", "0.60643715", "0.6013155", "0.5992769", "0.5945287", "0.5941233", "0.5936783", "0.59355295", "0.5891133", "0.5891133", "0.5891133", "0.5891133", "0.58668864", "0.5859087", "0.58491504", "0.5827192", "0.5811038", "0.57933146"...
0.8144025
0
Collect node geolocation in background via Ajax
Сбор геолокации узла в фоновом режиме через Ajax
public function actionAjaxCollectGeo() { $lock = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . 'geo.lock'; $response = ['status' => 'warning', 'msg' => $this->module::t('general', 'Geolocation collecting is already running.')]; if (!file_exists($lock)) { $console = new C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionAjaxRecollectGeo($location, $prepend_location, $node_id)\n {\n try {\n\n $model = new Geolocation();\n\n /** Save node location */\n $prepend_location = (!empty($prepend_location)) ? $prepend_location : null;\n $save_location = $model-...
[ "0.6518053", "0.5714243", "0.57016975", "0.55131465", "0.5488123", "0.5484338", "0.53941697", "0.5384275", "0.53001124", "0.5276162", "0.52747524", "0.5263827", "0.522112", "0.52108216", "0.5209827", "0.51691926", "0.51688325", "0.5131373", "0.5115591", "0.5107836", "0.510783...
0.8112957
0
$time_elapsed = timeAgo($time_ago); The argument $time_ago is in timestamp (Ymd H:i:s)format. Function definition
$time_elapsed = timeAgo($time_ago); Аргумент $time_ago представлен в формате временной метки (Ymd H:i:s). Определение функции
function timeAgo($time_ago) { $time_ago = strtotime($time_ago); $cur_time = time()-28800; $time_elapsed = $cur_time - $time_ago; $seconds = $time_elapsed ; $minutes = round($time_elapsed / 60 ); $hours = round($time_elapsed / 3600); $days ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function time_Ago($time) { \n \n // Calculate difference between current \n // time and given timestamp in seconds \n $diff = time() - $time; \n \n // Time difference in seconds \n $sec = $diff; \n \n // Convert time difference in minutes \n $min = round($diff / 60 ); \n...
[ "0.7884377", "0.7260282", "0.7164432", "0.7141273", "0.71319723", "0.69959986", "0.69959986", "0.6964994", "0.6928122", "0.6927246", "0.6920535", "0.6904305", "0.68963015", "0.68765604", "0.6823943", "0.6807985", "0.6800133", "0.679153", "0.6774584", "0.6748985", "0.67376643"...
0.818667
0
Tests that 2 disagreed gets marked as cancel/disagreed
Тесты, в которых 2 не согласились, помечаются как отмененные/несогласованные
public function testTwoDisagreedNoCancelledIsDisagreed() { $history = $this->getMockHistory(array( 'getCountDisagreed' => 2, )); $result = $this->decider->getDecision($history); $this->assertEquals( OLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED, $result ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTwoCancelledNoDisagreedIsDisagreed()\n\t{\n\t\t$history = $this->getMockHistory(array(\n\t\t\t'getCountConfirmedDisagreed' => 2,\n\t\t\t));\n\n\t\t$result = $this->decider->getDecision($history);\n\t\t$this->assertEquals(\n\t\t\tOLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED,\n\t\t\...
[ "0.74521893", "0.70373327", "0.6315296", "0.63038063", "0.57395744", "0.56890845", "0.5681462", "0.56334496", "0.56164235", "0.5599066", "0.55465937", "0.545727", "0.5432743", "0.53712845", "0.5361333", "0.53519535", "0.5344831", "0.5328303", "0.531242", "0.5265989", "0.52636...
0.74224234
1
Tests that 2 confirmed_disagreed gets marked as cancel/disagreed
Тесты, проверяющие, что 2 confirmed_disagreed помечается как cancel/disagreed
public function testTwoCancelledNoDisagreedIsDisagreed() { $history = $this->getMockHistory(array( 'getCountConfirmedDisagreed' => 2, )); $result = $this->decider->getDecision($history); $this->assertEquals( OLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED, $result ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTwoDisagreedNoCancelledIsDisagreed()\n\t{\n\t\t$history = $this->getMockHistory(array(\n\t\t\t'getCountDisagreed' => 2,\n\t\t\t));\n\n\t\t$result = $this->decider->getDecision($history);\n\t\t$this->assertEquals(\n\t\t\tOLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED,\n\t\t\t$result\...
[ "0.6955699", "0.6690282", "0.64127743", "0.6129533", "0.5875573", "0.5846233", "0.5741694", "0.5722742", "0.5672198", "0.5627346", "0.5607549", "0.5585798", "0.5580044", "0.5552409", "0.5528225", "0.5516798", "0.5495939", "0.5483847", "0.5474092", "0.54527366", "0.5394605", ...
0.7135051
0
Tests one disagreed and one confirmed disagreed gets marked as cancel/disagreed
Тест, в котором один не согласен и один подтвердил несогласие, помечается как отмена/несогласие
public function testOneCancelledOneDisagreedIsDisagreed() { $history = $this->getMockHistory(array( 'getCountDisagreed' => 1, 'getCountConfirmedDisagreed' => 1, )); $result = $this->decider->getDecision($history); $this->assertEquals( OLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED, $r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTwoCancelledNoDisagreedIsDisagreed()\n\t{\n\t\t$history = $this->getMockHistory(array(\n\t\t\t'getCountConfirmedDisagreed' => 2,\n\t\t\t));\n\n\t\t$result = $this->decider->getDecision($history);\n\t\t$this->assertEquals(\n\t\t\tOLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED,\n\t\t\...
[ "0.74385256", "0.7373181", "0.6958194", "0.6842848", "0.6082306", "0.60353696", "0.58996624", "0.58770293", "0.5804412", "0.57695234", "0.5736544", "0.5701384", "0.569139", "0.5688771", "0.5687657", "0.568283", "0.5682142", "0.5634629", "0.5610113", "0.5608588", "0.55604", ...
0.75115967
0
Tests that react loans take precedence over disagreed
Тесты, проверяющие, что кредиты, которые реагируют, имеют приоритет над спорными
public function testReactTakesPrecedenceOverDisagreed() { $history = $this->getMockHistory(array( 'getCountPaid' => 1, 'getCountDisagreed' => 2, )); $result = $this->decider->getDecision($history); $this->assertEquals( OLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_REACT, $result ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTwoDisagreedNoCancelledIsDisagreed()\n\t{\n\t\t$history = $this->getMockHistory(array(\n\t\t\t'getCountDisagreed' => 2,\n\t\t\t));\n\n\t\t$result = $this->decider->getDecision($history);\n\t\t$this->assertEquals(\n\t\t\tOLPBlackbox_Enterprise_Generic_Decider::CUSTOMER_DISAGREED,\n\t\t\t$result\...
[ "0.59717184", "0.59424835", "0.58011425", "0.5791082", "0.56346947", "0.55434567", "0.55081266", "0.5426867", "0.5424317", "0.54224396", "0.54011935", "0.5357062", "0.53413993", "0.5291018", "0.5266901", "0.5249068", "0.52478707", "0.52117914", "0.52030843", "0.5201586", "0.5...
0.7092746
0
Get all destinations related to this article
Получить все пункты назначения, связанные с этой статьей
protected function destinations() { $list = $this->hasMany(Mapping\ArticleDestination::class, 'article_id', 'article_id'); return $list->getResults(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllDestination()\n {\n $destinations = [];\n \n $allDestinations = $this->pdo->prepare('SELECT * FROM destinations');\n $allDestinations->execute();\n \n while ($donneesDestination = $allDestinations->fetch(PDO::FETCH_ASSOC))\n {\n array_push($destinations, new Destin...
[ "0.72364235", "0.710738", "0.68104947", "0.65494305", "0.65488213", "0.60714906", "0.59334135", "0.591461", "0.58764005", "0.5848445", "0.5833889", "0.58260655", "0.57960606", "0.5795896", "0.5782617", "0.57728624", "0.5761642", "0.57586193", "0.575108", "0.5711202", "0.57014...
0.9045315
0
Get Help message for this module
Получить сообщение о помощи для этого модуля
public function getHelpMessage() { return "Get summary of a module or all modules\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function help()\n {\n // You could include a file and return it here.\n return \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\n }", "public function get_help()\n\t{\n\t\treturn '';\n\t}", "public function help()\r\n\t{\r\n\t\t// You could ...
[ "0.8388826", "0.82199055", "0.82126147", "0.81169057", "0.8101302", "0.8092861", "0.7854757", "0.7824589", "0.77846324", "0.7784203", "0.77822685", "0.77822685", "0.7762936", "0.775723", "0.77290404", "0.7679998", "0.7658723", "0.7645613", "0.7538306", "0.73526484", "0.732189...
0.86491305
0
Get extended help message
Получить расширенное сообщение помощи
public function getExtendedHelpMessage() { $out = $this->getHelpMessage() . "\n"; $out .= "Usage: summary [--short] [module]\n" . "Show the summary of the most recent results of each module.\n" . "If a module name is provided as an argument, it\n" . "will display...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_help(){\n $tmp=self::_pipeExec('\"'.$this->cmd.'\" --extended-help');\n return $tmp['stdout'];\n }", "public function getHelpMessage() { return $this->data['helpMessage']; }", "public function getHelp(): string\n {\n ret...
[ "0.8037826", "0.79402626", "0.7801226", "0.7746395", "0.76596934", "0.7446455", "0.7446455", "0.7420929", "0.7363276", "0.73349345", "0.73207104", "0.7192808", "0.7192808", "0.7192808", "0.71767694", "0.71521115", "0.71431315", "0.71131134", "0.7102975", "0.71028584", "0.7087...
0.86842835
0
loads scripts URL according to the current status if status defined and active
загружает скрипты по URL в соответствии со статусом, если статус определен и активен
private function loadURLs() { $status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test'; foreach ($this->_url as $scriptname => $modes) { $this->url[$scriptname] = $modes[$status]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadURLs()\r\n\t{\r\n\t\t$status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test';\r\n\r\n\t\tforeach ($this->url as $scriptname => $modes)\r\n\t\t\t$this->url_script[$scriptname] = $modes[$status];\r\n\t}", "public function setIsLoadScript($status)\n {\n $t...
[ "0.74690664", "0.64585596", "0.6164367", "0.61609364", "0.61609364", "0.5987267", "0.5932925", "0.59215367", "0.5880918", "0.5813071", "0.5799872", "0.57987654", "0.5779275", "0.57524407", "0.5731462", "0.57255983", "0.565822", "0.5654437", "0.5654437", "0.5654437", "0.565443...
0.7261437
1
returns the URL of the script given in param if it exists, false otherwise
возвращает URL скрипта, указанного в параметре, если он существует, иначе false
public function getUrl($script) { if (!array_key_exists($script, $this->url)) { $msg = "L'url pour le script $script n'existe pas ou n'est pas chargée. Vérifiez le paramétrage."; insertLogKwixo(__METHOD__ . ' : ' . __LINE__, $msg); return false; } return $this->url[$script]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUrl($script)\r\n\t{\r\n\t\tif (!array_key_exists($script, $this->url_script))\r\n\t\t{\r\n\t\t\t$msg = \"L'url pour le script $script n'existe pas ou n'est pas chargée. Vérifiez le paramétrage.\";\r\n\t\t\tCertissimLogger::insertLog(__METHOD__.' : '.__LINE__, $msg);\r\n\t\t\treturn false;\r\n\t\...
[ "0.7383174", "0.68795043", "0.687784", "0.687784", "0.67987496", "0.65201247", "0.6308316", "0.6241424", "0.6241424", "0.6241424", "0.6241424", "0.6241424", "0.6241424", "0.6241424", "0.6241424", "0.6233022", "0.61503166", "0.6085929", "0.6025426", "0.5986629", "0.5985298", ...
0.7406418
0
Test get messages from previous request
Тест получения сообщений из предыдущего запроса
public function testGetMessagesFromPrevRequest() { $storage = ['slimFlash' => ['Test']]; $flash = new Messages($storage); $this->assertEquals(['Test'], $flash->getMessages()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetEmptyMessagesFromPrevRequest()\n {\n $storage = [];\n $flash = new Messages($storage);\n\n $this->assertEquals([], $flash->getMessages());\n }", "public function testMessages()\n {\n $response = $this->json('GET', '/api/messages');\n $response->a...
[ "0.6963384", "0.6546446", "0.63883805", "0.6366512", "0.6366512", "0.6299762", "0.62522984", "0.61525875", "0.6126471", "0.6036581", "0.6027699", "0.60088867", "0.60025966", "0.5976435", "0.59667623", "0.59667623", "0.59667623", "0.59667623", "0.59667623", "0.59667623", "0.59...
0.7407301
0
Test get empty messages from previous request
Тест получения пустых сообщений из предыдущего запроса
public function testGetEmptyMessagesFromPrevRequest() { $storage = []; $flash = new Messages($storage); $this->assertEquals([], $flash->getMessages()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetMessagesFromPrevRequest()\n {\n $storage = ['slimFlash' => ['Test']];\n $flash = new Messages($storage);\n\n $this->assertEquals(['Test'], $flash->getMessages());\n }", "public function testGetWebhookQueueTemplateMessageEmpty()\n {\n $container = [];\n ...
[ "0.6869914", "0.6421036", "0.6279734", "0.6275319", "0.6217242", "0.6190312", "0.61655146", "0.61655146", "0.6144499", "0.6110451", "0.61057013", "0.6095381", "0.609537", "0.59745735", "0.59645414", "0.59409404", "0.59265304", "0.59264684", "0.59016716", "0.58902115", "0.5883...
0.76954585
0
Test set messages for current request
Сообщения тестового набора для текущего запроса
public function testSetMessagesForCurrentRequest() { $storage = ['slimFlash' => [ 'error' => ['An error']]]; $flash = new Messages($storage); $flash->addMessageNow('error', 'Another error'); $flash->addMessageNow('success', 'A success'); $flash->addMessageNow('info', 'An inf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetMessagesForNextRequest()\n {\n $storage = [];\n \n $flash = new Messages($storage);\n $flash->addMessage('Test', 'Test');\n $flash->addMessage('Test', 'Test2');\n\n $this->assertArrayHasKey('slimFlash', $storage);\n $this->assertEquals(['Te...
[ "0.68090874", "0.64293087", "0.62194574", "0.6216122", "0.61718696", "0.6116908", "0.60891205", "0.5985521", "0.5919066", "0.5918706", "0.5909979", "0.5904052", "0.58962536", "0.58763707", "0.5839283", "0.5825164", "0.57972217", "0.57724", "0.57596606", "0.57596606", "0.57596...
0.7029479
0
Test set messages for next request
Сообщения тестового набора для следующего запроса
public function testSetMessagesForNextRequest() { $storage = []; $flash = new Messages($storage); $flash->addMessage('Test', 'Test'); $flash->addMessage('Test', 'Test2'); $this->assertArrayHasKey('slimFlash', $storage); $this->assertEquals(['Test', 'Test2'],...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNextMessage(){\r\n }", "public function testAddMessageFromAnIntegerForNextRequest()\n {\n $storage = ['slimFlash' => []];\n $flash = new Messages($storage);\n\n $flash->addMessage('key', 46);\n $flash->addMessage('key', 48);\n\n $this->assertArrayHasK...
[ "0.62519413", "0.61591566", "0.61474276", "0.60851175", "0.607869", "0.6024805", "0.6023967", "0.58872044", "0.58124787", "0.5809612", "0.58067995", "0.57403266", "0.57360333", "0.5706457", "0.5687764", "0.5684246", "0.5680642", "0.5617745", "0.5605141", "0.5577496", "0.55737...
0.73202366
0
Test getting the message from the key
Проверка получения сообщения из ключа
public function testGetMessageFromKey() { $storage = ['slimFlash' => [ 'Test' => ['Test', 'Test2']]]; $flash = new Messages($storage); $this->assertEquals(['Test', 'Test2'], $flash->getMessage('Test')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetFirstMessageFromKey()\n {\n $storage = ['slimFlash' => [ 'Test' => ['Test', 'Test2']]];\n $flash = new Messages($storage);\n\n $this->assertEquals('Test', $flash->getFirstMessage('Test'));\n }", "public function testGetMessageFromKeyIncludingCurrent()\n {\n ...
[ "0.74023134", "0.73835194", "0.6972725", "0.69450796", "0.69185096", "0.6911737", "0.6717153", "0.6451006", "0.639705", "0.63416713", "0.6319928", "0.622334", "0.6215651", "0.6082025", "0.607969", "0.6066614", "0.6066289", "0.60417175", "0.60350317", "0.5990788", "0.59269774"...
0.77857244
0
Test getting the first message from the key
Тест получения первого сообщения из ключа
public function testGetFirstMessageFromKey() { $storage = ['slimFlash' => [ 'Test' => ['Test', 'Test2']]]; $flash = new Messages($storage); $this->assertEquals('Test', $flash->getFirstMessage('Test')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDefaultFromGetFirstMessageFromKeyIfKeyDoesntExist()\n {\n $storage = ['slimFlash' => []];\n $flash = new Messages($storage);\n\n $this->assertEquals('This', $flash->getFirstMessage('Test', 'This'));\n }", "public function testGetMessageFromKey()\n {\n $sto...
[ "0.7507137", "0.69184434", "0.6886332", "0.64328176", "0.6408872", "0.6302087", "0.6230232", "0.6221132", "0.6141961", "0.61303663", "0.6051193", "0.5973054", "0.59687555", "0.5947246", "0.58659756", "0.5840703", "0.57835543", "0.57457983", "0.57017016", "0.5682362", "0.56712...
0.81680954
0
Test getting the default message if the key doesn't exist
Тестирование получения сообщения по умолчанию, если ключа нет
public function testDefaultFromGetFirstMessageFromKeyIfKeyDoesntExist() { $storage = ['slimFlash' => []]; $flash = new Messages($storage); $this->assertEquals('This', $flash->getFirstMessage('Test', 'This')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetDefaultMessageIfNoMatchingValueFoundInMessagesList()\n {\n $this->translator->load();\n $this->assertEquals('default_value', $this->translator->get('invalid_message_key', 'default_value'));\n }", "public static function getDefaultMessage(): string;", "public function ...
[ "0.7424013", "0.7027813", "0.6519302", "0.6421024", "0.63071084", "0.6300398", "0.6262814", "0.62199277", "0.62195075", "0.62076044", "0.6201398", "0.6134098", "0.6125542", "0.60229933", "0.6016036", "0.59516007", "0.5947008", "0.59423625", "0.59402615", "0.5927038", "0.58530...
0.7725253
0
Sets SSL curl properties when requesting an https url.
Устанавливает свойства SSL curl при запросе по https URL.
private function setSSL() { curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setCurl($is_https = false)\n {\n // Init\n $this->curl = curl_init();\n // Sets basic parameters\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->curl, CURLOPT_TIMEOUT, isset($this->request->settings['timeout']) ? $this->request->set...
[ "0.67573386", "0.66084594", "0.6411469", "0.6334074", "0.62385255", "0.62204045", "0.621059", "0.621059", "0.61937183", "0.61431164", "0.6126274", "0.6072844", "0.60616535", "0.60616535", "0.6024835", "0.6024835", "0.5980887", "0.5961165", "0.59462595", "0.5920146", "0.591629...
0.79271114
0
Gets the station ID from name
Получает идентификатор станции по названию
public function getStationID(string $station_name) { if (substr($station_name, 0, 11) === "TRADE HUB: ") { $station_name = substr($station_name, 11); } $this->db->select('eve_idstation'); $this->db->where('name', $station_name); $query = $this->db->get('station')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIdForName($name, $dbh=null) {\r\n if (is_null($dbh)) $dbh = connect_to_database();\r\n $sql = \"SELECT id FROM stock WHERE LOWER(name) = LOWER('$name')\";\r\n $sth = make_query($dbh, $sql);\r\n $results = get_all_rows($sth);\r\n if ($results) {\r\n return $results[0]['id'];\r\n }...
[ "0.64477944", "0.64183456", "0.6276595", "0.62217396", "0.61974126", "0.5980914", "0.59624326", "0.59511644", "0.5909803", "0.59054863", "0.5901047", "0.5900353", "0.5878598", "0.5853307", "0.58530253", "0.5844175", "0.5843036", "0.5837389", "0.5837389", "0.5837389", "0.58373...
0.7542614
0
Returns the list of all stock list contents
Возвращает список всех содержимого списка акций
private function getStockListContents(): array { $list = $this->stocklistID; $this->db->select('i.eve_iditem as id, i.name as name, i.volume as vol'); $this->db->from('itemlist il'); $this->db->join('itemcontents ic', 'ic.itemlist_iditemlist = il.iditemlist'); $this->db->join...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function read_stocks() {\n return $this->yahooStock->getQuotes();\n }", "public function view_list(){\n\t\treturn view(mProvider::$view_prefix.mProvider::$view_prefix_priv.'stock');\n\t}", "public function all() {\n $stmt = $this->pdo->query('SELECT id, symbol, company '\n ...
[ "0.735539", "0.7155176", "0.7109039", "0.6581265", "0.6550308", "0.64300275", "0.64300275", "0.64100283", "0.64042234", "0.6404084", "0.6393538", "0.63809395", "0.63797426", "0.63797426", "0.63797426", "0.63650626", "0.6364002", "0.6364002", "0.63457245", "0.63457245", "0.634...
0.7995536
0
Returns the region ID from the provided station
Возвращает идентификатор региона из предоставленной станции
public function getRegionID(int $station_id): stdClass { $this->db->select('r.eve_idregion as id'); $this->db->from('region r'); $this->db->join('system sys', 'sys.region_eve_idregion = r.eve_idregion'); $this->db->join('station st', 'st.system_eve_idsystem = sys.eve_idsystem'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getId_region()\n {\n if (!isset($this->iid_region) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_region;\n }", "public function getRegionId()\n {\n return $this->getShippingAddress()->getRegionId();\n }", "public function getSta...
[ "0.6629912", "0.64900887", "0.61547905", "0.6060793", "0.59956", "0.59956", "0.585744", "0.5765551", "0.57334065", "0.5697013", "0.5693873", "0.56701523", "0.56606203", "0.56243885", "0.54742205", "0.54742205", "0.54712766", "0.5457892", "0.5449097", "0.5449097", "0.5449097",...
0.74810696
0
Returns the character name from an id
Возвращает имя персонажа по идентификатору
private function getCharacterName(int $id_character): string { $this->db->select('name'); $this->db->where('eve_idcharacter', $id_character); $query = $this->db->get('characters'); $result = $query->row()->name; return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function get_name($id) {\r\n\t\t\tif (trim($id)=='') {\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$all = self::get_all();\r\n\t\t\treturn $all[$id][0];\r\n\t\t}", "function getCharacter($id) {\n try {\n $item = $this->perform_query_one_param(\"SELECT name from characters WHERE i...
[ "0.7704027", "0.74475336", "0.7283829", "0.7243234", "0.7015801", "0.69534355", "0.69315755", "0.6859769", "0.6760725", "0.6686248", "0.66808677", "0.65932286", "0.6590633", "0.65726006", "0.65688515", "0.6528733", "0.65205944", "0.6519239", "0.65012133", "0.6500837", "0.6487...
0.79088765
0
Change the database collation. This tries to change the collation of the entire database, setting the default for newly created tables and columns. We have the reasonable expectation that this will fail on most live hosts.
Измените кодировку базы данных. Это попытается изменить кодировку всей базы данных, установив значение по умолчанию для новых таблиц и столбцов. Мы разумно ожидаем, что это завершится неудачей на большинстве живых серверов.
private function changeDatabaseCollation($newCollation) { $db = $this->container->db; $collationParts = explode('_', $newCollation); $charset = $collationParts[0]; $dbName = $this->container->platform->getConfig()->get('db'); $this->query(sprintf( "ALTER DATABASE %s CHARACTER S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myPear_set_collation(){\n $needed = False;\n if (!$needed) return;\n $c_set = 'utf8';\n $d_col = 'utf8_unicode_ci';\n myPear_db()->qquery(\"ALTER SCHEMA \".myPear_db()->Database.\" DEFAULT CHARACTER SET $c_set DEFAULT COLLATE $d_col\",True);\n foreach(myPear_db()->getTables() as $table){\n b_debu...
[ "0.7151892", "0.650667", "0.6472632", "0.6377463", "0.62235487", "0.6222845", "0.6212017", "0.61897814", "0.61086476", "0.6026438", "0.5995577", "0.59861034", "0.5937779", "0.56593704", "0.5590652", "0.5557284", "0.55048525", "0.5492732", "0.5492732", "0.54765594", "0.5465356...
0.713068
1
Here we we test our response's structure and type when we sort by price
Здесь мы проверяем структуру и тип нашей ответа при сортировке по цене
public function testSortByPrice() { $result=$this->sort->sortByPrice(); $result = $this->hotelMapperService->serialize($result); $this->assertInternalType('array',$result); foreach ($result as $i => $hotel) { var_dump($hotel['price']);die; $this->assertGreater...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSortByPrice()\n {\n $item1 = new \\Saitow\\Model\\Tire('sql', 1);\n $item1->setPrice(1.1);\n\n $item2 = new Saitow\\Model\\Tire('xml', 50);\n $item2->setPrice(2.2);\n\n $item3 = new \\Saitow\\Model\\Tire('other', 22);\n $item3->setPrice(0.1);\n\n ...
[ "0.6775954", "0.590531", "0.585309", "0.5791465", "0.56464386", "0.56445473", "0.56119233", "0.5596878", "0.5569873", "0.5545255", "0.55211115", "0.5482619", "0.54670006", "0.5464328", "0.54582024", "0.54364574", "0.54232496", "0.54016703", "0.5363386", "0.53609765", "0.53426...
0.7147369
0
! Generate 10 character salt !
! Создать соль длиной 10 символов !
private function generateSalt() { $possibleValues = '0123456789abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ'; $salt = ''; for($i = 0; $i < 10; $i++) { $salt .= $possibleValues[mt_rand(0, strlen($possibleValues)-1)]; } return $salt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function GenSalt()\n {\n $chars = array_merge(range('a','z'), range('A','Z'), range(0, 9));\n $max = count($chars) - 1;\n $str = \"\";\n $length = 22;\n \n while($length--) {\n shuffle($chars);\n $rand = mt_rand(0, $max);\n $str ...
[ "0.8620291", "0.86027485", "0.8424969", "0.83353364", "0.8298978", "0.8280773", "0.8258466", "0.82321376", "0.82104486", "0.8195782", "0.81943995", "0.8189444", "0.8149346", "0.81050533", "0.8100473", "0.80642945", "0.80625105", "0.80612385", "0.8059442", "0.8059442", "0.8057...
0.863523
0
Add a watermark to an image with a specified opacity. Alpha transparency will be preserved. If no offset is specified, the center of the axis will be used. If an offset of TRUE is specified, the bottom of the axis will be used. // Add a watermark to the bottom right of the image $mark = Image::factory('upload/watermark...
Добавить водяной знак на изображение с указанной прозрачностью. Будет сохранена альфа-прозрачность. Если не указано смещение, будет использоваться центр оси. Если указано смещение TRUE, будет использоваться нижняя часть оси. // Добавить водяной знак в правый нижний угол изображения $mark = Image::factory('upload/waterm...
public function watermark(Image $watermark, $offset_x = NULL, $offset_y = NULL, $opacity = 100) { if ($offset_x === NULL) { // Center the X offset $offset_x = round(($this->width - $watermark->width) / 2); } elseif ($offset_x === TRUE) { // Bottom the X offset $offset_x = $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function watermark($watermark, $offset_x=null, $offset_y=null, $opacity=null);", "public function add_watermark_to_( $image ) {\n\n\t\t// TODO Select graphics library from plugin settings (this is GD, add Imagick)\n\n\t\t$watermark_file = get_attached_file( $this->settings['watermark']['image'] );\n\n\t\t...
[ "0.8594125", "0.775226", "0.7401763", "0.73029447", "0.73026496", "0.7153652", "0.7117748", "0.69545376", "0.6895416", "0.6851341", "0.68019307", "0.6738347", "0.67224705", "0.66621417", "0.6597992", "0.65832454", "0.6577887", "0.6549959", "0.652484", "0.64720017", "0.6461848...
0.8034334
1
Store rule (e.g. [[UrlRule]]) to internal cache.
Хранить правило (например, [[UrlRule]]) в внутренний кэш.
protected function setRuleToCache($cacheKey, UrlRuleInterface $rule) { $this->_ruleCache[$cacheKey][] = $rule; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function saveCache(): void\n {\n //====================================================================//\n // Safety Check\n if (!isset($this->cacheItem) || !isset($this->cache) || empty($this->cache)) {\n return;\n }\n //===================================...
[ "0.5680179", "0.55724484", "0.55054665", "0.5440866", "0.54273087", "0.538548", "0.5383786", "0.53703", "0.5359271", "0.53575253", "0.53458375", "0.5341233", "0.53408355", "0.53124565", "0.5282261", "0.52774346", "0.52530915", "0.5242294", "0.52031064", "0.5185662", "0.515281...
0.712807
0
Get the File's original resource
Получить оригинальный ресурс файла
public function getOriginalFileResource() { return $this->originalFileResource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOriginalResource()\n {\n return isset($this->original_resource) ? $this->original_resource : null;\n }", "public function getOriginalResource() {\n\t\treturn $this->originalResource;\n\t}", "public function getOriginalResource()\n {\n return $this->resource;\n }", ...
[ "0.7779481", "0.77074766", "0.7693794", "0.7437302", "0.7437302", "0.7009194", "0.69877654", "0.6978498", "0.6731973", "0.6676021", "0.6612523", "0.66032326", "0.66032326", "0.66032326", "0.6600738", "0.6600738", "0.6600738", "0.6600738", "0.6600738", "0.6600738", "0.65468335...
0.8437936
0
Sets this File's original resource
Устанавливает оригинальный ресурс этого файла
public function setOriginalFileResource($originalFileResource) { $this->originalFileResource = $originalFileResource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOriginalResource($originalResource) {\n\t\t$this->originalResource = $originalResource;\n\t}", "public function updateOriginal()\n {\n // @todo Bug#1101: shouldn't just serialise this object\n // because some things change for the original\n // loaded_width\n /...
[ "0.71453226", "0.6865306", "0.66661096", "0.6439208", "0.6436352", "0.641165", "0.62328446", "0.62123764", "0.61517024", "0.60588366", "0.5894209", "0.5777561", "0.57602704", "0.57152414", "0.5713898", "0.5616245", "0.5580611", "0.5564613", "0.55543405", "0.5535997", "0.55168...
0.71582353
0
Test that we can read and parse the email
Тестирование возможности чтения и парсинга электронной почты
public function testMailParse() { // Parse a simple email $email_message = new EmailParse(); $email_message->read_email(true, $this->_email); // Basics $this->assertEquals('"ElkArte Community" <elkarteforum@gmail.com>', $email_message->headers['reply-to']); $this->assertEquals('[ElkArte Community] Test Me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testMailParse()\n {\n $raw = \"UmV0dXJuLVBhdGg6IDxzdXBwb3J0QGNvbW9kby5jb20+ClgtT3JpZ2luYWwtVG86IHNzbEB0ZXN0LmRlCkRlbGl2ZXJlZC1UbzogY2Rzc2xAaG9zdDJjMS50ZXN0LmRlClJlY2VpdmVkOiBmcm9tIG14cDAubmljZ2F0ZS5jb20gKG14cDAubmljZ2F0ZS5jb20gWzE4OC40MC42OS43Nl0pCiAgICBieSBob3MudGVzdC5kZSAoUG9zdGZpeCkgd2...
[ "0.73370063", "0.67949635", "0.66037804", "0.64252317", "0.6395159", "0.6377212", "0.62867296", "0.6222555", "0.6187763", "0.6138994", "0.607519", "0.604774", "0.6037602", "0.6035867", "0.5942482", "0.5934118", "0.59335464", "0.59266746", "0.58585733", "0.58531094", "0.584512...
0.78743756
0
This is a helpping method to calll CURL Delete request with username and password
Это вспомогательный метод для вызова CURL Delete запроса с именем пользователя и паролем
private function curl_delete($url) { $json_str = file_get_contents($this->cil_config_file); $json = json_decode($json_str); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_RETU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function call_api_delete(){\n$ch = curl_init('http://localhost:8001/api/users/....');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLINFO_HEADER_OUT, true);\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\n// Submit the DELETE request\n$result = curl_exec($ch);\n\n//Close cUR...
[ "0.76457405", "0.7013172", "0.6974841", "0.6775493", "0.67704713", "0.67443913", "0.65435946", "0.65435946", "0.64849", "0.64789796", "0.64669096", "0.64368284", "0.6370967", "0.6355791", "0.63540024", "0.63539404", "0.62862056", "0.6246455", "0.6229506", "0.62198025", "0.621...
0.7174635
1
This is a helpping method to create a project using the local prj.json file.
Это вспомогательный метод для создания проекта с использованием локального файла prj.json.
private function createProject() { $input = file_get_contents('prj.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/projects?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/projects?owner=wawong"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateProject()\n {\n echo \"\\nTesting project creation...\";\n $input = file_get_contents('prj.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects?owner=wawong\";\n $url = TestServiceAsReadOnly...
[ "0.7480772", "0.69335276", "0.6720666", "0.6686327", "0.6674912", "0.66042274", "0.6395912", "0.62972945", "0.62956166", "0.62850964", "0.6210036", "0.6200268", "0.61972654", "0.61848426", "0.6155389", "0.61428875", "0.6134689", "0.6129079", "0.6114572", "0.6112827", "0.60919...
0.7445076
1
Testing the project creation with the prj.json file
Тестирование создания проекта с использованием файла prj.json
public function testCreateProject() { echo "\nTesting project creation..."; $input = file_get_contents('prj.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/projects?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProjectCreation()\n {\n $user = factory(User::class)->create();\n $project = factory(Project::class)->make();\n $response = $this->actingAs($user)\n ->post(route('projects.store'), [\n 'owner_id' => $user->id,\n 'name' => $project->name,\n ...
[ "0.7153427", "0.7153302", "0.71247894", "0.6972111", "0.6698196", "0.66626316", "0.6662225", "0.6629134", "0.64922935", "0.6370959", "0.63647586", "0.6334146", "0.6322571", "0.6286674", "0.6244069", "0.61830956", "0.61817753", "0.61736554", "0.615833", "0.61153346", "0.610094...
0.82499796
0
Testing the project retreival by ID
Тестирование получения проекта по ID
public function testGetProjectByID() { echo "\nTesting the project retrieval by ID..."; $response = $this->getProject("P1"); //echo "\ntestGetProjectByID------".$response; $result = json_decode($response); $prj = $result->Project; $this->ass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProject($id)\n {\n }", "private function getProject($id)\n {\n ///$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects/\".$id;\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context. \"/projects/\".$id;\n \n echo...
[ "0.7300688", "0.7160052", "0.71215653", "0.69065416", "0.6845172", "0.6835409", "0.6801986", "0.67409396", "0.6733202", "0.66962236", "0.6671775", "0.6654084", "0.66138893", "0.65994096", "0.65855336", "0.6583683", "0.6583683", "0.65786403", "0.65296894", "0.6519466", "0.6519...
0.83770955
0
Testing the project search
Тестирование поиска проекта
public function testSearchProject() { echo "\nTesting project search..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/projects?search=test"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/projects?search=test"; $response ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProjects()\n {\n $response = $this->get('/projects'); \t\t\t\n }", "public function test_search()\n {\n Task::create([\n 'user_id' => 1,\n 'task' => 'Test Search',\n 'done' => true,\n ]);\n\n Livewire::test(Search::clas...
[ "0.6858462", "0.6852012", "0.6753273", "0.66946334", "0.6673342", "0.6618049", "0.6564328", "0.6496258", "0.64323014", "0.6419851", "0.6401977", "0.639658", "0.63620675", "0.63539433", "0.63435453", "0.6327412", "0.6318944", "0.63020056", "0.6277252", "0.6253027", "0.6215104"...
0.81959957
0
Testing the experiment creation.
Тестирование создания эксперимента.
public function testCreateExperiment() { echo "\nTesting Experiment creation..."; $input = file_get_contents('exp.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/experiments?owner=wawong"; $url = TestServiceAsReadOnly::$elas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInstrumentCreate()\n {\n $this->browse(function (Browser $browser) {\n $user = User::find(1);\n $browser->loginAs($user)\n ->visit(new instrumentManagementPage())\n ->assertSee('Instruments')\n ->press('@actions-button...
[ "0.65538555", "0.65322083", "0.632858", "0.6290923", "0.62865835", "0.62109554", "0.62014955", "0.6199749", "0.6188527", "0.6176559", "0.61609805", "0.6158647", "0.6152849", "0.61229026", "0.6113385", "0.611306", "0.611306", "0.60945725", "0.6086307", "0.60797703", "0.6079134...
0.8075641
0
Testing the experiment listing
Тестирование списка экспериментов
public function testListExperiments() { echo "\nTesting experiment listing..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/experiments"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/experiments"; $response = $this->curl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListExperts()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function testIndex()\n {\n // full list\n $response = $this->get(url('api/genre?api_token=' . $this->api_token));\n $response->assertStatus(200);\n $response->assert...
[ "0.68568736", "0.66832024", "0.66007644", "0.65801185", "0.64103985", "0.6407482", "0.638836", "0.6362429", "0.6359445", "0.63123435", "0.6307033", "0.6217772", "0.61934084", "0.6183226", "0.6171969", "0.61591905", "0.61553687", "0.61552304", "0.6153641", "0.6147386", "0.6132...
0.7766579
0
Testing the experiment retreival by ID
Тестирование получения эксперимента по ID
public function testGetExperimentByID() { echo "\nTesting the experiment retrieval by ID..."; $response = $this->getExperiment("1"); $result = json_decode($response); $exp = $result->Experiment; $this->assertTrue((!is_null($exp))); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getExperiment($id)\n {\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments/\".$id;\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context. \"/experiments/\".$id;\n \n $response = $this->curl_get($url);\n //e...
[ "0.70720243", "0.66221786", "0.6372758", "0.6348471", "0.6327254", "0.6164168", "0.61540025", "0.6119591", "0.6040424", "0.59662414", "0.59080625", "0.58955175", "0.58827364", "0.5867978", "0.5862803", "0.5862368", "0.5860236", "0.5822475", "0.5786058", "0.57855254", "0.57839...
0.8079397
0
Testing the experiment update.
Тестирование обновления эксперимента.
public function testUpdateExperiment() { echo "\nTesting experiment update..."; $id = "0"; //echo "\n-----Is string:".gettype ($id); $input = file_get_contents('exp_update.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');...
[ "0.67539436", "0.6726989", "0.6693528", "0.6693528", "0.6681331", "0.6661945", "0.66463745", "0.6578476", "0.6578056", "0.657795", "0.6551882", "0.6551256", "0.6530346", "0.6482285", "0.64588344", "0.6385265", "0.63442075", "0.6335847", "0.6331066", "0.632276", "0.6302533", ...
0.78741
0
Testing the subject listing
Тестирование списка объектов
public function testListSubjects() { echo "\nTesting subject listing..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/subjects"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/subjects"; $response = $this->curl_get($url); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSearchSubject()\n {\n echo \"\\nTesting subject search...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/subjects?search=mouse\";\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context.\"/subjects?search=mouse\";\n ...
[ "0.7150568", "0.6835536", "0.6827731", "0.6740685", "0.6314994", "0.630082", "0.62982154", "0.61793965", "0.6175428", "0.6151272", "0.6118109", "0.6099513", "0.60254", "0.6021194", "0.6016612", "0.59747297", "0.59371346", "0.5911985", "0.59065306", "0.58826673", "0.5865573", ...
0.79010934
0
Testing the subject update.
Тестирование обновления субъекта.
public function testUpdateSubject() { echo "\nTesting subject update..."; $id = "0"; //echo "\n-----Is string:".gettype ($id); $input = file_get_contents('subject_update.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(\\SplSubject $subject) {}", "public function update(SplSubject $subject)\n {\n echo 1;\n }", "public function update(SplSubject $subject)\n {\n echo 2;\n }", "public function update(SplSubject $subject)\n {\n // TODO: Implement update() method.\n ...
[ "0.7487688", "0.7255924", "0.7250931", "0.72051895", "0.70829284", "0.70773464", "0.70773464", "0.70773464", "0.70773464", "0.70759016", "0.70759016", "0.68281275", "0.6787441", "0.67633486", "0.6650405", "0.6597262", "0.6563807", "0.6552678", "0.6539471", "0.6524724", "0.647...
0.78042865
0
Testing the subject deletion. Note that this is logical deletion. The subject will remain in the Elasticsearch
Тестирование удаления субъекта. Обратите внимание, что это логическое удаление. Субъект останется в Elasticsearch
public function testDeleteSubject() { echo "\nTesting subject deletion..."; $id = "0"; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/subjects/".$id; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/subjects/".$id; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDeleteDocument()\n {\n echo \"\\nTesting subject deletion...\";\n $id = \"0\";\n \n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/documents/\".$id;\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/docum...
[ "0.777233", "0.69906515", "0.6699793", "0.6470792", "0.64638245", "0.6381767", "0.6278607", "0.6157048", "0.61286646", "0.6072591", "0.6058868", "0.60418016", "0.6032439", "0.60274434", "0.60081273", "0.60062474", "0.60042393", "0.59941715", "0.5994005", "0.59828883", "0.5974...
0.8416284
0
Testing the document search
Тестирование поиска документов
public function testSearchDocument() { echo "\nTesting document search..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents?search=mouse"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/documents?search=mouse"; $res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInboundDocumentSearch()\n {\n }", "function testFindSearchcontentSco() {\n\t}", "public function testSearch()\n\t{\n\t\t$this->call('GET', '/api/posts/search');\n\t}", "public function search(){}", "public function search();", "public function search();", "function testPartial...
[ "0.7785687", "0.75202906", "0.72430456", "0.6984289", "0.69202304", "0.69202304", "0.6891472", "0.686389", "0.6850928", "0.6846033", "0.68441135", "0.6820873", "0.68099535", "0.6800658", "0.67511064", "0.67509943", "0.67172694", "0.6615381", "0.65921086", "0.6586356", "0.6583...
0.8208773
0
Testing the document update.
Тестирование обновления документа.
public function testUpdateDocument() { echo "\nTesting dcoument update..."; $id = "0"; //echo "\n-----Is string:".gettype ($id); $input = file_get_contents('doc_update.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPutDocument()\n {\n }", "public function test_update_item() {}", "public function test_update_item() {}", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ...
[ "0.7445582", "0.7350307", "0.7350307", "0.7308162", "0.73037523", "0.7143603", "0.710914", "0.7107103", "0.7079882", "0.7067057", "0.70222914", "0.7011263", "0.6999789", "0.6995497", "0.6980029", "0.69385535", "0.6929259", "0.69202584", "0.68766135", "0.68698466", "0.6856206"...
0.8108038
0
Testing the document deletion. Note that this is logical deletion. The document will remain in the Elasticsearch
Тестирование удаления документа. Примечание: это логическое удаление. Документ останется в Elasticsearch
public function testDeleteDocument() { echo "\nTesting subject deletion..."; $id = "0"; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents/".$id; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/documents/".$id; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDelete()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n $db = $this->_setupDb();\n \n $db->create(array('a' => 1), 'mydoc');\n \n // Make sure document exists in DB\n $...
[ "0.7819554", "0.7742444", "0.7180947", "0.7146807", "0.7044822", "0.6999556", "0.6970119", "0.69247323", "0.68608874", "0.6719958", "0.6718927", "0.67063123", "0.6704686", "0.6703076", "0.6648219", "0.6647937", "0.6635172", "0.66290015", "0.6604365", "0.66010773", "0.65809053...
0.8316177
0
Testing the user retreival by ID
Тестирование получения пользователя по ID
public function testGetUsertByID() { echo "\nTesting the user retrieval by ID..."; $response = $this->getUser("44225"); //echo $response; $result = json_decode($response); $user = $result->User; $this->assertTrue((!is_null($user))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testItReturnsAUserByUserId()\n {\n $user1 = factory(User::class)->create([\n \"tenant_id\" => $this->user->tenant->id,\n ]);\n \n $this->actingAs($this->user)\n ->getJson(\"api/v1/users/{$user1->id}\")\n ->assertStatus(200)\n ->assertJson([\n \"id\" => $user1...
[ "0.7597465", "0.74565214", "0.72704464", "0.71516305", "0.7119315", "0.706494", "0.69770855", "0.69286966", "0.6892476", "0.6888279", "0.6878383", "0.6874488", "0.6857269", "0.6808128", "0.6787887", "0.6736203", "0.66571504", "0.65870255", "0.658698", "0.65866864", "0.6580385...
0.80939585
0
Testing the user search
Тестирование поиска пользователя
public function testSearchUser() { echo "\nTesting user search..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/users?search=Vicky"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/users?search=Vicky"; $response = $this->c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchUsers()\n {\n # Set tables to search to a variable.\n $tables = $this->getTables();\n # Set fields to search to a variable.\n $fields = $this->getFields();\n # Set search terms to a variable.\n $search_terms = $this->getSearchTerms();\n # Pe...
[ "0.7333204", "0.71606", "0.7125123", "0.70354354", "0.70354354", "0.7013432", "0.70099324", "0.6999198", "0.69534355", "0.69092953", "0.68699336", "0.6855304", "0.68482375", "0.68351287", "0.683056", "0.6814859", "0.67792314", "0.6772843", "0.6724883", "0.6720761", "0.6674130...
0.7699641
0
/////////End testing ontology expansion/////////////////// ////////Testing the category name sorting////////////////
/////////Конец тестирования расширения онтологии/////////////////// ////////Тестирование сортировки названий категорий////////////////
public function testCategoryNameSorting() { echo "\n testCategoryNameSorting..."; $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context."/category/cell_process/Name/asc/0/10000"; $response = $this->curl_get($url); //echo $response; $result = json_decode($response); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCategoryMap()\n {\n $this->assertEquals(Record::mapCategory('Labor'), 'labor');\n $this->assertEquals(Record::mapCategory('工具器具備品'), 'tools_equipment');\n $this->assertEquals(Record::mapCategory('広告宣伝費'), 'promotion');\n $this->assertEquals(Record::mapCategory('販売...
[ "0.65544987", "0.6477886", "0.6400164", "0.6170126", "0.60505277", "0.6037744", "0.5952182", "0.591921", "0.58667964", "0.58416694", "0.57932484", "0.57478005", "0.5731951", "0.57305545", "0.5715328", "0.5697726", "0.56946456", "0.56941956", "0.56895113", "0.56313586", "0.562...
0.7210004
0