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
Save Referral Create or update an existing referral, based on POST data
Сохранить Реферал Создать или обновить существующий реферал на основе данных POST
public function actionSaveReferral() { $this->requirePostRequest(); if ($id = craft()->request->getPost('referralId')) { $model = craft()->simpleReferral->getReferralById($id); } else { $model = craft()->simpleReferral->newReferral($id); } $attribute...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n //\n $ref = new Referral();\n $ref->patient_id = $request->get('patientID');\n $ref->refer_to = $request->get('referTo');\n $ref->referred_by = $request->get('referredBy');\n $ref->save();\n\n }", "public function store...
[ "0.6969535", "0.6747429", "0.63410515", "0.6293385", "0.6166062", "0.61464834", "0.6075575", "0.5971085", "0.59085244", "0.5884441", "0.5880612", "0.58703625", "0.58388716", "0.5795909", "0.57729614", "0.5754342", "0.5728295", "0.572485", "0.5721734", "0.5695345", "0.5660412"...
0.7596044
0
Delete Referral Delete an existing referral
Удалить рекомендацию Удалить существующую рекомендацию
public function actionDeleteReferral() { $this->requirePostRequest(); $this->requireAjaxRequest(); $id = craft()->request->getRequiredPost('id'); craft()->simpleReferral->deleteReferralById($id); $this->returnJson(array('success' => true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Referral $referral)\n {\n //\n }", "function delete_referral($referral_id){\n \t\n \t$this->db->where('id', $referral_id);\n \t$this->db->delete('ss_referral_details');\n \t\n \treturn true;\n \t\n }", "public function removeRelation($customerId, $referralId);", "p...
[ "0.77028924", "0.7564879", "0.70181817", "0.67823637", "0.67543364", "0.6739619", "0.6431901", "0.6310238", "0.62799436", "0.6256085", "0.6172517", "0.59693426", "0.59560204", "0.5953508", "0.5932545", "0.59194976", "0.5908536", "0.5908356", "0.5908356", "0.5908356", "0.59083...
0.76919794
1
Ensures scan calls work on the gearman worker.
Обеспечивает корректную работу вызовов сканирования на работе Gearman.
public function testScan() { $worker = $this->getMock("\GearmanWorker", array('work', 'returnCode', 'addServer', 'addFunction')); $worker->expects($this->at(0)) ->method('work') ->will($this->returnValue(true)); $worker->expects($this->at(1)) ->me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRequestScan()\n {\n $client = $this->getMock(\"\\GearmanClient\", array('doBackground', 'returnCode'));\n $this->app->setGearmanClient($client);\n \n $client->expects($this->once())\n ->method('doBackground')\n ->with('scan', 'test/123');\n ...
[ "0.6449919", "0.6292776", "0.62796044", "0.62302524", "0.61671394", "0.59716433", "0.5970157", "0.58957", "0.57584494", "0.57402325", "0.5709411", "0.5533682", "0.53234255", "0.5271206", "0.5262639", "0.52308416", "0.5228893", "0.52201295", "0.5212049", "0.52023125", "0.50923...
0.7347285
0
Show the topics list
Показать список тем
public function topics() { return view('admin.support.faq.topic.list'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllTopic() {\n $topics = Topic::paginate(10);\n\n return view('admin.topics', compact('topics'));\n }", "public function topics()\n {\n $topics = Auth::user()->topics;\n return view('home.topics', compact('topics'));\n }", "function index() {\r\n $...
[ "0.7971928", "0.7846985", "0.78435856", "0.77748424", "0.7764465", "0.7716588", "0.76695186", "0.76454663", "0.7623349", "0.752857", "0.75035435", "0.74930286", "0.74807346", "0.74660206", "0.74640816", "0.74552757", "0.7389262", "0.7356978", "0.73160183", "0.72472334", "0.71...
0.7916306
1
Get name of language matching given language CC. Default to the CC if the language isn't known.
Получить имя языка, соответствующего заданному языковому коду CC. По умолчанию использовать сам код CC, если язык неизвестен.
public static function getLanguageName($langCC) { if (file_exists("lang/$langCC/name.txt")) { $name = file_get_contents("lang/$langCC/name.txt"); } if (!isset($name) || $name === false) { $name = $langCC; } return $name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLanguageName();", "public function getLanguageName(): string;", "function getLanguageFullName ($languageCode) {\n $languageMap = array(\n \"en\" => \"English\",\n \"de\" => \"Deutsch\",\n \"es\" => \"Español\",\n \"it\" => \"Italiano\",\n \"gr\" => \"ελλ...
[ "0.6962281", "0.6573822", "0.65173656", "0.6503632", "0.64843947", "0.6474099", "0.64336133", "0.63689655", "0.63689655", "0.6321285", "0.63166755", "0.63106614", "0.6298015", "0.62956923", "0.62933946", "0.6270737", "0.6259457", "0.6257918", "0.62129456", "0.6175887", "0.617...
0.75434536
0
get the facebook api key
получить ключ API Facebook
public static function getApiKey() { $api_key = sfConfig::get('app_facebook_api_key', "xxx"); if ( "xxx" == $api_key ) { throw new Exception('{m14tFacebookConnect} No API Key set!'); } return $api_key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApiKey(){\n\t\n\t return Mage::getStoreConfig('techinflosocialmedia/facebook/fbapikey');\n\t}", "public function getFBAppId()\n {\n return $this->hlp->getConfigValue('pekebyte_social_login/facebook/api_key');\n }", "public function getAPIkey(){\n return $this->getConfig('...
[ "0.82476133", "0.7300962", "0.7036048", "0.6977846", "0.69558966", "0.6923813", "0.69184995", "0.6883966", "0.6856228", "0.6821613", "0.6784046", "0.6784046", "0.6775728", "0.6769799", "0.67603815", "0.6690984", "0.66891974", "0.66568905", "0.6635679", "0.6634437", "0.6560417...
0.7792135
1
get the facebook app secret
получить секрет приложения facebook
public static function getAppSecret() { $app_secret = sfConfig::get('app_facebook_app_secret', "xxx"); if ( "xxx" == $app_secret ) { throw new Exception('{m14tFacebookConnect} No App Secret set!'); } return $app_secret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFBAppSecret()\n {\n return $this->hlp->getConfigValue('pekebyte_social_login/facebook/api_secret');\n }", "public function getFacebookAppSecret() {\n return $this->facebookAppSecret;\n }", "public function getAppSecret()\n {\n return $this->app_secret;\n }...
[ "0.8761529", "0.8153518", "0.8021945", "0.77472097", "0.76761246", "0.75908417", "0.74512863", "0.7224127", "0.71673733", "0.7128573", "0.712178", "0.712178", "0.7103531", "0.7094568", "0.7035327", "0.7011964", "0.6996896", "0.6996896", "0.6996896", "0.6966748", "0.69306016",...
0.86094457
1
Process status notification from PaymentGateway
Уведомление о статусе процесса от PaymentGateway
public function processStatusEvent() { try { $response = array(); if (is_array($this->_eventData) && count($this->_eventData)) { $response[] = $this->_eventData['ResultMessage'].'<br />'; if (strlen($this->_eventData['ProviderTransactionId'])) { $response[] = Mage::helper('paymen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process_gateway_notification() {\n\t\t$status = false;\n\t\tswitch ( strtolower( $this->paypal_ipn_values['payment_status'] ) ) {\n\t\t\tcase 'pending':\n\t\t\t\t$status = 2;\n\t\t\t\tbreak;\n\t\t\tcase 'completed':\n\t\t\t\t$status = 3;\n\t\t\t\tbreak;\n\t\t\tcase 'denied':\n\t\t\t\t$status = 6;\n\t\t\t\...
[ "0.7516402", "0.7393042", "0.7140407", "0.70083827", "0.6894643", "0.68643713", "0.6835608", "0.6745723", "0.6631717", "0.6628014", "0.6601789", "0.6592829", "0.65804183", "0.65213925", "0.65149236", "0.6476464", "0.6471839", "0.6466105", "0.64626396", "0.64156926", "0.639955...
0.76063645
0
Get CMS Page Id
Получить идентификатор страницы CMS
public function getCmsPageId() { return $this->getData(self::CMS_PAGE_COUNTER_ID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPageId();", "public function getPageId() {}", "public function getPageId()\n {\n return $this->pageId;\n }", "public function getPageId()\n {\n return $this->pageId;\n }", "public function getPageId()\n {\n return $this->pageId;\n }", "public func...
[ "0.80425125", "0.78488064", "0.77689403", "0.77689403", "0.77689403", "0.7758419", "0.7727932", "0.7622442", "0.76201737", "0.7600619", "0.75984836", "0.7546852", "0.7546852", "0.7546852", "0.73922014", "0.7368492", "0.73676074", "0.735783", "0.7332889", "0.71916586", "0.7180...
0.8386477
0
Get Backend counter value
Получить значение счётчика Backend
public function getBackendCounter() { return $this->getData(self::BACKEND_COUNTER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFrontendCounter()\n {\n return $this->getData(self::FRONTEND_COUNTER);\n }", "private function getCounterValue()\n {\n return $this->counter;\n }", "public function getCounter()\n \t{\n \t\treturn $this->countValue;\n \t}", "public function getCounterValue()\n ...
[ "0.7672446", "0.7649025", "0.73344195", "0.73229665", "0.72832054", "0.72636503", "0.72636503", "0.72636503", "0.7156263", "0.6770599", "0.6759384", "0.672318", "0.667525", "0.66702425", "0.6533453", "0.6478516", "0.63910246", "0.63556224", "0.63087004", "0.6231597", "0.61632...
0.8476841
0
Get Frontend counter value
Получить значение фронтенд-счетчика
public function getFrontendCounter() { return $this->getData(self::FRONTEND_COUNTER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getCounterValue()\n {\n return $this->counter;\n }", "public function getCounterValue()\n {\n return isset($this->counter_value) ? $this->counter_value : 0;\n }", "public function getCounter()\n \t{\n \t\treturn $this->countValue;\n \t}", "public function getCounter...
[ "0.81226397", "0.77569383", "0.7501588", "0.7448917", "0.7396913", "0.73700213", "0.73694915", "0.73694915", "0.73694915", "0.71001863", "0.68495214", "0.66866827", "0.6674192", "0.6641837", "0.66123563", "0.65672857", "0.63276535", "0.6272729", "0.6272729", "0.62443256", "0....
0.8311662
0
Set Backend counter value
Установить значение счётчика Backend
public function setBackendCounter($value) { return $this->setData(self::BACKEND_COUNTER, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCounter($value) {\n static::$counter=$value;\n }", "public function setFrontendCounter($value)\n {\n return $this->setData(self::FRONTEND_COUNTER, $value);\n }", "public function setCounter() {\r\n $this->counter = 0;\r\n }", "public function setSecureCount...
[ "0.73021406", "0.7076177", "0.7052954", "0.66857773", "0.6587938", "0.65444016", "0.6537022", "0.65231276", "0.6502863", "0.6463628", "0.6424584", "0.6416689", "0.641301", "0.63932705", "0.6386363", "0.6355337", "0.6330833", "0.6296105", "0.62960887", "0.62595403", "0.6235126...
0.79551554
0
Set Frontend counter value
Установить значение счетчика Frontend
public function setFrontendCounter($value) { return $this->setData(self::FRONTEND_COUNTER, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCounter($value) {\n static::$counter=$value;\n }", "public function setCounter() {\r\n $this->counter = 0;\r\n }", "public function setBackendCounter($value)\n {\n return $this->setData(self::BACKEND_COUNTER, $value);\n }", "public function setSecureCount(?...
[ "0.77923673", "0.74663115", "0.7178688", "0.6819764", "0.6680569", "0.66308343", "0.66256404", "0.6621169", "0.6572827", "0.6519766", "0.6480527", "0.64516413", "0.6451267", "0.6437316", "0.6380482", "0.63719654", "0.6365458", "0.6354581", "0.6309308", "0.6306292", "0.6301547...
0.7870163
0
Check if "client_id" has a value
Проверьте, имеет ли "client_id" значение
public function hasClientId() { return isset($this->client_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasClientId(){\n return $this->_has(5);\n }", "protected function hasClientId() {\n if ($this->getPkFid() == 'clientId')\n return false;\n static $hasCid;\n if ($hasCid === null) \n $hasCid = array_key_exists('clientId', $this); \n return $hasCid;\n }", "function ...
[ "0.73630714", "0.70384324", "0.6843442", "0.6749096", "0.65696645", "0.65051484", "0.6435559", "0.64266616", "0.6302788", "0.62516296", "0.6228022", "0.6170293", "0.6086714", "0.60860884", "0.60514134", "0.60099983", "0.60030425", "0.597851", "0.5944796", "0.589362", "0.58837...
0.725979
1
Set a path event action configuration identified by a alias.
Задайте конфигурацию действия события пути, идентифицированного с помощью псевдонима.
public function setConfiguration(string $alias, PathEventActionConfigurationInterface $configuration): self;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfiguration(string $alias): PathEventActionConfigurationInterface;", "public static function setPathOfAlias($alias, $path)\n {\n if (empty($path)) {\n unset(self::$_aliases[$alias]);\n } else {\n self::$_aliases[$alias] = rtrim($path, '\\\\/');\n ...
[ "0.6844084", "0.64059174", "0.6295008", "0.6097782", "0.6097782", "0.584844", "0.57243013", "0.5696932", "0.55415994", "0.5539706", "0.5508791", "0.54668444", "0.54474694", "0.5377291", "0.53500044", "0.5345565", "0.520875", "0.51736057", "0.5173171", "0.51494807", "0.513406"...
0.79216176
0
Returns a path event action configuration by its alias.
Возвращает конфигурацию действия события пути по его алиасу.
public function getConfiguration(string $alias): PathEventActionConfigurationInterface;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConfiguration(string $alias, PathEventActionConfigurationInterface $configuration): self;", "public function getActionAlias($name)\n {\n return $this->aliases[$this->getType()][$name];\n }", "public static function pathOf($alias)\n {\n\treturn self::getPathOfAlias($alias);\n ...
[ "0.65207875", "0.6097633", "0.577095", "0.56894004", "0.56538165", "0.5652831", "0.5652071", "0.56108123", "0.5595771", "0.5540859", "0.55013764", "0.5434492", "0.5366257", "0.5324385", "0.53229296", "0.52910787", "0.5283065", "0.52097696", "0.51975346", "0.5158288", "0.51170...
0.84444726
0
Start a new or existing game and redirect to it.
Запустите новую или существующую игру и перенаправьте к ней.
public function startAction() { $id = (int) $this->params()->fromRoute('id'); $gameRepo = $this->getObjectManager()->getRepository(Game::class); $user = $this->getUser(); $game = null; if (null != $id) { $game = $gameRepo->findOneBy([ 'id' => $id,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function game(){\n\n\t\t//call the global function for the user redirections\n\t\t$this->user_redirector(\"game\", \"\");\n\t}", "public function index() {\n\t\tif (!$this->ion_auth->logged_in()) { redirect('story/login', 'refresh'); }\n\t\t\n\t\t// Continue game\n\t\tredirect('menu/continue_game');\n\t}"...
[ "0.65003073", "0.6242081", "0.62254554", "0.60663164", "0.60116994", "0.5843729", "0.584355", "0.572318", "0.56662476", "0.56645876", "0.56584907", "0.5646937", "0.56357193", "0.5629345", "0.5537232", "0.5512026", "0.5500046", "0.5470201", "0.5450388", "0.5444968", "0.5438459...
0.710408
0
Returns the original img filename Note: this will only exist if this object was instatiated from a filename
Возвращает исходное имя файла img. Примечание: это значение будет существовать только в случае, если объект был создан из имени файла.
public function getFilename(){ return isset($this->imgFilename) ? $this->imgFilename : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function originalFilename()\n\t{\n\t\treturn $this->instance->getAttribute(\"{$this->name}_file_name\");\n\t}", "public function getFileName() {\n\t\treturn $this->getAsString('image');\n\t}", "public function getImageFilename () {}", "function get_original_filename() {\n return $this->uploaded_fil...
[ "0.7753882", "0.74320304", "0.74051857", "0.73540497", "0.723717", "0.7219906", "0.71997195", "0.71894586", "0.7099713", "0.70945555", "0.69261205", "0.69178337", "0.6917012", "0.68924254", "0.6884462", "0.68689144", "0.6806488", "0.6772014", "0.67702883", "0.67470556", "0.67...
0.76880807
1
Display the specified event by id or slug.
Показать указанное событие по идентификатору или слогу.
public function show($id) { // $event = Event::find($id); // // Try by slug // if(!$event) { // $event = Event::where('slug', $id); // } // // Abandon ship // if(!$event) { // abort(404); // } $events_json = json_decode(file_get_contents('events.json'), 1); Eloqu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $event = $em->getRepository('FrontFrontBundle:Event')->find(array('id' => $id));\n if (!$event) {\n throw $this->createNotFoundException('Unable to find Event entity.');\n }\n\n return $t...
[ "0.7537874", "0.7347241", "0.7284597", "0.72731143", "0.72383344", "0.7193286", "0.71814686", "0.71656966", "0.71278614", "0.7125203", "0.71043336", "0.70960003", "0.70900244", "0.70750743", "0.7071922", "0.7057697", "0.704964", "0.7031358", "0.70200115", "0.70013916", "0.699...
0.73673695
1
Getter for binding statement params.
Геттер для параметров привязки утверждения.
public function getStatementParams();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBoundParams()\n {\n return $this->_binds;\n }", "public function getBindParams(): array\n {\n }", "protected function getBindings()\n {\n return array_values($this->router->getCurrentRoute()->parameters());\n }", "public function getBindings()\n {\n ...
[ "0.75481313", "0.71029246", "0.6937396", "0.6864599", "0.6744803", "0.66111875", "0.65749276", "0.65707797", "0.6569549", "0.65139014", "0.6473034", "0.64726365", "0.64677507", "0.646726", "0.646726", "0.64602643", "0.64541155", "0.6451413", "0.6446142", "0.64135253", "0.6411...
0.75389653
1
/ Get cambio_producto by cambio_producto_id
/ Получить cambio_producto по cambio_producto_id
function get_cambio_producto($cambio_producto_id) { return $this->db->get_where('cambio_producto',array('cambio_producto_id'=>$cambio_producto_id))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_producto($id_producto)\n {\n\n return $this->db->query(\"SELECT productos.usuario_id, productos.producto_id, productos.nombre, productos.descripcion, productos.fecha_publicacion, productos.unidades, productos.ubicacion_actual, productos.precio, productos.tiempo_envio, productos.costo_envio, ...
[ "0.75715387", "0.7564833", "0.7538954", "0.7402522", "0.7402522", "0.7385553", "0.72401315", "0.7181895", "0.7081478", "0.7072096", "0.70400846", "0.69964963", "0.69613737", "0.69558173", "0.68593955", "0.68531746", "0.6814714", "0.67880523", "0.6764889", "0.66974026", "0.668...
0.80659956
0
/ Get all cambio_producto
/ Получить все cambio_producto
function get_all_cambio_producto() { $limit_condition = ""; if(isset($params) && !empty($params)) $limit_condition = " LIMIT " . $params['offset'] . "," . $params['limit']; $cambio_producto = $this->db->query(" SELECT * ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Productos(){\n $productos = Producto::all();\n return $productos;\n }", "public function getAllProductos()\n {\n $result = $this->_db->query(\"SELECT * FROM tb_producto\");\n return $result;\n }", "public function GetImagenesByProducto($id_producto){\n $...
[ "0.74252856", "0.7399752", "0.7396217", "0.73661923", "0.733305", "0.72738266", "0.7244726", "0.7234675", "0.7229082", "0.72228074", "0.7220949", "0.7143621", "0.7120861", "0.70860875", "0.7082262", "0.7067413", "0.69948244", "0.6991142", "0.6973235", "0.6952817", "0.69479895...
0.790033
0
/ function to update cambio_producto
Функция для обновления cambio_producto
function update_cambio_producto($cambio_producto_id,$params) { $this->db->where('cambio_producto_id',$cambio_producto_id); return $this->db->update('cambio_producto',$params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function modificar(Request $request){\n \n $producto = producto::findOrFail($request->id);\n $producto->idCategoria = $request->idCategoria;\n $producto->nombre = $request->nombre;\n $producto->precio = $request->precio;\n\n if($request->file('foto')){\n ...
[ "0.70660746", "0.70194966", "0.697276", "0.69727147", "0.69381225", "0.6891745", "0.6885323", "0.6861921", "0.6850365", "0.67820334", "0.67266685", "0.6721773", "0.67024297", "0.669565", "0.6690802", "0.6685412", "0.6675596", "0.6641907", "0.66179615", "0.6617177", "0.6590722...
0.70586073
1
/ function to delete cambio_producto
Функция для удаления cambio_producto
function delete_cambio_producto($cambio_producto_id) { return $this->db->delete('cambio_producto',array('cambio_producto_id'=>$cambio_producto_id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function EliminarProductos()\n\t{\n\tself::SetNames();\n\t\tif ($_SESSION[\"acceso\"]==\"administrador\" || $_SESSION['acceso'] == \"superadministrador\" ) {\n\n\t\t$sql = \"SELECT codproducto FROM detalleventas WHERE codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array(decry...
[ "0.7545342", "0.75447387", "0.75327337", "0.74866945", "0.73581994", "0.73359686", "0.7309716", "0.7266806", "0.7127127", "0.71248585", "0.7124536", "0.7110004", "0.71052915", "0.71043223", "0.7100354", "0.70881474", "0.7050086", "0.70438343", "0.7042098", "0.7017708", "0.700...
0.82512367
0
/ Common login & register method for google and facebook
/ Общая методика входа и регистрации для Google и Facebook
public function oauth_login() { if ($this->ion_auth->logged_in()) { // if user is logged in the redirect tot home page redirect('', 'refresh'); } $_POST['fb_uid'] = NULL; $_POST['fb_token'] = NULL; $_POST['g_uid'] = NULL; $_POST['g_token'] = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loginGoogle() {\n $this->gg->authenticate(crequest()->get('code'));\n $google_oauthV2 = new \\Google_Service_Oauth2($this->gg);\n $userData = $google_oauthV2->userinfo->get();\n if (!empty($userData)) {\n $model = new SignupForm();\n $model->email ...
[ "0.7141206", "0.7098172", "0.6928969", "0.68339765", "0.68252546", "0.68074656", "0.675418", "0.67380744", "0.6701888", "0.6696985", "0.6648606", "0.66384584", "0.66355836", "0.6626267", "0.65912646", "0.658494", "0.65339875", "0.65186286", "0.6505756", "0.64919966", "0.64820...
0.73665166
0
name RAS_getTunnelPid($port) description Returns the PID of the tunnel that is opened on a given local port. parameter port: The local port. returns: PID of the tunnel.
name RAS_getTunnelPid($port) description Возвращает PID туннеля, который открыт на заданном локальном порте. parameter port: Локальный порт. returns: PID туннеля.
function RAS_getTunnelPid($port) { return(exec("ps -Af | grep afclient | grep -v grep | grep '\-p $port' | tr -s '[:blank:]' | cut -d' ' -f2")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPortIdentifier();", "public function port($port = NULL) {\n if ($port !== NULL) {\n $this->port = $port;\n }\n return $this->port;\n }", "function getPid() ;", "public function getPort(): int\n\t{\n\t\treturn $this->iPort;\n\t}", "function terminus_tunnel_get($site_uuid_or...
[ "0.59109104", "0.5808679", "0.57867765", "0.5730653", "0.5708559", "0.5691202", "0.5678753", "0.5643831", "0.5640451", "0.5640451", "0.5640451", "0.5640451", "0.561183", "0.56038123", "0.56038123", "0.56038123", "0.5603308", "0.55823565", "0.5582018", "0.5577679", "0.5575044"...
0.8804974
0
name RAS_gethttpPassword() description Returns and stores the htaccess chat password to the m23 server. returns: The chat password.
name RAS_gethttpPassword() description Возвращает и сохраняет пароль htaccess чата на сервер m23. returns: Пароль чата.
function RAS_gethttpPassword() { if (RMV_exists4IP("httpPassword", "m23RemoteAdministrationService")) { $httpPassword = RMV_get4IP("httpPassword", "m23RemoteAdministrationService"); } else { //Some simple salt at the beginning $pass = 'm23'; //Run thru the services foreach (explode(' ',RAS_ser...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function httpPassword() {\n return $this->___usedoptions['password'];\n }", "function authenticationPassword() {\n\t\treturn $this->server ['PHP_AUTH_PW'];\n\t}", "public function password()\n\t{\n\t\treturn $this->server('PHP_AUTH_PW');\n\t}", "static function GetPassword()\n\t{\n\t\treturn...
[ "0.69952434", "0.6857946", "0.6829691", "0.67659503", "0.6696529", "0.6689083", "0.6689083", "0.6681392", "0.66781527", "0.66405714", "0.66043645", "0.65940756", "0.65782356", "0.6567134", "0.6546674", "0.65048414", "0.647637", "0.645822", "0.6445393", "0.64287204", "0.642372...
0.8049153
0
name RAS_getChatUser() description Returns chat user to the m23 server. returns: The chat user.
name RAS_getChatUser() описание Возвращает пользователя чата на сервер m23. возвращает: Пользователь чата.
function RAS_getChatUser() { return(RMV_get4IP("accountName", "m23RemoteAdministrationService")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getChatMember() {\n\tglobal $telegrambot,$telegramchatid,$userid;\n\t$url='https://api.telegram.org/bot'.$telegrambot.'/getChatMember';\n\t$data=array('chat_id'=>$telegramchatid,'user_id'=>$userid);\n\t$options=array('http'=>array('method'=>'POST','header'=>\"Content-Type:application/x-www-form-urlencoded...
[ "0.6633842", "0.63679636", "0.620115", "0.619567", "0.61549836", "0.61409503", "0.6129792", "0.61137956", "0.6088415", "0.59974134", "0.59885854", "0.5963012", "0.5953291", "0.5942294", "0.5934402", "0.59146917", "0.5908253", "0.5868342", "0.58673817", "0.58652675", "0.585087...
0.8245574
0
name RAS_chatWindow() description Shows the chat window for RAS.
name RAS_chatWindow() description Показывает окно чата для RAS.
function RAS_chatWindow() { $user = RAS_getChatUser(); $httpPass = RAS_gethttpPassword(); $chatPass = HELPER_md5x5($httpPass); echo('<iframe src="https://'.$user.':'.$httpPass.'@ras.goos-habermann.de:777/chat/?user='.$user.'&pass='.$chatPass.'" width="90%" height="450"></iframe>'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function chat()\n {\n return view('websocket.chat');\n }", "public function action_chat() {\n global $force;\n print Template::summon(dirname(__file__).\"/views/chat.view.php\")\n ->with('force', $force)\n ->render();\n }", "public function act...
[ "0.6257962", "0.61949086", "0.61647266", "0.611743", "0.59802073", "0.5871216", "0.58618206", "0.5806007", "0.57715666", "0.56360364", "0.54938436", "0.54099053", "0.5380324", "0.5316751", "0.5316751", "0.5316751", "0.5292469", "0.52856153", "0.52765334", "0.52624106", "0.525...
0.7132979
0
name RAS_writeTunnelScripts($afclientScripts) description Writes the RAS tunnel scripts. parameter afclientScripts: The command lines for apfclient to connect to www and ssh. returns: true on successfully import otherwise false.
name RAS_writeTunnelScripts($afclientScripts) description Записывает скрипты туннеля RAS. parameter afclientScripts: Командные строки для apfclient для подключения к www и ssh. returns: true при успешной импорт, иначе false.
function RAS_writeTunnelScripts($afclientScripts) { //Split the input by lines $lines = explode("\n", $afclientScripts); $ret = true; //Run thru the lines foreach ($lines as $line) { //Part the script from the service name (www or ssh) $scriptService = explode('#',$line); //Check if we got a service (in c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function redirect($a_script)\n\t{\n\t\tglobal $log, $PHP_SELF;\n\t\t\n//echo \"<br>\".$a_script;\n\t\tif (!is_int(strpos($a_script, \"://\")))\n\t\t{\n\t\t\tif (substr($a_script, 0, 1) != \"/\" && defined(\"ILIAS_HTTP_PATH\"))\n\t\t\t{\n\t\t\t\tif (is_int(strpos($_SERVER[\"PHP_SELF\"], \"/setup/\")))...
[ "0.49363282", "0.45214048", "0.44812137", "0.4447736", "0.44222856", "0.44204596", "0.44121554", "0.42774317", "0.42274636", "0.41220444", "0.40214372", "0.40114856", "0.39442182", "0.39265737", "0.392396", "0.39086148", "0.39059424", "0.38986647", "0.3890826", "0.38541755", ...
0.85898274
0
name RAS_showStartStopRemove() description Shows a dialog for starting, stopping and removing of RAS and status information.
name RAS_showStartStopRemove() description Показывает диалоговое окно для запуска, остановки и удаления RAS и информации о статусе.
function RAS_showStartStopRemove() { include("/m23/inc/i18n/".$GLOBALS["m23_language"]."/m23base.php"); HTML_showFormHeader(); //Start/Open the tunnels if (HTML_submit('BUT_start', $I18N_daemonStart)) { RAS_start(); } //Stop/Close/Kill the tunnels if (HTML_submit('BUT_stop', $I18N_daemonStop)) { SE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stop() {\n\t\t$this->execute(array('RTPRx:Stop','RTPTx:Stop','Init:Services'));\n\t\tsyslog(LOG_DEBUG, \"stop\");\n\t}", "public function calendar_modal_edit_remove()\r\n\t\t{\r\n\t\t\t$this->load->view($this->admin_views . \"edit_remove_single_slot\");\r\n\t\t}", "public function stopService() {\n ...
[ "0.47323516", "0.44508734", "0.44488394", "0.44203857", "0.4380432", "0.43241563", "0.43231052", "0.43033123", "0.4244357", "0.424117", "0.4203144", "0.41924328", "0.4157368", "0.41424546", "0.410632", "0.40859032", "0.40826014", "0.40826014", "0.40826014", "0.4071178", "0.40...
0.7670016
0
name RAS_tunnelOpenHTMLStatus($service) description Generates a HTML status line for a tunnel. parameter service: The name of the specific service. returns: A HTML status line for the tunnel.
name RAS_tunnelOpenHTMLStatus($service) description Генерирует строку статуса HTML для туннеля. parameter service: Имя конкретного сервиса. returns: Строка статуса HTML для туннеля.
function RAS_tunnelOpenHTMLStatus($service) { include("/m23/inc/i18n/".$GLOBALS["m23_language"]."/m23base.php"); if (RAS_isRunning($service)) $status = "<img src=\"/gfx/status/green.png\"> $I18N_tunnelOpen"; else $status = "<img src=\"/gfx/status/red.png\"> $I18N_tunnelClosed"; return($status); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayServiceHtml($service){\n $output = \"\";\n $output .= \"<li>\";\n $output .= '<a href=\"'.BASE_URL.'service/?service='.$service[\"service\"].'\">';\n $output .= \"<figure title='\".$service['popup'].\"'>\";\n $output .= '<img src=\"'.BASE_URL.$service[\"thumb\"] .'\">';\n $output ...
[ "0.5718213", "0.56912017", "0.5456627", "0.54147106", "0.5388208", "0.53179526", "0.52951556", "0.5267008", "0.516219", "0.5140713", "0.5133057", "0.51271033", "0.5105762", "0.5031506", "0.5026951", "0.5025532", "0.4988512", "0.49403584", "0.49220026", "0.49044824", "0.488536...
0.8762694
0
name RAS_isRunning($serviceIn = false) description Checks if the RAS tunnels or a choosen tunnel are/is open. parameter serviceIn: false, if all services should be checked, or a specific service name. returns: true if the tunnel(s) is/are open otherwise false.
name RAS_isRunning($serviceIn = false) description Проверяет, открыты ли RAS-туннели или выбранный туннель. parameter serviceIn: false, если необходимо проверить все службы, или имя конкретной службы. returns: true, если туннель(и) открыт(ы), иначе false.
function RAS_isRunning($serviceIn = false) { $ret = false; //Check, if all services should be checked if ($serviceIn === false) $services = explode(' ',RAS_services); else $services = array($serviceIn); foreach ($services as $service) $ret = (SERVER_runningInBackground("RAS-$service") || $ret); return($r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkServiceStatus($service){\n\t$response = false;\n\texec(\"sudo /usr/bin/systemctl is-active \".escapeshellarg(\"$service.service\"), $retval);\n\tforeach( $retval as $val ) {\n\t\tif ($val == \"active\"){\n\t\t\t$response = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn $response;\n}", "public function i...
[ "0.56125623", "0.5320244", "0.52327275", "0.5228667", "0.52268237", "0.52114016", "0.5209592", "0.52030295", "0.51979154", "0.5186511", "0.51580095", "0.5107965", "0.50996864", "0.5084461", "0.5035211", "0.5023094", "0.50229365", "0.5021851", "0.5019525", "0.4986126", "0.4985...
0.8187053
0
name RAS_start() description Starts the RAS tunnels.
name RAS_start() description Запускает RAS туннели.
function RAS_start() { foreach (explode(' ',RAS_services) as $service) { $script = m23RASTunnelScript."-$service"; SERVER_runInBackground("RAS-$service",$script); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function...
[ "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.5693922", "0.56293815", "0.55589527", "0.5536558", "0.5514201", "0.5514201", "0.5514201", "0.5503838", ...
0.7266583
0
name RAS_showAccountDataImport() description Shows a dialog for importing the RAS account data.
name RAS_showAccountDataImport() description Показывает диалог для импорта данных учетной записи RAS.
function RAS_showAccountDataImport() { include("/m23/inc/i18n/".$GLOBALS["m23_language"]."/m23base.php"); HTML_showFormHeader(); HTML_setPage('m23RemoteAdministrationService'); $msg = HTML_textArea('TA_accountData', 75, 15); if (HTML_submit('BUT_import',$I18N_import)) { //If the import of the accound da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function import()\n\t{\n\t\t// nothing to do. just display the dialogue in Out\n\t\treturn;\n\t}", "public static function show()\n {\n $record = accounts::findOne($_REQUEST['id']);\n self::getTemplate('show_account', $record);\n }", "public function showAccountsList()\n {\n $allA...
[ "0.56579334", "0.53160024", "0.52385086", "0.50527877", "0.5009562", "0.5009562", "0.5009562", "0.49752164", "0.4928121", "0.48333785", "0.48130843", "0.47480106", "0.47176218", "0.47173515", "0.47018987", "0.4695786", "0.46926472", "0.46827748", "0.46723625", "0.4631496", "0...
0.7718415
0
name RAS_isInstalled() description Checks if RAS is installed. returns: true if it is installed otherwise false.
name RAS_isInstalled() описание Проверяет, установлен ли RAS. возвращает: true, если он установлен, иначе false.
function RAS_isInstalled() { return(SERVER_fileExists(m23RASTunnelScript.'-www')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsInstalled()\n\t{\n\t\treturn $this->status == self::STATUS_INSTALLED;\n\t}", "public function isInstalled()\n {\n return $this->isRegistered() && $this->isEnabled();\n }", "function is_installed() {\n\tif (file_exists(INSTALL_CHECK_FILE)) {\n\t\treturn true;\n\t}\n\telse {\n\t...
[ "0.7478058", "0.74569607", "0.7399253", "0.73842204", "0.7253506", "0.7238822", "0.7238822", "0.7238822", "0.72281253", "0.72266567", "0.72122175", "0.72101754", "0.7197532", "0.71722984", "0.7162507", "0.71544594", "0.71140856", "0.70976377", "0.70832294", "0.7049109", "0.70...
0.7476176
1
name RAS_importMsg($msg) description Imports an account data block from pasted message. parameter msg: Complete eMail message containing the account data block. returns: true on successfully import otherwise false.
name RAS_importMsg($msg) description Импортирует блок данных аккаунта из вставленного сообщения. parameter msg: Полное электронное сообщение, содержащее блок данных аккаунта. returns: true при успешном импорте, иначе false.
function RAS_importMsg($msg) { include("/m23/inc/i18n/".$GLOBALS["m23_language"]."/m23base.php"); $errMsg = $okMsg = ''; $ret = true; //Get a clean account data block $msg = RAS_getMsg($msg); if (isset($msg{1})) { //Get the key $key = MAIL_getKeyFromeMailAddress(RAS_getRandomKey()); //Get the unencrypt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadDownEmailHeader(&$msg)\n\t{\n\t\tif(!empty($_GET['email'])){\n\t\t\t$whstr=' where `to` like \\'%<'.trim($_GET['email']).'>\\'';\n\t\t}\n\t\telse\n\t\treturn false;\n\t\t$email_cfg = $this->db->getValue('select email,password,in_server_addr,in_port,in_protocol,in_ssl from '.CFG_DB_PREFIX.'email_cfg wh...
[ "0.5725558", "0.56162524", "0.5546263", "0.5465592", "0.54337275", "0.52823037", "0.5266206", "0.52025265", "0.51658696", "0.51032686", "0.50630426", "0.505667", "0.49705917", "0.49085656", "0.49032128", "0.4889278", "0.48834005", "0.48719096", "0.48445725", "0.4823063", "0.4...
0.786802
0
name RAS_getMsg($msg) description Gets the account data block from pasted message. parameter msg: Complete eMail message containing the account data block. returns: Data block.
name RAS_getMsg($msg) description Получает блок данных аккаунта из вставленного сообщения. parameter msg: Полное электронное сообщение, содержащее блок данных аккаунта. returns: Блок данных.
function RAS_getMsg($msg) { $lines = explode("\n",$msg); $msg = ''; $start = false; foreach ($lines as $line) { if ($start && strpos($line,"####### m23 remote administration service - Account information end #######") !== false) return($msg); if ($start) $msg .= $line; if (!$start && strpos($line,"#...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function phparch_getInvoice($msg)\n {\n $invoice = array('details' => array('id' => 1,\n 'customer_name' => 'Andi Gutmans',\n 'date' => '15-Mar-2006',\n ...
[ "0.64468044", "0.6321934", "0.6230024", "0.61597043", "0.6103373", "0.5941473", "0.5941473", "0.5939672", "0.5927774", "0.5880686", "0.5848551", "0.5830349", "0.5813168", "0.5762005", "0.5747587", "0.5712705", "0.5705859", "0.57024646", "0.5693092", "0.56620723", "0.5641501",...
0.71574605
0
name RAS_getRandomKey() description Generates a random key (once) for the m23 remote administration service and returns it on every call. returns: Random key for this server.
name RAS_getRandomKey() description Генерирует случайный ключ (один раз) для службы удаленного управления m23 и возвращает его при каждом вызове. returns: Случайный ключ для этого сервера.
function RAS_getRandomKey() { if (RMV_exists4IP("randomKey", "m23RemoteAdministrationService")) { $randomKey = RMV_get4IP("randomKey", "m23RemoteAdministrationService"); } else { $randomKey = HELPER_generateSalt(32); RMV_set4IP("randomKey", $randomKey, "m23RemoteAdministrationService"); } return($r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRandomKey();", "public function randomkey() {\n $ranKey = substr(number_format(time() * rand(), 0, '', ''), 0, 6);\n return $ranKey;\n }", "public static function getRandomKey(): string\n {\n $keys = self::getKeys();\n return $keys[array_rand($keys)];...
[ "0.79522145", "0.7671565", "0.7657965", "0.7627998", "0.7449313", "0.7367134", "0.72756547", "0.72744805", "0.7246565", "0.7116164", "0.71073204", "0.7104177", "0.69596577", "0.6958565", "0.6931174", "0.69147164", "0.690285", "0.68945867", "0.68909985", "0.68909985", "0.68909...
0.8530345
0
Check mobile number field validations of instructor login
Проверьте валидацию поля номера мобильного телефона для входа инструктора
public function check_mobile_number_field_validations() { $credentails = [ 'mobile' => 'asdfasdf', 'password' => 'asfdasd', ]; $response = $this->postJson(route('client.login'), $credentails); $response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verifyMobileNo()\r\r\n\t{\r\r\n\t\t\t$mobile_no=$_POST['txtrecipientmobile'];\r\r\n\r\r\n\t\t\t$result=$this->db->query(\"Select vis_id_pk,vis_firstName,vis_lastName From tblmvbvisitors where vis_mobile='\".$mobile_no.\"'\");\r\r\n\t\t\t$row=$result->result();\r\r\n\r\r\n\t\t\tif(count($row)>0)\r\r...
[ "0.6919556", "0.6898363", "0.67685276", "0.6678349", "0.64768124", "0.6276129", "0.6251051", "0.62295866", "0.6206839", "0.6186685", "0.61619943", "0.6156163", "0.6150793", "0.6147339", "0.60592747", "0.60183024", "0.60171026", "0.6001452", "0.59865534", "0.59650624", "0.5962...
0.77164733
0
Check unactive status with valid credentials of instructor login
Проверьте статус неактивности с действительными учетными данными для входа инструктора
public function check_unactive_status_with_valid_credentials() { $this->withoutExceptionHandling(); $client = $this->createClientUnActive(); $credentails = [ 'mobile' => $client->mobile, 'password' => 'password', ]; $response = $this->postJson(route('c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isLoginInProgress() {}", "function __validateLoginStatus()\n {\n if($this->action != 'login' && $this->action != 'logout')\n {\n if($this->Session->check('User') == false)\n {\n $this->redirect('login');\n ...
[ "0.6753469", "0.6569448", "0.6500367", "0.6348245", "0.6329784", "0.6323791", "0.63072276", "0.6281441", "0.62364477", "0.621876", "0.61764246", "0.6172267", "0.6168902", "0.61602974", "0.61564976", "0.61348706", "0.6126651", "0.61146796", "0.6114044", "0.6078189", "0.6077759...
0.71772015
0
name DHCP_exportDHCPSettingsForExternalDHCPServer() description Exports the DHCP settings of m23 clients that are booting over the network and adds settings for external DHCP servers.
name DHCP_exportDHCPSettingsForExternalDHCPServer() description Экспортирует настройки DHCP клиентов m23, которые загружаются через сеть, и добавляет настройки для внешних серверов DHCP.
function DHCP_exportDHCPSettingsForExternalDHCPServer() { $serverIP = getServerIP(); //Get all host lines of the DHCP config file $cmds = "grep 'host ' ".DHCPD_CONF_FILE; $lines = SERVER_runInBackground('DHCP_exportDHCPSettingsForExternalDHCPServer', $cmds, "root", false); //Add settings for the external DHCP se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpsl_expanded_hours_export_settings() {\n echo \"<script>\\n\";\n echo \"window.WPSLEH = window.WPSLEH || {};\\n\";\n echo \"window.WPSLEH.settings =\". json_encode(wpsl_expanded_hours_all_settings()) . \";\";\n echo \"\\n</script>\";\n}", "function DHCP_writePXEcfg($clientName, $clientID, $...
[ "0.5240046", "0.5231848", "0.50479287", "0.4968476", "0.48381907", "0.48056182", "0.48043293", "0.47593215", "0.4737648", "0.46675357", "0.46668097", "0.4647327", "0.46363804", "0.45753494", "0.45721737", "0.45631275", "0.45583463", "0.45562965", "0.45540687", "0.45540687", "...
0.8252051
0
name DHCP_lineNumberAffterLastClient() description Gets the line number with the last client definition in the dhcpd.conf. returns Line number with the last client definition in the dhcpd.conf.
name DHCP_lineNumberAffterLastClient() description Получает номер строки с последним определением клиента в файле dhcpd.conf. returns Номер строки с последним определением клиента в файле dhcpd.conf.
function DHCP_lineNumberAffterLastClient() { return(SERVER_runInBackground('DHCP_addSubnetDefinition'.rand(), "awk 'BEGIN { foundLine=line=1 } /^host/ { foundLine=line } { line++ } END { print foundLine } ' ".DHCPD_CONF_FILE,"root", false)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastLine() {\n return $this->last_line_number;\n }", "public function getLastLogLine()\r\n {\r\n return $this->lastLine;\r\n }", "public function getInvoiceFollowUpLineNumber()\n\t{\n\t return $this->invoiceFollowUpLineNumber;\n\t}", "public function lineNo(): int\n ...
[ "0.6808576", "0.62372637", "0.60359883", "0.5967353", "0.5884479", "0.5862243", "0.58446324", "0.57937706", "0.5752881", "0.5752881", "0.565059", "0.5644826", "0.56243455", "0.55880034", "0.55655354", "0.5558508", "0.5533108", "0.5533108", "0.5533108", "0.55152273", "0.550969...
0.8435349
0
name DHCP_addSubnetDefinition($subnet, $netmask) description Adds the subnet definition to the dhcpd.conf to let the DHCP server give out network information to clients to other subnets. parameter subnet: The subnet. parameter netmask: netmask for the ip
name DHCP_addSubnetDefinition($subnet, $netmask) description Добавляет определение подсети в dhcpd.conf, чтобы DHCP-сервер мог предоставлять клиентам информацию о сети для других подсетей. parameter subnet: Подсеть. parameter netmask: маска подсети для IP-адреса
function DHCP_addSubnetDefinition($subnet, $netmask) { $insertText = "subnet $subnet netmask $netmask {}"; //Without the closing brace to match the dynamic ranges too $searchText = "subnet $subnet netmask $netmask {"; if (exec("grep -c '$searchText' ".DHCPD_CONF_FILE) == 0) { $insertAfterLine = DHCP_lineNumber...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_delSubnetDefinition($subnet, $netmask)\n{\n\t$insertText = \"subnet $subnet netmask $netmask {}\";\n\tSERVER_delLineFromFile(DHCPD_CONF_FILE, $insertText);\n}", "function DHCP_addDynamicRange($firstIP, $lastIP, $netmask, $gateway)\n{\n\t$subnet = CLIENT_getSubnet($firstIP, $netmask);\n\t$broadcast ...
[ "0.77002996", "0.63626355", "0.5917805", "0.5783933", "0.5686955", "0.5645213", "0.5536857", "0.5480992", "0.5365334", "0.5358041", "0.53327274", "0.51468444", "0.51419246", "0.51390016", "0.51071906", "0.49623635", "0.4938968", "0.4825298", "0.47878075", "0.47801828", "0.476...
0.8723657
0
name DHCP_delSubnetDefinition($subnet, $netmask) description Removes a subnet definition from the dhcpd.conf. parameter subnet: The subnet. parameter netmask: netmask for the ip
name DHCP_delSubnetDefinition($subnet, $netmask) description Удаляет определение подсети из dhcpd.conf. parameter subnet: Подсеть. parameter netmask: маска подсети для ip
function DHCP_delSubnetDefinition($subnet, $netmask) { $insertText = "subnet $subnet netmask $netmask {}"; SERVER_delLineFromFile(DHCPD_CONF_FILE, $insertText); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_addSubnetDefinition($subnet, $netmask)\n{\n\t$insertText = \"subnet $subnet netmask $netmask {}\";\n\n\t//Without the closing brace to match the dynamic ranges too\n\t$searchText = \"subnet $subnet netmask $netmask {\";\n\n\tif (exec(\"grep -c '$searchText' \".DHCPD_CONF_FILE) == 0)\n\t{\n\t\t$insert...
[ "0.6878191", "0.5800339", "0.5215302", "0.52019715", "0.5086543", "0.5020856", "0.5014506", "0.5011038", "0.4846315", "0.4747938", "0.46946698", "0.46792358", "0.46672398", "0.46283704", "0.4621228", "0.44966152", "0.44890583", "0.44826084", "0.44810107", "0.44249535", "0.441...
0.90745705
0
name DHCP_addDynamicRange($firstIP, $lastIP, $netmask, $gateway) description Adds a dynamic IP range to the dhcpd.conf and restarts the DHCP server. parameter firstIP: The first IP marking the begin of the dynamic IP range. parameter lastIP: The last IP marking the end of the dynamic IP range. parameter netmask: Netmas...
name DHCP_addDynamicRange($firstIP, $lastIP, $netmask, $gateway) description Добавляет динамический диапазон IP-адресов в dhcpd.conf и перезапускает сервер DHCP. parameter firstIP: Первый IP-адрес, обозначающий начало динамического диапазона IP-адресов. parameter lastIP: Последний IP-адрес, обозначающий конец динамичес...
function DHCP_addDynamicRange($firstIP, $lastIP, $netmask, $gateway) { $subnet = CLIENT_getSubnet($firstIP, $netmask); $broadcast = CLIENT_getBroadcast($firstIP, $netmask); $insertText = "subnet $subnet netmask $netmask { range $firstIP $lastIP; option broadcast-address $broadcast; option routers $gateway; option s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_delDynamicRange($firstIP, $lastIP)\n{\n\t//Get the netmask of the dynamic range before deleting the range\n\t$netmask = DHCP_getNetmaskOfDynamicRanges($firstIP);\n\n\t//Prepare and execute sed\n\t$firstIPSed = str_replace('.', '\\.', $firstIP);\n\t$lastIPSed = str_replace('.', '\\.', $lastIP);\n\t\n\...
[ "0.72830385", "0.6042668", "0.59858286", "0.58221775", "0.5692949", "0.52703214", "0.4995297", "0.48287132", "0.46468955", "0.46376777", "0.46064252", "0.45863095", "0.4512309", "0.44823405", "0.44611374", "0.44281405", "0.44164518", "0.44030514", "0.44012928", "0.4394728", "...
0.8888761
0
name DHCP_getDynamicRanges() description Gets all dynamic IP ranges from the dhcpd.conf. returns Associative array with the found IP ranges (e.g. Array ( [0] => Array ( [netmask] => 255.255.255.0 [firstIP] => 192.168.1.10 [lastIP] => 192.168.1.200 [gateway] => 192.168.1.1 ) [1] => ...)) or empty array.
name DHCP_getDynamicRanges() description Получает все динамические диапазоны IP из dhcpd.conf. returns Ассоциативный массив с найденными диапазонами IP (например, Array ( [0] => Array ( [netmask] => 255.255.255.0 [firstIP] => 192.168.1.10 [lastIP] => 192.168.1.200 [gateway] => 192.168.1.1 ) [1] => ...)) или пустой масс...
function DHCP_getDynamicRanges() { $i = 0; $out = array(); //Get all lines from dhcpd.conf that define dynamic ranges exec('grep range '.DHCPD_CONF_FILE.' | grep -v \' host \'', $allLines); //Run thru the found lines foreach ($allLines as $line) { //Split the lines into options (etmask, ange, ...) $options...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_getNetmaskOfDynamicRanges($firstIP)\n{\n\tforeach (DHCP_getDynamicRanges() as $range)\n\t\tif ($range['firstIP'] == $firstIP)\n\t\t\treturn($range['netmask']);\n\treturn(false);\n}", "public function getAllowedIPRanges()\n {\n return $this->_getVar('user_allowed_ip_ranges');\n }", "f...
[ "0.63937455", "0.6235874", "0.615053", "0.6092572", "0.59605604", "0.57937956", "0.5778451", "0.5757761", "0.57140714", "0.57106405", "0.5657661", "0.565605", "0.5650526", "0.5628865", "0.5619578", "0.5619578", "0.5619578", "0.5597532", "0.5565923", "0.55224144", "0.5512112",...
0.88476723
0
name DHCP_getNetmaskOfDynamicRanges($firstIP) description Gets the netmask of a dynamic range identified by the first IP of the range. parameter firstIP: The first IP marking the begin of the dynamic IP range. returns Netmask or false in case of an error.
name DHCP_getNetmaskOfDynamicRanges($firstIP) description Получает маску подсети динамического диапазона, идентифицированного первым IP-адресом диапазона. parameter firstIP: Первый IP-адрес, указывающий начало динамического диапазона IP-адресов. returns Маска подсети или false в случае ошибки.
function DHCP_getNetmaskOfDynamicRanges($firstIP) { foreach (DHCP_getDynamicRanges() as $range) if ($range['firstIP'] == $firstIP) return($range['netmask']); return(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_addDynamicRange($firstIP, $lastIP, $netmask, $gateway)\n{\n\t$subnet = CLIENT_getSubnet($firstIP, $netmask);\n\t$broadcast = CLIENT_getBroadcast($firstIP, $netmask);\n\n\t$insertText = \"subnet $subnet netmask $netmask { range $firstIP $lastIP; option broadcast-address $broadcast; option routers $gat...
[ "0.65532035", "0.64339685", "0.6045092", "0.5295948", "0.5111724", "0.5009996", "0.49597487", "0.49475974", "0.4912007", "0.48910576", "0.4866238", "0.48165044", "0.47882974", "0.47797662", "0.47647944", "0.47273254", "0.47175774", "0.47155017", "0.47088632", "0.47035614", "0...
0.9122001
0
name DHCP_delDynamicRange($firstIP, $lastIP) description Removes a dynamic IP range from the dhcpd.conf and restarts the DHCP server. parameter firstIP: The first IP marking the begin of the dynamic IP range. parameter lastIP: The last IP marking the end of the dynamic IP range. returns true, if the DHCP server could b...
name DHCP_delDynamicRange($firstIP, $lastIP) description Удаляет динамический диапазон IP-адресов из dhcpd.conf и перезапускает сервер DHCP. parameter firstIP: Первый IP-адрес, обозначающий начало динамического диапазона IP-адресов. parameter lastIP: Последний IP-адрес, обозначающий конец динамического диапазона IP-адр...
function DHCP_delDynamicRange($firstIP, $lastIP) { //Get the netmask of the dynamic range before deleting the range $netmask = DHCP_getNetmaskOfDynamicRanges($firstIP); //Prepare and execute sed $firstIPSed = str_replace('.', '\.', $firstIP); $lastIPSed = str_replace('.', '\.', $lastIP); SERVER_waitForLock('/m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_addDynamicRange($firstIP, $lastIP, $netmask, $gateway)\n{\n\t$subnet = CLIENT_getSubnet($firstIP, $netmask);\n\t$broadcast = CLIENT_getBroadcast($firstIP, $netmask);\n\n\t$insertText = \"subnet $subnet netmask $netmask { range $firstIP $lastIP; option broadcast-address $broadcast; option routers $gat...
[ "0.6526334", "0.55249095", "0.53846526", "0.5299269", "0.4784387", "0.46765235", "0.4650193", "0.46396062", "0.4622743", "0.45804822", "0.4543807", "0.45311603", "0.4472608", "0.44019273", "0.43719098", "0.43396297", "0.43265742", "0.4324103", "0.43239087", "0.43213162", "0.4...
0.8736791
0
name DHCP_bootTypeToNewFormat($bootType) description Converts a boolean boot type to the new string format. parameter bootType: Boolean or string format (e.g. "pxe") boot type. returns String format (e.g. "pxe") boot type.
name DHCP_bootTypeToNewFormat($bootType) description Преобразует тип загрузки в новый строковый формат. parameter bootType: Тип загрузки в виде булевого значения или строки (например, "pxe"). returns Тип загрузки в строковом формате (например, "pxe").
function DHCP_bootTypeToNewFormat($bootType) { //Needed for old format that allows only boolean values if (is_bool($bootType)) { if ($bootType) $bootType = CClient::BOOTTYPE_PXE; else $bootType = CClient::BOOTTYPE_ETHERBOOT; } return($bootType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function SystemTypeToName($systemType)\n\t\t{\n\t\t\tswitch($systemType)\n\t\t\t{\n\t\t\tcase 0x00: return 'Vide';\n\t\t\tcase 0x01: return 'FAT12';\n\t\t\tcase 0x02: return 'XENIX root';\n\t\t\tcase 0x03: return 'XENIX /usr';\n\t\t\tcase 0x04: return 'FAT16 <32Mio (adressage CHS)';\n\t\t\tcase 0x05:...
[ "0.50909144", "0.4997285", "0.4807228", "0.48022026", "0.48000032", "0.4702476", "0.46958926", "0.46170536", "0.45783234", "0.45709288", "0.45704108", "0.45486087", "0.45358753", "0.4530989", "0.45246682", "0.45198828", "0.45165583", "0.4510342", "0.45035642", "0.44686645", "...
0.88988894
0
name DHCP_runScript($command, $clientName, $ip, $netmask, $mac, $bootType, $gateway) description Runs the script for controlling an external DHCP server. parameter command: 'add' for adding an entry to the DHCP server or 'remove' for removing. parameter clientName: name of the client parameter ip: ip address of the cli...
name DHCP_runScript($command, $clientName, $ip, $netmask, $mac, $bootType, $gateway) description Запускает скрипт для управления внешним сервером DHCP. parameter command: 'add' для добавления записи в сервер DHCP или 'remove' для удаления. parameter clientName: имя клиента parameter ip: IP-адрес клиента parameter netma...
function DHCP_runScript($command, $clientName, $ip='', $netmask='', $mac='', $bootType='', $gateway='') { if (file_exists('/m23/bin/externalDHCPControl.sh')) SERVER_runInBackground('DHCP_runScript', "/m23/bin/externalDHCPControl.sh $command $clientName $ip $netmask $mac $bootType $gateway", "root", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_addClient($clientName, $ip, $netmask, $mac, $bootType, $gateway, $updateDB = true)\n{\n\t$subnet = CLIENT_getSubnet($ip, $netmask);\n\n\t//ensure we have a right formated\n\t$mac = CLIENT_convertMac($mac, \":\");\n\n\t$bootType = DHCP_bootTypeToNewFormat($bootType);\n\t$broadcast = CLIENT_getBroadcas...
[ "0.6850656", "0.52262527", "0.5170355", "0.5161857", "0.51604676", "0.50189215", "0.4985377", "0.49748367", "0.4918002", "0.47504565", "0.47450212", "0.4702657", "0.4702657", "0.46815816", "0.46101856", "0.45765957", "0.4570073", "0.45582542", "0.45526353", "0.4531831", "0.45...
0.84385926
0
name DHCP_addClient($clientName, $ip, $netmask, $mac, $bootType, $gateway, $updateDB = true) description adds a new client to the dhcpd.conf and restarts the dhcpdserver parameter clientName: name of the client parameter ip: ip address of the client parameter netmask: netmask for the ip parameter mac: mac addresse of t...
name DHCP_addClient($clientName, $ip, $netmask, $mac, $bootType, $gateway, $updateDB = true) description добавляет нового клиента в dhcpd.conf и перезапускает dhcpdserver параметр clientName: имя клиента параметр ip: IP-адрес клиента параметр netmask: маска подсети для IP параметр mac: MAC-адрес сетевой карты параметр ...
function DHCP_addClient($clientName, $ip, $netmask, $mac, $bootType, $gateway, $updateDB = true) { $subnet = CLIENT_getSubnet($ip, $netmask); //ensure we have a right formated $mac = CLIENT_convertMac($mac, ":"); $bootType = DHCP_bootTypeToNewFormat($bootType); $broadcast = CLIENT_getBroadcast($ip,$netmask); S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add($client){\n\t if(!is_object($client)) return -1;\n\t $req = \"INSERT INTO Client(idClient,FirstName,LastName,Birthday,Email,Password,Address) VALUES('\"\n\t .$client->getIdPerson().\n\t \"','\"\n\t .$client->getFirstName().\n\t \"','\"\n\t .$client->getLastName().\n\t \"','\"\n\t .$cli...
[ "0.6033936", "0.5943472", "0.5814566", "0.5807584", "0.5686043", "0.5679671", "0.5667837", "0.56600755", "0.5650214", "0.5590253", "0.55581576", "0.5541657", "0.5512834", "0.5465349", "0.5442058", "0.5438907", "0.5410484", "0.5397056", "0.53202116", "0.53060573", "0.52874035"...
0.8421129
0
name DHCP_addLineToDHCPDConf($line) description Adds a line to the dhcpd.conf file. parameter line: Line to add.
name DHCP_addLineToDHCPDConf($line) description Добавляет строку в файл dhcpd.conf. parameter line: Строка для добавления.
function DHCP_addLineToDHCPDConf($line) { $cmds = "echo \"$line\" > /m23/dhcp/dhcpdtop; cat ".DHCPD_CONF_FILE." >> /m23/dhcp/dhcpdtop; cat /m23/dhcp/dhcpdtop > ".DHCPD_CONF_FILE."; rm /m23/dhcp/dhcpdtop; "; SERVER_runInBackground('DHCP_addLineToDHCPDConf', $cmds, 'root', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addLine($line) {\n\t\treturn $this->_entryAdd($this->_parseLine($line));\n\t}", "function add_line($so_invoice_line) // receives an associative array of line info\n {\n $line_data=$so_invoice_line->get_data();\n $this->_data['so_invoice_lines']['line' . $line_data['line']] = $line_data;\n ...
[ "0.5957055", "0.5796797", "0.57444733", "0.56380594", "0.55910814", "0.55123025", "0.5495448", "0.5475692", "0.52924603", "0.5255035", "0.5237635", "0.5219648", "0.52140427", "0.51573455", "0.51419365", "0.51210505", "0.51210505", "0.5075888", "0.5056157", "0.50455797", "0.50...
0.85393864
0
name DHCP_restartDHCPserver() description Restarts the DHCP server. returns true if it clould be (re)started otherwise false.
name DHCP_restartDHCPserver() description Перезапускает сервер DHCP. возвращает true, если сервер был (пере)запущен, иначе false.
function DHCP_restartDHCPserver() { // ,'dnsmasq' foreach (array('dhcp', 'dhcp3-server', 'isc-dhcp-server') as $daemon) { if (file_exists("/etc/init.d/$daemon")) { if (trim(SERVER_runInBackground('DHCP_restartDHCPserver', "/etc/init.d/$daemon restart && echo ok", "root", false)) != "ok") return(false); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restartServer($client_package_id)\n {\n return $this->apiRequest(\"RestartByBillingId\", array(\"client_package_id\" => $client_package_id));\n }", "public function restartService() : bool {\n $service = CommandFactory::command('restart', $this->request);\n return $ser...
[ "0.61122537", "0.60809773", "0.5594062", "0.55106026", "0.55053425", "0.54183", "0.5349294", "0.5193683", "0.5187408", "0.50479716", "0.499263", "0.49923682", "0.49835092", "0.49540564", "0.49284506", "0.49258602", "0.4896596", "0.48943886", "0.48630488", "0.48310322", "0.480...
0.7231141
0
name DHCP_rmClient($clientName) description removes a client from dhcpd.conf and restarts the dhcpdserver parameter clientName: name of the client
name DHCP_rmClient($clientName) description удаляет клиента из dhcpd.conf и перезапускает dhcpdserver параметр clientName: имя клиента
function DHCP_rmClient($clientName) { $bootType = CLIENT_getBootType($clientName); if (!HELPER_isExecutedOnUCS()) $ret = SERVER_waitForLock('/m23/tmp/DHCP_rmClient.lock'); DHCP_runScript('remove', $clientName); if ($bootType == CClient::BOOTTYPE_GPXE) return(true); // If run on UCS => The DHCP server is ha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_removePXEcfg($clientName)\n{\n\t$iphex = DHCP_calcPXEIP(CLIENT_getIPbyName($clientName));\n\tSERVER_deleteFile(\"/m23/tftp/pxelinux.cfg/$iphex\");\n}", "function delete($client)\n {\n }", "public function destroy(Client $client)\n {\n //\n }", "public function unlockClient($client_id...
[ "0.64962554", "0.59754705", "0.59438807", "0.59407973", "0.59259963", "0.59259963", "0.59259963", "0.59259963", "0.59259963", "0.59259963", "0.59259963", "0.59259963", "0.59259963", "0.59259963", "0.59259963", "0.59259963", "0.58929497", "0.5887601", "0.57582325", "0.57466936",...
0.8494464
0
name DHCP_setBootimage($clientName, $bootImage) description sets the bootimage of a client for EtherBoot parameter clientName: name of the client parameter bootImage: name of the bootimage (hdboot, ip address for name)
name DHCP_setBootimage($clientName, $bootImage) description устанавливает bootimage клиента для параметра EtherBoot parameter clientName: имя клиента parameter bootImage: имя bootimage (hdboot, ip address for name)
function DHCP_setBootimage($clientName, $bootImage) { $ip = CLIENT_getIPbyName($clientName); $cmds = "cd /m23/tftp/; rm $ip ; ln -s $bootImage $ip"; SERVER_runInBackground('DHCP_setBootimage', $cmds, 'root', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_activateBoot($clientName, $on, $bootType = 'x')\n{\n// \tprint(\"cl: $clientName ison:\".serialize(DHCP_isNetworkBootingActive($clientName)).\" on:\".serialize($on));\n\n\t//(De)Activate network booting on the VM\n\tVM_activateNetboot($clientName, $on);\n\n\t/*\n\t\tCheck if the current state is diff...
[ "0.5975587", "0.5783448", "0.52924913", "0.5121131", "0.51136833", "0.5022166", "0.49415547", "0.49394003", "0.49394003", "0.49345115", "0.4909016", "0.489537", "0.489368", "0.4892118", "0.4889598", "0.4877378", "0.48695543", "0.4845981", "0.4845981", "0.4844769", "0.48175576...
0.82742673
0
name DHCP_activateBoot($clientName, $on, $bootType = 'x') description switches the network boot on or off parameter clientName: name of the client parameter on: true activates the network boot, false deactivates parameter bootType: The boot type CAN be given here (e.g. pxe or etherboot)
name DHCP_activateBoot($clientName, $on, $bootType = 'x') description включает или выключает сеть загрузки параметр clientName: имя клиента параметр on: true включает сеть загрузки, false выключает параметр bootType: Тип загрузки может быть указан здесь (например, pxe или etherboot)
function DHCP_activateBoot($clientName, $on, $bootType = 'x') { // print("cl: $clientName ison:".serialize(DHCP_isNetworkBootingActive($clientName))." on:".serialize($on)); //(De)Activate network booting on the VM VM_activateNetboot($clientName, $on); /* Check if the current state is different from the desired ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_setBootimage($clientName, $bootImage)\n{\n\t$ip = CLIENT_getIPbyName($clientName);\n\t$cmds = \"cd /m23/tftp/; rm $ip ; ln -s $bootImage $ip\";\n\n\tSERVER_runInBackground('DHCP_setBootimage', $cmds, 'root', false);\n}", "function DHCP_isNetworkBootingActive($clientName)\n{\n\t$ret = trim(SERVER_ru...
[ "0.6146277", "0.5797802", "0.56327444", "0.55799764", "0.548515", "0.5286168", "0.52082866", "0.5196053", "0.5196053", "0.5179007", "0.5131808", "0.5082574", "0.5053642", "0.50272465", "0.49978098", "0.499605", "0.4932714", "0.4932714", "0.49021468", "0.4901432", "0.4882398",...
0.86778
0
name DHCP_calcPXEIP($ip) description calculates the ip for the pxe config file parameter ip: ip address to convert to the PXE file name
name DHCP_calcPXEIP($ip) description вычисляет ip для параметра файла конфигурации pxe ip: ip-адрес, который нужно преобразовать в имя файла pxe
function DHCP_calcPXEIP($ip) { return(str_pad(strtoupper(dechex(ip2longSafe($ip))), 8, 0, STR_PAD_LEFT)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iptohex($ip) {\n\t\t\tif (!IPv4::validate_ip($ip))\n\t\t\t\treturn false;\n\n\t\t\t$values = explode(\".\", $ip);\n\n\t\t\tforeach ($values as $index => $value)\n\t\t\t\t$values[$index] = sprintf(\"%02s\", dechex($value));\n\n\t\t\treturn implode(\"\", $values);\n\t\t}", "function inet_ptod($ip_address)...
[ "0.595495", "0.584008", "0.5812749", "0.5606408", "0.55720145", "0.55692196", "0.5551586", "0.550291", "0.5498919", "0.5469302", "0.5419543", "0.5406461", "0.5398319", "0.53795785", "0.53733665", "0.53713185", "0.53588945", "0.5342613", "0.53360987", "0.5335066", "0.5329536",...
0.86041665
0
name DHCP_writePXEcfg($clientName, $clientID, $arch) description writes the pxe config file for te client parameter clientName: name of the client parameter clientID: ID of the client parameter arch: computer architecture (i386 or amd64)
name DHCP_writePXEcfg($clientName, $clientID, $arch) description записывает файл pxe конфигурации для клиента parameter clientName: имя клиента parameter clientID: идентификатор клиента parameter arch: архитектура компьютера (i386 или amd64)
function DHCP_writePXEcfg($clientName, $clientID, $arch) { include('/m23/inc/kernelRamDisk.inc'); $iphex=DHCP_calcPXEIP(CLIENT_getIPbyName($clientName)); $fileName = "/m23/tftp/pxelinux.cfg/$iphex"; $m23server = getServerIP(); $fp=fopen($fileName, "w"); if (!($fp > 0)) die("Cannot open /m23/tftp/pxelinux.cf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_removePXEcfg($clientName)\n{\n\t$iphex = DHCP_calcPXEIP(CLIENT_getIPbyName($clientName));\n\tSERVER_deleteFile(\"/m23/tftp/pxelinux.cfg/$iphex\");\n}", "function DHCP_exportDHCPSettingsForExternalDHCPServer()\n{\n\t$serverIP = getServerIP();\n\n\t//Get all host lines of the DHCP config file\n\t$cmd...
[ "0.6528335", "0.5710751", "0.56285083", "0.55004346", "0.5328415", "0.53114253", "0.52950585", "0.526991", "0.5213423", "0.5176886", "0.51567143", "0.5077787", "0.4961604", "0.49505883", "0.49028933", "0.48431277", "0.48139593", "0.47975653", "0.47820947", "0.47684354", "0.47...
0.89243615
0
name DHCP_removePXEcfg($clientName) description removes the PXE start file for a special client parameter clientName: name of the client
name DHCP_removePXEcfg($clientName) description удаляет файл запуска PXE для специального параметра клиента clientName: имя клиента
function DHCP_removePXEcfg($clientName) { $iphex = DHCP_calcPXEIP(CLIENT_getIPbyName($clientName)); SERVER_deleteFile("/m23/tftp/pxelinux.cfg/$iphex"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_rmClient($clientName)\n{\n\t$bootType = CLIENT_getBootType($clientName);\n\n\tif (!HELPER_isExecutedOnUCS())\n\t\t$ret = SERVER_waitForLock('/m23/tmp/DHCP_rmClient.lock');\n\n\tDHCP_runScript('remove', $clientName);\n\n\tif ($bootType == CClient::BOOTTYPE_GPXE)\n\t\treturn(true);\n\n\t// If run on UC...
[ "0.7543246", "0.641295", "0.56223416", "0.5401771", "0.53603697", "0.53330636", "0.5317525", "0.5239533", "0.5194515", "0.518223", "0.512102", "0.50971353", "0.50971353", "0.5089591", "0.5089565", "0.5003182", "0.49830353", "0.49505293", "0.49494243", "0.49281642", "0.4898594...
0.88766813
0
name DHCP_isNetworkBootingActive($clientName) description Checks, if a client has network booting enabled. parameter clientName: name of the client returns: True, if network booting is active, false otherwise.
name DHCP_isNetworkBootingActive($clientName) description Проверяет, включено ли сетевое загрузка у клиента. parameter clientName: имя клиента returns: True, если сетевая загрузка активна, false в противном случае.
function DHCP_isNetworkBootingActive($clientName) { $ret = trim(SERVER_runInBackground('DHCP_isNetworkBootingActive', "grep 'host $clientName ' ".DHCPD_CONF_FILE." -c", "root", false)); return(is_numeric($ret) && ($ret > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DHCP_activateBoot($clientName, $on, $bootType = 'x')\n{\n// \tprint(\"cl: $clientName ison:\".serialize(DHCP_isNetworkBootingActive($clientName)).\" on:\".serialize($on));\n\n\t//(De)Activate network booting on the VM\n\tVM_activateNetboot($clientName, $on);\n\n\t/*\n\t\tCheck if the current state is diff...
[ "0.68213254", "0.6118656", "0.57474464", "0.5414947", "0.5414947", "0.5414947", "0.5414947", "0.5396739", "0.53843087", "0.53804433", "0.53796", "0.531364", "0.531364", "0.531364", "0.5309746", "0.53040606", "0.5260841", "0.5237092", "0.52061653", "0.5048715", "0.5046335", ...
0.85667557
0
Prepare for Dusk test execution.
Подготовьтесь к выполнению теста Dusk.
public static function prepare() { if (! static::runningInSail()) { static::startChromeDriver(); } (new Filesystem)->put( __DIR__ . '/../storage/framework/testing/duskdb.sqlite', '' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepare()\n {\n Browser::$storeScreenshotsAt = storage_path('app/dusk-browser/screenshots');\n\n Browser::$storeConsoleLogAt = storage_path('app/dusk-browser/console');\n\n if (config('dusk-browser.remote_web_driver_url') === 'http://localhost:9515') {\n static...
[ "0.7807159", "0.7043412", "0.69466376", "0.6841133", "0.68021", "0.68021", "0.68021", "0.67602116", "0.67602116", "0.67068356", "0.6687024", "0.6654492", "0.66145194", "0.66122365", "0.66122365", "0.66122365", "0.66122365", "0.65975803", "0.65091175", "0.6497464", "0.64890516...
0.7460773
1
Rollbacks a notebook instance to the previous version.
Откатывает экземпляр ноутбука к предыдущей версии.
public function RollbackInstance(\Google\Cloud\Notebooks\V1\RollbackInstanceRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/RollbackInstance', $argument, ['\Google\LongRunning\Operation', 'decode'], $metad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rollback() {\n $this->rolledBack = TRUE;\n $this->connection->rollback($this->name);\n }", "public static function rollback() {\n\t\tself::query(\"rollback\");\n\t}", "public function revert() {\n\t\t$this->_position = array_pop( $this->_rollback );\n\t}", "public function rollback();"...
[ "0.68132174", "0.67438304", "0.6733965", "0.6682793", "0.6682793", "0.6682793", "0.6682793", "0.6682793", "0.6682793", "0.6682793", "0.6682793", "0.6682793", "0.6627274", "0.66080767", "0.66080767", "0.65506935", "0.6523228", "0.64660525", "0.64390785", "0.64340293", "0.63978...
0.75677645
0
Constructor receive server adapter, adapter api authentication and http client details. Initialise the http client and make it available for use by the server adapter.
Конструктор получает серверный адаптер, детали аутентификации API адаптера и http-клиента. Инициализирует http-клиент и делает его доступным для использования серверным адаптером.
public function __construct(ServerAdapterInterface $adapter, HttpClientInterface $client = null) { $this->init($adapter, $client); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(Adapter\\IClient $adapter) {\n $this->_adapter = $adapter;\n }", "protected function initializeClient()\n {\n $this->http = new Client([\n 'base_uri' => self::API_ENDPOINT,\n 'cookies' => true,\n 'headers' => [\n 'Use...
[ "0.72908765", "0.7018381", "0.70054996", "0.69782585", "0.69739074", "0.683814", "0.6791763", "0.6769952", "0.67642325", "0.6748256", "0.67459893", "0.67304343", "0.6719363", "0.67051893", "0.6702716", "0.6671132", "0.6668464", "0.66601276", "0.6653399", "0.664499", "0.664362...
0.7920783
0
/ Model_Lesiones Tipo de Lesiones
/ Модель_Повреждений Тип_Повреждений
public function getTipoDeLesiones() { $this->db->select("LSN_PK, LSN_MENU_LEVEL, LSN_PARENT_LESION, LSN_CHILD_LESION, LSN_DESCRIPCION, LSN_CREATED, LSN_CREATED_BY, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getTipo();", "function getTipoRicevuta();", "public function tipoNomina()\n {\n return $this->belongsTo('App\\CatalogoNomina', 'tipo_nomina_id', 'id');\n }", "public function getClassifica(){\n\t\t$this->db->setvariabili($this->tabella,\"1 \",\"\");\n\t return $this->db->...
[ "0.64980763", "0.6361093", "0.63314396", "0.6275331", "0.6271965", "0.61240447", "0.6119801", "0.61164224", "0.6067098", "0.6065412", "0.60574", "0.60507905", "0.6048069", "0.60343117", "0.6031258", "0.60295063", "0.6019474", "0.6016279", "0.59977007", "0.59643036", "0.595719...
0.7034052
0
/ Sends a notification email to the site admin if there was a thrown exception while attempting to send an email.
Отправляет уведомление по электронной почте администратору сайта, если при попытке отправить электронное письмо произошло исключение.
function qb_notify_admin_mandrill_error( $exception, $email ) { $email_html = ' <h2>Mandrill Exception Thrown - Welcome Email</h2> <p>A Mandrill exception was thrown just now, while the system was attempting to send a welcome email to a new member: </p> <p><strong>' . $exception . '</strong></p> <p>The send f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendErrorEmail()\n {\n $adminEmail = Email::config()->get('admin_email');\n\n if ($adminEmail) {\n $email = Email::create();\n\n $email->setTo($adminEmail);\n $email->setReplyTo($adminEmail);\n $email->setSubject('Error occurred during pr...
[ "0.7152094", "0.6967612", "0.6687695", "0.66559774", "0.6615287", "0.65909", "0.6587671", "0.6573118", "0.6527992", "0.6507672", "0.64896125", "0.6487262", "0.6459537", "0.64274627", "0.63926655", "0.6361759", "0.6358911", "0.6355476", "0.635433", "0.63501793", "0.6345862", ...
0.70011824
1
Generates a thumbnail gallery of the specified directory
Генерирует галерею миниатюр указанной директории
public function imageGallery($path) { $files = scandir(WWW_ROOT . $path); $html=""; foreach($files as $file) { $html .= '<li class="span3"><div class="thumbnail"><div class="text-center"><img src="' . $this->webroot . $path . '/' . $file . '"/><p><strong>' . $file . '</strong></p>' . $this->actionButtons($pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPhotos($path)\n{\n $path = photoRoot . \"_thumb\" . $path;\n $files = scandir($path);\n $displayedItems = 0;\n foreach ($files as $key => $value) {\n $realPath = realpath($path . DIRECTORY_SEPARATOR . $value);\n if (isValidImage($realPath)) {\n $imageSrc = $path ...
[ "0.68059343", "0.6568248", "0.65250075", "0.6326427", "0.63014084", "0.6287555", "0.62831163", "0.62779", "0.61986595", "0.61924326", "0.61714035", "0.6164824", "0.615956", "0.615342", "0.6146534", "0.61295134", "0.61071134", "0.6102488", "0.6091019", "0.6074822", "0.60639906...
0.70006526
0
Sets a bad gateway status code in the response
Устанавливает код состояния bad gateway в ответе
public function setBadGateway() { return new Response('FooBar', ResponseHeaders::HTTP_BAD_GATEWAY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function general_error_response() {\n\thttp_response_code(400);\n\tdie();\n}", "private function __failed()\n {\n $this->response(array(\n 'status' => 'failed'\n ), 403);\n }", "protected function setResponseCode()\n {\n http_response_code($this->statusCode);\...
[ "0.69926256", "0.69005615", "0.6836075", "0.6788581", "0.673527", "0.66589373", "0.6584587", "0.6578573", "0.65550506", "0.6540459", "0.6536142", "0.6523655", "0.65118533", "0.6501622", "0.646709", "0.64494365", "0.64426607", "0.6432368", "0.6426015", "0.6394263", "0.6393271"...
0.7768604
0
Sets an OK response
Устанавливает ответ OK
public function setOK() { return new Response('FooBar', ResponseHeaders::HTTP_OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function showOk() {\n $response = new Phalcon\\Http\\Response();\n $response->setStatusCode(200, \"OK\");\n $response->send();\n }", "private function _okResponse($data) {\n $this->_response_data = array('result' => 'OK');\n $this->_response_code = 200;\n }"...
[ "0.775989", "0.7354708", "0.7052431", "0.7028004", "0.67102927", "0.6648155", "0.65996444", "0.6561455", "0.6546966", "0.65399605", "0.6499427", "0.64958704", "0.64877915", "0.64706534", "0.6470282", "0.6460931", "0.6438934", "0.64111924", "0.6396396", "0.63708246", "0.633572...
0.7410506
1
Sets an unauthorized response
Устанавливает ответ с неавторизованным запросом
public function setUnauthorized() { return new Response('FooBar', ResponseHeaders::HTTP_UNAUTHORIZED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unauthorizedAction()\n {\n $this->getResponse()\n ->setHttpResponseCode(401);\n }", "public function send_unauthorized_headers($response)\n {\n }", "protected function unauthorized()\n {\n return $this->responseFactory->generateResponse(\n ...
[ "0.7699096", "0.7561202", "0.75194836", "0.7389981", "0.7226488", "0.71985114", "0.70892406", "0.69605243", "0.69038516", "0.68450737", "0.68356687", "0.67955124", "0.67560416", "0.6688451", "0.6682075", "0.6645237", "0.6618208", "0.65712714", "0.65680295", "0.6499368", "0.64...
0.7846755
0
Shows "FooBar" in the response content
Показывает "FooBar" в содержимом ответа
public function showFooBar() { return new Response('FooBar'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFoo(){\n return $this->getResponse();\n\n //or to return something, if desired.\n\n return $this->getResponse()->setContent('<h1>Hi there</h1>');\n }", "public function __toString(){\n\t\t\treturn $this->response()->getContent();\n\t\t}", "static protected function pl...
[ "0.6759697", "0.6757526", "0.6615827", "0.65085554", "0.6498195", "0.6488829", "0.643799", "0.6416652", "0.6386912", "0.63860035", "0.63818", "0.6373581", "0.634419", "0.63033855", "0.62881595", "0.62710357", "0.6269876", "0.62697077", "0.622398", "0.622061", "0.62138116", ...
0.76844394
0
get the cart data db by token
получить данные корзины из БД по токену
public function getCartDataFromDbByToken($token) { return $this->order->getOrderDetailsByToken($token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCartDataUserLoggedIn()\n {\n //data in the local broswer storage that needs\n // to be synced with the db or vice versa ..\n\n // steps to procede \n // \n if (Request::hasCookie('gh_token')) {\n return $this->getCartDataByToken();\n } else {\n return $this->ge...
[ "0.6547752", "0.6525444", "0.6465407", "0.6321668", "0.62855923", "0.62855923", "0.62825763", "0.62137645", "0.6204765", "0.61503744", "0.6058849", "0.6053393", "0.60520566", "0.5992672", "0.594381", "0.59411716", "0.5902835", "0.59003043", "0.5876742", "0.587582", "0.5853502...
0.815568
0
Renders the publish view for the module
Отображает представление публикации для модуля
public function actionPublish() { return $this->render('publish'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex()\n {\n return $this->render('publish');\n }", "public function publishAction() {\r\n\r\n //CHECK USER VALIDATION\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //GET LISTING ID AND OBJECT\r\n $listing_id = $t...
[ "0.7777341", "0.71056867", "0.70770085", "0.6969048", "0.6879326", "0.6750074", "0.6748119", "0.6689847", "0.6678244", "0.6599593", "0.65521073", "0.6533235", "0.65032375", "0.64684594", "0.64309365", "0.6379098", "0.63678247", "0.6357026", "0.6353546", "0.634486", "0.6328546...
0.8353806
0
Renders the material view for the module
Отображает представление материала для модуля
public function actionMaterial() { return $this->render('material'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return view('admin.material.index', [\n 'title' => 'Material',\n 'subtitle' => '',\n 'active' => 'material.index',\n 'data' => Material::all()\n ]);\n }", "public function render()\n {\n return view('advantage...
[ "0.7008204", "0.69485885", "0.694815", "0.6933919", "0.6877328", "0.6863017", "0.6790406", "0.6780163", "0.6777726", "0.67420137", "0.6691292", "0.66509116", "0.66503304", "0.6612688", "0.66080725", "0.6606815", "0.6600656", "0.65521675", "0.6543453", "0.6543453", "0.6543453"...
0.806879
0
Renders the panorama view for the module
Отображает вид панорамы для модуля
public function actionPanorama() { return $this->render('panorama'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function view() {\n $this->prepareForViewImage('view', [\n 'bgImage' => $this->bgImage,\n 'bgImage_alt' => false\n ], [\n 'thumbnail' => false,\n 'thumbnailWidth' => false,\n 'thumbnailHeight' => false,\n 'thumbnai...
[ "0.6389204", "0.6317655", "0.6300957", "0.6216199", "0.61227417", "0.60597545", "0.6014724", "0.6012697", "0.5989486", "0.59665936", "0.5950354", "0.5942459", "0.59221786", "0.58991057", "0.58893806", "0.5869631", "0.58284837", "0.58192456", "0.57692266", "0.5768916", "0.5768...
0.8350677
0
audio data generate from tone
аудио данные, сгенерированные из тона
function toneData($tone, $period) { if ($tone == 'R') { $tone_hz = 0; } else { $tone_hz = $this->tone_list[$tone]; } $amp = 100; // max:127 $data = ''; for ($i = 0 ; $i < $this->freq * $period ; $i++) { $value = sin(2 * M_PI * ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAudioData(): string;", "function playData($text) {\r\n $data = '';\r\n $text = str_replace(' ', '', $text);\r\n preg_match_all('/([C-GABR])([0-9]+)/i', $text, $matches);\r\n foreach ($matches[1] as $idx => $tone) {\r\n $note_div = $matches[2][$idx];\r\n ...
[ "0.65540326", "0.56563854", "0.5632742", "0.56001985", "0.5589528", "0.5482556", "0.53476584", "0.5338614", "0.5338614", "0.53227216", "0.51165485", "0.51085675", "0.51041925", "0.509079", "0.50043094", "0.5004126", "0.49728224", "0.49557042", "0.49187326", "0.49170354", "0.4...
0.7718527
0
Map list of model to list of dto.
Сопоставить список моделей с списком dto.
public function listModelToDto($modelList, &$dtoList = null) { $dtoList = ($dtoList != null) ? $dtoList : array(); foreach ($modelList as $model) { $dtoList[] = $this->modelToDto($model); } return $dtoList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function toListDto($items)\n {\n return $items->map(function ($item){\n return ShopDto::toDto($item);\n });\n }", "protected function model_to_dto( $model ) {\n\t\treturn $model->to_dto();\n\t}", "public function toModel($dto);", "private function mapDependencies(...
[ "0.61144155", "0.5626747", "0.5565235", "0.5520895", "0.52934116", "0.5274635", "0.52609855", "0.52069193", "0.5204936", "0.51959974", "0.5174174", "0.510364", "0.51022685", "0.508042", "0.5005323", "0.49444336", "0.49320564", "0.4895309", "0.48860478", "0.4878031", "0.486442...
0.73470354
0
Base currency to manage exchange rates. Get base currency of the app
Основная валюта для управления курсами обмена. Получить основную валюту приложения
public function getBaseCurrency() { return self::$DEFAULT_BASE_CURRENCY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBaseCurrency(){\n return $this->baseCurrency;\n }", "public function getBaseCurrency()\n {\n return (is_null($this->baseCurrency)) ? 'EUR' : $this->baseCurrency;\n }", "abstract public function getBaseCurrency();", "public function getBaseCurrency()\n {\n $...
[ "0.8397144", "0.82507396", "0.82489586", "0.8095132", "0.8086956", "0.8053853", "0.7994054", "0.7992645", "0.7832499", "0.77954084", "0.77780676", "0.77780676", "0.7750364", "0.75939506", "0.7583535", "0.7561548", "0.75410956", "0.75410956", "0.75410956", "0.75311005", "0.750...
0.844887
0
Returns current request method for a given environment or current one
Возвращает текущий метод запроса для заданной среды или текущей
public static function request_method($env = null) { if(is_null($env)) $env = self::env(); $m = array_key_exists('REQUEST_METHOD', $env['SERVER']) ? $env['SERVER']['REQUEST_METHOD'] : null; if($m == "POST" && array_key_exists('_method', $env['POST'])) $m = strtoupper($env['POST']['_method']); i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRequestMethod() {\n return $this->getEnvironmentParameter('REQUEST_METHOD');\n }", "private function getRequestMethod()\r\n {\r\n return $_SERVER['REQUEST_METHOD'];\r\n }", "public function getRequestMethod() {\n\t\treturn (isset($this->SERVER['REQUEST_METHOD'])) ? $th...
[ "0.78820306", "0.7742359", "0.7731821", "0.7715173", "0.7709889", "0.7709482", "0.7689371", "0.7684554", "0.765309", "0.7641941", "0.7634939", "0.7621055", "0.7611443", "0.75985974", "0.75890666", "0.75875854", "0.758719", "0.75732183", "0.75724506", "0.75711834", "0.75624406...
0.7902735
0
Returns an HTTP response status string for a given code
Возвращает строку статуса HTTP-ответа для заданного кода
public function http_response_status_code($num) { if($str = self::http_response_status($num)) return "HTTP/1.1 $num $str"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function status_code_string ($code) {\n\tswitch ($code) {\n\t\tcase 201:\n\t\t\t$string_code = '201 Created';\n\t\t\tbreak;\n\t\tcase 202:\n\t\t\t$string_code = '202 Accepted';\n\t\t\tbreak;\n\t\tcase 301:\n\t\t\t$string_code = '301 Moved Permanently';\n\t\t\tbreak;\n\t\tcase 302:\n\t\t\t$string_code = '302 Found'...
[ "0.82549363", "0.80595565", "0.7951913", "0.7875355", "0.78603107", "0.78070843", "0.7800221", "0.7762237", "0.7737925", "0.7724054", "0.77169245", "0.76514405", "0.7624093", "0.76227695", "0.7602796", "0.7600776", "0.75684166", "0.7565296", "0.7512484", "0.7511782", "0.74921...
0.81490046
1
Get parsed routes in JSON format.
Получить разобранные маршруты в формате JSON.
public function getJsonRoutes(): string { $data = []; foreach ($this->routes as $route) { $item = [ 'uri' => $route->getUri(), 'method' => $route->getMethod(), 'attributes' => $this->requestRecursiveAttributes($route->getAttributes()), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllRoutes()\n {\n $routes = Route::getRoutes();\n $results = [];\n\n if ($routes != null) {\n foreach ($routes as $route) {\n $route = array(\n 'method' => $route->getMethods(),\n 'uri' => $route->getPath(...
[ "0.76465976", "0.73802674", "0.73330384", "0.7318107", "0.7267727", "0.7267727", "0.7267727", "0.7267727", "0.7267727", "0.72580653", "0.7237782", "0.71005523", "0.71005523", "0.7079345", "0.7079345", "0.7050408", "0.70037806", "0.698867", "0.69521755", "0.694845", "0.6940819...
0.82502294
0
Removes wp default menu styling
Удаляет стиль меню по умолчанию WordPress
public function remove_styles(){ wp_dequeue_style('admin-menu'); wp_deregister_style('admin-menu'); wp_register_style( 'admin-menu', $this->path . 'assets/css/modules/blank.css', array(), $this->version ); wp_enqueue_style('admin-menu'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_default_menus() {\n remove_menu_page( 'edit.php' ); //Posts\n remove_menu_page( 'edit-comments.php' ); //Comments\n remove_menu_page( 'tools.php' ); //Tools\n }", "public function remove_styles(){\n\t\t\n\t\twp_de...
[ "0.7759157", "0.7526623", "0.7443111", "0.7260575", "0.7228112", "0.71899617", "0.71727306", "0.7116626", "0.7101614", "0.7095049", "0.7071108", "0.7068214", "0.7027627", "0.7023719", "0.700793", "0.6994677", "0.69537294", "0.6949738", "0.6939744", "0.69022125", "0.6877772", ...
0.7552028
1
Detect if this class has result class
Определить, имеет ли этот класс класс результата
protected function has_result_class() { return ! empty( $this->result_class ) && class_exists( $this->result_class ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasResult() {\n\t\treturn is_object ( $this->_result );\n\t}", "public function hasResult ()\n {\n return $this->decorated->hasResult();\n }", "public function testCustomClassForResultset()\n {\n $this->specify(\n 'Find() method should return custom resultset i...
[ "0.74559855", "0.68895847", "0.6794081", "0.6705952", "0.6705952", "0.6705952", "0.65954924", "0.65690124", "0.65690124", "0.65398824", "0.6438943", "0.63991165", "0.6304486", "0.62044996", "0.6155652", "0.6102789", "0.6074807", "0.6063672", "0.6059229", "0.60437924", "0.6025...
0.8656555
0
Associate new product with vendor coupon
Связать новый продукт с купоном поставщика
public function associate_new_product_with_vendor_coupon( $product_id, $product ) { $coupons = $this->get_apply_coupons_for_new_products(); if ( empty( $coupons ) ) { return; } foreach ( $coupons as $coupon ) { $product_ids = get_post_meta( $coupon->ID, 'product...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function save_product_to_include() {\n $value = isset($_POST['rac_include_products_in_coupon']) ? $_POST['rac_include_products_in_coupon'] : '';\n update_option('rac_include_products_in_coupon', $value);\n }", "public function store(StoreCouponRequest $request)\r\n {...
[ "0.66724855", "0.6631117", "0.6605669", "0.6237727", "0.6216968", "0.6204562", "0.620241", "0.6185251", "0.6174194", "0.6145285", "0.6138261", "0.61012775", "0.60996085", "0.60946584", "0.6070687", "0.6057257", "0.60561645", "0.60431546", "0.60260427", "0.6023303", "0.6022787...
0.7338068
0
Get coupons apply for new products
Получить купоны для новых продуктов
public function get_apply_coupons_for_new_products() { $args = array( 'post_type' => 'shop_coupon', 'post_status' => 'publish', 'author' => dokan_get_current_user_id(), 'meta_query' => array( array( 'key' => 'apply_new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_applied_coupons()\n {\n }", "public function get_coupons()\n {\n }", "public function get_used_coupons()\n {\n }", "public function getGeneratedCoupons();", "protected function get_coupons_from_cart()\n {\n }", "public static fun...
[ "0.7620535", "0.68444026", "0.67935896", "0.64479053", "0.6389954", "0.632309", "0.6279877", "0.61768883", "0.6171782", "0.61470383", "0.614036", "0.6115734", "0.6082354", "0.6006757", "0.6005371", "0.5991737", "0.59637696", "0.59553605", "0.5951834", "0.59334284", "0.5931254...
0.7923843
0
Render Coupon Header template
Рендеринг шаблона заголовка купона
public function render_coupon_header_template() { $is_edit = ( isset( $_GET['view'] ) && 'add_coupons' === $_GET['view'] ) ? true : false; // phpcs:ignore $is_edit_page = ( ! empty( $_GET['post'] ) && $is_edit ) ? true : false; // phpcs:ignore dokan_get_template_part( 'coupon/he...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function renderHeader() {\n\n\t\t// Headers\n\t\tif ($this->templateVariableContainer->exists('listCaptions')) {\n\n\t\t\t$values = array();\n\n\t\t\tforeach ($this->templateVariableContainer['listCaptions'] as $caption) {\n\t\t\t\t$values[] = $this->stripTags ? strip_tags($caption->getValue()) : $captio...
[ "0.6610834", "0.6585561", "0.6379011", "0.63709134", "0.6361728", "0.6355176", "0.6334432", "0.633119", "0.62890923", "0.62844104", "0.62554884", "0.6219682", "0.617643", "0.61592627", "0.61589384", "0.6136451", "0.6084697", "0.60748225", "0.60677046", "0.60667336", "0.604987...
0.82331413
0
Handle the coupons submission
Обработка отправки купонов
public function handle_coupons() { if ( ! is_user_logged_in() ) { return; } if ( ! dokan_is_user_seller( get_current_user_id() ) ) { return; } // Coupon functionality if ( isset( $_POST['coupon_creation'] ) ) { // phpcs:ignore self::$...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function coupons_create() {\n if ( ! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['coupon_nonce_field'] ) ), 'coupon_nonce' ) ) { // phpcs:ignore\n wp_die( __( 'Are you cheating?', 'dokan' ) );\n }\n\n $post_data = wp_unslash( $_POST ); // phpcs:ignore\n\n if ( em...
[ "0.7220933", "0.6684568", "0.6605655", "0.6573244", "0.6479959", "0.64430815", "0.64402217", "0.64133453", "0.63186485", "0.6310075", "0.62941945", "0.62931055", "0.6291538", "0.626525", "0.6256077", "0.6217412", "0.61740595", "0.6172894", "0.61663675", "0.6130611", "0.612155...
0.758871
0
Define the one to many relationship with terms
Определите отношение один к много с терминами
public function terms() { return $this->hasMany('App\Term'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function term()\r\n {\r\n return $this->hasMany('Blog\\Term');\r\n }", "protected function _meta()\n {\n $this->create_one_to_many_relation('Alias');\n }", "public function terms()\n\t{\n\t\tglobal $wpdb;\n\t\treturn $this->belongsToMany('Springbox\\Models\\Taxonomy\\TaxonomyT...
[ "0.6786959", "0.6626187", "0.65364885", "0.6523197", "0.6227385", "0.61800677", "0.60620415", "0.602603", "0.60117656", "0.6002275", "0.59960026", "0.5967196", "0.59254426", "0.5841321", "0.5824531", "0.58159775", "0.57573813", "0.57540756", "0.57447475", "0.5721821", "0.5699...
0.7158899
0
delete the rate for club post comments.
удалить ставку для комментариев к постам клуба.
public function deleteClubPostCommentRate($item_type, $item_id, $user_id) { $data = array(); $dm = $this->get('doctrine.odm.mongodb.document_manager'); //getting doctrine mongo odm object. $comment_res = $dm->getRepository('PostPostBundle:Comments') ->find($item_id); //if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteClubPostRate($item_type, $item_id, $user_id) {\n $data = array();\n $dm = $this->get('doctrine.odm.mongodb.document_manager'); //getting doctrine mongo odm object.\n $post_res = $dm->getRepository('PostPostBundle:Post')\n ->find($item_id);\n //if pos...
[ "0.6523072", "0.65051", "0.64295244", "0.63845223", "0.6337731", "0.630985", "0.61827374", "0.6177181", "0.6133791", "0.61023015", "0.6050759", "0.6026402", "0.5977192", "0.5973375", "0.59473455", "0.59426564", "0.593994", "0.58752024", "0.58708036", "0.5847368", "0.58441496"...
0.7039437
0
delete the rate from club album.
Удалите ставку из альбома клуба.
public function deleteClubAlbumRate($item_type, $item_id, $user_id) { $data = array(); $dm = $this->get('doctrine.odm.mongodb.document_manager'); //getting doctrine mongo odm object. $album_res = $dm->getRepository('UserManagerSonataUserBundle:GroupAlbum') ->find($item_id); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteClubAlbumImageRate($item_type, $item_id, $user_id) {\n $data = array();\n $dm = $this->get('doctrine.odm.mongodb.document_manager'); //getting doctrine mongo odm object.\n $image_res = $dm->getRepository('UserManagerSonataUserBundle:GroupMedia')\n ->find($i...
[ "0.65859914", "0.6206094", "0.6096455", "0.60188353", "0.6014835", "0.59904134", "0.59889066", "0.59548044", "0.5949565", "0.5939647", "0.5863141", "0.58625925", "0.58383036", "0.5836994", "0.5833665", "0.58057654", "0.5799965", "0.5796259", "0.5787361", "0.5754025", "0.57436...
0.7074989
0
Function to reset repo data.
Функция для сброса данных репозитория.
public function reset_repo() { delete_option( $this->options_key ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function resetRepositoryAndRecord()\n {\n unset($this->repositoryRecords);\n unset($this->filteredRepositoryRecords);\n unset($this->repositoryName);\n unset($this->record);\n }", "function resetGitStatusCache($repo)\r\n {\r\n $res = $this->loadSqlite();\r\n if (!$res) \r...
[ "0.6706119", "0.66483796", "0.6458597", "0.63243335", "0.61503005", "0.60711217", "0.6027632", "0.6010113", "0.5988121", "0.5966319", "0.59545034", "0.5908012", "0.5904469", "0.5886447", "0.58837247", "0.5875753", "0.5849814", "0.5846629", "0.58326757", "0.58267826", "0.58165...
0.78062844
0
Start public functions Set a channel element
Начать публичные функции установки элемента канала
public function set_channel_element($element_name, $content) { $this->channels[$element_name] = $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function setChannel($name, $value);", "public function setChannel()\n {\n $name = $this->slim->request->post('name');\n\n if (!isset($name)) {\n throw new PushApiException(PushApiException::NO_DATA);\n }\n\n // Checking if channel already exists\n ...
[ "0.71669847", "0.7015866", "0.67988545", "0.6431967", "0.6418534", "0.62947965", "0.62665135", "0.624835", "0.6145317", "0.6125889", "0.6006128", "0.5969073", "0.5953196", "0.59392524", "0.59235495", "0.5838594", "0.58196175", "0.5800223", "0.5774343", "0.5751709", "0.5745895...
0.7311939
0
Set multiple channel elements from an array. Array elements should be 'channelName' => 'channelContent' format.
Установите несколько элементов каналов из массива. Элементы массива должны быть в формате 'channelName' => 'channelContent'.
public function set_channel_elements_from_array($element_array) { if(! is_array($element_array)) return; foreach($element_array as $element_name => $content) { $this->set_channel_element($element_name, $content); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setChannelElementsFromArray(array $elementArray){\n\t\tforeach($elementArray as $elementName => $content){\n\t\t\t$this->setChannelElement($elementName, $content);\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setChannelElement($elementName, $content, $attributes = null, $multiple = false){...
[ "0.75689065", "0.66000813", "0.5979246", "0.5958931", "0.5851371", "0.57846886", "0.5623369", "0.56186557", "0.5559913", "0.5490786", "0.54714245", "0.544947", "0.54216", "0.5387348", "0.5386567", "0.5380697", "0.5346835", "0.5342836", "0.5306247", "0.5282213", "0.5271181", ...
0.7887429
0
Create a new Feed_item.
Создайте новый Feed_item.
public function create_new_item() { $item = new Feed_item($this->version); return $item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createItem();", "public function store(FeedItemCreateRequest $request, $feedId)\n {\n $feedItem = new FeedItem;\n $feedItem->feed_id = $feedId;\n $feedItem->title = $request->title;\n $feedItem->link = $request->link;\n $feedItem->description = $request->desc...
[ "0.73055667", "0.7109474", "0.7092535", "0.70859104", "0.7014021", "0.6872224", "0.68494445", "0.6793599", "0.6782655", "0.6771837", "0.66976714", "0.6684254", "0.6681468", "0.6581755", "0.65541077", "0.6429261", "0.64053524", "0.63896716", "0.6374623", "0.6304144", "0.625975...
0.8299817
0
Add a Feed_item to the main class
Добавьте Feed_item в основной класс
public function add_item($feed_item) { $this->items[] = $feed_item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create_new_item()\n\t{\n\t\t$item = new Feed_item($this->version);\n\t\treturn $item;\n\t}", "public function add()\n {\n if (empty(self::$param)) {\n $this->error('Please provide URL of site/RSS channel which you wish to add.', 'site/rss url');\n return;\n ...
[ "0.69550455", "0.68560505", "0.67636293", "0.66247576", "0.6544939", "0.6485529", "0.6441307", "0.6412415", "0.64061487", "0.6345711", "0.6345711", "0.6345711", "0.6308335", "0.62519693", "0.62226903", "0.621576", "0.6201384", "0.6136209", "0.6119506", "0.6119506", "0.6079740...
0.7284222
0
Wrapper functions Set the 'title' channel element
Функции-обёртки устанавливают элемент канала 'title'
public function set_title($title) { $this->set_channel_element('title', $title); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTitle($title){\n\t\treturn $this->setChannelElement('title', $title);\n\t}", "function SetTitle($title)\n\t\t\t\t{ \n\t\t\t\t\t$this->title = $title; \n }", "function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}", "function set_title($title...
[ "0.8013778", "0.7179171", "0.71675605", "0.71411115", "0.70904195", "0.70627695", "0.7027731", "0.7027731", "0.70247394", "0.70086384", "0.700251", "0.70016384", "0.69815445", "0.6979569", "0.69742084", "0.69623893", "0.6957467", "0.6957467", "0.69312215", "0.69191635", "0.69...
0.80080116
1
Set the 'description' channel element
Установите элемент 'description' канала
public function set_description($desciption) { $this->set_channel_element('description', $desciption); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDescription($description){\n $this->description = $description;\n }", "public function setDescription($description){\n $this->description = $description;\n }", "public function setDescription($description){\n\t\tif($this->version != Feed::ATOM){\n\t\t\t$this->setChannelElement('description'...
[ "0.7226153", "0.71868545", "0.718643", "0.70751244", "0.7032958", "0.7030436", "0.7030436", "0.7020129", "0.69893485", "0.6984371", "0.69722134", "0.6967559", "0.69654024", "0.6947783", "0.6947783", "0.6947783", "0.6947783", "0.6947783", "0.69452566", "0.6943802", "0.6940817"...
0.8186576
0
Set the 'link' channel element
Установите элемент 'link' канала
public function set_link($link) { $this->set_channel_element('link', $link); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLink($newLink) {$this->link=$newLink;}", "public function setLink($link);", "public function setLink($link);", "function _set_link(&$link) \n {\n $this->_link = $link;\n }", "public function setLink($link){\n $this->link = $link;\n }", "public function setLink($l...
[ "0.76253694", "0.76196396", "0.76196396", "0.7486198", "0.74649256", "0.74578977", "0.73479134", "0.7300277", "0.7203048", "0.71744233", "0.69902647", "0.6982676", "0.68763447", "0.6698116", "0.668998", "0.6585936", "0.6570551", "0.6460179", "0.63962126", "0.6386808", "0.6337...
0.81460935
0
Set the 'about' channel element. Only for RSS 1.0
Установите элемент 'about'. Только для RSS 1.0
public function set_channel_about($url) { $this->data['channel_about'] = $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setChannelAbout($url){\n\t\t$this->data['ChannelAbout'] = $url;\n\n\t\treturn $this;\n\t}", "public function about($about)\n {\n return $this->setProperty('about', $about);\n }", "public function setAbout($about)\n {\n $this->_about = $about;\n }", "public function s...
[ "0.7309578", "0.6796456", "0.6780073", "0.62701994", "0.6261677", "0.62471193", "0.62183094", "0.61748964", "0.60524446", "0.5941482", "0.59317726", "0.59116495", "0.58869046", "0.5820105", "0.5788757", "0.5773837", "0.5766884", "0.5746534", "0.5702369", "0.5650596", "0.56461...
0.7874123
0
Prints formatted feed items
Выводит отформатированные элементы ленты
private function print_items() { foreach($this->items as $item) { $this_items = $item->get_elements(); //the argument is printed as rdf:about attribute of item in rss 1.0 echo $this->start_item($this_items['link']['content']); foreach($this_items as $feed_item ) { echo $this->make...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function printFeed($feed)\n {\n $i = 0;\n foreach($feed->entries as $entry)\n {\n echo \"\\t\" . $i .\" \". $entry->title->text . \"\\n\";\n $i++;\n }\n }", "public function toPrint() {\n\t\theader('Content-type: text/xml');\n\t\techo \"<rss version=...
[ "0.73150337", "0.7308731", "0.71811646", "0.7099111", "0.6641814", "0.6593336", "0.6522725", "0.6438122", "0.62998706", "0.6285216", "0.6276702", "0.6272429", "0.6270568", "0.6238914", "0.6205993", "0.61756456", "0.617313", "0.6152382", "0.615063", "0.6092584", "0.6071874", ...
0.8023388
0