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 true if users' role is set to 'viewer'
Возвращает true, если роль пользователей установлена в 'viewer'
public function isViewer() { return ($this->role == self::ROLE_VIEWER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isViewer($wpUser){\n for($i = 0; $i < count($wpUser->roles); $i++){\n if(strpos($wpUser->roles[$i], SARON_ROLE_PREFIX . SARON_ROLE_VIEWER) !== FALSE){ // CHECK IF THE USER IS A MEMBER OF THE GROUP (test)saron_edit\n return true;\n }\n } \n return...
[ "0.78776354", "0.7684606", "0.7362391", "0.720845", "0.70432925", "0.7031197", "0.69313014", "0.69310707", "0.69122463", "0.6887822", "0.68530035", "0.6823524", "0.6806706", "0.68040544", "0.6797029", "0.6787671", "0.67584324", "0.6757901", "0.67466486", "0.6736319", "0.67337...
0.8284001
0
The pivot table class which contains information about which roles on which sites the user has. To eager load the roles and sites for a user, load('roles.role,roles.site')
Класс таблицы сводки, содержащий информацию о том, какие роли на каких сайтах имеет пользователь. Для немедленной загрузки ролей и сайтов для пользователя используйте load('roles.role,roles.site')
public function roles() { return $this->hasMany(UserSiteRole::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function roles(){\n return $this->belongsToMany('cms\\Role')->withPivot('created_at');\n // if not follow naming convention then would need to add extra parameters like so\n // to customize tables and columns follow this format\n // return $this->>belongsToMany('cms\\Role', 'user...
[ "0.65597075", "0.6346351", "0.6308164", "0.63053256", "0.62799776", "0.6278819", "0.6216563", "0.62074214", "0.6203449", "0.6196449", "0.61449885", "0.61250526", "0.6122899", "0.61210114", "0.61143", "0.61116683", "0.60853606", "0.60746527", "0.6060252", "0.6047136", "0.60412...
0.70916706
0
Test registering a value with the WeightedValue model.
Тест регистрации значения с использованием модели WeightedValue.
public function testRegisterValueWithModel() { $weightedValue = new WeightedValue('test', 3); $this->generator->registerWeightedValue($weightedValue); $retrievedWeightedValue = $this->generator->getWeightedValue($weightedValue->getValue()); $this->assertEquals($weightedValue->getAr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRegisterValues()\n {\n $values = ['foobar' => 10, 'foo' => 20, 'bar' => 30];\n $this->generator->registerValues($values);\n\n foreach ($this->generator->getWeightedValues() as $weightedValue)\n {\n $this->assertArrayHasKey($weightedValue->getValue(), $v...
[ "0.7519709", "0.66623896", "0.62341815", "0.61272377", "0.61244494", "0.5729989", "0.5713243", "0.5699563", "0.5681527", "0.56176746", "0.5504893", "0.5440109", "0.5440109", "0.5440109", "0.5440109", "0.5435301", "0.5425616", "0.5383716", "0.5353289", "0.5304537", "0.5296657"...
0.87868667
0
Test registering multiple values and weights via the registerValue method.
Тест регистрации нескольких значений и весов через метод registerValue.
public function testRegisterValues() { $values = ['foobar' => 10, 'foo' => 20, 'bar' => 30]; $this->generator->registerValues($values); foreach ($this->generator->getWeightedValues() as $weightedValue) { $this->assertArrayHasKey($weightedValue->getValue(), $values); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRegisterValueWithModel()\n {\n $weightedValue = new WeightedValue('test', 3);\n $this->generator->registerWeightedValue($weightedValue);\n\n $retrievedWeightedValue = $this->generator->getWeightedValue($weightedValue->getValue());\n\n $this->assertEquals($weighted...
[ "0.74416953", "0.7408119", "0.6141591", "0.6038782", "0.5950712", "0.58331984", "0.58122087", "0.5751697", "0.5351663", "0.5293415", "0.52272004", "0.5198216", "0.51808184", "0.5170895", "0.51668257", "0.512973", "0.512973", "0.512973", "0.51227206", "0.51042825", "0.5103069"...
0.8256658
0
Test registering a value with a weight of 0.
Тест регистрации значения с весом 0.
public function testRegisterValueWeightZero() { $this->expectException(InvalidArgumentException::class); $this->generator->registerValue('test', 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveWeightedValue()\n {\n $value = new \\stdClass();\n $weightedValue = new WeightedValue($value, 2);\n $this->generator->registerWeightedValue($weightedValue);\n $this->generator->removeWeightedValue($weightedValue);\n\n $registeredValues = iterator_to_a...
[ "0.7072783", "0.70720327", "0.65069795", "0.603296", "0.6023172", "0.60191005", "0.593574", "0.593574", "0.593574", "0.593574", "0.59353983", "0.58848697", "0.58243334", "0.57928944", "0.56954867", "0.56815743", "0.5658367", "0.5648391", "0.56434655", "0.56434655", "0.5643465...
0.747683
0
Test registering a value with a weight of 0, using the registerValues method.
Тест регистрации значения с весом 0, используя метод registerValues.
public function testRegisterValuesWeightZero() { $this->expectException(InvalidArgumentException::class); $this->generator->registerValues(['test' => 0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRegisterValueWeightZero()\n {\n $this->expectException(InvalidArgumentException::class);\n\n $this->generator->registerValue('test', 0);\n }", "public function testRegisterValues()\n {\n $values = ['foobar' => 10, 'foo' => 20, 'bar' => 30];\n $this->genera...
[ "0.75832915", "0.7379295", "0.7363484", "0.6846531", "0.62820005", "0.58704066", "0.5479521", "0.54661363", "0.5329562", "0.5329562", "0.5329562", "0.5329562", "0.5304281", "0.5237219", "0.522905", "0.5218278", "0.513238", "0.50835896", "0.5039143", "0.4976271", "0.49111557",...
0.7518058
1
Try to remove a registered weighted value.
Попробуйте удалить зарегистрированное взвешенное значение.
public function testRemoveWeightedValue() { $value = new \stdClass(); $weightedValue = new WeightedValue($value, 2); $this->generator->registerWeightedValue($weightedValue); $this->generator->removeWeightedValue($weightedValue); $registeredValues = iterator_to_array($this->g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveValue()\n {\n $value = new \\stdClass();\n $this->generator->registerValue($value);\n $this->generator->removeValue($value);\n\n $registeredValues = iterator_to_array($this->generator->getWeightedValues());\n $this->assertEquals(0, count($registeredVa...
[ "0.69730705", "0.60664666", "0.57007974", "0.5655472", "0.55594593", "0.55226094", "0.5448755", "0.5448755", "0.5448755", "0.5448755", "0.535292", "0.53509265", "0.5350656", "0.5338252", "0.5236069", "0.5236069", "0.5236069", "0.5223995", "0.51794547", "0.5122566", "0.5080625...
0.7832696
0
Test that generate multiple can and will return the same value multiple times.
Тест, который генерирует несколько значений и будет возвращать одно и то же значение несколько раз.
public function testGenerateMultipleDuplicateValues() { $registeredValue = new \stdClass(); $this->generator->registerValue($registeredValue); $values = iterator_to_array($this->generator->generateMultiple(10)); $this->assertCount(10, $values); foreach ($values as $value) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGenerateMultipleNoDuplicateValues()\n {\n $registeredValues = [\n '1' => 1,\n '2' => 1,\n '3' => 1,\n ];\n $this->generator->registerValues($registeredValues);\n\n // Mock random number generator to return the first item twice, the...
[ "0.77832085", "0.7006293", "0.6251219", "0.6103853", "0.6037217", "0.602474", "0.5970819", "0.5926605", "0.58779204", "0.58696276", "0.586823", "0.5852295", "0.58476007", "0.5836786", "0.5776464", "0.5773672", "0.57538855", "0.5753568", "0.57159805", "0.5661682", "0.5606279",...
0.7688638
1
Test the generateMultipleWithoutDuplicates for removing duplicate items from the results.
Проверьте generateMultipleWithoutDuplicates для удаления дублирующихся элементов из результатов.
public function testGenerateMultipleNoDuplicateValues() { $registeredValues = [ '1' => 1, '2' => 1, '3' => 1, ]; $this->generator->registerValues($registeredValues); // Mock random number generator to return the first item twice, then return items...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanDuplicates( );", "public function testDeleteMultipleKeyValuePairsAtOnce(): void\n {\n $arr = array();\n $records = rand(220, 370);\n for ($i=0; $i <= $records; $i++) {\n $key = 'KeyNumber-' . $i;\n $val = 'ValueNumber-' . $i;\n $arr[$k...
[ "0.68356144", "0.64506274", "0.6312669", "0.62581605", "0.6181897", "0.6003991", "0.5816648", "0.5653004", "0.5595052", "0.5551525", "0.55429816", "0.5542519", "0.55340576", "0.55027497", "0.5472934", "0.5456251", "0.544907", "0.54375845", "0.5435035", "0.5392166", "0.538958"...
0.77869487
0
Test getting a weighted value for a non existing value, which should result in an invalid argument exception
Тестирование получения взвешенного значения для несуществующего значения, которое должно привести к исключению недопустимого аргумента
public function testGetNonExistingWeightedValue() { $this->expectException(InvalidArgumentException::class); $this->generator->getWeightedValue(new \stdClass()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRegisterValueWeightZero()\n {\n $this->expectException(InvalidArgumentException::class);\n\n $this->generator->registerValue('test', 0);\n }", "public function testRegisterValuesWeightZero()\n {\n $this->expectException(InvalidArgumentException::class);\n\n ...
[ "0.6708587", "0.6529557", "0.6342108", "0.58137345", "0.5752181", "0.5717438", "0.5654857", "0.55904907", "0.55904907", "0.55904907", "0.55904907", "0.55904907", "0.55904907", "0.55904907", "0.557791", "0.5571414", "0.55157566", "0.54949415", "0.5491254", "0.5491254", "0.5482...
0.77429223
0
Return the text content contained in "lobSub"
Верните текстовое содержимое, содержащееся в "lobSub"
function getTextContent() { return $this->lobSub->lobText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCaption() {\n\t\treturn $this->lobSub->lobCaption;\n\t}", "public function getSubTitle(){\n\t\treturn $this->ol[\"ISBN:\".$this->isbn][\"subtitle\"];\t\n\t}", "public function getTextContent();", "function getContents() ;", "function getSubType() {\n\t\treturn $this->repoObj->lobSubType;\n\t}"...
[ "0.5793016", "0.5688642", "0.5510441", "0.5481636", "0.5380751", "0.5379172", "0.53100806", "0.52832395", "0.5272678", "0.52594244", "0.5258378", "0.5256931", "0.5255427", "0.5220536", "0.5217383", "0.51966214", "0.51966214", "0.519317", "0.51592386", "0.5155574", "0.5152251"...
0.7624884
0
Return an internet MIME for a specific subtype. Optional extension for generic subtypes like "open office"
Вернуть интернет MIME для конкретного подтипа. Необязательное расширение для общих подтипов, таких как "open office"
function getMimeForSubtype($subType,$ext='') { if ($ext == 'jpeg' || $ext == 'pjpeg' || $ext == 'jpg') { $ext = 'jpeg'; } switch($subType) { case 'text': return 'text/plain'; case 'wiki': return 'text/wiki'; case 'html': return 'text/html'; case 'image': return 'image/'.$ext; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMimeType ()\n\t{\n\t\treturn $this->mainType.'/'.$this->subType;\n\t}", "public function getMimeSubType() {\n return explode('/', $this->contentType)[1];\n }", "abstract public function getMimeType();", "public static function getExtension(string $mime_type):string;", "function mimeType ($s...
[ "0.72378194", "0.6981172", "0.69495547", "0.6691675", "0.6656169", "0.65977037", "0.6572617", "0.65421146", "0.6524686", "0.65025437", "0.65025437", "0.65025437", "0.65025437", "0.65025437", "0.6486612", "0.6486612", "0.6486612", "0.6486612", "0.6412268", "0.6357411", "0.6346...
0.79646236
0
MyClub GetEvents shortcode shortcode [get_myclub_events_via_groupname url=" name="" amount="8"] Place Clubs Api Key into file: myclubapi.key (Api key can be asked and generated from support) NOTE! as the key can be used to edit/create API services, make sure that your web server configured to prevent showing .key file ...
MyClub GetEvents короткий код [get_myclub_events_via_groupname url=" name="" amount="8"] Поместите Api-ключ для Clubs в файл: myclubapi.key (Api-ключ можно запросить и сгенерировать через поддержку) ВНИМАНИЕ! так как ключ может использоваться для редактирования/создания API-сервисов, убедитесь, что ваш веб-сервер настр...
function GetMyClubEventsByName($atts) { //MyClubAPI events url extract(shortcode_atts(array ('url' => '', 'name' => '', 'amount' => '', ),$atts)); return getMyClubApiEventsViaGroupName($atts['url'],$atts['name'],$atts['amount']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMyClubApiEventsViaGroupName($url, $groupName,$amountOfEvents)\n{\n\t$returnString=\"\";\n\t\n\t//form get group url from original event request url \"https://<club>.myclub.fi/api/groups\"\n\t$pu = parse_url($url);\n \t$baseurl=$pu[\"scheme\"] . \"://\" . $pu[\"host\"];\n\t$groupurl=$baseurl . \"/api...
[ "0.6624431", "0.60632324", "0.5581064", "0.5392508", "0.52984136", "0.5130429", "0.5121908", "0.5121796", "0.5028672", "0.49792764", "0.49792045", "0.4977294", "0.49770153", "0.49529812", "0.49266568", "0.49258578", "0.49162143", "0.48856756", "0.4881901", "0.48771265", "0.48...
0.7424402
0
Fetch myclubapi webapi json with given url
Получить myclubapi webapi json по заданному url
function GetMyClubApiJson($url) { $returnString=""; $apiKey=GetMyClubApiKeyHeader(); if (CheckError($json)) { return $json; } $headers = [ $apiKey, ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function h_GET(string $url, $data = []) {\n // if URL doesn't start with \"http\", prepend API_URL\n if (!preg_match('/^http/', $url, $matches)) {\n $url = API_URL . $url;\n }\n\n if ($data) {\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n \n $curl = curl_init();\n curl_setopt($cur...
[ "0.6412819", "0.6308768", "0.62546474", "0.620791", "0.61506206", "0.60292786", "0.59478724", "0.5921288", "0.58843595", "0.5881565", "0.5875915", "0.58227247", "0.57946265", "0.576825", "0.576825", "0.576825", "0.57664406", "0.5749096", "0.5748022", "0.5701296", "0.56992733"...
0.7204324
0
Required. The DeployedIndex to be created within the IndexEndpoint. Generated from protobuf field .google.cloud.aiplatform.v1.DeployedIndex deployed_index = 2 [(.google.api.field_behavior) = REQUIRED];
Обязательно. DeployedIndex, который нужно создать внутри IndexEndpoint. Генерируется из поля protobuf .google.cloud.aiplatform.v1.DeployedIndex deployed_index = 2 [(.google.api.field_behavior) = REQUIRED];
public function getDeployedIndex() { return $this->deployed_index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDeployedIndex($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\AIPlatform\\V1\\DeployedIndex::class);\n $this->deployed_index = $var;\n\n return $this;\n }", "protected function createIndex(): IndexInterface {\n return Index::create([\n 'name' => $thi...
[ "0.8269526", "0.55170965", "0.52998763", "0.5290243", "0.49532175", "0.49310848", "0.49142638", "0.4887102", "0.48002306", "0.4780321", "0.475689", "0.4704735", "0.46801567", "0.46701777", "0.4661972", "0.46463084", "0.46309114", "0.45860615", "0.44938517", "0.44832724", "0.4...
0.7418963
1
Required. The DeployedIndex to be created within the IndexEndpoint. Generated from protobuf field .google.cloud.aiplatform.v1.DeployedIndex deployed_index = 2 [(.google.api.field_behavior) = REQUIRED];
Обязательно. DeployedIndex, который необходимо создать внутри IndexEndpoint. Сгенерировано из поля protobuf .google.cloud.aiplatform.v1.DeployedIndex deployed_index = 2 [(.google.api.field_behavior) = REQUIRED];
public function setDeployedIndex($var) { GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\DeployedIndex::class); $this->deployed_index = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeployedIndex()\n {\n return $this->deployed_index;\n }", "protected function createIndex(): IndexInterface {\n return Index::create([\n 'name' => $this->getRandomGenerator()->string(),\n 'id' => $this->getRandomGenerator()->name(),\n 'status' => 1,\n 'datas...
[ "0.7418963", "0.55170965", "0.52998763", "0.5290243", "0.49532175", "0.49310848", "0.49142638", "0.4887102", "0.48002306", "0.4780321", "0.475689", "0.4704735", "0.46801567", "0.46701777", "0.4661972", "0.46463084", "0.46309114", "0.45860615", "0.44938517", "0.44832724", "0.4...
0.8269526
0
Get current user allowed applications
Получить текущих пользователей разрешенных приложений
protected function getAllowedApplications() { return EntityHandler::findAll( $this->container, 'Mapbender\CoreBundle\Entity\Application', array(), SecurityContext::PERMISSION_EDIT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAcceptedApplications()\r\n {\r\n $db = db_connect();\r\n $sql = \"SELECT account.* FROM account, application WHERE account.accountID = application.accountID AND \r\n account.role = :role: AND application.applicationStatus = :applicationStatus: ORDER BY \r\n ...
[ "0.6673182", "0.66216624", "0.64582914", "0.6417957", "0.6379576", "0.6348479", "0.63439924", "0.63439924", "0.6309782", "0.6278342", "0.6227735", "0.6147424", "0.6094171", "0.6075614", "0.6043642", "0.6029979", "0.5973674", "0.5969466", "0.5969466", "0.5969466", "0.5969466",...
0.7707108
0
Gets extension ini entries
Получает запись ini расширения
public function getINIEntries() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_ini_entries() {\n\t\treturn $this->ini_entries;\n\t}", "public function extensionMeta()\n {\n return $this->getConfigFromFile();\n }", "private function getExtFlags(): array\n\t{\n\t\treturn config('curl-connection.' . $this->service . '.ext_flags');\n\t}", "public function g...
[ "0.7331045", "0.70566803", "0.69945496", "0.69409466", "0.6859555", "0.67194873", "0.66176236", "0.66169184", "0.6572534", "0.65445316", "0.65384865", "0.64938605", "0.6493429", "0.6492586", "0.6464452", "0.6417246", "0.6417246", "0.6417246", "0.6417246", "0.6417246", "0.6417...
0.72451043
1
Supplier has many materials
Поставщик имеет много материалов
public function materials() { return $this->hasMany('App\Material', 'supplier_id', 'id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function materials()\n {\n return $this->hasMany('App\\Material');\n }", "public function productMaterials()\n {\n return $this->hasMany('App\\ProductMaterial');\n }", "public static function getMaterials()\n\t\t{\n\t\t\t$supplier_id = $_POST['supplierID'];\n\t\t\t\n\t\t\t$stag...
[ "0.71684104", "0.7003971", "0.6932523", "0.672889", "0.6653567", "0.6635699", "0.6491832", "0.633517", "0.62794214", "0.62676334", "0.625972", "0.62499034", "0.62414265", "0.6234411", "0.6228616", "0.62271297", "0.6167432", "0.6138718", "0.60861933", "0.60344404", "0.6001593"...
0.8190019
0
Wraps the config factory.
Оборачивает фабрику конфигурации.
protected static function configFactory() { return \Drupal::configFactory(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function makeConfig() : Config\n {\n if($this->makeConfig) {\n return $this->makeConfig;\n }\n return $this->makeConfig = factory(Config::class)->make();\n }", "static public function factory($config) {}", "public function __invoke()\n {\n return new Confi...
[ "0.692636", "0.686336", "0.6638178", "0.6577462", "0.65524983", "0.65213335", "0.6513349", "0.6502112", "0.64557564", "0.6454752", "0.64298844", "0.6365955", "0.63079524", "0.62671274", "0.6206422", "0.6175972", "0.6136165", "0.6126207", "0.6107011", "0.60786027", "0.60687226...
0.7267983
0
Emitted when the shard tries to reconnect.
Выдается, когда фрагмент пытается восстановить соединение.
function reconnect(Shard $shard);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function reconnect()\n {\n }", "public function reconnect(): void\n {\n }", "public function reconnect(): void;", "public function reconnect();", "public function reconnect();", "private function _reconnect() {\n\t\t$this->disconnect ();\n\t\t$this->connect ( $this->host, $this->por...
[ "0.7222307", "0.713632", "0.70493835", "0.70280457", "0.70280457", "0.692994", "0.6403881", "0.6272042", "0.6219764", "0.6212877", "0.5914786", "0.58877134", "0.5834539", "0.5791236", "0.5781821", "0.55457735", "0.5511266", "0.5449578", "0.5431256", "0.5287082", "0.5206486", ...
0.7784887
0
Emitted when a channel gets created.
Выдается при создании канала.
function channelCreate(ChannelInterface $channel);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function created(Channel $channel)\n {\n $this->ensureOnlyOneDefault($channel);\n }", "public function channel()\n {\n }", "public function create()\n {\n return View::make('admin.channels.create');\n }", "public function create()\n {\n return view('home.chan...
[ "0.7141867", "0.6587962", "0.64567494", "0.6449708", "0.6349673", "0.6343431", "0.63001525", "0.61869705", "0.61857206", "0.6166788", "0.6045465", "0.59743625", "0.59274644", "0.58881265", "0.5856563", "0.58297527", "0.57629323", "0.57418865", "0.5715307", "0.57133603", "0.57...
0.7425772
0
Emitted when a guild becomes (un)available.
Выдается, когда гильдия становится (недоступной).
function guildUnavailable(Guild $guild);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function guild();", "public function onQuit()\n {\n $nick = trim($this->event->getNick());\n\n foreach ($this->store as $chan => $store) {\n if (isset($store[$nick])) {\n unset($this->store[$chan][$nick]);\n }\n }\n }", "function guildDelet...
[ "0.6077494", "0.551901", "0.54490924", "0.5277864", "0.51386136", "0.5047656", "0.49475607", "0.49398786", "0.49282607", "0.4901327", "0.4896187", "0.48708275", "0.485685", "0.485685", "0.47973767", "0.47784662", "0.47732705", "0.47497007", "0.47302446", "0.46988153", "0.4663...
0.7493671
0
Emitted when a role gets created.
Выдается при создании роли.
function roleCreate(Role $role);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function created(Role $role)\n {\n $role->setPermissions()->createCustomevent()->sendEmailNotification()->setFlashMess();\n }", "public function create()\n {\n $this->authorize('create', Role::class);\n }", "public function creating(Role $role)\n {\n $role->created_by = $th...
[ "0.713824", "0.70511323", "0.70417494", "0.7037292", "0.6981561", "0.69680303", "0.6947157", "0.6936219", "0.6837857", "0.68270767", "0.6726158", "0.67257416", "0.6714454", "0.6668344", "0.66683185", "0.66566473", "0.66374266", "0.6626664", "0.6618865", "0.66172695", "0.66093...
0.7470966
0
Emitted when multiple (cached) message gets deleted. The collection consists of Message instances, mapped by their ID.
Выдается при удалении нескольких (кэшированных) сообщений. Коллекция состоит из экземпляров Message, отображенных по их идентификаторам.
function messageDeleteBulk(Collection $messages);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteMarkedMessages()\n {\n $connection = $this->getConnection();\n\n $select = $connection->select()\n ->from(['queue_message_status' => $this->getMessageStatusTable()], ['message_id'])\n ->where('status <> ?', QueueManagement::MESSAGE_STATUS_TO_BE_DELETED)\...
[ "0.64742756", "0.6211627", "0.61911803", "0.6131028", "0.61143297", "0.6070376", "0.5991556", "0.5858602", "0.5821902", "0.5810478", "0.57857186", "0.5782687", "0.5723525", "0.5714623", "0.56992555", "0.56746405", "0.5582413", "0.55622953", "0.55619836", "0.55459595", "0.5528...
0.71384877
0
Emitted when a reaction from a (cached) message gets removed.
Выдается, когда реакция на (кэшированный) сообщение удаляется.
function messageReactionRemove(MessageReaction $reaction, User $user);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function messageReactionRemoveAll(Message $message);", "public function onRemove();", "public function destroy(Message $message) {\n //\n }", "protected function emitNotificationRemoved(Notification $notification) {}", "public function remove_message($message_id){\n\t\tglobal $con;\n\t\t$query=\"...
[ "0.6814067", "0.5818019", "0.5782211", "0.57710576", "0.5735117", "0.572174", "0.572174", "0.572174", "0.572174", "0.572174", "0.572174", "0.572174", "0.572174", "0.572174", "0.572174", "0.572174", "0.572174", "0.572174", "0.57014465", "0.5618686", "0.55423266", "0.54659265...
0.7250301
0
Emitted when all reactions from a (cached) message gets removed.
Выдается, когда все реакции с сообщения (в кэше) удаляются.
function messageReactionRemoveAll(Message $message);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function messageReactionRemove(MessageReaction $reaction, User $user);", "protected function emitNotificationRemoved(Notification $notification) {}", "public function destroy(Message $message) {\n //\n }", "private function removeExpiredMessages(): void\n {\n if (! isset($this->removeExpi...
[ "0.6694317", "0.5747304", "0.5387695", "0.5378493", "0.5372156", "0.5359192", "0.535182", "0.53454137", "0.5334301", "0.5317778", "0.5317778", "0.5317778", "0.5317778", "0.5317778", "0.5317778", "0.5317778", "0.5317778", "0.5317778", "0.5317778", "0.5317778", "0.5317778", "...
0.7148341
0
Emitted when someone starts typing in the channel.
Выдается, когда кто-то начинает вводить текст в канал.
function typingStart(TextChannelInterface $channel, User $user);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showTyping(PresenceRegistryRequest $request)\n {\n if (! config('faithgen-sdk.source')) {\n event(new TypingRegistered(auth('web')->user(), $request->validated()));\n }\n }", "function typingStop(TextChannelInterface $channel, User $user);", "public function handl...
[ "0.60488015", "0.5796178", "0.5199281", "0.5199204", "0.51083314", "0.50701565", "0.50049996", "0.49929798", "0.49752307", "0.49244556", "0.46706474", "0.462422", "0.46228647", "0.45869902", "0.45758003", "0.4569079", "0.4550014", "0.4535863", "0.45341942", "0.4529231", "0.45...
0.7876688
0
Emitted when someone stops typing in the channel.
Выдается, когда кто-то прекращает вводить текст в канал.
function typingStop(TextChannelInterface $channel, User $user);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _handleTerm()\n\t{\n\t\t$this->_should_stop = true;\n\t}", "public function stopSpeaking()\n {\n return $this->proxyToInterface()->stopSpeaking(\n $this->id);\n }", "public function stopsConversation(IncomingMessage $message)\n {\n //\n }", "public functio...
[ "0.56494087", "0.51427203", "0.5066719", "0.50005966", "0.4953314", "0.49412432", "0.49412432", "0.49412432", "0.49412432", "0.49412432", "0.48381367", "0.4825505", "0.48160213", "0.47981137", "0.47963476", "0.47897074", "0.47702163", "0.47565237", "0.47194305", "0.46813", "0...
0.783579
0
Emitted when a member's voice state changes (leaves/joins/etc.).
Выдается при изменении состояния голоса участника (покидает, присоединяется и т.д.).
function voiceStateUpdate(GuildMember $new, ?GuildMember $old);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onJoin()\n {\n $chan = ltrim(trim(strtolower($this->event->getArgument(0))), \":\");\n $nick = trim($this->event->getNick());\n\n $this->store[$chan][$nick] = self::REGULAR;\n }", "public function event_joined()\r\n\t{\r\n\t\r\n\t}", "private function status()\n {\...
[ "0.56233436", "0.4983599", "0.49491522", "0.47898883", "0.47862625", "0.47836822", "0.4781179", "0.47527245", "0.474302", "0.4726303", "0.47141534", "0.46930027", "0.46507856", "0.46388862", "0.46258307", "0.46108472", "0.45892125", "0.45830286", "0.45794684", "0.45600083", "...
0.7554114
0
Determines if an input value is a ssh url or not.
Определяет, является ли входное значение ssh-адресом или нет.
public static function isSSH($input) : bool { if (is_array($input)) { return in_array('ssh', $input) || in_array('rsync', $input); } if (!is_string($input)) { return false; } $schemes = Scheme::get($input); if (self::isSSH($schemes)) { return true; } $input = substr($input, (int) strpos($i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isUrl()\n {\n return filter_var($this->_value, FILTER_VALIDATE_URL);\n }", "public static function is_url($val) {\n if (is_string($val)) {\n $url_parts = parse_url($val);\n $schema = (isset($url_parts['scheme'])\n ...
[ "0.726178", "0.6916508", "0.6916508", "0.67059594", "0.662478", "0.6603724", "0.65666676", "0.6545091", "0.6465252", "0.64178324", "0.63924503", "0.63545686", "0.63434625", "0.6322122", "0.62721175", "0.6260115", "0.6238426", "0.62128055", "0.62112325", "0.615753", "0.6129859...
0.7348998
0
Para poner la Caja Sorpresa.
Чтобы открыть коробку с сюрпризом.
function setSorpresa($_caja){ $this->sorpresa=$_caja; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo_sociedad','tipo_so...
[ "0.68376887", "0.65134734", "0.65097535", "0.6427165", "0.6402619", "0.640065", "0.63800377", "0.6373444", "0.63176835", "0.63060963", "0.6278655", "0.6276816", "0.6255281", "0.62515247", "0.6246291", "0.6243065", "0.6235817", "0.62309897", "0.6229136", "0.6215193", "0.620723...
0.74449855
0
Adds all time values to response.
Добавляет все значения времени в ответ.
public static function addTimes() { foreach (TimeKeeper::getAll() as $key => $values) { self::$response["time"][$key]["seconds"] = $values["seconds"]; self::$response["time"][$key]["times"] = $values["times"]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function format_event_data_time($response_body)\n {\n }", "public function get_times() {\t\t$json_return['elapsed_time'] = $this->get_elapsed_time();\n\t\tlog_message('debug', 'Elapsed seconds: ' + $json_return['elapsed_time']);\n\n\t\t$items = $this->agenda_items->get_items();\n\t\t$part...
[ "0.59365654", "0.5804417", "0.5645239", "0.56444097", "0.56439024", "0.54648525", "0.5383065", "0.53685457", "0.527782", "0.5227786", "0.5218496", "0.5194274", "0.51885456", "0.5179596", "0.5171322", "0.51505834", "0.5085409", "0.50804406", "0.507568", "0.50707424", "0.500127...
0.804589
0
Adds given debug information to response.
Добавляет указанную информацию отладки в ответ.
public static function addDebug($info) { if ( ! isset(self::$response["debug"])) { self::$response["debug"] = ""; } self::$response["debug"] = self::$response["debug"] . "<br>" . $info ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_extra_debug_information($extra_debug)\n {\n $extra_debug['layouts'] = $this->frameworks_options_manager->get_options();\n return $extra_debug;\n }", "function appendInfo($info) {\n\t\t\t$this->responseVar['info'] .= $info.\"\\n<br>\\n\";\n\t\t}", "public function Info($debug){\...
[ "0.5930899", "0.576355", "0.57446295", "0.5720505", "0.57203", "0.5664044", "0.56558996", "0.56098884", "0.55989945", "0.55596596", "0.5555002", "0.55392134", "0.55322593", "0.55023706", "0.54956526", "0.545285", "0.54243916", "0.53936815", "0.5392259", "0.5381172", "0.537542...
0.80509406
0
Returns an OAuth app secret for Square API calls By default, the function below returns sandbox credentials for testing and development. For production, return the application secret assigned in the OAuth page of your app registration with the dashboard set to Production Settings.
Возвращает секрет OAuth-приложения для вызовов API Square. По умолчанию функция ниже возвращает учетные данные песочницы для тестирования и разработки. Для производства верните секрет приложения, назначенный на странице OAuth вашего регистра приложения с настройками дашборда, установленными на Производственные настройк...
function getAppSecret(bool $requestSandboxSecret = TRUE) { if ($requestSandboxSecret) { return _SQ_SANDBOX_APP_SECRET; } else { return _SQ_APP_SECRET; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAppSecret(): string;", "public function get_app_secret() {\n\n\t\t// Get plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\treturn rgar( $settings, 'customAppSecret' ) ? rgar( $settings, 'customAppSecret' ) : null;\n\n\t}", "public function getAppSecret()\n {\n ...
[ "0.726447", "0.71338224", "0.7056265", "0.6965934", "0.69398946", "0.6721855", "0.662563", "0.6625272", "0.65430325", "0.6536584", "0.64952266", "0.649138", "0.6488751", "0.63921857", "0.63821745", "0.63595504", "0.6319387", "0.63102734", "0.6299926", "0.6299926", "0.62819785...
0.74362403
0
Returns an application Id for Square API calls By default, the function below returns a sandbox application ID for testing and development. For production, replace the function implementation with a valid production credential.
Возвращает идентификатор приложения для вызовов API Square. По умолчанию функция ниже возвращает идентификатор тестового приложения для тестирования и разработки. Для производства замените реализацию функции на действительные учетные данные производства.
function getApplicationId(bool $requestSandboxAppId = TRUE) { if ($requestSandboxAppId) { return _SQ_SANDBOX_APP_ID; } else { return _SQ_APP_ID; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GET_APP_ID(){\n return \"7d0df388-f064-48eb-9092-27fbbf0a438e\";\n}", "public function get_application_id() {\n\t\tif ( ! $this->is_application_id_in_config() ) {\n\n\t\t\treturn (string) get_option( 'algolia_application_id', '' );\n\t\t}\n\n\t\t$this->assert_constant_is_non_empty_string( ALGOLIA_APP...
[ "0.69743156", "0.671412", "0.6573016", "0.6524376", "0.6494089", "0.6333692", "0.6310879", "0.62867254", "0.6214436", "0.620309", "0.61114264", "0.6100764", "0.60610884", "0.6014659", "0.60138935", "0.599216", "0.599216", "0.599216", "0.599216", "0.599216", "0.599216", "0.5...
0.75818455
0
Returns a location ID for Square API calls By default, the function below returns a hardcoded sandbox location ID from the Application Dashboard. For production, update the function implementation to fetch a valid location ID programmtically.
Возвращает идентификатор расположения для вызовов API Square. По умолчанию функция ниже возвращает жёстко заданный идентификатор расположения в режиме песочницы из панели приложения. Для производства обновите реализацию функции, чтобы получить действительный идентификатор расположения программно.
function getLocationId(bool $requestSandboxLocation = TRUE) { if ($requestSandboxLocation) { // Replace the string with a sandbox location ID from the Application Dashboard return _SQ_SANDBOX_LOCATION_ID ; } else { // Replace the string with a production location ID from the Application Dashboard r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLocationId()\n {\n return $this->location_id;\n }", "public function getLocationId()\n {\n return $this->location_id;\n }", "public function getLocationId(): int\n {\n return $this->location->getId();\n }", "public function getLocationId()\n {\n ...
[ "0.65566987", "0.65566987", "0.64666677", "0.6449452", "0.6449452", "0.63315153", "0.63315153", "0.63315153", "0.62939316", "0.61005", "0.6072524", "0.60684454", "0.5885186", "0.5875469", "0.5824749", "0.5753629", "0.57204753", "0.56455827", "0.5641766", "0.56407905", "0.5615...
0.81494904
0
isBothEmpty is a method used to check if both strings are empty. returns true or false
isBothEmpty — это метод, используемый для проверки, являются ли оба строки пустыми. возвращает true или false
protected function isBothEmpty() { return empty($this->strA) && empty($this->strB); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function notEmpty($string) {\n return strlen(trim($string)) > 0;\n }", "function isNotEmpty($string){\n\t\treturn !empty($string);\n\t}", "function is_empty($str, $incl_zero = true)\n{\n if (strlen(trim($str)) === 0 || !isset($str)) { // if the string length is 0 or it isn't set\n return tr...
[ "0.60928774", "0.6077626", "0.6010951", "0.5958533", "0.59497285", "0.59238225", "0.5922313", "0.58340067", "0.5831581", "0.58230865", "0.58011496", "0.576759", "0.57464397", "0.5738858", "0.57341385", "0.57191366", "0.57151246", "0.569289", "0.5679537", "0.56710917", "0.5661...
0.87421566
0
isSameLength is a method used to check if both strings are of same length. returns true or false
isSameLength — это метод, используемый для проверки, имеют ли обе строки одинаковую длину. возвращает true или false
private function isSameLength() { return $this->lengthA == $this->lengthB; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function same($s1, $s2) {\n\t$s1len = strlen($s1);\n\t$s2len = strlen($s2);\n\tif($s1len != $s2len) return false;\n\n\tfor($i = 0; $i < $s1len; $i++) {\n\t\t$count = 0;\n\t\tfor($j = 0; $j < $s1len; $j++) {\n\t\t\tif($s1[$i] == $s2[$j]) $count++;\n\t\t}\n\t\tif($count != 1) return false;\n\t}\n\treturn true;\n}", ...
[ "0.7480814", "0.70765585", "0.6871081", "0.68134063", "0.6550573", "0.64577204", "0.6419353", "0.6181164", "0.6163737", "0.6139363", "0.61365384", "0.61281806", "0.61032134", "0.60233724", "0.598949", "0.5954717", "0.5852913", "0.58504903", "0.58440596", "0.5831394", "0.58302...
0.8194285
0
isLengthZero is a method used to check if one of the strings is zero. returns the other string's length or null as an indicator
isLengthZero — это метод, используемый для проверки, является ли одно из строк нулевым. возвращает длину другой строки или null в качестве индикатора
private function isLengthZero() { if ($this->lengthA == 0) return $this->lengthB; if ($this->lengthB == 0) return $this->lengthA; return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_empty($str, $incl_zero = true)\n{\n if (strlen(trim($str)) === 0 || !isset($str)) { // if the string length is 0 or it isn't set\n return true;\n } elseif ($incl_zero && empty($str) && $str != '0') { // if the string is empty and not 0, it's empty\n return true;\n } elseif (!$inc...
[ "0.6315313", "0.6304663", "0.6035114", "0.59731674", "0.5732834", "0.5732834", "0.5638253", "0.5520778", "0.5496852", "0.546981", "0.5465155", "0.54614556", "0.52814865", "0.5251827", "0.52109015", "0.5202942", "0.51845926", "0.51551014", "0.514886", "0.5139738", "0.5138475",...
0.8180014
0
incrementPosition is a method used to increment the position/index of string A by one when called
incrementPosition — это метод, используемый для увеличения позиции/индекса строки A на один при вызове
public function incrementPosition() { ++$this->positionA; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function incrementPosition();", "public function incrementArgumentPosition()\n {\n $this->argument++;\n }", "public function advance()\n\t{\n\t\tif ($this->pos >= $this->string_length)\n\t\t\treturn false;\n\n\t\t$m = array();\n\t\t$matched = preg_match(\n\t\t\t$this->regexp,\n\t\t\t$this...
[ "0.7247396", "0.6266875", "0.5619556", "0.55027", "0.5388812", "0.5380798", "0.52118325", "0.52101284", "0.5144688", "0.511041", "0.5081491", "0.5040096", "0.5018146", "0.4974566", "0.49732724", "0.49575865", "0.49452692", "0.49260065", "0.49141413", "0.49110675", "0.48894995...
0.8001151
0
Generate func name from .ctp file path
Создать имя функции из пути к файлу .ctp
public function funcName($viewFile) { return 'cajas' . str_replace([APP, '/Element/..', 'Template', '/', '.ctp'], ['', '','', '_', ''], $viewFile ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getFileName(){\n $name = $this->pluginName;\n $text = \"\";\n $lastCapital = true;\n for($i = 0; $i < strlen($name); $i++){\n if($name[$i] !== strtolower($name[$i])){\n if(!$lastCapital){\n $text .= \"_\";\n }\...
[ "0.6262704", "0.61285394", "0.60435325", "0.6040686", "0.60380095", "0.6020474", "0.6020474", "0.6020474", "0.6015804", "0.6011459", "0.6003642", "0.59697974", "0.5954621", "0.59423035", "0.59421915", "0.5932534", "0.5924132", "0.5924132", "0.5895538", "0.58780944", "0.586680...
0.7019256
0
/ }}} Get document from index
/ }}} Получить документ из индекса
function getDocument($id) { /* {{{ */ $hits = $this->index->find('D'.$id); return $hits['hits'] ? $hits['hits'][0] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocument();", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public functi...
[ "0.71957844", "0.7148467", "0.7148467", "0.7148467", "0.7148467", "0.7148467", "0.7148467", "0.7148467", "0.7148467", "0.7148467", "0.7148467", "0.71460336", "0.71460336", "0.71460336", "0.71460336", "0.6871014", "0.6756625", "0.6727881", "0.67027634", "0.66755533", "0.663444...
0.7236116
0
Sets wasDirty, isDirty, Created for the object before save
Sets wasDirty, isDirty, Created for the object before save
public function beforeVersionedSave() { $this->wasDirty = false; if ($this->isDirty && static::$createRevisionOnSave) { // update creation time $this->Created = time(); $this->wasDirty = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function beforeSave()\n {\n if ($this->getStatus() == null) {\n $this->setStatus(self::STATUS_NEW);\n }\n }", "public function beforeSave()\n {\n $this->createdAt = new \\DateTime( 'now', new \\DateTimeZone( 'UTC' ) );\n $this->updatedAt = new \\DateTime( 'n...
[ "0.7222107", "0.70953137", "0.7047496", "0.7035688", "0.68739253", "0.686356", "0.6840469", "0.6835747", "0.68345916", "0.68153054", "0.6794221", "0.6791448", "0.67906845", "0.67596185", "0.67513305", "0.6748386", "0.6730271", "0.672664", "0.6717694", "0.6683916", "0.66747475...
0.7528409
0
After save to regular database this saves to the history table
После сохранения в обычную базу данных это сохраняется в таблицу истории
public function afterVersionedSave() { if ($this->wasDirty && static::$createRevisionOnSave) { // save a copy to history table $recordValues = $this->_prepareRecordValues(); $set = static::_mapValuesToSet($recordValues); DB::nonQuery((new Insert())->setTable(s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function saveHistory()\n {\n ksort($this->migrations);\n foreach ($this->migrations as $k => $migration) {\n if ($migration['id'] === 0) {\n // new\n $prep = $this->db->prepare(\"INSERT INTO `{$this->table}` (`created_at`,`name`,`author`,`status`) \...
[ "0.7204465", "0.689937", "0.6886068", "0.6770975", "0.6737978", "0.6715591", "0.6549423", "0.65383905", "0.6496686", "0.64576215", "0.6454032", "0.6392691", "0.6335904", "0.63255674", "0.63235444", "0.6314337", "0.63014764", "0.6280621", "0.6275111", "0.6253845", "0.62444746"...
0.7725774
0
Check the availability status on a list of domains.
Проверьте статус доступности для списка доменов.
public function check_domains($domain_list) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkAvailability($domain)\n {\n $row = $this->getModuleRow();\n $api = $this->getApi($row->meta->user, $row->meta->key, $row->meta->sandbox == 'true');\n\n $all = new IspapiAll($api);\n\n $command = array(\n \"COMMAND\" => \"CheckDomain\",\n \"D...
[ "0.65279275", "0.626381", "0.626381", "0.6078441", "0.593204", "0.58935827", "0.5637696", "0.55902153", "0.5516496", "0.54986084", "0.5467745", "0.5457866", "0.5410885", "0.5402923", "0.53849524", "0.5383133", "0.53583443", "0.5325452", "0.53215075", "0.5321319", "0.5321319",...
0.74445623
0
Get the contact information for a domain
Получить контактную информацию для домена
public function get_contacts($domain) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function domain_info($domain) {\n $parameters = array(\n 'method' => __FUNCTION__,\n 'domain' => $domain\n );\n return $this->get_data($parameters);\n }", "public function getContactInfo()\n {\n $phoneNumbers = [];\n if (isset($this->pr...
[ "0.7483421", "0.67745066", "0.67347026", "0.6671443", "0.6573973", "0.641304", "0.64017427", "0.6375565", "0.6257651", "0.6252336", "0.6165241", "0.6131913", "0.6116519", "0.6116519", "0.6116519", "0.61017483", "0.60891384", "0.6088853", "0.60737514", "0.6061148", "0.6059712"...
0.7586221
0
Run the data process
Запустить обработку данных
public function RunDataProcess() { // TODO: Implement RunDataProcess() method. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doProcessData() {}", "public function run()\n {\n $this->initiateData();\n }", "public function run()\n {\n $this->initiateData();\n }", "public function run()\n {\n //\n $this->grabData();\n }", "public function processData() {}", "public fun...
[ "0.7497404", "0.74451774", "0.74451774", "0.7404455", "0.7312705", "0.7214347", "0.71969694", "0.68542385", "0.68542266", "0.6515616", "0.6466338", "0.64622027", "0.64229083", "0.639823", "0.6322355", "0.62936515", "0.62738466", "0.6258212", "0.6255914", "0.6247222", "0.62472...
0.8275775
0
Returns whether the timer is periodic.
Возвращает, является ли таймер периодическим.
public function isPeriodic() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isScheduled()\n {\n return $this->publish_status == Status::SCHEDULED;\n }", "public function getPeriodicity()\n {\n return $this->_periodicity;\n }", "public function hasNoopIntervalTime()\n {\n return $this->get(self::NOOPINTERVALTIME) !== null;\n }", ...
[ "0.6003277", "0.60008186", "0.59953094", "0.58305156", "0.5804543", "0.5723609", "0.5695665", "0.55953485", "0.5523766", "0.54952854", "0.54877466", "0.5482664", "0.54613096", "0.54595405", "0.54366916", "0.5432312", "0.5423785", "0.5404017", "0.5366196", "0.5348742", "0.5332...
0.7805982
0
/$prueba = new UsuarioController(); echo $prueba>index();
$prueba = new UsuarioController(); echo $prueba>index();
public function hola1() { $prueba = UsuarioController::index(); echo $prueba; /* $arr = [ 'insert'=>true, 'update'=>false, 'delete'=>true, 'view'=>false ]; $res = $this->hola2($arr); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index(){\r\n $this->view(\"indexControlUsuario\",array(\r\n \"Hola\" =>\"Soy Víctor Robles\"\r\n ));\r\n }", "public function index()\n {\n return \"Hola desde Controlador\";\n }", "public function usuarios() \r\n {\r\n $rolController = new A...
[ "0.7609814", "0.74547184", "0.7378461", "0.7321321", "0.731748", "0.72937125", "0.7278311", "0.7269433", "0.7258664", "0.72359306", "0.7210094", "0.71966195", "0.7189166", "0.71840256", "0.7174488", "0.7171215", "0.7162904", "0.7158661", "0.7144137", "0.71052074", "0.7098381"...
0.7753365
0
Determine if a journal can be used on this database (for database reuse).
Определите, можно ли использовать журнал на этой базе данных (для повторного использования базы данных).
public function supportsJournaling(): bool { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function supportsJournaling(): bool;", "public function inCoreJournal(): bool {\n static $journals = [];\n $journal_id = $this->source_journal_id->value;\n if (!array_key_exists($journal_id, $journals)) {\n $storage = \\Drupal::entityTypeManager()->getStorage('ebms_journal');\n $journal...
[ "0.7493778", "0.64145374", "0.6405195", "0.60053754", "0.5992494", "0.59723467", "0.58745396", "0.5840465", "0.57603633", "0.5643589", "0.56140167", "0.5549768", "0.55447394", "0.5525925", "0.5501699", "0.54908395", "0.5442975", "0.541684", "0.540553", "0.539018", "0.53825665...
0.71692115
1
ASINs are 10 characters wide, but sometimes the leading 0s get lost. They are needed, so are put back on. eg '067232525X' is the ISBN/ASIN of this book. '67232525X' is invalid.
ASINы имеют длину 10 символов, но иногда ведущие нули теряются. Они необходимы, поэтому их восстанавливают. Например, '067232525X' является ISBN/ASIN этой книги. '67232525X' является недействительным.
function padASIN($ASIN) { $len = strlen($ASIN); $padding = "0000000000"; $padding = substr($padding, 0, 10-$len); return $padding.$ASIN; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getASIN($url)\n {\n $ASIN = str_replace(static::$base_url . \"/dp/\", '', $url);\n $ASIN = substr($ASIN, 0, 10);\n return $ASIN;\n }", "public function getASIN() \n {\n return $this->_fields['ASIN']['FieldValue'];\n }", "private function sanitiseISBN($isbn) {\n\t\tpre...
[ "0.5667174", "0.55075663", "0.54633635", "0.54376197", "0.5346351", "0.53358006", "0.5321136", "0.5288477", "0.5218831", "0.5218129", "0.50744647", "0.50676876", "0.50388724", "0.50071967", "0.50049335", "0.4972082", "0.4939437", "0.49114007", "0.48865113", "0.48631686", "0.4...
0.7123979
0
/ Customize admin area for authors remove unwanted dashboard widgets for relevant users
Настройте область администратора для авторов, удалите нежелательные виджеты панели управления для соответствующих пользователей
function my_remove_dashboard_widgets() { $user = wp_get_current_user(); if ( ! $user->has_cap( 'manage_options' ) ) { remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' ); remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); remove_meta_box( 'dashboard_quick_press', 'dashboard', 's...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mitlibnews_remove_dashboard_widgets() {\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); // Quickpress widget\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); // Wordpress news\n\tif (!current_user_can('add_users')) {\n\t\tremove_meta_box( 'dashboard_right_now', 'dashboar...
[ "0.74555296", "0.7352945", "0.73188037", "0.73164046", "0.7299302", "0.7231615", "0.72162426", "0.72066253", "0.718866", "0.71674275", "0.7162363", "0.71206254", "0.71170276", "0.71147925", "0.7105944", "0.7096876", "0.70916027", "0.70896405", "0.70700127", "0.7068403", "0.70...
0.7557057
0
Get a random ISBN13 code
Получить случайный ISBN13 код
public function isbn13(): string { $code = '97' . mt_rand(8, 9) . Helper::numerify(str_repeat('#', 9)); return sprintf('%s%s', $code, Ean::checksum($code)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomCode() {\n $code = md5($this->getid_recipient() . $this->getid_offer() . $this->getexpirationdate());\n return $code;\n }", "function getRandomCode()\n\t\t{\n\t\t\tglobal $wpdb;\n\n\t\t\twhile(empty($code))\n\t\t\t{\n\n\t\t\t\t$scramble = md5(AUTH_KEY . current_time('timestamp'...
[ "0.6679787", "0.6644935", "0.658978", "0.6404165", "0.6365207", "0.63405865", "0.6310448", "0.6294612", "0.6282674", "0.6272587", "0.6247768", "0.6246294", "0.6246132", "0.6229837", "0.6229637", "0.6199933", "0.60787475", "0.604873", "0.60255224", "0.60155106", "0.5997538", ...
0.7414252
0
Adds a HAVING criterion.
Добавляет критерий HAVING.
public function addHaving(array $criterion) { $criterion = new Criterion($criterion); $this->criteria->add( $criterion->setType('having') ); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function having($clause, array $params);", "public function having($condition)\n\t\t{\n\t\t\tif($condition instanceof Condition || $condition instanceof ConditionGroup)\n\t\t\t{\n\t\t\t\t$this->havings = $condition; \n\t\t\t\treturn $this;\t\t\t\t\n\t\t\t}\n\t\t\tthrow new \\Exception('Can only add Condit...
[ "0.6768961", "0.65060496", "0.64863074", "0.6433594", "0.6363146", "0.6321423", "0.62886137", "0.61987793", "0.6126034", "0.6095791", "0.60164267", "0.60003656", "0.59871584", "0.5981519", "0.5963867", "0.59574044", "0.59563154", "0.5929916", "0.5927204", "0.5868153", "0.5867...
0.7068606
0
Gets a collection of TableVO objects.
Получает коллекцию объектов TableVO.
private function getTableCollection() { $tables = $this->tables; $collection = new TableCollection(); foreach ($tables as $tableKey => $tableMeta) { $collection->add(new TableVO($tableKey, $tableMeta)); } return $collection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getAllVoitures(){\r\n $req = Model1::$pdo->query('SELECT * From voiture');\r\n $req->setFetchMode(PDO::FETCH_CLASS,\"ModelVoiture\");\r\n $tab_voit=$req->fetchall();\r\n return $tab_voit;\r\n }", "public static function findAll()\n\t\t{\n\t\t\t$tb = self::get('tabla...
[ "0.65545845", "0.65150374", "0.63976085", "0.6394098", "0.637291", "0.635998", "0.635998", "0.635998", "0.6341427", "0.6317482", "0.6257806", "0.6248934", "0.62374663", "0.62187004", "0.61828476", "0.61451524", "0.6113628", "0.61116356", "0.6109694", "0.6103054", "0.6084496",...
0.7928205
0
Gets a collection of FieldVO objects.
Получает коллекцию объектов FieldVO.
private function getFieldCollection() { $fields = $this->fields; $collection = new FieldCollection(); foreach ($fields as $fieldKey => $fieldMeta) { $collection->add(new FieldVO($fieldKey, $fieldMeta)); } return $collection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFields() : FieldCollection;", "public function getFieldsAttribute(): Collection\n {\n if (! $repeatable = $this->getRepeatable()) {\n return collect([]);\n }\n\n return $repeatable->getRegisteredFields();\n }", "public function fields()\n {\n r...
[ "0.74456143", "0.6752885", "0.6746414", "0.67400634", "0.6687974", "0.66013765", "0.6554641", "0.655339", "0.65415853", "0.65288967", "0.6511595", "0.64978594", "0.6494735", "0.64689124", "0.6425764", "0.64222056", "0.64086306", "0.63983965", "0.63983965", "0.63983965", "0.63...
0.8365584
0
Gets the real defining FQSEN. This differs from getDefiningFQSEN() if the definition was from a trait.
Получает реальное определяющее FQSEN. Это отличается от getDefiningFQSEN(), если определение было из трейта.
public function getRealDefiningFQSEN() { return $this->getDefiningFQSEN(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDefiningFQSEN(\n FullyQualifiedClassElement $defining_fqsen\n ): void {\n $this->defining_fqsen = $defining_fqsen;\n }", "public function getDefinition()\n\t{\n\t\treturn $this->definition;\n\t}", "public function getDefinition()\n {\n return $this->definition;\...
[ "0.62837076", "0.6216723", "0.6182732", "0.614835", "0.614835", "0.6068732", "0.606279", "0.60303587", "0.59122443", "0.5889092", "0.5889092", "0.5755582", "0.56842303", "0.56486577", "0.55603206", "0.5324773", "0.5305708", "0.5305647", "0.5305586", "0.529619", "0.5280846", ...
0.84946096
0
Sets the FQSEN of the class element in the location in which the element was originally defined.
Устанавливает FQSEN элемента класса в месте, где элемент был изначально определён.
public function setDefiningFQSEN( FullyQualifiedClassElement $defining_fqsen ): void { $this->defining_fqsen = $defining_fqsen; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function set_class( $class ) {\n\t\t$this->class = $class;\n\t\t$this->is_class_set = true;\n\t}", "public function setFormClass($_class=NULL){\n return $this->_class = (\n (\n $_class!==NULL &&\n is_string($_class) &&\n strlen(trim(...
[ "0.560003", "0.5481868", "0.5479826", "0.54547286", "0.5422348", "0.534949", "0.52939063", "0.5243868", "0.52268344", "0.5162568", "0.5134387", "0.51102406", "0.51019615", "0.50272894", "0.50101244", "0.50058913", "0.4991835", "0.49495155", "0.49363387", "0.49166346", "0.4916...
0.70015806
0
Check if a class can access a protected property defined in another class. Precondition: The property in $defining_fqsen is protected.
Проверьте, может ли класс получить доступ к защищённому свойству, определённому в другом классе. Предусловие: свойство в $defining_fqsen защищённое.
private static function checkCanAccessProtectedElement(CodeBase $code_base, FullyQualifiedClassName $defining_fqsen, FullyQualifiedClassName $accessing_class_fqsen): bool { $accessing_class_type = $accessing_class_fqsen->asType(); $type_of_class_of_property = $defining_fqsen->asType(); // I...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isProtected() {}", "function isProtected() ;", "abstract protected function canAccess();", "function isProtected()\n {\n return $this->protected;\n }", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public...
[ "0.63438046", "0.62038344", "0.61270326", "0.59105355", "0.5908916", "0.57708013", "0.57438457", "0.57187647", "0.5683536", "0.5683536", "0.5650725", "0.5636623", "0.561328", "0.5575223", "0.5573097", "0.5571013", "0.5534652", "0.5519375", "0.55147606", "0.5501921", "0.546771...
0.81028235
0
Create meta data object for given filename
Создать объект метаданных для заданного имени файла
public static function createItemMetaForFile($filename) { $exifData = t3lib_div::makeInstance('Tx_Yag_Domain_Import_MetaData_ExifParser')->parseExifData($filename); $iptcData = t3lib_div::makeInstance('Tx_Yag_Domain_Import_MetaData_IptcParser')->parseIptcData($filename); $xmpData = Tx_Yag_Domain_Import_MetaData_X...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($meta, $file)\n {\n $this->meta = $meta;\n\n // process each meta\n foreach ($this->meta as $key => $value) {\n $this->setAttribute($key, $value);\n }\n\n // file name without extension if title is not detected\n if (empty($this->t...
[ "0.6615198", "0.6322113", "0.6311864", "0.6039731", "0.5883419", "0.5823101", "0.58010465", "0.57896626", "0.57603604", "0.5752753", "0.5739447", "0.56985545", "0.5661125", "0.5660659", "0.56467855", "0.5638447", "0.5615644", "0.56139034", "0.561155", "0.55843586", "0.5566680...
0.72438234
0
Returns a value from xmpData for a given key
Возвращает значение из xmpData для заданного ключа
protected static function getXmpValueByKey($xmpData, $key) { $results = array(); preg_match('/' . $key . '="(.+?)"/m', $xmpData, $results); return $results[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValue($key);", "public function getValue($key);", "public function value($key){\n if (isset($this->data[$key])) return $this->data[$key];\n else return $key;\n }", "private function get($key)\n {\n return $this->data[$key];\n }", "public function get($key){\...
[ "0.71688247", "0.71688247", "0.7094327", "0.69595647", "0.69142413", "0.69008166", "0.68483853", "0.68064904", "0.6784713", "0.6773516", "0.6758392", "0.67203575", "0.66952765", "0.66733974", "0.662324", "0.6548911", "0.65245634", "0.6524228", "0.6520278", "0.6511681", "0.651...
0.7936883
0
public function startListeningForEvents() Remove the cron job for event checking
public function startListeningForEvents() Удалить задание cron для проверки событий
public function stopListeningForEvents() { // Initialize the crontab manager if this has not been done before if(is_null($this->CronManager)) $this->CronManager = new ssh2_crontab_manager(); // Stop cronjob to call $this-->captureSongHistory() $this->CronManager->remove_cronjob("checkTimeEventExecutionN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function startListeningForEvents()\n\t\t{\n\n\t\t\t// Initialize the crontab manager if this has not been done before\n\t\t\tif(is_null($this->CronManager)) $this->CronManager = new ssh2_crontab_manager();\n\n\t\t\t// Check if the cron job has already been added\n\t\t\t$this->readConfig();\n\n\t\t\tif(\n\t\...
[ "0.76291376", "0.67806786", "0.6414927", "0.63801324", "0.6379892", "0.6263768", "0.62256074", "0.5927286", "0.5861793", "0.5830188", "0.5814919", "0.5777961", "0.5758101", "0.5736016", "0.56891865", "0.56865424", "0.5679515", "0.5676314", "0.56603175", "0.5613702", "0.561244...
0.7939494
0
Tells whether the filename is a directory
Показывает, является ли имя файла директорией
public function is_dir($filename) { return is_dir($filename); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDir($path);", "function is_dir($filename)\n{\n}", "public function isDirectory()\n {\n return ( $this->fileStructure->type == self::IS_DIRECTORY );\n }", "public function is_dir($file);", "public function isDir($filePath);", "public function isDirectory(){\n return is_d...
[ "0.8174151", "0.8056692", "0.80056125", "0.79899836", "0.7933001", "0.7931207", "0.7901673", "0.78786135", "0.7844036", "0.7703196", "0.7650585", "0.7650585", "0.7629516", "0.758546", "0.7459725", "0.74511117", "0.7377938", "0.73462516", "0.7218116", "0.7173238", "0.7061975",...
0.8205109
0
(PHP 4, PHP 5) Finds whether a variable is a resource
(PHP 4, PHP 5) Проверяет, является ли переменная ресурсом
public function is_resource($var) { return @is_resource($var); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_resource(string $resource): bool\n {\n return is_resource_route($resource);\n }", "public function isResource(): bool\n {\n return $this->phpType === self::RESOURCE;\n }", "function checkResource() {\n if (is_resource($this->_handler) && (get_resource_type($this->_h...
[ "0.72853166", "0.72657436", "0.69933337", "0.68214077", "0.6814447", "0.6795193", "0.6709375", "0.6603429", "0.6532989", "0.6504723", "0.6314927", "0.62876254", "0.61706275", "0.61363435", "0.6127748", "0.60798144", "0.6070496", "0.60675913", "0.606433", "0.6063728", "0.60508...
0.7968377
0
(PHP 4 &gt;= 4.3.0, PHP 5) Runs the equivalent of the select() system call on the given arrays of streams with a timeout specified by tv_sec and tv_usec
(PHP 4 &gt;= 4.3.0, PHP 5) Выполняет функцию select() системы на заданных массивах потоков с таймаутом, определённым переменными tv_sec и tv_usec
function stream_select(&$readarray, &$writearray, &$exceptarray, $tv_sec, $tv_usec = null) { return stream_select($readarray, $writearray, $exceptarray, $tv_sec, $tv_usec); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_stream_select() {\n $stream = fopen($this->sample_file, 'r');\n $read = array($stream);\n $write = null;\n $except = null;\n\n $this->setExpectedException('PHPUnit_Framework_Error');\n $this->assertFalse(stream_select($read, $write, $except, $timeou...
[ "0.6147992", "0.5931166", "0.57821274", "0.56756", "0.55031234", "0.5428695", "0.52973855", "0.5198991", "0.5109557", "0.50890785", "0.5060692", "0.5012749", "0.49704772", "0.4931328", "0.48942137", "0.48428133", "0.4821346", "0.48055458", "0.4784791", "0.47835943", "0.472046...
0.7790404
0
Get the annotated column name from document comment string
Получить аннотированное имя столбца из строки комментария документа
private static function getAnnotatedColumn(string $comment): string { $columnName = ""; $matches = array(); if (preg_match("/@column (\w+)/", $comment, $matches)) { $columnName = $matches[1]; } return $columnName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delegateGetColumnComment(DbalSchema $dbal_schema, $drupal_table_name, $column);", "public function extractColumnName($column);", "static function loadComment($comment) {\n if(!preg_match('/@dbTable ([a-z0-9]+)/', $comment, $mName))\n throw new Exception(\"Unable to find Table Name\");\n...
[ "0.6043917", "0.58068824", "0.57808083", "0.57503736", "0.5696036", "0.5691286", "0.5634627", "0.56222224", "0.5601137", "0.5593417", "0.55081487", "0.5455591", "0.5418906", "0.5408326", "0.54052305", "0.53695136", "0.5340438", "0.5291738", "0.5288892", "0.5269796", "0.526895...
0.79639184
0
ajaxStore: 1) Insert a new (unique) song in the database. 2) Insert in the user's playlist the newest song.
ajaxStore: 1) Вставить новый (уникальный) трек в базу данных. 2) Добавить самый новый трек в плейлист пользователя.
public function ajaxStore() { $data = request()->validate([ 'playlist_id' => 'required', 'name' => 'required|max:255', 'artist'=> 'required|max:255', 'lyrics'=> 'required' ]); $playlist = Playlist::findOrFail($data['playlist_id']); $song = Song::ByNameArtist($data['na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addSong() {\n\ttry {\n\t global $controllers;\n\t if ($this->get_request_method() != \"POST\") {\n\t\t$this->response(array('status' => $controllers['NOPOSTREQUEST']), 405);\n\t } elseif (!isset($_SESSION['currentUser'])) {\n\t\t$this->response(array('status' => $controllers['USERNOSES']),...
[ "0.62582356", "0.615694", "0.61219215", "0.61186713", "0.5925423", "0.5906505", "0.58813435", "0.58351105", "0.57990414", "0.57857394", "0.5768973", "0.5746795", "0.5740542", "0.56927204", "0.56794006", "0.5625226", "0.56047916", "0.56004685", "0.5559283", "0.5542918", "0.550...
0.73924166
0
PAGE: terms GET: /home/index This method handles the sites terms page
PAGE: terms GET: /home/index Этот метод обрабатывает страницу условий сайта
public function terms(){ // Set the Page Title ('pageName', 'pageSection', 'areaName') $this->_view->pageTitle = array('Terms and Conditions'); // Set Page Description $this->_view->pageDescription = 'Terms and Conditions'; // Set Page Section $this->_view->pageSection = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $terms = Term::get();\n return view('terms.index',['terms'=>$terms]);\n }", "public function termsAction() {\n\n $this->_helper->layout->setLayout('default-simple');\n }", "public function index()\n {\n $terms = Terms::All(); //get Terms from Term...
[ "0.71678275", "0.70812374", "0.6959948", "0.6751562", "0.6603126", "0.66006523", "0.6587796", "0.6576735", "0.6541104", "0.65076095", "0.6477943", "0.64744234", "0.64534265", "0.64279944", "0.6401878", "0.63184726", "0.6240576", "0.62115294", "0.6208802", "0.62077844", "0.613...
0.73443717
0
PAGE: policy GET: /home/policy This method handles the sites policy page
PAGE: policy GET: /home/policy Этот метод обрабатывает страницу политики сайта
public function policy(){ // Set the Page Title ('pageName', 'pageSection', 'areaName') $this->_view->pageTitle = array('Policy'); // Set Page Description $this->_view->pageDescription = 'Policy'; // Set Page Section $this->_view->pageSection = 'Policy'; // Set Pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function privacyPolicy()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'privacy_policy');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setti...
[ "0.6949763", "0.68222743", "0.67793065", "0.6743044", "0.6654377", "0.65388185", "0.64783025", "0.64109147", "0.6399899", "0.63352865", "0.6332695", "0.6196892", "0.61946106", "0.61518466", "0.6142931", "0.61271274", "0.60692245", "0.60685444", "0.60213405", "0.59649944", "0....
0.78149956
0
PAGE: cronjob GET: /home/cronjob This method should handle all the checks once per day to send emails / notifications regarding checkins / checkouts and payments
PAGE: cronjob GET: /home/cronjob Этот метод должен обрабатывать все проверки один раз в день для отправки электронных писем / уведомлений в отношении заездов / выездов и платежей
public function cronjob(){ //Debug::printr('yo');die; $this->_reportsModel = $this->loadModel('reports'); $this->_usersModel = $this->loadModel('users'); $this->_notificationsModel = $this->loadModel('notifications'); //First we're going to check our checkins and send a reminder //$check_ins = $this->_repo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function view_check_cron() {\n\t}", "public function cron(){\n\n $servers = $this->getServers();\n $emails = Notification::all();\n \n foreach ($servers as $server){\n //Get the server metrics and thresholds\n $this->getServerThresholds( $server ); \n\n $msg = \"\";\n\n if( isset(...
[ "0.7289026", "0.69277966", "0.69150937", "0.68787146", "0.6789537", "0.6721319", "0.6668725", "0.66097707", "0.658971", "0.65774375", "0.6558028", "0.6534207", "0.6514891", "0.64587545", "0.64465463", "0.6445036", "0.6394214", "0.6385182", "0.6370084", "0.6358109", "0.6323513...
0.81073403
0
Get zip by city.
Получить zip по городу.
public function getZipCodeByCity($city) { $sql = "SELECT * FROM zipcode WHERE name = ?"; $data = array($city); $statement = $this->makeStatement($sql, $data); return $statement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getZip() {}", "public function getCity();", "public function getCity() {}", "public function testFindLargestZipCodeAmongstCity(){\n\n // TODO définir le pipeline\n $pipeline = [];\n\n $result = $this->zips->aggregate($pipeline);\n $this->assertEquals('CHICAGO', $re...
[ "0.67927057", "0.671693", "0.6619291", "0.64586216", "0.6282724", "0.6227981", "0.6212683", "0.6206199", "0.62016046", "0.61514443", "0.6128219", "0.60889274", "0.60776395", "0.6000357", "0.6000357", "0.59944665", "0.5986443", "0.59784675", "0.59762657", "0.5946337", "0.59392...
0.74100447
0
Create the Tracking request
Создайте запрос отслеживания
private function createRequest() { $xml = new DOMDocument(); $xml->formatOutput = true; $trackRequest = $xml->appendChild($xml->createElement("TrackRequest")); $trackRequest->setAttribute('xml:lang', 'en-US'); $request = $trackRequest->appendChild($xml->createElement("Reque...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createRequest();", "public function createRequest();", "private function createRequest(): ServerRequest\n {\n return new ServerRequest(\n 'POST',\n 'https://localhost/',\n [\n 'Accept' => '*/*',\n 'content-type' => 'applic...
[ "0.6681686", "0.6681686", "0.61051035", "0.6096483", "0.6076282", "0.60546833", "0.60424644", "0.5964576", "0.5935237", "0.5922522", "0.59034467", "0.5891188", "0.5887936", "0.58826774", "0.5868114", "0.58646536", "0.58053946", "0.5786084", "0.5779302", "0.5779302", "0.577930...
0.71105015
0
Runs before copying a Category. What we do: Store a cloned copy of the current record. We'll need it to clone releases. Use the onBeforeCopy of the VersionedCopy trait (aliased as onBeforeCopyVersioned) to get a valid new "alias" for the copied Category.
Запускается перед копированием категории. Что мы делаем: сохраняем клон текущего записи. Нам это понадобится для клонирования выпусков. Используйте onBeforeCopy из trait VersionedCopy (альяс onBeforeCopyVersioned), чтобы получить корректный новый "алиас" для скопированной категории.
protected function onBeforeCopy() { self::$recordBeforeCopy = $this->getClone(); $this->onBeforeCopyVersioned(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function onAfterCopy(Categories &$categoryAfterCopy)\n\t{\n\t\tself::$recordBeforeCopy->releases->map(function($release) use($categoryAfterCopy) {\n\t\t\t$release->copy([\n\t\t\t\t'category_id' => $categoryAfterCopy->id\n\t\t\t]);\n\t\t});\n\n\t\tself::$recordBeforeCopy = null;\n\t}", "public function ...
[ "0.5873773", "0.55502313", "0.54283476", "0.5404937", "0.539618", "0.53860223", "0.5318646", "0.52554905", "0.5221761", "0.50838083", "0.4970224", "0.48983207", "0.48958492", "0.4881067", "0.4874638", "0.4862224", "0.48444712", "0.48218036", "0.47971633", "0.47900122", "0.477...
0.72632635
0
Runs after our category is copied. We copy the releases of the original category into the new (copied) category. We use some DataModel magic to do that. self::$recordBeforeCopy>releases is a virtual property which gives us access to a FOF DataModel Collection that holds the releases fetched from the relation set in the...
Запускается после того, как наша категория скопирована. Мы копируем выпуски исходной категории в новую (скопированную) категорию. Для этого мы используем некоторую магию DataModel. self::$recordBeforeCopy>releases — это виртуальное свойство, которое позволяет нам получить доступ к FOF DataModel Collection, содержащему ...
protected function onAfterCopy(Categories &$categoryAfterCopy) { self::$recordBeforeCopy->releases->map(function($release) use($categoryAfterCopy) { $release->copy([ 'category_id' => $categoryAfterCopy->id ]); }); self::$recordBeforeCopy = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function onBeforeCopy()\n\t{\n\t\tself::$recordBeforeCopy = $this->getClone();\n\n\t\t$this->onBeforeCopyVersioned();\n\t}", "function OnAfterCopy($original_id, $copy_id){\n }", "public function run()\n {\n factory(Category::class,5)->create()->map(function ($cat,$i){\n// dump...
[ "0.6126953", "0.5967912", "0.5133928", "0.51308054", "0.5037053", "0.49713886", "0.4959634", "0.49573454", "0.495138", "0.49119765", "0.4899926", "0.4812228", "0.47686043", "0.4764094", "0.47284558", "0.46809244", "0.4657133", "0.46352026", "0.4634221", "0.45956308", "0.45790...
0.7270166
0
Util Reverse exchange rate to get accurate rate. Free services out there don't allow this for free subscribers
Используйте обратный курс обмена для получения точного курса. Бесплатные сервисы не позволяют это делать для бесплатных подписчиков
public function utilReverseExchangeRate($exchangeRate) { return 1 / $exchangeRate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExchangeRate();", "function getExchangeRate($currency);", "public function getBaseToOrderRate();", "public function getExchangeRate()\n {\n return $this->exchange_rate;\n }", "public function getExchangeRate()\n\t{\n\t\treturn $this->exchangeRate; \n\n\t}", "public functi...
[ "0.7361091", "0.70243317", "0.6848375", "0.6844798", "0.6804037", "0.67119014", "0.67119014", "0.67119014", "0.66083246", "0.6563909", "0.6553769", "0.6540487", "0.6380707", "0.6359363", "0.61893266", "0.6103907", "0.60293436", "0.6018414", "0.6014211", "0.6014211", "0.601421...
0.77033174
0
Disable using wildcard search.
Отключить использование поиска по шаблону.
public function noWildcardSearching() { $this->wildcardSearching = false; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allowWildcardSearching()\n {\n $this->wildcardSearching = true;\n\n return $this;\n }", "public function notLike($value);", "public function globalStringConditionMatchesWildcardExpression() {}", "public function globalStringConditionMatchesWildcardExpression() {}", "publ...
[ "0.6905708", "0.62662274", "0.59967184", "0.5996184", "0.5981957", "0.59531814", "0.5904642", "0.58422446", "0.5834079", "0.5720658", "0.57150203", "0.5647828", "0.5568528", "0.55499786", "0.55452335", "0.5531797", "0.55261654", "0.5484929", "0.54670686", "0.5446079", "0.5431...
0.7234651
0
Rollback the volume with the specified volume snapshot. You can rollback the specified volume only when the volume is Available, otherwise, it's will get 409 errorCode. The snapshot used to rollback must be created by the volume, otherwise,it's will get 404 errorCode. If rolling back the system volume,the instance must...
Откатить том с указанным снимком тома. Вы можете откатить указанный том только в том случае, если том доступен, иначе будет возвращена ошибка кода 409. Для отката необходимо использовать снимок, созданный самим томом, иначе будет возвращена ошибка кода 404. Если откатывается системный том, то инстанс должен быть запуще...
public function rollbackVolume($volumeId, $snapshotId, $options = array()) { list($config) = $this->parseOptions($options, 'config'); if (empty($volumeId)) { throw new \InvalidArgumentException( 'request $volumeId should not be empty.' ); } if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rollback();", "public function rollback();", "public function rollback();", "public function rollback();", "public abstract function rollback();", "function rollback(): void;", "public function rollback()\n {\n }", "public function rollback()\n {\n }", "public function r...
[ "0.5774685", "0.5774685", "0.5774685", "0.5774685", "0.5620215", "0.5531793", "0.5518173", "0.5518173", "0.544357", "0.544357", "0.54276085", "0.54267764", "0.541208", "0.54057693", "0.5300987", "0.52829987", "0.5282255", "0.52779204", "0.52599704", "0.52192616", "0.52159625"...
0.7020754
0
Deleting the specified SecurityGroup.
Удаление указанной группы безопасности.
public function deleteSecurityGroup($securityGroupId, $options = array()) { list($config) = $this->parseOptions($options, 'config'); if (empty($securityGroupId)) { throw new \InvalidArgumentException( 'request $securityGroupId should not be empty.' ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Group $group)\n {\n //\n $group->delete();\n }", "private function deleteGroup()\n {\n try\n {\n $request = $_REQUEST;\n\n if( !isset($request['group_id']) || $request['group_id']==\"\" )\n throw_error_msg(\"group i...
[ "0.666514", "0.6658657", "0.6581597", "0.65766937", "0.6555538", "0.65334916", "0.65130085", "0.65035254", "0.65011686", "0.6455954", "0.6455954", "0.6455954", "0.64328384", "0.6430741", "0.6417914", "0.6410874", "0.6397382", "0.6386963", "0.6386249", "0.63789105", "0.6352865...
0.71595615
0
The encryption implement for AES128 algorithm for BCE password encryption. Only the first 16 bytes of $secretAccessKey will be used to encrypt the $adminPass. See more detail on
Реализация шифрования для алгоритма AES128 для шифрования пароля BCE. Будут использоваться только первые 16 байтов $secretAccessKey для шифрования $adminPass. Подробнее см. на
private function aes128WithFirst16Char($adminPass, $secretAccessKey) { $adminPass = $this->pkcs5Pad($adminPass); $secretAccessKey = substr($secretAccessKey, 0, 16); $crypted = openssl_encrypt($adminPass, 'AES-128-ECB', $secretAccessKey, OPENSSL_RAW_DATA); return bin2hex(substr($crypt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function encrypt();", "private function pkcs5Pad($adminPass)\n {\n $pad = 16 - (strlen($adminPass) % 16);\n return $adminPass . str_repeat(chr($pad), $pad);\n }", "function aes256Encrypt($plaintext, $password) {\n // hash the key\n $key = pack(\"H*\", substr(hash(\"sha512\", $p...
[ "0.6207201", "0.6017797", "0.5996484", "0.59685946", "0.59640676", "0.593295", "0.58936393", "0.584134", "0.5804634", "0.57348496", "0.5727614", "0.5715163", "0.57104707", "0.57019985", "0.56941897", "0.56853515", "0.56805074", "0.5653996", "0.5647185", "0.5646723", "0.560576...
0.7392437
0
The method to generate a default Billing which is Postpaid.
Метод генерации по умолчанию Billing, который является постоплатой.
private function generateDefaultBilling() { return new Billing('Postpaid'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateDefaultBillingWithReservation() {\n return new Billing();\n }", "public function createPayment()\n\t{\n\n\t}", "public function getBilling();", "function idealpay() {\r\n\r\n return theme('idealpay', array('gojira_idealpay_form'=>drupal_get_form('gojira_idealpay_form'), ...
[ "0.7470168", "0.66288275", "0.5930455", "0.57926655", "0.57024205", "0.5657599", "0.56104976", "0.5606029", "0.5599062", "0.55918664", "0.5579544", "0.5565245", "0.5558693", "0.55207855", "0.551835", "0.54755527", "0.54735106", "0.5462369", "0.5462369", "0.5460905", "0.545800...
0.90490794
0
The method to generate a default Billing with default Reservation which default ReservationLength is 1.
Метод генерации по умолчанию Billing с по умолчанию Reservation, у которого по умолчанию ReservationLength равен 1.
private function generateDefaultBillingWithReservation() { return new Billing(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateDefaultBilling() {\n return new Billing('Postpaid');\n }", "public function getDefaultBillingAddressId()\n {\n return $this->defaultBillingAddressId;\n }", "public function generate() {}", "public function generate() {}", "public function generate() {}", "p...
[ "0.7420826", "0.5844385", "0.5418993", "0.5418993", "0.5418987", "0.5418987", "0.5418987", "0.5418987", "0.5418987", "0.53097326", "0.5299558", "0.519374", "0.5184378", "0.5152557", "0.5140261", "0.5136568", "0.51314783", "0.51269484", "0.51269484", "0.51269484", "0.51269484"...
0.8468277
0
The default method to generate the random String for clientToken if the optional parameter clientToken is not specified by the user. The default algorithm is Mersenne Twister to generate a random UUID,
По умолчанию используется метод генерации случайной строки для clientToken, если пользователь не указывает необязательный параметр clientToken. По умолчанию используется алгоритм Мерсенна-Твистер для генерации случайного UUID,
public static function generateClientToken() { $uuid = md5(uniqid(mt_rand(), true)); return $uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClientToken() {\n\t// Just generating a random client token and returning it\n\treturn sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t\tmt_rand( 0, 0xffff ),\n\t\tmt_rand( 0, 0xffff ),\n\t\tmt_rand( 0, 0xffff ),\n\t\tmt_rand( 0, 0x0fff ) | 0x4000,\n\t\tmt_rand( 0, 0x3fff ) | 0x8000,\n\t\tmt_rand( ...
[ "0.76609564", "0.7296823", "0.71203405", "0.7118193", "0.7022678", "0.70094347", "0.69870603", "0.68970966", "0.68585145", "0.68084216", "0.6806406", "0.6669047", "0.6624153", "0.6559023", "0.6535036", "0.65084857", "0.650574", "0.64506", "0.64349604", "0.6411967", "0.6409278...
0.795081
1
Show the form for editing the specified belanjasapi.
Показать форму для редактирования указанного belanjasapi.
public function edit($id) { $belanjasapi = BelanjaSapi::find($id); return view('admin.belanjasapi.edit', compact('belanjasapi')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Bajas $bajas)\n {\n //\n }", "public function edit($id)\n\t{\n\t\t$api = Api::find($id);\n\n\t\treturn View::make('apis.edit', compact('api'));\n\t}", "public function edit(TiendaApi $tiendaApi)\n {\n //\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_...
[ "0.6871054", "0.6751116", "0.6676429", "0.66713643", "0.66653275", "0.66391695", "0.66156554", "0.6583676", "0.6564965", "0.6554642", "0.65258414", "0.6521055", "0.6515085", "0.64973074", "0.64954674", "0.64925075", "0.64655477", "0.6464985", "0.6446599", "0.6433977", "0.6418...
0.7550722
0
Separates comments from trackbacks
Разделяет комментарии от трекбэков
function WinyskySeperateComments( $comments ) { global $trackbacks; $comments_only = array_filter( $comments, 'WinyskyStripTrackback' ); $trackbacks = array_filter( $comments, 'WinyskyStripComment' ); return $comments_only; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function separate_comments(&$comments)\n {\n }", "function filterTrackbacks($comms) {\nglobal $comments, $trackbacks;\n $comments = array_filter($comms,\"stripTrackback\");\n return $comments;\n}", "function wap8_trackbacks( $comment ) {\n$GLOBALS['comment'] = $comment; ?>\n<li><?php printf( __( '%...
[ "0.706333", "0.6861904", "0.6599895", "0.6518891", "0.6202796", "0.61763537", "0.61650693", "0.6146298", "0.6059692", "0.59961957", "0.5993745", "0.5974798", "0.59671426", "0.5936332", "0.5930172", "0.58718187", "0.5863439", "0.584892", "0.58251774", "0.5824671", "0.58185065"...
0.751215
0
Sets an input param key, value.
Устанавливает ключ и значение входного параметра.
public function setInputParam($key, $value) { $this->inputParams[$key] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setParam($key, $value);", "abstract protected function setParameter($key, $value);", "public function set_param($key, $value)\n {\n }", "public function setInputProperty($key, $value);", "public function setParameter( $key, $value ) {\n\t\t$this->fields[ $this->parameterPrefix...
[ "0.8301836", "0.7766394", "0.7619974", "0.73031694", "0.72176224", "0.7186482", "0.7106897", "0.70410323", "0.7038969", "0.6944319", "0.69287586", "0.68951666", "0.68378466", "0.6778202", "0.67649734", "0.6705162", "0.66883427", "0.66883427", "0.6657933", "0.66408885", "0.663...
0.82361573
1
This function will get reviews written by a specific client
Эта функция получит отзывы, написанные конкретным клиентом
function getAllReviews($clientId){ $db = phpmotorsConnect(); $sql = 'SELECT * FROM reviews WHERE clientId = :clientId'; $stmt = $db->prepare($sql); $stmt->bindValue(':clientId', $clientId, PDO::PARAM_INT); $stmt->execute(); $oldReviews = $stmt->fetchAll(PDO::FETCH_ASSOC);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getReviewsByClientId($clientId) {\n $db = phpmotorsConnect();\n $sql = 'SELECT i.invMake, i.invModel, i.invId, r.reviewId, r.reviewDate\n FROM reviews r\n INNER JOIN inventory i ON r.invId=i.invId\n WHERE r.clientId=:clientId\n ORDER BY r.reviewDate DESC';...
[ "0.7608539", "0.69201875", "0.6715238", "0.6594567", "0.6548807", "0.6451312", "0.62706405", "0.6169502", "0.6132912", "0.61093795", "0.6084597", "0.6038347", "0.6027305", "0.6009471", "0.5988848", "0.59564656", "0.5947576", "0.5933422", "0.5929954", "0.59200865", "0.59163177...
0.76517165
0
PRINTS the lyrics DIV from a track page in plaintext $dom simplesomethingDOM
Выводит текст песни DIV с страницы трека в plain text $dom simplesomethingDOM
function getLyrics($dom) { $lyrics = ""; foreach($dom->find('div.lyrics ') as $data){ #print $data->plaintext; $lyrics = $lyrics . $data->plaintext; } return $lyrics; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function STOREArtistAlbumTracks($ArtistURL) {\n $dom = new simple_html_dom();\n $BASE_URL = \"http://rapgenius.com\";\n $artistStartPage = scraperwiki::scrape($BASE_URL . $ArtistURL);\n $dom->load($artistStartPage);\n $albumArray = getAlbums($dom);\n $albumURLArray = $albumArray['urls'];\n $albumNameArray =...
[ "0.6376011", "0.6376011", "0.6067588", "0.6067588", "0.5599165", "0.5599165", "0.52672017", "0.5244575", "0.52154976", "0.5151618", "0.5124718", "0.50860304", "0.50194734", "0.50167334", "0.49926507", "0.49907854", "0.48963735", "0.48963735", "0.48963735", "0.48963735", "0.48...
0.7648517
1
Gets the Track, Artist $dom simplesomethingDOM
Получает Track, Artist $dom простойsomethingDOM
function getArtistAndTrackName($dom) { $artistTrack = $dom->find('h1.song_title',0); $artist = $artistTrack->find('a',0)->plaintext; $startBuffer = 8; $endBuffer = -11; $track = substr($artistTrack->plaintext, ($startBuffer + strlen($artist)) , $endBuffer); $output['track'] = $track; $output['artist'] = $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTrackMetaData($dom) {\n $output = getArtistAndTrackname($dom);\n ##TODO - need to get supporting artists (array)\n $output['featuring'] = getFeaturedArtists($dom);\n return $output;\n}", "function getTrackMetaData($dom) {\n $output = getArtistAndTrackname($dom);\n ##TODO - need to get supportin...
[ "0.74568236", "0.74568236", "0.74207634", "0.74207634", "0.69484997", "0.69484997", "0.68322444", "0.68322444", "0.65026003", "0.6230448", "0.6230448", "0.61674726", "0.61674726", "0.6059298", "0.5928005", "0.5823805", "0.58101714", "0.5790947", "0.57051295", "0.5594595", "0....
0.7647936
1
Gets the list of featured artists ASSUMING THAT ALL ARTISTS HAVE HYPERLINKS! returns an array of artists from the hyperlinks inside the featured_artists div
Получает список артистов, которые были выделены, предполагая, что у всех артистов есть гиперссылки! возвращает массив артистов из гиперссылок внутри элемента featured_artists
function getFeaturedArtists($dom) { $feat = $dom->find('div.featured_artists',0); $artists = array(); if ($feat != NULL && sizeof($feat) > 0) { foreach($feat->find('a') as $artist) { $artists[] = $artist->plaintext; } } return $artists; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getArtistsList() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe artists list\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_artists.id,\n\t\t\t{$this->wpdb->prefix}topspin_artists.name,\n\t\t\t{$this->wpdb->prefix}topspin_artists.avatar_image,\n\t\t\t{$this->wpdb->prefix}topspin_artis...
[ "0.66579556", "0.6052884", "0.58709264", "0.5771759", "0.5752855", "0.5663053", "0.5662402", "0.56530994", "0.55842036", "0.5523069", "0.5428491", "0.5373227", "0.53592104", "0.53592104", "0.5327336", "0.5279383", "0.52426565", "0.5238229", "0.5235029", "0.51472783", "0.51322...
0.7661941
1
Expects the DOM of an artist page Returns an array of album URLs and album names (same keys)
Ожидает DOM страницы артиста. Возвращает массив URL-адресов альбомов и названий альбомов (одинаковые ключи)
function getAlbums($dom) { $albumURLs = array(); $albumNames = array(); $albums = $dom->find('ul.album_list',0); foreach($albums->find('li a') as $data){ #print $data->href. "\n"; $albumURLs[] = $data->href; $albumNames[] = $data->plaintext; } return array("urls"=>$albumURLs, "names"=>$albumName...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function STOREArtistAlbumTracks($ArtistURL) {\n $dom = new simple_html_dom();\n $BASE_URL = \"http://rapgenius.com\";\n $artistStartPage = scraperwiki::scrape($BASE_URL . $ArtistURL);\n $dom->load($artistStartPage);\n $albumArray = getAlbums($dom);\n $albumURLArray = $albumArray['urls'];\n $albumNameArray =...
[ "0.78773963", "0.78773963", "0.719198", "0.719198", "0.7136293", "0.7136293", "0.71125555", "0.71125555", "0.6982683", "0.6661034", "0.66312057", "0.6595138", "0.63473886", "0.62913626", "0.62196034", "0.62196034", "0.62039864", "0.60696054", "0.6052028", "0.6032949", "0.6006...
0.81211156
0
Expects track URL, and trackMeta (album, artist, track, and featuring count)
Ожидает URL трека и trackMeta (альбом, исполнитель, трек и количество участников)
function addTrack($URL, $trackMeta) { insertIntoTrack($URL, $trackMeta['album'], $trackMeta['artist'], $trackMeta['track'], count($trackMeta['featuring'])); if (count($trackMeta['featuring']) > 0) { foreach ($trackMeta['featuring'] as $i => $artist) { insertIntoFeaturedArtist($URL, $artist); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function trackInfo(array $args) {\n if(!empty($args['mbid']) || (!empty($args['track']) && !empty($args['artist']))) {\n $url = $this->getUrl('track.getInfo', $args);\n $json = json_decode($this->getExternalContents($url));\n\n // check if it is a valid result\n ...
[ "0.6777701", "0.6581821", "0.6581821", "0.6396223", "0.6396223", "0.63561916", "0.6114206", "0.5990671", "0.5990671", "0.5910061", "0.5822061", "0.57854325", "0.5725278", "0.56982267", "0.5660472", "0.56517065", "0.5649562", "0.5615682", "0.5606263", "0.55968595", "0.55217427...
0.81774324
0
PRINTS the lyrics DIV from a track page in plaintext $dom simplesomethingDOM
Выводит текст песни DIV с страницы трека в plain text $dom simplesomethingDOM
function getLyrics($dom) { $lyrics = ""; foreach($dom->find('div.lyrics ') as $data){ #print $data->plaintext; $lyrics = $lyrics . $data->plaintext; } return $lyrics; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function STOREArtistAlbumTracks($ArtistURL) {\n $dom = new simple_html_dom();\n $BASE_URL = \"http://rapgenius.com\";\n $artistStartPage = scraperwiki::scrape($BASE_URL . $ArtistURL);\n $dom->load($artistStartPage);\n $albumArray = getAlbums($dom);\n $albumURLArray = $albumArray['urls'];\n $albumNameArray =...
[ "0.6374662", "0.6374662", "0.60677874", "0.60677874", "0.5599438", "0.5599438", "0.5266988", "0.524434", "0.5214471", "0.5151231", "0.5123797", "0.50837886", "0.501857", "0.5016745", "0.49925956", "0.49907917", "0.48991263", "0.48991263", "0.48991263", "0.48991263", "0.489912...
0.76490426
0
Gets the Track, Artist $dom simplesomethingDOM
Получает Track, Artist $dom простой somethingDOM
function getArtistAndTrackName($dom) { $artistTrack = $dom->find('h1.song_title',0); $artist = $artistTrack->find('a',0)->plaintext; $startBuffer = 8; $endBuffer = -11; $track = substr($artistTrack->plaintext, ($startBuffer + strlen($artist)) , $endBuffer); $output['track'] = $track; $output['artist'] = $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTrackMetaData($dom) {\n $output = getArtistAndTrackname($dom);\n ##TODO - need to get supporting artists (array)\n $output['featuring'] = getFeaturedArtists($dom);\n return $output;\n}", "function getTrackMetaData($dom) {\n $output = getArtistAndTrackname($dom);\n ##TODO - need to get supportin...
[ "0.74568236", "0.74568236", "0.74207634", "0.74207634", "0.69484997", "0.69484997", "0.68322444", "0.68322444", "0.65026003", "0.6230448", "0.6230448", "0.61674726", "0.61674726", "0.6059298", "0.5928005", "0.5823805", "0.58101714", "0.5790947", "0.57051295", "0.5594595", "0....
0.7647936
0
Gets the list of featured artists ASSUMING THAT ALL ARTISTS HAVE HYPERLINKS! returns an array of artists from the hyperlinks inside the featured_artists div
Получает список рекомендуемых артистов, предполагая, что у всех артистов есть гиперссылки! возвращает массив артистов из гиперссылок внутри элемента featured_artists
function getFeaturedArtists($dom) { $feat = $dom->find('div.featured_artists',0); $artists = array(); if ($feat != NULL && sizeof($feat) > 0) { foreach($feat->find('a') as $artist) { $artists[] = $artist->plaintext; } } return $artists; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getArtistsList() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe artists list\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_artists.id,\n\t\t\t{$this->wpdb->prefix}topspin_artists.name,\n\t\t\t{$this->wpdb->prefix}topspin_artists.avatar_image,\n\t\t\t{$this->wpdb->prefix}topspin_artis...
[ "0.6657238", "0.6051885", "0.5870023", "0.57710254", "0.57521206", "0.5662513", "0.5662077", "0.56517947", "0.55845106", "0.55225265", "0.5427763", "0.53718656", "0.53576225", "0.53576225", "0.5326878", "0.52796525", "0.5242264", "0.52384484", "0.52352875", "0.5146394", "0.51...
0.76604575
0
Expects the DOM of an artist page Returns an array of album URLs and album names (same keys)
Ожидает DOM страницы артиста. Возвращает массив URL-адресов альбомов и названий альбомов (одинаковые ключи)
function getAlbums($dom) { $albumURLs = array(); $albumNames = array(); $albums = $dom->find('ul.album_list',0); foreach($albums->find('li a') as $data){ #print $data->href. "\n"; $albumURLs[] = $data->href; $albumNames[] = $data->plaintext; } return array("urls"=>$albumURLs, "names"=>$albumName...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function STOREArtistAlbumTracks($ArtistURL) {\n $dom = new simple_html_dom();\n $BASE_URL = \"http://rapgenius.com\";\n $artistStartPage = scraperwiki::scrape($BASE_URL . $ArtistURL);\n $dom->load($artistStartPage);\n $albumArray = getAlbums($dom);\n $albumURLArray = $albumArray['urls'];\n $albumNameArray =...
[ "0.7876683", "0.7876683", "0.71927655", "0.71927655", "0.7137703", "0.7137703", "0.7113862", "0.7113862", "0.6983813", "0.6659358", "0.6630485", "0.65934026", "0.6345835", "0.6290398", "0.6220327", "0.6220327", "0.6201506", "0.60688204", "0.60512954", "0.60330313", "0.6006276...
0.81208783
1
Expects track URL, and trackMeta (album, artist, track, and featuring count)
Ожидает URL трека и trackMeta (альбом, исполнитель, трек и количество featuring)
function addTrack($URL, $trackMeta) { insertIntoTrack($URL, $trackMeta['album'], $trackMeta['artist'], $trackMeta['track'], count($trackMeta['featuring'])); if (count($trackMeta['featuring']) > 0) { foreach ($trackMeta['featuring'] as $i => $artist) { insertIntoFeaturedArtist($URL, $artist); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function trackInfo(array $args) {\n if(!empty($args['mbid']) || (!empty($args['track']) && !empty($args['artist']))) {\n $url = $this->getUrl('track.getInfo', $args);\n $json = json_decode($this->getExternalContents($url));\n\n // check if it is a valid result\n ...
[ "0.6776027", "0.6579618", "0.6579618", "0.63946664", "0.63946664", "0.635447", "0.6111771", "0.5990632", "0.5990632", "0.5906639", "0.5819242", "0.5785039", "0.5723986", "0.5696174", "0.56587195", "0.56505233", "0.5649178", "0.5613786", "0.5605714", "0.5595746", "0.5520218", ...
0.8176405
1
Download the subtitle $DownloadUrl for the release $VideoFile
Скачайте субтитры $DownloadUrl для выпуска $VideoFile
public function doDownloadSubtitles() { $tvShowPath = ezcConfigurationManager::getInstance()->getSetting( 'tv', 'GeneralSettings', 'SourcePath' ); $result = new ezcMvcResult; $downloadUrl = str_replace( '#', '/', $this->DownloadUrl ); // subtitle save path $targetPath = $tv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function download()\n {\n $streams = $this->getStream();\n $streams = explode(',', $streams);\n $title = $this->getTitle();\n\n\n if (file_exists('videos/' . $title . '.mp4')) {\n return \"{$this->url}/videos/\" . $title . '.mp4';\n }\n\n foreach ($str...
[ "0.7491961", "0.6918604", "0.64715904", "0.64194274", "0.6253197", "0.624207", "0.6206993", "0.6135676", "0.6013596", "0.6000511", "0.58799213", "0.57608575", "0.57160157", "0.56759083", "0.56290984", "0.56264806", "0.5619842", "0.5586138", "0.5568243", "0.5566479", "0.556238...
0.7079152
1
Searches a movie release
Ищет выход фильма
public function doMovieSearch() { if ( !preg_match( "/^(.*)(19|20)[0-9]{2}/", $this->Release, $matches ) ) { $variables = array( 'status' => 'ko', 'message' => 'unable to extract the movie name' ); } else { $movieTitle = $matches[1]; $scra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search($release) {\n\t\treturn NULL; // no search allowed\n\t}", "public function doMovieSearchReleases()\n {\n $movieId = str_replace( array( '|', '~' ), array( '/', '.' ), $this->MovieId );\n\n $scraper = new MkvManagerScraperSubsynchro();\n\n $releases = array_map(\n ...
[ "0.7581389", "0.7266087", "0.62828684", "0.59971774", "0.58874035", "0.5737768", "0.5735022", "0.5637112", "0.5617639", "0.56036365", "0.56036365", "0.5550725", "0.5535295", "0.5497053", "0.5493319", "0.5492078", "0.54892284", "0.54892284", "0.5461141", "0.5456464", "0.544992...
0.7279652
1
Return's the registry processor instance.
Возвращает экземпляр регистратора обработчика.
protected function getRegistryProcessor() : RegistryProcessorInterface { return $this->registryProcessor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getRegistryProcessor()\n {\n return $this->registryProcessor;\n }", "protected function getRegistryProcessor()\n {\n return $this->registryProcessor;\n }", "public function getProcessor($processor);", "public function getProcessor();", "public function getProces...
[ "0.84270626", "0.84270626", "0.7014165", "0.68342125", "0.68342125", "0.67344415", "0.67249036", "0.6685205", "0.6664679", "0.6626311", "0.6608554", "0.65442634", "0.6521316", "0.64827025", "0.6407047", "0.6274764", "0.6167277", "0.616373", "0.60954165", "0.60690266", "0.6041...
0.8455632
0