query stringlengths 7 5.25k | document stringlengths 15 1.06M | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Do select list for: Suppliers | function do_select_list_suppliers($aname, $avalue) {
# Dim some Vars:
global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;
# Set Query for select.
$query = 'SELECT s_id, s_company, s_name_first, s_name_last FROM '.$_DBCFG['suppliers'];
$query .= " WHERE s_email <> ''";
$query .= '... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listSuppliers($suppliers) {\n \n echo \"<input list=suppliers name=supplier>\";\n echo \"<datalist id=suppliers>\";\n \n // Loop through the suppliers and insert it as an option\n foreach ($suppliers as $supplier) {\n \n echo '<option value=\... | [
"0.7001589",
"0.6967833",
"0.6549886",
"0.65221965",
"0.6438195",
"0.6177406",
"0.61446697",
"0.6135953",
"0.60139185",
"0.5904682",
"0.5903299",
"0.5884091",
"0.5876469",
"0.5834687",
"0.58083737",
"0.5690744",
"0.56835616",
"0.56834364",
"0.5672376",
"0.56717235",
"0.567046... | 0.6991193 | 1 |
Do contact supplier form (contact site to user / supplier) | function do_contact_supplier_form($adata, $aerr_entry, $aret_flag=0) {
# Dim some Vars:
global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;
# Some HTML Strings (reduce text)
$_td_str_left_vtop = '<td class="TP1SML_NR" width="30%" valign="top">';
$_td_str_left = '<td class="TP1SML_NR" width="... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'adminis... | [
"0.7593498",
"0.67536765",
"0.66930586",
"0.6650795",
"0.6647961",
"0.6606672",
"0.65984386",
"0.6597711",
"0.6597711",
"0.6585526",
"0.65812707",
"0.6561387",
"0.65464",
"0.6530144",
"0.6525731",
"0.6525731",
"0.6525731",
"0.65136695",
"0.6496035",
"0.6495496",
"0.6487016",
... | 0.67099345 | 2 |
Do process contact sitetoclient email form (build, set email)) | function do_contact_supplier_email($adata, $aret_flag=0) {
# Dim Some Vars
global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;
# Check if we are sending to an additional email instead of the clients regular address
$pos = strpos(strtolower($adata['cc_s_id']), "alias");
if ($pos !== false) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->get... | [
"0.71681356",
"0.7068807",
"0.6997052",
"0.6954751",
"0.68942577",
"0.6832857",
"0.678746",
"0.67784697",
"0.67447096",
"0.674432",
"0.67353994",
"0.6725764",
"0.6599477",
"0.65114385",
"0.64558214",
"0.6451308",
"0.6417305",
"0.63735515",
"0.63710374",
"0.63659424",
"0.63409... | 0.6948429 | 4 |
Do process contact sitetoallsupplier email form (build, set email)) | function do_contact_supplier_email_all($adata, $aret_flag=0) {
# Dim Some Vars
global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;
$DesiredGroup = 0;
$DesiredServer = 0;
$DesiredAlias = 0;
$DesiredClient = 0;
$_ret_msg = '';
# Check if we are sending to an alias for a supplie... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function do_contact_supplier_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_s_id']), \"alias\");\n\t\tif... | [
"0.74613565",
"0.69296294",
"0.6916703",
"0.68594646",
"0.685184",
"0.68464124",
"0.6802828",
"0.6683505",
"0.66206557",
"0.6617653",
"0.6585493",
"0.6537599",
"0.6530022",
"0.65039086",
"0.64881516",
"0.64756554",
"0.6453216",
"0.6409332",
"0.6399342",
"0.63982904",
"0.63951... | 0.6948771 | 1 |
Get a particular value back from the config array | public static function get($index)
{
return self::getInstance()->dotNotation->get($index);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function getValue($name) {\r\n if (isset(self::$config[$name])) \r\n return self::$config[$name];\r\n else {\r\n return DB::getConfig($name);\r\n }\r\n }",
"public function get($key){\r\n\t\tif(key_exists($key, $this->config)){\r\n\t\t\treturn $this->config[$k... | [
"0.6943026",
"0.694205",
"0.6862496",
"0.6860072",
"0.6830532",
"0.6626121",
"0.66021854",
"0.6531748",
"0.65278685",
"0.65165955",
"0.64778274",
"0.64318395",
"0.64016867",
"0.63939774",
"0.63447976",
"0.6342585",
"0.63118196",
"0.6308476",
"0.63063693",
"0.62946975",
"0.629... | 0.0 | -1 |
function createOtherDirs Create other dirs | protected function createOtherDirs()
{
$this->createDir('Database', true);
$this->createDir('Database/Migrations', true);
$this->createDir('Database/Seeds', true);
$this->createDir('Filters', true);
$this->createDir('Language', true);
$this->createDir('Validation', tr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _createDirs()\n {\n $dir = $this->_class_dir;\n \n if (! file_exists($dir)) {\n $this->_outln('Creating app directory.');\n mkdir($dir, 0755, true);\n } else {\n $this->_outln('App directory exists.');\n }\n \n ... | [
"0.7325807",
"0.7241165",
"0.7164302",
"0.7084659",
"0.70713305",
"0.69681144",
"0.693752",
"0.680825",
"0.67742723",
"0.66478854",
"0.65808636",
"0.65667534",
"0.65366745",
"0.63754594",
"0.63202095",
"0.63202095",
"0.6280978",
"0.62744695",
"0.62731284",
"0.61980015",
"0.61... | 0.8486001 | 0 |
function createDir Create directory and set, if required, gitkeep to keep this in git. | protected function createDir($folder, $gitkeep = false) {
$dir = $this->module_folder . DIRECTORY_SEPARATOR . ucfirst($this->module_name) . DIRECTORY_SEPARATOR . $folder;
if (!is_dir($dir)) {
mkdir($dir, 0777, true);
if ($gitkeep) {
file_put_contents($dir... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createDirectory() {}",
"protected function createCacheDir()\n {\n if ( ! file_exists($this->cacheDir)) {\n mkdir($this->cacheDir);\n }\n }",
"protected function createDir()\n\t\t{\n\t\t\t//si no existe la carpeta la creamos\n\t\t\tif (!file_exists($this->ruta))... | [
"0.7047838",
"0.6582252",
"0.6573644",
"0.6570274",
"0.6452161",
"0.64423656",
"0.64297956",
"0.6390685",
"0.6366765",
"0.6334541",
"0.6316199",
"0.62994957",
"0.629752",
"0.62854064",
"0.62601566",
"0.6251981",
"0.6251825",
"0.6251328",
"0.6238196",
"0.62336993",
"0.6232054"... | 0.7137122 | 0 |
function updateAutoload Add a psr4 configuration to Config/Autoload.php file | protected function updateAutoload() {
$Autoload = new \Config\Autoload;
$psr4 = $Autoload->psr4;
if (isset($psr4[ucfirst($this->module_name)])){
return false;
}
$file = fopen(APPPATH . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'Autoload.php','r');
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setupAutoload()\n {\n static::$autoload or spl_autoload_register(\n $this->psr4LoaderFor(__NAMESPACE__, __DIR__),\n true,\n true\n );\n\n static::$autoload = true;\n }",
"public function RegisterAutoload()\n {\n spl_autoload_re... | [
"0.73756313",
"0.6944415",
"0.67408305",
"0.6566249",
"0.6505442",
"0.6478664",
"0.64503133",
"0.6431538",
"0.63965005",
"0.6395615",
"0.636389",
"0.62910134",
"0.6227085",
"0.62179303",
"0.61940163",
"0.6184938",
"0.6176568",
"0.6148622",
"0.6107102",
"0.6048718",
"0.6045221... | 0.7559754 | 0 |
Formulario para cargar calificaciones ./script/calificacion_form | public function main(){
$headers = (isset($_GET["headers"]))? $_GET["headers"] : "per_numero_documento, per_apellidos, per_nombres, per_genero, per_cuil, no_localidad, no_direccion, no_codigo_postal, per_email, per_telefono, no_escuela_fines_partido, no_escuela_fines_localidad, no_escuela_fines_institucion";
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ajax_calificaciones()\n\t\t{\n\t\t\tif($this->usuarios->autorizacion('calificaciones'))\n\t\t\t{\n\t\t\t\t$this->load->model('estudiantes');\n\t\t\t\t$rs_estudiantes = $this->estudiantes->get_datatables($this->session->userdata('idusuario'));\n\t\t\t\t$data = array();\n\t\t\t\tforeach ($rs_estudian... | [
"0.629634",
"0.627192",
"0.6253319",
"0.6233084",
"0.622759",
"0.62248236",
"0.6201681",
"0.61968374",
"0.61660457",
"0.61593366",
"0.61583173",
"0.61518496",
"0.614133",
"0.6132718",
"0.6119181",
"0.6080822",
"0.6077439",
"0.60661465",
"0.6063388",
"0.6050833",
"0.6040374",
... | 0.0 | -1 |
Run the database seeds. | public function run()
{
DB::table('transactions')->insert([
[ 'name' => 'Camden Bike Shop', 'amount' => -25, 'date' => '2021-08-18', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'INTEREST PAYMENT', 'amount' => 50, 'date' => '2020-09-12', 'created_at' => now(), 'updated... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact... | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.78414... | 0.0 | -1 |
Execute the console command. | public function handle(): void
{
$this->info('Seeding data into the database...');
$this->seed('MmCmsDatabaseSeeder');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() meth... | [
"0.6469971",
"0.64641356",
"0.6427384",
"0.6349752",
"0.63188183",
"0.62750113",
"0.6261585",
"0.6261214",
"0.6235854",
"0.6225116",
"0.6222161",
"0.6214144",
"0.6193531",
"0.6191337",
"0.6183868",
"0.61772275",
"0.61766857",
"0.6172786",
"0.6149171",
"0.6148903",
"0.61484134... | 0.0 | -1 |
Db storage constructor, need db adapter and db options | public function __construct(array $options = array())
{
if($options) {
$this->setOptions($options);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n\t$dibiConfig= dibi::getConnection()->getConfig();\n\t$dbname= isset($dibiConfig['dbname']) ? $dibiConfig['dbname'] : $dibiConfig['database'];\n\t$config= array(\n\t 'driver' => 'sqlite',\n\t 'profiler' => Environment::getConfig('perform')->storage_profiler,\n\t 'da... | [
"0.72114694",
"0.7198355",
"0.7116976",
"0.70444226",
"0.6896979",
"0.6836253",
"0.6789694",
"0.67853534",
"0.6778242",
"0.67767036",
"0.67073804",
"0.6691854",
"0.6653096",
"0.6649143",
"0.66291875",
"0.6624552",
"0.6612488",
"0.6609192",
"0.660856",
"0.6600792",
"0.65997016... | 0.0 | -1 |
Test if has datas with $uid key | public function has($uid)
{
$options = $this->getOptions();
$stmt = $this->adapter->query(
sprintf('SELECT %s FROM %s WHERE %s = "%s"',
$options['column_value'],
$options['table'],
$options['column_key'],
$uid
),... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasUid(){\n return $this->_has(2);\n }",
"private function _exists($uid){\n $select = $this->select()\n ->from($this->_name,array('uid'))\n ->where('uid = ?', $uid);\n $row = $this->fetchRow($select);\n\t\t\n // Zend_Debug::dump($select->__toStrin... | [
"0.7343773",
"0.71314883",
"0.70246536",
"0.68971515",
"0.68569654",
"0.6812673",
"0.67980164",
"0.65110916",
"0.64926165",
"0.6451642",
"0.6442927",
"0.64296246",
"0.64296246",
"0.64296246",
"0.64296246",
"0.64195865",
"0.640065",
"0.6399793",
"0.63959926",
"0.63454956",
"0.... | 0.72107875 | 1 |
Read datas with $uid key | public function read($uid)
{
$options = $this->getOptions();
$stmt = $this->adapter->query(
sprintf('SELECT %s FROM %s WHERE %s = "%s"',
$options['column_value'],
$options['table'],
$options['column_key'],
$uid
)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get($uid) {\n\t}",
"function interface_ar_usr_data_get($uid,$pid,$mid)\n\t\t\t{\n\t\t\t\t$sql = 'SELECT ar.*, usr.usr as name FROM '. $this->tbl_usr_ar.' AS ar, '.$this->tbl_usr.' AS usr WHERE ar.mid='.$mid.' AND ar.pid = '.$pid.' AND ar.uid=usr.id AND usr.id = '.$uid;\n\t\t\t\t$usr_ar = $this->DB->que... | [
"0.7250458",
"0.70012474",
"0.6920825",
"0.656371",
"0.65244985",
"0.64885044",
"0.64695424",
"0.6227775",
"0.62047243",
"0.61790687",
"0.6177889",
"0.61372477",
"0.6105012",
"0.6088389",
"0.60429174",
"0.6037344",
"0.60302305",
"0.60037416",
"0.5989605",
"0.59487116",
"0.594... | 0.7194681 | 1 |
Write datas on $uid key | public function write($uid, $mixed)
{
$options = $this->getOptions();
$this->adapter->query(
sprintf('INSERT INTO %s (%s, %s) VALUES ("%s", %s)',
$options['table'],
$options['column_key'],
$options['column_value'],
$uid,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function writeUID($uid)\n {\n $payload = '';\n $payload .= pack('V', $uid);\n\n $this->sendRequest(self::FUNCTION_WRITE_UID, $payload);\n }",
"public function setUid($uid);",
"function d4os_io_db_070_os_user_set_uid($uid, $uuid) {\n // check if key already exists\n $exists =... | [
"0.6845782",
"0.6705954",
"0.64606667",
"0.6413713",
"0.62279373",
"0.6209776",
"0.61816627",
"0.597941",
"0.5978474",
"0.5974801",
"0.59737754",
"0.577526",
"0.5748105",
"0.57348305",
"0.57336676",
"0.57095724",
"0.5698243",
"0.5688791",
"0.56834126",
"0.5663766",
"0.5663048... | 0.6268523 | 4 |
Clear datas with $uid key | public function clear($uid = null)
{
$options = $this->getOptions();
if($uid) {
if(!$this->has($uid)) {
return false;
}
$stmt = $this->adapter->query(
sprintf('DELETE FROM %s WHERE %s = "%s"',
$options['table'],
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearLv($uid)\n {\n $tbName = $this->getTableName($uid);\n $n = $uid % 10;\n $sql = \"DELETE FROM $tbName WHERE uid=:uid AND bid=60131 \";\n $this->_wdb->query($sql, array('uid' => $uid));\n }",
"public function unsetUid(): void\n {\n $this->uid = [];\n... | [
"0.73308444",
"0.7052343",
"0.664111",
"0.6588307",
"0.6502367",
"0.64626735",
"0.63634354",
"0.6318861",
"0.63055134",
"0.62844545",
"0.62447685",
"0.62361693",
"0.61989176",
"0.61975455",
"0.6171582",
"0.6164001",
"0.61329347",
"0.61133933",
"0.6100871",
"0.60891646",
"0.60... | 0.6654336 | 2 |
Get max bloc allow | public function canAllowBlocsMemory($numBloc)
{
return true; // no limitation
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMaxValue();",
"public function getMaxValue();",
"public function getMaxLimit()\n {\n return $this->max_limit;\n }",
"function getMaxValue() { return $this->readMaxValue(); }",
"function getMaxValue() { return $this->readMaxValue(); }",
"function getMax() ... | [
"0.70295036",
"0.70295036",
"0.694243",
"0.6926703",
"0.691577",
"0.6818449",
"0.67811376",
"0.6648444",
"0.66329193",
"0.66284513",
"0.66281825",
"0.66281825",
"0.6586082",
"0.655348",
"0.6542635",
"0.6534614",
"0.65255123",
"0.65134484",
"0.64656824",
"0.646541",
"0.6460448... | 0.0 | -1 |
Get the adapter options | protected function getOptions()
{
if(null === $this->options) {
throw new Exception\InvalidArgumentException('Db adapter options must be defined.');
}
return $this->options;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOptions() {}",
"public function getOptions() {}",
"public function getOptions() {}",
"protected function getOptions() {}",
"protected function getOptions() {}",
"protected function getOptions() {}",
"abstract public function getOptions();",
"public function getOptions()\r\n ... | [
"0.77137345",
"0.77137345",
"0.7713057",
"0.76856977",
"0.7685208",
"0.7685208",
"0.76299685",
"0.7590041",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",... | 0.7474843 | 25 |
Set the db adapter options | protected function setOptions(array $options)
{
if(
!array_key_exists('adapter', $options) ||
!array_key_exists('table', $options) ||
!array_key_exists('column_key', $options) ||
!array_key_exists('column_value', $options)
) {
throw new Exc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setOptions(array $options): DbConnectionConfigInterface;",
"protected function _setupDatabaseAdapter()\n {\n $zl = Zend_Registry::get('Zend_Locale');\n $this->_db = Zend_Registry::get('db4');\n\n parent::_setupDatabaseAdapter();\n }",
"public function getDbAdapter();... | [
"0.6705718",
"0.6310306",
"0.6225778",
"0.5997318",
"0.5966678",
"0.59628737",
"0.5923485",
"0.5908635",
"0.5891502",
"0.58901894",
"0.58620524",
"0.5860792",
"0.5835917",
"0.58231765",
"0.58178616",
"0.5810769",
"0.58008796",
"0.57981116",
"0.5790879",
"0.57748616",
"0.57653... | 0.68069464 | 0 |
Content we can convert from this software. | public static function canConvert()
{
return array(
'convert_forums_forums' => array(
'table' => 'forum',
'where' => NULL,
),
'convert_forums_topics' => array(
'table' => 'thread',
'where' => NULL,
),
'convert_forums_posts' => array(
'table' => 'post',
'where' => NULL,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract function getContent();",
"public function getContentEncoding();",
"abstract function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function ... | [
"0.6901831",
"0.6815364",
"0.6813327",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"... | 0.0 | -1 |
Can we convert passwords from this software. | public static function loginEnabled()
{
return FALSE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function necesitaCambiarPassword();",
"public function getSecuredPassword();",
"public function getPW() {}",
"protected function getConfiguredPassword() {}",
"public function isPassword() {\n\t\t$pwArray = array(\n\t\t\t'password',\n\t\t\t'senha',\n\t\t\t'lozinka',\n\t\t\t'heslotajne',\n\t\t\t'helsl... | [
"0.69111556",
"0.6900377",
"0.67965615",
"0.6785959",
"0.6640222",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6629538",
"0.6628975",
"0.66017205",
"0.66007954",
"0.6597756",
"0.6576423",
"0.6566525",
"0.6563496",
"0.6542723",... | 0.0 | -1 |
Count Source Rows for a specific step | public function countRows( $table, $where=NULL )
{
switch( $table )
{
case 'forum':
return count( $this->fetchForums() );
break;
case 'thread':
return parent::countRows( 'node', array( "(contenttypeid=? OR contenttypeid=?) AND " . \IPS\Db::i()->in( 'parentid', array_keys( $this->fetchForums()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getStepStatCounts();",
"protected function getIterationsCount()\n {\n return count($this->readerGroups->getGroup('source_documents'));\n }",
"function RowCount() {}",
"public function count()\n {\n return count($this->steps);\n }",
"public function count()\n\t\t{\n... | [
"0.67793727",
"0.6328202",
"0.62837505",
"0.62521315",
"0.6177195",
"0.61550313",
"0.6105828",
"0.5960887",
"0.5906411",
"0.59016615",
"0.5882152",
"0.58612525",
"0.5855269",
"0.5851821",
"0.5851821",
"0.5844421",
"0.5821231",
"0.5789846",
"0.5775463",
"0.576414",
"0.57624054... | 0.0 | -1 |
Can we convert settings? | public static function canConvertSettings()
{
return FALSE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _convertSettings(&$settings)\n {\n foreach ($settings as $item => $val) {\n\n if (substr($item, 0, 6) == 'allow_') {\n $settings[$item] = ($val == 0) ? false : true;\n }\n }\n\n $settings['exclude'] = explode(',', $settings['exclude']);\... | [
"0.7237023",
"0.62781686",
"0.6194147",
"0.6181555",
"0.5971173",
"0.59524965",
"0.59232116",
"0.5901699",
"0.58868",
"0.5862349",
"0.5831167",
"0.5825477",
"0.5814863",
"0.57985187",
"0.5780242",
"0.57667965",
"0.5748498",
"0.57260287",
"0.5725605",
"0.57029235",
"0.5691813"... | 0.79969263 | 1 |
Finish Adds everything it needs to the queues and clears data store | public function finish()
{
/* @todo this needs to be a queue task */
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'forums_forums' ), 'IPS\forums\Forum' ) AS $forum )
{
$forum->setLastComment();
$forum->queued_topics = \IPS\Db::i()->select( 'COUNT(*)', 'forums_topics', array(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function persistQueuedDatabaseTransactions()\n {\n foreach ($this->queue as $key => $closure) {\n $closure($this);\n unset($this->queue[$key]);\n }\n }",
"private function finalize() {\n $this->_log_queries[] = $this->_active_query;\n $this->_active_... | [
"0.6576221",
"0.6387644",
"0.63784474",
"0.6209239",
"0.61493057",
"0.6130219",
"0.6126361",
"0.6118118",
"0.6072822",
"0.60596037",
"0.6039103",
"0.60250837",
"0.60042113",
"0.59973913",
"0.5979929",
"0.59755963",
"0.5927025",
"0.5924329",
"0.59145945",
"0.5900669",
"0.58879... | 0.63428426 | 3 |
Returns a block of text, or a language string, that explains what the admin must do to start this conversion | public static function getPreConversionInformation()
{
return NULL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_default_additional_content()\n {\n\n return __('Hope to see you back soon.', 'subscriptio');\n }",
"public function get_default_additional_content()\n {\n\n return __('Thanks for reading.', 'subscriptio');\n }",
"public function getFromLanguage(): string;",
"publ... | [
"0.6035981",
"0.60063654",
"0.600208",
"0.5985686",
"0.5969547",
"0.5969547",
"0.5955295",
"0.5939409",
"0.5937101",
"0.5904537",
"0.58785474",
"0.5861015",
"0.5791256",
"0.5782372",
"0.5731492",
"0.57226825",
"0.5713832",
"0.57113844",
"0.57113844",
"0.57113844",
"0.5700249"... | 0.0 | -1 |
List of conversion methods that require additional information | public static function checkConf()
{
return array( 'convert_attachments' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getSupportedMethods(): array {}",
"public static function getAvailableConverters()\n {\n return [\n 'cwebp', 'vips', 'imagick', 'gmagick', 'imagemagick', 'graphicsmagick', 'wpc', 'ewww', 'gd'\n ];\n }",
"protected static function getNonEnumValueMethods(){\n... | [
"0.6111942",
"0.5987856",
"0.59049684",
"0.5877206",
"0.578705",
"0.5773593",
"0.5754583",
"0.5752932",
"0.57480043",
"0.5718193",
"0.5652733",
"0.5652733",
"0.5652733",
"0.55828595",
"0.5549828",
"0.5540852",
"0.55265826",
"0.55206674",
"0.5460336",
"0.54340875",
"0.5399659"... | 0.0 | -1 |
Helper method to retrieve forums from nodes | protected function fetchForums()
{
$forums = array();
foreach( $this->db->select( '*', 'node', array( "node.nodeid<>2 AND closure.parent=? AND node.contenttypeid=?", $this->fetchType( 'Thread' ), $this->fetchType( 'Channel' ) ) )->join( 'closure', "closure.child = node.nodeid" ) AS $node )
{
$forums[$node['n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_forum_list() {\n return $this->call('get_forum_list');\n }",
"public function forumNode()\n {\n if (!$this->forumNode)\n {\n $this->forumNode = eZContentObjectTreeNode::fetch(\n $this->attribute('node_id'),\n $this->languageCode()\n ... | [
"0.6809902",
"0.64836293",
"0.62971747",
"0.62333465",
"0.6196451",
"0.6077108",
"0.6073764",
"0.6012346",
"0.5999543",
"0.59736747",
"0.59313697",
"0.5922558",
"0.59117043",
"0.5878383",
"0.5867455",
"0.5851826",
"0.5819603",
"0.57968575",
"0.5795073",
"0.57663786",
"0.57451... | 0.7513412 | 0 |
Helper method to retrieve content type ids | protected function fetchType( $type )
{
if ( count( $this->typesCache ) )
{
return $this->typesCache[$type];
}
else
{
foreach( $this->db->select( '*', 'contenttype' ) AS $contenttype )
{
$this->typesCache[$contenttype['class']] = $contenttype['contenttypeid'];
}
return $this->typesCache[$... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function get_type_ids($type) {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->get_col($wpdb->prepare(\"SELECT `ID` FROM {$wpdb->posts} WHERE `post_type` = 'attachment' AND `post_status` = 'inherit' AND `post_mime_type` LIKE '%s/%%'\", $type));\n\t}",
"public function idTypes();",
"function get_custom_fied_ids($... | [
"0.75671804",
"0.7402438",
"0.6798846",
"0.67205864",
"0.6578987",
"0.6527094",
"0.6400643",
"0.6381729",
"0.6357597",
"0.63409555",
"0.63313276",
"0.624094",
"0.6232733",
"0.62174785",
"0.6186374",
"0.618309",
"0.6145946",
"0.6134522",
"0.61297584",
"0.6114548",
"0.6091464",... | 0.0 | -1 |
Validate an email address. Provide email address (raw input) Returns true if the email address has the email address format and the domain exists. | function validEmail($email)
{
$isValid = true;
$atIndex = strrpos($email, "@");
if (is_bool($atIndex) && !$atIndex)
{
$isValid = false;
}
else
{
$domain = substr($email, $atIndex+1);
$local = substr($email, 0, $atIndex);
$localLen = strlen($local);
$domainLen = strlen(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ValidateEmail( $email ) {\n // Check if address is valid\n if( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) )\n return false;\n\n // Break up into parts\n $parts = explode( '@', $email );\n $user = $parts[0];\n $domain = $parts[1];\n\n // Ch... | [
"0.8379823",
"0.8265428",
"0.8246746",
"0.81822044",
"0.81489635",
"0.80396426",
"0.8012912",
"0.8012912",
"0.7898054",
"0.7897991",
"0.78524727",
"0.78385776",
"0.7829738",
"0.7825873",
"0.7825873",
"0.7795482",
"0.7752686",
"0.775141",
"0.7721953",
"0.77163994",
"0.76923156... | 0.7510591 | 40 |
verify and validate the data | protected function import_data_into_interface_common($upload_path, $csv_filename)
{
$error_code = self::NO_ERROR;
$batch_id = 0;
$number_of_successes = 0;
$error_message = "";
$result = true;
$uploadedFile = $upload_path . "/" . $csv_filename;
$data = $this->get_import_service()->get_file_data(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function validateData();",
"function isDataValid() \n {\n return true;\n }",
"abstract public function validateData($data);",
"public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->che... | [
"0.8483991",
"0.7914387",
"0.7884471",
"0.76477545",
"0.76477545",
"0.7598221",
"0.7595752",
"0.75258005",
"0.7514903",
"0.7446818",
"0.7404333",
"0.7402551",
"0.73825496",
"0.7317151",
"0.71496665",
"0.71496665",
"0.7120719",
"0.7120067",
"0.7119345",
"0.7119345",
"0.7103914... | 0.0 | -1 |
Run the database seeds. | public function run()
{
$faker = Faker\Factory::create();
$user = new User();
// Get User ids with roles (those can create posts)
$userIds = $user->select('id')->has('roles')->get();
// Set default image figure for body
$bodyImage = Image::make(database_path().'/see... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact... | [
"0.80130625",
"0.79795986",
"0.79764974",
"0.79524934",
"0.7950615",
"0.79505694",
"0.7944086",
"0.7941758",
"0.7938509",
"0.79364634",
"0.79335415",
"0.7891555",
"0.78802574",
"0.78790486",
"0.7878107",
"0.7875447",
"0.78703815",
"0.7869534",
"0.7851931",
"0.7850407",
"0.784... | 0.0 | -1 |
COPYRIGHT NOTICE WARNING T H I S F I L E I S N O T O P E N S O U R C E | function kanbanAddPrinc($line) {
$addInPrinc = '';
$kanbanFullWidthElement = Parameter::getUserParameter ( "kanbanFullWidthElement" );
if ($kanbanFullWidthElement == "on") {
if ($line ['idstatus']) {
$addInPrinc .= '<div style="float:left;margin-bottom:1px;margin-left:3px;margin-top:2px;height:21px;max-hei... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_copyright()\n {\n }",
"public function get_copyright()\n {\n }",
"public function get_copyright()\n {\n }",
"private function __() {\n }",
"public function Copyright(){\n\t\treturn 'For The Win forums version 2.5 <br /> copyright &cop... | [
"0.63560486",
"0.63549024",
"0.63543814",
"0.6328542",
"0.6294197",
"0.62579674",
"0.6203532",
"0.60756546",
"0.59848833",
"0.59504896",
"0.5890701",
"0.5823102",
"0.5812476",
"0.5807781",
"0.57602096",
"0.5754393",
"0.5754393",
"0.5754393",
"0.5736536",
"0.5736536",
"0.57349... | 0.0 | -1 |
This function for V5.5.2 compatibility, as equivalent does not exist yet in GeneralWork class | function kanbanImputationFormatter($value) {
return Work::displayImputation ( $value ) . ' ' . Work::displayShortImputationUnit ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function work()\n {\n }",
"public function wasWorked();",
"public function work(): void;",
"public function work()\n {\n }",
"abstract protected function requiredOperations1(): void;",
"protected function fixSelf() {}",
"protected function fixSelf() {}",
"public function temporality();",
... | [
"0.61080694",
"0.58035576",
"0.5777616",
"0.57037896",
"0.55069625",
"0.54509974",
"0.54509974",
"0.5315362",
"0.52079844",
"0.51580524",
"0.51063734",
"0.51063734",
"0.5024626",
"0.5023106",
"0.5022807",
"0.5005247",
"0.49961483",
"0.4989861",
"0.4989861",
"0.49691188",
"0.4... | 0.0 | -1 |
Create a new component instance. | public function __construct(?string $headVariant = null)
{
$this->headVariant = $headVariant;
if ($this->headVariant) {
$this->attrs["class"][] = "thead-$this->headVariant";
}
$this->attrs["class"] = implode(" ", $this->attrs["class"]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createComponent($name) {\n\t\trequire_once(\"component/\".$name.\"/\".$name.\".inc\");\n\t\t$c = new $name($name);\n\t\t$this->components[$name] = &$c;\n\t\t$this->{$name} = &$c;\n\t}",
"function componentBuilder() { $this->__construct(); }",
"public function make()\n {\n if (self::$... | [
"0.7047143",
"0.6538766",
"0.64724386",
"0.6461015",
"0.64434475",
"0.6316547",
"0.6294157",
"0.62726563",
"0.61914504",
"0.61295044",
"0.6091929",
"0.6052415",
"0.6052415",
"0.6052415",
"0.6048259",
"0.60458875",
"0.6039361",
"0.60253227",
"0.59891963",
"0.5977575",
"0.59761... | 0.0 | -1 |
Get the view / contents that represent the component. | public function render()
{
return <<<'blade'
<thead {{$attributes->merge($attrs)}}>{{$slot}}</thead>
blade;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getViewComponent();",
"public function getView() {\n\t\treturn $this -> st_view;\n\t}",
"public function getView() {\n\t\treturn $this->view;\n\t}",
"public function getView() {\n\t\treturn $this->view;\n\t}",
"public function getView()\r\n {\r\n return $this->_controller->getView... | [
"0.7672361",
"0.7262671",
"0.72326016",
"0.72326016",
"0.7229296",
"0.7196396",
"0.71937174",
"0.7186604",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71578777",
"0.71518224",
"0.71512854",
"0.71450925",
"... | 0.0 | -1 |
Displays a particular model. | public function run($id)
{
$this->controller=$this->getController();
$criteria =new CDbCriteria;
$criteria->condition="pet.id=:id";
$criteria->params=array(':id'=>$id);
$criteria->alias='pet';
$criteria->with=array('owner');
$model=$this->loadModel($criteria);
$this->controller->render('view',array(
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n... | [
"0.75535834",
"0.75532603",
"0.754276",
"0.7540083",
"0.74330944",
"0.74330944",
"0.74330944",
"0.74330944",
"0.74330944",
"0.73395175",
"0.71608204",
"0.7132329",
"0.7127545",
"0.7061625",
"0.7022342",
"0.6983588",
"0.6975484",
"0.69582117",
"0.69456965",
"0.6943839",
"0.694... | 0.0 | -1 |
Returns the data model based on the primary key given in the GET variable. If the data model is not found, an HTTP exception will be raised. | public function loadModel($criteria)
{
$model=Pet::model()->find($criteria);
if($model===null)
throw new CHttpException(404,'The requested page does not exist.');
return $model;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Residencebaseinfo::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model... | [
"0.6996477",
"0.6963233",
"0.6856193",
"0.6704138",
"0.6648857",
"0.6641502",
"0.6635867",
"0.6626205",
"0.6623007",
"0.66175824",
"0.66135395",
"0.6612504",
"0.6558181",
"0.65574646",
"0.6542536",
"0.6541095",
"0.6534296",
"0.65331244",
"0.6527437",
"0.65267116",
"0.6522443"... | 0.0 | -1 |
Created by PhpStorm. User: sun rise Date: 4/8/2017 Time: 4:14 PM | function printChild($data)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function __() {\n }",
"final private function __construct(){\r\r\n\t}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"public function ex4()\n {\n }",
"public function helper()\n\t{\n\t\n\t}",... | [
"0.5996813",
"0.5887465",
"0.58478874",
"0.58478874",
"0.58478874",
"0.57580656",
"0.57305074",
"0.5726819",
"0.5726819",
"0.571392",
"0.57125854",
"0.57110804",
"0.57110804",
"0.569957",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943... | 0.0 | -1 |
CASO 1 LLEGA TODO VACIO | public function index()
{
if($_POST['usuario'] == "" && $_POST['pass'] == ""){
$respuesta = array("error" => "Datos_vacio ");
}
// CASO 2 LLEGA EL CORREO Y NO EL SERIAL
if(($_POST['usuario'] != "") && ($_POST['pass'] == "")){
$correo_usuario = array("correo_contacto" => $_POST['usuario'],'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = ... | [
"0.64588934",
"0.612671",
"0.6120627",
"0.5746031",
"0.5745488",
"0.5739498",
"0.5706695",
"0.56347805",
"0.5622952",
"0.56156737",
"0.56092125",
"0.5597714",
"0.5597302",
"0.5587932",
"0.5587932",
"0.5587777",
"0.5579265",
"0.55693555",
"0.55442125",
"0.5539298",
"0.5539298"... | 0.0 | -1 |
Constructs a new instance | public function __construct($host = '127.0.0.1', $port = 6082, $secret = null) {
$this->host = $host;
$this->port = $port;
$this->secret = $secret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function newInstance();",
"public function newInstance();",
"public function construct()\n\t\t{\n\t\t}",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public function construct() {\n\n }",
"public function new()\n\t{\n\t\t... | [
"0.80442375",
"0.80442375",
"0.78951794",
"0.7818187",
"0.7818187",
"0.7818187",
"0.77969486",
"0.77689713",
"0.77689713",
"0.77305233",
"0.7646569",
"0.7529315",
"0.745894",
"0.745894",
"0.73760384",
"0.73760384",
"0.7373616",
"0.73435026",
"0.733217",
"0.7322414",
"0.732112... | 0.0 | -1 |
Gets a string representation of this server | public function __toString() {
return $this->host . ':' . $this->port;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function GetServerString() : STRING\r\n {\r\n switch(DRIVER)\r\n {\r\n case 'MySQL':\r\n return('mysql:host=' . HOST . ';dbname=' . DATABASE_NAME);\r\n default:\r\n return('mysql:host=' . HOST . ';dbname=' . DATABASE_NAME);\r\n }\r... | [
"0.7205736",
"0.71613693",
"0.7022998",
"0.69365484",
"0.6842634",
"0.665858",
"0.6634126",
"0.66328466",
"0.6573421",
"0.6537226",
"0.6498204",
"0.6468685",
"0.6450126",
"0.6450028",
"0.6421601",
"0.6346564",
"0.634359",
"0.63338494",
"0.63338494",
"0.63306314",
"0.6305399",... | 0.7609525 | 0 |
Sets the log instance | public function setLog(Log $log) {
$this->log = $log;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setLogInstance(): void\n {\n $this->log_instance = QueryLogger::initializeQueryChainLog($this);\n }",
"private function _setLog($log)\n {\n $this->log = $log;\n return $this;\n }",
"protected static function configureInstance()\n\t{\n\t\t$logger = new Logger('De... | [
"0.8322471",
"0.7328089",
"0.72294253",
"0.7228605",
"0.7155914",
"0.7099329",
"0.6887902",
"0.68365806",
"0.67171067",
"0.6703447",
"0.653512",
"0.64418817",
"0.64296293",
"0.6427446",
"0.64124346",
"0.6409742",
"0.63905984",
"0.6385901",
"0.63822573",
"0.63462514",
"0.62814... | 0.74368733 | 1 |
Gets the host of this server | public function getHost() {
return $this->host;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetHost() {\n\n return $this->Host;\n }",
"public function getHost()\n {\n return isset($this->host) ? $this->host : '';\n }",
"public function getHost()\n {\n return $this->get('host');\n }",
"public static function getHost()\n {\n return self::$... | [
"0.84564376",
"0.84290963",
"0.84108114",
"0.8401438",
"0.83981484",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8369133",
"0.83463085",
"0.8334215",
"0.8332339",
"0.829366",
"0.82904583"... | 0.8390302 | 6 |
Gets the port of this server | public function getPort() {
return $this->port;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getPort()\n {\n return $_SERVER['SERVER_PORT'];\n }",
"public function GetPort() {\n\n return intval($this->GetRequestContext()->SERVER['SERVER_PORT']);\n }",
"function getServerPort() {\n\t\treturn $this->getParam(self::PARAM_SERVER_PORT);\n\t}",
"public functio... | [
"0.8756641",
"0.8683198",
"0.864136",
"0.85305524",
"0.8361618",
"0.83243454",
"0.82971483",
"0.82971483",
"0.8256156",
"0.82558614",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0... | 0.82372993 | 22 |
Sets the secret to authenticate with this server | public function setSecret($secret) {
$this->secret = $secret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setSecret($secret);",
"public function setSecret($secret);",
"public function setSecret($secret)\n {\n $this->secret = $secret;\n }",
"public function setSecret($secret)\n {\n $this->secret = $secret;\n }",
"public function setSecret($secret)\n {\n $this-... | [
"0.7609315",
"0.7609315",
"0.7529852",
"0.7529852",
"0.7529852",
"0.75132215",
"0.7421914",
"0.7283331",
"0.7230551",
"0.7011043",
"0.69321656",
"0.6857086",
"0.6857086",
"0.6749136",
"0.6720814",
"0.67170984",
"0.6714032",
"0.66639006",
"0.66427225",
"0.65793604",
"0.6547656... | 0.75497496 | 2 |
Gets the secret for server authentication | public function getSecret() {
return $this->secret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getClientSecret(): string\n {\n return (string) data_get($this->args, 'credentials.secret');\n }",
"public function get_secret() {\r\n return $this->secret;\r\n }",
"public function getSecret();",
"public function getSecret();",
"public function getSecret();",... | [
"0.80043083",
"0.780026",
"0.7757215",
"0.7757215",
"0.7757215",
"0.7757215",
"0.7757215",
"0.7711304",
"0.77110445",
"0.77043086",
"0.7687669",
"0.7685214",
"0.7685214",
"0.7685214",
"0.7685214",
"0.7684224",
"0.7668504",
"0.7668504",
"0.7634467",
"0.7596546",
"0.75962317",
... | 0.76061445 | 19 |
Gets whether the connection is active | public function isConnected() {
return $this->handle !== null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _isActive() {\n\t\treturn connection_status() === CONNECTION_NORMAL && !connection_aborted();\n\t}",
"public function isAlive() {\n\t\treturn (($this->active !== null) && $this->connections [$this->active]->isAlive ());\n\t}",
"public function hasConnection()\n {\n return $this->co... | [
"0.8236316",
"0.8038428",
"0.7936772",
"0.7906968",
"0.789573",
"0.789573",
"0.78881145",
"0.7851009",
"0.7766805",
"0.7753309",
"0.77489394",
"0.77210724",
"0.76745516",
"0.7654008",
"0.76388013",
"0.76293063",
"0.76172996",
"0.756997",
"0.7561609",
"0.7558891",
"0.75433534"... | 0.7367564 | 31 |
Connects to the varnish server | public function connect($timeout = 5) {
if ($this->isConnected()) {
return true;
}
$this->handle = @fsockopen($this->host, $this->port, $errorNumber, $errorMessage, $timeout);
if (!is_resource($this->handle)) {
$this->handle = null;
throw new Varnish... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();"... | [
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.5793704",
"0.5756517",
"0.56693065",
"0.56374556",
"0.55457085",
"0.55101967",
"0.55098546",
"0.55064243",
"0.5502673",
... | 0.5321499 | 38 |
Disconnects from the Varnish server | public function disconnect() {
if ($this->isConnected()) {
fclose($this->handle);
$this->handle = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect(): void;... | [
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.7341613",
"0.7239714",
"0.71829635",
"0.7096264",
"0.7093106",
"0.70779693",
"0.70310307",
"0.70310307",
"0.70310307",
"0.7028581",
"0.6955345",
"0.6946047",
"0.... | 0.0 | -1 |
Reads from the server connection | protected function read(&$statusCode = null) {
// get bytes until we have either a response code and message length or
// an end of file.
// code should be on first line, so we should get it in one chunk
while (!feof($this->handle)) {
$response = fgets($this->handle, 1024);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function readSocket()\n {\n $output = socket_read($this->socket, 2048);\n\n echo $output;\n socket_close($this->socket);\n }",
"public function getReadConnection() {}",
"public function read() {\n\t\tif ($this->active === null) {\n\t\t\tthrow new Swift_ConnectionException ( \"... | [
"0.744312",
"0.7302854",
"0.6833405",
"0.67738444",
"0.66387784",
"0.6620374",
"0.659791",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.64708674",
"0.... | 0.0 | -1 |
Writes to the server connection | protected function write($payload) {
if (!$payload) {
throw new VarnishException('Could not write to ' . $this->host . ' on port ' . $this->port . ': Empty payload provided');
}
$bytes = fwrite($this->handle, $payload);
if ($bytes !== strlen($payload)) {
throw ne... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function onWriteConnection();",
"public function writeSocket()\n {\n socket_write($this->socket, $this->stringWithEquation, strlen($this->stringWithEquation));\n }",
"protected function _write($data)\n {\n $this->_connect();\n\n fwrite($this->_socket, $data);\n ... | [
"0.7172523",
"0.71028346",
"0.6971355",
"0.69615334",
"0.69500494",
"0.68719786",
"0.6867148",
"0.6867148",
"0.67716634",
"0.6768597",
"0.66907245",
"0.6594412",
"0.6541986",
"0.6494172",
"0.64801955",
"0.64113516",
"0.63798153",
"0.6368996",
"0.6256829",
"0.6230924",
"0.6151... | 0.0 | -1 |
Writes a command to the server and reads the response | public function execute($command, &$statusCode = null, $requiredStatusCode = 200) {
if (!$this->isConnected()) {
$this->connect();
}
if ($this->log) {
$this->log->logDebug('Executing command on ' . $this->host . ':' . $this->port, $command, self::LOG_SOURCE);
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sendCommand($cmd) \n { \n \n $result = $this->write($cmd . \"\\r\\n\",strlen($cmd) + 2);\n if ($this->isError($result)) {\n return $result;\n }\n $response = $this->getReply();\n \n return $response;\n }",
"protected function _execute($re... | [
"0.71361345",
"0.6177091",
"0.616361",
"0.6146916",
"0.6042675",
"0.59985787",
"0.5965247",
"0.5947134",
"0.5870076",
"0.58602506",
"0.58569264",
"0.58536714",
"0.5832176",
"0.5819279",
"0.5791847",
"0.57824254",
"0.57355845",
"0.5688199",
"0.5683803",
"0.56774294",
"0.566511... | 0.0 | -1 |
Executes the quit command | public function quit(){
try {
$this->execute('quit', $statusCode, 500);
} catch (VarnishException $exception) {
}
$this->disconnect();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function quit();",
"protected function quit() {\n echo $this->promptMessage('bye') . PHP_EOL . PHP_EOL;\n exit;\n }",
"public function quit()\n {\n $this->sendServerCommand(\"quit\");\n }",
"function quit($exit_message = \"\")\n\t{\n\t\t$th... | [
"0.8214022",
"0.78064734",
"0.76865846",
"0.7510211",
"0.7143935",
"0.71009576",
"0.66810936",
"0.66387165",
"0.6486042",
"0.6418267",
"0.63395685",
"0.6163998",
"0.61318755",
"0.6090415",
"0.60793394",
"0.60793394",
"0.6031764",
"0.59552675",
"0.59497416",
"0.59443575",
"0.5... | 0.6993428 | 6 |
Checks if the cache process is running | public function isRunning() {
try {
$response = $this->execute('status');
if (strpos($response, 'Child in state ') !== 0) {
return false;
}
$state = trim(substr($response, 15));
return $state === 'running';
} catch (VarnishExc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function pmxc_checkCacheStatus()\n\t{\n\t\tglobal $pmxCacheFunc;\n\n\t\t$result = true;\n\t\tif($this->cfg['cache'] > 0 && !empty($this->cache_trigger))\n\t\t{\n\t\t\tif(($data = $pmxCacheFunc['get']($this->cache_key, $this->cache_mode)) !== null)\n\t\t\t{\n\t\t\t\t$res = eval($this->cache_trigger);\n\t\t\t\tif(!e... | [
"0.7152174",
"0.70046157",
"0.69359684",
"0.69075584",
"0.68727475",
"0.6847973",
"0.6817171",
"0.67994845",
"0.67898166",
"0.6787649",
"0.6756975",
"0.6727746",
"0.6702912",
"0.66993916",
"0.66963696",
"0.6682679",
"0.66741467",
"0.6673283",
"0.66280645",
"0.6615424",
"0.659... | 0.67008734 | 13 |
Starts the cache process | public function start() {
if ($this->isRunning()) {
return false;
}
$this->execute('start');
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function startCache() {}",
"function start_cache()\r\n\t{\r\n\t\t$this->db->start_cache();\r\n\t}",
"public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\n }",
"public function startContrexxCaching()\n {\n if (!$this->boolIsE... | [
"0.8430688",
"0.7467501",
"0.71093416",
"0.6934674",
"0.6313365",
"0.63117063",
"0.6301312",
"0.6297417",
"0.6295729",
"0.62547016",
"0.6244509",
"0.61746436",
"0.61405724",
"0.61109895",
"0.6102061",
"0.60743874",
"0.60395235",
"0.5987336",
"0.59611315",
"0.5944025",
"0.5927... | 0.0 | -1 |
Stops the cache process | public function stop() {
if (!$this->isRunning()) {
return false;
}
$this->execute('stop');
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function stopCache() {}",
"function stop_cache()\r\n\t{\r\n\t\t$this->db->stop_cache();\r\n\t}",
"public function stop_caching()\n {\n $this->log(1,__FUNCTION__,\"Stopping file cache, deleting file pointer and temp file\");\n if ($this->cache_fp) {\n ... | [
"0.871037",
"0.78200734",
"0.78157073",
"0.77028775",
"0.6857349",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67442554",
"0.6726141",
"0.66337436",
"0.6608813",
"0.6586803",
"0.6561361",
"0.65508896",
"0.... | 0.0 | -1 |
Gets a list of all loaded configurations | public function getVclList() {
$list = array();
$response = $this->execute('vcl.list');
$lines = explode("\n", $response);
foreach ($lines as $line) {
$line = trim($line);
if (!$line) {
continue;
}
$tokens = explode(' ', ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function allConfig() {\n return $this->getConfigAugment()->all();\n }",
"public static function getAll()\n {\n return self::$config;\n }",
"public static function all()\n {\n return self::$config;\n }",
"public function getAll()\n {\n return $this->config;\n... | [
"0.8036041",
"0.7783054",
"0.77325016",
"0.7608611",
"0.7582914",
"0.75335866",
"0.74867505",
"0.74466544",
"0.74164027",
"0.7409937",
"0.7341855",
"0.7338377",
"0.7334342",
"0.7223175",
"0.7201228",
"0.7167118",
"0.7142817",
"0.70524186",
"0.7026163",
"0.6973699",
"0.6860007... | 0.0 | -1 |
Gets the VCL of the provided configuration | public function getVcl($name) {
return $this->execute('vcl.show ' . $name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function loadVclFromConfiguration($configuration, $name = null) {\n if (!$name) {\n $name = $this->generateConfigurationName();\n }\n\n $this->execute('vcl.inline ' . $name . \" << EOVCL\\n\" . $configuration . \"\\nEOVCL\");\n\n return $name;\n }",
"public functi... | [
"0.5744419",
"0.5526279",
"0.5361364",
"0.51902497",
"0.4949216",
"0.49375418",
"0.4930432",
"0.4859281",
"0.48358038",
"0.4811929",
"0.46900862",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.4601317",
"0.4... | 0.60544956 | 0 |
Gets the active VCL | public function getActiveVcl(array $vclList = null) {
if ($vclList === null) {
$vclList = $this->getVclList();
}
foreach ($vclList as $name => $state) {
if (!$state) {
continue;
}
return $this->getVcl($name);
}
re... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCLSc() {\n\t\treturn $this->clsc;\n\t}",
"static function getCurrent() {\n\t\treturn self::$_ctrl;\n\t}",
"public function getVcl($name) {\n return $this->execute('vcl.show ' . $name);\n }",
"function slcr_core_vc() {\n\treturn Slcr_Core_Vc::slcr_instance();\n}",
"public functi... | [
"0.6245969",
"0.58224",
"0.5780133",
"0.55721927",
"0.5392609",
"0.53564936",
"0.5351906",
"0.53250235",
"0.5285609",
"0.52727723",
"0.5241129",
"0.52380776",
"0.5218034",
"0.5214025",
"0.52070737",
"0.51655436",
"0.5145567",
"0.5145567",
"0.51245314",
"0.5107603",
"0.5068774... | 0.5613263 | 3 |
Compiles and loads a configuration file under the provided name | public function loadVclFromFile($file, $name = null) {
if (!$name) {
$name = $this->generateConfigurationName();
}
$this->execute('vcl.load ' . $name . ' ' . $file);
return $name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function loadConfiguration($name);",
"public function loadConfig(string $name)\n {\n $config = include $this->getConfigDir().$name.'.php';\n\n return $config;\n }",
"public abstract function loadConfig($fileName);",
"public function loadConfig( $name )\n {\n $... | [
"0.6871295",
"0.67754024",
"0.6772018",
"0.6446982",
"0.6294463",
"0.6248254",
"0.61582774",
"0.61212254",
"0.6071498",
"0.6065595",
"0.6056025",
"0.5957183",
"0.59344923",
"0.59075236",
"0.58885473",
"0.58843225",
"0.578367",
"0.57108635",
"0.57033646",
"0.56996876",
"0.5640... | 0.5624215 | 22 |
Compiles and loads a configuration under the provided name | public function loadVclFromConfiguration($configuration, $name = null) {
if (!$name) {
$name = $this->generateConfigurationName();
}
$this->execute('vcl.inline ' . $name . " << EOVCL\n" . $configuration . "\nEOVCL");
return $name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function loadConfiguration($name);",
"public function loadConfig(string $name)\n {\n $config = include $this->getConfigDir().$name.'.php';\n\n return $config;\n }",
"protected function loadConfiguration($name)\n {\n // TODO: Implement loadConfiguration() method.... | [
"0.73198724",
"0.6875873",
"0.67111087",
"0.6687737",
"0.6520377",
"0.6500504",
"0.64161485",
"0.61418456",
"0.6017183",
"0.5939565",
"0.58987314",
"0.5886726",
"0.5829407",
"0.57970047",
"0.5752321",
"0.5696186",
"0.56818664",
"0.5616723",
"0.5564937",
"0.55626833",
"0.55376... | 0.5158133 | 43 |
Generates a new configuration name based on the provided parameters | protected function generateConfigurationName(array $vclList = null, $prefix = 'load') {
if (!$vclList) {
$vclList = $this->getVclList();
}
$index = 1;
foreach ($vclList as $name => $status) {
if (strpos($name, $prefix) !== 0) {
continue;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getConfigName();",
"function gen_name($arg, $in){\n $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n $name = '';\n for ($i = 0; $i < CONFIG_RANDOM_LENGTH; $i++) {\n $name .= $chars[mt_rand(0, 60)];\n }\n switch($arg){\n case 'rando... | [
"0.651391",
"0.6360943",
"0.62005675",
"0.60765904",
"0.5994257",
"0.57764405",
"0.5776308",
"0.5770065",
"0.57074434",
"0.5675868",
"0.5660657",
"0.5639647",
"0.55484253",
"0.55220383",
"0.5513771",
"0.5478603",
"0.5433559",
"0.5408336",
"0.53948826",
"0.535456",
"0.535456",... | 0.54243916 | 17 |
Switches to the named configuration | public function useVcl($name) {
$this->execute('vcl.use ' . $name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function loadConfiguration($name);",
"abstract protected function defineConfiguration();",
"protected function configure()\n {\n $this\n ->setName('repo:switch')\n ->setAliases(['switch'])\n ->addOption('id', null, InputOption::VALUE_OPTIONAL, 'The ... | [
"0.5968062",
"0.5875431",
"0.58097655",
"0.5740011",
"0.56293976",
"0.56111985",
"0.55548614",
"0.55527353",
"0.55207914",
"0.55207914",
"0.55207914",
"0.55204713",
"0.55134296",
"0.55021745",
"0.5496422",
"0.5495768",
"0.54722154",
"0.5441757",
"0.5438678",
"0.5406841",
"0.5... | 0.0 | -1 |
Loads and switches the current configuration from the provided file | public function loadAndUseVclFromFile($file, $name = null) {
$name = $this->loadVclFromFile($file, $name);
$this->useVcl($name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract function loadConfig($fileName);",
"public function loadConfig($file)\n {\n $options = [];\n try {\n $loader = new PhpConfig();\n $options = $loader->read($file);\n } catch (\\Exception $e) {\n Log::warning($e->getMessage());\n }\n\t\... | [
"0.7713522",
"0.71087664",
"0.70565194",
"0.70129234",
"0.69128776",
"0.6743333",
"0.6736381",
"0.67231077",
"0.66333693",
"0.66282004",
"0.65462947",
"0.6535089",
"0.6475792",
"0.6441505",
"0.6426538",
"0.64181024",
"0.63876945",
"0.63726336",
"0.6369758",
"0.63600165",
"0.6... | 0.0 | -1 |
Discards a previously loaded configuration | public function discardVcl($name) {
$this->execute('vcl.discard ' . $name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function resetConfiguration()\n {\n static::$config = null;\n Registry::clear();\n }",
"public function testGettingUnsetConfigurationKey()\n {\n AbstractConfigurationInstance::$allowedKeys = ['SXOtJQme'];\n static::assertNull((new AbstractConfigurationInstance()... | [
"0.64341813",
"0.63732797",
"0.63386405",
"0.6329775",
"0.62328535",
"0.6228032",
"0.6093658",
"0.6039816",
"0.60111994",
"0.5988797",
"0.59027976",
"0.5898758",
"0.5874383",
"0.58121353",
"0.5809512",
"0.5760367",
"0.56995976",
"0.56962067",
"0.56877416",
"0.56514263",
"0.56... | 0.4973982 | 91 |
Gets the last panic | public function getPanic() {
$panic = $this->execute('panic.show', $statusCode);
if ($statusCode == 300) {
return false;
}
return $panic;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_last_error() {\n\t\treturn $this->errors[count($this->errors - 1)];\n\t}",
"public static function getLastReportedException() {\n return self::$lastReported;\n }",
"final public function getLast() {\n\t\treturn null;\n\t}",
"public function get_last_error() {\n\t\treturn $this-... | [
"0.6506351",
"0.63914037",
"0.63289905",
"0.6272127",
"0.6153776",
"0.6144254",
"0.6109948",
"0.6101054",
"0.59913146",
"0.59873897",
"0.595506",
"0.5942636",
"0.5933513",
"0.5932883",
"0.59187907",
"0.5889106",
"0.5861533",
"0.5861108",
"0.58606446",
"0.58544946",
"0.5854046... | 0.61708856 | 4 |
Clears the last panic | public function clearPanic() {
$this->execute('panic.clear');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_EXIT] = Down_ErrorInfo_Exit::noneed;\n }",
"public function clear()\n {\n $this->log = [];\n }",
"public function reset()\n {\n $this->values[self::_EXCAVATE] = null;\n }",
"p... | [
"0.629562",
"0.62381667",
"0.6087309",
"0.6073643",
"0.60643715",
"0.6013155",
"0.5992769",
"0.5945287",
"0.5941233",
"0.5936783",
"0.59355295",
"0.5891133",
"0.5891133",
"0.5891133",
"0.5891133",
"0.58668864",
"0.5859087",
"0.58491504",
"0.5827192",
"0.5811038",
"0.57933146"... | 0.8144025 | 0 |
Bans (purges) the cached objects which match the provided expression | public function ban($expression) {
$this->execute('ban ' . $expression);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkRelatedInCache($productName)\n{\n return S::of(function (Cacher $cache) use ($productName) {\n return [$cache->get($productName), $cache];\n });\n}",
"static function clearMemory($olderThan=null,$matchingExp=null){\n\t\tif( null === $olderThan && null===$matchingExp){\n\t\t\tself::$_in... | [
"0.49858633",
"0.4962006",
"0.4936239",
"0.48198456",
"0.48090404",
"0.4764583",
"0.47414848",
"0.47315356",
"0.4667644",
"0.46592084",
"0.4653988",
"0.46442997",
"0.46230814",
"0.46156648",
"0.46076035",
"0.45869455",
"0.45869455",
"0.45849377",
"0.45609215",
"0.45608068",
"... | 0.0 | -1 |
Bans (purges) an URL and all pages underneath it | public function banUrl($url, $recursive = false) {
$parts = parse_url($url);
$host = $parts['host'];
if (!isset($parts['host'])) {
throw new VarnishException('Invalid URL provided: no host set');
}
if (isset($parts['port'])) {
$host .= ':' . $parts['port... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function findPageUrls();",
"private function filterUrl($url){\n\t\t\n\t\t// Get the global config\n\t\tglobal $CrawlerConfig;\n\t\t\n\t\t// Make sure the URL isn't \"#\"\n\t\tif(substr($url, 0, 1) == \"#\") return false;\n\t\t\n\t\tif(substr($url, 0, 2) == \"//\") $url = \"http:\".$url;\n\t\t\n\t\t// If it's alr... | [
"0.62075585",
"0.60087806",
"0.5828057",
"0.5817584",
"0.5712374",
"0.56423944",
"0.5583279",
"0.5498119",
"0.54940134",
"0.548308",
"0.5452359",
"0.54506123",
"0.5446504",
"0.54410046",
"0.5424221",
"0.54187137",
"0.5413151",
"0.54025",
"0.5401385",
"0.53949064",
"0.5392333"... | 0.0 | -1 |
Escapes a scalar value to use as regex | protected function escapeForRegex($regex) {
// $regex = str_replace('.', '\\.', $regex);
$regex = str_replace('?', '\\\\?', $regex);
$regex = str_replace('[', '\\\\[', $regex);
$regex = str_replace(']', '\\\\]', $regex);
$regex = str_replace('*', '([\\\\w\\\\-])*', $regex);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function escape($value);",
"public function escape($value);",
"public static function escape($value) {}",
"abstract public function escapeString($value);",
"public abstract function escapeString($value);",
"function checkRealEscapeString($value);",
"public function escape($stringValue);",
"pub... | [
"0.78104746",
"0.78104746",
"0.77733785",
"0.7506301",
"0.74634993",
"0.7024305",
"0.69628465",
"0.6868516",
"0.6866481",
"0.68594885",
"0.6818358",
"0.6777312",
"0.67533654",
"0.6728062",
"0.6723901",
"0.66510224",
"0.658681",
"0.6584252",
"0.6584252",
"0.6577824",
"0.656248... | 0.6350078 | 33 |
Bans (purges) multiple URLs | public function banUrls(array $urls, $recursive = false) {
foreach ($urls as $url) {
$this->banUrl($url, $recursive);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateAllShortURLs(){\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t// We need to get the longURL and drawLink() to match...\n\t\t\tif($urls = $db->get_results(\"SELECT * FROM shorturls WHERE guid<=''\") ){\n\t\t\t\tforeach($urls as $url){\n\t\t\t\t\t// So now we have all of the unassigned urls...\n\t\t\t\t\t/... | [
"0.58035636",
"0.5692264",
"0.56242085",
"0.5523581",
"0.5510424",
"0.54702544",
"0.54508966",
"0.5435036",
"0.5358921",
"0.5340162",
"0.53369623",
"0.5252068",
"0.5250543",
"0.5238363",
"0.521881",
"0.5212904",
"0.51484644",
"0.51149285",
"0.51099074",
"0.51096994",
"0.50943... | 0.51624995 | 16 |
/ Functions we used | function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function helper()\n\t{\n\t\n\t}",
"function functions() {\n \n }",
"private function _i() {\n }",
"public function operations();",
"function process() ;",
"public function core();",
"private function aFunc()\n {\n }",
"public function access();",
"private function __() {\n ... | [
"0.6575307",
"0.6151331",
"0.5894376",
"0.5765292",
"0.5764337",
"0.56575006",
"0.56268084",
"0.56066835",
"0.54962057",
"0.54802763",
"0.5472431",
"0.5454853",
"0.5443845",
"0.54331094",
"0.5382601",
"0.53815985",
"0.5379629",
"0.5368885",
"0.53597885",
"0.5359137",
"0.53502... | 0.0 | -1 |
Returns Database Logins for a website | public function getDBLogins($domain_id)
{
$sth = self::getConnection()->prepare(
"SELECT DISTINCT `group` FROM `data` WHERE `domain`=:id AND `group` LIKE 'database%' ORDER BY `group` ASC"
);
$sth->bindValue(":id", $domain_id, PDO::PARAM_INT);
$sth->execute();
$dat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_logins() {\n $sql = 'SELECT\n id,\n firstName,\n lastName,\n email,\n password\n FROM\n logins\n ORDER BY \n id\n DESC limit \n ... | [
"0.640631",
"0.63273567",
"0.6290196",
"0.6236416",
"0.6202877",
"0.6177106",
"0.6172728",
"0.61563194",
"0.6151138",
"0.60453916",
"0.59426236",
"0.58589494",
"0.5769733",
"0.57232827",
"0.5663981",
"0.5657273",
"0.55869484",
"0.55720323",
"0.5543278",
"0.55284494",
"0.55239... | 0.58009756 | 12 |
Returns database login details | public function getDBDetails($domain_id, $dbnum)
{
$group = "database" . $dbnum;
$sth = self::getConnection()->prepare(
"SELECT `name`,`value` FROM `data` WHERE `domain`=:id AND `group` LIKE :group ORDER BY `name` ASC"
);
$sth->bindValue(":id", $domain_id, PDO::PARAM_INT)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static public function getLogin() {\n //resultat : chaîne de caractère qui correspond au login \n return self::$databases['login'];\n }",
"public function getDsLogin()\n\t{\n\t\treturn $this->ds_login;\n\t}",
"private function getLoginInfos()\r\n\t\t{\t\r\n\t\t\t$request = \"SELECT * FROM `bpcms_users` ... | [
"0.7665067",
"0.6948516",
"0.69246083",
"0.68912226",
"0.6697252",
"0.66935956",
"0.66146344",
"0.66146344",
"0.66146344",
"0.6598458",
"0.6573401",
"0.65601766",
"0.6548314",
"0.65113217",
"0.64978594",
"0.6496129",
"0.64897007",
"0.64682883",
"0.6410669",
"0.6410669",
"0.64... | 0.0 | -1 |
Adds database login credentials | public function addDB($domain_id, array $data)
{
$data = $this->filterData(
$data,
array(
'Hostname',
'Username',
'Password',
'Database',
'URL',
'dbtype'
)
);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function change_db_credentials()\n\t{\n\t\tif ( !isset($_POST['credentials']) ) return;\n\t\t$credentials = file_get_contents('../credentials.php');\n\t\t$permittedVariables = array('DB_NAME','DB_USER','DB_PASSWORD');\n\t\tforeach ($_POST['credentials'] as $credName => $credVal)\n\t\t{\n\t\t\tif ( in_array($credNa... | [
"0.62306887",
"0.59353936",
"0.5931765",
"0.59302866",
"0.5812434",
"0.578837",
"0.577033",
"0.56749547",
"0.56666666",
"0.56390345",
"0.5611627",
"0.56016934",
"0.5586999",
"0.554716",
"0.5516529",
"0.55131924",
"0.5493036",
"0.54753065",
"0.5469915",
"0.54693675",
"0.546510... | 0.0 | -1 |
Returns next database index | public function getNextIndex($domain_id)
{
$sth = self::getConnection()->prepare(
"SELECT `group` FROM `data` WHERE `domain`=:id AND `group` LIKE 'database%' ORDER BY `group` DESC LIMIT 1"
);
$sth->bindValue(":id", $domain_id, PDO::PARAM_INT);
$sth->execute();
$gr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getNextIndex();",
"public static function GetDatabaseIndex() {\n\t\t\treturn 1;\n\t\t}",
"public static function GetDatabaseIndex() {\n\t\t\treturn 1;\n\t\t}",
"public function nextId()\n {\n return $this->query(\"SHOW TABLE STATUS LIKE ?\", [$this->table])->fetch()->Auto_i... | [
"0.71962595",
"0.7149222",
"0.7149222",
"0.6560675",
"0.6496156",
"0.64852816",
"0.6434176",
"0.6415332",
"0.6316891",
"0.626444",
"0.6250046",
"0.61785966",
"0.61587477",
"0.6149129",
"0.6135228",
"0.61343473",
"0.6095417",
"0.6050641",
"0.60472506",
"0.60303247",
"0.6004321... | 0.6592692 | 3 |
Updates database login credentials | public function updateDB($dbnum, array $data, $domain_id)
{
$group = "database" . $dbnum;
$data = $this->filterData(
$data,
array(
'Hostname',
'Username',
'Password',
'Database',
'URL',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function change_db_credentials()\n\t{\n\t\tif ( !isset($_POST['credentials']) ) return;\n\t\t$credentials = file_get_contents('../credentials.php');\n\t\t$permittedVariables = array('DB_NAME','DB_USER','DB_PASSWORD');\n\t\tforeach ($_POST['credentials'] as $credName => $credVal)\n\t\t{\n\t\t\tif ( in_array($credNa... | [
"0.6875521",
"0.6625099",
"0.6365808",
"0.6333745",
"0.6304126",
"0.615122",
"0.61174315",
"0.6078172",
"0.59783554",
"0.59759164",
"0.5968799",
"0.59600073",
"0.593282",
"0.59295946",
"0.59282106",
"0.59271485",
"0.5906563",
"0.59033483",
"0.5899072",
"0.58860725",
"0.588394... | 0.0 | -1 |
string variable to store the log | public function UploadElifesheet($shipmentItemInstance)
{
$log = '';
$shipmentBatchInstances = $shipmentItemInstance->getShipmentBatches();
foreach($shipmentBatchInstances as $shipmentBatchInstance) {
// force it to SK38 for now: to be changed in future
if($s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function logfile() {\n\t\treturn sprintf(\n\t\t\t'%s.createenv.%s.log',\n\t\t\t$this->Project()->Name,\n\t\t\t$this->ID\n\t\t);\n\t}",
"public function logFilePath();",
"function writeLog($string){\n}",
"protected function log_file() \n {\n return $this->ini['log'];\n }",
"function L... | [
"0.66048926",
"0.6352136",
"0.62873226",
"0.6255181",
"0.6163623",
"0.6149554",
"0.6114811",
"0.6094207",
"0.60902476",
"0.60510826",
"0.60476065",
"0.60244554",
"0.5998856",
"0.5984844",
"0.5982342",
"0.59700495",
"0.5967734",
"0.5967035",
"0.59620446",
"0.59334314",
"0.5929... | 0.0 | -1 |
Execute the console command. | public function fire()
{
$this->info('Stopping containers...');
$this->runInTerminal('docker-compose down');
$this->info('Done!');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() meth... | [
"0.6469971",
"0.64641356",
"0.6427384",
"0.6349752",
"0.63188183",
"0.62750113",
"0.6261585",
"0.6261214",
"0.6235854",
"0.6225116",
"0.6222161",
"0.6214144",
"0.6193531",
"0.6191337",
"0.6183868",
"0.61772275",
"0.61766857",
"0.6172786",
"0.6149171",
"0.6148903",
"0.61484134... | 0.0 | -1 |
Display a listing of the users | public function index(User $model)
{
$user_data = User::all();
return view('users.index', compact('user_data'), ['users' => $model->paginate(15)]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }",
"public functio... | [
"0.8467428",
"0.84463173",
"0.8393419",
"0.83682805",
"0.8328806",
"0.830487",
"0.8242352",
"0.8221456",
"0.8197339",
"0.81725514",
"0.8159651",
"0.8127423",
"0.8089976",
"0.8059625",
"0.80441093",
"0.8038903",
"0.8031339",
"0.80074406",
"0.79716617",
"0.7961764",
"0.7951219"... | 0.0 | -1 |
instantiate class with file | public function setVideoParameters(Request $request,$directory, $fieldname_rqst, $filename, $duration_field, $artwork_field) {
$track = new GetId3( request()->file($fieldname_rqst) );
$file_dir = config('app.' . $directory);
$parameters_data = [];
$parameters_data[$duration_field] = $t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct($file);",
"public function __construct($filename);",
"function fromFile($file) \n {\n return new self($file);\n }",
"function __construct($class = 'Unknown', $file = \"../../log/heili.log\") {\n\n $this->class = $class;\n $this->file = new File($file);\n $ope... | [
"0.7648509",
"0.74436134",
"0.7272134",
"0.7073296",
"0.700581",
"0.7005409",
"0.7004215",
"0.69614285",
"0.6949047",
"0.6894087",
"0.6807542",
"0.67698514",
"0.6722828",
"0.6695013",
"0.6688118",
"0.66842747",
"0.66842747",
"0.66842747",
"0.66692966",
"0.66649985",
"0.665372... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//$images = DB::table('images')->where('image_category', '=', 'Profile Pictures')->orderBy('image_name')->get();
$practices = Practice::all();
$roles = Role::all();
return view('users.create', compact('practices', 'roles'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$imageId = $request->image_id;
if ($request->image_url) {
$image = new Image;
$image->user_id = Auth::id();
$image->image_name = $request->user_firstname;
$image->image_category = "Profile Pictures";
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72855324",
"0.71447515",
"0.7132799",
"0.6641042",
"0.66208744",
"0.6566955",
"0.65249777",
"0.6509032",
"0.6447701",
"0.63756555",
"0.6373163",
"0.63650846",
"0.63650846",
"0.63650846",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.63416... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$user = User::where('id', $id)->with('practice', 'image', 'role')->first();
return view('users.show', compact('user'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$user = User::where('id', $id)->with('role', 'practice', 'image')->first();
$practices = Practice::all();
$roles = Role::all();
//$images = DB::table('images')->where('image_category', '=', 'Profile Pictures')->orderBy('image_name')->get();
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$user = User::find($id);
$imageId = $request->image_id;
if ($request->image_url) {
$image = new Image;
$image->user_id = Auth::id();
$image->image_name = $request->user_firstname;
$image->image_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$user = User::find($id);
$user->delete();
return redirect()->route('users.index')
->with('success', 'Userdata deleted successfully');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6671365",
"0.6660839",
"0.66361386",
"0.6632988",
"0.6624729",
"0.6542195",
"0.6541645",
"0.6466739",
"0.6288393",
"0.61767083",
"0.6129533",
"0.608954",
"0.6054169",
"0.60443425",
"0.60073143",
"0.59338665",
"0.59317696",
"0.592145",
"0.5920155",
"0.59065086",
"0.5897853"... | 0.0 | -1 |
This will get the project of the domain using the belongTo relationship | public function project(){
return $this->belongsTo('App\Models\Projects\Project');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProject() {\n return $this->hasOne(Projects::className(), ['id' => 'project_id']);\n }",
"public function getProject()\n {\n return $this->hasOne(Project::className(), ['id' => 'project_id']);\n }",
"public function getProject()\n {\n return $this->hasOne(Pro... | [
"0.7492956",
"0.7469547",
"0.7469547",
"0.73809063",
"0.73289037",
"0.72824055",
"0.722065",
"0.71292055",
"0.71152204",
"0.70917505",
"0.7080925",
"0.70473534",
"0.70473534",
"0.70473534",
"0.70473534",
"0.7043028",
"0.70425034",
"0.70178974",
"0.700886",
"0.70082694",
"0.69... | 0.68807566 | 23 |
This will get the domains L.G.A using the belongTo relationship | public function lga(){
return $this->belongsTo('App\Models\Lga');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function domains()\n {\n\t\t// Second argument is the name of pivot table.\n\t\t// Third & forth arguments are the names of foreign keys.\n return $this->belongsToMany('Domain', 'domain_user', 'user_id', 'domain_id')->withTimestamps();\n }",
"function domains() {\n $parameters = array(... | [
"0.6896356",
"0.66117316",
"0.62982386",
"0.6249514",
"0.6064467",
"0.6056365",
"0.6046916",
"0.60021234",
"0.58143276",
"0.57603365",
"0.5732337",
"0.5728596",
"0.5701817",
"0.56797636",
"0.5674813",
"0.5666665",
"0.56631845",
"0.5634547",
"0.56121534",
"0.5607974",
"0.56079... | 0.0 | -1 |
Collect node geolocation in background via Ajax | public function actionAjaxCollectGeo()
{
$lock = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . 'geo.lock';
$response = ['status' => 'warning', 'msg' => $this->module::t('general', 'Geolocation collecting is already running.')];
if (!file_exists($lock)) {
$console = new C... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionAjaxRecollectGeo($location, $prepend_location, $node_id)\n {\n try {\n\n $model = new Geolocation();\n\n /** Save node location */\n $prepend_location = (!empty($prepend_location)) ? $prepend_location : null;\n $save_location = $model-... | [
"0.6518053",
"0.5714243",
"0.57016975",
"0.55131465",
"0.5488123",
"0.5484338",
"0.53941697",
"0.5384275",
"0.53001124",
"0.5276162",
"0.52747524",
"0.5263827",
"0.522112",
"0.52108216",
"0.5209827",
"0.51691926",
"0.51688325",
"0.5131373",
"0.5115591",
"0.5107836",
"0.510783... | 0.8112957 | 0 |
Get single node location via Ajax | public function actionAjaxRecollectGeo($location, $prepend_location, $node_id)
{
try {
$model = new Geolocation();
/** Save node location */
$prepend_location = (!empty($prepend_location)) ? $prepend_location : null;
$save_location = $model->saveNodeLoca... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_node() {\n return \\Drupal::routeMatch()->getParameter('node');\n }",
"private function getLocation(){\n \n $location = [];\n $node = $this->getNode();\n $locationreference = $node->field_location_reference->entity;\n \n if($locationreference){\n $location = $locati... | [
"0.5906167",
"0.5764729",
"0.56281376",
"0.5611867",
"0.55687356",
"0.54771507",
"0.5405089",
"0.5400214",
"0.53874135",
"0.53874135",
"0.5376961",
"0.53657025",
"0.5348053",
"0.53348315",
"0.5320373",
"0.5320373",
"0.52781916",
"0.5232992",
"0.5225256",
"0.5212359",
"0.51934... | 0.5202803 | 20 |
Load geolocation info via Ajax | public function actionAjaxGetGeoInfo($id)
{
/** Do not load JqueryAsset in info view */
Yii::$app->assetManager->bundles['yii\web\JqueryAsset'] = false;
return $this->renderAjax('_info', [
'data' => Geolocation::find()->where(['id' => $id])->one()
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionAjaxCollectGeo()\n {\n $lock = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . 'geo.lock';\n $response = ['status' => 'warning', 'msg' => $this->module::t('general', 'Geolocation collecting is already running.')];\n\n if (!file_exists($lock)) {\n $cons... | [
"0.66101533",
"0.61367625",
"0.6015483",
"0.60123855",
"0.5960278",
"0.586756",
"0.58545876",
"0.5834137",
"0.58313656",
"0.5772265",
"0.57561314",
"0.571694",
"0.565401",
"0.56371737",
"0.5608076",
"0.55945003",
"0.5571893",
"0.5571893",
"0.55613744",
"0.5553205",
"0.5511201... | 0.65096796 | 1 |
Render Geolocation log view | public function actionLog()
{
$searchModel = new LogGeoSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('log', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
'users' => (new ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function render($data) {\n\t\t$this->body->set_template('report_geolocation.tpl');\n\t\t$this->body->set('latest_visits', $this->get('latest_visits'));\n\t\t$this->body->set('site_id', $this->get('site_id') );\n\t\t$this->setjs('jmaps', 'base/js/includes/jquery/jquery.jmap-r72.js');\n\t\t$this->setjs('owa.map', 'b... | [
"0.6094862",
"0.573639",
"0.5736111",
"0.5702951",
"0.5568251",
"0.55526716",
"0.553553",
"0.55191576",
"0.5502245",
"0.54797536",
"0.54207766",
"0.5406463",
"0.538621",
"0.532568",
"0.5315119",
"0.5235307",
"0.52312756",
"0.5223405",
"0.52166647",
"0.52158874",
"0.5207647",
... | 0.5887237 | 1 |
Get the uri of a given cached page | function get_cache_URI($set_uri = null){
$CFG =& load_class('Config');
$URI =& load_class('URI');
$set_uri = (isset($set_uri)) ? $set_uri : $URI->uri_string;
$cache_path = ($CFG->item('cache_path') == '') ? BASEPATH.'cache/' : $CFG->item('cache_path');
if ( ! is_dir($cache_pat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function url()\n\t{\n\t\t$id\t\t= $this->attribute('id');\n\t\t$page\t= $this->pyrocache->model('pages_m', 'get', array($id));\n\n\t\treturn site_url($page ? $page->uri : '');\n\t}",
"public function getCachedReturnUrl()\n {\n $key = 'oauth_return_url_'.$this->request->input('oauth_token');\n\n ... | [
"0.6542568",
"0.64650595",
"0.64192945",
"0.6238483",
"0.6209386",
"0.61809",
"0.61567044",
"0.6142795",
"0.6035277",
"0.5979642",
"0.59153503",
"0.58943796",
"0.58651006",
"0.5822515",
"0.5803816",
"0.5798864",
"0.5779232",
"0.5772206",
"0.57657284",
"0.5735613",
"0.5735613"... | 0.6312565 | 3 |
Manually clear a cached file | function clear_page_cache($set_uri = null, $filepath = null){
switch (isset($filepath))
{
case FALSE:
$cacheuri = $this->get_cache_URI($set_uri);
$filepath = $cacheuri['path'];
$filepath .= md5($cacheuri['uri']);
default... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearCache(){\n if(file_exists($this->file)){\n @unlink($this->file);\n }\n }",
"public function clear()\n {\n if (File::rm($this->cacheFile)) {\n echo 'OK';\n } else {\n echo 'ERROR';\n }\n }",
"public function clear_... | [
"0.88258713",
"0.8306952",
"0.83052415",
"0.82834655",
"0.81091696",
"0.80282176",
"0.80165064",
"0.7919461",
"0.7836576",
"0.78239316",
"0.77721596",
"0.77721596",
"0.77662724",
"0.77489334",
"0.77194977",
"0.7714509",
"0.7713158",
"0.7696646",
"0.75856936",
"0.7539011",
"0.... | 0.6948829 | 56 |
Check for duplicate login ID | function check_name($id = '')
{ $this->db->where('nama', $this->data['nama']); if($id != '') $this->db->where('id !=', $id); $query = $this->db->get('customer');
if ($query->num_rows() > 0) { return FALSE; } else { return TRUE; } } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function is_duplicate () {\n $email = $this->payload['email'];\n $facebook_id = '0';\n if (!empty($this->payload['facebook_id'])) {\n $facebook_id = $this->payload['facebook_id'];\n }\n $sql = \"SELECT id FROM users WHERE email='$email' OR facebook_id='$facebook_id'\";\n $sql = $this... | [
"0.7530503",
"0.6838178",
"0.68091637",
"0.6576711",
"0.65532815",
"0.65373707",
"0.6511289",
"0.6499283",
"0.64805126",
"0.64245594",
"0.6346039",
"0.6309231",
"0.62768775",
"0.6271829",
"0.62690926",
"0.6262727",
"0.62552756",
"0.6254653",
"0.6222307",
"0.62195176",
"0.6195... | 0.0 | -1 |
Returns the fields of the table. | public function getFields() {
return array(
self::FIELD_ID,
self::FIELD_NAME,
self::FIELD_CREATED_AT,
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _fields() {\n if ($this->_table() && empty($this->fields)) {\n $this->fields = $this->db->list_fields($this->_table());\n }\n return $this->fields;\n }",
"public function getTableFields(){\n if(empty($this->tableFields)){\n $this->getT... | [
"0.86084634",
"0.8577181",
"0.84243286",
"0.8090999",
"0.80869305",
"0.80757076",
"0.80746907",
"0.80542076",
"0.8046668",
"0.7983244",
"0.7983244",
"0.7983244",
"0.7983244",
"0.7983244",
"0.7983244",
"0.79771996",
"0.7940876",
"0.79192054",
"0.78057575",
"0.78057575",
"0.779... | 0.76468265 | 52 |
Display a listing of the resource. | public function index()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.7594622",
"0.7594622",
"0.7588457",
"0.7580005",
"0.75723624",
"0.7499764",
"0.7436887",
"0.74322647",
"0.7387517",
"0.735172",
"0.73381543",
"0.73117113",
"0.72958225",
"0.7280436",
"0.7273787",
"0.72433424",
"0.7230227",
"0.7225085",
"0.71851814",
"0.71781176",
"0.717402... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request, Match $match)
{
die($request->all());
// if($request::ajax()) {
// dd('here');
// $goal = new Goal;
// $goal->player_id = $request->get('player_id');
// $goal->match_time = $request->get('time');
// $... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.7286258",
"0.71454436",
"0.7132821",
"0.6640289",
"0.6621105",
"0.6566493",
"0.65255576",
"0.65087926",
"0.6448317",
"0.63752604",
"0.63736314",
"0.6365631",
"0.6365631",
"0.6365631",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.