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
Store a newly created user in storage.
public function store() { if (!$this->userService->create(Input::all())) { return Redirect::back()->withErrors($this->userService->errors())->withInput(); } Alert::success('User successfully created!')->flash(); return Redirect::route('dashboard.users.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n\t{\n\t\t$user = $this->user->store( Input::all() );\n\t}", "public function store()\n {\n $attributes = request()->validate([\n 'name' => 'required|max:255',\n 'username' => 'required|unique:users,username',\n 'email' => 'required|email|max:255...
[ "0.7976019", "0.7892408", "0.75398266", "0.7396547", "0.730262", "0.7286644", "0.72544193", "0.7203232", "0.7188256", "0.717765", "0.71588266", "0.7143239", "0.7140904", "0.7129696", "0.7113036", "0.70371896", "0.7034208", "0.7021662", "0.69979644", "0.6986915", "0.6983948", ...
0.711512
14
Show the form for editing a user
public function edit($crypt_id) { $user = $this->userRepo->get(Crypt::decrypt($crypt_id)); $available_roles = $this->userService->getAvailableRolesForSelect(Auth::user()->getLevel()); return View::make('user.edit', compact('user', 'available_roles'))->withEditForm(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }", "protected function edit() {\n\t\t// Make sure a user exists.\n\t\tif (empty($this->user)) {\n\t\t\t...
[ "0.84471935", "0.83827776", "0.8321912", "0.82228756", "0.821246", "0.80734587", "0.8070351", "0.8056989", "0.8054402", "0.80113125", "0.79563457", "0.7928251", "0.7919669", "0.7904967", "0.7873921", "0.78688926", "0.7856105", "0.7856105", "0.7853337", "0.77720857", "0.776148...
0.0
-1
Update the specified resource in storage.
public function update($crypt_id) { $user_id = Crypt::decrypt($crypt_id); if (!$this->userService->update($user_id, Input::all())) { return Redirect::back()->withErrors($this->userService->errors())->withInput(); } Alert::success('User successfully updated!')->flash(); return Redirect::route('dashboard.users.index'); }
{ "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($crypt_id) { $user_id = Crypt::decrypt($crypt_id); if (!$this->userService->delete($user_id)) { return Redirect::back()->withErrors($this->userService->errors())->withInput(); } Alert::success('User successfully deleted!')->flash(); return Redirect::route('dashboard.users.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Disable the specified user
public function disable($crypt_id) { $user_id = Crypt::decrypt($crypt_id); if (!$this->userService->disable($user_id)) { return Redirect::back()->withErrors($this->userService->errors())->withInput(); } Alert::success('User successfully disabled!')->flash(); return Redirect::route('dashboard.users.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function disable_user() \n {\n $conn = $this->conn;\n $login = $this->login;\n \n $params = array($login);\n $query = \"UPDATE users SET enabled = -1 WHERE login = ?\";\n \n $rs = $conn->Execute($query, $params);\n \n if (!...
[ "0.77412075", "0.763119", "0.74990755", "0.74603605", "0.7441408", "0.7396321", "0.7329298", "0.72992074", "0.6970542", "0.68814236", "0.6880678", "0.68108124", "0.6766278", "0.674026", "0.6729603", "0.6708145", "0.66689", "0.6606771", "0.6601288", "0.6593791", "0.6545925", ...
0.61302066
49
Display the user profile form
public function profile() { $user = $this->userRepo->get(Auth::user()->id); return View::make('user.profile', compact('user'))->withShowTab(Input::get('tab')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function profileForm()\n {\n return view('turtle::auth.profile');\n }", "function profileForm(){\r\n\t\t$this->view('profileForm');\r\n\t}", "public function actionProfile()\n {\n $this->layout = 'headbar';\n $model = new User();\n $model = User::find()->where(['id' ...
[ "0.81687033", "0.8096649", "0.77347445", "0.7682196", "0.767731", "0.7637477", "0.76358247", "0.7584577", "0.7516564", "0.7491051", "0.73628354", "0.7346976", "0.73407376", "0.73317546", "0.7319914", "0.7318605", "0.7297897", "0.72949886", "0.72871304", "0.7275194", "0.725505...
0.74632657
10
Perform a selfchange password request
public function selfChangePassword() { if (!$this->userService->changePassword(Input::all())) { return Redirect::route('user-profile', array('tab' => 'account'))->withErrors($this->userService->errors())->withInput(); } Alert::success('Your password has been successfully changed.')->flash(); return Redirect::route('user-profile', array('tab' => 'account')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function changePassword() {}", "private function changePassword()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($reques...
[ "0.7385647", "0.6946307", "0.6879779", "0.6693084", "0.6605285", "0.65734404", "0.656932", "0.6548491", "0.65362495", "0.6536129", "0.6530542", "0.65269536", "0.6497222", "0.6487361", "0.6462839", "0.6461272", "0.64552706", "0.64057016", "0.63971883", "0.6395171", "0.639308",...
0.73346704
1
Perform a language update request
public function selfUpdateLocalization() { if (!$this->userService->updateLocale(Auth::user()->id, Input::all())) { return Redirect::route('user-profile', array('tab' => 'localization'))->withErrors($this->userService->errors())->withInput(); } Alert::success('Your language settings have been successfully updated.')->flash(); return Redirect::route('user-profile', array('tab' => 'localization')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Language $language)\n {\n //\n }", "function updateUserLanguage_post(){\n $this->check_service_auth();\n //pr($_POST);\n $this->form_validation->set_rules('languages','language','required');\n\t if($this->form_validation->run() == FALSE){\n\t $res...
[ "0.73268425", "0.6957079", "0.6929883", "0.6888811", "0.68719894", "0.68285275", "0.6764004", "0.6731691", "0.6689829", "0.66182697", "0.66022825", "0.6538568", "0.6515099", "0.65018946", "0.64919657", "0.6489783", "0.6484238", "0.6421807", "0.64150864", "0.64145607", "0.6391...
0.61645633
38
Display the user verification form
public function verify($crypt_user_id) { $user = $this->userRepo->get(Crypt::decrypt($crypt_user_id)); return View::make('user.verify', compact('user', 'crypt_user_id')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verify()\n {\n UserModel::authentication();\n\n //get the session user\n $user = UserModel::user();\n\n $this->View->Render('verify/verify');\n }", "function _UserDisplayVerificationForm( &$module, $id, &$params, $returnid )\n {\n $feusers = $module->GetModul...
[ "0.7431919", "0.71946234", "0.7171485", "0.7156229", "0.68994075", "0.68869513", "0.6860216", "0.6752418", "0.66217786", "0.6591744", "0.655091", "0.6488479", "0.6469246", "0.64569575", "0.6432807", "0.642218", "0.64039016", "0.63931704", "0.63919234", "0.6388227", "0.6383608...
0.58762825
93
Perform a login request
public function postVerify() { if (!$this->userService->verify(Input::all())) { if ($this->userService->message()) { Alert::error($this->userService->message())->flash(); } return Redirect::back()->withErrors($this->userService->errors())->withInput(); } Session::flash('email', Input::get('email')); Alert::success('Your account has been verified!')->flash(); return Redirect::route('auth-login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function login()\n {\n (new Authenticator(request()))->login();\n }", "private function doLogin()\n {\n if (!isset($this->token)) {\n $this->createToken();\n $this->redis->set('cookie_'.$this->token, '[]');\n }\n\n $loginResponse = $this->httpReq...
[ "0.8164283", "0.7831355", "0.7760793", "0.7711111", "0.76224077", "0.7602633", "0.75985044", "0.754405", "0.75189525", "0.74888885", "0.74888885", "0.74364245", "0.7425378", "0.7380272", "0.736745", "0.7335202", "0.7313254", "0.73130876", "0.73100847", "0.7293768", "0.7281126...
0.0
-1
Show manual registration form
public function register() { return View::make('user.register'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showRegistrationForm()\n {\n return view('skins.' . config('pilot.SITE_SKIN') . '.auth.register');\n }", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "public funct...
[ "0.8153096", "0.8135225", "0.8132774", "0.8043637", "0.8011087", "0.7893498", "0.78703856", "0.7809641", "0.77887803", "0.777939", "0.76926196", "0.76864094", "0.7674625", "0.7670571", "0.76689047", "0.76482004", "0.7638782", "0.76377565", "0.7614001", "0.75773287", "0.756304...
0.0
-1
Store a newly registered user in storage.
public function postRegister() { $user = $this->userService->create(Input::all()); if (!$user) { return Redirect::back()->withErrors($this->userService->errors())->withInput(); } Alert::success('You have successfully registered yourself!')->flash(); // set flag for login page Session::flash('just_registered', '1'); return Redirect::route('auth-login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n\t{\n\t\t$user = $this->user->store( Input::all() );\n\t}", "public function store()\n {\n $attributes = request()->validate([\n 'name' => 'required|max:255',\n 'username' => 'required|unique:users,username',\n 'email' => 'required|email|max:255...
[ "0.80134046", "0.77105695", "0.7323218", "0.72966486", "0.7271085", "0.72659063", "0.7225781", "0.7073488", "0.7047331", "0.70044523", "0.7000046", "0.6949038", "0.69157743", "0.6902856", "0.6882533", "0.68072134", "0.67898613", "0.6778791", "0.6774272", "0.67622215", "0.6761...
0.0
-1
Send verification reminder email from admin
public function verificationRemind($crypt_id) { $user_id = Crypt::decrypt($crypt_id); if (!$this->userService->verificationRemind($user_id)) { return Redirect::back()->withErrors($this->userService->errors())->withInput(); } Alert::success('User verification email sent.')->flash(); return Redirect::route('dashboard.users.edit', $crypt_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendEmailVerificationNotification();", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AdminEmailVerificationNotification);\n }"...
[ "0.8138465", "0.8132959", "0.8015849", "0.7805833", "0.7620241", "0.7559346", "0.75518477", "0.75306356", "0.7486266", "0.7443049", "0.7394344", "0.7394344", "0.7391106", "0.7391106", "0.7391106", "0.7391106", "0.7391106", "0.7391106", "0.7391106", "0.73737", "0.73642063", ...
0.0
-1
Run the database seeds.
public function run() { DB::table('Building')->insert(array( ['BuildingID' => 1, 'IsAvailable' => 1, 'YearOfResidenceID' => 1, 'BuildingDescription' => 'Centennial'], ['BuildingID' => 2, 'IsAvailable' => 1, 'YearOfResidenceID' => 1, 'BuildingDescription' => 'Davis'], ['BuildingID' => 3, 'IsAvailable' => 1, 'YearOfResidenceID' => 1, 'BuildingDescription' => 'Jenks East'], ['BuildingID' => 4, 'IsAvailable' => 1, 'YearOfResidenceID' => 1, 'BuildingDescription' => 'Jenks West'], ['BuildingID' => 5, 'IsAvailable' => 1, 'YearOfResidenceID' => 1, 'BuildingDescription' => 'Memorial'], ['BuildingID' => 6, 'IsAvailable' => 1, 'YearOfResidenceID' => 1, 'BuildingDescription' => 'Watkins East'], ['BuildingID' => 7, 'IsAvailable' => 1, 'YearOfResidenceID' => 1, 'BuildingDescription' => 'Watkins West'], ['BuildingID' => 8, 'IsAvailable' => 1, 'YearOfResidenceID' => 1, 'BuildingDescription' => 'Wilkinson'] ) ); }
{ "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
array for validating the fields if they are false or blank then the field isn't valid
function validateFields($fields){ $valid = [ 'isValid' => true, 'invalidField' => '' ]; if(!isset($fields['articleName']) || empty($fields['articleName'])){ $valid['isValid'] = false; $valid['invalidField'] = 'articleName'; } if(!isset($fields['articleAuthor']) || empty($fields['articleAuthor'])){ $valid['isValid'] = false; $valid['invalidField'] = 'articleAuthor'; } if(!isset($fields['articleDate']) || empty($fields['articleDate'])){ $valid['isValid'] = false; $valid['invalidField'] = 'articleDate'; } if(!isset($fields['articleCategory']) || empty($fields['articleCategory'])){ $valid['isValid'] = false; $valid['invalidField'] = 'articleCategory'; } if(!isset($fields['articleContent']) || empty($fields['articleContent'])){ $valid['isValid'] = false; $valid['invalidField'] = 'articleContent'; } return $valid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateFields()\n {\n $invalidFields = [];\n if (empty($_POST[\"activity\"])) {\n array_push($invalidFields, \"activity\");\n }\n if (empty($_POST[\"country\"])) {\n array_push($invalidFields, \"country\");\n }\n if (empty($_POST[\...
[ "0.78867775", "0.72666657", "0.71082145", "0.7097243", "0.70896673", "0.7054567", "0.70306283", "0.7020883", "0.7005198", "0.70008737", "0.6985354", "0.69491005", "0.69177496", "0.6901748", "0.689425", "0.6859922", "0.6806142", "0.6797367", "0.6793119", "0.6784624", "0.674310...
0.68848586
15
echo 'Forget me not';
public function index($log_date = NULL){ // print_r(log_message('info','se ingresa dato al log')); //var_dump($this->session->userdata('NameUser')); $log_date = "2019-02-15"; $this->load->library('log_library'); if ($log_date == NULL) { // default: today $log_date = date('Y-m-d'); } $data['cols'] = $this->log_library->get_file('log-'. $log_date . '.php'); $data['log_date'] = $log_date; $this->load->view('log_view', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function howtoEat()\n {\n return \"Chicken could be fried!<br>\";\n }", "public function text()\n\t{\n\t\techo \"Hello there! I'm just an <code>echo</code> statement in a method...\";\n\t}", "public function swim(): void\r\n {\r\n echo \"\\nSwimming normally, as a human would do.....
[ "0.65085953", "0.6457918", "0.6338499", "0.6200309", "0.6177734", "0.61689496", "0.61443996", "0.6141387", "0.6087079", "0.6067416", "0.60364753", "0.6033251", "0.59969", "0.59690326", "0.5954086", "0.5920986", "0.5911295", "0.58960485", "0.5880785", "0.5876265", "0.5853118",...
0.0
-1
Run the database seeds.
public function run() { $levels = collect([ 'Dalam proses' => 1, 'C' => 2, 'B' => 3, 'A' => 4, 'Follow Up' => 5, 'Proses Ulang' => 6, ]); $levels->each(function ($item, $key) { \App\SchoolLevel::where('name', $key)->update(['order' => $item]); }); }
{ "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
Read all category endpoints to extract products endpoints.
public function read(\Traversable $categoryEndpoints) :array { $this->productsEndpoints = []; foreach($categoryEndpoints as $endpoint){ /** @var Endpoint $endpoint */ $this->firstPage = $this->currentPage = $this->lastPage = 1; $this->style->text(vsprintf('Reading <info>products endpoints</info> from <info>%s</info>', [$endpoint->getEndpoint()])); do { // Call client endpoint $rawData = $this->client->get($endpoint->getEndpoint(), ['page' => $this->currentPage]); $endpoint->setIsChecked(true); $endpoint->setLastCheck(time()); $this->entityManager->persist($endpoint); $this->extractPagination($rawData); $this->extractProductsEndpoints($rawData); if ($this->firstPage == $this->currentPage) $this->style->progressStart($this->lastPage); $this->style->progressAdvance(); $this->currentPage++; if ( $this->currentPage > $this->currentPage ) $this->style->progressFinish(); } while ($this->currentPage <= $this->lastPage); $this->entityManager->flush(); $this->style->text('<info>Ok</info>'); } $this->entityManager->flush(); $this->entityManager->clear(); return $this->productsEndpoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getEndpoints();", "public static function route_products_and_categories()\n\t{\n\t\tforeach(ORM::factory('product')->find_all() as $object)\n\t\t{\n\t\t\tKohana::config_set('routes.' . $object->show_path(false), inflector::plural($object->object_name) . '/show/' . $object);\n\t\t}\n\t\t\...
[ "0.6458531", "0.63298553", "0.6302737", "0.6299358", "0.6050368", "0.59567225", "0.59119076", "0.58100474", "0.5800538", "0.5738983", "0.5716174", "0.5709875", "0.57030153", "0.5698487", "0.56896275", "0.5689594", "0.5635815", "0.56319785", "0.56288624", "0.56185794", "0.5616...
0.7007666
0
Extract usesfull pagination data (max product pages) and set its in lastPage property.
private function extractPagination($rawData) { $crawler = new Crawler($rawData); // Extract pagination data if first loop. if ( $this->currentPage == 1 ) { $paginationNode = $crawler->filterXPath('//p[contains(@class, \'result-list-pagination\')]'); $lastPageHref = $paginationNode->filterXPath('//a')->last()->attr('href'); $query = parse_url($lastPageHref, PHP_URL_QUERY); parse_str($query, $params); $this->lastPage = $params['page']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildPagination() {}", "protected function buildPagination() {}", "abstract public function preparePagination();", "private function calcLastPageCount()\n\t{\n\t\t$this->lastPageCount=$this->totalRecords%$this->recordsPerPage;\n\t}", "public function getLastPage() {}", "private functio...
[ "0.6617372", "0.6617372", "0.64528716", "0.62495255", "0.6187624", "0.6144755", "0.6065227", "0.6059052", "0.6040978", "0.60401154", "0.6014538", "0.59953827", "0.59746003", "0.5961514", "0.59560186", "0.5917216", "0.5902409", "0.5865036", "0.5863645", "0.5846291", "0.5845641...
0.62032133
4
Get data and pass to command handler.
public function execute(InputInterface $input, OutputInterface $output) { $item = $input->getArgument('item'); $namespace = 'Petrol'; $petrol_path = $this->findPetrolPath(); $data = new MakeData($item, $namespace, $petrol_path); $handler = new MakeHandler($input, $output); $handler->handle($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleGetData()\n\t{\n\t\t$data = $this->getData();\n\t\t$options = $this->getOptions();\n\n\t\t$this->presenter->sendResponse(\n\t\t\tnew JsonResponse(\n\t\t\t\t[\n\t\t\t\t\t\"data\" => $data,\n\t\t\t\t\t\"options\" => $options,\n\t\t\t\t]\n\t\t\t)\n\t\t);\n\t}", "protected abstract function ...
[ "0.64654374", "0.64581233", "0.64575255", "0.62436765", "0.6219498", "0.6105075", "0.6078029", "0.6011139", "0.6011139", "0.5954009", "0.5917889", "0.59070253", "0.5903044", "0.5875896", "0.5836025", "0.58341897", "0.5816096", "0.58133197", "0.58023363", "0.57891065", "0.5739...
0.0
-1
Return all available templates.
public function index() { $this->authorize('index', 'Template'); $templates = $this->templateLoader->loadAll(); $perPage = $this->request->get('per_page', 10); $page = $this->request->get('page', 1); if ($this->request->has('query')) { $templates = $templates->filter(function($template) { return str_contains(strtolower($template['name']), $this->request->get('query')); }); } if ($orderBy = $this->request->get('order_by', 'updated_at')) { $desc = $this->request->get('order_dir', 'desc') === 'desc'; $templates = $templates->sortBy($orderBy, SORT_REGULAR, $desc); } $pagination = new LengthAwarePaginator( $templates->slice($perPage * ($page - 1), $perPage)->values(), count($templates), $perPage, $page ); return $this->success(['pagination' => $pagination]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getTemplatesUsed()\n {\n return static::$allTemplates;\n }", "public function getAllTemplates() {\n $pages = Templates::templates()->get();\n\n return response()->json($pages);\n }", "protected function getAvailableTemplates( )\n\t{\n\t\t$available_templates = $this->...
[ "0.80282915", "0.79768234", "0.79326385", "0.7880739", "0.7776463", "0.7776139", "0.76777995", "0.76511616", "0.7649571", "0.7640154", "0.7635228", "0.7635228", "0.7505148", "0.75045735", "0.74423444", "0.73726684", "0.7322831", "0.72995937", "0.7254559", "0.71874946", "0.713...
0.6502482
53
Get template by specified name.
public function show($name) { $this->authorize('show', 'Template'); try { $template = $this->templateLoader->load($name); } catch (FileNotFoundException $exception) { return abort(404); } return $this->success(['template' => $template]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplate($name){\n if(isset($name)){\n return $this->template[$name]; // $this->envir->loadTemplate($template)\n }\n return $this->template[$this->templace_interator++]; // $this->envir->loadTemplate($template)\n }", "public function getPageTemplate($name)\n ...
[ "0.8463446", "0.8097573", "0.78711486", "0.7598914", "0.7350094", "0.7281853", "0.72714216", "0.717092", "0.70359856", "0.6997082", "0.6902469", "0.6864246", "0.67922026", "0.6790387", "0.6746064", "0.6710415", "0.6660599", "0.65607303", "0.65528995", "0.6544062", "0.6542831"...
0.7299244
5
Create a new template.
public function store() { $this->authorize('store', 'Template'); $this->validate($this->request, [ 'display_name' => 'required|string|min:1|max:255', 'category' => 'required|string|min:1|max:255', 'template' => 'required|file|mimes:zip', 'thumbnail' => 'required|file|image' ]); $params = $this->request->except('template'); $params['template'] = $this->request->file('template'); $params['thumbnail'] = $this->request->file('thumbnail'); if ($this->templateLoader->exists($params['display_name'])) { return $this->error(['display_name' => 'Template with this name already exists.']); } $this->repository->create($params); return $this->success([ 'template' => $this->templateLoader->load($params['display_name']) ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreateTemplate() {\n $searchService = $this->getProvider()->get('\\PM\\Search\\Service\\Template'); /* @var $searchService \\PM\\Search\\Service\\Template */\n\n $this->getExecutor()\n ->add(function(Database $database, Request $request) {\n $database->getTrans...
[ "0.7934624", "0.7468909", "0.73898196", "0.73898196", "0.7327321", "0.7305498", "0.7277324", "0.7277324", "0.70306325", "0.7004789", "0.69514495", "0.69496715", "0.68879205", "0.6834849", "0.6811877", "0.68095434", "0.6790795", "0.6785001", "0.6769074", "0.6746271", "0.672199...
0.60079676
70
Make a new alert instance.
public static function make(SessionInterface $session, string $type, ...$args): MessageInterface { $class = Type::clasname($type); if (!class_exists($class)) { throw new Exception("Alert type '$class' class not found "); } return new $class($session, ...$args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(Alert $alert)\n {\n $this->alert = $alert;\n }", "protected function _createAlertItem()\n {\n $alert = $this->_helper->createAlert(\n array(\n 'email' => NoShipmentsAlert_Helper_Data::PATH_EMAIL,\n 'identity' => NoShipm...
[ "0.6744093", "0.66267544", "0.6574323", "0.63371533", "0.6265096", "0.6061547", "0.5973898", "0.586049", "0.579216", "0.57731014", "0.5713225", "0.569577", "0.5636536", "0.5634339", "0.5629033", "0.547038", "0.5393361", "0.53906095", "0.5359729", "0.53453267", "0.53170687", ...
0.47986537
76
function to clear user inputs
function clearUserInputs($data){ $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function clearInput()\n {\n $this->newPassword = '';\n $this->newPasswordConfirmation = '';\n $this->currentPassword = '';\n }", "function clear_input_data()\r\n{\r\n if (isset($_SESSION['input'])) {\r\n $_SESSION['input'] = [];\r\n }\r\n}", "public function rese...
[ "0.7763142", "0.73304564", "0.7041645", "0.6961925", "0.6926291", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0.687763", "0...
0.71296114
2
Load data fixtures with the passed EntityManager
public function load(ObjectManager $manager) { //* $faker= Faker\Factory::create(); for ($i=0;$i<5;$i++){ $group = new Group(); $group->setName($faker->company); $group->setRoles(array($this->getRandomRole())); $manager->persist($group); } $manager->flush(); //*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function loadData(ObjectManager $em);", "public function load(ObjectManager $manager)\n {\n // Fixtures are split into separate files\n }", "private function myLoadFixtures()\n {\n $em = $this->getDatabaseManager();\n\n // load fixtures\n $client = static...
[ "0.7679375", "0.7595607", "0.7548666", "0.7404691", "0.7331613", "0.727661", "0.7206886", "0.7035208", "0.70090604", "0.6956272", "0.6910011", "0.68890536", "0.685312", "0.6845403", "0.68398637", "0.682337", "0.6822801", "0.6818304", "0.6747987", "0.6747564", "0.67143613", ...
0.6223916
71
Get the order of this fixture
public function getOrder() { return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrder() {\n // the lower the number, the sooner that this fixture is loaded\n return 3;\n }", "public function getOrder() {\n // the lower the number, the sooner that this fixture is loaded\n return 2;\n }", "public function getOrder()\n {\n // the...
[ "0.86217266", "0.8601454", "0.85574025", "0.85574025", "0.85339797", "0.8531659", "0.8531659", "0.8531659", "0.8531659", "0.8521673", "0.85087395", "0.85087395", "0.84690696", "0.8452324", "0.8345033", "0.83282036", "0.8281141", "0.82403344", "0.8206898", "0.7914048", "0.7144...
0.68704516
66
Constructor to set initial values
public function __construct($response, xfSymfonyBrowserRequest $request) { $this->response = $response; $this->request = $request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->a...
[ "0.8028759", "0.8028759", "0.8028759", "0.8028759", "0.8028759", "0.7926206", "0.7926206", "0.7926206", "0.7926206", "0.7926206", "0.7926206", "0.7926206", "0.7926206", "0.7926206", "0.7926206", "0.7914584", "0.76346827", "0.75881857", "0.75881857", "0.75881857", "0.75881857"...
0.0
-1
Switch zoom level (gmaptile users the old 170 levels instead of 017) TODO: fix this in gmaptile.php
function _simplegeo_tileservice_get_nodes($x, $y, $zoom, $lang, $layer, $type) { $zoom = 21 - $zoom; $top_left = _simplegeo_tileservice_tile2coord($x, $y, $zoom); $bottom_right = _simplegeo_tileservice_tile2coord($x+1, $y+1, $zoom); $nodes = array(); // Use views as query builder if a view is specified. if (module_exists('views') && $layer->conf['view'] && $view = views_get_view($layer->conf['view'])) { // Sanity check; make sure the user added the bounding_box argument to the view. // TODO: Add support for other displays than "default"?. $argument_setting = $view->display['default']->display_options['arguments']; if (is_array($argument_setting)) { $first_argument_setting = current($argument_setting); if ($first_argument_setting['id'] == 'bounding_box') { // Create the string expected by the bounding box argument. $box = $top_left['lat'] . ',' . $top_left['long'] . ',' . $bottom_right['lat'] . ',' . $bottom_right['long']; $view->set_arguments(array($box)); $view->execute(); foreach ($view->result as $node) { $point = explode(' ', simple_geo_clean_wkt('point', $node->simple_geo_point)); $nodes[] = array('lat' => (float)$point[0], 'lon' => (float)$point[1], 'count' => 1, 'nid' => (int)$node->nid); } } } } // Build our own query based on layer settings. else { $sql = "SELECT n.nid, AsText(ps.position) AS simple_geo_point FROM {node} n INNER JOIN {simple_geo_position} ps ON n.nid = ps.nid AND ps.type = 'node' "; // Define the WHERE part of the query. We first define some defaults. $wheres = array( 'n.status <> 0', "Contains(Envelope(GeomFromText('LineString(%s %s,%s %s)')), ps.position)", "n.language = '%s'", ); if (!empty($layer->conf['node_type'])) { $wheres[] = "n.type = '%s'"; } // If max age is defined check so the node isn't older than the specified age. if (!empty($layer->conf['max_age'])) { $wheres[] = 'n.created >= ' . strtotime('-' . $layer->conf['max_age']); } // If update since is defined check so the node has been updated since the specified time. if (!empty($layer->conf['updated_since'])) { $wheres[] = 'n.changed >= ' . strtotime('-' . $layer->conf['updated_since']); } // Add the WHEREs to the query. $sql .= ' WHERE ' . implode(' AND ', $wheres); $sql .= " ORDER BY n.created"; $params = array($top_left['lat'], $top_left['long'], $bottom_right['lat'], $bottom_right['long'], $lang); if (isset($layer->conf['node_type'])) { $params[] = $layer->conf['node_type']; } $res = db_query(db_rewrite_sql($sql), $params); while ($node = db_fetch_object($res)) { $point = explode(' ', simple_geo_clean_wkt('point', $node->simple_geo_point)); $nodes[] = array('lat' => (float)$point[0], 'lon' => (float)$point[1], 'count' => 1, 'nid' => (int)$node->nid); } } return $nodes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setZoom($value) {\n\t}", "public function zoom() {\n\t}", "public function setZoom($nom){\n\t\t$zoom = (int) $zoom;\n\t\t// On vérifie ensuite si ce nombre est bien strictement positif.\n\t\tif ($zoom > 0){\n\t\t\t// Si c'est le cas, c'est tout bon, on assigne la valeur à l'attribut corresponda...
[ "0.7464501", "0.6858716", "0.6742981", "0.6731587", "0.66959023", "0.6533208", "0.6500038", "0.6359873", "0.6333222", "0.6212704", "0.6197975", "0.6119751", "0.5978669", "0.5949558", "0.59443074", "0.5836194", "0.57371", "0.5683524", "0.56734014", "0.5658885", "0.5621032", ...
0.0
-1
/ Create a connection to a database
function __construct() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDatabaseConnection()\r\n\t{\r\n\t\t$this->dbConnectionPool = new \\Bitrix\\Main\\Db\\DbConnectionPool();\r\n\t}", "public function createConnection()\n {\n $client = DatabaseDriver::create($this->getConfig());\n\n return $client;\n }", "function createConection(){\n...
[ "0.8079734", "0.7740089", "0.7606688", "0.7596471", "0.75939846", "0.7503964", "0.7502423", "0.7502079", "0.73325104", "0.73203886", "0.72391456", "0.7191462", "0.71667737", "0.7130376", "0.70963025", "0.70942324", "0.70864236", "0.7077575", "0.70742416", "0.70686984", "0.706...
0.0
-1
/ Write new data
function _write($id, $sess_data) { //$row = DB::row("SELECT value FROM " . DB::$db_prefix . "_sessions WHERE sesskey = '".$id."'"); $time = time()+parent::$sess_lifetime; DB::query(" REPLACE INTO " . DB::$db_prefix . "_sessions VALUES ( '".$id."', '".$time."', '".addslashes($sess_data)."', '".$_SERVER['REMOTE_ADDR']."' ) "); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _write($data)\n {\n }", "abstract public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data) {\n\t}", "private function write($data)\n {\n ...
[ "0.76748735", "0.7601268", "0.75909555", "0.75909555", "0.75909555", "0.75909555", "0.74730575", "0.6981291", "0.69794786", "0.69478804", "0.694365", "0.694365", "0.6798985", "0.6737019", "0.6724943", "0.66886795", "0.6668277", "0.6661615", "0.66370255", "0.6593994", "0.65910...
0.0
-1
/ Garbage collection, deletes old sessions
function _gc($maxlifetime) { DB::query("DELETE FROM " . DB::$db_prefix . "_sessions WHERE expiry < UNIX_TIMESTAMP(NOW() - '" . $maxlifetime . "')"); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gc (){\n\n # create database object if not create\n self::_connect();\n\n # delete expired session from database table\n $res = $this->link->delete($this->table_name,array(array('','session_expire','<',time(),'')));\n\n }", "public function delete_old_sessions()\n\t{\n\t\t...
[ "0.8319907", "0.8187626", "0.7754206", "0.77426237", "0.7693593", "0.76826644", "0.76817435", "0.7603903", "0.7582027", "0.7472482", "0.74605674", "0.74484473", "0.7440818", "0.7419568", "0.7380221", "0.7361422", "0.73577166", "0.7352371", "0.734091", "0.73347056", "0.7332998...
0.0
-1
Sets the $arguments properties.
private function setArguments() { return array( 'labels' => $this->labels, 'public' => $this->public, 'menuIcon' => $this->menuIcon, 'capabilities' => $this->capabilities, 'supports' => $this->supports, ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setArguments($arguments)\n {\n $this->arguments = $arguments;\n }", "public function setArguments(array $arguments);", "public function setArguments(...$arguments) {\n $this->arguments = $arguments;\n return $this;\n }", "public function setArguments(array $argum...
[ "0.85885125", "0.8538704", "0.82100224", "0.80706704", "0.7905983", "0.7775964", "0.7695404", "0.75620294", "0.7551853", "0.74757326", "0.74757326", "0.74757326", "0.74755543", "0.74308574", "0.74129874", "0.7373583", "0.71355927", "0.70314837", "0.70069045", "0.6903506", "0....
0.6545601
32
Registers the custom post type with WordPress if it does not already exists.
public function registerCustomPostType() { if (!post_type_exists($this->slug)) { register_post_type($this->slug, $this->arguments); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}", "public function register_post_type() {\n\t\t// make sure the post type info is set - none of this will work without it!\n\t\tif ( is_null( $this->post_type ) or is_null( $this->post_type_...
[ "0.7911114", "0.7758154", "0.7661058", "0.7630418", "0.7593939", "0.7571871", "0.7562517", "0.75430495", "0.7474007", "0.7469335", "0.74665034", "0.746017", "0.7450408", "0.7431948", "0.7394482", "0.7367333", "0.7367333", "0.73577774", "0.7355499", "0.7352057", "0.7351799", ...
0.8714965
0
Test that an invalid page cannot be passed to the constructor.
public function testInvalidPage() { $this->setExpectedException(\InvalidArgumentException::class); new XmlSitemapWriter($this->sitemap, 'invalid'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetShowPageWithInvalidData()\n {\n $resp = $this->getMockBuilder('Acme\\Http\\Response')\n ->setConstructorArgs([$this->request, $this->signer,\n $this->blade, $this->session])\n ->setMethods(['render'])\n ->getMock();\n\n // over...
[ "0.6741501", "0.66459084", "0.64610624", "0.6359607", "0.6358735", "0.62769055", "0.6220618", "0.61645335", "0.6139091", "0.61272395", "0.60980564", "0.6085131", "0.60685724", "0.6056345", "0.60298026", "0.6008254", "0.5976627", "0.5976627", "0.59700674", "0.59246576", "0.591...
0.7546506
0
Tests the writeElement() method.
public function testWriteElement() { $writer = new XmlSitemapWriter($this->sitemap, '1'); $writer->openMemory(); $writer->writeElement('url', [ 'item1' => 'value1', [ 'key' => 'item2', 'value' => '<value2>', ], [ 'key' => 'item3', 'value' => [ 'subkey' => 'subvalue', ], 'attributes' => [ 'attr1key' => 'attr1value', 'attr2key' => '<attr2value>', ], ], ]); $output = $writer->outputMemory(); $expected = '<url><item1>value1</item1><item2>&lt;value2&gt;</item2><item3 attr1key="attr1value" attr2key="&lt;attr2value&gt;"><subkey>subvalue</subkey></item3></url>' . PHP_EOL; $this->assertEquals($expected, $output); $writer->writeElement('url', [ 'loc' => 'https://www.example.com/test', 'image:image' => [ 'image:loc' => Url::fromUri('https://www.example.com/test.jpg'), 'image:title' => new TranslatableMarkup('The image title'), 'image:caption' => "'The image & its \"caption.\"'", ], ]); $output = $writer->outputMemory(); $expected = '<url><loc>https://www.example.com/test</loc><image:image><image:loc>https://www.example.com/test.jpg</image:loc><image:title>The image title</image:title><image:caption>&#039;The image &amp; its &quot;caption.&quot;&#039;</image:caption></image:image></url>' . PHP_EOL; $this->assertSame($expected, $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWrite()\n {\n //Tries some values\n foreach ([\n ['first', 'second'],\n [],\n [true],\n [false],\n [null],\n ] as $value) {\n $this->assertTrue($this->SerializedArray->write($value));\n $result ...
[ "0.6594411", "0.62281907", "0.6161681", "0.61572105", "0.610757", "0.59129375", "0.59129375", "0.578263", "0.5731701", "0.5684551", "0.5590043", "0.557673", "0.55603814", "0.5523057", "0.5517346", "0.55029833", "0.5499105", "0.54597044", "0.5455645", "0.5354365", "0.5336838",...
0.7116637
0
protected $dispatchesEvents = [ 'updated' => ApplicationRespondedToEvent::class ];
public function applicant() { return $this->belongsTo('App\Applicant'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function onUpdated()\n {\n return true;\n }", "public function broadcastOn()\n {\n return ['RecordChanges'];\n }", "public function after_update() {}", "public function broadcastAs()\n {\n return 'updated';\n }", "public function refreshUpdated() {\n $thi...
[ "0.66790175", "0.6555206", "0.64177376", "0.6362392", "0.628031", "0.6273065", "0.6213586", "0.6185381", "0.61152154", "0.6112394", "0.6046758", "0.6046758", "0.60170424", "0.5960229", "0.59432757", "0.5931007", "0.5915904", "0.589375", "0.589375", "0.589375", "0.58858675", ...
0.0
-1
menangkap url yang diinput di url
public function parseURL() { if (isset($_GET['url'])) { $url = rtrim($_GET['url'], '/'); //menghapus tanda / di akhir url $url = filter_var($url, FILTER_SANITIZE_URL);//memfilter url dari karakter aneh (hack) $url = explode('/', $url); //memecah url yang diinput dengan delimiter / dan menjadikannya array return $url; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function url();", "public function url();", "public function url();", "private function _getUrl()\n {\n // Explode url to the array Variabels (url)\n $url = isset($_GET['url']) ? $_GET['url'] : null;;\n $url = rtrim($url, '/');\n $url = filter_var($url,FILTER_SANITIZE_UR...
[ "0.74021924", "0.74021924", "0.74021924", "0.7172676", "0.70907986", "0.7075898", "0.7056946", "0.7056946", "0.69490606", "0.6921065", "0.69077134", "0.6896712", "0.6862313", "0.6862313", "0.6811164", "0.6811164", "0.6811164", "0.6811164", "0.6811164", "0.6811164", "0.6811164...
0.6689136
29
Imported entity type code getter
public function getEntityTypeCode() { return 'sales_rule'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getEntityTypeCode();", "public function entityFor(): string;", "abstract protected function getEntityType(): string;", "public function getType(): EntityType;", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode(...
[ "0.77840203", "0.687915", "0.6849696", "0.67124015", "0.66970587", "0.66970587", "0.66970587", "0.66970587", "0.66970587", "0.66970587", "0.66940534", "0.66940534", "0.66940534", "0.6631565", "0.6627615", "0.65743446", "0.6523308", "0.6499831", "0.6462269", "0.64000916", "0.6...
0.0
-1
Retrieve All Fields Source
public function getAllFields() { return $this->fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchFields();", "public function getAllFields();", "public function fetch_fields() {}", "function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public...
[ "0.72350246", "0.71955043", "0.6927754", "0.6899743", "0.6876466", "0.6876466", "0.6876466", "0.6876466", "0.6876466", "0.6876466", "0.68613183", "0.68613183", "0.68613183", "0.66798764", "0.66798764", "0.66798764", "0.66798764", "0.66798764", "0.6653085", "0.66482925", "0.66...
0.6368214
29
Validate row data for replace behaviour
public function validateRowForReplace(array $rowData, $rowNumber) { $this->validateRowForDelete($rowData, $rowNumber); $this->validateRowForUpdate($rowData, $rowNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scrub_row (&$row) {\n\t\t//\twith people filling in fields with things like\n\t\t//\t\"N/A\" or \"XX\".\n\t\t//\n\t\t//\tFix this\n\t\tforeach ($row as &$value) {\n\t\t\n\t\t\tif (is_null($value)) continue;\n\t\t\n\t\t\tif (\n\t\t\t\t//\tMatch \"N/A\" and variants\n\t\t\t\t(preg_match(\n\t\t\t\t\t'/^\\\\s...
[ "0.65720755", "0.65195394", "0.64467067", "0.63926315", "0.63761115", "0.6222439", "0.6207895", "0.6151898", "0.61306554", "0.6127452", "0.6084676", "0.6047883", "0.60110384", "0.5918179", "0.5876885", "0.5859545", "0.5847386", "0.58383036", "0.57409394", "0.57371116", "0.568...
0.66200906
0
Validate row data for delete behaviour
public function validateRowForDelete(array $rowData, $rowNumber) { if (empty($rowData[self::COLUMN_RULE_ID])) { $this->addRowError(self::ERROR_RULE_ID_IS_EMPTY, $rowNumber); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_del($rowindex) {\r\n /* called on row delete validation */\r\n return True;\r\n }", "public function delete() {\n\t\tif (!empty($this->originalData)) {\n\t\t\t$query = $this->connection->query(\"DELETE FROM {$this->table} WHERE \".self::$primaryKey[$this->table].\"='{$this->originalDa...
[ "0.73021", "0.6691338", "0.6319402", "0.63003045", "0.6299784", "0.62914497", "0.623044", "0.62237966", "0.6204081", "0.6192909", "0.61627024", "0.6136963", "0.6127818", "0.61245763", "0.6115297", "0.61081517", "0.6096627", "0.6093777", "0.6082443", "0.60793763", "0.60744476"...
0.6700755
1
Validate row data for update behaviour
public function validateRowForUpdate(array $rowData, $rowNumber) { if (!empty($rowData['conditions_serialized'])) { $conditions = $this->serializer->unserialize($rowData['conditions_serialized']); if (is_array($conditions)) { $this->validateConditions($conditions, $rowNumber); } else { $errorMessage = __('invalid conditions serialized.'); $this->addRowError($errorMessage, $rowNumber); } } if (!empty($rowData['actions_serialized'])) { $actions = $this->serializer->unserialize($rowData['actions_serialized']); if (is_array($actions)) { $this->validateActions($actions, $rowNumber); } else { $errorMessage = __('invalid actions serialized.'); $this->addRowError($errorMessage, $rowNumber); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _validateRowForUpdate(array $rowData, $rowNumber)\n {\n $multiSeparator = $this->getMultipleValueSeparator();\n if ($this->_checkUniqueKey($rowData, $rowNumber)) {\n $email = strtolower($rowData[self::COLUMN_EMAIL]);\n $website = $rowData[self::COLUMN_WEBSI...
[ "0.680777", "0.6710388", "0.6656974", "0.6619826", "0.65885067", "0.6550907", "0.65424544", "0.64885575", "0.6457344", "0.640763", "0.6295728", "0.6286032", "0.62814933", "0.62572455", "0.625689", "0.6240432", "0.62380177", "0.6216153", "0.62104696", "0.620893", "0.61786956",...
0.64663124
8
Prepare conditions attribute value
protected function prepareAttributeValue($conditions) { $condition = $this->conditionFactory->create($conditions['type']); $attributes = $condition->loadAttributeOptions()->getAttributeOption(); if (isset($attributes[$conditions['attribute']])) { $condition->setAttribute($conditions['attribute']); if (in_array($condition->getInputType(), ['select', 'multiselect'])) { // reload options flag $condition->unsetData('value_select_options'); $condition->unsetData('value_option'); $options = $condition->getValueOption(); if (is_array($conditions['value'])) { foreach ($conditions['value'] as $key => $value) { $optionId = array_search($value, $options); $conditions['value'][$key] = $optionId; } } else { $optionId = array_search($conditions['value'], $options); $conditions['value'] = $optionId; } } } return $conditions['value']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareAttributeValue($conditions)\n {\n $condition = $this->conditionFactory->create($conditions['type']);\n $attributes = $condition->loadAttributeOptions()->getAttributeOption();\n\n if (isset($attributes[$conditions['attribute']])) {\n $condition->setAttrib...
[ "0.65336376", "0.65336376", "0.63051194", "0.59452623", "0.58800155", "0.58586246", "0.5798726", "0.5718138", "0.5715725", "0.5703869", "0.56777", "0.5596623", "0.5591259", "0.5584627", "0.5584627", "0.554995", "0.554842", "0.55405974", "0.553837", "0.5503895", "0.5485584", ...
0.6552558
0
Prepare actions attribute value
protected function prepareActionAttributeValue($actions) { $condition = $this->actionFactory->create($actions['type']); $attributes = $condition->loadAttributeOptions()->getAttributeOption(); if (isset($attributes[$actions['attribute']])) { $condition->setAttribute($actions['attribute']); if (in_array($condition->getInputType(), ['select', 'multiselect'])) { // reload options flag $condition->unsetData('value_select_options'); $condition->unsetData('value_option'); $options = $condition->getValueOption(); if (is_array($actions['value'])) { foreach ($actions['value'] as $key => $value) { $optionId = array_search($value, $options); $actions['value'][$key] = $optionId; } } else { $optionId = array_search($actions['value'], $options); $actions['value'] = $optionId; } } } return $actions['value']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareActionAttributeValue($actions)\n {\n $condition = $this->actionFactory->create($actions['type']);\n $attributes = $condition->loadAttributeOptions()->getAttributeOption();\n\n if (isset($attributes[$actions['attribute']])) {\n $condition->setAttribute($a...
[ "0.69672364", "0.6375995", "0.6265252", "0.60958993", "0.599421", "0.59652597", "0.59637576", "0.59184337", "0.58816284", "0.58715135", "0.5850302", "0.5815708", "0.578759", "0.57814676", "0.57397443", "0.5704639", "0.5695379", "0.5673382", "0.5672905", "0.5671205", "0.564901...
0.7000416
0
Inner source object getter
protected function _getSource() { if (!$this->_source) { throw new LocalizedException(__('Please specify a source.')); } return $this->_source; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getSource();", "public function getObj();", "public function getIndirectObject() {}", "public function getIndirectObject() {}", "public function get_source()\n {\n }", "public function getSourceEntity();", "abstract public function get();", "abstract public func...
[ "0.6439414", "0.640487", "0.6382997", "0.6382997", "0.6302256", "0.62665695", "0.62505823", "0.62505823", "0.62505823", "0.62505823", "0.62505823", "0.62505823", "0.62216425", "0.6195499", "0.61875075", "0.6157564", "0.6156527", "0.6156527", "0.61428696", "0.6094362", "0.6094...
0.0
-1
for just one row
public function getrow($query , $param = []) { try { $stmt = $this->db->prepare($query); $stmt->execute($param); return $stmt->fetch(); } catch(PDOException $error) { throw new Exception($error->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exec_SELECTgetSingleRow() {}", "public function firstRow() {\n\t}", "public function get_row();", "public function getRow() {}", "function _dummy($row) {\n\t\treturn $row;\n\t}", "abstract public function getSpecificRow();", "public function singleRow(){\n $this->execute();\n ...
[ "0.71008414", "0.70596224", "0.6890322", "0.6871844", "0.6864976", "0.68287516", "0.6794041", "0.6657927", "0.6637314", "0.6544214", "0.6544214", "0.64690065", "0.6467964", "0.6442221", "0.638338", "0.6354601", "0.63239145", "0.6264248", "0.6212573", "0.6116043", "0.61150587"...
0.0
-1
Get QuestString value with default value if querystring is not set
function GetQueryString($name, $default="") { return ValidRequiredQueryString($name) ? $_GET[$name] : $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_query_var($query_var, $default_value = '')\n {\n }", "public function get($query_var, $default_value = '')\n {\n }", "function get_query_str_value($name) {\n\n return (array_key_exists($name, $_GET) ? $_GET[$name] : null);\n}", "public function query_string($default = '', ...
[ "0.7102541", "0.6804903", "0.67102396", "0.65627486", "0.6550244", "0.6384389", "0.635669", "0.6310451", "0.62901837", "0.62821704", "0.62745273", "0.62443584", "0.6207515", "0.61467254", "0.61238575", "0.6121417", "0.61206925", "0.6101068", "0.6099851", "0.60926443", "0.6090...
0.74760604
0
Check that query string param is not empty
function ValidRequiredQueryString($name) { return isset($_GET[$name]) && $_GET[$name] != ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isEmpty()\n {\n return (!is_array($this->params) || count($this->params) == 0);\n }", "Public static function parametersEmpty(){\n\n throw new \\yii\\web\\HttpException(206, 'Query parameters Should not empty', 405);\n\n\n }", "private function verify_parameters(){\n if( e...
[ "0.67162734", "0.6675367", "0.6554458", "0.6476091", "0.643055", "0.6389102", "0.6387113", "0.6334984", "0.63314694", "0.6294919", "0.6288418", "0.62765974", "0.62431735", "0.6224884", "0.62146294", "0.61709404", "0.61601925", "0.61416894", "0.6111461", "0.6107865", "0.603202...
0.77078784
0
Get Post value with default value if querystring is not set
function GetPost($name, $default="") { return ValidRequiredPost($name) ? $_POST[$name] : $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_query_var($query_var, $default_value = '')\n {\n }", "function get_form_val($key, $default='', $getfirst=TRUE)\r\n{\r\n if ($getfirst)\r\n {\r\n return (empty($_GET[$key]) ? (empty($_POST[$key]) ? $default : $_POST[$key]) : $_GET[$key]);\r\n }\r\n else\r\n {\r\n return (empty($_POST...
[ "0.71553534", "0.6914543", "0.6896532", "0.680189", "0.67324764", "0.6709569", "0.6687148", "0.666221", "0.6644682", "0.6618038", "0.65568715", "0.6542338", "0.65153116", "0.65057224", "0.64896667", "0.6476278", "0.64676577", "0.6450422", "0.64371306", "0.6417068", "0.6405163...
0.6889245
3
Check that post param is not empty
function ValidRequiredPost($name) { return isset($_POST[$name]) && $_POST[$name] != ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkEmpty(){\n\t\tif(!empty($_POST)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isPostLeeg()\n {\n return empty($_POST);\n }", "function checkPOST() : bool\n {\n if (!(isset($_POST['firstName']) && isset($_POST['secondName'])))\n {\n ...
[ "0.7423945", "0.71076137", "0.70415545", "0.7016539", "0.6903644", "0.68790364", "0.68191296", "0.6761175", "0.67490524", "0.6694592", "0.66818935", "0.66723293", "0.6665045", "0.66259265", "0.6602465", "0.657979", "0.6578675", "0.6455953", "0.64507854", "0.6442074", "0.64322...
0.7182731
1
Forces initialization of the proxy
public function __load() { $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _initProxy() {\n\t\t$options = $this->getOptions();\n\t\t$this->_config->setAutoGenerateProxyClasses(isset($options['proxy']['autoGenerateProxyClasses']) ? $options['proxy']['autoGenerateProxyClasses'] : true);\n\t\t$this->_config->setProxyDir(isset($options['proxy']['directory']) ? $options['pr...
[ "0.75635636", "0.6560218", "0.65170795", "0.6495727", "0.6461294", "0.6409547", "0.6353856", "0.6326196", "0.630571", "0.6300076", "0.6300076", "0.6300076", "0.6300076", "0.6299988", "0.6299988", "0.62994456", "0.62994456", "0.62994456", "0.62994456", "0.62994456", "0.6299445...
0.0
-1
Output login result in JSON format.
function output_json_results() { global $result; print json_encode($result); die(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }", "function login()\n {\n $data = $this->input->post();\n $username = $data['user'];\n $pass...
[ "0.73900574", "0.6807616", "0.6681354", "0.663231", "0.6626077", "0.66252226", "0.6582416", "0.6323892", "0.6282264", "0.6253441", "0.6243655", "0.6230951", "0.62254465", "0.62050563", "0.6196849", "0.6177105", "0.61737764", "0.61737204", "0.6159185", "0.6148827", "0.61296576...
0.0
-1
Register Convers8 user in Wordpress
function register_wordpress_user($convers8_user, $secret) { $wp_user_id = wp_insert_user(array( 'user_pass' => md5($convers8_user["id"] . $secret), 'user_login' => $convers8_user["id"], // make sure no illegal characters occur in user_nicename, since it is also in the member's URL 'user_nicename' => sanitize_title_with_dashes($convers8_user["firstName"] . '-' . $convers8_user["lastName"]), 'display_name' => $convers8_user["firstName"] . ' ' . $convers8_user["lastName"], 'nickname' => $convers8_user["firstName"] . ' ' . $convers8_user["lastName"], 'first_name' => $convers8_user["firstName"], 'last_name' => $convers8_user["lastName"], 'user_email' => $convers8_user["id"] . '-' . get_option('convers8_websiteid') . '-' . md5($convers8_user["id"] . $secret) . '@users.convers8.eu' )); return $wp_user_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_newUser( $args ) {\n \n global $wp_xmlrpc_server, $wp_roles;\n $wp_xmlrpc_server->escape($args);\n\n $blog_ID = (int) $args[0]; // for future use\n $username = $args[1];\n $password = $args[2];\n ...
[ "0.6712727", "0.65420777", "0.6436557", "0.63906527", "0.6331135", "0.6331101", "0.63111013", "0.63081783", "0.6228033", "0.61851543", "0.6169087", "0.6152797", "0.6145179", "0.61308134", "0.6096465", "0.6089725", "0.6088785", "0.60845447", "0.60621464", "0.6053979", "0.60467...
0.78215736
0
Initialization Autoloader, Session, Auth, Locale,
protected function _initAutoload() { $_startTime = microtime(1); //------- Define the autoloader parameters ------------ // Define basic prefix and the base path to the resources for the default module $autoloader = new Zend_Application_Module_Autoloader( array('namespace' => 'Default', 'basePath' => dirname(__FILE__))); // Add resource loader for admin module $resourceLoader = new Zend_Loader_Autoloader_Resource(array( 'basePath' => APPLICATION_PATH . '/modules/admin', 'namespace' => 'Admin', 'resourceTypes' => array( 'form' => array( 'path' => 'forms/', 'namespace' => 'Form', ) ), )); //------- Create an application directory ------------ Default_Plugin_SysBox::createAppPaths(); //--------- Remember the configuration to register --------- $config = $this->_options; Zend_Registry::set('config', $config); //------- Copy users upload dir ------------ Default_Plugin_SysBox::copyUsersUploadDir(); //----------------- Set session --------------- // Start session Zend_Session::start(); // Install option in order to prevent re-execution // Zend_Session::start() when calling (new Zend_Session_Namespace) Zend_Session::setOptions(array('strict' => true)); // Obtain an instance session object for the appropriate namespace $Zend_Auth = new Zend_Session_Namespace('Zend_Auth'); // Save to Registry Zend_Registry::set("Zend_Auth", $Zend_Auth); // Add a new type of resource controllers for plug-ins //$autoloader->addResourceType('cplugins', 'controllers/plugins', 'Controller_Plugins'); //---- Configuring user authentication ----- $auth = Zend_Auth::getInstance(); $auth->setStorage(new Zend_Auth_Storage_Session()); //------ Registering plugins --------- // Start 'FrontController' $this->bootstrap('FrontController'); $front = Zend_Controller_Front::getInstance(); // The plugin checks the user's access to resources $front->registerPlugin( new Default_Plugin_AclManager($auth)); //------------ Configure language translation ------------- $translate = new Zend_Translate('array', APPLICATION_PATH . '/languages/ru/My_Messages.php', 'ru'); $translate->addTranslation( APPLICATION_PATH . '/languages/ru/Zend_Validate.php', 'ru'); $translate->addTranslation( APPLICATION_PATH . '/languages/ru/My_Validate.php', 'ru'); $translate->addTranslation( APPLICATION_PATH . '/languages/uk/My_Messages.php', 'uk'); $translate->addTranslation( APPLICATION_PATH . '/languages/uk/Zend_Validate.php', 'uk'); $translate->addTranslation( APPLICATION_PATH . '/languages/uk/My_Validate.php', 'uk'); $translate->addTranslation( APPLICATION_PATH . '/languages/en/My_Messages.php', 'en'); $translate->addTranslation( APPLICATION_PATH . '/languages/en/Zend_Validate.php', 'en'); $translate->addTranslation( APPLICATION_PATH . '/languages/en/My_Validate.php', 'en'); //------------ Configure language translation modules ------------- $translate->addTranslation( APPLICATION_PATH . '/modules/hr/languages/ru/My_Messages.php', 'ru'); $translate->addTranslation( APPLICATION_PATH . '/modules/hr/languages/uk/My_Messages.php', 'uk'); $translate->addTranslation( APPLICATION_PATH . '/modules/hr/languages/en/My_Messages.php', 'en'); // Set the default translation language if (!isset($Zend_Auth->translate_locale)) { $Zend_Auth->translate_locale = $config['user']['locale']; } else { $locale = $Zend_Auth->translate_locale; $newLocal = Default_Plugin_SysBox::isUpdateTranslateLocale($locale); if (!$newLocal === FALSE) { $Zend_Auth->translate_locale = $newLocal; } } $translate->setLocale($Zend_Auth->translate_locale); // Save to Registry Zend_Registry::set('Zend_Translate', $translate); //------------ Configure site localization ------------- // Get type localization $paramLocal = Default_Plugin_SysBox::getLocalParam( $Zend_Auth->translate_locale); // Set localization $locale = new Zend_Locale($paramLocal); // Set timezone date_default_timezone_set($config['user']['timezone']); // Save to Registry Zend_Registry::set('Zend_Locale', $locale); //------------ Set the color scheme of the site ------------- if (!isset($Zend_Auth->user_scheme)) { $Zend_Auth->user_scheme = $config['user']['scheme']; } else { $scheme = $Zend_Auth->user_scheme; $newScheme = Default_Plugin_SysBox::getUserScheme($scheme); if ($newScheme !== $scheme) { $Zend_Auth->user_scheme = $newScheme; } } //---- Defining script execution time ---- $infoProfiler = Default_Plugin_SysBox::Translate("Время выполнения") . " Bootstrap_initAutoload(): "; Default_Plugin_SysBox::profilerTime2Registry($_startTime, $infoProfiler); return $autoloader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function init(){\r\n\t\t//Create the session authentication controller and internal data storage\r\n\t\tif(!static::$auth){\r\n\t\t\tstatic::$auth = new Authenticator();\r\n\t\t\tstatic::$data = new Internal();\r\n\t\t}\r\n\t\t\r\n\t\t//Initialize supplied modules\r\n\t\tforeach(func_get_args() as $arg){\r\...
[ "0.76214373", "0.7471684", "0.7435028", "0.7388418", "0.73335475", "0.73180526", "0.7315239", "0.7273038", "0.72028035", "0.7171584", "0.71348524", "0.71252626", "0.71223485", "0.71142596", "0.71142596", "0.7109477", "0.7108074", "0.7102531", "0.70797855", "0.70636505", "0.70...
0.690544
46
Initialization Log, Search, KCFinder
protected function _initLog() { $params = array(); //------------------ $_startTime = microtime(1); //Получим конфигурацию $config = $this->_options; //----- Create Zend_Log object ----- $columnMapping = array( 'ts' => 'timestamp', 'msg' => 'message', 'pr' => 'priority', 'pr_name' => 'priorityName'); $countMsg = $config['logging']['log']['max_rows']; $countEx = $config['logging']['exeption']['max_rows']; $countStat = $config['logging']['statistics']['max_rows']; // Get DB $db = Zend_Registry::get('db'); // Set params $params['db'] = $db; $params['columnMap'] = $columnMapping; // Create writer for DB $params['table'] = 'log_msg'; $params['max_rows'] = $countMsg; $writerMsg = new Default_Model_Log($params); $params['table'] = 'log_error'; $params['max_rows'] = $countEx; $writerEx = new Default_Model_Log($params); $params['table'] = 'log_stat'; $params['max_rows'] = $countStat; $writerStat = new Default_Model_Log($params); // Create logers $logMsg = new Zend_Log($writerMsg); $logEx = new Zend_Log($writerEx); $logStat = new Zend_Log($writerStat); // Adding new priorities for the $logMsg $logMsg->addPriority('LOGIN_OK', 8); $logMsg->addPriority('LOGIN_ERR', 9); $logMsg->addPriority('LOGOUT', 10); $logMsg->addPriority('REG_OK', 11); $logMsg->addPriority('REG_ERR', 12); $logMsg->addPriority('DETAILS_OK', 13); $logMsg->addPriority('FETCHPASS_COMPLETE_OK', 14); $logMsg->addPriority('FETCHPASS_COMPLETE_ERR', 15); $logMsg->addPriority('FETCHPASS_CONFIRM_OK', 16); $logMsg->addPriority('FETCHPASS_CONFIRM_ERR', 17); $logMsg->addPriority('MAIL_OK', 18); $logMsg->addPriority('MAIL_ERR', 19); $logMsg->addPriority('DB_SAVE_ERR', 20); $logMsg->addPriority('DB_DELETE_ERR', 21); $logMsg->addPriority('POST_EDIT', 22); $logMsg->addPriority('POST_SET_STATUS', 23); $logMsg->addPriority('ADMIN_POST_EDIT', 24); $logMsg->addPriority('ADMIN_ROW_UPDATE', 25); $logMsg->addPriority('ADMIN_ROW_INSERT', 26); $logMsg->addPriority('ADMIN_ROW_DELETE', 27); $logMsg->addPriority('MY_MSG', 28); // Adding new priorities for the $logStat $logStat->addPriority('LOGIN_OK', 8); $logStat->addPriority('LOGIN_ERR', 9); $logStat->addPriority('MAIL_OK', 10); $logStat->addPriority('FETCHPASS_COMPLETE_OK', 11); $logStat->addPriority('FETCHPASS_COMPLETE_ERR', 12); $logStat->addPriority('FETCHPASS_CONFIRM_OK', 13); $logStat->addPriority('FETCHPASS_CONFIRM_ERR', 14); $logStat->addPriority('POST_OPEN', 15); $logStat->addPriority('VIDEO_PLAY', 16); $logStat->addPriority('AUDIO_PLAY', 17); $emailParams = $config['logging']['email']; if ($emailParams['send']) { $mail = Default_Plugin_SysBox::createMail($emailParams); $writer = new Zend_Log_Writer_Mail($mail); $my_request = Default_Plugin_SysBox::getUrlRequest(); if (!$emailParams['subject']) $writer->setSubjectPrependText('Errors request - ' . $my_request); $writer->addFilter(Zend_Log::EMERG); $writer->addFilter(Zend_Log::ALERT); $writer->addFilter(Zend_Log::CRIT); $writer->addFilter(Zend_Log::ERR); $logger->addWriter($writer); } // Save to Registry Zend_Registry::set("Zend_Log", $logMsg); Zend_Registry::set("Zend_LogEx", $logEx); Zend_Registry::set("Zend_LogStat", $logStat); // Remember in the session array of search results $Zend_Auth = Zend_Registry::get("Zend_Auth"); if (!$Zend_Auth->search) { $Zend_Auth->search = array(); } //------------ Configure default search ------------- // Establish a query analyzer in the coding Utf8 Zend_Search_Lucene_Analysis_Analyzer::setDefault( new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive()); //------ Initialization file manager ------------- Default_Plugin_SysBox::iniKCFinder(); //---- Defining script execution time ---- $infoProfiler = Default_Plugin_SysBox::Translate("Время выполнения") . " Bootstrap_initLog(): "; Default_Plugin_SysBox::profilerTime2Registry($_startTime, $infoProfiler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function callInitializeSearchWordDataInTsfe() {}", "public function init()\n {\n $this->config = Yii::app()->params['CaseSearch'];\n $dependencies = array(\n 'OECaseSearch.models.*',\n 'OECaseSearch.components.*',\n );\n foreach ($this->config['paramete...
[ "0.65426546", "0.6306111", "0.62781453", "0.6263513", "0.62610847", "0.6255045", "0.6186079", "0.6176711", "0.6172693", "0.6154681", "0.6095916", "0.6017251", "0.60157186", "0.5964769", "0.59422773", "0.5882697", "0.58608097", "0.58091754", "0.57889235", "0.57745826", "0.5763...
0.0
-1
Writes a given $tree to a new spreadsheet
public static function writeTree(array $tree, string $heading = null, float $prefightOffset = null, bool $isConsolation = false, bool $hasPreFights = false): Spreadsheet { $spreadsheet = new Spreadsheet(); self::setHeading($spreadsheet, $heading); if ($prefightOffset === null) { $prefightOffset = self::calculateOffsetOfPrefights($tree, $isConsolation, $hasPreFights); } $fightHeightExponent = 0; // leave some margin for the heading $topMargin = 3; $lastFightHeightInCells = 2; // iterate over columns of (fighting) tree for ($c = 0; $c < count($tree); $c++) { // calculate fight height $fightHeightExponent += 1; if ($isConsolation) { if ($c === 0) { $fightHeightExponent += 1; } if ($c > 1) { if (count($tree[$c - 1]) === count($tree[$c])) { $fightHeightExponent -= 1; } } } $fightHeightInCells = pow(2, $fightHeightExponent) + 1; $spreadsheet->getActiveSheet()->getColumnDimensionByColumn($c + 1)->setWidth(20); // add top margin to align tree if (!$isConsolation) { $add = pow(2, $c + 1) - pow(2, $c); } else { $add = $lastFightHeightInCells; } $topMargin += floor($add / 2); $row = $topMargin; if ($c === 0) { $row += $prefightOffset; } // iterate over fights of this particular column (with index) $c foreach ($tree[$c] as $fight) { self::writeFightOfTree($spreadsheet, $c + 1, $row, $fight, $fightHeightInCells); // increase $row by height of fight $row += $fightHeightInCells; // increase $row by space between fights $row += $fightHeightInCells - 2; if ($c === 0 && $isConsolation && isset($tree[$c + 1]) && count($tree[$c]) === count($tree[$c + 1]) && !$hasPreFights) { $row += $fightHeightInCells * 2 - 2; } } $lastFightHeightInCells = $fightHeightInCells; } return $spreadsheet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save_tree()\n\t{\n\t\tforeach ($this->class_tree as $tree)\n\t\t{\n\t\t\tif (isset($tree['change_flag']))\n\t\t\t{\n\t\t\t\tswitch ($tree['change_flag'])\n\t\t\t\t{\n\t\t\t\t case 'INSERT' :\n\t\t\t\t\t$this->add_new_class($tree);\n\t\t\t\t\tbreak;\n\t\t\t\t case 'UPDATE' :\n\t\t\t\t\t$this->save...
[ "0.51819813", "0.5128529", "0.5111114", "0.5072464", "0.5047711", "0.50272876", "0.49843073", "0.4947742", "0.49133575", "0.48999193", "0.4873075", "0.4828034", "0.4792358", "0.47884977", "0.4770568", "0.4751768", "0.4707483", "0.47046813", "0.46909052", "0.46898842", "0.4684...
0.60947543
0
/ Initialize action controller here
public function init() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n /* Initialize action controller here */\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "protected function initializeController() {}", "protected function initializeAction() {}", "protected function initializeAction()...
[ "0.89566046", "0.89566046", "0.82057846", "0.80040884", "0.80040884", "0.8004028", "0.7928566", "0.7802862", "0.7750365", "0.7750365", "0.7750365", "0.7750365", "0.7750365", "0.7741994", "0.76497424", "0.7542271", "0.7541656", "0.7458589", "0.7430627", "0.7382884", "0.7349326...
0.0
-1
/ end po15 head cleanup remove WP version from RSS
function po_rss_version() { return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function theme_rss_version() { return ''; }", "function mdwpfp_rss_version() { return ''; }", "function wpgrade_rss_version() { return ''; }", "function spartan_rss_version() { return ''; }", "function bulledev_rss_version() { return ''; }", "function bones_rss_version() { return ''; }", "public functi...
[ "0.8088184", "0.8031337", "0.7991728", "0.7916498", "0.78290415", "0.77846205", "0.75705534", "0.7520781", "0.7428136", "0.74133563", "0.7149772", "0.6792606", "0.6727403", "0.6712296", "0.65957093", "0.6594163", "0.6594163", "0.6574723", "0.6574168", "0.6573446", "0.65106386...
0.8056424
1
remove WP version from scripts
function po_remove_wp_ver_css_js( $src ) { if ( strpos( $src, 'ver=' ) ) $src = remove_query_arg( 'ver', $src ); return $src; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpversion_remove_version() {\n return '';\n }", "function startertheme_remove_version() {\nreturn '';\n}", "function remove_versao_wp() { return ''; }", "function remove_versao_wp() { return ''; }", "function remove_wordpress_version() {\n remove_filter( 'update_footer', 'core_update_foot...
[ "0.82148284", "0.8044779", "0.7878838", "0.7878838", "0.74833775", "0.7447804", "0.7428268", "0.74207836", "0.73202467", "0.7311629", "0.73104113", "0.730171", "0.7275161", "0.72141814", "0.71467793", "0.7136071", "0.7071606", "0.7071569", "0.7066507", "0.70492953", "0.704929...
0.684393
33
remove injected CSS from gallery
function po_gallery_style($css) { return preg_replace( "!<style type='text/css'>(.*?)</style>!s", '', $css ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bleachwave_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function wpfolio_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n\t}", "function rusticmodern_remove_gallery_css...
[ "0.7787884", "0.7713304", "0.7709339", "0.76458716", "0.76458716", "0.7619448", "0.75321317", "0.74490476", "0.73914856", "0.7388842", "0.738003", "0.7356031", "0.734546", "0.7308483", "0.73073465", "0.7305299", "0.7213021", "0.69508654", "0.6883758", "0.6528112", "0.63088024...
0.73092705
13
/ end po theme support MENUS Register Navigation Menus
function register_po_nav_menus() { $locations = array( 'main-navi' => __( 'Site main navigations', 'text_domain' ), 'footer-link' => __( 'Site secondary links', 'text_domain' ), 'cart-link' => __( 'Cart links', 'text_domain' ), 'socmed-link' => __( 'Social media links', 'text_domain' ) ); register_nav_menus( $locations ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function omega_register_menus() {\n\tregister_nav_menu( 'primary', _x( 'Primary', 'nav menu location', 'omega' ) );\n}", "function basetheme_nav_init()\n{\n\n\tregister_nav_menus( array(\n 'header' => 'Header',\n 'footer' => 'Footer'\n\t) );\n\n}", "function get_registered_nav_menus()\n {\n ...
[ "0.82180166", "0.80616295", "0.80543405", "0.80352944", "0.7975038", "0.7938911", "0.7935851", "0.7917127", "0.7909255", "0.78959507", "0.7885589", "0.7883832", "0.7880348", "0.7833404", "0.78095996", "0.78090054", "0.77852374", "0.7782849", "0.77618474", "0.7755041", "0.7740...
0.8133599
1
OTHER CLEANUPS remove the p from around imgs [ ]
function po_filter_ptags_on_images($content){ return preg_replace('/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wph_remove_p_images($content) {\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function wpfme_remove_img_ptags($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content)...
[ "0.7701251", "0.73129153", "0.71207833", "0.6918383", "0.68745744", "0.6856024", "0.6828413", "0.6784832", "0.6770188", "0.6746481", "0.6746481", "0.6746481", "0.6746481", "0.6746481", "0.6746481", "0.67281234", "0.6721336", "0.67201537", "0.66565174", "0.6627986", "0.6613845...
0.67084926
18
Change the mode on a directory structure recursively. This includes changing the mode on files as well.
function cli_chmod($path, $mode = 0755, $recursive = true, $exceptions = array()) { global $_messages, $_errors; if ($recursive === false && is_dir($path)) { if (@chmod($path, intval($mode, 8))) { $_messages[] = sprintf('<success>%s changed to %s<success>', $path, $mode); return true; } $_errors[] = sprintf('<error>%s NOT changed to %s', $path, $mode); return false; } if (is_dir($path)) { $paths = cli_tree($path); foreach ($paths as $type) { foreach ($type as $key => $fullpath) { $check = explode(DS, $fullpath); $count = count($check); if (in_array($check[$count - 1], $exceptions)) { continue; } if (@chmod($fullpath, intval($mode, 8))) { $_messages[] = sprintf('<success>%s changed to %s</success>', $fullpath, $mode); } else { $_errors[] = sprintf('<error>%s NOT changed to %s</error>', $fullpath, $mode); } } } if (empty($_errors)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function changeMode($files, $mode, $umask = 0000, $recursive = false);", "public function setChmod($mode = self::DEFAULT_MODE, bool $recursive = true, array $exceptions = [])\n {\n if (!self::exists($this->path)){\n\t\t\t$this->errors[] = \"[{$this->path}] - Não existe.\";\n\t\t\treturn false;\n...
[ "0.7532009", "0.6632147", "0.6495247", "0.62224925", "0.611553", "0.6078675", "0.5832453", "0.5727831", "0.5716234", "0.57122064", "0.5532294", "0.55075413", "0.5447474", "0.5410911", "0.53919697", "0.5385702", "0.53489566", "0.5324143", "0.5310524", "0.5303046", "0.52709925"...
0.67568254
1
Returns an array of nested directories and files in each directory
function cli_tree($path, $exceptions = false, $type = null) { $files = array(); $directories = array($path); if (is_array($exceptions)) { $exceptions = array_flip($exceptions); } $skipHidden = false; if ($exceptions === true) { $skipHidden = true; } elseif (isset($exceptions['.'])) { $skipHidden = true; unset($exceptions['.']); } try { $directory = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_PATHNAME | RecursiveDirectoryIterator::CURRENT_AS_SELF); $iterator = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::SELF_FIRST); } catch (Exception $e) { if ($type === null) { return array(array(), array()); } return array(); } foreach ($iterator as $itemPath => $fsIterator) { if ($skipHidden) { $subPathName = $fsIterator->getSubPathname(); if ($subPathName{0} == '.' || strpos($subPathName, DS . '.') !== false) { continue; } } $item = $fsIterator->current(); if (!empty($exceptions) && isset($exceptions[$item->getFilename()])) { continue; } if ($item->isFile()) { $files[] = $itemPath; } elseif ($item->isDir() && !$item->isDot()) { $directories[] = $itemPath; } } if ($type === null) { return array($directories, $files); } if ($type === 'dir') { return $directories; } return $files; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTreeStructure()\n {\n $result = array();\n $search = function($folder, $prefix) use (&$result, &$search)\n {\n foreach (new \\DirectoryIterator($folder) as $node)\n {\n if ($node->isDir() && !$node->isDot())\n {\n ...
[ "0.74845445", "0.7245163", "0.7200864", "0.69663507", "0.696277", "0.69551754", "0.68972117", "0.68869925", "0.6854776", "0.680406", "0.6762117", "0.6629779", "0.6618723", "0.66186637", "0.6615637", "0.6586497", "0.65842015", "0.6561128", "0.65523094", "0.65509766", "0.652307...
0.66775525
11
Constructs new message container and clears its internal state
public function __construct() { $this->reset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n {\n $this->messages = [];\n }", "public function clear(){\r\n\t\t$this->_init_messages();\r\n\t}", "public function clearMessages()\n {\n $this->_messages = array();\n return $this;\n }", "public function clear(): void\n {\n $this->messages...
[ "0.6759655", "0.6694383", "0.6664635", "0.6585841", "0.65726465", "0.65234977", "0.64330304", "0.6162081", "0.6160057", "0.59145373", "0.5856848", "0.58269936", "0.5814096", "0.5718538", "0.5714013", "0.56949586", "0.56226987", "0.55620676", "0.55460143", "0.5533074", "0.5476...
0.0
-1
Clears message values and sets default ones
public function reset() { $this->values[self::ip] = null; $this->values[self::port] = null; $this->values[self::module] = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->values[self::MESSAGE] = null;\n $this->values[self::SENDER_KEY] = null;\n }", "public function reset()\n {\n $this->values[self::CONVERSATION] = null;\n $this->values[self::SKMSG] = null;\n $this->values[self::IMAGE] = null;\n $this->values[se...
[ "0.7559812", "0.74739546", "0.72973615", "0.7258333", "0.7185409", "0.71421975", "0.7037741", "0.70338154", "0.70285827", "0.70249987", "0.69918084", "0.697904", "0.6965748", "0.68274975", "0.68267244", "0.6796972", "0.6759827", "0.6743557", "0.67366123", "0.6724516", "0.6717...
0.0
-1
Sets value of 'ip' property
public function setIp($value) { return $this->set(self::ip, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setIp($ip)\n {\n if ($ip === null) {\n $this->ip = null;\n return $this;\n }\n\n if (is_string($ip)) {\n $ip = ip2long($ip);\n } elseif (is_numeric($ip)) {\n $ip = (int)$ip;\n } else {\n $ip = 0;\n }...
[ "0.7737894", "0.76971316", "0.767148", "0.7548826", "0.7498629", "0.7498629", "0.7382514", "0.7375807", "0.7375807", "0.7375807", "0.7375807", "0.7312045", "0.7254488", "0.696193", "0.69081837", "0.6907769", "0.6907769", "0.6907769", "0.6907769", "0.6907769", "0.6907769", "...
0.759007
3
Returns value of 'ip' property
public function getIp() { $value = $this->get(self::ip); return $value === null ? (string)$value : $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIp()\n {\n return $this->get(self::IP);\n }", "public function getIp()\n {\n return $this->get(self::IP);\n }", "public function ip()\n {\n return $this->rule('ip');\n }", "public function getIp(): string\n {\n return $this->ip;\n }", "...
[ "0.82780486", "0.82780486", "0.8274773", "0.82162684", "0.82162684", "0.82154155", "0.82154155", "0.82154155", "0.82154155", "0.82154155", "0.82154155", "0.82154155", "0.82134926", "0.81861377", "0.8166144", "0.81520605", "0.7890118", "0.7861993", "0.7834562", "0.7822492", "0...
0.8473826
0
Sets value of 'port' property
public function setPort($value) { return $this->set(self::port, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPort($port) {\n\n $this->port = $port;\n }", "public function setPort( $port )\n\t{\n\t\t$this->port = $port;\n\t\t$this->modified = true;\n\t}", "public function setPort($port)\n {\n $this->port = $port;\n }", "public function setPort( $port )\r\n {\r\n ...
[ "0.8972873", "0.8920385", "0.88408536", "0.88402736", "0.8814466", "0.8814392", "0.8814392", "0.8793737", "0.8793737", "0.87165165", "0.86611485", "0.85476255", "0.85403866", "0.8460845", "0.8321881", "0.82399565", "0.821368", "0.821368", "0.821368", "0.8142973", "0.8116791",...
0.76843905
29
Returns value of 'port' property
public function getPort() { $value = $this->get(self::port); return $value === null ? (string)$value : $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPort() {\n return @$this->attributes['port'];\n }", "public function getPort()\n {\n return (int)$this->port;\n }", "public function getPort()\r\n\t{\r\n\t\treturn $this->port;\r\n\t}", "public function getPort()\n {\n return $this->port;\n }", "public funct...
[ "0.88199407", "0.85959375", "0.8585278", "0.85842", "0.85842", "0.85842", "0.85842", "0.85842", "0.85842", "0.85842", "0.85842", "0.85842", "0.85842", "0.85842", "0.8583538", "0.8540972", "0.8540972", "0.85364634", "0.85364634", "0.84758043", "0.8436434", "0.8414167", "0....
0.86042583
1
Sets value of 'module' property
public function setModule($value) { return $this->set(self::module, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setModule($module) {\r\n\t\t$this->module = $module;\r\n\t}", "public function setModule($module)\n {\n $this->module = $module;\n }", "public function setModule(string $module)\n\t{\n\t\t$this->module=$module; \n\t\t$this->keyModified['module'] = 1; \n\n\t}", "public function s...
[ "0.826501", "0.81135076", "0.8079674", "0.79133654", "0.76723343", "0.7480928", "0.7235859", "0.7222321", "0.7123269", "0.70362407", "0.6944258", "0.69027835", "0.68152714", "0.676356", "0.6704974", "0.66533405", "0.664418", "0.66081506", "0.65958", "0.656101", "0.64303046", ...
0.7218807
8
Returns value of 'module' property
public function getModule() { $value = $this->get(self::module); return $value === null ? (string)$value : $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function module() {\n return $this->module;\n }", "public function getModule(){\n return $this->module;\n }", "public function getModule()\n {\n return $this->module;\n }", "public function getModule() {\n\t\treturn $this->module;\n\t}", "public function getModule() {\n\t\tretur...
[ "0.8210132", "0.78804106", "0.7852057", "0.7813826", "0.7813826", "0.7753828", "0.7753828", "0.7725103", "0.77203333", "0.76537687", "0.764463", "0.7525357", "0.752002", "0.74772567", "0.74126697", "0.7340175", "0.73386526", "0.7257938", "0.7257938", "0.714476", "0.7050012", ...
0.817467
1
Display a listing of the resource.
public function index() { $trackers = Tracker::all(); return view('trackers.index')->with('trackers', $trackers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { return view('trackers.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $tracker = new Tracker(); $tracker->student_id = $request->student_id; $tracker->entry_type = $request->entry_type; $tracker->from_hisbu = $request->from_hisbu; $tracker->from_rubu = $request->from_rubu; $tracker->from_page = $request->from_page; $tracker->from_ayah = $request->from_ayah; $tracker->to_hisbu = $request->to_hisbu; $tracker->to_rubu = $request->to_rubu; $tracker->to_page = $request->to_page; $tracker->to_ayah = $request->to_ayah; $tracker->date = $request->date; $tracker->save(); return redirect()->route('trackers.index'); }
{ "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(Tracker $tracker) { return view('trackers.show')->with('tracker', $tracker); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Tracker $tracker) { return view('trackers.edit')->with('tracker', $tracker); }
{ "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, Tracker $tracker) { $tracker->student_id = $request->student_id; $tracker->entry_type = $request->entry_type; $tracker->from_hisbu = $request->from_hisbu; $tracker->from_rubu = $request->from_rubu; $tracker->from_page = $request->from_page; $tracker->from_ayah = $request->from_ayah; $tracker->to_hisbu = $request->to_hisbu; $tracker->to_rubu = $request->to_rubu; $tracker->to_page = $request->to_page; $tracker->to_ayah = $request->to_ayah; $tracker->date = $request->date; $tracker->save(); return redirect()->route('trackers.index'); }
{ "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(Tracker $tracker) { $tracker->delete(); return redirect()->route('trackers.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Test using a simple function
function test_function_filter() { $var = new LiquidVariable('var | test_function_filter'); $this->context->set('var', 1000); $this->context->add_filters('test_function_filter'); $this->assertIdentical('worked', $var->render($this->context)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function test();", "protected abstract function test();", "function test(){\r\n //placeholder for future test functions\r\n }", "function test () {}", "public function test($arg);", "function testCallable() {}", "abstract public function test();", "abstract public...
[ "0.75165427", "0.75165427", "0.7267568", "0.71806484", "0.7095981", "0.69127905", "0.68731326", "0.68731326", "0.6850214", "0.684971", "0.679788", "0.668428", "0.6670897", "0.6664844", "0.6661073", "0.6652058", "0.66244096", "0.66056657", "0.66044384", "0.65537775", "0.655167...
0.0
-1
Test using a static class
function test_static_class_filter() { $var = new LiquidVariable('var | static_test'); $this->context->set('var', 1000); $this->context->add_filters('TestClassFilter'); $this->assertIdentical('worked', $var->render($this->context)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInstance() { }", "public static function callbackStaticTestFunction() {}", "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "protected abstract function getTestedInstance() : string;", "public function testStaticMethod()\n {\n $expected = <<<'CODE'\n/**\n * @retu...
[ "0.7475596", "0.6748467", "0.6511862", "0.6485774", "0.64434934", "0.6392609", "0.6390264", "0.6350254", "0.6324232", "0.62294364", "0.61889833", "0.6134921", "0.6132946", "0.6109648", "0.61080635", "0.6107675", "0.61052406", "0.60740703", "0.60740703", "0.6054873", "0.603678...
0.6283795
9
test using an object as a filter; an object fiter will retain its state between calls to its filters
function test_object_filter() { $var = new LiquidVariable('var | instance_test_one'); $this->context->set('var', 1000); $this->context->add_filters( new TestClassFilter()); $this->assertIdentical('set', $var->render($this->context)); $var = new LiquidVariable('var | instance_test_two'); $this->assertIdentical('set', $var->render($this->context)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function filter();", "public function test_apply_filter_within_class_instance( $hook ) {\n $var = rand_str();\n $filtered = yourls_apply_filter( $hook, $var );\n $this->assertNotSame( $var, $filtered );\n\t}", "public function filter();", "public function testFilter() ...
[ "0.6586772", "0.65611553", "0.6426967", "0.6378053", "0.6339948", "0.63219154", "0.62681127", "0.625397", "0.62239796", "0.6219945", "0.6202439", "0.614001", "0.6104981", "0.6101359", "0.6061781", "0.60586596", "0.6026564", "0.60031074", "0.6001481", "0.59855956", "0.5980194"...
0.753174
0
Handler for unknown URLs
function error404() { $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0'); $code='404'; $text='Not Found'; header($protocol . ' ' . $code . ' ' . $text); //header("Status: 404 Not Found"); //http_response_code(404); echo "<h1>404 Page Does Not Exist</h1>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function notFoundPageHandler() {\n $valid = true;\n $url_route = !empty($this->request->get['_route_']) ? $this->request->get['_route_'] : '';\n\n // Check non alias\n $url_base = $this->request->server['HTTPS'] ? $this->config->get('config_ssl') : $this->config->get('config_u...
[ "0.69054794", "0.65330166", "0.6211636", "0.6211636", "0.6200396", "0.61715794", "0.61610186", "0.61190236", "0.60491496", "0.60266644", "0.59287953", "0.5892336", "0.58870935", "0.58764046", "0.5874127", "0.58679694", "0.586796", "0.58470917", "0.5840845", "0.5830301", "0.58...
0.0
-1
Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { // For security, start by assuming the visitor is NOT authorized. $isValid = False; // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. // Therefore, we know that a user is NOT logged in if that Session variable is blank. if (!empty($UserName)) { // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. // Parse the strings into arrays. $arrUsers = Explode(",", $strUsers); $arrGroups = Explode(",", $strGroups); if (in_array($UserName, $arrUsers)) { $isValid = true; } // Or, you may restrict access to only certain users based on their username. if (in_array($UserGroup, $arrGroups)) { $isValid = true; } if (($strUsers == "") && false) { $isValid = true; } } return $isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkPageAllowed() {\n\n if (!$this->user->isPersonnalManager()) {\n\n header('Location: ./index.php');\n exit();\n }\n }", "public function restricted()\n {\n $site = new SiteContainer($this->db);\n\n $site->printHeader();\n if (iss...
[ "0.7619632", "0.7072883", "0.6896645", "0.68458045", "0.67869216", "0.67810124", "0.6758489", "0.6695543", "0.66813356", "0.66748095", "0.6660849", "0.66419417", "0.66035354", "0.6597928", "0.65839565", "0.6561224", "0.6559891", "0.6547126", "0.6542498", "0.654157", "0.653742...
0.0
-1
The encodings must be accessible in the exact same order than they are specified in the command's parameters, since they are also applied in this order.
public function test_keywordOrder() : void { $subject = <<<'EOT' {showencoded: "text" urlencode: idnencode:} EOT; $command = $this->parseCommand($subject); $this->assertTrue($command->isURLEncoded()); $this->assertTrue($command->isIDNEncoded()); $list = $command->getActiveEncodings(); $this->assertCount(2, $list); $this->assertSame(Mailcode_Commands_Keywords::TYPE_URLENCODE, $list[0]); $this->assertSame(Mailcode_Commands_Keywords::TYPE_IDN_ENCODE, $list[1]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_encoding()\n {\n }", "public function getEncoding();", "function convert_data_encodings($known_utf8 = false)\n{\n global $VALID_ENCODING, $CONVERTED_ENCODING;\n $VALID_ENCODING = true;\n\n if ($CONVERTED_ENCODING) {\n return; // Already done it\n }\n\n if...
[ "0.6302802", "0.62848127", "0.62653583", "0.6216917", "0.6205931", "0.61924034", "0.6186263", "0.617216", "0.617216", "0.6169729", "0.6118754", "0.611461", "0.6073608", "0.6056752", "0.6045394", "0.5933516", "0.5896256", "0.58647335", "0.585733", "0.58248407", "0.57616097", ...
0.0
-1
endregion region: Support methods
private function parseCommand(string $subject) : Mailcode_Commands_Command_ShowEncoded { $command = $this->parseCommandStringValid($subject); $this->assertInstanceOf(Mailcode_Commands_Command_ShowEncoded::class, $command); return $command; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function helper()\n\t{\n\t\n\t}", "private function _i() {\n }", "private function __() {\n }", "public function custom()\n\t{\n\t}", "private function method2()\n\t{\n\t}", "protected function _refine() {\n\n\t}", "final private function __construct() {}", "final private function ...
[ "0.6392347", "0.6260835", "0.62089545", "0.59734416", "0.5953748", "0.59213614", "0.5870459", "0.5870459", "0.5815629", "0.5779484", "0.5779484", "0.5779484", "0.57474643", "0.5724304", "0.57206154", "0.5710351", "0.56842476", "0.5647836", "0.5639234", "0.560744", "0.5595825"...
0.0
-1
PHP functions: echoFormFieldHtml, jsStringify, echoSelectTableInputHtml, doSkipField
function doSelectForInput($name) { #global $fields_to_make_selects; $fields_to_make_selects = Config::$config['fields_to_make_selects']; return in_array($name, $fields_to_make_selects ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function returnFieldJS() {}", "function getFormHTML()\n\t{\n\t\tstatic $id_num = 1000;\n\n\t\t$type = $this->type;\n\t\t$name = $this->name;\n\t\t$value = $this->_getTypeValue($this->type, $this->value);\n\t\t$default = $this->_getTypeValue($this->type, $this->default);\n\t\t$column_name = 'extra_vars' . ...
[ "0.6600523", "0.64153105", "0.64000636", "0.63812774", "0.61868465", "0.61419153", "0.6141889", "0.6115424", "0.6102133", "0.59421104", "0.5936112", "0.59335554", "0.59229463", "0.5908955", "0.5908015", "0.5882021", "0.5858427", "0.58304125", "0.582967", "0.5822831", "0.58196...
0.0
-1
decide if a field will be an or
function inputOrTextarea($name, $table=null) { $fields_to_make_textarea = Config::$config['fields_to_make_textarea']; $fields_to_make_textarea_by_table = Config::$config['fields_to_make_textarea_by_table']; if (in_array($name, $fields_to_make_textarea)) { return'textarea'; } elseif ($table && isset($fields_to_make_textarea_by_table[$table]) && in_array($name, $fields_to_make_textarea_by_table[$table]) ) { return 'textarea'; } else { return 'input'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOr();", "public function useOr()\n {\n $this->imploder = ' OR ';\n }", "protected static function logicalOR(){\n\t\t$values = func_get_args();\n\t\tif(is_array($values[0])){\n\t\t\t$values = $values[0];\n\t\t}\n\t\treturn self::junction('OR', $values);\n\t}", "public function o...
[ "0.784892", "0.64803207", "0.6404991", "0.6402417", "0.6307742", "0.6279862", "0.6230594", "0.6225763", "0.6151024", "0.61423516", "0.60762316", "0.60149133", "0.5905267", "0.5867836", "0.5826702", "0.57914704", "0.57892126", "0.57688487", "0.5762928", "0.57293683", "0.567778...
0.0
-1
add backslashes at end of line
function jsStringify($txt) { $txt = str_replace("\n", "\\n\\"."\n", $txt); // escape single quotes $txt = str_replace("'", "\\'", $txt); // fill-in {{vars}} $txt = preg_replace( "/ {{ ( [A-Za-z0-9_]+ ) }} /x", "'+\\1+'", $txt ); return "'$txt'"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function escape( $line ) {\n\t\t$line = preg_replace( '/\\\\\\\\$/', '', $line );\n\t\t$line = addcslashes( $line, '\\\\\"' );\n\t\t$line = str_replace( \"\\n\", '\\n', $line );\n\t\t$line = '\"' . $line . '\"';\n\n\t\treturn $line;\n\t}", "function crlf_endings(string $input) {\n\treturn str_re...
[ "0.6743838", "0.6562555", "0.6265857", "0.60758305", "0.60705906", "0.60550034", "0.604621", "0.6029425", "0.5976416", "0.5972771", "0.5927611", "0.5927611", "0.59108835", "0.5891376", "0.58694816", "0.58291095", "0.580229", "0.5786157", "0.5771759", "0.5766086", "0.575912", ...
0.0
-1
instituciones 2 se usa para mostrar la descripcion donde sale el codigo
public function instituciones2() { $this->db->trans_start(); $query = $this->db->select('poliza_institucion, nombre_institucion')->from('institucion_educativa')->order_by("nombre_institucion", "asc")->get(); //$str = $this->db->last_query(); //log_message('ERROR', 'error CIE10 ' . $str); if ($query->num_rows() > 0) { foreach ($query->result() as $key) { $data[$key->poliza_institucion] = $key->nombre_institucion; } $this->db->trans_complete(); return $data; } else { $this->db->trans_complete(); return FALSE; } $this->db->trans_complete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDesciption();", "function opcion__info()\n\t{\n\t\t$p = $this->get_proyecto();\n\t\t$param = $this->get_parametros();\n\t\t$this->consola->titulo( \"Informacion sobre el PROYECTO '\" . $p->get_id() . \"' en la INSTANCIA '\" . $p->get_instancia()->get_id() . \"'\");\n\t\t$this->consola->mensaj...
[ "0.6644359", "0.6596619", "0.64949834", "0.64949834", "0.64889354", "0.6468787", "0.6436932", "0.6405706", "0.6405706", "0.63695586", "0.6323727", "0.63069034", "0.63069034", "0.63069034", "0.63069034", "0.63069034", "0.63069034", "0.63069034", "0.63069034", "0.63069034", "0....
0.0
-1
/ Con el id del evento miro el id de la institucion educativa con el id de la institucion educativa, valido al aseguradora
function valida_Aseguradora_mail($id) { $this->db->trans_start(); $this->db->select('i.aseguradora')->from('institucion_educativa i, evento e') ->where('i.id_institucion = e.institucion_edu_id') ->where('e.id_evento',$id); $query = $this->db->get(''); //retornamos el id de la aseguradora. if($query->num_rows() > 0) { $this->db->trans_complete(); return $query; } else { $this->db->trans_complete(); return FALSE; } $this->db->trans_complete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function email_evento_id($id){\r\n $this->db->trans_start();\r\n\r\n $query = $this->db->select('registrado_por')\r\n ->where('id_evento', $id)\r\n ->get('evento');\r\n \r\n log_message('ERROR', 'llego a email_evento_id con id -->'.$id);\r\n \r\n ...
[ "0.64520437", "0.6323812", "0.62310785", "0.61544585", "0.60535616", "0.6038143", "0.60276496", "0.5986846", "0.595325", "0.59106195", "0.589407", "0.58729273", "0.5868825", "0.5862526", "0.58622104", "0.5807817", "0.5790571", "0.5786156", "0.5767716", "0.57535857", "0.574152...
0.6108392
4
consulto los codigos de cie10 de la base de datos
function cie10() { $this->db->trans_start(); //log_message('ERROR', 'mdchat total_pendientes() Aqui estoy 0'); $query = $this->db->select('cie10_codigo, cie10_nombre')->from('cie10')->order_by("cie10_nombre", "asc")->get(); //$str = $this->db->last_query(); //log_message('ERROR', 'error CIE10 ' . $str); if ($query->num_rows() > 0) { //log_message('ERROR', 'mdchat total_pendientes() Aqui estoy 2'); foreach ($query->result() as $key) { //$data[$key->cie10_cie2]=word_limiter($key->cie10_descripcion,5); $data[$key->cie10_codigo.' | '.$key->cie10_nombre] = $key->cie10_nombre; } $this->db->trans_complete(); return $data; } else { $this->db->trans_complete(); return FALSE; } //return $query; $this->db->trans_complete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllCargos(){\n\t\t\tDB_DataObject::debugLevel(0);\n\t\t\t$obj = DB_DataObject::Factory('VenCargo');\n\t\t\t$data=false;\n\t\t\t$obj->find();\n\t\t\t$i=0;\n\t\t\twhile($obj->fetch()){\n\t\t\t\t$data[$i]['idCargo']=$obj->idCargo;\n\t\t\t\t$data[$i]['nombre']=utf8_encode($obj->nombre);\n\t\t\t\t$data[$i][...
[ "0.65490943", "0.6200421", "0.61428523", "0.61353755", "0.61047727", "0.6051246", "0.60508996", "0.60457075", "0.5940241", "0.5931405", "0.5920648", "0.58757555", "0.5866256", "0.5864305", "0.5861602", "0.5855509", "0.58455914", "0.5823642", "0.5816729", "0.58167154", "0.5775...
0.61132395
4
recibo el id del evento
function email_evento_id($id){ $this->db->trans_start(); $query = $this->db->select('registrado_por') ->where('id_evento', $id) ->get('evento'); log_message('ERROR', 'llego a email_evento_id con id -->'.$id); if ($query->num_rows() > 0) { $row = $query->row(); $this->db->trans_complete(); $email = $this->email_evento($row->registrado_por); //llega el nombre de quien registra log_message('ERROR', 'se captura el correo -->'.$email); return $email; } else { $this->db->trans_complete(); return FALSE; } $this->db->trans_complete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdEvento()\n {\n return $this->id_evento;\n }", "public function getIdEvent(){\n\t\treturn $this->_idEvent;\n\t}", "public function getIdEvent(): int\r\n {\r\n return $this->idEvent;\r\n }", "public function getIdEvento()\n {\n return $this->IdEvento;\n ...
[ "0.7452529", "0.73604023", "0.7212178", "0.7211211", "0.6812034", "0.6687547", "0.64638865", "0.6409606", "0.6322491", "0.6268201", "0.6268201", "0.6256085", "0.6256085", "0.6256085", "0.6244425", "0.61870176", "0.6178031", "0.6174578", "0.61595553", "0.6117178", "0.6091651",...
0.6038972
40
recibo el id del evento
function email_conferencia($id){ $this->db->trans_start(); $query = $this->db->select('email_user') //busco el email del user que registro el evento. ->where('id_evento', $id) ->get('evento'); log_message('ERROR', 'llego a email_conferencia con id -->'.$id); if ($query->num_rows() > 0) { $row = $query->row(); $this->db->trans_complete(); //$email = $this->email_evento($row->registrado_por); //llega el nombre de quien registra log_message('ERROR', 'email_conferencia envio link a correo -->'.$email); return $row->email_user; } else { $this->db->trans_complete(); log_message('ERROR', 'momv->email_conferencia eno encuentra correo '); return FALSE; } $this->db->trans_complete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdEvento()\n {\n return $this->id_evento;\n }", "public function getIdEvent(){\n\t\treturn $this->_idEvent;\n\t}", "public function getIdEvent(): int\r\n {\r\n return $this->idEvent;\r\n }", "public function getIdEvento()\n {\n return $this->IdEvento;\n ...
[ "0.7452529", "0.73604023", "0.7212178", "0.7211211", "0.6812034", "0.6687547", "0.64638865", "0.6409606", "0.6322491", "0.6268201", "0.6268201", "0.6256085", "0.6256085", "0.6256085", "0.6244425", "0.61870176", "0.6178031", "0.6174578", "0.61595553", "0.6117178", "0.6091651",...
0.0
-1
Return BD conection from Registry or create new one
public static function get($connectionAlias = self::MCO_DB) { if (!Registry::get($connectionAlias)) { try { $instance = new self($connectionAlias); } catch (\PDOException $e) { die('Connection failed: ' . $e->getMessage()); } return $instance; } return Registry::get($connectionAlias); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}", "function getBd(){\n $cnx = connexion();\n return $cnx;\n}", "public static function ge...
[ "0.69283664", "0.63503814", "0.6309286", "0.6282236", "0.624002", "0.6196657", "0.6185039", "0.61784035", "0.61752325", "0.6171665", "0.61546844", "0.6138624", "0.6124105", "0.6121127", "0.61151725", "0.61047834", "0.60743976", "0.60412705", "0.60393983", "0.6033679", "0.6026...
0.0
-1
Rolls back a transaction
public function rollBack() { if ($done = $this->_pdo->rollBack()) { $this->hasActiveTransaction = false; } return $done; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rollBackTransaction()\r\n\t{\r\n\t\t$this->query(\"ROLLBACK TRANSACTION\");\r\n\t}", "public static function RollBackTrans() {\n try {\n if(DB::transactionLevel() > 0) {\n DB::rollBack();\n }\n }\n catch(Exception $e) {\n }\n }",...
[ "0.8359945", "0.82521224", "0.822535", "0.8192503", "0.8168962", "0.81255066", "0.8080264", "0.8074395", "0.8073392", "0.8073023", "0.80342495", "0.80342495", "0.80342495", "0.80342495", "0.80146915", "0.8003288", "0.78538", "0.7832819", "0.7825087", "0.78167", "0.7797866", ...
0.0
-1
This filter is documented in wpincludes/defaultwidgets.php
public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? esc_html__( 'Categories','noo-landmark' ) : $instance['title'], $instance, $this->id_base ); $c = ! empty( $instance['count'] ) ? '1' : '0'; $h = ! empty( $instance['hierarchical'] ) ? '1' : '0'; $p = ! empty( $instance['parent'] ) ? 0 : ''; echo $args['before_widget']; if ( $title ) { echo $args['before_title'] . $title . $args['after_title']; } $cat_args = array('orderby' => 'name', 'show_count' => $c, 'parent' => $p, 'hierarchical' => $h); ?> <ul> <?php $cat_args['title_li'] = ''; /** * Filter the arguments for the Categories widget. * * @since 2.8.0 * * @param array $cat_args An array of Categories widget options. */ wp_list_categories( apply_filters( 'widget_noo_categories_args', $cat_args ) ); ?> </ul> <?php echo $args['after_widget']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hocwp_theme_custom_widgets_init() {\r\n\r\n}", "function wp_widget_control($sidebar_args)\n {\n }", "function wp_list_widgets()\n {\n }", "public function off_canvas_applied_filters() {\n\t\t\tthe_widget( 'WC_Widget_Layered_Nav_Filters' );\n\t\t}", "function itstar_widget() {\n regist...
[ "0.72189915", "0.709181", "0.7019306", "0.68088347", "0.6708269", "0.6706655", "0.6678823", "0.66565096", "0.6646908", "0.6627346", "0.66086507", "0.6577388", "0.64979607", "0.6459598", "0.64573926", "0.64550704", "0.6451702", "0.6444807", "0.64435893", "0.6394204", "0.638339...
0.0
-1
/ Register widget with WordPress. parent user function class father
function __construct() { parent::__construct( 'noo_social', // Base Id esc_html__('Noo Social', 'noo-landmark' ), // NAME array('description' => esc_html__('Display social network', 'noo-landmark' )) // args ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function register_widget() {\n\t\t\t$classname = get_called_class();\n\t\t\tregister_widget( $classname );\n\t\t}", "public function register_widget() {\n register_widget( 'WPP_Widget' );\n }", "function wpb_load_widget()\n{\n register_widget('wpb_widget');\n}", "function register_widget(...
[ "0.85185015", "0.815563", "0.8126246", "0.8057008", "0.7996642", "0.7996642", "0.79482293", "0.7928225", "0.7871422", "0.7730925", "0.76806253", "0.7647383", "0.7613204", "0.7606207", "0.7593592", "0.75750387", "0.7570291", "0.7569808", "0.7531154", "0.7526672", "0.74828017",...
0.0
-1
Frontend display of widget
public function widget( $args, $instance ) { extract($args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget ; if ( $title ) : echo $before_title.$title.$after_title ; endif; $arg_social = array( array('id' => 'facebook'), array('id' => 'google'), array('id' => 'twitter'), array('id' => 'youtube'), array('id' => 'skype'), array('id' => 'linkedin'), array('id' => 'dribbble'), array('id' => 'pinterest'), array('id' => 'flickr'), array('id' => 'instagram') ) ; ?> <div class="noo_social"> <div class="social-all"> <?php foreach($arg_social as $social): if (!empty($instance[$social['id']])): ?> <a href="<?php echo ($instance[$social['id']]); ?>" target="_blank" class="<?php echo esc_attr($social['id']); ?>"><i class="fa fa-<?php echo esc_attr($social['id']); ?>"></i></a> <?php endif; endforeach; ?> </div> </div> <?php echo $after_widget ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}", "public function render_widget() {\n\n return Widget::render($t...
[ "0.7544606", "0.73311025", "0.72837144", "0.7251682", "0.7220104", "0.7095844", "0.70149666", "0.6908474", "0.6893132", "0.6893132", "0.6889531", "0.68773836", "0.6865939", "0.6865939", "0.6839554", "0.6814955", "0.68108886", "0.6784918", "0.67652696", "0.67451906", "0.672408...
0.0
-1