query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Returns the value of field ativo
Возвращает значение поля ativo
public function getAtivo() { return $this->ativo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttivo() {\n return $this->attivo;\n }", "public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }", "public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }", "public function getValor($atributo){...
[ "0.71480256", "0.70482796", "0.70482796", "0.70482796", "0.70482796", "0.70482796", "0.70482796", "0.6756231", "0.6748157", "0.6608452", "0.6535553", "0.64738333", "0.6309841", "0.6304855", "0.6264841", "0.62267023", "0.6223284", "0.61990917", "0.6197057", "0.6187512", "0.618...
0.71299124
1
Returns the value of field excluido
Возвращает значение поля excluido
public function getExcluido() { return $this->excluido; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_excluidos()\r\n\t{\r\n\t\treturn $this->excluidos;\r\n\t}", "function daEliminare()\n\t\t{\n\t\treturn $this->input['elimina'];\n\n\t\t}", "public function excluir(){\n \t$instancia = CaracteisticasDAO::getInstancia();\n \t// executando o metodo //\n \t$caracteristicas...
[ "0.68265176", "0.643757", "0.6086311", "0.60742605", "0.5937361", "0.58885366", "0.5847035", "0.5787858", "0.56697917", "0.5619182", "0.5585064", "0.5570985", "0.5548598", "0.5539322", "0.55181444", "0.5510586", "0.5489018", "0.54731935", "0.54550874", "0.544494", "0.54039174...
0.7221467
0
Returns the value of field data_update
Возвращает значение поля data_update
public function getDataUpdate() { return $this->data_update; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUpdated()\n {\n return $this->{self::FLD_UPDATED};\n }", "public function getUpdated()\n {\n return $this->getData('updated');\n }", "public function getUpdate()\n {\n return $this->update;\n }", "public function getUpdate() {\n return $this->u...
[ "0.7137196", "0.6813554", "0.67868465", "0.67684996", "0.6689624", "0.65494424", "0.65061826", "0.6499151", "0.64990896", "0.64931613", "0.64575523", "0.64517593", "0.63725287", "0.6356968", "0.6356968", "0.63538474", "0.63538474", "0.6280346", "0.6278422", "0.6259082", "0.62...
0.83825785
0
Returns the value of field id_empresa
Возвращает значение поля id_empresa
public function getIdEmpresa() { return $this->id_empresa; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdEmpresa() {\n\t\treturn $this->idEmpresa;\n\t}", "public function getIdEmpresa(){\n return $this->idEmpresa;\n }", "public function getIdvarios_empresa(){\n return $this->idvarios_empresa;\n }", "public function getEmpresa_numero()\n {\n return $this->empresa_nu...
[ "0.8429175", "0.82155746", "0.779491", "0.7454737", "0.7440774", "0.7427925", "0.7284772", "0.7171502", "0.70209026", "0.6956951", "0.6912904", "0.691001", "0.6867594", "0.686652", "0.68626124", "0.6796169", "0.67924625", "0.67533374", "0.67533374", "0.67533374", "0.67533374"...
0.86310786
0
Test case for addAssetToNode
Тестовый случай для addAssetToNode
public function test_addAssetToNode() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_removeAssetFromNode() {\n\n }", "public function testCreateAsset()\n {\n }", "public function test_getAssetsInNode() {\n\n }", "public function testAsset()\n {\n }", "public function testJavascriptAssetMedia(): void {\n $user = $this->createUser([], '', TRUE);\n ...
[ "0.7331779", "0.7069339", "0.70231867", "0.6434654", "0.638326", "0.6270978", "0.6161805", "0.6099363", "0.608806", "0.5888081", "0.57863486", "0.57863486", "0.57376814", "0.57376814", "0.57090825", "0.5706435", "0.56668484", "0.56659037", "0.56625444", "0.56605095", "0.56605...
0.8902512
0
Test case for deleteAssets Delete assets
Тестовый случай для удаления активов Удаление активов
public function test_deleteAssets() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAssets()\n {\n\n }", "public function testDeleteAsset()\n {\n }", "public function testDeleteAsset()\n {\n }", "public function test_deleteAsset() {\n\n }", "public function deleteDeviceAsset()\n {\n \n }", "function testDelete() {\n $date =...
[ "0.8244098", "0.8202495", "0.8202495", "0.7905701", "0.72606623", "0.7233482", "0.6778288", "0.6761417", "0.6756365", "0.673956", "0.66619015", "0.66331816", "0.65818375", "0.6490722", "0.6423173", "0.6403457", "0.6367277", "0.6359979", "0.63241196", "0.6291519", "0.6288333",...
0.8364431
0
Test case for getAsset
Тестовый случай для getAsset
public function test_getAsset() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateAsset()\n {\n }", "public function testAsset()\n {\n }", "public function testGetAssetById()\n {\n }", "public function testGetAssetById()\n {\n }", "abstract public function getAsset($main_file);", "public function getAsset()\r\n {\r\n return $...
[ "0.7869538", "0.76918954", "0.7404048", "0.7404048", "0.7275178", "0.7111961", "0.69868875", "0.69868875", "0.6910033", "0.6723957", "0.66720736", "0.6623896", "0.65971327", "0.6575194", "0.6575194", "0.6575194", "0.644231", "0.644231", "0.64386517", "0.64332", "0.640914", ...
0.8201217
0
Test case for getAssetsInNode
Тестовый случай для getAssetsInNode
public function test_getAssetsInNode() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAssets();", "public function getAssets();", "public function getAssets();", "public function test_addAssetToNode() {\n\n }", "public function testGetAssets()\n {\n }", "public function testGetAssets()\n {\n }", "public function getAssets(): array;", "public function ...
[ "0.6807375", "0.6807375", "0.6807375", "0.6748877", "0.6571476", "0.6571476", "0.6563991", "0.6175996", "0.61733335", "0.6102489", "0.5998556", "0.5989503", "0.5938955", "0.588846", "0.5879255", "0.58338237", "0.5803688", "0.5797075", "0.5784684", "0.5784684", "0.5779725", ...
0.88440716
0
Test case for removeAssetFromNode
Тест-кейс для удаления активов из узла
public function test_removeAssetFromNode() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function internalRemove($assetFile);", "private function __removeAsset(){\n\t\tif (\tempty($_REQUEST['asset']) === true\n\t\t\tor\tpreg_replace('{.*(\\d{4}\\d{2}\\d{2}\\s[\\w-]+).*}i', '$1', self::$entryPath) !== preg_replace('{.*(\\d{4}\\d{2}\\d{2}\\s[\\w-]+).*}i', '$1', $_REQUEST['asset'])\n...
[ "0.69841117", "0.69320256", "0.6792841", "0.6792841", "0.66968536", "0.6641009", "0.6496384", "0.622757", "0.61978847", "0.6181814", "0.615157", "0.60909927", "0.59783655", "0.5954688", "0.5952689", "0.59138894", "0.5905064", "0.5899542", "0.588888", "0.58740646", "0.5869347"...
0.904034
0
Test case for replaceAsset Replaces the Asset with the data sent in the body
Тест-кейс для replaceAsset Заменяет актив данными, отправленными в теле запроса
public function test_replaceAsset() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function replaceAsset($assetId, $data,$type=\"\")\n\t{\n\t\t$content = $this->assetDAO->findByCriteria('assetId=?', array($assetId));\n\t\t$content = $content[0];\n\t\t$contentType = $content->getAssetType();\r\n\t\t\n\t\tfile_put_contents(Config::get(\"asset\",\"assetRoot\").$contentType->getPath() . $cont...
[ "0.642286", "0.6096521", "0.6075242", "0.5937607", "0.57771933", "0.574211", "0.564977", "0.56116754", "0.56034297", "0.5535384", "0.5535384", "0.5476096", "0.54508", "0.5449043", "0.5362227", "0.5343664", "0.5340741", "0.5334291", "0.5330142", "0.5303271", "0.5260718", "0....
0.717189
0
Test case for searchAssets Search assets
Тест-кейс для поиска активов Поиск активов
public function test_searchAssets() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetAssets()\n {\n }", "public function testGetAssets()\n {\n }", "public function test_getAssetsInNode() {\n\n }", "public function searchAssets(array $params) {\n $this->checkAuth();\n\n $response = $this->client->request(\n \"GET\",\n $this->baseUrl . '/se...
[ "0.70171", "0.70171", "0.68634784", "0.6572381", "0.6521548", "0.6367395", "0.6189153", "0.6189153", "0.6052616", "0.60372525", "0.5942541", "0.5914867", "0.58766514", "0.5809242", "0.5780379", "0.5766413", "0.5733737", "0.57285213", "0.5711193", "0.5681787", "0.56670743", ...
0.82750475
0
Display a listing of the latest documents
Показать список последних документов
public function latest(){ $documents = Document::orderBy('id','DESC')->simplePaginate(6); return view('docs.latest')->withDocuments($documents); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n \n $docs=Doc::latest('created_at')->get();\n return view('docs.index',compact('docs'));\n }", "public function index()\n {\n $documents = Document::all();\n // $rfqs = Rfq::orderBy('created_at', 'desc')->get();\n return view('documents.in...
[ "0.7388076", "0.7154992", "0.7049231", "0.69432104", "0.69252676", "0.68806", "0.68646884", "0.6853359", "0.6852215", "0.67343175", "0.673361", "0.67296904", "0.6719008", "0.6684278", "0.6653451", "0.6644825", "0.6636038", "0.6603152", "0.66013855", "0.66013855", "0.66013855"...
0.7748447
0
returns open/not_open sponsorships for an event
возвращает открытые/неоткрытые спонсорства для события
function getSponsorshipsByEvent($event_id, $isOpen){ $sponsorships = array(); $wherePedicate = "event_id = '" . $event_id . "'"; if($isOpen){ $wherePedicate = $wherePedicate.(" AND taken_by IS NULL"); } else{ $wherePedicate = $wherePedica...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllSponsorshipsByEvent($event_id){\n \n $sponsorships = array();\n \n $wherePedicate = \"event_id = '\" . $event_id . \"'\"; \n $results = $this->db->select(\"sponsorships\", $wherePedicate);\n \n foreach($results as $result){\n array_p...
[ "0.65805167", "0.6031817", "0.5931394", "0.56562704", "0.56124735", "0.5554691", "0.54685336", "0.54337054", "0.5420772", "0.5261573", "0.52528125", "0.5239614", "0.52048665", "0.51955944", "0.5156025", "0.50838554", "0.5083266", "0.5082529", "0.5074823", "0.5044526", "0.5016...
0.7625106
0
returns all sponsorships for an event
возвращает все спонсорства для события
function getAllSponsorshipsByEvent($event_id){ $sponsorships = array(); $wherePedicate = "event_id = '" . $event_id . "'"; $results = $this->db->select("sponsorships", $wherePedicate); foreach($results as $result){ array_push($sponsorships, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSponsorshipsByEvent($event_id, $isOpen){\n \n $sponsorships = array();\n \n $wherePedicate = \"event_id = '\" . $event_id . \"'\";\n if($isOpen){\n $wherePedicate = $wherePedicate.(\" AND taken_by IS NULL\");\n }\n else{\n $wherePed...
[ "0.78232056", "0.667247", "0.65390134", "0.6513689", "0.63973755", "0.6043852", "0.5940942", "0.5930513", "0.5903202", "0.5871158", "0.5870305", "0.575831", "0.56077385", "0.5605776", "0.5541269", "0.552132", "0.5469939", "0.5469939", "0.546569", "0.5409082", "0.5398177", "...
0.8425253
0
Update answer of student
Обновить ответ студента
public function updateAnswer($exam_key, $question_id, $student_answer){ $this->db->query("UPDATE exam_set SET stud_answer = '$student_answer' WHERE exam_key = '$exam_key' AND question_id = '$question_id';"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateQuestionAnswer()\n {\n }", "public function update() {\n global $DB;\n $fields = $this->makeSetString();\n $query = \"UPDATE students $fields WHERE id = {$this->id}\";\n $result = $DB->query($query);\n Student::checkResult($result);\n }", "p...
[ "0.7721001", "0.70316356", "0.70288426", "0.6772542", "0.668182", "0.6582304", "0.6559023", "0.6530922", "0.6453865", "0.63643736", "0.6315415", "0.6305126", "0.6295093", "0.62800044", "0.62800044", "0.62800044", "0.62605506", "0.6256968", "0.62440294", "0.62188566", "0.62106...
0.7481301
1
Create a token repository instance based on the given configuration.
Создайте экземпляр репозитория токенов на основе заданной конфигурации.
protected function createTokenRepository(array $config): TokenRepositoryInterface { return make($config['driver'], ['options' => $config['options']]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createTokenRepository(): Contracts\\TokenRepository\n {\n $key = $this->config['key'];\n\n if (Str::startsWith($key, 'base64:')) {\n $key = \\base64_decode(\\substr($key, 7));\n }\n\n return new DatabaseTokenRepository(\n $this->app['db']->con...
[ "0.7745185", "0.7378105", "0.7181362", "0.71428156", "0.6300944", "0.62983996", "0.6166453", "0.6126073", "0.60845983", "0.6038384", "0.59958047", "0.58310777", "0.5752326", "0.5749299", "0.5744728", "0.57336164", "0.5703572", "0.57030314", "0.5673228", "0.5663515", "0.566229...
0.79498535
0
Add the start URL
Добавьте начальный URL
function startURL($theURL){ // Set start URL $this->startURL = $theURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStartUrl()\n {\n return $this->url->getUrl('hubshoply/start', ['_current' => true]);\n }", "protected function initCurrentUrl() {}", "public function start() {\n\t\t\n\t\tt_write_log( 'Start a application '. T::$config['site'] );\n\n\t\t$url = $_SERVER['REQUEST_URI'];\n\n\t\t$ba...
[ "0.6909032", "0.6124742", "0.5971037", "0.59363246", "0.5875386", "0.58616626", "0.58272344", "0.58035827", "0.57985497", "0.5796345", "0.57887936", "0.57343113", "0.5677149", "0.5673811", "0.5667723", "0.5653592", "0.5638801", "0.5634259", "0.56300986", "0.5578202", "0.55748...
0.7328149
0
Get the order currency code.
Получить код валюты заказа.
public function getCurrency() { return $this->order->getOrderCurrencyCode(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCurrencyCode(){\r\n\t\treturn self::getQuote()->getQuoteCurrencyCode();\r\n\t}", "public function getCurrencyCode()\n {\n $value = $this->get(self::CURRENCYCODE);\n return $value === null ? (integer)$value : $value;\n }", "public function getCurrencyCode()\n {\n...
[ "0.81562704", "0.8007697", "0.79387295", "0.7865826", "0.7865826", "0.7865826", "0.7865826", "0.7865826", "0.7865826", "0.7853738", "0.7835359", "0.777615", "0.7774548", "0.7772957", "0.7747429", "0.7746307", "0.7672474", "0.7628791", "0.7614826", "0.7614826", "0.7614826", ...
0.83022636
0
Calculates the estimated shipping date
Рассчитывает оцененную дату доставки
public function getEstimatedShippingDate() { $createdAt = $this->getCreatedAt(); return $this->addDays( $createdAt, $this->_scopeConfig->getValue(self::XML_PATH_TRUSTEDSTORES_SHIPPING, ScopeInterface::SCOPE_STORE) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_date_shipping(){\n\t\treturn $this->v_date_shipping->sec;\n\t}", "public function getEstimatedDeliveryDate()\n {\n $createdAt = $this->getCreatedAt();\n return $this->addDays(\n $createdAt,\n $this->_scopeConfig->getValue(self::XML_PATH_TRUSTEDSTORES_DE...
[ "0.6985548", "0.6632615", "0.66310275", "0.6508635", "0.64278096", "0.6426971", "0.62995493", "0.6206516", "0.6023427", "0.6013966", "0.5979605", "0.59098613", "0.5872775", "0.5866383", "0.58377635", "0.58369744", "0.57115585", "0.56660885", "0.5664547", "0.56567836", "0.5647...
0.78430736
0
Calculates the estimated delivery date
Рассчитывает ожидаемую дату доставки
public function getEstimatedDeliveryDate() { $createdAt = $this->getCreatedAt(); return $this->addDays( $createdAt, $this->_scopeConfig->getValue(self::XML_PATH_TRUSTEDSTORES_DELIVERY, ScopeInterface::SCOPE_STORE) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function estimateDeliveryDate(){\n\n\t// open a connection\n\t$connection = getConnection();\n\t\n\t// Check if connection failed\n\tif (mysqli_connect_errno()) {\n writeMessage(\"Could not connect to database\");\n exit();\n }\n\t\n\tif (!$result = $connection->query(\"SELECT receiptId FROM order...
[ "0.7744592", "0.67437243", "0.66545236", "0.6401067", "0.633507", "0.62488866", "0.62290114", "0.6192856", "0.6093775", "0.6020745", "0.59827876", "0.597565", "0.59174806", "0.5843788", "0.58361524", "0.5811164", "0.58071893", "0.5792251", "0.5765707", "0.57652533", "0.576284...
0.7599123
1
Get order created at timestamp
Получить временной штамп создания заказа
public function getCreatedAt() { return $this->order->getCreatedAt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_orderTimestamp() {\n \n return $this->orderTimestamp;\n \n }", "public function get_created_at();", "public function created_at();", "public function getCreatedTime();", "public function getCreatedTime();", "public function getCreatedTime();", "public functio...
[ "0.7262125", "0.70393956", "0.69693404", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595", "0.68657595",...
0.763071
0
Check if the order contain virtual products
Проверьте, содержит ли заказ виртуальные продукты
public function doesOrderContainDigitalProducts() { $containsDigitalProducts = false; foreach ($this->getOrder()->getAllVisibleItems() as $item) { if ($item->getIsVirtual()) { $containsDigitalProducts = true; } } return $containsDigitalProducts...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woo_cart_has_virtual_product() {\n \n global $woocommerce;\n \n // By default, no virtual product\n $has_virtual_products = false;\n \n // Default virtual products number\n $virtual_products = 0;\n \n // Get all products in cart\n $products = $woocommerce->cart->get_cart();\n \n // Loop throu...
[ "0.7678856", "0.7267878", "0.72663116", "0.7164354", "0.71556747", "0.68951017", "0.6802246", "0.6612635", "0.644946", "0.6371463", "0.6347386", "0.62573904", "0.6237133", "0.62305874", "0.6222105", "0.61686337", "0.6164817", "0.61267006", "0.6100198", "0.60998493", "0.609729...
0.75354546
1
Check if the order contains back ordered products
Проверьте, содержит ли заказ товары, которые находятся в ожидании поставки
public function doesOrderContainBackOrder() { $containsBackOrder = false; foreach ($this->getOrder()->getAllVisibleItems() as $item) { if ($item->getQtyBackordered()) { $containsBackOrder = true; } } return $containsBackOrder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function are_there_products()\n {\n }", "function fn_check_calculated_pfz_related_products(&$cart, &$cart_products, $auth)\n{\n if (!empty($cart['products'])) {\n foreach ($cart['products'] as $key => $entry) {\n if (!empty($entry['product_id'])) {\n ...
[ "0.67340785", "0.6626975", "0.65754366", "0.6455635", "0.6418068", "0.63949895", "0.6389164", "0.6386473", "0.6370355", "0.63528895", "0.63304", "0.63162965", "0.62724435", "0.621883", "0.62008226", "0.61798155", "0.6162187", "0.61138463", "0.6109769", "0.61057943", "0.610576...
0.7292627
0
Sets the table data
Устанавливает данные таблицы
public function setTableData($data) { $this->tableData = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_table(table_data &$table);", "public function setTableData($data)\n {\n $data = $this->camelCaseConverter($data);\n $this->dataTable = $data;\n }", "public function fillInTableData()\n {\n $this->createColumns();\n $this->createPrimaryKey();\n $this->cre...
[ "0.75922436", "0.74072826", "0.7230646", "0.6898834", "0.68143725", "0.67253345", "0.6680981", "0.6611961", "0.6589966", "0.65817153", "0.6577208", "0.64542955", "0.6453277", "0.64503694", "0.63939476", "0.63701963", "0.63574976", "0.63574976", "0.63574976", "0.63574976", "0....
0.8163027
0
Options array for the address options dropdown.
Массив опций для выпадающего списка параметров адреса.
public function getAddressOptions() { return Address::get()->pluck('name', 'id')->toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddressOptions()\n {\n $options = $this->getData('address_options');\n if (is_null($options)) {\n $options = array();\n foreach ($this->getCustomer()->getAddresses() as $address) {\n $options[] = array(\n 'value'=>$address-...
[ "0.7935531", "0.68263966", "0.68016195", "0.6620521", "0.6492192", "0.63957226", "0.6379854", "0.636038", "0.6331255", "0.6325274", "0.6275691", "0.6244481", "0.6218463", "0.6183284", "0.6148797", "0.5984016", "0.5964595", "0.59606737", "0.59594506", "0.5955258", "0.59493756"...
0.7847737
1
Options array for the redirect options dropdown.
Массив опций для выпадающего списка параметров перенаправления.
public function getRedirectOptions() { return [ 'checkout' => trans('offline.mall::lang.components.addressForm.redirects.checkout'), 'account' => trans('offline.mall::lang.components.addressForm.redirects.account'), ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRedirectOptions()\n {\n return Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');\n }", "public function toOptionArray()\n {\n $data = [\n [\n 'value' => CustomRedirect::REDIRECT_TYPE_CUSTOM,\n 'label' => self::C...
[ "0.733714", "0.6803321", "0.65874404", "0.6459448", "0.6383561", "0.63398254", "0.63290644", "0.6275175", "0.6261152", "0.6261152", "0.6261152", "0.6261152", "0.6261152", "0.6261152", "0.6261152", "0.62590796", "0.62590796", "0.62590796", "0.62590796", "0.62590796", "0.625907...
0.7003018
1
This method get the field value.
Этот метод получает значение поля.
public function getFieldValue() { return $this->FieldValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFieldValue() {\n return $this->field_value;\n }", "public function getFieldValue();", "public function getValue()\n {\n\n if ($this->populate == false) {\n return null;\n }\n\n $getter = new Getter();\n $value = $getter->getFieldValue($this...
[ "0.8905281", "0.84732866", "0.83352184", "0.8318666", "0.8120013", "0.81089", "0.807548", "0.8071283", "0.8059237", "0.8059237", "0.8048876", "0.8041561", "0.799866", "0.79920405", "0.7982122", "0.79788893", "0.79788893", "0.797625", "0.7969819", "0.79582226", "0.79378545", ...
0.8566103
1
This method has no parameters, and is responsible for the deletion of sources.
Этот метод не имеет параметров и отвечает за удаление источников.
public function deleteSource() { $delete = $this->FieldValue->getDeleteButton(); if (isset($delete)) { $arr = file('sources.txt'); foreach($arr as $k=>$line) { if(strpos($line, $this->FieldValue->getSourceList())!==false) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearSources()\n {\n $files = $this->dao->select('*')\n ->from(TABLE_FILE)\n ->where('objectType')->in('slide,source')\n ->fetchAll();\n $filesToRemove = array();\n foreach($files as $file)\n {\n $realPath = $this->app->getD...
[ "0.7574795", "0.69275653", "0.69152766", "0.69152766", "0.6806315", "0.67067873", "0.6553624", "0.65237194", "0.63875926", "0.6363998", "0.6327911", "0.6306534", "0.6304557", "0.6294086", "0.62415403", "0.6214845", "0.6169264", "0.61654943", "0.6151777", "0.61089915", "0.6101...
0.72486085
1
Checks if the path starts with specified substring.
Проверяет, начинается ли путь с указанной подстроки.
protected function _pathStartsWith( $path, $string) { return strncmp($path, $string, strlen($string)) === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _isPathStartsWith(\n $string)\n {\n return strncmp($this->path, $string, strlen($string)) === 0;\n }", "function startswith($string, $start) {\n\treturn (substr($string, 0, strlen($start))==$start);\n}", "public static function startsWith($string, $start) {\n $star...
[ "0.77533543", "0.7550672", "0.7383298", "0.73575723", "0.7341955", "0.72961164", "0.72841924", "0.7262385", "0.7195812", "0.71714133", "0.716799", "0.71003664", "0.70444703", "0.70077425", "0.6979364", "0.694857", "0.69440615", "0.6924217", "0.6922217", "0.69070685", "0.68642...
0.808736
0
Checks if the path ends with specified substring.
Проверяет, заканчивается ли путь указанным подстрокой.
protected function _pathEndsWith( $path, $string) { $length = strlen($string); return substr_compare($path, $string, strlen($path) - $length, $length) === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _isPathEndsWith(\n $string)\n {\n $length = strlen($string);\n\n return substr_compare($this->path, $string, strlen($this->path) - $length, $length) === 0;\n }", "function strEndsWith($path, $extension) {\n return substr_compare($path, $extension, -strlen($ext...
[ "0.7713018", "0.7281652", "0.7213673", "0.7172216", "0.71452343", "0.7118063", "0.70922977", "0.70187646", "0.69817924", "0.697956", "0.69414383", "0.69084483", "0.68602407", "0.68585193", "0.68507814", "0.6800869", "0.6800353", "0.679414", "0.6776915", "0.6761451", "0.675816...
0.7948255
0
Returns description for given collation
Возвращает описание для заданной коллации
public static function getCollationDescr($collation) { $parts = explode('_', $collation); $name = __('Unknown'); $variant = null; $suffixes = array(); $unicode = false; $unknown = false; $level = 0; foreach ($parts as $part) { if ($level ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCollation()\n\t{\n\t\treturn;\n\t}", "public function describe()\n {\n $charset = $this->getCharset();\n $collate = $this->getCollate();\n if ($charset && $collate) {\n return \"$charset/$collate\";\n }\n\n return 'NONE';\n }", "public function ge...
[ "0.6828844", "0.66092443", "0.65369064", "0.64327306", "0.63205945", "0.6305259", "0.626463", "0.6243011", "0.6229758", "0.6205717", "0.61001235", "0.5998336", "0.5977048", "0.5971351", "0.58818275", "0.56952626", "0.56894106", "0.5678304", "0.56639606", "0.56227714", "0.5526...
0.76963323
0
Rerun Reexecute the command on the container
Повторно выполнить команду в контейнере
public function reRun() { $response = $this->manager->execute($this->containerId, $this->getInputRaw()); $this->raws = $this->parseOutput($response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restart(): void\n {\n $this->shutdown();\n $this->start();\n }", "public static function relaunch() {\r\n\t\tself::init();\r\n\t\tif (file_exists(self::$restartFile)) {\r\n\t\t\tself::removeRestartFlag();\r\n\t\t\tself::run();\r\n\t\t} else if (file_exists(self::$runningFile))...
[ "0.5791345", "0.5644007", "0.5642666", "0.56085545", "0.5482233", "0.5460759", "0.5447652", "0.53953743", "0.5354837", "0.528658", "0.5286301", "0.5249384", "0.5249167", "0.52227306", "0.51819813", "0.5171024", "0.5167858", "0.5165983", "0.51620996", "0.51511633", "0.513974",...
0.7634094
0
Get input raw Return the input array of the command
Получить входные данные Возвратить входной массив команды
protected function getInputRaw() { $commands = array($this->command->getCommand()); return array_merge($commands, $this->command->getValues()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInput(): array\n {\n return $this->input;\n }", "private function get_input()\n\t{\n\n\t\t//TODO: check if input medium is cli or api and process accordingly\n\t\t return trim(fgets(STDIN));\n\t}", "public function getInput(): array\n\t{\n\t\treturn $this->input;\n\t}", "publi...
[ "0.7100352", "0.7025671", "0.6988712", "0.69453585", "0.6857286", "0.681846", "0.67813313", "0.67607975", "0.672051", "0.67016685", "0.6698683", "0.6595036", "0.6539884", "0.6514937", "0.64775145", "0.6416009", "0.63857335", "0.637218", "0.6368587", "0.63595176", "0.6347083",...
0.82379997
0
Nest the current kernel
Вложить текущий ядро
protected function nest() { // Reset state $this->kernel()->reset(); $this->kernels[] = $this->kernel()->nest(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getKernel(){\n return $this->kernel;\n }", "public function kernel(): SystemKernel;", "protected function kernels()\n {\n return [\n\n ];\n }", "public function getKernel()\n {\n return $this->kernel;\n }", "public functio...
[ "0.64360756", "0.62762576", "0.61833835", "0.6094418", "0.6094418", "0.6094418", "0.5964727", "0.5957669", "0.55037546", "0.546868", "0.53614926", "0.5342287", "0.50831825", "0.5052066", "0.5014899", "0.50038993", "0.4991703", "0.48878157", "0.48736066", "0.48654354", "0.4863...
0.82453996
0
importation : import CSV files with articles and orders, and insert into db
импортация: импорт CSV-файлов с товарами и заказами, и вставка в базу данных
public static function importation() { $templateName = 'importation'; $templateVars = []; $templateVars["lineImportations"] = []; if (isset($_FILES["fileCsv"])) { $fileName = $_FILES["fileCsv"]["tmp_name"]; if ($_FILES["fileCsv"]["size"] > 0) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function import() {\n $rows = [];\n $file = $this->request->getData('uploaded_file');\n if (!empty($file['name'])) {\n $uploadPath = 'uploads/files/';\n $uploadFile = $uploadPath . $file['name'];\n\n if (move_uploaded_file($file['tmp_name'], $uploadFile)...
[ "0.69896054", "0.69813913", "0.6963662", "0.6938075", "0.68390024", "0.67968976", "0.6777635", "0.6775176", "0.6671583", "0.666931", "0.6646996", "0.664315", "0.66325307", "0.6591244", "0.65274704", "0.65243536", "0.6502415", "0.648624", "0.6475839", "0.64691395", "0.64626616...
0.7593888
0
orderDetailsAjax to display details of order on a click
orderDetailsAjax для отображения деталей заказа при клике
public static function orderDetailsAjax() { $idOrder = $_POST['orderId']; $order = OrdersDao::findById($idOrder); $orderLines = $order->getOrderLines(); $result = []; foreach ($orderLines as $key => $orderLine) { $currentLine = []; $currentLine["uni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function order_detail(){\n\n \n }", "function order_details()\n\t{\n\t\t$id=get_param_integer('id');\n\n\t\t$title=get_screen_title('MY_ORDER_DETAILS');\n\n\t\t$order_title=do_lang('CART_ORDER',$id);\n\n\t\t// Pagination\n\t\t$start=get_param_integer('start',0);\n\t\t$max=get_param_integer('max',...
[ "0.6910953", "0.68739295", "0.6873085", "0.6786396", "0.6786396", "0.67412895", "0.6719439", "0.6713476", "0.6691978", "0.66814226", "0.6646088", "0.6543755", "0.65359783", "0.6501585", "0.64659977", "0.6415243", "0.63950676", "0.634087", "0.6329087", "0.6318382", "0.6304762"...
0.7642645
0
Define the list of SQL file to execute to install
Определите список SQL-файлов для выполнения при установке
public function setSqlFileToInstall() { $this->aSqlFileToInstall = array( '1.0' => 'install.sql' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execSQLFiles()\n {\n $this->pdo->exec(\"USE $this->schema;\");\n\n if (empty($this->sqlFiles)) {\n $this->parseFiles();\n }\n\n foreach ($this->sqlFiles as $file) {\n $this->pdo->exec($file);\n }\n }", "private function loadSql(){\n\t...
[ "0.68862426", "0.65083265", "0.6433161", "0.6402616", "0.6328227", "0.62613744", "0.62573004", "0.6240404", "0.62262887", "0.61983645", "0.610508", "0.60741675", "0.60403264", "0.60269296", "0.60142964", "0.5982188", "0.59800124", "0.59599", "0.5937622", "0.5887219", "0.58853...
0.7230021
0
Change the default BP group avatar image.
Измените стандартное изображение аватара группы BP.
public function change_default_avatar_group( $avatar, $params ) { $avatar = get_stylesheet_directory_uri() . '/assets/images/avatars/user-group.png'; return $avatar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yz_set_group_default_avatar( $avatar, $params ) {\r\n\r\n // Get Default Avatar.\r\n $default_avatar = yz_options( 'yz_default_groups_avatar' );\r\n\r\n if ( empty( $default_avatar ) ) {\r\n return $avatar;\r\n }\r\n\r\n // Set Avatar.\r\n $avatar = $default_avatar;\r\n \r\n ...
[ "0.77190554", "0.756235", "0.690015", "0.6676076", "0.6652937", "0.6610304", "0.6578863", "0.6487577", "0.6471732", "0.63857967", "0.6360788", "0.6333302", "0.63284713", "0.63284713", "0.63269895", "0.6303725", "0.62719923", "0.62607694", "0.6218975", "0.6211501", "0.6203928"...
0.78222317
0
Change the settings for the BuddyPress group cover image.
Измените настройки для изображения обложки группы BuddyPress.
public function change_groups_cover_image_settings( $settings = array() ) { $settings['default_cover'] = get_stylesheet_directory_uri() . '/assets/images/covers/group-cover.jpg'; $settings['width'] = get_custom_header()->width; $settings['height'] = get_custom_header()->height; return $settin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bb_cover_image_settings( $settings = array() ) {\n\t//$settings['callback'] = 'buddyboss_cover_image_callback';\n\t// $settings['theme_handle'] = 'buddyboss-bp-frontend';\n\t$settings['width'] = 3840;\n\t$settings['height'] = 2160;\n\n\treturn $settings;\n}", "function bp_members_screen_change_cover_ima...
[ "0.67337155", "0.6438784", "0.64238864", "0.61898404", "0.59712154", "0.5919485", "0.5811684", "0.5795052", "0.5755658", "0.5735856", "0.5729293", "0.56909275", "0.5625029", "0.5592414", "0.55463356", "0.5537122", "0.5519997", "0.54990566", "0.5430171", "0.53739005", "0.53239...
0.7513487
0
/ Add new city in admin panel
/ Добавить новый город в панель управления
function admin_add(){ $this->set('title_for_layout', __('Add City', true)); if(!empty($this->data)) { // CSRF Protection if ($this->params['_Token']['key'] != $this->data['City']['token_key']) { $blackHoleCallback = $this->Security->blackHoleCallback; $this->$blac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addCity() {\n\t\tglobal $REQUEST_DATA;\n\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('city', array('cityCode','cityName','stateId'), array(strtoupper($REQUEST_DATA['cityCode']),$REQUEST_DATA['cityName'],$REQUEST_DATA['states']) );\n\t}", "public function addCity() {\n /...
[ "0.7639603", "0.7578053", "0.75606763", "0.7519828", "0.74994016", "0.74866194", "0.73659295", "0.7211975", "0.7206045", "0.7149004", "0.7110062", "0.7073532", "0.70100594", "0.69466156", "0.6924044", "0.6901992", "0.68815386", "0.6876938", "0.687641", "0.6826471", "0.6805103...
0.8518407
0
Autologin method. Use this to determine how to log the user in automatically. Therefore it will need to extract identity and password in appropriate places, such as cookies or HTTP headers.
Метод автовхода. Используйте его для определения способа автоматического входа пользователя. Поэтому необходимо будет извлекать идентификатор и пароль в соответствующих местах, таких как куки или HTTP-заголовки.
public function autologin();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function autoLogIn()\n\t{\n\t\t$authCfg = new Vf_Config('config.auth', 'Xml');\n\t\t//if user isnt logged in\n\t\tif (Vf_Core::getContainer()->request->cookie('autologin') !== null) {\n\t\t\t$autologinData = json_decode(Vf_Core::getContainer()->request->cookie('autologin', false));\n\t\t\t$user = Vf_Orm:...
[ "0.82988036", "0.76191866", "0.7610074", "0.75525755", "0.7546394", "0.7497676", "0.74468297", "0.7435416", "0.72961295", "0.7216967", "0.6872112", "0.68437237", "0.67930174", "0.67638195", "0.6723818", "0.67122763", "0.6694348", "0.6664135", "0.6640182", "0.66369766", "0.661...
0.7831589
1
Login hook is called just before the manual login. This modifies the $data variable must return the $data variable. Modify the $data variable to fill it with ['identity'] AND ['password']. Certain strategies may use login hook to create the random account on the fly such as Oauth or OpenId. PolyAuth will create any cor...
Хук входа вызывается непосредственно перед ручным входом. Это изменяет переменную $data, которую необходимо вернуть. Измените переменную $data, чтобы заполнить её ['identity'] и ['password']. Некоторые стратегии могут использовать хук входа для создания случайного аккаунта на лету, например, OAuth или OpenId. PolyAuth ...
public function login_hook($data);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function login(array $data = null, $force_login = false){\n\t\t\n\t\t//the login hook will manipulate the passed in $data and return at least 'identity' and 'password'\n\t\t//in the case of Oauth, the identity and password may be created on the fly, as soon as the third party authenticates\n\t\t$data = $thi...
[ "0.66949505", "0.6521705", "0.6455499", "0.6455499", "0.6317356", "0.6236398", "0.6222623", "0.6130972", "0.61308116", "0.6124832", "0.6108931", "0.6107179", "0.6103445", "0.6089559", "0.6063313", "0.60487276", "0.603713", "0.6036185", "0.60090053", "0.6001352", "0.5954358", ...
0.7305868
0
OSVersion specifies the Windows node config to be used on the node Generated from protobuf field .google.container.v1.WindowsNodeConfig.OSVersion os_version = 1;
OSVersion указывает конфигурацию узла Windows, которая будет использоваться на узле. Сгенерировано из поля protobuf .google.container.v1.WindowsNodeConfig.OSVersion os_version = 1;
public function setOsVersion($var) { GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\WindowsNodeConfig\OSVersion::class); $this->os_version = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOsVersion()\n {\n return $this->os_version;\n }", "public function getOsVersion()\n {\n if (array_key_exists(\"osVersion\", $this->_propDict)) {\n return $this->_propDict[\"osVersion\"];\n } else {\n return null;\n }\n }", "static...
[ "0.670082", "0.6664434", "0.61096823", "0.6086797", "0.5999268", "0.5917651", "0.58340484", "0.57838535", "0.57637054", "0.57610935", "0.5756699", "0.5743954", "0.57364446", "0.5717641", "0.56778324", "0.5664304", "0.5620601", "0.55741864", "0.55730695", "0.55546904", "0.5549...
0.78436273
0
Retrieves the HTTP protocol version as a string. The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
Возвращает версию протокола HTTP в виде строки. Строка ДОЛЖНА содержать только номер версии HTTP (например, "1.1", "1.0").
public function getProtocolVersion() : string { return $this->serverVars['SERVER_PROTOCOL'] ?? 'HTTP/1.0'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHTTPVersion() {\n\n $protocol = $this->getRawServerValue('SERVER_PROTOCOL');\n if ($protocol==='HTTP/1.0') {\n return '1.0';\n } else {\n return '1.1';\n }\n\n }", "public function getHttpVersion()\n\t{\n\t\tif($this->_httpVersion===null)\n\...
[ "0.7919269", "0.77285665", "0.75243896", "0.7476952", "0.7435353", "0.74290824", "0.7286817", "0.7273853", "0.72694105", "0.72231126", "0.7158656", "0.7124877", "0.7021109", "0.70116895", "0.69583845", "0.695426", "0.695426", "0.6934026", "0.6917542", "0.68243283", "0.6822138...
0.77596015
1
Retrieves the HTTP method of the request.
Получает HTTP-метод запроса.
public function getMethod() { return $this->serverVars['REQUEST_METHOD'] ?? 'GET'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMethod()\n {\n return $this->getServerVariable('REQUEST_METHOD');\n }", "public function getMethod()\n {\n return $_SERVER['REQUEST_METHOD'] ?? self::GET;\n }", "public function getMethod()\n {\n return $this->server->get('REQUEST_METHOD', 'GET');\n }",...
[ "0.8757171", "0.8746192", "0.8708509", "0.8708509", "0.86870384", "0.8686485", "0.86589855", "0.86499393", "0.8648078", "0.86279637", "0.8625503", "0.862005", "0.8614371", "0.8613887", "0.8611006", "0.85994905", "0.85973877", "0.8594485", "0.85892135", "0.8583027", "0.857413"...
0.88571924
0
fetch the totals for this and last financial years return an associative array of the two include only status='Active' records
получить итоги для этого и последнего финансовых годов, вернуть ассоциативный массив из двух записей, включить только записи со статусом='Active'
public function gettotals(){ $today = getdate(); $thisfy = $today['year']; $lastfy = $thisfy-1; $fytotals=array("lastfy"=>0,"thisfy"=>0); $this->paidlastfy='select sum(amtpaidthisyear) from members where fyear = "'.$lastfy.'" and status in( "Active","Left")'; $this->load(); $fytotals["lastfy"]=$this->paidlas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_json_year_actual_sales(){\n\t\t$year_today = date(\"Y\");\n\t\t$sql = \"SELECT DISTINCT MONTH(payment_date) AS month_selected, SUM(payment_amount) as month_collection FROM tbl_payment WHERE YEAR(payment_date)='$year_today' GROUP BY month_selected\";\n\t\t\n\t\t$result = mysqli_query($this->db,$...
[ "0.62194455", "0.60692596", "0.6042567", "0.6000238", "0.59019685", "0.589521", "0.58474183", "0.58187145", "0.58187145", "0.5806326", "0.5762198", "0.572576", "0.57081264", "0.5704409", "0.56490076", "0.5646638", "0.5615196", "0.5601241", "0.5600121", "0.55990976", "0.558268...
0.7070003
0
/ :$value: value to check :$type: "int/email" to check whether value is type of or not :$len : (functionality pending)if len is passed then also limit to its value return true/ false accordingly
: $value: значение для проверки :$type: "int/email" для проверки того, является ли значение указанным типом или нет :$len : (функционал отложен) если передано len, то также ограничить до его значения, вернуть true/false соответственно
function validater($value,$type,$len = NULL){ if($type == "int"){ //number if (filter_var($value, FILTER_VALIDATE_INT) === 0 || !filter_var($value, FILTER_VALIDATE_INT) === false) { if(strlen((string)$value) == 10){ return true; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_email_like($value): bool {\n return filter_var(trim_if_string($value), FILTER_VALIDATE_EMAIL);\n}", "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['mi...
[ "0.6873107", "0.6463825", "0.6463825", "0.64623636", "0.6447802", "0.6428901", "0.64213324", "0.637998", "0.6355749", "0.6341621", "0.63394684", "0.63162875", "0.629884", "0.6287722", "0.6271537", "0.62486184", "0.6247734", "0.6245015", "0.6244339", "0.62037706", "0.6199297",...
0.8049885
0
Apply a transition by name. (_to_) The transition should be possible and it is checked in this method.
Применить переход по имени. (_to_) Переход должен быть возможен, и это проверяется в этом методе.
public function apply($transition_name) { $this->transition($transition_name, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transition(string $to) : void;", "public function transition(\n $startStateName,\n $transitionName\n );", "public function apply($transition, $rolename)\n {\n if ($this->can($transition, $rolename)) {\n $nextStages = collect($this->configuration['transition...
[ "0.6450768", "0.6319439", "0.56026995", "0.5578078", "0.55626816", "0.55417407", "0.54407585", "0.52821183", "0.5248991", "0.5247625", "0.5160778", "0.51058704", "0.5074375", "0.5055908", "0.49516946", "0.49253923", "0.48718697", "0.4848235", "0.48055062", "0.47905192", "0.47...
0.7545967
0
add a transition. Since a transition has complete knowledge about it's states, the addition of a transition will also trigger the adding of the to and from state on this class. this method should be package visibility for the Loader, but since php does not support that, it can also be used to add a Transition directly....
Добавьте переход. Поскольку переход имеет полное знание о своих состояниях, добавление перехода также вызовет добавление состояний to и from в этом классе. этот метод должен быть видимым только внутри пакета для загрузчика, но поскольку PHP не поддерживает это, его можно также использовать для прямого добавления перехо...
public function addTransition(Transition $transition) { $this->transitions[$transition->getName()] = $transition; $from = $transition->getStateFrom(); if(!$this->getState($from->getName())) { $this->addState($from); } //transitions crea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addTransition($from, $to)\n {\n if (gettype($from) === 'string') {\n $from = $this->findState($from);\n }\n\n if (gettype($to) === 'string') {\n $to = $this->findState($to);\n }\n\n $this->transitions[] = $transition = new Transition($this...
[ "0.7020992", "0.66715163", "0.54311967", "0.5403454", "0.5398383", "0.5388186", "0.5185918", "0.50641155", "0.5055073", "0.50533634", "0.5048504", "0.5017137", "0.5007097", "0.49589342", "0.49483484", "0.49350744", "0.49347997", "0.48509198", "0.48483312", "0.47435904", "0.47...
0.7827507
0
Get the initial state, the only state with type State::TYPE_INITIAL
Получите начальное состояние, единственное состояние с типом State::TYPE_INITIAL
public function getInitialState() { $transitions = $this->getTransitions(); foreach($transitions as $transition) { if($transition->getStateFrom()->isInitial()) { return $transition->getStateFrom(); } } throw new Exception('no initial st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function initial() {\r\n return new ReadState(\"INITIAL\", 3);\r\n }", "public function get_default_state()\n {\n }", "public static function getDefault(): TicketState\n {\n $ticketState = TicketState::where('is_default', 1)->first();\n if (empty($...
[ "0.7347567", "0.68526554", "0.6640849", "0.6525039", "0.645269", "0.6390193", "0.6350268", "0.6311294", "0.6297926", "0.6280263", "0.6089091", "0.6056804", "0.6014765", "0.5999901", "0.5973539", "0.5965391", "0.5924279", "0.58921665", "0.5852789", "0.58321124", "0.58321124", ...
0.7520088
0
get a transition by name.
получить переход по имени.
public function getTransition($name) { return isset($this->transitions[$name]) ? $this->transitions[$name] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTransition($name)\n {\n if (!$this->hasTransition($name)) {\n throw new TransitionNotFoundException();\n }\n\n return $this->transitions[$name];\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_...
[ "0.83763355", "0.67886513", "0.64299965", "0.63556045", "0.6227271", "0.62129223", "0.61247075", "0.6113873", "0.5996221", "0.5948943", "0.5948943", "0.586666", "0.5866277", "0.58611536", "0.5859861", "0.58214456", "0.5803375", "0.58019406", "0.5777987", "0.5777987", "0.57613...
0.83356994
1
called before each transition will try to run. a hook to implement in subclasses if necessary, to do stuff such as event handling, locking an entity, logging, cleanup etc.
вызывается перед каждым переходом и попытается выполнить. хук для реализации в подклассах при необходимости, чтобы выполнить действия такие как обработка событий, блокировка сущности, логирование, очистка и т.д.
protected function preProcess(Transition $transition) { //dispatch events, log, lock entity, cleanup, //begin transaction via persistance layer etc. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function preProcess() {}", "protected function runBeforeInternalRedirect()\n {\n // Empty default implementation. Should be implemented by descendant classes if needed\n }", "public function preProcess() {\n parent::preProcess();\n }", "protected function workflowInitialisation() {...
[ "0.6475304", "0.6434364", "0.6426968", "0.63956374", "0.63755584", "0.6269996", "0.6237105", "0.6223894", "0.62202185", "0.62202185", "0.62006325", "0.6165945", "0.61645687", "0.61525536", "0.6141341", "0.61374944", "0.61259854", "0.61051464", "0.60991615", "0.60638845", "0.6...
0.75446576
0
called after each transition has run. a hook to implement in subclasses if necessary, to do stuff such as event handling, locking an entity, logging, cleanup etc.
вызывается после завершения каждого перехода. точка расширения, которую необходимо реализовать в подклассах при необходимости, чтобы выполнить действия, такие как обработка событий, блокировка сущности, логирование, очистка и т.д.
protected function postProcess(Transition $transition) { //dispatch events, log, lock entity, cleanup, //commit transaction via persistence layer etc. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function after(){}", "protected function after(){}", "protected function after(){}", "protected function after() {}", "public abstract function after();", "public function execute(){\n\n $this->fr_NextState = $this->fr_CurrentState->fr_defaultAction();\n $this->fr_CurrentState = $...
[ "0.6385364", "0.6385364", "0.6385364", "0.6378218", "0.628569", "0.62798965", "0.6255057", "0.6173154", "0.6148685", "0.6140478", "0.6136088", "0.612462", "0.612462", "0.612462", "0.6107111", "0.6101797", "0.6069877", "0.60473937", "0.6039177", "0.6026987", "0.60159904", "0...
0.7325567
0
Verify an email and password match.
Проверьте, совпадают ли электронная почта и пароль.
public function verifyCredentials($email, $password);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function passwordMatch($email, $password) {\n $escapedEmail = $this->conn->real_escape_string($email);\n $escapedPassword = $this->conn->real_escape_string($password);\n $result = $this->conn->query(\"SELECT * FROM tbl_user WHERE user_email = '{$escapedEmail}' AND user_pass = '{$escaped...
[ "0.72688544", "0.7229018", "0.7153564", "0.7052173", "0.7035224", "0.7010992", "0.6972738", "0.69479626", "0.68949795", "0.6881486", "0.6881164", "0.68418574", "0.6756811", "0.67422414", "0.67402357", "0.6731432", "0.6721342", "0.6717601", "0.67165995", "0.6695094", "0.668765...
0.8316461
0
Download compressed product on Gzip.
Скачайте сжатый продукт в формате Gzip.
public function getProductCompressed() { $dataDb = app('db')->select('SELECT * FROM products'); $json = json_encode($dataDb); $gzData = gzencode($json, 9); $fileName = "products.json.gz"; $file = storage_path("download/" . $fileName); $fp = fopen($file, "w");...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _lvDownloadSourceEpgGzToTmp() {\n $this->_sDownloadPath = __DIR__.\"/\".$this->_sTmpDir.$this->_sDownloadedTmpBaseName.\".gz\";\n \n $blRefreshTmpFile = $this->_sCheckRefreshFile();\n \n if ( $blRefreshTmpFile ) {\n if ( file_exists( $this->_sDownl...
[ "0.62236625", "0.62203705", "0.6176872", "0.60907817", "0.60400414", "0.60049105", "0.5971506", "0.596527", "0.5904847", "0.58973503", "0.58477837", "0.58238095", "0.5798834", "0.5777536", "0.57607615", "0.5757465", "0.57355344", "0.5724392", "0.5694577", "0.5689298", "0.5677...
0.7027516
0
Replace product with request.
Замените product на request.
public function replaceProducts(Request $request) { $attr = ['pid' => $request->input('pid')]; app('db')->table('products')->updateOrInsert($attr,$request->all()); return response()->json($request->all()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, $product)\n {\n //\n }", "public function update(Request $request, product $product)\n {\n //\n }", "public function update(Request $request, product $product)\n {\n //\n }", "public function update(Request $request, product $pro...
[ "0.70136636", "0.70025563", "0.70025563", "0.70025563", "0.68706435", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", "0.676436", ...
0.72238374
0
get last time updated product.
получить последнее время обновления продукта.
public function getLastTimeProduct() { $last = app('db')->select('SELECT updated FROM products ORDER BY updated DESC LIMIT 1'); if ($last == []) { $last = [["updated" => "2001-01-01 00:00:00"]]; } return $last; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lastUpdated()\n {\n return $this->lastUpdated;\n }", "function getUpdateTime(){\n\t\t$status =& $this->getStatus();\n\t\treturn $status['Update_time'];\n\t}", "public function getLastUpdateTime() {\n return $this->parseDateTime($this->data->updated);\n }", "public funct...
[ "0.7346214", "0.733081", "0.7266094", "0.725299", "0.72131014", "0.72131014", "0.72131014", "0.72131014", "0.71974784", "0.7176855", "0.71638924", "0.71607417", "0.71247786", "0.7124072", "0.71171176", "0.71041334", "0.7063526", "0.70548975", "0.70440686", "0.7041136", "0.704...
0.84110075
0
get json product by barcode.
получить json-продукт по штрих-коду.
public function getProductByBarcode($barcode) { $result = app('db')->select('SELECT * FROM products WHERE barcode = "'. $barcode . '"'); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show($codebar)\n {\n //\n try {\n //code...\n\n $product = Product::where('codebar',$codebar)->select('id')->first();\n\n\n if(!$product) {\n return response()->json([],200);\n }\n\n $row = Kardex::select('produc...
[ "0.70273525", "0.6696987", "0.6666915", "0.65645266", "0.6325035", "0.62988", "0.6286135", "0.6233937", "0.62218535", "0.61814", "0.61681414", "0.6136878", "0.61277854", "0.6105251", "0.60865164", "0.60795146", "0.606441", "0.60481566", "0.60152566", "0.59689975", "0.5929474"...
0.7016929
1
Action that handles pingback call from paymentwall system
Действие, обрабатывающее вызов пингбэка из системы paymentwall
public function ipnAction() { $result = Mage::getModel('paymentwall/pingback')->handlePingback(); die($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function pay_action()\n {\n }", "function ipn_response() {\r\n $original_order_id = $_GET['goodsid'];\r\n $order = wc_get_order($_GET['goodsid']);\r\n if (!$order) {\r\n die('The order is Invalid!');\r\n }\r\n\r\n $payment = wc_get_payment...
[ "0.66357523", "0.65291584", "0.6508745", "0.64938396", "0.6409316", "0.6383212", "0.63776934", "0.6375006", "0.63249207", "0.6235303", "0.62158895", "0.6211945", "0.6202816", "0.61974525", "0.61928064", "0.61890674", "0.61860514", "0.61860514", "0.6148274", "0.61397773", "0.6...
0.7283859
0
UPDATE score FROM user_registered WHERE email = '$id' SET score = '$receivedscore'
UPDATE score FROM user_registered WHERE email = '$id' SET score = '$receivedscore'
public function saveScoredata($receivedscore, $id) { $query = $this->db->query("UPDATE user_registered SET score = '$receivedscore' WHERE email = '$id'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setScore($userInfo, $scoreBonus){\n $userEmail = $userInfo[\"email\"];\n $userScore = $userInfo[\"score\"];\n $userScore += $scoreBonus;\n\n $sqlStatement = \"UPDATE users\n SET score = \" . $userScore . \"\n WHERE email = '\" . $userEmail . \"';\";\n e...
[ "0.76850706", "0.69714904", "0.6865859", "0.6637307", "0.64972466", "0.64824283", "0.64787316", "0.6423829", "0.630627", "0.628414", "0.62681174", "0.62550265", "0.62473327", "0.60826385", "0.60380477", "0.60097647", "0.59742117", "0.5945157", "0.59058964", "0.5903013", "0.59...
0.7905553
0
This method allows to get the average color of the image
Этот метод позволяет получить средний цвет изображения
public function getAverageColor() { $im = $this->_getImage(); $width = imagesx($im); $height = imagesy($im); $ret = 0; $total_points = $width*$height; for ($i=0; $i<$width; $i++) { for ($j=0; $j<$height; $j++) { $ret += imagecolorat($im, $i, $j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function average_color($image_url){\n\n\t\t$mime = image_type_to_mime_type( exif_imagetype ( $image_url ) );\n\n\t\t//Get image based on mime and set to $im\n\t\tswitch($mime){\n\t\t\tcase 'image/jpeg':\n\t\t\t\t$im = imagecreatefromjpeg($image_url);\n\t\t\tbreak;\n\t\t\n\t\t\tcase 'image/gif':\n\t\t...
[ "0.7893461", "0.78404516", "0.7384627", "0.7335183", "0.73300326", "0.7230409", "0.6973624", "0.69229716", "0.6828325", "0.6730626", "0.64852923", "0.6476384", "0.62284833", "0.6183214", "0.6168003", "0.6143423", "0.6074253", "0.6041329", "0.5904068", "0.5897708", "0.5840997"...
0.8686053
0
The method returns image as an array of its colors
Метод возвращает изображение в виде массива его цветов
public function toArray() { $im = $this->_getImage(); $width = imagesx($im); $height = imagesy($im); $ret = array(); for ($i=0; $i<$width; $i++) { $ret[$i] = array(); for ($j=0; $j<$height; $j++) { $ret[$i][$j] = imagecolorat($im, $i, $j); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImageColors () {}", "function imagecolorsforindex($image, $color)\n{\n return array();\n}", "public static function getColors();", "public function toRGB() : array\n\t\t{\n\n\t\t\treturn([\n\t\t\t\t'red'\t=> XXX, \n\t\t\t\t'blue'\t=> XXX, \n\t\t\t\t'green' => XXX, \n\t\t\t\t'alpha' => X...
[ "0.817274", "0.7446745", "0.73445094", "0.7324557", "0.72580874", "0.71436876", "0.7034322", "0.6975412", "0.6914854", "0.6893973", "0.6892557", "0.6884182", "0.6872252", "0.6778853", "0.6749012", "0.67402196", "0.668817", "0.66562784", "0.65970904", "0.65556467", "0.65486467...
0.79818636
1
Get things started Defines our WP_Session constants, includes the necessary libraries and retrieves the WP Session instance
Запуск процесса Определяет наши константы WP_Session, включает необходимые библиотеки и получает экземпляр WP Session
public function __construct() { // Use WP_Session (default) if ( ! defined( 'WP_SESSION_COOKIE' ) ) { define( 'WP_SESSION_COOKIE', 'nf_wp_session' ); } if ( ! class_exists( 'Recursive_ArrayAccess' ) ) { require_once NF_PLUGIN_DIR . 'includes/libraries/class-recursive-arrayaccess.php'; } if ( ! class_e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init() {\n\t\t$this->session = WP_Session::get_instance();\n\t\treturn $this->session;\n\t}", "function start_session(){\n\n\t\t\tif( ! isset( $_COOKIE['woocommerce_items_in_cart'] ) ) {\n\t\t\t\tdo_action( 'woocommerce_set_cart_cookies', true );\n\t\t\t}\n\t\t\t$this->session_class = new YITH_YW...
[ "0.7523067", "0.6918056", "0.68292075", "0.6777758", "0.67267215", "0.6670067", "0.65796053", "0.650388", "0.6496483", "0.64844036", "0.647229", "0.64245886", "0.64158624", "0.6411476", "0.6406655", "0.63519895", "0.6342359", "0.631742", "0.6254005", "0.6250196", "0.624271", ...
0.73481303
1
Setup the WP_Session instance
Настройте экземпляр WP_Session
public function init() { $this->session = WP_Session::get_instance(); return $this->session; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setup()\n\t{\n\t\t#Setup session with different id and start it\n\t\t@session_name('CMSSESSID' . CmsSession::generate_session_key());\n\t\t@ini_set('url_rewriter.tags', '');\n\t\t@ini_set('session.use_trans_sid', 0);\n\t\t\n\t\tif(!@session_id())\n\t\t{\n\t\t @session_start();\n\t\t}\n\n\...
[ "0.7296797", "0.7250385", "0.7178655", "0.7140033", "0.70724887", "0.70705986", "0.700899", "0.7002971", "0.6977436", "0.6973762", "0.6971727", "0.69679594", "0.6930476", "0.6839639", "0.68379843", "0.6794107", "0.6789071", "0.6771917", "0.67613083", "0.6760783", "0.6717028",...
0.7734504
0
Force the cookie expiration variant time to 23 minutes
Принудительно установить время истечения срока действия куки-параметра в 23 минуты
public function set_expiration_variant_time( $exp ) { return 60 * 23; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCookieTime(){\n $this->cookieExpireTime = time()+250;\n }", "public static function expire(){\n return time() + (60 * 60 * 24 * 3);}", "public function destroycookies(){\n $this-> setExpirationDate( time()-3600 );\n }", "function my_expiration_filter($seconds, $user_...
[ "0.74636835", "0.71147865", "0.70884305", "0.70362306", "0.6876475", "0.679849", "0.67167383", "0.66933346", "0.66604143", "0.6656312", "0.66359866", "0.6595007", "0.65441245", "0.65070933", "0.6505202", "0.6499317", "0.6471083", "0.6460861", "0.6407314", "0.6391556", "0.6350...
0.73997915
1
Wites a string to a file, overwriting any existing files
Записывает строку в файл, перезаписывая существующие файлы
static function writeStringToFile($string,$file) { if (!$handle = fopen($file, 'w')) { return false; } if (fwrite($handle, $string) === FALSE) { return false; } fclose($handle); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function append_to_file($filename, $mytext) {\r\n if (file_exists($filename) && !is_writable($filename))\r\n echo \"File $filename is not writable.\";\r\n else {\r\n $fh = fopen($filename, 'a');\r\n fwrite($fh, $mytext);\r\n fclose($fh);\r\n }\r\n}", "private function writerFile()...
[ "0.6919053", "0.6672347", "0.6619183", "0.66032815", "0.65685254", "0.65015835", "0.6491285", "0.6465133", "0.64345545", "0.64250547", "0.64215475", "0.64204323", "0.63486755", "0.6319194", "0.63117504", "0.62925225", "0.62833875", "0.62579346", "0.6203366", "0.62023073", "0....
0.70341426
0
Finds a free path for a file, using a provided file as input
Находит свободный путь для файла, используя предоставленный файл в качестве входных данных
static function findFreeFilePath($path) { $path_parts = pathinfo($path); $dir = $path_parts['dirname']; $file = $path_parts['basename']; if (array_key_exists('extension',$path_parts)) { $ext = $path_parts['extension']; } else { $ext = ''; } $output = $path; $head = substr($f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function testPath($candidates, $file) {\n foreach ($candidates as $candidate) {\n if (file_exists($candidate . DIRECTORY_SEPARATOR . $file)) {\n require_once ($candidate . DIRECTORY_SEPARATOR . $file);\n return $candidate;\n }\n }\n return NULL;\n }", "function fil...
[ "0.64559895", "0.63974077", "0.63387984", "0.62818605", "0.6190393", "0.61805475", "0.6127996", "0.60936445", "0.6073262", "0.6061538", "0.60573196", "0.6035608", "0.6025631", "0.6021923", "0.6016913", "0.6010441", "0.59746265", "0.59695965", "0.59509146", "0.59497744", "0.58...
0.7153419
0
Makes a filename into a nice looking title (stripping extensions etc.)
Преобразует имя файла в красивое заголовок (удаляя расширения и т.д.)
static function filenameToTitle($filename) { $pos = strpos($filename,'.'); if ($pos === false) { $title = $filename; } else { $title = substr($filename,0,$pos); } $title = str_replace('_',' ',$title); return ucfirst($title); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function filenameToTitle($filename)\n {\n return ucwords(str_replace(['_', '-'], ' ', $filename));\n }", "function filename_to_title( $name ){\r\n\t\t$t = preg_replace( '/\\A[0-9]+_/', '', $name );\r\n\t\t// remove trailing slash\r\n\t\t$t = preg_replace( '/\\/\\Z/', '', $t );\r\n\t\t/...
[ "0.81371456", "0.8121307", "0.80800515", "0.7829817", "0.75524837", "0.7543329", "0.7520175", "0.7467001", "0.74439245", "0.7341831", "0.7240339", "0.7237113", "0.72325104", "0.72204554", "0.7128744", "0.709851", "0.7054797", "0.7029305", "0.701327", "0.7008934", "0.69905245"...
0.83424765
0
This function (is intended to) provides a uniform way to retrieve a list of server certificates
Эта функция (намерена) обеспечивает единый способ получения списка сертификатов сервера
function get_certificates_server($get_includeWebCert=false) { global $config; $certificates=array(); $a_cert = &$config['cert']; foreach ($a_cert as $cert) { if ($get_ca == false && is_webgui_cert($cert['refid'])) continue; $purpose = cert_get_purpose($cert['crt']); //$certserverpurpose = $purpose['serve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list()\n {\n return $this->getHttpClient()->request('ssl_certificates');\n }", "public function listClientCerts($serverName)\n {\n $certs = [];\n\n foreach ($this->listServers() as $server) {\n if ($server !== $serverName) {\n continue;\n ...
[ "0.7613723", "0.7474443", "0.72854763", "0.7252407", "0.7160928", "0.70560014", "0.7046375", "0.6945533", "0.69319004", "0.6905551", "0.6782724", "0.66840494", "0.6547461", "0.65274525", "0.65245175", "0.6460927", "0.64438367", "0.64322656", "0.6424097", "0.6408711", "0.63977...
0.8018813
0
Boot the soft deleting trait for a model.
Запустите признак мягкого удаления для модели.
public static function bootSoftDeletes() { $model = (new static); //Enable soft deletes when timestamps are turned on or column deleted_at is available if ( $model->hasSoftDeletes() ) { static::addGlobalScope(new SoftDeletingScope); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function bootSoftDeletes()\n {\n static::addGlobalScope(new SoftDeletingScope);\n }", "public static function bootSoftDeletes()\n {\n static::addGlobalScope(new SoftDeletingScope);\n }", "protected static function bootContainsSoftDeletableUniques()\n\t{\n\t\t// by Larave...
[ "0.7404367", "0.7404367", "0.6871943", "0.67645067", "0.6624828", "0.6566463", "0.6564129", "0.6531601", "0.6509119", "0.65000826", "0.6497756", "0.6470941", "0.6470136", "0.6372923", "0.637251", "0.6298655", "0.62962335", "0.6260538", "0.61834985", "0.61765665", "0.61523783"...
0.7459247
0
/ Check if user can delete row
Проверить, может ли пользователь удалить строку
public function canDelete() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasDeleteRowPermission()\n \t{\n \treturn $this->perms_map[\"deleterow\"];\n \t}", "public function canDelete() {\n return TRUE;\n }", "function check_del() {\r\n if ($_SESSION['login_level'] > 1) {\r\n foreach ($this->_rowid as $rowid) {\r\n if (...
[ "0.83495796", "0.7674427", "0.75988376", "0.75466466", "0.7485702", "0.74806476", "0.7473492", "0.7450132", "0.7404336", "0.73539484", "0.73210704", "0.7202598", "0.7197029", "0.7166015", "0.7131461", "0.71171594", "0.71095335", "0.71079963", "0.7092993", "0.7083564", "0.7070...
0.7706349
1
Check if publishable scope is enabled by default
Проверьте, включено ли по умолчанию опубликованное состояние области
private function isPublishableAllowed() { if ( $this->publishable == false ){ return false; } if ( Admin::isAdmin() === true ) { return false; } if ( self::$globalPublishable === false ) { return false; } return (self::$g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPublishable() {\n\t\t$isPublishable = true;\n\t\tif($this->nodeStatus !== 'online') {\n\t\t\t$isPublishable = false;\n\t\t}\n\t\treturn $isPublishable;\n\t}", "public function isPublish();", "public function isDevAllowed($scope = null);", "public function isPublished()\n {\n retur...
[ "0.70929545", "0.6792773", "0.6730692", "0.6712859", "0.6699852", "0.663611", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "0.6629273", "...
0.7378213
0
returns the number of affected rows
возвращает количество затронутых строк
public function affected_rows() : int;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function affectedRows(): int;", "public function affectedRows(): int;", "public function rows_affected(){ return 0; }", "public function affectedRows() {\n $this->prepareAndBind();\n $this->stmt->execute(); \n return $this->stmt->rowCount();\n }", "public function sql_a...
[ "0.84769875", "0.84769875", "0.84749186", "0.8389157", "0.8330905", "0.82960457", "0.8295777", "0.8295777", "0.8293133", "0.82749623", "0.8267235", "0.82526624", "0.82366884", "0.82125545", "0.8198831", "0.81965387", "0.8182131", "0.8157922", "0.81573147", "0.81573147", "0.81...
0.8521939
0
returns the client info
возвращает информацию о клиенте
public function client_info() : string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClientInfo()\n {\n }", "public function getClientInfo()\n {\n return mysqli_get_client_info();\n }", "public function getClientInfo()\n {\n }", "function cubrid_get_client_info()\n{\n}", "public function clientInformation(): string;", "function get_client_info() {\n ...
[ "0.8459254", "0.82751244", "0.8272294", "0.81204915", "0.80291027", "0.78902143", "0.7839438", "0.76497275", "0.7562901", "0.74352527", "0.74352527", "0.73558915", "0.7270649", "0.7192513", "0.7142719", "0.701375", "0.7008551", "0.6953953", "0.6936167", "0.69265825", "0.69222...
0.835055
1
returns the host info
возвращает информацию о хосте
public function host_info() : string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHostInfo()\n {\n if ($this->_hostInfo === null) {\n $secure = $this->isSecureConnection();\n $http = $secure ? 'https' : 'http';\n if (isset($_SERVER['HTTP_HOST'])) {\n $this->_hostInfo = $http . '://' . $_SERVER['HTTP_HOST'];\n ...
[ "0.8036468", "0.7984216", "0.79523176", "0.7877173", "0.7877173", "0.7877173", "0.77872574", "0.77869153", "0.77172625", "0.77172625", "0.77172625", "0.77172625", "0.77172625", "0.77172625", "0.77172625", "0.77172625", "0.77172625", "0.77172625", "0.77172625", "0.77172625", "...
0.85647565
0
returns the proto info
возвращает информацию в формате proto
public function proto_info() : int;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProtoInfo($link)\n {\n // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps\n return $link->protocol_version;\n }", "function sql_get_proto_info($conn=false)\n {\n global $MYSQL_CONN;\n if (!$conn) $conn = $MYSQL_CONN;\n retur...
[ "0.6759244", "0.6726482", "0.6649687", "0.6563569", "0.6550505", "0.65227294", "0.6437324", "0.6434832", "0.643442", "0.635748", "0.61999136", "0.6143516", "0.61044395", "0.6069395", "0.6066791", "0.60400575", "0.5840249", "0.58378404", "0.5829872", "0.58182573", "0.5731285",...
0.8360364
0
returns the time used by the database
возвращает время, использованное базой данных
public function getDbTime() : float;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTime() {\n return max(0, $this->getExpireTime() - Misc::dbtime());\n }", "public function getDBDuration()\n {\n if ($this->queries === null) {\n return;\n }\n\n return collect($this->queries)->sum('time');\n }", "public function getTimeNeeded()\n\t{\n...
[ "0.7333477", "0.69899917", "0.69111425", "0.6861663", "0.6833166", "0.68015695", "0.67770547", "0.67339975", "0.67098314", "0.6656153", "0.66400445", "0.6636421", "0.662204", "0.66052556", "0.6581653", "0.65641797", "0.6556639", "0.6544034", "0.65427077", "0.64844763", "0.645...
0.7277919
1
Set broker configuration service to broker info configuration
Установите службу конфигурации брокера в конфигурацию информации о брокере
public function setBrokerConfigurationService(BrokerConfigurationService $brokerConfigurationService): void { $this->brokerConfigurationService = $brokerConfigurationService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function configure(){\n// $broker = BrokerFactory::getBroker($this->brokerType, $pamelContext, $this->from);\n// $broker->from()->process($this->processor)->to($this->to);\n }", "protected function setupBroker()\n {\n $this->endpoint = mconfig('finance.mpesa.endpoint');\n ...
[ "0.69194275", "0.6688846", "0.65330034", "0.64367115", "0.63251084", "0.6131425", "0.6101584", "0.59711045", "0.59294003", "0.58766204", "0.5842585", "0.5808115", "0.5770809", "0.5767966", "0.5750714", "0.56738585", "0.56738585", "0.557552", "0.55716836", "0.55259186", "0.550...
0.70802057
0
Get all orderRows that belong to an order.
Получить все orderRows, которые принадлежат заказу.
public function getOrderRows($orderId) { $sql = 'SELECT * FROM oophp_OrderRow OrderRow WHERE orderId = ? ORDER BY id ASC'; return $ordersRows = $this->findAllSql($sql, [$orderId]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_orders() {\n $db = model_database::instance();\n $sql = 'SELECT * from orders';\n $orders = array();\n $result = $db->get_rows($sql);\n foreach($result as $row) {\n $order = new model_order();\n $order->id = $row['order_id'];\n ...
[ "0.7085435", "0.7080007", "0.6827944", "0.6819185", "0.67095226", "0.65568054", "0.6542364", "0.6524142", "0.65114844", "0.65114844", "0.65111786", "0.6494477", "0.6482058", "0.6465138", "0.6465138", "0.6448544", "0.6448519", "0.6443109", "0.6404984", "0.637651", "0.63566875"...
0.79941213
0
Validate the contents of the provided credential file. All fields are required. Exits on errors.
Проверьте содержимое предоставленного файла учетных данных. Все поля обязательны. Выход при ошибках.
function validateCredentials($cred, $filename) { $errors = false; $fields = array( "token", "host", "segmentId" ); foreach ($fields as $f) { if (false == array_key_exists($f, $cred)) { printf("Error: %s must contain a %s.\n", $filename, $f); $error...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateCredentials($cred, $filename) {\n $errors = false;\n $fields = array(\n \"devToken\",\n \"devHost\",\n \"intToken\",\n \"intHost\"\n );\n foreach ($fields as $f) {\n if (false == array_key_exists($f, $cred)) {\n ...
[ "0.7219822", "0.69127584", "0.6491714", "0.60898185", "0.5904414", "0.58922184", "0.58750594", "0.57868683", "0.57695603", "0.5750636", "0.57413167", "0.5680026", "0.55422664", "0.55065465", "0.54975736", "0.54728436", "0.54208374", "0.53984046", "0.5373045", "0.53598917", "0...
0.7106096
1
Retrieves a groups payload for list of supporters. The whole payload is required because Engage indexes the results using the provided supporterIds. See:
Получает набор данных групп для списка сторонников. Полный набор данных требуется, поскольку Engage индексирует результаты с использованием предоставленных идентификаторов сторонников. См.:
function getGroupsPayload($cred, $metrics, $supporterIds) { $payload = [ 'payload' => [ 'offset' => 0, 'count' => $metrics->maxBatchSize, 'identifiers' => $supporterIds, 'identifierType' => "SUPPORTER_ID", "modifiedFrom" => "2005-05-26T11:49:24.905...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processGroupsForSupporters($cred, $metrics, $csv, $supporters)\n{\n // Create list if supporter IDs to send to Engage *and*\n // a hash of supporter IDs and supporter records. We'll\n // use the hash to retrieve supporter info after Engage\n // returns groups.\n $ids = array();\n $hash =...
[ "0.71002877", "0.5905264", "0.5556282", "0.54566383", "0.53931206", "0.5392061", "0.5299209", "0.5297329", "0.5248084", "0.5235446", "0.51900506", "0.5176545", "0.51757336", "0.5170873", "0.5170873", "0.5170873", "0.5170873", "0.5163069", "0.5159905", "0.51322824", "0.5114742...
0.7812606
0
Process groups for a list of supporters. Writes supproter info and a commadelimited list of groups to the output file.
Группы процессов для списка сторонников. Записывает информацию о сторонниках и список групп в виде запятой разграниченного списка в выходной файл.
function processGroupsForSupporters($cred, $metrics, $csv, $supporters) { // Create list if supporter IDs to send to Engage *and* // a hash of supporter IDs and supporter records. We'll // use the hash to retrieve supporter info after Engage // returns groups. $ids = array(); $hash = array(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function preprocess_groups() {\r\n\t\tforeach ( $this->get_groups() as $group ) {\r\n\t\t\t/**\r\n\t\t\t * Minify group.\r\n\t\t\t *\r\n\t\t\t * @var Minify_Group $group\r\n\t\t\t */\r\n\t\t\t$group->maybe_load_file();\r\n\t\t\t$group_src = $group->get_group_src();\r\n\r\n\t\t\tif ( $group->should_process_g...
[ "0.5464679", "0.5360744", "0.53308547", "0.5252979", "0.5205257", "0.506412", "0.50445116", "0.50009954", "0.49992225", "0.49891523", "0.49685594", "0.4963772", "0.495944", "0.49481538", "0.49370825", "0.49000478", "0.48961866", "0.48740053", "0.484869", "0.48320886", "0.4818...
0.7099818
0
Run retrieves supporters using the segmentID provided in the credentials file. Those supporters are used to retrieve the groups that each supporer belongs to. Supporters with groups are written to a tabdelimited file("all_supporter_groups.txt"). Supporters without groups are ignored.
Run получает сторонников с использованием segmentID, указанного в файле учетных данных. Эти сторонники используются для получения групп, к которым каждый из них принадлежит. Сторонники с группами записываются в файл с разделителями табуляции ("all_supporter_groups.txt"). Сторонники без групп игнорируются.
function run($cred, $metrics) { // Show the segment in case the segment ID is not what the user // wanted... $segmentId = $cred["segmentId"]; $segment = getSegment($cred, $metrics, $segmentId); if (!is_null($segment)) { printf("Searching %s: (%s) for %d supporters.\n\n", $segment...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processGroupsForSupporters($cred, $metrics, $csv, $supporters)\n{\n // Create list if supporter IDs to send to Engage *and*\n // a hash of supporter IDs and supporter records. We'll\n // use the hash to retrieve supporter info after Engage\n // returns groups.\n $ids = array();\n $hash =...
[ "0.64220935", "0.5167967", "0.51545703", "0.5078902", "0.496574", "0.49461356", "0.49045038", "0.4886075", "0.48689285", "0.483358", "0.48172998", "0.48047897", "0.4790927", "0.47846147", "0.47528958", "0.4733909", "0.471095", "0.4691334", "0.46903706", "0.4678175", "0.467122...
0.7455535
0
Lists all Recipe entities.
Список всех сущностей Recipe.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $recipes = $em->getRepository('ckRecipesBundle:Recipe')->findAll(); return array( 'recipes' => $recipes, ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllRecipes()\n {\n return RecipeResource::collection(Recipe::all());\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ckRecipesBundle:RecipesCategory')->findAll();\n\n return array(\n ...
[ "0.71694785", "0.6814496", "0.6771144", "0.6743562", "0.67274284", "0.6646046", "0.66416305", "0.6605899", "0.6593377", "0.6591043", "0.6580321", "0.65705705", "0.6525376", "0.6503205", "0.6502771", "0.6470293", "0.6456828", "0.64561504", "0.64058876", "0.64058876", "0.640579...
0.71545863
1
Creates a form to create a Recipe entity.
Создает форму для создания сущности Рецепт.
private function createCreateForm(Recipe $entity) { $em = $this->getDoctrine()->getManager(); $form = $this->createForm(new RecipeType(), $entity, array( 'action' => $this->generateUrl('recipe_create'), 'method' => 'POST', 'em' => $em )); $fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction()\n {\n $recipe = $this->getRecipeManager()->createRecipe();\n $form = $this->createForm(new RecipeType(), $recipe, array(\n 'action' => $this->generateUrl('backend_recipe_create')\n ));\n\n return $this->render('AppBundle:Backend\\Recipe:new.ht...
[ "0.7374995", "0.72649586", "0.7204385", "0.71734416", "0.71734416", "0.71734416", "0.7152566", "0.7125895", "0.7124676", "0.71232986", "0.71232986", "0.7049841", "0.6858257", "0.6835289", "0.6747143", "0.67147696", "0.6713058", "0.6711511", "0.6652797", "0.66143847", "0.66139...
0.77676535
0
Displays a form to create a new Recipe entity.
Показывает форму для создания нового сущности Recipe.
public function newAction() { $entity = new Recipe(); $form = $this->createCreateForm($entity); return array( 'entity' => $entity, 'form' => $form->createView(), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction()\n {\n $recipe = $this->getRecipeManager()->createRecipe();\n $form = $this->createForm(new RecipeType(), $recipe, array(\n 'action' => $this->generateUrl('backend_recipe_create')\n ));\n\n return $this->render('AppBundle:Backend\\Recipe:new.ht...
[ "0.83012474", "0.7783089", "0.7783089", "0.7783089", "0.77207994", "0.77199125", "0.77199125", "0.7704994", "0.7605518", "0.75859153", "0.7400556", "0.739048", "0.7369249", "0.7332567", "0.71936125", "0.71896154", "0.7183155", "0.7183155", "0.7171973", "0.7126341", "0.7098438...
0.7847484
1
Creates a form to edit a Recipe entity.
Создаёт форму для редактирования сущности Recipe.
private function createEditForm(Recipe $entity) { $em = $this->getDoctrine()->getManager(); $form = $this->createForm(new RecipeType(), $entity, array( 'action' => $this->generateUrl('recipe_update', array('id' => $entity->getId())), 'method' => 'PUT', 'em' =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Recipe $recipe)\n {\n //\n }", "public function editAction(Recipe $recipe)\n {\n $form = $this->createForm(new RecipeType(), $recipe,\n array(\n 'action' => $this->generateUrl('backend_recipe_update',\n ...
[ "0.72456026", "0.70597684", "0.6917713", "0.6914467", "0.68172437", "0.6742866", "0.6725157", "0.67174375", "0.67174375", "0.6679502", "0.66601694", "0.6656552", "0.6577983", "0.65229565", "0.64825225", "0.6476727", "0.64629227", "0.64220625", "0.64055765", "0.64035666", "0.6...
0.7818163
0
Creates a form to delete a Recipe entity by id.
Создает форму для удаления сущности Recipe по идентификатору.
private function createDeleteForm($id) { return $this->createFormBuilder() ->setAction($this->generateUrl('recipe_delete', array('id' => $id))) ->setMethod('DELETE') ->add('submit', 'submit', array( 'label' => 'Delete', 'attr' => array( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('recipescategory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ...
[ "0.74012804", "0.73714185", "0.7271204", "0.725983", "0.72018045", "0.7175578", "0.7165579", "0.7145669", "0.71425116", "0.7137291", "0.7119193", "0.71134144", "0.7106311", "0.7104735", "0.70988816", "0.7095696", "0.7088786", "0.70820427", "0.7080039", "0.7074162", "0.7072761...
0.7711188
0
Lists all favorite Recipe entities.
Список всех любимых сущностей Recipe.
public function favoriteRecipesAction() { $em = $this->getDoctrine()->getManager(); $securityContext = $this->get('security.context'); if(!$securityContext->isGranted('IS_AUTHENTICATED_FULLY')) throw new AccessDeniedException(); $user = $securityContext->getToken()->get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_favorites() {\n return $this->db->order_by('recipeID', 'asc')->get('recipes')->result();\n }", "public function getAllFavorites(): array\n {\n return $this->em->getRepository('App:Favorite')->findAll();\n }", "public function show(favrecipes $favrecipes)\n {\n ...
[ "0.7182676", "0.7000507", "0.66942596", "0.6405173", "0.62909377", "0.6283207", "0.6268516", "0.62585306", "0.62150836", "0.6196366", "0.6193109", "0.6192785", "0.61515695", "0.6141332", "0.61275643", "0.61275643", "0.61127794", "0.60586274", "0.6057926", "0.6052959", "0.6051...
0.75047475
0
creates a tEXt chunk with given key and text (iso88591) ToDo: check that key length is less than 79 and that neither includes null bytes
создаёт tEXt-блок с заданным ключом и текстом (iso88591) ToDo: проверить, что длина ключа меньше 79 и что ни один из них не содержит нулевых байтов
function phpTextChunk($key,$text) { $chunktype = "tEXt"; $chunkdata = $key . "\0" . $text; $crc = pack("N", crc32($chunktype . $chunkdata)); $len = pack("N",strlen($chunkdata)); return $len . $chunktype . $chunkdata . $crc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_chunks($type, $key, $value) {\n if (strlen($key) > 79) {\n debugging('Key is too big');\n }\n // tEXt Textual data.\n // Keyword: 1-79 bytes (character string)\n // Null separator: 1 byte\n // Text: n bytes (character string)...
[ "0.6055049", "0.5316665", "0.5152338", "0.5042332", "0.49610376", "0.49438816", "0.49205044", "0.48888654", "0.4859498", "0.48065013", "0.48039088", "0.47734386", "0.4763917", "0.47275177", "0.46896848", "0.46642658", "0.46450403", "0.46264958", "0.46147123", "0.4565779", "0....
0.7464846
0
Add a vhost in the vhost file.
Добавьте виртуальный хост в файл vhost.
public function addVHost($name, $path) { $data = file_get_contents($this->config->apache_path .'other'. SEP .'vhost-app.conf'); $_path = $this->config->webserver_path . SEP . $path; if($path == '/') $_path = $this->config->webserver_path; $data .= "#---- ". $name ." ----#\n"; $data .= "<VirtualHost *:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vhost($action, $data, $tpl = '') {\n\t\tglobal $app;\n\n\t\t/*\n\t\t * we create an empty array we can fill with data\n\t\t * and shorten some $vars\n\t\t */\n\t\t$userdir_vhosts = '/etc/apache2/userdirs-available';\n\t\t$userdir_vhosts_enabled = '/etc/apache2/userdirs-enabled';\n\n\t\t$data['vhost'] = ar...
[ "0.60887253", "0.59963226", "0.5925631", "0.59145576", "0.5724758", "0.5663696", "0.5637937", "0.5551373", "0.5438966", "0.5384806", "0.5207424", "0.51472986", "0.50719994", "0.49143916", "0.48574635", "0.4800948", "0.46828124", "0.4678727", "0.4678727", "0.4658249", "0.46365...
0.77138853
0
Gets a list of all Virtual Hosts made from this program. This method DOES NOT include the apache default httpdvhost.conf file.
Получает список всех виртуальных хостов, созданных с помощью этой программы. Этот метод НЕ включает файл apache default httpdvhost.conf.
public function getAllVHosts() { $file = file_get_contents($this->config->apache_path .'other'. SEP .'vhost-app.conf'); $hosts = explode('#----------', $file); $data = array(); foreach($hosts as $host) { $lines = explode("\n", $host); //if(!isset($lines[4])) break; //if($lines[2] != '<Virtu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVirtualHosts()\n {\n return $this->virtualHosts;\n }", "public function all_hostnames() {\n\t\treturn $this->hostnames;\n\t}", "function drush_feather_list() {\n $server = feather_get_server();\n\n $vhosts = $server->get_vhosts();\n if (empty($vhosts)) {\n drush_log(dt('No...
[ "0.7335749", "0.6999168", "0.69107276", "0.6835332", "0.68321824", "0.6764271", "0.650748", "0.6481182", "0.64694357", "0.6440887", "0.64234126", "0.637296", "0.631959", "0.6287369", "0.62184906", "0.6151544", "0.61441964", "0.6140403", "0.6094315", "0.60689646", "0.6047232",...
0.797786
0
Add a host to the hosts file.
Добавить хост в файл hosts.
public function addToHost($name) { if( $this->hostExists($name) === true ) return true; $data = file_get_contents($this->config->host_path); $data .= "127.0.0.1 ". $name; $data .= "\n"; file_put_contents($this->config->host_path, $data); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SERVER_addEtcHosts($hostname,$ip)\n{\n\tif (isset($_SESSION['m23Shared']) && $_SESSION['m23Shared']) return(false);\n\n\t//m23customPatchBegin type=del id=SERVER_addEtcHostsNoAdd\n\tSERVER_addLineToFile(\"/etc/hosts\",\" $hostname$\",\"$ip $hostname\");\n\t//m23customPatchEnd id=SERVER_addEtcHostsNoAdd\n\...
[ "0.6743808", "0.6606346", "0.63633496", "0.61253226", "0.6100083", "0.60907984", "0.6030301", "0.59622496", "0.5946316", "0.5924946", "0.59023947", "0.5882489", "0.5882489", "0.5882489", "0.58309114", "0.58309114", "0.5821922", "0.5814403", "0.5790386", "0.5732558", "0.571303...
0.7081282
0
Checks if the host already exists in the host file.
Проверяет, существует ли хост уже в файле hosts.
public function hostExists($name) { $file = file($this->config->host_path); $find = '127.0.0.1 '. $name; foreach($file as $line) { if( strstr($line, $find) !== false ) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkAndWriteHosts(): bool\n {\n $hosts = $this->getHosts();\n if ($hosts === $this->lastHosts) {\n return true;\n }\n $this->lastHosts = $hosts;\n\n $start = self::START_TAG . '-' . $this->scope;\n $end = self::END_TAG . '-' . $this->scope...
[ "0.71487546", "0.6503236", "0.6440374", "0.6434894", "0.6433549", "0.6286131", "0.6205005", "0.6142432", "0.61327016", "0.6126102", "0.6098822", "0.6091798", "0.6062118", "0.603296", "0.6027678", "0.6011535", "0.6001916", "0.60003346", "0.59724814", "0.594904", "0.5906438", ...
0.75057745
0
Delete a host from the hosts file.
Удалить хост из файла hosts.
public function deleteFromHosts($name) { $lines = file($this->config->host_path); $data = array(); $find = "127.0.0.1 ". $name; foreach($lines as $line) { if( strstr($line, $find) !== false ) $line = ''; $data[] = $line; } $stringData = implode('', $data); file_put_contents($this->con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteHost($host);", "function SERVER_delEtcHosts($hostname)\n{\n\tif (isset($_SESSION['m23Shared']) && $_SESSION['m23Shared']) return(false);\n\n\t//m23customPatchBegin type=del id=SERVER_delEtcHostsNoDel\n\tSERVER_delLineFromFile(\"/etc/hosts\",\" $hostname$\");\n\t//m23customPatchEnd id=SERVER...
[ "0.8001675", "0.6767767", "0.6539192", "0.6505689", "0.64100796", "0.6332044", "0.6051644", "0.6007094", "0.5975579", "0.5969196", "0.5933289", "0.5843477", "0.5740167", "0.5739708", "0.571369", "0.5644562", "0.5623242", "0.5582033", "0.5551376", "0.5535227", "0.5530301", "...
0.7206755
1
/ Date created: 20171124 Description: This is a function that displays copyright info for the website.
/ Дата создания: 20171124 Описание: Это функция, которая отображает информацию о правах на использование для веб-сайта.
function displayCopyrightInfo() { # string contains copyright symbol. current date, and company name $copyrightLine = ("&copy;" . " " . date('Y') . " " . "Peas In a Pod"); return $copyrightLine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCopyright () {}", "public function get_copyright()\n {\n }", "public function get_copyright()\n {\n }", "public function get_copyright()\n {\n }", "function copyright(){\n echo \"<center><p> Copyright (c) 2018 Copyright Holder All Rights Reserved. </p></center><...
[ "0.8248076", "0.80029637", "0.80029637", "0.80006987", "0.79620975", "0.7897354", "0.78361964", "0.77394646", "0.7424503", "0.7230306", "0.7208648", "0.7194802", "0.7183136", "0.7164027", "0.71634585", "0.7074306", "0.70434093", "0.700725", "0.70055956", "0.6957836", "0.68511...
0.8254074
0
/ Date modified: 20171124 Description: Displays certain links if the user is logged in.
/ Дата изменения: 20171124 Описание: Отображает определенные ссылки, если пользователь авторизован.
function loadLoggedInUserLinks() { echo'<a href="user-dashboard.php">User Dashboard</a>'; echo'<a href="profile-display.php">My Profile</a>'; echo'<a href="interests.php">Interests</a>'; echo'<a href="user-update.php">Update Info</a>'; echo'<a href="profile-create.php">Update Profile</a>'; echo'<a h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadLoggedOutUserLinks()\r\n\t{\r\n\t\techo'<a href=\"user-register.php\">User Registration</a>';\r\n\t\techo'<a href=\"user-password-request.php\">Request Password</a>';\r\n\t\techo'<a href=\"user-login.php\">Log In</a>';\r\n\r\n\t}", "function loadLoggedInAdminLinks()\r\n\t{\r\n\t\techo'<a href=\"admi...
[ "0.7282172", "0.7238158", "0.7169065", "0.7122571", "0.7056845", "0.7056208", "0.6975026", "0.693161", "0.68186235", "0.6764072", "0.67615724", "0.6728482", "0.66938955", "0.66727304", "0.6645233", "0.6621081", "0.6612765", "0.65909386", "0.65832734", "0.6540102", "0.6533991"...
0.7720718
0
/ Date modified: 20171126 Description: Displays certain links if the user isn't logged in but incomplete.
Дата изменения: 20171126 Описание: Отображает определенные ссылки, если пользователь не авторизован, но не полностью заполнен.
function loadLoggedInIncompleteUserLinks() { echo'<a href="user-dashboard.php">User Dashboard</a>'; echo'<a href="profile-create.php">Create Profile</a>'; echo'<a href="user-update.php">Update Info</a>'; echo'<a href="user-password-change.php">Change Password</a>'; echo'<a href="user-logout.php">Log Ou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadLoggedInUserLinks()\r\n\t{\r\n\t\techo'<a href=\"user-dashboard.php\">User Dashboard</a>';\r\n\t\techo'<a href=\"profile-display.php\">My Profile</a>';\r\n\t\techo'<a href=\"interests.php\">Interests</a>';\r\n\t\techo'<a href=\"user-update.php\">Update Info</a>';\r\n\t\techo'<a href=\"profile-create.p...
[ "0.7627587", "0.7486027", "0.7128246", "0.6901215", "0.67597353", "0.6663674", "0.66217387", "0.6597036", "0.64645886", "0.6462116", "0.6445919", "0.64395094", "0.6384518", "0.6367966", "0.6364077", "0.6345357", "0.6324966", "0.62692475", "0.6269156", "0.625904", "0.625568", ...
0.81766605
0
Display the form for mining operations held by the alliance
Показать форму для добычи ресурсов, осуществляемой союзом
public function displayMiningOperationForm() { //Declare variables $config = config('esi'); $lookup = new LookupHelper; $sHelper = new StructureHelper($config['primary'], $config['corporation']); $coll = new Collection; $structures = new Collection; //Get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCompetitiveAnalysis() {\n\techo \"<form action='marketUpdate.php' method='POST' id='form2'>\";\n\techo \"<input type='hidden' name='table' value='competitiveAnalysis'>\";\n\tprintNonEditable('id');\n\tprintNonEditable('entry');\n\tprintInput('behavior');\n\tprintInput('advantage');\n\techo \"<input...
[ "0.66662437", "0.6596346", "0.6362012", "0.6351516", "0.63433987", "0.63241565", "0.6279222", "0.62790763", "0.6249882", "0.6232835", "0.6213947", "0.6203082", "0.6195723", "0.61666113", "0.61337656", "0.61314934", "0.612951", "0.6119564", "0.6119564", "0.61017525", "0.608938...
0.78981996
0
Approve a moon rental from the form
Одобрить аренду луны из формы
public function storeApproveMoonRentalRequest() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function approveNominee()\n {\n $sid = $_POST['sid'];\n $pid = $_POST['pid'];\n\n $this->nominationServ->updateNominationFormStatus($sid, $pid, 1);\n\n // Check if the form has been submitted before the deadline.\n $verificationDeadlineObj = new DateTime($this->sessionServ->ge...
[ "0.6594363", "0.62022614", "0.6188744", "0.61865467", "0.61758685", "0.6163319", "0.61311084", "0.61094743", "0.60657483", "0.60543257", "0.60491383", "0.60456425", "0.6042379", "0.6035522", "0.60204667", "0.59981555", "0.59609294", "0.59594285", "0.5949126", "0.5942672", "0....
0.74637467
0