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
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLA...
[ "0.75750446", "0.7528519", "0.7271581", "0.72703993", "0.72617143", "0.7213263", "0.72127366", "0.7131883", "0.71287453", "0.71287453", "0.7102495", "0.7102467", "0.7102467", "0.7074701", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163...
0.0
-1
Returns admin scaffold add fields
public function getAdd() { return array( 'Currency.name' => array('type' => 'text', 'label' => __("Name")), 'Currency.code' => array('type' => 'text', 'label' => __("Code")), 'Currency.rate' => array('type' => 'text', 'label' => __("Rate")) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addFields()\n {\n // add field\n $this->addField(new DataObject([\n 'key' => 'css_class',\n 'type' => 'multiselect',\n 'values' => $this->cssClassRowModel->toOptionArray(),\n 'label' => __('CSS Class'),\n ]));\n\n // add sav...
[ "0.70100605", "0.69106483", "0.69070846", "0.685093", "0.6829194", "0.6647369", "0.65952253", "0.657273", "0.6567986", "0.65673476", "0.6544343", "0.65407425", "0.65240747", "0.64959407", "0.6491949", "0.64528936", "0.643904", "0.6438289", "0.64342725", "0.6433798", "0.639999...
0.63020533
33
Returns admin scaffold edit fields
public function getEdit($data) { return array( 'Currency.name' => array('type' => 'text', 'label' => __("Name")), 'Currency.code' => array('type' => 'text', 'label' => __("Code")), 'Currency.rate' => array('type' => 'text', 'label' => __("Rate")) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEditForm();", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }", "public function getEdit()\n\t{\n\t}", "public function add_edit_form(){\n\n $_id = $_G...
[ "0.72574854", "0.68677145", "0.68128055", "0.66688", "0.65923715", "0.6541161", "0.6525591", "0.65046114", "0.64924437", "0.64828515", "0.64383847", "0.6436788", "0.6422573", "0.6408679", "0.6376759", "0.6352013", "0.6341373", "0.6341373", "0.6334331", "0.632933", "0.63219815...
0.59651583
86
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "pu...
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315...
0.0
-1
Execute the console command.
public function handle() { $crons = \App\Models\MailCron::where('send_date', '<=', Carbon::now()) ->where('is_sent', false) ->get(); $this->line($crons->count().' MailCron ready.'); if($crons) { foreach ($crons as $cron) { ...
{ "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.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.0
-1
check for input type
function SetCharSet($vCharSet) { if (is_array($vCharSet)) { $this->aCharSet = $vCharSet; } else { if ($vCharSet != '') { // split items on commas $aCharSet = explode(',', $vCharSet); // initialise array $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function check_type()\n {\n $regex = \"/^int$|^bool$|^string$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <type> function parameter! Line: \");\n ...
[ "0.7686497", "0.73949987", "0.69352216", "0.68818086", "0.6846116", "0.6759536", "0.67099124", "0.6659094", "0.6635325", "0.6606951", "0.6571913", "0.65334177", "0.6527752", "0.6495026", "0.64497083", "0.64381236", "0.6433638", "0.64216983", "0.63896525", "0.6374931", "0.6365...
0.0
-1
check for valid file type
function SetFileType($sFileType) { if (in_array($sFileType, array('gif', 'png', 'jpeg'))) { $this->sFileType = $sFileType; } else { $this->sFileType = 'jpeg'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateTypeOfFile($type){\n\t$arrFile = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'];\n\tif(in_array($type, $arrFile)){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "private function checkMimeType()\n {\n $allowedTypes = $this->getSetting('allowed_upload_types', true);\n ...
[ "0.8156095", "0.80034846", "0.7971962", "0.777223", "0.77308893", "0.7683842", "0.7584927", "0.7584441", "0.75220793", "0.7380893", "0.7368405", "0.7320937", "0.7306792", "0.7294118", "0.72917086", "0.72585684", "0.7215459", "0.707977", "0.7074101", "0.70148873", "0.7013331",...
0.0
-1
allocate owner text colour
function DrawOwnerText() { $iBlack = imagecolorallocate($this->oImage, 0, 0, 0); // get height of selected font $iOwnerTextHeight = imagefontheight(2); // calculate overall height $iLineHeight = $this->iHeight - $iOwnerTextHeight - 4; // draw line above te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function set_font_color()\n {\n $this->font_color = imagecolorallocate(\n $this->img,\n L_FONT_COLOR_R,\n L_FONT_COLOR_G,\n L_FONT_COLOR_B\n );\n }", "private function ensureTextColorsAreGenerated(): void\n\t{\n\t\tif ($this->generatedTextCo...
[ "0.5992768", "0.5886941", "0.5779626", "0.5661228", "0.560895", "0.54850966", "0.54833686", "0.5404708", "0.5398954", "0.53505725", "0.5341132", "0.5335624", "0.5335624", "0.5335211", "0.53264046", "0.5320125", "0.53138155", "0.53117156", "0.52555186", "0.5244608", "0.5211872...
0.6814784
0
loop through and write out selected number of characters
function DrawCharacters() { for ($i = 0; $i < strlen($this->sCode); $i++) { // select random font $sCurrentFont = $this->aFonts[array_rand($this->aFonts)]; // select random colour if ($this->bUseColour) { //$iTextColour = imagecolorall...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function ReturnCharToFile($count) {\n\t\twhile($count) {\n\t\t\tif ($this->positionInFile > 0)\n\t\t\t\t$this->positionInFile--;\n\t\t\t$count--;\n\t\t}\n\t}", "function character_limiter($str, $n = 500, $end_char = '&#8230;')\n {\n if (strlen($str) < $n)\n {\n return $str;\n ...
[ "0.5881861", "0.56282127", "0.56104153", "0.55842954", "0.5264408", "0.52381617", "0.5193707", "0.51872975", "0.51722974", "0.5139457", "0.5137791", "0.51100826", "0.5099583", "0.5097539", "0.5094522", "0.50930166", "0.5076203", "0.5065623", "0.50632703", "0.5024385", "0.5021...
0.495122
29
check for required gd functions
function Create($sFilename = '') { if (!function_exists('imagecreate') || !function_exists("image$this->sFileType") || ($this->vBackgroundImages != '' && !function_exists('imagecreatetruecolor'))) { return false; } // get background image if specified and copy to CAPTCHA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function check() {\n\n // check for a valid GD lib installation \n if(!function_exists('gd_info')) raise('GD Lib is not installed');\n\n }", "protected function checkGdLibJpgSupport() {}", "protected function checkGdLibPngSupport() {}", "private function checkGDLibrary(){\n\t//Check for G...
[ "0.8103236", "0.80079645", "0.80008465", "0.7959447", "0.79248345", "0.7732571", "0.7719825", "0.76687855", "0.7629127", "0.76253146", "0.75851667", "0.74278796", "0.7425929", "0.7342836", "0.72752535", "0.7182238", "0.7180095", "0.7168959", "0.70785385", "0.70403415", "0.694...
0.0
-1
call this method statically
function Validate($sUserCode, $bCaseInsensitive = true) { if ($bCaseInsensitive) { $sUserCode = strtoupper($sUserCode); } if (!empty($_SESSION[CAPTCHA_SESSION_ID]) && $sUserCode == $_SESSION[CAPTCHA_SESSION_ID]) { // clear to prevent re-use unset(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function call();", "public function call();", "public function method() {\n\t}", "public function __invoke()\n {\n }", "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "public function __invoke()\n {\n\n }", "public static function __callStatic($method, $args){ return n...
[ "0.6663391", "0.6663391", "0.65348005", "0.6515572", "0.64114344", "0.6360055", "0.6324083", "0.6306084", "0.6232001", "0.6232001", "0.6232001", "0.6232001", "0.62224007", "0.6186159", "0.6186159", "0.6186159", "0.6186159", "0.6181167", "0.6168769", "0.614519", "0.60232604", ...
0.0
-1
"isTrue" checks that the boolean is strictly equal to "true". boolean($true) >isTrue() // succeed >boolean($false) >isTrue() // fails ;
public function isTrue($failMessage = null) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isTrue();", "public function isBoolean();", "public function testIsBoolean() {\n\t\t$result = _::isBoolean(true);\n\t\t$this->assertTrue($result);\n\n\t\t// test that false is a boolean\n\t\t$result = _::isBoolean(false);\n\t\t$this->assertTrue($result);\n\n\t\t// test that null is not a boolea...
[ "0.68517697", "0.6766951", "0.64169884", "0.641648", "0.6332444", "0.6312277", "0.62422806", "0.6204315", "0.61879456", "0.61554146", "0.61498046", "0.61425316", "0.6108633", "0.6088926", "0.60644585", "0.6045826", "0.60042435", "0.59953606", "0.5974364", "0.5930563", "0.5930...
0.5253611
89
"isFalse" check that the boolean is strictly equal to "false". boolean($true) >isFalse() // fails >boolean($false) >isFalse() // succeed ;
public function isFalse($failMessage = null) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isFalse();", "public function isFalse()\n {\n \n return !$this->value;\n \n }", "static function isFalse()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isFalse', func_get_args());\n } catch (\\Exception $e) {\n self::call...
[ "0.7831073", "0.69790924", "0.69354093", "0.6703438", "0.6698243", "0.65677404", "0.65504575", "0.6504159", "0.64706", "0.64209384", "0.6381188", "0.63569796", "0.63436496", "0.62857497", "0.627552", "0.6259005", "0.6242871", "0.6235255", "0.62214494", "0.6183468", "0.6172402...
0.64160687
10
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "pu...
[ "0.8010803", "0.73342687", "0.7260599", "0.7165084", "0.7159782", "0.71384674", "0.6749612", "0.67224956", "0.67182314", "0.66973996", "0.667946", "0.664498", "0.6562459", "0.65445805", "0.64828986", "0.64694583", "0.6429215", "0.6382685", "0.6378959", "0.63776636", "0.631660...
0.0
-1
Execute the console command.
public function handle() { /*$waktu = Carbon::now(8); $produk= DB::table('produk') ->where('') $data = new RiwayatPo;*/ }
{ "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.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.0
-1
Renders the element. Any object that has a representation in the xml must implement this method
public abstract function render($update = false);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function render() {\n\t\treturn $this->_view->getBaseView()->element($this->_name, $this->_data, $this->_options);\n\t}", "protected function renderAsXML() {}", "public function renderElement($element);", "public function render()\n {\n echo $this->__toString();\n\n }", "protected...
[ "0.7418219", "0.71450174", "0.71097714", "0.69655263", "0.6818093", "0.67897344", "0.6785725", "0.6687651", "0.6677221", "0.66598", "0.65582013", "0.6556647", "0.65388876", "0.6536395", "0.65360904", "0.6518333", "0.64979327", "0.6497313", "0.6497313", "0.64969194", "0.649395...
0.0
-1
Gets the index of a child.
public function getChildIndex(Registry $c) { return array_search($c, $this->children, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index() {\r\n\t\tif ($parent = $this->getParent()) {\r\n\t\t\treturn array_search($this, $parent->children);\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public function index($child)\n {\n $result = -1;\n if (!empty($this->nodes)) {\n if (is_object($child)) {\n ...
[ "0.77300507", "0.75683266", "0.67777765", "0.6673901", "0.6651359", "0.6643994", "0.6629385", "0.6584179", "0.65440446", "0.6462692", "0.6440015", "0.6287791", "0.6276006", "0.6276006", "0.6276006", "0.62728184", "0.62728184", "0.62348104", "0.6164462", "0.61626166", "0.61269...
0.6341039
11
Inserts an element at the beginning
public function appendChild(Registry $child) { $this->children[] = $child; $child->setParent($this); return $child; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prepend ($content) {\r\n\t\t\r\n\t\tif ($this->length < 1) return null;\r\n\t\t\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $offset => $value) \r\n\t\t\tif ($value = $this->process($value)) \r\n\t\t\t\tforeach ($this as $node) \r\n\t\t\t\t\tif (get_class($value) === 'XDTNodeList') $nod...
[ "0.67646176", "0.6575263", "0.6465663", "0.6454954", "0.64172906", "0.6370875", "0.63597566", "0.63553834", "0.6347638", "0.6336025", "0.6317991", "0.63121504", "0.62561333", "0.623033", "0.6221862", "0.6218444", "0.6201152", "0.6161697", "0.6144952", "0.61356586", "0.6091001...
0.0
-1
Inserts an element at the end
public function prependChild(Registry $child) { array_unshift($this->children, $child); $child->setParent($this); return $child; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addElementAtEnd(IElement $element): IFormBuilder;", "public function append($element)\n {\n $this->elements[] = $element;\n $this->iteratorCount = count($this->elements);\n }", "public function addLast($e);", "public function after(&$obj) {\r\n\t\tif ($parent = $this->getP...
[ "0.6487499", "0.643295", "0.6387605", "0.6300646", "0.62179756", "0.6217104", "0.6009154", "0.6004396", "0.59753656", "0.593672", "0.59366566", "0.5902666", "0.58653325", "0.5814578", "0.5807967", "0.57936656", "0.573627", "0.5722106", "0.56792575", "0.5647194", "0.5608734", ...
0.0
-1
Replaces a child at specified index with a new one.
public function replaceChild(Registry $child, $idx) { if (isset($this->children[$idx])) { $this->children[$idx] = $child; $child->setParent($this); return $child; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final function offsetSet($index, $child) : void\n {\n $this->insert($index, $child, \\true);\n }", "public function replaceChildAtBy($index, AbstractClassContent $contentSet)\n {\n $index = (isset($index) && is_int($index)) ? $index : false;\n if (is_bool($index)) {\n ...
[ "0.70758265", "0.69833785", "0.6371363", "0.6203739", "0.6189019", "0.6065144", "0.5871742", "0.5864379", "0.58496493", "0.5647594", "0.562085", "0.5592612", "0.55052125", "0.5453277", "0.54223955", "0.5397076", "0.53816086", "0.5359806", "0.53596807", "0.53541595", "0.533616...
0.6580262
2
Removes a child at specified index.
public function removeChild($idx) { if (isset($this->children[$idx])) { array_splice($this->children, $idx, 1); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove(int $index);", "public function remove(int $index);", "public function remove($index);", "public function offsetUnset($index) : void\n {\n if (isset($this->children[$index])) {\n \\array_splice($this->children, $index, 1);\n }\n }", "public function rem...
[ "0.75093204", "0.75093204", "0.7296033", "0.7221526", "0.7153167", "0.6943415", "0.68844134", "0.6698783", "0.6676434", "0.66682124", "0.65533197", "0.64930457", "0.646308", "0.64092046", "0.62842226", "0.6179004", "0.6165626", "0.6146257", "0.61371595", "0.6116363", "0.60937...
0.7141199
5
Sets a parent for this element. This method should be called when adding elements to another element, otherwise the hierarchy will not be maintained.
public function setParent(Registry $parent) { $this->parent = $parent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setParent(&$element)\n {\n $this->parent = $element;\n\n return $this;\n }", "public function setParent($parent) {\n\t\t$this->parent = $parent;\n\t}", "public function setParent(self $parent)\n {\n $this->_parent = $parent;\n }", "public function setParent($p...
[ "0.77643", "0.75655746", "0.7550784", "0.7510748", "0.7510748", "0.7450836", "0.73219293", "0.72920084", "0.726342", "0.71590614", "0.7095322", "0.7055723", "0.7003922", "0.69959694", "0.69892335", "0.69892335", "0.69874805", "0.6920245", "0.68964183", "0.68469113", "0.684630...
0.634624
48
Counts the number of children.
public function count() { return count($this->children); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countChildren();", "public function count(): int\n {\n return \\count($this->children);\n }", "public function getNumberChildren();", "public function count ( ) {\n\n return count($this->_childs);\n }", "#[Pure] public function get_children_number(): int\n {\n ...
[ "0.90300184", "0.86308545", "0.8399561", "0.8286793", "0.8084234", "0.80094206", "0.7917784", "0.7717049", "0.76806104", "0.76773214", "0.7576897", "0.75224465", "0.7476565", "0.74746233", "0.73005307", "0.7272008", "0.72467333", "0.72014195", "0.7190985", "0.70588386", "0.69...
0.866409
1
(PHP 5 &gt;= 5.0.0) Retrieve an external iterator
public function getIterator() { return new \ArrayIterator($this->children); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIterator() {}", "public function getIterator() {}", "abstract public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public functio...
[ "0.78275746", "0.78275746", "0.7815728", "0.76747423", "0.76747423", "0.76747423", "0.76747423", "0.76747423", "0.76747423", "0.7570447", "0.72964865", "0.7215402", "0.7108311", "0.70822555", "0.7051593", "0.7048961", "0.7013031", "0.6933675", "0.6932642", "0.69030154", "0.69...
0.0
-1
Handle an incoming request.
public function handle($request, Closure $next, $guard = null) { if ($request->segment(1) == 'api') { return $next($request); } if ($setting = $this->settingLoad($request)) { return $setting; } if ($local = $this->localizationSet($request)) { return $local; } if ($route = $this->routeLoad($re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "abstract public function handleRequest($request);", "abstract public function handleRequest(Request $...
[ "0.8299201", "0.8147294", "0.8147294", "0.8147294", "0.8127764", "0.7993589", "0.7927201", "0.7912899", "0.7899075", "0.76317674", "0.75089735", "0.7485808", "0.74074036", "0.7377414", "0.736802", "0.7294553", "0.72389543", "0.7230166", "0.72108", "0.71808434", "0.7170364", ...
0.0
-1
vrati udaje pouzivatela ako asociativne pole, ak existuje pouzivatel $username s heslom $pass, inak vrati FALSE
function user_right($mysqli, $username, $pass) { if (!$mysqli->connect_errno) { $sql = "SELECT * FROM users WHERE username='$username' AND password='$pass'"; // echo "sql = $sql <br>"; // echo "OK3"; if (($result = $mysqli->query($sql)) && ($result->num_rows > 0)) { $row = $result->fetch_assoc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register($user, $pass){\n global $ini;\n if(array_key_exists($user,$ini) && ($pass == $ini[$user]['pass'])){\n return TRUE;\n }\n return FALSE;\n}", "public function login_pass_ok($username, $password)\n {\n }", "function validateUserPass($username, $password) {\n\n return ...
[ "0.70424217", "0.6866002", "0.682533", "0.68124443", "0.6803946", "0.6791902", "0.67910826", "0.6764693", "0.67561364", "0.67483395", "0.67468894", "0.67402637", "0.66945475", "0.6690512", "0.66850644", "0.6683234", "0.66736454", "0.66716015", "0.6661474", "0.66590476", "0.66...
0.0
-1
Get the Author name from an author blog id.
private function getAuthorName($author_blog_id) { $author_name = FALSE; $entities = \Drupal::entityTypeManager()->getStorage('author')->loadByProperties(['blog_id' => $author_blog_id]); $author = ($entities) ? reset($entities) : NULL; if ($author) { $author_name = $author->getName(); } r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_author_name($auth_id = \\false)\n {\n }", "public function author()\n {\n if ($this->user_id) {\n $field = config(\"binshopsblog.comments.user_field_for_author_name\",\"name\");\n return optional($this->user)->$field;\n }\n\n return $this->author_n...
[ "0.76314276", "0.7373825", "0.73312485", "0.72659", "0.7216788", "0.71175075", "0.7105348", "0.7104557", "0.70795906", "0.7051872", "0.7022495", "0.6934566", "0.6896418", "0.68906105", "0.6866892", "0.68660015", "0.6820409", "0.6802287", "0.6796563", "0.67872316", "0.67832386...
0.82639575
0
Create a new message instance.
public function __construct(TravelGrant $travelgrant) { $this->travelgrant = $travelgrant; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We wi...
[ "0.81376195", "0.7959614", "0.77619994", "0.7713793", "0.76559645", "0.7553059", "0.7458076", "0.71510184", "0.6852663", "0.68347865", "0.67154217", "0.6689976", "0.6683088", "0.6644564", "0.6628052", "0.6549025", "0.6514292", "0.6501647", "0.645071", "0.645071", "0.645071", ...
0.0
-1
put your code here
public function __construct() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public...
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407"...
0.0
-1
Display a listing of the resource.
public function index(Request $request) { $kriteria['q'] = $request->input('q'); $kriteria['title'] = 'Data Alternatif'; $kriteria = Kriteria::all(); // $data['alternatifs'] = Alternatif::where('nama_alternatif','like','%'. $data['q'] . '%') // ->orderBy('Kode_alternatif'...
{ "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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236"...
0.0
-1
Show the form for creating a new resource.
public function create() { $kriteria['title'] = 'Tambah Kriteria'; $kriteria['atributs'] = ['benefit' => 'Benefit', 'cost' => 'Cost']; return view('pages.kriteria.create', $kriteria); }
{ "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) { $validateData = $request->validate([ 'kode_kriteria' => 'required|unique:tb_kriteria', 'nama_kriteria' => 'required', 'atribut' => 'required', 'bobot' => 'required', ], [ 'kode_kriteria.requ...
{ "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.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "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.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $data = Kriteria::findOrFail($id); // dd($items); return view('pages.kriteria.edit')->with([ 'data' => $data ]); }
{ "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.78560394", "0.76944435", "0.7274738", "0.7242069", "0.7171281", "0.70639855", "0.7054131", "0.6983364", "0.69478005", "0.69461757", "0.69413805", "0.69277894", "0.690145", "0.68984276", "0.68984276", "0.68784773", "0.68642735", "0.68610847", "0.6857929", "0.684406", "0.683...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $validateData = $request->validate([ 'nama_kriteria' => 'required', 'atribut' => 'required', 'bobot' => 'required', ], [ 'nama_kriteria.required' => 'Nama Kriteria harus di isi', 'atri...
{ "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) { $data = Kriteria::findOrFail($id); $data->delete(); return redirect()->route('kriteria.index'); }
{ "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.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Search the document history.
public function search(array $documentHistorySearchRequest) { return $this->_Search_operation->call(['documentHistorySearchRequest' => $documentHistorySearchRequest]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search_history()\n{\n\tglobal $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;\n\n\t// CONSTRUCT QUERY\n $sql = \"\n SELECT\n se_historyentries.historyentry_id,\n se_historyentries.historyentry_title,\n se_historyentries.historyentry_b...
[ "0.68784714", "0.6104553", "0.59918636", "0.59591234", "0.5950694", "0.5950129", "0.5950129", "0.580864", "0.5808256", "0.5746928", "0.5746928", "0.57243377", "0.56966686", "0.55908686", "0.5521908", "0.54962724", "0.5430041", "0.5417419", "0.5406597", "0.54057777", "0.540342...
0.5837603
7
Gets the latest version of a document.
public function get($id) { return $this->_Get_operation->call(['id' => $id]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getLatestVersion()\n {\n $latestVersion = trim($this->rfs->getContents($this->getOriginName(), $this->getBaseUrl() . '/version', false));\n\n return $latestVersion;\n }", "function getLatestRev() {\n\t\t$rev = $this->LatestRevPacked;\n\t\tif(!$rev && $this->URL) {\n\t\t\t$t...
[ "0.6914199", "0.69129026", "0.68626344", "0.68365955", "0.6797504", "0.65455997", "0.6522566", "0.6484227", "0.6444369", "0.63579017", "0.6323662", "0.62717307", "0.6267685", "0.62169206", "0.6216835", "0.62009734", "0.6198458", "0.61822283", "0.61756754", "0.6162422", "0.612...
0.0
-1
Gets the latest version of a document by specifiying a specific document version.
public function getVersion( $id, $version ) { return $this->_GetVersion_operation->call([ 'id' => $id, 'version' => $version ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findLatest()\n {\n foreach ($this->versions as $version) {\n if ($version->getVersion() === 'Unreleased') {\n continue;\n }\n\n return $version;\n }\n }", "public function getSpecifiedVersion();", "public function getRelease($v...
[ "0.65142757", "0.63607687", "0.6295082", "0.61648923", "0.61577463", "0.6088241", "0.6072338", "0.6018055", "0.599255", "0.5987464", "0.59642947", "0.5892331", "0.5822036", "0.58051234", "0.5743499", "0.5736164", "0.57211477", "0.56865555", "0.5683265", "0.5652545", "0.561530...
0.0
-1
Gets the difference on a document by comparing the provided version against the latest versions
public function getDifferenceLatest( $id, $oldVersion ) { return $this->_GetDifferenceLatest_operation->call([ 'id' => $id, 'oldVersion' => $oldVersion ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDiff($from_version, $to_version = null)\n\t{\n\t\tinclude_once 'Text/Diff.php';\n\t\t\n\t\t$info = array();\n\t\t\n\t\t// from\n\t\t$tmp = $this->store->getPage($this->area, $this->page, $from_version);\n\t\t$tmp['body'] = htmlspecialchars($tmp['body']);\n\t\t$from_lines = explode(\"\\n\", $tmp['body']...
[ "0.6586234", "0.6466178", "0.6179907", "0.6070726", "0.59414625", "0.5813486", "0.5793491", "0.5780064", "0.5658973", "0.5653192", "0.5622007", "0.5588661", "0.55751586", "0.5565256", "0.5520495", "0.55090815", "0.5497159", "0.5492641", "0.5492641", "0.5492641", "0.54787904",...
0.521144
69
Gets the difference on a document by comparing two document versions
public function getDifference( $id, $oldVersion, $newVersion ) { return $this->_GetDifference_operation->call([ 'id' => $id, 'oldVersion' => $oldVersion, 'newVersion' => $newVersion ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function action_diff()\n{\n\tglobal $pagestore, $page, $ver1, $ver2, $ParseEngine;\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $ver1;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $ver2;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\n\ttemplate_diff(array('page' => $p2->as_array(),\n\...
[ "0.6793132", "0.6594342", "0.6522758", "0.6179135", "0.6016554", "0.5849854", "0.5835805", "0.58346933", "0.550674", "0.54699445", "0.5448858", "0.54215956", "0.54055065", "0.5385214", "0.536672", "0.5356235", "0.5355161", "0.532292", "0.5321455", "0.5295176", "0.52845144", ...
0.54530925
10
/ If the unit testing doesn't work. Please open the route and comment out the middleware that I'm using. And lastly remove the Header Authorization here in the unit testing. /clients [GET]
public function testShouldReturnAllClients(){ $this->get("clients", ["Authorization" => "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik56WTRPREkyUVVJNU5VSTNRa05ETWpaRlF6RTNOREUwTlRrd09UZEJSVVkzTVVGRE16RXhPUSJ9.eyJpc3MiOiJodHRwczovL3Nvbm55MTk4Ny5hdXRoMC5jb20vIiwic3ViIjoiVVRYUTV1eEYwMzYyMVdHMGp2RkllSzBrbW0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_client_page_auth_check()\n {\n $response = $this->get(route('client.index'))->assertStatus(302);\n }", "public function getHelicopterAppApi()\n {\n $client = new \\GuzzleHttp\\Client();\n $url = \"http://localhost:8000/api/helicopters\";\n $res = $client->request('GET...
[ "0.69592667", "0.6668017", "0.6476774", "0.6405571", "0.6392435", "0.6392435", "0.6392435", "0.6388582", "0.63487405", "0.6288389", "0.6267343", "0.6255872", "0.6237533", "0.6233118", "0.623307", "0.6232956", "0.6232662", "0.6218714", "0.62155664", "0.6213458", "0.6212194", ...
0.7264086
0
/ GETTERS AND SETTERS
public function getId () : int { return $this -> id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setters();", "abstract protected function setRequiredGetters();", "abstract public function set();", "function doGetterSetter() {\n\tglobal $description_obj;\n\tglobal $table_name, $class_name;\n\tglobal $tabs, $tab2, $tab3;\n\n\tfComment($tabs,\"Getters and Setters\");\n\tforeach($des...
[ "0.70764416", "0.6947404", "0.67814124", "0.6570092", "0.63334507", "0.63334507", "0.63334507", "0.63334507", "0.63334507", "0.63334507", "0.6331191", "0.62754875", "0.6253727", "0.6253727", "0.6253727", "0.6253727", "0.6253727", "0.6253727", "0.6253727", "0.6253727", "0.6253...
0.0
-1
Registering function for the aspect Joinpoints.
public function registerJoinPoints(\Core\Aspect\AspectManager &$aspectManager) { $aspectManager->registerThrow("Core\MVC\CoreModel->*()" , '$this->manageException()'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function decoratorAdded() {}", "abstract protected function registerFunctions();", "public function addAspect(IAspect $aspect);", "function Piwik_AddAction( $hookName, $function )\n{\n\tPiwik_PluginsManager::getInstance()->dispatcher->addObserver( $function, $hookName );\n}", "function activate_p...
[ "0.5858761", "0.5532196", "0.5505618", "0.52666104", "0.51904213", "0.5153683", "0.5119845", "0.5117701", "0.50484097", "0.50355124", "0.5029312", "0.5029312", "0.49917266", "0.49790698", "0.49757907", "0.4962656", "0.4961618", "0.49439794", "0.49418497", "0.49386638", "0.491...
0.48919684
26
Manage any lifted exceptions in the class by adding the lifted exception to the class' internal exception and log it.
private function manageException(\Throwable $ex) { $this->exception = $ex; $logger = Container::getInstance()->set("\Core\Exceptions\Logger")->create(); $logger->logException($ex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function logException()\n {\n switch ($this->classShortName) {\n case 'IndexException':\n case 'CreateException':\n case 'ReadException':\n case 'UpdateException':\n case 'DeleteException':\n Log::error($this->message);\n ...
[ "0.63159585", "0.6270674", "0.5669977", "0.56298125", "0.5566446", "0.55256426", "0.5514989", "0.5508942", "0.5441384", "0.5435312", "0.543182", "0.5424126", "0.53731745", "0.5349001", "0.53020275", "0.5191632", "0.5163356", "0.51573205", "0.5118512", "0.5111621", "0.5101043"...
0.57478285
2
Get the current data in the model.
public function getData() { return $this->data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_data() {\n return $this->data;\n }", "public function data()\n {\n \tif (!isset($this->data)) {\n \t\t$this->setData();\n \t}\n \t\n \treturn $this->data->data();\n }", "public function get_data() {\r\n return $this->data;\r\n }", "public function ...
[ "0.77340645", "0.77263695", "0.77167857", "0.77045137", "0.77040154", "0.76638186", "0.75246197", "0.75216866", "0.751615", "0.75041807", "0.7499142", "0.7499142", "0.7499142", "0.7499142", "0.7499142", "0.7499142", "0.74724066", "0.7463888", "0.7426318", "0.7412057", "0.7365...
0.7216698
83
Return the last lifted exception in the model.
public function getException() { return $this->exception; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getException() {\n\t\treturn $this->lastException;\n\t}", "function get_last_error() {\n\t\treturn $this->errors[count($this->errors - 1)];\n\t}", "public function getPriorException(){\n // dont call this method getPrevious as in php5.3+ because this\n // method is final and we wa...
[ "0.7064171", "0.6807168", "0.6489214", "0.6432498", "0.6355262", "0.6339924", "0.628294", "0.62770575", "0.6238403", "0.6220892", "0.62064177", "0.6198524", "0.6178521", "0.6169842", "0.61682916", "0.6148923", "0.60785806", "0.60732746", "0.6056155", "0.60497195", "0.6024291"...
0.6174612
18
Create the event listener.
public function __construct(Store $session) { $this->session = $session; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRequestCreateListener($listener);", "public function onEvent();", "private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}", "public function listener(Listener $listener);", "protected function setupListeners()\n {\n ...
[ "0.65685207", "0.62875676", "0.6221792", "0.6197413", "0.61627764", "0.6129312", "0.6096226", "0.6056844", "0.6051069", "0.6041841", "0.596228", "0.596194", "0.5957539", "0.59439605", "0.58821785", "0.58821785", "0.5874665", "0.5864387", "0.5856076", "0.584338", "0.5824244", ...
0.0
-1
/ fetches the class's marksheet table
public function fetchMarksheetTable($classId = null) { if($classId) { $classData = $this->model_classes->fetchClassData($classId); $marksheetData = $this->model_marksheet->fetchMarksheetData($classId); $table = ' <div class="well"> Ngành học : '.$classData['class_name'].' </div> <div i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function return_table()\n {\n $table = \"classes\";\n return $table;\n }", "private function _fetch_table()\n {\n if (!isset($this->table))\n {\n $this->table = $this->_get_table_name(get_class($this));\n }\n }", "public function allmarksheet...
[ "0.6439768", "0.60545367", "0.60295135", "0.6014351", "0.5985693", "0.5959077", "0.5936427", "0.5936427", "0.5936427", "0.59247816", "0.59247816", "0.59247816", "0.59247816", "0.59247816", "0.59247816", "0.59247816", "0.58949804", "0.5873853", "0.58563155", "0.5830647", "0.58...
0.6844916
0
======================= =============================== ==Attendance============= ============================ =====================
public function fetchAttendaceType($id = null) { $classData = $this->model_section->fetchSectionDataByClass($id); $form = '<div class="form-group"> <label for="sectionName" class="col-sm-2 control-label">Lớp học</label> <div class="col-sm-10"> <select class="form-control" name="sectionNam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Attendance(){\t\t\n\t\tif($this->IsLoggedIn('cashier')){\t\t\t\n\t\t\t$data = $this->GetDataForCashier(\"Attendance\");\t\t\t\n\t\t\t$data['experts'] = $this->GetExperts();\t\n\t\t\t$data['attendance_today']=$this->CashierModel->CalculateAttendance();\t\t\t\n\t\t\n\t\t\t$data['sidebar_collapsed'] =...
[ "0.71250165", "0.7113097", "0.69333696", "0.69185835", "0.68807983", "0.6803668", "0.6720476", "0.6696979", "0.6576377", "0.6526271", "0.64818496", "0.64057726", "0.6371541", "0.63607395", "0.6346609", "0.6280011", "0.6279408", "0.6274503", "0.6274503", "0.6274503", "0.626822...
0.0
-1
/ fetches the class's section info
public function fetchClassSection($classId = null) { if($classId) { $sectionData = $this->model_section->fetchSectionDataByClass($classId); if($sectionData) { foreach ($sectionData as $key => $value) { $option .= '<option value="'.$value['section_id'].'">'.$value['section_name'].'</option>'; } //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventClassSections();", "public function get_section()\n\t\t{\n\t\t\t$retArr = null;\n\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->find_all();\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t\t\t$retArr[] = $obj->getBasics();\n\t\t\t}\n\n\t\t\treturn $retArr;\n\t\t}", "publi...
[ "0.71541375", "0.6443103", "0.6414751", "0.6387197", "0.630261", "0.6256556", "0.62296927", "0.620704", "0.6172234", "0.61535645", "0.6032271", "0.5914129", "0.58927006", "0.588019", "0.587934", "0.5797182", "0.5791736", "0.5779039", "0.57725704", "0.5757284", "0.575521", "...
0.5288703
76
/ create the attendance
public function createSchedule() { $validator = array('success' => false, 'messages' => array()); $attendance = $this->model_schedule->createSchedule(); if($attendance == true) { $validator['success'] = true; $validator['messages'] = 'Successfully Added'; } else { $validator['success'] = false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function attendance_add()\n {\n $attendance = new Attendance();\n $data = array();\n\n if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {\n if (!empty($_POST['title'])) {\n $check = Security::check_token();\n if ($check) {\n ...
[ "0.7010989", "0.679887", "0.6583544", "0.65722966", "0.6540496", "0.653836", "0.653384", "0.65201986", "0.64918983", "0.64174944", "0.6417152", "0.6416023", "0.63674814", "0.63487476", "0.6340577", "0.63238573", "0.62925875", "0.6267811", "0.6243443", "0.6238801", "0.62239254...
0.6078178
35
/ fetch the class and section type / fetch the attendance report
public function report($typeId = null, $reportDate = null, $numOfDays = null, $classId = null, $sectionId = null) { $year = substr($reportDate, 0, 4); $month = substr($reportDate, 5, 7); $classData = $this->model_classes->fetchClassData($classId); $sectionData = $this->model_section->fetchSectionByClassS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_student_class_attendance($class_id)\n\t\t{\n\t\t\t$array = array(\"attendance.status\"=>2,\"attendance.student_id !=\"=>0,\"attendance.attandence_class\"=>$class_id);\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('attendance');\n\t\t\t$this->db->join('student', 'student.student_id = attendance...
[ "0.6391119", "0.63426715", "0.62932795", "0.6200125", "0.61733025", "0.61121094", "0.6055582", "0.59462315", "0.59271497", "0.58695555", "0.5853994", "0.58522445", "0.58189523", "0.5809726", "0.5763236", "0.57507026", "0.57420826", "0.5716578", "0.57094455", "0.57076055", "0....
0.62899756
3
Returns false if false, else the string with end removed
public static function endsWith($str,$test) { if (! (substr( $str, -strlen( $test ) ) == $test) ) { return false; } return substr($str, 0, strlen($str) - strlen($test)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLastPartOfStringReturnsFalseForNotMatchingFirstPartDataProvider() {}", "public function endsWithReturnsFalseForNotMatchingLastPartDataProvider() {}", "public function testFalseEndsWith()\n {\n $this->assertFalse(Str::endsWith('foo', 'y'));\n }", "public function isLastPartOfStr...
[ "0.7759439", "0.7596207", "0.735031", "0.7016631", "0.6974347", "0.6906606", "0.68807906", "0.6858382", "0.6850971", "0.6815804", "0.6801761", "0.67987734", "0.67987734", "0.6780261", "0.6776123", "0.6754282", "0.6741944", "0.6741944", "0.6741944", "0.67400837", "0.6732458", ...
0.68450314
9
Returns the base action/partial name with Action/Parial removed
public static function getMethodBase($methodName) { BaseController::PARTIAL; BaseController::ACTION; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFullActionName()\n\t{\n\t\treturn $this->request->getFullActionName();\n\t}", "public function getFullActionName()\n {\n return $this->request->getFullActionName();\n }", "function _get_action()\n {\n $retval = preg_quote($this->object->param('action'), '/');\n ...
[ "0.7410315", "0.74086", "0.72740877", "0.7240226", "0.69605225", "0.69071865", "0.6815265", "0.6772319", "0.6734674", "0.6706184", "0.6613988", "0.6600211", "0.6589893", "0.65857226", "0.65550375", "0.6550951", "0.6522431", "0.6520737", "0.6452029", "0.644644", "0.6441819", ...
0.0
-1
Gets the string string "controller/method" for tempaltes
public static function getDefaultTemplate($controllerName, $methodName) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTemplate()\r\n {\r\n $request = Registry::getInstance()->get('Request');\r\n\r\n return implode(\r\n DIRECTORY_SEPARATOR,\r\n array(\r\n APPLICATION_PATH,\r\n $this->templatePath,\r\n $request->getControllerNa...
[ "0.69938076", "0.67720014", "0.64068085", "0.64068085", "0.6397738", "0.62549055", "0.62549055", "0.62549055", "0.62549055", "0.6229369", "0.6221983", "0.6206318", "0.6201155", "0.60911167", "0.6085353", "0.6024694", "0.602256", "0.59858596", "0.5982624", "0.5938506", "0.5936...
0.0
-1
Display a listing of the resource.
public function viewBlocks() { $title = 'Welcome to Laravel!'; return view('blocks.view-blocks')->with('title',$title); }
{ "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.75921303", "0.75921303", "0.7586987", "0.75781953", "0.756992", "0.7498765", "0.7435984", "0.74298537", "0.7385191", "0.7350131", "0.7336855", "0.73092943", "0.72943234", "0.72800833", "0.7271207", "0.7241119", "0.7229479", "0.7222803", "0.71828884", "0.7176647", "0.717184...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "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.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "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.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "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) { // }
{ "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.7423347", "0.70622426", "0.70568657", "0.6896551", "0.65835553", "0.64519453", "0.6348333", "0.6212436", "0.61450946", "0.6122591", "0.6114199", "0.6101911", "0.60876113", "0.60528636", "0.60177964", "0.6006609", "0.59725446", "0.594558", "0.59395295", "0.5938792", "0.5893...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "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.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
proses tambah berhasil langsung dialihkan
public function add($data){ $this->db->insert('tbl_petugas', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tambah()\n\t{\n\t\t$data['departemen'] = $this->Mdepartemen->tampil_departemen();\n\t\t//mengambil data dari fungsi tampil_pegawai\n\t\t$data['pegawai'] = $this->Mpegawai->tampil_pegawai();\n\t\t//mengambil data dari fungsi tampil_kategori\n\t\t$data['kategori'] = $this->Mkategori->tampil_kategori();\n\t\...
[ "0.77380943", "0.7581943", "0.74541795", "0.73790556", "0.7374834", "0.73163694", "0.7299199", "0.72609967", "0.7187518", "0.7181537", "0.71769106", "0.7127629", "0.71091723", "0.70687544", "0.70630574", "0.70385265", "0.7018722", "0.69738483", "0.6963935", "0.6963748", "0.69...
0.0
-1
Project: Growing Logic Web platform to aid the teaching of computational thinking for public and private institutions
function str_replace_first($search, $replace, $subject) { $pos = strpos($subject, $search); if ($pos !== false) { return substr_replace($subject, $replace, $pos, strlen($search)); } return $subject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n $policies = array(\n '1' => '1.\tImprove access & equity in higher education',\n '2' => '2.\tImprove internal efficiency in higher education',\n '3' => '3.\tImprove quality & relevance of higher education',\n '4' => '4.\tImprove gend...
[ "0.57551736", "0.5686251", "0.56719196", "0.56434065", "0.5616837", "0.5552319", "0.5488141", "0.5448314", "0.5419554", "0.5400083", "0.53180385", "0.5283215", "0.5253244", "0.524796", "0.5236604", "0.52365726", "0.5185107", "0.516029", "0.5151446", "0.5149498", "0.51415986",...
0.0
-1
unset the owning side of the relation if necessary
public function setOtherParticipant(?OtherParticipant $otherParticipant): self { if ($otherParticipant === null && $this->otherParticipant !== null) { $this->otherParticipant->setLegalPerson(null); } // set the owning side of the relation if necessary if ($otherParticipa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dissociate()\n {\n $this->farChild->setAttribute($this->firstKey, null);\n\n return $this->farChild->setRelation($this->relation, null);\n }", "public function isRemoveFromRelationship();", "public function clearPartnerssRelatedByPatientId()\n {\n $this->collPartne...
[ "0.63328475", "0.6278603", "0.60386664", "0.5973452", "0.58906764", "0.5881164", "0.5839303", "0.58279693", "0.57461524", "0.57347137", "0.5606209", "0.5605955", "0.560582", "0.5590474", "0.55903083", "0.5553009", "0.5519631", "0.54708207", "0.54617864", "0.5437423", "0.54134...
0.0
-1
unset the owning side of the relation if necessary
public function setExecutive(?Executive $executive): self { if ($executive === null && $this->executive !== null) { $this->executive->setLegalPerson(null); } // set the owning side of the relation if necessary if ($executive !== null && $executive->getLegalPerson() !== $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dissociate()\n {\n $this->farChild->setAttribute($this->firstKey, null);\n\n return $this->farChild->setRelation($this->relation, null);\n }", "public function isRemoveFromRelationship();", "public function clearPartnerssRelatedByPatientId()\n {\n $this->collPartne...
[ "0.6332262", "0.6278244", "0.603881", "0.5974293", "0.5893006", "0.58798075", "0.5837344", "0.58280724", "0.57459784", "0.57335603", "0.5606816", "0.56056285", "0.5603825", "0.559028", "0.55886203", "0.5551526", "0.55196214", "0.5470628", "0.5461604", "0.54381514", "0.5413374...
0.0
-1
unset the owning side of the relation if necessary
public function setAssociate(?Associate $associate): self { if ($associate === null && $this->associate !== null) { $this->associate->setLegalPerson(null); } // set the owning side of the relation if necessary if ($associate !== null && $associate->getLegalPerson() !== $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dissociate()\n {\n $this->farChild->setAttribute($this->firstKey, null);\n\n return $this->farChild->setRelation($this->relation, null);\n }", "public function isRemoveFromRelationship();", "public function clearPartnerssRelatedByPatientId()\n {\n $this->collPartne...
[ "0.6332262", "0.6278244", "0.603881", "0.5974293", "0.5893006", "0.58798075", "0.5837344", "0.58280724", "0.57459784", "0.57335603", "0.5606816", "0.56056285", "0.5603825", "0.559028", "0.55886203", "0.5551526", "0.55196214", "0.5470628", "0.5461604", "0.54381514", "0.5413374...
0.0
-1
Display a listing of the resource.
public function index(Chunk $chunk) { $user = $chunk->transaction->user; return $this->showOne($user); }
{ "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
Get the type of item
public function getType() { return $this->type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypeOfItem()\n {\n return $this->type;\n }", "public function type(): string\n {\n return $this->item['type'];\n }", "public function get_type() {\n\t\treturn isset( $this->item['type'] ) ? esc_attr( $this->item['type'] ) : false;\n\t}", "public function get_item_...
[ "0.8958674", "0.8254227", "0.81540245", "0.7931198", "0.7861965", "0.77731735", "0.76110286", "0.75611854", "0.7532477", "0.7512634", "0.7508712", "0.7477433", "0.74753034", "0.7471203", "0.74619067", "0.74619067", "0.74619067", "0.7461859", "0.7461859", "0.7461859", "0.74618...
0.0
-1
Set the type of item
public function setType($type): Filemanager { $this->type = $type; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setType($type) {}", "public function setType($type){ }", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "public function setType($type);", "public function setType($type);", "public function setType($type);", "...
[ "0.7608214", "0.75960016", "0.75495374", "0.75495374", "0.7512871", "0.7512871", "0.7512871", "0.7512871", "0.7512871", "0.7512871", "0.7512871", "0.7512871", "0.75047445", "0.74713886", "0.74694693", "0.7376642", "0.7368976", "0.7357867", "0.7357867", "0.7357867", "0.7356744...
0.0
-1
Get last updated datas from generated file
public function getLastUpdatedDatas(): array { $default = ['_wpgb_last_sync' => 0]; $lastUpdatedFile = $this->getLastUpdatedFile(); if (!file_exists($lastUpdatedFile)) { return $default; } $this->lastUpdated = include $lastUpdatedFile; if (!is_array($t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastUpdated();", "function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}", "function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }", "function getUpdatedata()\r\n\t{\r\n\r\n\t\t$elsettings = ELAdmin::config();\r\n\...
[ "0.67297137", "0.6566174", "0.63982856", "0.6390526", "0.6368484", "0.6368484", "0.6304694", "0.61964375", "0.6180791", "0.6179822", "0.6175283", "0.6159767", "0.6139355", "0.6110932", "0.6088952", "0.60726416", "0.6061608", "0.60560626", "0.604489", "0.60127044", "0.60126656...
0.7029623
0
Get the last updated time
public function getLastUpdated($itemSlug = '_wpgb_last_sync'): int { if (!is_null($this->lastUpdated) && isset($this->lastUpdated[$itemSlug])) { return $this->lastUpdated[$itemSlug]; } $this->lastUpdated = $this->getLastUpdatedDatas(); return (int)($this->lastUpdated[$i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }", "public function getLastUpdateTime()\n\t{\n\t\treturn empty($this->lastUpdateTime) ? time() : $this->lastUpdateTime;\n\t}", "public function getUpdatedTime() {\r\n return $this->updated_time;\r\n }", "public func...
[ "0.8686498", "0.8473346", "0.8449127", "0.8371488", "0.83354884", "0.8262597", "0.82565516", "0.8240394", "0.8182521", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", ...
0.0
-1
Set the last update time
public function setLastUpdated(int $lastUpdated, string $label = '_wpgb_last_sync'): Filemanager { $params = $this->getLastUpdatedDatas(); $path = $this->getLastUpdatedFile(); $params[$label] = $lastUpdated; if ($label !== '_wpgb_last_sync') { $params['_wpgb_last_sync']...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function setSyncLastTime()\n {\n DB::update(\"UPDATE `sync_last_time` SET timestamp = ? WHERE id=?\", [time(), 1]);\n }", "private function set_last_updated_at() {\n\n\t\tif ( ! static::get_table() instanceof TimestampedTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dirty = $this->is_dirty...
[ "0.8155485", "0.77068883", "0.74061143", "0.7370321", "0.7333412", "0.72929245", "0.72300535", "0.72154397", "0.71358526", "0.70852673", "0.70781827", "0.7046952", "0.7044843", "0.7026482", "0.7024208", "0.6999232", "0.6966089", "0.69466645", "0.6945771", "0.6941941", "0.6928...
0.0
-1
Get the last updated time from database
public function getDbLastUpdated($itemSlug = '_wpgb_last_sync'): int { $lastUpdated = $this->getDbLastSync(); if (!isset($lastUpdated[$itemSlug])) { $lastUpdated[$itemSlug] = 0; } return (int)$lastUpdated[$itemSlug]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastUpdatedTime() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'last-updated-time' field\n assert(isset($this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]));\n \n return $this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY...
[ "0.82712525", "0.8089064", "0.8056265", "0.8006304", "0.79064226", "0.778679", "0.7732577", "0.7727924", "0.7718884", "0.7701962", "0.7662897", "0.7662897", "0.7648392", "0.763974", "0.763974", "0.7627361", "0.7613628", "0.76116157", "0.76116127", "0.7606241", "0.7593019", ...
0.0
-1
Get the last updated time from database
public function setDbLastUpdated($lastUpdated, string $label = '_wpgb_last_sync'): bool { $lastSync = $this->getDbLastSync(); $lastSync[$label] = $lastUpdated; if ($label !== '_wpgb_last_sync') { $lastSync['_wpgb_last_sync'] = $lastUpdated; } $lastSync = $this->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastUpdatedTime() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'last-updated-time' field\n assert(isset($this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]));\n \n return $this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY...
[ "0.82712525", "0.8089064", "0.8056265", "0.8006304", "0.79064226", "0.778679", "0.7732577", "0.7727924", "0.7718884", "0.7701962", "0.7662897", "0.7662897", "0.7648392", "0.763974", "0.763974", "0.7627361", "0.7613628", "0.76116157", "0.76116127", "0.7606241", "0.7593019", ...
0.0
-1
Get the last updated time
public function getLastUpdatedFile(): string { $path = $this->getJsonTypeFolder(); $this->lastUpdatedFile = $path . DIRECTORY_SEPARATOR . 'last-updated.php'; return $this->lastUpdatedFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }", "public function getLastUpdateTime()\n\t{\n\t\treturn empty($this->lastUpdateTime) ? time() : $this->lastUpdateTime;\n\t}", "public function getUpdatedTime() {\r\n return $this->updated_time;\r\n }", "public func...
[ "0.8686498", "0.8473346", "0.8449127", "0.8371488", "0.83354884", "0.8262597", "0.82565516", "0.8240394", "0.8182521", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", "0.8171897", ...
0.0
-1
Set the last updated file
public function setLastUpdatedFile(string $lastUpdatedFile): Filemanager { $this->lastUpdatedFile = $lastUpdatedFile; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_recently_edited($file)\n {\n }", "private function set_last_updated_at() {\n\n\t\tif ( ! static::get_table() instanceof TimestampedTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dirty = $this->is_dirty();\n\n\t\t$this->set_attribute( static::get_table()->get_updated_at_column(), $this->fresh_times...
[ "0.66107726", "0.64566094", "0.6416091", "0.63932437", "0.636297", "0.6277795", "0.6251553", "0.6227783", "0.62220216", "0.62154377", "0.6203205", "0.61497694", "0.61457026", "0.6139894", "0.61393416", "0.61297613", "0.60660297", "0.6062222", "0.6053718", "0.6049115", "0.6048...
0.61478996
12
Indicate if synchronisation is needed
public function needToSync(string $slug = '_wpgb_last_sync'): bool { $lastUpdated = $this->getLastUpdated($slug); $dbLastUpdated = $this->getDbLastUpdated($slug); return $dbLastUpdated !== $lastUpdated; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function check_sync()\n {\n }", "public function beforeSyncing() {}", "public function is_synchronised_with_external() {\n return false;\n }", "function canRunSynchronization( $synk )\n {\n return SynkHelperSynchronizations::canRun( $synk );\n }", "abstract protected fun...
[ "0.71573484", "0.7011674", "0.69501686", "0.664892", "0.6419912", "0.6383724", "0.6236275", "0.6183338", "0.61810786", "0.6172207", "0.6096192", "0.60919535", "0.6088453", "0.60672057", "0.60423964", "0.6012649", "0.6012649", "0.6012649", "0.6012649", "0.6012649", "0.60001117...
0.0
-1
Create json folders if needed
public function maybeCreateJsonFolder() { $path = $this->getJsonFolder(); if (!file_exists($path)) { mkdir($path, 0777, true); } if (!file_exists($path . DIRECTORY_SEPARATOR . $this->type)) { mkdir($path . DIRECTORY_SEPARATOR . $this->type, 0777, true); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_folder($json_path,$name){\n\tif (!file_exists($json_path)){\n\t\tmkdir($json_path, 0777);\n\t}\n\tif(!file_exists($json_path.'_info.json')){\n\t\t$fp = fopen($json_path.'_info.json','w');\n\t\tfwrite($fp,'[]');\n\t\tfclose($fp);\n\t}\n\tif (file_exists($json_path.$name)){\n\t\treturn 'folder exist'...
[ "0.75539535", "0.72299606", "0.69478077", "0.66032505", "0.65489686", "0.6457422", "0.6383531", "0.63791955", "0.6326167", "0.6315164", "0.6243355", "0.6229677", "0.62111354", "0.615342", "0.6150553", "0.6147826", "0.61475325", "0.611959", "0.61034745", "0.6090873", "0.608673...
0.83077216
0
Return the main json folder
protected static function getJsonFolder(): string { return apply_filters('wpgb_extended/sync/json_folder', get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'wpgb-json'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getJsonFilePath()\n {\n $menusetConfig = self::getMenusetConfig();\n //return Globals::getWorkFolder() . $menusetConfig->setting->fileName;\n return Globals::getDataFilePath($menusetConfig->setting->fileName_detail);\n }", "private static function folders_path(){...
[ "0.7276001", "0.72007674", "0.7038732", "0.69294846", "0.6918873", "0.676119", "0.67483765", "0.6615697", "0.6529628", "0.64791346", "0.6445162", "0.64349157", "0.6339038", "0.63173676", "0.6306815", "0.629962", "0.6207142", "0.61385286", "0.6133637", "0.6100365", "0.6046247"...
0.76785845
0
Return the specific type json folder
protected function getJsonTypeFolder(): string { $path = self::getJsonFolder(); return $path . DIRECTORY_SEPARATOR . $this->type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function getJsonFolder(): string\n {\n return apply_filters('wpgb_extended/sync/json_folder', get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'wpgb-json');\n }", "public function include_json_folders()\n {\n }", "private static function folders_path(){\n\t\treturn dirname...
[ "0.70150065", "0.68049645", "0.64805144", "0.62121886", "0.62039524", "0.6192704", "0.61773866", "0.6164664", "0.6017311", "0.6006568", "0.59874046", "0.59389734", "0.59311026", "0.5891274", "0.58490455", "0.58218867", "0.5793915", "0.57829434", "0.5710022", "0.57071495", "0....
0.8447692
0
Save settings as json and set the last updated time
public function saveJson(string $name, string $content) { $path = $this->getJsonTypeFolder(); file_put_contents($path . DIRECTORY_SEPARATOR . $name . '.json', $content); $this->setLastUpdated(time(), $name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveSettings()\n {\n if (empty($this->settings)) {\n $this->loadSettings();\n }\n \n $this->saveJSON($this->settings);\n }", "function saveSettings() {\n\tglobal $settings;\n\n\tfile_put_contents(\"settings.json\",json_encode($settings));\n}", "publi...
[ "0.7405312", "0.6793265", "0.6640655", "0.65956676", "0.65198445", "0.6450654", "0.6404701", "0.6340072", "0.62275654", "0.6214429", "0.6209452", "0.6187868", "0.6122784", "0.6117731", "0.60385954", "0.6028505", "0.6024241", "0.6006386", "0.59223825", "0.5914149", "0.58978826...
0.0
-1
Read a json file
public function parseJson(string $file) { $content = file_get_contents($file); return \json_decode($content); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function json_read($filename){\n return json_decode(file_get_contents($filename));\n}", "function readJsonFile($filename) {\n\t$json = json_decode(@file_get_contents($filename),true);\n\tif ( ! is_array($json) ) $json = array();\n\treturn $json;\n}", "function readJson($filename) {\n \n $te...
[ "0.79514337", "0.7865504", "0.78247106", "0.7576073", "0.7571271", "0.7434036", "0.7419001", "0.7372866", "0.72928673", "0.7259306", "0.7254342", "0.71200526", "0.7070055", "0.70441836", "0.7031629", "0.6998458", "0.6982351", "0.69753885", "0.68962073", "0.6868484", "0.683595...
0.640348
39
Collect every json file of a type folder
public function getJsonFiles(): array { $path = $this->getJsonTypeFolder(); $jsonFiles = []; $files = scandir($path); foreach ($files as $file) { if (strpos($file, '.json') === false) { continue; } $jsonFiles[] = $path . DIRECTORY_S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processJsonFiles(){\n $filesList = $this->getFileList();\n foreach ($filesList as $key => $file) {\n //do this at your will\n if( !preg_match('/.json/', $file['Key'] ) ){\n continue;\n }\n $fileContents = $this->getFile($file['Key']);\n $...
[ "0.7034094", "0.6906213", "0.6539305", "0.6511431", "0.65092164", "0.64476544", "0.64411676", "0.63871026", "0.6383563", "0.6319127", "0.6294584", "0.62943304", "0.6272639", "0.62444866", "0.62372977", "0.6188171", "0.6174124", "0.6110392", "0.60559785", "0.6037714", "0.60178...
0.6962261
1
Tests the builder creating all the parameters available to set and verify them
public function testBuilder() { $dto = $this->builder ->create() ->setMaxResults(GetInboxMessagesRequestBuilderTest::MAX_RESULTS) ->build(); $this->assertInstanceOf('HP\Bundle\EmailApiBundle\Request\DTO\GetInboxMessagesRequestDTO', $dto); $this->assertEqu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetParams(): void\n {\n $set = $this->class->setParams([$this->value]);\n\n self::assertTrue($set instanceof Command);\n }", "protected function setUp()\n {\n// $this->validOptions = array(\n// 'checksum' => true,\n// 'delete'\n// );\...
[ "0.6451623", "0.63933223", "0.63632905", "0.63543475", "0.6306916", "0.6305736", "0.62479925", "0.6213294", "0.61614794", "0.6138142", "0.61379224", "0.6134183", "0.6093074", "0.6072034", "0.60620826", "0.60272306", "0.59982973", "0.59797126", "0.597678", "0.59641635", "0.596...
0.55412626
75
Display a listing of the resource.
public function index($id) { //dd($id); $jadwal = DB::table('jadwal') ->select( 'dosen.nama as namadosen', 'mata_kuliah.nama_mata_kuliah as matkul', 'hari as day' ) ->join('dosen', 'jadwal.dosen_id', '=', 'dosen.id') ->join('mata_ku...
{ "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.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) { $data = $request->all(); if(count($request->matkul) > 0){ foreach($request->jadwalmatkul as $jadwal=>$j){ $data2=array( 'hari'=>$request->jadwalmatkul[$jadwal], 'mata...
{ "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.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "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.8233183", "0.81894475", "0.6830127", "0.6498529", "0.6496276", "0.6469191", "0.64627224", "0.63619924", "0.6308743", "0.62809277", "0.6218707", "0.61915004", "0.617914", "0.6172935", "0.6137578", "0.6118736", "0.6107122", "0.6106576", "0.60931313", "0.60798067", "0.6046669...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "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) { // }
{ "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) { // }
{ "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.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Display a listing of the resource.
public function index() { $products = Cart::all(); return view('cart') ->with('cart',$products); }
{ "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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236"...
0.0
-1
Show the form for creating a new resource.
public function create($request) { }
{ "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
Run the database seeds.
public function run() { $Brand_Categories=[ [ 'brand_id'=>'1', 'category_id'=>'1' ], [ 'brand_id'=>'2', 'category_id'=>'1' ], [ 'brand_id'=>'3', 'catego...
{ "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
Register a new relationship
public function register($labels, int $index) { if (\is_array($labels)) { $labelsArr = $labels; $labelsStr = \implode('.', $labels); } else { $labelsArr = \explode('.', $labels); $labelsStr = (string) $labels; } if (!isset($this->label...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRelationship(string $name, $relationship);", "public function isAddToRelationship();", "public function createRelationship() {\n\t\tthrow new CmisNotImplementedException(\"createRelationship\");\n\t}", "function register_aliment_brand_relationship() {\n\t\\IA\\One_To_Many_Post_Relationship...
[ "0.7269738", "0.70772254", "0.6527763", "0.6421987", "0.63602823", "0.6162585", "0.6123356", "0.6080433", "0.5935522", "0.58537376", "0.57991076", "0.57363915", "0.5720337", "0.57182944", "0.57116055", "0.5698241", "0.5680822", "0.5676737", "0.5676613", "0.56480694", "0.56465...
0.0
-1
Lookup the index of a label
public function lookupIndex(string $label) { return $this->labels[$label] ?? null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lookupLabel(int $index)\n {\n return $this->indexes[$index] ?? null;\n }", "public function GetLabel();", "function getIndex() ;", "public function get_label();", "public function get_label();", "public function getLabel();", "public function getLabel();", "public functio...
[ "0.72276825", "0.6454806", "0.636854", "0.62853074", "0.62853074", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6223959", "0.6198113", ...
0.7951311
0
Lookup the label at an index
public function lookupLabel(int $index) { return $this->indexes[$index] ?? null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lookupIndex(string $label)\n {\n return $this->labels[$label] ?? null;\n }", "public function GetLabel();", "abstract public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", ...
[ "0.7476152", "0.6379196", "0.63355064", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.6267846", "0.62435514", "0.62346274", "0.62346274",...
0.7881136
0
Function that register blog masonry gallery template
function fiorello_mikado_register_blog_masonry_gallery_template_file( $templates ) { $templates['blog-masonry-gallery'] = esc_html__( 'Blog: Masonry Gallery', 'fiorello' ); return $templates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function neobeat_enqueue_masonry_scripts_for_templates() {\n\t\t$post_type = apply_filters( 'neobeat_filter_allowed_post_type_to_enqueue_masonry_scripts', '' );\n\t\t\n\t\tif ( ! empty( $post_type ) && is_singular( $post_type ) ) {\n\t\t\tneobeat_include_masonry_scripts();\n\t\t}\n\t}", "function theme_add_mason...
[ "0.6735096", "0.6649736", "0.6622598", "0.6499259", "0.6481037", "0.64391905", "0.64087397", "0.63375896", "0.6336379", "0.6266598", "0.6247687", "0.62358123", "0.6213242", "0.6207902", "0.6183024", "0.6178521", "0.61648464", "0.6153471", "0.6149904", "0.6101552", "0.6085639"...
0.7878293
0