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
function execute the query
public function execute($option = array()){ $this->_cursor = $this->_dbh->prepare($this->_sql); if($option){ for($i = 0;$i < count($option);$i++){ $this->_cursor->bindParam($i+1,$option[$i]); } } $this->_cursor->execute(); return $this->_cursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeQuery($query);", "public function execute($query);", "protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}", "abstract public function execute($query);", "abstract function executeQue...
[ "0.81854355", "0.78660095", "0.77936774", "0.7739099", "0.7710987", "0.767431", "0.76351625", "0.76351625", "0.76351625", "0.7603696", "0.75695926", "0.75695926", "0.75695926", "0.75695926", "0.75695926", "0.75695926", "0.75695926", "0.75695926", "0.75695926", "0.75695926", "...
0.0
-1
function load data on table
public function loadAllRows($option = array()){ if(!$option){ if(!$result = $this->execute()) return false; } else{ if(!$result = $this->execute($option)) return false; } return $result->fetchAll(PDO::FETCH_OBJ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadRow() {}", "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n $thi...
[ "0.7289456", "0.7276894", "0.7203309", "0.6939697", "0.6935157", "0.67964447", "0.67687416", "0.67539597", "0.6640695", "0.6482271", "0.6473478", "0.6467698", "0.6443425", "0.6409087", "0.64024234", "0.63966", "0.63871753", "0.63666385", "0.63610893", "0.63512236", "0.6332777...
0.0
-1
function load 1 data on tabele
public function loadRows($option = array()){ if(!$option){ if(!$result = $this->execute()) return false; } else{ if(!$result = $this->execute($option)) return false; } return $result->fetch(PDO::FETCH_OBJ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadData(){\r\n\t\t\t $pseudo = addslashes($this -> getPseudo()) ;\r\n\r\n\t\t if(! empty($pseudo)){\r\n\t\t\t$q = \"select * from UserTab where User_pseudo='\".$pseudo.\"'\";\r\n\t\t\t$r = execute($q);\r\n\t\t\twhile( $l = mysql_fetch_assoc($r) ){\r\n\t\t\t\t$this -> setFields($l);//Affectation au...
[ "0.65471524", "0.6047831", "0.59868556", "0.59704965", "0.5948991", "0.5943037", "0.59404165", "0.59404165", "0.59041655", "0.5886582", "0.5884342", "0.5864381", "0.58333427", "0.58153254", "0.580147", "0.5780677", "0.5776188", "0.57651263", "0.5762851", "0.57624966", "0.5749...
0.0
-1
Get Comments recive id
public function GetCommentsData($_id, $_start, $_end) { //Get Database $_database = $this->ConnectDatabase(); //Create Data $_data = array($_id, $_start, $_end); //Call and return Database Function return $this->CallDatabase( $_database, $_data, function($_pdo, $_parameters) { //Create Quer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId()\n {\n return $this->_commentId;\n }", "public function getIdComment()\n {\n return $this->idComment;\n }", "public function getIdComment()\n {\n return $this->idComment;\n }", "public function getCommentId()\n {\n return $this->comment_...
[ "0.8121609", "0.79570055", "0.79570055", "0.7907798", "0.78875047", "0.78558445", "0.77994883", "0.7723602", "0.7546351", "0.75064725", "0.73979044", "0.73278487", "0.7171783", "0.706689", "0.69819933", "0.6853628", "0.68283504", "0.68185574", "0.6779278", "0.6772789", "0.674...
0.0
-1
Get on Service data recive id
private function GetServices($_list) { //Get Database $_database = $this->ConnectDatabase(); //Create Data $_data = array($_list); //Call and return Database Function return $this->CallDatabase( $_database, $_data, function($_pdo, $_parameters) { $_cond = '(' . $_parameters[0] . ')'; /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getserviceId()\n {\n return $this->service_id;\n }", "public function getServiceId()\n {\n return $this->service_id;\n }", "public function getId(){\n return $this->_data['id'];\n }", "public function getServiceId() {\n return $this->service...
[ "0.7124434", "0.703428", "0.7018995", "0.695804", "0.6899601", "0.68947816", "0.6855121", "0.6855121", "0.6837995", "0.6758128", "0.6755041", "0.6755041", "0.67427254", "0.672395", "0.6703478", "0.6697409", "0.6664666", "0.6664666", "0.6661957", "0.66610676", "0.66610676", ...
0.0
-1
Get Comments recive id
private function GetComments($_id) { //Get Database $_database = $this->ConnectDatabase(); //Create Data $_data = array($_id); //Call and return Database Function return $this->CallDatabase( $_database, $_data, function($_pdo, $_parameters) { //Create Query $_query = $_pdo->prepare("SEL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId()\n {\n return $this->_commentId;\n }", "public function getIdComment()\n {\n return $this->idComment;\n }", "public function getIdComment()\n {\n return $this->idComment;\n }", "public function getCommentId()\n {\n return $this->comment_...
[ "0.8121609", "0.79570055", "0.79570055", "0.7907798", "0.78875047", "0.78558445", "0.77994883", "0.7723602", "0.7546351", "0.75064725", "0.73979044", "0.73278487", "0.7171783", "0.706689", "0.69819933", "0.6853628", "0.68283504", "0.68185574", "0.6779278", "0.6772789", "0.674...
0.0
-1
Call and return Database Function
private function UpdateServices($_database, $_data) { return $this->CallDatabase($_database, $_data, function($_pdo, $_parameters) { $set = "id_services = ?, prices = ?, actives = ?"; //Create Query $_query = $_pdo->prepare("UPDATE `PartnerServices` ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDatabase();", "public function database();", "function smarty_function_db($params, &$smarty)\n{\n extract($params);\n switch($function) {\n\tcase \"fetch\":\n\t return content::fetch($key);\n\t break;\n\tdefault:\n\t return;\n\t break;\n }\n}", "function MySQL() {\n \n...
[ "0.69729066", "0.6956835", "0.68216145", "0.65721154", "0.65181994", "0.6486178", "0.6385656", "0.6359341", "0.63477767", "0.6345388", "0.63046753", "0.6275455", "0.6270393", "0.626223", "0.62439686", "0.6220885", "0.62064826", "0.6203183", "0.6166822", "0.61633384", "0.61473...
0.0
-1
Display a listing of the resource.
public function index(Request $request) { if($request->che_loja){ $cheques = Cheque::where('che_loja',$request->che_loja)->get(); } else { $cheques = Cheque::get(); } $lojas = Loja::all(); $data['lojas'] = converteArray($lojas,'loj_i...
{ "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(Cliente $cliente) { $bancos = Banco::all(); $lojas = Loja::all(); $data['bancos'] = converteArray($bancos,'ban_codigo','ban_nome'); $data['lojas'] = converteArray($lojas,'loj_id','loj_nome'); $clientes = $cliente->ativos(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $data = $request->except('_token'); //validação cheque $cheque = new Cheque(); $this->validate($request, $cheque->rules()); if($request->che_status == 'REPASSADO'){ $this->validate($request, [ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Store a newly created resource in storage.
public function readerStore(Request $request) { $data = $request->except('_token'); //validação cheque $cheque = new Cheque(); $rules = $cheque->rules(); if($request['che_status'] == 'REPASSADO'){ $rules = $rules + ['che_cliente_repassado' => 're...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Cliente $cliente, $id) { $cheque = Cheque::find($id); $bancos = Banco::all(); $lojas = Loja::all(); $clientes = $cliente->ativos(); $data['clientes'] = [null => ''] + converteArray($clientes,'cli_id','cli_nome'); $data['situacoe...
{ "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) { $data = $request->except('_token'); $cheque = Cheque::find($data['che_id']); $this->validate($request, $cheque->rules()); if($request['che_status'] == 'REPASSADO'){ $rules = $rules + ['che_cliente_repassado' => ...
{ "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) { $cheque = Cheque::find($id); $cheque->che_status = 'EXCLUIDO'; try { DB::beginTransaction(); $cheque->save(); DB::commit(); return redirect('central/cheque')->with('alert-success', 'Cheq...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Create a new job instance.
public function __construct(array $data) { list( 'type' => $this->type, 'payload' => $this->payload, 'visitor_id' => $this->visitor_id, 'user_id' => $this->user_id ) = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createJob( $creationParameters ){ return $this->APICallSub( '/jobs', array( 'create' => $creationParameters ), \"Could not create new job with query \" . $creationParameters['query'] . \" and operation \" . $creationParameters['operation'] ); }", "abstract public function makeJob();", "abstract...
[ "0.6920272", "0.6905722", "0.6905722", "0.6869542", "0.6808916", "0.65271425", "0.65184414", "0.64918077", "0.6489135", "0.6468623", "0.6425879", "0.64058304", "0.63938236", "0.63899404", "0.63753885", "0.6304669", "0.6256802", "0.6241474", "0.620155", "0.61789167", "0.607414...
0.0
-1
Fonction qui permet d'afficher l'image d'une armure ainsi que son infobulle complete
function affiche_image_armure($image_armures, $nom_armure, $defense_armure, $description_armures, $BonusPerception_armures, $bonusPv_armure){ $description_arme = $description_armures; echo "<td width=50 height=50 align=center> <img tabindex='0' src='../images/armures/$image_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rutaImageFly()\n {\n\n // primero vemos a que galeria pertenece\n $galeria = ORM::factory( 'Galeria', $this->galeria );\n\n return( $galeria->rutaImageFly().$this->imagen );\n\n }", "function affiche_image(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['grade']==0){\n\t\t\...
[ "0.6600475", "0.59704095", "0.59265107", "0.5846652", "0.5828441", "0.5810266", "0.5809202", "0.5763449", "0.5754753", "0.5673554", "0.5605244", "0.5597154", "0.5549073", "0.5548339", "0.553179", "0.553179", "0.55296594", "0.55296594", "0.55296594", "0.55296594", "0.55087835"...
0.59256065
3
Fonction qui permet d'afficher l'image d'une arme ainsi que son infobulle complete
function affiche_image_arme($image_arme, $nom_arme, $description_arme, $portee_arme, $degats_arme){ $description_arme = $description_arme; echo " <td width=50 height=50 align=center> <img tabindex='0' src='../images/armes/$image_arme' width=50 height=50 data-toggle='popover' data-trigger='focus' data-ht...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rutaImageFly()\n {\n\n // primero vemos a que galeria pertenece\n $galeria = ORM::factory( 'Galeria', $this->galeria );\n\n return( $galeria->rutaImageFly().$this->imagen );\n\n }", "function affiche_image(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['grade']==0){\n\t\t\...
[ "0.6336713", "0.62503296", "0.6117874", "0.6116785", "0.5952203", "0.59506184", "0.5931126", "0.59133375", "0.5911963", "0.591134", "0.5863301", "0.5862361", "0.57956654", "0.57742184", "0.57569027", "0.5738422", "0.57235086", "0.57223576", "0.5711278", "0.5711278", "0.571127...
0.5530196
40
Processes a potentially nested test suite based on various filters through the CLI.
private function processSuiteFilters(TestSuite $suite, array $arguments): void { if (empty($arguments['filter']) && empty($arguments[self::PARALLEL_ARG]) && empty($arguments['groups']) && empty($arguments['excludeGroups'])) { return; } $filter...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function runTests(){\n $process = new Process(['./vendor/bin/phpunit --filter '.$this->params['model_name'].'Test']);\n $process->start();\n foreach($process as $type => $data){\n if($process::OUT !== $type){\n $this->error($data);\n continue;\n...
[ "0.6128064", "0.60965717", "0.58767354", "0.5820667", "0.58174706", "0.58077425", "0.5785293", "0.57483566", "0.57361007", "0.57121193", "0.57006806", "0.56574285", "0.5647751", "0.56437147", "0.5621686", "0.5526055", "0.5493485", "0.5483558", "0.54710424", "0.5428393", "0.54...
0.57958055
6
Display a listing of the resource.
public function index() { $limit = Input::get('limit', 24); $input = Input::all(); $products = Products::filter(Input::all(), $limit); $types = Types::dropdownList(); $units = Units::dropdownList(); if (Request::ajax()) { return Response::json($products->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.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() { $types = Types::dropdownList(); $units = Units::dropdownList(); $suppliers = Suppliers::dropdownList(); return View::make('products.create', compact('types', 'units', 'suppliers')); }
{ "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() { $validator = Validator::make(Input::all(), Products::$rules); if ($validator->passes()) { $product = new Products; $product->name = addslashes(Input::get('name')); $product->color_id = Input::get('color'); $product->product_c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { $product = Products::find($id); if (Request::ajax()) { $return = [ 'product' => [ $product, 'unit' => $product->unit ] ]; return Response::json($product)->setCallb...
{ "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) { if (!$id) return Redirect::route('products.index') ->with('error', 'Please Provide product id'); $product = Products::find($id); if (empty($product)) return Redirect::route('products.index') ->with('error',...
{ "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($id) { if (Input::get('check_update') == 1) { $validator = Validator::make(Input::all(), Products::$rules2); if ($validator->passes()) { $product = Products::find($id); $product->name = addslashes(Input::get('name')); ...
{ "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) { if (!$id) return Redirect::route('products.index') ->with('error', 'Please provide product id'); $product = Products::find($id); if (empty($product)) return Redirect::route('products.index') ->with('erro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Retrieve a list of users with the given args. For use in select/multiselect fields.
public function handle() { mylisting_check_ajax_referrer(); try { $page = ! empty( $_REQUEST['page'] ) ? ( absint( $_REQUEST['page'] ) - 1 ) : 0; $search = ! empty( $_REQUEST['search'] ) ? sanitize_text_field( $_REQUEST['search'] ) : ''; $per_page = 25; $args = [ 'number' => $per_page, 'offset...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function route_userlist(array $args) {\n\t\tif (!self::$ctrl->get_user_data())\n\t\t\treturn self::$core::pj([Error::USER_NOT_LOGGED_IN], 401);\n\t\treturn self::$core::pj(\n\t\t\tself::$manage->list($args['get']), 403);\n\t}", "public function listUsers($fields = null);", "public function getUserList()...
[ "0.75620735", "0.747613", "0.7380027", "0.73233765", "0.7316735", "0.72555846", "0.7218982", "0.7210113", "0.7181653", "0.7181653", "0.7181653", "0.7144198", "0.7095289", "0.70679975", "0.70199937", "0.69761664", "0.69761664", "0.69750905", "0.69583", "0.6955847", "0.6951631"...
0.0
-1
Handle the incoming request.
public function register(){ return view('form'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest() {}", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "function handleRequest() ;", "abstract public function handle...
[ "0.81443435", "0.80565155", "0.8054052", "0.8054052", "0.8054052", "0.8012054", "0.76565933", "0.7453767", "0.7427182", "0.74211967", "0.73596436", "0.7341611", "0.7303668", "0.72207993", "0.71966445", "0.71955097", "0.71865135", "0.71590275", "0.7092262", "0.7065288", "0.704...
0.0
-1
Wandelt bool in string um. true = 'true', false = 'false'
private function boolToString ($value) { if (true === $value) { return 'true'; } elseif (false === $value) { return 'false'; } else { return $value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function strbool($bool){\r\n return ($bool) ? \"true\" : \"false\";\r\n }", "function str_bool($string) {\n if (strtolower($string) === 'true') {\n return true;\n } elseif (strtolower($string) === 'false') {\n return false;\n }\n\n return $string;\n}", "private...
[ "0.8043605", "0.7928609", "0.7789", "0.77377677", "0.7605333", "0.7509016", "0.7467655", "0.7461856", "0.74408287", "0.7313766", "0.7304124", "0.7283361", "0.7221148", "0.72047126", "0.71382177", "0.7126457", "0.7120392", "0.7034559", "0.70320797", "0.7021255", "0.7020636", ...
0.6793404
35
Erzeugt Textausgabe der Ergebnisse der einzelnen Testcases
public function getTestResults() { /* * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun */ if ($this->_needRun === true) { $this->run(); } foreach ($this->_testCases as $key => $testCase) { /* * Zusicherung nicht erfüllt */ if ($testCase['assert'] !== $testCase['result']) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_test_solution($testtype, $wo_record, $nosent, $wo_text)\n{\n if ($testtype == 1) {\n $trans = repl_tab_nl($wo_record['WoTranslation']) . \n getWordTagList($wo_record['WoID'], ' ', 1, 0);\n return $nosent ? $trans : \"[$trans]\";\n }\n return $wo_text;\n}", "public funct...
[ "0.6502885", "0.64818543", "0.6185765", "0.61788356", "0.6126857", "0.6037545", "0.5992247", "0.59856766", "0.5964182", "0.5964182", "0.5964182", "0.5935763", "0.5934362", "0.59342265", "0.59047616", "0.58899754", "0.5848275", "0.5847947", "0.579946", "0.57921237", "0.5785505...
0.5969187
8
mengambil data produk secara random dengan batas maksimal yang ditentukan pd controller
function get_limit_history_penjualan($limit){ $this->db->order_by('Tanggal','asc'); $this->db->limit($limit); $query = $this->db->get('penjualan'); if ($query->num_rows()>0){ return $query->result(); }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n /* $products = [];\n $types = ['Полиэфирные', 'Эпоксидные', 'Эпоксидно-полиэфирные', 'Полиуретановые', 'Силиконовые', 'Низкотемпературные', 'Фотоотверждающиеся'];\n $effects = ['Муар', 'Шагрень', 'Металлик', 'Глянец', 'Антик', 'Молотковый', 'Кожа', 'Другие'];\n ...
[ "0.66269016", "0.64214265", "0.6397551", "0.627249", "0.62071973", "0.62065107", "0.6168384", "0.61676747", "0.61614007", "0.61047935", "0.6078641", "0.6075553", "0.60733825", "0.607329", "0.6066341", "0.6062846", "0.6062405", "0.60569775", "0.6043831", "0.6038772", "0.603773...
0.0
-1
Start function currency general setting
public function foodbakery_general_settings() { global $foodbakery_settings, $foodbakery_plugin_options; $base_currency = isset( $foodbakery_plugin_options['foodbakery_base_currency'] ) ? $foodbakery_plugin_options['foodbakery_base_currency'] : 'USD'; $currencies = array(); $foodbakery_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_currency_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n\t\t\t if ($this->lang->line('admin_settings_currency_setting') != '') \n\t\t $this->data['hea...
[ "0.60177004", "0.5987294", "0.59734225", "0.59612644", "0.5835977", "0.5631259", "0.5594137", "0.5564504", "0.54974616", "0.54795855", "0.54729855", "0.54702", "0.5442873", "0.54342663", "0.5427754", "0.54122585", "0.53925544", "0.53905886", "0.53758883", "0.5370719", "0.5362...
0.54920423
9
Start function get string length
public function foodbakery_get_string($length = 3) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $randomString = ''; for ( $i = 0; $i < $length; $i ++ ) { $randomString .= $characters[rand(0, strlen($characters) - 1)]; } return $randomString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLength();", "public function getTextLength();", "public function getLength() {}", "public function getLength() {}", "public function getLength() {}", "public function getLength() {}", "abstract public function getLength();", "public function length();", "public function length();...
[ "0.7940174", "0.78234833", "0.7792765", "0.7792765", "0.7792765", "0.77927214", "0.77790916", "0.7693953", "0.7693953", "0.76460564", "0.76370215", "0.7603378", "0.7603378", "0.7567684", "0.73764694", "0.73177487", "0.7276809", "0.72610754", "0.7218456", "0.72115904", "0.7211...
0.0
-1
Start function for add transaction
public function foodbakery_add_transaction($fields = array()) { global $foodbakery_plugin_options; define("DEBUG", 1); define("USE_SANDBOX", 1); define("LOG_FILE", "./ipn.log"); include_once('../../../../wp-load.php'); if ( is_array($fields) ) { foreach ( $fields as $key => $value ) { update_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function startTransaction();", "public function startTransaction(): void;", "abstract protected function _start_transaction();", "public function transactionStart()\n\t{\n\t\treturn;\n\t}", "public static function beginTransaction()\n {\n }", "public function starttrans(){\n...
[ "0.8024438", "0.78836364", "0.78535604", "0.76631075", "0.7654583", "0.7533349", "0.7349403", "0.73433846", "0.7340766", "0.7340766", "0.7340766", "0.73401487", "0.731239", "0.7309004", "0.72152275", "0.71524674", "0.71479315", "0.7120124", "0.71138966", "0.7101748", "0.70928...
0.0
-1
The default read Action Return the content of the collection, get filters from the request params, get sort from request params
public function indexAction() { // merge filter and tFilter $jsonFilter = $this->params()->fromQuery('filter', '[]'); $jsonTFilter = $this->params()->fromQuery('tFilter', '[]'); $filterArray = Json::decode($jsonFilter, Json::TYPE_ARRAY); $tFilterArray = Json::decode($js...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n \n /* return *///$sort \n\n \n $articles = Article::query();\n\n /* foreach($sort as $sortcol)\n {\n $sortdir = starts_with($sortcol, '-') ? 'desc' : 'asc';\n\n $sortCol = ltrim($sortcol, '-');\n\n $articles->or...
[ "0.71956176", "0.6952709", "0.69207686", "0.6442485", "0.6320944", "0.6320944", "0.63077927", "0.6276717", "0.6242123", "0.6203577", "0.6187756", "0.61778027", "0.61718285", "0.6163955", "0.61636657", "0.61635077", "0.6118013", "0.6116387", "0.6108365", "0.6090199", "0.607695...
0.57027173
95
read child action Return the children of a node
public function readChildAction() { $filterJson = $this->params()->fromQuery('filter'); if (isset($filterJson)) { $filters = Json::decode($filterJson, Json::TYPE_ARRAY); } else { $filters = null; } $sortJson = $this->params()->fromQuery('sort')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_children();", "public function getChildren() {}", "public function getChildren() {}", "public function getChildren() {}", "public function getChildren(): array;", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public functi...
[ "0.77264273", "0.71590537", "0.71590537", "0.71590537", "0.7071325", "0.70659435", "0.70659435", "0.70659435", "0.70659435", "0.70659435", "0.70659435", "0.70659435", "0.70659435", "0.70659435", "0.70227295", "0.6914141", "0.69137156", "0.6863004", "0.6794241", "0.6781224", "...
0.7977928
0
The create action of the CRUD API
public function createAction() { $data = $this->params()->fromPost('data'); if (!is_null($data)) { $insertData = Json::decode($data, Json::TYPE_ARRAY); if (is_array($insertData)) { if ($insertData["fields"]["lieuCommunautaire"] && $insertData["fields"]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate() {}", "public function actionCreate() {}", "public function createAction()\r\n\t{\r\n\t\treturn $this->_crud();\r\n\t}", "public function create()\n {\n //Not Used because using API Route\n }", "public function create()\n {\n // I skip using this create ...
[ "0.8343484", "0.8343484", "0.8164946", "0.80668724", "0.7913472", "0.7911597", "0.788851", "0.7771259", "0.7736378", "0.77246207", "0.7719395", "0.77157027", "0.77157027", "0.77157027", "0.77157027", "0.77157027", "0.77101797", "0.77101797", "0.77101797", "0.77101797", "0.770...
0.0
-1
The update action of the CRUD API
public function updateAction() { $data = $this->params()->fromPost('data'); if (!is_null($data)) { $updateData = Json::decode($data, Json::TYPE_ARRAY); if (is_array($updateData)) { if ($updateData["fields"]["lieuCommunautaire"] && $updateData["fields"]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate() {}", "public function actionUpdate() {}", "public function updateAction()\n {\n }", "public function update($request,$id) {\n \n\n }", "public function update($id)\n {\n\n\n }", "public function update(Request $request)\n {\n \n\n \n }", "pub...
[ "0.82840073", "0.82840073", "0.79120773", "0.7680142", "0.7621814", "0.7594674", "0.7525082", "0.7525082", "0.7525082", "0.7525082", "0.7525082", "0.7525082", "0.7525082", "0.75232524", "0.75232524", "0.7512577", "0.7506313", "0.7486142", "0.7486142", "0.7486142", "0.7478", ...
0.0
-1
Return a list of ordered objects
public function getOrderedListAction() { // merge filter and tFilter $jsonFilter = $this->params()->fromQuery('filter', '[]'); $jsonTFilter = $this->params()->fromQuery('tFilter', '[]'); $filterArray = Json::decode($jsonFilter, Json::TYPE_ARRAY); $tFilterArray = Json::d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrderings() ;", "public function order();", "public function getOrderings();", "public function getOrderings() {}", "public function getOrderList()\n {\n }", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();",...
[ "0.7055862", "0.6956511", "0.6949284", "0.67653656", "0.6589244", "0.6573608", "0.6573608", "0.6573608", "0.6573608", "0.6573608", "0.6573608", "0.6554101", "0.64963144", "0.6456243", "0.6432741", "0.6295324", "0.6289937", "0.621744", "0.61739653", "0.6167981", "0.6122399", ...
0.64063704
15
Return result of applying one semigroup with another.
public function concat(Semigroup $value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function append(SemigroupInterface $other)\n {\n if ($other instanceof static) {\n return new static(array_merge($this->value, $other->value));\n }\n\n $this->throwMismatchedDataTypeException($other);\n }", "public function group($group);", "function multiply ($othe...
[ "0.5006125", "0.48509556", "0.4818769", "0.47442707", "0.46887252", "0.4685786", "0.46814954", "0.46423388", "0.45940766", "0.45835826", "0.45731094", "0.45561758", "0.45561758", "0.45542932", "0.4498245", "0.44929102", "0.4488084", "0.44859546", "0.4453181", "0.44419634", "0...
0.57989866
0
check SiteController > index on how to use
protected function run() { //to use //$this->task is available here //$this->queue is available here //set $this->exit_response to any value before returning //with a EXIT_STATUS. This will be saved to response column of the $task object. //if you want to retry ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function singleIndexAction() {}", "public function indexAction()\n {\n //for real application\n }", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "...
[ "0.7648783", "0.76236945", "0.747488", "0.747371", "0.747371", "0.747371", "0.747371", "0.747371", "0.747371", "0.747371", "0.747371", "0.747371", "0.7472966", "0.74594134", "0.7387511", "0.73739916", "0.7368913", "0.7368913", "0.7332823", "0.73195225", "0.7292495", "0.7292...
0.0
-1
Load configuration from file or from direct input
public function load ($configuration): void { if (!is_array($configuration) && !file_exists($configuration)) { throw new ParseInputException('Configuration format was not recognized'); } if (file_exists($configuration) && is_readable($configuration)) { $conf_file = $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function loadConfig();", "public abstract function loadConfig($fileName);", "public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t...
[ "0.7931351", "0.7747518", "0.7396795", "0.70891684", "0.7068767", "0.70388204", "0.7030249", "0.6977918", "0.6922984", "0.68666667", "0.68529874", "0.68346614", "0.6811175", "0.680894", "0.6737179", "0.6722655", "0.6704872", "0.6653745", "0.6618646", "0.656093", "0.6560384", ...
0.60972387
59
It returns configuration even from nested array
public function get (string ...$keys) { if (func_num_args() == 0) { return $this->config; } else { $key = array_pop($keys); $part = $this->get(...$keys); return (isset($part[$key])) ? $part[$key] : null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfigArray() {}", "function get_config_array();", "abstract protected function configs(): array;", "public function getConfiguration(): array;", "public function getConfiguration(): array;", "public function convertValuedToNestedConfigurationDataProvider() {}", "public function getC...
[ "0.6867644", "0.670817", "0.66410536", "0.6533017", "0.6533017", "0.64468205", "0.6347179", "0.63418776", "0.6334443", "0.6321901", "0.62961584", "0.62693805", "0.62184304", "0.6114488", "0.6104361", "0.6104361", "0.6104361", "0.61037207", "0.60898066", "0.6089514", "0.606520...
0.0
-1
array_merge() function cannot work with arrays within arrays All variable types can be inserted, if type differs it takes always the second one Values are rewritten by values which were given later
private function merge (...$configurations) { $out = []; // If there is more then two arguments, it will first merge first two, // then the result with third, then with forth, etc. if (count($configurations) > 2) { $out = array_shift($configurations); forea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_merge() {\n\t\t$args = func_get_args();\n\t\tforeach ($args as $k=>$value) {\n\t\t\tif (!is_array($value)) $value=array();\n\t\t\t$args[$k]=$value;\n\t\t}\n\t\treturn call_user_func_array(\"array_merge\", $args);\n\t}", "public function merge() {\n\t\t// Holds all the arrays passed\n\t\t$params = ...
[ "0.76868737", "0.76136935", "0.748844", "0.71584415", "0.71053654", "0.7054332", "0.7027641", "0.698479", "0.6980889", "0.6904085", "0.6892235", "0.68613726", "0.684881", "0.68436575", "0.6810824", "0.67946887", "0.67337453", "0.67173415", "0.6695104", "0.66826546", "0.667057...
0.5714421
93
Create a new job instance.
public function __construct() { infolog('[BulkInventory] __construct at '. now()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createJob( $creationParameters ){ return $this->APICallSub( '/jobs', array( 'create' => $creationParameters ), \"Could not create new job with query \" . $creationParameters['query'] . \" and operation \" . $creationParameters['operation'] ); }", "abstract public function makeJob();", "abstract...
[ "0.6920272", "0.6905722", "0.6905722", "0.6869542", "0.6808916", "0.65271425", "0.65184414", "0.64918077", "0.6489135", "0.6468623", "0.6425879", "0.64058304", "0.63938236", "0.63899404", "0.63753885", "0.6304669", "0.6256802", "0.6241474", "0.620155", "0.61789167", "0.607414...
0.0
-1
Pull down stock that's changed and write it to a file.
public function writeEbayMipFile() { $result=false; try{ infolog('[BulkInventory.writeEbayMipFile] Preparing update file... '. now()); //todo!!!! ISSUE WITH THIS QUERY: CHECK IT! $all=Product::join("ebay_details AS ed","ed.product_id","=","products.id")->whereNotN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function commitChanges() {\r\n\t\tglobal $file;\r\n\t\tglobal $expenses;\r\n\r\n\t\tsortExpensesDate();\r\n\t\trenumber(&$expenses);\r\n\r\n\t\t$xmlString = toXML();\r\n\r\n\t\t$fp = fopen($file.\".bak\", \"w\");\r\n\t\tflock($fp, LOCK_EX);\r\n\t\tfputs($fp, $xmlString);\r\n\t\tflock($fp, LOCK_UN);\r\n\t\tfclose($...
[ "0.5764854", "0.54556626", "0.5321875", "0.5282815", "0.52233326", "0.5221064", "0.5173942", "0.5168852", "0.5160336", "0.51121914", "0.509885", "0.50608575", "0.50608575", "0.50608575", "0.50608575", "0.50608575", "0.50586665", "0.50586665", "0.50387144", "0.49953738", "0.49...
0.48830703
28
Push the eBay MIP file to the MIP server.
public function pushEbayMipFile() { $result=false; try{ infolog('[BulkInventory.pushEbayMipFile] Preparing to send file... '. now()); Storage::disk('mip')->put('inventory/'.basename($this->ifile), file_get_contents($this->ifile)); infolog('[BulkInventory.pushEba...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uploadApkPostAction() {\n\t $ret = Common::uploadApk('apk', 'gdtdelivery');\n\t $this->assign('code' , $ret['data']);\n\t $this->assign('msg' , $ret['msg']);\n\t $this->assign('data', $ret['data']);\n\t $apkId = $this->getInput('apkId');\n\t $this->assign('apkId', $apkId);\n\t ...
[ "0.51826084", "0.5121605", "0.5018611", "0.5000457", "0.49861905", "0.49823323", "0.49602786", "0.49558124", "0.49434078", "0.48499784", "0.48164496", "0.4805267", "0.48006034", "0.47724742", "0.4767228", "0.47614112", "0.47601822", "0.47166955", "0.4707483", "0.47058022", "0...
0.6761898
0
Update the Sync Date so we know what was updated and when.
public function updateSyncDate() { $result=false; try{ infolog('[BulkInventory.updateSyncDate] Preparing to update sync date... '. now()); $sQl=" UPDATE products p, ebay_details ed SET ed.sy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _update()\n\t{\n\t\t$this->date_modified = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->last_online = $this->date_modified;\n\t}", "protected function _syncModDate() {}", "public function refreshUpdated()\n {\n $this->setUpdated(new \\DateTi...
[ "0.7180906", "0.7105985", "0.6791538", "0.65797913", "0.6517309", "0.6515964", "0.649983", "0.6487567", "0.64808726", "0.6479388", "0.6479388", "0.6421553", "0.6416609", "0.64085025", "0.63902056", "0.63709426", "0.63574404", "0.63574404", "0.63495964", "0.63368946", "0.63363...
0.6708891
3
Run the database seeds.
public function run() { // when trying seed, possible error "Unique violation: // duplicate key value violates unique constraint "association_user_actions_user_id_action_id_unique" factory(AssociationUserAction::Class, 20)->create(); }
{ "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
funcion que contiene la relacion de la tabla Type_Users
public function user(){ return $this->hasMany('App\User'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypeUsers(){\n $query = \"SELECT * FROM rol\";\n return $this->consulta($query);\n }", "function getUsers($user_type){\r\n global $pdo;\r\n\t\t\t$select = $pdo->prepare(\"SELECT * ,users.id AS userId \r\n FROM users \r\n\t\t\tLEFT JOIN user_types ON users.typ...
[ "0.7246618", "0.69559604", "0.65022975", "0.6410035", "0.63891953", "0.6331422", "0.6225756", "0.6192659", "0.6192659", "0.61711675", "0.6150333", "0.6141662", "0.6138367", "0.61130226", "0.60958815", "0.60869753", "0.6085064", "0.6082112", "0.60760975", "0.607591", "0.605454...
0.0
-1
Display a listing of the resource.
public function index() { $Product = Product::with('category','brand')->latest()->get(); return view('backend.admin.product.index', compact('Product')); }
{ "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() { $Category = Category::where('status',1)->latest()->get(); $Brand = Brand::where('status',1)->latest()->get(); return view('backend.admin.product.create', compact('Category','Brand')); }
{ "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) { // Product input validation $request->validate([ 'product_name' => 'required|unique:products,product_name', 'product_code' => 'required', 'product_price' => 'required', 'product_quantity' => 'required', 'category' => 'required...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $Edit = Product::findOrFail($id); $Category = Category::latest()->get(); $Brand = Brand::latest()->get(); return view('backend.admin.product.edit', compact('Edit','Category','Brand')); }
{ "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) { // Validation $request->validate([ 'product_name' => 'required', 'product_code' => 'required', 'product_price' => 'required', 'product_quantity' => 'required', 'category' => 'required', 'brand' => 'required', ...
{ "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) { // Find image name $image = Product::find($id); $one = $image->thumbnail_image; $two = $image->image_one; $three = $image->image_two; $del = unlink(public_path('backend/img/product/').$one); $del = unlink(public_path('backend/img/product/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
$columns is an array of strings, representing the names of the columns
public function mysql_insert(database $db,array $columns,array $values,$flags=0) { // $values is an array of associative arrays $cl = []; $cls = []; foreach($columns as $col) if(isset($this->columns[$col])) { $cls[] = $col; $cl[] = $db->field($col); } if(empty($cl)) return false; $column_list ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function columns(): array;", "abstract protected function columns();", "public function admin_table_columns($_columns)\n {\n }", "public function setColumns(array $columns);", "function ColumnNames($columnNames = null);", "abstract public function tableColumns();", "public fun...
[ "0.75051", "0.74370253", "0.74145895", "0.7267179", "0.7158874", "0.71196157", "0.7102883", "0.7057539", "0.704516", "0.7021971", "0.6999432", "0.69876426", "0.69788724", "0.6972669", "0.69641966", "0.6953564", "0.6924094", "0.6898114", "0.6898114", "0.6898114", "0.6898114", ...
0.0
-1
$updates is an associative array of the form 'column_name'=>'value to update'
public function mysql_update(database $db, array $updates, array $where, $flags=0) { // $where is an associative array of the form 'column_name'=>'value to match' $assigns = []; foreach($updates as $col=>$val) { if(!isset($this->columns[$col])) continue; $assigns[] = $this->columns[$col]->assign($db,$val); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function update($updates) {\n\t\t\tglobal $db;\n\n\t\t\t$sql = \"UPDATE \".static::$table_name.\" SET \";\n\t\t\t$sql1 = \"\";\n\t\t\tforeach ($updates as $key => $value) {\n\t\t\t\t$sql1 .= \"`\".$db->prep_sql($key).\"`\".\"='\".$db->prep_sql($value).\"',\";\n\t\t\t}\n\t\t\t$sql1 = substr($sql1, 0, ...
[ "0.7651236", "0.76098573", "0.74142003", "0.7406572", "0.7088397", "0.69487536", "0.68882394", "0.68782127", "0.6818406", "0.6692337", "0.66538024", "0.6647281", "0.660413", "0.65639263", "0.6557426", "0.65460145", "0.6539663", "0.6531155", "0.65224665", "0.6515195", "0.64972...
0.6538181
17
$columns is a list of column names; or null or empty array for all columns.
public function mysql_select(database $db, array $columns=null, array $where=[], array $orderby=[], $flags=0) { // $where is an associative array of the form 'column_name'=>'value to match' // $orderby is a list of column names, which might be preceded by a sign. if(empty($columns)) $columns_list = '*'; else...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setColumns(array $columns);", "public function setColumns(array $columns);", "protected function columns(array $columns = []): array\n {\n if ( !empty( $columns ) ) {\n $this->_columns = $columns;\n }\n return $this->_columns ?? [];\n }", "public functio...
[ "0.74022114", "0.733141", "0.73166895", "0.72951746", "0.7202835", "0.7135698", "0.713421", "0.70865303", "0.7064822", "0.70646155", "0.70634896", "0.70590675", "0.7028957", "0.7003866", "0.69968444", "0.6993338", "0.6901982", "0.67878973", "0.67622983", "0.674821", "0.670871...
0.0
-1
/ Plugin Name: BuddyPress Block Activity Stream Types Plugin URI: Description: Blocks an activity record (based on types) from being saved to the database
function etivite_bp_activity_block_init() { require( dirname( __FILE__ ) . '/bp-activity-block.php' ); if ( file_exists( dirname( __FILE__ ) . '/languages/' . get_locale() . '.mo' ) ) { load_textdomain( 'bp-activity-block', dirname( __FILE__ ) . '/languages/' . get_locale() . '.mo' ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bp_register_activity_actions()\n {\n Fossil::register_buddypress_activities( Fossil::POST_TYPE );\n FossilDimension::register_buddypress_activities( FossilDimension::POST_TYPE );\n FossilLocation::register_buddypress_activities( FossilLocation::POST_TYPE );\n Stratum:...
[ "0.6080092", "0.5801954", "0.5749655", "0.55721563", "0.5500849", "0.5484067", "0.52682984", "0.52105767", "0.517754", "0.50663733", "0.50582033", "0.5043011", "0.50413674", "0.50001854", "0.5000131", "0.49938315", "0.49930844", "0.49695605", "0.49414673", "0.49180478", "0.49...
0.4854846
24
walk through file, with basename as date start, extension as limitation check if date start expires limitation, if dose, foreach lines, del it remove repeat item
public function expire($key, $ttl) { $filename = $this->_path.date('Y-m-d').'.'.$ttl; $mod = $this->getFileMod($key); $val = $mod.DIRECTORY_SEPARATOR.$key.PHP_EOL; TL_FSO::createFile($filename, $val, 'ab+'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteExpiredFiles(){\r\n $dir = $this->emailVerify->getDataFolder().self::FOLDER_PATH;\r\n foreach (glob($dir.\"*.token\") as $file) {\r\n $uF = unserialize(gzdecode(file_get_contents($file)));\r\n $tee = new TokenExpireEvent($this->emailVerify, $uF[\"token\"]);...
[ "0.57097393", "0.55666465", "0.55555534", "0.54327804", "0.5403868", "0.5398776", "0.53278434", "0.52604294", "0.5250841", "0.5239483", "0.517397", "0.51105773", "0.50589854", "0.503276", "0.5026162", "0.50094795", "0.49739945", "0.49374723", "0.49368143", "0.49172845", "0.48...
0.0
-1
Create the event listener.
public function __construct() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRequestCreateListener($listener);", "public function onEvent();", "private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}", "public function listener(Listener $listener);", "protected function setupListeners()\n {\n ...
[ "0.65685207", "0.62875676", "0.6221792", "0.6197413", "0.61627764", "0.6129312", "0.6096226", "0.6056844", "0.6051069", "0.6041841", "0.596228", "0.596194", "0.5957539", "0.59439605", "0.58821785", "0.58821785", "0.5874665", "0.5864387", "0.5856076", "0.584338", "0.5824244", ...
0.0
-1
Creates client credentials from request cookie
private function fromCookie($request): ?CredentialsIdentityInterface { // query for clientid cookie value if ((null === $clientId = $this->getRequestCookie($request, 'clientid'))) { return null; } // query for clientsecret cookie value if ((null === $clientSecre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_auth_cookie() {\r\n $postfields = http_build_query([\r\n 'username' => $this->username,\r\n 'password' => $this->password,\r\n 'csrfmiddlewaretoken' => $this->csrf_token\r\n ]);\r\n curl_setopt_array($this->curl_handle, [\r\n CUR...
[ "0.6631957", "0.6556319", "0.6215283", "0.62011033", "0.61798906", "0.61543405", "0.6088087", "0.5950152", "0.59356004", "0.58877265", "0.585527", "0.58537436", "0.57893586", "0.57720083", "0.5761523", "0.5721401", "0.5644839", "0.5635179", "0.56252575", "0.5622148", "0.56193...
0.69574565
0
Create client credentials from server request
private function fromHeaders($request): ?CredentialsIdentityInterface { // query for client secret header value if (null === ($secret = $this->getClientSecret($request))) { return null; } // query fir client id header value if (null === ($client = $this->getClien...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateCredentials()\n {\n $key = $this->engine->config->get('roamtechapi.client_id');\n $secret = $this->engine->config->get('roamtechapi.client_secret');\n\n return [\n 'client_id' => $key,\n 'client_secret' => $secret,\n 'grant_type' => ...
[ "0.6848708", "0.66539705", "0.6596897", "0.64541686", "0.6091303", "0.6066676", "0.60566235", "0.59592855", "0.5938037", "0.59242547", "0.58922374", "0.58759594", "0.57762706", "0.5742184", "0.5712649", "0.56995255", "0.5690996", "0.56826663", "0.56785816", "0.5675048", "0.56...
0.56960094
16
Get client secret from server request
private function getClientSecret($request) { // We search for authorization secret using all possible header values // in order to support legacy applications $secret = $this->getHeader($request, 'x-client-secret', null); $secret = $secret ?? $this->getHeader($request, 'x-authorizati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClientSecret();", "public function getClientSecret();", "public function getClientSecret(): string\n {\n return (string) data_get($this->args, 'credentials.secret');\n }", "protected function getClientSecret()\n {\n return $this->sharedSecret;\n }", "public func...
[ "0.78790575", "0.78790575", "0.7767046", "0.75974846", "0.75915354", "0.75818396", "0.74957526", "0.74957526", "0.74164337", "0.741616", "0.7377567", "0.7377567", "0.7326848", "0.7326848", "0.7326848", "0.7326848", "0.73017097", "0.7164806", "0.71333", "0.71333", "0.71333", ...
0.7184351
17
Get client id from server request
private function getClientId($request) { $clientId = $this->getHeader($request, 'x-authorization-client-id', null); $clientId = $clientId ?? $this->getHeader($request, 'x-client-id', null); $clientId = $clientId ?? $this->getHeader($request, 'x-authorization-client-token', null); if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buffer_client_id()\r\n\t{\r\n\t\treturn $this->buffer->client_id();\r\n\t}", "public function getClientId(): string\n {\n return (string) data_get($this->args, 'credentials.id');\n }", "public function getClientID()\n {\n return $this->ClientID;\n }", "public functio...
[ "0.7389564", "0.7323601", "0.7248952", "0.72332084", "0.71833843", "0.71833843", "0.71833843", "0.71833843", "0.71833843", "0.71833843", "0.7123022", "0.7123022", "0.7074379", "0.7018437", "0.70152587", "0.701252", "0.701252", "0.701252", "0.701252", "0.701252", "0.6962978", ...
0.74348706
0
/ Get user by id
function get_user($value, $id) { $this->db->select($value); $this->db->from('tbl_users'); $this->db->join('tbl_users_details', 'tbl_users.id=tbl_users_details.user_id'); $this->db->where('tbl_users.id', $id); $query = $this->db->get(); return $query->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUser($id);", "private function getUserById($id) {\n\t\t$em = $this->getDoctrine()->getManager()->getRepository('AppBundle\\Entity\\User');\n\n\t\t$user = $em->findOneById($id);\t\n\t\t\n\t\treturn $user;\n\t}", "public static function get_user($user_id);", "public static function getUserBy...
[ "0.87084013", "0.8556859", "0.8538246", "0.8502772", "0.8407413", "0.8392154", "0.8358869", "0.83157295", "0.8314558", "0.8287737", "0.8285867", "0.8260336", "0.82571286", "0.8212068", "0.8200752", "0.81769675", "0.81748486", "0.8146213", "0.8140812", "0.81377506", "0.8136619...
0.0
-1
/ Get all userlist
function get_all_userslist() { if($this->session->userdata('id')==1){ $this->db->select('*'); $this->db->from('tbl_users'); $this->db->join('tbl_users_details', 'tbl_users.id=tbl_users_details.user_id'); $this->db->join('tbl_group', 'tbl_group.id=tbl_users.group_id'); $this->db->order_by('tbl_user...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserList()\n {\n return $this->userDao->getUserList();\n }", "public function getUsersList()\n {\n }", "function get_user_list(){\n\t\treturn array();\n\t}", "private function getUserList()\n {\n $users = User::getUsers();\n $users = ArrayHelper::map($u...
[ "0.85418767", "0.8498887", "0.84392023", "0.83264184", "0.8173872", "0.8169039", "0.8145582", "0.8145582", "0.8145582", "0.81180584", "0.81116956", "0.8076261", "0.8046867", "0.8009895", "0.8004545", "0.7951898", "0.79471433", "0.7908236", "0.7881276", "0.78437304", "0.784373...
0.0
-1
/ function to add new group
function add_users($table,$params) { $this->db->insert($table,$params); return $this->db->insert_id(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addGroup($group) {}", "public function addGroup($name);", "public function addGroup(Group $group);", "public function add()\n {\n $group = $this->Groups->newEntity();\n if ($this->request->is('post') && !empty($this->request->data)) {\n $this->Groups->patchEntity($...
[ "0.833398", "0.8059539", "0.8003178", "0.7954185", "0.79143786", "0.7855398", "0.7850422", "0.7809449", "0.7751934", "0.7666468", "0.7561044", "0.7538178", "0.7520063", "0.75053453", "0.7498945", "0.7494797", "0.7453119", "0.7446156", "0.74053997", "0.7393423", "0.7363377", ...
0.0
-1
/ function to update group
function update_users($table, $id,$params) { $this->db->where('id',$id); return $this->db->update($table,$params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function update() {\n\t\t$data = array(\n\t\t\t'tstamp' => $this['timeStamp'],\n\t\t\t'crdate' => $this['createDate'],\n\t\t\t'cruser_id' => $this['cruserUid'],\n\t\t\t'nam...
[ "0.8125539", "0.78114045", "0.73256415", "0.7309031", "0.7300588", "0.72937965", "0.7273951", "0.71679944", "0.70944285", "0.7087244", "0.7085254", "0.7047071", "0.70090157", "0.6934331", "0.6927319", "0.6919569", "0.69089717", "0.6884554", "0.68820566", "0.6873243", "0.68704...
0.0
-1
/ function to delete group
function delete_users($id) { $this->db->delete('tbl_users',array('id'=>$id)); return $this->db->delete('tbl_users_details',array('user_id'=>$id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _deleteGroup()\n\t{\n\t\t// Get the informations\n\t\t$group = kform::getInput('group');\n\t\tlist($drawId, $groupname) = explode(';', $group);\n\n\t\t// Delete the draws\n\t\t$oGroup = new objgroup();\n\t\t$oGroup->deleteGroup($drawId, $groupname);\n\t\t$page = new utPage('none');\n\t\t$page->close(true,...
[ "0.8234863", "0.8133489", "0.79198825", "0.78979886", "0.7802342", "0.77090394", "0.75986433", "0.75773007", "0.75701904", "0.75647914", "0.7552005", "0.7527992", "0.75159067", "0.74945545", "0.7483295", "0.7462067", "0.7457659", "0.74484926", "0.7420896", "0.7345699", "0.733...
0.0
-1
Match user name aginst password. If match success returns user row otherwise null
public function match($userName, $userPassword) { $translate = Zend_Registry::get('translate'); $paithal = Paithal::getInstance(); $select = $this->select() ->where('user_name = ?', $userName) ->where('user_password = ?', sha1($userPassword)); $rows = $thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkUser($userName, $password){\n\t\n\tglobal $usersTable;\n\tglobal $db;\n\t$selectQuery=\"select password from $usersTable where userName = '\" . $userName . \"'\";\n\t$resultSet = mysqli_query($db, $selectQuery) or die(mysqli_error($db));\n\t$row = mysqli_fetch_assoc($resultSet);\n\t\n\tif($password =...
[ "0.7169176", "0.7157628", "0.7125779", "0.7084771", "0.7018154", "0.7011808", "0.70005065", "0.69344866", "0.68455285", "0.68288004", "0.68284893", "0.68186194", "0.6808955", "0.6807563", "0.6776958", "0.6771975", "0.6762128", "0.6743229", "0.674097", "0.67251104", "0.671114"...
0.73079586
0
Adds the recommendable flag to the product data.
protected function _azGetArticleTagsFromArticleData( $oArticle, $oData ) { $aTags = parent::_azGetArticleTagsFromArticleData( $oArticle, $oData ); if ( is_array( $aTags ) ) { // add recommendable flag: $aTags[ 'e:recommendable' ] = $oArticle->azEpoqIsRecommenda...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function recommend()\n {\n $this->recommendations()->save(\n new Recommendation(['user_id' => auth()->id()])\n );\n }", "function addRecommendation($recommendation) {\n return $this->databaseInsertRecord(\n $this->tableRecommendations, NULL, $recommendation);\n }", ...
[ "0.6192576", "0.59395796", "0.582415", "0.57079047", "0.56752014", "0.5610263", "0.5610263", "0.54889876", "0.54458743", "0.54119694", "0.54119694", "0.5290075", "0.5282069", "0.52619517", "0.5241525", "0.518038", "0.5159601", "0.51185006", "0.5094064", "0.5087571", "0.507261...
0.0
-1
get the bookings of a user
public function getUserBookings(User $user) { if ($user) { $data['success'] = true; $data['bookings'] = Booking::join('rooms', 'rooms.id', '=', 'bookings.room_id') ->join('hotels', 'hotels.id', '=', 'rooms.hotel_id') ->select('bookings.id', 'bookings....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getAllBookings(User $driver) {\n\t\t$bookings = $driver->getDriverBookings ();\n\t\treturn $bookings;\n\t}", "public function getBorrowings();", "public function GetBookings()\n\t{\t$bookings = array();\n\t\t$sql = 'SELECT * FROM coursebookings WHERE ticket=' . $this->id;\n\t\tif ($result = $...
[ "0.7522101", "0.7064489", "0.7032601", "0.7007592", "0.69726455", "0.69559157", "0.6890436", "0.68362606", "0.673918", "0.6614181", "0.6583911", "0.647382", "0.64432585", "0.64397997", "0.6422146", "0.6403946", "0.63601345", "0.63598406", "0.6355165", "0.6343776", "0.63173264...
0.7382018
1
Validate data and return data with errors if exist
public function validateData(array $rules) { $validator = Validator::make(request()->all(), $rules); if ($validator->fails()) { $data['errors'] = $validator->errors(); return $data; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function validateData();", "abstract public function validateData($data);", "function validate($data)\n\t{\n\t\t\n\t\t$res[] = [\n\t\t\t'validity' => false,\n\t\t\t'type' => 'all',\n\t\t\t'message' => ''\n\t\t];\n\t\t//required check\n\t\tif(isset($data['required'])){\n\t\t\t$dataForCheck ...
[ "0.76456285", "0.7202437", "0.70025146", "0.6987133", "0.69298863", "0.6882391", "0.6876148", "0.6845418", "0.67838305", "0.6773348", "0.6769022", "0.67652977", "0.6718179", "0.67110115", "0.6657376", "0.6634341", "0.66124177", "0.6571576", "0.6562631", "0.6525689", "0.651223...
0.0
-1
Ensure that a session cookie is sent if challenegeresponse test
function show_entries_page() { // is enabled global $CHALLENGE_ENABLED; if($CHALLENGE_ENABLED === TRUE) { @session_start(); } include_from_template('entries.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "protected function setSessionCookie() {}", "public function testIfUserCookieHasBeenSet()\n {\n // INIT\n //-----\n\n self::$kernel = self::bootKernel();\n\n $response = new Response();\n\n ...
[ "0.6872598", "0.6872598", "0.6648238", "0.6506464", "0.6445036", "0.63602275", "0.62825954", "0.6223044", "0.6217672", "0.61893326", "0.6180506", "0.61745924", "0.6173821", "0.61576325", "0.6156062", "0.61508685", "0.6142881", "0.613902", "0.61042637", "0.60628045", "0.605686...
0.0
-1
Lists all HariTidakEfektif models.
public function actionIndex() { $searchModel = new HariTidakEfektifSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return TempatTidur::all();\n }", "public function viewallunitmodelsAction() {\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$this->view->records = $model->fetchAll( 'name','ASC' );\n \n\t\tif( $this->view->records ) {\n $attached = $mode...
[ "0.6073288", "0.5840383", "0.5836851", "0.583183", "0.5796418", "0.5775068", "0.57690316", "0.5714881", "0.57036513", "0.5700987", "0.5688141", "0.5666066", "0.5665858", "0.56567556", "0.56416523", "0.5636915", "0.5635459", "0.56197435", "0.5604112", "0.5584682", "0.558322", ...
0.67643505
0
Displays a single HariTidakEfektif model.
public function actionView($id) { $model = $this->findModel($id); return $this->render('view', [ 'model' => $this->findModel($id), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex()\r\n {\r\n $searchModel = new HariTidakEfektifSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvide...
[ "0.6637011", "0.6349116", "0.63444686", "0.62707895", "0.62528276", "0.6251735", "0.6251457", "0.6204706", "0.61933017", "0.6189639", "0.61523026", "0.6148129", "0.61437666", "0.61155707", "0.61099935", "0.61068106", "0.6106434", "0.6083485", "0.6076037", "0.6074094", "0.6043...
0.0
-1
Creates a new HariTidakEfektif model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $model = new HariTidakEfektif(); if ($model->loadAll(Yii::$app->request->post())) { if( $this->checkDate($model->tanggal_awal, $model->tanggal_akhir) ){ if( $this->validDate($model) ){ $model->save(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new TaKegiatan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'Tahun' => $model->Tahun, 'Kd_Urusan' => $model->Kd_Urusan, 'Kd_Bidang' => $model->Kd_Bidang, 'Kd_Prog' => $model->Kd_P...
[ "0.7768468", "0.7561494", "0.74219865", "0.7332276", "0.72359896", "0.7234877", "0.72175694", "0.7180778", "0.7092869", "0.7074271", "0.7072099", "0.70652896", "0.70625997", "0.7061233", "0.70147824", "0.70072204", "0.69908154", "0.69884586", "0.6911177", "0.6906506", "0.6880...
0.8092022
0
Updates an existing HariTidakEfektif model. If update is successful, the browser will be redirected to the 'view' page.
public function actionUpdate($id) { $model = $this->findModel($id); if ($model->loadAll(Yii::$app->request->post())) { if( $this->validDate($model) ){ $model->save(); Yii::$app->session->setFlash('success', "Hari tidak efektif berhasi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate()\n {\n\t\t\t$id=7;\n $model = $this->findModel($id);\n $model->slug = \"asuransi\";\n $model->waktu_update = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n ...
[ "0.7548448", "0.72302777", "0.7230049", "0.7200174", "0.71722513", "0.70733505", "0.7031027", "0.69959694", "0.69848317", "0.69564074", "0.69536424", "0.69501776", "0.69431573", "0.69332767", "0.6908523", "0.6897991", "0.6895972", "0.6889265", "0.6875075", "0.6868031", "0.685...
0.7193484
4
Deletes an existing HariTidakEfektif model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { $trans = Yii::$app->db->beginTransaction(); try { $this->findModel($id)->delete(); $trans->commit(); Yii::$app->session->setFlash('success', "Hari tidak efektif berhasil dihapus."); } catch (\Exception $e) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteAction()\r\n\t{\r\n\t\t$data['message'] = \"\";\r\n\t\t$MaNguoiDung = $_GET['MaNguoiDung']; \r\n\r\n\t\t//echo $MaNguoiDung;\r\n\t\tif (isset($MaNguoiDung)) {\r\n\r\n\t\t\t$this->model->load(\"Nguoidung\");\r\n\t\t\t$nguoidung = new Nguoidung_Model();\r\n\t\t\t$nguoidung->delete($MaNguoiDung);\r\n\t...
[ "0.73528236", "0.73261446", "0.7153847", "0.7110991", "0.71102315", "0.7101923", "0.70264125", "0.6949522", "0.6930283", "0.6929831", "0.6907093", "0.69039434", "0.6889994", "0.68698287", "0.6869678", "0.6857336", "0.68562174", "0.6850053", "0.68488777", "0.681839", "0.681685...
0.6554327
86
Finds the HariTidakEfektif model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = HariTidakEfektif::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :i...
[ "0.7034504", "0.69822717", "0.6880581", "0.6879831", "0.67916036", "0.67512184", "0.67037404", "0.67021054", "0.6678447", "0.6670472", "0.66675436", "0.6663013", "0.6654499", "0.66273", "0.6624129", "0.6618539", "0.66180223", "0.66145146", "0.66010976", "0.6598995", "0.659521...
0.6981371
2
check if tanggal_awal less than tanggal akhir
protected function validDate($model){ if($model->tanggal_akhir == null){ return true; } if(strtotime($model->tanggal_awal) < strtotime($model->tanggal_akhir) ){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isOvertime()\n {\n if($this->jadwalKembali > $this->tanggalKembali){\n return false;\n }else{\n return true;\n }\n }", "public function getTresholdPembayaran ($tahun_sekarang,$semester_sekarang,$data=false) {\n\t\t$total_biaya=($this->isMhsBaru($tahun_sekarang,$semester_sekarang))?$...
[ "0.70686704", "0.60095924", "0.5759015", "0.5753707", "0.5752393", "0.5721219", "0.56688166", "0.56582874", "0.5622258", "0.56030333", "0.5562244", "0.55151814", "0.5492553", "0.54838574", "0.5475036", "0.5432387", "0.54313105", "0.542212", "0.54179746", "0.5410573", "0.54001...
0.54028785
20
Check if date exist in database or not
protected function checkDate($start_date, $end_date = null){ $checkStartDate = HariTidakEfektif::find() ->where([ 'Or', "date(tanggal_awal) = '$start_date' And tanggal_akhir IS null", [ 'And', "date(tangga...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasDate() : bool;", "public function hasDate() {\n return $this->_has(3);\n }", "function IfExists($holidaycode) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM `specialdates` WHERE RateCode='$holidaycode'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->exec...
[ "0.7254087", "0.69935584", "0.69268507", "0.68994254", "0.685307", "0.685307", "0.6824353", "0.6664956", "0.6601435", "0.6601435", "0.6570155", "0.655138", "0.6529371", "0.6408139", "0.63978213", "0.63493776", "0.63126564", "0.6299787", "0.6295223", "0.6270217", "0.6264994", ...
0.571835
96
1 : first item
function getUriHistory(string $uri, int $count):string { // 2 : two first items // -1 : all except last item // -2 : all except two last items $items = explode('/', $uri); if ($count < 0) $count = count($items) + $count; $count = min($count, count($items)); return implode('/', array_slice($...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function firstItem();", "function getFirstItem() { return $this->m_firstItem; }", "public function getFirstItem();", "public function getFirstItem() {}", "public function getFirstItem() {}", "public function hasFirstItem() {}", "public function FirstItem()\n {\n return ($start = $this-...
[ "0.8342806", "0.79867476", "0.7901766", "0.78733444", "0.7873051", "0.759306", "0.72803336", "0.7273573", "0.7205533", "0.7191162", "0.7114984", "0.7054638", "0.7052236", "0.69821215", "0.6979443", "0.6979443", "0.6979443", "0.6979443", "0.6979443", "0.6979443", "0.6979443", ...
0.0
-1
Field is Empty check
public function fieldIsEmpty(?string $field) { return empty($field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAllFieldsAreEmpty() {}", "function checkEmptyField($field) {\n\t return isset($field) && $field !== \"\" && $field !== '';\n }", "function is_field_empty(array $fields) {\n foreach ($fields as $key => $value) {\n $fields[$key] = isset($value) ? trim($value) : '';\n }\n ...
[ "0.8290879", "0.8093673", "0.79162854", "0.7916175", "0.7638938", "0.76159126", "0.757369", "0.7543083", "0.7514282", "0.75054026", "0.7420845", "0.7345277", "0.7342716", "0.7310584", "0.72944057", "0.72915643", "0.7282386", "0.72814345", "0.72140265", "0.72110516", "0.719097...
0.722624
18
Realiza una consulta que espera obtener como resultado solo un registro
public function getOneResult($sql){ $connection = $this->connect(); $logger = Logger::getRootLogger(); try{ if (!$query = $connection->query($sql)){ $mensaje = "No se pudo consultar. SQL: " . $sql; $logger->error($mensaje); throw new Exception($mensaje); } if ($query->num_rows === 0) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function consulta($Conexion_ID, $Where = \"\"){\r\n\r\n $SQL = \"SELECT me.id, me.snombre,\r\n\t\t me.sapellido, me.stelefono,\r\n\t\t me.stelefono_1, me.id_especialidad,\r\n\t\t me.bactivo, esp.id as esp_id, esp.sdescripcion as esp_descrip FROM doctor me, especialidad esp WHERE me.id_especialidad = esp.id \...
[ "0.6859501", "0.67955106", "0.67582035", "0.6621916", "0.66036844", "0.65978634", "0.65577996", "0.65557784", "0.6553234", "0.65264165", "0.652343", "0.65099674", "0.65064216", "0.64927614", "0.64910465", "0.64874876", "0.6420683", "0.639818", "0.63807964", "0.6375432", "0.63...
0.0
-1
Realiza una consulta que espera recibir multiples registros
public function getMultipleResults($sql){ $connection = $this->connect(); $logger = Logger::getRootLogger(); try{ if (!$query = $connection->query($sql)){ $mensaje = "No se pudo consultar. SQL: " . $sql; $logger->error($mensaje); throw new Exception($mensaje); } if ($query->num_rows === 0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obtenerRegistros($datos = []) {\n\t\t$this->openConnection();\n\t\t$sentencia = $this->conn->prepare($this->consulta);\n\t\tif(!empty($datos)){\n\t\t\tforeach ($datos as $key => $value) {\n\t\t\t\t$sentencia->bind_param($key, $value);\n\t\t\t}\n\t\t}\n\t\t$sentencia->execute();\n\t\t$reg = $sentencia->get...
[ "0.6803096", "0.65269756", "0.63736147", "0.63475484", "0.63384867", "0.6332289", "0.6313488", "0.6292143", "0.6145638", "0.60941726", "0.60836047", "0.6021482", "0.59683466", "0.5960811", "0.59554625", "0.5945844", "0.59204644", "0.5917565", "0.5894087", "0.5890949", "0.5878...
0.0
-1
Ejecuta una sentencia sql. Ej: insert, update en caso de insert la variable $isInsert debe estar en true para devolver el id insertado no olvidar agregar select last_insert_id() en la sentencia de insert
public function execute($sql, $isInsert = false){ $connection = $this->connect(); try{ $connection->query($sql); if($isInsert){ $id = $connection->insert_id; return $id; }else{ return true; } }catch(Exception $e){ $mensaje = "Ha ocurrido un error: " . $e; $logger = Logger::g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeInsert($script) {\n\t\t$queryRes = mysqli_query($this->connectionString, $script);\n\t}", "private function Execute(){\n $this->Connect();\n\n try{\n $this->Create->execute($this->Dados);\n $this->Result = $this->Conn->lastInsertId();\n $this->Status...
[ "0.6910182", "0.6883474", "0.66612834", "0.66031027", "0.6538314", "0.6476569", "0.64683044", "0.6408359", "0.6398912", "0.63869375", "0.63300824", "0.6329485", "0.6328393", "0.6325459", "0.6320903", "0.6306894", "0.6299439", "0.6296878", "0.6296878", "0.6279219", "0.6273144"...
0.74303305
0
Validate unique name of user preference
public function validateUniqueName($value, array $context) { $session = new Session(); if(($user_id = $session->read('User.user_id'))) { $names = $this->find('list')->where(['user_id' => $user_id])->toArray(); if(!empty($names) && !in_array($value, $names)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Add_validate_user_name($value)\n\t{\n\t\tif(0 != $this->GetOne('id',array('user_name'=>'=?'),$value) )\n\t\t{\n\t\t\t$this->error_msg = DOLang::Get('Do not allow duplicated users!');\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private function hasValidUserName($input) {\n\t\treturn str...
[ "0.65845007", "0.63389695", "0.6288217", "0.62470686", "0.61406606", "0.60693556", "0.60564405", "0.6017954", "0.6015935", "0.59624815", "0.5944039", "0.59053344", "0.58939075", "0.58933294", "0.5880077", "0.5874807", "0.5872603", "0.58667785", "0.5864799", "0.58420634", "0.5...
0.5468058
70
Returns a rules checker object that will be used for validating application integrity.
public function buildRules(RulesChecker $rules) { $rules->add($rules->existsIn(['user_id'], 'Users')); return $rules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildRules(RulesChecker $rules): RulesChecker\n {\n return $rules;\n }", "private static function rules() : mixed\n {\n return AppContainer::get(Constants::validatorRules);\n }", "protected function getValidatorInstance()\n {\n return app(ValidationFactory::c...
[ "0.6401195", "0.63879603", "0.6270749", "0.62357", "0.6193363", "0.60837686", "0.6027178", "0.6020149", "0.60078835", "0.5993612", "0.59666306", "0.5961007", "0.595182", "0.595182", "0.58882016", "0.5873845", "0.5867226", "0.5863504", "0.5859753", "0.5851237", "0.5811037", ...
0.0
-1
Get a preference value from the prefs table.
public function getPreference($name, $userId = 1, $default = null) { if(($record = $this->find()->where(['user_id' => $userId, 'name' => $name])->first()) != false) return $record['value']; return $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($n)\n\t{\n\t\tif (isset($this->prefs[$n]['value'])) {\n\t\t\treturn $this->prefs[$n]['value'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public function get_setting() {\n // $this->db->where('option_name', $opname);\n \n $query = $this->db->get('t_pref');\n return $que...
[ "0.70849293", "0.685122", "0.6731178", "0.64129186", "0.6259684", "0.6232119", "0.59346163", "0.58389115", "0.57377374", "0.57233006", "0.5702368", "0.5677298", "0.55746394", "0.55652326", "0.5538508", "0.5469393", "0.5438157", "0.5438157", "0.5437015", "0.5410989", "0.538606...
0.5415239
19
Show the form for editing the specified resource.
public function edit() { $user = User::where('id', Auth::user()->id)->get(); return view('admin/edituser', compact('user', 'id')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request) { $user = User::where('id', Auth::user()->id)->first(); $user->name = $request->name; $user->username = $request->username; $user->password = bcrypt($request->password); $user->save(); return redirect()->route('home', $request...
{ "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
Create new HTTP response.
public function __construct($status = 200, HeadersInterface $headers = null, StreamInterface $body = null, Url $url) { parent::__construct($status, $headers, $body); $this->url = $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createHttpResponse()\n {\n return new Response();\n }", "public function createResponse()\n {\n return new Response;\n }", "function response() {\n return new Response;\n }", "public function createResponse(): ResponseInterface\n\t\t{\n\t\t\tretu...
[ "0.78573334", "0.76648456", "0.7388646", "0.72108704", "0.7188131", "0.71612024", "0.71367866", "0.70635074", "0.6989094", "0.6948357", "0.69059056", "0.6878798", "0.6844712", "0.6812078", "0.6791313", "0.6745812", "0.67058444", "0.66509724", "0.6575241", "0.6551806", "0.6467...
0.0
-1
Stream the contents of a file directly through to the response.
public function renderFile($file_path, $file_name = null): self { set_time_limit(600); if ($file_name == null) { $file_name = basename($file_path); } $fh = fopen($file_path, 'rb'); $stream = new \Slim\Http\Stream($fh); return $this ->withHea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function stream($file, $name = null) {\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename='.(is_null($name) ? basename($file) : $name));\n header('Content-Transfer-Encoding: bi...
[ "0.64296466", "0.63475984", "0.6163874", "0.6126", "0.6109201", "0.601711", "0.5998835", "0.59467965", "0.591281", "0.5902226", "0.5889422", "0.58744025", "0.58124185", "0.58040035", "0.57953817", "0.57945454", "0.577302", "0.57559896", "0.57535493", "0.574866", "0.57329786",...
0.5938269
8
Write a string of file data to the response as if it is a file for download.
public function renderStringAsFile($file_data, $content_type, $file_name = null): self { $response = $this ->withHeader('Pragma', 'public') ->withHeader('Expires', '0') ->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0') ->withHeader('C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function output_file() {\n\t\t$file = wp_json_encode( $this->get_info(), JSON_PRETTY_PRINT );\n\t\theader( 'Content-Description: File Transfer' );\n\t\theader( 'Content-Type: application/octet-stream' );\n\t\theader( 'Content-Disposition: attachment; filename=\"ep-troubleshoot.json\"' );\n\t\theader( 'Expi...
[ "0.6335223", "0.61798406", "0.61407566", "0.611191", "0.61107653", "0.5948582", "0.59473366", "0.58791435", "0.5851102", "0.58078676", "0.58027303", "0.5768051", "0.5752151", "0.56838065", "0.56687355", "0.5660713", "0.56225115", "0.5613966", "0.5609849", "0.5607178", "0.5598...
0.6492453
0
Redirect to the current page (i.e. after a form is submitted).
public function redirectHere($code = 302, $suffix = ''): self { return $this->withRedirect($this->url->current().$suffix, $code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function redirectToCurrentPage() {}", "public function redirect (\n\t)\t\t\t\t\t// RETURNS <void> redirects to the appropriate page.\n\t\n\t// $contentForm->redirect($redirectTo);\n\t{\n\t\tif($this->redirectOnError)\n\t\t{\n\t\t\theader(\"Location: \" . $this->redirectOnError); exit;\n\t\t}\n\t\t\n\t\...
[ "0.8465859", "0.743196", "0.7120297", "0.6953136", "0.6928833", "0.6928833", "0.6928833", "0.6843767", "0.6838933", "0.6834654", "0.6790161", "0.6788573", "0.6779879", "0.6771186", "0.67701125", "0.66866285", "0.6686117", "0.66629475", "0.6631228", "0.6630695", "0.66242844", ...
0.0
-1
Redirect with parameters to named route.
public function redirectToRoute($name, $route_params = [], $code = 302, $suffix = ''): self { return $this->withRedirect($this->url->named($name, $route_params).$suffix, $code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redirectTo($route_name, $params = null, $options = null) {\n redirect_to(assemble_url($route_name, $params, $options));\n }", "abstract protected function redirectToRoute(string $route, array $parameters = [], int $status = 302): RedirectResponse;", "function setRedirectRoute($route, array $pa...
[ "0.7452685", "0.6979615", "0.69354284", "0.68657374", "0.6704012", "0.66754836", "0.6347282", "0.6223716", "0.6175245", "0.6087274", "0.6079331", "0.6067212", "0.60670954", "0.5952694", "0.59419066", "0.5913808", "0.5899269", "0.5891833", "0.58908683", "0.5886238", "0.5857172...
0.6526568
6