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
Display the page to setup the form for corporations to rent a moon
Показать страницу для настройки формы для корпораций, чтобы арендовать луну
public function DisplayMoonRentalForm() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function StoreMoonRentalForm() {\n\n }", "public function output_setup_form() {\n\t\t$this->output_controls_html( 'get-response' );\n\t}", "private function showForm() {\n // get the current values\n $this->assign('config', $this->config->getAll());\n\n $this->assign('title', 'Co...
[ "0.65334237", "0.6461429", "0.63253176", "0.62743914", "0.6238167", "0.6158064", "0.61225075", "0.6102939", "0.6080886", "0.60426897", "0.6018358", "0.5995999", "0.5969707", "0.5943206", "0.5904526", "0.587891", "0.586752", "0.5855366", "0.5851399", "0.58425766", "0.58373773"...
0.73257875
0
Display current unpaid invoices
Показать текущие непогашенные счета
public function DisplayUnpaidInvoice() { $invoices = Invoice::where([ 'status' => 'Pending', ])->orWhere([ 'status' => 'Late', ])->orWhere([ 'status' => 'Deferred', ])->orderByDesc('invoice_id')->paginate(50); $totalAmount = Invoice::where([ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DisplayPaidInvoices() {\n $invoices = Invoice::where([\n 'status' => 'Paid',\n ])->orWhere([\n 'status' => 'Paid Late',\n ])->paginate(50);\n\n $totalAmount = Invoice::where([\n 'status' => 'Paid',\n ])->orWhere([\n 'sta...
[ "0.7556751", "0.7373887", "0.7167302", "0.6959241", "0.6910225", "0.68972826", "0.68952346", "0.6821466", "0.6788493", "0.67748666", "0.6648796", "0.66004306", "0.65721536", "0.65694255", "0.6560476", "0.6540429", "0.65143424", "0.65052533", "0.64992756", "0.6482277", "0.6482...
0.8228091
0
Display page to modify an unpaid invoice
Страница для изменения непогашенного счета
public function DisplayModifyInvoice() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateInvoicePaymentView() {\n $invPage = $_SESSION['PAYMENT_HISTORY_INV_CONTROLLER'];\n $invPage->doViewReloadTable($_POST['include_acknowledged'] == 'true');\n echo $invPage->toHtml();\n }", "function edit() {\n $this->wireframe->print_button = false;\n \n if($th...
[ "0.7659012", "0.7599809", "0.73839563", "0.7302702", "0.72464526", "0.72464526", "0.72464526", "0.72464526", "0.72464526", "0.72464526", "0.72464526", "0.72464526", "0.72464526", "0.72028744", "0.72028047", "0.70205486", "0.70135283", "0.69914925", "0.6986003", "0.69159865", ...
0.79592735
0
Modify an unpaid invoice
Изменить непогашенный счет
public function ProcessModifyInvoice() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdateInvoice(){\n\t\t$id = Yii::$app->request->post('billing_unit_id');\n\n\t\t// check rate is available or not\n\t\t$taskBilling = $this->find_taskunitbilling($id);\n\t\tif(Yii::$app->request->post('pre_rate')!=Yii::$app->request->post('temp_rate'))\n\t\t\t$taskBilling->temp_rate\t= Yii::$...
[ "0.71217793", "0.7115066", "0.70555437", "0.7028557", "0.68681073", "0.68614846", "0.68413997", "0.68413997", "0.68413997", "0.68413997", "0.68413997", "0.68413997", "0.68413997", "0.68413997", "0.68413997", "0.6763043", "0.66919625", "0.6676497", "0.66220397", "0.66098726", ...
0.83402
0
Display past paid invoices
Показать прошлые оплаченные счета
public function DisplayPaidInvoices() { $invoices = Invoice::where([ 'status' => 'Paid', ])->orWhere([ 'status' => 'Paid Late', ])->paginate(50); $totalAmount = Invoice::where([ 'status' => 'Paid', ])->orWhere([ 'status' => 'Paid L...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DisplayUnpaidInvoice() {\n $invoices = Invoice::where([\n 'status' => 'Pending',\n ])->orWhere([\n 'status' => 'Late',\n ])->orWhere([\n 'status' => 'Deferred',\n ])->orderByDesc('invoice_id')->paginate(50);\n\n $totalAmount = Invo...
[ "0.70053816", "0.6621544", "0.64259905", "0.6311931", "0.6297664", "0.6265679", "0.6258952", "0.6182873", "0.6155269", "0.61374766", "0.6135172", "0.6124584", "0.6110784", "0.60987586", "0.6085663", "0.6083548", "0.6071966", "0.6057238", "0.5960481", "0.5940823", "0.5929419",...
0.7205004
0
Load Theme Fonts Load custom frontend fonts
Загрузить темные шрифты Загрузить пользовательские шрифты фронтенда
public function load_fonts() { // No fonts set? if ( ! isset( $this->fonts['family'] ) || empty( $this->fonts['family'] ) ) { return; } // Construct font: family $query_args = [ 'family' => ( is_array( $this->fonts['family'] ) ) ? join( '|', $this->fonts['family'] ) : $this->fonts['family'] ]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ocean_add_custom_fonts() {\n\treturn array( 'Museo300-Regular', 'Museo500-Regular' ); // You can add more then 1 font to the array!\n}", "function load_fonts() {\n wp_register_style('googleFonts', '//fonts.googleapis.com/css?family=Montserrat:400,700|Source+Sans+Pro:300,600');\n wp...
[ "0.7561353", "0.75147766", "0.7449665", "0.7395542", "0.73341846", "0.7322561", "0.73006195", "0.7276925", "0.7252555", "0.7233848", "0.7226074", "0.71413326", "0.7098369", "0.70828646", "0.7078044", "0.70575625", "0.7035528", "0.7024428", "0.7005172", "0.69985247", "0.699370...
0.76225525
0
Conditional Styles Load conditional styles for old IE support. Deprecated
Условные стили Загрузка условных стилей для поддержки старых версий IE. Устарело
public function conditional_styles() { global $wp_styles; // A bit outdated now... $show_conditional = apply_filters( 'ipress_show_conditional', false ); if ( ! $show_conditional ) { return; } // Load our stylesheet for IE9 wp_enqueue_style( 'ie9', IPRESS_CSS_URL . '/ie9.css', [] ); // Add to g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mtws_conditional_styles() {\n // Stylesheet for IE 8 and below\n $theme = get_theme( get_current_theme() );\n wp_register_style( 'ie-8-and-below-styles', get_bloginfo('stylesheet_directory').'/style-lt-ie-9.css', false, $theme['Version'] );\n $GLOBALS['wp_styles']->add_data( 'ie-8-and-below-styles', ...
[ "0.7641361", "0.6821323", "0.6705193", "0.66055256", "0.64561605", "0.63396966", "0.63396966", "0.62797666", "0.6193536", "0.6153767", "0.6092755", "0.6031304", "0.60066", "0.5976025", "0.5973716", "0.59167224", "0.590544", "0.58629006", "0.58518255", "0.5817571", "0.5799958"...
0.77376133
0
Header & Footer Styles Load inline header css
Стили заголовка и подвала загружаются встроенным стилем CSS заголовка
public function header_styles() { // Use filter to add styles $header_styles = apply_filters( 'ipress_header_styles', get_theme_mod( 'ipress_header_styles', '' ) ); if ( ! $header_styles ) { return; } // Capture output wp_add_inline_style( 'style', $header_styles ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function formatHeader() {\n $this->data['header_attrs'] = implode(\"\\n\", $this->theme->header['attr']);\n $this->data['page_title'] = $this->theme->header['title'];\n $this->data['metas'] = implode(\"\\n\", $this->theme->header['metas']);\n \n $this->data['styles'] = '';\n foreach ($thi...
[ "0.715727", "0.70232856", "0.7003695", "0.6837548", "0.681868", "0.68147826", "0.6814433", "0.6788632", "0.67463684", "0.6684406", "0.66602916", "0.6655393", "0.6637275", "0.6632778", "0.66261506", "0.6571907", "0.65631235", "0.6541223", "0.6527298", "0.65253264", "0.65190196...
0.719721
0
Embed Styles Add styles for embeds
Добавить стили для вложений
public function print_embed_styles() { ?> <style type="text/css"> .wp-embed { padding: 2.618em !important; border: 0 !important; border-radius: 3px !important; font-family: sans-serif !important; -webkit-font-smoothing: antialiased; background-color: #fafafa !important; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function print_embed_styles()\n{\n}", "function h5pmods_alter_styles(&$styles, $libraries, $embed_type) {\n $styles[] = (object) array(\n // Get the path of the current theme's style.css files.\n 'path' => get_stylesheet_directory_uri().'/style.css',\n 'version' => '?ver=1.4.0' // Cache buster\n );\n}...
[ "0.7025898", "0.6985918", "0.6817566", "0.6290171", "0.6132369", "0.61136943", "0.6108169", "0.60487777", "0.6010152", "0.6009869", "0.59530866", "0.59493953", "0.59493953", "0.5928511", "0.5925097", "0.5923154", "0.5911318", "0.58708405", "0.5866978", "0.5852423", "0.5845515...
0.7507787
0
Customizer Styles Load customiser styles
Стили кастомайзера Загрузить стили кастомайзера
public function customizer_styles() { wp_enqueue_style( 'ipress-customize', IPRESS_CSS_URL . '/customizer.css' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function customizer_css() {\n\t\t$css = array();\n\n\t\t$css[] = self::get_customizer_colors_css();\n\t\t$css[] = self::get_variable_logo_width_css();\n\t\t$css[] = self::get_main_title_background_gradient_css();\n\t\t$css[] = self::get_logo_top_margin_css();\n\t\t$css[] = self::get_custom_css();\n\n...
[ "0.75025576", "0.74056953", "0.72463197", "0.7208932", "0.7200197", "0.7190118", "0.71879524", "0.7172483", "0.71504897", "0.71499956", "0.7146198", "0.71426415", "0.7139847", "0.71070874", "0.70772266", "0.7064295", "0.7035737", "0.70185626", "0.70154995", "0.7015335", "0.69...
0.75161856
0
Login Page Scripts Load login styles
Сценарии страницы входа Загрузка стилей входа
public function load_login_styles() { // Initial validation if ( empty( $this->login ) ) { return; } // Register & enqueue admin styles foreach ( $this->login as $k=>$v ) { // Register and enqueue style wp_register_style( $k, $v[0], $v[1], $v[2] ); wp_enqueue_style( $k ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function loginStyles()\n {\n ?>\n <style type=\"text/css\">\n body {\n position: relative;\n background-color: #fff;\n background-position: bottom center;\n background-repeat: no-repeat;\n...
[ "0.7496417", "0.7436657", "0.74102485", "0.73516816", "0.72434175", "0.7166703", "0.7162526", "0.71553564", "0.71042305", "0.70974004", "0.7079359", "0.705073", "0.69701695", "0.6941404", "0.69369745", "0.69124913", "0.69124913", "0.68846506", "0.68721074", "0.68259734", "0.6...
0.7571794
0
Returns table schema for current model class or false if it is not an active record
Возвращает схему таблицы для текущего класса модели или false, если это не активная запись
public function getTableSchema() { /* @var $class ActiveRecord */ $class = $this->getFullModelClass(); if (is_subclass_of($class, 'yii\db\ActiveRecord')) { return $class::getTableSchema(); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTableSchema()\n {\n /* @var $class ActiveRecord */\n $class = $this->modelClass;\n if (is_subclass_of($class, 'yii\\db\\ActiveRecord')) {\n return $class::getTableSchema();\n } else {\n return false;\n }\n }", "public function Dete...
[ "0.87572694", "0.70506734", "0.688298", "0.68822575", "0.66378194", "0.6624658", "0.6545495", "0.6484149", "0.6484149", "0.6484149", "0.6484149", "0.6484149", "0.6484149", "0.6428236", "0.6405465", "0.637087", "0.63158065", "0.629122", "0.62250227", "0.62125975", "0.6206967",...
0.87796754
0
Returns true, if the property is a color property
Возвращает true, если свойство является свойством цвета
public function isColorProperty($column) { if (stripos($column->name, self::COLOR_TYPE_KEY) !== false && $column->phpType === 'string') { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasColor(){\n return $this->_has(1);\n }", "public function isColor(){\n\t\treturn false;\n\t}", "public function hasColors(){\n return $this->_has(1);\n }", "public function isTrueColor(): bool;", "public function hasColour(): bool;", "public function isColorAttribute(str...
[ "0.75354105", "0.7204722", "0.7050639", "0.7023965", "0.69211334", "0.6886108", "0.67669976", "0.66075563", "0.65915525", "0.65668476", "0.6534263", "0.64570916", "0.6340021", "0.6279277", "0.62424093", "0.62424093", "0.6177902", "0.6155096", "0.6154091", "0.6080003", "0.6021...
0.76230425
0
Generates a class name for Search
Генерирует имя класса для поиска
protected function generateSearchClassName($modelClassName) { if ($this->searchModelClass) { return $this->searchModelClass; } return $modelClassName . 'Search'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getSearchClass()\n {\n return 'tx_rnbase_util_SearchGeneric';\n }", "protected function getClassName(): string\n {\n return $this->className = studly_case($this->getNameInput()).'VoyagerPermissionSeeder';\n }", "private function _buildClassName()\n {\n ret...
[ "0.7608836", "0.6808627", "0.66881585", "0.66437155", "0.66364366", "0.6599223", "0.6599223", "0.6599223", "0.65920585", "0.6483063", "0.6483063", "0.6483063", "0.6483063", "0.6483063", "0.6483063", "0.6483063", "0.6483063", "0.645249", "0.64468807", "0.64468807", "0.64468807...
0.70054716
1
Check whether current wishlist can be deleted
Проверьте, можно ли удалить текущий список желаний
protected function isWishlistDeleteable() { return !$this->_wishlistHelper->isWishlistDefault($this->getWishlistInstance()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canDelete() {\n return TRUE;\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Pronko_TaskManagement::TaskManagement_delete');\n }", "public function canBeDeletedSafely(){\n return $this->getAmountOfRegisteredEtudiants() <= 0; // Infer...
[ "0.6829378", "0.68127996", "0.6801671", "0.67885077", "0.6752038", "0.67312366", "0.6714511", "0.66901064", "0.668947", "0.66816384", "0.6542992", "0.65271866", "0.6523392", "0.64904386", "0.64723444", "0.644189", "0.64409536", "0.6416226", "0.64018905", "0.6351379", "0.63481...
0.7469085
0
Build wishlist deletion url
Создать URL для удаления списка желаний
public function getDeleteUrl() { return $this->getUrl('wishlist/index/deletewishlist', ['wishlist_id' => '%item%']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_delete_url() {\n\t\t\treturn apply_filters( 'yith_wcwl_wishlist_delete_url', wp_nonce_url( add_query_arg( 'wishlist_id', $this->get_id(), YITH_WCWL()->get_wishlist_url( 'manage' ) ), 'yith_wcwl_delete_action', 'yith_wcwl_delete' ) );\n\t\t}", "protected function _getDeleteUrl()\n {\n ...
[ "0.80982053", "0.6882934", "0.6711184", "0.6607553", "0.6600476", "0.6587678", "0.65675735", "0.65519243", "0.64475644", "0.64213455", "0.640834", "0.6390777", "0.6384934", "0.63618076", "0.6309713", "0.62805355", "0.62041855", "0.6156199", "0.6154265", "0.61534864", "0.61297...
0.8024892
1
Retrieve url to redirect customer to after wishlist is deleted
Получить URL для перенаправления клиента после удаления списка желаний
public function getRedirectUrl() { return $this->getUrl('wishlist/index/index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_delete_url() {\n\t\t\treturn apply_filters( 'yith_wcwl_wishlist_delete_url', wp_nonce_url( add_query_arg( 'wishlist_id', $this->get_id(), YITH_WCWL()->get_wishlist_url( 'manage' ) ), 'yith_wcwl_delete_action', 'yith_wcwl_delete' ) );\n\t\t}", "public function getDeleteUrl()\n {\n re...
[ "0.7404205", "0.72108537", "0.695901", "0.6522591", "0.6481424", "0.64631915", "0.64393353", "0.6422792", "0.6405285", "0.6403184", "0.63890177", "0.63415396", "0.6325963", "0.6321725", "0.6316604", "0.6297771", "0.62942374", "0.6293143", "0.6275411", "0.6274917", "0.6238178"...
0.72616357
1
Returns this handler cron hook identifier. The handler cron hook identifier is the one that the handler will use to schedule a single cron event when the `dispatch` method is called and the environment does not support async processing.
Возвращает идентификатор этого обработчика cron-запуска. Идентификатор обработчика cron-запуска — это тот, который будет использоваться обработчиком для запуска одного cron-события при вызове метода `dispatch`, если среда не поддерживает асинхронную обработку.
public function get_healthcheck_cron_hook_id() { return $this->healthcheck_cron_hook_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCronHookName() {\n\t\t\treturn $this->cronHook;\n\t\t}", "public function getHandle()\n {\n return 'commerceRuleId' . $this->id;\n }", "public function getWorkflowIdentifier()\n\t{\n\t\treturn md5(get_class($this->post).'-'.$this->post->getId());\n\t}", "public function getRun...
[ "0.6761538", "0.58537734", "0.5681431", "0.55750084", "0.55742", "0.5540626", "0.55219024", "0.5389237", "0.5315437", "0.53023607", "0.52793473", "0.5272751", "0.52647424", "0.5236071", "0.5235591", "0.52243316", "0.5209035", "0.5208697", "0.5201293", "0.5197462", "0.518152",...
0.7661445
0
/ zcCommunityPage() Determines what to display the user on the community page Builds $context['zc']['blogs'] or $context['zc']['list_of_articles'] arrays for use in the template NOTES: $context['zc']['blogs'] is used to display a list of blogs $context['zc']['list_of_articles'] is used to display a list of articles REQ...
/ zcCommunityPage() Определяет, что отображать пользователю на странице сообщества Создает массивы $context['zc']['blogs'] или $context['zc']['list_of_articles'] для использования в шаблоне ПРИМЕЧАНИЯ: $context['zc']['blogs'] используется для отображения списка блогов $context['zc']['list_of_articles'] используется для...
function zcCommunityPage() { global $context, $txt, $scripturl, $zcFunc, $zc; zcLoadTemplate('Community'); $context['page_title'] = $context['zc']['site_name'] . ' - ' . $txt['b213']; $context['zc']['viewing_community_page'] = true; $context['zc']['main_blocks'] = array(); $context['zc']['visible_blogs'] = z...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function community(){\n $this->user_logged_in = (bool)$this->ion_auth->logged_in();\n $data[\"user_logged_in\"] = $this->user_logged_in;\n\n // If not logged in user --> he has no community\n // Redirect to login\n if (!$this->user_logged_in){\n $_SESSION['redir...
[ "0.58216614", "0.5737903", "0.57334787", "0.5677201", "0.56550044", "0.5645294", "0.54237974", "0.5355724", "0.5293665", "0.5290456", "0.5271241", "0.525179", "0.52333885", "0.5225492", "0.5213126", "0.52095014", "0.5209312", "0.5206641", "0.5195211", "0.5194965", "0.51868826...
0.78045154
0
Loads Lightbox options page
Загрузка страницы настроек Lightbox
public function load_page() { if ( isset( $_GET['page'] ) && $_GET['page'] == 'Options_video_gallery_lightbox_styles' ) { if ( isset( $_GET['task'] ) ) { if ( $_GET['task'] == 'save' ) { do_action( 'origincode_gallery_video_save_lightbox_options' ); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function page_init() {\n\t\t$opt = 'simplelightbox-options';\n\t\t$sec = 'simplelightbox-section';\n\t\t$fields = array(\n\t\t\t'ar_sl_sourceAttr' => array(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => __('Source Attribute', 'simplelightbox'),\n\t\t\t\t'desc' => __('the attribute used for large images',...
[ "0.7213879", "0.7171159", "0.7109095", "0.69686794", "0.6802471", "0.6725257", "0.66445607", "0.646198", "0.6448263", "0.6426964", "0.6257078", "0.6224814", "0.6222957", "0.61810213", "0.61225724", "0.61149865", "0.60852283", "0.60400915", "0.6028058", "0.6023467", "0.6008583...
0.76303947
0
Shows Lightbox options page
Показывает страницу параметров Lightbox
public function show_page() { require( ORIGINCODE_GALLERY_VIDEO_TEMPLATES_PATH.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'lightbox-settings-page.php' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_options_page() {\n\n\t\tinclude_once 'partials/rt-slideshow-admin-display.php';\n\n\t}", "function lkShowOptionsPage() {\r\n\r\n if ($this->tc == false) {\r\n $this->tc = new lkProductsList();\r\n }\r\n\r\n\r\n if (isset($_GET['action']) && $_GET['action'] ...
[ "0.7555869", "0.71814865", "0.69664377", "0.6874824", "0.6784651", "0.67255056", "0.67117673", "0.6667121", "0.66540617", "0.6614061", "0.6606699", "0.6579525", "0.65685284", "0.65685284", "0.6567844", "0.6563722", "0.6505118", "0.6497865", "0.6483964", "0.6469936", "0.644878...
0.7429682
1
Get the structure serialized for file storage.
Получите структуру, сериализованную для хранения в файле.
public function getSerializedStructure(): string { return serialize([ 'data' => $this->data, 'metadata' => $this->metadata ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function serialize() {\n\t\treturn array(\n\t\t\t'id' => $this->id,\n\t\t\t'filename' => $this->filename,\n\t\t\t'size' => $this->size,\n\t\t\t'encryption' => $this->encryption,\n\t\t\t'checksum' => $this->checksum,\n\t\t\t'mktime' => $this->mktime,\n\t\t\t'mdtime' => $this->mdtime,\n\t\t\t'public' => $this...
[ "0.7093736", "0.6750851", "0.667511", "0.6606759", "0.6594573", "0.65303016", "0.64322424", "0.6391012", "0.6312734", "0.6301079", "0.6301079", "0.62076783", "0.62076783", "0.61822534", "0.61822534", "0.61822534", "0.61822534", "0.61822534", "0.61822534", "0.6181475", "0.6181...
0.7346518
0
Read in chat permission fields, from the complex posted data.
Чтение полей разрешений на чат из сложных постов данных.
function read_in_chat_perm_fields() { $allow2=''; $_x=post_param('allow_list_0',''); $x=$GLOBALS['FORUM_DRIVER']->get_member_from_username($_x); if (!is_null($x)) $allow2.=strval($x); foreach ($_POST as $key=>$_x) { if (substr($key,0,strlen('allow_list'))!='allow_list') continue; if ($key=='allow_list_0') con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_chatroom_fields($is_made_by_me=false,$room_name='',$welcome='',$username='',$allow2='',$allow2_groups='',$disallow2='',$disallow2_groups='')\n{\n\trequire_code('form_templates');\n\n\t$fields=new ocp_tempcode();\n\n\t$fields->attach(form_input_line(do_lang_tempcode('ROOM_NAME'),do_lang_tempcode('DESCR...
[ "0.61711496", "0.61037517", "0.5988315", "0.5922799", "0.5689734", "0.56424206", "0.5490593", "0.54828596", "0.54617417", "0.5427417", "0.53859997", "0.53472656", "0.5279251", "0.5248823", "0.52463156", "0.5232702", "0.5231112", "0.5218013", "0.52089924", "0.51933193", "0.514...
0.7336754
0
Ban a member from a chatroom.
Запретить участнику чат-комнаты.
function chatroom_ban_to($member_id,$id) { log_it('CHAT_BAN',strval($id),$GLOBALS['FORUM_DRIVER']->get_username($member_id)); $disallow_list=$GLOBALS['SITE_DB']->query_value('chat_rooms','disallow_list',array('id'=>$id)); if ($disallow_list=='') $disallow_list=strval($member_id); else $disallow_list.=','.strval($me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chatroom_unban_to($member_id,$id)\n{\n\tlog_it('CHAT_UNBAN',strval($id),$GLOBALS['FORUM_DRIVER']->get_username($member_id));\n\n\t$disallow_list=$GLOBALS['SITE_DB']->query_value('chat_rooms','disallow_list',array('id'=>$id));\n\t$_disallow_list=explode(',',$disallow_list);\n\t$_disallow_list2=array();\n\t...
[ "0.71183157", "0.6733407", "0.6555794", "0.65281016", "0.62500626", "0.6239634", "0.6203422", "0.60828906", "0.60668594", "0.59507465", "0.5933534", "0.59319055", "0.58908397", "0.5863662", "0.5860118", "0.58576995", "0.58039784", "0.57796764", "0.5776451", "0.5769467", "0.57...
0.770525
0
Unban a member from a chatroom.
Выдать разрешение на вход участнику чата.
function chatroom_unban_to($member_id,$id) { log_it('CHAT_UNBAN',strval($id),$GLOBALS['FORUM_DRIVER']->get_username($member_id)); $disallow_list=$GLOBALS['SITE_DB']->query_value('chat_rooms','disallow_list',array('id'=>$id)); $_disallow_list=explode(',',$disallow_list); $_disallow_list2=array(); $username=$GLOBAL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unban();", "public function unfriend(User $friend);", "public function unbanChatMember(array $content)\n {\n return $this->endpoint('unbanChatMember', $content);\n }", "public function unbanChatMember ( ChatMemberSelector $chatMemberSelector )\n {\n $chatMemberSelector-...
[ "0.6853055", "0.68324554", "0.6452953", "0.6444843", "0.6349323", "0.62712723", "0.6239784", "0.6229564", "0.6132523", "0.6105118", "0.60120434", "0.59006864", "0.5879605", "0.5857178", "0.58025455", "0.5802178", "0.5769826", "0.57280844", "0.5720668", "0.57010627", "0.569621...
0.71751124
0
/ End Method createDetail / Method Name: del_record Developer: Shine Dezign Created Date: 20210809 (yyyymmdd) Purpose: To delete any user by id Params: [id]
/ Конец метода createDetail / Название метода: del_record Разработчик: Shine Dezign Дата создания: 20210809 (yyyymmdd) Цель: Удаление любого пользователя по идентификатору Параметры: [id]
public function del_record($id){ try { User::where('id',$id)->update(['is_deleted' => 1]); return redirect()->back()->with('status', 'success')->with('message', 'User details '.Config::get('constants.SUCCESS.DELETE_DONE')); } catch(Exception $ex) { return redirect()->ba...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user_delete() {\n if (! $this->get(\"id\")) {\n $this->response(array(\"status\" => \"ERROR\"), 404);\n } else {\n $this->Patient_model->remove($this->get('id'));\n \n $message = array('id' => $this->get('id'), \"status\" => \"SUCCESS\");\n ...
[ "0.780153", "0.76452833", "0.76003957", "0.75717837", "0.7562909", "0.75335026", "0.75131816", "0.7506866", "0.74722254", "0.74675274", "0.7455564", "0.7421343", "0.74116254", "0.7405038", "0.7398778", "0.7384637", "0.7379316", "0.7351422", "0.7350922", "0.73409724", "0.73318...
0.7669728
1
/ End Method del_record / Method Name: del_restore Developer: Shine Dezign Created Date: 20210819 (yyyymmdd) Purpose: To restore deleted user by id Params: [id]
/ Конец метода del_record / Название метода: del_restore Разработчик: Shine Dezign Дата создания: 20210819 (yyyymmdd) Цель: Восстановление удаленного пользователя по идентификатору Параметры: [id]
public function del_restore($id){ try { User::where('id',$id)->update(['is_deleted' => 0]); return redirect()->back()->with('status', 'success')->with('message', 'User details '.Config::get('constants.SUCCESS.RESTORE_DONE')); } catch(Exception $ex) { return redirect()->b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function recordDeleteRecycle($id) {\n\t\t$this->dao->delete()->from(TABLE_KEVIN_USER_RECORD)->where('id')->eq($id)->exec();\n\t}", "public function del_record($id){\n try { \n User::where('id',$id)->update(['is_deleted' => 1]);\n \treturn redirect()->back()->with('status', 'succes...
[ "0.71034765", "0.69950074", "0.693323", "0.6845554", "0.67307425", "0.66806793", "0.6672676", "0.6623139", "0.661922", "0.65722156", "0.65551054", "0.65131813", "0.65043545", "0.6479668", "0.64702255", "0.6430178", "0.6388715", "0.63835925", "0.6373102", "0.6331823", "0.63293...
0.7955089
0
check capacity of items bookshelf can hold for each item
проверить вместимость предметов, которые полка может удержать, для каждого предмета
public function isCapacityMaxedOut(): bool { try { $bookshelf = json_decode(file_get_contents("./bookshelf.json")); return (int) $bookshelf[3]->capacity >= $this->maximumCapacity ? true: false; } catch (\Exception $exception) { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasCapacity()\n {\n return $this->users()->count() < $this->slots;\n }", "public function has_free_item()\n {\n }", "public function remainingCapacity();", "private static function checkAvailablePrizeItems(): bool\n {\n return (bool)Prize::findOne(['status...
[ "0.69269687", "0.63709337", "0.63503313", "0.6311413", "0.6246577", "0.62276614", "0.62239164", "0.61428106", "0.6072143", "0.60595655", "0.59999377", "0.59618294", "0.59387934", "0.5900007", "0.58792096", "0.5877576", "0.5844202", "0.5815344", "0.58049476", "0.57860667", "0....
0.70013064
0
Get a list of Heroes, using RESTful GET collection
Получить список Героев, используя RESTful GET коллекции
public function index() { /* * Retrieve all heroes using pagination */ return Hero::paginate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Heroes $heroes)\n {\n //\n }", "public function index()\n {\n $super_heroe = SuperHeroe::select('super_heroes.id','super_heroes.name','super_heroes.house','actors.image as actor_img','super_heroes.actor_id','super_heroes.image')\n ->join('actors','actors.id','='...
[ "0.67079264", "0.6562769", "0.6403606", "0.6281144", "0.62760335", "0.62598383", "0.62565994", "0.6185832", "0.61689043", "0.615814", "0.6151369", "0.6149374", "0.61331254", "0.6122024", "0.6111047", "0.6101373", "0.6092986", "0.60895115", "0.6081585", "0.6071673", "0.6021504...
0.7178411
0
Sets the nextInSeriesTaskId property value. The taskId of the next task in this series. This value is assigned at the time the next task in the series is created, and is null prior to that time.
Устанавливает значение свойства nextInSeriesTaskId. Идентификатор задачи следующей задачи в этой серии. Это значение назначается в момент создания следующей задачи в серии, и до этого времени оно равно null.
public function setNextInSeriesTaskId(?string $value): void { $this->getBackingStore()->set('nextInSeriesTaskId', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPreviousInSeriesTaskId(?string $value): void {\n $this->getBackingStore()->set('previousInSeriesTaskId', $value);\n }", "public function setTaskId(string $taskId)\n {\n $this->taskId = $taskId;\n }", "public function next($taskId)\n\t{\n\t\tif (!is_int($taskId)) {\n\t\...
[ "0.6179336", "0.6073249", "0.58215773", "0.57661515", "0.55636686", "0.5299079", "0.52024937", "0.5032321", "0.5032321", "0.49738994", "0.49468482", "0.48457965", "0.47669512", "0.47555065", "0.47513378", "0.47313616", "0.47060794", "0.46978912", "0.4693585", "0.46722698", "0...
0.7334335
0
Sets the previousInSeriesTaskId property value. The taskId of the previous task in this series. null for the first task in a series since it has no predecessor. All subsequent tasks in the series have a value that corresponds to their predecessors.
Устанавливает значение свойства previousInSeriesTaskId. taskId предыдущей задачи в этой серии. null для первой задачи в серии, так как у неё нет предшественника. Все последующие задачи в серии имеют значение, соответствующее их предшественникам.
public function setPreviousInSeriesTaskId(?string $value): void { $this->getBackingStore()->set('previousInSeriesTaskId', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPreviousInSeriesTaskId(): ?string {\n $val = $this->getBackingStore()->get('previousInSeriesTaskId');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'previousInSe...
[ "0.58767015", "0.5817419", "0.57363045", "0.5293763", "0.51486707", "0.5022075", "0.49945208", "0.494423", "0.494423", "0.49346432", "0.49325186", "0.4882202", "0.4872908", "0.4849447", "0.47126997", "0.46747538", "0.4671715", "0.46690297", "0.46614975", "0.46539366", "0.4556...
0.7136917
0
Sets the recurrenceStartDateTime property value. The date and time when this recurrence series begin. For the first task in a series (occurrenceId = 1) this value is copied from schedule.patternStartDateTime. For subsequent tasks in the series (occurrenceId >= 2) this value is copied from the previous task and never ch...
Устанавливает значение свойства recurrenceStartDateTime. Дата и время, когда начинается эта серия повторений. Для первой задачи в серии (occurrenceId = 1) это значение копируется из schedule.patternStartDateTime. Для последующих задач в серии (occurrenceId >= 2) это значение копируется из предыдущей задачи и не изменяе...
public function setRecurrenceStartDateTime(?DateTime $value): void { $this->getBackingStore()->set('recurrenceStartDateTime', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setStartDateTime($val)\n {\n $this->_propDict[\"startDateTime\"] = $val;\n return $this;\n }", "Public Function setStart(DateTime $start) { $this->start = $start; }", "public function setStartDateTime($startDateTime)\n {\n $this->startDateTime = $startDateTime;\n ...
[ "0.67210424", "0.6354413", "0.63387185", "0.6311785", "0.62130886", "0.6210877", "0.61986315", "0.61984724", "0.61984724", "0.61984724", "0.6126976", "0.6062895", "0.6059835", "0.60204726", "0.59499234", "0.5932369", "0.59186125", "0.5900405", "0.58867294", "0.58524317", "0.5...
0.77290606
0
Sets the schedule property value. The schedule for recurrence. Clients define and edit recurrence by specifying the schedule. If nextInSeriesTaskId isn't assigned, clients may terminate the series by assigning null to this property.
Устанавливает значение свойства schedule. Расписание для повторения. Клиенты определяют и редактируют повторение, указывая расписание. Если nextInSeriesTaskId не задан, клиенты могут завершить серию, присвоив этому свойству значение null.
public function setSchedule(?PlannerRecurrenceSchedule $value): void { $this->getBackingStore()->set('schedule', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSchedule($val)\n {\n $this->_propDict[\"schedule\"] = $val;\n return $this;\n }", "public function setTargetSchedule($val)\n {\n $this->_propDict[\"targetSchedule\"] = $val;\n return $this;\n }", "public function setSchedule($schedule = null)\n {\n ...
[ "0.7158144", "0.65735465", "0.6495757", "0.6314379", "0.6292461", "0.6243109", "0.61983395", "0.61914086", "0.6082578", "0.600464", "0.5962252", "0.5922304", "0.5922304", "0.5922304", "0.5922304", "0.5903946", "0.5903946", "0.5903946", "0.5898981", "0.58983415", "0.5891726", ...
0.7398589
0
Initializes the plugin by instantiating an instance of the CFCustomPagesTaxonomies class (if one does not exist yet)
Инициализирует плагин, создавая экземпляр класса CFCustomPagesTaxonomies (если он еще не существует)
function cfcpt_init() { global $cfcpt; if (!is_object($cfcpt)) { // does not currently exist, so create it $cfcpt = new CFCustomPagesTaxonomies(); } // if return $cfcpt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function initialize() {\n\t\tself::register_taxonomies();\n\t}", "function CFCustomPagesTaxonomies() {\n\t\t$this->config = apply_filters('cf_add_taxonomy_form', array());\n\t\tif (count($this->config) > 0) {\n\t\t\t$this->create_taxonomies();\n\t\t}\n\t\telse {\n\t\t\terror_log('[CFCPT] Configura...
[ "0.7841547", "0.77964324", "0.72891164", "0.6984974", "0.6917341", "0.6881913", "0.6750701", "0.67105126", "0.6706172", "0.66168785", "0.6614298", "0.6581556", "0.65809673", "0.65708387", "0.6570726", "0.6570726", "0.6564377", "0.6557504", "0.65541655", "0.65443957", "0.65423...
0.7800818
1
Constructor for the CFCustomPagesTaxonomies class.
Конструктор класса CFCustomPagesTaxonomies.
function CFCustomPagesTaxonomies() { $this->config = apply_filters('cf_add_taxonomy_form', array()); if (count($this->config) > 0) { $this->create_taxonomies(); } else { error_log('[CFCPT] Configuration array missing!'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Ps_Custom_Taxonomy( ){\r\n\t\t$this->__construct( );\r\n\t}", "public static function initialize() {\n\t\tself::register_taxonomies();\n\t}", "function taxonomies_for_pages() {\n register_taxonomy_for_object_type( 'post_tag', 'page' );\n register_taxonomy_for_object_type( 'category', 'page' ...
[ "0.7882889", "0.69310784", "0.6863139", "0.6826041", "0.6773372", "0.67012244", "0.6688348", "0.6641653", "0.6638703", "0.66322523", "0.6614956", "0.66104734", "0.6600415", "0.6600415", "0.6587347", "0.6586909", "0.658147", "0.658147", "0.658147", "0.658147", "0.6574198", "...
0.7563326
1
loops through all taxonomies defined in $this>config, checks if the tax exists, creating one if needed
проходит по всем таксономиям, определенным в $this>config, проверяет, существует ли таксономия, и создает ее при необходимости
function create_taxonomies() { foreach ($this->config as $tax => $tax_info) { if (!is_taxonomy($tax_info['tax_name'])) { register_taxonomy($tax_info['tax_name'], $tax_info['tax_scope'], array('hierarchical'=>FALSE, 'label'=>$tax_info['tax_label'], 'query_var'=>$tax_info['tax_name'], 'rewrite'=>$tax_info['tax_r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_existing_tax() {\n\t\tif(is_array($this->post_type)) {\n\t\t\tforeach($this->post_type as $pt) {\n\t\t\t\tregister_taxonomy_for_object_type($this->tax_name, $pt);\n\t\t\t}\n\t\t} else {\n\t\t\tregister_taxonomy_for_object_type($this->tax_name, $this->post_type);\n\t\t}\n\t}", "function _...
[ "0.7577289", "0.72508675", "0.687925", "0.6809723", "0.6793803", "0.67743164", "0.674291", "0.6726958", "0.6726958", "0.67131", "0.66731745", "0.6652749", "0.6619094", "0.6607936", "0.658181", "0.6571685", "0.6538316", "0.65322554", "0.65230536", "0.6499563", "0.6492033", "...
0.75747573
1
calls add_meta_box for each nonhierarchical page taxonomy
вызывает add_meta_box для каждой неиерархической таксономии страниц
function register_tax_metaboxes() { foreach ( get_object_taxonomies('page') as $tax_name ) { if ( !is_taxonomy_hierarchical($tax_name) ) { $taxonomy = get_taxonomy($tax_name); $label = isset($taxonomy->label) ? esc_attr($taxonomy->label) : $tax_name; add_meta_box('tagsdiv-' . $tax_name, $label,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_nav_menu_taxonomy_meta_boxes()\n{\n}", "function WPseo_Metabox() {\n // get core post types\n $core_args = array(\n 'public' => true,\n '_builtin' => true\n );\n $core_pt = get_post_types( $core_args );\n // get custom post types\n $custom_args = array(\n ...
[ "0.78503114", "0.7414746", "0.71890473", "0.7174751", "0.71731555", "0.71526104", "0.71412516", "0.713951", "0.7099826", "0.7085377", "0.70688623", "0.70663637", "0.70308536", "0.7026261", "0.7003964", "0.70039463", "0.69937193", "0.69918007", "0.6991289", "0.698974", "0.6970...
0.8218017
0
Creates a tag style meta box for the taxonomy
Создает метабокс стиля тега для таксономии
function tag_style_tax_box($tax_name, $taxonomy, $helps, $post, $box) { ?> <div class="tagsdiv" id="<?php echo $tax_name; ?>"> <div class="jaxtag"> <div class="nojs-tags hide-if-js"> <p><?php _e('Add or remove tags'); ?></p> <textarea name="<?php echo "tax_input[$tax_name]"; ?>" class="the-tags" id="tax...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_tax_metabox($post, $box) {\n\t\t\t$tax_name = esc_attr(substr($box['id'], 8));\n\t\t\t$taxonomy = get_taxonomy($tax_name);\n\t\t\t$helps = isset($taxonomy->helps) ? esc_attr($taxonomy->helps) : __('Separate tags with commas.');\n\t\t\tswitch ($this->config[$tax_name]['tax_style']) {\n\t\t\t\tdefaul...
[ "0.75263166", "0.7229032", "0.7039867", "0.6989523", "0.68369377", "0.67548513", "0.67539334", "0.6734565", "0.66946834", "0.6692891", "0.66919017", "0.6625496", "0.66211337", "0.6606805", "0.6588045", "0.65013856", "0.64953077", "0.6482984", "0.6472878", "0.64727217", "0.646...
0.7414302
1
Checks if the taxonomy exists. If not, it register's it.
Проверяет, существует ли таксономия. Если нет, регистрирует её.
function _tax_exists() { if (!is_taxonomy($this->tax_name)) { register_taxonomy($this->tax_name, array('post','page'), array('hierarchical'=>FALSE, 'label'=> $this->tax_name, 'query_var'=>TRUE, 'rewrite'=>TRUE)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registerTaxonomy()\n {\n if (!taxonomy_exists($this->name)) {\n // create options for the Taxonomy\n $options = $this->createOptions();\n // register the Taxonomy with WordPress\n register_taxonomy($this->name, null, $options);\n }\n }...
[ "0.76585954", "0.7655769", "0.75070196", "0.7147549", "0.70352644", "0.69150853", "0.68758035", "0.68433195", "0.6765254", "0.67474407", "0.6676548", "0.66610676", "0.6633954", "0.6631387", "0.65722656", "0.65376484", "0.646251", "0.6460316", "0.6371699", "0.6326204", "0.6304...
0.8339157
0
associates terms stored inf post meta with the posts in the post_queue and the tax name. If the term does not exist yet, it creates it.
связывает термины, хранящиеся в post meta, с постами в post_queue и именем таксономии. Если термин еще не существует, он его создает.
function assign_terms_to_posts($remove_meta = FALSE) { foreach ($this->post_queue as $post => $details) { $term_slug = strtolower(str_ireplace(' ', '-', $details->meta_value)); if (!is_term($details->meta_value, $this->tax_name)) { wp_insert_term($details->meta_value, $this->tax_name, array('slug'=>$term_sl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AssignTerm($p,$term,$taxonamyTerm)\n{\n $property_city = term_exists($term, $taxonamyTerm );\n\t$property_city_term_id=0;\n if( $property_city !== 0 && $property_city !== null ) {\n // Term exists, get the term id\n $property_city_term_id = $property_city;\n } else {\n // Cre...
[ "0.6645276", "0.6461721", "0.6237182", "0.6060276", "0.60427815", "0.5936201", "0.590243", "0.5813926", "0.57816803", "0.57496953", "0.5733814", "0.5730606", "0.5718276", "0.5703092", "0.5694306", "0.56899655", "0.56696993", "0.56675714", "0.5630149", "0.5620826", "0.5616958"...
0.7133995
0
Delete Roles for an user
Удаление ролей для пользователя
public function deleteRoles() { $roles = $this->listRoles(); foreach ($roles as $role) { $this->retract($role); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function userRoleDelete() {\n\t\t$oRole = new APP_Model_User_Role();\n\t\t$oUser = new APP_Model_User();\n\t\t$iRoleID = $this->get('delete');\n\t\tif(count( ($oUser->getList('role_id = ' . $oUser->quote($iRoleID))) ) > 0) {\n\t\t\t$this->setFlashMessage('Unable to delete this role is already in use....
[ "0.8208475", "0.7385755", "0.73451936", "0.7228235", "0.7206144", "0.7198468", "0.7155698", "0.7155698", "0.7155698", "0.7150127", "0.71264935", "0.71028715", "0.70745707", "0.7032142", "0.70117944", "0.6971377", "0.6963831", "0.6920596", "0.6918104", "0.6917452", "0.69127864...
0.78755504
1
Is the file binary? From
Является ли файл бинарным? От
public function isBinary($file) { if (file_exists($file)) { if (!is_file($file)) return 0; $fh = fopen($file, "r"); $blk = fread($fh, 512); fclose($fh); clearstatcache(); return ( 0 or substr_count($blk, "^ -~", "^\r\...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isFile();", "public function isFile();", "public function is_file(): bool\n {\n if (isset($this->path)) {\n $this->contents = $this->silencer->call('is_file', $this->path) ?? $this->path;\n }\n\n return (bool) $this->contents;\n }", "public function isFil...
[ "0.7102363", "0.7102363", "0.7067652", "0.7010715", "0.69284886", "0.68982905", "0.68982905", "0.6880424", "0.6878635", "0.68222445", "0.6748974", "0.6738927", "0.67361957", "0.6735131", "0.67066973", "0.6657041", "0.66542584", "0.66419846", "0.66194236", "0.659732", "0.65941...
0.7411365
0
Verify that each asset in the DB references a file that exists. We should run this before verifying files because we want to ensure that md5 signatures are correct.
Проверьте, чтобы каждый актив в базе данных ссылался на существующий файл. Мы должны запускать это перед проверкой файлов, поскольку хотим убедиться, что контрольные суммы md5 корректны.
public function verifyDB(){ $errors = array(); $Assets = $this->xpdo->getIterator('Asset'); foreach ($Assets as $A) { // Missing File if (!file_exists($A->get('path'))) { $errors[] = array( 'status' => 'error', 'code...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verifyFiles() {\n // Check main lib\n $path = $this->xpdo->getOption('assets_path') . $this->xpdo->getOption('assman.library_path').$stub;\n if (!file_exists($path)) {\n $this->xpdo->log(\\modX::LOG_LEVEL_ERROR,'Asset does not exist: '.$path,'',__CLASS__.'::'.__FUNCT...
[ "0.7253049", "0.66521484", "0.63795936", "0.62598026", "0.6136257", "0.6027413", "0.6017304", "0.5923674", "0.5882994", "0.5842533", "0.5837079", "0.58281547", "0.5806569", "0.5804705", "0.57978827", "0.57877433", "0.5781178", "0.57184845", "0.5703326", "0.56950855", "0.56509...
0.74497956
0
Gets the default tax type for the given store.
Получает тип налога по умолчанию для заданного магазина.
public function getDefaultTaxType(StoreInterface $store);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTaxBasedOn($store = null)\n {\n return $this->scopeConfig->getValue(\n Config::CONFIG_XML_PATH_BASED_ON,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $store\n );\n }", "public function getDefaultCustomerTaxClass()\n {\n ...
[ "0.7165324", "0.70044", "0.689689", "0.6868054", "0.6823469", "0.6739802", "0.67346007", "0.6584047", "0.6534724", "0.6424121", "0.6169547", "0.6139684", "0.6084452", "0.6067604", "0.6054678", "0.6021132", "0.59066445", "0.58677596", "0.58665645", "0.58665645", "0.5839722", ...
0.8741051
0
Gets the default tax zones for the given store.
Получает стандартные зоны налогообложения для заданного магазина.
public function getDefaultZones(StoreInterface $store);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultTaxType(StoreInterface $store);", "protected function _getDefaultZone() {\n $nsdefault = $this\n ->_getConfigService()\n ->getParameter('dns.default.ns');\n $zone = new ZoneCollection();\n $ns = new NS();\n $soa = new S...
[ "0.6652432", "0.6625865", "0.59510887", "0.5864011", "0.5765168", "0.5713729", "0.56964177", "0.5669191", "0.5667735", "0.5618916", "0.561672", "0.5575628", "0.55654943", "0.5562629", "0.5555267", "0.5525332", "0.55075854", "0.5445456", "0.54406786", "0.5434646", "0.54156893"...
0.8266591
0
Gets the default tax rates for the given store and order item.
Получает стандартные ставки налогов для заданного магазина и товара заказа.
public function getDefaultRates(StoreInterface $store, OrderItemInterface $order_item);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_item_tax_rates($item)\n {\n }", "public function getTaxCalculationRate(\\Magento\\Quote\\Model\\Quote\\Item $item, $storeDefaultTax = false)\n {\n $rate = self::NO_TAX_RATE;\n $quote = $item->getQuote();\n $customerId = $quote->getCustomerId();\n\n ...
[ "0.74319863", "0.6793287", "0.64452183", "0.6408592", "0.63131666", "0.62920195", "0.6235376", "0.60969985", "0.60969985", "0.6086746", "0.6081862", "0.6043651", "0.6033014", "0.6002329", "0.59930944", "0.5987768", "0.5966865", "0.5951014", "0.5935643", "0.5932939", "0.593140...
0.8132587
0
Can make a recurring payment
Можно сделать повторяющуюся оплату
public function testRecurringCharge() { $this->markTestSkipped( 'Recurring not implemented' ); $init = [ 'amount' => '2345', 'effort_id' => 2, 'order_id' => '9998890004', 'currency' => 'EUR', 'payment_product' => '', ]; $gateway = $this->getFreshGatewayObject( $init ); $gateway::setDummyGatewa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recurringCheckout() # Subscription fees, etc as done via express checkout.\n \t{\n\n\t\t# BUT docs could be out of date!\n\n\t\t#define('PAYPAL_WSDL_VERSION', '50.0');\n\n \t$this->_initialize();\n\n \tif (!isset($this->caller))\n \t{\n \t\treturn false;\n \t}\n ...
[ "0.7535691", "0.74198395", "0.74198395", "0.73393476", "0.7330767", "0.69987994", "0.69861174", "0.6924398", "0.68900377", "0.68584055", "0.68230796", "0.67049223", "0.6685027", "0.6676906", "0.6641833", "0.65304315", "0.65250987", "0.65199804", "0.6496075", "0.6478141", "0.6...
0.74385947
1
Can resume a recurring payment
Можно возобновить повторную оплату
public function testRecurringResume() { $this->markTestSkipped( 'Recurring not implemented' ); $init = [ 'amount' => '2345', 'effort_id' => 2, 'order_id' => '9998890004', 'currency' => 'EUR', 'payment_product' => '', ]; $gateway = $this->getFreshGatewayObject( $init ); $gateway::setDummyGatewa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancelStartedOrderPayment() ;", "function cancelStartedOrderPayment() ;", "function isRecurringPaymentEnabled() ;", "function isRecurringPaymentEnabled() ;", "function cancel_recurring_payment() {\n\tif ( empty($_POST) || !wp_verify_nonce($_POST['cancel-recurring-nonce'],'cancel-recurring-action')...
[ "0.65467626", "0.65467626", "0.6537747", "0.6537747", "0.6486638", "0.63907003", "0.63700604", "0.6338747", "0.63253194", "0.62958807", "0.6282838", "0.62618685", "0.62612706", "0.62373143", "0.6221176", "0.62116194", "0.6202176", "0.6198277", "0.61877656", "0.6166011", "0.61...
0.8011869
0
Saves a shiiresaki_sime_naiyou_dt edited
Сохраняет отредактированный shiiresaki_sime_naiyou_dt
public function saveAction() { if (!$this->request->isPost()) { $this->dispatcher->forward(array( 'controller' => "shiiresaki_sime_naiyou_dts", 'action' => 'index' )); return; } $id = $this->request->getPost("id"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"shukkairai_dts\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\"...
[ "0.67801076", "0.6684956", "0.6460482", "0.640382", "0.63635325", "0.6343348", "0.6315154", "0.6295977", "0.6270036", "0.6244126", "0.6235383", "0.6225171", "0.6186227", "0.61824137", "0.61625695", "0.61532897", "0.6147715", "0.60968995", "0.6094344", "0.60773486", "0.6070543...
0.748019
0
Tests that an image can be uploaded and set to a user avatar as a file.
Тестирование возможности загрузки изображения и назначения его в качестве аватара пользователя как файла.
public function it_can_be_uploaded_as_a_file() { $this->withoutExceptionHandling(); Storage::fake(); $user = User::factory()->create(); $response = $this->actingAs($user)->post("/dashboard/{$user->id}/image", [ 'image' => UploadedFile::fake()->image('avatar.jpg') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPostAvatar()\n\t{\n\t\t$user = TestHelper::createUser(UserStatus::ACTIVE)->user;\n\t\t$upload = public_path().\"/uploads/avatars/{$user->hash}\";\n\n\t\tFile::copy(public_path().'/img/default-avatar.png', $upload);\n\n\t\t$this->be($user);\n\t\t$this->session(array('user.avatar.resize' => true)...
[ "0.7540893", "0.73878336", "0.72157204", "0.7193755", "0.719182", "0.7172197", "0.7167729", "0.71153903", "0.70490396", "0.6948966", "0.69087344", "0.6849498", "0.68440366", "0.679983", "0.67762744", "0.6774119", "0.6706506", "0.6688654", "0.6653319", "0.6645479", "0.66307354...
0.77539974
0
Tests that an image can be uploaded and set to a user avatar as a URL.
Тестирование возможности загрузки изображения и установки его в качестве аватара пользователя по URL.
public function it_can_be_uploaded_as_a_url() { Storage::fake(); $user = User::factory()->create(); $response = $this->actingAs($user)->post("/dashboard/{$user->id}/image", [ 'image_url' => 'https://upload.wikimedia.org/wikipedia/commons/f/fb/Kalmia_Latifolia.jpg' ]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPostAvatar()\n\t{\n\t\t$user = TestHelper::createUser(UserStatus::ACTIVE)->user;\n\t\t$upload = public_path().\"/uploads/avatars/{$user->hash}\";\n\n\t\tFile::copy(public_path().'/img/default-avatar.png', $upload);\n\n\t\t$this->be($user);\n\t\t$this->session(array('user.avatar.resize' => true)...
[ "0.73596776", "0.71202636", "0.7001669", "0.6979624", "0.6826405", "0.6817445", "0.68115276", "0.6666331", "0.665186", "0.6634446", "0.6631303", "0.65898466", "0.6587326", "0.6570413", "0.65470624", "0.6502862", "0.64543283", "0.6399786", "0.6381157", "0.6380664", "0.63781464...
0.7597852
0
get ad by id
получить рекламу по id
public function getAdById($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAdsById($id);", "public function getAd($id){\n\t\t$sql = 'SELECT itemId,url FROM adsFound WHERE itemId=\"'.addslashes(trim($id)).'\" LIMIT 1;';\n\t\treturn $this->get_first($sql);\n\t}", "public static function getAd($id) {\n\t\tif (!intval($id)) return false;\n\t\treturn self::_getDao()->ge...
[ "0.8555566", "0.8416734", "0.809278", "0.7846965", "0.7318162", "0.72892165", "0.71411026", "0.7136578", "0.70832795", "0.7076377", "0.7054273", "0.7054273", "0.7054273", "0.7054273", "0.7054273", "0.7054273", "0.7054273", "0.7054273", "0.7054273", "0.7054273", "0.7054273", ...
0.89535815
0
Decode a hash back to an id.
Декодируйте хэш обратно в ид.
public function decode($hash);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function decodeContentHash($contentHash);", "static function uncompressHash($hash) {\n return self::base64_to_base16(self::base64UrlSafe_to_base64($hash));\n }", "public static function decodeId($str) {\n\t\t$str = trim(strval($str));\n\t\tif (!$str) return 0;\n\t\tif (strlen($str) != self::LE...
[ "0.6354841", "0.6238516", "0.62217814", "0.60991085", "0.60978407", "0.6073605", "0.6025423", "0.60224545", "0.60083365", "0.5815378", "0.5703786", "0.5689755", "0.567521", "0.5568987", "0.5556927", "0.554991", "0.5524751", "0.55195427", "0.55071133", "0.54981726", "0.5485898...
0.77175814
0
Check if a value is an increments of ranges
Проверьте, является ли значение кратным диапазону
public function isIncrementsOfRanges($value) { return strpos($value, '/') !== false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasRanges(){\n return $this->_has(2);\n }", "public function isInIncrementsOfRanges($dateValue, $value)\n {\n $parts = array_map('trim', explode('/', $value, 2));\n $stepSize = isset($parts[1]) ? (int) $parts[1] : 0;\n\n if ($stepSize === 0) {\n return f...
[ "0.68364275", "0.68013054", "0.65950507", "0.62976825", "0.625474", "0.62349045", "0.61792463", "0.61535853", "0.61420465", "0.6133928", "0.61173093", "0.6062491", "0.60353523", "0.6020305", "0.59948254", "0.59274817", "0.5923069", "0.5825177", "0.58124965", "0.58074224", "0....
0.72871614
0
Merges a password and a salt.
Объединяет пароль и соль.
protected function mergePasswordAndSalt($password, $salt) { if (empty($salt)) { return $password; } return $salt.$password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function mergePasswordAndSalt($password, $salt)\n {\n if (empty($salt)) {\n return $password;\n }\n\n return $salt.$password.$salt;\n }", "protected function mergePasswordAndSalt($password, $salt)\n {\n return $salt.strtolower($password);\n }", "publ...
[ "0.78186995", "0.76369405", "0.66369987", "0.6535536", "0.6507308", "0.63725394", "0.6353378", "0.6314802", "0.626973", "0.62532556", "0.623207", "0.6222331", "0.6221793", "0.6192545", "0.61832273", "0.6180473", "0.61696166", "0.6159443", "0.6155715", "0.6141626", "0.61278045...
0.7816148
1
Get metric family samples
Получить образцы семейства метрик
public function getMetricFamilySamples() { return $this->registry->getMetricFamilySamples(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function samples()\n {\n return $this->samples;\n }", "public function getSamples()\n {\n return $this->samples;\n }", "function getMetrics(): array;", "public function getMetricsList(){\n return $this->_get(1);\n }", "public function getSamplingFactors () {}", "pu...
[ "0.6706253", "0.63252324", "0.6149763", "0.60022277", "0.5957661", "0.5845668", "0.5783268", "0.57316405", "0.5697881", "0.55083585", "0.5506994", "0.55067885", "0.54907", "0.5465431", "0.5453343", "0.5437546", "0.54320717", "0.5431284", "0.53868383", "0.53812474", "0.5345269...
0.7967037
0
other_user_table_data takes in the index and username of someone that is not the logged in user along with a boolean. It will display a link to another php file that will generate the other user's info in the same format as the homepage without the option to submit a texty. If $cond is true, that means the logged in us...
other_user_table_data принимает индекс и имя пользователя другого человека, который не является текущим пользователем, вместе с логическим значением. Она будет отображать ссылку на другой php-файл, который сгенерирует информацию другого пользователя в том же формате, что и главная страница, без возможности отправить те...
function other_user_table_data($index, $username, $cond, $vert_align) { // Display a link to view the other user's page echo "<a href='other_user.php?username={$username}' style='vertical-align: {$vert_align}'>{$username}</a>"; // If $cond is true, we will also want to display their recent texty since we follo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_link_admins($dbc, $number, $email) {\n#$query = 'SELECT * FROM users WHERE NOT IN ( SELECT * FROM users WHERE email=\"'.$email.'\") ORDER BY user_id ASC LIMIT '.$number.'' ;\n\tif ($number != 0 ){\n\t\t$query = 'SELECT * FROM users ORDER BY user_id ASC LIMIT '.$number.'' ;\n\t}else if ($number == 0 )...
[ "0.6161511", "0.59080577", "0.5753997", "0.56495535", "0.56467706", "0.54787874", "0.545931", "0.54407835", "0.5405222", "0.5395829", "0.5393909", "0.538217", "0.53765386", "0.5364678", "0.53372014", "0.53060925", "0.5294321", "0.52824914", "0.5271264", "0.52572286", "0.52566...
0.8502588
0
texty_table_data takes a line from someone's texts.txt file and displays it with a passed in row and column size
texty_table_data берет строку из файла texts.txt кого-либо и отображает ее с заданным размером строки и столбца
function texty_table_data($texty_line, $row_size, $col_size) { echo "<textarea rows='{$row_size}' cols='{$col_size}' disabled='disabled'>{$texty_line}</textarea>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Row($data)\n {\n // number of line\n $nb = 0;\n // loop each data to find out greatest line number in a row.\n for ($i = 0; $i < count($data); $i++) {\n // NbLines will calculate how many lines needed to display text wrapped in specified width.\n // then max function will compare th...
[ "0.5800215", "0.5762236", "0.5654829", "0.5629133", "0.5590219", "0.55359703", "0.55345887", "0.5484001", "0.5482579", "0.5480145", "0.5472597", "0.54404235", "0.53796506", "0.5377064", "0.5374404", "0.535737", "0.5339815", "0.53348243", "0.5321944", "0.5289148", "0.52748054"...
0.71629864
0
blank_table_data takes in an alignment of left, center, or right along with a percentage of how much page width it will occupy It also takes the top, right, bottom, and left padding values to surround this table data with
blank_table_data принимает выравнивание слева, по центру или справа, а также процент того, какую ширину страницы будет занимать эта таблица данных. Также она принимает значения верхнего, правого, нижнего и левого отступов для окружения этой таблицы данных
function blank_table_data($alignment, $width_percent, $top, $right, $bottom, $left) { echo "<td align='{$alignment}' width='{$width_percent}%' style='padding: {$top}px {$right}px {$bottom}px {$left}px'></td>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function make_blank ()\n {\n echo \"<td class=\\\"cell-empty\\\">&nbsp;</td>\\n\";\n }", "function createTable($data){\n if (count($data) > 0): ?>\n <table>\n <thead>\n <style>\n table {\n font-family: arial, sans-serif;\n border-collapse: coll...
[ "0.6064689", "0.5867088", "0.56201595", "0.55847126", "0.55521816", "0.5471172", "0.54413885", "0.54300636", "0.54074967", "0.5338679", "0.5310095", "0.5304567", "0.52958024", "0.52851176", "0.5261779", "0.52577484", "0.52286726", "0.5220403", "0.5214962", "0.51926845", "0.51...
0.7910962
0
same as above talk to server but this one handles a user sending a texty
такой же, как выше, разговор с сервером, но этот обрабатывает пользователя, отправляющего текстовый ввод
function talk_to_server_text($texty, $un) { // loop until a socket connection is created do { $socket_fd = stream_socket_client('localhost:'.get_random_port(), $errno, $errstr, 25); } while (!$socket_fd); // $message is the string that will be sent over the open socket to the server // It will b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function SendText($post);", "public function send(Texter $texter);", "public function send()\n {\n $this->users->needLogin();\n if (isset($_POST['msg']))\n {\n foreach ($_POST['msg'] AS $array)\n {\n $std = (object) $array;\n $std->user_id = $_SESSION['user']['...
[ "0.7111745", "0.68959975", "0.68949014", "0.6606208", "0.65853655", "0.65750366", "0.656892", "0.656892", "0.656892", "0.656892", "0.656892", "0.656892", "0.656892", "0.656892", "0.656892", "0.656892", "0.656892", "0.6568612", "0.6552757", "0.65462625", "0.65462625", "0.654...
0.72095054
0
Advance the buffer n characters
Переместить буфер на n символов вперед
private function advance($n) { $this->buffer = substr($this->buffer, $n); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function advance($n)\r\n\t{\r\n\t\t$this->cursor = min($this->cursor + $n, strlen($this->stream));\r\n\t}", "public function next(): void\n {\n $this->utf8Char = '';\n $char = $this->text[$this->index];\n $byteLen = $this->charCodeLength($char);\n\n while ($byteLen > 0) {\n ...
[ "0.79951924", "0.6208177", "0.5635912", "0.5572401", "0.5441271", "0.54342633", "0.5419787", "0.53442985", "0.5328668", "0.52861935", "0.52736825", "0.52641475", "0.5239442", "0.5231405", "0.52244943", "0.5211421", "0.51634693", "0.5128569", "0.5111742", "0.5100002", "0.50584...
0.8492469
0
Consume the end delimiter
Потребление конечного разделителя
private function consume_end() { if (!preg_match('/^'.preg_quote($this->end_delim).'/', $this->buffer, $matches)) { $found = substr($this->buffer, 0, 5); throw new Exception('Failed to find end delmiter, got: '.htmlentities($found)); } $this->advance(strlen($matches[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function consume_toNextTag()\n {\n if (!preg_match('/[^'.preg_quote($this->start_delim).']*/',$this->buffer, $matches))\n throw new Exception('Failed to consume.. ? on line '.$this->line.'.'); \n\n $this->line += substr_count($matches[0], \"\\n\");\n $this->advance(strlen...
[ "0.70303404", "0.67047715", "0.6282462", "0.6227941", "0.619538", "0.607923", "0.60510945", "0.6018871", "0.59582764", "0.59535164", "0.58874", "0.5857888", "0.57467556", "0.5710465", "0.5688393", "0.56803954", "0.5675412", "0.5633907", "0.5615173", "0.5598016", "0.55885404",...
0.8370938
0
Consume next keyword from buffer and return it A keyword is a block of text starting with a character or underscore with no spaces in it
Прочитать следующий ключевое слово из буфера и вернуть его. Ключевое слово — это блок текста, начинающийся с символа или подчеркивания, без пробелов внутри него.
private function consume_keyword() { if (!preg_match('/^([A-Za-z_][\w_]*)\s*/', $this->buffer, $matches)) throw new Exception('Failed to parse keyword on line '.$this->line.'.'); $this->advance(strlen($matches[0])); return $matches[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function peek_keyword() \n\t{\n if (!preg_match('/^([\\w_][\\w\\d_]*)\\s*/', $this->buffer, $matches)) \n throw new Exception('Failed to peek keyword, found: '.$this->buffer{0}.'.'); \n\n return $matches[1];\n }", "private function consume_toNextTag()\n {\n if (!preg...
[ "0.7448862", "0.60645926", "0.5840742", "0.55665094", "0.54490215", "0.52517706", "0.5205875", "0.5205695", "0.5197488", "0.5172387", "0.5171972", "0.5125472", "0.51241195", "0.51202106", "0.5057282", "0.5053379", "0.5002731", "0.49826115", "0.49752", "0.49748358", "0.4973973...
0.77955693
0
peek into the buffer to see next keyword
Посмотрите в буфер, чтобы увидеть следующий ключевое слово
private function peek_keyword() { if (!preg_match('/^([\w_][\w\d_]*)\s*/', $this->buffer, $matches)) throw new Exception('Failed to peek keyword, found: '.$this->buffer{0}.'.'); return $matches[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function consume_keyword()\n {\n if (!preg_match('/^([A-Za-z_][\\w_]*)\\s*/', $this->buffer, $matches))\n throw new Exception('Failed to parse keyword on line '.$this->line.'.');\n\n $this->advance(strlen($matches[0]));\n return $matches[1];\n }", "function peek();",...
[ "0.7196169", "0.6546019", "0.6452259", "0.6452259", "0.6452259", "0.6452259", "0.62545913", "0.61179835", "0.60045254", "0.59670174", "0.58900994", "0.57902634", "0.57675236", "0.57351834", "0.56954014", "0.5637264", "0.5627919", "0.55948275", "0.55948275", "0.55948275", "0.5...
0.760417
0
Consume a single argument An argument is either: a string a number a variable
Используйте один аргумент. Аргумент может быть либо: строкой, числом, переменной
private function consume_argument() { // try a number try { return $pre.$this->consume_number(); } catch (Exception $ex) {} // try a variable try { // see if the variable is being negated $pre = ''; try { $this->consume_literal('!'); $pre = '!'; } catch (Exception $ex) {} return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function parse( & $variable );", "public function getArgument();", "public function getArgument($name);", "public function getArgument(string $name);", "public function Parse(){\n\t\t\tif (func_num_args() == 1){\n\t\t\t\t$Value = func_get_arg(0);\n\t\t\t}else{\n\t\t\t\t$Value = $this->value...
[ "0.57862085", "0.5729894", "0.5663469", "0.56388223", "0.5638125", "0.56109065", "0.55938286", "0.5572252", "0.55484813", "0.5470213", "0.5461567", "0.5429355", "0.54153883", "0.53954655", "0.5388919", "0.53744656", "0.5367729", "0.536203", "0.53596455", "0.53085935", "0.5234...
0.739018
0
Consume an argument list, and return the arguemnts in array form
Принять список аргументов и вернуть аргументы в виде массива
private function consume_args() { $args = array(); while (1) { //echo '<pre style="background-color: #EFFFEF;">'.$this->buffer.'</pre>'; try { $args[] = $this->consume_argument(); } catch (Exception $ex) { if (count($args) == 0) break; throw new Exception('Failed to consume argument list'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArguments() ;", "public function getArguments(): array;", "public function getArguments(): array;", "public function getArguments(): array;", "public function getArguments(): array;", "public function getArgs();", "abstract function getArguments();", "abstract public function getArgs();",...
[ "0.76068825", "0.7585613", "0.7585613", "0.7585613", "0.7585613", "0.7572096", "0.74295294", "0.7428289", "0.7422463", "0.7422463", "0.7422463", "0.7422463", "0.7422463", "0.7422463", "0.7412342", "0.7407051", "0.7382099", "0.7382099", "0.737165", "0.7366777", "0.7366777", ...
0.7613572
0
Consume an if statement
Использовать оператор if
private function consume_if() { $statement = array(); // Figure out the condition: $statement['cond'] = $this->consume_argument(); try { // see if there is a condition if (!preg_match('/^(==|!=|<|>|>=|<=|\|\|)\s*/', $this->buffer, $matches)) throw new Exception('Failed to consume string'); $this->ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleCheck() {\n if ($this->haveTrue()) {\n $this->writeLine('if ('.$this->getIfCond().') {');\n if ($this->true->do) {\n foreach($this->true->do as $do) $do->toPhp($this->onAdapter);\n }\n if ($this->true->r...
[ "0.66756135", "0.60194653", "0.5910599", "0.57895744", "0.5778013", "0.57276446", "0.5642304", "0.55873996", "0.5545934", "0.54334193", "0.54321957", "0.5431365", "0.543079", "0.5423094", "0.5402924", "0.53930444", "0.53492355", "0.52873003", "0.5254779", "0.5246059", "0.5241...
0.7145517
0
/ echo "Logged out scuccessfully"; session_start(); session_destroy(); setcookie(PHPSESSID,session_id(),time()1);
echo "Logged out successfully"; session_start(); session_destroy(); setcookie(PHPSESSID,session_id(),time()1);
function log_session_destroy(){ session_start(); session_destroy(); setcookie(PHPSESSID,session_id(),time()-1); header("location: ../pages/login.html"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logoutSession()\r\n{\r\n setcookie('auth', '', time()-100, '/');\r\n setcookie('PHPSESSID', '', time()-100, '/');\r\n $_SESSION = array();\r\n session_destroy();\r\n}", "function logOut()\n {\n session_unset();\n\n unset($_COOKIE[session_name()]);\n se...
[ "0.8571852", "0.8378136", "0.82471347", "0.8240378", "0.81483454", "0.8100629", "0.80645305", "0.8040185", "0.8028036", "0.80169255", "0.8013397", "0.80069274", "0.8002567", "0.79892856", "0.7954868", "0.7931265", "0.7925085", "0.7923523", "0.7903827", "0.78993326", "0.789230...
0.89945835
0
end method set_first_name Retrieve the last_name value
end method set_first_name Получить значение last_name
public function get_last_name() { return $this->last_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getlast_name()\n {\n return $this->last_name;\n }", "public function get_last_name()\n {\n return $this->last_name;\n }", "public function get_first_name() {\r\n return $this->first_name;\r\n }", "public function get_first_name()\n {\n return $thi...
[ "0.7939869", "0.7915373", "0.7883571", "0.7829018", "0.78181684", "0.78181684", "0.7815009", "0.7807404", "0.7800191", "0.77950853", "0.77808595", "0.77734774", "0.7752196", "0.77238995", "0.7711017", "0.77023953", "0.77023953", "0.7689013", "0.76715285", "0.76715285", "0.766...
0.7964019
0
end method set_last_name Retrieve the home_phone value
конец метода set_last_name Получить значение home_phone
public function get_home_phone() { return $this->home_phone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHomePhone(){\n return $this->_homePhone;\n }", "public function getHomePhoneNumber();", "public function get_last_name() {\r\n return $this->last_name;\r\n }", "public function get_last_name() {\n return $this->get_meta( 'last_name' );\n }", "public function...
[ "0.70897627", "0.6962344", "0.69168895", "0.6900924", "0.6844783", "0.67789376", "0.6774915", "0.6743874", "0.6721218", "0.67174613", "0.67174613", "0.6696396", "0.66813564", "0.66207", "0.66207", "0.66207", "0.66207", "0.66207", "0.66207", "0.66207", "0.66207", "0.66207", ...
0.7348713
0
end method get_home_phone Set the home_phone value
конец метода get_home_phone Установить значение home_phone
public function set_home_phone($home_phone) { $this->home_phone = $home_phone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_home_phone() {\r\n return $this->home_phone;\r\n }", "public function getHomePhone(){\n return $this->_homePhone;\n }", "public function setHomePhone($phone){\n $this->_homePhone = $phone;\n return $this;\n }", "public function setHomePhones($val)\n ...
[ "0.8179889", "0.80125445", "0.7863727", "0.69683605", "0.69243574", "0.6904004", "0.6849768", "0.6734051", "0.67271876", "0.66824806", "0.6619351", "0.6299742", "0.6284403", "0.628205", "0.6241746", "0.6238233", "0.6223322", "0.6223322", "0.6203744", "0.6177427", "0.6160478",...
0.85601544
0
end method get_mobile_phone Set the mobile_phone value
end метод get_mobile_phone Установить значение mobile_phone
public function set_mobile_phone($mobile_phone) { $this->mobile_phone = $mobile_phone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_mobile_phone() {\r\n return $this->mobile_phone;\r\n }", "public function setPhone($phone) { $this->phone = $phone ; }", "public function setMobilePhone($mobilePhone)\n {\n $this->setData('mobilePhone', $mobilePhone);\n }", "public function getPhoneMobile()\n\t{\n\t...
[ "0.7859703", "0.77798283", "0.75624305", "0.74648887", "0.7408783", "0.7408783", "0.72805345", "0.7257126", "0.72136915", "0.71743655", "0.71339065", "0.7112329", "0.7105645", "0.7058642", "0.7055439", "0.7047877", "0.7027354", "0.69593036", "0.6948193", "0.6948193", "0.69210...
0.84284
0
end method set_mobile_phone Retrieve the address_1 value
end method set_mobile_phone Получить значение address_1
public function get_address_1() { return $this->address_1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddress1()\n {\n return $this->address_1;\n }", "public function getPhone1()\n {\n return $this->phone1;\n }", "public function getPhone1()\n {\n return $this->phone1;\n }", "public function getAddress1()\n {\n return $this->address1;\n }...
[ "0.7294911", "0.72892255", "0.72892255", "0.725662", "0.725662", "0.725662", "0.725662", "0.725662", "0.70181805", "0.7017651", "0.6920723", "0.68947643", "0.68051136", "0.6798221", "0.6768132", "0.666715", "0.6659515", "0.66292053", "0.66166174", "0.66143394", "0.6587092", ...
0.7535866
0
end method get_address_1 Set the address_1 value
конец метода get_address_1 Установить значение address_1
public function set_address_1($address_1) { $this->address_1 = $address_1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_billing_address_1($value)\n {\n }", "public function setAddress1($address1)\n {\n $this->address1 = $address1;\n }", "public function get_address_1() {\r\n return $this->address_1;\r\n }", "public function getAddress1()\n {\n return $this->ad...
[ "0.7872195", "0.7825231", "0.76441944", "0.7479267", "0.7479267", "0.7479267", "0.7479267", "0.7479267", "0.74723434", "0.7453169", "0.7425621", "0.7425239", "0.73603326", "0.73424876", "0.7301993", "0.7296975", "0.7251945", "0.719914", "0.7188454", "0.7174459", "0.7141301", ...
0.8262112
0
end method set_address_1 Retrieve the address_2 value
end method set_address_1 Получить значение address_2
public function get_address_2() { return $this->address_2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_address_2()\n {\n }", "public function getAddress2()\r\n {\r\n return $this->_address2;\r\n }", "public function getAddress2()\n {\n return $this->address2;\n }", "public function getAddress2()\n {\n return $this->address2;\n }", "public fun...
[ "0.8503979", "0.81161016", "0.80799", "0.80799", "0.80799", "0.80799", "0.8066727", "0.8027358", "0.79696196", "0.79696196", "0.79696196", "0.79696196", "0.79696196", "0.785774", "0.7842359", "0.76186556", "0.7575086", "0.756246", "0.7497601", "0.7495012", "0.7368388", "0.7...
0.82160056
1
end method get_address_2 Set the address_2 value
end method get_address_2 Установить значение address_2
public function set_address_2($address_2) { $this->address_2 = $address_2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_billing_address_2($value)\n {\n }", "function setAddress2Attribute($address2) \n\t{\n\n\t\t$this->attributes['address2'] = $address2;\n\n\t\t$parts = explode(\" \",$address2);\n\t\tif ( count($parts)> 0 && is_numeric($parts[0]) ) {\n\n\t\t\t$zipcode = Zipcode::where('zipcode','=...
[ "0.8319084", "0.8195966", "0.79622936", "0.793443", "0.78998274", "0.7889001", "0.7755145", "0.7728743", "0.77160513", "0.77160513", "0.77160513", "0.77160513", "0.7610241", "0.7505881", "0.74956906", "0.74802923", "0.74670935", "0.7429547", "0.739358", "0.7357544", "0.726482...
0.84694636
0
end method get_city Set the city value
end method get_city Установить значение города
public function set_city($city) { $this->city = $city; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCity($city) { $this->city = $city ; }", "function setCity($city) {\n\t\t$this->m_city = $city;\n\t}", "public function setCity($city){\n\t\t$this->city\t\t\t=\t$city;\n\t}", "public function setCity(string $city){\n $this->city = $city;\n }", "function setCity($city) {\r\n\t\tr...
[ "0.8511827", "0.8171912", "0.80920976", "0.80653393", "0.80630577", "0.8006076", "0.7988602", "0.7988602", "0.79763776", "0.793627", "0.793627", "0.793627", "0.7917525", "0.7892963", "0.7815531", "0.7776677", "0.77425855", "0.7738108", "0.77173346", "0.7715812", "0.76855403",...
0.8301612
1
end method get_organization_id Set the organization_id value
конец метода get_organization_id Установить значение organization_id
public function set_organization_id($organization_id) { $this->organization_id = $organization_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_organization_id() {\r\n return $this->organization_id;\r\n }", "public function setOrgId($value = NULL){\n\t\t$this->org_id = $value;\n\t}", "public function getOrganizationId()\n {\n return $this->organizationId;\n }", "public function getOrganizationId()\n {\n ...
[ "0.7755661", "0.7642751", "0.75232226", "0.75232226", "0.75232226", "0.75232226", "0.75232226", "0.75232226", "0.73309326", "0.7314684", "0.7278308", "0.70461905", "0.6995329", "0.6995329", "0.6995329", "0.6995329", "0.6982531", "0.6909978", "0.6859564", "0.6849214", "0.67778...
0.8079796
0
end method add_request Remove from the list of requests if exists
конец метода add_request Удалить из списка запросов, если существует
public function delete_request($request) { $found_request = -1; for ($i = 0; $i < sizeof($this->requests); $i++) { $thisrequest = $this->requests[$i]; if ($request->get_request_id() == $thisrequest->get_request_id) { $found_request = $i; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($request)\n\t{\n\t}", "function AJsubmitRemoveRequest() {\n\tglobal $mode;\n\t$mode = 'AJviewRequests';\n\t$requestid = getContinuationVar('requestid', 0);\n\t$request = getRequestInfo($requestid, 1);\n\tif(is_null($requestid)) {\n\t\tviewRequests();\n\t\treturn;\n\t}\n\n\tif($request['ser...
[ "0.72804886", "0.6957008", "0.6423234", "0.6154958", "0.6051229", "0.60397434", "0.587763", "0.5868325", "0.5868325", "0.5858526", "0.58434397", "0.58434397", "0.58434397", "0.58434397", "0.58434397", "0.58434397", "0.582481", "0.58048016", "0.57598895", "0.571192", "0.569760...
0.71845096
1
Create a new item with bad json (not array) in request body.
Создайте новый элемент с неправильным json (не массивом) в теле запроса.
public function testPostItemJsonNotArray() { $this->di->get("request")->setBody("'bad json'"); $res = $this->controller->postItem("users"); $json = $res[0]; $status = $res[1]; $this->assertContains("not an object/array", $json["message"]); $this->assertEquals(500, $s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPostItemBadJson()\n {\n $this->di->get(\"request\")->setBody(\"{ bad json }\");\n $res = $this->controller->postItem(\"users\");\n\n $json = $res[0];\n $status = $res[1];\n $this->assertContains(\"valid JSON\", $json[\"message\"]);\n $this->assertEqu...
[ "0.7016999", "0.6816513", "0.67827773", "0.6450429", "0.6431846", "0.63694483", "0.6348825", "0.62711185", "0.6256869", "0.6243165", "0.61557865", "0.61362", "0.6094989", "0.6090459", "0.6055656", "0.6025202", "0.60213554", "0.60080326", "0.59998626", "0.59781456", "0.5966178...
0.7135278
0
Create a new item with bad json in request body.
Создайте новый элемент с неправильным json в теле запроса.
public function testPostItemBadJson() { $this->di->get("request")->setBody("{ bad json }"); $res = $this->controller->postItem("users"); $json = $res[0]; $status = $res[1]; $this->assertContains("valid JSON", $json["message"]); $this->assertEquals(500, $status); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPutItemBadJson()\n {\n $this->di->get(\"request\")->setBody(\"{ bad json }\");\n $res = $this->controller->putItem(\"users\", 1);\n\n $json = $res[0];\n $status = $res[1];\n $this->assertContains(\"valid JSON\", $json[\"message\"]);\n $this->assertEq...
[ "0.6849154", "0.67891765", "0.66481036", "0.6647281", "0.64474386", "0.6444269", "0.6401136", "0.6392892", "0.63483965", "0.6343648", "0.6343541", "0.6286937", "0.6246222", "0.62317234", "0.6194771", "0.618273", "0.6180064", "0.6158533", "0.61303777", "0.6117083", "0.6090475"...
0.7108451
0
Update a item with bad json (not array) in request body.
Обновить элемент с неправильным json (не массивом) в теле запроса.
public function testPutItemJsonNotArray() { $this->di->get("request")->setBody("bad json"); $res = $this->controller->putItem("users", 1); $json = $res[0]; $status = $res[1]; $this->assertContains("not an object/array", $json["message"]); $this->assertEquals(500, $st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPutItemBadJson()\n {\n $this->di->get(\"request\")->setBody(\"{ bad json }\");\n $res = $this->controller->putItem(\"users\", 1);\n\n $json = $res[0];\n $status = $res[1];\n $this->assertContains(\"valid JSON\", $json[\"message\"]);\n $this->assertEq...
[ "0.74748665", "0.6842409", "0.67221326", "0.6716329", "0.66381985", "0.6496366", "0.6481002", "0.6456741", "0.64420164", "0.643369", "0.63989174", "0.6335743", "0.6282592", "0.6282592", "0.6282592", "0.6282592", "0.6282592", "0.626643", "0.6218456", "0.62106216", "0.61669344"...
0.7434337
1
Update a item with bad json in request body.
Обновить элемент с некорректным JSON в теле запроса.
public function testPutItemBadJson() { $this->di->get("request")->setBody("{ bad json }"); $res = $this->controller->putItem("users", 1); $json = $res[0]; $status = $res[1]; $this->assertContains("valid JSON", $json["message"]); $this->assertEquals(500, $status); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPutItemJsonNotArray()\n {\n $this->di->get(\"request\")->setBody(\"bad json\");\n $res = $this->controller->putItem(\"users\", 1);\n\n $json = $res[0];\n $status = $res[1];\n $this->assertContains(\"not an object/array\", $json[\"message\"]);\n $this...
[ "0.71880704", "0.6855979", "0.6805643", "0.6787587", "0.66605043", "0.657888", "0.6538855", "0.6512633", "0.64440525", "0.6434726", "0.6424321", "0.6424321", "0.6424321", "0.6424321", "0.6424321", "0.6422971", "0.6419621", "0.63673526", "0.632757", "0.63003373", "0.6289516", ...
0.76569396
0
Delete an item when dataset does not exists.
Удалить элемент, если набор данных не существует.
public function testDeleteItemWhenDatasetNotExists() { $res = $this->controller->deleteItem("users", 99); $json = $res[0]; $this->assertContains("Item id '99'", $json["message"]); $this->assertContains("was deleted", $json["message"]); $this->assertContains("dataset ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDeleteItemNotExists()\n {\n $this->controller->initActionGet();\n $res = $this->controller->deleteItem(\"users\", 99);\n\n $json = $res[0];\n $this->assertContains(\"Item id '99'\", $json[\"message\"]);\n $this->assertContains(\"was deleted\", $json[\"messa...
[ "0.6837576", "0.65207595", "0.6323305", "0.63205093", "0.6294795", "0.62895036", "0.62247765", "0.6217746", "0.62090206", "0.6166858", "0.6127333", "0.60821307", "0.6075933", "0.60524654", "0.604546", "0.60388714", "0.60305256", "0.59724253", "0.59724253", "0.5940257", "0.593...
0.8019374
0
Delete an item that does not exists.
Удалить элемент, который не существует.
public function testDeleteItemNotExists() { $this->controller->initActionGet(); $res = $this->controller->deleteItem("users", 99); $json = $res[0]; $this->assertContains("Item id '99'", $json["message"]); $this->assertContains("was deleted", $json["message"]); $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function deleteLikeItem();", "public function removeItem($item);", "abstract public function deleteByItem($item);", "public function remove($item);", "public function remove($item);", "public function deleteItem($item){\n $this->items->deleteItem($item);\n }", "public function...
[ "0.7367908", "0.7259159", "0.7180004", "0.709237", "0.709237", "0.70853543", "0.70669544", "0.6965279", "0.6959234", "0.6959234", "0.68814975", "0.68763393", "0.68729055", "0.68684465", "0.6823715", "0.6813609", "0.67632943", "0.6735569", "0.6692699", "0.66877675", "0.6664188...
0.7598614
0
Check if the given ECS is currently active.
Проверьте, активен ли данный ECS в настоящее время.
public static function is_active_ecs($ecsid) { if (self::$activeecs === null) { self::$activeecs = array_keys(self::list_ecs(true)); } return in_array($ecsid, self::$activeecs); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isActive()\n {\n return ($this->state == self::STATE_RUNNING);\n }", "final public function isActive(): bool\n {\n return $this->getStatus() === self::STATUS_ACTIVE;\n }", "public function isCurrentlyActive() {\n return $this->lastActive->diff(new DateTime(\"now\", ...
[ "0.7183279", "0.7155665", "0.71553206", "0.7012779", "0.6978298", "0.69762903", "0.69750744", "0.69338506", "0.6900223", "0.6892845", "0.6883647", "0.6870565", "0.6867572", "0.68595535", "0.6807094", "0.68009543", "0.6795927", "0.67916113", "0.6784265", "0.6771608", "0.672898...
0.78535146
0
Check if it is time to run a cron update for this ECS
Проверьте, нужно ли запускать cron-обновление для этого ECS
public function time_for_cron() { if ($this->crontime == 0) { return false; } return (($this->lastcron + $this->crontime) < time()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function configUpdatedMoreRecentlyThanCron() {\n return filemtime(self::CRON_FILENAME) < JobConfigManager::getLastJobConfigUpdateTime();\n }", "public static function check_cron()\n {\n // Get next scheduled event timestamp\n $scheduled = wp_next_scheduled('woochimp_proc...
[ "0.707351", "0.70677394", "0.69735354", "0.6937382", "0.6906268", "0.68874", "0.6856353", "0.6856353", "0.6856353", "0.6852299", "0.6840475", "0.68059665", "0.6785094", "0.67792374", "0.676836", "0.67506367", "0.67141503", "0.67025214", "0.66969687", "0.6618388", "0.66124916"...
0.72126836
0
Save the current time as the lastcron time
Сохраните текущее время как время lastcron
public function update_last_cron() { global $DB; $lastcron = time(); if (!is_null($this->recordid)) { $DB->set_field('local_campusconnect_ecs', 'lastcron', $lastcron, array('id' => $this->recordid)); } $this->lastcron = $lastcron; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveLastRunTime()\n {\n if (! $this->dbLink)\n {\n $this->getDBConnection();\n }\n\n $fields['cron_name'] = $this->q($this->id);\n $fields['start_time'] = $this->q(date(\"Y-m-d H:i:s\", $this->startTime));\n $fields['end_time'] = $this->q(dat...
[ "0.75085413", "0.7145229", "0.6835094", "0.6803692", "0.67756635", "0.67569196", "0.66604394", "0.6570111", "0.64803296", "0.63886464", "0.63739514", "0.6335984", "0.6301817", "0.6214403", "0.6172759", "0.6171991", "0.61626124", "0.6141672", "0.6139969", "0.60571074", "0.6031...
0.7968822
0
\brief Wrapper for preparing and executing a PDOStatement that returns a resultset e.g. SELECT SQL statements. Returns a multidimensional array depending on internal fetch mode setting (self::$fetchMode) See PDO documentation about prepared queries. If there isn't already a database connection, it will "lazy load" the ...
\brief Обертка для подготовки и выполнения PDOStatement, возвращающего набор результатов, например, запросы SELECT. Возвращает многомерный массив в зависимости от настроек внутреннего режима извлечения (self::$fetchMode). См. документацию PDO по подготовленным запросам. Если не существует уже соединения с базой данных,...
public static function preparedQuery( $sql, ///< same as kind provided to PDO::prepare() $params = array(), ///< same as kind provided to PDO::prepare() $fetchKeyPair = false ///< See description in method documentation ) { if (!self::$pdo instanceof PDO) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPairs($statement) {\n\t\t\t$stmt = $this->prepare($statement);\n\t\t\tif ($stmt === false)\n\t\t\t\treturn false;\n\n\t\t\t// Arguments\n\t\t\t$args = func_get_args();\n\t\t\tif (isset($args[1]) && is_array($args[1]))\n\t\t\t\t$args = $args[1];\n\t\t\telse\n\t\t\t\tarray_shift($args);\n\n\t\t\t/...
[ "0.71244055", "0.66654795", "0.66042805", "0.65469366", "0.6535364", "0.64601016", "0.64382684", "0.64318967", "0.6404961", "0.63999337", "0.63992053", "0.63875437", "0.636195", "0.6344384", "0.6337117", "0.63161623", "0.63128525", "0.63009125", "0.6279518", "0.62746894", "0....
0.775463
0
\brief Wrapper for PDO::lastInsertId() \returns the ID of the last INSERT \throws Exception thrown if internal PDO object not instantiated
\brief Обёртка для PDO::lastInsertId() \returns ID последней вставки \throws Exception если внутренний объект PDO не инициализирован
public static function lastInsertId() { if (!self::$pdo instanceof PDO) { throw new Exception(__METHOD__ . '() internal PDO object not instantiated'); } return self::$pdo->lastInsertId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function dblibLastInsertId() {\n\n $query = \"SELECT SCOPE_IDENTITY() as id\";\n\n try {\n\n $response = $this->dbh->prepare($query);\n $response->execute();\n $id = $response->fetchAll(\\PDO::FETCH_ASSOC);\n\n }\n catch (\\PDOException $e) {\n\n...
[ "0.8275456", "0.8241875", "0.8182102", "0.80782473", "0.8068524", "0.80659103", "0.80581427", "0.80536056", "0.80467373", "0.80262", "0.80132586", "0.80132586", "0.80132586", "0.7987146", "0.79810566", "0.79810566", "0.7956806", "0.79511255", "0.7943204", "0.7937089", "0.7934...
0.8780375
0
Get current status of Mojang services. Does not require authentication.
Получить текущий статус служб Mojang. Не требует аутентификации.
public function status() { return $this->http(self::STATUS_SERVER, 'check'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_status()\n {\n return static::getInstance()->getStatus();\n }", "public function status()\n {\n // Make the Kyoto Tycoon RPC request\n return $this->_rpc('status', array());\n }", "public function status()\n {\n return $this->httpGet('status...
[ "0.7212663", "0.7032387", "0.694773", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", "0.69465166", ...
0.7054262
1
Get the UUID for the specified username. Does not require authentication.
Получите UUID для указанного имени пользователя. Не требует аутентификации.
public function uuid($username) { return $this->http(self::API_SERVER, "users/profiles/minecraft/$username"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsername()\n {\n return (string) $this->uuid;\n }", "public function getUuid(): string\n {\n return $this->getUsername();\n }", "public function getUsername() {\n return $this->uuid;\n }", "public function obtenerPorUsername($username);", "public stati...
[ "0.6707965", "0.66747236", "0.6626789", "0.6603517", "0.6527544", "0.6286447", "0.6230628", "0.6226735", "0.61542726", "0.61415493", "0.6128571", "0.6121575", "0.6119684", "0.611835", "0.61152685", "0.609032", "0.609032", "0.60649025", "0.6035689", "0.6029974", "0.6001544", ...
0.75918233
0
Get more detailed user account info of current authenticated user. Requires authentication!
Получите более подробную информацию о учетной записи текущего аутентифицированного пользователя. Требуется аутентификация!
public function userinfo() { return $this->http(self::API_SERVER, 'user', 'GET', 'Authorization: Bearer ' . $this->access_token . PHP_EOL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserInfo()\n\t{\n\t\t$options = array(\n\t\t\t'access_token' => $this->_accessToken,\n\t\t\t'client_id' => $this->_clientId,\n\t\t\t'application_key' => $this->_clientPublic,\n\t\t\t'format' => 'JSON',\n\t\t\t'method' => 'users.getCurrentUser',\n\t\t\t'sig' => md5('application_key=' . $this->_cl...
[ "0.73550344", "0.7274592", "0.7225063", "0.7203799", "0.7180946", "0.71766025", "0.7167167", "0.716627", "0.715068", "0.714794", "0.714794", "0.7136859", "0.7109289", "0.7102546", "0.70882773", "0.7078261", "0.70561785", "0.7052279", "0.701985", "0.7016219", "0.69855237", "...
0.75079185
0
Get info about a realm specified by its id. Requires authentication and ownership to specified realm!
Получить информацию о реалме, указанном его идентификатором. Требуется аутентификация и право собственности на указанный реалм!
public function realm($id) { if ($this->uuid === null) { $this->uuid = $this->uuid($this->name)['id']; } return $this->http(self::REALM_SERVER, "worlds/$id", 'GET', $this->headers()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRealm($id)\n\t{\n\t\t$this->realmId = $id;\n\t\t$this->realm = $this->realms->getRealm($id);\n\t}", "public function getById($id) {\n $query = array(\n 'includeCapsuleOwner' => true,\n 'conditions' => array(\n 'Capsule.id' => $id\n ),\n ...
[ "0.6106474", "0.6073855", "0.6013638", "0.6013638", "0.6013638", "0.5962936", "0.59329003", "0.58826965", "0.5824467", "0.5813189", "0.57907474", "0.57832825", "0.57826626", "0.576276", "0.5709238", "0.56954277", "0.5688117", "0.56846917", "0.568227", "0.5676059", "0.56681174...
0.74097943
0
Invalidates the access token. Endpoint returns an empty payload (204 No Content) if successful.
Неверный токен доступа. Если операция успешна, конечная точка возвращает пустой загрузочный пакет (204 No Content).
public function invalidate() { return $this->http_auth('invalidate', array( 'clientToken' => $this->client_token, 'accessToken' => $this->access_token )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanToken()\n {\n// $user = auth()->guard('api')->user();\n//\n// $accessToken = $user->token();\n// DB::table('oauth_refresh_tokens')->where('access_token_id', $accessToken->id)\n// ->update([\n// 'revoked' => 1\n// ]);\n// $acce...
[ "0.70332175", "0.6838736", "0.66528714", "0.6517027", "0.6450813", "0.6441881", "0.64309466", "0.64182216", "0.6398735", "0.6378578", "0.627922", "0.62599075", "0.6230813", "0.6225513", "0.61920255", "0.6183921", "0.61787325", "0.6176375", "0.6164132", "0.61566955", "0.614121...
0.7780732
0
Dispatches a http call to the authentication server with the specified path and data.
Отправляет HTTP-запрос на сервер аутентификации по указанному пути и данным.
private function http_auth($path, $data) { return $this->http(self::AUTH_SERVER, $path, 'POST', self::JSON, $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function call()\n {\n $req = $this->app->request;\n $user = $req->headers('PHP_AUTH_USER');\n $pass = $req->headers('PHP_AUTH_PW');\n // self modification || $req->isOptions() so that OPTIONS request (prefetch request of browser is skipped)\n if ((!$this->checkPath($th...
[ "0.6713261", "0.6045745", "0.6037341", "0.60109854", "0.5933031", "0.5932566", "0.5931393", "0.58974373", "0.5853173", "0.58504146", "0.57911015", "0.5737695", "0.5712539", "0.57066184", "0.57024425", "0.5694162", "0.5649109", "0.5626842", "0.5613774", "0.5613568", "0.5583297...
0.76582175
0
Store the Auth\Simple instance in the PHP session. You can override this in subclasses if you want to store it in a database or somewhere else.
Храните экземпляр Auth\Simple в PHP-сессии. Вы можете переопределить это в подклассах, если хотите сохранить его в базе данных или где-нибудь ещё.
public function store () { $core = \Lum\Core::getInstance(); $core->sess->SimpleAuth = $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function Set() {\n $_SESSION[''.$this->name] = serialize($this->session);\n }", "private function createSession() {\n $_SESSION['uid'] = $this->uid;\n $_SESSION['sid'] = $this->sid;\n $_SESSION['user'] = $this->user;\n $_SESSION['pass'] = $this->pass;\n $_SESS...
[ "0.6763146", "0.65924776", "0.6464526", "0.6444692", "0.64350307", "0.64182496", "0.64008176", "0.64007545", "0.63221675", "0.63076216", "0.62435275", "0.62330264", "0.6230205", "0.62127864", "0.6183162", "0.61827815", "0.61764914", "0.61756045", "0.6173387", "0.61655205", "0...
0.7991467
0
Get an instance of the Auth\Simple class. If an instance is found in the PHP session, we return that. Otherwise we create a new instance and return it.
Получите экземпляр класса Auth\Simple. Если экземпляр найден в сессии PHP, мы возвращаем его. В противном случае создаем новый экземпляр и возвращаем его.
public static function getInstance ($opts=array()) { # error_log('SimpleAuth::getInstance('.json_encode($opts).')'); $core = \Lum\Core::getInstance(); $core->sess; // Make sure the plugin is initialized. if (isset($core->sess->SimpleAuth) && is_object($core->sess->SimpleAuth)) { # error_log("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_auth_simple() {\n require_once(\"/var/simplesamlphp/lib/_autoload.php\");\n\treturn new \\SimpleSAML\\Auth\\Simple('default-sp');\n}", "public static function get()\n {\n\n // Load from Session\n $auth = isset($_SESSION[static::AUTH_COOKIE]) ? $_SESSION[static::AUTH_COOKIE] : fal...
[ "0.71148366", "0.70149475", "0.69883764", "0.6971091", "0.688362", "0.68105435", "0.67939454", "0.6722913", "0.667059", "0.6603199", "0.65607876", "0.65226823", "0.6509819", "0.64928013", "0.64907944", "0.6482313", "0.6479125", "0.6467574", "0.64428014", "0.64339036", "0.6426...
0.7909609
0
Pega um recurso passando uma URL como parametro SELECT ID, NOME, URL, IMG, ID_RECURSO_TIPO, CONTROLADOR, ACAO FROM TB_RECURSOS WHERE URL = ? LIMIT 1;
Получает ресурс, передавая URL в качестве параметра SELECT ID, NOME, URL, IMG, ID_RECURSO_TIPO, CONTROLADOR, ACAO FROM TB_RECURSOS WHERE URL = ? LIMIT 1;
public static function getRecursoByUrl($url) { try { if ($url != '') { $stmt = Controlador::getInstance()->getConnection()->connection->prepare("SELECT ID , NOME , URL ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRecursoById($id) {\n try {\n\n\n\n $stmt = Controlador::getInstance()->getConnection()->connection->prepare(\"SELECT * FROM TB_RECURSOS WHERE ID = ? LIMIT 1\");\n $stmt->bindParam(1, $id, PDO::PARAM_INT);\n $stmt->execute();\n $obj = $stm...
[ "0.5964782", "0.5634867", "0.5586781", "0.53339225", "0.5308173", "0.52924377", "0.52845854", "0.5256248", "0.52456325", "0.5225433", "0.5221795", "0.5212833", "0.5161778", "0.513523", "0.51320976", "0.50903714", "0.50735897", "0.5073002", "0.506271", "0.5061985", "0.5058557"...
0.7196569
0
Returns the Activator instance
Возвращает экземпляр Activator
public function getActivator() { return $this->activator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getInstantiator() {}", "public static function apm_get_instance() {\n \n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n \n return self::$instance;\n }", "public static function get_instance() {\n\t\tstatic $instance = null;\n\t\tif ( n...
[ "0.6764182", "0.67446554", "0.6705851", "0.6705851", "0.6690475", "0.66815263", "0.6542207", "0.6516646", "0.65104735", "0.6470261", "0.6465245", "0.64431286", "0.64068264", "0.63839537", "0.6367059", "0.6367059", "0.63668394", "0.63668394", "0.6362651", "0.63618535", "0.6340...
0.79660004
0