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
Transform the resource into an array.
public function toArray($request) { if (is_null($this->resource)) { return []; } return [ 'last_name' => $this->last_name, 'first_name' => $this->first_name, 'full_name' => $this->full_name, 'dob' => $this->dob, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->r...
[ "0.7750928", "0.7750928", "0.7715773", "0.75906307", "0.7310379", "0.7138024", "0.7134791", "0.7096877", "0.7096877", "0.70968604", "0.70968604", "0.70968604", "0.70968604", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.7...
0.0
-1
$this>setTitle('Nifty Nurikabe New User Pending');
public function __construct() { //$this->setH1(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function title()\n {\n return __(\"I'd like to control\", 'idlikethis');\n }", "function title()\n {\n return \"系统通知\";\n }", "protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == 'Y')\n\t\t\t$APPLICATION->SetTitle(Localizati...
[ "0.7131351", "0.7114875", "0.702925", "0.7012955", "0.7012955", "0.7012955", "0.7012955", "0.7012955", "0.7012955", "0.7012955", "0.70076096", "0.699241", "0.6981601", "0.6968719", "0.69443905", "0.69218385", "0.6916229", "0.688255", "0.68606895", "0.68606895", "0.68606895", ...
0.0
-1
check the auto relations have been flagged correctly
function testAddEntities() { $this->assertEquals(array('User', 'Comment', 'MultiDep'), $this->config->_relations['auto']); // check the reverse relations have been correctly defined $this->assertEquals(array('my_blog_tag_set', 'comments'), array_keys($this->config->_relations['Blog'])); $this->assertEquals(a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _checkForeignKeysReverseCascade() {}", "protected function _checkForeignKeysReverseRestrict() {}", "protected function _checkForeignKeysRestrict() {}", "public function isRelated();", "public function hasRelations()\n {\n return 0 !== count($this->relations);\n }", "public...
[ "0.70209676", "0.6753794", "0.6738057", "0.6451704", "0.6427658", "0.63007003", "0.62343335", "0.62318105", "0.6175667", "0.6173566", "0.61181897", "0.60497975", "0.6047217", "0.594513", "0.58936644", "0.58776647", "0.586996", "0.58524245", "0.58279735", "0.5819346", "0.58145...
0.0
-1
Finds auth by client.
public static function findByClient(ClientInterface $client) { return static::find()->where([ 'provider' => $client->getId(), 'provider_id' => $client->getUserAttributes()['id'] ])->one(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findClient($client);", "protected function authenticate()\n\t{\n\t\treturn $this->client;\n\t}", "public function getAuth($params)\n\t{\n\t\treturn $this->auth->where($params)->first();\n\t}", "public function getAuth();", "public function getAuth();", "public function getPasswordGrantCli...
[ "0.7131435", "0.61929774", "0.5895949", "0.56996435", "0.56996435", "0.5669697", "0.55782264", "0.55752885", "0.5527371", "0.549385", "0.54802966", "0.5459082", "0.54225147", "0.5407715", "0.53740835", "0.534275", "0.53178847", "0.5304682", "0.5266744", "0.5264994", "0.524849...
0.5651329
6
Creates auth instance by from client.
public static function getInstance(ClientInterface $client) { return Yii::createObject([ 'class' => static::className(), 'provider' => $client->getId(), 'provider_id' => $client->getUserAttributes()['id'], 'provider_attributes' => json_encode($client->getUser...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createAuthenticatedClient()\n {\n $client = static::createClient();\n\n $client->request(\n 'POST',\n '/api/login_check',\n array(\n '_username' => 'myphone',\n '_password' => 'phono'\n )\n );\n\n ...
[ "0.75529194", "0.6830262", "0.65864563", "0.6527538", "0.65169835", "0.64803344", "0.6436779", "0.63388985", "0.6304224", "0.61575204", "0.6144782", "0.6131146", "0.61273265", "0.61251223", "0.61235404", "0.61115223", "0.6111498", "0.6109218", "0.602763", "0.6019381", "0.6013...
0.0
-1
Display a listing of the resource. GET /workorder
public function index() { $check_points = []; $containers = $this->containerRepository->getContainersToConfirm(); // dd($containers->toArray()); $cp = $this->containerConfirmationProcessRepository->getAllProcesses(); foreach ($cp as $key => $value) { $check_points[$value->movement] = $value; } // fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allWorkOrder()\n\t{\n\t\t// $data['workOrder']=$this->MainModel->selectAllworkOrder();\n\t\t// $data['worksOrders'] = $this->MainModel->selectAll('work_order', 'client_id');\n\t\t$data['worksOrders'] = $this->MainModel->selectAllworkOrder();\n\t\t$this->load->view('layout/header');\n\t\t$this->load...
[ "0.7397839", "0.726605", "0.6991487", "0.6847584", "0.68182284", "0.6748176", "0.6723573", "0.6717667", "0.6661713", "0.6656298", "0.66199696", "0.6605913", "0.6595814", "0.6585602", "0.65730524", "0.65666544", "0.65575314", "0.65437347", "0.653958", "0.653131", "0.65226233",...
0.0
-1
Show the form for creating a new resource. GET /workorder/create
public function create() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n $data = $this->dispatch(new WorkFormFieldModel());\n\n return view('admin.works.create', $data);\n }", "public function create()\n {\n $employees = \\sanoha\\Models\\SubCostCenter::getRelatedEmployees();\n $vehicle_responsibles = \\sanoha\\Model...
[ "0.73005867", "0.72937137", "0.72670794", "0.722147", "0.7161734", "0.71417385", "0.712423", "0.7105943", "0.7081792", "0.70722806", "0.7055676", "0.70545083", "0.70278555", "0.70276284", "0.7025553", "0.7025553", "0.7025553", "0.7019508", "0.7012943", "0.6988457", "0.6987979...
0.0
-1
Store a newly created resource in storage. POST /workorder
public function store() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n $workOrder = new WorkOrder();\n\n\n $workOrder->proposition()->associate($proposition);\n\n $workOrder->signatures()->associate();\n\n if (count($request->input('users'))) {\n\t\t\t$assignee = Employee::find( $request->input( 'users' )[0]...
[ "0.69916606", "0.6984014", "0.6909522", "0.67369276", "0.66733336", "0.6657128", "0.6637231", "0.65577066", "0.6537422", "0.65352404", "0.64375967", "0.6437331", "0.64324284", "0.6409957", "0.63873655", "0.6352387", "0.6341406", "0.6335951", "0.6334294", "0.6321848", "0.63204...
0.0
-1
Function called from TV, used to generate preview of this plugin
public function renderPreviewContent_preProcess( $row, $table, &$alreadyRendered, &$reference ) { if ($row['CType'] === 'list' && $row['list_type'] === 'nr_semantic_templates_pi1' ) { $content = $this->preview($row); $alreadyRendered = true; re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function live_preview() { }", "public function inPreview();", "public function preview()\n {\n }", "public function preview()\n {\n }", "public function preview()\n {\n }", "public function preview()\n {\n }", "function post_preview(...
[ "0.7867278", "0.7494367", "0.7360417", "0.7360417", "0.7360417", "0.7360417", "0.7084869", "0.708366", "0.7079885", "0.7000422", "0.6999513", "0.69635916", "0.68842375", "0.6872659", "0.6831049", "0.6821679", "0.6771087", "0.6702894", "0.6693238", "0.6693238", "0.66929674", ...
0.0
-1
Function called from page view, used to generate preview of this plugin
public function getExtensionSummary($params, &$pObj) { if ($params['row']['CType'] === 'list' && $params['row']['list_type'] === 'nr_semantic_templates_pi1' ) { $content = $this->preview($params['row']); return $content; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function live_preview() { }", "public function inPreview();", "function post_preview()\n {\n }", "public function preview()\n {\n }", "public function preview()\n {\n }", "public function preview()\n {\n }", "public function preview()\n ...
[ "0.73643684", "0.7277743", "0.72502196", "0.7174701", "0.7174701", "0.7174701", "0.7174701", "0.6970895", "0.6865307", "0.67984676", "0.67830503", "0.6757197", "0.6756459", "0.67402077", "0.67401415", "0.67401415", "0.67124593", "0.67043525", "0.66109186", "0.65995497", "0.65...
0.0
-1
Give administrators all the capabilities for this post type
public function add_capabilties_to_roles() { $post_type_object = get_post_type_object($this->name); global $wp_roles; $roles = array('administrator'); foreach( (array)$post_type_object->cap as $capability ){ foreach( $roles as $role_name ){ $role = get_role($role_name); $role->ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_admin_caps(){\n\t\t\t\n\t\t\t$caps = $this->set_caps( $this->cpt_args );\n\t\t\t\n\t\t\t$admin = get_role( 'administrator' );\n\n\t\t\tforeach( $caps as $cap ){\n\t\t\t\tif( !$admin->has_cap( $cap ) )\n\t\t\t\t\t$admin->add_cap( $cap );\n\t\t\t}\n\t\t}", "function mb_add_capabilities( $postty...
[ "0.7672421", "0.72647595", "0.6837639", "0.6731604", "0.67000175", "0.66906303", "0.6625953", "0.6570867", "0.65483713", "0.6391268", "0.63890934", "0.6369674", "0.6362184", "0.6352915", "0.63459617", "0.63003916", "0.6296474", "0.61864287", "0.61827487", "0.61670893", "0.616...
0.7324605
1
Uploads a file to the server
public function uploadFile($file, $fileName, $fileExtension = 'file', $isImage = false, $path = null) { // If a file was given if(FileComponent::fileGiven($file)) { // Check if it is an image if($isImage){ $type = explode('/', $file['type']); if($type[0] != 'image') { return fal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload();", "function upload_file() {\n upload_file_to_temp();\n }", "public function upload()\n {\n App::import('Lib', 'Uploads.file_receiver/FileReceiver');\n App::import('Lib', 'Uploads.file_dispatcher/FileDispatcher');\n App::import('Lib', 'Uploads.file_bin...
[ "0.7849794", "0.7680516", "0.7653441", "0.7383236", "0.7301473", "0.72890365", "0.72572786", "0.7193977", "0.715187", "0.7141722", "0.71389174", "0.713381", "0.7101605", "0.7097335", "0.70769876", "0.70671976", "0.7066263", "0.6957567", "0.695216", "0.6948027", "0.6946414", ...
0.0
-1
Removes a file from the server
public function deleteFile($fileName, $fileExtension = 'file', $isImage = false, $path = null) { // Create a correct path $filePath = FileComponent::createFilePath($path, $fileName, $fileExtension, $isImage); // Instanciate the file on the ftp $file = new File($filePath); // Delete the ftp and return if it...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unlink($file);", "public function deleteFileFromServer($p_fileToRemove)\n {\n unlink($p_fileToRemove);\n }", "private function removeUploadedFile()\n {\n if(!isset($_REQUEST['file']))\n {\n exit; \n }\n \n list($file, $src, $size) = explode(':',...
[ "0.77178913", "0.7694743", "0.7617161", "0.7522785", "0.74587387", "0.7381393", "0.73021847", "0.72959185", "0.7174298", "0.7103522", "0.70660615", "0.70422864", "0.70172966", "0.6990559", "0.69685185", "0.69534713", "0.6918638", "0.69174147", "0.68938863", "0.68820894", "0.6...
0.0
-1
Copy a file on the server (with the possibility of renaming it and the file extension)
public function copyFile($sourceFileName, $sourceFileExtension = 'file', $sourceIsImage = false, $sourcePath = null, $destFileName, $destFileExtension = 'file', $destIsImage = false, $destPath = null) { // If the newpath was not given if($destPath == null) { $destPath = $sourcePath; } // Create a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function copy($file, $new_file);", "function rex_com_mediaccess_copyfile($file, $source, $target)\n{\n global $REX;\n\n if(!rex_is_writable($target))\n {\n echo rex_warning('Keine Schreibrechte für das Verzeichnis \"'.$target.'\" !');\n return false;\n }\n\n if(!is_file($source.$file))\n {\n ...
[ "0.74037117", "0.6942155", "0.69416493", "0.6775083", "0.67232686", "0.6680873", "0.65487236", "0.6500149", "0.64600813", "0.6448632", "0.6361273", "0.63214225", "0.62120974", "0.61414355", "0.61208284", "0.6107485", "0.60790867", "0.60675615", "0.60310763", "0.6030979", "0.6...
0.5767668
39
If the file i given (used in views)
public function fileGiven($file) { // Check if a file was given if(!empty($file['tmp_name'])) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkFile()\n {\n $absDir = DIRREQ.$this->dir;\n if (file_exists($absDir.$this->file.'.php')) {\n $this->page = $absDir.$this->file.'.php';\n } elseif (file_exists($absDir.'index.php')) {\n $this->page = $absDir.'index.php';\n } else {\n ...
[ "0.64322627", "0.6166821", "0.6081976", "0.6016428", "0.6016428", "0.5998254", "0.5956351", "0.5897475", "0.5897475", "0.58952355", "0.58952355", "0.58952355", "0.5829842", "0.5826333", "0.5813117", "0.5799172", "0.57834125", "0.5780054", "0.573799", "0.5716008", "0.56868106"...
0.0
-1
Does the file exist on the server
public function fileExists($fileName, $fileExtension = 'file', $isImage = false, $path = null) { // Create a correct path $filePath = FileComponent::createFilePath($path, $fileName, $fileExtension, $isImage); // Instanciate the file on the ftp $file = new File($filePath); return $file->exists(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_exist_file() {\r\n\t\treturn file_exists( $this->get_path( 'file' ) );\r\n\t}", "public function isFileExistsRemotely();", "public function exists(){\n\t\t$fichName = $this->getPath();\n\t\treturn file_exists($fichName);\n\t}", "public function file_exists($file);", "public function file...
[ "0.8181346", "0.80921793", "0.7646409", "0.7619988", "0.7613789", "0.7536128", "0.75294983", "0.747073", "0.74588114", "0.7451352", "0.7424405", "0.7397428", "0.7363075", "0.7341938", "0.73298955", "0.731411", "0.7299397", "0.7299153", "0.7275836", "0.72563875", "0.7246981", ...
0.0
-1
Uploads an image and
public function uploadAndResizeImage($file, $fileName, $fileExtension = 'png', $path = null, $width = PHP_INT_MAX, $height = PHP_INT_MAX) { if(FileComponent::uploadFile($file, $fileName, $fileExtension, true, $path)) { return FileComponent::resizeAndCopyImage($fileName, $fileExtension, $path, $width, $height);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload();", "public function uploadAction() {\n $imgId = $this->getInput('imgId');\n $this->assign('imgId', $imgId);\n $this->getView()\n ->display('common/upload.phtml');\n }", "public function uploadAction() {\r\n\t\t$imgId = $this->getInput('imgId');\r\n\t\...
[ "0.75785315", "0.74006283", "0.7390722", "0.7390722", "0.7371537", "0.7371537", "0.7371537", "0.7371537", "0.7371537", "0.7371537", "0.73018646", "0.723526", "0.7229732", "0.7214777", "0.7196648", "0.71960133", "0.7190799", "0.71811444", "0.7174571", "0.71737504", "0.71523446...
0.0
-1
Copies a file and resizes it according to its limit (keeps scale)
public function resizeAndCopyImage($sourceFileName, $sourceFileExtension, $sourcePath = null, $destWidth, $destHeight, $destFileName = null, $destFileExtension = null, $destPath = null) { // If the destination file name is not set if($destFileName == null) { $destFileName = $sourceFileName; } // If the f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function copyResized() {\n\t\t\n\t\t$output = array();\n\t\t\n\t\t$options = array_merge(\n\t\t\tarray(\n\t\t\t\t'url' => '',\n\t\t\t\t'filename' => '',\n\t\t\t\t'width' => false,\n\t\t\t\t'height' => false,\n\t\t\t\t'crop' => false\n\t\t\t),\n\t\t\t$_POST\n\t\t);\n\t\t\n\t\t$width = $options['width'];\n\t\...
[ "0.68824023", "0.61778486", "0.6146446", "0.59723806", "0.59676695", "0.59537494", "0.5943045", "0.5908543", "0.58463055", "0.58271897", "0.58161885", "0.576923", "0.57621163", "0.5741122", "0.5724242", "0.56999344", "0.56931484", "0.5684736", "0.56583494", "0.56408143", "0.5...
0.0
-1
String manupulation in order to create
public function createFilePath($path, $fileName, $fileExtension = 'file', $isImage = false) { // Replaces all slashes with the standard DirectorySeperator $path = str_replace ('/' , DS , $path); //Puts the file or image into its according folder if($isImage) { // Sets it to /img/path $path = 'img'.D...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeString() {\n\t\t// Returns a string with the properties value. Uppercase the first character of each word\n\t\treturn ucwords($this->id. ' - '. $this->category). '<br />';\n\t }", "public function generic_strings()\n {\n }", "function s($s)\n {\n return Stringy::create($s)...
[ "0.6469853", "0.6233743", "0.6193926", "0.61513466", "0.6141007", "0.60816896", "0.60071844", "0.5980243", "0.5958608", "0.59538716", "0.5917279", "0.5906371", "0.5854986", "0.58251756", "0.5818664", "0.5786887", "0.5786887", "0.57593054", "0.5758817", "0.57345605", "0.573256...
0.0
-1
Display a listing of the resource.
public function index() { $department = "sales"; if(session()->has("department")){ if(session()->get("department") === $department){ $clients = \App\Client::all()->sortBy("firstname"); return view("/sales/salesMain")->with("clients", $clients); ...
{ "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
return date_timestamp_get(date_create('now', new DateTimeZone('UTC')));
public static function getTimestamp(){ return time(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nowTS()\n{\n $tz = new DateTimeZone('UTC');\n $time = new DateTime('now', $tz);\n return $time->getTimestamp();\n}", "function now() {\n return new DateTime();\n}", "private function getTimestamp() {\n\t$dateTime = new DateTime('now', new DateTimeZone(self::TIME_ZONE));\n\treturn $dateTime...
[ "0.8122719", "0.75328225", "0.740187", "0.72698367", "0.7173096", "0.7161588", "0.7109294", "0.7096217", "0.7086792", "0.7078817", "0.70599884", "0.69656765", "0.6955381", "0.69528437", "0.69498146", "0.6946179", "0.69273806", "0.6860403", "0.68413305", "0.6826487", "0.682164...
0.6526529
46
Gets all constraints including itself.
public function getConstraints(): array { $constraints = array_merge($this->getConstraint1()->getConstraints(), $this->getConstraint2()->getConstraints()); $constraints[] = $this; return $constraints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConstraints()\n {\n return $this->constraints;\n }", "public function GetConstraints () {\n\t\treturn $this->constraints;\n\t}", "public function getConstraints();", "public function getConstraintNodes(): array\n {\n return $this->organize()->constraints;\n }", ...
[ "0.8197857", "0.8190749", "0.79392225", "0.7466148", "0.73210406", "0.7301535", "0.7183592", "0.69433767", "0.6916043", "0.68491215", "0.6635328", "0.65187764", "0.6437896", "0.6418869", "0.6418869", "0.63380057", "0.6300349", "0.6300349", "0.6291435", "0.6248547", "0.6242561...
0.7902355
3
1. data desa kecamatan dan kabupaten
public function cetaksuratusaha(Request $request,$id_noSurat) { $desa = Desa::where('id_desa',Auth()->user()->id_desa)->with('kabupaten', 'kecamatan')->get(); // 2. data penduduk // relasinya sesuaikan dengan data yang dibutuhkan di template surat $penduduk = Penduduk::where('nik','=',$request['nik'])->with(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tampilDataGalang(){\n\t\t\n\t}", "public function kosongkanDataBarang() {\n $this->daftar_barang = [];\n $this->editData();\n }", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Da...
[ "0.7511616", "0.7162233", "0.70988476", "0.7021149", "0.70042604", "0.68070596", "0.6793131", "0.6781284", "0.6734831", "0.67164695", "0.6686433", "0.6606275", "0.6598041", "0.6575212", "0.6574433", "0.6556315", "0.65475625", "0.6532293", "0.651962", "0.65142137", "0.6508112"...
0.0
-1
Start the Phantomriver process.
public static function startPhantomDriver() { static::$phantomProcess = static::buildPhantomProcess(); static::$phantomProcess->start(); // We wait with execution of the scripts untill we see that the output shows us it's running. while( ! str_contains(static::$phantomProcess->getO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prepare()\n {\n static::startPhantomDriver();\n }", "protected static function buildPhantomProcess()\n {\n return (new ProcessBuilder())\n ->setPrefix(realpath('/usr/local/bin/phantomjs')) // @todo modular OR fixed in package.\n ->setArguments(['--webd...
[ "0.6778823", "0.65860546", "0.5950615", "0.5881706", "0.58477384", "0.5790016", "0.57855815", "0.5714201", "0.56485796", "0.55878705", "0.55310845", "0.55302984", "0.5527996", "0.5467969", "0.54674757", "0.5418535", "0.5386168", "0.5372389", "0.5363129", "0.5360811", "0.53426...
0.8534065
0
Stop the Phantomdriver process.
public static function stopPhantomDriver() { if (static::$phantomProcess) { static::$phantomProcess->stop(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stop() {\n try {\n $pid = $this->getPidFile()->read();\n\n Logger::log(\"Killing THIS PID: \" . $pid, \\Zend_Log::WARN);\n posix_kill($pid, SIGTERM);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n $this->_exit();\n...
[ "0.71642095", "0.71452487", "0.71154046", "0.68665445", "0.66543627", "0.6652433", "0.65268534", "0.6502887", "0.6474318", "0.6438825", "0.6430483", "0.63929373", "0.6388136", "0.6388136", "0.6388136", "0.6388136", "0.6388136", "0.6368318", "0.6368318", "0.6368318", "0.636831...
0.7979849
0
Build the process to run the PhantomDriver.
protected static function buildPhantomProcess() { return (new ProcessBuilder()) ->setPrefix(realpath('/usr/local/bin/phantomjs')) // @todo modular OR fixed in package. ->setArguments(['--webdriver=8910']) ->getProcess(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function startPhantomDriver()\n {\n static::$phantomProcess = static::buildPhantomProcess();\n\n static::$phantomProcess->start();\n\n // We wait with execution of the scripts untill we see that the output shows us it's running.\n while( ! str_contains(static::$phantomP...
[ "0.7562422", "0.6619569", "0.6456397", "0.56571555", "0.55184805", "0.55184805", "0.55042684", "0.5494492", "0.54311246", "0.5330774", "0.5321469", "0.52712125", "0.52488786", "0.52486235", "0.5231344", "0.52223074", "0.5145848", "0.51160634", "0.5112682", "0.50869155", "0.50...
0.83233285
0
Set the path to the custom Phantomdriver.
public static function usePhantomdriver($path) { static::$phantomDriver = $path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPath($path){ }", "public function setPath( $path );", "public function setPath($path);", "public function setPath($path);", "public function setPath($path);", "public function setPath($path);", "public function set_path() {\n\t\t\t\n\t\t\t// pick up the path types\n\t\t\t$path_types ...
[ "0.6489183", "0.62888527", "0.62695575", "0.62695575", "0.62695575", "0.62695575", "0.61173314", "0.6025576", "0.600484", "0.5994406", "0.5989405", "0.593953", "0.593605", "0.5931841", "0.5899686", "0.58988804", "0.5875352", "0.5872579", "0.5846677", "0.5842082", "0.5842082",...
0.75040364
0
Get Generated Password Hash
public static function getGeneratedPasswordHash($password) { if (self::checkIsAvailableCryptBlowFish()) { $salt = '$2y$11$' . substr(md5(uniqid(mt_rand(), true)), 0, 22); return crypt($password, $salt); } return md5($password); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetPasswordHash ();", "public function generateHash (string $password): string;", "public function generatePassword() {\n $generator = new UriSafeTokenGenerator();\n $token = $generator->generateToken();\n return substr($token, 0, 6);\n }", "public function GetPassword...
[ "0.82160205", "0.8116631", "0.7750029", "0.7605754", "0.7582493", "0.7566017", "0.7558577", "0.7533961", "0.75299895", "0.7519618", "0.7519618", "0.7484108", "0.7433369", "0.7424463", "0.74075025", "0.7398727", "0.73732054", "0.7361707", "0.73519593", "0.7346596", "0.7297986"...
0.7290625
21
Check is Available Crypt BlowFish
private static function checkIsAvailableCryptBlowFish() { if (defined("CRYPT_BLOWFISH") && CRYPT_BLOWFISH) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAvailable() ;", "function isAvailable() ;", "function getIsAvailable() ;", "function isAvailable()\n {\n }", "public function hasCrypt(): bool;", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable...
[ "0.70229155", "0.70229155", "0.6947113", "0.6769098", "0.670585", "0.65602654", "0.65602654", "0.65602654", "0.6559476", "0.6559476", "0.6559476", "0.6559476", "0.6559476", "0.6559476", "0.6559476", "0.6559476", "0.6559476", "0.6559476", "0.6559476", "0.6559476", "0.6559476",...
0.7753496
0
Create path for file.
protected function createPath(Filesystem $filesystem, $type) { $customPath = $this->option('path'); $defaultPath = config("vue-generators.paths.{$type}s"); $path = $customPath !== null ? $customPath : $defaultPath; $this->buildPathFromArray($path, $filesystem); return $pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createPath($file)\n\t{\n\t\treturn str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)) . '/' . $file;\n\t}", "public function createPath(string $path): string;", "public function generatePath($filename);", "protected function createPathIfNeeded() {}", "protected function createFile()...
[ "0.76529855", "0.7582889", "0.747251", "0.72649205", "0.70982593", "0.6824416", "0.6807446", "0.6467262", "0.64568007", "0.64442104", "0.6443279", "0.6437948", "0.6403196", "0.63807714", "0.6374204", "0.63706845", "0.6336325", "0.6330711", "0.6312378", "0.6311771", "0.6290962...
0.0
-1
Get all the navigation entries.
public function get_all() { $result = DB::select()->from('navigations') ->where('visible', '=', true) ->as_object()->execute(); return $result->count() > 0 ? $result : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNavigation() {\n \n $search = $this->search();\n $menuObjects = $search->getRecords();\n $result = array();\n $fields = $this->definition->fields();\n $menuItemField = FieldService::instance()->getFieldByName($fields, \"menuItems\");\n \n /...
[ "0.71545124", "0.7096221", "0.6688682", "0.6678023", "0.658804", "0.6587251", "0.6379463", "0.63068765", "0.6301115", "0.6300881", "0.62428546", "0.6238746", "0.62112457", "0.6192969", "0.61117285", "0.61106336", "0.61007327", "0.60810274", "0.60411566", "0.60411566", "0.6041...
0.60856
17
Display a listing of the resource.
public function index(Category $category) { $activities = Activity::orderBy('name'); if ($category->exists) { $activities->where('category_id', $category->id); $activities = $activities->paginate(10); return view("activity.index",compact('activities','category')); } return view("activity.index"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $activity = $this->form->store(); return redirect()->route('activity.edit', $activity->id); }
{ "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
End Helper Functions Extensions
public function getAllSIPExtensions($request, $response){ $sql = "SELECT * FROM devices;"; $stmt = $this->c->db->query($sql); $sipExtensions = $stmt->fetchAll(); return $response->withJson(array( 'code' => 200, 'data' => $sipExtensions )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function helper()\n\t{\n\t\n\t}", "function end();", "public function oops () {\n }", "public function extension() {}", "public function ex4()\n {\n }", "public function liberar() {}", "public function end()\n {\n }", "abstract protected function doEnd();", "abstract protected...
[ "0.74331087", "0.6291637", "0.5981343", "0.5950904", "0.5781231", "0.57773024", "0.5767956", "0.5763362", "0.57344204", "0.57344204", "0.57287335", "0.57251984", "0.5669889", "0.5669889", "0.5669889", "0.5669889", "0.5621573", "0.5576951", "0.5574188", "0.5574188", "0.5574112...
0.0
-1
End Trunks Inbound Routes
public function getAllInboundRoutes($request, $response){ $sql = "SELECT * FROM incoming;"; $stmt = $this->c->db->query($sql); $inboundRoutes = $stmt->fetchAll(); return $response->withJson(array( 'code' => 200, 'data' => $inboundRoutes )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function routeShutdown()\n {\n //...\n }", "function afterroute() {\r\n\r\n }", "function afterroute() {\n\t}", "public function end_trace()\n {\n }", "public function end();", "public function end();", "public function end();", "public function end();", "public...
[ "0.6433185", "0.62253904", "0.6204796", "0.6199525", "0.58452404", "0.58452404", "0.58452404", "0.58452404", "0.57573575", "0.5745557", "0.5745557", "0.5745557", "0.567051", "0.5636503", "0.5601119", "0.55565846", "0.55379707", "0.5525098", "0.55250067", "0.5502011", "0.54823...
0.0
-1
End Inbound Routes Outbound Routes
public function getAllOutboundRoutes($request, $response){ $sql = "SELECT * FROM outbound_routes;"; $stmt = $this->c->db->query($sql); $outboundRoutes = $stmt->fetchAll(); return $response->withJson(array( 'code' => 200, 'data' => $outboundRoutes )); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function routeShutdown()\n {\n //...\n }", "function afterroute() {\r\n\r\n }", "function afterroute() {\n\t}", "public function endAction() {\r\n $this->session->remove('auth');\r\n $this->flash->success('Obrigado!');\r\n\r\n return $this->dispatcher->forward([\r\...
[ "0.667117", "0.5895855", "0.58803207", "0.5706382", "0.55896056", "0.55896056", "0.55896056", "0.5545489", "0.5545489", "0.5545489", "0.5545489", "0.5508369", "0.5446645", "0.5446645", "0.54210657", "0.5361723", "0.5348796", "0.5260291", "0.52494216", "0.5243567", "0.51777095...
0.5349525
16
End Outbound Routes Users
public function getAllUsers($request, $response){ $sql = "SELECT * FROM userman_users;"; $stmt = $this->c->db->query($sql); $outboundRoutes = $stmt->fetchAll(); return $response->withJson(array( 'code' => 200, 'data' => $outboundRoutes )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function routeShutdown()\n {\n //...\n }", "public function endAction() {\r\n $this->session->remove('auth');\r\n $this->flash->success('Obrigado!');\r\n\r\n return $this->dispatcher->forward([\r\n \"controller\" => \"peer\",\r\n \"ac...
[ "0.6456424", "0.62054145", "0.5745127", "0.56627774", "0.56020105", "0.556851", "0.55160546", "0.55078465", "0.5480272", "0.5473596", "0.5458576", "0.5435905", "0.5408202", "0.54058206", "0.5404921", "0.53587425", "0.53377813", "0.5302905", "0.526249", "0.5246392", "0.523454"...
0.51803875
26
Remove any empty or illegal delta field values.
public function prepare($node, $row) { EntityHelper::removeInvalidFieldDeltas('node', $node); EntityHelper::removeEmptyFieldValues('node', $node); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clean()\n\t{\n\t\tforeach ($this->dirtyFields AS $field)\n\t\t\t$this->cleanField($field);\n\t}", "private function changelog_unset_unneeded_values () {\n\t\t# remove ip address fields\n\t\tif($this->object_type == \"ip_addr\") {\n\t\t\tunset(\t$this->object_new['subnet'],\n\t\t\t\t\t$this->objec...
[ "0.6166138", "0.6115458", "0.5947727", "0.5883496", "0.5883496", "0.5870601", "0.58319074", "0.5800163", "0.579608", "0.5712523", "0.5632037", "0.5576006", "0.54915756", "0.5490753", "0.54426277", "0.543485", "0.5433762", "0.5393182", "0.53580326", "0.53360987", "0.5307319", ...
0.0
-1
Creates data provider instance with search query applied
public function search($params) { $query = Visitedpage::find(); // add conditions that should always apply here $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); $this->load($params); if (!$this->validate()) { // uncomment the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchQueryDataProvider() {}", "public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }", "public function getQueryDataProvider() {}", "public function s...
[ "0.7773856", "0.674291", "0.65721744", "0.6503215", "0.6472826", "0.6389071", "0.63745373", "0.6287255", "0.62671757", "0.62457365", "0.62425256", "0.62123144", "0.61969537", "0.6172912", "0.61250603", "0.6123412", "0.6116283", "0.61031115", "0.6101092", "0.608637", "0.608177...
0.0
-1
find Color title from cache
public function find($id, array $select) { $key = "find.{$id}"; $cacheKey = $this->getCacheKey($key); try { return cache()->remember($cacheKey, Carbon::now()->addDay(5), function () use ($select,$id) { return Brand::where('id',$id)->select('title')->first(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpvideocoach_get_introduction_title_color()\r\n{\r\n\tglobal $wpvideocoach_introduction_title_color;\r\n\tif(empty($wpvideocoach_introduction_title_color)){\r\n\t\t$wpvideocoach_introduction_title_color = '#000';\r\n\t}\r\n\treturn $wpvideocoach_introduction_title_color;\r\n}", "public static function G...
[ "0.5903454", "0.552552", "0.55092275", "0.5423243", "0.54008156", "0.5394931", "0.5355861", "0.53478", "0.5332207", "0.5296597", "0.5268878", "0.5253405", "0.5242223", "0.521694", "0.5215645", "0.52153957", "0.5165384", "0.5141089", "0.5133919", "0.5130552", "0.51202077", "...
0.0
-1
/ Plugin Name: Getzazzleurlcode Description: returns zazzleurlcode value on a given tshirt id design Usage: Getzazzleurlcode($id) Returns: returns string as url value Version: 1.0 Author: Radical Graphics Studios
function getzazzleurlcode($id){ $query=("SELECT * FROM lala_camisetas WHERE id = '$id'"); $result=mysql_query($query); $row = mysql_fetch_array($result); if ($row['zazzlecodeURL']=="") {$ret = 0;} else {$ret=$row['zazzlecodeURL'];} return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getColorCodeValue($id){\n\t\t$sql = \"select color from sy_color_codes where id=?\";\n\t\t$SyColorCode = $this->runRequest($sql, array($id));\n\t\tif ($SyColorCode->rowCount() == 1){\n\t\t\t$tmp = $SyColorCode->fetch();\n \t\treturn $tmp[0]; // get the first line of the result\n\t\t}\n \tels...
[ "0.6119016", "0.597141", "0.59382576", "0.5893684", "0.5873648", "0.5873648", "0.5873648", "0.5873648", "0.5873648", "0.5873648", "0.5867111", "0.5856575", "0.5856575", "0.5856575", "0.5808421", "0.5777327", "0.5776497", "0.5766788", "0.5754998", "0.5700131", "0.56680524", ...
0.72654206
0
Run the database seeds.
public function run() { DB::table('films')->insert([ "id" => 0, "title" => "Dummy", "original_title" => NULL, "description" => NULL, "year" => NULL, "country" => NULL, "genre" => NULL, "director" => NULL, "fsk" => NULL, "amazon_asin" => NULL, "amazon_link" => NULL, "am...
{ "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.8014072", "0.7980389", "0.7977261", "0.79545176", "0.7951285", "0.7949779", "0.79447794", "0.79427236", "0.7938544", "0.7937133", "0.7933888", "0.7892658", "0.78813094", "0.7879304", "0.78790134", "0.7875582", "0.78718805", "0.7870327", "0.7851507", "0.78506047", "0.784165...
0.0
-1
Transform php objetcs to array
public static function objectToArray( $item, $assoc=false ) { $itemArray = array(); $refClass = new ReflectionClass( $item ); foreach( $refClass->getProperties() as $property ) { if( $property->isPublic() ) { $itemArray[ $property->name ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function objectToArray()\n {\n return get_object_vars($this);\n }", "public function toArray() : array{\n return get_object_vars( $this );\n }", "public function __toArray(): array\n {\n return call_user_func('get_object_vars', $this);\n }", "public function toArray...
[ "0.7778522", "0.7725471", "0.77187485", "0.76688874", "0.7503447", "0.7501064", "0.74866664", "0.74866664", "0.7479916", "0.7479916", "0.7479916", "0.7479916", "0.7479916", "0.7479916", "0.7479916", "0.7479916", "0.7479916", "0.7446193", "0.74416137", "0.7435483", "0.74282897...
0.0
-1
Lists all Feedback entities.
public function indexAction(Request $request) { $em = $this->getDoctrine()->getManager(); $dql = "SELECT e FROM BackendBundle:Feedback e ORDER BY e.id ASC"; $query = $em->createQuery($dql); $paginator = $this->get('knp_paginator'); $pagination = $paginator->paginate( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return Feedback::all();\n }", "public function index()\n {\n $feedbacks = Feedback::all();\n\n return $feedbacks;\n }", "public function listFeedbacks(){\n\n $sql = \"SELECT * FROM feedbacks\";\n $pdostm = $this->dbcon->prepare($sql);...
[ "0.7424918", "0.71630764", "0.66680497", "0.6561958", "0.6439739", "0.6232369", "0.6230939", "0.62026626", "0.61613464", "0.6099846", "0.6043504", "0.6035255", "0.600478", "0.5985981", "0.59855396", "0.5974651", "0.59687036", "0.59666663", "0.5937349", "0.5909507", "0.5908955...
0.624824
5
Find Feedback entities that match with the criteria.
public function findAction(Request $request) { $find = $request->get('find-form-text'); if ($find) { $em = $this->getDoctrine()->getManager(); $dql = "SELECT e FROM BackendBundle:Feedback e WHERE " . "e.name LIKE '%" . $find . "%' OR " . "e.e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function matching(Criteria $criteria);", "public function getCriteria();", "public function matching(Criteria $criteria)\n {\n }", "public function findCriteria()\r\n\t{\n\t\t$result = $this -> connection -> setTable($this -> entity)\n\t\t\t\t\t\t\t\t\t -> fetch();\r\n\n\t\treturn $result;\r\n\...
[ "0.5955076", "0.56186163", "0.54816663", "0.5427158", "0.53147155", "0.516237", "0.5156202", "0.5156202", "0.51306903", "0.51208425", "0.50961345", "0.5042302", "0.50403255", "0.50230545", "0.50164235", "0.500084", "0.49665362", "0.4960879", "0.49438578", "0.4917621", "0.4907...
0.46881646
39
Displays a form to create a new Feedback entity.
public function newAction(Request $request) { $entity = new Feedback(); $form = $this->createCreateForm($entity); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($entity); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new FeedbackType();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \tYii::$app->getSession()->setFlash('success', $model->fkt_form_name.' '.$model->fkt_list_name.' 添加成功,结果将展示在列表。');\n return $this->redirect(['...
[ "0.7872735", "0.76712847", "0.76311684", "0.7574751", "0.7574751", "0.7198278", "0.7197795", "0.7138977", "0.7014565", "0.7013589", "0.6950421", "0.6923526", "0.6914248", "0.6914135", "0.6847771", "0.6841398", "0.6832128", "0.6793184", "0.6754185", "0.67483354", "0.6734091", ...
0.74663335
5
Creates a form to create a Feedback entity.
private function createCreateForm(Feedback $entity) { $form = $this->createForm('BackendBundle\Form\FeedbackType', $entity, array( 'action' => $this->generateUrl('feedback_new'), 'method' => 'POST', )); $form->add('submit', SubmitType::class, array('label' => 'Create...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new FeedbackType();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \tYii::$app->getSession()->setFlash('success', $model->fkt_form_name.' '.$model->fkt_list_name.' 添加成功,结果将展示在列表。');\n return $this->redirect(['...
[ "0.7385096", "0.73552346", "0.73165697", "0.7263582", "0.72379076", "0.72379076", "0.7102213", "0.7004612", "0.6746257", "0.6739091", "0.67345995", "0.67345995", "0.66548264", "0.6572396", "0.65428996", "0.6528526", "0.64545727", "0.64335173", "0.6432175", "0.6421919", "0.642...
0.78716683
0
Finds and displays a Feedback entity.
public function showAction(Feedback $entity) { $deleteForm = $this->createDeleteForm($entity); return $this->render('feedback/show.html.twig', array( 'entity' => $entity, 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Feedback $feedback)\n {\n //\n }", "public function show(Feedback $feedback)\n {\n //\n }", "public function show($id)\n {\n return Feedback::find($id);\n }", "public function show($id)\n {\n return Feedback::findOrFail($id);\n }", "p...
[ "0.69938433", "0.69938433", "0.6828863", "0.6747869", "0.64654696", "0.59982246", "0.59982246", "0.59915787", "0.59882104", "0.5939006", "0.59340733", "0.5927253", "0.5807045", "0.5782268", "0.57465285", "0.573216", "0.5713723", "0.5701925", "0.56952524", "0.56935614", "0.567...
0.7345613
0
Displays a form to edit an existing Feedback entity.
public function editAction(Request $request, Feedback $entity) { $deleteForm = $this->createDeleteForm($entity); $editForm = $this->createEditForm($entity); $editForm->handleRequest($request); if ($editForm->isSubmitted() && $editForm->isValid()) { $em = $this->getDoctri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Feedback $feedback)\n {\n //\n }", "public function edit(Feedback $feedback)\n {\n //\n }", "public function editAction()\n {\n $ifeedbackId = $this->getRequest()->getParam('id');\n $ifeedback = $this->_initIfeedback();\n if ($ifeed...
[ "0.7661853", "0.7661853", "0.7616693", "0.74548835", "0.7452025", "0.7294986", "0.7166781", "0.712927", "0.6963726", "0.68850553", "0.6879156", "0.685548", "0.68465245", "0.6784902", "0.67334545", "0.66520584", "0.66519624", "0.66109407", "0.6603018", "0.6577365", "0.6509579"...
0.7336175
5
Creates a form to edit a Feedback entity.
private function createEditForm(Feedback $entity) { $form = $this->createForm('BackendBundle\Form\FeedbackType', $entity, array( 'action' => $this->generateUrl('feedback_edit', array('id' => $entity->getId())), 'method' => 'PUT', )); $form->add('submit', SubmitType::...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function form()\n {\n $form = new Form(new Feedback);\n\n $form->select('user_id', __('feedback::feedback.user_id'))\n ->options(function ($id) {\n $user = User::find($id);\n if ($user) {\n return [$user->id => $user->username];...
[ "0.69763064", "0.6975052", "0.6975052", "0.69317025", "0.691121", "0.6873691", "0.67719513", "0.67685795", "0.6712323", "0.665951", "0.6480003", "0.6417916", "0.64060366", "0.63611966", "0.6346957", "0.6299343", "0.6267583", "0.6251645", "0.62403685", "0.62227505", "0.6209407...
0.78316146
0
Deletes a Feedback entity.
public function deleteAction(Request $request, Feedback $entity) { $form = $this->createDeleteForm($entity); $form->handleRequest($request); $em = $this->getDoctrine()->getManager(); if (!$entity) { throw $this->createNotFoundException('Unable to find Feedback entity.')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(){\n\t\t$this->feedbacks_model->delete();\n\t}", "public function delete($entity);", "public function destroy(Feedback $feedback)\n {\n //\n }", "public function destroy(Feedback $feedback)\n {\n //\n }", "public function destroy(Feedback $feedback)\n {\n...
[ "0.73567915", "0.66707605", "0.6625245", "0.6625245", "0.6584777", "0.65641046", "0.6563791", "0.65579695", "0.6550845", "0.6506594", "0.64897764", "0.64589345", "0.64384204", "0.6353366", "0.6331543", "0.6271736", "0.6256264", "0.6221593", "0.6213404", "0.618519", "0.6151766...
0.73159015
1
Creates a form to delete a Feedback entity.
private function createDeleteForm(Feedback $entity) { return $this->createFormBuilder() ->setAction($this->generateUrl('feedback_delete', array('id' => $entity->getId()))) ->setMethod('DELETE') ->getForm(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(){\n\t\t$this->feedbacks_model->delete();\n\t}", "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "public function deleteAction(Request $request, Feedbac...
[ "0.68579054", "0.68252105", "0.6701803", "0.6629885", "0.66005284", "0.6557763", "0.6539001", "0.6434215", "0.6433512", "0.6387341", "0.63639754", "0.63607824", "0.6343324", "0.6337413", "0.63353544", "0.6335151", "0.6329399", "0.6321674", "0.63099873", "0.6306032", "0.629761...
0.8039429
0
Do several batch actions over Feedback entities.
public function batchAction(Request $request) { $action = $request->get('batch_action_do'); $ids = $request->get('batch_action_checkbox'); $recordsSelected = false; if ($ids) { $em = $this->getDoctrine()->getManager(); if ($action == "delete") { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function batchExecute() {\n\n }", "public function run()\n {\n $specialists = Specialist::all()->take(10);\n foreach ($specialists as $specialist) {\n $books = $specialist->books->take(10);\n foreach ($books as $book) {\n Feedback::factory()\n ...
[ "0.59590316", "0.5896838", "0.5761667", "0.5751299", "0.5662159", "0.5653722", "0.56169313", "0.56157", "0.55932915", "0.5557632", "0.5553145", "0.555233", "0.5468561", "0.54455024", "0.5437353", "0.5381964", "0.5341553", "0.53305084", "0.53233874", "0.5319066", "0.531134", ...
0.54193527
15
character between every group of thousands Check post_max_size (
function let_to_num($v){ //This function transforms the php.ini notation for numbers (like '2M') to an integer (2*1024*1024 in this case) $l = substr($v, -1); $ret = substr($v, 0, -1); switch(strtoupper($l)){ case 'P': $ret *= 1024; case 'T': $ret *= 1024; case 'G': $ret *= 1024; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TextMax()\n\t{\n\t\treturn 1000000000; // should be 1 Gb?\n\t}", "function CharMax()\n\t{\n\t\treturn 1000000000; // should be 1 Gb?\n\t}", "function getUploadMaxValue(){\n return str_replace('M', '', getUploadMax()) * 1024;\n }", "function math_get_post_max_size()\n\t{\n\t\t$max_file_siz...
[ "0.66431254", "0.6485755", "0.63011587", "0.62845933", "0.6269652", "0.62427145", "0.62206876", "0.6206757", "0.61732864", "0.6162779", "0.61375713", "0.60421", "0.6035234", "0.6027889", "0.60260314", "0.60260314", "0.60074455", "0.599738", "0.59890836", "0.5953725", "0.59406...
0.5677198
42
first argument provided is the script itself
private function setGivenArgumentAmount(): int { return $_SERVER['argc'] - 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function script()\n {\n }", "public function main()\r\n {\r\n \r\n }", "public abstract function Main();", "public function main()\n\t{\n\t}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function ...
[ "0.69523233", "0.6590482", "0.65901434", "0.6532145", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", "0.6522194", ...
0.0
-1
Der Konstruktor bearbeitet die GETVariablen und speichert sie in $pageState. Bei der VokabeltestSeite wird die entsprechende $lesson intialisiert. Des weiteren wird hier der Titel der Webseite festgelegt.
public function __construct() { if (isset ( $_GET ['q'] )) { switch ($_GET ['q']) { case 'select' : $this->state = PageState::Selection; $this->setTitle ( 'Auswahl' ); break; case 'stats' : $this->state = PageState::Statistics; $this->setTitle ( 'Statistik' ); break; case ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($lesson)\n {\n $this->lesson = $lesson;\n }", "public function __construct() {\r\n\t\t$this->page = isset($_GET['page']) ? $_GET['page'] : null;\r\n\t}", "public function __construct()\n {\n $this->url = isset($_GET['url']) ? filter_var(rtrim($_GET['url'], FIL...
[ "0.6131545", "0.60116404", "0.5702488", "0.5668946", "0.55991286", "0.5596494", "0.55487067", "0.5511325", "0.5491457", "0.5278557", "0.5238565", "0.52247334", "0.5220775", "0.52163243", "0.51656985", "0.5155028", "0.51402724", "0.51170737", "0.51129776", "0.51098186", "0.510...
0.68621135
0
Stellt den Titel der Webseite dar.
public function printTitle() { echo $this->title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function web();", "public function towing()\n {\n $blogs = $this->common_model->getRecords(TABLES::$MST_BLOG_POSTS,'*',array('status'=>'1'));\n \n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('blogs', $blogs);\n $this->template-...
[ "0.6247673", "0.5932349", "0.58466667", "0.5799417", "0.5780615", "0.57389694", "0.57339245", "0.571017", "0.5699475", "0.5698127", "0.5687558", "0.56628543", "0.5655297", "0.5643724", "0.5640859", "0.56399816", "0.5623959", "0.5615046", "0.5596386", "0.55938315", "0.5593235"...
0.0
-1
Stellt den Inhalt der Startseite dar (start.html).
private function printStartPage() { readfile ( 'html/start.html' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showStart() {\n $starturl = $this->action . '?mode=eligible';\n $extra = array('starturl' => $starturl);\n $output = $this->outputBoilerplate('start.html', $extra);\n return $output;\n }", "function gettingStarted()\n {\n $data['$option'] = \"doc/gettingstarted\";\n $this->...
[ "0.73005944", "0.7065644", "0.69737226", "0.6869705", "0.6842079", "0.6665978", "0.665149", "0.6649595", "0.66488636", "0.65963984", "0.6525263", "0.6505508", "0.6483799", "0.6448926", "0.6448926", "0.6448926", "0.6448926", "0.6448926", "0.6448926", "0.6448926", "0.6448926", ...
0.831363
0
Stellt den Inhalt der Auswahlseite dar, indem er alle Dateien im Ordner der Lektionen auflistet, die nicht mit "stat" enden.
private function printSelectionPage() { echo '<ul data-role="listview" data-inset="true">'; $dir = new DirectoryIterator ( $this::filesPath ); foreach ( $dir as $fileinfo ) { if (! $fileinfo->isDot ()) { $fileName = pathinfo ( $fileinfo->getFilename (), PATHINFO_FILENAME ); $fileFullPath = $fileinfo->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateDebut();", "function hentAlleAktiviteter()\n{\n return Aktivitet::All()->sortByDesc(\"Dato\");\n}", "public function getDateSortie() {\n return $this->dateSortie;\n }", "function tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fix...
[ "0.59665555", "0.5705387", "0.5536608", "0.5487124", "0.5466628", "0.54387915", "0.53836226", "0.5372155", "0.5363781", "0.5280922", "0.52631694", "0.52547073", "0.5226718", "0.5197697", "0.5185795", "0.5132189", "0.51276004", "0.51036894", "0.5085551", "0.5084493", "0.508288...
0.0
-1
Stellt die Statistikseite dar. Dazu wird zu jeder Lektion eine entsprechende statsDatei gesucht. Wenn keine Datei vorhanden ist, wird 0/0 angezeigt.
private function printStatisticsPage() { echo '<ul data-role="listview" data-inset="true">'; $statistics = array (); $dir = new DirectoryIterator ( 'lessons/' ); foreach ( $dir as $fileinfo ) { if (! $fileinfo->isDot ()) { $fileName = pathinfo ( $fileinfo->getFilename (), PATHINFO_FILENAME ); $lectio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function svp_actualiser_stats() {\n\t\n\t// Initialisation du retour\n\t$retour = true;\n\n\t// Récupération des statistiques globales (toute version SPIP) et mise en base dans la table spip_plugins\n\tinclude_spip('inc/distant');\n\t$page = recuperer_page(_SVP_SOURCE_STATS);\n\t$infos = json_decode($page);\n\tif ...
[ "0.60805726", "0.57581687", "0.5676391", "0.56397104", "0.5602749", "0.5595189", "0.5560494", "0.5519868", "0.5467322", "0.5426971", "0.5400147", "0.53825784", "0.53265244", "0.53079003", "0.5288661", "0.52688015", "0.52382576", "0.5226381", "0.5183583", "0.51677185", "0.5145...
0.0
-1
Stellt die Seite der Vokabelabfrage dar (vocabularyTest.php).
private function printLessonPage() { $correctVocabulary = mt_rand ( 0, 4 ); include ('html/vocabularyTest.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testAllVocabulariesLoaded() {\n $this->drupalGet('admin/structure/tagadelic');\n $this->assertResponse(200);\n $this->assertRaw('Tag Cloud');\n\n foreach($this->vocabularies as $vocabulary) {\n $this->assertRaw($vocabulary->get('name'));\n }\n }", "public function vocab() {\n\t\t$pa...
[ "0.6628837", "0.64975566", "0.61772025", "0.59104747", "0.58468235", "0.5814384", "0.57725024", "0.5761054", "0.57221645", "0.560295", "0.560295", "0.556672", "0.5534702", "0.5526161", "0.5485521", "0.548261", "0.5479273", "0.54625803", "0.53975135", "0.53531665", "0.5350517"...
0.6237998
2
Stellt die Seite einer beantworteten Vokabelabfrage dar (vocabularyAnswer.php).
private function printAnswerPage() { $correctVocabulary = 0; $wrongVocabulary = 1; include ('html/vocabularyAnswer.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function words() : array {\n return [\n \"абажур\",\n \"абзац\",\n \"абонент\",\n \"абрикос\",\n \"абсурд\",\n \"авангард\",\n \"август\",\n \"авиация\",\n \"авоська\",\n \"автор\",\n ...
[ "0.5894224", "0.5759442", "0.57177246", "0.5693164", "0.56925666", "0.5648136", "0.559913", "0.55987984", "0.55634093", "0.5532757", "0.5530401", "0.55281997", "0.551955", "0.5441908", "0.543937", "0.54363704", "0.5430889", "0.5381001", "0.535859", "0.5333099", "0.5323755", ...
0.69583577
0
Stellt den Inhalt der Seite dar, auf der die Anforderungen beschrieben sind (task.html).
private function printTaskPage() { readfile ( 'html/task.html' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function do_viewtask()\n\t{\n\t\tif ( isset( $_REQUEST[ 'task_id' ] ) )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$task = Task::load( $_REQUEST[ 'task_id' ] );\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $e )\n\t\t\t{\n\t\t\t\t$task = NULL;\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $this->getPlugin()->getTemplateContent( ...
[ "0.7332915", "0.7037799", "0.66728663", "0.66697764", "0.6607155", "0.6595226", "0.6581604", "0.6517034", "0.6489719", "0.64382344", "0.63589966", "0.6354979", "0.62486637", "0.624347", "0.62418115", "0.6239198", "0.6238577", "0.62127775", "0.62051344", "0.6187985", "0.614862...
0.72457963
1
Stellt den Inhalt des Footers dar. Aktive Navigationselemente werden nicht angezeigt.
public function printFooterContent() { echo '<ul>'; if (! $this->isActive ( PageState::Selection )) echo '<li class="', $class, '"><a href="?q=select">Auswahl</a></li>'; if (! $this->isActive ( PageState::Statistics )) echo '<li class="', $class, '"><a href="?q=stats">Statistik</a></li>'; if (! $this->isA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_footing()\n {\n $args = func_get_args();\n $this->footing = (is_array($args[0])) ? $args[0] : $args;\n }", "function Footer() {\n $this->SetY(-15);\n //Pilih font Arial italic 8\n $this->SetFont('Helvetica', 'I', 8);\n //Tampilkan nomor halaman rata tengah\n ...
[ "0.68786544", "0.6670643", "0.66550696", "0.6568689", "0.6568689", "0.6564669", "0.65513253", "0.6531963", "0.6515959", "0.6494639", "0.6490247", "0.6459002", "0.64573157", "0.645407", "0.64340377", "0.64335066", "0.64189595", "0.6410665", "0.6410253", "0.6391819", "0.6383760...
0.5890609
94
Protokolliere die Antwort einer Vokabelabfrage in der entsprechenden Datei.
private function logAnswer() { $fileName = $this::filesPath . $this->lesson->getLessonFileName () . $this::statisticsExtension; // lese Statistik ein $stats = $this->getStatsFromFile ( $fileName ); // aktualisiere Statistik $stats [1] ++; if ($this->lesson->isCorrectAnswer ()) $stats [0] ++; // versuch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct( $arg = array()) {\n $this->adresse[\"inhalt\" ] = <<<ENDE\nam \nMai 2016 \nhabe ich Sie mit Hilfe eines \"Von-an-Zettel\"s gebeten,\nmich über\nzu informieren.\n\nVielleicht ist diese Nachricht verloren gegangen,\njedenfalls haben Sie mir bis heute weder mündlich noch schriftli...
[ "0.5491813", "0.5375482", "0.5330253", "0.5319997", "0.5252711", "0.5192773", "0.51602566", "0.51426685", "0.5139138", "0.51164806", "0.5093013", "0.50898206", "0.50703794", "0.5064478", "0.5061341", "0.50570405", "0.5045338", "0.5034662", "0.50240314", "0.5019919", "0.500963...
0.0
-1
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function __construct() { parent::__construct(); $this->load->library('form_validation'); if ($this->session->userdata('is_admin_login') || $this->session->userdata('is_user_login')) { }else{ redirect('home'); } $this->load->model('patients'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome...
[ "0.7656208", "0.7415378", "0.739705", "0.73165625", "0.722926", "0.722926", "0.71883744", "0.7164455", "0.71509767", "0.71431154", "0.71066415", "0.707623", "0.70758826", "0.7040675", "0.7028172", "0.7028172", "0.7028172", "0.7028172", "0.7028172", "0.697183", "0.696945", "...
0.0
-1
the location of a file for preview / Constructor
public function __construct ( $previewFilename ) { $GLOBALS [ 'log' ]->debug ( get_class ( $this ) . "->__construct( {$previewFilename} )" ) ; $this->_previewFilename = $previewFilename ; $this->_list = array ( ) ; $this->_basename = basename ( $this->_previewFilename ) ; $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_preview_relative_path(){\n\t\treturn $this->dir . '/' . $this->get_preview_name();\n\t}", "function getPreviewUrl () {\n return link::preview($this->dir, $this->file);\n }", "public function myFileLocation()\r\n {\r\n $reflection = new ReflectionClass($this);\r\n\r\n ...
[ "0.7006693", "0.6801717", "0.6497398", "0.64087564", "0.630835", "0.63012004", "0.6268259", "0.62317395", "0.6200262", "0.61939967", "0.61921513", "0.6182623", "0.61406136", "0.61405814", "0.6128783", "0.61253256", "0.61201984", "0.6104896", "0.60850734", "0.6071497", "0.6017...
0.60589373
20
/ Get the most recent item in the history
public function getCount () { return count ( $this->_list ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }", "public function getLatestItem()\n {\n return end($this->items);\n }", "public function g...
[ "0.76556695", "0.7450351", "0.71319413", "0.71319413", "0.70083207", "0.69695973", "0.6932428", "0.69293696", "0.69152117", "0.67623043", "0.67293125", "0.6705126", "0.669753", "0.66684484", "0.66020024", "0.65918887", "0.6586908", "0.6568885", "0.6562989", "0.65499413", "0.6...
0.0
-1
/ Get all the items in the history
public function getList () { return $this->_list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getItemsHistory()\n {\n return $this->get(self::_ITEMS_HISTORY);\n }", "public function fetchHistory(): array;", "public function getHistory()\r\r\n {\r\r\n return $this->history;\r\r\n }", "function get_history() {\n\t\treturn $this->history;\n\t}", "public functi...
[ "0.8420503", "0.7886924", "0.7833313", "0.7743734", "0.7681171", "0.76645", "0.76645", "0.7636085", "0.7538793", "0.7257729", "0.72539264", "0.71904534", "0.7184721", "0.7143587", "0.7070626", "0.7051845", "0.69854397", "0.6926971", "0.6906074", "0.6900634", "0.68252206", "...
0.0
-1
/ Get the most recent item in the history
public function getFirst () { return end ( $this->_list ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }", "public function getLatestItem()\n {\n return end($this->items);\n }", "public function g...
[ "0.76556665", "0.74500746", "0.71322787", "0.71322787", "0.7008512", "0.6968571", "0.6931611", "0.69295454", "0.69163007", "0.67634255", "0.67290574", "0.6704924", "0.6697832", "0.6669397", "0.6601136", "0.659169", "0.65856963", "0.6568836", "0.65627736", "0.65488094", "0.654...
0.0
-1
/ Get the oldest item in the history (the default layout)
public function getLast () { return reset ( $this->_list ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }", "public function getLatestItem()\n {\n return end($this->items);\n }", "function top()\n ...
[ "0.66071826", "0.6293744", "0.61923194", "0.61644775", "0.6160332", "0.615858", "0.61446774", "0.61036134", "0.60581017", "0.6037113", "0.5974955", "0.5974955", "0.5940835", "0.5904986", "0.5879009", "0.58756626", "0.58594453", "0.5852807", "0.583605", "0.5814146", "0.5807314...
0.5792979
23
/ Get the next oldest item in the history
public function getNext () { return prev ( $this->_list ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_previous_item($item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n return $item->previous();\n}", "function getNextId() {\n\t\t$query = \"select min( $this->pKey ) from $this->table where $this->pKey > $this->id\";\n\t\treturn $this->getDb()->query( $query )->...
[ "0.6045378", "0.6044267", "0.60023725", "0.5888067", "0.5825808", "0.58172786", "0.5814804", "0.58115906", "0.57840335", "0.5763508", "0.57511073", "0.5720066", "0.57008135", "0.56978065", "0.56857467", "0.56593865", "0.56390935", "0.5625356", "0.5625356", "0.5611595", "0.561...
0.5846255
4
/ Get the nth item in the history (where the zeroeth record is the most recent)
public function getNth ( $index ) { $value = end ( $this->_list ) ; $i = 0 ; while ( $i < $index ) { $value = prev ( $this->_list ) ; $i ++ ; } return $value ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastItem() {}", "public function getLastItem() {}", "function get_recent_items($num = 10)\n{\n return get_db()->getTable('Item')->findBy(array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public function lastItem();", "function GetHistoryItem($val) /*12_05_2007 возвращает...
[ "0.6279073", "0.6279073", "0.6160534", "0.60325885", "0.6013905", "0.6013598", "0.5899421", "0.5830558", "0.58204037", "0.5727718", "0.57224476", "0.5722312", "0.5661831", "0.5607937", "0.56059533", "0.5596253", "0.5588485", "0.55615675", "0.5556144", "0.55413485", "0.5533455...
0.6202439
2
/ Add an item to the history
public function append ($path) { // make sure we don't have a duplicate filename - highly unusual as two people should not be using Studio/MB concurrently, but when testing quite possible to do two appends within one second... // because so unlikely in normal use we handle this the naive way by wait...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addToHistory(string $item): void {\n\t\t// as before. Also don't store empty values to history.\n\t\tif (trim($item) === '' || $this->lastItem === $item) {\n\t\t\treturn;\n\t\t}\n\n\t\t\\readline_add_history($item);\n\t\t$this->lastItem = $item;\n\n\t}", "public function add($item);", "public f...
[ "0.7505617", "0.694969", "0.694969", "0.6818756", "0.6743169", "0.6665509", "0.65969044", "0.6565689", "0.6559872", "0.6523632", "0.6471341", "0.6460336", "0.6451671", "0.640927", "0.63726515", "0.635148", "0.6347177", "0.62472963", "0.6243903", "0.61719966", "0.6156889", "...
0.0
-1
/ Restore the historical layout identified by timestamp
public function restoreByTimestamp ($timestamp) { $filename = $this->getFileByTimestamp( $timestamp ); $GLOBALS [ 'log' ]->debug ( get_class ( $this ) . ": restoring from $filename to {$this->_previewFilename}" ) ; if (file_exists ( $filename )) { $this->savePreview($fi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restore();", "public function restore($template);", "public function restore() {}", "protected static function restore() {}", "public function restore()\n {\n //\n }", "function restore()\n {\n }", "public function restore()\n {\n }", "function restore_all() {...
[ "0.59258527", "0.580759", "0.5716178", "0.5598764", "0.5512282", "0.54387033", "0.5385307", "0.53429395", "0.5322379", "0.52911305", "0.518696", "0.5185404", "0.515128", "0.514949", "0.50725675", "0.49810797", "0.49663648", "0.49601442", "0.49395365", "0.49232894", "0.491035"...
0.61084
0
Saves given file for preview
public function savePreview($filename) { copy($filename, $this->_previewFilename); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save($file, $path);", "function save($filePath);", "public function saveToFile($file)\n {\n \n }", "public function save(IO\\File $file) {\n\t\t\tfile_put_contents($file, $this->render());\n\t\t\t$this->file = $file;\n\t\t}", "public function save( $filename )\n {\n \n }",...
[ "0.74765664", "0.733764", "0.7232347", "0.70646405", "0.7060334", "0.6836318", "0.6782662", "0.67304534", "0.6682443", "0.66709834", "0.6666528", "0.6555761", "0.6401757", "0.6338384", "0.6324753", "0.63203096", "0.62761396", "0.626184", "0.62567663", "0.6231787", "0.6229187"...
0.7212979
3
/ Undo the restore revert back to the layout before the restore
public function undoRestore () { if (file_exists ( $this->_previewFilename )) { unlink($this->_previewFilename); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restore();", "public function restore() {}", "public function restore()\n {\n //\n }", "protected static function restore() {}", "function restore()\n {\n }", "public function restore()\n {\n }", "public function revert();", "public function restoring($model)\...
[ "0.7585868", "0.74500686", "0.74327695", "0.7335147", "0.73264235", "0.7272106", "0.71052134", "0.6857936", "0.68351126", "0.682605", "0.67647904", "0.67647904", "0.64565575", "0.6376829", "0.6361718", "0.6348198", "0.6338996", "0.62753403", "0.62095124", "0.61846", "0.616398...
0.70648587
7
Returns full path to history file by timestamp. This function returns file path even if file doesn't exist
public function getFileByTimestamp($timestamp) { return $this->_dirname . DIRECTORY_SEPARATOR . $this->_basename . '_' . $timestamp ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function filename()\n {\n return 'history_' . time();\n }", "public function getHistory() {\n\n if ($this->history) {\n return $this->history;\n }\n\n if (file_exists(static::FILE_HISTORY)) {\n\n $history = file_get_contents(static::FILE_HISTORY);...
[ "0.70682204", "0.62143326", "0.61543", "0.6101573", "0.6079906", "0.6056782", "0.6036165", "0.58492464", "0.57833487", "0.5703783", "0.5652902", "0.56379366", "0.56379366", "0.5633526", "0.55959755", "0.5585009", "0.5581778", "0.5566956", "0.5558288", "0.5549959", "0.55494285...
0.62195176
1
Fetch all HTTP headers from the current request
function apache_request_headers() : array { $headers = []; foreach ( $_SERVER as $name => $value ) { if ( substr( $name, 0, 5 ) !== 'HTTP_' ) { continue; } $name = substr( $name, 5 ); $name = strtr( $name, '_', '-' ); $nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRequestHeaders() {}", "public function getHeaders() {}", "private function requestHeaders() \n {\n // getallheaders available, use that\n if (function_exists('getallheaders')) {\n return getallheaders();\n }\n\n // getallheaders not available:...
[ "0.8166378", "0.7995215", "0.79878", "0.7985806", "0.791373", "0.791373", "0.791373", "0.791373", "0.791373", "0.791373", "0.791373", "0.791373", "0.791373", "0.791373", "0.7843086", "0.78335077", "0.78126305", "0.78091323", "0.7781555", "0.77712834", "0.77432436", "0.77317...
0.0
-1
Creates a representation of the entity for debugging
public function createRepresentation($entity) { $this->checkObject($entity); if (method_exists($entity, '__toString')) { return (string) $entity; } return get_class($entity) . ':' . $this->getIdentifier($entity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString()\n {\n return $this->toJson(['pretty' => true]);\n }", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n $context[] = \"$key=\".$value->fo...
[ "0.6549239", "0.6469744", "0.63973427", "0.6382272", "0.630916", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "0.6307581", "...
0.64506644
2
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Show the application dashboard.
public function index() { // $data["mobile"] = Auth::user()->profile->phone ; // $data["location"] = Auth::user()->profile->location ; if(Auth::user()->is_admin == 1){ return redirect('/admin'); } $data['all_balance'] = Balance::allBalance(); $data['all_pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n ...
[ "0.77862287", "0.7761407", "0.7563901", "0.75170934", "0.746699", "0.74665695", "0.7367683", "0.73534966", "0.7348662", "0.7343759", "0.7328216", "0.73182577", "0.73092335", "0.728953", "0.72847724", "0.7275449", "0.7275449", "0.7275449", "0.7275449", "0.7253329", "0.7253329"...
0.0
-1
Run the database seeds.
public function run() { $array_categories = Categorie::get()->pluck('id')->toArray(); $array_posts = Post::get()->pluck('id')->toArray(); // dd($array_categories[array_rand($array_categories)]); for ($i = 0; $i < 5; $i++) { DB::table('categorie_post')->insert( ...
{ "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
Admin User Groups CRUD
public function admin_user_group() { $crud = $this->generate_crud('admin_groups'); $this->mTitle.= 'Admin User Groups'; $this->render_crud(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_user_group()\n\t{\n\t\t$crud = $this->generate_crud('admin_groups');\n\t\t$crud->set_theme('datatables');\n\t\t$this->mPageTitle = 'Admin User Groups';\n\t\t$this->render_crud();\n\t}", "public function editUserGroup($id)\n {\n\t if($this->validateUserGroup($id)=='true'){\n\t\t//This was...
[ "0.8068696", "0.7252236", "0.7032717", "0.70270896", "0.70096415", "0.6984845", "0.6831785", "0.6812446", "0.67822206", "0.67759657", "0.67576647", "0.6750775", "0.6732702", "0.6689466", "0.6666788", "0.66491306", "0.6626991", "0.6589712", "0.6578041", "0.6575806", "0.657508"...
0.8234505
0
Admin User Reset password
public function admin_user_reset_password($user_id) { // only top-level users can reset Admin User passwords $this->verify_auth(array('webmaster')); $form = $this->form_builder->create_form(); if ($form->validate()) { // pass validation $data = array('password' => $this->input->post('new_password')); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetAdminUserPwdAction()\n\t{\n\t // \t $return = $user->resetPassword('admin');\n\t // \t var_export($return);\n\t // \t echo PHP_EOL;\n\t // \t echo $return['password'];\n\t // \t return false;\n\t}", "public function resetPassword();", "public function reset(){...
[ "0.8507008", "0.83525795", "0.80262816", "0.788377", "0.7817904", "0.7750498", "0.7637977", "0.76209646", "0.7615403", "0.74918765", "0.74645877", "0.74612164", "0.743457", "0.743457", "0.7405399", "0.73480237", "0.7338491", "0.7336184", "0.7321178", "0.7311512", "0.7287813",...
0.6919547
51
Submission of Update Info form
public function account_update_info() { $data = $this->input->post(); if ($this->ion_auth->update($this->mUser->id, $data)) { $messages = $this->ion_auth->messages(); $this->system_message->set_success($messages); } else { $errors = $this->ion_auth->errors(); $this->system_message->set_error($e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function update_form()\n\t{\n\t\t$this->title = sprintf(lang('update_title'), $this->installed_version, $this->version);\n\t\t$vars['action'] = $this->set_qstr('do_update');\n\t\t$this->set_output('update_form', $vars);\n\t}", "function update() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TR...
[ "0.7853345", "0.7287599", "0.72206473", "0.71379477", "0.70539", "0.6983488", "0.6971337", "0.6923803", "0.6920522", "0.6801765", "0.67924273", "0.67924273", "0.66757125", "0.6675644", "0.6614287", "0.6606717", "0.65967077", "0.656902", "0.6558495", "0.65559393", "0.65548146"...
0.6167618
47
Submission of Change Password form
public function account_change_password() { $data = array('password' => $this->input->post('new_password')); if ($this->ion_auth->update($this->mUser->id, $data)) { $messages = $this->ion_auth->messages(); $this->system_message->set_success($messages); } else { $errors = $this->ion_auth->errors();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _change_pass_submit()\n\t{\n\t\t$user = user_get_account_info();\n\t\t$password = $this->input->post('password');\n\t\t$password = mod('user')->encode_password($password, $user->email);\n\n\n\t\t$data['password'] = $password;\n\t\tt('session')->set_userdata('change_password', $data);\n\t\t$user_...
[ "0.81004304", "0.7997913", "0.7969093", "0.78454083", "0.7806516", "0.7783239", "0.7747885", "0.77431345", "0.7732648", "0.7729058", "0.77023643", "0.75474274", "0.7509355", "0.7443813", "0.7422018", "0.7411435", "0.73992395", "0.7380268", "0.7369361", "0.73669744", "0.735747...
0.6839962
93
Prepares the environment before running a test.
protected function setUp() { parent::setUp(); // TODO Auto-generated ServiceLoaderTest::setUp() $this->serviceLoader = new ServiceLoader(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareRealTestEnvironment() {}", "protected function setUp () : void {\n\n $_ENV['foo'] = \"bar\";\n $_SERVER['foo'] = \"baz\";\n\n $_ENV['bar'] = \"lorem\";\n $_SERVER['baz'] = \"ipsum\";\n\n // And quux isn't defined.\n }", "protected function _before...
[ "0.82813984", "0.74528134", "0.7089828", "0.70875514", "0.70170575", "0.6992361", "0.69501555", "0.69016063", "0.68578815", "0.68517196", "0.67532045", "0.6745241", "0.66899645", "0.66775244", "0.66723675", "0.66720474", "0.66672695", "0.6664573", "0.66530484", "0.6621275", "...
0.0
-1
Cleans up the environment after running a test.
protected function tearDown() { // TODO Auto-generated ServiceLoaderTest::tearDown() $this->serviceLoader = null; parent::tearDown(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tearDown(): void\n {\n unset($_SERVER['foo'], $_ENV['foo']);\n }", "public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }", "protected function tearDown(): void\n {\n $this->config = null;\n ...
[ "0.7499918", "0.7465399", "0.7313867", "0.7240087", "0.72257245", "0.72239214", "0.71817493", "0.71759856", "0.7174705", "0.71517044", "0.71517044", "0.715084", "0.71412283", "0.7115216", "0.71096313", "0.7072444", "0.70685935", "0.7056217", "0.7027916", "0.7005705", "0.70002...
0.0
-1
Define the model's default state.
public function definition() { return [ 'product_id' => function(){ return Product::all()->random(); }, 'size' => json_encode([ $this->faker->numberBetween(0,5).'x'.$this->faker->numberBetween(0,5), $this->faker->numberBetwe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultState()\r\n\t{\r\n\t}", "static function get_default_state();", "public function getDefaultUserState();", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamNa...
[ "0.77754503", "0.72247493", "0.685763", "0.6793462", "0.6769021", "0.64324814", "0.6410042", "0.637007", "0.6187058", "0.61869824", "0.61583555", "0.6154062", "0.61522424", "0.6144177", "0.61169946", "0.6107669", "0.610452", "0.6039661", "0.6038444", "0.6020123", "0.59868133"...
0.0
-1
Display a listing of the resource.
public function index() { // it get redirects because of middleware (no need for this check) if((auth()->user()->hasPermissionTo('blogger_view') != true)) return $this->permission_denied('blogger_dashboard'); // dd(auth()->user()); $bloggers = Blogger::get(); retur...
{ "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() { if((auth()->user()->hasPermissionTo('blogger_add') != true)) return $this->permission_denied('blogger_dashboard'); return view('dashboard.users.blogger.form') ->with([ 'page_title' => $this->page_title, 'entity' => $...
{ "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(BloggerRequest $request) { if((auth()->user()->hasPermissionTo('blogger_add') != true)) return $this->permission_denied('blogger_dashboard'); $blogger = new Blogger(); $blogger->fill($request->all())->save(); $status = $blogger->save() ? array( ...
{ "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(Blogger $blogger) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233183", "0.81894475", "0.6830127", "0.6498529", "0.6496276", "0.6469191", "0.64627224", "0.63619924", "0.6308743", "0.62809277", "0.6218707", "0.61915004", "0.617914", "0.6172935", "0.6137578", "0.6118736", "0.6107122", "0.6106576", "0.60931313", "0.60798067", "0.6046669...
0.0
-1
Show the form for editing the specified resource.
public function edit(Blogger $blogger) { if((auth()->user()->hasPermissionTo('blogger_edit') != true)) return $this->permission_denied('blogger_dashboard'); return view('dashboard.users.blogger.form') ->with([ 'page_title' => $this->page_title, ...
{ "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, Blogger $blogger) { if((auth()->user()->hasPermissionTo('blogger_edit') != true)) return $this->permission_denied('blogger_dashboard'); $blogger->fill($request->all())->save(); $status = $blogger->save() ? array( 'msg' => "Bl...
{ "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(Blogger $blogger) { if((auth()->user()->hasPermissionTo('blogger_delete') != true)) return $this->permission_denied('blogger_dashboard'); $status = $blogger->delete() ? array( 'msg' => "Blogger has been deleted successfully!", 'toastr' => ...
{ "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
(array( 'vars' => $vars, ))
protected function _getVarsItem($arr) { global $varsPluginAccountingAccount; $varsPreference = $this->_getVarsPreference(array( 'numFiscalPeriod' => $varsPluginAccountingAccount['numFiscalPeriodCurrent'], )); $data = array( 'varsPreference' => $varsPreference, ); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function values( $vars ) {\n foreach($vars as $k=>$v) {\n $this->_vars[\"$k\"] = $v;\n }\n }", "public function __getVars(){\r\n $vars = isset($this->vars)? $this->vars:array();\r\n return $vars;\r\n }", "function acf_extract_vars(&$array, $keys)\n{\n}", "function __construct(&$v...
[ "0.7112154", "0.68076557", "0.6294348", "0.629061", "0.6253733", "0.6224166", "0.6224166", "0.6153742", "0.61213624", "0.611972", "0.61191326", "0.6106232", "0.6102115", "0.6073015", "0.60068196", "0.5993965", "0.596377", "0.59604555", "0.59272414", "0.59074116", "0.5896067",...
0.0
-1
check if username is in use
function usernameInUse($User){ $inUse = false; // santise user input to prevent XSS attack (removes any html elements) $filteredUser = filter_var($User, FILTER_SANITIZE_STRING); $file = fopen("../login.txt", "r") or die("unable to open file!"); while((! feof($file)) && ($inUse == false)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verify_username_availability($userName){\n $exists = false;\n if(get_user($userName)){\n $exists = true;\n }\n return $exists;\n}", "function isFreeUsername($username, $connection) {\n\t$namecheckquery = mysqli_query($connection, \"select name from users where name = '\".$username.\"'...
[ "0.7427209", "0.73799247", "0.72848016", "0.7281898", "0.7245951", "0.7234943", "0.7204722", "0.7198174", "0.7181717", "0.7181218", "0.71429557", "0.7132921", "0.71192074", "0.7109556", "0.70871115", "0.7074567", "0.70629835", "0.70596796", "0.70505846", "0.70412976", "0.6999...
0.7191115
8
Use up()/down() to run migration code without a transaction.
public function up() { $this->addColumn(\backend\models\VodProfile::tableName(), 'language', "char(5) not null default 'en-US'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();...
[ "0.7400663", "0.7367202", "0.7367202", "0.7306833", "0.73017013", "0.6950261", "0.6935062", "0.6919443", "0.6919443", "0.6919443", "0.68502915", "0.6808329", "0.67238945", "0.6686151", "0.6678409", "0.66436875", "0.6481601", "0.64645845", "0.6458062", "0.64404756", "0.6440475...
0.0
-1