query stringlengths 10 8.11k | document stringlengths 17 398k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Operation getDepositUsingGetAsyncWithHttpInfo Retrieve a deposit request | public function getDepositUsingGetAsyncWithHttpInfo($deposit_id)
{
$returnType = '\com\hydrogen\nucleus\Model\DailyDeposit';
$request = $this->getDepositUsingGetRequest($deposit_id);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
... | [
"public function debtorGETRequestDebtorIDGetAsyncWithHttpInfo($accept, $debtor_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Debtor';\n $request = $this->debtorGETRequestDebtorIDGetRequest($accept, $debtor_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsyn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show important dates tab. If the user have more priviledges than COMP_ADM_LEVEL, then the dates will be editable on the page | function companydates(){
$this->auth(COMP_ADM_LEVEL);
$contest_id = $this->uri->segment(3);
$data = $this->_getCompanyDataByContestId($contest_id);
if($this->session->userdata('role_level') > SUPPORT_ADM_LEVEL){
$data['editable'] = TRUE;
} else {
$data['editable'] = FALSE;
}
$thi... | [
"function view_dates() {\n if (!$this->assignment->timeavailable && !$this->assignment->timedue) {\n return;\n }\n\n\n print_simple_box_start('center', '', '', '', 'generalbox', 'dates');\n echo '<table border=\"0\">';\n if ($this->assignment->timeavailable) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation getUnitRelationshipTypesAsync List Relationship Types | public function getUnitRelationshipTypesAsync()
{
return $this->getUnitRelationshipTypesAsyncWithHttpInfo()
->then(
function ($response) {
return $response[0];
}
);
} | [
"public function getRelationshipTypes()\n {\n return $this->relationship_types;\n }",
"private function getRelationshipTypes() {\n $relTypes = \\Drupal::service('civicrm_entity.api')->get('RelationshipType', [\n 'return' => [\"id\", \"label_a_b\", \"label_b_a\"],\n 'options' => ['limit' ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns slots for Many Bookings for One Day | public function getManyBookingsForOneDaySlots($bookingProductSlot, $requestedDate)
{
$bookingProduct = $bookingProductSlot->booking_product;
$currentTime = Carbon::now();
$availableFrom = $bookingProduct->available_from
? Carbon::createFromTimeString($bookingProduct->available_... | [
"public function slots()\n {\n $pdo = static::getDB();\n $sql_query = \"SELECT * FROM COLLECTION_SLOTS WHERE DAY = :day\";\n\n $result = $pdo->prepare($sql_query);\n $result->execute([$this->DAY]);\n return $result->fetchAll(\\PDO::FETCH_CLASS, self::class);\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ public function insertFromWebsite Permite insertar un usuario que se ha registrado mediante el formulario del sitio web. | function insertFromWebsite() {
$oAccesoDatos = new AccesoDatos();
$sQuery = "";
$nAfectados = -1;
if ($this -> id == "" OR $this -> username == "" OR $this -> password == "" OR $this -> salt == "" OR $this -> type == "")
throw new Exception("User->insertFromWebsite(): error d... | [
"private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}",
"function insertUser(){\n\t\t$this->copyFrom('POST');\n\t\t$this->save(); // execute insert into the table\n }",
"public function insert() {\n\t\t$this->insert_user();\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test load newest articles select. | public function testLoadNewestArticlesSelect()
{
$this->setTime(100);
$sArticleTable = $this->_getArticleTable();
$oArticle = oxNew('oxArticle');
$this->setConfigParam('iNrofNewcomerArticles', 4);
$this->setConfigParam('blNewArtByInsert', 0);
$sExpt = "select * fr... | [
"public function testLoadNewestArticlesSelectByInsert()\n {\n\n $this->setTime(100);\n\n $sArticleTable = $this->_getArticleTable();\n $oArticle = oxNew('oxArticle');\n\n $this->setConfigParam('iNrofNewcomerArticles', 4);\n $this->setConfigParam('blNewArtByInsert', 1);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A hook to be able to modify params prior as they are converted to JSON. | protected function convertParamsHook(&$object)
{
// Do customisation of the params field here for specific data.
} | [
"protected function set_params() {}",
"function _setJSONRequestArgument()\n\t{\n\t\tif($this->getRequestMethod() != 'JSON')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$params = array();\n\t\tparse_str($GLOBALS['HTTP_RAW_POST_DATA'], $params);\n\n\t\tforeach($params as $key => $val)\n\t\t{\n\t\t\t$this->set($key, $this->... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pre process ignore values. Define key for array which will be ignored. | public function preProcessIgnoreValues(): array
{
return [];
} | [
"private function preProcessIgnoreValues(array $values): array\n {\n foreach ($this->getItemsByShow($this->actionType) as $key => $element) {\n // auto remove index in case omit=>true\n if ($element['omit'] ?? false) {\n unset($values[$key]);\n }\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ensure that the index is current with the workspace | private function indexWorkspace(): void
{
foreach ($this->workspace as $document) {
assert($document instanceof TextDocumentItem);
try {
$this->indexer->indexDirty(
TextDocumentBuilder::fromUri($document->uri)->text($document->text)->build()
... | [
"public function checkWorkspaceCurrent() {}",
"public function indexIsSane() {\n return $this->indexExists();\n }",
"public function doesIndexMatchWorkingTree(): bool\n {\n return $this->getStatusCode()[1] === self::UNMODIFIED;\n }",
"function rebuild_index() {\n FWP()->indexer->index(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The operation that you want to perform. Set the value to RemoveSubInstance. | public function removeSubInstance($request)
{
$runtime = new RuntimeOptions([]);
return $this->removeSubInstanceWithOptions($request, $runtime);
} | [
"function removeSubaccount() {\r\n global $collection; \r\n if (!findAccount(UID)) {\r\n u(OUT)->failure(\"Could not find account\");\r\n return;\r\n } \r\n $subId = $_GET[\"subId\"];\r\n $subaccount = findSubaccount($subId);\r\n if (!$subaccount || $s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test spy for mkdir | function mkdir($path, $mode = 0777, $recursive = false)
{
return DirStub::create($path, $mode, $recursive);
} | [
"public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }",
"public function testMakeDirectory()\n {\n $this->assertTrue(File::mkdir(self::$temp.DS.'created'));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
listJsFiles returns a list of JavaScript files required for the extension. | public function listJsFiles()
{
return [];
} | [
"public function getJsFiles(): array;",
"public function getJSFiles()\n {\n $list = parent::getJSFiles();\n\n $list[] = 'modules/QSL/CloudSearch/cloud_filters/filters.js';\n\n return $list;\n }",
"public function getAdditionalJavaScriptFiles();",
"public function getAdditionalJavaSc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the full filename (including path) for the given log name pwgroupretrieval | public function getFilename($name) {
$name = strtolower($name);
if($name !== $this->wire('sanitizer')->pageName($name)) {
throw new WireException("Log name must contain only [-_.a-z0-9] with no extension");
}
return $this->wire('config')->paths->logs . $name . '.' . $this->logExtension;
} | [
"public static function get_log_file_name() {\n\t\t$filename = 'jobroller-' . sanitize_file_name( wp_hash( 'jobroller' ) ) . '.log';\n\n\t\treturn $filename;\n\t}",
"protected function getLogFileName() : ?string {\n return ($this->handler && preg_match('/^.*->(\\w+)$/', $this->handler,$m)) ? 'cron_' . $m[1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Formats a string containing the fullyqualified path to represent a order1 resource. | public static function order1Name(string $order1Id): string
{
return self::getPathTemplate('order1')->render([
'order1_id' => $order1Id,
]);
} | [
"public function setPath1($var)\n {\n GPBUtil::checkString($var, True);\n $this->path1 = $var;\n\n return $this;\n }",
"public function getOrderPath();",
"public function getPathStringFormat()\n {\n return $this->getPathFormat($this->path);\n }",
"public static function... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shortcut to all dump functions Dumps Name, ID, Class, Value and Style for a typical input attributes | protected function DumpAttributes()
{
echo "{$this->DumpName()} {$this->DumpID()} {$this->DumpClass()} {$this->DumpValue()} {$this->DumpStyle()}";
} | [
"function attributesToString();",
"public static function formatAttributes();",
"abstract function exportableAttributes();",
"public function dump() \n {\n $dump = parent::dump();\n $dump->fill_method = $this->_overload[\"fill_method\"];\n $dump->fill_choices = $this->_overload[\"fill_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converte para data por extenso Brasileira. | final public static function converterDataPorExtenso($data)
{
setlocale(LC_ALL, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese');
date_default_timezone_set('America/Sao_Paulo');
return strftime('%A, %d de %B de %Y', strtotime($data) );
} | [
"private function escreverDataPorExtenso() {\n\n $this->oPdf->Ln();\n $oData = new DBDate(date(\"d/m/Y\"));\n $sData = \"{$this->oEscola->getMunicipio()}, \";\n $sData .= $oData->dataPorExtenso();\n $this->oPdf->Cell(205, 4, $sData, 0, 1, \"C\");\n $this->oPdf->Ln();\n\n }",
"function funConv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the absolute path to the folder containing executables | public static function getExecutablePath()
{
$configFileUpload = new Util_Config('fileupload.ini', APPLICATION_ENV);
$useDefaultPath = $configFileUpload->getValue('file.upload.path.default', true);
$executableDir = $configFileUpload->getValue('file.upload.executeable.folder', 'executeable'... | [
"protected function getExecutable()\n {\n return realpath(__DIR__ . '/../../bin/phptea');\n }",
"private function getExecutablePath() {\n $path = $this->config->getWritableUserDir() . DIRECTORY_SEPARATOR . 'credential-helper';\n if (OsUtil::isWindows()) {\n $path .= '.exe';\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete one Acad Yr at a time | function deleteAcadYrById($id){
global $db;
$sql = "DELETE FROM tblAcadYr ";
$sql .= "WHERE acadYrId = '".$id."' ";
$sql .= "LIMIT 1";
$res = mysqli_query($db,$sql);
if($res){
return true;
} else {
echo mysqli_error($db);
db_disconnect($db);
exit;
}
} | [
"public function delete()\n\t{\n\t\t$_record = Record::createRecord(Record::AD_REMOVED);\n\t\t$_record->setRef1($this->getID());\n\t\t\n\t\t//Retrieve informations on the ads and its creatives\n\t\t$screens = $this->getScreens();\n\t\t$adPath = $this->getPath(false);\n\t\t\n\t\t//Delete every creatives the ad may c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the public 'Yoast\WP\Free\Watchers\Primary_Term_Watcher' shared autowired service. | protected function getPrimaryTermWatcherService()
{
return $this->services['Yoast\\WP\\Free\\Watchers\\Primary_Term_Watcher'] = new \Yoast\WP\Free\Watchers\Primary_Term_Watcher(${($_ = isset($this->services['Yoast\\WP\\Free\\Repositories\\Primary_Term_Repository']) ? $this->services['Yoast\\WP\\Free\\Reposi... | [
"protected function getPrimaryTermRepositoryService()\n {\n return $this->services['Yoast\\\\WP\\\\Free\\\\Repositories\\\\Primary_Term_Repository'] = \\Yoast\\WP\\Free\\Repositories\\Primary_Term_Repository::get_instance();\n }",
"protected function getPrimaryTermRepositoryService()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns defined enum values | public function getEnumValues()
{
return array(
'IGNORE' => self::IGNORE,
'EXPECT_EXIST' => self::EXPECT_EXIST,
'EXPECT_NOT_EXIST' => self::EXPECT_NOT_EXIST,
);
} | [
"public function getEnumValues()\n {\n return array(\n 'TEXT_FULL' => self::TEXT_FULL,\n 'TEXT_SEG' => self::TEXT_SEG,\n 'TEXT_SEG_BY_SEP' => self::TEXT_SEG_BY_SEP,\n 'INT_RANGE' => self::INT_RANGE,\n 'REAL_RANGE' => self::REAL_RANGE,\n 'IN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setup the logging context and run the doWorkChildImpl() | private function doWorkChild() {
Log5PHP_MDC::put('Generation', 'child');
$this->doWorkChildImpl();
$this->childCleanup();
exit();
} | [
"abstract protected function startLog();",
"public function initLogger(): void\n {\n $logFileName = sprintf(\n '%s-%s-%s.log',\n $this->spider->getName(),\n (new \\DateTime())->format('Y-m-d'),\n $this->id\n );\n $this->logger = new Logger('job-'... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation postTelephonyProvidersEdgesDidpools Create a new DID pool | public function postTelephonyProvidersEdgesDidpools($body)
{
list($response) = $this->postTelephonyProvidersEdgesDidpoolsWithHttpInfo($body);
return $response;
} | [
"private function _createPool()\n {\n $schedule = Schedule::lookupById((int)$this->m_scheduleId);\n $divisionNameWithGender = $schedule->division->name . \" \" . $schedule->division->gender;\n $this->m_divisionNames[] = $divisionNameWithGender;\n $flight ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Method: getJS Returns the expression represented in JavaScript. Parameters: $indent The current indentation string that should be concatenated after newlines. $parser An instance of . In Javascript, some form elements are accessed in different ways, so the expression then needs to know its input type. With a DescPars... | abstract public function getJS($indent, DescParser $parser); | [
"public static function getJSEvaluate()\n {\n return <<<JS\n\t\t\tvar params = this.getParameters(),\n\t\t\t numerator = params[0].evaluate();\n\t\t\t denominator = params[1].evaluate();\n if (denominator == 0) {\n\t\t\t throw \"Division by 0 error\";\n }\n\t\t\treturn thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate the syntax of a descriptor according to the database driver implementation. | abstract protected function validateDescriptor($storage_descriptor = null); | [
"protected function validateDescriptor($descriptor) {\n // We validate after removing tokens which contain not allowed characters\n // and also make the string longer than the maximum length.\n $token_free_descriptor = $this->removeTokensFromString($descriptor);\n\n if ($token_free_descriptor === '') {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print the menu bar with a list of projects to which the user has access | function print_subproject_menu_bar( $p_project_id, $p_parents = '' ) {
$t_subprojects = current_user_get_accessible_subprojects( $p_project_id );
$t_char = ':';
foreach( $t_subprojects as $t_subproject ) {
if ($t_char == ':')
echo '<ul class="sub-menu">';
echo '<li class="menu-item">';... | [
"public function print_project_list() : string\n {\n $row = Tools::query(\"SELECT id, ProjectName FROM \"\n . $this->config['ProjectProfile'], 'ASSOC');\n \n $list = '';\n foreach ($row as $id => $PName) {\n $list .= \"<li><a href='../control/selectproje... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the max width. | public function getMaxWidth() {
return $this->maxWidth;
} | [
"public function get_max_width() {\n return $this->max_width;\n }",
"public function getMaxWidth()\n {\n return $this->maxWidth;\n }",
"public function getMaxWidth()\n {\n return ( !empty( $this->get( 'width' ) ) ) ? (int)$this->get( 'width' ) : self::WIDTH;\n }",
"public function ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the committer's local epoch | public function GetCommitterLocalEpoch()
{
$epoch = $this->GetCommitterEpoch();
$tz = $this->GetCommitterTimezone();
if (preg_match('/^([+\-][0-9][0-9])([0-9][0-9])$/', $tz, $regs)) {
$local = $epoch + ((((int)$regs[1]) + ($regs[2]/60)) * 3600);
return $local;
}
return $epoch;
} | [
"public function GetTaggerLocalEpoch()\n\t{\n\t\t$epoch = $this->GetTaggerEpoch();\n\t\t$tz = $this->GetTaggerTimezone();\n\t\tif (preg_match('/^([+\\-][0-9][0-9])([0-9][0-9])$/', $tz, $regs)) {\n\t\t\t$local = $epoch + ((((int)$regs[1]) + ($regs[2]/60)) * 3600);\n\t\t\treturn $local;\n\t\t}\n\t\treturn $epoch;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generar el primer folio | function primerFolio($claveCliente)
{
//llamar el metodo de clave cliente
$claveCliente = "R1-001";
//anio actual
$anioActual = date("Y");
//parte numerica
$numero = "000001";
$primerFolio = $claveCliente."/".$numero."/".$anioActual;
return $primerFolio;
} | [
"function generarFolioPago() {\n include './conexion.php';\n $cons = $this->lastIdVenta(); //consecutivo de venta\n $key = $this->generarCodigo(6); //string de 6 numeros\n $folio = $key . '-' . $cons;\n $sql = \"INSERT INTO venta (folio) VALUES ('\" . strtoupper($folio) . \"')\";\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constant for the mailing feature id. This constant is used internally only. | public static final function INTERNAL_MAILING_FEATURE_ID()
{
if(null === self::$INTERNAL_MAILING_FEATURE_ID)
self::$INTERNAL_MAILING_FEATURE_ID = new Inx_Api_TriggerMailing_TriggerMailingAttribute( 2, false );
return self::$INTERNAL_MAILING_FEATURE_ID;
} | [
"public function getFeatureId()\n {\n return $this->feature_id;\n }",
"public function getFeatureElementId()\n {\n \t$value = false;\n \t$urlPart = strrchr($this->getId(), '/');\n \tif( $urlPart ) {\n \t\t$value = trim( $urlPart, '/');\n \t} \t\n \treturn $value;\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get fake instance of SupOrderPosition | public function fakeSupOrderPosition($supOrderPositionFields = [])
{
return new SupOrderPosition($this->fakeSupOrderPositionData($supOrderPositionFields));
} | [
"public function getPosition()\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->load->library('position');\t\t\n\t\t\t\t\t\t\n\t\t$position = new Position($this->position_id);\n\n\t\treturn $position;\n\t}",
"private function getPositionInstance()\n {\n return $this->position;\n }",
"public function test... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filter the query on the date_add column Example usage: $query>filterByDateAdd('20110314'); // WHERE date_add = '20110314' $query>filterByDateAdd('now'); // WHERE date_add = '20110314' $query>filterByDateAdd(array('max' => 'yesterday')); // WHERE date_add > '20110313' | public function filterByDateAdd($dateAdd = null, $comparison = null)
{
if (is_array($dateAdd)) {
$useMinMax = false;
if (isset($dateAdd['min'])) {
$this->addUsingAlias(Oops_Db_ReferrerPeer::DATE_ADD, $dateAdd['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dateAdd['max'])) {
... | [
"public function filterByDateAdd($dateAdd = null, $comparison = null)\n\t{\n\t\tif (is_array($dateAdd)) {\n\t\t\t$useMinMax = false;\n\t\t\tif (isset($dateAdd['min'])) {\n\t\t\t\t$this->addUsingAlias(Oops_Db_StorePeer::DATE_ADD, $dateAdd['min'], Criteria::GREATER_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the value of duree | public function getDuree()
{
return $this->duree;
} | [
"public function getValue();",
"public function getDuree():int\n {\n return $this->duree;\n }",
"public function get_value() {\n return $this->value;\n }",
"public function getValue(){\n\t\tif(!($value = $this->getData('value'))){\n\t\t\treturn $this->getDefaultValue();\n\t\t}\n\t\tretu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check if quiz is ready to be published | function checkPublish(){
require('variables.php');
// check the number of results
$numResults = $this->getResults("count");
// check the number of questions
$numQuestions = $this->getQuestions("count");
// check the number of options
$listQuestion = explode(',', $this->getQuestions());
if($numQuest... | [
"public function publish() {\n $user = Auth::user();\n // set an answer as publish status\n // check if answer belongs to the current user\n if ($user->id != $this->owner->id || $this->status != 2) {\n // only draft status answer can be pulished\n return false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes the specified BackendService resource. (backendServices.delete) | public function delete($project, $backendService, $optParams = array())
{
$params = array('project' => $project, 'backendService' => $backendService);
$params = array_merge($params, $optParams);
return $this->call('delete', array($params), "Appointments_Google_Service_Compute_Operation");
} | [
"public function deleteBackendService($backendServiceName) {\n\n $notReady = true;\n while ($notReady) {\n try {\n $this->computeService->backendServices->delete($this->projectId, $backendServiceName);\n $notReady = false;\n } catch (\\Google_Service... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the code lib b plaf4. | public function getCodeLibBPlaf4() {
return $this->codeLibBPlaf4;
} | [
"public function getCodeLibBrut4() {\n return $this->codeLibBrut4;\n }",
"public function getCodeLibBPlaf4(): ?string {\n return $this->codeLibBPlaf4;\n }",
"public function getCodeLibBrut4(): ?string {\n return $this->codeLibBrut4;\n }",
"public function getCodeLibBPlaf() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searches the 'AdvisingSchedules' table for an advising schedule model with a specified advisor user id and academic quarter id | public function loadPropertiesFromAdvisorIDAndAcademicQuarterID($advisorUserID, $academicQuarterID)
{
if($advisorUserID != null && filter_var($advisorUserID, FILTER_VALIDATE_INT) && $academicQuarterID != null && filter_var($academicQuarterID, FILTER_VALIDATE_INT))
{
$this->db->where('AdvisorUserID', $advisorUse... | [
"function scheduler_get_appointed($slotid){\n global $CFG;\n \n $sql = \"\n SELECT\n u.*\n FROM\n {$CFG->prefix}user AS u,\n {$CFG->prefix}scheduler_appointment AS a\n WHERE\n u.id = a.studentid AND\n a.slotid = {$slotid}\n \"; ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the public 'TYPO3\CMS\Filelist\Controller\FileListController' autowired service. | protected function getFileListControllerService()
{
$instance = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceForDi(\TYPO3\CMS\Filelist\Controller\FileListController::class);
$instance->setLogger(($this->services['_early.TYPO3\\CMS\\Core\\Log\\LogManager'] ?? $this->get('_early.TYPO3\\CMS\\Co... | [
"protected function getFileDumpControllerService()\n {\n return $this->services['TYPO3\\\\CMS\\\\Core\\\\Controller\\\\FileDumpController'] = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Core\\Controller\\FileDumpController::class, ($this->services['TYPO3\\\\CMS\\\\Core\\\\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates the name for the current proxy from a prefix and a counter. | public function getProxyName() {
return MOCK_PROXY_PREFIX.(self::$num);
} | [
"private static function _getNextVarName($prefix='var')\n {\n self::$_templateVarCounter++;\n $key = str_replace('::', '', self::$_currentTemplateKey);\n $name = $prefix.'_'.$key.'_'.self::$_templateVarCounter;\n return $name;\n\n }",
"public function prefixName($prefix);",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ rewrites all tokens in a Twelf source code line to links | function processTwelfLine($line) {
// TODO this regular expression needs improvement
return ' ' . preg_replace_callback('/[^ \n\t.()0-9][^ \n\t.()]*/', create_function('$matches', 'return linkSymbol($matches[0]);'), $line);
} | [
"public function linksToProxy()\n\t{\n\t\t$this->buffer = str_replace($this->links_from, $this->links_to, $this->buffer);\n\t}",
"private function refill_line()\n\t{\n\t\t$attrs = '';\n\t\t// compile attributes\n\t\tforeach($this->attr as $type => $val)\n\t\t{\n\t\t\t$val = addslashes(trim($val));\n\t\t\t$attrs .... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
multiplica todos os valores do array | public function mult()
{
return array_product($this->valores);
} | [
"function array_product (array $array) {}",
"function array_product ($arg) {}",
"function valueTimesArray($v1,$value){\n\n $p[0]=$v1[0]*$value;\n $p[1]=$v1[1]*$value;\n $p[2]=$v1[2]*$value;\n\n return $p;\n}",
"function multi($a){\n\t$acu = 1;\n\t\tforeach($a as $v){\n\t\t\t$acu *= $v;\n\t\t}\n\te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes a specified board message from the database. Note that the message will be deleted only if this user is the message's writer. | public function DeleteBoardMessage($messageId)
{
// We'll need the message number later
if ($result = $this->_db->ExecuteStmt(Statements::SELECT_USER_BOARD_MESSAGE_NUMBER, $this->_db->BuildStmtArray("i", $messageId)))
{
$row = $result->fetch_assoc();
$messageNumber = ... | [
"public function delete() {\r\n\t\tImperator::getDatabaseManager()->getChatTable()->deleteMessage($this);\r\n\t}",
"public function delete()\n {\n $db = $_SESSION[\"database\"];\n $db->delete(\"ChatMessage\", \"MessageID = '$this->id'\");\n }",
"protected function deleteMessage( $message ) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether current handler can handle provided alert. | public function can_handle( Alert $alert ) {
return in_array( $alert->get_type(), [ Alerts::FAILED_EMAIL ], true );
} | [
"public function hasAlert()\n {\n return isset($this->alert);\n }",
"public function is_allowed($alert_identifier)\n {\n }",
"public function getHasAlert()\n {\n return $this->has_alert;\n }",
"public function hasHandler()\n {\n }",
"public f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check equivalent rate weekly or anual. | public function checkEquivalentRate($type)
{
return $this->settings->value('TASA_ANUAL') / ('Q' == $type ? 52.143 : 12) / 100;
} | [
"private function _checkRatePAY()\n {\n return $this->_checkCurrency() && $this->_checkCountry() && !$this->_checkDenied() && $this->_checkAge();\n }",
"function checkSpecialRateValidate($data)\r\n {\r\n if(isset($data['BankID'])&&!unsigned($data['BankID'])) return 13065;\r\n if(isset($data['S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a `VectorInterface` containing the values of the current `VectorInterface` that meet a supplied condition applied to its keys and values. Only keys and values that meet a certain criteria are affected by a call to `filterWithKey()`, while all values are affected by a call to `mapWithKey()`. The keys associated ... | public function filterWithKey(Closure $fn): VectorInterface; | [
"public function filter(Closure $fn): VectorInterface;",
"public function mapWithKey(Closure $fn): VectorInterface;",
"public function where(callable $condition): IEnumerable;",
"public function values(): MutableVectorInterface;",
"public function getBy($condition);",
"public function addWhere(Section $fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove um anexo de um processo. | public function removerAnexos()
{
$id = request('id');
$anexo = Anexo::find($id);
$anexo->delete();
$processo = Processo::with('anexos')->find($anexo->id_processo);
$anexos = $processo->anexos;
$view = view('processos.abas._anexos_itens', compact('anexos'))->render()... | [
"function removeProcessoPronto(){\n\tunset($_SESSION['processosProntos'][0]);\n\n\t/*REORGANIZA O ARRAY DE PROCESSOS PRONTOS*/\n\t$_SESSION['processosProntos'] = array_values($_SESSION['processosProntos']);\n}",
"public function clearAnotacaoProcessos()\n\t{\n\t\t$this->collAnotacaoProcessos = null; // important ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Number of days before the DueDate on whichthe article can no longer be shipped. | public function getNrDaysNoDeliveryForDueDate()
{
return $this->nrDaysNoDeliveryForDueDate;
} | [
"public function daysRemaining()\n\t{\n\t\t$days_remaining = 0;\n\t\t$today = strtotime(date('Y-m-d H:i:s'));\n\t\t$due_date = strtotime($this->due_date);\n\n\t\tif ($due_date > $today) {\n\t\t\t$days_remaining = floor(($due_date - $today) / 86400);\n\t\t}\n\n\t\treturn $days_remaining;\n\t}",
"static public func... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Authenticates the user using the DIGESTMD5 method. | function _authDigest_MD5($uid, $pwd, $euser)
{
if ( PEAR::isError( $challenge = $this->_doCmd('AUTHENTICATE "DIGEST-MD5"') ) ) {
$this->_error=challenge ;
return challenge ;
}
$challenge = base64_decode( $challenge );
$digest = &Auth_SASL::factory('digestmd5')... | [
"protected function authCRAMMD5()\n {\n $this->_send('AUTH CRAM-MD5');\n $challenge = $this->_expect(334);\n $challenge = base64_decode($challenge);\n $digest = $this->hmacMD5($this->getPassword(), $challenge);\n $this->_send(base64_encode($this->getUsername() . ' ' . $digest))... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.google.protobuf.Timestamp statusChangedTo = 8; | public function getStatusChangedTo()
{
return $this->statusChangedTo;
} | [
"public function setStatusChangedTo(&$var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->statusChangedTo = $var;\n }",
"public function getChangedTime() {\n return $this->get('changed')->value;\n }",
"public function setChangedTime($timestamp);",
"fu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts spaces ( ) and dashes () to underscores (_) | private function spaceToUnderscore( $original )
{
return ( string )str_replace( array( " ", "-" ), "_", $original );
} | [
"function dasherize($underscore_word)\n{\n return preg_replace('/_/', '-', $underscore_word);\n}",
"function underscore($str){\r\n return strtolower(preg_replace('/(.)([A-Z])/', '$1_$2', $str));\r\n }",
"function underscore($string)\n{\n return strtolower(preg_replace('/(?<!^)([A-Z])/', '_$1', s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Action confirm transaction page | public function actionConfirm()
{
$this->checkDetails();
} | [
"public function actionConfirm()\n {\n parent::actionConfirm();\n $api = $this->buildApi();\n\n $details = HelperCommon::getStore('details');\n $api->updateData($details);\n\n // fill items with product details\n $items = array();\n foreach ($api->getBasket()->get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add the relevant ticket information and meta to each order item that needs it, along with a change button for event swaps | protected function _draw_item_ticket_info( $item_id, $item, $product ) {
// if the product is not a ticket, then never display event meta
if ( ! is_object( $product ) || get_post_meta( $product->get_id(), '_ticket', true ) != 'yes' )
return;
$event_id = isset( $item['event_id'] ) && $item['event_id'] > 0 ? $i... | [
"public function track_add_order_from_edit()\n {\n }",
"function my_em_event_order_boxes(){ \n\tadd_meta_box('em-event-order', 'Order Details', 'my_em_event_order_metabox','tribe_events', 'side','low');\n}",
"public function wcla_woocommerce_order_items_meta_box($post) {\n global $wpdb, $th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Databinding properties of the control. | protected function dataBindProperties()
{
Prado::trace("Data bind properties",'Prado\Web\UI\TControl');
if(isset($this->_rf[self::RF_DATA_BINDINGS]))
{
if(($context=$this->getTemplateControl())===null)
$context=$this;
foreach($this->_rf[self::RF_DATA_BINDINGS] as $property=>$expression)
$this->setS... | [
"protected function databind ()\n {\n if (isset($this->bindings))\n foreach ($this->bindings as $attrName => $bindExp) {\n $value = $this->evalBinding ($bindExp);\n if (is_object ($value))\n $this->props->$attrName = $value;\n else $this->props->set ($attrName, $value);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int32 send_card_count_all = 9; | public function setSendCardCountAll($var)
{
GPBUtil::checkInt32($var);
$this->send_card_count_all = $var;
} | [
"public function sendCount();",
"abstract public function getNbToSend(): int;",
"public function cardCount()\n {\n return $this->msuit->count();\n }",
"public function getFreeToSendPostcards(): int\n {\n return $this->freeToSendPostcards;\n }",
"abstract public function getNbSendPr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new Collator object for locale | public function createCollator()
{
return new Collator($this->getLocale());
} | [
"protected static function getCollator()\n {\n if (!self::$collator) {\n self::$collator = collator_create('root');\n }\n \n return self::$collator;\n }",
"public function getFacetCollatorProvider(): CollatorProviderInterface;",
"public function getFacetCollatorProvi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns basket elements delivery countries. | protected function getBasketDeliveryCountries()
{
$countries = [];
foreach ($this->basket->getBasketElements() as $basketElement) {
$product = $basketElement->getProduct();
foreach ($product->getDeliveries() as $delivery) {
$code = $delivery->getCountryCode(... | [
"protected function getBasketDeliveryCountries()\n {\n $countries = [];\n\n foreach ($this->basket->getBasketElements() as $basketElement) {\n $product = $basketElement->getProduct();\n\n foreach ($product->getDeliveries() as $delivery) {\n\n $code = $delivery->... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated from protobuf field string payeeMobile = 7; | public function setPayeeMobile($var)
{
GPBUtil::checkString($var, True);
$this->payeeMobile = $var;
return $this;
} | [
"public function getPayerMobile()\n {\n return $this->payerMobile;\n }",
"public function getUserPaymorrowMobilePhone()\n {\n return $this->oxuser__oxmobfon->value;\n }",
"public function setMobile($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Inter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check to see if ShippingServiceId is set. | public function isSetShippingServiceId()
{
return !is_null($this->_fields['ShippingServiceId']['FieldValue']);
} | [
"public function setService($id)\n {\n if (is_string($id)) {\n $this->options['ShippingServiceId'] = $id;\n } else {\n $this->log('Tried to set ShippingServiceId to invalid value', 'Warning');\n\n return false;\n }\n }",
"public function setShippingServi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the consume() message and the message misses the message. | public function testConsume_MissingMessage()
{
$consumer = new CallbackConsumer();
$consumer->consume('{\"type\":\"default\"}');
} | [
"public function testConsumeShouldNotFailBeforeTimeout()\n {\n $rate = new Rate(10, Rate::SECOND);\n $bucket = new TokenBucket(10, $rate, new SingleProcessStorage());\n $bucket->bootstrap(0);\n $consumer = new BlockingConsumer($bucket, 1);\n \n $consumer->consume(10);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generates a Section select list for the passed content element | function SelectSection($content_element, $field_name, $active = null, $javascript){
if(empty($content_element->sec_table)) return false;
$id_field = $content_element->sec_table_id;
$name_field = $content_element->sec_table_title;
$database = JFactory::getDBO();
$query = "SELECT * " .
" FROM #__" . $c... | [
"function SelectCategory($content_element, $field_name, $section=null, $active = null, $javascript){\r\n\tif(empty($content_element->cat_table)) return false;\r\n\r\n\t$database = JFactory::getDBO();\r\n\r\n\t$id_field \t= $content_element->cat_table_id;\r\n\t$name_field = $content_element->cat_table_title;\r\n\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the periode archivage. | public function getPeriodeArchivage(): ?DateTime {
return $this->periodeArchivage;
} | [
"public function getPeriodeArchivage() {\n return $this->periodeArchivage;\n }",
"public function getARCHIVO()\n {\n return $this->ARCHIVO;\n }",
"public function getArchivoPublicidad(){\n\t\treturn $this->archivo_publicidad;\n\t}",
"public function getArchaeologicalData()\r\n {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filters countries based on the search string. | public function filterCountries($query, $selected_countries)
{
// do nothing
} | [
"public function search($filter) {\n //Don't even bother trying if filter is too short\n if(strlen($filter) < 2) return $this->set_error('\"' . $filter . '\" is too short, $filter must be at least 2 characters long');\n\n //GOGOGO!\n return $this->get_list(self::SERVICE_SEARCH, array('co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
expand an old schedule expand an old v1 schedule hours from 24 to 96 entries | function expand_hours($hours) {
$sections = strlen($hours);
if ($sections<96) {
$insert = 96/$sections;
$newhours = "";
for($i=0; $i<$sections; $i++) {
for($j=0; $j<$insert; $j++) {
$newhours .= $hours[$i];
}
}
return $newhours;
}
else return $hours;
} | [
"private function parse_schedule(){\n\n }",
"public function schedule_plan() {\n $data = array(\n array(scheduler::DAILY, 10, 1389394800, 1389394800, 1389434400),\n array(scheduler::DAILY, 15, 1394202900, 1394202900, 1394204400),\n array(scheduler::DAILY, 15, 1394204400,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(PHP 4, PHP 5) Binarysafe file read | function fread ($handle, $length) {} | [
"public static function fileGet($bytes){}",
"function _readfile($f, $b = false)\r\n\t{\r\n\t\t$fp = NULL;\r\n\t\t$d = '';\r\n\t\t!$b && $b = @filesize($f);\r\n\t\tif (!($b > 0) || !file_exists($f) || !false === ($fp = @fopen($f, 'r')) || !is_resource($fp)) return false;\r\n\t\tif ($b > 4096) while (!feof($fp) && ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the thread has been "viewed" yet by this session | public function is_thread_viewed($id)
{
if (!isset($_SESSION['thread_views']))
{
$_SESSION['thread_views'] = array();
}
return in_array($id, $_SESSION['thread_views']);
} | [
"public function hasThreadTs(): bool\n {\n return ! empty($this->threadTS);\n }",
"public function unreaded(){\n\t\treturn $this->read_at===null;\n\t}",
"public function isViewed()\n {\n if (!\\Auth::user()) {\n $viewed = \\Session::get($this->get_view_key());\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create request for operation 'getBundleItem' | protected function getBundleItemRequest($id)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException('Missing the required parameter $id when calling getBundleItem');
}
$resourcePath = '/store/bundles/{id}';
$formPar... | [
"protected function createBundleItemRequest($cascade = 'false', $bundle_item = null)\n {\n\n $resourcePath = '/store/bundles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the name of the deploy configuration files to look for. | public function getDeployConfigName()
{
return $this->config['deploy_config_name'];
} | [
"public function getDeploymentNames() {\n\t\t$files = glob(FLOW_PATH_ROOT . 'Build/Surf/*.php');\n\t\treturn array_map(function($file) {\n\t\t\treturn substr($file, strlen(FLOW_PATH_ROOT . 'Build/Surf/'), -4);\n\t\t}, $files);\n\t}",
"public static function getConfigFileName () {\n //return get_config_file... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return value of created_by_id field | function getCreatedById() {
return $this->getFieldValue('created_by_id');
} | [
"public function getCreatedById()\n\t{\n\t\treturn $this->created_by_id;\n\t}",
"public function getCreatedUserId()\n {\n return $this->created_user_id;\n }",
"public function getCreatedUserId()\n {\n return $this->createdUserId;\n }",
"public function getCreatedByUserId()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate a single unique id when generating ids using unixtime as the prefix, subtract the ID_OFFSET amount from the start time. gives us more breathing room for using serial numbers. unix_timestamp of 1000000000 == 2001/09/08 18:46:40 since the current time won't ever be that number, it is a safe point to go back to. ... | public function id(){
$prefix = bcsub( self::time(), self::ID_OFFSET );
if( $prefix < 1 ) throw new Exception('invalid serial generated', $prefix );
return $prefix . str_pad( mt_rand(0, 9999999999), 10, '0', STR_PAD_LEFT);
} | [
"public function generateID()\n {\n /**\n * Current Timestamp - 41 bits\n */\n $curr_timestamp = floor(microtime(true) * 1000);\n /**\n * Subtract custom epoch from current time\n */\n $curr_timestamp -= app()->config('app.initial_epoch', $this->initial... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of rows matching criteria, joining the related MemberRelatedByBackupCopilotId table | public static function doCountJoinMemberRelatedByBackupCopilotId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that... | [
"public function getJoinCount() {\n return $this->getCountByKey('nr','membership');\n }",
"public function countJoin(): int;",
"public function getBillingsCount(){\n return $this->manager->createQuery('SELECT COUNT(b) FROM App\\Entity\\Secondary\\Billing b')->getSingleScalarResult();\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ ===================== getx Gets a key from the cache, with state feedback. $ttl will be set to the expected remaining lifetime of the key, in seconds. $ttl will be set to `false` if the key did not exist. ===================== | public function getx( $key, &$ttl )
{
$key = (string) $key;
$got = $this->getRaw( $key );
if (!$got) {
return false;
}
$ttl = $got->e - microtime(true);
return $got->v;
} | [
"public function get($key, $ttl = 120);",
"function core_cache_Get($key)\n{\n $cache = coresys_cache_Initialize();\n RETURN $cache->get($key);\n}",
"abstract function getOrSet($key, $ttl, Callable $whatToCacheIfNotFound);",
"function get($key, $namespace = 'default')\n{\n\treturn (new cache)->sessGet($k... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate an array of courses that a teacher hasn't created a category for. | public function get_not_created_course_categories ($user_id)
{
$tbl_main_courses = Database :: get_main_table(TABLE_MAIN_COURSE);
$tbl_main_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
$tbl_grade_categories = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY);
... | [
"public function get_courses() {\n\t\tif ( ! isset( $this->courses ) ) {\n\t\t\t$course_ids = array_unique( array_merge( array_keys( $this->a->get_results() ), array_keys( $this->a->get_results() ) ) );\n\t\t\tsort( $course_ids );\n\n\t\t\t$missing = [];\n\t\t\t$this->courses = [];\n\t\t\tforeach ( $course_id... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get free bib on this month of current freelancer. | function fre_get_free_bid_current_month(){
global $user_ID;
$user_meta = 'bidded_on_'.date('m').date('Y');
$bidded_this_month = (int) get_user_meta($user_ID, $user_meta, true);
return (int) ae_get_option( 'fre_free_bid', 10 ) - $bidded_this_month;
} | [
"public function get_bib_number() {\n if ($this->_show == 'all') {\n return null;\n } else {\n return $this->_show;\n }\n }",
"private function retrieve_currentmonth()\n {\n }",
"function sp_get_this_month_link() {\n\t\tglobal $sp_ecp;\n\t\tif ( $sp_ecp->displaying == 'month' )... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a string to "camelCase" | public static function camelCase($str) {} | [
"public function testTo_camelCase()\n\t\t{\n\t\t// test with no capitalise first character and without special character\n\t\t$this->assertEquals(\"itIsGood\", $this->textClass->to_camelCase(\"It is good\"));\n\n\t\t// test with capitalise first character and without special character\n\t\t$this->assertEquals(\"ItI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This object is constructed with an IP address AS AN INTEGER Please note that 99% of the time this constructor will not be used in application code. What should be used is one of the create factory methods. | public function __construct($ipAddressInt, $originalHost = null)
{
if (!is_int($ipAddressInt)) {
throw new Exception('IPv4Address must be constructed with an integer.');
}
$this->address = $ipAddressInt;
if (!is_null($originalHost)) {
$this->originalHost = $... | [
"public function __construct($ip)\n {\n if ($ip instanceof \\GMP) {\n $this->ip = $ip;\n } elseif (is_int($ip)) {\n $this->ip = static::initGmpFromInt($ip);\n } elseif (is_float($ip) && $ip == floor($ip)) {\n $this->ip = static::initGmpfromFloat($ip);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the no results text | public function noResultsText($text)
{
$this->noResultsText = $text;
return $this;
} | [
"public function setNoResults(string $text): self\n {\n $this->_noResults = $text;\n\n return $this;\n }",
"public function showResultsForEmptySearch()\n {\n $this->showResultsForEmptySearch = true;\n }",
"function showNoResults(){\r\n\t\t\t$i=count($this->thecolumns);?>\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
fonction to draw the graph | function drawGraph($title_graph,$color_background,$color_axes,$title_axe_x,$title_axe_y,$color_graph,$type_graph,$color_text,$array){
if($type_graph == "line" || $type_graph == "bar"){
// the svg tag allows us to create graphic formats
echo '
<svg viewbox="0 2 500 370" st... | [
"private function drawPoints(){\n\t\t$this->graph->drawPlotGraph(\n\t\t\t$this->DataSet->GetData(),\n\t\t\t$this->DataSet->GetDataDescription(),3,2,\n\t\t\t$this->skin['PlotGraph']['R'],\n\t\t\t$this->skin['PlotGraph']['G'],\n\t\t\t$this->skin['PlotGraph']['B']\n\t\t);\n\t}",
"public function draw()\n\t{\n\t\t$th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Get all itemused count | function get_all_itemused_count()
{
$this->db->from('items');
return $this->db->count_all_results();
} | [
"public function getItemsCount();",
"public function get_num_items();",
"public function getItemsCount()\n {\n return $this->count(self::_ITEMS);\n }",
"public function itemCount()\n {\n $response = $this->getServiceLocator()->get('Omeka\\ApiManager')\n ->search('items', [\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test if mux files are properly converted to .ogg files | public function testDecodeSimple() {
$src = file_get_contents('test_samples/whoosh-3.mux');
$MuxConverter = new askuri\MuxConvert\MuxConvert($src);
$decoded = $MuxConverter->mux2ogg();
// file_put_contents('converted.ogg', $decoded);
$this->assertEquals(md5($dec... | [
"private function _isOggVorbis($fileName, $mime)\n {\n if ($mime == self::MIME_CONTENT_TYPE_OGG \n && strpos($this->_getFileType($fileName), 'Vorbis audio') !== false)\n {\n $this->_detectedMime = \"application/ogg\";\n return true;\n }\n }",
"public function testCodecTypeMustBeA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get Source Items Data without Default Source by SKU | protected function getSourceItems($sku)
{
$searchCriteriaBuilder = $this->searchCriteriaBuilderFactory->create();
$searchCriteriaBuilder->addFilter(SourceItemInterface::SKU, $sku);
$searchCriteria = $searchCriteriaBuilder->create();
$this->sourceItemRepository = $this->objectManage... | [
"private function getSourceItemList()\n {\n /** @var SearchCriteriaBuilder $searchCriteria */\n $searchCriteriaBuilder = $this->searchCriteriaBuilderFactory->create();\n\n $searchCriteriaBuilder->addFilter(\n SourceItemInterface::SKU,\n 'example_simple_for_source_item'\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create request for operation 'auEmployingEntityGetEmployingEntities' | public function auEmployingEntityGetEmployingEntitiesRequest($business_id, $query = null, $filter = null, $orderby = null, $top = null, $skip = null, string $contentType = self::contentTypes['auEmployingEntityGetEmployingEntities'][0])
{
// verify the required parameter 'business_id' is set
if ($bu... | [
"public function fetchOptInListSourcesCreatedByEmployeeRequest()\n {\n\n $resourcePath = '/v2/employee/optInListSources/all';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns data to be serialized on top of the QTI format. Made of the question's object minus fields that don't have a meaning in another system. Remove question's fields which don't have a meaning in another system. For example question id, user id, etc | protected function get_question_data($question){
//does not have a meaning in another system - ids, user ids, etc
unset($question->id);
unset($question->category);
unset($question->parent);
unset($question->createdby);
unset($question->modifiedby);
unset($question... | [
"public function getQuestionInformation()\n {\n $map = $this->_getMap();\n $oldfld = null;\n $result = array();\n\n foreach ($map as $name => $field) {\n if ($field['type'] == self::INTERNAL) {\n continue;\n }\n\n // \\MUtil_Echo::tra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function connects to database and retrives the ranked labels of the current labeling process | function getRankedLabels($mysqli){
$rankedLabels = array();
$query = " SELECT rLabel_label
FROM tbl_ranked_label
WHERE rLabel_document = ?
ORDER BY rLabel_accuracy DESC"; //Labels ordered by rank
$stmt = $mysqli->prepare($query);
$stmt->bind_param('i',$_SESSION['curDocID'] );
if($stmt->execute(... | [
"public function getAllLabels(){\n $query = \"SELECT * FROM labels ORDER BY name\";\n $result = $this->connection->query($query);\n $result = $result->fetchAll(PDO::FETCH_ASSOC);\n $labels = [];\n foreach($result as $data){\n $labels[] = new Label($data);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated from protobuf field string role_name = 1; | public function getRoleName()
{
return $this->role_name;
} | [
"public function getRoleName() {\n \treturn $this->role->role_name;\n }",
"public function setRoleName($roleName);",
"public function getRoleName()\n {\n return $this->roleName;\n }",
"public function getRoleByName($role_name = '');",
"public function getRoleName()\n {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the file information from the database for a given filename | public function getFileInfoByName($file) {
return $this->db->select($this->getTableName(), array('file' => $file));
} | [
"function get_file_info($file_id) {\n $lisdb = $this->load->database('lisdb',TRUE);\n $sql = \"SELECT * FROM $this->table WHERE file_id=$file_id\";\n $lisdb->where('file_id',$file_id);\n $records = $lisdb->get($this->table)->result_array();\n \n return $records[0];\n }",
"function get_file_info... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the action file. | function _loadAction($action_file, $action_class) {
if (!Fire_Loader::loadClass($action_class, $action_file, array(FIRE_APPLICATION_PATH, 'actions'), true)) {
Fire_Error::throwError(sprintf('Request action class "%s" was not found in file "%s". Either file can\'t be found or class in not present there.... | [
"private static function LoadActionFile($_module, $_action)\n\t{\n\t\t$f = self::$MODULES.\"/\".$_module.\".module/actions/\".$_action.\".action.php\";\n\t\tif(self::Uses($f))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t //throw new Exception(\"Action Load failed for file \".$f);\n\t\t}\n\t}",
"prote... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Format the events' data for frontend consumption | public function events($events)
{
$formatted = [];
foreach ($events as $event) {
$formatted[] = [
'id' => $event->id,
'title' => $event->title,
'start' => $event->start,
'end' => $event->end,
'type' => $event->type,
'creator_id' => $event->creator_... | [
"public function getFormatted(){\n $results = $this->results();\n\n $eventsList = array();\n foreach($results AS $eventData){\n $eventsList[] = (object) array(\n 'id' => $eventData['id'],\n 'title' => $eventData... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the latest version number of WordPress core. | public static function get_latest_core_version() {
$url = 'https://api.wordpress.org/core/version-check/1.7/';
$data = self::get_object( $url );
if ( false === $data ) {
return $data;
}
if ( isset( $data->offers ) ) {
return $data->offers[0]->version;
}
return false;
} | [
"private function get_latest_major_wordpress_version()\n {\n }",
"protected function get_installed_core_version() {\n\t\tglobal $wp_version;\n\n\t\treturn $wp_version;\n\t}",
"public function get_latest_version_number() {\n\n\t\t// Get current ClassicPress version, if stored.\n\t\t$version = get_t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the label HTML attributes. | public function getLabelAttributes()
{
return $this->labelAttributes;
} | [
"public function get_label_attributes() {\n\t\treturn array(\n\t\t\t'for' => $this->args['slug'],\n\t\t\t'class' => array(\n\t\t\t\t'formation-field-label',\n\t\t\t),\n\t\t);\n\t}",
"public function getLabelAttributes();",
"public function attributes()\n {\n $rules_labels = User::$labels;\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Animation Easing The easing function applied to the animation. The following options are available: 'linear' Constant speed. 'in' Ease in Start slow and speed up. 'out' Ease out Start fast and slow down. 'inAndOut' Ease in and out Start slow, speed up, then slow down. | public function animationEasing($easing = 'linear')
{
$values = array('linear', 'in', 'out', 'inAndOut');
if(in_array($easing, $values))
{
$this->easing = $easing;
return $this;
} else {
Gcharts::_set_error(get_class($this), 'Invalid animationEasi... | [
"public function setEasing($value) {\n\t\t$this->setParamCtrl(\"easing\", $value, array (\n\t\t\t\t\"linear\",\n\t\t\t\t\"swing\",\n\t\t\t\t\"easeInQuad\",\n\t\t\t\t\"easeOutQuad\",\n\t\t\t\t\"easeInOutQuad\",\n\t\t\t\t\"easeInCubic\",\n\t\t\t\t\"easeOutCubic\",\n\t\t\t\t\"easeInOutCubic\",\n\t\t\t\t\"easeInQuart\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This class uses the delegation pattern if it is not passed a string of the complete statement via the constructor. See See also the behaviours classes in this folder. This is all cut and pasted from the delegate row class. So much for design patterns removing the need for that sort of thing! abstract protected function... | protected function
set_behaviours()
{
/*
* Don't do anything by default.
*
* If you want to delegate, override this method.
*/
} | [
"protected function initInsertModeBehaviour() {\n $insertModeBehaviour = DeclarativeFactory::factory([\n [\n $this->insertMode === self::INSERT_MODE_PREPEND,\n Fun::fnReturnNew(PrependInsertModeBehaviour::class),\n ],\n Fun::fnReturnNew(AppendInsertModeBehaviour::class),\n ]);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether this site supports the default user picture feature. | protected function userPictureEnabled() {
$field_definitions = $this->entityFieldManager->getFieldDefinitions('user', 'user');
return isset($field_definitions['user_picture']);
} | [
"function supportDefaultAvatar()\n {\n\n // Check if a default avatar is defined\n $default = $this->getDefaultImageConfiguration();\n if (empty($default['defaultavatar'])) {\n return false;\n }\n\n // check if default avatar method is configured as one of the avatar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test list all posts of user true | public function test_get_list_posts_for_user_ok() {
$user_id = 18;
$posts = $this->_model->get_list_posts_for_user($user_id);
$this->assertNotEmpty($posts);
} | [
"public function testListUserPosts()\n {\n Sanctum::actingAs(InternalUser::factory()->create(), ['*']);\n\n // Cache users first bc of foreign keys\n $response = $this->get('api/user');\n\n $id = 3;\n\n $response = $this->get(\"api/user/{$id}/posts\");\n\n $response->ass... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create EoneoPay api manager instance. | public function create(string $baseUri, ?array $headers = null): EoneoPayApiManagerInterface; | [
"public function testCreate(): void\n {\n self::assertInstanceOf(\n EoneoPayApiManager::class,\n (new EoneoPayApiManagerFactory())->create('http://localhost')\n );\n }",
"private function getManager(?EntityInterface $entity = null): EoneoPayApiManagerInterface\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List of valid URLs that should not be changed when sanitized | function list_of_valid_URLs() {
return array(
array( 'http://example.com' ),
array( 'http://example.com/' ),
array( 'http://ozh@example.com/' ),
array( 'http://example.com/?@OMG' ), // #1890
array( 'http://ozh@example.com#BLAH' ),
array( 'h... | [
"public function invalidUrlProvider()\n {\n return [\n ['http://exa_mple.com'],\n ['archive.example.net'],\n ['irc://:@:/path'],\n ['http://..com'],\n ['/'],\n [null],\n [true],\n [false],\n [''],\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation apiUsersNotifyPendingPostAsyncWithHttpInfo Sends a reminder email to the emails provided on request. Should be used after creating a batch of documents. | public function apiUsersNotifyPendingPostAsyncWithHttpInfo($body = null)
{
$returnType = '';
$request = $this->apiUsersNotifyPendingPostRequest($body);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($resp... | [
"public function apiUsersNotifyPendingPost($body = null)\n {\n $this->apiUsersNotifyPendingPostWithHttpInfo($body);\n }",
"public function notificationsTestPostAsyncWithHttpInfo()\n {\n $returnType = '';\n $request = $this->notificationsTestPostRequest();\n\n return $this->cli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create request for operation 'updateWalletBalance' | protected function updateWalletBalanceRequest($user_id, $currency_code, $request = null)
{
// verify the required parameter 'user_id' is set
if ($user_id === null) {
throw new \InvalidArgumentException('Missing the required parameter $user_id when calling updateWalletBalance');
}... | [
"public function testSendWithRequestWalletBalance()\n {\n $service = $this->getStubForTest(file_get_contents(__DIR__ . '/TestAsset/Response/wallet_balance.txt'));\n\n $request = new Request\\WalletBalance();\n\n /* @var $response Response\\WalletBalance */\n $response = $service->send... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ action get video advertise | public function getVideoAds(){
$getads= VideoAdsModel::get();
return view('admincp.ads.video_ads_list')->with('videoAds',$getads);
} | [
"public static function getsearchvideo()\n\t{\n\t}",
"public function video()\r\n {\r\n // Get parameters\r\n $parameters = $this->getParameters();\r\n\r\n // Vendor?\r\n if (!isset($parameters['vendor'])) {\r\n $parameters['vendor'] = self::getVendorFromUrl($parameters);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Short description for 'writeNotesArea' Long description (if any) ... | public static function writeNotesArea($notes, $option, $type='', $edititem = 0, $addnew = 1)
{
$out ='';
$i = 0;
if (count($notes) > 0)
{
$out .= '<ul class="features">'."\n";
for ($i=0, $n=count($notes); $i < $n; $i++)
{
$note = $notes[$i];
$out .= ' <li>'."\n";
$out .= ' <span><span>'.... | [
"function showNotes() {\n\t\t$this->getRequest()->getApplication()->getResponse()\n\t\t\t->addResponse(\"\\nNotes:\")\n\t\t\t->addResponse(cliConsoleTools::drawSeparator())\n\t\t\t->addResponse(\n\t\t\t\twordwrap(\n\t\t\t\t\t'The order of commands is important. They are processed in the order they appear. Ensure '.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Get nota_dina by nds_no | function get_nota_dinas($nds_id)
{
return $this->db->get_where('tb_nds',array('nds_id'=>$nds_id))->row_array();
} | [
"function pegar_npdid( $ndpcod )\n\t{\n\t\tglobal $db;\n\t\t$sql = \"select ndpid from naturezadespesa where ndpcod = '\" . $ndpcod . \"'\";\n\t\treturn (integer) $db->pegaUm( $sql );\n\t}",
"function pegar_npdid( $ndpcod )\n\t\t{\n\t\t\tglobal $db;\n\t\t\t$sql = \"select ndpid from naturezadespesa where ndpcod =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Action returning a "201 Created" action result. | public function createdAction(): CreatedResult
{
return new CreatedResult('https://example.com/created');
} | [
"protected function createResponse201() {\n return $this->generateResponse('Created', Response::HTTP_CREATED);\n }",
"protected function returnCreated() {\n \t$this->log->debug(\"returnCreated\");\n \theader('HTTP/1.0 201 Created');\n }",
"public function assertSuccessCreate()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |