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
Lists all LabNotebook models.
Перечисляет все модели LabNotebook.
public function actionIndex() { $searchModel = new LabNotebookSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListOfModels() {\n $requestBody = null;\n $inputArray = [];\n $ret = $this->fetch('GET', 'repository/models', $requestBody, $inputArray, array (\n ), array (\n ), array (\n 200 => 'Indicates request was successful and the models are retur...
[ "0.65035737", "0.6111178", "0.61008424", "0.60598546", "0.6058685", "0.60428953", "0.60047203", "0.59645516", "0.58994174", "0.5875334", "0.58750826", "0.5836484", "0.57165307", "0.571118", "0.56970847", "0.56841767", "0.56835014", "0.56575197", "0.5646923", "0.5633419", "0.5...
0.7378497
0
Creates a new LabNotebook model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый модель LabNotebook. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new LabNotebook(); if ($model->load(Yii::$app->request->post())) { $thefile = UploadedFile::getInstance($model, 'file'); if (!empty($thefile) && $thefile !== 0) { $thefile->saveAs('uploads/notebooks/' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view('notebook.create');\n }", "public function store(NotebookCreateRequest $request)\n {\n $notebook = Notebook::create($request->all()); \n Session::flash('message','Notebook registrada correctamente');\n return Redirect::to('hom...
[ "0.6926318", "0.68985224", "0.6870167", "0.68679523", "0.68641186", "0.6766712", "0.67551166", "0.67344916", "0.67140394", "0.66920894", "0.6684279", "0.6667285", "0.66663194", "0.66596544", "0.660252", "0.6565907", "0.6558056", "0.6531212", "0.6530968", "0.6524684", "0.65240...
0.8355184
0
Updates an existing LabNotebook model. If update is successful, the browser will be redirected to the 'view' page.
Обновляет существующую модель LabNotebook. Если обновление успешно, браузер будет перенаправлен на страницу 'view'.
public function actionUpdate($id) { $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->notebook_id]); } return $this->render('update', [ 'model' => $model, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(NotebookUpdateRequest $request, $id)\n {\n $notebook = Notebook::find($id);\n $notebook->fill($request->all());\n $notebook->save();\n Session::flash('message','Notebook editada correctamente');\n return Redirect::to('/home/notebook'); \n }", "pu...
[ "0.70327544", "0.67575675", "0.6550214", "0.6473375", "0.6429457", "0.63578445", "0.6312814", "0.6287818", "0.628231", "0.6263317", "0.6197776", "0.61951894", "0.61903584", "0.6189024", "0.6187545", "0.6180062", "0.6179751", "0.61699104", "0.61250013", "0.6123689", "0.6106167...
0.71742475
0
Finds the LabNotebook model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
Находит модель LabNotebook по значению первичного ключа. Если модель не найдена, будет выброшено исключение HTTP 404.
protected function findModel($id) { if (($model = LabNotebook::findOne($id)) !== null) { return $model; } throw new NotFoundHttpException('The requested page does not exist.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadModel($pk) {\n\t\t$model = parent::loadModel($pk);\n\t\t$activeContexts = $this->getActiveContexts();\n\t\tforeach ($activeContexts as $activeContext) {\n\t\t\t$foreignKeyName = $activeContext['foreignKeyName'];\n\t\t\tif ($model->$foreignKeyName != $activeContext['model']->getPrimaryKey()) {\n...
[ "0.6692786", "0.66092694", "0.657192", "0.65286237", "0.649453", "0.6428278", "0.64240956", "0.6386655", "0.63337606", "0.6315215", "0.6296113", "0.6294817", "0.62829816", "0.6279099", "0.6272069", "0.627152", "0.6267449", "0.62659717", "0.62651235", "0.62452024", "0.6238014"...
0.7293134
0
Changes the clients properties using given properties.
Изменяет свойства клиентов с использованием заданных свойств.
public function modify(array $properties) { $properties["clid"] = $this->getId(); $this->execute("clientedit", $properties); $this->resetNodeInfo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setProperties($properties)\n {\n $this->_data['properties'] = $properties;\n }", "public function setProperties(Properties $properties)\n\t{\n\t\t$this->properties=$properties; \n\t\t$this->keyModified['properties'] = 1; \n\n\t}", "public function updateProperties(array $propertie...
[ "0.6887523", "0.6883504", "0.68364304", "0.66488194", "0.66488194", "0.658976", "0.64352524", "0.6434684", "0.64180994", "0.63047296", "0.62765324", "0.62355334", "0.6154165", "0.5997924", "0.59880656", "0.59382325", "0.59320104", "0.5909829", "0.5907157", "0.58967775", "0.58...
0.7450767
0
Sends a poke message to the client.
Отправляет сообщение poke клиенту.
public function poke($msg) { $this->getParent()->clientPoke($this->getId(), $msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function poke(): void;", "function clientPoke($clid, $msg){\n $this->executeCommand('clientpoke clid='.$clid.' msg='.$this->escapeText($msg));\n\t}", "public function ping()\n {\n $this->message->reply('pong!');\n }", "private function sendPing() {\n\t\t$this->timeSincePingReq = time()...
[ "0.72028697", "0.69221425", "0.61250514", "0.56576425", "0.55011797", "0.5494402", "0.5343053", "0.51895607", "0.5164083", "0.51184976", "0.51184976", "0.5091892", "0.5085173", "0.50184697", "0.4919666", "0.4905482", "0.48727491", "0.4863286", "0.48593768", "0.48510346", "0.4...
0.7321905
0
Sets the channel group of a client to the ID specified.
Устанавливает группу каналов клиента в указанное ID.
public function setChannelGroup($cid, $cgid) { $this->getParent()->clientSetChannelGroup($this["client_database_id"], $cid, $cgid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setChannelGroup($group){\n\t\t$this->channels_groupby = $group;\n\t}", "function setId($id)\r\n {\r\n // Set new group ID\r\n $this->_id\t\t= $id;\r\n }", "public function setChannelId($id) {\n if ( ! Message::hasValidIdFormat($id) ) {\n throw new \\Exception(\"Bad cha...
[ "0.66108423", "0.65723026", "0.62780786", "0.6182299", "0.59542805", "0.59477454", "0.59439385", "0.59406555", "0.59289134", "0.5811195", "0.5811195", "0.5811195", "0.5811195", "0.5781897", "0.57768315", "0.57231945", "0.56996644", "0.56642073", "0.56539285", "0.56374437", "0...
0.7418741
0
Adds the client to the server group specified with $sgid.
Добавляет клиента в группу сервера, указанную с помощью $sgid.
public function addServerGroup($sgid) { $this->getParent()->serverGroupClientAdd($sgid, $this["client_database_id"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function group_add($id=null) {\r\n $id = intval($id);\r\n if ($id) {\r\n $sql = \"select * from menu_group where id = $id limit 1\";\r\n $row = db_query_one($sql);\r\n } else\r\n $row = array();\r\n\r\n $this->assign(\r...
[ "0.5784481", "0.5706263", "0.56686485", "0.56250507", "0.55746", "0.55746", "0.55702466", "0.55414736", "0.55365896", "0.5518532", "0.5516099", "0.54733646", "0.5472903", "0.54704714", "0.545133", "0.5448491", "0.5444469", "0.5442378", "0.54151404", "0.541054", "0.530806", ...
0.8734733
0
Removes the client from the server group specified with $sgid.
Удаляет клиента из группы сервера, указанной с помощью $sgid.
public function remServerGroup($sgid) { $this->getParent()->serverGroupClientDel($sgid, $this["client_database_id"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeClient($id) {\n\tif ($this->clientnum > 0) {\n\t $this->clientnum -= 1;\n\t}\n\tunset($this->clientz[$id]);\n }", "public function removeClient($id)\n {\n unset($this->_clients[$id]);\n }", "public function addServerGroup($sgid)\r\n {\r\n $this->getParent()->serverGroupClientA...
[ "0.6725059", "0.6582384", "0.621412", "0.6014016", "0.58443147", "0.5815778", "0.58000386", "0.5783546", "0.5765428", "0.5752718", "0.57127774", "0.56984824", "0.56979436", "0.568274", "0.5648481", "0.56413585", "0.562817", "0.56145895", "0.5609962", "0.5583019", "0.55712175"...
0.846173
0
Returns the possible name of the clients avatar.
Возвращает возможное имя аватара клиента.
public function avatarGetName() { return new TeamSpeak3_Helper_String("/avatar_" . $this["client_base64HashClientUID"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName()\n {\n return 'avatar';\n }", "protected function getAvatarName()\n {\n return md5($this->model->id) . '.jpg';\n }", "public static function getBotAvatar(): string\n\t{\n\t\treturn Main\\Config\\Option::get(self::MODULE_ID, self::OPTION_BOT_AVATAR, self::AVATA...
[ "0.7799325", "0.7641619", "0.7480151", "0.71449447", "0.71303505", "0.71139306", "0.7080135", "0.6987772", "0.69724923", "0.6969824", "0.6908261", "0.68993795", "0.68993795", "0.6870176", "0.6862808", "0.68465877", "0.6830735", "0.6826801", "0.6803042", "0.6801922", "0.679363...
0.86458904
0
Downloads and returns the clients avatar file content.
Скачивает и возвращает содержимое файла аватара клиента.
public function avatarDownload() { if($this["client_flag_avatar"] == 0) return; $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->avatarGetName()); $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_avatar()\n\t{\n\t\treturn $this->user_loader->get_avatar($this->get_data('closer_id'), false, true);\n\t}", "public function fetchRemoteAvatar() {\n\t\t$avatarID = 0;\n\t\t$filename = '';\n\t\t\n\t\t// fetch avatar from URL\n\t\ttry {\n\t\t\t$request = new HTTPRequest($this->parameters['url']...
[ "0.69629115", "0.6917218", "0.6736732", "0.660842", "0.6340997", "0.6334168", "0.630127", "0.62565106", "0.62565106", "0.62565106", "0.62565106", "0.62565106", "0.62565106", "0.6223953", "0.6219477", "0.62177205", "0.6199195", "0.6149642", "0.61288613", "0.6107526", "0.610088...
0.8481328
0
Returns the revision/build number from the clients version string.
Возвращает номер ревизии/сборки из строки версии клиента.
public function getRev() { return $this["client_type"] ? null : $this["client_version"]->section("[", 1)->filterDigits(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function extract_build_number($version_string)\n\t{\n\t\t$parts = explode('|', $version_string);\n\t\tif (count($parts) == 2)\n\t\t\treturn trim($parts[0]);\n\n\t\tif (strpos($parts[0], '.') !== false)\n\t\t\treturn null;\n\n\t\treturn trim($parts[0]);\n\t}", "public static function version() {\n ...
[ "0.7236481", "0.722918", "0.7060913", "0.69734144", "0.6924607", "0.69092464", "0.67423904", "0.6635435", "0.6535452", "0.6477698", "0.64540607", "0.64429516", "0.6427798", "0.6422773", "0.63889194", "0.637163", "0.63710105", "0.63526064", "0.6333892", "0.6327962", "0.6314216...
0.73758626
0
Returns all server and channel groups the client is currently residing in.
Возвращает все серверы и группы каналов, в которых клиент в настоящий момент находится.
public function memberOf() { $groups = array($this->getParent()->channelGroupGetById($this["client_channel_group_id"])); foreach(explode(",", $this["client_servergroups"]) as $sgid) { $groups[] = $this->getParent()->serverGroupGetById($sgid); } return $groups; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function group_getAllGroups() {\n\tglobal $Auth;\n\t\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\n\t## prepare the db-object\n\t$db_connection = new DB_Sql(); \n\n\t## first we should get all groups\n\t$query = \"SELECT * FROM \".GROUPS.\" WHERE $addition client_id='$client_id'\";\n\t$db_connec...
[ "0.69581896", "0.6924657", "0.6576284", "0.65753293", "0.65753293", "0.65753293", "0.65753293", "0.6514939", "0.65097743", "0.6488206", "0.64636385", "0.6445824", "0.64438576", "0.6384333", "0.63666207", "0.63517976", "0.6335411", "0.6326662", "0.63144344", "0.6312095", "0.63...
0.7785037
0
Downloads and returns the clients icon file content.
Скачивает и возвращает содержимое файла иконки клиента.
public function iconDownload() { if($this->iconIsLocal("client_icon_id") || $this["client_icon_id"] == 0) return; $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->iconGetName("client_icon_id")); $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIcon()\n {\n return 'download';\n }", "public function getIconFile();", "public function get_icon_url() : string;", "protected function fetchIcons()\n {\n return $this\n ->fetchOption('bootstrapIcon')\n ->fetchOption('lockIcon')\n ->f...
[ "0.66717196", "0.62138325", "0.6146", "0.6049336", "0.60370696", "0.6013355", "0.5992875", "0.59432906", "0.59409744", "0.5906997", "0.58801043", "0.58328366", "0.58063585", "0.5804951", "0.5799815", "0.5796674", "0.5774468", "0.5756171", "0.5744531", "0.5724445", "0.56981087...
0.8232687
0
Sends a plugin command to the client.
Отправляет команду плагина клиенту.
public function sendPluginCmd($plugin, $data) { $this->execute("plugincmd", array("name" => $plugin, "data" => $data, "targetmode" => TeamSpeak3::PLUGINCMD_CLIENT, "target" => $this->getId())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute_command() {\n \\WP_CLI::success( 'Plugins installed successfully' );\n }", "public function send($command);", "public function send_plugin_data ( ) {\n\n\n $sensei_data = array( 'plugin'=>'Sensei', 'version' => Sensei()->version );\n\n // call the wordpress function th...
[ "0.6551922", "0.6022428", "0.5930103", "0.5809539", "0.57245576", "0.57227015", "0.5576765", "0.5395655", "0.53812104", "0.52458495", "0.5221869", "0.5193619", "0.51516443", "0.5149341", "0.5144916", "0.51221865", "0.51161754", "0.5108565", "0.50957406", "0.50880146", "0.5079...
0.7569089
0
Sets cookie with last vote as Unix timestamp
Устанавливает cookie с последним голосом в виде временной метки Unix
public function setLastVote() { $lv = time(); $expires = $lv + (60*60*24); //Expires in one day setcookie('lastVote', $lv, $expires, '/' ); return $lv; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetLastVote()\n\t{\n\t\t$expires = 0; //Expired\n\t\tsetcookie('lastVote', 0, $expires, '/' );\n\t\treturn true;\n\t}", "function add_Cookie() {\n setcookie(\"last_visit_time\", date(\"r\"), time()+60*60*24*30, \"/\");\n}", "function set_new_cookie() {\n //setting your cookies there\n ...
[ "0.6679427", "0.6629978", "0.64555734", "0.6446804", "0.6305598", "0.62409097", "0.6231045", "0.6188821", "0.6090969", "0.60249096", "0.60074085", "0.5959636", "0.59503967", "0.5866495", "0.58633405", "0.58493716", "0.5843127", "0.5832707", "0.58130395", "0.57866895", "0.5739...
0.8328805
0
Gets last vote from cookie
Получает последний голос из куки
public function getLastVote() { //Return cookie if it is set, or return false return (isset($_COOKIE['lastVote'])) ? $_COOKIE['lastVote'] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLastVote()\n\t{\n\t\t$lv = time();\n\t\t$expires = $lv + (60*60*24); //Expires in one day\n\t\tsetcookie('lastVote', $lv, $expires, '/' );\n\t\treturn $lv;\n\t}", "public function resetLastVote()\n\t{\n\t\t$expires = 0; //Expired\n\t\tsetcookie('lastVote', 0, $expires, '/' );\n\t\treturn true;...
[ "0.7977059", "0.60345834", "0.6022496", "0.59936965", "0.5824827", "0.5700443", "0.56910175", "0.56524825", "0.5528183", "0.5520134", "0.54427814", "0.54037374", "0.5386165", "0.53766555", "0.5373472", "0.5350578", "0.53491604", "0.53116137", "0.53092235", "0.5286656", "0.528...
0.7960764
1
OneToMany (owning side) Get fkImaConfiguracaoBbContas
OneToMany (сторона, владеющая связью) Получить fkImaConfiguracaoBbContas
public function getFkImaConfiguracaoBbContas() { return $this->fkImaConfiguracaoBbContas; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFkImaConfiguracaoBanparaLocais()\n {\n return $this->fkImaConfiguracaoBanparaLocais;\n }", "public function AefCondominios() {\n\t\treturn $this->hasOne('AefCondominios', 'idavaluoenfoquefisico', 'idavaluoenfoquefisico');\n\t}", "public function getFkPessoalConfiguracaoFerias()\...
[ "0.69482267", "0.66941375", "0.6686256", "0.6655402", "0.6621377", "0.65071917", "0.6431689", "0.64292485", "0.64132905", "0.6401733", "0.6361856", "0.6350259", "0.63292956", "0.6321764", "0.6287117", "0.62529093", "0.62529093", "0.62529093", "0.62529093", "0.62529093", "0.62...
0.7487151
0
ManyToOne (inverse side) Get fkMonetarioBanco
ManyToOne (обратная сторона) Получить fkMonetarioBanco
public function getFkMonetarioBanco() { return $this->fkMonetarioBanco; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFkMonetarioAcrescimo()\n {\n return $this->fkMonetarioAcrescimo;\n }", "function get_relation_fk($attr, $tabla){\n $relacion = $tabla->get_relationship($attr);\n if (count($relacion->foreign_key) < 2){\n $fk = null;\n if (count($relacion->foreign_key) > 0)\n ...
[ "0.66757464", "0.66349393", "0.65649337", "0.656323", "0.656323", "0.656323", "0.656323", "0.656323", "0.6540917", "0.6540917", "0.6522565", "0.64901185", "0.645436", "0.64284754", "0.6412737", "0.63421696", "0.6303741", "0.6190677", "0.6174283", "0.6171998", "0.61468804", ...
0.794964
0
Company fields for Profile Page
Поля компании для страницы профиля
function svbk_rcp_profile_company_fields() { ?> </fieldset> <fieldset id="billing-info"> <legend><?php esc_html_e( 'Billing Info', 'svbk-rcp-company-details' ); ?></legend> <?php svbk_rcp_print_company_fields(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function profile_company()\n {\n $data['data'] = $this->M_crud->read('tbl_pt')[0];\n $this->render('admin/parameter/v_profile', $data);\n }", "protected function setCompanyProfile()\r\n {\r\n }", "public function actionProfile()\n {\n \t$post = Yii::$app->request->post();\n $id_user ...
[ "0.75844175", "0.7080708", "0.6731037", "0.6676098", "0.6661708", "0.657145", "0.64433557", "0.64432096", "0.6414928", "0.641369", "0.641233", "0.64027727", "0.6398572", "0.637925", "0.63749963", "0.6358876", "0.63399976", "0.63197166", "0.62998277", "0.62927574", "0.627299",...
0.7579837
1
Require first and last names during registration
Требовать имя и фамилию при регистрации
function svbk_rcp_require_first_and_last_names( $posted ) { if( is_user_logged_in() ) { return; } if( empty( $posted['rcp_user_first'] ) ) { rcp_errors()->add( 'first_name_required', __( 'Please enter your first name', 'svbk-rcp-company-details' ), 'register' ); } if( empty( $posted['rcp_user_last'] ) ) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validForCreation($first_name, $last_name, $email, $password);", "public function supportsFirstName()\n {\n }", "function register_user($email, $first_name, $last_name)\r\n\t{\r\n\t\t\r\n\t}", "public function testValidationForFirstNameAndLastName(): void\n {\n foreach (['first...
[ "0.706298", "0.68355477", "0.6824007", "0.67326415", "0.6552442", "0.6431385", "0.62396437", "0.62060946", "0.6194434", "0.61697656", "0.61638963", "0.6157685", "0.6147616", "0.6143126", "0.6136986", "0.6134321", "0.611893", "0.61076224", "0.6064954", "0.6062409", "0.60525", ...
0.75668764
0
Require the 5 billing data inputs during registration in any case
Требуется предоставление 5 данных для расчета платежей при регистрации в любом случае
function svbk_rcp_require_billing_data( $posted ) { if( is_user_logged_in() ) { return; } if( empty( $posted['rcp_billing_address'] ) ) { rcp_errors()->add( 'billing_address_required', __( 'Please enter your billing address', 'svbk-rcp-company-details' ), 'register' ); } if( empty( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validateBillingFields() {\n $valid = TRUE;\n $params = $card_errors = [];\n $payment_processor_id = NestedArray::getValue($this->data, ['contribution', '1', 'contribution', '1', 'payment_processor_id']);\n\n $processor = Civi\\Payment\\System::singleton()->getById($payment_processor_id...
[ "0.65175265", "0.6156021", "0.61321026", "0.6122726", "0.60726357", "0.60655874", "0.60625356", "0.60427177", "0.6038066", "0.60130227", "0.59464896", "0.5933224", "0.5918469", "0.5918469", "0.5887123", "0.5885657", "0.58764446", "0.58480275", "0.58376676", "0.582554", "0.582...
0.7037722
0
Require tax_id or tax_code
Требуется tax_id или tax_code
function svbk_rcp_require_one_tax_field( $posted ) { if( is_user_logged_in() ) { return; } if( empty( $posted['rcp_tax_id'] ) && empty( $posted['rcp_tax_code'] ) ) { rcp_errors()->add( 'tax_parameter_required', __( 'Please enter your tax id or tax code', 'svbk-rcp-company-details' ), '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validate($tax_number);", "public function validate_taxcode(){\n\t\t$this->db->where(array(\n\t\t\t'taxcode'\t=>\t\t$this->input->post('taxcode'),\n\t\t\t'InActive'\t\t\t=>\t\t0\n\t\t));\n\t\t$query = $this->db->get(\"taxcode\");\n\t\tif($query->num_rows() > 0){\n\t\t\treturn true;\n\t\t}else{\n\t...
[ "0.7327951", "0.6682927", "0.65619045", "0.6422432", "0.6368244", "0.62220126", "0.6204625", "0.6190958", "0.61418104", "0.6061426", "0.60453856", "0.60133195", "0.60000354", "0.5995767", "0.5995767", "0.595575", "0.5947643", "0.59308195", "0.5896835", "0.5896206", "0.5894230...
0.771103
0
Require company_name if tax_code is set
Требуется company_name, если установлен tax_code
function svbk_rcp_require_company_name_if_vat( $posted ) { if( is_user_logged_in() ) { return; } if( ( $posted['rcp_tax_id'] ) && ( empty( $posted['rcp_company_name'] ) ) ) { rcp_errors()->add( 'company_name_required', __( 'Please enter your company name', 'svbk-rcp-company-detai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function svbk_rcp_require_one_tax_field( $posted ) {\n\tif( is_user_logged_in() ) {\n\t\treturn;\n\t}\n\t\n\tif( empty( $posted['rcp_tax_id'] ) && empty( $posted['rcp_tax_code'] ) ) { \n\t rcp_errors()->add( 'tax_parameter_required', __( 'Please enter your tax id or tax code', 'svbk-rcp-com...
[ "0.6856881", "0.591195", "0.5803131", "0.5715241", "0.57002044", "0.56749195", "0.5649236", "0.56309396", "0.5546391", "0.55327797", "0.55290335", "0.5512465", "0.5495324", "0.5490289", "0.5468021", "0.54459757", "0.5438358", "0.54319847", "0.5420533", "0.53577757", "0.535185...
0.73098415
0
Gets the most recent tweet by danielle. If the most recent tweet was fetched within the last 15 minutes, then we will get the version stored in the DB otherwise, go through twitter to get the most recent tweet.
Получает последний твит danielle. Если последний твит был загружен в течение последних 15 минут, то мы получаем версию, хранящуюся в БД, иначе обращаемся к Twitter, чтобы получить последний твит.
public function get_tweet () { if (!isset($this->connection)) { $this->connection = new TwitterOAuth($this->consumer_key, $this->consumer_secret); } // Set the timeout for getting the last tweet to something low. Don't want our site speed to suffer if they // are down / havi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_twitter_recent() {\n \n $option = get_option('twitter_token');\n if (!empty($option)) {\n $content = get_transient( 'twitter_timeline' );\n if (false === get_transient('twitter_timeline')) {\n $access_token = get_option('twitter_token');\n $connection = new...
[ "0.74726844", "0.6926508", "0.64106065", "0.6341942", "0.63224584", "0.6305386", "0.62549907", "0.62323934", "0.6173008", "0.6170443", "0.6089826", "0.60716116", "0.60681045", "0.5914475", "0.59098244", "0.5882931", "0.58642596", "0.58629435", "0.5856884", "0.5844857", "0.580...
0.70052546
1
Method for retrieving Fully Qualified Domain Name
Метод для получения Полного Имени Домена
public function getFQDN() { return $this->currentAccount->getDomain() . $this->baseDomain; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toFullyQualifiedString()\n {\n if ( empty( $this->_hostName ) )\n {\n if ( \\is_null( $this->_tld ) )\n {\n return '';\n }\n return $this->_tld->toFullyQualifiedString();\n }\n if ( \\is_null( $this->_tld ) )\n {\n return...
[ "0.76874304", "0.76166433", "0.7583264", "0.749481", "0.7405301", "0.73959064", "0.73769224", "0.73704004", "0.73670006", "0.7352609", "0.735254", "0.735254", "0.735254", "0.735254", "0.727416", "0.724315", "0.7236146", "0.723159", "0.72127753", "0.72023934", "0.71652526", ...
0.7700529
0
Builds correct formatted revenue string
Строит корректную отформатированную строку выручки
public function buildRevenueString($company) { //custom this return 'REV: $0'; $y = date('Y'); if (empty($company['financial'][$y])) return 'REV: $0'; $revenue = ''; if ($company['financial'][$y] >= 1000000000) $revenue .= "Rev < $" . (int) ($company[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRevenue()\r\n\t{\r\n\t\treturn (isset($this->raw['revenue']) ? '$' . number_format($this->raw['revenue']) : null);\r\n\t}", "public function getFormattedCost():string\n {\n // Hardcoded dollar-signs should probably not be recommended. But apparently money_format doesn't work on wind...
[ "0.61813253", "0.572052", "0.54976636", "0.54470736", "0.5384709", "0.5274055", "0.52277", "0.5190602", "0.5148565", "0.5121563", "0.5100844", "0.5099027", "0.50854576", "0.5055557", "0.5049296", "0.504666", "0.504666", "0.50366354", "0.5031709", "0.5008792", "0.5007223", "...
0.7349213
0
[Update] Updates a record in a database table [Example1] Update("client", array('firstname' => 'jeff', 'lastname' => 'smith'), array('clientid' => 12345)); [Example2] Update("client", array('firstname' => 'jeff', 'lastname' => 'smith'), array('clientid' => 12345, 'firstname' => 'todd'), 'and'); The same rules apply for...
[Обновление] Обновляет запись в таблице базы данных [Пример1] Update("client", array('firstname' => 'jeff', 'lastname' => 'smith'), array('clientid' => 12345)); [Пример2] Update("client", array('firstname' => 'jeff', 'lastname' => 'smith'), array('clientid' => 12345, 'firstname' => 'todd'), 'and'); Для обоих параметров...
function Update($table, $properties, $where, $andor = "AND") { if (isset($table) && isset($properties) && isset($where)) { $andor = (strtoupper($andor) == "AND" || strtoupper($andor) == "OR") ? strtoupper($andor) : "AND"; if (!is_array($properties)) { $properties_formatt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(array $data, array $where);", "function patch(String $tableName, array $where, array $data)\n {\n $cmd = \"UPDATE {$tableName} SET \";\n\n $cmd2 = \"\";\n $cmd3 = \"\";\n\n foreach ($data as $key => $value) {\n\n $value = $this->__sanitize($value); //\n\n if ($value ...
[ "0.6758329", "0.66685927", "0.6649804", "0.6609498", "0.6607792", "0.65894836", "0.6561268", "0.65441024", "0.6533981", "0.651385", "0.65076154", "0.6504939", "0.64633536", "0.64386374", "0.6422507", "0.6420339", "0.64177614", "0.6360152", "0.6348838", "0.6347328", "0.6347033...
0.77857095
0
Retrieves the history events for the specified bug id and returns it in an array The array is indexed from 0 to N1. The second dimension is: 'date', 'username', 'note', 'change'.
Получает историю событий для указанного идентификатора бага и возвращает её в виде массива. Массив индексируется от 0 до N1. Вторая размерность: 'date', 'username', 'note', 'change'.
static function get_events_array( $p_bug_id, $p_user_id = null ) { $t_normal_date_format = \Core\Config::mantis_get( 'normal_date_format' ); $t_raw_history = \Core\History::get_raw_events_array( $p_bug_id, $p_user_id ); $t_history = array(); foreach( $t_raw_history as $k => $t_item ) { extract( $t_item, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function history_get_events_array( $p_bug_id ) {\n\t\t$t_mantis_bug_history_table = config_get( 'mantis_bug_history_table' );\n\t\t$t_mantis_user_table = config_get( 'mantis_user_table' );\n\t\t$t_history_order = config_get( 'history_order' );\n\t\t$c_bug_id = db_prepare_int( $p_bug_id );\n\n\t\t# grab history and...
[ "0.8225527", "0.7849833", "0.7460179", "0.7036332", "0.6786239", "0.6605773", "0.65989286", "0.6596797", "0.63369113", "0.6332655", "0.63186353", "0.62758815", "0.6219391", "0.61167645", "0.6085658", "0.60636336", "0.60487443", "0.60400563", "0.6024401", "0.60030407", "0.5993...
0.7982916
1
Localizes one raw history item specified by set the next parameters: $p_field_name, $p_type, $p_old_value, $p_new_value Returns array with two elements indexed as 'note' and 'change'
Локализует один элемент сырой истории, определенный следующими параметрами: $p_field_name, $p_type, $p_old_value, $p_new_value. Возвращает массив с двумя элементами, индексированными как 'note' и 'change'
static function localize_item( $p_field_name, $p_type, $p_old_value, $p_new_value, $p_linkify = true ) { $t_note = ''; $t_change = ''; $t_field_localized = $p_field_name; $t_raw = true; if( PLUGIN_HISTORY == $p_type ) { $t_note = \Core\Lang::get_defaulted( 'plugin_' . $p_field_name, $p_field_name ); $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function history_get_events_array( $p_bug_id ) {\n\t\t$t_mantis_bug_history_table = config_get( 'mantis_bug_history_table' );\n\t\t$t_mantis_user_table = config_get( 'mantis_user_table' );\n\t\t$t_history_order = config_get( 'history_order' );\n\t\t$c_bug_id = db_prepare_int( $p_bug_id );\n\n\t\t# grab history and...
[ "0.5884406", "0.58035564", "0.553148", "0.54716194", "0.54587615", "0.54123676", "0.5408785", "0.5382277", "0.5382277", "0.538039", "0.53600127", "0.53360033", "0.52992356", "0.52927685", "0.5292387", "0.52918094", "0.5216147", "0.5201529", "0.5178254", "0.5114154", "0.509665...
0.73375297
0
The function to know if the current logged user has favorited this question
Функция для определения того, добавил ли текущий авторизованный пользователь в избранное этот вопрос
public function isFavorited(){ return $this->favorites()->where('user_id', Auth()->id() )->count() > 0; //True if this user has this question as favorite }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isFavorited()\n {\n return !! $this->favorites->where('user_id', auth()->id())->count();\n }", "public function isFavorited()\n {\n return $this->favorites()->where('user_id', auth()->id())->exists();\n }", "public function isFavorited()\n {\n return $this->f...
[ "0.81178", "0.8067273", "0.8059995", "0.77749145", "0.7514834", "0.7492616", "0.7488326", "0.744487", "0.7379229", "0.71992975", "0.714867", "0.7148417", "0.7099551", "0.70976293", "0.70875746", "0.70547354", "0.703052", "0.7021585", "0.6995437", "0.69694513", "0.6854437", ...
0.85285705
0
/ Get city by id
/ Получить город по идентификатору
function get_city($id) { return $this->db->get_where('cities',array('id'=>$id))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function city_get($id){\n\t\t//cities_get_all\n\t\tif(!isset($this->cities_cache[$id]))\n\t\t\t$this->cities_get_all();\n\t\treturn $this->cities_cache[$id];\n\t\t}", "public function getCityById($id) {\r\n\t\t$this->db->select ( 'id,name,status' )->from ( TABLES::$CITY )->where ( 'id', $id );\r\n\t\t$que...
[ "0.8399288", "0.8137319", "0.81287134", "0.8076889", "0.80280864", "0.79869026", "0.7936367", "0.7751324", "0.77306145", "0.77243865", "0.77168363", "0.7626651", "0.76158273", "0.76108384", "0.7584547", "0.7571627", "0.7511178", "0.74916905", "0.74246246", "0.74066585", "0.74...
0.81444484
1
/ Get all cities count
/ Получить количество всех городов
function get_all_cities_count() { $this->db->from('cities'); return $this->db->count_all_results(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotalCities(){\n $cities_count = City::count();\n return $cities_count;\n }", "function osc_count_cities($region = '%%%%') {\n if ( !View::newInstance()->_exists('cities') ) {\n View::newInstance()->_exportVariableToView('cities', Search::newInstance()->listC...
[ "0.83928347", "0.80327904", "0.7734457", "0.7532801", "0.7520794", "0.7219639", "0.7217457", "0.7085715", "0.7077791", "0.6986749", "0.69524616", "0.6949964", "0.68794554", "0.68660486", "0.6816191", "0.6780959", "0.6775546", "0.66940325", "0.6630603", "0.6630603", "0.6629299...
0.867983
0
/ function to delete city
Функция для удаления города
function delete_city($id) { return $this->db->delete('cities',array('id'=>$id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function m_deleteCity()\n {\n $this->obDb->query = \"DELETE FROM \".POSTAGECITY. \" WHERE iCityId=\".$this->request['id'];\n $this->obDb->updateQuery();\n $this->obDb->query =\"DELETE FROM \".POSTAGECITYDETAILS. \" WHERE fCityId=\".$this->request['id']; \n $this->obDb->updateQuery();\n $this->lib...
[ "0.82674223", "0.78262186", "0.7399135", "0.73722994", "0.73103297", "0.7209173", "0.7111206", "0.6902246", "0.688407", "0.6872729", "0.6855999", "0.6719775", "0.6692767", "0.6691226", "0.6666265", "0.66403675", "0.6579353", "0.65280306", "0.6525741", "0.6522137", "0.65204823...
0.7924033
1
Create Dealer from data.
Создать дилера из данных.
public function fromData($data): Dealer { $entity = $this->repository->findOneBy(['slug' => $data['slug']]); if (!$entity) { $entity = new Dealer(); } $entity->setAddress1($data['address1']); $entity->setAddress2($data['address2']); $entity->setCity($data['city']); $entity->setComme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _populateDealer()\n {\n return $this->dealer->create($this->dealerData);\n }", "private function _populateDealer()\n {\n return $this->dealer->create($this->dealerData);\n }", "public function create_from_data($data)\n {\n }", "public function createFr...
[ "0.73418605", "0.73418605", "0.649627", "0.64218163", "0.6299556", "0.62186587", "0.5962731", "0.5855455", "0.58390206", "0.5805665", "0.5790733", "0.5708594", "0.5661895", "0.56338626", "0.5631391", "0.5617177", "0.5606225", "0.55958045", "0.5593631", "0.5578464", "0.5559697...
0.74751127
0
METHOD NEEDS_COMPILING Gets the most recently modified file in the scss directory and compares that do the most recently modified css file. If scss is greater, we assume that changes have been made and compiling needs to occur to update css.
МЕТОД NEEDS_COMPILING получает наиболее недавно измененный файл в директории scss и сравнивает его с наиболее недавно измененным файлом css. Если scss более свежий, мы предполагаем, что были внесены изменения и требуется компиляция для обновления css.
public function needs_compiling() { if (defined('WP_SCSS_ALWAYS_RECOMPILE') && WP_SCSS_ALWAYS_RECOMPILE) { return true; } $latest_scss = 0; $latest_css = 0; foreach ( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->scss_dir)) as $sfile ) { if (pathinfo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function scss_is_changed(){\n\n $hash_file_location = $this->get_css_directory().\"/\".$this->get_handle().\"-hash.txt\";\n if (!file_exists($hash_file_location)){\n file_put_contents ($hash_file_location, \"No cache yet\" );\n }\n\n $hash_file = fo...
[ "0.7010358", "0.67493665", "0.65575355", "0.6215404", "0.6205371", "0.61586255", "0.6109274", "0.6062246", "0.59358937", "0.59334695", "0.5896198", "0.5888152", "0.5869218", "0.5858981", "0.5849984", "0.57904315", "0.5746831", "0.57447433", "0.5714921", "0.5689801", "0.567018...
0.7720474
0
Fetches the enum type options for a specific field
Получает варианты типа enum для конкретного поля
function enumOptions($model, $field) { $cacheKey = $model->alias . '_' . $field . '_enum_options'; $options = Cache::read($cacheKey); if (!$options) { $sql = "SHOW COLUMNS FROM `{$model->useTable}` LIKE '{$field}'"; $enumData = $model->query($sql); $options = false; if (!empty($enu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnumOptions($table, $field) {\n $finalResult = array();\n if (strlen(trim($table)) < 1)\n return false;\n $query = $this->db->select(\"show columns from $table\");\n foreach ($query as $row) {\n if ($field != $row[\"Field\"])\n con...
[ "0.7142582", "0.6797398", "0.6760626", "0.6739651", "0.6699409", "0.6669175", "0.665851", "0.66048276", "0.64530927", "0.6341222", "0.6320572", "0.63200665", "0.6316048", "0.6222062", "0.61347085", "0.5998604", "0.59664357", "0.59636915", "0.5943504", "0.5926038", "0.5911146"...
0.77802396
0
Convert an Address entity into an assoc array
Преобразовать сущность Address в ассоциативный массив
public function convertEntityToArray(Address $address) { return [ "id" => $address->getId(), "name" => $address->getName(), "phone" => $address->getPhone(), "street" => $address->getStreet() ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray()\n {\n return $this->address;\n }", "protected function _getConvertedAddress(Mage_Sales_Model_Order_Address $address) \n {\n $company = $address->getCompany();\n $company = ! empty($company)\n ? $address->getCompany()\n : $address->getF...
[ "0.7011926", "0.6982761", "0.6964127", "0.68238", "0.67725104", "0.6621031", "0.66113305", "0.65818256", "0.65554166", "0.6420437", "0.6330839", "0.6318374", "0.6304093", "0.6294395", "0.6254329", "0.6239474", "0.6160689", "0.6155102", "0.6116932", "0.60889536", "0.60540235",...
0.7484606
0
Handles GET requests for validating a users authentication code. If the request is successful a JSON object and HTTP_OK (200) returned otherwise HTTP_NOT_FOUND response code.
Обрабатывает GET-запросы для проверки кода аутентификации пользователя. Если запрос успешен, возвращается JSON-объект и HTTP_OK (200), в противном случае — код ответа HTTP_NOT_FOUND.
function validate_user_code_get() { $code= $this->get('code'); $validation_successful = $this->user_model->validate_user($code); if($validation_successful) { $this->response($validation_successful, 200); } else { $this->response(NU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkCode()\n {\n if (!$this->mobile)\n return response()->json(['status' => false, 'message' => config('constants.server.message.mobileNumberWrong')], 405);\n if ($user = User::createOrGetDeviceWithMobile($this->mobile))\n return $user;\n return respon...
[ "0.6963022", "0.652569", "0.6443468", "0.6433307", "0.6319588", "0.61880195", "0.6167138", "0.6093032", "0.6086505", "0.6032333", "0.59770536", "0.5962615", "0.5925429", "0.5908233", "0.588196", "0.5857752", "0.584353", "0.584041", "0.58343816", "0.58343023", "0.5792848", "...
0.7712612
0
Find the active jobitem by ID
Найдите активный jobitem по ID
public function findJobItemById($id) { try { return $this->model->ActiveJobitem()->findOrFail($id); } catch (ModelNotFoundException $e) { throw new JobItemNotFoundException($e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveJob($id)\n {\n $query = $this->createQueryBuilder('j')\n ->where('j.id = :id')\n ->setParameter('id', $id)\n ->andWhere('j.expires_at > :date')\n ->setParameter('date', date('Y-m-d H:i:s', time()))\n ->andWhere('j.isActivated...
[ "0.7232965", "0.69189715", "0.6710756", "0.6581084", "0.6467081", "0.6416556", "0.6235097", "0.61767215", "0.61629945", "0.60998315", "0.6090521", "0.60792154", "0.60792154", "0.60577375", "0.60495335", "0.6036931", "0.6032232", "0.6021733", "0.60210055", "0.6002975", "0.6002...
0.7404048
0
Sets and/or returns the Config object to be used during the client session If $config parameter is left out or set to null, then system will create an empty Config object and return it so config settings can be set. If $config object provided then that Config object will be used. This object is also returned back so it...
Устанавливает и/или возвращает объект Config, который будет использоваться в течение сессии клиента. Если параметр $config не указан или установлен в null, система создаст пустой объект Config и вернет его, чтобы можно было задать настройки config. Если предоставлен объект $config, то будет использоваться этот объект C...
public function config($config = null) { if ($config === null) { $this->_config = new Config(); } else { $this->_config = $config; } return $this->_config; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setConfig($config)\n {\n self::$config = $config;\n\n return self::$config;\n }", "private function setConfig ( $config ) {\n\t\t$this->_config = (object)$config ;\n\t\treturn ($this);\n\t}", "public function config($config = NULL)\n\t{\n\t\tif ($config === NULL)\n\t\...
[ "0.7545265", "0.71583915", "0.71422935", "0.70905524", "0.708963", "0.70820713", "0.69978994", "0.6962237", "0.69205916", "0.6862032", "0.6805692", "0.6805692", "0.6805692", "0.6769408", "0.67141753", "0.67141753", "0.67141753", "0.6575523", "0.6563464", "0.6505462", "0.64172...
0.75398904
1
Returns the Replication Controllers api endpoint object
Возвращает объект конечной точки API контроллеров репликации
public function replicationControllers() { if ($this->_podsEndpointObject === null) { $podsClass = "\\DevStub\\KubernetesAPIClient\\Endpoint\\".$this->_config->getAPIVersion()."\\ReplicationControllers"; if (class_exists($podsClass)) { $this->_podsEndpointObject = new $po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApiEndpoint();", "public function getAPI()\r\n {\r\n return Controllers\\APIController::getInstance();\r\n }", "public function getApiEndpoint()\n {\n return $this->apiEndpoint;\n }", "public function getApiEndpoint()\n {\n return $this->apiEndpoint;\n ...
[ "0.70062965", "0.6460677", "0.6253666", "0.6253666", "0.62270904", "0.6137644", "0.6129306", "0.61123425", "0.61123425", "0.61123425", "0.5982488", "0.59606045", "0.59606045", "0.5908525", "0.5884333", "0.5864582", "0.58310163", "0.57941055", "0.57920235", "0.57920235", "0.57...
0.73781806
0
Returns whether the Subscription is active or not.
Возвращает, активна ли подписка или нет.
public function isActive() { return $this->status === SubscriptionStatus::STATUS_ACTIVE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasActiveSubscription()\n {\n return (bool) $this->activeSubscription();\n }", "public function getActive()\n {\n // and has a non expired subscription\n $enabled = $this->enabled === TRUE;\n $active = $this->getActiveSubscription();\n if ( empty( $act...
[ "0.8973386", "0.851116", "0.8328698", "0.82554895", "0.8130549", "0.80076075", "0.7947685", "0.77800214", "0.7733604", "0.77070946", "0.7690027", "0.7613961", "0.7602234", "0.7573308", "0.7569729", "0.7538227", "0.75352746", "0.7512684", "0.7510592", "0.7491354", "0.7491354",...
0.89544016
1
Returns whether the Subscription is pending or not.
Возвращает значение, указывающее, находится ли подписка в ожидании или нет.
public function isPending() { return $this->status === SubscriptionStatus::STATUS_PENDING; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPending()\n {\n return (bool)$this->get('pending');\n }", "public function isPending()\n {\n return ($this->status === self::PENDING);\n }", "public function isPending()\n {\n return $this->status === 'pending';\n }", "public function isPending()\n ...
[ "0.82729256", "0.82298756", "0.820862", "0.81861883", "0.8167426", "0.81555396", "0.8057018", "0.8037108", "0.7940099", "0.7934648", "0.79123795", "0.79048216", "0.78754056", "0.7874684", "0.78061056", "0.7805858", "0.7705306", "0.76067287", "0.75823176", "0.7571684", "0.7570...
0.9027637
0
Returns whether the Subscription is canceled or not.
Возвращает значение, указывающее, отменена ли подписка.
public function isCanceled() { return $this->status === SubscriptionStatus::STATUS_CANCELED; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canceled()\n {\n return $this->status == \\Stripe\\Subscription::STATUS_CANCELED;\n }", "public function isCanceled() : bool\n {\n return $this->is_canceled;\n }", "public function isCancelRequested(){\n\t\treturn $this->getSubscription()->getCancelRequest() == 1;\n\t}...
[ "0.8643713", "0.8178573", "0.81278586", "0.8101545", "0.8063109", "0.7953094", "0.7953094", "0.7892926", "0.78561115", "0.7853562", "0.78191227", "0.77890116", "0.7748151", "0.76953465", "0.76742506", "0.764666", "0.7566797", "0.7512863", "0.75117034", "0.75079757", "0.750328...
0.87847227
0
Returns whether the Subscription is suspended or not.
Возвращает, приостановлен ли подписка.
public function isSuspended() { return $this->status === SubscriptionStatus::STATUS_SUSPENDED; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSuspended()\n {\n return (bool) $this->suspended;\n }", "public function isSuspended()\n {\n if ($this->suspended and $this->suspended_at)\n {\n return (bool) $this->suspended;\n }\n return false;\n }", "public function getSuspended()\...
[ "0.8300189", "0.8110253", "0.8010684", "0.7695112", "0.75633425", "0.7515775", "0.740981", "0.7251278", "0.7236776", "0.7110449", "0.703969", "0.69211626", "0.6917602", "0.68576115", "0.6632775", "0.6621785", "0.6613879", "0.66106373", "0.6595816", "0.6523716", "0.646991", ...
0.8724911
0
Returns whether the Subscription is completed or not.
Возвращает true, если подписка завершена, и false в противном случае.
public function isCompleted() { return $this->status === SubscriptionStatus::STATUS_COMPLETED; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isCompleted()\n {\n return $this->status == self::COMPLETED;\n }", "public function isCompleted()\n {\n return $this->status == self::STATUS_COMPLETED;\n }", "public function isCompleted(): bool\n {\n return $this->completed;\n }", "public function isCom...
[ "0.7845531", "0.7815618", "0.781542", "0.776315", "0.7732061", "0.76942927", "0.76824677", "0.76527715", "0.75750947", "0.7574415", "0.7573872", "0.7556175", "0.75269747", "0.7489868", "0.74854785", "0.7476529", "0.7463273", "0.7454803", "0.7454803", "0.73870826", "0.73870826...
0.8638112
0
Simply returns an empty string
Просто возвращает пустую строку
public static function emptyString() { return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __return_empty_string()\n{\n}", "public function doNothing()\n\t{\n\t\treturn '';\n\t}", "function noop($texte) {\r\n return '';\r\n}", "public function getEmptyValue() {\n return '';\n }", "public function renderEmpty()\n {\n return $this->emptyText;\n }", "public static...
[ "0.80707926", "0.7517704", "0.7242834", "0.7210675", "0.71459025", "0.7101012", "0.7059472", "0.6891767", "0.6836431", "0.6789688", "0.6740161", "0.666302", "0.6629394", "0.66169477", "0.65858835", "0.65637046", "0.6544446", "0.65380263", "0.65024173", "0.64842945", "0.648414...
0.82603157
0
Adds the "Stats Report" link to the admin menu under "Tools".
Добавляет ссылку "Отчет по статистике" в меню администратора под разделом "Инструменты".
public function add_to_menu() { add_submenu_page( 'plugin-tools', __( 'Stats Report', 'wporg-plugins' ), __( 'Stats Report', 'wporg-plugins' ), 'plugin_review', 'statsreport', array( $this, 'show_stats' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function data_Admin_Statistics() {\n\t\t$this->html_elements->Draw_H1('Statistics');\n\t\t\n\t\t$this->html_elements->Draw_DivStart('block_area_2', '');\n\t\t\t$this->html_elements->Draw_HyperLink($this->setUrl('admin'), '&larr; Administration', 'list_link_back');\n\t\t$this->html_elements->Draw_DivEnd();\n\t\t\n\...
[ "0.71285623", "0.702035", "0.68757725", "0.6803168", "0.6747592", "0.6745352", "0.6659416", "0.6617764", "0.6591148", "0.6483557", "0.6482016", "0.6479406", "0.6427055", "0.6414438", "0.64074755", "0.637514", "0.6364803", "0.6338307", "0.6307389", "0.6292627", "0.62864584", ...
0.79872775
0
Gets relative difference between time and next time
Получает относительную разницу между временем и следующим временем
public function get_relative_diff($next_time) { $this->_next_time = $next_time; if ($this->post_just_created()) return __('just now!'); return $this->get_date_diff(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function deltaT() : int\n {\n return $this->end->time - $this->start->time;\n }", "public function _getDiffTime() {\r\n\treturn ($this->_getmicrotime() - $this->_timeStart);\r\n }", "private static function getRelativeTime(): float\n {\n $startTime = STARTTIME;\n $time ...
[ "0.70638025", "0.68853146", "0.6793391", "0.6552511", "0.65004617", "0.6383621", "0.6247695", "0.62292355", "0.62034357", "0.61006355", "0.60995245", "0.60759556", "0.60696006", "0.6064637", "0.60239714", "0.5953475", "0.5952413", "0.5924339", "0.591108", "0.5893944", "0.5835...
0.74278027
0
Checks if the post just created or not
Проверяет, был ли пост создан только что
private function post_just_created() { return ($this->_next_time - $this->_time) <= 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postExists()\n {\n if ($this->getPostId()) {\n return true;\n }\n\n return false;\n }", "public function hasNewPosts()\n {\n if ($this->last_post == null) return false;\n\n $last_access = session('last_access_time');\n if (!$last_acces...
[ "0.7263676", "0.7040495", "0.70151323", "0.69847244", "0.6898531", "0.6866385", "0.68643236", "0.67994636", "0.67876303", "0.6774669", "0.6761555", "0.6756942", "0.6748392", "0.6743676", "0.6742477", "0.6707714", "0.665686", "0.6620541", "0.65820843", "0.6562573", "0.65317017...
0.77005136
0
Get sessions by game id
Получить сессии по идентификатору игры
public function getSessionByGameId($gameId) { $sessionsId = []; foreach ($this->getSessionList() as $sessionId => $infos) { if (isset($infos['game_id']) && $infos['game_id'] == $gameId) { $sessionsId[] = $sessionId; } } return $sessionsId; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sessions_from_id($id)\n {\n $table = $this->return_sessions_table();\n $this->db->where(\"id\",$id);\n $query = $this->db->get($table);\n foreach ($query->result() as $key => $value) {\n $sessions = $value->sessions_name;\n return $sessions;\n }\n \n ...
[ "0.7336591", "0.67402303", "0.6719687", "0.6623581", "0.6619175", "0.6615343", "0.65944266", "0.65641373", "0.65158135", "0.6494767", "0.646123", "0.6423296", "0.64123917", "0.6405195", "0.6405195", "0.63928056", "0.6367183", "0.63216054", "0.62572837", "0.6243017", "0.623498...
0.74387944
0
Get Sessions by team
Получить сессии по команде
public function getSessionsByTeam($gameId, $team) { $sessionsId = []; foreach ($this->getSessionList() as $sessionId => $infos) { if (isset($infos['team'], $infos['game_id']) && $infos['game_id'] == $gameId && $infos['team'] === $team) { $sessionsId[] = $sessionId; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTeams($team_id, $session = []) {\n $teams = new Teams();\n $ids = json_decode($team_id);\n $teams = $teams->whereIn('team_id', $ids)->get();\n\n if (count($session) != 0) {\n $teams = $teams->map(function($r) use ($session){\n if (in_array($r...
[ "0.6847271", "0.6214923", "0.61040586", "0.60823363", "0.6013633", "0.5973475", "0.5886302", "0.5883194", "0.58737093", "0.5873008", "0.5855991", "0.5850361", "0.5838879", "0.5835622", "0.57948977", "0.5727574", "0.5727024", "0.5715891", "0.57145196", "0.57044595", "0.5696567...
0.72763234
0
Defines what information shall be shown when discount objects are printed
Определяет, какая информация должна отображаться при печати объектов скидок
public function __toString() { $info = "<strong>DISCOUNT INFORMATION</strong><br>"; $info .= "<strong>Description:</strong> " . $this->getDescription(); $info .= " <strong>Period:</strong> " . $this->getStartDate() . "-" . $this->getEndDate(); $info .= " <strong>Discount Value:</strong>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show (Discount $discount){\n //\n }", "public function show(Discount $discount)\n {\n //\n }", "public function getDrinkInfo() : void\n {\n $fullPrice = $this->getDrinkPrice();\n $fullRecipe = $this->getDrinkRecipe();\n\n echo \"Name: \" . $this->n...
[ "0.66159266", "0.6491491", "0.6474838", "0.64226997", "0.6404138", "0.63227594", "0.6273908", "0.6269454", "0.6260804", "0.6194112", "0.61508375", "0.61503035", "0.61436796", "0.6128281", "0.6119837", "0.6116942", "0.60969734", "0.6077885", "0.6062707", "0.6043693", "0.602406...
0.7053518
0
create all mock pages controllers
создать все контроллеры для мок-страниц
public function createMockPagesControllers(Application $app) { foreach ($this->pages as $route => $config) { call_user_func(array($app, $config['method']), $config['url'], function (Request $request, Application $app) use ($config) { $variables = array_merge($request->get('_route...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp()\n {\n $this->class_object = $this->newController('Website_controller');\n }", "protected function setUp()\n {\n $objectManager = new ObjectManager($this);\n\n $this->resultPageFactoryMock = $this->getMock(PageFactory::class, ['create'], [], '', false);\n ...
[ "0.67053163", "0.64370453", "0.64177567", "0.6411977", "0.641166", "0.6362454", "0.6337456", "0.61574316", "0.61183184", "0.60934794", "0.60866636", "0.6083451", "0.60222524", "0.5989862", "0.59472215", "0.592319", "0.5921147", "0.5910861", "0.58699244", "0.5869651", "0.58595...
0.7250844
0
Get Form action url
Получить URL действия формы
public function getFormAction(){ return $this->getUrl(self::URL_PATH); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormAction()\n {\n return $this->getUrl('worksample/index/post', ['_secure' => true]);\n }", "public function getFormAction() {\n return $this->getUrl('Survey/Index/answerHandle');\n }", "public function getFormAction()\n {\n return $this->getUrl('scontact/in...
[ "0.81749946", "0.8141663", "0.8121961", "0.79717565", "0.7956361", "0.79425985", "0.7906794", "0.78125465", "0.7743817", "0.7701883", "0.7653467", "0.75303286", "0.75241184", "0.7454058", "0.73861426", "0.73667485", "0.7354788", "0.73542076", "0.73496664", "0.7223346", "0.720...
0.8734685
0
/ This custom shortcode creates a bootstrap button. The type can be one of: (1, 2), which will determine primary/secondary.
// Этот пользовательский короткий код создает кнопку bootstrap. Тип может быть одним из: (1, 2), который определит основной/второстепенный.
function button_function( $atts, $content = null ) { extract(shortcode_atts(array( 'link' => '#', 'type' => '1' ), $atts)); $return_string = '<a href="'; // link if( $link ) $return_string .= $link; else $return_string .= '#'; // primary or secondary if( $typ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buttons( $atts, $content = null ) {\n extract( shortcode_atts( array(\n 'type' => 'default', /* primary, default, info, success, danger, warning, link */\n 'size' => 'default', /* xs, sm, lg */\n 'url' => '',\n 'text' => '',\n ), $atts ) );\n\n if($type == \"default\"){\n $typ...
[ "0.7654626", "0.7400136", "0.73692024", "0.7263223", "0.7245084", "0.7191287", "0.7185036", "0.7180647", "0.7133116", "0.7130563", "0.7060133", "0.7040757", "0.6909171", "0.68868655", "0.68824685", "0.68458605", "0.68218964", "0.6715816", "0.6683038", "0.662804", "0.6627192",...
0.7890016
0
/ 'button' is how the shortcode is called e.g. [button]
'button' — это то, как называется короткий код, например, [button]
function register_button_shortcode(){ add_shortcode('button', 'button_function'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_button( $attr, $content='' ) {\n\t$attrs = shortcode_atts(\n\t\tarray(\n\t\t\t'css_class' => 'btn-default',\n\t\t\t'inline_css' => '',\n\t\t\t'href' => '',\n\t\t\t'new_window' => false,\n\t\t\t'ga_interaction' => '',\n\t\t\t'ga_category' => '',\n\t\t\t'ga_action' => '',\n\t\t\t'ga_label' => ''\n\t\t),\...
[ "0.81446195", "0.81339484", "0.8083203", "0.80753136", "0.8058218", "0.80559784", "0.8029399", "0.79300797", "0.78461426", "0.77853656", "0.7782431", "0.7761354", "0.77405995", "0.7718494", "0.76792365", "0.7647846", "0.76211643", "0.7554989", "0.75335664", "0.7516487", "0.75...
0.82203627
0
/ Initialize process for registering your custom TinyMCE buttons callback
/ Инициализация процесса регистрации вашей пользовательской функции обратного вызова TinyMCE кнопок
function sh_custom_shortcode_button_init_callback() { //If the user can not see the TinyMCE please stop early if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') && get_user_option('rich_editing') == 'true') { return; } //Add a callback request to register the tinymce p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function button_init() {\n\t\tadd_filter( 'mce_buttons', array( $this, 'register_button' ) );\n\t\tadd_filter( 'mce_external_plugins', array( $this, 'add_button' ) );\n\t}", "function tnihs_shortcode_button_init() {\n\n //Abort early if the user will never see TinyMCE\n if ( ! current_user_can( 'edit_po...
[ "0.7895041", "0.7632937", "0.73987836", "0.7287548", "0.7195151", "0.7167147", "0.7100785", "0.7006089", "0.7005802", "0.7002066", "0.69595283", "0.69341046", "0.6861002", "0.6815792", "0.6786373", "0.67754376", "0.6754725", "0.6739731", "0.6698024", "0.666672", "0.663296", ...
0.7688439
1
Adds a property to the file properties
Добавляет свойство в свойства файла
public function addFileProperty($property, $value): void { $this->fileProperties[$property] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addProperty($property);", "function set($property, $value) {\n\t\t\t$this->properties[$property] = $value;\n\t\t\t\n\t\t\tif($property == 'valid_extensions')\n\t\t\t\t$this->properties['extensions_mod'] = implode(';', explode(',', $this->properties['valid_extensions']));\n\t\t}", "public functi...
[ "0.69175076", "0.6733257", "0.66663575", "0.65527326", "0.6343162", "0.63370544", "0.6321071", "0.6302644", "0.627797", "0.62172806", "0.6158517", "0.6153661", "0.61175495", "0.6037512", "0.6008018", "0.5987337", "0.5962935", "0.59248227", "0.59248227", "0.59248227", "0.59248...
0.8027898
0
Adds property metadata to the class
Добавляет метаданные свойства классу
public function addPropertyMetadata(PropertyMetadata $metadata): void { $this->properties[$metadata->name] = $metadata; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add(PropertyMetadata $property): void;", "public function setMetaData()\n {\n $meta = get_post_custom( $this->ID);\n\n foreach ($meta as $key => $value) {\n $metaPrefixPosition = strripos($key, $this->_metaprefix);\n if($metaPrefixPosition !== false ){\n ...
[ "0.70240796", "0.6345339", "0.63431984", "0.62856454", "0.59471214", "0.5928344", "0.580981", "0.57991606", "0.57966644", "0.5795813", "0.5751786", "0.5748051", "0.5745842", "0.5706636", "0.56415945", "0.56162083", "0.56021047", "0.5565554", "0.55590105", "0.5547491", "0.5543...
0.73217213
0
Adds method metadata to the class
Добавляет метаданные метода к классу
public function addMethodMetadata(MethodMetadata $metadata): void { $this->methods[$metadata->name] = $metadata; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function withMethod($method)\n\t{\n\t}", "abstract public function registerMethods();", "public function withMethod(string $method);", "public function withMethod(string $method);", "private function buildMethodEntry( PhpClass $class, PhpMethod $method ){\n\t\t$attributes\t= array();\n\n\t\t$attribu...
[ "0.61283726", "0.60841155", "0.605773", "0.605773", "0.60208106", "0.5938546", "0.5938546", "0.5938546", "0.58784753", "0.5811847", "0.57897764", "0.5757884", "0.5733218", "0.5730426", "0.5728213", "0.57043713", "0.5672722", "0.5639902", "0.56320554", "0.5631762", "0.5619204"...
0.78838205
0
Fim getConfirmacaoDetalhe LISTA CONFIRMACAO
Fim getConfirmacaoDetalhe СПИСОК ПОДТВЕРЖДЕНИЯ
public static function getListaConfirmacao() { //instaciando $mapuracao = new MApuracao; $validacao = new Validacao; //Recupera todos os dados do banco $listaConfirmacao = $mapuracao->listConfirmacaoCompleta(); //Pega o tamanho do arry para usar no for $tamanhoArray = count($listaConfirmacao); //Es...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listarNaoConfirmados(){\n $sql = 'select * from cancelamento where confirmacao is null';\n\n //Abrindo conexão com o BD\n $PDO_conex = $this->conex->connectDataBase();\n\n //executa o script de select no bd\n $select = $PDO_conex->query($sql);\n $cont = 0;\...
[ "0.71884304", "0.6359246", "0.632059", "0.619063", "0.61725026", "0.61659944", "0.61561954", "0.61175954", "0.61106294", "0.60963464", "0.6088561", "0.60776323", "0.6075573", "0.6070669", "0.60239416", "0.6006714", "0.59768635", "0.5976213", "0.59704363", "0.59382534", "0.593...
0.7056695
1
listReservedIPs List all Reserved IPs in your account.
listReservedIPs Перечислить все зарезервированные IP-адреса в вашем аккаунте.
public function listReservedIPs() { return $this->api->makeAPICall('GET', $this->api::RESERVED_IPS_URL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadReservedIPs()\n {\n $ipa = json_decode($this->listReservedIPs(), true);\n foreach ($ipa['reserved_ips'] as $key) {\n $id = $key['id'];\n $this->ids[] = $id;\n $this->reservedIP[$id] = $key;\n }\n $this->total_reserved_ips = $ipa['m...
[ "0.61491734", "0.5944219", "0.58139294", "0.5704621", "0.5579828", "0.5486939", "0.5466271", "0.54490185", "0.54338646", "0.5409642", "0.5351556", "0.52969724", "0.52524346", "0.5215705", "0.516248", "0.5148169", "0.51010114", "0.5088719", "0.5039706", "0.50097936", "0.500116...
0.789063
0
loadReservedIPs Loads Reserved IP Information in to arrays
loadReservedIPs Загружает информацию о зарезервированных IP-адресах в массивы
public function loadReservedIPs() { $ipa = json_decode($this->listReservedIPs(), true); foreach ($ipa['reserved_ips'] as $key) { $id = $key['id']; $this->ids[] = $id; $this->reservedIP[$id] = $key; } $this->total_reserved_ips = $ipa['meta']['total'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadBannedIPs()\n\t{\n\t\t\n\t\t$this->log->info(\"loading bannedIPs\");\n\t\t$banned=file($_SERVER[\"DOCUMENT_ROOT\"].\"/../cache/bannedip.txt\");\n\t\tforeach($banned as $line)\n\t\t{\n\t\t\t$line=trim($line);\n\t\t\t$row=explode(\";\",$line);\n\t\t\t$this->bannedIPs[$row[0]]=$row[1];\n\t\t}\n\t...
[ "0.68989074", "0.67969173", "0.5945087", "0.5818932", "0.5796803", "0.5503829", "0.54691213", "0.5418455", "0.54171973", "0.5385886", "0.5367657", "0.5351613", "0.532292", "0.53219783", "0.53219783", "0.53087085", "0.53022397", "0.5293744", "0.52529764", "0.523717", "0.523717...
0.8662871
0
attachReservedIP Attach a Reserved IP to an instance_id.
attachReservedIP Привязать зарезервированный IP-адрес к экземпляру instance_id.
public function attachReservedIP($oa) { if (!isset($oa['instance_id']) || !$this->api->instances()->checkInstanceId($oa['instance_id'])) { throw new InvalidParameterException("Invalid or Missing Instance ID"); } else { $ba['instance_id'] = $oa['instance_id']; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function adminReleaseIpAddress()\n {\n $dateTime = new \\DateTime($this->dtString);\n $timeLimit = new \\DateTime(\"$this->dtString - $this->blockIpAddressesFor\");\n $this->requestCountsManager->releaseCountsForIpAddress($this->ipAddress, $dateTime, $timeLimit);\n }", "public f...
[ "0.58156383", "0.56981987", "0.5378466", "0.53463966", "0.524537", "0.5206286", "0.51978356", "0.5156731", "0.5136289", "0.51141584", "0.51124674", "0.4965532", "0.48615098", "0.4860003", "0.47620103", "0.47467858", "0.46797493", "0.46721765", "0.46560067", "0.46482402", "0.4...
0.7016291
0
checkReservedIP Checks's if an IP ID is valid or not
checkReservedIP Проверяет, является ли IP-адрес зарезервированным или нет
public function checkReservedIP($id) { if (in_array($id, $this->ids)) { return true; } else { throw new InvalidParameterException("IP Not Found"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isReserved($ip)\n {\n if (!self::isValid($ip)) {\n return false;\n }\n $ip = explode('.', $ip);\n\n $a = (int) $ip[0];\n $b = (int) $ip[1];\n $c = (int) $ip[2];\n $d = (int) $ip[3];\n\n //var_dump($ip, $a, $b, $c, $d);exit...
[ "0.75984424", "0.7071397", "0.69966066", "0.6877675", "0.6813126", "0.67456263", "0.66706973", "0.66645473", "0.6633163", "0.6588034", "0.65785617", "0.6554429", "0.650717", "0.64438725", "0.64129", "0.63996285", "0.6389891", "0.638074", "0.63688624", "0.636736", "0.6363862",...
0.7795283
0
A feature test of Class Trips. CRUD Test
Тестирование функции класса Trips. Тестирование CRUD
public function testTrip() { $this->seed(); $this->user = User::find(1); $this->createTest(); $this->last_trip_id = Trips::orderBy('id', 'desc')->get()[0]->id; $this->updateTest(); $locations = TripLocations::get(); $this->updateLocationOfTrip( $loc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test()\n {\n $this->crud->test(); \n }", "private function createTest()\n {\n $response = $this->actingAs( $this->user )->call(\n \"POST\",\n $this->URL,\n [\n \"trip_desc\" => \"Error\",\n ]\n );\n $response->asse...
[ "0.6828096", "0.64500934", "0.6394045", "0.6347423", "0.62992364", "0.6262628", "0.62071943", "0.6177055", "0.6172803", "0.61716187", "0.61449665", "0.61360335", "0.6111043", "0.6102749", "0.6093157", "0.60640633", "0.605345", "0.60533977", "0.6052639", "0.6049697", "0.604967...
0.7296865
0
Test Create Action of Trip
Тест создания действия поездки
private function createTest() { $response = $this->actingAs( $this->user )->call( "POST", $this->URL, [ "trip_desc" => "Error", ] ); $response->assertStatus(400); $response = $this->actingAs( $this->user )->call( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTrip()\n {\n $this->seed();\n $this->user = User::find(1);\n\n $this->createTest();\n $this->last_trip_id = Trips::orderBy('id', 'desc')->get()[0]->id;\n \n $this->updateTest();\n\n $locations = TripLocations::get();\n $this->updateLoca...
[ "0.66362214", "0.6361663", "0.6327554", "0.6312976", "0.6294752", "0.6276721", "0.62739986", "0.6260554", "0.6236434", "0.6236425", "0.6228556", "0.622224", "0.6156459", "0.61466146", "0.61291355", "0.61114913", "0.6089906", "0.608615", "0.60651684", "0.6026438", "0.6017499",...
0.7208241
0
Test Update Action of Trip
Тестирование обновления действия поездки
private function updateTest() { $response = $this->actingAs( $this->user )->call( "PUT", $this->URL, [ 'trip_id' => $this->last_trip_id + 1, "trip_name" => "Name+", "trip_desc" => "Has Name+", ] ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_update() {\n\n }", "public function test_update() {\n\n }", "public function testTaskUpdate()\n {\n /** @var Task $team */\n $task = Task::factory()->for(Todo::factory())->create();\n\n $name = 'Pay the heating bills';\n $response = $this->putJson(\n ...
[ "0.6731978", "0.6731978", "0.66939825", "0.6616148", "0.65937567", "0.64043015", "0.64043015", "0.63882273", "0.63444996", "0.62948", "0.6289942", "0.62806225", "0.62589353", "0.624935", "0.62392277", "0.6205575", "0.6146703", "0.6139871", "0.6109801", "0.6101562", "0.6097321...
0.76399875
0
Returns a list of all filters provided by modules.
Возвращает список всех фильтров, предоставляемых модулями.
public function getFilters() { drupal_static_reset('filter_get_filters'); return filter_get_filters(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function modules(): array\n {\n return static::filter('module');\n }", "public function getFilters();", "public function getFilters();", "public function getFilters();", "public function getFilters();", "public function getFilters();", "public function getFilters();", "publ...
[ "0.7272754", "0.7004465", "0.7004465", "0.7004465", "0.7004465", "0.7004465", "0.7004465", "0.7004465", "0.6918887", "0.6878522", "0.6874923", "0.685761", "0.68457824", "0.68457824", "0.6802428", "0.67915326", "0.6791003", "0.6768901", "0.67564195", "0.67399013", "0.67128074"...
0.71207654
1
Enable a filter on a text format.
Включить фильтр для текстового формата.
public function enableTextFilter($format_name, $filter_name) { $filters = $this->getFilters(); $format = $this->getFormat($format_name); if ($format && isset($filters[$filter_name])) { // Populate text filter object as expected by filter_format_save(). $format->filters = $this->getFormatFilter...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mt_supportedTextFilters()\n {\n }", "public function set_Filter($text) {\n $this->filter = $text;\n }", "public function disableTextFilter($format_name, $filter_name) {\n\n $filters = $this->getFilters();\n $format = $this->getFormat($format_name);\n if ($format && isse...
[ "0.68767154", "0.680466", "0.62343836", "0.6118163", "0.59733963", "0.58274615", "0.5787207", "0.57393473", "0.5723963", "0.57055914", "0.56976664", "0.5680227", "0.5621155", "0.5615266", "0.5547563", "0.55246145", "0.5519778", "0.55157787", "0.5506655", "0.5483854", "0.54780...
0.72526294
0
Disable a filter on a text format.
Отключить фильтр для текстового формата.
public function disableTextFilter($format_name, $filter_name) { $filters = $this->getFilters(); $format = $this->getFormat($format_name); if ($format && isset($filters[$filter_name])) { // Populate text filter object as expected by filter_format_save(). $format->filters = $this->getFormatFilte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acf_disable_filter($name = '')\n{\n}", "public function modeBlacklist()\n {\n $this->filter_mode = \"bl\";\n }", "public static function disable_filter()\n\t{\n\t\t$class = get_called_class();\n\t\tstatic::$_disable_filter[$class] = false;\n\t}", "public function mt_supportedTextFilt...
[ "0.655823", "0.64169544", "0.6375335", "0.6283968", "0.6120989", "0.60390925", "0.5921762", "0.5779808", "0.5775981", "0.57533395", "0.56799644", "0.5656428", "0.5612609", "0.5587016", "0.5586872", "0.55758125", "0.55713576", "0.55550236", "0.55379295", "0.55305743", "0.55284...
0.75947225
0
/ This function builds the export form for content type fields.
// Эта функция создает форму экспорта для полей типа содержимого.
function d7nths_export_form($form, &$form_state) { $form = array(); $options = array(); $types = node_type_get_types(); foreach ($types as $name => $type) { $options[$name] = $type->name; } $form['content_types'] = array( '#type' => 'checkboxes', '#title' => t('Choose a conte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ExportForm() {\n\t\t$fields = new FieldList();\n\n\t\t// Display available yml files so we can re-export easily.\n\t\t$ymlDest = BASE_PATH.'/'.TestDataController::get_data_dir(); \n\t\t$existingFiles = scandir($ymlDest);\n\t\t$ymlFiles = array();\n\t\tforeach ($existingFiles as $file) {\n\t\t\tif (preg_ma...
[ "0.69999135", "0.6778027", "0.6708353", "0.6654696", "0.651654", "0.6467177", "0.641911", "0.6334221", "0.62687457", "0.62220395", "0.6219076", "0.62136805", "0.62070453", "0.6182923", "0.617864", "0.6176975", "0.6171367", "0.61700046", "0.6155925", "0.612911", "0.6121254", ...
0.74138206
0
/ Hacky solution, this is the submit function for the export form. It dumps the content types into session and redirects back to the form. And done.
/ Хакерский способ, это функция отправки для формы экспорта. Она сохраняет типы содержимого в сессию и перенаправляет обратно на форму. И все.
function d7nths_export_form_submit($form, &$form_state) { $_SESSION['d7nth_content_types'] = $form_state['values']['content_types']; $_SESSION['data_options'] = $form_state['values']['data_options']; drupal_goto('admin/structure/types/export'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fes_process_form_export() {\n\n\t\tif ( !isset( $_POST['fes_action'] ) || empty( $_POST['fes_action'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! EDD_FES()->vendors->user_is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $_POST['fes_action'] !== 'fes_export_form_settings' ){\n\t\t\treturn;\n\t\t}\n\n\t\tif (...
[ "0.6659514", "0.65385306", "0.64641947", "0.62982446", "0.62920034", "0.62905806", "0.62897676", "0.6215646", "0.6214174", "0.62068766", "0.6200185", "0.61484313", "0.6115621", "0.6076971", "0.6008094", "0.6005891", "0.5996301", "0.5963835", "0.5952861", "0.5947826", "0.59348...
0.7825343
0
checks to see if ipm is installed
проверяет, установлен ли ipm
function ipm_is_installed() { global $wpdb; $installed = get_option('ipm_installed'); if(!$installed) { ipm_install_system(); return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function checkIsInstalled();", "function isInstalled() ;", "public function isInstalled();", "public function isInstalled();", "public function isInstalled();", "function isInstalled();", "public static function isInstalled() : bool {}", "public static function isInstalled(){\n ...
[ "0.7087681", "0.7020099", "0.69956535", "0.69956535", "0.69956535", "0.69892794", "0.68582606", "0.6712302", "0.6708251", "0.66994697", "0.6625006", "0.6576147", "0.65732545", "0.6510116", "0.6453198", "0.643623", "0.64323276", "0.64318764", "0.6429591", "0.64171106", "0.6407...
0.7788459
0
Get the export data.
Получите данные для экспорта.
public function getExportData(): array { return $this->exportData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exportData()\n\t{\n\t\treturn $this->constructExportObject();\n\t}", "protected function get_data_to_export()\n {\n }", "public function export(): array\n {\n return $this->container['data'];\n }", "public function exportData(){\n\t\tswitch($_POST['export_to']){\n\t...
[ "0.8496822", "0.7967914", "0.7461584", "0.7305307", "0.7096606", "0.6995654", "0.6964909", "0.6882558", "0.68606436", "0.6847219", "0.6847219", "0.6847219", "0.6818067", "0.68091595", "0.6741477", "0.67171735", "0.67096245", "0.66872054", "0.66621697", "0.6642597", "0.6623843...
0.84856486
1
Returns a list of levels for the squares in the area.
Возвращает список уровней для квадратов в области.
protected function getSquareLevels(array $area): array { $levels = []; foreach ($area as $element) { for ($i = 0; $i < strlen($element); $i++) { $levels[] = intval($element[$i]); } } return $levels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLevels();", "public function getLevels()\n {\n return $this->levels;\n }", "public function getLevels()\n {\n return $this->levels;\n }", "public function get_levels(): array {\n return $this->levels;\n }", "protected function getNumberOfSquaresPerLeve...
[ "0.74072665", "0.688748", "0.688748", "0.6836644", "0.67355204", "0.67301", "0.6689404", "0.6679712", "0.66705", "0.66347283", "0.661476", "0.6603443", "0.6565931", "0.6488727", "0.63914055", "0.6282454", "0.6231111", "0.62231785", "0.6184631", "0.61527854", "0.6142282", "0...
0.7785538
0
/=========== $type = 1 (For directly buy) $type = 2 (For buy using cart system ) =========
/=========== $type = 1 (Для прямой покупки) $type = 2 (Для покупки через систему корзины) =========
public function buy_product($type='', $product_variation_id='') { $product_tempinfo = array(); $product_variation_id = base64_decode($product_variation_id); if($type==1 && !empty($product_variation_id)){ $product_info = $this->product_model->product_details($product_variation_id); if(!empty($product_info)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buy_multi(){\n\t\t\t$model = $this -> model;\n\t\t\t$product_id = FSInput::get('id',0,'int'); // product_id\n\t\t\t$buy_count = FSInput::get('buy_count',1,'int'); // product_id\n\t\t\t$Itemid = FSInput::get('Itemid',0,'int'); // product_id\n\t\t\tFSFactory::include_class('errors');\n\t\t\tif(!$product_id)...
[ "0.649809", "0.6487199", "0.6432452", "0.6333889", "0.62352717", "0.6209019", "0.6174713", "0.61713105", "0.6168211", "0.6121568", "0.61096424", "0.60861325", "0.60699344", "0.606747", "0.60072666", "0.5988846", "0.59733295", "0.5937642", "0.59203744", "0.5913411", "0.5908702...
0.73748934
0
Check if next step of upgrade id available
Проверьте, доступен ли следующий шаг обновления с идентификатором
public function isNextStepAvailable() { return \XLite\Upgrade\Cell::getInstance()->isValid() && (!\XLite\Upgrade\Cell::getInstance()->hasCoreUpdate() || $this->isValidXCNLicense()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForFinalUpgrade()\n\t{\n\t\tif($this->getVersionPosition($this->upgradeToVersion) > $this->getVersionPosition($this->upgradeData['upgrade_to_version']))\n\t\t{\n\t\t\t$this->log('You wanted to upgrade to version ' . $this->upgradeData['upgrade_to_version'] . ' but this iteration was only able to upgr...
[ "0.6661608", "0.6484644", "0.63228256", "0.61939085", "0.6160439", "0.61544704", "0.61520296", "0.61308557", "0.61115795", "0.6020675", "0.5972564", "0.5970996", "0.5960344", "0.5925608", "0.5863836", "0.5857092", "0.5852562", "0.58314824", "0.58130664", "0.5778691", "0.57700...
0.70915115
0
Check if the trial notice must be displayed
Проверить, должен ли отображаться уведомление о пробной версии
public function displayTrialNotice() { return \XLite\Upgrade\Cell::getInstance()->hasCoreUpdate() && !\XLite::getXCNLicense(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOnTrial();", "public static function theme_check_notice()\n {\n }", "function is_store_notice_showing()\n {\n }", "public function xtestDisplayMessageIfMissed() // <-- Don't forget to remove the x to enable the test\n {\n }", "public function check_for_notices(){...
[ "0.70555145", "0.67959225", "0.6769142", "0.67095745", "0.657507", "0.6566772", "0.65372515", "0.6503336", "0.6465963", "0.642879", "0.6409993", "0.63584304", "0.6346677", "0.6342743", "0.63356245", "0.6335241", "0.62884414", "0.6286533", "0.6286208", "0.6285045", "0.6272838"...
0.7574311
0
Return list of all core versions available
Вернуть список всех доступных версий ядра
public function getCoreVersionsList() { $result = \XLite\Upgrade\Cell::getInstance()->getCoreVersions(); unset($result[\XLite::getInstance()->getMajorVersion()]); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVersions();", "public function getVersions() {}", "public function getVersions() {}", "public function getVersions() {}", "public static function getSupportedVersions()\n {\n return self::$available_versions;\n }", "public function get_list()\n {\n $versions = cf...
[ "0.7079917", "0.6945902", "0.6945902", "0.6945902", "0.6665455", "0.66284335", "0.6550908", "0.65383965", "0.6471409", "0.6401402", "0.6273887", "0.6098072", "0.60934836", "0.6085422", "0.6072784", "0.60593987", "0.60586715", "0.5966305", "0.58647877", "0.58098143", "0.580221...
0.7925478
0
Return true if XCN license exists and is valid
Вернуть true, если лицензия XCN существует и действительна
protected function isValidXCNLicense() { $result = false; $license = \XLite::getXCNLicense(); if ($license) { $keyData = $license->getKeyData(); $result = empty($keyData['message']); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_license_valid()\n {\n // TODO: Build out license functionality\n return true;\n }", "public static function isLicenseValid()\n\t{\n\t\t$licenses = app(LicenseManager::class);\n\t\t$addons = $licenses->addons();\n\n\t\tif (!$addons->has('ddm-studio/cookie-byte') || $licenses...
[ "0.7852767", "0.72762233", "0.7142613", "0.6868867", "0.679486", "0.678769", "0.6401155", "0.6386981", "0.63625693", "0.6246088", "0.62329715", "0.6076837", "0.60647416", "0.6057577", "0.6032923", "0.60325766", "0.5996195", "0.5983429", "0.5923661", "0.59011686", "0.5875018",...
0.8131895
0
Get list of error entries as HTML code
Получить список записей ошибок в виде кода HTML
protected function getErrorEntriesHTML() { $list = ''; foreach (\XLite\Upgrade\Cell::getInstance()->getErrorEntries() as $name) { $list .= sprintf('<li>%s</li>', $name); } if ($list) { $list = sprintf('<ul class="marked-list">%s</ul>', $list); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_errors_html() {\n $html = '';\n foreach ($this->errors as $error) {\n $html .= $error . \"<br />\";\n }\n return $html;\n }", "public function getHtmlErrors()\n {\n $ret = '<h4>Errors</h4>';\n if (!empty($this->_errors)) {\n ...
[ "0.8288774", "0.80357003", "0.7760529", "0.7745684", "0.7686849", "0.7587446", "0.7539997", "0.73955524", "0.733262", "0.73241204", "0.7247482", "0.7177048", "0.7173448", "0.71706504", "0.7161338", "0.7161057", "0.71334386", "0.7124335", "0.7102599", "0.709987", "0.70784104",...
0.8273597
1
Returns error message for 'unpack' error
Возвращает сообщение об ошибке для 'unpack' ошибки
protected function getUnpackErrorMessage() { $link = $this->buildURL('upgrade', 'check_integrity'); return static::t('Try to unpack them manually', array('link' => $link)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function unpack()\n {\n }", "private function unpack_stream($packed_data, $unpacked_len)\r\n\t{\r\n\t\t\tif (!$unpacked_len)\r\n\t\t\t\treturn '';\r\n\t\t\t\t\r\n\t\t\tif ($unpacked_len > REPORT_LEN_LIMIT)\r\n\t\t\t{\r\n\t\t\t\t$this->log->add(\"ERR_CANNOT_UNPACK_DATA_MEMLIMIT\");\r\n\t\t\t\t...
[ "0.5923187", "0.56619924", "0.56514645", "0.558503", "0.55478054", "0.55239654", "0.55044615", "0.5408879", "0.53963435", "0.5377747", "0.5349616", "0.53450197", "0.5330338", "0.5330337", "0.53009063", "0.53009063", "0.52877957", "0.52875745", "0.5286643", "0.5242903", "0.523...
0.7933428
0
Show log file content
Показать содержимое файла журнала
protected function doActionViewLogFile() { $path = \XLite\Upgrade\Logger::getInstance()->getLastLogFile(); if ($path) { header('Content-Type: text/plain', true); \Includes\Utils\Operator::flush( \Includes\Utils\FileManager::read($path) ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLogContent() {\r\n $name = I('get.name');\r\n $path = $this->model->getlogdir() . $name;\r\n // $content = nl2br(file_get_contents($path));\r\n $this->ajaxReturn(\r\n htmlspecialchars( file_get_contents($path) ),\r\n 'EVAL'\r\n );\r\n }...
[ "0.73212713", "0.7202881", "0.6772129", "0.6562286", "0.65432334", "0.6534774", "0.6533143", "0.65262616", "0.6482666", "0.6400258", "0.63977385", "0.63857245", "0.6374702", "0.6350166", "0.6345765", "0.6245133", "0.61991566", "0.61854327", "0.6179343", "0.6153792", "0.614560...
0.7417573
0
Get list of expired keys
Получить список просроченных ключей
public function getExpiredKeys() { if (!isset($this->expiredKeys)) { $this->expiredKeys = array(); $entries = \XLite\Upgrade\Cell::getInstance()->getEntries(); $keys = \XLite\Core\Database::getRepo('XLite\Model\ModuleKey')->findAll(); $commonURLPart = 'htt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function removeExpiredKeys() : int {}", "public function findExpired();", "public function hasExpiredKeys()\n {\n return (bool) $this->getExpiredKeys();\n }", "public function findExpiringAccounts()\n {\n $sql = $this->createQueryBuilder('a');\n $sql->where('a.online =...
[ "0.6557555", "0.6540628", "0.6515761", "0.6306158", "0.62452334", "0.6201085", "0.6154352", "0.6089997", "0.607278", "0.60330397", "0.60256463", "0.60050505", "0.6000983", "0.59956276", "0.59723765", "0.5963136", "0.59426874", "0.59426874", "0.59426874", "0.59426874", "0.5942...
0.7899018
0
Return true if there are expired keys
Верните true, если есть истекшие ключи
public function hasExpiredKeys() { return (bool) $this->getExpiredKeys(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isExpired(): bool\n {\n return isset($this->ttl, $this->exp) && $this->exp < now()->timestamp;\n }", "public function hasExpired()\r\n {\r\n return strtotime($this->expire_at) < time();\r\n }", "public function hasExpired(){\n \treturn strtotime($this->expires_at) <...
[ "0.7892519", "0.78851175", "0.7816403", "0.78098613", "0.7701826", "0.7631003", "0.76277775", "0.76277775", "0.76277775", "0.76277775", "0.76277775", "0.7610741", "0.76028484", "0.7598503", "0.7583803", "0.7571178", "0.7546396", "0.7546396", "0.75461984", "0.7540727", "0.7540...
0.8675954
0
Get URL to purchase all expired keys prolongation at once
Получить URL для покупки одновременного продления всех истекших ключей
public function getAllKeysPurchaseURL() { if (!$this->allKeysPurchaseURL) { $this->getExpiredKeys(); } return 1 < count($this->getExpiredKeys()) ? $this->allKeysPurchaseURL : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExpiredKeys()\n {\n if (!isset($this->expiredKeys)) {\n\n $this->expiredKeys = array();\n\n $entries = \\XLite\\Upgrade\\Cell::getInstance()->getEntries();\n\n $keys = \\XLite\\Core\\Database::getRepo('XLite\\Model\\ModuleKey')->findAll();\n\n ...
[ "0.68632823", "0.63697267", "0.60119003", "0.59698486", "0.58694685", "0.5751662", "0.5713795", "0.5632203", "0.55805296", "0.5451467", "0.54121715", "0.53695667", "0.53618413", "0.535768", "0.5328475", "0.53250897", "0.53085434", "0.52935725", "0.52535844", "0.5239235", "0.5...
0.7959816
0
Returns the associativity of this operator. Operators may be associative (meaning the operations can be grouped arbitrarily), leftassociative (meaning the operations are grouped from the left), rightassociative (meaning the operations are grouped from the right) or nonassociative (meaning operations can not be chained,...
Возвращает ассоциативность этого оператора. Операторы могут быть ассоциативными (значит, операции могут группироваться произвольным образом), левоассоциативными (значит, операции группируются слева направо), правоассоциативными (значит, операции группируются справа налево) или неассоциативными (значит, операции не могу...
public function getAssociativity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public static function getOperatorPrecedence(): int;", "public function getOperator()\n {\n return $this->_operator;\n }", "public function getPrecedence();", "public function getOperator()\n {\n return $this->operator;\n }", "public function getOperator()\n {\n ...
[ "0.59525007", "0.5764951", "0.57206416", "0.56812805", "0.56812805", "0.56812805", "0.56812805", "0.56812805", "0.5658961", "0.5658961", "0.55911666", "0.55841136", "0.5537849", "0.5500064", "0.5488661", "0.5465196", "0.5422694", "0.5404809", "0.5202761", "0.5163066", "0.5058...
0.7519234
0
stefan dot wehowsky at profilschmiede dot de / resizeToFile resizes a picture and writes it to the harddisk $sourcefile = the filename of the picture that is going to be resized $dest_x = XSize of the target picture in pixels $dest_y = YSize of the target picture in pixels $targetfile = The name under which the resized...
stefan dot wehowsky at profilschmiede dot de / resizeToFile изменяет размер картинки и записывает её на жёсткий диск $sourcefile = имя файла картинки, которую нужно изменить размер $dest_x = XSize целевой картинки в пикселях $dest_y = YSize целевой картинки в пикселях $targetfile = имя, под которым изменённая картинка ...
function resizeToFile ($sourcefile, $dest_x, $dest_y, $targetfile, $jpegqual) { /* Get the dimensions of the source picture */ $picsize = getimagesize("$sourcefile"); $source_x = $picsize[0]; $source_y = $picsize[1]; $source_id = imageCreateFromJPEG("$sourcefile"); /* Create a new image object (no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resize(){\n\t\t$imgSplit = explode(\"/\",$this->image);\n\t\t$srcName = end($imgSplit);\n\t\t//$srcUrl = str_ireplace($srcName, \"\", $this->image);\n\t\t$srcUrl = str_ireplace($srcName, \"\", $this->image);\n\t\t\n\t\t\n\t\t//$srcPath = $_SERVER['DOCUMENT_ROOT'] .\"/resize/\". str_ireplace($srcNam...
[ "0.7346824", "0.73000246", "0.69703186", "0.68929046", "0.6860382", "0.68535566", "0.6853464", "0.6803052", "0.6788349", "0.67767763", "0.6720826", "0.670627", "0.6697972", "0.666363", "0.6625176", "0.66243917", "0.66118973", "0.6602332", "0.65925086", "0.65911144", "0.65851"...
0.81921357
0
Retrieve payment configuration object
Получить объект конфигурации платежа
protected function _getConfig() { return Mage::getSingleton('payment/config'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getPaymentConfiguration();", "protected function _getConfig()\r\n {\r\n return Mage::getSingleton('checkoutapi_chargePayment/config');\r\n }", "protected function _getConfig() {\n return Mage::getSingleton('amazonpayments/config');\n }", "protected function _get...
[ "0.860595", "0.77768147", "0.72407717", "0.72371876", "0.72269756", "0.72269756", "0.69864213", "0.6983722", "0.6980902", "0.6960146", "0.6942549", "0.6899742", "0.68880606", "0.68471104", "0.68121254", "0.68102217", "0.6788883", "0.6779327", "0.6774689", "0.67693245", "0.669...
0.7960917
1
/ Carrega os scripts necessarios para as paginas do buddypress, bbpress e que utilizam o template cneac.php
Загружает скрипты, необходимые для страниц buddypress, bbpress и тех, которые используют шаблон cneac.php
function cne_ac_load_scripts(){ if( function_exists( 'bbpress' ) && function_exists( 'buddypress' ) ) { if ( is_page_template('cne-ac.php') || is_buddypress() || is_bbpress() ) { wp_enqueue_style( 'cne-ac-css', get_template_directory_uri() . '/cne-ac/css/cne-ac.css' ); wp_enqueue_style( '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bpaz_scripts() {\n\t// theme style.css file\n\twp_enqueue_style( 'bpaz-style', get_stylesheet_uri() );\n\twp_enqueue_style( 'bpaz-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css' );\n\n\t// threaded comments\n\tif ( is_singular() && comments_open() && get_option( 'thread_...
[ "0.69548965", "0.68840134", "0.6816112", "0.6815243", "0.6813652", "0.68034357", "0.67984843", "0.6786766", "0.67821145", "0.6780655", "0.6773875", "0.6732605", "0.6729347", "0.6719049", "0.67123425", "0.6695709", "0.66878164", "0.6653263", "0.664684", "0.66240925", "0.662380...
0.73938847
0
/ Dropdown com as paginas adicionadas no WP
Выпадающий список с добавленными страницами в WP
function cne_ac_get_select_pages( $selected = 0, $name='', $id='' ) { echo wp_dropdown_pages( array( 'name' => 'cne_ac_' . esc_attr( $name ) . '_page_id', 'id' => 'cne-ac-' . esc_attr( $id ) . '-page-id', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function skudo_wp_pagenavi_dropdown() { \n\tskudo_wp_pagenavi(); \n}", "public function pageForProjectsSettingCallback() {\n\t\twp_dropdown_pages(\n\t\t\tarray(\n\t\t\t\t'name' => 'page_for_projects',\n\t\t\t\t'echo' => 1,\n\t\t\t\t'show_option_none' => esc_html__( '&mdash; Select &mda...
[ "0.8071234", "0.6971077", "0.6953345", "0.6845821", "0.6803709", "0.6717195", "0.6592495", "0.6585593", "0.6558159", "0.65311575", "0.6511097", "0.6479525", "0.6402299", "0.63938975", "0.639223", "0.63541263", "0.63381517", "0.63240314", "0.63190377", "0.6318757", "0.6313431"...
0.74357843
1
Return auth storage. If auth storage was not defined outside returns default object of auth storage
Возвращает хранилище аутентификации. Если хранилище аутентификации не было определено вне этого метода, возвращается объект хранилища аутентификации по умолчанию
public function getAuthStorage() { return $this->_authStorage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAuthStorage()\n {\n if (null === $this->authStorage) {\n $this->authStorage = $this->getServiceLocator()->get('authStorage');\n }\n return $this->authStorage;\n }", "public function getAuthStorage()\n {\n if (null === $this->authStorage) {\n ...
[ "0.7980963", "0.7980963", "0.75874585", "0.7032521", "0.70061606", "0.696443", "0.693738", "0.6908853", "0.69051385", "0.68775624", "0.68240607", "0.6790129", "0.67833775", "0.67797595", "0.67754894", "0.6764119", "0.67628354", "0.6748055", "0.67449397", "0.6741909", "0.67312...
0.818565
0
Return credential storage object
Возврат объекта хранения учетных данных
public function getCredentialStorage() { return $this->_credentialStorage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function credential()\n {\n return static::$instance->credential;\n }", "public function getCredentials(): CredentialInterface;", "public function getCredentials(): Credentials;", "public function getCredential()\n {\n return $this->cred;\n }", "private function getC...
[ "0.7292493", "0.70818967", "0.69384915", "0.67464966", "0.67459786", "0.674033", "0.6714039", "0.665261", "0.6563994", "0.6500753", "0.6496121", "0.6489862", "0.6489862", "0.6462347", "0.6426354", "0.6410997", "0.6391221", "0.63902926", "0.63902926", "0.6379", "0.637472", "...
0.81502247
0
Returns a class containing all the data about the match
Возвращает класс, содержащий все данные о матче
public function getMatch();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function data(){\n\t\treturn $this->matches;\n\t}", "public function getMatch( )\n {\n return $this->_match ;\n }", "public function getMatchInfo() {\n if (is_null($this->matchInfo) && is_object($this->getTournament())) {\n // Extract just the match id from the machine name.\n ...
[ "0.68747044", "0.6572892", "0.64464074", "0.643682", "0.643682", "0.643682", "0.643682", "0.6159012", "0.61537516", "0.6017139", "0.5990454", "0.59167135", "0.59167135", "0.5909051", "0.5901515", "0.5877821", "0.5856681", "0.5841758", "0.5811487", "0.5802841", "0.5799223", ...
0.7273513
0
GeneratesProduct export file 1 per store
Генерирует файл экспорта Product 1 на магазин
public function exportZirconProductFeed(){ Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID)); $errorFile = 'iGo_DataFeed_Zircon_Error.log'; try { $stores = Mage::getModel('core/store')->getCollection(); foreach ($...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function export110()\n {\n /** @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */\n $validAttrCodes = $this->_getExportAttrCodes();\n $writer = $this->getWriter();\n $resource = Mage::getSingleton('core/resource')...
[ "0.7042144", "0.702773", "0.69319516", "0.6914636", "0.6858786", "0.66540986", "0.6566068", "0.65066737", "0.649263", "0.648421", "0.63882506", "0.6284118", "0.6259541", "0.6197827", "0.6197053", "0.61678964", "0.61396235", "0.6128705", "0.6105772", "0.60504645", "0.60386616"...
0.70785475
0
Send files generated via FTP
Отправка файлов, сгенерированных через FTP
private function ftpFiles($filesToSend,$errorFile) { # ftp-login $iGoHelper = Mage::helper('fw_igo'); $ftp_server = $iGoHelper->getFtpHost(); $ftp_user = $iGoHelper->getFtpUser(); $ftp_pw = $iGoHelper->getFtpPassword(); $ftp_dir = $iGoHelper->g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function send_file($file){\n \t$host = '192.168.15.96';\n\t\t$usr = 'transfer_nb';\n\t\t$pwd = 'sagoShip123';\n\t\t$local_file = './upload/'.$file.'.txt';\n\t\t$ftp_path = '/data/rawrecords/nb_extract/'.$file.'.txt';\n\n\t\t$local_file2 = './upload/success/'.$file.'.txt';\n\t\t$ftp_path2 = '/data/rawrecords/nb_...
[ "0.69487906", "0.6641355", "0.6614136", "0.6428144", "0.63713527", "0.6322528", "0.62858987", "0.6249637", "0.6249155", "0.6215011", "0.61139995", "0.60704076", "0.6033817", "0.60099673", "0.60039055", "0.60037386", "0.59859616", "0.59806156", "0.59553164", "0.5950122", "0.59...
0.74365354
0
error_log('Crowdfunding>create_preapproval params: '.print_r($params, true));
error_log('Crowdfunding>create_preapproval params: '.print_r($params, true));
public function create_preapproval($params) { include_once(dirname(__FILE__) . '/aweber_api/aweber_api.php'); date_default_timezone_set('America/Chicago'); $db_params = parse_ini_file(dirname(dirname(__FILE__)) . '/configs/application.ini'); $pdo = new PDO("mysql:dbname=" . $db_para...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hook_salesforce_push_params_alter() {}", "function CallPreapproval( $returnUrl, $cancelUrl, $currencyCode, \n $startingDate, $endingDate, $maxTotalAmountOfAllPayments,\n $senderEmail, $maxNumberOfPayments, $paymentPeriod, $dateOfMonth, \n $dayOfWeek, $maxAmountPerPayment, $maxNumber...
[ "0.61942583", "0.60867035", "0.6066504", "0.60237026", "0.59104455", "0.57200366", "0.5676779", "0.5659511", "0.56228936", "0.5576053", "0.55589956", "0.55574423", "0.5538212", "0.5518007", "0.55107176", "0.55091465", "0.55083174", "0.5496077", "0.5492942", "0.5460055", "0.54...
0.7190734
0