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
the result of query is an array of object
public function __call($name, $argument){ if(strtolower(substr($name, 0, 7)) == 'queryby'){ $proper = strtolower(substr($name, 7)); if(strtolower($proper) != 'all'){ $ps = explode("_", $proper); $where = array(); for($i=0; $i<count($ps); $i++) $where[$ps[$i]] = $argument[$i]; $sql = "select * from ".$this->modName." ".$this->parseWhere($where); }else{ $sql = "select * from ".$this->modName; } $mysql = new DbMysql(Config::$config); $results = $mysql->query($sql); $res = array(); if($results){ foreach($results as $result){ $r = new Model(); foreach($result as $index => $value){ $r->{$index} = $value; } $res[] = $r; } return $res; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray()\n {\n return $this->query->findAll();\n }", "public function getResult() {\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "public function results()\n {\n //by default data get as array/stdclasses\n\n // to truni...
[ "0.7285592", "0.72355556", "0.7223293", "0.7122238", "0.7097079", "0.7091295", "0.704751", "0.70346886", "0.70292515", "0.6969334", "0.69539505", "0.6952952", "0.6927832", "0.6915799", "0.6869562", "0.68644124", "0.6862827", "0.6840711", "0.6837606", "0.6827231", "0.68017244"...
0.0
-1
/$datas = array(array('filename' => 'xxx', 'contents' => 'yyyyy'), array('filename' => 'xxx', 'contents' => 'yyyyy'));
public function add($datas, $options=''){ $fields = array_keys($datas[0]); foreach($datas as $data){ $value = array(); foreach($data as $key => $val){ $val = $this->parseValue($val); if(is_scalar($val)){ $value[] = $val; } } $values[] = '('.implode(',', $value).')'; } $sql = "insert into ". $this->modName. "(". implode(',', $fields). ') values '.implode(',',$values); // echo $sql."<br/>"; $mysql = new DbMysql(Config::$config); return $mysql->execute($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDatas(array $datas){\n\t\tforeach($datas as $k=>$v)\n\t\t\t$this->__set($k,$v);\n\t\treturn $this;\n\t}", "public function importArray($data);", "function prepara_para_json($array) {\n return array(\"data\" => $array);\n}", "function prepara_para_json($array) {\n return array(\"data\" => $a...
[ "0.572569", "0.563453", "0.56290877", "0.56290877", "0.56248975", "0.5595201", "0.54985356", "0.5410067", "0.54024047", "0.53835887", "0.53685755", "0.5361213", "0.53497297", "0.5346931", "0.5326384", "0.5282348", "0.5267896", "0.52468663", "0.5245748", "0.52289814", "0.52153...
0.0
-1
/$options=array('table' => 'xxx' 'where')
public function del($options){ $sql = "delete from " .$this->modName." " .$this->parseWhere($options['where']); $mysql = new DbMysql(Config::$config); return $mysql->execute($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Private function where($tableName,array $conditions,array $options = array()){\n\t\tif(empty ($options))$options = array('prepend' => true ,'join' => ' AND ');\n\t\tif(!isset($options['join'])) $options['join'] = ' AND ';\n\t\t$ops = $this->_operators;\n\t\t$schema = $this->schema[$tableName];\n\t\t$conditions = ...
[ "0.6198988", "0.6081434", "0.58593273", "0.5847962", "0.58294785", "0.58288777", "0.581065", "0.5807992", "0.5788536", "0.5723299", "0.572035", "0.5690844", "0.5657299", "0.56246054", "0.56160915", "0.5613016", "0.5603739", "0.5541488", "0.54946065", "0.5479842", "0.5475485",...
0.0
-1
/$where = array('col' => 'val'...)
public function parseWhere($where){ $whereStr = ''; if(is_string($where)){ $whereStr = $where; }else{ $str = array(); foreach($where as $key => $val){ $str[] = "`$key` = ".Model::parseValue($val); } $whereStr = "where ".implode(" AND ", $str); } return $whereStr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function where(array $where);", "public function where($arr){//ex of $arr : ['name' => 'LIKE A%','email' => '= test@test.com']\n $c = \"\";\n $x = 0;\n foreach($arr as $key => $v){//for each param, translate to SQL language\n if($x != 0){\n $c .= \" AN...
[ "0.73803544", "0.7288186", "0.72726387", "0.7245894", "0.70699275", "0.7027171", "0.70168185", "0.68778783", "0.68465745", "0.6842525", "0.6837362", "0.670931", "0.6706195", "0.6630591", "0.6585834", "0.65833116", "0.6576636", "0.6556071", "0.6546478", "0.6546478", "0.6539162...
0.6422999
28
/$set = array('col' => 'val')
public function parseSet($set){ $setStr = ''; $str = array(); foreach($set as $key => $val){ $str[] = "`$key` = ".Model::parseValue($val); } $setStr = "set ".implode(",", $str); // echo $setStr."<br/>"; return $setStr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($column,$value);", "protected function create_set($data = []){\n $set = '';\n foreach($data as $column => $value){\n // make sure it is in our column list before we add it to the WHERE\n if(in_array($column, $this->column_list)){\n // the fir...
[ "0.64909154", "0.60334903", "0.59754735", "0.59642744", "0.58514893", "0.58266497", "0.57646596", "0.5720277", "0.57064664", "0.5668795", "0.56210726", "0.559043", "0.5570253", "0.5541966", "0.55301577", "0.5516563", "0.546392", "0.54529035", "0.5445185", "0.54255503", "0.540...
0.5984525
2
constructor name this the same as the class above
function __construct() { /* Widget settings. */ $widget_ops = array( 'classname' => 'newsletter-signup', 'description' => 'EK newsletter subscription box.' ); /* Widget control settings. */ $control_ops = array('newsletter-signup'); /* Create the widget. */ parent::WP_Widget( 'newsletter-signup', 'EK Newsletter Signup', $widget_ops, $control_ops ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private fun...
[ "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8325605", "0.8259343", "0.8252332", "0.82465786", "0.8234809", ...
0.0
-1
Run the database seeds.
public function run() { $data = [ [ 'name' => 'from', 'label' => 'From', ], [ 'name' => 'to', 'label' => 'To', ], [ 'name' => 'cc', 'label' => 'Cc', ], [ 'name' => 'bcc', 'label' => 'Bcc', ], [ 'name' => 'subject', 'label' => 'Subject', ], ]; if (config('asseco-plan-router.migrations.uuid')) { foreach ($data as &$item) { $item = array_merge($item, [ 'id' => Str::uuid(), ]); } } /** @var Model $rule */ $rule = app(Rule::class); $rule::query()->upsert($data, ['name'], ['name']); }
{ "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
Filter the results by part of the boat name.
public function filterByName($name) { $name = (string) $name; if ($name !== '') { $this->query->andWhere($this->query->expr()->like('b.name', $this->query->createNamedParameter('%' . addcslashes($name, '%_\\') . '%'))); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filter($builder, $value)\n {\n return $builder->where('vehicleName', 'LIKE', '%' . $value . '%');\n }", "public function filtering();", "public function filterByName($filter) {\n if (strlen($filter) > 0) {\n $this->calcData = array_filter($this->calcData, function...
[ "0.6073091", "0.5935709", "0.58008975", "0.5750423", "0.5692186", "0.5665151", "0.5646273", "0.5532532", "0.54919654", "0.5470675", "0.5428523", "0.5417336", "0.54082245", "0.5333248", "0.5302756", "0.52451515", "0.52199554", "0.51648855", "0.5154802", "0.5139016", "0.5129878...
0.64674014
0
Filter the enabled/disabled boats.
public function filterByEnabled($enabled) { $this->query->andWhere($this->query->expr()->eq('b.enabled', $enabled ? 1 : 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filtering();", "private function filters() {\n\n\n\t}", "abstract public function filters();", "public function filterable()\n {\n return true;\n }", "public function getFilterables()\n {\n return $this->filterables;\n }", "public function filter();", "protecte...
[ "0.63596225", "0.6135706", "0.6025028", "0.60215056", "0.5853914", "0.5835337", "0.5805598", "0.5772712", "0.57505715", "0.57185376", "0.5702651", "0.5702651", "0.56909674", "0.56608564", "0.56291145", "0.55991143", "0.5556963", "0.5549576", "0.55153334", "0.5514187", "0.5499...
0.55017865
20
Include in the results only the boats without a length.
public function filterByWithoutLength() { $this->query->andWhere($this->query->expr()->isNull('b.length')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByWithLength()\n {\n $this->query->andWhere($this->query->expr()->isNotNull('b.length'));\n }", "protected function notbilled()\n {\n $this->builder = $this->billable();\n return $this->builder->where('billed', false);\n }", "protected function billed()\n ...
[ "0.7014429", "0.5278815", "0.5187863", "0.50470454", "0.50388557", "0.4918369", "0.48931602", "0.48479065", "0.48432633", "0.47818652", "0.47742674", "0.47298694", "0.47029838", "0.46926188", "0.4689669", "0.46764213", "0.46739402", "0.46683168", "0.4661202", "0.46375296", "0...
0.69222325
1
Include in the results only the boats with a length.
public function filterByWithLength() { $this->query->andWhere($this->query->expr()->isNotNull('b.length')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByWithoutLength()\n {\n $this->query->andWhere($this->query->expr()->isNull('b.length'));\n }", "function mt_filter_excerpt_length($length) {\n\treturn 20;\n }", "public function hasLength(){\n return $this->_has(2);\n }", "public function setLength($length)\n {...
[ "0.5822987", "0.5197118", "0.51970273", "0.51788896", "0.51788896", "0.51726323", "0.5154719", "0.514515", "0.51411724", "0.51280284", "0.5121146", "0.51168287", "0.51014787", "0.50806004", "0.50761193", "0.5058604", "0.49362087", "0.4923544", "0.4884077", "0.48740026", "0.48...
0.70307046
0
Include in the results only the boats with aspecified minimum length.
public function filterByMinimumLength($value) { $this->query->andWhere($this->query->expr()->andX() ->add($this->query->expr()->isNotNull('b.length')) ->add($this->query->expr()->gte('b.length', $this->query->createNamedParameter($value))) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByWithLength()\n {\n $this->query->andWhere($this->query->expr()->isNotNull('b.length'));\n }", "protected function _minLength()\n {\n $limit = $this->getMinLength();\n if ($limit !== null) {\n $i = 0;\n $_tagsArray = array();\n ...
[ "0.6248223", "0.60291255", "0.5796283", "0.57558316", "0.5704004", "0.5693799", "0.55407465", "0.5491371", "0.5423561", "0.53483576", "0.53409755", "0.5324454", "0.52407306", "0.52402985", "0.5203074", "0.5164571", "0.51616764", "0.51487964", "0.514811", "0.5124312", "0.50934...
0.62623054
0
Include in the results only the boats with aspecified minimum length.
public function filterByMaximumLength($value) { $this->query->andWhere($this->query->expr()->andX() ->add($this->query->expr()->isNotNull('b.length')) ->add($this->query->expr()->lte('b.length', $this->query->createNamedParameter($value))) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByMinimumLength($value)\n {\n $this->query->andWhere($this->query->expr()->andX()\n ->add($this->query->expr()->isNotNull('b.length'))\n ->add($this->query->expr()->gte('b.length', $this->query->createNamedParameter($value)))\n );\n }", "public func...
[ "0.6262605", "0.62500036", "0.60292035", "0.57972914", "0.575685", "0.570302", "0.5696039", "0.5540739", "0.549326", "0.54228485", "0.53487134", "0.5341322", "0.532419", "0.5241277", "0.5240775", "0.52042615", "0.51663685", "0.5161965", "0.5149443", "0.5148315", "0.51247525",...
0.5054787
24
In case host does not respond to request within 24hrs request status automatically changed
public function __construct($id = 0) { $id = FatUtility::convertToType($id, FatUtility::VAR_INT); parent::__construct(static::DB_TBL, static::DB_TBL_PREFIX . 'id', $id); //$this->objMainTableRecord->setSensitiveFields(array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkStatus()\n {\n $res = $this->parseBoolean(\n json_encode($this->getStatus()[\"timed_out\"])\n );\n\n if ($this->getStatus() == null)\n $this->setOnline(false);\n else if ($res)\n $this->setOnline(false);\n else\n ...
[ "0.6363375", "0.60546505", "0.5959685", "0.5930018", "0.5883651", "0.5880172", "0.58501047", "0.58417004", "0.581112", "0.57586026", "0.57556576", "0.571434", "0.5667751", "0.5661533", "0.56077623", "0.5595695", "0.5535822", "0.5535685", "0.55131984", "0.5510996", "0.5505398"...
0.0
-1
/SQL to add 3 star booking to DB
function book3 () { $name = $email = $phone = ""; $people = $_POST["people3"]; $tempin3 = $_POST["checkin3"]; $tempout3 = $_POST["checkout3"]; $checkin3 = strtotime($_POST["checkin3"]); $checkout3 = strtotime($_POST["checkout3"]); $date = $checkout3 - $checkin3; $datediff = number_format(round($date /(60 * 60 * 24))); if ($datediff == 0) $datediff = 1; $totalcost = $datediff*$_POST["people3"]*9800; $conn = mysqli_connect('localhost:3308','root', '','hotelmanagement'); if(isset($_SESSION['name']) && isset($_SESSION['email']) && isset($_SESSION['phone'])) { $name = $_SESSION['name']; $phone = $_SESSION['phone']; $email = $_SESSION['email']; $sql = "INSERT INTO booking (name, email, contactno, checkin, checkout, roomtype, days, people, cost) VALUES ( '$name', '$email', '$phone', '$tempin3', '$tempout3', 'Regular - 3 Star', '$datediff', '$people', '$totalcost')"; } else { $name = $_SESSION['nameSC']; $phone = $_SESSION['phoneSC']; $email = $_SESSION['emailSC']; $sql = "INSERT INTO booking (name, email, contactno, checkin, checkout, roomtype, days, people, cost) VALUES ('$name', '$email', '$phone', '$tempin3', '$tempout3', 'Regular - 3 Star', '$datediff', '$people', '$totalcost')"; } if (mysqli_query($conn, $sql)) { echo "<script type = 'text/javascript'>alert('Booking confirmed! Payment will be processed at the Hotel. Thank you for choosing Four Seasons!'); window.location='CustomerDisplayPage.php';</script>"; $name = $phone = $email = ""; } else { echo "Error: " . $sql . "<br>" . mysqli_error($conn); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bookcar($c_id,$d_id,$u_id,$date)\n{\n\t$sql=\"insert into ride_details(u_id,d_id,c_id,booking_date,dep_date)values($u_id,$d_id,$c_id,'$date','\".date(\"Y-m-d\").\"')\";\n\t$GLOBALS['db']->exec($sql);\n\t$sql=\"update care_detail set status=1 where c_id=$c_id\";\n\t$GLOBALS['db']->exec($sql);\n\t$sql=\"upd...
[ "0.5776205", "0.57294786", "0.5673574", "0.5599588", "0.53921026", "0.5341037", "0.53089756", "0.52920175", "0.5280862", "0.5274961", "0.52593917", "0.5254279", "0.5247083", "0.5188687", "0.51764506", "0.5164153", "0.5151694", "0.51419646", "0.5132998", "0.5131082", "0.512989...
0.5157213
16
/SQL to add 5 star booking to DB
function book5 () { $name = $email = $phone = ""; $people = $_POST["people5"]; $tempin5 = $_POST["checkin5"]; $tempout5 = $_POST["checkout5"]; $checkin5 = strtotime($_POST["checkin5"]); $checkout5 = strtotime($_POST["checkout5"]); $date = $checkout5 - $checkin5; $datediff = number_format(round($date /(60 * 60 * 24))); if ($datediff == 0) $datediff = 1; $totalcost = $datediff*$_POST["people5"]*19400; $conn = mysqli_connect('localhost:3308','root', '','hotelmanagement'); if(isset($_SESSION['name']) && isset($_SESSION['email']) && isset($_SESSION['phone'])) { $name = $_SESSION['name']; $phone = $_SESSION['phone']; $email = $_SESSION['email']; $sql = "INSERT INTO booking (name, email, contactno, checkin, checkout, roomtype, days, people, cost) VALUES ('$name', '$email', '$phone', '$tempin5', '$tempout5', 'Luxury - 5 Star', '$datediff', '$people', '$totalcost')"; } else { $name = $_SESSION['nameSC']; $phone = $_SESSION['phoneSC']; $email = $_SESSION['emailSC']; $sql = "INSERT INTO booking (name, email, contactno, checkin, checkout, roomtype, days, people, cost) VALUES ('$name', '$email', '$phone', '$tempin5', '$tempout5', 'Luxury - 5 Star', '$datediff', '$people', '$totalcost')"; } if (mysqli_query($conn, $sql)) { echo "<script type = 'text/javascript'>alert('Booking confirmed! Payment will be processed at the Hotel. Thank you for choosing Four Seasons!'); window.location='CustomerDisplayPage.php';</script>"; } else { echo "Error: " . $sql . "<br>" . mysqli_error($conn); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addBooking()\r\n {\r\n $loggedin = isset($_SESSION['user']);\r\n if(! $loggedin)\r\n {\r\n return redirect('');\r\n }\r\n $user = $_SESSION['user']->account_no;\r\n\r\n $showtime = $_POST['showtime'];\r\n $num_seats = $_POST['num_seats'];\r\n\r\n App::get('database')->...
[ "0.5687405", "0.5525846", "0.5485494", "0.5461473", "0.5448458", "0.53806823", "0.5315855", "0.51946", "0.5186232", "0.5185592", "0.51807785", "0.51612085", "0.51612085", "0.5160836", "0.5136923", "0.51299113", "0.5105312", "0.5084231", "0.5070966", "0.50571555", "0.5052779",...
0.5406656
5
Process an incoming server request. Processes an incoming server request in order to produce a response. If unable to produce the response itself, it may delegate to the provided request handler to do so.
public function process(Request $request, Response $response, RequestHandlerInterface $handler);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );", "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n return $handler->handle($request);\n }", "public function proc...
[ "0.78518313", "0.7815523", "0.7815523", "0.7807829", "0.770576", "0.73984116", "0.7376643", "0.73752916", "0.73495823", "0.73490715", "0.7059428", "0.7042327", "0.6922202", "0.69030356", "0.6824123", "0.6822053", "0.67798895", "0.66922975", "0.66911954", "0.66202915", "0.6594...
0.7452153
5
Sends GET request to the provided URL and stores received HTML
public function visit(string $url) : self { $this->html = $this->client->get($url); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchHTML($url) {\n\t\t$contents = '';\n\t\t\n\t\tini_set('user_agent', 'User-Agent: ' . self::$agent_name);\n\t\t\n\t\tif(($fp = @fopen($url, 'r'))) {\n\t\t\twhile($data = fread($fp, 1024)) $contents .= $data;\n\t\t\t\n\t\t\tfclose($fp);\n\t\t} elseif($url_info = parse_url($url)) {\n\t\t\t$port = ...
[ "0.67352927", "0.6733248", "0.6615621", "0.6483972", "0.6377716", "0.6355508", "0.6302589", "0.63004", "0.622311", "0.62064576", "0.6181529", "0.6179844", "0.6170136", "0.61072034", "0.609215", "0.60824513", "0.6074059", "0.60445154", "0.6044255", "0.60273975", "0.6025461", ...
0.0
-1
Parses plain HTML response (string) into Crawler object
public function parse() : self { $this->parsed = new Crawler($this->html); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parse($html);", "public function parse($html);", "protected function parse()\n {\n\n $crawler = new Crawler($this->originalHTML);\n\n $this->tableOfContents = $crawler->filter('body > nav')->html();\n $this->body = $crawler->filter('body > main')->html();\n\n $thi...
[ "0.6565682", "0.6565682", "0.62326205", "0.6083824", "0.6029237", "0.5950584", "0.59361535", "0.589971", "0.58783215", "0.5875858", "0.58695656", "0.58622754", "0.58173054", "0.57484066", "0.5712362", "0.57108414", "0.56945217", "0.55662054", "0.55543023", "0.5534879", "0.553...
0.66385454
0
Get filters contained in this class
public function getFilters() { return array( new \Twig_SimpleFilter('sha1', array($this, 'sha1Filter')), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilters();", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n ...
[ "0.87834394", "0.8672078", "0.8672078", "0.8672078", "0.8672078", "0.8672078", "0.8672078", "0.8672078", "0.8672078", "0.8672078", "0.86352783", "0.85546833", "0.8501213", "0.8467871", "0.84643835", "0.83912414", "0.8375582", "0.83339554", "0.82927805", "0.8290046", "0.825465...
0.0
-1
This method converts a string to its sha1 hash value
public function sha1Filter($string) { return sha1($string); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function sha1_hash( $string )\n {\n return '{SHA}'.base64_encode( pack( 'H*', sha1( $string ) ) );\n }", "public function sha1($str)\n {\n if (!function_exists('sha1')) {\n if (!function_exists('mhash')) {\n Fly::import('system.libraries.Sha1');\n ...
[ "0.81790245", "0.80532384", "0.79687744", "0.7530466", "0.7523049", "0.74266076", "0.7378353", "0.73202753", "0.7302086", "0.72881126", "0.7253351", "0.72289264", "0.71854967", "0.71649337", "0.7164775", "0.7142319", "0.7080949", "0.7080949", "0.70301986", "0.6884421", "0.684...
0.78180265
3
Get name of the twig extensions class
public function getName() { return 'geschke_translatorgui_bundle_twig_extension'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName()\n {\n return 'siciarek_js_trans_twig_extension';\n }", "public function getName()\n {\n // TODO: Implement getName() method.\n return \"troiswa_back.twig_extension\";\n }", "public function getName()\n {\n return 'szg_feed_twig_extension';\n ...
[ "0.82485753", "0.816902", "0.8040433", "0.79589766", "0.7908584", "0.7813143", "0.77065605", "0.76620317", "0.751211", "0.73266834", "0.72216994", "0.7199567", "0.7199567", "0.7171393", "0.70277363", "0.69986624", "0.6970599", "0.6956674", "0.68450534", "0.6841207", "0.679235...
0.7689365
7
Display a listing of the resource.
public function index() { // $data = User::where('role','kasir')->get(); return view('manager.kasir.index',['kasir'=>$data]); }
{ "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() { return view('manager.kasir.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) { $find = User::where('email', $request->email)->count(); if($find > 0){ return back() ->withErrors(['sistem' => 'Kasir sudah ada!']) ->withInput(); } $validatedData = $request->validate([ 'foto' => 'required|file|max:5000', ]); $foto = ""; if($request->hasfile('foto')) { $file = $request->file('foto'); $foto = time().'.'.$file->extension(); $file->move(public_path().'/uploads/', $foto); $foto = "/uploads/".$foto; } $data = new User(); $data->email = $request->email; $data->password = bcrypt($request->password); $data->name = $request->name; $data->alamat = $request->alamat; $data->no_hp = $request->no_hp; $data->foto = $foto; $data->role = 'kasir'; if($data->save()){ $request->session()->flash('mgs', "Sukses menambahkan kasir"); return redirect()->route('kasir.index'); }else{ return back() ->withErrors(['sistem', 'Gagal menambahkan kasir']) ->withInput(); } }
{ "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) { // }
{ "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 = User::findOrFail($id); return view('manager.kasir.edit',['kasir'=>$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.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) { // $find = User::where('email', $request->email)->first(); if($find != null && $find->id != $id){ return back() ->withErrors(['sistem' => 'Kasir sudah ada!']) ->withInput(); } $validatedData = $request->validate([ 'foto' => 'file|max:5000, ']); $data = User::findOrFail($id); $foto = $data->foto; if($request->hasfile('foto')) { if (File::exists(public_path().$foto)) { File::delete(public_path().$foto); } $file = $request->file('foto'); $foto = time().'.'.$file->extension(); $file->move(public_path().'/uploads/', $foto); $foto = "/uploads/".$foto; } $data->email = $request->email; $data->name = $request->name; $data->alamat = $request->alamat; $data->no_hp = $request->no_hp; $data->foto = $foto; if($request->password != null){ $data->password = bcrypt($request->password); } if($data->save()){ $request->session()->flash('msg', "Sukses mengubah kasir"); return redirect()->route('kasir.index'); }else{ return back() ->withErrors(['sistem', 'Gagal mengubah kasir']) ->withInput(); } }
{ "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) { $kasir = User::findOrFail($id); $foto = $kasir->foto; if(File::exists(public_path().$foto)){ File::delete(public_path().$foto); } if($kasir->delete()){ \Session::flash('msg', "Sukses menghapus kasir"); }else{ \Session::flash('msg', "Gagal menghapus kasir"); } return redirect()->route('kasir.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.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
the constructor is set to private so so nobody can create a new instance using new
public function __construct() { /* * * maybe set the db name here later ** */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final private function __construct() {}", "final private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct()...
[ "0.8443795", "0.8443795", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", "0.83230275", ...
0.0
-1
/ create the database registry object
public function _clear($user_uid) { $registry->db = db::getInstance(); $sth = $registry->db->prepare("update sys_users_verify set usv_status = 0, usv_token = '' where usv_usr_uid= ? "); $sth->execute(array($user_uid)); //$user = $sth->fetchAll(); $user = $sth->rowCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDatabaseStructure() {}", "private final function _createDbStructure()\n {\n if ($conn = $this->_getConnection()) {\n $installer = new lib_Install('install');\n try {\n $installer->install();\n } catch (Exception $e) {\n ...
[ "0.6821435", "0.6369876", "0.6310727", "0.6302365", "0.62974733", "0.6210824", "0.6183005", "0.61791843", "0.6134741", "0.6131029", "0.6110682", "0.6075171", "0.60733646", "0.607071", "0.6057268", "0.60457814", "0.60349387", "0.60131675", "0.6000276", "0.59827375", "0.5968022...
0.0
-1
/ create the database registry object
public function _find($user_uid, $to) { $registry->db = db::getInstance(); $sth = $registry->db->prepare("select usv_token from sys_users_verify where usv_usr_uid = ? and usv_token = ? and usv_status = 1 "); $sth->execute(array($user_uid, $to)); $row = $sth->fetchAll(); $user = $sth->rowCount(); //echo($user_uid.",".$to); //echo("<br>".$user."<br>"); //echo($row[0]['usv_token']); //die; if ($user) { $this->token = $row[0]['usv_token']; //echo($this->token); return(1); } else { $this->token = 0; return(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDatabaseStructure() {}", "private final function _createDbStructure()\n {\n if ($conn = $this->_getConnection()) {\n $installer = new lib_Install('install');\n try {\n $installer->install();\n } catch (Exception $e) {\n ...
[ "0.6821435", "0.6369876", "0.6310727", "0.6302365", "0.62974733", "0.6210824", "0.6183005", "0.61791843", "0.6134741", "0.6131029", "0.6110682", "0.6075171", "0.60733646", "0.607071", "0.6057268", "0.60457814", "0.60349387", "0.60131675", "0.6000276", "0.59827375", "0.5968022...
0.0
-1
Like the constructor, we make __clone private so nobody can clone the instance
private function __clone() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final private function __clone(){}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "private function...
[ "0.8623511", "0.8591677", "0.8591677", "0.8591677", "0.8591677", "0.8591677", "0.8591677", "0.8591677", "0.85643566", "0.85643566", "0.85643566", "0.85643566", "0.85643566", "0.85643566", "0.85643566", "0.85643566", "0.85643566", "0.85643566", "0.85643566", "0.8546156", "0.85...
0.8465215
61
Lists all GdpMails entities.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $entities = $em->getRepository('LooninsIncidentBundle:GdpMails')->findAll(); return array( 'entities' => $entities, ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllEmails() {\n return getALL('SELECT * FROM mail');\n}", "public function findAll()\n {\n return $this->em\n ->getRepository('App:Mail')\n ->findAll()\n ;\n }", "public function scopeGetAllMails()\n {\n\n $gname = Input::get( 'gname' )...
[ "0.6917383", "0.6896523", "0.64885604", "0.61055005", "0.6093053", "0.59815973", "0.596835", "0.5936755", "0.59056824", "0.5881021", "0.5873488", "0.5848727", "0.57859844", "0.5781284", "0.5718998", "0.57125205", "0.5697226", "0.5671937", "0.56091183", "0.5585177", "0.5566545...
0.72491175
0
Creates a new GdpMails entity.
public function createAction(Request $request) { $entity = new GdpMails(); $form = $this->createCreateForm($entity); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($entity); $em->flush(); return $this->redirect($this->generateUrl('gdpmails_show', array('id' => $entity->getId()))); } return array( 'entity' => $entity, 'form' => $form->createView(), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createCreateForm(GdpMails $entity)\r\n {\r\n $form = $this->createForm(new GdpMailsType(), $entity, array(\r\n 'action' => $this->generateUrl('gdpmails_create'),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'C...
[ "0.65327984", "0.63309795", "0.58390903", "0.58063227", "0.556461", "0.55068433", "0.543389", "0.5371196", "0.53418183", "0.53305686", "0.52689457", "0.52421206", "0.522109", "0.515451", "0.5147189", "0.51235914", "0.511381", "0.51007724", "0.507179", "0.5047809", "0.5020041"...
0.7016379
0
Creates a form to create a GdpMails entity.
private function createCreateForm(GdpMails $entity) { $form = $this->createForm(new GdpMailsType(), $entity, array( 'action' => $this->generateUrl('gdpmails_create'), 'method' => 'POST', )); $form->add('submit', 'submit', array('label' => 'Create')); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction()\r\n {\r\n $entity = new GdpMails();\r\n $form = $this->createCreateForm($entity);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "public function createAction(Request $request...
[ "0.7441957", "0.7244886", "0.67560875", "0.6711325", "0.6540887", "0.6413211", "0.6302297", "0.6300285", "0.6284974", "0.6284974", "0.6214498", "0.61847866", "0.61690986", "0.61140937", "0.6104232", "0.60910136", "0.6045087", "0.60374", "0.6030313", "0.60129994", "0.6009359",...
0.82128966
0
Displays a form to create a new GdpMails entity.
public function newAction() { $entity = new GdpMails(); $form = $this->createCreateForm($entity); return array( 'entity' => $entity, 'form' => $form->createView(), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createCreateForm(GdpMails $entity)\r\n {\r\n $form = $this->createForm(new GdpMailsType(), $entity, array(\r\n 'action' => $this->generateUrl('gdpmails_create'),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'C...
[ "0.727716", "0.7130548", "0.7095423", "0.68532664", "0.6734487", "0.65864897", "0.653791", "0.64613175", "0.64500666", "0.643531", "0.64125246", "0.639017", "0.63869315", "0.63850164", "0.6378891", "0.6378039", "0.6378039", "0.6377443", "0.637716", "0.6373962", "0.6346026", ...
0.79893667
0
Creates a form to edit a GdpMails entity.
private function createEditForm(GdpMails $entity) { $form = $this->createForm(new GdpMailsType(), $entity, array( 'action' => $this->generateUrl('gdpmails_update', array('id' => $entity->getId())), 'method' => 'POST', )); $form->add('submit', 'submit', array('label' => 'Update')); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r...
[ "0.70298886", "0.65974236", "0.6443187", "0.6429276", "0.64146805", "0.6377842", "0.6372164", "0.6366241", "0.6334275", "0.6252145", "0.6235883", "0.615982", "0.614666", "0.60807306", "0.6068801", "0.6067389", "0.6066465", "0.605718", "0.60552603", "0.6022499", "0.60184187", ...
0.81388676
0
Creates a form to delete a GdpMails entity by id.
private function createDeleteForm($id) { return $this->createFormBuilder() ->setAction($this->generateUrl('gdpmails_delete', array('id' => $id))) ->setMethod('DELETE') ->add('submit', 'submit', array('label' => 'Delete')) ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnelpersonnel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n ...
[ "0.72619367", "0.7247486", "0.7209604", "0.7196196", "0.71796817", "0.7173532", "0.71676487", "0.71637625", "0.7155489", "0.71530664", "0.7146956", "0.7139615", "0.71217984", "0.7121034", "0.7118328", "0.7107895", "0.7102422", "0.70921946", "0.7087138", "0.708161", "0.7080619...
0.76997733
0
Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($cl...
[ "0.74850124", "0.73803526", "0.7154113", "0.71401674", "0.70629025", "0.703232", "0.69285315", "0.69285315", "0.6925706", "0.6902751", "0.6894916", "0.6894916", "0.68900806", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0....
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('rekening3_id',$this->rekening3_id); // $criteria->compare('rekening1_id',$this->rekening1_id); $criteria->compare('rekening2_id',$this->rekening2_id); $criteria->compare('LOWER(kdrekening3)',strtolower($this->kdrekening3),true); $criteria->compare('LOWER(nmrekening3)',strtolower($this->nmrekening3),true); $criteria->compare('LOWER(nmrekeninglain3)',strtolower($this->nmrekeninglain3),true); $criteria->compare('rekening3_aktif',$this->rekening3_aktif); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('w...
[ "0.674474", "0.674474", "0.6608898", "0.6481127", "0.6379887", "0.63463205", "0.6310358", "0.63012093", "0.6253843", "0.62498426", "0.62498426", "0.6113065", "0.60784054", "0.6073788", "0.6047258", "0.60358477", "0.60340405", "0.6014864", "0.5982939", "0.598029", "0.59800965"...
0.0
-1
Warning: Please modify the following code to remove attributes that
public function searchPrint() { // should not be searched. $criteria=new CDbCriteria; $criteria->compare('rekening3_id',$this->rekening3_id); // $criteria->compare('rekening1_id',$this->rekening1_id); $criteria->compare('rekening2_id',$this->rekening2_id); $criteria->compare('LOWER(kdrekening3)',strtolower($this->kdrekening3),true); $criteria->compare('LOWER(nmrekening3)',strtolower($this->nmrekening3),true); $criteria->compare('LOWER(nmrekeninglain3)',strtolower($this->nmrekeninglain3),true); $criteria->compare('rekening3_aktif',$this->rekening3_aktif); // Klo limit lebih kecil dari nol itu berarti ga ada limit $criteria->limit=-1; return new CActiveDataProvider($this, array( 'criteria'=>$criteria, 'pagination'=>false, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeBlacklistedAttributes($attribs) \n { \n $this->_html = preg_replace('/[\\s]+('.$attribs.')=[\\s]*(\"[^\"]*\"|\\'[^\\']*\\')/i',\"\",$this->_html); \n $this->_html = preg_replace('/[\\s]+('.$attribs.')=[\\s]*[^ |^>]*/i',\"\",$this->_html); \n }", "public function removeAttribute...
[ "0.71117824", "0.7035495", "0.6810129", "0.6756575", "0.6662393", "0.64803207", "0.63691974", "0.6355436", "0.6354229", "0.6353134", "0.6352825", "0.6333506", "0.6317176", "0.627881", "0.6275085", "0.62605983", "0.6248935", "0.62345755", "0.61991394", "0.6188764", "0.6176879"...
0.0
-1
Add and update to database
function add($data = array()) { if(isset($data['id_konfirmasi'])) { $this->db->set('id_konfirmasi', $data['id_konfirmasi']); } if(isset($data['kode_transaksi'])) { $this->db->set('kode_transaksi', $data['kode_transaksi']); } if(isset($data['tgl_bayar'])) { $this->db->set('tgl_bayar', $data['tgl_bayar']); } if(isset($data['jml_bayar'])) { $this->db->set('jml_bayar', $data['jml_bayar']); } if(isset($data['nama_bank'])) { $this->db->set('nama_bank', $data['nama_bank']); } if(isset($data['tujuan_byr'])) { $this->db->set('tujuan_byr', $data['tujuan_byr']); } if(isset($data['no_rek'])) { $this->db->set('no_rek', $data['no_rek']); } if(isset($data['nama_rek'])) { $this->db->set('nama_rek', $data['nama_rek']); } if (isset($data['kode_transaksi_update'])) { $this->db->where('kode_transaksi', $data['kode_transaksi_update']); $this->db->update('konfirmasi_pembayaran'); $id = $data['kode_transaksi_update']; } else { $this->db->insert('konfirmasi_pembayaran'); $id = $this->db->insert_id(); } $status = $this->db->affected_rows(); return ($status == 0) ? FALSE : $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function db_update() {}", "function addUpdate() {\n\t\tif ($this->id) $this->update();\n\t\telse $this->insert();\n\t}", "public function updateDatabase(){\n $api_response = Http::get(config('urls.api'));\n //Place in database\n $this->postToDatabase($api_response);\n }", "publ...
[ "0.7619751", "0.7492157", "0.73141867", "0.6873022", "0.68393457", "0.6762856", "0.67418206", "0.6690901", "0.6651654", "0.6644205", "0.66174716", "0.6611194", "0.6597408", "0.6581347", "0.6573856", "0.65719014", "0.6486196", "0.64749", "0.64553386", "0.6443072", "0.63460946"...
0.0
-1
Logique de sauvegarde de la cohorte
public function saveCohorte( array $data, array $params = array(), $user_id = null ) { foreach ( $data as $key => $value ) { // Si non selectionné, on retire tout if ( $value['Nonoriente66']['selection'] === '0' ) { unset($data[$key]); continue; } if ( empty($value['Nonoriente66']['id']) ) { $data[$key]['Nonoriente66'] = array( 'personne_id' => Hash::get($value, 'Personne.id'), 'origine' => 'isemploi', 'dateimpression' => null, 'historiqueetatpe_id' => Hash::get($value, 'Historiqueetatpe.id'), 'user_id' => $user_id ); } $data[$key]['Orientstruct']['personne_id'] = Hash::get($value, 'Personne.id'); $data[$key]['Orientstruct']['origine'] = 'cohorte'; $data[$key]['Orientstruct']['statut_orient'] = 'Orienté'; } $success = !empty($data) && $this->Nonoriente66->saveAll( $data ) && $this->Nonoriente66->Personne->Orientstruct->saveAll($data) ; return $success; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function faireCours ()\n {\n // ECHAUFFEMENT\n echo \"(echauffez-vous d'abord)\";\n\n parent::faireCours();\n\n // RANGER LES SKIS\n echo \"(e)tirez-vous...\";\n }", "function publishLog() {\n\t\t$id = $this->current_log;\t\t\n\t\t$res = $this->query(\"SELECT event_id FRO...
[ "0.5810944", "0.55954784", "0.5553192", "0.54821616", "0.5467023", "0.5440494", "0.54276496", "0.5382226", "0.536505", "0.53375494", "0.5303129", "0.52488416", "0.5227561", "0.5227184", "0.52189946", "0.5202924", "0.5197458", "0.51809907", "0.517949", "0.5163218", "0.514715",...
0.0
-1
display all messages associated with the current user
public function getThreads() { $user = request()->user(); $messages = $user->threadsWithMessagesWithUsers($user->id)->get(); /** * Returns unread messages given the userId. */ //$messages = Message::unreadForUser($user->id)->get(); return ThreadsResource::collection($messages); //return response()->json($messages); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showAllMessagesOfCurrentUser()\n {\n $token = substr($this->request->getHeaderLine('Authorization'),7);\n $pageNumber = (int)$this->request->getHeaderLine('Page-Number');\n $pageSize = (int)$this->request->getHeaderLine('Page-Size');\n \n if(\n $toke...
[ "0.8008253", "0.7676901", "0.75715816", "0.7389144", "0.73580426", "0.7332761", "0.731948", "0.7294463", "0.72401154", "0.72374475", "0.7209193", "0.71368223", "0.7112793", "0.71077985", "0.7088307", "0.70716256", "0.7021737", "0.7010448", "0.699379", "0.6989775", "0.6976915"...
0.0
-1
Show all of the message threads to the user.
public function index() { // All threads, ignore deleted/archived participants $threads = Thread::getAllLatest()->get(); return response()->json($threads); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function threads()\n\t{\n\n\t\t// get sort type\n\n\n\t\t$query = Thread::where('parent_id', null)->with('user')->with('topic')->limit(20);\n\n\t\t$sort = get_string('sort', 'newest');\n\n\t\t$topic = get_int('topic', false);\n\n\t\tif($topic)\n\t\t\t$query->where('topic_id', $topic);\n\n\t\tThread::setOrde...
[ "0.688893", "0.68419284", "0.68136936", "0.66700655", "0.6664336", "0.6558322", "0.64361095", "0.63359874", "0.63130563", "0.6303451", "0.6271517", "0.6246295", "0.6091976", "0.6054906", "0.6049513", "0.602744", "0.5999866", "0.5909828", "0.5844243", "0.5840489", "0.58394873"...
0.60990703
12
Shows a message thread.
public function show($id) { try { $thread = Thread::findOrFail($id); } catch (ModelNotFoundException $e) { return response()->json('error'); } // show current user in list if not a current participant // $users = User::whereNotIn('id', $thread->participantsUserIds())->get(); // don't show the current user in list $userId = request()->user()->id; $users = Client::whereNotIn('id', $thread->participantsUserIds($userId))->get(); $thread->markAsRead($userId); //return response()->json(['thread' => $thread, 'clients' => $users]); return new ThreadResource($thread); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Thread $thread)\n {\n }", "public function show(Thread $thread)\n {\n //\n }", "static function show_message($message, $message_id=NULL) {\n\t\techo '<div class=\"wrap\"><h2></h2><div class=\"updated fade '.$message_id.'\" id=\"message\"><p>' . $message . '</p></div></di...
[ "0.7481545", "0.7428447", "0.67360944", "0.656908", "0.656908", "0.656908", "0.656908", "0.656908", "0.656908", "0.656908", "0.656908", "0.65352595", "0.6463864", "0.643494", "0.6424983", "0.6418731", "0.6298647", "0.6296274", "0.62384516", "0.6228405", "0.62251866", "0.622...
0.0
-1
Stores a new message thread.
public function store() { DB::transaction(function () { $url = null; if (request()->hasFile('file')) { $url = $this->files(); } $this->thread = Thread::create([ 'subject' => bin2hex(random_bytes(10)), ]); // Message $this->message = Message::create([ 'thread_id' => $this->thread->id, 'user_id' => request()->user()->id, 'body' => request()->body ?? null, 'file_url' => $url ?? null, 'type' => request()->type ?? null ]); // Sender Participant::create([ 'thread_id' => $this->thread->id, 'user_id' => request()->user()->id, 'last_read' => new Carbon, ]); // Recipients if (request()->has('recipients')) { $this->thread->addParticipant((int) request()->recipients); } }); /** * dispatches an event */ event(new NewMessage( [ 'id' => $this->thread->id, 'users' => $this->thread->users, 'participants' => $this->thread->participants, 'extras' => collect($this->thread->users)->map(function ($user) { return [ 'profile_picture' => $user->profilePictures()->latest('created_at')->first(), 'count' => $this->thread->userUnreadMessagesCount($user->id), 'user_id' => $user->id ]; }), 'messages' => $this->thread->messages ] )); return new ThreadResource($this->thread); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($channelID, Request $request, Thread $thread)\n {\n //Validate incoming request\n $request->validate([\n 'reply' => 'required',\n ]);\n\n //Make a reply object and associate with the thread\n $thread->addReply([\n 'reply'=> request('...
[ "0.6249143", "0.6051935", "0.59523726", "0.5924439", "0.5920451", "0.58738524", "0.5826337", "0.5763292", "0.56713253", "0.56299657", "0.5612806", "0.5591502", "0.55003726", "0.54960275", "0.54485744", "0.5397951", "0.5385426", "0.53435093", "0.5327553", "0.53203726", "0.5285...
0.5638661
9
Adds a new message to a current thread.
public function update($id) { DB::transaction(function () use ($id) { $url = null; if (request()->hasFile('file')) { $url = $this->files(); } try { $this->thread = Thread::findOrFail($id); } catch (ModelNotFoundException $e) { // } $this->thread->activateAllParticipants(); // Message $this->message = Message::create([ 'thread_id' => $this->thread->id, 'user_id' => request()->user()->id, 'body' => request()->body ?? null, 'file_url' => $url ?? null, 'type' => request()->type ]); // Add replier as a participant $participant = Participant::firstOrCreate([ 'thread_id' => $this->thread->id, 'user_id' => request()->user()->id, ]); $participant->last_read = new Carbon; $participant->save(); // Recipients if (request()->has('recipients')) { $this->thread->addParticipant((int) request()->recipients); } }); /** * dispatches an event */ event(new NewMessage( [ 'id' => $this->thread->id, 'users' => $this->thread->users, 'participants' => $this->thread->participants, 'extras' => collect($this->thread->users)->map(function ($user) { return [ 'profile_picture' => $user->profilePictures()->latest('created_at')->first(), 'count' => $this->thread->userUnreadMessagesCount($user->id), 'user_id' => $user->id ]; }), 'messages' => $this->thread->messages ] )); return new ThreadResource($this->thread); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMessage($message);", "public function add_message($message){\n $this->messages[] = $message;\n }", "public function addMessage($message) {\n $this->messages[] = $message;\n }", "public function message($message): void\n {\n $this->messages[] = $message;\n }...
[ "0.70429075", "0.679842", "0.6688809", "0.6683045", "0.6666745", "0.6664847", "0.6499021", "0.6420816", "0.6288385", "0.6238943", "0.6202987", "0.61090475", "0.6086344", "0.60697407", "0.6029736", "0.5977185", "0.5944794", "0.5938465", "0.59378135", "0.5934339", "0.59286857",...
0.0
-1
USER connected function. Handle service addition.
public function addService(array $request) { // Make sure user is connected before allowing to add a new service. $this->redirectIfNotLoggedIn('user', 'login'); if($this->isFormSubmitted()) { if($this->issetAndNotEmpty($request, 'subject', 'descriptionService')) { $subject = DB::secureData($request['subject']); $description = DB::secureData($request['descriptionService']); $service = new UserService(); $service->setSubject($subject); $service->setDescription($description); $service->setServiceDate((new \DateTime())->format('Y-m-d h:i:s')); $service->setUser($this->user); // Checking if user has uploaded a service image. if($_FILES['serviceImage']['size'] > 0) { $fileUploader = new FileUpload($_FILES['serviceImage'], '/assets/uploads/services/'); if(!$fileUploader->isSizeInThreshold() || !$fileUploader->upload()) { $this->setErrorMessage("Une erreur est survenue en envoyant l'image de votre service."); } else { $service->setImage($fileUploader->getFinalFileName()); } } $this->userServiceManager->addService($service); if($service->getId() !== null) { $this->setSuccessMessage("Votre service a bien été ajouté."); } else { $this->setErrorMessage("Une erreur est survenue en ajoutant votre service."); } } else { $this->setErrorMessage("Tous les champs requis ne sont pas remplis !"); } } $this->addCss($this->profileCss); $this->addJavaScript($this->javaScripts); $this->showView('service/createService', [ 'userProfile' => $this->userProfileManager->getUserProfile($this->user) ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function connected($user)\n\t{\n\t}", "public function on_user_add(&$user) {\r\n\t\t$this->socket_array[(int)$user->socket] = $user;\r\n\t}", "function appConnected(){\n\n}", "public function on_start(){\r\n\t\t$u = new User();\r\n\t\tif ($u->isRegistered()) {\r\n\t\t\t$ui = UserInfo::getByID($u->g...
[ "0.6264136", "0.61268526", "0.60272026", "0.58709216", "0.583147", "0.583147", "0.58192295", "0.5784952", "0.57675874", "0.56650543", "0.56059474", "0.55489546", "0.55466974", "0.5472857", "0.5461691", "0.5451078", "0.5447229", "0.54315275", "0.54307926", "0.542167", "0.54119...
0.0
-1
USER connected service edition.
public function editLoggedInUserService(int $id, array $request) { $this->redirectIfNotLoggedIn('user', 'login'); $service = $this->userServiceManager->getService($id); // Edit service only if service is owned by connected user. if($service->getUser()->getId() === $this->user->getId()) { if($this->isFormSubmitted()) { if($this->issetAndNotEmpty($request, 'subject', 'descriptionService')) { $subject = DB::secureData($request['subject']); $description = DB::secureData($request['descriptionService']); $service->setSubject($subject); $service->setDescription($description); // Checking if user has uploaded a service image. if($_FILES['serviceImage']['size'] > 0) { $fileUploader = new FileUpload($_FILES['serviceImage'], '/assets/uploads/services/'); if(!$fileUploader->isSizeInThreshold() || !$fileUploader->upload()) { $this->setErrorMessage("Une erreur est survenue en envoyant l'image de votre service."); } else { $service->setImage($fileUploader->getFinalFileName()); } } // Saving service new data. if($this->userServiceManager->updateService($service)) { $this->setSuccessMessage("Votre service a bien été mis à jour."); } else { $this->setErrorMessage("Une erreur est survenue en mettant à jou votre service."); } } else { $this->setErrorMessage("Tous les champs requis ne sont pas remplis !"); } } $this->addCss($this->profileCss); $this->addJavaScript($this->javaScripts); $this->showView('service/loggedInUserServicesEdit', [ 'service' => $service, 'userProfile' => $this->userProfileManager->getUserProfile($this->user), ]); } // If service does not belong to connected user, then redirect to the services pages. $this->redirectTo('service', 'user-services'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function serviceAccessGates()\n {\n //\n }", "function modificarCuentaServSoc()\n {\n // TODO: Implement modificarCuentaServSoc() method.\n }", "function UserManagement(){\n\t\t$this->soap=new SugarSoap('http://troycontainerline.com/sugar/soap.php?wsdl');\n\t}", "public fu...
[ "0.5484974", "0.5462617", "0.5426577", "0.53682953", "0.5363418", "0.53215075", "0.52795583", "0.52249163", "0.52224857", "0.5220323", "0.5212676", "0.5198831", "0.5188419", "0.5176312", "0.5169243", "0.5160577", "0.51377", "0.51357394", "0.51255524", "0.5113209", "0.51044637...
0.50350934
30
Display a single service page.
public function readService(int $id) { $service = $this->userServiceManager->getService($id); if(!is_null($service)) { $userProfile = $this->userProfileManager->getUserProfile($service->getUser()); $this->addCss([ 'services.css', 'forms.css', 'search.css', ]); $this->addJavaScript($this->javaScripts); $this->showView('service/servicePage', [ 'service' => $service, 'userProfile' => $userProfile, ]); } else { $this->redirectTo('index'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionView()\n {\n $param = BaseRequest::getParamOnUrl('param');\n \n $service = $this->getOneByParam('service',['title' => $param]);\n \n return $this->render('view',['service' => $service]);\n }", "public function show($service)\n {\n $service ...
[ "0.7551263", "0.7392476", "0.7349446", "0.7349446", "0.7349446", "0.7349446", "0.7349446", "0.7349446", "0.7349446", "0.7335893", "0.73153913", "0.7248727", "0.72282624", "0.71384984", "0.6986105", "0.6986105", "0.6986105", "0.695824", "0.69027156", "0.68778276", "0.6789163",...
0.6487005
49
Display all available ( and validated ) services.
public function displayAllServices() { $services = $this->userServiceManager->getServices(null, true); $this->addCss(['search.css', 'forms.css']); $this->showView('service/allServices', [ 'services' => $services, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $services = Service::\n orderBy('status', 'asc')->\n orderBy('created_at', 'desc')->\n paginate(10);\n\n return view('services.services', compact('services'));\n }", "public function client_all_services(){\n $service = Serv...
[ "0.7252631", "0.7187641", "0.71697074", "0.7118057", "0.70620745", "0.7050781", "0.70186406", "0.7003626", "0.6979654", "0.6951262", "0.69470584", "0.6923756", "0.69005835", "0.68831795", "0.68758744", "0.68757296", "0.687021", "0.6865213", "0.6864922", "0.68605167", "0.68573...
0.8407879
0
Allow to send message to a service.
public function sendMessage(array $request){ $this->redirectIfNotLoggedIn('service', 'show-all'); if($this->isFormSubmitted()) { if($this->issetAndNotEmpty($request, 'message', 'service-id')) { $messageContent = DB::secureData($request['message']); $serviceId = DB::secureInt($request['service-id']); $service = $this->userServiceManager->getService($serviceId); if (!is_null($service->getId())) { $messageManager = new MessageManager(); if($messageManager->sendMessages($messageContent, $service, $this->user)) { $this->setSuccessMessage("Votre message a bien été envoyé"); } else { $this->setErrorMessage("Une erreur est survenue en envoyant votre message."); } } else { $this->setErrorMessage("Le service pour lequel vous souhaitez envoyer un message n'existe pas."); } $this->readService($serviceId); } else { $this->setErrorMessage("Le message ou le service n'a pas été spécifié"); } } else { $this->redirectIfNotLoggedIn('service', 'show-all'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send($message)\n {\n }", "function esms_services_send_message($message, $number, $type) {\n return esms_send_message($message, $number, $type);\n}", "public function send($message);", "public function send($message);", "public function send($message);", "public function send($messa...
[ "0.6725329", "0.6615635", "0.65639323", "0.65639323", "0.65639323", "0.65639323", "0.63741654", "0.63411707", "0.6309194", "0.6282253", "0.6234335", "0.6230952", "0.6188329", "0.6188329", "0.6188329", "0.61874425", "0.61874425", "0.61874425", "0.61874425", "0.61874425", "0.61...
0.6428408
6
Moves the cursor to the first (key,element) pair.
function rewind();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _nextKey() {\n if ($this->_hasKey()) {\n array_splice($this->_keys, 0, 1);\n }\n }", "function rewind (){ $this->key = -1; }", "public function firstKey();", "public function rewind()\n {\n $this->currentKey = 0;\n }", "public function next() {\n ...
[ "0.63178074", "0.5970266", "0.59451956", "0.58624923", "0.5854694", "0.5831123", "0.5758813", "0.5757115", "0.5738312", "0.5715023", "0.56845015", "0.56620085", "0.56258607", "0.56226826", "0.55952984", "0.5525295", "0.5524348", "0.5524139", "0.5512945", "0.5512945", "0.55091...
0.0
-1
Check if the cursor is on a valid element.
function valid();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function valid()\n {\n if (isset($this->elements[$this->position]))\n {\n return true;\n }\n\n return false;\n }", "public function valid()\n {\n return ($this->position < $this->getDomList()->length);\n }", "public function valid()\n\t{\n\t\tret...
[ "0.68799293", "0.68143797", "0.6609226", "0.6523341", "0.6365025", "0.6249499", "0.62480843", "0.62282324", "0.62214965", "0.6164572", "0.61580014", "0.6136651", "0.61364233", "0.6133429", "0.61283433", "0.6102031", "0.60988426", "0.6087529", "0.60824853", "0.6075766", "0.603...
0.0
-1
Returns the key of the current (key,element) pair under the cursor. Prerequisite: the cursor must be over a valid element, or the behaviour is unspecified; implementations may throw an unchecked exception to help debugging programs.
function key();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function key()\n {\n $current = $this->current();\n\n return is_null($current) ? null : $current->getKey();\n }", "public function key()\n {\n Psl\\invariant($this->valid(), 'The Iterator is invalid.');\n if (!contains_key($this->entries, $this->position)) {\n ...
[ "0.753944", "0.7498053", "0.7455197", "0.74354184", "0.7386952", "0.7287376", "0.7259646", "0.72440195", "0.7223658", "0.72104764", "0.72042567", "0.716314", "0.71607965", "0.7139556", "0.7118149", "0.7115526", "0.7115036", "0.7089768", "0.70846266", "0.7071765", "0.70603335"...
0.0
-1
Returns the element of the current (key,element) pair under the cursor. Prerequisite: the cursor must be over a valid element, or the behaviour is unspecified; implementations may throw an unchecked exception to help debugging programs.
function current();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function current()\n\t{\n\t\t$name = $this->_elementNames[$this->__position];\n\t\treturn $this->get($name);\n\t}", "public function current()\n {\n return $this->collection->offsetGet($this->getKey($this->getCursor()));\n }", "public function current()\n {\n return $this->offsetG...
[ "0.7000492", "0.69502574", "0.6859093", "0.68116564", "0.6774951", "0.67434156", "0.66892093", "0.6659115", "0.6656839", "0.664411", "0.66232145", "0.66084445", "0.65891343", "0.6568677", "0.6557492", "0.65332794", "0.65108246", "0.6451404", "0.6444339", "0.64229035", "0.6404...
0.0
-1
Move the cursor to the next (key,element) pair, if any. If the cursor is already beyond the last pair, does nothing.
function next();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function next()\n {\n $this->currentKey++;\n }", "public function next(): void\n {\n if ($this->index < count($this->objectListKeys)) {\n $this->index++;\n }\n }", "public function next(): void\n {\n $this->position++;\n if (null === $this->ge...
[ "0.67864305", "0.67590654", "0.6659518", "0.6657714", "0.6648324", "0.65684897", "0.65386885", "0.65237534", "0.65237534", "0.63256395", "0.6324827", "0.6274607", "0.62663347", "0.62638795", "0.6248387", "0.6242589", "0.6185723", "0.61857027", "0.6178574", "0.61759716", "0.61...
0.0
-1
FIMXE: adding missing implementations: /. int .
function count(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "function insta_f_install(){\n}", "function method_no_specs() {}", "public function testEverythingImplemented() {\n id(n...
[ "0.5983213", "0.5983213", "0.5983213", "0.5891894", "0.58690315", "0.5754535", "0.5721911", "0.57005894", "0.5415413", "0.5405313", "0.53200257", "0.5316233", "0.5313178", "0.5305039", "0.53041005", "0.5263034", "0.5260784", "0.52383024", "0.52001685", "0.518799", "0.5183389"...
0.0
-1
FIXME: adding missing implementations: /. mixed .
function current(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n\t\t$this->set_format( '/.*/', 'replace' );\n\t}", "public function helper()\n\t{\n\t\n\t}", "abstract protected function external();", "abstract protected function paths();", "abstract protected function uri($uri);", "abstract public function acceptedExtension(): string;...
[ "0.5323996", "0.5310943", "0.5280173", "0.52676445", "0.5221362", "0.51298296", "0.5122064", "0.51147664", "0.51063675", "0.510622", "0.5103768", "0.5086067", "0.50606114", "0.50606114", "0.50464725", "0.50464725", "0.50400007", "0.5035765", "0.50261337", "0.50140053", "0.501...
0.0
-1
FIXME: adding missing implementations: /. RecursiveDirectoryIterator .
function current(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function recursivelyIterateDirectory()\n\t{\n\t\treturn new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getPath()));\n\t}", "public function iterateDirectory()\n\t{\n\t\treturn new FilesystemIterator($this->getPath());\t\n\t}", "function directory_mapper($path)\n{\n $maxDepth = 3;...
[ "0.7941342", "0.7352913", "0.7056333", "0.7005682", "0.69427925", "0.6740426", "0.66586167", "0.64463055", "0.63827604", "0.6372467", "0.63719535", "0.637", "0.6364044", "0.63629836", "0.6274981", "0.6266122", "0.6224125", "0.62141275", "0.6177503", "0.6159302", "0.61426026",...
0.0
-1
FIXME: adding missing implementations: /. mixed .
function current(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n\t\t$this->set_format( '/.*/', 'replace' );\n\t}", "public function helper()\n\t{\n\t\n\t}", "abstract protected function external();", "abstract protected function paths();", "abstract protected function uri($uri);", "abstract public function acceptedExtension(): string;...
[ "0.53273344", "0.53081626", "0.5276324", "0.5268259", "0.52212125", "0.5131803", "0.5120861", "0.51145494", "0.51078653", "0.51045835", "0.5102225", "0.50849533", "0.5058744", "0.5058744", "0.5043587", "0.5043587", "0.5040168", "0.5036583", "0.50216556", "0.50162536", "0.5011...
0.0
-1
FIXME: adding missing implementations: /. mixed .
function current(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n\t\t$this->set_format( '/.*/', 'replace' );\n\t}", "public function helper()\n\t{\n\t\n\t}", "abstract protected function external();", "abstract protected function paths();", "abstract protected function uri($uri);", "abstract public function acceptedExtension(): string;...
[ "0.53273344", "0.53081626", "0.5276324", "0.5268259", "0.52212125", "0.5131803", "0.5120861", "0.51145494", "0.51078653", "0.51045835", "0.5102225", "0.50849533", "0.5058744", "0.5058744", "0.5043587", "0.5043587", "0.5040168", "0.5036583", "0.50216556", "0.50162536", "0.5011...
0.0
-1
FIXME: adding missing implementations: /. mixed .
function current(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n\t\t$this->set_format( '/.*/', 'replace' );\n\t}", "public function helper()\n\t{\n\t\n\t}", "abstract protected function external();", "abstract protected function paths();", "abstract protected function uri($uri);", "abstract public function acceptedExtension(): string;...
[ "0.5323996", "0.5310943", "0.5280173", "0.52676445", "0.5221362", "0.51298296", "0.5122064", "0.51147664", "0.51063675", "0.510622", "0.5103768", "0.5086067", "0.50606114", "0.50606114", "0.50464725", "0.50464725", "0.50400007", "0.5035765", "0.50261337", "0.50140053", "0.501...
0.0
-1
$object_ MUST be mixed to comply with interface: /. boolean .
function offsetExists(/*. mixed .*/ $object_){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function supportsObject($object);", "function rest_is_object($maybe_object)\n {\n }", "private function changelog_validate_object () {\n\t\t# set valid objects\n\t\t$objects = array(\n\t\t\t\t\t\t\"ip_addr\",\n\t\t\t\t\t\t\"subnet\",\n\t\t\t\t\t\t\"section\"\n\t\t\t\t\t\t);\n\t\t# chec...
[ "0.7699856", "0.6934189", "0.69066846", "0.6860779", "0.6824494", "0.67020553", "0.6596764", "0.64479655", "0.63994914", "0.63970125", "0.6368422", "0.63616765", "0.63323635", "0.6279313", "0.6196108", "0.61414397", "0.61353135", "0.6123403", "0.6116995", "0.60847497", "0.608...
0.5354807
82
$object_ MUST be mixed to comply with interface: /. mixed .
function offsetGet(/*. mixed .*/ $object_){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function object();", "protected abstract function supportsObject($object);", "function rest_is_object($maybe_object)\n {\n }", "function rest_sanitize_object($maybe_object)\n {\n }", "private function changelog_validate_object () {\n\t\t# set valid objects\n\t\t$objects = array(...
[ "0.6998059", "0.69080234", "0.66477835", "0.6471842", "0.61738837", "0.61677223", "0.6146446", "0.6082478", "0.60785186", "0.6077212", "0.6059412", "0.59828377", "0.5878154", "0.58571786", "0.5852465", "0.583582", "0.582441", "0.582047", "0.57991946", "0.5786723", "0.57271135...
0.5249164
96
$object_ MUST be mixed to comply with interface: /. void .
function offsetSet(/*. mixed .*/ $object_, /*. mixed .*/ $info){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function object();", "public function setObject(object $object): void;", "protected abstract function supportsObject($object);", "protected function testObject() {\n }", "public function someFunction(object $someObject)\n {\n }", "public function createObjectSecurity(object $obje...
[ "0.7166231", "0.68920916", "0.66815597", "0.66016454", "0.65531063", "0.6517156", "0.65083563", "0.6465932", "0.62993604", "0.62711054", "0.62652063", "0.6249632", "0.61309814", "0.61253893", "0.6114775", "0.61074114", "0.60719305", "0.60696596", "0.60543597", "0.5999409", "0...
0.0
-1
$object_ MUST be mixed to comply with interface: /. void .
function offsetUnset(/*. mixed .*/ $object_){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function object();", "public function setObject(object $object): void;", "protected abstract function supportsObject($object);", "protected function testObject() {\n }", "public function someFunction(object $someObject)\n {\n }", "public function createObjectSecurity(object $obje...
[ "0.7165587", "0.6894218", "0.66831386", "0.6601385", "0.655419", "0.651845", "0.6512592", "0.6468155", "0.6300939", "0.6273115", "0.6268443", "0.62488395", "0.61340225", "0.61273587", "0.61141884", "0.61062217", "0.60734725", "0.6073119", "0.60556424", "0.60002357", "0.599474...
0.0
-1
Construct the collection object
public function __construct($config = []) { $defaults = ['filters' => [], 'method' => null, 'params' => []]; $config += $defaults; $this->_filters= $config['filters']; $this->_method = $config['method']; $this->_params = $config['params']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(){\r\n\t\t$this->collection = new Collection();\r\n\t}", "public function __construct()\n {\n $this->_collection = new Collection();\n }", "protected function createCollection()\n {\n return $this->_setUpNewNode(\n new Collection()\n );\n ...
[ "0.7758162", "0.7757604", "0.76650566", "0.7484198", "0.7403004", "0.7403004", "0.7390469", "0.7373494", "0.7360607", "0.7314571", "0.7256234", "0.7079973", "0.7079612", "0.70713276", "0.7065453", "0.704876", "0.7031476", "0.7016841", "0.69983166", "0.69643825", "0.69278973",...
0.0
-1
Gets the params associated with this filter chain.
public function params() { return $this->_params; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_params() {\n\t\treturn $this->params;\n\t}", "public function getParams()\n {\n return $this->params;\n }", "public function getParams()\n {\n return $this->params;\n }", "public function getParams()\n {\n return $this->params;\n }", "public functi...
[ "0.7566858", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.7498647", "0.74876523", "0.74850404", "0.7462731", ...
0.7095185
51
Gets the method name associated with this filter chain. This is the method being filtered.
public function method() { return $this->_method; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMethodName()\n {\n return $this->method;\n }", "public function getMethodName() {\r\n\t\treturn($this->method_name);\r\n\t}", "public function getMethodName()\n {\n return PhandArr::last(explode('@', $this->getMethodInvokerName()));\n }", "public function getMetho...
[ "0.75489455", "0.7485717", "0.7316801", "0.7280778", "0.7280778", "0.7254169", "0.7231847", "0.7106086", "0.6964137", "0.6920529", "0.6920529", "0.6920529", "0.687897", "0.6872903", "0.68469715", "0.6789751", "0.67593515", "0.67593515", "0.67593515", "0.6754956", "0.6754794",...
0.6948232
9
Returns the current item.
public function current() { return current($this->_filters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getCurrentItem()\n {\n return $this->current_item;\n }", "public function currentItem()\r\n {\r\n return $this->aggregate->get($this->index);\r\n }", "public function current()\n {\n return current($this->_items);\n }", "public function current(){\n ...
[ "0.9146505", "0.88903713", "0.85530424", "0.852284", "0.852284", "0.8443427", "0.8439753", "0.8368101", "0.8321118", "0.82231444", "0.82016957", "0.8171082", "0.8156244", "0.8131882", "0.8105071", "0.8093172", "0.8068058", "0.801028", "0.800141", "0.800141", "0.800141", "0....
0.0
-1
Returns the key of the current item.
public function key() { return key($this->_filters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function key() {\n\t\tif(($this->endItemIdx !== null) && isset($this->lastItems[$this->endItemIdx])) {\n\t\t\treturn $this->lastItems[$this->endItemIdx][0];\n\t\t} else if(isset($this->firstItems[$this->firstItemIdx])) {\n\t\t\treturn $this->firstItems[$this->firstItemIdx][0];\n\t\t} else {\n\t\t\treturn $t...
[ "0.8474533", "0.83055395", "0.8250932", "0.8235875", "0.82185507", "0.821842", "0.82012755", "0.81822485", "0.81785166", "0.81785166", "0.8162944", "0.8079658", "0.8043197", "0.80410355", "0.80190426", "0.79994994", "0.79846114", "0.79518354", "0.7939115", "0.7930308", "0.790...
0.0
-1
Provides shorthand convenience syntax for filter chaining.
public function next() { next($this->_filters); if (($closure = current($this->_filters)) === false) { return false; } $params = $this->_params = func_get_args() + $this->_params; array_unshift($params, $this); return call_user_func_array($closure, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filter();", "public function filter() {\n\t\t// If there is no arguments, return $this\n\t\t$numArgs = func_num_args();\n\t\tif($numArgs == 0){\n\t\t\treturn $this;\n\t\t}\n\t\t\n\t\t// If only a lone array is passed use it as parameters\n\t\t$firstArgument = func_get_arg(0);\n\t\tif ($numArgs ==...
[ "0.68074226", "0.66905236", "0.66714364", "0.652522", "0.6470367", "0.64542574", "0.639264", "0.6373145", "0.6314814", "0.630675", "0.628654", "0.62790185", "0.62060714", "0.61116207", "0.608417", "0.6059461", "0.5989201", "0.5985725", "0.59605724", "0.5950973", "0.5944012", ...
0.0
-1
Rewinds to the first item.
public function rewind() { reset($this->_filters); return current($this->_filters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rewind(): void {\n reset($this->items);\n }", "public function rewind(): void\n {\n reset($this->_items);\n }", "public function rewind() {\n if($this->items!==false)\n reset($this->items);\n }", "public function rewind()\n {\n reset($this->_ite...
[ "0.8040184", "0.80162424", "0.7925407", "0.7793285", "0.7708375", "0.7693523", "0.7693523", "0.7480463", "0.7417602", "0.7352691", "0.73521674", "0.7302642", "0.725251", "0.7240798", "0.719924", "0.71629715", "0.7158425", "0.7137214", "0.71124303", "0.71015936", "0.70962703",...
0.0
-1
Checks if current position is valid.
public function valid() { return key($this->_filters) !== null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valid() {\n return ($this->pos < $this->end);\n }", "function valid() \n {\n return $this->offsetExists($this->position);\n }", "function valid()\n {\n return $this->_position == 0 || $this->_curPage->getSize() > 0;\n }", "public function valid() {\n\t\t\treturn i...
[ "0.77952045", "0.7704004", "0.7682876", "0.7341352", "0.72905356", "0.7282062", "0.72594506", "0.72115016", "0.7175756", "0.71586627", "0.7156666", "0.7132078", "0.71155494", "0.71155494", "0.7094378", "0.7069854", "0.70690125", "0.7049169", "0.7040837", "0.7040826", "0.70395...
0.0
-1
Returns the number of filters.
public function count() { return count($this->_filters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count($filters = array()) {\n\n return 1000;\n }", "public static function countActiveFilters()\n {\n return count(self::$_activeFilters);\n }", "public function getFilteredCount()\n\t{\n\t\treturn $this->filteredCount;\n\t}", "public function count($filters)\n {\n ...
[ "0.8212421", "0.8071703", "0.7509339", "0.7496974", "0.7416118", "0.7332905", "0.7168981", "0.7036285", "0.6982051", "0.69567597", "0.6922746", "0.6825242", "0.6785987", "0.6777178", "0.6705086", "0.67007613", "0.66974866", "0.6685318", "0.663803", "0.6606071", "0.65987265", ...
0.8786861
0
author: Gabriel Grimello Data 03/09/2019
function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AggiornaPrezzi(){\n\t}", "public function boleta()\n\t{\n\t\t//\n\t}", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "public function serch()\n {\n }", "public function masodik()\n {\n }", "private function _i() {\n }", "public ...
[ "0.5293824", "0.52031916", "0.51663697", "0.51448315", "0.5126044", "0.51154715", "0.5111417", "0.50785685", "0.50399804", "0.5032388", "0.50225663", "0.5012455", "0.50086147", "0.49981764", "0.49779522", "0.49779522", "0.49779522", "0.49588194", "0.49588194", "0.49517316", "...
0.0
-1
Several functions were moved from cancel_computer.php3 as they were only ever used in this file and I didn't want to have to copy it to the newly created cancel_multi_computer.php
function SendConfirmation($computer, $cancel_data) // Send a confirmation message to customers // who have been suspended, UNLESS suspention // is due to AUP violation or non-payment. { // I would have passed these as parameters, // but it looks like the other functions // in this file use a lot of global data too. GLOBAL $db; $is_AUP = $db->GetVal(" select 1 from offline_reasons where reason_number = $cancel_data[reason_number] and category_group in ( 500, 2900) limit 1 "); $is_NonPay = $db->GetVal(" select 1 from offline_reasons where reason_number = $cancel_data[reason_number] and category_group in ( 400, 3000 ) limit 1 "); // Set up Mail Message $parser = new core_parser; $mailer = new core_mailer; $mailer->SetAccountNumber( $computer->customer_number ); $mailer->AddAccountAddress(ONYX_ACCOUNT_ROLE_PRIMARY); $mailer->SetAccountFrom(ACCOUNT_ROLE_ACCOUNT_EXECUTIVE); $target_date = $cancel_data["sec_due_offline"]; $target_date = date("D F j, Y", $target_date); $parser->AddVar('target_date', $target_date); $parser->SetAccount($computer->account); $parser->SetComputer($computer); if( $is_NonPay ) { // this call actually set variables inside th parser //hence it needs to come before access to "subject" $mailer->Body = $parser->ParseTextMessage( 27 ); $mailer->Subject = $parser->subject; // "Device Cancellation: Failure to Pay"; // pseudo: SUBJECT: "Device Cancellation: Failure to Pay" // pseudo:+ FROM: AE // pseudo:+ TO: Primary Contact // pseudo:+ BODY: Prefab(27) // pseudo:+ is NonPay // pseudo:+ Send a confirmation message to customers who have been suspended, unless nonpay $mailer->Send(); } elseif ( $is_AUP ) { // Do Nothing } else { // Normal Cancellation error_log("**normal cancellation\n"); $mailer->Body = $parser->ParseTextMessage( 12 ); $mailer->Subject = $parser->subject; // "Device Cancellation Confirmation"; // pseudo: SUBJECT: "Device Cancellation Confirmation" // pseudo:+ FROM: AE // pseudo:+ TO: Primary Contact // pseudo:+ BODY: Prefab(12) // pseudo:+ is AUP // pseudo:+ Send a confirmation message to customers who have been suspended, unless AUP $mailer->Send(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cancel();", "public function cancel(): void;", "protected function _cancelOperation() {}", "public function cancel(): int;", "public function cancel()\n {\n }", "public function cancel()\n {\n }", "protected function cancel(): void\n {\n }", "function ajax_cancelNow(...
[ "0.6159684", "0.59867156", "0.5975934", "0.59523803", "0.5910269", "0.5910269", "0.58630073", "0.56682074", "0.56491554", "0.5522898", "0.5480505", "0.54304194", "0.54165524", "0.5416165", "0.53679794", "0.53427505", "0.5339265", "0.5290827", "0.52850544", "0.5284578", "0.527...
0.63469315
0
Given a reason number, it resolves the numeric category group to a name
function getReasonCategory($reason_number) { global $db; $category_group_info = $db->GetVal(" SELECT category_group_name FROM offline_reasons JOIN offline_reason_groups USING (category_group) WHERE reason_number = $reason_number"); return($category_group_info); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groups_parse_name($format, $groupnumber) {\n if (strstr($format, '@') !== false) { // Convert $groupnumber to a character series\n $letter = 'A';\n for($i=0; $i<$groupnumber; $i++) {\n $letter++;\n }\n $str = str_replace('@', $letter, $format);\n } else {\n ...
[ "0.5417614", "0.520743", "0.5187734", "0.5062734", "0.5046812", "0.5031372", "0.4956008", "0.49444664", "0.4900403", "0.48873132", "0.48361897", "0.4803727", "0.4799904", "0.4793611", "0.47770697", "0.47741404", "0.47711176", "0.4765816", "0.47602147", "0.47515997", "0.473498...
0.70032495
0
Report or log an exception. This is a great spot to send exceptions to Sentry, Bugsnag, etc.
public function report(Exception $exception) { parent::report($exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function report(Throwable $exception)\n {\n\n if (env('APP_ENV') !== 'local') {\n if ($exception instanceof ErrorException) {\n // $this->sendEmailToSupport($exception);\n Log::error($exception->getMessage());\n abort(500, \"There was an erro...
[ "0.7318765", "0.72908765", "0.71845585", "0.7105745", "0.7043648", "0.69846135", "0.6970913", "0.6940964", "0.687667", "0.6841767", "0.6790746", "0.6757035", "0.6757035", "0.6757035", "0.6757035", "0.6757035", "0.6757035", "0.6757035", "0.6757035", "0.6757035", "0.6757035", ...
0.66841614
46
Render an exception into an HTTP response.
public function render($request, Exception $exception) { if ($exception instanceof WalletBalanceIsNegativeException) { $messageBag = new MessageBag(['wallet' => 'Not enough money.']); return redirect()->back()->withErrors($messageBag, 'flash'); } if ($exception instanceof InaccessibleLocationException) { $messageBag = new MessageBag(['location' => 'This location is inaccessible.']); return redirect()->back()->withErrors($messageBag, 'flash'); } if ($exception instanceof FeatureNotSupportedException) { $messageBag = new MessageBag(['feature' => 'This feature hasn\'t been implemented yet. Sorry!']); return redirect()->back()->withErrors($messageBag, 'flash'); } return parent::render($request, $exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render(ServerRequestInterface $request, Throwable $exception): ResponseInterface;", "public function render($request, Throwable $e): Response\r\n {\r\n if($this->app->isDebug()){\r\n return parent::render($request, $e);\r\n }else{\r\n $data = [\r\n ...
[ "0.73116726", "0.7122214", "0.7050922", "0.7050922", "0.704035", "0.6992839", "0.6990034", "0.6980675", "0.697365", "0.6950051", "0.69485855", "0.69412524", "0.69336146", "0.6920026", "0.6887852", "0.68392885", "0.68298024", "0.68196106", "0.681052", "0.6803951", "0.6795277",...
0.0
-1
Convert an authentication exception into an unauthenticated response.
protected function unauthenticated($request, AuthenticationException $exception) { if ($request->expectsJson()) { return response()->json(['error' => 'Unauthenticated.'], 401); } return redirect()->guest('login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function unauthenticated($request, AuthenticationException $exception)\n {\n return response()->json(['error' => 'Unauthenticated.'], 401);\n }", "protected function unauthenticated($request, AuthenticationException $exception)\n {\n return response()->json(['error' => 'Unauthent...
[ "0.72462296", "0.72462296", "0.7237182", "0.71802115", "0.7153523", "0.7131777", "0.71253836", "0.70805866", "0.7044714", "0.6928213", "0.6801107", "0.6797086", "0.6797086", "0.6797086", "0.67951286", "0.6773604", "0.6692273", "0.66762704", "0.66615266", "0.65927535", "0.6575...
0.68399024
13
Run the database seeds.
public function run() { Storage::disk('public')->deleteDirectory('category-images'); Storage::disk('public')->makeDirectory('category-images'); $imageSeed = 'category.jpg'; $categories = [ [ 'name' => 'Bouquet', 'parent_id' => null ], [ 'name' => 'Gift', 'parent_id' => null ], [ 'name' => 'Box', 'parent_id' => null ], [ 'name' => 'Basket', 'parent_id' => null ], [ 'name' => 'Limited', 'parent_id' => null ], [ 'name' => 'Collection', 'parent_id' => null ], ]; $children = [ [ 'name' => 'Sub Bouquet 1', ], [ 'name' => 'Sub Bouquet 2', ], [ 'name' => 'Sub Bouquet 3', ] ]; foreach ($categories as $c) { $image = $this->saveThumbImages($imageSeed, 'category-images'); Category::create([ 'name' => $c['name'], 'parent_id' => $c['parent_id'], 'thumbnail_image' => $image ]); } $bouquet = Category::where('name', 'Bouquet')->first(); foreach ($children as $child) { Category::create([ 'name' => $child['name'], 'parent_id' => $bouquet->id, 'thumbnai_image' => null ]); } }
{ "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
karena api.php pakai stateles bukan session
public function redirectToProvider($provider) { $url = Socialite::driver($provider)->stateless()->redirect()->gettargetUrl(); return response()->json([ 'url' => $url ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_api_auth()\n {\n session_start();\n echo $_SESSION['api_auth'];\n }", "function ciniki_core_sessionOpen(&$ciniki) {\n\n if( !isset($ciniki['session']) || !is_array($ciniki['session']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.core.143', 'msg...
[ "0.66764116", "0.66231185", "0.6507663", "0.64773047", "0.640757", "0.6349314", "0.63476926", "0.63169944", "0.6276291", "0.6184888", "0.61732036", "0.61630183", "0.61621225", "0.615517", "0.6150287", "0.6140115", "0.61069614", "0.60955954", "0.6082506", "0.6081571", "0.60587...
0.0
-1
Detect field type from Doctrine Annotations
private function detectFieldType($class, $field) { $annotations = $this->annotationReader->getPropertyAnnotations(new \ReflectionProperty($class, $field)); $mappingColumn = array_filter($annotations, function($item) { return $item instanceof \Doctrine\ORM\Mapping\Column; }); $mappingColumnCurrent = current($mappingColumn); return ($mappingColumnCurrent->type === 'string') ? 'text' : 'textarea'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTypeOfField($fieldName);", "function is_field_type($name)\n {\n }", "abstract public function getColumnTypeByField(Entity\\ScalarField $field);", "protected abstract function get_rest_field_type();", "public function getDbFieldType()\n {\n }", "public function getTypeOfField($fiel...
[ "0.65620965", "0.61394083", "0.6078466", "0.60764545", "0.6006963", "0.5967719", "0.59378195", "0.591797", "0.5905287", "0.5898793", "0.58525574", "0.5837473", "0.57930267", "0.57930267", "0.57930267", "0.57930267", "0.5754573", "0.57108194", "0.5683082", "0.56576204", "0.564...
0.61660296
1
Phuong thuc post them
public function postThem(Request $request) { //Validate nhé cưng! $this->validate($request, [ 'Ten'=>'required', 'NoiDung'=>'required', //'link'=>'required', ], [ 'Ten.required'=>'Vui lòng nhập tên cho slide nhé hehe!', 'NoiDung.required'=>'Vui lòng nhập nội dung nhé Đồ Ngốc!', //'link.required'=>'Nhập link nhé đồ ngu!', ]); // $slide=new Slide; $slide->Ten=$request->Ten; //$slide->Hinh=$request->Hinh; $slide->NoiDung=$request->NoiDung; if($request->has('link')){ $slide->link=$request->link; } if($request->hasFile('Hinh')) { //Lấy cái hình ra,Lưu hình vào cái biens file này $file=$request->file('Hinh'); $duoi=$file->getClientOriginalExtension(); if($duoi !='jpg' && $duoi !='png' && $duoi!='jpeg') { return redirect("admin/slide/them")->with('loi','Bạn chỉ được phép chọn ảnh!'); } //Láy cái tên hình ra để lưu lại $name=$file->getClientOriginalName(); //Random trong trường hợp tấm hình trùng $Hinh=str_random(4)."_".$name; while(file_exists("upload/slide/".$Hinh)) { $Hinh=str_random(4)."_".$name; } //Chọn đường dẫn lưu hình $file->move("upload/slide",$Hinh); $slide->Hinh=$Hinh; } else { $slide->Hinh=""; } // Save it $slide->save(); return redirect('admin/slide/them')->with('thongbao','Bạn đã thêm slide thành công!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function write_post()\n {\n }", "public function sendPost(){\n\t\t\t// record the post in the database\n\t\t\t\n\t\t}", "function post() \n {\n \n }", "public function the_post()\n {\n }", "function _post()\r\n\t\t{\r\n\t\t}", "function thankyou_page() {\n\t\t\tif ( $descr...
[ "0.6359152", "0.6247271", "0.6203042", "0.60690695", "0.60633034", "0.5806695", "0.5806001", "0.58045435", "0.5763572", "0.5751884", "0.5739374", "0.5640435", "0.5639645", "0.5618565", "0.56129694", "0.5605778", "0.5602954", "0.55937624", "0.5564632", "0.55487174", "0.5546276...
0.0
-1
Sends request to api
public function send() { $this->setHeaders(["transactionId" => $this->getTransactionId()]); return parent::send(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendRequest()\n {\n }", "abstract function do_api_request();", "public function sendRequest( ) {\n\n }", "protected function send()\n {\n $this->addAuthorization();\n\n $response = $this->client->post(\n $this->apiUrl,\n array(\n ...
[ "0.7371428", "0.7199043", "0.7087745", "0.70209515", "0.70004565", "0.69473255", "0.6807229", "0.67288446", "0.66729116", "0.66725934", "0.66430813", "0.662779", "0.6585202", "0.6577935", "0.65731263", "0.654465", "0.64634967", "0.64404744", "0.6436212", "0.6436212", "0.64174...
0.0
-1
Helper function to register a list of hooks.
private function registerHooks(array $hooks, $shopList = null) { foreach($hooks as $hook) { $this->registerHook($hook, $shopList); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function register_hook_callbacks();", "abstract protected function register_hook_callbacks();", "public function register(\\WpOrg\\Requests\\Hooks $hooks)\n {\n }", "public function register(\\WpOrg\\Requests\\Hooks $hooks)\n {\n }", "protected function registerH...
[ "0.710907", "0.6961694", "0.69532424", "0.69532424", "0.69415176", "0.68665826", "0.68083906", "0.68083906", "0.6692734", "0.6657739", "0.6570169", "0.6568446", "0.6557975", "0.65321434", "0.6513378", "0.6502626", "0.65002805", "0.645745", "0.6456569", "0.64267874", "0.638580...
0.7586508
0
Helper function to unregister a list of hooks.
private function unregisterHooks(array $hooks, $shopList = null) { foreach($hooks as $hook) { $this->unregisterHook($hook, $shopList); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove_hooks()\n {\n }", "public function remove_hooks()\n {\n }", "public function remove_all_hook() {\n\t\tremove_action( 'all', [ $this, 'wrap_hook_callbacks' ] );\n\t}", "public function unregister() {\n // Normally, there are definitely wrappers set for the...
[ "0.6943746", "0.6943746", "0.6813454", "0.64437866", "0.6325578", "0.629414", "0.6284388", "0.5986685", "0.5986685", "0.59760386", "0.59585655", "0.59533507", "0.59479874", "0.58255345", "0.5781272", "0.57512915", "0.57451767", "0.57379806", "0.57089674", "0.5698835", "0.5698...
0.7958074
0
///Display Data All without trash
public function index(){ $_allData= array(); // $query="SELECT * FROM `neci`.`consume_details` WHERE `deleted_at` IS NULL and `input_date`= date('Y-m-d') "; $query="SELECT * FROM consume_details WHERE `input_date`= CURDATE() ORDER BY `input_date` DESC "; $result= mysqli_query($this->conn,$query); //You can also use mysqli_fetch_object e.g: $row= mysqli_fetch_object($result) while($row= mysqli_fetch_assoc($result)){ $_allData[]=$row; } return $_allData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showall()\n {\n }", "public function showAll()\n {\n }", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora decolare</th>\";\n\t\techo \"<th>Destinatia</th>\";\n\t\techo \"<th>Compania</th>\";\...
[ "0.6902269", "0.66430146", "0.66354126", "0.6543537", "0.65320307", "0.6372341", "0.62972116", "0.62899363", "0.6282393", "0.6258239", "0.62523854", "0.6194665", "0.6194665", "0.61731595", "0.61727434", "0.6164711", "0.6150389", "0.6112137", "0.6066395", "0.60301095", "0.6029...
0.0
-1
//////////////////////for yearly data ///View Data
public function view(){ $query="SELECT * FROM `neci`.`notice_details` WHERE `id`=".$this->id; $result= mysqli_query($this->conn,$query); $row= mysqli_fetch_assoc($result); return $row; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yearly_chart() {\n $this->load->view(\"expenses/yearly_chart\");\n }", "function yearly() {\n $this->load->view(\"expenses/yearly_expenses\");\n }", "public function modelYear();", "public function index()\n {\n $this->data->setDate(date('d-M-y'));\n $this->callV...
[ "0.6991687", "0.6872728", "0.68095255", "0.6564648", "0.6503128", "0.6491501", "0.646291", "0.64508224", "0.6325837", "0.63095033", "0.62825435", "0.6281453", "0.62515706", "0.6231812", "0.6230802", "0.6183247", "0.61624926", "0.61375624", "0.61012286", "0.6100239", "0.606454...
0.0
-1
/////////////////////data for front page index page /////////////////////count
public function count_index(){ //$dd=$this->district_cd; // echo $dd; $query = "SELECT COUNT(*) AS totalItem FROM `neci`.`consume_details` WHERE `input_date`='".date('Y-m-d')."'"; ///AND `district_cd`='".$this->district_cd."' $result = mysqli_query($this->conn, $query); $row = mysqli_fetch_assoc($result); return $row['totalItem']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getCount(){\n if(empty($query[2])){\n self::$contador=\"Home\";\n }else{\n self::$contador=self::$query[2];\n } \n return self::$contador;\n }", "public function getPageCount() \r\n { \r\n }", "function pageContro...
[ "0.6447588", "0.6364521", "0.63384885", "0.62694246", "0.62694246", "0.6260254", "0.6238684", "0.621861", "0.621861", "0.61247516", "0.6098247", "0.60838884", "0.60731786", "0.6030318", "0.60274124", "0.6019062", "0.5994106", "0.5988252", "0.5976632", "0.5951877", "0.59506387...
0.0
-1
////////////districtnm ///show for seeing admin
public function count_admin(){ //$dd=$this->district_cd; // echo $dd; // $query = "SELECT COUNT(*) AS totalItem FROM `neci`.`consume_details` WHERE `input_date`='".date('Y-m-d')."'"; ///AND `district_cd`='".$this->district_cd."' $query = "SELECT count(*) as totalItemAdmin FROM ( SELECT d.district_cd,d.district_name,c.input_date,c.unit from (SELECT district_cd,input_date,unit from consume_details where input_date='".$this->input_date."' ) c right outer join district_info d on c.district_cd=d.district_cd ) x"; $result = mysqli_query($this->conn, $query); $row = mysqli_fetch_assoc($result); return $row['totalItemAdmin']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function viewdistrict(){\r\n\t\t//sql query\r\n\t\t$sql = \"SELECT * FROM districts\";\r\n\t\t//return executed query\r\n\t\treturn $this->db_query($sql);\r\n\t}", "public function show(District $district)\n {\n //\n }", "public function show(District $district)\n {\n //\n }", ...
[ "0.7728036", "0.74841607", "0.74841607", "0.72357666", "0.71794105", "0.709", "0.68735594", "0.6842283", "0.6746036", "0.6742462", "0.6722227", "0.6649828", "0.6613865", "0.66065145", "0.65718937", "0.65639657", "0.6468862", "0.6450488", "0.64448464", "0.64448464", "0.6434907...
0.0
-1
////////////paginator datewise data show for seeing admin
public function paginator_dis_admin($pageStartFrom=0,$Limit=5){ $query = "SELECT d.district_cd,d.district_name,c.input_date,c.unit from (SELECT district_cd,input_date,unit from consume_details where input_date='".$this->input_date."' ) c right outer join district_info d on c.district_cd=d.district_cd ORDER BY `d`.`district_cd` ASC LIMIT ".$pageStartFrom."," . $Limit; $_allval = array(); $result = mysqli_query($this->conn, $query); //You can also use mysqli_fetch_object e.g: $row= mysqli_fetch_object($result) while ($row = mysqli_fetch_assoc($result)) { $_allval[] = $row; } return $_allval; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adminIndex(){\r\n\t\t$data = $this->paginate('AdminBooking');\r\n\t\t$this->set(compact('data'));\r\n\t}", "function listAdvisers(){\n \n //setup for paging ---\n $per_page = ($this->input->get('result_per_page')? $this->input->get('result_per_page') : 200);\n\t$offset = ($this->i...
[ "0.7173731", "0.6655028", "0.6591564", "0.65483606", "0.65204066", "0.65038323", "0.64876264", "0.6471345", "0.6469117", "0.64064264", "0.6405504", "0.63988787", "0.6377355", "0.63769853", "0.6376619", "0.63558674", "0.6351463", "0.6341201", "0.633729", "0.6327569", "0.631499...
0.61339766
68
/////////////////end data for front page index page ////////////////STATEMENT AS DAILY ////////////////////count
public function count_d(){ //$dd=$this->district_cd; // echo $dd; $query = "SELECT COUNT(*) AS totalItem FROM `neci`.`consume_details` WHERE `deleted_at` IS NULL AND `input_date`>='".$this->fdate."' AND `input_date`<='".$this->tdate."'"; $result = mysqli_query($this->conn, $query); $row = mysqli_fetch_assoc($result); return $row['totalItem']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPageCountData() {\n\t\t//$stat = Statistic::select(array('statistic.id', 'statistic.category_id','category.category_name', 'statistic.ip_address as access','statistic.created_at')) \n\t\t//->join('category','category.id','=','statistic.category_id')->groupBy('category_name'); \n\n\t\t$stat = Sta...
[ "0.66539854", "0.6441428", "0.6441428", "0.64412236", "0.64246374", "0.6351484", "0.6351484", "0.6351484", "0.63409275", "0.6337255", "0.6337044", "0.63351464", "0.63086027", "0.63076586", "0.6305647", "0.6290673", "0.62773985", "0.62707794", "0.6249102", "0.62377316", "0.621...
0.0
-1
////////////////STATEMENT AS daily ////////////////////district info
public function getYear() { $allYear=array(); $query="SELECT YEAR (input_date) as cyear FROM `consume_details` group by YEAR (input_date)"; // Utility::dd() $result=mysqli_query($this->conn,$query); while ($row=mysqli_fetch_assoc($result)) { $allYear['cyear']=$row; } return $allYear; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function viewdistrict(){\r\n\t\t//sql query\r\n\t\t$sql = \"SELECT * FROM districts\";\r\n\t\t//return executed query\r\n\t\treturn $this->db_query($sql);\r\n\t}", "public function getDistrictData($input);", "public function allDistrict(){\n $str = '';\n $this->CI->load->model('supervisor'...
[ "0.67293316", "0.65986574", "0.63050854", "0.6213003", "0.61374", "0.61374", "0.6083828", "0.59343004", "0.5927776", "0.58718556", "0.58718556", "0.5827501", "0.5805237", "0.57807857", "0.5765914", "0.572393", "0.5710099", "0.5671252", "0.56501824", "0.56356156", "0.56031215"...
0.0
-1
like all the other controllers, pulls data from the db, throws it into the view. do each one individually.
public function index(){ $this->load->helper('url'); $recipesData = $this->recipes->getRecipes(); $recipes = array(); foreach($recipesData as $recipe){ $ingredients = $this->recipes->getIngredients($recipe->id); $strIngredients = ""; foreach($ingredients as $ingredient){ $strIngredients .= ' ' . $ingredient->name; } $recipes[] = array('name' => $recipe->name, 'description' => $strIngredients, 'id' => $recipe->id); } $this->data['recipesRow'] = $recipes; $stockData = $this->stock->getStock(); $stock = array(); foreach($stockData as $stok){ // ran out of names $stock[] = array('name' => $stok->name, 'price' => $stok->price, 'quantity' => $stok->quantity, 'id' => $stok->id); } $this->data['stockRow'] = $stock; $suppliesData = $this->supplies->getSupplies(); $supplies = array(); foreach($suppliesData as $supply){ $supplies[] = array('name' => $supply->name, 'on hand' => $supply->onHand, 'containerspership' => $supply->containersPerShipment, 'containers' => $supply->containers, 'itemspercontainer' => $supply->itemsPerContainer, 'cost' => $supply->cost, 'id' => $supply->id); } $this->data['suppliesRow'] = $supplies; $this->data['pagetitle'] = 'Administrator'; $this->data['pagebody'] = 'administrator'; $this->render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index() {\r\n $data['data'] = $this->MemberModel->getData(3); //executes function from model returns rexcord set\r\n $this->load->view('MemberView', $data); //directs and passes data from the databse to the view\r\n }", "function run() {\r\n $this->view->data=$this->model-...
[ "0.6614171", "0.65896195", "0.651736", "0.65077776", "0.64798987", "0.6478829", "0.6467275", "0.6407041", "0.6379127", "0.63708276", "0.63701", "0.636618", "0.63462025", "0.63396066", "0.63339204", "0.63233596", "0.6314824", "0.6288283", "0.6275687", "0.62703335", "0.62660086...
0.60365653
63
Check if multisite is on and this feature is allowed
public function register(){ if(is_multisite()){ $multisiteOption = get_site_option('Autobody_Network_group'); if(!($multisiteOption['autobody_search'] == 1)) return; } $option = get_option('Autobody_group'); $activated = (isset($option['autobody_search'])) ? $option['autobody_search'] : false ; if(!$activated) return false; $this->settings = new SettingsApi(); $this->AdminCallbacks = new AdminCallbacks(); $this->adminSubpages(); $this->settings->addSubPages($this->admin_subpages)->register(); add_shortcode( 'autobody_searchbox', array($this , 'autobody_searchbox' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_multisite() {\n\t// \treturn MULTISITE;\n\n\t// if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) )\n\t// \treturn true;\n\n\treturn false;\n}", "private function isProductionSiteAllowed()\n\t{\n\t\tif (GetConfig('HostingId')) {\n\t\t\tif (GetConfig('AvailableFeatures'...
[ "0.7262101", "0.70172584", "0.69088966", "0.6827712", "0.6740569", "0.67308456", "0.6609747", "0.65630555", "0.6554143", "0.65285754", "0.64625573", "0.64503735", "0.6425157", "0.6411872", "0.6373264", "0.6331928", "0.6324281", "0.6238157", "0.6234666", "0.6218275", "0.618731...
0.0
-1